commit 7111951b8d4973bda27ff663f2cf18b663d15b48 Author: Linus Torvalds Date: Sun Mar 29 15:25:41 2020 -0700 Linux 5.6 commit 570203ec830dd451b8804cdef8036f7fca9f0311 Merge: ab93e984dbb4 b943f045a9af Author: Linus Torvalds Date: Sun Mar 29 10:40:31 2020 -0700 Merge branch 'akpm' (patches from Andrew) Merge vm fixes from Andrew Morton: "5 fixes" * emailed patches from Andrew Morton : mm/sparse: fix kernel crash with pfn_section_valid check mm: fork: fix kernel_stack memcg stats for various stack implementations hugetlb_cgroup: fix illegal access to memory drivers/base/memory.c: indicate all memory blocks as removable mm/swapfile.c: move inode_lock out of claim_swapfile commit ab93e984dbb41578b41208cee52ce4e709951eb2 Merge: 01af08bd24ed 749da8ca978f Author: Linus Torvalds Date: Sun Mar 29 10:36:29 2020 -0700 Merge tag 'timers-urgent-2020-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Thomas Gleixner: "A single fix for the Hyper-V clocksource driver to make sched clock actually return nanoseconds and not the virtual clock value which increments at 10e7 HZ (100ns)" * tag 'timers-urgent-2020-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/hyper-v: Make sched clock return nanoseconds correctly commit 01af08bd24edf50b2d9e06f18df13cb8d0d645b7 Merge: e595dd94515e df81dfcfd699 Author: Linus Torvalds Date: Sun Mar 29 10:07:00 2020 -0700 Merge tag 'irq-urgent-2020-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Thomas Gleixner: "A single bugfix to prevent reference leaks in irq affinity notifiers" * tag 'irq-urgent-2020-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Fix reference leaks on irq affinity notifiers commit b943f045a9af9fd02f923e43fe8d7517e9961701 Author: Aneesh Kumar K.V Date: Sat Mar 28 19:17:29 2020 -0700 mm/sparse: fix kernel crash with pfn_section_valid check Fix the crash like this: BUG: Kernel NULL pointer dereference on read at 0x00000000 Faulting instruction address: 0xc000000000c3447c Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries CPU: 11 PID: 7519 Comm: lt-ndctl Not tainted 5.6.0-rc7-autotest #1 ... NIP [c000000000c3447c] vmemmap_populated+0x98/0xc0 LR [c000000000088354] vmemmap_free+0x144/0x320 Call Trace: section_deactivate+0x220/0x240 __remove_pages+0x118/0x170 arch_remove_memory+0x3c/0x150 memunmap_pages+0x1cc/0x2f0 devm_action_release+0x30/0x50 release_nodes+0x2f8/0x3e0 device_release_driver_internal+0x168/0x270 unbind_store+0x130/0x170 drv_attr_store+0x44/0x60 sysfs_kf_write+0x68/0x80 kernfs_fop_write+0x100/0x290 __vfs_write+0x3c/0x70 vfs_write+0xcc/0x240 ksys_write+0x7c/0x140 system_call+0x5c/0x68 The crash is due to NULL dereference at test_bit(idx, ms->usage->subsection_map); due to ms->usage = NULL in pfn_section_valid() With commit d41e2f3bd546 ("mm/hotplug: fix hot remove failure in SPARSEMEM|!VMEMMAP case") section_mem_map is set to NULL after depopulate_section_mem(). This was done so that pfn_page() can work correctly with kernel config that disables SPARSEMEM_VMEMMAP. With that config pfn_to_page does __section_mem_map_addr(__sec) + __pfn; where static inline struct page *__section_mem_map_addr(struct mem_section *section) { unsigned long map = section->section_mem_map; map &= SECTION_MAP_MASK; return (struct page *)map; } Now with SPASEMEM_VMEMAP enabled, mem_section->usage->subsection_map is used to check the pfn validity (pfn_valid()). Since section_deactivate release mem_section->usage if a section is fully deactivated, pfn_valid() check after a subsection_deactivate cause a kernel crash. static inline int pfn_valid(unsigned long pfn) { ... return early_section(ms) || pfn_section_valid(ms, pfn); } where static inline int pfn_section_valid(struct mem_section *ms, unsigned long pfn) { int idx = subsection_map_index(pfn); return test_bit(idx, ms->usage->subsection_map); } Avoid this by clearing SECTION_HAS_MEM_MAP when mem_section->usage is freed. For architectures like ppc64 where large pages are used for vmmemap mapping (16MB), a specific vmemmap mapping can cover multiple sections. Hence before a vmemmap mapping page can be freed, the kernel needs to make sure there are no valid sections within that mapping. Clearing the section valid bit before depopulate_section_memap enables this. [aneesh.kumar@linux.ibm.com: add comment] Link: http://lkml.kernel.org/r/20200326133235.343616-1-aneesh.kumar@linux.ibm.comLink: http://lkml.kernel.org/r/20200325031914.107660-1-aneesh.kumar@linux.ibm.com Fixes: d41e2f3bd546 ("mm/hotplug: fix hot remove failure in SPARSEMEM|!VMEMMAP case") Reported-by: Sachin Sant Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andrew Morton Tested-by: Sachin Sant Reviewed-by: Baoquan He Reviewed-by: Wei Yang Acked-by: Michal Hocko Acked-by: Pankaj Gupta Cc: Michael Ellerman Cc: Dan Williams Cc: David Hildenbrand Cc: Oscar Salvador Cc: Mike Rapoport Cc: Signed-off-by: Linus Torvalds commit 8380ce479010f2f779587b462a9b4681934297c3 Author: Roman Gushchin Date: Sat Mar 28 19:17:25 2020 -0700 mm: fork: fix kernel_stack memcg stats for various stack implementations Depending on CONFIG_VMAP_STACK and the THREAD_SIZE / PAGE_SIZE ratio the space for task stacks can be allocated using __vmalloc_node_range(), alloc_pages_node() and kmem_cache_alloc_node(). In the first and the second cases page->mem_cgroup pointer is set, but in the third it's not: memcg membership of a slab page should be determined using the memcg_from_slab_page() function, which looks at page->slab_cache->memcg_params.memcg . In this case, using mod_memcg_page_state() (as in account_kernel_stack()) is incorrect: page->mem_cgroup pointer is NULL even for pages charged to a non-root memory cgroup. It can lead to kernel_stack per-memcg counters permanently showing 0 on some architectures (depending on the configuration). In order to fix it, let's introduce a mod_memcg_obj_state() helper, which takes a pointer to a kernel object as a first argument, uses mem_cgroup_from_obj() to get a RCU-protected memcg pointer and calls mod_memcg_state(). It allows to handle all possible configurations (CONFIG_VMAP_STACK and various THREAD_SIZE/PAGE_SIZE values) without spilling any memcg/kmem specifics into fork.c . Note: This is a special version of the patch created for stable backports. It contains code from the following two patches: - mm: memcg/slab: introduce mem_cgroup_from_obj() - mm: fork: fix kernel_stack memcg stats for various stack implementations [guro@fb.com: introduce mem_cgroup_from_obj()] Link: http://lkml.kernel.org/r/20200324004221.GA36662@carbon.dhcp.thefacebook.com Fixes: 4d96ba353075 ("mm: memcg/slab: stop setting page->mem_cgroup pointer for slab pages") Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Bharata B Rao Cc: Shakeel Butt Cc: Link: http://lkml.kernel.org/r/20200303233550.251375-1-guro@fb.com Signed-off-by: Linus Torvalds commit 726b7bbeafd4e0219c37b74673d368b21ff3d039 Author: Mina Almasry Date: Sat Mar 28 19:17:22 2020 -0700 hugetlb_cgroup: fix illegal access to memory This appears to be a mistake in commit faced7e0806cf ("mm: hugetlb controller for cgroups v2"). Essentially that commit does a hugetlb_cgroup_from_counter assuming that page_counter_try_charge has initialized counter. But if that has failed then it seems will not initialize counter, so hugetlb_cgroup_from_counter(counter) ends up pointing to random memory, causing kasan to complain. The solution is to simply use 'h_cg', instead of hugetlb_cgroup_from_counter(counter), since that is a reference to the hugetlb_cgroup anyway. After this change kasan ceases to complain. Fixes: faced7e0806cf ("mm: hugetlb controller for cgroups v2") Reported-by: syzbot+cac0c4e204952cf449b1@syzkaller.appspotmail.com Signed-off-by: Mina Almasry Signed-off-by: Andrew Morton Acked-by: Giuseppe Scrivano Acked-by: Tejun Heo Cc: Mike Kravetz Cc: David Rientjes Link: http://lkml.kernel.org/r/20200313223920.124230-1-almasrymina@google.com Signed-off-by: Linus Torvalds commit 53cdc1cb29e87ce5a61de5bb393eb08925d14ede Author: David Hildenbrand Date: Sat Mar 28 19:17:19 2020 -0700 drivers/base/memory.c: indicate all memory blocks as removable We see multiple issues with the implementation/interface to compute whether a memory block can be offlined (exposed via /sys/devices/system/memory/memoryX/removable) and would like to simplify it (remove the implementation). 1. It runs basically lockless. While this might be good for performance, we see possible races with memory offlining that will require at least some sort of locking to fix. 2. Nowadays, more false positives are possible. No arch-specific checks are performed that validate if memory offlining will not be denied right away (and such check will require locking). For example, arm64 won't allow to offline any memory block that was added during boot - which will imply a very high error rate. Other archs have other constraints. 3. The interface is inherently racy. E.g., if a memory block is detected to be removable (and was not a false positive at that time), there is still no guarantee that offlining will actually succeed. So any caller already has to deal with false positives. 4. It is unclear which performance benefit this interface actually provides. The introducing commit 5c755e9fd813 ("memory-hotplug: add sysfs removable attribute for hotplug memory remove") mentioned "A user-level agent must be able to identify which sections of memory are likely to be removable before attempting the potentially expensive operation." However, no actual performance comparison was included. Known users: - lsmem: Will group memory blocks based on the "removable" property. [1] - chmem: Indirect user. It has a RANGE mode where one can specify removable ranges identified via lsmem to be offlined. However, it also has a "SIZE" mode, which allows a sysadmin to skip the manual "identify removable blocks" step. [2] - powerpc-utils: Uses the "removable" attribute to skip some memory blocks right away when trying to find some to offline+remove. However, with ballooning enabled, it already skips this information completely (because it once resulted in many false negatives). Therefore, the implementation can deal with false positives properly already. [3] According to Nathan Fontenot, DLPAR on powerpc is nowadays no longer driven from userspace via the drmgr command (powerpc-utils). Nowadays it's managed in the kernel - including onlining/offlining of memory blocks - triggered by drmgr writing to /sys/kernel/dlpar. So the affected legacy userspace handling is only active on old kernels. Only very old versions of drmgr on a new kernel (unlikely) might execute slower - totally acceptable. With CONFIG_MEMORY_HOTREMOVE, always indicating "removable" should not break any user space tool. We implement a very bad heuristic now. Without CONFIG_MEMORY_HOTREMOVE we cannot offline anything, so report "not removable" as before. Original discussion can be found in [4] ("[PATCH RFC v1] mm: is_mem_section_removable() overhaul"). Other users of is_mem_section_removable() will be removed next, so that we can remove is_mem_section_removable() completely. [1] http://man7.org/linux/man-pages/man1/lsmem.1.html [2] http://man7.org/linux/man-pages/man8/chmem.8.html [3] https://github.com/ibm-power-utilities/powerpc-utils [4] https://lkml.kernel.org/r/20200117105759.27905-1-david@redhat.com Also, this patch probably fixes a crash reported by Steve. http://lkml.kernel.org/r/CAPcyv4jpdaNvJ67SkjyUJLBnBnXXQv686BiVW042g03FUmWLXw@mail.gmail.com Reported-by: "Scargall, Steve" Suggested-by: Michal Hocko Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Nathan Fontenot Acked-by: Michal Hocko Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Badari Pulavarty Cc: Robert Jennings Cc: Heiko Carstens Cc: Karel Zak Cc: Link: http://lkml.kernel.org/r/20200128093542.6908-1-david@redhat.com Signed-off-by: Linus Torvalds commit d795a90e2ba024dbf2f22107ae89c210b98b08b8 Author: Naohiro Aota Date: Sat Mar 28 19:17:15 2020 -0700 mm/swapfile.c: move inode_lock out of claim_swapfile claim_swapfile() currently keeps the inode locked when it is successful, or the file is already swapfile (with -EBUSY). And, on the other error cases, it does not lock the inode. This inconsistency of the lock state and return value is quite confusing and actually causing a bad unlock balance as below in the "bad_swap" section of __do_sys_swapon(). This commit fixes this issue by moving the inode_lock() and IS_SWAPFILE check out of claim_swapfile(). The inode is unlocked in "bad_swap_unlock_inode" section, so that the inode is ensured to be unlocked at "bad_swap". Thus, error handling codes after the locking now jumps to "bad_swap_unlock_inode" instead of "bad_swap". ===================================== WARNING: bad unlock balance detected! 5.5.0-rc7+ #176 Not tainted ------------------------------------- swapon/4294 is trying to release lock (&sb->s_type->i_mutex_key) at: __do_sys_swapon+0x94b/0x3550 but there are no more locks to release! other info that might help us debug this: no locks held by swapon/4294. stack backtrace: CPU: 5 PID: 4294 Comm: swapon Not tainted 5.5.0-rc7-BTRFS-ZNS+ #176 Hardware name: ASUS All Series/H87-PRO, BIOS 2102 07/29/2014 Call Trace: dump_stack+0xa1/0xea print_unlock_imbalance_bug.cold+0x114/0x123 lock_release+0x562/0xed0 up_write+0x2d/0x490 __do_sys_swapon+0x94b/0x3550 __x64_sys_swapon+0x54/0x80 do_syscall_64+0xa4/0x4b0 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f15da0a0dc7 Fixes: 1638045c3677 ("mm: set S_SWAPFILE on blockdev swap devices") Signed-off-by: Naohiro Aota Signed-off-by: Andrew Morton Tested-by: Qais Youef Reviewed-by: Andrew Morton Reviewed-by: Darrick J. Wong Cc: Christoph Hellwig Cc: Link: http://lkml.kernel.org/r/20200206090132.154869-1-naohiro.aota@wdc.com Signed-off-by: Linus Torvalds commit e595dd94515ed6bc5ba38fce0f9598db8c0ee9a9 Merge: 906c40438bb6 a0ba26f37ea0 Author: Linus Torvalds Date: Sat Mar 28 18:55:15 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Fix memory leak in vti6, from Torsten Hilbrich. 2) Fix double free in xfrm_policy_timer, from YueHaibing. 3) NL80211_ATTR_CHANNEL_WIDTH attribute is put with wrong type, from Johannes Berg. 4) Wrong allocation failure check in qlcnic driver, from Xu Wang. 5) Get ks8851-ml IO operations right, for real this time, from Marek Vasut. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (22 commits) r8169: fix PHY driver check on platforms w/o module softdeps net: ks8851-ml: Fix IO operations, again mlxsw: spectrum_mr: Fix list iteration in error path qlcnic: Fix bad kzalloc null test mac80211: set IEEE80211_TX_CTRL_PORT_CTRL_PROTO for nl80211 TX mac80211: mark station unauthorized before key removal mac80211: Check port authorization in the ieee80211_tx_dequeue() case cfg80211: Do not warn on same channel at the end of CSA mac80211: drop data frames without key on encrypted links ieee80211: fix HE SPR size calculation nl80211: fix NL80211_ATTR_CHANNEL_WIDTH attribute type xfrm: policy: Fix doulbe free in xfrm_policy_timer bpf: Explicitly memset some bpf info structures declared on the stack bpf: Explicitly memset the bpf_attr structure bpf: Sanitize the bpf_struct_ops tcp-cc name vti6: Fix memory leak of skb if input policy check fails esp: remove the skb from the chain when it's enqueued in cryptd_wq ipv6: xfrm6_tunnel.c: Use built-in RCU list checking xfrm: add the missing verify_sec_ctx_len check in xfrm_add_acquire xfrm: fix uctx len check in verify_sec_ctx_len ... commit 906c40438bb669b253d0daeaf5f37a9f78a81b41 Merge: 83fd69c93340 14c1fe699cad Author: Linus Torvalds Date: Sat Mar 28 13:11:26 2020 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Three more driver bugfixes, and two doc improvements fixing build warnings while we are here" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: pca-platform: Use platform_irq_get_optional i2c: st: fix missing struct parameter description i2c: nvidia-gpu: Handle timeout correctly in gpu_i2c_check_status() i2c: fix a doc warning i2c: hix5hd2: add missed clk_disable_unprepare in remove commit 83fd69c93340177dcd66fd26ce6441fb581c1dbf Merge: 69c5eea3128e ea697a8bf5a4 Author: Linus Torvalds Date: Sat Mar 28 09:14:16 2020 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two small fixes: one in drivers (qla2xxx), and one in the core (sd) to try to cope with USB enclosures that silently change reported parameters" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sd: Fix optimal I/O size for devices that change reported values scsi: qla2xxx: Fix I/Os being passed down when FC device is being deleted commit 14c1fe699cad9cb0acda4559c584f136d18fea50 Author: Chris Packham Date: Fri Mar 27 11:44:22 2020 +1300 i2c: pca-platform: Use platform_irq_get_optional The interrupt is not required so use platform_irq_get_optional() to avoid error messages like i2c-pca-platform 22080000.i2c: IRQ index 0 not found Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang commit f491c6687332920e296d0209e366fe2ca7eab1c6 Author: Alain Volmat Date: Thu Mar 26 22:22:43 2020 +0100 i2c: st: fix missing struct parameter description Fix a missing struct parameter description to allow warning free W=1 compilation. Signed-off-by: Alain Volmat Reviewed-by: Patrice Chotard Signed-off-by: Wolfram Sang commit a0ba26f37ea04e025a793ef5e5ac809221728ecb Merge: 2e8c339b4946 5c6f25887963 Author: David S. Miller Date: Fri Mar 27 16:18:51 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2020-03-27 The following pull-request contains BPF updates for your *net* tree. We've added 3 non-merge commits during the last 4 day(s) which contain a total of 4 files changed, 25 insertions(+), 20 deletions(-). The main changes are: 1) Explicitly memset the bpf_attr structure on bpf() syscall to avoid having to rely on compiler to do so. Issues have been noticed on some compilers with padding and other oddities where the request was then unexpectedly rejected, from Greg Kroah-Hartman. 2) Sanitize the bpf_struct_ops TCP congestion control name in order to avoid problematic characters such as whitespaces, from Martin KaFai Lau. ==================== Signed-off-by: David S. Miller commit 2e8c339b4946490a922a21aa8cd869c6cfad2023 Author: Heiner Kallweit Date: Fri Mar 27 17:33:32 2020 +0100 r8169: fix PHY driver check on platforms w/o module softdeps On Android/x86 the module loading infrastructure can't deal with softdeps. Therefore the check for presence of the Realtek PHY driver module fails. mdiobus_register() will try to load the PHY driver module, therefore move the check to after this call and explicitly check that a dedicated PHY driver is bound to the PHY device. Fixes: f32593773549 ("r8169: check that Realtek PHY driver module is loaded") Reported-by: Chih-Wei Huang Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit e00dd941ff9fa6ed920da5ead95d2598170fe4ea Merge: 8262e6f9b103 4c59406ed003 Author: David S. Miller Date: Fri Mar 27 14:56:55 2020 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2020-03-27 1) Handle NETDEV_UNREGISTER for xfrm device to handle asynchronous unregister events cleanly. From Raed Salem. 2) Fix vti6 tunnel inter address family TX through bpf_redirect(). From Nicolas Dichtel. 3) Fix lenght check in verify_sec_ctx_len() to avoid a slab-out-of-bounds. From Xin Long. 4) Add a missing verify_sec_ctx_len check in xfrm_add_acquire to avoid a possible out-of-bounds to access. From Xin Long. 5) Use built-in RCU list checking of hlist_for_each_entry_rcu to silence false lockdep warning in __xfrm6_tunnel_spi_lookup when CONFIG_PROVE_RCU_LIST is enabled. From Madhuparna Bhowmik. 6) Fix a panic on esp offload when crypto is done asynchronously. From Xin Long. 7) Fix a skb memory leak in an error path of vti6_rcv. From Torsten Hilbrich. 8) Fix a race that can lead to a doulbe free in xfrm_policy_timer. From Xin Long. ==================== Signed-off-by: David S. Miller commit 69c5eea3128e775fd3c70ecf0098105d96dee330 Merge: 32db9f10d52c ededa081ed20 Author: Linus Torvalds Date: Fri Mar 27 14:34:03 2020 -0700 Merge branch 'parisc-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parsic fix from Helge Deller: "Fix a recursive loop when running 'make ARCH=parisc defconfig'" * 'parisc-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix defconfig selection commit 32db9f10d52c97ffc407c7dad81c6fafcad730b2 Merge: 823846c31071 c8042d1e5cb3 Author: Linus Torvalds Date: Fri Mar 27 13:52:32 2020 -0700 Merge tag 'arm-soc-fixes-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM DT and driver fixes from Arnd Bergmann: "For the devicetree files, there are a total of 20 patches, almost entirely for 32-bit machines: - The Allwinner/sun9i r40 SoC dtsi file contains a number of issues, both for correctness and for style that are addressed in separate patches. This causes most of the changed lines of the DT updates this time. - More Allwinner updates fixing the identification of the security system on sun8i/A33, a recent regression of the A83t ethernet, and a few board specific issues on the TBS-A711 macine. - Several bug fixes for OMAP dts files, most notably fixing the timings for the NAND flash on the Nokia N900 that regressed a while ago after the move to configuring them from DT. Some other OMAPs now set the correct dma limits on the L3 bus, and a regression fix addresses lost Ethernet on dm814x - One incorrect setting in the newly added Raspberry Pi Zero W that may cause issues with the SD card controller. - A missing property on the bcm2835 firmware node caused incorrect DMA settings. - An old bug on the oxnas platform causing spurious interrupts is finally addressed. - A regression on the Exynos Midas board broke the OLED panel power supply. - The i.MX6 phycore SoM specified the wrong voltage for the SoC, this is now set to the values from the datasheet. - Some 64-bit machines use a deprecated string to identify the PSCI firmware. There are also several small code fixes addressing mostly serious issues: - Fix the sunxi rsb bus access to no longer return incorrect data when mixing 8 and 16 bit I/O. - Fix a suspend/resume regression on the OMAP2+ lcdc from a missing quirk in the ti-sysc driver - Fix a NULL pointer access from a race in the fsl dpio driver - Fix a v5.5 regression in the exynos-chipid driver that caused an invalid error code probing the device on non-exynos platforms - Fix an out-of-bounds access in the AMD TEE driver" * tag 'arm-soc-fixes-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (24 commits) soc: samsung: chipid: Fix return value on non-Exynos platforms arm64: dts: Fix leftover entry-methods for PSCI ARM: dts: exynos: Fix regulator node aliasing on Midas-based boards ARM: dts: oxnas: Fix clear-mask property ARM: dts: bcm283x: Fix vc4's firmware bus DMA limitations ARM: dts: omap5: Add bus_dma_limit for L3 bus ARM: dts: omap4-droid4: Fix lost touchscreen interrupts ARM: dts: dra7: Add bus_dma_limit for L3 bus ARM: bcm2835-rpi-zero-w: Add missing pinctrl name ARM: dts: sun8i: a33: add the new SS compatible dt-bindings: crypto: add new compatible for A33 SS ARM: dts: sun8i: r40: Move SPI device nodes based on address order ARM: dts: sun8i: r40: Fix register base address for SPI2 and SPI3 ARM: dts: sun8i: r40: Move AHCI device node based on address order ARM: dts: imx6: phycore-som: fix arm and soc minimum voltage soc: fsl: dpio: register dpio irq handlers after dpio create tee: amdtee: out of bounds read in find_session() ARM: dts: N900: fix onenand timings bus: ti-sysc: Fix quirk flags for lcdc on am335x ARM: dts: Fix dm814x Ethernet by changing to use rgmii-id mode ... commit 823846c3107197b6eae9fb656a23e986926d6c07 Merge: bb36d37e29d4 2191b4f298fa Author: Linus Torvalds Date: Fri Mar 27 11:06:10 2020 -0700 Merge tag 'riscv-for-linus-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: "Sorry for the last minute patches, but a few things fell through the cracks recently. I was on the fence about sending a late pull request just for the M-mode fixes, as we don't really have any users, but the last patch fixes the build for Fedora which I consider pretty important. Given that the M-mode fixes should be very low risk, I figured it's worth sending them along as well. Thhis passes my standard 'boot in QEMU' test" * tag 'riscv-for-linus-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: Move all address space definition macros to one place RISC-V: Only select essential drivers for SOC_VIRT config riscv: fix the IPI missing issue in nommu mode riscv: uaccess should be used in nommu mode commit bb36d37e29d4e355fdffb4cd932cbb60e25e7e02 Merge: 1fa8cb0b7b11 e33a814e772c Author: Linus Torvalds Date: Fri Mar 27 11:02:52 2020 -0700 Merge tag 'devicetree-fixes-for-5.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull Devicetree fix from Rob Herring: "A single fix for building dtc with GCC 10" * tag 'devicetree-fixes-for-5.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: scripts/dtc: Remove redundant YYLOC global declaration commit 1fa8cb0b7b11f3bbfe799d73f351e44a441903ca Merge: 527630fbf4f1 6f5459da2b87 Author: Linus Torvalds Date: Fri Mar 27 10:50:31 2020 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Will Deacon: "Fix defconfig build when using Clang's integrated assembler" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: alternative: fix build with clang integrated assembler commit 527630fbf4f194c5d71e75b2d3cb3d2f406bc5d0 Merge: 7bf8df68cba0 8400ab889632 Author: Linus Torvalds Date: Fri Mar 27 09:33:48 2020 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A handful of clk driver fixes. Mostly they're around the i.MX drivers fixing the parents of a few clks and making KASAN happy with how the message passing code works. Besides that we have a TI driver fix for the RTC parent and a fix for the basic gate type registration functions introduced this release where they didn't actually pass the arguments in the right places to the multiplexer function down below" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: imx: Align imx sc clock parent msg structs to 4 clk: imx: Align imx sc clock msg structs to 4 clk: Pass correct arguments to __clk_hw_register_gate() clk: ti: am43xx: Fix clock parent for RTC clock clk: imx8mp: Correct the enet_qos parent clock clk: imx8mp: Correct IMX8MP_CLK_HDMI_AXI clock parent commit 7bf8df68cba0536479aead32297e47908922582c Merge: f3e69428b5e2 c4b979ebcafe Author: Linus Torvalds Date: Fri Mar 27 09:21:52 2020 -0700 Merge tag 'drm-fixes-2020-03-27' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Pretty quiet: some minor sg mapping fixes for 3 drivers, and a single oops fix for the scheduler. I'm hoping nobody tries to send me a fixes pull today but I'll keep an eye out of the weekend. radeon/amdgpu/dma-buf: - sg list fixes scheduler: - oops fix" * tag 'drm-fixes-2020-03-27' of git://anongit.freedesktop.org/drm/drm: drm/scheduler: fix rare NULL ptr race drm/radeon: fix scatter-gather mapping with user pages drm/amdgpu: fix scatter-gather mapping with user pages drm/prime: use dma length macro when mapping sg commit ededa081ed203165cea441fca706bdf358026bab Author: Helge Deller Date: Thu Mar 26 23:31:43 2020 +0100 parisc: Fix defconfig selection Fix the recursive loop when running "make ARCH=parisc defconfig". Fixes: 84669923e1ed ("parisc: Regenerate parisc defconfigs") Noticed-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Helge Deller commit e33a814e772cdc36436c8c188d8c42d019fda639 Author: Dirk Mueller Date: Tue Jan 14 18:53:41 2020 +0100 scripts/dtc: Remove redundant YYLOC global declaration gcc 10 will default to -fno-common, which causes this error at link time: (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here This is because both dtc-lexer as well as dtc-parser define the same global symbol yyloc. Before with -fcommon those were merged into one defintion. The proper solution would be to to mark this as "extern", however that leads to: dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls] 26 | extern YYLTYPE yylloc; | ^~~~~~ In file included from dtc-lexer.l:24: dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here 127 | extern YYLTYPE yylloc; | ^~~~~~ cc1: all warnings being treated as errors which means the declaration is completely redundant and can just be dropped. Signed-off-by: Dirk Mueller Signed-off-by: David Gibson [robh: cherry-pick from upstream] Cc: stable@vger.kernel.org Signed-off-by: Rob Herring commit 749da8ca978f19710aba496208c480ad42d37f79 Author: Yubo Xie Date: Thu Mar 26 19:11:59 2020 -0700 clocksource/drivers/hyper-v: Make sched clock return nanoseconds correctly The sched clock read functions return the HV clock (100ns granularity) without converting it to nanoseconds. Add the missing conversion. Fixes: bd00cd52d5be ("clocksource/drivers/hyperv: Add Hyper-V specific sched clock function") Signed-off-by: Yubo Xie Signed-off-by: Tianyu Lan Signed-off-by: Thomas Gleixner Reviewed-by: Vitaly Kuznetsov Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20200327021159.31429-1-Tianyu.Lan@microsoft.com commit f3e69428b5e26b0851d7ef4c15859cffebf2b9de Merge: 9efcc4a12936 4134252ab7e2 Author: Linus Torvalds Date: Thu Mar 26 20:49:44 2020 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - a fix to generate proper timestamps on key autorepeat events that were broken recently - a fix for Synaptics driver to only activate reduced reporting mode when explicitly requested - a new keycode for "selective screenshot" function - other assorted fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: fix stale timestamp on key autorepeat events Input: move the new KEY_SELECTIVE_SCREENSHOT keycode Input: avoid BIT() macro usage in the serio.h UAPI header Input: synaptics-rmi4 - set reduced reporting mode only when requested Input: synaptics - enable RMI on HP Envy 13-ad105ng Input: allocate keycode for "Selective Screenshot" key Input: tm2-touchkey - add support for Coreriver TC360 variant dt-bindings: input: add Coreriver TC360 binding dt-bindings: vendor-prefixes: Add Coreriver vendor prefix Input: raydium_i2c_ts - fix error codes in raydium_i2c_boot_trigger() commit 8262e6f9b1034ede34548a04dec4c302d92c9497 Author: Marek Vasut Date: Wed Mar 25 15:25:47 2020 +0100 net: ks8851-ml: Fix IO operations, again This patch reverts 58292104832f ("net: ks8851-ml: Fix 16-bit IO operation") and edacb098ea9c ("net: ks8851-ml: Fix 16-bit data access"), because it turns out these were only necessary due to buggy hardware. This patch adds a check for such a buggy hardware to prevent any such mistakes again. While working further on the KS8851 driver, it came to light that the KS8851-16MLL is capable of switching bus endianness by a hardware strap, EESK pin. If this strap is incorrect, the IO accesses require such endian swapping as is being reverted by this patch. Such swapping also impacts the performance significantly. Hence, in addition to removing it, detect that the hardware is broken, report to user, and fail to bind with such hardware. Fixes: 58292104832f ("net: ks8851-ml: Fix 16-bit IO operation") Fixes: edacb098ea9c ("net: ks8851-ml: Fix 16-bit data access") Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Lukas Wunner Cc: Petr Stetiar Cc: YueHaibing Signed-off-by: David S. Miller commit c4b979ebcafe978338cad1df4c77cdc8f84bd51c Merge: 5117c363eb21 3c0fdf3302cb Author: Dave Airlie Date: Fri Mar 27 13:03:17 2020 +1000 Merge tag 'amd-drm-fixes-5.6-2020-03-26' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.6-2020-03-26: Scheduler: - Fix a race condition that could result in a segfault Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200326144538.3937-1-alexander.deucher@amd.com commit 5117c363eb213d5503f5b7e39c9bfafd46388184 Merge: 16fbf79b0f83 47f7826c520e Author: Dave Airlie Date: Fri Mar 27 12:33:13 2020 +1000 Merge tag 'drm-misc-fixes-2020-03-26' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v5.6: - SG fixes for prime, radeon and amdgpu. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/ef10e822-76dd-125d-ec1f-9a78c5f76bc3@linux.intel.com commit 2191b4f298fa360f2d1d967c2c7db565bea2c32e Author: Atish Patra Date: Thu Mar 26 15:55:46 2020 -0700 RISC-V: Move all address space definition macros to one place We get the following compilation error if CONFIG_SPARSEMEM_VMEMMAP is set. --------------------------------------------------------------- ./arch/riscv/include/asm/pgtable-64.h: In function ‘pud_page’: ./include/asm-generic/memory_model.h:54:29: error: ‘vmemmap’ undeclared (first use in this function); did you mean ‘mem_map’? #define __pfn_to_page(pfn) (vmemmap + (pfn)) ^~~~~~~ ./include/asm-generic/memory_model.h:82:21: note: in expansion of macro ‘__pfn_to_page’ #define pfn_to_page __pfn_to_page ^~~~~~~~~~~~~ ./arch/riscv/include/asm/pgtable-64.h:70:9: note: in expansion of macro ‘pfn_to_page’ return pfn_to_page(pud_val(pud) >> _PAGE_PFN_SHIFT); --------------------------------------------------------------- Fix the compliation errors by moving all the address space definition macros before including pgtable-64.h. Fixes: 8ad8b72721d0 (riscv: Add KASAN support) Signed-off-by: Atish Patra Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit 4134252ab7e2c339a54302b88496cb5a89cdbaec Author: Dmitry Torokhov Date: Wed Mar 25 10:57:54 2020 -0700 Input: fix stale timestamp on key autorepeat events We need to refresh timestamp when emitting key autorepeat events, otherwise they will carry timestamp of the original key press event. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206929 Fixes: 3b51c44bd693 ("Input: allow drivers specify timestamp for input events") Cc: stable@vger.kernel.org Reported-by: teika kazura Tested-by: teika kazura Signed-off-by: Dmitry Torokhov commit 9efcc4a129363187c9bf15338692f107c5c9b6f0 Author: David Howells Date: Thu Mar 26 15:24:07 2020 +0000 afs: Fix unpinned address list during probing When it's probing all of a fileserver's interfaces to find which one is best to use, afs_do_probe_fileserver() takes a lock on the server record and notes the pointer to the address list. It doesn't, however, pin the address list, so as soon as it drops the lock, there's nothing to stop the address list from being freed under us. Fix this by taking a ref on the address list inside the locked section and dropping it at the end of the function. Fixes: 3bf0fb6f33dd ("afs: Probe multiple fileservers simultaneously") Signed-off-by: David Howells Reviewed-by: Marc Dionne Signed-off-by: Linus Torvalds commit 60268940cd15491be6db4503d6f74f27fb38ae42 Merge: a53071bd3401 c8d6ee01449c Author: Linus Torvalds Date: Thu Mar 26 15:44:41 2020 -0700 Merge tag 'ceph-for-5.6-rc8' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "A patch for a rather old regression in fullness handling and two memory leak fixes, marked for stable" * tag 'ceph-for-5.6-rc8' of git://github.com/ceph/ceph-client: ceph: fix memory leak in ceph_cleanup_snapid_map() libceph: fix alloc_msg_with_page_vector() memory leaks ceph: check POOL_FLAG_FULL/NEARFULL in addition to OSDMAP_FULL/NEARFULL commit a53071bd340171d258ddaf3f3c951708044ff455 Merge: 23cb8490c0d3 e1be9ac8e601 Author: Linus Torvalds Date: Thu Mar 26 15:30:49 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "x86 bug fixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: X86: Narrow down the IPI fastpath to single target IPI KVM: LAPIC: Also cancel preemption timer when disarm LAPIC timer KVM: VMX: don't allow memory operands for inline asm that modifies SP KVM: LAPIC: Mark hrtimer for period or oneshot mode to expire in hard interrupt context KVM: SVM: Issue WBINVD after deactivating an SEV guest KVM: SVM: document KVM_MEM_ENCRYPT_OP, let userspace detect if SEV is available KVM: x86: remove bogus user-triggerable WARN_ON commit 23cb8490c0d34b74b7548b60541758efe9754948 Author: Linus Torvalds Date: Thu Mar 26 15:12:19 2020 -0700 MAINTAINERS: fix bad file pattern Testing 'parse-maintainers' due to the previous commit shows a bad file pattern for the "TI VPE/CAL DRIVERS" entry in the MAINTAINERS file. There's also a lot of mis-ordered entries, but I'm still a bit nervous about the inevitable and annoying merge problems it would probably cause to fix them up. The MAINTAINERS file is one of my least favorite files due to being huge and centralized, but fixing it is also horribly painful for that reason. Signed-off-by: Linus Torvalds commit 5cdbec108fd21a605e0c6e96e7faddd01e78047d Author: Joe Perches Date: Sat Mar 7 18:59:05 2020 -0800 parse-maintainers: Do not sort section content by default Add an --order switch to control section reordering. Default for --order is off. Change the default ordering to a slightly more sensible: M: Person acting as a maintainer R: Person acting as a patch reviewer L: Mailing list where patches should be sent S: Maintenance status W: URI for general information Q: URI for patchwork tracking B: URI for bug tracking/submission C: URI for chat P: URI or file for subsystem specific coding styles T: SCM tree type and location F: File and directory pattern X: File and directory exclusion pattern N: File glob K: Keyword - patch content regex Signed-off-by: Joe Perches Signed-off-by: Linus Torvalds commit fbf66796a0aedbaea248c7ade1459ccd0dd4cb44 Author: Dmitry Torokhov Date: Thu Mar 26 12:54:02 2020 -0700 Input: move the new KEY_SELECTIVE_SCREENSHOT keycode We should try to keep keycodes sequential unless there is a reason to leave a gap in numbering, so let's move it from 0x280 to 0x27a while we still can. Fixes: 3b059da9835c ("Input: allocate keycode for Selective Screenshot key") Acked-by: Rajat Jain Link: https://lore.kernel.org/r/20200326182711.GA259753@dtor-ws Signed-off-by: Dmitry Torokhov commit bd6f20333c6794e8b06f5ee963bfa5943e65cc86 Author: Anup Patel Date: Tue Mar 10 17:29:25 2020 +0530 RISC-V: Only select essential drivers for SOC_VIRT config The kconfig select causes build failues for SOC_VIRT config becaus we are selecting lot of VIRTIO drivers without selecting all required dependencies. Better approach is to only select essential drivers from SOC_VIRT config option and enable required VIRTIO drivers using defconfigs. Fixes: 759bdc168181 ("RISC-V: Add kconfig option for QEMU virt machine") Signed-off-by: Anup Patel Acked-by: Michael S. Tsirkin Signed-off-by: Palmer Dabbelt commit 328f5bb9939dc32152ae025cf5c476b4380b6215 Merge: f6bf1bafdc21 b95d2ccd2ccb Author: David S. Miller Date: Thu Mar 26 12:03:02 2020 -0700 Merge tag 'mac80211-for-net-2020-03-26' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== We have the following fixes: * drop data packets if there's no key for them anymore, after there had been one, to avoid sending them in clear when hostapd removes the key before it removes the station and the packets are still queued * check port authorization again after dequeue, to avoid sending packets if the station is no longer authorized * actually remove the authorization flag before the key so packets are also dropped properly because of this * fix nl80211 control port packet tagging to handle them as packets allowed to go out without encryption * fix NL80211_ATTR_CHANNEL_WIDTH outgoing netlink attribute width (should be 32 bits, not 8) * don't WARN in a CSA scenario that happens on some APs * fix HE spatial reuse element size calculation ==================== Signed-off-by: David S. Miller commit f6bf1bafdc2152bb22aff3a4e947f2441a1d49e2 Author: Ido Schimmel Date: Thu Mar 26 16:17:33 2020 +0200 mlxsw: spectrum_mr: Fix list iteration in error path list_for_each_entry_from_reverse() iterates backwards over the list from the current position, but in the error path we should start from the previous position. Fix this by using list_for_each_entry_continue_reverse() instead. This suppresses the following error from coccinelle: drivers/net/ethernet/mellanox/mlxsw//spectrum_mr.c:655:34-38: ERROR: invalid reference to the index variable of the iterator on line 636 Fixes: c011ec1bbfd6 ("mlxsw: spectrum: Add the multicast routing offloading logic") Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit bcaeb886ade124331a6f3a5cef34a3f1484c0a03 Author: Xu Wang Date: Thu Mar 26 18:14:29 2020 +0800 qlcnic: Fix bad kzalloc null test In qlcnic_83xx_get_reset_instruction_template, the variable of null test is bad, so correct it. Signed-off-by: Xu Wang Signed-off-by: David S. Miller commit 9420e8ade4353a6710908ffafa23ecaf1caa0123 Merge: 1b649e0bcae7 ba80013fba65 Author: Linus Torvalds Date: Thu Mar 26 10:39:36 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "A small set of late-rc patches, mostly fixes for various crashers, some syzkaller fixes and a mlx5 HW limitation: - Several MAINTAINERS updates - Memory leak regression in ODP - Several fixes for syzkaller related crashes. Google recently taught syzkaller to create the software RDMA devices - Crash fixes for HFI1 - Several fixes for mlx5 crashes - Prevent unprivileged access to an unsafe mlx5 HW resource" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/mlx5: Block delay drop to unprivileged users RDMA/mlx5: Fix access to wrong pointer while performing flush due to error RDMA/core: Ensure security pkey modify is not lost MAINTAINERS: Clean RXE section and add Zhu as RXE maintainer IB/hfi1: Ensure pq is not left on waitlist IB/rdmavt: Free kernel completion queue when done RDMA/mad: Do not crash if the rdma device does not have a umad interface RDMA/core: Fix missing error check on dev_set_name() RDMA/nl: Do not permit empty devices names during RDMA_NLDEV_CMD_NEWLINK/SET RDMA/mlx5: Fix the number of hwcounters of a dynamic counter MAINTAINERS: Update maintainers for HISILICON ROCE DRIVER RDMA/odp: Fix leaking the tgid for implicit ODP commit b95d2ccd2ccb834394d50347d0e40dc38a954e4a Author: Johannes Berg Date: Thu Mar 26 15:53:34 2020 +0100 mac80211: set IEEE80211_TX_CTRL_PORT_CTRL_PROTO for nl80211 TX When a frame is transmitted via the nl80211 TX rather than as a normal frame, IEEE80211_TX_CTRL_PORT_CTRL_PROTO wasn't set and this will lead to wrong decisions (rate control etc.) being made about the frame; fix this. Fixes: 911806491425 ("mac80211: Add support for tx_control_port") Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20200326155333.f183f52b02f0.I4054e2a8c11c2ddcb795a0103c87be3538690243@changeid Signed-off-by: Johannes Berg commit b16798f5b907733966fd1a558fca823b3c67e4a1 Author: Johannes Berg Date: Thu Mar 26 15:51:35 2020 +0100 mac80211: mark station unauthorized before key removal If a station is still marked as authorized, mark it as no longer so before removing its keys. This allows frames transmitted to it to be rejected, providing additional protection against leaking plain text data during the disconnection flow. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200326155133.ccb4fb0bb356.If48f0f0504efdcf16b8921f48c6d3bb2cb763c99@changeid Signed-off-by: Johannes Berg commit ce2e1ca703071723ca2dd94d492a5ab6d15050da Author: Jouni Malinen Date: Thu Mar 26 15:51:34 2020 +0100 mac80211: Check port authorization in the ieee80211_tx_dequeue() case mac80211 used to check port authorization in the Data frame enqueue case when going through start_xmit(). However, that authorization status may change while the frame is waiting in a queue. Add a similar check in the dequeue case to avoid sending previously accepted frames after authorization change. This provides additional protection against potential leaking of frames after a station has been disconnected and the keys for it are being removed. Cc: stable@vger.kernel.org Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20200326155133.ced84317ea29.I34d4c47cd8cc8a4042b38a76f16a601fbcbfd9b3@changeid Signed-off-by: Johannes Berg commit 05dcb8bb258575a8dd3499d0d78bd2db633c2b23 Author: Ilan Peer Date: Thu Mar 26 15:09:43 2020 +0200 cfg80211: Do not warn on same channel at the end of CSA When cfg80211_update_assoc_bss_entry() is called, there is a verification that the BSS channel actually changed. As some APs use CSA also for bandwidth changes, this would result with a kernel warning. Fix this by removing the WARN_ON(). Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200326150855.96316ada0e8d.I6710376b1b4257e5f4712fc7ab16e2b638d512aa@changeid Signed-off-by: Johannes Berg commit a0761a301746ec2d92d7fcb82af69c0a6a4339aa Author: Johannes Berg Date: Thu Mar 26 15:09:42 2020 +0200 mac80211: drop data frames without key on encrypted links If we know that we have an encrypted link (based on having had a key configured for TX in the past) then drop all data frames in the key selection handler if there's no key anymore. This fixes an issue with mac80211 internal TXQs - there we can buffer frames for an encrypted link, but then if the key is no longer there when they're dequeued, the frames are sent without encryption. This happens if a station is disconnected while the frames are still on the TXQ. Detecting that a link should be encrypted based on a first key having been configured for TX is fine as there are no use cases for a connection going from with encryption to no encryption. With extended key IDs, however, there is a case of having a key configured for only decryption, so we can't just trigger this behaviour on a key being configured. Cc: stable@vger.kernel.org Reported-by: Jouni Malinen Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200326150855.6865c7f28a14.I9fb1d911b064262d33e33dfba730cdeef83926ca@changeid Signed-off-by: Johannes Berg commit 3c0fdf3302cb4f186c871684eac5c407a107e480 Author: Yintian Tao Date: Mon Mar 23 19:19:37 2020 +0800 drm/scheduler: fix rare NULL ptr race There is one one corner case at dma_fence_signal_locked which will raise the NULL pointer problem just like below. ->dma_fence_signal ->dma_fence_signal_locked ->test_and_set_bit here trigger dma_fence_release happen due to the zero of fence refcount. ->dma_fence_put ->dma_fence_release ->drm_sched_fence_release_scheduled ->call_rcu here make the union fled “cb_list” at finished fence to NULL because struct rcu_head contains two pointer which is same as struct list_head cb_list Therefore, to hold the reference of finished fence at drm_sched_process_job to prevent the null pointer during finished fence dma_fence_signal [ 732.912867] BUG: kernel NULL pointer dereference, address: 0000000000000008 [ 732.914815] #PF: supervisor write access in kernel mode [ 732.915731] #PF: error_code(0x0002) - not-present page [ 732.916621] PGD 0 P4D 0 [ 732.917072] Oops: 0002 [#1] SMP PTI [ 732.917682] CPU: 7 PID: 0 Comm: swapper/7 Tainted: G OE 5.4.0-rc7 #1 [ 732.918980] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.8.2-0-g33fbe13 by qemu-project.org 04/01/2014 [ 732.920906] RIP: 0010:dma_fence_signal_locked+0x3e/0x100 [ 732.938569] Call Trace: [ 732.939003] [ 732.939364] dma_fence_signal+0x29/0x50 [ 732.940036] drm_sched_fence_finished+0x12/0x20 [gpu_sched] [ 732.940996] drm_sched_process_job+0x34/0xa0 [gpu_sched] [ 732.941910] dma_fence_signal_locked+0x85/0x100 [ 732.942692] dma_fence_signal+0x29/0x50 [ 732.943457] amdgpu_fence_process+0x99/0x120 [amdgpu] [ 732.944393] sdma_v4_0_process_trap_irq+0x81/0xa0 [amdgpu] v2: hold the finished fence at drm_sched_process_job instead of amdgpu_fence_process v3: resume the blank line Signed-off-by: Yintian Tao Reviewed-by: Christian König Signed-off-by: Alex Deucher commit e1be9ac8e6014a9b0a216aebae7250f9863e9fc3 Author: Wanpeng Li Date: Thu Mar 26 10:20:01 2020 +0800 KVM: X86: Narrow down the IPI fastpath to single target IPI The original single target IPI fastpath patch forgot to filter the ICR destination shorthand field. Multicast IPI is not suitable for this feature since wakeup the multiple sleeping vCPUs will extend the interrupt disabled time, it especially worse in the over-subscribe and VM has a little bit more vCPUs scenario. Let's narrow it down to single target IPI. Two VMs, each is 76 vCPUs, one running 'ebizzy -M', the other running cyclictest on all vCPUs, w/ this patch, the avg score of cyclictest can improve more than 5%. (pv tlb, pv ipi, pv sched yield are disabled during testing to avoid the disturb). Signed-off-by: Wanpeng Li Message-Id: <1585189202-1708-3-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit 8400ab8896324641243b57fc49b448023c07409a Author: Leonard Crestez Date: Thu Feb 20 18:29:33 2020 +0200 clk: imx: Align imx sc clock parent msg structs to 4 The imx SC api strongly assumes that messages are composed out of 4-bytes words but some of our message structs have odd sizeofs. This produces many oopses with CONFIG_KASAN=y. Fix by marking with __aligned(4). Fixes: 666aed2d13ee ("clk: imx: scu: add set parent support") Signed-off-by: Leonard Crestez Link: https://lkml.kernel.org/r/aad021e432b3062c142973d09b766656eec18fde.1582216144.git.leonard.crestez@nxp.com Signed-off-by: Stephen Boyd commit a0ae04a25650fd51b7106e742d27333e502173c6 Author: Leonard Crestez Date: Thu Feb 20 18:29:32 2020 +0200 clk: imx: Align imx sc clock msg structs to 4 The imx SC api strongly assumes that messages are composed out of 4-bytes words but some of our message structs have odd sizeofs. This produces many oopses with CONFIG_KASAN=y. Fix by marking with __aligned(4). Fixes: fe37b4820417 ("clk: imx: add scu clock common part") Signed-off-by: Leonard Crestez Link: https://lkml.kernel.org/r/10e97a04980d933b2cfecb6b124bf9046b6e4f16.1582216144.git.leonard.crestez@nxp.com Signed-off-by: Stephen Boyd commit 4e934301203648b1705360c1c52d4ce2e2acec5e Author: Stephen Boyd Date: Tue Mar 24 19:22:57 2020 -0700 clk: Pass correct arguments to __clk_hw_register_gate() I copy/pasted these macros and forgot to update the argument names and where they're passed to. Fix it so that these macros make sense. Reported-by: Maxime Ripard Fixes: 194efb6e2667 ("clk: gate: Add support for specifying parents via DT/pointers") Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20200325022257.148244-1-sboyd@kernel.org Tested-by: Maxime Ripard commit 1b649e0bcae71c118c1333e02249a7510ba7f70a Merge: 1dfb642b1015 2910594fd38d Author: Linus Torvalds Date: Wed Mar 25 13:58:05 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Fix deadlock in bpf_send_signal() from Yonghong Song. 2) Fix off by one in kTLS offload of mlx5, from Tariq Toukan. 3) Add missing locking in iwlwifi mvm code, from Avraham Stern. 4) Fix MSG_WAITALL handling in rxrpc, from David Howells. 5) Need to hold RTNL mutex in tcindex_partial_destroy_work(), from Cong Wang. 6) Fix producer race condition in AF_PACKET, from Willem de Bruijn. 7) cls_route removes the wrong filter during change operations, from Cong Wang. 8) Reject unrecognized request flags in ethtool netlink code, from Michal Kubecek. 9) Need to keep MAC in reset until PHY is up in bcmgenet driver, from Doug Berger. 10) Don't leak ct zone template in act_ct during replace, from Paul Blakey. 11) Fix flushing of offloaded netfilter flowtable flows, also from Paul Blakey. 12) Fix throughput drop during tx backpressure in cxgb4, from Rahul Lakkireddy. 13) Don't let a non-NULL skb->dev leave the TCP stack, from Eric Dumazet. 14) TCP_QUEUE_SEQ socket option has to update tp->copied_seq as well, also from Eric Dumazet. 15) Restrict macsec to ethernet devices, from Willem de Bruijn. 16) Fix reference leak in some ethtool *_SET handlers, from Michal Kubecek. 17) Fix accidental disabling of MSI for some r8169 chips, from Heiner Kallweit. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (138 commits) net: Fix CONFIG_NET_CLS_ACT=n and CONFIG_NFT_FWD_NETDEV={y, m} build net: ena: Add PCI shutdown handler to allow safe kexec selftests/net/forwarding: define libs as TEST_PROGS_EXTENDED selftests/net: add missing tests to Makefile r8169: re-enable MSI on RTL8168c net: phy: mdio-bcm-unimac: Fix clock handling cxgb4/ptp: pass the sign of offset delta in FW CMD net: dsa: tag_8021q: replace dsa_8021q_remove_header with __skb_vlan_pop net: cbs: Fix software cbs to consider packet sending time net/mlx5e: Do not recover from a non-fatal syndrome net/mlx5e: Fix ICOSQ recovery flow with Striding RQ net/mlx5e: Fix missing reset of SW metadata in Striding RQ reset net/mlx5e: Enhance ICOSQ WQE info fields net/mlx5_core: Set IB capability mask1 to fix ib_srpt connection failure selftests: netfilter: add nfqueue test case netfilter: nft_fwd_netdev: allow to redirect to ifb via ingress netfilter: nft_fwd_netdev: validate family and chain type netfilter: nft_set_rbtree: Detect partial overlaps on insertion netfilter: nft_set_rbtree: Introduce and use nft_rbtree_interval_start() netfilter: nft_set_pipapo: Separate partial and complete overlap cases on insertion ... commit 1dfb642b10158b45068102402decc3bcf853cb76 Merge: e2cf67f6689a 0c625ccfe6f7 Author: Linus Torvalds Date: Wed Mar 25 13:52:36 2020 -0700 Merge tag 'gpio-v5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: - One core quirk by myself to fix the .irq_disable() semantics when the gpiolib core takes over this callback. - The rest is an elaborate series of four patches fixing Intel laptop ACPI wakeup quirks. * tag 'gpio-v5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpiolib: acpi: Add quirk to ignore EC wakeups on HP x2 10 CHT + AXP288 model gpiolib: acpi: Add quirk to ignore EC wakeups on HP x2 10 BYT + AXP288 model gpiolib: acpi: Rework honor_wakeup option into an ignore_wake option gpiolib: acpi: Correct comment for HP x2 10 honor_wakeup quirk gpiolib: Fix irq_disable() semantics commit 2910594fd38d1cb3c32fbf235e6c6228c780ab87 Merge: 2c64605b590e 0433ae556ec8 Author: David S. Miller Date: Wed Mar 25 13:12:26 2020 -0700 Merge tag 'wireless-drivers-2020-03-25' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.6 Fourth, and last, set of fixes for v5.6. Just two important fixes to iwlwifi regressions. iwlwifi * fix GEO_TX_POWER_LIMIT command on certain devices which caused firmware to crash during initialisation * add back device ids for three devices which were accidentally removed ==================== Signed-off-by: David S. Miller commit 2c64605b590edadb3fb46d1ec6badb49e940b479 Author: Pablo Neira Ayuso Date: Wed Mar 25 13:47:18 2020 +0100 net: Fix CONFIG_NET_CLS_ACT=n and CONFIG_NFT_FWD_NETDEV={y, m} build net/netfilter/nft_fwd_netdev.c: In function ‘nft_fwd_netdev_eval’: net/netfilter/nft_fwd_netdev.c:32:10: error: ‘struct sk_buff’ has no member named ‘tc_redirected’ pkt->skb->tc_redirected = 1; ^~ net/netfilter/nft_fwd_netdev.c:33:10: error: ‘struct sk_buff’ has no member named ‘tc_from_ingress’ pkt->skb->tc_from_ingress = 1; ^~ To avoid a direct dependency with tc actions from netfilter, wrap the redirect bits around CONFIG_NET_REDIRECT and move helpers to include/linux/skbuff.h. Turn on this toggle from the ifb driver, the only existing client of these bits in the tree. This patch adds skb_set_redirected() that sets on the redirected bit on the skbuff, it specifies if the packet was redirect from ingress and resets the timestamp (timestamp reset was originally missing in the netfilter bugfix). Fixes: bcfabee1afd99484 ("netfilter: nft_fwd_netdev: allow to redirect to ifb via ingress") Reported-by: noreply@ellerman.id.au Reported-by: Geert Uytterhoeven Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 428c491332bca498c8eb2127669af51506c346c7 Author: Guilherme G. Piccoli Date: Fri Mar 20 09:55:34 2020 -0300 net: ena: Add PCI shutdown handler to allow safe kexec Currently ENA only provides the PCI remove() handler, used during rmmod for example. This is not called on shutdown/kexec path; we are potentially creating a failure scenario on kexec: (a) Kexec is triggered, no shutdown() / remove() handler is called for ENA; instead pci_device_shutdown() clears the master bit of the PCI device, stopping all DMA transactions; (b) Kexec reboot happens and the device gets enabled again, likely having its FW with that DMA transaction buffered; then it may trigger the (now invalid) memory operation in the new kernel, corrupting kernel memory area. This patch aims to prevent this, by implementing a shutdown() handler quite similar to the remove() one - the difference being the handling of the netdev, which is unregistered on remove(), but following the convention observed in other drivers, it's only detached on shutdown(). This prevents an odd issue in AWS Nitro instances, in which after the 2nd kexec the next one will fail with an initrd corruption, caused by a wild DMA write to invalid kernel memory. The lspci output for the adapter present in my instance is: 00:05.0 Ethernet controller [0200]: Amazon.com, Inc. Elastic Network Adapter (ENA) [1d0f:ec20] Suggested-by: Gavin Shan Signed-off-by: Guilherme G. Piccoli Acked-by: Sameeh Jubran Signed-off-by: David S. Miller commit c085dbfb1cfcf74e2ef2ef435291e7e63f046d6a Author: Hangbin Liu Date: Wed Mar 25 16:41:01 2020 +0800 selftests/net/forwarding: define libs as TEST_PROGS_EXTENDED The lib files should not be defined as TEST_PROGS, or we will run them in run_kselftest.sh. Also remove ethtool_lib.sh exec permission. Fixes: 81573b18f26d ("selftests/net/forwarding: add Makefile to install tests") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 919a23e9d6ccf8b30e6b4c7aa36f8904c99d2dd7 Author: Hangbin Liu Date: Wed Mar 25 16:07:01 2020 +0800 selftests/net: add missing tests to Makefile Find some tests are missed in Makefile by running: for file in $(ls *.sh); do grep -q $file Makefile || echo $file; done Signed-off-by: Hangbin Liu Reviewed-by: David Ahern Signed-off-by: David S. Miller commit e2cf67f6689a218b4d8e606e90a12491a9cfa366 Merge: 76ccd234269b ccf4ad7da0d9 Author: Linus Torvalds Date: Wed Mar 25 10:34:02 2020 -0700 Merge tag 'zonefs-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs Pull zonefs fix from Damien Le Moal: "A single fix from me to correctly handle the size of read-only zone files" * tag 'zonefs-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs: zonfs: Fix handling of read-only zones commit 47f7826c520ecd92ffbffe59ecaa2fe61e42ec70 Author: Shane Francis Date: Wed Mar 25 09:07:41 2020 +0000 drm/radeon: fix scatter-gather mapping with user pages Calls to dma_map_sg may return less segments / entries than requested if they fall on page bounderies. The old implementation did not support this use case. Fixes: be62dbf554c5 ("iommu/amd: Convert AMD iommu driver to the dma-iommu api") Bug: https://bugzilla.kernel.org/show_bug.cgi?id=206461 Bug: https://bugzilla.kernel.org/show_bug.cgi?id=206895 Bug: https://gitlab.freedesktop.org/drm/amd/issues/1056 Signed-off-by: Shane Francis Reviewed-by: Michael J. Ruhl Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200325090741.21957-4-bigbeeshane@gmail.com Cc: stable@vger.kernel.org commit 0199172f933342d8b1011aae2054a695c25726f4 Author: Shane Francis Date: Wed Mar 25 09:07:40 2020 +0000 drm/amdgpu: fix scatter-gather mapping with user pages Calls to dma_map_sg may return less segments / entries than requested if they fall on page bounderies. The old implementation did not support this use case. Fixes: be62dbf554c5 ("iommu/amd: Convert AMD iommu driver to the dma-iommu api") Bug: https://bugzilla.kernel.org/show_bug.cgi?id=206461 Bug: https://bugzilla.kernel.org/show_bug.cgi?id=206895 Bug: https://gitlab.freedesktop.org/drm/amd/issues/1056 Signed-off-by: Shane Francis Reviewed-by: Michael J. Ruhl Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200325090741.21957-3-bigbeeshane@gmail.com Cc: stable@vger.kernel.org commit 42e67b479eab6d26459b80b4867298232b0435e7 Author: Shane Francis Date: Wed Mar 25 09:07:39 2020 +0000 drm/prime: use dma length macro when mapping sg As dma_map_sg can reorganize scatter-gather lists in a way that can cause some later segments to be empty we should always use the sg_dma_len macro to fetch the actual length. This could now be 0 and not need to be mapped to a page or address array Fixes: be62dbf554c5 ("iommu/amd: Convert AMD iommu driver to the dma-iommu api") Bug: https://bugzilla.kernel.org/show_bug.cgi?id=206461 Bug: https://bugzilla.kernel.org/show_bug.cgi?id=206895 Bug: https://gitlab.freedesktop.org/drm/amd/issues/1056 Signed-off-by: Shane Francis Reviewed-by: Michael J. Ruhl Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200325090741.21957-2-bigbeeshane@gmail.com Cc: stable@vger.kernel.org commit c8042d1e5cb3e654b47447229ace3cd092a8fc27 Author: Marek Szyprowski Date: Mon Mar 16 18:56:52 2020 +0100 soc: samsung: chipid: Fix return value on non-Exynos platforms Correct the probe return value to -ENODEV on non-Exynos platforms. Link: https://lore.kernel.org/r/20200316175652.5604-4-krzk@kernel.org Fixes: 02fb29882d5c ("soc: samsung: chipid: Drop "syscon" compatible requirement") Cc: Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit 47039b55f8e2002baa7c00f35a7fd11361a8726c Merge: a88fead83e0d 36fa3e50085e Author: Arnd Bergmann Date: Wed Mar 25 13:52:50 2020 +0100 Merge tag 'tee-amdtee-fix2-for-5.6' of https://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes tee: amdtee: out of bounds read in find_session() * tag 'tee-amdtee-fix2-for-5.6' of https://git.linaro.org/people/jens.wiklander/linux-tee: tee: amdtee: out of bounds read in find_session() Link: https://lore.kernel.org/r/20200320063446.GA9892@jade Signed-off-by: Arnd Bergmann commit a88fead83e0db632180a717930aff5fa2e401024 Merge: 94bb9d185854 deeabb4c1341 Author: Arnd Bergmann Date: Wed Mar 25 13:51:02 2020 +0100 Merge tag 'oxnas-arm-soc-dt-fixes-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/narmstrong/linux-oxnas into arm/fixes - interrupt controller mask init fix to avoid spurious irq after soft reset * tag 'oxnas-arm-soc-dt-fixes-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/narmstrong/linux-oxnas: ARM: dts: oxnas: Fix clear-mask property Link: https://lore.kernel.org/r/1cc83d6b-78de-9160-59bf-77cfe726a365@baylibre.com Signed-off-by: Arnd Bergmann commit 94bb9d185854d0accf89f0679f92ff4918f6c767 Merge: 9b631649c436 55c7c0621078 Author: Arnd Bergmann Date: Wed Mar 25 13:49:47 2020 +0100 Merge tag 'arm-soc/for-5.6/devicetree-fixes-part2' of https://github.com/Broadcom/stblinux into arm/fixes This pull request contains Broadcom ARM-based SoCs Device Tree fixes for 5.6, please pull the following: - Nick fixes the missing pinctrl-names property for the Raspberry Pi Zero Wireless DTS - Nicolas fixes the VC4 firmware node dma-range property which does not have the limitations of the soc's bus node * tag 'arm-soc/for-5.6/devicetree-fixes-part2' of https://github.com/Broadcom/stblinux: ARM: dts: bcm283x: Fix vc4's firmware bus DMA limitations ARM: bcm2835-rpi-zero-w: Add missing pinctrl name Link: https://lore.kernel.org/r/20200323025246.22713-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 9b631649c43672cb7093103b5e8efa4553b952a5 Author: Linus Walleij Date: Sun Mar 22 12:58:46 2020 +0100 arm64: dts: Fix leftover entry-methods for PSCI These two device trees were either missed or added after the commit correcting the "entry-method" from "arm,psci" to just "psci" as per the binding. Link: https://lore.kernel.org/r/20200322115846.16265-1-linus.walleij@linaro.org Cc: Sudeep Holla Cc: Fabio Estevam Cc: Shawn Guo Cc: Chunyan Zhang Reviewed-by: Amit Kucheria Signed-off-by: Linus Walleij Reviewed-by: Sudeep Holla Signed-off-by: Arnd Bergmann commit ae6e45986a67a5d296eb6ef52619ca06e590bfaf Merge: 05ff1e3fb850 dfa7ea303f56 Author: Arnd Bergmann Date: Wed Mar 25 13:46:38 2020 +0100 Merge tag 'omap-for-v5.6/fixes-rc6-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Few more fixes for omaps Just few dts fixes: - A fix droid4 touchscreen stopping working with lost gpio interrupts - Also limit omap5 dma range similar to what we've recently done for dra7 * tag 'omap-for-v5.6/fixes-rc6-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: omap5: Add bus_dma_limit for L3 bus ARM: dts: omap4-droid4: Fix lost touchscreen interrupts ARM: dts: dra7: Add bus_dma_limit for L3 bus ARM: dts: N900: fix onenand timings ARM: dts: Fix dm814x Ethernet by changing to use rgmii-id mode Link: https://lore.kernel.org/r/pull-1584575254-461940@atomide.com Signed-off-by: Arnd Bergmann commit 05ff1e3fb850c667b9b0fd3e44c6f439baa77a64 Author: Marek Szyprowski Date: Mon Mar 16 18:37:10 2020 +0100 ARM: dts: exynos: Fix regulator node aliasing on Midas-based boards Commit d4ec0cb05064 ("ARM: dts: exynos: Add support for the touch-sensitive buttons on Midas family") added a new fixed regulator ("voltage-regulator-6") to base "midas" .dtsi, but it didn't update the clients of that .dtsi, which define their own fixed regulators starting from the "voltage-regulator-6". This results in aliasing of the regulator dt nodes and breaks operation of OLED panel due to lack of power supply. Fix this by increasing the numbers in the fixed regulator names for those boards. Link: https://lore.kernel.org/r/20200316173710.3144-1-krzk@kernel.org Fixes: d4ec0cb05064 ("ARM: dts: exynos: Add support for the touch-sensitive buttons on Midas family") Signed-off-by: Marek Szyprowski Reviewed-by: Denis 'GNUtoo' Carikli Signed-off-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit ad5d7a551345c5b3dc9fab8db038d4c6518c7c82 Merge: d2687b896dab 636b45b8efa9 Author: Arnd Bergmann Date: Wed Mar 25 13:45:31 2020 +0100 Merge tag 'imx-fixes-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.6, round 2: - Fix minimum voltage setting of vdd_arm and vdd_soc on i.MX6 phycore-som board. * tag 'imx-fixes-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx6: phycore-som: fix arm and soc minimum voltage Link: https://lore.kernel.org/r/20200316032555.GD17221@dragon Signed-off-by: Arnd Bergmann commit ba80013fba656b9830ef45cd40a6a1e44707f47a Author: Maor Gottlieb Date: Sun Mar 22 14:49:06 2020 +0200 RDMA/mlx5: Block delay drop to unprivileged users It has been discovered that this feature can globally block the RX port, so it should be allowed for highly privileged users only. Fixes: 03404e8ae652("IB/mlx5: Add support to dropless RQ") Link: https://lore.kernel.org/r/20200322124906.1173790-1-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d2687b896dabe32ff4630dd4359e4d8ecf31b8cf Merge: aafd017347ea 00cef5e404a6 Author: Arnd Bergmann Date: Wed Mar 25 13:42:10 2020 +0100 Merge tag 'sunxi-fixes-for-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes Allwinner Fixes for 5.6 - part 2 This follows up on the previous 5.6 fixes tag with a fix for the A33 Security System (crypto offloading hardware). The hardware was found to not be compatible with existing hardware and a new compatible was needed. The driver change was picked up right before the previous -rc6 and the DT bindings and DT changes were not picked up. The goal is to have all the changes in the same release, that is v5.6. * tag 'sunxi-fixes-for-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sun8i: a33: add the new SS compatible dt-bindings: crypto: add new compatible for A33 SS Link: https://lore.kernel.org/r/20200313060727.GA23962@wens.csie.org Signed-off-by: Arnd Bergmann commit aafd017347eaedd953002dfba7f39ae486228222 Merge: 8b45e9d9c05d d9b553b02e69 Author: Arnd Bergmann Date: Wed Mar 25 13:41:01 2020 +0100 Merge tag 'sunxi-fixes-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes Allwinner Fixes for v5.6 A pretty normal set of fixes for v5.6: - Fix reversed macros used for A83T EMAC clock and reset - Fix camera regulator voltage and USB OTG for TBS-A711 - 16-bit / 8-bit mixed read fix for our RSB driver - Fix SPI controller base address for R40 - Reorder device nodes based on base address for R40 * tag 'sunxi-fixes-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sun8i: r40: Move SPI device nodes based on address order ARM: dts: sun8i: r40: Fix register base address for SPI2 and SPI3 ARM: dts: sun8i: r40: Move AHCI device node based on address order bus: sunxi-rsb: Return correct data when mixing 16-bit and 8-bit reads ARM: dts: sun8i-a83t-tbs-a711: Fix USB OTG mode detection ARM: dts: sun8i-a83t-tbs-a711: HM5065 doesn't like such a high voltage ARM: dts: sun8i: a83t: Fix incorrect clk and reset macros for EMAC device Link: https://lore.kernel.org/r/20200313055233.GA19649@wens.csie.org Signed-off-by: Arnd Bergmann commit 8b45e9d9c05df5d7eb4ed460534fc554751505df Merge: 2c523b344dfa fe8fe7723a3a Author: Arnd Bergmann Date: Wed Mar 25 13:40:21 2020 +0100 Merge tag 'soc-fsl-fix-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into arm/fixes NXP/FSL soc driver fixes for v5.6 DPAA2 DPIO - Fix a kernel hang caused by irq requested before creating dpio * tag 'soc-fsl-fix-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux: soc: fsl: dpio: register dpio irq handlers after dpio create Link: https://lore.kernel.org/r/20200312202525.16708-1-leoyang.li@nxp.com Signed-off-by: Arnd Bergmann commit 575a97acc3b7446094b0dcaf6285c7c6934c2477 Author: Johannes Berg Date: Wed Mar 25 09:09:19 2020 +0100 ieee80211: fix HE SPR size calculation The he_sr_control field is just a u8, so le32_to_cpu() shouldn't be applied to it; this was evidently copied from ieee80211_he_oper_size(). Fix it, and also adjust the type of the local variable. Fixes: ef11a931bd1c ("mac80211: HE: add Spatial Reuse element parsing support") Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20200325090918.dfe483b49e06.Ia53622f23b2610a2ae6ea39a199866196fe946c1@changeid Signed-off-by: Johannes Berg commit 0016d3201753b59f3ae84b868fe66c86ad256f19 Author: Johannes Berg Date: Wed Mar 25 09:05:32 2020 +0100 nl80211: fix NL80211_ATTR_CHANNEL_WIDTH attribute type The new opmode notification used this attribute with a u8, when it's documented as a u32 and indeed used in userspace as such, it just happens to work on little-endian systems since userspace isn't doing any strict size validation, and the u8 goes into the lower byte. Fix this. Cc: stable@vger.kernel.org Fixes: 466b9936bf93 ("cfg80211: Add support to notify station's opmode change to userspace") Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20200325090531.be124f0a11c7.Iedbf4e197a85471ebd729b186d5365c0343bf7a8@changeid Signed-off-by: Johannes Berg commit ea697a8bf5a4161e59806fab14f6e4a46dc7dcb0 Author: Martin K. Petersen Date: Tue Mar 24 11:16:15 2020 -0400 scsi: sd: Fix optimal I/O size for devices that change reported values Some USB bridge devices will return a default set of characteristics during initialization. And then, once an attached drive has spun up, substitute the actual parameters reported by the drive. According to the SCSI spec, the device should return a UNIT ATTENTION in case any reported parameters change. But in this case the change is made silently after a small window where default values are reported. Commit a83da8a4509d ("scsi: sd: Optimal I/O size should be a multiple of physical block size") validated the reported optimal I/O size against the physical block size to overcome problems with devices reporting nonsensical transfer sizes. However, this validation did not account for the fact that aforementioned devices will return default values during a brief window during spin-up. The subsequent change in reported characteristics would invalidate the checking that had previously been performed. Unset a previously configured optimal I/O size should the sanity checking fail on subsequent revalidate attempts. Link: https://lore.kernel.org/r/33fb522e-4f61-1b76-914f-c9e6a3553c9b@gmail.com Cc: Bryan Gurney Cc: Reported-by: Bernhard Sulzer Tested-by: Bernhard Sulzer Signed-off-by: Martin K. Petersen commit ccf4ad7da0d9c30a962a116cb55bcd7d8c44b0fe Author: Damien Le Moal Date: Fri Mar 20 21:36:54 2020 +0900 zonfs: Fix handling of read-only zones The write pointer of zones in the read-only consition is defined as invalid by the SCSI ZBC and ATA ZAC specifications. It is thus not possible to determine the correct size of a read-only zone file on mount. Fix this by handling read-only zones in the same manner as offline zones by disabling all accesses to the zone (read and write) and initializing the inode size of the read-only zone to 0). For zones found to be in the read-only condition at runtime, only disable write access to the zone and keep the size of the zone file to its last updated value to allow the user to recover previously written data. Also fix zonefs documentation file to reflect this change. Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn commit 6f000f987832655e88ff885a1e695c2b8adcb5c5 Merge: 7e566df65278 a64d558d8cf9 Author: David S. Miller Date: Tue Mar 24 17:30:40 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) A new selftest for nf_queue, from Florian Westphal. This test covers two recent fixes: 07f8e4d0fddb ("tcp: also NULL skb->dev when copy was needed") and b738a185beaa ("tcp: ensure skb->dev is NULL before leaving TCP stack"). 2) The fwd action breaks with ifb. For safety in next extensions, make sure the fwd action only runs from ingress until it is extended to be used from a different hook. 3) The pipapo set type now reports EEXIST in case of subrange overlaps. Update the rbtree set to validate range overlaps, so far this validation is only done only from userspace. From Stefano Brivio. ==================== Signed-off-by: David S. Miller commit 7e566df6527883de0d660f0facec883d702a65cc Merge: f13bc68131b0 187a9830c921 Author: David S. Miller Date: Tue Mar 24 17:25:54 2020 -0700 Merge tag 'mlx5-fixes-2020-03-24' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2020-03-24 This series introduces some fixes to mlx5 driver. From Aya, Fixes to the RX error recovery flows From Leon, Fix IB capability mask Please pull and let me know if there is any problem. For -stable v5.5 ('net/mlx5_core: Set IB capability mask1 to fix ib_srpt connection failure') For -stable v5.4 ('net/mlx5e: Fix ICOSQ recovery flow with Striding RQ') ('net/mlx5e: Do not recover from a non-fatal syndrome') ('net/mlx5e: Fix missing reset of SW metadata in Striding RQ reset') ('net/mlx5e: Enhance ICOSQ WQE info fields') The above patch ('net/mlx5e: Enhance ICOSQ WQE info fields') will fail to apply cleanly on v5.4 due to a trivial contextual conflict, but it is an important fix, do I need to do something about it or just assume Greg will know how to handle this ? ==================== Signed-off-by: David S. Miller commit f13bc68131b0c0d67a77fb43444e109828a983bf Author: Heiner Kallweit Date: Tue Mar 24 20:58:29 2020 +0100 r8169: re-enable MSI on RTL8168c The original change fixed an issue on RTL8168b by mimicking the vendor driver behavior to disable MSI on chip versions before RTL8168d. This however now caused an issue on a system with RTL8168c, see [0]. Therefore leave MSI disabled on RTL8168b, but re-enable it on RTL8168c. [0] https://bugzilla.redhat.com/show_bug.cgi?id=1792839 Fixes: 003bd5b4a7b4 ("r8169: don't use MSI before RTL8168d") Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit c312c7818b86b663d32ec5d4b512abf06b23899a Author: Andre Przywara Date: Tue Mar 24 16:10:10 2020 +0000 net: phy: mdio-bcm-unimac: Fix clock handling The DT binding for this PHY describes an *optional* clock property. Due to a bug in the error handling logic, we are actually ignoring this clock *all* of the time so far. Fix this by using devm_clk_get_optional() to handle this clock properly. Fixes: b78ac6ecd1b6b ("net: phy: mdio-bcm-unimac: Allow configuring MDIO clock divider") Signed-off-by: Andre Przywara Reviewed-by: Andrew Lunn Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 50e0d28d3808146cc19b0d5564ef4ba9e5bf3846 Author: Raju Rangoju Date: Tue Mar 24 17:10:00 2020 +0530 cxgb4/ptp: pass the sign of offset delta in FW CMD cxgb4_ptp_fineadjtime() doesn't pass the signedness of offset delta in FW_PTP_CMD. Fix it by passing correct sign. Signed-off-by: Raju Rangoju Signed-off-by: David S. Miller commit e80f40cbe4dd51371818e967d40da8fe305db5e4 Author: Vladimir Oltean Date: Tue Mar 24 11:45:34 2020 +0200 net: dsa: tag_8021q: replace dsa_8021q_remove_header with __skb_vlan_pop Not only did this wheel did not need reinventing, but there is also an issue with it: It doesn't remove the VLAN header in a way that preserves the L2 payload checksum when that is being provided by the DSA master hw. It should recalculate checksum both for the push, before removing the header, and for the pull afterwards. But the current implementation is quite dizzying, with pulls followed immediately afterwards by pushes, the memmove is done before the push, etc. This makes a DSA master with RX checksumming offload to print stack traces with the infamous 'hw csum failure' message. So remove the dsa_8021q_remove_header function and replace it with something that actually works with inet checksumming. Fixes: d461933638ae ("net: dsa: tag_8021q: Create helper function for removing VLAN header") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 961d0e5b32946703125964f9f5b6321d60f4d706 Author: Zh-yuan Ye Date: Tue Mar 24 17:28:25 2020 +0900 net: cbs: Fix software cbs to consider packet sending time Currently the software CBS does not consider the packet sending time when depleting the credits. It caused the throughput to be Idleslope[kbps] * (Port transmit rate[kbps] / |Sendslope[kbps]|) where Idleslope * (Port transmit rate / (Idleslope + |Sendslope|)) = Idleslope is expected. In order to fix the issue above, this patch takes the time when the packet sending completes into account by moving the anchor time variable "last" ahead to the send completion time upon transmission and adding wait when the next dequeue request comes before the send completion time of the previous packet. changelog: V2->V3: - remove unnecessary whitespace cleanup - add the checks if port_rate is 0 before division V1->V2: - combine variable "send_completed" into "last" - add the comment for estimate of the packet sending Fixes: 585d763af09c ("net/sched: Introduce Credit Based Shaper (CBS) qdisc") Signed-off-by: Zh-yuan Ye Reviewed-by: Vinicius Costa Gomes Signed-off-by: David S. Miller commit 52afa505a03d914081f40cb869a3248567a57573 Author: Eugene Syromiatnikov Date: Tue Mar 24 15:53:50 2020 -0700 Input: avoid BIT() macro usage in the serio.h UAPI header The commit 19ba1eb15a2a ("Input: psmouse - add a custom serio protocol to send extra information") introduced usage of the BIT() macro for SERIO_* flags; this macro is not provided in UAPI headers. Replace if with similarly defined _BITUL() macro defined in . Fixes: 19ba1eb15a2a ("Input: psmouse - add a custom serio protocol to send extra information") Signed-off-by: Eugene Syromiatnikov Cc: # v5.0+ Link: https://lore.kernel.org/r/20200324041341.GA32335@asgard.redhat.com Signed-off-by: Dmitry Torokhov commit 950bf4f17725556bbc773a5b71e88a6c14c9ff25 Author: Leon Romanovsky Date: Wed Mar 18 11:16:40 2020 +0200 RDMA/mlx5: Fix access to wrong pointer while performing flush due to error The main difference between send and receive SW completions is related to separate treatment of WQ queue. For receive completions, the initial index to be flushed is stored in "tail", while for send completions, it is in deleted "last_poll". CPU: 54 PID: 53405 Comm: kworker/u161:0 Kdump: loaded Tainted: G OE --------- -t - 4.18.0-147.el8.ppc64le #1 Workqueue: ib-comp-unb-wq ib_cq_poll_work [ib_core] NIP: c000003c7c00a000 LR: c00800000e586af4 CTR: c000003c7c00a000 REGS: c0000036cc9db940 TRAP: 0400 Tainted: G OE --------- -t - (4.18.0-147.el8.ppc64le) MSR: 9000000010009033 CR: 24004488 XER: 20040000 CFAR: c00800000e586af0 IRQMASK: 0 GPR00: c00800000e586ab4 c0000036cc9dbbc0 c00800000e5f1a00 c0000037d8433800 GPR04: c000003895a26800 c0000037293f2000 0000000000000201 0000000000000011 GPR08: c000003895a26c80 c000003c7c00a000 0000000000000000 c00800000ed30438 GPR12: c000003c7c00a000 c000003fff684b80 c00000000017c388 c00000396ec4be40 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: c00000000151e498 0000000000000010 c000003895a26848 0000000000000010 GPR24: 0000000000000010 0000000000010000 c000003895a26800 0000000000000000 GPR28: 0000000000000010 c0000037d8433800 c000003895a26c80 c000003895a26800 NIP [c000003c7c00a000] 0xc000003c7c00a000 LR [c00800000e586af4] __ib_process_cq+0xec/0x1b0 [ib_core] Call Trace: [c0000036cc9dbbc0] [c00800000e586ab4] __ib_process_cq+0xac/0x1b0 [ib_core] (unreliable) [c0000036cc9dbc40] [c00800000e586c88] ib_cq_poll_work+0x40/0xb0 [ib_core] [c0000036cc9dbc70] [c000000000171f44] process_one_work+0x2f4/0x5c0 [c0000036cc9dbd10] [c000000000172a0c] worker_thread+0xcc/0x760 [c0000036cc9dbdc0] [c00000000017c52c] kthread+0x1ac/0x1c0 [c0000036cc9dbe30] [c00000000000b75c] ret_from_kernel_thread+0x5c/0x80 Fixes: 8e3b68830186 ("RDMA/mlx5: Delete unreachable handle_atomic code by simplifying SW completion") Link: https://lore.kernel.org/r/20200318091640.44069-1-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2d47fbacf2725a67869f4d3634c2415e7dfab2f4 Author: Mike Marciniszyn Date: Fri Mar 13 08:47:05 2020 -0400 RDMA/core: Ensure security pkey modify is not lost The following modify sequence (loosely based on ipoib) will lose a pkey modifcation: - Modify (pkey index, port) - Modify (new pkey index, NO port) After the first modify, the qp_pps list will have saved the pkey and the unit on the main list. During the second modify, get_new_pps() will fetch the port from qp_pps and read the new pkey index from qp_attr->pkey_index. The state will still be zero, or IB_PORT_PKEY_NOT_VALID. Because of the invalid state, the new values will never replace the one in the qp pps list, losing the new pkey. This happens because the following if statements will never correct the state because the first term will be false. If the code had been executed, it would incorrectly overwrite valid values. if ((qp_attr_mask & IB_QP_PKEY_INDEX) && (qp_attr_mask & IB_QP_PORT)) new_pps->main.state = IB_PORT_PKEY_VALID; if (!(qp_attr_mask & (IB_QP_PKEY_INDEX | IB_QP_PORT)) && qp_pps) { new_pps->main.port_num = qp_pps->main.port_num; new_pps->main.pkey_index = qp_pps->main.pkey_index; if (qp_pps->main.state != IB_PORT_PKEY_NOT_VALID) new_pps->main.state = IB_PORT_PKEY_VALID; } Fix by joining the two if statements with an or test to see if qp_pps is non-NULL and in the correct state. Fixes: 1dd017882e01 ("RDMA/core: Fix protection fault in get_pkey_idx_qp_list") Link: https://lore.kernel.org/r/20200313124704.14982.55907.stgit@awfm-01.aw.intel.com Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1fa70778742d148ceaebae39c97683ef1607b482 Author: Leon Romanovsky Date: Thu Mar 12 10:36:58 2020 +0200 MAINTAINERS: Clean RXE section and add Zhu as RXE maintainer Zhu Yanjun contributed many patches to RXE and expressed genuine interest in improve RXE even more. Let's add him as a maintainer. Link: https://lore.kernel.org/r/20200312083658.29603-1-leon@kernel.org Signed-off-by: Leon Romanovsky Acked-by: Moni Shoua Signed-off-by: Jason Gunthorpe commit e4ad153ac8274291d21f13e98422821db4d590b9 Author: Andrew Duggan Date: Tue Mar 24 15:38:51 2020 -0700 Input: synaptics-rmi4 - set reduced reporting mode only when requested The previous patch "c5ccf2ad3d33 (Input: synaptics-rmi4 - switch to reduced reporting mode)" enabled reduced reporting mode unintentionally on some devices, if the firmware was configured with default Delta X/Y threshold values. The result unintentionally degrade the performance of some touchpads. This patch checks to see that the driver is modifying the delta X/Y thresholds before modifying the reporting mode. Signed-off-by: Andrew Duggan Fixes: c5ccf2ad3d33 ("Input: synaptics-rmi4 - switch to reduced reporting mode") Link: https://lore.kernel.org/r/20200312005549.29922-1-aduggan@synaptics.com Signed-off-by: Dmitry Torokhov commit 1369d0abe469fb4cdea8a5bce219d38cb857a658 Author: Yussuf Khalil Date: Sat Mar 7 14:16:31 2020 -0800 Input: synaptics - enable RMI on HP Envy 13-ad105ng This laptop (and perhaps other variants of the same model) reports an SMBus-capable Synaptics touchpad. Everything (including suspend and resume) works fine when RMI is enabled via the kernel command line, so let's add it to the whitelist. Signed-off-by: Yussuf Khalil Link: https://lore.kernel.org/r/20200307213508.267187-1-dev@pp3345.net Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 187a9830c921d92c4a9a8e2921ecc4b35a97532c Author: Aya Levin Date: Thu Mar 19 13:25:17 2020 +0200 net/mlx5e: Do not recover from a non-fatal syndrome For non-fatal syndromes like LOCAL_LENGTH_ERR, recovery shouldn't be triggered. In these scenarios, the RQ is not actually in ERR state. This misleads the recovery flow which assumes that the RQ is really in error state and no more completions arrive, causing crashes on bad page state. Fixes: 8276ea1353a4 ("net/mlx5e: Report and recover from CQE with error on RQ") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit e239c6d686e1c37fb2ab143162dfb57471a8643f Author: Aya Levin Date: Mon Mar 16 16:53:10 2020 +0200 net/mlx5e: Fix ICOSQ recovery flow with Striding RQ In striding RQ mode, the buffers of an RX WQE are first prepared and posted to the HW using a UMR WQEs via the ICOSQ. We maintain the state of these in-progress WQEs in the RQ SW struct. In the flow of ICOSQ recovery, the corresponding RQ is not in error state, hence: - The buffers of the in-progress WQEs must be released and the RQ metadata should reflect it. - Existing RX WQEs in the RQ should not be affected. For this, wrap the dealloc of the in-progress WQEs in a function, and use it in the ICOSQ recovery flow instead of mlx5e_free_rx_descs(). Fixes: be5323c8379f ("net/mlx5e: Report and recover from CQE error on ICOSQ") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 39369fd536d485a99a59d8e357c0d4d3ce19a3b8 Author: Aya Levin Date: Thu Mar 12 12:35:32 2020 +0200 net/mlx5e: Fix missing reset of SW metadata in Striding RQ reset When resetting the RQ (moving RQ state from RST to RDY), the driver resets the WQ's SW metadata. In striding RQ mode, we maintain a field that reflects the actual expected WQ head (including in progress WQEs posted to the ICOSQ). It was mistakenly not reset together with the WQ. Fix this here. Fixes: 8276ea1353a4 ("net/mlx5e: Report and recover from CQE with error on RQ") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 1de0306c3a05d305e45b1f1fabe2f4e94222eb6b Author: Aya Levin Date: Mon Mar 9 09:44:18 2020 +0200 net/mlx5e: Enhance ICOSQ WQE info fields Add number of WQEBBs (WQE's Basic Block) to WQE info struct. Set the number of WQEBBs on WQE post, and increment the consumer counter (cc) on completion. In case of error completions, the cc was mistakenly not incremented, keeping a gap between cc and pc (producer counter). This failed the recovery flow on the ICOSQ from a CQE error which timed-out waiting for the cc and pc to meet. Fixes: be5323c8379f ("net/mlx5e: Report and recover from CQE error on ICOSQ") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 306f354c67397b3138300cde875c5cab45b857f7 Author: Leon Romanovsky Date: Mon Mar 16 09:31:03 2020 +0200 net/mlx5_core: Set IB capability mask1 to fix ib_srpt connection failure The cap_mask1 isn't protected by field_select and not listed among RW fields, but it is required to be written to properly initialize ports in IB virtualization mode. Link: https://lore.kernel.org/linux-rdma/88bab94d2fd72f3145835b4518bc63dda587add6.camel@redhat.com Fixes: ab118da4c10a ("net/mlx5: Don't write read-only fields in MODIFY_HCA_VPORT_CONTEXT command") Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit d944b27df121e2ee854a6c2fad13d6c6300792d4 Author: Kai-Heng Feng Date: Tue Mar 24 23:28:11 2020 +0800 i2c: nvidia-gpu: Handle timeout correctly in gpu_i2c_check_status() Nvidia card may come with a "phantom" UCSI device, and its driver gets stuck in probe routine, prevents any system PM operations like suspend. There's an unaccounted case that the target time can equal to jiffies in gpu_i2c_check_status(), let's solve that by using readl_poll_timeout() instead of jiffies comparison functions. Fixes: c71bcdcb42a7 ("i2c: add i2c bus driver for NVIDIA GPU") Suggested-by: Andy Shevchenko Signed-off-by: Kai-Heng Feng Reviewed-by: Andy Shevchenko Reviewed-by: Ajay Gupta Tested-by: Ajay Gupta Signed-off-by: Wolfram Sang commit a64d558d8cf98424cc5eb9ae6631782cd8bf789c Author: Florian Westphal Date: Mon Mar 23 17:34:30 2020 +0100 selftests: netfilter: add nfqueue test case Add a test case to check nf queue infrastructure. Could be extended in the future to also cover serialization of conntrack, uid and secctx attributes in nfqueue. For now, this checks that 'queue bypass' works, that a queue rule with no bypass option blocks traffic and that userspace receives the expected number of packets. For this we add two queues and hook all of prerouting/input/forward/output/postrouting. Packets get queued twice with a dummy base chain in between: This passes with current nf tree, but reverting commit 946c0d8e6ed4 ("netfilter: nf_queue: fix reinject verdict handling") makes this trip (it processes 30 instead of expected 20 packets). v2: update config file with queue and other options missing/needed for other tests. v3: also test with tcp, this reveals problem with commit 28f8bfd1ac94 ("netfilter: Support iif matches in POSTROUTING"), due to skb->dev pointing at another skb in the retransmit rbtree (skb->dev aliases to rbnode child). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit bcfabee1afd99484b6ba067361b8678e28bbc065 Author: Pablo Neira Ayuso Date: Mon Mar 23 19:53:10 2020 +0100 netfilter: nft_fwd_netdev: allow to redirect to ifb via ingress Set skb->tc_redirected to 1, otherwise the ifb driver drops the packet. Set skb->tc_from_ingress to 1 to reinject the packet back to the ingress path after leaving the ifb egress path. This patch inconditionally sets on these two skb fields that are meaningful to the ifb driver. The existing forward action is guaranteed to run from ingress path. Fixes: 39e6dea28adc ("netfilter: nf_tables: add forward expression to the netdev family") Signed-off-by: Pablo Neira Ayuso commit 76a109fac206e158eb3c967af98c178cff738e6a Author: Pablo Neira Ayuso Date: Mon Mar 23 14:27:16 2020 +0100 netfilter: nft_fwd_netdev: validate family and chain type Make sure the forward action is only used from ingress. Fixes: 39e6dea28adc ("netfilter: nf_tables: add forward expression to the netdev family") Signed-off-by: Pablo Neira Ayuso commit 7c84d41416d836ef7e533bd4d64ccbdf40c5ac70 Author: Stefano Brivio Date: Sun Mar 22 03:22:01 2020 +0100 netfilter: nft_set_rbtree: Detect partial overlaps on insertion ...and return -ENOTEMPTY to the front-end in this case, instead of proceeding. Currently, nft takes care of checking for these cases and not sending them to the kernel, but if we drop the set_overlap() call in nft we can end up in situations like: # nft add table t # nft add set t s '{ type inet_service ; flags interval ; }' # nft add element t s '{ 1 - 5 }' # nft add element t s '{ 6 - 10 }' # nft add element t s '{ 4 - 7 }' # nft list set t s table ip t { set s { type inet_service flags interval elements = { 1-3, 4-5, 6-7 } } } This change has the primary purpose of making the behaviour consistent with nft_set_pipapo, but is also functional to avoid inconsistent behaviour if userspace sends overlapping elements for any reason. v2: When we meet the same key data in the tree, as start element while inserting an end element, or as end element while inserting a start element, actually check that the existing element is active, before resetting the overlap flag (Pablo Neira Ayuso) Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 6f7c9caf017be8ab0fe3b99509580d0793bf0833 Author: Stefano Brivio Date: Sun Mar 22 03:22:00 2020 +0100 netfilter: nft_set_rbtree: Introduce and use nft_rbtree_interval_start() Replace negations of nft_rbtree_interval_end() with a new helper, nft_rbtree_interval_start(), wherever this helps to visualise the problem at hand, that is, for all the occurrences except for the comparison against given flags in __nft_rbtree_get(). This gets especially useful in the next patch. Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 0eb4b5ee33f2461d149408a247af8ae24756a6ca Author: Stefano Brivio Date: Sun Mar 22 03:21:59 2020 +0100 netfilter: nft_set_pipapo: Separate partial and complete overlap cases on insertion ...and return -ENOTEMPTY to the front-end on collision, -EEXIST if an identical element already exists. Together with the previous patch, element collision will now be returned to the user as -EEXIST. Reported-by: Phil Sutter Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 8c2d45b2b65ca1f215244be1c600236e83f9815f Author: Pablo Neira Ayuso Date: Sun Mar 22 03:21:58 2020 +0100 netfilter: nf_tables: Allow set back-ends to report partial overlaps on insertion Currently, the -EEXIST return code of ->insert() callbacks is ambiguous: it might indicate that a given element (including intervals) already exists as such, or that the new element would clash with existing ones. If identical elements already exist, the front-end is ignoring this without returning error, in case NLM_F_EXCL is not set. However, if the new element can't be inserted due an overlap, we should report this to the user. To this purpose, allow set back-ends to return -ENOTEMPTY on collision with existing elements, translate that to -EEXIST, and return that to userspace, no matter if NLM_F_EXCL was set. Reported-by: Phil Sutter Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 76ccd234269bd05debdbc12c96eafe62dd9a6180 Merge: 3f3ee43a4623 564200ed8e71 Author: Linus Torvalds Date: Tue Mar 24 10:03:32 2020 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf tooling fixes from Ingo Molnar: "A handful of tooling fixes all across the map, no kernel changes" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tools headers uapi: Update linux/in.h copy perf probe: Do not depend on dwfl_module_addrsym() perf probe: Fix to delete multiple probe event perf parse-events: Fix reading of invalid memory in event parsing perf python: Fix clang detection when using CC=clang-version perf map: Fix off by one in strncpy() size argument tools: Let O= makes handle a relative path with -C option commit 3f3ee43a462344f6509bd15c988e39d330af91b3 Merge: c6ac7188c114 870b4333a62e Author: Linus Torvalds Date: Tue Mar 24 09:57:46 2020 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Ingo Molnar: "A build fix with certain Kconfig combinations" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ioremap: Fix CONFIG_EFI=n build commit c6ac7188c1142c450eb601563ad69204bf1e9286 Merge: 979e52ca0469 018af9be3dd5 Author: Linus Torvalds Date: Tue Mar 24 09:53:12 2020 -0700 Merge tag 'dmaengine-fix-5.6' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "Late fixes in dmaengine for v5.6: - move .device_release missing log warning to debug - couple of maintainer entries for HiSilicon and IADX drivers - off-by-one fix for idxd driver - documentation warning fixes - TI k3 dma error handling fix" * tag 'dmaengine-fix-5.6' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: ti: k3-udma-glue: Fix an error handling path in 'k3_udma_glue_cfg_rx_flow()' MAINTAINERS: Add maintainer for HiSilicon DMA engine driver dmaengine: idxd: fix off by one on cdev dwq refcount MAINTAINERS: rectify the INTEL IADX DRIVER entry dmaengine: move .device_release missing log warning to debug level docs: dmaengine: provider.rst: get rid of some warnings commit 94be4b85d89520329f766c7d69a4d74bcc87f5b5 Author: Wanpeng Li Date: Tue Mar 24 14:32:10 2020 +0800 KVM: LAPIC: Also cancel preemption timer when disarm LAPIC timer The timer is disarmed when switching between TSC deadline and other modes, we should set everything to disarmed state, however, LAPIC timer can be emulated by preemption timer, it still works if vmx->hv_deadline_timer is not -1. This patch also cancels preemption timer when disarm LAPIC timer. Signed-off-by: Wanpeng Li Message-Id: <1585031530-19823-1-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit 0c625ccfe6f754d0896b8881f5c85bcb81699f1f Author: Hans de Goede Date: Mon Mar 2 12:12:25 2020 +0100 gpiolib: acpi: Add quirk to ignore EC wakeups on HP x2 10 CHT + AXP288 model There are at least 3 models of the HP x2 10 models: Bay Trail SoC + AXP288 PMIC Cherry Trail SoC + AXP288 PMIC Cherry Trail SoC + TI PMIC Like on the other HP x2 10 models we need to ignore wakeup for ACPI GPIO events on the external embedded-controller pin to avoid spurious wakeups on the HP x2 10 CHT + AXP288 model too. This commit adds an extra DMI based quirk for the HP x2 10 CHT + AXP288 model, ignoring wakeups for ACPI GPIO events on the EC interrupt pin on this model. This fixes spurious wakeups from suspend on this model. Fixes: aa23ca3d98f7 ("gpiolib: acpi: Add honor_wakeup module-option + quirk mechanism") Reported-and-tested-by: Marc Lehmann Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200302111225.6641-4-hdegoede@redhat.com Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 4c59406ed00379c8663f8663d82b2537467ce9d7 Author: YueHaibing Date: Mon Mar 23 15:32:39 2020 +0800 xfrm: policy: Fix doulbe free in xfrm_policy_timer After xfrm_add_policy add a policy, its ref is 2, then xfrm_policy_timer read_lock xp->walk.dead is 0 .... mod_timer() xfrm_policy_kill policy->walk.dead = 1 .... del_timer(&policy->timer) xfrm_pol_put //ref is 1 xfrm_pol_put //ref is 0 xfrm_policy_destroy call_rcu xfrm_pol_hold //ref is 1 read_unlock xfrm_pol_put //ref is 0 xfrm_policy_destroy call_rcu xfrm_policy_destroy is called twice, which may leads to double free. Call Trace: RIP: 0010:refcount_warn_saturate+0x161/0x210 ... xfrm_policy_timer+0x522/0x600 call_timer_fn+0x1b3/0x5e0 ? __xfrm_decode_session+0x2990/0x2990 ? msleep+0xb0/0xb0 ? _raw_spin_unlock_irq+0x24/0x40 ? __xfrm_decode_session+0x2990/0x2990 ? __xfrm_decode_session+0x2990/0x2990 run_timer_softirq+0x5c5/0x10e0 Fix this by use write_lock_bh in xfrm_policy_kill. Fixes: ea2dea9dacc2 ("xfrm: remove policy lock when accessing policy->walk.dead") Signed-off-by: YueHaibing Acked-by: Timo Teräs Acked-by: Herbert Xu Signed-off-by: Steffen Klassert commit 81573b18f26defe672a7d960f9af9ac2c97f324d Author: Vadym Kochan Date: Mon Mar 23 16:24:04 2020 +0200 selftests/net/forwarding: add Makefile to install tests Add missing Makefile for net/forwarding tests and include it to the targets list, otherwise forwarding tests are not installed in case of cross-compilation. Signed-off-by: Vadym Kochan Signed-off-by: David S. Miller commit 2f599ec422ad6634fb5ad43748b9969ca9d742bd Author: Michal Kubecek Date: Sun Mar 22 22:24:21 2020 +0100 ethtool: fix reference leak in some *_SET handlers Andrew noticed that some handlers for *_SET commands leak a netdev reference if required ethtool_ops callbacks do not exist. A simple reproducer would be e.g. ip link add veth1 type veth peer name veth2 ethtool -s veth1 wol g ip link del veth1 Make sure dev_put() is called when ethtool_ops check fails. v2: add Fixes tags Fixes: a53f3d41e4d3 ("ethtool: set link settings with LINKINFO_SET request") Fixes: bfbcfe2032e7 ("ethtool: set link modes related data with LINKMODES_SET request") Fixes: e54d04e3afea ("ethtool: set message mask with DEBUG_SET request") Fixes: 8d425b19b305 ("ethtool: set wake-on-lan settings with WOL_SET request") Reported-by: Andrew Lunn Signed-off-by: Michal Kubecek Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 0e62f543bed03a64495bd2651d4fe1aa4bcb7fe5 Author: Florian Fainelli Date: Sun Mar 22 13:58:50 2020 -0700 net: dsa: Fix duplicate frames flooded by learning When both the switch and the bridge are learning about new addresses, switch ports attached to the bridge would see duplicate ARP frames because both entities would attempt to send them. Fixes: 5037d532b83d ("net: dsa: add Broadcom tag RX/TX handler") Reported-by: Maxime Bizon Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller commit 39a8f2a88b0c04ff0f5db57ce5d44d36bcce1424 Merge: b06d072ccc4b 5d765a5e4bd7 Author: David S. Miller Date: Mon Mar 23 21:42:48 2020 -0700 Merge branch 'bnxt_en-Bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes. 5 bug fix patches covering an indexing bug for priority counters, memory leak when retrieving DCB ETS settings, error path return code, proper disabling of PCI before freeing context memory, and proper ring accounting in error path. Please also apply these to -stable. Thanks. ==================== Signed-off-by: David S. Miller commit 5d765a5e4bd7c368e564e11402bba74cf7f03ac1 Author: Vasundhara Volam Date: Sun Mar 22 16:40:05 2020 -0400 bnxt_en: Reset rings if ring reservation fails during open() If ring counts are not reset when ring reservation fails, bnxt_init_dflt_ring_mode() will not be called again to reinitialise IRQs when open() is called and results in system crash as napi will also be not initialised. This patch fixes it by resetting the ring counts. Fixes: 47558acd56a7 ("bnxt_en: Reserve rings at driver open if none was reserved at probe time.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 62bfb932a51f6d08eb409248e69f8d6428c2cabd Author: Michael Chan Date: Sun Mar 22 16:40:04 2020 -0400 bnxt_en: Free context memory after disabling PCI in probe error path. Other shutdown code paths will always disable PCI first to shutdown DMA before freeing context memory. Do the same sequence in the error path of probe to be safe and consistent. Fixes: c20dc142dd7b ("bnxt_en: Disable bus master during PCI shutdown and driver unload.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 0b5b561cea32d5bb1e0a82d65b755a3cb5212141 Author: Michael Chan Date: Sun Mar 22 16:40:03 2020 -0400 bnxt_en: Return error if bnxt_alloc_ctx_mem() fails. The current code ignores the return value from bnxt_hwrm_func_backing_store_cfg(), causing the driver to proceed in the init path even when this vital firmware call has failed. Fix it by propagating the error code to the caller. Fixes: 1b9394e5a2ad ("bnxt_en: Configure context memory on new devices.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 62d4073e86e62e316bea2c53e77db10418fd5dd7 Author: Edwin Peer Date: Sun Mar 22 16:40:02 2020 -0400 bnxt_en: fix memory leaks in bnxt_dcbnl_ieee_getets() The allocated ieee_ets structure goes out of scope without being freed, leaking memory. Appropriate result codes should be returned so that callers do not rely on invalid data passed by reference. Also cache the ETS config retrieved from the device so that it doesn't need to be freed. The balance of the code was clearly written with the intent of having the results of querying the hardware cached in the device structure. The commensurate store was evidently missed though. Fixes: 7df4ae9fe855 ("bnxt_en: Implement DCBNL to support host-based DCBX.") Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit a24ec3220f369aa0b94c863b6b310685a727151c Author: Michael Chan Date: Sun Mar 22 16:40:01 2020 -0400 bnxt_en: Fix Priority Bytes and Packets counters in ethtool -S. There is an indexing bug in determining these ethtool priority counters. Instead of using the queue ID to index, we need to normalize by modulo 10 to get the index. This index is then used to obtain the proper CoS queue counter. Rename bp->pri2cos to bp->pri2cos_idx to make this more clear. Fixes: e37fed790335 ("bnxt_en: Add ethtool -S priority counters.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit b06d072ccc4b1acd0147b17914b7ad1caa1818bb Author: Willem de Bruijn Date: Sun Mar 22 13:51:13 2020 -0400 macsec: restrict to ethernet devices Only attach macsec to ethernet devices. Syzbot was able to trigger a KMSAN warning in macsec_handle_frame by attaching to a phonet device. Macvlan has a similar check in macvlan_port_create. v1->v2 - fix commit message typo Reported-by: syzbot Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit 55b474c41e586a5c21c7ab81ff474eb6bacb4322 Author: Michal Kubecek Date: Sat Mar 21 00:46:50 2020 +0100 netlink: check for null extack in cookie helpers Unlike NL_SET_ERR_* macros, nl_set_extack_cookie_u64() and nl_set_extack_cookie_u32() helpers do not check extack argument for null and neither do their callers, as syzbot recently discovered for ethnl_parse_header(). Instead of fixing the callers and leaving the trap in place, add check of null extack to both helpers to make them consistent with NL_SET_ERR_* macros. v2: drop incorrect second Fixes tag Fixes: 2363d73a2f3e ("ethtool: reject unrecognized request flags") Reported-by: syzbot+258a9089477493cea67b@syzkaller.appspotmail.com Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller commit 12a5ba5a1994568d4ceaff9e78c6b0329d953386 Author: Pawel Dembicki Date: Fri Mar 20 21:46:14 2020 +0100 net: qmi_wwan: add support for ASKEY WWHC050 ASKEY WWHC050 is a mcie LTE modem. The oem configuration states: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1690 ProdID=7588 Rev=ff.ff S: Manufacturer=Android S: Product=Android S: SerialNumber=813f0eef6e6e C:* #Ifs= 6 Cfg#= 1 Atr=80 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none) E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=84(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=86(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=88(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none) E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=125us Tested on openwrt distribution. Signed-off-by: Cezary Jackiewicz Signed-off-by: Pawel Dembicki Acked-by: Bjørn Mork Signed-off-by: David S. Miller commit 0dcdf9f64028ec3b75db6b691560f8286f3898bf Author: Dan Carpenter Date: Fri Mar 20 16:21:17 2020 +0300 NFC: fdp: Fix a signedness bug in fdp_nci_send_patch() The nci_conn_max_data_pkt_payload_size() function sometimes returns -EPROTO so "max_size" needs to be signed for the error handling to work. We can make "payload_size" an int as well. Fixes: a06347c04c13 ("NFC: Add Intel Fields Peak NFC solution driver") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit dddeb30bfc43926620f954266fd12c65a7206f07 Author: Qian Cai Date: Thu Mar 19 22:54:21 2020 -0400 ipv4: fix a RCU-list lock in inet_dump_fib() There is a place, inet_dump_fib() fib_table_dump fn_trie_dump_leaf() hlist_for_each_entry_rcu() without rcu_read_lock() will trigger a warning, WARNING: suspicious RCU usage ----------------------------- net/ipv4/fib_trie.c:2216 RCU-list traversed in non-reader section!! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by ip/1923: #0: ffffffff8ce76e40 (rtnl_mutex){+.+.}, at: netlink_dump+0xd6/0x840 Call Trace: dump_stack+0xa1/0xea lockdep_rcu_suspicious+0x103/0x10d fn_trie_dump_leaf+0x581/0x590 fib_table_dump+0x15f/0x220 inet_dump_fib+0x4ad/0x5d0 netlink_dump+0x350/0x840 __netlink_dump_start+0x315/0x3e0 rtnetlink_rcv_msg+0x4d1/0x720 netlink_rcv_skb+0xf0/0x220 rtnetlink_rcv+0x15/0x20 netlink_unicast+0x306/0x460 netlink_sendmsg+0x44b/0x770 __sys_sendto+0x259/0x270 __x64_sys_sendto+0x80/0xa0 do_syscall_64+0x69/0xf4 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Fixes: 18a8021a7be3 ("net/ipv4: Plumb support for filtering route dumps") Signed-off-by: Qian Cai Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 684ac83e3699a6e1cc0abcff99e78c091491a516 Merge: 6cd6cbf593bf 0b136454741b Author: David S. Miller Date: Mon Mar 23 18:38:58 2020 -0700 Merge tag 'mlx5-fixes-2020-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2020-03-05 This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. For -stable v5.4 ('net/mlx5: DR, Fix postsend actions write length') For -stable v5.5 ('net/mlx5e: kTLS, Fix TCP seq off-by-1 issue in TX resync flow') ('net/mlx5e: Fix endianness handling in pedit mask') ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 9a293d1e21a6461a11b4217b155bf445e57f4131 Author: Mike Marciniszyn Date: Fri Mar 20 16:02:10 2020 -0400 IB/hfi1: Ensure pq is not left on waitlist The following warning can occur when a pq is left on the dmawait list and the pq is then freed: WARNING: CPU: 47 PID: 3546 at lib/list_debug.c:29 __list_add+0x65/0xc0 list_add corruption. next->prev should be prev (ffff939228da1880), but was ffff939cabb52230. (next=ffff939cabb52230). Modules linked in: mmfs26(OE) mmfslinux(OE) tracedev(OE) 8021q garp mrp ib_isert iscsi_target_mod target_core_mod crc_t10dif crct10dif_generic opa_vnic rpcrdma ib_iser libiscsi scsi_transport_iscsi ib_ipoib(OE) bridge stp llc iTCO_wdt iTCO_vendor_support intel_powerclamp coretemp intel_rapl iosf_mbi kvm_intel kvm irqbypass crct10dif_pclmul crct10dif_common crc32_pclmul ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper cryptd ast ttm drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm pcspkr joydev drm_panel_orientation_quirks i2c_i801 mei_me lpc_ich mei wmi ipmi_si ipmi_devintf ipmi_msghandler nfit libnvdimm acpi_power_meter acpi_pad hfi1(OE) rdmavt(OE) rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm ib_core binfmt_misc numatools(OE) xpmem(OE) ip_tables nfsv3 nfs_acl nfs lockd grace sunrpc fscache igb ahci libahci i2c_algo_bit dca libata ptp pps_core crc32c_intel [last unloaded: i2c_algo_bit] CPU: 47 PID: 3546 Comm: wrf.exe Kdump: loaded Tainted: G W OE ------------ 3.10.0-957.41.1.el7.x86_64 #1 Hardware name: HPE.COM HPE SGI 8600-XA730i Gen10/X11DPT-SB-SG007, BIOS SBED1229 01/22/2019 Call Trace: [] dump_stack+0x19/0x1b [] __warn+0xd8/0x100 [] warn_slowpath_fmt+0x5f/0x80 [] ? ___slab_alloc+0x24e/0x4f0 [] __list_add+0x65/0xc0 [] defer_packet_queue+0x145/0x1a0 [hfi1] [] sdma_check_progress+0x67/0xa0 [hfi1] [] sdma_send_txlist+0x432/0x550 [hfi1] [] ? kmem_cache_alloc+0x179/0x1f0 [] ? user_sdma_send_pkts+0xc3/0x1990 [hfi1] [] user_sdma_send_pkts+0x158a/0x1990 [hfi1] [] ? try_to_del_timer_sync+0x5e/0x90 [] ? __check_object_size+0x1ca/0x250 [] hfi1_user_sdma_process_request+0xd66/0x1280 [hfi1] [] hfi1_aio_write+0xca/0x120 [hfi1] [] do_sync_readv_writev+0x7b/0xd0 [] do_readv_writev+0xce/0x260 [] ? pick_next_task_fair+0x5f/0x1b0 [] ? sched_clock_cpu+0x85/0xc0 [] ? __schedule+0x13a/0x860 [] vfs_writev+0x35/0x60 [] SyS_writev+0x7f/0x110 [] system_call_fastpath+0x22/0x27 The issue happens when wait_event_interruptible_timeout() returns a value <= 0. In that case, the pq is left on the list. The code continues sending packets and potentially can complete the current request with the pq still on the dmawait list provided no descriptor shortage is seen. If the pq is torn down in that state, the sdma interrupt handler could find the now freed pq on the list with list corruption or memory corruption resulting. Fix by adding a flush routine to ensure that the pq is never on a list after processing a request. A follow-up patch series will address issues with seqlock surfaced in: https://lore.kernel.org/r/20200320003129.GP20941@ziepe.ca The seqlock use for sdma will then be converted to a spin lock since the list_empty() doesn't need the protection afforded by the sequence lock currently in use. Fixes: a0d406934a46 ("staging/rdma/hfi1: Add page lock limit check for SDMA requests") Link: https://lore.kernel.org/r/20200320200200.23203.37777.stgit@awfm-01.aw.intel.com Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 979e52ca0469fb38646bc51d26a0263a740c9f03 Merge: 16fbf79b0f83 c8cfcb78c658 Author: Linus Torvalds Date: Mon Mar 23 15:55:21 2020 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "This fixes a correctness bug in the ARM64 version of ChaCha for lib/crypto used by WireGuard" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: arm64/chacha - correctly walk through blocks commit 6cd6cbf593bfa3ae6fc3ed34ac21da4d35045425 Author: Eric Dumazet Date: Wed Mar 18 19:21:02 2020 -0700 tcp: repair: fix TCP_QUEUE_SEQ implementation When application uses TCP_QUEUE_SEQ socket option to change tp->rcv_next, we must also update tp->copied_seq. Otherwise, stuff relying on tcp_inq() being precise can eventually be confused. For example, tcp_zerocopy_receive() might crash because it does not expect tcp_recv_skb() to return NULL. We could add tests in various places to fix the issue, or simply make sure tcp_inq() wont return a random value, and leave fast path as it is. Note that this fixes ioctl(fd, SIOCINQ, &val) at the same time. Fixes: ee9952831cfd ("tcp: Initial repair mode") Fixes: 05255b823a61 ("tcp: add TCP_ZEROCOPY_RECEIVE support for zerocopy receive") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 428b8f1d9f92f838b73997adc10046d3c6e05790 Author: Nick Desaulniers Date: Mon Mar 23 12:12:43 2020 -0700 KVM: VMX: don't allow memory operands for inline asm that modifies SP THUNK_TARGET defines [thunk_target] as having "rm" input constraints when CONFIG_RETPOLINE is not set, which isn't constrained enough for this specific case. For inline assembly that modifies the stack pointer before using this input, the underspecification of constraints is dangerous, and results in an indirect call to a previously pushed flags register. In this case `entry`'s stack slot is good enough to satisfy the "m" constraint in "rm", but the inline assembly in handle_external_interrupt_irqoff() modifies the stack pointer via push+pushf before using this input, which in this case results in calling what was the previous state of the flags register, rather than `entry`. Be more specific in the constraints by requiring `entry` be in a register, and not a memory operand. Reported-by: Dmitry Vyukov Reported-by: syzbot+3f29ca2efb056a761e38@syzkaller.appspotmail.com Debugged-by: Alexander Potapenko Debugged-by: Paolo Bonzini Debugged-by: Sean Christopherson Signed-off-by: Nick Desaulniers Message-Id: <20200323191243.30002-1-ndesaulniers@google.com> Signed-off-by: Paolo Bonzini commit 0433ae556ec8fb588a0735ddb09d3eb9806df479 Author: Golan Ben Ami Date: Wed Mar 18 08:12:54 2020 +0200 iwlwifi: don't send GEO_TX_POWER_LIMIT if no wgds table The GEO_TX_POWER_LIMIT command was sent although there is no wgds table, so the fw got wrong SAR values from the driver. Fix this by avoiding sending the command if no wgds tables are available. Signed-off-by: Golan Ben Ami Fixes: 39c1a9728f93 ("iwlwifi: refactor the SAR tables from mvm to acpi") Signed-off-by: Luca Coelho Tested-By: Jonathan McDowell Tested-by: Len Brown Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20200318081237.46db40617cc6.Id5cf852ec8c5dbf20ba86bad7b165a0c828f8b2e@changeid commit cf52c8a776d1b31493a987a0fb3c4dbaa0f7f2cc Author: Luca Coelho Date: Tue Mar 17 12:33:41 2020 +0200 iwlwifi: pcie: add 0x2526/0x401* devices back to cfg detection Three devices, with PCI device ID 0x2526 and subdevice IDs 0x4010, 0x4018 and 0x401C were removed accidentally. Add them back. Reported-by: Brett Hassal Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206661 Fixes: 0b295a1eb81f ("iwlwifi: add device name to device_info") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20200317123331.16762b29f26c.I928bcaa799e7b3d33838c0667714eeb9fa665290@changeid commit edec6e015a02003c2af0ce82c54ea016b5a9e3f0 Author: He Zhe Date: Fri Mar 20 15:06:07 2020 +0800 KVM: LAPIC: Mark hrtimer for period or oneshot mode to expire in hard interrupt context apic->lapic_timer.timer was initialized with HRTIMER_MODE_ABS_HARD but started later with HRTIMER_MODE_ABS, which may cause the following warning in PREEMPT_RT kernel. WARNING: CPU: 1 PID: 2957 at kernel/time/hrtimer.c:1129 hrtimer_start_range_ns+0x348/0x3f0 CPU: 1 PID: 2957 Comm: qemu-system-x86 Not tainted 5.4.23-rt11 #1 Hardware name: Supermicro SYS-E300-9A-8C/A2SDi-8C-HLN4F, BIOS 1.1a 09/18/2018 RIP: 0010:hrtimer_start_range_ns+0x348/0x3f0 Code: 4d b8 0f 94 c1 0f b6 c9 e8 35 f1 ff ff 4c 8b 45 b0 e9 3b fd ff ff e8 d7 3f fa ff 48 98 4c 03 34 c5 a0 26 bf 93 e9 a1 fd ff ff <0f> 0b e9 fd fc ff ff 65 8b 05 fa b7 90 6d 89 c0 48 0f a3 05 60 91 RSP: 0018:ffffbc60026ffaf8 EFLAGS: 00010202 RAX: 0000000000000001 RBX: ffff9d81657d4110 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000006cc7987bcf RDI: ffff9d81657d4110 RBP: ffffbc60026ffb58 R08: 0000000000000001 R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000000 R12: 0000006cc7987bcf R13: 0000000000000000 R14: 0000006cc7987bcf R15: ffffbc60026d6a00 FS: 00007f401daed700(0000) GS:ffff9d81ffa40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000ffffffff CR3: 0000000fa7574000 CR4: 00000000003426e0 Call Trace: ? kvm_release_pfn_clean+0x22/0x60 [kvm] start_sw_timer+0x85/0x230 [kvm] ? vmx_vmexit+0x1b/0x30 [kvm_intel] kvm_lapic_switch_to_sw_timer+0x72/0x80 [kvm] vmx_pre_block+0x1cb/0x260 [kvm_intel] ? vmx_vmexit+0xf/0x30 [kvm_intel] ? vmx_vmexit+0x1b/0x30 [kvm_intel] ? vmx_vmexit+0xf/0x30 [kvm_intel] ? vmx_vmexit+0x1b/0x30 [kvm_intel] ? vmx_vmexit+0xf/0x30 [kvm_intel] ? vmx_vmexit+0x1b/0x30 [kvm_intel] ? vmx_vmexit+0xf/0x30 [kvm_intel] ? vmx_vmexit+0xf/0x30 [kvm_intel] ? vmx_vmexit+0x1b/0x30 [kvm_intel] ? vmx_vmexit+0xf/0x30 [kvm_intel] ? vmx_vmexit+0x1b/0x30 [kvm_intel] ? vmx_vmexit+0xf/0x30 [kvm_intel] ? vmx_vmexit+0x1b/0x30 [kvm_intel] ? vmx_vmexit+0xf/0x30 [kvm_intel] ? vmx_vmexit+0x1b/0x30 [kvm_intel] ? vmx_vmexit+0xf/0x30 [kvm_intel] ? vmx_sync_pir_to_irr+0x9e/0x100 [kvm_intel] ? kvm_apic_has_interrupt+0x46/0x80 [kvm] kvm_arch_vcpu_ioctl_run+0x85b/0x1fa0 [kvm] ? _raw_spin_unlock_irqrestore+0x18/0x50 ? _copy_to_user+0x2c/0x30 kvm_vcpu_ioctl+0x235/0x660 [kvm] ? rt_spin_unlock+0x2c/0x50 do_vfs_ioctl+0x3e4/0x650 ? __fget+0x7a/0xa0 ksys_ioctl+0x67/0x90 __x64_sys_ioctl+0x1a/0x20 do_syscall_64+0x4d/0x120 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f4027cc54a7 Code: 00 00 90 48 8b 05 e9 59 0c 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 b9 59 0c 00 f7 d8 64 89 01 48 RSP: 002b:00007f401dae9858 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00005558bd029690 RCX: 00007f4027cc54a7 RDX: 0000000000000000 RSI: 000000000000ae80 RDI: 000000000000000d RBP: 00007f4028b72000 R08: 00005558bc829ad0 R09: 00000000ffffffff R10: 00005558bcf90ca0 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 00005558bce1c840 --[ end trace 0000000000000002 ]-- Signed-off-by: He Zhe Message-Id: <1584687967-332859-1-git-send-email-zhe.he@windriver.com> Reviewed-by: Wanpeng Li Signed-off-by: Paolo Bonzini commit 2e2409afe5f0c284c7dfe5504058e8d115806a7d Author: Tom Lendacky Date: Fri Mar 20 11:07:07 2020 -0500 KVM: SVM: Issue WBINVD after deactivating an SEV guest Currently, CLFLUSH is used to flush SEV guest memory before the guest is terminated (or a memory hotplug region is removed). However, CLFLUSH is not enough to ensure that SEV guest tagged data is flushed from the cache. With 33af3a7ef9e6 ("KVM: SVM: Reduce WBINVD/DF_FLUSH invocations"), the original WBINVD was removed. This then exposed crashes at random times because of a cache flush race with a page that had both a hypervisor and a guest tag in the cache. Restore the WBINVD when destroying an SEV guest and add a WBINVD to the svm_unregister_enc_region() function to ensure hotplug memory is flushed when removed. The DF_FLUSH can still be avoided at this point. Fixes: 33af3a7ef9e6 ("KVM: SVM: Reduce WBINVD/DF_FLUSH invocations") Signed-off-by: Tom Lendacky Message-Id: Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit c8d6ee01449cd0d2f30410681cccb616a88f50b1 Author: Luis Henriques Date: Thu Mar 19 11:43:48 2020 +0000 ceph: fix memory leak in ceph_cleanup_snapid_map() kmemleak reports the following memory leak: unreferenced object 0xffff88821feac8a0 (size 96): comm "kworker/1:0", pid 17, jiffies 4294896362 (age 20.512s) hex dump (first 32 bytes): a0 c8 ea 1f 82 88 ff ff 00 c9 ea 1f 82 88 ff ff ................ 00 00 00 00 00 00 00 00 00 01 00 00 00 00 ad de ................ backtrace: [<00000000b3ea77fb>] ceph_get_snapid_map+0x75/0x2a0 [<00000000d4060942>] fill_inode+0xb26/0x1010 [<0000000049da6206>] ceph_readdir_prepopulate+0x389/0xc40 [<00000000e2fe2549>] dispatch+0x11ab/0x1521 [<000000007700b894>] ceph_con_workfn+0xf3d/0x3240 [<0000000039138a41>] process_one_work+0x24d/0x590 [<00000000eb751f34>] worker_thread+0x4a/0x3d0 [<000000007e8f0d42>] kthread+0xfb/0x130 [<00000000d49bd1fa>] ret_from_fork+0x3a/0x50 A kfree is missing while looping the 'to_free' list of ceph_snapid_map objects. Cc: stable@vger.kernel.org Fixes: 75c9627efb72 ("ceph: map snapid to anonymous bdev ID") Signed-off-by: Luis Henriques Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit e886274031200bb60965c1b9c49b7acda56a93bd Author: Ilya Dryomov Date: Tue Mar 10 16:19:01 2020 +0100 libceph: fix alloc_msg_with_page_vector() memory leaks Make it so that CEPH_MSG_DATA_PAGES data item can own pages, fixing a bunch of memory leaks for a page vector allocated in alloc_msg_with_page_vector(). Currently, only watch-notify messages trigger this allocation, and normally the page vector is freed either in handle_watch_notify() or by the caller of ceph_osdc_notify(). But if the message is freed before that (e.g. if the session faults while reading in the message or if the notify is stale), we leak the page vector. This was supposed to be fixed by switching to a message-owned pagelist, but that never happened. Fixes: 1907920324f1 ("libceph: support for sending notifies") Reported-by: Roman Penyaev Signed-off-by: Ilya Dryomov Reviewed-by: Roman Penyaev commit 7614209736fbc4927584d4387faade4f31444fce Author: Ilya Dryomov Date: Mon Mar 9 12:03:14 2020 +0100 ceph: check POOL_FLAG_FULL/NEARFULL in addition to OSDMAP_FULL/NEARFULL CEPH_OSDMAP_FULL/NEARFULL aren't set since mimic, so we need to consult per-pool flags as well. Unfortunately the backwards compatibility here is lacking: - the change that deprecated OSDMAP_FULL/NEARFULL went into mimic, but was guarded by require_osd_release >= RELEASE_LUMINOUS - it was subsequently backported to luminous in v12.2.2, but that makes no difference to clients that only check OSDMAP_FULL/NEARFULL because require_osd_release is not client-facing -- it is for OSDs Since all kernels are affected, the best we can do here is just start checking both map flags and pool flags and send that to stable. These checks are best effort, so take osdc->lock and look up pool flags just once. Remove the FIXME, since filesystem quotas are checked above and RADOS quotas are reflected in POOL_FLAG_FULL: when the pool reaches its quota, both POOL_FLAG_FULL and POOL_FLAG_FULL_QUOTA are set. Cc: stable@vger.kernel.org Reported-by: Yanhu Cao Signed-off-by: Ilya Dryomov Reviewed-by: Jeff Layton Acked-by: Sage Weil commit 692b65c84f0bb0ca70c11e62c865cbaf7e8e3afd Author: Mauro Carvalho Chehab Date: Tue Mar 17 15:54:22 2020 +0100 i2c: fix a doc warning Don't let non-letters inside a literal block without escaping it, as the toolchain would mis-interpret it: ./include/linux/i2c.h:518: WARNING: Inline strong start-string without end-string. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Wolfram Sang commit deeabb4c1341a12bf8b599e6a2f4cfa4fd74738c Author: Sungbo Eo Date: Sat Mar 21 23:36:53 2020 +0900 ARM: dts: oxnas: Fix clear-mask property Disable all rps-irq interrupts during driver initialization to prevent an accidental interrupt on GIC. Fixes: 84316f4ef141 ("ARM: boot: dts: Add Oxford Semiconductor OX810SE dtsi") Fixes: 38d4a53733f5 ("ARM: dts: Add support for OX820 and Pogoplug V3") Signed-off-by: Sungbo Eo Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong commit 018af9be3dd54e6f24f828966bdd873f4d63ad9b Author: Christophe JAILLET Date: Wed Mar 18 20:12:09 2020 +0100 dmaengine: ti: k3-udma-glue: Fix an error handling path in 'k3_udma_glue_cfg_rx_flow()' All but one error handling paths in the 'k3_udma_glue_cfg_rx_flow()' function 'goto err' and call 'k3_udma_glue_release_rx_flow()'. This not correct because this function has a 'channel->flows_ready--;' at the end, but 'flows_ready' has not been incremented here, when we branch to the error handling path. In order to keep a correct value in 'flows_ready', un-roll 'k3_udma_glue_release_rx_flow()', simplify it, add some labels and branch at the correct places when an error is detected. Doing so, we also NULLify 'flow->udma_rflow' in a path that was lacking it. Fixes: d70241913413 ("dmaengine: ti: k3-udma: Add glue layer for non DMAengine user") Signed-off-by: Christophe JAILLET Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200318191209.1267-1-christophe.jaillet@wanadoo.fr Signed-off-by: Vinod Koul commit 01c4df39a2bb732e0593ba3cdacc1552fd07f7b9 Author: Zhou Wang Date: Fri Mar 13 09:23:44 2020 +0800 MAINTAINERS: Add maintainer for HiSilicon DMA engine driver Add myself as the maintainer of HiSilicon DMA engine driver. Signed-off-by: Zhou Wang Link: https://lore.kernel.org/r/1584062624-196854-1-git-send-email-wangzhou1@hisilicon.com Signed-off-by: Vinod Koul commit 988aad2f111c768c66efc87d073c73ecb32b682c Author: Dave Jiang Date: Thu Mar 12 09:23:53 2020 -0700 dmaengine: idxd: fix off by one on cdev dwq refcount The refcount check for dedicated workqueue (dwq) is off by one and allows more than 1 user to open the char device. Fix check so only a single user can open the device. Fixes: 42d279f9137a ("dmaengine: idxd: add char driver to expose submission portal to userland") Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/158403020187.10208.14117394394540710774.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 16fbf79b0f83bc752cee8589279f1ebfe57b3b6e Author: Linus Torvalds Date: Sun Mar 22 18:31:56 2020 -0700 Linux 5.6-rc7 commit 55c7c0621078bd73e9d4d2a11eb36e61bc6fe998 Author: Nicolas Saenz Julienne Date: Thu Mar 19 20:00:13 2020 +0100 ARM: dts: bcm283x: Fix vc4's firmware bus DMA limitations The bus is virtual and devices have to inherit their DMA constraints from the underlying interconnect. So add an empty dma-ranges property to the bus node, implying the firmware bus' DMA constraints are identical to its parent's. Fixes: 7dbe8c62ceeb ("ARM: dts: Add minimal Raspberry Pi 4 support") Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Florian Fainelli commit 67d584e33e54c3f33c8541928aa7115388c97433 Merge: b3c03db67e84 d8e6fd5c7991 Author: Linus Torvalds Date: Sun Mar 22 11:35:33 2020 -0700 Merge tag 'for-5.6-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Two fixes. The first is a regression: when dropping some incompat bits the conditions were reversed. The other is a fix for rename whiteout potentially leaving stack memory linked to a list" * tag 'for-5.6-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix removal of raid[56|1c34} incompat flags after removing block group btrfs: fix log context list corruption after rename whiteout error commit b3c03db67e844bb418e50c3e4de12eb11763e425 Merge: b74b991fb8b9 763802b53a42 Author: Linus Torvalds Date: Sun Mar 22 10:46:50 2020 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "10 fixes" * emailed patches from Andrew Morton : x86/mm: split vmalloc_sync_all() mm, slub: prevent kmalloc_node crashes and memory leaks mm/mmu_notifier: silence PROVE_RCU_LIST warnings epoll: fix possible lost wakeup on epoll_ctl() path mm: do not allow MADV_PAGEOUT for CoW pages mm, memcg: throttle allocators based on ancestral memory.high mm, memcg: fix corruption on 64-bit divisor in memory.high throttling page-flags: fix a crash at SetPageError(THP_SWAP) mm/hotplug: fix hot remove failure in SPARSEMEM|!VMEMMAP case memcg: fix NULL pointer dereference in __mem_cgroup_usage_unregister_event commit e1b9f99ff8c40bba6e59de9ad4a659447b1e4112 Author: Chuhong Yuan Date: Mon Nov 4 23:00:48 2019 +0800 i2c: hix5hd2: add missed clk_disable_unprepare in remove The driver forgets to disable and unprepare clk when remove. Add a call to clk_disable_unprepare to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Wolfram Sang Cc: stable@kernel.org commit 83a9b6f639e9f6b632337f9776de17d51d969c77 Author: Alan Maguire Date: Wed Mar 18 18:53:21 2020 +0000 selftests/net: add definition for SOL_DCCP to fix compilation errors for old libc Many systems build/test up-to-date kernels with older libcs, and an older glibc (2.17) lacks the definition of SOL_DCCP in /usr/include/bits/socket.h (it was added in the 4.6 timeframe). Adding the definition to the test program avoids a compilation failure that gets in the way of building tools/testing/selftests/net. The test itself will work once the definition is added; either skipping due to DCCP not being configured in the kernel under test or passing, so there are no other more up-to-date glibc dependencies here it seems beyond that missing definition. Fixes: 11fb60d1089f ("selftests: net: reuseport_addr_any: add DCCP") Signed-off-by: Alan Maguire Signed-off-by: David S. Miller commit 9a9ba2a4aaaa4e75a5f118b8ab642a55c34f95cb Author: Doug Berger Date: Tue Mar 17 17:05:36 2020 -0700 net: bcmgenet: always enable status blocks The hardware offloading of the NETIF_F_HW_CSUM and NETIF_F_RXCSUM features requires the use of Transmit Status Blocks before transmit frame data and Receive Status Blocks before receive frame data to carry the checksum information. Unfortunately, these status blocks are currently only enabled when the NETIF_F_HW_CSUM feature is enabled. As a result NETIF_F_RXCSUM will not actually be offloaded to the hardware unless both it and NETIF_F_HW_CSUM are enabled. Fortunately, that is the default configuration. This commit addresses this issue by always enabling the use of status blocks on both transmit and receive frames. Further, it replaces the use of a dedicated flag within the driver private data structure with direct use of the netdev features flags. Fixes: 810155397890 ("net: bcmgenet: use CHECKSUM_COMPLETE for NETIF_F_RXCSUM") Signed-off-by: Doug Berger Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 749f6f6843115b424680f1aada3c0dd613ad807c Author: Grygorii Strashko Date: Tue Mar 17 20:04:54 2020 +0200 net: phy: dp83867: w/a for fld detect threshold bootstrapping issue When the DP83867 PHY is strapped to enable Fast Link Drop (FLD) feature STRAP_STS2.STRAP_ FLD (reg 0x006F bit 10), the Energy Lost Threshold for FLD Energy Lost Mode FLD_THR_CFG.ENERGY_LOST_FLD_THR (reg 0x002e bits 2:0) will be defaulted to 0x2. This may cause the phy link to be unstable. The new DP83867 DM recommends to always restore ENERGY_LOST_FLD_THR to 0x1. Hence, restore default value of FLD_THR_CFG.ENERGY_LOST_FLD_THR to 0x1 when FLD is enabled by bootstrapping as recommended by DM. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 9de9aa487daff7a5c73434c24269b44ed6a428e6 Author: Emil Renner Berthing Date: Sat Mar 21 15:36:19 2020 +0100 net: stmmac: dwmac-rk: fix error path in rk_gmac_probe Make sure we clean up devicetree related configuration also when clock init fails. Fixes: fecd4d7eef8b ("net: stmmac: dwmac-rk: Add integrated PHY support") Signed-off-by: Emil Renner Berthing Signed-off-by: David S. Miller commit 2091a3d42b4f339eaeed11228e0cbe9d4f92f558 Author: Oliver Hartkopp Date: Sat Mar 21 14:08:29 2020 +0100 slcan: not call free_netdev before rtnl_unlock in slcan_open As the description before netdev_run_todo, we cannot call free_netdev before rtnl_unlock, fix it by reorder the code. This patch is a 1:1 copy of upstream slip.c commit f596c87005f7 ("slip: not call free_netdev before rtnl_unlock in slip_open"). Reported-by: yangerkun Signed-off-by: Oliver Hartkopp Signed-off-by: David S. Miller commit 06e9bfc1e57daeead541c9f02968412cd284b189 Author: Lukas Bulwahn Date: Sat Mar 21 13:05:14 2020 +0100 ionic: make spdxcheck.py happy Headers ionic_if.h and ionic_regs.h are licensed under three alternative licenses and the used SPDX-License-Identifier expression makes ./scripts/spdxcheck.py complain: drivers/net/ethernet/pensando/ionic/ionic_if.h: 1:52 Syntax error: OR drivers/net/ethernet/pensando/ionic/ionic_regs.h: 1:52 Syntax error: OR As OR is associative, it is irrelevant if the parentheses are put around the first or the second OR-expression. Simply add parentheses to make spdxcheck.py happy. Signed-off-by: Lukas Bulwahn Acked-by: Shannon Nelson Signed-off-by: David S. Miller commit 3a303cfdd28d5f930a307c82e8a9d996394d5ebd Author: Taehee Yoo Date: Sat Mar 21 06:46:50 2020 +0000 hsr: fix general protection fault in hsr_addr_is_self() The port->hsr is used in the hsr_handle_frame(), which is a callback of rx_handler. hsr master and slaves are initialized in hsr_add_port(). This function initializes several pointers, which includes port->hsr after registering rx_handler. So, in the rx_handler routine, un-initialized pointer would be used. In order to fix this, pointers should be initialized before registering rx_handler. Test commands: ip netns del left ip netns del right modprobe -rv veth modprobe -rv hsr killall ping modprobe hsr ip netns add left ip netns add right ip link add veth0 type veth peer name veth1 ip link add veth2 type veth peer name veth3 ip link add veth4 type veth peer name veth5 ip link set veth1 netns left ip link set veth3 netns right ip link set veth4 netns left ip link set veth5 netns right ip link set veth0 up ip link set veth2 up ip link set veth0 address fc:00:00:00:00:01 ip link set veth2 address fc:00:00:00:00:02 ip netns exec left ip link set veth1 up ip netns exec left ip link set veth4 up ip netns exec right ip link set veth3 up ip netns exec right ip link set veth5 up ip link add hsr0 type hsr slave1 veth0 slave2 veth2 ip a a 192.168.100.1/24 dev hsr0 ip link set hsr0 up ip netns exec left ip link add hsr1 type hsr slave1 veth1 slave2 veth4 ip netns exec left ip a a 192.168.100.2/24 dev hsr1 ip netns exec left ip link set hsr1 up ip netns exec left ip n a 192.168.100.1 dev hsr1 lladdr \ fc:00:00:00:00:01 nud permanent ip netns exec left ip n r 192.168.100.1 dev hsr1 lladdr \ fc:00:00:00:00:01 nud permanent for i in {1..100} do ip netns exec left ping 192.168.100.1 & done ip netns exec left hping3 192.168.100.1 -2 --flood & ip netns exec right ip link add hsr2 type hsr slave1 veth3 slave2 veth5 ip netns exec right ip a a 192.168.100.3/24 dev hsr2 ip netns exec right ip link set hsr2 up ip netns exec right ip n a 192.168.100.1 dev hsr2 lladdr \ fc:00:00:00:00:02 nud permanent ip netns exec right ip n r 192.168.100.1 dev hsr2 lladdr \ fc:00:00:00:00:02 nud permanent for i in {1..100} do ip netns exec right ping 192.168.100.1 & done ip netns exec right hping3 192.168.100.1 -2 --flood & while : do ip link add hsr0 type hsr slave1 veth0 slave2 veth2 ip a a 192.168.100.1/24 dev hsr0 ip link set hsr0 up ip link del hsr0 done Splat looks like: [ 120.954938][ C0] general protection fault, probably for non-canonical address 0xdffffc0000000006: 0000 [#1]I [ 120.957761][ C0] KASAN: null-ptr-deref in range [0x0000000000000030-0x0000000000000037] [ 120.959064][ C0] CPU: 0 PID: 1511 Comm: hping3 Not tainted 5.6.0-rc5+ #460 [ 120.960054][ C0] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 120.962261][ C0] RIP: 0010:hsr_addr_is_self+0x65/0x2a0 [hsr] [ 120.963149][ C0] Code: 44 24 18 70 73 2f c0 48 c1 eb 03 48 8d 04 13 c7 00 f1 f1 f1 f1 c7 40 04 00 f2 f2 f2 4 [ 120.966277][ C0] RSP: 0018:ffff8880d9c09af0 EFLAGS: 00010206 [ 120.967293][ C0] RAX: 0000000000000006 RBX: 1ffff1101b38135f RCX: 0000000000000000 [ 120.968516][ C0] RDX: dffffc0000000000 RSI: ffff8880d17cb208 RDI: 0000000000000000 [ 120.969718][ C0] RBP: 0000000000000030 R08: ffffed101b3c0e3c R09: 0000000000000001 [ 120.972203][ C0] R10: 0000000000000001 R11: ffffed101b3c0e3b R12: 0000000000000000 [ 120.973379][ C0] R13: ffff8880aaf80100 R14: ffff8880aaf800f2 R15: ffff8880aaf80040 [ 120.974410][ C0] FS: 00007f58e693f740(0000) GS:ffff8880d9c00000(0000) knlGS:0000000000000000 [ 120.979794][ C0] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 120.980773][ C0] CR2: 00007ffcb8b38f29 CR3: 00000000afe8e001 CR4: 00000000000606f0 [ 120.981945][ C0] Call Trace: [ 120.982411][ C0] [ 120.982848][ C0] ? hsr_add_node+0x8c0/0x8c0 [hsr] [ 120.983522][ C0] ? rcu_read_lock_held+0x90/0xa0 [ 120.984159][ C0] ? rcu_read_lock_sched_held+0xc0/0xc0 [ 120.984944][ C0] hsr_handle_frame+0x1db/0x4e0 [hsr] [ 120.985597][ C0] ? hsr_nl_nodedown+0x2b0/0x2b0 [hsr] [ 120.986289][ C0] __netif_receive_skb_core+0x6bf/0x3170 [ 120.992513][ C0] ? check_chain_key+0x236/0x5d0 [ 120.993223][ C0] ? do_xdp_generic+0x1460/0x1460 [ 120.993875][ C0] ? register_lock_class+0x14d0/0x14d0 [ 120.994609][ C0] ? __netif_receive_skb_one_core+0x8d/0x160 [ 120.995377][ C0] __netif_receive_skb_one_core+0x8d/0x160 [ 120.996204][ C0] ? __netif_receive_skb_core+0x3170/0x3170 [ ... ] Reported-by: syzbot+fcf5dd39282ceb27108d@syzkaller.appspotmail.com Fixes: c5a759117210 ("net/hsr: Use list_head (and rcu) instead of array for slave devices.") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 4abe5a1b9661b1c393082c11924e55c680c6ca8b Merge: 07f8e4d0fddb 7296695fc16d Author: David S. Miller Date: Sat Mar 21 19:44:23 2020 -0700 Merge branch 'hinic-BugFixes' Luo bin says: ==================== hinic: BugFixes Fix a number of bugs which have been present since the first commit. The bugs fixed in these patchs are hardly exposed unless given very specific conditions. ==================== Signed-off-by: David S. Miller commit 7296695fc16dd1761dbba8b68a9181c71cef0633 Author: Luo bin Date: Fri Mar 20 23:13:20 2020 +0000 hinic: fix wrong value of MIN_SKB_LEN the minimum value of skb len that hw supports is 32 rather than 17 Signed-off-by: Luo bin Signed-off-by: David S. Miller commit 0da7c322f116210ebfdda59c7da663a6fc5e9cc8 Author: Luo bin Date: Fri Mar 20 23:13:19 2020 +0000 hinic: fix wrong para of wait_for_completion_timeout the second input parameter of wait_for_completion_timeout should be jiffies instead of millisecond Signed-off-by: Luo bin Signed-off-by: David S. Miller commit 33f15da216a1f4566b4ec880942556ace30615df Author: Luo bin Date: Fri Mar 20 23:13:18 2020 +0000 hinic: fix out-of-order excution in arm cpu add read barrier in driver code to keep from reading other fileds in dma memory which is writable for hw until we have verified the memory is valid for driver Signed-off-by: Luo bin Signed-off-by: David S. Miller commit 614eaa943e9fc3fcdbd4aa0692ae84973d363333 Author: Luo bin Date: Fri Mar 20 23:13:17 2020 +0000 hinic: fix the bug of clearing event queue should disable eq irq before freeing it, must clear event queue depth in hw before freeing relevant memory to avoid illegal memory access and update consumer idx to avoid invalid interrupt Signed-off-by: Luo bin Signed-off-by: David S. Miller commit 96758117dc528e6d84bd23d205e8cf7f31eda029 Author: Luo bin Date: Fri Mar 20 23:13:16 2020 +0000 hinic: fix a bug of waitting for IO stopped it's unreliable for fw to check whether IO is stopped, so driver wait for enough time to ensure IO process is done in hw before freeing resources Signed-off-by: Luo bin Signed-off-by: David S. Miller commit 763802b53a427ed3cbd419dbba255c414fdd9e7c Author: Joerg Roedel Date: Sat Mar 21 18:22:41 2020 -0700 x86/mm: split vmalloc_sync_all() Commit 3f8fd02b1bf1 ("mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()") introduced a call to vmalloc_sync_all() in the vunmap() code-path. While this change was necessary to maintain correctness on x86-32-pae kernels, it also adds additional cycles for architectures that don't need it. Specifically on x86-64 with CONFIG_VMAP_STACK=y some people reported severe performance regressions in micro-benchmarks because it now also calls the x86-64 implementation of vmalloc_sync_all() on vunmap(). But the vmalloc_sync_all() implementation on x86-64 is only needed for newly created mappings. To avoid the unnecessary work on x86-64 and to gain the performance back, split up vmalloc_sync_all() into two functions: * vmalloc_sync_mappings(), and * vmalloc_sync_unmappings() Most call-sites to vmalloc_sync_all() only care about new mappings being synchronized. The only exception is the new call-site added in the above mentioned commit. Shile Zhang directed us to a report of an 80% regression in reaim throughput. Fixes: 3f8fd02b1bf1 ("mm/vmalloc: Sync unmappings in __purge_vmap_area_lazy()") Reported-by: kernel test robot Reported-by: Shile Zhang Signed-off-by: Joerg Roedel Signed-off-by: Andrew Morton Tested-by: Borislav Petkov Acked-by: Rafael J. Wysocki [GHES] Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Link: http://lkml.kernel.org/r/20191009124418.8286-1-joro@8bytes.org Link: https://lists.01.org/hyperkitty/list/lkp@lists.01.org/thread/4D3JPPHBNOSPFK2KEPC6KGKS6J25AIDB/ Link: http://lkml.kernel.org/r/20191113095530.228959-1-shile.zhang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 0715e6c516f106ed553828a671d30ad9a3431536 Author: Vlastimil Babka Date: Sat Mar 21 18:22:37 2020 -0700 mm, slub: prevent kmalloc_node crashes and memory leaks Sachin reports [1] a crash in SLUB __slab_alloc(): BUG: Kernel NULL pointer dereference on read at 0x000073b0 Faulting instruction address: 0xc0000000003d55f4 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries Modules linked in: CPU: 19 PID: 1 Comm: systemd Not tainted 5.6.0-rc2-next-20200218-autotest #1 NIP: c0000000003d55f4 LR: c0000000003d5b94 CTR: 0000000000000000 REGS: c0000008b37836d0 TRAP: 0300 Not tainted (5.6.0-rc2-next-20200218-autotest) MSR: 8000000000009033 CR: 24004844 XER: 00000000 CFAR: c00000000000dec4 DAR: 00000000000073b0 DSISR: 40000000 IRQMASK: 1 GPR00: c0000000003d5b94 c0000008b3783960 c00000000155d400 c0000008b301f500 GPR04: 0000000000000dc0 0000000000000002 c0000000003443d8 c0000008bb398620 GPR08: 00000008ba2f0000 0000000000000001 0000000000000000 0000000000000000 GPR12: 0000000024004844 c00000001ec52a00 0000000000000000 0000000000000000 GPR16: c0000008a1b20048 c000000001595898 c000000001750c18 0000000000000002 GPR20: c000000001750c28 c000000001624470 0000000fffffffe0 5deadbeef0000122 GPR24: 0000000000000001 0000000000000dc0 0000000000000002 c0000000003443d8 GPR28: c0000008b301f500 c0000008bb398620 0000000000000000 c00c000002287180 NIP ___slab_alloc+0x1f4/0x760 LR __slab_alloc+0x34/0x60 Call Trace: ___slab_alloc+0x334/0x760 (unreliable) __slab_alloc+0x34/0x60 __kmalloc_node+0x110/0x490 kvmalloc_node+0x58/0x110 mem_cgroup_css_online+0x108/0x270 online_css+0x48/0xd0 cgroup_apply_control_enable+0x2ec/0x4d0 cgroup_mkdir+0x228/0x5f0 kernfs_iop_mkdir+0x90/0xf0 vfs_mkdir+0x110/0x230 do_mkdirat+0xb0/0x1a0 system_call+0x5c/0x68 This is a PowerPC platform with following NUMA topology: available: 2 nodes (0-1) node 0 cpus: node 0 size: 0 MB node 0 free: 0 MB node 1 cpus: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 node 1 size: 35247 MB node 1 free: 30907 MB node distances: node 0 1 0: 10 40 1: 40 10 possible numa nodes: 0-31 This only happens with a mmotm patch "mm/memcontrol.c: allocate shrinker_map on appropriate NUMA node" [2] which effectively calls kmalloc_node for each possible node. SLUB however only allocates kmem_cache_node on online N_NORMAL_MEMORY nodes, and relies on node_to_mem_node to return such valid node for other nodes since commit a561ce00b09e ("slub: fall back to node_to_mem_node() node if allocating on memoryless node"). This is however not true in this configuration where the _node_numa_mem_ array is not initialized for nodes 0 and 2-31, thus it contains zeroes and get_partial() ends up accessing non-allocated kmem_cache_node. A related issue was reported by Bharata (originally by Ramachandran) [3] where a similar PowerPC configuration, but with mainline kernel without patch [2] ends up allocating large amounts of pages by kmalloc-1k kmalloc-512. This seems to have the same underlying issue with node_to_mem_node() not behaving as expected, and might probably also lead to an infinite loop with CONFIG_SLUB_CPU_PARTIAL [4]. This patch should fix both issues by not relying on node_to_mem_node() anymore and instead simply falling back to NUMA_NO_NODE, when kmalloc_node(node) is attempted for a node that's not online, or has no usable memory. The "usable memory" condition is also changed from node_present_pages() to N_NORMAL_MEMORY node state, as that is exactly the condition that SLUB uses to allocate kmem_cache_node structures. The check in get_partial() is removed completely, as the checks in ___slab_alloc() are now sufficient to prevent get_partial() being reached with an invalid node. [1] https://lore.kernel.org/linux-next/3381CD91-AB3D-4773-BA04-E7A072A63968@linux.vnet.ibm.com/ [2] https://lore.kernel.org/linux-mm/fff0e636-4c36-ed10-281c-8cdb0687c839@virtuozzo.com/ [3] https://lore.kernel.org/linux-mm/20200317092624.GB22538@in.ibm.com/ [4] https://lore.kernel.org/linux-mm/088b5996-faae-8a56-ef9c-5b567125ae54@suse.cz/ Fixes: a561ce00b09e ("slub: fall back to node_to_mem_node() node if allocating on memoryless node") Reported-by: Sachin Sant Reported-by: PUVICHAKRAVARTHY RAMACHANDRAN Signed-off-by: Vlastimil Babka Signed-off-by: Andrew Morton Tested-by: Sachin Sant Tested-by: Bharata B Rao Reviewed-by: Srikar Dronamraju Cc: Mel Gorman Cc: Michael Ellerman Cc: Michal Hocko Cc: Christopher Lameter Cc: linuxppc-dev@lists.ozlabs.org Cc: Joonsoo Kim Cc: Pekka Enberg Cc: David Rientjes Cc: Kirill Tkhai Cc: Vlastimil Babka Cc: Nathan Lynch Cc: Link: http://lkml.kernel.org/r/20200320115533.9604-1-vbabka@suse.cz Debugged-by: Srikar Dronamraju Signed-off-by: Linus Torvalds commit 63886bad904b73f7470fd582fbc41c5ae04d6785 Author: Qian Cai Date: Sat Mar 21 18:22:34 2020 -0700 mm/mmu_notifier: silence PROVE_RCU_LIST warnings It is safe to traverse mm->notifier_subscriptions->list either under SRCU read lock or mm->notifier_subscriptions->lock using hlist_for_each_entry_rcu(). Silence the PROVE_RCU_LIST false positives, for example, WARNING: suspicious RCU usage ----------------------------- mm/mmu_notifier.c:484 RCU-list traversed in non-reader section!! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 3 locks held by libvirtd/802: #0: ffff9321e3f58148 (&mm->mmap_sem#2){++++}, at: do_mprotect_pkey+0xe1/0x3e0 #1: ffffffff91ae6160 (mmu_notifier_invalidate_range_start){+.+.}, at: change_p4d_range+0x5fa/0x800 #2: ffffffff91ae6e08 (srcu){....}, at: __mmu_notifier_invalidate_range_start+0x178/0x460 stack backtrace: CPU: 7 PID: 802 Comm: libvirtd Tainted: G I 5.6.0-rc6-next-20200317+ #2 Hardware name: HP ProLiant BL460c Gen8, BIOS I31 11/02/2014 Call Trace: dump_stack+0xa4/0xfe lockdep_rcu_suspicious+0xeb/0xf5 __mmu_notifier_invalidate_range_start+0x3ff/0x460 change_p4d_range+0x746/0x800 change_protection+0x1df/0x300 mprotect_fixup+0x245/0x3e0 do_mprotect_pkey+0x23b/0x3e0 __x64_sys_mprotect+0x51/0x70 do_syscall_64+0x91/0xae8 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Reviewed-by: Paul E. McKenney Reviewed-by: Jason Gunthorpe Link: http://lkml.kernel.org/r/20200317175640.2047-1-cai@lca.pw Signed-off-by: Linus Torvalds commit 1b53734bd0b2feed8e7761771b2e76fc9126ea0c Author: Roman Penyaev Date: Sat Mar 21 18:22:30 2020 -0700 epoll: fix possible lost wakeup on epoll_ctl() path This fixes possible lost wakeup introduced by commit a218cc491420. Originally modifications to ep->wq were serialized by ep->wq.lock, but in commit a218cc491420 ("epoll: use rwlock in order to reduce ep_poll_callback() contention") a new rw lock was introduced in order to relax fd event path, i.e. callers of ep_poll_callback() function. After the change ep_modify and ep_insert (both are called on epoll_ctl() path) were switched to ep->lock, but ep_poll (epoll_wait) was using ep->wq.lock on wqueue list modification. The bug doesn't lead to any wqueue list corruptions, because wake up path and list modifications were serialized by ep->wq.lock internally, but actual waitqueue_active() check prior wake_up() call can be reordered with modifications of ep ready list, thus wake up can be lost. And yes, can be healed by explicit smp_mb(): list_add_tail(&epi->rdlink, &ep->rdllist); smp_mb(); if (waitqueue_active(&ep->wq)) wake_up(&ep->wp); But let's make it simple, thus current patch replaces ep->wq.lock with the ep->lock for wqueue modifications, thus wake up path always observes activeness of the wqueue correcty. Fixes: a218cc491420 ("epoll: use rwlock in order to reduce ep_poll_callback() contention") Reported-by: Max Neunhoeffer Signed-off-by: Roman Penyaev Signed-off-by: Andrew Morton Tested-by: Max Neunhoeffer Cc: Jakub Kicinski Cc: Christopher Kohlhoff Cc: Davidlohr Bueso Cc: Jason Baron Cc: Jes Sorensen Cc: [5.1+] Link: http://lkml.kernel.org/r/20200214170211.561524-1-rpenyaev@suse.de References: https://bugzilla.kernel.org/show_bug.cgi?id=205933 Bisected-by: Max Neunhoeffer Signed-off-by: Linus Torvalds commit 12e967fd8e4e6c3d275b4c69c890adc838891300 Author: Michal Hocko Date: Sat Mar 21 18:22:26 2020 -0700 mm: do not allow MADV_PAGEOUT for CoW pages Jann has brought up a very interesting point [1]. While shared pages are excluded from MADV_PAGEOUT normally, CoW pages can be easily reclaimed that way. This can lead to all sorts of hard to debug problems. E.g. performance problems outlined by Daniel [2]. There are runtime environments where there is a substantial memory shared among security domains via CoW memory and a easy to reclaim way of that memory, which MADV_{COLD,PAGEOUT} offers, can lead to either performance degradation in for the parent process which might be more privileged or even open side channel attacks. The feasibility of the latter is not really clear to me TBH but there is no real reason for exposure at this stage. It seems there is no real use case to depend on reclaiming CoW memory via madvise at this stage so it is much easier to simply disallow it and this is what this patch does. Put it simply MADV_{PAGEOUT,COLD} can operate only on the exclusively owned memory which is a straightforward semantic. [1] http://lkml.kernel.org/r/CAG48ez0G3JkMq61gUmyQAaCq=_TwHbi1XKzWRooxZkv08PQKuw@mail.gmail.com [2] http://lkml.kernel.org/r/CAKOZueua_v8jHCpmEtTB6f3i9e2YnmX4mqdYVWhV4E=Z-n+zRQ@mail.gmail.com Fixes: 9c276cc65a58 ("mm: introduce MADV_COLD") Reported-by: Jann Horn Signed-off-by: Michal Hocko Signed-off-by: Andrew Morton Acked-by: Vlastimil Babka Cc: Minchan Kim Cc: Daniel Colascione Cc: Dave Hansen Cc: "Joel Fernandes (Google)" Cc: Link: http://lkml.kernel.org/r/20200312082248.GS23944@dhcp22.suse.cz Signed-off-by: Linus Torvalds commit e26733e0d0ec6798eca93daa300bc3f43616127f Author: Chris Down Date: Sat Mar 21 18:22:23 2020 -0700 mm, memcg: throttle allocators based on ancestral memory.high Prior to this commit, we only directly check the affected cgroup's memory.high against its usage. However, it's possible that we are being reclaimed as a result of hitting an ancestor memory.high and should be penalised based on that, instead. This patch changes memory.high overage throttling to use the largest overage in its ancestors when considering how many penalty jiffies to charge. This makes sure that we penalise poorly behaving cgroups in the same way regardless of at what level of the hierarchy memory.high was breached. Fixes: 0e4b01df8659 ("mm, memcg: throttle allocators when failing reclaim over memory.high") Reported-by: Johannes Weiner Signed-off-by: Chris Down Signed-off-by: Andrew Morton Acked-by: Johannes Weiner Cc: Tejun Heo Cc: Michal Hocko Cc: Nathan Chancellor Cc: Roman Gushchin Cc: [5.4.x+] Link: http://lkml.kernel.org/r/8cd132f84bd7e16cdb8fde3378cdbf05ba00d387.1584036142.git.chris@chrisdown.name Signed-off-by: Linus Torvalds commit d397a45fc741c80c32a14e2de008441e9976f50c Author: Chris Down Date: Sat Mar 21 18:22:20 2020 -0700 mm, memcg: fix corruption on 64-bit divisor in memory.high throttling Commit 0e4b01df8659 had a bunch of fixups to use the right division method. However, it seems that after all that it still wasn't right -- div_u64 takes a 32-bit divisor. The headroom is still large (2^32 pages), so on mundane systems you won't hit this, but this should definitely be fixed. Fixes: 0e4b01df8659 ("mm, memcg: throttle allocators when failing reclaim over memory.high") Reported-by: Johannes Weiner Signed-off-by: Chris Down Signed-off-by: Andrew Morton Acked-by: Johannes Weiner Cc: Tejun Heo Cc: Roman Gushchin Cc: Michal Hocko Cc: Nathan Chancellor Cc: [5.4.x+] Link: http://lkml.kernel.org/r/80780887060514967d414b3cd91f9a316a16ab98.1584036142.git.chris@chrisdown.name Signed-off-by: Linus Torvalds commit d72520ad004a8ce18a6ba6cde317f0081b27365a Author: Qian Cai Date: Sat Mar 21 18:22:17 2020 -0700 page-flags: fix a crash at SetPageError(THP_SWAP) Commit bd4c82c22c36 ("mm, THP, swap: delay splitting THP after swapped out") supported writing THP to a swap device but forgot to upgrade an older commit df8c94d13c7e ("page-flags: define behavior of FS/IO-related flags on compound pages") which could trigger a crash during THP swapping out with DEBUG_VM_PGFLAGS=y, kernel BUG at include/linux/page-flags.h:317! page dumped because: VM_BUG_ON_PAGE(1 && PageCompound(page)) page:fffff3b2ec3a8000 refcount:512 mapcount:0 mapping:000000009eb0338c index:0x7f6e58200 head:fffff3b2ec3a8000 order:9 compound_mapcount:0 compound_pincount:0 anon flags: 0x45fffe0000d8454(uptodate|lru|workingset|owner_priv_1|writeback|head|reclaim|swapbacked) end_swap_bio_write() SetPageError(page) VM_BUG_ON_PAGE(1 && PageCompound(page)) bio_endio+0x297/0x560 dec_pending+0x218/0x430 [dm_mod] clone_endio+0xe4/0x2c0 [dm_mod] bio_endio+0x297/0x560 blk_update_request+0x201/0x920 scsi_end_request+0x6b/0x4b0 scsi_io_completion+0x509/0x7e0 scsi_finish_command+0x1ed/0x2a0 scsi_softirq_done+0x1c9/0x1d0 __blk_mqnterrupt+0xf/0x20 Fix by checking PF_NO_TAIL in those places instead. Fixes: bd4c82c22c36 ("mm, THP, swap: delay splitting THP after swapped out") Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Acked-by: "Huang, Ying" Acked-by: Rafael Aquini Cc: Link: http://lkml.kernel.org/r/20200310235846.1319-1-cai@lca.pw Signed-off-by: Linus Torvalds commit d41e2f3bd54699f85b3d6f45abd09fa24a222cb9 Author: Baoquan He Date: Sat Mar 21 18:22:13 2020 -0700 mm/hotplug: fix hot remove failure in SPARSEMEM|!VMEMMAP case In section_deactivate(), pfn_to_page() doesn't work any more after ms->section_mem_map is resetting to NULL in SPARSEMEM|!VMEMMAP case. It causes a hot remove failure: kernel BUG at mm/page_alloc.c:4806! invalid opcode: 0000 [#1] SMP PTI CPU: 3 PID: 8 Comm: kworker/u16:0 Tainted: G W 5.5.0-next-20200205+ #340 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 Workqueue: kacpi_hotplug acpi_hotplug_work_fn RIP: 0010:free_pages+0x85/0xa0 Call Trace: __remove_pages+0x99/0xc0 arch_remove_memory+0x23/0x4d try_remove_memory+0xc8/0x130 __remove_memory+0xa/0x11 acpi_memory_device_remove+0x72/0x100 acpi_bus_trim+0x55/0x90 acpi_device_hotplug+0x2eb/0x3d0 acpi_hotplug_work_fn+0x1a/0x30 process_one_work+0x1a7/0x370 worker_thread+0x30/0x380 kthread+0x112/0x130 ret_from_fork+0x35/0x40 Let's move the ->section_mem_map resetting after depopulate_section_memmap() to fix it. [akpm@linux-foundation.org: remove unneeded initialization, per David] Fixes: ba72b4c8cf60 ("mm/sparsemem: support sub-section hotplug") Signed-off-by: Baoquan He Signed-off-by: Andrew Morton Reviewed-by: Pankaj Gupta Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Cc: Wei Yang Cc: Oscar Salvador Cc: Mike Rapoport Cc: Link: http://lkml.kernel.org/r/20200307084229.28251-2-bhe@redhat.com Signed-off-by: Linus Torvalds commit 7d36665a5886c27ca4c4d0afd3ecc50b400f3587 Author: Chunguang Xu Date: Sat Mar 21 18:22:10 2020 -0700 memcg: fix NULL pointer dereference in __mem_cgroup_usage_unregister_event An eventfd monitors multiple memory thresholds of the cgroup, closes them, the kernel deletes all events related to this eventfd. Before all events are deleted, another eventfd monitors the memory threshold of this cgroup, leading to a crash: BUG: kernel NULL pointer dereference, address: 0000000000000004 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 800000033058e067 P4D 800000033058e067 PUD 3355ce067 PMD 0 Oops: 0002 [#1] SMP PTI CPU: 2 PID: 14012 Comm: kworker/2:6 Kdump: loaded Not tainted 5.6.0-rc4 #3 Hardware name: LENOVO 20AWS01K00/20AWS01K00, BIOS GLET70WW (2.24 ) 05/21/2014 Workqueue: events memcg_event_remove RIP: 0010:__mem_cgroup_usage_unregister_event+0xb3/0x190 RSP: 0018:ffffb47e01c4fe18 EFLAGS: 00010202 RAX: 0000000000000001 RBX: ffff8bb223a8a000 RCX: 0000000000000001 RDX: 0000000000000001 RSI: ffff8bb22fb83540 RDI: 0000000000000001 RBP: ffffb47e01c4fe48 R08: 0000000000000000 R09: 0000000000000010 R10: 000000000000000c R11: 071c71c71c71c71c R12: ffff8bb226aba880 R13: ffff8bb223a8a480 R14: 0000000000000000 R15: 0000000000000000 FS:  0000000000000000(0000) GS:ffff8bb242680000(0000) knlGS:0000000000000000 CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000004 CR3: 000000032c29c003 CR4: 00000000001606e0 Call Trace: memcg_event_remove+0x32/0x90 process_one_work+0x172/0x380 worker_thread+0x49/0x3f0 kthread+0xf8/0x130 ret_from_fork+0x35/0x40 CR2: 0000000000000004 We can reproduce this problem in the following ways: 1. We create a new cgroup subdirectory and a new eventfd, and then we monitor multiple memory thresholds of the cgroup through this eventfd. 2. closing this eventfd, and __mem_cgroup_usage_unregister_event () will be called multiple times to delete all events related to this eventfd. The first time __mem_cgroup_usage_unregister_event() is called, the kernel will clear all items related to this eventfd in thresholds-> primary. Since there is currently only one eventfd, thresholds-> primary becomes empty, so the kernel will set thresholds-> primary and hresholds-> spare to NULL. If at this time, the user creates a new eventfd and monitor the memory threshold of this cgroup, kernel will re-initialize thresholds-> primary. Then when __mem_cgroup_usage_unregister_event () is called for the second time, because thresholds-> primary is not empty, the system will access thresholds-> spare, but thresholds-> spare is NULL, which will trigger a crash. In general, the longer it takes to delete all events related to this eventfd, the easier it is to trigger this problem. The solution is to check whether the thresholds associated with the eventfd has been cleared when deleting the event. If so, we do nothing. [akpm@linux-foundation.org: fix comment, per Kirill] Fixes: 907860ed381a ("cgroups: make cftype.unregister_event() void-returning") Signed-off-by: Chunguang Xu Signed-off-by: Andrew Morton Acked-by: Michal Hocko Acked-by: Kirill A. Shutemov Cc: Johannes Weiner Cc: Vladimir Davydov Cc: Link: http://lkml.kernel.org/r/077a6f67-aefa-4591-efec-f2f3af2b0b02@gmail.com Signed-off-by: Linus Torvalds commit b74b991fb8b9d642b8fea20d6245c6e19125a305 Merge: 1ab7ea1f83d1 83166ac82b53 Author: Linus Torvalds Date: Sat Mar 21 12:08:26 2020 -0700 Merge tag 'block-5.6-20200320' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Just two NVMe fabrics fixes that should go into 5.6" * tag 'block-5.6-20200320' of git://git.kernel.dk/linux-block: nvmet-tcp: set MSG_MORE only if we actually have more to send nvme-rdma: Avoid double freeing of async event data commit 1ab7ea1f83d16489142bcfa1b7670ac7ca86cd81 Merge: 6c1bae744d5a 09952e3e7826 Author: Linus Torvalds Date: Sat Mar 21 11:54:47 2020 -0700 Merge tag 'io_uring-5.6-20200320' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Two different fixes in here: - Fix for a potential NULL pointer deref for links with async or drain marked (Pavel) - Fix for not properly checking RLIMIT_NOFILE for async punted operations. This affects openat/openat2, which were added this cycle, and accept4. I did a full audit of other cases where we might check current->signal->rlim[] and found only RLIMIT_FSIZE for buffered writes and fallocate. That one is fixed and queued for 5.7 and marked stable" * tag 'io_uring-5.6-20200320' of git://git.kernel.dk/linux-block: io_uring: make sure accept honor rlimit nofile io_uring: make sure openat/openat2 honor rlimit nofile io_uring: NULL-deref for IOSQE_{ASYNC,DRAIN} commit 6c1bae744d5a15108c412336d95f3c4e5db6aff4 Merge: c63c50fc2ec9 b95fffb9b4af Author: Linus Torvalds Date: Sat Mar 21 11:50:36 2020 -0700 Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux Pull turbostat updates from Len Brown: "Update to turbostat v20.03.20. These patches unlock the full turbostat features for some new machines, plus a couple other minor tweaks" * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: tools/power turbostat: update version tools/power turbostat: Print cpuidle information tools/power turbostat: Fix 32-bit capabilities warning tools/power turbostat: Fix missing SYS_LPI counter on some Chromebooks tools/power turbostat: Support Elkhart Lake tools/power turbostat: Support Jasper Lake tools/power turbostat: Support Ice Lake server tools/power turbostat: Support Tiger Lake tools/power turbostat: Fix gcc build warnings tools/power turbostat: Support Cometlake commit df81dfcfd6991d547653d46c051bac195cd182c1 Author: Edward Cree Date: Fri Mar 13 20:33:07 2020 +0000 genirq: Fix reference leaks on irq affinity notifiers The handling of notify->work did not properly maintain notify->kref in two cases: 1) where the work was already scheduled, another irq_set_affinity_locked() would get the ref and (no-op-ly) schedule the work. Thus when irq_affinity_notify() ran, it would drop the original ref but not the additional one. 2) when cancelling the (old) work in irq_set_affinity_notifier(), if there was outstanding work a ref had been got for it but was never put. Fix both by checking the return values of the work handling functions (schedule_work() for (1) and cancel_work_sync() for (2)) and put the extra ref if the return value indicates preexisting work. Fixes: cd7eab44e994 ("genirq: Add IRQ affinity notifiers") Fixes: 59c39840f5ab ("genirq: Prevent use-after-free and work list corruption") Signed-off-by: Edward Cree Signed-off-by: Thomas Gleixner Acked-by: Ben Hutchings Link: https://lkml.kernel.org/r/24f5983f-2ab5-e83a-44ee-a45b5f9300f5@solarflare.com commit c63c50fc2ec9afc4de21ef9ead2eac64b178cce1 Merge: 5ad0ec0b8652 1d0c32ec3b86 Author: Linus Torvalds Date: Sat Mar 21 08:51:45 2020 -0700 Merge tag 'powerpc-5.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Two fixes for bugs introduced this cycle: - fix a crash when shutting down a KVM PR guest (our original style of KVM which doesn't use hypervisor mode) - fix for the recently added 32-bit KASAN_VMALLOC support Thanks to: Christophe Leroy, Greg Kurz, Sean Christopherson" * tag 'powerpc-5.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: KVM: PPC: Fix kernel crash with PR KVM powerpc/kasan: Fix shadow memory protection with CONFIG_KASAN_VMALLOC commit b95fffb9b4afa8b9aa4a389ec7a0c578811eaf42 Author: Len Brown Date: Sun Nov 17 21:18:31 2019 -0500 tools/power turbostat: update version A stitch in time saves nine. Signed-off-by: Len Brown commit abdcbdb265264f736df316622a695ad30019c05f Author: Len Brown Date: Sat Mar 21 00:47:47 2020 -0400 tools/power turbostat: Print cpuidle information Print cpuidle driver and governor. Originally-by: Antti Laakso Signed-off-by: Len Brown commit 07f8e4d0fddbf2f87e4cefb551278abc38db8cdd Author: Florian Westphal Date: Fri Mar 20 16:52:02 2020 +0100 tcp: also NULL skb->dev when copy was needed In rare cases retransmit logic will make a full skb copy, which will not trigger the zeroing added in recent change b738a185beaa ("tcp: ensure skb->dev is NULL before leaving TCP stack"). Cc: Eric Dumazet Fixes: 75c119afe14f ("tcp: implement rb-tree based retransmit queue") Fixes: 28f8bfd1ac94 ("netfilter: Support iif matches in POSTROUTING") Signed-off-by: Florian Westphal Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 702151da6df2364342acd08898263acd51e47a6a Merge: b738a185beaa 15ff197237e7 Author: David S. Miller Date: Fri Mar 20 19:34:18 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) Refetch IP header pointer after pskb_may_pull() in flowtable, from Haishuang Yan. 2) Fix memleak in flowtable offload in nf_flow_table_free(), from Paul Blakey. 3) Set control.addr_type mask in flowtable offload, from Edward Cree. ==================== Signed-off-by: David S. Miller commit 83166ac82b53655b63d3a59f6fe44f20511e96f2 Merge: b53df2e7442c 98fd5c723730 Author: Jens Axboe Date: Fri Mar 20 19:14:16 2020 -0600 Merge branch 'nvme-5.6-rc6' of git://git.infradead.org/nvme into block-5.6 Pull NVMe fixes from Keith: "Two late nvme fabrics fixes for 5.6: a double free with the rdma transport, and a regression fix for tcp; please pull." * 'nvme-5.6-rc6' of git://git.infradead.org/nvme: nvmet-tcp: set MSG_MORE only if we actually have more to send nvme-rdma: Avoid double freeing of async event data commit d8e6fd5c7991033037842b32c9774370a038e902 Author: Filipe Manana Date: Fri Mar 20 18:43:48 2020 +0000 btrfs: fix removal of raid[56|1c34} incompat flags after removing block group We are incorrectly dropping the raid56 and raid1c34 incompat flags when there are still raid56 and raid1c34 block groups, not when we do not any of those anymore. The logic just got unintentionally broken after adding the support for the raid1c34 modes. Fix this by clear the flags only if we do not have block groups with the respective profiles. Fixes: 9c907446dce3 ("btrfs: drop incompat bit for raid1c34 after last block group is gone") Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5c6f25887963f15492b604dd25cb149c501bbabf Author: Greg Kroah-Hartman Date: Fri Mar 20 17:22:58 2020 +0100 bpf: Explicitly memset some bpf info structures declared on the stack Trying to initialize a structure with "= {};" will not always clean out all padding locations in a structure. So be explicit and call memset to initialize everything for a number of bpf information structures that are then copied from userspace, sometimes from smaller memory locations than the size of the structure. Reported-by: Daniel Borkmann Signed-off-by: Greg Kroah-Hartman Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200320162258.GA794295@kroah.com commit 8096f229421f7b22433775e928d506f0342e5907 Author: Greg Kroah-Hartman Date: Fri Mar 20 10:48:13 2020 +0100 bpf: Explicitly memset the bpf_attr structure For the bpf syscall, we are relying on the compiler to properly zero out the bpf_attr union that we copy userspace data into. Unfortunately that doesn't always work properly, padding and other oddities might not be correctly zeroed, and in some tests odd things have been found when the stack is pre-initialized to other values. Fix this by explicitly memsetting the structure to 0 before using it. Reported-by: Maciej Żenczykowski Reported-by: John Stultz Reported-by: Alexander Potapenko Reported-by: Alistair Delva Signed-off-by: Greg Kroah-Hartman Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://android-review.googlesource.com/c/kernel/common/+/1235490 Link: https://lore.kernel.org/bpf/20200320094813.GA421650@kroah.com commit 98fd5c723730f560e5bea919a64ac5b83d45eb72 Author: Sagi Grimberg Date: Thu Mar 12 16:06:38 2020 -0700 nvmet-tcp: set MSG_MORE only if we actually have more to send When we send PDU data, we want to optimize the tcp stack operation if we have more data to send. So when we set MSG_MORE when: - We have more fragments coming in the batch, or - We have a more data to send in this PDU - We don't have a data digest trailer - We optimize with the SUCCESS flag and omit the NVMe completion (used if sq_head pointer update is disabled) This addresses a regression in QD=1 with SUCCESS flag optimization as we unconditionally set MSG_MORE when we didn't actually have more data to send. Fixes: 70583295388a ("nvmet-tcp: implement C2HData SUCCESS optimization") Reported-by: Mark Wunderlich Tested-by: Mark Wunderlich Signed-off-by: Sagi Grimberg Signed-off-by: Keith Busch commit 2da1ed62d55c6cbebbdee924f6af4e87bb6666e5 Author: Paolo Bonzini Date: Fri Mar 20 13:34:50 2020 -0400 KVM: SVM: document KVM_MEM_ENCRYPT_OP, let userspace detect if SEV is available Userspace has no way to query if SEV has been disabled with the sev module parameter of kvm-amd.ko. Actually it has one, but it is a hack: do ioctl(KVM_MEM_ENCRYPT_OP, NULL) and check if it returns EFAULT. Make it a little nicer by returning zero for SEV enabled and NULL argument, and while at it document the ioctl arguments. Cc: Brijesh Singh Signed-off-by: Paolo Bonzini commit d33294541889b023068522270cd4153ddd8e4635 Author: Paolo Bonzini Date: Thu Mar 19 13:41:06 2020 -0400 KVM: x86: remove bogus user-triggerable WARN_ON The WARN_ON is essentially comparing a user-provided value with 0. It is trivial to trigger it just by passing garbage to KVM_SET_CLOCK. Guests can break if you do so, but the same applies to every KVM_SET_* ioctl. So, if it hurts when you do like this, just do not do it. Reported-by: syzbot+00be5da1d75f1cc95f6b@syzkaller.appspotmail.com Fixes: 9446e6fce0ab ("KVM: x86: fix WARN_ON check of an unsigned less than zero") Cc: Sean Christopherson Signed-off-by: Paolo Bonzini commit 5ad0ec0b86525d0c5d3d250d3cfad7f183b00cfa Merge: f014d2b8584d 3568b88944fe Author: Linus Torvalds Date: Fri Mar 20 09:28:25 2020 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: - Fix panic() when it occurs during secondary CPU startup - Fix "kpti=off" when KASLR is enabled - Fix howler in compat syscall table for vDSO clock_getres() fallback * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: compat: Fix syscall number of compat_clock_getres arm64: kpti: Fix "kpti=off" when KASLR is enabled arm64: smp: fix crash_smp_send_stop() behaviour arm64: smp: fix smp_send_stop() behaviour commit f014d2b8584d0bf938e8d6761c79596e94b06f98 Merge: 3bd14829d327 add492d2e944 Author: Linus Torvalds Date: Fri Mar 20 09:24:22 2020 -0700 Merge tag 'char-misc-5.6-rc7' 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 different driver fixes for 5.6-rc7: - binderfs fix, yet again - slimbus new device id added - hwtracing bugfixes for reported issues and a new device id All of these have been in linux-next with no reported issues" * tag 'char-misc-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: intel_th: pci: Add Elkhart Lake CPU support intel_th: Fix user-visible error codes intel_th: msu: Fix the unexpected state warning stm class: sys-t: Fix the use of time_after() slimbus: ngd: add v2.1.0 compatible binderfs: use refcount for binder control devices too commit 3bd14829d3275d96ff723a6c57429e9238117779 Merge: b07c2e76c419 14800df6a020 Author: Linus Torvalds Date: Fri Mar 20 09:20:38 2020 -0700 Merge tag 'staging-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO fixes from Greg KH: "Here are a number of small staging and IIO driver fixes for 5.6-rc7 Nothing major here, just resolutions for some reported problems: - iio bugfixes for a number of different drivers - greybus loopback_test fixes - wfx driver fixes All of these have been in linux-next with no reported issues" * tag 'staging-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: rtl8188eu: Add device id for MERCUSYS MW150US v2 staging: greybus: loopback_test: fix potential path truncations staging: greybus: loopback_test: fix potential path truncation staging: greybus: loopback_test: fix poll-mask build breakage staging: wfx: fix RCU usage between hif_join() and ieee80211_bss_get_ie() staging: wfx: fix RCU usage in wfx_join_finalize() staging: wfx: make warning about pending frame less scary staging: wfx: fix lines ending with a comma instead of a semicolon staging: wfx: fix warning about freeing in-use mutex during device unregister staging/speakup: fix get_word non-space look-ahead iio: ping: set pa_laser_ping_cfg in of_ping_match iio: chemical: sps30: fix missing triggered buffer dependency iio: st_sensors: remap SMO8840 to LIS2DH12 iio: light: vcnl4000: update sampling periods for vcnl4040 iio: light: vcnl4000: update sampling periods for vcnl4200 iio: accel: adxl372: Set iio_chan BE iio: magnetometer: ak8974: Fix negative raw values in sysfs iio: trigger: stm32-timer: disable master mode when stopping iio: adc: stm32-dfsdm: fix sleep in atomic context iio: adc: at91-sama5d2_adc: fix differential channels in triggered mode commit b07c2e76c419fe7ac8949e5ffea4a29414291b7d Merge: fa91418b72cb 2866ce869616 Author: Linus Torvalds Date: Fri Mar 20 09:16:35 2020 -0700 Merge tag 'usb-5.6-rc7' 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.6-rc7. And there's a thunderbolt driver fix thrown in for good measure as well. These fixes are: - new device ids for usb-serial drivers - thunderbolt error code fix - xhci driver fixes - typec fixes - cdc-acm driver fixes - chipidea driver fix - more USB quirks added for devices that need them. All of these have been in linux-next with no reported issues" * tag 'usb-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: cdc-acm: fix rounding error in TIOCSSERIAL USB: cdc-acm: fix close_delay and closing_wait units in TIOCSSERIAL usb: quirks: add NO_LPM quirk for RTL8153 based ethernet adapters usb: chipidea: udc: fix sleeping function called from invalid context USB: serial: pl2303: add device-id for HP LD381 USB: serial: option: add ME910G1 ECM composition 0x110b usb: host: xhci-plat: add a shutdown usb: typec: ucsi: displayport: Fix a potential race during registration usb: typec: ucsi: displayport: Fix NULL pointer dereference USB: Disable LPM on WD19's Realtek Hub usb: xhci: apply XHCI_SUSPEND_DELAY to AMD XHCI controller 1022:145c xhci: Do not open code __print_symbolic() in xhci trace events thunderbolt: Fix error code in tb_port_is_width_supported() commit fa91418b72cbf14742f2439439369fcad942b24c Merge: 12bf19c92682 6e622cd8bd88 Author: Linus Torvalds Date: Fri Mar 20 09:13:35 2020 -0700 Merge tag 'tty-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty fixes from Greg KH: "Here are three small tty_io bugfixes for reported issues that Eric has resolved for 5.6-rc7 All of these have been in linux-next with no reported issues" * tag 'tty-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: fix compat TIOCGSERIAL checking wrong function ptr tty: fix compat TIOCGSERIAL leaking uninitialized memory tty: drop outdated comments about release_tty() locking commit 12bf19c9268263cf8fc6653966813ff9d5ceef17 Merge: 69d3e5a5a66b a124458a127c Author: Linus Torvalds Date: Fri Mar 20 09:10:29 2020 -0700 Merge tag 'sound-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A few fixes covering the issues reported by syzkaller, a couple of fixes for the MIDI decoding bug, and a few usual HD-audio quirks. Some of them are about ALSA core stuff, but they are small fixes just for corner cases, and nothing thrilling" * tag 'sound-5.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda/realtek - Enable the headset of Acer N50-600 with ALC662 ALSA: hda/realtek - Enable headset mic of Acer X2660G with ALC662 ALSA: seq: oss: Fix running status after receiving sysex ALSA: seq: virmidi: Fix running status after receiving sysex ALSA: pcm: oss: Remove WARNING from snd_pcm_plug_alloc() checks ALSA: hda/realtek: Fix pop noise on ALC225 ALSA: line6: Fix endless MIDI read loop ALSA: pcm: oss: Avoid plugin buffer overflow commit 69d3e5a5a66bb59c39f36dcb9cf4e9a4239aa8cd Merge: 6c90b86a745a 5366b96b1997 Author: Linus Torvalds Date: Fri Mar 20 09:03:54 2020 -0700 Merge tag 'drm-fixes-2020-03-20' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Hope you are well hiding out above the garage. A few amdgpu changes but nothing too major. I've had a wisdom tooth out this week so haven't been to on top of things, but all seems good. core: - fix lease warning i915: - Track active elements during dequeue - Fix failure to handle all MCR ranges - Revert unnecessary workaround amdgpu: - Pageflip fix - VCN clockgating fixes - GPR debugfs fix for umr - GPU reset fix - eDP fix for MBP - DCN2.x fix dw-hdmi: - fix AVI frame colorimetry komeda: - fix compiler warning bochs: - downgrade a binding failure to a warning" * tag 'drm-fixes-2020-03-20' of git://anongit.freedesktop.org/drm/drm: drm/amd/display: Fix pageflip event race condition for DCN. drm/amdgpu: fix typo for vcn2.5/jpeg2.5 idle check drm/amdgpu: fix typo for vcn2/jpeg2 idle check drm/amdgpu: fix typo for vcn1 idle check drm/lease: fix WARNING in idr_destroy drm/i915: Handle all MCR ranges Revert "drm/i915/tgl: Add extra hdc flush workaround" drm/i915/execlists: Track active elements during dequeue drm/bochs: downgrade pci_request_region failure from error to warning drm/amd/display: Add link_rate quirk for Apple 15" MBP 2017 drm/amdgpu: add fbdev suspend/resume on gpu reset drm/amd/amdgpu: Fix GPR read from debugfs (v2) drm/amd/display: fix typos for dcn20_funcs and dcn21_funcs struct drm/komeda: mark PM functions as __maybe_unused drm/bridge: dw-hdmi: fix AVI frame colorimetry commit 09952e3e7826119ddd4357c453d54bcc7ef25156 Author: Jens Axboe Date: Thu Mar 19 20:16:56 2020 -0600 io_uring: make sure accept honor rlimit nofile Just like commit 4022e7af86be, this fixes the fact that IORING_OP_ACCEPT ends up using get_unused_fd_flags(), which checks current->signal->rlim[] for limits. Add an extra argument to __sys_accept4_file() that allows us to pass in the proper nofile limit, and grab it at request prep time. Acked-by: David S. Miller Signed-off-by: Jens Axboe commit 4022e7af86be2dd62975dedb6b7ea551d108695e Author: Jens Axboe Date: Thu Mar 19 19:23:18 2020 -0600 io_uring: make sure openat/openat2 honor rlimit nofile Dmitry reports that a test case shows that io_uring isn't honoring a modified rlimit nofile setting. get_unused_fd_flags() checks the task signal->rlimi[] for the limits. As this isn't easily inheritable, provide a __get_unused_fd_flags() that takes the value instead. Then we can grab it when the request is prepared (from the original task), and pass that in when we do the async part part of the open. Reported-by: Dmitry Kadashev Tested-by: Dmitry Kadashev Acked-by: David S. Miller Signed-off-by: Jens Axboe commit 6f5459da2b8736720afdbd67c4bd2d1edba7d0e3 Author: Ilie Halip Date: Thu Mar 19 23:45:28 2020 +0200 arm64: alternative: fix build with clang integrated assembler Building an arm64 defconfig with clang's integrated assembler, this error occurs: :2:2: error: unrecognized instruction mnemonic _ASM_EXTABLE 9999b, 9f ^ arch/arm64/mm/cache.S:50:1: note: while in macro instantiation user_alt 9f, "dc cvau, x4", "dc civac, x4", 0 ^ While GNU as seems fine with case-sensitive macro instantiations, clang doesn't, so use the actual macro name (_asm_extable) as in the rest of the file. Also checked that the generated assembly matches the GCC output. Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Fixes: 290622efc76e ("arm64: fix "dc cvau" cache operation on errata-affected core") Link: https://github.com/ClangBuiltLinux/linux/issues/924 Signed-off-by: Ilie Halip Signed-off-by: Will Deacon commit b738a185beaab8728943acdb3e67371b8a88185e Author: Eric Dumazet Date: Thu Mar 19 12:49:55 2020 -0700 tcp: ensure skb->dev is NULL before leaving TCP stack skb->rbnode is sharing three skb fields : next, prev, dev When a packet is sent, TCP keeps the original skb (master) in a rtx queue, which was converted to rbtree a while back. __tcp_transmit_skb() is responsible to clone the master skb, and add the TCP header to the clone before sending it to network layer. skb_clone() already clears skb->next and skb->prev, but copies the master oskb->dev into the clone. We need to clear skb->dev, otherwise lower layers could interpret the value as a pointer to a netdev. This old bug surfaced recently when commit 28f8bfd1ac94 ("netfilter: Support iif matches in POSTROUTING") was merged. Before this netfilter commit, skb->dev value was ignored and changed before reaching dev_queue_xmit() Fixes: 75c119afe14f ("tcp: implement rb-tree based retransmit queue") Fixes: 28f8bfd1ac94 ("netfilter: Support iif matches in POSTROUTING") Signed-off-by: Eric Dumazet Reported-by: Martin Zaharinov Cc: Florian Westphal Cc: Pablo Neira Ayuso Signed-off-by: David S. Miller commit fcaa681c03ea82193e60d7f2cdfd94fbbcd4cae9 Author: Len Brown Date: Thu Mar 19 23:24:17 2020 -0400 tools/power turbostat: Fix 32-bit capabilities warning warning: `turbostat' uses 32-bit capabilities (legacy support in use) Signed-off-by: Len Brown commit 1f81c5efc020314b2db30d77efe228b7e117750d Author: Len Brown Date: Thu Mar 19 18:26:05 2020 -0400 tools/power turbostat: Fix missing SYS_LPI counter on some Chromebooks Some Chromebook BIOS' do not export an ACPI LPIT, which is how Linux finds the residency counter for CPU and SYSTEM low power states, that is exports in /sys/devices/system/cpu/cpuidle/*residency_us When these sysfs attributes are missing, check the debugfs attrubte from the pmc_core driver, which accesses the same counter value. Signed-off-by: Len Brown commit f6708400707fec5cb56600710a9be59266df09ad Author: Chen Yu Date: Wed Mar 18 18:55:48 2020 +0800 tools/power turbostat: Support Elkhart Lake From a turbostat point of view the Tremont-based Elkhart Lake is very similar to Goldmont, reuse the code of Goldmont. Elkhart Lake does not support 'group turbo limit counter' nor C3, adjust the code accordingly. Signed-off-by: Chen Yu Signed-off-by: Len Brown commit d7814c3098ddb2780bb66e787aa3949110dd4a41 Author: Chen Yu Date: Tue Jan 14 12:09:45 2020 +0800 tools/power turbostat: Support Jasper Lake Jasper Lake, like Elkhart Lake, uses a Tremont CPU. So reuse the code. Signed-off-by: Chen Yu Signed-off-by: Len Brown commit 23274faf96500700da83c4f0ff12d78ae03d5604 Author: Chen Yu Date: Tue Jan 14 12:06:49 2020 +0800 tools/power turbostat: Support Ice Lake server From a turbostat point of view, Ice Lake server looks like Sky Lake server. Signed-off-by: Chen Yu Signed-off-by: Len Brown commit 4bf7132a0ace8888398af8cec6485ee4c6db5ea8 Author: Chen Yu Date: Tue Jan 14 12:04:55 2020 +0800 tools/power turbostat: Support Tiger Lake From a turbostat point of view, Tiger Lake looks like Ice Lake. Signed-off-by: Chen Yu Signed-off-by: Len Brown commit d8d005ba6afa502ca37ced5782f672c4d2fc1515 Author: Len Brown Date: Thu Mar 19 18:33:12 2020 -0400 tools/power turbostat: Fix gcc build warnings Warning: ‘__builtin_strncpy’ specified bound 20 equals destination size [-Wstringop-truncation] reduce param to strncpy, to guarantee that a null byte is always copied into destination buffer. Signed-off-by: Len Brown commit 081c54323b27d8d4b40df6b2375b9e1f6846d827 Author: Chen Yu Date: Thu Oct 31 21:14:22 2019 +0800 tools/power turbostat: Support Cometlake From a turbostat point of view, Cometlake is like Kabylake. Suggested-by: Rui Zhang Signed-off-by: Chen Yu Signed-off-by: Len Brown commit f1f20a8666c55cb534b8f3fc1130eebf01a06155 Author: Rahul Lakkireddy Date: Thu Mar 19 23:08:10 2020 +0530 cxgb4: fix Txq restart check during backpressure Driver reclaims descriptors in much smaller batches, even if hardware indicates more to reclaim, during backpressure. So, fix the check to restart the Txq during backpressure, by looking at how many descriptors hardware had indicated to reclaim, and not on how many descriptors that driver had actually reclaimed. Once the Txq is restarted, driver will reclaim even more descriptors when Tx path is entered again. Fixes: d429005fdf2c ("cxgb4/cxgb4vf: Add support for SGE doorbell queue timer") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 7affd80802afb6ca92dba47d768632fbde365241 Author: Rahul Lakkireddy Date: Thu Mar 19 23:08:09 2020 +0530 cxgb4: fix throughput drop during Tx backpressure commit 7c3bebc3d868 ("cxgb4: request the TX CIDX updates to status page") reverted back to getting Tx CIDX updates via DMA, instead of interrupts, introduced by commit d429005fdf2c ("cxgb4/cxgb4vf: Add support for SGE doorbell queue timer") However, it missed reverting back several code changes where Tx CIDX updates are not explicitly requested during backpressure when using interrupt mode. These missed changes cause slow recovery during backpressure because the corresponding interrupt no longer comes and hence results in Tx throughput drop. So, revert back these missed code changes, as well, which will allow explicitly requesting Tx CIDX updates when backpressure happens. This enables the corresponding interrupt with Tx CIDX update message to get generated and hence speed up recovery and restore back throughput. Fixes: 7c3bebc3d868 ("cxgb4: request the TX CIDX updates to status page") Fixes: d429005fdf2c ("cxgb4/cxgb4vf: Add support for SGE doorbell queue timer") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 22259471b51925353bd7b16f864c79fdd76e425e Author: René van Dorst Date: Thu Mar 19 14:47:56 2020 +0100 net: dsa: mt7530: Change the LINK bit to reflect the link status Andrew reported: After a number of network port link up/down changes, sometimes the switch port gets stuck in a state where it thinks it is still transmitting packets but the cpu port is not actually transmitting anymore. In this state you will see a message on the console "mtk_soc_eth 1e100000.ethernet eth0: transmit timed out" and the Tx counter in ifconfig will be incrementing on virtual port, but not incrementing on cpu port. The issue is that MAC TX/RX status has no impact on the link status or queue manager of the switch. So the queue manager just queues up packets of a disabled port and sends out pause frames when the queue is full. Change the LINK bit to reflect the link status. Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch") Reported-by: Andrew Smith Signed-off-by: René van Dorst Reviewed-by: Vivien Didelot Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit c8cfcb78c65877313cda7bcbace624d3dbd1f3b3 Author: Jason A. Donenfeld Date: Wed Mar 18 20:27:32 2020 -0600 crypto: arm64/chacha - correctly walk through blocks Prior, passing in chunks of 2, 3, or 4, followed by any additional chunks would result in the chacha state counter getting out of sync, resulting in incorrect encryption/decryption, which is a pretty nasty crypto vuln: "why do images look weird on webpages?" WireGuard users never experienced this prior, because we have always, out of tree, used a different crypto library, until the recent Frankenzinc addition. This commit fixes the issue by advancing the pointers and state counter by the actual size processed. It also fixes up a bug in the (optional, costly) stride test that prevented it from running on arm64. Fixes: b3aad5bad26a ("crypto: arm64/chacha - expose arm64 ChaCha routine as library function") Reported-and-tested-by: Emil Renner Berthing Cc: Ard Biesheuvel Cc: stable@vger.kernel.org # v5.5+ Signed-off-by: Jason A. Donenfeld Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit 3ac9eb4210a95cf9b374f1d48ce99d87d79d2510 Merge: 6002059d7882 7d7587db0d7f Author: David S. Miller Date: Thu Mar 19 20:28:34 2020 -0700 Merge tag 'rxrpc-fixes-20200319' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc, afs: Interruptibility fixes Here are a number of fixes for AF_RXRPC and AFS that make AFS system calls less interruptible and so less likely to leave the filesystem in an uncertain state. There's also a miscellaneous patch to make tracing consistent. (1) Firstly, abstract out the Tx space calculation in sendmsg. Much the same code is replicated in a number of places that subsequent patches are going to alter, including adding another copy. (2) Fix Tx interruptibility by allowing a kernel service, such as AFS, to request that a call be interruptible only when waiting for a call slot to become available (ie. the call has not taken place yet) or that a call be not interruptible at all (e.g. when we want to do writeback and don't want a signal interrupting a VM-induced writeback). (3) Increase the minimum delay on MSG_WAITALL for userspace sendmsg() when waiting for Tx buffer space as a 2*RTT delay is really small over 10G ethernet and a 1 jiffy timeout might be essentially 0 if at the end of the jiffy period. (4) Fix some tracing output in AFS to make it consistent with rxrpc. (5) Make sure aborted asynchronous AFS operations are tidied up properly so we don't end up with stuck rxrpc calls. (6) Make AFS client calls uninterruptible in the Rx phase. If we don't wait for the reply to be fully gathered, we can't update the local VFS state and we end up in an indeterminate state with respect to the server. ==================== Signed-off-by: David S. Miller commit 6002059d7882c3512e6ac52fa82424272ddfcd5c Author: Ido Schimmel Date: Thu Mar 19 13:25:39 2020 +0200 mlxsw: pci: Only issue reset when system is ready During initialization the driver issues a software reset command and then waits for the system status to change back to "ready" state. However, before issuing the reset command the driver does not check that the system is actually in "ready" state. On Spectrum-{1,2} systems this was always the case as the hardware initialization time is very short. On Spectrum-3 systems this is no longer the case. This results in the software reset command timing-out and the driver failing to load: [ 6.347591] mlxsw_spectrum3 0000:06:00.0: Cmd exec timed-out (opcode=40(ACCESS_REG),opcode_mod=0,in_mod=0) [ 6.358382] mlxsw_spectrum3 0000:06:00.0: Reg cmd access failed (reg_id=9023(mrsr),type=write) [ 6.368028] mlxsw_spectrum3 0000:06:00.0: cannot register bus device [ 6.375274] mlxsw_spectrum3: probe of 0000:06:00.0 failed with error -110 Fix this by waiting for the system to become ready both before issuing the reset command and afterwards. In case of failure, print the last system status to aid in debugging. Fixes: da382875c616 ("mlxsw: spectrum: Extend to support Spectrum-3 ASIC") Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 5366b96b1997745d903c697a32e0ed27b66fd158 Merge: 362b86a3d337 fe8b7085cac3 Author: Dave Airlie Date: Fri Mar 20 12:51:34 2020 +1000 Merge tag 'drm-intel-fixes-2020-03-19' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.6-rc7: - Track active elements during dequeue - Fix failure to handle all MCR ranges - Revert unnecessary workaround Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/877dzgepvu.fsf@intel.com commit 362b86a3d337f6056e8c0692b15bc3c9d49306f5 Merge: 0f08b3156d28 eb916a5a93a6 Author: Dave Airlie Date: Fri Mar 20 12:48:10 2020 +1000 Merge tag 'amd-drm-fixes-5.6-2020-03-19' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.6-2020-03-19: amdgpu: - Pageflip fix - VCN clockgating fixes - GPR debugfs fix for umr - GPU reset fix - eDP fix for MBP - DCN2.x fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200319204054.1036478-1-alexander.deucher@amd.com commit 1d0c32ec3b860a32df593a22bad0d1dbc5546a59 Author: Greg Kurz Date: Wed Mar 18 18:43:30 2020 +0100 KVM: PPC: Fix kernel crash with PR KVM With PR KVM, shutting down a VM causes the host kernel to crash: [ 314.219284] BUG: Unable to handle kernel data access on read at 0xc00800000176c638 [ 314.219299] Faulting instruction address: 0xc008000000d4ddb0 cpu 0x0: Vector: 300 (Data Access) at [c00000036da077a0] pc: c008000000d4ddb0: kvmppc_mmu_pte_flush_all+0x68/0xd0 [kvm_pr] lr: c008000000d4dd94: kvmppc_mmu_pte_flush_all+0x4c/0xd0 [kvm_pr] sp: c00000036da07a30 msr: 900000010280b033 dar: c00800000176c638 dsisr: 40000000 current = 0xc00000036d4c0000 paca = 0xc000000001a00000 irqmask: 0x03 irq_happened: 0x01 pid = 1992, comm = qemu-system-ppc Linux version 5.6.0-master-gku+ (greg@palmb) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #17 SMP Wed Mar 18 13:49:29 CET 2020 enter ? for help [c00000036da07ab0] c008000000d4fbe0 kvmppc_mmu_destroy_pr+0x28/0x60 [kvm_pr] [c00000036da07ae0] c0080000009eab8c kvmppc_mmu_destroy+0x34/0x50 [kvm] [c00000036da07b00] c0080000009e50c0 kvm_arch_vcpu_destroy+0x108/0x140 [kvm] [c00000036da07b30] c0080000009d1b50 kvm_vcpu_destroy+0x28/0x80 [kvm] [c00000036da07b60] c0080000009e4434 kvm_arch_destroy_vm+0xbc/0x190 [kvm] [c00000036da07ba0] c0080000009d9c2c kvm_put_kvm+0x1d4/0x3f0 [kvm] [c00000036da07c00] c0080000009da760 kvm_vm_release+0x38/0x60 [kvm] [c00000036da07c30] c000000000420be0 __fput+0xe0/0x310 [c00000036da07c90] c0000000001747a0 task_work_run+0x150/0x1c0 [c00000036da07cf0] c00000000014896c do_exit+0x44c/0xd00 [c00000036da07dc0] c0000000001492f4 do_group_exit+0x64/0xd0 [c00000036da07e00] c000000000149384 sys_exit_group+0x24/0x30 [c00000036da07e20] c00000000000b9d0 system_call+0x5c/0x68 This is caused by a use-after-free in kvmppc_mmu_pte_flush_all() which dereferences vcpu->arch.book3s which was previously freed by kvmppc_core_vcpu_free_pr(). This happens because kvmppc_mmu_destroy() is called after kvmppc_core_vcpu_free() since commit ff030fdf5573 ("KVM: PPC: Move kvm_vcpu_init() invocation to common code"). The kvmppc_mmu_destroy() helper calls one of the following depending on the KVM backend: - kvmppc_mmu_destroy_hv() which does nothing (Book3s HV) - kvmppc_mmu_destroy_pr() which undoes the effects of kvmppc_mmu_init() (Book3s PR 32-bit) - kvmppc_mmu_destroy_pr() which undoes the effects of kvmppc_mmu_init() (Book3s PR 64-bit) - kvmppc_mmu_destroy_e500() which does nothing (BookE e500/e500mc) It turns out that this is only relevant to PR KVM actually. And both 32 and 64 backends need vcpu->arch.book3s to be valid when calling kvmppc_mmu_destroy_pr(). So instead of calling kvmppc_mmu_destroy() from kvm_arch_vcpu_destroy(), call kvmppc_mmu_destroy_pr() at the beginning of kvmppc_core_vcpu_free_pr(). This is consistent with kvmppc_mmu_init() being the last call in kvmppc_core_vcpu_create_pr(). For the same reason, if kvmppc_core_vcpu_create_pr() returns an error then this means that kvmppc_mmu_init() was either not called or failed, in which case kvmppc_mmu_destroy() should not be called. Drop the line in the error path of kvm_arch_vcpu_create(). Fixes: ff030fdf5573 ("KVM: PPC: Move kvm_vcpu_init() invocation to common code") Signed-off-by: Greg Kurz Reviewed-by: Sean Christopherson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/158455341029.178873.15248663726399374882.stgit@bahia.lan commit 15ff197237e76c4dab06b7b518afaa4ebb1c43e0 Author: Edward Cree Date: Thu Mar 19 19:37:21 2020 +0000 netfilter: flowtable: populate addr_type mask nf_flow_rule_match() sets control.addr_type in key, so needs to also set the corresponding mask. An exact match is wanted, so mask is all ones. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: Edward Cree Signed-off-by: Pablo Neira Ayuso commit eb916a5a93a64c182b0a8f43886aa6bb4c3e52b0 Author: Mario Kleiner Date: Mon Mar 2 07:17:32 2020 +0100 drm/amd/display: Fix pageflip event race condition for DCN. Commit '16f17eda8bad ("drm/amd/display: Send vblank and user events at vsartup for DCN")' introduces a new way of pageflip completion handling for DCN, and some trouble. The current implementation introduces a race condition, which can cause pageflip completion events to be sent out one vblank too early, thereby confusing userspace and causing flicker: prepare_flip_isr(): 1. Pageflip programming takes the ddev->event_lock. 2. Sets acrtc->pflip_status == AMDGPU_FLIP_SUBMITTED 3. Releases ddev->event_lock. --> Deadline for surface address regs double-buffering passes on target pipe. 4. dc_commit_updates_for_stream() MMIO programs the new pageflip into hw, but too late for current vblank. => pflip_status == AMDGPU_FLIP_SUBMITTED, but flip won't complete in current vblank due to missing the double-buffering deadline by a tiny bit. 5. VSTARTUP trigger point in vblank is reached, VSTARTUP irq fires, dm_dcn_crtc_high_irq() gets called. 6. Detects pflip_status == AMDGPU_FLIP_SUBMITTED and assumes the pageflip has been completed/will complete in this vblank and sends out pageflip completion event to userspace and resets pflip_status = AMDGPU_FLIP_NONE. => Flip completion event sent out one vblank too early. This behaviour has been observed during my testing with measurement hardware a couple of time. The commit message says that the extra flip event code was added to dm_dcn_crtc_high_irq() to prevent missing to send out pageflip events in case the pflip irq doesn't fire, because the "DCH HUBP" component is clock gated and doesn't fire pflip irqs in that state. Also that this clock gating may happen if no planes are active. This suggests that the problem addressed by that commit can't happen if planes are active. The proposed solution is therefore to only execute the extra pflip completion code iff the count of active planes is zero and otherwise leave pflip completion handling to the pflip irq handler, for a more race-free experience. Note that i don't know if this fixes the problem the original commit tried to address, as i don't know what the test scenario was. It does fix the observed too early pageflip events though and points out the problem introduced. Fixes: 16f17eda8bad ("drm/amd/display: Send vblank and user events at vsartup for DCN") Reviewed-by: Nicholas Kazlauskas Signed-off-by: Mario Kleiner Signed-off-by: Alex Deucher commit c921ffe853332584eae4f5905cb2a14a7b3c9932 Author: Paul Blakey Date: Thu Mar 19 11:52:25 2020 +0200 netfilter: flowtable: Fix flushing of offloaded flows on free Freeing a flowtable with offloaded flows, the flow are deleted from hardware but are not deleted from the flow table, leaking them, and leaving their offload bit on. Add a second pass of the disabled gc to delete the these flows from the flow table before freeing it. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: Paul Blakey Signed-off-by: Pablo Neira Ayuso commit 41e9ec5a54f95eee1a57c8d26ab70e0492548c1b Author: Haishuang Yan Date: Tue Mar 17 10:02:53 2020 +0800 netfilter: flowtable: reload ip{v6}h in nf_flow_tuple_ip{v6} Since pskb_may_pull may change skb->data, so we need to reload ip{v6}h at the right place. Fixes: a908fdec3dda ("netfilter: nf_flow_table: move ipv6 offload hook code to nf_flow_table") Fixes: 7d2086871762 ("netfilter: nf_flow_table: move ipv4 offload hook code to nf_flow_table") Signed-off-by: Haishuang Yan Signed-off-by: Pablo Neira Ayuso commit 61abaf02d2ec3d4575c66fa1b4a863877736b932 Author: Haishuang Yan Date: Tue Mar 17 10:02:52 2020 +0800 netfilter: flowtable: reload ip{v6}h in nf_flow_nat_ip{v6} Since nf_flow_snat_port and nf_flow_snat_ip{v6} call pskb_may_pull() which may change skb->data, so we need to reload ip{v6}h at the right place. Fixes: a908fdec3dda ("netfilter: nf_flow_table: move ipv6 offload hook code to nf_flow_table") Fixes: 7d2086871762 ("netfilter: nf_flow_table: move ipv4 offload hook code to nf_flow_table") Signed-off-by: Haishuang Yan Signed-off-by: Pablo Neira Ayuso commit 6c90b86a745a446717fdf408c4a8a4631a5e8ee3 Merge: cd607737f3b8 4686392c3236 Author: Linus Torvalds Date: Thu Mar 19 12:45:14 2020 -0700 Merge tag 'mmc-v5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: - rtsx_pci: Fix support for some various speed modes - sdhci-of-at91: Fix support for GPIO card detect on SAMA5D2 - sdhci-cadence: Fix support for DDR52 speed mode for eMMC on UniPhier - sdhci-acpi: Fix broken WP support on Acer Aspire Switch 10 - sdhci-acpi: Workaround FW bug for suspend on Lenovo Miix 320 * tag 'mmc-v5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: rtsx_pci: Fix support for speed-modes that relies on tuning mmc: sdhci-of-at91: fix cd-gpios for SAMA5D2 mmc: sdhci-cadence: set SDHCI_QUIRK2_PRESET_VALUE_BROKEN for UniPhier mmc: sdhci-acpi: Disable write protect detection on Acer Aspire Switch 10 (SW5-012) mmc: sdhci-acpi: Switch signal voltage back to 3.3V on suspend on external microSD on Lenovo Miix 320 commit 3568b88944fef28db3ee989b957da49ffc627ede Author: Vincenzo Frascino Date: Thu Mar 19 14:11:38 2020 +0000 arm64: compat: Fix syscall number of compat_clock_getres The syscall number of compat_clock_getres was erroneously set to 247 (__NR_io_cancel!) instead of 264. This causes the vDSO fallback of clock_getres() to land on the wrong syscall for compat tasks. Fix the numbering. Cc: Fixes: 53c489e1dfeb6 ("arm64: compat: Add missing syscall numbers") Acked-by: Catalin Marinas Reviewed-by: Nick Desaulniers Signed-off-by: Vincenzo Frascino Signed-off-by: Will Deacon commit cd607737f3b84432b8a00cd31ac753dab1c38678 Merge: 207f75c4543f 979a2665eb6c Author: Linus Torvalds Date: Thu Mar 19 10:19:11 2020 -0700 Merge tag '5.6-rc6-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Three small smb3 fixes, two for stable" * tag '5.6-rc6-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: CIFS: fiemap: do not return EINVAL if get nothing CIFS: Increment num_remote_opens stats counter even in case of smb2_query_dir_first cifs: potential unintitliazed error code in cifs_getattr() commit 207f75c4543fcd34ed7ec84ede43479f1c08e7ca Merge: 5d892919fdd0 7883a1433929 Author: Linus Torvalds Date: Thu Mar 19 09:57:48 2020 -0700 Merge tag 'kbuild-fixes-v5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - fix __uint128_t capability test in Kconfig when GCC that defaults to 32-bit is used to build the 64-bit kernel - suppress new noisy Clang warnings -Wpointer-to-enum-cast - move the namespace field in Module.symvers for the backward compatibility reason for the depmod tool - use available compression for initramdisk when INTRAMFS_SOURCE is defined, which was the original behavior - fix modpost to handle correct large section numbers when it refers to modversion CRCs and module namespaces - fix comments and documents * tag 'kbuild-fixes-v5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: scripts/kallsyms: fix wrong kallsyms_relative_base modpost: Get proper section index by get_secindex() instead of st_shndx initramfs: restore default compression behavior modpost: move the namespace field in Module.symvers last kbuild: Disable -Wpointer-to-enum-cast kbuild: doc: fix references to other documents int128: fix __uint128_t compiler test in Kconfig kconfig: introduce m32-flag and m64-flag kbuild: Fix inconsistent comment commit 5d892919fdd0cefd361697472d4e1b174a594991 Author: Corentin Labbe Date: Wed Mar 18 15:26:49 2020 +0000 rtc: max8907: add missing select REGMAP_IRQ I have hit the following build error: armv7a-hardfloat-linux-gnueabi-ld: drivers/rtc/rtc-max8907.o: in function `max8907_rtc_probe': rtc-max8907.c:(.text+0x400): undefined reference to `regmap_irq_get_virq' max8907 should select REGMAP_IRQ Fixes: 94c01ab6d7544 ("rtc: add MAX8907 RTC driver") Cc: stable Signed-off-by: Corentin Labbe Signed-off-by: Linus Torvalds commit 564200ed8e71d91327d337e46bc778cee02da866 Author: Arnaldo Carvalho de Melo Date: Thu Mar 19 11:42:56 2020 -0300 tools headers uapi: Update linux/in.h copy To get the changes in: 267762538705 ("seg6: fix SRv6 L2 tunnels to use IANA-assigned protocol number") That ends up automatically adding the new IPPROTO_ETHERNET to the socket args beautifiers: $ tools/perf/trace/beauty/socket_ipproto.sh > before Apply this patch: $ tools/perf/trace/beauty/socket_ipproto.sh > after $ diff -u before after --- before 2020-03-19 11:48:36.876673819 -0300 +++ after 2020-03-19 11:49:00.148541377 -0300 @@ -6,6 +6,7 @@ [132] = "SCTP", [136] = "UDPLITE", [137] = "MPLS", + [143] = "ETHERNET", [17] = "UDP", [1] = "ICMP", [22] = "IDP", $ Addresses this tools/perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/in.h' differs from latest version at 'include/uapi/linux/in.h' diff -u tools/include/uapi/linux/in.h include/uapi/linux/in.h Cc: David S. Miller Cc: Paolo Lungaroni Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 7883a14339299773b2ce08dcfd97c63c199a9289 Author: Mikhail Petrov Date: Wed Mar 11 23:37:09 2020 +0300 scripts/kallsyms: fix wrong kallsyms_relative_base There is the code in the read_symbol function in 'scripts/kallsyms.c': if (is_ignored_symbol(name, type)) return NULL; /* Ignore most absolute/undefined (?) symbols. */ if (strcmp(name, "_text") == 0) _text = addr; But the is_ignored_symbol function returns true for name="_text" and type='A'. So the next condition is not executed and the _text variable is always zero. It makes the wrong kallsyms_relative_base symbol as a result of the code (CONFIG_KALLSYMS_BASE_RELATIVE is defined): if (base_relative) { output_label("kallsyms_relative_base"); output_address(relative_base); printf("\n"); } Because the output_address function uses the _text variable. So the kallsyms_lookup function and all related functions in the kernel do not work properly. For example, the stack trace in oops: Call Trace: [aa095e58] [809feab8] kobj_ns_ops_tbl+0x7ff09ac8/0x7ff1c1c4 (unreliable) [aa095e98] [80002b64] kobj_ns_ops_tbl+0x7f50db74/0x80000010 [aa095ef8] [809c3d24] kobj_ns_ops_tbl+0x7feced34/0x7ff1c1c4 [aa095f28] [80002ed0] kobj_ns_ops_tbl+0x7f50dee0/0x80000010 [aa095f38] [8000f238] kobj_ns_ops_tbl+0x7f51a248/0x80000010 The right stack trace: Call Trace: [aa095e58] [809feab8] module_vdu_video_init+0x2fc/0x3bc (unreliable) [aa095e98] [80002b64] do_one_initcall+0x40/0x1f0 [aa095ef8] [809c3d24] kernel_init_freeable+0x164/0x1d8 [aa095f28] [80002ed0] kernel_init+0x14/0x124 [aa095f38] [8000f238] ret_from_kernel_thread+0x14/0x1c [masahiroy@kernel.org: This issue happens on binutils <= 2.22 The following commit fixed it: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=d2667025dd30611514810c28bee9709e4623012a The symbol type of _text is 'T' on binutils >= 2.23 The minimal supported binutils version for the kernel build is 2.21 ] Signed-off-by: Mikhail Petrov Signed-off-by: Masahiro Yamada commit db5d85ce82487331b06ec0e076b85b5a3968bf53 Merge: ac309e7744be 1efde2754275 Author: Ingo Molnar Date: Thu Mar 19 14:59:10 2020 +0100 Merge tag 'perf-urgent-for-mingo-5.6-20200309' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: perf probe: Masami Hiramatsu: - Fix deletion of multiple probe events. - Fix userspace libraries handling by not depending on dwfl_module_addrsym(). Event parsing: Ian Rogers: - Fix reading of invalid memory in event parsing. python binding: Ilie Halip: - Fix clang detection when using CC=clang-version. build: Masami Hiramatsu: - Fix O= use with relative paths. Android: Dominik b. Czarnota: - Fix off by one in strncpy() size argument when handling Android libraries. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 870b4333a62e45b0b2000d14b301b7b8b8cad9da Author: Borislav Petkov Date: Wed Mar 18 19:27:48 2020 +0100 x86/ioremap: Fix CONFIG_EFI=n build In order to use efi_mem_type(), one needs CONFIG_EFI enabled. Otherwise that function is undefined. Use IS_ENABLED() to check and avoid the ifdeffery as the compiler optimizes away the following unreachable code then. Fixes: 985e537a4082 ("x86/ioremap: Map EFI runtime services data as encrypted for SEV") Reported-by: Randy Dunlap Signed-off-by: Borislav Petkov Tested-by: Randy Dunlap Cc: Tom Lendacky Cc: Link: https://lkml.kernel.org/r/7561e981-0d9b-d62c-0ef2-ce6007aff1ab@infradead.org commit c83557859eaa1286330a4d3d2e1ea0c0988c4604 Author: Will Deacon Date: Wed Mar 18 20:38:29 2020 +0000 arm64: kpti: Fix "kpti=off" when KASLR is enabled Enabling KASLR forces the use of non-global page-table entries for kernel mappings, as this is a decision that we have to make very early on before mapping the kernel proper. When used in conjunction with the "kpti=off" command-line option, it is possible to use non-global kernel mappings but with the kpti trampoline disabled. Since commit 09e3c22a86f6 ("arm64: Use a variable to store non-global mappings decision"), arm64_kernel_unmapped_at_el0() reflects only the use of non-global mappings and does not take into account whether the kpti trampoline is enabled. This breaks context switching of the TPIDRRO_EL0 register for 64-bit tasks, where the clearing of the register is deferred to the ret-to-user code, but it also breaks the ARM SPE PMU driver which helpfully recommends passing "kpti=off" on the command line! Report whether or not KPTI is actually enabled in arm64_kernel_unmapped_at_el0() and check the 'arm64_use_ng_mappings' global variable directly when determining the protection flags for kernel mappings. Cc: Mark Brown Reported-by: Hongbo Yao Tested-by: Hongbo Yao Fixes: 09e3c22a86f6 ("arm64: Use a variable to store non-global mappings decision") Signed-off-by: Will Deacon commit 3c025b6317272ee8493ee20fa5035c087626af48 Merge: 384d91c267e6 11a7686aa99c Author: David S. Miller Date: Wed Mar 18 18:51:43 2020 -0700 Merge branch 'wireguard-fixes' Jason A. Donenfeld says: ==================== wireguard fixes for 5.6-rc7 I originally intended to spend this cycle working on fun optimizations and architecture for WireGuard for 5.7, but I've been a bit neurotic about having 5.6 ship without any show stopper bugs. WireGuard has been stable for a long time now, but that doesn't make me any less nervous about the real deal in 5.6. To that end, I've been doing code reviews and having discussions, and we also had a security firm audit the code. That audit didn't turn up any vulnerabilities, but they did make a good defense-in-depth suggestion. This series contains: 1) Removal of a duplicated header, from YueHaibing. 2) Testing with 64-bit time in our test suite. 3) Account for skb->protocol==0 due to AF_PACKET sockets, suggested by Florian Fainelli. 4) Clean up some code in an unreachable switch/case branch, suggested by Florian Fainelli. 5) Better handling of low-order points, discussed with Mathias Hall-Andersen. ==================== Signed-off-by: David S. Miller commit 11a7686aa99c7fe4b3f80f6dcccd54129817984d Author: Jason A. Donenfeld Date: Wed Mar 18 18:30:47 2020 -0600 wireguard: noise: error out precomputed DH during handshake rather than config We precompute the static-static ECDH during configuration time, in order to save an expensive computation later when receiving network packets. However, not all ECDH computations yield a contributory result. Prior, we were just not letting those peers be added to the interface. However, this creates a strange inconsistency, since it was still possible to add other weird points, like a valid public key plus a low-order point, and, like points that result in zeros, a handshake would not complete. In order to make the behavior more uniform and less surprising, simply allow all peers to be added. Then, we'll error out later when doing the crypto if there's an issue. This also adds more separation between the crypto layer and the configuration layer. Discussed-with: Mathias Hall-Andersen Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 2b8765c52db24c0fbcc81bac9b5e8390f2c7d3c8 Author: Jason A. Donenfeld Date: Wed Mar 18 18:30:46 2020 -0600 wireguard: receive: remove dead code from default packet type case The situation in which we wind up hitting the default case here indicates a major bug in earlier parsing code. It is not a usual thing that should ever happen, which means a "friendly" message for it doesn't make sense. Rather, replace this with a WARN_ON, just like we do earlier in the file for a similar situation, so that somebody sends us a bug report and we can fix it. Reported-by: Fabian Freyer Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit a5588604af448664e796daf3c1d5a4523c60667b Author: Jason A. Donenfeld Date: Wed Mar 18 18:30:45 2020 -0600 wireguard: queueing: account for skb->protocol==0 We carry out checks to the effect of: if (skb->protocol != wg_examine_packet_protocol(skb)) goto err; By having wg_skb_examine_untrusted_ip_hdr return 0 on failure, this means that the check above still passes in the case where skb->protocol is zero, which is possible to hit with AF_PACKET: struct sockaddr_pkt saddr = { .spkt_device = "wg0" }; unsigned char buffer[5] = { 0 }; sendto(socket(AF_PACKET, SOCK_PACKET, /* skb->protocol = */ 0), buffer, sizeof(buffer), 0, (const struct sockaddr *)&saddr, sizeof(saddr)); Additional checks mean that this isn't actually a problem in the code base, but I could imagine it becoming a problem later if the function is used more liberally. I would prefer to fix this by having wg_examine_packet_protocol return a 32-bit ~0 value on failure, which will never match any value of skb->protocol, which would simply change the generated code from a mov to a movzx. However, sparse complains, and adding __force casts doesn't seem like a good idea, so instead we just add a simple helper function to check for the zero return value. Since wg_examine_packet_protocol itself gets inlined, this winds up not adding an additional branch to the generated code, since the 0 return value already happens in a mergable branch. Reported-by: Fabian Freyer Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 551599edbfff2431cef943a772fbde1c3e26eaf8 Author: Jason A. Donenfeld Date: Wed Mar 18 18:30:44 2020 -0600 wireguard: selftests: test using new 64-bit time_t In case this helps expose bugs with the newer 64-bit time_t types, we do our testing with the newer musl that supports this as well as CONFIG_COMPAT_32BIT_TIME=n. This matters to us, since wireguard does in fact deal with timestamps. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 166391159c5deb84795d2ff46e95f276177fa5fb Author: YueHaibing Date: Wed Mar 18 18:30:43 2020 -0600 wireguard: selftests: remove duplicated include This commit removes a duplicated include. Signed-off-by: YueHaibing Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 0f08b3156d28e95333556ef8d6183982a68501f7 Merge: fb33c6510d55 b216a8e7908c Author: Dave Airlie Date: Thu Mar 19 11:47:41 2020 +1000 Merge tag 'drm-misc-fixes-2020-03-18-1' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes - drm/lease: fix WARNING in idr_destroy - Fix AVI frame colorimetry in the dw-hdmi bridge. - Fix compiler warning in komeda by annotating functions as __maybe_unused. - Downgrade bochs pci_request_region failure from error to warning to workaround firmware fb. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/7654ac39-deb8-c9ca-9fd5-ef77b2636380@linux.intel.com commit 3384b043ea1564560ff19591cb9554867c7c6f77 Author: Greentime Hu Date: Tue Mar 3 17:34:18 2020 +0800 riscv: fix the IPI missing issue in nommu mode This patch fixes the IPI(inner processor interrupt) missing issue. It failed because it used hartid_mask to iterate for_each_cpu(), however the cpu_mask and hartid_mask may not be always the same. It will never send the IPI to hartid 4 because it will be skipped in for_each_cpu loop in my case. We can reproduce this case in Qemu sifive_u machine by this command. qemu-system-riscv64 -nographic -smp 5 -m 1G -M sifive_u -kernel \ arch/riscv/boot/loader It will hang in csd_lock_wait(csd) because the csd_unlock(csd) is not called. It is not called because hartid 4 doesn't receive the IPI to release this lock. The caller hart doesn't send the IPI to hartid 4 is because of hartid 4 is skipped in for_each_cpu(). It will be skipped is because "(cpu) < nr_cpu_ids" is not true. The hartid is 4 and nr_cpu_ids is 4. Therefore it should use cpumask in for_each_cpu() instead of hartid_mask. /* Send a message to all CPUs in the map */ arch_send_call_function_ipi_mask(cfd->cpumask_ipi); if (wait) { for_each_cpu(cpu, cfd->cpumask) { call_single_data_t *csd; csd = per_cpu_ptr(cfd->csd, cpu); csd_lock_wait(csd); } } for ((cpu) = -1; \ (cpu) = cpumask_next((cpu), (mask)), \ (cpu) < nr_cpu_ids;) It could boot to login console after this patch applied. Fixes: b2d36b5668f6 ("riscv: provide native clint access for M-mode") Signed-off-by: Greentime Hu Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit adccfb1a805ea84d2db38eb53032533279bdaa97 Author: Greentime Hu Date: Tue Mar 3 17:34:17 2020 +0800 riscv: uaccess should be used in nommu mode It might have the unaligned access exception when trying to exchange data with user space program. In this case, it failed in tty_ioctl(). Therefore we should enable uaccess.S for NOMMU mode since the generic code doesn't handle the unaligned access cases. 0x8013a212 : ld a5,460(s1) [ 0.115279] Oops - load address misaligned [#1] [ 0.115284] CPU: 0 PID: 29 Comm: sh Not tainted 5.4.0-rc5-00020-gb4c27160d562-dirty #36 [ 0.115294] epc: 000000008013a212 ra : 000000008013a212 sp : 000000008f48dd50 [ 0.115303] gp : 00000000801cac28 tp : 000000008fb80000 t0 : 00000000000000e8 [ 0.115312] t1 : 000000008f58f108 t2 : 0000000000000009 s0 : 000000008f48ddf0 [ 0.115321] s1 : 000000008f8c6220 a0 : 0000000000000001 a1 : 000000008f48dd28 [ 0.115330] a2 : 000000008fb80000 a3 : 00000000801a7398 a4 : 0000000000000000 [ 0.115339] a5 : 0000000000000000 a6 : 000000008f58f0c6 a7 : 000000000000001d [ 0.115348] s2 : 000000008f8c6308 s3 : 000000008f78b7c8 s4 : 000000008fb834c0 [ 0.115357] s5 : 0000000000005413 s6 : 0000000000000000 s7 : 000000008f58f2b0 [ 0.115366] s8 : 000000008f858008 s9 : 000000008f776818 s10: 000000008f776830 [ 0.115375] s11: 000000008fb840a8 t3 : 1999999999999999 t4 : 000000008f78704c [ 0.115384] t5 : 0000000000000005 t6 : 0000000000000002 [ 0.115391] status: 0000000200001880 badaddr: 000000008f8c63ec cause: 0000000000000004 [ 0.115401] ---[ end trace 00d490c6a8b6c9ac ]--- This failure could be fixed after this patch applied. [ 0.002282] Run /init as init process Initializing random number generator... [ 0.005573] random: dd: uninitialized urandom read (512 bytes read) done. Welcome to Buildroot buildroot login: root Password: Jan 1 00:00:00 login[62]: root login on 'ttySIF0' ~ # Signed-off-by: Greentime Hu Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit 384d91c267e621e0926062cfb3f20cb72dc16928 Author: Taehee Yoo Date: Wed Mar 18 13:28:09 2020 +0000 vxlan: check return value of gro_cells_init() gro_cells_init() returns error if memory allocation is failed. But the vxlan module doesn't check the return value of gro_cells_init(). Fixes: 58ce31cca1ff ("vxlan: GRO support at tunnel layer")` Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit dd2af10402684cb5840a127caec9e7cdcff6d167 Author: Paul Blakey Date: Wed Mar 18 12:50:33 2020 +0200 net/sched: act_ct: Fix leak of ct zone template on replace Currently, on replace, the previous action instance params is swapped with a newly allocated params. The old params is only freed (via kfree_rcu), without releasing the allocated ct zone template related to it. Call tcf_ct_params_free (via call_rcu) for the old params, so it will release it. Fixes: b57dc7c13ea9 ("net/sched: Introduce action ct") Signed-off-by: Paul Blakey Signed-off-by: David S. Miller commit a3c33e7a4a116f8715c0ef0e668e6aeff009c762 Author: James Zhu Date: Wed Mar 18 17:12:12 2020 -0400 drm/amdgpu: fix typo for vcn2.5/jpeg2.5 idle check fix typo for vcn2.5/jpeg2.5 idle check Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit b5689d22aa6d815f29d34f8cbd708f9d34eed70a Author: James Zhu Date: Wed Mar 18 17:10:56 2020 -0400 drm/amdgpu: fix typo for vcn2/jpeg2 idle check fix typo for vcn2/jpeg2 idle check Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit acfc62dc68770aa665cc606891f6df7d6d1e52c0 Author: James Zhu Date: Wed Mar 18 17:09:05 2020 -0400 drm/amdgpu: fix typo for vcn1 idle check fix typo for vcn1 idle check Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit dcf23ac3e846ca0cf626c155a0e3fcbbcf4fae8a Author: Linus Torvalds Date: Wed Mar 18 07:52:21 2020 -0400 locks: reinstate locks_delete_block optimization There is measurable performance impact in some synthetic tests due to commit 6d390e4b5d48 (locks: fix a potential use-after-free problem when wakeup a waiter). Fix the race condition instead by clearing the fl_blocker pointer after the wake_up, using explicit acquire/release semantics. This does mean that we can no longer use the clearing of fl_blocker as the wait condition, so switch the waiters over to checking whether the fl_blocked_member list_head is empty. Reviewed-by: yangerkun Reviewed-by: NeilBrown Fixes: 6d390e4b5d48 (locks: fix a potential use-after-free problem when wakeup a waiter) Signed-off-by: Jeff Layton Signed-off-by: Linus Torvalds commit 4b8a5cfb5fd375cf4c7502a18f0096ed2881be27 Author: Xiao Yang Date: Wed Mar 18 18:34:16 2020 +0800 modpost: Get proper section index by get_secindex() instead of st_shndx (uint16_t) st_shndx is limited to 65535(i.e. SHN_XINDEX) so sym_get_data() gets wrong section index by st_shndx if requested symbol contains extended section index that is more than 65535. In this case, we need to get proper section index by .symtab_shndx section. Module.symvers generated by building kernel with "-ffunction-sections -fdata-sections" shows the issue. Fixes: 56067812d5b0 ("kbuild: modversions: add infrastructure for emitting relative CRCs") Fixes: e84f9fbbece1 ("modpost: refactor namespace_from_kstrtabns() to not hard-code section name") Signed-off-by: Xiao Yang Signed-off-by: Masahiro Yamada commit 5076190daded2197f62fe92cf69674488be44175 Author: Linus Torvalds Date: Tue Mar 17 11:04:09 2020 -0700 mm: slub: be more careful about the double cmpxchg of freelist This is just a cleanup addition to Jann's fix to properly update the transaction ID for the slub slowpath in commit fd4d9c7d0c71 ("mm: slub: add missing TID bump.."). The transaction ID is what protects us against any concurrent accesses, but we should really also make sure to make the 'freelist' comparison itself always use the same freelist value that we then used as the new next free pointer. Jann points out that if we do all of this carefully, we could skip the transaction ID update for all the paths that only remove entries from the lists, and only update the TID when adding entries (to avoid the ABA issue with cmpxchg and list handling re-adding a previously seen value). But this patch just does the "make sure to cmpxchg the same value we used" rather than then try to be clever. Acked-by: Jann Horn Signed-off-by: Linus Torvalds commit fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8 Author: Jann Horn Date: Tue Mar 17 01:28:45 2020 +0100 mm: slub: add missing TID bump in kmem_cache_alloc_bulk() When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu freelist of length M, and N > M > 0, it will first remove the M elements from the percpu freelist, then call ___slab_alloc() to allocate the next element and repopulate the percpu freelist. ___slab_alloc() can re-enable IRQs via allocate_slab(), so the TID must be bumped before ___slab_alloc() to properly commit the freelist head change. Fix it by unconditionally bumping c->tid when entering the slowpath. Cc: stable@vger.kernel.org Fixes: ebe909e0fdb3 ("slub: improve bulk alloc strategy") Signed-off-by: Jann Horn Signed-off-by: Linus Torvalds commit b216a8e7908cd750550c0480cf7d2b3a37f06954 Author: Qiujun Huang Date: Wed Mar 18 15:53:50 2020 +0800 drm/lease: fix WARNING in idr_destroy drm_lease_create takes ownership of leases. And leases will be released by drm_master_put. drm_master_put ->drm_master_destroy ->idr_destroy So we needn't call idr_destroy again. Reported-and-tested-by: syzbot+05835159fe322770fe3d@syzkaller.appspotmail.com Signed-off-by: Qiujun Huang Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1584518030-4173-1-git-send-email-hqjagain@gmail.com commit 6e622cd8bd888c7fa3ee2b7dfb3514ab53b21570 Author: Eric Biggers Date: Mon Feb 24 10:20:44 2020 -0800 tty: fix compat TIOCGSERIAL checking wrong function ptr Commit 77654350306a ("take compat TIOC[SG]SERIAL treatment into tty_compat_ioctl()") changed the compat version of TIOCGSERIAL to start checking for the presence of the ->set_serial function pointer rather than ->get_serial. This appears to be a copy-and-paste error, since ->get_serial is the function pointer that is called as well as the pointer that is checked by the non-compat version of TIOCGSERIAL. Fix this by checking the correct function pointer. Fixes: 77654350306a ("take compat TIOC[SG]SERIAL treatment into tty_compat_ioctl()") Cc: # v4.20+ Signed-off-by: Eric Biggers Acked-by: Jiri Slaby Link: https://lore.kernel.org/r/20200224182044.234553-3-ebiggers@kernel.org Signed-off-by: Greg Kroah-Hartman commit 17329563a97df3ba474eca5037c1336e46e14ff8 Author: Eric Biggers Date: Mon Feb 24 10:20:43 2020 -0800 tty: fix compat TIOCGSERIAL leaking uninitialized memory Commit 77654350306a ("take compat TIOC[SG]SERIAL treatment into tty_compat_ioctl()") changed the compat version of TIOCGSERIAL to start copying a whole 'serial_struct32' to userspace rather than individual fields, but failed to initialize all padding and fields -- namely the hole after the 'iomem_reg_shift' field, and the 'reserved' field. Fix this by initializing the struct to zero. [v2: use sizeof, and convert the adjacent line for consistency.] Reported-by: syzbot+8da9175e28eadcb203ce@syzkaller.appspotmail.com Fixes: 77654350306a ("take compat TIOC[SG]SERIAL treatment into tty_compat_ioctl()") Cc: # v4.20+ Signed-off-by: Eric Biggers Acked-by: Jiri Slaby Link: https://lore.kernel.org/r/20200224182044.234553-2-ebiggers@kernel.org Signed-off-by: Greg Kroah-Hartman commit ed069827ca70af057caf21c395f76c2c0b82d429 Author: Eric Biggers Date: Sun Feb 23 23:33:59 2020 -0800 tty: drop outdated comments about release_tty() locking The current version of the TTY code unlocks the tty_struct(s) before release_tty() rather than after. Moreover, tty_unlock_pair() no longer exists. Thus, remove the outdated comments regarding tty_unlock_pair(). Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20200224073359.292795-1-ebiggers@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4686392c32361c97e8434adf9cc77ad7991bfa81 Author: Ricky Wu Date: Mon Mar 16 10:52:32 2020 +0800 mmc: rtsx_pci: Fix support for speed-modes that relies on tuning The TX/RX register should not be treated the same way to allow for better support of tuning. Fix this by using a default initial value for TX. Signed-off-by: Ricky Wu Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200316025232.1167-1-ricky_wu@realtek.com [Ulf: Updated changelog] Signed-off-by: Ulf Hansson Acked-by: Greg Kroah-Hartman commit add492d2e9446a77ede9bb43699ec85ca8fc1aba Author: Alexander Shishkin Date: Tue Mar 17 08:22:15 2020 +0200 intel_th: pci: Add Elkhart Lake CPU support This adds support for the Trace Hub in Elkhart Lake CPU. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200317062215.15598-7-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ce666be89a8a09c5924ff08fc32e119f974bdab6 Author: Alexander Shishkin Date: Tue Mar 17 08:22:14 2020 +0200 intel_th: Fix user-visible error codes There are a few places in the driver that end up returning ENOTSUPP to the user, replace those with EINVAL. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Fixes: ba82664c134ef ("intel_th: Add Memory Storage Unit driver") Cc: stable@vger.kernel.org # v4.4+ Link: https://lore.kernel.org/r/20200317062215.15598-6-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 885f123554bbdc1807ca25a374be6e9b3bddf4de Author: Alexander Shishkin Date: Tue Mar 17 08:22:13 2020 +0200 intel_th: msu: Fix the unexpected state warning The unexpected state warning should only warn on illegal state transitions. Fix that. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Fixes: 615c164da0eb4 ("intel_th: msu: Introduce buffer interface") Cc: stable@vger.kernel.org # v5.4+ Link: https://lore.kernel.org/r/20200317062215.15598-5-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 283f87c0d5d32b4a5c22636adc559bca82196ed3 Author: Alexander Shishkin Date: Tue Mar 17 08:22:11 2020 +0200 stm class: sys-t: Fix the use of time_after() The operands of time_after() are in a wrong order in both instances in the sys-t driver. Fix that. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Fixes: 39f10239df75 ("stm class: p_sys-t: Add support for CLOCKSYNC packets") Fixes: d69d5e83110f ("stm class: Add MIPI SyS-T protocol support") Cc: stable@vger.kernel.org # v4.20+ Link: https://lore.kernel.org/r/20200317062215.15598-3-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 14800df6a020d38847fec77ac5a43dc221e5edfc Merge: bb5786b9286c 10856d88f765 Author: Greg Kroah-Hartman Date: Wed Mar 18 11:20:42 2020 +0100 Merge tag 'iio-fixes-for-5.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First set of IIO fixes in the 5.6 cycle. * adxl372 - Fix marking of buffered values as big endian. * ak8974 - Fix wrong handling of negative values when read from sysfs. * at91-sama5d2 - Fix differential mode by ensuring configuration set correctly. * ping - Use the write sensor type for of_ping_match table. * sps30 - Kconfig build dependency fix. * st-sensors - Fix a wrong identification of which part the SMO8840 ACPI ID indicates. * stm32-dsfdm - Fix a sleep in atomic issue by not using a trigger when it makes no sense. * stm32-timer - Make sure master mode is disabled when stopping. * vcnl400 - Update some sampling periods based on new docs. * tag 'iio-fixes-for-5.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: ping: set pa_laser_ping_cfg in of_ping_match iio: chemical: sps30: fix missing triggered buffer dependency iio: st_sensors: remap SMO8840 to LIS2DH12 iio: light: vcnl4000: update sampling periods for vcnl4040 iio: light: vcnl4000: update sampling periods for vcnl4200 iio: accel: adxl372: Set iio_chan BE iio: magnetometer: ak8974: Fix negative raw values in sysfs iio: trigger: stm32-timer: disable master mode when stopping iio: adc: stm32-dfsdm: fix sleep in atomic context iio: adc: at91-sama5d2_adc: fix differential channels in triggered mode commit 2866ce8696167de300e27d50d521b5f671bab5d4 Merge: b401f8c4f492 cecc113c1af0 Author: Greg Kroah-Hartman Date: Wed Mar 18 10:42:57 2020 +0100 Merge tag 'usb-serial-5.6-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 5.6-rc7 Here are a couple of new device ids for 5.6-rc. All have been in linux-next with no reported issues. * tag 'usb-serial-5.6-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: pl2303: add device-id for HP LD381 USB: serial: option: add ME910G1 ECM composition 0x110b commit 2de9780f75076c1a1f122cbd39df0fa545284724 Author: Mauro Carvalho Chehab Date: Tue Mar 17 15:54:20 2020 +0100 net: core: dev.c: fix a documentation warning There's a markup for link with is "foo_". On this kernel-doc comment, we don't want this, but instead, place a literal reference. So, escape the literal with ``foo``, in order to avoid this warning: ./net/core/dev.c:5195: WARNING: Unknown target name: "page_is". Signed-off-by: Mauro Carvalho Chehab Signed-off-by: David S. Miller commit 6497ca07f5e91131c6c05e4564d7f98a780aa02b Author: Mauro Carvalho Chehab Date: Tue Mar 17 15:54:19 2020 +0100 net: phy: sfp-bus.c: get rid of docs warnings The indentation for the returned values are weird, causing those warnings: ./drivers/net/phy/sfp-bus.c:579: WARNING: Unexpected indentation. ./drivers/net/phy/sfp-bus.c:619: WARNING: Unexpected indentation. Use a list and change the identation for it to be properly parsed by the documentation toolchain. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: David S. Miller commit 155385754a9cb8489074372b766e402f527eba7b Merge: 872307abbd0d dfdde1345bc1 Author: David S. Miller Date: Tue Mar 17 21:24:23 2020 -0700 Merge branch 'ENA-driver-bug-fixes' Arthur Kiyanovski says: ==================== ENA driver bug fixes ==================== Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit dfdde1345bc124816f0fd42fa91b8748051e758e Author: Arthur Kiyanovski Date: Tue Mar 17 09:06:42 2020 +0200 net: ena: fix continuous keep-alive resets last_keep_alive_jiffies is updated in probe and when a keep-alive event is received. In case the driver times-out on a keep-alive event, it has high chances of continuously timing-out on keep-alive events. This is because when the driver recovers from the keep-alive-timeout reset the value of last_keep_alive_jiffies is very old, and if a keep-alive event is not received before the next timer expires, the value of last_keep_alive_jiffies will cause another keep-alive-timeout reset and so forth in a loop. Solution: Update last_keep_alive_jiffies whenever the device is restored after reset. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Noam Dagan Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 30623e1ed116bcd1785217d0a98eec643687e091 Author: Arthur Kiyanovski Date: Tue Mar 17 09:06:41 2020 +0200 net: ena: avoid memory access violation by validating req_id properly Rx req_id is an index in struct ena_eth_io_rx_cdesc_base. The driver should validate that the Rx req_id it received from the device is in range [0, ring_size -1]. Failure to do so could yield to potential memory access violoation. The validation was mistakenly done when refilling the Rx submission queue and not in Rx completion queue. Fixes: ad974baef2a1 ("net: ena: add support for out of order rx buffers refill") Signed-off-by: Noam Dagan Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit e02ae6ed51be3d28923bfd318ae57000f5643da5 Author: Arthur Kiyanovski Date: Tue Mar 17 09:06:40 2020 +0200 net: ena: fix request of incorrect number of IRQ vectors Bug: In short the main issue is caused by the fact that the number of queues is changed using ethtool after ena_probe() has been called and before ena_up() was executed. Here is the full scenario in detail: * ena_probe() is called when the driver is loaded, the driver is not up yet at the end of ena_probe(). * The number of queues is changed -> io_queue_count is changed as well - ena_up() is not called since the "dev_was_up" boolean in ena_update_queue_count() is false. * ena_up() is called by the kernel (it's called asynchronously some time after ena_probe()). ena_setup_io_intr() is called by ena_up() and it uses io_queue_count to get the suitable irq lines for each msix vector. The function ena_request_io_irq() is called right after that and it uses msix_vecs - This value only changes during ena_probe() and ena_restore() - to request the irq vectors. This results in "Failed to request I/O IRQ" error for i > io_queue_count. Numeric example: * After ena_probe() io_queue_count = 8, msix_vecs = 9. * The number of queues changes to 4 -> io_queue_count = 4, msix_vecs = 9. * ena_up() is executed for the first time: ** ena_setup_io_intr() inits the vectors only up to io_queue_count. ** ena_request_io_irq() calls request_irq() and fails for i = 5. How to reproduce: simply run the following commands: sudo rmmod ena && sudo insmod ena.ko; sudo ethtool -L eth1 combined 3; Fix: Use ENA_MAX_MSIX_VEC(adapter->num_io_queues + adapter->xdp_num_queues) instead of adapter->msix_vecs. We need to take XDP queues into consideration as they need to have msix vectors assigned to them as well. Note that the XDP cannot be attached before the driver is up and running but in XDP mode the issue might occur when the number of queues changes right after a reset trigger. The ENA_MAX_MSIX_VEC simply adds one to the argument since the first msix vector is reserved for management queue. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit ce1f352162828ba07470328828a32f47aa759020 Author: Arthur Kiyanovski Date: Tue Mar 17 09:06:39 2020 +0200 net: ena: fix incorrect setting of the number of msix vectors Overview: We don't frequently change the msix vectors throughout the life cycle of the driver. We do so in two functions: ena_probe() and ena_restore(). ena_probe() is only called when the driver is loaded. ena_restore() on the other hand is called during device reset / resume operations. We use num_io_queues for calculating and allocating the number of msix vectors. At ena_probe() this value is equal to max_num_io_queues and thus this is not an issue, however ena_restore() might be called after the number of io queues has changed. A possible bug scenario is as follows: * Change number of queues from 8 to 4. (num_io_queues = 4, max_num_io_queues = 8, msix_vecs = 9,) * Trigger reset occurs -> ena_restore is called. (num_io_queues = 4, max_num_io_queues =8 , msix_vecs = 5) * Change number of queues from 4 to 6. (num_io_queues = 6, max_num_io_queues = 8, msix_vecs = 5) * The driver will reset due to failure of check_for_rx_interrupt_queue() Fix: This can be easily fixed by always using max_num_io_queues to init the msix_vecs, since this number won't change as opposed to num_io_queues. Fixes: 4d19266022ec ("net: ena: multiple queue creation related cleanups") Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 872307abbd0d9afd72171929806c2fa33dc34179 Author: Rayagonda Kokatanur Date: Tue Mar 17 10:24:35 2020 +0530 net: phy: mdio-mux-bcm-iproc: check clk_prepare_enable() return value Check clk_prepare_enable() return value. Fixes: 2c7230446bc9 ("net: phy: Add pm support to Broadcom iProc mdio mux driver") Signed-off-by: Rayagonda Kokatanur Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit af4e6671b21ff20ad189360d3a5a1d584c183091 Merge: d36963b861c1 88f6c8bf1aae Author: David S. Miller Date: Tue Mar 17 21:00:15 2020 -0700 Merge branch 'net-bcmgenet-revisit-MAC-reset' Doug Berger says: ==================== net: bcmgenet: revisit MAC reset Commit 3a55402c9387 ("net: bcmgenet: use RGMII loopback for MAC reset") was intended to resolve issues with reseting the UniMAC core within the GENET block by providing better control over the clocks used by the UniMAC core. Unfortunately, it is not compatible with all of the supported system configurations so an alternative method must be applied. This commit set provides such an alternative. The first commit reverts the previous change and the second commit provides the alternative reset sequence that addresses the concerns observed with the previous implementation. This replacement implementation should be applied to the stable branches wherever commit 3a55402c9387 ("net: bcmgenet: use RGMII loopback for MAC reset") has been applied. Unfortunately, reverting that commit may conflict with some restructuring changes introduced by commit 4f8d81b77e66 ("net: bcmgenet: Refactor register access in bcmgenet_mii_config"). The first commit in this set has been manually edited to resolve the conflict on net/master. I would be happy to help stable maintainers with resolving any such conflicts if they occur. However, I do not expect that commit to have been backported to stable branch so hopefully the revert can be applied cleanly. ==================== Signed-off-by: David S. Miller commit 88f6c8bf1aaed5039923fb4c701cab4d42176275 Author: Doug Berger Date: Mon Mar 16 14:44:56 2020 -0700 net: bcmgenet: keep MAC in reset until PHY is up As noted in commit 28c2d1a7a0bf ("net: bcmgenet: enable loopback during UniMAC sw_reset") the UniMAC must be clocked at least 5 cycles while the sw_reset is asserted to ensure a clean reset. That commit enabled local loopback to provide an Rx clock from the GENET sourced Tx clk. However, when connected in MII mode the Tx clk is sourced by the PHY so if an EPHY is not supplying clocks (e.g. when the link is down) the UniMAC does not receive the necessary clocks. This commit extends the sw_reset window until the PHY reports that the link is up thereby ensuring that the clocks are being provided to the MAC to produce a clean reset. One consequence is that if the system attempts to enter a Wake on LAN suspend state when the PHY link has not been active the MAC may not have had a chance to initialize cleanly. In this case, we remove the sw_reset and enable the WoL reception path as normal with the hope that the PHY will provide the necessary clocks to drive the WoL blocks if the link becomes active after the system has entered suspend. Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file") Signed-off-by: Doug Berger Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 612eb1c3b9e504de24136c947ed7c07bc342f3aa Author: Doug Berger Date: Mon Mar 16 14:44:55 2020 -0700 Revert "net: bcmgenet: use RGMII loopback for MAC reset" This reverts commit 3a55402c93877d291b0a612d25edb03d1b4b93ac. This is not a good solution when connecting to an external switch that may not support the isolation of the TXC signal resulting in output driver contention on the pin. A different solution is necessary. Signed-off-by: Doug Berger Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit d36963b861c1ca352810cec2497e3dabf2333e11 Merge: 32ca98feab8c fa2632f74e57 Author: David S. Miller Date: Tue Mar 17 20:54:37 2020 -0700 Merge branch 'net-mvmdio-avoid-error-message-for-optional-IRQ' Chris Packham says: ==================== net: mvmdio: avoid error message for optional IRQ I've gone ahead an sent a revert. This is the same as the original v1 except I've added Andrew's review to the commit message. ==================== Signed-off-by: David S. Miller commit fa2632f74e57bbc869c8ad37751a11b6147a3acc Author: Chris Packham Date: Mon Mar 16 20:49:07 2020 +1300 net: mvmdio: avoid error message for optional IRQ Per the dt-binding the interrupt is optional so use platform_get_irq_optional() instead of platform_get_irq(). Since commit 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") platform_get_irq() produces an error message orion-mdio f1072004.mdio: IRQ index 0 not found which is perfectly normal if one hasn't specified the optional property in the device tree. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 028fd76b9b1cc9e195ce60790791fd3f37b9b5d7 Author: Chris Packham Date: Mon Mar 16 20:49:06 2020 +1300 Revert "net: mvmdio: avoid error message for optional IRQ" This reverts commit e1f550dc44a4d535da4e25ada1b0eaf8f3417929. platform_get_irq_optional() will still return -ENXIO when no interrupt is provided so the additional error handling caused the driver prone to fail when no interrupt was specified. Revert the change so we can apply the correct minimal fix. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 3b059da9835c200d9533361f8b404fdcab007632 Author: Rajat Jain Date: Tue Mar 17 20:03:33 2020 -0700 Input: allocate keycode for "Selective Screenshot" key New Chrome OS keyboards have a "snip" key that is basically a selective screenshot (allows a user to select an area of screen to be copied). Allocate a keycode for it. Signed-off-by: Rajat Jain Reviewed-by: Harry Cutts Link: https://lore.kernel.org/r/20200313180333.75011-1-rajatja@google.com Signed-off-by: Dmitry Torokhov commit f50b7dacccbab2b9e3ef18f52a6dcc18ed2050b9 Author: Cristian Marussi Date: Wed Mar 11 17:12:45 2020 +0000 arm64: smp: fix crash_smp_send_stop() behaviour On a system configured to trigger a crash_kexec() reboot, when only one CPU is online and another CPU panics while starting-up, crash_smp_send_stop() will fail to send any STOP message to the other already online core, resulting in fail to freeze and registers not properly saved. Moreover even if the proper messages are sent (case CPUs > 2) it will similarly fail to account for the booting CPU when executing the final stop wait-loop, so potentially resulting in some CPU not been waited for shutdown before rebooting. A tangible effect of this behaviour can be observed when, after a panic with kexec enabled and loaded, on the following reboot triggered by kexec, the cpu that could not be successfully stopped fails to come back online: [ 362.291022] ------------[ cut here ]------------ [ 362.291525] kernel BUG at arch/arm64/kernel/cpufeature.c:886! [ 362.292023] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [ 362.292400] Modules linked in: [ 362.292970] CPU: 3 PID: 0 Comm: swapper/3 Kdump: loaded Not tainted 5.6.0-rc4-00003-gc780b890948a #105 [ 362.293136] Hardware name: Foundation-v8A (DT) [ 362.293382] pstate: 200001c5 (nzCv dAIF -PAN -UAO) [ 362.294063] pc : has_cpuid_feature+0xf0/0x348 [ 362.294177] lr : verify_local_elf_hwcaps+0x84/0xe8 [ 362.294280] sp : ffff800011b1bf60 [ 362.294362] x29: ffff800011b1bf60 x28: 0000000000000000 [ 362.294534] x27: 0000000000000000 x26: 0000000000000000 [ 362.294631] x25: 0000000000000000 x24: ffff80001189a25c [ 362.294718] x23: 0000000000000000 x22: 0000000000000000 [ 362.294803] x21: ffff8000114aa018 x20: ffff800011156a00 [ 362.294897] x19: ffff800010c944a0 x18: 0000000000000004 [ 362.294987] x17: 0000000000000000 x16: 0000000000000000 [ 362.295073] x15: 00004e53b831ae3c x14: 00004e53b831ae3c [ 362.295165] x13: 0000000000000384 x12: 0000000000000000 [ 362.295251] x11: 0000000000000000 x10: 00400032b5503510 [ 362.295334] x9 : 0000000000000000 x8 : ffff800010c7e204 [ 362.295426] x7 : 00000000410fd0f0 x6 : 0000000000000001 [ 362.295508] x5 : 00000000410fd0f0 x4 : 0000000000000000 [ 362.295592] x3 : 0000000000000000 x2 : ffff8000100939d8 [ 362.295683] x1 : 0000000000180420 x0 : 0000000000180480 [ 362.296011] Call trace: [ 362.296257] has_cpuid_feature+0xf0/0x348 [ 362.296350] verify_local_elf_hwcaps+0x84/0xe8 [ 362.296424] check_local_cpu_capabilities+0x44/0x128 [ 362.296497] secondary_start_kernel+0xf4/0x188 [ 362.296998] Code: 52805001 72a00301 6b01001f 54000ec0 (d4210000) [ 362.298652] SMP: stopping secondary CPUs [ 362.300615] Starting crashdump kernel... [ 362.301168] Bye! [ 0.000000] Booting Linux on physical CPU 0x0000000003 [0x410fd0f0] [ 0.000000] Linux version 5.6.0-rc4-00003-gc780b890948a (crimar01@e120937-lin) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #105 SMP PREEMPT Fri Mar 6 17:00:42 GMT 2020 [ 0.000000] Machine model: Foundation-v8A [ 0.000000] earlycon: pl11 at MMIO 0x000000001c090000 (options '') [ 0.000000] printk: bootconsole [pl11] enabled ..... [ 0.138024] rcu: Hierarchical SRCU implementation. [ 0.153472] its@2f020000: unable to locate ITS domain [ 0.154078] its@2f020000: Unable to locate ITS domain [ 0.157541] EFI services will not be available. [ 0.175395] smp: Bringing up secondary CPUs ... [ 0.209182] psci: failed to boot CPU1 (-22) [ 0.209377] CPU1: failed to boot: -22 [ 0.274598] Detected PIPT I-cache on CPU2 [ 0.278707] GICv3: CPU2: found redistributor 1 region 0:0x000000002f120000 [ 0.285212] CPU2: Booted secondary processor 0x0000000001 [0x410fd0f0] [ 0.369053] Detected PIPT I-cache on CPU3 [ 0.372947] GICv3: CPU3: found redistributor 2 region 0:0x000000002f140000 [ 0.378664] CPU3: Booted secondary processor 0x0000000002 [0x410fd0f0] [ 0.401707] smp: Brought up 1 node, 3 CPUs [ 0.404057] SMP: Total of 3 processors activated. Make crash_smp_send_stop() account also for the online status of the calling CPU while evaluating how many CPUs are effectively online: this way the right number of STOPs is sent and all other stopped-cores's registers are properly saved. Fixes: 78fd584cdec05 ("arm64: kdump: implement machine_crash_shutdown()") Acked-by: Mark Rutland Signed-off-by: Cristian Marussi Signed-off-by: Will Deacon commit d0bab0c39e32d39a8c5cddca72e5b4a3059fe050 Author: Cristian Marussi Date: Wed Mar 11 17:12:44 2020 +0000 arm64: smp: fix smp_send_stop() behaviour On a system with only one CPU online, when another one CPU panics while starting-up, smp_send_stop() will fail to send any STOP message to the other already online core, resulting in a system still responsive and alive at the end of the panic procedure. [ 186.700083] CPU3: shutdown [ 187.075462] CPU2: shutdown [ 187.162869] CPU1: shutdown [ 188.689998] ------------[ cut here ]------------ [ 188.691645] kernel BUG at arch/arm64/kernel/cpufeature.c:886! [ 188.692079] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [ 188.692444] Modules linked in: [ 188.693031] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 5.6.0-rc4-00001-g338d25c35a98 #104 [ 188.693175] Hardware name: Foundation-v8A (DT) [ 188.693492] pstate: 200001c5 (nzCv dAIF -PAN -UAO) [ 188.694183] pc : has_cpuid_feature+0xf0/0x348 [ 188.694311] lr : verify_local_elf_hwcaps+0x84/0xe8 [ 188.694410] sp : ffff800011b1bf60 [ 188.694536] x29: ffff800011b1bf60 x28: 0000000000000000 [ 188.694707] x27: 0000000000000000 x26: 0000000000000000 [ 188.694801] x25: 0000000000000000 x24: ffff80001189a25c [ 188.694905] x23: 0000000000000000 x22: 0000000000000000 [ 188.694996] x21: ffff8000114aa018 x20: ffff800011156a38 [ 188.695089] x19: ffff800010c944a0 x18: 0000000000000004 [ 188.695187] x17: 0000000000000000 x16: 0000000000000000 [ 188.695280] x15: 0000249dbde5431e x14: 0262cbe497efa1fa [ 188.695371] x13: 0000000000000002 x12: 0000000000002592 [ 188.695472] x11: 0000000000000080 x10: 00400032b5503510 [ 188.695572] x9 : 0000000000000000 x8 : ffff800010c80204 [ 188.695659] x7 : 00000000410fd0f0 x6 : 0000000000000001 [ 188.695750] x5 : 00000000410fd0f0 x4 : 0000000000000000 [ 188.695836] x3 : 0000000000000000 x2 : ffff8000100939d8 [ 188.695919] x1 : 0000000000180420 x0 : 0000000000180480 [ 188.696253] Call trace: [ 188.696410] has_cpuid_feature+0xf0/0x348 [ 188.696504] verify_local_elf_hwcaps+0x84/0xe8 [ 188.696591] check_local_cpu_capabilities+0x44/0x128 [ 188.696666] secondary_start_kernel+0xf4/0x188 [ 188.697150] Code: 52805001 72a00301 6b01001f 54000ec0 (d4210000) [ 188.698639] ---[ end trace 3f12ca47652f7b72 ]--- [ 188.699160] Kernel panic - not syncing: Attempted to kill the idle task! [ 188.699546] Kernel Offset: disabled [ 188.699828] CPU features: 0x00004,20c02008 [ 188.700012] Memory Limit: none [ 188.700538] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]--- [root@arch ~]# echo Helo Helo [root@arch ~]# cat /proc/cpuinfo | grep proce processor : 0 Make smp_send_stop() account also for the online status of the calling CPU while evaluating how many CPUs are effectively online: this way, the right number of STOPs is sent, so enforcing a proper freeze of the system at the end of panic even under the above conditions. Fixes: 08e875c16a16c ("arm64: SMP support") Reported-by: Dave Martin Acked-by: Mark Rutland Signed-off-by: Cristian Marussi Signed-off-by: Will Deacon commit 8e7ae2518f5265f0ef09d561748098fde5a87ccd Author: Martin KaFai Lau Date: Fri Mar 13 18:02:09 2020 -0700 bpf: Sanitize the bpf_struct_ops tcp-cc name The bpf_struct_ops tcp-cc name should be sanitized in order to avoid problematic chars (e.g. whitespaces). This patch reuses the bpf_obj_name_cpy() for accepting the same set of characters in order to keep a consistent bpf programming experience. A "size" param is added. Also, the strlen is returned on success so that the caller (like the bpf_tcp_ca here) can error out on empty name. The existing callers of the bpf_obj_name_cpy() only need to change the testing statement to "if (err < 0)". For all these existing callers, the err will be overwritten later, so no extra change is needed for the new strlen return value. v3: - reverse xmas tree style v2: - Save the orig_src to avoid "end - size" (Andrii) Fixes: 0baf26b0fcd7 ("bpf: tcp: Support tcp_congestion_ops in bpf") Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200314010209.1131542-1-kafai@fb.com commit b401f8c4f492cbf74f3f59c9141e5be3071071bb Author: Anthony Mallet Date: Thu Mar 12 14:31:01 2020 +0100 USB: cdc-acm: fix rounding error in TIOCSSERIAL By default, tty_port_init() initializes those parameters to a multiple of HZ. For instance in line 69 of tty_port.c: port->close_delay = (50 * HZ) / 100; https://github.com/torvalds/linux/blob/master/drivers/tty/tty_port.c#L69 With e.g. CONFIG_HZ = 250 (as this is the case for Ubuntu 18.04 linux-image-4.15.0-37-generic), the default setting for close_delay is thus 125. When ioctl(fd, TIOCGSERIAL, &s) is executed, the setting returned in user space is '12' (125/10). When ioctl(fd, TIOCSSERIAL, &s) is then executed with the same setting '12', the value is interpreted as '120' which is different from the current setting and a EPERM error may be raised by set_serial_info() if !CAP_SYS_ADMIN. https://github.com/torvalds/linux/blob/master/drivers/usb/class/cdc-acm.c#L919 Fixes: ba2d8ce9db0a6 ("cdc-acm: implement TIOCSSERIAL to avoid blocking close(2)") Signed-off-by: Anthony Mallet Cc: stable Link: https://lore.kernel.org/r/20200312133101.7096-2-anthony.mallet@laas.fr Signed-off-by: Greg Kroah-Hartman commit 633e2b2ded739a34bd0fb1d8b5b871f7e489ea29 Author: Anthony Mallet Date: Thu Mar 12 14:31:00 2020 +0100 USB: cdc-acm: fix close_delay and closing_wait units in TIOCSSERIAL close_delay and closing_wait are specified in hundredth of a second but stored internally in jiffies. Use the jiffies_to_msecs() and msecs_to_jiffies() functions to convert from each other. Signed-off-by: Anthony Mallet Cc: stable Link: https://lore.kernel.org/r/20200312133101.7096-1-anthony.mallet@laas.fr Signed-off-by: Greg Kroah-Hartman commit 75d7676ead19b1fbb5e0ee934c9ccddcb666b68c Author: Hans de Goede Date: Fri Mar 13 13:07:08 2020 +0100 usb: quirks: add NO_LPM quirk for RTL8153 based ethernet adapters We have been receiving bug reports that ethernet connections over RTL8153 based ethernet adapters stops working after a while with errors like these showing up in dmesg when the ethernet stops working: [12696.189484] r8152 6-1:1.0 enp10s0u1: Tx timeout [12702.333456] r8152 6-1:1.0 enp10s0u1: Tx timeout [12707.965422] r8152 6-1:1.0 enp10s0u1: Tx timeout This has been reported on Dell WD15 docks, Belkin USB-C Express Dock 3.1 docks and with generic USB to ethernet dongles using the RTL8153 chipsets. Some users have tried adding usbcore.quirks=0bda:8153:k to the kernel commandline and all users who have tried this report that this fixes this. Also note that we already have an existing NO_LPM quirk for the RTL8153 used in the Microsoft Surface Dock (where it uses a different usb-id). This commit adds a NO_LPM quirk for the generic Realtek RTL8153 0bda:8153 usb-id, fixing the Tx timeout errors on these devices. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=198931 Cc: stable@vger.kernel.org Cc: russianneuromancer@ya.ru Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200313120708.100339-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 7368760d1bcdabf515c41a502568b489de3da683 Author: Peter Chen Date: Mon Mar 16 11:10:34 2020 +0800 usb: chipidea: udc: fix sleeping function called from invalid context The code calls pm_runtime_get_sync with irq disabled, it causes below warning: BUG: sleeping function called from invalid context at wer/runtime.c:1075 in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: er/u8:1 CPU: 1 PID: 37 Comm: kworker/u8:1 Not tainted 20200304-00181-gbebfd2a5be98 #1588 Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) Workqueue: ci_otg ci_otg_work [] (unwind_backtrace) from [] 1/0x14) [] (show_stack) from [] 5/0x94) [] (dump_stack) from [] +0xeb/0x118) [] (___might_sleep) from [] esume+0x75/0x78) [] (__pm_runtime_resume) from [] 0x23/0x74) [] (ci_udc_pullup) from [] nect+0x2b/0xcc) [] (usb_gadget_connect) from [] _connect+0x59/0x104) [] (ci_hdrc_gadget_connect) from [] ssion+0x43/0x48) [] (ci_udc_vbus_session) from [] s_connect+0x17/0x9c) [] (usb_gadget_vbus_connect) from [] bd/0x128) [] (ci_otg_work) from [] rk+0x149/0x404) [] (process_one_work) from [] 0xf7/0x3bc) [] (worker_thread) from [] x118) [] (kthread) from [] (ret_from_fork+0x11/0x34) Tested-by: Dmitry Osipenko Cc: #v5.5 Fixes: 72dc8df7920f ("usb: chipidea: udc: protect usb interrupt enable") Reported-by: Dmitry Osipenko Signed-off-by: Peter Chen Link: https://lore.kernel.org/r/20200316031034.17847-2-peter.chen@kernel.org Signed-off-by: Greg Kroah-Hartman commit 979a2665eb6c603ddce0ab374041ab101827b2e7 Author: Murphy Zhou Date: Sat Mar 14 11:38:31 2020 +0800 CIFS: fiemap: do not return EINVAL if get nothing If we call fiemap on a truncated file with none blocks allocated, it makes sense we get nothing from this call. No output means no blocks have been counted, but the call succeeded. It's a valid response. Simple example reproducer: xfs_io -f 'truncate 2M' -c 'fiemap -v' /cifssch/testfile xfs_io: ioctl(FS_IOC_FIEMAP) ["/cifssch/testfile"]: Invalid argument Signed-off-by: Murphy Zhou Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky CC: Stable commit 1be1fa42ebb73ad8fd67d2c846931361b4e3dd0a Author: Shyam Prasad N Date: Mon Mar 9 01:35:09 2020 -0700 CIFS: Increment num_remote_opens stats counter even in case of smb2_query_dir_first The num_remote_opens counter keeps track of the number of open files which must be maintained by the server at any point. This is a per-tree-connect counter, and the value of this counter gets displayed in the /proc/fs/cifs/Stats output as a following... Open files: 0 total (local), 1 open on server ^^^^^^^^^^^^^^^^ As a thumb-rule, we want to increment this counter for each open/create that we successfully execute on the server. Similarly, we should decrement the counter when we successfully execute a close. In this case, an increment was being missed in case of smb2_query_dir_first, in case of successful open. As a result, we would underflow the counter and we could even see the counter go to negative after sufficient smb2_query_dir_first calls. I tested the stats counter for a bunch of filesystem operations with the fix. And it looks like the counter looks correct to me. I also check if we missed the increments and decrements elsewhere. It does not seem so. Few other cases where an open is done and we don't increment the counter are the compound calls where the corresponding close is also sent in the request. Signed-off-by: Shyam Prasad N CC: Stable Signed-off-by: Steve French Reviewed-by: Aurelien Aptel Reviewed-by: Pavel Shilovsky commit 39946886fc865a4c26f1b3ea0805936db2d8986d Author: Dan Carpenter Date: Fri Feb 28 12:22:59 2020 +0300 cifs: potential unintitliazed error code in cifs_getattr() Smatch complains that "rc" could be uninitialized. fs/cifs/inode.c:2206 cifs_getattr() error: uninitialized symbol 'rc'. Changing it to "return 0;" improves readability as well. Fixes: cc1baf98c8f6 ("cifs: do not ignore the SYNC flags in getattr") Signed-off-by: Dan Carpenter Signed-off-by: Steve French Acked-by: Ronnie Sahlberg commit a124458a127ccd7629e20cd7bae3e1f758ed32aa Author: Jian-Hong Pan Date: Tue Mar 17 16:28:09 2020 +0800 ALSA: hda/realtek - Enable the headset of Acer N50-600 with ALC662 A headset on the desktop like Acer N50-600 does not work, until quirk ALC662_FIXUP_ACER_NITRO_HEADSET_MODE is applied. Signed-off-by: Jian-Hong Pan Cc: Link: https://lore.kernel.org/r/20200317082806.73194-3-jian-hong@endlessm.com Signed-off-by: Takashi Iwai commit d858c706bdca97698752bd26b60c21ec07ef04f2 Author: Jian-Hong Pan Date: Tue Mar 17 16:28:07 2020 +0800 ALSA: hda/realtek - Enable headset mic of Acer X2660G with ALC662 The Acer desktop X2660G with ALC662 can't detect the headset microphone until ALC662_FIXUP_ACER_X2660G_HEADSET_MODE quirk applied. Signed-off-by: Jian-Hong Pan Cc: Link: https://lore.kernel.org/r/20200317082806.73194-2-jian-hong@endlessm.com Signed-off-by: Takashi Iwai commit dfa7ea303f56a3a8b1ed3b91ef35af2da67ca4ee Author: Roger Quadros Date: Mon Mar 16 12:27:31 2020 +0200 ARM: dts: omap5: Add bus_dma_limit for L3 bus The L3 interconnect's memory map is from 0x0 to 0xffffffff. Out of this, System memory (SDRAM) can be accessed from 0x80000000 to 0xffffffff (2GB) OMAP5 does support 4GB of SDRAM but upper 2GB can only be accessed by the MPU subsystem. Add the dma-ranges property to reflect the physical address limit of the L3 bus. Cc: stable@kernel.org Signed-off-by: Roger Quadros Signed-off-by: Tony Lindgren commit 4abd9930d189dedaa59097144c6d8f623342fa72 Author: Tony Lindgren Date: Sat Mar 14 13:55:05 2020 -0700 ARM: dts: omap4-droid4: Fix lost touchscreen interrupts Looks like we can have the maxtouch touchscreen stop producing interrupts if an edge interrupt is lost. This can happen easily when the SoC idles as the gpio controller may not see any state for an edge interrupt if it is briefly triggered when the system is idle. Also it looks like maxtouch stops sending any further interrupts if the interrupt is not handled. And we do have several cases of maxtouch already configured with a level interrupt, so let's do that. With level interrupt the gpio controller has the interrupt state visible after idle. Note that eventually we will probably also be using the Linux generic wakeirq configured for the controller, but that cannot be done until the maxtouch driver supports runtime PM. Cc: maemo-leste@lists.dyne.org Cc: Arthur Demchenkov Cc: Ivaylo Dimitrov Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren commit ac309e7744bee222df6de0122facaf2d9706fa70 Merge: 3d135f522476 819d578d51d0 Author: Linus Torvalds Date: Tue Mar 17 09:38:03 2020 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - string buffer formatting fixes in picolcd and sensor drivers, from Takashi Iwai - two new device IDs from Chen-Tsung Hsieh and Tony Fischetti * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: add ALWAYS_POLL quirk to lenovo pixart mouse HID: google: add moonball USB id HID: hid-sensor-custom: Use scnprintf() for avoiding potential buffer overflow HID: hid-picolcd_fb: Use scnprintf() for avoiding potential buffer overflow commit 78c3e5e6cde8193467427ed9e5f90a0d585625a1 Author: Arun Easi Date: Fri Mar 13 01:50:01 2020 -0700 scsi: qla2xxx: Fix I/Os being passed down when FC device is being deleted I/Os could be passed down while the device FC SCSI device is being deleted. This would result in unnecessary delay of I/O and driver messages (when extended logging is set). [mkp: fixed commit hash and added SoB for Nilesh] Link: https://lore.kernel.org/r/20200313085001.3781-1-njavali@marvell.com Fixes: 3c75ad1d87c7 ("scsi: qla2xxx: Remove defer flag to indicate immeadiate port loss") # v5.6-rc1+ Tested-by: Laurence Oberman Reviewed-by: Laurence Oberman Reviewed-by: Ewan D. Milne Reviewed-by: Roman Bolshakov Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit bb5786b9286c253557a0115bc8d21879e61b7b94 Author: Michael Straube Date: Thu Mar 12 10:36:52 2020 +0100 staging: rtl8188eu: Add device id for MERCUSYS MW150US v2 This device was added to the stand-alone driver on github. Add it to the staging driver as well. Link: https://github.com/lwfinger/rtl8188eu/commit/2141f244c3e7 Signed-off-by: Michael Straube Cc: stable Link: https://lore.kernel.org/r/20200312093652.13918-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit ae62cf5eb2792d9a818c2d93728ed92119357017 Author: Johan Hovold Date: Thu Mar 12 12:01:51 2020 +0100 staging: greybus: loopback_test: fix potential path truncations Newer GCC warns about possible truncations of two generated path names as we're concatenating the configurable sysfs and debugfs path prefixes with a filename and placing the results in buffers of the same size as the maximum length of the prefixes. snprintf(d->name, MAX_STR_LEN, "gb_loopback%u", dev_id); snprintf(d->sysfs_entry, MAX_SYSFS_PATH, "%s%s/", t->sysfs_prefix, d->name); snprintf(d->debugfs_entry, MAX_SYSFS_PATH, "%sraw_latency_%s", t->debugfs_prefix, d->name); Fix this by separating the maximum path length from the maximum prefix length and reducing the latter enough to fit the generated strings. Note that we also need to reduce the device-name buffer size as GCC isn't smart enough to figure out that we ever only used MAX_STR_LEN bytes of it. Fixes: 6b0658f68786 ("greybus: tools: Add tools directory to greybus repo and add loopback") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20200312110151.22028-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit f16023834863932f95dfad13fac3fc47f77d2f29 Author: Johan Hovold Date: Thu Mar 12 12:01:50 2020 +0100 staging: greybus: loopback_test: fix potential path truncation Newer GCC warns about a possible truncation of a generated sysfs path name as we're concatenating a directory path with a file name and placing the result in a buffer that is half the size of the maximum length of the directory path (which is user controlled). loopback_test.c: In function 'open_poll_files': loopback_test.c:651:31: warning: '%s' directive output may be truncated writing up to 511 bytes into a region of size 255 [-Wformat-truncation=] 651 | snprintf(buf, sizeof(buf), "%s%s", dev->sysfs_entry, "iteration_count"); | ^~ loopback_test.c:651:3: note: 'snprintf' output between 16 and 527 bytes into a destination of size 255 651 | snprintf(buf, sizeof(buf), "%s%s", dev->sysfs_entry, "iteration_count"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this by making sure the buffer is large enough the concatenated strings. Fixes: 6b0658f68786 ("greybus: tools: Add tools directory to greybus repo and add loopback") Fixes: 9250c0ee2626 ("greybus: Loopback_test: use poll instead of inotify") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20200312110151.22028-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8f3675be4bda33adbdc1dd2ab3b6c76a7599a79e Author: Johan Hovold Date: Thu Mar 12 12:01:49 2020 +0100 staging: greybus: loopback_test: fix poll-mask build breakage A scripted conversion from userland POLL* to kernel EPOLL* constants mistakingly replaced the poll flags in the loopback_test tool, which therefore no longer builds. Fixes: a9a08845e9ac ("vfs: do bulk POLL* -> EPOLL* replacement") Cc: stable # 4.16 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20200312110151.22028-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 53dd0a7cd65edc83b0c243d1c08377c8b876b2ee Author: Michał Mirosław Date: Sun Mar 15 17:44:25 2020 +0100 mmc: sdhci-of-at91: fix cd-gpios for SAMA5D2 SAMA5D2x doesn't drive CMD line if GPIO is used as CD line (at least SAMA5D27 doesn't). Fix this by forcing card-detect in the module if module-controlled CD is not used. Fixed commit addresses the problem only for non-removable cards. This amends it to also cover gpio-cd case. Cc: stable@vger.kernel.org Fixes: 7a1e3f143176 ("mmc: sdhci-of-at91: force card detect value for non removable devices") Signed-off-by: Michał Mirosław Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/8d10950d9940468577daef4772b82a071b204716.1584290561.git.mirq-linux@rere.qmqm.pl Signed-off-by: Ulf Hansson commit 18b587b45c13bb6a07ed0edac15f06892593d07a Author: Masahiro Yamada Date: Thu Mar 12 19:42:57 2020 +0900 mmc: sdhci-cadence: set SDHCI_QUIRK2_PRESET_VALUE_BROKEN for UniPhier The SDHCI_PRESET_FOR_* registers are not set for the UniPhier platform integration. (They are all read as zeros). Set the SDHCI_QUIRK2_PRESET_VALUE_BROKEN quirk flag. Otherwise, the High Speed DDR mode on the eMMC controller (MMC_TIMING_MMC_DDR52) would not work. I split the platform data to give no impact to other platforms, although the UniPhier platform is currently only the upstream user of this IP. The SDHCI_QUIRK2_PRESET_VALUE_BROKEN flag is set if the compatible string matches to "socionext,uniphier-sd4hc". Signed-off-by: Masahiro Yamada Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200312104257.21017-1-yamada.masahiro@socionext.com Signed-off-by: Ulf Hansson commit 3397b251ea02003f47f0b1667f3fe30bb4f9ce90 Author: Hans de Goede Date: Mon Mar 16 19:47:53 2020 +0100 mmc: sdhci-acpi: Disable write protect detection on Acer Aspire Switch 10 (SW5-012) On the Acer Aspire Switch 10 (SW5-012) microSD slot always reports the card being write-protected even though microSD cards do not have a write-protect switch at all. Add a new DMI_QUIRK_SD_NO_WRITE_PROTECT quirk which when set sets the MMC_CAP2_NO_WRITE_PROTECT flag on the controller for the external SD slot; and add a DMI quirk table entry which selects this quirk for the Acer SW5-012. Signed-off-by: Hans de Goede Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200316184753.393458-2-hdegoede@redhat.com Signed-off-by: Ulf Hansson commit 84d49b3d08a1d33690cc159036f381c31c27c17b Author: Hans de Goede Date: Mon Mar 16 19:47:52 2020 +0100 mmc: sdhci-acpi: Switch signal voltage back to 3.3V on suspend on external microSD on Lenovo Miix 320 Based on a sample of 7 DSDTs from Cherry Trail devices using an AXP288 PMIC depending on the design one of 2 possible LDOs on the PMIC is used for the MMC signalling voltage, either DLDO3 or GPIO1LDO (GPIO1 pin in low noise LDO mode). The Lenovo Miix 320-10ICR uses GPIO1LDO in the SHC1 ACPI device's DSM methods to set 3.3 or 1.8 signalling voltage and this appears to work as advertised, so presumably the device is actually using GPIO1LDO for the external microSD signalling voltage. But this device has a bug in the _PS0 method of the SHC1 ACPI device, the DSM remembers the last set signalling voltage and the _PS0 restores this after a (runtime) suspend-resume cycle, but it "restores" the voltage on DLDO3 instead of setting it on GPIO1LDO as the DSM method does. DLDO3 is used for the LCD and setting it to 1.8V causes the LCD to go black. This commit works around this issue by calling the Intel DSM to reset the signal voltage to 3.3V after the host has been runtime suspended. This will make the _PS0 method reprogram the DLDO3 voltage to 3.3V, which leaves it at its original setting fixing the LCD going black. This commit adds and uses a DMI quirk mechanism to only trigger this workaround on the Lenovo Miix 320 while leaving the behavior of the driver unchanged on other devices. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=111294 BugLink: https://gitlab.freedesktop.org/drm/intel/issues/355 Reported-by: russianneuromancer Signed-off-by: Hans de Goede Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200316184753.393458-1-hdegoede@redhat.com Signed-off-by: Ulf Hansson commit 785d74ec3bbf26ac7f6e92e6e96a259aec0f107a Author: Eugeniy Paltsev Date: Mon Mar 16 14:25:19 2020 +0300 initramfs: restore default compression behavior Even though INITRAMFS_SOURCE kconfig option isn't set in most of defconfigs it is used (set) extensively by various build systems. Commit f26661e12765 ("initramfs: make initramfs compression choice non-optional") has changed default compression mode. Previously we compress initramfs using available compression algorithm. Now we don't use any compression at all by default. It significantly increases the image size in case of build system chooses embedded initramfs. Initially I faced with this issue while using buildroot. As of today it's not possible to set preferred compression mode in target defconfig as this option depends on INITRAMFS_SOURCE being set. Modification of all build systems either doesn't look like good option. Let's instead rewrite initramfs compression mode choices list the way that "INITRAMFS_COMPRESSION_NONE" will be the last option in the list. In that case it will be chosen only if all other options (which implements any compression) are not available. Signed-off-by: Eugeniy Paltsev Signed-off-by: Masahiro Yamada commit 32ca98feab8c9076c89c0697c5a85e46fece809d Author: Petr Machata Date: Mon Mar 16 19:53:00 2020 +0200 net: ip_gre: Accept IFLA_INFO_DATA-less configuration The fix referenced below causes a crash when an ERSPAN tunnel is created without passing IFLA_INFO_DATA. Fix by validating passed-in data in the same way as ipgre does. Fixes: e1f8f78ffe98 ("net: ip_gre: Separate ERSPAN newlink / changelink callbacks") Reported-by: syzbot+1b4ebf4dae4e510dd219@syzkaller.appspotmail.com Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 5190044c2965514a973184ca68ef5fad57a24670 Author: Jessica Yu Date: Wed Mar 11 18:01:20 2020 +0100 modpost: move the namespace field in Module.symvers last In order to preserve backwards compatability with kmod tools, we have to move the namespace field in Module.symvers last, as the depmod -e -E option looks at the first three fields in Module.symvers to check symbol versions (and it's expected they stay in the original order of crc, symbol, module). In addition, update an ancient comment above read_dump() in modpost that suggested that the export type field in Module.symvers was optional. I suspect that there were historical reasons behind that comment that are no longer accurate. We have been unconditionally printing the export type since 2.6.18 (commit bd5cbcedf44), which is over a decade ago now. Fix up read_dump() to treat each field as non-optional. I suspect the original read_dump() code treated the export field as optional in order to support pre <= 2.6.18 Module.symvers (which did not have the export type field). Note that although symbol namespaces are optional, the field will not be omitted from Module.symvers if a symbol does not have a namespace. In this case, the field will simply be empty and the next delimiter or end of line will follow. Cc: stable@vger.kernel.org Fixes: cb9b55d21fe0 ("modpost: add support for symbol namespaces") Tested-by: Matthias Maennich Reviewed-by: Matthias Maennich Reviewed-by: Lucas De Marchi Signed-off-by: Jessica Yu Signed-off-by: Masahiro Yamada commit 3d135f522476a815699dfbefb685de50bc5c12d6 Merge: fb33c6510d55 89604523a76e Author: Linus Torvalds Date: Mon Mar 16 15:39:52 2020 -0700 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: - allow use of ARMv8 arch timer in 32-bit VDSO - rename missed .fixup section - fix kbuild issue with stack protector GCC plugin * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8961/2: Fix Kbuild issue caused by per-task stack protector GCC plugin ARM: 8958/1: rename missed uaccess .fixup section ARM: 8957/1: VDSO: Match ARMv8 timer in cntvct_functional() commit 065fd83e1be2e1ba0d446a257fd86a3cc7bddb51 Author: Jisheng Zhang Date: Mon Mar 16 22:56:36 2020 +0800 net: mvneta: Fix the case where the last poll did not process all rx For the case where the last mvneta_poll did not process all RX packets, we need to xor the pp->cause_rx_tx or port->cause_rx_tx before claculating the rx_queue. Fixes: 2dcf75e2793c ("net: mvneta: Associate RX queues with each CPU") Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller commit b317538c47943f9903860d83cc0060409e12d2ff Author: Zheng Wei Date: Mon Mar 16 22:23:47 2020 +0800 net: vxge: fix wrong __VA_ARGS__ usage printk in macro vxge_debug_ll uses __VA_ARGS__ without "##" prefix, it causes a build error when there is no variable arguments(e.g. only fmt is specified.). Signed-off-by: Zheng Wei Signed-off-by: David S. Miller commit 83d001068d33d4f93c52dcd35aaa143b6ef17120 Merge: 23c394819deb d79e9d7c1e4b Author: David S. Miller Date: Mon Mar 16 14:58:33 2020 -0700 Merge branch 'QorIQ-DPAA-ARM-RDBs-need-internal-delay-on-RGMII' Madalin Bucur says: ==================== QorIQ DPAA ARM RDBs need internal delay on RGMII v2: used phy_interface_mode_is_rgmii() to identify RGMII The QorIQ DPAA 1 based RDB boards require internal delay on both Tx and Rx to be set. The patch set ensures all RGMII modes are treated correctly by the FMan driver and sets the phy-connection-type to "rgmii-id" to restore functionality. Previously Rx internal delay was set by board pull-ups and was left untouched by the PHY driver. Since commit 1b3047b5208a80 ("net: phy: realtek: add support for configuring the RX delay on RTL8211F") the Realtek 8211F PHY driver has control over the RGMII RX delay and it is disabling it for other modes than RGMII_RXID and RGMII_ID. Please note that u-boot in particular performs a fix-up of the PHY connection type and will overwrite the values from the Linux device tree. Another patch set was sent for u-boot and one needs to apply that [1] to the boot loader, to ensure this fix is complete, unless a different bootloader is used. ==================== Signed-off-by: David S. Miller commit d79e9d7c1e4ba5f95f2ff3541880c40ea9722212 Author: Madalin Bucur Date: Mon Mar 16 14:05:58 2020 +0200 arm64: dts: ls1046ardb: set RGMII interfaces to RGMII_ID mode The correct setting for the RGMII ports on LS1046ARDB is to enable delay on both Rx and Tx so the interface mode used must be PHY_INTERFACE_MODE_RGMII_ID. Since commit 1b3047b5208a80 ("net: phy: realtek: add support for configuring the RX delay on RTL8211F") the Realtek 8211F PHY driver has control over the RGMII RX delay and it is disabling it for RGMII_TXID. The LS1046ARDB uses two such PHYs in RGMII_ID mode but in the device tree the mode was described as "rgmii". Changing the phy-connection-type to "rgmii-id" to address the issue. Fixes: 3fa395d2c48a ("arm64: dts: add LS1046A DPAA FMan nodes") Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 4022d808c45277693ea86478fab1f081ebf997e8 Author: Madalin Bucur Date: Mon Mar 16 14:05:57 2020 +0200 arm64: dts: ls1043a-rdb: correct RGMII delay mode to rgmii-id The correct setting for the RGMII ports on LS1043ARDB is to enable delay on both Rx and Tx so the interface mode used must be PHY_INTERFACE_MODE_RGMII_ID. Since commit 1b3047b5208a80 ("net: phy: realtek: add support for configuring the RX delay on RTL8211F") the Realtek 8211F PHY driver has control over the RGMII RX delay and it is disabling it for RGMII_TXID. The LS1043ARDB uses two such PHYs in RGMII_ID mode but in the device tree the mode was described as "rgmii_txid". This issue was not apparent at the time as the PHY driver took the same action for RGMII_TXID and RGMII_ID back then but it became visible (RX no longer working) after the above patch. Changing the phy-connection-type to "rgmii-id" to address the issue. Fixes: bf02f2ffe59c ("arm64: dts: add LS1043A DPAA FMan support") Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 0fe1568061be372a908b408b93c2f64d1d95b6f6 Author: Madalin Bucur Date: Mon Mar 16 14:05:56 2020 +0200 net: fsl/fman: treat all RGMII modes in memac_adjust_link() Treat all internal delay variants the same as RGMII. Signed-off-by: Madalin Bucur Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 819d578d51d0ce73f06e35d69395ef55cd683a74 Author: Tony Fischetti Date: Thu Mar 12 12:16:06 2020 -0400 HID: add ALWAYS_POLL quirk to lenovo pixart mouse A lenovo pixart mouse (17ef:608d) is afflicted common the the malfunction where it disconnects and reconnects every minute--each time incrementing the device number. This patch adds the device id of the device and specifies that it needs the HID_QUIRK_ALWAYS_POLL quirk in order to work properly. Signed-off-by: Tony Fischetti Signed-off-by: Jiri Kosina commit 5f3d9b07b9bb4679922f0b2e2baa770e74a6bbd3 Author: Tony Lindgren Date: Fri Feb 21 09:10:30 2020 -0800 clk: ti: am43xx: Fix clock parent for RTC clock Currently enabling clkctrl clock on am4 can fail for RTC as the clock parent is wrong for RTC. Fixes: 76a1049b84dd ("clk: ti: am43xx: add new clkctrl data for am43xx") Signed-off-by: Tony Lindgren Link: https://lkml.kernel.org/r/20200221171030.39326-1-tony@atomide.com Acked-by: Tero Kristo Signed-off-by: Stephen Boyd commit 7aaec82fefd21b4de8b1ee3ec4f31af95ccc9ab1 Merge: 20055448dc1b 857c9d31f59f Author: Stephen Boyd Date: Mon Mar 16 11:26:05 2020 -0700 Merge tag 'imx-clk-fixes-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-fixes Pull a few more i.MX clk fixes for 5.6: - A couple of fixes on i.MX8MP clock driver to correct HDMI_AXI and ENET_QOS_ROOT parent clock * tag 'imx-clk-fixes-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: clk: imx8mp: Correct the enet_qos parent clock clk: imx8mp: Correct IMX8MP_CLK_HDMI_AXI clock parent commit 58322a1590fc189a8e1e349d309637d4a4942840 Author: Chen-Tsung Hsieh Date: Mon Mar 16 15:24:19 2020 +0800 HID: google: add moonball USB id Add 1 additional hammer-like device. Signed-off-by: Chen-Tsung Hsieh Reviewed-by: Nicolas Boichat Signed-off-by: Jiri Kosina commit fe8b7085cac3b0db03cdbb26d9309bc27325df0a Author: Matt Roper Date: Wed Mar 11 09:22:55 2020 -0700 drm/i915: Handle all MCR ranges The bspec documents multiple MCR ranges; make sure they're all captured by the driver. Bspec: 13991, 52079 Fixes: 592a7c5e082e ("drm/i915: Extend non readable mcr range") Cc: Mika Kuoppala Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200311162300.1838847-2-matthew.d.roper@intel.com Reviewed-by: Mika Kuoppala (cherry picked from commit 415d1269975d3fc21c13a6ae8de7b5fe0e6febb1) Signed-off-by: Jani Nikula commit c09f6b4d0883dfb859c1ddcfb04c3260ef310ce0 Author: Caz Yokoyama Date: Wed Mar 4 14:13:59 2020 -0800 Revert "drm/i915/tgl: Add extra hdc flush workaround" This reverts commit 36a6b5d964d995b536b1925ec42052ee40ba92c4. The commit takes care Wa_1604544889 which was fixed on a0 stepping based on a0 replan. So no SW workaround is required on any stepping now. Reviewed-by: Matt Roper Signed-off-by: Caz Yokoyama Signed-off-by: José Roberto de Souza Fixes: 36a6b5d964d9 ("drm/i915/tgl: Add extra hdc flush workaround") Link: https://patchwork.freedesktop.org/patch/msgid/1c751032ce79c80c5485cae315f1a9904ce07cac.1583359940.git.caz.yokoyama@intel.com (cherry picked from commit 175c4d9b3b9a60b4ea0b8cd034011808c6a03b05) Signed-off-by: Jani Nikula commit 9777d8b2d2a148bc5d46694ec4f2559282fec8cf Author: Chris Wilson Date: Wed Mar 11 09:26:23 2020 +0000 drm/i915/execlists: Track active elements during dequeue Record the initial active element we use when building the next ELSP submission, so that we can compare against it latter to see if there's no change. Fixes: 44d0a9c05bc0 ("drm/i915/execlists: Skip redundant resubmission") Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200311092624.10012-2-chris@chris-wilson.co.uk (cherry picked from commit 60ef5b7ac6a131f09d287a5f156c878c2c926a30) Signed-off-by: Jani Nikula commit 2a9de3af21aa8c31cd68b0b39330d69f8c1e59df Author: Torsten Hilbrich Date: Wed Mar 11 11:19:06 2020 +0100 vti6: Fix memory leak of skb if input policy check fails The vti6_rcv function performs some tests on the retrieved tunnel including checking the IP protocol, the XFRM input policy, the source and destination address. In all but one places the skb is released in the error case. When the input policy check fails the network packet is leaked. Using the same goto-label discard in this case to fix this problem. Fixes: ed1efb2aefbb ("ipv6: Add support for IPsec virtual tunnel interfaces") Signed-off-by: Torsten Hilbrich Reviewed-by: Nicolas Dichtel Signed-off-by: Steffen Klassert commit 6c3171ef76a0bad892050f6959a7eac02fb16df7 Author: Takashi Iwai Date: Mon Mar 16 10:05:06 2020 +0100 ALSA: seq: oss: Fix running status after receiving sysex This is a similar bug like the previous case for virmidi: the invalid running status is kept after receiving a sysex message. Again the fix is to clear the running status after handling the sysex. Cc: Link: https://lore.kernel.org/r/3b4a4e0f232b7afbaf0a843f63d0e538e3029bfd.camel@domdv.de Link: https://lore.kernel.org/r/20200316090506.23966-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4384f167ce5fa7241b61bb0984d651bc528ddebe Author: Takashi Iwai Date: Mon Mar 16 10:05:05 2020 +0100 ALSA: seq: virmidi: Fix running status after receiving sysex The virmidi driver handles sysex event exceptionally in a short-cut snd_seq_dump_var_event() call, but this missed the reset of the running status. As a result, it may lead to an incomplete command right after the sysex when an event with the same running status was queued. Fix it by clearing the running status properly via alling snd_midi_event_reset_decode() for that code path. Reported-by: Andreas Steinmetz Cc: Link: https://lore.kernel.org/r/3b4a4e0f232b7afbaf0a843f63d0e538e3029bfd.camel@domdv.de Link: https://lore.kernel.org/r/20200316090506.23966-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 23c394819deb4eb642b60bbd5b3eef181e65cd8f Merge: ef299cc3fa1a 2363d73a2f3e Author: David S. Miller Date: Mon Mar 16 02:04:24 2020 -0700 Merge branch 'ethtool-fail-with-error-if-request-has-unknown-flags' Michal Kubecek says: ==================== ethtool: fail with error if request has unknown flags Jakub Kicinski pointed out that if unrecognized flags are set in netlink header request, kernel shoud fail with an error rather than silently ignore them so that we have more freedom in future flags semantics. To help userspace with handling such errors, inform the client which flags are supported by kernel. For that purpose, we need to allow passing cookies as part of extack also in case of error (they can be only passed on success now). ==================== Signed-off-by: David S. Miller commit 2363d73a2f3e92787f336721c40918ba2eb0c74c Author: Michal Kubecek Date: Sun Mar 15 18:17:53 2020 +0100 ethtool: reject unrecognized request flags As pointed out by Jakub Kicinski, we ethtool netlink code should respond with an error if request head has flags set which are not recognized by kernel, either as a mistake or because it expects functionality introduced in later kernel versions. To avoid unnecessary roundtrips, use extack cookie to provide the information about supported request flags. Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller commit f1388ec4a144f40348321a0915c5535d623e165c Author: Michal Kubecek Date: Sun Mar 15 18:17:48 2020 +0100 netlink: add nl_set_extack_cookie_u32() Similar to existing nl_set_extack_cookie_u64(), add new helper nl_set_extack_cookie_u32() which sets extack cookie to a u32 value. Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller commit fe2a31d790f81bd14a76de3d3b87f4f1362f60cd Author: Michal Kubecek Date: Sun Mar 15 18:17:43 2020 +0100 netlink: allow extack cookie also for error messages Commit ba0dc5f6e0ba ("netlink: allow sending extended ACK with cookie on success") introduced a cookie which can be sent to userspace as part of extended ack message in the form of NLMSGERR_ATTR_COOKIE attribute. Currently the cookie is ignored if error code is non-zero but there is no technical reason for such limitation and it can be useful to provide machine parseable information as part of an error message. Include NLMSGERR_ATTR_COOKIE whenever the cookie has been set, regardless of error code. Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller commit ef299cc3fa1a9e1288665a9fdc8bff55629fd359 Author: Cong Wang Date: Fri Mar 13 22:29:54 2020 -0700 net_sched: cls_route: remove the right filter from hashtable route4_change() allocates a new filter and copies values from the old one. After the new filter is inserted into the hash table, the old filter should be removed and freed, as the final step of the update. However, the current code mistakenly removes the new one. This looks apparently wrong to me, and it causes double "free" and use-after-free too, as reported by syzbot. Reported-and-tested-by: syzbot+f9b32aaacd60305d9687@syzkaller.appspotmail.com Reported-and-tested-by: syzbot+2f8c233f131943d6056d@syzkaller.appspotmail.com Reported-and-tested-by: syzbot+9c2df9fd5e9445b74e01@syzkaller.appspotmail.com Fixes: 1109c00547fc ("net: sched: RCU cls_route") Cc: Jamal Hadi Salim Cc: Jiri Pirko Cc: John Fastabend Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 4ae649e8879d5a96b0ce104c8eae6563c6f368a1 Merge: dcadaec22456 09e91dbea0aa Author: David S. Miller Date: Mon Mar 16 01:46:10 2020 -0700 Merge branch 'hsr-fix-several-bugs-in-generic-netlink-callback' Taehee Yoo says: ==================== hsr: fix several bugs in generic netlink callback This patchset is to fix several bugs they are related in generic netlink callback in hsr module. 1. The first patch is to add missing rcu_read_lock() in hsr_get_node_{list/status}(). The hsr_get_node_{list/status}() are not protected by RTNL because they are callback functions of generic netlink. But it calls __dev_get_by_index() without acquiring RTNL. So, it would use unsafe data. 2. The second patch is to avoid failure of hsr_get_node_list(). hsr_get_node_list() is a callback of generic netlink and it is used to get node information in userspace. But, if there are so many nodes, it fails because of buffer size. So, in this patch, restart routine is added. 3. The third patch is to set .netnsok flag to true. If .netnsok flag is false, non-init_net namespace is not allowed to operate generic netlink operations. So, currently, non-init_net namespace has no way to get node information because .netnsok is false in the current hsr code. Change log: v1->v2: - Preserve reverse christmas tree variable ordering in the second patch. ==================== Signed-off-by: David S. Miller commit 09e91dbea0aa32be02d8877bd50490813de56b9a Author: Taehee Yoo Date: Fri Mar 13 06:50:33 2020 +0000 hsr: set .netnsok flag The hsr module has been supporting the list and status command. (HSR_C_GET_NODE_LIST and HSR_C_GET_NODE_STATUS) These commands send node information to the user-space via generic netlink. But, in the non-init_net namespace, these commands are not allowed because .netnsok flag is false. So, there is no way to get node information in the non-init_net namespace. Fixes: f421436a591d ("net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit ca19c70f5225771c05bcdcb832b4eb84d7271c5e Author: Taehee Yoo Date: Fri Mar 13 06:50:24 2020 +0000 hsr: add restart routine into hsr_get_node_list() The hsr_get_node_list() is to send node addresses to the userspace. If there are so many nodes, it could fail because of buffer size. In order to avoid this failure, the restart routine is added. Fixes: f421436a591d ("net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 173756b86803655d70af7732079b3aa935e6ab68 Author: Taehee Yoo Date: Fri Mar 13 06:50:14 2020 +0000 hsr: use rcu_read_lock() in hsr_get_node_{list/status}() hsr_get_node_{list/status}() are not under rtnl_lock() because they are callback functions of generic netlink. But they use __dev_get_by_index() without rtnl_lock(). So, it would use unsafe data. In order to fix it, rcu_read_lock() and dev_get_by_index_rcu() are used instead of __dev_get_by_index(). Fixes: f421436a591d ("net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 857c9d31f59f0c0e6117518452ca54883e47d859 Author: Fugang Duan Date: Wed Feb 19 14:04:11 2020 +0800 clk: imx8mp: Correct the enet_qos parent clock enet_qos is for eqos tsn AXI bus clock whose clock source is from ccm_enet_axi_clk_root, and controlled by CCM_CCGR59(offset 0x43b0) and CCM_CCGR64(offset 0x4400), so correct enet_qos root clock's parent clock to sim_enet. Fixes: 9c140d992676 ("clk: imx: Add support for i.MX8MP clock driver") Signed-off-by: Fugang Duan Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 78ef3c9ecf20b9d6291eb6e081dabae1a5d387d3 Author: Anson Huang Date: Wed Feb 19 14:04:10 2020 +0800 clk: imx8mp: Correct IMX8MP_CLK_HDMI_AXI clock parent IMX8MP_CLK_HDMI_AXI should be from imx8mp_media_axi_sels instead of imx8mp_media_apb_sels, fix it. Fixes: 9c140d992676 ("clk: imx: Add support for i.MX8MP clock driver") Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit dcadaec2245616aedd94ff0129db2b13f2d8deb8 Merge: cb851c01b51b 2da222f612b5 Author: David S. Miller Date: Sun Mar 15 17:06:22 2020 -0700 Merge branch 'net-Use-scnprintf-for-avoiding-potential-buffer-overflow' Takashi Iwai says: ==================== net: Use scnprintf() for avoiding potential buffer overflow here is a respin of trivial patch series just to convert suspicious snprintf() usages with the more safer one, scnprintf(). v1->v2: Align the remaining lines to the open parenthesis Excluded i40e patch that was already queued ==================== Signed-off-by: David S. Miller commit 2da222f612b58b6e6b41972f46005b58aac1699e Author: Takashi Iwai Date: Sun Mar 15 10:35:03 2020 +0100 net: netdevsim: Use scnprintf() for avoiding potential buffer overflow Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Cc: "David S . Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Signed-off-by: Takashi Iwai Signed-off-by: David S. Miller commit 5e892880e14fbc1944f49aa42a67496516fe5dac Author: Takashi Iwai Date: Sun Mar 15 10:35:02 2020 +0100 net: sfc: Use scnprintf() for avoiding potential buffer overflow Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Cc: "David S . Miller" Cc: Edward Cree Cc: Martin Habets Cc: Solarflare linux maintainers Cc: netdev@vger.kernel.org Signed-off-by: Takashi Iwai Signed-off-by: David S. Miller commit 38e0f746c456b2f7d64b37aef3b6bd9ad73508c0 Author: Takashi Iwai Date: Sun Mar 15 10:35:01 2020 +0100 net: ionic: Use scnprintf() for avoiding potential buffer overflow Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Reviewed-by: Simon Horman Acked-by: Shannon Nelson Cc: "David S . Miller" Cc: Jakub Kicinski Cc: oss-drivers@netronome.com Cc: netdev@vger.kernel.org Signed-off-by: Takashi Iwai Signed-off-by: David S. Miller commit 413ae546f8726ac0652e59fcf97561fc21f52653 Author: Takashi Iwai Date: Sun Mar 15 10:35:00 2020 +0100 net: nfp: Use scnprintf() for avoiding potential buffer overflow Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Reviewed-by: Simon Horman Cc: "David S . Miller" Cc: Jakub Kicinski Cc: oss-drivers@netronome.com To: netdev@vger.kernel.org Signed-off-by: Takashi Iwai Signed-off-by: David S. Miller commit 4a348601eb9131893c22b6ed2d3b6ba2bafc2391 Author: Takashi Iwai Date: Sun Mar 15 10:34:59 2020 +0100 net: mlx4: Use scnprintf() for avoiding potential buffer overflow Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Cc: "David S . Miller" Cc: Tariq Toukan To: netdev@vger.kernel.org Signed-off-by: Takashi Iwai Signed-off-by: David S. Miller commit 13bde56c5b7cc6489eb50c40449d461c7ca4da2d Author: Takashi Iwai Date: Sun Mar 15 10:34:58 2020 +0100 net: caif: Use scnprintf() for avoiding potential buffer overflow Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Cc: "David S . Miller" Cc: netdev@vger.kernel.org Signed-off-by: Takashi Iwai Signed-off-by: David S. Miller commit cb851c01b51bb610a9093d01624565ce1d4e38fa Author: Ido Schimmel Date: Sun Mar 15 10:07:35 2020 +0200 mlxsw: reg: Increase register field length to 31 bits The cited commit set a value of 2^31-1 in order to "disable" the shaper on a given a port. However, the length of the maximum shaper rate field was not updated from 28 bits to 31 bits, which means ports are still limited to ~268Gbps despite supporting speeds of 400Gbps. Fix this by increasing the field's length. Fixes: 92afbfedb77d ("mlxsw: reg: Increase MLXSW_REG_QEEC_MAS_DIS") Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit fb33c6510d5595144d585aa194d377cf74d31911 Author: Linus Torvalds Date: Sun Mar 15 15:01:23 2020 -0700 Linux 5.6-rc6 commit a42a7bb6f5362c77f38cdc5e2d05e9fe0c2ade2c Merge: 34d5a4b336e7 92c227554c8e Author: Linus Torvalds Date: Sun Mar 15 13:15:16 2020 -0700 Merge tag 'irq-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Thomas Gleixner: "A single commit to handle an erratum in Cavium ThunderX to prevent access to GIC registers which are broken in the implementation" * tag 'irq-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gic-v3: Workaround Cavium erratum 38539 when reading GICD_TYPER2 commit 34d5a4b336e7e4c247d532a841d05367357197f8 Merge: ec181b7f30bd 8d67743653dc Author: Linus Torvalds Date: Sun Mar 15 12:55:52 2020 -0700 Merge tag 'locking-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull futex fix from Thomas Gleixner: "Fix for yet another subtle futex issue. The futex code used ihold() to prevent inodes from vanishing, but ihold() does not guarantee inode persistence. Replace the inode pointer with a per boot, machine wide, unique inode identifier. The second commit fixes the breakage of the hash mechanism which causes a 100% performance regression" * tag 'locking-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Unbreak futex hashing futex: Fix inode life-time issue commit ec181b7f30bdae2fbbba1c0dd76aeaad89c7963e Merge: e99bc917fe02 469ff207b4c4 Author: Linus Torvalds Date: Sun Mar 15 12:52:56 2020 -0700 Merge tag 'x86-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "Two fixes for x86: - Map EFI runtime service data as encrypted when SEV is enabled. Otherwise e.g. SMBIOS data cannot be properly decoded by dmidecode. - Remove the warning in the vector management code which triggered when a managed interrupt affinity changed outside of a CPU hotplug operation. The warning was correct until the recent core code change that introduced a CPU isolation feature which needs to migrate managed interrupts away from online CPUs under certain conditions to achieve the isolation" * tag 'x86-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vector: Remove warning on managed interrupt migration x86/ioremap: Map EFI runtime services data as encrypted for SEV commit e99bc917fe0233ea64799a5bc376b7d7a7cb0aea Merge: ffe6da91b00e f967140dfb74 Author: Linus Torvalds Date: Sun Mar 15 12:50:15 2020 -0700 Merge tag 'perf-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "A pile of perf fixes: Kernel side: - AMD uncore driver: Replace the open coded sanity check with the core variant, which provides the correct error code and also leaves a hint in dmesg Tooling: - Fix the stdio input handling with glibc versions >= 2.28 - Unbreak the futex-wake benchmark which was reduced to 0 test threads due to the conversion to cpumaps - Initialize sigaction structs before invoking sys_sigactio() - Plug the mapfile memory leak in perf jevents - Fix off by one relative directory includes - Fix an undefined string comparison in perf diff" * tag 'perf-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag tools: Fix off-by 1 relative directory includes perf jevents: Fix leak of mapfile memory perf bench: Clear struct sigaction before sigaction() syscall perf bench futex-wake: Restore thread count default to online CPU count perf top: Fix stdio interface input handling with glibc 2.28+ perf diff: Fix undefined string comparision spotted by clang's -Wstring-compare perf symbols: Don't try to find a vmlinux file when looking for kernel modules perf bench: Share some global variables to fix build with gcc 10 perf parse-events: Use asprintf() instead of strncpy() to read tracepoint files perf env: Do not return pointers to local variables perf tests bp_account: Make global variable static commit ffe6da91b00eb3f4b8227441ad67e2a8d8667e22 Merge: 52ac3777fc45 ecc421e05bab Author: Linus Torvalds Date: Sun Mar 15 12:48:21 2020 -0700 Merge tag 'timers-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fix from Thomas Gleixner: "A single fix adding the missing time namespace adjustment in sys/sysinfo which caused sys/sysinfo to be inconsistent with /proc/uptime when read from a task inside a time namespace" * tag 'timers-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sys/sysinfo: Respect boottime inside time namespace commit 52ac3777fc4514b17c0c4c548f941207a0fc06a7 Merge: b67775e12457 59b5809655bd Author: Linus Torvalds Date: Sun Mar 15 12:44:23 2020 -0700 Merge tag 'ras-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS fixes from Thomas Gleixner: "Two RAS related fixes: - Shut down the per CPU thermal throttling poll work properly when a CPU goes offline. The missing shutdown caused the poll work to be migrated to a unbound worker which triggered warnings about the usage of smp_processor_id() in preemptible context - Fix the PPIN feature initialization which missed to enable the functionality when PPIN_CTL was enabled but the MSR locked against updates" * tag 'ras-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce: Fix logic and comments around MSR_PPIN_CTL x86/mce/therm_throt: Undo thermal polling properly on CPU offline commit b67775e124572a7028e930c306ed68cc2f90b29b Merge: de28a65cd0e3 d6c066fda90d Author: Linus Torvalds Date: Sun Mar 15 12:42:03 2020 -0700 Merge tag 'efi-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Thomas Gleixner: "Two EFI fixes: - Prevent a race and buffer overflow in the sysfs efivars interface which causes kernel memory corruption. - Add the missing NULL pointer checks in efivar_store_raw()" * tag 'efi-urgent-2020-03-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi: Add a sanity check to efivar_store_raw() efi: Fix a race and a buffer overflow while reading efivars via sysfs commit de28a65cd0e39d031dfcdc61fbe06268cb4a5f94 Merge: d3dca69085e9 1da8347d8505 Author: Linus Torvalds Date: Sun Mar 15 12:37:10 2020 -0700 Merge tag 'iommu-fixes-v5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: - Intel VT-d fixes: - RCU list handling fixes - Replace WARN_TAINT with pr_warn + add_taint for reporting firmware issues - DebugFS fixes - Fix for hugepage handling in iova_to_phys implementation - Fix for handling VMD devices, which have a domain number which doesn't fit into 16 bits - Warning message fix - MSI allocation fix for iommu-dma code - Sign-extension fix for io page-table code - Fix for AMD-Vi to properly update the is-running bit when AVIC is used * tag 'iommu-fixes-v5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Populate debugfs if IOMMUs are detected iommu/amd: Fix IOMMU AVIC not properly update the is_run bit in IRTE iommu/vt-d: Ignore devices with out-of-spec domain number iommu/vt-d: Fix the wrong printing in RHSA parsing iommu/vt-d: Fix debugfs register reads iommu/vt-d: quirk_ioat_snb_local_iommu: replace WARN_TAINT with pr_warn + add_taint iommu/vt-d: dmar_parse_one_rmrr: replace WARN_TAINT with pr_warn + add_taint iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint iommu/vt-d: Silence RCU-list debugging warnings iommu/vt-d: Fix RCU-list bugs in intel_iommu_init() iommu/dma: Fix MSI reservation allocation iommu/io-pgtable-arm: Fix IOVA validation for 32-bit iommu/vt-d: Fix a bug in intel_iommu_iova_to_phys() for huge page iommu/vt-d: Fix RCU list debugging warnings commit 92c227554c8e735a494cd4ddca2d5bebcd705b2c Merge: 2546287c5fb3 d01fd161e859 Author: Thomas Gleixner Date: Sun Mar 15 10:53:11 2020 +0100 Merge tag 'irqchip-fixes-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip fixes from Marc Zyngier: - Add workaround for Cavium/Marvell ThunderX unimplemented GIC registers commit 0fda7600c2e174fe27e9cf02e78e345226e441fa Author: Florian Westphal Date: Sat Mar 14 08:18:42 2020 +0100 geneve: move debug check after netdev unregister The debug check must be done after unregister_netdevice_many() call -- the list_del() for this is done inside .ndo_stop. Fixes: 2843a25348f8 ("geneve: speedup geneve tunnels dismantle") Reported-and-tested-by: Cc: Haishuang Yan Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 61fad6816fc10fb8793a925d5c1256d1c3db0cd2 Author: Willem de Bruijn Date: Fri Mar 13 12:18:09 2020 -0400 net/packet: tpacket_rcv: avoid a producer race condition PACKET_RX_RING can cause multiple writers to access the same slot if a fast writer wraps the ring while a slow writer is still copying. This is particularly likely with few, large, slots (e.g., GSO packets). Synchronize kernel thread ownership of rx ring slots with a bitmap. Writers acquire a slot race-free by testing tp_status TP_STATUS_KERNEL while holding the sk receive queue lock. They release this lock before copying and set tp_status to TP_STATUS_USER to release to userspace when done. During copying, another writer may take the lock, also see TP_STATUS_KERNEL, and start writing to the same slot. Introduce a new rx_owner_map bitmap with a bit per slot. To acquire a slot, test and set with the lock held. To release race-free, update tp_status and owner bit as a transaction, so take the lock again. This is the one of a variety of discussed options (see Link below): * instead of a shadow ring, embed the data in the slot itself, such as in tp_padding. But any test for this field may match a value left by userspace, causing deadlock. * avoid the lock on release. This leaves a small race if releasing the shadow slot before setting TP_STATUS_USER. The below reproducer showed that this race is not academic. If releasing the slot after tp_status, the race is more subtle. See the first link for details. * add a new tp_status TP_KERNEL_OWNED to avoid the transactional store of two fields. But, legacy applications may interpret all non-zero tp_status as owned by the user. As libpcap does. So this is possible only opt-in by newer processes. It can be added as an optional mode. * embed the struct at the tail of pg_vec to avoid extra allocation. The implementation proved no less complex than a separate field. The additional locking cost on release adds contention, no different than scaling on multicore or multiqueue h/w. In practice, below reproducer nor small packet tcpdump showed a noticeable change in perf report in cycles spent in spinlock. Where contention is problematic, packet sockets support mitigation through PACKET_FANOUT. And we can consider adding opt-in state TP_KERNEL_OWNED. Easy to reproduce by running multiple netperf or similar TCP_STREAM flows concurrently with `tcpdump -B 129 -n greater 60000`. Based on an earlier patchset by Jon Rosen. See links below. I believe this issue goes back to the introduction of tpacket_rcv, which predates git history. Link: https://www.mail-archive.com/netdev@vger.kernel.org/msg237222.html Suggested-by: Jon Rosen Signed-off-by: Willem de Bruijn Signed-off-by: Jon Rosen Signed-off-by: David S. Miller commit e1f8f78ffe9854308b9e12a73ebe4e909074fc33 Author: Petr Machata Date: Fri Mar 13 13:39:36 2020 +0200 net: ip_gre: Separate ERSPAN newlink / changelink callbacks ERSPAN shares most of the code path with GRE and gretap code. While that helps keep the code compact, it is also error prone. Currently a broken userspace can turn a gretap tunnel into a de facto ERSPAN one by passing IFLA_GRE_ERSPAN_VER. There has been a similar issue in ip6gretap in the past. To prevent these problems in future, split the newlink and changelink code paths. Split the ERSPAN code out of ipgre_netlink_parms() into a new function erspan_netlink_parms(). Extract a piece of common logic from ipgre_newlink() and ipgre_changelink() into ipgre_newlink_encap_setup(). Add erspan_newlink() and erspan_changelink(). Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 46ea929b2b3f66e6a9bc91adbb9ca2157065f9b2 Author: Shahjada Abul Husain Date: Fri Mar 13 14:32:57 2020 +0530 cxgb4: fix delete filter entry fail in unload path Currently, the hardware TID index is assumed to start from index 0. However, with the following changeset, commit c21939998802 ("cxgb4: add support for high priority filters") hardware TID index can start after the high priority region, which has introduced a regression resulting in remove filters entry failure for cxgb4 unload path. This patch fix that. Fixes: c21939998802 ("cxgb4: add support for high priority filters") Signed-off-by: Shahjada Abul Husain Signed-off-by: David S. Miller commit fc191af1bb0d069dc7e981076e8b80af21f1e61d Author: Markus Fuchs Date: Fri Mar 6 17:38:48 2020 +0100 net: stmmac: platform: Fix misleading interrupt error msg Not every stmmac based platform makes use of the eth_wake_irq or eth_lpi interrupts. Use the platform_get_irq_byname_optional variant for these interrupts, so no error message is displayed, if they can't be found. Rather print an information to hint something might be wrong to assist debugging on platforms which use these interrupts. Signed-off-by: Markus Fuchs Signed-off-by: David S. Miller commit 13d0f7b814d9b4c67e60d8c2820c86ea181e7d99 Author: Bruno Meneguele Date: Thu Mar 12 20:08:20 2020 -0300 net/bpfilter: fix dprintf usage for /dev/kmsg The bpfilter UMH code was recently changed to log its informative messages to /dev/kmsg, however this interface doesn't support SEEK_CUR yet, used by dprintf(). As result dprintf() returns -EINVAL and doesn't log anything. However there already had some discussions about supporting SEEK_CUR into /dev/kmsg interface in the past it wasn't concluded. Since the only user of that from userspace perspective inside the kernel is the bpfilter UMH (userspace) module it's better to correct it here instead waiting a conclusion on the interface. Fixes: 36c4357c63f3 ("net: bpfilter: print umh messages to /dev/kmsg") Signed-off-by: Bruno Meneguele Signed-off-by: David S. Miller commit 0d1c3530e1bd38382edef72591b78e877e0edcd3 Author: Cong Wang Date: Wed Mar 11 22:42:28 2020 -0700 net_sched: keep alloc_hash updated after hash allocation In commit 599be01ee567 ("net_sched: fix an OOB access in cls_tcindex") I moved cp->hash calculation before the first tcindex_alloc_perfect_hash(), but cp->alloc_hash is left untouched. This difference could lead to another out of bound access. cp->alloc_hash should always be the size allocated, we should update it after this tcindex_alloc_perfect_hash(). Reported-and-tested-by: syzbot+dcc34d54d68ef7d2d53d@syzkaller.appspotmail.com Reported-and-tested-by: syzbot+c72da7b9ed57cde6fca2@syzkaller.appspotmail.com Fixes: 599be01ee567 ("net_sched: fix an OOB access in cls_tcindex") Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit b1be2e8cd290f620777bfdb8aa00890cd2fa02b5 Author: Cong Wang Date: Wed Mar 11 22:42:27 2020 -0700 net_sched: hold rtnl lock in tcindex_partial_destroy_work() syzbot reported a use-after-free in tcindex_dump(). This is due to the lack of RTNL in the deferred rcu work. We queue this work with RTNL in tcindex_change(), later, tcindex_dump() is called: fh = tp->ops->get(tp, t->tcm_handle); ... err = tp->ops->change(..., &fh, ...); tfilter_notify(..., fh, ...); but there is nothing to serialize the pending tcindex_partial_destroy_work() with tcindex_dump(). Fix this by simply holding RTNL in tcindex_partial_destroy_work(), so that it won't be called until RTNL is released after tc_new_tfilter() is completed. Reported-and-tested-by: syzbot+653090db2562495901dc@syzkaller.appspotmail.com Fixes: 3d210534cc93 ("net_sched: fix a race condition in tcindex_destroy()") Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit f1d96a8fcbbbb22d4fbc1d69eaaa678bbb0ff6e2 Author: Pavel Begunkov Date: Fri Mar 13 22:29:14 2020 +0300 io_uring: NULL-deref for IOSQE_{ASYNC,DRAIN} Processing links, io_submit_sqe() prepares requests, drops sqes, and passes them with sqe=NULL to io_queue_sqe(). There IOSQE_DRAIN and/or IOSQE_ASYNC requests will go through the same prep, which doesn't expect sqe=NULL and fail with NULL pointer deference. Always do full prepare including io_alloc_async_ctx() for linked requests, and then it can skip the second preparation. Cc: stable@vger.kernel.org # 5.5 Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit d3dca69085e94e52a1d61a34b8e5f73a9f3d7eed Merge: 3086ae071686 92bd1f2e1eed Author: Linus Torvalds Date: Sat Mar 14 15:53:48 2020 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "I2C has quite some regression fixes this time. One is also related to watchdogs, we have proper acks from Guenter for them" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: acpi: put device when verifying client fails misc: eeprom: at24: fix regulator underflow i2c: gpio: suppress error on probe defer macintosh: windfarm: fix MODINFO regression i2c: designware-pci: Fix BUG_ON during device removal i2c: i801: Do not add ICH_RES_IO_SMI for the iTCO_wdt device watchdog: iTCO_wdt: Make ICH_RES_IO_SMI optional watchdog: iTCO_wdt: Export vendorsupport commit 3086ae071686e0fff1c0006a635f101edc5f3540 Merge: 6693075e0f46 8d92e992a785 Author: Linus Torvalds Date: Sat Mar 14 15:49:09 2020 -0700 Merge tag 'arc-5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - Fix __ALIGN_STR and __ALIGN to not use default junk padding - Misc Kconfig cleanups, header updates * tag 'arc-5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: define __ALIGN_STR and __ALIGN symbols for ARC ARC: show_regs: reduce lines of output ARC: Replace by ARC: fpu: fix randconfig build error reported by 0-day test service ARC: fix some Kconfig typos ARC: Cleanup old Kconfig IO scheduler options commit 6693075e0f46979f956fefdd51997f533b392615 Merge: 69a4d0baeeb1 018cabb694e3 Author: Linus Torvalds Date: Sat Mar 14 15:45:26 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Bugfixes for x86 and s390" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: nVMX: avoid NULL pointer dereference with incorrect EVMCS GPAs KVM: x86: Initializing all kvm_lapic_irq fields in ioapic_write_indirect KVM: VMX: Condition ENCLS-exiting enabling on CPU support for SGX1 KVM: s390: Also reset registers in sync regs for initial cpu reset KVM: fix Kconfig menu text for -Werror KVM: x86: remove stale comment from struct x86_emulate_ctxt KVM: x86: clear stale x86_emulate_ctxt->intercept value KVM: SVM: Fix the svm vmexit code for WRMSR KVM: X86: Fix dereference null cpufreq policy commit 1da8347d8505c137fb07ff06bbcd3f2bf37409bc Author: Megha Dey Date: Sat Mar 14 11:39:59 2020 +0800 iommu/vt-d: Populate debugfs if IOMMUs are detected Currently, the intel iommu debugfs directory(/sys/kernel/debug/iommu/intel) gets populated only when DMA remapping is enabled (dmar_disabled = 0) irrespective of whether interrupt remapping is enabled or not. Instead, populate the intel iommu debugfs directory if any IOMMUs are detected. Cc: Dan Carpenter Fixes: ee2636b8670b1 ("iommu/vt-d: Enable base Intel IOMMU debugfs support") Signed-off-by: Megha Dey Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 69a4d0baeeb14b6a3c47570a0ac2e0fc4474f0e0 Merge: fffb08b37df9 20055448dc1b Author: Linus Torvalds Date: Sat Mar 14 08:59:35 2020 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A small collection of fixes. I'll make another sweep soon to look for more fixes for this -rc series. - Mark device node const in of_clk_get_parent APIs to ease landing changes in users later - Fix flag for Qualcomm SC7180 video clocks where we thought it would never turn off but actually hardware takes care of it - Remove disp_cc_mdss_rscc_ahb_clk on Qualcomm SC7180 SoCs because this clk is always on anyway - Correct some bad dt-binding numbers for i.MX8MN SoCs" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: imx8mn: Fix incorrect clock defines clk: qcom: dispcc: Remove support of disp_cc_mdss_rscc_ahb_clk clk: qcom: videocc: Update the clock flag for video_cc_vcodec0_core_clk of: clk: Make of_clk_get_parent_{count,name}() parameter const commit 018cabb694e3923998fdc2908af5268f1d89f48f Merge: 997224fe6673 95fa10103dab Author: Paolo Bonzini Date: Sat Mar 14 12:49:37 2020 +0100 Merge branch 'kvm-null-pointer-fix' into kvm-master commit 95fa10103dabc38be5de8efdfced5e67576ed896 Author: Vitaly Kuznetsov Date: Mon Mar 9 16:52:11 2020 +0100 KVM: nVMX: avoid NULL pointer dereference with incorrect EVMCS GPAs When an EVMCS enabled L1 guest on KVM will tries doing enlightened VMEnter with EVMCS GPA = 0 the host crashes because the evmcs_gpa != vmx->nested.hv_evmcs_vmptr condition in nested_vmx_handle_enlightened_vmptrld() will evaluate to false (as nested.hv_evmcs_vmptr is zeroed after init). The crash will happen on vmx->nested.hv_evmcs pointer dereference. Another problematic EVMCS ptr value is '-1' but it only causes host crash after nested_release_evmcs() invocation. The problem is exactly the same as with '0', we mistakenly think that the EVMCS pointer hasn't changed and thus nested.hv_evmcs_vmptr is valid. Resolve the issue by adding an additional !vmx->nested.hv_evmcs check to nested_vmx_handle_enlightened_vmptrld(), this way we will always be trying kvm_vcpu_map() when nested.hv_evmcs is NULL and this is supposed to catch all invalid EVMCS GPAs. Also, initialize hv_evmcs_vmptr to '0' in nested_release_evmcs() to be consistent with initialization where we don't currently set hv_evmcs_vmptr to '-1'. Cc: stable@vger.kernel.org Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 997224fe6673dfe2aaf4ba114cbbcc53bb18780e Merge: 0c22056f8c43 e93fc7b4544a Author: Paolo Bonzini Date: Sat Mar 14 11:59:08 2020 +0100 Merge tag 'kvm-s390-master-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-master KVM: s390: Fully do the CPU resets as intended With 7de3f1423ff9 ("KVM: s390: Add new reset vcpu API") we clarified the meaning of the reset ioctl to fully reset the CPU and not only the parts that can not be handled by userspace. Turns out that we missed some parts. commit d01fd161e85904064290435f67f4ed59af5daf74 Author: Marc Zyngier Date: Wed Mar 11 11:56:49 2020 +0000 irqchip/gic-v3: Workaround Cavium erratum 38539 when reading GICD_TYPER2 Despite the architecture spec requiring that reserved registers in the GIC distributor memory map are RES0 (and thus are not allowed to generate an exception), the Cavium ThunderX (aka TX1) SoC explodes as such: [ 0.000000] GICv3: GIC: Using split EOI/Deactivate mode [ 0.000000] GICv3: 128 SPIs implemented [ 0.000000] GICv3: 0 Extended SPIs implemented [ 0.000000] Internal error: synchronous external abort: 96000210 [#1] SMP [ 0.000000] Modules linked in: [ 0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.0-rc4-00035-g3cf6a3d5725f #7956 [ 0.000000] Hardware name: cavium,thunder-88xx (DT) [ 0.000000] pstate: 60000085 (nZCv daIf -PAN -UAO) [ 0.000000] pc : __raw_readl+0x0/0x8 [ 0.000000] lr : gic_init_bases+0x110/0x560 [ 0.000000] sp : ffff800011243d90 [ 0.000000] x29: ffff800011243d90 x28: 0000000000000000 [ 0.000000] x27: 0000000000000018 x26: 0000000000000002 [ 0.000000] x25: ffff8000116f0000 x24: ffff000fbe6a2c80 [ 0.000000] x23: 0000000000000000 x22: ffff010fdc322b68 [ 0.000000] x21: ffff800010a7a208 x20: 00000000009b0404 [ 0.000000] x19: ffff80001124dad0 x18: 0000000000000010 [ 0.000000] x17: 000000004d8d492b x16: 00000000f67eb9af [ 0.000000] x15: ffffffffffffffff x14: ffff800011249908 [ 0.000000] x13: ffff800091243ae7 x12: ffff800011243af4 [ 0.000000] x11: ffff80001126e000 x10: ffff800011243a70 [ 0.000000] x9 : 00000000ffffffd0 x8 : ffff80001069c828 [ 0.000000] x7 : 0000000000000059 x6 : ffff8000113fb4d1 [ 0.000000] x5 : 0000000000000001 x4 : 0000000000000000 [ 0.000000] x3 : 0000000000000000 x2 : 0000000000000000 [ 0.000000] x1 : 0000000000000000 x0 : ffff8000116f000c [ 0.000000] Call trace: [ 0.000000] __raw_readl+0x0/0x8 [ 0.000000] gic_of_init+0x188/0x224 [ 0.000000] of_irq_init+0x200/0x3cc [ 0.000000] irqchip_init+0x1c/0x40 [ 0.000000] init_IRQ+0x160/0x1d0 [ 0.000000] start_kernel+0x2ec/0x4b8 [ 0.000000] Code: a8c47bfd d65f03c0 d538d080 d65f03c0 (b9400000) when reading the GICv4.1 GICD_TYPER2 register, which is unexpected... Work around it by adding a new quirk for the following variants: ThunderX: CN88xx OCTEON TX: CN83xx, CN81xx OCTEON TX2: CN93xx, CN96xx, CN98xx, CNF95xx* and use this flag to avoid accessing GICD_TYPER2. Note that all reserved registers (including redistributors and ITS) are impacted by this erratum, but that only GICD_TYPER2 has to be worked around so far. Signed-off-by: Marc Zyngier Tested-by: Robert Richter Tested-by: Mark Salter Tested-by: Tim Harvey Acked-by: Catalin Marinas Acked-by: Robert Richter Link: https://lore.kernel.org/r/20191027144234.8395-11-maz@kernel.org Link: https://lore.kernel.org/r/20200311115649.26060-1-maz@kernel.org commit 0c22056f8c43265da21a3dfe7b7e1379e5ff7c72 Author: Nitesh Narayan Lal Date: Fri Mar 13 09:16:24 2020 -0400 KVM: x86: Initializing all kvm_lapic_irq fields in ioapic_write_indirect Previously all fields of structure kvm_lapic_irq were not initialized before it was passed to kvm_bitmap_or_dest_vcpus(). Which will cause an issue when any of those fields are used for processing a request. For example not initializing the msi_redir_hint field before passing to the kvm_bitmap_or_dest_vcpus(), may lead to a misbehavior of kvm_apic_map_get_dest_lapic(). This will specifically happen when the kvm_lowest_prio_delivery() returns TRUE due to a non-zero garbage value of msi_redir_hint, which should not happen as the request belongs to APIC fixed delivery mode and we do not want to deliver the interrupt only to the lowest priority candidate. This patch initializes all the fields of kvm_lapic_irq based on the values of ioapic redirect_entry object before passing it on to kvm_bitmap_or_dest_vcpus(). Fixes: 7ee30bc132c6 ("KVM: x86: deliver KVM IOAPIC scan request to target vCPUs") Signed-off-by: Nitesh Narayan Lal Reviewed-by: Vitaly Kuznetsov [Set level to false since the value doesn't really matter. Suggested by Vitaly Kuznetsov. - Paolo] Signed-off-by: Paolo Bonzini commit 7a57c09bb1cb89239f38f690b87cdf2c7db76c34 Author: Sean Christopherson Date: Thu Mar 12 11:04:16 2020 -0700 KVM: VMX: Condition ENCLS-exiting enabling on CPU support for SGX1 Enable ENCLS-exiting (and thus set vmcs.ENCLS_EXITING_BITMAP) only if the CPU supports SGX1. Per Intel's SDM, all ENCLS leafs #UD if SGX1 is not supported[*], i.e. intercepting ENCLS to inject a #UD is unnecessary. Avoiding ENCLS-exiting even when it is reported as supported by the CPU works around a reported issue where SGX is "hard" disabled after an S3 suspend/resume cycle, i.e. CPUID.0x7.SGX=0 and the VMCS field/control are enumerated as unsupported. While the root cause of the S3 issue is unknown, it's definitely _not_ a KVM (or kernel) bug, i.e. this is a workaround for what is most likely a hardware or firmware issue. As a bonus side effect, KVM saves a VMWRITE when first preparing vmcs01 and vmcs02. Note, SGX must be disabled in BIOS to take advantage of this workaround [*] The additional ENCLS CPUID check on SGX1 exists so that SGX can be globally "soft" disabled post-reset, e.g. if #MC bits in MCi_CTL are cleared. Soft disabled meaning disabling SGX without clearing the primary CPUID bit (in leaf 0x7) and without poking into non-SGX CPU paths, e.g. for the VMCS controls. Fixes: 0b665d304028 ("KVM: vmx: Inject #UD for SGX ENCLS instruction in guest") Reported-by: Toni Spets Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 730ad0ede130015a773229573559e97ba0943065 Author: Suravee Suthikulpanit Date: Thu Mar 12 05:18:39 2020 -0500 iommu/amd: Fix IOMMU AVIC not properly update the is_run bit in IRTE Commit b9c6ff94e43a ("iommu/amd: Re-factor guest virtual APIC (de-)activation code") accidentally left out the ir_data pointer when calling modity_irte_ga(), which causes the function amd_iommu_update_ga() to return prematurely due to struct amd_ir_data.ref is NULL and the "is_run" bit of IRTE does not get updated properly. This results in bad I/O performance since IOMMU AVIC always generate GA Log entry and notify IOMMU driver and KVM when it receives interrupt from the PCI pass-through device instead of directly inject interrupt to the vCPU. Fixes by passing ir_data when calling modify_irte_ga() as done previously. Fixes: b9c6ff94e43a ("iommu/amd: Re-factor guest virtual APIC (de-)activation code") Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel commit da72a379b2ec0bad3eb265787f7008bead0b040c Author: Daniel Drake Date: Thu Mar 12 14:09:55 2020 +0800 iommu/vt-d: Ignore devices with out-of-spec domain number VMD subdevices are created with a PCI domain ID of 0x10000 or higher. These subdevices are also handled like all other PCI devices by dmar_pci_bus_notifier(). However, when dmar_alloc_pci_notify_info() take records of such devices, it will truncate the domain ID to a u16 value (in info->seg). The device at (e.g.) 10000:00:02.0 is then treated by the DMAR code as if it is 0000:00:02.0. In the unlucky event that a real device also exists at 0000:00:02.0 and also has a device-specific entry in the DMAR table, dmar_insert_dev_scope() will crash on:   BUG_ON(i >= devices_cnt); That's basically a sanity check that only one PCI device matches a single DMAR entry; in this case we seem to have two matching devices. Fix this by ignoring devices that have a domain number higher than what can be looked up in the DMAR table. This problem was carefully diagnosed by Jian-Hong Pan. Signed-off-by: Lu Baolu Signed-off-by: Daniel Drake Fixes: 59ce0515cdaf3 ("iommu/vt-d: Update DRHD/RMRR/ATSR device scope caches when PCI hotplug happens") Signed-off-by: Joerg Roedel commit b0bb0c22c4db623f2e7b1a471596fbf1c22c6dc5 Author: Zhenzhong Duan Date: Thu Mar 12 14:09:54 2020 +0800 iommu/vt-d: Fix the wrong printing in RHSA parsing When base address in RHSA structure doesn't match base address in each DRHD structure, the base address in last DRHD is printed out. This doesn't make sense when there are multiple DRHD units, fix it by printing the buggy RHSA's base address. Signed-off-by: Lu Baolu Signed-off-by: Zhenzhong Duan Fixes: fd0c8894893cb ("intel-iommu: Set a more specific taint flag for invalid BIOS DMAR tables") Signed-off-by: Joerg Roedel commit 82f2bc2fcc0160d6f82dd1ac64518ae0a4dd183f Author: Nathan Chancellor Date: Wed Mar 11 12:41:21 2020 -0700 kbuild: Disable -Wpointer-to-enum-cast Clang's -Wpointer-to-int-cast deviates from GCC in that it warns when casting to enums. The kernel does this in certain places, such as device tree matches to set the version of the device being used, which allows the kernel to avoid using a gigantic union. https://elixir.bootlin.com/linux/v5.5.8/source/drivers/ata/ahci_brcm.c#L428 https://elixir.bootlin.com/linux/v5.5.8/source/drivers/ata/ahci_brcm.c#L402 https://elixir.bootlin.com/linux/v5.5.8/source/include/linux/mod_devicetable.h#L264 To avoid a ton of false positive warnings, disable this particular part of the warning, which has been split off into a separate diagnostic so that the entire warning does not need to be turned off for clang. It will be visible under W=1 in case people want to go about fixing these easily and enabling the warning treewide. Cc: stable@vger.kernel.org Link: https://github.com/ClangBuiltLinux/linux/issues/887 Link: https://github.com/llvm/llvm-project/commit/2a41b31fcdfcb67ab7038fc2ffb606fd50b83a84 Signed-off-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit fffb08b37df928475fef9c7f2aafddc2f6ebfaf4 Merge: b0ea262a2347 394b61711f3c Author: Linus Torvalds Date: Fri Mar 13 16:39:19 2020 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two small fixes, both in drivers: ipr and ufs" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ipr: Fix softlockup when rescanning devices in petitboot scsi: ufs: Fix possible unclocked access to auto hibern8 timer register commit 7d7587db0d7fd1138f2afcffdc46a8e15630b944 Author: David Howells Date: Thu Mar 12 21:40:06 2020 +0000 afs: Fix client call Rx-phase signal handling Fix the handling of signals in client rxrpc calls made by the afs filesystem. Ignore signals completely, leaving call abandonment or connection loss to be detected by timeouts inside AF_RXRPC. Allowing a filesystem call to be interrupted after the entire request has been transmitted and an abort sent means that the server may or may not have done the action - and we don't know. It may even be worse than that for older servers. Fixes: bc5e3a546d55 ("rxrpc: Use MSG_WAITALL to tell sendmsg() to temporarily ignore signals") Signed-off-by: David Howells commit dde9f095583b3f375ba23979045ee10dfcebec2f Author: David Howells Date: Fri Mar 13 13:46:08 2020 +0000 afs: Fix handling of an abort from a service handler When an AFS service handler function aborts a call, AF_RXRPC marks the call as complete - which means that it's not going to get any more packets from the receiver. This is a problem because reception of the final ACK is what triggers afs_deliver_to_call() to drop the final ref on the afs_call object. Instead, aborted AFS service calls may then just sit around waiting for ever or until they're displaced by a new call on the same connection channel or a connection-level abort. Fix this by calling afs_set_call_complete() to finalise the afs_call struct representing the call. However, we then need to drop the ref that stops the call from being deallocated. We can do this in afs_set_call_complete(), as the work queue is holding a separate ref of its own, but then we shouldn't do it in afs_process_async_call() and afs_delete_async_call(). call->drop_ref is set to indicate that a ref needs dropping for a call and this is dealt with when we transition a call to AFS_CALL_COMPLETE. But then we also need to get rid of the ref that pins an asynchronous client call. We can do this by the same mechanism, setting call->drop_ref for an async client call too. We can also get rid of call->incoming since nothing ever sets it and only one thing ever checks it (futilely). A trace of the rxrpc_call and afs_call struct ref counting looks like: -0 [001] ..s5 164.764892: rxrpc_call: c=00000002 SEE u=3 sp=rxrpc_new_incoming_call+0x473/0xb34 a=00000000442095b5 -0 [001] .Ns5 164.766001: rxrpc_call: c=00000002 QUE u=4 sp=rxrpc_propose_ACK+0xbe/0x551 a=00000000442095b5 -0 [001] .Ns4 164.766005: rxrpc_call: c=00000002 PUT u=3 sp=rxrpc_new_incoming_call+0xa3f/0xb34 a=00000000442095b5 -0 [001] .Ns7 164.766433: afs_call: c=00000002 WAKE u=2 o=11 sp=rxrpc_notify_socket+0x196/0x33c kworker/1:2-1810 [001] ...1 164.768409: rxrpc_call: c=00000002 SEE u=3 sp=rxrpc_process_call+0x25/0x7ae a=00000000442095b5 kworker/1:2-1810 [001] ...1 164.769439: rxrpc_tx_packet: c=00000002 e9f1a7a8:95786a88:00000008:09c5 00000001 00000000 02 22 ACK CallAck kworker/1:2-1810 [001] ...1 164.769459: rxrpc_call: c=00000002 PUT u=2 sp=rxrpc_process_call+0x74f/0x7ae a=00000000442095b5 kworker/1:2-1810 [001] ...1 164.770794: afs_call: c=00000002 QUEUE u=3 o=12 sp=afs_deliver_to_call+0x449/0x72c kworker/1:2-1810 [001] ...1 164.770829: afs_call: c=00000002 PUT u=2 o=12 sp=afs_process_async_call+0xdb/0x11e kworker/1:2-1810 [001] ...2 164.771084: rxrpc_abort: c=00000002 95786a88:00000008 s=0 a=1 e=1 K-1 kworker/1:2-1810 [001] ...1 164.771461: rxrpc_tx_packet: c=00000002 e9f1a7a8:95786a88:00000008:09c5 00000002 00000000 04 00 ABORT CallAbort kworker/1:2-1810 [001] ...1 164.771466: afs_call: c=00000002 PUT u=1 o=12 sp=SRXAFSCB_ProbeUuid+0xc1/0x106 The abort generated in SRXAFSCB_ProbeUuid(), labelled "K-1", indicates that the local filesystem/cache manager didn't recognise the UUID as its own. Fixes: 2067b2b3f484 ("afs: Fix the CB.ProbeUuid service handler to reply correctly") Signed-off-by: David Howells commit 4636cf184d6d9a92a56c2554681ea520dd4fe49a Author: David Howells Date: Fri Mar 13 13:36:01 2020 +0000 afs: Fix some tracing details Fix a couple of tracelines to indicate the usage count after the atomic op, not the usage count before it to be consistent with other afs and rxrpc trace lines. Change the wording of the afs_call_trace_work trace ID label from "WORK" to "QUEUE" to reflect the fact that it's queueing work, not doing work. Fixes: 341f741f04be ("afs: Refcount the afs_call struct") Signed-off-by: David Howells commit 498b577660f08cef5d9e78e0ed6dcd4c0939e98c Author: David Howells Date: Fri Mar 13 17:30:27 2020 +0000 rxrpc: Fix sendmsg(MSG_WAITALL) handling Fix the handling of sendmsg() with MSG_WAITALL for userspace to round the timeout for when a signal occurs up to at least two jiffies as a 1 jiffy timeout may end up being effectively 0 if jiffies wraps at the wrong time. Fixes: bc5e3a546d55 ("rxrpc: Use MSG_WAITALL to tell sendmsg() to temporarily ignore signals") Signed-off-by: David Howells commit e138aa7d3271ac1b0690ae2c9b04d51468dce1d6 Author: David Howells Date: Fri Mar 13 09:22:09 2020 +0000 rxrpc: Fix call interruptibility handling Fix the interruptibility of kernel-initiated client calls so that they're either only interruptible when they're waiting for a call slot to come available or they're not interruptible at all. Either way, they're not interruptible during transmission. This should help prevent StoreData calls from being interrupted when writeback is in progress. It doesn't, however, handle interruption during the receive phase. Userspace-initiated calls are still interruptable. After the signal has been handled, sendmsg() will return the amount of data copied out of the buffer and userspace can perform another sendmsg() call to continue transmission. Fixes: bc5e3a546d55 ("rxrpc: Use MSG_WAITALL to tell sendmsg() to temporarily ignore signals") Signed-off-by: David Howells commit 158fe6665389964a1de212818b4a5c52b7f7aff4 Author: David Howells Date: Fri Mar 13 09:05:38 2020 +0000 rxrpc: Abstract out the calculation of whether there's Tx space Abstract out the calculation of there being sufficient Tx buffer space. This is reproduced several times in the rxrpc sendmsg code. Signed-off-by: David Howells commit b0ea262a2347eac8522de5eef24ccd7a90dad7d4 Merge: 7e6d869f5f02 55dee1bc0d72 Author: Linus Torvalds Date: Fri Mar 13 15:21:32 2020 -0700 Merge tag 'nfs-for-5.6-3' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client bugfixes from Anna Schumaker: "These are mostly fscontext fixes, but there is also one that fixes collisions seen in fscache: - Ensure the fs_context has the correct fs_type when mounting and submounting - Fix leaking of ctx->nfs_server.hostname - Add minor version to fscache key to prevent collisions" * tag 'nfs-for-5.6-3' of git://git.linux-nfs.org/projects/anna/linux-nfs: nfs: add minor version to nfs_server_key for fscache NFS: Fix leak of ctx->nfs_server.hostname NFS: Don't hard-code the fs_type when submounting NFS: Ensure the fs_context has the correct fs_type before mounting commit 7e6d869f5f024adc1fb0049f085c7a433fd09b14 Merge: 2af82177af47 3e8cb8b2eaeb Author: Linus Torvalds Date: Fri Mar 13 15:19:38 2020 -0700 Merge tag 'fuse-fixes-5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse fix from Miklos Szeredi: "Fix an Oops introduced in v5.4" * tag 'fuse-fixes-5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: fix stack use after return commit 2af82177af47a3bff0cd0113dfde14d6e44a6243 Merge: 78511edc2dd4 c853680453ac Author: Linus Torvalds Date: Fri Mar 13 15:17:21 2020 -0700 Merge tag 'ovl-fixes-5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: "Fix three bugs introduced in this cycle" * tag 'ovl-fixes-5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: fix lockdep warning for async write ovl: fix some xino configurations ovl: fix lock in ovl_llseek() commit 236ebc20d9afc5e9ff52f3cf3f365a91583aac10 Author: Filipe Manana Date: Tue Mar 10 12:13:53 2020 +0000 btrfs: fix log context list corruption after rename whiteout error During a rename whiteout, if btrfs_whiteout_for_rename() returns an error we can end up returning from btrfs_rename() with the log context object still in the root's log context list - this happens if 'sync_log' was set to true before we called btrfs_whiteout_for_rename() and it is dangerous because we end up with a corrupt linked list (root->log_ctxs) as the log context object was allocated on the stack. After btrfs_rename() returns, any task that is running btrfs_sync_log() concurrently can end up crashing because that linked list is traversed by btrfs_sync_log() (through btrfs_remove_all_log_ctxs()). That results in the same issue that commit e6c617102c7e4 ("Btrfs: fix log context list corruption after rename exchange operation") fixed. Fixes: d4682ba03ef618 ("Btrfs: sync log after logging new name") CC: stable@vger.kernel.org # 4.19+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 78511edc2dd4c7b9f74f3b544093c854b7bd7744 Merge: 5007928eaeb7 bce74b1feb01 Author: Linus Torvalds Date: Fri Mar 13 13:21:51 2020 -0700 Merge tag 'pm-5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Fix cpupower utility build failures with -fno-common enabled (Mike Gilbert)" * tag 'pm-5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpupower: avoid multiple definition with gcc -fno-common commit 5007928eaeb7681501e94ac7516f6c6200f993fa Merge: 17829c5a42f7 805b13adde39 Author: Linus Torvalds Date: Fri Mar 13 13:00:08 2020 -0700 Merge tag 'io_uring-5.6-2020-03-13' of git://git.kernel.dk/linux-block Pull io_uring fix from Jens Axboe: "Just a single fix here, improving the RCU callback ordering from last week. After a bit more perusing by Paul, he poked a hole in the original" * tag 'io_uring-5.6-2020-03-13' of git://git.kernel.dk/linux-block: io_uring: ensure RCU callback ordering with rcu_barrier() commit 17829c5a42f776463b305f8a9ccac55a3f473e1d Merge: d36561296bb5 b53df2e7442c Author: Linus Torvalds Date: Fri Mar 13 12:45:23 2020 -0700 Merge tag 'block-5.6-2020-03-13' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few fixes that should go into this release. This contains: - Fix for a corruption issue with the s390 dasd driver (Stefan) - Fixup/improvement for the flush insertion change that we had in this series (Ming) - Fix for the partition suppor for host aware zoned devices (Shin'ichiro) - Fix incorrect blk-iocost comparison (Tejun) The diffstat looks large, but that's a) mostly dasd, and b) the flush fix from Ming adds a big comment" * tag 'block-5.6-2020-03-13' of git://git.kernel.dk/linux-block: block: Fix partition support for host aware zoned block devices blk-mq: insert flush request to the front of dispatch queue s390/dasd: fix data corruption for thin provisioned devices blk-iocost: fix incorrect vtime comparison in iocg_is_idle() commit d36561296bb510bf339750ea22efaa660277642e Merge: ddd2b85ff73b 18d200460cd7 Author: Linus Torvalds Date: Fri Mar 13 12:21:10 2020 -0700 Merge tag 'mmc-v5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Fix HW busy detection support for host controllers requiring the MMC_RSP_BUSY response flag (R1B) to be set for the command. In particular for CMD6 (eMMC), erase/trim/discard (SD/eMMC) and CMD5 (eMMC sleep). MMC host: - sdhci-omap|tegra: Fix support for HW busy detection" * tag 'mmc-v5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for eMMC sleep command mmc: sdhci-tegra: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY mmc: sdhci-omap: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for erase/trim/discard mmc: core: Allow host controllers to require R1B for CMD6 commit 94b18a87efdd1626a1e6aef87271af4a7c616d36 Merge: 242a6df688dc e2e57291097b Author: David S. Miller Date: Fri Mar 13 11:21:25 2020 -0700 Merge tag 'wireless-drivers-2020-03-13' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.6 Third, and hopefully last, set of fixes for v5.6. iwlwifi * fix a locking issue in time events handling * a fix in rate-scaling * fix for a potential NULL pointer deref * enable antenna diversity in some devices that were erroneously not doing it * allow FW dumps to continue when the FW is stuck * a fix in the HE capabilities handling * another fix for FW dumps where we were reading wrong addresses * fix link in MAINTAINERS file rtlwifi * fix regression causing connect issues in v5.4 wlcore * remove merge damage which luckily didn't have any impact on functionality ==================== Signed-off-by: David S. Miller commit 242a6df688dcad7c55105280a79aaff83addf7ce Merge: 0d81a3f29c0a 90db6d772f74 Author: David S. Miller Date: Fri Mar 13 11:13:45 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== pull-request: bpf 2020-03-12 The following pull-request contains BPF updates for your *net* tree. We've added 12 non-merge commits during the last 8 day(s) which contain a total of 12 files changed, 161 insertions(+), 15 deletions(-). The main changes are: 1) Andrii fixed two bugs in cgroup-bpf. 2) John fixed sockmap. 3) Luke fixed x32 jit. 4) Martin fixed two issues in struct_ops. 5) Yonghong fixed bpf_send_signal. 6) Yoshiki fixed BTF enum. ==================== Signed-off-by: David S. Miller commit ddd2b85ff73bb60061a9fb08ac1f5a03a2d4bce0 Author: Jann Horn Date: Thu Mar 12 21:36:53 2020 +0000 afs: Use kfree_rcu() instead of casting kfree() to rcu_callback_t afs_put_addrlist() casts kfree() to rcu_callback_t. Apart from being wrong in theory, this might also blow up when people start enforcing function types via compiler instrumentation, and it means the rcu_head has to be first in struct afs_addr_list. Use kfree_rcu() instead, it's simpler and more correct. Signed-off-by: Jann Horn Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit 92bd1f2e1eed493a73a19012a3a7f1feed0883ff Merge: 8daee952b438 58d6fee50e67 Author: Wolfram Sang Date: Fri Mar 13 16:32:28 2020 +0100 Merge tag 'at24-fixes-for-v5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-current at24 fixes for v5.6-rc6 - fix regulator underflow bug introduced during the v5.6 merge window commit c853680453ac235e9010987a8bdaaba0e116d3c8 Author: Miklos Szeredi Date: Fri Mar 13 15:42:20 2020 +0100 ovl: fix lockdep warning for async write Lockdep reports "WARNING: lock held when returning to user space!" due to async write holding freeze lock over the write. Apparently aio.c already deals with this by lying to lockdep about the state of the lock. Do the same here. No need to check for S_IFREG() here since these file ops are regular-only. Reported-by: syzbot+9331a354f4f624a52a55@syzkaller.appspotmail.com Fixes: 2406a307ac7d ("ovl: implement async IO routines") Signed-off-by: Miklos Szeredi commit 53afcd310e867d25e394718558783c476301205c Author: Amir Goldstein Date: Fri Feb 21 16:34:42 2020 +0200 ovl: fix some xino configurations Fix up two bugs in the coversion to xino_mode: 1. xino=off does not always end up in disabled mode 2. xino=auto on 32bit arch should end up in disabled mode Take a proactive approach to disabling xino on 32bit kernel: 1. Disable XINO_AUTO config during build time 2. Disable xino with a warning on mount time As a by product, xino=on on 32bit arch also ends up in disabled mode. We never intended to enable xino on 32bit arch and this will make the rest of the logic simpler. Fixes: 0f831ec85eda ("ovl: simplify ovl_same_sb() helper") Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit cfb5d65f25959f724081bae8445a0241db606af6 Author: Roger Quadros Date: Fri Mar 13 11:47:17 2020 +0200 ARM: dts: dra7: Add bus_dma_limit for L3 bus The L3 interconnect's memory map is from 0x0 to 0xffffffff. Out of this, System memory (SDRAM) can be accessed from 0x80000000 to 0xffffffff (2GB) DRA7 does support 4GB of SDRAM but upper 2GB can only be accessed by the MPU subsystem. Add the dma-ranges property to reflect the physical address limit of the L3 bus. Issues ere observed only with SATA on DRA7-EVM with 4GB RAM and CONFIG_ARM_LPAE enabled. This is because the controller supports 64-bit DMA and its driver sets the dma_mask to 64-bit thus resulting in DMA accesses beyond L3 limit of 2G. Setting the correct bus_dma_limit fixes the issue. Signed-off-by: Roger Quadros Cc: stable@kernel.org Signed-off-by: Tony Lindgren commit 8c34cd1a7f089dc03933289c5d4a4d1489549828 Author: Gerd Hoffmann Date: Fri Mar 13 09:41:52 2020 +0100 drm/bochs: downgrade pci_request_region failure from error to warning Shutdown of firmware framebuffer has a bunch of problems. Because of this the framebuffer region might still be reserved even after drm_fb_helper_remove_conflicting_pci_framebuffers() returned. Don't consider pci_request_region() failure for the framebuffer region as fatal error to workaround this issue. Reported-by: Marek Marczykowski-Górecki Signed-off-by: Gerd Hoffmann Acked-by: Sam Ravnborg Link: http://patchwork.freedesktop.org/patch/msgid/20200313084152.2734-1-kraxel@redhat.com commit 941224e09483ea3428ffc6402de56a4a2e2cb6da Author: Kaike Wan Date: Fri Mar 13 08:39:57 2020 -0400 IB/rdmavt: Free kernel completion queue when done When a kernel ULP requests the rdmavt to create a completion queue, it allocated the queue and set cq->kqueue to point to it. However, when the completion queue is destroyed, cq->queue is freed instead, leading to a memory leak: https://lore.kernel.org/r/215235485.15264050.1583334487658.JavaMail.zimbra@redhat.com unreferenced object 0xffffc90006639000 (size 12288): comm "kworker/u128:0", pid 8, jiffies 4295777598 (age 589.085s) hex dump (first 32 bytes): 4d 00 00 00 4d 00 00 00 00 c0 08 ac 8b 88 ff ff M...M........... 00 00 00 00 80 00 00 00 00 00 00 00 10 00 00 00 ................ backtrace: [<0000000035a3d625>] __vmalloc_node_range+0x361/0x720 [<000000002942ce4f>] __vmalloc_node.constprop.30+0x63/0xb0 [<00000000f228f784>] rvt_create_cq+0x98a/0xd80 [rdmavt] [<00000000b84aec66>] __ib_alloc_cq_user+0x281/0x1260 [ib_core] [<00000000ef3764be>] nvme_rdma_cm_handler+0xdb7/0x1b80 [nvme_rdma] [<00000000936b401c>] cma_cm_event_handler+0xb7/0x550 [rdma_cm] [<00000000d9c40b7b>] addr_handler+0x195/0x310 [rdma_cm] [<00000000c7398a03>] process_one_req+0xdd/0x600 [ib_core] [<000000004d29675b>] process_one_work+0x920/0x1740 [<00000000efedcdb5>] worker_thread+0x87/0xb40 [<000000005688b340>] kthread+0x327/0x3f0 [<0000000043a168d6>] ret_from_fork+0x3a/0x50 This patch fixes the issue by freeing cq->kqueue instead. Fixes: 239b0e52d8aa ("IB/hfi1: Move rvt_cq_wc struct into uapi directory") Link: https://lore.kernel.org/r/20200313123957.14343.43879.stgit@awfm-01.aw.intel.com Cc: # 5.4.x Reported-by: Yi Zhang Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 469ff207b4c4033540b50bc59587dc915faa1367 Author: Peter Xu Date: Thu Mar 12 16:58:30 2020 -0400 x86/vector: Remove warning on managed interrupt migration The vector management code assumes that managed interrupts cannot be migrated away from an online CPU. free_moved_vector() has a WARN_ON_ONCE() which triggers when a managed interrupt vector association on a online CPU is cleared. The CPU offline code uses a different mechanism which cannot trigger this. This assumption is not longer correct because the new CPU isolation feature which affects the placement of managed interrupts must be able to move a managed interrupt away from an online CPU. There are two reasons why this can happen: 1) When the interrupt is activated the affinity mask which was established in irq_create_affinity_masks() is handed in to the vector allocation code. This mask contains all CPUs to which the interrupt can be made affine to, but this does not take the CPU isolation 'managed_irq' mask into account. When the interrupt is finally requested by the device driver then the affinity is checked again and the CPU isolation 'managed_irq' mask is taken into account, which moves the interrupt to a non-isolated CPU if possible. 2) The interrupt can be affine to an isolated CPU because the non-isolated CPUs in the calculated affinity mask are not online. Once a non-isolated CPU which is in the mask comes online the interrupt is migrated to this non-isolated CPU In both cases the regular online migration mechanism is used which triggers the WARN_ON_ONCE() in free_moved_vector(). Case #1 could have been addressed by taking the isolation mask into account, but that would require a massive code change in the activation logic and the eventual migration event was accepted as a reasonable tradeoff when the isolation feature was developed. But even if #1 would be addressed, #2 would still trigger it. Of course the warning in free_moved_vector() was overlooked at that time and the above two cases which have been discussed during patch review have obviously never been tested before the final submission. So keep it simple and remove the warning. [ tglx: Rewrote changelog and added a comment to free_moved_vector() ] Fixes: 11ea68f553e2 ("genirq, sched/isolation: Isolate from handling managed interrupts") Signed-off-by: Peter Xu Signed-off-by: Thomas Gleixner Reviewed-by: Ming Lei Link: https://lkml.kernel.org/r/20200312205830.81796-1-peterx@redhat.com commit 8daee952b4389729358665fb91949460641659d4 Author: Wolfram Sang Date: Thu Mar 12 14:32:44 2020 +0100 i2c: acpi: put device when verifying client fails i2c_verify_client() can fail, so we need to put the device when that happens. Fixes: 525e6fabeae2 ("i2c / ACPI: add support for ACPI reconfigure notifications") Reported-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Wolfram Sang commit 5bdfa854013ce4193de0d097931fd841382c76a7 Author: Jason Gunthorpe Date: Tue Mar 10 09:53:39 2020 +0200 RDMA/mad: Do not crash if the rdma device does not have a umad interface Non-IB devices do not have a umad interface and the client_data will be left set to NULL. In this case calling get_nl_info() will try to kref a NULL cdev causing a crash: general protection fault, probably for non-canonical address 0xdffffc00000000ba: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x00000000000005d0-0x00000000000005d7] CPU: 0 PID: 20851 Comm: syz-executor.0 Not tainted 5.6.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:kobject_get+0x35/0x150 lib/kobject.c:640 Code: 53 e8 3f b0 8b f9 4d 85 e4 0f 84 a2 00 00 00 e8 31 b0 8b f9 49 8d 7c 24 3c 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f b6 04 02 48 89 fa +83 e2 07 38 d0 7f 08 84 c0 0f 85 eb 00 00 00 RSP: 0018:ffffc9000946f1a0 EFLAGS: 00010203 RAX: dffffc0000000000 RBX: ffffffff85bdbbb0 RCX: ffffc9000bf22000 RDX: 00000000000000ba RSI: ffffffff87e9d78f RDI: 00000000000005d4 RBP: ffffc9000946f1b8 R08: ffff8880581a6440 R09: ffff8880581a6cd0 R10: fffffbfff154b838 R11: ffffffff8aa5c1c7 R12: 0000000000000598 R13: 0000000000000000 R14: ffffc9000946f278 R15: ffff88805cb0c4d0 FS: 00007faa9e8af700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b30121000 CR3: 000000004515d000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: get_device+0x25/0x40 drivers/base/core.c:2574 __ib_get_client_nl_info+0x205/0x2e0 drivers/infiniband/core/device.c:1861 ib_get_client_nl_info+0x35/0x180 drivers/infiniband/core/device.c:1881 nldev_get_chardev+0x575/0xac0 drivers/infiniband/core/nldev.c:1621 rdma_nl_rcv_msg drivers/infiniband/core/netlink.c:195 [inline] rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline] rdma_nl_rcv+0x5d9/0x980 drivers/infiniband/core/netlink.c:259 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x59e/0x7e0 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 ____sys_sendmsg+0x753/0x880 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmsg+0x105/0x1d0 net/socket.c:2430 __do_sys_sendmsg net/socket.c:2439 [inline] __se_sys_sendmsg net/socket.c:2437 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2437 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Cc: stable@kernel.org Fixes: 8f71bb0030b8 ("RDMA: Report available cdevs through RDMA_NLDEV_CMD_GET_CHARDEV") Link: https://lore.kernel.org/r/20200310075339.238090-1-leon@kernel.org Reported-by: syzbot+46fe08363dbba223dec5@syzkaller.appspotmail.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f2f2b3bbf0d9f8d090b9a019679223b2bd1c66c4 Author: Jason Gunthorpe Date: Mon Mar 9 16:32:00 2020 -0300 RDMA/core: Fix missing error check on dev_set_name() If name memory allocation fails the name will be left empty and device_add_one() will crash: kobject: (0000000004952746): attempted to be registered with empty name! WARNING: CPU: 0 PID: 329 at lib/kobject.c:234 kobject_add_internal+0x7ac/0x9a0 lib/kobject.c:234 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 329 Comm: syz-executor.5 Not tainted 5.6.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x197/0x210 lib/dump_stack.c:118 panic+0x2e3/0x75c kernel/panic.c:221 __warn.cold+0x2f/0x3e kernel/panic.c:582 report_bug+0x289/0x300 lib/bug.c:195 fixup_bug arch/x86/kernel/traps.c:174 [inline] fixup_bug arch/x86/kernel/traps.c:169 [inline] do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:267 do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:286 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1027 RIP: 0010:kobject_add_internal+0x7ac/0x9a0 lib/kobject.c:234 Code: 1a 98 ca f9 e9 f0 f8 ff ff 4c 89 f7 e8 6d 98 ca f9 e9 95 f9 ff ff e8 c3 f0 8b f9 4c 89 e6 48 c7 c7 a0 0e 1a 89 e8 e3 41 5c f9 <0f> 0b 41 bd ea ff ff ff e9 52 ff ff ff e8 a2 f0 8b f9 0f 0b e8 9b RSP: 0018:ffffc90005b27908 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000040000 RSI: ffffffff815eae46 RDI: fffff52000b64f13 RBP: ffffc90005b27960 R08: ffff88805aeba480 R09: ffffed1015d06659 R10: ffffed1015d06658 R11: ffff8880ae8332c7 R12: ffff8880a37fd000 R13: 0000000000000000 R14: ffff888096691780 R15: 0000000000000001 kobject_add_varg lib/kobject.c:390 [inline] kobject_add+0x150/0x1c0 lib/kobject.c:442 device_add+0x3be/0x1d00 drivers/base/core.c:2412 add_one_compat_dev drivers/infiniband/core/device.c:901 [inline] add_one_compat_dev+0x46a/0x7e0 drivers/infiniband/core/device.c:857 rdma_dev_init_net+0x2eb/0x490 drivers/infiniband/core/device.c:1120 ops_init+0xb3/0x420 net/core/net_namespace.c:137 setup_net+0x2d5/0x8b0 net/core/net_namespace.c:327 copy_net_ns+0x29e/0x5a0 net/core/net_namespace.c:468 create_new_namespaces+0x403/0xb50 kernel/nsproxy.c:108 unshare_nsproxy_namespaces+0xc2/0x200 kernel/nsproxy.c:229 ksys_unshare+0x444/0x980 kernel/fork.c:2955 __do_sys_unshare kernel/fork.c:3023 [inline] __se_sys_unshare kernel/fork.c:3021 [inline] __x64_sys_unshare+0x31/0x40 kernel/fork.c:3021 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Link: https://lore.kernel.org/r/20200309193200.GA10633@ziepe.ca Cc: stable@kernel.org Fixes: 4e0f7b907072 ("RDMA/core: Implement compat device/sysfs tree in net namespace") Reported-by: syzbot+ab4dae63f7d310641ded@syzkaller.appspotmail.com Signed-off-by: Jason Gunthorpe commit ba3b01d7a6f4ab9f8a0557044c9a7678f64ae070 Author: Megha Dey Date: Mon Mar 9 13:09:46 2020 -0700 iommu/vt-d: Fix debugfs register reads Commit 6825d3ea6cde ("iommu/vt-d: Add debugfs support to show register contents") dumps the register contents for all IOMMU devices. Currently, a 64 bit read(dmar_readq) is done for all the IOMMU registers, even though some of the registers are 32 bits, which is incorrect. Use the correct read function variant (dmar_readl/dmar_readq) while reading the contents of 32/64 bit registers respectively. Signed-off-by: Megha Dey Link: https://lore.kernel.org/r/1583784587-26126-2-git-send-email-megha.dey@linux.intel.com Acked-by: Lu Baolu Signed-off-by: Joerg Roedel commit 81ee85d0462410de8eeeec1b9761941fd6ed8c7b Author: Hans de Goede Date: Mon Mar 9 19:25:10 2020 +0100 iommu/vt-d: quirk_ioat_snb_local_iommu: replace WARN_TAINT with pr_warn + add_taint Quoting from the comment describing the WARN functions in include/asm-generic/bug.h: * WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report * significant kernel issues that need prompt attention if they should ever * appear at runtime. * * Do not use these macros when checking for invalid external inputs The (buggy) firmware tables which the dmar code was calling WARN_TAINT for really are invalid external inputs. They are not under the kernel's control and the issues in them cannot be fixed by a kernel update. So logging a backtrace, which invites bug reports to be filed about this, is not helpful. Fixes: 556ab45f9a77 ("ioat2: catch and recover from broken vtd configurations v6") Signed-off-by: Hans de Goede Acked-by: Lu Baolu Link: https://lore.kernel.org/r/20200309182510.373875-1-hdegoede@redhat.com BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=701847 Signed-off-by: Joerg Roedel commit 96788c7a7f1e7206519d4d736f89a2072dcfe0fc Author: Hans de Goede Date: Mon Mar 9 15:01:38 2020 +0100 iommu/vt-d: dmar_parse_one_rmrr: replace WARN_TAINT with pr_warn + add_taint Quoting from the comment describing the WARN functions in include/asm-generic/bug.h: * WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report * significant kernel issues that need prompt attention if they should ever * appear at runtime. * * Do not use these macros when checking for invalid external inputs The (buggy) firmware tables which the dmar code was calling WARN_TAINT for really are invalid external inputs. They are not under the kernel's control and the issues in them cannot be fixed by a kernel update. So logging a backtrace, which invites bug reports to be filed about this, is not helpful. Some distros, e.g. Fedora, have tools watching for the kernel backtraces logged by the WARN macros and offer the user an option to file a bug for this when these are encountered. The WARN_TAINT in dmar_parse_one_rmrr + another iommu WARN_TAINT, addressed in another patch, have lead to over a 100 bugs being filed this way. This commit replaces the WARN_TAINT("...") call, with a pr_warn(FW_BUG "...") + add_taint(TAINT_FIRMWARE_WORKAROUND, ...) call avoiding the backtrace and thus also avoiding bug-reports being filed about this against the kernel. Fixes: f5a68bb0752e ("iommu/vt-d: Mark firmware tainted if RMRR fails sanity check") Signed-off-by: Hans de Goede Signed-off-by: Joerg Roedel Acked-by: Lu Baolu Cc: stable@vger.kernel.org Cc: Barret Rhoden Link: https://lore.kernel.org/r/20200309140138.3753-3-hdegoede@redhat.com BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1808874 commit 59833696442c674acbbd297772ba89e7ad8c753d Author: Hans de Goede Date: Mon Mar 9 15:01:37 2020 +0100 iommu/vt-d: dmar: replace WARN_TAINT with pr_warn + add_taint Quoting from the comment describing the WARN functions in include/asm-generic/bug.h: * WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report * significant kernel issues that need prompt attention if they should ever * appear at runtime. * * Do not use these macros when checking for invalid external inputs The (buggy) firmware tables which the dmar code was calling WARN_TAINT for really are invalid external inputs. They are not under the kernel's control and the issues in them cannot be fixed by a kernel update. So logging a backtrace, which invites bug reports to be filed about this, is not helpful. Some distros, e.g. Fedora, have tools watching for the kernel backtraces logged by the WARN macros and offer the user an option to file a bug for this when these are encountered. The WARN_TAINT in warn_invalid_dmar() + another iommu WARN_TAINT, addressed in another patch, have lead to over a 100 bugs being filed this way. This commit replaces the WARN_TAINT("...") calls, with pr_warn(FW_BUG "...") + add_taint(TAINT_FIRMWARE_WORKAROUND, ...) calls avoiding the backtrace and thus also avoiding bug-reports being filed about this against the kernel. Fixes: fd0c8894893c ("intel-iommu: Set a more specific taint flag for invalid BIOS DMAR tables") Fixes: e625b4a95d50 ("iommu/vt-d: Parse ANDD records") Signed-off-by: Hans de Goede Signed-off-by: Joerg Roedel Acked-by: Lu Baolu Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200309140138.3753-2-hdegoede@redhat.com BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1564895 commit 7aefa6237cfe4a6fcf06a8656eee988b36f8fefc Author: Jason Gunthorpe Date: Mon Mar 9 16:05:15 2020 -0300 RDMA/nl: Do not permit empty devices names during RDMA_NLDEV_CMD_NEWLINK/SET Empty device names cannot be added to sysfs and crash with: kobject: (00000000f9de3792): attempted to be registered with empty name! WARNING: CPU: 1 PID: 10856 at lib/kobject.c:234 kobject_add_internal+0x7ac/0x9a0 lib/kobject.c:234 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 10856 Comm: syz-executor459 Not tainted 5.6.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x197/0x210 lib/dump_stack.c:118 panic+0x2e3/0x75c kernel/panic.c:221 __warn.cold+0x2f/0x3e kernel/panic.c:582 report_bug+0x289/0x300 lib/bug.c:195 fixup_bug arch/x86/kernel/traps.c:174 [inline] fixup_bug arch/x86/kernel/traps.c:169 [inline] do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:267 do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:286 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1027 RIP: 0010:kobject_add_internal+0x7ac/0x9a0 lib/kobject.c:234 Code: 7a ca ca f9 e9 f0 f8 ff ff 4c 89 f7 e8 cd ca ca f9 e9 95 f9 ff ff e8 13 25 8c f9 4c 89 e6 48 c7 c7 a0 08 1a 89 e8 a3 76 5c f9 <0f> 0b 41 bd ea ff ff ff e9 52 ff ff ff e8 f2 24 8c f9 0f 0b e8 eb RSP: 0018:ffffc90002006eb0 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff815eae46 RDI: fffff52000400dc8 RBP: ffffc90002006f08 R08: ffff8880972ac500 R09: ffffed1015d26659 R10: ffffed1015d26658 R11: ffff8880ae9332c7 R12: ffff888093034668 R13: 0000000000000000 R14: ffff8880a69d7600 R15: 0000000000000001 kobject_add_varg lib/kobject.c:390 [inline] kobject_add+0x150/0x1c0 lib/kobject.c:442 device_add+0x3be/0x1d00 drivers/base/core.c:2412 ib_register_device drivers/infiniband/core/device.c:1371 [inline] ib_register_device+0x93e/0xe40 drivers/infiniband/core/device.c:1343 rxe_register_device+0x52e/0x655 drivers/infiniband/sw/rxe/rxe_verbs.c:1231 rxe_add+0x122b/0x1661 drivers/infiniband/sw/rxe/rxe.c:302 rxe_net_add+0x91/0xf0 drivers/infiniband/sw/rxe/rxe_net.c:539 rxe_newlink+0x39/0x90 drivers/infiniband/sw/rxe/rxe.c:318 nldev_newlink+0x28a/0x430 drivers/infiniband/core/nldev.c:1538 rdma_nl_rcv_msg drivers/infiniband/core/netlink.c:195 [inline] rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline] rdma_nl_rcv+0x5d9/0x980 drivers/infiniband/core/netlink.c:259 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x59e/0x7e0 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 ____sys_sendmsg+0x753/0x880 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmsg+0x105/0x1d0 net/socket.c:2430 __do_sys_sendmsg net/socket.c:2439 [inline] __se_sys_sendmsg net/socket.c:2437 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2437 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Prevent empty names when checking the name provided from userspace during newlink and rename. Fixes: 3856ec4b93c9 ("RDMA/core: Add RDMA_NLDEV_CMD_NEWLINK/DELLINK support") Fixes: 05d940d3a3ec ("RDMA/nldev: Allow IB device rename through RDMA netlink") Cc: stable@kernel.org Link: https://lore.kernel.org/r/20200309191648.GA30852@ziepe.ca Reported-and-tested-by: syzbot+da615ac67d4dbea32cbc@syzkaller.appspotmail.com Signed-off-by: Jason Gunthorpe commit dec9de2ada523b344eb2428abfedf9d6cd0a0029 Author: Mario Kleiner Date: Fri Feb 28 22:36:07 2020 +0100 drm/amd/display: Add link_rate quirk for Apple 15" MBP 2017 This fixes a problem found on the MacBookPro 2017 Retina panel: The panel reports 10 bpc color depth in its EDID, and the firmware chooses link settings at boot which support enough bandwidth for 10 bpc (324000 kbit/sec aka LINK_RATE_RBR2 aka 0xc), but the DP_MAX_LINK_RATE dpcd register only reports 2.7 Gbps (multiplier value 0xa) as possible, in direct contradiction of what the firmware successfully set up. This restricts the panel to 8 bpc, not providing the full color depth of the panel on Linux <= 5.5. Additionally, commit '4a8ca46bae8a ("drm/amd/display: Default max bpc to 16 for eDP")' introduced into Linux 5.6-rc1 will unclamp panel depth to its full 10 bpc, thereby requiring a eDP bandwidth for all modes that exceeds the bandwidth available and causes all modes to fail validation -> No modes for the laptop panel -> failure to set any mode -> Panel goes dark. This patch adds a quirk specific to the MBP 2017 15" Retina panel to override reported max link rate to the correct maximum of 0xc = LINK_RATE_RBR2 to fix the darkness and reduced display precision. Please apply for Linux 5.6+ to avoid regressing Apple MBP panel support. Signed-off-by: Mario Kleiner Signed-off-by: Alex Deucher commit 063e768ebd27d3ec0d6908b7f8ea9b0a732b9949 Author: Evan Quan Date: Wed Mar 11 14:15:27 2020 +0800 drm/amdgpu: add fbdev suspend/resume on gpu reset This can fix the baco reset failure seen on Navi10. And this should be a low risk fix as the same sequence is already used for system suspend/resume. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5bbc6604a62814511c32f2e39bc9ffb2c1b92cbe Author: Tom St Denis Date: Tue Mar 10 08:40:41 2020 -0400 drm/amd/amdgpu: Fix GPR read from debugfs (v2) The offset into the array was specified in bytes but should be in terms of 32-bit words. Also prevent large reads that would also cause a buffer overread. v2: Read from correct offset from internal storage buffer. Signed-off-by: Tom St Denis Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit b55dbe596942e15b3d18d36a41af4fde022c9d48 Author: Stanley.Yang Date: Wed Mar 11 16:39:47 2020 +0800 drm/amd/display: fix typos for dcn20_funcs and dcn21_funcs struct In dcn20_funcs and dcn21_funcs struct, the member ".dsc_pg_control = NULL" should be removed due to .dsc_pg_control be assigned to dcn20_dsc_pg_control. Signed-off-by: Stanley.Yang Reviewed-by: Anthony Koo Signed-off-by: Alex Deucher commit af3d0a68698c7e5df8b72267086b23422a3954bb Author: Christophe Leroy Date: Fri Mar 6 16:49:49 2020 +0000 powerpc/kasan: Fix shadow memory protection with CONFIG_KASAN_VMALLOC With CONFIG_KASAN_VMALLOC, new page tables are created at the time shadow memory for vmalloc area is unmapped. If some parts of the page table still have entries to the zero page shadow memory, the entries are wrongly marked RW. With CONFIG_KASAN_VMALLOC, almost the entire kernel address space is managed by KASAN. To make it simple, just create KASAN page tables for the entire kernel space at kasan_init(). That doesn't use much more space, and that's anyway already done for hash platforms. Fixes: 3d4247fcc938 ("powerpc/32: Add support of KASAN_VMALLOC") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ef5248fc1f496c6b0dfdb59380f24968f25f75c5.1583513368.git.christophe.leroy@c-s.fr commit 0d81a3f29c0afb18ba2b1275dcccf21e0dd4da38 Merge: 1b51f69461e6 16b78f052d01 Author: Linus Torvalds Date: Thu Mar 12 18:05:19 2020 -0700 Merge tag 'drm-fixes-2020-03-13' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "It's a bit quieter, probably not as much as it could be. There is on large regression fix in here from Lyude for displayport bandwidth calculations, there've been reports of multi-monitor in docks not working since -rc1 and this has been tested to fix those. Otherwise it's a bunch of i915 (with some GVT fixes), a set of amdgpu watermark + bios fixes, and an exynos iommu cleanup fix. core: - DP MST bandwidth regression fix. i915: - hard lockup fix - GVT fixes - 32-bit alignment issue fix - timeline wait fixes - cacheline_retire and free amdgpu: - Update the display watermark bounding box for navi14 - Fix fetching vbios directly from rom on vega20/arcturus - Navi and renoir watermark fixes exynos: - iommu object cleanup fix" ` * tag 'drm-fixes-2020-03-13' of git://anongit.freedesktop.org/drm/drm: drm/dp_mst: Rewrite and fix bandwidth limit checks drm/dp_mst: Reprobe path resources in CSN handler drm/dp_mst: Use full_pbn instead of available_pbn for bandwidth checks drm/dp_mst: Rename drm_dp_mst_is_dp_mst_end_device() to be less redundant drm/i915: Defer semaphore priority bumping to a workqueue drm/i915/gt: Close race between cacheline_retire and free drm/i915/execlists: Enable timeslice on partial virtual engine dequeue drm/i915: be more solid in checking the alignment drm/i915/gvt: Fix dma-buf display blur issue on CFL drm/i915: Return early for await_start on same timeline drm/i915: Actually emit the await_start drm/amdgpu/powerplay: nv1x, renior copy dcn clock settings of watermark to smu during boot up drm/exynos: Fix cleanup of IOMMU related objects drm/amdgpu: correct ROM_INDEX/DATA offset for VEGA20 drm/amd/display: update soc bb for nv14 drm/i915/gvt: Fix emulated vbt size issue drm/i915/gvt: Fix unnecessary schedule timer when no vGPU exits commit 2eebb7abefb9f95b412c51add3d8216980bf6066 Author: Masahiro Yamada Date: Thu Mar 12 07:50:44 2020 +0900 kbuild: doc: fix references to other documents All the files in Documentation/kbuild/ were converted to reST. Signed-off-by: Masahiro Yamada commit 16b78f052d0129cd2998305480da6c4e3ac220a8 Merge: f31d83f047e1 047d4cd2067b Author: Dave Airlie Date: Fri Mar 13 10:38:24 2020 +1000 Merge tag 'topic/mst-bw-check-fixes-for-airlied-2020-03-12-2' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes UAPI Changes: None Cross-subsystem Changes: None Core Changes: Fixed regressions introduced by commit cd82d82cbc04 ("drm/dp_mst: Add branch bandwidth validation to MST atomic check"), which would cause us to: * Calculate the available bandwidth on an MST topology incorrectly, and as a result reject most display configurations that would try to enable more then one sink on a topology * Occasionally expose MST connectors to userspace before finishing probing their PBN capabilities, resulting in us rejecting display configurations because we assumed briefly that no bandwidth was available Driver Changes: None Signed-off-by: Dave Airlie From: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/bf16ee577567beed91c86b7d9cda3ec2e8c50a71.camel@redhat.com commit f31d83f047e190bc636505e9b9c31a34e25bfebe Merge: d94432653519 14a0d527a479 Author: Dave Airlie Date: Fri Mar 13 09:41:15 2020 +1000 Merge tag 'drm-intel-fixes-2020-03-12' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.6-rc6: - hard lockup fix - GVT fixes - 32-bit alignment issue fix - timeline wait fixes - cacheline_retire and free Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87lfo6ksvw.fsf@intel.com commit d94432653519031f89d2a30cc917e29a02f0200d Merge: e3c3b6e66da1 1d2686d417c5 Author: Dave Airlie Date: Fri Mar 13 09:22:25 2020 +1000 Merge tag 'amd-drm-fixes-5.6-2020-03-11' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.6-2020-03-11: amdgpu: - Update the display watermark bounding box for navi14 - Fix fetching vbios directly from rom on vega20/arcturus - Navi and renoir watermark fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200312020924.4161-1-alexander.deucher@amd.com commit 1b51f69461e6a3485bab5a7601e16b79d7eeac59 Merge: 807f030b44cc c0368595c163 Author: Linus Torvalds Date: Thu Mar 12 16:19:19 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: "It looks like a decent sized set of fixes, but a lot of these are one liner off-by-one and similar type changes: 1) Fix netlink header pointer to calcular bad attribute offset reported to user. From Pablo Neira Ayuso. 2) Don't double clear PHY interrupts when ->did_interrupt is set, from Heiner Kallweit. 3) Add missing validation of various (devlink, nl802154, fib, etc.) attributes, from Jakub Kicinski. 4) Missing *pos increments in various netfilter seq_next ops, from Vasily Averin. 5) Missing break in of_mdiobus_register() loop, from Dajun Jin. 6) Don't double bump tx_dropped in veth driver, from Jiang Lidong. 7) Work around FMAN erratum A050385, from Madalin Bucur. 8) Make sure ARP header is pulled early enough in bonding driver, from Eric Dumazet. 9) Do a cond_resched() during multicast processing of ipvlan and macvlan, from Mahesh Bandewar. 10) Don't attach cgroups to unrelated sockets when in interrupt context, from Shakeel Butt. 11) Fix tpacket ring state management when encountering unknown GSO types. From Willem de Bruijn. 12) Fix MDIO bus PHY resume by checking mdio_bus_phy_may_suspend() only in the suspend context. From Heiner Kallweit" * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (112 commits) net: systemport: fix index check to avoid an array out of bounds access tc-testing: add ETS scheduler to tdc build configuration net: phy: fix MDIO bus PM PHY resuming net: hns3: clear port base VLAN when unload PF net: hns3: fix RMW issue for VLAN filter switch net: hns3: fix VF VLAN table entries inconsistent issue net: hns3: fix "tc qdisc del" failed issue taprio: Fix sending packets without dequeueing them net: mvmdio: avoid error message for optional IRQ net: dsa: mv88e6xxx: Add missing mask of ATU occupancy register net: memcg: fix lockdep splat in inet_csk_accept() s390/qeth: implement smarter resizing of the RX buffer pool s390/qeth: refactor buffer pool code s390/qeth: use page pointers to manage RX buffer pool seg6: fix SRv6 L2 tunnels to use IANA-assigned protocol number net: dsa: Don't instantiate phylink for CPU/DSA ports unless needed net/packet: tpacket_rcv: do not increment ring index on drop sxgbe: Fix off by one in samsung driver strncpy size arg net: caif: Add lockdep expression to RCU traversal primitive MAINTAINERS: remove Sathya Perla as Emulex NIC maintainer ... commit 047d4cd2067b028e7bca906c5ce20f4c89b65386 Author: Lyude Paul Date: Mon Mar 9 17:01:31 2020 -0400 drm/dp_mst: Rewrite and fix bandwidth limit checks Sigh, this is mostly my fault for not giving commit cd82d82cbc04 ("drm/dp_mst: Add branch bandwidth validation to MST atomic check") enough scrutiny during review. The way we're checking bandwidth limitations here is mostly wrong: For starters, drm_dp_mst_atomic_check_bw_limit() determines the pbn_limit of a branch by simply scanning each port on the current branch device, then uses the last non-zero full_pbn value that it finds. It then counts the sum of the PBN used on each branch device for that level, and compares against the full_pbn value it found before. This is wrong because ports can and will have different PBN limitations on many hubs, especially since a number of DisplayPort hubs out there will be clever and only use the smallest link rate required for each downstream sink - potentially giving every port a different full_pbn value depending on what link rate it's trained at. This means with our current code, which max PBN value we end up with is not well defined. Additionally, we also need to remember when checking bandwidth limitations that the top-most device in any MST topology is a branch device, not a port. This means that the first level of a topology doesn't technically have a full_pbn value that needs to be checked. Instead, we should assume that so long as our VCPI allocations fit we're within the bandwidth limitations of the primary MSTB. We do however, want to check full_pbn on every port including those of the primary MSTB. However, it's important to keep in mind that this value represents the minimum link rate /between a port's sink or mstb, and the mstb itself/. A quick diagram to explain: MSTB #1 / \ / \ Port #1 Port #2 full_pbn for Port #1 → | | ← full_pbn for Port #2 Sink #1 MSTB #2 | etc... Note that in the above diagram, the combined PBN from all VCPI allocations on said hub should not exceed the full_pbn value of port #2, and the display configuration on sink #1 should not exceed the full_pbn value of port #1. However, port #1 and port #2 can otherwise consume as much bandwidth as they want so long as their VCPI allocations still fit. And finally - our current bandwidth checking code also makes the mistake of not checking whether something is an end device or not before trying to traverse down it. So, let's fix it by rewriting our bandwidth checking helpers. We split the function into one part for handling branches which simply adds up the total PBN on each branch and returns it, and one for checking each port to ensure we're not going over its PBN limit. Phew. This should fix regressions seen, where we erroneously reject display configurations due to thinking they're going over our bandwidth limits when they're not. Changes since v1: * Took an even closer look at how PBN limitations are supposed to be handled, and did some experimenting with Sean Paul. Ended up rewriting these helpers again, but this time they should actually be correct! Changes since v2: * Small indenting fix * Fix pbn_used check in drm_dp_mst_atomic_check_port_bw_limit() Signed-off-by: Lyude Paul Fixes: cd82d82cbc04 ("drm/dp_mst: Add branch bandwidth validation to MST atomic check") Cc: Sean Paul Acked-by: Alex Deucher Reviewed-by: Mikita Lipski Tested-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200309210131.1497545-1-lyude@redhat.com commit 87212b51bff02a6722d5e84f7842a6b0717eb7d4 Author: Lyude Paul Date: Fri Mar 6 18:46:21 2020 -0500 drm/dp_mst: Reprobe path resources in CSN handler We used to punt off reprobing path resources to the link address probe work, but now that we handle CSNs asynchronously from the driver's HPD handling we can do whatever the heck we want from the CSN! So, reprobe the path resources from drm_dp_mst_handle_conn_stat(). Also, get rid of the path resource reprobing code in drm_dp_check_and_send_link_address() since it's needlessly complicated when we already reprobe path resources from drm_dp_handle_link_address_port(). And finally, teach drm_dp_send_enum_path_resources() to return 1 on PBN changes so we know if we need to send another hotplug or not. This fixes issues where we've indicated to userspace that a port has just been connected, before we actually probed it's available PBN - something that results in unexpected atomic check failures. Signed-off-by: Lyude Paul Fixes: cd82d82cbc04 ("drm/dp_mst: Add branch bandwidth validation to MST atomic check") Cc: Mikita Lipski Cc: Hans de Goede Cc: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200306234623.547525-4-lyude@redhat.com Reviewed-by: Alex Deucher Tested-by: Hans de Goede commit fcf4638075964268bf8a0e212407096c6aab6fd3 Author: Lyude Paul Date: Fri Mar 6 18:46:20 2020 -0500 drm/dp_mst: Use full_pbn instead of available_pbn for bandwidth checks DisplayPort specifications are fun. For a while, it's been really unclear to us what available_pbn actually does. There's a somewhat vague explanation in the DisplayPort spec (starting from 1.2) that partially explains it: The minimum payload bandwidth number supported by the path. Each node updates this number with its available payload bandwidth number if its payload bandwidth number is less than that in the Message Transaction reply. So, it sounds like available_pbn represents the smallest link rate in use between the source and the branch device. Cool, so full_pbn is just the highest possible PBN that the branch device supports right? Well, we assumed that for quite a while until Sean Paul noticed that on some MST hubs, available_pbn will actually get set to 0 whenever there's any active payloads on the respective branch device. This caused quite a bit of confusion since clearing the payload ID table would end up fixing the available_pbn value. So, we just went with that until commit cd82d82cbc04 ("drm/dp_mst: Add branch bandwidth validation to MST atomic check") started breaking people's setups due to us getting erroneous available_pbn values. So, we did some more digging and got confused until we finally looked at the definition for full_pbn: The bandwidth of the link at the trained link rate and lane count between the DP Source device and the DP Sink device with no time slots allocated to VC Payloads, represented as a Payload Bandwidth Number. As with the Available_Payload_Bandwidth_Number, this number is determined by the link with the lowest lane count and link rate. That's what we get for not reading specs closely enough, hehe. So, since full_pbn is definitely what we want for doing bandwidth restriction checks - let's start using that instead and ignore available_pbn entirely. Signed-off-by: Lyude Paul Fixes: cd82d82cbc04 ("drm/dp_mst: Add branch bandwidth validation to MST atomic check") Cc: Mikita Lipski Cc: Hans de Goede Cc: Sean Paul Reviewed-by: Mikita Lipski Link: https://patchwork.freedesktop.org/patch/msgid/20200306234623.547525-3-lyude@redhat.com Reviewed-by: Alex Deucher Tested-by: Hans de Goede commit b2feb1d6d34844c5c56eb34008c3e516664c5410 Author: Lyude Paul Date: Fri Mar 6 18:46:19 2020 -0500 drm/dp_mst: Rename drm_dp_mst_is_dp_mst_end_device() to be less redundant It's already prefixed by dp_mst, so we don't really need to repeat ourselves here. One of the changes I should have picked up originally when reviewing MST DSC support. There should be no functional changes here Cc: Mikita Lipski Cc: Sean Paul Cc: Hans de Goede Signed-off-by: Lyude Paul Reviewed-by: Alex Deucher Tested-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20200306234623.547525-2-lyude@redhat.com commit 807f030b44ccbb26a346df6f6438628315d9ad98 Merge: 3cc6e2c599cd d9a9f4849fe0 Author: Linus Torvalds Date: Thu Mar 12 15:51:26 2020 -0700 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "A couple of fixes for old crap in ->atomic_open() instances" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: cifs_atomic_open(): fix double-put on late allocation failure gfs2_atomic_open(): fix O_EXCL|O_CREAT handling on cold dcache commit c0368595c1639947839c0db8294ee96aca0b3b86 Author: Colin Ian King Date: Thu Mar 12 15:04:30 2020 +0000 net: systemport: fix index check to avoid an array out of bounds access Currently the bounds check on index is off by one and can lead to an out of bounds access on array priv->filters_loc when index is RXCHK_BRCM_TAG_MAX. Fixes: bb9051a2b230 ("net: systemport: Add support for WAKE_FILTER") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 9d0e0cd9a529ba68b2acda68b5075d4a5ea7118a Author: Davide Caratti Date: Thu Mar 12 17:51:45 2020 +0100 tc-testing: add ETS scheduler to tdc build configuration add CONFIG_NET_SCH_ETS to 'config', otherwise test suites using this file to perform a full tdc run will encounter the following warning: ok 645 e90e - Add ETS qdisc using bands # skipped - "-----> teardown stage" did not complete successfully Fixes: 82c664b69c8b ("selftests: qdiscs: Add test coverage for ETS Qdisc") Reported-by: Jamal Hadi Salim Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit 611d779af7cad2b87487ff58e4931a90c20b113c Author: Heiner Kallweit Date: Thu Mar 12 22:25:20 2020 +0100 net: phy: fix MDIO bus PM PHY resuming So far we have the unfortunate situation that mdio_bus_phy_may_suspend() is called in suspend AND resume path, assuming that function result is the same. After the original change this is no longer the case, resulting in broken resume as reported by Geert. To fix this call mdio_bus_phy_may_suspend() in the suspend path only, and let the phy_device store the info whether it was suspended by MDIO bus PM. Fixes: 503ba7c69610 ("net: phy: Avoid multiple suspends") Reported-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit d9a9f4849fe0c9d560851ab22a85a666cddfdd24 Author: Al Viro Date: Thu Mar 12 18:25:20 2020 -0400 cifs_atomic_open(): fix double-put on late allocation failure several iterations of ->atomic_open() calling conventions ago, we used to need fput() if ->atomic_open() failed at some point after successful finish_open(). Now (since 2016) it's not needed - struct file carries enough state to make fput() work regardless of the point in struct file lifecycle and discarding it on failure exits in open() got unified. Unfortunately, I'd missed the fact that we had an instance of ->atomic_open() (cifs one) that used to need that fput(), as well as the stale comment in finish_open() demanding such late failure handling. Trivially fixed... Fixes: fe9ec8291fca "do_last(): take fput() on error after opening to out:" Cc: stable@kernel.org # v4.7+ Signed-off-by: Al Viro commit 21039132650281de06a169cbe8a0f7e5c578fd8b Author: Al Viro Date: Tue Mar 10 09:31:41 2020 -0400 gfs2_atomic_open(): fix O_EXCL|O_CREAT handling on cold dcache with the way fs/namei.c:do_last() had been done, ->atomic_open() instances needed to recognize the case when existing file got found with O_EXCL|O_CREAT, either by falling back to finish_no_open() or failing themselves. gfs2 one didn't. Fixes: 6d4ade986f9c (GFS2: Add atomic_open support) Cc: stable@kernel.org # v3.11 Signed-off-by: Al Viro commit 6687c201fdc3139315c2ea7ef96c157672805cdc Author: Nick Hudson Date: Thu Mar 12 09:03:45 2020 +0000 ARM: bcm2835-rpi-zero-w: Add missing pinctrl name Define the sdhci pinctrl state as "default" so it gets applied correctly and to match all other RPis. Fixes: 2c7c040c73e9 ("ARM: dts: bcm2835: Add Raspberry Pi Zero W") Signed-off-by: Nick Hudson Signed-off-by: Florian Fainelli commit e4792ffe971dde60582028ccba08b5a2ad9d3359 Merge: b09fe70ef520 59359fc8a2f7 Author: David S. Miller Date: Thu Mar 12 11:38:27 2020 -0700 Merge branch 'hns3-fixes' Huazhong Tan says: ==================== net: hns3: fixes for -net This series includes several bugfixes for the HNS3 ethernet driver. [patch 1] fixes an "tc qdisc del" failure. [patch 2] fixes SW & HW VLAN table not consistent issue. [patch 3] fixes a RMW issue related to VLAN filter switch. [patch 4] clears port based VLAN when uploading PF. ==================== Signed-off-by: David S. Miller commit 59359fc8a2f7af062777692e6a7aae73483729ec Author: Jian Shen Date: Thu Mar 12 15:11:06 2020 +0800 net: hns3: clear port base VLAN when unload PF Currently, PF missed to clear the port base VLAN for VF when unload. In this case, the VLAN id will remain in the VLAN table. This patch fixes it. Fixes: 92f11ea177cd ("net: hns3: fix set port based VLAN issue for VF") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 903b85d3adce99a5301d5959c4d3c9d14a7974d4 Author: Jian Shen Date: Thu Mar 12 15:11:05 2020 +0800 net: hns3: fix RMW issue for VLAN filter switch According to the user manual, the ingress and egress VLAN filter are configured at the same time. Currently, hclge_init_vlan_config() and hclge_set_vlan_spoofchk() will both change the VLAN filter switch. So it's necessary to read the old configuration before modifying it. Fixes: 22044f95faa0 ("net: hns3: add support for spoof check setting") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 23b4201dead410c4a5108a8e723240419ab75257 Author: Jian Shen Date: Thu Mar 12 15:11:04 2020 +0800 net: hns3: fix VF VLAN table entries inconsistent issue Currently, if VF is loaded on the host side, the host doesn't clear the VF's VLAN table entries when VF removing. In this case, when doing reset and disabling sriov at the same time the VLAN device over VF will be removed, but the VLAN table entries in hardware are remained. This patch fixes it by asking PF to clear the VLAN table entries for VF when VF is removing. It also clears the VLAN table full bit after VF VLAN table entries being cleared. Fixes: c6075b193462 ("net: hns3: Record VF vlan tables") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 5eb01ddfcfb25e6ebc404a41deae946bde776731 Author: Yonglong Liu Date: Thu Mar 12 15:11:03 2020 +0800 net: hns3: fix "tc qdisc del" failed issue The HNS3 driver supports to configure TC numbers and TC to priority map via "tc" tool. But when delete the rule, will fail, because the HNS3 driver needs at least one TC, but the "tc" tool sets TC number to zero when delete. This patch makes sure that the TC number is at least one. Fixes: 30d240dfa2e8 ("net: hns3: Add mqprio hardware offload support in hns3 driver") Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit b09fe70ef520e011ba4a64f4b93f948a8f14717b Author: Vinicius Costa Gomes Date: Mon Mar 9 10:39:53 2020 -0700 taprio: Fix sending packets without dequeueing them There was a bug that was causing packets to be sent to the driver without first calling dequeue() on the "child" qdisc. And the KASAN report below shows that sending a packet without calling dequeue() leads to bad results. The problem is that when checking the last qdisc "child" we do not set the returned skb to NULL, which can cause it to be sent to the driver, and so after the skb is sent, it may be freed, and in some situations a reference to it may still be in the child qdisc, because it was never dequeued. The crash log looks like this: [ 19.937538] ================================================================== [ 19.938300] BUG: KASAN: use-after-free in taprio_dequeue_soft+0x620/0x780 [ 19.938968] Read of size 4 at addr ffff8881128628cc by task swapper/1/0 [ 19.939612] [ 19.939772] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.6.0-rc3+ #97 [ 19.940397] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qe4 [ 19.941523] Call Trace: [ 19.941774] [ 19.941985] dump_stack+0x97/0xe0 [ 19.942323] print_address_description.constprop.0+0x3b/0x60 [ 19.942884] ? taprio_dequeue_soft+0x620/0x780 [ 19.943325] ? taprio_dequeue_soft+0x620/0x780 [ 19.943767] __kasan_report.cold+0x1a/0x32 [ 19.944173] ? taprio_dequeue_soft+0x620/0x780 [ 19.944612] kasan_report+0xe/0x20 [ 19.944954] taprio_dequeue_soft+0x620/0x780 [ 19.945380] __qdisc_run+0x164/0x18d0 [ 19.945749] net_tx_action+0x2c4/0x730 [ 19.946124] __do_softirq+0x268/0x7bc [ 19.946491] irq_exit+0x17d/0x1b0 [ 19.946824] smp_apic_timer_interrupt+0xeb/0x380 [ 19.947280] apic_timer_interrupt+0xf/0x20 [ 19.947687] [ 19.947912] RIP: 0010:default_idle+0x2d/0x2d0 [ 19.948345] Code: 00 00 41 56 41 55 65 44 8b 2d 3f 8d 7c 7c 41 54 55 53 0f 1f 44 00 00 e8 b1 b2 c5 fd e9 07 00 3 [ 19.950166] RSP: 0018:ffff88811a3efda0 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 [ 19.950909] RAX: 0000000080000000 RBX: ffff88811a3a9600 RCX: ffffffff8385327e [ 19.951608] RDX: 1ffff110234752c0 RSI: 0000000000000000 RDI: ffffffff8385262f [ 19.952309] RBP: ffffed10234752c0 R08: 0000000000000001 R09: ffffed10234752c1 [ 19.953009] R10: ffffed10234752c0 R11: ffff88811a3a9607 R12: 0000000000000001 [ 19.953709] R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000 [ 19.954408] ? default_idle_call+0x2e/0x70 [ 19.954816] ? default_idle+0x1f/0x2d0 [ 19.955192] default_idle_call+0x5e/0x70 [ 19.955584] do_idle+0x3d4/0x500 [ 19.955909] ? arch_cpu_idle_exit+0x40/0x40 [ 19.956325] ? _raw_spin_unlock_irqrestore+0x23/0x30 [ 19.956829] ? trace_hardirqs_on+0x30/0x160 [ 19.957242] cpu_startup_entry+0x19/0x20 [ 19.957633] start_secondary+0x2a6/0x380 [ 19.958026] ? set_cpu_sibling_map+0x18b0/0x18b0 [ 19.958486] secondary_startup_64+0xa4/0xb0 [ 19.958921] [ 19.959078] Allocated by task 33: [ 19.959412] save_stack+0x1b/0x80 [ 19.959747] __kasan_kmalloc.constprop.0+0xc2/0xd0 [ 19.960222] kmem_cache_alloc+0xe4/0x230 [ 19.960617] __alloc_skb+0x91/0x510 [ 19.960967] ndisc_alloc_skb+0x133/0x330 [ 19.961358] ndisc_send_ns+0x134/0x810 [ 19.961735] addrconf_dad_work+0xad5/0xf80 [ 19.962144] process_one_work+0x78e/0x13a0 [ 19.962551] worker_thread+0x8f/0xfa0 [ 19.962919] kthread+0x2ba/0x3b0 [ 19.963242] ret_from_fork+0x3a/0x50 [ 19.963596] [ 19.963753] Freed by task 33: [ 19.964055] save_stack+0x1b/0x80 [ 19.964386] __kasan_slab_free+0x12f/0x180 [ 19.964830] kmem_cache_free+0x80/0x290 [ 19.965231] ip6_mc_input+0x38a/0x4d0 [ 19.965617] ipv6_rcv+0x1a4/0x1d0 [ 19.965948] __netif_receive_skb_one_core+0xf2/0x180 [ 19.966437] netif_receive_skb+0x8c/0x3c0 [ 19.966846] br_handle_frame_finish+0x779/0x1310 [ 19.967302] br_handle_frame+0x42a/0x830 [ 19.967694] __netif_receive_skb_core+0xf0e/0x2a90 [ 19.968167] __netif_receive_skb_one_core+0x96/0x180 [ 19.968658] process_backlog+0x198/0x650 [ 19.969047] net_rx_action+0x2fa/0xaa0 [ 19.969420] __do_softirq+0x268/0x7bc [ 19.969785] [ 19.969940] The buggy address belongs to the object at ffff888112862840 [ 19.969940] which belongs to the cache skbuff_head_cache of size 224 [ 19.971202] The buggy address is located 140 bytes inside of [ 19.971202] 224-byte region [ffff888112862840, ffff888112862920) [ 19.972344] The buggy address belongs to the page: [ 19.972820] page:ffffea00044a1800 refcount:1 mapcount:0 mapping:ffff88811a2bd1c0 index:0xffff8881128625c0 compo0 [ 19.973930] flags: 0x8000000000010200(slab|head) [ 19.974388] raw: 8000000000010200 ffff88811a2ed650 ffff88811a2ed650 ffff88811a2bd1c0 [ 19.975151] raw: ffff8881128625c0 0000000000190013 00000001ffffffff 0000000000000000 [ 19.975915] page dumped because: kasan: bad access detected [ 19.976461] page_owner tracks the page as allocated [ 19.976946] page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NO) [ 19.978332] prep_new_page+0x24b/0x330 [ 19.978707] get_page_from_freelist+0x2057/0x2c90 [ 19.979170] __alloc_pages_nodemask+0x218/0x590 [ 19.979619] new_slab+0x9d/0x300 [ 19.979948] ___slab_alloc.constprop.0+0x2f9/0x6f0 [ 19.980421] __slab_alloc.constprop.0+0x30/0x60 [ 19.980870] kmem_cache_alloc+0x201/0x230 [ 19.981269] __alloc_skb+0x91/0x510 [ 19.981620] alloc_skb_with_frags+0x78/0x4a0 [ 19.982043] sock_alloc_send_pskb+0x5eb/0x750 [ 19.982476] unix_stream_sendmsg+0x399/0x7f0 [ 19.982904] sock_sendmsg+0xe2/0x110 [ 19.983262] ____sys_sendmsg+0x4de/0x6d0 [ 19.983660] ___sys_sendmsg+0xe4/0x160 [ 19.984032] __sys_sendmsg+0xab/0x130 [ 19.984396] do_syscall_64+0xe7/0xae0 [ 19.984761] page last free stack trace: [ 19.985142] __free_pages_ok+0x432/0xbc0 [ 19.985533] qlist_free_all+0x56/0xc0 [ 19.985907] quarantine_reduce+0x149/0x170 [ 19.986315] __kasan_kmalloc.constprop.0+0x9e/0xd0 [ 19.986791] kmem_cache_alloc+0xe4/0x230 [ 19.987182] prepare_creds+0x24/0x440 [ 19.987548] do_faccessat+0x80/0x590 [ 19.987906] do_syscall_64+0xe7/0xae0 [ 19.988276] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 19.988775] [ 19.988930] Memory state around the buggy address: [ 19.989402] ffff888112862780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.990111] ffff888112862800: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb [ 19.990822] >ffff888112862880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.991529] ^ [ 19.992081] ffff888112862900: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 19.992796] ffff888112862980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc Fixes: 5a781ccbd19e ("tc: Add support for configuring the taprio scheduler") Reported-by: Michael Schmidt Signed-off-by: Vinicius Costa Gomes Acked-by: Andre Guedes Signed-off-by: David S. Miller commit 3cc6e2c599cdca573a8f347aea5da4c855ff5a78 Merge: 2644bc8569ba 443d372d6a96 Author: Linus Torvalds Date: Thu Mar 12 09:59:36 2020 -0700 Merge tag 'for-linus-5.6-2' of git://github.com/cminyard/linux-ipmi Pull IPMI fix from Corey Minyard: "Fix a message spew on some system The call to platform_get_irq() was changed to print a log if the interrupt was not available, and that was causing bogus messages to spew out for the IPMI driver. People have requested that this get in to 5.6 so I'm sending it along" * tag 'for-linus-5.6-2' of git://github.com/cminyard/linux-ipmi: ipmi_si: Avoid spurious errors for optional IRQs commit e2e57291097b289f84e05fa58ab5e6c6f30cc6e2 Author: Johannes Berg Date: Thu Mar 12 09:04:08 2020 +0100 wlcore: remove stray plus sign The commit mentioned below added a stray plus sign, likely due to some conflict resolution (i.e. as a leftover from a unified diff), which was harmless since it was just used as an integer constant modifier. Remove it anyway, now that I stumbled across it. Fixes: cf33a7728bf2 ("wlcore: mesh: Add support for RX Broadcast Key") Signed-off-by: Johannes Berg Signed-off-by: Kalle Valo commit 2644bc8569baa735ae9c0a92432d6a30c20c1694 Merge: e6e6ec48dd0f 1579f1bc3b75 Author: Linus Torvalds Date: Thu Mar 12 09:25:55 2020 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "Fix a build problem with x86/curve25519" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: x86/curve25519 - support assemblers with no adx support commit 5461e0530c222129dfc941058be114b5cbc00837 Author: Takashi Iwai Date: Thu Mar 12 16:57:30 2020 +0100 ALSA: pcm: oss: Remove WARNING from snd_pcm_plug_alloc() checks The return value checks in snd_pcm_plug_alloc() are covered with snd_BUG_ON() macro that may trigger a kernel WARNING depending on the kconfig. But since the error condition can be triggered by a weird user space parameter passed to OSS layer, we shouldn't give the kernel stack trace just for that. As it's a normal error condition, let's remove snd_BUG_ON() macro usage there. Reported-by: syzbot+2a59ee7a9831b264f45e@syzkaller.appspotmail.com Cc: Link: https://lore.kernel.org/r/20200312155730.7520-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit f17f06a0c7794d3a7c2425663738823354447472 Author: Srinivas Kandagatla Date: Thu Mar 12 15:25:10 2020 +0000 slimbus: ngd: add v2.1.0 compatible This patch adds compatible for SlimBus Controller on SDM845. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200312152510.12224-1-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 531d3040bc5cf37dea01b118608347cca9325f9d Author: Amir Goldstein Date: Mon Mar 2 15:03:35 2020 +0200 ovl: fix lock in ovl_llseek() ovl_inode_lock() is interruptible. When inode_lock() in ovl_llseek() was replaced with ovl_inode_lock(), we did not add a check for error. Fix this by making ovl_inode_lock() uninterruptible and change the existing call sites to use an _interruptible variant. Reported-by: syzbot+66a9752fa927f745385e@syzkaller.appspotmail.com Fixes: b1f9d3858f72 ("ovl: use ovl_inode_lock in ovl_llseek()") Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit b53df2e7442c73a932fb74228147fb946e531585 Author: Shin'ichiro Kawasaki Date: Fri Feb 21 10:37:08 2020 +0900 block: Fix partition support for host aware zoned block devices Commit b72053072c0b ("block: allow partitions on host aware zone devices") introduced the helper function disk_has_partitions() to check if a given disk has valid partitions. However, since this function result directly depends on the disk partition table length rather than the actual existence of valid partitions in the table, it returns true even after all partitions are removed from the disk. For host aware zoned block devices, this results in zone management support to be kept disabled even after removing all partitions. Fix this by changing disk_has_partitions() to walk through the partition table entries and return true if and only if a valid non-zero size partition is found. Fixes: b72053072c0b ("block: allow partitions on host aware zone devices") Cc: stable@vger.kernel.org # 5.5 Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Shin'ichiro Kawasaki Signed-off-by: Jens Axboe commit c80b18cbb04b7b101af9bd14550f13d9866c646a Author: Larry Finger Date: Wed Feb 19 14:00:41 2020 -0600 rtlwifi: rtl8188ee: Fix regression due to commit d1d1a96bdb44 For some unexplained reason, commit d1d1a96bdb44 ("rtlwifi: rtl8188ee: Remove local configuration variable") broke at least one system. As the only net effect of the change was to remove 2 bytes from the start of struct phy_status_rpt, this patch adds 2 bytes of padding at the beginning of the struct. Fixes: d1d1a96bdb44 ("rtlwifi: rtl8188ee: Remove local configuration variable") Cc: Stable # V5.4+ Reported-by: Ashish Tested-by: Ashish Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit cc3200eac4c5eb11c3f34848a014d1f286316310 Author: Ming Lei Date: Thu Mar 12 17:15:48 2020 +0800 blk-mq: insert flush request to the front of dispatch queue commit 01e99aeca397 ("blk-mq: insert passthrough request into hctx->dispatch directly") may change to add flush request to the tail of dispatch by applying the 'add_head' parameter of blk_mq_sched_insert_request. Turns out this way causes performance regression on NCQ controller because flush is non-NCQ command, which can't be queued when there is any in-flight NCQ command. When adding flush rq to the front of hctx->dispatch, it is easier to introduce extra time to flush rq's latency compared with adding to the tail of dispatch queue because of S_SCHED_RESTART, then chance of flush merge is increased, and less flush requests may be issued to controller. So always insert flush request to the front of dispatch queue just like before applying commit 01e99aeca397 ("blk-mq: insert passthrough request into hctx->dispatch directly"). Cc: Damien Le Moal Cc: Shinichiro Kawasaki Reported-by: Shinichiro Kawasaki Fixes: 01e99aeca397 ("blk-mq: insert passthrough request into hctx->dispatch directly") Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 5e6bdd37c5526ef01326df5dabb93011ee89237e Author: Stefan Haberland Date: Thu Mar 12 14:17:15 2020 +0100 s390/dasd: fix data corruption for thin provisioned devices Devices are formatted in multiple of tracks. For an Extent Space Efficient (ESE) volume we get errors when accessing unformatted tracks. In this case the driver either formats the track on the flight for write requests or returns zero data for read requests. In case a request spans multiple tracks, the indication of an unformatted track presented for the first track is incorrectly applied to all tracks covered by the request. As a result, tracks containing data will be handled as empty, resulting in zero data being returned on read, or overwriting existing data with zero on write. Fix by determining the track that gets the NRF error. For write requests only format the track that is surely not formatted. For Read requests all tracks before have returned valid data and should not be touched. All tracks after the unformatted track might be formatted or not. Those are returned to the blocklayer to build a new request. When using alias devices there is a chance that multiple write requests trigger a format of the same track which might lead to data loss. Ensure that a track is formatted only once by maintaining a list of currently processed tracks. Fixes: 5e2b17e712cf ("s390/dasd: Add dynamic formatting support for ESE volumes") Cc: stable@vger.kernel.org # 5.3+ Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Reviewed-by: Peter Oberparleiter Signed-off-by: Jens Axboe commit f967140dfb7442e2db0868b03b961f9c59418a1b Author: Kim Phillips Date: Wed Mar 11 14:13:21 2020 -0500 perf/amd/uncore: Replace manual sampling check with CAP_NO_INTERRUPT flag Enable the sampling check in kernel/events/core.c::perf_event_open(), which returns the more appropriate -EOPNOTSUPP. BEFORE: $ sudo perf record -a -e instructions,l3_request_g1.caching_l3_cache_accesses true Error: The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (l3_request_g1.caching_l3_cache_accesses). /bin/dmesg | grep -i perf may provide additional information. With nothing relevant in dmesg. AFTER: $ sudo perf record -a -e instructions,l3_request_g1.caching_l3_cache_accesses true Error: l3_request_g1.caching_l3_cache_accesses: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat' Fixes: c43ca5091a37 ("perf/x86/amd: Add support for AMD NB and L2I "uncore" counters") Signed-off-by: Kim Phillips Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20200311191323.13124-1-kim.phillips@amd.com commit 18d200460cd73636d4f20674085c39e32b4e0097 Author: Ulf Hansson Date: Wed Mar 11 10:20:36 2020 +0100 mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for eMMC sleep command The busy timeout for the CMD5 to put the eMMC into sleep state, is specific to the card. Potentially the timeout may exceed the host->max_busy_timeout. If that becomes the case, mmc_sleep() converts from using an R1B response to an R1 response, as to prevent the host from doing HW busy detection. However, it has turned out that some hosts requires an R1B response no matter what, so let's respect that via checking MMC_CAP_NEED_RSP_BUSY. Note that, if the R1B gets enforced, the host becomes fully responsible of managing the needed busy timeout, in one way or the other. Suggested-by: Sowjanya Komatineni Cc: Link: https://lore.kernel.org/r/20200311092036.16084-1-ulf.hansson@linaro.org Signed-off-by: Ulf Hansson commit cecc113c1af0dd41ccf265c1fdb84dbd05e63423 Author: Scott Chen Date: Wed Mar 11 14:14:23 2020 +0800 USB: serial: pl2303: add device-id for HP LD381 Add a device id for HP LD381 Display LD381: 03f0:0f7f Signed-off-by: Scott Chen Cc: stable Signed-off-by: Johan Hovold commit 8e852a7953be2a6ee371449f7257fe15ace6a1fc Author: Daniele Palmas Date: Wed Mar 4 11:43:10 2020 +0100 USB: serial: option: add ME910G1 ECM composition 0x110b Add ME910G1 ECM composition 0x110b: tty, tty, tty, ecm Signed-off-by: Daniele Palmas Link: https://lore.kernel.org/r/20200304104310.2938-1-dnlplm@gmail.com Cc: stable Signed-off-by: Johan Hovold commit b433e340e7565110b0ce9ca4b3e26f4b97a1decf Author: Ran Wang Date: Fri Mar 6 17:23:28 2020 +0800 usb: host: xhci-plat: add a shutdown When loading new kernel via kexec, we need to shutdown host controller to avoid any un-expected memory accessing during new kernel boot. Signed-off-by: Ran Wang Cc: stable Tested-by: Stephen Boyd Reviewed-by: Peter Chen Link: https://lore.kernel.org/r/20200306092328.41253-1-ran.wang_1@nxp.com Signed-off-by: Greg Kroah-Hartman commit 081da1325d351ea8804cf74e65263ea120834f33 Author: Heikki Krogerus Date: Wed Mar 11 16:00:06 2020 +0300 usb: typec: ucsi: displayport: Fix a potential race during registration Locking the connector in ucsi_register_displayport() to make sure that nothing can access the displayport alternate mode before the function has finished and the alternate mode is actually ready. Fixes: af8622f6a585 ("usb: typec: ucsi: Support for DisplayPort alt mode") Cc: stable@vger.kernel.org Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200311130006.41288-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d16e7b62c5adcd13832c6b0ba364c3468d21b856 Author: Heikki Krogerus Date: Wed Mar 11 16:00:05 2020 +0300 usb: typec: ucsi: displayport: Fix NULL pointer dereference If the registration of the DisplayPort was not successful, or if the port does not support DisplayPort alt mode in the first place, the function ucsi_displayport_remove_partner() will fail with NULL pointer dereference when it attempts to access the driver data. Adding a check to the function to make sure there really is driver data for the device before modifying it. Fixes: af8622f6a585 ("usb: typec: ucsi: Support for DisplayPort alt mode") Reported-by: Andrea Gagliardi La Gala BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206365 Cc: stable@vger.kernel.org Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200311130006.41288-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b63e48fb50e1ca71db301ca9082befa6f16c55c4 Author: Kai-Heng Feng Date: Wed Feb 5 19:26:33 2020 +0800 USB: Disable LPM on WD19's Realtek Hub Realtek Hub (0bda:0x0487) used in Dell Dock WD19 sometimes drops off the bus when bringing underlying ports from U3 to U0. Disabling LPM on the hub during setting link state is not enough, so let's disable LPM completely for this hub. Acked-by: Alan Stern Signed-off-by: Kai-Heng Feng Cc: stable Link: https://lore.kernel.org/r/20200205112633.25995-3-kai.heng.feng@canonical.com Signed-off-by: Greg Kroah-Hartman commit 58d6fee50e67bb1c69977f1a534ccb17bf58b0f1 Author: Michael Auchter Date: Tue Mar 10 15:58:40 2020 -0500 misc: eeprom: at24: fix regulator underflow The at24 driver attempts to read a byte from the device to validate that it's actually present, and if not, disables the vcc regulator and returns -ENODEV. However, between the read and the error handling path, pm_runtime_idle() is called and invokes the driver's suspend callback, which also disables the vcc regulator. This leads to an underflow of the regulator enable count if the EEPROM is not present. Move the pm_runtime_suspend() call to be after the error handling path to resolve this. Fixes: cd5676db0574 ("misc: eeprom: at24: support pm_runtime control") Signed-off-by: Michael Auchter Signed-off-by: Bartosz Golaszewski commit e1f550dc44a4d535da4e25ada1b0eaf8f3417929 Author: Chris Packham Date: Thu Mar 12 09:05:46 2020 +1300 net: mvmdio: avoid error message for optional IRQ Per the dt-binding the interrupt is optional so use platform_get_irq_optional() instead of platform_get_irq(). Since commit 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") platform_get_irq() produces an error message orion-mdio f1072004.mdio: IRQ index 0 not found which is perfectly normal if one hasn't specified the optional property in the device tree. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 012fc74517b25177dfede2ed45cd108258564e4a Author: Andrew Lunn Date: Wed Mar 11 21:02:31 2020 +0100 net: dsa: mv88e6xxx: Add missing mask of ATU occupancy register Only the bottom 12 bits contain the ATU bin occupancy statistics. The upper bits need masking off. Fixes: e0c69ca7dfbb ("net: dsa: mv88e6xxx: Add ATU occupancy via devlink resources") Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 06669ea346e476a5339033d77ef175566a40efbb Author: Eric Dumazet Date: Wed Mar 11 11:44:26 2020 -0700 net: memcg: fix lockdep splat in inet_csk_accept() Locking newsk while still holding the listener lock triggered a lockdep splat [1] We can simply move the memcg code after we release the listener lock, as this can also help if multiple threads are sharing a common listener. Also fix a typo while reading socket sk_rmem_alloc. [1] WARNING: possible recursive locking detected 5.6.0-rc3-syzkaller #0 Not tainted -------------------------------------------- syz-executor598/9524 is trying to acquire lock: ffff88808b5b8b90 (sk_lock-AF_INET6){+.+.}, at: lock_sock include/net/sock.h:1541 [inline] ffff88808b5b8b90 (sk_lock-AF_INET6){+.+.}, at: inet_csk_accept+0x69f/0xd30 net/ipv4/inet_connection_sock.c:492 but task is already holding lock: ffff88808b5b9590 (sk_lock-AF_INET6){+.+.}, at: lock_sock include/net/sock.h:1541 [inline] ffff88808b5b9590 (sk_lock-AF_INET6){+.+.}, at: inet_csk_accept+0x8d/0xd30 net/ipv4/inet_connection_sock.c:445 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(sk_lock-AF_INET6); lock(sk_lock-AF_INET6); *** DEADLOCK *** May be due to missing lock nesting notation 1 lock held by syz-executor598/9524: #0: ffff88808b5b9590 (sk_lock-AF_INET6){+.+.}, at: lock_sock include/net/sock.h:1541 [inline] #0: ffff88808b5b9590 (sk_lock-AF_INET6){+.+.}, at: inet_csk_accept+0x8d/0xd30 net/ipv4/inet_connection_sock.c:445 stack backtrace: CPU: 0 PID: 9524 Comm: syz-executor598 Not tainted 5.6.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:2370 [inline] check_deadlock kernel/locking/lockdep.c:2411 [inline] validate_chain kernel/locking/lockdep.c:2954 [inline] __lock_acquire.cold+0x114/0x288 kernel/locking/lockdep.c:3954 lock_acquire+0x197/0x420 kernel/locking/lockdep.c:4484 lock_sock_nested+0xc5/0x110 net/core/sock.c:2947 lock_sock include/net/sock.h:1541 [inline] inet_csk_accept+0x69f/0xd30 net/ipv4/inet_connection_sock.c:492 inet_accept+0xe9/0x7c0 net/ipv4/af_inet.c:734 __sys_accept4_file+0x3ac/0x5b0 net/socket.c:1758 __sys_accept4+0x53/0x90 net/socket.c:1809 __do_sys_accept4 net/socket.c:1821 [inline] __se_sys_accept4 net/socket.c:1818 [inline] __x64_sys_accept4+0x93/0xf0 net/socket.c:1818 do_syscall_64+0xf6/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4445c9 Code: e8 0c 0d 03 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 eb 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffc35b37608 EFLAGS: 00000246 ORIG_RAX: 0000000000000120 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004445c9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000306777 R09: 0000000000306777 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00000000004053d0 R14: 0000000000000000 R15: 0000000000000000 Fixes: d752a4986532 ("net: memcg: late association of sock to memcg") Signed-off-by: Eric Dumazet Cc: Shakeel Butt Reported-by: syzbot Signed-off-by: David S. Miller commit 5e72b23774c2f7182a95fb81fdd688d5d837d0b7 Merge: 267762538705 5d4f78564c9c Author: David S. Miller Date: Wed Mar 11 23:52:32 2020 -0700 Merge branch 's390-qeth-fixes' Julian Wiedmann says: ==================== s390/qeth: fixes 2020-03-11 please apply the following patch series for qeth to netdev's net tree. Just one fix to get the RX buffer pool resizing right, with two preparatory cleanups. This is on the larger side given where we are in the -rc cycle, but a big chunk of the delta is just refactoring to make the fix look nice. I intentionally split these off from yesterday's series. No objections if you'd rather punt them to net-next, the series should apply cleanly. ==================== Signed-off-by: David S. Miller commit 5d4f78564c9ca38146102c4f8998edcad5afbc22 Author: Julian Wiedmann Date: Wed Mar 11 18:07:11 2020 +0100 s390/qeth: implement smarter resizing of the RX buffer pool The RX buffer pool is allocated in qeth_alloc_qdio_queues(). A subsequent pool resizing is then handled in a very simple way: first free the current pool, then allocate a new pool of the requested size. There's two ways where this can go wrong: 1. if the resize action happens _before_ the initial pool was allocated, then a subsequent initialization will call qeth_alloc_qdio_queues() and fill the pool with a second(!) set of pages. We consume twice the planned amount of memory. This is easy to fix - just skip the resizing if the queues haven't been allocated yet. 2. if the initial pool was created by qeth_alloc_qdio_queues() but a subsequent resizing fails, then the device has no(!) RX buffer pool. The next initialization will _not_ call qeth_alloc_qdio_queues(), and attempting to back the RX buffers with pages in qeth_init_qdio_queues() will fail. Not very difficult to fix either - instead of re-allocating the whole pool, just allocate/free as many entries to match the desired size. Fixes: 4a71df50047f ("qeth: new qeth device driver") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 0f75e149298bedc48db03259a38a303611d247b1 Author: Julian Wiedmann Date: Wed Mar 11 18:07:10 2020 +0100 s390/qeth: refactor buffer pool code In preparation for a subsequent fix, split out helpers to allocate/free individual pool entries. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit f81649dfa5343eef7e579eb6f8dd8bd6d300ec31 Author: Julian Wiedmann Date: Wed Mar 11 18:07:09 2020 +0100 s390/qeth: use page pointers to manage RX buffer pool The RX buffer elements are always backed with full pages, reflect this in the pointer type. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 2677625387056136e256c743e3285b4fe3da87bb Author: Paolo Lungaroni Date: Wed Mar 11 17:54:06 2020 +0100 seg6: fix SRv6 L2 tunnels to use IANA-assigned protocol number The Internet Assigned Numbers Authority (IANA) has recently assigned a protocol number value of 143 for Ethernet [1]. Before this assignment, encapsulation mechanisms such as Segment Routing used the IPv6-NoNxt protocol number (59) to indicate that the encapsulated payload is an Ethernet frame. In this patch, we add the definition of the Ethernet protocol number to the kernel headers and update the SRv6 L2 tunnels to use it. [1] https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml Signed-off-by: Paolo Lungaroni Reviewed-by: Andrea Mayer Acked-by: Ahmed Abdelsalam Signed-off-by: David S. Miller commit a20f997010c4ec76eaa55b8cc047d76dcac69f70 Author: Andrew Lunn Date: Wed Mar 11 16:24:24 2020 +0100 net: dsa: Don't instantiate phylink for CPU/DSA ports unless needed By default, DSA drivers should configure CPU and DSA ports to their maximum speed. In many configurations this is sufficient to make the link work. In some cases it is necessary to configure the link to run slower, e.g. because of limitations of the SoC it is connected to. Or back to back PHYs are used and the PHY needs to be driven in order to establish link. In this case, phylink is used. Only instantiate phylink if it is required. If there is no PHY, or no fixed link properties, phylink can upset a link which works in the default configuration. Fixes: 0e27921816ad ("net: dsa: Use PHYLINK for the CPU/DSA ports") Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 46e4c421a053c36bf7a33dda2272481bcaf3eed3 Author: Willem de Bruijn Date: Mon Mar 9 11:34:35 2020 -0400 net/packet: tpacket_rcv: do not increment ring index on drop In one error case, tpacket_rcv drops packets after incrementing the ring producer index. If this happens, it does not update tp_status to TP_STATUS_USER and thus the reader is stalled for an iteration of the ring, causing out of order arrival. The only such error path is when virtio_net_hdr_from_skb fails due to encountering an unknown GSO type. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit f3cc008bf6d59b8d93b4190e01d3e557b0040e15 Author: Dominik Czarnota Date: Mon Mar 9 16:22:50 2020 +0100 sxgbe: Fix off by one in samsung driver strncpy size arg This patch fixes an off-by-one error in strncpy size argument in drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c. The issue is that in: strncmp(opt, "eee_timer:", 6) the passed string literal: "eee_timer:" has 10 bytes (without the NULL byte) and the passed size argument is 6. As a result, the logic will also accept other, malformed strings, e.g. "eee_tiXXX:". This bug doesn't seem to have any security impact since its present in module's cmdline parsing code. Signed-off-by: Dominik Czarnota Signed-off-by: David S. Miller commit f9fc28a8de2fb367f1ab76f0cf176ca545db3d6f Author: Amol Grover Date: Thu Mar 12 11:04:20 2020 +0530 net: caif: Add lockdep expression to RCU traversal primitive caifdevs->list is traversed using list_for_each_entry_rcu() outside an RCU read-side critical section but under the protection of rtnl_mutex. Hence, add the corresponding lockdep expression to silence the following false-positive warning: [ 10.868467] ============================= [ 10.869082] WARNING: suspicious RCU usage [ 10.869817] 5.6.0-rc1-00177-g06ec0a154aae4 #1 Not tainted [ 10.870804] ----------------------------- [ 10.871557] net/caif/caif_dev.c:115 RCU-list traversed in non-reader section!! Reported-by: kernel test robot Signed-off-by: Amol Grover Signed-off-by: David S. Miller commit eecba79e694eda24ba698fe1bdf0466d2f797b42 Author: Jakub Kicinski Date: Wed Mar 11 16:37:02 2020 -0700 MAINTAINERS: remove Sathya Perla as Emulex NIC maintainer Remove Sathya Perla, sathya.perla@broadcom.com is bouncing. The driver has 3 more maintainers. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit ab14961d10d02d20767612c78ce148f6eb85bd58 Author: Jakub Kicinski Date: Tue Mar 10 20:36:16 2020 -0700 net: fec: validate the new settings in fec_enet_set_coalesce() fec_enet_set_coalesce() validates the previously set params and if they are within range proceeds to apply the new ones. The new ones, however, are not validated. This seems backwards, probably a copy-paste error? Compile tested only. Fixes: d851b47b22fc ("net: fec: add interrupt coalescence feature support") Signed-off-by: Jakub Kicinski Acked-by: Fugang Duan Signed-off-by: David S. Miller commit 443d372d6a96cd94ad119e5c14bb4d63a536a7f6 Author: Takashi Iwai Date: Wed Feb 5 10:31:46 2020 +0100 ipmi_si: Avoid spurious errors for optional IRQs Although the IRQ assignment in ipmi_si driver is optional, platform_get_irq() spews error messages unnecessarily: ipmi_si dmi-ipmi-si.0: IRQ index 0 not found Fix this by switching to platform_get_irq_optional(). Cc: stable@vger.kernel.org # 5.4.x Cc: John Donnelly Fixes: 7723f4c5ecdb ("driver core: platform: Add an error message to platform_get_irq*()") Reported-and-tested-by: Patrick Vo Signed-off-by: Takashi Iwai Message-Id: <20200205093146.1352-1-tiwai@suse.de> Signed-off-by: Corey Minyard commit e3c3b6e66da1caeb39a504b03ddcdd3693e45254 Merge: 2c523b344dfa 07dc3678bacc Author: Dave Airlie Date: Thu Mar 12 11:02:46 2020 +1000 Merge tag 'exynos-drm-fixes-for-v5.6-rc5-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Fix IOMMU initialization failure when Exynos DRM driver is rebound, and also fix memory leak to iommu mapping object, which was detected by kmemleak detector. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/1583887109-4148-1-git-send-email-inki.dae@samsung.com commit 3a7c733165a4799fa1beb262fe244bfbcdd1c163 Author: Masahiro Yamada Date: Tue Mar 10 19:12:50 2020 +0900 int128: fix __uint128_t compiler test in Kconfig The support for __uint128_t is dependent on the target bit size. GCC that defaults to the 32-bit can still build the 64-bit kernel with -m64 flag passed. However, $(cc-option,-D__SIZEOF_INT128__=0) is evaluated against the default machine bit, which may not match to the kernel it is building. Theoretically, this could be evaluated separately for 64BIT/32BIT. config CC_HAS_INT128 bool default !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) if 64BIT default !$(cc-option,$(m32-flag) -D__SIZEOF_INT128__=0) I simplified it more because the 32-bit compiler is unlikely to support __uint128_t. Fixes: c12d3362a74b ("int128: move __uint128_t compiler test to Kconfig") Reported-by: George Spelvin Signed-off-by: Masahiro Yamada Tested-by: George Spelvin commit 8cc4fd73501d9f1370c3eebb70cfe8cc9e24062b Author: Masahiro Yamada Date: Tue Mar 10 19:12:49 2020 +0900 kconfig: introduce m32-flag and m64-flag When a compiler supports multiple architectures, some compiler features can be dependent on the target architecture. This is typical for Clang, which supports multiple LLVM backends. Even for GCC, we need to take care of biarch compiler cases. It is not a problem when we evaluate cc-option in Makefiles because cc-option is tested against the flag in question + $(KBUILD_CFLAGS). The cc-option in Kconfig, on the other hand, does not accumulate tested flags. Due to this simplification, it could potentially test cc-option against a different target. At first, Kconfig always evaluated cc-option against the host architecture. Since commit e8de12fb7cde ("kbuild: Check for unknown options with cc-option usage in Kconfig and clang"), in case of cross-compiling with Clang, the target triple is correctly passed to Kconfig. The case with biarch GCC (and native build with Clang) is still not handled properly. We need to pass some flags to specify the target machine bit. Due to the design, all the macros in Kconfig are expanded in the parse stage, where we do not know the target bit size yet. For example, arch/x86/Kconfig allows a user to toggle CONFIG_64BIT. If a compiler flag -foo depends on the machine bit, it must be tested twice, one with -m32 and the other with -m64. However, -m32/-m64 are not always recognized. So, this commits adds m64-flag and m32-flag macros. They expand to -m32, -m64, respectively if supported. Or, they expand to an empty string if unsupported. The typical usage is like this: config FOO bool default $(cc-option,$(m64-flag) -foo) if 64BIT default $(cc-option,$(m32-flag) -foo) This is clumsy, but there is no elegant way to handle this in the current static macro expansion. There was discussion for static functions vs dynamic functions. The consensus was to go as far as possible with the static functions. (https://lkml.org/lkml/2018/3/2/22) Signed-off-by: Masahiro Yamada Tested-by: George Spelvin Reviewed-by: Nathan Chancellor commit 46b7c49254f89d54f11c58fa629f66e224a16034 Author: SZ Lin (林上智) Date: Sun Mar 1 00:09:58 2020 +0800 kbuild: Fix inconsistent comment The commit 2042b5486bd3 ("kbuild: unset variables in top Makefile instead of setting 0") renamed the variable from "config-targets" to "config-build", the comment should be consistent accordingly. Signed-off-by: Kaiden PK Yu (余泊鎧) Signed-off-by: SZ Lin (林上智) Signed-off-by: Masahiro Yamada commit 14a0d527a479eb2cb6067f9e5e163e1bf35db2a9 Author: Chris Wilson Date: Tue Mar 10 10:17:20 2020 +0000 drm/i915: Defer semaphore priority bumping to a workqueue Since the semaphore fence may be signaled from inside an interrupt handler from inside a request holding its request->lock, we cannot then enter into the engine->active.lock for processing the semaphore priority bump as we may traverse our call tree and end up on another held request. CPU 0: [ 2243.218864] _raw_spin_lock_irqsave+0x9a/0xb0 [ 2243.218867] i915_schedule_bump_priority+0x49/0x80 [i915] [ 2243.218869] semaphore_notify+0x6d/0x98 [i915] [ 2243.218871] __i915_sw_fence_complete+0x61/0x420 [i915] [ 2243.218874] ? kmem_cache_free+0x211/0x290 [ 2243.218876] i915_sw_fence_complete+0x58/0x80 [i915] [ 2243.218879] dma_i915_sw_fence_wake+0x3e/0x80 [i915] [ 2243.218881] signal_irq_work+0x571/0x690 [i915] [ 2243.218883] irq_work_run_list+0xd7/0x120 [ 2243.218885] irq_work_run+0x1d/0x50 [ 2243.218887] smp_irq_work_interrupt+0x21/0x30 [ 2243.218889] irq_work_interrupt+0xf/0x20 CPU 1: [ 2242.173107] _raw_spin_lock+0x8f/0xa0 [ 2242.173110] __i915_request_submit+0x64/0x4a0 [i915] [ 2242.173112] __execlists_submission_tasklet+0x8ee/0x2120 [i915] [ 2242.173114] ? i915_sched_lookup_priolist+0x1e3/0x2b0 [i915] [ 2242.173117] execlists_submit_request+0x2e8/0x2f0 [i915] [ 2242.173119] submit_notify+0x8f/0xc0 [i915] [ 2242.173121] __i915_sw_fence_complete+0x61/0x420 [i915] [ 2242.173124] ? _raw_spin_unlock_irqrestore+0x39/0x40 [ 2242.173137] i915_sw_fence_complete+0x58/0x80 [i915] [ 2242.173140] i915_sw_fence_commit+0x16/0x20 [i915] Closes: https://gitlab.freedesktop.org/drm/intel/issues/1318 Fixes: b7404c7ecb38 ("drm/i915: Bump ready tasks ahead of busywaits") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: # v5.2+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200310101720.9944-1-chris@chris-wilson.co.uk (cherry picked from commit 209df10bb4536c81c2540df96c02cd079435357f) Signed-off-by: Jani Nikula commit 8ea6bb8e4d47e07518e5dba4f5cb77e210f0df82 Author: Chris Wilson Date: Fri Mar 6 15:46:47 2020 +0000 drm/i915/gt: Close race between cacheline_retire and free If the cacheline may still be busy, atomically mark it for future release, and only if we can determine that it will never be used again, immediately free it. Closes: https://gitlab.freedesktop.org/drm/intel/issues/1392 Fixes: ebece7539242 ("drm/i915: Keep timeline HWSP allocated until idle across the system") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Matthew Auld Reviewed-by: Mika Kuoppala Cc: # v5.2+ Link: https://patchwork.freedesktop.org/patch/msgid/20200306154647.3528345-1-chris@chris-wilson.co.uk (cherry picked from commit 2d4bd971f5baa51418625f379a69f5d58b5a0450) Signed-off-by: Jani Nikula commit eafc2aa20fba319b6e791a1b0c45a91511eccb6b Author: Chris Wilson Date: Fri Mar 6 11:30:10 2020 +0000 drm/i915/execlists: Enable timeslice on partial virtual engine dequeue If we stop filling the ELSP due to an incompatible virtual engine request, check if we should enable the timeslice on behalf of the queue. This fixes the case where we are inspecting the last->next element when we know that the last element is the last request in the execution queue, and so decided we did not need to enable timeslicing despite the intent to do so! Fixes: 8ee36e048c98 ("drm/i915/execlists: Minimalistic timeslicing") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Cc: # v5.4+ Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200306113012.3184606-1-chris@chris-wilson.co.uk (cherry picked from commit 3df2deed411e0f1b7312baf0139aab8bba4c0410) Signed-off-by: Jani Nikula commit 1d61c5d711a2dc0b978ae905535edee9601f9449 Author: Matthew Auld Date: Thu Mar 5 20:35:34 2020 +0000 drm/i915: be more solid in checking the alignment The alignment is u64, and yet is_power_of_2() assumes unsigned long, which might give different results between 32b and 64b kernel. Signed-off-by: Matthew Auld Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200305203534.210466-1-matthew.auld@intel.com Cc: stable@vger.kernel.org (cherry picked from commit 2920516b2f719546f55079bc39a7fe409d9e80ab) Signed-off-by: Jani Nikula commit 259170cb4c84f4165a36c0b05811eb74c495412c Author: Tina Zhang Date: Thu Feb 27 09:00:41 2020 +0800 drm/i915/gvt: Fix dma-buf display blur issue on CFL Commit c3b5a8430daad ("drm/i915/gvt: Enable gfx virtualiztion for CFL") added the support on CFL. The vgpu emulation hotplug support on CFL was supposed to be included in that patch. Without the vgpu emulation hotplug support, the dma-buf based display gives us a blur face. So fix this issue by adding the vgpu emulation hotplug support on CFL. Fixes: c3b5a8430daad ("drm/i915/gvt: Enable gfx virtualiztion for CFL") Signed-off-by: Tina Zhang Acked-by: Zhenyu Wang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200227010041.32248-1-tina.zhang@intel.com (cherry picked from commit 135dde8853c7e00f6002e710f7e4787ed8585c0e) Signed-off-by: Jani Nikula commit c951b0af2dddbb1f34be103029eb9030392d5554 Author: Chris Wilson Date: Thu Mar 5 13:48:22 2020 +0000 drm/i915: Return early for await_start on same timeline Requests within a timeline are ordered by that timeline, so awaiting for the start of a request within the timeline is a no-op. This used to work by falling out of the mutex_trylock() as the signaler and waiter had the same timeline and not returning an error. Fixes: 6a79d848403d ("drm/i915: Lock signaler timeline while navigating") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: # v5.5+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200305134822.2750496-1-chris@chris-wilson.co.uk (cherry picked from commit ab7a69020fb5d5c7ba19fba60f62fd6f9ca9f779) Signed-off-by: Jani Nikula commit c67b35d970ed3391069c21f3071a26f687399ab2 Author: Chris Wilson Date: Thu Mar 5 10:42:10 2020 +0000 drm/i915: Actually emit the await_start Fix the inverted test to emit the wait on the end of the previous request if we /haven't/ already. Fixes: 6a79d848403d ("drm/i915: Lock signaler timeline while navigating") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: # v5.5+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200305104210.2619967-1-chris@chris-wilson.co.uk (cherry picked from commit 07e9c59d63df6a1c44c1975c01827ba18b69270a) Signed-off-by: Jani Nikula commit 7395f62d95aafacdb9bd4996ec2f95b4a655d7e6 Author: Nathan Chancellor Date: Tue Mar 10 15:06:54 2020 -0700 dpaa_eth: Remove unnecessary boolean expression in dpaa_get_headroom Clang warns: drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:2860:9: warning: converting the result of '?:' with integer constants to a boolean always evaluates to 'true' [-Wtautological-constant-compare] return DPAA_FD_DATA_ALIGNMENT ? ALIGN(headroom, ^ drivers/net/ethernet/freescale/dpaa/dpaa_eth.c:131:34: note: expanded from macro 'DPAA_FD_DATA_ALIGNMENT' \#define DPAA_FD_DATA_ALIGNMENT (fman_has_errata_a050385() ? 64 : 16) ^ 1 warning generated. This was exposed by commit 3c68b8fffb48 ("dpaa_eth: FMan erratum A050385 workaround") even though it appears to have been an issue since the introductory commit 9ad1a3749333 ("dpaa_eth: add support for DPAA Ethernet") since DPAA_FD_DATA_ALIGNMENT has never been able to be zero. Just replace the whole boolean expression with the true branch, as it is always been true. Link: https://github.com/ClangBuiltLinux/linux/issues/928 Signed-off-by: Nathan Chancellor Reviewed-by: Madalin Bucur Signed-off-by: David S. Miller commit e6e6ec48dd0fa12e8a2d1ff6b55cd907401bd7fe Merge: addcb1d0ee31 2b4eae95c736 Author: Linus Torvalds Date: Wed Mar 11 13:35:34 2020 -0700 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fscrypt fix from Eric Biggers: "Fix a bug where if userspace is writing to encrypted files while the FS_IOC_REMOVE_ENCRYPTION_KEY ioctl (introduced in v5.4) is running, dirty inodes could be evicted, causing writes could be lost or the filesystem to hang due to a use-after-free. This was encountered during real-world use, not just theoretical. Tested with the existing fscrypt xfstests, and with a new xfstest I wrote to reproduce this bug. This fix does expose an existing bug with '-o lazytime' that Ted is working on fixing, but this fix is more critical and needed anyway regardless of the lazytime fix" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fscrypt: don't evict dirty inodes after removing key commit f2df8ce148fc6af6944978a3876593ef6c40994c Merge: 2165fdf4bc2d ba32679cac50 Author: David S. Miller Date: Wed Mar 11 12:29:03 2020 -0700 Merge tag 'mac80211-for-net-2020-03-11' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== A couple of fixes: * three netlink validation fixes * a mesh path selection fix ==================== Signed-off-by: David S. Miller commit 211b64e4b5b6bd5fdc19cd525c2cc9a90e6b0ec9 Author: Christian Brauner Date: Wed Mar 11 11:53:09 2020 +0100 binderfs: use refcount for binder control devices too Binderfs binder-control devices are cleaned up via binderfs_evict_inode too() which will use refcount_dec_and_test(). However, we missed to set the refcount for binderfs binder-control devices and so we underflowed when the binderfs instance got unmounted. Pretty obvious oversight and should have been part of the more general UAF fix. The good news is that having test cases (suprisingly) helps. Technically, we could detect that we're about to cleanup the binder-control dentry in binderfs_evict_inode() and then simply clean it up. But that makes the assumption that the binder driver itself will never make use of a binderfs binder-control device after the binderfs instance it belongs to has been unmounted and the superblock for it been destroyed. While it is unlikely to ever come to this let's be on the safe side. Performance-wise this also really doesn't matter since the binder-control device is only every really when creating the binderfs filesystem or creating additional binder devices. Both operations are pretty rare. Fixes: f0fe2c0f050d ("binder: prevent UAF for binderfs devices II") Link: https://lore.kernel.org/r/CA+G9fYusdfg7PMfC9Xce-xLT7NiyKSbgojpK35GOm=Pf9jXXrA@mail.gmail.com Reported-by: Naresh Kamboju Cc: stable@vger.kernel.org Signed-off-by: Christian Brauner Acked-by: Todd Kjos Link: https://lore.kernel.org/r/20200311105309.1742827-1-christian.brauner@ubuntu.com Signed-off-by: Greg Kroah-Hartman commit 8d92e992a785f35d23f845206cf8c6cafbc264e0 Author: Eugeniy Paltsev Date: Wed Mar 11 19:26:43 2020 +0300 ARC: define __ALIGN_STR and __ALIGN symbols for ARC The default defintions use fill pattern 0x90 for padding which for ARC generates unintended "ldh_s r12,[r0,0x20]" corresponding to opcode 0x9090 So use ".align 4" which insert a "nop_s" instruction instead. Cc: stable@vger.kernel.org Acked-by: Vineet Gupta Signed-off-by: Eugeniy Paltsev Signed-off-by: Vineet Gupta commit 204c7eceb76f348b89ccbf20fa3ba9a703ffada5 Author: Vineet Gupta Date: Tue Mar 3 22:10:01 2020 -0800 ARC: show_regs: reduce lines of output Before ------ | CPU: 1 PID: 29061 Comm: tst-dynarray-at Not tainted 5.6.0-rc1-00002-g941fcc018ca6-dirty #12 | | [ECR ]: 0x00090000 => | [EFA ]: 0x00000000 | [ERET ]: 0x2004aa6c | @off 0x2aa6c in [/lib/libc-2.31.9000.so] VMA: 0x20020000 to 0x20122000 | [STAT32]: 0x80080a82 [IE U ] | BTA: 0x2004aa18 SP: 0x5ffff8a8 FP: 0x5ffff8fc | LPS: 0x2008788e LPE: 0x20087896 LPC: 0x00000000 | r00: 0x00000000 r01: 0x5ffff8a8 r02: 0x00000000 | r03: 0x00000008 r04: 0xffffffff r05: 0x00000000 | r06: 0x00000000 r07: 0x00000000 r08: 0x00000087 | r09: 0x00000000 r10: 0x2010691c r11: 0x00000020 | r12: 0x2003b214 r13: 0x5ffff8a8 r14: 0x20126e68 | r15: 0x2001f26c r16: 0x2012a000 r17: 0x00000001 | r18: 0x5ffff8fc r19: 0x00000000 r20: 0x5ffff948 | r21: 0x00000001 r22: 0xffffffff r23: 0x5fffff8c | r24: 0x4008c2a8 r25: 0x2001f6e0 After ----- | CPU: 1 PID: 29061 Comm: tst-dynarray-at Not tainted 5.6.0-rc1-00002-g941fcc018ca6-dirty #12 | @off 0x2aa6c in [/lib/libc-2.31.9000.so] VMA: 0x20020000 to 0x20122000 | ECR: 0x00090000 EFA: 0x00000000 ERET: 0x2004aa6c | STAT32: 0x80080a82 [IE U ] BTA: 0x2004aa18 | BLK: 0x2003b214 SP: 0x5ffff8a8 FP: 0x5ffff8fc | LPS: 0x2008788e LPE: 0x20087896 LPC: 0x00000000 | r00: 0x00000000 r01: 0x5ffff8a8 r02: 0x00000000 | r03: 0x00000008 r04: 0xffffffff r05: 0x00000000 | r06: 0x00000000 r07: 0x00000000 r08: 0x00000087 | r09: 0x00000000 r10: 0x2010691c r11: 0x00000020 | r12: 0x2003b214 r13: 0x5ffff8a8 r14: 0x20126e68 | r15: 0x2001f26c r16: 0x2012a000 r17: 0x00000001 | r18: 0x5ffff8fc r19: 0x00000000 r20: 0x5ffff948 | r21: 0x00000001 r22: 0xffffffff r23: 0x5fffff8c | r24: 0x4008c2a8 r25: 0x2001f6e0 BTA: 0x2004aa18 Signed-off-by: Vineet Gupta commit addcb1d0ee31aa1472a7afd31a63162423af9c93 Merge: 36feb996308e 10dab84caf40 Author: Linus Torvalds Date: Wed Mar 11 10:00:41 2020 -0700 Merge tag 'for-linus-2020-03-10' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull thread fix from Christian Brauner: "This contains a single fix for a regression which was introduced when we introduced the ability to select a specific pid at process creation time. When this feature is requested, the error value will be set to -EPERM after exiting the pid allocation loop. This caused EPERM to be returned when e.g. the init process/child subreaper of the pid namespace has already died where we used to return ENOMEM before. The first patch here simply fixes the regression by unconditionally setting the return value back to ENOMEM again once we've successfully allocated the requested pid number. This should be easy to backport to v5.5. The second patch adds a comment explaining that we must keep returning ENOMEM since we've been doing it for a long time and have explicitly documented this behavior for userspace. This seemed worthwhile because we now have at least two separate example where people tried to change the return value to something other than ENOMEM (The first version of the regression fix did that too and the commit message links to an earlier patch that tried to do the same.). I have a simple regression test to make sure we catch this regression in the future but since that introduces a whole new selftest subdir and test files I'll keep this for v5.7" * tag 'for-linus-2020-03-10' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: pid: make ENOMEM return value more obvious pid: Fix error return value in some cases commit 36feb996308ec3392495e3341bab2570b11cb1bd Merge: c7f26a0ce61e d9815bff6b37 Author: Linus Torvalds Date: Wed Mar 11 09:54:59 2020 -0700 Merge tag 'trace-v5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull ftrace fix from Steven Rostedt: "Have ftrace lookup_rec() return a consistent record otherwise it can break live patching" * tag 'trace-v5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Return the first found result in lookup_rec() commit c7f26a0ce61eb51a4849bdf3268bedd251b6dbc6 Merge: a6ff4631a619 f7d5f5655ef7 Author: Linus Torvalds Date: Wed Mar 11 09:49:47 2020 -0700 Merge tag 'mips_fixes_5.6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: "A few MIPS fixes: - DT fixes for CI20 - Fix command line handling - Correct patchwork URL" * tag 'mips_fixes_5.6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MAINTAINERS: Correct MIPS patchwork URL MIPS: DTS: CI20: fix interrupt for pcf8563 RTC MIPS: DTS: CI20: fix PMU definitions for ACT8600 MIPS: Fix CONFIG_MIPS_CMDLINE_DTB_EXTEND handling commit a6ff4631a61928061c166d3919b9f6e397851125 Merge: e3a36eb6dfae 1cada2f30766 Author: Linus Torvalds Date: Wed Mar 11 09:45:38 2020 -0700 Merge tag 'pinctrl-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Some pin control fixes for the v5.6 series. It comes down to memory leaks in the core and driver fixes. Some should have been sent earlier but they kept piling up and the world is just so full of distractions these days. - Fix some inverted pins in the Meson GLX driver. - Align the i.MX SC message structs causing warnings from KASan. - Balance the kref in pinctrl hogs so they are actually free:d when removing a pin control module. We haven't seen it before as people don't use modules for pin control that much, I think. - Add a missing call to pinctrl_unregister_mappings() another memory leak when using modules. - Fix the fwspec parsing in the Qualcomm driver. - Fix a syntax error in the Falcon driver. - Assign .irq_eoi conditionally in the Qualcomm driver, fixing a bug affecting elder Qualcomm platforms" * tag 'pinctrl-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: qcom: Assign irq_eoi conditionally pinctrl: falcon: fix syntax error pinctrl: qcom: ssbi-gpio: Fix fwspec parsing bug pinctrl: madera: Add missing call to pinctrl_unregister_mappings pinctrl: core: Remove extra kref_get which blocks hogs being freed pinctrl: imx: scu: Align imx sc msg structs to 4 pinctrl: meson-gxl: fix GPIOX sdio pins commit e3a36eb6dfaeea8175c05d5915dcf0b939be6dab Author: Christoph Hellwig Date: Wed Mar 11 17:07:10 2020 +0100 driver code: clarify and fix platform device DMA mask allocation This does three inter-related things to clarify the usage of the platform device dma_mask field. In the process, fix the bug introduced by cdfee5623290 ("driver core: initialize a default DMA mask for platform device") that caused Artem Tashkinov's laptop to not boot with newer Fedora kernels. This does: - First off, rename the field to "platform_dma_mask" to make it greppable. We have way too many different random fields called "dma_mask" in various data structures, where some of them are actual masks, and some of them are just pointers to the mask. And the structures all have pointers to each other, or embed each other inside themselves, and "pdev" sometimes means "platform device" and sometimes it means "PCI device". So to make it clear in the code when you actually use this new field, give it a unique name (it really should be something even more unique like "platform_device_dma_mask", since it's per platform device, not per platform, but that gets old really fast, and this is unique enough in context). To further clarify when the field gets used, initialize it when we actually start using it with the default value. - Then, use this field instead of the random one-off allocation in platform_device_register_full() that is now unnecessary since we now already have a perfectly fine allocation for it in the platform device structure. - The above then allows us to fix the actual bug, where the error path of platform_device_register_full() would unconditionally free the platform device DMA allocation with 'kfree()'. That kfree() was dont regardless of whether the allocation had been done earlier with the (now removed) kmalloc, or whether setup_pdev_dma_masks() had already been used and the dma_mask pointer pointed to the mask that was part of the platform device. It seems most people never triggered the error path, or only triggered it from a call chain that set an explicit pdevinfo->dma_mask value (and thus caused the unnecessary allocation that was "cleaned up" in the error path) before calling platform_device_register_full(). Robin Murphy points out that in Artem's case the wdat_wdt driver failed in platform_device_add(), and that was the one that had called platform_device_register_full() with pdevinfo.dma_mask = 0, and would have caused that kfree() of pdev.dma_mask corrupting the heap. A later unrelated kmalloc() then oopsed due to the heap corruption. Fixes: cdfee5623290 ("driver core: initialize a default DMA mask for platform device") Reported-bisected-and-tested-by: Artem S. Tashkinov Reviewed-by: Robin Murphy Cc: Greg Kroah-Hartman Signed-off-by: Christoph Hellwig Signed-off-by: Linus Torvalds commit 00cef5e404a6c6e72cbec1fd7a41b01890b8d340 Author: Corentin Labbe Date: Wed Nov 20 16:28:32 2019 +0100 ARM: dts: sun8i: a33: add the new SS compatible Add the new A33 SS compatible to the crypto node. Signed-off-by: Corentin Labbe Signed-off-by: Chen-Yu Tsai commit d2f8bfa4bff5028bc40ed56b4497c32e05b0178f Author: Ulf Hansson Date: Tue Mar 10 15:50:11 2020 +0100 mmc: sdhci-tegra: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY It has turned out that the sdhci-tegra controller requires the R1B response, for commands that has this response associated with them. So, converting from an R1B to an R1 response for a CMD6 for example, leads to problems with the HW busy detection support. Fix this by informing the mmc core about the requirement, via setting the host cap, MMC_CAP_NEED_RSP_BUSY. Reported-by: Bitan Biswas Reported-by: Peter Geis Suggested-by: Sowjanya Komatineni Cc: Tested-by: Sowjanya Komatineni Tested-By: Peter Geis Signed-off-by: Ulf Hansson commit f81547ba7a98d24fe566d102b4edefe30e0c4f2d Author: Corentin Labbe Date: Wed Nov 20 16:28:31 2019 +0100 dt-bindings: crypto: add new compatible for A33 SS The A33 SS has a difference with all other SS, it give SHA1 digest directly in BE. This difference need to be handlded by the driver and so need a new compatible. Signed-off-by: Corentin Labbe Acked-by: Rob Herring Signed-off-by: Chen-Yu Tsai commit 055e04830d4544c57f2a5192a26c9e25915c29c0 Author: Ulf Hansson Date: Tue Mar 10 15:05:02 2020 +0100 mmc: sdhci-omap: Fix busy detection by enabling MMC_CAP_NEED_RSP_BUSY It has turned out that the sdhci-omap controller requires the R1B response, for commands that has this response associated with them. So, converting from an R1B to an R1 response for a CMD6 for example, leads to problems with the HW busy detection support. Fix this by informing the mmc core about the requirement, via setting the host cap, MMC_CAP_NEED_RSP_BUSY. Reported-by: Naresh Kamboju Reported-by: Anders Roxell Reported-by: Faiz Abbas Cc: Tested-by: Anders Roxell Tested-by: Faiz Abbas Signed-off-by: Ulf Hansson commit 43cc64e5221cc6741252b64bc4531dd1eefb733d Author: Ulf Hansson Date: Tue Mar 10 14:43:00 2020 +0100 mmc: core: Respect MMC_CAP_NEED_RSP_BUSY for erase/trim/discard The busy timeout that is computed for each erase/trim/discard operation, can become quite long and may thus exceed the host->max_busy_timeout. If that becomes the case, mmc_do_erase() converts from using an R1B response to an R1 response, as to prevent the host from doing HW busy detection. However, it has turned out that some hosts requires an R1B response no matter what, so let's respect that via checking MMC_CAP_NEED_RSP_BUSY. Note that, if the R1B gets enforced, the host becomes fully responsible of managing the needed busy timeout, in one way or the other. Suggested-by: Sowjanya Komatineni Cc: Tested-by: Anders Roxell Tested-by: Sowjanya Komatineni Tested-by: Faiz Abbas Tested-By: Peter Geis Signed-off-by: Ulf Hansson commit 1292e3efb149ee21d8d33d725eeed4e6b1ade963 Author: Ulf Hansson Date: Tue Mar 10 12:49:43 2020 +0100 mmc: core: Allow host controllers to require R1B for CMD6 It has turned out that some host controllers can't use R1B for CMD6 and other commands that have R1B associated with them. Therefore invent a new host cap, MMC_CAP_NEED_RSP_BUSY to let them specify this. In __mmc_switch(), let's check the flag and use it to prevent R1B responses from being converted into R1. Note that, this also means that the host are on its own, when it comes to manage the busy timeout. Suggested-by: Sowjanya Komatineni Cc: Tested-by: Anders Roxell Tested-by: Sowjanya Komatineni Tested-by: Faiz Abbas Tested-By: Peter Geis Signed-off-by: Ulf Hansson commit 0e91506ba00730f088961a8d39f8693b0f8e3fea Author: Hans de Goede Date: Mon Mar 2 12:12:24 2020 +0100 gpiolib: acpi: Add quirk to ignore EC wakeups on HP x2 10 BYT + AXP288 model Commit aa23ca3d98f7 ("gpiolib: acpi: Add honor_wakeup module-option + quirk mechanism") was added to deal with spurious wakeups on one specific model of the HP x2 10 series. In the mean time I have learned that there are at least 3 different HP x2 10 models: Bay Trail SoC + AXP288 PMIC Cherry Trail SoC + AXP288 PMIC Cherry Trail SoC + TI PMIC And the original quirk is only correct for (and only matches the) Cherry Trail SoC + TI PMIC model. The Bay Trail SoC + AXP288 PMIC model has different DMI strings, has the external EC interrupt on a different GPIO pin and only needs to ignore wakeups on the EC interrupt, the INT0002 device works fine on this model. This commit adds an extra DMI based quirk for the HP x2 10 BYT + AXP288 model, ignoring wakeups for ACPI GPIO events on the EC interrupt pin on this model. This fixes spurious wakeups from suspend on this model. Fixes: aa23ca3d98f7 ("gpiolib: acpi: Add honor_wakeup module-option + quirk mechanism") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200302111225.6641-3-hdegoede@redhat.com Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 2ccb21f5516afef5e251184eeefbf36db90206d7 Author: Hans de Goede Date: Mon Mar 2 12:12:23 2020 +0100 gpiolib: acpi: Rework honor_wakeup option into an ignore_wake option Commit aa23ca3d98f7 ("gpiolib: acpi: Add honor_wakeup module-option + quirk mechanism") was added to deal with spurious wakeups on one specific model of the HP x2 10 series. The approach taken there was to add a bool controlling wakeup support for all ACPI GPIO events. This was sufficient for the specific HP x2 10 model the commit was trying to fix, but in the mean time other models have turned up which need a similar workaround to avoid spurious wakeups from suspend, but only for one of the pins on which the ACPI tables request ACPI GPIO events. Since the honor_wakeup option was added to be able to ignore wake events, the name was perhaps not the best, this commit renames it to ignore_wake and changes it to a string with the following format: gpiolib_acpi.ignore_wake=controller@pin[,controller@pin[,...]] This allows working around spurious wakeup issues on a per pin basis. This commit also reworks the existing quirk for the HP x2 10 so that it functions as before. Note: -This removes the honor_wakeup parameter. This has only been upstream for a short time and to the best of my knowledge there are no users using this module parameter. -The controller@pin[,controller@pin[,...]] syntax is based on an existing kernel module parameter using the same controller@pin format. That version uses ';' as separator, but in practice that is problematic because grub2 cannot handle this without taking special care to escape the ';', so here we are using a ',' as separator instead which does not have this issue. Fixes: aa23ca3d98f7 ("gpiolib: acpi: Add honor_wakeup module-option + quirk mechanism") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200302111225.6641-2-hdegoede@redhat.com Acked-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij commit efaa87fa0947d525cf7c075316adde4e3ac7720b Author: Hans de Goede Date: Mon Mar 2 12:12:22 2020 +0100 gpiolib: acpi: Correct comment for HP x2 10 honor_wakeup quirk Commit aa23ca3d98f7 ("gpiolib: acpi: Add honor_wakeup module-option + quirk mechanism") added a quirk for some models of the HP x2 10 series. There are 2 issues with the comment describing the quirk: 1) The comment claims the DMI quirk applies to all Cherry Trail based HP x2 10 models. In the mean time I have learned that there are at least 3 models of the HP x2 10 models: Bay Trail SoC + AXP288 PMIC Cherry Trail SoC + AXP288 PMIC Cherry Trail SoC + TI PMIC And this quirk's DMI matches only match the Cherry Trail SoC + TI PMIC SoC, which is good because we want a slightly different quirk for the others. This commit updates the comment to make it clear that the quirk is only for the Cherry Trail SoC + TI PMIC models. 2) The comment says that it is ok to disable wakeup on all ACPI GPIO event handlers, because there is only the one for the embedded-controller events. This is not true, there also is a handler for the special INT0002 device which is related to USB wakeups. We need to also disable wakeups on that one because the device turns of the USB-keyboard built into the dock when closing the lid. The XHCI controller takes a while to notice this, so it only notices it when already suspended, causing a spurious wakeup because of this. So disabling wakeup on all handlers is the right thing to do, but not because there only is the one handler for the EC events. This commit updates the comment to correctly reflect this. Fixes: aa23ca3d98f7 ("gpiolib: acpi: Add honor_wakeup module-option + quirk mechanism") Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200302111225.6641-1-hdegoede@redhat.com Acked-by: Mika Westerberg Signed-off-by: Linus Walleij commit 8959b304c7062889b1276092cc8590dc1ba98f65 Author: Linus Walleij Date: Fri Mar 6 14:23:26 2020 +0100 gpiolib: Fix irq_disable() semantics The implementation if .irq_disable() which kicks in between the gpiolib and the driver is not properly mimicking the expected semantics of the irqchip core: the irqchip will call .irq_disable() if that exists, else it will call mask_irq() which first checks if .irq_mask() is defined before calling it. Since we are calling it unconditionally, we get this bug from drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c, as it only defines .irq_mask_ack and not .irq_mask: Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = (ptrval) (...) PC is at 0x0 LR is at gpiochip_irq_disable+0x20/0x30 Fix this by only calling .irq_mask() if it exists. Cc: Brian Masney Cc: Hans Verkuil Cc: stable@vger.kernel.org Reviewed-by: Bartosz Golaszewski Fixes: 461c1a7d4733 ("gpiolib: override irq_enable/disable") Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20200306132326.1329640-1-linus.walleij@linaro.org commit 985e537a4082b4635754a57f4f95430790afee6a Author: Tom Lendacky Date: Tue Mar 10 18:35:57 2020 +0100 x86/ioremap: Map EFI runtime services data as encrypted for SEV The dmidecode program fails to properly decode the SMBIOS data supplied by OVMF/UEFI when running in an SEV guest. The SMBIOS area, under SEV, is encrypted and resides in reserved memory that is marked as EFI runtime services data. As a result, when memremap() is attempted for the SMBIOS data, it can't be mapped as regular RAM (through try_ram_remap()) and, since the address isn't part of the iomem resources list, it isn't mapped encrypted through the fallback ioremap(). Add a new __ioremap_check_other() to deal with memory types like EFI_RUNTIME_SERVICES_DATA which are not covered by the resource ranges. This allows any runtime services data which has been created encrypted, to be mapped encrypted too. [ bp: Move functionality to a separate function. ] Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov Reviewed-by: Joerg Roedel Tested-by: Joerg Roedel Cc: # 5.3 Link: https://lkml.kernel.org/r/2d9e16eb5b53dc82665c95c6764b7407719df7a0.1582645327.git.thomas.lendacky@amd.com commit d9b553b02e691185f8145637c46f9564395936e2 Author: Chen-Yu Tsai Date: Wed Mar 11 01:47:09 2020 +0800 ARM: dts: sun8i: r40: Move SPI device nodes based on address order When the SPI device nodes were added, they were added in the wrong location in the device tree file. The device nodes should be sorted by register address. Move the devices node to their correct positions within the file. Fixes: 554581b79139 ("ARM: dts: sun8i: R40: Add SPI controllers nodes and pinmuxes") Acked-by: Maxime Ripard Reviewed-by: Andre Przywara Signed-off-by: Chen-Yu Tsai commit abe076fb0dfd34e4b8b397946d5e1dab2d7fe953 Author: Chen-Yu Tsai Date: Wed Mar 11 01:47:08 2020 +0800 ARM: dts: sun8i: r40: Fix register base address for SPI2 and SPI3 When the SPI device nodes were added, SPI2 and SPI3 had incorrect register base addresses. Fix the base address for both of them. Fixes: 554581b79139 ("ARM: dts: sun8i: R40: Add SPI controllers nodes and pinmuxes") Reported-by: JuanEsf Acked-by: Maxime Ripard Reviewed-by: Andre Przywara Signed-off-by: Chen-Yu Tsai commit fe3a04824f75786e39ed74e82fb6cb2534c95fe4 Author: Chen-Yu Tsai Date: Wed Mar 11 01:47:07 2020 +0800 ARM: dts: sun8i: r40: Move AHCI device node based on address order When the AHCI device node was added, it was added in the wrong location in the device tree file. The device nodes should be sorted by register address. Move the device node to before EHCI1, where it belongs. Fixes: 41c64d3318aa ("ARM: dts: sun8i: r40: add sata node") Acked-by: Maxime Ripard Reviewed-by: Andre Przywara Signed-off-by: Chen-Yu Tsai commit d9815bff6b379ff46981bea9dfeb146081eab314 Author: Artem Savkov Date: Fri Mar 6 18:43:17 2020 +0100 ftrace: Return the first found result in lookup_rec() It appears that ip ranges can overlap so. In that case lookup_rec() returns whatever results it got last even if it found nothing in last searched page. This breaks an obscure livepatch late module patching usecase: - load livepatch - load the patched module - unload livepatch - try to load livepatch again To fix this return from lookup_rec() as soon as it found the record containing searched-for ip. This used to be this way prior lookup_rec() introduction. Link: http://lkml.kernel.org/r/20200306174317.21699-1-asavkov@redhat.com Cc: stable@vger.kernel.org Fixes: 7e16f581a817 ("ftrace: Separate out functionality from ftrace_location_range()") Signed-off-by: Artem Savkov Signed-off-by: Steven Rostedt (VMware) commit 90db6d772f749e38171d04619a5e3cd8804a6d02 Author: John Fastabend Date: Tue Mar 10 09:41:48 2020 -0700 bpf, sockmap: Remove bucket->lock from sock_{hash|map}_free The bucket->lock is not needed in the sock_hash_free and sock_map_free calls, in fact it is causing a splat due to being inside rcu block. | BUG: sleeping function called from invalid context at net/core/sock.c:2935 | in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 62, name: kworker/0:1 | 3 locks held by kworker/0:1/62: | #0: ffff88813b019748 ((wq_completion)events){+.+.}, at: process_one_work+0x1d7/0x5e0 | #1: ffffc900000abe50 ((work_completion)(&map->work)){+.+.}, at: process_one_work+0x1d7/0x5e0 | #2: ffff8881381f6df8 (&stab->lock){+...}, at: sock_map_free+0x26/0x180 | CPU: 0 PID: 62 Comm: kworker/0:1 Not tainted 5.5.0-04008-g7b083332376e #454 | Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 04/01/2014 | Workqueue: events bpf_map_free_deferred | Call Trace: | dump_stack+0x71/0xa0 | ___might_sleep.cold+0xa6/0xb6 | lock_sock_nested+0x28/0x90 | sock_map_free+0x5f/0x180 | bpf_map_free_deferred+0x58/0x80 | process_one_work+0x260/0x5e0 | worker_thread+0x4d/0x3e0 | kthread+0x108/0x140 | ? process_one_work+0x5e0/0x5e0 | ? kthread_park+0x90/0x90 | ret_from_fork+0x3a/0x50 The reason we have stab->lock and bucket->locks in sockmap code is to handle checking EEXIST in update/delete cases. We need to be careful during an update operation that we check for EEXIST and we need to ensure that the psock object is not in some partial state of removal/insertion while we do this. So both map_update_common and sock_map_delete need to guard from being run together potentially deleting an entry we are checking, etc. But by the time we get to the tear-down code in sock_{ma[|hash}_free we have already disconnected the map and we just did synchronize_rcu() in the line above so no updates/deletes should be in flight. Because of this we can drop the bucket locks from the map free'ing code, noting no update/deletes can be in-flight. Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface") Reported-by: Jakub Sitnicki Suggested-by: Jakub Sitnicki Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/158385850787.30597.8346421465837046618.stgit@john-Precision-5820-Tower commit 62a1a58039595698f644f560f00105bb4d5f5c7f Author: Takashi Iwai Date: Wed Mar 11 08:38:24 2020 +0100 HID: hid-sensor-custom: Use scnprintf() for avoiding potential buffer overflow Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Signed-off-by: Takashi Iwai Signed-off-by: Jiri Kosina commit 42f502dfe132edb8d7a47e6c0641ed82d718ad0b Author: Takashi Iwai Date: Wed Mar 11 08:37:19 2020 +0100 HID: hid-picolcd_fb: Use scnprintf() for avoiding potential buffer overflow Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Signed-off-by: Takashi Iwai Signed-off-by: Jiri Kosina commit 195967c088aa856fc7a2698230cddef3b8d7cda9 Author: Lukas Bulwahn Date: Sat Mar 7 21:57:37 2020 +0100 MAINTAINERS: rectify the INTEL IADX DRIVER entry Commit bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators") added the INTEL IADX DRIVER entry in MAINTAINERS, which mentions include/linux/idxd.h as file entry. However, this header file was not added in this commit, nor in any later one. Hence, since then, ./scripts/get_maintainer.pl --self-test complains: warning: no file matches F: include/linux/idxd.h Drop the file entry to the non-existing file in INTEL IADX DRIVER now. Signed-off-by: Lukas Bulwahn Acked-by: Dave Jiang Link: https://lore.kernel.org/r/20200307205737.5829-1-lukas.bulwahn@gmail.com Signed-off-by: Vinod Koul commit f91da3bd21721c05cc7054156fa993edbb16777a Author: Vinod Koul Date: Fri Mar 6 19:20:18 2020 +0530 dmaengine: move .device_release missing log warning to debug level Dmaengine core warns the drivers registering for missing .device_release implementation. The warning is accurate for dmaengine controllers which hotplug but not for rest. So reduce this to a debug log. Link: https://lore.kernel.org/r/20200306135018.2286959-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit 636b45b8efa91db05553840b6c0120d6fa6b94fa Author: Marco Felsch Date: Thu Feb 27 12:02:46 2020 +0100 ARM: dts: imx6: phycore-som: fix arm and soc minimum voltage The current set minimum voltage of 730000µV seems to be wrong. I don't know the document which specifies that but the imx6qdl datasheets says that the minimum voltage should be 0.925V for VDD_ARM (LDO bypassed, lowest opp) and 1.15V for VDD_SOC (LDO bypassed, lowest opp). Fixes: ddec5d1c0047 ("ARM: dts: imx6: Add initial support for phyCORE-i.MX 6 SOM") Signed-off-by: Marco Felsch Signed-off-by: Shawn Guo commit ba32679cac50c38fdf488296f96b1f3175532b8e Author: Nicolas Cavallari Date: Thu Mar 5 15:04:09 2020 +0100 mac80211: Do not send mesh HWMP PREQ if HWMP is disabled When trying to transmit to an unknown destination, the mesh code would unconditionally transmit a HWMP PREQ even if HWMP is not the current path selection algorithm. Signed-off-by: Nicolas Cavallari Link: https://lore.kernel.org/r/20200305140409.12204-1-cavallar@lri.fr Signed-off-by: Johannes Berg commit 5cde05c61cbe13cbb3fa66d52b9ae84f7975e5e6 Author: Jakub Kicinski Date: Mon Mar 2 21:10:58 2020 -0800 nl80211: add missing attribute validation for channel switch Add missing attribute validation for NL80211_ATTR_OPER_CLASS to the netlink policy. Fixes: 1057d35ede5d ("cfg80211: introduce TDLS channel switch commands") Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/20200303051058.4089398-4-kuba@kernel.org Signed-off-by: Johannes Berg commit 056e9375e1f3c4bf2fd49b70258c7daf788ecd9d Author: Jakub Kicinski Date: Mon Mar 2 21:10:57 2020 -0800 nl80211: add missing attribute validation for beacon report scanning Add missing attribute validation for beacon report scanning to the netlink policy. Fixes: 1d76250bd34a ("nl80211: support beacon report scanning") Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/20200303051058.4089398-3-kuba@kernel.org Signed-off-by: Johannes Berg commit 0e1a1d853ecedc99da9d27f9f5c376935547a0e2 Author: Jakub Kicinski Date: Mon Mar 2 21:10:56 2020 -0800 nl80211: add missing attribute validation for critical protocol indication Add missing attribute validation for critical protocol fields to the netlink policy. Fixes: 5de17984898c ("cfg80211: introduce critical protocol indication from user-space") Signed-off-by: Jakub Kicinski Link: https://lore.kernel.org/r/20200303051058.4089398-2-kuba@kernel.org Signed-off-by: Johannes Berg commit e93fc7b4544a5475cfdbc22f87e89f9829bf801c Author: Christian Borntraeger Date: Tue Mar 3 03:10:57 2020 -0500 KVM: s390: Also reset registers in sync regs for initial cpu reset When we do the initial CPU reset we must not only clear the registers in the internal data structures but also in kvm_run sync_regs. For modern userspace sync_regs is the only place that it looks at. Fixes: 7de3f1423ff9 ("KVM: s390: Add new reset vcpu API") Acked-by: David Hildenbrand Signed-off-by: Christian Borntraeger commit ac42c12dd752d315a7027dcb50421dbbd1af53bd Author: Jérôme Pouiller Date: Tue Mar 10 11:13:56 2020 +0100 staging: wfx: fix RCU usage between hif_join() and ieee80211_bss_get_ie() Access to result of ieee80211_bss_get_ie() is protected by RCU. In other hand, function hif_join() can sleep and cannot be called with RCU locked. Provide a copy of "ssidie" to hif_join() to solve this behavior. Fixes: 9ced9b593741 ("staging: wfx: simplify hif_join()") Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200310101356.182818-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 046cc2effd1312a23b9e3d8363be7c68f6e91f3c Author: Jérôme Pouiller Date: Tue Mar 10 11:13:55 2020 +0100 staging: wfx: fix RCU usage in wfx_join_finalize() Access to sta->ht_cap is protected by RCU. However, hif_set_association_mode() may sleep, so it can't be called in RCU. This patch fix this behavior by handling sta and its RCU directly from function hif_set_association_mode(). Signed-off-by: Jérôme Pouiller Fixes: d00149011066 ("staging: wfx: fix RCU usage") Link: https://lore.kernel.org/r/20200310101356.182818-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 4bbc6a3e7ad0d0f31ae3ba9858dbca45eb7a848e Author: Jérôme Pouiller Date: Tue Mar 10 11:13:54 2020 +0100 staging: wfx: make warning about pending frame less scary Removing station while some traffic is in progress may happen. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200310101356.182818-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit c918c27ac6f0252aaa2374cdaa0426df4d5df9df Author: Jérôme Pouiller Date: Tue Mar 10 11:13:53 2020 +0100 staging: wfx: fix lines ending with a comma instead of a semicolon Obviously introduced by mistake. Fixes: 09779276f1ba ("staging: wfx: simplify hif_start() usage") Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200310101356.182818-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit bab0a0b03442a62fe3abefcb2169e0b9ff95990c Author: Jérôme Pouiller Date: Tue Mar 10 11:13:52 2020 +0100 staging: wfx: fix warning about freeing in-use mutex during device unregister After hif_shutdown(), communication with the chip is no more possible. It the only request that never reply. Therefore, hif_cmd.lock is never unlocked. hif_shutdown() unlock itself hif_cmd.lock to avoid a potential warning during disposal of device. hif_cmd.key_renew_lock should also been unlocked for the same reason. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200310101356.182818-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 9d32c0cde4e2d1343dfb88a67b2ec6397705b32b Author: Samuel Thibault Date: Fri Mar 6 01:30:47 2020 +0100 staging/speakup: fix get_word non-space look-ahead get_char was erroneously given the address of the pointer to the text instead of the address of the text, thus leading to random crashes when the user requests speaking a word while the current position is on a space character and say_word_ctl is not enabled. Reported-on: https://github.com/bytefire/speakup/issues/1 Reported-by: Kirk Reiser Reported-by: Janina Sajka Reported-by: Alexandr Epaneshnikov Reported-by: Gregory Nowak Reported-by: deedra waters Signed-off-by: Samuel Thibault Tested-by: Alexandr Epaneshnikov Tested-by: Gregory Nowak Tested-by: Michael Taboada Cc: stable Link: https://lore.kernel.org/r/20200306003047.thijtmqrnayd3dmw@function Signed-off-by: Greg Kroah-Hartman commit 3b36b13d5e69d6f51ff1c55d1b404a74646c9757 Author: Kai-Heng Feng Date: Wed Mar 11 14:13:28 2020 +0800 ALSA: hda/realtek: Fix pop noise on ALC225 Commit 317d9313925c ("ALSA: hda/realtek - Set default power save node to 0") makes the ALC225 have pop noise on S3 resume and cold boot. So partially revert this commit for ALC225 to fix the regression. Fixes: 317d9313925c ("ALSA: hda/realtek - Set default power save node to 0") BugLink: https://bugs.launchpad.net/bugs/1866357 Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200311061328.17614-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 394b61711f3ce33f75bf70a3e22938464a13b3ee Author: Wen Xiong Date: Fri Mar 6 09:57:28 2020 -0600 scsi: ipr: Fix softlockup when rescanning devices in petitboot When trying to rescan disks in petitboot shell, we hit the following softlockup stacktrace: Kernel panic - not syncing: System is deadlocked on memory [ 241.223394] CPU: 32 PID: 693 Comm: sh Not tainted 5.4.16-openpower1 #1 [ 241.223406] Call Trace: [ 241.223415] [c0000003f07c3180] [c000000000493fc4] dump_stack+0xa4/0xd8 (unreliable) [ 241.223432] [c0000003f07c31c0] [c00000000007d4ac] panic+0x148/0x3cc [ 241.223446] [c0000003f07c3260] [c000000000114b10] out_of_memory+0x468/0x4c4 [ 241.223461] [c0000003f07c3300] [c0000000001472b0] __alloc_pages_slowpath+0x594/0x6d8 [ 241.223476] [c0000003f07c3420] [c00000000014757c] __alloc_pages_nodemask+0x188/0x1a4 [ 241.223492] [c0000003f07c34a0] [c000000000153e10] alloc_pages_current+0xcc/0xd8 [ 241.223508] [c0000003f07c34e0] [c0000000001577ac] alloc_slab_page+0x30/0x98 [ 241.223524] [c0000003f07c3520] [c0000000001597fc] new_slab+0x138/0x40c [ 241.223538] [c0000003f07c35f0] [c00000000015b204] ___slab_alloc+0x1e4/0x404 [ 241.223552] [c0000003f07c36c0] [c00000000015b450] __slab_alloc+0x2c/0x48 [ 241.223566] [c0000003f07c36f0] [c00000000015b754] kmem_cache_alloc_node+0x9c/0x1b4 [ 241.223582] [c0000003f07c3760] [c000000000218c48] blk_alloc_queue_node+0x34/0x270 [ 241.223599] [c0000003f07c37b0] [c000000000226574] blk_mq_init_queue+0x2c/0x78 [ 241.223615] [c0000003f07c37e0] [c0000000002ff710] scsi_mq_alloc_queue+0x28/0x70 [ 241.223631] [c0000003f07c3810] [c0000000003005b8] scsi_alloc_sdev+0x184/0x264 [ 241.223647] [c0000003f07c38a0] [c000000000300ba0] scsi_probe_and_add_lun+0x288/0xa3c [ 241.223663] [c0000003f07c3a00] [c000000000301768] __scsi_scan_target+0xcc/0x478 [ 241.223679] [c0000003f07c3b20] [c000000000301c64] scsi_scan_channel.part.9+0x74/0x7c [ 241.223696] [c0000003f07c3b70] [c000000000301df4] scsi_scan_host_selected+0xe0/0x158 [ 241.223712] [c0000003f07c3bd0] [c000000000303f04] store_scan+0x104/0x114 [ 241.223727] [c0000003f07c3cb0] [c0000000002d5ac4] dev_attr_store+0x30/0x4c [ 241.223741] [c0000003f07c3cd0] [c0000000001dbc34] sysfs_kf_write+0x64/0x78 [ 241.223756] [c0000003f07c3cf0] [c0000000001da858] kernfs_fop_write+0x170/0x1b8 [ 241.223773] [c0000003f07c3d40] [c0000000001621fc] __vfs_write+0x34/0x60 [ 241.223787] [c0000003f07c3d60] [c000000000163c2c] vfs_write+0xa8/0xcc [ 241.223802] [c0000003f07c3db0] [c000000000163df4] ksys_write+0x70/0xbc [ 241.223816] [c0000003f07c3e20] [c00000000000b40c] system_call+0x5c/0x68 As a part of the scan process Linux will allocate and configure a scsi_device for each target to be scanned. If the device is not present, then the scsi_device is torn down. As a part of scsi_device teardown a workqueue item will be scheduled and the lockups we see are because there are 250k workqueue items to be processed. Accoding to the specification of SIS-64 sas controller, max_channel should be decreased on SIS-64 adapters to 4. The patch fixes softlockup issue. Thanks for Oliver Halloran's help with debugging and explanation! Link: https://lore.kernel.org/r/1583510248-23672-1-git-send-email-wenxiong@linux.vnet.ibm.com Signed-off-by: Wen Xiong Signed-off-by: Martin K. Petersen commit 2165fdf4bc2d323ec73e5995510f163163ce0fa4 Merge: a2d8bf77a27c 0e635c2a8713 Author: David S. Miller Date: Tue Mar 10 16:07:49 2020 -0700 Merge branch 's390-qeth-fixes' Julian Wiedmann says: ==================== s390/qeth: fixes 2020-03-10 This fixes three minor issues: 1) a setup parameter gets cleared unnecessarily when the HW config changes, 2) insufficient error handling when initially filling the RX ring, and 3) a rarely used worker that needs to be cancelled during tear down. ==================== Signed-off-by: David S. Miller commit 0e635c2a8713e3e013b4adcb7cb7e28a048b7c42 Author: Julian Wiedmann Date: Tue Mar 10 18:38:03 2020 +0100 s390/qeth: cancel RX reclaim work earlier When qeth's napi poll code fails to refill an entirely empty RX ring, it kicks off buffer_reclaim_work to try again later. Make sure that this worker is cancelled when setting the qeth device offline. Otherwise a RX refill action can unexpectedly end up running concurrently to bigger re-configurations (eg. resizing the buffer pool), without any locking. Fixes: b333293058aa ("qeth: add support for af_iucv HiperSockets transport") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 17413852804d7e86e6f0576cca32c1541817800e Author: Julian Wiedmann Date: Tue Mar 10 18:38:02 2020 +0100 s390/qeth: handle error when backing RX buffer qeth_init_qdio_queues() fills the RX ring with an initial set of RX buffers. If qeth_init_input_buffer() fails to back one of the RX buffers with memory, we need to bail out and report the error. Fixes: 4a71df50047f ("qeth: new qeth device driver") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 240c1948491b81cfe40f84ea040a8f2a4966f101 Author: Julian Wiedmann Date: Tue Mar 10 18:38:01 2020 +0100 s390/qeth: don't reset default_out_queue When an OSA device in prio-queue setup is reduced to 1 TX queue due to HW restrictions, we reset its the default_out_queue to 0. In the old code this was needed so that qeth_get_priority_queue() gets the queue selection right. But with proper multiqueue support we already reduced dev->real_num_tx_queues to 1, and so the stack puts all traffic on txq 0 without even calling .ndo_select_queue. Thus we can preserve the user's configuration, and apply it if the OSA device later re-gains support for multiple TX queues. Fixes: 73dc2daf110f ("s390/qeth: add TX multiqueue support for OSA devices") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit be7594a424b4de7473b3d726635c3bf6aa19a86e Author: Can Guo Date: Thu Mar 5 00:53:07 2020 -0800 scsi: ufs: Fix possible unclocked access to auto hibern8 timer register Before access auto hibner8 timer register, make sure power and clock are properly configured to avoid unclocked register access. Link: https://lore.kernel.org/r/1583398391-14273-1-git-send-email-cang@codeaurora.org Fixes: ba7af5ec5126 ("scsi: ufs: export ufshcd_auto_hibern8_update for vendor usage") Reviewed-by: Stanley Chu Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit a2d8bf77a27c81924498fe9cf0bf2ea8ef2d1220 Merge: 7d7195a026ba 09f4136c5d6b Author: David S. Miller Date: Tue Mar 10 15:59:32 2020 -0700 Merge branch 'MACSec-bugfixes-related-to-MAC-address-change' Igor Russkikh says: ==================== MACSec bugfixes related to MAC address change We found out that there's an issue in MACSec code when the MAC address is changed. Both s/w and offloaded implementations don't update SCI when the MAC address changes at the moment, but they should do so, because SCI contains MAC in its first 6 octets. ==================== Signed-off-by: David S. Miller commit 09f4136c5d6b4c5144a965bd086009863d58ff08 Author: Dmitry Bogdanov Date: Tue Mar 10 18:22:25 2020 +0300 net: macsec: invoke mdo_upd_secy callback when mac address changed Notify the offload engine about MAC address change to reconfigure it accordingly. Fixes: 3cf3227a21d1 ("net: macsec: hardware offloading infrastructure") Signed-off-by: Dmitry Bogdanov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 6fc498bc82929ee23aa2f35a828c6178dfd3f823 Author: Dmitry Bogdanov Date: Tue Mar 10 18:22:24 2020 +0300 net: macsec: update SCI upon MAC address change. SCI should be updated, because it contains MAC in its first 6 octets. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Signed-off-by: Dmitry Bogdanov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 7d7195a026bac47ac9943f11f84b7546276209dd Author: Juliet Kim Date: Tue Mar 10 09:23:58 2020 -0500 ibmvnic: Do not process device remove during device reset The ibmvnic driver does not check the device state when the device is removed. If the device is removed while a device reset is being processed, the remove may free structures needed by the reset, causing an oops. Fix this by checking the device state before processing device remove. Signed-off-by: Juliet Kim Signed-off-by: David S. Miller commit ece0d7bd74615773268475b6b64d6f1ebbd4b4c6 Author: Karsten Graul Date: Tue Mar 10 09:33:30 2020 +0100 net/smc: cancel event worker during device removal During IB device removal, cancel the event worker before the device structure is freed. Fixes: a4cf0443c414 ("smc: introduce SMC as an IB-client") Reported-by: syzbot+b297c6825752e7a07272@syzkaller.appspotmail.com Signed-off-by: Karsten Graul Reviewed-by: Ursula Braun Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit 60380488e4e0b95e9e82aa68aa9705baa86de84c Author: Hangbin Liu Date: Tue Mar 10 15:27:37 2020 +0800 ipv6/addrconf: call ipv6_mc_up() for non-Ethernet interface Rafał found an issue that for non-Ethernet interface, if we down and up frequently, the memory will be consumed slowly. The reason is we add allnodes/allrouters addressed in multicast list in ipv6_add_dev(). When link down, we call ipv6_mc_down(), store all multicast addresses via mld_add_delrec(). But when link up, we don't call ipv6_mc_up() for non-Ethernet interface to remove the addresses. This makes idev->mc_tomb getting bigger and bigger. The call stack looks like: addrconf_notify(NETDEV_REGISTER) ipv6_add_dev ipv6_dev_mc_inc(ff01::1) ipv6_dev_mc_inc(ff02::1) ipv6_dev_mc_inc(ff02::2) addrconf_notify(NETDEV_UP) addrconf_dev_config /* Alas, we support only Ethernet autoconfiguration. */ return; addrconf_notify(NETDEV_DOWN) addrconf_ifdown ipv6_mc_down igmp6_group_dropped(ff02::2) mld_add_delrec(ff02::2) igmp6_group_dropped(ff02::1) igmp6_group_dropped(ff01::1) After investigating, I can't found a rule to disable multicast on non-Ethernet interface. In RFC2460, the link could be Ethernet, PPP, ATM, tunnels, etc. In IPv4, it doesn't check the dev type when calls ip_mc_up() in inetdev_event(). Even for IPv6, we don't check the dev type and call ipv6_add_dev(), ipv6_dev_mc_inc() after register device. So I think it's OK to fix this memory consumer by calling ipv6_mc_up() for non-Ethernet interface. v2: Also check IFF_MULTICAST flag to make sure the interface supports multicast Reported-by: Rafał Miłecki Tested-by: Rafał Miłecki Fixes: 74235a25c673 ("[IPV6] addrconf: Fix IPv6 on tuntap tunnels") Fixes: 1666d49e1d41 ("mld: do not remove mld souce list info when set link down") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit f35111a946548e3b34a55abbad3e9bacce6cb10f Merge: 2a48b3793157 11a4a8f73b3c Author: Linus Torvalds Date: Tue Mar 10 15:36:27 2020 -0700 Merge tag 'clang-format-for-linus-v5.6-rc6' of git://github.com/ojeda/linux Pull clang-format update from Miguel Ojeda: "Another update for the .clang-format macro list It has been a while since the last time I sent one!" * tag 'clang-format-for-linus-v5.6-rc6' of git://github.com/ojeda/linux: clang-format: Update with the latest for_each macro list commit d752a4986532cb6305dfd5290a614cde8072769d Author: Shakeel Butt Date: Mon Mar 9 22:16:06 2020 -0700 net: memcg: late association of sock to memcg If a TCP socket is allocated in IRQ context or cloned from unassociated (i.e. not associated to a memcg) in IRQ context then it will remain unassociated for its whole life. Almost half of the TCPs created on the system are created in IRQ context, so, memory used by such sockets will not be accounted by the memcg. This issue is more widespread in cgroup v1 where network memory accounting is opt-in but it can happen in cgroup v2 if the source socket for the cloning was created in root memcg. To fix the issue, just do the association of the sockets at the accept() time in the process context and then force charge the memory buffer already used and reserved by the socket. Signed-off-by: Shakeel Butt Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit e876ecc67db80dfdb8e237f71e5b43bb88ae549c Author: Shakeel Butt Date: Mon Mar 9 22:16:05 2020 -0700 cgroup: memcg: net: do not associate sock with unrelated cgroup We are testing network memory accounting in our setup and noticed inconsistent network memory usage and often unrelated cgroups network usage correlates with testing workload. On further inspection, it seems like mem_cgroup_sk_alloc() and cgroup_sk_alloc() are broken in irq context specially for cgroup v1. mem_cgroup_sk_alloc() and cgroup_sk_alloc() can be called in irq context and kind of assumes that this can only happen from sk_clone_lock() and the source sock object has already associated cgroup. However in cgroup v1, where network memory accounting is opt-in, the source sock can be unassociated with any cgroup and the new cloned sock can get associated with unrelated interrupted cgroup. Cgroup v2 can also suffer if the source sock object was created by process in the root cgroup or if sk_alloc() is called in irq context. The fix is to just do nothing in interrupt. WARNING: Please note that about half of the TCP sockets are allocated from the IRQ context, so, memory used by such sockets will not be accouted by the memcg. The stack trace of mem_cgroup_sk_alloc() from IRQ-context: CPU: 70 PID: 12720 Comm: ssh Tainted: 5.6.0-smp-DEV #1 Hardware name: ... Call Trace: dump_stack+0x57/0x75 mem_cgroup_sk_alloc+0xe9/0xf0 sk_clone_lock+0x2a7/0x420 inet_csk_clone_lock+0x1b/0x110 tcp_create_openreq_child+0x23/0x3b0 tcp_v6_syn_recv_sock+0x88/0x730 tcp_check_req+0x429/0x560 tcp_v6_rcv+0x72d/0xa40 ip6_protocol_deliver_rcu+0xc9/0x400 ip6_input+0x44/0xd0 ? ip6_protocol_deliver_rcu+0x400/0x400 ip6_rcv_finish+0x71/0x80 ipv6_rcv+0x5b/0xe0 ? ip6_sublist_rcv+0x2e0/0x2e0 process_backlog+0x108/0x1e0 net_rx_action+0x26b/0x460 __do_softirq+0x104/0x2a6 do_softirq_own_stack+0x2a/0x40 do_softirq.part.19+0x40/0x50 __local_bh_enable_ip+0x51/0x60 ip6_finish_output2+0x23d/0x520 ? ip6table_mangle_hook+0x55/0x160 __ip6_finish_output+0xa1/0x100 ip6_finish_output+0x30/0xd0 ip6_output+0x73/0x120 ? __ip6_finish_output+0x100/0x100 ip6_xmit+0x2e3/0x600 ? ipv6_anycast_cleanup+0x50/0x50 ? inet6_csk_route_socket+0x136/0x1e0 ? skb_free_head+0x1e/0x30 inet6_csk_xmit+0x95/0xf0 __tcp_transmit_skb+0x5b4/0xb20 __tcp_send_ack.part.60+0xa3/0x110 tcp_send_ack+0x1d/0x20 tcp_rcv_state_process+0xe64/0xe80 ? tcp_v6_connect+0x5d1/0x5f0 tcp_v6_do_rcv+0x1b1/0x3f0 ? tcp_v6_do_rcv+0x1b1/0x3f0 __release_sock+0x7f/0xd0 release_sock+0x30/0xa0 __inet_stream_connect+0x1c3/0x3b0 ? prepare_to_wait+0xb0/0xb0 inet_stream_connect+0x3b/0x60 __sys_connect+0x101/0x120 ? __sys_getsockopt+0x11b/0x140 __x64_sys_connect+0x1a/0x20 do_syscall_64+0x51/0x200 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The stack trace of mem_cgroup_sk_alloc() from IRQ-context: Fixes: 2d7580738345 ("mm: memcontrol: consolidate cgroup socket tracking") Fixes: d979a39d7242 ("cgroup: duplicate cgroup reference when cloning sockets") Signed-off-by: Shakeel Butt Reviewed-by: Roman Gushchin Signed-off-by: David S. Miller commit 2a48b37931572802e980dc059e03ec29a33d2963 Merge: e94148454103 2f920c0f0e29 Author: Linus Torvalds Date: Tue Mar 10 15:32:57 2020 -0700 Merge tag 'auxdisplay-for-linus-v5.6-rc6' of git://github.com/ojeda/linux Pull auxdisplay updates from Miguel Ojeda: "A few minor auxdisplay improvements: - charlcd: replace zero-length array with flexible-array member (kernel-wide cleanup by Gustavo A. R. Silva) - img-ascii-lcd: convert to devm_platform_ioremap_resource (Yangtao Li) - Fix Kconfig indentation (Krzysztof Kozlowski) * tag 'auxdisplay-for-linus-v5.6-rc6' of git://github.com/ojeda/linux: auxdisplay: charlcd: replace zero-length array with flexible-array member auxdisplay: img-ascii-lcd: convert to devm_platform_ioremap_resource auxdisplay: Fix Kconfig indentation commit 65dfcf08072b072b633ba9a693ed48a53919b45f Author: Jakub Kicinski Date: Mon Mar 9 20:11:42 2020 -0700 MAINTAINERS: update cxgb4vf maintainer to Vishal Casey Leedomn is bouncing, Vishal indicated he's happy to take the role. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit e941484541036ba3652b658ed5536c7bca5bdb89 Merge: 2c1aca4bd3fe 2e5383d7904e Author: Linus Torvalds Date: Tue Mar 10 15:05:45 2020 -0700 Merge branch 'for-5.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: - cgroup.procs listing related fixes. It didn't interlock properly with exiting tasks leaving a short window where a cgroup has empty cgroup.procs but still can't be removed and misbehaved on short reads. - psi_show() crash fix on 32bit ino archs - Empty release_agent handling fix * 'for-5.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup1: don't call release_agent when it is "" cgroup: fix psi_show() crash on 32bit ino archs cgroup: Iterate tasks that did not finish do_exit() cgroup: cgroup_procs_next should increase position index cgroup-v1: cgroup_pidlist_next should update position index commit 2c1aca4bd3fefc57018773cc8771f71c9bfbdc1f Merge: 30bb5572ce7a aa202f1f5696 Author: Linus Torvalds Date: Tue Mar 10 14:48:22 2020 -0700 Merge branch 'for-5.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fixes from Tejun Heo: "Workqueue has been incorrectly round-robining per-cpu work items. Hillf's patch fixes that. The other patch documents memory-ordering properties of workqueue operations" * 'for-5.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: don't use wq_select_unbound_cpu() for bound works workqueue: Document (some) memory-ordering properties of {queue,schedule}_work() commit 1d2686d417c5998af3817f93be01745b3db57ecd Author: Hersen Wu Date: Thu Feb 13 10:42:25 2020 -0500 drm/amdgpu/powerplay: nv1x, renior copy dcn clock settings of watermark to smu during boot up dc to pplib interface is changed for navi1x, renoir. display_config_changed is not called by dc anymore. smu_write_watermarks_table is not executed for navi1x, renoir during boot up. solution: call smu_write_watermarks_table just after dc pass watermark clock settings to pplib Signed-off-by: Hersen Wu Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 9134ae2a2546cb96abddcd4469a79c77ee3a4480 Author: Prabhath Sajeepa Date: Mon Mar 9 15:07:53 2020 -0600 nvme-rdma: Avoid double freeing of async event data The timeout of identify cmd, which is invoked as part of admin queue creation, can result in freeing of async event data both in nvme_rdma_timeout handler and error handling path of nvme_rdma_configure_admin queue thus causing NULL pointer reference. Call Trace: ? nvme_rdma_setup_ctrl+0x223/0x800 [nvme_rdma] nvme_rdma_create_ctrl+0x2ba/0x3f7 [nvme_rdma] nvmf_dev_write+0xa54/0xcc6 [nvme_fabrics] __vfs_write+0x1b/0x40 vfs_write+0xb2/0x1b0 ksys_write+0x61/0xd0 __x64_sys_write+0x1a/0x20 do_syscall_64+0x60/0x1e0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reviewed-by: Roland Dreier Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Prabhath Sajeepa Signed-off-by: Keith Busch commit fe8fe7723a3a824790bda681b40efd767e2251a7 Author: Grigore Popescu Date: Tue Mar 10 14:07:19 2020 +0200 soc: fsl: dpio: register dpio irq handlers after dpio create The dpio irqs must be registered when you can actually receive interrupts, ie when the dpios are created. Kernel goes through NULL pointer dereference errors followed by kernel panic [1] because the dpio irqs are enabled before the dpio is created. [1] Unable to handle kernel NULL pointer dereference at virtual address 0040 fsl_mc_dpio dpio.14: probed fsl_mc_dpio dpio.13: Adding to iommu group 11 ISV = 0, ISS = 0x00000004 Unable to handle kernel NULL pointer dereference at virtual address 0040 Mem abort info: ESR = 0x96000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000004 CM = 0, WnR = 0 [0000000000000040] user address but active_mm is swapper Internal error: Oops: 96000004 [#1] PREEMPT SMP Modules linked in: CPU: 2 PID: 151 Comm: kworker/2:1 Not tainted 5.6.0-rc4-next-20200304 #1 Hardware name: NXP Layerscape LX2160ARDB (DT) Workqueue: events deferred_probe_work_func pstate: 00000085 (nzcv daIf -PAN -UAO) pc : dpaa2_io_irq+0x18/0xe0 lr : dpio_irq_handler+0x1c/0x28 sp : ffff800010013e20 x29: ffff800010013e20 x28: ffff0026d9b4c140 x27: ffffa1d38a142018 x26: ffff0026d2953400 x25: ffffa1d38a142018 x24: ffffa1d38a7ba1d8 x23: ffff800010013f24 x22: 0000000000000000 x21: 0000000000000072 x20: ffff0026d2953400 x19: ffff0026d2a68b80 x18: 0000000000000001 x17: 000000002fb37f3d x16: 0000000035eafadd x15: ffff0026d9b4c5b8 x14: ffffffffffffffff x13: ff00000000000000 x12: 0000000000000038 x11: 0101010101010101 x10: 0000000000000040 x9 : ffffa1d388db11e4 x8 : ffffa1d38a7e40f0 x7 : ffff0026da414f38 x6 : 0000000000000000 x5 : ffff0026da414d80 x4 : ffff5e5353d0c000 x3 : ffff800010013f60 x2 : ffffa1d388db11c8 x1 : ffff0026d2a67c00 x0 : 0000000000000000 Call trace: dpaa2_io_irq+0x18/0xe0 dpio_irq_handler+0x1c/0x28 __handle_irq_event_percpu+0x78/0x2c0 handle_irq_event_percpu+0x38/0x90 handle_irq_event+0x4c/0xd0 handle_fasteoi_irq+0xbc/0x168 generic_handle_irq+0x2c/0x40 __handle_domain_irq+0x68/0xc0 gic_handle_irq+0x64/0x150 el1_irq+0xb8/0x180 _raw_spin_unlock_irqrestore+0x14/0x48 irq_set_affinity_hint+0x6c/0xa0 dpaa2_dpio_probe+0x2a4/0x518 fsl_mc_driver_probe+0x28/0x70 really_probe+0xdc/0x320 driver_probe_device+0x5c/0xf0 __device_attach_driver+0x88/0xc0 bus_for_each_drv+0x7c/0xc8 __device_attach+0xe4/0x140 device_initial_probe+0x18/0x20 bus_probe_device+0x98/0xa0 device_add+0x41c/0x758 fsl_mc_device_add+0x184/0x530 dprc_scan_objects+0x280/0x370 dprc_probe+0x124/0x3b0 fsl_mc_driver_probe+0x28/0x70 really_probe+0xdc/0x320 driver_probe_device+0x5c/0xf0 __device_attach_driver+0x88/0xc0 bus_for_each_drv+0x7c/0xc8 __device_attach+0xe4/0x140 device_initial_probe+0x18/0x20 bus_probe_device+0x98/0xa0 deferred_probe_work_func+0x74/0xa8 process_one_work+0x1c8/0x470 worker_thread+0x1f8/0x428 kthread+0x124/0x128 ret_from_fork+0x10/0x18 Code: a9bc7bfd 910003fd a9025bf5 a90363f7 (f9402015) ---[ end trace 38298e1a29e7a570 ]--- Kernel panic - not syncing: Fatal exception in interrupt SMP: stopping secondary CPUs Mem abort info: ESR = 0x96000004 CM = 0, WnR = 0 EC = 0x25: DABT (current EL), IL = 32 bits [0000000000000040] user address but active_mm is swapper SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000004 CM = 0, WnR = 0 [0000000000000040] user address but active_mm is swapper SMP: failed to stop secondary CPUs 0-2 Kernel Offset: 0x21d378600000 from 0xffff800010000000 PHYS_OFFSET: 0xffffe92180000000 CPU features: 0x10002,21806008 Memory Limit: none ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]--- Signed-off-by: Laurentiu Tudor Signed-off-by: Grigore Popescu Signed-off-by: Li Yang commit dcd6589b11d3b1e71f516a87a7b9646ed356b4c0 Author: Tejun Heo Date: Tue Mar 10 13:07:46 2020 -0400 blk-iocost: fix incorrect vtime comparison in iocg_is_idle() vtimes may wrap and time_before/after64() should be used to determine whether a given vtime is before or after another. iocg_is_idle() was incorrectly using plain "<" comparison do determine whether done_vtime is before vtime. Here, the only thing we're interested in is whether done_vtime matches vtime which indicates that there's nothing in flight. Let's test for inequality instead. Signed-off-by: Tejun Heo Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Jens Axboe commit ec16b6bbdab1ce2b03f46271460efc7f450658cd Author: Mark Zhang Date: Thu Mar 5 14:40:52 2020 +0200 RDMA/mlx5: Fix the number of hwcounters of a dynamic counter When we read the global counter and there's any dynamic counter allocated, the value of a hwcounter is the sum of the default counter and all dynamic counters. So the number of hwcounters of a dynamically allocated counter must be same as of the default counter, otherwise there will be read violations. This fixes the KASAN slab-out-of-bounds bug: BUG: KASAN: slab-out-of-bounds in rdma_counter_get_hwstat_value+0x36d/0x390 [ib_core] Read of size 8 at addr ffff8884192a5778 by task rdma/10138 CPU: 7 PID: 10138 Comm: rdma Not tainted 5.5.0-for-upstream-dbg-2020-02-06_18-30-19-27 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0xb7/0x10b print_address_description.constprop.4+0x1e2/0x400 ? rdma_counter_get_hwstat_value+0x36d/0x390 [ib_core] __kasan_report+0x15c/0x1e0 ? mlx5_ib_query_q_counters+0x13f/0x270 [mlx5_ib] ? rdma_counter_get_hwstat_value+0x36d/0x390 [ib_core] kasan_report+0xe/0x20 rdma_counter_get_hwstat_value+0x36d/0x390 [ib_core] ? rdma_counter_query_stats+0xd0/0xd0 [ib_core] ? memcpy+0x34/0x50 ? nla_put+0xe2/0x170 nldev_stat_get_doit+0x9c7/0x14f0 [ib_core] ... do_syscall_64+0x95/0x490 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fcc457fe65a Code: bb 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 8b 05 fa f1 2b 00 45 89 c9 4c 63 d1 48 63 ff 85 c0 75 15 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 76 f3 c3 0f 1f 40 00 41 55 41 54 4d 89 c5 55 RSP: 002b:00007ffc0586f868 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fcc457fe65a RDX: 0000000000000020 RSI: 00000000013db920 RDI: 0000000000000003 RBP: 00007ffc0586fa90 R08: 00007fcc45ac10e0 R09: 000000000000000c R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004089c0 R13: 0000000000000000 R14: 00007ffc0586fab0 R15: 00000000013dc9a0 Allocated by task 9700: save_stack+0x19/0x80 __kasan_kmalloc.constprop.7+0xa0/0xd0 mlx5_ib_counter_alloc_stats+0xd1/0x1d0 [mlx5_ib] rdma_counter_alloc+0x16d/0x3f0 [ib_core] rdma_counter_bind_qpn_alloc+0x216/0x4e0 [ib_core] nldev_stat_set_doit+0x8c2/0xb10 [ib_core] rdma_nl_rcv_msg+0x3d2/0x730 [ib_core] rdma_nl_rcv+0x2a8/0x400 [ib_core] netlink_unicast+0x448/0x620 netlink_sendmsg+0x731/0xd10 sock_sendmsg+0xb1/0xf0 __sys_sendto+0x25d/0x2c0 __x64_sys_sendto+0xdd/0x1b0 do_syscall_64+0x95/0x490 entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: 18d422ce8ccf ("IB/mlx5: Add counter_alloc_stats() and counter_update_stats() support") Link: https://lore.kernel.org/r/20200305124052.196688-1-leon@kernel.org Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d372abf37676dab366518088f8871fab312ccc30 Author: Weihang Li Date: Sat Mar 7 17:58:34 2020 +0800 MAINTAINERS: Update maintainers for HISILICON ROCE DRIVER Add myself as a maintainer for HNS RoCE drivers, and update Xavier's e-amil address. Link: https://lore.kernel.org/r/1583575114-32194-1-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Acked-by: Wei Hu (Xavier) Signed-off-by: Jason Gunthorpe commit 0f9826f4753f74f935e18c2a640484ecbd941346 Author: Jason Gunthorpe Date: Wed Mar 4 14:16:07 2020 -0400 RDMA/odp: Fix leaking the tgid for implicit ODP The tgid used to be part of ib_umem_free_notifier(), when it was reworked it got moved to release, but it should have been unconditional as all umem alloc paths get the tgid. As is, creating an implicit ODP will leak the tgid reference. Link: https://lore.kernel.org/r/20200304181607.GA22412@ziepe.ca Cc: stable@kernel.org Fixes: f25a546e6529 ("RDMA/odp: Use mmu_interval_notifier_insert()") Signed-off-by: Jason Gunthorpe commit f7861a55b1ce35d0cacfd1f0435f46533dbc9b67 Merge: 1d8006abaab4 6ffe559a77d1 Author: Alexei Starovoitov Date: Tue Mar 10 10:00:42 2020 -0700 Merge branch 'fix-BTF-enum' Yoshiki Komachi says: ==================== btf_enum_check_member() checked if the size of "enum" as a struct member exceeded struct_size or not. Then, the function compared it with the size of "int". Although the size of "enum" is 4-byte by default (i.e., equivalent to "int"), the packing feature enables us to reduce it, as illustrated by the following example: struct A { char m; enum { E0, E1 } __attribute__((packed)) n; }; With such a setup above, the bpf loader gave an error attempting to load it: ------------------------------------------------------------------ ... [3] ENUM (anon) size=1 vlen=2 E0 val=0 E1 val=1 [4] STRUCT A size=2 vlen=2 m type_id=2 bits_offset=0 n type_id=3 bits_offset=8 [4] STRUCT A size=2 vlen=2 n type_id=3 bits_offset=8 Member exceeds struct_size libbpf: Error loading .BTF into kernel: -22. ------------------------------------------------------------------ The related issue was previously fixed by the commit 9eea98497951 ("bpf: fix BTF verification of enums"). On the other hand, this series fixes this issue as well, and adds a selftest program for it. Changes in v2: - change an example in commit message based on Andrii's review - add a selftest program for packed "enum" type members in struct/union ==================== Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 6ffe559a77d1c963a3567f7a39a5419bdcdc4f1c Author: Yoshiki Komachi Date: Tue Mar 10 16:32:30 2020 +0900 selftests/bpf: Add test for the packed enum member in struct/union Add a simple test to the existing selftest program in order to make sure that a packed enum member in struct unexceeds the struct_size. Signed-off-by: Yoshiki Komachi Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1583825550-18606-3-git-send-email-komachi.yoshiki@gmail.com commit da6c7faeb103c493e505e87643272f70be586635 Author: Yoshiki Komachi Date: Tue Mar 10 16:32:29 2020 +0900 bpf/btf: Fix BTF verification of enum members in struct/union btf_enum_check_member() was currently sure to recognize the size of "enum" type members in struct/union as the size of "int" even if its size was packed. This patch fixes BTF enum verification to use the correct size of member in BPF programs. Fixes: 179cde8cef7e ("bpf: btf: Check members of struct/union") Signed-off-by: Yoshiki Komachi Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1583825550-18606-2-git-send-email-komachi.yoshiki@gmail.com commit 16263abc12d09871156a1c8650fb651f0e552f5e Author: Alberto Mattea Date: Fri Mar 6 17:08:58 2020 +0200 usb: xhci: apply XHCI_SUSPEND_DELAY to AMD XHCI controller 1022:145c This controller timeouts during suspend (S3) with [ 240.521724] xhci_hcd 0000:30:00.3: WARN: xHC save state timeout [ 240.521729] xhci_hcd 0000:30:00.3: ERROR mismatched command completion event thus preventing the system from entering S3. Moreover it remains in an undefined state where some connected devices stop working until a reboot. Apply the XHCI_SUSPEND_DELAY quirk to make it suspend properly. CC: stable@vger.kernel.org Signed-off-by: Alberto Mattea Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200306150858.21904-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 045706bff837ee89c13f1ace173db71922c1c40b Author: Steven Rostedt (VMware) Date: Fri Mar 6 17:08:57 2020 +0200 xhci: Do not open code __print_symbolic() in xhci trace events libtraceevent (used by perf and trace-cmd) failed to parse the xhci_urb_dequeue trace event. This is because the user space trace event format parsing is not a full C compiler. It can handle some basic logic, but is not meant to be able to handle everything C can do. In cases where a trace event field needs to be converted from a number to a string, there's the __print_symbolic() macro that should be used: See samples/trace_events/trace-events-sample.h Some xhci trace events open coded the __print_symbolic() causing the user spaces tools to fail to parse it. This has to be replaced with __print_symbolic() instead. CC: stable@vger.kernel.org Reported-by: Tzvetomir Stoyanov Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206531 Fixes: 5abdc2e6e12ff ("usb: host: xhci: add urb_enqueue/dequeue/giveback tracers") Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200306150858.21904-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c08ab390b68305ac415ecd7e5ea7f9c2a28105e0 Merge: 2c523b344dfa e9d0e7511fda Author: Greg Kroah-Hartman Date: Tue Mar 10 17:42:55 2020 +0100 Merge tag 'thunderbolt-fix-for-v5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fix for v5.6-rc6 This includes a single commit that fixes incorrect return value from tb_port_is_width_supported() if the read fails. * tag 'thunderbolt-fix-for-v5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Fix error code in tb_port_is_width_supported() commit 1756bfe89857898eb7f434b60d063f649c3395db Merge: 0c5220a3c124 cfaf6051eccc Author: Tony Lindgren Date: Tue Mar 10 08:54:01 2020 -0700 Merge branch 'fix-lcdc-quirk' into fixes commit aa202f1f56960c60e7befaa0f49c72b8fa11b0a8 Author: Hillf Danton Date: Fri Jan 24 20:14:45 2020 -0500 workqueue: don't use wq_select_unbound_cpu() for bound works wq_select_unbound_cpu() is designed for unbound workqueues only, but it's wrongly called when using a bound workqueue too. Fixing this ensures work queued to a bound workqueue with cpu=WORK_CPU_UNBOUND always runs on the local CPU. Before, that would happen only if wq_unbound_cpumask happened to include it (likely almost always the case), or was empty, or we got lucky with forced round-robin placement. So restricting /sys/devices/virtual/workqueue/cpumask to a small subset of a machine's CPUs would cause some bound work items to run unexpectedly there. Fixes: ef557180447f ("workqueue: schedule WORK_CPU_UNBOUND work on wq_unbound_cpumask CPUs") Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: Hillf Danton [dj: massage changelog] Signed-off-by: Daniel Jordan Cc: Tejun Heo Cc: Lai Jiangshan Cc: linux-kernel@vger.kernel.org Signed-off-by: Tejun Heo commit da86cad0e011c0216bf2303bc924fa080e150bc8 Author: Luca Coelho Date: Thu Mar 5 14:26:22 2020 +0200 MAINTAINERS: update web URL for iwlwifi The current URL mentioned in iwlwifi's W entry is outdated and currently pointing to a dead link. Change it so that it points to the correct Wiki page directly. Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 453bfc2d16fccb9917a331347ebc7432b0a8111e Merge: 236205942749 9352ed0165ff Author: Kalle Valo Date: Tue Mar 10 15:33:24 2020 +0200 Merge tag 'iwlwifi-for-kalle-2020-03-08' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes First batch of fixes intended for v5.6 * Fix a locking issue in time events handling; * A fix in rate-scaling; * Fix for a potential NULL pointer deref; * Enable antenna diversity in some devices that were erroneously not doing it; * Allow FW dumps to continue when the FW is stuck; * A fix in the HE capabilities handling; * Another fix for FW dumps where we were reading wrong addresses. commit 3747cd2efe7ecb9604972285ab3f60c96cb753a8 Author: Hamish Martin Date: Tue Mar 10 10:16:18 2020 +1300 i2c: gpio: suppress error on probe defer If a GPIO we are trying to use is not available and we are deferring the probe, don't output an error message. This seems to have been the intent of commit 05c74778858d ("i2c: gpio: Add support for named gpios in DT") but the error was still output due to not checking the updated 'retdesc'. Fixes: 05c74778858d ("i2c: gpio: Add support for named gpios in DT") Signed-off-by: Hamish Martin Acked-by: Linus Walleij Signed-off-by: Wolfram Sang commit bcf3588d8ed3517e6ffaf083f034812aee9dc8e2 Author: Wolfram Sang Date: Tue Mar 3 13:50:46 2020 +0100 macintosh: windfarm: fix MODINFO regression Commit af503716ac14 made sure OF devices get an OF style modalias with I2C events. It assumed all in-tree users were converted, yet it missed some Macintosh drivers. Add an OF module device table for all windfarm drivers to make them automatically load again. Fixes: af503716ac14 ("i2c: core: report OF style module alias for devices registered via OF") Link: https://bugzilla.kernel.org/show_bug.cgi?id=199471 Reported-by: Erhard Furtner Tested-by: Erhard Furtner Acked-by: Michael Ellerman (powerpc) Signed-off-by: Wolfram Sang Cc: stable@kernel.org # v4.17+ commit 9be8bc4dd6177cf992b93b0bd014c4f611283896 Author: Jarkko Nikula Date: Thu Feb 13 17:15:03 2020 +0200 i2c: designware-pci: Fix BUG_ON during device removal Function i2c_dw_pci_remove() -> pci_free_irq_vectors() -> pci_disable_msi() -> free_msi_irqs() will throw a BUG_ON() for MSI enabled device since the driver has not released the requested IRQ before calling the pci_free_irq_vectors(). Here driver requests an IRQ using devm_request_irq() but automatic release happens only after remove callback. Fix this by explicitly freeing the IRQ before calling pci_free_irq_vectors(). Fixes: 21aa3983d619 ("i2c: designware-pci: Switch over to MSI interrupts") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit f5152416528c2295f35dd9c9bd4fb27c4032413d Author: Qian Cai Date: Thu Mar 5 15:15:02 2020 -0500 iommu/vt-d: Silence RCU-list debugging warnings Similar to the commit 02d715b4a818 ("iommu/vt-d: Fix RCU list debugging warnings"), there are several other places that call list_for_each_entry_rcu() outside of an RCU read side critical section but with dmar_global_lock held. Silence those false positives as well. drivers/iommu/intel-iommu.c:4288 RCU-list traversed in non-reader section!! 1 lock held by swapper/0/1: #0: ffffffff935892c8 (dmar_global_lock){+.+.}, at: intel_iommu_init+0x1ad/0xb97 drivers/iommu/dmar.c:366 RCU-list traversed in non-reader section!! 1 lock held by swapper/0/1: #0: ffffffff935892c8 (dmar_global_lock){+.+.}, at: intel_iommu_init+0x125/0xb97 drivers/iommu/intel-iommu.c:5057 RCU-list traversed in non-reader section!! 1 lock held by swapper/0/1: #0: ffffffffa71892c8 (dmar_global_lock){++++}, at: intel_iommu_init+0x61a/0xb13 Signed-off-by: Qian Cai Acked-by: Lu Baolu Signed-off-by: Joerg Roedel commit 2d48ea0efb8887ebba3e3720bb5b738aced4e574 Author: Qian Cai Date: Thu Mar 5 15:00:46 2020 -0500 iommu/vt-d: Fix RCU-list bugs in intel_iommu_init() There are several places traverse RCU-list without holding any lock in intel_iommu_init(). Fix them by acquiring dmar_global_lock. WARNING: suspicious RCU usage ----------------------------- drivers/iommu/intel-iommu.c:5216 RCU-list traversed in non-reader section!! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 no locks held by swapper/0/1. Call Trace: dump_stack+0xa0/0xea lockdep_rcu_suspicious+0x102/0x10b intel_iommu_init+0x947/0xb13 pci_iommu_init+0x26/0x62 do_one_initcall+0xfe/0x500 kernel_init_freeable+0x45a/0x4f8 kernel_init+0x11/0x139 ret_from_fork+0x3a/0x50 DMAR: Intel(R) Virtualization Technology for Directed I/O Fixes: d8190dc63886 ("iommu/vt-d: Enable DMA remapping after rmrr mapped") Signed-off-by: Qian Cai Acked-by: Lu Baolu Signed-off-by: Joerg Roedel commit 04bbb97d1b732b2d197f103c5818f5c214a4cf81 Author: Mika Westerberg Date: Wed Feb 26 16:21:22 2020 +0300 i2c: i801: Do not add ICH_RES_IO_SMI for the iTCO_wdt device Martin noticed that nct6775 driver does not load properly on his system in v5.4+ kernels. The issue was bisected to commit b84398d6d7f9 ("i2c: i801: Use iTCO version 6 in Cannon Lake PCH and beyond") but it is likely not the culprit because the faulty code has been in the driver already since commit 9424693035a5 ("i2c: i801: Create iTCO device on newer Intel PCHs"). So more likely some commit that added PCI IDs of recent chipsets made the driver to create the iTCO_wdt device on Martins system. The issue was debugged to be PCI configuration access to the PMC device that is not present. This returns all 1's when read and this caused the iTCO_wdt driver to accidentally request resourses used by nct6775. It turns out that the SMI resource is only required for some ancient systems, not the ones supported by this driver. For this reason do not populate the SMI resource at all and drop all the related code. The driver now always populates the main I/O resource and only in case of SPT (Intel Sunrisepoint) compatible devices it adds another resource for the NO_REBOOT bit. These two resources are of different types so platform_get_resource() used by the iTCO_wdt driver continues to find the both resources at index 0. Link: https://lore.kernel.org/linux-hwmon/CAM1AHpQ4196tyD=HhBu-2donSsuogabkfP03v1YF26Q7_BgvgA@mail.gmail.com/ Fixes: 9424693035a5 ("i2c: i801: Create iTCO device on newer Intel PCHs") [wsa: complete fix needs all of http://patchwork.ozlabs.org/project/linux-i2c/list/?series=160959&state=*] Reported-by: Martin Volf Signed-off-by: Mika Westerberg Reviewed-by: Guenter Roeck Signed-off-by: Wolfram Sang commit e42b0c24389d5a1602e77db4f6def0d5a19e3e43 Author: Mika Westerberg Date: Wed Feb 26 16:21:21 2020 +0300 watchdog: iTCO_wdt: Make ICH_RES_IO_SMI optional The iTCO_wdt driver only needs ICH_RES_IO_SMI I/O resource when either turn_SMI_watchdog_clear_off module parameter is set to match ->iTCO_version (or higher), and when legacy iTCO_vendorsupport is set. Modify the driver so that ICH_RES_IO_SMI is optional if the two conditions are not met. Signed-off-by: Mika Westerberg Reviewed-by: Guenter Roeck Signed-off-by: Wolfram Sang commit 7ca6ee38909109751bfab79e9f6c570d2ed258c6 Author: Mika Westerberg Date: Wed Feb 26 16:21:20 2020 +0300 watchdog: iTCO_wdt: Export vendorsupport In preparation for making ->smi_res optional the iTCO_wdt driver needs to know whether vendorsupport is being set to non-zero. For this reason export the variable. Signed-off-by: Mika Westerberg Reviewed-by: Guenter Roeck Signed-off-by: Wolfram Sang commit b74f241d71c251fef074e58ff767b47d1aff901d Merge: 2c523b344dfa 2fa7e15c5f46 Author: Jani Nikula Date: Tue Mar 10 11:16:41 2020 +0200 Merge tag 'gvt-fixes-2020-03-10' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2020-03-10 - Fix vgpu idr destroy causing timer destroy failure (Zhenyu) - Fix VBT size (Tina) Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20200310080933.GE28483@zhen-hp.sh.intel.com commit bce74b1feb01accc6654a1f3e37958478d3a4fbc Merge: 2c523b344dfa 2de7fb60a474 Author: Rafael J. Wysocki Date: Tue Mar 10 09:52:04 2020 +0100 Merge tag 'linux-cpupower-5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Pull cpupower utility fix for v5.6 from Shuah Khan: "This cpupower update for Linux 5.6-rc6 consists of a fix from Mike Gilbert for build failures when -fno-common is enabled. -fno-common will be default in gcc v10." * tag 'linux-cpupower-5.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower: avoid multiple definition with gcc -fno-common commit 36fa3e50085e3858dd506e4431b9abd1bcb1f542 Author: Dan Carpenter Date: Thu Feb 27 19:19:54 2020 +0300 tee: amdtee: out of bounds read in find_session() The "index" is a user provided value from 0-USHRT_MAX. If it's over TEE_NUM_SESSIONS (31) then it results in an out of bounds read when we call test_bit(index, sess->sess_mask). Fixes: 757cc3e9ff1d ("tee: add AMD-TEE driver") Acked-by: Rijo Thomas Signed-off-by: Dan Carpenter Signed-off-by: Jens Wiklander commit 07dc3678bacc2a75b1900febea7d996a31f178a2 Author: Marek Szyprowski Date: Mon Mar 9 12:02:14 2020 +0100 drm/exynos: Fix cleanup of IOMMU related objects Store the IOMMU mapping created by the device core of each Exynos DRM sub-device and restore it when the Exynos DRM driver is unbound. This fixes IOMMU initialization failure for the second time when a deferred probe is triggered from the bind() callback of master's compound DRM driver. This also fixes the following issue found using kmemleak detector: unreferenced object 0xc2137640 (size 64): comm "swapper/0", pid 1, jiffies 4294937900 (age 3127.400s) hex dump (first 32 bytes): 50 a3 14 c2 80 a2 14 c2 01 00 00 00 20 00 00 00 P........... ... 00 10 00 00 00 80 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<3acd268d>] arch_setup_dma_ops+0x4c/0x104 [<9f7d2cce>] of_dma_configure+0x19c/0x3a4 [] really_probe+0xb0/0x47c [<4f510e4f>] driver_probe_device+0x78/0x1c4 [<7481a0cf>] device_driver_attach+0x58/0x60 [<0ff8f5c1>] __driver_attach+0xb8/0x158 [<86006144>] bus_for_each_dev+0x74/0xb4 [<10159dca>] bus_add_driver+0x1c0/0x200 [<8a265265>] driver_register+0x74/0x108 [] exynos_drm_init+0xb0/0x134 [] do_one_initcall+0x90/0x458 [<6da35917>] kernel_init_freeable+0x188/0x200 [] kernel_init+0x8/0x110 [<1f3cddf9>] ret_from_fork+0x14/0x20 [<8cd12507>] 0x0 unreferenced object 0xc214a280 (size 128): comm "swapper/0", pid 1, jiffies 4294937900 (age 3127.400s) hex dump (first 32 bytes): 00 a0 ec ed 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: [<3acd268d>] arch_setup_dma_ops+0x4c/0x104 [<9f7d2cce>] of_dma_configure+0x19c/0x3a4 [] really_probe+0xb0/0x47c [<4f510e4f>] driver_probe_device+0x78/0x1c4 [<7481a0cf>] device_driver_attach+0x58/0x60 [<0ff8f5c1>] __driver_attach+0xb8/0x158 [<86006144>] bus_for_each_dev+0x74/0xb4 [<10159dca>] bus_add_driver+0x1c0/0x200 [<8a265265>] driver_register+0x74/0x108 [] exynos_drm_init+0xb0/0x134 [] do_one_initcall+0x90/0x458 [<6da35917>] kernel_init_freeable+0x188/0x200 [] kernel_init+0x8/0x110 [<1f3cddf9>] ret_from_fork+0x14/0x20 [<8cd12507>] 0x0 unreferenced object 0xedeca000 (size 4096): comm "swapper/0", pid 1, jiffies 4294937900 (age 3127.400s) 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: [<3acd268d>] arch_setup_dma_ops+0x4c/0x104 [<9f7d2cce>] of_dma_configure+0x19c/0x3a4 [] really_probe+0xb0/0x47c [<4f510e4f>] driver_probe_device+0x78/0x1c4 [<7481a0cf>] device_driver_attach+0x58/0x60 [<0ff8f5c1>] __driver_attach+0xb8/0x158 [<86006144>] bus_for_each_dev+0x74/0xb4 [<10159dca>] bus_add_driver+0x1c0/0x200 [<8a265265>] driver_register+0x74/0x108 [] exynos_drm_init+0xb0/0x134 [] do_one_initcall+0x90/0x458 [<6da35917>] kernel_init_freeable+0x188/0x200 [] kernel_init+0x8/0x110 [<1f3cddf9>] ret_from_fork+0x14/0x20 [<8cd12507>] 0x0 unreferenced object 0xc214a300 (size 128): comm "swapper/0", pid 1, jiffies 4294937900 (age 3127.400s) hex dump (first 32 bytes): 00 a3 14 c2 00 a3 14 c2 00 40 18 c2 00 80 18 c2 .........@...... 02 00 02 00 ad 4e ad de ff ff ff ff ff ff ff ff .....N.......... backtrace: [<08cbd8bc>] iommu_domain_alloc+0x24/0x50 [] arm_iommu_create_mapping+0xe4/0x134 [<3acd268d>] arch_setup_dma_ops+0x4c/0x104 [<9f7d2cce>] of_dma_configure+0x19c/0x3a4 [] really_probe+0xb0/0x47c [<4f510e4f>] driver_probe_device+0x78/0x1c4 [<7481a0cf>] device_driver_attach+0x58/0x60 [<0ff8f5c1>] __driver_attach+0xb8/0x158 [<86006144>] bus_for_each_dev+0x74/0xb4 [<10159dca>] bus_add_driver+0x1c0/0x200 [<8a265265>] driver_register+0x74/0x108 [] exynos_drm_init+0xb0/0x134 [] do_one_initcall+0x90/0x458 [<6da35917>] kernel_init_freeable+0x188/0x200 [] kernel_init+0x8/0x110 [<1f3cddf9>] ret_from_fork+0x14/0x20 Signed-off-by: Marek Szyprowski Reviewed-by: Lukasz Luba Signed-off-by: Inki Dae commit 1d8006abaab4cb90f81add86e8d1bf9411add05a Author: Andrii Nakryiko Date: Mon Mar 9 15:40:17 2020 -0700 bpf: Fix cgroup ref leak in cgroup_bpf_inherit on out-of-memory There is no compensating cgroup_bpf_put() for each ancestor cgroup in cgroup_bpf_inherit(). If compute_effective_progs returns error, those cgroups won't be freed ever. Fix it by putting them in cleanup code path. Fixes: e10360f815ca ("bpf: cgroup: prevent out-of-order release of cgroup bpf") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Roman Gushchin Link: https://lore.kernel.org/bpf/20200309224017.1063297-1-andriin@fb.com commit 62039c30c19dcab96621e074aeeb90da7100def7 Author: Andrii Nakryiko Date: Mon Mar 9 15:27:55 2020 -0700 bpf: Initialize storage pointers to NULL to prevent freeing garbage pointer Local storage array isn't initialized, so if cgroup storage allocation fails for BPF_CGROUP_STORAGE_SHARED, error handling code will attempt to free uninitialized pointer for BPF_CGROUP_STORAGE_PERCPU storage type. Avoid this by always initializing storage pointers to NULLs. Fixes: 8bad74f9840f ("bpf: extend cgroup bpf core to allow multiple cgroup storage types") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200309222756.1018737-1-andriin@fb.com commit 2362059427494b9e318161f0447a10dc5513b2c3 Merge: a8015ded89ad 8e8ce08198de Author: David S. Miller Date: Mon Mar 9 19:08:43 2020 -0700 Merge tag 'batadv-net-for-davem-20200306' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here is a batman-adv bugfix: - Don't schedule OGM for disabled interface, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit a8015ded89ad740d21355470d41879c5bd82aab7 Author: Vladimir Oltean Date: Tue Mar 10 03:28:18 2020 +0200 net: mscc: ocelot: properly account for VLAN header length when setting MRU What the driver writes into MAC_MAXLEN_CFG does not actually represent VLAN_ETH_FRAME_LEN but instead ETH_FRAME_LEN + ETH_FCS_LEN. Yes they are numerically equal, but the difference is important, as the switch treats VLAN-tagged traffic specially and knows to increase the maximum accepted frame size automatically. So it is always wrong to account for VLAN in the MAC_MAXLEN_CFG register. Unconditionally increase the maximum allowed frame size for double-tagged traffic. Accounting for the additional length does not mean that the other VLAN membership checks aren't performed, so there's no harm done. Also, stop abusing the MTU name for configuring the MRU. There is no support for configuring the MRU on an interface at the moment. Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support") Fixes: fa914e9c4d94 ("net: mscc: ocelot: create a helper for changing the port MTU") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit afe207d80a61e4d6e7cfa0611a4af46d0ba95628 Author: Eric Dumazet Date: Mon Mar 9 18:22:58 2020 -0700 ipvlan: do not use cond_resched_rcu() in ipvlan_process_multicast() Commit e18b353f102e ("ipvlan: add cond_resched_rcu() while processing muticast backlog") added a cond_resched_rcu() in a loop using rcu protection to iterate over slaves. This is breaking rcu rules, so lets instead use cond_resched() at a point we can reschedule Fixes: e18b353f102e ("ipvlan: add cond_resched_rcu() while processing muticast backlog") Signed-off-by: Eric Dumazet Cc: Mahesh Bandewar Signed-off-by: David S. Miller commit 018d26fcd12a75fb9b5fe233762aa3f2f0854b88 Author: Dmitry Yakunin Date: Thu Mar 5 17:45:57 2020 +0300 cgroup, netclassid: periodically release file_lock on classid updating In our production environment we have faced with problem that updating classid in cgroup with heavy tasks cause long freeze of the file tables in this tasks. By heavy tasks we understand tasks with many threads and opened sockets (e.g. balancers). This freeze leads to an increase number of client timeouts. This patch implements following logic to fix this issue: аfter iterating 1000 file descriptors file table lock will be released thus providing a time gap for socket creation/deletion. Now update is non atomic and socket may be skipped using calls: dup2(oldfd, newfd); close(oldfd); But this case is not typical. Moreover before this patch skip is possible too by hiding socket fd in unix socket buffer. New sockets will be allocated with updated classid because cgroup state is updated before start of the file descriptors iteration. So in common cases this patch has no side effects. Signed-off-by: Dmitry Yakunin Reviewed-by: Konstantin Khlebnikov Signed-off-by: David S. Miller commit ce9a4186f9ac475c415ffd20348176a4ea366670 Author: Mahesh Bandewar Date: Mon Mar 9 15:57:07 2020 -0700 macvlan: add cond_resched() during multicast processing The Rx bound multicast packets are deferred to a workqueue and macvlan can also suffer from the same attack that was discovered by Syzbot for IPvlan. This solution is not as effective as in IPvlan. IPvlan defers all (Tx and Rx) multicast packet processing to a workqueue while macvlan does this way only for the Rx. This fix should address the Rx codition to certain extent. Tx is still suseptible. Tx multicast processing happens when .ndo_start_xmit is called, hence we cannot add cond_resched(). However, it's not that severe since the user which is generating / flooding will be affected the most. Fixes: 412ca1550cbe ("macvlan: Move broadcasts into a work queue") Signed-off-by: Mahesh Bandewar Signed-off-by: David S. Miller commit e18b353f102e371580f3f01dd47567a25acc3c1d Author: Mahesh Bandewar Date: Mon Mar 9 15:57:02 2020 -0700 ipvlan: add cond_resched_rcu() while processing muticast backlog If there are substantial number of slaves created as simulated by Syzbot, the backlog processing could take much longer and result into the issue found in the Syzbot report. INFO: rcu_sched detected stalls on CPUs/tasks: (detected by 1, t=10502 jiffies, g=5049, c=5048, q=752) All QSes seen, last rcu_sched kthread activity 10502 (4294965563-4294955061), jiffies_till_next_fqs=1, root ->qsmask 0x0 syz-executor.1 R running task on cpu 1 10984 11210 3866 0x30020008 179034491270 Call Trace: [] _sched_show_task kernel/sched/core.c:8063 [inline] [] _sched_show_task.cold+0x2fd/0x392 kernel/sched/core.c:8030 [] sched_show_task+0xb/0x10 kernel/sched/core.c:8073 [] print_other_cpu_stall kernel/rcu/tree.c:1577 [inline] [] check_cpu_stall kernel/rcu/tree.c:1695 [inline] [] __rcu_pending kernel/rcu/tree.c:3478 [inline] [] rcu_pending kernel/rcu/tree.c:3540 [inline] [] rcu_check_callbacks.cold+0xbb4/0xc29 kernel/rcu/tree.c:2876 [] update_process_times+0x32/0x80 kernel/time/timer.c:1635 [] tick_sched_handle+0xa0/0x180 kernel/time/tick-sched.c:161 [] tick_sched_timer+0x44/0x130 kernel/time/tick-sched.c:1193 [] __run_hrtimer kernel/time/hrtimer.c:1393 [inline] [] __hrtimer_run_queues+0x307/0xd90 kernel/time/hrtimer.c:1455 [] hrtimer_interrupt+0x2ea/0x730 kernel/time/hrtimer.c:1513 [] local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1031 [inline] [] smp_apic_timer_interrupt+0x144/0x5e0 arch/x86/kernel/apic/apic.c:1056 [] apic_timer_interrupt+0x8e/0xa0 arch/x86/entry/entry_64.S:778 RIP: 0010:do_raw_read_lock+0x22/0x80 kernel/locking/spinlock_debug.c:153 RSP: 0018:ffff8801dad07ab8 EFLAGS: 00000a02 ORIG_RAX: ffffffffffffff12 RAX: 0000000000000000 RBX: ffff8801c4135680 RCX: 0000000000000000 RDX: 1ffff10038826afe RSI: ffff88019d816bb8 RDI: ffff8801c41357f0 RBP: ffff8801dad07ac0 R08: 0000000000004b15 R09: 0000000000310273 R10: ffff88019d816bb8 R11: 0000000000000001 R12: ffff8801c41357e8 R13: 0000000000000000 R14: ffff8801cfb19850 R15: ffff8801cfb198b0 [] __raw_read_lock_bh include/linux/rwlock_api_smp.h:177 [inline] [] _raw_read_lock_bh+0x3e/0x50 kernel/locking/spinlock.c:240 [] ipv6_chk_mcast_addr+0x11a/0x6f0 net/ipv6/mcast.c:1006 [] ip6_mc_input+0x319/0x8e0 net/ipv6/ip6_input.c:482 [] dst_input include/net/dst.h:449 [inline] [] ip6_rcv_finish+0x408/0x610 net/ipv6/ip6_input.c:78 [] NF_HOOK include/linux/netfilter.h:292 [inline] [] NF_HOOK include/linux/netfilter.h:286 [inline] [] ipv6_rcv+0x10e/0x420 net/ipv6/ip6_input.c:278 [] __netif_receive_skb_one_core+0x12a/0x1f0 net/core/dev.c:5303 [] __netif_receive_skb+0x2c/0x1b0 net/core/dev.c:5417 [] process_backlog+0x216/0x6c0 net/core/dev.c:6243 [] napi_poll net/core/dev.c:6680 [inline] [] net_rx_action+0x47b/0xfb0 net/core/dev.c:6748 [] __do_softirq+0x2c8/0x99a kernel/softirq.c:317 [] invoke_softirq kernel/softirq.c:399 [inline] [] irq_exit+0x16a/0x1a0 kernel/softirq.c:439 [] exiting_irq arch/x86/include/asm/apic.h:561 [inline] [] smp_apic_timer_interrupt+0x165/0x5e0 arch/x86/kernel/apic/apic.c:1058 [] apic_timer_interrupt+0x8e/0xa0 arch/x86/entry/entry_64.S:778 RIP: 0010:__sanitizer_cov_trace_pc+0x26/0x50 kernel/kcov.c:102 RSP: 0018:ffff880196033bd8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff12 RAX: ffff88019d8161c0 RBX: 00000000ffffffff RCX: ffffc90003501000 RDX: 0000000000000002 RSI: ffffffff816236d1 RDI: 0000000000000005 RBP: ffff880196033bd8 R08: ffff88019d8161c0 R09: 0000000000000000 R10: 1ffff10032c067f0 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000080 R14: 0000000000000000 R15: 0000000000000000 [] do_futex+0x151/0x1d50 kernel/futex.c:3548 [] C_SYSC_futex kernel/futex_compat.c:201 [inline] [] compat_SyS_futex+0x270/0x3b0 kernel/futex_compat.c:175 [] do_syscall_32_irqs_on arch/x86/entry/common.c:353 [inline] [] do_fast_syscall_32+0x357/0xe1c arch/x86/entry/common.c:415 [] entry_SYSENTER_compat+0x8b/0x9d arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f23c69 RSP: 002b:00000000f5d1f12c EFLAGS: 00000282 ORIG_RAX: 00000000000000f0 RAX: ffffffffffffffda RBX: 000000000816af88 RCX: 0000000000000080 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000816af8c RBP: 00000000f5d1f228 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 rcu_sched kthread starved for 10502 jiffies! g5049 c5048 f0x2 RCU_GP_WAIT_FQS(3) ->state=0x0 ->cpu=1 rcu_sched R running task on cpu 1 13048 8 2 0x90000000 179099587640 Call Trace: [] context_switch+0x60f/0xa60 kernel/sched/core.c:3209 [] __schedule+0x5aa/0x1da0 kernel/sched/core.c:3934 [] schedule+0x8f/0x1b0 kernel/sched/core.c:4011 [] schedule_timeout+0x50d/0xee0 kernel/time/timer.c:1803 [] rcu_gp_kthread+0xda1/0x3b50 kernel/rcu/tree.c:2327 [] kthread+0x348/0x420 kernel/kthread.c:246 [] ret_from_fork+0x56/0x70 arch/x86/entry/entry_64.S:393 Fixes: ba35f8588f47 (“ipvlan: Defer multicast / broadcast processing to a work-queue”) Signed-off-by: Mahesh Bandewar Reported-by: syzbot Signed-off-by: David S. Miller commit ad8192767c9f9cf97da57b9ffcea70fb100febef Author: Mahesh Bandewar Date: Mon Mar 9 15:56:56 2020 -0700 ipvlan: don't deref eth hdr before checking it's set IPvlan in L3 mode discards outbound multicast packets but performs the check before ensuring the ether-header is set or not. This is an error that Eric found through code browsing. Fixes: 2ad7bf363841 (“ipvlan: Initial check-in of the IPVLAN driver.”) Signed-off-by: Mahesh Bandewar Reported-by: Eric Dumazet Signed-off-by: David S. Miller commit 4b1bd9db078f7d5332c8601a2f5bd43cf0458fd4 Author: Edward Cree Date: Mon Mar 9 18:16:24 2020 +0000 sfc: detach from cb_page in efx_copy_channel() It's a resource, not a parameter, so we can't copy it into the new channel's TX queues, otherwise aliasing will lead to resource- management bugs if the channel is subsequently torn down without being initialised. Before the Fixes:-tagged commit there was a similar bug with tsoh_page, but I'm not sure it's worth doing another fix for such old kernels. Fixes: e9117e5099ea ("sfc: Firmware-Assisted TSO version 2") Suggested-by: Derek Shute Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 30bb5572ce7a8710fa9ea720b6ecb382791c9800 Merge: d397a82b7cca 1091c8fce8aa Author: Linus Torvalds Date: Mon Mar 9 16:16:42 2020 -0700 Merge tag 'ktest-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest Pull Ktest fixes and clean ups from Steven Rostedt: - Make the default option oldconfig instead of randconfig (one too many times I lost my config because I left the build type out) - Add timeout to ssh sync to sync before reboot (prevents test hangs) - A couple of spelling fix patches * tag 'ktest-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest: Fix typos in ktest.pl ktest: Add timeout for ssh sync testing ktest: Make default build option oldconfig not randconfig ktest: Fix some typos in sample.conf commit d397a82b7ccaa4c4fe3e149ecb763dd6214abc93 Merge: 7de41b120bb7 31e43f31890c Author: Linus Torvalds Date: Mon Mar 9 16:12:20 2020 -0700 Merge tag 'mmc-v5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC host fixes from Ulf Hansson: - sdhci-msm: Silence warning about turning function into static - sdhci-pci-gli: Fix support for GL975x by enabling MSI interrupt * tag 'mmc-v5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-pci-gli: Enable MSI interrupt for GL975x mmc: sdhci-msm: Mark sdhci_msm_cqe_disable static commit 7de41b120bb7fbe83bb46e7585c7346d21b93585 Merge: 2c523b344dfa 6ae4edab2fbf Author: Linus Torvalds Date: Mon Mar 9 16:02:32 2020 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio fixes from Michael Tsirkin: "Some bug fixes all over the place" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_balloon: Adjust label in virtballoon_probe virtio-blk: improve virtqueue error to BLK_STS virtio-blk: fix hw_queue stopped on arbitrary error virtio_ring: Fix mem leak with vring_new_virtqueue() commit 10dab84caf400f2f5f8b010ebb0c7c4272ec5093 Author: Christian Brauner Date: Sun Mar 8 14:29:17 2020 +0100 pid: make ENOMEM return value more obvious The alloc_pid() codepath used to be simpler. With the introducation of the ability to choose specific pids in 49cb2fc42ce4 ("fork: extend clone3() to support setting a PID") it got more complex. It hasn't been super obvious that ENOMEM is returned when the pid namespace init process/child subreaper of the pid namespace has died. As can be seen from multiple attempts to improve this see e.g. [1] and most recently [2]. We regressed returning ENOMEM in [3] and [2] restored it. Let's add a comment on top explaining that this is historic and documented behavior and cannot easily be changed. [1]: 35f71bc0a09a ("fork: report pid reservation failure properly") [2]: b26ebfe12f34 ("pid: Fix error return value in some cases") [3]: 49cb2fc42ce4 ("fork: extend clone3() to support setting a PID") Signed-off-by: Christian Brauner commit 8d67743653dce5a0e7aa500fcccb237cde7ad88e Author: Thomas Gleixner Date: Sun Mar 8 19:07:17 2020 +0100 futex: Unbreak futex hashing The recent futex inode life time fix changed the ordering of the futex key union struct members, but forgot to adjust the hash function accordingly, As a result the hashing omits the leading 64bit and even hashes beyond the futex key causing a bad hash distribution which led to a ~100% performance regression. Hand in the futex key pointer instead of a random struct member and make the size calculation based of the struct offset. Fixes: 8019ad13ef7f ("futex: Fix inode life-time issue") Reported-by: Rong Chen Decoded-by: Linus Torvalds Signed-off-by: Thomas Gleixner Tested-by: Rong Chen Link: https://lkml.kernel.org/r/87h7yy90ve.fsf@nanos.tec.linutronix.de commit f1c2cd3f8fb959123a9beba18c0e8112dcb2e137 Author: Hawking Zhang Date: Wed Mar 4 17:03:48 2020 +0800 drm/amdgpu: correct ROM_INDEX/DATA offset for VEGA20 The ROMC_INDEX/DATA offset was changed to e4/e5 since from smuio_v11 (vega20/arcturus). Signed-off-by: Hawking Zhang Tested-by: Candice Li Reviewed-by: Candice Li Signed-off-by: Alex Deucher commit 1091c8fce8aa9c5abe1a73acab4bcaf58a729005 Author: Masanari Iida Date: Mon Mar 9 20:54:30 2020 +0900 ktest: Fix typos in ktest.pl This patch fixes multipe spelling typo found in ktest.pl. Link: http://lkml.kernel.org/r/20200309115430.57540-1-standby24x7@gmail.com Acked-by: Randy Dunlap Signed-off-by: Masanari Iida Signed-off-by: Steven Rostedt (VMware) commit 4d00fc477a2ce8b6d2b09fb34ef9fe9918e7d434 Author: Steven Rostedt (VMware) Date: Mon Mar 9 16:00:11 2020 -0400 ktest: Add timeout for ssh sync testing Before rebooting the box, a "ssh sync" is called to the test machine to see if it is alive or not. But if the test machine is in a partial state, that ssh may never actually finish, and the ktest test hangs. Add a 10 second timeout to the sync test, which will fail after 10 seconds and then cause the test to reboot the test machine. Cc: stable@vger.kernel.org Fixes: 6474ace999edd ("ktest.pl: Powercycle the box on reboot if no connection can be made") Signed-off-by: Steven Rostedt (VMware) commit 791dc9d6b3ca4291be6cfce7b9be468d61d7ed95 Author: Steven Rostedt (VMware) Date: Wed Nov 13 13:36:24 2019 -0500 ktest: Make default build option oldconfig not randconfig For the last time, I screwed up my ktest config file, and the build went into the default "randconfig", blowing away the .config that I had set up. The reason for the default randconfig was because when this was first written, I wanted to do a bunch of randconfigs. But as time progressed, ktest isn't about randconfig anymore, and because randconfig destroys the config in the build directory, it's a dangerous default to have. Use oldconfig as the default. Signed-off-by: Steven Rostedt (VMware) commit afbac6c500da7235e9767b99e3fe2369cf3618a4 Author: Masanari Iida Date: Mon Sep 30 21:49:25 2019 +0900 ktest: Fix some typos in sample.conf This patch fixes some spelling typo in sample.conf Link: http://lkml.kernel.org/r/20190930124925.20250-1-standby24x7@gmail.com Acked-by: Randy Dunlap Signed-off-by: Masanari Iida Signed-off-by: Steven Rostedt (VMware) commit d5349775c1726ce997b8eb4982cd85a01f1c8b42 Author: Martin Leung Date: Mon Feb 24 14:07:23 2020 -0500 drm/amd/display: update soc bb for nv14 [why] nv14 previously inherited soc bb from generic dcn 2, did not match watermark values according to memory team [how] add nv14 specific soc bb: copy nv2 generic that it was using from before, but changed num channels to 8 Signed-off-by: Martin Leung Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 661388f9b0004421b2ecdeac17248bd92a3bb818 Author: Masanari Iida Date: Mon Mar 9 19:43:56 2020 +0900 linux-next: DOC: RDS: Fix a typo in rds.txt This patch fix a spelling typo in rds.txt Signed-off-by: Masanari Iida Signed-off-by: David S. Miller commit 0c5220a3c1242c7a2451570ed5f5af69620aac75 Author: Arthur Demchenkov Date: Sun Mar 8 22:19:33 2020 +0300 ARM: dts: N900: fix onenand timings Commit a758f50f10cf ("mtd: onenand: omap2: Configure driver from DT") started using DT specified timings for GPMC, and as a result the OneNAND stopped working on N900 as we had wrong values in the DT. Fix by updating the values to bootloader timings that have been tested to be working on Nokia N900 with OneNAND manufacturers: Samsung, Numonyx. Fixes: a758f50f10cf ("mtd: onenand: omap2: Configure driver from DT") Signed-off-by: Arthur Demchenkov Tested-by: Merlijn Wajer Reviewed-by: Roger Quadros Signed-off-by: Tony Lindgren commit cfaf6051eccc7b8b2354f68c5125d2497b046052 Author: Tony Lindgren Date: Mon Mar 9 09:41:14 2020 -0700 bus: ti-sysc: Fix quirk flags for lcdc on am335x Commit adb72394e2ab ("ARM: OMAP2+: Drop legacy platform data for am3 lcdc") dropped legacy platform data but we never added the quirks for SWSUP_SIDLE and SWSUP_MSTANDBY for lcdc for ti-sysc driver. This breaks suspend/resume. Let's fix the issue by enabling the same quirks for ti-sysc driver as we had earlier with platform data. Fixes: adb72394e2ab ("ARM: OMAP2+: Drop legacy platform data for am3 lcdc") Fixes: 23731eac9848 ("bus: ti-sysc: Detect devices on am335x when DEBUG is enabled") Reported-by: Keerthy Cc: Jyri Sarha Cc: Keerthy Cc: Dave Gerlach Cc: Tero Kristo Tested-by: Dave Gerlach Signed-off-by: Tony Lindgren commit 1cada2f307665e208a486d7ac2294ed9a6f74a6f Author: Linus Walleij Date: Mon Mar 9 16:26:04 2020 +0100 pinctrl: qcom: Assign irq_eoi conditionally The hierarchical parts of MSM pinctrl/GPIO is only used when the device tree has a "wakeup-parent" as a phandle, but the .irq_eoi is anyway assigned leading to semantic problems on elder Qualcomm chipsets. When the drivers/mfd/qcom-pm8xxx.c driver calls chained_irq_exit() that call will in turn call chip->irq_eoi() which is set to irq_chip_eoi_parent() by default on a hierachical IRQ chip, and the parent is pinctrl-msm.c so that will in turn unconditionally call irq_chip_eoi_parent() again, but its parent is invalid so we get the following crash: Unnable to handle kernel NULL pointer dereference at virtual address 00000010 pgd = (ptrval) [00000010] *pgd=00000000 Internal error: Oops: 5 [#1] PREEMPT SMP ARM (...) PC is at irq_chip_eoi_parent+0x4/0x10 LR is at pm8xxx_irq_handler+0x1b4/0x2d8 If we solve this crash by avoiding to call up to irq_chip_eoi_parent(), the machine will hang and get reset by the watchdog, because of semantic issues, probably inside irq_chip. As a solution, just assign the .irq_eoi conditionally if we are actually using a wakeup parent. Cc: David Heidelberg Cc: Bjorn Andersson Cc: Lina Iyer Cc: Stephen Boyd Cc: stable@vger.kernel.org Fixes: e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy") Link: https://lore.kernel.org/r/20200306121221.1231296-1-linus.walleij@linaro.org Link: https://lore.kernel.org/r/20200309125207.571840-1-linus.walleij@linaro.org Link: https://lore.kernel.org/r/20200309152604.585112-1-linus.walleij@linaro.org Tested-by: David Heidelberg Acked-by: Marc Zyngier Signed-off-by: Linus Walleij commit 1efde2754275dbd9d11c6e0132a4f09facf297ab Author: Masami Hiramatsu Date: Fri Feb 28 00:42:01 2020 +0900 perf probe: Do not depend on dwfl_module_addrsym() Do not depend on dwfl_module_addrsym() because it can fail on user-space shared libraries. Actually, same bug was fixed by commit 664fee3dc379 ("perf probe: Do not use dwfl_module_addrsym if dwarf_diename finds symbol name"), but commit 07d369857808 ("perf probe: Fix wrong address verification) reverted to get actual symbol address from symtab. This fixes it again by getting symbol address from DIE, and only if the DIE has only address range, it uses dwfl_module_addrsym(). Fixes: 07d369857808 ("perf probe: Fix wrong address verification) Reported-by: Alexandre Ghiti Signed-off-by: Masami Hiramatsu Tested-by: Alexandre Ghiti Cc: Alexander Shishkin Cc: Greg Kroah-Hartman Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sasha Levin Link: http://lore.kernel.org/lkml/158281812176.476.14164573830975116234.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 6b8d68f1ce9266b05a55e93c62923ff51daae4c1 Author: Masami Hiramatsu Date: Fri Feb 28 16:57:42 2020 +0900 perf probe: Fix to delete multiple probe event When we put an event with multiple probes, perf-probe fails to delete with filters. This comes from a failure to list up the event name because of overwrapping its name. To fix this issue, skip to list up the event which has same name. Without this patch: # perf probe -l \* probe_perf:map__map_ip (on perf_sample__fprintf_brstackoff:21@ probe_perf:map__map_ip (on perf_sample__fprintf_brstackoff:25@ probe_perf:map__map_ip (on append_inlines:12@util/machine.c in probe_perf:map__map_ip (on unwind_entry:19@util/machine.c in / probe_perf:map__map_ip (on map__map_ip@util/map.h in /home/mhi probe_perf:map__map_ip (on map__map_ip@util/map.h in /home/mhi # perf probe -d \* "*" does not hit any event. Error: Failed to delete events. Reason: No such file or directory (Code: -2) With it: # perf probe -d \* Removed event: probe_perf:map__map_ip # Fixes: 72363540c009 ("perf probe: Support multiprobe event") Reported-by: Arnaldo Carvalho de Melo Reported-by: He Zhe Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/158287666197.16697.7514373548551863562.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 05e54e2386733dfdb62b6784b3d6e1b0bd9bb559 Author: Ian Rogers Date: Fri Mar 6 23:31:21 2020 -0800 perf parse-events: Fix reading of invalid memory in event parsing ADD_CONFIG_TERM accesses term->weak, however, in get_config_chgs this value is accessed outside of the list_for_each_entry and references invalid memory. Add an argument for ADD_CONFIG_TERM for weak and set it to false in the get_config_chgs case. This bug was cause by clang's address sanitizer and libfuzzer. It can be reproduced with a command line of: perf stat -a -e i/bs,tsc,L2/o Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: clang-built-linux@googlegroups.com Link: http://lore.kernel.org/lkml/20200307073121.203816-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit a7ffd416d80497f03d1f62c0b330cff76a86d5ad Author: Ilie Halip Date: Mon Mar 9 10:56:17 2020 +0200 perf python: Fix clang detection when using CC=clang-version Currently, the setup.py script detects the clang compiler only when invoked with CC=clang. But when using a specific version (e.g. CC=clang-11), this doesn't work correctly and wrong compiler flags are set, leading to build errors. To properly detect clang, invoke the compiler with -v and check the output. The first line should start with "clang version ...". Committer testing: $ make CC=clang-9 O=/tmp/build/perf -C tools/perf install-bin $ readelf -wi /tmp/build/perf/python/perf.cpython-37m-x86_64-linux-gnu.so | grep DW_AT_producer | head -1 DW_AT_producer : (indirect string, offset: 0x0): clang version 9.0.1 (Fedora 9.0.1-2.fc31) /usr/bin/clang-9 -Wno-unused-result -Wsign-compare -D DYNAMIC_ANNOTATIONS_ENABLED=1 -D NDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-command-line -m64 -mtune=generic -fasynchronous-unwind-tables -fcf-protection=full -D _GNU_SOURCE -fPIC -fwrapv -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wwrite-strings -Wformat -Wshadow -D HAVE_ARCH_X86_64_SUPPORT -I /tmp/build/perf/arch/x86/include/generated -D HAVE_SYSCALL_TABLE_SUPPORT -D HAVE_PERF_REGS_SUPPORT -D HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET -Werror -O3 -fno-omit-frame-pointer -ggdb3 -funwind-tables -Wall -Wextra -std=gnu99 -fstack-protector-all -D _FORTIFY_SOURCE=2 -D _LARGEFILE64_SOURCE -D _FILE_OFFSET_BITS=64 -D _GNU_SOURCE -I /home/acme/git/perf/tools/lib/perf/include -I /home/acme/git/perf/tools/perf/util/include -I /home/acme/git/perf/tools/perf/arch/x86/include -I /home/acme/git/perf/tools/include/ -I /home/acme/git/perf/tools/arch/x86/include/uapi -I /home/acme/git/perf/tools/include/uapi -I /home/acme/git/perf/tools/arch/x86/include/ -I /home/acme/git/perf/tools/arch/x86/ -I /tmp/build/perf//util -I /tmp/build/perf/ -I /home/acme/git/perf/tools/perf/util -I /home/acme/git/perf/tools/perf -I /home/acme/git/perf/tools/lib/ -D HAVE_PTHREAD_ATTR_SETAFFINITY_NP -D HAVE_PTHREAD_BARRIER -D HAVE_EVENTFD -D HAVE_GET_CURRENT_DIR_NAME -D HAVE_GETTID -D HAVE_DWARF_GETLOCATIONS_SUPPORT -D HAVE_GLIBC_SUPPORT -D HAVE_AIO_SUPPORT -D HAVE_SCHED_GETCPU_SUPPORT -D HAVE_SETNS_SUPPORT -D HAVE_LIBELF_SUPPORT -D HAVE_LIBELF_MMAP_SUPPORT -D HAVE_ELF_GETPHDRNUM_SUPPORT -D HAVE_GELF_GETNOTE_SUPPORT -D HAVE_ELF_GETSHDRSTRNDX_SUPPORT -D HAVE_DWARF_SUPPORT -D HAVE_LIBBPF_SUPPORT -D HAVE_BPF_PROLOGUE -D HAVE_SDT_EVENT -D HAVE_JITDUMP -D HAVE_DWARF_UNWIND_SUPPORT -D NO_LIBUNWIND_DEBUG_FRAME -D HAVE_LIBUNWIND_SUPPORT -D HAVE_LIBCRYPTO_SUPPORT -D HAVE_SLANG_SUPPORT -D HAVE_GTK2_SUPPORT -D NO_LIBPERL -D HAVE_TIMERFD_SUPPORT -D HAVE_LIBPYTHON_SUPPORT -D HAVE_CPLUS_DEMANGLE_SUPPORT -D HAVE_LIBBFD_SUPPORT -D HAVE_ZLIB_SUPPORT -D HAVE_LZMA_SUPPORT -D HAVE_ZSTD_SUPPORT -D HAVE_LIBCAP_SUPPORT -D HAVE_BACKTRACE_SUPPORT -D HAVE_LIBNUMA_SUPPORT -D HAVE_KVM_STAT_SUPPORT -D DISASM_FOUR_ARGS_SIGNATURE -D HAVE_LIBBABELTRACE_SUPPORT -D HAVE_AUXTRACE_SUPPORT -D HAVE_JVMTI_CMLR -I /tmp/build/perf/ -fPIC -I util/include -I /usr/include/python3.7m -c /home/acme/git/perf/tools/perf/util/python.c -o /tmp/build/perf/python_ext_build/tmp/home/acme/git/perf/tools/perf/util/python.o -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wwrite-strings -Wformat -Wshadow -D HAVE_ARCH_X86_64_SUPPORT -I /tmp/build/perf/arch/x86/include/generated -D HAVE_SYSCALL_TABLE_SUPPORT -D HAVE_PERF_REGS_SUPPORT -D HAVE_ARCH_REGS_QUERY_REGISTER_OFFSET -Werror -O3 -fno-omit-frame-pointer -ggdb3 -funwind-tables -Wall -Wextra -std=gnu99 -fstack-protector-all -D _FORTIFY_SOURCE=2 -D _LARGEFILE64_SOURCE -D _FILE_OFFSET_BITS=64 -D _GNU_SOURCE -I /home/acme/git/perf/tools/lib/perf/include -I /home/acme/git/perf/tools/perf/util/include -I /home/acme/git/perf/tools/perf/arch/x86/include -I /home/acme/git/perf/tools/include/ -I /home/acme/git/perf/tools/arch/x86/include/uapi -I /home/acme/git/perf/tools/include/uapi -I /home/acme/git/perf/tools/arch/x86/include/ -I /home/acme/git/perf/tools/arch/x86/ -I /tmp/build/perf//util -I /tmp/build/perf/ -I /home/acme/git/perf/tools/perf/util -I /home/acme/git/perf/tools/perf -I /home/acme/git/perf/tools/lib/ -D HAVE_PTHREAD_ATTR_SETAFFINITY_NP -D HAVE_PTHREAD_BARRIER -D HAVE_EVENTFD -D HAVE_GET_CURRENT_DIR_NAME -D HAVE_GETTID -D HAVE_DWARF_GETLOCATIONS_SUPPORT -D HAVE_GLIBC_SUPPORT -D HAVE_AIO_SUPPORT -D HAVE_SCHED_GETCPU_SUPPORT -D HAVE_SETNS_SUPPORT -D HAVE_LIBELF_SUPPORT -D HAVE_LIBELF_MMAP_SUPPORT -D HAVE_ELF_GETPHDRNUM_SUPPORT -D HAVE_GELF_GETNOTE_SUPPORT -D HAVE_ELF_GETSHDRSTRNDX_SUPPORT -D HAVE_DWARF_SUPPORT -D HAVE_LIBBPF_SUPPORT -D HAVE_BPF_PROLOGUE -D HAVE_SDT_EVENT -D HAVE_JITDUMP -D HAVE_DWARF_UNWIND_SUPPORT -D NO_LIBUNWIND_DEBUG_FRAME -D HAVE_LIBUNWIND_SUPPORT -D HAVE_LIBCRYPTO_SUPPORT -D HAVE_SLANG_SUPPORT -D HAVE_GTK2_SUPPORT -D NO_LIBPERL -D HAVE_TIMERFD_SUPPORT -D HAVE_LIBPYTHON_SUPPORT -D HAVE_CPLUS_DEMANGLE_SUPPORT -D HAVE_LIBBFD_SUPPORT -D HAVE_ZLIB_SUPPORT -D HAVE_LZMA_SUPPORT -D HAVE_ZSTD_SUPPORT -D HAVE_LIBCAP_SUPPORT -D HAVE_BACKTRACE_SUPPORT -D HAVE_LIBNUMA_SUPPORT -D HAVE_KVM_STAT_SUPPORT -D DISASM_FOUR_ARGS_SIGNATURE -D HAVE_LIBBABELTRACE_SUPPORT -D HAVE_AUXTRACE_SUPPORT -D HAVE_JVMTI_CMLR -I /tmp/build/perf/ -fno-strict-aliasing -Wno-write-strings -Wno-unused-parameter -Wno-redundant-decls $ And here is how tools/perf/util/setup.py checks if the used clang has options that the distro specific python extension building compiler defaults: if cc_is_clang: from distutils.sysconfig import get_config_vars vars = get_config_vars() for var in ('CFLAGS', 'OPT'): vars[var] = sub("-specs=[^ ]+", "", vars[var]) if not clang_has_option("-mcet"): vars[var] = sub("-mcet", "", vars[var]) if not clang_has_option("-fcf-protection"): vars[var] = sub("-fcf-protection", "", vars[var]) if not clang_has_option("-fstack-clash-protection"): vars[var] = sub("-fstack-clash-protection", "", vars[var]) if not clang_has_option("-fstack-protector-strong"): vars[var] = sub("-fstack-protector-strong", "", vars[var]) So "-fcf-protection=full" is used, clang-9 has this option and thus it was kept, the perf python extension was built with it and the build completed successfully. Link: https://github.com/ClangBuiltLinux/linux/issues/903 Signed-off-by: Ilie Halip Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Igor Lubashev Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: clang-built-linux@googlegroups.com Link: http://lore.kernel.org/lkml/20200309085618.14307-1-ilie.halip@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit d62e7fbea4951c124a24176da0c7bf3003ec53d4 Author: Mathias Kresin Date: Thu Mar 5 19:22:45 2020 +0100 pinctrl: falcon: fix syntax error Add the missing semicolon after of_node_put to get the file compiled. Fixes: f17d2f54d36d ("pinctrl: falcon: Add of_node_put() before return") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Mathias Kresin Link: https://lore.kernel.org/r/20200305182245.9636-1-dev@kresin.me Acked-by: Thomas Langer Signed-off-by: Linus Walleij commit f98371476f36359da2285d1807b43e5b17fd18de Author: Linus Walleij Date: Fri Mar 6 15:34:15 2020 +0100 pinctrl: qcom: ssbi-gpio: Fix fwspec parsing bug We are parsing SSBI gpios as fourcell fwspecs but they are twocell. Probably a simple copy-and-paste bug. Tested on the APQ8060 DragonBoard and after this ethernet and MMC card detection works again. Cc: Bjorn Andersson Cc: stable@vger.kernel.org Reviewed-by: Brian Masney Fixes: ae436fe81053 ("pinctrl: ssbi-gpio: convert to hierarchical IRQ helpers in gpio core") Link: https://lore.kernel.org/r/20200306143416.1476250-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij commit db2c549407d4a76563c579e4768f7d6d32afefba Author: disconnect3d Date: Mon Mar 9 11:48:53 2020 +0100 perf map: Fix off by one in strncpy() size argument This patch fixes an off-by-one error in strncpy size argument in tools/perf/util/map.c. The issue is that in: strncmp(filename, "/system/lib/", 11) the passed string literal: "/system/lib/" has 12 bytes (without the NULL byte) and the passed size argument is 11. As a result, the logic won't match the ending "/" byte and will pass filepaths that are stored in other directories e.g. "/system/libmalicious/bin" or just "/system/libmalicious". This functionality seems to be present only on Android. I assume the /system/ directory is only writable by the root user, so I don't think this bug has much (or any) security impact. Fixes: eca818369996 ("perf tools: Add automatic remapping of Android libraries") Signed-off-by: disconnect3d Cc: Alexander Shishkin Cc: Changbin Du Cc: Jiri Olsa Cc: John Keeping Cc: Mark Rutland Cc: Michael Lentine Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200309104855.3775-1-dominik.b.czarnota@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit f7d5f5655ef7e5d2a128f6696ac35256e83b119b Author: Thomas Bogendoerfer Date: Sat Mar 7 10:00:22 2020 +0100 MAINTAINERS: Correct MIPS patchwork URL MIPS patchwork lives on patchwork.kernel.org for quite some time. Signed-off-by: Thomas Bogendoerfer commit d683469b3c93d7e2afd39e6e1970f24700eb7a68 Author: Takashi Iwai Date: Mon Mar 9 10:59:22 2020 +0100 ALSA: line6: Fix endless MIDI read loop The MIDI input event parser of the LINE6 driver may enter into an endless loop when the unexpected data sequence is given, as it tries to continue the secondary bytes without termination. Also, when the input data is too short, the parser returns a negative error, while the caller doesn't handle it properly. This would lead to the unexpected behavior as well. This patch addresses those issues by checking the return value correctly and handling the one-byte event in the parser properly. The bug was reported by syzkaller. Reported-by: syzbot+cce32521ee0a824c21f7@syzkaller.appspotmail.com Cc: Link: https://lore.kernel.org/r/000000000000033087059f8f8fa3@google.com Link: https://lore.kernel.org/r/20200309095922.30269-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit f2ecf903ef06eb1bbbfa969db9889643d487e73a Author: Takashi Iwai Date: Mon Mar 9 09:21:48 2020 +0100 ALSA: pcm: oss: Avoid plugin buffer overflow Each OSS PCM plugins allocate its internal buffer per pre-calculation of the max buffer size through the chain of plugins (calling src_frames and dst_frames callbacks). This works for most plugins, but the rate plugin might behave incorrectly. The calculation in the rate plugin involves with the fractional position, i.e. it may vary depending on the input position. Since the buffer size pre-calculation is always done with the offset zero, it may return a shorter size than it might be; this may result in the out-of-bound access as spotted by fuzzer. This patch addresses those possible buffer overflow accesses by simply setting the upper limit per the given buffer size for each plugin before src_frames() and after dst_frames() calls. Reported-by: syzbot+e1fe9f44fb8ecf4fb5dd@syzkaller.appspotmail.com Cc: Link: https://lore.kernel.org/r/000000000000b25ea005a02bcf21@google.com Link: https://lore.kernel.org/r/20200309082148.19855-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 83f73c5bb7b9a9135173f0ba2b1aa00c06664ff9 Author: Dmitry Yakunin Date: Thu Mar 5 15:33:12 2020 +0300 inet_diag: return classid for all socket types In commit 1ec17dbd90f8 ("inet_diag: fix reporting cgroup classid and fallback to priority") croup classid reporting was fixed. But this works only for TCP sockets because for other socket types icsk parameter can be NULL and classid code path is skipped. This change moves classid handling to inet_diag_msg_attrs_fill() function. Also inet_diag_msg_attrs_size() helper was added and addends in nlmsg_new() were reordered to save order from inet_sk_diag_fill(). Fixes: 1ec17dbd90f8 ("inet_diag: fix reporting cgroup classid and fallback to priority") Signed-off-by: Dmitry Yakunin Reviewed-by: Konstantin Khlebnikov Signed-off-by: David S. Miller commit b723bd933980f4956dabc8a8d84b3e83be8d094c Author: Remi Pommarel Date: Sun Mar 8 10:25:56 2020 +0100 net: stmmac: dwmac1000: Disable ACS if enhanced descs are not used ACS (auto PAD/FCS stripping) removes FCS off 802.3 packets (LLC) so that there is no need to manually strip it for such packets. The enhanced DMA descriptors allow to flag LLC packets so that the receiving callback can use that to strip FCS manually or not. On the other hand, normal descriptors do not support that. Thus in order to not truncate LLC packet ACS should be disabled when using normal DMA descriptors. Fixes: 47dd7a540b8a0 ("net: add support for STMicroelectronics Ethernet controllers.") Signed-off-by: Remi Pommarel Signed-off-by: David S. Miller commit 17c25cafd4d3e74c83dce56b158843b19c40b414 Author: Eric Dumazet Date: Sat Mar 7 22:05:14 2020 -0800 gre: fix uninit-value in __iptunnel_pull_header syzbot found an interesting case of the kernel reading an uninit-value [1] Problem is in the handling of ETH_P_WCCP in gre_parse_header() We look at the byte following GRE options to eventually decide if the options are four bytes longer. Use skb_header_pointer() to not pull bytes if we found that no more bytes were needed. All callers of gre_parse_header() are properly using pskb_may_pull() anyway before proceeding to next header. [1] BUG: KMSAN: uninit-value in pskb_may_pull include/linux/skbuff.h:2303 [inline] BUG: KMSAN: uninit-value in __iptunnel_pull_header+0x30c/0xbd0 net/ipv4/ip_tunnel_core.c:94 CPU: 1 PID: 11784 Comm: syz-executor940 Not tainted 5.6.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x220 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215 pskb_may_pull include/linux/skbuff.h:2303 [inline] __iptunnel_pull_header+0x30c/0xbd0 net/ipv4/ip_tunnel_core.c:94 iptunnel_pull_header include/net/ip_tunnels.h:411 [inline] gre_rcv+0x15e/0x19c0 net/ipv6/ip6_gre.c:606 ip6_protocol_deliver_rcu+0x181b/0x22c0 net/ipv6/ip6_input.c:432 ip6_input_finish net/ipv6/ip6_input.c:473 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] ip6_input net/ipv6/ip6_input.c:482 [inline] ip6_mc_input+0xdf2/0x1460 net/ipv6/ip6_input.c:576 dst_input include/net/dst.h:442 [inline] ip6_rcv_finish net/ipv6/ip6_input.c:76 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] ipv6_rcv+0x683/0x710 net/ipv6/ip6_input.c:306 __netif_receive_skb_one_core net/core/dev.c:5198 [inline] __netif_receive_skb net/core/dev.c:5312 [inline] netif_receive_skb_internal net/core/dev.c:5402 [inline] netif_receive_skb+0x66b/0xf20 net/core/dev.c:5461 tun_rx_batched include/linux/skbuff.h:4321 [inline] tun_get_user+0x6aef/0x6f60 drivers/net/tun.c:1997 tun_chr_write_iter+0x1f2/0x360 drivers/net/tun.c:2026 call_write_iter include/linux/fs.h:1901 [inline] new_sync_write fs/read_write.c:483 [inline] __vfs_write+0xa5a/0xca0 fs/read_write.c:496 vfs_write+0x44a/0x8f0 fs/read_write.c:558 ksys_write+0x267/0x450 fs/read_write.c:611 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __ia32_sys_write+0xdb/0x120 fs/read_write.c:620 do_syscall_32_irqs_on arch/x86/entry/common.c:339 [inline] do_fast_syscall_32+0x3c7/0x6e0 arch/x86/entry/common.c:410 entry_SYSENTER_compat+0x68/0x77 arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f62d99 Code: 90 e8 0b 00 00 00 f3 90 0f ae e8 eb f9 8d 74 26 00 89 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000fffedb2c EFLAGS: 00000217 ORIG_RAX: 0000000000000004 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000020002580 RDX: 0000000000000fca RSI: 0000000000000036 RDI: 0000000000000004 RBP: 0000000000008914 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline] kmsan_internal_poison_shadow+0x66/0xd0 mm/kmsan/kmsan.c:127 kmsan_slab_alloc+0x8a/0xe0 mm/kmsan/kmsan_hooks.c:82 slab_alloc_node mm/slub.c:2793 [inline] __kmalloc_node_track_caller+0xb40/0x1200 mm/slub.c:4401 __kmalloc_reserve net/core/skbuff.c:142 [inline] __alloc_skb+0x2fd/0xac0 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1051 [inline] alloc_skb_with_frags+0x18c/0xa70 net/core/skbuff.c:5766 sock_alloc_send_pskb+0xada/0xc60 net/core/sock.c:2242 tun_alloc_skb drivers/net/tun.c:1529 [inline] tun_get_user+0x10ae/0x6f60 drivers/net/tun.c:1843 tun_chr_write_iter+0x1f2/0x360 drivers/net/tun.c:2026 call_write_iter include/linux/fs.h:1901 [inline] new_sync_write fs/read_write.c:483 [inline] __vfs_write+0xa5a/0xca0 fs/read_write.c:496 vfs_write+0x44a/0x8f0 fs/read_write.c:558 ksys_write+0x267/0x450 fs/read_write.c:611 __do_sys_write fs/read_write.c:623 [inline] __se_sys_write fs/read_write.c:620 [inline] __ia32_sys_write+0xdb/0x120 fs/read_write.c:620 do_syscall_32_irqs_on arch/x86/entry/common.c:339 [inline] do_fast_syscall_32+0x3c7/0x6e0 arch/x86/entry/common.c:410 entry_SYSENTER_compat+0x68/0x77 arch/x86/entry/entry_64_compat.S:139 Fixes: 95f5c64c3c13 ("gre: Move utility functions to common headers") Fixes: c54419321455 ("GRE: Refactor GRE tunneling code.") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 63aae7b17344d4b08a7d05cb07044de4c0f9dcc6 Author: Jiri Wiesner Date: Sat Mar 7 13:31:57 2020 +0100 ipvlan: do not add hardware address of master to its unicast filter list There is a problem when ipvlan slaves are created on a master device that is a vmxnet3 device (ipvlan in VMware guests). The vmxnet3 driver does not support unicast address filtering. When an ipvlan device is brought up in ipvlan_open(), the ipvlan driver calls dev_uc_add() to add the hardware address of the vmxnet3 master device to the unicast address list of the master device, phy_dev->uc. This inevitably leads to the vmxnet3 master device being forced into promiscuous mode by __dev_set_rx_mode(). Promiscuous mode is switched on the master despite the fact that there is still only one hardware address that the master device should use for filtering in order for the ipvlan device to be able to receive packets. The comment above struct net_device describes the uc_promisc member as a "counter, that indicates, that promiscuous mode has been enabled due to the need to listen to additional unicast addresses in a device that does not implement ndo_set_rx_mode()". Moreover, the design of ipvlan guarantees that only the hardware address of a master device, phy_dev->dev_addr, will be used to transmit and receive all packets from its ipvlan slaves. Thus, the unicast address list of the master device should not be modified by ipvlan_open() and ipvlan_stop() in order to make ipvlan a workable option on masters that do not support unicast address filtering. Fixes: 2ad7bf3638411 ("ipvlan: Initial check-in of the IPVLAN driver") Reported-by: Per Sundstrom Signed-off-by: Jiri Wiesner Reviewed-by: Eric Dumazet Acked-by: Mahesh Bandewar Signed-off-by: David S. Miller commit 805b13adde3964c78cba125a15527e88c19f87b3 Author: Jens Axboe Date: Sun Mar 8 20:07:28 2020 -0600 io_uring: ensure RCU callback ordering with rcu_barrier() After more careful studying, Paul informs me that we cannot rely on ordering of RCU callbacks in the way that the the tagged commit did. The current construct looks like this: void C(struct rcu_head *rhp) { do_something(rhp); call_rcu(&p->rh, B); } call_rcu(&p->rh, A); call_rcu(&p->rh, C); and we're relying on ordering between A and B, which isn't guaranteed. Make this explicit instead, and have a work item issue the rcu_barrier() to ensure that A has run before we manually execute B. While thorough testing never showed this issue, it's dependent on the per-cpu load in terms of RCU callbacks. The updated method simplifies the code as well, and eliminates the need to maintain an rcu_head in the fileset data. Fixes: c1e2148f8ecb ("io_uring: free fixed_file_data after RCU grace period") Reported-by: Paul E. McKenney Signed-off-by: Jens Axboe commit 2c523b344dfa65a3738e7039832044aa133c75fb Author: Linus Torvalds Date: Sun Mar 8 17:44:44 2020 -0700 Linux 5.6-rc5 commit 62790268e4eda1deaac93264af69ac95b4afdf96 Merge: efe582a137ed d4d89e25fc7b Author: Linus Torvalds Date: Sun Mar 8 17:36:22 2020 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Olof Johansson: "We've been accruing these for a couple of weeks, so the batch is a bit bigger than usual. Largest delta is due to a led-bl driver that is added -- there was a miscommunication before the merge window and the driver didn't make it in. Due to this, the platforms needing it regressed. At this point, it seemed easier to add the new driver than unwind the changes. Besides that, there are a handful of various fixes: - AMD tee memory leak fix - A handful of fixlets for i.MX SCU communication - A few maintainers woke up and realized DEBUG_FS had been missing for a while, so a few updates of that. ... and the usual collection of smaller fixes to various platforms" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (37 commits) ARM: socfpga_defconfig: Add back DEBUG_FS arm64: dts: socfpga: agilex: Fix gmac compatible ARM: bcm2835_defconfig: Explicitly restore CONFIG_DEBUG_FS arm64: dts: meson: fix gxm-khadas-vim2 wifi arm64: dts: meson-sm1-sei610: add missing interrupt-names ARM: meson: Drop unneeded select of COMMON_CLK ARM: dts: bcm2711: Add pcie0 alias ARM: dts: bcm283x: Add missing properties to the PWR LED tee: amdtee: fix memory leak in amdtee_open_session() ARM: OMAP2+: Fix compile if CONFIG_HAVE_ARM_SMCCC is not set arm: dts: dra76x: Fix mmc3 max-frequency ARM: dts: dra7: Add "dma-ranges" property to PCIe RC DT nodes bus: ti-sysc: Fix 1-wire reset quirk ARM: dts: r8a7779: Remove deprecated "renesas, rcar-sata" compatible value soc: imx-scu: Align imx sc msg structs to 4 firmware: imx: Align imx_sc_msg_req_cpu_start to 4 firmware: imx: scu-pd: Align imx sc msg structs to 4 firmware: imx: misc: Align imx sc msg structs to 4 firmware: imx: scu: Ensure sequential TX ARM: dts: imx7-colibri: Fix frequency for sd/mmc ... commit efe582a137eda93265d880494cb04370afd162f2 Merge: 378fee2e6b12 dfc6014e3b60 Author: Linus Torvalds Date: Sun Mar 8 17:33:52 2020 -0700 Merge tag 'edac_urgent-2020-03-08' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC fix from Borislav Petkov: "Error reporting fix for synopsys_edac: do not overwrite partial decoded error message (Sherry Sun)" * tag 'edac_urgent-2020-03-08' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/synopsys: Do not print an error with back-to-back snprintf() calls commit 10856d88f7653b42196ca5b2775bbc1f15122a58 Author: YueHaibing Date: Wed Mar 4 19:34:23 2020 +0800 iio: ping: set pa_laser_ping_cfg in of_ping_match pa_laser_ping_cfg should be set in of_ping_match instead of pa_ping_cfg. Fixes: 7bb501f49ddb ("iio: ping: add parallax ping sensors") Signed-off-by: YueHaibing Acked-by: Andreas Klinger Signed-off-by: Jonathan Cameron commit 016a8845f6da65b2203f102f192046fbb624e250 Author: Petr Štetiar Date: Thu Feb 27 17:27:34 2020 +0100 iio: chemical: sps30: fix missing triggered buffer dependency SPS30 uses triggered buffer, but the dependency is not specified in the Kconfig file. Fix this by selecting IIO_BUFFER and IIO_TRIGGERED_BUFFER config symbols. Cc: stable@vger.kernel.org Fixes: 232e0f6ddeae ("iio: chemical: add support for Sensirion SPS30 sensor") Signed-off-by: Petr Štetiar Signed-off-by: Jonathan Cameron commit e43d110cdc206b6df4dd438cd10c81d1da910aad Author: Wen-chien Jesse Sung Date: Mon Feb 24 17:54:26 2020 +0800 iio: st_sensors: remap SMO8840 to LIS2DH12 According to ST, the HID is for LIS2DH12. Fixes: 3d56e19815b3 ("iio: accel: st_accel: Add support for the SMO8840 ACPI id") Signed-off-by: Wen-chien Jesse Sung Tested-by: Hans de Goede Reviewed-by: Hans de Goede Cc: Signed-off-by: Jonathan Cameron commit 2ca5a8792d617b4035aacd0a8be527f667fbf912 Author: Tomas Novotny Date: Tue Feb 18 16:44:51 2020 +0100 iio: light: vcnl4000: update sampling periods for vcnl4040 Vishay has published a new version of "Designing the VCNL4200 Into an Application" application note in October 2019. The new version specifies that there is +-20% of part to part tolerance. Although the application note is related to vcnl4200, according to support the vcnl4040's "ASIC is quite similar to that one for the VCNL4200". So update the sampling periods (and comment), including the correct sampling period for proximity. Both sampling periods are lower. Users relying on the blocking behaviour of reading will get proximity measurements much earlier. Fixes: 5a441aade5b3 ("iio: light: vcnl4000 add support for the VCNL4040 proximity and light sensor") Reviewed-by: Guido Günther Tested-by: Guido Günther Signed-off-by: Tomas Novotny Cc: Signed-off-by: Jonathan Cameron commit b42aa97ed5f1169cfd37175ef388ea62ff2dcf43 Author: Tomas Novotny Date: Tue Feb 18 16:44:50 2020 +0100 iio: light: vcnl4000: update sampling periods for vcnl4200 Vishay has published a new version of "Designing the VCNL4200 Into an Application" application note in October 2019. The new version specifies that there is +-20% of part to part tolerance. This explains the drift seen during experiments. The proximity pulse width is also changed from 32us to 30us. According to the support, the tolerance also applies to ambient light. So update the sampling periods. As the reading is blocking, current users may notice slightly longer response time. Fixes: be38866fbb97 ("iio: vcnl4000: add support for VCNL4200") Reviewed-by: Guido Günther Signed-off-by: Tomas Novotny Cc: Signed-off-by: Jonathan Cameron commit cb2116ff97859d34fda6cb561ac654415f4c6230 Author: Alexandru Tachici Date: Wed Feb 19 16:31:12 2020 +0200 iio: accel: adxl372: Set iio_chan BE Data stored in the iio-buffer is BE and this should be specified in the iio_chan_spec struct. Fixes: f4f55ce38e5f8 ("iio:adxl372: Add FIFO and interrupts support") Signed-off-by: Alexandru Tachici Cc: Signed-off-by: Jonathan Cameron commit 378fee2e6b12f31ab3749e0aa4ed0a63be23e822 Merge: b34e5c13327e f0fe2c0f050d Author: Linus Torvalds Date: Sun Mar 8 10:49:44 2020 -0500 Merge tag 'char-misc-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fixes from Greg KH: "Here are four small char/misc driver fixes for reported issues for 5.6-rc5. These fixes are: - binder fix for a potential use-after-free problem found (took two tries to get it right) - interconnect core fix - altera-stapl driver fix All four of these have been in linux-next for a while with no reported issues" * tag 'char-misc-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: binder: prevent UAF for binderfs devices II interconnect: Handle memory allocation errors altera-stapl: altera_get_note: prevent write beyond end of 'key' binder: prevent UAF for binderfs devices commit b34e5c13327ef723362c88c43da176a439badeea Merge: cc432aee7d5a 77036165d8bc Author: Linus Torvalds Date: Sun Mar 8 10:39:40 2020 -0500 Merge tag 'driver-core-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core and debugfs fixes from Greg KH: "Here are four small driver core / debugfs patches for 5.6-rc3: - debugfs api cleanup now that all debugfs_create_regset32() callers have been fixed up. This was waiting until after the -rc1 merge as these fixes came in through different trees - driver core sync state fixes based on reports of minor issues found in the feature All of these have been in linux-next with no reported issues" * tag 'driver-core-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: driver core: Skip unnecessary work when device doesn't have sync_state() driver core: Add dev_has_sync_state() driver core: Call sync_state() even if supplier has no consumers debugfs: remove return value of debugfs_create_regset32() commit cc432aee7d5a5cd6c8ae4dd9f5bae56428d1fca2 Merge: fd3f6cc9806c 2b2e71fe6575 Author: Linus Torvalds Date: Sun Mar 8 10:35:04 2020 -0500 Merge tag 'tty-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are some small tty/serial fixes for 5.6-rc5 Just some small serial driver fixes, and a vt core fixup, full details are: - vt fixes for issues found by syzbot - serdev fix for Apple boxes - fsl_lpuart serial driver fixes - MAINTAINER update for incorrect serial files - new device ids for 8250_exar driver - mvebu-uart fix All of these have been in linux-next with no reported issues" * tag 'tty-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: serial: fsl_lpuart: free IDs allocated by IDA Revert "tty: serial: fsl_lpuart: drop EARLYCON_DECLARE" serdev: Fix detection of UART devices on Apple machines. MAINTAINERS: Add missed files related to Synopsys DesignWare UART serial: 8250_exar: add support for ACCES cards tty:serial:mvebu-uart:fix a wrong return vt: selection, push sel_lock up vt: selection, push console lock down commit fd3f6cc9806c2f10b886f3ad78c9e192fb1bffd9 Merge: 61a09258f2e5 19f3c1e98bd1 Author: Linus Torvalds Date: Sun Mar 8 10:32:23 2020 -0500 Merge tag 'usb-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY fixes from Greg KH: "Here are some small USB and PHY driver fixes for reported issues for 5.6-rc5. Included in here are: - phy driver fixes - new USB quirks - USB cdns3 gadget driver fixes - USB hub core fixes All of these have been in linux-next with no reported issues" * tag 'usb-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: dwc3: gadget: Update chain bit correctly when using sg list usb: core: port: do error out if usb_autopm_get_interface() fails usb: core: hub: do error out if usb_autopm_get_interface() fails usb: core: hub: fix unhandled return by employing a void function usb: storage: Add quirk for Samsung Fit flash usb: quirks: add NO_LPM quirk for Logitech Screen Share usb: usb251xb: fix regulator probe and error handling phy: allwinner: Fix GENMASK misuse usb: cdns3: gadget: toggle cycle bit before reset endpoint usb: cdns3: gadget: link trb should point to next request phy: mapphone-mdm6600: Fix timeouts by adding wake-up handling phy: brcm-sata: Correct MDIO operations for 40nm platforms phy: ti: gmii-sel: do not fail in case of gmii phy: ti: gmii-sel: fix set of copy-paste errors phy: core: Fix phy_get() to not return error on link creation failure phy: mapphone-mdm6600: Fix write timeouts with shorter GPIO toggle interval commit b26ebfe12f34f372cf041c6f801fa49c3fb382c5 Author: Corey Minyard Date: Fri Mar 6 11:23:14 2020 -0600 pid: Fix error return value in some cases Recent changes to alloc_pid() allow the pid number to be specified on the command line. If set_tid_size is set, then the code scanning the levels will hard-set retval to -EPERM, overriding it's previous -ENOMEM value. After the code scanning the levels, there are error returns that do not set retval, assuming it is still set to -ENOMEM. So set retval back to -ENOMEM after scanning the levels. Fixes: 49cb2fc42ce4 ("fork: extend clone3() to support setting a PID") Signed-off-by: Corey Minyard Acked-by: Christian Brauner Cc: Andrei Vagin Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Oleg Nesterov Cc: Adrian Reber Cc: # 5.5 Link: https://lore.kernel.org/r/20200306172314.12232-1-minyard@acm.org [christian.brauner@ubuntu.com: fixup commit message] Signed-off-by: Christian Brauner commit 6ae4edab2fbf86ec92fbf0a8f0c60b857d90d50f Author: Nathan Chancellor Date: Sat Feb 15 17:40:39 2020 -0700 virtio_balloon: Adjust label in virtballoon_probe Clang warns when CONFIG_BALLOON_COMPACTION is unset: ../drivers/virtio/virtio_balloon.c:963:1: warning: unused label 'out_del_vqs' [-Wunused-label] out_del_vqs: ^~~~~~~~~~~~ 1 warning generated. Move the label within the preprocessor block since it is only used when CONFIG_BALLOON_COMPACTION is set. Fixes: 1ad6f58ea936 ("virtio_balloon: Fix memory leaks on errors in virtballoon_probe()") Link: https://github.com/ClangBuiltLinux/linux/issues/886 Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20200216004039.23464-1-natechancellor@gmail.com Signed-off-by: Michael S. Tsirkin Reviewed-by: David Hildenbrand commit 3d973b2e9a625996ee997c7303cd793b9d197c65 Author: Halil Pasic Date: Thu Feb 13 13:37:28 2020 +0100 virtio-blk: improve virtqueue error to BLK_STS Let's change the mapping between virtqueue_add errors to BLK_STS statuses, so that -ENOSPC, which indicates virtqueue full is still mapped to BLK_STS_DEV_RESOURCE, but -ENOMEM which indicates non-device specific resource outage is mapped to BLK_STS_RESOURCE. Signed-off-by: Halil Pasic Link: https://lore.kernel.org/r/20200213123728.61216-3-pasic@linux.ibm.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi commit f5f6b95c72f7f8bb46eace8c5306c752d0133daa Author: Halil Pasic Date: Thu Feb 13 13:37:27 2020 +0100 virtio-blk: fix hw_queue stopped on arbitrary error Since nobody else is going to restart our hw_queue for us, the blk_mq_start_stopped_hw_queues() is in virtblk_done() is not sufficient necessarily sufficient to ensure that the queue will get started again. In case of global resource outage (-ENOMEM because mapping failure, because of swiotlb full) our virtqueue may be empty and we can get stuck with a stopped hw_queue. Let us not stop the queue on arbitrary errors, but only on -EONSPC which indicates a full virtqueue, where the hw_queue is guaranteed to get started by virtblk_done() before when it makes sense to carry on submitting requests. Let us also remove a stale comment. Signed-off-by: Halil Pasic Cc: Jens Axboe Fixes: f7728002c1c7 ("virtio_ring: fix return code on DMA mapping fails") Link: https://lore.kernel.org/r/20200213123728.61216-2-pasic@linux.ibm.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi commit f13f09a12cbd0c7b776e083c5d008b6c6a9c4e0b Author: Suman Anna Date: Mon Feb 24 15:26:43 2020 -0600 virtio_ring: Fix mem leak with vring_new_virtqueue() The functions vring_new_virtqueue() and __vring_new_virtqueue() are used with split rings, and any allocations within these functions are managed outside of the .we_own_ring flag. The commit cbeedb72b97a ("virtio_ring: allocate desc state for split ring separately") allocates the desc state within the __vring_new_virtqueue() but frees it only when the .we_own_ring flag is set. This leads to a memory leak when freeing such allocated virtqueues with the vring_del_virtqueue() function. Fix this by moving the desc_state free code outside the flag and only for split rings. Issue was discovered during testing with remoteproc and virtio_rpmsg. Fixes: cbeedb72b97a ("virtio_ring: allocate desc state for split ring separately") Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20200224212643.30672-1-s-anna@ti.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit d6c066fda90d578aacdf19771a027ed484a79825 Author: Vladis Dronov Date: Sun Mar 8 09:08:55 2020 +0100 efi: Add a sanity check to efivar_store_raw() Add a sanity check to efivar_store_raw() the same way efivar_{attr,size,data}_read() and efivar_show_raw() have it. Signed-off-by: Vladis Dronov Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Link: https://lore.kernel.org/r/20200305084041.24053-3-vdronov@redhat.com Link: https://lore.kernel.org/r/20200308080859.21568-25-ardb@kernel.org commit 286d3250c9d6437340203fb64938bea344729a0e Author: Vladis Dronov Date: Sun Mar 8 09:08:54 2020 +0100 efi: Fix a race and a buffer overflow while reading efivars via sysfs There is a race and a buffer overflow corrupting a kernel memory while reading an EFI variable with a size more than 1024 bytes via the older sysfs method. This happens because accessing struct efi_variable in efivar_{attr,size,data}_read() and friends is not protected from a concurrent access leading to a kernel memory corruption and, at best, to a crash. The race scenario is the following: CPU0: CPU1: efivar_attr_read() var->DataSize = 1024; efivar_entry_get(... &var->DataSize) down_interruptible(&efivars_lock) efivar_attr_read() // same EFI var var->DataSize = 1024; efivar_entry_get(... &var->DataSize) down_interruptible(&efivars_lock) virt_efi_get_variable() // returns EFI_BUFFER_TOO_SMALL but // var->DataSize is set to a real // var size more than 1024 bytes up(&efivars_lock) virt_efi_get_variable() // called with var->DataSize set // to a real var size, returns // successfully and overwrites // a 1024-bytes kernel buffer up(&efivars_lock) This can be reproduced by concurrent reading of an EFI variable which size is more than 1024 bytes: ts# for cpu in $(seq 0 $(nproc --ignore=1)); do ( taskset -c $cpu \ cat /sys/firmware/efi/vars/KEKDefault*/size & ) ; done Fix this by using a local variable for a var's data buffer size so it does not get overwritten. Fixes: e14ab23dde12b80d ("efivars: efivar_entry API") Reported-by: Bob Sanders and the LTP testsuite Signed-off-by: Vladis Dronov Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: Link: https://lore.kernel.org/r/20200305084041.24053-2-vdronov@redhat.com Link: https://lore.kernel.org/r/20200308080859.21568-24-ardb@kernel.org commit 2b4eae95c7361e0a147b838715c8baa1380a428f Author: Eric Biggers Date: Thu Mar 5 00:41:38 2020 -0800 fscrypt: don't evict dirty inodes after removing key After FS_IOC_REMOVE_ENCRYPTION_KEY removes a key, it syncs the filesystem and tries to get and put all inodes that were unlocked by the key so that unused inodes get evicted via fscrypt_drop_inode(). Normally, the inodes are all clean due to the sync. However, after the filesystem is sync'ed, userspace can modify and close one of the files. (Userspace is *supposed* to close the files before removing the key. But it doesn't always happen, and the kernel can't assume it.) This causes the inode to be dirtied and have i_count == 0. Then, fscrypt_drop_inode() failed to consider this case and indicated that the inode can be dropped, causing the write to be lost. On f2fs, other problems such as a filesystem freeze could occur due to the inode being freed while still on f2fs's dirty inode list. Fix this bug by making fscrypt_drop_inode() only drop clean inodes. I've written an xfstest which detects this bug on ext4, f2fs, and ubifs. Fixes: b1c0ec3599f4 ("fscrypt: add FS_IOC_REMOVE_ENCRYPTION_KEY ioctl") Cc: # v5.4+ Link: https://lore.kernel.org/r/20200305084138.653498-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 61a09258f2e5b48ad0605131cae9a33ce4d01a9d Merge: c20037652700 810dbc69087b Author: Linus Torvalds Date: Sat Mar 7 19:52:55 2020 -0600 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Nothing particularly exciting, some small ODP regressions from the mmu notifier rework, another bunch of syzkaller fixes, and a bug fix for a botched syzkaller fix in the first rc pull request. - Fix busted syzkaller fix in 'get_new_pps' - this turned out to crash on certain HW configurations - Bug fixes for various missed things in error unwinds - Add a missing rcu_read_lock annotation in hfi/qib - Fix two ODP related regressions from the recent mmu notifier changes - Several more syzkaller bugs in siw, RDMA netlink, verbs and iwcm - Revert an old patch in CMA as it is now shown to not be allocating port numbers properly" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/iwcm: Fix iwcm work deallocation RDMA/siw: Fix failure handling during device creation RDMA/nldev: Fix crash when set a QP to a new counter but QPN is missing RDMA/odp: Ensure the mm is still alive before creating an implicit child RDMA/core: Fix protection fault in ib_mr_pool_destroy IB/mlx5: Fix implicit ODP race IB/hfi1, qib: Ensure RCU is locked when accessing list RDMA/core: Fix pkey and port assignment in get_new_pps RMDA/cm: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen() RDMA/rw: Fix error flow during RDMA context initialization RDMA/core: Fix use of logical OR in get_new_pps Revert "RDMA/cma: Simplify rdma_resolve_addr() error flow" commit c20037652700024cffeb6b0f74306ce9b391248f Merge: 5dfcc13902bf f0e20b894350 Author: Linus Torvalds Date: Sat Mar 7 14:20:29 2020 -0600 Merge tag 'io_uring-5.6-2020-03-07' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Here are a few io_uring fixes that should go into this release. This contains: - Removal of (now) unused io_wq_flush() and associated flag (Pavel) - Fix cancelation lockup with linked timeouts (Pavel) - Fix for potential use-after-free when freeing percpu ref for fixed file sets - io-wq cancelation fixups (Pavel)" * tag 'io_uring-5.6-2020-03-07' of git://git.kernel.dk/linux-block: io_uring: fix lockup with timeouts io_uring: free fixed_file_data after RCU grace period io-wq: remove io_wq_flush and IO_WQ_WORK_INTERNAL io-wq: fix IO_WQ_WORK_NO_CANCEL cancellation commit 5dfcc13902bfb6d252b84e234bfc4cdba76c1069 Merge: 6f784a3179dc 14afc5936197 Author: Linus Torvalds Date: Sat Mar 7 14:14:38 2020 -0600 Merge tag 'block-5.6-2020-03-07' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Here are a few fixes that should go into this release. This contains: - Revert of a bad bcache patch from this merge window - Removed unused function (Daniel) - Fixup for the blktrace fix from Jan from this release (Cengiz) - Fix of deeper level bfqq overwrite in BFQ (Carlo)" * tag 'block-5.6-2020-03-07' of git://git.kernel.dk/linux-block: block, bfq: fix overwrite of bfq_group pointer in bfq_find_set_group() blktrace: fix dereference after null check Revert "bcache: ignore pending signals when creating gc and allocator thread" block: Remove used kblockd_schedule_work_on() commit 6f784a3179dce0d3e9ab5413766e2fd9631d3521 Merge: 9d588f636027 d171c45da874 Author: Linus Torvalds Date: Sat Mar 7 12:00:13 2020 -0600 Merge tag 'media/v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - a fix for the media controller links in both hantro driver and in v4l2-mem2mem core - some fixes for the pulse8-cec driver - vicodec: handle alpha channel for RGB32 formats, as it may be used - mc-entity.c: fix handling of pad flags * tag 'media/v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: hantro: Fix broken media controller links media: mc-entity.c: use & to check pad flags, not == media: v4l2-mem2mem.c: fix broken links media: vicodec: process all 4 components for RGB32 formats media: pulse8-cec: close serio in disconnect, not adap_free media: pulse8-cec: INIT_DELAYED_WORK was called too late commit f0e20b8943509d81200cef5e30af2adfddba0f5c Author: Pavel Begunkov Date: Sat Mar 7 01:15:22 2020 +0300 io_uring: fix lockup with timeouts There is a recipe to deadlock the kernel: submit a timeout sqe with a linked_timeout (e.g. test_single_link_timeout_ception() from liburing), and SIGKILL the process. Then, io_kill_timeouts() takes @ctx->completion_lock, but the timeout isn't flagged with REQ_F_COMP_LOCKED, and will try to double grab it during io_put_free() to cancel the linked timeout. Probably, the same can happen with another io_kill_timeout() call site, that is io_commit_cqring(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9d588f63602778716921bb638cda412cdeacabc8 Merge: 5236647adbae df057c914a9c Author: Linus Torvalds Date: Sat Mar 7 08:12:47 2020 -0600 Merge tag 's390-5.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix panic in gup_fast on large pud by providing an implementation of pud_write. This has been overlooked during migration to common gup code. - Fix unexpected write combining on PCI stores. * tag 's390-5.6-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/pci: Fix unexpected write combine on resource s390/mm: fix panic in gup_fast on large pud commit 5236647adbae2d4cfc11eda20a38e0a300b97e73 Merge: cbee7c8b4485 59bee45b9712 Author: Linus Torvalds Date: Sat Mar 7 08:10:34 2020 -0600 Merge tag 'powerpc-5.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Some more powerpc fixes for 5.6: - One fix for a recent regression to our breakpoint/watchpoint code. - Another fix for our KUAP support, this time a missing annotation in a rarely used path in signal handling. - A fix for our handling of a CPU feature that effects the PMU, when booting guests in some configurations. - A minor fix to our linker script to explicitly include the .BTF section. Thanks to: Christophe Leroy, Desnes A. Nunes do Rosario, Leonardo Bras, Naveen N. Rao, Ravi Bangoria, Stefan Berger" * tag 'powerpc-5.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm: Fix missing KUAP disable in flush_coherent_icache() powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems powerpc: Include .BTF section powerpc/watchpoint: Don't call dar_within_range() for Book3S commit cbee7c8b4485fb876895b82ddba19ae4e2e2d102 Merge: fa883d6afb15 4ab50af63d2e Author: Linus Torvalds Date: Sat Mar 7 08:04:54 2020 -0600 Merge tag 'for-linus-5.6b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Four fixes and a small cleanup patch: - two fixes by Dongli Zhang fixing races in the xenbus driver - two fixes by me fixing issues introduced in 5.6 - a small cleanup by Gustavo Silva replacing a zero-length array with a flexible-array" * tag 'for-linus-5.6b-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/blkfront: fix ring info addressing xen/xenbus: fix locking xenbus: req->err should be updated before req->state xenbus: req->body should be updated before req->state xen: Replace zero-length array with flexible-array member commit fa883d6afb158c3c9bf33262272da3b6f0489742 Merge: 676fc8de3193 186e28a18aeb Author: Linus Torvalds Date: Sat Mar 7 08:01:43 2020 -0600 Merge tag 'for-linus-2020-03-07' of gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux Pull thread fixes from Christian Brauner: "Here are a few hopefully uncontroversial fixes: - Use RCU_INIT_POINTER() when initializing rcu protected members in task_struct to fix sparse warnings. - Add pidfd_fdinfo_test binary to .gitignore file" * tag 'for-linus-2020-03-07' of gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux: selftests: pidfd: Add pidfd_fdinfo_test in .gitignore exit: Fix Sparse errors and warnings fork: Use RCU_INIT_POINTER() instead of rcu_access_pointer() commit 676fc8de319335b840934c57ec75bdbbf049b738 Merge: 63849c8f4107 5a56996b0f13 Author: Linus Torvalds Date: Sat Mar 7 07:59:30 2020 -0600 Merge tag 'sound-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "The regular "bump-in-the-middle" updates, containing mostly ASoC- related fixes at this time. All changes are reasonably small. A few entries are for ASoC and ALSA core parts (DAPM, PCM, topology) for followups of the recent changes and potential buffer overflow by snprintf(), while the rest are (both new and old) device-specific fixes for Intel, meson, tas2562, rt1015, as well as the usual HD-audio quirks" * tag 'sound-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (25 commits) ALSA: sgio2audio: Remove usage of dropped hw_params/hw_free functions ALSA: hda/realtek - Enable the headset of ASUS B9450FA with ALC294 ALSA: hda/realtek - Fix silent output on Gigabyte X570 Aorus Master ALSA: hda/realtek - Add Headset Button supported for ThinkPad X1 ALSA: hda/realtek - Add Headset Mic supported ASoC: wm8741: Fix typo in Kconfig prompt ASoC: stm32: sai: manage rebind issue ASoC: SOF: Fix snd_sof_ipc_stream_posn() ASoC: rt1015: modify pre-divider for sysclk ASoC: rt1015: add operation callback function for rt1015_dai[] ASoC: soc-component: tidyup snd_soc_pcm_component_sync_stop() ASoC: dapm: Correct DAPM handling of active widgets during shutdown ASoC: tas2562: Fix sample rate error message ASoC: Intel: Skylake: Fix available clock counter incrementation ASoC: soc-pcm/soc-compress: don't use snd_soc_dapm_stream_stop() ASoC: meson: g12a: add tohdmitx reset ASoC: pcm512x: Fix unbalanced regulator enable call in probe error path ASoC: soc-core: fix for_rtd_codec_dai_rollback() macro ASoC: topology: Fix memleak in soc_tplg_manifest_load() ASoC: topology: Fix memleak in soc_tplg_link_elems_load() ... commit 130ab8819d81bd96f1a71e8461a8f73edf1fbe82 Author: H. Nikolaus Schaller Date: Fri Mar 6 18:28:30 2020 +0100 MIPS: DTS: CI20: fix interrupt for pcf8563 RTC Interrupts should not be specified by interrupt line but by gpio parent and reference. Fixes: 73f2b940474d ("MIPS: CI20: DTS: Add I2C nodes") Cc: stable@vger.kernel.org Signed-off-by: H. Nikolaus Schaller Reviewed-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit e8d87a0b822d4b3d9a94a5da915f93aa1b674c93 Author: H. Nikolaus Schaller Date: Fri Mar 6 18:27:58 2020 +0100 MIPS: DTS: CI20: fix PMU definitions for ACT8600 There is a ACT8600 on the CI20 board and the bindings of the ACT8865 driver have changed without updating the CI20 device tree. Therefore the PMU can not be probed successfully and is running in power-on reset state. Fix DT to match the latest act8865-regulator bindings. Fixes: 73f2b940474d ("MIPS: CI20: DTS: Add I2C nodes") Cc: stable@vger.kernel.org Signed-off-by: H. Nikolaus Schaller Reviewed-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 798048f85093901f475d25b2ac8d9ea1bc6d471a Merge: b95b4d5ef061 441b62acd9c8 Author: Ingo Molnar Date: Sat Mar 7 08:29:55 2020 +0100 Merge tag 'perf-urgent-for-mingo-5.6-20200306' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: perf top: Tommi Rantala: - Fix stdio interface input handling with glibc 2.28+. perf bench: Tommi Rantala: - Restore thread count default to online CPU count in futex-wake bench. perf jevents: John Garry: - Fix leak of mapfile memory. perf diff: Nick Desaulniers: - Fix undefined string comparision spotted by clang's -Wstring-compare. misc: Ian Rogers: - Fix off-by 1 relative directory includes. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit aeaa925bff844d225f259215a250d2811e436499 Author: Jonathan Neuschäfer Date: Thu Mar 5 17:05:16 2020 +0100 rhashtable: Document the right function parameters rhashtable_lookup_get_insert_key doesn't have a parameter `data`. It does have a parameter `key`, however. Signed-off-by: Jonathan Neuschäfer Acked-by: Herbert Xu Signed-off-by: David S. Miller commit 5a56996b0f13b9a5db0ca60528d13c661d37377a Merge: 95dbf14b236f 3fb83cbee1de Author: Takashi Iwai Date: Sat Mar 7 07:24:36 2020 +0100 Merge tag 'asoc-fix-v5.6-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.6 More fixes that have arrived since the merge window, spread out all over. There's a few things like the operation callback addition for rt1015 and the meson reset addition which add small new bits of functionality to fix non-working systems, they're all very small and for parts of newly added functionality. commit 03138e2bf78b2e219b5f15b9bbd84e2d457e3b73 Author: Jakub Kicinski Date: Wed Mar 4 10:17:53 2020 -0800 MAINTAINERS: remove bouncing pkaustub@cisco.com from enic pkaustub@cisco.com is bouncing, remove it. Signed-off-by: Jakub Kicinski Acked-by: Christian Benvenuti Signed-off-by: David S. Miller commit e396ce5f4229388db5143fec0ec36af504bff12e Author: Shannon Nelson Date: Wed Mar 4 09:42:10 2020 -0800 ionic: fix vf op lock usage These are a couple of read locks that should be write locks. Fixes: fbb39807e9ae ("ionic: support sr-iov operations") Signed-off-by: Shannon Nelson Reviewed-by: Parav Pandit Signed-off-by: David S. Miller commit b7469e83d2add567e4e0b063963db185f3167cea Author: Eric Dumazet Date: Wed Mar 4 09:32:16 2020 -0800 bonding/alb: make sure arp header is pulled before accessing it Similar to commit 38f88c454042 ("bonding/alb: properly access headers in bond_alb_xmit()"), we need to make sure arp header was pulled in skb->head before blindly accessing it in rlb_arp_xmit(). Remove arp_pkt() private helper, since it is more readable/obvious to have the following construct back to back : if (!pskb_network_may_pull(skb, sizeof(*arp))) return NULL; arp = (struct arp_pkt *)skb_network_header(skb); syzbot reported : BUG: KMSAN: uninit-value in bond_slave_has_mac_rx include/net/bonding.h:704 [inline] BUG: KMSAN: uninit-value in rlb_arp_xmit drivers/net/bonding/bond_alb.c:662 [inline] BUG: KMSAN: uninit-value in bond_alb_xmit+0x575/0x25e0 drivers/net/bonding/bond_alb.c:1477 CPU: 0 PID: 12743 Comm: syz-executor.4 Not tainted 5.6.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x220 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215 bond_slave_has_mac_rx include/net/bonding.h:704 [inline] rlb_arp_xmit drivers/net/bonding/bond_alb.c:662 [inline] bond_alb_xmit+0x575/0x25e0 drivers/net/bonding/bond_alb.c:1477 __bond_start_xmit drivers/net/bonding/bond_main.c:4257 [inline] bond_start_xmit+0x85d/0x2f70 drivers/net/bonding/bond_main.c:4282 __netdev_start_xmit include/linux/netdevice.h:4524 [inline] netdev_start_xmit include/linux/netdevice.h:4538 [inline] xmit_one net/core/dev.c:3470 [inline] dev_hard_start_xmit+0x531/0xab0 net/core/dev.c:3486 __dev_queue_xmit+0x37de/0x4220 net/core/dev.c:4063 dev_queue_xmit+0x4b/0x60 net/core/dev.c:4096 packet_snd net/packet/af_packet.c:2967 [inline] packet_sendmsg+0x8347/0x93b0 net/packet/af_packet.c:2992 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] __sys_sendto+0xc1b/0xc50 net/socket.c:1998 __do_sys_sendto net/socket.c:2010 [inline] __se_sys_sendto+0x107/0x130 net/socket.c:2006 __x64_sys_sendto+0x6e/0x90 net/socket.c:2006 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45c479 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fc77ffbbc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007fc77ffbc6d4 RCX: 000000000045c479 RDX: 000000000000000e RSI: 00000000200004c0 RDI: 0000000000000003 RBP: 000000000076bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000a04 R14: 00000000004cc7b0 R15: 000000000076bf2c Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline] kmsan_internal_poison_shadow+0x66/0xd0 mm/kmsan/kmsan.c:127 kmsan_slab_alloc+0x8a/0xe0 mm/kmsan/kmsan_hooks.c:82 slab_alloc_node mm/slub.c:2793 [inline] __kmalloc_node_track_caller+0xb40/0x1200 mm/slub.c:4401 __kmalloc_reserve net/core/skbuff.c:142 [inline] __alloc_skb+0x2fd/0xac0 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1051 [inline] alloc_skb_with_frags+0x18c/0xa70 net/core/skbuff.c:5766 sock_alloc_send_pskb+0xada/0xc60 net/core/sock.c:2242 packet_alloc_skb net/packet/af_packet.c:2815 [inline] packet_snd net/packet/af_packet.c:2910 [inline] packet_sendmsg+0x66a0/0x93b0 net/packet/af_packet.c:2992 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] __sys_sendto+0xc1b/0xc50 net/socket.c:1998 __do_sys_sendto net/socket.c:2010 [inline] __se_sys_sendto+0x107/0x130 net/socket.c:2006 __x64_sys_sendto+0x6e/0x90 net/socket.c:2006 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Jay Vosburgh Cc: Veaceslav Falico Cc: Andy Gospodarek Signed-off-by: David S. Miller commit 172fd3eb3873103e5096fd71088cf85fe346f094 Merge: 357ddbb9bf48 3c68b8fffb48 Author: David S. Miller Date: Fri Mar 6 21:55:32 2020 -0800 Merge branch 'QorIQ-DPAA-FMan-erratum-A050385-workaround' Madalin Bucur says: ==================== QorIQ DPAA FMan erratum A050385 workaround Changes in v2: - added CONFIG_DPAA_ERRATUM_A050385 - removed unnecessary parenthesis - changed alignment defines to use only decimal values The patch set implements the workaround for FMan erratum A050385: FMAN DMA read or writes under heavy traffic load may cause FMAN internal resource leak; thus stopping further packet processing. To reproduce this issue when the workaround is not applied, one needs to ensure the FMan DMA transaction queue is already full when a transaction split occurs so the system must be under high traffic load (i.e. multiple ports at line rate). After the errata occurs, the traffic stops. The only SoC impacted by this is the LS1043A, the other ARM DPAA 1 SoC or the PPC DPAA 1 SoCs do not have this erratum. The FMAN internal queue can overflow when FMAN splits single read or write transactions into multiple smaller transactions such that more than 17 AXI transactions are in flight from FMAN to interconnect. When the FMAN internal queue overflows, it can stall further packet processing. The issue can occur with any one of the following three conditions: 1. FMAN AXI transaction crosses 4K address boundary (Errata A010022) 2. FMAN DMA address for an AXI transaction is not 16 byte aligned, i.e. the last 4 bits of an address are non-zero 3. Scatter Gather (SG) frames have more than one SG buffer in the SG list and any one of the buffers, except the last buffer in the SG list has data size that is not a multiple of 16 bytes, i.e., other than 16, 32, 48, 64, etc. With any one of the above three conditions present, there is likelihood of stalled FMAN packet processing, especially under stress with multiple ports injecting line-rate traffic. To avoid situations that stall FMAN packet processing, all of the above three conditions must be avoided; therefore, configure the system with the following rules: 1. Frame buffers must not span a 4KB address boundary, unless the frame start address is 256 byte aligned 2. All FMAN DMA start addresses (for example, BMAN buffer address, FD[address] + FD[offset]) are 16B aligned 3. SG table and buffer addresses are 16B aligned and the size of SG buffers are multiple of 16 bytes, except for the last SG buffer that can be of any size. Additional workaround notes: - Address alignment of 64 bytes is recommended for maximally efficient system bus transactions (although 16 byte alignment is sufficient to avoid the stall condition) - To support frame sizes that are larger than 4K bytes, there are two options: 1. Large single buffer frames that span a 4KB page boundary can be converted into SG frames to avoid transaction splits at the 4KB boundary, 2. Align the large single buffer to 256B address boundaries, ensure that the frame address plus offset is 256B aligned. - If software generated SG frames have buffers that are unaligned and with random non-multiple of 16 byte lengths, before transmitting such frames via FMAN, frames will need to be copied into a new single buffer or multiple buffer SG frame that is compliant with the three rules listed above. ==================== Signed-off-by: David S. Miller commit 3c68b8fffb48c0018c24e73c48f2bac768c6203e Author: Madalin Bucur Date: Wed Mar 4 18:04:28 2020 +0200 dpaa_eth: FMan erratum A050385 workaround Align buffers, data start, SG fragment length to avoid DMA splits. These changes prevent the A050385 erratum to manifest itself: FMAN DMA read or writes under heavy traffic load may cause FMAN internal resource leak; thus stopping further packet processing. The FMAN internal queue can overflow when FMAN splits single read or write transactions into multiple smaller transactions such that more than 17 AXI transactions are in flight from FMAN to interconnect. When the FMAN internal queue overflows, it can stall further packet processing. The issue can occur with any one of the following three conditions: 1. FMAN AXI transaction crosses 4K address boundary (Errata A010022) 2. FMAN DMA address for an AXI transaction is not 16 byte aligned, i.e. the last 4 bits of an address are non-zero 3. Scatter Gather (SG) frames have more than one SG buffer in the SG list and any one of the buffers, except the last buffer in the SG list has data size that is not a multiple of 16 bytes, i.e., other than 16, 32, 48, 64, etc. With any one of the above three conditions present, there is likelihood of stalled FMAN packet processing, especially under stress with multiple ports injecting line-rate traffic. To avoid situations that stall FMAN packet processing, all of the above three conditions must be avoided; therefore, configure the system with the following rules: 1. Frame buffers must not span a 4KB address boundary, unless the frame start address is 256 byte aligned 2. All FMAN DMA start addresses (for example, BMAN buffer address, FD[address] + FD[offset]) are 16B aligned 3. SG table and buffer addresses are 16B aligned and the size of SG buffers are multiple of 16 bytes, except for the last SG buffer that can be of any size. Additional workaround notes: - Address alignment of 64 bytes is recommended for maximally efficient system bus transactions (although 16 byte alignment is sufficient to avoid the stall condition) - To support frame sizes that are larger than 4K bytes, there are two options: 1. Large single buffer frames that span a 4KB page boundary can be converted into SG frames to avoid transaction splits at the 4KB boundary, 2. Align the large single buffer to 256B address boundaries, ensure that the frame address plus offset is 256B aligned. - If software generated SG frames have buffers that are unaligned and with random non-multiple of 16 byte lengths, before transmitting such frames via FMAN, frames will need to be copied into a new single buffer or multiple buffer SG frame that is compliant with the three rules listed above. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit b281f7b93b258ce1419043bbd898a29254d5c9c7 Author: Madalin Bucur Date: Wed Mar 4 18:04:27 2020 +0200 fsl/fman: detect FMan erratum A050385 Detect the presence of the A050385 erratum. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit b54d3900862374e1bb2846e6b39d79c896c0b200 Author: Madalin Bucur Date: Wed Mar 4 18:04:26 2020 +0200 arm64: dts: ls1043a: FMan erratum A050385 The LS1043A SoC is affected by the A050385 erratum stating that FMAN DMA read or writes under heavy traffic load may cause FMAN internal resource leak thus stopping further packet processing. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 26d5bb9e4c4b541c475751e015072eb2cbf70d15 Author: Madalin Bucur Date: Wed Mar 4 18:04:25 2020 +0200 dt-bindings: net: FMan erratum A050385 FMAN DMA read or writes under heavy traffic load may cause FMAN internal resource leak; thus stopping further packet processing. The FMAN internal queue can overflow when FMAN splits single read or write transactions into multiple smaller transactions such that more than 17 AXI transactions are in flight from FMAN to interconnect. When the FMAN internal queue overflows, it can stall further packet processing. The issue can occur with any one of the following three conditions: 1. FMAN AXI transaction crosses 4K address boundary (Errata A010022) 2. FMAN DMA address for an AXI transaction is not 16 byte aligned, i.e. the last 4 bits of an address are non-zero 3. Scatter Gather (SG) frames have more than one SG buffer in the SG list and any one of the buffers, except the last buffer in the SG list has data size that is not a multiple of 16 bytes, i.e., other than 16, 32, 48, 64, etc. With any one of the above three conditions present, there is likelihood of stalled FMAN packet processing, especially under stress with multiple ports injecting line-rate traffic. To avoid situations that stall FMAN packet processing, all of the above three conditions must be avoided; therefore, configure the system with the following rules: 1. Frame buffers must not span a 4KB address boundary, unless the frame start address is 256 byte aligned 2. All FMAN DMA start addresses (for example, BMAN buffer address, FD[address] + FD[offset]) are 16B aligned 3. SG table and buffer addresses are 16B aligned and the size of SG buffers are multiple of 16 bytes, except for the last SG buffer that can be of any size. Additional workaround notes: - Address alignment of 64 bytes is recommended for maximally efficient system bus transactions (although 16 byte alignment is sufficient to avoid the stall condition) - To support frame sizes that are larger than 4K bytes, there are two options: 1. Large single buffer frames that span a 4KB page boundary can be converted into SG frames to avoid transaction splits at the 4KB boundary, 2. Align the large single buffer to 256B address boundaries, ensure that the frame address plus offset is 256B aligned. - If software generated SG frames have buffers that are unaligned and with random non-multiple of 16 byte lengths, before transmitting such frames via FMAN, frames will need to be copied into a new single buffer or multiple buffer SG frame that is compliant with the three rules listed above. Signed-off-by: Madalin Bucur Signed-off-by: David S. Miller commit 357ddbb9bf4813e48f5aa7836b6606c05f6e5788 Merge: 2398e3991bda 6a42cefb25d8 Author: David S. Miller Date: Fri Mar 6 21:36:25 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) Patches to bump position index from sysctl seq_next, from Vasilin Averin. 2) Release flowtable hook from error path, from Florian Westphal. 3) Patches to add missing netlink attribute validation, from Jakub Kicinski. 4) Missing NFTA_CHAIN_FLAGS in nf_tables_fill_chain_info(). 5) Infinite loop in module autoload if extension is not available, from Florian Westphal. 6) Missing module ownership in inet/nat chain type definition. ==================== Signed-off-by: David S. Miller commit 63849c8f410717eb2e6662f3953ff674727303e7 Merge: 7e6582ef32f6 f3a60268f5ce Author: Linus Torvalds Date: Fri Mar 6 17:03:37 2020 -0600 Merge tag 'linux-kselftest-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest update from Shuah Khan: "This consists of a cleanup patch to undo changes to global .gitignore that added selftests/lkdtm objects and add them to a local selftests/lkdtm/.gitignore. Summary of Linus's comments on local vs. global gitignore scope: - Keep local gitignore patterns in local files. - Put only global gitignore patterns in the top-level gitignore file. Local scope keeps things much better separated. It also incidentally means that if a directory gets renamed, the gitignore file continues to work unless in the case of renaming the actual files themselves that are named in the gitignore" * tag 'linux-kselftest-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftest/lkdtm: Use local .gitignore commit da3289044833769188c0da945d2cec90af35e87e Author: Nick Reitemeyer Date: Sat Feb 15 15:41:55 2020 -0800 Input: tm2-touchkey - add support for Coreriver TC360 variant The Coreriver TouchCore 360 is like the midas board touchkey, but it is using a fixed regulator. Signed-off-by: Nick Reitemeyer Link: https://lore.kernel.org/r/20200121141525.3404-3-nick.reitemeyer@web.de Signed-off-by: Dmitry Torokhov commit 3c2c07b0068a0e07712b1dec1a6f35d1f91a27fe Author: Nick Reitemeyer Date: Sat Feb 15 15:41:19 2020 -0800 dt-bindings: input: add Coreriver TC360 binding Signed-off-by: Nick Reitemeyer Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200121141525.3404-2-nick.reitemeyer@web.de Signed-off-by: Dmitry Torokhov commit 574abf5676ac59c73d46556e3f04d4aa4b2bfa97 Author: Nick Reitemeyer Date: Sat Feb 15 15:40:36 2020 -0800 dt-bindings: vendor-prefixes: Add Coreriver vendor prefix Coreriver is a South Korean microcontroller manufacturer: http://coreriver.com Signed-off-by: Nick Reitemeyer Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200121141525.3404-1-nick.reitemeyer@web.de Signed-off-by: Dmitry Torokhov commit 7e6582ef32f6cbd55b9c752727847b0ee6710e78 Merge: 611d61f9ac99 af33d2433b03 Author: Linus Torvalds Date: Fri Mar 6 16:38:33 2020 -0600 Merge tag 'riscv-for-linus-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: "This contains a handful of fixes that I would like to target for 5.6: - A pair of fixes to module loading, which we hope solve the last of the issues with module text being loaded too sparsely for our call relocations. - A Kconfig fix that disallows selecting memory models not supported by NOMMU. - A series of Kconfig updates to ease selecting the drivers necessary to run on QEMU's virt platform. - DTS updates for SiFive's HiFive Unleashed. - A fix to our seccomp support that avoids mangling restartable syscalls" * tag 'riscv-for-linus-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: fix seccomp reject syscall code path riscv: dts: Add GPIO reboot method to HiFive Unleashed DTS file RISC-V: Select Goldfish RTC driver for QEMU virt machine RISC-V: Select SYSCON Reboot and Poweroff for QEMU virt machine RISC-V: Enable QEMU virt machine support in defconfigs RISC-V: Add kconfig option for QEMU virt machine riscv: Fix range looking for kernel image memblock riscv: Force flat memory model with no-mmu riscv: Change code model of module to medany to improve data accessing riscv: avoid the PIC offset of static percpu data in module beyond 2G limits commit 32cf3a610c35cb21e3157f4bbf29d89960e30a36 Author: Dan Carpenter Date: Fri Mar 6 11:50:51 2020 -0800 Input: raydium_i2c_ts - fix error codes in raydium_i2c_boot_trigger() These functions are supposed to return negative error codes but instead it returns true on failure and false on success. The error codes are eventually propagated back to user space. Fixes: 48a2b783483b ("Input: add Raydium I2C touchscreen driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200303101306.4potflz7na2nn3od@kili.mountain Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 611d61f9ac99dc9e1494473fb90117a960a89dfa Author: Jonathan Neuschäfer Date: Fri Mar 6 23:13:11 2020 +0100 parse-maintainers: Mark as executable This makes the script more convenient to run. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Linus Torvalds commit bdf1ea7ca8a9e6febdde32eec03e0a44f39a44ff Merge: 2f501bb1802d d2334a91a3b0 Author: Linus Torvalds Date: Fri Mar 6 16:11:34 2020 -0600 Merge tag 'devicetree-fixes-for-5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: "Another batch of DT fixes. I think this should be the last of it, but sending pull requests seems to cause people to send more fixes. Summary: - Fixes for warnings introduced by hierarchical PSCI binding changes - Fixes for broken doc references due to DT schema conversions - Several grammar and typo fixes - Fix a bunch of dtc warnings in examples" * tag 'devicetree-fixes-for-5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: arm: Fixup the DT bindings for hierarchical PSCI states dt-bindings: power: Extend nodename pattern for power-domain providers MAINTAINERS: update ALLWINNER CPUFREQ DRIVER entry dt-bindings: bus: Drop empty compatible string in example dt-bindings: power: Convert domain-idle-states bindings to json-schema dt-bindings: arm: Fix cpu compatibles in the hierarchical example for PSCI dt-bindings: arm: Correct links to idle states definitions dt-bindings: mfd: Fix typo in file name of twl-familly.txt dt-bindings: mfd: tps65910: Improve grammar dt-bindings: mfd: zii,rave-sp: Fix a typo ("onborad") dt-bindings: arm: fsl: fix APF6Dev compatible dt-bindings: Fix dtc warnings in examples docs: dt: fix several broken doc references docs: dt: fix several broken references due to renames MAINTAINERS: clean up PCIE DRIVER FOR CAVIUM THUNDERX commit 2f501bb1802dbbf1467e7999954588da31f635ad Merge: 30fe0d07fd7b 513dc792d606 Author: Linus Torvalds Date: Fri Mar 6 16:08:48 2020 -0600 Merge tag 'drm-fixes-2020-03-06-1' of git://anongit.freedesktop.org/drm/drm Pull vgacon fix from Daniel Vetter: "One vgacon input check for stable" * tag 'drm-fixes-2020-03-06-1' of git://anongit.freedesktop.org/drm/drm: vgacon: Fix a UAF in vgacon_invert_region commit 2f920c0f0e29268827c2894c6e8f237a78159718 Author: Gustavo A. R. Silva Date: Wed Feb 12 13:52:31 2020 -0600 auxdisplay: charlcd: replace zero-length array with flexible-array member The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Miguel Ojeda commit e8897e4fe8f27d407b1e00ee0410fd3ec396275c Author: Yangtao Li Date: Sun Dec 29 07:04:19 2019 +0000 auxdisplay: img-ascii-lcd: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Miguel Ojeda commit d568bbd2f872cdd1b605d8e6b9b9c719a0ebd306 Author: Krzysztof Kozlowski Date: Thu Nov 21 04:20:41 2019 +0100 auxdisplay: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Miguel Ojeda commit 30fe0d07fd7b27d41d9b31a224052cc4e910947a Merge: 0b25d458035d e7a04894c766 Author: Linus Torvalds Date: Fri Mar 6 14:56:46 2020 -0600 Merge tag 'for-5.6-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "One fixup for DIO when in use with the new checksums, a missed case where the checksum size was still assuming u32" * tag 'for-5.6-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix RAID direct I/O reads with alternate csums commit 0b25d458035d0ca6502e678874e2ccb2fa2ddc23 Merge: ae24a21bbd96 6d390e4b5d48 Author: Linus Torvalds Date: Fri Mar 6 14:55:27 2020 -0600 Merge tag 'filelock-v5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull file locking fixes from Jeff Layton: "Just a couple of late-breaking patches for the file locking code. The second patch (from yangerkun) fixes a rather nasty looking potential use-after-free that should go to stable. The other patch could technically wait for 5.7, but it's fairly innocuous so I figured we might as well take it" * tag 'filelock-v5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: locks: fix a potential use-after-free problem when wakeup a waiter fcntl: Distribute switch variables for initialization commit ae24a21bbd96a7a4a3e82890285255d7e86540f0 Merge: 43c63729c96f f9981d4f50b4 Author: Linus Torvalds Date: Fri Mar 6 14:50:16 2020 -0600 Merge tag 'spi-fix-v5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A selection of small fixes, mostly for drivers, that have arrived since the merge window. None of them are earth shattering in themselves but all useful for affected systems" * tag 'spi-fix-v5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spi_register_controller(): free bus id on error paths spi: bcm63xx-hsspi: Really keep pll clk enabled spi: atmel-quadspi: fix possible MMIO window size overrun spi/zynqmp: remove entry that causes a cs glitch spi: pxa2xx: Add CS control clock quirk spi: spidev: Fix CS polarity if GPIO descriptors are used spi: qup: call spi_qup_pm_resume_runtime before suspending spi: spi-omap2-mcspi: Support probe deferral for DMA channels spi: spi-omap2-mcspi: Handle DMA size restriction on AM65x commit 11a4a8f73b3ce71b32f36e9f1655f6ddf8f1732b Author: Miguel Ojeda Date: Fri Mar 6 21:50:00 2020 +0100 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 43c63729c96f06f97367edf680d42d634041fd6a Merge: 08e39fcb92b0 02fbabd5f4ed Author: Linus Torvalds Date: Fri Mar 6 14:48:30 2020 -0600 Merge tag 'regulator-fix-v5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A couple of small fixes, one for a minor issue in the stm32-vrefbuf driver and a documentation fix in the Qualcomm code" * tag 'regulator-fix-v5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: stm32-vrefbuf: fix a possible overshoot when re-enabling regulator: qcom_spmi: Fix docs for PM8004 commit 08e39fcb92b039189006566a97aa9565fe20fb83 Merge: c20c4a084a87 44f2f882909f Author: Linus Torvalds Date: Fri Mar 6 14:47:06 2020 -0600 Merge tag 'hwmon-for-v5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "Fix an error return in the adt7462 driver, bad voltage limits reported by the xdpe12284 driver, and a broken documentation reference in the adm1177 driver documentation" * tag 'hwmon-for-v5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (adt7462) Fix an error return in ADT7462_REG_VOLT() hwmon: (pmbus/xdpe12284) Add callback for vout limits conversion docs: adm1177: fix a broken reference commit c20c4a084a878df35a7e394a7e646f303b505eaf Merge: aeb542a1b5c5 9abd515a6e4a Author: Linus Torvalds Date: Fri Mar 6 14:35:47 2020 -0600 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Here are another three arm64 fixes for 5.6, all pretty minor. Main thing is fixing a silly bug in the fsl_imx8_ddr PMU driver where we would zero the counters when disabling them. - Fix misreporting of ASID limit when KPTI is enabled - Fix busted NULL pointer checks for GICC structure in ACPI PMU code - Avoid nobbling the "fsl_imx8_ddr" PMU counters when disabling them" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: context: Fix ASID limit in boot messages drivers/perf: arm_pmu_acpi: Fix incorrect checking of gicc pointer drivers/perf: fsl_imx8_ddr: Correct the CLEAR bit definition commit be40920fbf1003c38ccdc02b571e01a75d890c82 Author: Masami Hiramatsu Date: Sat Mar 7 03:32:58 2020 +0900 tools: Let O= makes handle a relative path with -C option When I tried to compile tools/perf from the top directory with the -C option, the O= option didn't work correctly if I passed a relative path: $ make O=BUILD -C tools/perf/ make: Entering directory '/home/mhiramat/ksrc/linux/tools/perf' BUILD: Doing 'make -j8' parallel build ../scripts/Makefile.include:4: *** O=/home/mhiramat/ksrc/linux/tools/perf/BUILD does not exist. Stop. make: *** [Makefile:70: all] Error 2 make: Leaving directory '/home/mhiramat/ksrc/linux/tools/perf' The O= directory existence check failed because the check script ran in the build target directory instead of the directory where I ran the make command. To fix that, once change directory to $(PWD) and check O= directory, since the PWD is set to where the make command runs. Fixes: c883122acc0d ("perf tools: Let O= makes handle relative paths") Reported-by: Randy Dunlap Signed-off-by: Masami Hiramatsu Cc: Andrew Morton Cc: Borislav Petkov Cc: Geert Uytterhoeven Cc: Jiri Olsa Cc: Masahiro Yamada Cc: Michal Marek Cc: Peter Zijlstra Cc: Sasha Levin Cc: Steven Rostedt (VMware) Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/158351957799.3363.15269768530697526765.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 513dc792d6060d5ef572e43852683097a8420f56 Author: Zhang Xiaoxu Date: Wed Mar 4 10:24:29 2020 +0800 vgacon: Fix a UAF in vgacon_invert_region When syzkaller tests, there is a UAF: BUG: KASan: use after free in vgacon_invert_region+0x9d/0x110 at addr ffff880000100000 Read of size 2 by task syz-executor.1/16489 page:ffffea0000004000 count:0 mapcount:-127 mapping: (null) index:0x0 page flags: 0xfffff00000000() page dumped because: kasan: bad access detected CPU: 1 PID: 16489 Comm: syz-executor.1 Not tainted Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.9.3-0-ge2fc41e-prebuilt.qemu-project.org 04/01/2014 Call Trace: [] dump_stack+0x1e/0x20 [] kasan_report+0x577/0x950 [] __asan_load2+0x62/0x80 [] vgacon_invert_region+0x9d/0x110 [] invert_screen+0xe5/0x470 [] set_selection+0x44b/0x12f0 [] tioclinux+0xee/0x490 [] vt_ioctl+0xff4/0x2670 [] tty_ioctl+0x46a/0x1a10 [] do_vfs_ioctl+0x5bd/0xc40 [] SyS_ioctl+0x132/0x170 [] system_call_fastpath+0x22/0x27 Memory state around the buggy address: ffff8800000fff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8800000fff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff880000100000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff It can be reproduce in the linux mainline by the program: #include #include #include #include #include #include #include #include struct tiocl_selection { unsigned short xs; /* X start */ unsigned short ys; /* Y start */ unsigned short xe; /* X end */ unsigned short ye; /* Y end */ unsigned short sel_mode; /* selection mode */ }; #define TIOCL_SETSEL 2 struct tiocl { unsigned char type; unsigned char pad; struct tiocl_selection sel; }; int main() { int fd = 0; const char *dev = "/dev/char/4:1"; struct vt_consize v = {0}; struct tiocl tioc = {0}; fd = open(dev, O_RDWR, 0); v.v_rows = 3346; ioctl(fd, VT_RESIZEX, &v); tioc.type = TIOCL_SETSEL; ioctl(fd, TIOCLINUX, &tioc); return 0; } When resize the screen, update the 'vc->vc_size_row' to the new_row_size, but when 'set_origin' in 'vgacon_set_origin', vgacon use 'vga_vram_base' for 'vc_origin' and 'vc_visible_origin', not 'vc_screenbuf'. It maybe smaller than 'vc_screenbuf'. When TIOCLINUX, use the new_row_size to calc the offset, it maybe larger than the vga_vram_size in vgacon driver, then bad access. Also, if set an larger screenbuf firstly, then set an more larger screenbuf, when copy old_origin to new_origin, a bad access may happen. So, If the screen size larger than vga_vram, resize screen should be failed. This alse fix CVE-2020-8649 and CVE-2020-8647. Linus pointed out that overflow checking seems absent. We're saved by the existing bounds checks in vc_do_resize() with rather strict limits: if (cols > VC_RESIZE_MAXCOL || lines > VC_RESIZE_MAXROW) return -EINVAL; Fixes: 0aec4867dca14 ("[PATCH] SVGATextMode fix") Reference: CVE-2020-8647 and CVE-2020-8649 Reported-by: Hulk Robot Signed-off-by: Zhang Xiaoxu [danvet: augment commit message to point out overflow safety] Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200304022429.37738-1-zhangxiaoxu5@huawei.com commit d2334a91a3b01dce4f290b4536fcfa4b9e923a3d Author: Ulf Hansson Date: Tue Mar 3 16:07:47 2020 +0100 dt-bindings: arm: Fixup the DT bindings for hierarchical PSCI states The hierarchical topology with power-domain should be described through child nodes, rather than as currently described in the PSCI root node. Fix this by adding a patternProperties with a corresponding reference to the power-domain DT binding. Additionally, update the example to conform to the new pattern, but also to the adjusted domain-idle-state DT binding. Fixes: a3f048b5424e ("dt: psci: Update DT bindings to support hierarchical PSCI states") Signed-off-by: Ulf Hansson [robh: Add missing allOf, tweak power-domain node name] Signed-off-by: Rob Herring commit 14ee09a05ed5b8b9121ca80958a06fdfc8c85d93 Author: Ulf Hansson Date: Tue Mar 3 16:07:46 2020 +0100 dt-bindings: power: Extend nodename pattern for power-domain providers The existing binding requires the nodename to have a '@', which is a bit limiting for the wider use case. Therefore, let's extend the pattern to allow either '@' or '-'. Fixes: a3f048b5424e ("dt: psci: Update DT bindings to support hierarchical PSCI states") Signed-off-by: Ulf Hansson [robh: drop example change] Signed-off-by: Rob Herring commit c1e2148f8ecb26863b899d402a823dab8e26efd1 Author: Jens Axboe Date: Wed Mar 4 07:25:50 2020 -0700 io_uring: free fixed_file_data after RCU grace period The percpu refcount protects this structure, and we can have an atomic switch in progress when exiting. This makes it unsafe to just free the struct normally, and can trigger the following KASAN warning: BUG: KASAN: use-after-free in percpu_ref_switch_to_atomic_rcu+0xfa/0x1b0 Read of size 1 at addr ffff888181a19a30 by task swapper/0/0 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.6.0-rc4+ #5747 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 Call Trace: dump_stack+0x76/0xa0 print_address_description.constprop.0+0x3b/0x60 ? percpu_ref_switch_to_atomic_rcu+0xfa/0x1b0 ? percpu_ref_switch_to_atomic_rcu+0xfa/0x1b0 __kasan_report.cold+0x1a/0x3d ? percpu_ref_switch_to_atomic_rcu+0xfa/0x1b0 percpu_ref_switch_to_atomic_rcu+0xfa/0x1b0 rcu_core+0x370/0x830 ? percpu_ref_exit+0x50/0x50 ? rcu_note_context_switch+0x7b0/0x7b0 ? run_rebalance_domains+0x11d/0x140 __do_softirq+0x10a/0x3e9 irq_exit+0xd5/0xe0 smp_apic_timer_interrupt+0x86/0x200 apic_timer_interrupt+0xf/0x20 RIP: 0010:default_idle+0x26/0x1f0 Fix this by punting the final exit and free of the struct to RCU, then we know that it's safe to do so. Jann suggested the approach of using a double rcu callback to achieve this. It's important that we do a nested call_rcu() callback, as otherwise the free could be ordered before the atomic switch, even if the latter was already queued. Reported-by: syzbot+e017e49c39ab484ac87a@syzkaller.appspotmail.com Suggested-by: Jann Horn Reviewed-by: Paul E. McKenney Signed-off-by: Jens Axboe commit 6a42cefb25d8bdc1b391f4a53c78c32164eea2dd Author: Pablo Neira Ayuso Date: Fri Mar 6 17:37:28 2020 +0100 netfilter: nft_chain_nat: inet family is missing module ownership Set owner to THIS_MODULE, otherwise the nft_chain_nat module might be removed while there are still inet/nat chains in place. [ 117.942096] BUG: unable to handle page fault for address: ffffffffa0d5e040 [ 117.942101] #PF: supervisor read access in kernel mode [ 117.942103] #PF: error_code(0x0000) - not-present page [ 117.942106] PGD 200c067 P4D 200c067 PUD 200d063 PMD 3dc909067 PTE 0 [ 117.942113] Oops: 0000 [#1] PREEMPT SMP PTI [ 117.942118] CPU: 3 PID: 27 Comm: kworker/3:0 Not tainted 5.6.0-rc3+ #348 [ 117.942133] Workqueue: events nf_tables_trans_destroy_work [nf_tables] [ 117.942145] RIP: 0010:nf_tables_chain_destroy.isra.0+0x94/0x15a [nf_tables] [ 117.942149] Code: f6 45 54 01 0f 84 d1 00 00 00 80 3b 05 74 44 48 8b 75 e8 48 c7 c7 72 be de a0 e8 56 e6 2d e0 48 8b 45 e8 48 c7 c7 7f be de a0 <48> 8b 30 e8 43 e6 2d e0 48 8b 45 e8 48 8b 40 10 48 85 c0 74 5b 8b [ 117.942152] RSP: 0018:ffffc9000015be10 EFLAGS: 00010292 [ 117.942155] RAX: ffffffffa0d5e040 RBX: ffff88840be87fc2 RCX: 0000000000000007 [ 117.942158] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffffffffa0debe7f [ 117.942160] RBP: ffff888403b54b50 R08: 0000000000001482 R09: 0000000000000004 [ 117.942162] R10: 0000000000000000 R11: 0000000000000001 R12: ffff8883eda7e540 [ 117.942164] R13: dead000000000122 R14: dead000000000100 R15: ffff888403b3db80 [ 117.942167] FS: 0000000000000000(0000) GS:ffff88840e4c0000(0000) knlGS:0000000000000000 [ 117.942169] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 117.942172] CR2: ffffffffa0d5e040 CR3: 00000003e4c52002 CR4: 00000000001606e0 [ 117.942174] Call Trace: [ 117.942188] nf_tables_trans_destroy_work.cold+0xd/0x12 [nf_tables] [ 117.942196] process_one_work+0x1d6/0x3b0 [ 117.942200] worker_thread+0x45/0x3c0 [ 117.942203] ? process_one_work+0x3b0/0x3b0 [ 117.942210] kthread+0x112/0x130 [ 117.942214] ? kthread_create_worker_on_cpu+0x40/0x40 [ 117.942221] ret_from_fork+0x35/0x40 nf_tables_chain_destroy() crashes on module_put() because the module is gone. Fixes: d164385ec572 ("netfilter: nat: add inet family nat support") Signed-off-by: Pablo Neira Ayuso commit 6d390e4b5d48ec03bb87e63cf0a2bff5f4e116da Author: yangerkun Date: Wed Mar 4 15:25:56 2020 +0800 locks: fix a potential use-after-free problem when wakeup a waiter '16306a61d3b7 ("fs/locks: always delete_block after waiting.")' add the logic to check waiter->fl_blocker without blocked_lock_lock. And it will trigger a UAF when we try to wakeup some waiter: Thread 1 has create a write flock a on file, and now thread 2 try to unlock and delete flock a, thread 3 try to add flock b on the same file. Thread2 Thread3 flock syscall(create flock b) ...flock_lock_inode_wait flock_lock_inode(will insert our fl_blocked_member list to flock a's fl_blocked_requests) sleep flock syscall(unlock) ...flock_lock_inode_wait locks_delete_lock_ctx ...__locks_wake_up_blocks __locks_delete_blocks( b->fl_blocker = NULL) ... break by a signal locks_delete_block b->fl_blocker == NULL && list_empty(&b->fl_blocked_requests) success, return directly locks_free_lock b wake_up(&b->fl_waiter) trigger UAF Fix it by remove this logic, and this patch may also fix CVE-2019-19769. Cc: stable@vger.kernel.org Fixes: 16306a61d3b7 ("fs/locks: always delete_block after waiting.") Signed-off-by: yangerkun Signed-off-by: Jeff Layton commit 14afc59361976c0ba39e3a9589c3eaa43ebc7e1d Author: Carlo Nonato Date: Fri Mar 6 13:27:31 2020 +0100 block, bfq: fix overwrite of bfq_group pointer in bfq_find_set_group() The bfq_find_set_group() function takes as input a blkcg (which represents a cgroup) and retrieves the corresponding bfq_group, then it updates the bfq internal group hierarchy (see comments inside the function for why this is needed) and finally it returns the bfq_group. In the hierarchy update cycle, the pointer holding the correct bfq_group that has to be returned is mistakenly used to traverse the hierarchy bottom to top, meaning that in each iteration it gets overwritten with the parent of the current group. Since the update cycle stops at root's children (depth = 2), the overwrite becomes a problem only if the blkcg describes a cgroup at a hierarchy level deeper than that (depth > 2). In this case the root's child that happens to be also an ancestor of the correct bfq_group is returned. The main consequence is that processes contained in a cgroup at depth greater than 2 are wrongly placed in the group described above by BFQ. This commits fixes this problem by using a different bfq_group pointer in the update cycle in order to avoid the overwrite of the variable holding the original group reference. Reported-by: Kwon Je Oh Signed-off-by: Carlo Nonato Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe commit cf7da891b624983ffadd6b97ef63a0def3e985ad Author: Mauro Carvalho Chehab Date: Tue Mar 3 16:50:33 2020 +0100 docs: dmaengine: provider.rst: get rid of some warnings Get rid of those warnings by adding extra blank lines: Documentation/driver-api/dmaengine/provider.rst:270: WARNING: Unexpected indentation. Documentation/driver-api/dmaengine/provider.rst:273: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/driver-api/dmaengine/provider.rst:288: WARNING: Unexpected indentation. Documentation/driver-api/dmaengine/provider.rst:290: WARNING: Block quote ends without a blank line; unexpected unindent. While here, use parenthesis after get_metadata_ptr/set_metadata_len, as, if some day someone adds a kerneldoc markup for those, it should automatically generate a cross-reference to them. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/62cf2a87b379a92c9c0e5a40c2ae8a138b01fe0a.1583250595.git.mchehab+huawei@kernel.org Signed-off-by: Vinod Koul commit 9352ed0165ff4313ab340c979446c3d64c531f7a Author: Luca Coelho Date: Fri Mar 6 15:16:27 2020 +0200 iwlwifi: cfg: use antenna diversity with all AX101 devices We were erroneously only setting the tx_with_siso_diversity flag in the Qu B-step configurations for AX101 devices, though we should do it on all configurations. Add the flag to the other two configurations, namely Qu C-step and QuZ. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200306151129.1cd986ef467c.Idc0b111475ae3d38b68ae062613c080b574e33e1@changeid commit ce19801ba75a902ab515dda03b57738c708d0781 Author: Ilan Peer Date: Fri Mar 6 15:16:26 2020 +0200 iwlwifi: mvm: Fix rate scale NSS configuration The TLC configuration did not take into consideration the station's SMPS configuration, and thus configured rates for 2 NSS even if static SMPS was reported by the station. Fix this. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200306151129.b4f940d13eca.Ieebfa889d08205a3a961ae0138fb5832e8a0f9c1@changeid commit 699b760bd29edba736590fffef7654cb079c753e Author: Luca Coelho Date: Fri Mar 6 15:16:25 2020 +0200 iwlwifi: dbg: don't abort if sending DBGC_SUSPEND_RESUME fails If the firmware is in a bad state or not initialized fully, sending the DBGC_SUSPEND_RESUME command fails but we can still collect logs. Instead of aborting the entire dump process, simply ignore the error. By removing the last callpoint that was checking the return value, we can also convert the function to return void. Signed-off-by: Luca Coelho Fixes: 576058330f2d ("iwlwifi: dbg: support debug recording suspend resume command") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200306151129.dcec37b2efd4.I8dcd190431d110a6a0e88095ce93591ccfb3d78d@changeid commit a5688e600e78f9fc68102bf0fe5c797fc2826abe Author: Mordechay Goodstein Date: Fri Mar 6 15:16:24 2020 +0200 iwlwifi: yoyo: don't add TLV offset when reading FIFOs The TLV offset is only used to read registers, while the offset used for the FIFO addresses are hard coded in the driver and not given by the TLV. If we try to apply the TLV offset when reading the FIFOs, we'll read from invalid addresses, causing the driver to hang. Signed-off-by: Mordechay Goodstein Fixes: 8d7dea25ada7 ("iwlwifi: dbg_ini: implement Rx fifos dump") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200306151129.fbab869c26fa.I4ddac20d02f9bce41855a816aa6855c89bc3874e@changeid commit 71bc0334a6371c7de0e0594439de7d237e4d2d03 Author: Luca Coelho Date: Fri Mar 6 15:16:23 2020 +0200 iwlwifi: check allocated pointer when allocating conf_tlvs We were erroneously checking the length of the tlv instead of checking the pointer returned by kmemdup() when allocating dbg_conf_tlv[]. This was probably a typo. Fix it by checking the returned pointer instead of the length. Reported-by: Markus Elfring Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200306151128.06e00e6e980f.I9a890ce83493b79892a5f690d12016525317fa7e@changeid commit cb377dfda1755b3bc01436755d866c8e5336a762 Author: Mordechay Goodstein Date: Fri Mar 6 15:16:22 2020 +0200 iwlwifi: consider HE capability when setting LDPC The AP may set the LDPC capability only in HE (IEEE80211_HE_PHY_CAP1), but we were checking it only in the HT capabilities. If we don't use this capability when required, the DSP gets the wrong configuration in HE and doesn't work properly. Signed-off-by: Mordechay Goodstein Fixes: befebbb30af0 ("iwlwifi: rs: consider LDPC capability in case of HE") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200306151128.492d167c1a25.I1ad1353dbbf6c99ae57814be750f41a1c9f7f4ac@changeid commit 089e5016d7eb063712063670e6da7c1a4de1a5c1 Author: Avraham Stern Date: Fri Mar 6 15:16:21 2020 +0200 iwlwifi: mvm: take the required lock when clearing time event data When receiving a session protection end notification, the time event data is cleared without holding the required lock. Fix it. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20200306151128.a49846a634e4.Id1ada7c5a964f5e25f4d0eacc2c4b050015b46a2@changeid commit aeb542a1b5c507ea117d21c3e3e012ba16f065ac Merge: b0b8a945ea29 140d7e88bb2a Author: Linus Torvalds Date: Fri Mar 6 07:18:36 2020 -0600 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "7 fixes" * emailed patches from Andrew Morton : arch/Kconfig: update HAVE_RELIABLE_STACKTRACE description mm, hotplug: fix page online with DEBUG_PAGEALLOC compiled but not enabled mm/z3fold.c: do not include rwlock.h directly fat: fix uninit-memory access for partial initialized inode mm: avoid data corruption on CoW fault into PFN-mapped VMA mm: fix possible PMD dirty bit lost in set_pmd_migration_entry() mm, numa: fix bad pmd by atomically check for pmd_trans_huge when marking page tables prot_numa commit 93e5fbb18cec70b3b5c614f67b65388829113bdd Author: Luke Nelson Date: Thu Mar 5 15:44:13 2020 -0800 selftests: bpf: Add test for JMP32 JSET BPF_X with upper bits set The existing tests attempt to check that JMP32 JSET ignores the upper bits in the operand registers. However, the tests missed one such bug in the x32 JIT that is only uncovered when a previous instruction pollutes the upper 32 bits of the registers. This patch adds a new test case that catches the bug by first executing a 64-bit JSET to pollute the upper 32-bits of the temporary registers, followed by a 32-bit JSET which should ignore the upper 32 bits. Co-developed-by: Xi Wang Signed-off-by: Xi Wang Signed-off-by: Luke Nelson Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200305234416.31597-2-luke.r.nels@gmail.com commit 80f1f85036355e5581ec0b99913410345ad3491b Author: Luke Nelson Date: Thu Mar 5 15:44:12 2020 -0800 bpf, x32: Fix bug with JMP32 JSET BPF_X checking upper bits The current x32 BPF JIT is incorrect for JMP32 JSET BPF_X when the upper 32 bits of operand registers are non-zero in certain situations. The problem is in the following code: case BPF_JMP | BPF_JSET | BPF_X: case BPF_JMP32 | BPF_JSET | BPF_X: ... /* and dreg_lo,sreg_lo */ EMIT2(0x23, add_2reg(0xC0, sreg_lo, dreg_lo)); /* and dreg_hi,sreg_hi */ EMIT2(0x23, add_2reg(0xC0, sreg_hi, dreg_hi)); /* or dreg_lo,dreg_hi */ EMIT2(0x09, add_2reg(0xC0, dreg_lo, dreg_hi)); This code checks the upper bits of the operand registers regardless if the BPF instruction is BPF_JMP32 or BPF_JMP64. Registers dreg_hi and dreg_lo are not loaded from the stack for BPF_JMP32, however, they can still be polluted with values from previous instructions. The following BPF program demonstrates the bug. The jset64 instruction loads the temporary registers and performs the jump, since ((u64)r7 & (u64)r8) is non-zero. The jset32 should _not_ be taken, as the lower 32 bits are all zero, however, the current JIT will take the branch due the pollution of temporary registers from the earlier jset64. mov64 r0, 0 ld64 r7, 0x8000000000000000 ld64 r8, 0x8000000000000000 jset64 r7, r8, 1 exit jset32 r7, r8, 1 mov64 r0, 2 exit The expected return value of this program is 2; under the buggy x32 JIT it returns 0. The fix is to skip using the upper 32 bits for jset32 and compare the upper 32 bits for jset64 only. All tests in test_bpf.ko and selftests/bpf/test_verifier continue to pass with this change. We found this bug using our automated verification tool, Serval. Fixes: 69f827eb6e14 ("x32: bpf: implement jitting of JMP32") Co-developed-by: Xi Wang Signed-off-by: Xi Wang Signed-off-by: Luke Nelson Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200305234416.31597-1-luke.r.nels@gmail.com commit 2b2e71fe657510a6f71aa16ef0309fa6bc20ab3d Author: Michael Walle Date: Tue Mar 3 18:42:59 2020 +0100 tty: serial: fsl_lpuart: free IDs allocated by IDA Since commit 3bc3206e1c0f ("serial: fsl_lpuart: Remove the alias node dependence") the port line number can also be allocated by IDA, but in case of an error the ID will no be removed again. More importantly, any ID will be freed in remove(), even if it wasn't allocated but instead fetched by of_alias_get_id(). If it was not allocated by IDA there will be a warning: WARN(1, "ida_free called for id=%d which is not allocated.\n", id); Move the ID allocation more to the end of the probe() so that we still can use plain return in the first error cases. Fixes: 3bc3206e1c0f ("serial: fsl_lpuart: Remove the alias node dependence") Signed-off-by: Michael Walle Cc: stable Link: https://lore.kernel.org/r/20200303174306.6015-3-michael@walle.cc Signed-off-by: Greg Kroah-Hartman commit 0e28ed6c9df986e937e488ec2a0c35bd4bb2a0af Author: Michael Walle Date: Tue Mar 3 18:42:58 2020 +0100 Revert "tty: serial: fsl_lpuart: drop EARLYCON_DECLARE" This reverts commit a659652f6169240a5818cb244b280c5a362ef5a4. This broke the earlycon on LS1021A processors because the order of the earlycon_setup() functions were changed. Before the commit the normal lpuart32_early_console_setup() was called. After the commit the lpuart32_imx_early_console_setup() is called instead. Fixes: a659652f6169 ("tty: serial: fsl_lpuart: drop EARLYCON_DECLARE") Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20200303174306.6015-2-michael@walle.cc Signed-off-by: Greg Kroah-Hartman commit 35d4670aaec7206b5ef19c842ca33076bde562e4 Author: Ronald Tschalär Date: Tue Feb 11 11:47:23 2020 -0800 serdev: Fix detection of UART devices on Apple machines. On Apple devices the _CRS method returns an empty resource template, and the resource settings are instead provided by the _DSM method. But commit 33364d63c75d6182fa369cea80315cf1bb0ee38e (serdev: Add ACPI devices by ResourceSource field) changed the search for serdev devices to require valid, non-empty resource template, thereby breaking Apple devices and causing bluetooth devices to not be found. This expands the check so that if we don't find a valid template, and we're on an Apple machine, then just check for the device being an immediate child of the controller and having a "baud" property. Cc: # 5.5 Fixes: 33364d63c75d ("serdev: Add ACPI devices by ResourceSource field") Signed-off-by: Ronald Tschalär Link: https://lore.kernel.org/r/20200211194723.486217-1-ronald@innovation.ch Signed-off-by: Greg Kroah-Hartman commit 140d7e88bb2ac4af7b0db1fd6302179440f3c4be Author: Miroslav Benes Date: Thu Mar 5 22:28:45 2020 -0800 arch/Kconfig: update HAVE_RELIABLE_STACKTRACE description save_stack_trace_tsk_reliable() is not the only function providing the reliable stack traces anymore. Architecture might define ARCH_STACKWALK which provides a newer stack walking interface and has arch_stack_walk_reliable() function. Update the description accordingly. Signed-off-by: Andrew Morton Signed-off-by: Miroslav Benes Acked-by: Josh Poimboeuf Link: http://lkml.kernel.org/r/20200120154042.9934-1-mbenes@suse.cz Signed-off-by: Linus Torvalds commit c87cbc1f007c4b46165f05ceca04e1973cda0b9c Author: Vlastimil Babka Date: Thu Mar 5 22:28:42 2020 -0800 mm, hotplug: fix page online with DEBUG_PAGEALLOC compiled but not enabled Commit cd02cf1aceea ("mm/hotplug: fix an imbalance with DEBUG_PAGEALLOC") fixed memory hotplug with debug_pagealloc enabled, where onlining a page goes through page freeing, which removes the direct mapping. Some arches don't like when the page is not mapped in the first place, so generic_online_page() maps it first. This is somewhat wasteful, but better than special casing page freeing fast paths. The commit however missed that DEBUG_PAGEALLOC configured doesn't mean it's actually enabled. One has to test debug_pagealloc_enabled() since 031bc5743f15 ("mm/debug-pagealloc: make debug-pagealloc boottime configurable"), or alternatively debug_pagealloc_enabled_static() since 8e57f8acbbd1 ("mm, debug_pagealloc: don't rely on static keys too early"), but this is not done. As a result, a s390 kernel with DEBUG_PAGEALLOC configured but not enabled will crash: Unable to handle kernel pointer dereference in virtual kernel address space Failing address: 0000000000000000 TEID: 0000000000000483 Fault in home space mode while using kernel ASCE. AS:0000001ece13400b R2:000003fff7fd000b R3:000003fff7fcc007 S:000003fff7fd7000 P:000000000000013d Oops: 0004 ilc:2 [#1] SMP CPU: 1 PID: 26015 Comm: chmem Kdump: loaded Tainted: GX 5.3.18-5-default #1 SLE15-SP2 (unreleased) Krnl PSW : 0704e00180000000 0000001ecd281b9e (__kernel_map_pages+0x166/0x188) 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: 0000000000000000 0000000000000800 0000400b00000000 0000000000000100 0000000000000001 0000000000000000 0000000000000002 0000000000000100 0000001ece139230 0000001ecdd98d40 0000400b00000100 0000000000000000 000003ffa17e4000 001fffe0114f7d08 0000001ecd4d93ea 001fffe0114f7b20 Krnl Code: 0000001ecd281b8e: ec17ffff00d8 ahik %r1,%r7,-1 0000001ecd281b94: ec111dbc0355 risbg %r1,%r1,29,188,3 >0000001ecd281b9e: 94fb5006 ni 6(%r5),251 0000001ecd281ba2: 41505008 la %r5,8(%r5) 0000001ecd281ba6: ec51fffc6064 cgrj %r5,%r1,6,1ecd281b9e 0000001ecd281bac: 1a07 ar %r0,%r7 0000001ecd281bae: ec03ff584076 crj %r0,%r3,4,1ecd281a5e Call Trace: [<0000001ecd281b9e>] __kernel_map_pages+0x166/0x188 [<0000001ecd4d9516>] online_pages_range+0xf6/0x128 [<0000001ecd2a8186>] walk_system_ram_range+0x7e/0xd8 [<0000001ecda28aae>] online_pages+0x2fe/0x3f0 [<0000001ecd7d02a6>] memory_subsys_online+0x8e/0xc0 [<0000001ecd7add42>] device_online+0x5a/0xc8 [<0000001ecd7d0430>] state_store+0x88/0x118 [<0000001ecd5b9f62>] kernfs_fop_write+0xc2/0x200 [<0000001ecd5064b6>] vfs_write+0x176/0x1e0 [<0000001ecd50676a>] ksys_write+0xa2/0x100 [<0000001ecda315d4>] system_call+0xd8/0x2c8 Fix this by checking debug_pagealloc_enabled_static() before calling kernel_map_pages(). Backports for kernel before 5.5 should use debug_pagealloc_enabled() instead. Also add comments. Fixes: cd02cf1aceea ("mm/hotplug: fix an imbalance with DEBUG_PAGEALLOC") Reported-by: Gerald Schaefer Signed-off-by: Andrew Morton Signed-off-by: Vlastimil Babka Reviewed-by: David Hildenbrand Cc: Cc: Joonsoo Kim Cc: Qian Cai Link: http://lkml.kernel.org/r/20200224094651.18257-1-vbabka@suse.cz Signed-off-by: Linus Torvalds commit a8198fedd94590ba28c1537440cdb260718ac13b Author: Sebastian Andrzej Siewior Date: Thu Mar 5 22:28:39 2020 -0800 mm/z3fold.c: do not include rwlock.h directly rwlock.h should not be included directly. Instead linux/splinlock.h should be included. One thing it does is to break the RT build. Signed-off-by: Andrew Morton Signed-off-by: Sebastian Andrzej Siewior Cc: Peter Zijlstra Cc: Vitaly Wool Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20200224133631.1510569-1-bigeasy@linutronix.de Signed-off-by: Linus Torvalds commit bc87302a093f0eab45cd4e250c2021299f712ec6 Author: OGAWA Hirofumi Date: Thu Mar 5 22:28:36 2020 -0800 fat: fix uninit-memory access for partial initialized inode When get an error in the middle of reading an inode, some fields in the inode might be still not initialized. And then the evict_inode path may access those fields via iput(). To fix, this makes sure that inode fields are initialized. Reported-by: syzbot+9d82b8de2992579da5d0@syzkaller.appspotmail.com Signed-off-by: Andrew Morton Signed-off-by: OGAWA Hirofumi Cc: Link: http://lkml.kernel.org/r/871rqnreqx.fsf@mail.parknet.co.jp Signed-off-by: Linus Torvalds commit c3e5ea6ee574ae5e845a40ac8198de1fb63bb3ab Author: Kirill A. Shutemov Date: Thu Mar 5 22:28:32 2020 -0800 mm: avoid data corruption on CoW fault into PFN-mapped VMA Jeff Moyer has reported that one of xfstests triggers a warning when run on DAX-enabled filesystem: WARNING: CPU: 76 PID: 51024 at mm/memory.c:2317 wp_page_copy+0xc40/0xd50 ... wp_page_copy+0x98c/0xd50 (unreliable) do_wp_page+0xd8/0xad0 __handle_mm_fault+0x748/0x1b90 handle_mm_fault+0x120/0x1f0 __do_page_fault+0x240/0xd70 do_page_fault+0x38/0xd0 handle_page_fault+0x10/0x30 The warning happens on failed __copy_from_user_inatomic() which tries to copy data into a CoW page. This happens because of race between MADV_DONTNEED and CoW page fault: CPU0 CPU1 handle_mm_fault() do_wp_page() wp_page_copy() do_wp_page() madvise(MADV_DONTNEED) zap_page_range() zap_pte_range() ptep_get_and_clear_full() __copy_from_user_inatomic() sees empty PTE and fails WARN_ON_ONCE(1) clear_page() The solution is to re-try __copy_from_user_inatomic() under PTL after checking that PTE is matches the orig_pte. The second copy attempt can still fail, like due to non-readable PTE, but there's nothing reasonable we can do about, except clearing the CoW page. Reported-by: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Kirill A. Shutemov Tested-by: Jeff Moyer Cc: Cc: Justin He Cc: Dan Williams Link: http://lkml.kernel.org/r/20200218154151.13349-1-kirill.shutemov@linux.intel.com Signed-off-by: Linus Torvalds commit 8a8683ad9ba48b4b52a57f013513d1635c1ca5c4 Author: Huang Ying Date: Thu Mar 5 22:28:29 2020 -0800 mm: fix possible PMD dirty bit lost in set_pmd_migration_entry() In set_pmd_migration_entry(), pmdp_invalidate() is used to change PMD atomically. But the PMD is read before that with an ordinary memory reading. If the THP (transparent huge page) is written between the PMD reading and pmdp_invalidate(), the PMD dirty bit may be lost, and cause data corruption. The race window is quite small, but still possible in theory, so need to be fixed. The race is fixed via using the return value of pmdp_invalidate() to get the original content of PMD, which is a read/modify/write atomic operation. So no THP writing can occur in between. The race has been introduced when the THP migration support is added in the commit 616b8371539a ("mm: thp: enable thp migration in generic path"). But this fix depends on the commit d52605d7cb30 ("mm: do not lose dirty and accessed bits in pmdp_invalidate()"). So it's easy to be backported after v4.16. But the race window is really small, so it may be fine not to backport the fix at all. Signed-off-by: Andrew Morton Signed-off-by: "Huang, Ying" Reviewed-by: Zi Yan Reviewed-by: William Kucharski Acked-by: Kirill A. Shutemov Cc: Cc: Vlastimil Babka Cc: Michal Hocko Cc: Andrea Arcangeli Link: http://lkml.kernel.org/r/20200220075220.2327056-1-ying.huang@intel.com Signed-off-by: Linus Torvalds commit 8b272b3cbbb50a6a8e62d8a15affd473a788e184 Author: Mel Gorman Date: Thu Mar 5 22:28:26 2020 -0800 mm, numa: fix bad pmd by atomically check for pmd_trans_huge when marking page tables prot_numa : A user reported a bug against a distribution kernel while running a : proprietary workload described as "memory intensive that is not swapping" : that is expected to apply to mainline kernels. The workload is : read/write/modifying ranges of memory and checking the contents. They : reported that within a few hours that a bad PMD would be reported followed : by a memory corruption where expected data was all zeros. A partial : report of the bad PMD looked like : : [ 5195.338482] ../mm/pgtable-generic.c:33: bad pmd ffff8888157ba008(000002e0396009e2) : [ 5195.341184] ------------[ cut here ]------------ : [ 5195.356880] kernel BUG at ../mm/pgtable-generic.c:35! : .... : [ 5195.410033] Call Trace: : [ 5195.410471] [] change_protection_range+0x7dd/0x930 : [ 5195.410716] [] change_prot_numa+0x18/0x30 : [ 5195.410918] [] task_numa_work+0x1fe/0x310 : [ 5195.411200] [] task_work_run+0x72/0x90 : [ 5195.411246] [] exit_to_usermode_loop+0x91/0xc2 : [ 5195.411494] [] prepare_exit_to_usermode+0x31/0x40 : [ 5195.411739] [] retint_user+0x8/0x10 : : Decoding revealed that the PMD was a valid prot_numa PMD and the bad PMD : was a false detection. The bug does not trigger if automatic NUMA : balancing or transparent huge pages is disabled. : : The bug is due a race in change_pmd_range between a pmd_trans_huge and : pmd_nond_or_clear_bad check without any locks held. During the : pmd_trans_huge check, a parallel protection update under lock can have : cleared the PMD and filled it with a prot_numa entry between the transhuge : check and the pmd_none_or_clear_bad check. : : While this could be fixed with heavy locking, it's only necessary to make : a copy of the PMD on the stack during change_pmd_range and avoid races. A : new helper is created for this as the check if quite subtle and the : existing similar helpful is not suitable. This passed 154 hours of : testing (usually triggers between 20 minutes and 24 hours) without : detecting bad PMDs or corruption. A basic test of an autonuma-intensive : workload showed no significant change in behaviour. Although Mel withdrew the patch on the face of LKML comment https://lkml.org/lkml/2017/4/10/922 the race window aforementioned is still open, and we have reports of Linpack test reporting bad residuals after the bad PMD warning is observed. In addition to that, bad rss-counter and non-zero pgtables assertions are triggered on mm teardown for the task hitting the bad PMD. host kernel: mm/pgtable-generic.c:40: bad pmd 00000000b3152f68(8000000d2d2008e7) .... host kernel: BUG: Bad rss-counter state mm:00000000b583043d idx:1 val:512 host kernel: BUG: non-zero pgtables_bytes on freeing mm: 4096 The issue is observed on a v4.18-based distribution kernel, but the race window is expected to be applicable to mainline kernels, as well. [akpm@linux-foundation.org: fix comment typo, per Rafael] Signed-off-by: Andrew Morton Signed-off-by: Rafael Aquini Signed-off-by: Mel Gorman Cc: Cc: Zi Yan Cc: "Kirill A. Shutemov" Cc: Vlastimil Babka Cc: Michal Hocko Link: http://lkml.kernel.org/r/20200216191800.22423-1-aquini@redhat.com Signed-off-by: Linus Torvalds commit b0b8a945ea29166706611820e609bce23e278f6b Merge: fe67d1821fa8 7589238a8cf3 Author: Linus Torvalds Date: Fri Mar 6 06:50:26 2020 -0600 Merge tag 'devprop-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework fix from Rafael Wysocki: "Revert a problematic commit from the 5.3 development cycle (Brendan Higgins)" * tag 'devprop-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "software node: Simplify software_node_release() function" commit fe67d1821fa8cd9856fc5e65d53ef73b450fa7d8 Merge: ba0ae9ac4607 86dfa5bec249 Author: Linus Torvalds Date: Fri Mar 6 06:49:09 2020 -0600 Merge tag 'acpi-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI documentation fix from Rafael Wysocki: "Fix Sphinx format warinings in an ACPI fan document added recently (Randy Dunlap)" * tag 'acpi-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Documentation/admin-guide/acpi: fix fan_performance_states.rst warnings commit ba0ae9ac46078c53adbb4485adbb3df779228287 Merge: 9f65ed5fe41c 2ac4853e295b Author: Linus Torvalds Date: Fri Mar 6 06:45:20 2020 -0600 Merge tag 'drm-fixes-2020-03-06' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Weekly fixes round, looks like a few people woke up, got a bunch of fixes across the drivers. Bit bigger than I'd like but they all seem fine and hopefully it quiets down now. sun4i, kirin, mediatek and exynos on the ARM side. virtio-gpu and core have some mmap fixes, and there is a dma-buf leak. one ttm fence leak is also fixed. Otherwise it's mostly amdgpu and i915. One of the i915 fixes is for a very long latency I was seeing (using latencytop) running gnome-shell locally when using firefox and eating nearly all my RAM, it really helps with desktop responsiveness esp when firefox is chewing a lot. dma-buf: - fix memory leak core: - shmem object mmap fix. ttm: - Fix fence leak in ttm_buffer_object_transfer(). amdgpu: - Gfx reset fix for gfx9, 10 - Fix for gfx10 - DP MST fix - DCC fix - Renoir power fixes - Navi power fix i915: - Break up long lists of object reclaim with cond_resched() - PSR probe fix - TGL workarounds - Selftest return value fix - Drop timeline mutex while waiting for retirement - Wait for OA configuration completion before writes to OA buffer virtio: - Fix resource id creation race in virtio. - mmap fixes sun4i: - Fixes for sun4i VI layer format support. kirin: - kirin: Revert "Fix for hikey620 display offset problem" exynos: - fix a kernel oops problem in case that driver is loaded as module. - fix a regulator warning issue when I2C DDC adapter cannot be gathered. - print out an error message only in error case excepting -EPROBE_DEFER. mediatek: - overlay, cursor and gce fixes" ` * tag 'drm-fixes-2020-03-06' of git://anongit.freedesktop.org/drm/drm: (38 commits) drm/amdgpu/display: navi1x copy dcn watermark clock settings to smu resume from s3 (v2) drm/amd/powerplay: map mclk to fclk for COMBINATIONAL_BYPASS case drm/amd/powerplay: fix pre-check condition for setting clock range drm/amd/display: fix dcc swath size calculations on dcn1 drm/amd/display: Clear link settings on MST disable connector drm/amdgpu: disable 3D pipe 1 on Navi1x drm/amdgpu: clean wptr on wb when gpu recovery drm: kirin: Revert "Fix for hikey620 display offset problem" drm/i915/gt: Drop the timeline->mutex as we wait for retirement drm/i915/perf: Reintroduce wait on OA configuration completion drm/sun4i: Fix DE2 VI layer format support drm/sun4i: Add separate DE3 VI layer formats drm/sun4i: de2/de3: Remove unsupported VI layer formats drm/i915/selftests: Fix return in assert_mmap_offset() drm/i915: Protect i915_request_await_start from early waits drm/i915/tgl: Add Wa_1608008084 drm/i915/tgl: Add Wa_22010178259:tgl drm/i915: Program MBUS with rmw during initialization drm/i915/psr: Force PSR probe only after full initialization drm/i915/gem: Break up long lists of object reclaim ... commit 441b62acd9c809e87bab45ad1d82b1b3b77cb4f0 Author: Ian Rogers Date: Thu Mar 5 23:11:08 2020 -0800 tools: Fix off-by 1 relative directory includes This is currently working due to extra include paths in the build. Committer testing: $ cd tools/include/uapi/asm/ Before this patch: $ ls -la ../../arch/x86/include/uapi/asm/errno.h ls: cannot access '../../arch/x86/include/uapi/asm/errno.h': No such file or directory $ After this patch; $ ls -la ../../../arch/x86/include/uapi/asm/errno.h -rw-rw-r--. 1 acme acme 31 Feb 20 12:42 ../../../arch/x86/include/uapi/asm/errno.h $ Check that that is still under tools/, i.e. hasn't escaped into the main kernel sources: $ cd ../../../arch/x86/include/uapi/asm/ $ pwd /home/acme/git/perf/tools/arch/x86/include/uapi/asm $ Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexios Zavras Cc: Andi Kleen Cc: Greg Kroah-Hartman Cc: Igor Lubashev Cc: Kan Liang Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Nick Desaulniers Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Wei Li Link: http://lore.kernel.org/lkml/20200306071110.130202-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3f5777fbaf04c58d940526a22a2e0c813c837936 Author: John Garry Date: Thu Mar 5 19:08:01 2020 +0800 perf jevents: Fix leak of mapfile memory The memory for global pointer is never freed during normal program execution, so let's do that in the main function exit as a good programming practice. A stray blank line is also removed. Reported-by: Jiri Olsa Signed-off-by: John Garry Cc: Alexander Shishkin Cc: Andi Kleen Cc: James Clark Cc: Joakim Zhang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1583406486-154841-2-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 7b919a53102d81cd2e310b4941ac51c465d249ca Author: Tommi Rantala Date: Thu Mar 5 10:37:14 2020 +0200 perf bench: Clear struct sigaction before sigaction() syscall Avoid garbage in sigaction structs used in sigaction() syscalls. Valgrind is complaining about it. Signed-off-by: Tommi Rantala Cc: Alexander Shishkin Cc: Changbin Du Cc: Darren Hart Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lore.kernel.org/lkml/20200305083714.9381-4-tommi.t.rantala@nokia.com Signed-off-by: Arnaldo Carvalho de Melo commit f649bd9dd5d5004543bbc3c50b829577b49f5d75 Author: Tommi Rantala Date: Thu Mar 5 10:37:13 2020 +0200 perf bench futex-wake: Restore thread count default to online CPU count Since commit 3b2323c2c1c4 ("perf bench futex: Use cpumaps") the default number of threads the benchmark uses got changed from number of online CPUs to zero: $ perf bench futex wake # Running 'futex/wake' benchmark: Run summary [PID 15930]: blocking on 0 threads (at [private] futex 0x558b8ee4bfac), waking up 1 at a time. [Run 1]: Wokeup 0 of 0 threads in 0.0000 ms [...] [Run 10]: Wokeup 0 of 0 threads in 0.0000 ms Wokeup 0 of 0 threads in 0.0004 ms (+-40.82%) Restore the old behavior by grabbing the number of online CPUs via cpu->nr: $ perf bench futex wake # Running 'futex/wake' benchmark: Run summary [PID 18356]: blocking on 8 threads (at [private] futex 0xb3e62c), waking up 1 at a time. [Run 1]: Wokeup 8 of 8 threads in 0.0260 ms [...] [Run 10]: Wokeup 8 of 8 threads in 0.0270 ms Wokeup 8 of 8 threads in 0.0419 ms (+-24.35%) Fixes: 3b2323c2c1c4 ("perf bench futex: Use cpumaps") Signed-off-by: Tommi Rantala Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Darren Hart Cc: Davidlohr Bueso Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lore.kernel.org/lkml/20200305083714.9381-3-tommi.t.rantala@nokia.com Signed-off-by: Arnaldo Carvalho de Melo commit 29b4f5f188571c112713c35cc87eefb46efee612 Author: Tommi Rantala Date: Thu Mar 5 10:37:12 2020 +0200 perf top: Fix stdio interface input handling with glibc 2.28+ Since glibc 2.28 when running 'perf top --stdio', input handling no longer works, but hitting any key always just prints the "Mapped keys" help text. To fix it, call clearerr() in the display_thread() loop to clear any EOF sticky errors, as instructed in the glibc NEWS file (https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS): * All stdio functions now treat end-of-file as a sticky condition. If you read from a file until EOF, and then the file is enlarged by another process, you must call clearerr or another function with the same effect (e.g. fseek, rewind) before you can read the additional data. This corrects a longstanding C99 conformance bug. It is most likely to affect programs that use stdio to read interactive input from a terminal. (Bug #1190.) Signed-off-by: Tommi Rantala Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200305083714.9381-2-tommi.t.rantala@nokia.com Signed-off-by: Arnaldo Carvalho de Melo commit cfd3bc752a3f5529506d279deb42e3bc8055695b Author: Nick Desaulniers Date: Sun Feb 23 11:34:49 2020 -0800 perf diff: Fix undefined string comparision spotted by clang's -Wstring-compare clang warns: util/block-info.c:298:18: error: result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Werror,-Wstring-compare] if ((start_line != SRCLINE_UNKNOWN) && (end_line != SRCLINE_UNKNOWN)) { ^ ~~~~~~~~~~~~~~~ util/block-info.c:298:51: error: result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Werror,-Wstring-compare] if ((start_line != SRCLINE_UNKNOWN) && (end_line != SRCLINE_UNKNOWN)) { ^ ~~~~~~~~~~~~~~~ util/block-info.c:298:18: error: result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Werror,-Wstring-compare] if ((start_line != SRCLINE_UNKNOWN) && (end_line != SRCLINE_UNKNOWN)) { ^ ~~~~~~~~~~~~~~~ util/block-info.c:298:51: error: result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Werror,-Wstring-compare] if ((start_line != SRCLINE_UNKNOWN) && (end_line != SRCLINE_UNKNOWN)) { ^ ~~~~~~~~~~~~~~~ util/map.c:434:15: error: result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Werror,-Wstring-compare] if (srcline != SRCLINE_UNKNOWN) ^ ~~~~~~~~~~~~~~~ Reviewer Notes: Looks good to me. Some more context: https://clang.llvm.org/docs/DiagnosticsReference.html#wstring-compare The spec says: J.1 Unspecified behavior The following are unspecified: .. Whether two string literals result in distinct arrays (6.4.5). Signed-off-by: Nick Desaulniers Reviewed-by: Ian Rogers Cc: Alexander Shishkin Cc: Changbin Du Cc: Jin Yao Cc: Jiri Olsa Cc: John Keeping Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: clang-built-linux@googlegroups.com Link: https://github.com/ClangBuiltLinux/linux/issues/900 Link: http://lore.kernel.org/lkml/20200223193456.25291-1-nick.desaulniers@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 95dbf14b236f3147f716cd159bd29461916c610e Author: Thomas Bogendoerfer Date: Fri Mar 6 11:58:37 2020 +0100 ALSA: sgio2audio: Remove usage of dropped hw_params/hw_free functions Commit ee88f4ebe575 ("ALSA: mips: Use managed buffer allocation") removed superfluous hw_params/hw_free callbacks, but forgot to remove them where they were used. Fixes: ee88f4ebe575 ("ALSA: mips: Use managed buffer allocation") Signed-off-by: Thomas Bogendoerfer Link: https://lore.kernel.org/r/20200306105837.31523-1-tsbogend@alpha.franken.de Signed-off-by: Takashi Iwai commit 8019ad13ef7f64be44d4f892af9c840179009254 Author: Peter Zijlstra Date: Wed Mar 4 11:28:31 2020 +0100 futex: Fix inode life-time issue As reported by Jann, ihold() does not in fact guarantee inode persistence. And instead of making it so, replace the usage of inode pointers with a per boot, machine wide, unique inode identifier. This sequence number is global, but shared (file backed) futexes are rare enough that this should not become a performance issue. Reported-by: Jann Horn Suggested-by: Linus Torvalds Signed-off-by: Peter Zijlstra (Intel) commit 86dfa5bec24952f99f2cfa778975d5a914c3a1d2 Merge: 98d54f81e36b ae99fb8baafc Author: Rafael J. Wysocki Date: Fri Mar 6 10:57:46 2020 +0100 Merge branch 'acpi-doc' * acpi-doc: Documentation/admin-guide/acpi: fix fan_performance_states.rst warnings commit 2398e3991bda7caa6b112a6f650fbab92f732b91 Author: Paolo Abeni Date: Wed Mar 4 16:51:07 2020 +0100 mptcp: always include dack if possible. Currently passive MPTCP socket can skip including the DACK option - if the peer sends data before accept() completes. The above happens because the msk 'can_ack' flag is set only after the accept() call. Such missing DACK option may cause - as per RFC spec - unwanted fallback to TCP. This change addresses the issue using the key material available in the current subflow, if any, to create a suitable dack option when msk ack seq is not yet available. v1 -> v2: - adavance the generated ack after the initial MPC packet Fixes: d22f4988ffec ("mptcp: process MP_CAPABLE data option") Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit a3aefbfe45751bf7b338c181b97608e276b5bb73 Author: Dan Carpenter Date: Wed Mar 4 17:24:31 2020 +0300 net: nfc: fix bounds checking bugs on "pipe" This is similar to commit 674d9de02aa7 ("NFC: Fix possible memory corruption when handling SHDLC I-Frame commands") and commit d7ee81ad09f0 ("NFC: nci: Add some bounds checking in nci_hci_cmd_received()") which added range checks on "pipe". The "pipe" variable comes skb->data[0] in nfc_hci_msg_rx_work(). It's in the 0-255 range. We're using it as the array index into the hdev->pipes[] array which has NFC_HCI_MAX_PIPES (128) members. Fixes: 118278f20aa8 ("NFC: hci: Add pipes table to reference them with a tuple {gate, host}") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 9803aac7b5508718989e4cde11b854fc01037b01 Author: Arnd Bergmann Date: Tue Jan 7 22:53:19 2020 +0100 drm/komeda: mark PM functions as __maybe_unused Without this, we get a couple of warnings when CONFIG_PM is disabled: drivers/gpu/drm/arm/display/komeda/komeda_drv.c:156:12: error: 'komeda_rt_pm_resume' defined but not used [-Werror=unused-function] static int komeda_rt_pm_resume(struct device *dev) ^~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/arm/display/komeda/komeda_drv.c:149:12: error: 'komeda_rt_pm_suspend' defined but not used [-Werror=unused-function] static int komeda_rt_pm_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~~~~ Fixes: efb465088518 ("drm/komeda: Add runtime_pm support") Signed-off-by: Arnd Bergmann Reviewed-by: James Qian Wang (Arm Technology China) Signed-off-by: james qian wang (Arm Technology China) Link: https://patchwork.freedesktop.org/patch/msgid/20200107215327.1579195-1-arnd@arndb.de commit 2fa7e15c5f466fdd0c0b196b1dc4a65d191efd96 Author: Tina Zhang Date: Thu Mar 5 21:15:59 2020 +0800 drm/i915/gvt: Fix emulated vbt size issue The emulated vbt doesn't tell its size correctly. According to the intel_vbt_defs.h, vbt_header.vbt_size should the size of VBT (VBT Header, BDB Header and data blocks), and bdb_header.bdb_size should be the size of BDB (BDB Header and data blocks). This patch fixes the issue and lets vbt provided by GVT-g pass the guest i915's sanity test. v2: refine the commit message. (Zhenyu) Signed-off-by: Tina Zhang Reviewed-by: Zhenyu Wang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200305131600.29640-1-tina.zhang@intel.com commit e25d5dbcffae62c9a7fa03517dfa4b8e67670e3d Author: Jiang Lidong Date: Wed Mar 4 09:49:29 2020 +0800 veth: ignore peer tx_dropped when counting local rx_dropped When local NET_RX backlog is full due to traffic overrun, peer veth tx_dropped counter increases. At that time, list local veth stats, rx_dropped has double value of peer tx_dropped, even bigger than transmit packets by peer. In NET_RX softirq process, if any packet drop case happens, it increases dev's rx_dropped counter and returns NET_RX_DROP. At veth tx side, it records any error returned from peer netif_rx into local dev tx_dropped counter. In veth get stats process, it puts local dev rx_dropped and peer dev tx_dropped into together as local rx_drpped value. So that it shows double value of real dropped packets number in this case. This patch ignores peer tx_dropped when counting local rx_dropped, since peer tx_dropped is duplicated to local rx_dropped at most cases. Signed-off-by: Jiang Lidong Signed-off-by: David S. Miller commit 2ac4853e295bba53209917e14af701c45c99ce04 Merge: 64c3fd53408d 09ed6ba43e65 Author: Dave Airlie Date: Fri Mar 6 11:06:33 2020 +1000 Merge tag 'amd-drm-fixes-5.6-2020-03-05' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.6-2020-03-05: amdgpu: - Gfx reset fix for gfx9, 10 - Fix for gfx10 - DP MST fix - DCC fix - Renoir power fixes - Navi power fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200305185957.4268-1-alexander.deucher@amd.com commit 64c3fd53408de5700b555ad612da2d79c58919ee Merge: 26398db1f49a 169c0aa4bc17 Author: Dave Airlie Date: Fri Mar 6 09:18:18 2020 +1000 Merge tag 'drm-intel-fixes-2020-03-05' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.6-rc5: - Break up long lists of object reclaim with cond_resched() - PSR probe fix - TGL workarounds - Selftest return value fix - Drop timeline mutex while waiting for retirement - Wait for OA configuration completion before writes to OA buffer Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87eeu7nl6z.fsf@intel.com commit 26398db1f49a63f93b789d43b3bc292242ff73d4 Merge: 70b8ea1ab1d3 1b79cfd99ff5 Author: Dave Airlie Date: Fri Mar 6 05:40:12 2020 +1000 Merge tag 'drm-misc-fixes-2020-03-05' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Fixes for v5.6.rc5: - dma-buf fix memory leak - Fix resource id creation race in virtio. - Various mmap fixes. - Fix fence leak in ttm_buffer_object_transfer(). - Fixes for sun4i VI layer format support. - kirin: Revert "Fix for hikey620 display offset problem" Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/56de63c7-0cdf-5805-e268-44944af7fef2@linux.intel.com commit 0b136454741b2f6cb18d55e355d396db9248b2ab Author: Eli Cohen Date: Wed Feb 19 09:03:28 2020 +0200 net/mlx5: Clear LAG notifier pointer after unregister After returning from unregister_netdevice_notifier_dev_net(), set the notifier_call field to NULL so successive call to mlx5_lag_add() will function as expected. Fixes: 7907f23adc18 ("net/mlx5: Implement RoCE LAG feature") Signed-off-by: Eli Cohen Reviewed-by: Vlad Buslov Reviewed-by: Raed Salem Signed-off-by: Saeed Mahameed commit 404402abd5f90aa90a134eb9604b1750c1941529 Author: Sebastian Hense Date: Thu Feb 20 08:11:36 2020 +0100 net/mlx5e: Fix endianness handling in pedit mask The mask value is provided as 64 bit and has to be casted in either 32 or 16 bit. On big endian systems the wrong half was casted which resulted in an all zero mask. Fixes: 2b64beba0251 ("net/mlx5e: Support header re-write of partial fields in TC pedit offload") Signed-off-by: Sebastian Hense Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit f28ca65efa87b3fb8da3d69ca7cb1ebc0448de66 Author: Tariq Toukan Date: Mon Feb 24 13:56:53 2020 +0200 net/mlx5e: kTLS, Fix wrong value in record tracker enum Fix to match the HW spec: TRACKING state is 1, SEARCHING is 2. No real issue for now, as these values are not currently used. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed commit 56917766def72f5afdf4235adb91b6897ff26d9d Author: Tariq Toukan Date: Thu Feb 20 13:40:24 2020 +0200 net/mlx5e: kTLS, Fix TCP seq off-by-1 issue in TX resync flow We have an off-by-1 issue in the TCP seq comparison. The last sequence number that belongs to the TCP packet's payload is not "start_seq + len", but one byte before it. Fix it so the 'ends_before' is evaluated properly. This fixes a bug that results in error completions in the kTLS HW offload flows. Fixes: ffbd9ca94e2e ("net/mlx5e: kTLS, Fix corner-case checks in TX resync flow") Signed-off-by: Tariq Toukan Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed commit 692b0399a22530b2de8490bea75a7d20d59391d0 Author: Hamdan Igbaria Date: Mon Feb 24 14:41:29 2020 +0200 net/mlx5: DR, Fix postsend actions write length Fix the send info write length to be (actions x action) size in bytes. Fixes: 297cccebdc5a ("net/mlx5: DR, Expose an internal API to issue RDMA operations") Signed-off-by: Hamdan Igbaria Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 2f63f2d5981499e5867aa061c9c8eb448494bb1e Merge: 3b4f06c715d0 b102f0c522cf Author: David S. Miller Date: Thu Mar 5 15:05:31 2020 -0800 Merge tag 'wireless-drivers-2020-03-05' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.6 Second set of fixes for v5.6. Only two small fixes this time. iwlwifi * fix another initialisation regression with 3168 devices mt76 * fix memory corruption with too many rx fragments ==================== Signed-off-by: David S. Miller commit 3b4f06c715d0d3ecd6497275e3c85fe91462d0ee Author: Tom Zhao Date: Thu Mar 5 11:38:45 2020 +0000 sfc: complete the next packet when we receive a timestamp We now ignore the "completion" event when using tx queue timestamping, and only pay attention to the two (high and low) timestamp events. The NIC will send a pair of timestamp events for every packet transmitted. The current firmware may merge the completion events, and it is possible that future versions may reorder the completion and timestamp events. As such the completion event is not useful. Without this patch in place a merged completion event on a queue with timestamping will cause a "spurious TX completion" error. This affects SFN8000-series adapters. Signed-off-by: Tom Zhao Acked-by: Martin Habets Signed-off-by: David S. Miller commit 849b4d94582a966ecb533448415462846da1f0fa Author: Martin KaFai Lau Date: Wed Mar 4 17:34:54 2020 -0800 bpf: Do not allow map_freeze in struct_ops map struct_ops map cannot support map_freeze. Otherwise, a struct_ops cannot be unregistered from the subsystem. Fixes: 85d33df357b6 ("bpf: Introduce BPF_MAP_TYPE_STRUCT_OPS") Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200305013454.535397-1-kafai@fb.com commit 8e5290e710f4ffe8e9f8813e2ed0397a94d7b2f1 Author: Martin KaFai Lau Date: Wed Mar 4 17:34:47 2020 -0800 bpf: Return better error value in delete_elem for struct_ops map The current always succeed behavior in bpf_struct_ops_map_delete_elem() is not ideal for userspace tool. It can be improved to return proper error value. If it is in TOBEFREE, it means unregistration has been already done before but it is in progress and waiting for the subsystem to clear the refcnt to zero, so -EINPROGRESS. If it is INIT, it means the struct_ops has not been registered yet, so -ENOENT. Fixes: 85d33df357b6 ("bpf: Introduce BPF_MAP_TYPE_STRUCT_OPS") Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200305013447.535326-1-kafai@fb.com commit a35a76faad53429b52a8937b69fdeee5b4e5f935 Merge: 52e7c083b417 c4ef2f3256e3 Author: Alexei Starovoitov Date: Thu Mar 5 13:59:13 2020 -0800 Merge branch 'fix_bpf_send_signal' Yonghong Song says: ==================== Commit 8b401f9ed244 ("bpf: implement bpf_send_signal() helper") introduced bpf_send_signal() helper and Commit 8482941f0906 ("bpf: Add bpf_send_signal_thread() helper") added bpf_send_signal_thread() helper. Both helpers try to send a signel to current process or thread. When bpf_prog is called with scheduler rq_lock held, a deadlock could happen since bpf_send_signal() and bpf_send_signal_thread() will call group_send_sig_info() which may ultimately want to acquire rq_lock() again. This happens in 5.2 and 4.16 based kernels in our production environment with perf_sw_event. In a different scenario, the following is also possible in the last kernel: cpu 1: do_task_stat <- holding sighand->siglock ... task_sched_runtime <- trying to grab rq_lock cpu 2: __schedule <- holding rq_lock ... do_send_sig_info <- trying to grab sighand->siglock Commit eac9153f2b58 ("bpf/stackmap: Fix deadlock with rq_lock in bpf_get_stack()") has a similar issue with above rq_lock() deadlock. This patch set addressed the issue in a similar way. Patch #1 provided kernel solution and Patch #2 added a selftest. Changelogs: v2 -> v3: . simplify selftest send_signal_sched_switch(). The previous version has mmap/munmap inherited from Song's reproducer. They are not necessary in this context. v1 -> v2: . previous fix using task_work in nmi() is incorrect. there is no nmi() involvement here. Using task_work in all cases might be a solution. But decided to use a similar fix as in Commit eac9153f2b58. ==================== Signed-off-by: Alexei Starovoitov commit c4ef2f3256e3bc008f98121cad39ee5467db07a6 Author: Yonghong Song Date: Wed Mar 4 11:11:05 2020 -0800 selftests/bpf: Add send_signal_sched_switch test Added one test, send_signal_sched_switch, to test bpf_send_signal() helper triggered by sched/sched_switch tracepoint. This test can be used to verify kernel deadlocks fixed by the previous commit. The test itself is heavily borrowed from Commit eac9153f2b58 ("bpf/stackmap: Fix deadlock with rq_lock in bpf_get_stack()"). Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Cc: Song Liu Link: https://lore.kernel.org/bpf/20200304191105.2796601-1-yhs@fb.com commit 1bc7896e9ef44fd77858b3ef0b8a6840be3a4494 Author: Yonghong Song Date: Wed Mar 4 11:11:04 2020 -0800 bpf: Fix deadlock with rq_lock in bpf_send_signal() When experimenting with bpf_send_signal() helper in our production environment (5.2 based), we experienced a deadlock in NMI mode: #5 [ffffc9002219f770] queued_spin_lock_slowpath at ffffffff8110be24 #6 [ffffc9002219f770] _raw_spin_lock_irqsave at ffffffff81a43012 #7 [ffffc9002219f780] try_to_wake_up at ffffffff810e7ecd #8 [ffffc9002219f7e0] signal_wake_up_state at ffffffff810c7b55 #9 [ffffc9002219f7f0] __send_signal at ffffffff810c8602 #10 [ffffc9002219f830] do_send_sig_info at ffffffff810ca31a #11 [ffffc9002219f868] bpf_send_signal at ffffffff8119d227 #12 [ffffc9002219f988] bpf_overflow_handler at ffffffff811d4140 #13 [ffffc9002219f9e0] __perf_event_overflow at ffffffff811d68cf #14 [ffffc9002219fa10] perf_swevent_overflow at ffffffff811d6a09 #15 [ffffc9002219fa38] ___perf_sw_event at ffffffff811e0f47 #16 [ffffc9002219fc30] __schedule at ffffffff81a3e04d #17 [ffffc9002219fc90] schedule at ffffffff81a3e219 #18 [ffffc9002219fca0] futex_wait_queue_me at ffffffff8113d1b9 #19 [ffffc9002219fcd8] futex_wait at ffffffff8113e529 #20 [ffffc9002219fdf0] do_futex at ffffffff8113ffbc #21 [ffffc9002219fec0] __x64_sys_futex at ffffffff81140d1c #22 [ffffc9002219ff38] do_syscall_64 at ffffffff81002602 #23 [ffffc9002219ff50] entry_SYSCALL_64_after_hwframe at ffffffff81c00068 The above call stack is actually very similar to an issue reported by Commit eac9153f2b58 ("bpf/stackmap: Fix deadlock with rq_lock in bpf_get_stack()") by Song Liu. The only difference is bpf_send_signal() helper instead of bpf_get_stack() helper. The above deadlock is triggered with a perf_sw_event. Similar to Commit eac9153f2b58, the below almost identical reproducer used tracepoint point sched/sched_switch so the issue can be easily caught. /* stress_test.c */ #include #include #include #include #include #include #include #define THREAD_COUNT 1000 char *filename; void *worker(void *p) { void *ptr; int fd; char *pptr; fd = open(filename, O_RDONLY); if (fd < 0) return NULL; while (1) { struct timespec ts = {0, 1000 + rand() % 2000}; ptr = mmap(NULL, 4096 * 64, PROT_READ, MAP_PRIVATE, fd, 0); usleep(1); if (ptr == MAP_FAILED) { printf("failed to mmap\n"); break; } munmap(ptr, 4096 * 64); usleep(1); pptr = malloc(1); usleep(1); pptr[0] = 1; usleep(1); free(pptr); usleep(1); nanosleep(&ts, NULL); } close(fd); return NULL; } int main(int argc, char *argv[]) { void *ptr; int i; pthread_t threads[THREAD_COUNT]; if (argc < 2) return 0; filename = argv[1]; for (i = 0; i < THREAD_COUNT; i++) { if (pthread_create(threads + i, NULL, worker, NULL)) { fprintf(stderr, "Error creating thread\n"); return 0; } } for (i = 0; i < THREAD_COUNT; i++) pthread_join(threads[i], NULL); return 0; } and the following command: 1. run `stress_test /bin/ls` in one windown 2. hack bcc trace.py with the following change: --- a/tools/trace.py +++ b/tools/trace.py @@ -513,6 +513,7 @@ BPF_PERF_OUTPUT(%s); __data.tgid = __tgid; __data.pid = __pid; bpf_get_current_comm(&__data.comm, sizeof(__data.comm)); + bpf_send_signal(10); %s %s %s.perf_submit(%s, &__data, sizeof(__data)); 3. in a different window run ./trace.py -p $(pidof stress_test) t:sched:sched_switch The deadlock can be reproduced in our production system. Similar to Song's fix, the fix is to delay sending signal if irqs is disabled to avoid deadlocks involving with rq_lock. With this change, my above stress-test in our production system won't cause deadlock any more. I also implemented a scale-down version of reproducer in the selftest (a subsequent commit). With latest bpf-next, it complains for the following potential deadlock. [ 32.832450] -> #1 (&p->pi_lock){-.-.}: [ 32.833100] _raw_spin_lock_irqsave+0x44/0x80 [ 32.833696] task_rq_lock+0x2c/0xa0 [ 32.834182] task_sched_runtime+0x59/0xd0 [ 32.834721] thread_group_cputime+0x250/0x270 [ 32.835304] thread_group_cputime_adjusted+0x2e/0x70 [ 32.835959] do_task_stat+0x8a7/0xb80 [ 32.836461] proc_single_show+0x51/0xb0 ... [ 32.839512] -> #0 (&(&sighand->siglock)->rlock){....}: [ 32.840275] __lock_acquire+0x1358/0x1a20 [ 32.840826] lock_acquire+0xc7/0x1d0 [ 32.841309] _raw_spin_lock_irqsave+0x44/0x80 [ 32.841916] __lock_task_sighand+0x79/0x160 [ 32.842465] do_send_sig_info+0x35/0x90 [ 32.842977] bpf_send_signal+0xa/0x10 [ 32.843464] bpf_prog_bc13ed9e4d3163e3_send_signal_tp_sched+0x465/0x1000 [ 32.844301] trace_call_bpf+0x115/0x270 [ 32.844809] perf_trace_run_bpf_submit+0x4a/0xc0 [ 32.845411] perf_trace_sched_switch+0x10f/0x180 [ 32.846014] __schedule+0x45d/0x880 [ 32.846483] schedule+0x5f/0xd0 ... [ 32.853148] Chain exists of: [ 32.853148] &(&sighand->siglock)->rlock --> &p->pi_lock --> &rq->lock [ 32.853148] [ 32.854451] Possible unsafe locking scenario: [ 32.854451] [ 32.855173] CPU0 CPU1 [ 32.855745] ---- ---- [ 32.856278] lock(&rq->lock); [ 32.856671] lock(&p->pi_lock); [ 32.857332] lock(&rq->lock); [ 32.857999] lock(&(&sighand->siglock)->rlock); Deadlock happens on CPU0 when it tries to acquire &sighand->siglock but it has been held by CPU1 and CPU1 tries to grab &rq->lock and cannot get it. This is not exactly the callstack in our production environment, but sympotom is similar and both locks are using spin_lock_irqsave() to acquire the lock, and both involves rq_lock. The fix to delay sending signal when irq is disabled also fixed this issue. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Cc: Song Liu Link: https://lore.kernel.org/bpf/20200304191104.2796501-1-yhs@fb.com commit af33d2433b03d63ed31fcfda842f46676a5e1afc Author: Tycho Andersen Date: Sat Feb 8 08:18:17 2020 -0700 riscv: fix seccomp reject syscall code path If secure_computing() rejected a system call, we were previously setting the system call number to -1, to indicate to later code that the syscall failed. However, if something (e.g. a user notification) was sleeping, and received a signal, we may set a0 to -ERESTARTSYS and re-try the system call again. In this case, seccomp "denies" the syscall (because of the signal), and we would set a7 to -1, thus losing the value of the system call we want to restart. Instead, let's return -1 from do_syscall_trace_enter() to indicate that the syscall was rejected, so we don't clobber the value in case of -ERESTARTSYS or whatever. This commit fixes the user_notification_signal seccomp selftest on riscv to no longer hang. That test expects the system call to be re-issued after the signal, and it wasn't due to the above bug. Now that it is, everything works normally. Note that in the ptrace (tracer) case, the tracer can set the register values to whatever they want, so we still need to keep the code that handles out-of-bounds syscalls. However, we can drop the comment. We can also drop syscall_set_nr(), since it is no longer used anywhere, and the code that re-loads the value in a7 because of it. Reported in: https://lore.kernel.org/bpf/CAEn-LTp=ss0Dfv6J00=rCAy+N78U2AmhqJNjfqjr2FDpPYjxEQ@mail.gmail.com/ Reported-by: David Abdurachmanov Signed-off-by: Tycho Andersen Reviewed-by: Kees Cook Signed-off-by: Palmer Dabbelt commit 153031a301bb07194e9c37466cfce8eacb977621 Author: Cengiz Can Date: Wed Mar 4 13:58:19 2020 +0300 blktrace: fix dereference after null check There was a recent change in blktrace.c that added a RCU protection to `q->blk_trace` in order to fix a use-after-free issue during access. However the change missed an edge case that can lead to dereferencing of `bt` pointer even when it's NULL: Coverity static analyzer marked this as a FORWARD_NULL issue with CID 1460458. ``` /kernel/trace/blktrace.c: 1904 in sysfs_blk_trace_attr_store() 1898 ret = 0; 1899 if (bt == NULL) 1900 ret = blk_trace_setup_queue(q, bdev); 1901 1902 if (ret == 0) { 1903 if (attr == &dev_attr_act_mask) >>> CID 1460458: Null pointer dereferences (FORWARD_NULL) >>> Dereferencing null pointer "bt". 1904 bt->act_mask = value; 1905 else if (attr == &dev_attr_pid) 1906 bt->pid = value; 1907 else if (attr == &dev_attr_start_lba) 1908 bt->start_lba = value; 1909 else if (attr == &dev_attr_end_lba) ``` Added a reassignment with RCU annotation to fix the issue. Fixes: c780e86dd48 ("blktrace: Protect q->blk_trace with RCU") Cc: stable@vger.kernel.org Reviewed-by: Ming Lei Reviewed-by: Bob Liu Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Cengiz Can Signed-off-by: Jens Axboe commit b85c821083359ef9fd524321af6f2a5d91730459 Author: Andy Shevchenko Date: Thu Mar 5 14:31:08 2020 +0200 MAINTAINERS: Add missed files related to Synopsys DesignWare UART 8250_dw has been split to library part and the driver, the library is being used by 8250_lpss, which represents Synosys DesignWare UART (with optional Synopsys Designware DMA) enumerated by PCI. Add missed above mentioned files to the database record for review. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200305123108.41320-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 10c5ccc3c6d32f3d7d6c07de1d3f0f4b52f3e3ab Author: Jay Dolan Date: Thu Mar 5 06:05:04 2020 -0800 serial: 8250_exar: add support for ACCES cards Add ACCES VIDs and PIDs that use the Exar chips Signed-off-by: Jay Dolan Cc: stable Link: https://lore.kernel.org/r/20200305140504.22237-1-jay.dolan@accesio.com Signed-off-by: Greg Kroah-Hartman commit 0a91330b2af9f71ceeeed483f92774182b58f6d9 Author: Yash Shah Date: Wed Feb 19 09:19:07 2020 +0530 riscv: dts: Add GPIO reboot method to HiFive Unleashed DTS file Add the ability to reboot the HiFive Unleashed board via GPIO. Signed-off-by: Yash Shah Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit 4a3e208474204e879d22a310b244cb2f39e5b1f8 Author: tangbin Date: Thu Mar 5 09:38:23 2020 +0800 tty:serial:mvebu-uart:fix a wrong return in this place, the function should return a negative value and the PTR_ERR already returns a negative,so return -PTR_ERR() is wrong. Signed-off-by: tangbin Cc: stable Acked-by: Jiri Slaby Link: https://lore.kernel.org/r/20200305013823.20976-1-tangbin@cmss.chinamobile.com Signed-off-by: Greg Kroah-Hartman commit 68e1006f618e509fc7869259fe83ceec4a95dac3 Author: Jian Shen Date: Thu Mar 5 09:47:53 2020 +0800 net: hns3: fix a not link up issue when fibre port supports autoneg When fibre port supports auto-negotiation, the IMP(Intelligent Management Process) processes the speed of auto-negotiation and the user's speed separately. For below case, the port will get a not link up problem. step 1: disables auto-negotiation and sets speed to A, then the driver's MAC speed will be updated to A. step 2: enables auto-negotiation and MAC gets negotiated speed B, then the driver's MAC speed will be updated to B through querying in periodical task. step 3: MAC gets new negotiated speed A. step 4: disables auto-negotiation and sets speed to B before periodical task query new MAC speed A, the driver will ignore the speed configuration. This patch fixes it by skipping speed and duplex checking when fibre port supports auto-negotiation. Fixes: 22f48e24a23d ("net: hns3: add autoneg and change speed support for fibre port") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 110a40dfb708fe940a3f3704d470e431c368d256 Author: Eric Dumazet Date: Wed Mar 4 15:51:43 2020 -0800 slip: make slhc_compress() more robust against malicious packets Before accessing various fields in IPV4 network header and TCP header, make sure the packet : - Has IP version 4 (ip->version == 4) - Has not a silly network length (ip->ihl >= 5) - Is big enough to hold network and transport headers - Has not a silly TCP header size (th->doff >= sizeof(struct tcphdr) / 4) syzbot reported : BUG: KMSAN: uninit-value in slhc_compress+0x5b9/0x2e60 drivers/net/slip/slhc.c:270 CPU: 0 PID: 11728 Comm: syz-executor231 Not tainted 5.6.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x220 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215 slhc_compress+0x5b9/0x2e60 drivers/net/slip/slhc.c:270 ppp_send_frame drivers/net/ppp/ppp_generic.c:1637 [inline] __ppp_xmit_process+0x1902/0x2970 drivers/net/ppp/ppp_generic.c:1495 ppp_xmit_process+0x147/0x2f0 drivers/net/ppp/ppp_generic.c:1516 ppp_write+0x6bb/0x790 drivers/net/ppp/ppp_generic.c:512 do_loop_readv_writev fs/read_write.c:717 [inline] do_iter_write+0x812/0xdc0 fs/read_write.c:1000 compat_writev+0x2df/0x5a0 fs/read_write.c:1351 do_compat_pwritev64 fs/read_write.c:1400 [inline] __do_compat_sys_pwritev fs/read_write.c:1420 [inline] __se_compat_sys_pwritev fs/read_write.c:1414 [inline] __ia32_compat_sys_pwritev+0x349/0x3f0 fs/read_write.c:1414 do_syscall_32_irqs_on arch/x86/entry/common.c:339 [inline] do_fast_syscall_32+0x3c7/0x6e0 arch/x86/entry/common.c:410 entry_SYSENTER_compat+0x68/0x77 arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f7cd99 Code: 90 e8 0b 00 00 00 f3 90 0f ae e8 eb f9 8d 74 26 00 89 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000ffdb84ac EFLAGS: 00000217 ORIG_RAX: 000000000000014e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000200001c0 RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 0000000040047459 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline] kmsan_internal_poison_shadow+0x66/0xd0 mm/kmsan/kmsan.c:127 kmsan_slab_alloc+0x8a/0xe0 mm/kmsan/kmsan_hooks.c:82 slab_alloc_node mm/slub.c:2793 [inline] __kmalloc_node_track_caller+0xb40/0x1200 mm/slub.c:4401 __kmalloc_reserve net/core/skbuff.c:142 [inline] __alloc_skb+0x2fd/0xac0 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1051 [inline] ppp_write+0x115/0x790 drivers/net/ppp/ppp_generic.c:500 do_loop_readv_writev fs/read_write.c:717 [inline] do_iter_write+0x812/0xdc0 fs/read_write.c:1000 compat_writev+0x2df/0x5a0 fs/read_write.c:1351 do_compat_pwritev64 fs/read_write.c:1400 [inline] __do_compat_sys_pwritev fs/read_write.c:1420 [inline] __se_compat_sys_pwritev fs/read_write.c:1414 [inline] __ia32_compat_sys_pwritev+0x349/0x3f0 fs/read_write.c:1414 do_syscall_32_irqs_on arch/x86/entry/common.c:339 [inline] do_fast_syscall_32+0x3c7/0x6e0 arch/x86/entry/common.c:410 entry_SYSENTER_compat+0x68/0x77 arch/x86/entry/entry_64_compat.S:139 Fixes: b5451d783ade ("slip: Move the SLIP drivers") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 52e7c083b417417bb4352ebf3a6409988b6af238 Author: Quentin Monnet Date: Wed Feb 26 17:13:53 2020 +0000 mailmap: Update email address My Netronome address is no longer active. I am no maintainer, but get_maintainer.pl sometimes returns my name for a small number of files (BPF-related). Add an entry to .mailmap for good measure. Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200226171353.18982-1-quentin@isovalent.com Signed-off-by: Alexei Starovoitov commit d2047aba2e68f02119fa28904364070b98d92cd8 Author: Anup Patel Date: Tue Dec 3 03:49:39 2019 +0000 RISC-V: Select Goldfish RTC driver for QEMU virt machine We select Goldfish RTC driver using QEMU virt machine kconfig option to access RTC device on QEMU virt machine. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Reviewed-by: Palmer Dabbelt Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt commit 81e2d3c52c0ef819d2fe68ebe2e167045938929e Author: Anup Patel Date: Tue Dec 3 03:49:37 2019 +0000 RISC-V: Select SYSCON Reboot and Poweroff for QEMU virt machine The SYSCON Reboot and Poweroff drivers can be used on QEMU virt machine to reboot or poweroff the system hence we select these drivers using QEMU virt machine kconfig option. Signed-off-by: Anup Patel Reviewed-by: Palmer Dabbelt Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt commit a4485398b6b86334aa26dff5088b3e7e8a87682d Author: Anup Patel Date: Tue Dec 3 03:49:34 2019 +0000 RISC-V: Enable QEMU virt machine support in defconfigs We have kconfig option for QEMU virt machine so let's enable it in RV32 and RV64 defconfigs. Also, we remove various VIRTIO configs from RV32 and RV64 defconfigs because these are now selected by QEMU virt machine kconfig option. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Reviewed-by: Palmer Dabbelt Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt commit 759bdc168181abeff61399d0f7ecec2852cc3e61 Author: Anup Patel Date: Tue Dec 3 03:49:31 2019 +0000 RISC-V: Add kconfig option for QEMU virt machine We add kconfig option for QEMU virt machine and select all required VIRTIO drivers using this kconfig option. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Reviewed-by: Palmer Dabbelt Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt commit 9f65ed5fe41ce08ed1cb1f6a950f9ec694c142ad Merge: 6fd145da21af 5313b2a58ef0 Author: Linus Torvalds Date: Thu Mar 5 12:23:22 2020 -0600 Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull Hyper-V update from Wei Liu: - Update MAINTAINERS file for Hyper-V - One cleanup patch for Hyper-V HID driver * tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: HID: hyperv: NULL check before some freeing functions is not needed. Hyper-V: add myself as a maintainer Hyper-V: Drop Sasha Levin from the Hyper-V maintainers commit 6fd145da21af43dd069463d83d89aefcc6675eba Merge: 776e49e8ddb5 25962e1a7f1d Author: Linus Torvalds Date: Thu Mar 5 12:19:34 2020 -0600 Merge tag 'dmaengine-fix-5.6-rc5' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "A bunch of driver fixes: - Doc updates to clean warnings for dmaengine - Fixes for newly added Intel idxd driver - More fixes for newly added TI k3-udma driver - Fixes for IMX and Tegra drivers" * tag 'dmaengine-fix-5.6-rc5' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: imx-sdma: Fix the event id check to include RX event for UART6 dmaengine: tegra-apb: Prevent race conditions of tasklet vs free list dmaengine: tegra-apb: Fix use-after-free dmaengine: imx-sdma: fix context cache dmaengine: idxd: wq size configuration needs to check global max size dmaengine: idxd: sysfs input of wq incorrect wq type should return error dmaengine: coh901318: Fix a double lock bug in dma_tc_handle() dmaengine: idxd: correct reserved token calculation dmaengine: ti: k3-udma: Fix terminated transfer handling dmaengine: ti: k3-udma: Use the channel direction in pause/resume functions dmaengine: ti: k3-udma: Use the TR counter helper for slave_sg and cyclic dmaengine: ti: k3-udma: Move the TR counter calculation to helper function dmaengine: ti: k3-udma: Workaround for RX teardown with stale data in peer dmaengine: ti: k3-udma: Use ktime/usleep_range based TX completion check dmaengine: idxd: Fix error handling in idxd_wq_cdev_dev_setup() dmaengine: doc: fix warnings/issues of client.rst dmaengine: idxd: fix runaway module ref count on device driver bind commit e8dca30f7118461d47e1c3510d0e31b277439151 Author: Jernej Skrabec Date: Thu Mar 5 00:25:09 2020 +0100 drm/bridge: dw-hdmi: fix AVI frame colorimetry CTA-861-F explicitly states that for RGB colorspace colorimetry should be set to "none". Fix that. Acked-by: Laurent Pinchart Fixes: def23aa7e982 ("drm: bridge: dw-hdmi: Switch to V4L bus format and encodings") Signed-off-by: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200304232512.51616-2-jernej.skrabec@siol.net commit 4ab50af63d2eb5da5c1571f8518948514f535782 Author: Juergen Gross Date: Thu Mar 5 16:51:29 2020 +0100 xen/blkfront: fix ring info addressing Commit 0265d6e8ddb890 ("xen/blkfront: limit allocated memory size to actual use case") made struct blkfront_ring_info size dynamic. This is fine when running with only one queue, but with multiple queues the addressing of the single queues has to be adapted as the structs are allocated in an array. Fixes: 0265d6e8ddb890 ("xen/blkfront: limit allocated memory size to actual use case") Reported-by: Sander Eikelenboom Tested-by: Sander Eikelenboom Signed-off-by: Juergen Gross Acked-by: Roger Pau Monné Link: https://lore.kernel.org/r/20200305155129.28326-1-jgross@suse.com Signed-off-by: Boris Ostrovsky commit 2f69a110e7bba3ec6bc089a2f736ca0941d887ed Author: Juergen Gross Date: Thu Mar 5 11:03:23 2020 +0100 xen/xenbus: fix locking Commit 060eabe8fbe726 ("xenbus/backend: Protect xenbus callback with lock") introduced a bug by holding a lock while calling a function which might schedule. Fix that by using a semaphore instead. Fixes: 060eabe8fbe726 ("xenbus/backend: Protect xenbus callback with lock") Signed-off-by: Juergen Gross Link: https://lore.kernel.org/r/20200305100323.16736-1-jgross@suse.com Reviewed-by: Boris Ostrovsky Signed-off-by: Boris Ostrovsky commit 8130b9d5b5abf26f9927b487c15319a187775f34 Author: Dongli Zhang Date: Tue Mar 3 14:14:23 2020 -0800 xenbus: req->err should be updated before req->state This patch adds the barrier to guarantee that req->err is always updated before req->state. Otherwise, read_reply() would not return ERR_PTR(req->err) but req->body, when process_writes()->xb_write() is failed. Signed-off-by: Dongli Zhang Link: https://lore.kernel.org/r/20200303221423.21962-2-dongli.zhang@oracle.com Reviewed-by: Julien Grall Signed-off-by: Boris Ostrovsky commit 1b6a51e86cce38cf4d48ce9c242120283ae2f603 Author: Dongli Zhang Date: Tue Mar 3 14:14:22 2020 -0800 xenbus: req->body should be updated before req->state The req->body should be updated before req->state is updated and the order should be guaranteed by a barrier. Otherwise, read_reply() might return req->body = NULL. Below is sample callstack when the issue is reproduced on purpose by reordering the updates of req->body and req->state and adding delay in code between updates of req->state and req->body. [ 22.356105] general protection fault: 0000 [#1] SMP PTI [ 22.361185] CPU: 2 PID: 52 Comm: xenwatch Not tainted 5.5.0xen+ #6 [ 22.366727] Hardware name: Xen HVM domU, BIOS ... [ 22.372245] RIP: 0010:_parse_integer_fixup_radix+0x6/0x60 ... ... [ 22.392163] RSP: 0018:ffffb2d64023fdf0 EFLAGS: 00010246 [ 22.395933] RAX: 0000000000000000 RBX: 75746e7562755f6d RCX: 0000000000000000 [ 22.400871] RDX: 0000000000000000 RSI: ffffb2d64023fdfc RDI: 75746e7562755f6d [ 22.405874] RBP: 0000000000000000 R08: 00000000000001e8 R09: 0000000000cdcdcd [ 22.410945] R10: ffffb2d6402ffe00 R11: ffff9d95395eaeb0 R12: ffff9d9535935000 [ 22.417613] R13: ffff9d9526d4a000 R14: ffff9d9526f4f340 R15: ffff9d9537654000 [ 22.423726] FS: 0000000000000000(0000) GS:ffff9d953bc80000(0000) knlGS:0000000000000000 [ 22.429898] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 22.434342] CR2: 000000c4206a9000 CR3: 00000001ea3fc002 CR4: 00000000001606e0 [ 22.439645] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 22.444941] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 22.450342] Call Trace: [ 22.452509] simple_strtoull+0x27/0x70 [ 22.455572] xenbus_transaction_start+0x31/0x50 [ 22.459104] netback_changed+0x76c/0xcc1 [xen_netfront] [ 22.463279] ? find_watch+0x40/0x40 [ 22.466156] xenwatch_thread+0xb4/0x150 [ 22.469309] ? wait_woken+0x80/0x80 [ 22.472198] kthread+0x10e/0x130 [ 22.474925] ? kthread_park+0x80/0x80 [ 22.477946] ret_from_fork+0x35/0x40 [ 22.480968] Modules linked in: xen_kbdfront xen_fbfront(+) xen_netfront xen_blkfront [ 22.486783] ---[ end trace a9222030a747c3f7 ]--- [ 22.490424] RIP: 0010:_parse_integer_fixup_radix+0x6/0x60 The virt_rmb() is added in the 'true' path of test_reply(). The "while" is changed to "do while" so that test_reply() is used as a read memory barrier. Signed-off-by: Dongli Zhang Link: https://lore.kernel.org/r/20200303221423.21962-1-dongli.zhang@oracle.com Reviewed-by: Julien Grall Signed-off-by: Boris Ostrovsky commit e8dc73c9f9ea554b36093dea23e4ca3b586105d7 Author: Gustavo A. R. Silva Date: Wed Feb 26 15:26:12 2020 -0600 xen: Replace zero-length array with flexible-array member The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200226212612.GA4663@embeddedor Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky commit 8b33a134a9cc2a501f8fc731d91caef39237d495 Author: Jian-Hong Pan Date: Tue Feb 25 15:29:21 2020 +0800 ALSA: hda/realtek - Enable the headset of ASUS B9450FA with ALC294 A headset on the laptop like ASUS B9450FA does not work, until quirk ALC294_FIXUP_ASUS_HPE is applied. Signed-off-by: Jian-Hong Pan Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/20200225072920.109199-1-jian-hong@endlessm.com Signed-off-by: Takashi Iwai commit 09ed6ba43e659474878b22d40b141a01d09ec857 Author: Hersen Wu Date: Thu Feb 13 10:50:13 2020 -0500 drm/amdgpu/display: navi1x copy dcn watermark clock settings to smu resume from s3 (v2) This interface is for dGPU Navi1x. Linux dc-pplib interface depends on window driver dc implementation. For Navi1x, clock settings of dcn watermarks are fixed. the settings should be passed to smu during boot up and resume from s3. boot up: dc calculate dcn watermark clock settings within dc_create, dcn20_resource_construct, then call pplib functions below to pass the settings to smu: smu_set_watermarks_for_clock_ranges smu_set_watermarks_table navi10_set_watermarks_table smu_write_watermarks_table For Renoir, clock settings of dcn watermark are also fixed values. dc has implemented different flow for window driver: dc_hardware_init / dc_set_power_state dcn10_init_hw notify_wm_ranges set_wm_ranges For Linux smu_set_watermarks_for_clock_ranges renoir_set_watermarks_table smu_write_watermarks_table dc_hardware_init -> amdgpu_dm_init dc_set_power_state --> dm_resume therefore, linux dc-pplib interface of navi10/12/14 is different from that of Renoir. v2: add missing unlock in error case Signed-off-by: Hersen Wu Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit ab65a371dd5f5cba6bd9a58a1a6d4115a71cc5c9 Author: Prike Liang Date: Wed Mar 4 10:36:21 2020 +0800 drm/amd/powerplay: map mclk to fclk for COMBINATIONAL_BYPASS case When hit COMBINATIONAL_BYPASS the mclk will be bypass and can export fclk frequency to user usage. Signed-off-by: Prike Liang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 80381d40c9bf5218db06a7d7246c5478c95987ee Author: Prike Liang Date: Mon Mar 2 09:36:15 2020 +0800 drm/amd/powerplay: fix pre-check condition for setting clock range This fix will handle some MP1 FW issue like as mclk dpm table in renoir has a reverse dpm clock layout and a zero frequency dpm level as following case. cat pp_dpm_mclk 0: 1200Mhz 1: 1200Mhz 2: 800Mhz 3: 0Mhz Signed-off-by: Prike Liang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit a0275dfc82c9034eefbeffd556cca6dd239d7925 Author: Josip Pavic Date: Fri Feb 21 12:26:19 2020 -0500 drm/amd/display: fix dcc swath size calculations on dcn1 [Why] Swath sizes are being calculated incorrectly. The horizontal swath size should be the product of block height, viewport width, and bytes per element, but the calculation uses viewport height instead of width. The vertical swath size is similarly incorrectly calculated. The effect of this is that we report the wrong DCC caps. [How] Use viewport width in the horizontal swath size calculation and viewport height in the vertical swath size calculation. Signed-off-by: Josip Pavic Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5ac7fd2f597b88ee81f4748ee50cab06192a8dc3 Author: Bhawanpreet Lakha Date: Thu Feb 20 11:16:14 2020 -0500 drm/amd/display: Clear link settings on MST disable connector [Why] If we have a single MST display and we disconnect it, we dont disable that link. This causes the old link settings to still exist Now on a replug for MST we think its a link loss and will try to reallocate mst payload which will fail, throwing warning below. [ 129.374192] [drm] Failed to updateMST allocation table forpipe idx:0 [ 129.374206] ------------[ cut here ]------------ [ 129.374284] WARNING: CPU: 14 PID: 1710 at drivers/gpu/drm/amd/amdgpu/../dal-dev/dc/core/dc_link.c:3153 dc_link_allocate_mst_payload+0x1f7/0x220 [amdgpu] [ 129.374285] Modules linked in: amdgpu(OE) amd_iommu_v2 gpu_sched ttm drm_kms_helper drm fb_sys_fops syscopyarea sysfillrect sysimgblt binfmt_misc nls_iso8859_1 edac_mce_amd snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio kvm snd_hda_codec_hdmi snd_hda_intel snd_intel_nhlt snd_hda_codec irqbypass snd_hda_core snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi crct10dif_pclmul snd_seq crc32_pclmul ghash_clmulni_intel snd_seq_device snd_timer snd aesni_intel eeepc_wmi crypto_simd asus_wmi joydev cryptd sparse_keymap input_leds soundcore video glue_helper wmi_bmof mxm_wmi k10temp ccp mac_hid sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 hid_generic usbhid hid igb i2c_algo_bit ahci dca i2c_piix4 libahci gpio_amdpt wmi gpio_generic [ 129.374318] CPU: 14 PID: 1710 Comm: kworker/14:2 Tainted: G W OE 5.4.0-rc7bhawan+ #480 [ 129.374318] Hardware name: System manufacturer System Product Name/PRIME X370-PRO, BIOS 0515 03/30/2017 [ 129.374397] Workqueue: events dm_irq_work_func [amdgpu] [ 129.374468] RIP: 0010:dc_link_allocate_mst_payload+0x1f7/0x220 [amdgpu] [ 129.374470] Code: 52 20 e8 1c 63 ad f4 48 8b 5d d0 65 48 33 1c 25 28 00 00 00 b8 01 00 00 00 75 16 48 8d 65 d8 5b 41 5c 41 5d 41 5e 41 5f 5d c3 <0f> 0b e9 fa fe ff ff e8 ed 5b d6 f3 41 0f b6 b6 c4 02 00 00 48 c7 [ 129.374471] RSP: 0018:ffff9f9141e7fcc0 EFLAGS: 00010246 [ 129.374472] RAX: 0000000000000000 RBX: ffff91ef0762f800 RCX: 0000000000000000 [ 129.374473] RDX: 0000000000000005 RSI: ffffffffc0c4a988 RDI: 0000000000000004 [ 129.374474] RBP: ffff9f9141e7fd10 R08: 0000000000000005 R09: 0000000000000000 [ 129.374475] R10: 0000000000000002 R11: 0000000000000001 R12: ffff91eebd510c00 [ 129.374475] R13: ffff91eebd510e58 R14: ffff91ef052c01b8 R15: 0000000000000006 [ 129.374476] FS: 0000000000000000(0000) GS:ffff91ef0ef80000(0000) knlGS:0000000000000000 [ 129.374477] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 129.374478] CR2: 000055623ea01d50 CR3: 0000000408a8c000 CR4: 00000000003406e0 [ 129.374479] Call Trace: [ 129.374550] dc_link_reallocate_mst_payload+0x12e/0x150 [amdgpu] [ 129.374617] dc_link_handle_hpd_rx_irq+0x6d4/0x6e0 [amdgpu] [ 129.374693] handle_hpd_rx_irq+0x77/0x310 [amdgpu] [ 129.374768] dm_irq_work_func+0x53/0x70 [amdgpu] [ 129.374774] process_one_work+0x1fd/0x3f0 [ 129.374776] worker_thread+0x255/0x410 [ 129.374778] kthread+0x121/0x140 [ 129.374780] ? process_one_work+0x3f0/0x3f0 [ 129.374781] ? kthread_park+0x90/0x90 [ 129.374785] ret_from_fork+0x22/0x40 [How] when we disable MST we should clear the cur link settings (lane_count=0 is good enough). This will cause us to not reallocate payloads earlier than expected and not throw the warning Signed-off-by: Bhawanpreet Lakha Reviewed-by: Hersen Wu Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 194bcf35bce4a236059816bc41b3db9c9c92a1bb Author: Tianci.Yin Date: Fri Feb 28 17:10:21 2020 +0800 drm/amdgpu: disable 3D pipe 1 on Navi1x [why] CP firmware decide to skip setting the state for 3D pipe 1 for Navi1x as there is no use case. [how] Disable 3D pipe 1 on Navi1x. Reviewed-by: Feifei Xu Reviewed-by: Monk Liu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 0d45e86d2267d5bdf7bbb631499788da1c27ceb2 Author: Christian Lachner Date: Sun Feb 23 10:24:16 2020 +0100 ALSA: hda/realtek - Fix silent output on Gigabyte X570 Aorus Master The Gigabyte X570 Aorus Master motherboard with ALC1220 codec requires a similar workaround for Clevo laptops to enforce the DAC/mixer connection path. Set up a quirk entry for that. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205275 Signed-off-by: Christian Lachner Cc: Link: https://lore.kernel.org/r/20200223092416.15016-2-gladiac@gmail.com Signed-off-by: Takashi Iwai commit 76f7dec08fd64e9e3ad0810a1a8a60b0a846d348 Author: Kailang Yang Date: Mon Feb 10 16:30:26 2020 +0800 ALSA: hda/realtek - Add Headset Button supported for ThinkPad X1 ThinkPad want to support Headset Button control. This patch will enable it. Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/7f0b7128f40f41f6b5582ff610adc33d@realtek.com Signed-off-by: Takashi Iwai commit 78def224f59c05d00e815be946ec229719ccf377 Author: Kailang Yang Date: Thu Feb 20 15:21:54 2020 +0800 ALSA: hda/realtek - Add Headset Mic supported Dell desktop platform supported headset Mic. Add pin verb to enable headset Mic. This platform only support fixed type headset for Iphone type. Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/b9da28d772ef43088791b0f3675929e7@realtek.com Signed-off-by: Takashi Iwai commit a754acc3e4bcf0b70f4356fc450fec72875762da Author: Jason A. Donenfeld Date: Wed Mar 4 18:42:21 2020 +0800 KVM: fix Kconfig menu text for -Werror This was evidently copy and pasted from the i915 driver, but the text wasn't updated. Fixes: 4f337faf1c55 ("KVM: allow disabling -Werror") Signed-off-by: Jason A. Donenfeld Signed-off-by: Paolo Bonzini commit 5313b2a58ef02e2b077d7ae8088043609e3155b0 Author: Lucas Tanure Date: Sat Feb 29 17:30:07 2020 +0000 HID: hyperv: NULL check before some freeing functions is not needed. Fix below warnings reported by coccicheck: drivers/hid/hid-hyperv.c:197:2-7: WARNING: NULL check before some freeing functions is not needed. drivers/hid/hid-hyperv.c:211:2-7: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Lucas Tanure Reviewed-by: Michael Kelley Reviewed-by: Wei Liu Acked-by: Benjamin Tissoires Signed-off-by: Wei Liu commit 8c1b0767ae0c4b18cd967556aa6ddc7aab5bef0d Author: Wei Liu Date: Wed Mar 4 14:47:09 2020 +0000 Hyper-V: add myself as a maintainer Signed-off-by: Wei Liu Acked-by: K. Y. Srinivasan commit acb4d372a0311cb1c2b03e471007708b2a50c5da Author: Sasha Levin Date: Wed Feb 5 16:32:42 2020 -0500 Hyper-V: Drop Sasha Levin from the Hyper-V maintainers Signed-off-by: Sasha Levin Signed-off-by: Wei Liu commit 6198adeaf21536f426a79f3d490651e52fd76d60 Author: Lukas Bulwahn Date: Wed Mar 4 22:26:00 2020 +0100 MAINTAINERS: update ALLWINNER CPUFREQ DRIVER entry Commit b30d8cf5e171 ("dt-bindings: opp: Convert Allwinner H6 OPP to a schema") converted in Documentation/devicetree/bindings/opp/ the file sun50i-nvmem-cpufreq.txt to allwinner,sun50i-h6-operating-points.yaml. Since then, ./scripts/get_maintainer.pl --self-test complains: warning: no file matches \ F: Documentation/devicetree/bindings/opp/sun50i-nvmem-cpufreq.txt Adjust the file pattern in the ALLWINNER CPUFREQ DRIVER entry. Signed-off-by: Lukas Bulwahn Signed-off-by: Rob Herring commit 3fb83cbee1de58fcd5d22f1db89460bb7c08b6e8 Author: Axel Lin Date: Wed Mar 4 22:02:41 2020 +0800 ASoC: wm8741: Fix typo in Kconfig prompt Fix trivial copy-n-paste mistake. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20200304140241.340-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 1d305ba40eb8081ff21eeb8ca6ba5c70fd920934 Author: Florian Westphal Date: Thu Mar 5 11:15:36 2020 +0100 netfilter: nf_tables: fix infinite loop when expr is not available nft will loop forever if the kernel doesn't support an expression: 1. nft_expr_type_get() appends the family specific name to the module list. 2. -EAGAIN is returned to nfnetlink, nfnetlink calls abort path. 3. abort path sets ->done to true and calls request_module for the expression. 4. nfnetlink replays the batch, we end up in nft_expr_type_get() again. 5. nft_expr_type_get attempts to append family-specific name. This one already exists on the list, so we continue 6. nft_expr_type_get adds the generic expression name to the module list. -EAGAIN is returned, nfnetlink calls abort path. 7. abort path encounters the family-specific expression which has 'done' set, so it gets removed. 8. abort path requests the generic expression name, sets done to true. 9. batch is replayed. If the expression could not be loaded, then we will end up back at 1), because the family-specific name got removed and the cycle starts again. Note that userspace can SIGKILL the nft process to stop the cycle, but the desired behaviour is to return an error after the generic expr name fails to load the expression. Fixes: eb014de4fd418 ("netfilter: nf_tables: autoload modules from the abort path") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit d78008de6103c708171baff9650a7862645d23b0 Author: Pablo Neira Ayuso Date: Tue Mar 3 15:02:45 2020 +0100 netfilter: nf_tables: dump NFTA_CHAIN_FLAGS attribute Missing NFTA_CHAIN_FLAGS netlink attribute when dumping basechain definitions. Fixes: c9626a2cbdb2 ("netfilter: nf_tables: add hardware offload support") Signed-off-by: Pablo Neira Ayuso commit 1579f1bc3b753d17a44de3457d5c6f4a5b14c752 Author: Jason A. Donenfeld Date: Sun Mar 1 22:52:35 2020 +0800 crypto: x86/curve25519 - support assemblers with no adx support Some older version of GAS do not support the ADX instructions, similarly to how they also don't support AVX and such. This commit adds the same build-time detection mechanisms we use for AVX and others for ADX, and then makes sure that the curve25519 library dispatcher calls the right functions. Reported-by: Willy Tarreau Signed-off-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit 59bee45b9712c759ea4d3dcc4eff1752f3a66558 Author: Michael Ellerman Date: Tue Mar 3 23:28:47 2020 +1100 powerpc/mm: Fix missing KUAP disable in flush_coherent_icache() Stefan reported a strange kernel fault which turned out to be due to a missing KUAP disable in flush_coherent_icache() called from flush_icache_range(). The fault looks like: Kernel attempted to access user page (7fffc30d9c00) - exploit attempt? (uid: 1009) BUG: Unable to handle kernel data access on read at 0x7fffc30d9c00 Faulting instruction address: 0xc00000000007232c Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA PowerNV CPU: 35 PID: 5886 Comm: sigtramp Not tainted 5.6.0-rc2-gcc-8.2.0-00003-gfc37a1632d40 #79 NIP: c00000000007232c LR: c00000000003b7fc CTR: 0000000000000000 REGS: c000001e11093940 TRAP: 0300 Not tainted (5.6.0-rc2-gcc-8.2.0-00003-gfc37a1632d40) MSR: 900000000280b033 CR: 28000884 XER: 00000000 CFAR: c0000000000722fc DAR: 00007fffc30d9c00 DSISR: 08000000 IRQMASK: 0 GPR00: c00000000003b7fc c000001e11093bd0 c0000000023ac200 00007fffc30d9c00 GPR04: 00007fffc30d9c18 0000000000000000 c000001e11093bd4 0000000000000000 GPR08: 0000000000000000 0000000000000001 0000000000000000 c000001e1104ed80 GPR12: 0000000000000000 c000001fff6ab380 c0000000016be2d0 4000000000000000 GPR16: c000000000000000 bfffffffffffffff 0000000000000000 0000000000000000 GPR20: 00007fffc30d9c00 00007fffc30d8f58 00007fffc30d9c18 00007fffc30d9c20 GPR24: 00007fffc30d9c18 0000000000000000 c000001e11093d90 c000001e1104ed80 GPR28: c000001e11093e90 0000000000000000 c0000000023d9d18 00007fffc30d9c00 NIP flush_icache_range+0x5c/0x80 LR handle_rt_signal64+0x95c/0xc2c Call Trace: 0xc000001e11093d90 (unreliable) handle_rt_signal64+0x93c/0xc2c do_notify_resume+0x310/0x430 ret_from_except_lite+0x70/0x74 Instruction dump: 409e002c 7c0802a6 3c62ff31 3863f6a0 f8010080 48195fed 60000000 48fe4c8d 60000000 e8010080 7c0803a6 7c0004ac <7c00ffac> 7c0004ac 4c00012c 38210070 This path through handle_rt_signal64() to setup_trampoline() and flush_icache_range() is only triggered by 64-bit processes that have unmapped their VDSO, which is rare. flush_icache_range() takes a range of addresses to flush. In flush_coherent_icache() we implement an optimisation for CPUs where we know we don't actually have to flush the whole range, we just need to do a single icbi. However we still execute the icbi on the user address of the start of the range we're flushing. On CPUs that also implement KUAP (Power9) that leads to the spurious fault above. We should be able to pass any address, including a kernel address, to the icbi on these CPUs, which would avoid any interaction with KUAP. But I don't want to make that change in a bug fix, just in case it surfaces some strange behaviour on some CPU. So for now just disable KUAP around the icbi. Note the icbi is treated as a load, so we allow read access, not write as you'd expect. Fixes: 890274c2dc4c ("powerpc/64s: Implement KUAP for Radix MMU") Cc: stable@vger.kernel.org # v5.2+ Reported-by: Stefan Berger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200303235708.26004-1-mpe@ellerman.id.au commit 2ab7e274b86739f4ceed5d94b6879f2d07b2802f Author: Yintian Tao Date: Fri Feb 28 14:24:42 2020 +0800 drm/amdgpu: clean wptr on wb when gpu recovery The TDR will be randomly failed due to compute ring test failure. If the compute ring wptr & 0x7ff(ring_buf_mask) is 0x100 then after map mqd the compute ring rptr will be synced with 0x100. And the ring test packet size is also 0x100. Then after invocation of amdgpu_ring_commit, the cp will not really handle the packet on the ring buffer because rptr is equal to wptr. Signed-off-by: Yintian Tao Acked-by: Christian König Reviewed-by: Monk Liu Signed-off-by: Alex Deucher commit 70b8ea1ab1d3ff3ad5c7491bf8995c912506da6c Merge: 755d7a928a0c 3d2ed431b8f3 Author: Dave Airlie Date: Thu Mar 5 12:59:39 2020 +1000 Merge tag 'mediatek-drm-fixes-5.6' of https://github.com/ckhu-mediatek/linux.git-tags into drm-fixes Mediatek DRM Fixes for Linux 5.6 Signed-off-by: Dave Airlie From: CK Hu Link: https://patchwork.freedesktop.org/patch/msgid/1583373069.364.4.camel@mtksdaap41 commit 755d7a928a0cdb1979be738408f2e4d4ecea1a32 Merge: 98d54f81e36b 3b6a9b19ab65 Author: Dave Airlie Date: Thu Mar 5 12:34:50 2020 +1000 Merge tag 'exynos-drm-fixes-for-v5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Three fixups - fix a kernel oops problem in case that driver is loaded as module. - fix a regulator warning issue when I2C DDC adapter cannot be gathered. - print out an error message only in error case excepting -EPROBE_DEFER. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/1583126752-30477-1-git-send-email-inki.dae@samsung.com commit a160eed4b783d7b250a32f7e5787c9867abc5686 Author: Alexandre Ghiti Date: Mon Feb 17 00:28:47 2020 -0500 riscv: Fix range looking for kernel image memblock When looking for the memblock where the kernel lives, we should check that the memory range associated to the memblock entirely comprises the kernel image and not only intersects with it. Signed-off-by: Alexandre Ghiti Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit 7589238a8cf37331607c3222a64ac3140b29532d Author: Brendan Higgins Date: Thu Feb 27 16:00:01 2020 -0800 Revert "software node: Simplify software_node_release() function" This reverts commit 3df85a1ae51f6b256982fe9d17c2dc5bfb4cc402. The reverted commit says "It's possible to release the node ID immediately when fwnode_remove_software_node() is called, no need to wait for software_node_release() with that." However, releasing the node ID before waiting for software_node_release() to be called causes the node ID to be released before the kobject and the underlying sysfs entry; this means there is a period of time where a sysfs entry exists that is associated with an unallocated node ID. Once consequence of this is that there is a race condition where it is possible to call fwnode_create_software_node() with no parent node specified (NULL) and have it fail with -EEXIST because the node ID that was assigned is still associated with a stale sysfs entry that hasn't been cleaned up yet. Although it is difficult to reproduce this race condition under normal conditions, it can be deterministically reproduced with the following minconfig on UML: CONFIG_KUNIT_DRIVER_PE_TEST=y CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_OBJECTS=y CONFIG_DEBUG_OBJECTS_TIMERS=y CONFIG_DEBUG_KOBJECT_RELEASE=y CONFIG_KUNIT=y Running the tests with this configuration causes the following failure: kobject: 'node0' ((____ptrval____)): kobject_release, parent (____ptrval____) (delayed 400) ok 1 - pe_test_uints sysfs: cannot create duplicate filename '/kernel/software_nodes/node0' CPU: 0 PID: 28 Comm: kunit_try_catch Not tainted 5.6.0-rc3-next-20200227 #14 kobject_add_internal failed for node0 with -EEXIST, don't try to register things with the same name in the same directory. kobject: 'node0' ((____ptrval____)): kobject_release, parent (____ptrval____) (delayed 100) # pe_test_uint_arrays: ASSERTION FAILED at drivers/base/test/property-entry-test.c:123 Expected node is not error, but is: -17 not ok 2 - pe_test_uint_arrays Reported-by: Heidi Fahim Signed-off-by: Brendan Higgins Reviewed-by: Heikki Krogerus Cc: 5.3+ # 5.3+ Signed-off-by: Rafael J. Wysocki commit 07f5ae220b36214cd9be489cf36ffe92d9c08944 Author: Rob Herring Date: Mon Mar 2 11:36:20 2020 -0600 dt-bindings: bus: Drop empty compatible string in example In preparation to add generic checks of compatible strings, drop the compatible as '...' is not a valid compatible string. Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring commit 776e49e8ddb5169e6477fd33a396e9c7b2eb7400 Merge: 8b614cb8f1dc 636be4241bdd Author: Linus Torvalds Date: Wed Mar 4 13:02:45 2020 -0600 Merge tag 'for-5.6/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - Fix request-based DM's congestion_fn and actually wire it up to the bdi. - Extend dm-bio-record to track additional struct bio members needed by DM integrity target. - Fix DM core to properly advertise that a device is suspended during unload (between the presuspend and postsuspend hooks). This change is a prereq for related DM integrity and DM writecache fixes. It elevates DM integrity's 'suspending' state tracking to DM core. - Four stable fixes for DM integrity target. - Fix crash in DM cache target due to incorrect work item cancelling. - Fix DM thin metadata lockdep warning that was introduced during 5.6 merge window. - Fix DM zoned target's chunk work refcounting that regressed during recent conversion to refcount_t. - Bump the minor version for DM core and all target versions that have seen interface changes or important fixes during the 5.6 cycle. * tag 'for-5.6/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm: bump version of core and various targets dm: fix congested_fn for request-based device dm integrity: use dm_bio_record and dm_bio_restore dm bio record: save/restore bi_end_io and bi_integrity dm zoned: Fix reference counter initial value of chunk works dm writecache: verify watermark during resume dm: report suspended device during destroy dm thin metadata: fix lockdep complaint dm cache: fix a crash due to incorrect work item cancelling dm integrity: fix invalid table returned due to argument count mismatch dm integrity: fix a deadlock due to offloading to an incorrect workqueue dm integrity: fix recalculation when moving from journal mode to bitmap mode commit aa2734202acc506d09c8e641db4da161f902df27 Author: Damien Le Moal Date: Wed Feb 12 19:34:24 2020 +0900 riscv: Force flat memory model with no-mmu Compilation errors trigger if ARCH_SPARSEMEM_ENABLE is enabled for a nommu kernel. Since the sparsemem model does not make sense anyway for the nommu case, do not allow selecting this option to always use the flatmem model. Signed-off-by: Damien Le Moal Reviewed-by: Anup Patel Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit 810dbc69087b08fd53e1cdd6c709f385bc2921ad Author: Bernard Metzler Date: Mon Mar 2 19:16:14 2020 +0100 RDMA/iwcm: Fix iwcm work deallocation The dealloc_work_entries() function must update the work_free_list pointer while freeing its entries, since potentially called again on same list. A second iteration of the work list caused system crash. This happens, if work allocation fails during cma_iw_listen() and free_cm_id() tries to free the list again during cleanup. Fixes: 922a8e9fb2e0 ("RDMA: iWARP Connection Manager.") Link: https://lore.kernel.org/r/20200302181614.17042-1-bmt@zurich.ibm.com Reported-by: syzbot+cb0c054eabfba4342146@syzkaller.appspotmail.com Signed-off-by: Bernard Metzler Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 12e5eef0f4d8087ea7b559f6630be08ffea2d851 Author: Bernard Metzler Date: Mon Mar 2 16:58:14 2020 +0100 RDMA/siw: Fix failure handling during device creation A failing call to ib_device_set_netdev() during device creation caused system crash due to xa_destroy of uninitialized xarray hit by device deallocation. Fixed by moving xarray initialization before potential device deallocation. Fixes: bdcf26bf9b3a ("rdma/siw: network and RDMA core interface") Link: https://lore.kernel.org/r/20200302155814.9896-1-bmt@zurich.ibm.com Reported-by: syzbot+2e80962bedd9559fe0b3@syzkaller.appspotmail.com Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe commit 78f34a16c28654cb47791257006f90d0948f2f0c Author: Mark Zhang Date: Thu Feb 27 14:51:11 2020 +0200 RDMA/nldev: Fix crash when set a QP to a new counter but QPN is missing This fixes the kernel crash when a RDMA_NLDEV_CMD_STAT_SET command is received, but the QP number parameter is not available. iwpm_register_pid: Unable to send a nlmsg (client = 2) infiniband syz1: RDMA CMA: cma_listen_on_dev, error -98 general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 0 PID: 9754 Comm: syz-executor069 Not tainted 5.6.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:nla_get_u32 include/net/netlink.h:1474 [inline] RIP: 0010:nldev_stat_set_doit+0x63c/0xb70 drivers/infiniband/core/nldev.c:1760 Code: fc 01 0f 84 58 03 00 00 e8 41 83 bf fb 4c 8b a3 58 fd ff ff 48 b8 00 00 00 00 00 fc ff df 49 8d 7c 24 04 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 6d RSP: 0018:ffffc900068bf350 EFLAGS: 00010247 RAX: dffffc0000000000 RBX: ffffc900068bf728 RCX: ffffffff85b60470 RDX: 0000000000000000 RSI: ffffffff85b6047f RDI: 0000000000000004 RBP: ffffc900068bf750 R08: ffff88808c3ee140 R09: ffff8880a25e6010 R10: ffffed10144bcddc R11: ffff8880a25e6ee3 R12: 0000000000000000 R13: ffff88809acb0000 R14: ffff888092a42c80 R15: 000000009ef2e29a FS: 0000000001ff0880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f4733e34000 CR3: 00000000a9b27000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: rdma_nl_rcv_msg drivers/infiniband/core/netlink.c:195 [inline] rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline] rdma_nl_rcv+0x5d9/0x980 drivers/infiniband/core/netlink.c:259 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x59e/0x7e0 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 ____sys_sendmsg+0x753/0x880 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmsg+0x105/0x1d0 net/socket.c:2430 __do_sys_sendmsg net/socket.c:2439 [inline] __se_sys_sendmsg net/socket.c:2437 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2437 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4403d9 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffc0efbc5c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004403d9 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000000000004 RBP: 00000000006ca018 R08: 0000000000000008 R09: 00000000004002c8 R10: 000000000000004a R11: 0000000000000246 R12: 0000000000401c60 R13: 0000000000401cf0 R14: 0000000000000000 R15: 0000000000000000 Fixes: b389327df905 ("RDMA/nldev: Allow counter manual mode configration through RDMA netlink") Link: https://lore.kernel.org/r/20200227125111.99142-1-leon@kernel.org Reported-by: syzbot+bd4af81bc51ee0283445@syzkaller.appspotmail.com Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a4e63bce1414df7ab6eb82ca9feb8494ce13e554 Author: Jason Gunthorpe Date: Thu Feb 27 13:41:18 2020 +0200 RDMA/odp: Ensure the mm is still alive before creating an implicit child Registration of a mmu_notifier requires the caller to hold a mmget() on the mm as registration is not permitted to race with exit_mmap(). There is a BUG_ON inside the mmu_notifier to guard against this. Normally creating a umem is done against current which implicitly holds the mmget(), however an implicit ODP child is created from a pagefault work queue and is not guaranteed to have a mmget(). Call mmget() around this registration and abort faulting if the MM has gone to exit_mmap(). Before the patch below the notifier was registered when the implicit ODP parent was created, so there was no chance to register a notifier outside of current. Fixes: c571feca2dc9 ("RDMA/odp: use mmu_notifier_get/put for 'struct ib_ucontext_per_mm'") Link: https://lore.kernel.org/r/20200227114118.94736-1-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e38b55ea0443da35a50a3eb2079ad3612cf763b9 Author: Maor Gottlieb Date: Thu Feb 27 13:27:08 2020 +0200 RDMA/core: Fix protection fault in ib_mr_pool_destroy Fix NULL pointer dereference in the error flow of ib_create_qp_user when accessing to uninitialized list pointers - rdma_mrs and sig_mrs. The following crash from syzkaller revealed it. kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN PTI CPU: 1 PID: 23167 Comm: syz-executor.1 Not tainted 5.5.0-rc5 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 RIP: 0010:ib_mr_pool_destroy+0x81/0x1f0 Code: 00 00 fc ff df 49 c1 ec 03 4d 01 fc e8 a8 ea 72 fe 41 80 3c 24 00 0f 85 62 01 00 00 48 8b 13 48 89 d6 4c 8d 6a c8 48 c1 ee 03 <42> 80 3c 3e 00 0f 85 34 01 00 00 48 8d 7a 08 4c 8b 02 48 89 fe 48 RSP: 0018:ffffc9000951f8b0 EFLAGS: 00010046 RAX: 0000000000040000 RBX: ffff88810f268038 RCX: ffffffff82c41628 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffc9000951f850 RBP: ffff88810f268020 R08: 0000000000000004 R09: fffff520012a3f0a R10: 0000000000000001 R11: fffff520012a3f0a R12: ffffed1021e4d007 R13: ffffffffffffffc8 R14: 0000000000000246 R15: dffffc0000000000 FS: 00007f54bc788700(0000) GS:ffff88811b100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000116920002 CR4: 0000000000360ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: rdma_rw_cleanup_mrs+0x15/0x30 ib_destroy_qp_user+0x674/0x7d0 ib_create_qp_user+0xb01/0x11c0 create_qp+0x1517/0x2130 ib_uverbs_create_qp+0x13e/0x190 ib_uverbs_write+0xaa5/0xdf0 __vfs_write+0x7c/0x100 vfs_write+0x168/0x4a0 ksys_write+0xc8/0x200 do_syscall_64+0x9c/0x390 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x465b49 Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f54bc787c58 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000073bf00 RCX: 0000000000465b49 RDX: 0000000000000040 RSI: 0000000020000540 RDI: 0000000000000003 RBP: 00007f54bc787c70 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f54bc7886bc R13: 00000000004ca2ec R14: 000000000070ded0 R15: 0000000000000005 Fixes: a060b5629ab0 ("IB/core: generic RDMA READ/WRITE API") Link: https://lore.kernel.org/r/20200227112708.93023-1-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit de5ed007a03d71daaa505f5daa4d3666530c7090 Author: Artemy Kovalyov Date: Thu Feb 27 13:39:18 2020 +0200 IB/mlx5: Fix implicit ODP race Following race may occur because of the call_srcu and the placement of the synchronize_srcu vs the xa_erase. CPU0 CPU1 mlx5_ib_free_implicit_mr: destroy_unused_implicit_child_mr: xa_erase(odp_mkeys) synchronize_srcu() xa_lock(implicit_children) if (still in xarray) atomic_inc() call_srcu() xa_unlock(implicit_children) xa_erase(implicit_children): xa_lock(implicit_children) __xa_erase() xa_unlock(implicit_children) flush_workqueue() [..] free_implicit_child_mr_rcu: (via call_srcu) queue_work() WARN_ON(atomic_read()) [..] free_implicit_child_mr_work: (via wq) free_implicit_child_mr() mlx5_mr_cache_invalidate() mlx5_ib_update_xlt() <-- UMR QP fail atomic_dec() The wait_event() solves the race because it blocks until free_implicit_child_mr_work() completes. Fixes: 5256edcb98a1 ("RDMA/mlx5: Rework implicit ODP destroy") Link: https://lore.kernel.org/r/20200227113918.94432-1-leon@kernel.org Signed-off-by: Artemy Kovalyov Reviewed-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2e5383d7904e60529136727e49629a82058a5607 Author: Tycho Andersen Date: Wed Feb 19 12:01:29 2020 -0700 cgroup1: don't call release_agent when it is "" Older (and maybe current) versions of systemd set release_agent to "" when shutting down, but do not set notify_on_release to 0. Since 64e90a8acb85 ("Introduce STATIC_USERMODEHELPER to mediate call_usermodehelper()"), we filter out such calls when the user mode helper path is "". However, when used in conjunction with an actual (i.e. non "") STATIC_USERMODEHELPER, the path is never "", so the real usermode helper will be called with argv[0] == "". Let's avoid this by not invoking the release_agent when it is "". Signed-off-by: Tycho Andersen Signed-off-by: Tejun Heo commit d4d89e25fc7b4225211c217491e5525b00cf3961 Merge: 820d15632ec1 41bae0caf5dc Author: Olof Johansson Date: Wed Mar 4 08:51:54 2020 -0800 Merge tag 'socfpga_defconfig_fix_for_v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/fixes ARM: socfpga_defconfig: add back DEBUGFS - Add back DEBUG_FS for socfpga_defconfig * tag 'socfpga_defconfig_fix_for_v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: socfpga_defconfig: Add back DEBUG_FS Link: https://lore.kernel.org/r/20200304101917.1243-1-dinguyen@kernel.org Signed-off-by: Olof Johansson commit 190ecb190a9cd8c0599d8499b901e3c32e87966a Author: Qian Cai Date: Sun Feb 23 22:00:07 2020 -0500 cgroup: fix psi_show() crash on 32bit ino archs Similar to the commit d7495343228f ("cgroup: fix incorrect WARN_ON_ONCE() in cgroup_setup_root()"), cgroup_id(root_cgrp) does not equal to 1 on 32bit ino archs which triggers all sorts of issues with psi_show() on s390x. For example, BUG: KASAN: slab-out-of-bounds in collect_percpu_times+0x2d0/ Read of size 4 at addr 000000001e0ce000 by task read_all/3667 collect_percpu_times+0x2d0/0x798 psi_show+0x7c/0x2a8 seq_read+0x2ac/0x830 vfs_read+0x92/0x150 ksys_read+0xe2/0x188 system_call+0xd8/0x2b4 Fix it by using cgroup_ino(). Fixes: 743210386c03 ("cgroup: use cgrp->kn->id as the cgroup ID") Signed-off-by: Qian Cai Acked-by: Johannes Weiner Signed-off-by: Tejun Heo Cc: stable@vger.kernel.org # v5.5 commit 65ac74f1de3334852fb7d9b1b430fa5a06524276 Author: Marc Zyngier Date: Wed Mar 4 11:11:17 2020 +0000 iommu/dma: Fix MSI reservation allocation The way cookie_init_hw_msi_region() allocates the iommu_dma_msi_page structures doesn't match the way iommu_put_dma_cookie() frees them. The former performs a single allocation of all the required structures, while the latter tries to free them one at a time. It doesn't quite work for the main use case (the GICv3 ITS where the range is 64kB) when the base granule size is 4kB. This leads to a nice slab corruption on teardown, which is easily observable by simply creating a VF on a SRIOV-capable device, and tearing it down immediately (no need to even make use of it). Fortunately, this only affects systems where the ITS isn't translated by the SMMU, which are both rare and non-standard. Fix it by allocating iommu_dma_msi_page structures one at a time. Fixes: 7c1b058c8b5a3 ("iommu/dma: Handle IOMMU API reserved regions") Signed-off-by: Marc Zyngier Reviewed-by: Eric Auger Cc: Robin Murphy Cc: Joerg Roedel Cc: Will Deacon Cc: stable@vger.kernel.org Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel commit 3261227d136d83bcb4df4e9292385fb9e007fae7 Author: Ulf Hansson Date: Tue Mar 3 16:07:45 2020 +0100 dt-bindings: power: Convert domain-idle-states bindings to json-schema While converting to the json-schema, let's also take the opportunity to further specify/clarify some more details about the DT binding. For example, let's define the label where to put the states nodes, set a pattern for nodename of the state nodes and finally add an example. Fixes: a3f048b5424e ("dt: psci: Update DT bindings to support hierarchical PSCI states") Signed-off-by: Ulf Hansson [robh: drop type refs from standard unit properties] Signed-off-by: Rob Herring commit ac9686a936a194fd3d4b8797944bdaaecf0adfda Author: Ulf Hansson Date: Tue Mar 3 16:07:44 2020 +0100 dt-bindings: arm: Fix cpu compatibles in the hierarchical example for PSCI Fixes: a3f048b5424e ("dt: psci: Update DT bindings to support hierarchical PSCI states") Signed-off-by: Ulf Hansson Signed-off-by: Rob Herring commit 8d62d9c4bc05b3d6731f3fa083eea6400871822c Author: Ulf Hansson Date: Tue Mar 3 16:07:43 2020 +0100 dt-bindings: arm: Correct links to idle states definitions The arm,idle-state DT bindings recently got converted to the json-schema, but some links are still pointing to the old, non-existing, txt file. Let's update the links to fix this. Fixes: baac82fe06db ("dt-bindings: arm: Convert arm,idle-state binding to DT schema") Signed-off-by: Ulf Hansson Signed-off-by: Rob Herring commit 31e43f31890ca6e909b27dcb539252b46aa465da Author: Ben Chuang Date: Wed Feb 19 17:29:00 2020 +0800 mmc: sdhci-pci-gli: Enable MSI interrupt for GL975x Enable MSI interrupt for GL9750/GL9755. Some platforms do not support PCI INTx and devices can not work without interrupt. Like messages below: [ 4.487132] sdhci-pci 0000:01:00.0: SDHCI controller found [17a0:9755] (rev 0) [ 4.487198] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.PBR2._PRT.APS2], AE_NOT_FOUND (20190816/psargs-330) [ 4.487397] ACPI Error: Aborting method \_SB.PCI0.PBR2._PRT due to previous error (AE_NOT_FOUND) (20190816/psparse-529) [ 4.487707] pcieport 0000:00:01.3: can't derive routing for PCI INT A [ 4.487709] sdhci-pci 0000:01:00.0: PCI INT A: no GSI Signed-off-by: Ben Chuang Tested-by: Raul E Rangel Fixes: e51df6ce668a ("mmc: host: sdhci-pci: Add Genesys Logic GL975x support") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200219092900.9151-1-benchuanggli@gmail.com Signed-off-by: Ulf Hansson commit f9981d4f50b475d7dbb70f3022b87a3c8bba9fd6 Author: Aaro Koskinen Date: Wed Mar 4 13:17:40 2020 +0200 spi: spi_register_controller(): free bus id on error paths Some error paths leave the bus id allocated. As a result the IDR allocation will fail after a deferred probe. Fix by freeing the bus id always on error. Signed-off-by: Aaro Koskinen Message-Id: <20200304111740.27915-1-aaro.koskinen@nokia.com> Signed-off-by: Mark Brown commit 02fbabd5f4ed182d2c616e49309f5a3efd9ec671 Author: Fabrice Gasnier Date: Wed Mar 4 09:55:32 2020 +0100 regulator: stm32-vrefbuf: fix a possible overshoot when re-enabling There maybe an overshoot, when disabling, then re-enabling vrefbuf too quickly. VREFBUF is used by ADC/DAC on some boards. When re-enabling too quickly, an overshoot on the reference voltage make the conversions inaccurate for a short period of time. - Don't put the VREFBUF in HiZ when disabling, to force an active discharge. - Enforce a 1ms OFF/ON delay Fixes: 0cdbf481e927 ("regulator: Add support for stm32-vrefbuf") Signed-off-by: Fabrice Gasnier Message-Id: <1583312132-20932-1-git-send-email-fabrice.gasnier@st.com> Signed-off-by: Mark Brown commit 1b79cfd99ff5127e6a143767b51694a527b3ea38 Author: John Stultz Date: Tue Mar 3 16:32:28 2020 +0000 drm: kirin: Revert "Fix for hikey620 display offset problem" This reverts commit ff57c6513820efe945b61863cf4a51b79f18b592. With the commit ff57c6513820 ("drm: kirin: Fix for hikey620 display offset problem") we added support for handling LDI overflows by resetting the hardware. However, its been observed that when we do hit the LDI overflow condition, the irq seems to be screaming, and we do nothing but stream: [drm:ade_irq_handler [kirin_drm]] *ERROR* LDI underflow! over and over to the screen I've tried a few appraoches to avoid this, but none has yet been successful and the cure here is worse then the original disease, so revert this for now. Cc: Xinliang Liu Cc: Rongrong Zou Cc: Xinwei Kong Cc: Chen Feng Cc: Sam Ravnborg Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel Fixes: ff57c6513820 ("drm: kirin: Fix for hikey620 display offset problem") Signed-off-by: John Stultz Acked-by: Xinliang Liu Signed-off-by: Xinliang Liu Link: https://patchwork.freedesktop.org/patch/msgid/20200303163228.52741-1-john.stultz@linaro.org commit 0d6defc7e0e437a9fd53622f7fd85740f38d5693 Author: Olivier Moysan Date: Wed Mar 4 11:24:06 2020 +0100 ASoC: stm32: sai: manage rebind issue The commit e894efef9ac7 ("ASoC: core: add support to card rebind") allows to rebind the sound card after a rebind of one of its component. With this commit, the sound card is actually rebound, but may be no more functional. The following problems have been seen with STM32 SAI driver. 1) DMA channel is not requested: With the sound card rebind the simplified call sequence is: stm32_sai_sub_probe snd_soc_register_component snd_soc_try_rebind_card snd_soc_instantiate_card devm_snd_dmaengine_pcm_register The problem occurs because the pcm must be registered, before snd_soc_instantiate_card() is called. Modify SAI driver, to change the call sequence as follows: stm32_sai_sub_probe devm_snd_dmaengine_pcm_register snd_soc_register_component snd_soc_try_rebind_card 2) DMA channel is not released: dma_release_channel() is not called when devm_dmaengine_pcm_release() is executed. This occurs because SND_DMAENGINE_PCM_DRV_NAME component, has already been released through devm_component_release(). devm_dmaengine_pcm_release() should be called before devm_component_release() to avoid this problem. Call snd_dmaengine_pcm_unregister() and snd_soc_unregister_component() explicitly from SAI driver, to have the right sequence. Signed-off-by: Olivier Moysan Message-Id: <20200304102406.8093-1-olivier.moysan@st.com> Signed-off-by: Mark Brown commit 77036165d8bcf7c7b2a2df28a601ec2c52bb172d Author: Saravana Kannan Date: Fri Feb 21 00:05:10 2020 -0800 driver core: Skip unnecessary work when device doesn't have sync_state() A bunch of busy work is done for devices that don't have sync_state() support. Stop doing the busy work. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20200221080510.197337-4-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit ac338acf514e7b578fa9e3742ec2c292323b4c1a Author: Saravana Kannan Date: Fri Feb 21 00:05:09 2020 -0800 driver core: Add dev_has_sync_state() Add an API to check if a device has sync_state support in its driver or bus. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20200221080510.197337-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 21eb93f432b1a785df193df1a56a59e9eb3a985f Author: Saravana Kannan Date: Fri Feb 21 00:05:08 2020 -0800 driver core: Call sync_state() even if supplier has no consumers The initial patch that added sync_state() support didn't handle the case where a supplier has no consumers. This was because when a device is successfully bound with a driver, only its suppliers were checked to see if they are eligible to get a sync_state(). This is not sufficient for devices that have no consumers but still need to do device state clean up. So fix this. Fixes: fc5a251d0fd7ca90 (driver core: Add sync_state driver/bus callback) Signed-off-by: Saravana Kannan Cc: stable Link: https://lore.kernel.org/r/20200221080510.197337-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 19f3c1e98bd1704fe22e5f8105c0677a1332cdef Merge: dad2aff3e827 be4e3c737eeb Author: Greg Kroah-Hartman Date: Wed Mar 4 13:28:52 2020 +0100 Merge tag 'phy-for-5.6-rc_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus Kishon writes: phy: for 5.6-rc *) Fix phy_get() from erroring out if device link creation failed *) Fix write timeouts in Motorola Mapphone mdm6600 PHY *) Fix Broadcom brcm-sata PHY driver to write to the correct MDIO register *) Add GMII PHY mode in supported modes of TI AM335x/437x/5xx SoCs Signed-off-by: Kishon Vijay Abraham I * tag 'phy-for-5.6-rc_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy: phy: mapphone-mdm6600: Fix timeouts by adding wake-up handling phy: brcm-sata: Correct MDIO operations for 40nm platforms phy: ti: gmii-sel: do not fail in case of gmii phy: ti: gmii-sel: fix set of copy-paste errors phy: core: Fix phy_get() to not return error on link creation failure phy: mapphone-mdm6600: Fix write timeouts with shorter GPIO toggle interval commit 169c0aa4bc17d37370f55188d9327b99d60fd9d7 Author: Chris Wilson Date: Tue Mar 3 14:00:09 2020 +0000 drm/i915/gt: Drop the timeline->mutex as we wait for retirement As we have pinned the timeline (using tl->active_count), we can safely drop the tl->mutex as we wait for what we believe to be the final request on that timeline. This is useful for ensuring that we do not block the engine heartbeat by hogging the kernel_context's timeline on a dead GPU. References: https://gitlab.freedesktop.org/drm/intel/issues/1364 Fixes: 058179e72e09 ("drm/i915/gt: Replace hangcheck by heartbeats") Fixes: f33a8a51602c ("drm/i915: Merge wait_for_timelines with retire_request") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200303140009.1494819-1-chris@chris-wilson.co.uk (cherry picked from commit 82126e596d8519baac416aee83cad938f1d23cf8) Signed-off-by: Jani Nikula commit 08f56f8f3799b2ed1c5ac7eed6d86a4926289655 Author: Chris Wilson Date: Mon Mar 2 08:57:57 2020 +0000 drm/i915/perf: Reintroduce wait on OA configuration completion We still need to wait for the initial OA configuration to happen before we enable OA report writes to the OA buffer. Reported-by: Lionel Landwerlin Fixes: 15d0ace1f876 ("drm/i915/perf: execute OA configuration from command stream") Closes: https://gitlab.freedesktop.org/drm/intel/issues/1356 Testcase: igt/perf/stream-open-close Signed-off-by: Chris Wilson Cc: Lionel Landwerlin Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20200302085812.4172450-7-chris@chris-wilson.co.uk (cherry picked from commit 4b4e973d5eb89244b67d3223b60f752d0479f253) Signed-off-by: Jani Nikula commit d1d17a359ce6901545c075d7401c10179d9cedfd Author: Xin Long Date: Wed Mar 4 16:51:42 2020 +0800 esp: remove the skb from the chain when it's enqueued in cryptd_wq Xiumei found a panic in esp offload: BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 RIP: 0010:esp_output_done+0x101/0x160 [esp4] Call Trace: ? esp_output+0x180/0x180 [esp4] cryptd_aead_crypt+0x4c/0x90 cryptd_queue_worker+0x6e/0xa0 process_one_work+0x1a7/0x3b0 worker_thread+0x30/0x390 ? create_worker+0x1a0/0x1a0 kthread+0x112/0x130 ? kthread_flush_work_fn+0x10/0x10 ret_from_fork+0x35/0x40 It was caused by that skb secpath is used in esp_output_done() after it's been released elsewhere. The tx path for esp offload is: __dev_queue_xmit()-> validate_xmit_skb_list()-> validate_xmit_xfrm()-> esp_xmit()-> esp_output_tail()-> aead_request_set_callback(esp_output_done) <--[1] crypto_aead_encrypt() <--[2] In [1], .callback is set, and in [2] it will trigger the worker schedule, later on a kernel thread will call .callback(esp_output_done), as the call trace shows. But in validate_xmit_xfrm(): skb_list_walk_safe(skb, skb2, nskb) { ... err = x->type_offload->xmit(x, skb2, esp_features); [esp_xmit] ... } When the err is -EINPROGRESS, which means this skb2 will be enqueued and later gets encrypted and sent out by .callback later in a kernel thread, skb2 should be removed fromt skb chain. Otherwise, it will get processed again outside validate_xmit_xfrm(), which could release skb secpath, and cause the panic above. This patch is to remove the skb from the chain when it's enqueued in cryptd_wq. While at it, remove the unnecessary 'if (!skb)' check. Fixes: 3dca3f38cfb8 ("xfrm: Separate ESP handling from segmentation for GRO packets.") Reported-by: Xiumei Mu Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit b95b4d5ef061806fde07a6a3255e6c07f4fed0d3 Merge: 8b614cb8f1dc b5c0951860ba Author: Ingo Molnar Date: Wed Mar 4 11:54:10 2020 +0100 Merge tag 'perf-urgent-for-mingo-5.6-20200303' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: perf symbols: Arnaldo Carvalho de Melo: - Don't try to find a vmlinux file when looking for kernel modules, fixing symbol resolution in systems with compressed kernel modules. perf env: Arnaldo Carvalho de Melo: - Do not return pointers to local variables, fixing valid warning from gcc 10 for corner case that stops the build due to -Werror. perf tests: Arnaldo Carvalho de Melo: - Make global variable static in the bp_account entry to fix build with gcc 10. perf parse-events: Arnaldo Carvalho de Melo: - Use asprintf() instead of strncpy() to read tracepoint files, addressing compiler warning that stops the build as we use -Werror. perf bench: Arnaldo Carvalho de Melo: - Share some global variables to fix build with gcc 10. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit df057c914a9c219ac8b8ed22caf7da2f80c1fe26 Author: Niklas Schnelle Date: Thu Feb 27 12:17:18 2020 +0100 s390/pci: Fix unexpected write combine on resource In the initial MIO support introduced in commit 71ba41c9b1d9 ("s390/pci: provide support for MIO instructions") zpci_map_resource() and zpci_setup_resources() default to using the mio_wb address as the resource's start address. This means users of the mapping, which includes most drivers, will get write combining on PCI Stores. This may lead to problems when drivers expect write through behavior when not using an explicit ioremap_wc(). Cc: stable@vger.kernel.org Fixes: 71ba41c9b1d9 ("s390/pci: provide support for MIO instructions") Signed-off-by: Niklas Schnelle Reviewed-by: Pierre Morel Signed-off-by: Vasily Gorbik commit 582b4e55403e053d8a48ff687a05174da9cc3fb0 Author: Gerald Schaefer Date: Thu Feb 27 12:56:42 2020 +0100 s390/mm: fix panic in gup_fast on large pud On s390 there currently is no implementation of pud_write(). That was ok as long as we had our own implementation of get_user_pages_fast() which checked for pud protection by testing the bit directly w/o using pud_write(). The other callers of pud_write() are not reachable on s390. After commit 1a42010cdc26 ("s390/mm: convert to the generic get_user_pages_fast code") we use the generic get_user_pages_fast(), which does call pud_write() in pud_access_permitted() for FOLL_WRITE access on a large pud. Without an s390 specific pud_write(), the generic version is called, which contains a BUG() statement to remind us that we don't have a proper implementation. This results in a kernel panic. Fix this by providing an implementation of pud_write(). Cc: # 5.2+ Fixes: 1a42010cdc26 ("s390/mm: convert to the generic get_user_pages_fast code") Signed-off-by: Gerald Schaefer Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 41bae0caf5dc216c7b43712b8c2b6a0d63b4d655 Author: Dinh Nguyen Date: Mon Feb 3 15:55:09 2020 -0600 ARM: socfpga_defconfig: Add back DEBUG_FS Commit 0e4a459f56c3 ("tracing: Remove unnecessary DEBUG_FS dependency") removed select for DEBUG_FS but we still need it for development purposes. Fixes: 0e4a459f56c3 ("tracing: Remove unnecessary DEBUG_FS dependency") Signed-off-by: Dinh Nguyen commit dad2aff3e827b112f27fa5e6f2bf87a110067c3f Author: Pratham Pratap Date: Mon Mar 2 21:44:43 2020 +0000 usb: dwc3: gadget: Update chain bit correctly when using sg list If scatter-gather operation is allowed, a large USB request is split into multiple TRBs. For preparing TRBs for sg list, driver iterates over the list and creates TRB for each sg and mark the chain bit to false for the last sg. The current IOMMU driver is clubbing the list of sgs which shares a page boundary into one and giving it to USB driver. With this the number of sgs mapped it not equal to the the number of sgs passed. Because of this USB driver is not marking the chain bit to false since it couldn't iterate to the last sg. This patch addresses this issue by marking the chain bit to false if it is the last mapped sg. At a practical level, this patch resolves USB transfer stalls seen with adb on dwc3 based db845c, pixel3 and other qcom hardware after functionfs gadget added scatter-gather support around v4.20. Credit also to Anurag Kumar Vulisha who implemented a very similar fix to this issue. Cc: Felipe Balbi Cc: Yang Fei Cc: Thinh Nguyen Cc: Tejas Joglekar Cc: Andrzej Pietrasiewicz Cc: Jack Pham Cc: Todd Kjos Cc: Greg KH Cc: Linux USB List Cc: stable #4.20+ Signed-off-by: Pratham Pratap [jstultz: Slight tweak to remove sg_is_last() usage, reworked commit message, minor comment tweak] Signed-off-by: John Stultz Link: https://lore.kernel.org/r/20200302214443.55783-1-john.stultz@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1f8b39bc99a31759e97a0428a5c3f64802c1e61d Author: Eugeniu Rosca Date: Wed Feb 26 18:50:36 2020 +0100 usb: core: port: do error out if usb_autopm_get_interface() fails Reviewing a fresh portion of coverity defects in USB core (specifically CID 1458999), Alan Stern noted below in [1]: On Tue, Feb 25, 2020 at 02:39:23PM -0500, Alan Stern wrote: > A revised search finds line 997 in drivers/usb/core/hub.c and lines > 216, 269 in drivers/usb/core/port.c. (I didn't try looking in any > other directories.) AFAICT all three of these should check the > return value, although a error message in the kernel log probably > isn't needed. Factor out the usb_port_runtime_{resume,suspend}() changes into a standalone patch to allow conflict-free porting on top of stable v3.9+. [1] https://lore.kernel.org/lkml/Pine.LNX.4.44L0.2002251419120.1485-100000@iolanthe.rowland.org Fixes: 971fcd492cebf5 ("usb: add runtime pm support for usb port device") Cc: stable@vger.kernel.org # v3.9+ Suggested-by: Alan Stern Signed-off-by: Eugeniu Rosca Acked-by: Alan Stern Link: https://lore.kernel.org/r/20200226175036.14946-3-erosca@de.adit-jv.com Signed-off-by: Greg Kroah-Hartman commit 60e3f6e4ac5b0fda43dad01c32e09409ec710045 Author: Eugeniu Rosca Date: Wed Feb 26 18:50:35 2020 +0100 usb: core: hub: do error out if usb_autopm_get_interface() fails Reviewing a fresh portion of coverity defects in USB core (specifically CID 1458999), Alan Stern noted below in [1]: On Tue, Feb 25, 2020 at 02:39:23PM -0500, Alan Stern wrote: > A revised search finds line 997 in drivers/usb/core/hub.c and lines > 216, 269 in drivers/usb/core/port.c. (I didn't try looking in any > other directories.) AFAICT all three of these should check the > return value, although a error message in the kernel log probably > isn't needed. Factor out the usb_remove_device() change into a standalone patch to allow conflict-free integration on top of the earliest stable branches. [1] https://lore.kernel.org/lkml/Pine.LNX.4.44L0.2002251419120.1485-100000@iolanthe.rowland.org Fixes: 253e05724f9230 ("USB: add a "remove hardware" sysfs attribute") Cc: stable@vger.kernel.org # v2.6.33+ Suggested-by: Alan Stern Signed-off-by: Eugeniu Rosca Acked-by: Alan Stern Link: https://lore.kernel.org/r/20200226175036.14946-2-erosca@de.adit-jv.com Signed-off-by: Greg Kroah-Hartman commit 63d6d7ed475c53dc1cabdfedf63de1fd8dcd72ee Author: Eugeniu Rosca Date: Wed Feb 26 18:50:34 2020 +0100 usb: core: hub: fix unhandled return by employing a void function Address below Coverity complaint (Feb 25, 2020, 8:06 AM CET): *** CID 1458999: Error handling issues (CHECKED_RETURN) /drivers/usb/core/hub.c: 1869 in hub_probe() 1863 1864 if (id->driver_info & HUB_QUIRK_CHECK_PORT_AUTOSUSPEND) 1865 hub->quirk_check_port_auto_suspend = 1; 1866 1867 if (id->driver_info & HUB_QUIRK_DISABLE_AUTOSUSPEND) { 1868 hub->quirk_disable_autosuspend = 1; >>> CID 1458999: Error handling issues (CHECKED_RETURN) >>> Calling "usb_autopm_get_interface" without checking return value (as is done elsewhere 97 out of 111 times). 1869 usb_autopm_get_interface(intf); 1870 } 1871 1872 if (hub_configure(hub, &desc->endpoint[0].desc) >= 0) 1873 return 0; 1874 Rather than checking the return value of 'usb_autopm_get_interface()', switch to the usb_autopm_get_interface_no_resume() API, as per: On Tue, Feb 25, 2020 at 10:32:32AM -0500, Alan Stern wrote: ------ 8< ------ > This change (i.e. 'ret = usb_autopm_get_interface') is not necessary, > because the resume operation cannot fail at this point (interfaces > are always powered-up during probe). A better solution would be to > call usb_autopm_get_interface_no_resume() instead. ------ 8< ------ Fixes: 1208f9e1d758c9 ("USB: hub: Fix the broken detection of USB3 device in SMSC hub") Cc: Hardik Gajjar Cc: stable@vger.kernel.org # v4.14+ Reported-by: scan-admin@coverity.com Suggested-by: Alan Stern Signed-off-by: Eugeniu Rosca Acked-by: Alan Stern Link: https://lore.kernel.org/r/20200226175036.14946-1-erosca@de.adit-jv.com Signed-off-by: Greg Kroah-Hartman commit 86d92f5465958752481269348d474414dccb1552 Author: Jim Lin Date: Mon Mar 2 22:21:35 2020 +0800 usb: storage: Add quirk for Samsung Fit flash Current driver has 240 (USB2.0) and 2048 (USB3.0) as max_sectors, e.g., /sys/bus/scsi/devices/0:0:0:0/max_sectors If data access times out, driver error handling will issue a port reset. Sometimes Samsung Fit (090C:1000) flash disk will not respond to later Set Address or Get Descriptor command. Adding this quirk to limit max_sectors to 64 sectors to avoid issue occurring. Signed-off-by: Jim Lin Acked-by: Alan Stern Cc: stable Link: https://lore.kernel.org/r/1583158895-31342-1-git-send-email-jilin@nvidia.com Signed-off-by: Greg Kroah-Hartman commit b96ed52d781a2026d0c0daa5787c6f3d45415862 Author: Dan Lazewatsky Date: Wed Feb 26 14:34:38 2020 +0000 usb: quirks: add NO_LPM quirk for Logitech Screen Share LPM on the device appears to cause xHCI host controllers to claim that there isn't enough bandwidth to support additional devices. Signed-off-by: Dan Lazewatsky Cc: stable Signed-off-by: Gustavo Padovan Link: https://lore.kernel.org/r/20200226143438.1445-1-gustavo.padovan@collabora.com Signed-off-by: Greg Kroah-Hartman commit f06947f275f1838586792c17b6ab70da82ed7b43 Author: Marco Felsch Date: Wed Feb 26 08:26:44 2020 +0100 usb: usb251xb: fix regulator probe and error handling Commit 4d7201cda226 ("usb: usb251xb: add vdd supply support") didn't covered the non-DT use-case and so the regualtor_enable() call during probe will fail on those platforms. Also the commit didn't handled the error case correctly. Move devm_regulator_get() out of usb251xb_get_ofdata() to address the 1st issue. This can be done without worries because devm_regulator_get() handles the non-DT use-case too. Add devm_add_action_or_reset() to address the 2nd bug. Fixes: 4d7201cda226 ("usb: usb251xb: add vdd supply support") Signed-off-by: Marco Felsch Cc: stable Acked-by: Richard Leitner Link: https://lore.kernel.org/r/20200226072644.18490-1-m.felsch@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 96b4ea324ae92386db2b0c73ace597c80cde1ecb Author: Rikard Falkeborn Date: Sun Feb 23 00:41:25 2020 +0100 phy: allwinner: Fix GENMASK misuse Arguments are supposed to be ordered high then low. Fixes: a228890f9458 ("phy: allwinner: add phy driver for USB3 PHY on Allwinner H6 SoC") Signed-off-by: Rikard Falkeborn Tested-by: Ondrej Jirman Signed-off-by: Ondrej Jirman Acked-by: Maxime Ripard Acked-by: Chen-Yu Tsai Cc: stable Link: https://lore.kernel.org/r/20191110124355.1569-1-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4bf2dd65135a2d7fe202f7c10d65b51bcf645ac6 Author: Peter Chen Date: Wed Feb 19 22:14:55 2020 +0800 usb: cdns3: gadget: toggle cycle bit before reset endpoint If there are TRBs pending during reset endpoint operation, the DMA will advance after reset operation, but it isn't expected, since the data is not yet available (For OUT, the data is not yet available). After the data is ready, there won't be any interrupt since the EP_TRADDR already points to next TRB entry and doorbell is not set. To fix it, it toggles cycle bit before reset operation, and restores it after reset, it could avoid unexpected DMA advance due to cycle bit is for software during the endpoint reset operation. Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Signed-off-by: Peter Chen Cc: stable Link: https://lore.kernel.org/r/20200219141455.23257-3-peter.chen@nxp.com Signed-off-by: Greg Kroah-Hartman commit 8a7c47fb7285b23ca259c888016513d5566fa9e8 Author: Peter Chen Date: Wed Feb 19 22:14:54 2020 +0800 usb: cdns3: gadget: link trb should point to next request It has marked the dequeue trb as link trb, but its next segment pointer is still itself, it causes the transfer can't go on. Fix it by set its pointer as the trb address for the next request. Fixes: f616c3bda47e ("usb: cdns3: Fix dequeue implementation") Signed-off-by: Peter Chen Cc: stable Link: https://lore.kernel.org/r/20200219141455.23257-2-peter.chen@nxp.com Signed-off-by: Greg Kroah-Hartman commit e9d0e7511fda92a6511904996dd0aa57b6d7687a Author: Dan Carpenter Date: Tue Mar 3 13:17:16 2020 +0300 thunderbolt: Fix error code in tb_port_is_width_supported() This function is type bool, and it's supposed to return true on success. Unfortunately, this path takes negative error codes and casts them to bool (true) so it's treated as success instead of failure. Fixes: 91c0c12080d0 ("thunderbolt: Add support for lane bonding") Signed-off-by: Dan Carpenter Signed-off-by: Mika Westerberg commit 209c65b61d94344522c41a83cd6ce51aac5fd0a4 Author: Dajun Jin Date: Mon Mar 2 20:24:21 2020 -0800 drivers/of/of_mdio.c:fix of_mdiobus_register() When registers a phy_device successful, should terminate the loop or the phy_device would be registered in other addr. If there are multiple PHYs without reg properties, it will go wrong. Signed-off-by: Dajun Jin Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 116ca924aea664141afa86a1425edc3fcda0d06f Author: Vishal Kulkarni Date: Mon Mar 2 10:54:13 2020 +0530 cxgb4: fix checks for max queues to allocate Hardware can support more than 8 queues currently limited by netif_get_num_default_rss_queues(). So, rework and fix checks for max number of queues to allocate. The checks should be based on how many are actually supported by hardware, OR the number of online cpus; whichever is lower. Fixes: 5952dde72307 ("cxgb4: set maximal number of default RSS queues") Signed-off-by: Vishal Kulkarni " Signed-off-by: David S. Miller commit 20d8bb0d172d87dcc52727cb7174ae9994de8978 Author: Hauke Mehrtens Date: Mon Mar 2 00:55:02 2020 +0100 phylink: Improve error message when validate failed This should improve the error message when the PHY validate in the MAC driver failed. I ran into this problem multiple times that I put wrong interface values into the device tree and was searching why it is failing with -22 (-EINVAL). This should make it easier to spot the problem. Signed-off-by: Hauke Mehrtens Acked-by: Russell King Signed-off-by: David S. Miller commit 43de81b0601df7d7988d3f5617ee0987df65c883 Author: Jonas Gorski Date: Mon Mar 2 20:46:57 2020 +0100 net: phy: bcm63xx: fix OOPS due to missing driver name 719655a14971 ("net: phy: Replace phy driver features u32 with link_mode bitmap") was a bit over-eager and also removed the second phy driver's name, resulting in a nasty OOPS on registration: [ 1.319854] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 804dd50c, ra == 804dd4f0 [ 1.330859] Oops[#1]: [ 1.333138] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.22 #0 [ 1.339217] $ 0 : 00000000 00000001 87ca7f00 805c1874 [ 1.344590] $ 4 : 00000000 00000047 00585000 8701f800 [ 1.349965] $ 8 : 8701f800 804f4a5c 00000003 64726976 [ 1.355341] $12 : 00000001 00000000 00000000 00000114 [ 1.360718] $16 : 87ca7f80 00000000 00000000 80639fe4 [ 1.366093] $20 : 00000002 00000000 806441d0 80b90000 [ 1.371470] $24 : 00000000 00000000 [ 1.376847] $28 : 87c1e000 87c1fda0 80b90000 804dd4f0 [ 1.382224] Hi : d1c8f8da [ 1.385180] Lo : 5518a480 [ 1.388182] epc : 804dd50c kset_find_obj+0x3c/0x114 [ 1.393345] ra : 804dd4f0 kset_find_obj+0x20/0x114 [ 1.398530] Status: 10008703 KERNEL EXL IE [ 1.402833] Cause : 00800008 (ExcCode 02) [ 1.406952] BadVA : 00000000 [ 1.409913] PrId : 0002a075 (Broadcom BMIPS4350) [ 1.414745] Modules linked in: [ 1.417895] Process swapper/0 (pid: 1, threadinfo=(ptrval), task=(ptrval), tls=00000000) [ 1.426214] Stack : 87cec000 80630000 80639370 80640658 80640000 80049af4 80639fe4 8063a0d8 [ 1.434816] 8063a0d8 802ef078 00000002 00000000 806441d0 80b90000 8063a0d8 802ef114 [ 1.443417] 87cea0de 87c1fde0 00000000 804de488 87cea000 8063a0d8 8063a0d8 80334e48 [ 1.452018] 80640000 8063984c 80639bf4 00000000 8065de48 00000001 8063a0d8 80334ed0 [ 1.460620] 806441d0 80b90000 80b90000 802ef164 8065dd70 80620000 80b90000 8065de58 [ 1.469222] ... [ 1.471734] Call Trace: [ 1.474255] [<804dd50c>] kset_find_obj+0x3c/0x114 [ 1.479141] [<802ef078>] driver_find+0x1c/0x44 [ 1.483665] [<802ef114>] driver_register+0x74/0x148 [ 1.488719] [<80334e48>] phy_driver_register+0x9c/0xd0 [ 1.493968] [<80334ed0>] phy_drivers_register+0x54/0xe8 [ 1.499345] [<8001061c>] do_one_initcall+0x7c/0x1f4 [ 1.504374] [<80644ed8>] kernel_init_freeable+0x1d4/0x2b4 [ 1.509940] [<804f4e24>] kernel_init+0x10/0xf8 [ 1.514502] [<80018e68>] ret_from_kernel_thread+0x14/0x1c [ 1.520040] Code: 1060000c 02202025 90650000 <90810000> 24630001 14250004 24840001 14a0fffb 90650000 [ 1.530061] [ 1.531698] ---[ end trace d52f1717cd29bdc8 ]--- Fix it by readding the name. Fixes: 719655a14971 ("net: phy: Replace phy driver features u32 with link_mode bitmap") Signed-off-by: Jonas Gorski Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 707518348ae7337db34bdeb544edf254f66e20f2 Author: Jacob Keller Date: Mon Mar 2 14:21:19 2020 -0800 devlink: remove trigger command from devlink-region.rst The devlink trigger command does not exist. While rewriting the documentation for devlink into the reStructuredText format, documentation for the trigger command was accidentally merged in. This occurred because the author was also working on a potential extension to devlink regions which included this trigger command, and accidentally squashed the documentation incorrectly. Further review eventually settled on using the previously unused "new" command instead of creating a new trigger command. Fix this by removing mention of the trigger command from the documentation. Fixes: 0b0f945f5458 ("devlink: add a file documenting devlink regions", 2020-01-10) Noticed-by: Jiri Pirko Signed-off-by: Jacob Keller Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 88a637719a1570705c02cacb3297af164b1714e7 Author: Jakub Kicinski Date: Mon Mar 2 21:08:33 2020 -0800 netfilter: nft_tunnel: add missing attribute validation for tunnels Add missing attribute validation for tunnel source and destination ports to the netlink policy. Fixes: af308b94a2a4 ("netfilter: nf_tables: add tunnel support") Signed-off-by: Jakub Kicinski Signed-off-by: Pablo Neira Ayuso commit 9d6effb2f1523eb84516e44213c00f2fd9e6afff Author: Jakub Kicinski Date: Mon Mar 2 21:08:32 2020 -0800 netfilter: nft_payload: add missing attribute validation for payload csum flags Add missing attribute validation for NFTA_PAYLOAD_CSUM_FLAGS to the netlink policy. Fixes: 1814096980bb ("netfilter: nft_payload: layer 4 checksum adjustment for pseudoheader fields") Signed-off-by: Jakub Kicinski Signed-off-by: Pablo Neira Ayuso commit c049b3450072b8e3998053490e025839fecfef31 Author: Jakub Kicinski Date: Mon Mar 2 21:08:31 2020 -0800 netfilter: cthelper: add missing attribute validation for cthelper Add missing attribute validation for cthelper to the netlink policy. Fixes: 12f7a505331e ("netfilter: add user-space connection tracking helper infrastructure") Signed-off-by: Jakub Kicinski Signed-off-by: Pablo Neira Ayuso commit 2d285f26ecd072800a29c5b71e63437f21ef830a Author: Florian Westphal Date: Mon Mar 2 21:58:50 2020 +0100 netfilter: nf_tables: free flowtable hooks on hook register error If hook registration fails, the hooks allocated via nft_netdev_hook_alloc need to be freed. We can't change the goto label to 'goto 5' -- while it does fix the memleak it does cause a warning splat from the netfilter core (the hooks were not registered). Fixes: 3f0465a9ef02 ("netfilter: nf_tables: dynamically allocate hooks per net_device in flowtables") Reported-by: syzbot+a2ff6fa45162a5ed4dd3@syzkaller.appspotmail.com Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit ee84f19cbbe9cf7cba2958acb03163fed3ecbb0f Author: Vasily Averin Date: Tue Feb 25 10:07:12 2020 +0300 netfilter: x_tables: xt_mttg_seq_next should increase position index If .next function does not change position index, following .show function will repeat output related to current position index. Without patch: # dd if=/proc/net/ip_tables_matches # original file output conntrack conntrack conntrack recent recent icmp udplite udp tcp 0+1 records in 0+1 records out 65 bytes copied, 5.4074e-05 s, 1.2 MB/s # dd if=/proc/net/ip_tables_matches bs=62 skip=1 dd: /proc/net/ip_tables_matches: cannot skip to specified offset cp <<< end of last line tcp <<< and then unexpected whole last line once again 0+1 records in 0+1 records out 7 bytes copied, 0.000102447 s, 68.3 kB/s Cc: stable@vger.kernel.org Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code ...") Link: https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: Pablo Neira Ayuso commit db25517a550926f609c63054b12ea9ad515e1a10 Author: Vasily Averin Date: Tue Feb 25 10:06:29 2020 +0300 netfilter: xt_recent: recent_seq_next should increase position index If .next function does not change position index, following .show function will repeat output related to current position index. Without the patch: # dd if=/proc/net/xt_recent/SSH # original file outpt src=127.0.0.4 ttl: 0 last_seen: 6275444819 oldest_pkt: 1 6275444819 src=127.0.0.2 ttl: 0 last_seen: 6275438906 oldest_pkt: 1 6275438906 src=127.0.0.3 ttl: 0 last_seen: 6275441953 oldest_pkt: 1 6275441953 0+1 records in 0+1 records out 204 bytes copied, 6.1332e-05 s, 3.3 MB/s Read after lseek into middle of last line (offset 140 in example below) generates expected end of last line and then unexpected whole last line once again # dd if=/proc/net/xt_recent/SSH bs=140 skip=1 dd: /proc/net/xt_recent/SSH: cannot skip to specified offset 127.0.0.3 ttl: 0 last_seen: 6275441953 oldest_pkt: 1 6275441953 src=127.0.0.3 ttl: 0 last_seen: 6275441953 oldest_pkt: 1 6275441953 0+1 records in 0+1 records out 132 bytes copied, 6.2487e-05 s, 2.1 MB/s Cc: stable@vger.kernel.org Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code ...") Link: https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: Pablo Neira Ayuso commit bb71f846a0002239f7058c84f1496648ff4a5c20 Author: Vasily Averin Date: Tue Feb 25 10:05:59 2020 +0300 netfilter: synproxy: synproxy_cpu_seq_next should increase position index If .next function does not change position index, following .show function will repeat output related to current position index. Cc: stable@vger.kernel.org Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code ...") Link: https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: Pablo Neira Ayuso commit dc15af8e9dbd039ebb06336597d2c491ef46ab74 Author: Vasily Averin Date: Tue Feb 25 10:05:47 2020 +0300 netfilter: nf_conntrack: ct_cpu_seq_next should increase position index If .next function does not change position index, following .show function will repeat output related to current position index. Cc: stable@vger.kernel.org Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code ...") Link: https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: Pablo Neira Ayuso commit 820d15632ec10bc0cf79595c5a635b795d149520 Merge: 0b86b258e644 8c867387160e Author: Olof Johansson Date: Tue Mar 3 16:40:54 2020 -0800 Merge tag 'socfpga_dts_fix_for_v5.6_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/fixes arm64: dts: agilex: fix gmac compatible - The compatible for Agilex GMAC should be "altr,socfpga-stmmac-a10-s10" * tag 'socfpga_dts_fix_for_v5.6_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: (578 commits) arm64: dts: socfpga: agilex: Fix gmac compatible Linux 5.6-rc4 KVM: VMX: check descriptor table exits on instruction emulation ext4: potential crash on allocation error in ext4_alloc_flex_bg_array() macintosh: therm_windtunnel: fix regression when instantiating devices jbd2: fix data races at struct journal_head kvm: x86: Limit the number of "kvm: disabled by bios" messages KVM: x86: avoid useless copy of cpufreq policy KVM: allow disabling -Werror KVM: x86: allow compiling as non-module with W=1 KVM: Pre-allocate 1 cpumask variable per cpu for both pv tlb and pv ipis KVM: Introduce pv check helpers KVM: let declaration of kvm_get_running_vcpus match implementation KVM: SVM: allocate AVIC data structures based on kvm_amd module parameter MAINTAINERS: Correct Cadence PCI driver path io_uring: fix 32-bit compatability with sendmsg/recvmsg net: dsa: mv88e6xxx: Fix masking of egress port mlxsw: pci: Wait longer before accessing the device after reset sfc: fix timestamp reconstruction at 16-bit rollover points vsock: fix potential deadlock in transport->release() ... Link: https://lore.kernel.org/r/20200303153509.28248-1-dinguyen@kernel.org Signed-off-by: Olof Johansson commit f8a0fea9518c5ff7c37679504bd9eeabeae8ee36 Author: Jonathan Neuschäfer Date: Tue Mar 3 21:22:05 2020 +0100 docs: networking: net_failover: Fix a few typos Signed-off-by: Jonathan Neuschäfer Signed-off-by: David S. Miller commit 8640f8dc6d657ebfb4e67c202ad32c5457858a13 Author: Russell King Date: Tue Mar 3 15:01:46 2020 +0000 net: dsa: fix phylink_start()/phylink_stop() calls Place phylink_start()/phylink_stop() inside dsa_port_enable() and dsa_port_disable(), which ensures that we call phylink_stop() before tearing down phylink - which is a documented requirement. Failure to do so can cause use-after-free bugs. Fixes: 0e27921816ad ("net: dsa: Use PHYLINK for the CPU/DSA ports") Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 8b614cb8f1dcac8ca77cf4dd85f46ef3055f8238 Merge: 2873dc25477f fb4b5f13464c Author: Linus Torvalds Date: Tue Mar 3 17:31:19 2020 -0600 Merge tag '5.6-rc4-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Five small cifs/smb3 fixes, two for stable (one for a reconnect problem and the other fixes a use case when renaming an open file)" * tag '5.6-rc4-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: Use #define in cifs_dbg cifs: fix rename() by ensuring source handle opened with DELETE bit cifs: add missing mount option to /proc/mounts cifs: fix potential mismatch of UNC paths cifs: don't leak -EAGAIN for stat() during reconnect commit f650bcd4ef5d6e2330593dbaaa814ffc945a9855 Merge: a6fbcddad6a4 0d29169a708b Author: David S. Miller Date: Tue Mar 3 14:43:17 2020 -0800 Merge branch 'Fix-IPv6-peer-route-update' Hangbin Liu says: ==================== Fix IPv6 peer route update Currently we have two issues for peer route update on IPv6. 1. When update peer route metric, we only updated the local one. 2. If peer address changed, we didn't remove the old one and add new one. The first two patches fixed these issues and the third patch add new tests to cover it. With the fixes and updated test: ]# ./fib_tests.sh IPv6 prefix route tests TEST: Default metric [ OK ] TEST: User specified metric on first device [ OK ] TEST: User specified metric on second device [ OK ] TEST: Delete of address on first device [ OK ] TEST: Modify metric of address [ OK ] TEST: Prefix route removed on link down [ OK ] TEST: Prefix route with metric on link up [ OK ] TEST: Set metric with peer route on local side [ OK ] TEST: User specified metric on local address [ OK ] TEST: Set metric with peer route on peer side [ OK ] TEST: Modify metric with peer route on local side [ OK ] TEST: Modify metric with peer route on peer side [ OK ] IPv4 prefix route tests TEST: Default metric [ OK ] TEST: User specified metric on first device [ OK ] TEST: User specified metric on second device [ OK ] TEST: Delete of address on first device [ OK ] TEST: Modify metric of address [ OK ] TEST: Prefix route removed on link down [ OK ] TEST: Prefix route with metric on link up [ OK ] TEST: Modify metric of .0/24 address [ OK ] TEST: Set metric of address with peer route [ OK ] TEST: Modify metric of address with peer route [ OK ] Tests passed: 22 Tests failed: 0 ==================== Signed-off-by: David S. Miller commit 0d29169a708bf730ede287248e429d579f432d1d Author: Hangbin Liu Date: Tue Mar 3 14:37:36 2020 +0800 selftests/net/fib_tests: update addr_metric_test for peer route testing This patch update {ipv4, ipv6}_addr_metric_test with 1. Set metric of address with peer route and see if the route added correctly. 2. Modify metric and peer address for peer route and see if the route changed correctly. Signed-off-by: Hangbin Liu Reviewed-by: David Ahern Signed-off-by: David S. Miller commit d0098e4c6b83e502cc1cd96d67ca86bc79a6c559 Author: Hangbin Liu Date: Tue Mar 3 14:37:35 2020 +0800 net/ipv6: remove the old peer route if change it to a new one When we modify the peer route and changed it to a new one, we should remove the old route first. Before the fix: + ip addr add dev dummy1 2001:db8::1 peer 2001:db8::2 + ip -6 route show dev dummy1 2001:db8::1 proto kernel metric 256 pref medium 2001:db8::2 proto kernel metric 256 pref medium + ip addr change dev dummy1 2001:db8::1 peer 2001:db8::3 + ip -6 route show dev dummy1 2001:db8::1 proto kernel metric 256 pref medium 2001:db8::2 proto kernel metric 256 pref medium After the fix: + ip addr change dev dummy1 2001:db8::1 peer 2001:db8::3 + ip -6 route show dev dummy1 2001:db8::1 proto kernel metric 256 pref medium 2001:db8::3 proto kernel metric 256 pref medium This patch depend on the previous patch "net/ipv6: need update peer route when modify metric" to update new peer route after delete old one. Signed-off-by: Hangbin Liu Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 617940123e0140521f3080d2befc2bf55bcda094 Author: Hangbin Liu Date: Tue Mar 3 14:37:34 2020 +0800 net/ipv6: need update peer route when modify metric When we modify the route metric, the peer address's route need also be updated. Before the fix: + ip addr add dev dummy1 2001:db8::1 peer 2001:db8::2 metric 60 + ip -6 route show dev dummy1 2001:db8::1 proto kernel metric 60 pref medium 2001:db8::2 proto kernel metric 60 pref medium + ip addr change dev dummy1 2001:db8::1 peer 2001:db8::2 metric 61 + ip -6 route show dev dummy1 2001:db8::1 proto kernel metric 61 pref medium 2001:db8::2 proto kernel metric 60 pref medium After the fix: + ip addr change dev dummy1 2001:db8::1 peer 2001:db8::2 metric 61 + ip -6 route show dev dummy1 2001:db8::1 proto kernel metric 61 pref medium 2001:db8::2 proto kernel metric 61 pref medium Fixes: 8308f3ff1753 ("net/ipv6: Add support for specifying metric of connected routes") Signed-off-by: Hangbin Liu Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 50bbd62ce7a153051209049db708b8f5f3c395b8 Author: Jonathan Neuschäfer Date: Thu Feb 27 18:07:01 2020 +0100 dt-bindings: mfd: Fix typo in file name of twl-familly.txt Signed-off-by: Jonathan Neuschäfer Signed-off-by: Rob Herring commit 8c6687efcfd2f849a1a66bc6d54ead4f60d9b5e4 Author: Jonathan Neuschäfer Date: Thu Feb 27 17:05:21 2020 +0100 dt-bindings: mfd: tps65910: Improve grammar Signed-off-by: Jonathan Neuschäfer Signed-off-by: Rob Herring commit b94858a7eae1aeabf6d910ded3b6fe66d06e8a1e Author: Jonathan Neuschäfer Date: Thu Feb 27 16:55:00 2020 +0100 dt-bindings: mfd: zii,rave-sp: Fix a typo ("onborad") Signed-off-by: Jonathan Neuschäfer Signed-off-by: Rob Herring commit 20896ef137340e9426cf322606f764452f5eb960 Author: Jernej Skrabec Date: Mon Feb 24 18:38:57 2020 +0100 drm/sun4i: Fix DE2 VI layer format support DE2 VI layer doesn't support blending which means alpha channel is ignored. Replace all formats with alpha with "don't care" (X) channel. Fixes: 7480ba4d7571 ("drm/sun4i: Add support for DE2 VI planes") Acked-by: Maxime Ripard Signed-off-by: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200224173901.174016-4-jernej.skrabec@siol.net commit 169ca4b38932112e8b2ee8baef9cea44678625b3 Author: Jernej Skrabec Date: Mon Feb 24 18:38:56 2020 +0100 drm/sun4i: Add separate DE3 VI layer formats DE3 VI layers support alpha blending, but DE2 VI layers do not. Additionally, DE3 VI layers support 10-bit RGB and YUV formats. Make a separate list for DE3. Fixes: c50519e6db4d ("drm/sun4i: Add basic support for DE3") Acked-by: Maxime Ripard Signed-off-by: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200224173901.174016-3-jernej.skrabec@siol.net commit a4769905f0ae32cae4f096f646ab03b8b4794c74 Author: Jernej Skrabec Date: Mon Feb 24 18:38:55 2020 +0100 drm/sun4i: de2/de3: Remove unsupported VI layer formats YUV444 and YVU444 are planar formats, but HW format RGB888 is packed. This means that those two mappings were never correct. Remove them. Fixes: 60a3dcf96aa8 ("drm/sun4i: Add DE2 definitions for YUV formats") Acked-by: Maxime Ripard Signed-off-by: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200224173901.174016-2-jernej.skrabec@siol.net commit a6fbcddad6a4141d119f18dca72f9ecc897eac51 Merge: ab124d580ad4 6ba3da446551 Author: David S. Miller Date: Tue Mar 3 13:28:49 2020 -0800 Merge branch 'net-add-missing-netlink-policies' Jakub Kicinski says: ==================== net: add missing netlink policies Recent one-off fixes motivated me to do some grepping for more missing netlink attribute policies. I didn't manage to even produce a KASAN splat with these, but it should be possible with sufficient luck. All the missing policies are pretty trivial (NLA_Uxx). I've only tested the devlink patches, the rest compiles. ==================== Signed-off-by: David S. Miller commit 6ba3da446551f2150fadbf8c7788edcb977683d3 Author: Jakub Kicinski Date: Mon Mar 2 21:05:26 2020 -0800 nfc: add missing attribute validation for vendor subcommand Add missing attribute validation for vendor subcommand attributes to the netlink policy. Fixes: 9e58095f9660 ("NFC: netlink: Implement vendor command support") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 88e706d5168b07df4792dbc3d1bc37b83e4bd74d Author: Jakub Kicinski Date: Mon Mar 2 21:05:25 2020 -0800 nfc: add missing attribute validation for deactivate target Add missing attribute validation for NFC_ATTR_TARGET_INDEX to the netlink policy. Fixes: 4d63adfe12dd ("NFC: Add NFC_CMD_DEACTIVATE_TARGET support") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 361d23e41ca6e504033f7e66a03b95788377caae Author: Jakub Kicinski Date: Mon Mar 2 21:05:24 2020 -0800 nfc: add missing attribute validation for SE API Add missing attribute validation for NFC_ATTR_SE_INDEX to the netlink policy. Fixes: 5ce3f32b5264 ("NFC: netlink: SE API implementation") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 213320a67962ff6e7b83b704d55cbebc341426db Author: Jakub Kicinski Date: Mon Mar 2 21:05:23 2020 -0800 tipc: add missing attribute validation for MTU property Add missing attribute validation for TIPC_NLA_PROP_MTU to the netlink policy. Fixes: 901271e0403a ("tipc: implement configuration of UDP media MTU") Signed-off-by: Jakub Kicinski Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 669fcd7795900cd1880237cbbb57a7db66cb9ac8 Author: Jakub Kicinski Date: Mon Mar 2 21:05:22 2020 -0800 team: add missing attribute validation for array index Add missing attribute validation for TEAM_ATTR_OPTION_ARRAY_INDEX to the netlink policy. Fixes: b13033262d24 ("team: introduce array options") Signed-off-by: Jakub Kicinski Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit dd25cb272ccce4db67dc8509278229099e4f5e99 Author: Jakub Kicinski Date: Mon Mar 2 21:05:21 2020 -0800 team: add missing attribute validation for port ifindex Add missing attribute validation for TEAM_ATTR_OPTION_PORT_IFINDEX to the netlink policy. Fixes: 80f7c6683fe0 ("team: add support for per-port options") Signed-off-by: Jakub Kicinski Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit e13aaa0643da10006ec35715954e7f92a62899a5 Author: Jakub Kicinski Date: Mon Mar 2 21:05:20 2020 -0800 net: taprio: add missing attribute validation for txtime delay Add missing attribute validation for TCA_TAPRIO_ATTR_TXTIME_DELAY to the netlink policy. Fixes: 4cfd5779bd6e ("taprio: Add support for txtime-assist mode") Signed-off-by: Jakub Kicinski Reviewed-by: Vinicius Costa Gomes Signed-off-by: David S. Miller commit 7e6dc03eeb023e18427a373522f1d247b916a641 Author: Jakub Kicinski Date: Mon Mar 2 21:05:19 2020 -0800 net: fq: add missing attribute validation for orphan mask Add missing attribute validation for TCA_FQ_ORPHAN_MASK to the netlink policy. Fixes: 06eb395fa985 ("pkt_sched: fq: better control of DDOS traffic") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit b5ab1f1be6180a2e975eede18731804b5164a05d Author: Jakub Kicinski Date: Mon Mar 2 21:05:18 2020 -0800 openvswitch: add missing attribute validation for hash Add missing attribute validation for OVS_PACKET_ATTR_HASH to the netlink policy. Fixes: bd1903b7c459 ("net: openvswitch: add hash info to upcall") Signed-off-by: Jakub Kicinski Reviewed-by: Greg Rose Signed-off-by: David S. Miller commit 31d9a1c524964bac77b7f9d0a1ac140dc6b57461 Author: Jakub Kicinski Date: Mon Mar 2 21:05:17 2020 -0800 macsec: add missing attribute validation for port Add missing attribute validation for IFLA_MACSEC_PORT to the netlink policy. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit ab02ad660586b94f5d08912a3952b939cf4c4430 Author: Jakub Kicinski Date: Mon Mar 2 21:05:16 2020 -0800 can: add missing attribute validation for termination Add missing attribute validation for IFLA_CAN_TERMINATION to the netlink policy. Fixes: 12a6075cabc0 ("can: dev: add CAN interface termination API") Signed-off-by: Jakub Kicinski Acked-by: Oliver Hartkopp Signed-off-by: David S. Miller commit b60673c4c418bef7550d02faf53c34fbfeb366bf Author: Jakub Kicinski Date: Mon Mar 2 21:05:15 2020 -0800 nl802154: add missing attribute validation for dev_type Add missing attribute type validation for IEEE802154_ATTR_DEV_TYPE to the netlink policy. Fixes: 90c049b2c6ae ("ieee802154: interface type to be added") Signed-off-by: Jakub Kicinski Acked-by: Stefan Schmidt Signed-off-by: David S. Miller commit 9322cd7c4af2ccc7fe7c5f01adb53f4f77949e92 Author: Jakub Kicinski Date: Mon Mar 2 21:05:14 2020 -0800 nl802154: add missing attribute validation Add missing attribute validation for several u8 types. Fixes: 2c21d11518b6 ("net: add NL802154 interface for configuration of 802.15.4 devices") Signed-off-by: Jakub Kicinski Acked-by: Stefan Schmidt Signed-off-by: David S. Miller commit 4c16d64ea04056f1b1b324ab6916019f6a064114 Author: Jakub Kicinski Date: Mon Mar 2 21:05:13 2020 -0800 fib: add missing attribute validation for tun_id Add missing netlink policy entry for FRA_TUN_ID. Fixes: e7030878fc84 ("fib: Add fib rule match on tunnel id") Signed-off-by: Jakub Kicinski Reviewed-by: David Ahern Signed-off-by: David S. Miller commit ff3b63b8c299b73ac599b120653b47e275407656 Author: Jakub Kicinski Date: Mon Mar 2 21:05:12 2020 -0800 devlink: validate length of region addr/len DEVLINK_ATTR_REGION_CHUNK_ADDR and DEVLINK_ATTR_REGION_CHUNK_LEN lack entries in the netlink policy. Corresponding nla_get_u64()s may read beyond the end of the message. Fixes: 4e54795a27f5 ("devlink: Add support for region snapshot read command") Signed-off-by: Jakub Kicinski Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 8750939b6ad86abc3f53ec8a9683a1cded4a5654 Author: Jakub Kicinski Date: Mon Mar 2 21:05:11 2020 -0800 devlink: validate length of param values DEVLINK_ATTR_PARAM_VALUE_DATA may have different types so it's not checked by the normal netlink policy. Make sure the attribute length is what we expect. Fixes: e3b7ca18ad7b ("devlink: Add param set command") Signed-off-by: Jakub Kicinski Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit b46b2b7ba6e104d265ab705914859ec0db7a98c5 Author: Tony Lindgren Date: Tue Mar 3 13:18:36 2020 -0800 ARM: dts: Fix dm814x Ethernet by changing to use rgmii-id mode Commit cd28d1d6e52e ("net: phy: at803x: Disable phy delay for RGMII mode") caused a regression for dm814x boards where NFSroot would no longer work. Let's fix the issue by configuring "rgmii-id" mode as internal delays are needed that is no longer the case with "rgmii" mode. Signed-off-by: Tony Lindgren commit 44f2f882909fedfc3a56e4b90026910456019743 Author: Dan Carpenter Date: Tue Mar 3 13:16:08 2020 +0300 hwmon: (adt7462) Fix an error return in ADT7462_REG_VOLT() This is only called from adt7462_update_device(). The caller expects it to return zero on error. I fixed a similar issue earlier in commit a4bf06d58f21 ("hwmon: (adt7462) ADT7462_REG_VOLT_MAX() should return 0") but I missed this one. Fixes: c0b4e3ab0c76 ("adt7462: new hwmon driver") Signed-off-by: Dan Carpenter Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20200303101608.kqjwfcazu2ylhi2a@kili.mountain Signed-off-by: Guenter Roeck commit b5c0951860ba98cfe1936b5c0739450875d51451 Author: Arnaldo Carvalho de Melo Date: Mon Mar 2 16:03:34 2020 -0300 perf symbols: Don't try to find a vmlinux file when looking for kernel modules The dso->kernel value is now set to everything that is in machine->kmaps, but that was being used to decide if vmlinux lookup is needed, which ended up making that lookup be made for kernel modules, that now have dso->kernel set, leading to these kinds of warnings when running on a machine with compressed kernel modules, like fedora:31: [root@five ~]# perf record -F 10000 -a sleep 2 [ perf record: Woken up 1 times to write data ] lzma: fopen failed on vmlinux: 'No such file or directory' lzma: fopen failed on /boot/vmlinux: 'No such file or directory' lzma: fopen failed on /boot/vmlinux-5.5.5-200.fc31.x86_64: 'No such file or directory' lzma: fopen failed on /usr/lib/debug/boot/vmlinux-5.5.5-200.fc31.x86_64: 'No such file or directory' lzma: fopen failed on /lib/modules/5.5.5-200.fc31.x86_64/build/vmlinux: 'No such file or directory' lzma: fopen failed on vmlinux: 'No such file or directory' lzma: fopen failed on /boot/vmlinux: 'No such file or directory' lzma: fopen failed on /boot/vmlinux-5.5.5-200.fc31.x86_64: 'No such file or directory' lzma: fopen failed on /usr/lib/debug/boot/vmlinux-5.5.5-200.fc31.x86_64: 'No such file or directory' lzma: fopen failed on /lib/modules/5.5.5-200.fc31.x86_64/build/vmlinux: 'No such file or directory' lzma: fopen failed on vmlinux: 'No such file or directory' lzma: fopen failed on /boot/vmlinux: 'No such file or directory' lzma: fopen failed on /boot/vmlinux-5.5.5-200.fc31.x86_64: 'No such file or directory' lzma: fopen failed on /usr/lib/debug/boot/vmlinux-5.5.5-200.fc31.x86_64: 'No such file or directory' lzma: fopen failed on /lib/modules/5.5.5-200.fc31.x86_64/build/vmlinux: 'No such file or directory' lzma: fopen failed on vmlinux: 'No such file or directory' lzma: fopen failed on /boot/vmlinux: 'No such file or directory' lzma: fopen failed on /boot/vmlinux-5.5.5-200.fc31.x86_64: 'No such file or directory' lzma: fopen failed on /usr/lib/debug/boot/vmlinux-5.5.5-200.fc31.x86_64: 'No such file or directory' lzma: fopen failed on /lib/modules/5.5.5-200.fc31.x86_64/build/vmlinux: 'No such file or directory' lzma: fopen failed on vmlinux: 'No such file or directory' lzma: fopen failed on /boot/vmlinux: 'No such file or directory' lzma: fopen failed on /boot/vmlinux-5.5.5-200.fc31.x86_64: 'No such file or directory' lzma: fopen failed on /usr/lib/debug/boot/vmlinux-5.5.5-200.fc31.x86_64: 'No such file or directory' lzma: fopen failed on /lib/modules/5.5.5-200.fc31.x86_64/build/vmlinux: 'No such file or directory' [ perf record: Captured and wrote 1.024 MB perf.data (1366 samples) ] [root@five ~]# This happens when collecting the buildid, when we find samples for kernel modules, fix it by checking if the looked up DSO is a kernel module by other means. Fixes: 02213cec64bb ("perf maps: Mark module DSOs with kernel type") Tested-by: Jiri Olsa Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Kim Phillips Cc: Michael Petlan Cc: Namhyung Kim Cc: Ravi Bangoria Link: http://lore.kernel.org/lkml/20200302191007.GD10335@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e4d9b04b973b2dbce7b42af95ea70d07da1c936d Author: Arnaldo Carvalho de Melo Date: Mon Mar 2 12:09:38 2020 -0300 perf bench: Share some global variables to fix build with gcc 10 Noticed with gcc 10 (fedora rawhide) that those variables were not being declared as static, so end up with: ld: /tmp/build/perf/bench/epoll-wait.o:/git/perf/tools/perf/bench/epoll-wait.c:93: multiple definition of `end'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here ld: /tmp/build/perf/bench/epoll-wait.o:/git/perf/tools/perf/bench/epoll-wait.c:93: multiple definition of `start'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here ld: /tmp/build/perf/bench/epoll-wait.o:/git/perf/tools/perf/bench/epoll-wait.c:93: multiple definition of `runtime'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here ld: /tmp/build/perf/bench/epoll-ctl.o:/git/perf/tools/perf/bench/epoll-ctl.c:38: multiple definition of `end'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here ld: /tmp/build/perf/bench/epoll-ctl.o:/git/perf/tools/perf/bench/epoll-ctl.c:38: multiple definition of `start'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here ld: /tmp/build/perf/bench/epoll-ctl.o:/git/perf/tools/perf/bench/epoll-ctl.c:38: multiple definition of `runtime'; /tmp/build/perf/bench/futex-hash.o:/git/perf/tools/perf/bench/futex-hash.c:40: first defined here make[4]: *** [/git/perf/tools/build/Makefile.build:145: /tmp/build/perf/bench/perf-in.o] Error 1 Prefix those with bench__ and add them to bench/bench.h, so that we can share those on the tools needing to access those variables from signal handlers. Acked-by: Thomas Gleixner Cc: Adrian Hunter Cc: Davidlohr Bueso Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20200303155811.GD13702@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f0fe2c0f050d31babcad7d65f1d550d462a40064 Author: Christian Brauner Date: Tue Mar 3 17:43:40 2020 +0100 binder: prevent UAF for binderfs devices II This is a necessary follow up to the first fix I proposed and we merged in 2669b8b0c79 ("binder: prevent UAF for binderfs devices"). I have been overly optimistic that the simple fix I proposed would work. But alas, ihold() + iput() won't work since the inodes won't survive the destruction of the superblock. So all we get with my prior fix is a different race with a tinier race-window but it doesn't solve the issue. Fwiw, the problem lies with generic_shutdown_super(). It even has this cozy Al-style comment: if (!list_empty(&sb->s_inodes)) { printk("VFS: Busy inodes after unmount of %s. " "Self-destruct in 5 seconds. Have a nice day...\n", sb->s_id); } On binder_release(), binder_defer_work(proc, BINDER_DEFERRED_RELEASE) is called which punts the actual cleanup operation to a workqueue. At some point, binder_deferred_func() will be called which will end up calling binder_deferred_release() which will retrieve and cleanup the binder_context attach to this struct binder_proc. If we trace back where this binder_context is attached to binder_proc we see that it is set in binder_open() and is taken from the struct binder_device it is associated with. This obviously assumes that the struct binder_device that context is attached to is _never_ freed. While that might be true for devtmpfs binder devices it is most certainly wrong for binderfs binder devices. So, assume binder_open() is called on a binderfs binder devices. We now stash away the struct binder_context associated with that struct binder_devices: proc->context = &binder_dev->context; /* binderfs stashes devices in i_private */ if (is_binderfs_device(nodp)) { binder_dev = nodp->i_private; info = nodp->i_sb->s_fs_info; binder_binderfs_dir_entry_proc = info->proc_log_dir; } else { . . . proc->context = &binder_dev->context; Now let's assume that the binderfs instance for that binder devices is shutdown via umount() and/or the mount namespace associated with it goes away. As long as there is still an fd open for that binderfs binder device things are fine. But let's assume we now close the last fd for that binderfs binder device. Now binder_release() is called and punts to the workqueue. Assume that the workqueue has quite a bit of stuff to do and doesn't get to cleaning up the struct binder_proc and the associated struct binder_context with it for that binderfs binder device right away. In the meantime, the VFS is killing the super block and is ultimately calling sb->evict_inode() which means it will call binderfs_evict_inode() which does: static void binderfs_evict_inode(struct inode *inode) { struct binder_device *device = inode->i_private; struct binderfs_info *info = BINDERFS_I(inode); clear_inode(inode); if (!S_ISCHR(inode->i_mode) || !device) return; mutex_lock(&binderfs_minors_mutex); --info->device_count; ida_free(&binderfs_minors, device->miscdev.minor); mutex_unlock(&binderfs_minors_mutex); kfree(device->context.name); kfree(device); } thereby freeing the struct binder_device including struct binder_context. Now the workqueue finally has time to get around to cleaning up struct binder_proc and is now trying to access the associate struct binder_context. Since it's already freed it will OOPs. Fix this by introducing a refounct on binder devices. This is an alternative fix to 51d8a7eca677 ("binder: prevent UAF read in print_binder_transaction_log_entry()"). Fixes: 3ad20fe393b3 ("binder: implement binderfs") Fixes: 2669b8b0c798 ("binder: prevent UAF for binderfs devices") Fixes: 03e2e07e3814 ("binder: Make transaction_log available in binderfs") Related : 51d8a7eca677 ("binder: prevent UAF read in print_binder_transaction_log_entry()") Cc: stable@vger.kernel.org Signed-off-by: Christian Brauner Acked-by: Todd Kjos Link: https://lore.kernel.org/r/20200303164340.670054-1-christian.brauner@ubuntu.com Signed-off-by: Greg Kroah-Hartman commit ecc421e05bab97cf3ff4fe456ade47ef84dba8c2 Author: Cyril Hrubis Date: Tue Mar 3 16:06:38 2020 +0100 sys/sysinfo: Respect boottime inside time namespace The sysinfo() syscall includes uptime in seconds but has no correction for time namespaces which makes it inconsistent with the /proc/uptime inside of a time namespace. Add the missing time namespace adjustment call. Signed-off-by: Cyril Hrubis Signed-off-by: Thomas Gleixner Reviewed-by: Dmitry Safonov Link: https://lkml.kernel.org/r/20200303150638.7329-1-chrubis@suse.cz commit aad15bc85c189261b0554a7dc8e053641dd4025c Author: Vincent Chen Date: Fri Feb 21 10:47:55 2020 +0800 riscv: Change code model of module to medany to improve data accessing All the loaded module locates in the region [&_end-2G,VMALLOC_END] at runtime, so the distance from the module start to the end of the kernel image does not exceed 2GB. Hence, the code model of the kernel module can be changed to medany to improve the performance data access. Signed-off-by: Vincent Chen Signed-off-by: Palmer Dabbelt commit 0cff8bff7af886af0923d5c91776cd51603e531f Author: Vincent Chen Date: Fri Feb 21 10:47:54 2020 +0800 riscv: avoid the PIC offset of static percpu data in module beyond 2G limits The compiler uses the PIC-relative method to access static variables instead of GOT when the code model is PIC. Therefore, the limitation of the access range from the instruction to the symbol address is +-2GB. Under this circumstance, the kernel cannot load a kernel module if this module has static per-CPU symbols declared by DEFINE_PER_CPU(). The reason is that kernel relocates the .data..percpu section of the kernel module to the end of kernel's .data..percpu. Hence, the distance between the per-CPU symbols and the instruction will exceed the 2GB limits. To solve this problem, the kernel should place the loaded module in the memory area [&_end-2G, VMALLOC_END]. Signed-off-by: Vincent Chen Suggested-by: Alexandre Ghiti Suggested-by: Anup Patel Tested-by: Alexandre Ghiti Tested-by: Carlos de Paula Signed-off-by: Palmer Dabbelt commit d718fdc3e752ba51ddb2b5554d3db98a09355cc2 Author: Vitaly Kuznetsov Date: Tue Mar 3 15:33:16 2020 +0100 KVM: x86: remove stale comment from struct x86_emulate_ctxt Commit c44b4c6ab80e ("KVM: emulate: clean up initializations in init_decode_cache") did some field shuffling and instead of [opcode_len, _regs) started clearing [has_seg_override, modrm). The comment about clearing fields altogether is not true anymore. Fixes: c44b4c6ab80e ("KVM: emulate: clean up initializations in init_decode_cache") Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 342993f96ab24d5864ab1216f46c0b199c2baf8e Author: Vitaly Kuznetsov Date: Tue Mar 3 15:33:15 2020 +0100 KVM: x86: clear stale x86_emulate_ctxt->intercept value After commit 07721feee46b ("KVM: nVMX: Don't emulate instructions in guest mode") Hyper-V guests on KVM stopped booting with: kvm_nested_vmexit: rip fffff802987d6169 reason EPT_VIOLATION info1 181 info2 0 int_info 0 int_info_err 0 kvm_page_fault: address febd0000 error_code 181 kvm_emulate_insn: 0:fffff802987d6169: f3 a5 kvm_emulate_insn: 0:fffff802987d6169: f3 a5 FAIL kvm_inj_exception: #UD (0x0) "f3 a5" is a "rep movsw" instruction, which should not be intercepted at all. Commit c44b4c6ab80e ("KVM: emulate: clean up initializations in init_decode_cache") reduced the number of fields cleared by init_decode_cache() claiming that they are being cleared elsewhere, 'intercept', however, is left uncleared if the instruction does not have any of the "slow path" flags (NotImpl, Stack, Op3264, Sse, Mmx, CheckPerm, NearBranch, No16 and of course Intercept itself). Fixes: c44b4c6ab80e ("KVM: emulate: clean up initializations in init_decode_cache") Fixes: 07721feee46b ("KVM: nVMX: Don't emulate instructions in guest mode") Cc: stable@vger.kernel.org Suggested-by: Paolo Bonzini Signed-off-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 636be4241bdd88fec273b38723e44bad4e1c4fae Author: Mike Snitzer Date: Thu Feb 27 14:25:31 2020 -0500 dm: bump version of core and various targets Changes made during the 5.6 cycle warrant bumping the version number for DM core and the targets modified by this commit. It should be noted that dm-thin, dm-crypt and dm-raid already had their target version bumped during the 5.6 merge window. Signed-off-by; Mike Snitzer commit 974f51e8633f0f3f33e8f86bbb5ae66758aa63c7 Author: Hou Tao Date: Tue Mar 3 16:45:01 2020 +0800 dm: fix congested_fn for request-based device We neither assign congested_fn for requested-based blk-mq device nor implement it correctly. So fix both. Also, remove incorrect comment from dm_init_normal_md_queue and rename it to dm_init_congested_fn. Fixes: 4aa9c692e052 ("bdi: separate out congested state into a separate struct") Cc: stable@vger.kernel.org Signed-off-by: Hou Tao Signed-off-by: Mike Snitzer commit 0a68ff5e2e7cf2263674b7f0418b31e10b2a497f Author: Kees Cook Date: Wed Feb 19 22:22:43 2020 -0800 fcntl: Distribute switch variables for initialization Variables declared in a switch statement before any case statements cannot be automatically initialized with compiler instrumentation (as they are not part of any execution flow). With GCC's proposed automatic stack variable initialization feature, this triggers a warning (and they don't get initialized). Clang's automatic stack variable initialization (via CONFIG_INIT_STACK_ALL=y) doesn't throw a warning, but it also doesn't initialize such variables[1]. Note that these warnings (or silent skipping) happen before the dead-store elimination optimization phase, so even when the automatic initializations are later elided in favor of direct initializations, the warnings remain. To avoid these problems, move such variables into the "case" where they're used or lift them up into the main function body. fs/fcntl.c: In function ‘send_sigio_to_task’: fs/fcntl.c:738:20: warning: statement will never be executed [-Wswitch-unreachable] 738 | kernel_siginfo_t si; | ^~ [1] https://bugs.llvm.org/show_bug.cgi?id=44916 Signed-off-by: Kees Cook Signed-off-by: Jeff Layton commit b102f0c522cf668c8382c56a4f771b37d011cda2 Author: Felix Fietkau Date: Thu Feb 20 12:41:39 2020 +0100 mt76: fix array overflow on receiving too many fragments for a packet If the hardware receives an oversized packet with too many rx fragments, skb_shinfo(skb)->frags can overflow and corrupt memory of adjacent pages. This becomes especially visible if it corrupts the freelist pointer of a slab page. Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo commit 8c867387160e89c9ffd12459f38e56844312a7a7 Author: Ley Foon Tan Date: Thu Feb 27 04:20:14 2020 +0800 arm64: dts: socfpga: agilex: Fix gmac compatible Fix gmac compatible string to "altr,socfpga-stmmac-a10-s10". Gmac for Agilex should use same compatible as Stratix 10. Fixes: 4b36daf9ada3 ("arm64: dts: agilex: Add initial support for Intel's Agilex SoCFPGA") Cc: stable@vger.kernel.org Signed-off-by: Ley Foon Tan Signed-off-by: Dinh Nguyen commit 248aa2645aa7fc9175d1107c2593cc90d4af5a4e Author: Mike Snitzer Date: Fri Feb 28 18:11:53 2020 -0500 dm integrity: use dm_bio_record and dm_bio_restore In cases where dec_in_flight() has to requeue the integrity_bio_wait work to transfer the rest of the data, the bio's __bi_remaining might already have been decremented to 0, e.g.: if bio passed to underlying data device was split via blk_queue_split(). Use dm_bio_{record,restore} rather than effectively open-coding them in dm-integrity -- these methods now manage __bi_remaining too. Depends-on: f7f0b057a9c1 ("dm bio record: save/restore bi_end_io and bi_integrity") Reported-by: Daniel Glöckner Suggested-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 1b17159e52bb31f982f82a6278acd7fab1d3f67b Author: Mike Snitzer Date: Fri Feb 28 18:00:53 2020 -0500 dm bio record: save/restore bi_end_io and bi_integrity Also, save/restore __bi_remaining in case the bio was used in a BIO_CHAIN (e.g. due to blk_queue_split). Suggested-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit e7a04894c766daa4248cb736efee93550f2d5872 Author: Omar Sandoval Date: Mon Mar 2 14:02:49 2020 -0800 btrfs: fix RAID direct I/O reads with alternate csums btrfs_lookup_and_bind_dio_csum() does pointer arithmetic which assumes 32-bit checksums. If using a larger checksum, this leads to spurious failures when a direct I/O read crosses a stripe. This is easy to reproduce: # mkfs.btrfs -f --checksum blake2 -d raid0 /dev/vdc /dev/vdd ... # mount /dev/vdc /mnt # cd /mnt # dd if=/dev/urandom of=foo bs=1M count=1 status=none # dd if=foo of=/dev/null bs=1M iflag=direct status=none dd: error reading 'foo': Input/output error # dmesg | tail -1 [ 135.821568] BTRFS warning (device vdc): csum failed root 5 ino 257 off 421888 ... Fix it by using the actual checksum size. Fixes: 1e25a2e3ca0d ("btrfs: don't assume ordered sums to be 4 bytes") CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Johannes Thumshirn Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit 613cea5935e83cb5a7d182ee3f98d54620e102e2 Author: Dan Carpenter Date: Tue Mar 3 13:18:58 2020 +0300 ASoC: SOF: Fix snd_sof_ipc_stream_posn() We're passing "&posn" instead of "posn" so it ends up corrupting memory instead of doing something useful. Fixes: 53e0c72d98ba ("ASoC: SOF: Add support for IPC IO between DSP and Host") Signed-off-by: Dan Carpenter Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200303101858.ytehbrivocyp3cnf@kili.mountain Signed-off-by: Mark Brown commit 4b01618b624736fc7d74f150f623d11b17b7b288 Author: Jack Yu Date: Tue Mar 3 10:59:13 2020 +0800 ASoC: rt1015: modify pre-divider for sysclk Modify pre-divider for system clock. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/20200303025913.24499-1-jack.yu@realtek.com Signed-off-by: Mark Brown commit 3791163602f7140011a8dc1691cfe6ec0cb1ef07 Author: Georgi Djakov Date: Wed Feb 26 13:04:20 2020 +0200 interconnect: Handle memory allocation errors When we allocate memory, kasprintf() can fail and we must check its return value. Fixes: 05309830e1f8 ("interconnect: Add a name to struct icc_path") Signed-off-by: Georgi Djakov Link: https://lore.kernel.org/r/20200226110420.5357-2-georgi.djakov@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3745488e9d599916a0b40d45d3f30e3d4720288e Author: Daniel Axtens Date: Tue Feb 25 10:44:27 2020 -0800 altera-stapl: altera_get_note: prevent write beyond end of 'key' altera_get_note is called from altera_init, where key is kzalloc(33). When the allocation functions are annotated to allow the compiler to see the sizes of objects, and with FORTIFY_SOURCE, we see: In file included from drivers/misc/altera-stapl/altera.c:14:0: In function ‘strlcpy’, inlined from ‘altera_init’ at drivers/misc/altera-stapl/altera.c:2189:5: include/linux/string.h:378:4: error: call to ‘__write_overflow’ declared with attribute error: detected write beyond size of object passed as 1st parameter __write_overflow(); ^~~~~~~~~~~~~~~~~~ That refers to this code in altera_get_note: if (key != NULL) strlcpy(key, &p[note_strings + get_unaligned_be32( &p[note_table + (8 * i)])], length); The error triggers because the length of 'key' is 33, but the copy uses length supplied as the 'length' parameter, which is always 256. Split the size parameter into key_len and val_len, and use the appropriate length depending on what is being copied. Detected by compiler error, only compile-tested. Cc: "Igor M. Liplianin" Signed-off-by: Daniel Axtens Link: https://lore.kernel.org/r/20200120074344.504-2-dja@axtens.net Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/202002251042.D898E67AC@keescook Signed-off-by: Greg Kroah-Hartman commit 2669b8b0c798fbe1a31d49e07aa33233d469ad9b Author: Christian Brauner Date: Fri Feb 21 19:01:24 2020 +0100 binder: prevent UAF for binderfs devices On binder_release(), binder_defer_work(proc, BINDER_DEFERRED_RELEASE) is called which punts the actual cleanup operation to a workqueue. At some point, binder_deferred_func() will be called which will end up calling binder_deferred_release() which will retrieve and cleanup the binder_context attach to this struct binder_proc. If we trace back where this binder_context is attached to binder_proc we see that it is set in binder_open() and is taken from the struct binder_device it is associated with. This obviously assumes that the struct binder_device that context is attached to is _never_ freed. While that might be true for devtmpfs binder devices it is most certainly wrong for binderfs binder devices. So, assume binder_open() is called on a binderfs binder devices. We now stash away the struct binder_context associated with that struct binder_devices: proc->context = &binder_dev->context; /* binderfs stashes devices in i_private */ if (is_binderfs_device(nodp)) { binder_dev = nodp->i_private; info = nodp->i_sb->s_fs_info; binder_binderfs_dir_entry_proc = info->proc_log_dir; } else { . . . proc->context = &binder_dev->context; Now let's assume that the binderfs instance for that binder devices is shutdown via umount() and/or the mount namespace associated with it goes away. As long as there is still an fd open for that binderfs binder device things are fine. But let's assume we now close the last fd for that binderfs binder device. Now binder_release() is called and punts to the workqueue. Assume that the workqueue has quite a bit of stuff to do and doesn't get to cleaning up the struct binder_proc and the associated struct binder_context with it for that binderfs binder device right away. In the meantime, the VFS is killing the super block and is ultimately calling sb->evict_inode() which means it will call binderfs_evict_inode() which does: static void binderfs_evict_inode(struct inode *inode) { struct binder_device *device = inode->i_private; struct binderfs_info *info = BINDERFS_I(inode); clear_inode(inode); if (!S_ISCHR(inode->i_mode) || !device) return; mutex_lock(&binderfs_minors_mutex); --info->device_count; ida_free(&binderfs_minors, device->miscdev.minor); mutex_unlock(&binderfs_minors_mutex); kfree(device->context.name); kfree(device); } thereby freeing the struct binder_device including struct binder_context. Now the workqueue finally has time to get around to cleaning up struct binder_proc and is now trying to access the associate struct binder_context. Since it's already freed it will OOPs. Fix this by holding an additional reference to the inode that is only released once the workqueue is done cleaning up struct binder_proc. This is an easy alternative to introducing separate refcounting on struct binder_device which we can always do later if it becomes necessary. This is an alternative fix to 51d8a7eca677 ("binder: prevent UAF read in print_binder_transaction_log_entry()"). Fixes: 3ad20fe393b3 ("binder: implement binderfs") Fixes: 03e2e07e3814 ("binder: Make transaction_log available in binderfs") Related : 51d8a7eca677 ("binder: prevent UAF read in print_binder_transaction_log_entry()") Cc: stable@vger.kernel.org Signed-off-by: Christian Brauner Acked-by: Todd Kjos Signed-off-by: Greg Kroah-Hartman commit 04d6067f1f19e70a418f92fa3170cf7fe53b7fdf Author: Zhenyu Wang Date: Tue Mar 3 13:54:12 2020 +0800 drm/i915/gvt: Fix unnecessary schedule timer when no vGPU exits From commit f25a49ab8ab9 ("drm/i915/gvt: Use vgpu_lock to protect per vgpu access") the vgpu idr destroy is moved later than vgpu resource destroy, then it would fail to stop timer for schedule policy clean which to check vgpu idr for any left vGPU. So this trys to destroy vgpu idr earlier. Cc: Colin Xu Fixes: f25a49ab8ab9 ("drm/i915/gvt: Use vgpu_lock to protect per vgpu access") Acked-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200229055445.31481-1-zhenyuw@linux.intel.com commit 764b53b26c9897b0693c934797e898d6cd883a26 Author: Jens Axboe Date: Mon Mar 2 20:01:32 2020 -0700 Revert "bcache: ignore pending signals when creating gc and allocator thread" This reverts commit 0b96da639a4874311e9b5156405f69ef9fc3bef8. We can't just go flushing random signals, under the assumption that the OOM killer will just do something else. It's not safe from the OOM perspective, and it could also cause other signals to get randomly lost. Signed-off-by: Jens Axboe commit ab4562f4dd92c455f6b313717af5e7d72a55d7b4 Author: Sébastien Szymanski Date: Tue Feb 25 13:39:04 2020 +0100 dt-bindings: arm: fsl: fix APF6Dev compatible APF6 Dev compatible is armadeus,imx6dl-apf6dev and not armadeus,imx6dl-apf6dldev. Fixes: 3d735471d066 ("dt-bindings: arm: Document Armadeus SoM and Dev boards devicetree binding") Signed-off-by: Sébastien Szymanski Signed-off-by: Rob Herring commit 80ad894382bf1d73eb688c29714fa10c0afcf2e7 Author: Pavel Begunkov Date: Mon Mar 2 23:46:10 2020 +0300 io-wq: remove io_wq_flush and IO_WQ_WORK_INTERNAL io_wq_flush() is buggy, during cancelation of a flush, the associated work may be passed to the caller's (i.e. io_uring) @match callback. That callback is expecting it to be embedded in struct io_kiocb. Cancelation of internal work probably doesn't make a lot of sense to begin with. As the flush helper is no longer used, just delete it and the associated work flag. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 0b86b258e644c5f547005654cde0913d9e2ab5bc Merge: 14022b11d657 1bba60808404 Author: Olof Johansson Date: Mon Mar 2 11:54:24 2020 -0800 Merge tag 'arm-soc/for-5.6/defconfig-fixes' of https://github.com/Broadcom/stblinux into arm/fixes This pull request contains Broadcom ARM-based SoCs defconfig file(s) fixes for v5.6, please pull the following: - Stefan restores CONFIG_DEBUG_FS from the bcm2835_defconfig which was accidentally removed * tag 'arm-soc/for-5.6/defconfig-fixes' of https://github.com/Broadcom/stblinux: ARM: bcm2835_defconfig: Explicitly restore CONFIG_DEBUG_FS Link: https://lore.kernel.org/r/20200302195043.14513-1-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 14022b11d65700f35db9d85303dfb29149329e65 Merge: b6a79b417f54 146033562e7e Author: Olof Johansson Date: Mon Mar 2 10:15:11 2020 -0800 Merge tag 'amlogic-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/fixes Amlogic fixes for v5.6-rc * tag 'amlogic-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson: fix gxm-khadas-vim2 wifi arm64: dts: meson-sm1-sei610: add missing interrupt-names ARM: meson: Drop unneeded select of COMMON_CLK Link: https://lore.kernel.org/r/7hr1yc9cc1.fsf@baylibre.com Signed-off-by: Olof Johansson commit 1bba60808404b873defa0f3560497eb2e8fe86b8 Author: Stefan Wahren Date: Sun Feb 23 14:02:56 2020 +0100 ARM: bcm2835_defconfig: Explicitly restore CONFIG_DEBUG_FS The commit 0e4a459f56c3 ("tracing: Remove unnecessary DEBUG_FS dependency") accidentally dropped the DEBUG FS support in bcm2835_defconfig. So restore the config as before the commit. Reported-by: Marek Szyprowski Fixes: 0e4a459f56c3 ("tracing: Remove unnecessary DEBUG_FS dependency") Signed-off-by: Stefan Wahren Signed-off-by: Florian Fainelli commit 08090744f2dbba6b10d38fb17443c81f66798ca0 Author: Robin Murphy Date: Fri Feb 28 14:18:55 2020 +0000 iommu/io-pgtable-arm: Fix IOVA validation for 32-bit Since we ony support the TTB1 quirk for AArch64 contexts, and consequently only for 64-bit builds, the sign-extension aspect of the "are all bits above IAS consistent?" check should implicitly only apply to 64-bit IOVAs. Change the type of the cast to ensure that 32-bit longs don't inadvertently get sign-extended, and thus considered invalid, if they happen to be above 2GB in the TTB0 region. Reported-by: Stephan Gerhold Signed-off-by: Robin Murphy Acked-by: Acked-by: Will Deacon Fixes: db6903010aa5 ("iommu/io-pgtable-arm: Prepare for TTBR1 usage") Signed-off-by: Joerg Roedel commit 77a1bce84bba01f3f143d77127b72e872b573795 Author: Yonghyun Hwang Date: Wed Feb 26 12:30:06 2020 -0800 iommu/vt-d: Fix a bug in intel_iommu_iova_to_phys() for huge page intel_iommu_iova_to_phys() has a bug when it translates an IOVA for a huge page onto its corresponding physical address. This commit fixes the bug by accomodating the level of page entry for the IOVA and adds IOVA's lower address to the physical address. Cc: Acked-by: Lu Baolu Reviewed-by: Moritz Fischer Signed-off-by: Yonghyun Hwang Fixes: 3871794642579 ("VT-d: Changes to support KVM") Signed-off-by: Joerg Roedel commit aaca21007ba14005feca74a079888c49a9b6f6ac Author: Haiwei Li Date: Mon Mar 2 20:19:28 2020 +0800 KVM: SVM: Fix the svm vmexit code for WRMSR In svm, exit_code for MSR writes is not EXIT_REASON_MSR_WRITE which belongs to vmx. According to amd manual, SVM_EXIT_MSR(7ch) is the exit_code of VMEXIT_MSR due to RDMSR or WRMSR access to protected MSR. Additionally, the processor indicates in the VMCB's EXITINFO1 whether a RDMSR(EXITINFO1=0) or WRMSR(EXITINFO1=1) was intercepted. Signed-off-by: Haiwei Li Fixes: 1e9e2622a149 ("KVM: VMX: FIXED+PHYSICAL mode single target IPI fastpath", 2019-11-21) Signed-off-by: Paolo Bonzini commit 9a11997e757bcf716c1b199ea7bd1abbadc4b357 Author: Wanpeng Li Date: Mon Mar 2 15:15:36 2020 +0800 KVM: X86: Fix dereference null cpufreq policy Naresh Kamboju reported: Linux version 5.6.0-rc4 (oe-user@oe-host) (gcc version (GCC)) #1 SMP Sun Mar 1 22:59:08 UTC 2020 kvm: no hardware support BUG: kernel NULL pointer dereference, address: 000000000000028c #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] SMP NOPTI CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.6.0-rc4 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), 04/01/2014 RIP: 0010:kobject_put+0x12/0x1c0 Call Trace: cpufreq_cpu_put+0x15/0x20 kvm_arch_init+0x1f6/0x2b0 kvm_init+0x31/0x290 ? svm_check_processor_compat+0xd/0xd ? svm_check_processor_compat+0xd/0xd svm_init+0x21/0x23 do_one_initcall+0x61/0x2f0 ? rdinit_setup+0x30/0x30 ? rcu_read_lock_sched_held+0x4f/0x80 kernel_init_freeable+0x219/0x279 ? rest_init+0x250/0x250 kernel_init+0xe/0x110 ret_from_fork+0x27/0x50 Modules linked in: CR2: 000000000000028c ---[ end trace 239abf40c55c409b ]--- RIP: 0010:kobject_put+0x12/0x1c0 cpufreq policy which is get by cpufreq_cpu_get() can be NULL if it is failure, this patch takes care of it. Fixes: aaec7c03de (KVM: x86: avoid useless copy of cpufreq policy) Reported-by: Naresh Kamboju Cc: Naresh Kamboju Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini commit 02d715b4a8182f4887d82df82a7b83aced647760 Author: Amol Grover Date: Sun Feb 23 22:25:39 2020 +0530 iommu/vt-d: Fix RCU list debugging warnings dmar_drhd_units is traversed using list_for_each_entry_rcu() outside of an RCU read side critical section but under the protection of dmar_global_lock. Hence add corresponding lockdep expression to silence the following false-positive warnings: [ 1.603975] ============================= [ 1.603976] WARNING: suspicious RCU usage [ 1.603977] 5.5.4-stable #17 Not tainted [ 1.603978] ----------------------------- [ 1.603980] drivers/iommu/intel-iommu.c:4769 RCU-list traversed in non-reader section!! [ 1.603869] ============================= [ 1.603870] WARNING: suspicious RCU usage [ 1.603872] 5.5.4-stable #17 Not tainted [ 1.603874] ----------------------------- [ 1.603875] drivers/iommu/dmar.c:293 RCU-list traversed in non-reader section!! Tested-by: Madhuparna Bhowmik Signed-off-by: Amol Grover Cc: stable@vger.kernel.org Acked-by: Lu Baolu Signed-off-by: Joerg Roedel commit 2de7fb60a4740135e03cf55c1982e393ccb87b6b Author: Mike Gilbert Date: Wed Feb 26 14:33:59 2020 -0500 cpupower: avoid multiple definition with gcc -fno-common Building cpupower with -fno-common in CFLAGS results in errors due to multiple definitions of the 'cpu_count' and 'start_time' variables. ./utils/idle_monitor/snb_idle.o:./utils/idle_monitor/cpupower-monitor.h:28: multiple definition of `cpu_count'; ./utils/idle_monitor/nhm_idle.o:./utils/idle_monitor/cpupower-monitor.h:28: first defined here ... ./utils/idle_monitor/cpuidle_sysfs.o:./utils/idle_monitor/cpuidle_sysfs.c:22: multiple definition of `start_time'; ./utils/idle_monitor/amd_fam14h_idle.o:./utils/idle_monitor/amd_fam14h_idle.c:85: first defined here The -fno-common option will be enabled by default in GCC 10. Bug: https://bugs.gentoo.org/707462 Signed-off-by: Mike Gilbert Signed-off-by: Shuah Khan commit f3a60268f5cec7dae0e9713f5fc65aecc3734c09 Author: Christophe Leroy Date: Thu Feb 27 14:07:10 2020 +0000 selftest/lkdtm: Use local .gitignore Commit 68ca0fd272da ("selftest/lkdtm: Don't pollute 'git status'") introduced patterns for git to ignore files generated in tools/testing/selftests/lkdtm/ Use local .gitignore file instead of using the root one. Fixes: 68ca0fd272da ("selftest/lkdtm: Don't pollute 'git status'") Signed-off-by: Christophe Leroy Acked-by: Kees Cook Signed-off-by: Shuah Khan commit 817a68a6584aa08e323c64283fec5ded7be84759 Author: Dennis Dalessandro Date: Tue Feb 25 14:54:45 2020 -0500 IB/hfi1, qib: Ensure RCU is locked when accessing list The packet handling function, specifically the iteration of the qp list for mad packet processing misses locking RCU before running through the list. Not only is this incorrect, but the list_for_each_entry_rcu() call can not be called with a conditional check for lock dependency. Remedy this by invoking the rcu lock and unlock around the critical section. This brings MAD packet processing in line with what is done for non-MAD packets. Fixes: 7724105686e7 ("IB/hfi1: add driver files") Link: https://lore.kernel.org/r/20200225195445.140896.41873.stgit@awfm-01.aw.intel.com Reviewed-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 51bddd4501bc414b8b1e8f4d096b4a5304068169 Author: Christophe JAILLET Date: Fri Feb 28 22:38:38 2020 +0100 spi: bcm63xx-hsspi: Really keep pll clk enabled The purpose of commit 0fd85869c2a9 ("spi/bcm63xx-hsspi: keep pll clk enabled") was to keep the pll clk enabled through the lifetime of the device. In order to do that, some 'clk_prepare_enable()'/'clk_disable_unprepare()' calls have been added in the error handling path of the probe function, in the remove function and in the suspend and resume functions. However, a 'clk_disable_unprepare()' call has been unfortunately left in the probe function. So the commit seems to be more or less a no-op. Axe it now, so that the pll clk is left enabled through the lifetime of the device, as described in the commit. Fixes: 0fd85869c2a9 ("spi/bcm63xx-hsspi: keep pll clk enabled") Signed-off-by: Christophe JAILLET Acked-by: Jonas Gorski Link: https://lore.kernel.org/r/20200228213838.7124-1-christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 7125f204501ed55493593209c6c71ac7c38f6b6c Author: Arnaldo Carvalho de Melo Date: Mon Mar 2 11:55:47 2020 -0300 perf parse-events: Use asprintf() instead of strncpy() to read tracepoint files Make the code more compact by using asprintf() instead of malloc()+strncpy() which also uses less memory and avoids these warnings with gcc 10: CC /tmp/build/perf/util/cloexec.o In file included from /usr/include/string.h:495, from util/parse-events.h:12, from util/parse-events.c:18: In function ‘strncpy’, inlined from ‘tracepoint_id_to_path’ at util/parse-events.c:271:5: /usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ offset [275, 511] from the object at ‘sys_dirent’ is out of the bounds of referenced subobject ‘d_name’ with type ‘char[256]’ at offset 19 [-Werror=array-bounds] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/dirent.h:61, from util/parse-events.c:5: util/parse-events.c: In function ‘tracepoint_id_to_path’: /usr/include/bits/dirent.h:33:10: note: subobject ‘d_name’ declared here 33 | char d_name[256]; /* We must not include limits.h! */ | ^~~~~~ In file included from /usr/include/string.h:495, from util/parse-events.h:12, from util/parse-events.c:18: In function ‘strncpy’, inlined from ‘tracepoint_id_to_path’ at util/parse-events.c:273:5: /usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ offset [275, 511] from the object at ‘evt_dirent’ is out of the bounds of referenced subobject ‘d_name’ with type ‘char[256]’ at offset 19 [-Werror=array-bounds] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/dirent.h:61, from util/parse-events.c:5: util/parse-events.c: In function ‘tracepoint_id_to_path’: /usr/include/bits/dirent.h:33:10: note: subobject ‘d_name’ declared here 33 | char d_name[256]; /* We must not include limits.h! */ | ^~~~~~ CC /tmp/build/perf/util/call-path.o Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20200302145535.GA28183@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ebcb9464a2ae3a547e97de476575c82ece0e93e2 Author: Arnaldo Carvalho de Melo Date: Mon Mar 2 11:23:03 2020 -0300 perf env: Do not return pointers to local variables It is possible to return a pointer to a local variable when looking up the architecture name for the running system and no normalization is done on that value, i.e. we may end up returning the uts.machine local variable. While this doesn't happen on most arches, as normalization takes place, lets fix this by making that a static variable and optimize it a bit by not always running uname(), only the first time. Noticed in fedora rawhide running with: [perfbuilder@a5ff49d6e6e4 ~]$ gcc --version gcc (GCC) 10.0.1 20200216 (Red Hat 10.0.1-0.8) Reported-by: Jiri Olsa Cc: Adrian Hunter Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit fc04c39bae01a607454f7619665309870c60937a Author: Pavel Begunkov Date: Sun Mar 1 19:18:19 2020 +0300 io-wq: fix IO_WQ_WORK_NO_CANCEL cancellation To cancel a work, io-wq sets IO_WQ_WORK_CANCEL and executes the callback. However, IO_WQ_WORK_NO_CANCEL works will just execute and may return next work, which will be ignored and lost. Cancel the whole link. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e959e5405f34aa92d71d0dd162b969c21742061d Author: Daniel Wagner Date: Mon Mar 2 14:24:08 2020 +0100 block: Remove used kblockd_schedule_work_on() Commit ee63cfa7fc19 ("block: add kblockd_schedule_work_on()") introduced the helper in 2016. Remove it because since then no caller was added. Cc: Jens Axboe Signed-off-by: Daniel Wagner Signed-off-by: Jens Axboe commit cff20b3151ccab690715cb6cf0f5da5cccb32adf Author: Arnaldo Carvalho de Melo Date: Mon Mar 2 11:13:19 2020 -0300 perf tests bp_account: Make global variable static To fix the build with newer gccs, that without this patch exit with: LD /tmp/build/perf/tests/perf-in.o ld: /tmp/build/perf/tests/bp_account.o:/git/perf/tools/perf/tests/bp_account.c:22: multiple definition of `the_var'; /tmp/build/perf/tests/bp_signal.o:/git/perf/tools/perf/tests/bp_signal.c:38: first defined here make[4]: *** [/git/perf/tools/build/Makefile.build:145: /tmp/build/perf/tests/perf-in.o] Error 1 First noticed in fedora:rawhide/32 with: [perfbuilder@a5ff49d6e6e4 ~]$ gcc --version gcc (GCC) 10.0.1 20200216 (Red Hat 10.0.1-0.8) Reported-by: Jiri Olsa Cc: Adrian Hunter Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit d237851d5d9dff5973160737197e825f05715ba3 Author: Jack Yu Date: Mon Mar 2 09:54:24 2020 +0800 ASoC: rt1015: add operation callback function for rt1015_dai[] Add operation callback function for rt1015_dai[]. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/20200302015424.9075-1-jack.yu@realtek.com Signed-off-by: Mark Brown commit 2873dc25477f483997c99981cf14b43a0d4f84d4 Merge: c105df5d865a bba42affa732 Author: Linus Torvalds Date: Mon Mar 2 06:54:54 2020 -0600 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc fixes: a pkeys fix for a bug that triggers with weird BIOS settings, and two Xen PV fixes: a paravirt interface fix, and pagetable dumping fix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Fix dump_pagetables with Xen PV x86/ioperm: Add new paravirt function update_io_bitmap() x86/pkeys: Manually set X86_FEATURE_OSPKE to preserve existing changes commit c105df5d865afbc10e9730b7b13abc831d5e9ac7 Merge: 852fb4a72822 289de3598481 Author: Linus Torvalds Date: Mon Mar 2 06:51:43 2020 -0600 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "Fix a scheduler statistics bug" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix statistics for find_idlest_group() commit 852fb4a72822b6c03bcf6cf1d51fb05b319d301e Merge: e130a920f693 7977fed974d6 Author: Linus Torvalds Date: Mon Mar 2 06:46:39 2020 -0600 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "No kernel side changes, all tooling fixes plus two tooling cleanups that were committed late in the merge window alongside the perf annotate fixes, delayed by Arnaldo's European trip" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) perf annotate: Fix segfault with source toggle perf annotate: Align struct annotate_args perf annotate: Simplify disasm_line allocation and freeing code perf annotate: Remove privsize from symbol__annotate() args perf probe: Check return value of strlist__add() for -ENOMEM perf config: Document missing config options perf annotate: Fix perf config option description perf annotate: Prefer cmdline option over default config perf annotate: Make perf config effective perf config: Introduce perf_config_u8() perf annotate: Fix --show-nr-samples for tui/stdio2 perf annotate: Fix --show-total-period for tui/stdio2 perf annotate/tui: Re-render title bar after switching back from script browser tools headers UAPI: Update tools's copy of kvm.h headers tools arch x86: Sync the msr-index.h copy with the kernel sources perf arch powerpc: Sync powerpc syscall.tbl with the kernel sources perf auxtrace: Add auxtrace_record__read_finish() perf arm-spe: Fix endless record after being terminated perf cs-etm: Fix endless record after being terminated perf intel-bts: Fix endless record after being terminated ... commit e130a920f69399777062f9fe7763abe895d386b0 Merge: 98d54f81e36b be36f9e7517e Author: Linus Torvalds Date: Mon Mar 2 06:41:41 2020 -0600 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Ingo Molnar: "Three fixes to EFI mixed boot mode, mostly related to x86-64 vmap stacks activated years ago, bug-fixed recently for EFI, which had knock-on effects of various 1:1 mapping assumptions in mixed mode. There's also a READ_ONCE() fix for reading an mmap-ed EFI firmware data field only once, out of caution" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi: READ_ONCE rng seed size before munmap efi/x86: Handle by-ref arguments covering multiple pages in mixed mode efi/x86: Remove support for EFI time and counter services in mixed mode efi/x86: Align GUIDs to their size in the mixed mode runtime wrapper commit 9abd515a6e4a5c58c6eb4d04110430325eb5f5ac Author: Jean-Philippe Brucker Date: Thu Feb 27 09:34:47 2020 +0100 arm64: context: Fix ASID limit in boot messages Since commit f88f42f853a8 ("arm64: context: Free up kernel ASIDs if KPTI is not in use"), the NUM_USER_ASIDS macro doesn't correspond to the effective number of ASIDs when KPTI is enabled. Get an accurate number of available ASIDs in an arch_initcall, once we've discovered all CPUs' capabilities and know if we still need to halve the ASID space for KPTI. Fixes: f88f42f853a8 ("arm64: context: Free up kernel ASIDs if KPTI is not in use") Reviewed-by: Vladimir Murzin Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon commit 3ba52ad55b533760a1f65836aa0ec9d35e36bb4f Author: luanshi Date: Wed Feb 26 13:45:10 2020 +0800 drivers/perf: arm_pmu_acpi: Fix incorrect checking of gicc pointer Fix bogus NULL checks on the return value of acpi_cpu_get_madt_gicc() by checking for a 0 'gicc->performance_interrupt' value instead. Signed-off-by: Liguang Zhang Signed-off-by: Will Deacon commit 049d919168458ac54e7fad27cd156a958b042d2f Author: Joakim Zhang Date: Tue Feb 25 20:56:43 2020 +0800 drivers/perf: fsl_imx8_ddr: Correct the CLEAR bit definition When disabling a counter from ddr_perf_event_stop(), the counter value is reset to 0 at the same time. Preserve the counter value by performing a read-modify-write of the PMU register and clearing only the enable bit. Signed-off-by: Joakim Zhang Signed-off-by: Will Deacon commit f4aaa44e8b20f7e0d4ea68d3bca4968b6ae5aaff Author: Dan Carpenter Date: Fri Feb 28 17:14:13 2020 +0300 drm/i915/selftests: Fix return in assert_mmap_offset() The assert_mmap_offset() returns type bool so if we return an error pointer that is "return true;" or success. If we have an error, then we should return false. Fixes: 3d81d589d6e3 ("drm/i915: Test exhaustion of the mmap space") Signed-off-by: Dan Carpenter Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200228141413.qfjf4abr323drlo4@kili.mountain (cherry picked from commit efbf928824820f2738f41271934f6ec2c6ebd587) Signed-off-by: Jani Nikula commit 0b1570b7ffe68dfefa07cb092a0723f898bb8184 Author: Chris Wilson Date: Thu Feb 27 08:57:14 2020 +0000 drm/i915: Protect i915_request_await_start from early waits We need to be extremely careful inside i915_request_await_start() as it needs to walk the list of requests in the foreign timeline with very little protection. As we hold our own timeline mutex, we can not nest inside the signaler's timeline mutex, so all that remains is our RCU protection. However, to be safe we need to tell the compiler that we may be traversing the list only under RCU protection, and furthermore we need to start declaring requests as elements of the timeline from their construction. Fixes: 9ddc8ec027a3 ("drm/i915: Eliminate the trylock for awaiting an earlier request") Fixes: 6a79d848403d ("drm/i915: Lock signaler timeline while navigating") Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200227085723.1961649-11-chris@chris-wilson.co.uk (cherry picked from commit d22d2d073ef859b346bc32cb25299262e3973769) Signed-off-by: Jani Nikula commit eddf309a8ed42eb3312b17a6934686b018189cd3 Author: Lucas De Marchi Date: Mon Feb 24 11:12:58 2020 -0800 drm/i915/tgl: Add Wa_1608008084 Wa_1608008084 is an additional WA that applies to writes on FF_MODE2 register. We can't read it back either from CPU or GPU. Since the other bits should be 0, recommendation to handle Wa_1604555607 is to actually just write the timer value. Do a write only and don't try to read it, neither before or after the WA is applied. Fixes: ff690b2111ba ("drm/i915/tgl: Implement Wa_1604555607") Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200224191258.15668-1-lucas.demarchi@intel.com (cherry picked from commit e94bda14325ccf1a519ffb516738d1201457f97f) Signed-off-by: Jani Nikula commit 4c116e1ae43955a0a38555dfd4d136a222a8996b Author: Matt Roper Date: Thu Feb 27 16:43:20 2020 -0800 drm/i915/tgl: Add Wa_22010178259:tgl We need to explicitly set the TLB Request Timer initial value in the BW_BUDDY registers to 0x8 rather than relying on the hardware default. v2: Apply missing REG_FIELD_PREP to ensure 0x8 is placed in the correct bits during the rmw. (Jose) Bspec: 52890 Bspec: 50044 Fixes: 3fa01d642fa7 ("drm/i915/tgl: Program BW_BUDDY registers during display init") Cc: Stanislav Lisovskiy Cc: José Roberto de Souza Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200219215655.2923650-1-matthew.d.roper@intel.com Reviewed-by: José Roberto de Souza (cherry picked from commit 87e04f75928bb5d357ef7df4eedc1a7e2761a833) Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200228004320.127142-2-matthew.d.roper@intel.com commit c725161924f9a5872a3e53b73345a6026a5c170e Author: Matt Roper Date: Thu Feb 27 16:43:19 2020 -0800 drm/i915: Program MBUS with rmw during initialization It wasn't terribly clear from the bspec's wording, but after discussion with the hardware folks, it turns out that we need to preserve the pre-existing contents of the MBUS ABOX control register when initializing a few specific bits. Bspec: 49213 Bspec: 50096 Fixes: 4cb4585e5a7f ("drm/i915/icl: initialize MBus during display init") Cc: Stanislav Lisovskiy Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200204011032.582737-1-matthew.d.roper@intel.com Reviewed-by: Matt Atwood (cherry picked from commit 837b63e6087838d0f1e612d448405419199d8033) Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200228004320.127142-1-matthew.d.roper@intel.com commit 33e059a2e4df454359f642f2235af39de9d3e914 Author: José Roberto de Souza Date: Thu Feb 27 12:55:40 2020 -0800 drm/i915/psr: Force PSR probe only after full initialization Commit 60c6a14b489b ("drm/i915/display: Force the state compute phase once to enable PSR") was forcing the state compute too earlier causing errors because not everything was initialized, so here moving to the end of i915_driver_modeset_probe() when the display is all initialized. Also fixing the place where it disarm the force probe as during the atomic check phase errors could happen like the ones due locking and it would cause PSR to never be enabled if that happens. Leaving the disarm to the atomic commit phase, intel_psr_enable() or intel_psr_update() will be called even if the current state do not allow PSR to be enabled. v2: Check if intel_dp is null in intel_psr_force_mode_changed_set() v3: Check intel_dp before get dev_priv v4: - renamed intel_psr_force_mode_changed_set() to intel_psr_set_force_mode_changed() - removed the set parameter from intel_psr_set_force_mode_changed() - not calling intel_psr_set_force_mode_changed() from intel_psr_enable/update(), directly setting it after the same checks that intel_psr_set_force_mode_changed() does - moved intel_psr_set_force_mode_changed() arm call to i915_driver_modeset_probe() as it is a better for a PSR call, all the functions calls happening between the old and the new function call will cause issue [backported to v5.6-rc3] Fixes: 60c6a14b489b ("drm/i915/display: Force the state compute phase once to enable PSR") Closes: https://gitlab.freedesktop.org/drm/intel/issues/1151 Tested-by: Ross Zwisler Reported-by: Ross Zwisler Cc: Gwan-gyeong Mun Cc: Jani Nikula Cc: Anshuman Gupta Reviewed-by: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200221212635.11614-1-jose.souza@intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20200227205540.126135-1-jose.souza@intel.com (cherry picked from commit df1a5bfc16f3275a74f77d73375e69bc62c45c4b) Signed-off-by: Jani Nikula commit bb699a793110fc29664e80c4ebb158a922151d52 Author: Chris Wilson Date: Fri Feb 21 10:09:53 2020 +0000 drm/i915/gem: Break up long lists of object reclaim Call cond_resched() between each freed object in case we have a really, really long list, and we don't want to block normal processes. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200221100953.2587176-1-chris@chris-wilson.co.uk (cherry picked from commit deeee411a97559096523f97655ff16da34cf0573) Signed-off-by: Jani Nikula commit 852d7655ea4395a1deb7070abe37962a7d0662e4 Author: Gerd Hoffmann Date: Fri Feb 28 11:47:23 2020 +0100 drm/shmem: drop pgprot_decrypted() Was added by commit 95cf9264d5f3 ("x86, drm, fbdev: Do not specify encrypted memory for video mappings"), then it was kept through various changes. While vram actually needs decrypted mappings this is not correct for shmem gem objects which live in main memory not io memory, so remove the call. Signed-off-by: Gerd Hoffmann Reviewed-by: Thomas Hellstrom Link: http://patchwork.freedesktop.org/patch/msgid/20200228104723.18757-1-kraxel@redhat.com commit 3b6a9b19ab652efac7ad4c392add6f1235019568 Author: Marek Szyprowski Date: Thu Feb 20 13:57:26 2020 +0100 drm/exynos: hdmi: don't leak enable HDMI_EN regulator if probe fails Move enabling and disabling HDMI_EN optional regulator to probe() function to keep track on the regulator status. This fixes following warning if probe() fails (for example when I2C DDC adapter cannot be yet gathered due to the missing driver). This fixes following warning observed on Arndale5250 board with multi_v7_defconfig: [drm] Failed to get ddc i2c adapter by node ------------[ cut here ]------------ WARNING: CPU: 0 PID: 214 at drivers/regulator/core.c:2051 _regulator_put+0x16c/0x184 Modules linked in: ... CPU: 0 PID: 214 Comm: systemd-udevd Not tainted 5.6.0-rc2-next-20200219-00040-g38af1dfafdbb #7570 Hardware name: Samsung Exynos (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xcc/0xe0) [] (dump_stack) from [] (__warn+0xe0/0xf8) [] (__warn) from [] (warn_slowpath_fmt+0xb0/0xb8) [] (warn_slowpath_fmt) from [] (_regulator_put+0x16c/0x184) [] (_regulator_put) from [] (regulator_put+0x1c/0x2c) [] (regulator_put) from [] (release_nodes+0x17c/0x200) [] (release_nodes) from [] (really_probe+0x10c/0x350) [] (really_probe) from [] (driver_probe_device+0x60/0x1a0) [] (driver_probe_device) from [] (device_driver_attach+0x58/0x60) [] (device_driver_attach) from [] (__driver_attach+0x80/0xbc) [] (__driver_attach) from [] (bus_for_each_dev+0x68/0xb4) [] (bus_for_each_dev) from [] (bus_add_driver+0x130/0x1e8) [] (bus_add_driver) from [] (driver_register+0x78/0x110) [] (driver_register) from [] (exynos_drm_init+0xe8/0x11c [exynosdrm]) [] (exynos_drm_init [exynosdrm]) from [] (do_one_initcall+0x50/0x220) [] (do_one_initcall) from [] (do_init_module+0x60/0x210) [] (do_init_module) from [] (load_module+0x1c0c/0x2310) [] (load_module) from [] (sys_finit_module+0xac/0xbc) [] (sys_finit_module) from [] (ret_fast_syscall+0x0/0x54) Exception stack(0xecca3fa8 to 0xecca3ff0) ... ---[ end trace 276c91214635905c ]--- Signed-off-by: Marek Szyprowski Reviewed-by: Andrzej Hajda Signed-off-by: Inki Dae commit c0fd99d659ba5582e09625c7a985d63fc2ca74b5 Author: Marek Szyprowski Date: Thu Feb 20 13:30:12 2020 +0100 drm/exynos: dsi: fix workaround for the legacy clock name Writing to the built-in strings arrays doesn't work if driver is loaded as kernel module. This is also considered as a bad pattern. Fix this by adding a call to clk_get() with legacy clock name. This fixes following kernel oops if driver is loaded as module: Unable to handle kernel paging request at virtual address bf047978 pgd = (ptrval) [bf047978] *pgd=59344811, *pte=5903c6df, *ppte=5903c65f Internal error: Oops: 80f [#1] SMP ARM Modules linked in: mc exynosdrm(+) analogix_dp rtc_s3c exynos_ppmu i2c_gpio CPU: 1 PID: 212 Comm: systemd-udevd Not tainted 5.6.0-rc2-next-20200219 #326 videodev: Linux video capture interface: v2.00 Hardware name: Samsung Exynos (Flattened Device Tree) PC is at exynos_dsi_probe+0x1f0/0x384 [exynosdrm] LR is at exynos_dsi_probe+0x1dc/0x384 [exynosdrm] ... Process systemd-udevd (pid: 212, stack limit = 0x(ptrval)) ... [] (exynos_dsi_probe [exynosdrm]) from [] (platform_drv_probe+0x6c/0xa4) [] (platform_drv_probe) from [] (really_probe+0x210/0x350) [] (really_probe) from [] (driver_probe_device+0x60/0x1a0) [] (driver_probe_device) from [] (device_driver_attach+0x58/0x60) [] (device_driver_attach) from [] (__driver_attach+0x80/0xbc) [] (__driver_attach) from [] (bus_for_each_dev+0x68/0xb4) [] (bus_for_each_dev) from [] (bus_add_driver+0x130/0x1e8) [] (bus_add_driver) from [] (driver_register+0x78/0x110) [] (driver_register) from [] (exynos_drm_init+0xe8/0x11c [exynosdrm]) [] (exynos_drm_init [exynosdrm]) from [] (do_one_initcall+0x50/0x220) [] (do_one_initcall) from [] (do_init_module+0x60/0x210) [] (do_init_module) from [] (load_module+0x1c0c/0x2310) [] (load_module) from [] (sys_finit_module+0xac/0xbc) [] (sys_finit_module) from [] (ret_fast_syscall+0x0/0x54) Exception stack(0xd979bfa8 to 0xd979bff0) ... ---[ end trace db16efe05faab470 ]--- Signed-off-by: Marek Szyprowski Reviewed-by: Andrzej Hajda Signed-off-by: Inki Dae commit 0a9d1e3f3f038785ebc72d53f1c409d07f6b4ff5 Author: Marek Szyprowski Date: Thu Feb 27 08:06:37 2020 +0100 drm/exynos: dsi: propagate error value and silence meaningless warning Properly propagate error value from devm_regulator_bulk_get() and don't confuse user with meaningless warning about failure in getting regulators in case of deferred probe. Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Inki Dae commit ab124d580ad40b0666d7892ceccd8c4ac1ce4c79 Merge: 249bc9744e16 22630e28f9c2 Author: David S. Miller Date: Sun Mar 1 19:15:27 2020 -0800 Merge branch 'bnxt_en-2-bug-fixes' Michael Chan says: ==================== bnxt_en: 2 bug fixes. This first patch fixes a rare but possible crash in pci_disable_msix() when the MTU is changed. The 2nd patch fixes a regression in error code handling when flashing a file to NVRAM. Please also queue these for -stable. Thanks. ==================== Signed-off-by: David S. Miller commit 22630e28f9c2b55abd217869cc0696def89f2284 Author: Edwin Peer Date: Sun Mar 1 22:07:18 2020 -0500 bnxt_en: fix error handling when flashing from file After bnxt_hwrm_do_send_message() was updated to return standard error codes in a recent commit, a regression in bnxt_flash_package_from_file() was introduced. The return value does not properly reflect all possible firmware errors when calling firmware to flash the package. Fix it by consolidating all errors in one local variable rc instead of having 2 variables for different errors. Fixes: d4f1420d3656 ("bnxt_en: Convert error code in firmware message response to standard code.") Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit a9b952d267e59a3b405e644930f46d252cea7122 Author: Vasundhara Volam Date: Sun Mar 1 22:07:17 2020 -0500 bnxt_en: reinitialize IRQs when MTU is modified MTU changes may affect the number of IRQs so we must call bnxt_close_nic()/bnxt_open_nic() with the irq_re_init parameter set to true. The reason is that a larger MTU may require aggregation rings not needed with smaller MTU. We may not be able to allocate the required number of aggregation rings and so we reduce the number of channels which will change the number of IRQs. Without this patch, it may crash eventually in pci_disable_msix() when the IRQs are not properly unwound. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 249bc9744e165abe74ae326f43e9d70bad54c3b7 Author: Heiner Kallweit Date: Sun Mar 1 21:36:09 2020 +0100 net: phy: avoid clearing PHY interrupts twice in irq handler On all PHY drivers that implement did_interrupt() reading the interrupt status bits clears them. This means we may loose an interrupt that is triggered between calling did_interrupt() and phy_clear_interrupt(). As part of the fix make it a requirement that did_interrupt() clears the interrupt. The Fixes tag refers to the first commit where the patch applies cleanly. Fixes: 49644e68f472 ("net: phy: add callback for custom interrupt handler to struct phy_driver") Reported-by: Michael Walle Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 98d54f81e36ba3bf92172791eba5ca5bd813989b Author: Linus Torvalds Date: Sun Mar 1 16:38:46 2020 -0600 Linux 5.6-rc4 commit e70869821a469029aeb056b4da96e5815cc5830e Merge: f853ed90e2e4 37b0b6b8b99c Author: Linus Torvalds Date: Sun Mar 1 16:35:08 2020 -0600 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Two more bug fixes (including a regression) for 5.6" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: potential crash on allocation error in ext4_alloc_flex_bg_array() jbd2: fix data races at struct journal_head commit f853ed90e2e49f4f6e585f995ffb25e093fe4df6 Merge: fb279f4e2386 86f7e90ce840 Author: Linus Torvalds Date: Sun Mar 1 15:16:35 2020 -0600 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "More bugfixes, including a few remaining "make W=1" issues such as too large frame sizes on some configurations. On the ARM side, the compiler was messing up shadow stacks between EL1 and EL2 code, which is easily fixed with __always_inline" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: VMX: check descriptor table exits on instruction emulation kvm: x86: Limit the number of "kvm: disabled by bios" messages KVM: x86: avoid useless copy of cpufreq policy KVM: allow disabling -Werror KVM: x86: allow compiling as non-module with W=1 KVM: Pre-allocate 1 cpumask variable per cpu for both pv tlb and pv ipis KVM: Introduce pv check helpers KVM: let declaration of kvm_get_running_vcpus match implementation KVM: SVM: allocate AVIC data structures based on kvm_amd module parameter arm64: Ask the compiler to __always_inline functions used by KVM at HYP KVM: arm64: Define our own swab32() to avoid a uapi static inline KVM: arm64: Ask the compiler to __always_inline functions used at HYP kvm: arm/arm64: Fold VHE entry/exit work into kvm_vcpu_run_vhe() KVM: arm/arm64: Fix up includes for trace.h commit 86f7e90ce840aa1db407d3ea6e9b3a52b2ce923c Author: Oliver Upton Date: Sat Feb 29 11:30:14 2020 -0800 KVM: VMX: check descriptor table exits on instruction emulation KVM emulates UMIP on hardware that doesn't support it by setting the 'descriptor table exiting' VM-execution control and performing instruction emulation. When running nested, this emulation is broken as KVM refuses to emulate L2 instructions by default. Correct this regression by allowing the emulation of descriptor table instructions if L1 hasn't requested 'descriptor table exiting'. Fixes: 07721feee46b ("KVM: nVMX: Don't emulate instructions in guest mode") Reported-by: Jan Kiszka Cc: stable@vger.kernel.org Cc: Paolo Bonzini Cc: Jim Mattson Signed-off-by: Oliver Upton Signed-off-by: Paolo Bonzini commit 146033562e7e5d1c9aae9653986806664995f1d5 Author: Christian Hewitt Date: Thu Feb 20 19:33:10 2020 +0400 arm64: dts: meson: fix gxm-khadas-vim2 wifi before [6.418252] brcmfmac: F1 signature read @0x18000000=0x17224356 [6.435663] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4356-sdio for chip BCM4356/2 [6.551259] brcmfmac: brcmf_sdiod_ramrw: membytes transfer failed [6.551275] brcmfmac: brcmf_sdio_verifymemory: error -84 on reading 2048 membytes at 0x00184000 [6.551352] brcmfmac: brcmf_sdio_download_firmware: dongle image file download failed after [6.657165] brcmfmac: F1 signature read @0x18000000=0x17224356 [6.660807] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4356-sdio for chip BCM4356/2 [6.918643] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4356-sdio for chip BCM4356/2 [6.918734] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available [6.922724] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4356/2 wl0: Jun 16 2015 14:25:06 version 7.35.184.r1 (TOB) (r559293) FWID 01-b22ae69c Fixes: adc52bf7ef16 ("arm64: dts: meson: fix mmc v2 chips max frequencies") Suggested-by: Art Nikpal Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/1582212790-11402-1-git-send-email-christianshewitt@gmail.com commit 52c0d4e306ca0261a896f5e2ad823112195b7f4b Author: Vladimir Oltean Date: Sat Feb 29 22:30:07 2020 +0200 net: dsa: sja1105: Don't destroy not-yet-created xmit_worker Fixes the following NULL pointer dereference on PHY connect error path teardown: [ 2.291010] sja1105 spi0.1: Probed switch chip: SJA1105T [ 2.310044] sja1105 spi0.1: Enabled switch tagging [ 2.314970] fsl-gianfar soc:ethernet@2d90000 eth2: error -19 setting up slave phy [ 2.322463] 8<--- cut here --- [ 2.325497] Unable to handle kernel NULL pointer dereference at virtual address 00000018 [ 2.333555] pgd = (ptrval) [ 2.336241] [00000018] *pgd=00000000 [ 2.339797] Internal error: Oops: 5 [#1] SMP ARM [ 2.344384] Modules linked in: [ 2.347420] CPU: 1 PID: 64 Comm: kworker/1:1 Not tainted 5.5.0-rc5 #1 [ 2.353820] Hardware name: Freescale LS1021A [ 2.358070] Workqueue: events deferred_probe_work_func [ 2.363182] PC is at kthread_destroy_worker+0x4/0x74 [ 2.368117] LR is at sja1105_teardown+0x70/0xb4 [ 2.372617] pc : [] lr : [] psr: 60000013 [ 2.378845] sp : eeac3d30 ip : eeab1900 fp : eef45480 [ 2.384036] r10: eef4549c r9 : 00000001 r8 : 00000000 [ 2.389227] r7 : eef527c0 r6 : 00000034 r5 : ed8ddd0c r4 : ed8ddc40 [ 2.395714] r3 : 00000000 r2 : 00000000 r1 : eef4549c r0 : 00000000 [ 2.402204] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none [ 2.409297] Control: 10c5387d Table: 8020406a DAC: 00000051 [ 2.415008] Process kworker/1:1 (pid: 64, stack limit = 0x(ptrval)) [ 2.421237] Stack: (0xeeac3d30 to 0xeeac4000) [ 2.612635] [] (kthread_destroy_worker) from [] (sja1105_teardown+0x70/0xb4) [ 2.621379] [] (sja1105_teardown) from [] (dsa_switch_teardown.part.1+0x48/0x74) [ 2.630467] [] (dsa_switch_teardown.part.1) from [] (dsa_register_switch+0x8b0/0xbf4) [ 2.639984] [] (dsa_register_switch) from [] (sja1105_probe+0x2ac/0x464) [ 2.648378] [] (sja1105_probe) from [] (spi_drv_probe+0x7c/0xa0) [ 2.656081] [] (spi_drv_probe) from [] (really_probe+0x208/0x480) [ 2.663871] [] (really_probe) from [] (driver_probe_device+0x78/0x1c4) [ 2.672093] [] (driver_probe_device) from [] (bus_for_each_drv+0x80/0xc4) [ 2.680574] [] (bus_for_each_drv) from [] (__device_attach+0xd0/0x168) [ 2.688794] [] (__device_attach) from [] (bus_probe_device+0x84/0x8c) [ 2.696927] [] (bus_probe_device) from [] (deferred_probe_work_func+0x84/0xc4) [ 2.705842] [] (deferred_probe_work_func) from [] (process_one_work+0x22c/0x560) [ 2.714926] [] (process_one_work) from [] (worker_thread+0x2a8/0x5d4) [ 2.723059] [] (worker_thread) from [] (kthread+0x150/0x154) [ 2.730416] [] (kthread) from [] (ret_from_fork+0x14/0x2c) Checking for NULL pointer is correct because the per-port xmit kernel threads are created in sja1105_probe immediately after calling dsa_register_switch. Fixes: a68578c20a96 ("net: dsa: Make deferred_xmit private to sja1105") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 07758eb9ff52794fba15d03aa88d92dbd1b7d125 Author: Hangbin Liu Date: Sat Feb 29 17:27:13 2020 +0800 net/ipv6: use configured metric when add peer route When we add peer address with metric configured, IPv4 could set the dest metric correctly, but IPv6 do not. e.g. ]# ip addr add 192.0.2.1 peer 192.0.2.2/32 dev eth1 metric 20 ]# ip route show dev eth1 192.0.2.2 proto kernel scope link src 192.0.2.1 metric 20 ]# ip addr add 2001:db8::1 peer 2001:db8::2/128 dev eth1 metric 20 ]# ip -6 route show dev eth1 2001:db8::1 proto kernel metric 20 pref medium 2001:db8::2 proto kernel metric 256 pref medium Fix this by using configured metric instead of default one. Reported-by: Jianlin Shi Fixes: 8308f3ff1753 ("net/ipv6: Add support for specifying metric of connected routes") Reviewed-by: David Ahern Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 0395823b8d9a4d87bd1bf74359123461c2ae801b Author: Russell King Date: Fri Feb 28 19:39:41 2020 +0000 net: dsa: mv88e6xxx: fix lockup on warm boot If the switch is not hardware reset on a warm boot, interrupts can be left enabled, and possibly pending. This will cause us to enter an infinite loop trying to service an interrupt we are unable to handle, thereby preventing the kernel from booting. Ensure that the global 2 interrupt sources are disabled before we claim the parent interrupt. Observed on the ZII development revision B and C platforms with reworked serdes support, and using reboot -f to reboot the platform. Fixes: dc30c35be720 ("net: dsa: mv88e6xxx: Implement interrupt support.") Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 8a171c5cc9de7fb0a485341b790aba736978ed73 Author: Randy Dunlap Date: Thu Feb 27 18:09:44 2020 -0800 atm: nicstar: fix if-statement empty body warning When debugging via PRINTK() is not enabled, make the PRINTK() macro be an empty do-while block. Thix fixes a gcc warning when -Wextra is set: ../drivers/atm/nicstar.c:1819:23: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] I have verified that there is no object code change (with gcc 7.5.0). Signed-off-by: Randy Dunlap Cc: Chas Williams <3chas3@gmail.com> Cc: linux-atm-general@lists.sourceforge.net Cc: netdev@vger.kernel.org Cc: David S. Miller Signed-off-by: David S. Miller commit 84b3268027641401bb8ad4427a90a3cce2eb86f5 Author: Pablo Neira Ayuso Date: Wed Feb 26 19:47:34 2020 +0100 netlink: Use netlink header as base to calculate bad attribute offset Userspace might send a batch that is composed of several netlink messages. The netlink_ack() function must use the pointer to the netlink header as base to calculate the bad attribute offset. Fixes: 2d4bc93368f5 ("netlink: extended ACK reporting") Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit d64c7a08034b32c285e576208ae44fc3ba3fa7df Author: You-Sheng Yang Date: Wed Feb 26 23:37:10 2020 +0800 r8152: check disconnect status after long sleep Dell USB Type C docking WD19/WD19DC attaches additional peripherals as: /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M |__ Port 1: Dev 11, If 0, Class=Hub, Driver=hub/4p, 5000M |__ Port 3: Dev 12, If 0, Class=Hub, Driver=hub/4p, 5000M |__ Port 4: Dev 13, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M where usb 2-1-3 is a hub connecting all USB Type-A/C ports on the dock. When hotplugging such dock with additional usb devices already attached on it, the probing process may reset usb 2.1 port, therefore r8152 ethernet device is also reset. However, during r8152 device init there are several for-loops that, when it's unable to retrieve hardware registers due to being disconnected from USB, may take up to 14 seconds each in practice, and that has to be completed before USB may re-enumerate devices on the bus. As a result, devices attached to the dock will only be available after nearly 1 minute after the dock was plugged in: [ 216.388290] [250] r8152 2-1.4:1.0: usb_probe_interface [ 216.388292] [250] r8152 2-1.4:1.0: usb_probe_interface - got id [ 258.830410] r8152 2-1.4:1.0 (unnamed net_device) (uninitialized): PHY not ready [ 258.830460] r8152 2-1.4:1.0 (unnamed net_device) (uninitialized): Invalid header when reading pass-thru MAC addr [ 258.830464] r8152 2-1.4:1.0 (unnamed net_device) (uninitialized): Get ether addr fail This happens in, for example, r8153_init: static int generic_ocp_read(struct r8152 *tp, u16 index, u16 size, void *data, u16 type) { if (test_bit(RTL8152_UNPLUG, &tp->flags)) return -ENODEV; ... } static u16 ocp_read_word(struct r8152 *tp, u16 type, u16 index) { u32 data; ... generic_ocp_read(tp, index, sizeof(tmp), &tmp, type | byen); data = __le32_to_cpu(tmp); ... return (u16)data; } static void r8153_init(struct r8152 *tp) { ... if (test_bit(RTL8152_UNPLUG, &tp->flags)) return; for (i = 0; i < 500; i++) { if (ocp_read_word(tp, MCU_TYPE_PLA, PLA_BOOT_CTRL) & AUTOLOAD_DONE) break; msleep(20); } ... } Since ocp_read_word() doesn't check the return status of generic_ocp_read(), and the only exit condition for the loop is to have a match in the returned value, such loops will only ends after exceeding its maximum runs when the device has been marked as disconnected, which takes 500 * 20ms = 10 seconds in theory, 14 in practice. To solve this long latency another test to RTL8152_UNPLUG flag should be added after those 20ms sleep to skip unnecessary loops, so that the device probe can complete early and proceed to parent port reset/reprobe process. This can be reproduced on all kernel versions up to latest v5.6-rc2, but after v5.5-rc7 the reproduce rate is dramatically lowered to 1/30 or less while it was around 1/2. Signed-off-by: You-Sheng Yang Signed-off-by: David S. Miller commit fb279f4e238617417b132a550f24c1e86d922558 Merge: 7557c1b3f715 38b17afb0ebb Author: Linus Torvalds Date: Sat Feb 29 19:16:46 2020 -0600 Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "I2C has three driver bugfixes for you. We agreed on the Mac regression to go in via I2C" * 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: macintosh: therm_windtunnel: fix regression when instantiating devices i2c: altera: Fix potential integer overflow i2c: jz4780: silence log flood on txabrt commit 37b0b6b8b99c0e1c1f11abbe7cf49b6d03795b3f Author: Dan Carpenter Date: Fri Feb 28 12:22:56 2020 +0300 ext4: potential crash on allocation error in ext4_alloc_flex_bg_array() If sbi->s_flex_groups_allocated is zero and the first allocation fails then this code will crash. The problem is that "i--" will set "i" to -1 but when we compare "i >= sbi->s_flex_groups_allocated" then the -1 is type promoted to unsigned and becomes UINT_MAX. Since UINT_MAX is more than zero, the condition is true so we call kvfree(new_groups[-1]). The loop will carry on freeing invalid memory until it crashes. Fixes: 7c990728b99e ("ext4: fix potential race between s_flex_groups online resizing and access") Reviewed-by: Suraj Jitindar Singh Signed-off-by: Dan Carpenter Cc: stable@kernel.org Link: https://lore.kernel.org/r/20200228092142.7irbc44yaz3by7nb@kili.mountain Signed-off-by: Theodore Ts'o commit 38b17afb0ebb9ecd41418d3c08bcf9198af4349d Author: Wolfram Sang Date: Tue Feb 25 15:12:29 2020 +0100 macintosh: therm_windtunnel: fix regression when instantiating devices Removing attach_adapter from this driver caused a regression for at least some machines. Those machines had the sensors described in their DT, too, so they didn't need manual creation of the sensor devices. The old code worked, though, because manual creation came first. Creation of DT devices then failed later and caused error logs, but the sensors worked nonetheless because of the manually created devices. When removing attach_adaper, manual creation now comes later and loses the race. The sensor devices were already registered via DT, yet with another binding, so the driver could not be bound to it. This fix refactors the code to remove the race and only manually creates devices if there are no DT nodes present. Also, the DT binding is updated to match both, the DT and manually created devices. Because we don't know which device creation will be used at runtime, the code to start the kthread is moved to do_probe() which will be called by both methods. Fixes: 3e7bed52719d ("macintosh: therm_windtunnel: drop using attach_adapter") Link: https://bugzilla.kernel.org/show_bug.cgi?id=201723 Reported-by: Erhard Furtner Tested-by: Erhard Furtner Acked-by: Michael Ellerman (powerpc) Signed-off-by: Wolfram Sang Cc: stable@kernel.org # v4.19+ commit b6a79b417f54ed2fe50bc7d62732afe58f01b931 Merge: 27ad6129a29e 94f18b9b24ee Author: Olof Johansson Date: Sat Feb 29 11:48:48 2020 -0800 Merge tag 'arm-soc/for-5.6/devicetree-fixes' of https://github.com/Broadcom/stblinux into arm/fixes This pull request contains Broadcom ARM-based SoCs Device Tree fixes for 5.6, please pull the following: - Stefan adds missing Device Tree properties for the Raspberry Pi 3B and 4 LEDs to have proper default configuration - Nicolas adds an alias for the PCIe root complex node that is looked up by the Raspberry Pi firmware for patching in specific properties * tag 'arm-soc/for-5.6/devicetree-fixes' of https://github.com/Broadcom/stblinux: ARM: dts: bcm2711: Add pcie0 alias ARM: dts: bcm283x: Add missing properties to the PWR LED Link: https://lore.kernel.org/r/20200228181144.15148-2-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 27ad6129a29e5f458fa843d4da393e9714aa46cb Merge: f9a15f39e50d 51c22d7b40dc Author: Olof Johansson Date: Sat Feb 29 11:47:43 2020 -0800 Merge tag 'omap-for-v5.6/fixes-rc3-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Few fixes for omaps for v5.6-rc cycle This series of changes contains few code fixes for issues recently discovered: - A build fix for ARMv6 only configs when CONFIG_HAVE_ARM_SMCCC is not set - A fix for ti-sysc quirk handling for 1-wire hdq reset And a handful of dts fixes that I had queued up and should have already sent earlier instead of waiting for the code fixes to get sorted out: - Fix naming of vsys_3v3 regulator for dra7-evm - Fix incorrect OPP node names for am437x-idk-evm - Fix IPU1 mux clock parent source for dra7 - Add missing PWM property for dra7 timers 13 to 16 - Add missing dma-ranges for dra7 PCIe nodes - Fix mmc3 max-frequency for dra76x * tag 'omap-for-v5.6/fixes-rc3-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Fix compile if CONFIG_HAVE_ARM_SMCCC is not set arm: dts: dra76x: Fix mmc3 max-frequency ARM: dts: dra7: Add "dma-ranges" property to PCIe RC DT nodes bus: ti-sysc: Fix 1-wire reset quirk ARM: dts: dra7-l4: mark timer13-16 as pwm capable ARM: dts: dra7xx-clocks: Fixup IPU1 mux clock parent source ARM: dts: am437x-idk-evm: Fix incorrect OPP node names ARM: dts: dra7-evm: Rename evm_3v3 regulator to vsys_3v3 Link: https://lore.kernel.org/r/pull-1582903541-589933@atomide.com Signed-off-by: Olof Johansson commit 6c5d911249290f41f7b50b43344a7520605b1acb Author: Qian Cai Date: Fri Feb 21 23:31:11 2020 -0500 jbd2: fix data races at struct journal_head journal_head::b_transaction and journal_head::b_next_transaction could be accessed concurrently as noticed by KCSAN, LTP: starting fsync04 /dev/zero: Can't open blockdev EXT4-fs (loop0): mounting ext3 file system using the ext4 subsystem EXT4-fs (loop0): mounted filesystem with ordered data mode. Opts: (null) ================================================================== BUG: KCSAN: data-race in __jbd2_journal_refile_buffer [jbd2] / jbd2_write_access_granted [jbd2] write to 0xffff99f9b1bd0e30 of 8 bytes by task 25721 on cpu 70: __jbd2_journal_refile_buffer+0xdd/0x210 [jbd2] __jbd2_journal_refile_buffer at fs/jbd2/transaction.c:2569 jbd2_journal_commit_transaction+0x2d15/0x3f20 [jbd2] (inlined by) jbd2_journal_commit_transaction at fs/jbd2/commit.c:1034 kjournald2+0x13b/0x450 [jbd2] kthread+0x1cd/0x1f0 ret_from_fork+0x27/0x50 read to 0xffff99f9b1bd0e30 of 8 bytes by task 25724 on cpu 68: jbd2_write_access_granted+0x1b2/0x250 [jbd2] jbd2_write_access_granted at fs/jbd2/transaction.c:1155 jbd2_journal_get_write_access+0x2c/0x60 [jbd2] __ext4_journal_get_write_access+0x50/0x90 [ext4] ext4_mb_mark_diskspace_used+0x158/0x620 [ext4] ext4_mb_new_blocks+0x54f/0xca0 [ext4] ext4_ind_map_blocks+0xc79/0x1b40 [ext4] ext4_map_blocks+0x3b4/0x950 [ext4] _ext4_get_block+0xfc/0x270 [ext4] ext4_get_block+0x3b/0x50 [ext4] __block_write_begin_int+0x22e/0xae0 __block_write_begin+0x39/0x50 ext4_write_begin+0x388/0xb50 [ext4] generic_perform_write+0x15d/0x290 ext4_buffered_write_iter+0x11f/0x210 [ext4] ext4_file_write_iter+0xce/0x9e0 [ext4] new_sync_write+0x29c/0x3b0 __vfs_write+0x92/0xa0 vfs_write+0x103/0x260 ksys_write+0x9d/0x130 __x64_sys_write+0x4c/0x60 do_syscall_64+0x91/0xb05 entry_SYSCALL_64_after_hwframe+0x49/0xbe 5 locks held by fsync04/25724: #0: ffff99f9911093f8 (sb_writers#13){.+.+}, at: vfs_write+0x21c/0x260 #1: ffff99f9db4c0348 (&sb->s_type->i_mutex_key#15){+.+.}, at: ext4_buffered_write_iter+0x65/0x210 [ext4] #2: ffff99f5e7dfcf58 (jbd2_handle){++++}, at: start_this_handle+0x1c1/0x9d0 [jbd2] #3: ffff99f9db4c0168 (&ei->i_data_sem){++++}, at: ext4_map_blocks+0x176/0x950 [ext4] #4: ffffffff99086b40 (rcu_read_lock){....}, at: jbd2_write_access_granted+0x4e/0x250 [jbd2] irq event stamp: 1407125 hardirqs last enabled at (1407125): [] __find_get_block+0x107/0x790 hardirqs last disabled at (1407124): [] __find_get_block+0x49/0x790 softirqs last enabled at (1405528): [] __do_softirq+0x34c/0x57c softirqs last disabled at (1405521): [] irq_exit+0xa2/0xc0 Reported by Kernel Concurrency Sanitizer on: CPU: 68 PID: 25724 Comm: fsync04 Tainted: G L 5.6.0-rc2-next-20200221+ #7 Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 07/10/2019 The plain reads are outside of jh->b_state_lock critical section which result in data races. Fix them by adding pairs of READ|WRITE_ONCE(). Reviewed-by: Jan Kara Signed-off-by: Qian Cai Link: https://lore.kernel.org/r/20200222043111.2227-1-cai@lca.pw Signed-off-by: Theodore Ts'o commit 5bea1336ed2c939328999c64de28792e8dc0699b Author: Guillaume La Roque Date: Fri Jan 17 14:34:23 2020 +0100 arm64: dts: meson-sm1-sei610: add missing interrupt-names add missing "host-wakeup interrupt names Fixes: 30388cc07572 ("arm64: dts: meson-sm1-sei610: add gpio bluetooth interrupt") Signed-off-by: Guillaume La Roque Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/20200117133423.22602-1-glaroque@baylibre.com Signed-off-by: Kevin Hilman commit a469226d97e3354df6d013283b30f6e9936dc03d Author: Geert Uytterhoeven Date: Tue Jan 21 11:37:14 2020 +0100 ARM: meson: Drop unneeded select of COMMON_CLK Support for Amlogic Meson SoCs depends on ARCH_MULTI_V7, and thus on ARCH_MULTIPLATFORM. As the latter selects COMMON_CLK, there is no need for ARCH_MESON to select COMMON_CLK. Signed-off-by: Geert Uytterhoeven Cc: Kevin Hilman Cc: linux-amlogic@lists.infradead.org Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20200121103722.1781-12-geert+renesas@glider.be Signed-off-by: Kevin Hilman commit 7557c1b3f715624f3bd4c809f03771ce9384eb7b Merge: 29795de0d242 03264ddde245 Author: Linus Torvalds Date: Sat Feb 29 09:58:47 2020 -0600 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Four small fixes. Three are in drivers for fairly obvious bugs. The fourth is a set of regressions introduced by the compat_ioctl changes because some of the compat updates wrongly replaced .ioctl instead of .compat_ioctl" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: compat_ioctl: cdrom: Replace .ioctl with .compat_ioctl in four appropriate places scsi: zfcp: fix wrong data and display format of SFP+ temperature scsi: sd_sbc: Fix sd_zbc_report_zones() scsi: libfc: free response frame from GPN_ID commit bba42affa732d6fd5bd5c9678e6deacde2de1547 Author: Juergen Gross Date: Fri Feb 21 11:38:51 2020 +0100 x86/mm: Fix dump_pagetables with Xen PV Commit 2ae27137b2db89 ("x86: mm: convert dump_pagetables to use walk_page_range") broke Xen PV guests as the hypervisor reserved hole in the memory map was not taken into account. Fix that by starting the kernel range only at GUARD_HOLE_END_ADDR. Fixes: 2ae27137b2db89 ("x86: mm: convert dump_pagetables to use walk_page_range") Reported-by: Julien Grall Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Tested-by: Julien Grall Link: https://lkml.kernel.org/r/20200221103851.7855-1-jgross@suse.com commit 99bcd4a6e5b8ba201fdd252f1054689884899fee Author: Juergen Gross Date: Tue Feb 18 16:47:12 2020 +0100 x86/ioperm: Add new paravirt function update_io_bitmap() Commit 111e7b15cf10f6 ("x86/ioperm: Extend IOPL config to control ioperm() as well") reworked the iopl syscall to use I/O bitmaps. Unfortunately this broke Xen PV domains using that syscall as there is currently no I/O bitmap support in PV domains. Add I/O bitmap support via a new paravirt function update_io_bitmap which Xen PV domains can use to update their I/O bitmaps via a hypercall. Fixes: 111e7b15cf10f6 ("x86/ioperm: Extend IOPL config to control ioperm() as well") Reported-by: Jan Beulich Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Tested-by: Jan Beulich Reviewed-by: Jan Beulich Cc: # 5.5 Link: https://lkml.kernel.org/r/20200218154712.25490-1-jgross@suse.com commit 7977fed974d60a72733243cf54d7955cd6dccd91 Merge: 4c45945aa418 e0560ba6d92f Author: Ingo Molnar Date: Sat Feb 29 10:10:03 2020 +0100 Merge tag 'perf-urgent-for-mingo-5.6-20200228' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: perf annotate: Ravi Bangoria: - Fix segfault with source toggle. - Fix --show-total-period and --show-nr-samples for tui/stdio2. - Fix handling of settings in ~/.perfconfig versus the ones passed in the command line - Re-render title bar after switching back from script browser. - Fix options man page, document some missing ones. perf probe: He Zhe: - Check return value of strlist__add() for -ENOMEM. tools UAPI: Arnaldo Carvalho de Melo: - Sync x86's msr-index.h copy with the kernel sources. - Update tools's copy of x86's kvm.h headers. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 3567ee83c413a939d45fea2e2f2c4968a9f81460 Author: Charles Keepax Date: Fri Feb 28 15:42:14 2020 +0000 pinctrl: madera: Add missing call to pinctrl_unregister_mappings pinctrl_register_mappings is called in the pdata case, however a call to pinctrl_unregister_mappings is missing causing the mappings to be leaked on driver unbind. Add the missing call to correct this issue. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200228154214.13916-1-ckeepax@opensource.cirrus.com Signed-off-by: Linus Walleij commit aafd56fc79041bf36f97712d4b35208cbe07db90 Author: Charles Keepax Date: Fri Feb 28 15:41:42 2020 +0000 pinctrl: core: Remove extra kref_get which blocks hogs being freed kref_init starts with the reference count at 1, which will be balanced by the pinctrl_put in pinctrl_unregister. The additional kref_get in pinctrl_claim_hogs will increase this count to 2 and cause the hogs to not get freed when pinctrl_unregister is called. Fixes: 6118714275f0 ("pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable()") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200228154142.13860-1-ckeepax@opensource.cirrus.com Signed-off-by: Linus Walleij commit 51a21e0e7baf279fbd0b57f3e376f8762df8bb7d Author: Rob Herring Date: Fri Feb 21 16:27:10 2020 -0600 dt-bindings: Fix dtc warnings in examples Fix all the warnings in the DT binding schema examples when built with 'W=1'. This is in preparation to make that the default for examples. Reviewed-by: Linus Walleij Acked-by: Stephen Boyd Acked-by: Sam Ravnborg Acked-by: Vinod Koul Acked-by: Lee Jones Acked-by: Srinivas Kandagatla Acked-by: Mark Brown Acked-by: Bartosz Golaszewski Cc: Daniel Lezcano Cc: Kishon Vijay Abraham I Cc: Ulf Hansson Cc: Dmitry Torokhov Cc: Krzysztof Kozlowski Cc: Kukjin Kim Cc: Jonathan Cameron Cc: Thierry Reding Cc: Chen-Yu Tsai Cc: Maxime Ripard Cc: Alexandre Torgue Cc: Maxime Coquelin Signed-off-by: Rob Herring commit 29795de0d242a5ba45904b36a5fb67e38a304cb7 Merge: 2edc78b9a4b8 5901b51f3e5d Author: Linus Torvalds Date: Fri Feb 28 11:51:53 2020 -0800 Merge tag 'pci-v5.6-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - Fix build issue on 32-bit ARM with old compilers (Marek Szyprowski) - Update MAINTAINERS for recent Cadence driver file move (Lukas Bulwahn) * tag 'pci-v5.6-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: MAINTAINERS: Correct Cadence PCI driver path PCI: brcmstb: Fix build on 32bit ARM platforms with older compilers commit 2edc78b9a4b868d7bfee4f87ea29f2df19b6e955 Merge: 74dea5d99d19 5b8ea58b6a33 Author: Linus Torvalds Date: Fri Feb 28 11:43:30 2020 -0800 Merge tag 'block-5.6-2020-02-28' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - Passthrough insertion fix (Ming) - Kill off some unused arguments (John) - blktrace RCU fix (Jan) - Dead fields removal for null_blk (Dongli) - NVMe polled IO fix (Bijan) * tag 'block-5.6-2020-02-28' of git://git.kernel.dk/linux-block: nvme-pci: Hold cq_poll_lock while completing CQEs blk-mq: Remove some unused function arguments null_blk: remove unused fields in 'nullb_cmd' blktrace: Protect q->blk_trace with RCU blk-mq: insert passthrough request into hctx->dispatch directly commit 74dea5d99d19236608914d2c556134e4cdc21c60 Merge: c60c04021353 d87683620489 Author: Linus Torvalds Date: Fri Feb 28 11:39:14 2020 -0800 Merge tag 'io_uring-5.6-2020-02-28' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: - Fix for a race with IOPOLL used with SQPOLL (Xiaoguang) - Only show ->fdinfo if procfs is enabled (Tobias) - Fix for a chain with multiple personalities in the SQEs - Fix for a missing free of personality idr on exit - Removal of the spin-for-work optimization - Fix for next work lookup on request completion - Fix for non-vec read/write result progation in case of links - Fix for a fileset references on switch - Fix for a recvmsg/sendmsg 32-bit compatability mode * tag 'io_uring-5.6-2020-02-28' of git://git.kernel.dk/linux-block: io_uring: fix 32-bit compatability with sendmsg/recvmsg io_uring: define and set show_fdinfo only if procfs is enabled io_uring: drop file set ref put/get on switch io_uring: import_single_range() returns 0/-ERROR io_uring: pick up link work on submit reference drop io-wq: ensure work->task_pid is cleared on init io-wq: remove spin-for-work optimization io_uring: fix poll_list race for SETUP_IOPOLL|SETUP_SQPOLL io_uring: fix personality idr leak io_uring: handle multiple personalities in link chains commit 8e093ea4d3593379be46b845b9e823179558047e Author: Tudor Ambarus Date: Fri Feb 28 15:55:32 2020 +0000 spi: atmel-quadspi: fix possible MMIO window size overrun The QSPI controller memory space is limited to 128MB: 0x9000_00000-0x9800_00000/0XD000_0000--0XD800_0000. There are nor flashes that are bigger in size than the memory size supported by the controller: Micron MT25QL02G (256 MB). Check if the address exceeds the MMIO window size. An improvement would be to add support for regular SPI mode and fall back to it when the flash memories overrun the controller's memory space. Fixes: 0e6aae08e9ae ("spi: Add QuadSPI driver for Atmel SAMA5D2") Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200228155437.1558219-1-tudor.ambarus@microchip.com Signed-off-by: Mark Brown commit f1861a7c58ba1ba43c7adff6909d9a920338e4a8 Author: Kuninori Morimoto Date: Fri Feb 28 10:48:35 2020 +0900 ASoC: soc-component: tidyup snd_soc_pcm_component_sync_stop() commit 1e5ddb6ba73894 ("ASoC: component: Add sync_stop PCM ops") added snd_soc_pcm_component_sync_stop(), but it is checking ioctrl instead of sync_stop. This is bug. This patch fixup it. Fixes: commit 1e5ddb6ba73894 ("ASoC: component: Add sync_stop PCM ops") Signed-off-by: Kuninori Morimoto Cc: Takashi Iwai Link: https://lore.kernel.org/r/8736av7a8c.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 9b3193089e77d3b59b045146ff1c770dd899acb1 Author: Charles Keepax Date: Fri Feb 28 15:31:45 2020 +0000 ASoC: dapm: Correct DAPM handling of active widgets during shutdown commit c2caa4da46a4 ("ASoC: Fix widget powerdown on shutdown") added a set of the power state during snd_soc_dapm_shutdown to ensure the widgets powered off. However, when commit 39eb5fd13dff ("ASoC: dapm: Delay w->power update until the changes are written") added the new_power member of the widget structure, to differentiate between the current power state and the target power state, it did not update the shutdown to use the new_power member. As new_power has not updated it will be left in the state set by the last DAPM sequence, ie. 1 for active widgets. So as the DAPM sequence for the shutdown proceeds it will turn the widgets on (despite them already being on) rather than turning them off. Fixes: 39eb5fd13dff ("ASoC: dapm: Delay w->power update until the changes are written") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200228153145.21013-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 5b8ea58b6a338cb981670c4408225331aedb4b89 Merge: cae740a04b4d 9515743bfb39 Author: Jens Axboe Date: Fri Feb 28 10:02:36 2020 -0700 Merge branch 'nvme-5.6-rc4' of git://git.infradead.org/nvme into block-5.6 Pull NVMe fix from Keith. * 'nvme-5.6-rc4' of git://git.infradead.org/nvme: nvme-pci: Hold cq_poll_lock while completing CQEs commit c60c04021353c55b133519804734415f647f08bd Merge: 36428598126e cabe17d0173a Author: Linus Torvalds Date: Fri Feb 28 09:02:18 2020 -0800 Merge tag 'acpi-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "Fix a couple of configuration issues in the ACPI watchdog (WDAT) driver (Mika Westerberg) and make it possible to disable that driver at boot time in case it still does not work as expected (Jean Delvare)" * tag 'acpi-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: watchdog: Set default timeout in probe ACPI: watchdog: Fix gas->access_width usage ACPICA: Introduce ACPI_ACCESS_BYTE_WIDTH() macro ACPI: watchdog: Allow disabling WDAT at boot commit 36428598126ec20329537825ecd855ac77334301 Merge: bfeb4f997734 189c6967fe61 Author: Linus Torvalds Date: Fri Feb 28 08:49:52 2020 -0800 Merge tag 'pm-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Fix a recent cpufreq initialization regression (Rafael Wysocki), revert a devfreq commit that made incompatible changes and broke user land on some systems (Orson Zhai), drop a stale reference to a document that has gone away recently (Jonathan Neuschäfer), and fix a typo in a hibernation code comment (Alexandre Belloni)" * tag 'pm-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: Fix policy initialization for internal governor drivers Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs" PM / hibernate: fix typo "reserverd_size" -> "reserved_size" Documentation: power: Drop reference to interface.rst commit bfeb4f9977348daaaf7283ff365d81f7ee95940a Merge: 45d0b75b98bf 0dda2ddb7ded Author: Linus Torvalds Date: Fri Feb 28 08:34:47 2020 -0800 Merge tag 'zonefs-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs Pull zonefs fixes from Damien Le Moal: "Two fixes in here: - Revert the initial decision to silently ignore IOCB_NOWAIT for asynchronous direct IOs to sequential zone files. Instead, return an error to the user to signal that the feature is not supported (from Christoph) - A fix to zonefs Kconfig to select FS_IOMAP to avoid build failures if no other file system already selected this option (from Johannes)" * tag 'zonefs-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs: zonefs: select FS_IOMAP zonefs: fix IOCB_NOWAIT handling commit 801b67f3eaafd3f2ec8b65d93142d4ffedba85df Author: Maor Gottlieb Date: Thu Feb 27 14:57:28 2020 +0200 RDMA/core: Fix pkey and port assignment in get_new_pps When port is part of the modify mask, then we should take it from the qp_attr and not from the old pps. Same for PKEY. Otherwise there are panics in some configurations: RIP: 0010:get_pkey_idx_qp_list+0x50/0x80 [ib_core] Code: c7 18 e8 13 04 30 ef 0f b6 43 06 48 69 c0 b8 00 00 00 48 03 85 a0 04 00 00 48 8b 50 20 48 8d 48 20 48 39 ca 74 1a 0f b7 73 04 <66> 39 72 10 75 08 eb 10 66 39 72 10 74 0a 48 8b 12 48 39 ca 75 f2 RSP: 0018:ffffafb3480932f0 EFLAGS: 00010203 RAX: ffff98059ababa10 RBX: ffff980d926e8cc0 RCX: ffff98059ababa30 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff98059ababa28 RBP: ffff98059b940000 R08: 00000000000310c0 R09: ffff97fe47c07480 R10: 0000000000000036 R11: 0000000000000200 R12: 0000000000000071 R13: ffff98059b940000 R14: ffff980d87f948a0 R15: 0000000000000000 FS: 00007f88deb31740(0000) GS:ffff98059f600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000010 CR3: 0000000853e26001 CR4: 00000000001606e0 Call Trace: port_pkey_list_insert+0x3d/0x1b0 [ib_core] ? kmem_cache_alloc_trace+0x215/0x220 ib_security_modify_qp+0x226/0x3a0 [ib_core] _ib_modify_qp+0xcf/0x390 [ib_core] ipoib_init_qp+0x7f/0x200 [ib_ipoib] ? rvt_modify_port+0xd0/0xd0 [rdmavt] ? ib_find_pkey+0x99/0xf0 [ib_core] ipoib_ib_dev_open_default+0x1a/0x200 [ib_ipoib] ipoib_ib_dev_open+0x96/0x130 [ib_ipoib] ipoib_open+0x44/0x130 [ib_ipoib] __dev_open+0xd1/0x160 __dev_change_flags+0x1ab/0x1f0 dev_change_flags+0x23/0x60 do_setlink+0x328/0xe30 ? __nla_validate_parse+0x54/0x900 __rtnl_newlink+0x54e/0x810 ? __alloc_pages_nodemask+0x17d/0x320 ? page_fault+0x30/0x50 ? _cond_resched+0x15/0x30 ? kmem_cache_alloc_trace+0x1c8/0x220 rtnl_newlink+0x43/0x60 rtnetlink_rcv_msg+0x28f/0x350 ? kmem_cache_alloc+0x1fb/0x200 ? _cond_resched+0x15/0x30 ? __kmalloc_node_track_caller+0x24d/0x2d0 ? rtnl_calcit.isra.31+0x120/0x120 netlink_rcv_skb+0xcb/0x100 netlink_unicast+0x1e0/0x340 netlink_sendmsg+0x317/0x480 ? __check_object_size+0x48/0x1d0 sock_sendmsg+0x65/0x80 ____sys_sendmsg+0x223/0x260 ? copy_msghdr_from_user+0xdc/0x140 ___sys_sendmsg+0x7c/0xc0 ? skb_dequeue+0x57/0x70 ? __inode_wait_for_writeback+0x75/0xe0 ? fsnotify_grab_connector+0x45/0x80 ? __dentry_kill+0x12c/0x180 __sys_sendmsg+0x58/0xa0 do_syscall_64+0x5b/0x200 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f88de467f10 Link: https://lore.kernel.org/r/20200227125728.100551-1-leon@kernel.org Cc: Fixes: 1dd017882e01 ("RDMA/core: Fix protection fault in get_pkey_idx_qp_list") Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Tested-by: Mike Marciniszyn Signed-off-by: Jason Gunthorpe commit e8c75a30a23c6ba63f4ef6895cbf41fd42f21aa2 Author: Jiri Slaby Date: Fri Feb 28 12:54:06 2020 +0100 vt: selection, push sel_lock up sel_lock cannot nest in the console lock. Thanks to syzkaller, the kernel states firmly: > WARNING: possible circular locking dependency detected > 5.6.0-rc3-syzkaller #0 Not tainted > ------------------------------------------------------ > syz-executor.4/20336 is trying to acquire lock: > ffff8880a2e952a0 (&tty->termios_rwsem){++++}, at: tty_unthrottle+0x22/0x100 drivers/tty/tty_ioctl.c:136 > > but task is already holding lock: > ffffffff89462e70 (sel_lock){+.+.}, at: paste_selection+0x118/0x470 drivers/tty/vt/selection.c:374 > > which lock already depends on the new lock. > > the existing dependency chain (in reverse order) is: > > -> #2 (sel_lock){+.+.}: > mutex_lock_nested+0x1b/0x30 kernel/locking/mutex.c:1118 > set_selection_kernel+0x3b8/0x18a0 drivers/tty/vt/selection.c:217 > set_selection_user+0x63/0x80 drivers/tty/vt/selection.c:181 > tioclinux+0x103/0x530 drivers/tty/vt/vt.c:3050 > vt_ioctl+0x3f1/0x3a30 drivers/tty/vt/vt_ioctl.c:364 This is ioctl(TIOCL_SETSEL). Locks held on the path: console_lock -> sel_lock > -> #1 (console_lock){+.+.}: > console_lock+0x46/0x70 kernel/printk/printk.c:2289 > con_flush_chars+0x50/0x650 drivers/tty/vt/vt.c:3223 > n_tty_write+0xeae/0x1200 drivers/tty/n_tty.c:2350 > do_tty_write drivers/tty/tty_io.c:962 [inline] > tty_write+0x5a1/0x950 drivers/tty/tty_io.c:1046 This is write(). Locks held on the path: termios_rwsem -> console_lock > -> #0 (&tty->termios_rwsem){++++}: > down_write+0x57/0x140 kernel/locking/rwsem.c:1534 > tty_unthrottle+0x22/0x100 drivers/tty/tty_ioctl.c:136 > mkiss_receive_buf+0x12aa/0x1340 drivers/net/hamradio/mkiss.c:902 > tty_ldisc_receive_buf+0x12f/0x170 drivers/tty/tty_buffer.c:465 > paste_selection+0x346/0x470 drivers/tty/vt/selection.c:389 > tioclinux+0x121/0x530 drivers/tty/vt/vt.c:3055 > vt_ioctl+0x3f1/0x3a30 drivers/tty/vt/vt_ioctl.c:364 This is ioctl(TIOCL_PASTESEL). Locks held on the path: sel_lock -> termios_rwsem > other info that might help us debug this: > > Chain exists of: > &tty->termios_rwsem --> console_lock --> sel_lock Clearly. From the above, we have: console_lock -> sel_lock sel_lock -> termios_rwsem termios_rwsem -> console_lock Fix this by reversing the console_lock -> sel_lock dependency in ioctl(TIOCL_SETSEL). First, lock sel_lock, then console_lock. Signed-off-by: Jiri Slaby Reported-by: syzbot+26183d9746e62da329b8@syzkaller.appspotmail.com Fixes: 07e6124a1a46 ("vt: selection, close sel_buffer race") Cc: stable Link: https://lore.kernel.org/r/20200228115406.5735-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 4b70dd57a15d2f4685ac6e38056bad93e81e982f Author: Jiri Slaby Date: Fri Feb 28 12:54:05 2020 +0100 vt: selection, push console lock down We need to nest the console lock in sel_lock, so we have to push it down a bit. Fortunately, the callers of set_selection_* just lock the console lock around the function call. So moving it down is easy. In the next patch, we switch the order. Signed-off-by: Jiri Slaby Fixes: 07e6124a1a46 ("vt: selection, close sel_buffer race") Cc: stable Link: https://lore.kernel.org/r/20200228115406.5735-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 186e28a18aeb0fec99cc586fda337e6b23190791 Author: Christophe Leroy Date: Fri Feb 28 00:00:08 2020 +0000 selftests: pidfd: Add pidfd_fdinfo_test in .gitignore The commit identified below added pidfd_fdinfo_test but failed to add it to .gitignore Fixes: 2def297ec7fb ("pidfd: add tests for NSpid info in fdinfo") Signed-off-by: Christophe Leroy Acked-by: Christian Brauner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/966567c7dbaa26a06730d796354f8a086c0ee288.1582847778.git.christophe.leroy@c-s.fr Signed-off-by: Christian Brauner commit 22a34c6fe0ffc1d92ee26a25913fadf347258fd6 Author: Madhuparna Bhowmik Date: Thu Jan 30 11:50:28 2020 +0530 exit: Fix Sparse errors and warnings This patch fixes the following sparse error: kernel/exit.c:627:25: error: incompatible types in comparison expression And the following warning: kernel/exit.c:626:40: warning: incorrect type in assignment Signed-off-by: Madhuparna Bhowmik Acked-by: Oleg Nesterov Acked-by: Christian Brauner [christian.brauner@ubuntu.com: edit commit message] Link: https://lore.kernel.org/r/20200130062028.4870-1-madhuparnabhowmik10@gmail.com Signed-off-by: Christian Brauner commit 0c282b068eb26db0e85e2ab4ec6d1e932acda841 Author: Madhuparna Bhowmik Date: Mon Jan 27 23:28:21 2020 +0530 fork: Use RCU_INIT_POINTER() instead of rcu_access_pointer() Use RCU_INIT_POINTER() instead of rcu_access_pointer() in copy_sighand(). Suggested-by: Oleg Nesterov Signed-off-by: Madhuparna Bhowmik Acked-by: Oleg Nesterov Acked-by: Christian Brauner [christian.brauner@ubuntu.com: edit commit message] Link: https://lore.kernel.org/r/20200127175821.10833-1-madhuparnabhowmik10@gmail.com Signed-off-by: Christian Brauner commit e951445f4d3b5d0df69c0c5d18ab1e9058c20e52 Merge: ef935c25fd64 e43f1331e2ef Author: Paolo Bonzini Date: Fri Feb 28 11:46:59 2020 +0100 Merge tag 'kvmarm-fixes-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm fixes for 5.6, take #1 - Fix compilation on 32bit - Move VHE guest entry/exit into the VHE-specific entry code - Make sure all functions called by the non-VHE HYP code is tagged as __always_inline commit ef935c25fd648a17c27af5d1738b1884f78c5b75 Author: Erwan Velu Date: Thu Feb 27 19:00:46 2020 +0100 kvm: x86: Limit the number of "kvm: disabled by bios" messages In older version of systemd(219), at boot time, udevadm is called with : /usr/bin/udevadm trigger --type=devices --action=add" This program generates an echo "add" in /sys/devices/system/cpu/cpu/uevent, leading to the "kvm: disabled by bios" message in case of your Bios disabled the virtualization extensions. On a modern system running up to 256 CPU threads, this pollutes the Kernel logs. This patch offers to ratelimit this message to avoid any userspace program triggering this uevent printing this message too often. This patch is only a workaround but greatly reduce the pollution without breaking the current behavior of printing a message if some try to instantiate KVM on a system that doesn't support it. Note that recent versions of systemd (>239) do not have trigger this behavior. This patch will be useful at least for some using older systemd with recent Kernels. Signed-off-by: Erwan Velu Signed-off-by: Paolo Bonzini commit 189c6967fe61729fa7e9cdc32690b08fc7eebe41 Merge: f5739cb0b565 b0c609ab2057 1df97a02a937 Author: Rafael J. Wysocki Date: Fri Feb 28 11:00:50 2020 +0100 Merge branches 'pm-sleep' and 'pm-devfreq' * pm-sleep: PM / hibernate: fix typo "reserverd_size" -> "reserved_size" Documentation: power: Drop reference to interface.rst * pm-devfreq: Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs" commit aaec7c03de92c35a96966631989950e6e27662db Author: Paolo Bonzini Date: Fri Feb 28 10:49:10 2020 +0100 KVM: x86: avoid useless copy of cpufreq policy struct cpufreq_policy is quite big and it is not a good idea to allocate one on the stack. Just use cpufreq_cpu_get and cpufreq_cpu_put which is even simpler. Reported-by: Christoph Hellwig Signed-off-by: Paolo Bonzini commit 4f337faf1c55e55bdc49df13fcb3a3c45655899e Author: Paolo Bonzini Date: Fri Feb 28 10:42:31 2020 +0100 KVM: allow disabling -Werror Restrict -Werror to well-tested configurations and allow disabling it via Kconfig. Reported-by: Christoph Hellwig Signed-off-by: Paolo Bonzini commit 575b255c1663c8fccc41fe965dcac281e3113c65 Author: Valdis Kletnieks Date: Thu Feb 27 21:49:52 2020 -0500 KVM: x86: allow compiling as non-module with W=1 Compile error with CONFIG_KVM_INTEL=y and W=1: CC arch/x86/kvm/vmx/vmx.o arch/x86/kvm/vmx/vmx.c:68:32: error: 'vmx_cpu_id' defined but not used [-Werror=unused-const-variable=] 68 | static const struct x86_cpu_id vmx_cpu_id[] = { | ^~~~~~~~~~ cc1: all warnings being treated as errors When building with =y, the MODULE_DEVICE_TABLE macro doesn't generate a reference to the structure (or any code at all). This makes W=1 compiles unhappy. Wrap both in a #ifdef to avoid the issue. Signed-off-by: Valdis Kletnieks [Do the same for CONFIG_KVM_AMD. - Paolo] Signed-off-by: Paolo Bonzini commit 8a9442f49c72bde43f982e53b74526ac37d3565b Author: Wanpeng Li Date: Tue Feb 18 09:08:24 2020 +0800 KVM: Pre-allocate 1 cpumask variable per cpu for both pv tlb and pv ipis Nick Desaulniers Reported: When building with: $ make CC=clang arch/x86/ CFLAGS=-Wframe-larger-than=1000 The following warning is observed: arch/x86/kernel/kvm.c:494:13: warning: stack frame size of 1064 bytes in function 'kvm_send_ipi_mask_allbutself' [-Wframe-larger-than=] static void kvm_send_ipi_mask_allbutself(const struct cpumask *mask, int vector) ^ Debugging with: https://github.com/ClangBuiltLinux/frame-larger-than via: $ python3 frame_larger_than.py arch/x86/kernel/kvm.o \ kvm_send_ipi_mask_allbutself points to the stack allocated `struct cpumask newmask` in `kvm_send_ipi_mask_allbutself`. The size of a `struct cpumask` is potentially large, as it's CONFIG_NR_CPUS divided by BITS_PER_LONG for the target architecture. CONFIG_NR_CPUS for X86_64 can be as high as 8192, making a single instance of a `struct cpumask` 1024 B. This patch fixes it by pre-allocate 1 cpumask variable per cpu and use it for both pv tlb and pv ipis.. Reported-by: Nick Desaulniers Acked-by: Nick Desaulniers Reviewed-by: Vitaly Kuznetsov Cc: Peter Zijlstra Cc: Nick Desaulniers Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini commit a262bca3aba03f0696995beb223c610e47533db3 Author: Wanpeng Li Date: Tue Feb 18 09:08:23 2020 +0800 KVM: Introduce pv check helpers Introduce some pv check helpers for consistency. Suggested-by: Vitaly Kuznetsov Reviewed-by: Konrad Rzeszutek Wilk Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini commit fcd07f9adc7dacc2532695cf9dd2284d49e716ff Author: Christian Borntraeger Date: Fri Feb 28 09:49:41 2020 +0100 KVM: let declaration of kvm_get_running_vcpus match implementation Sparse notices that declaration and implementation do not match: arch/s390/kvm/../../../virt/kvm/kvm_main.c:4435:17: warning: incorrect type in return expression (different address spaces) arch/s390/kvm/../../../virt/kvm/kvm_main.c:4435:17: expected struct kvm_vcpu [noderef] ** arch/s390/kvm/../../../virt/kvm/kvm_main.c:4435:17: got struct kvm_vcpu *[noderef] * Signed-off-by: Christian Borntraeger Signed-off-by: Paolo Bonzini commit 7943f4acea3caf0b6d5b6cdfce7d5a2b4a9aa608 Author: Paolo Bonzini Date: Tue Feb 25 08:54:26 2020 +0100 KVM: SVM: allocate AVIC data structures based on kvm_amd module parameter Even if APICv is disabled at startup, the backing page and ir_list need to be initialized in case they are needed later. The only case in which this can be skipped is for userspace irqchip, and that must be done because avic_init_backing_page dereferences vcpu->arch.apic (which is NULL for userspace irqchip). Tested-by: rmuncrief@humanavance.com Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=206579 Reviewed-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 45d0b75b98bf1de4b3a5b09188c75f3bfa3152b0 Merge: 7058b837899f f091bf39700d Author: Linus Torvalds Date: Thu Feb 27 21:52:18 2020 -0800 Merge tag 'drm-fixes-2020-02-28' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Just some fixes for this week: amdgpu, radeon and i915. The main i915 one is a regression Gen7 (Ivybridge/Haswell), this moves them back from trying to use the full-ppgtt support to the aliasing version it used to use due to gpu hangs. Otherwise it's pretty quiet. amdgpu: - Drop DRIVER_USE_AGP - Fix memory leak in GPU reset - Resume fix for raven radeon: - Drop DRIVER_USE_AGP i915: - downgrade gen7 back to aliasing-ppgtt to avoid GPU hangs - shrinker fix - pmu leak and double free fixes - gvt user after free and virtual display reset fixes - randconfig build fix" * tag 'drm-fixes-2020-02-28' of git://anongit.freedesktop.org/drm/drm: drm/radeon: Inline drm_get_pci_dev drm/amdgpu: Drop DRIVER_USE_AGP drm/i915: Avoid recursing onto active vma from the shrinker drm/i915/pmu: Avoid using globals for PMU events drm/i915/pmu: Avoid using globals for CPU hotplug state drm/i915/gtt: Downgrade gen7 (ivb, byt, hsw) back to aliasing-ppgtt drm/i915: fix header test with GCOV amdgpu/gmc_v9: save/restore sdpif regs during S3 drm/amdgpu: fix memory leak during TDR test(v2) drm/i915/gvt: Fix orphan vgpu dmabuf_objs' lifetime drm/i915/gvt: Separate display reset from ALL_ENGINES reset commit f091bf39700dd086ab244c823f389556fed0c513 Merge: e180af1970d5 8e9a400c706e Author: Dave Airlie Date: Fri Feb 28 12:40:41 2020 +1000 Merge tag 'drm-intel-fixes-2020-02-27' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.6-rc4: - downgrade gen7 back to aliasing-ppgtt to avoid GPU hangs - shrinker fix - pmu leak and double free fixes - gvt user after free and virtual display reset fixes - randconfig build fix Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/874kvcsh00.fsf@intel.com commit e180af1970d535f9d19309e91b0cd4379248b19f Merge: f8788d86ab28 eb12c957735b Author: Dave Airlie Date: Fri Feb 28 12:30:18 2020 +1000 Merge tag 'amd-drm-fixes-5.6-2020-02-26' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.6-2020-02-26: amdgpu: - Drop DRIVER_USE_AGP - Fix memory leak in GPU reset - Resume fix for raven radeon: - Drop DRIVER_USE_AGP Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200227034106.3912-1-alexander.deucher@amd.com commit 7058b837899fc978c9f8a033fa29ab07360a85c8 Merge: a2f0b878c3ca 3ee339eb2895 Author: Linus Torvalds Date: Thu Feb 27 16:34:41 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Fix leak in nl80211 AP start where we leak the ACL memory, from Johannes Berg. 2) Fix double mutex unlock in mac80211, from Andrei Otcheretianski. 3) Fix RCU stall in ipset, from Jozsef Kadlecsik. 4) Fix devlink locking in devlink_dpipe_table_register, from Madhuparna Bhowmik. 5) Fix race causing TX hang in ll_temac, from Esben Haabendal. 6) Stale eth hdr pointer in br_dev_xmit(), from Nikolay Aleksandrov. 7) Fix TX hash calculation bounds checking wrt. tc rules, from Amritha Nambiar. 8) Size netlink responses properly in schedule action code to take into consideration TCA_ACT_FLAGS. From Jiri Pirko. 9) Fix firmware paths for mscc PHY driver, from Antoine Tenart. 10) Don't register stmmac notifier multiple times, from Aaro Koskinen. 11) Various rmnet bug fixes, from Taehee Yoo. 12) Fix vsock deadlock in vsock transport release, from Stefano Garzarella. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (61 commits) net: dsa: mv88e6xxx: Fix masking of egress port mlxsw: pci: Wait longer before accessing the device after reset sfc: fix timestamp reconstruction at 16-bit rollover points vsock: fix potential deadlock in transport->release() unix: It's CONFIG_PROC_FS not CONFIG_PROCFS net: rmnet: fix packet forwarding in rmnet bridge mode net: rmnet: fix bridge mode bugs net: rmnet: use upper/lower device infrastructure net: rmnet: do not allow to change mux id if mux id is duplicated net: rmnet: remove rcu_read_lock in rmnet_force_unassociate_device() net: rmnet: fix suspicious RCU usage net: rmnet: fix NULL pointer dereference in rmnet_changelink() net: rmnet: fix NULL pointer dereference in rmnet_newlink() net: phy: marvell: don't interpret PHY status unless resolved mlx5: register lag notifier for init network namespace only unix: define and set show_fdinfo only if procfs is enabled hinic: fix a bug of rss configuration hinic: fix a bug of setting hw_ioctxt hinic: fix a irq affinity bug net/smc: check for valid ib_client_data ... commit fc37a1632d40c80c067eb1bc235139f5867a2667 Author: Desnes A. Nunes do Rosario Date: Thu Feb 27 10:47:15 2020 -0300 powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems PowerVM systems running compatibility mode on a few Power8 revisions are still vulnerable to the hardware defect that loses PMU exceptions arriving prior to a context switch. The software fix for this issue is enabled through the CPU_FTR_PMAO_BUG cpu_feature bit, nevertheless this bit also needs to be set for PowerVM compatibility mode systems. Fixes: 68f2f0d431d9ea4 ("powerpc: Add a cpu feature CPU_FTR_PMAO_BUG") Signed-off-by: Desnes A. Nunes do Rosario Reviewed-by: Leonardo Bras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200227134715.9715-1-desnesn@linux.ibm.com commit 5901b51f3e5d9129da3e59b10cc76e4cc983e940 Author: Lukas Bulwahn Date: Fri Feb 21 19:54:02 2020 +0100 MAINTAINERS: Correct Cadence PCI driver path de80f95ccb9c ("PCI: cadence: Move all files to per-device cadence directory") moved files of the PCI cadence drivers, but did not update the MAINTAINERS entry. Since then, ./scripts/get_maintainer.pl --self-test complains: warning: no file matches F: drivers/pci/controller/pcie-cadence* Repair the MAINTAINERS entry. Link: https://lore.kernel.org/r/20200221185402.4703-1-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Signed-off-by: Bjorn Helgaas commit ee63634bae02e13c8c0df1209a6a0ca5326f3189 Author: Shin'ichiro Kawasaki Date: Thu Feb 27 09:18:52 2020 +0900 dm zoned: Fix reference counter initial value of chunk works Dm-zoned initializes reference counters of new chunk works with zero value and refcount_inc() is called to increment the counter. However, the refcount_inc() function handles the addition to zero value as an error and triggers the warning as follows: refcount_t: addition on 0; use-after-free. WARNING: CPU: 7 PID: 1506 at lib/refcount.c:25 refcount_warn_saturate+0x68/0xf0 ... CPU: 7 PID: 1506 Comm: systemd-udevd Not tainted 5.4.0+ #134 ... Call Trace: dmz_map+0x2d2/0x350 [dm_zoned] __map_bio+0x42/0x1a0 __split_and_process_non_flush+0x14a/0x1b0 __split_and_process_bio+0x83/0x240 ? kmem_cache_alloc+0x165/0x220 dm_process_bio+0x90/0x230 ? generic_make_request_checks+0x2e7/0x680 dm_make_request+0x3e/0xb0 generic_make_request+0xcf/0x320 ? memcg_drain_all_list_lrus+0x1c0/0x1c0 submit_bio+0x3c/0x160 ? guard_bio_eod+0x2c/0x130 mpage_readpages+0x182/0x1d0 ? bdev_evict_inode+0xf0/0xf0 read_pages+0x6b/0x1b0 __do_page_cache_readahead+0x1ba/0x1d0 force_page_cache_readahead+0x93/0x100 generic_file_read_iter+0x83a/0xe40 ? __seccomp_filter+0x7b/0x670 new_sync_read+0x12a/0x1c0 vfs_read+0x9d/0x150 ksys_read+0x5f/0xe0 do_syscall_64+0x5b/0x180 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ... After this warning, following refcount API calls for the counter all fail to change the counter value. Fix this by setting the initial reference counter value not zero but one for the new chunk works. Instead, do not call refcount_inc() via dmz_get_chunk_work() for the new chunks works. The failure was observed with linux version 5.4 with CONFIG_REFCOUNT_FULL enabled. Refcount rework was merged to linux version 5.5 by the commit 168829ad09ca ("Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip"). After this commit, CONFIG_REFCOUNT_FULL was removed and the failure was observed regardless of kernel configuration. Linux version 4.20 merged the commit 092b5648760a ("dm zoned: target: use refcount_t for dm zoned reference counters"). Before this commit, dm zoned used atomic_t APIs which does not check addition to zero, then this fix is not necessary. Fixes: 092b5648760a ("dm zoned: target: use refcount_t for dm zoned reference counters") Cc: stable@vger.kernel.org # 5.4+ Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Damien Le Moal Signed-off-by: Mike Snitzer commit 41c526c5af46d4c4dab7f72c99000b7fac0b9702 Author: Mikulas Patocka Date: Mon Feb 24 10:20:30 2020 +0100 dm writecache: verify watermark during resume Verify the watermark upon resume - so that if the target is reloaded with lower watermark, it will start the cleanup process immediately. Fixes: 48debafe4f2f ("dm: add writecache target") Cc: stable@vger.kernel.org # 4.18+ Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit adc0daad366b62ca1bce3e2958a40b0b71a8b8b3 Author: Mikulas Patocka Date: Mon Feb 24 10:20:28 2020 +0100 dm: report suspended device during destroy The function dm_suspended returns true if the target is suspended. However, when the target is being suspended during unload, it returns false. An example where this is a problem: the test "!dm_suspended(wc->ti)" in writecache_writeback is not sufficient, because dm_suspended returns zero while writecache_suspend is in progress. As is, without an enhanced dm_suspended, simply switching from flush_workqueue to drain_workqueue still emits warnings: workqueue writecache-writeback: drain_workqueue() isn't complete after 10 tries workqueue writecache-writeback: drain_workqueue() isn't complete after 100 tries workqueue writecache-writeback: drain_workqueue() isn't complete after 200 tries workqueue writecache-writeback: drain_workqueue() isn't complete after 300 tries workqueue writecache-writeback: drain_workqueue() isn't complete after 400 tries writecache_suspend calls flush_workqueue(wc->writeback_wq) - this function flushes the current work. However, the workqueue may re-queue itself and flush_workqueue doesn't wait for re-queued works to finish. Because of this - the function writecache_writeback continues execution after the device was suspended and then concurrently with writecache_dtr, causing a crash in writecache_writeback. We must use drain_workqueue - that waits until the work and all re-queued works finish. As a prereq for switching to drain_workqueue, this commit fixes dm_suspended to return true after the presuspend hook and before the postsuspend hook - just like during a normal suspend. It allows simplifying the dm-integrity and dm-writecache targets so that they don't have to maintain suspended flags on their own. With this change use of drain_workqueue() can be used effectively. This change was tested with the lvm2 testsuite and cryptsetup testsuite and the are no regressions. Fixes: 48debafe4f2f ("dm: add writecache target") Cc: stable@vger.kernel.org # 4.18+ Reported-by: Corey Marthaler Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit d876836204897b6d7d911f942084f69a1e9d5c4d Author: Jens Axboe Date: Thu Feb 27 14:17:49 2020 -0700 io_uring: fix 32-bit compatability with sendmsg/recvmsg We must set MSG_CMSG_COMPAT if we're in compatability mode, otherwise the iovec import for these commands will not do the right thing and fail the command with -EINVAL. Found by running the test suite compiled as 32-bit. Cc: stable@vger.kernel.org Fixes: aa1fa28fc73e ("io_uring: add support for recvmsg()") Fixes: 0fa03c624d8f ("io_uring: add support for sendmsg()") Signed-off-by: Jens Axboe commit c14dfddbd869bf0c2bafb7ef260c41d9cebbcfec Author: Jason Gunthorpe Date: Fri Feb 21 15:20:26 2020 +0000 RMDA/cm: Fix missing ib_cm_destroy_id() in ib_cm_insert_listen() The algorithm pre-allocates a cm_id since allocation cannot be done while holding the cm.lock spinlock, however it doesn't free it on one error path, leading to a memory leak. Fixes: 067b171b8679 ("IB/cm: Share listening CM IDs") Link: https://lore.kernel.org/r/20200221152023.GA8680@ziepe.ca Signed-off-by: Jason Gunthorpe commit 59b5809655bdafb0767d3fd00a3e41711aab07e6 Author: Tony Luck Date: Tue Feb 25 17:17:37 2020 -0800 x86/mce: Fix logic and comments around MSR_PPIN_CTL There are two implemented bits in the PPIN_CTL MSR: Bit 0: LockOut (R/WO) Set 1 to prevent further writes to MSR_PPIN_CTL. Bit 1: Enable_PPIN (R/W) If 1, enables MSR_PPIN to be accessible using RDMSR. If 0, an attempt to read MSR_PPIN will cause #GP. So there are four defined values: 0: PPIN is disabled, PPIN_CTL may be updated 1: PPIN is disabled. PPIN_CTL is locked against updates 2: PPIN is enabled. PPIN_CTL may be updated 3: PPIN is enabled. PPIN_CTL is locked against updates Code would only enable the X86_FEATURE_INTEL_PPIN feature for case "2". When it should have done so for both case "2" and case "3". Fix the final test to just check for the enable bit. Also fix some of the other comments in this function. Fixes: 3f5a7896a509 ("x86/mce: Include the PPIN in MCE records when available") Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Cc: Link: https://lkml.kernel.org/r/20200226011737.9958-1-tony.luck@intel.com commit 3ee339eb28959629db33aaa2b8cde4c63c6289eb Author: Andrew Lunn Date: Thu Feb 27 21:20:49 2020 +0100 net: dsa: mv88e6xxx: Fix masking of egress port Add missing ~ to the usage of the mask. Reported-by: Kevin Benson Reported-by: Chris Healy Fixes: 5c74c54ce6ff ("net: dsa: mv88e6xxx: Split monitor port configuration") Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit ac004e84164e27d69017731a97b11402a69d854b Author: Amit Cohen Date: Thu Feb 27 21:07:53 2020 +0100 mlxsw: pci: Wait longer before accessing the device after reset During initialization the driver issues a reset to the device and waits for 100ms before checking if the firmware is ready. The waiting is necessary because before that the device is irresponsive and the first read can result in a completion timeout. While 100ms is sufficient for Spectrum-1 and Spectrum-2, it is insufficient for Spectrum-3. Fix this by increasing the timeout to 200ms. Fixes: da382875c616 ("mlxsw: spectrum: Extend to support Spectrum-3 ASIC") Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 23797b98909f34b75fd130369bde86f760db69d0 Author: Alex Maftei (amaftei) Date: Wed Feb 26 17:33:19 2020 +0000 sfc: fix timestamp reconstruction at 16-bit rollover points We can't just use the top bits of the last sync event as they could be off-by-one every 65,536 seconds, giving an error in reconstruction of 65,536 seconds. This patch uses the difference in the bottom 16 bits (mod 2^16) to calculate an offset that needs to be applied to the last sync event to get to the current time. Signed-off-by: Alexandru-Mihai Maftei Acked-by: Martin Habets Signed-off-by: David S. Miller commit 3f74957fcbeab703297ed0f135430414ed7e0dd0 Author: Stefano Garzarella Date: Wed Feb 26 11:58:18 2020 +0100 vsock: fix potential deadlock in transport->release() Some transports (hyperv, virtio) acquire the sock lock during the .release() callback. In the vsock_stream_connect() we call vsock_assign_transport(); if the socket was previously assigned to another transport, the vsk->transport->release() is called, but the sock lock is already held in the vsock_stream_connect(), causing a deadlock reported by syzbot: INFO: task syz-executor280:9768 blocked for more than 143 seconds. Not tainted 5.6.0-rc1-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor280 D27912 9768 9766 0x00000000 Call Trace: context_switch kernel/sched/core.c:3386 [inline] __schedule+0x934/0x1f90 kernel/sched/core.c:4082 schedule+0xdc/0x2b0 kernel/sched/core.c:4156 __lock_sock+0x165/0x290 net/core/sock.c:2413 lock_sock_nested+0xfe/0x120 net/core/sock.c:2938 virtio_transport_release+0xc4/0xd60 net/vmw_vsock/virtio_transport_common.c:832 vsock_assign_transport+0xf3/0x3b0 net/vmw_vsock/af_vsock.c:454 vsock_stream_connect+0x2b3/0xc70 net/vmw_vsock/af_vsock.c:1288 __sys_connect_file+0x161/0x1c0 net/socket.c:1857 __sys_connect+0x174/0x1b0 net/socket.c:1874 __do_sys_connect net/socket.c:1885 [inline] __se_sys_connect net/socket.c:1882 [inline] __x64_sys_connect+0x73/0xb0 net/socket.c:1882 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe To avoid this issue, this patch remove the lock acquiring in the .release() callback of hyperv and virtio transports, and it holds the lock when we call vsk->transport->release() in the vsock core. Reported-by: syzbot+731710996d79d0d58fbc@syzkaller.appspotmail.com Fixes: 408624af4c89 ("vsock: use local transport when it is loaded") Signed-off-by: Stefano Garzarella Reviewed-by: Stefan Hajnoczi Signed-off-by: David S. Miller commit 5c05a164d441a1792791175e4959ea9df12f7e2b Author: David S. Miller Date: Thu Feb 27 11:52:35 2020 -0800 unix: It's CONFIG_PROC_FS not CONFIG_PROCFS Fixes: 3a12500ed5dd ("unix: define and set show_fdinfo only if procfs is enabled") Signed-off-by: David S. Miller commit 795c03a5d09c37f153affa0bdb416c16f678bd7e Merge: b82cf17ff195 ad3cc31b599e Author: David S. Miller Date: Thu Feb 27 11:45:07 2020 -0800 Merge branch 'net-rmnet-fix-several-bugs' Taehee Yoo says: ==================== net: rmnet: fix several bugs This patchset is to fix several bugs in RMNET module. 1. The first patch fixes NULL-ptr-deref in rmnet_newlink(). When rmnet interface is being created, it uses IFLA_LINK without checking NULL. So, if userspace doesn't set IFLA_LINK, panic will occur. In this patch, checking NULL pointer code is added. 2. The second patch fixes NULL-ptr-deref in rmnet_changelink(). To get real device in rmnet_changelink(), it uses IFLA_LINK. But, IFLA_LINK should not be used in rmnet_changelink(). 3. The third patch fixes suspicious RCU usage in rmnet_get_port(). rmnet_get_port() uses rcu_dereference_rtnl(). But, rmnet_get_port() is used by datapath. So, rcu_dereference_bh() should be used instead of rcu_dereference_rtnl(). 4. The fourth patch fixes suspicious RCU usage in rmnet_force_unassociate_device(). RCU critical section should not be scheduled. But, unregister_netdevice_queue() in the rmnet_force_unassociate_device() would be scheduled. So, the RCU warning occurs. In this patch, the rcu_read_lock() in the rmnet_force_unassociate_device() is removed because it's unnecessary. 5. The fifth patch fixes duplicate MUX ID case. RMNET MUX ID is unique. So, rmnet interface isn't allowed to be created, which have a duplicate MUX ID. But, only rmnet_newlink() checks this condition, rmnet_changelink() doesn't check this. So, duplicate MUX ID case would happen. 6. The sixth patch fixes upper/lower interface relationship problems. When IFLA_LINK is used, the upper/lower infrastructure should be used. Because it checks the maximum depth of upper/lower interfaces and it also checks circular interface relationship, etc. In this patch, netdev_upper_dev_link() is used. 7. The seventh patch fixes bridge related problems. a) ->ndo_del_slave() doesn't work. b) It couldn't detect circular upper/lower interface relationship. c) It couldn't prevent stack overflow because of too deep depth of upper/lower interface d) It doesn't check the number of lower interfaces. e) Panics because of several reasons. These problems are actually the same problem. So, this patch fixes these problems. 8. The eighth patch fixes packet forwarding issue in bridge mode Packet forwarding is not working in rmnet bridge mode. Because when a packet is forwarded, skb_push() for an ethernet header is needed. But it doesn't call skb_push(). So, the ethernet header will be lost. Change log: - update commit logs. - drop two patches in this patchset because of wrong target branch. - ("net: rmnet: add missing module alias") - ("net: rmnet: print error message when command fails") - remove unneessary rcu_read_lock() in the third patch. - use rcu_dereference_bh() instead of rcu_dereference in third patch. - do not allow to add a bridge device if rmnet interface is already bridge mode in the seventh patch. ==================== Signed-off-by: David S. Miller commit ad3cc31b599ea80f06b29ebdc18b3a39878a48d6 Author: Taehee Yoo Date: Thu Feb 27 12:26:15 2020 +0000 net: rmnet: fix packet forwarding in rmnet bridge mode Packet forwarding is not working in rmnet bridge mode. Because when a packet is forwarded, skb_push() for an ethernet header is needed. But it doesn't call skb_push(). So, the ethernet header will be lost. Test commands: modprobe rmnet ip netns add nst ip netns add nst2 ip link add veth0 type veth peer name veth1 ip link add veth2 type veth peer name veth3 ip link set veth1 netns nst ip link set veth3 netns nst2 ip link add rmnet0 link veth0 type rmnet mux_id 1 ip link set veth2 master rmnet0 ip link set veth0 up ip link set veth2 up ip link set rmnet0 up ip a a 192.168.100.1/24 dev rmnet0 ip netns exec nst ip link set veth1 up ip netns exec nst ip a a 192.168.100.2/24 dev veth1 ip netns exec nst2 ip link set veth3 up ip netns exec nst2 ip a a 192.168.100.3/24 dev veth3 ip netns exec nst2 ping 192.168.100.2 Fixes: 60d58f971c10 ("net: qualcomm: rmnet: Implement bridge mode") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit d939b6d30bea1a2322bc536b12be0a7c4c2bccd7 Author: Taehee Yoo Date: Thu Feb 27 12:26:02 2020 +0000 net: rmnet: fix bridge mode bugs In order to attach a bridge interface to the rmnet interface, "master" operation is used. (e.g. ip link set dummy1 master rmnet0) But, in the rmnet_add_bridge(), which is a callback of ->ndo_add_slave() doesn't register lower interface. So, ->ndo_del_slave() doesn't work. There are other problems too. 1. It couldn't detect circular upper/lower interface relationship. 2. It couldn't prevent stack overflow because of too deep depth of upper/lower interface 3. It doesn't check the number of lower interfaces. 4. Panics because of several reasons. The root problem of these issues is actually the same. So, in this patch, these all problems will be fixed. Test commands: modprobe rmnet ip link add dummy0 type dummy ip link add rmnet0 link dummy0 type rmnet mux_id 1 ip link add dummy1 master rmnet0 type dummy ip link add dummy2 master rmnet0 type dummy ip link del rmnet0 ip link del dummy2 ip link del dummy1 Splat looks like: [ 41.867595][ T1164] general protection fault, probably for non-canonical address 0xdffffc0000000101I [ 41.869993][ T1164] KASAN: null-ptr-deref in range [0x0000000000000808-0x000000000000080f] [ 41.872950][ T1164] CPU: 0 PID: 1164 Comm: ip Not tainted 5.6.0-rc1+ #447 [ 41.873915][ T1164] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 41.875161][ T1164] RIP: 0010:rmnet_unregister_bridge.isra.6+0x71/0xf0 [rmnet] [ 41.876178][ T1164] Code: 48 89 ef 48 89 c6 5b 5d e9 fc fe ff ff e8 f7 f3 ff ff 48 8d b8 08 08 00 00 48 ba 00 7 [ 41.878925][ T1164] RSP: 0018:ffff8880c4d0f188 EFLAGS: 00010202 [ 41.879774][ T1164] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000101 [ 41.887689][ T1164] RDX: dffffc0000000000 RSI: ffffffffb8cf64f0 RDI: 0000000000000808 [ 41.888727][ T1164] RBP: ffff8880c40e4000 R08: ffffed101b3c0e3c R09: 0000000000000001 [ 41.889749][ T1164] R10: 0000000000000001 R11: ffffed101b3c0e3b R12: 1ffff110189a1e3c [ 41.890783][ T1164] R13: ffff8880c4d0f200 R14: ffffffffb8d56160 R15: ffff8880ccc2c000 [ 41.891794][ T1164] FS: 00007f4300edc0c0(0000) GS:ffff8880d9c00000(0000) knlGS:0000000000000000 [ 41.892953][ T1164] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 41.893800][ T1164] CR2: 00007f43003bc8c0 CR3: 00000000ca53e001 CR4: 00000000000606f0 [ 41.894824][ T1164] Call Trace: [ 41.895274][ T1164] ? rcu_is_watching+0x2c/0x80 [ 41.895895][ T1164] rmnet_config_notify_cb+0x1f7/0x590 [rmnet] [ 41.896687][ T1164] ? rmnet_unregister_bridge.isra.6+0xf0/0xf0 [rmnet] [ 41.897611][ T1164] ? rmnet_unregister_bridge.isra.6+0xf0/0xf0 [rmnet] [ 41.898508][ T1164] ? __module_text_address+0x13/0x140 [ 41.899162][ T1164] notifier_call_chain+0x90/0x160 [ 41.899814][ T1164] rollback_registered_many+0x660/0xcf0 [ 41.900544][ T1164] ? netif_set_real_num_tx_queues+0x780/0x780 [ 41.901316][ T1164] ? __lock_acquire+0xdfe/0x3de0 [ 41.901958][ T1164] ? memset+0x1f/0x40 [ 41.902468][ T1164] ? __nla_validate_parse+0x98/0x1ab0 [ 41.903166][ T1164] unregister_netdevice_many.part.133+0x13/0x1b0 [ 41.903988][ T1164] rtnl_delete_link+0xbc/0x100 [ ... ] Fixes: 60d58f971c10 ("net: qualcomm: rmnet: Implement bridge mode") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 037f9cdf72fb8a7ff9ec2b5dd05336ec1492bdf1 Author: Taehee Yoo Date: Thu Feb 27 12:25:43 2020 +0000 net: rmnet: use upper/lower device infrastructure netdev_upper_dev_link() is useful to manage lower/upper interfaces. And this function internally validates looping, maximum depth. All or most virtual interfaces that could have a real interface (e.g. macsec, macvlan, ipvlan etc.) use lower/upper infrastructure. Test commands: modprobe rmnet ip link add dummy0 type dummy ip link add rmnet1 link dummy0 type rmnet mux_id 1 for i in {2..100} do let A=$i-1 ip link add rmnet$i link rmnet$A type rmnet mux_id $i done ip link del dummy0 The purpose of the test commands is to make stack overflow. Splat looks like: [ 52.411438][ T1395] BUG: KASAN: slab-out-of-bounds in find_busiest_group+0x27e/0x2c00 [ 52.413218][ T1395] Write of size 64 at addr ffff8880c774bde0 by task ip/1395 [ 52.414841][ T1395] [ 52.430720][ T1395] CPU: 1 PID: 1395 Comm: ip Not tainted 5.6.0-rc1+ #447 [ 52.496511][ T1395] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 52.513597][ T1395] Call Trace: [ 52.546516][ T1395] [ 52.558773][ T1395] Allocated by task 3171537984: [ 52.588290][ T1395] BUG: unable to handle page fault for address: ffffffffb999e260 [ 52.589311][ T1395] #PF: supervisor read access in kernel mode [ 52.590529][ T1395] #PF: error_code(0x0000) - not-present page [ 52.591374][ T1395] PGD d6818067 P4D d6818067 PUD d6819063 PMD 0 [ 52.592288][ T1395] Thread overran stack, or stack corrupted [ 52.604980][ T1395] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 52.605856][ T1395] CPU: 1 PID: 1395 Comm: ip Not tainted 5.6.0-rc1+ #447 [ 52.611764][ T1395] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 52.621520][ T1395] RIP: 0010:stack_depot_fetch+0x10/0x30 [ 52.622296][ T1395] Code: ff e9 f9 fe ff ff 48 89 df e8 9c 1d 91 ff e9 ca fe ff ff cc cc cc cc cc cc cc 89 f8 0 [ 52.627887][ T1395] RSP: 0018:ffff8880c774bb60 EFLAGS: 00010006 [ 52.628735][ T1395] RAX: 00000000001f8880 RBX: ffff8880c774d140 RCX: 0000000000000000 [ 52.631773][ T1395] RDX: 000000000000001d RSI: ffff8880c774bb68 RDI: 0000000000003ff0 [ 52.649584][ T1395] RBP: ffffea00031dd200 R08: ffffed101b43e403 R09: ffffed101b43e403 [ 52.674857][ T1395] R10: 0000000000000001 R11: ffffed101b43e402 R12: ffff8880d900e5c0 [ 52.678257][ T1395] R13: ffff8880c774c000 R14: 0000000000000000 R15: dffffc0000000000 [ 52.694541][ T1395] FS: 00007fe867f6e0c0(0000) GS:ffff8880da000000(0000) knlGS:0000000000000000 [ 52.764039][ T1395] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 52.815008][ T1395] CR2: ffffffffb999e260 CR3: 00000000c26aa005 CR4: 00000000000606e0 [ 52.862312][ T1395] Call Trace: [ 52.887133][ T1395] Modules linked in: dummy rmnet veth openvswitch nsh nf_conncount nf_nat nf_conntrack nf_dex [ 52.936749][ T1395] CR2: ffffffffb999e260 [ 52.965695][ T1395] ---[ end trace 7e32ca99482dbb31 ]--- [ 52.966556][ T1395] RIP: 0010:stack_depot_fetch+0x10/0x30 [ 52.971083][ T1395] Code: ff e9 f9 fe ff ff 48 89 df e8 9c 1d 91 ff e9 ca fe ff ff cc cc cc cc cc cc cc 89 f8 0 [ 53.003650][ T1395] RSP: 0018:ffff8880c774bb60 EFLAGS: 00010006 [ 53.043183][ T1395] RAX: 00000000001f8880 RBX: ffff8880c774d140 RCX: 0000000000000000 [ 53.076480][ T1395] RDX: 000000000000001d RSI: ffff8880c774bb68 RDI: 0000000000003ff0 [ 53.093858][ T1395] RBP: ffffea00031dd200 R08: ffffed101b43e403 R09: ffffed101b43e403 [ 53.112795][ T1395] R10: 0000000000000001 R11: ffffed101b43e402 R12: ffff8880d900e5c0 [ 53.139837][ T1395] R13: ffff8880c774c000 R14: 0000000000000000 R15: dffffc0000000000 [ 53.141500][ T1395] FS: 00007fe867f6e0c0(0000) GS:ffff8880da000000(0000) knlGS:0000000000000000 [ 53.143343][ T1395] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 53.152007][ T1395] CR2: ffffffffb999e260 CR3: 00000000c26aa005 CR4: 00000000000606e0 [ 53.156459][ T1395] Kernel panic - not syncing: Fatal exception [ 54.213570][ T1395] Shutting down cpus with NMI [ 54.354112][ T1395] Kernel Offset: 0x33000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0x) [ 54.355687][ T1395] Rebooting in 5 seconds.. Fixes: b37f78f234bf ("net: qualcomm: rmnet: Fix crash on real dev unregistration") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 1dc49e9d164cd7e11c81279c83db84a147e14740 Author: Taehee Yoo Date: Thu Feb 27 12:25:19 2020 +0000 net: rmnet: do not allow to change mux id if mux id is duplicated Basically, duplicate mux id isn't be allowed. So, the creation of rmnet will be failed if there is duplicate mux id is existing. But, changelink routine doesn't check duplicate mux id. Test commands: modprobe rmnet ip link add dummy0 type dummy ip link add rmnet0 link dummy0 type rmnet mux_id 1 ip link add rmnet1 link dummy0 type rmnet mux_id 2 ip link set rmnet1 type rmnet mux_id 1 Fixes: 23790ef12082 ("net: qualcomm: rmnet: Allow to configure flags for existing devices") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit c026d970102e9af9958edefb4a015702c6aab636 Author: Taehee Yoo Date: Thu Feb 27 12:25:05 2020 +0000 net: rmnet: remove rcu_read_lock in rmnet_force_unassociate_device() The notifier_call() of the slave interface removes rmnet interface with unregister_netdevice_queue(). But, before calling unregister_netdevice_queue(), it acquires rcu readlock. In the RCU critical section, sleeping isn't be allowed. But, unregister_netdevice_queue() internally calls synchronize_net(), which would sleep. So, suspicious RCU usage warning occurs. Test commands: modprobe rmnet ip link add dummy0 type dummy ip link add dummy1 type dummy ip link add rmnet0 link dummy0 type rmnet mux_id 1 ip link set dummy1 master rmnet0 ip link del dummy0 Splat looks like: [ 79.639245][ T1195] ============================= [ 79.640134][ T1195] WARNING: suspicious RCU usage [ 79.640852][ T1195] 5.6.0-rc1+ #447 Not tainted [ 79.641657][ T1195] ----------------------------- [ 79.642472][ T1195] ./include/linux/rcupdate.h:273 Illegal context switch in RCU read-side critical section! [ 79.644043][ T1195] [ 79.644043][ T1195] other info that might help us debug this: [ 79.644043][ T1195] [ 79.645682][ T1195] [ 79.645682][ T1195] rcu_scheduler_active = 2, debug_locks = 1 [ 79.646980][ T1195] 2 locks held by ip/1195: [ 79.647629][ T1195] #0: ffffffffa3cf64f0 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x457/0x890 [ 79.649312][ T1195] #1: ffffffffa39256c0 (rcu_read_lock){....}, at: rmnet_config_notify_cb+0xf0/0x590 [rmnet] [ 79.651717][ T1195] [ 79.651717][ T1195] stack backtrace: [ 79.652650][ T1195] CPU: 3 PID: 1195 Comm: ip Not tainted 5.6.0-rc1+ #447 [ 79.653702][ T1195] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 79.655037][ T1195] Call Trace: [ 79.655560][ T1195] dump_stack+0x96/0xdb [ 79.656252][ T1195] ___might_sleep+0x345/0x440 [ 79.656994][ T1195] synchronize_net+0x18/0x30 [ 79.661132][ T1195] netdev_rx_handler_unregister+0x40/0xb0 [ 79.666266][ T1195] rmnet_unregister_real_device+0x42/0xb0 [rmnet] [ 79.667211][ T1195] rmnet_config_notify_cb+0x1f7/0x590 [rmnet] [ 79.668121][ T1195] ? rmnet_unregister_bridge.isra.6+0xf0/0xf0 [rmnet] [ 79.669166][ T1195] ? rmnet_unregister_bridge.isra.6+0xf0/0xf0 [rmnet] [ 79.670286][ T1195] ? __module_text_address+0x13/0x140 [ 79.671139][ T1195] notifier_call_chain+0x90/0x160 [ 79.671973][ T1195] rollback_registered_many+0x660/0xcf0 [ 79.672893][ T1195] ? netif_set_real_num_tx_queues+0x780/0x780 [ 79.675091][ T1195] ? __lock_acquire+0xdfe/0x3de0 [ 79.675825][ T1195] ? memset+0x1f/0x40 [ 79.676367][ T1195] ? __nla_validate_parse+0x98/0x1ab0 [ 79.677290][ T1195] unregister_netdevice_many.part.133+0x13/0x1b0 [ 79.678163][ T1195] rtnl_delete_link+0xbc/0x100 [ ... ] Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 102210f7664442d8c0ce332c006ea90626df745b Author: Taehee Yoo Date: Thu Feb 27 12:24:45 2020 +0000 net: rmnet: fix suspicious RCU usage rmnet_get_port() internally calls rcu_dereference_rtnl(), which checks RTNL. But rmnet_get_port() could be called by packet path. The packet path is not protected by RTNL. So, the suspicious RCU usage problem occurs. Test commands: modprobe rmnet ip netns add nst ip link add veth0 type veth peer name veth1 ip link set veth1 netns nst ip link add rmnet0 link veth0 type rmnet mux_id 1 ip netns exec nst ip link add rmnet1 link veth1 type rmnet mux_id 1 ip netns exec nst ip link set veth1 up ip netns exec nst ip link set rmnet1 up ip netns exec nst ip a a 192.168.100.2/24 dev rmnet1 ip link set veth0 up ip link set rmnet0 up ip a a 192.168.100.1/24 dev rmnet0 ping 192.168.100.2 Splat looks like: [ 146.630958][ T1174] WARNING: suspicious RCU usage [ 146.631735][ T1174] 5.6.0-rc1+ #447 Not tainted [ 146.632387][ T1174] ----------------------------- [ 146.633151][ T1174] drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c:386 suspicious rcu_dereference_check() ! [ 146.634742][ T1174] [ 146.634742][ T1174] other info that might help us debug this: [ 146.634742][ T1174] [ 146.645992][ T1174] [ 146.645992][ T1174] rcu_scheduler_active = 2, debug_locks = 1 [ 146.646937][ T1174] 5 locks held by ping/1174: [ 146.647609][ T1174] #0: ffff8880c31dea70 (sk_lock-AF_INET){+.+.}, at: raw_sendmsg+0xab8/0x2980 [ 146.662463][ T1174] #1: ffffffff93925660 (rcu_read_lock_bh){....}, at: ip_finish_output2+0x243/0x2150 [ 146.671696][ T1174] #2: ffffffff93925660 (rcu_read_lock_bh){....}, at: __dev_queue_xmit+0x213/0x2940 [ 146.673064][ T1174] #3: ffff8880c19ecd58 (&dev->qdisc_running_key#7){+...}, at: ip_finish_output2+0x714/0x2150 [ 146.690358][ T1174] #4: ffff8880c5796898 (&dev->qdisc_xmit_lock_key#3){+.-.}, at: sch_direct_xmit+0x1e2/0x1020 [ 146.699875][ T1174] [ 146.699875][ T1174] stack backtrace: [ 146.701091][ T1174] CPU: 0 PID: 1174 Comm: ping Not tainted 5.6.0-rc1+ #447 [ 146.705215][ T1174] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 146.706565][ T1174] Call Trace: [ 146.707102][ T1174] dump_stack+0x96/0xdb [ 146.708007][ T1174] rmnet_get_port.part.9+0x76/0x80 [rmnet] [ 146.709233][ T1174] rmnet_egress_handler+0x107/0x420 [rmnet] [ 146.710492][ T1174] ? sch_direct_xmit+0x1e2/0x1020 [ 146.716193][ T1174] rmnet_vnd_start_xmit+0x3d/0xa0 [rmnet] [ 146.717012][ T1174] dev_hard_start_xmit+0x160/0x740 [ 146.717854][ T1174] sch_direct_xmit+0x265/0x1020 [ 146.718577][ T1174] ? register_lock_class+0x14d0/0x14d0 [ 146.719429][ T1174] ? dev_watchdog+0xac0/0xac0 [ 146.723738][ T1174] ? __dev_queue_xmit+0x15fd/0x2940 [ 146.724469][ T1174] ? lock_acquire+0x164/0x3b0 [ 146.725172][ T1174] __dev_queue_xmit+0x20c7/0x2940 [ ... ] Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 1eb1f43a6e37282348a41e3d68f5e9a6a4359212 Author: Taehee Yoo Date: Thu Feb 27 12:24:26 2020 +0000 net: rmnet: fix NULL pointer dereference in rmnet_changelink() In the rmnet_changelink(), it uses IFLA_LINK without checking NULL pointer. tb[IFLA_LINK] could be NULL pointer. So, NULL-ptr-deref could occur. rmnet already has a lower interface (real_dev). So, after this patch, rmnet_changelink() does not use IFLA_LINK anymore. Test commands: modprobe rmnet ip link add dummy0 type dummy ip link add rmnet0 link dummy0 type rmnet mux_id 1 ip link set rmnet0 type rmnet mux_id 2 Splat looks like: [ 90.578726][ T1131] general protection fault, probably for non-canonical address 0xdffffc0000000000I [ 90.581121][ T1131] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] [ 90.582380][ T1131] CPU: 2 PID: 1131 Comm: ip Not tainted 5.6.0-rc1+ #447 [ 90.584285][ T1131] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 90.587506][ T1131] RIP: 0010:rmnet_changelink+0x5a/0x8a0 [rmnet] [ 90.588546][ T1131] Code: 83 ec 20 48 c1 ea 03 80 3c 02 00 0f 85 6f 07 00 00 48 8b 5e 28 48 b8 00 00 00 00 00 0 [ 90.591447][ T1131] RSP: 0018:ffff8880ce78f1b8 EFLAGS: 00010247 [ 90.592329][ T1131] RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffff8880ce78f8b0 [ 90.593253][ T1131] RDX: 0000000000000000 RSI: ffff8880ce78f4a0 RDI: 0000000000000004 [ 90.594058][ T1131] RBP: ffff8880cf543e00 R08: 0000000000000002 R09: 0000000000000002 [ 90.594859][ T1131] R10: ffffffffc0586a40 R11: 0000000000000000 R12: ffff8880ca47c000 [ 90.595690][ T1131] R13: ffff8880ca47c000 R14: ffff8880cf545000 R15: 0000000000000000 [ 90.596553][ T1131] FS: 00007f21f6c7e0c0(0000) GS:ffff8880da400000(0000) knlGS:0000000000000000 [ 90.597504][ T1131] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 90.599418][ T1131] CR2: 0000556e413db458 CR3: 00000000c917a002 CR4: 00000000000606e0 [ 90.600289][ T1131] Call Trace: [ 90.600631][ T1131] __rtnl_newlink+0x922/0x1270 [ 90.601194][ T1131] ? lock_downgrade+0x6e0/0x6e0 [ 90.601724][ T1131] ? rtnl_link_unregister+0x220/0x220 [ 90.602309][ T1131] ? lock_acquire+0x164/0x3b0 [ 90.602784][ T1131] ? is_bpf_image_address+0xff/0x1d0 [ 90.603331][ T1131] ? rtnl_newlink+0x4c/0x90 [ 90.603810][ T1131] ? kernel_text_address+0x111/0x140 [ 90.604419][ T1131] ? __kernel_text_address+0xe/0x30 [ 90.604981][ T1131] ? unwind_get_return_address+0x5f/0xa0 [ 90.605616][ T1131] ? create_prof_cpu_mask+0x20/0x20 [ 90.606304][ T1131] ? arch_stack_walk+0x83/0xb0 [ 90.606985][ T1131] ? stack_trace_save+0x82/0xb0 [ 90.607656][ T1131] ? stack_trace_consume_entry+0x160/0x160 [ 90.608503][ T1131] ? deactivate_slab.isra.78+0x2c5/0x800 [ 90.609336][ T1131] ? kasan_unpoison_shadow+0x30/0x40 [ 90.610096][ T1131] ? kmem_cache_alloc_trace+0x135/0x350 [ 90.610889][ T1131] ? rtnl_newlink+0x4c/0x90 [ 90.611512][ T1131] rtnl_newlink+0x65/0x90 [ ... ] Fixes: 23790ef12082 ("net: qualcomm: rmnet: Allow to configure flags for existing devices") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 93b5cbfa9636d385126f211dca9efa7e3f683202 Author: Taehee Yoo Date: Thu Feb 27 12:23:52 2020 +0000 net: rmnet: fix NULL pointer dereference in rmnet_newlink() rmnet registers IFLA_LINK interface as a lower interface. But, IFLA_LINK could be NULL. In the current code, rmnet doesn't check IFLA_LINK. So, panic would occur. Test commands: modprobe rmnet ip link add rmnet0 type rmnet mux_id 1 Splat looks like: [ 36.826109][ T1115] general protection fault, probably for non-canonical address 0xdffffc0000000000I [ 36.838817][ T1115] KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] [ 36.839908][ T1115] CPU: 1 PID: 1115 Comm: ip Not tainted 5.6.0-rc1+ #447 [ 36.840569][ T1115] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 36.841408][ T1115] RIP: 0010:rmnet_newlink+0x54/0x510 [rmnet] [ 36.841986][ T1115] Code: 83 ec 18 48 c1 e9 03 80 3c 01 00 0f 85 d4 03 00 00 48 8b 6a 28 48 b8 00 00 00 00 00 c [ 36.843923][ T1115] RSP: 0018:ffff8880b7e0f1c0 EFLAGS: 00010247 [ 36.844756][ T1115] RAX: dffffc0000000000 RBX: ffff8880d14cca00 RCX: 1ffff11016fc1e99 [ 36.845859][ T1115] RDX: 0000000000000000 RSI: ffff8880c3d04000 RDI: 0000000000000004 [ 36.846961][ T1115] RBP: 0000000000000000 R08: ffff8880b7e0f8b0 R09: ffff8880b6ac2d90 [ 36.848020][ T1115] R10: ffffffffc0589a40 R11: ffffed1016d585b7 R12: ffffffff88ceaf80 [ 36.848788][ T1115] R13: ffff8880c3d04000 R14: ffff8880b7e0f8b0 R15: ffff8880c3d04000 [ 36.849546][ T1115] FS: 00007f50ab3360c0(0000) GS:ffff8880da000000(0000) knlGS:0000000000000000 [ 36.851784][ T1115] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 36.852422][ T1115] CR2: 000055871afe5ab0 CR3: 00000000ae246001 CR4: 00000000000606e0 [ 36.853181][ T1115] Call Trace: [ 36.853514][ T1115] __rtnl_newlink+0xbdb/0x1270 [ 36.853967][ T1115] ? lock_downgrade+0x6e0/0x6e0 [ 36.854420][ T1115] ? rtnl_link_unregister+0x220/0x220 [ 36.854936][ T1115] ? lock_acquire+0x164/0x3b0 [ 36.855376][ T1115] ? is_bpf_image_address+0xff/0x1d0 [ 36.855884][ T1115] ? rtnl_newlink+0x4c/0x90 [ 36.856304][ T1115] ? kernel_text_address+0x111/0x140 [ 36.856857][ T1115] ? __kernel_text_address+0xe/0x30 [ 36.857440][ T1115] ? unwind_get_return_address+0x5f/0xa0 [ 36.858063][ T1115] ? create_prof_cpu_mask+0x20/0x20 [ 36.858644][ T1115] ? arch_stack_walk+0x83/0xb0 [ 36.859171][ T1115] ? stack_trace_save+0x82/0xb0 [ 36.859710][ T1115] ? stack_trace_consume_entry+0x160/0x160 [ 36.860357][ T1115] ? deactivate_slab.isra.78+0x2c5/0x800 [ 36.860928][ T1115] ? kasan_unpoison_shadow+0x30/0x40 [ 36.861520][ T1115] ? kmem_cache_alloc_trace+0x135/0x350 [ 36.862125][ T1115] ? rtnl_newlink+0x4c/0x90 [ 36.864073][ T1115] rtnl_newlink+0x65/0x90 [ ... ] Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 94f18b9b24ee4d812ebd30ff848298a9f413f07a Author: Nicolas Saenz Julienne Date: Wed Feb 26 17:46:00 2020 +0100 ARM: dts: bcm2711: Add pcie0 alias Some bcm2711 revisions have different DMA constraints on the their PCIE bus. The lower common denominator, being able to access the lower 3GB of memory, is the default setting for now. Newer SoC revisions are able to access the whole memory space. Raspberry Pi 4's firmware is aware of this limitation and will correct the PCIE's dma-ranges property if a pcie0 alias is available. So add it. Fixes: d5c8dc0d4c88 ("ARM: dts: bcm2711: Enable PCIe controller") Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Phil Elwell Signed-off-by: Florian Fainelli commit bff211bab301db890e38de872d43cbb459940daa Author: Stefan Wahren Date: Sun Feb 23 19:03:05 2020 +0100 ARM: dts: bcm283x: Add missing properties to the PWR LED This adds the missing properties to the PWR LED for the RPi 3 & 4 boards, which are already set for the other boards. Without them we will lose the LED state after suspend. Signed-off-by: Stefan Wahren Tested-by: Peter Robinson Signed-off-by: Florian Fainelli commit a2f0b878c3ca531a1706cb2a8b079cea3b17bafc Merge: 278de45e145b eabc8bcb292f Author: Linus Torvalds Date: Thu Feb 27 11:26:33 2020 -0800 Merge tag 'kbuild-fixes-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - fix missed rebuild of DT schema check - add some phony targets to PHONY - fix comments and documents * tag 'kbuild-fixes-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: get rid of trailing slash from subdir- example kbuild: add dt_binding_check to PHONY in a correct place kbuild: add dtbs_check to PHONY kbuild: remove unneeded semicolon at the end of cmd_dtb_check kbuild: fix DT binding schema rule to detect command line changes kbuild: remove wrong documentation about mandatory-y kbuild: add comment for V=2 mode commit b82cf17ff1957ec35eaee7dc519c365ecd06ba38 Author: Russell King Date: Thu Feb 27 09:44:49 2020 +0000 net: phy: marvell: don't interpret PHY status unless resolved Don't attempt to interpret the PHY specific status register unless the PHY is indicating that the resolution is valid. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit e387f7d5fccf95299135c88b799184c3bef6a705 Author: Jiri Pirko Date: Thu Feb 27 08:22:10 2020 +0100 mlx5: register lag notifier for init network namespace only The current code causes problems when the unregistering netdevice could be different then the registering one. Since the check in mlx5_lag_netdev_event() does not allow any other network namespace anyway, fix this by registerting the lag notifier per init network namespace only. Fixes: d48834f9d4b4 ("mlx5: Use dev_net netdevice notifier registrations") Signed-off-by: Jiri Pirko Tested-by: Aya Levin Acked-by: Saeed Mahameed Signed-off-by: David S. Miller commit 278de45e145bedff90072fb47bafdde8393f6a80 Merge: e46bfaba593c 4eb1b01de5b9 Author: Linus Torvalds Date: Thu Feb 27 11:13:27 2020 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID subsystem fixes from Jiri Kosina: - syzkaller-reported error handling fixes in various drivers, from various people - increase of HID report buffer size to 8K, which is apparently needed by certain modern devices - a few new device-ID-specific fixes / quirks - battery charging status reporting fix in logitech-hidpp, from Filipe Laíns * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: hid-bigbenff: fix race condition for scheduled work during removal HID: hid-bigbenff: call hid_hw_stop() in case of error HID: hid-bigbenff: fix general protection fault caused by double kfree HID: i2c-hid: add Trekstor Surfbook E11B to descriptor override HID: alps: Fix an error handling path in 'alps_input_configured()' HID: hiddev: Fix race in in hiddev_disconnect() HID: core: increase HID report buffer size to 8KiB HID: core: fix off-by-one memset in hid_report_raw_event() HID: apple: Add support for recent firmware on Magic Keyboards HID: ite: Only bind to keyboard USB interface on Acer SW5-012 keyboard dock HID: logitech-hidpp: BatteryVoltage: only read chargeStatus if extPower is active commit 3a12500ed5dd21a63da779ac73503f11085bbc1c Author: Tobias Klauser Date: Wed Feb 26 18:29:53 2020 +0100 unix: define and set show_fdinfo only if procfs is enabled Follow the pattern used with other *_show_fdinfo functions and only define unix_show_fdinfo and set it in proto_ops if CONFIG_PROCFS is set. Fixes: 3c32da19a858 ("unix: Show number of pending scm files of receive queue in fdinfo") Signed-off-by: Tobias Klauser Reviewed-by: Kirill Tkhai Signed-off-by: David S. Miller commit f4979b41f374c9a5c562df6e428e82629f882df0 Merge: a2f2ef4a54c0 386d4716fd91 Author: David S. Miller Date: Thu Feb 27 11:08:01 2020 -0800 Merge branch 'hinic-BugFixes' Luo bin says: ==================== hinic: BugFixes the bug fixed in patch #2 has been present since the first commit. the bugs fixed in patch #1 and patch #3 have been present since the following commits: patch #1: 352f58b0d9f2 ("net-next/hinic: Set Rxq irq to specific cpu for NUMA") patch #3: 421e9526288b ("hinic: add rss support") ==================== Signed-off-by: David S. Miller commit 386d4716fd91869e07c731657f2cde5a33086516 Author: Luo bin Date: Thu Feb 27 06:34:44 2020 +0000 hinic: fix a bug of rss configuration should use real receive queue number to configure hw rss indirect table rather than maximal queue number Signed-off-by: Luo bin Signed-off-by: David S. Miller commit d2ed69ce9ed3477e2a9527e6b89fe4689d99510e Author: Luo bin Date: Thu Feb 27 06:34:43 2020 +0000 hinic: fix a bug of setting hw_ioctxt a reserved field is used to signify prime physical function index in the latest firmware version, so we must assign a value to it correctly Signed-off-by: Luo bin Signed-off-by: David S. Miller commit 0bff777bd0cba73ad4cd0145696ad284d7e6a99f Author: Luo bin Date: Thu Feb 27 06:34:42 2020 +0000 hinic: fix a irq affinity bug can not use a local variable as an input parameter of irq_set_affinity_hint Signed-off-by: Luo bin Signed-off-by: David S. Miller commit e46bfaba593c36de591a1153746af6bcb40ef67c Merge: ed5fa5591866 adc10f5b0a03 Author: Linus Torvalds Date: Thu Feb 27 11:07:13 2020 -0800 Merge tag 'docs-5.6-fixes' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A pair of docs-build fixes" * tag 'docs-5.6-fixes' of git://git.lwn.net/linux: docs: Fix empty parallelism argument docs: remove MPX from the x86 toc commit ed5fa5591866f95be1fe75cd267cf9df2c0390f5 Merge: bfdc6d91a25f 756125289285 Author: Linus Torvalds Date: Thu Feb 27 11:01:22 2020 -0800 Merge tag 'audit-pr-20200226' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit fixes from Paul Moore: "Two fixes for problems found by syzbot: - Moving audit filter structure fields into a union caused some problems in the code which populates that filter structure. We keep the union (that idea is a good one), but we are fixing the code so that it doesn't needlessly set fields in the union and mess up the error handling. - The audit_receive_msg() function wasn't validating user input as well as it should in all cases, we add the necessary checks" * tag 'audit-pr-20200226' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: always check the netlink payload length in audit_receive_msg() audit: fix error handling in audit_data_to_entry() commit f9a15f39e50db14d2227083e8fe142b1262386f6 Merge: c689300b9c76 b83685bceedb Author: Olof Johansson Date: Thu Feb 27 10:07:47 2020 -0800 Merge tag 'tee-amdtee-fix-for-5.6' of https://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes Fix AMDTEE memory leak in amdtee_open_session() * tag 'tee-amdtee-fix-for-5.6' of https://git.linaro.org/people/jens.wiklander/linux-tee: (344 commits) tee: amdtee: fix memory leak in amdtee_open_session() Linux 5.6-rc2 ext4: improve explanation of a mount failure caused by a misconfigured kernel Input: cyapa - replace zero-length array with flexible-array member Input: tca6416-keypad - replace zero-length array with flexible-array member Input: gpio_keys_polled - replace zero-length array with flexible-array member IB/mlx5: Use div64_u64 for num_var_hw_entries calculation nvme: fix the parameter order for nvme_get_log in nvme_get_fw_slot_info nvme/pci: move cqe check after device shutdown nvme: prevent warning triggered by nvme_stop_keep_alive nvme/tcp: fix bug on double requeue when send fails cifs: make sure we do not overflow the max EA buffer size cifs: enable change notification for SMB2.1 dialect netdevice.h: fix all kernel-doc and Sphinx warnings net: dsa: tag_ar9331: Make sure there is headroom for tag net: dsa: tag_qca: Make sure there is headroom for tag net, ip6_tunnel: enhance tunnel locate with link check net/smc: no peer ID in CLC decline for SMCD net/smc: transfer fasync_list in case of fallback net: hns3: fix a copying IPv6 address error in hclge_fd_get_flow_tuples() ... Link: https://lore.kernel.org/r/20200227165205.GA7926@jade Signed-off-by: Olof Johansson commit 735a6dd02222d8d070c7bb748f25895239ca8c92 Author: Sean Christopherson Date: Wed Feb 26 15:16:15 2020 -0800 x86/pkeys: Manually set X86_FEATURE_OSPKE to preserve existing changes Explicitly set X86_FEATURE_OSPKE via set_cpu_cap() instead of calling get_cpu_cap() to pull the feature bit from CPUID after enabling CR4.PKE. Invoking get_cpu_cap() effectively wipes out any {set,clear}_cpu_cap() changes that were made between this_cpu->c_init() and setup_pku(), as all non-synthetic feature words are reinitialized from the CPU's CPUID values. Blasting away capability updates manifests most visibility when running on a VMX capable CPU, but with VMX disabled by BIOS. To indicate that VMX is disabled, init_ia32_feat_ctl() clears X86_FEATURE_VMX, using clear_cpu_cap() instead of setup_clear_cpu_cap() so that KVM can report which CPU is misconfigured (KVM needs to probe every CPU anyways). Restoring X86_FEATURE_VMX from CPUID causes KVM to think VMX is enabled, ultimately leading to an unexpected #GP when KVM attempts to do VMXON. Arguably, init_ia32_feat_ctl() should use setup_clear_cpu_cap() and let KVM figure out a different way to report the misconfigured CPU, but VMX is not the only feature bit that is affected, i.e. there is precedent that tweaking feature bits via {set,clear}_cpu_cap() after ->c_init() is expected to work. Most notably, x86_init_rdrand()'s clearing of X86_FEATURE_RDRAND when RDRAND malfunctions is also overwritten. Fixes: 0697694564c8 ("x86/mm/pkeys: Actually enable Memory Protection Keys in the CPU") Reported-by: Jacob Keller Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Tested-by: Jacob Keller Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20200226231615.13664-1-sean.j.christopherson@intel.com commit c689300b9c76c1cdf80547251721704421dbcd5a Merge: f1e4920fe330 21b388dca138 Author: Olof Johansson Date: Thu Feb 27 10:00:02 2020 -0800 Merge tag 'renesas-fixes-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/fixes Renesas Fixes for v5.6 - Restore R-Car M3-W support, - Drop deprecated compatible value to ease DT binding conversion to json-schema. * tag 'renesas-fixes-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: dts: r8a7779: Remove deprecated "renesas, rcar-sata" compatible value arm64: defconfig: Replace ARCH_R8A7796 by ARCH_R8A77960 Link: https://lore.kernel.org/r/20200226105236.18368-1-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 3918e0667bbac99400b44fa5aef3f8be2eeada4a Author: Theodore Ts'o Date: Sun Feb 23 14:54:58 2020 -0500 dm thin metadata: fix lockdep complaint [ 3934.173244] ====================================================== [ 3934.179572] WARNING: possible circular locking dependency detected [ 3934.185884] 5.4.21-xfstests #1 Not tainted [ 3934.190151] ------------------------------------------------------ [ 3934.196673] dmsetup/8897 is trying to acquire lock: [ 3934.201688] ffffffffbce82b18 (shrinker_rwsem){++++}, at: unregister_shrinker+0x22/0x80 [ 3934.210268] but task is already holding lock: [ 3934.216489] ffff92a10cc5e1d0 (&pmd->root_lock){++++}, at: dm_pool_metadata_close+0xba/0x120 [ 3934.225083] which lock already depends on the new lock. [ 3934.564165] Chain exists of: shrinker_rwsem --> &journal->j_checkpoint_mutex --> &pmd->root_lock For a more detailed lockdep report, please see: https://lore.kernel.org/r/20200220234519.GA620489@mit.edu We shouldn't need to hold the lock while are just tearing down and freeing the whole metadata pool structure. Fixes: 44d8ebf436399a4 ("dm thin metadata: use pool locking at end of dm_pool_metadata_close") Signed-off-by: Theodore Ts'o Signed-off-by: Mike Snitzer commit 7cdf6a0aae1cccf5167f3f04ecddcf648b78e289 Author: Mikulas Patocka Date: Wed Feb 19 10:25:45 2020 -0500 dm cache: fix a crash due to incorrect work item cancelling The crash can be reproduced by running the lvm2 testsuite test lvconvert-thin-external-cache.sh for several minutes, e.g.: while :; do make check T=shell/lvconvert-thin-external-cache.sh; done The crash happens in this call chain: do_waker -> policy_tick -> smq_tick -> end_hotspot_period -> clear_bitset -> memset -> __memset -- which accesses an invalid pointer in the vmalloc area. The work entry on the workqueue is executed even after the bitmap was freed. The problem is that cancel_delayed_work doesn't wait for the running work item to finish, so the work item can continue running and re-submitting itself even after cache_postsuspend. In order to make sure that the work item won't be running, we must use cancel_delayed_work_sync. Also, change flush_workqueue to drain_workqueue, so that if some work item submits itself or another work item, we are properly waiting for both of them. Fixes: c6b4fcbad044 ("dm: add cache target") Cc: stable@vger.kernel.org # v3.9 Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 697b4f1603e7358a02027ce4310fee0fe43cb286 Merge: e500ba0e71f0 51c22d7b40dc Author: Tony Lindgren Date: Thu Feb 27 08:57:48 2020 -0800 Merge branch 'omap-for-v5.6/fixes-rc3' into fixes commit 9515743bfb39c61aaf3d4f3219a645c8d1fe9a0e Author: Bijan Mottahedeh Date: Wed Feb 26 18:53:43 2020 -0800 nvme-pci: Hold cq_poll_lock while completing CQEs Completions need to consumed in the same order the controller submitted them, otherwise future completion entries may overwrite ones we haven't handled yet. Hold the nvme queue's poll lock while completing new CQEs to prevent another thread from freeing command tags for reuse out-of-order. Fixes: dabcefab45d3 ("nvme: provide optimized poll function for separate poll queues") Signed-off-by: Bijan Mottahedeh Reviewed-by: Sagi Grimberg Reviewed-by: Jens Axboe Signed-off-by: Keith Busch commit dfc6014e3b60713f375d0601d7549eed224c4615 Author: Sherry Sun Date: Thu Feb 27 16:34:12 2020 +0800 EDAC/synopsys: Do not print an error with back-to-back snprintf() calls handle_error() currently calls snprintf() a couple of times in succession to output the message for a CE/UE, therefore overwriting each part of the message which was formatted with the previous snprintf() call. As a result, only the part of the message from the last snprintf() call will be printed. The simplest and most effective way to fix this problem is to combine the whole string into one which to supply to a single snprintf() call. [ bp: Massage. ] Fixes: b500b4a029d57 ("EDAC, synopsys: Add ECC support for ZynqMP DDR controller") Signed-off-by: Sherry Sun Signed-off-by: Borislav Petkov Reviewed-by: James Morse Cc: Manish Narani Link: https://lkml.kernel.org/r/1582792452-32575-1-git-send-email-sherry.sun@nxp.com commit b83685bceedbeed33a6adc2d0579a011708d2b18 Author: Dan Carpenter Date: Mon Feb 24 13:51:39 2020 +0300 tee: amdtee: fix memory leak in amdtee_open_session() On these error paths the "sess" variable isn't freed. It's a refcounted pointer so we need to call kref_put(). I re-arranged the code a bit so the error case is always handled before the success case and the error paths are indented two tabs. Fixes: 757cc3e9ff1d ("tee: add AMD-TEE driver") Reviewed-by: Rijo Thomas Signed-off-by: Dan Carpenter Signed-off-by: Jens Wiklander commit e0560ba6d92f06dbe13e9d11c921a60c07ea6fcc Author: Ravi Bangoria Date: Tue Feb 4 10:22:31 2020 +0530 perf annotate: Fix segfault with source toggle While rendering annotate browser from perf report tui, we keep track of total number of lines(asm + source) in annotation->nr_entries and total number of asm lines in annotation->nr_asm_entries. But we don't reset them before starting. Thus if user annotates same function multiple times, we restart incrementing these fields with old values. This causes a segfault when user tries to toggle source code after annotating same function multiple times. Fix it. Signed-off-by: Ravi Bangoria Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Ian Rogers Cc: Jin Yao Cc: Namhyung Kim Cc: Song Liu Link: http://lore.kernel.org/lkml/20200204045233.474937-5-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit d3c03147bf8019bda821334428e0ba31ce4fb425 Author: Ravi Bangoria Date: Tue Feb 4 10:22:30 2020 +0530 perf annotate: Align struct annotate_args Align fields of struct annotate_args. Signed-off-by: Ravi Bangoria Acked-by: Jiri Olsa Cc: Ian Rogers Cc: Jin Yao Cc: Namhyung Kim Cc: Song Liu Link: http://lore.kernel.org/lkml/20200204045233.474937-4-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 2316f861ae9ca640708f9529ae40a6f0bd7ae048 Author: Ravi Bangoria Date: Tue Feb 4 10:22:29 2020 +0530 perf annotate: Simplify disasm_line allocation and freeing code We are allocating disasm_line object in annotation_line__new() instead of disasm_line__new(). Similarly annotation_line__delete() is actually freeing disasm_line object as well. This complexity is because of privsize. But we don't need privsize anymore so get rid of privsize and simplify disasm_line allocation and freeing code. Signed-off-by: Ravi Bangoria Acked-by: Jiri Olsa Cc: Ian Rogers Cc: Jin Yao Cc: Namhyung Kim Cc: Song Liu Link: http://lore.kernel.org/lkml/20200204045233.474937-3-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 73a7a271b3eee7b83f29b13866163776f1cbef89 Author: Marek Szyprowski Date: Thu Feb 27 12:51:46 2020 +0100 PCI: brcmstb: Fix build on 32bit ARM platforms with older compilers Some older compilers have no implementation for the helper for 64-bit unsigned division/modulo, so linking pcie-brcmstb driver causes the "undefined reference to `__aeabi_uldivmod'" error. *rc_bar2_size is always a power of two, because it is calculated as: "1ULL << fls64(entry->res->end - entry->res->start)", so the modulo operation in the subsequent check can be replaced by a simple logical AND with a proper mask. Link: https://lore.kernel.org/r/20200227115146.24515-1-m.szyprowski@samsung.com Fixes: c0452137034b ("PCI: brcmstb: Add Broadcom STB PCIe host controller driver") Signed-off-by: Marek Szyprowski Signed-off-by: Bjorn Helgaas Acked-by: Nicolas Saenz Julienne Acked-by: Lorenzo Pieralisi commit e0ad4d68548005adb54cc7c35fd9abf760a2a050 Author: Ravi Bangoria Date: Tue Feb 4 10:22:28 2020 +0530 perf annotate: Remove privsize from symbol__annotate() args privsize is passed as 0 from all the symbol__annotate() callers. Remove it from argument list. Signed-off-by: Ravi Bangoria Acked-by: Jiri Olsa Cc: Ian Rogers Cc: Jin Yao Cc: Namhyung Kim Cc: Song Liu Link: http://lore.kernel.org/lkml/20200204045233.474937-2-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit bd862b1d839221322b2e38eb8a06861604804b5e Author: He Zhe Date: Wed Feb 26 22:30:04 2020 +0800 perf probe: Check return value of strlist__add() for -ENOMEM strlist__add() may fail with -ENOMEM. Check it and give debugging hint in advance. Signed-off-by: He Zhe Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Kate Stewart Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lore.kernel.org/lkml/1582727404-180095-1-git-send-email-zhe.he@windriver.com Signed-off-by: Arnaldo Carvalho de Melo commit bebdb65e077267957f48e43d205d4a16cc7b8161 Author: Tobias Klauser Date: Wed Feb 26 18:38:32 2020 +0100 io_uring: define and set show_fdinfo only if procfs is enabled Follow the pattern used with other *_show_fdinfo functions and only define and use io_uring_show_fdinfo and its helper functions if CONFIG_PROC_FS is set. Fixes: 87ce955b24c9 ("io_uring: add ->show_fdinfo() for the io_uring file descriptor") Signed-off-by: Tobias Klauser Signed-off-by: Jens Axboe commit b0aaf4c8f31feb21de59df723231c286df2d6be3 Author: Ravi Bangoria Date: Thu Feb 13 12:13:06 2020 +0530 perf config: Document missing config options While documenting annotate.show_nr_samples config option, I found many other config options missing in perf-config documentation. Add them. Signed-off-by: Ravi Bangoria Cc: Adrian Hunter Cc: Alexey Budankov Cc: Changbin Du Cc: Ian Rogers Cc: Jin Yao Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Cc: Song Liu Cc: Taeung Song Cc: Thomas Richter Cc: Yisheng Xie Link: http://lore.kernel.org/lkml/20200213064306.160480-9-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit cd0a9c518db123e2097e03eae374e822d82493fd Author: Ravi Bangoria Date: Thu Feb 13 12:13:05 2020 +0530 perf annotate: Fix perf config option description perf config annotate options says it works only with TUI, which is wrong. Most of the TUI options are applicable to stdio2 as well. So remove that generic line and add individual line with each option stating which browsers supports that option. Also, annotate.show_nr_samples config is missing in Documentation. Describe it. Signed-off-by: Ravi Bangoria Cc: Adrian Hunter Cc: Alexey Budankov Cc: Changbin Du Cc: Ian Rogers Cc: Jin Yao Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Cc: Song Liu Cc: Taeung Song Cc: Thomas Richter Cc: Yisheng Xie Link: http://lore.kernel.org/lkml/20200213064306.160480-8-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 812b0f528240ab0e6c58911fcfcb61f4ed811ca2 Author: Ravi Bangoria Date: Thu Feb 13 12:13:04 2020 +0530 perf annotate: Prefer cmdline option over default config For all the perf-config options that can also be set from command line option, the preference is given to command line version in case of any conflict. But that's opposite in case of perf annotate. i.e. the more preference is given to default option rather than command line option. Fix it. Before: $ ./perf config annotate.show_nr_samples=false $ ./perf annotate shash --show-nr-samples Percent│ │24: mov -0xc(%rbp),%eax 49.19 │ imul $0x1003f,%eax,%ecx │ mov -0x18(%rbp),%rax After: Samples│ │24: mov -0xc(%rbp),%eax 1 │ imul $0x1003f,%eax,%ecx │ mov -0x18(%rbp),%rax Signed-off-by: Ravi Bangoria Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexey Budankov Cc: Changbin Du Cc: Ian Rogers Cc: Jin Yao Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Cc: Song Liu Cc: Taeung Song Cc: Thomas Richter Cc: Yisheng Xie Link: http://lore.kernel.org/lkml/20200213064306.160480-7-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 7384083ba616092e62df7bfb4f2034730e631e40 Author: Ravi Bangoria Date: Thu Feb 13 12:13:03 2020 +0530 perf annotate: Make perf config effective perf default config set by user in [annotate] section is totally ignored by annotate code. Fix it. Before: $ ./perf config annotate.hide_src_code=true annotate.show_nr_jumps=true annotate.show_nr_samples=true $ ./perf annotate shash │ unsigned h = 0; │ movl $0x0,-0xc(%rbp) │ while (*s) │ ↓ jmp 44 │ h = 65599 * h + *s++; 11.33 │24: mov -0xc(%rbp),%eax 43.50 │ imul $0x1003f,%eax,%ecx │ mov -0x18(%rbp),%rax After: │ movl $0x0,-0xc(%rbp) │ ↓ jmp 44 1 │1 24: mov -0xc(%rbp),%eax 4 │ imul $0x1003f,%eax,%ecx │ mov -0x18(%rbp),%rax Note that we have removed show_nr_samples and show_total_period from annotation_options because they are not used. Instead of them we use symbol_conf.show_nr_samples and symbol_conf.show_total_period. Committer testing: Using 'perf annotate --stdio2' to use the TUI rendering but emitting the output to stdio: # perf config # # perf config annotate.hide_src_code=true # perf config annotate.hide_src_code=true # # perf config annotate.show_nr_jumps=true # perf config annotate.show_nr_samples=true # perf config annotate.hide_src_code=true annotate.show_nr_jumps=true annotate.show_nr_samples=true # # Before: # perf annotate --stdio2 ObjectInstance::weak_pointer_was_finalized Samples: 1 of event 'cycles', 4000 Hz, Event count (approx.): 830873, [percent: local period] ObjectInstance::weak_pointer_was_finalized() /usr/lib64/libgjs.so.0.0.0 Percent 00000000000609f0 : endbr64 cmpq $0x0,0x20(%rdi) ↓ je 10 xor %eax,%eax ← retq xchg %ax,%ax 100.00 10: push %rbp cmpq $0x0,0x18(%rdi) mov %rdi,%rbp ↓ jne 20 1b: xor %eax,%eax pop %rbp ← retq nop 20: lea 0x18(%rdi),%rdi → callq JS_UpdateWeakPointerAfterGC(JS::Heap /dev/null Samples: 1 of event 'cycles', 4000 Hz, Event count (approx.): 830873, [percent: local period] ObjectInstance::weak_pointer_was_finalized() /usr/lib64/libgjs.so.0.0.0 Samples endbr64 cmpq $0x0,0x20(%rdi) ↓ je 10 xor %eax,%eax ← retq xchg %ax,%ax 1 1 10: push %rbp cmpq $0x0,0x18(%rdi) mov %rdi,%rbp ↓ jne 20 1 1b: xor %eax,%eax pop %rbp ← retq nop 1 20: lea 0x18(%rdi),%rdi → callq JS_UpdateWeakPointerAfterGC(JS::Heap /dev/null Samples: 1 of event 'cycles', 4000 Hz, Event count (approx.): 830873, [percent: local period] ObjectInstance::weak_pointer_was_finalized() /usr/lib64/libgjs.so.0.0.0 Samples endbr64 cmpq $0x0,0x20(%rdi) ↓ je 10 xor %eax,%eax ← retq xchg %ax,%ax 1 10: push %rbp cmpq $0x0,0x18(%rdi) mov %rdi,%rbp ↓ jne 20 1b: xor %eax,%eax pop %rbp ← retq nop 20: lea 0x18(%rdi),%rdi → callq JS_UpdateWeakPointerAfterGC(JS::Heap Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexey Budankov Cc: Changbin Du Cc: Ian Rogers Cc: Jin Yao Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Cc: Song Liu Cc: Taeung Song Cc: Thomas Richter Cc: Yisheng Xie Link: http://lore.kernel.org/lkml/20200213064306.160480-6-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 7b43b6970474757da68e89efb76e892219dea9d8 Author: Ravi Bangoria Date: Thu Feb 13 12:13:02 2020 +0530 perf config: Introduce perf_config_u8() Introduce perf_config_u8() utility function to convert char * input into u8 destination. We will utilize it in followup patch. Signed-off-by: Ravi Bangoria Cc: Adrian Hunter Cc: Alexey Budankov Cc: Changbin Du Cc: Ian Rogers Cc: Jin Yao Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Cc: Song Liu Cc: Taeung Song Cc: Thomas Richter Cc: Yisheng Xie Link: http://lore.kernel.org/lkml/20200213064306.160480-5-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 46ccb44269665bba6a9bf0f77fe776421fc2304c Author: Ravi Bangoria Date: Thu Feb 13 12:13:01 2020 +0530 perf annotate: Fix --show-nr-samples for tui/stdio2 perf annotate --show-nr-samples does not really show number of samples. The reason is we have two separate variables for the same purpose. One is in symbol_conf.show_nr_samples and another is annotation_options.show_nr_samples. We save command line option in symbol_conf.show_nr_samples but uses annotation_option.show_nr_samples while rendering tui/stdio2 browser. Though, we copy symbol_conf.show_nr_samples to annotation__default_options.show_nr_samples but that is not really effective as we don't use annotation__default_options once we copy default options to dynamic variable annotate.opts in cmd_annotate(). Instead of all these complication, keep only one variable and use it all over. symbol_conf.show_nr_samples is used by perf report/top as well. So let's kill annotation_options.show_nr_samples. On a side note, I've kept annotation_options.show_nr_samples definition because it's still used by perf-config code. Follow up patch to fix perf-config for annotate will remove annotation_options.show_nr_samples. Signed-off-by: Ravi Bangoria Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexey Budankov Cc: Changbin Du Cc: Ian Rogers Cc: Jin Yao Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Cc: Song Liu Cc: Taeung Song Cc: Thomas Richter Cc: Yisheng Xie Link: http://lore.kernel.org/lkml/20200213064306.160480-4-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 68aac855b643e1540012cbefa0dee06207c3dc64 Author: Ravi Bangoria Date: Thu Feb 13 12:13:00 2020 +0530 perf annotate: Fix --show-total-period for tui/stdio2 perf annotate --show-total-period does not really show total period. The reason is we have two separate variables for the same purpose. One is in symbol_conf.show_total_period and another is annotation_options.show_total_period. We save command line option in symbol_conf.show_total_period but uses annotation_option.show_total_period while rendering tui/stdio2 browser. Though, we copy symbol_conf.show_total_period to annotation__default_options.show_total_period but that is not really effective as we don't use annotation__default_options once we copy default options to dynamic variable annotate.opts in cmd_annotate(). Instead of all these complication, keep only one variable and use it all over. symbol_conf.show_total_period is used by perf report/top as well. So let's kill annotation_options.show_total_period. On a side note, I've kept annotation_options.show_total_period definition because it's still used by perf-config code. Follow up patch to fix perf-config for annotate will remove annotation_options.show_total_period. Signed-off-by: Ravi Bangoria Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexey Budankov Cc: Changbin Du Cc: Ian Rogers Cc: Jin Yao Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Cc: Song Liu Cc: Taeung Song Cc: Thomas Richter Cc: Yisheng Xie Link: http://lore.kernel.org/lkml/20200213064306.160480-3-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 54cf752cfb75602c256e94db6fdfd3de9dfbbef1 Author: Ravi Bangoria Date: Thu Feb 13 12:12:59 2020 +0530 perf annotate/tui: Re-render title bar after switching back from script browser The 'perf annotate' TUI browser provides a 'r' hot key to switch to a script browser. But the annotate browser title bar becomes hidden while switching back from script browser. Fix it. Signed-off-by: Ravi Bangoria Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexey Budankov Cc: Changbin Du Cc: Ian Rogers Cc: Jin Yao Cc: Jiri Olsa Cc: Leo Yan Cc: Namhyung Kim Cc: Song Liu Cc: Taeung Song Cc: Thomas Richter Cc: Yisheng Xie Link: http://lore.kernel.org/lkml/20200213064306.160480-2-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 6be7e07335486f5731cab748d80c68f20896581f Author: Gerd Hoffmann Date: Wed Feb 26 16:47:51 2020 +0100 drm/virtio: fix mmap page attributes virtio-gpu uses cached mappings, set drm_gem_shmem_object.map_cached accordingly. Cc: stable@vger.kernel.org Fixes: c66df701e783 ("drm/virtio: switch from ttm to gem shmem helpers") Reported-by: Gurchetan Singh Reported-by: Guillaume Gardet Signed-off-by: Gerd Hoffmann Reviewed-by: Gurchetan Singh Tested-by: Guillaume Gardet Link: http://patchwork.freedesktop.org/patch/msgid/20200226154752.24328-3-kraxel@redhat.com commit 1cad629257e76025bcbf490c58de550fb67d4d0e Author: Gerd Hoffmann Date: Wed Feb 26 16:47:50 2020 +0100 drm/shmem: add support for per object caching flags. Add map_cached bool to drm_gem_shmem_object, to request cached mappings on a per-object base. Check the flag before adding writecombine to pgprot bits. Cc: stable@vger.kernel.org Signed-off-by: Gerd Hoffmann Reviewed-by: Gurchetan Singh Tested-by: Guillaume Gardet Link: http://patchwork.freedesktop.org/patch/msgid/20200226154752.24328-2-kraxel@redhat.com commit 8e029eb0bcd6a7fab6dc9191152c085784c31ee6 Author: Paul Cercueil Date: Tue Feb 25 12:28:09 2020 -0300 MIPS: Fix CONFIG_MIPS_CMDLINE_DTB_EXTEND handling The CONFIG_MIPS_CMDLINE_DTB_EXTEND option is used so that the kernel arguments provided in the 'bootargs' property in devicetree are extended with the kernel arguments provided by the bootloader. The code was broken, as it didn't actually take any of the kernel arguments provided in devicetree when that option was set. Fixes: 7784cac69735 ("MIPS: cmdline: Clean up boot_command_line initialization") Cc: stable@vger.kernel.org Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 0d6f94fd498a7f9d15c5cbf64567727361fd35c0 Author: Arnaldo Carvalho de Melo Date: Thu Feb 27 09:51:30 2020 -0300 tools headers UAPI: Update tools's copy of kvm.h headers Picking the changes from: 5ef8acbdd687 ("KVM: nVMX: Emulate MTF when performing instruction emulation") Silencing this perf build warning: 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 No change in tooling ensues, just the x86 kvm tooling gets rebuilt as those headers are included in its build: $ cp arch/x86/include/uapi/asm/kvm.h tools/arch/x86/include/uapi/asm/kvm.h $ make -C tools/perf make: Entering directory '/home/acme/git/perf/tools/perf' BUILD: Doing 'make -j12' parallel build Auto-detecting system features: ... dwarf: [ on ] ... disassembler-four-args: [ on ] DESCEND plugins CC /tmp/build/perf/arch/x86/util/kvm-stat.o LD /tmp/build/perf/arch/x86/util/perf-in.o LD /tmp/build/perf/arch/x86/perf-in.o LD /tmp/build/perf/arch/perf-in.o LD /tmp/build/perf/perf-in.o LINK /tmp/build/perf/perf $ As it doesn't seem to be used there: $ grep STATE tools/perf/arch/x86/util/kvm-stat.c $ And the 'perf trace' beautifier table generator isn't interested in these things: $ grep regex= tools/perf/trace/beauty/kvm_ioctl.sh regex='^#[[:space:]]*define[[:space:]]+KVM_(\w+)[[:space:]]+_IO[RW]*\([[:space:]]*KVMIO[[:space:]]*,[[:space:]]*(0x[[:xdigit:]]+).*' $ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Oliver Upton Cc: Paolo Bonzini Signed-off-by: Arnaldo Carvalho de Melo commit d8e3ee2e2b4ef36d7be3dd8a8fb6e136f2661203 Author: Arnaldo Carvalho de Melo Date: Thu Feb 27 09:23:35 2020 -0300 tools arch x86: Sync the msr-index.h copy with the kernel sources To pick up the changes from these csets: 21b5ee59ef18 ("x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF") $ 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 $ git diff diff --git a/tools/arch/x86/include/asm/msr-index.h b/tools/arch/x86/include/asm/msr-index.h index ebe1685e92dd..d5e517d1c3dd 100644 --- a/tools/arch/x86/include/asm/msr-index.h +++ b/tools/arch/x86/include/asm/msr-index.h @@ -512,6 +512,8 @@ #define MSR_K7_HWCR 0xc0010015 #define MSR_K7_HWCR_SMMLOCK_BIT 0 #define MSR_K7_HWCR_SMMLOCK BIT_ULL(MSR_K7_HWCR_SMMLOCK_BIT) +#define MSR_K7_HWCR_IRPERF_EN_BIT 30 +#define MSR_K7_HWCR_IRPERF_EN BIT_ULL(MSR_K7_HWCR_IRPERF_EN_BIT) #define MSR_K7_FID_VID_CTL 0xc0010041 #define MSR_K7_FID_VID_STATUS 0xc0010042 $ That don't result in any change in tooling: $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after $ diff -u before after $ To silence 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: Adrian Hunter Cc: Borislav Petkov Cc: Jiri Olsa Cc: Kim Phillips Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 5dd8304981ecffa77bb72b1c57c4be5dfe6cfae9 Author: Thommy Jakobsson Date: Mon Feb 24 17:26:43 2020 +0100 spi/zynqmp: remove entry that causes a cs glitch In the public interface for chipselect, there is always an entry commented as "Dummy generic FIFO entry" pushed down to the fifo right after the activate/deactivate command. The dummy entry is 0x0, irregardless if the intention was to activate or deactive the cs. This causes the cs line to glitch rather than beeing activated in the case when there was an activate command. This has been observed on oscilloscope, and have caused problems for at least one specific flash device type connected to the qspi port. After the change the glitch is gone and cs goes active when intended. The reason why this worked before (except for the glitch) was because when sending the actual data, the CS bits are once again set. Since most flashes uses mode 0, there is always a half clk period anyway for cs to clk active setup time. If someone would rely on timing from a chip_select call to a transfer_one, it would fail though. It is unknown why the dummy entry was there in the first place, git log seems to be of no help in this case. The reference manual gives no indication of the necessity of this. In fact the lower 8 bits are a setup (or hold in case of deactivate) time expressed in cycles. So this should not be needed to fulfill any setup/hold timings. Signed-off-by: Thommy Jakobsson Reviewed-by: Naga Sureshkumar Relli Link: https://lore.kernel.org/r/20200224162643.29102-1-thommyj@gmail.com Signed-off-by: Mark Brown commit d1f37226431f5d9657aa144a40f2383adbcf27e1 Author: Cong Wang Date: Thu Dec 26 22:32:04 2019 -0800 dma-buf: free dmabuf->name in dma_buf_release() dma-buf name can be set via DMA_BUF_SET_NAME ioctl, but once set it never gets freed. Free it in dma_buf_release(). Fixes: bb2bb9030425 ("dma-buf: add DMA_BUF_SET_NAME ioctls") Reported-by: syzbot+b2098bc44728a4efb3e9@syzkaller.appspotmail.com Cc: Greg Hackmann Cc: Chenbo Feng Cc: Sumit Semwal Signed-off-by: Cong Wang Acked-by: Chenbo Feng Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20191227063204.5813-1-xiyou.wangcong@gmail.com commit 2be30d34a387b8d97cc1b4be1223bfe0b75a0812 Author: Icenowy Zheng Date: Sat Feb 22 00:51:27 2020 +0800 drm/bridge: analogix-anx6345: fix set of link bandwidth Current code tries to store the link rate (in bps, which is a big number) in a u8, which surely overflow. Then it's converted back to bandwidth code (which is thus 0) and written to the chip. The code sometimes works because the chip will automatically fallback to the lowest possible DP link rate (1.62Gbps) when get the invalid value. However, on the eDP panel of Olimex TERES-I, which wants 2.7Gbps link, it failed. As we had already read the link bandwidth as bandwidth code in earlier code (to check whether it is supported), use it when setting bandwidth, instead of converting it to link rate and then converting back. Fixes: e1cff82c1097 ("drm/bridge: fix anx6345 compilation for v5.5") Signed-off-by: Icenowy Zheng Reviewed-by: Torsten Duwe Cc: Maxime Ripard Cc: Torsten Duwe Cc: Sam Ravnborg Cc: Linus Walleij Cc: Thomas Zimmermann Cc: Icenowy Zheng Cc: Stephen Rothwell Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200221165127.813325-1-icenowy@aosc.io commit 1df97a02a937abf8473ccf0ef12edefcb11671de Merge: f8788d86ab28 66d0e797bf09 Author: Rafael J. Wysocki Date: Thu Feb 27 11:21:23 2020 +0100 Merge tag 'devfreq-fixes-for-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux Pull a devfreq fix for 5.6-rc4 from Chanwoo Choi: "Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs" - This changes as devfreq(X) cause break some user space applications such as Android HAL from Unisoc and Hikey. In result, decide to revert it for preventing the HAL layer problem." * tag 'devfreq-fixes-for-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs" commit edf0d283d988c0c7da53fa2cc1388649263470de Author: Madhuparna Bhowmik Date: Fri Feb 21 21:54:47 2020 +0530 ipv6: xfrm6_tunnel.c: Use built-in RCU list checking hlist_for_each_entry_rcu() has built-in RCU and lock checking. Pass cond argument to list_for_each_entry_rcu() to silence false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled by default. Signed-off-by: Madhuparna Bhowmik Signed-off-by: Steffen Klassert commit 289de35984815576793f579ec27248609e75976e Author: Vincent Guittot Date: Tue Feb 18 15:45:34 2020 +0100 sched/fair: Fix statistics for find_idlest_group() sgs->group_weight is not set while gathering statistics in update_sg_wakeup_stats(). This means that a group can be classified as fully busy with 0 running tasks if utilization is high enough. This path is mainly used for fork and exec. Fixes: 57abff067a08 ("sched/fair: Rework find_idlest_group()") Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Acked-by: Mel Gorman Link: https://lore.kernel.org/r/20200218144534.4564-1-vincent.guittot@linaro.org commit f5739cb0b56590d68d8df8a44659893b6d0084c3 Author: Rafael J. Wysocki Date: Wed Feb 26 22:39:27 2020 +0100 cpufreq: Fix policy initialization for internal governor drivers Before commit 1e4f63aecb53 ("cpufreq: Avoid creating excessively large stack frames") the initial value of the policy field in struct cpufreq_policy set by the driver's ->init() callback was implicitly passed from cpufreq_init_policy() to cpufreq_set_policy() if the default governor was neither "performance" nor "powersave". After that commit, however, cpufreq_init_policy() must take that case into consideration explicitly and handle it as appropriate, so make that happen. Fixes: 1e4f63aecb53 ("cpufreq: Avoid creating excessively large stack frames") Link: https://lore.kernel.org/linux-pm/39fb762880c27da110086741315ca8b111d781cd.camel@gmail.com/ Reported-by: Artem Bityutskiy Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit a2f2ef4a54c0d97aa6a8386f4ff23f36ebb488cf Author: Karsten Graul Date: Wed Feb 26 17:52:46 2020 +0100 net/smc: check for valid ib_client_data In smc_ib_remove_dev() check if the provided ib device was actually initialized for SMC before. Reported-by: syzbot+84484ccebdd4e5451d91@syzkaller.appspotmail.com Fixes: a4cf0443c414 ("smc: introduce SMC as an IB-client") Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 474a31e13a4e9749fb3ee55794d69d0f17ee0998 Author: Aaro Koskinen Date: Wed Feb 26 18:49:01 2020 +0200 net: stmmac: fix notifier registration We cannot register the same netdev notifier multiple times when probing stmmac devices. Register the notifier only once in module init, and also make debugfs creation/deletion safe against simultaneous notifier call. Fixes: 481a7d154cbb ("stmmac: debugfs entry name is not be changed when udev rename device name.") Signed-off-by: Aaro Koskinen Signed-off-by: David S. Miller commit c87a9d6fc6d555e4981f2ded77d9a8cce950743e Author: Antoine Tenart Date: Wed Feb 26 16:26:50 2020 +0100 net: phy: mscc: fix firmware paths The firmware paths for the VSC8584 PHYs not not contain the leading 'microchip/' directory, as used in linux-firmware, resulting in an error when probing the driver. This patch fixes it. Fixes: a5afc1678044 ("net: phy: mscc: add support for VSC8584 PHY") Signed-off-by: Antoine Tenart Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit be4e3c737eebd75815633f4b8fd766defaf0f1fc Author: Tony Lindgren Date: Sun Sep 15 13:15:52 2019 -0700 phy: mapphone-mdm6600: Fix timeouts by adding wake-up handling We have an interrupt handler for the wake-up GPIO pin, but we're missing the code to wake-up the system. This can cause timeouts receiving data for the UART that shares the wake-up GPIO pin with the USB PHY. All we need to do is just wake the system and kick the autosuspend timeout to fix the issue. Fixes: 5d1ebbda0318 ("phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4") Cc: Marcel Partap Cc: Merlijn Wajer Cc: Michael Scott Cc: NeKit Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I commit dc24f8b4ecd3d6c4153a1ec1bc2006ab32a41b8d Author: Paolo Abeni Date: Wed Feb 26 12:19:03 2020 +0100 mptcp: add dummy icsk_sync_mss() syzbot noted that the master MPTCP socket lacks the icsk_sync_mss callback, and was able to trigger a null pointer dereference: BUG: kernel NULL pointer dereference, address: 0000000000000000 PGD 8e171067 P4D 8e171067 PUD 93fa2067 PMD 0 Oops: 0010 [#1] PREEMPT SMP KASAN CPU: 0 PID: 8984 Comm: syz-executor066 Not tainted 5.6.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:0x0 Code: Bad RIP value. RSP: 0018:ffffc900020b7b80 EFLAGS: 00010246 RAX: 1ffff110124ba600 RBX: 0000000000000000 RCX: ffff88809fefa600 RDX: ffff8880994cdb18 RSI: 0000000000000000 RDI: ffff8880925d3140 RBP: ffffc900020b7bd8 R08: ffffffff870225be R09: fffffbfff140652a R10: fffffbfff140652a R11: 0000000000000000 R12: ffff8880925d35d0 R13: ffff8880925d3140 R14: dffffc0000000000 R15: 1ffff110124ba6ba FS: 0000000001a0b880(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000000a6d6f000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: cipso_v4_sock_setattr+0x34b/0x470 net/ipv4/cipso_ipv4.c:1888 netlbl_sock_setattr+0x2a7/0x310 net/netlabel/netlabel_kapi.c:989 smack_netlabel security/smack/smack_lsm.c:2425 [inline] smack_inode_setsecurity+0x3da/0x4a0 security/smack/smack_lsm.c:2716 security_inode_setsecurity+0xb2/0x140 security/security.c:1364 __vfs_setxattr_noperm+0x16f/0x3e0 fs/xattr.c:197 vfs_setxattr fs/xattr.c:224 [inline] setxattr+0x335/0x430 fs/xattr.c:451 __do_sys_fsetxattr fs/xattr.c:506 [inline] __se_sys_fsetxattr+0x130/0x1b0 fs/xattr.c:495 __x64_sys_fsetxattr+0xbf/0xd0 fs/xattr.c:495 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x440199 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffcadc19e48 EFLAGS: 00000246 ORIG_RAX: 00000000000000be RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440199 RDX: 0000000020000200 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 00000000006ca018 R08: 0000000000000003 R09: 00000000004002c8 R10: 0000000000000009 R11: 0000000000000246 R12: 0000000000401a20 R13: 0000000000401ab0 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: CR2: 0000000000000000 Address the issue adding a dummy icsk_sync_mss callback. To properly sync the subflows mss and options list we need some additional infrastructure, which will land to net-next. Reported-by: syzbot+f4dfece964792d80b139@syzkaller.appspotmail.com Fixes: 2303f994b3e1 ("mptcp: Associate MPTCP context with TCP socket") Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 4f31c532ad400a34dbdd836c204ed964d1ec2da5 Author: Sudheesh Mavila Date: Wed Feb 26 12:40:45 2020 +0530 net: phy: corrected the return value for genphy_check_and_restart_aneg and genphy_c45_check_and_restart_aneg When auto-negotiation is not required, return value should be zero. Changes v1->v2: - improved comments and code as Andrew Lunn and Heiner Kallweit suggestion - fixed issue in genphy_c45_check_and_restart_aneg as Russell King suggestion. Fixes: 2a10ab043ac5 ("net: phy: add genphy_check_and_restart_aneg()") Fixes: 1af9f16840e9 ("net: phy: add genphy_c45_check_and_restart_aneg()") Signed-off-by: Sudheesh Mavila Reviewed-by: Heiner Kallweit Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f596c87005f7b1baeb7d62d9a9e25d68c3dfae10 Author: yangerkun Date: Wed Feb 26 11:54:35 2020 +0800 slip: not call free_netdev before rtnl_unlock in slip_open As the description before netdev_run_todo, we cannot call free_netdev before rtnl_unlock, fix it by reorder the code. Signed-off-by: yangerkun Reviewed-by: Oliver Hartkopp Signed-off-by: David S. Miller commit b6f6118901d1e867ac9177bbff3b00b185bd4fdc Author: Eric Dumazet Date: Tue Feb 25 11:52:29 2020 -0800 ipv6: restrict IPV6_ADDRFORM operation IPV6_ADDRFORM is able to transform IPv6 socket to IPv4 one. While this operation sounds illogical, we have to support it. One of the things it does for TCP socket is to switch sk->sk_prot to tcp_prot. We now have other layers playing with sk->sk_prot, so we should make sure to not interfere with them. This patch makes sure sk_prot is the default pointer for TCP IPv6 socket. syzbot reported : BUG: kernel NULL pointer dereference, address: 0000000000000000 PGD a0113067 P4D a0113067 PUD a8771067 PMD 0 Oops: 0010 [#1] PREEMPT SMP KASAN CPU: 0 PID: 10686 Comm: syz-executor.0 Not tainted 5.6.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:0x0 Code: Bad RIP value. RSP: 0018:ffffc9000281fce0 EFLAGS: 00010246 RAX: 1ffffffff15f48ac RBX: ffffffff8afa4560 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8880a69a8f40 RBP: ffffc9000281fd10 R08: ffffffff86ed9b0c R09: ffffed1014d351f5 R10: ffffed1014d351f5 R11: 0000000000000000 R12: ffff8880920d3098 R13: 1ffff1101241a613 R14: ffff8880a69a8f40 R15: 0000000000000000 FS: 00007f2ae75db700(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000000a3b85000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: inet_release+0x165/0x1c0 net/ipv4/af_inet.c:427 __sock_release net/socket.c:605 [inline] sock_close+0xe1/0x260 net/socket.c:1283 __fput+0x2e4/0x740 fs/file_table.c:280 ____fput+0x15/0x20 fs/file_table.c:313 task_work_run+0x176/0x1b0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop arch/x86/entry/common.c:164 [inline] prepare_exit_to_usermode+0x480/0x5b0 arch/x86/entry/common.c:195 syscall_return_slowpath+0x113/0x4a0 arch/x86/entry/common.c:278 do_syscall_64+0x11f/0x1c0 arch/x86/entry/common.c:304 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c429 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f2ae75dac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: 0000000000000000 RBX: 00007f2ae75db6d4 RCX: 000000000045c429 RDX: 0000000000000001 RSI: 000000000000011a RDI: 0000000000000004 RBP: 000000000076bf20 R08: 0000000000000038 R09: 0000000000000000 R10: 0000000020000180 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000a9d R14: 00000000004ccfb4 R15: 000000000076bf2c Modules linked in: CR2: 0000000000000000 ---[ end trace 82567b5207e87bae ]--- RIP: 0010:0x0 Code: Bad RIP value. RSP: 0018:ffffc9000281fce0 EFLAGS: 00010246 RAX: 1ffffffff15f48ac RBX: ffffffff8afa4560 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8880a69a8f40 RBP: ffffc9000281fd10 R08: ffffffff86ed9b0c R09: ffffed1014d351f5 R10: ffffed1014d351f5 R11: 0000000000000000 R12: ffff8880920d3098 R13: 1ffff1101241a613 R14: ffff8880a69a8f40 R15: 0000000000000000 FS: 00007f2ae75db700(0000) GS:ffff8880aea00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000000a3b85000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: Eric Dumazet Reported-by: syzbot+1938db17e275e85dc328@syzkaller.appspotmail.com Cc: Daniel Borkmann Signed-off-by: David S. Miller commit 51e3dfa8906ace90c809235b3d3afebc166b6433 Author: Ursula Braun Date: Tue Feb 25 16:34:36 2020 +0100 net/smc: fix cleanup for linkgroup setup failures If an SMC connection to a certain peer is setup the first time, a new linkgroup is created. In case of setup failures, such a linkgroup is unusable and should disappear. As a first step the linkgroup is removed from the linkgroup list in smc_lgr_forget(). There are 2 problems: smc_listen_decline() might be called before linkgroup creation resulting in a crash due to calling smc_lgr_forget() with parameter NULL. If a setup failure occurs after linkgroup creation, the connection is never unregistered from the linkgroup, preventing linkgroup freeing. This patch introduces an enhanced smc_lgr_cleanup_early() function which * contains a linkgroup check for early smc_listen_decline() invocations * invokes smc_conn_free() to guarantee unregistering of the connection. * schedules fast linkgroup removal of the unusable linkgroup And the unused function smcd_conn_free() is removed from smc_core.h. Fixes: 3b2dec2603d5b ("net/smc: restructure client and server code in af_smc") Fixes: 2a0674fffb6bc ("net/smc: improve abnormal termination of link groups") Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 402482a6a78e5c61d8a2ec6311fc5b4aca392cd6 Author: Nicolas Saenz Julienne Date: Tue Feb 25 14:11:59 2020 +0100 net: bcmgenet: Clear ID_MODE_DIS in EXT_RGMII_OOB_CTRL when not needed Outdated Raspberry Pi 4 firmware might configure the external PHY as rgmii although the kernel currently sets it as rgmii-rxid. This makes connections unreliable as ID_MODE_DIS is left enabled. To avoid this, explicitly clear that bit whenever we don't need it. Fixes: da38802211cc ("net: bcmgenet: Add RGMII_RXID support") Signed-off-by: Nicolas Saenz Julienne Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 1521a67e6016664941f0917d50cb20053a8826a2 Author: Jiri Pirko Date: Tue Feb 25 13:54:12 2020 +0100 sched: act: count in the size of action flags bitfield The put of the flags was added by the commit referenced in fixes tag, however the size of the message was not extended accordingly. Fix this by adding size of the flags bitfield to the message size. Fixes: e38226786022 ("net: sched: update action implementations to support flags") Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit eabc8bcb292fb9a5757b0c8ab7751f41b0a104f8 Author: Masahiro Yamada Date: Thu Feb 27 02:44:58 2020 +0900 kbuild: get rid of trailing slash from subdir- example obj-* needs a trailing slash for a directory, but subdir-* does not. Signed-off-by: Masahiro Yamada commit 2eb51c75dcb354f8aef03d7648318b24630632e1 Author: Madhuparna Bhowmik Date: Tue Feb 25 17:57:45 2020 +0530 net: core: devlink.c: Use built-in RCU list checking list_for_each_entry_rcu() has built-in RCU and lock checking. Pass cond argument to list_for_each_entry_rcu() to silence false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled. The devlink->lock is held when devlink_dpipe_table_find() is called in non RCU read side section. Therefore, pass struct devlink to devlink_dpipe_table_find() for lockdep checking. Signed-off-by: Madhuparna Bhowmik Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 98c5f7d44fef309e692c24c6d71131ee0f0871fb Author: Florian Fainelli Date: Mon Feb 24 15:56:32 2020 -0800 net: dsa: bcm_sf2: Forcibly configure IMP port for 1Gb/sec We are still experiencing some packet loss with the existing advanced congestion buffering (ACB) settings with the IMP port configured for 2Gb/sec, so revert to conservative link speeds that do not produce packet loss until this is resolved. Fixes: 8f1880cbe8d0 ("net: dsa: bcm_sf2: Configure IMP port for 2Gb/sec") Fixes: de34d7084edd ("net: dsa: bcm_sf2: Only 7278 supports 2Gb/sec IMP port") Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller commit 574b238f64594cc0d87aad3f716ebab49fb663fa Merge: 9a005c3898aa 99b79c3900d4 Author: David S. Miller Date: Wed Feb 26 16:30:17 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes: 1) Perform garbage collection from workqueue to fix rcu detected stall in ipset hash set types, from Jozsef Kadlecsik. 2) Fix the forceadd evaluation path, also from Jozsef. 3) Fix nft_set_pipapo selftest, from Stefano Brivio. 4) Crash when add-flush-add element in pipapo set, also from Stefano. Add test to cover this crash. 5) Remove sysctl entry under mutex in hashlimit, from Cong Wang. ==================== Signed-off-by: David S. Miller commit bfdc6d91a25f4545bcd1b12e3219af4838142ef1 Merge: 91ad64a84e9e 0cbb4f9c6982 Author: Linus Torvalds Date: Wed Feb 26 15:54:52 2020 -0800 Merge tag 'tag-chrome-platform-fixes-for-v5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform fix from Benson Leung: "Fix a build warning" * tag 'tag-chrome-platform-fixes-for-v5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: wilco_ec: Include asm/unaligned instead of linux/ path commit 9a005c3898aa07cd5cdca77b7096814e6c478c92 Author: Jonathan Lemon Date: Mon Feb 24 15:29:09 2020 -0800 bnxt_en: add newline to netdev_*() format strings Add missing newlines to netdev_* format strings so the lines aren't buffered by the printk subsystem. Nitpicked-by: Jakub Kicinski Signed-off-by: Jonathan Lemon Acked-by: Michael Chan Signed-off-by: David S. Miller commit 99b79c3900d4627672c85d9f344b5b0f06bc2a4d Author: Cong Wang Date: Wed Feb 12 22:53:52 2020 -0800 netfilter: xt_hashlimit: unregister proc file before releasing mutex Before releasing the global mutex, we only unlink the hashtable from the hash list, its proc file is still not unregistered at this point. So syzbot could trigger a race condition where a parallel htable_create() could register the same file immediately after the mutex is released. Move htable_remove_proc_entry() back to mutex protection to fix this. And, fold htable_destroy() into htable_put() to make the code slightly easier to understand. Reported-and-tested-by: syzbot+d195fd3b9a364ddd6731@syzkaller.appspotmail.com Fixes: c4a3922d2d20 ("netfilter: xt_hashlimit: reduce hashlimit_mutex scope for htable_put()") Signed-off-by: Cong Wang Signed-off-by: Pablo Neira Ayuso commit 8e9a400c706ee5bcbc052d3ec9f87cfdbbd3f5cb Merge: 238734262142 b549c252b129 Author: Jani Nikula Date: Wed Feb 26 22:58:24 2020 +0200 Merge tag 'gvt-fixes-2020-02-26' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2020-02-26 - Fix virtual display reset (Tina) - Fix one use-after-free for dmabuf (Tina) Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20200226103016.GC10413@zhen-hp.sh.intel.com commit e34f1753eebc428c312527662eb1b529cf260240 Author: Michal Kubecek Date: Mon Feb 24 20:42:12 2020 +0100 ethtool: limit bitset size Syzbot reported that ethnl_compact_sanity_checks() can be tricked into reading past the end of ETHTOOL_A_BITSET_VALUE and ETHTOOL_A_BITSET_MASK attributes and even the message by passing a value between (u32)(-31) and (u32)(-1) as ETHTOOL_A_BITSET_SIZE. The problem is that DIV_ROUND_UP(attr_nbits, 32) is 0 for such values so that zero length ETHTOOL_A_BITSET_VALUE will pass the length check but ethnl_bitmap32_not_zero() check would try to access up to 512 MB of attribute "payload". Prevent this overflow byt limiting the bitset size. Technically, compact bitset format would allow bitset sizes up to almost 2^18 (so that the nest size does not exceed U16_MAX) but bitsets used by ethtool are much shorter. S16_MAX, the largest value which can be directly used as an upper limit in policy, should be a reasonable compromise. Fixes: 10b518d4e6dd ("ethtool: netlink bitset handling") Reported-by: syzbot+7fd4ed5b4234ab1fdccd@syzkaller.appspotmail.com Reported-by: syzbot+709b7a64d57978247e44@syzkaller.appspotmail.com Reported-by: syzbot+983cb8fb2d17a7af549d@syzkaller.appspotmail.com Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller commit 6e11d1578fba8d09d03a286740ffcf336d53928c Author: Amritha Nambiar Date: Mon Feb 24 10:56:00 2020 -0800 net: Fix Tx hash bound checking Fixes the lower and upper bounds when there are multiple TCs and traffic is on the the same TC on the same device. The lower bound is represented by 'qoffset' and the upper limit for hash value is 'qcount + qoffset'. This gives a clean Rx to Tx queue mapping when there are multiple TCs, as the queue indices for upper TCs will be offset by 'qoffset'. v2: Fixed commit description based on comments. Fixes: 1b837d489e06 ("net: Revoke export for __skb_tx_hash, update it to just be static skb_tx_hash") Fixes: eadec877ce9c ("net: Add support for subordinate traffic classes to netdev_pick_tx") Signed-off-by: Amritha Nambiar Reviewed-by: Alexander Duyck Reviewed-by: Sridhar Samudrala Signed-off-by: David S. Miller commit eb12c957735b582607e5842a06d1f4c62e185c1d Author: Daniel Vetter Date: Sat Feb 22 18:54:32 2020 +0100 drm/radeon: Inline drm_get_pci_dev It's the last user, and more importantly, it's the last non-legacy user of anything in drm_pci.c. The only tricky bit is the agp initialization. But a close look shows that radeon does not use the drm_agp midlayer (the main use of that is drm_bufs for legacy drivers), and instead could use the agp subsystem directly (like nouveau does already). Hence we can just pull this in too. A further step would be to entirely drop the use of drm_device->agp, but feels like too much churn just for this patch. Signed-off-by: Daniel Vetter Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Cc: amd-gfx@lists.freedesktop.org Reviewed-by: Alex Deucher Reviewed-by: Emil Velikov Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 8a3bddf67ce88b96531fb22c5a75d7f4dc41d155 Author: Daniel Vetter Date: Sat Feb 22 18:54:31 2020 +0100 drm/amdgpu: Drop DRIVER_USE_AGP This doesn't do anything except auto-init drm_agp support when you call drm_get_pci_dev(). Which amdgpu stopped doing with commit b58c11314a1706bf094c489ef5cb28f76478c704 Author: Alex Deucher Date: Fri Jun 2 17:16:31 2017 -0400 drm/amdgpu: drop deprecated drm_get_pci_dev and drm_put_dev No idea whether this was intentional or accidental breakage, but I guess anyone who manages to boot a this modern gpu behind an agp bridge deserves a price. A price I never expect anyone to ever collect :-) Cc: Alex Deucher Cc: "Christian König" Cc: Hawking Zhang Cc: Xiaojie Yuan Cc: Evan Quan Cc: "Tianci.Yin" Cc: "Marek Olšák" Cc: Hans de Goede Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher Signed-off-by: Daniel Vetter Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 51c22d7b40dca8b39a33b2c3b03f13122a2a1af3 Author: Tony Lindgren Date: Fri Feb 21 09:29:45 2020 -0800 ARM: OMAP2+: Fix compile if CONFIG_HAVE_ARM_SMCCC is not set Recent omap changes added runtime checks to use omap_smccc_smc() when optee is configured in dts. As the omap-secure code can be built for ARMv6 only without ARMv7 and use custom smc calls, we now get a build error: omap-secure.c:(.text+0x94): undefined reference to `__arm_smccc_smc' As there secure calls are not used for ARMv6, we should not build secure-common, and not call omap_secure_init() for omap2. Fixes: c37baa06f8a9 ("ARM: OMAP2+: Fix undefined reference to omap_secure_init") Reported-by: kbuild test robot Cc: Aaro Koskinen Cc: Andrew F. Davis Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Marc Zyngier Cc: Rob Herring Cc: Russell King Cc: Steven Price Cc: Will Deacon Signed-off-by: Tony Lindgren commit 5267244ddc62496f1537afffef70e6e2e7d5764c Merge: fa63c0039787 aec551c7a00f Author: Tony Lindgren Date: Wed Feb 26 10:48:42 2020 -0800 Merge tag 'hdq-fix' into omap-for-v5.6/fixes-rc2 commit 683f65ded66a9a7ff01ed7280804d2132ebfdf7e Author: Evan Green Date: Tue Feb 11 14:37:00 2020 -0800 spi: pxa2xx: Add CS control clock quirk In some circumstances on Intel LPSS controllers, toggling the LPSS CS control register doesn't actually cause the CS line to toggle. This seems to be failure of dynamic clock gating that occurs after going through a suspend/resume transition, where the controller is sent through a reset transition. This ruins SPI transactions that either rely on delay_usecs, or toggle the CS line without sending data. Whenever CS is toggled, momentarily set the clock gating register to "Force On" to poke the controller into acting on CS. Signed-off-by: Rajat Jain Signed-off-by: Evan Green Link: https://lore.kernel.org/r/20200211223700.110252-1-rajatja@google.com Signed-off-by: Mark Brown commit fa63c0039787b8fbacf4d6a51e3ff44288f5b90b Author: Faiz Abbas Date: Tue Jan 28 19:17:59 2020 +0530 arm: dts: dra76x: Fix mmc3 max-frequency dra76x is not affected by i887 which requires mmc3 node to be limited to a max frequency of 64 MHz. Fix this by overwriting the correct value in the the dra76 specific dtsi. Fixes: 895bd4b3e5ec ("ARM: dts: Add support for dra76-evm") Cc: stable@vger.kernel.org Signed-off-by: Faiz Abbas Signed-off-by: Tony Lindgren commit 27f13774654ea6bd0b6fc9b97cce8d19e5735661 Author: Kishon Vijay Abraham I Date: Tue Jan 28 12:11:47 2020 +0530 ARM: dts: dra7: Add "dma-ranges" property to PCIe RC DT nodes 'dma-ranges' in a PCI bridge node does correctly set dma masks for PCI devices not described in the DT. Certain DRA7 platforms (e.g., DRA76) has RAM above 32-bit boundary (accessible with LPAE config) though the PCIe bridge will be able to access only 32-bits. Add 'dma-ranges' property in PCIe RC DT nodes to indicate the host bridge can access only 32 bits. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit 91ad64a84e9e63e2906ae714dfa3933dd3f64c64 Merge: b98cce1ef5c5 2910b5aa6f54 Author: Linus Torvalds Date: Wed Feb 26 10:34:42 2020 -0800 Merge tag 'trace-v5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing and bootconfig updates: "Fixes and changes to bootconfig before it goes live in a release. Change in API of bootconfig (before it comes live in a release): - Have a magic value "BOOTCONFIG" in initrd to know a bootconfig exists - Set CONFIG_BOOT_CONFIG to 'n' by default - Show error if "bootconfig" on cmdline but not compiled in - Prevent redefining the same value - Have a way to append values - Added a SELECT BLK_DEV_INITRD to fix a build failure Synthetic event fixes: - Switch to raw_smp_processor_id() for recording CPU value in preempt section. (No care for what the value actually is) - Fix samples always recording u64 values - Fix endianess - Check number of values matches number of fields - Fix a printing bug Fix of trace_printk() breaking postponed start up tests Make a function static that is only used in a single file" * tag 'trace-v5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: bootconfig: Fix CONFIG_BOOTTIME_TRACING dependency issue bootconfig: Add append value operator support bootconfig: Prohibit re-defining value on same key bootconfig: Print array as multiple commands for legacy command line bootconfig: Reject subkey and value on same parent key tools/bootconfig: Remove unneeded error message silencer bootconfig: Add bootconfig magic word for indicating bootconfig explicitly bootconfig: Set CONFIG_BOOT_CONFIG=n by default tracing: Clear trace_state when starting trace bootconfig: Mark boot_config_checksum() static tracing: Disable trace_printk() on post poned tests tracing: Have synthetic event test use raw_smp_processor_id() tracing: Fix number printing bug in print_synth_event() tracing: Check that number of vals matches number of synth event fields tracing: Make synth_event trace functions endian-correct tracing: Make sure synth_event_trace() example always uses u64 commit b98cce1ef5c5ecb8028531ec2305c4591c9b6ca1 Merge: 2fcc74178f6d be886ba90cce Author: Linus Torvalds Date: Wed Feb 26 10:28:59 2020 -0800 Merge tag 'linux-kselftest-kunit-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kunit fixes from Shuah Khan: "This Kselftest kunit update consists of fixes to documentation and the run-time tool from Brendan Higgins and Heidi Fahim" * tag 'linux-kselftest-kunit-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: run kunit_tool from any directory kunit: test: Improve error messages for kunit_tool when kunitconfig is invalid Documentation: kunit: fixed sphinx error in code block commit 2fcc74178f6dc06ecffcd1f601ca3a3e87b3012c Merge: cfe2ce49b9da ef89d0545132 Author: Linus Torvalds Date: Wed Feb 26 10:06:56 2020 -0800 Merge tag 'linux-kselftest-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fixes from Shuah Khan: - fixes to TIMEOUT failures and out-of-tree compilation compilation errors from Michael Ellerman. - declutter git status fix from Christophe Leroy * tag 'linux-kselftest-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/rseq: Fix out-of-tree compilation selftests: Install settings files to fix TIMEOUT failures selftest/lkdtm: Don't pollute 'git status' commit aec551c7a00fb7eae049c0c4cc3208ca53e26355 Author: Tony Lindgren Date: Mon Feb 24 12:58:03 2020 -0800 bus: ti-sysc: Fix 1-wire reset quirk Because of the i2c quirk we have the reset quirks named in a confusing way. Let's fix the 1-wire quirk accordinlyg. Then let's switch to using better naming later on. Fixes: 4e23be473e30 ("bus: ti-sysc: Add support for module specific reset quirks") Signed-off-by: Tony Lindgren commit cfe2ce49b9da3959015e94b08f7494ade3ee0c49 Author: Christoph Hellwig Date: Wed Feb 26 07:39:29 2020 -0800 Revert "KVM: x86: enable -Werror" This reverts commit ead68df94d248c80fdbae220ae5425eb5af2e753. Using the -Werror flag breaks the build for me due to mostly harmless KASAN or similar warnings: arch/x86/kvm/x86.c: In function ‘kvm_timer_init’: arch/x86/kvm/x86.c:7209:1: error: the frame size of 1112 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] Feel free to add a CONFIG_WERROR if you care strong enough, but don't break peoples builds for absolutely no good reason. Signed-off-by: Christoph Hellwig Signed-off-by: Linus Torvalds commit fda31c50292a5062332fa0343c084bd9f46604d9 Author: Linus Torvalds Date: Mon Feb 24 12:47:14 2020 -0800 signal: avoid double atomic counter increments for user accounting When queueing a signal, we increment both the users count of pending signals (for RLIMIT_SIGPENDING tracking) and we increment the refcount of the user struct itself (because we keep a reference to the user in the signal structure in order to correctly account for it when freeing). That turns out to be fairly expensive, because both of them are atomic updates, and particularly under extreme signal handling pressure on big machines, you can get a lot of cache contention on the user struct. That can then cause horrid cacheline ping-pong when you do these multiple accesses. So change the reference counting to only pin the user for the _first_ pending signal, and to unpin it when the last pending signal is dequeued. That means that when a user sees a lot of concurrent signal queuing - which is the only situation when this matters - the only atomic access needed is generally the 'sigpending' count update. This was noticed because of a particularly odd timing artifact on a dual-socket 96C/192T Cascade Lake platform: when you get into bad contention, on that machine for some reason seems to be much worse when the contention happens in the upper 32-byte half of the cacheline. As a result, the kernel test robot will-it-scale 'signal1' benchmark had an odd performance regression simply due to random alignment of the 'struct user_struct' (and pointed to a completely unrelated and apparently nonsensical commit for the regression). Avoiding the double increments (and decrements on the dequeueing side, of course) makes for much less contention and hugely improved performance on that will-it-scale microbenchmark. Quoting Feng Tang: "It makes a big difference, that the performance score is tripled! bump from original 17000 to 54000. Also the gap between 5.0-rc6 and 5.0-rc6+Jiri's patch is reduced to around 2%" [ The "2% gap" is the odd cacheline placement difference on that platform: under the extreme contention case, the effect of which half of the cacheline was hot was 5%, so with the reduced contention the odd timing artifact is reduced too ] It does help in the non-contended case too, but is not nearly as noticeable. Reported-and-tested-by: Feng Tang Cc: Eric W. Biederman Cc: Huang, Ying Cc: Philip Li Cc: Andi Kleen Cc: Jiri Olsa Cc: Peter Zijlstra Signed-off-by: Linus Torvalds commit dd3db2a34cff14e152da7c8e320297719a35abf9 Author: Jens Axboe Date: Wed Feb 26 10:23:43 2020 -0700 io_uring: drop file set ref put/get on switch Dan reports that he triggered a warning on ring exit doing some testing: percpu ref (io_file_data_ref_zero) <= 0 (0) after switching to atomic WARNING: CPU: 3 PID: 0 at lib/percpu-refcount.c:160 percpu_ref_switch_to_atomic_rcu+0xe8/0xf0 Modules linked in: CPU: 3 PID: 0 Comm: swapper/3 Not tainted 5.6.0-rc3+ #5648 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 RIP: 0010:percpu_ref_switch_to_atomic_rcu+0xe8/0xf0 Code: e7 ff 55 e8 eb d2 80 3d bd 02 d2 00 00 75 8b 48 8b 55 d8 48 c7 c7 e8 70 e6 81 c6 05 a9 02 d2 00 01 48 8b 75 e8 e8 3a d0 c5 ff <0f> 0b e9 69 ff ff ff 90 55 48 89 fd 53 48 89 f3 48 83 ec 28 48 83 RSP: 0018:ffffc90000110ef8 EFLAGS: 00010292 RAX: 0000000000000045 RBX: 7fffffffffffffff RCX: 0000000000000000 RDX: 0000000000000045 RSI: ffffffff825be7a5 RDI: ffffffff825bc32c RBP: ffff8881b75eac38 R08: 000000042364b941 R09: 0000000000000045 R10: ffffffff825beb40 R11: ffffffff825be78a R12: 0000607e46005aa0 R13: ffff888107dcdd00 R14: 0000000000000000 R15: 0000000000000009 FS: 0000000000000000(0000) GS:ffff8881b9d80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f49e6a5ea20 CR3: 00000001b747c004 CR4: 00000000001606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: rcu_core+0x1e4/0x4d0 __do_softirq+0xdb/0x2f1 irq_exit+0xa0/0xb0 smp_apic_timer_interrupt+0x60/0x140 apic_timer_interrupt+0xf/0x20 RIP: 0010:default_idle+0x23/0x170 Code: ff eb ab cc cc cc cc 0f 1f 44 00 00 41 54 55 53 65 8b 2d 10 96 92 7e 0f 1f 44 00 00 e9 07 00 00 00 0f 00 2d 21 d0 51 00 fb f4 <65> 8b 2d f6 95 92 7e 0f 1f 44 00 00 5b 5d 41 5c c3 65 8b 05 e5 95 Turns out that this is due to percpu_ref_switch_to_atomic() only grabbing a reference to the percpu refcount if it's not already in atomic mode. io_uring drops a ref and re-gets it when switching back to percpu mode. We attempt to protect against this with the FFD_F_ATOMIC bit, but that isn't reliable. We don't actually need to juggle these refcounts between atomic and percpu switch, we can just do them when we've switched to atomic mode. This removes the need for FFD_F_ATOMIC, which wasn't reliable. Fixes: 05f3fb3c5397 ("io_uring: avoid ring quiesce for fixed file set unregister and update") Reported-by: Dan Melnic Signed-off-by: Jens Axboe commit cae740a04b4d6d5166f19ee5faf04ea2a1f34b3d Author: John Garry Date: Wed Feb 26 20:10:15 2020 +0800 blk-mq: Remove some unused function arguments The struct blk_mq_hw_ctx pointer argument in blk_mq_put_tag(), blk_mq_poll_nsecs(), and blk_mq_poll_hybrid_sleep() is unused, so remove it. Overall obj code size shows a minor reduction, before: text data bss dec hex filename 27306 1312 0 28618 6fca block/blk-mq.o 4303 272 0 4575 11df block/blk-mq-tag.o after: 27282 1312 0 28594 6fb2 block/blk-mq.o 4311 272 0 4583 11e7 block/blk-mq-tag.o Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: John Garry -- This minor patch had been carried as part of the blk-mq shared tags RFC, I'd rather not carry it anymore as it required rebasing, so now or never.. Signed-off-by: Jens Axboe commit c473a8d03ea8e03ca9d649b0b6d72fbcf6212c05 Author: Masahiro Yamada Date: Sun Feb 23 04:04:34 2020 +0900 kbuild: add dt_binding_check to PHONY in a correct place The dt_binding_check is added to PHONY, but it is invisible when $(dtstree) is empty. So, it is not specified as phony for ARCH=x86 etc. Add it to PHONY outside the ifneq ... endif block. Signed-off-by: Masahiro Yamada Acked-by: Rob Herring commit 964a596db8db8c77c9903dd05655696696e6b3ad Author: Masahiro Yamada Date: Sun Feb 23 04:04:33 2020 +0900 kbuild: add dtbs_check to PHONY The dtbs_check should be a phony target, but currently it is not specified so. 'make dtbs_check' works even if a file named 'dtbs_check' exists because it depends on another phony target, scripts_dtc, but we should not rely on it. Add dtbs_check to PHONY. Signed-off-by: Masahiro Yamada Acked-by: Rob Herring commit fd63fab48f143f73b534821408a303241ed174f9 Author: Masahiro Yamada Date: Sun Feb 23 04:04:32 2020 +0900 kbuild: remove unneeded semicolon at the end of cmd_dtb_check This trailing semicolon is unneeded. Signed-off-by: Masahiro Yamada Acked-by: Rob Herring commit 7a04960560640ac5b0b89461f7757322b57d0c7a Author: Masahiro Yamada Date: Sun Feb 23 04:04:31 2020 +0900 kbuild: fix DT binding schema rule to detect command line changes This if_change_rule is not working properly; it cannot detect any command line change. The reason is because cmd-check in scripts/Kbuild.include compares $(cmd_$@) and $(cmd_$1), but cmd_dtc_dt_yaml does not exist here. For if_change_rule to work properly, the stem part of cmd_* and rule_* must match. Because this cmd_and_fixdep invokes cmd_dtc, this rule must be named rule_dtc. Fixes: 4f0e3a57d6eb ("kbuild: Add support for DT binding schema checks") Signed-off-by: Masahiro Yamada Acked-by: Rob Herring commit eccbde4f6c2b6ebc52b3e9103e6f2f73f5a9f79a Author: Masahiro Yamada Date: Wed Feb 19 10:15:19 2020 +0900 kbuild: remove wrong documentation about mandatory-y This sentence does not make sense in the section about mandatory-y. This seems to be a copy-paste mistake of commit fcc8487d477a ("uapi: export all headers under uapi directories"). The correct description would be "The convention is to list one mandatory-y per line ...". I just removed it instead of fixing it. If such information is needed, it could be commented in include/asm-generic/Kbuild and include/uapi/asm-generic/Kbuild. Signed-off-by: Masahiro Yamada commit 505b12b3861bc79d1b81c815faaf4910469a7006 Author: Randy Dunlap Date: Wed Feb 12 20:40:57 2020 -0800 kbuild: add comment for V=2 mode Complete the comments for valid values of KBUILD_VERBOSE, specifically for KBUILD_VERBOSE=2. Signed-off-by: Randy Dunlap Signed-off-by: Masahiro Yamada commit 38b6a714941a285319734b9ccc30d34e107d5d7e Author: Dan Murphy Date: Wed Feb 26 07:03:05 2020 -0600 ASoC: tas2562: Fix sample rate error message Fix error message for setting the sample rate. It says bitwidth but should say sample rate. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200226130305.12043-3-dmurphy@ti.com Signed-off-by: Mark Brown commit be36f9e7517e17810ec369626a128d7948942259 Author: Jason A. Donenfeld Date: Fri Feb 21 09:48:49 2020 +0100 efi: READ_ONCE rng seed size before munmap This function is consistent with using size instead of seed->size (except for one place that this patch fixes), but it reads seed->size without using READ_ONCE, which means the compiler might still do something unwanted. So, this commit simply adds the READ_ONCE wrapper. Fixes: 636259880a7e ("efi: Add support for seeding the RNG from a UEFI ...") Signed-off-by: Jason A. Donenfeld Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: linux-efi@vger.kernel.org Cc: Ingo Molnar Cc: Thomas Gleixner Link: https://lore.kernel.org/r/20200217123354.21140-1-Jason@zx2c4.com Link: https://lore.kernel.org/r/20200221084849.26878-5-ardb@kernel.org commit 8319e9d5ad98ffccd19f35664382c73cea216193 Author: Ard Biesheuvel Date: Fri Feb 21 09:48:48 2020 +0100 efi/x86: Handle by-ref arguments covering multiple pages in mixed mode The mixed mode runtime wrappers are fragile when it comes to how the memory referred to by its pointer arguments are laid out in memory, due to the fact that it translates these addresses to physical addresses that the runtime services can dereference when running in 1:1 mode. Since vmalloc'ed pages (including the vmap'ed stack) are not contiguous in the physical address space, this scheme only works if the referenced memory objects do not cross page boundaries. Currently, the mixed mode runtime service wrappers require that all by-ref arguments that live in the vmalloc space have a size that is a power of 2, and are aligned to that same value. While this is a sensible way to construct an object that is guaranteed not to cross a page boundary, it is overly strict when it comes to checking whether a given object violates this requirement, as we can simply take the physical address of the first and the last byte, and verify that they point into the same physical page. When this check fails, we emit a WARN(), but then simply proceed with the call, which could cause data corruption if the next physical page belongs to a mapping that is entirely unrelated. Given that with vmap'ed stacks, this condition is much more likely to trigger, let's relax the condition a bit, but fail the runtime service call if it does trigger. Fixes: f6697df36bdf0bf7 ("x86/efi: Prevent mixed mode boot corruption with CONFIG_VMAP_STACK=y") Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: linux-efi@vger.kernel.org Cc: Ingo Molnar Cc: Thomas Gleixner Link: https://lore.kernel.org/r/20200221084849.26878-4-ardb@kernel.org commit f80c9f6476db6c0802545aaa44eb9a38e751786a Author: Ard Biesheuvel Date: Fri Feb 21 09:48:47 2020 +0100 efi/x86: Remove support for EFI time and counter services in mixed mode Mixed mode calls at runtime are rather tricky with vmap'ed stacks, as we can no longer assume that data passed in by the callers of the EFI runtime wrapper routines is contiguous in physical memory. We need to fix this, but before we do, let's drop the implementations of routines that we know are never used on x86, i.e., the RTC related ones. Given that UEFI rev2.8 permits any runtime service to return EFI_UNSUPPORTED at runtime, let's return that instead. As get_next_high_mono_count() is never used at all, even on other architectures, let's make that return EFI_UNSUPPORTED too. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: linux-efi@vger.kernel.org Cc: Ingo Molnar Cc: Thomas Gleixner Link: https://lore.kernel.org/r/20200221084849.26878-3-ardb@kernel.org commit 63056e8b5ebf41d52170e9f5ba1fc83d1855278c Author: Ard Biesheuvel Date: Fri Feb 21 09:48:46 2020 +0100 efi/x86: Align GUIDs to their size in the mixed mode runtime wrapper Hans reports that his mixed mode systems running v5.6-rc1 kernels hit the WARN_ON() in virt_to_phys_or_null_size(), caused by the fact that efi_guid_t objects on the vmap'ed stack happen to be misaligned with respect to their sizes. As a quick (i.e., backportable) fix, copy GUID pointer arguments to the local stack into a buffer that is naturally aligned to its size, so that it is guaranteed to cover only one physical page. Note that on x86, we cannot rely on the stack pointer being aligned the way the compiler expects, so we need to allocate an 8-byte aligned buffer of sufficient size, and copy the GUID into that buffer at an offset that is aligned to 16 bytes. Fixes: f6697df36bdf0bf7 ("x86/efi: Prevent mixed mode boot corruption with CONFIG_VMAP_STACK=y") Reported-by: Hans de Goede Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Tested-by: Hans de Goede Cc: linux-efi@vger.kernel.org Cc: Ingo Molnar Cc: Thomas Gleixner Link: https://lore.kernel.org/r/20200221084849.26878-2-ardb@kernel.org commit 4c45945aa418f5e2f31cdaf0b1484e146e29f72f Merge: c5f86891185c b103de53e09f Author: Ingo Molnar Date: Wed Feb 26 15:18:05 2020 +0100 Merge tag 'perf-urgent-for-mingo-5.6-20200220' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: auxtrace: Adrian Hunter: - Fix endless record after being terminated on arm-spe. Wei Li: - Fix endless record after being terminated on Intel PT and BTS and on ARM's cs-etm. perf test: Thomas Richter - Fix test trace+probe_vfs_getname.sh on s390 PowerPC: Arnaldo Carvalho de Melo: - Sync powerpc syscall.tbl with the kernel sources. BPF: Arnaldo Carvalho de Melo: - Remove extraneous bpf/ subdir from bpf.h headers used to build bpf events. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 3a9015988b3d41027cda61f4fdeaaeee73be8b24 Author: Jens Axboe Date: Tue Feb 25 17:48:55 2020 -0700 io_uring: import_single_range() returns 0/-ERROR Unlike the other core import helpers, import_single_range() returns 0 on success, not the length imported. This means that links that depend on the result of non-vec based IORING_OP_{READ,WRITE} that were added for 5.5 get errored when they should not be. Fixes: 3a6820f2bb8a ("io_uring: add non-vectored read/write commands") Signed-off-by: Jens Axboe commit 2a44f46781617c5040372b59da33553a02b1f46d Author: Jens Axboe Date: Tue Feb 25 13:25:41 2020 -0700 io_uring: pick up link work on submit reference drop If work completes inline, then we should pick up a dependent link item in __io_queue_sqe() as well. If we don't do so, we're forced to go async with that item, which is suboptimal. This also fixes an issue with io_put_req_find_next(), which always looks up the next work item. That should only be done if we're dropping the last reference to the request, to prevent multiple lookups of the same work item. Outside of being a fix, this also enables a good cleanup series for 5.7, where we never have to pass 'nxt' around or into the work handlers. Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 0954df70fba743d8cdaa09ccf6ba8e4ad09628de Author: Stefano Brivio Date: Fri Feb 21 03:04:22 2020 +0100 selftests: nft_concat_range: Add test for reported add/flush/add issue Add a specific test for the crash reported by Phil Sutter and addressed in the previous patch. The test cases that, in my intention, should have covered these cases, that is, the ones from the 'concurrency' section, don't run these sequences tightly enough and spectacularly failed to catch this. While at it, define a convenient way to add these kind of tests, by adding a "reported issues" test section. It's more convenient, for this particular test, to execute the set setup in its own function. However, future test cases like this one might need to call setup functions, and will typically need no tools other than nft, so allow for this in check_tools(). The original form of the reproducer used here was provided by Phil. Reported-by: Phil Sutter Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 212d58c106fd0f2704664be2bb173e14cb4e86d3 Author: Stefano Brivio Date: Fri Feb 21 03:04:21 2020 +0100 nft_set_pipapo: Actually fetch key data in nft_pipapo_remove() Phil reports that adding elements, flushing and re-adding them right away: nft add table t '{ set s { type ipv4_addr . inet_service; flags interval; }; }' nft add element t s '{ 10.0.0.1 . 22-25, 10.0.0.1 . 10-20 }' nft flush set t s nft add element t s '{ 10.0.0.1 . 10-20, 10.0.0.1 . 22-25 }' triggers, almost reliably, a crash like this one: [ 71.319848] general protection fault, probably for non-canonical address 0x6f6b6e696c2e756e: 0000 [#1] PREEMPT SMP PTI [ 71.321540] CPU: 3 PID: 1201 Comm: kworker/3:2 Not tainted 5.6.0-rc1-00377-g2bb07f4e1d861 #192 [ 71.322746] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190711_202441-buildvm-armv7-10.arm.fedoraproject.org-2.fc31 04/01/2014 [ 71.324430] Workqueue: events nf_tables_trans_destroy_work [nf_tables] [ 71.325387] RIP: 0010:nft_set_elem_destroy+0xa5/0x110 [nf_tables] [ 71.326164] Code: 89 d4 84 c0 74 0e 8b 77 44 0f b6 f8 48 01 df e8 41 ff ff ff 45 84 e4 74 36 44 0f b6 63 08 45 84 e4 74 2c 49 01 dc 49 8b 04 24 <48> 8b 40 38 48 85 c0 74 4f 48 89 e7 4c 8b [ 71.328423] RSP: 0018:ffffc9000226fd90 EFLAGS: 00010282 [ 71.329225] RAX: 6f6b6e696c2e756e RBX: ffff88813ab79f60 RCX: ffff88813931b5a0 [ 71.330365] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff88813ab79f9a [ 71.331473] RBP: ffff88813ab79f60 R08: 0000000000000008 R09: 0000000000000000 [ 71.332627] R10: 000000000000021c R11: 0000000000000000 R12: ffff88813ab79fc2 [ 71.333615] R13: ffff88813b3adf50 R14: dead000000000100 R15: ffff88813931b8a0 [ 71.334596] FS: 0000000000000000(0000) GS:ffff88813bd80000(0000) knlGS:0000000000000000 [ 71.335780] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 71.336577] CR2: 000055ac683710f0 CR3: 000000013a222003 CR4: 0000000000360ee0 [ 71.337533] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 71.338557] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 71.339718] Call Trace: [ 71.340093] nft_pipapo_destroy+0x7a/0x170 [nf_tables_set] [ 71.340973] nft_set_destroy+0x20/0x50 [nf_tables] [ 71.341879] nf_tables_trans_destroy_work+0x246/0x260 [nf_tables] [ 71.342916] process_one_work+0x1d5/0x3c0 [ 71.343601] worker_thread+0x4a/0x3c0 [ 71.344229] kthread+0xfb/0x130 [ 71.344780] ? process_one_work+0x3c0/0x3c0 [ 71.345477] ? kthread_park+0x90/0x90 [ 71.346129] ret_from_fork+0x35/0x40 [ 71.346748] Modules linked in: nf_tables_set nf_tables nfnetlink 8021q [last unloaded: nfnetlink] [ 71.348153] ---[ end trace 2eaa8149ca759bcc ]--- [ 71.349066] RIP: 0010:nft_set_elem_destroy+0xa5/0x110 [nf_tables] [ 71.350016] Code: 89 d4 84 c0 74 0e 8b 77 44 0f b6 f8 48 01 df e8 41 ff ff ff 45 84 e4 74 36 44 0f b6 63 08 45 84 e4 74 2c 49 01 dc 49 8b 04 24 <48> 8b 40 38 48 85 c0 74 4f 48 89 e7 4c 8b [ 71.350017] RSP: 0018:ffffc9000226fd90 EFLAGS: 00010282 [ 71.350019] RAX: 6f6b6e696c2e756e RBX: ffff88813ab79f60 RCX: ffff88813931b5a0 [ 71.350019] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff88813ab79f9a [ 71.350020] RBP: ffff88813ab79f60 R08: 0000000000000008 R09: 0000000000000000 [ 71.350021] R10: 000000000000021c R11: 0000000000000000 R12: ffff88813ab79fc2 [ 71.350022] R13: ffff88813b3adf50 R14: dead000000000100 R15: ffff88813931b8a0 [ 71.350025] FS: 0000000000000000(0000) GS:ffff88813bd80000(0000) knlGS:0000000000000000 [ 71.350026] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 71.350027] CR2: 000055ac683710f0 CR3: 000000013a222003 CR4: 0000000000360ee0 [ 71.350028] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 71.350028] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 71.350030] Kernel panic - not syncing: Fatal exception [ 71.350412] Kernel Offset: disabled [ 71.365922] ---[ end Kernel panic - not syncing: Fatal exception ]--- which is caused by dangling elements that have been deactivated, but never removed. On a flush operation, nft_pipapo_walk() walks through all the elements in the mapping table, which are then deactivated by nft_flush_set(), one by one, and added to the commit list for removal. Element data is then freed. On transaction commit, nft_pipapo_remove() is called, and failed to remove these elements, leading to the stale references in the mapping. The first symptom of this, revealed by KASan, is a one-byte use-after-free in subsequent calls to nft_pipapo_walk(), which is usually not enough to trigger a panic. When stale elements are used more heavily, though, such as double-free via nft_pipapo_destroy() as in Phil's case, the problem becomes more noticeable. The issue comes from that fact that, on a flush operation, nft_pipapo_remove() won't get the actual key data via elem->key, elements to be deleted upon commit won't be found by the lookup via pipapo_get(), and removal will be skipped. Key data should be fetched via nft_set_ext_key(), instead. Reported-by: Phil Sutter Fixes: 3c4287f62044 ("nf_tables: Add set type for arbitrary concatenation of ranges") Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 8c8c06207bcfc5a7e5918fc0a0f7f7b9a2e196d6 Author: Ahzo Date: Tue Feb 25 13:56:14 2020 -0500 drm/ttm: fix leaking fences via ttm_buffer_object_transfer Set the drm_device to NULL, so that the newly created buffer object doesn't appear to use the embedded gem object. This is necessary, because otherwise no corresponding dma_resv_fini for the dma_resv_init is called, resulting in a memory leak. The dma_resv_fini in ttm_bo_release_list is only called if the embedded gem object is not used, which is determined by checking if the drm_device is NULL. Bug: https://gitlab.freedesktop.org/drm/amd/issues/958 Fixes: 1e053b10ba60 ("drm/ttm: use gem reservation object") Reviewed-by: Christian König Signed-off-by: Ahzo Signed-off-by: Alex Deucher Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/355089/ commit 9ea4894ba4492c1afeff3142f34bcf9af706a2e1 Merge: d0820556507b 8af1c6fbd923 Author: Pablo Neira Ayuso Date: Wed Feb 26 13:55:15 2020 +0100 Merge branch 'master' of git://blackhole.kfki.hu/nf Jozsef Kadlecsik says: ==================== ipset patches for nf The first one is larger than usual, but the issue could not be solved simpler. Also, it's a resend of the patch I submitted a few days ago, with a one line fix on top of that: the size of the comment extensions was not taken into account at reporting the full size of the set. - Fix "INFO: rcu detected stall in hash_xxx" reports of syzbot by introducing region locking and using workqueue instead of timer based gc of timed out entries in hash types of sets in ipset. - Fix the forceadd evaluation path - the bug was also uncovered by the syzbot. ==================== Signed-off-by: Pablo Neira Ayuso commit 238734262142075056653b4de091458e0ca858f2 Author: Chris Wilson Date: Fri Feb 21 22:18:18 2020 +0000 drm/i915: Avoid recursing onto active vma from the shrinker We mark the vma as active while binding it in order to protect outselves from being shrunk under mempressure. This only works if we are strict in not attempting to shrink active objects. <6> [472.618968] Workqueue: events_unbound fence_work [i915] <4> [472.618970] Call Trace: <4> [472.618974] ? __schedule+0x2e5/0x810 <4> [472.618978] schedule+0x37/0xe0 <4> [472.618982] schedule_preempt_disabled+0xf/0x20 <4> [472.618984] __mutex_lock+0x281/0x9c0 <4> [472.618987] ? mark_held_locks+0x49/0x70 <4> [472.618989] ? _raw_spin_unlock_irqrestore+0x47/0x60 <4> [472.619038] ? i915_vma_unbind+0xae/0x110 [i915] <4> [472.619084] ? i915_vma_unbind+0xae/0x110 [i915] <4> [472.619122] i915_vma_unbind+0xae/0x110 [i915] <4> [472.619165] i915_gem_object_unbind+0x1dc/0x400 [i915] <4> [472.619208] i915_gem_shrink+0x328/0x660 [i915] <4> [472.619250] ? i915_gem_shrink_all+0x38/0x60 [i915] <4> [472.619282] i915_gem_shrink_all+0x38/0x60 [i915] <4> [472.619325] vm_alloc_page.constprop.25+0x1aa/0x240 [i915] <4> [472.619330] ? rcu_read_lock_sched_held+0x4d/0x80 <4> [472.619363] ? __alloc_pd+0xb/0x30 [i915] <4> [472.619366] ? module_assert_mutex_or_preempt+0xf/0x30 <4> [472.619368] ? __module_address+0x23/0xe0 <4> [472.619371] ? is_module_address+0x26/0x40 <4> [472.619374] ? static_obj+0x34/0x50 <4> [472.619376] ? lockdep_init_map+0x4d/0x1e0 <4> [472.619407] setup_page_dma+0xd/0x90 [i915] <4> [472.619437] alloc_pd+0x29/0x50 [i915] <4> [472.619470] __gen8_ppgtt_alloc+0x443/0x6b0 [i915] <4> [472.619503] gen8_ppgtt_alloc+0xd7/0x300 [i915] <4> [472.619535] ppgtt_bind_vma+0x2a/0xe0 [i915] <4> [472.619577] __vma_bind+0x26/0x40 [i915] <4> [472.619611] fence_work+0x1c/0x90 [i915] <4> [472.619617] process_one_work+0x26a/0x620 Fixes: 2850748ef876 ("drm/i915: Pull i915_vma_pin under the vm->mutex") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200221221818.2861432-1-chris@chris-wilson.co.uk (cherry picked from commit 6f24e41022f28061368776ea1514db0a6e67a9b1) Signed-off-by: Jani Nikula commit 2de0147d77168d6a227c00eb9c5a49374e1582a3 Author: Michał Winiarski Date: Wed Feb 19 17:18:22 2020 +0100 drm/i915/pmu: Avoid using globals for PMU events Attempting to bind / unbind module from devices where we have both integrated and discreete GPU handled by i915, will cause us to try and double free the global state, hitting null ptr deref in free_event_attributes. Let's move it to i915_pmu. Fixes: 05488673a4d4 ("drm/i915/pmu: Support multiple GPUs") Signed-off-by: Michał Winiarski Cc: Chris Wilson Cc: Michal Wajdeczko Cc: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200219161822.24592-2-michal.winiarski@intel.com (cherry picked from commit 46129dc10f47c5c2b51c93a82b7b2aca46574ae0) Signed-off-by: Jani Nikula commit 19ee5e8da6129d8d828201a12264ab3d09153ec4 Author: Michał Winiarski Date: Wed Feb 19 17:18:21 2020 +0100 drm/i915/pmu: Avoid using globals for CPU hotplug state Attempting to bind / unbind module from devices where we have both integrated and discreete GPU handled by i915 can lead to leaks and warnings from cpuhp: Error: Removing state XXX which has instances left. Let's move the state to i915_pmu. Fixes: 05488673a4d4 ("drm/i915/pmu: Support multiple GPUs") Signed-off-by: Michał Winiarski Cc: Chris Wilson Cc: Michal Wajdeczko Cc: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200219161822.24592-1-michal.winiarski@intel.com (cherry picked from commit f5a179d4687d4e7bfadd7cbda7ee5d0bad76761f) Signed-off-by: Jani Nikula commit eee18939e5767dbe3a98b3ea172e7fd7ba7d403c Author: Chris Wilson Date: Mon Feb 24 10:11:20 2020 +0000 drm/i915/gtt: Downgrade gen7 (ivb, byt, hsw) back to aliasing-ppgtt Full-ppgtt on gen7 is proving to be highly unstable and not robust. Closes: https://gitlab.freedesktop.org/drm/intel/issues/694 Fixes: 3cd6e8860ecd ("drm/i915/gen7: Re-enable full-ppgtt for ivb & hsw") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Jani Nikula Cc: Dave Airlie Acked-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20200224101120.4024481-1-chris@chris-wilson.co.uk (cherry picked from commit 4fbe112a569526e46fa2accb5763c069f78cb431) Signed-off-by: Jani Nikula commit b5dacc8fb52c690e2cdf7df3ae36bd1cf20e63dd Author: Jani Nikula Date: Fri Feb 21 12:54:14 2020 +0200 drm/i915: fix header test with GCOV $(CC) with $(CFLAGS_GCOV) assumes the output filename with .gcno suffix appended is writable. This is not the case when the output filename is /dev/null: HDRTEST drivers/gpu/drm/i915/display/intel_frontbuffer.h /dev/null:1:0: error: cannot open /dev/null.gcno HDRTEST drivers/gpu/drm/i915/display/intel_ddi.h /dev/null:1:0: error: cannot open /dev/null.gcno make[5]: *** [../drivers/gpu/drm/i915/Makefile:307: drivers/gpu/drm/i915/display/intel_ddi.hdrtest] Error 1 make[5]: *** Waiting for unfinished jobs.... make[5]: *** [../drivers/gpu/drm/i915/Makefile:307: drivers/gpu/drm/i915/display/intel_frontbuffer.hdrtest] Error 1 Filter out $(CFLAGS_GVOC) from the header test $(c_flags) as they don't make sense here anyway. References: http://lore.kernel.org/r/d8112767-4089-4c58-d7d3-2ce03139858a@infradead.org Reported-by: Randy Dunlap Fixes: c6d4a099a240 ("drm/i915: reimplement header test feature") Cc: Masahiro Yamada Acked-by: Randy Dunlap Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200221105414.14358-1-jani.nikula@intel.com (cherry picked from commit 408c1b3253dab93da175690dc0e21dd8bccf3371) Signed-off-by: Jani Nikula commit 0dda2ddb7ded1395189e95d43106469687c07795 Author: Johannes Thumshirn Date: Tue Feb 25 22:03:33 2020 +0100 zonefs: select FS_IOMAP Zonefs makes use of iomap internally, so it should also select iomap in Kconfig. Signed-off-by: Johannes Thumshirn Signed-off-by: Damien Le Moal commit 7c69eb84d98a28c428f902318c20c53cf29c9084 Author: Christoph Hellwig Date: Fri Feb 21 06:37:23 2020 -0800 zonefs: fix IOCB_NOWAIT handling IOCB_NOWAIT can't just be ignored as it breaks applications expecting it not to block. Just refuse the operation as applications must handle that (e.g. by falling back to a thread pool). Fixes: 8dcc1a9d90c1 ("fs: New zonefs file system") Signed-off-by: Christoph Hellwig Signed-off-by: Damien Le Moal commit 2910b5aa6f545c044173a5cab3dbb7f43e23916d Author: Masami Hiramatsu Date: Tue Feb 25 23:36:41 2020 +0900 bootconfig: Fix CONFIG_BOOTTIME_TRACING dependency issue Since commit d8a953ddde5e ("bootconfig: Set CONFIG_BOOT_CONFIG=n by default") also changed the CONFIG_BOOTTIME_TRACING to select CONFIG_BOOT_CONFIG to show the boot-time tracing on the menu, it introduced wrong dependencies with BLK_DEV_INITRD as below. WARNING: unmet direct dependencies detected for BOOT_CONFIG Depends on [n]: BLK_DEV_INITRD [=n] Selected by [y]: - BOOTTIME_TRACING [=y] && TRACING_SUPPORT [=y] && FTRACE [=y] && TRACING [=y] This makes the CONFIG_BOOT_CONFIG selects CONFIG_BLK_DEV_INITRD to fix this error and make CONFIG_BOOTTIME_TRACING=n by default, so that both boot-time tracing and boot configuration off but those appear on the menu list. Link: http://lkml.kernel.org/r/158264140162.23842.11237423518607465535.stgit@devnote2 Fixes: d8a953ddde5e ("bootconfig: Set CONFIG_BOOT_CONFIG=n by default") Reported-by: Randy Dunlap Compiled-tested-by: Randy Dunlap Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit deddc9e8c0e05c2a770d3c9e6683c7ae216741ca Author: Vadim Pasternak Date: Tue Feb 25 00:52:02 2020 +0200 hwmon: (pmbus/xdpe12284) Add callback for vout limits conversion Provide read_word_data() callback for overvoltage and undervoltage output readouts conversion. These registers are presented in 'slinear11' format, while default conversion for 'vout' class for the devices is 'vid'. It is resulted in wrong conversion in pmbus_reg2data() for in{3-4}_lcrit and in{3-4}_crit attributes. ) Fixes: aaafb7c8eb1c ("hwmon: (pmbus) Add support for Infineon Multi-phase xdpe122 family controllers") Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20200224225202.19576-1-vadimp@mellanox.com [gropeck: Adjusted to mainline PMBus API] Signed-off-by: Guenter Roeck commit 2d141dd2caa78fbaf87b57c27769bdc14975ab3d Author: Jens Axboe Date: Tue Feb 25 11:52:56 2020 -0700 io-wq: ensure work->task_pid is cleared on init We use ->task_pid for exit cancellation, but we need to ensure it's cleared to zero for io_req_work_grab_env() to do the right thing. Take a suggestion from Bart and clear the whole thing, just setting the function passed in. This makes it more future proof as well. Fixes: 36282881a795 ("io-wq: add io_wq_cancel_pid() to cancel based on a specific pid") Signed-off-by: Jens Axboe commit d364847eed890211444ad74496bb549f838c6018 Author: Thomas Gleixner Date: Tue Feb 25 14:55:15 2020 +0100 x86/mce/therm_throt: Undo thermal polling properly on CPU offline Chris Wilson reported splats from running the thermal throttling workqueue callback on offlined CPUs. The problem is that that callback should not even run on offlined CPUs but it happens nevertheless because the offlining callback thermal_throttle_offline() does not symmetrically undo the setup work done in its onlining counterpart. IOW, 1. The thermal interrupt vector should be masked out before ... 2. ... cancelling any pending work synchronously so that no new work is enqueued anymore. Do those things and fix the issue properly. [ bp: Write commit message. ] Fixes: f6656208f04e ("x86/mce/therm_throt: Optimize notifications of thermal throttle") Reported-by: Chris Wilson Tested-by: Pandruvada, Srinivas Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/158120068234.18291.7938335950259651295@skylake-alporthouse-com commit eb9d8ddbc107d02e489681f9dcbf93949e1a99a4 Author: Tomeu Vizoso Date: Wed Feb 12 14:22:36 2020 -0600 drm/panfrost: Don't try to map on error faults If the exception type isn't a translation fault, don't try to map and instead go straight to a terminal fault. Otherwise, we can get flooded by kernel warnings and further faults. Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations") Signed-off-by: Rob Herring Signed-off-by: Tomeu Vizoso Reviewed-by: Steven Price Reviewed-by: Tomeu Vizoso Acked-by: Alyssa Rosenzweig Link: https://patchwork.freedesktop.org/patch/msgid/20200212202236.13095-1-robh@kernel.org commit a8e41f6033a0c5633d55d6e35993c9e2005d872f Author: Jason A. Donenfeld Date: Tue Feb 25 18:05:35 2020 +0800 icmp: allow icmpv6_ndo_send to work with CONFIG_IPV6=n The icmpv6_send function has long had a static inline implementation with an empty body for CONFIG_IPV6=n, so that code calling it doesn't need to be ifdef'd. The new icmpv6_ndo_send function, which is intended for drivers as a drop-in replacement with an identical function signature, should follow the same pattern. Without this patch, drivers that used to work with CONFIG_IPV6=n now result in a linker error. Cc: Chen Zhou Reported-by: Hulk Robot Fixes: 0b41713b6066 ("icmp: introduce helper for nat'd source address in network device context") Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 55dee1bc0d72877b99805e42e0205087e98b9edd Author: Scott Mayhew Date: Mon Feb 24 16:29:32 2020 -0500 nfs: add minor version to nfs_server_key for fscache An NFS client that mounts multiple exports from the same NFS server with higher NFSv4 versions disabled (i.e. 4.2) and without forcing a specific NFS version results in fscache index cookie collisions and the following messages: [ 570.004348] FS-Cache: Duplicate cookie detected Each nfs_client structure should have its own fscache index cookie, so add the minorversion to nfs_server_key. Link: https://bugzilla.kernel.org/show_bug.cgi?id=200145 Signed-off-by: Scott Mayhew Signed-off-by: Dave Wysochanski Signed-off-by: Anna Schumaker commit 75a9b9176157f3095d3099adf512b5a233addbc7 Author: Scott Mayhew Date: Tue Feb 25 11:05:22 2020 -0500 NFS: Fix leak of ctx->nfs_server.hostname If userspace passes an nfs_mount_data struct in the data argument of mount(2), then nfs23_parse_monolithic() or nfs4_parse_monolithic() will allocate memory for ctx->nfs_server.hostname. This needs to be freed in nfs_parse_source(), which also allocates memory for ctx->nfs_server.hostname, otherwise a leak will occur. Reported-by: syzbot+193c375dcddb4f345091@syzkaller.appspotmail.com Fixes: f2aedb713c28 ("NFS: Add fs_context support.") Signed-off-by: Scott Mayhew Signed-off-by: Anna Schumaker commit 1821b26a1fed8fca57a96ef87bac7a6a48e78815 Author: Scott Mayhew Date: Thu Feb 20 08:06:20 2020 -0500 NFS: Don't hard-code the fs_type when submounting Hard-coding the fstype causes "nfs4" mounts to appear as "nfs", which breaks scripts that do "umount -at nfs4". Reported-by: Patrick Steinhardt Fixes: f2aedb713c28 ("NFS: Add fs_context support.") Signed-off-by: Scott Mayhew Signed-off-by: Anna Schumaker commit c5f86891185c408b2241ba9a82ae8622d8386aff Merge: d67f250e9634 8458ca147c20 Author: Linus Torvalds Date: Tue Feb 25 10:14:39 2020 -0800 Merge tag 'riscv-for-linux-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: "This contains a handful of RISC-V related fixes that I've collected and would like to target for 5.6-rc4: - A fix to set up the PMPs on boot, which allows the kernel to access memory on systems that don't set up permissive PMPs before getting to Linux. This only effects machine-mode kernels, which currently means only NOMMU kernels. - A fix to avoid enabling supervisor-mode interrupts when running in machine-mode, also only for NOMMU kernels. - A pair of fixes to our KASAN support to avoid corrupting memory. - A gitignore fix. This boots on QEMU's virt board for me" * tag 'riscv-for-linux-5.6-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: adjust the indent riscv: allocate a complete page size for each page table riscv: Fix gitignore RISC-V: Don't enable all interrupts in trap_init() riscv: set pmp configuration if kernel is running in M-mode commit d67f250e96344f006e3a6be148def4c6537d05a0 Merge: 63623fd44972 3234f4ed3066 Author: Linus Torvalds Date: Tue Feb 25 10:09:41 2020 -0800 Merge branch 'mips-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Paul Burton: "Here are a few MIPS fixes, and a MAINTAINERS update to hand over MIPS maintenance to Thomas Bogendoerfer - this will be my final pull request as MIPS maintainer. Thanks for your helpful comments, useful corrections & responsiveness during the time I've fulfilled the role, and I'm sure I'll pop up elsewhere in the tree somewhere down the line" * 'mips-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MAINTAINERS: Hand MIPS over to Thomas MIPS: ingenic: DTS: Fix watchdog nodes MIPS: X1000: Fix clock of watchdog node. MIPS: vdso: Wrap -mexplicit-relocs in cc-option MIPS: VPE: Fix a double free and a memory leak in 'release_vpe()' MIPS: cavium_octeon: Fix syncw generation. mips: vdso: add build time check that no 'jalr t9' calls left MIPS: Disable VDSO time functionality on microMIPS mips: vdso: fix 'jalr t9' crash in vdso code commit 7fc2e47f40dd77ab1fcbda6db89614a0173d89c7 Author: Mikulas Patocka Date: Mon Feb 17 08:11:35 2020 -0500 dm integrity: fix invalid table returned due to argument count mismatch If the flag SB_FLAG_RECALCULATE is present in the superblock, but it was not specified on the command line (i.e. ic->recalculate_flag is false), dm-integrity would return invalid table line - the reported number of arguments would not match the real number. Fixes: 468dfca38b1a ("dm integrity: add a bitmap mode") Cc: stable@vger.kernel.org # v5.2+ Reported-by: Ondrej Kozina Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 53770f0ec5fd417429775ba006bc4abe14002335 Author: Mikulas Patocka Date: Mon Feb 17 07:43:03 2020 -0500 dm integrity: fix a deadlock due to offloading to an incorrect workqueue If we need to perform synchronous I/O in dm_integrity_map_continue(), we must make sure that we are not in the map function - in order to avoid the deadlock due to bio queuing in generic_make_request. To avoid the deadlock, we offload the request to metadata_wq. However, metadata_wq also processes metadata updates for write requests. If there are too many requests that get offloaded to metadata_wq at the beginning of dm_integrity_map_continue, the workqueue metadata_wq becomes clogged and the system is incapable of processing any metadata updates. This causes a deadlock because all the requests that need to do metadata updates wait for metadata_wq to proceed and metadata_wq waits inside wait_and_add_new_range until some existing request releases its range lock (which doesn't happen because the range lock is released after metadata update). In order to fix the deadlock, we create a new workqueue offload_wq and offload requests to it - so that processing of offload_wq is independent from processing of metadata_wq. Fixes: 7eada909bfd7 ("dm: add integrity target") Cc: stable@vger.kernel.org # v4.12+ Reported-by: Heinz Mauelshagen Tested-by: Heinz Mauelshagen Signed-off-by: Heinz Mauelshagen Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit d5bdf66108419cdb39da361b58ded661c29ff66e Author: Mikulas Patocka Date: Fri Feb 7 11:42:30 2020 -0500 dm integrity: fix recalculation when moving from journal mode to bitmap mode If we resume a device in bitmap mode and the on-disk format is in journal mode, we must recalculate anything above ic->sb->recalc_sector. Otherwise, there would be non-recalculated blocks which would cause I/O errors. Fixes: 468dfca38b1a ("dm integrity: add a bitmap mode") Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 20055448dc1b439c87d0cb602e6d0469b0a3aaad Merge: efbd9129dfe8 5eb40257047f Author: Stephen Boyd Date: Tue Feb 25 08:57:00 2020 -0800 Merge tag 'imx-clk-fixes-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-fixes Pull an i.MX clk fix from Shawn Guo: A fix on i.MX8MN I2C4 and UART1 clock IDs, which clash with PWM2 and PWM3 ID. This bug makes I2C4 and UART1 device in i.MX8MN DT point to PWM2 and PWM3 clock. * tag 'imx-clk-fixes-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: clk: imx8mn: Fix incorrect clock defines commit 93d7c3185893b185e7f4347f8986b9b521254a6e Author: Dongli Zhang Date: Mon Feb 24 10:39:11 2020 -0800 null_blk: remove unused fields in 'nullb_cmd' 'list', 'll_list' and 'csd' are no longer used. The 'list' is not used since it was introduced by commit f2298c0403b0 ("null_blk: multi queue aware block test driver"). The 'll_list' is no longer used since commit 3c395a969acc ("null_blk: set a separate timer for each command"). The 'csd' is no longer used since commit ce2c350b2cfe ("null_blk: use blk_complete_request and blk_mq_complete_request"). Reviewed-by: Bart Van Assche Signed-off-by: Dongli Zhang Signed-off-by: Jens Axboe commit a3ed353cf8015ba84a0407a5dc3ffee038166ab0 Author: Shirish S Date: Mon Jan 27 16:35:24 2020 +0530 amdgpu/gmc_v9: save/restore sdpif regs during S3 fixes S3 issue with IOMMU + S/G enabled @ 64M VRAM. Suggested-by: Alex Deucher Signed-off-by: Shirish S Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 4829f89855f1d3a3d8014e74cceab51b421503db Author: Monk Liu Date: Sat Feb 8 19:01:21 2020 +0800 drm/amdgpu: fix memory leak during TDR test(v2) fix system memory leak v2: fix coding style Signed-off-by: Monk Liu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 3030fd4cb783377eca0e2a3eee63724a5c66ee15 Author: Jens Axboe Date: Tue Feb 25 08:47:30 2020 -0700 io-wq: remove spin-for-work optimization Andres reports that buffered IO seems to suck up more cycles than we would like, and he narrowed it down to the fact that the io-wq workers will briefly spin for more work on completion of a work item. This was a win on the networking side, but apparently some other cases take a hit because of it. Remove the optimization to avoid burning more CPU than we have to for disk IO. Reported-by: Andres Freund Signed-off-by: Jens Axboe commit bdcd3eab2a9ae0ac93f27275b6895dd95e5bf360 Author: Xiaoguang Wang Date: Tue Feb 25 22:12:08 2020 +0800 io_uring: fix poll_list race for SETUP_IOPOLL|SETUP_SQPOLL After making ext4 support iopoll method: let ext4_file_operations's iopoll method be iomap_dio_iopoll(), we found fio can easily hang in fio_ioring_getevents() with below fio job: rm -f testfile; sync; sudo fio -name=fiotest -filename=testfile -iodepth=128 -thread -rw=write -ioengine=io_uring -hipri=1 -sqthread_poll=1 -direct=1 -bs=4k -size=10G -numjobs=8 -runtime=2000 -group_reporting with IORING_SETUP_SQPOLL and IORING_SETUP_IOPOLL enabled. There are two issues that results in this hang, one reason is that when IORING_SETUP_SQPOLL and IORING_SETUP_IOPOLL are enabled, fio does not use io_uring_enter to get completed events, it relies on kernel io_sq_thread to poll for completed events. Another reason is that there is a race: when io_submit_sqes() in io_sq_thread() submits a batch of sqes, variable 'inflight' will record the number of submitted reqs, then io_sq_thread will poll for reqs which have been added to poll_list. But note, if some previous reqs have been punted to io worker, these reqs will won't be in poll_list timely. io_sq_thread() will only poll for a part of previous submitted reqs, and then find poll_list is empty, reset variable 'inflight' to be zero. If app just waits these deferred reqs and does not wake up io_sq_thread again, then hang happens. For app that entirely relies on io_sq_thread to poll completed requests, let io_iopoll_req_issued() wake up io_sq_thread properly when adding new element to poll_list, and when io_sq_thread prepares to sleep, check whether poll_list is empty again, if not empty, continue to poll. Signed-off-by: Xiaoguang Wang Signed-off-by: Jens Axboe commit c780e86dd48ef6467a1146cf7d0fe1e05a635039 Author: Jan Kara Date: Thu Feb 6 15:28:12 2020 +0100 blktrace: Protect q->blk_trace with RCU KASAN is reporting that __blk_add_trace() has a use-after-free issue when accessing q->blk_trace. Indeed the switching of block tracing (and thus eventual freeing of q->blk_trace) is completely unsynchronized with the currently running tracing and thus it can happen that the blk_trace structure is being freed just while __blk_add_trace() works on it. Protect accesses to q->blk_trace by RCU during tracing and make sure we wait for the end of RCU grace period when shutting down tracing. Luckily that is rare enough event that we can afford that. Note that postponing the freeing of blk_trace to an RCU callback should better be avoided as it could have unexpected user visible side-effects as debugfs files would be still existing for a short while block tracing has been shut down. Link: https://bugzilla.kernel.org/show_bug.cgi?id=205711 CC: stable@vger.kernel.org Reviewed-by: Chaitanya Kulkarni Reviewed-by: Ming Lei Tested-by: Ming Lei Reviewed-by: Bart Van Assche Reported-by: Tristan Madani Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit d0820556507bd7aef4f3a615b1b6eb66eb9785fe Author: Stefano Brivio Date: Fri Feb 21 03:11:56 2020 +0100 selftests: nft_concat_range: Move option for 'list ruleset' before command Before nftables commit fb9cea50e8b3 ("main: enforce options before commands"), 'nft list ruleset -a' happened to work, but it's wrong and won't work anymore. Replace it by 'nft -a list ruleset'. Reported-by: Chen Yi Fixes: 611973c1e06f ("selftests: netfilter: Introduce tests for sets with range concatenation") Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit adc10f5b0a03606e30c704cff1f0283a696d0260 Author: Kees Cook Date: Fri Feb 21 16:02:39 2020 -0800 docs: Fix empty parallelism argument When there was no parallelism (no top-level -j arg and a pre-1.7 sphinx-build), the argument passed would be empty ("") instead of just being missing, which would (understandably) badly confuse sphinx-build. Fix this by removing the quotes. Reported-by: Rafael J. Wysocki Fixes: 51e46c7a4007 ("docs, parallelism: Rearrange how jobserver reservations are made") Cc: stable@vger.kernel.org # v5.5 only Signed-off-by: Kees Cook Signed-off-by: Jonathan Corbet commit 53ace1195263b30fd593677dd67559e879ed9aa2 Author: Stephen Kitt Date: Fri Feb 21 21:57:33 2020 +0100 docs: remove MPX from the x86 toc MPX was removed in commit 45fc24e89b7c ("x86/mpx: remove MPX from arch/x86"), this removes the corresponding entry in the x86 toc. This was suggested by a Sphinx warning. Signed-off-by: Stephen Kitt Fixes: 45fc24e89b7cc ("x86/mpx: remove MPX from arch/x86") Acked-by: Dave Hansen Signed-off-by: Jonathan Corbet commit 25962e1a7f1d522f1b57ead2f266fab570042a70 Author: Frieder Schrempf Date: Tue Feb 25 08:23:20 2020 +0000 dmaengine: imx-sdma: Fix the event id check to include RX event for UART6 On i.MX6UL/ULL and i.MX6SX the DMA event id for the RX channel of UART6 is '0'. To fix the broken DMA support for UART6, we change the check for event_id0 to include '0' as a valid id. Fixes: 1ec1e82f2510 ("dmaengine: Add Freescale i.MX SDMA support") Signed-off-by: Frieder Schrempf Reviewed-by: Fabio Estevam Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200225082139.7646-1-frieder.schrempf@kontron.de Signed-off-by: Vinod Koul commit b549c252b1292aea959cd9b83537fcb9384a6112 Author: Tina Zhang Date: Tue Feb 25 13:35:27 2020 +0800 drm/i915/gvt: Fix orphan vgpu dmabuf_objs' lifetime Deleting dmabuf item's list head after releasing its container can lead to KASAN-reported issue: BUG: KASAN: use-after-free in __list_del_entry_valid+0x15/0xf0 Read of size 8 at addr ffff88818a4598a8 by task kworker/u8:3/13119 So fix this issue by puting deleting dmabuf_objs ahead of releasing its container. Fixes: dfb6ae4e14bd6 ("drm/i915/gvt: Handle orphan dmabuf_objs") Signed-off-by: Tina Zhang Reviewed-by: Zhenyu Wang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200225053527.8336-2-tina.zhang@intel.com commit 3234f4ed3066a58cd5ce8edcf752fa4fe0c95cb5 Author: Paul Burton Date: Sat Feb 22 09:04:17 2020 -0800 MAINTAINERS: Hand MIPS over to Thomas My time with MIPS the company has reached its end, and so at best I'll have little time spend on maintaining arch/mips/. Ralf last authored a patch over 2 years ago, the last time he committed one is even further back & activity was sporadic for a while before that. The reality is that he isn't active. Having a new maintainer with time to do things properly will be beneficial all round. Thomas Bogendoerfer has been involved in MIPS development for a long time & has offered to step up as maintainer, so add Thomas and remove myself & Ralf from the MIPS entry. Ralf already has an entry in CREDITS to honor his contributions, so this just adds one for me. Signed-off-by: Paul Burton Reviewed-by: Philippe Mathieu-Daudé Acked-by: Thomas Bogendoerfer Cc: Ralf Baechle Cc: linux-kernel@vger.kernel.org Cc: linux-mips@vger.kernel.org commit c33ee1301c393a241d6424e36eff1071811b1064 Author: Dmitry Osipenko Date: Sun Feb 9 19:33:39 2020 +0300 dmaengine: tegra-apb: Prevent race conditions of tasklet vs free list The interrupt handler puts a half-completed DMA descriptor on a free list and then schedules tasklet to process bottom half of the descriptor that executes client's callback, this creates possibility to pick up the busy descriptor from the free list. Thus, let's disallow descriptor's re-use until it is fully processed. Signed-off-by: Dmitry Osipenko Acked-by: Jon Hunter Cc: Link: https://lore.kernel.org/r/20200209163356.6439-3-digetx@gmail.com Signed-off-by: Vinod Koul commit 94788af4ed039476ff3527b0e6a12c1dc42cb022 Author: Dmitry Osipenko Date: Sun Feb 9 19:33:38 2020 +0300 dmaengine: tegra-apb: Fix use-after-free I was doing some experiments with I2C and noticed that Tegra APB DMA driver crashes sometime after I2C DMA transfer termination. The crash happens because tegra_dma_terminate_all() bails out immediately if pending list is empty, and thus, it doesn't release the half-completed descriptors which are getting re-used before ISR tasklet kicks-in. tegra-i2c 7000c400.i2c: DMA transfer timeout elants_i2c 0-0010: elants_i2c_irq: failed to read data: -110 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 142 at lib/list_debug.c:45 __list_del_entry_valid+0x45/0xac list_del corruption, ddbaac44->next is LIST_POISON1 (00000100) Modules linked in: CPU: 0 PID: 142 Comm: kworker/0:2 Not tainted 5.5.0-rc2-next-20191220-00175-gc3605715758d-dirty #538 Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) Workqueue: events_freezable_power_ thermal_zone_device_check [] (unwind_backtrace) from [] (show_stack+0x11/0x14) [] (show_stack) from [] (dump_stack+0x85/0x94) [] (dump_stack) from [] (__warn+0xc1/0xc4) [] (__warn) from [] (warn_slowpath_fmt+0x61/0x78) [] (warn_slowpath_fmt) from [] (__list_del_entry_valid+0x45/0xac) [] (__list_del_entry_valid) from [] (tegra_dma_tasklet+0x5b/0x154) [] (tegra_dma_tasklet) from [] (tasklet_action_common.constprop.0+0x41/0x7c) [] (tasklet_action_common.constprop.0) from [] (__do_softirq+0xd3/0x2a8) [] (__do_softirq) from [] (irq_exit+0x7b/0x98) [] (irq_exit) from [] (__handle_domain_irq+0x45/0x80) [] (__handle_domain_irq) from [] (gic_handle_irq+0x45/0x7c) [] (gic_handle_irq) from [] (__irq_svc+0x65/0x94) Exception stack(0xde2ebb90 to 0xde2ebbd8) Signed-off-by: Dmitry Osipenko Acked-by: Jon Hunter Cc: Link: https://lore.kernel.org/r/20200209163356.6439-2-digetx@gmail.com Signed-off-by: Vinod Koul commit 3d2ed431b8f39483477bc3c3a2aefbc9778ffe12 Author: Phong LE Date: Wed Feb 19 15:13:24 2020 +0100 drm/mediatek: Handle component type MTK_DISP_OVL_2L correctly The larb device remains NULL if the type is MTK_DISP_OVL_2L. A kernel panic is raised when a crtc uses mtk_smi_larb_get or mtk_smi_larb_put. Fixes: b17bdd0d7a73 ("drm/mediatek: add component OVL_2L0") Signed-off-by: Phong LE Signed-off-by: CK Hu commit 01e99aeca3979600302913cef3f89076786f32c8 Author: Ming Lei Date: Tue Feb 25 09:04:32 2020 +0800 blk-mq: insert passthrough request into hctx->dispatch directly For some reason, device may be in one situation which can't handle FS request, so STS_RESOURCE is always returned and the FS request will be added to hctx->dispatch. However passthrough request may be required at that time for fixing the problem. If passthrough request is added to scheduler queue, there isn't any chance for blk-mq to dispatch it given we prioritize requests in hctx->dispatch. Then the FS IO request may never be completed, and IO hang is caused. So passthrough request has to be added to hctx->dispatch directly for fixing the IO hang. Fix this issue by inserting passthrough request into hctx->dispatch directly together withing adding FS request to the tail of hctx->dispatch in blk_mq_dispatch_rq_list(). Actually we add FS request to tail of hctx->dispatch at default, see blk_mq_request_bypass_insert(). Then it becomes consistent with original legacy IO request path, in which passthrough request is always added to q->queue_head. Cc: Dongli Zhang Cc: Christoph Hellwig Cc: Ewan D. Milne Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 3614d05b5e6baf487e88fb114d884da172edd61a Merge: 823d81b0fa2c 253216ffb2a0 Author: David S. Miller Date: Mon Feb 24 15:43:38 2020 -0800 Merge tag 'mac80211-for-net-2020-02-24' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg ==================== A few fixes: * remove a double mutex-unlock * fix a leak in an error path * NULL pointer check * include if_vlan.h where needed * avoid RCU list traversal when not under RCU ==================== Signed-off-by: David S. Miller commit 756125289285f6e55a03861bf4b6257aa3d19a93 Author: Paul Moore Date: Mon Feb 24 16:38:57 2020 -0500 audit: always check the netlink payload length in audit_receive_msg() This patch ensures that we always check the netlink payload length in audit_receive_msg() before we take any action on the payload itself. Cc: stable@vger.kernel.org Reported-by: syzbot+399c44bf1f43b8747403@syzkaller.appspotmail.com Reported-by: syzbot+e4b12d8d202701f08b6d@syzkaller.appspotmail.com Signed-off-by: Paul Moore commit 8458ca147c204e7db124e8baa8fede219006e80d Author: Zong Li Date: Fri Feb 7 17:52:45 2020 +0800 riscv: adjust the indent Adjust the indent to match Linux coding style. Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt commit a0a31fd84f8f66828790d860545d4167777d58c6 Author: Zong Li Date: Fri Feb 7 17:52:44 2020 +0800 riscv: allocate a complete page size for each page table Each page table should be created by allocating a complete page size for it. Otherwise, the content of the page table would be corrupted somewhere through memory allocation which allocates the memory at the middle of the page table for other use. Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt commit 8308a09e87d2cb51adb186dc7d5a5c1913fb0758 Author: Amadeusz Sławiński Date: Mon Feb 24 07:52:02 2020 -0500 ASoC: Intel: Skylake: Fix available clock counter incrementation Incrementation of avail_clk_cnt was incorrectly moved to error path. Put it back to success path. Fixes: 6ee927f2f01466 ('ASoC: Intel: Skylake: Fix NULL ptr dereference when unloading clk dev') Signed-off-by: Amadeusz Sławiński Reviewed-by: Cezary Rojewski Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200224125202.13784-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown commit 1c5312308c96556ae209e8eb1423c38d4a113759 Author: Kuninori Morimoto Date: Fri Feb 21 10:25:18 2020 +0900 ASoC: soc-pcm/soc-compress: don't use snd_soc_dapm_stream_stop() commit b0edff42360ab4 ("ASoC: soc-pcm/soc-compress: use snd_soc_dapm_stream_stop() for SND_SOC_DAPM_STREAM_STOP") uses snd_soc_dapm_stream_stop() for soc_compr_free_fe() and dpcm_fe_dai_shutdown() because it didn't care about pmdown_time. But, it didn't need to care. This patch rollback to original code. Some system will wait unneeded timed-out without this patch. Special Thanks for reporting to Chris Gorman. ... intel_sst_acpi 808622A8:00: Wait timed-out condition:0x0, msg_id:0x1 fw_state 0x3 intel_sst_acpi 808622A8:00: fw returned err -16 sst-mfld-platform sst-mfld-platform: ASoC: PRE_PMD: pcm0_in event failed: -16 ... Fixes: commit b0edff42360ab4 ("ASoC: soc-pcm/soc-compress: use snd_soc_dapm_stream_stop() for SND_SOC_DAPM_STREAM_STOP") Reported-by: Chris Gorman Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lfowspeb.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit fb4b5f13464c468a9c10ae1ab8ba9aa352d0256a Author: Joe Perches Date: Fri Feb 21 05:20:45 2020 -0800 cifs: Use #define in cifs_dbg All other uses of cifs_dbg use defines so change this one. Signed-off-by: Joe Perches Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 86f740f2aed5ea7fe1aa86dc2df0fb4ab0f71088 Author: Aurelien Aptel Date: Fri Feb 21 11:19:06 2020 +0100 cifs: fix rename() by ensuring source handle opened with DELETE bit To rename a file in SMB2 we open it with the DELETE access and do a special SetInfo on it. If the handle is missing the DELETE bit the server will fail the SetInfo with STATUS_ACCESS_DENIED. We currently try to reuse any existing opened handle we have with cifs_get_writable_path(). That function looks for handles with WRITE access but doesn't check for DELETE, making rename() fail if it finds a handle to reuse. Simple reproducer below. To select handles with the DELETE bit, this patch adds a flag argument to cifs_get_writable_path() and find_writable_file() and the existing 'bool fsuid_only' argument is converted to a flag. The cifsFileInfo struct only stores the UNIX open mode but not the original SMB access flags. Since the DELETE bit is not mapped in that mode, this patch stores the access mask in cifs_fid on file open, which is accessible from cifsFileInfo. Simple reproducer: #include #include #include #include #include #include #define E(s) perror(s), exit(1) int main(int argc, char *argv[]) { int fd, ret; if (argc != 3) { fprintf(stderr, "Usage: %s A B\n" "create&open A in write mode, " "rename A to B, close A\n", argv[0]); return 0; } fd = openat(AT_FDCWD, argv[1], O_WRONLY|O_CREAT|O_SYNC, 0666); if (fd == -1) E("openat()"); ret = rename(argv[1], argv[2]); if (ret) E("rename()"); ret = close(fd); if (ret) E("close()"); return ret; } $ gcc -o bugrename bugrename.c $ ./bugrename /mnt/a /mnt/b rename(): Permission denied Fixes: 8de9e86c67ba ("cifs: create a helper to find a writeable handle by path name") CC: Stable Signed-off-by: Aurelien Aptel Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky Reviewed-by: Paulo Alcantara (SUSE) commit ec57010acd03428a749d2600bf09bd537eaae993 Author: Steve French Date: Wed Feb 19 23:59:32 2020 -0600 cifs: add missing mount option to /proc/mounts We were not displaying the mount option "signloosely" in /proc/mounts for cifs mounts which some users found confusing recently Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit 154255233830e1e4dd0d99ac929a5dce588c0b81 Author: Paulo Alcantara (SUSE) Date: Thu Feb 20 19:49:35 2020 -0300 cifs: fix potential mismatch of UNC paths Ensure that full_path is an UNC path that contains '\\' as delimiter, which is required by cifs_build_devname(). The build_path_from_dentry_optional_prefix() function may return a path with '/' as delimiter when using SMB1 UNIX extensions, for example. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French Acked-by: Ronnie Sahlberg commit fc513fac56e1b626ae48a74d7551d9c35c50129e Author: Ronnie Sahlberg Date: Wed Feb 19 06:01:03 2020 +1000 cifs: don't leak -EAGAIN for stat() during reconnect If from cifs_revalidate_dentry_attr() the SMB2/QUERY_INFO call fails with an error, such as STATUS_SESSION_EXPIRED, causing the session to be reconnected it is possible we will leak -EAGAIN back to the application even for system calls such as stat() where this is not a valid error. Fix this by re-trying the operation from within cifs_revalidate_dentry_attr() if cifs_get_inode_info*() returns -EAGAIN. This fixes stat() and possibly also other system calls that uses cifs_revalidate_dentry*(). Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky Reviewed-by: Aurelien Aptel CC: Stable commit 03264ddde2453f6877a7d637d84068079632a3c5 Author: Adam Williamson Date: Wed Feb 19 17:50:07 2020 +0100 scsi: compat_ioctl: cdrom: Replace .ioctl with .compat_ioctl in four appropriate places Arnd Bergmann inadvertently typoed these in d320a9551e394 and 64cbfa96551a; they seem to be the cause of https://bugzilla.redhat.com/show_bug.cgi?id=1801353 , invalid SCSI commands when udev tries to query a DVD drive. [arnd] Found another instance of the same bug, also introduced in my compat_ioctl series. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1801353 Link: https://lore.kernel.org/r/20200219165139.3467320-1-arnd@arndb.de Fixes: c103d6ee69f9 ("compat_ioctl: ide: floppy: add handler") Fixes: 64cbfa96551a ("compat_ioctl: move cdrom commands into cdrom.c") Fixes: d320a9551e39 ("compat_ioctl: scsi: move ioctl handling into drivers") Bisected-by: Chris Murphy Signed-off-by: Arnd Bergmann Signed-off-by: Adam Williamson Signed-off-by: Martin K. Petersen commit 63623fd44972d1ed2bfb6e0fb631dfcf547fd1e7 Merge: 7031ecffab86 a93236fcbe1d Author: Linus Torvalds Date: Mon Feb 24 11:48:17 2020 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Bugfixes, including the fix for CVE-2020-2732 and a few issues found by 'make W=1'" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: s390: rstify new ioctls in api.rst KVM: nVMX: Check IO instruction VM-exit conditions KVM: nVMX: Refactor IO bitmap checks into helper function KVM: nVMX: Don't emulate instructions in guest mode KVM: nVMX: Emulate MTF when performing instruction emulation KVM: fix error handling in svm_hardware_setup KVM: SVM: Fix potential memory leak in svm_cpu_init() KVM: apic: avoid calculating pending eoi from an uninitialized val KVM: nVMX: clear PIN_BASED_POSTED_INTR from nested pinbased_ctls only when apicv is globally disabled KVM: nVMX: handle nested posted interrupts when apicv is disabled for L1 kvm: x86: svm: Fix NULL pointer dereference when AVIC not enabled KVM: VMX: Add VMX_FEATURE_USR_WAIT_PAUSE KVM: nVMX: Hold KVM's srcu lock when syncing vmcs12->shadow KVM: x86: don't notify userspace IOAPIC on edge-triggered interrupt EOI kvm/emulate: fix a -Werror=cast-function-type KVM: x86: fix incorrect comparison in trace event KVM: nVMX: Fix some obsolete comments and grammar error KVM: x86: fix missing prototypes KVM: x86: enable -Werror commit 7031ecffab86199c2c688f7a723d03dfa6910fa6 Merge: bc570c14b260 c9cc0517bba9 Author: Linus Torvalds Date: Mon Feb 24 11:40:23 2020 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: "This fixes a Kconfig-related build error and an integer overflow in chacha20poly1305" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: chacha20poly1305 - prevent integer overflow on large input tee: amdtee: amdtee depends on CRYPTO_DEV_CCP_DD commit bc570c14b260946a66e13882eace862dc6eb16f8 Merge: 2e90ca68b0d2 bf4498ad3f9a Author: Linus Torvalds Date: Mon Feb 24 11:32:15 2020 -0800 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull tmpfs fix from Al Viro: "Regression from fs_parse series this cycle..." * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: tmpfs: deny and force are not huge mount options commit 2e90ca68b0d2f5548804f22f0dd61145516171e3 Author: Linus Torvalds Date: Fri Feb 21 12:43:35 2020 -0800 floppy: check FDC index for errors before assigning it Jordy Zomer reported a KASAN out-of-bounds read in the floppy driver in wait_til_ready(). Which on the face of it can't happen, since as Willy Tarreau points out, the function does no particular memory access. Except through the FDCS macro, which just indexes a static allocation through teh current fdc, which is always checked against N_FDC. Except the checking happens after we've already assigned the value. The floppy driver is a disgrace (a lot of it going back to my original horrd "design"), and has no real maintainer. Nobody has the hardware, and nobody really cares. But it still gets used in virtual environment because it's one of those things that everybody supports. The whole thing should be re-written, or at least parts of it should be seriously cleaned up. The 'current fdc' index, which is used by the FDCS macro, and which is often shadowed by a local 'fdc' variable, is a prime example of how not to write code. But because nobody has the hardware or the motivation, let's just fix up the immediate problem with a nasty band-aid: test the fdc index before actually assigning it to the static 'fdc' variable. Reported-by: Jordy Zomer Cc: Willy Tarreau Cc: Dan Carpenter Signed-off-by: Linus Torvalds commit 823d81b0fa2cd83a640734e74caee338b5d3c093 Author: Nikolay Aleksandrov Date: Mon Feb 24 18:46:22 2020 +0200 net: bridge: fix stale eth hdr pointer in br_dev_xmit In br_dev_xmit() we perform vlan filtering in br_allowed_ingress() but if the packet has the vlan header inside (e.g. bridge with disabled tx-vlan-offload) then the vlan filtering code will use skb_vlan_untag() to extract the vid before filtering which in turn calls pskb_may_pull() and we may end up with a stale eth pointer. Moreover the cached eth header pointer will generally be wrong after that operation. Remove the eth header caching and just use eth_hdr() directly, the compiler does the right thing and calculates it only once so we don't lose anything. Fixes: 057658cb33fb ("bridge: suppress arp pkts on BR_NEIGH_SUPPRESS ports") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit e4686c2d08ea1a45c262af5269c2aa6b977b85e2 Merge: 6132c1d9033d 1d63b8d66d14 Author: David S. Miller Date: Mon Feb 24 10:58:57 2020 -0800 Merge branch 'net-ll_temac-Bugfixes' Esben Haabendal says: ==================== net: ll_temac: Bugfixes Fix a number of bugs which have been present since the first commit. The bugs fixed in patch 1,2 and 4 have all been observed in real systems, and was relatively easy to reproduce given an appropriate stress setup. Changes since v1: - Changed error handling of of dma_map_single() in temac_start_xmit() to drop packet instead of returning NETDEV_TX_BUSY. ==================== Signed-off-by: David S. Miller commit 1d63b8d66d146deaaedbe16c80de105f685ea012 Author: Esben Haabendal Date: Fri Feb 21 07:47:58 2020 +0100 net: ll_temac: Handle DMA halt condition caused by buffer underrun The SDMA engine used by TEMAC halts operation when it has finished processing of the last buffer descriptor in the buffer ring. Unfortunately, no interrupt event is generated when this happens, so we need to setup another mechanism to make sure DMA operation is restarted when enough buffers have been added to the ring. Fixes: 92744989533c ("net: add Xilinx ll_temac device driver") Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller commit 770d9c67974c4c71af4beb786dc43162ad2a15ba Author: Esben Haabendal Date: Fri Feb 21 07:47:45 2020 +0100 net: ll_temac: Fix RX buffer descriptor handling on GFP_ATOMIC pressure Failures caused by GFP_ATOMIC memory pressure have been observed, and due to the missing error handling, results in kernel crash such as [1876998.350133] kernel BUG at mm/slub.c:3952! [1876998.350141] invalid opcode: 0000 [#1] PREEMPT SMP PTI [1876998.350147] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 5.3.0-scnxt #1 [1876998.350150] Hardware name: N/A N/A/COMe-bIP2, BIOS CCR2R920 03/01/2017 [1876998.350160] RIP: 0010:kfree+0x1ca/0x220 [1876998.350164] Code: 85 db 74 49 48 8b 95 68 01 00 00 48 31 c2 48 89 10 e9 d7 fe ff ff 49 8b 04 24 a9 00 00 01 00 75 0b 49 8b 44 24 08 a8 01 75 02 <0f> 0b 49 8b 04 24 31 f6 a9 00 00 01 00 74 06 41 0f b6 74 24 5b [1876998.350172] RSP: 0018:ffffc900000f0df0 EFLAGS: 00010246 [1876998.350177] RAX: ffffea00027f0708 RBX: ffff888008d78000 RCX: 0000000000391372 [1876998.350181] RDX: 0000000000000000 RSI: ffffe8ffffd01400 RDI: ffff888008d78000 [1876998.350185] RBP: ffff8881185a5d00 R08: ffffc90000087dd8 R09: 000000000000280a [1876998.350189] R10: 0000000000000002 R11: 0000000000000000 R12: ffffea0000235e00 [1876998.350193] R13: ffff8881185438a0 R14: 0000000000000000 R15: ffff888118543870 [1876998.350198] FS: 0000000000000000(0000) GS:ffff88811f300000(0000) knlGS:0000000000000000 [1876998.350203] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 s#1 Part1 [1876998.350206] CR2: 00007f8dac7b09f0 CR3: 000000011e20a006 CR4: 00000000001606e0 [1876998.350210] Call Trace: [1876998.350215] [1876998.350224] ? __netif_receive_skb_core+0x70a/0x920 [1876998.350229] kfree_skb+0x32/0xb0 [1876998.350234] __netif_receive_skb_core+0x70a/0x920 [1876998.350240] __netif_receive_skb_one_core+0x36/0x80 [1876998.350245] process_backlog+0x8b/0x150 [1876998.350250] net_rx_action+0xf7/0x340 [1876998.350255] __do_softirq+0x10f/0x353 [1876998.350262] irq_exit+0xb2/0xc0 [1876998.350265] do_IRQ+0x77/0xd0 [1876998.350271] common_interrupt+0xf/0xf [1876998.350274] In order to handle such failures more graceful, this change splits the receive loop into one for consuming the received buffers, and one for allocating new buffers. When GFP_ATOMIC allocations fail, the receive will continue with the buffers that is still there, and with the expectation that the allocations will succeed in a later call to receive. Fixes: 92744989533c ("net: add Xilinx ll_temac device driver") Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller commit d07c849cd2b97d6809430dfb7e738ad31088037a Author: Esben Haabendal Date: Fri Feb 21 07:47:33 2020 +0100 net: ll_temac: Add more error handling of dma_map_single() calls This adds error handling to the remaining dma_map_single() calls, so that behavior is well defined if/when we run out of DMA memory. Fixes: 92744989533c ("net: add Xilinx ll_temac device driver") Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller commit 84823ff80f7403752b59e00bb198724100dc611c Author: Esben Haabendal Date: Fri Feb 21 07:47:21 2020 +0100 net: ll_temac: Fix race condition causing TX hang It is possible that the interrupt handler fires and frees up space in the TX ring in between checking for sufficient TX ring space and stopping the TX queue in temac_start_xmit. If this happens, the queue wake from the interrupt handler will occur before the queue is stopped, causing a lost wakeup and the adapter's transmit hanging. To avoid this, after stopping the queue, check again whether there is sufficient space in the TX ring. If so, wake up the queue again. This is a port of the similar fix in axienet driver, commit 7de44285c1f6 ("net: axienet: Fix race condition causing TX hang"). Fixes: 23ecc4bde21f ("net: ll_temac: fix checksum offload logic") Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller commit a93236fcbe1d0248461b29c0f87cb0b510c94e6f Author: Christian Borntraeger Date: Mon Feb 24 11:15:59 2020 +0100 KVM: s390: rstify new ioctls in api.rst We also need to rstify the new ioctls that we added in parallel to the rstification of the kvm docs. Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit a40df28c5640f13405f5617aff3e985f7e72cde7 Author: Mauro Carvalho Chehab Date: Sun Feb 23 09:59:53 2020 +0100 docs: dt: fix several broken doc references There are several DT doc references that require manual fixes. I found 3 cases fixed on this patch: - directory named "binding/" instead of "bindings/"; - .txt to .yaml renames; - file renames (still on txt format); Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Miquel Raynal Reviewed-by: Jérôme Pouiller Acked-by: Mark Brown Signed-off-by: Rob Herring commit 54b3719d82e0816271e35579a9967b8a3b42296d Author: Mauro Carvalho Chehab Date: Sat Feb 22 10:00:02 2020 +0100 docs: dt: fix several broken references due to renames Several DT references got broken due to txt->yaml conversion. Those are auto-fixed by running: scripts/documentation-file-ref-check --fix Signed-off-by: Mauro Carvalho Chehab Acked-by: Andrew Jeffery Reviewed-by: Dan Murphy Reviewed-by: Amit Kucheria Signed-off-by: Rob Herring commit f1e4920fe3303aa983073197bcbc97d6c6119ba7 Merge: 515fa3ee9de2 f10e58a5d20e Author: Olof Johansson Date: Mon Feb 24 09:57:04 2020 -0800 Merge tag 'imx-fixes-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.6: - Build v7_cpu_resume() unconditionally to fix system hang in case that suspend is disabled but cpuidle support is enabled. - Drop unexisting Ethernet PHY device from imx8qxp-mek board. - Fix SRAM compatible strings on imx6dl-colibri-eval-v3 board. - Fix imx-scu driver to make sure that all messages words are written sequentially. - A series from Leonard Crestez to fix i.MX SC API users, having all messages aligned on 4 bytes. - Fix eMMC supply for phycore-som board. - Drop bogus frequency setting from imx7-colibri SD/MMC device, so that HS200 mode starts working and delivers better performance. - Fix opp-supported-hw for i.MX7D to get consumer and industrial parts work with correct frequency settings. - Restore MDIO compatible to the correct one for LS1021A SoC. * tag 'imx-fixes-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx-scu: Align imx sc msg structs to 4 firmware: imx: Align imx_sc_msg_req_cpu_start to 4 firmware: imx: scu-pd: Align imx sc msg structs to 4 firmware: imx: misc: Align imx sc msg structs to 4 firmware: imx: scu: Ensure sequential TX ARM: dts: imx7-colibri: Fix frequency for sd/mmc arm64: dts: imx8qxp-mek: Remove unexisting Ethernet PHY ARM: dts: imx6dl-colibri-eval-v3: fix sram compatible properties ARM: dts: ls1021a: Restore MDIO compatible to gianfar ARM: dts: imx7d: fix opp-supported-hw ARM: imx: build v7_cpu_resume() unconditionally ARM: dts: imx6: phycore-som: fix emmc supply Link: https://lore.kernel.org/r/20200224120334.GH27688@dragon Signed-off-by: Olof Johansson commit 515fa3ee9de2b1543250ae47685e1b7e05a7a8ef Merge: 0e26cbdfb32e 10dc62d0ae41 Author: Olof Johansson Date: Mon Feb 24 09:54:10 2020 -0800 Merge tag 'omap-for-v5.6/droid4-lcd-fix-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Fix LCD backlight issue for droid4 There was a bit of an integration glitch with the LED backlight series. The LED related parts got merged into v5.6-rc1, but the actual backlight driver got left out. This caused an issue on at least droid4 where the LCD backlight can not yet be enabled automatically. And the LCD backlight can no longer be enabled manually either via sysfs. The integration glitch happened because some pending comments from me. There was some confusion on which device tree property we should use for the default brightness property. After discussing how to fix this on the mailing lists, we came to the conclusion that it's best to fix this issue properly by adding the missing driver. The other solutions would mean backpedaling and try to come up with some temporary solution that really does not solve the issue for users. The patch for led_bl.c has been around for quite a while and tested by many users and was assumed to be merged as part of the LED backlight series. For the brightness property to use, we ended up using the more common "default-brightness-level" rather than "default-brightness" used by some backlight drivers. * tag 'omap-for-v5.6/droid4-lcd-fix-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: droid4: Configure LED backlight for lm3532 backlight: add led-backlight driver Link: https://lore.kernel.org/r/pull-1582303901-96693@atomide.com Signed-off-by: Olof Johansson commit 0e26cbdfb32ed5bb65ca4640716c62129865b59c Merge: 3bf3c9744694 b460e0a9e240 Author: Olof Johansson Date: Mon Feb 24 09:53:00 2020 -0800 Merge tag 'reset-fixes-for-v5.6' of git://git.pengutronix.de/git/pza/linux into arm/fixes Reset controller fixes for v5.6 Fix the intel,rcu-gw binding schema for the intel,global-reset property, fix whitespace in the MAINTAINERS keyword entry, and add missing CONFIG_HAS_IOMEM dependency to CONFIG_RESET_INTEL_GW and CONFIG_RESET_BRCMSTB_RESCAL. * tag 'reset-fixes-for-v5.6' of git://git.pengutronix.de/git/pza/linux: reset: intel: add unspecified HAS_IOMEM dependency reset: brcmstb-rescal: add unspecified HAS_IOMEM dependency MAINTAINERS: fix style in RESET CONTROLLER FRAMEWORK dt-bindings: reset: intel,rcu-gw: Fix intel,global-reset schema Link: https://lore.kernel.org/r/e6eaa409883cbae8d1e818b732b98c3362635712.camel@pengutronix.de Signed-off-by: Olof Johansson commit a3fd4bfe85fbb67cf4ec1232d0af625ece3c508b Author: Benjamin Block Date: Wed Feb 19 16:09:25 2020 +0100 scsi: zfcp: fix wrong data and display format of SFP+ temperature When implementing support for retrieval of local diagnostic data from the FCP channel, the wrong data format was assumed for the temperature of the local SFP+ connector. The Fibre Channel Link Services (FC-LS-3) specification is not clear on the format of the stored integer, and only after consulting the SNIA specification SFF-8472 did we realize it is stored as two's complement. Thus, the used data and display format is wrong, and highly misleading for users when the temperature should drop below 0°C (however unlikely that may be). To fix this, change the data format in `struct fsf_qtcb_bottom_port` from unsigned to signed, and change the printf format string used to generate `zfcp_sysfs_adapter_diag_sfp_temperature_show()` from `%hu` to `%hd`. Link: https://lore.kernel.org/r/d6e3be5428da5c9490cfff4df7cae868bc9f1a7e.1582039501.git.bblock@linux.ibm.com Fixes: a10a61e807b0 ("scsi: zfcp: support retrieval of SFP Data via Exchange Port Data") Fixes: 6028f7c4cd87 ("scsi: zfcp: introduce sysfs interface for diagnostics of local SFP transceiver") Cc: # 5.5+ Reviewed-by: Jens Remus Reviewed-by: Fedor Loshakov Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 51fdaa0490241e8cd41b40cbf43a336d1a014460 Author: Damien Le Moal Date: Wed Feb 19 15:38:00 2020 +0900 scsi: sd_sbc: Fix sd_zbc_report_zones() The block layer generic blk_revalidate_disk_zones() checks the validity of zone descriptors reported by a disk using the blk_revalidate_zone_cb() callback function executed for each zone descriptor. If a ZBC disk reports invalid zone descriptors, blk_revalidate_disk_zones() returns an error and sd_zbc_read_zones() changes the disk capacity to 0, which in turn results in the gendisk structure capacity to be set to 0. This all works well for the first revalidate pass on a disk and the block layer detects the capactiy change. On the second revalidate pass, blk_revalidate_disk_zones() is called again and sd_zbc_report_zones() executed to check the zones a second time. However, for this second pass, the gendisk capacity is now 0, which results in sd_zbc_report_zones() to do nothing and to report success and no zones. blk_revalidate_disk_zones() in turn returns success and sets the disk queue chunk_sectors limit with zero as no zones were checked, causing a oops to trigger on the BUG_ON(!is_power_of_2(chunk_sectors)) in blk_queue_chunk_sectors(). Fix this by using the sdkp capacity field rather than the gendisk capacity for the report zones loop in sd_zbc_report_zones(). Also add a check to return immediately an error if the sdkp capacity is 0. With this fix, invalid/buggy ZBC disk scan does not trigger a oops and are exposed with a 0 capacity. This change also preserve the chance for the disk to be correctly revalidated on the second revalidate pass as the scsi disk structure capacity field is always set to the disk reported value when sd_zbc_report_zones() is called. Link: https://lore.kernel.org/r/20200219063800.880834-1-damien.lemoal@wdc.com Fixes: d41003513e61 ("block: rework zone reporting") Cc: Cc: # v5.5 Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit d288bddd8374e0a043ac9dde64a1ae6a09411d74 Author: Martin Fuzzey Date: Wed Jan 29 14:40:06 2020 +0100 dmaengine: imx-sdma: fix context cache There is a DMA problem with the serial ports on i.MX6. When the following sequence is performed: 1) Open a port 2) Write some data 3) Close the port 4) Open a *different* port 5) Write some data 6) Close the port The second write sends nothing and the second close hangs. If the first close() is omitted it works. Adding logs to the the UART driver shows that the DMA is being setup but the callback is never invoked for the second write. This used to work in 4.19. Git bisect leads to: ad0d92d: "dmaengine: imx-sdma: refine to load context only once" This commit adds a "context_loaded" flag used to avoid unnecessary context setups. However the flag is only reset in sdma_channel_terminate_work(), which is only invoked in a worker triggered by sdma_terminate_all() IF there is an active descriptor. So, if no active descriptor remains when the channel is terminated, the flag is not reset and, when the channel is later reused the old context is used. Fix the problem by always resetting the flag in sdma_free_chan_resources(). Cc: stable@vger.kernel.org Signed-off-by: Martin Fuzzey Fixes: ad0d92d7ba6a ("dmaengine: imx-sdma: refine to load context only once") Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/1580305274-27274-1-git-send-email-martin.fuzzey@flowbird.group Signed-off-by: Vinod Koul commit 3104abd1161bd9cfcad91a29fea72b87d813cf48 Author: Lukas Bulwahn Date: Sun Feb 23 10:09:50 2020 +0100 MAINTAINERS: clean up PCIE DRIVER FOR CAVIUM THUNDERX Commit e1ac611f57c9 ("dt-bindings: PCI: Convert generic host binding to DT schema") combines all information from pci-thunder-{pem,ecam}.txt into host-generic-pci.yaml, and deleted the two files in Documentation/devicetree/bindings/pci/. Since then, ./scripts/get_maintainer.pl --self-test complains: no file matches F: Documentation/devicetree/bindings/pci/pci-thunder-* As the PCIE DRIVER FOR CAVIUM THUNDERX-relevant information is only a small part of the host-generic-pci.yaml, do not add this file to the PCIE DRIVER FOR CAVIUM THUNDERX entry, and only drop the reference to the removed files. Signed-off-by: Lukas Bulwahn Acked-by: Robert Richter Signed-off-by: Rob Herring commit 50e7e7f6f2d040dd16a636f408eab9184abc63f8 Author: Dave Jiang Date: Wed Feb 19 10:24:56 2020 -0700 dmaengine: idxd: wq size configuration needs to check global max size The current size_store() function for idxd sysfs does not check the total wq size. This allows configuration of all wqs with total wq size. Add check to make sure the wq sysfs attribute rejects storing of size over the total wq size. Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver") Reported-by: Jerry Chen Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/158213309629.2509.3583411832507185041.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 88402c5b1ba7498217027c8a54e8df61d030500c Author: Dave Jiang Date: Wed Feb 19 10:24:08 2020 -0700 dmaengine: idxd: sysfs input of wq incorrect wq type should return error Currently when inputing an unrecognized wq type, we set the wq type to "none". It really should return error and not change the existing wq type that's in the kernel. Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver") Reported-by: Yixin Zhang Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/158213304803.2290.13336343633425868211.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 36d5d22090d13fd3a7a8c9663a711cbe6970aac8 Author: Dan Carpenter Date: Mon Feb 17 17:40:50 2020 +0300 dmaengine: coh901318: Fix a double lock bug in dma_tc_handle() The caller is already holding the lock so this will deadlock. Fixes: 0b58828c923e ("DMAENGINE: COH 901 318 remove irq counting") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200217144050.3i4ymbytogod4ijn@kili.mountain Signed-off-by: Vinod Koul commit 41726c9a50e7464beca7112d0aebf3a0090c62d2 Author: Jens Axboe Date: Sun Feb 23 13:11:42 2020 -0700 io_uring: fix personality idr leak We somehow never free the idr, even though we init it for every ctx. Free it when the rest of the ring data is freed. Fixes: 071698e13ac6 ("io_uring: allow registering credentials") Reviewed-by: Stefano Garzarella Signed-off-by: Jens Axboe commit fbb30168c7395b9cfeb9e6f7b0c0bca854a6552d Author: John Bates Date: Thu Feb 20 14:53:19 2020 -0800 drm/virtio: fix resource id creation race The previous code was not thread safe and caused undefined behavior from spurious duplicate resource IDs. In this patch, an atomic_t is used instead. We no longer see any duplicate IDs in tests with this change. Fixes: 16065fcdd19d ("drm/virtio: do NOT reuse resource ids") Signed-off-by: John Bates Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20200220225319.45621-1-jbates@chromium.org Signed-off-by: Gerd Hoffmann commit d171c45da874e3858a83e6377e00280a507fe2f2 Author: Ezequiel Garcia Date: Tue Feb 4 20:38:37 2020 +0100 media: hantro: Fix broken media controller links The driver currently creates a broken topology, with a source-to-source link and a sink-to-sink link instead of two source-to-sink links. Reported-by: Nicolas Dufresne Cc: # for v5.3 and up Signed-off-by: Ezequiel Garcia Tested-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 044041cd5227ec9ccf969f4bf1cc08bffe13b9d3 Author: Hans Verkuil Date: Tue Feb 4 19:19:22 2020 +0100 media: mc-entity.c: use & to check pad flags, not == These are bits so to test if a pad is a sink you use & but not ==. It looks like the only reason this hasn't caused problems before is that media_get_pad_index() is currently only used with pads that do not set the MEDIA_PAD_FL_MUST_CONNECT flag. So a pad really had only the SINK or SOURCE flag set and nothing else. Signed-off-by: Hans Verkuil Cc: # for v5.3 and up Signed-off-by: Mauro Carvalho Chehab commit 316e730f1d8bb029fe6cec2468fb2a50424485b3 Author: Hans Verkuil Date: Tue Feb 4 19:13:06 2020 +0100 media: v4l2-mem2mem.c: fix broken links The topology that v4l2_m2m_register_media_controller() creates for a processing block actually created a source-to-source link and a sink-to-sink link instead of two source-to-sink links. Unfortunately v4l2-compliance never checked for such bad links, so this went unreported for quite some time. Signed-off-by: Hans Verkuil Reported-by: Nicolas Dufresne Cc: # for v4.19 and up Signed-off-by: Mauro Carvalho Chehab commit 49a56266f96f2c6608373464af8755b431ef1513 Author: Hans Verkuil Date: Tue Feb 4 13:45:04 2020 +0100 media: vicodec: process all 4 components for RGB32 formats Only ARGB32-type pixelformat were assumed to have 4 components, which is wrong since RGB32-type pixelformats may have an alpha channel, so they should also assume 4 color components. The XRGB32-type pixelformats really have only 3 color components, but this complicated matters since that creates strides that are sometimes width * 3 and sometimes width * 4, and in fact this can result in buffer overflows. Keep things simple by just always processing all 4 color components. In the future we might want to optimize this again for the XRGB32-type pixelformats, but for now keep it simple and robust. Signed-off-by: Hans Verkuil Cc: # for v5.4 and up Signed-off-by: Mauro Carvalho Chehab commit aa9eda76129c9f44c4dd7e233b04bc70c0f56e12 Author: Hans Verkuil Date: Fri Jan 24 15:52:38 2020 +0100 media: pulse8-cec: close serio in disconnect, not adap_free The serio_close() call was moved to pulse8_cec_adap_free(), but that can be too late if that is called after the serio core pulled down the serio already, in which case you get a kernel oops. Keep it in the disconnect(). Signed-off-by: Hans Verkuil Fixes: 601282d65b96 ("media: pulse8-cec: use adap_free callback") Signed-off-by: Mauro Carvalho Chehab commit 34a818882e2f84704059dead1f02eb8943e222c3 Author: Hans Verkuil Date: Fri Jan 24 12:53:32 2020 +0100 media: pulse8-cec: INIT_DELAYED_WORK was called too late If earlier in the connect() an error occurred, then pulse8_cec_adap_free was called by cec_delete_adapter, and that free function tried to cancel the ping_eeprom_work workqueue, but that workqueue hasn't been initialized yet, resulting in a kernel warning. Move the initialization of that workqueue up to where the other workqueues are initialized. Signed-off-by: Hans Verkuil Fixes: 601282d65b96 ("media: pulse8-cec: use adap_free callback") Signed-off-by: Mauro Carvalho Chehab commit 21b388dca138b0fc540c76b065bc83281762a9b4 Author: Geert Uytterhoeven Date: Wed Feb 19 16:39:29 2020 +0100 ARM: dts: r8a7779: Remove deprecated "renesas, rcar-sata" compatible value The "renesas,rcar-sata" compatible value was deprecated by "renesas,sata-r8a7779" many years ago, in commit e67adb4e669db834 ("sata_rcar: Add R-Car Gen2 SATA PHY support"). Drop it. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20200219153929.11073-1-geert+renesas@glider.be commit cb0cc635c7a9fa8a3a0f75d4d896721819c63add Author: Naveen N. Rao Date: Thu Feb 20 17:01:32 2020 +0530 powerpc: Include .BTF section Selecting CONFIG_DEBUG_INFO_BTF results in the below warning from ld: ld: warning: orphan section `.BTF' from `.btf.vmlinux.bin.o' being placed in section `.BTF' Include .BTF section in vmlinux explicitly to fix the same. Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200220113132.857132-1-naveen.n.rao@linux.vnet.ibm.com commit a43ab30dcd4a1abcdd0d2461bf1cf7c0817f6cd3 Author: Ondrej Jirman Date: Fri Feb 21 21:27:26 2020 +0100 bus: sunxi-rsb: Return correct data when mixing 16-bit and 8-bit reads When doing a 16-bit read that returns data in the MSB byte, the RSB_DATA register will keep the MSB byte unchanged when doing the following 8-bit read. sunxi_rsb_read() will then return a result that contains high byte from 16-bit read mixed with the 8-bit result. The consequence is that after this happens the PMIC's regmap will look like this: (0x33 is the high byte from the 16-bit read) % cat /sys/kernel/debug/regmap/sunxi-rsb-3a3/registers 00: 33 01: 33 02: 33 03: 33 04: 33 05: 33 06: 33 07: 33 08: 33 09: 33 0a: 33 0b: 33 0c: 33 0d: 33 0e: 33 [snip] Fix this by masking the result of the read with the correct mask based on the size of the read. There are no 16-bit users in the mainline kernel, so this doesn't need to get into the stable tree. Signed-off-by: Ondrej Jirman Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 3eb55e6f753a379e293395de8d5f3be28351a7f8 Author: Tina Zhang Date: Fri Feb 21 10:32:34 2020 +0800 drm/i915/gvt: Separate display reset from ALL_ENGINES reset ALL_ENGINES reset doesn't clobber display with the current gvt-g supported platforms. Thus ALL_ENGINES reset shouldn't reset the display engine registers emulated by gvt-g. This fixes guest warning like [ 14.622026] [drm] Initialized i915 1.6.0 20200114 for 0000:00:03.0 on minor 0 [ 14.967917] fbcon: i915drmfb (fb0) is primary device [ 25.100188] [drm:drm_atomic_helper_wait_for_dependencies [drm_kms_helper]] E RROR [CRTC:51:pipe A] flip_done timed out [ 25.100860] -----------[ cut here ]----------- [ 25.100861] pll on state mismatch (expected 0, found 1) [ 25.101024] WARNING: CPU: 1 PID: 30 at drivers/gpu/drm/i915/display/intel_dis play.c:14382 verify_single_dpll_state.isra.115+0x28f/0x320 [i915] [ 25.101025] Modules linked in: intel_rapl_msr intel_rapl_common kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel i915 aesni_intel cr ypto_simd cryptd glue_helper cec rc_core video drm_kms_helper joydev drm input_l eds i2c_algo_bit serio_raw fb_sys_fops syscopyarea sysfillrect sysimgblt mac_hid qemu_fw_cfg sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 e1000 psmouse i2c_piix4 pata_acpi floppy [ 25.101052] CPU: 1 PID: 30 Comm: kworker/u4:1 Not tainted 5.5.0+ #1 [ 25.101053] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1 .12.1-0-ga5cab58 04/01/2014 [ 25.101055] Workqueue: events_unbound async_run_entry_fn [ 25.101092] RIP: 0010:verify_single_dpll_state.isra.115+0x28f/0x320 [i915] [ 25.101093] Code: e0 d9 ff e9 a3 fe ff ff 80 3d e9 c2 11 00 00 44 89 f6 48 c7 c7 c0 9d 88 c0 75 3b e8 eb df d9 ff e9 c7 fe ff ff e8 d1 e0 ae c4 <0f> 0b e9 7a fe ff ff 80 3d c0 c2 11 00 00 8d 71 41 89 c2 48 c7 c7 [ 25.101093] RSP: 0018:ffffb1de80107878 EFLAGS: 00010286 [ 25.101094] RAX: 0000000000000000 RBX: ffffb1de80107884 RCX: 0000000000000007 [ 25.101095] RDX: 0000000000000000 RSI: 0000000000000002 RDI: ffff94fdfdd19740 [ 25.101095] RBP: ffffb1de80107938 R08: 0000000d6bfdc7b4 R09: 000000000000002b [ 25.101096] R10: ffff94fdf82dc000 R11: 0000000000000225 R12: 00000000000001f8 [ 25.101096] R13: ffff94fdb3ca6a90 R14: ffff94fdb3ca0000 R15: 0000000000000000 [ 25.101097] FS: 0000000000000000(0000) GS:ffff94fdfdd00000(0000) knlGS:00000 00000000000 [ 25.101098] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 25.101098] CR2: 00007fbc3e2be9c8 CR3: 000000003339a003 CR4: 0000000000360ee0 [ 25.101101] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 25.101101] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 25.101102] Call Trace: [ 25.101139] intel_atomic_commit_tail+0xde4/0x1520 [i915] [ 25.101141] ? flush_workqueue_prep_pwqs+0xfa/0x130 [ 25.101142] ? flush_workqueue+0x198/0x3c0 [ 25.101174] intel_atomic_commit+0x2ad/0x320 [i915] [ 25.101209] drm_atomic_commit+0x4a/0x50 [drm] [ 25.101220] drm_client_modeset_commit_atomic+0x1c4/0x200 [drm] [ 25.101231] drm_client_modeset_commit_force+0x47/0x170 [drm] [ 25.101250] drm_fb_helper_restore_fbdev_mode_unlocked+0x4e/0xa0 [drm_kms_hel per] [ 25.101255] drm_fb_helper_set_par+0x2d/0x60 [drm_kms_helper] [ 25.101287] intel_fbdev_set_par+0x1a/0x40 [i915] [ 25.101289] ? con_is_visible+0x2e/0x60 [ 25.101290] fbcon_init+0x378/0x600 [ 25.101292] visual_init+0xd5/0x130 [ 25.101296] do_bind_con_driver+0x217/0x430 [ 25.101297] do_take_over_console+0x7d/0x1b0 [ 25.101298] do_fbcon_takeover+0x5c/0xb0 [ 25.101299] fbcon_fb_registered+0x199/0x1a0 [ 25.101301] register_framebuffer+0x22c/0x330 [ 25.101306] __drm_fb_helper_initial_config_and_unlock+0x31a/0x520 [drm_kms_h elper] [ 25.101311] drm_fb_helper_initial_config+0x35/0x40 [drm_kms_helper] [ 25.101341] intel_fbdev_initial_config+0x18/0x30 [i915] [ 25.101342] async_run_entry_fn+0x3c/0x150 [ 25.101343] process_one_work+0x1fd/0x3f0 [ 25.101344] worker_thread+0x34/0x410 [ 25.101346] kthread+0x121/0x140 [ 25.101346] ? process_one_work+0x3f0/0x3f0 [ 25.101347] ? kthread_park+0x90/0x90 [ 25.101350] ret_from_fork+0x35/0x40 [ 25.101351] --[ end trace b5b47d44cd998ba1 ]-- Fixes: 6294b61ba769 ("drm/i915/gvt: add missing display part reset for vGPU reset") Signed-off-by: Tina Zhang Reviewed-by: Zhenyu Wang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200221023234.28635-1-tina.zhang@intel.com commit 253216ffb2a002a682c6f68bd3adff5b98b71de8 Author: Madhuparna Bhowmik Date: Sun Feb 23 20:03:02 2020 +0530 mac80211: rx: avoid RCU list traversal under mutex local->sta_mtx is held in __ieee80211_check_fast_rx_iface(). No need to use list_for_each_entry_rcu() as it also requires a cond argument to avoid false lockdep warnings when not used in RCU read-side section (with CONFIG_PROVE_RCU_LIST). Therefore use list_for_each_entry(); Signed-off-by: Madhuparna Bhowmik Link: https://lore.kernel.org/r/20200223143302.15390-1-madhuparnabhowmik10@gmail.com Signed-off-by: Johannes Berg commit e3ae39edbce6dc933fb1393490d1b5d76d3edb90 Author: Johannes Berg Date: Mon Feb 24 09:38:15 2020 +0100 nl80211: explicitly include if_vlan.h We use that here, and do seem to get it through some recursive include, but better include it explicitly. Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20200224093814.1b9c258fec67.I45ac150d4e11c72eb263abec9f1f0c7add9bef2b@changeid Signed-off-by: Johannes Berg commit b642d4825441bf30c72b72deb739bd2d5f53af08 Author: Ondrej Jirman Date: Sat Feb 22 23:31:53 2020 +0100 ARM: dts: sun8i-a83t-tbs-a711: Fix USB OTG mode detection USB-ID signal has a pullup on the schematic, but in reality it's not pulled up, so add a GPIO pullup. And we also need a usb0_vbus_power-supply for VBUS detection. This fixes OTG mode detection and charging issues on TBS A711 tablet. The issues came from ID pin reading 0, causing host mode to be enabled, when it should not be, leading to DRVVBUS being enabled, which disabled the charger. Fixes: f2f221c7810b824e ("ARM: dts: sun8i: a711: Enable USB OTG") Signed-off-by: Ondrej Jirman Signed-off-by: Maxime Ripard commit a40550952c000667b20082d58077bc647da6c890 Author: Ondrej Jirman Date: Sat Feb 22 23:31:52 2020 +0100 ARM: dts: sun8i-a83t-tbs-a711: HM5065 doesn't like such a high voltage Lowering the voltage solves the quick image degradation over time (minutes), that was probably caused by overheating. Signed-off-by: Ondrej Jirman Signed-off-by: Maxime Ripard commit f10e58a5d20e1cf3a39a842da92c9dd0c3c23849 Author: Leonard Crestez Date: Thu Feb 20 18:29:39 2020 +0200 soc: imx-scu: Align imx sc msg structs to 4 The imx SC api strongly assumes that messages are composed out of 4-bytes words but some of our message structs have odd sizeofs. This produces many oopses with CONFIG_KASAN=y. Fix by marking with __aligned(4). Fixes: 73feb4d0f8f1 ("soc: imx-scu: Add SoC UID(unique identifier) support") Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo commit f5bfeff44612d304deb100065a9f712309dc2783 Author: Leonard Crestez Date: Thu Feb 20 18:29:36 2020 +0200 firmware: imx: Align imx_sc_msg_req_cpu_start to 4 The imx SC api strongly assumes that messages are composed out of 4-bytes words but some of our message structs have odd sizeofs. This produces many oopses with CONFIG_KASAN=y. Fix by marking with __aligned(4). Fixes: d90bf296ae18 ("firmware: imx: Add support to start/stop a CPU") Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo commit 7c1a1c814ccc858633c761951c2546041202b24e Author: Leonard Crestez Date: Thu Feb 20 18:29:35 2020 +0200 firmware: imx: scu-pd: Align imx sc msg structs to 4 The imx SC api strongly assumes that messages are composed out of 4-bytes words but some of our message structs have odd sizeofs. This produces many oopses with CONFIG_KASAN=y. Fix by marking with __aligned(4). Fixes: c800cd7824bd ("firmware: imx: add SCU power domain driver") Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo commit 1e6a4eba693ac72e6f91b4252458c933110e5f4c Author: Leonard Crestez Date: Thu Feb 20 18:29:34 2020 +0200 firmware: imx: misc: Align imx sc msg structs to 4 The imx SC api strongly assumes that messages are composed out of 4-bytes words but some of our message structs have odd sizeofs. This produces many oopses with CONFIG_KASAN=y: BUG: KASAN: stack-out-of-bounds in imx_mu_send_data+0x108/0x1f0 It shouldn't cause an issues in normal use because these structs are always allocated on the stack. Fixes: 15e1f2bc8b3b ("firmware: imx: add misc svc support") Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo commit 26d0fba29c96241de8a9d16f045b1de49875884c Author: Leonard Crestez Date: Thu Feb 20 18:10:01 2020 +0200 firmware: imx: scu: Ensure sequential TX SCU requires that all messages words are written sequentially but linux MU driver implements multiple independent channels for each register so ordering between different channels must be ensured by SCU API interface. Wait for tx_done before every send to ensure that no queueing happens at the mailbox channel level. Fixes: edbee095fafb ("firmware: imx: add SCU firmware driver support") Signed-off-by: Leonard Crestez Cc: Reviewed-by: Peng Fan Reviewed-by:: Oleksij Rempel Signed-off-by: Shawn Guo commit 6132c1d9033d158bd0464e90bc46544fbe0bd6bc Author: Madhuparna Bhowmik Date: Sun Feb 23 16:52:33 2020 +0530 net: core: devlink.c: Hold devlink->lock from the beginning of devlink_dpipe_table_register() devlink_dpipe_table_find() should be called under either rcu_read_lock() or devlink->lock. devlink_dpipe_table_register() calls devlink_dpipe_table_find() without holding the lock and acquires it later. Therefore hold the devlink->lock from the beginning of devlink_dpipe_table_register(). Suggested-by: Jiri Pirko Signed-off-by: Madhuparna Bhowmik Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 503ba7c6961034ff0047707685644cad9287c226 Author: Florian Fainelli Date: Thu Feb 20 15:34:53 2020 -0800 net: phy: Avoid multiple suspends It is currently possible for a PHY device to be suspended as part of a network device driver's suspend call while it is still being attached to that net_device, either via phy_suspend() or implicitly via phy_stop(). Later on, when the MDIO bus controller get suspended, we would attempt to suspend again the PHY because it is still attached to a network device. This is both a waste of time and creates an opportunity for improper clock/power management bugs to creep in. Fixes: 803dd9c77ac3 ("net: phy: avoid suspending twice a PHY") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 44343418d0f2f623cb9da6f5000df793131cbe3b Author: Marek Vasut Date: Sun Feb 23 14:38:40 2020 +0100 net: ks8851-ml: Fix IRQ handling and locking The KS8851 requires that packet RX and TX are mutually exclusive. Currently, the driver hopes to achieve this by disabling interrupt from the card by writing the card registers and by disabling the interrupt on the interrupt controller. This however is racy on SMP. Replace this approach by expanding the spinlock used around the ks_start_xmit() TX path to ks_irq() RX path to assure true mutual exclusion and remove the interrupt enabling/disabling, which is now not needed anymore. Furthermore, disable interrupts also in ks_net_stop(), which was missing before. Note that a massive improvement here would be to re-use the KS8851 driver approach, which is to move the TX path into a worker thread, interrupt handling to threaded interrupt, and synchronize everything with mutexes, but that would be a much bigger rework, for a separate patch. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Lukas Wunner Cc: Petr Stetiar Cc: YueHaibing Signed-off-by: David S. Miller commit 52df1e564eb0470b2ecd1481e457932f09f49f5d Author: Jonathan Neuschäfer Date: Sun Feb 23 18:46:31 2020 +0100 docs: networking: phy: Rephrase paragraph for clarity Let's make it a little easier to read. Signed-off-by: Jonathan Neuschäfer Signed-off-by: David S. Miller commit c77ec025346f122bb74719725331c6386bbb86b7 Author: Mauro Carvalho Chehab Date: Sat Feb 22 10:00:04 2020 +0100 docs: adm1177: fix a broken reference This reference was missing the .rst extension. This would be OK if it were using the :doc: directive. So, switch to it. As a side effect, this will create cross-reference links at html output. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/8d37f465888656224855a21f5bb01edb1ca66cf3.1582361738.git.mchehab+huawei@kernel.org Signed-off-by: Guenter Roeck commit 2773fe1d31c42ffae2a9cb9a6055d99dd86e2fee Author: Oleksandr Suvorov Date: Wed Feb 19 13:11:24 2020 +0000 ARM: dts: imx7-colibri: Fix frequency for sd/mmc SD/MMC on Colibri iMX7S/D modules successfully support 200Mhz frequency in HS200 mode. Removing the unnecessary max-frequency limit significantly increases the performance: == before fix ==== root@colibri-imx7-emmc:~# hdparm -t /dev/mmcblk0 /dev/mmcblk0: Timing buffered disk reads: 252 MB in 3.02 seconds = 83.54 MB/sec ================== === after fix ==== root@colibri-imx7-emmc:~# hdparm -t /dev/mmcblk0 /dev/mmcblk0: Timing buffered disk reads: 408 MB in 3.00 seconds = 135.94 MB/sec ================== Fixes: f928a4a377e4 ("ARM: dts: imx7: add Toradex Colibri iMX7D 1GB (eMMC) support") Signed-off-by: Oleksandr Suvorov Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 193155c8c9429f57400daf1f2ef0075016767112 Author: Jens Axboe Date: Sat Feb 22 23:22:19 2020 -0700 io_uring: handle multiple personalities in link chains If we have a chain of requests and they don't all use the same credentials, then the head of the chain will be issued with the credentails of the tail of the chain. Ensure __io_queue_sqe() overrides the credentials, if they are different. Once we do that, we can clean up the creds handling as well, by only having io_submit_sqe() do the lookup of a personality. It doesn't need to assign it, since __io_queue_sqe() now always does the right thing. Fixes: 75c6a03904e0 ("io_uring: support using a registered personality for commands") Reported-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 66d0e797bf095d407479c89952d42b1d96ef0a7f Author: Orson Zhai Date: Fri Feb 21 01:37:04 2020 +0800 Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs" This reverts commit 4585fbcb5331fc910b7e553ad3efd0dd7b320d14. The name changing as devfreq(X) breaks some user space applications, such as Android HAL from Unisoc and Hikey [1]. The device name will be changed unexpectly after every boot depending on module init sequence. It will make trouble to setup some system configuration like selinux for Android. So we'd like to revert it back to old naming rule before any better way being found. [1] https://lkml.org/lkml/2018/5/8/1042 Cc: John Stultz Cc: Greg Kroah-Hartman Cc: stable@vger.kernel.org Signed-off-by: Orson Zhai Acked-by: Greg Kroah-Hartman Signed-off-by: Chanwoo Choi commit dad8cea7add96a353fa1898b5ccefbb72da66f29 Author: Neal Cardwell Date: Sat Feb 22 11:21:15 2020 -0500 tcp: fix TFO SYNACK undo to avoid double-timestamp-undo In a rare corner case the new logic for undo of SYNACK RTO could result in triggering the warning in tcp_fastretrans_alert() that says: WARN_ON(tp->retrans_out != 0); The warning looked like: WARNING: CPU: 1 PID: 1 at net/ipv4/tcp_input.c:2818 tcp_ack+0x13e0/0x3270 The sequence that tickles this bug is: - Fast Open server receives TFO SYN with data, sends SYNACK - (client receives SYNACK and sends ACK, but ACK is lost) - server app sends some data packets - (N of the first data packets are lost) - server receives client ACK that has a TS ECR matching first SYNACK, and also SACKs suggesting the first N data packets were lost - server performs TS undo of SYNACK RTO, then immediately enters recovery - buggy behavior then performed a *second* undo that caused the connection to be in CA_Open with retrans_out != 0 Basically, the incoming ACK packet with SACK blocks causes us to first undo the cwnd reduction from the SYNACK RTO, but then immediately enters fast recovery, which then makes us eligible for undo again. And then tcp_rcv_synrecv_state_fastopen() accidentally performs an undo using a "mash-up" of state from two different loss recovery phases: it uses the timestamp info from the ACK of the original SYNACK, and the undo_marker from the fast recovery. This fix refines the logic to only invoke the tcp_try_undo_loss() inside tcp_rcv_synrecv_state_fastopen() if the connection is still in CA_Loss. If peer SACKs triggered fast recovery, then tcp_rcv_synrecv_state_fastopen() can't safely undo. Fixes: 794200d66273 ("tcp: undo cwnd on Fast Open spurious SYNACK retransmit") Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit f6f13c125e05603f68f5bf31f045b95e6d493598 Author: Haiyang Zhang Date: Fri Feb 21 08:32:18 2020 -0800 hv_netvsc: Fix unwanted wakeup in netvsc_attach() When netvsc_attach() is called by operations like changing MTU, etc., an extra wakeup may happen while netvsc_attach() calling rndis_filter_device_add() which sends rndis messages when queue is stopped in netvsc_detach(). The completion message will wake up queue 0. We can reproduce the issue by changing MTU etc., then the wake_queue counter from "ethtool -S" will increase beyond stop_queue counter: stop_queue: 0 wake_queue: 1 The issue causes queue wake up, and counter increment, no other ill effects in current code. So we didn't see any network problem for now. To fix this, initialize tx_disable to true, and set it to false when the NIC is ready to be attached or registered. Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic") Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller commit e08658a657f974590809290c62e889f0fd420200 Author: Ravi Bangoria Date: Sat Feb 22 13:50:49 2020 +0530 powerpc/watchpoint: Don't call dar_within_range() for Book3S DAR is set to the first byte of overlap between actual access and watched range at DSI on Book3S processor. But actual access range might or might not be within user asked range. So for Book3S, it must not call dar_within_range(). This revert portion of commit 39413ae00967 ("powerpc/hw_breakpoints: Rewrite 8xx breakpoints to allow any address range size."). Before patch: # ./tools/testing/selftests/powerpc/ptrace/perf-hwbreak ... TESTED: No overlap FAILED: Partial overlap: 0 != 2 TESTED: Partial overlap TESTED: No overlap FAILED: Full overlap: 0 != 2 failure: perf_hwbreak After patch: TESTED: No overlap TESTED: Partial overlap TESTED: Partial overlap TESTED: No overlap TESTED: Full overlap success: perf_hwbreak Fixes: 39413ae00967 ("powerpc/hw_breakpoints: Rewrite 8xx breakpoints to allow any address range size.") Reported-by: Michael Ellerman Signed-off-by: Ravi Bangoria Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200222082049.330435-1-ravi.bangoria@linux.ibm.com commit f8788d86ab28f61f7b46eb6be375f8a726783636 Author: Linus Torvalds Date: Sun Feb 23 16:17:42 2020 -0800 Linux 5.6-rc3 commit eae7172f8141eb98e64e6e81acc9e9d5b2add127 Author: Daniele Palmas Date: Fri Feb 21 14:17:05 2020 +0100 net: usb: qmi_wwan: restore mtu min/max values after raw_ip switch usbnet creates network interfaces with min_mtu = 0 and max_mtu = ETH_MAX_MTU. These values are not modified by qmi_wwan when the network interface is created initially, allowing, for example, to set mtu greater than 1500. When a raw_ip switch is done (raw_ip set to 'Y', then set to 'N') the mtu values for the network interface are set through ether_setup, with min_mtu = ETH_MIN_MTU and max_mtu = ETH_DATA_LEN, not allowing anymore to set mtu greater than 1500 (error: mtu greater than device maximum). The patch restores the original min/max mtu values set by usbnet after a raw_ip switch. Signed-off-by: Daniele Palmas Acked-by: Bjørn Mork Signed-off-by: David S. Miller commit d2eee25858f246051b49c42c411629c78513e2a8 Merge: a3163ca03f99 a5ae50dea911 Author: Linus Torvalds Date: Sun Feb 23 09:43:50 2020 -0800 Merge tag 'for-5.6-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "These are fixes that were found during testing with help of error injection, plus some other stable material. There's a fixup to patch added to rc1 causing locking in wrong context warnings, tests found one more deadlock scenario. The patches are tagged for stable, two of them now in the queue but we'd like all three released at the same time. I'm not happy about fixes to fixes in such a fast succession during rcs, but I hope we found all the fallouts of commit 28553fa992cb ('Btrfs: fix race between shrinking truncate and fiemap')" * tag 'for-5.6-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: fix deadlock during fast fsync when logging prealloc extents beyond eof Btrfs: fix btrfs_wait_ordered_range() so that it waits for all ordered extents btrfs: fix bytes_may_use underflow in prealloc error condtition btrfs: handle logged extent failure properly btrfs: do not check delayed items are empty for single transaction cleanup btrfs: reset fs_root to NULL on error in open_ctree btrfs: destroy qgroup extent records on transaction abort commit a3163ca03f9913ba2c2fb6a06305f3dca98adfd1 Merge: c6188dff33fb 9db176bceb5c Author: Linus Torvalds Date: Sun Feb 23 09:42:19 2020 -0800 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: "More miscellaneous ext4 bug fixes (all stable fodder)" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix mount failure with quota configured as module jbd2: fix ocfs2 corrupt when clearing block group bits ext4: fix race between writepages and enabling EXT4_EXTENTS_FL ext4: rename s_journal_flag_rwsem to s_writepages_rwsem ext4: fix potential race between s_flex_groups online resizing and access ext4: fix potential race between s_group_info online resizing and access ext4: fix potential race between online resizing and write operations ext4: add cond_resched() to __ext4_find_entry() ext4: fix a data race in EXT4_I(inode)->i_disksize commit c6188dff33fba320826e87e387ae6efffab0525d Merge: dca132a60f22 99db590b083f Author: Linus Torvalds Date: Sun Feb 23 09:37:41 2020 -0800 Merge tag 'csky-for-linus-5.6-rc3' of git://github.com/c-sky/csky-linux Pull csky updates from Guo Ren: "Sorry, I missed 5.6-rc1 merge window, but in this pull request the most are the fixes and the rests are between fixes and features. The only outside modification is the MAINTAINERS file update with our mailing list. - cache flush implementation fixes - ftrace modify panic fix - CONFIG_SMP boot problem fix - fix pt_regs saving for atomic.S - fix fixaddr_init without highmem. - fix stack protector support - fix fake Tightly-Coupled Memory code compile and use - fix some typos and coding convention" * tag 'csky-for-linus-5.6-rc3' of git://github.com/c-sky/csky-linux: (23 commits) csky: Replace by csky: Implement copy_thread_tls csky: Add PCI support csky: Minimize defconfig to support buildroot config.fragment csky: Add setup_initrd check code csky: Cleanup old Kconfig options arch/csky: fix some Kconfig typos csky: Fixup compile warning for three unimplemented syscalls csky: Remove unused cache implementation csky: Fixup ftrace modify panic csky: Add flush_icache_mm to defer flush icache all csky: Optimize abiv2 copy_to_user_page with VM_EXEC csky: Enable defer flush_dcache_page for abiv2 cpus (807/810/860) csky: Remove unnecessary flush_icache_* implementation csky: Support icache flush without specific instructions csky/Kconfig: Add Kconfig.platforms to support some drivers csky/smp: Fixup boot failed when CONFIG_SMP csky: Set regs->usp to kernel sp, when the exception is from kernel csky/mm: Fixup export invalid_pte_table symbol csky: Separate fixaddr_init from highmem ... commit 35a571346a94fb93b5b3b6a599675ef3384bc75c Author: Oliver Upton Date: Tue Feb 4 15:26:31 2020 -0800 KVM: nVMX: Check IO instruction VM-exit conditions Consult the 'unconditional IO exiting' and 'use IO bitmaps' VM-execution controls when checking instruction interception. If the 'use IO bitmaps' VM-execution control is 1, check the instruction access against the IO bitmaps to determine if the instruction causes a VM-exit. Signed-off-by: Oliver Upton Signed-off-by: Paolo Bonzini commit e71237d3ff1abf9f3388337cfebf53b96df2020d Author: Oliver Upton Date: Tue Feb 4 15:26:30 2020 -0800 KVM: nVMX: Refactor IO bitmap checks into helper function Checks against the IO bitmap are useful for both instruction emulation and VM-exit reflection. Refactor the IO bitmap checks into a helper function. Signed-off-by: Oliver Upton Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 07721feee46b4b248402133228235318199b05ec Author: Paolo Bonzini Date: Tue Feb 4 15:26:29 2020 -0800 KVM: nVMX: Don't emulate instructions in guest mode vmx_check_intercept is not yet fully implemented. To avoid emulating instructions disallowed by the L1 hypervisor, refuse to emulate instructions by default. Cc: stable@vger.kernel.org [Made commit, added commit msg - Oliver] Signed-off-by: Oliver Upton Signed-off-by: Paolo Bonzini commit 5ef8acbdd687c9d72582e2c05c0b9756efb37863 Author: Oliver Upton Date: Fri Feb 7 02:36:07 2020 -0800 KVM: nVMX: Emulate MTF when performing instruction emulation Since commit 5f3d45e7f282 ("kvm/x86: add support for MONITOR_TRAP_FLAG"), KVM has allowed an L1 guest to use the monitor trap flag processor-based execution control for its L2 guest. KVM simply forwards any MTF VM-exits to the L1 guest, which works for normal instruction execution. However, when KVM needs to emulate an instruction on the behalf of an L2 guest, the monitor trap flag is not emulated. Add the necessary logic to kvm_skip_emulated_instruction() to synthesize an MTF VM-exit to L1 upon instruction emulation for L2. Fixes: 5f3d45e7f282 ("kvm/x86: add support for MONITOR_TRAP_FLAG") Signed-off-by: Oliver Upton Signed-off-by: Paolo Bonzini commit dd58f3c95c98e6e2cf30d9e562cae0503c5f2713 Author: Li RongQing Date: Sun Feb 23 16:13:12 2020 +0800 KVM: fix error handling in svm_hardware_setup rename svm_hardware_unsetup as svm_hardware_teardown, move it before svm_hardware_setup, and call it to free all memory if fail to setup in svm_hardware_setup, otherwise memory will be leaked remove __exit attribute for it since it is called in __init function Signed-off-by: Li RongQing Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 39f3b41aa7cae917f928ef9f31d09da28188e5ed Author: Paolo Abeni Date: Fri Feb 21 19:42:13 2020 +0100 net: genetlink: return the error code when attribute parsing fails. Currently if attribute parsing fails and the genl family does not support parallel operation, the error code returned by __nlmsg_parse() is discarded by genl_family_rcv_msg_attrs_parse(). Be sure to report the error for all genl families. Fixes: c10e6cf85e7d ("net: genetlink: push attrbuf allocation and parsing to a separate function") Fixes: ab5b526da048 ("net: genetlink: always allocate separate attrs for dumpit ops") Signed-off-by: Paolo Abeni Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 3e72dfdf8227b052393f71d820ec7599909dddc2 Author: Matteo Croce Date: Fri Feb 21 12:28:38 2020 +0100 ipv4: ensure rcu_read_lock() in cipso_v4_error() Similarly to commit c543cb4a5f07 ("ipv4: ensure rcu_read_lock() in ipv4_link_failure()"), __ip_options_compile() must be called under rcu protection. Fixes: 3da1ed7ac398 ("net: avoid use IPCB in cipso_v4_error") Suggested-by: Guillaume Nault Signed-off-by: Matteo Croce Acked-by: Paul Moore Signed-off-by: David S. Miller commit 42d84c8490f9f0931786f1623191fcab397c3d64 Author: Eugenio Pérez Date: Fri Feb 21 12:06:56 2020 +0100 vhost: Check docket sk_family instead of call getname Doing so, we save one call to get data we already have in the struct. Also, since there is no guarantee that getname use sockaddr_ll parameter beyond its size, we add a little bit of security here. It should do not do beyond MAX_ADDR_LEN, but syzbot found that ax25_getname writes more (72 bytes, the size of full_sockaddr_ax25, versus 20 + 32 bytes of sockaddr_ll + MAX_ADDR_LEN in syzbot repro). Fixes: 3a4d5c94e9593 ("vhost_net: a kernel-level virtio server") Reported-by: syzbot+f2a62d07a5198c819c7b@syzkaller.appspotmail.com Signed-off-by: Eugenio Pérez Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit 99db590b083fa2bc60adfcb5c839a62db4ef1d79 Author: Geert Uytterhoeven Date: Wed Feb 12 11:10:58 2020 +0100 csky: Replace by The C-Sky platform code is not a clock provider, and just needs to call of_clk_init(). Hence it can include instead of . Signed-off-by: Geert Uytterhoeven Signed-off-by: Guo Ren commit dca132a60f226f4cbaa98807518a5ca6cff112ce Merge: f3cc24942e95 51dede9c05df Author: Linus Torvalds Date: Sat Feb 22 18:02:10 2020 -0800 Merge tag 'ras-urgent-2020-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS fixes from Thomas Gleixner: "Two fixes for the AMD MCE driver: - Populate the per CPU MCA bank descriptor pointer only after it has been completely set up to prevent a use-after-free in case that one of the subsequent initialization step fails - Implement a proper release function for the sysfs entries of MCA threshold controls instead of freeing the memory right in the CPU teardown code, which leads to another use-after-free when the associated sysfs file is opened and accessed" * tag 'ras-urgent-2020-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce/amd: Fix kobject lifetime x86/mce/amd: Publish the bank pointer only after setup has succeeded commit 2ad3e17ebf94b7b7f3f64c050ff168f9915345eb Author: Paul Moore Date: Sat Feb 22 20:36:47 2020 -0500 audit: fix error handling in audit_data_to_entry() Commit 219ca39427bf ("audit: use union for audit_field values since they are mutually exclusive") combined a number of separate fields in the audit_field struct into a single union. Generally this worked just fine because they are generally mutually exclusive. Unfortunately in audit_data_to_entry() the overlap can be a problem when a specific error case is triggered that causes the error path code to attempt to cleanup an audit_field struct and the cleanup involves attempting to free a stored LSM string (the lsm_str field). Currently the code always has a non-NULL value in the audit_field.lsm_str field as the top of the for-loop transfers a value into audit_field.val (both .lsm_str and .val are part of the same union); if audit_data_to_entry() fails and the audit_field struct is specified to contain a LSM string, but the audit_field.lsm_str has not yet been properly set, the error handling code will attempt to free the bogus audit_field.lsm_str value that was set with audit_field.val at the top of the for-loop. This patch corrects this by ensuring that the audit_field.val is only set when needed (it is cleared when the audit_field struct is allocated with kcalloc()). It also corrects a few other issues to ensure that in case of error the proper error code is returned. Cc: stable@vger.kernel.org Fixes: 219ca39427bf ("audit: use union for audit_field values since they are mutually exclusive") Reported-by: syzbot+1f4d90ead370d72e450b@syzkaller.appspotmail.com Signed-off-by: Paul Moore commit f3cc24942e955604232e3b4b0dac6a54cbc7c679 Merge: fca1037864a9 2546287c5fb3 Author: Linus Torvalds Date: Sat Feb 22 17:25:46 2020 -0800 Merge tag 'irq-urgent-2020-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "Two fixes for the irq core code which are follow ups to the recent MSI fixes: - The WARN_ON which was put into the MSI setaffinity callback for paranoia reasons actually triggered via a callchain which escaped when all the possible ways to reach that code were analyzed. The proc/irq/$N/*affinity interfaces have a quirk which came in when ALPHA moved to the generic interface: In case that the written affinity mask does not contain any online CPU it calls into ALPHAs magic auto affinity setting code. A few years later this mechanism was also made available to x86 for no good reasons and in a way which circumvents all sanity checks for interrupts which cannot have their affinity set from process context on X86 due to the way the X86 interrupt delivery works. It would be possible to make this work properly, but there is no point in doing so. If the interrupt is not yet started then the affinity setting has no effect and if it is started already then it is already assigned to an online CPU so there is no point to randomly move it to some other CPU. Just return EINVAL as the code has done before that change forever. - The new MSI quirk bit in the irq domain flags turned out to be already occupied, which escaped the author and the reviewers because the already in use bits were 0,6,2,3,4,5 listed in that order. That bit 6 was simply overlooked because the ordering was straight forward linear otherwise. So the new bit ended up being a duplicate. Fix it up by switching the oddball 6 to the obvious 1" * tag 'irq-urgent-2020-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/irqdomain: Make sure all irq domain flags are distinct genirq/proc: Reject invalid affinity masks (again) commit fca1037864a9fb75c9c48cb65649b24de8101ec4 Merge: 0a115e5f23b9 21b5ee59ef18 Author: Linus Torvalds Date: Sat Feb 22 17:08:16 2020 -0800 Merge tag 'x86-urgent-2020-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "Two fixes for x86: - Remove the __force_oder definiton from the kaslr boot code as it is already defined in the page table code which makes GCC 10 builds fail because it changed the default to -fno-common. - Address the AMD erratum 1054 concerning the IRPERF capability and enable the Instructions Retired fixed counter on machines which are not affected by the erratum" * tag 'x86-urgent-2020-02-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF x86/boot/compressed: Don't declare __force_order in kaslr_64.c commit 0a115e5f23b948be369faf14d3bccab283830f56 Merge: b88025ea47ec 4c5fd3b791a0 Author: Linus Torvalds Date: Sat Feb 22 11:38:20 2020 -0800 Merge tag 'zonefs-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs Pull zonefs fix from Damien Le Moal: "A single patch fixing typos in the documentation file" * tag 'zonefs-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs: zonefs: fix documentation typos etc. commit b88025ea47ec8aea47f0c283d182ab26bae2970d Merge: f6c69b7f5145 c7849be9cc2d Author: Linus Torvalds Date: Sat Feb 22 11:12:55 2020 -0800 Merge tag 'io_uring-5.6-2020-02-22' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Here's a small collection of fixes that were queued up: - Remove unnecessary NULL check (Dan) - Missing io_req_cancelled() call in fallocate (Pavel) - Put the cleanup check for aux data in the right spot (Pavel) - Two fixes for SQPOLL (Stefano, Xiaoguang)" * tag 'io_uring-5.6-2020-02-22' of git://git.kernel.dk/linux-block: io_uring: fix __io_iopoll_check deadlock in io_sq_thread io_uring: prevent sq_thread from spinning when it should stop io_uring: fix use-after-free by io_cleanup_req() io_uring: remove unnecessary NULL checks io_uring: add missing io_req_cancelled() commit f6c69b7f51456a914da11c4ad1b14eba933d36aa Merge: b98b809c0a13 ae7bbc091351 Author: Linus Torvalds Date: Sat Feb 22 11:09:06 2020 -0800 Merge tag 'block-5.6-2020-02-22' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Just a set of NVMe fixes via Keith" * tag 'block-5.6-2020-02-22' of git://git.kernel.dk/linux-block: nvme-multipath: Fix memory leak with ana_log_buf nvme: Fix uninitialized-variable warning nvme-pci: Use single IRQ vector for old Apple models nvme/pci: Add sleep quirk for Samsung and Toshiba drives commit b98b809c0a1311239605e8d2ce1583191d3efd5b Merge: 5b442b1a4e9a 807b9515b7d0 Author: Linus Torvalds Date: Sat Feb 22 11:00:52 2020 -0800 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Four non-core fixes. Two are reverts of target fixes which turned out to have unwanted side effects, one is a revert of an RDMA fix with the same problem and the final one fixes an incorrect warning about memory allocation failures in megaraid_sas (the driver actually reduces the allocation size until it succeeds)" Signed-off-by: James E.J. Bottomley * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: Revert "target: iscsi: Wait for all commands to finish before freeing a session" scsi: Revert "RDMA/isert: Fix a recently introduced regression related to logout" scsi: megaraid_sas: silence a warning scsi: Revert "target/core: Inline transport_lun_remove_cmd()" commit 5b442b1a4e9a19def99309b9831e276c21352ac1 Merge: fea630215a9e e61d23922532 Author: Linus Torvalds Date: Sat Feb 22 10:52:54 2020 -0800 Merge tag 'hwmon-for-v5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - Fix crash in w83627ehf driver seen with W83627DHG-P - Fix lockdep splat in acpi_power_meter driver - Fix xdpe12284 documentation Sphinx warnings * tag 'hwmon-for-v5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (w83627ehf) Fix crash seen with W83627DHG-P hwmon: (acpi_power_meter) Fix lockdep splat Documentation/hwmon: fix xdpe12284 Sphinx warnings commit fea630215a9e767fd3917b2cb09ec3ded58f88a2 Merge: 591dd4c10146 854bdbae9058 Author: Linus Torvalds Date: Sat Feb 22 10:49:59 2020 -0800 Merge tag 'devicetree-fixes-for-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes deom Rob Herring: "A handful of fixes in DT bindings for MDIO bus, Allwinner CSI, OMAP HSMMC, and Tegra124 EMC" * tag 'devicetree-fixes-for-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: media: csi: Fix clocks description dt-bindings: media: csi: Add interconnects properties dt-bindings: net: mdio: remove compatible string from example dt-bindings: memory-controller: Update example for Tegra124 EMC dt-bindings: mmc: omap-hsmmc: Fix SDIO interrupt commit 591dd4c10146e541b9f7a461cb6b638ab313718d Merge: 54dedb5b571d 2db01da8d25f Author: Linus Torvalds Date: Sat Feb 22 10:43:41 2020 -0800 Merge tag 's390-5.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Remove ieee_emulation_warnings sysctl which is a dead code. - Avoid triggering rebuild of the kernel during make install. - Enable protected virtualization guest support in default configs. - Fix cio_ignore seq_file .next function to increase position index. And use kobj_to_dev instead of container_of in cio code. - Fix storage block address lists to contain absolute addresses in qdio code. - Few clang warnings and spelling fixes. * tag 's390-5.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/qdio: fill SBALEs with absolute addresses s390/qdio: fill SL with absolute addresses s390: remove obsolete ieee_emulation_warnings s390: make 'install' not depend on vmlinux s390/kaslr: Fix casts in get_random s390/mm: Explicitly compare PAGE_DEFAULT_KEY against zero in storage_key_init_range s390/pkey/zcrypt: spelling s/crytp/crypt/ s390/cio: use kobj_to_dev() API s390/defconfig: enable CONFIG_PROTECTED_VIRTUALIZATION_GUEST s390/cio: cio_ignore_proc_seq_next should increase position index commit c7849be9cc2dd2754c48ddbaca27c2de6d80a95d Author: Xiaoguang Wang Date: Sat Feb 22 14:46:05 2020 +0800 io_uring: fix __io_iopoll_check deadlock in io_sq_thread Since commit a3a0e43fd770 ("io_uring: don't enter poll loop if we have CQEs pending"), if we already events pending, we won't enter poll loop. In case SETUP_IOPOLL and SETUP_SQPOLL are both enabled, if app has been terminated and don't reap pending events which are already in cq ring, and there are some reqs in poll_list, io_sq_thread will enter __io_iopoll_check(), and find pending events, then return, this loop will never have a chance to exit. I have seen this issue in fio stress tests, to fix this issue, let io_sq_thread call io_iopoll_getevents() with argument 'min' being zero, and remove __io_iopoll_check(). Fixes: a3a0e43fd770 ("io_uring: don't enter poll loop if we have CQEs pending") Signed-off-by: Xiaoguang Wang Signed-off-by: Jens Axboe commit 8af1c6fbd9239877998c7f5a591cb2c88d41fb66 Author: Jozsef Kadlecsik Date: Sat Feb 22 12:01:43 2020 +0100 netfilter: ipset: Fix forceadd evaluation path When the forceadd option is enabled, the hash:* types should find and replace the first entry in the bucket with the new one if there are no reuseable (deleted or timed out) entries. However, the position index was just not set to zero and remained the invalid -1 if there were no reuseable entries. Reported-by: syzbot+6a86565c74ebe30aea18@syzkaller.appspotmail.com Fixes: 23c42a403a9c ("netfilter: ipset: Introduction of new commands and protocol version 7") Signed-off-by: Jozsef Kadlecsik commit e43f1331e2ef913b8c566920c9af75e0ccdd1d3f Author: James Morse Date: Thu Feb 20 16:58:39 2020 +0000 arm64: Ask the compiler to __always_inline functions used by KVM at HYP KVM uses some of the static-inline helpers like icache_is_vipt() from its HYP code. This assumes the function is inlined so that the code is mapped to EL2. The compiler may decide not to inline these, and the out-of-line version may not be in the __hyp_text section. Add the additional __always_ hint to these static-inlines that are used by KVM. Signed-off-by: James Morse Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200220165839.256881-4-james.morse@arm.com commit 8c2d146ee7a2e0782eea4dd70fddc1c837140136 Author: James Morse Date: Thu Feb 20 16:58:38 2020 +0000 KVM: arm64: Define our own swab32() to avoid a uapi static inline KVM uses swab32() when mediating GIC MMIO accesses if the GICV is badly aligned, and the host and guest differ in endianness. arm64 doesn't provide a __arch_swab32(), so __fswab32() is always backed by the macro implementation that the compiler reduces to a single instruction. But the static-inline causes problems for KVM if the compiler chooses not to inline this function, it may not be located in the __hyp_text where __vgic_v2_perform_cpuif_access() needs it. Create our own __kvm_swab32() macro that calls ___constant_swab32() directly. This way we know it will always be inlined. Signed-off-by: James Morse Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200220165839.256881-3-james.morse@arm.com commit 5c37f1ae1c335800d16b207cb578009c695dcd39 Author: James Morse Date: Thu Feb 20 16:58:37 2020 +0000 KVM: arm64: Ask the compiler to __always_inline functions used at HYP On non VHE CPUs, KVM's __hyp_text contains code run at EL2 while the rest of the kernel runs at EL1. This code lives in its own section with start and end markers so we can map it to EL2. The compiler may decide not to inline static-inline functions from the header file. It may also decide not to put these out-of-line functions in the same section, meaning they aren't mapped when called at EL2. Clang-9 does exactly this with __kern_hyp_va() and a few others when x18 is reserved for the shadow call stack. Add the additional __always_ hint to all the static-inlines that are called from a hyp file. Signed-off-by: James Morse Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200220165839.256881-2-james.morse@arm.com ---- kvm_get_hyp_vector() pulls in all the regular per-cpu accessors and this_cpu_has_cap(), fortunately its only called for VHE. commit f66ee0410b1c3481ee75e5db9b34547b4d582465 Author: Jozsef Kadlecsik Date: Tue Feb 11 23:20:43 2020 +0100 netfilter: ipset: Fix "INFO: rcu detected stall in hash_xxx" reports In the case of huge hash:* types of sets, due to the single spinlock of a set the processing of the whole set under spinlock protection could take too long. There were four places where the whole hash table of the set was processed from bucket to bucket under holding the spinlock: - During resizing a set, the original set was locked to exclude kernel side add/del element operations (userspace add/del is excluded by the nfnetlink mutex). The original set is actually just read during the resize, so the spinlocking is replaced with rcu locking of regions. However, thus there can be parallel kernel side add/del of entries. In order not to loose those operations a backlog is added and replayed after the successful resize. - Garbage collection of timed out entries was also protected by the spinlock. In order not to lock too long, region locking is introduced and a single region is processed in one gc go. Also, the simple timer based gc running is replaced with a workqueue based solution. The internal book-keeping (number of elements, size of extensions) is moved to region level due to the region locking. - Adding elements: when the max number of the elements is reached, the gc was called to evict the timed out entries. The new approach is that the gc is called just for the matching region, assuming that if the region (proportionally) seems to be full, then the whole set does. We could scan the other regions to check every entry under rcu locking, but for huge sets it'd mean a slowdown at adding elements. - Listing the set header data: when the set was defined with timeout support, the garbage collector was called to clean up timed out entries to get the correct element numbers and set size values. Now the set is scanned to check non-timed out entries, without actually calling the gc for the whole set. Thanks to Florian Westphal for helping me to solve the SOFTIRQ-safe -> SOFTIRQ-unsafe lock order issues during working on the patch. Reported-by: syzbot+4b0e9d4ff3cf117837e5@syzkaller.appspotmail.com Reported-by: syzbot+c27b8d5010f45c666ed1@syzkaller.appspotmail.com Reported-by: syzbot+68a806795ac89df3aa1c@syzkaller.appspotmail.com Fixes: 23c42a403a9c ("netfilter: ipset: Introduction of new commands and protocol version 7") Signed-off-by: Jozsef Kadlecsik commit 9db176bceb5c5df4990486709da386edadc6bd1d Author: Jan Kara Date: Fri Feb 21 11:08:35 2020 +0100 ext4: fix mount failure with quota configured as module When CONFIG_QFMT_V2 is configured as a module, the test in ext4_feature_set_ok() fails and so mount of filesystems with quota or project features fails. Fix the test to use IS_ENABLED macro which works properly even for modules. Link: https://lore.kernel.org/r/20200221100835.9332-1-jack@suse.cz Fixes: d65d87a07476 ("ext4: improve explanation of a mount failure caused by a misconfigured kernel") Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 8eedabfd66b68a4623beec0789eac54b8c9d0fb6 Author: wangyan Date: Thu Feb 20 21:46:14 2020 +0800 jbd2: fix ocfs2 corrupt when clearing block group bits I found a NULL pointer dereference in ocfs2_block_group_clear_bits(). The running environment: kernel version: 4.19 A cluster with two nodes, 5 luns mounted on two nodes, and do some file operations like dd/fallocate/truncate/rm on every lun with storage network disconnection. The fallocate operation on dm-23-45 caused an null pointer dereference. The information of NULL pointer dereference as follows: [577992.878282] JBD2: Error -5 detected when updating journal superblock for dm-23-45. [577992.878290] Aborting journal on device dm-23-45. ... [577992.890778] JBD2: Error -5 detected when updating journal superblock for dm-24-46. [577992.890908] __journal_remove_journal_head: freeing b_committed_data [577992.890916] (fallocate,88392,52):ocfs2_extend_trans:474 ERROR: status = -30 [577992.890918] __journal_remove_journal_head: freeing b_committed_data [577992.890920] (fallocate,88392,52):ocfs2_rotate_tree_right:2500 ERROR: status = -30 [577992.890922] __journal_remove_journal_head: freeing b_committed_data [577992.890924] (fallocate,88392,52):ocfs2_do_insert_extent:4382 ERROR: status = -30 [577992.890928] (fallocate,88392,52):ocfs2_insert_extent:4842 ERROR: status = -30 [577992.890928] __journal_remove_journal_head: freeing b_committed_data [577992.890930] (fallocate,88392,52):ocfs2_add_clusters_in_btree:4947 ERROR: status = -30 [577992.890933] __journal_remove_journal_head: freeing b_committed_data [577992.890939] __journal_remove_journal_head: freeing b_committed_data [577992.890949] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020 [577992.890950] Mem abort info: [577992.890951] ESR = 0x96000004 [577992.890952] Exception class = DABT (current EL), IL = 32 bits [577992.890952] SET = 0, FnV = 0 [577992.890953] EA = 0, S1PTW = 0 [577992.890954] Data abort info: [577992.890955] ISV = 0, ISS = 0x00000004 [577992.890956] CM = 0, WnR = 0 [577992.890958] user pgtable: 4k pages, 48-bit VAs, pgdp = 00000000f8da07a9 [577992.890960] [0000000000000020] pgd=0000000000000000 [577992.890964] Internal error: Oops: 96000004 [#1] SMP [577992.890965] Process fallocate (pid: 88392, stack limit = 0x00000000013db2fd) [577992.890968] CPU: 52 PID: 88392 Comm: fallocate Kdump: loaded Tainted: G W OE 4.19.36 #1 [577992.890969] Hardware name: Huawei TaiShan 2280 V2/BC82AMDD, BIOS 0.98 08/25/2019 [577992.890971] pstate: 60400009 (nZCv daif +PAN -UAO) [577992.891054] pc : _ocfs2_free_suballoc_bits+0x63c/0x968 [ocfs2] [577992.891082] lr : _ocfs2_free_suballoc_bits+0x618/0x968 [ocfs2] [577992.891084] sp : ffff0000c8e2b810 [577992.891085] x29: ffff0000c8e2b820 x28: 0000000000000000 [577992.891087] x27: 00000000000006f3 x26: ffffa07957b02e70 [577992.891089] x25: ffff807c59d50000 x24: 00000000000006f2 [577992.891091] x23: 0000000000000001 x22: ffff807bd39abc30 [577992.891093] x21: ffff0000811d9000 x20: ffffa07535d6a000 [577992.891097] x19: ffff000001681638 x18: ffffffffffffffff [577992.891098] x17: 0000000000000000 x16: ffff000080a03df0 [577992.891100] x15: ffff0000811d9708 x14: 203d207375746174 [577992.891101] x13: 73203a524f525245 x12: 20373439343a6565 [577992.891103] x11: 0000000000000038 x10: 0101010101010101 [577992.891106] x9 : ffffa07c68a85d70 x8 : 7f7f7f7f7f7f7f7f [577992.891109] x7 : 0000000000000000 x6 : 0000000000000080 [577992.891110] x5 : 0000000000000000 x4 : 0000000000000002 [577992.891112] x3 : ffff000001713390 x2 : 2ff90f88b1c22f00 [577992.891114] x1 : ffff807bd39abc30 x0 : 0000000000000000 [577992.891116] Call trace: [577992.891139] _ocfs2_free_suballoc_bits+0x63c/0x968 [ocfs2] [577992.891162] _ocfs2_free_clusters+0x100/0x290 [ocfs2] [577992.891185] ocfs2_free_clusters+0x50/0x68 [ocfs2] [577992.891206] ocfs2_add_clusters_in_btree+0x198/0x5e0 [ocfs2] [577992.891227] ocfs2_add_inode_data+0x94/0xc8 [ocfs2] [577992.891248] ocfs2_extend_allocation+0x1bc/0x7a8 [ocfs2] [577992.891269] ocfs2_allocate_extents+0x14c/0x338 [ocfs2] [577992.891290] __ocfs2_change_file_space+0x3f8/0x610 [ocfs2] [577992.891309] ocfs2_fallocate+0xe4/0x128 [ocfs2] [577992.891316] vfs_fallocate+0x11c/0x250 [577992.891317] ksys_fallocate+0x54/0x88 [577992.891319] __arm64_sys_fallocate+0x28/0x38 [577992.891323] el0_svc_common+0x78/0x130 [577992.891325] el0_svc_handler+0x38/0x78 [577992.891327] el0_svc+0x8/0xc My analysis process as follows: ocfs2_fallocate __ocfs2_change_file_space ocfs2_allocate_extents ocfs2_extend_allocation ocfs2_add_inode_data ocfs2_add_clusters_in_btree ocfs2_insert_extent ocfs2_do_insert_extent ocfs2_rotate_tree_right ocfs2_extend_rotate_transaction ocfs2_extend_trans jbd2_journal_restart jbd2__journal_restart /* handle->h_transaction is NULL, * is_handle_aborted(handle) is true */ handle->h_transaction = NULL; start_this_handle return -EROFS; ocfs2_free_clusters _ocfs2_free_clusters _ocfs2_free_suballoc_bits ocfs2_block_group_clear_bits ocfs2_journal_access_gd __ocfs2_journal_access jbd2_journal_get_undo_access /* I think jbd2_write_access_granted() will * return true, because do_get_write_access() * will return -EROFS. */ if (jbd2_write_access_granted(...)) return 0; do_get_write_access /* handle->h_transaction is NULL, it will * return -EROFS here, so do_get_write_access() * was not called. */ if (is_handle_aborted(handle)) return -EROFS; /* bh2jh(group_bh) is NULL, caused NULL pointer dereference */ undo_bg = (struct ocfs2_group_desc *) bh2jh(group_bh)->b_committed_data; If handle->h_transaction == NULL, then jbd2_write_access_granted() does not really guarantee that journal_head will stay around, not even speaking of its b_committed_data. The bh2jh(group_bh) can be removed after ocfs2_journal_access_gd() and before call "bh2jh(group_bh)->b_committed_data". So, we should move is_handle_aborted() check from do_get_write_access() into jbd2_journal_get_undo_access() and jbd2_journal_get_write_access() before the call to jbd2_write_access_granted(). Link: https://lore.kernel.org/r/f72a623f-b3f1-381a-d91d-d22a1c83a336@huawei.com Signed-off-by: Yan Wang Signed-off-by: Theodore Ts'o Reviewed-by: Jun Piao Reviewed-by: Jan Kara Cc: stable@kernel.org commit cb85f4d23f794e24127f3e562cb3b54b0803f456 Author: Eric Biggers Date: Wed Feb 19 10:30:47 2020 -0800 ext4: fix race between writepages and enabling EXT4_EXTENTS_FL If EXT4_EXTENTS_FL is set on an inode while ext4_writepages() is running on it, the following warning in ext4_add_complete_io() can be hit: WARNING: CPU: 1 PID: 0 at fs/ext4/page-io.c:234 ext4_put_io_end_defer+0xf0/0x120 Here's a minimal reproducer (not 100% reliable) (root isn't required): while true; do sync done & while true; do rm -f file touch file chattr -e file echo X >> file chattr +e file done The problem is that in ext4_writepages(), ext4_should_dioread_nolock() (which only returns true on extent-based files) is checked once to set the number of reserved journal credits, and also again later to select the flags for ext4_map_blocks() and copy the reserved journal handle to ext4_io_end::handle. But if EXT4_EXTENTS_FL is being concurrently set, the first check can see dioread_nolock disabled while the later one can see it enabled, causing the reserved handle to unexpectedly be NULL. Since changing EXT4_EXTENTS_FL is uncommon, and there may be other races related to doing so as well, fix this by synchronizing changing EXT4_EXTENTS_FL with ext4_writepages() via the existing s_writepages_rwsem (previously called s_journal_flag_rwsem). This was originally reported by syzbot without a reproducer at https://syzkaller.appspot.com/bug?extid=2202a584a00fffd19fbf, but now that dioread_nolock is the default I also started seeing this when running syzkaller locally. Link: https://lore.kernel.org/r/20200219183047.47417-3-ebiggers@kernel.org Reported-by: syzbot+2202a584a00fffd19fbf@syzkaller.appspotmail.com Fixes: 6b523df4fb5a ("ext4: use transaction reservation for extent conversion in ext4_end_io") Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Cc: stable@kernel.org commit bbd55937de8f2754adc5792b0f8e5ff7d9c0420e Author: Eric Biggers Date: Wed Feb 19 10:30:46 2020 -0800 ext4: rename s_journal_flag_rwsem to s_writepages_rwsem In preparation for making s_journal_flag_rwsem synchronize ext4_writepages() with changes to both the EXTENTS and JOURNAL_DATA flags (rather than just JOURNAL_DATA as it does currently), rename it to s_writepages_rwsem. Link: https://lore.kernel.org/r/20200219183047.47417-2-ebiggers@kernel.org Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Cc: stable@kernel.org commit 7c990728b99ed6fbe9c75fc202fce1172d9916da Author: Suraj Jitindar Singh Date: Tue Feb 18 19:08:51 2020 -0800 ext4: fix potential race between s_flex_groups online resizing and access During an online resize an array of s_flex_groups structures gets replaced so it can get enlarged. If there is a concurrent access to the array and this memory has been reused then this can lead to an invalid memory access. The s_flex_group array has been converted into an array of pointers rather than an array of structures. This is to ensure that the information contained in the structures cannot get out of sync during a resize due to an accessor updating the value in the old structure after it has been copied but before the array pointer is updated. Since the structures them- selves are no longer copied but only the pointers to them this case is mitigated. Link: https://bugzilla.kernel.org/show_bug.cgi?id=206443 Link: https://lore.kernel.org/r/20200221053458.730016-4-tytso@mit.edu Signed-off-by: Suraj Jitindar Singh Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 54dedb5b571d2fb0d65c3957ecfa9b32ce28d7f0 Merge: 63f01d852c75 8645e56a4ad6 Author: Linus Torvalds Date: Fri Feb 21 16:10:10 2020 -0800 Merge tag 'for-linus-5.6-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Two small fixes for Xen: - a fix to avoid warnings with new gcc - a fix for incorrectly disabled interrupts when calling _cond_resched()" * tag 'for-linus-5.6-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: Enable interrupts when calling _cond_resched() x86/xen: Distribute switch variables for initialization commit 63f01d852c75366fb4d15ce217d12c48b69a4bcc Merge: 2865936259e2 dcde237319e6 Author: Linus Torvalds Date: Fri Feb 21 16:03:36 2020 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "It's all straightforward apart from the changes to mmap()/mremap() in relation to their handling of address arguments from userspace with non-zero tag bits in the upper byte. The change to brk() is necessary to fix a nasty user-visible regression in malloc(), but we tightened up mmap() and mremap() at the same time because they also allow the user to create virtual aliases by accident. It's much less likely than brk() to matter in practice, but enforcing the principle of "don't permit the creation of mappings using tagged addresses" leads to a straightforward ABI without having to worry about the "but what if a crazy program did foo?" aspect of things. Summary: - Fix regression in malloc() caused by ignored address tags in brk() - Add missing brackets around argument to untagged_addr() macro - Fix clang build when using binutils assembler - Fix silly typo in virtual memory map documentation" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: mm: Avoid creating virtual address aliases in brk()/mmap()/mremap() docs: arm64: fix trivial spelling enought to enough in memory.rst arm64: memory: Add missing brackets to untagged_addr() macro arm64: lse: Fix LSE atomics with LLVM commit 2865936259e27629fac422bc80c9b55ca1f108a5 Merge: 0c0ddd6ae47c 9eb425b2e04e Author: Linus Torvalds Date: Fri Feb 21 15:57:56 2020 -0800 Merge tag 'powerpc-5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Some more powerpc fixes for 5.6. This is two weeks worth as I was out sick last week: - Three fixes for the recently added VMAP_STACK on 32-bit. - Three fixes related to hugepages on 8xx (32-bit). - A fix for a bug in our transactional memory handling that could lead to a kernel crash if we saw a page fault during signal delivery. - A fix for a deadlock in our PCI EEH (Enhanced Error Handling) code. - A couple of other minor fixes. Thanks to: Christophe Leroy, Erhard F, Frederic Barrat, Gustavo Luiz Duarte, Larry Finger, Leonardo Bras, Oliver O'Halloran, Sam Bobroff" * tag 'powerpc-5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/entry: Fix an #if which should be an #ifdef in entry_32.S powerpc/xmon: Fix whitespace handling in getstring() powerpc/6xx: Fix power_save_ppc32_restore() with CONFIG_VMAP_STACK powerpc/chrp: Fix enter_rtas() with CONFIG_VMAP_STACK powerpc/32s: Fix DSI and ISI exceptions for CONFIG_VMAP_STACK powerpc/tm: Fix clearing MSR[TS] in current when reclaiming on signal delivery powerpc/8xx: Fix clearing of bits 20-23 in ITLB miss powerpc/hugetlb: Fix 8M hugepages on 8xx powerpc/hugetlb: Fix 512k hugepages on 8xx with 16k page size powerpc/eeh: Fix deadlock handling dead PHB commit ff6993bb79b9f99bdac0b5378169052931b65432 Author: Igor Druzhinin Date: Tue Jan 14 14:43:19 2020 +0000 scsi: libfc: free response frame from GPN_ID fc_disc_gpn_id_resp() should be the last function using it so free it here to avoid memory leak. Link: https://lore.kernel.org/r/1579013000-14570-2-git-send-email-igor.druzhinin@citrix.com Reviewed-by: Hannes Reinecke Signed-off-by: Igor Druzhinin Signed-off-by: Martin K. Petersen commit 0c0ddd6ae47c9238c18f475bcca675ca74c9dc31 Merge: bb65619e9732 44144c809e39 Author: Linus Torvalds Date: Fri Feb 21 13:02:49 2020 -0800 Merge tag 'linux-watchdog-5.6-rc3' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog fixes from Wim Van Sebroeck: - mtk_wdt needs RESET_CONTROLLER to build - da9062 driver fixes: - fix power management ops - do not ping the hw during stop() - add dependency on I2C * tag 'linux-watchdog-5.6-rc3' of git://www.linux-watchdog.org/linux-watchdog: watchdog: da9062: Add dependency on I2C watchdog: da9062: fix power management ops watchdog: da9062: do not ping the hw during stop() watchdog: fix mtk_wdt.c RESET_CONTROLLER build error commit bb65619e97323b8d62dd4d7549b9b7fe8a774706 Merge: e5553ac71e58 74ba569a15a0 Author: Linus Torvalds Date: Fri Feb 21 12:57:05 2020 -0800 Merge tag 'char-misc-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char/misc driver fixes for 5.6-rc3. Also included in here are some updates for some documentation files that I seem to be maintaining these days. The driver fixes are: - small fixes for the habanalabs driver - fsi driver bugfix All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: Documentation/process: Swap out the ambassador for Canonical habanalabs: patched cb equals user cb in device memset habanalabs: do not halt CoreSight during hard reset habanalabs: halt the engines before hard-reset MAINTAINERS: remove unnecessary ':' characters fsi: aspeed: add unspecified HAS_IOMEM dependency COPYING: state that all contributions really are covered by this file Documentation/process: Change Microsoft contact for embargoed hardware issues embargoed-hardware-issues: drop Amazon contact as the email address now bounces Documentation/process: Add Arm contact for embargoed HW issues commit e5553ac71e584c3aa443e211ca2afded6071b5b6 Merge: ef11f1b76a59 9a4556bd8f23 Author: Linus Torvalds Date: Fri Feb 21 12:53:53 2020 -0800 Merge tag 'staging-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg KH: "Here are some small staging driver fixes for 5.6-rc3, along with the removal of an unused/unneeded driver as well. The android vsoc driver is not needed anymore by anyone, so it was removed. The other driver fixes are: - ashmem bugfixes - greybus audio driver bugfix - wireless driver bugfixes and tiny cleanups to error paths All of these have been in linux-next for a while now with no reported issues" * tag 'staging-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: rtl8723bs: Remove unneeded goto statements staging: rtl8188eu: Remove some unneeded goto statements staging: rtl8723bs: Fix potential overuse of kernel memory staging: rtl8188eu: Fix potential overuse of kernel memory staging: rtl8723bs: Fix potential security hole staging: rtl8188eu: Fix potential security hole staging: greybus: use after free in gb_audio_manager_remove_all() staging: android: Delete the 'vsoc' driver staging: rtl8723bs: fix copy of overlapping memory staging: android: ashmem: Disallow ashmem memory from being remapped staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi. commit 1cef21842ff3b6043c459b6462183e70295b5b19 Author: Scott Mayhew Date: Fri Feb 21 15:21:38 2020 -0500 NFS: Ensure the fs_context has the correct fs_type before mounting This is necessary because unless userspace explicitly requests fstype "nfs4" (either via "mount -t nfs4" or by calling the "mount.nfs4" helper directly), the fstype will default to "nfs". This was fine on older kernels because the super_block->s_type was set via mount_info->nfs_mod->nfs_fs, which was set when parsing the mount options and subsequently passed in the "type" argument of sget(). After commit f2aedb713c28 ("NFS: Add fs_context support."), sget_fc(), which has no "type" argument, is called instead. In sget_fc(), the super_block->s_type is set via fs_context->fs_type, which was set when the filesystem context was initially created. Reported-by: Patrick Steinhardt Fixes: f2aedb713c28 ("NFS: Add fs_context support.") Signed-off-by: Scott Mayhew Signed-off-by: Anna Schumaker commit ef11f1b76a59833cfadbe88a9513ca01b14a2b88 Merge: cee853e825a9 07e6124a1a46 Author: Linus Torvalds Date: Fri Feb 21 12:48:29 2020 -0800 Merge tag 'tty-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver fixes from Greg KH: "Here are a number of small tty and serial driver fixes for 5.6-rc3 that resolve a bunch of reported issues. They are: - vt selection and ioctl fixes - serdev bugfix - atmel serial driver fixes - qcom serial driver fixes - other minor serial driver fixes All of these have been in linux-next for a while with no reported issues" * tag 'tty-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: vt: selection, close sel_buffer race vt: selection, handle pending signals in paste_selection serial: cpm_uart: call cpm_muram_init before registering console tty: serial: qcom_geni_serial: Fix RX cancel command failure serial: 8250: Check UPF_IRQ_SHARED in advance tty: serial: imx: setup the correct sg entry for tx dma vt: vt_ioctl: fix race in VT_RESIZEX vt: fix scrollback flushing on background consoles tty: serial: tegra: Handle RX transfer in PIO mode if DMA wasn't started tty/serial: atmel: manage shutdown in case of RS485 or ISO7816 mode serdev: ttyport: restore client ops on deregistration serial: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE commit cee853e825a9ab64b54bd53f991e98f832c47317 Merge: 88f8bbfa94ce 8b978be8d067 Author: Linus Torvalds Date: Fri Feb 21 12:44:53 2020 -0800 Merge tag 'usb-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/Thunderbolt fixes from Greg KH: "Here are a number of small USB driver fixes for 5.6-rc3. Included in here are: - MAINTAINER file updates - USB gadget driver fixes - usb core quirk additions and fixes for regressions - xhci driver fixes - usb serial driver id additions and fixes - thunderbolt bugfix Thunderbolt patches come in through here now that USB4 is really thunderbolt. All of these have been in linux-next for a while with no reported issues" * tag 'usb-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (34 commits) USB: misc: iowarrior: add support for the 100 device thunderbolt: Prevent crash if non-active NVMem file is read usb: gadget: udc-xilinx: Fix xudc_stop() kernel-doc format USB: misc: iowarrior: add support for the 28 and 28L devices USB: misc: iowarrior: add support for 2 OEMed devices USB: Fix novation SourceControl XL after suspend xhci: Fix memory leak when caching protocol extended capability PSI tables - take 2 Revert "xhci: Fix memory leak when caching protocol extended capability PSI tables" MAINTAINERS: Sort entries in database for THUNDERBOLT usb: dwc3: debug: fix string position formatting mixup with ret and len usb: gadget: serial: fix Tx stall after buffer overflow usb: gadget: ffs: ffs_aio_cancel(): Save/restore IRQ flags usb: dwc2: Fix SET/CLEAR_FEATURE and GET_STATUS flows usb: dwc2: Fix in ISOC request length checking usb: gadget: composite: Support more than 500mA MaxPower usb: gadget: composite: Fix bMaxPower for SuperSpeedPlus usb: gadget: u_audio: Fix high-speed max packet size usb: dwc3: gadget: Check for IOC/LST bit in TRB->ctrl fields USB: core: clean up endpoint-descriptor parsing USB: quirks: blacklist duplicate ep on Sound Devices USBPre2 ... commit 88f8bbfa94ce18eff7b322256ec4b5f885dea969 Merge: 3dc55dba6723 97d9a4e9619a Author: Linus Torvalds Date: Fri Feb 21 12:18:02 2020 -0800 Merge tag 'drm-fixes-2020-02-21' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Varied fixes for rc3. i915 is the largest, they are seeing some ACPI problems with their CI which hopefully get solved soon [1]. msm has a bunch of fixes for new hw added in the merge, a bunch of amdgpu fixes, and nouveau adds support for some new firmwares for turing tu11x GPUs that were just released into linux-firmware by nvidia, they operate the same as the ones we already have for tu10x so should be fine to hook up. Otherwise it's just misc fixes for panfrost and sun4i. core: - Allow only one rotation argument, and allow zero rotation in video cmdline. i915: - Workaround missing Display Stream Compression (DSC) state readout by forcing modeset when its enabled at probe - Fix EHL port clock voltage level requirements - Fix queuing retire workers on the virtual engine - Fix use of partially initialized waiters - Stop using drm_pci_alloc/drm_pci/free - Fix rewind of RING_TAIL by forcing a context reload - Fix locking on resetting ring->head - Propagate our bug filing URL change to stable kernels panfrost: - Small compiler warning fix for panfrost. - Fix when using performance counters in panfrost when using per fd address space. sun4xi: - Fix dt binding nouveau: - tu11x modesetting fix - ACR/GR firmware support for tu11x (fw is public now) msm: - fix UBWC on GPU and display side for sc7180 - fix DSI suspend/resume issue encountered on sc7180 - fix some breakage on so called "linux-android" devices (fallout from sc7180/a618 support, not seen earlier due to bootloader/firmware differences) - couple other misc fixes amdgpu: - HDCP fixes - xclk fix for raven - GFXOFF fixes" [1] The Intel suspend testing should now be fixed by commit 63fb9623427f ("ACPI: PM: s2idle: Check fixed wakeup events in acpi_s2idle_wake()") * tag 'drm-fixes-2020-02-21' of git://anongit.freedesktop.org/drm/drm: (39 commits) drm/amdgpu/display: clean up hdcp workqueue handling drm/amdgpu: add is_raven_kicker judgement for raven1 drm/i915/gt: Avoid resetting ring->head outside of its timeline mutex drm/i915/execlists: Always force a context reload when rewinding RING_TAIL drm/i915: Wean off drm_pci_alloc/drm_pci_free drm/i915/gt: Protect defer_request() from new waiters drm/i915/gt: Prevent queuing retire workers on the virtual engine drm/i915/dsc: force full modeset whenever DSC is enabled at probe drm/i915/ehl: Update port clock voltage level requirements drm/i915: Update drm/i915 bug filing URL MAINTAINERS: Update drm/i915 bug filing URL drm/i915: Initialise basic fence before acquiring seqno drm/i915/gem: Require per-engine reset support for non-persistent contexts drm/nouveau/kms/gv100-: Re-set LUT after clearing for modesets drm/nouveau/gr/tu11x: initial support drm/nouveau/acr/tu11x: initial support drm/amdgpu/gfx10: disable gfxoff when reading rlc clock drm/amdgpu/gfx9: disable gfxoff when reading rlc clock drm/amdgpu/soc15: fix xclk for raven drm/amd/powerplay: always refetch the enabled features status on dpm enablement ... commit 3dc55dba67231fc22352483f5ca737df96cdc1e6 Merge: b0dd1eb220c0 36a44bcdd8df Author: Linus Torvalds Date: Fri Feb 21 11:59:51 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Limit xt_hashlimit hash table size to avoid OOM or hung tasks, from Cong Wang. 2) Fix deadlock in xsk by publishing global consumer pointers when NAPI is finished, from Magnus Karlsson. 3) Set table field properly to RT_TABLE_COMPAT when necessary, from Jethro Beekman. 4) NLA_STRING attributes are not necessary NULL terminated, deal wiht that in IFLA_ALT_IFNAME. From Eric Dumazet. 5) Fix checksum handling in atlantic driver, from Dmitry Bezrukov. 6) Handle mtu==0 devices properly in wireguard, from Jason A. Donenfeld. 7) Fix several lockdep warnings in bonding, from Taehee Yoo. 8) Fix cls_flower port blocking, from Jason Baron. 9) Sanitize internal map names in libbpf, from Toke Høiland-Jørgensen. 10) Fix RDMA race in qede driver, from Michal Kalderon. 11) Fix several false lockdep warnings by adding conditions to list_for_each_entry_rcu(), from Madhuparna Bhowmik. 12) Fix sleep in atomic in mlx5 driver, from Huy Nguyen. 13) Fix potential deadlock in bpf_map_do_batch(), from Yonghong Song. 14) Hey, variables declared in switch statement before any case statements are not initialized. I learn something every day. Get rids of this stuff in several parts of the networking, from Kees Cook. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (99 commits) bnxt_en: Issue PCIe FLR in kdump kernel to cleanup pending DMAs. bnxt_en: Improve device shutdown method. net: netlink: cap max groups which will be considered in netlink_bind() net: thunderx: workaround BGX TX Underflow issue ionic: fix fw_status read net: disable BRIDGE_NETFILTER by default net: macb: Properly handle phylink on at91rm9200 s390/qeth: fix off-by-one in RX copybreak check s390/qeth: don't warn for napi with 0 budget s390/qeth: vnicc Fix EOPNOTSUPP precedence openvswitch: Distribute switch variables for initialization net: ip6_gre: Distribute switch variables for initialization net: core: Distribute switch variables for initialization udp: rehash on disconnect net/tls: Fix to avoid gettig invalid tls record bpf: Fix a potential deadlock with bpf_map_do_batch bpf: Do not grab the bucket spinlock by default on htab batch ops ice: Wait for VF to be reset/ready before configuration ice: Don't tell the OS that link is going down ice: Don't reject odd values of usecs set by user ... commit b0dd1eb220c06892e0a4098378c4296650f3f8db Merge: 63fb9623427f bb8d00ff51a0 Author: Linus Torvalds Date: Fri Feb 21 11:40:10 2020 -0800 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: - A few y2038 fixes which missed the merge window while dependencies in NFS were being sorted out. - A bunch of fixes. Some minor, some not. * emailed patches from Andrew Morton : MAINTAINERS: use tabs for SAFESETID lib/stackdepot.c: fix global out-of-bounds in stack_slabs mm/sparsemem: pfn_to_page is not valid yet on SPARSEMEM mm/vmscan.c: don't round up scan size for online memory cgroup lib/string.c: update match_string() doc-strings with correct behavior mm/memcontrol.c: lost css_put in memcg_expand_shrinker_maps() mm/swapfile.c: fix a comment in sys_swapon() scripts/get_maintainer.pl: deprioritize old Fixes: addresses get_maintainer: remove uses of P: for maintainer name selftests/vm: add missed tests in run_vmtests include/uapi/linux/swab.h: fix userspace breakage, use __BITS_PER_LONG for swap Revert "ipc,sem: remove uneeded sem_undo_list lock usage in exit_sem()" y2038: hide timeval/timespec/itimerval/itimerspec types y2038: remove unused time32 interfaces y2038: remove ktime to/from timespec/timeval conversion commit bb8d00ff51a0c5e58cebd2e698a778f4e3d34d48 Author: Randy Dunlap Date: Thu Feb 20 20:04:33 2020 -0800 MAINTAINERS: use tabs for SAFESETID Use tabs for indentation instead of spaces for SAFESETID. All (!) other entries in MAINTAINERS use tabs (according to my simple grepping). Link: http://lkml.kernel.org/r/2bb2e52a-2694-816d-57b4-6cabfadd6c1a@infradead.org Signed-off-by: Randy Dunlap Cc: Micah Morton Cc: James Morris Cc: "Serge E. Hallyn" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 305e519ce48e935702c32241f07d393c3c8fed3e Author: Alexander Potapenko Date: Thu Feb 20 20:04:30 2020 -0800 lib/stackdepot.c: fix global out-of-bounds in stack_slabs Walter Wu has reported a potential case in which init_stack_slab() is called after stack_slabs[STACK_ALLOC_MAX_SLABS - 1] has already been initialized. In that case init_stack_slab() will overwrite stack_slabs[STACK_ALLOC_MAX_SLABS], which may result in a memory corruption. Link: http://lkml.kernel.org/r/20200218102950.260263-1-glider@google.com Fixes: cd11016e5f521 ("mm, kasan: stackdepot implementation. Enable stackdepot for SLAB") Signed-off-by: Alexander Potapenko Reported-by: Walter Wu Cc: Dmitry Vyukov Cc: Matthias Brugger Cc: Thomas Gleixner Cc: Josh Poimboeuf Cc: Kate Stewart Cc: Greg Kroah-Hartman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 18e19f195cd888f65643a77a0c6aee8f5be6439a Author: Wei Yang Date: Thu Feb 20 20:04:27 2020 -0800 mm/sparsemem: pfn_to_page is not valid yet on SPARSEMEM When we use SPARSEMEM instead of SPARSEMEM_VMEMMAP, pfn_to_page() doesn't work before sparse_init_one_section() is called. This leads to a crash when hotplug memory: BUG: unable to handle page fault for address: 0000000006400000 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] SMP PTI CPU: 3 PID: 221 Comm: kworker/u16:1 Tainted: G W 5.5.0-next-20200205+ #343 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 Workqueue: kacpi_hotplug acpi_hotplug_work_fn RIP: 0010:__memset+0x24/0x30 Code: cc cc cc cc cc cc 0f 1f 44 00 00 49 89 f9 48 89 d1 83 e2 07 48 c1 e9 03 40 0f b6 f6 48 b8 01 01 01 01 01 01 01 01 48 0f af c6 48 ab 89 d1 f3 aa 4c 89 c8 c3 90 49 89 f9 40 88 f0 48 89 d1 f3 RSP: 0018:ffffb43ac0373c80 EFLAGS: 00010a87 RAX: ffffffffffffffff RBX: ffff8a1518800000 RCX: 0000000000050000 RDX: 0000000000000000 RSI: 00000000000000ff RDI: 0000000006400000 RBP: 0000000000140000 R08: 0000000000100000 R09: 0000000006400000 R10: 0000000000000000 R11: 0000000000000002 R12: 0000000000000000 R13: 0000000000000028 R14: 0000000000000000 R15: ffff8a153ffd9280 FS: 0000000000000000(0000) GS:ffff8a153ab00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000006400000 CR3: 0000000136fca000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: sparse_add_section+0x1c9/0x26a __add_pages+0xbf/0x150 add_pages+0x12/0x60 add_memory_resource+0xc8/0x210 __add_memory+0x62/0xb0 acpi_memory_device_add+0x13f/0x300 acpi_bus_attach+0xf6/0x200 acpi_bus_scan+0x43/0x90 acpi_device_hotplug+0x275/0x3d0 acpi_hotplug_work_fn+0x1a/0x30 process_one_work+0x1a7/0x370 worker_thread+0x30/0x380 kthread+0x112/0x130 ret_from_fork+0x35/0x40 We should use memmap as it did. On x86 the impact is limited to x86_32 builds, or x86_64 configurations that override the default setting for SPARSEMEM_VMEMMAP. Other memory hotplug archs (arm64, ia64, and ppc) also default to SPARSEMEM_VMEMMAP=y. [dan.j.williams@intel.com: changelog update] {rppt@linux.ibm.com: changelog update] Link: http://lkml.kernel.org/r/20200219030454.4844-1-bhe@redhat.com Fixes: ba72b4c8cf60 ("mm/sparsemem: support sub-section hotplug") Signed-off-by: Wei Yang Signed-off-by: Baoquan He Acked-by: David Hildenbrand Reviewed-by: Baoquan He Reviewed-by: Dan Williams Acked-by: Michal Hocko Cc: Mike Rapoport Cc: Oscar Salvador Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 76073c646f5f4999d763f471df9e38a5a912d70d Author: Gavin Shan Date: Thu Feb 20 20:04:24 2020 -0800 mm/vmscan.c: don't round up scan size for online memory cgroup Commit 68600f623d69 ("mm: don't miss the last page because of round-off error") makes the scan size round up to @denominator regardless of the memory cgroup's state, online or offline. This affects the overall reclaiming behavior: the corresponding LRU list is eligible for reclaiming only when its size logically right shifted by @sc->priority is bigger than zero in the former formula. For example, the inactive anonymous LRU list should have at least 0x4000 pages to be eligible for reclaiming when we have 60/12 for swappiness/priority and without taking scan/rotation ratio into account. After the roundup is applied, the inactive anonymous LRU list becomes eligible for reclaiming when its size is bigger than or equal to 0x1000 in the same condition. (0x4000 >> 12) * 60 / (60 + 140 + 1) = 1 ((0x1000 >> 12) * 60) + 200) / (60 + 140 + 1) = 1 aarch64 has 512MB huge page size when the base page size is 64KB. The memory cgroup that has a huge page is always eligible for reclaiming in that case. The reclaiming is likely to stop after the huge page is reclaimed, meaing the further iteration on @sc->priority and the silbing and child memory cgroups will be skipped. The overall behaviour has been changed. This fixes the issue by applying the roundup to offlined memory cgroups only, to give more preference to reclaim memory from offlined memory cgroup. It sounds reasonable as those memory is unlikedly to be used by anyone. The issue was found by starting up 8 VMs on a Ampere Mustang machine, which has 8 CPUs and 16 GB memory. Each VM is given with 2 vCPUs and 2GB memory. It took 264 seconds for all VMs to be completely up and 784MB swap is consumed after that. With this patch applied, it took 236 seconds and 60MB swap to do same thing. So there is 10% performance improvement for my case. Note that KSM is disable while THP is enabled in the testing. total used free shared buff/cache available Mem: 16196 10065 2049 16 4081 3749 Swap: 8175 784 7391 total used free shared buff/cache available Mem: 16196 11324 3656 24 1215 2936 Swap: 8175 60 8115 Link: http://lkml.kernel.org/r/20200211024514.8730-1-gshan@redhat.com Fixes: 68600f623d69 ("mm: don't miss the last page because of round-off error") Signed-off-by: Gavin Shan Acked-by: Roman Gushchin Cc: [4.20+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c11d3fa0116a6bc832a9e387427caa16f8de5ef2 Author: Alexandru Ardelean Date: Thu Feb 20 20:04:21 2020 -0800 lib/string.c: update match_string() doc-strings with correct behavior There were a few attempts at changing behavior of the match_string() helpers (i.e. 'match_string()' & 'sysfs_match_string()'), to change & extend the behavior according to the doc-string. But the simplest approach is to just fix the doc-strings. The current behavior is fine as-is, and some bugs were introduced trying to fix it. As for extending the behavior, new helpers can always be introduced if needed. The match_string() helpers behave more like 'strncmp()' in the sense that they go up to n elements or until the first NULL element in the array of strings. This change updates the doc-strings with this info. Link: http://lkml.kernel.org/r/20200213072722.8249-1-alexandru.ardelean@analog.com Signed-off-by: Alexandru Ardelean Acked-by: Andy Shevchenko Cc: Kees Cook Cc: "Tobin C . Harding" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 75866af62b439859d5146b7093ceb6b482852683 Author: Vasily Averin Date: Thu Feb 20 20:04:18 2020 -0800 mm/memcontrol.c: lost css_put in memcg_expand_shrinker_maps() for_each_mem_cgroup() increases css reference counter for memory cgroup and requires to use mem_cgroup_iter_break() if the walk is cancelled. Link: http://lkml.kernel.org/r/c98414fb-7e1f-da0f-867a-9340ec4bd30b@virtuozzo.com Fixes: 0a4465d34028 ("mm, memcg: assign memcg-aware shrinkers bitmap to memcg") Signed-off-by: Vasily Averin Acked-by: Kirill Tkhai Acked-by: Michal Hocko Reviewed-by: Roman Gushchin Cc: Johannes Weiner Cc: Vladimir Davydov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fed98ef4d8b665316479dd35cbd92d3e2ff470a3 Author: Christoph Hellwig Date: Thu Feb 20 20:04:15 2020 -0800 mm/swapfile.c: fix a comment in sys_swapon() claim_swapfile now always takes i_rwsem. Link: http://lkml.kernel.org/r/20200114161225.309792-2-hch@lst.de Signed-off-by: Christoph Hellwig Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0ef82fcefb99300ede6f4d38a8100845b2dc8e30 Author: Douglas Anderson Date: Thu Feb 20 20:04:12 2020 -0800 scripts/get_maintainer.pl: deprioritize old Fixes: addresses Recently, I found that get_maintainer was causing me to send emails to the old addresses for maintainers. Since I usually just trust the output of get_maintainer to know the right email address, I didn't even look carefully and fired off two patch series that went to the wrong place. Oops. The problem was introduced recently when trying to add signatures from Fixes. The problem was that these email addresses were added too early in the process of compiling our list of places to send. Things added to the list earlier are considered more canonical and when we later added maintainer entries we ended up deduplicating to the old address. Here are two examples using mainline commits (to make it easier to replicate) for the two maintainers that I messed up recently: $ git format-patch d8549bcd0529~..d8549bcd0529 $ ./scripts/get_maintainer.pl 0001-clk-Add-clk_hw*.patch | grep Boyd Stephen Boyd ... $ git format-patch 6d1238aa3395~..6d1238aa3395 $ ./scripts/get_maintainer.pl 0001-arm64-dts-qcom-qcs404*.patch | grep Andy Andy Gross Let's move the adding of addresses from Fixes: to the end since the email addresses from these are much more likely to be older. After this patch the above examples get the right addresses for the two examples. Link: http://lkml.kernel.org/r/20200127095001.1.I41fba9f33590bfd92cd01960161d8384268c6569@changeid Fixes: 2f5bd343694e ("scripts/get_maintainer.pl: add signatures from Fixes: lines in commit message") Signed-off-by: Douglas Anderson Acked-by: Joe Perches Cc: Stephen Boyd Cc: Bjorn Andersson Cc: Andy Gross Cc: Kees Cook Cc: Dan Carpenter Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ef0c08192ac09e29ddd676b3ca6c4a501f277f10 Author: Joe Perches Date: Thu Feb 20 20:04:09 2020 -0800 get_maintainer: remove uses of P: for maintainer name Commit 1ca84ed6425f ("MAINTAINERS: Reclaim the P: tag for Maintainer Entry Profile") changed the use of the "P:" tag from "Person" to "Profile (ie: special subsystem coding styles and characteristics)" Change how get_maintainer.pl parses the "P:" tag to match. Link: http://lkml.kernel.org/r/ca53823fc5d25c0be32ad937d0207a0589c08643.camel@perches.com Signed-off-by: Joe Perches Acked-by: Dan Williams Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9e69fa46275b63f670ced0f11095af1841c73fca Author: SeongJae Park Date: Thu Feb 20 20:04:06 2020 -0800 selftests/vm: add missed tests in run_vmtests The commits introducing 'mlock-random-test'[1], 'map_fiex_noreplace'[2], and 'thuge-gen'[3] have not added those in the 'run_vmtests' script and thus the 'run_tests' command of kselftests doesn't run those. This commit adds those in the script. 'gup_benchmark' and 'transhuge-stress' are also not included in the 'run_vmtests', but this commit does not add those because those are for performance measurement rather than pass/fail tests. [1] commit 26b4224d9961 ("selftests: expanding more mlock selftest") [2] commit 91cbacc34512 ("tools/testing/selftests/vm/map_fixed_noreplace.c: add test for MAP_FIXED_NOREPLACE") [3] commit fcc1f2d5dd34 ("selftests: add a test program for variable huge page sizes in mmap/shmget") Link: http://lkml.kernel.org/r/20200206085144.29126-1-sj38.park@gmail.com Signed-off-by: SeongJae Park Cc: Uladzislau Rezki (Sony) Cc: Masami Hiramatsu Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 467d12f5c7842896d2de3ced74e4147ee29e97c8 Author: Christian Borntraeger Date: Thu Feb 20 20:04:03 2020 -0800 include/uapi/linux/swab.h: fix userspace breakage, use __BITS_PER_LONG for swap QEMU has a funny new build error message when I use the upstream kernel headers: CC block/file-posix.o In file included from /home/cborntra/REPOS/qemu/include/qemu/timer.h:4, from /home/cborntra/REPOS/qemu/include/qemu/timed-average.h:29, from /home/cborntra/REPOS/qemu/include/block/accounting.h:28, from /home/cborntra/REPOS/qemu/include/block/block_int.h:27, from /home/cborntra/REPOS/qemu/block/file-posix.c:30: /usr/include/linux/swab.h: In function `__swab': /home/cborntra/REPOS/qemu/include/qemu/bitops.h:20:34: error: "sizeof" is not defined, evaluates to 0 [-Werror=undef] 20 | #define BITS_PER_LONG (sizeof (unsigned long) * BITS_PER_BYTE) | ^~~~~~ /home/cborntra/REPOS/qemu/include/qemu/bitops.h:20:41: error: missing binary operator before token "(" 20 | #define BITS_PER_LONG (sizeof (unsigned long) * BITS_PER_BYTE) | ^ cc1: all warnings being treated as errors make: *** [/home/cborntra/REPOS/qemu/rules.mak:69: block/file-posix.o] Error 1 rm tests/qemu-iotests/socket_scm_helper.o This was triggered by commit d5767057c9a ("uapi: rename ext2_swab() to swab() and share globally in swab.h"). That patch is doing #include but it uses BITS_PER_LONG. The kernel file asm/bitsperlong.h provide only __BITS_PER_LONG. Let us use the __ variant in swap.h Link: http://lkml.kernel.org/r/20200213142147.17604-1-borntraeger@de.ibm.com Fixes: d5767057c9a ("uapi: rename ext2_swab() to swab() and share globally in swab.h") Signed-off-by: Christian Borntraeger Cc: Yury Norov Cc: Allison Randal Cc: Joe Perches Cc: Thomas Gleixner Cc: William Breathitt Gray Cc: Torsten Hilbrich Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit edf28f4061afe4c2d9eb1c3323d90e882c1d6800 Author: Ioanna Alifieraki Date: Thu Feb 20 20:04:00 2020 -0800 Revert "ipc,sem: remove uneeded sem_undo_list lock usage in exit_sem()" This reverts commit a97955844807e327df11aa33869009d14d6b7de0. Commit a97955844807 ("ipc,sem: remove uneeded sem_undo_list lock usage in exit_sem()") removes a lock that is needed. This leads to a process looping infinitely in exit_sem() and can also lead to a crash. There is a reproducer available in [1] and with the commit reverted the issue does not reproduce anymore. Using the reproducer found in [1] is fairly easy to reach a point where one of the child processes is looping infinitely in exit_sem between for(;;) and if (semid == -1) block, while it's trying to free its last sem_undo structure which has already been freed by freeary(). Each sem_undo struct is on two lists: one per semaphore set (list_id) and one per process (list_proc). The list_id list tracks undos by semaphore set, and the list_proc by process. Undo structures are removed either by freeary() or by exit_sem(). The freeary function is invoked when the user invokes a syscall to remove a semaphore set. During this operation freeary() traverses the list_id associated with the semaphore set and removes the undo structures from both the list_id and list_proc lists. For this case, exit_sem() is called at process exit. Each process contains a struct sem_undo_list (referred to as "ulp") which contains the head for the list_proc list. When the process exits, exit_sem() traverses this list to remove each sem_undo struct. As in freeary(), whenever a sem_undo struct is removed from list_proc, it is also removed from the list_id list. Removing elements from list_id is safe for both exit_sem() and freeary() due to sem_lock(). Removing elements from list_proc is not safe; freeary() locks &un->ulp->lock when it performs list_del_rcu(&un->list_proc) but exit_sem() does not (locking was removed by commit a97955844807 ("ipc,sem: remove uneeded sem_undo_list lock usage in exit_sem()"). This can result in the following situation while executing the reproducer [1] : Consider a child process in exit_sem() and the parent in freeary() (because of semctl(sid[i], NSEM, IPC_RMID)). - The list_proc for the child contains the last two undo structs A and B (the rest have been removed either by exit_sem() or freeary()). - The semid for A is 1 and semid for B is 2. - exit_sem() removes A and at the same time freeary() removes B. - Since A and B have different semid sem_lock() will acquire different locks for each process and both can proceed. The bug is that they remove A and B from the same list_proc at the same time because only freeary() acquires the ulp lock. When exit_sem() removes A it makes ulp->list_proc.next to point at B and at the same time freeary() removes B setting B->semid=-1. At the next iteration of for(;;) loop exit_sem() will try to remove B. The only way to break from for(;;) is for (&un->list_proc == &ulp->list_proc) to be true which is not. Then exit_sem() will check if B->semid=-1 which is and will continue looping in for(;;) until the memory for B is reallocated and the value at B->semid is changed. At that point, exit_sem() will crash attempting to unlink B from the lists (this can be easily triggered by running the reproducer [1] a second time). To prove this scenario instrumentation was added to keep information about each sem_undo (un) struct that is removed per process and per semaphore set (sma). CPU0 CPU1 [caller holds sem_lock(sma for A)] ... freeary() exit_sem() ... ... ... sem_lock(sma for B) spin_lock(A->ulp->lock) ... list_del_rcu(un_A->list_proc) list_del_rcu(un_B->list_proc) Undo structures A and B have different semid and sem_lock() operations proceed. However they belong to the same list_proc list and they are removed at the same time. This results into ulp->list_proc.next pointing to the address of B which is already removed. After reverting commit a97955844807 ("ipc,sem: remove uneeded sem_undo_list lock usage in exit_sem()") the issue was no longer reproducible. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1694779 Link: http://lkml.kernel.org/r/20191211191318.11860-1-ioanna-maria.alifieraki@canonical.com Fixes: a97955844807 ("ipc,sem: remove uneeded sem_undo_list lock usage in exit_sem()") Signed-off-by: Ioanna Alifieraki Acked-by: Manfred Spraul Acked-by: Herton R. Krzesinski Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Cc: Joel Fernandes (Google) Cc: Davidlohr Bueso Cc: Jay Vosburgh Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c766d1472c70d25ad475cf56042af1652e792b23 Author: Arnd Bergmann Date: Thu Feb 20 20:03:57 2020 -0800 y2038: hide timeval/timespec/itimerval/itimerspec types There are no in-kernel users remaining, but there may still be users that include linux/time.h instead of sys/time.h from user space, so leave the types available to user space while hiding them from kernel space. Only the __kernel_old_* versions of these types remain now. Link: http://lkml.kernel.org/r/20200110154232.4104492-4-arnd@arndb.de Signed-off-by: Arnd Bergmann Acked-by: Thomas Gleixner Cc: Deepa Dinamani Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 412c53a680a97cb1ae2c0ab60230e193bee86387 Author: Arnd Bergmann Date: Thu Feb 20 20:03:54 2020 -0800 y2038: remove unused time32 interfaces No users remain, so kill these off before we grow new ones. Link: http://lkml.kernel.org/r/20200110154232.4104492-3-arnd@arndb.de Signed-off-by: Arnd Bergmann Acked-by: Thomas Gleixner Cc: Deepa Dinamani Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 595abbaff5db121428247a2e6ab368734472e101 Author: Arnd Bergmann Date: Thu Feb 20 20:03:50 2020 -0800 y2038: remove ktime to/from timespec/timeval conversion A couple of helpers are now obsolete and can be removed, so drivers can no longer start using them and instead use y2038-safe interfaces. Link: http://lkml.kernel.org/r/20200110154232.4104492-2-arnd@arndb.de Signed-off-by: Arnd Bergmann Acked-by: Thomas Gleixner Cc: Deepa Dinamani Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 63fb9623427fbb44e3782233b6e4714057b76ff2 Author: Rafael J. Wysocki Date: Fri Feb 21 01:46:18 2020 +0100 ACPI: PM: s2idle: Check fixed wakeup events in acpi_s2idle_wake() Commit fdde0ff8590b ("ACPI: PM: s2idle: Prevent spurious SCIs from waking up the system") overlooked the fact that fixed events can wake up the system too and broke RTC wakeup from suspend-to-idle as a result. Fix this issue by checking the fixed events in acpi_s2idle_wake() in addition to checking wakeup GPEs and break out of the suspend-to-idle loop if the status bits of any enabled fixed events are set then. Fixes: fdde0ff8590b ("ACPI: PM: s2idle: Prevent spurious SCIs from waking up the system") Reported-and-tested-by: Chris Wilson Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki Signed-off-by: Linus Torvalds commit e61d2392253220477813b43412090dccdcac601f Author: Guenter Roeck Date: Thu Feb 20 06:29:48 2020 -0800 hwmon: (w83627ehf) Fix crash seen with W83627DHG-P Loading the driver on a system with W83627DHG-P crashes as follows. w83627ehf: Found W83627DHG-P chip at 0x290 BUG: kernel NULL pointer dereference, address: 0000000000000000 PGD 0 P4D 0 Oops: 0000 [#1] SMP NOPTI CPU: 0 PID: 604 Comm: sensors Not tainted 5.6.0-rc2-00055-gca7e1fd1026c #29 Hardware name: /D425KT, BIOS MWPNT10N.86A.0132.2013.0726.1534 07/26/2013 RIP: 0010:w83627ehf_read_string+0x27/0x70 [w83627ehf] Code: [... ] RSP: 0018:ffffb95980657df8 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff96caaa7f5218 RCX: 0000000000000000 RDX: 0000000000000015 RSI: 0000000000000001 RDI: ffff96caa736ec08 RBP: 0000000000000000 R08: ffffb95980657e20 R09: 0000000000000001 R10: ffff96caaa635cc0 R11: 0000000000000000 R12: ffff96caa9f7cf00 R13: ffff96caa9ec3d00 R14: ffff96caa9ec3d28 R15: ffff96caa9ec3d40 FS: 00007fbc7c4e2740(0000) GS:ffff96caabc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000129d58000 CR4: 00000000000006f0 Call Trace: ? cp_new_stat+0x12d/0x160 hwmon_attr_show_string+0x37/0x70 [hwmon] dev_attr_show+0x14/0x50 sysfs_kf_seq_show+0xb5/0x1b0 seq_read+0xcf/0x460 vfs_read+0x9b/0x150 ksys_read+0x5f/0xe0 do_syscall_64+0x48/0x190 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ... Temperature labels are not always present. Adjust sysfs attribute visibility accordingly. Reported-by: Meelis Roos Suggested-by: Dr. David Alan Gilbert Reviewed-by: Dr. David Alan Gilbert Cc: Meelis Roos Cc: Dr. David Alan Gilbert Fixes: 266cd5835947 ("hwmon: (w83627ehf) convert to with_info interface") Signed-off-by: Guenter Roeck commit d80b64ff297e40c2b6f7d7abc1b3eba70d22a068 Author: Miaohe Lin Date: Sat Jan 4 16:56:49 2020 +0800 KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon Reviewed-by: Vitaly Kuznetsov Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 23520b2def95205f132e167cf5b25c609975e959 Author: Miaohe Lin Date: Fri Feb 21 22:04:46 2020 +0800 KVM: apic: avoid calculating pending eoi from an uninitialized val When pv_eoi_get_user() fails, 'val' may remain uninitialized and the return value of pv_eoi_get_pending() becomes random. Fix the issue by initializing the variable. Reviewed-by: Vitaly Kuznetsov Signed-off-by: Miaohe Lin Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit a4443267800af240072280c44521caab61924e55 Author: Vitaly Kuznetsov Date: Thu Feb 20 18:22:04 2020 +0100 KVM: nVMX: clear PIN_BASED_POSTED_INTR from nested pinbased_ctls only when apicv is globally disabled When apicv is disabled on a vCPU (e.g. by enabling KVM_CAP_HYPERV_SYNIC*), nothing happens to VMX MSRs on the already existing vCPUs, however, all new ones are created with PIN_BASED_POSTED_INTR filtered out. This is very confusing and results in the following picture inside the guest: $ rdmsr -ax 0x48d ff00000016 7f00000016 7f00000016 7f00000016 This is observed with QEMU and 4-vCPU guest: QEMU creates vCPU0, does KVM_CAP_HYPERV_SYNIC2 and then creates the remaining three. L1 hypervisor may only check CPU0's controls to find out what features are available and it will be very confused later. Switch to setting PIN_BASED_POSTED_INTR control based on global 'enable_apicv' setting. Signed-off-by: Vitaly Kuznetsov Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 91a5f413af596ad01097e59bf487eb07cb3f1331 Author: Vitaly Kuznetsov Date: Thu Feb 20 18:22:05 2020 +0100 KVM: nVMX: handle nested posted interrupts when apicv is disabled for L1 Even when APICv is disabled for L1 it can (and, actually, is) still available for L2, this means we need to always call vmx_deliver_nested_posted_interrupt() when attempting an interrupt delivery. Suggested-by: Paolo Bonzini Signed-off-by: Vitaly Kuznetsov Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 93fd9666c269877fffb74e14f52792d9c000c1f2 Author: Suravee Suthikulpanit Date: Fri Feb 21 08:52:17 2020 -0600 kvm: x86: svm: Fix NULL pointer dereference when AVIC not enabled Launching VM w/ AVIC disabled together with pass-through device results in NULL pointer dereference bug with the following call trace. RIP: 0010:svm_refresh_apicv_exec_ctrl+0x17e/0x1a0 [kvm_amd] Call Trace: kvm_vcpu_update_apicv+0x44/0x60 [kvm] kvm_arch_vcpu_ioctl_run+0x3f4/0x1c80 [kvm] kvm_vcpu_ioctl+0x3d8/0x650 [kvm] do_vfs_ioctl+0xaa/0x660 ? tomoyo_file_ioctl+0x19/0x20 ksys_ioctl+0x67/0x90 __x64_sys_ioctl+0x1a/0x20 do_syscall_64+0x57/0x190 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Investigation shows that this is due to the uninitialized usage of struct vapu_svm.ir_list in the svm_set_pi_irte_mode(), which is called from svm_refresh_apicv_exec_ctrl(). The ir_list is initialized only if AVIC is enabled. So, fixes by adding a check if AVIC is enabled in the svm_refresh_apicv_exec_ctrl(). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206579 Fixes: 8937d762396d ("kvm: x86: svm: Add support to (de)activate posted interrupts.") Signed-off-by: Suravee Suthikulpanit Tested-by: Alex Williamson Signed-off-by: Paolo Bonzini commit 624e18f92f2ec449c2b3a6d388c0dccc45e4c4d7 Author: Xiaoyao Li Date: Sun Feb 16 18:48:57 2020 +0800 KVM: VMX: Add VMX_FEATURE_USR_WAIT_PAUSE Commit 159348784ff0 ("x86/vmx: Introduce VMX_FEATURES_*") missed bit 26 (enable user wait and pause) of Secondary Processor-based VM-Execution Controls. Add VMX_FEATURE_USR_WAIT_PAUSE flag so that it shows up in /proc/cpuinfo, and use it to define SECONDARY_EXEC_ENABLE_USR_WAIT_PAUSE to make them uniform. Signed-off-by: Xiaoyao Li Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit c9dfd3fb08352d439f0399b6fabe697681d2638c Author: wanpeng li Date: Mon Feb 17 18:37:43 2020 +0800 KVM: nVMX: Hold KVM's srcu lock when syncing vmcs12->shadow For the duration of mapping eVMCS, it derefences ->memslots without holding ->srcu or ->slots_lock when accessing hv assist page. This patch fixes it by moving nested_sync_vmcs12_to_shadow to prepare_guest_switch, where the SRCU is already taken. It can be reproduced by running kvm's evmcs_test selftest. ============================= warning: suspicious rcu usage 5.6.0-rc1+ #53 tainted: g w ioe ----------------------------- ./include/linux/kvm_host.h:623 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by evmcs_test/8507: #0: ffff9ddd156d00d0 (&vcpu->mutex){+.+.}, at: kvm_vcpu_ioctl+0x85/0x680 [kvm] stack backtrace: cpu: 6 pid: 8507 comm: evmcs_test tainted: g w ioe 5.6.0-rc1+ #53 hardware name: dell inc. optiplex 7040/0jctf8, bios 1.4.9 09/12/2016 call trace: dump_stack+0x68/0x9b kvm_read_guest_cached+0x11d/0x150 [kvm] kvm_hv_get_assist_page+0x33/0x40 [kvm] nested_enlightened_vmentry+0x2c/0x60 [kvm_intel] nested_vmx_handle_enlightened_vmptrld.part.52+0x32/0x1c0 [kvm_intel] nested_sync_vmcs12_to_shadow+0x439/0x680 [kvm_intel] vmx_vcpu_run+0x67a/0xe60 [kvm_intel] vcpu_enter_guest+0x35e/0x1bc0 [kvm] kvm_arch_vcpu_ioctl_run+0x40b/0x670 [kvm] kvm_vcpu_ioctl+0x370/0x680 [kvm] ksys_ioctl+0x235/0x850 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x77/0x780 entry_syscall_64_after_hwframe+0x49/0xbe Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini commit 7455a8327674e1a7c9a1f5dd1b0743ab6713f6d1 Author: Miaohe Lin Date: Fri Feb 14 10:32:38 2020 +0800 KVM: x86: don't notify userspace IOAPIC on edge-triggered interrupt EOI Commit 13db77347db1 ("KVM: x86: don't notify userspace IOAPIC on edge EOI") said, edge-triggered interrupts don't set a bit in TMR, which means that IOAPIC isn't notified on EOI. And var level indicates level-triggered interrupt. But commit 3159d36ad799 ("KVM: x86: use generic function for MSI parsing") replace var level with irq.level by mistake. Fix it by changing irq.level to irq.trig_mode. Cc: stable@vger.kernel.org Fixes: 3159d36ad799 ("KVM: x86: use generic function for MSI parsing") Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 89604523a76eb3e13014b2bdab7f8870becee284 Author: Ard Biesheuvel Date: Tue Feb 18 09:15:34 2020 +0100 ARM: 8961/2: Fix Kbuild issue caused by per-task stack protector GCC plugin When using plugins, GCC requires that the -fplugin= options precedes any of its plugin arguments appearing on the command line as well. This is usually not a concern, but as it turns out, this requirement is causing some issues with ARM's per-task stack protector plugin and Kbuild's implementation of $(cc-option). When the per-task stack protector plugin is enabled, and we tweak the implementation of cc-option not to pipe the stderr output of GCC to /dev/null, the following output is generated when GCC is executed in the context of cc-option: cc1: error: plugin arm_ssp_per_task_plugin should be specified before \ -fplugin-arg-arm_ssp_per_task_plugin-tso=1 in the command line cc1: error: plugin arm_ssp_per_task_plugin should be specified before \ -fplugin-arg-arm_ssp_per_task_plugin-offset=24 in the command line These errors will cause any option passed to cc-option to be treated as unsupported, which is obviously incorrect. The cause of this issue is the fact that the -fplugin= argument is added to GCC_PLUGINS_CFLAGS, whereas the arguments above are added to KBUILD_CFLAGS, and the contents of the former get filtered out of the latter before being passed to the GCC running the cc-option test, and so the -fplugin= option does not appear at all on the GCC command line. Adding the arguments to GCC_PLUGINS_CFLAGS instead of KBUILD_CFLAGS would be the correct approach here, if it weren't for the fact that we are using $(eval) to defer the moment that they are added until after asm-offsets.h is generated, which is after the point where the contents of GCC_PLUGINS_CFLAGS are added to KBUILD_CFLAGS. So instead, we have to add our plugin arguments to both. For similar reasons, we cannot append DISABLE_ARM_SSP_PER_TASK_PLUGIN to KBUILD_CFLAGS, as it will be passed to GCC when executing in the context of cc-option, whereas the other plugin arguments will have been filtered out, resulting in a similar error and false negative result as above. So add it to ccflags-y instead. Fixes: 189af4657186da08 ("ARM: smp: add support for per-task stack canaries") Reported-by: Merlijn Wajer Tested-by: Tony Lindgren Acked-by: Kees Cook Reviewed-by: Masahiro Yamada Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King commit f87b1c49bc675da30d8e1e8f4b60b800312c7b90 Author: Kees Cook Date: Mon Feb 10 02:04:17 2020 +0100 ARM: 8958/1: rename missed uaccess .fixup section When the uaccess .fixup section was renamed to .text.fixup, one case was missed. Under ld.bfd, the orphaned section was moved close to .text (since they share the "ax" bits), so things would work normally on uaccess faults. Under ld.lld, the orphaned section was placed outside the .text section, making it unreachable. Link: https://github.com/ClangBuiltLinux/linux/issues/282 Link: https://bugs.chromium.org/p/chromium/issues/detail?id=1020633#c44 Link: https://lore.kernel.org/r/nycvar.YSQ.7.76.1912032147340.17114@knanqh.ubzr Link: https://lore.kernel.org/lkml/202002071754.F5F073F1D@keescook/ Fixes: c4a84ae39b4a5 ("ARM: 8322/1: keep .text and .fixup regions closer together") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Ard Biesheuvel Reviewed-by: Nick Desaulniers Signed-off-by: Russell King commit 45939ce292b4b11159719faaf60aba7d58d5fe33 Author: Florian Fainelli Date: Tue Jan 28 20:22:13 2020 +0100 ARM: 8957/1: VDSO: Match ARMv8 timer in cntvct_functional() It is possible for a system with an ARMv8 timer to run a 32-bit kernel. When this happens we will unconditionally have the vDSO code remove the __vdso_gettimeofday and __vdso_clock_gettime symbols because cntvct_functional() returns false since it does not match that compatibility string. Fixes: ecf99a439105 ("ARM: 8331/1: VDSO initialization, mapping, and synchronization") Signed-off-by: Florian Fainelli Signed-off-by: Russell King commit ae7bbc091351a4c6ebddfbe36eb5eb7a149cd7a2 Merge: f25372ffc3f6 3b7830904e17 Author: Jens Axboe Date: Fri Feb 21 09:18:00 2020 -0700 Merge branch 'nvme-5.6-rc3' of git://git.infradead.org/nvme into block-5.6 Pull NVMe fixes from Keith. * 'nvme-5.6-rc3' of git://git.infradead.org/nvme: nvme-multipath: Fix memory leak with ana_log_buf nvme: Fix uninitialized-variable warning nvme-pci: Use single IRQ vector for old Apple models nvme/pci: Add sleep quirk for Samsung and Toshiba drives commit 7143b5ac5750f404ff3a594b34fdf3fc2f99f828 Author: Stefano Garzarella Date: Fri Feb 21 16:42:16 2020 +0100 io_uring: prevent sq_thread from spinning when it should stop This patch drops 'cur_mm' before calling cond_resched(), to prevent the sq_thread from spinning even when the user process is finished. Before this patch, if the user process ended without closing the io_uring fd, the sq_thread continues to spin until the 'sq_thread_idle' timeout ends. In the worst case where the 'sq_thread_idle' parameter is bigger than INT_MAX, the sq_thread will spin forever. Fixes: 6c271ce2f1d5 ("io_uring: add submission polling") Signed-off-by: Stefano Garzarella Signed-off-by: Jens Axboe commit 4c48e549f39f8ed10cf8a0b6cb96f5eddf0391ce Author: Leonard Crestez Date: Thu Feb 20 18:29:37 2020 +0200 pinctrl: imx: scu: Align imx sc msg structs to 4 The imx SC api strongly assumes that messages are composed out of 4-bytes words but some of our message structs have odd sizeofs. This produces many oopses with CONFIG_KASAN=y. Fix by marking with __aligned(4). Fixes: b96eea718bf6 ("pinctrl: fsl: add scu based pinctrl support") Signed-off-by: Leonard Crestez Link: https://lore.kernel.org/r/bd7ad5fd755739a6d8d5f4f65e03b3ca4f457bd2.1582216144.git.leonard.crestez@nxp.com Signed-off-by: Linus Walleij commit dc7a06b0dbbafac8623c2b7657e61362f2f479a7 Author: Nicolas Belin Date: Thu Feb 20 14:15:12 2020 +0100 pinctrl: meson-gxl: fix GPIOX sdio pins In the gxl driver, the sdio cmd and clk pins are inverted. It has not caused any issue so far because devices using these pins always take both pins so the resulting configuration is OK. Fixes: 0f15f500ff2c ("pinctrl: meson: Add GXL pinctrl definitions") Reviewed-by: Jerome Brunet Signed-off-by: Nicolas Belin Link: https://lore.kernel.org/r/1582204512-7582-1-git-send-email-nbelin@baylibre.com Signed-off-by: Linus Walleij commit a5ae50dea9111db63d30d700766dd5509602f7ad Author: Filipe Manana Date: Thu Feb 20 13:29:49 2020 +0000 Btrfs: fix deadlock during fast fsync when logging prealloc extents beyond eof While logging the prealloc extents of an inode during a fast fsync we call btrfs_truncate_inode_items(), through btrfs_log_prealloc_extents(), while holding a read lock on a leaf of the inode's root (not the log root, the fs/subvol root), and then that function locks the file range in the inode's iotree. This can lead to a deadlock when: * the fsync is ranged * the file has prealloc extents beyond eof * writeback for a range different from the fsync range starts during the fsync * the size of the file is not sector size aligned Because when finishing an ordered extent we lock first a file range and then try to COW the fs/subvol tree to insert an extent item. The following diagram shows how the deadlock can happen. CPU 1 CPU 2 btrfs_sync_file() --> for range [0, 1MiB) --> inode has a size of 1MiB and has 1 prealloc extent beyond the i_size, starting at offset 4MiB flushes all delalloc for the range [0MiB, 1MiB) and waits for the respective ordered extents to complete --> before task at CPU 1 locks the inode, a write into file range [1MiB, 2MiB + 1KiB) is made --> i_size is updated to 2MiB + 1KiB --> writeback is started for that range, [1MiB, 2MiB + 4KiB) --> end offset rounded up to be sector size aligned btrfs_log_dentry_safe() btrfs_log_inode_parent() btrfs_log_inode() btrfs_log_changed_extents() btrfs_log_prealloc_extents() --> does a search on the inode's root --> holds a read lock on leaf X btrfs_finish_ordered_io() --> locks range [1MiB, 2MiB + 4KiB) --> end offset rounded up to be sector size aligned --> tries to cow leaf X, through insert_reserved_file_extent() --> already locked by the task at CPU 1 btrfs_truncate_inode_items() --> gets an i_size of 2MiB + 1KiB, which is not sector size aligned --> tries to lock file range [2MiB, (u64)-1) --> the start range is rounded down from 2MiB + 1K to 2MiB to be sector size aligned --> but the subrange [2MiB, 2MiB + 4KiB) is already locked by task at CPU 2 which is waiting to get a write lock on leaf X for which we are holding a read lock *** deadlock *** This results in a stack trace like the following, triggered by test case generic/561 from fstests: [ 2779.973608] INFO: task kworker/u8:6:247 blocked for more than 120 seconds. [ 2779.979536] Not tainted 5.6.0-rc2-btrfs-next-53 #1 [ 2779.984503] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 2779.990136] kworker/u8:6 D 0 247 2 0x80004000 [ 2779.990457] Workqueue: btrfs-endio-write btrfs_work_helper [btrfs] [ 2779.990466] Call Trace: [ 2779.990491] ? __schedule+0x384/0xa30 [ 2779.990521] schedule+0x33/0xe0 [ 2779.990616] btrfs_tree_read_lock+0x19e/0x2e0 [btrfs] [ 2779.990632] ? remove_wait_queue+0x60/0x60 [ 2779.990730] btrfs_read_lock_root_node+0x2f/0x40 [btrfs] [ 2779.990782] btrfs_search_slot+0x510/0x1000 [btrfs] [ 2779.990869] btrfs_lookup_file_extent+0x4a/0x70 [btrfs] [ 2779.990944] __btrfs_drop_extents+0x161/0x1060 [btrfs] [ 2779.990987] ? mark_held_locks+0x6d/0xc0 [ 2779.990994] ? __slab_alloc.isra.49+0x99/0x100 [ 2779.991060] ? insert_reserved_file_extent.constprop.19+0x64/0x300 [btrfs] [ 2779.991145] insert_reserved_file_extent.constprop.19+0x97/0x300 [btrfs] [ 2779.991222] ? start_transaction+0xdd/0x5c0 [btrfs] [ 2779.991291] btrfs_finish_ordered_io+0x4f4/0x840 [btrfs] [ 2779.991405] btrfs_work_helper+0xaa/0x720 [btrfs] [ 2779.991432] process_one_work+0x26d/0x6a0 [ 2779.991460] worker_thread+0x4f/0x3e0 [ 2779.991481] ? process_one_work+0x6a0/0x6a0 [ 2779.991489] kthread+0x103/0x140 [ 2779.991499] ? kthread_create_worker_on_cpu+0x70/0x70 [ 2779.991515] ret_from_fork+0x3a/0x50 (...) [ 2780.026211] INFO: task fsstress:17375 blocked for more than 120 seconds. [ 2780.027480] Not tainted 5.6.0-rc2-btrfs-next-53 #1 [ 2780.028482] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 2780.030035] fsstress D 0 17375 17373 0x00004000 [ 2780.030038] Call Trace: [ 2780.030044] ? __schedule+0x384/0xa30 [ 2780.030052] schedule+0x33/0xe0 [ 2780.030075] lock_extent_bits+0x20c/0x320 [btrfs] [ 2780.030094] ? btrfs_truncate_inode_items+0xf4/0x1150 [btrfs] [ 2780.030098] ? rcu_read_lock_sched_held+0x59/0xa0 [ 2780.030102] ? remove_wait_queue+0x60/0x60 [ 2780.030122] btrfs_truncate_inode_items+0x133/0x1150 [btrfs] [ 2780.030151] ? btrfs_set_path_blocking+0xb2/0x160 [btrfs] [ 2780.030165] ? btrfs_search_slot+0x379/0x1000 [btrfs] [ 2780.030195] btrfs_log_changed_extents.isra.8+0x841/0x93e [btrfs] [ 2780.030202] ? do_raw_spin_unlock+0x49/0xc0 [ 2780.030215] ? btrfs_get_num_csums+0x10/0x10 [btrfs] [ 2780.030239] btrfs_log_inode+0xf83/0x1124 [btrfs] [ 2780.030251] ? __mutex_unlock_slowpath+0x45/0x2a0 [ 2780.030275] btrfs_log_inode_parent+0x2a0/0xe40 [btrfs] [ 2780.030282] ? dget_parent+0xa1/0x370 [ 2780.030309] btrfs_log_dentry_safe+0x4a/0x70 [btrfs] [ 2780.030329] btrfs_sync_file+0x3f3/0x490 [btrfs] [ 2780.030339] do_fsync+0x38/0x60 [ 2780.030343] __x64_sys_fdatasync+0x13/0x20 [ 2780.030345] do_syscall_64+0x5c/0x280 [ 2780.030348] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 2780.030356] RIP: 0033:0x7f2d80f6d5f0 [ 2780.030361] Code: Bad RIP value. [ 2780.030362] RSP: 002b:00007ffdba3c8548 EFLAGS: 00000246 ORIG_RAX: 000000000000004b [ 2780.030364] RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f2d80f6d5f0 [ 2780.030365] RDX: 00007ffdba3c84b0 RSI: 00007ffdba3c84b0 RDI: 0000000000000003 [ 2780.030367] RBP: 000000000000004a R08: 0000000000000001 R09: 00007ffdba3c855c [ 2780.030368] R10: 0000000000000078 R11: 0000000000000246 R12: 00000000000001f4 [ 2780.030369] R13: 0000000051eb851f R14: 00007ffdba3c85f0 R15: 0000557a49220d90 So fix this by making btrfs_truncate_inode_items() not lock the range in the inode's iotree when the target root is a log root, since it's not needed to lock the range for log roots as the protection from the inode's lock and log_mutex are all that's needed. Fixes: 28553fa992cb28 ("Btrfs: fix race between shrinking truncate and fiemap") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 5f811c57c99205e048926293bb812c750a6ea562 Author: Masami Hiramatsu Date: Fri Feb 21 17:13:52 2020 +0900 bootconfig: Add append value operator support Add append value operator "+=" support to bootconfig syntax. With this operator, user can add new value to the key as an entry of array instead of overwriting. For example, foo = bar ... foo += baz Then the key "foo" has "bar" and "baz" values as an array. Link: http://lkml.kernel.org/r/158227283195.12842.8310503105963275584.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 4e4694d8729f7cd6381f6691e8f83e378fce3160 Author: Masami Hiramatsu Date: Fri Feb 21 17:13:42 2020 +0900 bootconfig: Prohibit re-defining value on same key Currently, bootconfig adds a new value on the existing key to the tail of an array. But this looks a bit confusing because an admin can easily rewrite the original value in the same config file. This rejects the following value re-definition. key = value1 ... key = value2 You should rewrite value1 to value2 in this case. Link: http://lkml.kernel.org/r/158227282199.12842.10110929876059658601.stgit@devnote2 Suggested-by: Steven Rostedt (VMware) Signed-off-by: Masami Hiramatsu [ Fixed spelling of arraies to arrays ] Signed-off-by: Steven Rostedt (VMware) commit 3b7830904e17202524bad1974505a9bfc718d31f Author: Logan Gunthorpe Date: Thu Feb 20 13:29:53 2020 -0700 nvme-multipath: Fix memory leak with ana_log_buf kmemleak reports a memory leak with the ana_log_buf allocated by nvme_mpath_init(): unreferenced object 0xffff888120e94000 (size 8208): comm "nvme", pid 6884, jiffies 4295020435 (age 78786.312s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................ 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000e2360188>] kmalloc_order+0x97/0xc0 [<0000000079b18dd4>] kmalloc_order_trace+0x24/0x100 [<00000000f50c0406>] __kmalloc+0x24c/0x2d0 [<00000000f31a10b9>] nvme_mpath_init+0x23c/0x2b0 [<000000005802589e>] nvme_init_identify+0x75f/0x1600 [<0000000058ef911b>] nvme_loop_configure_admin_queue+0x26d/0x280 [<00000000673774b9>] nvme_loop_create_ctrl+0x2a7/0x710 [<00000000f1c7a233>] nvmf_dev_write+0xc66/0x10b9 [<000000004199f8d0>] __vfs_write+0x50/0xa0 [<0000000065466fef>] vfs_write+0xf3/0x280 [<00000000b0db9a8b>] ksys_write+0xc6/0x160 [<0000000082156b91>] __x64_sys_write+0x43/0x50 [<00000000c34fbb6d>] do_syscall_64+0x77/0x2f0 [<00000000bbc574c9>] entry_SYSCALL_64_after_hwframe+0x49/0xbe nvme_mpath_init() is called by nvme_init_identify() which is called in multiple places (nvme_reset_work(), nvme_passthru_end(), etc). This means nvme_mpath_init() may be called multiple times before nvme_mpath_uninit() (which is only called on nvme_free_ctrl()). When nvme_mpath_init() is called multiple times, it overwrites the ana_log_buf pointer with a new allocation, thus leaking the previous allocation. To fix this, free ana_log_buf before allocating a new one. Fixes: 0d0b660f214dc490 ("nvme: add ANA support") Cc: Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Logan Gunthorpe Signed-off-by: Keith Busch commit 138c9c32f090894614899eca15e0bb7279f59865 Author: Lukas Wunner Date: Tue Feb 18 13:08:00 2020 +0100 spi: spidev: Fix CS polarity if GPIO descriptors are used Commit f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs") amended of_spi_parse_dt() to always set SPI_CS_HIGH for SPI slaves whose Chip Select is defined by a "cs-gpios" devicetree property. This change broke userspace applications which issue an SPI_IOC_WR_MODE ioctl() to an spidev: Chip Select polarity will be incorrect unless the application is changed to set SPI_CS_HIGH. And once changed, it will be incompatible with kernels not containing the commit. Fix by setting SPI_CS_HIGH in spidev_ioctl() (under the same conditions as in of_spi_parse_dt()). Fixes: f3186dd87669 ("spi: Optionally use GPIO descriptors for CS GPIOs") Reported-by: Simon Han Signed-off-by: Lukas Wunner Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/fca3ba7cdc930cd36854666ceac4fbcf01b89028.1582027457.git.lukas@wunner.de Signed-off-by: Mark Brown Cc: stable@vger.kernel.org # v5.1+ commit 136b5cd2e2f97581ae560cff0db2a3b5369112da Author: Yuji Sasaki Date: Fri Feb 14 13:13:40 2020 +0530 spi: qup: call spi_qup_pm_resume_runtime before suspending spi_qup_suspend() will cause synchronous external abort when runtime suspend is enabled and applied, as it tries to access SPI controller register while clock is already disabled in spi_qup_pm_suspend_runtime(). Signed-off-by: Yuji sasaki Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20200214074340.2286170-1-vkoul@kernel.org Signed-off-by: Mark Brown commit d5888c8e55861789a8d9dca73d8a2a279d25822d Author: Geert Uytterhoeven Date: Mon Feb 17 11:17:41 2020 +0100 arm64: defconfig: Replace ARCH_R8A7796 by ARCH_R8A77960 CONFIG_ARCH_R8A7796 was replaced by CONFIG_ARCH_R8A77960, cfr. commits 39e57e14d7eaf818 ("soc: renesas: Add ARCH_R8A77960 for existing R-Car M3-W") and 24240845c87185fe ("soc: renesas: Remove ARCH_R8A7796"). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200217101741.3758-1-geert+renesas@glider.be commit 22946f37557e27697aabc8e4f62642bfe4a17fd8 Author: Jerome Brunet Date: Fri Feb 21 13:11:46 2020 +0100 ASoC: meson: g12a: add tohdmitx reset Reset the g12a hdmi codec glue on probe. This ensure a sane startup state. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200221121146.1498427-1-jbrunet@baylibre.com Signed-off-by: Mark Brown commit b500c086e4110829a308c23e83a7cdc65b26228a Author: Stephan Gerhold Date: Fri Feb 14 12:03:24 2020 +0100 iio: magnetometer: ak8974: Fix negative raw values in sysfs At the moment, reading from in_magn_*_raw in sysfs tends to return large values around 65000, even though the output of ak8974 is actually limited to ±32768. This happens because the value is never converted to the signed 16-bit integer variant. Add an explicit cast to s16 to fix this. Fixes: 7c94a8b2ee8c ("iio: magn: add a driver for AK8974") Signed-off-by: Stephan Gerhold Reviewed-by: Linus Waleij Cc: Signed-off-by: Jonathan Cameron commit 2546287c5fb363a0165933ae2181c92f03e701d0 Author: Zenghui Yu Date: Fri Feb 21 10:07:25 2020 +0800 genirq/irqdomain: Make sure all irq domain flags are distinct This was noticed when printing debugfs for MSIs on my ARM64 server. The new dstate IRQD_MSI_NOMASK_QUIRK came out surprisingly while it should only be the x86 stuff for the time being... The new MSI quirk flag uses the same bit as IRQ_DOMAIN_NAME_ALLOCATED which is oddly defined as bit 6 for no good reason. Switch it to the non used bit 1. Fixes: 6f1a4891a592 ("x86/apic/msi: Plug non-maskable MSI affinity race") Signed-off-by: Zenghui Yu Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20200221020725.2038-1-yuzenghui@huawei.com commit 0daa63ed4c6c4302790ce67b7a90c0997ceb7514 Author: Andrei Otcheretianski Date: Fri Feb 21 10:47:20 2020 +0100 mac80211: Remove a redundant mutex unlock The below-mentioned commit changed the code to unlock *inside* the function, but previously the unlock was *outside*. It failed to remove the outer unlock, however, leading to double unlock. Fix this. Fixes: 33483a6b88e4 ("mac80211: fix missing unlock on error in ieee80211_mark_sta_auth()") Signed-off-by: Andrei Otcheretianski Link: https://lore.kernel.org/r/20200221104719.cce4741cf6eb.I671567b185c8a4c2409377e483fd149ce590f56d@changeid [rewrite commit message to better explain what happened] Signed-off-by: Johannes Berg commit a7ee7d44b57c9ae174088e53a668852b7f4f452d Author: Johannes Berg Date: Fri Feb 21 10:44:50 2020 +0100 cfg80211: check reg_rule for NULL in handle_channel_custom() We may end up with a NULL reg_rule after the loop in handle_channel_custom() if the bandwidth didn't fit, check if this is the case and bail out if so. Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20200221104449.3b558a50201c.I4ad3725c4dacaefd2d18d3cc65ba6d18acd5dbfe@changeid Signed-off-by: Johannes Berg commit 9951ebfcdf2b97dbb28a5d930458424341e61aa2 Author: Johannes Berg Date: Fri Feb 21 10:41:43 2020 +0100 nl80211: fix potential leak in AP start If nl80211_parse_he_obss_pd() fails, we leak the previously allocated ACL memory. Free it in this case. Fixes: 796e90f42b7e ("cfg80211: add support for parsing OBBS_PD attributes") Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20200221104142.835aba4cdd14.I1923b55ba9989c57e13978f91f40bfdc45e60cbd@changeid Signed-off-by: Johannes Berg commit 4c5fd3b791a06021084b42d5610400f846d206b5 Author: Randy Dunlap Date: Wed Feb 19 17:28:21 2020 -0800 zonefs: fix documentation typos etc. Fix typos, spellos, etc. in zonefs.txt. Signed-off-by: Randy Dunlap Cc: Damien Le Moal Reviewed-by: Chaitanya Kulkarni Signed-off-by: Damien Le Moal commit 0ed41b33882c577e1d6582913163a2f5727765fe Author: Florian Fainelli Date: Thu Feb 20 20:14:23 2020 -0800 phy: brcm-sata: Correct MDIO operations for 40nm platforms The logic to write to MDIO registers on 40nm platforms was wrong because it would use the port number as an offset from the base address rather than the bank address of the PHY. This is hardly noticeable because the only programming we do is enabling SSC or not, which is not really causing an observable functional change. Correct that mistake by passing down the struct brcm_sata_port structure down to the brcm_sata_mdio_wr() and brcm_sata_mdio_rd() functions and do the proper offsetting for 28nm, respectively 40nm platforms from there. This means that brcm_sata_pcb_base() is now useless and is therefore removed. Fixes: c1602a1a0fbe ("phy: phy_brcmstb_sata: add support for MIPS-based platforms") Signed-off-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit 0b9f386c4be6493d282aab0af6f9b70c62142777 Author: Guo Ren Date: Wed Feb 12 10:24:52 2020 +0800 csky: Implement copy_thread_tls This is required for clone3 which passes the TLS value through a struct rather than a register. Cc: Amanieu d'Antras Signed-off-by: Guo Ren commit 5b49c82dadfe0f3741778f57385f964ec1514863 Author: MaJun Date: Mon Jan 27 10:56:21 2020 +0800 csky: Add PCI support Add the pci related code for csky arch to support basic pci virtual function, such as qemu virt-pci-9pfs. Signed-off-by: MaJun Signed-off-by: Guo Ren commit dc2efc0028dd5c4bf0f7324806c9a196958aaad3 Author: Ma Jun Date: Sun Feb 2 17:56:58 2020 +0800 csky: Minimize defconfig to support buildroot config.fragment Some bsp (eg: buildroot) has defconfig.fragment design to add more configs into the defconfig in linux source code tree. For example, we could put different cpu configs into different defconfig.fragments, but they all use the same defconfig in Linux. Signed-off-by: Ma Jun Signed-off-by: Guo Ren commit d46869aaab7981f9153d3271228005a52ef18591 Author: Guo Ren Date: Tue Oct 8 14:25:13 2019 +0800 csky: Add setup_initrd check code We should give some necessary check for initrd just like other architectures and it seems that setup_initrd() could be a common code for all architectures. Signed-off-by: Guo Ren commit 4ec575b78521b4573e85aec451930cb040582455 Author: Krzysztof Kozlowski Date: Thu Jan 30 20:22:40 2020 +0100 csky: Cleanup old Kconfig options CONFIG_CLKSRC_OF is gone since commit bb0eb050a577 ("clocksource/drivers: Rename CLKSRC_OF to TIMER_OF"). The platform already selects TIMER_OF. CONFIG_HAVE_DMA_API_DEBUG is gone since commit 6e88628d03dd ("dma-debug: remove CONFIG_HAVE_DMA_API_DEBUG"). CONFIG_DEFAULT_DEADLINE is gone since commit f382fb0bcef4 ("block: remove legacy IO schedulers"). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Guo Ren commit bebd26ab623616728d6e72b5c74a47bfff5287d8 Author: Randy Dunlap Date: Fri Jan 31 17:52:30 2020 -0800 arch/csky: fix some Kconfig typos Fix wording in help text for the CPU_HAS_LDSTEX symbol. Signed-off-by: Randy Dunlap Signed-off-by: Guo Ren Signed-off-by: Guo Ren commit 2305f60b76110cb3e8658a4ae85d1f7eb0c66a5b Author: Guo Ren Date: Sun Feb 2 14:11:11 2020 +0800 csky: Fixup compile warning for three unimplemented syscalls Implement fstat64, fstatat64, clone3 syscalls to fixup checksyscalls.sh compile warnings. Signed-off-by: Guo Ren commit 9025fd48a8aeddade845afa353d4bbab7f19dbf2 Author: Guo Ren Date: Sun Feb 2 10:58:38 2020 +0800 csky: Remove unused cache implementation Only for coding convention, these codes are unnecessary for abiv2. Signed-off-by: Guo Ren commit 359ae00d12589c31cf103894d0f32588d523ca83 Author: Guo Ren Date: Sun Feb 2 09:58:42 2020 +0800 csky: Fixup ftrace modify panic During ftrace init, linux will replace all function prologues (call_mcout) with nops, but it need flush_dcache and invalidate_icache to make it work. So flush_cache functions couldn't be nested called by ftrace framework. Signed-off-by: Guo Ren commit 997153b9a75c08d545ad45e6f8ceb432435d2425 Author: Guo Ren Date: Fri Jan 31 20:33:10 2020 +0800 csky: Add flush_icache_mm to defer flush icache all Some CPUs don't support icache.va instruction to maintain the whole smp cores' icache. Using icache.all + IPI casue a lot on performace and using defer mechanism could reduce the number of calling icache _flush_all functions. Signed-off-by: Guo Ren commit cc1f6563a92ced0889775d0587316d725b6e1a68 Author: Guo Ren Date: Mon Jan 27 19:57:29 2020 +0800 csky: Optimize abiv2 copy_to_user_page with VM_EXEC Only when vma is for VM_EXEC, we need sync dcache & icache. eg: - gdb ptrace modify user space instruction code area. Add VM_EXEC condition to reduce unnecessary cache flush. The abiv1 cpus' cache are all VIPT, so we still need to deal with dcache aliasing problem. But there is optimized way to use cache color, just like what's done in arch/csky/abiv1/inc/abi/page.h. Signed-off-by: Guo Ren commit d936a7e708dcf22344c4420e8b0e36f5d5f8c073 Author: Guo Ren Date: Mon Jan 27 01:20:36 2020 +0800 csky: Enable defer flush_dcache_page for abiv2 cpus (807/810/860) Instead of flushing cache per update_mmu_cache() called, we use flush_dcache_page to reduce the frequency of flashing the cache. As abiv2 cpus are all PIPT for icache & dcache, we needn't handle dcache aliasing problem. But their icache can't snoop dcache, so we still need sync_icache_dcache in update_mmu_cache(). Signed-off-by: Guo Ren commit a1176734132c630b50908c36563e05fb3599682c Author: Guo Ren Date: Sat Jan 25 00:37:09 2020 +0800 csky: Remove unnecessary flush_icache_* implementation The abiv2 CPUs are all PIPT cache, so there is no need to implement flush_icache_page function. The function flush_icache_user_range hasn't been used, so just remove it. The function flush_cache_range is not necessary for PIPT cache when tlb mapping changed. Signed-off-by: Guo Ren commit 761b4f694cb90b63ca2739ac8a8a176342636e5e Author: Guo Ren Date: Wed Jan 22 11:15:14 2020 +0800 csky: Support icache flush without specific instructions Some CPUs don't support icache specific instructions to flush icache lines in broadcast way. We use cpu control registers to flush local icache and use IPI to notify other cores. Signed-off-by: Guo Ren commit a736fa1ed772e3640e1bfaab36032c5a285d6a7b Author: Guo Ren Date: Sat Jan 11 13:44:32 2020 +0800 csky/Kconfig: Add Kconfig.platforms to support some drivers Such as snps,dw-apb-ictl Signed-off-by: Guo Ren commit c9492737b25ca32679ba3163609d938c9abfd508 Author: Guo Ren Date: Tue Jan 7 12:21:25 2020 +0800 csky/smp: Fixup boot failed when CONFIG_SMP If we use a non-ipi-support interrupt controller, it will cause panic here. We should let cpu up and work with CONFIG_SMP, when we use a non-ipi intc. Signed-off-by: Guo Ren commit f8e17c17b81070f38062dce79ca7f4541851dadd Author: Guo Ren Date: Tue Dec 17 11:12:55 2019 +0800 csky: Set regs->usp to kernel sp, when the exception is from kernel In the past, we didn't care about kernel sp when saving pt_reg. But in some cases, we still need pt_reg->usp to represent the kernel stack before enter exception. For cmpxhg in atomic.S, we need save and restore usp for above. Signed-off-by: Guo Ren commit 7f4a567332f035ab16b29010fbd04a0f10183c77 Author: Guo Ren Date: Mon Dec 30 15:53:37 2019 +0800 csky/mm: Fixup export invalid_pte_table symbol There is no present bit in csky pmd hardware, so we need to prepare invalid_pte_table for empty pmd entry and the functions (pmd_none & pmd_present) in pgtable.h need invalid_pte_talbe to get result. If a module use these functions, we need export the symbol for it. Signed-off-by: Guo Ren Cc: Mo Qihui Cc: Zhange Jian commit f136008f31e91060d6b6e6e031cb2c827448e280 Author: Guo Ren Date: Sun Dec 1 22:34:19 2019 +0800 csky: Separate fixaddr_init from highmem After fixaddr_init is separated from highmem, we could use tcm without highmem selected. (610 (abiv1) don't support highmem, but it could use tcm now.) Signed-off-by: Guo Ren commit f525bb2c9e7cf1e3c43ab57704c9e1c836d30b34 Author: Guo Ren Date: Wed Nov 27 08:44:33 2019 +0800 csky: Tightly-Coupled Memory or Sram support The implementation are not only used by TCM but also used by sram on SOC bus. It follow existed linux tcm software interface, so that old tcm application codes could be re-used directly. Software interface list in asm/tcm.h: - Variables/Const: __tcmdata, __tcmconst - Functions: __tcmfunc, __tcmlocalfunc - Malloc/Free: tcm_alloc, tcm_free In linux menuconfig: - Choose a TCM contain instrctions + data or separated in ITCM/DTCM. - Determine TCM_BASE (DTCM_BASE) in phyiscal address. - Determine size of TCM or ITCM(DTCM) in page counts. Here is hello tcm example from Documentation/arm/tcm.rst which could be directly used: /* Uninitialized data */ static u32 __tcmdata tcmvar; /* Initialized data */ static u32 __tcmdata tcmassigned = 0x2BADBABEU; /* Constant */ static const u32 __tcmconst tcmconst = 0xCAFEBABEU; static void __tcmlocalfunc tcm_to_tcm(void) { int i; for (i = 0; i < 100; i++) tcmvar ++; } static void __tcmfunc hello_tcm(void) { /* Some abstract code that runs in ITCM */ int i; for (i = 0; i < 100; i++) { tcmvar ++; } tcm_to_tcm(); } static void __init test_tcm(void) { u32 *tcmem; int i; hello_tcm(); printk("Hello TCM executed from ITCM RAM\n"); printk("TCM variable from testrun: %u @ %p\n", tcmvar, &tcmvar); tcmvar = 0xDEADBEEFU; printk("TCM variable: 0x%x @ %p\n", tcmvar, &tcmvar); printk("TCM assigned variable: 0x%x @ %p\n", tcmassigned, &tcmassigned); printk("TCM constant: 0x%x @ %p\n", tcmconst, &tcmconst); /* Allocate some TCM memory from the pool */ tcmem = tcm_alloc(20); if (tcmem) { printk("TCM Allocated 20 bytes of TCM @ %p\n", tcmem); tcmem[0] = 0xDEADBEEFU; tcmem[1] = 0x2BADBABEU; tcmem[2] = 0xCAFEBABEU; tcmem[3] = 0xDEADBEEFU; tcmem[4] = 0x2BADBABEU; for (i = 0; i < 5; i++) printk("TCM tcmem[%d] = %08x\n", i, tcmem[i]); tcm_free(tcmem, 20); } } TODO: - Separate fixup mapping from highmem - Support abiv1 Signed-off-by: Guo Ren commit 2f78c73f78c39dabc5c44ad8dd61fd6ec65636d6 Author: Mao Han Date: Fri Oct 11 10:56:55 2019 +0800 csky: Initial stack protector support This is a basic -fstack-protector support without per-task canary switching. The protector will report something like when stack corruption is detected: It's tested with strcpy local array overflow in sys_kill and get: stack-protector: Kernel stack is corrupted in: sys_kill+0x23c/0x23c TODO: - Support task switch for different cannary Signed-off-by: Mao Han Signed-off-by: Guo Ren commit fd1d98650ac0042d475155116e65fd17eb379542 Author: Guo Ren Date: Tue Oct 8 14:37:02 2019 +0800 MAINTAINERS: csky: Add mailing list for csky Add mailing list and it's convenient for maintain C-SKY subsystem. Signed-off-by: Guo Ren commit df3da4ea5a0fc5d115c90d5aa6caa4dd433750a7 Author: Suraj Jitindar Singh Date: Tue Feb 18 19:08:50 2020 -0800 ext4: fix potential race between s_group_info online resizing and access During an online resize an array of pointers to s_group_info gets replaced so it can get enlarged. If there is a concurrent access to the array in ext4_get_group_info() and this memory has been reused then this can lead to an invalid memory access. Link: https://bugzilla.kernel.org/show_bug.cgi?id=206443 Link: https://lore.kernel.org/r/20200221053458.730016-3-tytso@mit.edu Signed-off-by: Suraj Jitindar Singh Signed-off-by: Theodore Ts'o Reviewed-by: Balbir Singh Cc: stable@kernel.org commit 1d0c3924a92e69bfa91163bda83c12a994b4d106 Author: Theodore Ts'o Date: Sat Feb 15 16:40:37 2020 -0500 ext4: fix potential race between online resizing and write operations During an online resize an array of pointers to buffer heads gets replaced so it can get enlarged. If there is a racing block allocation or deallocation which uses the old array, and the old array has gotten reused this can lead to a GPF or some other random kernel memory getting modified. Link: https://bugzilla.kernel.org/show_bug.cgi?id=206443 Link: https://lore.kernel.org/r/20200221053458.730016-2-tytso@mit.edu Reported-by: Suraj Jitindar Singh Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 97d9a4e9619a822c5baf6a63e6f5b80fee4d4213 Merge: c1368b347fe8 15de9cb5c9c8 Author: Dave Airlie Date: Fri Feb 21 12:46:54 2020 +1000 Merge tag 'drm-intel-fixes-2020-02-20' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.6-rc3: - Workaround missing Display Stream Compression (DSC) state readout by forcing modeset when its enabled at probe - Fix EHL port clock voltage level requirements - Fix queuing retire workers on the virtual engine - Fix use of partially initialized waiters - Stop using drm_pci_alloc/drm_pci/free - Fix rewind of RING_TAIL by forcing a context reload - Fix locking on resetting ring->head - Propagate our bug filing URL change to stable kernels Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87y2sxtsrd.fsf@intel.com commit c1368b347fe81d9271412797fea8788dd5dc16b3 Merge: 7c42545cad10 dde2bb2da01e Author: Dave Airlie Date: Fri Feb 21 12:30:23 2020 +1000 Merge tag 'drm-misc-fixes-2020-02-20' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v5.6-rc3: - Fix dt binding for sunxi. - Allow only 1 rotation argument, and allow 0 rotation in video cmdline. - Small compiler warning fix for panfrost. - Fix when using performance counters in panfrost when using per fd address space. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/f5a6370d-9898-6c72-43e4-5bb56a99b6f2@linux.intel.com commit 36a44bcdd8df092d76c11bc213e81c5817d4e302 Merge: 3a20773beeee 8743db4a9acf Author: David S. Miller Date: Thu Feb 20 16:05:42 2020 -0800 Merge branch 'bnxt_en-shutdown-and-kexec-kdump-related-fixes' Michael Chan says: ==================== bnxt_en: shutdown and kexec/kdump related fixes. 2 small patches to fix kexec shutdown and kdump kernel driver init issues. ==================== Signed-off-by: David S. Miller commit 8743db4a9acfd51f805ac0c87bcaae92c42d1061 Author: Vasundhara Volam Date: Thu Feb 20 17:26:35 2020 -0500 bnxt_en: Issue PCIe FLR in kdump kernel to cleanup pending DMAs. If crashed kernel does not shutdown the NIC properly, PCIe FLR is required in the kdump kernel in order to initialize all the functions properly. Fixes: d629522e1d66 ("bnxt_en: Reduce memory usage when running in kdump kernel.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 5567ae4a8d569d996d0d88d0eceb76205e4c7ce5 Author: Vasundhara Volam Date: Thu Feb 20 17:26:34 2020 -0500 bnxt_en: Improve device shutdown method. Especially when bnxt_shutdown() is called during kexec, we need to disable MSIX and disable Bus Master to completely quiesce the device. Make these 2 calls unconditionally in the shutdown method. Fixes: c20dc142dd7b ("bnxt_en: Disable bus master during PCI shutdown and driver unload.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 3a20773beeeeadec41477a5ba872175b778ff752 Author: Nikolay Aleksandrov Date: Thu Feb 20 16:42:13 2020 +0200 net: netlink: cap max groups which will be considered in netlink_bind() Since nl_groups is a u32 we can't bind more groups via ->bind (netlink_bind) call, but netlink has supported more groups via setsockopt() for a long time and thus nlk->ngroups could be over 32. Recently I added support for per-vlan notifications and increased the groups to 33 for NETLINK_ROUTE which exposed an old bug in the netlink_bind() code causing out-of-bounds access on archs where unsigned long is 32 bits via test_bit() on a local variable. Fix this by capping the maximum groups in netlink_bind() to BITS_PER_TYPE(u32), effectively capping them at 32 which is the minimum of allocated groups and the maximum groups which can be bound via netlink_bind(). CC: Christophe Leroy CC: Richard Guy Briggs Fixes: 4f520900522f ("netlink: have netlink per-protocol bind function return an error code.") Reported-by: Erhard F. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 971617c3b761c876d686a2188220a33898c90e99 Author: Tim Harvey Date: Wed Feb 19 15:19:36 2020 -0800 net: thunderx: workaround BGX TX Underflow issue While it is not yet understood why a TX underflow can easily occur for SGMII interfaces resulting in a TX wedge. It has been found that disabling/re-enabling the LMAC resolves the issue. Signed-off-by: Tim Harvey Reviewed-by: Robert Jones Signed-off-by: David S. Miller commit 68b759a75d6257759d1e37ff13f2d0659baf1112 Author: Shannon Nelson Date: Wed Feb 19 14:59:42 2020 -0800 ionic: fix fw_status read The fw_status field is only 8 bits, so fix the read. Also, we only want to look at the one status bit, to allow for future use of the other bits, and watch for a bad PCI read. Fixes: 97ca486592c0 ("ionic: add heartbeat check") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit ebe7acadf5a9c4b67475e766e0e80ae6a2a79c61 Merge: ca7e1fd1026c 5780b9abd530 Author: Linus Torvalds Date: Thu Feb 20 15:15:16 2020 -0800 Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull IMA fixes from Mimi Zohar: "Two bug fixes and an associated change for each. The one that adds SM3 to the IMA list of supported hash algorithms is a simple change, but could be considered a new feature" * 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: ima: add sm3 algorithm to hash algorithm configuration list crypto: rename sm3-256 to sm3 in hash_algo_name efi: Only print errors about failing to get certs if EFI vars are found x86/ima: use correct identifier for SetupMode variable commit 98bda63e20daab95bdc084ce00459a4f622a0505 Author: Roman Kiryanov Date: Wed Feb 19 13:40:06 2020 -0800 net: disable BRIDGE_NETFILTER by default The description says 'If unsure, say N.' but the module is built as M by default (once the dependencies are satisfied). When the module is selected (Y or M), it enables NETFILTER_FAMILY_BRIDGE and SKB_EXTENSIONS which alter kernel internal structures. We (Android Studio Emulator) currently do not use this module and think this it is more consistent to have it disabled by default as opposite to disabling it explicitly to prevent enabling NETFILTER_FAMILY_BRIDGE and SKB_EXTENSIONS. Signed-off-by: Roman Kiryanov Acked-by: Florian Westphal Signed-off-by: David S. Miller commit ac2fcfa9fd26db67d7000677c05629c34cc94564 Author: Alexandre Belloni Date: Wed Feb 19 15:15:51 2020 +0100 net: macb: Properly handle phylink on at91rm9200 at91ether_init was handling the phy mode and speed but since the switch to phylink, the NCFGR register got overwritten by macb_mac_config(). The issue is that the RM9200_RMII bit and the MACB_CLK_DIV32 field are cleared but never restored as they conflict with the PAE, GBE and PCSSEL bits. Add new capability to differentiate between EMAC and the other versions of the IP and use it to set and avoid clearing the relevant bits. Also, this fixes a NULL pointer dereference in macb_mac_link_up as the EMAC doesn't use any rings/bufffers/queues. Fixes: 7897b071ac3b ("net: macb: convert to phylink") Signed-off-by: Alexandre Belloni Signed-off-by: David S. Miller commit 88b913718db94697497028b85acbec8b180a4333 Author: Masami Hiramatsu Date: Thu Feb 20 21:19:42 2020 +0900 bootconfig: Print array as multiple commands for legacy command line Print arraied values as multiple same options for legacy kernel command line. With this rule, if the "kernel.*" and "init.*" array entries in bootconfig are printed out as multiple same options, e.g. kernel { console = "ttyS0,115200" console += "tty0" } will be correctly converted to console="ttyS0,115200" console="tty0" in the kernel command line. Link: http://lkml.kernel.org/r/158220118213.26565.8163300497009463916.stgit@devnote2 Reported-by: Borislav Petkov Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit a24d286f36104ed45108a5a36f3868938434772f Author: Masami Hiramatsu Date: Thu Feb 20 21:19:12 2020 +0900 bootconfig: Reject subkey and value on same parent key Reject if a value node is mixed with subkey node on same parent key node. A value node can not co-exist with subkey node under some key node, e.g. key = value key.subkey = another-value This is not be allowed because bootconfig API is not designed to handle such case. Link: http://lkml.kernel.org/r/158220115232.26565.7792340045009731803.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 15e95037b45f24f9ab6d4f0bd101d4df0be24c1d Author: Masami Hiramatsu Date: Thu Feb 20 21:18:52 2020 +0900 tools/bootconfig: Remove unneeded error message silencer Remove error message silent knob, we don't need it anymore because we can check if there is a bootconfig by checking the magic word. If there is a magic word, but failed to load a bootconfig from initrd, there is a real problem. Link: http://lkml.kernel.org/r/158220113256.26565.14264598654427773104.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 85c46b78da58398be1c5166f55063c0512decd39 Author: Masami Hiramatsu Date: Thu Feb 20 21:18:42 2020 +0900 bootconfig: Add bootconfig magic word for indicating bootconfig explicitly Add bootconfig magic word to the end of bootconfig on initrd image for indicating explicitly the bootconfig is there. Also tools/bootconfig treats wrong size or wrong checksum or parse error as an error, because if there is a bootconfig magic word, there must be a bootconfig. The bootconfig magic word is "#BOOTCONFIG\n", 12 bytes word. Thus the block image of the initrd file with bootconfig is as follows. [Initrd][bootconfig][size][csum][#BOOTCONFIG\n] Link: http://lkml.kernel.org/r/158220112263.26565.3944814205960612841.stgit@devnote2 Suggested-by: Steven Rostedt Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit d8a953ddde5ec30a36810d0a892c3949b50849e9 Author: Masami Hiramatsu Date: Thu Feb 20 21:18:33 2020 +0900 bootconfig: Set CONFIG_BOOT_CONFIG=n by default Set CONFIG_BOOT_CONFIG=n by default. This also warns user if CONFIG_BOOT_CONFIG=n but "bootconfig" is given in the kernel command line. Link: http://lkml.kernel.org/r/158220111291.26565.9036889083940367969.stgit@devnote2 Suggested-by: Steven Rostedt Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 7ab215f22d04067094de8c81c20ba4c565ff8dd4 Author: Masami Hiramatsu Date: Mon Feb 17 18:52:39 2020 +0900 tracing: Clear trace_state when starting trace Clear trace_state data structure when starting trace in __synth_event_trace_start() internal function. Currently trace_state is initialized only in the synth_event_trace_start() API, but the trace_state in synth_event_trace() and synth_event_trace_array() are on the stack without initialization. This means those APIs will see wrong parameters and wil skip closing process in __synth_event_trace_end() because trace_state->disabled may be !0. Link: http://lkml.kernel.org/r/158193315899.8868.1781259176894639952.stgit@devnote2 Reviewed-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 08d9e686426f7557d3f1cda219ff907397c89d53 Author: Qiujun Huang Date: Sun Feb 16 19:28:31 2020 +0800 bootconfig: Mark boot_config_checksum() static In fact, this function is only used in this file, so mark it with 'static'. Link: http://lkml.kernel.org/r/1581852511-14163-1-git-send-email-hqjagain@gmail.com Acked-by: Masami Hiramatsu Signed-off-by: Qiujun Huang Signed-off-by: Steven Rostedt (VMware) commit 78041c0c9e935d9ce4086feeff6c569ed88ddfd4 Author: Steven Rostedt (VMware) Date: Thu Feb 20 15:38:01 2020 -0500 tracing: Disable trace_printk() on post poned tests The tracing seftests checks various aspects of the tracing infrastructure, and one is filtering. If trace_printk() is active during a self test, it can cause the filtering to fail, which will disable that part of the trace. To keep the selftests from failing because of trace_printk() calls, trace_printk() checks the variable tracing_selftest_running, and if set, it does not write to the tracing buffer. As some tracers were registered earlier in boot, the selftest they triggered would fail because not all the infrastructure was set up for the full selftest. Thus, some of the tests were post poned to when their infrastructure was ready (namely file system code). The postpone code did not set the tracing_seftest_running variable, and could fail if a trace_printk() was added and executed during their run. Cc: stable@vger.kernel.org Fixes: 9afecfbb95198 ("tracing: Postpone tracer start-up tests till the system is more robust") Signed-off-by: Steven Rostedt (VMware) commit 3c18a9be7c9d4f53239795282c5d927f73f534b3 Author: Steven Rostedt (VMware) Date: Thu Feb 20 16:29:50 2020 -0500 tracing: Have synthetic event test use raw_smp_processor_id() The test code that tests synthetic event creation pushes in as one of its test fields the current CPU using "smp_processor_id()". As this is just something to see if the value is correctly passed in, and the actual CPU used does not matter, use raw_smp_processor_id(), otherwise with debug preemption enabled, a warning happens as the smp_processor_id() is called without preemption enabled. Link: http://lkml.kernel.org/r/20200220162950.35162579@gandalf.local.home Reviewed-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 8645e56a4ad6dcbf504872db7f14a2f67db88ef2 Author: Thomas Gleixner Date: Wed Feb 19 18:30:26 2020 +0100 xen: Enable interrupts when calling _cond_resched() xen_maybe_preempt_hcall() is called from the exception entry point xen_do_hypervisor_callback with interrupts disabled. _cond_resched() evades the might_sleep() check in cond_resched() which would have caught that and schedule_debug() unfortunately lacks a check for irqs_disabled(). Enable interrupts around the call and use cond_resched() to catch future issues. Fixes: fdfd811ddde3 ("x86/xen: allow privcmd hypercalls to be preempted") Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/878skypjrh.fsf@nanos.tec.linutronix.de Reviewed-by: Juergen Gross Signed-off-by: Boris Ostrovsky commit ac0a68997935c4acb92eaae5ad8982e0bb432d56 Author: Matthias Reichl Date: Thu Feb 20 21:29:56 2020 +0100 ASoC: pcm512x: Fix unbalanced regulator enable call in probe error path When we get a clock error during probe we have to call regulator_bulk_disable before bailing out, otherwise we trigger a warning in regulator_put. Fix this by using "goto err" like in the error cases above. Fixes: 5a3af1293194d ("ASoC: pcm512x: Add PCM512x driver") Signed-off-by: Matthias Reichl Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200220202956.29233-1-hias@horus.com Signed-off-by: Mark Brown commit 784bd0847eda032ed2f3522f87250655a18c0190 Author: Tom Zanussi Date: Fri Feb 14 16:56:41 2020 -0600 tracing: Fix number printing bug in print_synth_event() Fix a varargs-related bug in print_synth_event() which resulted in strange output and oopses on 32-bit x86 systems. The problem is that trace_seq_printf() expects the varargs to match the format string, but print_synth_event() was always passing u64 values regardless. This results in unspecified behavior when unpacking with va_arg() in trace_seq_printf(). Add a function that takes the size into account when calling trace_seq_printf(). Before: modprobe-1731 [003] .... 919.039758: gen_synth_test: next_pid_field=777(null)next_comm_field=hula hoops ts_ns=1000000 ts_ms=1000 cpu=3(null)my_string_field=thneed my_int_field=598(null) After: insmod-1136 [001] .... 36.634590: gen_synth_test: next_pid_field=777 next_comm_field=hula hoops ts_ns=1000000 ts_ms=1000 cpu=1 my_string_field=thneed my_int_field=598 Link: http://lkml.kernel.org/r/a9b59eb515dbbd7d4abe53b347dccf7a8e285657.1581720155.git.zanussi@kernel.org Reported-by: Steven Rostedt (VMware) Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 3843083772dc2afde790a6d7160658b00a808da1 Author: Tom Zanussi Date: Fri Feb 14 16:56:40 2020 -0600 tracing: Check that number of vals matches number of synth event fields Commit 7276531d4036('tracing: Consolidate trace() functions') inadvertently dropped the synth_event_trace() and synth_event_trace_array() checks that verify the number of values passed in matches the number of fields in the synthetic event being traced, so add them back. Link: http://lkml.kernel.org/r/32819cac708714693669e0dfe10fe9d935e94a16.1581720155.git.zanussi@kernel.org Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 1d9d4c90194a8c3b2f7da9f4bf3f8ba2ed810656 Author: Tom Zanussi Date: Fri Feb 14 16:56:39 2020 -0600 tracing: Make synth_event trace functions endian-correct synth_event_trace(), synth_event_trace_array() and __synth_event_add_val() write directly into the trace buffer and need to take endianness into account, like trace_event_raw_event_synth() does. Link: http://lkml.kernel.org/r/2011354355e405af9c9d28abba430d1f5ff7771a.1581720155.git.zanussi@kernel.org Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 279eef0531928a6669230879a6eed081513ad5a3 Author: Tom Zanussi Date: Fri Feb 14 16:56:38 2020 -0600 tracing: Make sure synth_event_trace() example always uses u64 synth_event_trace() is the varargs version of synth_event_trace_array(), which takes an array of u64, as do synth_event_add_val() et al. To not only be consistent with those, but also to address the fact that synth_event_trace() expects every arg to be of the same type since it doesn't also pass in e.g. a format string, the caller needs to make sure all args are of the same type, u64. u64 is used because it needs to accomodate the largest type available in synthetic events, which is u64. This fixes the bug reported by the kernel test robot/Rong Chen. Link: https://lore.kernel.org/lkml/20200212113444.GS12867@shao2-debian/ Link: http://lkml.kernel.org/r/894c4e955558b521210ee0642ba194a9e603354c.1581720155.git.zanussi@kernel.org Fixes: 9fe41efaca084 ("tracing: Add synth event generation test module") Reported-by: kernel test robot Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 0d5b8d7055652fd6b079671d00fa78fcd0e2cd7c Merge: 16a556eeb7ed 54a61fbc020f Author: David S. Miller Date: Thu Feb 20 10:30:47 2020 -0800 Merge branch 's390-fixes' Julian Wiedmann says: ==================== s390/qeth: fixes 2020-02-20 please apply the following patch series for qeth to netdev's net tree. This corrects three minor issues: 1) return a more fitting errno when VNICC cmds are not supported, 2) remove a bogus WARN in the NAPI code, and 3) be _very_ pedantic about the RX copybreak. ==================== Signed-off-by: David S. Miller commit 54a61fbc020fd2e305680871c453abcf7fc0339b Author: Julian Wiedmann Date: Thu Feb 20 15:54:56 2020 +0100 s390/qeth: fix off-by-one in RX copybreak check The RX copybreak is intended as the _max_ value where the frame's data should be copied. So for frame_len == copybreak, don't build an SG skb. Fixes: 4a71df50047f ("qeth: new qeth device driver") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 420579dba126c6111b5a3dea062f21a7e4e647c6 Author: Julian Wiedmann Date: Thu Feb 20 15:54:55 2020 +0100 s390/qeth: don't warn for napi with 0 budget Calling napi->poll() with 0 budget is a legitimate use by netpoll. Fixes: a1c3ed4c9ca0 ("qeth: NAPI support for l2 and l3 discipline") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 6f3846f0955308b6d1b219419da42b8de2c08845 Author: Alexandra Winter Date: Thu Feb 20 15:54:54 2020 +0100 s390/qeth: vnicc Fix EOPNOTSUPP precedence When getting or setting VNICC parameters, the error code EOPNOTSUPP should have precedence over EBUSY. EBUSY is used because vnicc feature and bridgeport feature are mutually exclusive, which is a temporary condition. Whereas EOPNOTSUPP indicates that the HW does not support all or parts of the vnicc feature. This issue causes the vnicc sysfs params to show 'blocked by bridgeport' for HW that does not support VNICC at all. Fixes: caa1f0b10d18 ("s390/qeth: add VNICC enable/disable support") Signed-off-by: Alexandra Winter Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit e500ba0e71f0b8652e67f8801cf7c33dad3ee4a4 Merge: 10dc62d0ae41 00a39c92c8ab Author: Tony Lindgren Date: Thu Feb 20 10:02:02 2020 -0800 Merge branch 'omap-for-v5.6/fixes-rc2' into fixes commit 16a556eeb7ed2dc3709fe2c5be76accdfa4901ab Author: Kees Cook Date: Wed Feb 19 22:23:09 2020 -0800 openvswitch: Distribute switch variables for initialization Variables declared in a switch statement before any case statements cannot be automatically initialized with compiler instrumentation (as they are not part of any execution flow). With GCC's proposed automatic stack variable initialization feature, this triggers a warning (and they don't get initialized). Clang's automatic stack variable initialization (via CONFIG_INIT_STACK_ALL=y) doesn't throw a warning, but it also doesn't initialize such variables[1]. Note that these warnings (or silent skipping) happen before the dead-store elimination optimization phase, so even when the automatic initializations are later elided in favor of direct initializations, the warnings remain. To avoid these problems, move such variables into the "case" where they're used or lift them up into the main function body. net/openvswitch/flow_netlink.c: In function ‘validate_set’: net/openvswitch/flow_netlink.c:2711:29: warning: statement will never be executed [-Wswitch-unreachable] 2711 | const struct ovs_key_ipv4 *ipv4_key; | ^~~~~~~~ [1] https://bugs.llvm.org/show_bug.cgi?id=44916 Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit 46d30cb1045c2ab1ada269702c8c84d6446baf81 Author: Kees Cook Date: Wed Feb 19 22:23:07 2020 -0800 net: ip6_gre: Distribute switch variables for initialization Variables declared in a switch statement before any case statements cannot be automatically initialized with compiler instrumentation (as they are not part of any execution flow). With GCC's proposed automatic stack variable initialization feature, this triggers a warning (and they don't get initialized). Clang's automatic stack variable initialization (via CONFIG_INIT_STACK_ALL=y) doesn't throw a warning, but it also doesn't initialize such variables[1]. Note that these warnings (or silent skipping) happen before the dead-store elimination optimization phase, so even when the automatic initializations are later elided in favor of direct initializations, the warnings remain. To avoid these problems, move such variables into the "case" where they're used or lift them up into the main function body. net/ipv6/ip6_gre.c: In function ‘ip6gre_err’: net/ipv6/ip6_gre.c:440:32: warning: statement will never be executed [-Wswitch-unreachable] 440 | struct ipv6_tlv_tnl_enc_lim *tel; | ^~~ net/ipv6/ip6_tunnel.c: In function ‘ip6_tnl_err’: net/ipv6/ip6_tunnel.c:520:32: warning: statement will never be executed [-Wswitch-unreachable] 520 | struct ipv6_tlv_tnl_enc_lim *tel; | ^~~ [1] https://bugs.llvm.org/show_bug.cgi?id=44916 Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit 161d179261f95ac56f61f94f89304e0620534230 Author: Kees Cook Date: Wed Feb 19 22:23:04 2020 -0800 net: core: Distribute switch variables for initialization Variables declared in a switch statement before any case statements cannot be automatically initialized with compiler instrumentation (as they are not part of any execution flow). With GCC's proposed automatic stack variable initialization feature, this triggers a warning (and they don't get initialized). Clang's automatic stack variable initialization (via CONFIG_INIT_STACK_ALL=y) doesn't throw a warning, but it also doesn't initialize such variables[1]. Note that these warnings (or silent skipping) happen before the dead-store elimination optimization phase, so even when the automatic initializations are later elided in favor of direct initializations, the warnings remain. To avoid these problems, move such variables into the "case" where they're used or lift them up into the main function body. net/core/skbuff.c: In function ‘skb_checksum_setup_ip’: net/core/skbuff.c:4809:7: warning: statement will never be executed [-Wswitch-unreachable] 4809 | int err; | ^~~ [1] https://bugs.llvm.org/show_bug.cgi?id=44916 Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit 00a39c92c8ab94727f021297d1748531af113fcd Author: Grygorii Strashko Date: Wed Feb 19 18:21:26 2020 +0200 ARM: dts: dra7-l4: mark timer13-16 as pwm capable DMTimers 13 - 16 are PWM capable and also can be used for CPTS input signals generation. Hence, mark them as "ti,timer-pwm". Signed-off-by: Grygorii Strashko Reviewed-by: Lokesh Vutla Signed-off-by: Tony Lindgren commit 78722d37b2b4cf9178295e2aa5510880e6135fd7 Author: Suman Anna Date: Tue Feb 11 09:51:03 2020 -0600 ARM: dts: dra7xx-clocks: Fixup IPU1 mux clock parent source The IPU1 functional clock is the output of a mux clock (represented by ipu1_gfclk_mux previously) and the clock source for this has been updated to be sourced from dpll_core_h22x2_ck in commit 39879c7d963e ("ARM: dts: dra7xx-clocks: Source IPU1 functional clock from CORE DPLL"). ipu1_gfclk_mux is an obsolete clock now with the clkctrl conversion, and this clock source parenting is lost during the new clkctrl layout conversion. Remove this stale clock and fix up the clock source for this mux clock using the latest equivalent clkctrl clock. This restores the previous logic and ensures that the IPU1 continues to run at the same frequency of IPU2 and independent of the ABE DPLL. Fixes: b5f8ffbb6fad ("ARM: dts: dra7: convert to use new clkctrl layout") Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit 31623468be0bf57617b8057dcd335693935a9491 Author: Suman Anna Date: Mon Feb 10 15:04:23 2020 -0600 ARM: dts: am437x-idk-evm: Fix incorrect OPP node names The commit 337c6c9a69af ("ARM: dts: am437x-idk-evm: Disable OPP50 for MPU") adjusts couple of OPP nodes defined in the common am4372.dtsi file, but used outdated node names. This results in these getting treated as new OPP nodes with missing properties. Fix this properly by using the correct node names as updated in commit b9cb2ba71848 ("ARM: dts: Use - instead of @ for DT OPP entries for TI SoCs"). Reported-by: Roger Quadros Fixes: 337c6c9a69af ("ARM: dts: am437x-idk-evm: Disable OPP50 for MPU") Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit d6c01c25f00d0491d92a3132387dbbcd717c3b92 Author: Peter Ujfalusi Date: Fri Jan 24 14:11:39 2020 +0200 ARM: dts: dra7-evm: Rename evm_3v3 regulator to vsys_3v3 On the new schematics it is renamed and the same name is used on other dra7 boards. Signed-off-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit 6affca140cbea01f497c4f4e16f1e2be7f74bd04 Author: Max Gurtovoy Date: Thu Feb 20 12:08:18 2020 +0200 RDMA/rw: Fix error flow during RDMA context initialization In case the SGL was mapped for P2P DMA operation, we must unmap it using pci_p2pdma_unmap_sg during the error unwind of rdma_rw_ctx_init() Fixes: 7f73eac3a713 ("PCI/P2PDMA: Introduce pci_p2pdma_unmap_sg()") Link: https://lore.kernel.org/r/20200220100819.41860-1-maxg@mellanox.com Signed-off-by: Max Gurtovoy Reviewed-by: Leon Romanovsky Reviewed-by: Logan Gunthorpe Signed-off-by: Jason Gunthorpe commit b78a8552d77f8efb7c4fbd92a91b890c32b89528 Author: Qian Cai Date: Mon Feb 17 11:48:26 2020 -0500 kvm/emulate: fix a -Werror=cast-function-type arch/x86/kvm/emulate.c: In function 'x86_emulate_insn': arch/x86/kvm/emulate.c:5686:22: error: cast between incompatible function types from 'int (*)(struct x86_emulate_ctxt *)' to 'void (*)(struct fastop *)' [-Werror=cast-function-type] rc = fastop(ctxt, (fastop_t)ctxt->execute); Fix it by using an unnamed union of a (*execute) function pointer and a (*fastop) function pointer. Fixes: 3009afc6e39e ("KVM: x86: Use a typedef for fastop functions") Suggested-by: Paolo Bonzini Signed-off-by: Qian Cai Signed-off-by: Paolo Bonzini commit 147f1a1fe5d7e6b01b8df4d0cbd6f9eaf6b6c73b Author: Paolo Bonzini Date: Thu Feb 13 18:24:48 2020 +0100 KVM: x86: fix incorrect comparison in trace event The "u" field in the event has three states, -1/0/1. Using u8 however means that comparison with -1 will always fail, so change to signed char. Signed-off-by: Paolo Bonzini commit 9038ec99ceb94fb8d93ade5e236b2928f0792c7c Author: Kees Cook Date: Wed Feb 19 22:23:18 2020 -0800 x86/xen: Distribute switch variables for initialization Variables declared in a switch statement before any case statements cannot be automatically initialized with compiler instrumentation (as they are not part of any execution flow). With GCC's proposed automatic stack variable initialization feature, this triggers a warning (and they don't get initialized). Clang's automatic stack variable initialization (via CONFIG_INIT_STACK_ALL=y) doesn't throw a warning, but it also doesn't initialize such variables[1]. Note that these warnings (or silent skipping) happen before the dead-store elimination optimization phase, so even when the automatic initializations are later elided in favor of direct initializations, the warnings remain. To avoid these problems, move such variables into the "case" where they're used or lift them up into the main function body. arch/x86/xen/enlighten_pv.c: In function ‘xen_write_msr_safe’: arch/x86/xen/enlighten_pv.c:904:12: warning: statement will never be executed [-Wswitch-unreachable] 904 | unsigned which; | ^~~~~ [1] https://bugs.llvm.org/show_bug.cgi?id=44916 Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20200220062318.69299-1-keescook@chromium.org Reviewed-by: Juergen Gross [boris: made @which an 'unsigned int'] Signed-off-by: Boris Ostrovsky commit ef89d0545132d685f73da6f58b7e7fe002536f91 Author: Michael Ellerman Date: Thu Feb 20 22:37:48 2020 +1100 selftests/rseq: Fix out-of-tree compilation Currently if you build with O=... the rseq tests don't build: $ make O=$PWD/output -C tools/testing/selftests/ TARGETS=rseq make: Entering directory '/linux/tools/testing/selftests' ... make[1]: Entering directory '/linux/tools/testing/selftests/rseq' gcc -O2 -Wall -g -I./ -I../../../../usr/include/ -L./ -Wl,-rpath=./ -shared -fPIC rseq.c -lpthread -o /linux/output/rseq/librseq.so gcc -O2 -Wall -g -I./ -I../../../../usr/include/ -L./ -Wl,-rpath=./ basic_test.c -lpthread -lrseq -o /linux/output/rseq/basic_test /usr/bin/ld: cannot find -lrseq collect2: error: ld returned 1 exit status This is because the library search path points to the source directory, not the output. We can fix it by changing the library search path to $(OUTPUT). Signed-off-by: Michael Ellerman Signed-off-by: Shuah Khan commit b9167c8078c3527de6da241c8a1a75a9224ed90a Author: Michael Ellerman Date: Thu Feb 20 15:42:41 2020 +1100 selftests: Install settings files to fix TIMEOUT failures Commit 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second timeout per test") added a 45 second timeout for tests, and also added a way for tests to customise the timeout via a settings file. For example the ftrace tests take multiple minutes to run, so they were given longer in commit b43e78f65b1d ("tracing/selftests: Turn off timeout setting"). This works when the tests are run from the source tree. However if the tests are installed with "make -C tools/testing/selftests install", the settings files are not copied into the install directory. When the tests are then run from the install directory the longer timeouts are not applied and the tests timeout incorrectly. So add the settings files to TEST_FILES of the appropriate Makefiles to cause the settings files to be installed using the existing install logic. Fixes: 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second timeout per test") Signed-off-by: Michael Ellerman Signed-off-by: Shuah Khan commit 68ca0fd272dac9a9f78fbf14b5e65de34f12c1b4 Author: Christophe Leroy Date: Thu Feb 6 08:11:39 2020 +0000 selftest/lkdtm: Don't pollute 'git status' Commit 46d1a0f03d66 ("selftests/lkdtm: Add tests for LKDTM targets") added generation of lkdtm test scripts. Ignore those generated scripts when performing 'git status' Fixes: 46d1a0f03d66 ("selftests/lkdtm: Add tests for LKDTM targets") Signed-off-by: Christophe Leroy Signed-off-by: Shuah Khan commit 10dc62d0ae4167770e9ab150fc1ab55baa82e010 Author: Tony Lindgren Date: Wed Feb 19 11:25:27 2020 -0800 ARM: dts: droid4: Configure LED backlight for lm3532 With the LED backlight changes merged, we still need the dts configured to have backlight working for droid4. Based on an earlier patch from Pavel Machek , let's configure the backlight but update the value range to be more usable. We have a range of 256 register values split into 8 steps, so we can generate the brightness levels backwards with: $ for i in 0 1 2 3 4 5 6 7; do echo "255 - ${i} * (256 / 8)" | bc; done To avoid more confusion why the LCD backlight is still not on, let's also enable LED backlight as a loadable module for omap2plus_defconfig. Cc: Merlijn Wajer Cc: Pavel Machek Reviewed-by: Sebastian Reichel Acked-by: Pavel Machek Signed-off-by: Tony Lindgren commit 58aa7729310db04ffcc022c98002dd8fcb486c58 Author: Grygorii Strashko Date: Fri Feb 14 21:08:01 2020 +0200 phy: ti: gmii-sel: do not fail in case of gmii The "gmii" PHY interface mode is supported on TI AM335x/437x/5xx SoCs, so don't fail if it's selected. Signed-off-by: Grygorii Strashko Signed-off-by: Kishon Vijay Abraham I commit eefed634eb61e4094b9fb8183cb8d43b26838517 Author: Grygorii Strashko Date: Fri Feb 14 21:08:00 2020 +0200 phy: ti: gmii-sel: fix set of copy-paste errors - under PHY_INTERFACE_MODE_MII the 'mode' func parameter is assigned instead of 'gmii_sel_mode' and it's working only because the default value 'gmii_sel_mode' is set to 0. - console outputs use 'rgmii_id' and 'mode' values to print PHY mode instead of using 'submode' value which is representing PHY interface mode now. This patch fixes above two cases. Signed-off-by: Grygorii Strashko Signed-off-by: Kishon Vijay Abraham I commit 63d68382f5fb5f71772357e31841c19c4a133182 Author: Pierre-Louis Bossart Date: Wed Feb 19 16:21:30 2020 -0600 ASoC: soc-core: fix for_rtd_codec_dai_rollback() macro The use of parentheses to protect the argument is fine for (i)++ but not for (--i). Fixes: 83f94a2e293d61 ("ASoC: soc-core: add snd_soc_close_delayed_work()") Signed-off-by: Pierre-Louis Bossart Acked-by: Kuninori Morimoto Cc: Kuninori Morimoto Link: https://lore.kernel.org/r/20200219222130.29933-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b0c609ab2057d0953fa05e7566f0c0e8a28fa9e1 Author: Alexandre Belloni Date: Fri Feb 14 15:06:21 2020 +0100 PM / hibernate: fix typo "reserverd_size" -> "reserved_size" Fix a mistake in a variable name in a comment. Signed-off-by: Alexandre Belloni Signed-off-by: Rafael J. Wysocki commit 14ba91c74782f4d470f4d7c7cf585e29d4761035 Author: Jonathan Neuschäfer Date: Tue Feb 18 15:58:18 2020 +0100 Documentation: power: Drop reference to interface.rst It has been merged into sleep-states.rst. Fixes: c21502efdaed ("Documentation: admin-guide: PM: Update sleep states documentation") Signed-off-by: Jonathan Neuschäfer Signed-off-by: Rafael J. Wysocki commit dcde237319e626d1ec3c9d8b7613032f0fd4663a Author: Catalin Marinas Date: Wed Feb 19 12:31:56 2020 +0000 mm: Avoid creating virtual address aliases in brk()/mmap()/mremap() Currently the arm64 kernel ignores the top address byte passed to brk(), mmap() and mremap(). When the user is not aware of the 56-bit address limit or relies on the kernel to return an error, untagging such pointers has the potential to create address aliases in user-space. Passing a tagged address to munmap(), madvise() is permitted since the tagged pointer is expected to be inside an existing mapping. The current behaviour breaks the existing glibc malloc() implementation which relies on brk() with an address beyond 56-bit to be rejected by the kernel. Remove untagging in the above functions by partially reverting commit ce18d171cb73 ("mm: untag user pointers in mmap/munmap/mremap/brk"). In addition, update the arm64 tagged-address-abi.rst document accordingly. Link: https://bugzilla.redhat.com/1797052 Fixes: ce18d171cb73 ("mm: untag user pointers in mmap/munmap/mremap/brk") Cc: # 5.4.x- Cc: Florian Weimer Reviewed-by: Andrew Morton Reported-by: Victor Stinner Acked-by: Will Deacon Acked-by: Andrey Konovalov Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon commit ce4a64e1f656138e2a1481049ea554720f86b43a Author: Scott Branden Date: Wed Feb 19 14:14:03 2020 -0800 docs: arm64: fix trivial spelling enought to enough in memory.rst Fix trivial spelling error enought to enough in memory.rst. Cc: trivial@kernel.org Signed-off-by: Scott Branden Signed-off-by: Will Deacon commit ae99fb8baafc881b35aa0b79d7ac0178a7c40c89 Author: Randy Dunlap Date: Sun Feb 16 20:42:36 2020 -0800 Documentation/admin-guide/acpi: fix fan_performance_states.rst warnings Fix Sphinx format warnings in fan_performace_states.rst by adding indentation. Documentation/admin-guide/acpi/fan_performance_states.rst:21: WARNING: Literal block ends without a blank line; unexpected unindent. Documentation/admin-guide/acpi/fan_performance_states.rst:41: WARNING: Literal block expected; none found. Signed-off-by: Randy Dunlap Signed-off-by: Rafael J. Wysocki commit 9424ef56e13a1f14c57ea161eed3ecfdc7b2770e Author: Shijie Luo Date: Sat Feb 15 03:02:06 2020 -0500 ext4: add cond_resched() to __ext4_find_entry() We tested a soft lockup problem in linux 4.19 which could also be found in linux 5.x. When dir inode takes up a large number of blocks, and if the directory is growing when we are searching, it's possible the restart branch could be called many times, and the do while loop could hold cpu a long time. Here is the call trace in linux 4.19. [ 473.756186] Call trace: [ 473.756196] dump_backtrace+0x0/0x198 [ 473.756199] show_stack+0x24/0x30 [ 473.756205] dump_stack+0xa4/0xcc [ 473.756210] watchdog_timer_fn+0x300/0x3e8 [ 473.756215] __hrtimer_run_queues+0x114/0x358 [ 473.756217] hrtimer_interrupt+0x104/0x2d8 [ 473.756222] arch_timer_handler_virt+0x38/0x58 [ 473.756226] handle_percpu_devid_irq+0x90/0x248 [ 473.756231] generic_handle_irq+0x34/0x50 [ 473.756234] __handle_domain_irq+0x68/0xc0 [ 473.756236] gic_handle_irq+0x6c/0x150 [ 473.756238] el1_irq+0xb8/0x140 [ 473.756286] ext4_es_lookup_extent+0xdc/0x258 [ext4] [ 473.756310] ext4_map_blocks+0x64/0x5c0 [ext4] [ 473.756333] ext4_getblk+0x6c/0x1d0 [ext4] [ 473.756356] ext4_bread_batch+0x7c/0x1f8 [ext4] [ 473.756379] ext4_find_entry+0x124/0x3f8 [ext4] [ 473.756402] ext4_lookup+0x8c/0x258 [ext4] [ 473.756407] __lookup_hash+0x8c/0xe8 [ 473.756411] filename_create+0xa0/0x170 [ 473.756413] do_mkdirat+0x6c/0x140 [ 473.756415] __arm64_sys_mkdirat+0x28/0x38 [ 473.756419] el0_svc_common+0x78/0x130 [ 473.756421] el0_svc_handler+0x38/0x78 [ 473.756423] el0_svc+0x8/0xc [ 485.755156] watchdog: BUG: soft lockup - CPU#2 stuck for 22s! [tmp:5149] Add cond_resched() to avoid soft lockup and to provide a better system responding. Link: https://lore.kernel.org/r/20200215080206.13293-1-luoshijie1@huawei.com Signed-off-by: Shijie Luo Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Cc: stable@kernel.org commit 35df4299a6487f323b0aca120ea3f485dfee2ae3 Author: Qian Cai Date: Fri Feb 7 09:29:11 2020 -0500 ext4: fix a data race in EXT4_I(inode)->i_disksize EXT4_I(inode)->i_disksize could be accessed concurrently as noticed by KCSAN, BUG: KCSAN: data-race in ext4_write_end [ext4] / ext4_writepages [ext4] write to 0xffff91c6713b00f8 of 8 bytes by task 49268 on cpu 127: ext4_write_end+0x4e3/0x750 [ext4] ext4_update_i_disksize at fs/ext4/ext4.h:3032 (inlined by) ext4_update_inode_size at fs/ext4/ext4.h:3046 (inlined by) ext4_write_end at fs/ext4/inode.c:1287 generic_perform_write+0x208/0x2a0 ext4_buffered_write_iter+0x11f/0x210 [ext4] ext4_file_write_iter+0xce/0x9e0 [ext4] new_sync_write+0x29c/0x3b0 __vfs_write+0x92/0xa0 vfs_write+0x103/0x260 ksys_write+0x9d/0x130 __x64_sys_write+0x4c/0x60 do_syscall_64+0x91/0xb47 entry_SYSCALL_64_after_hwframe+0x49/0xbe read to 0xffff91c6713b00f8 of 8 bytes by task 24872 on cpu 37: ext4_writepages+0x10ac/0x1d00 [ext4] mpage_map_and_submit_extent at fs/ext4/inode.c:2468 (inlined by) ext4_writepages at fs/ext4/inode.c:2772 do_writepages+0x5e/0x130 __writeback_single_inode+0xeb/0xb20 writeback_sb_inodes+0x429/0x900 __writeback_inodes_wb+0xc4/0x150 wb_writeback+0x4bd/0x870 wb_workfn+0x6b4/0x960 process_one_work+0x54c/0xbe0 worker_thread+0x80/0x650 kthread+0x1e0/0x200 ret_from_fork+0x27/0x50 Reported by Kernel Concurrency Sanitizer on: CPU: 37 PID: 24872 Comm: kworker/u261:2 Tainted: G W O L 5.5.0-next-20200204+ #5 Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 07/10/2019 Workqueue: writeback wb_workfn (flush-7:0) Since only the read is operating as lockless (outside of the "i_data_sem"), load tearing could introduce a logic bug. Fix it by adding READ_ONCE() for the read and WRITE_ONCE() for the write. Signed-off-by: Qian Cai Link: https://lore.kernel.org/r/1581085751-31793-1-git-send-email-cai@lca.pw Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 7c42545cad101fbb9811b55a3b9b697efba6555a Merge: ec0bd60a4790 f287d3d19769 Author: Dave Airlie Date: Thu Feb 20 12:00:06 2020 +1000 Merge branch 'linux-5.6' of git://github.com/skeggsb/linux into drm-fixes Nothing major here, another TU1xx modesetting fix, and hooking up ACR/GR support on TU11x now that NVIDIA have made the firmware available. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/ Date: Wed Feb 19 14:36:14 2020 -0800 hwmon: (acpi_power_meter) Fix lockdep splat Damien Le Moal reports a lockdep splat with the acpi_power_meter, observed with Linux v5.5 and later. ====================================================== WARNING: possible circular locking dependency detected 5.6.0-rc2+ #629 Not tainted ------------------------------------------------------ python/1397 is trying to acquire lock: ffff888619080070 (&resource->lock){+.+.}, at: show_power+0x3c/0xa0 [acpi_power_meter] but task is already holding lock: ffff88881643f188 (kn->count#119){++++}, at: kernfs_seq_start+0x6a/0x160 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (kn->count#119){++++}: __kernfs_remove+0x626/0x7e0 kernfs_remove_by_name_ns+0x41/0x80 remove_attrs+0xcb/0x3c0 [acpi_power_meter] acpi_power_meter_notify+0x1f7/0x310 [acpi_power_meter] acpi_ev_notify_dispatch+0x198/0x1f3 acpi_os_execute_deferred+0x4d/0x70 process_one_work+0x7c8/0x1340 worker_thread+0x94/0xc70 kthread+0x2ed/0x3f0 ret_from_fork+0x24/0x30 -> #0 (&resource->lock){+.+.}: __lock_acquire+0x20be/0x49b0 lock_acquire+0x127/0x340 __mutex_lock+0x15b/0x1350 show_power+0x3c/0xa0 [acpi_power_meter] dev_attr_show+0x3f/0x80 sysfs_kf_seq_show+0x216/0x410 seq_read+0x407/0xf90 vfs_read+0x152/0x2c0 ksys_read+0xf3/0x1d0 do_syscall_64+0x95/0x1010 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(kn->count#119); lock(&resource->lock); lock(kn->count#119); lock(&resource->lock); *** DEADLOCK *** 4 locks held by python/1397: #0: ffff8890242d64e0 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x9b/0xb0 #1: ffff889040be74e0 (&p->lock){+.+.}, at: seq_read+0x6b/0xf90 #2: ffff8890448eb880 (&of->mutex){+.+.}, at: kernfs_seq_start+0x47/0x160 #3: ffff88881643f188 (kn->count#119){++++}, at: kernfs_seq_start+0x6a/0x160 stack backtrace: CPU: 10 PID: 1397 Comm: python Not tainted 5.6.0-rc2+ #629 Hardware name: Supermicro Super Server/X11DPL-i, BIOS 3.1 05/21/2019 Call Trace: dump_stack+0x97/0xe0 check_noncircular+0x32e/0x3e0 ? print_circular_bug.isra.0+0x1e0/0x1e0 ? unwind_next_frame+0xb9a/0x1890 ? entry_SYSCALL_64_after_hwframe+0x49/0xbe ? graph_lock+0x79/0x170 ? __lockdep_reset_lock+0x3c0/0x3c0 ? mark_lock+0xbc/0x1150 __lock_acquire+0x20be/0x49b0 ? mark_held_locks+0xe0/0xe0 ? stack_trace_save+0x91/0xc0 lock_acquire+0x127/0x340 ? show_power+0x3c/0xa0 [acpi_power_meter] ? device_remove_bin_file+0x10/0x10 ? device_remove_bin_file+0x10/0x10 __mutex_lock+0x15b/0x1350 ? show_power+0x3c/0xa0 [acpi_power_meter] ? show_power+0x3c/0xa0 [acpi_power_meter] ? mutex_lock_io_nested+0x11f0/0x11f0 ? lock_downgrade+0x6a0/0x6a0 ? kernfs_seq_start+0x47/0x160 ? lock_acquire+0x127/0x340 ? kernfs_seq_start+0x6a/0x160 ? device_remove_bin_file+0x10/0x10 ? show_power+0x3c/0xa0 [acpi_power_meter] show_power+0x3c/0xa0 [acpi_power_meter] dev_attr_show+0x3f/0x80 ? memset+0x20/0x40 sysfs_kf_seq_show+0x216/0x410 seq_read+0x407/0xf90 ? security_file_permission+0x16f/0x2c0 vfs_read+0x152/0x2c0 Problem is that reading an attribute takes the kernfs lock in the kernfs code, then resource->lock in the driver. During an ACPI notification, the opposite happens: The resource lock is taken first, followed by the kernfs lock when sysfs attributes are removed and re-created. Presumably this is now seen due to some locking related changes in kernfs after v5.4, but it was likely always a problem. Fix the problem by not blindly acquiring the lock in the notification function. It is only needed to protect the various update functions. However, those update functions are called anyway when sysfs attributes are read. This means that we can just stop calling those functions from the notifier, and the resource lock in the notifier function is no longer needed. That leaves two situations: First, METER_NOTIFY_CONFIG removes and re-allocates capability strings. While it did so under the resource lock, _displaying_ those strings was not protected, creating a race condition. To solve this problem, selectively protect both removal/creation and reporting of capability attributes with the resource lock. Second, removing and re-creating the attribute files is no longer protected by the resource lock. That doesn't matter since access to each individual attribute is protected by the kernfs lock. Userspace may get messed up if attributes disappear and reappear under its nose, but that is not different than today, and there is nothing we can do about it without major driver restructuring. Last but not least, when removing the driver, remove attribute functions first, then release capability strings. This avoids yet another race condition. Reported-by: Damien Le Moal Cc: Damien Le Moal Cc: stable@vger.kernel.org # v5.5+ Tested-by: Damien Le Moal Signed-off-by: Guenter Roeck commit ca7e1fd1026c5af6a533b4b5447e1d2f153e28f2 Merge: 4b205766d8fc 9a0584f05687 Author: Linus Torvalds Date: Wed Feb 19 17:22:10 2020 -0800 Merge tag 'linux-kselftest-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest fixes from Shuah Khan: "Fixes to build failures and other test bugs" * tag 'linux-kselftest-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests: openat2: fix build error on newer glibc selftests: use LDLIBS for libraries instead of LDFLAGS selftests: fix too long argument selftests: allow detection of build failures Kernel selftests: tpm2: check for tpm support selftests/ftrace: Have pid filter test use instance flag selftests: fix spelling mistaked "chaigned" -> "chained" commit 854bdbae9058bcf09b0add70b6047bc9ca776de2 Author: Maxime Ripard Date: Mon Feb 10 11:04:17 2020 +0100 dt-bindings: media: csi: Fix clocks description Commit 1de243b07666 ("media: dt-bindings: media: sun4i-csi: Add compatible for CSI1 on A10/A20") introduced support for the CSI1 controller on A10 and A20 that unlike CSI0 doesn't have an ISP and therefore only have two clocks, the bus and module clocks. The clocks and clock-names properties have thus been modified to allow either two or tree clocks. However, the current list has the ISP clock at the second position, which means the bindings expects a list of either bus and isp, or bus, isp and mod. The initial intent of the patch was obviously to have bus and mod in the former case. Let's fix the binding so that it validates properly. Fixes: 1de243b07666 ("media: dt-bindings: media: sun4i-csi: Add compatible for CSI1 on A10/A20") Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit 303d37b4b0522150c0c7701d84934bc13199bebc Author: Maxime Ripard Date: Mon Feb 10 11:04:16 2020 +0100 dt-bindings: media: csi: Add interconnects properties The Allwinner CSI controller is sitting beside the MBUS that is represented as an interconnect. Make sure that the interconnect properties are valid in the binding. Fixes: 7866d6903ce8 ("media: dt-bindings: media: sun4i-csi: Add compatible for CSI0 on R40") Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit 867c1859590f3bbc13d9cfb46c90c8202769d0e5 Author: Grygorii Strashko Date: Fri Feb 14 21:44:08 2020 +0200 dt-bindings: net: mdio: remove compatible string from example Remove vendor specific compatible string from example, otherwise DT YAML schemas validation may trigger warnings specific to TI ti,davinci_mdio and not to the generic MDIO example. For example, the "bus_freq" is required for davinci_mdio, but not required for generic mdio example. As result following warning will be produced: mdio.example.dt.yaml: mdio@5c030000: 'bus_freq' is a required property Signed-off-by: Grygorii Strashko Signed-off-by: Rob Herring commit 3044d9891bdb98ebae5c9e6fb1bd7f007bf7cad6 Author: Thierry Reding Date: Tue Jan 14 13:38:21 2020 +0100 dt-bindings: memory-controller: Update example for Tegra124 EMC The example in the Tegra124 EMC device tree binding looks like an old version that doesn't contain all the required fields. Update it with a version from the current DTS files to fix the make dt_binding_check target. Reported-by: Rob Herring Signed-off-by: Thierry Reding [robh: also fix missing '#reset-cells'] Signed-off-by: Rob Herring commit ec0bd60a4790066bb4426f87a878816392552257 Merge: 99edb18b86d9 8fc7036ee652 Author: Dave Airlie Date: Thu Feb 20 11:01:28 2020 +1000 Merge tag 'drm-msm-fixes-2020-02-16' of https://gitlab.freedesktop.org/drm/msm into drm-fixes + fix UBWC on GPU and display side for sc7180 + fix DSI suspend/resume issue encountered on sc7180 + fix some breakage on so called "linux-android" devices (fallout from sc7180/a618 support, not seen earlier due to bootloader/firmware differences) + couple other misc fixes Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/ Date: Thu Feb 20 10:46:17 2020 +1000 Merge tag 'amd-drm-fixes-5.6-2020-02-19' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.6-2020-02-19: amdgpu: - HDCP fixes - xclk fix for raven - GFXOFF fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200219173954.3847-1-alexander.deucher@amd.com commit 41f57cfde186dba6e357f9db25eafbed017e4487 Merge: fca07a937a27 b9aff38de2cb Author: David S. Miller Date: Wed Feb 19 16:42:35 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== pull-request: bpf 2020-02-19 The following pull-request contains BPF updates for your *net* tree. We've added 10 non-merge commits during the last 10 day(s) which contain a total of 10 files changed, 93 insertions(+), 31 deletions(-). The main changes are: 1) batched bpf hashtab fixes from Brian and Yonghong. 2) various selftests and libbpf fixes. ==================== Signed-off-by: David S. Miller commit fca07a937a27e720df7310bc5e68a11e5d2ff3c5 Merge: 303d0403b8c2 c54d209c78b8 Author: David S. Miller Date: Wed Feb 19 16:38:16 2020 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2020-02-19 This series contains fixes to the ice driver. Brett fixes an issue where if a user sets an odd [tx|rx]-usecs value through ethtool, the request is denied because the hardware is set to have an ITR with 2us granularity. Also fix an issue where the VF has not been completely removed/reset after being unbound from the host driver, so resolve this by waiting for the VF remove/reset process to happen before checking if the VF is disabled. Michal fixes an issue, where when the user changes flow control via ethtool, the OS is told the link is going down when that may not be the case. Before the fix, the only way to get out of this state was to take the interface down and up again. ==================== Signed-off-by: David S. Miller commit 303d0403b8c25e994e4a6e45389e173cf8706fb5 Author: Willem de Bruijn Date: Wed Feb 19 14:16:32 2020 -0500 udp: rehash on disconnect As of the below commit, udp sockets bound to a specific address can coexist with one bound to the any addr for the same port. The commit also phased out the use of socket hashing based only on port (hslot), in favor of always hashing on {addr, port} (hslot2). The change broke the following behavior with disconnect (AF_UNSPEC): server binds to 0.0.0.0:1337 server connects to 127.0.0.1:80 server disconnects client connects to 127.0.0.1:1337 client sends "hello" server reads "hello" // times out, packet did not find sk On connect the server acquires a specific source addr suitable for routing to its destination. On disconnect it reverts to the any addr. The connect call triggers a rehash to a different hslot2. On disconnect, add the same to return to the original hslot2. Skip this step if the socket is going to be unhashed completely. Fixes: 4cdeeee9252a ("net: udp: prefer listeners bound to an address") Reported-by: Pavel Roskin Signed-off-by: Willem de Bruijn Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 06f5201c6392f998a49ca9c9173e2930c8eb51d8 Author: Rohit Maheshwari Date: Wed Feb 19 09:40:22 2020 +0530 net/tls: Fix to avoid gettig invalid tls record Current code doesn't check if tcp sequence number is starting from (/after) 1st record's start sequnce number. It only checks if seq number is before 1st record's end sequnce number. This problem will always be a possibility in re-transmit case. If a record which belongs to a requested seq number is already deleted, tls_get_record will start looking into list and as per the check it will look if seq number is before the end seq of 1st record, which will always be true and will return 1st record always, it should in fact return NULL. As part of the fix, start looking each record only if the sequence number lies in the list else return NULL. There is one more check added, driver look for the start marker record to handle tcp packets which are before the tls offload start sequence number, hence return 1st record if the record is tls start marker and seq number is before the 1st record's starting sequence number. Fixes: e8f69799810c ("net/tls: Add generic NIC offload infrastructure") Signed-off-by: Rohit Maheshwari Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 88d5271c1efbd89713092b962070cf9af2fcd7c4 Author: Tomas Paukrt Date: Wed Jan 22 21:10:39 2020 +0100 dt-bindings: mmc: omap-hsmmc: Fix SDIO interrupt SDIO interrupt must be specified correctly as IRQ_TYPE_LEVEL_LOW instead of GPIO_ACTIVE_LOW. Signed-off-by: Tomas Paukrt Signed-off-by: Rob Herring commit e7167043ee508739fc9c5030494f94bea48cee23 Author: Damien Le Moal Date: Wed Feb 12 19:34:23 2020 +0900 riscv: Fix gitignore Tell git to not track the compiled boot/loader and boot/loader.lds files. Signed-off-by: Damien Le Moal Signed-off-by: Palmer Dabbelt commit b9aff38de2cb166476988020428985c5f7412ffc Author: Yonghong Song Date: Wed Feb 19 15:47:57 2020 -0800 bpf: Fix a potential deadlock with bpf_map_do_batch Commit 057996380a42 ("bpf: Add batch ops to all htab bpf map") added lookup_and_delete batch operation for hash table. The current implementation has bpf_lru_push_free() inside the bucket lock, which may cause a deadlock. syzbot reports: -> #2 (&htab->buckets[i].lock#2){....}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:159 htab_lru_map_delete_node+0xce/0x2f0 kernel/bpf/hashtab.c:593 __bpf_lru_list_shrink_inactive kernel/bpf/bpf_lru_list.c:220 [inline] __bpf_lru_list_shrink+0xf9/0x470 kernel/bpf/bpf_lru_list.c:266 bpf_lru_list_pop_free_to_local kernel/bpf/bpf_lru_list.c:340 [inline] bpf_common_lru_pop_free kernel/bpf/bpf_lru_list.c:447 [inline] bpf_lru_pop_free+0x87c/0x1670 kernel/bpf/bpf_lru_list.c:499 prealloc_lru_pop+0x2c/0xa0 kernel/bpf/hashtab.c:132 __htab_lru_percpu_map_update_elem+0x67e/0xa90 kernel/bpf/hashtab.c:1069 bpf_percpu_hash_update+0x16e/0x210 kernel/bpf/hashtab.c:1585 bpf_map_update_value.isra.0+0x2d7/0x8e0 kernel/bpf/syscall.c:181 generic_map_update_batch+0x41f/0x610 kernel/bpf/syscall.c:1319 bpf_map_do_batch+0x3f5/0x510 kernel/bpf/syscall.c:3348 __do_sys_bpf+0x9b7/0x41e0 kernel/bpf/syscall.c:3460 __se_sys_bpf kernel/bpf/syscall.c:3355 [inline] __x64_sys_bpf+0x73/0xb0 kernel/bpf/syscall.c:3355 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&loc_l->lock){....}: check_prev_add kernel/locking/lockdep.c:2475 [inline] check_prevs_add kernel/locking/lockdep.c:2580 [inline] validate_chain kernel/locking/lockdep.c:2970 [inline] __lock_acquire+0x2596/0x4a00 kernel/locking/lockdep.c:3954 lock_acquire+0x190/0x410 kernel/locking/lockdep.c:4484 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:159 bpf_common_lru_push_free kernel/bpf/bpf_lru_list.c:516 [inline] bpf_lru_push_free+0x250/0x5b0 kernel/bpf/bpf_lru_list.c:555 __htab_map_lookup_and_delete_batch+0x8d4/0x1540 kernel/bpf/hashtab.c:1374 htab_lru_map_lookup_and_delete_batch+0x34/0x40 kernel/bpf/hashtab.c:1491 bpf_map_do_batch+0x3f5/0x510 kernel/bpf/syscall.c:3348 __do_sys_bpf+0x1f7d/0x41e0 kernel/bpf/syscall.c:3456 __se_sys_bpf kernel/bpf/syscall.c:3355 [inline] __x64_sys_bpf+0x73/0xb0 kernel/bpf/syscall.c:3355 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Possible unsafe locking scenario: CPU0 CPU2 ---- ---- lock(&htab->buckets[i].lock#2); lock(&l->lock); lock(&htab->buckets[i].lock#2); lock(&loc_l->lock); *** DEADLOCK *** To fix the issue, for htab_lru_map_lookup_and_delete_batch() in CPU0, let us do bpf_lru_push_free() out of the htab bucket lock. This can avoid the above deadlock scenario. Fixes: 057996380a42 ("bpf: Add batch ops to all htab bpf map") Reported-by: syzbot+a38ff3d9356388f2fb83@syzkaller.appspotmail.com Reported-by: syzbot+122b5421d14e68f29cd1@syzkaller.appspotmail.com Suggested-by: Hillf Danton Suggested-by: Martin KaFai Lau Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Reviewed-by: Jakub Sitnicki Acked-by: Brian Vazquez Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200219234757.3544014-1-yhs@fb.com commit 492e0d0d6f2eb4badfd2868addf9da0f651eba0e Author: Brian Vazquez Date: Tue Feb 18 09:25:52 2020 -0800 bpf: Do not grab the bucket spinlock by default on htab batch ops Grabbing the spinlock for every bucket even if it's empty, was causing significant perfomance cost when traversing htab maps that have only a few entries. This patch addresses the issue by checking first the bucket_cnt, if the bucket has some entries then we go and grab the spinlock and proceed with the batching. Tested with a htab of size 50K and different value of populated entries. Before: Benchmark Time(ns) CPU(ns) --------------------------------------------- BM_DumpHashMap/1 2759655 2752033 BM_DumpHashMap/10 2933722 2930825 BM_DumpHashMap/200 3171680 3170265 BM_DumpHashMap/500 3639607 3635511 BM_DumpHashMap/1000 4369008 4364981 BM_DumpHashMap/5k 11171919 11134028 BM_DumpHashMap/20k 69150080 69033496 BM_DumpHashMap/39k 190501036 190226162 After: Benchmark Time(ns) CPU(ns) --------------------------------------------- BM_DumpHashMap/1 202707 200109 BM_DumpHashMap/10 213441 210569 BM_DumpHashMap/200 478641 472350 BM_DumpHashMap/500 980061 967102 BM_DumpHashMap/1000 1863835 1839575 BM_DumpHashMap/5k 8961836 8902540 BM_DumpHashMap/20k 69761497 69322756 BM_DumpHashMap/39k 187437830 186551111 Fixes: 057996380a42 ("bpf: Add batch ops to all htab bpf map") Signed-off-by: Brian Vazquez Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200218172552.215077-1-brianvv@google.com commit be886ba90cce2fb2f5a4dbcda8f3be3fd1b2f484 Author: Heidi Fahim Date: Tue Feb 18 14:19:16 2020 -0800 kunit: run kunit_tool from any directory Implemented small fix so that the script changes work directories to the root of the linux kernel source tree from which kunit.py is run. This enables the user to run kunit from any working directory. Originally considered using os.path.join but this is more error prone as we would have to find all file path usages and modify them accordingly. Using os.chdir ensures that the entire script is run within /linux. Signed-off-by: Heidi Fahim Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit dde54b9492a8ba46bcd7e7e26172adf2bfcea817 Author: Heidi Fahim Date: Tue Nov 26 14:36:16 2019 -0800 kunit: test: Improve error messages for kunit_tool when kunitconfig is invalid Previous error message for invalid kunitconfig was vague. Added to it so that it lists invalid fields and prompts for them to be removed. Added validate_config function returning whether or not this kconfig is valid. Signed-off-by: Heidi Fahim Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit ae232e45acf9621f2c96b41ca3af006ac7552c33 Author: Tomi Valkeinen Date: Wed Feb 19 11:46:10 2020 -0800 backlight: add led-backlight driver This patch adds a led-backlight driver (led_bl), which is similar to pwm_bl except the driver uses a LED class driver to adjust the brightness in the HW. Multiple LEDs can be used for a single backlight. Signed-off-by: Tomi Valkeinen Signed-off-by: Jean-Jacques Hiblot Acked-by: Pavel Machek Reviewed-by: Daniel Thompson Acked-by: Lee Jones Acked-by: Tony Lindgren Tested-by: Tony Lindgren Tested-by: Guido Günther Signed-off-by: Pavel Machek Signed-off-by: Tony Lindgren commit 4ca501d6aaf21de31541deac35128bbea8427aa6 Author: Nathan Chancellor Date: Mon Feb 17 13:43:18 2020 -0700 RDMA/core: Fix use of logical OR in get_new_pps Clang warns: ../drivers/infiniband/core/security.c:351:41: warning: converting the enum constant to a boolean [-Wint-in-bool-context] if (!(qp_attr_mask & (IB_QP_PKEY_INDEX || IB_QP_PORT)) && qp_pps) { ^ 1 warning generated. A bitwise OR should have been used instead. Fixes: 1dd017882e01 ("RDMA/core: Fix protection fault in get_pkey_idx_qp_list") Link: https://lore.kernel.org/r/20200217204318.13609-1-natechancellor@gmail.com Link: https://github.com/ClangBuiltLinux/linux/issues/889 Reported-by: Dan Carpenter Signed-off-by: Nathan Chancellor Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c54d209c78b8a3d0a75e710993833ebe1eb3273b Author: Brett Creeley Date: Tue Feb 18 13:22:06 2020 -0800 ice: Wait for VF to be reset/ready before configuration The configuration/command below is failing when the VF in the xml file is already bound to the host iavf driver. pci_0000_af_0_0.xml:
> virsh attach-device domain_name pci_0000_af_0_0.xml error: Failed to attach device from pci_0000_af_0_0.xml error: Cannot set interface MAC/vlanid to 00:de:ad:00:11:01/0 for ifname ens1f1 vf 0: Device or resource busy This is failing because the VF has not been completely removed/reset after being unbound (via the virsh command above) from the host iavf driver and ice_set_vf_mac() checks if the VF is disabled before waiting for the reset to finish. Fix this by waiting for the VF remove/reset process to happen before checking if the VF is disabled. Also, since many functions for VF administration on the PF were more or less calling the same 3 functions (ice_wait_on_vf_reset(), ice_is_vf_disabled(), and ice_check_vf_init()) move these into the helper function ice_check_vf_ready_for_cfg(). Then call this function in any flow that attempts to configure/query a VF from the PF. Lastly, increase the maximum wait time in ice_wait_on_vf_reset() to 800ms, and modify/add the #define(s) that determine the wait time. This was done for robustness because in rare/stress cases VF removal can take a max of ~800ms and previously the wait was a max of ~300ms. Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 8a55c08d3bbc9ffc9639f69f742e59ebd99f913b Author: Michal Swiatkowski Date: Thu Feb 13 13:31:24 2020 -0800 ice: Don't tell the OS that link is going down Remove code that tell the OS that link is going down when user change flow control via ethtool. When link is up it isn't certain that link goes down after 0x0605 aq command. If link doesn't go down, OS thinks that link is down, but physical link is up. To reset this state user have to take interface down and up. If link goes down after 0x0605 command, FW send information about that and after that driver tells the OS that the link goes down. So this code in ethtool is unnecessary. Signed-off-by: Michal Swiatkowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 840f8ad0aaf20044e2fb099095bbce27c02f58da Author: Brett Creeley Date: Thu Feb 13 13:31:23 2020 -0800 ice: Don't reject odd values of usecs set by user Currently if a user sets an odd [tx|rx]-usecs value through ethtool, the request is denied because the hardware is set to have an ITR granularity of 2us. This caused poor customer experience. Fix this by aligning to a register allowed value, which results in rounding down. Also, print a once per ring container type message to be clear about our intentions. Also, change the ITR_TO_REG define to be the bitwise and of the ITR setting and the ICE_ITR_MASK. This makes the purpose of ITR_TO_REG more obvious. Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 242c46c023610dbc0213fc8fb6b71eb836bc5d95 Author: Dragos Tarcatu Date: Fri Feb 7 20:53:25 2020 +0200 ASoC: topology: Fix memleak in soc_tplg_manifest_load() In case of ABI version mismatch, _manifest needs to be freed as it is just a copy of the original topology manifest. However, if a driver manifest handler is defined, that would get executed and the cleanup is never reached. Fix that by getting the return status of manifest() instead of returning directly. Fixes: 583958fa2e52 ("ASoC: topology: Make manifest backward compatible from ABI v4") Signed-off-by: Dragos Tarcatu Link: https://lore.kernel.org/r/20200207185325.22320-3-dragos_tarcatu@mentor.com Signed-off-by: Mark Brown commit 2b2d5c4db732c027a14987cfccf767dac1b45170 Author: Dragos Tarcatu Date: Fri Feb 7 20:53:24 2020 +0200 ASoC: topology: Fix memleak in soc_tplg_link_elems_load() If soc_tplg_link_config() fails, _link needs to be freed in case of topology ABI version mismatch. However the current code is returning directly and ends up leaking memory in this case. This patch fixes that. Fixes: 593d9e52f9bb ("ASoC: topology: Add support to configure existing physical DAI links") Signed-off-by: Dragos Tarcatu Link: https://lore.kernel.org/r/20200207185325.22320-2-dragos_tarcatu@mentor.com Signed-off-by: Mark Brown commit 33c4acbe2f4e8f2866914b1fb90ce74fc7216c21 Author: Madhuparna Bhowmik Date: Wed Feb 19 20:47:46 2020 +0530 bridge: br_stp: Use built-in RCU list checking list_for_each_entry_rcu() has built-in RCU and lock checking. Pass cond argument to list_for_each_entry_rcu() to silence false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled by default. Signed-off-by: Madhuparna Bhowmik Signed-off-by: David S. Miller commit c3331d2fe3fd4d5e321f2467d01f72de7edfb5d0 Author: Dmitry Osipenko Date: Wed Feb 19 18:01:22 2020 +0300 nfc: pn544: Fix occasional HW initialization failure The PN544 driver checks the "enable" polarity during of driver's probe and it's doing that by turning ON and OFF NFC with different polarities until enabling succeeds. It takes some time for the hardware to power-down, and thus, to deassert the IRQ that is raised by turning ON the hardware. Since the delay after last power-down of the polarity-checking process is missed in the code, the interrupt may trigger immediately after installing the IRQ handler (right after the checking is done), which results in IRQ handler trying to touch the disabled HW and ends with marking NFC as 'DEAD' during of the driver's probe: pn544_hci_i2c 1-002a: NFC: nfc_en polarity : active high pn544_hci_i2c 1-002a: NFC: invalid len byte shdlc: llc_shdlc_recv_frame: NULL Frame -> link is dead This patch fixes the occasional NFC initialization failure on Nexus 7 device. Signed-off-by: Dmitry Osipenko Signed-off-by: David S. Miller commit 21b5ee59ef18e27d85810584caf1f7ddc705ea83 Author: Kim Phillips Date: Wed Feb 19 18:52:43 2020 +0100 x86/cpu/amd: Enable the fixed Instructions Retired counter IRPERF Commit aaf248848db50 ("perf/x86/msr: Add AMD IRPERF (Instructions Retired) performance counter") added support for access to the free-running counter via 'perf -e msr/irperf/', but when exercised, it always returns a 0 count: BEFORE: $ perf stat -e instructions,msr/irperf/ true Performance counter stats for 'true': 624,833 instructions 0 msr/irperf/ Simply set its enable bit - HWCR bit 30 - to make it start counting. Enablement is restricted to all machines advertising IRPERF capability, except those susceptible to an erratum that makes the IRPERF return bad values. That erratum occurs in Family 17h models 00-1fh [1], but not in F17h models 20h and above [2]. AFTER (on a family 17h model 31h machine): $ perf stat -e instructions,msr/irperf/ true Performance counter stats for 'true': 621,690 instructions 622,490 msr/irperf/ [1] Revision Guide for AMD Family 17h Models 00h-0Fh Processors [2] Revision Guide for AMD Family 17h Models 30h-3Fh Processors The revision guides are available from the bugzilla Link below. [ bp: Massage commit message. ] Fixes: aaf248848db50 ("perf/x86/msr: Add AMD IRPERF (Instructions Retired) performance counter") Signed-off-by: Kim Phillips Signed-off-by: Borislav Petkov Cc: Peter Zijlstra Cc: stable@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Link: http://lkml.kernel.org/r/20200214201805.13830-1-kim.phillips@amd.com commit a7a9456e8d28e81030f7cf6f1f59f907089916a9 Author: Amol Grover Date: Wed Feb 19 15:30:11 2020 +0530 net: hsr: Pass lockdep expression to RCU lists node_db is traversed using list_for_each_entry_rcu outside an RCU read-side critical section but under the protection of hsr->list_lock. Hence, add corresponding lockdep expression to silence false-positive warnings, and harden RCU lists. Signed-off-by: Amol Grover Signed-off-by: David S. Miller commit 11479e8e3cd896673a15af21cd0f145a4752f01a Author: Paul Cercueil Date: Tue Feb 11 11:53:37 2020 -0300 MIPS: ingenic: DTS: Fix watchdog nodes The devicetree ABI was broken on purpose by commit 6d532143c915 ("watchdog: jz4740: Use regmap provided by TCU driver"), and commit 1d9c30745455 ("watchdog: jz4740: Use WDT clock provided by TCU driver"). The commit message of the latter explains why the ABI was broken. However, the current devicetree files were not updated to the new ABI described in Documentation/devicetree/bindings/timer/ingenic,tcu.txt, so the watchdog driver would not probe. Fix this problem by updating the watchdog nodes to comply with the new ABI. Fixes: 6d532143c915 ("watchdog: jz4740: Use regmap provided by TCU driver") Signed-off-by: Paul Cercueil Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Rob Herring Cc: Mark Rutland Cc: Zhou Yanjie Cc: od@zcrc.me Cc: linux-mips@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: # v5.5+ commit eb41113870c94dd7e519c69184efc171b7327699 Author: 周琰杰 (Zhou Yanjie) Date: Sun Feb 16 20:10:28 2020 +0800 MIPS: X1000: Fix clock of watchdog node. The devicetree ABI was broken on purpose by commit 6d532143c915 ("watchdog: jz4740: Use regmap provided by TCU driver"), and commit 1d9c30745455 ("watchdog: jz4740: Use WDT clock provided by TCU driver"). The commit message of the latter explains why the ABI was broken. However, the current devicetree files were not updated to the new ABI described in Documentation/devicetree/bindings/timer/ingenic,tcu.txt, so the watchdog driver would not probe. Fix this problem by updating the clock of watchdog node from "&cgu X1000_CLK_RTCLK" to "&tcu TCU_CLK_WDT" to comply with the new ABI. Fixes: 7a16ccd300c2 ("[v8,1/4] MIPS: Ingenic: Add Ingenic X1000 support."). Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: paul@crapouillou.net Cc: robh+dt@kernel.org Cc: mark.rutland@arm.com Cc: ralf@linux-mips.org Cc: sernia.zhou@foxmail.com Cc: zhenwenjin@gmail.com Cc: dongsheng.qiu@ingenic.com commit 7822dee5d17a02c2b77da60c1cb50089ea64fd9b Merge: 7c8c1697c79d 13a7e459a41a Author: David S. Miller Date: Wed Feb 19 10:31:26 2020 -0800 Merge tag 'mlx5-fixes-2020-02-18' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2020-02-18 This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. For -stable v5.3 ('net/mlx5: Fix sleep while atomic in mlx5_eswitch_get_vepa') For -stable v5.4 ('net/mlx5: DR, Fix matching on vport gvmi') ('net/mlx5e: Fix crash in recovery flow without devlink reporter') For -stable v5.5 ('net/mlx5e: Reset RQ doorbell counter before moving RQ state from RST to RDY') ('net/mlx5e: Don't clear the whole vf config when switching modes') ==================== Signed-off-by: David S. Miller commit 72cf3b3df423c1bbd8fa1056fed009d3a260f8a9 Author: Nathan Chancellor Date: Mon Feb 17 14:11:49 2020 -0700 MIPS: vdso: Wrap -mexplicit-relocs in cc-option Clang does not support this option and errors out: clang-11: error: unknown argument: '-mexplicit-relocs' Clang does not appear to need this flag like GCC does because the jalr check that was added in commit 976c23af3ee5 ("mips: vdso: add build time check that no 'jalr t9' calls left") passes just fine with $ make ARCH=mips CC=clang CROSS_COMPILE=mipsel-linux-gnu- malta_defconfig arch/mips/vdso/ even before commit d3f703c4359f ("mips: vdso: fix 'jalr t9' crash in vdso code"). -mrelax-pic-calls has been supported since clang 9, which is the earliest version that could build a working MIPS kernel, and it is the default for clang so just leave it be. Fixes: d3f703c4359f ("mips: vdso: fix 'jalr t9' crash in vdso code") Link: https://github.com/ClangBuiltLinux/linux/issues/890 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: clang-built-linux@googlegroups.com commit e4103312d7b7afb8a3a7a842a33ef2b1856b2c0f Author: Parav Pandit Date: Wed Feb 12 09:26:29 2020 +0200 Revert "RDMA/cma: Simplify rdma_resolve_addr() error flow" This reverts commit 219d2e9dfda9431b808c28d5efc74b404b95b638. The call chain below requires the cm_id_priv's destination address to be setup before performing rdma_bind_addr(). Otherwise source port allocation fails as cma_port_is_unique() no longer sees the correct tuple to allow duplicate users of the source port. rdma_resolve_addr() cma_bind_addr() rdma_bind_addr() cma_get_port() cma_alloc_any_port() cma_port_is_unique() <- compared with zero daddr This can result in false failures to connect, particularly if the source port range is restricted. Fixes: 219d2e9dfda9 ("RDMA/cma: Simplify rdma_resolve_addr() error flow") Link: https://lore.kernel.org/r/20200212072635.682689-4-leon@kernel.org Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4b205766d8fcb1627429ff31a4b36248b71a0df1 Merge: fa079ba8a98d ab362fffa0fe Author: Linus Torvalds Date: Wed Feb 19 09:34:25 2020 -0800 Merge tag 'iommu-fixes-v5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: - Compile warning fix for the Intel IOMMU driver - Fix kdump boot with Intel IOMMU enabled and in passthrough mode - Disable AMD IOMMU on a Laptop/Embedded platform because the delay it introduces in DMA transactions causes screen flickering there with 4k monitors - Make domain_free function in QCOM IOMMU driver robust and not leak memory/dereference NULL pointers - Fix ARM-SMMU module parameter prefix names * tag 'iommu-fixes-v5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/arm-smmu: Restore naming of driver parameter prefix iommu/qcom: Fix bogus detach logic iommu/amd: Disable IOMMU on Stoney Ridge systems iommu/vt-d: Simplify check in identity_mapping() iommu/vt-d: Remove deferred_attach_domain() iommu/vt-d: Do deferred attachment in iommu_need_mapping() iommu/vt-d: Move deferred device attachment into helper function iommu/vt-d: Add attach_deferred() helper iommu/vt-d: Fix compile warning from intel-svm.h commit fa079ba8a98ddc1101ddec902e95eea40ef1e0dc Merge: 0a44cac81050 385536090b18 Author: Linus Torvalds Date: Wed Feb 19 09:26:59 2020 -0800 Merge tag 'sound-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "The only largish change in this pull request is about the revert of the recent max98090 and its relevant patches due to regressions. Other than that, all small fixes for ALSA core (covering KCSAN fuzzer warnings in ALSA sequencer and rawmidi), Intel SOF HD-audio fixes, AMD ACP fixes, usual HD-audio quirks, and various ASoC fixes" * tag 'sound-5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda: Use scnprintf() for printing texts for sysfs/procfs ALSA: hda/realtek - Apply quirk for yet another MSI laptop ASoC: sun8i-codec: Fix setting DAI data format ALSA: hda/realtek - Apply quirk for MSI GP63, too ASoC: amd: ACP needs to be powered off in BIOS. ASoC: hdmi-codec: set plugged_cb to NULL when component removing ASoC: dapm: remove snd_soc_dapm_put_enum_double_locked ASoC: max98090: revert invalid fix for handling SHDN ALSA: rawmidi: Avoid bit fields for state flags ALSA: seq: Fix concurrent access to queue current tick/time ALSA: seq: Avoid concurrent access to queue flags ASoC: codec2codec: avoid invalid/double-free of pcm runtime ASoC: amd: Buffer Size instead of MAX Buffer ASoC: SOF: Intel: hda: move i915 init earlier ASoC: SOF: Intel: hda: fix ordering bug in resume flow ALSA: hda: do not override bus codec_mask in link_get() ASoC: atmel: fix atmel_ssc_set_audio link failure ASoC: fsl_sai: Fix exiting path on probing failure commit 15755854d53b4bbb0bb37a0fce66f0156cfc8a17 Author: Keith Busch Date: Thu Feb 20 00:59:36 2020 +0900 nvme: Fix uninitialized-variable warning gcc may detect a false positive on nvme using an unintialized variable if setting features fails. Since this is not a fast path, explicitly initialize this variable to suppress the warning. Reported-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 2db01da8d25f0420c411e788a9e1ba39269ae37b Author: Julian Wiedmann Date: Tue Feb 11 09:27:38 2020 +0100 s390/qdio: fill SBALEs with absolute addresses sbale->addr holds an absolute address (or for some FCP usage, an opaque request ID), and should only be used with proper virt/phys translation. Signed-off-by: Julian Wiedmann Reviewed-by: Benjamin Block Signed-off-by: Vasily Gorbik commit e9091ffd6a0aaced111b5d6ead5eaab5cd7101bc Author: Julian Wiedmann Date: Mon Feb 10 10:48:11 2020 +0100 s390/qdio: fill SL with absolute addresses As the comment says, sl->sbal holds an absolute address. qeth currently solves this through wild casting, while zfcp doesn't care. Handle this properly in the code that actually builds the SL. Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter Reviewed-by: Steffen Maier [for qdio] Reviewed-by: Benjamin Block Signed-off-by: Vasily Gorbik commit df6d4f9db79c1a5d6f48b59db35ccd1e9ff9adfc Author: H.J. Lu Date: Thu Jan 16 12:46:51 2020 -0800 x86/boot/compressed: Don't declare __force_order in kaslr_64.c GCC 10 changed the default to -fno-common, which leads to LD arch/x86/boot/compressed/vmlinux ld: arch/x86/boot/compressed/pgtable_64.o:(.bss+0x0): multiple definition of `__force_order'; \ arch/x86/boot/compressed/kaslr_64.o:(.bss+0x0): first defined here make[2]: *** [arch/x86/boot/compressed/Makefile:119: arch/x86/boot/compressed/vmlinux] Error 1 Since __force_order is already provided in pgtable_64.c, there is no need to declare __force_order in kaslr_64.c. Signed-off-by: H.J. Lu Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200124181811.4780-1-hjl.tools@gmail.com commit 6c62ce8073daf27ae3fd03b6929d6cea3887eeb2 Author: Alex Deucher Date: Tue Feb 18 13:20:30 2020 -0500 drm/amdgpu/display: clean up hdcp workqueue handling Use the existence of the workqueue itself to determine when to enable HDCP features rather than sprinkling asic checks all over the code. Also add a check for the existence of the hdcp workqueue in the irq handling on the off chance we get and HPD RX interrupt with the CP bit set. This avoids a crash if the driver doesn't support HDCP for a particular asic. Fixes: 96a3b32e67236f ("drm/amd/display: only enable HDCP for DCN+") Bug: https://bugzilla.kernel.org/show_bug.cgi?id=206519 Reviewed-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit debcf83770073f90c9b075134650fdc758ff3033 Author: changzhu Date: Fri Feb 14 10:57:17 2020 +0800 drm/amdgpu: add is_raven_kicker judgement for raven1 The rlc version of raven_kicer_rlc is different from the legacy rlc version of raven_rlc. So it needs to add a judgement function for raven_kicer_rlc and avoid disable GFXOFF when loading raven_kicer_rlc. Signed-off-by: changzhu Reviewed-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 98f7b86a0becc1154b1a6df6e75c9695dfd87e0d Author: Andy Shevchenko Date: Wed Feb 12 12:32:18 2020 +0200 nvme-pci: Use single IRQ vector for old Apple models People reported that old Apple machines are not working properly if the non-first IRQ vector is in use. Set quirk for that models to limit IRQ to use first vector only. Based on original patch by GitHub user npx001. Link: https://github.com/Dunedan/mbp-2016-linux/issues/9 Cc: Benjamin Herrenschmidt Cc: Leif Liddy Signed-off-by: Andy Shevchenko Signed-off-by: Keith Busch commit 1fae37accfc5872af3905d4ba71dc6ab15829be7 Author: Shyjumon N Date: Thu Feb 6 13:17:25 2020 -0700 nvme/pci: Add sleep quirk for Samsung and Toshiba drives The Samsung SSD SM981/PM981 and Toshiba SSD KBG40ZNT256G on the Lenovo C640 platform experience runtime resume issues when the SSDs are kept in sleep/suspend mode for long time. This patch applies the 'Simple Suspend' quirk to these configurations. With this patch, the issue had not been observed in a 1+ day test. Reviewed-by: Jon Derrick Reviewed-by: Christoph Hellwig Signed-off-by: Shyjumon N Signed-off-by: Keith Busch commit d0022c0ef29b78bcbe8a5c5894bd2307143afce1 Author: Will Deacon Date: Wed Feb 19 10:19:13 2020 +0000 arm64: memory: Add missing brackets to untagged_addr() macro Add brackets around the evaluation of the 'addr' parameter to the untagged_addr() macro so that the cast to 'u64' applies to the result of the expression. Cc: Fixes: 597399d0cb91 ("arm64: tags: Preserve tags for addresses translated via TTBR1") Reported-by: Linus Torvalds Signed-off-by: Will Deacon commit 6c89ffea60aa3b2a33ae7987de1e84bfb89e4c9e Author: Takashi Iwai Date: Tue Feb 18 12:17:37 2020 +0100 ASoC: pcm: Fix possible buffer overflow in dpcm state sysfs output dpcm_show_state() invokes multiple snprintf() calls to concatenate formatted strings on the fixed size buffer. The usage of snprintf() is supposed for avoiding the buffer overflow, but it doesn't work as expected because snprintf() doesn't return the actual output size but the size to be written. Fix this bug by replacing all snprintf() calls with scnprintf() calls. Fixes: f86dcef87b77 ("ASoC: dpcm: Add debugFS support for DPCM") Signed-off-by: Takashi Iwai Acked-by: Cezary Rojewski Link: https://lore.kernel.org/r/20200218111737.14193-4-tiwai@suse.de Signed-off-by: Mark Brown commit 549cd0ba04dcfe340c349cd983bd440480fae8ee Author: Takashi Iwai Date: Tue Feb 18 12:17:36 2020 +0100 ASoC: intel: skl: Fix possible buffer overflow in debug outputs The debugfs output of intel skl driver writes strings with multiple snprintf() calls with the fixed size. This was supposed to avoid the buffer overflow but actually it still would, because snprintf() returns the expected size to be output, not the actual output size. Fix it by replacing snprintf() calls with scnprintf(). Fixes: d14700a01f91 ("ASoC: Intel: Skylake: Debugfs facility to dump module config") Signed-off-by: Takashi Iwai Acked-by: Cezary Rojewski Link: https://lore.kernel.org/r/20200218111737.14193-3-tiwai@suse.de Signed-off-by: Mark Brown commit 64bbacc5f08c01954890981c63de744df1f29a30 Author: Takashi Iwai Date: Tue Feb 18 12:17:35 2020 +0100 ASoC: intel: skl: Fix pin debug prints skl_print_pins() loops over all given pins but it overwrites the text at the very same position while increasing the returned length. Fix this to show the all pin contents properly. Fixes: d14700a01f91 ("ASoC: Intel: Skylake: Debugfs facility to dump module config") Signed-off-by: Takashi Iwai Acked-by: Cezary Rojewski Link: https://lore.kernel.org/r/20200218111737.14193-2-tiwai@suse.de Signed-off-by: Mark Brown commit 140588bfed2727e9a4814211617a79401d74922f Author: Stephen Kitt Date: Fri Feb 14 18:26:28 2020 +0100 s390: remove obsolete ieee_emulation_warnings s390 math emulation was removed with commit 5a79859ae0f3 ("s390: remove 31 bit support"), rendering ieee_emulation_warnings useless. The code still built because it was protected by CONFIG_MATHEMU, which was no longer selectable. This patch removes the sysctl_ieee_emulation_warnings declaration and the sysctl entry declaration. Link: https://lkml.kernel.org/r/20200214172628.3598516-1-steve@sk2.org Reviewed-by: Vasily Gorbik Signed-off-by: Stephen Kitt Signed-off-by: Vasily Gorbik commit ab362fffa0feb0da23191111e60b641d39130053 Author: Will Deacon Date: Tue Feb 18 17:27:56 2020 +0000 iommu/arm-smmu: Restore naming of driver parameter prefix Extending the Arm SMMU driver to allow for modular builds changed KBUILD_MODNAME to be "arm_smmu_mod" so that a single module could be built from the multiple existing object files without the need to rename any source files. This inadvertently changed the name of the driver parameters, which may lead to runtime issues if bootloaders are relying on the old names for correctness (e.g. "arm-smmu.disable_bypass=0"). Although MODULE_PARAM_PREFIX can be overridden to restore the old naming for builtin parameters, only the new name is matched by modprobe and so loading the driver as a module would cause parameters specified on the kernel command line to be ignored. Instead, rename "arm_smmu_mod" to "arm_smmu". Whilst it's a bit of a bodge, this allows us to create a single module without renaming any files and makes use of the fact that underscores and hyphens can be used interchangeably in parameter names. Cc: Robin Murphy Cc: Russell King Reported-by: Li Yang Fixes: cd221bd24ff5 ("iommu/arm-smmu: Allow building as a module") Signed-off-by: Will Deacon Reviewed-by: Robin Murphy Signed-off-by: Joerg Roedel commit faf305c51aeabd1ea2d7131e798ef5f55f4a7750 Author: Robin Murphy Date: Tue Feb 18 18:12:41 2020 +0000 iommu/qcom: Fix bogus detach logic Currently, the implementation of qcom_iommu_domain_free() is guaranteed to do one of two things: WARN() and leak everything, or dereference NULL and crash. That alone is terrible, but in fact the whole idea of trying to track the liveness of a domain via the qcom_domain->iommu pointer as a sanity check is full of fundamentally flawed assumptions. Make things robust and actually functional by not trying to be quite so clever. Reported-by: Brian Masney Tested-by: Brian Masney Reported-by: Naresh Kamboju Fixes: 0ae349a0f33f ("iommu/qcom: Add qcom_iommu") Signed-off-by: Robin Murphy Tested-by: Stephan Gerhold Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: Joerg Roedel commit 1d7cb11e1090526bc714cda98ca3484c3b30ff76 Author: Kishon Vijay Abraham I Date: Tue Feb 18 17:44:18 2020 +0530 phy: core: Fix phy_get() to not return error on link creation failure commit 987351e1ea77 ("phy: core: Add consumer device link support") added device link support between PHY consumer and PHY provider. However certain peripherals (DWC3 ULPI) have cyclic dependency between the PHY provider and PHY consumer causing the device link creation to fail. Instead of erroring out on failure to create device link, only add a debug print to indicate device link creation failed to get USB working again in multiple platforms. Fixes: 987351e1ea77 ("phy: core: Add consumer device link support") Cc: Alexandre Torgue Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Alexandre TORGUE commit 46b7edf1c7b7c91004c4db2c355cbd033f2385f9 Author: Tony Lindgren Date: Tue Feb 4 07:36:02 2020 -0800 phy: mapphone-mdm6600: Fix write timeouts with shorter GPIO toggle interval I've noticed that when writing data to the modem the writes can time out at some point eventually. Looks like kicking the modem idle GPIO every 600 ms instead of once a second fixes the issue. Note that this rate is different from our runtime PM autosuspend rate MDM6600_MODEM_IDLE_DELAY_MS that we still want to keep at 1 second, so let's add a separate define for PHY_MDM6600_IDLE_KICK_MS. Fixes: f7f50b2a7b05 ("phy: mapphone-mdm6600: Add runtime PM support for n_gsm on USB suspend") Cc: Marcel Partap Cc: Merlijn Wajer Cc: Michael Scott Cc: NeKit Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren Signed-off-by: Kishon Vijay Abraham I commit 3dfee47b215e49788cfc80e474820ea2e948c031 Author: Kai-Heng Feng Date: Mon Feb 10 15:51:15 2020 +0800 iommu/amd: Disable IOMMU on Stoney Ridge systems Serious screen flickering when Stoney Ridge outputs to a 4K monitor. Use identity-mapping and PCI ATS doesn't help this issue. According to Alex Deucher, IOMMU isn't enabled on Windows, so let's do the same here to avoid screen flickering on 4K monitor. Cc: Alex Deucher Bug: https://gitlab.freedesktop.org/drm/amd/issues/961 Signed-off-by: Kai-Heng Feng Acked-by: Alex Deucher Signed-off-by: Joerg Roedel commit 2d0b1919457ad78036f24169968cadc6f55d37ec Author: Dave Jiang Date: Tue Feb 18 09:51:58 2020 -0700 dmaengine: idxd: correct reserved token calculation The calcuation for limit of reserved token did not take into account the change the user wanted vs the current group reserved token. This causes changing of the reserved token to be possible only after we set the value of the reserved token back to 0. Fix calculation so we can set a value that is non zero for reserved token. Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver") Reported-by: Jerry Chen Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/158204471889.37789.7749177228265869168.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit c37c0ab029569a75fd180edb03d411e7a28a936f Author: Hui Wang Date: Wed Feb 19 13:23:06 2020 +0800 ALSA: hda/realtek - Fix a regression for mute led on Lenovo Carbon X1 Need to chain the THINKPAD_ACPI, otherwise the mute led will not work. Fixes: d2cd795c4ece ("ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen") Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20200219052306.24935-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit 8390318c04bb24cc4d41ac03e009b0748882f99f Author: Peter Ujfalusi Date: Fri Feb 14 11:14:41 2020 +0200 dmaengine: ti: k3-udma: Fix terminated transfer handling When we receive back the descriptor of the terminated transfer the cookie must be marked as completed to make sure that the accounting is correct. In udma_tx_status() the status should be marked as completed if the channel is no longer running (it can only happen if the channel is not yet started for the first time, or after a channel termination). Fixes: 25dcb5dd7b7ce ("dmaengine: ti: New driver for K3 UDMA") Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200214091441.27535-7-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit c7450bb211f3ded7cb6e4d305855683ed7d04e60 Author: Peter Ujfalusi Date: Fri Feb 14 11:14:40 2020 +0200 dmaengine: ti: k3-udma: Use the channel direction in pause/resume functions It should be possible to pause, resume and check the pause state of a channel even if we do not have active transfer. udma_is_chan_paused() can trigger NULL pointer reference in it's current form when the status is checked while uc->desc is NULL. Fixes: 25dcb5dd7b7ce ("dmaengine: ti: New driver for K3 UDMA") Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200214091441.27535-6-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 6cf668a4ef829b9a11d74a4954f02a1767403246 Author: Peter Ujfalusi Date: Fri Feb 14 11:14:39 2020 +0200 dmaengine: ti: k3-udma: Use the TR counter helper for slave_sg and cyclic Use the generic TR setup function to get the TR counters for both cyclic and slave_sg transfers. This way the period_size for cyclic and sg_dma_len() for slave_sg can be as large as (SZ_64K - 1) * (SZ_64K - 1) and we can handle cases when the length is >SZ_64K and a prime number. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200214091441.27535-5-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit a97934071fc3b0a5e52c89e06da68bcac0481de3 Author: Peter Ujfalusi Date: Fri Feb 14 11:14:38 2020 +0200 dmaengine: ti: k3-udma: Move the TR counter calculation to helper function Move the TR counter parameter configuration code out from the prep_memcpy callback to a helper function to allow a generic re-usable code for other TR based transfers. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200214091441.27535-4-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 16cd3c670183d788f5a0dfe41415d3386ba92ed9 Author: Peter Ujfalusi Date: Fri Feb 14 11:14:37 2020 +0200 dmaengine: ti: k3-udma: Workaround for RX teardown with stale data in peer When a channel is asked to be stopped (teardown) and we do not have active descriptor to receive stale data buffered on the remote side then the teardown will not complete as UDMA needs a descriptor to be able to flush out the DMA pipe. The peer is trying to push the data to UDMA in teardown, but UDMA is pushing back because it has no descriptor which would allow it to drain the data. The workaround is to create 1K 'trashcan' to receive the discarded data and set up descriptors for packet and TR mode channels. When a channel is stopped and there is no active descriptor then a descriptor is pushed to the ring for UDMA before the teardown is initiated. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200214091441.27535-3-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 1c83767c9d417c4cc45d95f09b3a6e6c6b5417b5 Author: Vignesh Raghavendra Date: Fri Feb 14 11:14:36 2020 +0200 dmaengine: ti: k3-udma: Use ktime/usleep_range based TX completion check In some cases (McSPI for example) the jiffie and delayed_work based workaround can cause big throughput drop. Switch to use ktime/usleep_range based implementation to be able to sustain speed for PDMA based peripherals. Signed-off-by: Vignesh Raghavendra Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200214091441.27535-2-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 13a7e459a41a56d788ab33d825c6205379bbb711 Author: Erez Shitrit Date: Tue Jan 14 09:27:27 2020 +0200 net/mlx5: DR, Handle reformat capability over sw-steering tables On flow table creation, send the relevant flags according to what the FW currently supports. When FW doesn't support reformat option over SW-steering managed table, the driver shouldn't pass this. Fixes: 988fd6b32d07 ("net/mlx5: DR, Pass table flags at creation to lower layer") Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed commit 76781623f009d5615b67f0675230ef90eaa9272a Author: Paul Blakey Date: Tue Dec 31 17:04:15 2019 +0200 net/mlx5: Fix lowest FDB pool size The pool sizes represent the pool sizes in the fw. when we request a pool size from fw, it will return the next possible group. We track how many pools the fw has left and start requesting groups from the big to the small. When we start request 4k group, which doesn't exists in fw, fw wants to allocate the next possible size, 64k, but will fail since its exhausted. The correct smallest pool size in fw is 128 and not 4k. Fixes: 39ac237ce009 ("net/mlx5: E-Switch, Refactor chains and priorities") Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 383de108157c881074f32914b61125e299820bd2 Author: Dmytro Linkin Date: Wed Feb 12 11:32:39 2020 +0200 net/mlx5e: Don't clear the whole vf config when switching modes There is no need to reset all vf config (except link state) between legacy and switchdev modes changes. Also, set link state to AUTO, when legacy enabled. Fixes: 3b83b6c2e024 ("net/mlx5e: Clear VF config when switching modes") Signed-off-by: Dmytro Linkin Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 52d214976d4f64504c1bbb52d47b46a5a3d5ee42 Author: Hamdan Igbaria Date: Wed Feb 5 14:31:12 2020 +0200 net/mlx5: DR, Fix matching on vport gvmi Set vport gvmi in the tag, only when source gvmi is set in the bit mask. Fixes: 26d688e3 ("net/mlx5: DR, Add Steering entry (STE) utilities") Signed-off-by: Hamdan Igbaria Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 1ad6c43c6a7b8627240c6cc19c69e31fedc596a7 Author: Aya Levin Date: Wed Feb 12 15:17:25 2020 +0200 net/mlx5e: Fix crash in recovery flow without devlink reporter When health reporters are not supported, recovery function is invoked directly, not via devlink health reporters. In this direct flow, the recover function input parameter was passed incorrectly and is causing a kernel oops. This patch is fixing the input parameter. Following call trace is observed on rx error health reporting. Internal error: Oops: 96000007 [#1] PREEMPT SMP Process kworker/u16:4 (pid: 4584, stack limit = 0x00000000c9e45703) Call trace: mlx5e_rx_reporter_err_rq_cqe_recover+0x30/0x164 [mlx5_core] mlx5e_health_report+0x60/0x6c [mlx5_core] mlx5e_reporter_rq_cqe_err+0x6c/0x90 [mlx5_core] mlx5e_rq_err_cqe_work+0x20/0x2c [mlx5_core] process_one_work+0x168/0x3d0 worker_thread+0x58/0x3d0 kthread+0x108/0x134 Fixes: c50de4af1d63 ("net/mlx5e: Generalize tx reporter's functionality") Signed-off-by: Aya Levin Signed-off-by: Parav Pandit Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 5ee090ed0da649b1febae2b7c285ac77d1e55a0c Author: Aya Levin Date: Mon Dec 9 14:08:18 2019 +0200 net/mlx5e: Reset RQ doorbell counter before moving RQ state from RST to RDY Initialize RQ doorbell counters to zero prior to moving an RQ from RST to RDY state. Per HW spec, when RQ is back to RDY state, the descriptor ID on the completion is reset. The doorbell record must comply. Fixes: 8276ea1353a4 ("net/mlx5e: Report and recover from CQE with error on RQ") Signed-off-by: Aya Levin Reported-by: Tariq Toukan Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 3d9c5e023a0dbf3e117bb416cfefd9405bf5af0c Author: Huy Nguyen Date: Mon Feb 3 16:32:18 2020 -0600 net/mlx5: Fix sleep while atomic in mlx5_eswitch_get_vepa rtnl_bridge_getlink is protected by rcu lock, so mlx5_eswitch_get_vepa cannot take mutex lock. Two possible issues can happen: 1. User at the same time change vepa mode via RTM_SETLINK command. 2. User at the same time change the switchdev mode via devlink netlink interface. Case 1 cannot happen because rtnl executes one message in order. Case 2 can happen but we do not expect user to change the switchdev mode when changing vepa. Even if a user does it, so he will read a value which is no longer valid. Fixes: 8da202b24913 ("net/mlx5: E-Switch, Add support for VEPA in legacy mode.") Signed-off-by: Huy Nguyen Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 26c4b4758fce8f0ae744335e1762213be29db441 Author: Fabio Estevam Date: Mon Feb 17 16:15:03 2020 -0300 arm64: dts: imx8qxp-mek: Remove unexisting Ethernet PHY There is only on Ethernet port and one Ethernet PHY on imx8qxp-mek. Remove the unexisting ethphy1 port. This fixes a run-time warning: mdio_bus 5b040000.ethernet-1: MDIO device at address 1 is missing. Fixes: fdea904e85e1 ("arm64: dts: imx: add imx8qxp mek support") Signed-off-by: Fabio Estevam Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo commit 929a3af90f0f4bd7132d83552c1a98c83f60ef7e Author: Pavel Begunkov Date: Wed Feb 19 00:19:09 2020 +0300 io_uring: fix use-after-free by io_cleanup_req() io_cleanup_req() should be called before req->io is freed, and so shouldn't be after __io_free_req() -> __io_req_aux_free(). Also, it will be ignored for in io_free_req_many(), which use __io_req_aux_free(). Place cleanup_req() into __io_req_aux_free(). Fixes: 99bc4c38537d774 ("io_uring: fix iovec leaks") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 7c8c1697c79d3905965f12cb1408e8c6274ac5c1 Merge: a2cfb96cc365 9a7712048f9d Author: David S. Miller Date: Tue Feb 18 15:44:13 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net This batch contains Netfilter fixes for net: 1) Restrict hashlimit size to 1048576, from Cong Wang. 2) Check for offload flags from nf_flow_table_offload_setup(), this fixes a crash in case the hardware offload is disabled. From Florian Westphal. 3) Three preparation patches to extend the conntrack clash resolution, from Florian. 4) Extend clash resolution to deal with DNS packets from the same flow racing to set up the NAT configuration. 5) Small documentation fix in pipapo, from Stefano Brivio. 6) Remove misleading unlikely() from pipapo_refill(), also from Stefano. 7) Reduce hashlimit mutex scope, from Cong Wang. This patch is actually triggering another problem, still under discussion, another patch to fix this will follow up. ==================== Signed-off-by: David S. Miller commit e75fd33b3f744f644061a4f9662bd63f5434f806 Author: Filipe Manana Date: Thu Feb 13 12:29:50 2020 +0000 Btrfs: fix btrfs_wait_ordered_range() so that it waits for all ordered extents In btrfs_wait_ordered_range() once we find an ordered extent that has finished with an error we exit the loop and don't wait for any other ordered extents that might be still in progress. All the users of btrfs_wait_ordered_range() expect that there are no more ordered extents in progress after that function returns. So past fixes such like the ones from the two following commits: ff612ba7849964 ("btrfs: fix panic during relocation after ENOSPC before writeback happens") 28aeeac1dd3080 ("Btrfs: fix panic when starting bg cache writeout after IO error") don't work when there are multiple ordered extents in the range. Fix that by making btrfs_wait_ordered_range() wait for all ordered extents even after it finds one that had an error. Link: https://github.com/kdave/btrfs-progs/issues/228#issuecomment-569777554 CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Qu Wenruo Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit b778cf962d71a0e737923d55d0432f3bd287258e Author: Josef Bacik Date: Thu Feb 13 10:47:31 2020 -0500 btrfs: fix bytes_may_use underflow in prealloc error condtition I hit the following warning while running my error injection stress testing: WARNING: CPU: 3 PID: 1453 at fs/btrfs/space-info.h:108 btrfs_free_reserved_data_space_noquota+0xfd/0x160 [btrfs] RIP: 0010:btrfs_free_reserved_data_space_noquota+0xfd/0x160 [btrfs] Call Trace: btrfs_free_reserved_data_space+0x4f/0x70 [btrfs] __btrfs_prealloc_file_range+0x378/0x470 [btrfs] elfcorehdr_read+0x40/0x40 ? elfcorehdr_read+0x40/0x40 ? btrfs_commit_transaction+0xca/0xa50 [btrfs] ? dput+0xb4/0x2a0 ? btrfs_log_dentry_safe+0x55/0x70 [btrfs] ? btrfs_sync_file+0x30e/0x420 [btrfs] ? do_fsync+0x38/0x70 ? __x64_sys_fdatasync+0x13/0x20 ? do_syscall_64+0x5b/0x1b0 ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 This happens if we fail to insert our reserved file extent. At this point we've already converted our reservation from ->bytes_may_use to ->bytes_reserved. However once we break we will attempt to free everything from [cur_offset, end] from ->bytes_may_use, but our extent reservation will overlap part of this. Fix this problem by adding ins.offset (our extent allocation size) to cur_offset so we remove the actual remaining part from ->bytes_may_use. I validated this fix using my inject-error.py script python inject-error.py -o should_fail_bio -t cache_save_setup -t \ __btrfs_prealloc_file_range \ -t insert_reserved_file_extent.constprop.0 \ -r "-5" ./run-fsstress.sh where run-fsstress.sh simply mounts and runs fsstress on a disk. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit bd727173e4432fe6cb70ba108dc1f3602c5409d7 Author: Josef Bacik Date: Thu Feb 13 10:47:30 2020 -0500 btrfs: handle logged extent failure properly If we're allocating a logged extent we attempt to insert an extent record for the file extent directly. We increase space_info->bytes_reserved, because the extent entry addition will call btrfs_update_block_group(), which will convert the ->bytes_reserved to ->bytes_used. However if we fail at any point while inserting the extent entry we will bail and leave space on ->bytes_reserved, which will trigger a WARN_ON() on umount. Fix this by pinning the space if we fail to insert, which is what happens in every other failure case that involves adding the extent entry. CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1e90315149f3fe148e114a5de86f0196d1c21fa5 Author: Josef Bacik Date: Thu Feb 13 10:47:29 2020 -0500 btrfs: do not check delayed items are empty for single transaction cleanup btrfs_assert_delayed_root_empty() will check if the delayed root is completely empty, but this is a filesystem-wide check. On cleanup we may have allowed other transactions to begin, for whatever reason, and thus the delayed root is not empty. So remove this check from cleanup_one_transation(). This however can stay in btrfs_cleanup_transaction(), because it checks only after all of the transactions have been properly cleaned up, and thus is valid. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 315bf8ef914f31d51d084af950703aa1e09a728c Author: Josef Bacik Date: Thu Feb 13 10:47:28 2020 -0500 btrfs: reset fs_root to NULL on error in open_ctree While running my error injection script I hit a panic when we tried to clean up the fs_root when freeing the fs_root. This is because fs_info->fs_root == PTR_ERR(-EIO), which isn't great. Fix this by setting fs_info->fs_root = NULL; if we fail to read the root. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 81f7eb00ff5bb8326e82503a32809421d14abb8a Author: Jeff Mahoney Date: Tue Feb 11 15:25:37 2020 +0800 btrfs: destroy qgroup extent records on transaction abort We clean up the delayed references when we abort a transaction but we leave the pending qgroup extent records behind, leaking memory. This patch destroys the extent records when we destroy the delayed refs and makes sure ensure they're gone before releasing the transaction. Fixes: 3368d001ba5d ("btrfs: qgroup: Record possible quota-related extent for qgroup.") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Josef Bacik Signed-off-by: Jeff Mahoney [ Rebased to latest upstream, remove to_qgroup() helper, use rbtree_postorder_for_each_entry_safe() wrapper ] Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9eb425b2e04e0e3006adffea5bf5f227a896f128 Author: Christophe Leroy Date: Tue Feb 18 14:09:29 2020 +0000 powerpc/entry: Fix an #if which should be an #ifdef in entry_32.S Fixes: 12c3f1fd87bf ("powerpc/32s: get rid of CPU_FTR_601 feature") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a99fc0ad65b87a1ba51cfa3e0e9034ee294c3e07.1582034961.git.christophe.leroy@c-s.fr commit 0a44cac8105059eb756ed4276e932e54e1ba004d Merge: 2b72104b8c12 75467ee48a5e Author: Linus Torvalds Date: Tue Feb 18 15:06:38 2020 -0800 Merge tag 'dma-mapping-5.6' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fixes from Christoph Hellwig: - give command line cma= precedence over the CONFIG_ option (Nicolas Saenz Julienne) - always allow 32-bit DMA, even for weirdly placed ZONE_DMA - improve the debug printks when memory is not addressable, to help find problems with swiotlb initialization * tag 'dma-mapping-5.6' of git://git.infradead.org/users/hch/dma-mapping: dma-direct: improve DMA mask overflow reporting dma-direct: improve swiotlb error reporting dma-direct: relax addressability checks in dma_direct_supported dma-contiguous: CMA: give precedence to cmdline commit 2b72104b8c12504176fb5fc1442d6e54e31e338b Merge: 6551d5c56eb0 dc10e4181c05 Author: Linus Torvalds Date: Tue Feb 18 14:54:30 2020 -0800 Merge tag 'tpmdd-next-20200217' of git://git.infradead.org/users/jjs/linux-tpmdd Pull tpm fixes from Jarkko Sakkinen: "Two bug fixes" * tag 'tpmdd-next-20200217' of git://git.infradead.org/users/jjs/linux-tpmdd: tpm: Initialize crypto_id of allocated_banks to HASH_ALGO__LAST tpm: Revert tpm_tis_spi_mod.ko to tpm_tis_spi.ko. commit 6551d5c56eb0d02db2274d7a8d26c333deba7fd2 Author: Linus Torvalds Date: Tue Feb 18 10:12:58 2020 -0800 pipe: make sure to wake up everybody when the last reader/writer closes Andrei Vagin reported that commit 0ddad21d3e99 ("pipe: use exclusive waits when reading or writing") broke one of the CRIU tests. He even has a trivial reproducer: #include #include #include int main() { int p[2]; pid_t p1, p2; int status; if (pipe(p) == -1) return 1; p1 = fork(); if (p1 == 0) { close(p[1]); read(p[0], &status, sizeof(status)); return 0; } p2 = fork(); if (p2 == 0) { close(p[1]); read(p[0], &status, sizeof(status)); return 0; } sleep(1); close(p[1]); wait(&status); wait(&status); return 0; } and the problem - once he points it out - is obvious. We use these nice exclusive waits, but when the last writer goes away, it then needs to wake up _every_ reader (and conversely, the last reader disappearing needs to wake every writer, of course). In fact, when going through this, we had several small oddities around how to wake things. We did in fact wake every reader when we changed the size of the pipe buffers. But that's entirely pointless, since that just acts as a possible source of new space - no new data to read. And when we change the size of the buffer, we don't need to wake all writers even when we add space - that case acts just as if somebody made space by reading, and any writer that finds itself not filling it up entirely will wake the next one. On the other hand, on the exit path, we tried to limit the wakeups with the proper poll keys etc, which is entirely pointless, because at that point we obviously need to wake up everybody. So don't do that: just wake up everybody - but only do that if the counts changed to zero. So fix those non-IO wakeups to be more proper: space change doesn't add any new data, but it might make room for writers, so it wakes up a writer. And the actual changes to reader/writer counts should wake up everybody, since everybody is affected (ie readers will all see EOF if the writers have gone away, and writers will all get EPIPE if all readers have gone away). Fixes: 0ddad21d3e99 ("pipe: use exclusive waits when reading or writing") Reported-and-tested-by: Andrei Vagin Cc: Josh Triplett Cc: Matthew Wilcox Signed-off-by: Linus Torvalds commit 9a7712048f9d43da5022e75eca3d6b81080e76d3 Author: Stefano Brivio Date: Fri Feb 14 18:14:14 2020 +0100 netfilter: nft_set_pipapo: Don't abuse unlikely() in pipapo_refill() I originally used unlikely() in the if (match_only) clause, which we hit on the mapping table for the last field in a set, to ensure we avoid branching to the rest of for loop body, which is executed more frequently. However, Pablo reports, this is confusing as it gives the impression that this is not a common case, and it's actually not the intended usage of unlikely(). I couldn't observe any statistical difference in matching rates on x864_64 and aarch64 without it, so just drop it. Reported-by: Pablo Neira Ayuso Fixes: 3c4287f62044 ("nf_tables: Add set type for arbitrary concatenation of ranges") Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit bd97ad51a7eb1b02049deca56bc26d96cabbac8a Author: Stefano Brivio Date: Fri Feb 14 18:14:13 2020 +0100 netfilter: nft_set_pipapo: Fix mapping table example in comments In both insertion and lookup examples, the two element pointers of rule mapping tables were swapped. Fix that. Reported-by: Pablo Neira Ayuso Fixes: 3c4287f62044 ("nf_tables: Add set type for arbitrary concatenation of ranges") Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit a2cfb96cc3654c6d451020480a4bcfbbca564350 Author: Madhuparna Bhowmik Date: Wed Feb 19 01:28:20 2020 +0530 flow_table.c: Use built-in RCU list checking hlist_for_each_entry_rcu() has built-in RCU and lock checking. Pass cond argument to list_for_each_entry_rcu() to silence false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled by default. Signed-off-by: Madhuparna Bhowmik Signed-off-by: David S. Miller commit 53742e69e85d2eb7ed56f58d277bc3e682f8949e Author: Madhuparna Bhowmik Date: Wed Feb 19 01:28:02 2020 +0530 datapath.c: Use built-in RCU list checking hlist_for_each_entry_rcu() has built-in RCU and lock checking. Pass cond argument to list_for_each_entry_rcu() to silence false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled by default. Signed-off-by: Madhuparna Bhowmik Signed-off-by: David S. Miller commit fed48423f14d9fa184b262d7c35d9dc1c3698500 Author: Madhuparna Bhowmik Date: Wed Feb 19 01:27:42 2020 +0530 vport.c: Use built-in RCU list checking hlist_for_each_entry_rcu() has built-in RCU and lock checking. Pass cond argument to list_for_each_entry_rcu() to silence false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled by default. Signed-off-by: Madhuparna Bhowmik Signed-off-by: David S. Miller commit 7790614616458b6dd3d90652acfa6b7443ee7041 Author: Madhuparna Bhowmik Date: Wed Feb 19 01:24:25 2020 +0530 meter.c: Use built-in RCU list checking hlist_for_each_entry_rcu() has built-in RCU and lock checking. Pass cond argument to list_for_each_entry_rcu() to silence false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled by default. Signed-off-by: Madhuparna Bhowmik Signed-off-by: David S. Miller commit 9facfdb5467382a21fc0bd4211ced26c06f28832 Author: Madhuparna Bhowmik Date: Wed Feb 19 00:11:32 2020 +0530 netlabel_domainhash.c: Use built-in RCU list checking list_for_each_entry_rcu() has built-in RCU and lock checking. Pass cond argument to list_for_each_entry_rcu() to silence false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled by default. Signed-off-by: Madhuparna Bhowmik Signed-off-by: David S. Miller commit 8c70c3d72833a08214ff8c8df1f7d9778509888d Author: Madhuparna Bhowmik Date: Tue Feb 18 23:47:18 2020 +0530 net: netlabel: Use built-in RCU list checking list_for_each_entry_rcu() has built-in RCU and lock checking. Pass cond argument to list_for_each_entry_rcu() to silence false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled by default. Signed-off-by: Madhuparna Bhowmik Signed-off-by: David S. Miller commit 379349e9bc3b42b8b2f8f7a03f64a97623fff323 Author: Paolo Abeni Date: Tue Feb 18 18:15:44 2020 +0100 Revert "net: dev: introduce support for sch BYPASS for lockless qdisc" This reverts commit ba27b4cdaaa66561aaedb2101876e563738d36fe Ahmed reported ouf-of-order issues bisected to commit ba27b4cdaaa6 ("net: dev: introduce support for sch BYPASS for lockless qdisc"). I can't find any working solution other than a plain revert. This will introduce some minor performance regressions for pfifo_fast qdisc. I plan to address them in net-next with more indirect call wrapper boilerplate for qdiscs. Reported-by: Ahmad Fatoum Fixes: ba27b4cdaaa6 ("net: dev: introduce support for sch BYPASS for lockless qdisc") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 29f20dd6258a6f9c434992a0f1fc522caecda7ef Author: Jonathan Neuschäfer Date: Tue Feb 18 16:47:01 2020 +0100 net: phy: broadcom: Fix a typo ("firsly") Signed-off-by: Jonathan Neuschäfer Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 310006cab991fa895cc3a42c53609778b0d50d46 Author: Dan Murphy Date: Tue Feb 18 12:52:52 2020 -0600 ASoC: tas2562: Return invalid for when bitwidth is invalid If the bitwidth passed in to the set_bitwidth function is not supported then return an error. Fixes: 29b74236bd57 ("ASoC: tas2562: Introduce the TAS2562 amplifier") Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200218185252.26290-1-dmurphy@ti.com Signed-off-by: Mark Brown commit bf4498ad3f9a0f7202cf90e52b5ce9bb31700b91 Author: Hugh Dickins Date: Mon Feb 17 20:04:19 2020 -0800 tmpfs: deny and force are not huge mount options 5.6-rc1 commit 2710c957a8ef ("fs_parse: get rid of ->enums") regressed the huge tmpfs mount options to an earlier state: "deny" and "force" are not valid there, and can crash the kernel. Delete those lines. Signed-off-by: Hugh Dickins Signed-off-by: Al Viro commit d99bfed58d9698c0ea1dbf47e4fdf4b87cc7203f Author: Florian Westphal Date: Mon Feb 17 16:54:38 2020 +0100 mptcp: fix bogus socket flag values Dan Carpenter reports static checker warnings due to bogus BIT() usage: net/mptcp/subflow.c:571 subflow_write_space() warn: test_bit() takes a bit number net/mptcp/subflow.c:694 subflow_state_change() warn: test_bit() takes a bit number net/mptcp/protocol.c:261 ssk_check_wmem() warn: test_bit() takes a bit number [..] This is harmless (we use bits 1 & 2 instead of 0 and 1), but would break eventually when adding BIT(5) (or 6, depends on size of 'long'). Just use 0 and 1, the values are only passed to test/set/clear_bit functions. Fixes: 648ef4b88673 ("mptcp: Implement MPTCP receive path") Reported-by: Dan Carpenter Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit af6565adb02d3129d3fae4d9d5da945abaf4417a Author: Michal Kalderon Date: Mon Feb 17 13:37:18 2020 +0200 qede: Fix race between rdma destroy workqueue and link change event If an event is added while the rdma workqueue is being destroyed it could lead to several races, list corruption, null pointer dereference during queue_work or init_queue. This fixes the race between the two flows which can occur during shutdown. A kref object and a completion object are added to the rdma_dev structure, these are initialized before the workqueue is created. The refcnt is used to indicate work is being added to the workqueue and ensures the cleanup flow won't start while we're in the middle of adding the event. Once the work is added, the refcnt is decreased and the cleanup flow is safe to run. Fixes: cee9fbd8e2e ("qede: Add qedr framework") Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 8b978be8d067f58b29cbbf0579e88bb4a2d4350a Merge: bab5417f5f01 da0f3e0201b8 Author: Greg Kroah-Hartman Date: Tue Feb 18 19:39:29 2020 +0100 Merge tag 'thunderbolt-fix-for-v5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fix for v5.6-rc3 Single fix that orders the THUNDERBOLT MAINTAINERS record according to parse-maintainers.pl. * tag 'thunderbolt-fix-for-v5.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: MAINTAINERS: Sort entries in database for THUNDERBOLT commit 6a1ce99dc4bde564e4a072936f9d41f4a439140e Author: Anup Patel Date: Sun Feb 2 16:32:02 2020 +0530 RISC-V: Don't enable all interrupts in trap_init() Historically, we have been enabling all interrupts for each HART in trap_init(). Ideally, we should only enable M-mode interrupts for M-mode kernel and S-mode interrupts for S-mode kernel in trap_init(). Currently, we get suprious S-mode interrupts on Kendryte K210 board running M-mode NO-MMU kernel because we are enabling all interrupts in trap_init(). To fix this, we only enable software and external interrupt in trap_init(). In future, trap_init() will only enable software interrupt and PLIC driver will enable external interrupt using CPU notifiers. Fixes: a4c3733d32a7 ("riscv: abstract out CSR names for supervisor vs machine mode") Signed-off-by: Anup Patel Reviewed-by: Atish Patra Tested-by: Palmer Dabbelt [QMEU virt machine with SMP] [Palmer: Move the Fixes up to a newer commit] Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit 297a31e3e8318f533cff4fe33ffaefb74f72c6e2 Author: Dan Carpenter Date: Mon Feb 17 17:39:45 2020 +0300 io_uring: remove unnecessary NULL checks The "kmsg" pointer can't be NULL and we have already dereferenced it so a check here would be useless. Reviewed-by: Stefano Garzarella Signed-off-by: Dan Carpenter Signed-off-by: Jens Axboe commit dd1f6308b28edf0452dd5dc7877992903ec61e69 Author: Vincenzo Frascino Date: Tue Feb 18 16:49:06 2020 +0000 arm64: lse: Fix LSE atomics with LLVM Commit e0d5896bd356 ("arm64: lse: fix LSE atomics with LLVM's integrated assembler") broke the build when clang is used in connjunction with the binutils assembler ("-no-integrated-as"). This happens because __LSE_PREAMBLE is defined as ".arch armv8-a+lse", which overrides the version of the CPU architecture passed via the "-march" paramter to gas: $ aarch64-none-linux-gnu-as -EL -I ./arch/arm64/include -I ./arch/arm64/include/generated -I ./include -I ./include -I ./arch/arm64/include/uapi -I ./arch/arm64/include/generated/uapi -I ./include/uapi -I ./include/generated/uapi -I ./init -I ./init -march=armv8.3-a -o init/do_mounts.o /tmp/do_mounts-d7992a.s /tmp/do_mounts-d7992a.s: Assembler messages: /tmp/do_mounts-d7992a.s:1959: Error: selected processor does not support `autiasp' /tmp/do_mounts-d7992a.s:2021: Error: selected processor does not support `paciasp' /tmp/do_mounts-d7992a.s:2157: Error: selected processor does not support `autiasp' /tmp/do_mounts-d7992a.s:2175: Error: selected processor does not support `paciasp' /tmp/do_mounts-d7992a.s:2494: Error: selected processor does not support `autiasp' Fix the issue by replacing ".arch armv8-a+lse" with ".arch_extension lse". Sami confirms that the clang integrated assembler does now support the '.arch_extension' directive, so this change will be fine even for LTO builds in future. Fixes: e0d5896bd356cd ("arm64: lse: fix LSE atomics with LLVM's integrated assembler") Cc: Catalin Marinas Cc: Will Deacon Reported-by: Amit Kachhap Tested-by: Sami Tolvanen Signed-off-by: Vincenzo Frascino Signed-off-by: Will Deacon commit c68a9032299e837b56d356de9250c93094f7e0e3 Author: Greentime Hu Date: Thu Jan 9 11:17:40 2020 +0800 riscv: set pmp configuration if kernel is running in M-mode When the kernel is running in S-mode, the expectation is that the bootloader or SBI layer will configure the PMP to allow the kernel to access physical memory. But, when the kernel is running in M-mode and is started with the ELF "loader", there's probably no bootloader or SBI layer involved to configure the PMP. Thus, we need to configure the PMP ourselves to enable the kernel to access all regions. Signed-off-by: Greentime Hu Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit b103de53e09f20d645eb313477f52d1993347605 Author: Arnaldo Carvalho de Melo Date: Tue Feb 18 10:28:52 2020 -0300 perf arch powerpc: Sync powerpc syscall.tbl with the kernel sources Copy over powerpc syscall.tbl to grab changes from the below commits fddb5d430ad9 ("open: introduce openat2(2) syscall") 9a2cef09c801 ("arch: wire up pidfd_getfd syscall") Now 'perf trace' on powerpc will be able to map from those syscall strings to the right syscall numbers, i.e. perf trace -e pidfd* Will include 'pidfd_getfd' as well as: perf trace open* Will cover all 'open' variants. Reported-by: Stephen Rothwell Reviewed-by: Ravi Bangoria Cc: Adrian Hunter Cc: Aleksa Sarai Cc: Al Viro Cc: Christian Brauner Cc: Jiri Olsa Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Nicholas Piggin Cc: Sargun Dhillon Signed-off-by: Arnaldo Carvalho de Melo commit 1ddb32da4a629fa7f87873d0b6836c2e1feb7518 Author: Joerg Roedel Date: Mon Feb 17 17:29:55 2020 +0100 iommu/vt-d: Simplify check in identity_mapping() The function only has one call-site and there it is never called with dummy or deferred devices. Simplify the check in the function to account for that. Fixes: 1ee0186b9a12 ("iommu/vt-d: Refactor find_domain() helper") Cc: stable@vger.kernel.org # v5.5 Reviewed-by: Jerry Snitselaar Acked-by: Lu Baolu Signed-off-by: Joerg Roedel commit 96d170f3b1a607612caf3618c534d5c64fc2d61b Author: Joerg Roedel Date: Mon Feb 17 17:27:44 2020 +0100 iommu/vt-d: Remove deferred_attach_domain() The function is now only a wrapper around find_domain(). Remove the function and call find_domain() directly at the call-sites. Fixes: 1ee0186b9a12 ("iommu/vt-d: Refactor find_domain() helper") Cc: stable@vger.kernel.org # v5.5 Reviewed-by: Jerry Snitselaar Acked-by: Lu Baolu Signed-off-by: Joerg Roedel commit a11bfde9c77df1fd350ea27169ab921f511bf5d0 Author: Joerg Roedel Date: Mon Feb 17 17:20:59 2020 +0100 iommu/vt-d: Do deferred attachment in iommu_need_mapping() The attachment of deferred devices needs to happen before the check whether the device is identity mapped or not. Otherwise the check will return wrong results, cause warnings boot failures in kdump kernels, like WARNING: CPU: 0 PID: 318 at ../drivers/iommu/intel-iommu.c:592 domain_get_iommu+0x61/0x70 [...] Call Trace: __intel_map_single+0x55/0x190 intel_alloc_coherent+0xac/0x110 dmam_alloc_attrs+0x50/0xa0 ahci_port_start+0xfb/0x1f0 [libahci] ata_host_start.part.39+0x104/0x1e0 [libata] With the earlier check the kdump boot succeeds and a crashdump is written. Fixes: 1ee0186b9a12 ("iommu/vt-d: Refactor find_domain() helper") Cc: stable@vger.kernel.org # v5.5 Reviewed-by: Jerry Snitselaar Acked-by: Lu Baolu Signed-off-by: Joerg Roedel commit 034d98cc0cdcde2415c6f598fa9125e3eaa02569 Author: Joerg Roedel Date: Mon Feb 17 17:16:19 2020 +0100 iommu/vt-d: Move deferred device attachment into helper function Move the code that does the deferred device attachment into a separate helper function. Fixes: 1ee0186b9a12 ("iommu/vt-d: Refactor find_domain() helper") Cc: stable@vger.kernel.org # v5.5 Reviewed-by: Jerry Snitselaar Acked-by: Lu Baolu Signed-off-by: Joerg Roedel commit 1d4615978f525b769990a4a4ef22fb1b9a04cdf1 Author: Joerg Roedel Date: Mon Feb 17 17:12:37 2020 +0100 iommu/vt-d: Add attach_deferred() helper Implement a helper function to check whether a device's attach process is deferred. Fixes: 1ee0186b9a12 ("iommu/vt-d: Refactor find_domain() helper") Cc: stable@vger.kernel.org # v5.5 Reviewed-by: Jerry Snitselaar Acked-by: Lu Baolu Signed-off-by: Joerg Roedel commit 113e6b7e15e23dc45d5c66eb66bb91a627812e36 Author: Toke Høiland-Jørgensen Date: Mon Feb 17 18:17:01 2020 +0100 libbpf: Sanitise internal map names so they are not rejected by the kernel The kernel only accepts map names with alphanumeric characters, underscores and periods in their name. However, the auto-generated internal map names used by libbpf takes their prefix from the user-supplied BPF object name, which has no such restriction. This can lead to "Invalid argument" errors when trying to load a BPF program using global variables. Fix this by sanitising the map names, replacing any non-allowed characters with underscores. Fixes: d859900c4c56 ("bpf, libbpf: support global data/bss/rodata sections") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200217171701.215215-1-toke@redhat.com commit f25975f42f2f8f2a01303054d6a70c7ceb1fcf54 Author: Toke Høiland-Jørgensen Date: Tue Feb 18 14:03:34 2020 +0100 bpf, uapi: Remove text about bpf_redirect_map() giving higher performance The performance of bpf_redirect() is now roughly the same as that of bpf_redirect_map(). However, David Ahern pointed out that the header file has not been updated to reflect this, and still says that a significant performance increase is possible when using bpf_redirect_map(). Remove this text from the bpf_redirect_map() description, and reword the description in bpf_redirect() slightly. Also fix the 'Return' section of the bpf_redirect_map() documentation. Fixes: 1d233886dd90 ("xdp: Use bulking for non-map XDP_REDIRECT and consolidate code paths") Reported-by: David Ahern Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20200218130334.29889-1-toke@redhat.com commit 4eb1b01de5b9d8596d6c103efcf1a15cfc1bedf7 Author: Hanno Zulla Date: Tue Feb 18 12:39:31 2020 +0100 HID: hid-bigbenff: fix race condition for scheduled work during removal It's possible that there is scheduled work left while the device is already being removed, which can cause a kernel crash. Adding a flag will avoid this. Signed-off-by: Hanno Zulla Signed-off-by: Benjamin Tissoires commit 976a54d0f4202cb412a3b1fc7f117e1d97db35f3 Author: Hanno Zulla Date: Tue Feb 18 12:38:34 2020 +0100 HID: hid-bigbenff: call hid_hw_stop() in case of error It's required to call hid_hw_stop() once hid_hw_start() was called previously, so error cases need to handle this. Also, hid_hw_close() is not necessary during removal. Signed-off-by: Hanno Zulla Signed-off-by: Benjamin Tissoires commit 789a2c250340666220fa74bc6c8f58497e3863b3 Author: Hanno Zulla Date: Tue Feb 18 12:37:47 2020 +0100 HID: hid-bigbenff: fix general protection fault caused by double kfree The struct *bigben was allocated via devm_kzalloc() and then used as a parameter in input_ff_create_memless(). This caused a double kfree during removal of the device, since both the managed resource API and ml_ff_destroy() in drivers/input/ff-memless.c would call kfree() on it. Signed-off-by: Hanno Zulla Signed-off-by: Benjamin Tissoires commit ad60ba0c2e6da6ff573c5ac57708fbc443bbb473 Author: Adrian Hunter Date: Mon Feb 17 10:23:00 2020 +0200 perf auxtrace: Add auxtrace_record__read_finish() All ->read_finish() implementations are doing the same thing. Add a helper function so that they can share the same implementation. Signed-off-by: Adrian Hunter Reviewed-by: Leo Yan Tested-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Jiri Olsa Cc: Kim Phillips Cc: Wei Li Link: http://lore.kernel.org/lkml/20200217082300.6301-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit d6bc34c5ec18c3544c4b0d85963768dfbcd24184 Author: Adrian Hunter Date: Fri Feb 14 15:26:53 2020 +0200 perf arm-spe: Fix endless record after being terminated In __cmd_record(), when receiving SIGINT(ctrl + c), a 'done' flag will be set and the event list will be disabled by evlist__disable() once. While in auxtrace_record.read_finish(), the related events will be enabled again, if they are continuous, the recording seems to be endless. If the event is disabled, don't enable it again here. Based-on-patch-by: Wei Li Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: Tan Xiaojun Cc: stable@vger.kernel.org # 5.4+ Link: http://lore.kernel.org/lkml/20200214132654.20395-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c9f2833cb472cf9e0a49b7bcdc210a96017a7bfd Author: Wei Li Date: Fri Feb 14 15:26:52 2020 +0200 perf cs-etm: Fix endless record after being terminated In __cmd_record(), when receiving SIGINT(ctrl + c), a 'done' flag will be set and the event list will be disabled by evlist__disable() once. While in auxtrace_record.read_finish(), the related events will be enabled again, if they are continuous, the recording seems to be endless. If the cs_etm event is disabled, we don't enable it again here. Note: This patch is NOT tested since i don't have such a machine with coresight feature, but the code seems buggy same as arm-spe and intel-pt. Tester notes: Thanks for looping, Adrian. Applied this patch and tested with CoreSight on juno board, it works well. Signed-off-by: Wei Li Reviewed-by: Leo Yan Reviewed-by: Mathieu Poirier Tested-by: Leo Yan Cc: Jiri Olsa Cc: Tan Xiaojun Cc: stable@vger.kernel.org # 5.4+ Link: http://lore.kernel.org/lkml/20200214132654.20395-4-adrian.hunter@intel.com [ahunter: removed redundant 'else' after 'return'] Signed-off-by: Adrian Hunter Signed-off-by: Arnaldo Carvalho de Melo commit 783fed2f35e2a6771c8dc6ee29b8c4b9930783ce Author: Wei Li Date: Fri Feb 14 15:26:51 2020 +0200 perf intel-bts: Fix endless record after being terminated In __cmd_record(), when receiving SIGINT(ctrl + c), a 'done' flag will be set and the event list will be disabled by evlist__disable() once. While in auxtrace_record.read_finish(), the related events will be enabled again, if they are continuous, the recording seems to be endless. If the intel_bts event is disabled, we don't enable it again here. Note: This patch is NOT tested since i don't have such a machine with intel_bts feature, but the code seems buggy same as arm-spe and intel-pt. Signed-off-by: Wei Li Cc: Jiri Olsa Cc: Tan Xiaojun Cc: stable@vger.kernel.org # 5.4+ Link: http://lore.kernel.org/lkml/20200214132654.20395-3-adrian.hunter@intel.com [ahunter: removed redundant 'else' after 'return'] Signed-off-by: Adrian Hunter Signed-off-by: Arnaldo Carvalho de Melo commit 2da4dd3d6973ffdfba4fa07f53240fda7ab22929 Author: Wei Li Date: Fri Feb 14 15:26:50 2020 +0200 perf intel-pt: Fix endless record after being terminated In __cmd_record(), when receiving SIGINT(ctrl + c), a 'done' flag will be set and the event list will be disabled by evlist__disable() once. While in auxtrace_record.read_finish(), the related events will be enabled again, if they are continuous, the recording seems to be endless. If the intel_pt event is disabled, we don't enable it again here. Before the patch: huawei@huawei-2288H-V5:~/linux-5.5-rc4/tools/perf$ ./perf record -e \ intel_pt//u -p 46803 ^C^C^C^C^C^C After the patch: huawei@huawei-2288H-V5:~/linux-5.5-rc4/tools/perf$ ./perf record -e \ intel_pt//u -p 48591 ^C[ perf record: Woken up 0 times to write data ] Warning: AUX data lost 504 times out of 4816! [ perf record: Captured and wrote 2024.405 MB perf.data ] Signed-off-by: Wei Li Cc: Jiri Olsa Cc: Tan Xiaojun Cc: stable@vger.kernel.org # 5.4+ Link: http://lore.kernel.org/lkml/20200214132654.20395-2-adrian.hunter@intel.com [ ahunter: removed redundant 'else' after 'return' ] Signed-off-by: Adrian Hunter Signed-off-by: Arnaldo Carvalho de Melo commit 2bbc83537614517730e9f2811195004b712de207 Author: Thomas Richter Date: Mon Feb 17 11:21:11 2020 +0100 perf test: Fix test trace+probe_vfs_getname.sh on s390 This test places a kprobe to function getname_flags() in the kernel which has the following prototype: struct filename *getname_flags(const char __user *filename, int flags, int *empty) The 'filename' argument points to a filename located in user space memory. Looking at commit 88903c464321c ("tracing/probe: Add ustring type for user-space string") the kprobe should indicate that user space memory is accessed. Output before: [root@m35lp76 perf]# ./perf test 66 67 66: Use vfs_getname probe to get syscall args filenames : FAILED! 67: Check open filename arg using perf trace + vfs_getname: FAILED! [root@m35lp76 perf]# Output after: [root@m35lp76 perf]# ./perf test 66 67 66: Use vfs_getname probe to get syscall args filenames : Ok 67: Check open filename arg using perf trace + vfs_getname: Ok [root@m35lp76 perf]# Comments from Masami Hiramatsu: This bug doesn't happen on x86 or other archs on which user address space and kernel address space is the same. On some arches (ppc64 in this case?) user address space is partially or completely the same as kernel address space. (Yes, they switch the world when running into the kernel) In this case, we need to use different data access functions for each space. That is why I introduced the "ustring" type for kprobe events. As far as I can see, Thomas's patch is sane. Thomas, could you show us your result on your test environment? Comments from Thomas Richter: Test results for s/390 included above. Signed-off-by: Thomas Richter Acked-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Heiko Carstens Cc: Sumanth Korikkar Cc: Vasily Gorbik Link: http://lore.kernel.org/lkml/20200217102111.61137-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 3b573bf318d894b4290e194c4d7dbcba8c1f6ead Author: Arnaldo Carvalho de Melo Date: Fri Feb 14 16:21:40 2020 -0300 perf bpf: Remove bpf/ subdir from bpf.h headers used to build bpf events The bpf.h file needed gets installed in /usr/lib/include/perf/bpf/bpf.h, and /usr/lib/include/perf/ is added to the include path passed to clang to build the eBPF bytecode, so just remove "bpf/", its directly in the path passed already. This was working by accident, fix it. I.e. now this is back working: # cat /home/acme/git/perf/tools/perf/examples/bpf/hello.c #include int syscall_enter(openat)(void *args) { puts("Hello, world\n"); return 0; } license(GPL); # perf trace -e /home/acme/git/perf/tools/perf/examples/bpf/hello.c 0.000 pickup/21493 __bpf_stdout__(Hello, world) 56.462 sh/13539 __bpf_stdout__(Hello, world) 56.536 sh/13539 __bpf_stdout__(Hello, world) 56.673 sh/13539 __bpf_stdout__(Hello, world) 56.781 sh/13539 __bpf_stdout__(Hello, world) 56.707 perf/13182 __bpf_stdout__(Hello, world) 56.849 perf/13182 __bpf_stdout__(Hello, world) ^C # Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-d9myswhgo8gfi3vmehdqpxa7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5780b9abd530982c2bb1018e2c52c05ab3c30b45 Author: Tianjia Zhang Date: Mon Feb 10 20:44:40 2020 +0800 ima: add sm3 algorithm to hash algorithm configuration list sm3 has been supported by the ima hash algorithm, but it is not yet in the Kconfig configuration list. After adding, both ima and tpm2 can support sm3 well. Signed-off-by: Tianjia Zhang Signed-off-by: Mimi Zohar commit 6a30e1b1dcad0ba94fae757f797812d7d8dcb72c Author: Tianjia Zhang Date: Mon Feb 10 20:44:39 2020 +0800 crypto: rename sm3-256 to sm3 in hash_algo_name The name sm3-256 is defined in hash_algo_name in hash_info, but the algorithm name implemented in sm3_generic.c is sm3, which will cause the sm3-256 algorithm to be not found in some application scenarios of the hash algorithm, and an ENOENT error will occur. For example, IMA, keys, and other subsystems that reference hash_algo_name all use the hash algorithm of sm3. Fixes: 5ca4c20cfd37 ("keys, trusted: select hash algorithm for TPM2 chips") Signed-off-by: Tianjia Zhang Reviewed-by: Pascal van Leeuwen Signed-off-by: Mimi Zohar commit 3be54d558c75562e42bc83d665df024bd79d399b Author: Javier Martinez Canillas Date: Mon Feb 17 12:39:47 2020 +0100 efi: Only print errors about failing to get certs if EFI vars are found If CONFIG_LOAD_UEFI_KEYS is enabled, the kernel attempts to load the certs from the db, dbx and MokListRT EFI variables into the appropriate keyrings. But it just assumes that the variables will be present and prints an error if the certs can't be loaded, even when is possible that the variables may not exist. For example the MokListRT variable will only be present if shim is used. So only print an error message about failing to get the certs list from an EFI variable if this is found. Otherwise these printed errors just pollute the kernel log ring buffer with confusing messages like the following: [ 5.427251] Couldn't get size: 0x800000000000000e [ 5.427261] MODSIGN: Couldn't get UEFI db list [ 5.428012] Couldn't get size: 0x800000000000000e [ 5.428023] Couldn't get UEFI MokListRT Reported-by: Hans de Goede Signed-off-by: Javier Martinez Canillas Tested-by: Hans de Goede Acked-by: Ard Biesheuvel Signed-off-by: Mimi Zohar commit 385536090b18534967b1073d0f18b5b86d793c30 Merge: 44eeb081b863 96781fd941b3 Author: Takashi Iwai Date: Tue Feb 18 13:33:39 2020 +0100 Merge tag 'asoc-fix-v5.6-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.6 A few fixes sent in since the merge window, none of them with global impact but all important for the users they affect. commit 066bc3576e653b615ee3f5230a89d69c8ebeeb71 Author: Oliver O'Halloran Date: Mon Feb 17 15:13:43 2020 +1100 powerpc/xmon: Fix whitespace handling in getstring() The ls (lookup symbol) and zr (reboot) commands use xmon's getstring() helper to read a string argument from the xmon prompt. This function skips over leading whitespace, but doesn't check if the first "non-whitespace" character is a newline which causes some odd behaviour ( indicates a the enter key was pressed): 0:mon> ls printk printk: c0000000001680c4 0:mon> ls printk Symbol ' printk' not found. 0:mon> With commit 2d9b332d99b ("powerpc/xmon: Allow passing an argument to ppc_md.restart()") we have a similar problem with the zr command. Previously zr took no arguments so "zr would trigger a reboot. With that patch applied a second newline needs to be sent in order for the reboot to occur. Fix this by checking if the leading whitespace ended on a newline: 0:mon> ls Symbol '' not found. Fixes: 2d9b332d99b2 ("powerpc/xmon: Allow passing an argument to ppc_md.restart()") Reported-by: Michael Ellerman Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200217041343.2454-1-oohall@gmail.com commit 477f3488a94e35380c82a7498d46f10fa5f3edd2 Author: Christophe Leroy Date: Fri Feb 14 06:53:00 2020 +0000 powerpc/6xx: Fix power_save_ppc32_restore() with CONFIG_VMAP_STACK power_save_ppc32_restore() is called during exception entry, before re-enabling the MMU. It substracts KERNELBASE from the address of nap_save_msscr0 to access it. With CONFIG_VMAP_STACK enabled, data MMU translation has already been re-enabled, so power_save_ppc32_restore() has to access nap_save_msscr0 by its virtual address. Reported-by: Larry Finger Signed-off-by: Christophe Leroy Fixes: cd08f109e262 ("powerpc/32s: Enable CONFIG_VMAP_STACK") Tested-by: Larry Finger Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7bce32ccbab3ba3e3e0f27da6961bf6313df97ed.1581663140.git.christophe.leroy@c-s.fr commit 5a528eb67908bcf493f3583cb4726fbd8e129605 Author: Christophe Leroy Date: Fri Feb 14 08:39:50 2020 +0000 powerpc/chrp: Fix enter_rtas() with CONFIG_VMAP_STACK With CONFIG_VMAP_STACK, data MMU has to be enabled to read data on the stack. Fixes: cd08f109e262 ("powerpc/32s: Enable CONFIG_VMAP_STACK") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d2330584f8c42d3039896e2b56f5d39676dc919c.1581669558.git.christophe.leroy@c-s.fr commit 232ca1eecafed8c54491017f0612c33d8c742d74 Author: Christophe Leroy Date: Sat Feb 15 10:14:25 2020 +0000 powerpc/32s: Fix DSI and ISI exceptions for CONFIG_VMAP_STACK hash_page() needs to read page tables from kernel memory. When entire kernel memory is mapped by BATs, which is normally the case when CONFIG_STRICT_KERNEL_RWX is not set, it works even if the page hosting the page table is not referenced in the MMU hash table. However, if the page where the page table resides is not covered by a BAT, a DSI fault can be encountered from hash_page(), and it loops forever. This can happen when CONFIG_STRICT_KERNEL_RWX is selected and the alignment of the different regions is too small to allow covering the entire memory with BATs. This also happens when CONFIG_DEBUG_PAGEALLOC is selected or when booting with 'nobats' flag. Also, if the page containing the kernel stack is not present in the MMU hash table, registers cannot be saved and a recursive DSI fault is encountered. To allow hash_page() to properly do its job at all time and load the MMU hash table whenever needed, it must run with data MMU disabled. This means it must be called before re-enabling data MMU. To allow this, registers clobbered by hash_page() and create_hpte() have to be saved in the thread struct together with SRR0, SSR1, DAR and DSISR. It is also necessary to ensure that DSI prolog doesn't overwrite regs saved by prolog of the current running exception. That means: - DSI can only use SPRN_SPRG_SCRATCH0 - Exceptions must free SPRN_SPRG_SCRATCH0 before writing to the stack. This also fixes the Oops reported by Erhard when create_hpte() is called by add_hash_page(). Due to prolog size increase, a few more exceptions had to get split in two parts. Fixes: cd08f109e262 ("powerpc/32s: Enable CONFIG_VMAP_STACK") Reported-by: Erhard F. Signed-off-by: Christophe Leroy Tested-by: Erhard F. Tested-by: Larry Finger Signed-off-by: Michael Ellerman Link: https://bugzilla.kernel.org/show_bug.cgi?id=206501 Link: https://lore.kernel.org/r/64a4aa44686e9fd4b01333401367029771d9b231.1581761633.git.christophe.leroy@c-s.fr commit 2464cc4c345699adea52c7aef75707207cb8a2f6 Author: Gustavo Luiz Duarte Date: Tue Feb 11 00:38:29 2020 -0300 powerpc/tm: Fix clearing MSR[TS] in current when reclaiming on signal delivery After a treclaim, we expect to be in non-transactional state. If we don't clear the current thread's MSR[TS] before we get preempted, then tm_recheckpoint_new_task() will recheckpoint and we get rescheduled in suspended transaction state. When handling a signal caught in transactional state, handle_rt_signal64() calls get_tm_stackpointer() that treclaims the transaction using tm_reclaim_current() but without clearing the thread's MSR[TS]. This can cause the TM Bad Thing exception below if later we pagefault and get preempted trying to access the user's sigframe, using __put_user(). Afterwards, when we are rescheduled back into do_page_fault() (but now in suspended state since the thread's MSR[TS] was not cleared), upon executing 'rfid' after completion of the page fault handling, the exception is raised because a transition from suspended to non-transactional state is invalid. Unexpected TM Bad Thing exception at c00000000000de44 (msr 0x8000000302a03031) tm_scratch=800000010280b033 Oops: Unrecoverable exception, sig: 6 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries CPU: 25 PID: 15547 Comm: a.out Not tainted 5.4.0-rc2 #32 NIP: c00000000000de44 LR: c000000000034728 CTR: 0000000000000000 REGS: c00000003fe7bd70 TRAP: 0700 Not tainted (5.4.0-rc2) MSR: 8000000302a03031 CR: 44000884 XER: 00000000 CFAR: c00000000000dda4 IRQMASK: 0 PACATMSCRATCH: 800000010280b033 GPR00: c000000000034728 c000000f65a17c80 c000000001662800 00007fffacf3fd78 GPR04: 0000000000001000 0000000000001000 0000000000000000 c000000f611f8af0 GPR08: 0000000000000000 0000000078006001 0000000000000000 000c000000000000 GPR12: c000000f611f84b0 c00000003ffcb200 0000000000000000 0000000000000000 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: 0000000000000000 0000000000000000 0000000000000000 c000000f611f8140 GPR24: 0000000000000000 00007fffacf3fd68 c000000f65a17d90 c000000f611f7800 GPR28: c000000f65a17e90 c000000f65a17e90 c000000001685e18 00007fffacf3f000 NIP [c00000000000de44] fast_exception_return+0xf4/0x1b0 LR [c000000000034728] handle_rt_signal64+0x78/0xc50 Call Trace: [c000000f65a17c80] [c000000000034710] handle_rt_signal64+0x60/0xc50 (unreliable) [c000000f65a17d30] [c000000000023640] do_notify_resume+0x330/0x460 [c000000f65a17e20] [c00000000000dcc4] ret_from_except_lite+0x70/0x74 Instruction dump: 7c4ff120 e8410170 7c5a03a6 38400000 f8410060 e8010070 e8410080 e8610088 60000000 60000000 e8810090 e8210078 <4c000024> 48000000 e8610178 88ed0989 ---[ end trace 93094aa44b442f87 ]--- The simplified sequence of events that triggers the above exception is: ... # userspace in NON-TRANSACTIONAL state tbegin # userspace in TRANSACTIONAL state signal delivery # kernelspace in SUSPENDED state handle_rt_signal64() get_tm_stackpointer() treclaim # kernelspace in NON-TRANSACTIONAL state __put_user() page fault happens. We will never get back here because of the TM Bad Thing exception. page fault handling kicks in and we voluntarily preempt ourselves do_page_fault() __schedule() __switch_to(other_task) our task is rescheduled and we recheckpoint because the thread's MSR[TS] was not cleared __switch_to(our_task) switch_to_tm() tm_recheckpoint_new_task() trechkpt # kernelspace in SUSPENDED state The page fault handling resumes, but now we are in suspended transaction state do_page_fault() completes rfid <----- trying to get back where the page fault happened (we were non-transactional back then) TM Bad Thing # illegal transition from suspended to non-transactional This patch fixes that issue by clearing the current thread's MSR[TS] just after treclaim in get_tm_stackpointer() so that we stay in non-transactional state in case we are preempted. In order to make treclaim and clearing the thread's MSR[TS] atomic from a preemption perspective when CONFIG_PREEMPT is set, preempt_disable/enable() is used. It's also necessary to save the previous value of the thread's MSR before get_tm_stackpointer() is called so that it can be exposed to the signal handler later in setup_tm_sigcontexts() to inform the userspace MSR at the moment of the signal delivery. Found with tm-signal-context-force-tm kernel selftest. Fixes: 2b0a576d15e0 ("powerpc: Add new transactional memory state to the signal context") Cc: stable@vger.kernel.org # v3.9 Signed-off-by: Gustavo Luiz Duarte Acked-by: Michael Neuling Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200211033831.11165-1-gustavold@linux.ibm.com commit 44eeb081b8630bb3ad3cd381d1ae1831463e48bb Author: Takashi Iwai Date: Tue Feb 18 10:14:09 2020 +0100 ALSA: hda: Use scnprintf() for printing texts for sysfs/procfs Some code in HD-audio driver calls snprintf() in a loop and still expects that the return value were actually written size, while snprintf() returns the expected would-be length instead. When the given buffer limit were small, this leads to a buffer overflow. Use scnprintf() for addressing those issues. It returns the actually written size unlike snprintf(). Cc: Link: https://lore.kernel.org/r/20200218091409.27162-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 839cbf0531428f3f9535077a461b8631359c1165 Author: Bibby Hsieh Date: Mon Feb 17 17:10:19 2020 +0800 drm/mediatek: Make sure previous message done or be aborted before send Mediatek CMDQ driver removed atomic parameter and implementation related to atomic. DRM driver need to make sure previous message done or be aborted before we send next message. If previous message is still waiting for event, it means the setting hasn't been updated into display hardware register, we can abort the message and send next message to update the newest setting into display hardware. If previous message already started, we have to wait it until transmission has been completed. So we flush mbox client before we send new message to controller driver. Signed-off-by: Bibby Hsieh Signed-off-by: CK Hu commit cc5049ae4d457194796f854eb2e38b9727ad8c2d Author: Takashi Iwai Date: Tue Feb 18 09:09:15 2020 +0100 ALSA: hda/realtek - Apply quirk for yet another MSI laptop MSI GP65 laptop with SSID 1462:1293 requires the same quirk as other MSI models. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204159 Cc: Link: https://lore.kernel.org/r/20200218080915.3433-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8e8ce08198de193e3d21d42e96945216e3d9ac7f Author: Sven Eckelmann Date: Sun Feb 16 13:02:06 2020 +0100 batman-adv: Don't schedule OGM for disabled interface A transmission scheduling for an interface which is currently dropped by batadv_iv_ogm_iface_disable could still be in progress. The B.A.T.M.A.N. V is simply cancelling the workqueue item in an synchronous way but this is not possible with B.A.T.M.A.N. IV because the OGM submissions are intertwined. Instead it has to stop submitting the OGM when it detect that the buffer pointer is set to NULL. Reported-by: syzbot+a98f2016f40b9cd3818a@syzkaller.appspotmail.com Reported-by: syzbot+ac36b6a33c28a491e929@syzkaller.appspotmail.com Fixes: c6c8fea29769 ("net: Add batman-adv meshing protocol") Signed-off-by: Sven Eckelmann Cc: Hillf Danton Signed-off-by: Simon Wunderlich commit 60fa8c13ab1a33b8b958efb1510ec2fd8a064bcc Author: Bibby Hsieh Date: Mon Feb 17 17:10:20 2020 +0800 drm/mediatek: Move gce event property to mutex device node According mtk hardware design, stream_done0 and stream_done1 are generated by mutex, so we move gce event property to mutex device mode. Signed-off-by: Bibby Hsieh Signed-off-by: CK Hu commit 15de9cb5c9c83a23be92b8f7a1178cead1486587 Author: Chris Wilson Date: Tue Feb 11 12:01:31 2020 +0000 drm/i915/gt: Avoid resetting ring->head outside of its timeline mutex We manipulate ring->head while active in i915_request_retire underneath the timeline manipulation. We cannot rely on a stable ring->head outside of the timeline->mutex, in particular while setting up the context for resume and reset. Closes: https://gitlab.freedesktop.org/drm/intel/issues/1126 Fixes: 0881954965e3 ("drm/i915: Introduce intel_context.pin_mutex for pin management") Fixes: e5dadff4b093 ("drm/i915: Protect request retirement with timeline->mutex") References: f3c0efc9fe7a ("drm/i915/execlists: Leave resetting ring to intel_ring") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Andi Shyti Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200211120131.958949-1-chris@chris-wilson.co.uk (cherry picked from commit 42827350f75c56d0fe9f15d8425a1390528958b6) Signed-off-by: Jani Nikula commit b1339ecac661e1cf3e1dc78ac56bff3aeeaeb92c Author: Chris Wilson Date: Fri Feb 7 21:14:52 2020 +0000 drm/i915/execlists: Always force a context reload when rewinding RING_TAIL If we rewind the RING_TAIL on a context, due to a preemption event, we must force the context restore for the RING_TAIL update to be properly handled. Rather than note which preemption events may cause us to rewind the tail, compare the new request's tail with the previously submitted RING_TAIL, as it turns out that timeslicing was causing unexpected rewinds. -0 0d.s2 1280851190us : __execlists_submission_tasklet: 0000:00:02.0 rcs0: expired last=130:4698, prio=3, hint=3 -0 0d.s2 1280851192us : __i915_request_unsubmit: 0000:00:02.0 rcs0: fence 66:119966, current 119964 -0 0d.s2 1280851195us : __i915_request_unsubmit: 0000:00:02.0 rcs0: fence 130:4698, current 4695 -0 0d.s2 1280851198us : __i915_request_unsubmit: 0000:00:02.0 rcs0: fence 130:4696, current 4695 ^---- Note we unwind 2 requests from the same context -0 0d.s2 1280851208us : __i915_request_submit: 0000:00:02.0 rcs0: fence 130:4696, current 4695 -0 0d.s2 1280851213us : __i915_request_submit: 0000:00:02.0 rcs0: fence 134:1508, current 1506 ^---- But to apply the new timeslice, we have to replay the first request before the new client can start -- the unexpected RING_TAIL rewind -0 0d.s2 1280851219us : trace_ports: 0000:00:02.0 rcs0: submit { 130:4696*, 134:1508 } synmark2-5425 2..s. 1280851239us : process_csb: 0000:00:02.0 rcs0: cs-irq head=5, tail=0 synmark2-5425 2..s. 1280851240us : process_csb: 0000:00:02.0 rcs0: csb[0]: status=0x00008002:0x00000000 ^---- Preemption event for the ELSP update; note the lite-restore synmark2-5425 2..s. 1280851243us : trace_ports: 0000:00:02.0 rcs0: preempted { 130:4698, 66:119966 } synmark2-5425 2..s. 1280851246us : trace_ports: 0000:00:02.0 rcs0: promote { 130:4696*, 134:1508 } synmark2-5425 2.... 1280851462us : __i915_request_commit: 0000:00:02.0 rcs0: fence 130:4700, current 4695 synmark2-5425 2.... 1280852111us : __i915_request_commit: 0000:00:02.0 rcs0: fence 130:4702, current 4695 synmark2-5425 2.Ns1 1280852296us : process_csb: 0000:00:02.0 rcs0: cs-irq head=0, tail=2 synmark2-5425 2.Ns1 1280852297us : process_csb: 0000:00:02.0 rcs0: csb[1]: status=0x00000814:0x00000000 synmark2-5425 2.Ns1 1280852299us : trace_ports: 0000:00:02.0 rcs0: completed { 130:4696!, 134:1508 } synmark2-5425 2.Ns1 1280852301us : process_csb: 0000:00:02.0 rcs0: csb[2]: status=0x00000818:0x00000040 synmark2-5425 2.Ns1 1280852302us : trace_ports: 0000:00:02.0 rcs0: completed { 134:1508, 0:0 } synmark2-5425 2.Ns1 1280852313us : process_csb: process_csb:2336 GEM_BUG_ON(!i915_request_completed(*execlists->active) && !reset_in_progress(execlists)) Fixes: 8ee36e048c98 ("drm/i915/execlists: Minimalistic timeslicing") Referenecs: 82c69bf58650 ("drm/i915/gt: Detect if we miss WaIdleLiteRestore") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Cc: # v5.4+ Link: https://patchwork.freedesktop.org/patch/msgid/20200207211452.2860634-1-chris@chris-wilson.co.uk (cherry picked from commit 5ba32c7be81e53ea8a27190b0f6be98e6c6779af) Signed-off-by: Jani Nikula commit aa3146193ae25d0fe4b96d815169a135db2e8f01 Author: Chris Wilson Date: Sun Feb 2 15:39:34 2020 +0000 drm/i915: Wean off drm_pci_alloc/drm_pci_free drm_pci_alloc and drm_pci_free are just very thin wrappers around dma_alloc_coherent, with a note that we should be removing them. Furthermore since commit de09d31dd38a50fdce106c15abd68432eebbd014 Author: Kirill A. Shutemov Date: Fri Jan 15 16:51:42 2016 -0800 page-flags: define PG_reserved behavior on compound pages As far as I can see there's no users of PG_reserved on compound pages. Let's use PF_NO_COMPOUND here. drm_pci_alloc has been declared broken since it mixes GFP_COMP and SetPageReserved. Avoid this conflict by weaning ourselves off using the abstraction and using the dma functions directly. Reported-by: Taketo Kabe Closes: https://gitlab.freedesktop.org/drm/intel/issues/1027 Fixes: de09d31dd38a ("page-flags: define PG_reserved behavior on compound pages") Signed-off-by: Chris Wilson Cc: # v4.5+ Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200202153934.3899472-1-chris@chris-wilson.co.uk (cherry picked from commit c6790dc22312f592c1434577258b31c48c72d52a) Signed-off-by: Jani Nikula commit c12b59adf21329b97609a9e23519055d6877c7b1 Author: Bibby Hsieh Date: Thu Feb 13 09:23:53 2020 +0800 drm/mediatek: Add fb swap in async_update Besides x, y position, width and height, fb also need updating in async update. Fixes: 920fffcc8912 ("drm/mediatek: update cursors by using async atomic update") Signed-off-by: Bibby Hsieh Tested-by: Enric Balletbo i Serra Signed-off-by: CK Hu commit 551c5f5574759802b2549709b92bfdc7ddf36972 Author: Bibby Hsieh Date: Thu Feb 13 09:23:52 2020 +0800 drm/mediatek: Add plane check in async_check function MTK do rotation checking and transferring in layer check function, but we do not check that in atomic_check, so add back in atomic_check function. Fixes: 920fffcc8912 ("drm/mediatek: update cursors by using async atomic update") Signed-off-by: Bibby Hsieh Signed-off-by: CK Hu commit 9b64208f74fbd0e920475ecfe9326f8443fdc3a5 Author: Hangbin Liu Date: Mon Feb 17 11:43:15 2020 +0800 selftests: forwarding: vxlan_bridge_1d: use more proper tos value 0x11 and 0x12 set the ECN bits based on RFC2474, it would be better to avoid that. 0x14 and 0x18 would be better and works as well. Reported-by: Petr Machata Fixes: 4e867c9a50ff ("selftests: forwarding: vxlan_bridge_1d: fix tos value") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 82969e6ef0430a31d58342009e64c7634512eb53 Author: Alexandre Belloni Date: Fri Feb 14 15:32:24 2020 +0100 net: cnic: fix spelling mistake "reserverd" -> "reserved" The reserved member should be named reserved3. Signed-off-by: Alexandre Belloni Signed-off-by: David S. Miller commit 245709ec8be89af46ea7ef0444c9c80913999d99 Author: Xin Long Date: Tue Feb 18 12:07:53 2020 +0800 sctp: move the format error check out of __sctp_sf_do_9_1_abort When T2 timer is to be stopped, the asoc should also be deleted, otherwise, there will be no chance to call sctp_association_free and the asoc could last in memory forever. However, in sctp_sf_shutdown_sent_abort(), after adding the cmd SCTP_CMD_TIMER_STOP for T2 timer, it may return error due to the format error from __sctp_sf_do_9_1_abort() and miss adding SCTP_CMD_ASSOC_FAILED where the asoc will be deleted. This patch is to fix it by moving the format error check out of __sctp_sf_do_9_1_abort(), and do it before adding the cmd SCTP_CMD_TIMER_STOP for T2 timer. Thanks Hangbin for reporting this issue by the fuzz testing. v1->v2: - improve the comment in the code as Marcelo's suggestion. Fixes: 96ca468b86b0 ("sctp: check invalid value of length parameter in error cause") Reported-by: Hangbin Liu Acked-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 8a9093c79863b58cc2f9874d7ae788f0d622a596 Author: Jason Baron Date: Mon Feb 17 15:38:09 2020 -0500 net: sched: correct flower port blocking tc flower rules that are based on src or dst port blocking are sometimes ineffective due to uninitialized stack data. __skb_flow_dissect() extracts ports from the skb for tc flower to match against. However, the port dissection is not done when when the FLOW_DIS_IS_FRAGMENT bit is set in key_control->flags. All callers of __skb_flow_dissect(), zero-out the key_control field except for fl_classify() as used by the flower classifier. Thus, the FLOW_DIS_IS_FRAGMENT may be set on entry to __skb_flow_dissect(), since key_control is allocated on the stack and may not be initialized. Since key_basic and key_control are present for all flow keys, let's make sure they are initialized. Fixes: 62230715fd24 ("flow_dissector: do not dissect l4 ports for fragments") Co-developed-by: Eric Dumazet Signed-off-by: Eric Dumazet Acked-by: Cong Wang Signed-off-by: Jason Baron Signed-off-by: David S. Miller commit b1da3acc781ce445445d959b41064d209a27bc2d Merge: eaea2947063a 2c2a7552dd64 Author: Linus Torvalds Date: Mon Feb 17 21:08:37 2020 -0800 Merge tag 'ecryptfs-5.6-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs Pull eCryptfs fixes from Tyler Hicks: - downgrade the eCryptfs maintenance status to "Odd Fixes" - change my email address - fix a couple memory leaks in error paths - stability improvement to avoid a needless BUG_ON() * tag 'ecryptfs-5.6-rc3-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs: ecryptfs: replace BUG_ON with error handling code eCryptfs: Replace deactivated email address MAINTAINERS: eCryptfs: Update maintainer address and downgrade status ecryptfs: fix a memory leak bug in ecryptfs_init_messaging() ecryptfs: fix a memory leak bug in parse_tag_1_packet() commit 0a923a76d615b4f54456ce6c52865bb0d5b5516d Author: Randy Dunlap Date: Sun Feb 16 20:44:09 2020 -0800 Documentation/hwmon: fix xdpe12284 Sphinx warnings Fix Sphinx format warnings by adding a blank line. Documentation/hwmon/xdpe12284.rst:28: WARNING: Unexpected indentation. Documentation/hwmon/xdpe12284.rst:29: WARNING: Block quote ends without a blank line; unexpected unindent. Signed-off-by: Randy Dunlap Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Cc: Vadim Pasternak Link: https://lore.kernel.org/r/0094c570-dd4c-dc0e-386d-ea1c39b6a582@infradead.org Signed-off-by: Guenter Roeck commit a81541041ceb55bcec9a8bb8ad3482263f0a205a Author: Horatiu Vultur Date: Mon Feb 17 09:31:33 2020 +0100 net: mscc: fix in frame extraction Each extracted frame on Ocelot has an IFH. The frame and IFH are extracted by reading chuncks of 4 bytes from a register. In case the IFH and frames were read corretly it would try to read the next frame. In case there are no more frames in the queue, it checks if there were any previous errors and in that case clear the queue. But this check will always succeed also when there are no errors. Because when extracting the IFH the error is checked against 4(number of bytes read) and then the error is set only if the extraction of the frame failed. So in a happy case where there are no errors the err variable is still 4. So it could be a case where after the check that there are no more frames in the queue, a frame will arrive in the queue but because the error is not reseted, it would try to flush the queue. So the frame will be lost. The fix consist in resetting the error after reading the IFH. Signed-off-by: Horatiu Vultur Acked-by: Alexandre Belloni Signed-off-by: David S. Miller commit 96781fd941b39e1f78098009344ebcd7af861c67 Author: Samuel Holland Date: Mon Feb 17 00:42:22 2020 -0600 ASoC: sun8i-codec: Fix setting DAI data format Use the correct mask for this two-bit field. This fixes setting the DAI data format to RIGHT_J or DSP_A. Fixes: 36c684936fae ("ASoC: Add sun8i digital audio codec") Signed-off-by: Samuel Holland Acked-by: Chen-Yu Tsai Cc: stable@kernel.org Link: https://lore.kernel.org/r/20200217064250.15516-7-samuel@sholland.org Signed-off-by: Mark Brown commit eaea2947063ac694cddff1787d43e7807490dbc7 Merge: 11a48a5a18c6 52e29e331070 Author: Linus Torvalds Date: Mon Feb 17 13:26:30 2020 -0800 Merge tag 'for-5.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "This is the fix for sleeping in a locked section bug reported by Dave Jones, caused by a patch dependence in development and pulled branches. I picked the existing patch over the fixup that Filipe sent, as it's a bit more generic fix. I've verified it with a specific test case, some rsync stress and one round of fstests" * tag 'for-5.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: don't set path->leave_spinning for truncate commit 19b5f3b419a61808ff2713f1f30b8a88fe14ac9b Author: Chris Wilson Date: Thu Feb 6 20:49:13 2020 +0000 drm/i915/gt: Protect defer_request() from new waiters Mika spotted <4>[17436.705441] general protection fault: 0000 [#1] PREEMPT SMP PTI <4>[17436.705447] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 5.5.0+ #1 <4>[17436.705449] Hardware name: System manufacturer System Product Name/Z170M-PLUS, BIOS 3805 05/16/2018 <4>[17436.705512] RIP: 0010:__execlists_submission_tasklet+0xc4d/0x16e0 [i915] <4>[17436.705516] Code: c5 4c 8d 60 e0 75 17 e9 8c 07 00 00 49 8b 44 24 20 49 39 c5 4c 8d 60 e0 0f 84 7a 07 00 00 49 8b 5c 24 08 49 8b 87 80 00 00 00 <48> 39 83 d8 fe ff ff 75 d9 48 8b 83 88 fe ff ff a8 01 0f 84 b6 05 <4>[17436.705518] RSP: 0018:ffffc9000012ce80 EFLAGS: 00010083 <4>[17436.705521] RAX: ffff88822ae42000 RBX: 5a5a5a5a5a5a5a5a RCX: dead000000000122 <4>[17436.705523] RDX: ffff88822ae42588 RSI: ffff8881e32a7908 RDI: ffff8881c429fd48 <4>[17436.705525] RBP: ffffc9000012cf00 R08: ffff88822ae42588 R09: 00000000fffffffe <4>[17436.705527] R10: ffff8881c429fb80 R11: 00000000a677cf08 R12: ffff8881c42a0aa8 <4>[17436.705529] R13: ffff8881c429fd38 R14: ffff88822ae42588 R15: ffff8881c429fb80 <4>[17436.705532] FS: 0000000000000000(0000) GS:ffff88822ed00000(0000) knlGS:0000000000000000 <4>[17436.705534] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4>[17436.705536] CR2: 00007f858c76d000 CR3: 0000000005610003 CR4: 00000000003606e0 <4>[17436.705538] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 <4>[17436.705540] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 <4>[17436.705542] Call Trace: <4>[17436.705545] <4>[17436.705603] execlists_submission_tasklet+0xc0/0x130 [i915] which is us consuming a partially initialised new waiter in defer_requests(). We can prevent this by initialising the i915_dependency prior to making it visible, and since we are using a concurrent list_add/iterator mark them up to the compiler. Fixes: 8ee36e048c98 ("drm/i915/execlists: Minimalistic timeslicing") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200206204915.2636606-2-chris@chris-wilson.co.uk (cherry picked from commit f14f27b1663269a81ed62d3961fe70250a1a0623) Signed-off-by: Jani Nikula commit e543e370ec3160c06c2cd897477150dfb23f1afd Author: Chris Wilson Date: Thu Feb 6 20:49:12 2020 +0000 drm/i915/gt: Prevent queuing retire workers on the virtual engine Virtual engines are fleeting. They carry a reference count and may be freed when their last request is retired. This makes them unsuitable for the task of housing engine->retire.work so assert that it is not used. Tvrtko tracked down an instance where we did indeed violate this rule. In virtual_submit_request, we flush a completed request directly with __i915_request_submit and this causes us to queue that request on the veng's breadcrumb list and signal it. Leading us down a path where we should not attach the retire. Reported-by: Tvrtko Ursulin Fixes: dc93c9b69315 ("drm/i915/gt: Schedule request retirement when signaler idles") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200206204915.2636606-1-chris@chris-wilson.co.uk (cherry picked from commit f91d8156ab8afb32447cd2bf3189219bab943f18) Signed-off-by: Jani Nikula commit 2e0a576511f656933adfe56ef03b9cf3e64b21b7 Author: Jani Nikula Date: Thu Feb 13 16:04:11 2020 +0200 drm/i915/dsc: force full modeset whenever DSC is enabled at probe We lack full state readout of DSC config, which may lead to DSC enable using a config that's all zeros, failing spectacularly. Force full modeset and thus compute config at probe to get a sane state, until we implement DSC state readout. Any fastset that did appear to work with DSC at probe, worked by coincidence. [1] is an example of a change that triggered the issue on TGL DSI DSC. [1] http://patchwork.freedesktop.org/patch/msgid/20200212150102.7600-1-ville.syrjala@linux.intel.com Cc: Manasi Navare Cc: Vandita Kulkarni Cc: Ville Syrjala Cc: stable@vger.kernel.org Fixes: fbacb15ea814 ("drm/i915/dsc: add basic hardware state readout support") Acked-by: Matt Roper Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200213140412.32697-3-stanislav.lisovskiy@intel.com (cherry picked from commit a4277aa398d76db109d6b8420934f68daf69a6c3) Signed-off-by: Jani Nikula commit 58e9121c32a245fab47f29ab4ad29dd62470a7e8 Author: Matt Roper Date: Thu Feb 6 16:14:16 2020 -0800 drm/i915/ehl: Update port clock voltage level requirements Voltage level depends not only on the cdclk, but also on the DDI clock. Last time the bspec voltage level table for EHL was updated, we only updated the cdclk requirements, but forgot to account for the new port clock criteria. Bspec: 21809 Fixes: d147483884ed ("drm/i915/ehl: Update voltage level checks") Cc: José Roberto de Souza Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200207001417.1229251-1-matthew.d.roper@intel.com Reviewed-by: José Roberto de Souza (cherry picked from commit 9d5fd37ed7e26efdbe90f492d7eb8b53dcdb61d6) Signed-off-by: Jani Nikula commit 7ddc7005a0aa2f43a826b71f5d6bd7d4b90f8f2a Author: Jani Nikula Date: Wed Feb 12 18:04:34 2020 +0200 drm/i915: Update drm/i915 bug filing URL We've moved from bugzilla to gitlab. Cc: stable@vger.kernel.org Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200212160434.6437-2-jani.nikula@intel.com (cherry picked from commit ddae4d7af0bbe3b2051f1603459a8b24e9a19324) Signed-off-by: Jani Nikula commit 96228b7df33f8eb9006f8ae96949400aed9bd303 Author: Jani Nikula Date: Wed Feb 12 18:04:33 2020 +0200 MAINTAINERS: Update drm/i915 bug filing URL We've moved from bugzilla to gitlab. Cc: stable@vger.kernel.org Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200212160434.6437-1-jani.nikula@intel.com (cherry picked from commit 3a6a4f0810c8ade6f1ff63c34aa9834176b9d88b) Signed-off-by: Jani Nikula commit dc10e4181c05a2315ddc375e963b7c763b5ee0df Author: Roberto Sassu Date: Mon Feb 10 11:00:41 2020 +0100 tpm: Initialize crypto_id of allocated_banks to HASH_ALGO__LAST chip->allocated_banks, an array of tpm_bank_info structures, contains the list of TPM algorithm IDs of allocated PCR banks. It also contains the corresponding ID of the crypto subsystem, so that users of the TPM driver can calculate a digest for a PCR extend operation. However, if there is no mapping between TPM algorithm ID and crypto ID, the crypto_id field of tpm_bank_info remains set to zero (the array is allocated and initialized with kcalloc() in tpm2_get_pcr_allocation()). Zero should not be used as value for unknown mappings, as it is a valid crypto ID (HASH_ALGO_MD4). Thus, initialize crypto_id to HASH_ALGO__LAST. Cc: stable@vger.kernel.org # 5.1.x Fixes: 879b589210a9 ("tpm: retrieve digest size of unknown algorithms with PCR read") Signed-off-by: Roberto Sassu Reviewed-by: Petr Vorel Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit faaca0a0d48e7b122f6e7e2521f4f6fc487d0451 Author: Jarkko Sakkinen Date: Tue Feb 4 14:16:27 2020 +0200 tpm: Revert tpm_tis_spi_mod.ko to tpm_tis_spi.ko. Revert tpm_tis_spi_mod.ko back to tpm_tis_spi.ko as the rename could break user space scripts. This can be achieved by renaming tpm_tis_spi.c as tpm_tis_spi_main.c. Then tpm_tis_spi-y can be used inside the makefile. Cc: Andrey Pronin Cc: Stephen Boyd Cc: stable@vger.kernel.org # 5.5.x Fixes: 797c0113c9a4 ("tpm: tpm_tis_spi: Support cr50 devices") Reported-by: Alexander Steffen Tested-by: Alexander Steffen Reviewed-by: Stephen Boyd Signed-off-by: Jarkko Sakkinen commit c01e8da2cdb99303547d25b3dbffa3afec56738a Author: Chris Wilson Date: Mon Feb 3 09:41:48 2020 +0000 drm/i915: Initialise basic fence before acquiring seqno Inside the intel_timeline_get_seqno(), we currently track the retirement of the old cachelines by listening to the new request. This requires that the new request is ready to be used and so requires a minimum bit of initialisation prior to getting the new seqno. Fixes: b1e3177bd1d8 ("drm/i915: Coordinate i915_active with its own mutex") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Matthew Auld Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200203094152.4150550-2-chris@chris-wilson.co.uk (cherry picked from commit 855e39e65cfc33a73724f1cc644ffc5754864a20) Signed-off-by: Jani Nikula commit dea8d5ce46d7e7f7270b9804df7d1174f88bfd99 Author: Chris Wilson Date: Thu Jan 30 16:45:53 2020 +0000 drm/i915/gem: Require per-engine reset support for non-persistent contexts To enable non-persistent contexts, we require a means of cancelling any inflight work from that context. This is first done "gracefully" by using preemption to kick the active context off the engine, and then forcefully by resetting the engine if it is active. If we are unable to reset the engine to remove hostile userspace, we should not allow userspace to opt into using non-persistent contexts. If the per-engine reset fails, we still do a full GPU reset, but that is rare and usually indicative of much deeper issues. The damage is already done. However, the goal of the interface to allow long running compute jobs without causing collateral damage elsewhere, and if we are unable to support that we should make that known by not providing the interface (and falsely pretending we can). Fixes: a0e047156cde ("drm/i915/gem: Make context persistence optional") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Jon Bloomfield Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20200130164553.1937718-1-chris@chris-wilson.co.uk (cherry picked from commit d1b9b5f127bc3797fc274cfa4f363e039f045c3a) Signed-off-by: Jani Nikula commit 94e90f727f7424d827256023cace829cad6896f4 Author: Masahiro Yamada Date: Sun Feb 16 23:48:29 2020 +0900 s390: make 'install' not depend on vmlinux For the same reason as commit 19514fc665ff ("arm, kbuild: make "make install" not depend on vmlinux"), the install targets should never trigger the rebuild of the kernel. The variable, CONFIGURE, is not set by anyone. Remove it as well. Link: https://lkml.kernel.org/r/20200216144829.27023-1-masahiroy@kernel.org Signed-off-by: Masahiro Yamada Signed-off-by: Vasily Gorbik commit 788d671517b5c81efbed9310ccbadb8cca86a08e Author: Nathan Chancellor Date: Sat Feb 8 07:10:52 2020 -0700 s390/kaslr: Fix casts in get_random Clang warns: ../arch/s390/boot/kaslr.c:78:25: warning: passing 'char *' to parameter of type 'const u8 *' (aka 'const unsigned char *') converts between pointers to integer types with different sign [-Wpointer-sign] (char *) entropy, (char *) entropy, ^~~~~~~~~~~~~~~~ ../arch/s390/include/asm/cpacf.h:280:28: note: passing argument to parameter 'src' here u8 *dest, const u8 *src, long src_len) ^ 2 warnings generated. Fix the cast to match what else is done in this function. Fixes: b2d24b97b2a9 ("s390/kernel: add support for kernel address space layout randomization (KASLR)") Link: https://github.com/ClangBuiltLinux/linux/issues/862 Link: https://lkml.kernel.org/r/20200208141052.48476-1-natechancellor@gmail.com Signed-off-by: Nathan Chancellor Signed-off-by: Vasily Gorbik commit 380324734956c64cd060e1db4304f3117ac15809 Author: Nathan Chancellor Date: Thu Feb 13 23:42:07 2020 -0700 s390/mm: Explicitly compare PAGE_DEFAULT_KEY against zero in storage_key_init_range Clang warns: In file included from ../arch/s390/purgatory/purgatory.c:10: In file included from ../include/linux/kexec.h:18: In file included from ../include/linux/crash_core.h:6: In file included from ../include/linux/elfcore.h:5: In file included from ../include/linux/user.h:1: In file included from ../arch/s390/include/asm/user.h:11: ../arch/s390/include/asm/page.h:45:6: warning: converting the result of '<<' to a boolean always evaluates to false [-Wtautological-constant-compare] if (PAGE_DEFAULT_KEY) ^ ../arch/s390/include/asm/page.h:23:44: note: expanded from macro 'PAGE_DEFAULT_KEY' #define PAGE_DEFAULT_KEY (PAGE_DEFAULT_ACC << 4) ^ 1 warning generated. Explicitly compare this against zero to silence the warning as it is intended to be used in a boolean context. Fixes: de3fa841e429 ("s390/mm: fix compile for PAGE_DEFAULT_KEY != 0") Link: https://github.com/ClangBuiltLinux/linux/issues/860 Link: https://lkml.kernel.org/r/20200214064207.10381-1-natechancellor@gmail.com Acked-by: Christian Borntraeger Signed-off-by: Nathan Chancellor Signed-off-by: Vasily Gorbik commit 05ccaca003e4f26aceb7f075c073a49159af6e9e Author: Geert Uytterhoeven Date: Wed Feb 12 09:46:22 2020 +0100 s390/pkey/zcrypt: spelling s/crytp/crypt/ Fix typos in a comments. Link: https://lkml.kernel.org/r/20200212084622.9219-1-geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven Signed-off-by: Vasily Gorbik commit 0d730b57b95f7e703bb5789de91a7ece6d3a68ac Author: chenqiwu Date: Fri Feb 14 21:51:33 2020 +0800 s390/cio: use kobj_to_dev() API Use kobj_to_dev() API instead of container_of(). Reviewed-by: Cornelia Huck Signed-off-by: chenqiwu Signed-off-by: chenqiwu Message-Id: <1581688293-17283-1-git-send-email-qiwuchen55@gmail.com> Signed-off-by: Vasily Gorbik commit b16c3724dd717a354d0f0257fd647ef5518982aa Author: Christian Borntraeger Date: Thu Feb 13 11:13:13 2020 -0500 s390/defconfig: enable CONFIG_PROTECTED_VIRTUALIZATION_GUEST The guest support for protected virtualization is default on most distributions. Also refresh defconfig and debug_defconfig. Signed-off-by: Christian Borntraeger Signed-off-by: Vasily Gorbik commit 8b101a5e14f2161869636ff9cb4907b7749dc0c2 Author: Vasily Averin Date: Fri Jan 24 08:48:55 2020 +0300 s390/cio: cio_ignore_proc_seq_next should increase position index if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. Link: https://bugzilla.kernel.org/show_bug.cgi?id=206283 Link: https://lore.kernel.org/r/d44c53a7-9bc1-15c7-6d4a-0c10cb9dffce@virtuozzo.com Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger Signed-off-by: Vasily Averin Signed-off-by: Vasily Gorbik commit e20d3a055a457a10a4c748ce5b7c2ed3173a1324 Author: Johannes Krude Date: Wed Feb 12 20:32:27 2020 +0100 bpf, offload: Replace bitwise AND by logical AND in bpf_prog_offload_info_fill This if guards whether user-space wants a copy of the offload-jited bytecode and whether this bytecode exists. By erroneously doing a bitwise AND instead of a logical AND on user- and kernel-space buffer-size can lead to no data being copied to user-space especially when user-space size is a power of two and bigger then the kernel-space buffer. Fixes: fcfb126defda ("bpf: add new jited info fields in bpf_dev_offload and bpf_prog_info") Signed-off-by: Johannes Krude Signed-off-by: Daniel Borkmann Acked-by: Jakub Kicinski Link: https://lore.kernel.org/bpf/20200212193227.GA3769@phlox.h.transitiv.net commit 52e29e331070cd7d52a64cbf1b0958212a340e28 Author: Josef Bacik Date: Fri Jan 17 09:02:20 2020 -0500 btrfs: don't set path->leave_spinning for truncate The only time we actually leave the path spinning is if we're truncating a small amount and don't actually free an extent, which is not a common occurrence. We have to set the path blocking in order to add the delayed ref anyway, so the first extent we find we set the path to blocking and stay blocking for the duration of the operation. With the upcoming file extent map stuff there will be another case that we have to have the path blocking, so just swap to blocking always. Note: this patch also fixes a warning after 28553fa992cb ("Btrfs: fix race between shrinking truncate and fiemap") got merged that inserts extent locks around truncation so the path must not leave spinning locks after btrfs_search_slot. [70.794783] BUG: sleeping function called from invalid context at mm/slab.h:565 [70.794834] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1141, name: rsync [70.794863] 5 locks held by rsync/1141: [70.794876] #0: ffff888417b9c408 (sb_writers#17){.+.+}, at: mnt_want_write+0x20/0x50 [70.795030] #1: ffff888428de28e8 (&type->i_mutex_dir_key#13/1){+.+.}, at: lock_rename+0xf1/0x100 [70.795051] #2: ffff888417b9c608 (sb_internal#2){.+.+}, at: start_transaction+0x394/0x560 [70.795124] #3: ffff888403081768 (btrfs-fs-01){++++}, at: btrfs_try_tree_write_lock+0x2f/0x160 [70.795203] #4: ffff888403086568 (btrfs-fs-00){++++}, at: btrfs_try_tree_write_lock+0x2f/0x160 [70.795222] CPU: 5 PID: 1141 Comm: rsync Not tainted 5.6.0-rc2-backup+ #2 [70.795362] Call Trace: [70.795374] dump_stack+0x71/0xa0 [70.795445] ___might_sleep.part.96.cold.106+0xa6/0xb6 [70.795459] kmem_cache_alloc+0x1d3/0x290 [70.795471] alloc_extent_state+0x22/0x1c0 [70.795544] __clear_extent_bit+0x3ba/0x580 [70.795557] ? _raw_spin_unlock_irq+0x24/0x30 [70.795569] btrfs_truncate_inode_items+0x339/0xe50 [70.795647] btrfs_evict_inode+0x269/0x540 [70.795659] ? dput.part.38+0x29/0x460 [70.795671] evict+0xcd/0x190 [70.795682] __dentry_kill+0xd6/0x180 [70.795754] dput.part.38+0x2ad/0x460 [70.795765] do_renameat2+0x3cb/0x540 [70.795777] __x64_sys_rename+0x1c/0x20 Reported-by: Dave Jones Fixes: 28553fa992cb ("Btrfs: fix race between shrinking truncate and fiemap") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add note ] Signed-off-by: David Sterba commit a655e2b107d463ce2745188ce050d07daed09a71 Author: Takashi Iwai Date: Mon Feb 17 16:19:47 2020 +0100 ALSA: hda/realtek - Apply quirk for MSI GP63, too The same quirk that was applied to MSI GL73 is needed for MSI GP63, too. Adding the entry with the SSID 1462:1228. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206503 Cc: Link: https://lore.kernel.org/r/20200217151947.17528-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit b3f15ec3d809ccf2e171ca4e272a220d3c1a3e05 Author: Mark Rutland Date: Mon Feb 10 11:47:57 2020 +0000 kvm: arm/arm64: Fold VHE entry/exit work into kvm_vcpu_run_vhe() With VHE, running a vCPU always requires the sequence: 1. kvm_arm_vhe_guest_enter(); 2. kvm_vcpu_run_vhe(); 3. kvm_arm_vhe_guest_exit() ... and as we invoke this from the shared arm/arm64 KVM code, 32-bit arm has to provide stubs for all three functions. To simplify the common code, and make it easier to make further modifications to the arm64-specific portions in the near future, let's fold kvm_arm_vhe_guest_enter() and kvm_arm_vhe_guest_exit() into kvm_vcpu_run_vhe(). The 32-bit stubs for kvm_arm_vhe_guest_enter() and kvm_arm_vhe_guest_exit() are removed, as they are no longer used. The 32-bit stub for kvm_vcpu_run_vhe() is left as-is. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200210114757.2889-1-mark.rutland@arm.com commit 3bc7b6c15fffdf3f818df31198c8c040ad8f7ea9 Author: Ravulapati Vishnu vardhan rao Date: Mon Feb 17 16:09:19 2020 +0530 ASoC: amd: ACP needs to be powered off in BIOS. Removed this logic because It is BIOS which needs to power off the ACP power domian through ACP_PGFSM_CTRL register when you De-initialize ACP Engine. Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/1581935964-15059-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit 4aadf4b49ec7d80c5db842ca28479d07108c9484 Author: Tzung-Bi Shih Date: Mon Feb 17 11:16:52 2020 +0800 ASoC: hdmi-codec: set plugged_cb to NULL when component removing Sets plugged_cb to NULL when component removing to notify its consumers : no further plugged status report is required. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200217105513.1.Icc323daaf71ad02f191fd8d91136b01b61eca5e3@changeid Signed-off-by: Mark Brown commit 44144c809e39d64ff9931c7e8956c42b2baa89e6 Author: Guenter Roeck Date: Sat Feb 8 05:08:03 2020 -0800 watchdog: da9062: Add dependency on I2C Since commit 057b52b4b3d58 ("watchdog: da9062: make restart handler atomic safe"), the driver calls i2c functions directly. It now therefore depends on I2C. This is a hard dependency which overrides COMPILE_TEST. Reported-by: kbuild test robot Reported-by: Randy Dunlap Fixes: 057b52b4b3d58 ("watchdog: da9062: make restart handler atomic safe") Cc: Marco Felsch Cc: Adam Thomson Cc: Stefan Lengfeld Reviewed-by: Marco Felsch Acked-by: Randy Dunlap Acked-by: Geert Uytterhoeven Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 8541673d2a5f2faccff345e35991e2f9887779ea Author: Marco Felsch Date: Fri Feb 7 08:15:18 2020 +0100 watchdog: da9062: fix power management ops This fixes commit f6c98b08381c ("watchdog: da9062: add power management ops"). During discussion [1] we agreed that this should be configurable because it is a device quirk if we can't use the hw watchdog auto suspend function. [1] https://lore.kernel.org/linux-watchdog/20191128171931.22563-1-m.felsch@pengutronix.de/ Signed-off-by: Marco Felsch Fixes: f6c98b08381c ("watchdog: da9062: add power management ops") Reviewed-by: Guenter Roeck Reviewed-by: Adam Thomson Link: https://lore.kernel.org/r/20200207071518.5559-1-m.felsch@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e9a0e65eda3f78d0b04ec6136c591c000cbc3b76 Author: Marco Felsch Date: Mon Jan 20 10:17:29 2020 +0100 watchdog: da9062: do not ping the hw during stop() The da9062 hw has a minimum ping cool down phase of at least 200ms. The driver takes that into account by setting the min_hw_heartbeat_ms to 300ms and the core guarantees that the hw limit is observed for the ping() calls. But the core can't guarantee the required minimum ping cool down phase if a stop() command is send immediately after the ping() command. So it is not allowed to ping the watchdog within the stop() command as the driver does. Remove the ping can be done without doubts because the watchdog gets disabled anyway and a (re)start resets the watchdog counter too. Signed-off-by: Marco Felsch Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200120091729.16256-1-m.felsch@pengutronix.de [groeck: Updated description] Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 463bfeeead97416ad2b141421f51888054dc0e18 Author: Miaohe Lin Date: Fri Feb 14 10:44:05 2020 +0800 KVM: nVMX: Fix some obsolete comments and grammar error Fix wrong variable names and grammar error in comment. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit d970a325561da5e611596cbb06475db3755ce823 Author: Paolo Bonzini Date: Thu Feb 13 18:22:55 2020 +0100 KVM: x86: fix missing prototypes Reported with "make W=1" due to -Wmissing-prototypes. Reported-by: Qian Cai Reviewed-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 5eee7c625d414fb62985439ed58ab755d8988c76 Author: Randy Dunlap Date: Mon Feb 3 08:10:29 2020 -0800 watchdog: fix mtk_wdt.c RESET_CONTROLLER build error Fix build error when CONFIG_RESET_CONTROLLER is not set by selecting RESET_CONTROLLER. ld: drivers/watchdog/mtk_wdt.o: in function `mtk_wdt_probe': mtk_wdt.c:(.text+0x3ec): undefined reference to `devm_reset_controller_register' Signed-off-by: Randy Dunlap Fixes: c254e103082b74e ("watchdog: mtk_wdt: mt8183: Add reset controller") Cc: Wim Van Sebroeck Cc: Guenter Roeck Cc: Matthias Brugger Cc: linux-watchdog@vger.kernel.org Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/77c1e557-4941-3806-2933-6c3583576390@infradead.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 74ba569a15a08b988bc059ad515980f51e85be79 Merge: 3da627073b56 cf01514c5c6e Author: Greg Kroah-Hartman Date: Mon Feb 17 11:58:16 2020 +0100 Merge tag 'misc-habanalabs-fixes-2020-02-11' of git://people.freedesktop.org/~gabbayo/linux into char-misc-linus Oded writes: This tag contains the following fixes: - Two fixes to the reset process of the ASIC. Without these fixes, the reset process might take a long time and produce a kernel panic. Alternatively, the ASIC could get stuck. - Fix to reference counting of a command buffer object. It was kref_put one more time than it should have been. * tag 'misc-habanalabs-fixes-2020-02-11' of git://people.freedesktop.org/~gabbayo/linux: habanalabs: patched cb equals user cb in device memset habanalabs: do not halt CoreSight during hard reset habanalabs: halt the engines before hard-reset commit 6a757c07e51f80ac34325fcd558490d2d1439e1b Author: Florian Westphal Date: Mon Feb 3 17:37:07 2020 +0100 netfilter: conntrack: allow insertion of clashing entries This patch further relaxes the need to drop an skb due to a clash with an existing conntrack entry. Current clash resolution handles the case where the clash occurs between two identical entries (distinct nf_conn objects with same tuples), i.e.: Original Reply existing: 10.2.3.4:42 -> 10.8.8.8:53 10.2.3.4:42 <- 10.0.0.6:5353 clashing: 10.2.3.4:42 -> 10.8.8.8:53 10.2.3.4:42 <- 10.0.0.6:5353 ... existing handling will discard the unconfirmed clashing entry and makes skb->_nfct point to the existing one. The skb can then be processed normally just as if the clash would not have existed in the first place. For other clashes, the skb needs to be dropped. This frequently happens with DNS resolvers that send A and AAAA queries back-to-back when NAT rules are present that cause packets to get different DNAT transformations applied, for example: -m statistics --mode random ... -j DNAT --dnat-to 10.0.0.6:5353 -m statistics --mode random ... -j DNAT --dnat-to 10.0.0.7:5353 In this case the A or AAAA query is dropped which incurs a costly delay during name resolution. This patch also allows this collision type: Original Reply existing: 10.2.3.4:42 -> 10.8.8.8:53 10.2.3.4:42 <- 10.0.0.6:5353 clashing: 10.2.3.4:42 -> 10.8.8.8:53 10.2.3.4:42 <- 10.0.0.7:5353 In this case, clash is in original direction -- the reply direction is still unique. The change makes it so that when the 2nd colliding packet is received, the clashing conntrack is tagged with new IPS_NAT_CLASH_BIT, gets a fixed 1 second timeout and is inserted in the reply direction only. The entry is hidden from 'conntrack -L', it will time out quickly and it can be early dropped because it will never progress to the ASSURED state. To avoid special-casing the delete code path to special case the ORIGINAL hlist_nulls node, a new helper, "hlist_nulls_add_fake", is added so hlist_nulls_del() will work. Example: CPU A: CPU B: 1. 10.2.3.4:42 -> 10.8.8.8:53 (A) 2. 10.2.3.4:42 -> 10.8.8.8:53 (AAAA) 3. Apply DNAT, reply changed to 10.0.0.6 4. 10.2.3.4:42 -> 10.8.8.8:53 (AAAA) 5. Apply DNAT, reply changed to 10.0.0.7 6. confirm/commit to conntrack table, no collisions 7. commit clashing entry Reply comes in: 10.2.3.4:42 <- 10.0.0.6:5353 (A) -> Finds a conntrack, DNAT is reversed & packet forwarded to 10.2.3.4:42 10.2.3.4:42 <- 10.0.0.7:5353 (AAAA) -> Finds a conntrack, DNAT is reversed & packet forwarded to 10.2.3.4:42 The conntrack entry is deleted from table, as it has the NAT_CLASH bit set. In case of a retransmit from ORIGINAL dir, all further packets will get the DNAT transformation to 10.0.0.6. I tried to come up with other solutions but they all have worse problems. Alternatives considered were: 1. Confirm ct entries at allocation time, not in postrouting. a. will cause uneccesarry work when the skb that creates the conntrack is dropped by ruleset. b. in case nat is applied, ct entry would need to be moved in the table, which requires another spinlock pair to be taken. c. breaks the 'unconfirmed entry is private to cpu' assumption: we would need to guard all nfct->ext allocation requests with ct->lock spinlock. 2. Make the unconfirmed list a hash table instead of a pcpu list. Shares drawback c) of the first alternative. 3. Document this is expected and force users to rearrange their ruleset (e.g. by using "-m cluster" instead of "-m statistics"). nft has the 'jhash' expression which can be used instead of 'numgen'. Major drawback: doesn't fix what I consider a bug, not very realistic and I believe its reasonable to have the existing rulesets to 'just work'. 4. Document this is expected and force users to steer problematic packets to the same CPU -- this would serialize the "allocate new conntrack entry/nat table evaluation/perform nat/confirm entry", so no race can occur. Similar drawback to 3. Another advantage of this patch compared to 1) and 2) is that there are no changes to the hot path; things are handled in the udp tracker and the clash resolution path. Cc: rcu@vger.kernel.org Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Jozsef Kadlecsik Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit bab5417f5f0118ce914bc5b2f8381e959e891155 Author: Greg Kroah-Hartman Date: Fri Feb 14 08:11:48 2020 -0800 USB: misc: iowarrior: add support for the 100 device Add a new device id for the 100 devie. It has 4 interfaces like the 28 and 28L devices but a larger endpoint so more I/O pins. Cc: Christoph Jung Cc: stable Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20200214161148.GA3963518@kroah.com Signed-off-by: Greg Kroah-Hartman commit f287d3d19769b1d22cba4e51fa0487f2697713c9 Author: Lyude Paul Date: Wed Feb 12 18:11:49 2020 -0500 drm/nouveau/kms/gv100-: Re-set LUT after clearing for modesets While certain modeset operations on gv100+ need us to temporarily disable the LUT, we make the mistake of sometimes neglecting to reprogram the LUT after such modesets. In particular, moving a head from one encoder to another seems to trigger this quite often. GV100+ is very picky about having a LUT in most scenarios, so this causes the display engine to hang with the following error code: disp: chid 1 stat 00005080 reason 5 [INVALID_STATE] mthd 0200 data 00000001 code 0000002d) So, fix this by always re-programming the LUT if we're clearing it in a state where the wndw is still visible, and has a XLUT handle programmed. Signed-off-by: Lyude Paul Fixes: facaed62b4cb ("drm/nouveau/kms/gv100: initial support") Cc: # v4.18+ Signed-off-by: Ben Skeggs commit b99ef12b80cfe48a14e7918c2f799c37d2195aca Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/gr/tu11x: initial support Signed-off-by: Ben Skeggs commit 072663f86d62571fe540d9e1d24eb873a1b1182f Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/acr/tu11x: initial support Signed-off-by: Ben Skeggs commit 5eb40257047fb11085d582b7b9ccd0bffe900726 Author: Anson Huang Date: Mon Feb 17 11:01:35 2020 +0800 clk: imx8mn: Fix incorrect clock defines IMX8MN_CLK_I2C4 and IMX8MN_CLK_UART1's index definitions are incorrect, fix them. Fixes: 1e80936a42e1 ("dt-bindings: imx: Add clock binding doc for i.MX8MN") Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit bcbf53a0dab50980867476994f6079c1ec5bb3a3 Author: Johan Hovold Date: Wed Feb 12 11:46:29 2020 +0100 ARM: dts: imx6dl-colibri-eval-v3: fix sram compatible properties The sram-node compatible properties have mistakingly combined the model-specific string with the generic "mtd-ram" string. Note that neither "cy7c1019dv33-10zsxi, mtd-ram" or "cy7c1019dv33-10zsxi" are used by any in-kernel driver and they are not present in any binding. The physmap driver will however bind to platform devices that specify "mtd-ram". Fixes: fc48e76489fd ("ARM: dts: imx6: Add support for Toradex Colibri iMX6 module") Cc: Sanchayan Maity Cc: Marcel Ziswiler Cc: Shawn Guo Signed-off-by: Johan Hovold Reviewed-by: Oleksandr Suvorov Signed-off-by: Shawn Guo commit 9a6a0dea16177ccaecc116f560232e63bec115f1 Author: Paul Cercueil Date: Sun Feb 16 16:39:43 2020 -0300 net: ethernet: dm9000: Handle -EPROBE_DEFER in dm9000_parse_dt() The call to of_get_mac_address() can return -EPROBE_DEFER, for instance when the MAC address is read from a NVMEM driver that did not probe yet. Cc: H. Nikolaus Schaller Cc: Mathieu Malaterre Signed-off-by: Paul Cercueil Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d2f273f0a9205257b91af1d3d461ee29688c2f24 Author: Randy Dunlap Date: Sat Feb 15 15:34:07 2020 -0800 skbuff.h: fix all kernel-doc warnings Fix all kernel-doc warnings in . Fixes these warnings: ../include/linux/skbuff.h:890: warning: Function parameter or member 'list' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member 'dev_scratch' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member 'ip_defrag_offset' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member 'skb_mstamp_ns' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member '__cloned_offset' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member 'head_frag' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member '__pkt_type_offset' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member 'encapsulation' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member 'encap_hdr_csum' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member 'csum_valid' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member '__pkt_vlan_present_offset' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member 'vlan_present' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member 'csum_complete_sw' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member 'csum_level' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member 'inner_protocol_type' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member 'remcsum_offload' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member 'sender_cpu' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member 'reserved_tailroom' not described in 'sk_buff' ../include/linux/skbuff.h:890: warning: Function parameter or member 'inner_ipproto' not described in 'sk_buff' Signed-off-by: Randy Dunlap Signed-off-by: David S. Miller commit 8955b4357d6fc98734b53855b76ee37014a7e492 Author: Randy Dunlap Date: Sat Feb 15 13:41:12 2020 -0800 skbuff: remove stale bit mask comments Remove stale comments since this flag is no longer a bit mask but is a bit field. Signed-off-by: Randy Dunlap Signed-off-by: David S. Miller commit 66256e0b15bd72e1e1c24c4cef4281a95636781c Author: Randy Dunlap Date: Sat Feb 15 11:42:37 2020 -0800 net/sock.h: fix all kernel-doc warnings Fix all kernel-doc warnings for . Fixes these warnings: ../include/net/sock.h:232: warning: Function parameter or member 'skc_addrpair' not described in 'sock_common' ../include/net/sock.h:232: warning: Function parameter or member 'skc_portpair' not described in 'sock_common' ../include/net/sock.h:232: warning: Function parameter or member 'skc_ipv6only' not described in 'sock_common' ../include/net/sock.h:232: warning: Function parameter or member 'skc_net_refcnt' not described in 'sock_common' ../include/net/sock.h:232: warning: Function parameter or member 'skc_v6_daddr' not described in 'sock_common' ../include/net/sock.h:232: warning: Function parameter or member 'skc_v6_rcv_saddr' not described in 'sock_common' ../include/net/sock.h:232: warning: Function parameter or member 'skc_cookie' not described in 'sock_common' ../include/net/sock.h:232: warning: Function parameter or member 'skc_listener' not described in 'sock_common' ../include/net/sock.h:232: warning: Function parameter or member 'skc_tw_dr' not described in 'sock_common' ../include/net/sock.h:232: warning: Function parameter or member 'skc_rcv_wnd' not described in 'sock_common' ../include/net/sock.h:232: warning: Function parameter or member 'skc_tw_rcv_nxt' not described in 'sock_common' ../include/net/sock.h:498: warning: Function parameter or member 'sk_rx_skb_cache' not described in 'sock' ../include/net/sock.h:498: warning: Function parameter or member 'sk_wq_raw' not described in 'sock' ../include/net/sock.h:498: warning: Function parameter or member 'tcp_rtx_queue' not described in 'sock' ../include/net/sock.h:498: warning: Function parameter or member 'sk_tx_skb_cache' not described in 'sock' ../include/net/sock.h:498: warning: Function parameter or member 'sk_route_forced_caps' not described in 'sock' ../include/net/sock.h:498: warning: Function parameter or member 'sk_txtime_report_errors' not described in 'sock' ../include/net/sock.h:498: warning: Function parameter or member 'sk_validate_xmit_skb' not described in 'sock' ../include/net/sock.h:498: warning: Function parameter or member 'sk_bpf_storage' not described in 'sock' ../include/net/sock.h:2024: warning: No description found for return value of 'sk_wmem_alloc_get' ../include/net/sock.h:2035: warning: No description found for return value of 'sk_rmem_alloc_get' ../include/net/sock.h:2046: warning: No description found for return value of 'sk_has_allocations' ../include/net/sock.h:2082: warning: No description found for return value of 'skwq_has_sleeper' ../include/net/sock.h:2244: warning: No description found for return value of 'sk_page_frag' ../include/net/sock.h:2444: warning: Function parameter or member 'tcp_rx_skb_cache_key' not described in 'DECLARE_STATIC_KEY_FALSE' ../include/net/sock.h:2444: warning: Excess function parameter 'sk' description in 'DECLARE_STATIC_KEY_FALSE' ../include/net/sock.h:2444: warning: Excess function parameter 'skb' description in 'DECLARE_STATIC_KEY_FALSE' Signed-off-by: Randy Dunlap Signed-off-by: David S. Miller commit 58292104832fef6cb4a89f736012c0e0724c3442 Author: Marek Vasut Date: Sat Feb 15 17:54:19 2020 +0100 net: ks8851-ml: Fix 16-bit IO operation The Micrel KSZ8851-16MLLI datasheet DS00002357B page 12 states that BE[3:0] signals are active high. This contradicts the measurements of the behavior of the actual chip, where these signals behave as active low. For example, to read the CIDER register, the bus must expose 0xc0c0 during the address phase, which means BE[3:0]=4'b1100. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Lukas Wunner Cc: Petr Stetiar Cc: YueHaibing Signed-off-by: David S. Miller commit edacb098ea9c31589276152f09b4439052c0f2b1 Author: Marek Vasut Date: Sat Feb 15 17:54:18 2020 +0100 net: ks8851-ml: Fix 16-bit data access The packet data written to and read from Micrel KSZ8851-16MLLI must be byte-swapped in 16-bit mode, add this byte-swapping. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Lukas Wunner Cc: Petr Stetiar Cc: YueHaibing Signed-off-by: David S. Miller commit 69233bba6543a37755158ca3382765387b8078df Author: Marek Vasut Date: Sat Feb 15 17:54:17 2020 +0100 net: ks8851-ml: Remove 8-bit bus accessors This driver is mixing 8-bit and 16-bit bus accessors for reasons unknown, however the speculation is that this was some sort of attempt to support the 8-bit bus mode. As per the KS8851-16MLL documentation, all two registers accessed via the 8-bit accessors are internally 16-bit registers, so reading them using 16-bit accessors is fine. The KS_CCR read can be converted to 16-bit read outright, as it is already a concatenation of two 8-bit reads of that register. The KS_RXQCR accesses are 8-bit only, however writing the top 8 bits of the register is OK as well, since the driver caches the entire 16-bit register value anyway. Finally, the driver is not used by any hardware in the kernel right now. The only hardware available to me is one with 16-bit bus, so I have no way to test the 8-bit bus mode, however it is unlikely this ever really worked anyway. If the 8-bit bus mode is ever required, it can be easily added by adjusting the 16-bit accessors to do 2 consecutive accesses, which is how this should have been done from the beginning. Signed-off-by: Marek Vasut Cc: David S. Miller Cc: Lukas Wunner Cc: Petr Stetiar Cc: YueHaibing Signed-off-by: David S. Miller commit 357b41caf949c57e426f1c5f18574b6b46583406 Author: Matthieu Baerts Date: Sat Feb 15 15:45:56 2020 +0100 mptcp: select CRYPTO Without this modification and if CRYPTO is not selected, we have this warning: WARNING: unmet direct dependencies detected for CRYPTO_LIB_SHA256 Depends on [n]: CRYPTO [=n] Selected by [y]: - MPTCP [=y] && NET [=y] && INET [=y] MPTCP selects CRYPTO_LIB_SHA256 which seems to depend on CRYPTO. CRYPTO is now selected to avoid this issue. Even though the config system prints that warning, it looks like sha256.c is compiled and linked even without CONFIG_CRYPTO. Since MPTCP will end up needing CONFIG_CRYPTO anyway in future commits -- currently in preparation for net-next -- we propose to add it now to fix the warning. The dependency in the config system comes from the fact that CRYPTO_LIB_SHA256 is defined in "lib/crypto/Kconfig" which is sourced from "crypto/Kconfig" only if CRYPTO is selected. Fixes: 65492c5a6ab5 (mptcp: move from sha1 (v0) to sha256 (v1)) Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit c230978fb7d59d69ce6992623d948fb84abbf9e6 Merge: c4c10784293e b3e80d44f5b1 Author: David S. Miller Date: Sun Feb 16 19:32:11 2020 -0800 Merge branch 'bonding-fix-bonding-interface-bugs' Taehee Yoo says: ==================== bonding: fix bonding interface bugs This patchset fixes lockdep problem in bonding interface 1. The first patch is to add missing netdev_update_lockdep_key(). After bond_release(), netdev_update_lockdep_key() should be called. But both ioctl path and attribute path don't call netdev_update_lockdep_key(). This patch adds missing netdev_update_lockdep_key(). 2. The second patch is to export netdev_next_lower_dev_rcu symbol. netdev_next_lower_dev_rcu() is useful to implement the function, which is to walk their all lower interfaces. This patch is actually a preparing patch for the third patch. 3. The last patch is to fix lockdep waring in bond_get_stats(). The stats_lock uses a dynamic lockdep key. So, after "nomaster" operation, updating the dynamic lockdep key routine is needed. but it doesn't So, lockdep warning occurs. Change log: v1 -> v2: - Update headline from "fix bonding interface bugs" to "bonding: fix bonding interface bugs" - Drop a patch("bonding: do not collect slave's stats") - Add new patches - ("net: export netdev_next_lower_dev_rcu()") - ("bonding: fix lockdep warning in bond_get_stats()") ==================== Signed-off-by: David S. Miller commit b3e80d44f5b1b470dd9e2dbc6816e63a5c519709 Author: Taehee Yoo Date: Sat Feb 15 10:50:40 2020 +0000 bonding: fix lockdep warning in bond_get_stats() In the "struct bonding", there is stats_lock. This lock protects "bond_stats" in the "struct bonding". bond_stats is updated in the bond_get_stats() and this function would be executed concurrently. So, the lock is needed. Bonding interfaces would be nested. So, either stats_lock should use dynamic lockdep class key or stats_lock should be used by spin_lock_nested(). In the current code, stats_lock is using a dynamic lockdep class key. But there is no updating stats_lock_key routine So, lockdep warning will occur. Test commands: ip link add bond0 type bond ip link add bond1 type bond ip link set bond0 master bond1 ip link set bond0 nomaster ip link set bond1 master bond0 Splat looks like: [ 38.420603][ T957] 5.5.0+ #394 Not tainted [ 38.421074][ T957] ------------------------------------------------------ [ 38.421837][ T957] ip/957 is trying to acquire lock: [ 38.422399][ T957] ffff888063262cd8 (&bond->stats_lock_key#2){+.+.}, at: bond_get_stats+0x90/0x4d0 [bonding] [ 38.423528][ T957] [ 38.423528][ T957] but task is already holding lock: [ 38.424526][ T957] ffff888065fd2cd8 (&bond->stats_lock_key){+.+.}, at: bond_get_stats+0x90/0x4d0 [bonding] [ 38.426075][ T957] [ 38.426075][ T957] which lock already depends on the new lock. [ 38.426075][ T957] [ 38.428536][ T957] [ 38.428536][ T957] the existing dependency chain (in reverse order) is: [ 38.429475][ T957] [ 38.429475][ T957] -> #1 (&bond->stats_lock_key){+.+.}: [ 38.430273][ T957] _raw_spin_lock+0x30/0x70 [ 38.430812][ T957] bond_get_stats+0x90/0x4d0 [bonding] [ 38.431451][ T957] dev_get_stats+0x1ec/0x270 [ 38.432088][ T957] bond_get_stats+0x1a5/0x4d0 [bonding] [ 38.432767][ T957] dev_get_stats+0x1ec/0x270 [ 38.433322][ T957] rtnl_fill_stats+0x44/0xbe0 [ 38.433866][ T957] rtnl_fill_ifinfo+0xeb2/0x3720 [ 38.434474][ T957] rtmsg_ifinfo_build_skb+0xca/0x170 [ 38.435081][ T957] rtmsg_ifinfo_event.part.33+0x1b/0xb0 [ 38.436848][ T957] rtnetlink_event+0xcd/0x120 [ 38.437455][ T957] notifier_call_chain+0x90/0x160 [ 38.438067][ T957] netdev_change_features+0x74/0xa0 [ 38.438708][ T957] bond_compute_features.isra.45+0x4e6/0x6f0 [bonding] [ 38.439522][ T957] bond_enslave+0x3639/0x47b0 [bonding] [ 38.440225][ T957] do_setlink+0xaab/0x2ef0 [ 38.440786][ T957] __rtnl_newlink+0x9c5/0x1270 [ 38.441463][ T957] rtnl_newlink+0x65/0x90 [ 38.442075][ T957] rtnetlink_rcv_msg+0x4a8/0x890 [ 38.442774][ T957] netlink_rcv_skb+0x121/0x350 [ 38.443451][ T957] netlink_unicast+0x42e/0x610 [ 38.444282][ T957] netlink_sendmsg+0x65a/0xb90 [ 38.444992][ T957] ____sys_sendmsg+0x5ce/0x7a0 [ 38.445679][ T957] ___sys_sendmsg+0x10f/0x1b0 [ 38.446365][ T957] __sys_sendmsg+0xc6/0x150 [ 38.447007][ T957] do_syscall_64+0x99/0x4f0 [ 38.447668][ T957] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.448538][ T957] [ 38.448538][ T957] -> #0 (&bond->stats_lock_key#2){+.+.}: [ 38.449554][ T957] __lock_acquire+0x2d8d/0x3de0 [ 38.450148][ T957] lock_acquire+0x164/0x3b0 [ 38.450711][ T957] _raw_spin_lock+0x30/0x70 [ 38.451292][ T957] bond_get_stats+0x90/0x4d0 [bonding] [ 38.451950][ T957] dev_get_stats+0x1ec/0x270 [ 38.452425][ T957] bond_get_stats+0x1a5/0x4d0 [bonding] [ 38.453362][ T957] dev_get_stats+0x1ec/0x270 [ 38.453825][ T957] rtnl_fill_stats+0x44/0xbe0 [ 38.454390][ T957] rtnl_fill_ifinfo+0xeb2/0x3720 [ 38.456257][ T957] rtmsg_ifinfo_build_skb+0xca/0x170 [ 38.456998][ T957] rtmsg_ifinfo_event.part.33+0x1b/0xb0 [ 38.459351][ T957] rtnetlink_event+0xcd/0x120 [ 38.460086][ T957] notifier_call_chain+0x90/0x160 [ 38.460829][ T957] netdev_change_features+0x74/0xa0 [ 38.461752][ T957] bond_compute_features.isra.45+0x4e6/0x6f0 [bonding] [ 38.462705][ T957] bond_enslave+0x3639/0x47b0 [bonding] [ 38.463476][ T957] do_setlink+0xaab/0x2ef0 [ 38.464141][ T957] __rtnl_newlink+0x9c5/0x1270 [ 38.464897][ T957] rtnl_newlink+0x65/0x90 [ 38.465522][ T957] rtnetlink_rcv_msg+0x4a8/0x890 [ 38.466215][ T957] netlink_rcv_skb+0x121/0x350 [ 38.466895][ T957] netlink_unicast+0x42e/0x610 [ 38.467583][ T957] netlink_sendmsg+0x65a/0xb90 [ 38.468285][ T957] ____sys_sendmsg+0x5ce/0x7a0 [ 38.469202][ T957] ___sys_sendmsg+0x10f/0x1b0 [ 38.469884][ T957] __sys_sendmsg+0xc6/0x150 [ 38.470587][ T957] do_syscall_64+0x99/0x4f0 [ 38.471245][ T957] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 38.472093][ T957] [ 38.472093][ T957] other info that might help us debug this: [ 38.472093][ T957] [ 38.473438][ T957] Possible unsafe locking scenario: [ 38.473438][ T957] [ 38.474898][ T957] CPU0 CPU1 [ 38.476234][ T957] ---- ---- [ 38.480171][ T957] lock(&bond->stats_lock_key); [ 38.480808][ T957] lock(&bond->stats_lock_key#2); [ 38.481791][ T957] lock(&bond->stats_lock_key); [ 38.482754][ T957] lock(&bond->stats_lock_key#2); [ 38.483416][ T957] [ 38.483416][ T957] *** DEADLOCK *** [ 38.483416][ T957] [ 38.484505][ T957] 3 locks held by ip/957: [ 38.485048][ T957] #0: ffffffffbccf6230 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x457/0x890 [ 38.486198][ T957] #1: ffff888065fd2cd8 (&bond->stats_lock_key){+.+.}, at: bond_get_stats+0x90/0x4d0 [bonding] [ 38.487625][ T957] #2: ffffffffbc9254c0 (rcu_read_lock){....}, at: bond_get_stats+0x5/0x4d0 [bonding] [ 38.488897][ T957] [ 38.488897][ T957] stack backtrace: [ 38.489646][ T957] CPU: 1 PID: 957 Comm: ip Not tainted 5.5.0+ #394 [ 38.490497][ T957] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 38.492810][ T957] Call Trace: [ 38.493219][ T957] dump_stack+0x96/0xdb [ 38.493709][ T957] check_noncircular+0x371/0x450 [ 38.494344][ T957] ? lookup_address+0x60/0x60 [ 38.494923][ T957] ? print_circular_bug.isra.35+0x310/0x310 [ 38.495699][ T957] ? hlock_class+0x130/0x130 [ 38.496334][ T957] ? __lock_acquire+0x2d8d/0x3de0 [ 38.496979][ T957] __lock_acquire+0x2d8d/0x3de0 [ 38.497607][ T957] ? register_lock_class+0x14d0/0x14d0 [ 38.498333][ T957] ? check_chain_key+0x236/0x5d0 [ 38.499003][ T957] lock_acquire+0x164/0x3b0 [ 38.499800][ T957] ? bond_get_stats+0x90/0x4d0 [bonding] [ 38.500706][ T957] _raw_spin_lock+0x30/0x70 [ 38.501435][ T957] ? bond_get_stats+0x90/0x4d0 [bonding] [ 38.502311][ T957] bond_get_stats+0x90/0x4d0 [bonding] [ ... ] But, there is another problem. The dynamic lockdep class key is protected by RTNL, but bond_get_stats() would be called outside of RTNL. So, it would use an invalid dynamic lockdep class key. In order to fix this issue, stats_lock uses spin_lock_nested() instead of a dynamic lockdep key. The bond_get_stats() calls bond_get_lowest_level_rcu() to get the correct nest level value, which will be used by spin_lock_nested(). The "dev->lower_level" indicates lower nest level value, but this value is invalid outside of RTNL. So, bond_get_lowest_level_rcu() returns valid lower nest level value in the RCU critical section. bond_get_lowest_level_rcu() will be work only when LOCKDEP is enabled. Fixes: 089bca2caed0 ("bonding: use dynamic lockdep key instead of subclass") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 7151affeef8d527f50b4b68a871fd28bd660023f Author: Taehee Yoo Date: Sat Feb 15 10:50:21 2020 +0000 net: export netdev_next_lower_dev_rcu() netdev_next_lower_dev_rcu() will be used to implement a function, which is to walk all lower interfaces. There are already functions that they walk their lower interface. (netdev_walk_all_lower_dev_rcu, netdev_walk_all_lower_dev()). But, there would be cases that couldn't be covered by given netdev_walk_all_lower_dev_{rcu}() function. So, some modules would want to implement own function, which is to walk all lower interfaces. In the next patch, netdev_next_lower_dev_rcu() will be used. In addition, this patch removes two unused prototypes in netdevice.h. Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 064ff66e2bef84f1153087612032b5b9eab005bd Author: Taehee Yoo Date: Sat Feb 15 10:50:08 2020 +0000 bonding: add missing netdev_update_lockdep_key() After bond_release(), netdev_update_lockdep_key() should be called. But both ioctl path and attribute path don't call netdev_update_lockdep_key(). This patch adds missing netdev_update_lockdep_key(). Test commands: ip link add bond0 type bond ip link add bond1 type bond ifenslave bond0 bond1 ifenslave -d bond0 bond1 ifenslave bond1 bond0 Splat looks like: [ 29.501182][ T1046] WARNING: possible circular locking dependency detected [ 29.501945][ T1039] hardirqs last disabled at (1962): [] handle_mm_fault+0x13f/0x700 [ 29.503442][ T1046] 5.5.0+ #322 Not tainted [ 29.503447][ T1046] ------------------------------------------------------ [ 29.504277][ T1039] softirqs last enabled at (1180): [] __do_softirq+0x678/0x981 [ 29.505443][ T1046] ifenslave/1046 is trying to acquire lock: [ 29.505886][ T1039] softirqs last disabled at (1169): [] irq_exit+0x17a/0x1a0 [ 29.509997][ T1046] ffff88805d5da280 (&dev->addr_list_lock_key#3){+...}, at: dev_mc_sync_multiple+0x95/0x120 [ 29.511243][ T1046] [ 29.511243][ T1046] but task is already holding lock: [ 29.512192][ T1046] ffff8880460f2280 (&dev->addr_list_lock_key#4){+...}, at: bond_enslave+0x4482/0x47b0 [bonding] [ 29.514124][ T1046] [ 29.514124][ T1046] which lock already depends on the new lock. [ 29.514124][ T1046] [ 29.517297][ T1046] [ 29.517297][ T1046] the existing dependency chain (in reverse order) is: [ 29.518231][ T1046] [ 29.518231][ T1046] -> #1 (&dev->addr_list_lock_key#4){+...}: [ 29.519076][ T1046] _raw_spin_lock+0x30/0x70 [ 29.519588][ T1046] dev_mc_sync_multiple+0x95/0x120 [ 29.520208][ T1046] bond_enslave+0x448d/0x47b0 [bonding] [ 29.520862][ T1046] bond_option_slaves_set+0x1a3/0x370 [bonding] [ 29.521640][ T1046] __bond_opt_set+0x1ff/0xbb0 [bonding] [ 29.522438][ T1046] __bond_opt_set_notify+0x2b/0xf0 [bonding] [ 29.523251][ T1046] bond_opt_tryset_rtnl+0x92/0xf0 [bonding] [ 29.524082][ T1046] bonding_sysfs_store_option+0x8a/0xf0 [bonding] [ 29.524959][ T1046] kernfs_fop_write+0x276/0x410 [ 29.525620][ T1046] vfs_write+0x197/0x4a0 [ 29.526218][ T1046] ksys_write+0x141/0x1d0 [ 29.526818][ T1046] do_syscall_64+0x99/0x4f0 [ 29.527430][ T1046] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 29.528265][ T1046] [ 29.528265][ T1046] -> #0 (&dev->addr_list_lock_key#3){+...}: [ 29.529272][ T1046] __lock_acquire+0x2d8d/0x3de0 [ 29.529935][ T1046] lock_acquire+0x164/0x3b0 [ 29.530638][ T1046] _raw_spin_lock+0x30/0x70 [ 29.531187][ T1046] dev_mc_sync_multiple+0x95/0x120 [ 29.531790][ T1046] bond_enslave+0x448d/0x47b0 [bonding] [ 29.532451][ T1046] bond_option_slaves_set+0x1a3/0x370 [bonding] [ 29.533163][ T1046] __bond_opt_set+0x1ff/0xbb0 [bonding] [ 29.533789][ T1046] __bond_opt_set_notify+0x2b/0xf0 [bonding] [ 29.534595][ T1046] bond_opt_tryset_rtnl+0x92/0xf0 [bonding] [ 29.535500][ T1046] bonding_sysfs_store_option+0x8a/0xf0 [bonding] [ 29.536379][ T1046] kernfs_fop_write+0x276/0x410 [ 29.537057][ T1046] vfs_write+0x197/0x4a0 [ 29.537640][ T1046] ksys_write+0x141/0x1d0 [ 29.538251][ T1046] do_syscall_64+0x99/0x4f0 [ 29.538870][ T1046] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 29.539659][ T1046] [ 29.539659][ T1046] other info that might help us debug this: [ 29.539659][ T1046] [ 29.540953][ T1046] Possible unsafe locking scenario: [ 29.540953][ T1046] [ 29.541883][ T1046] CPU0 CPU1 [ 29.542540][ T1046] ---- ---- [ 29.543209][ T1046] lock(&dev->addr_list_lock_key#4); [ 29.543880][ T1046] lock(&dev->addr_list_lock_key#3); [ 29.544873][ T1046] lock(&dev->addr_list_lock_key#4); [ 29.545863][ T1046] lock(&dev->addr_list_lock_key#3); [ 29.546525][ T1046] [ 29.546525][ T1046] *** DEADLOCK *** [ 29.546525][ T1046] [ 29.547542][ T1046] 5 locks held by ifenslave/1046: [ 29.548196][ T1046] #0: ffff88806044c478 (sb_writers#5){.+.+}, at: vfs_write+0x3bb/0x4a0 [ 29.549248][ T1046] #1: ffff88805af00890 (&of->mutex){+.+.}, at: kernfs_fop_write+0x1cf/0x410 [ 29.550343][ T1046] #2: ffff88805b8b54b0 (kn->count#157){.+.+}, at: kernfs_fop_write+0x1f2/0x410 [ 29.551575][ T1046] #3: ffffffffaecf4cf0 (rtnl_mutex){+.+.}, at: bond_opt_tryset_rtnl+0x5f/0xf0 [bonding] [ 29.552819][ T1046] #4: ffff8880460f2280 (&dev->addr_list_lock_key#4){+...}, at: bond_enslave+0x4482/0x47b0 [bonding] [ 29.554175][ T1046] [ 29.554175][ T1046] stack backtrace: [ 29.554907][ T1046] CPU: 0 PID: 1046 Comm: ifenslave Not tainted 5.5.0+ #322 [ 29.555854][ T1046] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 29.557064][ T1046] Call Trace: [ 29.557504][ T1046] dump_stack+0x96/0xdb [ 29.558054][ T1046] check_noncircular+0x371/0x450 [ 29.558723][ T1046] ? print_circular_bug.isra.35+0x310/0x310 [ 29.559486][ T1046] ? hlock_class+0x130/0x130 [ 29.560100][ T1046] ? __lock_acquire+0x2d8d/0x3de0 [ 29.560761][ T1046] __lock_acquire+0x2d8d/0x3de0 [ 29.561366][ T1046] ? register_lock_class+0x14d0/0x14d0 [ 29.562045][ T1046] ? find_held_lock+0x39/0x1d0 [ 29.562641][ T1046] lock_acquire+0x164/0x3b0 [ 29.563199][ T1046] ? dev_mc_sync_multiple+0x95/0x120 [ 29.563872][ T1046] _raw_spin_lock+0x30/0x70 [ 29.564464][ T1046] ? dev_mc_sync_multiple+0x95/0x120 [ 29.565146][ T1046] dev_mc_sync_multiple+0x95/0x120 [ 29.565793][ T1046] bond_enslave+0x448d/0x47b0 [bonding] [ 29.566487][ T1046] ? bond_update_slave_arr+0x940/0x940 [bonding] [ 29.567279][ T1046] ? bstr_printf+0xc20/0xc20 [ 29.567857][ T1046] ? stack_trace_consume_entry+0x160/0x160 [ 29.568614][ T1046] ? deactivate_slab.isra.77+0x2c5/0x800 [ 29.569320][ T1046] ? check_chain_key+0x236/0x5d0 [ 29.569939][ T1046] ? sscanf+0x93/0xc0 [ 29.570442][ T1046] ? vsscanf+0x1e20/0x1e20 [ 29.571003][ T1046] bond_option_slaves_set+0x1a3/0x370 [bonding] [ ... ] Fixes: ab92d68fc22f ("net: core: add generic lockdep keys") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit c4c10784293ec89746721b1a40cb730b0106deea Author: Christophe JAILLET Date: Sat Feb 15 08:17:28 2020 +0100 NFC: pn544: Fix a typo in a debug message The ending character of the string shoulb be \n, not \b. Fixes: 17936b43f0fd ("NFC: Standardize logging style") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 6699170376ab941c1cc5c3bcefa766efc3575c73 Author: Michal Kubecek Date: Sat Feb 15 01:55:53 2020 +0100 ethtool: fix application of verbose no_mask bitset A bitset without mask in a _SET request means we want exactly the bits in the bitset to be set. This works correctly for compact format but when verbose format is parsed, ethnl_update_bitset32_verbose() only sets the bits present in the request bitset but does not clear the rest. This can cause incorrect results like lion:~ # ethtool eth0 | grep Wake Supports Wake-on: pumbg Wake-on: g lion:~ # ethtool -s eth0 wol u lion:~ # ethtool eth0 | grep Wake Supports Wake-on: pumbg Wake-on: ug when the second ethtool command issues request ETHTOOL_MSG_WOL_SET ETHTOOL_A_WOL_HEADER ETHTOOL_A_HEADER_DEV_NAME = "eth0" ETHTOOL_A_WOL_MODES ETHTOOL_A_BITSET_NOMASK ETHTOOL_A_BITSET_BITS ETHTOOL_A_BITSET_BITS_BIT ETHTOOL_BITSET_BIT_INDEX = 1 Fix the logic by clearing the whole target bitmap before we start iterating through the request bits. Fixes: 10b518d4e6dd ("ethtool: netlink bitset handling") Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller commit d965a5432d4c3e6b9c3d2bc1d4a800013bbf76f6 Author: Florian Fainelli Date: Fri Feb 14 15:26:19 2020 -0800 net: dsa: b53: Ensure the default VID is untagged We need to ensure that the default VID is untagged otherwise the switch will be sending tagged frames and the results can be problematic. This is especially true with b53 switches that use VID 0 as their default VLAN since VID 0 has a special meaning. Fixes: fea83353177a ("net: dsa: b53: Fix default VLAN ID") Fixes: 061f6a505ac3 ("net: dsa: Add ndo_vlan_rx_{add, kill}_vid implementation") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 82d81bb070cf109b3b5167597239dfa5c45558a5 Merge: b6e4a1aeeb14 1fbc33b0a7fe Author: David S. Miller Date: Sun Feb 16 19:21:56 2020 -0800 Merge branch 'wireguard-fixes' Jason A. Donenfeld says: ==================== wireguard fixes for 5.6-rc2 Here are four fixes for wireguard collected since rc1: 1) Some small cleanups to the test suite to help massively parallel builds. 2) A change in how we reset our load calculation to avoid a more expensive comparison, suggested by Matt Dunwoodie. 3) I've been loading more and more of wireguard's surface into syzkaller, trying to get our coverage as complete as possible, leading in this case to a fix for mtu=0 devices. 4) A removal of superfluous code, pointed out by Eric Dumazet. v2 fixes a logical problem in the patch for (3) pointed out by Eric Dumazet. v3 replaces some non-obvious bitmath in (3) with a more obvious expression, and adds patch (4). ==================== Signed-off-by: David S. Miller commit 1fbc33b0a7feb6ca72bf7dc8a05d81485ee8ee2e Author: Jason A. Donenfeld Date: Fri Feb 14 23:57:23 2020 +0100 wireguard: socket: remove extra call to synchronize_net synchronize_net() is a wrapper around synchronize_rcu(), so there's no point in having synchronize_net and synchronize_rcu back to back, despite the documentation comment suggesting maybe it's somewhat useful, "Wait for packets currently being received to be done." This commit removes the extra call. Signed-off-by: Jason A. Donenfeld Suggested-by: Eric Dumazet Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 175f1ca9a9ed8689d2028da1a7c624bb4fb4ff7e Author: Jason A. Donenfeld Date: Fri Feb 14 23:57:22 2020 +0100 wireguard: send: account for mtu=0 devices It turns out there's an easy way to get packets queued up while still having an MTU of zero, and that's via persistent keep alive. This commit makes sure that in whatever condition, we don't wind up dividing by zero. Note that an MTU of zero for a wireguard interface is something quasi-valid, so I don't think the correct fix is to limit it via min_mtu. This can be reproduced easily with: ip link add wg0 type wireguard ip link add wg1 type wireguard ip link set wg0 up mtu 0 ip link set wg1 up wg set wg0 private-key <(wg genkey) wg set wg1 listen-port 1 private-key <(wg genkey) peer $(wg show wg0 public-key) wg set wg0 peer $(wg show wg1 public-key) persistent-keepalive 1 endpoint 127.0.0.1:1 However, while min_mtu=0 seems fine, it makes sense to restrict the max_mtu. This commit also restricts the maximum MTU to the greatest number for which rounding up to the padding multiple won't overflow a signed integer. Packets this large were always rejected anyway eventually, due to checks deeper in, but it seems more sound not to even let the administrator configure something that won't work anyway. We use this opportunity to clean up this function a bit so that it's clear which paths we're expecting. Signed-off-by: Jason A. Donenfeld Cc: Eric Dumazet Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 2a8a4df36462aa85b0db87b7c5ea145ba67e34a8 Author: Jason A. Donenfeld Date: Fri Feb 14 23:57:21 2020 +0100 wireguard: receive: reset last_under_load to zero This is a small optimization that prevents more expensive comparisons from happening when they are no longer necessary, by clearing the last_under_load variable whenever we wind up in a state where we were under load but we no longer are. Signed-off-by: Jason A. Donenfeld Suggested-by: Matt Dunwoodie Signed-off-by: David S. Miller commit 04ddf1208f03e1dbc39a4619c40eba640051b950 Author: Jason A. Donenfeld Date: Fri Feb 14 23:57:20 2020 +0100 wireguard: selftests: reduce complexity and fix make races This gives us fewer dependencies and shortens build time, fixes up some hash checking race conditions, and also fixes missing directory creation that caused issues on massively parallel builds. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit b6e4a1aeeb14cad595f70b31cc376903d322c821 Author: Mat Martineau Date: Fri Feb 14 14:14:29 2020 -0800 mptcp: Protect subflow socket options before connection completes Userspace should not be able to directly manipulate subflow socket options before a connection is established since it is not yet known if it will be an MPTCP subflow or a TCP fallback subflow. TCP fallback subflows can be more directly controlled by userspace because they are regular TCP connections, while MPTCP subflow sockets need to be configured for the specific needs of MPTCP. Use the same logic as sendmsg/recvmsg to ensure that socket option calls are only passed through to known TCP fallback subflows. Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 6f08e98d62799e53c89dbf2c9a49d77e20ca648c Author: Arun Parameswaran Date: Fri Feb 14 13:47:46 2020 -0800 net: phy: restore mdio regs in the iproc mdio driver The mii management register in iproc mdio block does not have a retention register so it is lost on suspend. Save and restore value of register while resuming from suspend. Fixes: bb1a619735b4 ("net: phy: Initialize mdio clock at probe function") Signed-off-by: Arun Parameswaran Signed-off-by: Scott Branden Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit e08ad80551b4b33c02f2fce1522f6c227d3976cf Author: Eric Dumazet Date: Fri Feb 14 07:53:53 2020 -0800 net: add strict checks in netdev_name_node_alt_destroy() netdev_name_node_alt_destroy() does a lookup over all device names of a namespace. We need to make sure the name belongs to the device of interest, and that we do not destroy its primary name, since we rely on it being not deleted : dev->name_node would indeed point to freed memory. syzbot report was the following : BUG: KASAN: use-after-free in dev_net include/linux/netdevice.h:2206 [inline] BUG: KASAN: use-after-free in mld_force_mld_version net/ipv6/mcast.c:1172 [inline] BUG: KASAN: use-after-free in mld_in_v2_mode_only net/ipv6/mcast.c:1180 [inline] BUG: KASAN: use-after-free in mld_in_v1_mode+0x203/0x230 net/ipv6/mcast.c:1190 Read of size 8 at addr ffff88809886c588 by task swapper/1/0 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.6.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x32 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:641 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135 dev_net include/linux/netdevice.h:2206 [inline] mld_force_mld_version net/ipv6/mcast.c:1172 [inline] mld_in_v2_mode_only net/ipv6/mcast.c:1180 [inline] mld_in_v1_mode+0x203/0x230 net/ipv6/mcast.c:1190 mld_send_initial_cr net/ipv6/mcast.c:2083 [inline] mld_dad_timer_expire+0x24/0x230 net/ipv6/mcast.c:2118 call_timer_fn+0x1ac/0x780 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0x6c3/0x1790 kernel/time/timer.c:1786 __do_softirq+0x262/0x98c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:546 [inline] smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1146 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:61 Code: 68 73 c5 f9 eb 8a cc cc cc cc cc cc e9 07 00 00 00 0f 00 2d 94 be 59 00 f4 c3 66 90 e9 07 00 00 00 0f 00 2d 84 be 59 00 fb f4 cc 55 48 89 e5 41 57 41 56 41 55 41 54 53 e8 de 2a 74 f9 e8 09 RSP: 0018:ffffc90000d3fd68 EFLAGS: 00000282 ORIG_RAX: ffffffffffffff13 RAX: 1ffffffff136761a RBX: ffff8880a99fc340 RCX: 0000000000000000 RDX: dffffc0000000000 RSI: 0000000000000006 RDI: ffff8880a99fcbd4 RBP: ffffc90000d3fd98 R08: ffff8880a99fc340 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: dffffc0000000000 R13: ffffffff8aa5a1c0 R14: 0000000000000000 R15: 0000000000000001 arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:686 default_idle_call+0x84/0xb0 kernel/sched/idle.c:94 cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x3c8/0x6e0 kernel/sched/idle.c:269 cpu_startup_entry+0x1b/0x20 kernel/sched/idle.c:361 start_secondary+0x2f4/0x410 arch/x86/kernel/smpboot.c:264 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:242 Allocated by task 10229: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:515 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:488 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529 __do_kmalloc_node mm/slab.c:3616 [inline] __kmalloc_node+0x4e/0x70 mm/slab.c:3623 kmalloc_node include/linux/slab.h:578 [inline] kvmalloc_node+0x68/0x100 mm/util.c:574 kvmalloc include/linux/mm.h:645 [inline] kvzalloc include/linux/mm.h:653 [inline] alloc_netdev_mqs+0x98/0xe40 net/core/dev.c:9797 rtnl_create_link+0x22d/0xaf0 net/core/rtnetlink.c:3047 __rtnl_newlink+0xf9f/0x1790 net/core/rtnetlink.c:3309 rtnl_newlink+0x69/0xa0 net/core/rtnetlink.c:3377 rtnetlink_rcv_msg+0x45e/0xaf0 net/core/rtnetlink.c:5438 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5456 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x59e/0x7e0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 __sys_sendto+0x262/0x380 net/socket.c:1998 __do_compat_sys_socketcall net/compat.c:771 [inline] __se_compat_sys_socketcall net/compat.c:719 [inline] __ia32_compat_sys_socketcall+0x530/0x710 net/compat.c:719 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x27b/0xe16 arch/x86/entry/common.c:408 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 10229: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:476 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 __netdev_name_node_alt_destroy+0x1ff/0x2a0 net/core/dev.c:322 netdev_name_node_alt_destroy+0x57/0x80 net/core/dev.c:334 rtnl_alt_ifname net/core/rtnetlink.c:3518 [inline] rtnl_linkprop.isra.0+0x575/0x6f0 net/core/rtnetlink.c:3567 rtnl_dellinkprop+0x46/0x60 net/core/rtnetlink.c:3588 rtnetlink_rcv_msg+0x45e/0xaf0 net/core/rtnetlink.c:5438 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5456 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x59e/0x7e0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 ____sys_sendmsg+0x753/0x880 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmsg+0x105/0x1d0 net/socket.c:2430 __compat_sys_sendmsg net/compat.c:642 [inline] __do_compat_sys_sendmsg net/compat.c:649 [inline] __se_compat_sys_sendmsg net/compat.c:646 [inline] __ia32_compat_sys_sendmsg+0x7a/0xb0 net/compat.c:646 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline] do_fast_syscall_32+0x27b/0xe16 arch/x86/entry/common.c:408 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 The buggy address belongs to the object at ffff88809886c000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 1416 bytes inside of 4096-byte region [ffff88809886c000, ffff88809886d000) The buggy address belongs to the page: page:ffffea0002621b00 refcount:1 mapcount:0 mapping:ffff8880aa402000 index:0x0 compound_mapcount: 0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea0002610d08 ffffea0002607608 ffff8880aa402000 raw: 0000000000000000 ffff88809886c000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809886c480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809886c500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809886c580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809886c600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809886c680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb Fixes: 36fbf1e52bd3 ("net: rtnetlink: add linkprop commands to add and delete alternative ifnames") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Jiri Pirko Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 0b634c0e73450342c84ceef34547e23a77946948 Merge: 4e867c9a50ff 5a292c89a84d Author: David S. Miller Date: Sun Feb 16 19:03:40 2020 -0800 Merge branch 'atlantic-fixes' Igor Russkikh says: ==================== Marvell atlantic 2020/02 updates Hi David, here is another set of bugfixes on AQC family found on last integration phase. ==================== Signed-off-by: David S. Miller commit 5a292c89a84d49b598f8978f154bdda48b1072c0 Author: Dmitry Bogdanov Date: Fri Feb 14 18:44:58 2020 +0300 net: atlantic: fix out of range usage of active_vlans array fix static checker warning: drivers/net/ethernet/aquantia/atlantic/aq_filters.c:166 aq_check_approve_fvlan() error: passing untrusted data to 'test_bit()' Reported-by: Dan Carpenter Fixes: 7975d2aff5af: ("net: aquantia: add support of rx-vlan-filter offload") Signed-off-by: Dmitry Bogdanov Signed-off-by: David S. Miller commit 52a22f4d6ff95e8bdca557765c04893eb5dd83fd Author: Pavel Belous Date: Fri Feb 14 18:44:57 2020 +0300 net: atlantic: possible fault in transition to hibernation during hibernation freeze, aq_nic_stop could be invoked on a stopped device. That may cause panic on access to not yet allocated vector/ring structures. Add a check to stop device if it is not yet stopped. Similiarly after freeze in hibernation thaw, aq_nic_start could be invoked on a not initialized net device. Result will be the same. Add a check to start device if it is initialized. In our case, this is the same as started. Fixes: 8aaa112a57c1 ("net: atlantic: refactoring pm logic") Signed-off-by: Pavel Belous Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: Dmitry Bogdanov Signed-off-by: David S. Miller commit 380ec5b9af7f0d57dbf6ac067fd9f33cff2fef71 Author: Pavel Belous Date: Fri Feb 14 18:44:56 2020 +0300 net: atlantic: fix potential error handling Code inspection found that in case of mapping error we do return current 'ret' value. But beside error, it is used to count number of descriptors allocated for the packet. In that case map_skb function could return '1'. Changing it to return zero (number of mapped descriptors for skb) Fixes: 018423e90bee ("net: ethernet: aquantia: Add ring support code") Signed-off-by: Pavel Belous Signed-off-by: Igor Russkikh Signed-off-by: Dmitry Bogdanov Signed-off-by: David S. Miller commit a4980919ad6a7be548d499bc5338015e1a9191c6 Author: Pavel Belous Date: Fri Feb 14 18:44:55 2020 +0300 net: atlantic: fix use after free kasan warn skb->len is used to calculate statistics after xmit invocation. Under a stress load it may happen that skb will be xmited, rx interrupt will come and skb will be freed, all before xmit function is even returned. Eventually, skb->len will access unallocated area. Moving stats calculation into tx_clean routine. Fixes: 018423e90bee ("net: ethernet: aquantia: Add ring support code") Reported-by: Christophe Vu-Brugier Signed-off-by: Igor Russkikh Signed-off-by: Pavel Belous Signed-off-by: Dmitry Bogdanov Signed-off-by: David S. Miller commit b42726fcf76e9367e524392e0ead7e672cc0791c Author: Nikita Danilov Date: Fri Feb 14 18:44:54 2020 +0300 net: atlantic: better loopback mode handling Add checks to not enable multiple loopback modes simultaneously, It was also discovered that for dma loopback to function correctly promisc mode should be enabled on device. Fixes: ea4b4d7fc106 ("net: atlantic: loopback tests via private flags") Signed-off-by: Nikita Danilov Signed-off-by: Igor Russkikh Signed-off-by: Dmitry Bogdanov Signed-off-by: David S. Miller commit f08a464c27ca0a4050333baa271504b27ce834b7 Author: Egor Pomozov Date: Fri Feb 14 18:44:53 2020 +0300 net: atlantic: ptp gpio adjustments Clock adjustment data should be passed to FW as well, otherwise in some cases a drift was observed when using GPIO features. Signed-off-by: Egor Pomozov Signed-off-by: Igor Russkikh Signed-off-by: Dmitry Bogdanov Signed-off-by: David S. Miller commit e7b5f97e6574dc4918e375d5f8d24ec31653cd6d Author: Igor Russkikh Date: Fri Feb 14 18:44:52 2020 +0300 net: atlantic: check rpc result and wait for rpc address Artificial HW reliability tests revealed a possible hangup in the driver. Normally, when device disappears from bus, all register reads returns 0xFFFFFFFF. At remote procedure invocation towards FW there is a logic where result is compared with -1 in a loop. That caused an infinite loop if hardware due to some issues disappears from bus. Add extra result checks to prevent this. Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 15beab0a9d797be1b7c67458da007a62269be29a Author: Dmitry Bezrukov Date: Fri Feb 14 18:44:51 2020 +0300 net: atlantic: checksum compat issue Yet another checksum offload compatibility issue was found. The known issue is that AQC HW marks tcp packets with 0xFFFF checksum as invalid (1). This is workarounded in driver, passing all the suspicious packets up to the stack for further csum validation. Another HW problem (2) is that it hides invalid csum of LRO aggregated packets inside of the individual descriptors. That was workarounded by forced scan of all LRO descriptors for checksum errors. However the scan logic was joint for both LRO and multi-descriptor packets (jumbos). And this causes the issue. We have to drop LRO packets with the detected bad checksum because of (2), but we have to pass jumbo packets to stack because of (1). When using windows tcp partner with jumbo frames but with LSO disabled driver discards such frames as bad checksummed. But only LRO frames should be dropped, not jumbos. On such a configurations tcp stream have a chance of drops and stucks. (1) 76f254d4afe2 ("net: aquantia: tcp checksum 0xffff being handled incorrectly") (2) d08b9a0a3ebd ("net: aquantia: do not pass lro session with invalid tcp checksum") Fixes: d08b9a0a3ebd ("net: aquantia: do not pass lro session with invalid tcp checksum") Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh Signed-off-by: Dmitry Bogdanov Signed-off-by: David S. Miller commit 4e867c9a50ff1a07ed0b86c3b1c8bc773933d728 Author: Hangbin Liu Date: Thu Feb 13 17:40:54 2020 +0800 selftests: forwarding: vxlan_bridge_1d: fix tos value After commit 71130f29979c ("vxlan: fix tos value before xmit") we start strict vxlan xmit tos value by RT_TOS(), which limits the tos value less than 0x1E. With current value 0x40 the test will failed with "v1: Expected to capture 10 packets, got 0". So let's choose a smaller tos value for testing. Fixes: d417ecf533fe ("selftests: forwarding: vxlan_bridge_1d: Add a TOS test") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 44bfa9c5e5f06c72540273813e4c66beb5a8c213 Author: Eric Dumazet Date: Wed Feb 12 20:58:26 2020 -0800 net: rtnetlink: fix bugs in rtnl_alt_ifname() Since IFLA_ALT_IFNAME is an NLA_STRING, we have no guarantee it is nul terminated. We should use nla_strdup() instead of kstrdup(), since this helper will make sure not accessing out-of-bounds data. BUG: KMSAN: uninit-value in strlen+0x5e/0xa0 lib/string.c:535 CPU: 1 PID: 19157 Comm: syz-executor.5 Not tainted 5.5.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x220 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215 strlen+0x5e/0xa0 lib/string.c:535 kstrdup+0x7f/0x1a0 mm/util.c:59 rtnl_alt_ifname net/core/rtnetlink.c:3495 [inline] rtnl_linkprop+0x85d/0xc00 net/core/rtnetlink.c:3553 rtnl_newlinkprop+0x9d/0xb0 net/core/rtnetlink.c:3568 rtnetlink_rcv_msg+0x1153/0x1570 net/core/rtnetlink.c:5424 netlink_rcv_skb+0x451/0x650 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:5442 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0xf9e/0x1100 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x1248/0x14d0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg net/socket.c:659 [inline] ____sys_sendmsg+0x12b6/0x1350 net/socket.c:2330 ___sys_sendmsg net/socket.c:2384 [inline] __sys_sendmsg+0x451/0x5f0 net/socket.c:2417 __do_sys_sendmsg net/socket.c:2426 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2424 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2424 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45b3b9 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ff1c7b1ac78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007ff1c7b1b6d4 RCX: 000000000045b3b9 RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000009cb R14: 00000000004cb3dd R15: 000000000075bf2c Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline] kmsan_internal_poison_shadow+0x66/0xd0 mm/kmsan/kmsan.c:127 kmsan_slab_alloc+0x8a/0xe0 mm/kmsan/kmsan_hooks.c:82 slab_alloc_node mm/slub.c:2774 [inline] __kmalloc_node_track_caller+0xb40/0x1200 mm/slub.c:4382 __kmalloc_reserve net/core/skbuff.c:141 [inline] __alloc_skb+0x2fd/0xac0 net/core/skbuff.c:209 alloc_skb include/linux/skbuff.h:1049 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1174 [inline] netlink_sendmsg+0x7d3/0x14d0 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg net/socket.c:659 [inline] ____sys_sendmsg+0x12b6/0x1350 net/socket.c:2330 ___sys_sendmsg net/socket.c:2384 [inline] __sys_sendmsg+0x451/0x5f0 net/socket.c:2417 __do_sys_sendmsg net/socket.c:2426 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2424 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2424 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 36fbf1e52bd3 ("net: rtnetlink: add linkprop commands to add and delete alternative ifnames") Signed-off-by: Eric Dumazet Cc: Jiri Pirko Reported-by: syzbot Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit e6a41c23df0d5da01540d2abef41591589c0b4be Author: Alexandre Belloni Date: Wed Feb 12 17:45:38 2020 +0100 net: macb: ensure interface is not suspended on at91rm9200 Because of autosuspend, at91ether_start is called with clocks disabled. Ensure that pm_runtime doesn't suspend the interface as soon as it is opened as there is no pm_runtime support is the other relevant parts of the platform support for at91rm9200. Fixes: d54f89af6cc4 ("net: macb: Add pm runtime support") Signed-off-by: Alexandre Belloni Reviewed-by: Claudiu Beznea Acked-by: Nicolas Ferre Signed-off-by: David S. Miller commit 540e585a79e9d643ede077b73bcc7aa2d7b4d919 Author: Jethro Beekman Date: Wed Feb 12 16:43:41 2020 +0100 net: fib_rules: Correctly set table field when table number exceeds 8 bits In 709772e6e06564ed94ba740de70185ac3d792773, RT_TABLE_COMPAT was added to allow legacy software to deal with routing table numbers >= 256, but the same change to FIB rule queries was overlooked. Signed-off-by: Jethro Beekman Signed-off-by: David S. Miller commit 0d4597c8c5abdeeaf50774066c16683f30184dc8 Author: Leon Romanovsky Date: Tue Feb 11 19:03:55 2020 -0800 net/rds: Track user mapped pages through special API Convert net/rds to use the newly introduces pin_user_pages() API, which properly sets FOLL_PIN. Setting FOLL_PIN is now required for code that requires tracking of pinned pages. Note that this effectively changes the code's behavior: it now ultimately calls set_page_dirty_lock(), instead of set_page_dirty(). This is probably more accurate. As Christoph Hellwig put it, "set_page_dirty() is only safe if we are dealing with a file backed page where we have reference on the inode it hangs off." [1] [1] https://lore.kernel.org/r/20190723153640.GB720@lst.de Cc: Hans Westgaard Ry Cc: Santosh Shilimkar Signed-off-by: Leon Romanovsky Signed-off-by: John Hubbard Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller commit afecdb376bd81d7e16578f0cfe82a1aec7ae18f3 Author: Benjamin Poirier Date: Wed Feb 12 10:41:07 2020 +0900 ipv6: Fix nlmsg_flags when splitting a multipath route When splitting an RTA_MULTIPATH request into multiple routes and adding the second and later components, we must not simply remove NLM_F_REPLACE but instead replace it by NLM_F_CREATE. Otherwise, it may look like the netlink message was malformed. For example, ip route add 2001:db8::1/128 dev dummy0 ip route change 2001:db8::1/128 nexthop via fe80::30:1 dev dummy0 \ nexthop via fe80::30:2 dev dummy0 results in the following warnings: [ 1035.057019] IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE [ 1035.057517] IPv6: NLM_F_CREATE should be set when creating new route This patch makes the nlmsg sequence look equivalent for __ip6_ins_rt() to what it would get if the multipath route had been added in multiple netlink operations: ip route add 2001:db8::1/128 dev dummy0 ip route change 2001:db8::1/128 nexthop via fe80::30:1 dev dummy0 ip route append 2001:db8::1/128 nexthop via fe80::30:2 dev dummy0 Fixes: 27596472473a ("ipv6: fix ECMP route replacement") Signed-off-by: Benjamin Poirier Reviewed-by: Michal Kubecek Reviewed-by: David Ahern Signed-off-by: David S. Miller commit e404b8c7cfb31654c9024d497cec58a501501692 Author: Benjamin Poirier Date: Wed Feb 12 10:41:06 2020 +0900 ipv6: Fix route replacement with dev-only route After commit 27596472473a ("ipv6: fix ECMP route replacement") it is no longer possible to replace an ECMP-able route by a non ECMP-able route. For example, ip route add 2001:db8::1/128 via fe80::1 dev dummy0 ip route replace 2001:db8::1/128 dev dummy0 does not work as expected. Tweak the replacement logic so that point 3 in the log of the above commit becomes: 3. If the new route is not ECMP-able, and no matching non-ECMP-able route exists, replace matching ECMP-able route (if any) or add the new route. We can now summarize the entire replace semantics to: When doing a replace, prefer replacing a matching route of the same "ECMP-able-ness" as the replace argument. If there is no such candidate, fallback to the first route found. Fixes: 27596472473a ("ipv6: fix ECMP route replacement") Signed-off-by: Benjamin Poirier Reviewed-by: Michal Kubecek Signed-off-by: David S. Miller commit e8023b030ce1748930e2dc76353a262fe47d4745 Author: Hangbin Liu Date: Tue Feb 11 15:32:56 2020 +0800 selftests: forwarding: use proto icmp for {gretap, ip6gretap}_mac testing For tc ip_proto filter, when we extract the flow via __skb_flow_dissect() without flag FLOW_DISSECTOR_F_STOP_AT_ENCAP, we will continue extract to the inner proto. So for GRE + ICMP messages, we should not track GRE proto, but inner ICMP proto. For test mirror_gre.sh, it may make user confused if we capture ICMP message on $h3(since the flow is GRE message). So I move the capture dev to h3-gt{4,6}, and only capture ICMP message. Before the fix: ]# ./mirror_gre.sh TEST: ingress mirror to gretap (skip_hw) [ OK ] TEST: egress mirror to gretap (skip_hw) [ OK ] TEST: ingress mirror to ip6gretap (skip_hw) [ OK ] TEST: egress mirror to ip6gretap (skip_hw) [ OK ] TEST: ingress mirror to gretap: envelope MAC (skip_hw) [FAIL] Expected to capture 10 packets, got 0. TEST: egress mirror to gretap: envelope MAC (skip_hw) [FAIL] Expected to capture 10 packets, got 0. TEST: ingress mirror to ip6gretap: envelope MAC (skip_hw) [FAIL] Expected to capture 10 packets, got 0. TEST: egress mirror to ip6gretap: envelope MAC (skip_hw) [FAIL] Expected to capture 10 packets, got 0. TEST: two simultaneously configured mirrors (skip_hw) [ OK ] WARN: Could not test offloaded functionality After fix: ]# ./mirror_gre.sh TEST: ingress mirror to gretap (skip_hw) [ OK ] TEST: egress mirror to gretap (skip_hw) [ OK ] TEST: ingress mirror to ip6gretap (skip_hw) [ OK ] TEST: egress mirror to ip6gretap (skip_hw) [ OK ] TEST: ingress mirror to gretap: envelope MAC (skip_hw) [ OK ] TEST: egress mirror to gretap: envelope MAC (skip_hw) [ OK ] TEST: ingress mirror to ip6gretap: envelope MAC (skip_hw) [ OK ] TEST: egress mirror to ip6gretap: envelope MAC (skip_hw) [ OK ] TEST: two simultaneously configured mirrors (skip_hw) [ OK ] WARN: Could not test offloaded functionality Fixes: ba8d39871a10 ("selftests: forwarding: Add test for mirror to gretap") Signed-off-by: Hangbin Liu Reviewed-by: Petr Machata Tested-by: Petr Machata Signed-off-by: David S. Miller commit a4031afb9d10d97f4d0285844abbc0ab04245304 Author: Christophe Leroy Date: Sun Feb 9 18:14:42 2020 +0000 powerpc/8xx: Fix clearing of bits 20-23 in ITLB miss In ITLB miss handled the line supposed to clear bits 20-23 on the L2 ITLB entry is buggy and does indeed nothing, leading to undefined value which could allow execution when it shouldn't. Properly do the clearing with the relevant instruction. Fixes: 74fabcadfd43 ("powerpc/8xx: don't use r12/SPRN_SPRG_SCRATCH2 in TLB Miss handlers") Cc: stable@vger.kernel.org # v5.0+ Signed-off-by: Christophe Leroy Reviewed-by: Leonardo Bras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4f70c2778163affce8508a210f65d140e84524b4.1581272050.git.christophe.leroy@c-s.fr commit 50a175dd18de7a647e72aca7daf4744e3a5a81e3 Author: Christophe Leroy Date: Sun Feb 9 16:02:41 2020 +0000 powerpc/hugetlb: Fix 8M hugepages on 8xx With HW assistance all page tables must be 4k aligned, the 8xx drops the last 12 bits during the walk. Redefine HUGEPD_SHIFT_MASK to mask last 12 bits out. HUGEPD_SHIFT_MASK is used to for alignment of page table cache. Fixes: 22569b881d37 ("powerpc/8xx: Enable 8M hugepage support with HW assistance") Cc: stable@vger.kernel.org # v5.0+ Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/778b1a248c4c7ca79640eeff7740044da6a220a0.1581264115.git.christophe.leroy@c-s.fr commit f2b67ef90b0d5eca0f2255e02cf2f620bc0ddcdb Author: Christophe Leroy Date: Thu Feb 6 13:50:28 2020 +0000 powerpc/hugetlb: Fix 512k hugepages on 8xx with 16k page size Commit 55c8fc3f4930 ("powerpc/8xx: reintroduce 16K pages with HW assistance") redefined pte_t as a struct of 4 pte_basic_t, because in 16K pages mode there are four identical entries in the page table. But the size of hugepage tables is calculated based of the size of (void *). Therefore, we end up with page tables of size 1k instead of 4k for 512k pages. As 512k hugepage tables are the same size as standard page tables, ie 4k, use the standard page tables instead of PGT_CACHE tables. Fixes: 3fb69c6a1a13 ("powerpc/8xx: Enable 512k hugepage support with HW assistance") Cc: stable@vger.kernel.org # v5.0+ Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/90ec56a2315be602494619ed0223bba3b0b8d619.1580997007.git.christophe.leroy@c-s.fr commit d4f194ed9eb9841a8f978710e4d24296f791a85b Author: Sam Bobroff Date: Fri Feb 7 15:57:31 2020 +1100 powerpc/eeh: Fix deadlock handling dead PHB Recovering a dead PHB can currently cause a deadlock as the PCI rescan/remove lock is taken twice. This is caused as part of an existing bug in eeh_handle_special_event(). The pe is processed while traversing the PHBs even though the pe is unrelated to the loop. This causes the pe to be, incorrectly, processed more than once. Untangling this section can move the pe processing out of the loop and also outside the locked section, correcting both problems. Fixes: 2e25505147b8 ("powerpc/eeh: Fix crash when edev->pdev changes") Cc: stable@vger.kernel.org # 5.4+ Signed-off-by: Sam Bobroff Reviewed-by: Frederic Barrat Tested-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0547e82dbf90ee0729a2979a8cac5c91665c621f.1581051445.git.sbobroff@linux.ibm.com commit 11a48a5a18c63fd7621bb050228cebf13566e4d8 Author: Linus Torvalds Date: Sun Feb 16 13:16:59 2020 -0800 Linux 5.6-rc2 commit ab02b61f24c76b1659086fcc8b00cbeeb6e95ac7 Merge: 44024adb4aab e0354d147e58 Author: Linus Torvalds Date: Sun Feb 16 13:05:46 2020 -0800 Merge tag 'for-linus-5.6-1' of https://github.com/cminyard/linux-ipmi Pull IPMI update from Corey Minyard: "Minor bug fixes for IPMI I know this is late; I've been travelling and, well, I've been distracted. This is just a few bug fixes and adding i2c support to the IPMB driver, which is something I wanted from the beginning for it" * tag 'for-linus-5.6-1' of https://github.com/cminyard/linux-ipmi: drivers: ipmi: fix off-by-one bounds check that leads to a out-of-bounds write ipmi:ssif: Handle a possible NULL pointer reference drivers: ipmi: Modify max length of IPMB packet drivers: ipmi: Support raw i2c packet in IPMB commit 44024adb4aabefd275c6f9c00cac323473447dd5 Merge: b982df72ef84 120881b9e888 Author: Linus Torvalds Date: Sun Feb 16 13:01:42 2020 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "Bugfixes and improvements to selftests. On top of this, Mauro converted the KVM documentation to rst format, which was very welcome" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (44 commits) docs: virt: guest-halt-polling.txt convert to ReST docs: kvm: review-checklist.txt: rename to ReST docs: kvm: Convert timekeeping.txt to ReST format docs: kvm: Convert s390-diag.txt to ReST format docs: kvm: Convert ppc-pv.txt to ReST format docs: kvm: Convert nested-vmx.txt to ReST format docs: kvm: Convert mmu.txt to ReST format docs: kvm: Convert locking.txt to ReST format docs: kvm: Convert hypercalls.txt to ReST format docs: kvm: arm/psci.txt: convert to ReST docs: kvm: convert arm/hyp-abi.txt to ReST docs: kvm: Convert api.txt to ReST format docs: kvm: convert devices/xive.txt to ReST docs: kvm: convert devices/xics.txt to ReST docs: kvm: convert devices/vm.txt to ReST docs: kvm: convert devices/vfio.txt to ReST docs: kvm: convert devices/vcpu.txt to ReST docs: kvm: convert devices/s390_flic.txt to ReST docs: kvm: convert devices/mpic.txt to ReST docs: kvm: convert devices/arm-vgit.txt to ReST ... commit b982df72ef8404de99597f1d956b6137533b429a Merge: e29c6a13ddf5 4d59588c09f2 Author: Linus Torvalds Date: Sun Feb 16 12:49:36 2020 -0800 Merge tag 'edac_urgent_for_5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC fixes from Borislav Petkov: "Two fixes for use-after-free and memory leaking in the EDAC core, by Robert Richter. Debug options like DEBUG_TEST_DRIVER_REMOVE, KASAN and DEBUG_KMEMLEAK unearthed issues with the lifespan of memory allocated by the EDAC memory controller descriptor due to misdesigned memory freeing, done partially by the EDAC core *and* the driver core, which is problematic to say the least. These two are minimal fixes to take care of stable - a proper rework is following which cleans up that mess properly" * tag 'edac_urgent_for_5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/sysfs: Remove csrow objects on errors EDAC/mc: Fix use-after-free and memleaks during device removal commit e29c6a13ddf56217563f03fbc6ba9bb72dcbf2e4 Merge: 713db3560410 f25372ffc3f6 Author: Linus Torvalds Date: Sun Feb 16 12:35:52 2020 -0800 Merge tag 'block-5.6-2020-02-16' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "Not a lot here, which is great, basically just three small bcache fixes from Coly, and four NVMe fixes via Keith" * tag 'block-5.6-2020-02-16' of git://git.kernel.dk/linux-block: nvme: fix the parameter order for nvme_get_log in nvme_get_fw_slot_info nvme/pci: move cqe check after device shutdown nvme: prevent warning triggered by nvme_stop_keep_alive nvme/tcp: fix bug on double requeue when send fails bcache: remove macro nr_to_fifo_front() bcache: Revert "bcache: shrink btree node cache after bch_btree_check()" bcache: ignore pending signals when creating gc and allocator thread commit 713db356041071d16360e82247de3107ec9ed57f Merge: 288b27a06e4f 1b9867eb6120 Author: Linus Torvalds Date: Sun Feb 16 11:43:45 2020 -0800 Merge tag 'for-5.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Two races fixed, memory leak fix, sysfs directory fixup and two new log messages: - two fixed race conditions: extent map merging and truncate vs fiemap - create the right sysfs directory with device information and move the individual device dirs under it - print messages when the tree-log is replayed at mount time or cannot be replayed on remount" * tag 'for-5.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: sysfs, move device id directories to UUID/devinfo btrfs: sysfs, add UUID/devinfo kobject Btrfs: fix race between shrinking truncate and fiemap btrfs: log message when rw remount is attempted with unclean tree-log btrfs: print message when tree-log replay starts Btrfs: fix race between using extent maps and merging them btrfs: ref-verify: fix memory leaks commit 288b27a06e4f8f7bad63792cf015c160ae578d89 Merge: 8a8b80967b42 85db6b7ae65f Author: Linus Torvalds Date: Sun Feb 16 11:41:29 2020 -0800 Merge tag '5.6-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Four small CIFS/SMB3 fixes. One (the EA overflow fix) for stable" * tag '5.6-rc1-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: make sure we do not overflow the max EA buffer size cifs: enable change notification for SMB2.1 dialect cifs: Fix mode output in debugging statements cifs: fix mount option display for sec=krb5i commit 8a8b80967b421218d89c1af61e759c54ab94fdb6 Merge: db70e26e33ee d65d87a07476 Author: Linus Torvalds Date: Sun Feb 16 11:12:06 2020 -0800 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 (all stable fodder)" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: improve explanation of a mount failure caused by a misconfigured kernel jbd2: do not clear the BH_Mapped flag when forgetting a metadata buffer jbd2: move the clearing of b_modified flag to the journal_unmap_buffer() ext4: add cond_resched() to ext4_protect_reserved_inode ext4: fix checksum errors with indexed dirs ext4: fix support for inode sizes > 1024 bytes ext4: simplify checking quota limits in ext4_statfs() ext4: don't assume that mmp_nodename/bdevname have NUL commit 7fbeb95d0f68e21e6ca61284f1ac681630976947 Author: Pavel Begunkov Date: Sun Feb 16 01:01:18 2020 +0300 io_uring: add missing io_req_cancelled() fallocate_finish() is missing cancellation check. Add it. It's safe to do that, as only flags setup and sqe fields copy are done before it gets into __io_fallocate(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit db70e26e33eef1b148ca1c9f50de92203ec7e82e Merge: 54654e142d9e 3dbae1553897 Author: Linus Torvalds Date: Sat Feb 15 16:49:25 2020 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - a few drivers have been updated to use flexible-array syntax instead of GCC extension - ili210x touchscreen driver now supports the 2120 protocol flavor - a couple more of Synaptics devices have been switched over to RMI4 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: cyapa - replace zero-length array with flexible-array member Input: tca6416-keypad - replace zero-length array with flexible-array member Input: gpio_keys_polled - replace zero-length array with flexible-array member Input: synaptics - remove the LEN0049 dmi id from topbuttonpad list Input: synaptics - enable SMBus on ThinkPad L470 Input: synaptics - switch T470s to RMI4 by default Input: gpio_keys - replace zero-length array with flexible-array member Input: goldfish_events - replace zero-length array with flexible-array member Input: psmouse - switch to using i2c_new_scanned_device() Input: ili210x - add ili2120 support Input: ili210x - fix return value of is_visible function commit 54654e142d9ed3f7382767d6da769a2887888a75 Merge: b719ae070ee2 685eff513183 Author: Linus Torvalds Date: Sat Feb 15 16:38:49 2020 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "Not too much going on here, though there are about four fixes related to stuff merged during the last merge window. We also see the return of a syzkaller instance with access to RDMA devices, and a few bugs detected by that squished. - Fix three crashers and a memory memory leak for HFI1 - Several bugs found by syzkaller - A bug fix for the recent QP counters feature on older mlx5 HW - Locking inversion in cxgb4 - Unnecessary WARN_ON in siw - A umad crasher regression during unload, from a bug fix for something else - Bugs introduced in the merge window: - Missed list_del in uverbs file rework, core and mlx5 devx - Unexpected integer math truncation in the mlx5 VAR patches - Compilation bug fix for the VAR patches on 32 bit" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: IB/mlx5: Use div64_u64 for num_var_hw_entries calculation RDMA/core: Fix protection fault in get_pkey_idx_qp_list RDMA/rxe: Fix soft lockup problem due to using tasklets in softirq RDMA/mlx5: Prevent overflow in mmap offset calculations IB/umad: Fix kernel crash while unloading ib_umad RDMA/mlx5: Fix async events cleanup flows RDMA/core: Add missing list deletion on freeing event queue RDMA/siw: Remove unwanted WARN_ON in siw_cm_llp_data_ready() RDMA/iw_cxgb4: initiate CLOSE when entering TERM IB/mlx5: Return failure when rts2rts_qp_counters_set_id is not supported RDMA/core: Fix invalid memory access in spec_filter_size IB/rdmavt: Reset all QPs when the device is shut down IB/hfi1: Close window for pq and request coliding IB/hfi1: Acquire lock to release TID entries when user file is closed RDMA/hfi1: Fix memory leak in _dev_comp_vect_mappings_create commit b719ae070ee2371c37d846616ef7453ec6811990 Merge: 3e71e1214b66 3bf3c9744694 Author: Linus Torvalds Date: Sat Feb 15 13:16:47 2020 -0800 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Olof Johansson: "A handful of fixes that have come in since the merge window: - Fix of PCI interrupt map on arm64 fast model (SW emulator) - Fixlet for sound on ST platforms and a small cleanup of deprecated DT properties - A stack buffer overflow fix for moxtet - Fuse driver build fix for Tegra194 - A few config updates to turn on new drivers merged this cycle" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: bus: moxtet: fix potential stack buffer overflow soc/tegra: fuse: Fix build with Tegra194 configuration ARM: dts: sti: fixup sound frame-inversion for stihxxx-b2120.dtsi ARM: dts: sti: Remove deprecated snps PHY properties for stih410-b2260 arm64: defconfig: Enable DRM_SUN6I_DSI arm64: defconfig: Enable CONFIG_SUN8I_THERMAL ARM: sunxi: Enable CONFIG_SUN8I_THERMAL arm64: defconfig: Set bcm2835-dma as built-in ARM: configs: Cleanup old Kconfig options ARM: npcm: Bring back GPIOLIB support arm64: dts: fast models: Fix FVP PCI interrupt-map property commit 3e71e1214b6643faf90157e6655a86227938b080 Merge: bd516133cc90 c7ff8573ad21 Author: Linus Torvalds Date: Sat Feb 15 13:10:38 2020 -0800 Merge tag 's390-5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Vasily Gorbik: - Enable paes-s390 cipher selftests in testmgr (acked-by Herbert Xu). - Fix protected key length update in PKEY_SEC2PROTK ioctl and increase card/queue requests counter to 64-bit in crypto code. - Fix clang warning in get_tod_clock. - Fix ultravisor info length extensions handling. - Fix style of SPDX License Identifier in vfio-ccw. - Avoid unnecessary GFP_ATOMIC and simplify ACK tracking in qdio. * tag 's390-5.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: crypto/testmgr: enable selftests for paes-s390 ciphers s390/time: Fix clk type in get_tod_clock s390/uv: Fix handling of length extensions s390/qdio: don't allocate *aob array with GFP_ATOMIC s390/qdio: simplify ACK tracking s390/zcrypt: fix card and queue total counter wrap s390/pkey: fix missing length of protected key on return vfio-ccw: Use the correct style for SPDX License Identifier commit bd516133cc9067ef52518e1c9497c46cb8424ea9 Merge: ef78e5b7de5d 205447fa9e0a Author: Linus Torvalds Date: Sat Feb 15 13:03:50 2020 -0800 Merge tag 'hwmon-for-v5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "Fix compatible string typos in the xdpe12284 driver, and a wrong bit value in the ltc2978 driver" * tag 'hwmon-for-v5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (pmbus/xdpe12284) fix typo in compatible strings hwmon: (pmbus/ltc2978) Fix PMBus polling of MFR_COMMON definitions. commit ef78e5b7de5da49769c337a17dcff7d4e82ee6cd Merge: da99f9355b53 e9f5490c3574 Author: Linus Torvalds Date: Sat Feb 15 12:51:22 2020 -0800 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Misc fixes all over the place: - Fix NUMA over-balancing between lightly loaded nodes. This is fallout of the big load-balancer rewrite. - Fix the NOHZ remote loadavg update logic, which fixes anomalies like reported 150 loadavg on mostly idle CPUs. - Fix XFS performance/scalability - Fix throttled groups unbound task-execution bug - Fix PSI procfs boundary condition - Fix the cpu.uclamp.{min,max} cgroup configuration write checks - Fix DocBook annotations - Fix RCU annotations - Fix overly CPU-intensive housekeeper CPU logic loop on large CPU counts" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix kernel-doc warning in attach_entity_load_avg() sched/core: Annotate curr pointer in rq with __rcu sched/psi: Fix OOB write when writing 0 bytes to PSI files sched/fair: Allow a per-CPU kthread waking a task to stack on the same CPU, to fix XFS performance regression sched/fair: Prevent unlimited runtime on throttled group sched/nohz: Optimize get_nohz_timer_target() sched/uclamp: Reject negative values in cpu_uclamp_write() sched/fair: Allow a small load imbalance between low utilisation SD_NUMA domains timers/nohz: Update NOHZ load in remote tick sched/core: Don't skip remote tick for idle CPUs commit bef8e2dfceed6daeb6ca3e8d33f9c9d43b926580 Author: Christophe JAILLET Date: Sun Feb 2 21:19:22 2020 +0100 MIPS: VPE: Fix a double free and a memory leak in 'release_vpe()' Pointer on the memory allocated by 'alloc_progmem()' is stored in 'v->load_addr'. So this is this memory that should be freed by 'release_progmem()'. 'release_progmem()' is only a call to 'kfree()'. With the current code, there is both a double free and a memory leak. Fix it by passing the correct pointer to 'release_progmem()'. Fixes: e01402b115ccc ("More AP / SP bits for the 34K, the Malta bits and things. Still wants") Signed-off-by: Christophe JAILLET Signed-off-by: Paul Burton Cc: ralf@linux-mips.org Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: kernel-janitors@vger.kernel.org commit 97e914b7de3c943011779b979b8093fdc0d85722 Author: Mark Tomlinson Date: Wed Feb 12 10:24:55 2020 +1300 MIPS: cavium_octeon: Fix syncw generation. The Cavium Octeon CPU uses a special sync instruction for implementing wmb, and due to a CPU bug, the instruction must appear twice. A macro had been defined to hide this: #define __SYNC_rpt(type) (1 + (type == __SYNC_wmb)) which was intended to evaluate to 2 for __SYNC_wmb, and 1 for any other type of sync. However, this expression is evaluated by the assembler, and not the compiler, and the result of '==' in the assembler is 0 or -1, not 0 or 1 as it is in C. The net result was wmb() producing no code at all. The simple fix in this patch is to change the '+' to '-'. Fixes: bf92927251b3 ("MIPS: barrier: Add __SYNC() infrastructure") Signed-off-by: Mark Tomlinson Tested-by: Chris Packham Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 976c23af3ee5bd3447a7bfb6c356ceb4acf264a6 Author: Victor Kamensky Date: Tue Feb 11 11:24:34 2020 -0800 mips: vdso: add build time check that no 'jalr t9' calls left vdso shared object cannot have GOT based PIC 'jalr t9' calls because nobody set GOT table in vdso. Contributing into vdso .o files are compiled in PIC mode and as result for internal static functions calls compiler will generate 'jalr t9' instructions. Those are supposed to be converted into PC relative 'bal' calls by linker when relocation are processed. Mips global GOT entries do have dynamic relocations and they will be caught by cmd_vdso_check Makefile rule. Static PIC calls go through mips local GOT entries that do not have dynamic relocations. For those 'jalr t9' calls could be present but without dynamic relocations and they need to be converted to 'bal' calls by linker. Add additional build time check to make sure that no 'jalr t9' slip through because of some toolchain misconfiguration that prevents 'jalr t9' to 'bal' conversion. Signed-off-by: Victor Kamensky Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Ralf Baechle Cc: James Hogan Cc: Vincenzo Frascino Cc: bruce.ashfield@gmail.com Cc: richard.purdie@linuxfoundation.org commit 07015d7a103c4420b69a287b8ef4d2535c0f4106 Author: Paul Burton Date: Sat Feb 15 12:38:36 2020 -0800 MIPS: Disable VDSO time functionality on microMIPS A check we're about to add to pick up on function calls that depend on bogus use of the GOT in the VDSO picked up on instances of such function calls in microMIPS builds. Since the code appears genuinely problematic, and given the relatively small amount of use & testing that microMIPS sees, go ahead & disable the VDSO for microMIPS builds. Signed-off-by: Paul Burton commit da99f9355b53ebc565747d0072ff038f3d9fa875 Merge: 829e69446995 dfb9b69e3b84 Author: Linus Torvalds Date: Sat Feb 15 12:30:42 2020 -0800 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Fixes and HW enablement patches: - Tooling fixes, most of which are tooling header synchronization with v5.6 changes - Fix kprobes fallout on ARM - Add Intel Elkhart Lake support and extend Tremont support, these are relatively simple and should only affect those models - Fix the AMD family 17h generic event table" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (30 commits) perf llvm: Fix script used to obtain kernel make directives to work with new kbuild tools headers kvm: Sync linux/kvm.h with the kernel sources tools headers kvm: Sync kvm headers with the kernel sources tools arch x86: Sync asm/cpufeatures.h with the kernel sources tools headers x86: Sync disabled-features.h tools include UAPI: Sync sound/asound.h copy tools headers UAPI: Sync asm-generic/mman-common.h with the kernel perf tools: Add arm64 version of get_cpuid() tools headers UAPI: Sync drm/i915_drm.h with the kernel sources tools headers uapi: Sync linux/fscrypt.h with the kernel sources tools headers UAPI: Sync sched.h with the kernel perf trace: Resolve prctl's 'option' arg strings to numbers perf beauty prctl: Export the 'options' strarray tools headers UAPI: Sync prctl.h with the kernel sources tools headers UAPI: Sync copy of arm64's asm/unistd.h with the kernel sources perf maps: Move kmap::kmaps setup to maps__insert() perf maps: Fix map__clone() for struct kmap perf maps: Mark ksymbol DSOs with kernel type perf maps: Mark module DSOs with kernel type tools include UAPI: Sync x86's syscalls_64.tbl, generic unistd.h and fcntl.h to pick up openat2 and pidfd_getfd ... commit d3f703c4359ff06619b2322b91f69710453e6b6d Author: Victor Kamensky Date: Tue Feb 11 11:24:33 2020 -0800 mips: vdso: fix 'jalr t9' crash in vdso code Observed that when kernel is built with Yocto mips64-poky-linux-gcc, and mips64-poky-linux-gnun32-gcc toolchain, resulting vdso contains 'jalr t9' instructions in its code and since in vdso case nobody sets GOT table code crashes when instruction reached. On other hand observed that when kernel is built mips-poky-linux-gcc toolchain, the same 'jalr t9' instruction are replaced with PC relative function calls using 'bal' instructions. The difference boils down to -mrelax-pic-calls and -mexplicit-relocs gcc options that gets different default values depending on gcc target triplets and corresponding binutils. -mrelax-pic-calls got enabled by default only in mips-poky-linux-gcc case. MIPS binutils ld relies on R_MIPS_JALR relocation to convert 'jalr t9' into 'bal' and such relocation is generated only if -mrelax-pic-calls option is on. Please note 'jalr t9' conversion to 'bal' can happen only to static functions. These static PIC calls use mips local GOT entries that are supposed to be filled with start of DSO value by run-time linker (missing in VDSO case) and they do not have dynamic relocations. Global mips GOT entries must have dynamic relocations and they should be prevented by cmd_vdso_check Makefile rule. Solution call out -mrelax-pic-calls and -mexplicit-relocs options explicitly while compiling MIPS vdso code. That would get correct and consistent between different toolchains behaviour. Reported-by: Bruce Ashfield Signed-off-by: Victor Kamensky Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Ralf Baechle Cc: James Hogan Cc: Vincenzo Frascino Cc: richard.purdie@linuxfoundation.org commit 29e8c8253d7d5265f58122c0a7902e26df6c6f61 Author: Fabrice Gasnier Date: Fri Feb 14 17:46:35 2020 +0100 iio: trigger: stm32-timer: disable master mode when stopping Master mode should be disabled when stopping. This mainly impacts possible other use-case after timer has been stopped. Currently, master mode remains set (from start routine). Fixes: 6fb34812c2a2 ("iio: stm32 trigger: Add support for TRGO2 triggers") Signed-off-by: Fabrice Gasnier Cc: Signed-off-by: Jonathan Cameron commit 3bf3c9744694803bd2d6f0ee70a6369b980530fd Author: Marek Behún Date: Sat Feb 15 15:21:30 2020 +0100 bus: moxtet: fix potential stack buffer overflow The input_read function declares the size of the hex array relative to sizeof(buf), but buf is a pointer argument of the function. The hex array is meant to contain hexadecimal representation of the bin array. Link: https://lore.kernel.org/r/20200215142130.22743-1-marek.behun@nic.cz Fixes: 5bc7f990cd98 ("bus: Add support for Moxtet bus") Signed-off-by: Marek Behún Reported-by: sohu0106 Signed-off-by: Olof Johansson commit d65d87a07476aa17df2dcb3ad18c22c154315bec Author: Theodore Ts'o Date: Fri Feb 14 18:11:19 2020 -0500 ext4: improve explanation of a mount failure caused by a misconfigured kernel If CONFIG_QFMT_V2 is not enabled, but CONFIG_QUOTA is enabled, when a user tries to mount a file system with the quota or project quota enabled, the kernel will emit a very confusing messsage: EXT4-fs warning (device vdc): ext4_enable_quotas:5914: Failed to enable quota tracking (type=0, err=-3). Please run e2fsck to fix. EXT4-fs (vdc): mount failed We will now report an explanatory message indicating which kernel configuration options have to be enabled, to avoid customer/sysadmin confusion. Link: https://lore.kernel.org/r/20200215012738.565735-1-tytso@mit.edu Google-Bug-Id: 149093531 Fixes: 7c319d328505b778 ("ext4: make quota as first class supported feature") Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit dfb9b69e3b84791e4c6b954ac3cc0c4a545484f2 Merge: f861854e1b43 62765941155e Author: Ingo Molnar Date: Sat Feb 15 09:35:11 2020 +0100 Merge tag 'perf-urgent-for-mingo-5.6-20200214' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: BPF: Arnaldo Carvalho de Melo: - Fix script used to obtain kernel make directives to work with new kbuild used for building BPF programs. maps: Jiri Olsa: - Fixup kmap->kmaps backpointer in kernel maps. arm64: John Garry: - Add arm64 version of get_cpuid() to get proper, arm64 specific output from 'perf list' and other tools. perf top: Kim Phillips: - Update kernel idle symbols so that output in AMD systems is in line with other systems. perf stat: Kim Phillips: - Don't report a null stalled cycles per insn metric. tools headers: Arnaldo Carvalho de Melo: - Sync tools/ headers with the kernel sources to get things like syscall numbers and new arguments so that 'perf trace' can decode and use them in tracepoint filters, e.g. prctl's new PR_{G,S}ET_IO_FLUSHER options. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 3dbae15538972c9e1578cb216964c2840361a538 Author: Gustavo A. R. Silva Date: Fri Feb 14 17:03:12 2020 -0800 Input: cyapa - replace zero-length array with flexible-array member The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200214172132.GA28389@embeddedor Signed-off-by: Dmitry Torokhov commit 94bef5d57992f9e987a9b7e8fa736ee204ac4f7a Author: Gustavo A. R. Silva Date: Fri Feb 14 17:02:11 2020 -0800 Input: tca6416-keypad - replace zero-length array with flexible-array member The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200214172022.GA27490@embeddedor Signed-off-by: Dmitry Torokhov commit 3d87c75d84e20d8812dbfba87e46ffca29d75d40 Author: Gustavo A. R. Silva Date: Fri Feb 14 17:01:46 2020 -0800 Input: gpio_keys_polled - replace zero-length array with flexible-array member The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200214171907.GA26588@embeddedor Signed-off-by: Dmitry Torokhov commit 829e6944699530c47739b5ef091f8137526c1494 Merge: cf556edfde6c 5d63944f8206 Author: Linus Torvalds Date: Fri Feb 14 14:46:11 2020 -0800 Merge tag 'nfs-for-5.6-2' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client bugfixes from Anna Schumaker: "The only stable fix this time is the DMA scatter-gather list bug fixed by Chuck. The rest fix up races and refcounting issues that have been found during testing. Stable fix: - fix DMA scatter-gather list mapping imbalance The rest: - fix directory verifier races - fix races between open and dentry revalidation - fix revalidation of dentries with delegations - fix "cachethis" setting for writes - fix delegation and delegation cred pinning" * tag 'nfs-for-5.6-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: NFSv4: Ensure the delegation cred is pinned when we call delegreturn NFSv4: Ensure the delegation is pinned in nfs_do_return_delegation() NFSv4.1 make cachethis=no for writes xprtrdma: Fix DMA scatter-gather list mapping imbalance NFSv4: Fix revalidation of dentries with delegations NFSv4: Fix races between open and dentry revalidation NFS: Fix up directory verifier races commit cf556edfde6cfc293ce63de02ac23f725e41dfb1 Merge: ca60ad6a6bc4 3b20bc2fe4c0 Author: Linus Torvalds Date: Fri Feb 14 14:42:31 2020 -0800 Merge tag 'ceph-for-5.6-rc2' of https://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: - make O_DIRECT | O_APPEND combination work better - redo the server path canonicalization patch that went into -rc1 - fix the 'noacl' mount option that got broken by the conversion to the new mount API in 5.5 * tag 'ceph-for-5.6-rc2' of https://github.com/ceph/ceph-client: ceph: noacl mount option is effectively ignored ceph: canonicalize server path in place ceph: do not execute direct write in parallel if O_APPEND is specified commit 807b9515b7d044cf77df31f1af9d842a76ecd5cb Author: Bart Van Assche Date: Wed Feb 12 21:09:00 2020 -0800 scsi: Revert "target: iscsi: Wait for all commands to finish before freeing a session" Since commit e9d3009cb936 introduced a regression and since the fix for that regression was not perfect, revert this commit. Link: https://marc.info/?l=target-devel&m=158157054906195 Cc: Rahul Kundu Cc: Mike Marciniszyn Cc: Sagi Grimberg Reported-by: Dakshaja Uppalapati Fixes: e9d3009cb936 ("scsi: target: iscsi: Wait for all commands to finish before freeing a session") Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 76261ada16dcc3be610396a46d35acc3efbda682 Author: Bart Van Assche Date: Wed Feb 12 21:08:59 2020 -0800 scsi: Revert "RDMA/isert: Fix a recently introduced regression related to logout" Since commit 04060db41178 introduces soft lockups when toggling network interfaces, revert it. Link: https://marc.info/?l=target-devel&m=158157054906196 Cc: Rahul Kundu Cc: Mike Marciniszyn Cc: Sagi Grimberg Reported-by: Dakshaja Uppalapati Fixes: 04060db41178 ("scsi: RDMA/isert: Fix a recently introduced regression related to logout") Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit ca60ad6a6bc4aa88c02c6f103dd80df54689ea4d Merge: 2019fc96af22 2ca10259b418 Author: Linus Torvalds Date: Fri Feb 14 13:47:02 2020 -0800 Merge tag 'io_uring-5.6-2020-02-14' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Here's a set of fixes for io_uring: - Various fixes with cleanups from Pavel, fixing corner cases where we're not correctly dealing with iovec cleanup. - Clarify that statx/openat/openat2 don't accept fixed files - Buffered raw device write EOPTNOTSUPP fix - Ensure async workers grab current->fs - A few task exit fixes with pending requests that grab the file table - send/recvmsg async load fix - io-wq offline node setup fix - CQ overflow flush in poll" * tag 'io_uring-5.6-2020-02-14' of git://git.kernel.dk/linux-block: (21 commits) io_uring: prune request from overflow list on flush io-wq: don't call kXalloc_node() with non-online node io_uring: retain sockaddr_storage across send/recvmsg async punt io_uring: cancel pending async work if task exits io-wq: add io_wq_cancel_pid() to cancel based on a specific pid io-wq: make io_wqe_cancel_work() take a match handler io_uring: fix openat/statx's filename leak io_uring: fix double prep iovec leak io_uring: fix async close() with f_op->flush() io_uring: allow AT_FDCWD for non-file openat/openat2/statx io_uring: grab ->fs as part of async preparation io-wq: add support for inheriting ->fs io_uring: retry raw bdev writes if we hit -EOPNOTSUPP io_uring: add cleanup for openat()/statx() io_uring: fix iovec leaks io_uring: remove unused struct io_async_open io_uring: flush overflowed CQ events in the io_uring_poll() io_uring: statx/openat/openat2 don't support fixed files io_uring: fix deferred req iovec leak io_uring: fix 1-bit bitfields to be unsigned ... commit 2019fc96af228b412bdb2e8e0ad4b1fc12046a51 Merge: 4e03e4e6d2a0 a1fa83bdab78 Author: Linus Torvalds Date: Fri Feb 14 12:40:38 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Fix interrupt name truncation in mv88e6xxx dsa driver, from Andrew Lunn. 2) Process generic XDP even if SKB is cloned, from Toke Høiland-Jørgensen. 3) Fix leak of kernel memory to userspace in smc, from Eric Dumazet. 4) Add some missing netlink attribute validation to matchall and flower, from Davide Caratti. 5) Send icmp responses properly when NAT has been applied to the frame before we get to the tunnel emitting the icmp, from Jason Donenfeld. 6) Make sure there is enough SKB headroom when adding dsa tags for qca and ar9331. From Per Forlin. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (62 commits) netdevice.h: fix all kernel-doc and Sphinx warnings net: dsa: tag_ar9331: Make sure there is headroom for tag net: dsa: tag_qca: Make sure there is headroom for tag net, ip6_tunnel: enhance tunnel locate with link check net/smc: no peer ID in CLC decline for SMCD net/smc: transfer fasync_list in case of fallback net: hns3: fix a copying IPv6 address error in hclge_fd_get_flow_tuples() net: hns3: fix VF bandwidth does not take effect in some case net: hns3: add management table after IMP reset mac80211: fix wrong 160/80+80 MHz setting cfg80211: add missing policy for NL80211_ATTR_STATUS_CODE xfrm: interface: use icmp_ndo_send helper wireguard: device: use icmp_ndo_send helper sunvnet: use icmp_ndo_send helper gtp: use icmp_ndo_send helper icmp: introduce helper for nat'd source address in network device context net/sched: flower: add missing validation of TCA_FLOWER_FLAGS net/sched: matchall: add missing validation of TCA_MATCHALL_FLAGS net/flow_dissector: remove unexist field description page_pool: refill page when alloc.count of pool is zero ... commit 4e03e4e6d2a03a9f2edeefaec12d4f336dee824d Merge: 81f3011cbf50 3629ac5b9253 Author: Linus Torvalds Date: Fri Feb 14 12:34:30 2020 -0800 Merge tag 'pm-5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Fix three issues related to the handling of wakeup events signaled through the ACPI SCI while suspended to idle (Rafael Wysocki) and unexport an internal cpufreq variable (Yangtao Li)" * tag 'pm-5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: PM: s2idle: Prevent spurious SCIs from waking up the system ACPICA: Introduce acpi_any_gpe_status_set() ACPI: PM: s2idle: Avoid possible race related to the EC GPE ACPI: EC: Fix flushing of pending work cpufreq: Make cpufreq_global_kobject static commit 81f3011cbf501fef3a954821dbc362084f6b686b Merge: 3f0d329371c0 0fbb027b44e7 Author: Linus Torvalds Date: Fri Feb 14 12:27:54 2020 -0800 Merge tag 'sound-5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "The only common change is the regression fix of the previous PCM fix patch for managed buffers while the rest are usual suspects, USB-audio and HD-audio device-specific quirks. The change for UAC2 clock validation workaround became a bit big, but the changes are fairly straightforward" * tag 'sound-5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: pcm: Fix double hw_free calls ALSA: usb-audio: Add clock validity quirk for Denon MC7000/MCX8000 ALSA: hda/realtek - Fix silent output on MSI-GL73 ALSA: hda/realtek - Add more codec supported Headset Button ALSA: usb-audio: Apply sample rate quirk for Audioengine D1 ALSA: usb-audio: Fix UAC2/3 effect unit parsing ALSA: usb-audio: Apply 48kHz fixed rate playback for Jabra Evolve 65 headset commit 3f0d329371c08dfa3227f1716e522f3a8a081155 Merge: b19e8c684703 6f4134b30b6e Author: Linus Torvalds Date: Fri Feb 14 12:23:16 2020 -0800 Merge tag 'drm-fixes-2020-02-14' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "The core has a build fix for edid code on certain compilers/arches/, one MST fix and one vgem fix. Regular amdgpu fixes, and a couple of small driver fixes. The i915 fixes are bit larger than normal for this stage, but they were having CI issues last week, and they hadn't sent any fixes last week due to this. core: - edid build fix mst: - fix NULL ptr deref vgem: - fix close after free msm: - better dma-api usage sun4i: - disable allow_fb_modifiers amdgpu: - Additional OD fixes for navi - Misc display fixes - VCN 2.5 DPG fix - Prevent build errors on PowerPC on some configs - GDS EDC fix i915: - dsi/acpi fixes - gvt locking and allocation fixes - gem/gt fixes - bios timing parameters fix" * tag 'drm-fixes-2020-02-14' of git://anongit.freedesktop.org/drm/drm: (50 commits) drm/i915: Mark the removal of the i915_request from the sched.link drm/i915/execlists: Reclaim the hanging virtual request drm/i915/execlists: Take a reference while capturing the guilty request drm/i915/execlists: Offline error capture drm/i915/gt: Allow temporary suspension of inflight requests drm/i915: Keep track of request among the scheduling lists drm/i915/gem: Tighten checks and acquiring the mmap object drm/i915: Fix preallocated barrier list append drm/i915/gt: Acquire ce->active before ce->pin_count/ce->pin_mutex drm/i915: Tighten atomicity of i915_active_acquire vs i915_active_release drm/i915: Stub out i915_gpu_coredump_put drm/amdgpu:/navi10: use the ODCAP enum to index the caps array drm/amdgpu: update smu_v11_0_pptable.h drm/amdgpu: correct comment to clear up the confusion drm/amd/display: DCN2.x Do not program DPPCLK if same value drm/amd/display: Don't map ATOM_ENABLE to ATOM_INIT drm/amdgpu/vcn2.5: fix warning drm/amdgpu: limit GDS clearing workaround in cold boot sequence drm/amdgpu: fix amdgpu pmu to use hwc->config instead of hwc->conf amdgpu: Prevent build errors regarding soft/hard-float FP ABI tags ... commit 2c2a7552dd6465e8fde6bc9cccf8d66ed1c1eb72 Author: Aditya Pakki Date: Fri Feb 14 12:21:01 2020 -0600 ecryptfs: replace BUG_ON with error handling code In crypt_scatterlist, if the crypt_stat argument is not set up correctly, the kernel crashes. Instead, by returning an error code upstream, the error is handled safely. The issue is detected via a static analysis tool written by us. Fixes: 237fead619984 (ecryptfs: fs/Makefile and fs/Kconfig) Signed-off-by: Aditya Pakki Signed-off-by: Tyler Hicks commit f8e48a8408f5e23dd514916fda128a87e34f8ffd Author: Tyler Hicks Date: Thu Feb 13 21:25:54 2020 +0000 eCryptfs: Replace deactivated email address Replace a recently deactived email address with one that I'll be able to personally control and keep alive. Signed-off-by: Tyler Hicks commit 726464596b5d3f10b7c655129a62168e5c17d60c Author: Tyler Hicks Date: Wed Feb 12 23:35:03 2020 +0000 MAINTAINERS: eCryptfs: Update maintainer address and downgrade status Adjust my email address to a personal account. Downgrade the status of eCryptfs maintenance to 'Odd Fixes' since it has not been part of my work responsibilities recently and I've had little personal time to devote to it. eCryptfs hasn't seen active development in some time. New deployments of file level encryption should use more modern solutions, such as fscrypt, where possible. Signed-off-by: Tyler Hicks commit 685eff513183d6d64a5f413531e683d23b8b198b Author: Jason Gunthorpe Date: Thu Feb 6 10:27:54 2020 -0400 IB/mlx5: Use div64_u64 for num_var_hw_entries calculation On i386: ERROR: "__udivdi3" [drivers/infiniband/hw/mlx5/mlx5_ib.ko] undefined! ERROR: "__divdi3" [drivers/infiniband/hw/mlx5/mlx5_ib.ko] undefined! Fixes: f164be8c0366 ("IB/mlx5: Extend caps stage to handle VAR capabilities") Reported-by: Randy Dunlap Acked-by: Randy Dunlap # build-tested Reported-by: Alexander Lobakin Signed-off-by: Jason Gunthorpe commit b08c3ed609aabc4e76e74edc4404f0c26279d7ed Author: Alex Deucher Date: Wed Feb 12 08:52:32 2020 -0500 drm/amdgpu/gfx10: disable gfxoff when reading rlc clock Otherwise we readback all ones. Fixes rlc counter readback while gfxoff is active. Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 120cf959308e1bda984e40a9edd25ee2d6262efd Author: Alex Deucher Date: Wed Feb 12 08:51:29 2020 -0500 drm/amdgpu/gfx9: disable gfxoff when reading rlc clock Otherwise we readback all ones. Fixes rlc counter readback while gfxoff is active. Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit c657b936ea98630ef5ba4f130ab1ad5c534d0165 Author: Alex Deucher Date: Wed Feb 12 01:46:16 2020 -0500 drm/amdgpu/soc15: fix xclk for raven It's 25 Mhz (refclk / 4). This fixes the interpretation of the rlc clock counter. Acked-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit aad4e2dbe543bc1633bc208ac7bddc4f0bb185ba Author: Evan Quan Date: Tue Feb 11 12:39:53 2020 +0800 drm/amd/powerplay: always refetch the enabled features status on dpm enablement Otherwise, the cached dpm features status may be inconsistent under some case(e.g. baco reset of Navi asic). Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit c6f8c440441029d5621ee5153676243234a4b76e Author: Bhawanpreet Lakha Date: Fri Feb 7 10:41:20 2020 -0500 drm/amd/display: fix dtm unloading there was a type in the terminate command. We should be calling psp_dtm_unload() instead of psp_hdcp_unload() Fixes: 143f23053333 ("drm/amdgpu: psp DTM init") Signed-off-by: Bhawanpreet Lakha Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 43064f5c8b8818e35fa254496ef00aabd63d547a Author: Bhawanpreet Lakha Date: Thu Feb 6 14:26:38 2020 -0500 drm/amd/display: fix backwards byte order in rx_caps. We were using incorrect byte order after we started using the drm_defines So fix it. Fixes: 02837a91ae75 ("drm/amd/display: add and use defines from drm_hdcp.h") Signed-off-by: JinZe.Xu Signed-off-by: Bhawanpreet Lakha Reviewed-by: Wenjing Liu Signed-off-by: Alex Deucher commit f25372ffc3f6c2684b57fb718219137e6ee2b64c Author: Yi Zhang Date: Fri Feb 14 18:48:02 2020 +0800 nvme: fix the parameter order for nvme_get_log in nvme_get_fw_slot_info nvme fw-activate operation will get bellow warning log, fix it by update the parameter order [ 113.231513] nvme nvme0: Get FW SLOT INFO log error Fixes: 0e98719b0e4b ("nvme: simplify the API for getting log pages") Reported-by: Sujith Pandel Reviewed-by: David Milburn Signed-off-by: Yi Zhang Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit fa46c6fb5d61b1f17b06d7c6ef75478b576304c7 Author: Keith Busch Date: Thu Feb 13 01:41:05 2020 +0900 nvme/pci: move cqe check after device shutdown Many users have reported nvme triggered irq_startup() warnings during shutdown. The driver uses the nvme queue's irq to synchronize scanning for completions, and enabling an interrupt affined to only offline CPUs triggers the alarming warning. Move the final CQE check to after disabling the device and all registered interrupts have been torn down so that we do not have any IRQ to synchronize. Link: https://bugzilla.kernel.org/show_bug.cgi?id=206509 Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 97b2512ad000a409b4073dd1a71e4157d76675cb Author: Nigel Kirkland Date: Mon Feb 10 16:01:45 2020 -0800 nvme: prevent warning triggered by nvme_stop_keep_alive Delayed keep alive work is queued on system workqueue and may be cancelled via nvme_stop_keep_alive from nvme_reset_wq, nvme_fc_wq or nvme_wq. Check_flush_dependency detects mismatched attributes between the work-queue context used to cancel the keep alive work and system-wq. Specifically system-wq does not have the WQ_MEM_RECLAIM flag, whereas the contexts used to cancel keep alive work have WQ_MEM_RECLAIM flag. Example warning: workqueue: WQ_MEM_RECLAIM nvme-reset-wq:nvme_fc_reset_ctrl_work [nvme_fc] is flushing !WQ_MEM_RECLAIM events:nvme_keep_alive_work [nvme_core] To avoid the flags mismatch, delayed keep alive work is queued on nvme_wq. However this creates a secondary concern where work and a request to cancel that work may be in the same work queue - namely err_work in the rdma and tcp transports, which will want to flush/cancel the keep alive work which will now be on nvme_wq. After reviewing the transports, it looks like err_work can be moved to nvme_reset_wq. In fact that aligns them better with transition into RESETTING and performing related reset work in nvme_reset_wq. Change nvme-rdma and nvme-tcp to perform err_work in nvme_reset_wq. Signed-off-by: Nigel Kirkland Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 2d570a7c0251c594489a2c16b82b14ae30345c03 Author: Anton Eidelman Date: Mon Feb 10 10:37:18 2020 -0800 nvme/tcp: fix bug on double requeue when send fails When nvme_tcp_io_work() fails to send to socket due to connection close/reset, error_recovery work is triggered from nvme_tcp_state_change() socket callback. This cancels all the active requests in the tagset, which requeues them. The failed request, however, was ended and thus requeued individually as well unless send returned -EPIPE. Another return code to be treated the same way is -ECONNRESET. Double requeue caused BUG_ON(blk_queued_rq(rq)) in blk_mq_requeue_request() from either the individual requeue of the failed request or the bulk requeue from blk_mq_tagset_busy_iter(, nvme_cancel_request, ); Signed-off-by: Anton Eidelman Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch Signed-off-by: Jens Axboe commit 85db6b7ae65f33be4bb44f1c28261a3faa126437 Author: Ronnie Sahlberg Date: Thu Feb 13 12:14:47 2020 +1000 cifs: make sure we do not overflow the max EA buffer size RHBZ: 1752437 Before we add a new EA we should check that this will not overflow the maximum buffer we have available to read the EAs back. Otherwise we can get into a situation where the EAs are so big that we can not read them back to the client and thus we can not list EAs anymore or delete them. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French CC: Stable commit 2c6251ad91afc2e3c671c904702e8d121d3d50c0 Author: Steve French Date: Wed Feb 12 22:37:08 2020 -0600 cifs: enable change notification for SMB2.1 dialect It was originally enabled only for SMB3 or later dialects, but had requests to add it to SMB2.1 mounts as well given the large number of systems at that dialect level. Signed-off-by: Steve French Reported-by: L Walsh Acked-by: Ronnie Sahlberg commit 8f486296459c084b106d907414540301bd9485fd Author: Tzung-Bi Shih Date: Fri Feb 14 18:57:43 2020 +0800 ASoC: dapm: remove snd_soc_dapm_put_enum_double_locked Reverts commit 839284e79482 ("ASoC: dapm: add snd_soc_dapm_put_enum_double_locked"). Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200214105744.82258-3-tzungbi@google.com Signed-off-by: Mark Brown commit 4b8a1ca4628343829f373bf0d4e087fe50c451e5 Author: Tzung-Bi Shih Date: Fri Feb 14 18:57:42 2020 +0800 ASoC: max98090: revert invalid fix for handling SHDN Reverts commit 62d5ae4cafb7 ("ASoC: max98090: save and restore SHDN when changing sensitive registers"). A critical side-effect was observed: when keep playing something, the recorded sound has chance to break (clipping). Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200214105744.82258-2-tzungbi@google.com Signed-off-by: Mark Brown commit a1fa83bdab784fa0ff2e92870011c0dcdbd2f680 Author: Randy Dunlap Date: Wed Feb 12 22:28:20 2020 -0800 netdevice.h: fix all kernel-doc and Sphinx warnings Eliminate all kernel-doc and Sphinx warnings in . Fixes these warnings: ../include/linux/netdevice.h:2100: warning: Function parameter or member 'gso_partial_features' not described in 'net_device' ../include/linux/netdevice.h:2100: warning: Function parameter or member 'l3mdev_ops' not described in 'net_device' ../include/linux/netdevice.h:2100: warning: Function parameter or member 'xfrmdev_ops' not described in 'net_device' ../include/linux/netdevice.h:2100: warning: Function parameter or member 'tlsdev_ops' not described in 'net_device' ../include/linux/netdevice.h:2100: warning: Function parameter or member 'name_assign_type' not described in 'net_device' ../include/linux/netdevice.h:2100: warning: Function parameter or member 'ieee802154_ptr' not described in 'net_device' ../include/linux/netdevice.h:2100: warning: Function parameter or member 'mpls_ptr' not described in 'net_device' ../include/linux/netdevice.h:2100: warning: Function parameter or member 'xdp_prog' not described in 'net_device' ../include/linux/netdevice.h:2100: warning: Function parameter or member 'gro_flush_timeout' not described in 'net_device' ../include/linux/netdevice.h:2100: warning: Function parameter or member 'xdp_bulkq' not described in 'net_device' ../include/linux/netdevice.h:2100: warning: Function parameter or member 'xps_cpus_map' not described in 'net_device' ../include/linux/netdevice.h:2100: warning: Function parameter or member 'xps_rxqs_map' not described in 'net_device' ../include/linux/netdevice.h:2100: warning: Function parameter or member 'qdisc_hash' not described in 'net_device' ../include/linux/netdevice.h:3552: WARNING: Inline emphasis start-string without end-string. ../include/linux/netdevice.h:3552: WARNING: Inline emphasis start-string without end-string. Signed-off-by: Randy Dunlap Signed-off-by: David S. Miller commit 3ea89fa795c5e994141a21ea6d68d5a2d5fe8780 Merge: 5fdcce211b3a ddc9abaf5d99 Author: David S. Miller Date: Fri Feb 14 07:34:51 2020 -0800 Merge branch 'dsa-headroom' Per Forlin says: ==================== net: dsa: Make sure there is headroom for tag Sorry for re-posting yet another time.... I manage to include multiple email-senders and forgot to include cover-letter. Let's hope everyhthing is in order this time. Fix two tag drivers to make sure there is headroom for the tag data. ==================== Signed-off-by: David S. Miller commit ddc9abaf5d9924569afe09a605c9012089d0c25b Author: Per Forlin Date: Thu Feb 13 15:37:10 2020 +0100 net: dsa: tag_ar9331: Make sure there is headroom for tag Passing tag size to skb_cow_head will make sure there is enough headroom for the tag data. This change does not introduce any overhead in case there is already available headroom for tag. Signed-off-by: Per Forlin Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 04fb91243a853dbde216d829c79d9632e52aa8d9 Author: Per Forlin Date: Thu Feb 13 15:37:09 2020 +0100 net: dsa: tag_qca: Make sure there is headroom for tag Passing tag size to skb_cow_head will make sure there is enough headroom for the tag data. This change does not introduce any overhead in case there is already available headroom for tag. Signed-off-by: Per Forlin Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 5fdcce211b3a41c3fed229333027f59a94a2f265 Author: William Dauchy Date: Thu Feb 13 18:19:22 2020 +0100 net, ip6_tunnel: enhance tunnel locate with link check With ipip, it is possible to create an extra interface explicitly attached to a given physical interface: # ip link show tunl0 4: tunl0@NONE: mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ipip 0.0.0.0 brd 0.0.0.0 # ip link add tunl1 type ipip dev eth0 # ip link show tunl1 6: tunl1@eth0: mtu 1480 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ipip 0.0.0.0 brd 0.0.0.0 But it is not possible with ip6tnl: # ip link show ip6tnl0 5: ip6tnl0@NONE: mtu 1452 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/tunnel6 :: brd :: # ip link add ip6tnl1 type ip6tnl dev eth0 RTNETLINK answers: File exists This patch aims to make it possible by adding link comparaison in both tunnel locate and lookup functions; we also modify mtu calculation when attached to an interface with a lower mtu. This permits to make use of x-netns communication by moving the newly created tunnel in a given netns. Signed-off-by: William Dauchy Reviewed-by: Nicolas Dichtel Signed-off-by: David S. Miller commit bab8f1ff17da0701bb580fcb025de6fca0da3dcf Merge: 6f4ecbe284df f24667779b53 Author: Olof Johansson Date: Fri Feb 14 07:24:38 2020 -0800 Merge tag 'sti-dt-for-5.7-round1' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti into arm/fixes STi dt fixes: ------------- - remove deprecated Synopsys PHY dt properties - fix sound frame-inversion property * tag 'sti-dt-for-5.7-round1' of git://git.kernel.org/pub/scm/linux/kernel/git/pchotard/sti: ARM: dts: sti: fixup sound frame-inversion for stihxxx-b2120.dtsi ARM: dts: sti: Remove deprecated snps PHY properties for stih410-b2260 Link: https://lore.kernel.org/r/afe20a6d-061b-a93c-2e60-206b0e8d0f81@st.com Signed-off-by: Olof Johansson commit b32cb6fcf1f81449a388f3fd2be14454a2c644da Merge: 907e51e41ad9 33181ea7f5a6 Author: David S. Miller Date: Fri Feb 14 07:16:08 2020 -0800 Merge tag 'mac80211-for-net-2020-02-14' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Just a few fixes: * avoid running out of tracking space for frames that need to be reported to userspace by using more bits * fix beacon handling suppression by adding some relevant elements to the CRC calculation * fix quiet mode in action frames * fix crash in ethtool for virt_wifi and similar * add a missing policy entry * fix 160 & 80+80 bandwidth to take local capabilities into account ==================== Signed-off-by: David S. Miller commit 907e51e41ad9061b49811750475bfeb75c0f2b3c Merge: dc221a28d094 369537c97024 Author: David S. Miller Date: Fri Feb 14 07:09:36 2020 -0800 Merge branch 'smc-fixes' Karsten Graul says: ==================== net/smc: fixes for -net Fix a syzbot finding and a problem with the CLC handshake content. ==================== Signed-off-by: David S. Miller commit 369537c97024dca99303a8d4d6ab38b4f54d3909 Author: Ursula Braun Date: Fri Feb 14 08:59:00 2020 +0100 net/smc: no peer ID in CLC decline for SMCD Just SMCR requires a CLC Peer ID, but not SMCD. The field should be zero for SMCD. Fixes: c758dfddc1b5 ("net/smc: add SMC-D support in CLC messages") Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 67f562e3e147750a02b2a91d21a163fc44a1d13e Author: Ursula Braun Date: Fri Feb 14 08:58:59 2020 +0100 net/smc: transfer fasync_list in case of fallback SMC does not work together with FASTOPEN. If sendmsg() is called with flag MSG_FASTOPEN in SMC_INIT state, the SMC-socket switches to fallback mode. To handle the previous ioctl FIOASYNC call correctly in this case, it is necessary to transfer the socket wait queue fasync_list to the internal TCP socket. Reported-by: syzbot+4b1fe8105f8044a26162@syzkaller.appspotmail.com Fixes: ee9dfbef02d18 ("net/smc: handle sockopts forcing fallback") Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit dc221a28d0944f1a28755caa66bf58bfa47e26d1 Merge: 803381f9f117 47327c9315b2 Author: David S. Miller Date: Fri Feb 14 07:05:18 2020 -0800 Merge branch 'hns3-fixes' Huazhong Tan says: ==================== net: hns3: fixes for -net This series includes three bugfixes for the HNS3 ethernet driver. [patch 1] fixes a management table lost issue after IMP reset. [patch 2] fixes a VF bandwidth configuration not work problem. [patch 3] fixes a problem related to IPv6 address copying. ==================== Signed-off-by: David S. Miller commit 47327c9315b2f3ae4ab659457977a26669631f20 Author: Guangbin Huang Date: Fri Feb 14 09:53:43 2020 +0800 net: hns3: fix a copying IPv6 address error in hclge_fd_get_flow_tuples() The IPv6 address defined in struct in6_addr is specified as big endian, but there is no specified endian in struct hclge_fd_rule_tuples, so it will cause a problem if directly use memcpy() to copy ipv6 address between these two structures since this field in struct hclge_fd_rule_tuples is little endian. This patch fixes this problem by using be32_to_cpu() to convert endian of IPv6 address of struct in6_addr before copying. Fixes: d93ed94fbeaf ("net: hns3: add aRFS support for PF") Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 19eb1123b4e9337fe20b1763fec528f837ec6568 Author: Yonglong Liu Date: Fri Feb 14 09:53:42 2020 +0800 net: hns3: fix VF bandwidth does not take effect in some case When enabling 4 TC after setting the bandwidth of VF, the bandwidth of VF will resume to default value, because of the qset resources changed in this case. This patch fixes it by using a fixed VF's qset resources according to HNAE3_MAX_TC macro. Fixes: ee9e44248f52 ("net: hns3: add support for configuring bandwidth of VF on the host") Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit d0db7ed397517c8b2be24a0d1abfa15df776908e Author: Yufeng Mo Date: Fri Feb 14 09:53:41 2020 +0800 net: hns3: add management table after IMP reset In the current process, the management table is missing after the IMP reset. This patch adds the management table to the reset process. Fixes: f5aac71c0327 ("net: hns3: add manager table initialization for hardware") Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit dfa9a5efe8b932a84b3b319250aa3ac60c20f876 Author: Takashi Iwai Date: Fri Feb 14 12:13:16 2020 +0100 ALSA: rawmidi: Avoid bit fields for state flags The rawmidi state flags (opened, append, active_sensing) are stored in bit fields that can be potentially racy when concurrently accessed without any locks. Although the current code should be fine, there is also no any real benefit by keeping the bitfields for this kind of short number of members. This patch changes those bit fields flags to the simple bool fields. There should be no size increase of the snd_rawmidi_substream by this change. Reported-by: syzbot+576cc007eb9f2c968200@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20200214111316.26939-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit dc7497795e014d84699c3b8809ed6df35352dd74 Author: Takashi Iwai Date: Fri Feb 14 12:13:15 2020 +0100 ALSA: seq: Fix concurrent access to queue current tick/time snd_seq_check_queue() passes the current tick and time of the given queue as a pointer to snd_seq_prioq_cell_out(), but those might be updated concurrently by the seq timer update. Fix it by retrieving the current tick and time via the proper helper functions at first, and pass those values to snd_seq_prioq_cell_out() later in the loops. snd_seq_timer_get_cur_time() takes a new argument and adjusts with the current system time only when it's requested so; this update isn't needed for snd_seq_check_queue(), as it's called either from the interrupt handler or right after queuing. Also, snd_seq_timer_get_cur_tick() is changed to read the value in the spinlock for the concurrency, too. Reported-by: syzbot+fd5e0eaa1a32999173b2@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20200214111316.26939-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit bb51e669fa49feb5904f452b2991b240ef31bc97 Author: Takashi Iwai Date: Fri Feb 14 12:13:14 2020 +0100 ALSA: seq: Avoid concurrent access to queue flags The queue flags are represented in bit fields and the concurrent access may result in unexpected results. Although the current code should be mostly OK as it's only reading a field while writing other fields as KCSAN reported, it's safer to cover both with a proper spinlock protection. This patch fixes the possible concurrent read by protecting with q->owner_lock. Also the queue owner field is protected as well since it's the field to be protected by the lock itself. Reported-by: syzbot+65c6c92d04304d0a8efc@syzkaller.appspotmail.com Reported-by: syzbot+e60ddfa48717579799dd@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20200214111316.26939-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 62765941155e487b351a72479078bd6fec973563 Author: Arnaldo Carvalho de Melo Date: Fri Feb 14 09:34:43 2020 -0300 perf llvm: Fix script used to obtain kernel make directives to work with new kbuild Before this patch: # ./perf test 39 41 39: LLVM search and compile : 39.1: Basic BPF llvm compile : Ok 39.2: kbuild searching : FAILED! 39.3: Compile source for BPF prologue generation : Skip 39.4: Compile source for BPF relocation : Skip 41: BPF filter : 41.1: Basic BPF filtering : Ok 41.2: BPF pinning : Ok 41.3: BPF prologue generation : FAILED! 41.4: BPF relocation checker : Skip # Using 'perf test -v' for these tests shows that it is not finding uapi/linux/fs.h, which ends up being because we don't setup the right header path. Fix it. After this patch: # perf test 39 41 39: LLVM search and compile : 39.1: Basic BPF llvm compile : Ok 39.2: kbuild searching : Ok 39.3: Compile source for BPF prologue generation : Ok 39.4: Compile source for BPF relocation : Ok 41: BPF filter : 41.1: Basic BPF filtering : Ok 41.2: BPF pinning : Ok 41.3: BPF prologue generation : Ok 41.4: BPF relocation checker : Ok # Longer description: In llvm-utils.c we use some techniques to obtain the kbuild make directives and that recently stopped working as now 'ar' gets called and expects to find the dummy.o used to echo these variables: $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) Add the $(CC) line to satisfy that, making sure this works with all kernels, i.e. preserving the temp directory and files in it used for this technique we can see that it works everywhere: # make -s -C /lib/modules/5.4.18-100.fc30.x86_64/build M=/tmp/tmp.qgaFHgxjZ4/ clean # ls -la /tmp/tmp.qgaFHgxjZ4/ total 4 drwx------. 2 root root 80 Feb 14 09:42 . drwxrwxrwt. 47 root root 1200 Feb 14 09:42 .. -rw-r--r--. 1 root root 0 Feb 13 17:14 dummy.c -rw-r--r--. 1 root root 121 Feb 13 17:14 Makefile # # cat /tmp/tmp.qgaFHgxjZ4/Makefile obj-y := dummy.o $(obj)/%.o: $(src)/%.c @echo -n "$(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS)" $(CC) -c -o $@ $< # Then build with an old kernel Makefile: # make -s -C /lib/modules/5.4.18-100.fc30.x86_64/build M=/tmp/tmp.qgaFHgxjZ4/ dummy.o -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/9/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h # # ls -la /tmp/tmp.qgaFHgxjZ4/ total 8 drwx------. 2 root root 100 Feb 14 09:43 . drwxrwxrwt. 47 root root 1200 Feb 14 09:43 .. -rw-r--r--. 1 root root 0 Feb 13 17:14 dummy.c -rw-r--r--. 1 root root 936 Feb 14 09:43 dummy.o -rw-r--r--. 1 root root 121 Feb 13 17:14 Makefile # And a new one: # make -s -C /lib/modules/5.4.18-100.fc30.x86_64/build M=/tmp/tmp.qgaFHgxjZ4/ clean # ls -la /tmp/tmp.qgaFHgxjZ4/ total 4 drwx------. 2 root root 80 Feb 14 09:43 . drwxrwxrwt. 47 root root 1200 Feb 14 09:43 .. -rw-r--r--. 1 root root 0 Feb 13 17:14 dummy.c -rw-r--r--. 1 root root 121 Feb 13 17:14 Makefile # make -s -C /lib/modules/5.6.0-rc1+/build M=/tmp/tmp.qgaFHgxjZ4/ dummy.o -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/9/include -I/home/acme/git/linux/arch/x86/include -I./arch/x86/include/generated -I/home/acme/git/linux/include -I./include -I/home/acme/git/linux/arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I/home/acme/git/linux/include/uapi -I./include/generated/uapi -include /home/acme/git/linux/include/linux/kconfig.h # # ls -la /tmp/tmp.qgaFHgxjZ4/ total 16 drwx------. 2 root root 160 Feb 14 09:44 . drwxrwxrwt. 47 root root 1200 Feb 14 09:44 .. -rw-r--r--. 1 root root 158 Feb 14 09:44 built-in.a -rw-r--r--. 1 root root 149 Feb 14 09:44 .built-in.a.cmd -rw-r--r--. 1 root root 0 Feb 13 17:14 dummy.c -rw-r--r--. 1 root root 936 Feb 14 09:44 dummy.o -rw-r--r--. 1 root root 121 Feb 13 17:14 Makefile -rw-r--r--. 1 root root 0 Feb 14 09:44 modules.order # Reported-by: Thomas Richter Tested-by: Thomas Richter Cc: Adrian Hunter Cc: Daniel Borkmann Cc: He Kuang Cc: Jiri Olsa Cc: Masahiro Yamada Cc: Namhyung Kim Cc: Sumanth Korikkar Cc: Vasily Gorbik Cc: Wang Nan Cc: Zefan Li Link: https://www.spinics.net/lists/linux-perf-users/msg10600.html Signed-off-by: Arnaldo Carvalho de Melo commit 3629ac5b92535793ba6226e243c2324a20c35fae Merge: fdde0ff8590b 183edb20e60a Author: Rafael J. Wysocki Date: Fri Feb 14 10:40:48 2020 +0100 Merge branch 'pm-cpufreq' * pm-cpufreq: cpufreq: Make cpufreq_global_kobject static commit 33181ea7f5a62a17fbe55f0f73428ecb5e686be8 Author: Shay Bar Date: Mon Feb 10 15:07:28 2020 +0200 mac80211: fix wrong 160/80+80 MHz setting Before this patch, STA's would set new width of 160/80+80 MHz based on AP capability only. This is wrong because STA may not support > 80MHz BW. Fix is to verify STA has 160/80+80 MHz capability before increasing its width to > 80MHz. The "support_80_80" and "support_160" setting is based on: "Table 9-272 — Setting of the Supported Channel Width Set subfield and Extended NSS BW Support subfield at a STA transmitting the VHT Capabilities Information field" From "Draft P802.11REVmd_D3.0.pdf" Signed-off-by: Aviad Brikman Signed-off-by: Shay Bar Link: https://lore.kernel.org/r/20200210130728.23674-1-shay.bar@celeno.com Signed-off-by: Johannes Berg commit ea75080110a4c1fa011b0a73cb8f42227143ee3e Author: Sergey Matyukevich Date: Thu Feb 13 13:16:16 2020 +0000 cfg80211: add missing policy for NL80211_ATTR_STATUS_CODE The nl80211_policy is missing for NL80211_ATTR_STATUS_CODE attribute. As a result, for strictly validated commands, it's assumed to not be supported. Signed-off-by: Sergey Matyukevich Link: https://lore.kernel.org/r/20200213131608.10541-2-sergey.matyukevich.os@quantenna.com Signed-off-by: Johannes Berg commit be0aba826c4a6ba5929def1962a90d6127871969 Author: Kai-Heng Feng Date: Fri Feb 14 14:53:07 2020 +0800 HID: i2c-hid: add Trekstor Surfbook E11B to descriptor override The Surfbook E11B uses the SIPODEV SP1064 touchpad, which does not supply descriptors, so it has to be added to the override list. BugLink: https://bugs.launchpad.net/bugs/1858299 Signed-off-by: Kai-Heng Feng Reviewed-by: Hans de Goede Signed-off-by: Benjamin Tissoires commit cba6437a1854fde5934098ec3bd0ee83af3129f5 Author: Thomas Gleixner Date: Wed Feb 12 12:19:41 2020 +0100 genirq/proc: Reject invalid affinity masks (again) Qian Cai reported that the WARN_ON() in the x86/msi affinity setting code, which catches cases where the affinity setting is not done on the CPU which is the current target of the interrupt, triggers during CPU hotplug stress testing. It turns out that the warning which was added with the commit addressing the MSI affinity race unearthed yet another long standing bug. If user space writes a bogus affinity mask, i.e. it contains no online CPUs, then it calls irq_select_affinity_usr(). This was introduced for ALPHA in eee45269b0f5 ("[PATCH] Alpha: convert to generic irq framework (generic part)") and subsequently made available for all architectures in 18404756765c ("genirq: Expose default irq affinity mask (take 3)") which introduced the circumvention of the affinity setting restrictions for interrupt which cannot be moved in process context. The whole exercise is bogus in various aspects: 1) If the interrupt is already started up then there is absolutely no point to honour a bogus interrupt affinity setting from user space. The interrupt is already assigned to an online CPU and it does not make any sense to reassign it to some other randomly chosen online CPU. 2) If the interupt is not yet started up then there is no point either. A subsequent startup of the interrupt will invoke irq_setup_affinity() anyway which will chose a valid target CPU. So the only correct solution is to just return -EINVAL in case user space wrote an affinity mask which does not contain any online CPUs, except for ALPHA which has it's own magic sauce for this. Fixes: 18404756765c ("genirq: Expose default irq affinity mask (take 3)") Reported-by: Qian Cai Signed-off-by: Thomas Gleixner Tested-by: Qian Cai Link: https://lkml.kernel.org/r/878sl8xdbm.fsf@nanos.tec.linutronix.de commit 51dede9c05df2b78acd6dcf6a17d21f0877d2d7b Author: Thomas Gleixner Date: Thu Feb 13 19:01:34 2020 +0100 x86/mce/amd: Fix kobject lifetime Accessing the MCA thresholding controls in sysfs concurrently with CPU hotplug can lead to a couple of KASAN-reported issues: BUG: KASAN: use-after-free in sysfs_file_ops+0x155/0x180 Read of size 8 at addr ffff888367578940 by task grep/4019 and BUG: KASAN: use-after-free in show_error_count+0x15c/0x180 Read of size 2 at addr ffff888368a05514 by task grep/4454 for example. Both result from the fact that the threshold block creation/teardown code frees the descriptor memory itself instead of defining proper ->release function and leaving it to the driver core to take care of that, after all sysfs accesses have completed. Do that and get rid of the custom freeing code, fixing the above UAFs in the process. [ bp: write commit message. ] Fixes: 95268664390b ("[PATCH] x86_64: mce_amd support for family 0x10 processors") Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Cc: Link: https://lkml.kernel.org/r/20200214082801.13836-1-bp@alien8.de commit c9cc0517bba9f0213f1e55172feceb99e5512daf Author: Jason A. Donenfeld Date: Thu Feb 6 12:42:01 2020 +0100 crypto: chacha20poly1305 - prevent integer overflow on large input This code assigns src_len (size_t) to sl (int), which causes problems when src_len is very large. Probably nobody in the kernel should be passing this much data to chacha20poly1305 all in one go anyway, so I don't think we need to change the algorithm or introduce larger types or anything. But we should at least error out early in this case and print a warning so that we get reports if this does happen and can look into why anybody is possibly passing it that much data or if they're accidently passing -1 or similar. Fixes: d95312a3ccc0 ("crypto: lib/chacha20poly1305 - reimplement crypt_from_sg() routine") Cc: Ard Biesheuvel Cc: stable@vger.kernel.org # 5.5+ Signed-off-by: Jason A. Donenfeld Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 6f4134b30b6ee33e2fd4d602099e6c5e60d0351a Merge: e44c1e3a2941 2aaaa5ee1c3d Author: Dave Airlie Date: Fri Feb 14 13:03:51 2020 +1000 Merge tag 'drm-intel-next-fixes-2020-02-13' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.6-rc2 Most of these were aimed at a "next fixes" pull already during the merge window, but there were issues with the baseline I used, which resulted in a lot of issues in CI. I've regenerated this stuff piecemeal now, adding gradually to it, and it seems healthy now. Due to the issues this is much bigger than I'd like. But it was obviously necessary to take the time to ensure it's not garbage... Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/878sl6yfrn.fsf@intel.com commit e44c1e3a2941fa51d8a2455e61340309d49fc3a5 Merge: 7ebdc26a315a e33a8cfda519 Author: Dave Airlie Date: Fri Feb 14 13:00:56 2020 +1000 Merge tag 'amd-drm-fixes-5.6-2020-02-12' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.6-2020-02-12: amdgpu: - Additional OD fixes for navi - Misc display fixes - VCN 2.5 DPG fix - Prevent build errors on PowerPC on some configs - GDS EDC fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200212224746.3992-1-alexander.deucher@amd.com commit 7ebdc26a315ac0f13369eaf922bcee3ede576438 Merge: 984f0103fcd1 e1cf35b94c5f Author: Dave Airlie Date: Fri Feb 14 12:57:47 2020 +1000 Merge tag 'drm-misc-next-fixes-2020-02-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-next fixes for v5.6: - Fix build error in drm/edid. - Plug close-after-free race in vgem_gem_create. - Handle CONFIG_DMA_API_DEBUG_SG better in drm/msm. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/551b6183-a581-9d12-10a9-24cd929de425@linux.intel.com commit 984f0103fcd153363f77eb6dc68ab6caf8a5a779 Merge: bb6d3fb354c5 7e0cf7e9936c Author: Dave Airlie Date: Fri Feb 14 12:52:49 2020 +1000 Merge tag 'drm-misc-fixes-2020-02-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Fixes for v5.6: - Revert allow_fb_modifiers in sun4i, as it causes a regression for DE2 and DE3. - Fix null pointer deref in drm_dp_mst_process_up_req(). Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/672810c3-4212-0a46-337b-2cb855573fd2@linux.intel.com commit 7155c44624d061692b4c13aa8343f119c67d4fc0 Author: Vladimir Oltean Date: Sun Jan 26 21:49:50 2020 +0200 ARM: dts: ls1021a: Restore MDIO compatible to gianfar The difference between "fsl,etsec2-mdio" and "gianfar" has to do with the .get_tbipa function, which calculates the address of the TBIPA register automatically, if not explicitly specified. [ see drivers/net/ethernet/freescale/fsl_pq_mdio.c ]. On LS1021A, the TBIPA register is at offset 0x30 within the port register block, which is what the "gianfar" method of calculating addresses actually does. Luckily, the bad "compatible" is inconsequential for ls1021a.dtsi, because the TBIPA register is explicitly specified via the second "reg" (<0x0 0x2d10030 0x0 0x4>), so the "get_tbipa" function is dead code. Nonetheless it's good to restore it to its correct value. Background discussion: https://www.spinics.net/lists/stable/msg361156.html Fixes: c7861adbe37f ("ARM: dts: ls1021: Fix SGMII PCS link remaining down after PHY disconnect") Reported-by: Pavel Machek Signed-off-by: Vladimir Oltean Signed-off-by: Shawn Guo commit 5179a9dfa9440c1781816e2c9a183d1d2512dc61 Author: Benjamin Tissoires Date: Thu Feb 13 17:07:47 2020 -0800 Input: synaptics - remove the LEN0049 dmi id from topbuttonpad list The Yoga 11e is using LEN0049, but it doesn't have a trackstick. Thus, there is no need to create a software top buttons row. However, it seems that the device works under SMBus, so keep it as part of the smbus_pnp_ids. Signed-off-by: Benjamin Tissoires Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200115013023.9710-1-benjamin.tissoires@redhat.com Signed-off-by: Dmitry Torokhov commit b8a3d819f872e0a3a0a6db0dbbcd48071042fb98 Author: Gaurav Agrawal Date: Thu Feb 13 17:06:10 2020 -0800 Input: synaptics - enable SMBus on ThinkPad L470 Add touchpad LEN2044 to the list, as it is capable of working with psmouse.synaptics_intertouch=1 Signed-off-by: Gaurav Agrawal Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/CADdtggVzVJq5gGNmFhKSz2MBwjTpdN5YVOdr4D3Hkkv=KZRc9g@mail.gmail.com Signed-off-by: Dmitry Torokhov commit bf502391353b928e63096127e5fd8482080203f5 Author: Lyude Paul Date: Thu Feb 13 16:59:15 2020 -0800 Input: synaptics - switch T470s to RMI4 by default This supports RMI4 and everything seems to work, including the touchpad buttons. So, let's enable this by default. Signed-off-by: Lyude Paul Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200204194322.112638-1-lyude@redhat.com Signed-off-by: Dmitry Torokhov commit a1b9b65edfd8f195dafaebf68f7d321eb9b3ab82 Author: Gustavo A. R. Silva Date: Thu Feb 13 16:57:00 2020 -0800 Input: gpio_keys - replace zero-length array with flexible-array member The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200213002600.GA31916@embeddedor.com Signed-off-by: Dmitry Torokhov commit cfb8d7811f815d17babadd87436300261fd54de7 Author: Gustavo A. R. Silva Date: Thu Feb 13 16:56:48 2020 -0800 Input: goldfish_events - replace zero-length array with flexible-array member The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200213002430.GA31056@embeddedor.com Signed-off-by: Dmitry Torokhov commit 54d6477dca3b65b7b77a903fe60a9447bc836e7f Author: Peng Fan Date: Sun Jan 19 10:09:32 2020 +0000 ARM: dts: imx7d: fix opp-supported-hw Per i.MX7D Document Number: IMX7DCEC Rev. 6, 03/2019, there are only consumer/industrial parts, and 1.2GHz is only support in consumer parts. So exclude automotive from 792/996MHz/1.2GHz and exclude industrial from 1.2GHz. Fixes: d7bfba7296ca ("ARM: dts: imx7d: Update cpufreq OPP table") Cc: Leonard Crestez Signed-off-by: Peng Fan Reviewed-by: Leonard Crestez Signed-off-by: Shawn Guo commit 2ca10259b4189a433c309054496dd6af1415f992 Author: Jens Axboe Date: Thu Feb 13 17:17:35 2020 -0700 io_uring: prune request from overflow list on flush Carter reported an issue where he could produce a stall on ring exit, when we're cleaning up requests that match the given file table. For this particular test case, a combination of a few things caused the issue: - The cq ring was overflown - The request being canceled was in the overflow list The combination of the above means that the cq overflow list holds a reference to the request. The request is canceled correctly, but since the overflow list holds a reference to it, the final put won't happen. Since the final put doesn't happen, the request remains in the inflight. Hence we never finish the cancelation flush. Fix this by removing requests from the overflow list if we're canceling them. Cc: stable@vger.kernel.org # 5.5 Reported-by: Carter Li 李通洲 Signed-off-by: Jens Axboe commit 3da627073b56955b4f1d028c4b8092af59375938 Author: Tyler Hicks Date: Thu Feb 13 21:48:42 2020 +0000 Documentation/process: Swap out the ambassador for Canonical John Johansen will take over as the process ambassador for Canonical when dealing with embargoed hardware issues. Cc: John Johansen Cc: linux-kernel@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: Alex Shi Cc: Harry Wei Cc: Thomas Gleixner Cc: Greg Kroah-Hartman Cc: Jonathan Corbet Acked-by: John Johansen Signed-off-by: Tyler Hicks Link: https://lore.kernel.org/r/20200213214842.21312-1-tyhicks@canonical.com Signed-off-by: Greg Kroah-Hartman commit cabe17d0173ab04bd3f87b8199ae75f43f1ea473 Author: Mika Westerberg Date: Wed Feb 12 17:59:41 2020 +0300 ACPI: watchdog: Set default timeout in probe If the BIOS default timeout for the watchdog is too small userspace may not have enough time to configure new timeout after opening the device before the system is already reset. For this reason program default timeout of 30 seconds in the driver probe and allow userspace to change this from command line or through module parameter (wdat_wdt.timeout). Reported-by: Jean Delvare Signed-off-by: Mika Westerberg Reviewed-by: Jean Delvare Signed-off-by: Rafael J. Wysocki commit 2ba33a4e9e22ac4dda928d3e9b5978a3a2ded4e0 Author: Mika Westerberg Date: Wed Feb 12 17:59:40 2020 +0300 ACPI: watchdog: Fix gas->access_width usage ACPI Generic Address Structure (GAS) access_width field is not in bytes as the driver seems to expect in few places so fix this by using the newly introduced macro ACPI_ACCESS_BYTE_WIDTH(). Fixes: b1abf6fc4982 ("ACPI / watchdog: Fix off-by-one error at resource assignment") Fixes: 058dfc767008 ("ACPI / watchdog: Add support for WDAT hardware watchdog") Reported-by: Jean Delvare Signed-off-by: Mika Westerberg Reviewed-by: Jean Delvare Cc: 4.16+ # 4.16+ Signed-off-by: Rafael J. Wysocki commit 1dade3a7048ccfc675650cd2cf13d578b095e5fb Author: Mika Westerberg Date: Wed Feb 12 17:59:39 2020 +0300 ACPICA: Introduce ACPI_ACCESS_BYTE_WIDTH() macro Sometimes it is useful to find the access_width field value in bytes and not in bits so add a helper that can be used for this purpose. Suggested-by: Jean Delvare Signed-off-by: Mika Westerberg Reviewed-by: Jean Delvare Cc: 4.16+ # 4.16+ Signed-off-by: Rafael J. Wysocki commit b19e8c68470385dd2c5440876591fddb02c8c402 Merge: 1d40890aae81 d91771848f0a Author: Linus Torvalds Date: Thu Feb 13 14:36:57 2020 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Summary below, but it's all reasonably straightforward. There are some more fixes on the horizon, but nothing disastrous yet. Summary: - Fix build when KASLR is enabled but CONFIG_ARCH_RANDOM is not set - Fix context-switching of SSBS state on systems that implement it - Fix spinlock compiler warning introduced during the merge window - Fix incorrect header inclusion (linux/clk-provider.h) - Use SYSCTL_{ZERO,ONE} instead of rolling our own static variables - Don't scream if optional SMMUv3 PMU irq is missing - Remove some unused function prototypes" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: time: Replace by arm64: Fix CONFIG_ARCH_RANDOM=n build perf/smmuv3: Use platform_get_irq_optional() for wired interrupt arm64/spinlock: fix a -Wunused-function warning arm64: ssbs: Fix context-switch when SSBS is present on all CPUs arm64: use shared sysctl constants arm64: Drop do_el0_ia_bp_hardening() & do_sp_pc_abort() declarations commit 1d40890aae812378fdcf47e203abf49476f9c071 Merge: 64ae1342f898 a924eae75106 Author: Linus Torvalds Date: Thu Feb 13 14:34:58 2020 -0800 Merge tag 'gpio-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: - Revert two patches to gpio_do_set_config() and implement the proper solution that works, also drop an unecessary call in set_config() - Fix up the lockdep class for hierarchical IRQ domains. - Remove some bridge code for line directions. - Fix a register access bug in the Xilinx driver. * tag 'gpio-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: sifive: fix static checker warning spmi: pmic-arb: Set lockdep class for hierarchical irq domains gpio: xilinx: Fix bug where the wrong GPIO register is written to gpiolib: remove unnecessary argument from set_config call gpio: bd71828: Remove unneeded defines for GPIO_LINE_DIRECTION_IN/OUT MAINTAINERS: Sort entries in database for GPIO gpiolib: fix gpio_do_set_config() Revert "gpiolib: remove set but not used variable 'config'" Revert "gpiolib: Remove duplicated function gpio_do_set_config()" commit 803381f9f117493d6204d82445a530c834040fe6 Merge: 07134cf69623 45942ba890e6 Author: David S. Miller Date: Thu Feb 13 14:19:00 2020 -0800 Merge branch 'icmp-account-for-NAT-when-sending-icmps-from-ndo-layer' Jason A. Donenfeld says: ==================== icmp: account for NAT when sending icmps from ndo layer The ICMP routines use the source address for two reasons: 1. Rate-limiting ICMP transmissions based on source address, so that one source address cannot provoke a flood of replies. If the source address is wrong, the rate limiting will be incorrectly applied. 2. Choosing the interface and hence new source address of the generated ICMP packet. If the original packet source address is wrong, ICMP replies will be sent from the wrong source address, resulting in either a misdelivery, infoleak, or just general network admin confusion. Most of the time, the icmp_send and icmpv6_send routines can just reach down into the skb's IP header to determine the saddr. However, if icmp_send or icmpv6_send is being called from a network device driver -- there are a few in the tree -- then it's possible that by the time icmp_send or icmpv6_send looks at the packet, the packet's source address has already been transformed by SNAT or MASQUERADE or some other transformation that CONNTRACK knows about. In this case, the packet's source address is most certainly the *wrong* source address to be used for the purpose of ICMP replies. Rather, the source address we want to use for ICMP replies is the original one, from before the transformation occurred. Fortunately, it's very easy to just ask CONNTRACK if it knows about this packet, and if so, how to fix it up. The saddr is the only field in the header we need to fix up, for the purposes of the subsequent processing in the icmp_send and icmpv6_send functions, so we do the lookup very early on, so that the rest of the ICMP machinery can progress as usual. Changes v3->v4: - Add back the skb_shared checking, since the previous assumption isn't actually true [Eric]. This implies dropping the additional patches v3 had for removing skb_share_check from various drivers. We can revisit that general set of ideas later, but that's probably better suited as a net-next patchset rather than this stable one which is geared at fixing bugs. So, this implements things in the safe conservative way. Changes v2->v3: - Add selftest to ensure this actually does what we want and never regresses. - Check the size of the skb header before operating on it. - Use skb_ensure_writable to ensure we can modify the cloned skb [Florian]. - Conditionalize this on IPS_SRC_NAT so we don't do anything unnecessarily [Florian]. - It turns out that since we're calling these from the xmit path, skb_share_check isn't required, so remove that [Florian]. This simplifes the code a bit too. **The supposition here is that skbs passed to ndo_start_xmit are _never_ shared. If this is not correct NOW IS THE TIME TO PIPE UP, for doom awaits us later.** - While investigating the shared skb business, several drivers appeared to be calling it incorrectly in the xmit path, so this series also removes those unnecessary calls, based on the supposition mentioned in the previous point. Changes v1->v2: - icmpv6 takes subtly different types than icmpv4, like u32 instead of be32, u8 instead of int. - Since we're technically writing to the skb, we need to make sure it's not a shared one [Dave, 2017]. - Restore the original skb data after icmp_send returns. All current users are freeing the packet right after, so it doesn't matter, but future users might not. - Remove superfluous route lookup in sunvnet [Dave]. - Use NF_NAT instead of NF_CONNTRACK for condition [Florian]. - Include this cover letter [Dave]. ==================== Signed-off-by: David S. Miller commit 45942ba890e6f35232727a5fa33d732681f4eb9f Author: Jason A. Donenfeld Date: Tue Feb 11 20:47:09 2020 +0100 xfrm: interface: use icmp_ndo_send helper Because xfrmi is calling icmp from network device context, it should use the ndo helper so that the rate limiting applies correctly. Signed-off-by: Jason A. Donenfeld Cc: Nicolas Dichtel Cc: Steffen Klassert Signed-off-by: David S. Miller commit a12d7f3cbdc72c7625881c8dc2660fc2c979fdf2 Author: Jason A. Donenfeld Date: Tue Feb 11 20:47:08 2020 +0100 wireguard: device: use icmp_ndo_send helper Because wireguard is calling icmp from network device context, it should use the ndo helper so that the rate limiting applies correctly. This commit adds a small test to the wireguard test suite to ensure that the new functions continue doing the right thing in the context of wireguard. It does this by setting up a condition that will definately evoke an icmp error message from the driver, but along a nat'd path. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 67c9a7e1e3ac491b5df018803639addc36f154ba Author: Jason A. Donenfeld Date: Tue Feb 11 20:47:07 2020 +0100 sunvnet: use icmp_ndo_send helper Because sunvnet is calling icmp from network device context, it should use the ndo helper so that the rate limiting applies correctly. While we're at it, doing the additional route lookup before calling icmp_ndo_send is superfluous, since this is the job of the icmp code in the first place. Signed-off-by: Jason A. Donenfeld Cc: Shannon Nelson Signed-off-by: David S. Miller commit e0fce6f945a26d4e953a147fe7ca11410322c9fe Author: Jason A. Donenfeld Date: Tue Feb 11 20:47:06 2020 +0100 gtp: use icmp_ndo_send helper Because gtp is calling icmp from network device context, it should use the ndo helper so that the rate limiting applies correctly. Signed-off-by: Jason A. Donenfeld Cc: Harald Welte Signed-off-by: David S. Miller commit 0b41713b606694257b90d61ba7e2712d8457648b Author: Jason A. Donenfeld Date: Tue Feb 11 20:47:05 2020 +0100 icmp: introduce helper for nat'd source address in network device context This introduces a helper function to be called only by network drivers that wraps calls to icmp[v6]_send in a conntrack transformation, in case NAT has been used. We don't want to pollute the non-driver path, though, so we introduce this as a helper to be called by places that actually make use of this, as suggested by Florian. Signed-off-by: Jason A. Donenfeld Cc: Florian Westphal Signed-off-by: David S. Miller commit 64ae1342f8980d05c3df414a022b8123aa76c56b Merge: 0bf999f9c5e7 2343d1529aff Author: Linus Torvalds Date: Thu Feb 13 14:17:39 2020 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "This fixes a Kconfig anomaly when lib/crypto is enabled without Crypto API" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: Kconfig - allow tests to be disabled when manager is disabled commit 07134cf6962377875288b06232d0c41c69d31752 Merge: 6ee2deb6fbed e2debf0852c4 Author: David S. Miller Date: Thu Feb 13 14:16:35 2020 -0800 Merge branch 'skip_sw-skip_hw-validation' Davide Caratti says: ==================== add missing validation of 'skip_hw/skip_sw' ensure that all classifiers currently supporting HW offload validate the 'flags' parameter provided by user: - patch 1/2 fixes cls_matchall - patch 2/2 fixes cls_flower ==================== Signed-off-by: David S. Miller commit e2debf0852c4d66ba1a8bde12869b196094c70a7 Author: Davide Caratti Date: Tue Feb 11 19:33:40 2020 +0100 net/sched: flower: add missing validation of TCA_FLOWER_FLAGS unlike other classifiers that can be offloaded (i.e. users can set flags like 'skip_hw' and 'skip_sw'), 'cls_flower' doesn't validate the size of netlink attribute 'TCA_FLOWER_FLAGS' provided by user: add a proper entry to fl_policy. Fixes: 5b33f48842fa ("net/flower: Introduce hardware offload support") Signed-off-by: Davide Caratti Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 1afa3cc90f8fb745c777884d79eaa1001d6927a6 Author: Davide Caratti Date: Tue Feb 11 19:33:39 2020 +0100 net/sched: matchall: add missing validation of TCA_MATCHALL_FLAGS unlike other classifiers that can be offloaded (i.e. users can set flags like 'skip_hw' and 'skip_sw'), 'cls_matchall' doesn't validate the size of netlink attribute 'TCA_MATCHALL_FLAGS' provided by user: add a proper entry to mall_policy. Fixes: b87f7936a932 ("net/sched: Add match-all classifier hw offloading.") Signed-off-by: Davide Caratti Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 6ee2deb6fbed6ed343040215d10f3c73d00304df Author: Hangbin Liu Date: Tue Feb 11 18:31:54 2020 +0800 net/flow_dissector: remove unexist field description @thoff has moved to struct flow_dissector_key_control. Fixes: 42aecaa9bb2b ("net: Get skb hash over flow_keys structure") Signed-off-by: Hangbin Liu Signed-off-by: David S. Miller commit 304db6cb7610eb9104e1f911b235d87dc4802558 Author: Li RongQing Date: Tue Feb 11 10:13:44 2020 +0800 page_pool: refill page when alloc.count of pool is zero "do {} while" in page_pool_refill_alloc_cache will always refill page once whether refill is true or false, and whether alloc.count of pool is less than PP_ALLOC_CACHE_REFILL or not this is wrong, and will cause overflow of pool->alloc.cache the caller of __page_pool_get_cached should provide guarantee that pool->alloc.cache is safe to access, so in_serving_softirq should be removed as suggested by Jesper Dangaard Brouer in https://patchwork.ozlabs.org/patch/1233713/ so fix this issue by calling page_pool_refill_alloc_cache() only when pool->alloc.count is zero Fixes: 44768decb7c0 ("page_pool: handle page recycle for NUMA_NO_NODE condition") Signed-off-by: Li RongQing Suggested-by: Jesper Dangaard Brouer Acked-by: Jesper Dangaard Brouer Acked-by: Ilias Apalodimas Signed-off-by: David S. Miller commit 89e960b5a99511f21d07da50eb34aeeb46cfba0f Merge: b9287f2ac321 4ee656bba801 Author: David S. Miller Date: Thu Feb 13 14:10:11 2020 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2020-02-12 This series contains fixes to only the ice driver. Dave fixes logic flaws in the DCB rebuild function which is used after a reset. Also fixed a configuration issue when switching between firmware and software LLDP mode where the number of TLV's configured was getting out of sync with what lldpad thinks is configured. Paul fixes how the driver displayed all the supported and advertised link modes by basing it on the PHY capabilities, and in the process cleaned up a lot of code. Brett fixes duplicate receive tail bumps by comparing the value we are writing to tail with the previously written tail value. Also cleaned up workarounds that are no longer needed with the latest NVM images. Anirudh cleaned up unnecessary CONFIG_PCI_IOV wrappers. Updated the driver to use ice_pf_to_dev() instead of &pf->pdev->dev or &vsi->back->pdev->dev. Cleaned up the string format in print function calls to remove newlines where applicable. Akeem updates the link message logging to include "Full Duplex" and "Negotiated", to help distinguish from "Requested" for FEC. Bruce fixes and consolidates the logging of firmware/NVM information during driver load, since the information is duplicate of what is available via ethtool. Fixed the checking of the Unit Load Status bits after reset to ensure they are 0x7FF before continuing, by updating the mask. Cleanup up possible NULL dereferences that were created by a previous commit. Ben fixes the driver to use the correct netif_msg_tx/rx_error() to determine whether to print the MDD event type. Tony provides several trivial fixes, which include whitespace, typos, function header comments, reverse Christmas tree issues. ==================== Signed-off-by: David S. Miller commit 8fc7036ee652207ca992fbb9abb64090c355a9e0 Author: Rob Clark Date: Thu Feb 13 12:01:35 2020 -0800 drm/msm/dpu: fix BGR565 vs RGB565 confusion The component order between the two was swapped, resulting in incorrect color when games with 565 visual hit the overlay path instead of GPU composition. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Rob Clark Reviewed-by: Sean Paul Signed-off-by: Rob Clark commit c6659785dfb3f8d75f1fe637e4222ff8178f5280 Author: Harigovindan P Date: Thu Feb 6 14:42:01 2020 +0530 drm/msm/dsi/pll: call vco set rate explicitly For a given byte clock, if VCO recalc value is exactly same as vco set rate value, vco_set_rate does not get called assuming VCO is already set to required value. But Due to GDSC toggle, VCO values are erased in the HW. To make sure VCO is programmed correctly, we forcefully call set_rate from vco_prepare. Signed-off-by: Harigovindan P Reviewed-by: Jeffrey Hugo Signed-off-by: Rob Clark commit a1028dcfd0dd97884072288d0c8ed7f30399b528 Author: Harigovindan P Date: Thu Feb 6 14:26:15 2020 +0530 drm/msm/dsi: save pll state before dsi host is powered off Save pll state before dsi host is powered off. Without this change some register values gets resetted. Signed-off-by: Harigovindan P Signed-off-by: Rob Clark commit 5d63944f8206a80636ae8cb4b9107d3b49f43d37 Author: Trond Myklebust Date: Thu Feb 13 14:51:07 2020 -0500 NFSv4: Ensure the delegation cred is pinned when we call delegreturn Ensure we don't release the delegation cred during the call to nfs4_proc_delegreturn(). Fixes: ee05f456772d ("NFSv4: Fix races between open and delegreturn") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 8c75593c6eee0f661ddf25dfde0e6ad2a84be7a9 Author: Trond Myklebust Date: Thu Feb 13 14:51:06 2020 -0500 NFSv4: Ensure the delegation is pinned in nfs_do_return_delegation() The call to nfs_do_return_delegation() needs to be taken without any RCU locks. Add a refcount to make sure the delegation remains pinned in memory until we're done. Fixes: ee05f456772d ("NFSv4: Fix races between open and delegreturn") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit cd1b659d8ce7697ee9799b64f887528315b9097b Author: Olga Kornievskaia Date: Wed Feb 12 17:32:12 2020 -0500 NFSv4.1 make cachethis=no for writes Turning caching off for writes on the server should improve performance. Fixes: fba83f34119a ("NFS: Pass "privileged" value to nfs4_init_sequence()") Signed-off-by: Olga Kornievskaia Reviewed-by: Trond Myklebust Signed-off-by: Anna Schumaker commit ca1c671302825182629d3c1a60363cee6f5455bb Author: Chuck Lever Date: Wed Feb 12 11:12:30 2020 -0500 xprtrdma: Fix DMA scatter-gather list mapping imbalance The @nents value that was passed to ib_dma_map_sg() has to be passed to the matching ib_dma_unmap_sg() call. If ib_dma_map_sg() choses to concatenate sg entries, it will return a different nents value than it was passed. The bug was exposed by recent changes to the AMD IOMMU driver, which enabled sg entry concatenation. Looking all the way back to commit 4143f34e01e9 ("xprtrdma: Port to new memory registration API") and reviewing other kernel ULPs, it's not clear that the frwr_map() logic was ever correct for this case. Reported-by: Andre Tomt Suggested-by: Robin Murphy Signed-off-by: Chuck Lever Cc: stable@vger.kernel.org Reviewed-by: Jason Gunthorpe Signed-off-by: Anna Schumaker commit 9a0584f05687947d5a0b87f046bcd2592a55e67c Author: Aleksa Sarai Date: Thu Feb 13 18:26:56 2020 +1100 selftests: openat2: fix build error on newer glibc It appears that newer glibcs check that openat(O_CREAT) was provided a fourth argument (rather than passing garbage), resulting in the following build error: > In file included from /usr/include/fcntl.h:301, > from helpers.c:9: > In function 'openat', > inlined from 'touchat' at helpers.c:49:11: > /usr/include/x86_64-linux-gnu/bits/fcntl2.h:126:4: error: call to > '__openat_missing_mode' declared with attribute error: openat with O_CREAT > or O_TMPFILE in third argument needs 4 arguments > 126 | __openat_missing_mode (); > | ^~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: Shuah Khan Signed-off-by: Aleksa Sarai Tested-by: Shuah Khan Signed-off-by: Shuah Khan commit 3e8393630e928767aeb23f4744518de4ea5cc35a Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Wed Feb 12 14:00:40 2020 +0000 selftests: use LDLIBS for libraries instead of LDFLAGS While building selftests, the following errors were observed: > tools/testing/selftests/timens' > gcc -Wall -Werror -pthread -lrt -ldl timens.c -o tools/testing/selftests/timens/timens > /usr/bin/ld: /tmp/ccGy5CST.o: in function `check_config_posix_timers': > timens.c:(.text+0x65a): undefined reference to `timer_create' > collect2: error: ld returned 1 exit status Quoting commit 870f193d48c2 ("selftests: net: use LDLIBS instead of LDFLAGS"): The default Makefile rule looks like: $(CC) $(CFLAGS) $(LDFLAGS) $@ $^ $(LDLIBS) When linking is done by gcc itself, no issue, but when it needs to be passed to proper ld, only LDLIBS follows and then ld cannot know what libs to link with. More detail: https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html LDFLAGS Extra flags to give to compilers when they are supposed to invoke the linker, ‘ld’, such as -L. Libraries (-lfoo) should be added to the LDLIBS variable instead. LDLIBS Library flags or names given to compilers when they are supposed to invoke the linker, ‘ld’. LOADLIBES is a deprecated (but still supported) alternative to LDLIBS. Non-library linker flags, such as -L, should go in the LDFLAGS variable. While at here, correct other selftests, not only timens ones. Reported-by: Shuah Khan Signed-off-by: Dmitry Safonov Tested-by: Shuah Khan Signed-off-by: Shuah Khan commit 07e6124a1a46b4b5a9b3cacc0c306b50da87abf5 Author: Jiri Slaby Date: Mon Feb 10 09:11:31 2020 +0100 vt: selection, close sel_buffer race syzkaller reported this UAF: BUG: KASAN: use-after-free in n_tty_receive_buf_common+0x2481/0x2940 drivers/tty/n_tty.c:1741 Read of size 1 at addr ffff8880089e40e9 by task syz-executor.1/13184 CPU: 0 PID: 13184 Comm: syz-executor.1 Not tainted 5.4.7 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: ... kasan_report+0xe/0x20 mm/kasan/common.c:634 n_tty_receive_buf_common+0x2481/0x2940 drivers/tty/n_tty.c:1741 tty_ldisc_receive_buf+0xac/0x190 drivers/tty/tty_buffer.c:461 paste_selection+0x297/0x400 drivers/tty/vt/selection.c:372 tioclinux+0x20d/0x4e0 drivers/tty/vt/vt.c:3044 vt_ioctl+0x1bcf/0x28d0 drivers/tty/vt/vt_ioctl.c:364 tty_ioctl+0x525/0x15a0 drivers/tty/tty_io.c:2657 vfs_ioctl fs/ioctl.c:47 [inline] It is due to a race between parallel paste_selection (TIOCL_PASTESEL) and set_selection_user (TIOCL_SETSEL) invocations. One uses sel_buffer, while the other frees it and reallocates a new one for another selection. Add a mutex to close this race. The mutex takes care properly of sel_buffer and sel_buffer_lth only. The other selection global variables (like sel_start, sel_end, and sel_cons) are protected only in set_selection_user. The other functions need quite some more work to close the races of the variables there. This is going to happen later. This likely fixes (I am unsure as there is no reproducer provided) bug 206361 too. It was marked as CVE-2020-8648. Signed-off-by: Jiri Slaby Reported-by: syzbot+59997e8d5cbdc486e6f6@syzkaller.appspotmail.com References: https://bugzilla.kernel.org/show_bug.cgi?id=206361 Cc: stable Link: https://lore.kernel.org/r/20200210081131.23572-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 687bff0cd08f790d540cfb7b2349f0d876cdddec Author: Jiri Slaby Date: Mon Feb 10 09:11:30 2020 +0100 vt: selection, handle pending signals in paste_selection When pasting a selection to a vt, the task is set as INTERRUPTIBLE while waiting for a tty to unthrottle. But signals are not handled at all. Normally, this is not a problem as tty_ldisc_receive_buf receives all the goods and a user has no reason to interrupt the task. There are two scenarios where this matters: 1) when the tty is throttled and a signal is sent to the process, it spins on a CPU until the tty is unthrottled. schedule() does not really echedule, but returns immediately, of course. 2) when the sel_buffer becomes invalid, KASAN prevents any reads from it and the loop simply does not proceed and spins forever (causing the tty to throttle, but the code never sleeps, the same as above). This sometimes happens as there is a race in the sel_buffer handling code. So add signal handling to this ioctl (TIOCL_PASTESEL) and return -EINTR in case a signal is pending. Signed-off-by: Jiri Slaby Cc: stable Link: https://lore.kernel.org/r/20200210081131.23572-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 4508cf76b1ecdf20a456b6b161acbe78f3b23358 Author: Rasmus Villemoes Date: Thu Feb 13 12:43:42 2020 +0100 serial: cpm_uart: call cpm_muram_init before registering console Christophe reports that powerpc 8xx silently fails to 5.6-rc1. It turns out I was wrong about nobody relying on the lazy initialization of the cpm/qe muram in commit b6231ea2b3c6 (soc: fsl: qe: drop broken lazy call of cpm_muram_init()). Rather than reinstating the somewhat dubious lazy call (initializing a currently held spinlock, and implicitly doing a GFP_KERNEL under that spinlock), make sure that cpm_muram_init() is called early enough - I thought the calls from the subsys_initcalls were good enough, but when used by console drivers, that's obviously not the case. cpm_muram_init() is safe to call twice (there's an early return if it is already initialized), so keep the call from cpm_init() - in case SERIAL_CPM_CONSOLE=n. Fixes: b6231ea2b3c6 (soc: fsl: qe: drop broken lazy call of cpm_muram_init()) Reported-by: Christophe Leroy Signed-off-by: Rasmus Villemoes Tested-by: Christophe Leroy Link: https://lore.kernel.org/r/20200213114342.21712-1-linux@rasmusvillemoes.dk Signed-off-by: Greg Kroah-Hartman commit 6e5cf31fbe651bed7ba1df768f2e123531132417 Author: Borislav Petkov Date: Tue Feb 4 13:28:41 2020 +0100 x86/mce/amd: Publish the bank pointer only after setup has succeeded threshold_create_bank() creates a bank descriptor per MCA error thresholding counter which can be controlled over sysfs. It publishes the pointer to that bank in a per-CPU variable and then goes on to create additional thresholding blocks if the bank has such. However, that creation of additional blocks in allocate_threshold_blocks() can fail, leading to a use-after-free through the per-CPU pointer. Therefore, publish that pointer only after all blocks have been setup successfully. Fixes: 019f34fccfd5 ("x86, MCE, AMD: Move shared bank to node descriptor") Reported-by: Saar Amar Reported-by: Dan Carpenter Signed-off-by: Borislav Petkov Cc: Link: http://lkml.kernel.org/r/20200128140846.phctkvx5btiexvbx@kili.mountain commit c96dceeabf765d0b1b1f29c3bf50a5c01315b820 Author: zhangyi (F) Date: Thu Feb 13 14:38:21 2020 +0800 jbd2: do not clear the BH_Mapped flag when forgetting a metadata buffer Commit 904cdbd41d74 ("jbd2: clear dirty flag when revoking a buffer from an older transaction") set the BH_Freed flag when forgetting a metadata buffer which belongs to the committing transaction, it indicate the committing process clear dirty bits when it is done with the buffer. But it also clear the BH_Mapped flag at the same time, which may trigger below NULL pointer oops when block_size < PAGE_SIZE. rmdir 1 kjournald2 mkdir 2 jbd2_journal_commit_transaction commit transaction N jbd2_journal_forget set_buffer_freed(bh1) jbd2_journal_commit_transaction commit transaction N+1 ... clear_buffer_mapped(bh1) ext4_getblk(bh2 ummapped) ... grow_dev_page init_page_buffers bh1->b_private=NULL bh2->b_private=NULL jbd2_journal_put_journal_head(jh1) __journal_remove_journal_head(hb1) jh1 is NULL and trigger oops *) Dir entry block bh1 and bh2 belongs to one page, and the bh2 has already been unmapped. For the metadata buffer we forgetting, we should always keep the mapped flag and clear the dirty flags is enough, so this patch pick out the these buffers and keep their BH_Mapped flag. Link: https://lore.kernel.org/r/20200213063821.30455-3-yi.zhang@huawei.com Fixes: 904cdbd41d74 ("jbd2: clear dirty flag when revoking a buffer from an older transaction") Reviewed-by: Jan Kara Signed-off-by: zhangyi (F) Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 6a66a7ded12baa6ebbb2e3e82f8cb91382814839 Author: zhangyi (F) Date: Thu Feb 13 14:38:20 2020 +0800 jbd2: move the clearing of b_modified flag to the journal_unmap_buffer() There is no need to delay the clearing of b_modified flag to the transaction committing time when unmapping the journalled buffer, so just move it to the journal_unmap_buffer(). Link: https://lore.kernel.org/r/20200213063821.30455-2-yi.zhang@huawei.com Reviewed-by: Jan Kara Signed-off-by: zhangyi (F) Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit af133ade9a40794a37104ecbcc2827c0ea373a3c Author: Shijie Luo Date: Mon Feb 10 20:17:52 2020 -0500 ext4: add cond_resched() to ext4_protect_reserved_inode When journal size is set too big by "mkfs.ext4 -J size=", or when we mount a crafted image to make journal inode->i_size too big, the loop, "while (i < num)", holds cpu too long. This could cause soft lockup. [ 529.357541] Call trace: [ 529.357551] dump_backtrace+0x0/0x198 [ 529.357555] show_stack+0x24/0x30 [ 529.357562] dump_stack+0xa4/0xcc [ 529.357568] watchdog_timer_fn+0x300/0x3e8 [ 529.357574] __hrtimer_run_queues+0x114/0x358 [ 529.357576] hrtimer_interrupt+0x104/0x2d8 [ 529.357580] arch_timer_handler_virt+0x38/0x58 [ 529.357584] handle_percpu_devid_irq+0x90/0x248 [ 529.357588] generic_handle_irq+0x34/0x50 [ 529.357590] __handle_domain_irq+0x68/0xc0 [ 529.357593] gic_handle_irq+0x6c/0x150 [ 529.357595] el1_irq+0xb8/0x140 [ 529.357599] __ll_sc_atomic_add_return_acquire+0x14/0x20 [ 529.357668] ext4_map_blocks+0x64/0x5c0 [ext4] [ 529.357693] ext4_setup_system_zone+0x330/0x458 [ext4] [ 529.357717] ext4_fill_super+0x2170/0x2ba8 [ext4] [ 529.357722] mount_bdev+0x1a8/0x1e8 [ 529.357746] ext4_mount+0x44/0x58 [ext4] [ 529.357748] mount_fs+0x50/0x170 [ 529.357752] vfs_kern_mount.part.9+0x54/0x188 [ 529.357755] do_mount+0x5ac/0xd78 [ 529.357758] ksys_mount+0x9c/0x118 [ 529.357760] __arm64_sys_mount+0x28/0x38 [ 529.357764] el0_svc_common+0x78/0x130 [ 529.357766] el0_svc_handler+0x38/0x78 [ 529.357769] el0_svc+0x8/0xc [ 541.356516] watchdog: BUG: soft lockup - CPU#0 stuck for 23s! [mount:18674] Link: https://lore.kernel.org/r/20200211011752.29242-1-luoshijie1@huawei.com Reviewed-by: Jan Kara Signed-off-by: Shijie Luo Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 48a34311953d921235f4d7bbd2111690d2e469cf Author: Jan Kara Date: Mon Feb 10 15:43:16 2020 +0100 ext4: fix checksum errors with indexed dirs DIR_INDEX has been introduced as a compat ext4 feature. That means that even kernels / tools that don't understand the feature may modify the filesystem. This works because for kernels not understanding indexed dir format, internal htree nodes appear just as empty directory entries. Index dir aware kernels then check the htree structure is still consistent before using the data. This all worked reasonably well until metadata checksums were introduced. The problem is that these effectively made DIR_INDEX only ro-compatible because internal htree nodes store checksums in a different place than normal directory blocks. Thus any modification ignorant to DIR_INDEX (or just clearing EXT4_INDEX_FL from the inode) will effectively cause checksum mismatch and trigger kernel errors. So we have to be more careful when dealing with indexed directories on filesystems with checksumming enabled. 1) We just disallow loading any directory inodes with EXT4_INDEX_FL when DIR_INDEX is not enabled. This is harsh but it should be very rare (it means someone disabled DIR_INDEX on existing filesystem and didn't run e2fsck), e2fsck can fix the problem, and we don't want to answer the difficult question: "Should we rather corrupt the directory more or should we ignore that DIR_INDEX feature is not set?" 2) When we find out htree structure is corrupted (but the filesystem and the directory should in support htrees), we continue just ignoring htree information for reading but we refuse to add new entries to the directory to avoid corrupting it more. Link: https://lore.kernel.org/r/20200210144316.22081-1-jack@suse.cz Fixes: dbe89444042a ("ext4: Calculate and verify checksums for htree nodes") Reviewed-by: Andreas Dilger Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 4f97a68192bd33b9963b400759cef0ca5963af00 Author: Theodore Ts'o Date: Thu Feb 6 17:35:01 2020 -0500 ext4: fix support for inode sizes > 1024 bytes A recent commit, 9803387c55f7 ("ext4: validate the debug_want_extra_isize mount option at parse time"), moved mount-time checks around. One of those changes moved the inode size check before the blocksize variable was set to the blocksize of the file system. After 9803387c55f7 was set to the minimum allowable blocksize, which in practice on most systems would be 1024 bytes. This cuased file systems with inode sizes larger than 1024 bytes to be rejected with a message: EXT4-fs (sdXX): unsupported inode size: 4096 Fixes: 9803387c55f7 ("ext4: validate the debug_want_extra_isize mount option at parse time") Link: https://lore.kernel.org/r/20200206225252.GA3673@mit.edu Reported-by: Herbert Poetzl Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit c7ff8573ad21dcdcbcffd66fbfca3b53cd67d2b1 Author: Harald Freudenberger Date: Wed Jan 22 14:43:23 2020 +0100 crypto/testmgr: enable selftests for paes-s390 ciphers This patch enables the selftests for the s390 specific protected key AES (PAES) cipher implementations: * cbc-paes-s390 * ctr-paes-s390 * ecb-paes-s390 * xts-paes-s390 PAES is an AES cipher but with encrypted ('protected') key material. However, the paes ciphers are able to derive an protected key from clear key material with the help of the pkey kernel module. So this patch now enables the generic AES tests for the paes ciphers. Under the hood the setkey() functions rearrange the clear key values as clear key token and so the pkey kernel module is able to provide protected key blobs from the given clear key values. The derived protected key blobs are then used within the paes cipers and should produce the very same results as the generic AES implementation with the clear key values. The s390-paes cipher testlist entries are surrounded by #if IS_ENABLED(CONFIG_CRYPTO_PAES_S390) because they don't make any sense on non s390 platforms or without the PAES cipher implementation. Link: http://lkml.kernel.org/r/20200213083946.zicarnnt3wizl5ty@gondor.apana.org.au Acked-by: Herbert Xu Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 46d36880d1c6f9b9a0cbaf90235355ea1f4cab96 Author: Jan Kara Date: Thu Jan 30 12:11:48 2020 +0100 ext4: simplify checking quota limits in ext4_statfs() Coverity reports that conditions checking quota limits in ext4_statfs() contain dead code. Indeed it is right and current conditions can be simplified. Link: https://lore.kernel.org/r/20200130111148.10766-1-jack@suse.cz Reported-by: Coverity Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 14c9ca0583eee8df285d68a0e6ec71053efd2228 Author: Andreas Dilger Date: Sun Jan 26 15:03:34 2020 -0700 ext4: don't assume that mmp_nodename/bdevname have NUL Don't assume that the mmp_nodename and mmp_bdevname strings are NUL terminated, since they are filled in by snprintf(), which is not guaranteed to do so. Link: https://lore.kernel.org/r/1580076215-1048-1-git-send-email-adilger@dilger.ca Signed-off-by: Andreas Dilger Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit 1dd017882e01d2fcd9c5dbbf1eb376211111c393 Author: Leon Romanovsky Date: Wed Feb 12 10:06:51 2020 +0200 RDMA/core: Fix protection fault in get_pkey_idx_qp_list We don't need to set pkey as valid in case that user set only one of pkey index or port number, otherwise it will be resulted in NULL pointer dereference while accessing to uninitialized pkey list. The following crash from Syzkaller revealed it. kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN PTI CPU: 1 PID: 14753 Comm: syz-executor.2 Not tainted 5.5.0-rc5 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 RIP: 0010:get_pkey_idx_qp_list+0x161/0x2d0 Code: 01 00 00 49 8b 5e 20 4c 39 e3 0f 84 b9 00 00 00 e8 e4 42 6e fe 48 8d 7b 10 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 01 0f 8e d0 00 00 00 48 8d 7d 04 48 b8 RSP: 0018:ffffc9000bc6f950 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff82c8bdec RDX: 0000000000000002 RSI: ffffc900030a8000 RDI: 0000000000000010 RBP: ffff888112c8ce80 R08: 0000000000000004 R09: fffff5200178df1f R10: 0000000000000001 R11: fffff5200178df1f R12: ffff888115dc4430 R13: ffff888115da8498 R14: ffff888115dc4410 R15: ffff888115da8000 FS: 00007f20777de700(0000) GS:ffff88811b100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b2f721000 CR3: 00000001173ca002 CR4: 0000000000360ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: port_pkey_list_insert+0xd7/0x7c0 ib_security_modify_qp+0x6fa/0xfc0 _ib_modify_qp+0x8c4/0xbf0 modify_qp+0x10da/0x16d0 ib_uverbs_modify_qp+0x9a/0x100 ib_uverbs_write+0xaa5/0xdf0 __vfs_write+0x7c/0x100 vfs_write+0x168/0x4a0 ksys_write+0xc8/0x200 do_syscall_64+0x9c/0x390 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: d291f1a65232 ("IB/core: Enforce PKey security on QPs") Link: https://lore.kernel.org/r/20200212080651.GB679970@unreal Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Message-Id: <20200212080651.GB679970@unreal> commit 450c52c7847b5aea1eeba85391252c87198a5099 Merge: 03cd45d2e219 42cd5ffe46c1 Author: Greg Kroah-Hartman Date: Thu Feb 13 08:31:21 2020 -0800 Merge tag 'fixes-for-v5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: USB: fixes for v5.6-rc1 DWC3 learned that we can't always depend on Event Status bits. A problem was solved which would only surface with scatter list on IN endpoints. DWC2 got a fix for feature requests (both set and clear) and GetStatus request. The serial gadget got a fix for a TX stall bug. Composite framework now works better for SSP devices. * tag 'fixes-for-v5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: usb: dwc3: debug: fix string position formatting mixup with ret and len usb: gadget: serial: fix Tx stall after buffer overflow usb: gadget: ffs: ffs_aio_cancel(): Save/restore IRQ flags usb: dwc2: Fix SET/CLEAR_FEATURE and GET_STATUS flows usb: dwc2: Fix in ISOC request length checking usb: gadget: composite: Support more than 500mA MaxPower usb: gadget: composite: Fix bMaxPower for SuperSpeedPlus usb: gadget: u_audio: Fix high-speed max packet size usb: dwc3: gadget: Check for IOC/LST bit in TRB->ctrl fields commit 4ec31cb6241d95879aac337cc6b50c45dd10cfcb Author: Coly Li Date: Thu Feb 13 22:12:07 2020 +0800 bcache: remove macro nr_to_fifo_front() Macro nr_to_fifo_front() is only used once in btree_flush_write(), it is unncessary indeed. This patch removes this macro and does calculation directly in place. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 309cc719a2c869b71a7388209a0a80d4284d98fd Author: Coly Li Date: Thu Feb 13 22:12:06 2020 +0800 bcache: Revert "bcache: shrink btree node cache after bch_btree_check()" This reverts commit 1df3877ff6a4810054237c3259d900ded4468969. In my testing, sometimes even all the cached btree nodes are freed, creating gc and allocator kernel threads may still fail. Finally it turns out that kthread_run() may fail if there is pending signal for current task. And the pending signal is sent from OOM killer which is triggered by memory consuption in bch_btree_check(). Therefore explicitly shrinking bcache btree node here does not help, and after the shrinker callback is improved, as well as pending signals are ignored before creating kernel threads, now such operation is unncessary anymore. This patch reverts the commit 1df3877ff6a4 ("bcache: shrink btree node cache after bch_btree_check()") because we have better improvement now. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 0b96da639a4874311e9b5156405f69ef9fc3bef8 Author: Coly Li Date: Thu Feb 13 22:12:05 2020 +0800 bcache: ignore pending signals when creating gc and allocator thread When run a cache set, all the bcache btree node of this cache set will be checked by bch_btree_check(). If the bcache btree is very large, iterating all the btree nodes will occupy too much system memory and the bcache registering process might be selected and killed by system OOM killer. kthread_run() will fail if current process has pending signal, therefore the kthread creating in run_cache_set() for gc and allocator kernel threads are very probably failed for a very large bcache btree. Indeed such OOM is safe and the registering process will exit after the registration done. Therefore this patch flushes pending signals during the cache set start up, specificly in bch_cache_allocator_start() and bch_gc_thread_start(), to make sure run_cache_set() won't fail for large cahced data set. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 0fbb027b44e79700da80e4b8bd1c1914d4796af6 Author: Takashi Iwai Date: Thu Feb 13 07:03:49 2020 +0100 ALSA: pcm: Fix double hw_free calls The commit 66f2d19f8116 ("ALSA: pcm: Fix memory leak at closing a stream without hw_free") tried to fix the regression wrt the missing hw_free call at closing without SNDRV_PCM_IOCTL_HW_FREE ioctl. However, the code change dropped mistakenly the state check, resulting in calling hw_free twice when SNDRV_PCM_IOCTL_HW_FRE got called beforehand. For most drivers, this is almost harmless, but the drivers like SOF show another regression now. This patch adds the state condition check before calling do_hw_free() at releasing the stream for avoiding the double hw_free calls. Fixes: 66f2d19f8116 ("ALSA: pcm: Fix memory leak at closing a stream without hw_free") Reported-by: Bard Liao Reported-by: Pierre-Louis Bossart Tested-by: Pierre-Louis Bossart Cc: Link: https://lore.kernel.org/r/s5hd0ajyprg.wl-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2227ab4216cd4d56619733bcfaee7e6943cdc9aa Author: Dan Carpenter Date: Wed Feb 5 15:32:48 2020 +0300 dmaengine: idxd: Fix error handling in idxd_wq_cdev_dev_setup() We can't call kfree(dev) after calling device_register(dev). The "dev" pointer has to be freed using put_device(). Fixes: 42d279f9137a ("dmaengine: idxd: add char driver to expose submission portal to userland") Signed-off-by: Dan Carpenter Acked-by: Dave Jiang Link: https://lore.kernel.org/r/20200205123248.hmtog7qa2eiqaagh@kili.mountain Signed-off-by: Vinod Koul commit 83c49f734463980802d6dba376f69e787fb07a8e Author: Changbin Du Date: Tue Feb 4 20:51:15 2020 +0800 dmaengine: doc: fix warnings/issues of client.rst This fixed some warnings/issues of client.rst. o Need a blank line for enumerated lists. o Do not create section in enumerated list. o Remove suffix ':' from section title. Signed-off-by: Changbin Du Link: https://lore.kernel.org/r/20200204125115.12128-1-changbin.du@gmail.com Signed-off-by: Vinod Koul commit 8ac0e6641c7ca14833a2a8c6f13d8e0a435e535c Author: Zhu Yanjun Date: Wed Feb 12 09:26:33 2020 +0200 RDMA/rxe: Fix soft lockup problem due to using tasklets in softirq When run stress tests with RXE, the following Call Traces often occur watchdog: BUG: soft lockup - CPU#2 stuck for 22s! [swapper/2:0] ... Call Trace: create_object+0x3f/0x3b0 kmem_cache_alloc_node_trace+0x129/0x2d0 __kmalloc_reserve.isra.52+0x2e/0x80 __alloc_skb+0x83/0x270 rxe_init_packet+0x99/0x150 [rdma_rxe] rxe_requester+0x34e/0x11a0 [rdma_rxe] rxe_do_task+0x85/0xf0 [rdma_rxe] tasklet_action_common.isra.21+0xeb/0x100 __do_softirq+0xd0/0x298 irq_exit+0xc5/0xd0 smp_apic_timer_interrupt+0x68/0x120 apic_timer_interrupt+0xf/0x20 ... The root cause is that tasklet is actually a softirq. In a tasklet handler, another softirq handler is triggered. Usually these softirq handlers run on the same cpu core. So this will cause "soft lockup Bug". Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20200212072635.682689-8-leon@kernel.org Signed-off-by: Zhu Yanjun Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 61b5865d56bbb09dd5887b197dd324d1d4333d47 Author: Dave Jiang Date: Tue Feb 11 10:42:47 2020 -0700 dmaengine: idxd: fix runaway module ref count on device driver bind idxd_config_bus_probe() calls try_module_get() but never calls module_put() when it fails. Thus with every failed attempt, the ref count goes up. Add module_put() in failure paths. Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver") Reported-by: Jerry Chen Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/158144296730.41381.12134210685456322434.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 9b6d3bbc1335404b331f4f11dc896066bdf1c752 Author: Leon Romanovsky Date: Wed Feb 12 09:26:35 2020 +0200 RDMA/mlx5: Prevent overflow in mmap offset calculations The cmd and index variables declared as u16 and the result is supposed to be stored in u64. The C arithmetic rules doesn't promote "(index >> 8) << 16" to be u64 and leaves the end result to be u16. Fixes: 7be76bef320b ("IB/mlx5: Introduce VAR object and its alloc/destroy methods") Link: https://lore.kernel.org/r/20200212072635.682689-10-leon@kernel.org Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 9ea04d0df6e6541c6736b43bff45f1e54875a1db Author: Yonatan Cohen Date: Wed Feb 12 09:26:34 2020 +0200 IB/umad: Fix kernel crash while unloading ib_umad When disassociating a device from umad we must ensure that the sysfs access is prevented before blocking the fops, otherwise assumptions in syfs don't hold: CPU0 CPU1 ib_umad_kill_port() ibdev_show() port->ib_dev = NULL dev_name(port->ib_dev) The prior patch made an error in moving the device_destroy(), it should have been split into device_del() (above) and put_device() (below). At this point we already have the split, so move the device_del() back to its original place. kernel stack PF: error_code(0x0000) - not-present page Oops: 0000 [#1] SMP DEBUG_PAGEALLOC PTI RIP: 0010:ibdev_show+0x18/0x50 [ib_umad] RSP: 0018:ffffc9000097fe40 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffffffffa0441120 RCX: ffff8881df514000 RDX: ffff8881df514000 RSI: ffffffffa0441120 RDI: ffff8881df1e8870 RBP: ffffffff81caf000 R08: ffff8881df1e8870 R09: 0000000000000000 R10: 0000000000001000 R11: 0000000000000003 R12: ffff88822f550b40 R13: 0000000000000001 R14: ffffc9000097ff08 R15: ffff8882238bad58 FS: 00007f1437ff3740(0000) GS:ffff888236940000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000004e8 CR3: 00000001e0dfc001 CR4: 00000000001606e0 Call Trace: dev_attr_show+0x15/0x50 sysfs_kf_seq_show+0xb8/0x1a0 seq_read+0x12d/0x350 vfs_read+0x89/0x140 ksys_read+0x55/0xd0 do_syscall_64+0x55/0x1b0 entry_SYSCALL_64_after_hwframe+0x44/0xa9: Fixes: cf7ad3030271 ("IB/umad: Avoid destroying device while it is accessed") Link: https://lore.kernel.org/r/20200212072635.682689-9-leon@kernel.org Signed-off-by: Yonatan Cohen Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 9051db381fabe75079ef38135ab73c5dd3a7c3e5 Author: Stephen Boyd Date: Thu Feb 6 08:21:24 2020 -0800 mmc: sdhci-msm: Mark sdhci_msm_cqe_disable static This function is not exported and only used in this file. Mark it static. Cc: Ritesh Harjani Cc: Veerabhadrarao Badiganti Fixes: 87a8df0dce6a ("mmc: sdhci-msm: Add CQHCI support for sdhci-msm") Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200206162124.201195-1-swboyd@chromium.org Signed-off-by: Ulf Hansson commit a8af8694a5e8ddaaef4bd7b6426c12b7759c846c Author: Yishai Hadas Date: Wed Feb 12 09:26:32 2020 +0200 RDMA/mlx5: Fix async events cleanup flows As in the prior patch, the devx code is not fully cleaning up its event_lists before finishing driver_destroy allowing a later read to trigger user after free conditions. Re-arrange things so that the event_list is always empty after destroy and ensure it remains empty until the file is closed. Fixes: f7c8416ccea5 ("RDMA/core: Simplify destruction of FD uobjects") Link: https://lore.kernel.org/r/20200212072635.682689-7-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit a0767da7774d91a668f9c223cec3e76172cd833b Author: Michael Guralnik Date: Wed Feb 12 09:26:31 2020 +0200 RDMA/core: Add missing list deletion on freeing event queue When the uobject file scheme was revised to allow device disassociation from the file it became possible for read() to still happen the driver destroys the uobject. The old clode code was not tolerant to concurrent read, and when it was moved to the driver destroy it creates a bug. Ensure the event_list is empty after driver destroy by adding the missing list_del(). Otherwise read() can trigger a use after free and double kfree. Fixes: f7c8416ccea5 ("RDMA/core: Simplify destruction of FD uobjects") Link: https://lore.kernel.org/r/20200212072635.682689-6-leon@kernel.org Signed-off-by: Michael Guralnik Reviewed-by: Yishai Hadas Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 512a928affd51c2dc631401e56ad5ee5d5dd68b6 Author: Ahmad Fatoum Date: Thu Jan 16 15:18:49 2020 +0100 ARM: imx: build v7_cpu_resume() unconditionally This function is not only needed by the platform suspend code, but is also reused as the CPU resume function when the ARM cores can be powered down completely in deep idle, which is the case on i.MX6SX and i.MX6UL(L). Providing the static inline stub whenever CONFIG_SUSPEND is disabled means that those platforms will hang on resume from cpuidle if suspend is disabled. So there are two problems: - The static inline stub masks the linker error - The function is not available where needed Fix both by just building the function unconditionally, when CONFIG_SOC_IMX6 is enabled. The actual code is three instructions long, so it's arguably ok to just leave it in for all i.MX6 kernel configurations. Fixes: 05136f0897b5 ("ARM: imx: support arm power off in cpuidle for i.mx6sx") Signed-off-by: Lucas Stach Signed-off-by: Ahmad Fatoum Signed-off-by: Rouven Czerwinski Signed-off-by: Shawn Guo commit b6570fdb96edf45bcf71884bd2644bd73d348d1a Author: Samuel Holland Date: Thu Feb 13 00:11:44 2020 -0600 ASoC: codec2codec: avoid invalid/double-free of pcm runtime The PCM runtime was freed during PMU in the case that the event hook encountered an error. However, it is also unconditionally freed during PMD. Avoid a double-free by dropping the call to kfree in the PMU hook. Fixes: a72706ed8208 ("ASoC: codec2codec: remove ephemeral variables") Cc: stable@vger.kernel.org Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20200213061147.29386-2-samuel@sholland.org Signed-off-by: Mark Brown commit 03cd45d2e219301880cabc357e3cf478a500080f Author: Mika Westerberg Date: Thu Feb 13 12:56:04 2020 +0300 thunderbolt: Prevent crash if non-active NVMem file is read The driver does not populate .reg_read callback for the non-active NVMem because the file is supposed to be write-only. However, it turns out NVMem subsystem does not yet support this and expects that the .reg_read callback is provided. If user reads the binary attribute it triggers NULL pointer dereference like this one: BUG: kernel NULL pointer dereference, address: 0000000000000000 ... Call Trace: bin_attr_nvmem_read+0x64/0x80 kernfs_fop_read+0xa7/0x180 vfs_read+0xbd/0x170 ksys_read+0x5a/0xd0 do_syscall_64+0x43/0x150 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fix this in the driver by providing .reg_read callback that always returns an error. Reported-by: Nicholas Johnson Fixes: e6b245ccd524 ("thunderbolt: Add support for host and device NVM firmware upgrade") Signed-off-by: Mika Westerberg Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200213095604.1074-1-mika.westerberg@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit eb0bbba7636b9fc81939d6087a5fe575e150c95a Author: Marco Felsch Date: Thu Jan 16 15:01:08 2020 +0100 ARM: dts: imx6: phycore-som: fix emmc supply Currently the vmmc is supplied by the 1.8V pmic rail but this is wrong. The default module behaviour is to power VCCQ and VCC by the 3.3V power rail. Optional the user can connect the VCCQ to the pmic 1.8V emmc power rail using a solder jumper. Fixes: ddec5d1c0047 ("ARM: dts: imx6: Add initial support for phyCORE-i.MX 6 SOM") Signed-off-by: Marco Felsch Signed-off-by: Shawn Guo commit d593126a96b5764116e689e77a66dd1a7823f429 Merge: 57d7713196cc 7c3d02285ad5 Author: Greg Kroah-Hartman Date: Thu Feb 13 04:53:29 2020 -0800 Merge tag 'usb-serial-5.6-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 5.6-rc2 Here's a fix for a ch341 regression in 5.5 which people have started to hit, and a fix for a logic error in an ir-usb error path. Both have been in linux-next with no reported issues. Signed-off-by: Johan Hovold * tag 'usb-serial-5.6-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: ch341: fix receiver regression USB: serial: ir-usb: Silence harmless uninitialized variable warning commit 4d59588c09f2a2daedad2a544d4d1b602ab3a8af Author: Robert Richter Date: Wed Feb 12 13:03:39 2020 +0100 EDAC/sysfs: Remove csrow objects on errors All created csrow objects must be removed in the error path of edac_create_csrow_objects(). The objects have been added as devices. They need to be removed by doing a device_del() *and* put_device() call to also free their memory. The missing put_device() leaves a memory leak. Use device_unregister() instead of device_del() which properly unregisters the device doing both. Fixes: 7adc05d2dc3a ("EDAC/sysfs: Drop device references properly") Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Tested-by: John Garry Cc: Link: https://lkml.kernel.org/r/20200212120340.4764-4-rrichter@marvell.com commit 216aa145aaf379a50b17afc812db71d893bd6683 Author: Robert Richter Date: Wed Feb 12 18:25:18 2020 +0100 EDAC/mc: Fix use-after-free and memleaks during device removal A test kernel with the options DEBUG_TEST_DRIVER_REMOVE, KASAN and DEBUG_KMEMLEAK set, revealed several issues when removing an mci device: 1) Use-after-free: On 27.11.19 17:07:33, John Garry wrote: > [ 22.104498] BUG: KASAN: use-after-free in > edac_remove_sysfs_mci_device+0x148/0x180 The use-after-free is caused by the mci_for_each_dimm() macro called in edac_remove_sysfs_mci_device(). The iterator was introduced with c498afaf7df8 ("EDAC: Introduce an mci_for_each_dimm() iterator"). The iterator loop calls device_unregister(&dimm->dev), which removes the sysfs entry of the device, but also frees the dimm struct in dimm_attr_release(). When incrementing the loop in mci_for_each_dimm(), the dimm struct is accessed again, after having been freed already. The fix is to free all the mci device's subsequent dimm and csrow objects at a later point, in _edac_mc_free(), when the mci device itself is being freed. This keeps the data structures intact and the mci device can be fully used until its removal. The change allows the safe usage of mci_for_each_dimm() to release dimm devices from sysfs. 2) Memory leaks: Following memory leaks have been detected: # grep edac /sys/kernel/debug/kmemleak | sort | uniq -c 1 [<000000003c0f58f9>] edac_mc_alloc+0x3bc/0x9d0 # mci->csrows 16 [<00000000bb932dc0>] edac_mc_alloc+0x49c/0x9d0 # csr->channels 16 [<00000000e2734dba>] edac_mc_alloc+0x518/0x9d0 # csr->channels[chn] 1 [<00000000eb040168>] edac_mc_alloc+0x5c8/0x9d0 # mci->dimms 34 [<00000000ef737c29>] ghes_edac_register+0x1c8/0x3f8 # see edac_mc_alloc() All leaks are from memory allocated by edac_mc_alloc(). Note: The test above shows that edac_mc_alloc() was called here from ghes_edac_register(), thus both functions show up in the stack trace but the module causing the leaks is edac_mc. The comments with the data structures involved were made manually by analyzing the objdump. The data structures listed above and created by edac_mc_alloc() are not properly removed during device removal, which is done in edac_mc_free(). There are two paths implemented to remove the device depending on device registration, _edac_mc_free() is called if the device is not registered and edac_unregister_sysfs() otherwise. The implemenations differ. For the sysfs case, the mci device removal lacks the removal of subsequent data structures (csrows, channels, dimms). This causes the memory leaks (see mci_attr_release()). [ bp: Massage commit message. ] Fixes: c498afaf7df8 ("EDAC: Introduce an mci_for_each_dimm() iterator") Fixes: faa2ad09c01c ("edac_mc: edac_mc_free() cannot assume mem_ctl_info is registered in sysfs.") Fixes: 7a623c039075 ("edac: rewrite the sysfs code to use struct device") Reported-by: John Garry Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Tested-by: John Garry Cc: Link: https://lkml.kernel.org/r/20200212120340.4764-3-rrichter@marvell.com commit a9149d243f259ad8f02b1e23dfe8ba06128f15e1 Author: Dan Moulding Date: Tue Jan 28 02:31:07 2020 -0700 iwlwifi: mvm: Do not require PHY_SKU NVM section for 3168 devices The logic for checking required NVM sections was recently fixed in commit b3f20e098293 ("iwlwifi: mvm: fix NVM check for 3168 devices"). However, with that fixed the else is now taken for 3168 devices and within the else clause there is a mandatory check for the PHY_SKU section. This causes the parsing to fail for 3168 devices. The PHY_SKU section is really only mandatory for the IWL_NVM_EXT layout (the phy_sku parameter of iwl_parse_nvm_data is only used when the NVM type is IWL_NVM_EXT). So this changes the PHY_SKU section check so that it's only mandatory for IWL_NVM_EXT. Fixes: b3f20e098293 ("iwlwifi: mvm: fix NVM check for 3168 devices") Signed-off-by: Dan Moulding Signed-off-by: Kalle Valo commit 872d92dec353a8d30fa186892cd5ea3e17ca75d3 Author: Hongbo Yao Date: Wed Jan 22 17:12:38 2020 +0800 tee: amdtee: amdtee depends on CRYPTO_DEV_CCP_DD If CRYPTO_DEV_CCP_DD=m and AMDTEE=y, the following error is seen while building call.c or core.c drivers/tee/amdtee/call.o: In function `handle_unload_ta': call.c:(.text+0x35f): undefined reference to `psp_tee_process_cmd' drivers/tee/amdtee/core.o: In function `amdtee_driver_init': core.c:(.init.text+0xf): undefined reference to `psp_check_tee_status Fix the config dependency for AMDTEE here. Reported-by: Hulk Robot Fixes: 757cc3e9ff1d ("tee: add AMD-TEE driver") Signed-off-by: Hongbo Yao Reviewed-by: Rijo Thomas Acked-by: Jens Wiklander Signed-off-by: Herbert Xu commit 54498e8070e19e74498a72c7331348143e7e1f8c Author: Gustavo A. R. Silva Date: Tue Feb 11 08:47:04 2020 -0600 i2c: altera: Fix potential integer overflow Factor out 100 from the equation and do 32-bit arithmetic (3 * clk_mhz / 10) instead of 64-bit. Notice that clk_mhz is MHz, so the multiplication will never wrap 32 bits and there is no need for div_u64(). Addresses-Coverity: 1458369 ("Unintentional integer overflow") Fixes: 0560ad576268 ("i2c: altera: Add Altera I2C Controller driver") Suggested-by: David Laight Signed-off-by: Gustavo A. R. Silva Reviewed-by: Thor Thayer Signed-off-by: Wolfram Sang commit 9e661cedcc0a072d91a32cb88e0515ea26e35711 Author: Wolfram Sang Date: Wed Feb 12 10:35:30 2020 +0100 i2c: jz4780: silence log flood on txabrt The printout for txabrt is way too talkative and is highly annoying with scanning programs like 'i2cdetect'. Reduce it to the minimum, the rest can be gained by I2C core debugging and datasheet information. Also, make it a debug printout, it won't help the regular user. Fixes: ba92222ed63a ("i2c: jz4780: Add i2c bus controller driver for Ingenic JZ4780") Reported-by: H. Nikolaus Schaller Tested-by: H. Nikolaus Schaller Signed-off-by: Wolfram Sang commit 3e8cb8b2eaeb22f540f1cbc00cbb594047b7ba89 Author: Miklos Szeredi Date: Thu Feb 13 09:16:07 2020 +0100 fuse: fix stack use after return Normal, synchronous requests will have their args allocated on the stack. After the FR_FINISHED bit is set by receiving the reply from the userspace fuse server, the originating task may return and reuse the stack frame, resulting in an Oops if the args structure is dereferenced. Fix by setting a flag in the request itself upon initializing, indicating whether it has an asynchronous ->end() callback. Reported-by: Kyle Sanderson Reported-by: Michael Stapelberg Fixes: 2b319d1f6f92 ("fuse: don't dereference req->args on finished request") Cc: # v5.4 Tested-by: Michael Stapelberg Signed-off-by: Miklos Szeredi commit 9f35a31283775e6f6af73fb2c95c686a4c0acac7 Author: Alexander Tsoy Date: Thu Feb 13 02:54:50 2020 +0300 ALSA: usb-audio: Add clock validity quirk for Denon MC7000/MCX8000 It should be safe to ignore clock validity check result if the following conditions are met: - only one single sample rate is supported; - the terminal is directly connected to the clock source; - the clock type is internal. This is to deal with some Denon DJ controllers that always reports that clock is invalid. Tested-by: Tobias Oszlanyi Signed-off-by: Alexander Tsoy Cc: Link: https://lore.kernel.org/r/20200212235450.697348-1-alexander@tsoy.me Signed-off-by: Takashi Iwai commit f52aa79df43c4509146140de0241bc21a4a3b4c7 Author: Frank Sorenson Date: Wed Feb 12 15:31:48 2020 -0600 cifs: Fix mode output in debugging statements A number of the debug statements output file or directory mode in hex. Change these to print using octal. Signed-off-by: Frank Sorenson Signed-off-by: Steve French commit 7563439adfae153b20331f1567c8b5d0e5cbd8a7 Author: Jens Axboe Date: Tue Feb 11 06:30:06 2020 -0700 io-wq: don't call kXalloc_node() with non-online node Glauber reports a crash on init on a box he has: RIP: 0010:__alloc_pages_nodemask+0x132/0x340 Code: 18 01 75 04 41 80 ce 80 89 e8 48 8b 54 24 08 8b 74 24 1c c1 e8 0c 48 8b 3c 24 83 e0 01 88 44 24 20 48 85 d2 0f 85 74 01 00 00 <3b> 77 08 0f 82 6b 01 00 00 48 89 7c 24 10 89 ea 48 8b 07 b9 00 02 RSP: 0018:ffffb8be4d0b7c28 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000000e8e8 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000002080 RBP: 0000000000012cc0 R08: 0000000000000000 R09: 0000000000000002 R10: 0000000000000dc0 R11: ffff995c60400100 R12: 0000000000000000 R13: 0000000000012cc0 R14: 0000000000000001 R15: ffff995c60db00f0 FS: 00007f4d115ca900(0000) GS:ffff995c60d80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000002088 CR3: 00000017cca66002 CR4: 00000000007606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: alloc_slab_page+0x46/0x320 new_slab+0x9d/0x4e0 ___slab_alloc+0x507/0x6a0 ? io_wq_create+0xb4/0x2a0 __slab_alloc+0x1c/0x30 kmem_cache_alloc_node_trace+0xa6/0x260 io_wq_create+0xb4/0x2a0 io_uring_setup+0x97f/0xaa0 ? io_remove_personalities+0x30/0x30 ? io_poll_trigger_evfd+0x30/0x30 do_syscall_64+0x5b/0x1c0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f4d116cb1ed which is due to the 'wqe' and 'worker' allocation being node affine. But it isn't valid to call the node affine allocation if the node isn't online. Setup structures for even offline nodes, as usual, but skip them in terms of thread setup to not waste resources. If the node isn't online, just alloc memory with NUMA_NO_NODE. Reported-by: Glauber Costa Tested-by: Glauber Costa Signed-off-by: Jens Axboe commit 0e99b2c625da181aebf1a3d13493e3f7a5057a9c Author: Tomas Henzl Date: Tue Feb 4 16:24:13 2020 +0100 scsi: megaraid_sas: silence a warning Add a flag to DMA memory allocation to silence a warning. This driver allocates DMA memory for IO frames. This allocation may exceed MAX_ORDER pages for few megaraid_sas controllers (controllers with very high queue depth). Consequently, the driver has logic to keep reducing the controller queue depth until the DMA memory allocation succeeds. On impacted megaraid_sas controllers there would be multiple DMA allocation failures until driver settled on an allocation that fit. These failed DMA allocation requests caused stack traces in system logs. These were not harmful and this patch silences those warnings/stack traces. [mkp: clarified commit desc] Link: https://lore.kernel.org/r/20200204152413.7107-1-thenzl@redhat.com Signed-off-by: Tomas Henzl Acked-by: Sumit Saxena Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen commit c14335ebb92a98646ddbf447e6cacc66de5269ad Author: Bart Van Assche Date: Sun Feb 9 21:12:02 2020 -0800 scsi: Revert "target/core: Inline transport_lun_remove_cmd()" Commit 83f85b8ec305 postponed the percpu_ref_put(&se_cmd->se_lun->lun_ref) call from command completion to the time when the final command reference is dropped. That approach is not compatible with the iSCSI target driver because the iSCSI target driver keeps the command with the highest stat_sn after it has completed until the next command is received (see also iscsit_ack_from_expstatsn()). Fix this regression by reverting commit 83f85b8ec305. Fixes: 83f85b8ec305 ("scsi: target/core: Inline transport_lun_remove_cmd()") Cc: Pavel Zakharov Cc: Mike Christie Cc: Link: https://lore.kernel.org/r/20200210051202.12934-1-bvanassche@acm.org Reported-by: Pavel Zakharov Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit efbd9129dfe87fdeaa3c44e8246b019a775c484b Author: Taniya Das Date: Tue Feb 11 17:43:56 2020 +0530 clk: qcom: dispcc: Remove support of disp_cc_mdss_rscc_ahb_clk The disp_cc_mdss_rscc_ahb_clk is default enabled from hardware and thus does not require to be marked CRITICAL. This which would allow the RCG to be turned OFF when the display turns OFF and not blocking XO. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/1581423236-21341-2-git-send-email-tdas@codeaurora.org Fixes: dd3d06622138 ("clk: qcom: Add display clock controller driver for SC7180") Signed-off-by: Stephen Boyd commit 8de427d52da30d3bad06d416e486a6b1bd0f3850 Author: Taniya Das Date: Tue Feb 11 17:43:55 2020 +0530 clk: qcom: videocc: Update the clock flag for video_cc_vcodec0_core_clk The clock disable signal for video_cc_vcodec0_core_clk is tied to vcodec0_gdsc which is supported in the HW control mode. Thus turning off the clock would be taken care automatically when the GDSC turns OFF by hardware and clock driver does not require to poll on the CLK_OFF bit. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/1581423235-21341-1-git-send-email-tdas@codeaurora.org Fixes: 253dc75a0bb8 ("clk: qcom: Add video clock controller driver for SC7180") Signed-off-by: Stephen Boyd commit 9c974c77246460fa6a92c18554c3311c8c83c160 Author: Michal Koutný Date: Fri Jan 24 12:40:15 2020 +0100 cgroup: Iterate tasks that did not finish do_exit() PF_EXITING is set earlier than actual removal from css_set when a task is exitting. This can confuse cgroup.procs readers who see no PF_EXITING tasks, however, rmdir is checking against css_set membership so it can transitionally fail with EBUSY. Fix this by listing tasks that weren't unlinked from css_set active lists. It may happen that other users of the task iterator (without CSS_TASK_ITER_PROCS) spot a PF_EXITING task before cgroup_exit(). This is equal to the state before commit c03cd7738a83 ("cgroup: Include dying leaders with live threads in PROCS iterations") but it may be reviewed later. Reported-by: Suren Baghdasaryan Fixes: c03cd7738a83 ("cgroup: Include dying leaders with live threads in PROCS iterations") Signed-off-by: Michal Koutný Signed-off-by: Tejun Heo commit 2d4ecb030dcc90fb725ecbfc82ce5d6c37906e0e Author: Vasily Averin Date: Thu Jan 30 13:34:59 2020 +0300 cgroup: cgroup_procs_next should increase position index If seq_file .next fuction does not change position index, read after some lseek can generate unexpected output: 1) dd bs=1 skip output of each 2nd elements $ dd if=/sys/fs/cgroup/cgroup.procs bs=8 count=1 2 3 4 5 1+0 records in 1+0 records out 8 bytes copied, 0,000267297 s, 29,9 kB/s [test@localhost ~]$ dd if=/sys/fs/cgroup/cgroup.procs bs=1 count=8 2 4 <<< NB! 3 was skipped 6 <<< ... and 5 too 8 <<< ... and 7 8+0 records in 8+0 records out 8 bytes copied, 5,2123e-05 s, 153 kB/s This happen because __cgroup_procs_start() makes an extra extra cgroup_procs_next() call 2) read after lseek beyond end of file generates whole last line. 3) read after lseek into middle of last line generates expected rest of last line and unexpected whole line once again. Additionally patch removes an extra position index changes in __cgroup_procs_start() Cc: stable@vger.kernel.org https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: Tejun Heo commit db8dd9697238be70a6b4f9d0284cd89f59c0e070 Author: Vasily Averin Date: Thu Jan 30 13:34:49 2020 +0300 cgroup-v1: cgroup_pidlist_next should update position index if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. # mount | grep cgroup # dd if=/mnt/cgroup.procs bs=1 # normal output ... 1294 1295 1296 1304 1382 584+0 records in 584+0 records out 584 bytes copied dd: /mnt/cgroup.procs: cannot skip to specified offset 83 <<< generates end of last line 1383 <<< ... and whole last line once again 0+1 records in 0+1 records out 8 bytes copied dd: /mnt/cgroup.procs: cannot skip to specified offset 1386 <<< generates last line anyway 0+1 records in 0+1 records out 5 bytes copied https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: Tejun Heo commit dbb92f88648d6206bf22fcb764fb9fe2939d401a Author: Andrea Parri Date: Wed Jan 22 19:39:52 2020 +0100 workqueue: Document (some) memory-ordering properties of {queue,schedule}_work() It's desirable to be able to rely on the following property: All stores preceding (in program order) a call to a successful queue_work() will be visible from the CPU which will execute the queued work by the time such work executes, e.g., { x is initially 0 } CPU0 CPU1 WRITE_ONCE(x, 1); [ "work" is being executed ] r0 = queue_work(wq, work); r1 = READ_ONCE(x); Forbids: r0 == true && r1 == 0 The current implementation of queue_work() provides such memory-ordering property: - In __queue_work(), the ->lock spinlock is acquired. - On the other side, in worker_thread(), this same ->lock is held when dequeueing work. So the locking ordering makes things work out. Add this property to the DocBook headers of {queue,schedule}_work(). Suggested-by: Paul E. McKenney Signed-off-by: Andrea Parri Acked-by: Paul E. McKenney Signed-off-by: Tejun Heo commit 4a4472fdc098fb78f52a0848788faf46674a8423 Author: Geert Uytterhoeven Date: Wed Feb 12 10:43:17 2020 +0100 of: clk: Make of_clk_get_parent_{count,name}() parameter const of_clk_get_parent_count() and of_clk_get_parent_name() never modify the device nodes passed, so they can be const. Signed-off-by: Geert Uytterhoeven Link: https://lkml.kernel.org/r/20200212094317.1150-1-geert+renesas@glider.be Signed-off-by: Stephen Boyd commit 205447fa9e0a44cc42a74788eb2f6c96f91d5cd6 Author: Johan Hovold Date: Wed Feb 12 10:24:26 2020 +0100 hwmon: (pmbus/xdpe12284) fix typo in compatible strings Make sure that the driver compatible strings matches the binding by removing the space between the manufacturer and model. Fixes: aaafb7c8eb1c ("hwmon: (pmbus) Add support for Infineon Multi-phase xdpe122 family controllers") Cc: Vadim Pasternak Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20200212092426.24012-1-johan@kernel.org Signed-off-by: Guenter Roeck commit dde2bb2da01e96c17f0a44b4a3cf72a30e66e3ef Author: Boris Brezillon Date: Thu Feb 6 15:13:27 2020 +0100 drm/panfrost: perfcnt: Reserve/use the AS attached to the perfcnt MMU context We need to use the AS attached to the opened FD when dumping counters. Reported-by: Antonio Caggiano Fixes: 7282f7645d06 ("drm/panfrost: Implement per FD address spaces") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Tested-by: Antonio Caggiano Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200206141327.446127-1-boris.brezillon@collabora.com commit 679aac5ead2f18d223554a52b543e1195e181811 Author: satya priya Date: Tue Feb 11 15:43:02 2020 +0530 tty: serial: qcom_geni_serial: Fix RX cancel command failure RX cancel command fails when BT is switched on and off multiple times. To handle this, poll for the cancel bit in SE_GENI_S_IRQ_STATUS register instead of SE_GENI_S_CMD_CTRL_REG. As per the HPG update, handle the RX last bit after cancel command and flush out the RX FIFO buffer. Signed-off-by: satya priya Cc: stable Link: https://lore.kernel.org/r/1581415982-8793-1-git-send-email-skakit@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 7febbcbc48fc92e3f33863b32ed715ba4aff18c4 Author: Andy Shevchenko Date: Tue Feb 11 15:55:59 2020 +0200 serial: 8250: Check UPF_IRQ_SHARED in advance The commit 54e53b2e8081 ("tty: serial: 8250: pass IRQ shared flag to UART ports") nicely explained the problem: ---8<---8<--- On some systems IRQ lines between multiple UARTs might be shared. If so, the irqflags have to be configured accordingly. The reason is: The 8250 port startup code performs IRQ tests *before* the IRQ handler for that particular port is registered. This is performed in serial8250_do_startup(). This function checks whether IRQF_SHARED is configured and only then disables the IRQ line while testing. This test is performed upon each open() of the UART device. Imagine two UARTs share the same IRQ line: On is already opened and the IRQ is active. When the second UART is opened, the IRQ line has to be disabled while performing IRQ tests. Otherwise an IRQ might handler might be invoked, but the IRQ itself cannot be handled, because the corresponding handler isn't registered, yet. That's because the 8250 code uses a chain-handler and invokes the corresponding port's IRQ handling routines himself. Unfortunately this IRQF_SHARED flag isn't configured for UARTs probed via device tree even if the IRQs are shared. This way, the actual and shared IRQ line isn't disabled while performing tests and the kernel correctly detects a spurious IRQ. So, adding this flag to the DT probe solves the issue. Note: The UPF_SHARE_IRQ flag is configured unconditionally. Therefore, the IRQF_SHARED flag can be set unconditionally as well. Example stack trace by performing `echo 1 > /dev/ttyS2` on a non-patched system: |irq 85: nobody cared (try booting with the "irqpoll" option) | [...] |handlers: |[] irq_default_primary_handler threaded [] serial8250_interrupt |Disabling IRQ #85 ---8<---8<--- But unfortunately didn't fix the root cause. Let's try again here by moving IRQ flag assignment from serial_link_irq_chain() to serial8250_do_startup(). This should fix the similar issue reported for 8250_pnp case. Since this change we don't need to have custom solutions in 8250_aspeed_vuart and 8250_of drivers, thus, drop them. Fixes: 1c2f04937b3e ("serial: 8250: add IRQ trigger support") Reported-by: Li RongQing Cc: Kurt Kanzenbach Cc: Vikram Pandita Signed-off-by: Andy Shevchenko Cc: stable Acked-by: Kurt Kanzenbach Link: https://lore.kernel.org/r/20200211135559.85960-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f76707831829530ffdd3888bebc108aecefccaa0 Author: Fugang Duan Date: Tue Feb 11 14:16:01 2020 +0800 tty: serial: imx: setup the correct sg entry for tx dma There has oops as below happen on i.MX8MP EVK platform that has 6G bytes DDR memory. when (xmit->tail < xmit->head) && (xmit->head == 0), it setups one sg entry with sg->length is zero: sg_set_buf(sgl + 1, xmit->buf, xmit->head); if xmit->buf is allocated from >4G address space, and SDMA only support <4G address space, then dma_map_sg() will call swiotlb_map() to do bounce buffer copying and mapping. But swiotlb_map() don't allow sg entry's length is zero, otherwise report BUG_ON(). So the patch is to correct the tx DMA scatter list. Oops: [ 287.675715] kernel BUG at kernel/dma/swiotlb.c:497! [ 287.680592] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [ 287.686075] Modules linked in: [ 287.689133] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.3-00016-g3fdc4e0-dirty #10 [ 287.696872] Hardware name: FSL i.MX8MP EVK (DT) [ 287.701402] pstate: 80000085 (Nzcv daIf -PAN -UAO) [ 287.706199] pc : swiotlb_tbl_map_single+0x1fc/0x310 [ 287.711076] lr : swiotlb_map+0x60/0x148 [ 287.714909] sp : ffff800010003c00 [ 287.718221] x29: ffff800010003c00 x28: 0000000000000000 [ 287.723533] x27: 0000000000000040 x26: ffff800011ae0000 [ 287.728844] x25: ffff800011ae09f8 x24: 0000000000000000 [ 287.734155] x23: 00000001b7af9000 x22: 0000000000000000 [ 287.739465] x21: ffff000176409c10 x20: 00000000001f7ffe [ 287.744776] x19: ffff000176409c10 x18: 000000000000002e [ 287.750087] x17: 0000000000000000 x16: 0000000000000000 [ 287.755397] x15: 0000000000000000 x14: 0000000000000000 [ 287.760707] x13: ffff00017f334000 x12: 0000000000000001 [ 287.766018] x11: 00000000001fffff x10: 0000000000000000 [ 287.771328] x9 : 0000000000000003 x8 : 0000000000000000 [ 287.776638] x7 : 0000000000000000 x6 : 0000000000000000 [ 287.781949] x5 : 0000000000200000 x4 : 0000000000000000 [ 287.787259] x3 : 0000000000000001 x2 : 00000001b7af9000 [ 287.792570] x1 : 00000000fbfff000 x0 : 0000000000000000 [ 287.797881] Call trace: [ 287.800328] swiotlb_tbl_map_single+0x1fc/0x310 [ 287.804859] swiotlb_map+0x60/0x148 [ 287.808347] dma_direct_map_page+0xf0/0x130 [ 287.812530] dma_direct_map_sg+0x78/0xe0 [ 287.816453] imx_uart_dma_tx+0x134/0x2f8 [ 287.820374] imx_uart_dma_tx_callback+0xd8/0x168 [ 287.824992] vchan_complete+0x194/0x200 [ 287.828828] tasklet_action_common.isra.0+0x154/0x1a0 [ 287.833879] tasklet_action+0x24/0x30 [ 287.837540] __do_softirq+0x120/0x23c [ 287.841202] irq_exit+0xb8/0xd8 [ 287.844343] __handle_domain_irq+0x64/0xb8 [ 287.848438] gic_handle_irq+0x5c/0x148 [ 287.852185] el1_irq+0xb8/0x180 [ 287.855327] cpuidle_enter_state+0x84/0x360 [ 287.859508] cpuidle_enter+0x34/0x48 [ 287.863083] call_cpuidle+0x18/0x38 [ 287.866571] do_idle+0x1e0/0x280 [ 287.869798] cpu_startup_entry+0x20/0x40 [ 287.873721] rest_init+0xd4/0xe0 [ 287.876949] arch_call_rest_init+0xc/0x14 [ 287.880958] start_kernel+0x420/0x44c [ 287.884622] Code: 9124c021 9417aff8 a94363f7 17ffffd5 (d4210000) [ 287.890718] ---[ end trace 5bc44c4ab6b009ce ]--- [ 287.895334] Kernel panic - not syncing: Fatal exception in interrupt [ 287.901686] SMP: stopping secondary CPUs [ 288.905607] SMP: failed to stop secondary CPUs 0-1 [ 288.910395] Kernel Offset: disabled [ 288.913882] CPU features: 0x0002,2000200c [ 288.917888] Memory Limit: none [ 288.920944] ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]--- Reported-by: Eagle Zhou Tested-by: Eagle Zhou Signed-off-by: Fugang Duan Cc: stable Fixes: 7942f8577f2a ("serial: imx: TX DMA: clean up sg initialization") Reviewed-by: Uwe Kleine-König Link: https://lore.kernel.org/r/1581401761-6378-1-git-send-email-fugang.duan@nxp.com Signed-off-by: Greg Kroah-Hartman commit 0bf999f9c5e74c7ecf9dafb527146601e5c848b9 Author: Randy Dunlap Date: Sun Feb 9 19:36:14 2020 -0800 linux/pipe_fs_i.h: fix kernel-doc warnings after @wait was split Fix kernel-doc warnings in struct pipe_inode_info after @wait was split into @rd_wait and @wr_wait. include/linux/pipe_fs_i.h:66: warning: Function parameter or member 'rd_wait' not described in 'pipe_inode_info' include/linux/pipe_fs_i.h:66: warning: Function parameter or member 'wr_wait' not described in 'pipe_inode_info' Fixes: 0ddad21d3e99 ("pipe: use exclusive waits when reading or writing") Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds commit 6cd1ed50efd88261298577cd92a14f2768eddeeb Author: Eric Dumazet Date: Mon Feb 10 11:07:21 2020 -0800 vt: vt_ioctl: fix race in VT_RESIZEX We need to make sure vc_cons[i].d is not NULL after grabbing console_lock(), or risk a crash. general protection fault, probably for non-canonical address 0xdffffc0000000068: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000340-0x0000000000000347] CPU: 1 PID: 19462 Comm: syz-executor.5 Not tainted 5.5.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:vt_ioctl+0x1f96/0x26d0 drivers/tty/vt/vt_ioctl.c:883 Code: 74 41 e8 bd a6 84 fd 48 89 d8 48 c1 e8 03 42 80 3c 28 00 0f 85 e4 04 00 00 48 8b 03 48 8d b8 40 03 00 00 48 89 fa 48 c1 ea 03 <42> 0f b6 14 2a 84 d2 74 09 80 fa 03 0f 8e b1 05 00 00 44 89 b8 40 RSP: 0018:ffffc900086d7bb0 EFLAGS: 00010202 RAX: 0000000000000000 RBX: ffffffff8c34ee88 RCX: ffffc9001415c000 RDX: 0000000000000068 RSI: ffffffff83f0e6e3 RDI: 0000000000000340 RBP: ffffc900086d7cd0 R08: ffff888054ce0100 R09: fffffbfff16a2f6d R10: ffff888054ce0998 R11: ffff888054ce0100 R12: 000000000000001d R13: dffffc0000000000 R14: 1ffff920010daf79 R15: 000000000000ff7f FS: 00007f7d13c12700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd477e3c38 CR3: 0000000095d0a000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tty_ioctl+0xa37/0x14f0 drivers/tty/tty_io.c:2660 vfs_ioctl fs/ioctl.c:47 [inline] ksys_ioctl+0x123/0x180 fs/ioctl.c:763 __do_sys_ioctl fs/ioctl.c:772 [inline] __se_sys_ioctl fs/ioctl.c:770 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:770 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45b399 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f7d13c11c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f7d13c126d4 RCX: 000000000045b399 RDX: 0000000020000080 RSI: 000000000000560a RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000666 R14: 00000000004c7f04 R15: 000000000075bf2c Modules linked in: ---[ end trace 80970faf7a67eb77 ]--- RIP: 0010:vt_ioctl+0x1f96/0x26d0 drivers/tty/vt/vt_ioctl.c:883 Code: 74 41 e8 bd a6 84 fd 48 89 d8 48 c1 e8 03 42 80 3c 28 00 0f 85 e4 04 00 00 48 8b 03 48 8d b8 40 03 00 00 48 89 fa 48 c1 ea 03 <42> 0f b6 14 2a 84 d2 74 09 80 fa 03 0f 8e b1 05 00 00 44 89 b8 40 RSP: 0018:ffffc900086d7bb0 EFLAGS: 00010202 RAX: 0000000000000000 RBX: ffffffff8c34ee88 RCX: ffffc9001415c000 RDX: 0000000000000068 RSI: ffffffff83f0e6e3 RDI: 0000000000000340 RBP: ffffc900086d7cd0 R08: ffff888054ce0100 R09: fffffbfff16a2f6d R10: ffff888054ce0998 R11: ffff888054ce0100 R12: 000000000000001d R13: dffffc0000000000 R14: 1ffff920010daf79 R15: 000000000000ff7f FS: 00007f7d13c12700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffd477e3c38 CR3: 0000000095d0a000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Cc: stable Reported-by: syzbot Link: https://lore.kernel.org/r/20200210190721.200418-1-edumazet@google.com Signed-off-by: Greg Kroah-Hartman commit fe154a2422333c4cd87bb0d8a19fb2df066cc6ee Author: YueHaibing Date: Mon Feb 3 15:27:24 2020 +0000 drm/panfrost: Remove set but not used variable 'bo' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/panfrost/panfrost_job.c: In function 'panfrost_job_cleanup': drivers/gpu/drm/panfrost/panfrost_job.c:278:31: warning: variable 'bo' set but not used [-Wunused-but-set-variable] commit bdefca2d8dc0 ("drm/panfrost: Add the panfrost_gem_mapping concept") involved this unused variable. Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: Steven Price Reviewed-by: Alyssas Rosenzweig Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200203152724.42611-1-yuehaibing@huawei.com commit 4ee656bba8013929bcc050bcebc39a47fe763ee9 Author: Tony Nguyen Date: Thu Feb 6 01:20:13 2020 -0800 ice: Trivial fixes This is a collection of trivial fixes including fixing whitespace, typos, function headers, reverse Christmas tree, etc. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 1d8bd9927234081db15a1d42a7f99505244e3703 Author: Ben Shelton Date: Thu Feb 6 01:20:12 2020 -0800 ice: Use correct netif error function Use the correct netif_msg_[tx,rx]_error() function to determine whether to print the MDD event type. Signed-off-by: Ben Shelton Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 3306f79f428e858a80d5eadb974c80a1faa399f3 Author: Anirudh Venkataramanan Date: Thu Feb 6 01:20:11 2020 -0800 ice: Cleanup ice_vsi_alloc_q_vectors 1. Remove local variable num_q_vectors and use vsi->num_q_vectors instead 2. Remove local variable pf and pass vsi->back to ice_pf_to_dev Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 19cce2c6f6dc43dd9cd6ba8a9123857192990d50 Author: Anirudh Venkataramanan Date: Thu Feb 6 01:20:10 2020 -0800 ice: Make print statements more compact Formatting strings in print function calls (like dev_info, dev_err, etc.) can exceed 80 columns without making checkpatch unhappy. So remove newlines where applicable and make print statements more compact. Signed-off-by: Anirudh Venkataramanan Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 9a946843ba5c173e259fef7a035feac994a65b59 Author: Anirudh Venkataramanan Date: Thu Feb 6 01:20:09 2020 -0800 ice: Use ice_pf_to_dev Use ice_pf_to_dev(pf) instead of &pf->pdev->dev Use ice_pf_to_dev(vsi->back) instead of &vsi->back->pdev->dev When a pointer to the pf instance is available, use ice_pf_to_dev instead of ice_hw_to_dev Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 0a6ea04e3bbd20833d2b49296e5adc1c5bb86386 Author: Tony Nguyen Date: Thu Feb 6 01:20:08 2020 -0800 ice: Remove possible null dereference Commit 1f45ebe0d8fb ("ice: add extra check for null Rx descriptor") moved the call to ice_construct_skb() under a null check as Coverity reported a possible use of null skb. However, the original call was not deleted, do so now. Fixes: 1f45ebe0d8fb ("ice: add extra check for null Rx descriptor") Reported-by: Bruce Allan Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit cf8fc2a0863f9ff27ebd2efcdb1f7d378b9fb8a6 Author: Bruce Allan Date: Thu Feb 6 01:20:07 2020 -0800 ice: update Unit Load Status bitmask to check after reset After a reset the Unit Load Status bits in the GLNVM_ULD register to check for completion should be 0x7FF before continuing. Update the mask to check (minus the three reserved bits that are always set). Signed-off-by: Bruce Allan Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit fbf1e1f6988e70287b1bfcad4f655ca96b681929 Author: Bruce Allan Date: Thu Feb 6 01:20:06 2020 -0800 ice: fix and consolidate logging of NVM/firmware version information Logging the firmware/NVM information during driver load is redundant since that information is also available via ethtool. Move the functionality found in ice_nvm_version_str() directly into ice_get_drvinfo() and remove calling the former and logging that info during driver probe. This also gets rid of a bug in ice_nvm_version_str() where it returns a pointer to a buffer which is free'ed when that function exits. Signed-off-by: Bruce Allan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit b55e603252acdf229501d27f6ecb78107cbb1855 Author: Akeem G Abodunrin Date: Thu Feb 6 01:20:05 2020 -0800 ice: Modify link message logging This patch modifies link message logging to include "Full Duplex" and "Negotiated" for FEC, so as to distinguish it from "Requested" FEC. Signed-off-by: Akeem G Abodunrin Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit a8b72ce03a114239e95c9dd7e892c65452478183 Author: Anirudh Venkataramanan Date: Thu Feb 6 01:20:04 2020 -0800 ice: Remove CONFIG_PCI_IOV wrap in ice_set_pf_caps Remove unnecessary CONFIG_PCI_IOV wrapping in ice_set_pf_caps. None of the data structures accessed within the block are wrapped with this flag. When CONFIG_PCI_IOV is undefined, pf->num_vfs_supported will be 0 anyway. Signed-off-by: Anirudh Venkataramanan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 3d9f99908037a90ba9399e553b9beffcac26f068 Author: Brett Creeley Date: Thu Feb 6 01:20:03 2020 -0800 ice: Remove ice_dev_onetime_setup() ice_dev_onetime_setup contains driver workarounds needed for firmware limitations. These issues have now been resolved in newer NVMs so remove the function. Signed-off-by: Brett Creeley Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 168983a8e19b89efd175661e53faa6246be363a0 Author: Brett Creeley Date: Thu Feb 6 01:20:02 2020 -0800 ice: Don't allow same value for Rx tail to be written twice Currently we compare the value we are about to write to the Rx tail register with the previous value of next_to_use. The problem with this is we only write tail on 8 descriptor boundaries, but next_to_use is updated whenever we clean Rx descriptors. Fix this by comparing the value we are about to write to tail with the previously written tail value. This will prevent duplicate Rx tail bumps. Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ad9a87bec3d004ce80e9104e3a0aa6a204a15dbf Author: Paul Greenwalt Date: Thu Feb 6 01:20:01 2020 -0800 ice: display supported and advertised link modes Display all of the supported and advertised link modes based on the PHY capability with media. Displaying all supported modes is more informative then only displaying the current link mode. Signed-off-by: Paul Greenwalt Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 53977ee47410885e7d4eee87d2c811a48a275150 Author: Dave Ertman Date: Thu Feb 6 01:20:00 2020 -0800 ice: Fix switch between FW and SW LLDP When switching between FW and SW LLDP mode, the number of configured TLV apps in the driver's DCB configuration is getting out of synch with what lldpad thinks is configured. This is causing a problem when shutting down lldpad. The cleanup is trying to delete TLV apps that are not defined in the kernel. Since the driver is keeping an accurate account of the apps defined, use the drivers number of apps to determine if there is an app to delete. If the number of apps is <= 1, then do not attempt to delete. Signed-off-by: Dave Ertman Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 242b5e068b25119d6f1d63dac076b79d89580b4b Author: Dave Ertman Date: Thu Feb 6 01:19:59 2020 -0800 ice: Fix DCB rebuild after reset The function ice_dcb_rebuild had some logic flaws in it, and also didn't differentiate between FW and SW modes needs. For FW flow, the willing setting was being forced to OFF and left that way. Unwilling in DCB FW mode is not a supported model. Leave the config alone and use the return value from the set command to determine if setting the config was successful. The SW DCB flow does not need to need to register for MIB change events (as they are not used in SW mode). Use !is_sw_lldp checks to only perform FW specific task while in FW mode. Also adding a reapplication of the current DCB config after a link event. Some NVMs are not maintaining their DCB configs across link events. Signed-off-by: Dave Ertman Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ead68df94d248c80fdbae220ae5425eb5af2e753 Author: Paolo Bonzini Date: Wed Feb 12 20:15:29 2020 +0100 KVM: x86: enable -Werror Avoid more embarrassing mistakes. At least those that the compiler can catch. Signed-off-by: Paolo Bonzini commit 120881b9e888689cbdb90a1dd1689684d8bc95f3 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:03:06 2020 +0100 docs: virt: guest-halt-polling.txt convert to ReST Due to some merge conflict, this file ended being alone under Documentation/virtual. The file itself is almost at ReST format. Just minor adjustments are needed: - Adjust title markup; - Adjust a list identation; - add a literal block markup; - Add some blank lines. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit 033741c6c997e60f9c2de280925519d3ccff5366 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:03:05 2020 +0100 docs: kvm: review-checklist.txt: rename to ReST This file is already in ReST compatible format. So, rename it and add to the kvm's index.rst. While here, use the standard conversion for document titles. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit 6012d9a9fa693e608f4de3c5a13741794dc4b2c7 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:03:04 2020 +0100 docs: kvm: Convert timekeeping.txt to ReST format - Use document title and chapter markups; - Add markups for literal blocks; - Add markups for tables; - use :field: for field descriptions; - Add blank lines and adjust indentation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit a9700af64e1bb28fc18fd362307bc787e10e340b Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:03:03 2020 +0100 docs: kvm: Convert s390-diag.txt to ReST format This file is almost in ReST format. Just one change was needed: - Add markups for a literal block and change its indentation. While here, use the standard markup for the document title. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit c849d8613991292d5f945956780bb8134cbce7ed Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:03:02 2020 +0100 docs: kvm: Convert ppc-pv.txt to ReST format - Use document title and chapter markups; - Add markups for tables; - Use list markups; - Add markups for literal blocks; - Add blank lines. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit 320f3f74d9a1a4a193d515de0549eafc82369f47 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:03:01 2020 +0100 docs: kvm: Convert nested-vmx.txt to ReST format This file is almost in ReST format. Just a small set of changes were needed: - Add markups for lists; - Add markups for a literal block; - Adjust whitespaces. While here, use the standard markup for the document title. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit 037d1f92eff908f794644d49435d8849a3c10461 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:03:00 2020 +0100 docs: kvm: Convert mmu.txt to ReST format - Use document title and chapter markups; - Add markups for tables; - Add markups for literal blocks; - Add blank lines and adjust indentation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit 75e7fcdb4a6f394a6644ee1cfe193284945003b5 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:59 2020 +0100 docs: kvm: Convert locking.txt to ReST format - Use document title and chapter markups; - Add markups for literal blocks; - use :field: for field descriptions; - Add blank lines and adjust indentation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit 5a0af4806c25aff4b2f8d2e24d635840ec58a87b Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:58 2020 +0100 docs: kvm: Convert hypercalls.txt to ReST format - Use document title and chapter markups; - Convert tables; - Add markups for literal blocks; - use :field: for field descriptions; - Add blank lines and adjust indentation Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit cec0e48be339f06879d971702f206e9683956ef1 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:57 2020 +0100 docs: kvm: arm/psci.txt: convert to ReST - Add a title for the document; - Adjust whitespaces for it to be properly formatted after parsed. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit 69bf758bc8a4875a361d7c703995248d808fa24d Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:56 2020 +0100 docs: kvm: convert arm/hyp-abi.txt to ReST - Add proper markups for titles; - Adjust whitespaces and blank lines to match ReST needs; - Mark literal blocks as such. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit 106ee47dc633a930bb61290713217803aee194e7 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:55 2020 +0100 docs: kvm: Convert api.txt to ReST format convert api.txt document to ReST format while trying to keep its format as close as possible with the authors intent, and avoid adding uneeded markups. - Use document title and chapter markups; - Convert tables; - Add markups for literal blocks; - use :field: for field descriptions; - Add blank lines and adjust indentation Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit d3b52e4976cec9c830bc14bd38f043e8ca00ba68 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:54 2020 +0100 docs: kvm: convert devices/xive.txt to ReST - Use title markups; - adjust indentation and add blank lines as needed; - adjust tables to match ReST accepted formats; - mark code blocks as such. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit 5cccf3797435008b7cd8d9d98d37db3962368710 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:53 2020 +0100 docs: kvm: convert devices/xics.txt to ReST - Use title markups; - adjust indentation and add blank lines as needed; - adjust tables to match ReST accepted formats; - use :field: markups. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit 6c972ba685d5849009e0747cf8799adc3b8d5f11 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:52 2020 +0100 docs: kvm: convert devices/vm.txt to ReST - Use title markups; - adjust indentation and add blank lines as needed; - use :field: markups; - Use cross-references; - mark code blocks as such. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit aff7aeea548312cacd146e80efb944bd8f2c0faa Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:51 2020 +0100 docs: kvm: convert devices/vfio.txt to ReST - Use standard title markup; - adjust lists; - mark code blocks as such. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit e777a5bd98c689f1ee15ebdbce739497e7d92f70 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:50 2020 +0100 docs: kvm: convert devices/vcpu.txt to ReST - Use title markups; - adjust indentation and add blank lines as needed; - adjust tables to match ReST accepted formats; - use :field: markups; - mark code blocks as such. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit e944743003617aeaebebc33adef5de093e701766 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:49 2020 +0100 docs: kvm: convert devices/s390_flic.txt to ReST - Use standard markup for document title; - Adjust indentation and add blank lines as needed; - use the notes markup; - mark code blocks as such. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit 05c47036c62ea65a8f8aeaef5021c7220488a664 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:48 2020 +0100 docs: kvm: convert devices/mpic.txt to ReST This document is almost in ReST format. The only thing needed is to mark a list as such and to add an extra whitespace. Yet, let's also use the standard document title markup, as it makes easier if anyone wants later to add sessions to it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit bf6154dba0a7d4defd3e8c9c85d1933f442ef01b Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:47 2020 +0100 docs: kvm: convert devices/arm-vgit.txt to ReST - Use title markups; - change indent to match ReST syntax; - use proper table markups; - use literal block markups. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit c0d1c8a0af591c139fe7339bf6cdf0e766037cd4 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:46 2020 +0100 docs: kvm: devices/arm-vgit-v3.txt to ReST - Use title markups; - change indent to match ReST syntax; - use proper table markups; - use literal block markups. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit d371c011fc5e16bc50985bab94b7141204c52153 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:45 2020 +0100 docs: kvm: devices/arm-vgic-its.txt to ReST format - Fix document title to match ReST format - Convert the table to be properly recognized - use proper markups for literal blocks - Some indentation fixes to match ReST While here, add an index for kvm devices. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit 263a19ff21c4a10f0a2d77c21feb3a641e5127f0 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:44 2020 +0100 docs: virt: Convert msr.txt to ReST format - Use document title markup; - Convert tables; - Add blank lines and adjust indentation. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit 2756df60d09748b1ccdc568690f9c4112353c920 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:43 2020 +0100 docs: virt: convert halt-polling.txt to ReST format - Fix document title to match ReST format - Convert the table to be properly recognized - Some indentation fixes to match ReST syntax. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit c09708ccb4612890407c10a408624c229bf91b76 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:42 2020 +0100 docs: virt: user_mode_linux.rst: fix URL references Several URLs are pointing to outdated places. Update the references for the URLs whose contents still exists, removing the others. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit 72f8a49dc8b9e97a7986b0e6eced00a1a2e28996 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:41 2020 +0100 docs: virt: user_mode_linux.rst: update compiling instructions Instead of pointing for a pre-2.4 and a seaparate patch, update it to match current upstream, as UML was merged a long time ago. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit 3b00b042eeaaea43b8702b2dd4b9cb0916a2e052 Author: Geert Uytterhoeven Date: Wed Feb 12 11:00:47 2020 +0100 ARC: Replace by The ARC platform code is not a clock provider, and just needs to call of_clk_init(). Hence it can include instead of . Signed-off-by: Geert Uytterhoeven Reviewed-by: Stephen Boyd Signed-off-by: Vineet Gupta commit 7d94ab169b8f047ad61ff6ea8e3e7602d0516623 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:40 2020 +0100 docs: virt: convert UML documentation to ReST Despite being an old document, it contains lots of information that could still be useful. The document has a nice style with makes easy to convert to ReST. So, let's convert it to ReST. This patch does: - Use proper markups for titles; - Mark and proper indent literal blocks; - don't use an 'o' character for lists; - other minor changes required for the doc to be parsed. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit 7bd460fc1dfa7d82d99493fc5d7b5f9c7b679af4 Author: Mauro Carvalho Chehab Date: Mon Feb 10 07:02:39 2020 +0100 docs: kvm: add arm/pvtime.rst to index.rst Add this file to a new kvm/arm index.rst, in order for it to be shown as part of the virt book. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paolo Bonzini commit 9446e6fce0ab9dfd44b96f630b4e3a0a0ab879fd Author: Paolo Bonzini Date: Wed Feb 12 13:27:10 2020 +0100 KVM: x86: fix WARN_ON check of an unsigned less than zero The check cpu->hv_clock.system_time < 0 is redundant since system_time is a u64 and hence can never be less than zero. But what was actually meant is to check that the result is positive, since kernel_ns and v->kvm->arch.kvmclock_offset are both s64. Reported-by: Colin King Suggested-by: Sean Christopherson Addresses-Coverity: ("Macro compares unsigned to 0") Reviewed-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit ff479025349cef3106e165a761281851fd018282 Author: Eric Auger Date: Fri Feb 7 15:27:13 2020 +0100 selftests: KVM: Remove unused x86_register enum x86_register enum is not used, let's remove it. Signed-off-by: Eric Auger Suggested-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit f6ab0107a4942dbf9a5cf0cca3f37e184870a360 Author: Sean Christopherson Date: Fri Feb 7 09:37:42 2020 -0800 KVM: x86/mmu: Fix struct guest_walker arrays for 5-level paging Define PT_MAX_FULL_LEVELS as PT64_ROOT_MAX_LEVEL, i.e. 5, to fix shadow paging for 5-level guest page tables. PT_MAX_FULL_LEVELS is used to size the arrays that track guest pages table information, i.e. using a "max levels" of 4 causes KVM to access garbage beyond the end of an array when querying state for level 5 entries. E.g. FNAME(gpte_changed) will read garbage and most likely return %true for a level 5 entry, soft-hanging the guest because FNAME(fetch) will restart the guest instead of creating SPTEs because it thinks the guest PTE has changed. Note, KVM doesn't yet support 5-level nested EPT, so PT_MAX_FULL_LEVELS gets to stay "4" for the PTTYPE_EPT case. Fixes: 855feb673640 ("KVM: MMU: Add 5 level EPT & Shadow page table support.") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 148d735eb55d32848c3379e460ce365f2c1cbe4b Author: Sean Christopherson Date: Fri Feb 7 09:37:41 2020 -0800 KVM: nVMX: Use correct root level for nested EPT shadow page tables Hardcode the EPT page-walk level for L2 to be 4 levels, as KVM's MMU currently also hardcodes the page walk level for nested EPT to be 4 levels. The L2 guest is all but guaranteed to soft hang on its first instruction when L1 is using EPT, as KVM will construct 4-level page tables and then tell hardware to use 5-level page tables. Fixes: 855feb673640 ("KVM: MMU: Add 5 level EPT & Shadow page table support.") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit ffdbd50dca67b1f12d6f531a0eaf2028d793e54f Author: Miaohe Lin Date: Fri Feb 7 23:22:45 2020 +0800 KVM: nVMX: Fix some comment typos and coding style Fix some typos in the comments. Also fix coding style. [Sean Christopherson rewrites the comment of write_fault_to_shadow_pgtable field in struct kvm_vcpu_arch.] Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 7a02674d154d38da33517855b6d1d4cfc27a9a04 Author: Sean Christopherson Date: Thu Feb 6 14:14:34 2020 -0800 KVM: x86/mmu: Avoid retpoline on ->page_fault() with TDP Wrap calls to ->page_fault() with a small shim to directly invoke the TDP fault handler when the kernel is using retpolines and TDP is being used. Single out the TDP fault handler and annotate the TDP path as likely to coerce the compiler into preferring it over the indirect function call. Rename tdp_page_fault() to kvm_tdp_page_fault(), as it's exposed outside of mmu.c to allow inlining the shim. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 331ca0f89fc206f06b341f7fe037d7d8662b1b9f Author: Miaohe Lin Date: Fri Feb 7 23:22:07 2020 +0800 KVM: apic: reuse smp_wmb() in kvm_make_request() kvm_make_request() provides smp_wmb() so pending_events changes are guaranteed to be visible. Signed-off-by: Miaohe Lin Reviewed-by: Vitaly Kuznetsov Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 20796447a1abee9afd0c136d5c60651bfbaf46b8 Author: Miaohe Lin Date: Fri Feb 7 23:27:51 2020 +0800 KVM: x86: remove duplicated KVM_REQ_EVENT request The KVM_REQ_EVENT request is already made in kvm_set_rflags(). We should not make it again. Signed-off-by: Miaohe Lin Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 1ea2cc0cd7c676668841f63c915fb55244f0268c Author: Eric Auger Date: Thu Feb 6 11:47:10 2020 +0100 selftests: KVM: SVM: Add vmcall test L2 guest calls vmcall and L1 checks the exit status does correspond. Signed-off-by: Eric Auger Reviewed-by: Vitaly Kuznetsov Reviewed-by: Miaohe Lin Tested-by: Wei Huang Signed-off-by: Paolo Bonzini commit 20ba262f8631aadefa87921481fe569ecc387f20 Author: Eric Auger Date: Thu Feb 6 11:47:09 2020 +0100 selftests: KVM: AMD Nested test infrastructure Add the basic infrastructure needed to test AMD nested SVM. This is largely copied from the KVM unit test infrastructure. Signed-off-by: Eric Auger Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 1ecaabed4e4a0d1027eadd54eb0e179350a79f99 Author: Eric Auger Date: Thu Feb 6 11:47:08 2020 +0100 selftests: KVM: Replace get_{gdt,idt}_base() by get_{gdt,idt}() get_gdt_base() and get_idt_base() only return the base address of the descriptor tables. Soon we will need to get the size as well. Change the prototype of those functions so that they return the whole desc_ptr struct instead of the address field. Signed-off-by: Eric Auger Reviewed-by: Vitaly Kuznetsov Reviewed-by: Miaohe Lin Reviewed-by: Wei Huang Reviewed-by: Krish Sadhukhan Signed-off-by: Paolo Bonzini commit efeda80da38d0b4afd77a12bd4a44f657567d26c Author: Trond Myklebust Date: Wed Feb 5 09:01:54 2020 -0500 NFSv4: Fix revalidation of dentries with delegations If a dentry was not initially looked up while we were holding a delegation, then we do still need to revalidate that it still holds the same name. If there are multiple hard links to the same file, then all the hard links need validation. Reported-by: Benjamin Coddington Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington [Anna: Put nfs_unset_verifier_delegated() under CONFIG_NFS_V4] Signed-off-by: Anna Schumaker commit 57d7713196ccd83010fcaa82b9f02d740c9e6bb2 Author: Michal Simek Date: Wed Feb 12 11:59:47 2020 +0100 usb: gadget: udc-xilinx: Fix xudc_stop() kernel-doc format The patch removes "driver" parameter which has been removed without updating kernel-doc format. Fixes: 22835b807e7c ("usb: gadget: remove unnecessary 'driver' argument") Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/c753b529bdcdfdd40a3cf69121527ec8c63775cb.1581505183.git.michal.simek@xilinx.com Signed-off-by: Greg Kroah-Hartman commit f2850dd5ee015bd7b77043f731632888887689c7 Merge: 359c92c02bfa 083bc0e1ce91 Author: Linus Torvalds Date: Wed Feb 12 10:28:42 2020 -0800 Merge tag 'kbuild-fixes-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - fix memory corruption in scripts/kallsyms - fix the vmlinux link stage to correctly update compile.h * tag 'kbuild-fixes-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: fix mismatch between .version and include/generated/compile.h scripts/kallsyms: fix memory corruption caused by write over-run commit 1880b1f1d686b17387b5bf45654eb1d087ead918 Author: Ravulapati Vishnu vardhan rao Date: Tue Feb 11 18:42:28 2020 +0530 ASoC: amd: Buffer Size instead of MAX Buffer Because of MAX BUFFER size in register,when user/app give small buffer size produces noise of old data in buffer. This patch rectifies this noise when using different buffer sizes less than MAX BUFFER. Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/1581426768-8937-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit b9287f2ac321ecac56eb51e6231f6579683dcdae Author: Kunihiko Hayashi Date: Wed Feb 12 19:55:34 2020 +0900 net: ethernet: ave: Add capability of rgmii-id mode This allows you to specify the type of rgmii-id that will enable phy internal delay in ethernet phy-mode. This adds all RGMII cases to all of get_pinmode() except LD11, because LD11 SoC doesn't support RGMII due to the constraint of the hardware. When RGMII phy mode is specified in the devicetree for LD11, the driver will abort with an error. Signed-off-by: Kunihiko Hayashi Signed-off-by: David S. Miller commit 5f6f8da2d7b5a431d3f391d0d73ace8edfb42af7 Author: Greg Kroah-Hartman Date: Tue Feb 11 20:04:22 2020 -0800 USB: misc: iowarrior: add support for the 28 and 28L devices Add new device ids for the 28 and 28L devices. These have 4 interfaces instead of 2, but the driver binds the same, so the driver changes are minimal. Cc: Christoph Jung Cc: stable Link: https://lore.kernel.org/r/20200212040422.2991-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 461d8deb26a7d70254bc0391feb4fd8a95e674e8 Author: Greg Kroah-Hartman Date: Tue Feb 11 20:04:21 2020 -0800 USB: misc: iowarrior: add support for 2 OEMed devices Add support for two OEM devices that are identical to existing IO-Warrior devices, except for the USB device id. Cc: Christoph Jung Cc: stable Link: https://lore.kernel.org/r/20200212040422.2991-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit b692056db8ecc7f452b934f016c17348282b7699 Author: Richard Dodd Date: Wed Feb 12 14:22:18 2020 +0000 USB: Fix novation SourceControl XL after suspend Currently, the SourceControl will stay in power-down mode after resuming from suspend. This patch resets the device after suspend to power it up. Signed-off-by: Richard Dodd Cc: stable Link: https://lore.kernel.org/r/20200212142220.36892-1-richard.o.dodd@gmail.com Signed-off-by: Greg Kroah-Hartman commit cf0ee7c60c89641f6e4d1d3c7867fe32b9e30300 Author: Mathias Nyman Date: Tue Feb 11 17:01:58 2020 +0200 xhci: Fix memory leak when caching protocol extended capability PSI tables - take 2 xhci driver assumed that xHC controllers have at most one custom supported speed table (PSI) for all usb 3.x ports. Memory was allocated for one PSI table under the xhci hub structure. Turns out this is not the case, some controllers have a separate "supported protocol capability" entry with a PSI table for each port. This means each usb3 roothub port can in theory support different custom speeds. To solve this, cache all supported protocol capabilities with their PSI tables in an array, and add pointers to the xhci port structure so that every port points to its capability entry in the array. When creating the SuperSpeedPlus USB Device Capability BOS descriptor for the xhci USB 3.1 roothub we for now will use only data from the first USB 3.1 capable protocol capability entry in the array. This could be improved later, this patch focuses resolving the memory leak. Reported-by: Paul Menzel Reported-by: Sajja Venkateswara Rao Fixes: 47189098f8be ("xhci: parse xhci protocol speed ID list for usb 3.1 usage") Cc: stable # v4.4+ Signed-off-by: Mathias Nyman Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200211150158.14475-1-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 67f68f977a12657028e866c013d43dd87320d210 Author: Greg Kroah-Hartman Date: Wed Feb 12 09:48:57 2020 -0800 Revert "xhci: Fix memory leak when caching protocol extended capability PSI tables" This reverts commit fc57313d1017dd6b6f37a94e88daa8df54368ecc. Marek reports that it breaks things: This patch landed in today's linux-next (20200211) and causes NULL pointer dereference during second suspend/resume cycle on Samsung Exynos5422-based (arm 32bit) Odroid XU3lite board: A more complete fix will be added soon. Reported-by: Marek Szyprowski Fixes: fc57313d1017 ("xhci: Fix memory leak when caching protocol extended capability PSI tables") Cc: Paul Menzel Cc: Sajja Venkateswara Rao Cc: stable # v4.4+ Cc: Mathias Nyman Signed-off-by: Greg Kroah-Hartman commit 0f90522591fd09dd201065c53ebefdfe3c6b55cb Author: Firo Yang Date: Wed Feb 12 06:09:17 2020 +0100 enic: prevent waking up stopped tx queues over watchdog reset Recent months, our customer reported several kernel crashes all preceding with following message: NETDEV WATCHDOG: eth2 (enic): transmit queue 0 timed out Error message of one of those crashes: BUG: unable to handle kernel paging request at ffffffffa007e090 After analyzing severl vmcores, I found that most of crashes are caused by memory corruption. And all the corrupted memory areas are overwritten by data of network packets. Moreover, I also found that the tx queues were enabled over watchdog reset. After going through the source code, I found that in enic_stop(), the tx queues stopped by netif_tx_disable() could be woken up over a small time window between netif_tx_disable() and the napi_disable() by the following code path: napi_poll-> enic_poll_msix_wq-> vnic_cq_service-> enic_wq_service-> netif_wake_subqueue(enic->netdev, q_number)-> test_and_clear_bit(__QUEUE_STATE_DRV_XOFF, &txq->state) In turn, upper netowrk stack could queue skb to ENIC NIC though enic_hard_start_xmit(). And this might introduce some race condition. Our customer comfirmed that this kind of kernel crash doesn't occur over 90 days since they applied this patch. Signed-off-by: Firo Yang Signed-off-by: David S. Miller commit 5c320b6ce7510653bce68cecf80cf5b2d67e907f Author: Stephan Gerhold Date: Fri Jan 17 16:34:29 2020 +0100 drm/modes: Allow DRM_MODE_ROTATE_0 when applying video mode parameters At the moment, only DRM_MODE_ROTATE_180 is allowed when we try to apply the rotation from the video mode parameters. It is also useful to allow DRM_MODE_ROTATE_0 in case there is only a reflect option in the video mode parameter (e.g. video=540x960,reflect_x). DRM_MODE_ROTATE_0 means "no rotation" and should therefore not require any special handling, so we can just add it to the if condition. Signed-off-by: Stephan Gerhold Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200117153429.54700-3-stephan@gerhold.net commit e6980a727154b793adb218fbc7b4d6af52a7e364 Author: Stephan Gerhold Date: Fri Jan 17 16:34:28 2020 +0100 drm/modes: Make sure to parse valid rotation value from cmdline A rotation value should have exactly one rotation angle. At the moment there is no validation for this when parsing video= parameters from the command line. This causes problems later on when we try to combine the command line rotation with the panel orientation. To make sure that we generate a valid rotation value: - Set DRM_MODE_ROTATE_0 by default (if no rotate= option is set) - Validate that there is exactly one rotation angle set (i.e. specifying the rotate= option multiple times is invalid) Signed-off-by: Stephan Gerhold Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200117153429.54700-2-stephan@gerhold.net commit b50f4f940b736b63df1d8a0ddcd28f0a580233eb Author: Maxime Ripard Date: Mon Feb 10 11:04:55 2020 +0100 dt-bindings: display: sunxi: Fix compatible Commit f5a98bfe7b37 ("dt-bindings: display: Convert Allwinner display pipeline to schemas") introduced a YAML schema for the Allwinner TCON DT binding, but the H6 TCON-TV compatible was mistakenly set to fallback on the A83t's, while the initial documentation and the DT are using R40's. Fix that. Fixes: f5a98bfe7b37 ("dt-bindings: display: Convert Allwinner display pipeline to schemas") Signed-off-by: Maxime Ripard Acked-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200210100455.78695-1-maxime@cerno.tech commit 1b9867eb6120db85f8dca8ff42789d9ec9ee16a5 Author: Anand Jain Date: Wed Feb 12 17:28:11 2020 +0800 btrfs: sysfs, move device id directories to UUID/devinfo Originally it was planned to create device id directories under UUID/devinfo, but it got under UUID/devices by mistake. We really want it under definfo so the bare device node names are not mixed with device ids and are easy to enumerate. Fixes: 668e48af7a94 ("btrfs: sysfs, add devid/dev_state kobject and device attributes") Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit a013d141eceee0f7747385e900da2858141aa0f3 Author: Anand Jain Date: Wed Feb 12 17:28:10 2020 +0800 btrfs: sysfs, add UUID/devinfo kobject Create directory /sys/fs/btrfs/UUID/devinfo to hold devices directories by the id (unlike /devices). Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit d91771848f0ae2eec250a9345926a1a3558fa943 Author: Geert Uytterhoeven Date: Wed Feb 12 11:09:34 2020 +0100 arm64: time: Replace by The arm64 time code is not a clock provider, and just needs to call of_clk_init(). Hence it can include instead of . Reviewed-by: Stephen Boyd Signed-off-by: Geert Uytterhoeven Signed-off-by: Will Deacon commit eecd618b45166fdddea3b6366b18479c2be0e11c Author: Jakub Sitnicki Date: Wed Feb 12 10:32:08 2020 +0000 selftests/bpf: Mark SYN cookie test skipped for UDP sockets SYN cookie test with reuseport BPF doesn't make sense for UDP sockets. We don't run it but the test_progs test runner doesn't know about it. Mark the test as skipped so the test_progs can report correctly how many tests were skipped. Fixes: 7ee0d4e97b88 ("selftests/bpf: Switch reuseport tests for test_progs framework") Reported-by: Lorenz Bauer Signed-off-by: Jakub Sitnicki Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200212103208.438419-1-jakub@cloudflare.com commit 2fe77100553f3ac6b2105db8ae14b5ea4b43c108 Author: Martin KaFai Lau Date: Tue Feb 11 09:59:10 2020 -0800 selftests/bpf: Fix error checking on reading the tcp_fastopen sysctl There is a typo in checking the "saved_tcp_fo" and instead "saved_tcp_syncookie" is checked again. This patch fixes it and also breaks them into separate if statements such that the test will abort asap. Reported-by: David Binderman Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200211175910.3235321-1-kafai@fb.com commit 28553fa992cb28be6a65566681aac6cafabb4f2d Author: Filipe Manana Date: Fri Feb 7 12:23:09 2020 +0000 Btrfs: fix race between shrinking truncate and fiemap When there is a fiemap executing in parallel with a shrinking truncate we can end up in a situation where we have extent maps for which we no longer have corresponding file extent items. This is generally harmless and at the moment the only consequences are missing file extent items representing holes after we expand the file size again after the truncate operation removed the prealloc extent items, and stale information for future fiemap calls (reporting extents that no longer exist or may have been reallocated to other files for example). Consider the following example: 1) Our inode has a size of 128KiB, one 128KiB extent at file offset 0 and a 1MiB prealloc extent at file offset 128KiB; 2) Task A starts doing a shrinking truncate of our inode to reduce it to a size of 64KiB. Before it searches the subvolume tree for file extent items to delete, it drops all the extent maps in the range from 64KiB to (u64)-1 by calling btrfs_drop_extent_cache(); 3) Task B starts doing a fiemap against our inode. When looking up for the inode's extent maps in the range from 128KiB to (u64)-1, it doesn't find any in the inode's extent map tree, since they were removed by task A. Because it didn't find any in the extent map tree, it scans the inode's subvolume tree for file extent items, and it finds the 1MiB prealloc extent at file offset 128KiB, then it creates an extent map based on that file extent item and adds it to inode's extent map tree (this ends up being done by btrfs_get_extent() <- btrfs_get_extent_fiemap() <- get_extent_skip_holes()); 4) Task A then drops the prealloc extent at file offset 128KiB and shrinks the 128KiB extent file offset 0 to a length of 64KiB. The truncation operation finishes and we end up with an extent map representing a 1MiB prealloc extent at file offset 128KiB, despite we don't have any more that extent; After this the two types of problems we have are: 1) Future calls to fiemap always report that a 1MiB prealloc extent exists at file offset 128KiB. This is stale information, no longer correct; 2) If the size of the file is increased, by a truncate operation that increases the file size or by a write into a file offset > 64KiB for example, we end up not inserting file extent items to represent holes for any range between 128KiB and 128KiB + 1MiB, since the hole expansion function, btrfs_cont_expand() will skip hole insertion for any range for which an extent map exists that represents a prealloc extent. This causes fsck to complain about missing file extent items when not using the NO_HOLES feature. The second issue could be often triggered by test case generic/561 from fstests, which runs fsstress and duperemove in parallel, and duperemove does frequent fiemap calls. Essentially the problems happens because fiemap does not acquire the inode's lock while truncate does, and fiemap locks the file range in the inode's iotree while truncate does not. So fix the issue by making btrfs_truncate_inode_items() lock the file range from the new file size to (u64)-1, so that it serializes with fiemap. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 10a3a3edc5b89a8cd095bc63495fb1e0f42047d9 Author: David Sterba Date: Wed Feb 5 17:12:28 2020 +0100 btrfs: log message when rw remount is attempted with unclean tree-log A remount to a read-write filesystem is not safe when there's tree-log to be replayed. Files that could be opened until now might be affected by the changes in the tree-log. A regular mount is needed to replay the log so the filesystem presents the consistent view with the pending changes included. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit e8294f2f6aa6208ed0923aa6d70cea3be178309a Author: David Sterba Date: Wed Feb 5 17:12:16 2020 +0100 btrfs: print message when tree-log replay starts There's no logged information about tree-log replay although this is something that points to previous unclean unmount. Other filesystems report that as well. Suggested-by: Chris Murphy CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit ac05ca913e9f3871126d61da275bfe8516ff01ca Author: Filipe Manana Date: Fri Jan 31 14:06:07 2020 +0000 Btrfs: fix race between using extent maps and merging them We have a few cases where we allow an extent map that is in an extent map tree to be merged with other extents in the tree. Such cases include the unpinning of an extent after the respective ordered extent completed or after logging an extent during a fast fsync. This can lead to subtle and dangerous problems because when doing the merge some other task might be using the same extent map and as consequence see an inconsistent state of the extent map - for example sees the new length but has seen the old start offset. With luck this triggers a BUG_ON(), and not some silent bug, such as the following one in __do_readpage(): $ cat -n fs/btrfs/extent_io.c 3061 static int __do_readpage(struct extent_io_tree *tree, 3062 struct page *page, (...) 3127 em = __get_extent_map(inode, page, pg_offset, cur, 3128 end - cur + 1, get_extent, em_cached); 3129 if (IS_ERR_OR_NULL(em)) { 3130 SetPageError(page); 3131 unlock_extent(tree, cur, end); 3132 break; 3133 } 3134 extent_offset = cur - em->start; 3135 BUG_ON(extent_map_end(em) <= cur); (...) Consider the following example scenario, where we end up hitting the BUG_ON() in __do_readpage(). We have an inode with a size of 8KiB and 2 extent maps: extent A: file offset 0, length 4KiB, disk_bytenr = X, persisted on disk by a previous transaction extent B: file offset 4KiB, length 4KiB, disk_bytenr = X + 4KiB, not yet persisted but writeback started for it already. The extent map is pinned since there's writeback and an ordered extent in progress, so it can not be merged with extent map A yet The following sequence of steps leads to the BUG_ON(): 1) The ordered extent for extent B completes, the respective page gets its writeback bit cleared and the extent map is unpinned, at that point it is not yet merged with extent map A because it's in the list of modified extents; 2) Due to memory pressure, or some other reason, the MM subsystem releases the page corresponding to extent B - btrfs_releasepage() is called and returns 1, meaning the page can be released as it's not dirty, not under writeback anymore and the extent range is not locked in the inode's iotree. However the extent map is not released, either because we are not in a context that allows memory allocations to block or because the inode's size is smaller than 16MiB - in this case our inode has a size of 8KiB; 3) Task B needs to read extent B and ends up __do_readpage() through the btrfs_readpage() callback. At __do_readpage() it gets a reference to extent map B; 4) Task A, doing a fast fsync, calls clear_em_loggin() against extent map B while holding the write lock on the inode's extent map tree - this results in try_merge_map() being called and since it's possible to merge extent map B with extent map A now (the extent map B was removed from the list of modified extents), the merging begins - it sets extent map B's start offset to 0 (was 4KiB), but before it increments the map's length to 8KiB (4kb + 4KiB), task A is at: BUG_ON(extent_map_end(em) <= cur); The call to extent_map_end() sees the extent map has a start of 0 and a length still at 4KiB, so it returns 4KiB and 'cur' is 4KiB, so the BUG_ON() is triggered. So it's dangerous to modify an extent map that is in the tree, because some other task might have got a reference to it before and still using it, and needs to see a consistent map while using it. Generally this is very rare since most paths that lookup and use extent maps also have the file range locked in the inode's iotree. The fsync path is pretty much the only exception where we don't do it to avoid serialization with concurrent reads. Fix this by not allowing an extent map do be merged if if it's being used by tasks other then the one attempting to merge the extent map (when the reference count of the extent map is greater than 2). Reported-by: ryusuke1925 Reported-by: Koki Mitani Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206211 CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit f311ade3a7adf31658ed882aaab9f9879fdccef7 Author: Wenwen Wang Date: Sat Feb 1 20:38:38 2020 +0000 btrfs: ref-verify: fix memory leaks In btrfs_ref_tree_mod(), 'ref' and 'ra' are allocated through kzalloc() and kmalloc(), respectively. In the following code, if an error occurs, the execution will be redirected to 'out' or 'out_unlock' and the function will be exited. However, on some of the paths, 'ref' and 'ra' are not deallocated, leading to memory leaks. For example, if 'action' is BTRFS_ADD_DELAYED_EXTENT, add_block_entry() will be invoked. If the return value indicates an error, the execution will be redirected to 'out'. But, 'ref' is not deallocated on this path, causing a memory leak. To fix the above issues, deallocate both 'ref' and 'ra' before exiting from the function when an error is encountered. CC: stable@vger.kernel.org # 4.15+ Signed-off-by: Wenwen Wang Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2a8d017d46a3f48dad3319e569cd0aee61bab8fc Author: Arnaldo Carvalho de Melo Date: Wed Feb 12 12:45:24 2020 -0300 tools headers kvm: Sync linux/kvm.h with the kernel sources To pick up the changes from: 7de3f1423ff9 ("KVM: s390: Add new reset vcpu API") So far we're ignoring those arch specific ioctls, we need to revisit this at some time to have arch specific tables, etc: $ grep S390 tools/perf/trace/beauty/kvm_ioctl.sh egrep -v " ((ARM|PPC|S390)_|[GS]ET_(DEBUGREGS|PIT2|XSAVE|TSC_KHZ)|CREATE_SPAPR_TCE_64)" | \ $ This addresses these tools/perf build warnings: Warning: Kernel ABI header at 'tools/arch/arm/include/uapi/asm/kvm.h' differs from latest version at 'arch/arm/include/uapi/asm/kvm.h' diff -u tools/arch/arm/include/uapi/asm/kvm.h arch/arm/include/uapi/asm/kvm.h Cc: Adrian Hunter Cc: Christian Borntraeger Cc: Janosch Frank Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 391df72fbd144878e2f905d86f1e9a85a059216a Author: Arnaldo Carvalho de Melo Date: Wed Feb 12 12:41:20 2020 -0300 tools headers kvm: Sync kvm headers with the kernel sources To pick up the changes from: 290a6bb06de9 ("arm64: KVM: Add UAPI notes for swapped registers") No tools changes are caused by this. This addresses these tools/perf build warnings: Cc: Adrian Hunter Cc: Andrew Jones Cc: Jiri Olsa Cc: Marc Zyngier Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 71dd65289793df31e9f10c6b112e5e32dfd89c1d Author: Arnaldo Carvalho de Melo Date: Wed Feb 12 12:33:34 2020 -0300 tools arch x86: Sync asm/cpufeatures.h with the kernel sources To pick up the changes from: 85c17291e2eb ("x86/cpufeatures: Add flag to track whether MSR IA32_FEAT_CTL is configured") f444a5ff95dc ("x86/cpufeatures: Add support for fast short REP; MOVSB") These don't cause any changes in tooling, just silences this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h' diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h Cc: Adrian Hunter Cc: Borislav Petkov Cc: Jiri Olsa Cc: Namhyung Kim Cc: Sean Christopherson Cc: Tony Luck Signed-off-by: Arnaldo Carvalho de Melo commit 7636b586392fc57b84c089147b5e22e52d9650d5 Author: Arnaldo Carvalho de Melo Date: Wed Feb 12 12:29:41 2020 -0300 tools headers x86: Sync disabled-features.h To silence the following tools/perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h' diff -u tools/arch/x86/include/asm/disabled-features.h arch/x86/include/asm/disabled-features.h Picking up the changes in: 45fc24e89b7c ("x86/mpx: remove MPX from arch/x86") that didn't entail any functionality change in the tooling side. Cc: Adrian Hunter Cc: Dave Hansen Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 2aaaa5ee1c3d624a5bcad4ee25f954559c565bc2 Author: Chris Wilson Date: Wed Jan 22 14:02:43 2020 +0000 drm/i915: Mark the removal of the i915_request from the sched.link Keep the rq->fence.flags consistent with the status of the rq->sched.link, and clear the associated bits when decoupling the link on retirement (as we may wish to inspect those flags independent of other state). Fixes: c3f1ed90e6ff ("drm/i915/gt: Allow temporary suspension of inflight requests") References: https://gitlab.freedesktop.org/drm/intel/issues/997 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200122140243.495621-3-chris@chris-wilson.co.uk (cherry picked from commit b4a9a149f91ea345da76bcfe3f8a39715ac346a6) Signed-off-by: Jani Nikula commit a2f90f4ff3746c92896e2b7af8763d6fe5206dbc Author: Chris Wilson Date: Wed Jan 22 14:02:42 2020 +0000 drm/i915/execlists: Reclaim the hanging virtual request If we encounter a hang on a virtual engine, as we process the hang the request may already have been moved back to the virtual engine (we are processing the hang on the physical engine). We need to reclaim the request from the virtual engine so that the locking is consistent and local to the real engine on which we will hold the request for error state capturing. v2: Pull the reclamation into execlists_hold() and assert that cannot be called from outside of the reset (i.e. with the tasklet disabled). v3: Added selftest v4: Drop the reference owned by the virtual engine Fixes: ad18ba7b5eeb ("drm/i915/execlists: Offline error capture") Testcase: igt/gem_exec_balancer/hang Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200122140243.495621-2-chris@chris-wilson.co.uk (cherry picked from commit 989df3a7bd2abe566521e61d1aebf603eb013b7f) Signed-off-by: Jani Nikula commit 317e0395cc230736e474e499e01992bcdace5a73 Author: Chris Wilson Date: Wed Jan 22 14:02:41 2020 +0000 drm/i915/execlists: Take a reference while capturing the guilty request Thanks to preempt-to-busy, we leave the request on the HW as we submit the preemption request. This means that the request may complete at any moment as we process HW events, and in particular the request may be retired as we are planning to capture it for a preemption timeout. Be more careful while obtaining the request to capture after a preemption timeout, and check to see if it completed before we were able to put it on the on-hold list. If we do see it did complete just before we capture the request, proclaim the preemption-timeout a false positive and pardon the reset as we should hit an arbitration point momentarily and so be able to process the preemption. Note that even after we move the request to be on hold it may be retired (as the reset to stop the HW comes after), so we do require to hold our own reference as we work on the request for capture (and all of the peeking at state within the request needs to be carefully protected). Fixes: c3f1ed90e6ff ("drm/i915/gt: Allow temporary suspension of inflight requests") Closes: https://gitlab.freedesktop.org/drm/intel/issues/997 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200122140243.495621-1-chris@chris-wilson.co.uk (cherry picked from commit 4ba5c086a1d8e38d6927967ae1a3271a6ab7a927) Signed-off-by: Jani Nikula commit ad18ba7b5eebf58209a898de8519f6bb2280620b Author: Chris Wilson Date: Thu Jan 16 18:47:54 2020 +0000 drm/i915/execlists: Offline error capture Currently, we skip error capture upon forced preemption. We apply forced preemption when there is a higher priority request that should be running but is being blocked, and we skip inline error capture so that the preemption request is not further delayed by a user controlled capture -- extending the denial of service. However, preemption reset is also used for heartbeats and regular GPU hangs. By skipping the error capture, we remove the ability to debug GPU hangs. In order to capture the error without delaying the preemption request further, we can do an out-of-line capture by removing the guilty request from the execution queue and scheduling a worker to dump that request. When removing a request, we need to remove the entire context and all descendants from the execution queue, so that they do not jump past. Closes: https://gitlab.freedesktop.org/drm/intel/issues/738 Fixes: 3a7a92aba8fb ("drm/i915/execlists: Force preemption") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200116184754.2860848-3-chris@chris-wilson.co.uk (cherry picked from commit 748317386afb235e11616098d2c7772e49776b58) Signed-off-by: Jani Nikula commit c3f1ed90e6ffbf4e22010522351779f920e53d0d Author: Chris Wilson Date: Thu Jan 16 18:47:53 2020 +0000 drm/i915/gt: Allow temporary suspension of inflight requests In order to support out-of-line error capture, we need to remove the active request from HW and put it to one side while a worker compresses and stores all the details associated with that request. (As that compression may take an arbitrary user-controlled amount of time, we want to let the engine continue running on other workloads while the hanging request is dumped.) Not only do we need to remove the active request, but we also have to remove its context and all requests that were dependent on it (both in flight, queued and future submission). Finally once the capture is complete, we need to be able to resubmit the request and its dependents and allow them to execute. v2: Replace stack recursion with a simple list. v3: Check all the parents, not just the first, when searching for a stuck ancestor! References: https://gitlab.freedesktop.org/drm/intel/issues/738 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200116184754.2860848-2-chris@chris-wilson.co.uk (cherry picked from commit 32ff621fd74496f0c33644125fb69ff175859b1f) Signed-off-by: Jani Nikula commit 9e2750fc80b5cc606365201132d49fed00570dd1 Author: Chris Wilson Date: Thu Jan 16 18:47:52 2020 +0000 drm/i915: Keep track of request among the scheduling lists If we keep track of when the i915_request.sched.link is on the HW runlist, or in the priority queue we can simplify our interactions with the request (such as during rescheduling). This also simplifies the next patch where we introduce a new in-between list, for requests that are ready but neither on the run list or in the queue. v2: Update i915_sched_node.link explanation for current usage where it is a link on both the queue and on the runlists. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200116184754.2860848-1-chris@chris-wilson.co.uk (cherry picked from commit 672c368f9398042b629740cc9816e8e939eff2db) Signed-off-by: Jani Nikula commit cc3251d8ef6abb5ae7f75a5062dc4b05830571d2 Merge: 2933803bdcd8 0e9d7bb293f3 Author: Jani Nikula Date: Wed Feb 12 16:50:04 2020 +0200 Merge tag 'gvt-fixes-2020-02-12' of https://github.com/intel/gvt-linux into drm-intel-next-fixes gvt-fixes-2020-02-12 - fix possible high-order allocation fail for late load (Igor) - fix one missed lock for ppgtt mm LRU list (Igor) Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20200212065912.GB4997@zhen-hp.sh.intel.com commit 8d2e77b39b8fecb794e19cd006a12f90b14dd077 Author: Christophe JAILLET Date: Wed Dec 4 04:35:25 2019 +0100 HID: alps: Fix an error handling path in 'alps_input_configured()' They are issues: - if 'input_allocate_device()' fails and return NULL, there is no need to free anything and 'input_free_device()' call is a no-op. It can be axed. - 'ret' is known to be 0 at this point, so we must set it to a meaningful value before returning Fixes: 2562756dde55 ("HID: add Alps I2C HID Touchpad-Stick support") Signed-off-by: Christophe JAILLET Signed-off-by: Jiri Kosina commit 8c65582f82ee736b63b3c0cd9c7c5b4572f1f4d6 Author: Arnaldo Carvalho de Melo Date: Wed Feb 12 11:04:23 2020 -0300 tools include UAPI: Sync sound/asound.h copy Picking the changes from: 46b770f720bd ("ALSA: uapi: Fix sparse warning") a103a3989993 ("ALSA: control: Fix incompatible protocol error") bd3eb4e87eb3 ("ALSA: ctl: bump protocol version up to v2.1.0") ff16351e3f30 ("ALSA: ctl: remove dimen member from elem_info structure") 542283566679 ("ALSA: ctl: remove unused macro for timestamping of elem_value") 7fd7d6c50451 ("ALSA: uapi: Fix typos and header inclusion in asound.h") 1cfaef961703 ("ALSA: bump uapi version numbers") 80fe7430c708 ("ALSA: add new 32-bit layout for snd_pcm_mmap_status/control") 07094ae6f952 ("ALSA: Avoid using timespec for struct snd_timer_tread") d9e5582c4bb2 ("ALSA: Avoid using timespec for struct snd_rawmidi_status") 3ddee7f88aaf ("ALSA: Avoid using timespec for struct snd_pcm_status") a4e7dd35b9da ("ALSA: Avoid using timespec for struct snd_ctl_elem_value") a07804cc7472 ("ALSA: Avoid using timespec for struct snd_timer_status") Which entails no changes in the tooling side. To silence this perf tools build warning: Warning: Kernel ABI header at 'tools/include/uapi/sound/asound.h' differs from latest version at 'include/uapi/sound/asound.h' diff -u tools/include/uapi/sound/asound.h include/uapi/sound/asound.h Cc: Adrian Hunter Cc: Arnd Bergmann Cc: Baolin Wang Cc: Jiri Olsa Cc: Namhyung Kim Cc: Ranjani Sridharan Cc: Takashi Iwai Cc: Takashi Sakamoto Signed-off-by: Arnaldo Carvalho de Melo commit 47f8d94ac5241e30a5ab0b6b91b963b54765ec7c Author: Arnaldo Carvalho de Melo Date: Wed Feb 12 10:53:06 2020 -0300 tools headers UAPI: Sync asm-generic/mman-common.h with the kernel To pick the changes from: d41938d2cbee ("mm: Reserve asm-generic prot flags 0x10 and 0x20 for arch use") No changes in tooling, just a rebuild as files needed got touched. This addresses the following perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/mman-common.h' differs from latest version at 'include/uapi/asm-generic/mman-common.h' diff -u tools/include/uapi/asm-generic/mman-common.h include/uapi/asm-generic/mman-common.h Cc: Adrian Hunter Cc: Dave Martin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Will Deacon Signed-off-by: Arnaldo Carvalho de Melo commit 5c02c447eaeda29d3da121a2e17b97ccaf579b51 Author: dan.carpenter@oracle.com Date: Wed Jan 15 20:46:28 2020 +0300 HID: hiddev: Fix race in in hiddev_disconnect() Syzbot reports that "hiddev" is used after it's free in hiddev_disconnect(). The hiddev_disconnect() function sets "hiddev->exist = 0;" so hiddev_release() can free it as soon as we drop the "existancelock" lock. This patch moves the mutex_unlock(&hiddev->existancelock) until after we have finished using it. Reported-by: syzbot+784ccb935f9900cc7c9e@syzkaller.appspotmail.com Fixes: 7f77897ef2b6 ("HID: hiddev: fix potential use-after-free") Suggested-by: Alan Stern Signed-off-by: Dan Carpenter Signed-off-by: Jiri Kosina commit df5a5f3cf24608457bb5e57297dd9f0d528be58f Author: John Garry Date: Fri Dec 13 21:54:15 2019 +0800 perf tools: Add arm64 version of get_cpuid() Add an arm64 version of get_cpuid(), which is used for various annotation and headers - for example, I now get the CPUID in "perf report --header", as shown in this snippet: # hostname : ubuntu # os release : 5.5.0-rc1-dirty # perf version : 5.5.rc1.gbf8a13dc9851 # arch : aarch64 # nrcpus online : 96 # nrcpus avail : 96 # cpuid : 0x00000000480fd010 Since much of the code to read the MIDR is already in get_cpuid_str(), factor out this code. Tester notes: I tested this patch on my new ARM64 Kunpeng 920 server. [root@node1 zsk]# ./perf --version perf version 5.6.rc1.g2cdb955b7252 Both perf list and perf stat can work. Signed-off-by: John Garry Tested-by: Shaokun Zhang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1576245255-210926-1-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 365f9cc195a7fae8ac541129cd2a31ad87e46221 Author: Arnaldo Carvalho de Melo Date: Wed Feb 12 10:25:27 2020 -0300 tools headers UAPI: Sync drm/i915_drm.h with the kernel sources To pick the change in: cc662126b413 ("drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET") That don't result in any changes in tooling, just silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h' diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h Cc: Abdiel Janulgue Cc: Adrian Hunter Cc: Chris Wilson Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 84a4062632462c4320704fcdf8e99e89e94c0aba Author: Johan Korsnes Date: Fri Jan 17 13:08:36 2020 +0100 HID: core: increase HID report buffer size to 8KiB We have a HID touch device that reports its opens and shorts test results in HID buffers of size 8184 bytes. The maximum size of the HID buffer is currently set to 4096 bytes, causing probe of this device to fail. With this patch we increase the maximum size of the HID buffer to 8192 bytes, making device probe and acquisition of said buffers succeed. Signed-off-by: Johan Korsnes Cc: Alan Stern Cc: Armando Visconti Cc: Jiri Kosina Signed-off-by: Jiri Kosina commit 5ebdffd25098898aff1249ae2f7dbfddd76d8f8f Author: Johan Korsnes Date: Fri Jan 17 13:08:35 2020 +0100 HID: core: fix off-by-one memset in hid_report_raw_event() In case a report is greater than HID_MAX_BUFFER_SIZE, it is truncated, but the report-number byte is not correctly handled. This results in a off-by-one in the following memset, causing a kernel Oops and ensuing system crash. Note: With commit 8ec321e96e05 ("HID: Fix slab-out-of-bounds read in hid_field_extract") I no longer hit the kernel Oops as we instead fail "controlled" at probe if there is a report too long in the HID report-descriptor. hid_report_raw_event() is an exported symbol, so presumabely we cannot always rely on this being the case. Fixes: 966922f26c7f ("HID: fix a crash in hid_report_raw_event() function.") Signed-off-by: Johan Korsnes Cc: Armando Visconti Cc: Jiri Kosina Cc: Alan Stern Signed-off-by: Jiri Kosina commit e433be929e63265b7412478eb7ff271467aee2d7 Author: Mansour Behabadi Date: Wed Jan 29 17:26:31 2020 +1100 HID: apple: Add support for recent firmware on Magic Keyboards Magic Keyboards with more recent firmware (0x0100) report Fn key differently. Without this patch, Fn key may not behave as expected and may not be configurable via hid_apple fnmode module parameter. Signed-off-by: Mansour Behabadi Signed-off-by: Jiri Kosina commit f65b9dba5733de8e285cf9d7e8672b46dd0cb709 Author: Arnaldo Carvalho de Melo Date: Wed Feb 12 10:13:25 2020 -0300 tools headers uapi: Sync linux/fscrypt.h with the kernel sources To pick the changes from: e933adde6f97 ("fscrypt: include in UAPI header") 93edd392cad7 ("fscrypt: support passing a keyring key to FS_IOC_ADD_ENCRYPTION_KEY") That don't trigger any changes in tooling. This silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/fscrypt.h' differs from latest version at 'include/uapi/linux/fscrypt.h' diff -u tools/include/uapi/linux/fscrypt.h include/uapi/linux/fscrypt.h Cc: Adrian Hunter Cc: Eric Biggers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 74c12ee02af109adcde36ec184fa59c0afb0edaa Merge: 48bc281e4bf0 bb6d3fb354c5 Author: Maarten Lankhorst Date: Wed Feb 12 14:08:59 2020 +0100 Merge v5.6-rc1 into drm-misc-fixes We're based on v5.6, need v5.6-rc1 at least. :) Signed-off-by: Maarten Lankhorst commit a06230b62b898e51cfb1de256b2042a09a691f58 Author: Oliver Upton Date: Fri Feb 7 02:36:06 2020 -0800 KVM: x86: Deliver exception payload on KVM_GET_VCPU_EVENTS KVM allows the deferral of exception payloads when a vCPU is in guest mode to allow the L1 hypervisor to intercept certain events (#PF, #DB) before register state has been modified. However, this behavior is incompatible with the KVM_{GET,SET}_VCPU_EVENTS ABI, as userspace expects register state to have been immediately modified. Userspace may opt-in for the payload deferral behavior with the KVM_CAP_EXCEPTION_PAYLOAD per-VM capability. As such, kvm_multiple_exception() will immediately manipulate guest registers if the capability hasn't been requested. Since the deferral is only necessary if a userspace ioctl were to be serviced at the same as a payload bearing exception is recognized, this behavior can be relaxed. Instead, opportunistically defer the payload from kvm_multiple_exception() and deliver the payload before completing a KVM_GET_VCPU_EVENTS ioctl. Signed-off-by: Oliver Upton Signed-off-by: Paolo Bonzini commit 684c0422da71da0cd81319c90b8099b563b13da4 Author: Oliver Upton Date: Fri Feb 7 02:36:05 2020 -0800 KVM: nVMX: Handle pending #DB when injecting INIT VM-exit SDM 27.3.4 states that the 'pending debug exceptions' VMCS field will be populated if a VM-exit caused by an INIT signal takes priority over a debug-trap. Emulate this behavior when synthesizing an INIT signal VM-exit into L1. Fixes: 4b9852f4f389 ("KVM: x86: Fix INIT signal handling in various CPU states") Signed-off-by: Oliver Upton Signed-off-by: Paolo Bonzini commit 307f1cfa269657c63cfe2c932386fcc24684d9dd Author: Oliver Upton Date: Fri Feb 7 02:36:04 2020 -0800 KVM: x86: Mask off reserved bit from #DB exception payload KVM defines the #DB payload as compatible with the 'pending debug exceptions' field under VMX, not DR6. Mask off bit 12 when applying the payload to DR6, as it is reserved on DR6 but not the 'pending debug exceptions' field. Fixes: f10c729ff965 ("kvm: vmx: Defer setting of DR6 until #DB delivery") Signed-off-by: Oliver Upton Signed-off-by: Paolo Bonzini commit 2933803bdcd8ac67c0b97a0bb158e0762d5ae236 Author: Chris Wilson Date: Thu Jan 30 14:39:31 2020 +0000 drm/i915/gem: Tighten checks and acquiring the mmap object Make sure we hold the rcu lock as we acquire the rcu protected reference of the object when looking it up from the associated mmap vma. Closes: https://gitlab.freedesktop.org/drm/intel/issues/1083 Fixes: cc662126b413 ("drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET") Signed-off-by: Chris Wilson Cc: Abdiel Janulgue Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200130143931.1906301-1-chris@chris-wilson.co.uk (cherry picked from commit 280d14a69da2e71f43408537c008f2775d5e5360) Signed-off-by: Jani Nikula commit 52144db1309897f279b53e8df8a0d17e1cda7960 Author: José Roberto de Souza Date: Wed Jan 29 15:23:45 2020 -0800 drm/i915: Fix preallocated barrier list append Only the first and the last nodes were being added to ref->preallocated_barriers. Renaming variables to make it more easy to read. Fixes: 841350223816 ("drm/i915/gt: Drop mutex serialisation between context pin/unpin") Cc: Chris Wilson Cc: Maarten Lankhorst Signed-off-by: José Roberto de Souza Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200129232345.84512-1-jose.souza@intel.com (cherry picked from commit d4c3c0b8221a72107eaf35c80c40716b81ca463e) Signed-off-by: Jani Nikula commit 5b92415e64e145e7da60420ead66b62aa41917bf Author: Chris Wilson Date: Mon Jan 27 15:28:29 2020 +0000 drm/i915/gt: Acquire ce->active before ce->pin_count/ce->pin_mutex Similar to commit ac0e331a628b ("drm/i915: Tighten atomicity of i915_active_acquire vs i915_active_release") we have the same race of trying to pin the context underneath a mutex while allowing the decrement to be atomic outside of that mutex. This leads to the problem where two threads may simultaneously try to pin the context and the second not notice that they needed to repin the context. <2> [198.669621] kernel BUG at drivers/gpu/drm/i915/gt/intel_timeline.c:387! <4> [198.669703] invalid opcode: 0000 [#1] PREEMPT SMP PTI <4> [198.669712] CPU: 0 PID: 1246 Comm: gem_exec_create Tainted: G U W 5.5.0-rc6-CI-CI_DRM_7755+ #1 <4> [198.669723] Hardware name: /NUC7i5BNB, BIOS BNKBL357.86A.0054.2017.1025.1822 10/25/2017 <4> [198.669776] RIP: 0010:timeline_advance+0x7b/0xe0 [i915] <4> [198.669785] Code: 00 48 c7 c2 10 f1 46 a0 48 c7 c7 70 1b 32 a0 e8 bb dd e7 e0 bf 01 00 00 00 e8 d1 af e7 e0 31 f6 bf 09 00 00 00 e8 35 ef d8 e0 <0f> 0b 48 c7 c1 48 fa 49 a0 ba 84 01 00 00 48 c7 c6 10 f1 46 a0 48 <4> [198.669803] RSP: 0018:ffffc900004c3a38 EFLAGS: 00010296 <4> [198.669810] RAX: ffff888270b35140 RBX: ffff88826f32ee00 RCX: 0000000000000006 <4> [198.669818] RDX: 00000000000017c5 RSI: 0000000000000000 RDI: 0000000000000009 <4> [198.669826] RBP: ffffc900004c3a64 R08: 0000000000000000 R09: 0000000000000000 <4> [198.669834] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88826f9b5980 <4> [198.669841] R13: 0000000000000cc0 R14: ffffc900004c3dc0 R15: ffff888253610068 <4> [198.669849] FS: 00007f63e663fe40(0000) GS:ffff888276c00000(0000) knlGS:0000000000000000 <4> [198.669857] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [198.669864] CR2: 00007f171f8e39a8 CR3: 000000026b1f6005 CR4: 00000000003606f0 <4> [198.669872] Call Trace: <4> [198.669924] intel_timeline_get_seqno+0x12/0x40 [i915] <4> [198.669977] __i915_request_create+0x76/0x5a0 [i915] <4> [198.670024] i915_request_create+0x86/0x1c0 [i915] <4> [198.670068] i915_gem_do_execbuffer+0xbf2/0x2500 [i915] <4> [198.670082] ? __lock_acquire+0x460/0x15d0 <4> [198.670128] i915_gem_execbuffer2_ioctl+0x11f/0x470 [i915] <4> [198.670171] ? i915_gem_execbuffer_ioctl+0x300/0x300 [i915] <4> [198.670181] drm_ioctl_kernel+0xa7/0xf0 <4> [198.670188] drm_ioctl+0x2e1/0x390 <4> [198.670233] ? i915_gem_execbuffer_ioctl+0x300/0x300 [i915] Fixes: 841350223816 ("drm/i915/gt: Drop mutex serialisation between context pin/unpin") References: ac0e331a628b ("drm/i915: Tighten atomicity of i915_active_acquire vs i915_active_release") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200127152829.2842149-1-chris@chris-wilson.co.uk (cherry picked from commit e5429340bfa2dc43a07c3329e0c30cdae4cc0b35) Signed-off-by: Jani Nikula commit 7c34bb03983e3c1e42ad2749514dec9e5a19c336 Author: Chris Wilson Date: Sun Jan 26 10:23:43 2020 +0000 drm/i915: Tighten atomicity of i915_active_acquire vs i915_active_release As we use a mutex to serialise the first acquire (as it may be a lengthy operation), but only an atomic decrement for the release, we have to be careful in case a second thread races and completes both acquire/release as the first finishes its acquire. Thread A Thread B i915_active_acquire i915_active_acquire atomic_read() == 0 atomic_read() == 0 mutex_lock() mutex_lock() atomic_read() == 0 ref->active(); atomic_inc() mutex_unlock() atomic_read() == 1 i915_active_release atomic_dec_and_test() -> 0 ref->retire() atomic_inc() -> 1 mutex_unlock() So thread A has acquired the ref->active_count but since the ref was still active at the time, it did not initialise it. By switching the check inside the mutex to an atomic increment only if already active, we close the race. Fixes: c9ad602feabe ("drm/i915: Split i915_active.mutex into an irq-safe spinlock for the rbtree") Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200126102346.1877661-3-chris@chris-wilson.co.uk (cherry picked from commit ac0e331a628b5ded087eab09fad2ffb082ac61ba) Signed-off-by: Jani Nikula commit 9556e5c7c40e3d2e7c9417d1e766e3bd88b598e5 Author: Chris Wilson Date: Fri Jan 24 19:22:55 2020 +0000 drm/i915: Stub out i915_gpu_coredump_put i915_gpu_coreddump_put is currently only defined if CONFIG_DRM_I915_CAPTURE_ERROR is enabled, provide a stub otherwise. Reported-by: Mike Lothian Fixes: 742379c0c400 ("drm/i915: Start chopping up the GPU error capture") Signed-off-by: Chris Wilson Cc: Mike Lothian Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20200124192255.541355-1-chris@chris-wilson.co.uk (cherry picked from commit 7e36505d0cf82f2920f2fd22ebb14a8b540396a3) Signed-off-by: Jani Nikula commit 1f03b2bcd0d7cad4af107339cdef80ed377fe2a8 Author: Marc Zyngier Date: Fri Feb 7 16:34:10 2020 +0000 KVM: Disable preemption in kvm_get_running_vcpu() Accessing a per-cpu variable only makes sense when preemption is disabled (and the kernel does check this when the right debug options are switched on). For kvm_get_running_vcpu(), it is fine to return the value after re-enabling preemption, as the preempt notifiers will make sure that this is kept consistent across task migration (the comment above the function hints at it, but lacks the crucial preemption management). While we're at it, move the comment from the ARM code, which explains why the whole thing works. Fixes: 7495e22bb165 ("KVM: Move running VCPU from ARM to common code"). Cc: Paolo Bonzini Reported-by: Zenghui Yu Tested-by: Zenghui Yu Reviewed-by: Peter Xu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/318984f6-bc36-33a3-abc6-bf2295974b06@huawei.com Message-id: <20200207163410.31276-1-maz@kernel.org> Signed-off-by: Paolo Bonzini commit a1a7e3a36e01ca6e67014f8cf673cb8e47be5550 Author: Xin Long Date: Sun Feb 9 21:16:38 2020 +0800 xfrm: add the missing verify_sec_ctx_len check in xfrm_add_acquire Without doing verify_sec_ctx_len() check in xfrm_add_acquire(), it may be out-of-bounds to access uctx->ctx_str with uctx->ctx_len, as noticed by syz: BUG: KASAN: slab-out-of-bounds in selinux_xfrm_alloc_user+0x237/0x430 Read of size 768 at addr ffff8880123be9b4 by task syz-executor.1/11650 Call Trace: dump_stack+0xe8/0x16e print_address_description.cold.3+0x9/0x23b kasan_report.cold.4+0x64/0x95 memcpy+0x1f/0x50 selinux_xfrm_alloc_user+0x237/0x430 security_xfrm_policy_alloc+0x5c/0xb0 xfrm_policy_construct+0x2b1/0x650 xfrm_add_acquire+0x21d/0xa10 xfrm_user_rcv_msg+0x431/0x6f0 netlink_rcv_skb+0x15a/0x410 xfrm_netlink_rcv+0x6d/0x90 netlink_unicast+0x50e/0x6a0 netlink_sendmsg+0x8ae/0xd40 sock_sendmsg+0x133/0x170 ___sys_sendmsg+0x834/0x9a0 __sys_sendmsg+0x100/0x1e0 do_syscall_64+0xe5/0x660 entry_SYSCALL_64_after_hwframe+0x6a/0xdf So fix it by adding the missing verify_sec_ctx_len check there. Fixes: 980ebd25794f ("[IPSEC]: Sync series - acquire insert") Reported-by: Hangbin Liu Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit 171d449a028573b2f0acdc7f31ecbb045391b320 Author: Xin Long Date: Sun Feb 9 21:15:29 2020 +0800 xfrm: fix uctx len check in verify_sec_ctx_len It's not sufficient to do 'uctx->len != (sizeof(struct xfrm_user_sec_ctx) + uctx->ctx_len)' check only, as uctx->len may be greater than nla_len(rt), in which case it will cause slab-out-of-bounds when accessing uctx->ctx_str later. This patch is to fix it by return -EINVAL when uctx->len > nla_len(rt). Fixes: df71837d5024 ("[LSM-IPSec]: Security association restriction.") Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit bab0c318ba3da32483da8aad37b9ef98fd8edafb Author: Paolo Bonzini Date: Tue Feb 11 18:40:58 2020 +0100 KVM: x86: do not reset microcode version on INIT or RESET Do not initialize the microcode version at RESET or INIT, only on vCPU creation. Microcode updates are not lost during INIT, and exact behavior across a warm RESET is not specified by the architecture. Since we do not support a microcode update directly from the hypervisor, but only as a result of userspace setting the microcode version MSR, it's simpler for userspace if we do nothing in KVM and let userspace emulate behavior for RESET as it sees fit. Userspace can tie the fix to the availability of MSR_IA32_UCODE_REV in the list of emulated MSRs. Reported-by: Alex Williamson Signed-off-by: Paolo Bonzini commit 7dafba3762d6c0083ded00a48f8c1a158bc86717 Author: Takashi Iwai Date: Wed Feb 12 09:10:47 2020 +0100 ALSA: hda/realtek - Fix silent output on MSI-GL73 MSI-GL73 laptop with ALC1220 codec requires a similar workaround for Clevo laptops to enforce the DAC/mixer connection path. Set up a quirk entry for that. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204159 Cc: Link: https://lore.kernel.org/r/20200212081047.27727-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2b3b6497c38d123934de68ea82a247b557d95290 Author: Kailang Yang Date: Mon Feb 10 16:15:14 2020 +0800 ALSA: hda/realtek - Add more codec supported Headset Button Add supported Headset Button for ALC215/ALC285/ALC289. Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/948f70b4488f4cc2b629a39ce4e4be33@realtek.com Signed-off-by: Takashi Iwai commit b44beb8ae5d50b055b3df16fd5688c92d32f3773 Merge: 457fed775c97 c207979f5ae1 Author: David S. Miller Date: Tue Feb 11 17:08:31 2020 -0800 Merge branch 'Bug-fixes-for-ENA-Ethernet-driver' Sameeh Jubran says: ==================== Bug fixes for ENA Ethernet driver Difference from V1: * Started using netdev_rss_key_fill() * Dropped superflous changes that are not related to bug fixes as requested by Jakub ==================== Signed-off-by: David S. Miller commit c207979f5ae10ed70aff1bb13f39f0736973de99 Author: Arthur Kiyanovski Date: Tue Feb 11 15:17:51 2020 +0000 net: ena: ena-com.c: prevent NULL pointer dereference comp_ctx can be NULL in a very rare case when an admin command is executed during the execution of ena_remove(). The bug scenario is as follows: * ena_destroy_device() sets the comp_ctx to be NULL * An admin command is executed before executing unregister_netdev(), this can still happen because our device can still receive callbacks from the netdev infrastructure such as ethtool commands. * When attempting to access the comp_ctx, the bug occurs since it's set to NULL Fix: Added a check that comp_ctx is not NULL Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 886d2089276e40d460731765083a741c5c762461 Author: Sameeh Jubran Date: Tue Feb 11 15:17:50 2020 +0000 net: ena: ethtool: use correct value for crc32 hash Up till kernel 4.11 there was no enum defined for crc32 hash in ethtool, thus the xor enum was used for supporting crc32. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller commit 470793a78ce344bd53d31e0c2d537f71ba957547 Author: Arthur Kiyanovski Date: Tue Feb 11 15:17:49 2020 +0000 net: ena: make ena rxfh support ETH_RSS_HASH_NO_CHANGE As the name suggests ETH_RSS_HASH_NO_CHANGE is received upon changing the key or indirection table using ethtool while keeping the same hash function. Also add a function for retrieving the current hash function from the ena-com layer. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Sameeh Jubran Signed-off-by: Saeed Bshara Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit e3f89f91e98ce07dc0f121a3b70d21aca749ba39 Author: Arthur Kiyanovski Date: Tue Feb 11 15:17:48 2020 +0000 net: ena: fix corruption of dev_idx_to_host_tbl The function ena_com_ind_tbl_convert_from_device() has an overflow bug as explained below. Either way, this function is not needed at all since we don't retrieve the indirection table from the device at any point which means that this conversion is not needed. The bug: The for loop iterates over all io_sq_queues, when passing the actual number of used queues the io_sq_queues[i].idx equals 0 since they are uninitialized which results in the following code to be executed till the end of the loop: dev_idx_to_host_tbl[0] = i; This results dev_idx_to_host_tbl[0] in being equal to ENA_TOTAL_NUM_QUEUES - 1. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 92569fd27f5cb0ccbdf7c7d70044b690e89a0277 Author: Arthur Kiyanovski Date: Tue Feb 11 15:17:47 2020 +0000 net: ena: fix incorrectly saving queue numbers when setting RSS indirection table The indirection table has the indices of the Rx queues. When we store it during set indirection operation, we convert the indices to our internal representation of the indices. Our internal representation of the indices is: even indices for Tx and uneven indices for Rx, where every Tx/Rx pair are in a consecutive order starting from 0. For example if the driver has 3 queues (3 for Tx and 3 for Rx) then the indices are as follows: 0 1 2 3 4 5 Tx Rx Tx Rx Tx Rx The BUG: The issue is that when we satisfy a get request for the indirection table, we don't convert the indices back to the original representation. The FIX: Simply apply the inverse function for the indices of the indirection table after we set it. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 4844470d472d660c26149ad764da2406adb13423 Author: Arthur Kiyanovski Date: Tue Feb 11 15:17:46 2020 +0000 net: ena: rss: store hash function as values and not bits The device receives, stores and retrieves the hash function value as bits and not as their enum value. The bug: * In ena_com_set_hash_function() we set cmd.u.flow_hash_func.selected_func to the bit value of rss->hash_func. (1 << rss->hash_func) * In ena_com_get_hash_function() we retrieve the hash function and store it's bit value in rss->hash_func. (Now the bit value of rss->hash_func is stored in rss->hash_func instead of it's enum value) The fix: This commit fixes the issue by converting the retrieved hash function values from the device to the matching enum value of the set bit using ffs(). ffs() finds the first set bit's index in a word. Since the function returns 1 for the LSB's index, we need to subtract 1 from the returned value (note that BIT(0) is 1). Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 0c8923c0a64fb5d14bebb9a9065d2dc25ac5e600 Author: Sameeh Jubran Date: Tue Feb 11 15:17:45 2020 +0000 net: ena: rss: fix failure to get indirection table On old hardware, getting / setting the hash function is not supported while gettting / setting the indirection table is. This commit enables us to still show the indirection table on older hardwares by setting the hash function and key to NULL. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller commit 6a4f7dc82d1e3abd3feb0c60b5041056fcd9880c Author: Sameeh Jubran Date: Tue Feb 11 15:17:44 2020 +0000 net: ena: rss: do not allocate key when not supported Currently we allocate the key whether the device supports setting the key or not. This commit adds a check to the allocation function and handles the error accordingly. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller commit 0d1c3de7b8c78a5e44b74b62ede4a63629f5d811 Author: Arthur Kiyanovski Date: Tue Feb 11 15:17:43 2020 +0000 net: ena: fix incorrect default RSS key Bug description: When running "ethtool -x " the key shows up as all zeros. When we use "ethtool -X hfunc toeplitz hkey " to set the key and then try to retrieve it using "ethtool -x " then we return the correct key because we return the one we saved. Bug cause: We don't fetch the key from the device but instead return the key that we have saved internally which is by default set to zero upon allocation. Fix: This commit fixes the issue by initializing the key to a random value using netdev_rss_key_fill(). Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit cf6d17fde93bdda23c9b02dd5906a12bf8c55209 Author: Arthur Kiyanovski Date: Tue Feb 11 15:17:42 2020 +0000 net: ena: add missing ethtool TX timestamping indication Current implementation of the driver calls skb_tx_timestamp()to add a software tx timestamp to the skb, however the software-transmit capability is not reported in ethtool -T. This commit updates the ethtool structure to report the software-transmit capability in ethtool -T using the standard ethtool_op_get_ts_info(). This function reports all software timestamping capabilities (tx and rx), as well as setting phc_index = -1. phc_index is the index of the PTP hardware clock device that will be used for hardware timestamps. Since we don't have such a device in ENA, using the default -1 value is the correct setting. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Ezequiel Lara Gomez Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 2a6e5fa2f4c25b66c763428a3e65363214946931 Author: Arthur Kiyanovski Date: Tue Feb 11 15:17:41 2020 +0000 net: ena: fix uses of round_jiffies() >From the documentation of round_jiffies(): "Rounds a time delta in the future (in jiffies) up or down to (approximately) full seconds. This is useful for timers for which the exact time they fire does not matter too much, as long as they fire approximately every X seconds. By rounding these timers to whole seconds, all such timers will fire at the same time, rather than at various times spread out. The goal of this is to have the CPU wake up less, which saves power." There are 2 parts to this patch: ================================ Part 1: ------- In our case we need timer_service to be called approximately every X=1 seconds, and the exact time does not matter, so using round_jiffies() is the right way to go. Therefore we add round_jiffies() to the mod_timer() in ena_timer_service(). Part 2: ------- round_jiffies() is used in check_for_missing_keep_alive() when getting the jiffies of the expiration of the keep_alive timeout. Here it is actually a mistake to use round_jiffies() because we want the exact time when keep_alive should expire and not an approximate rounded time, which can cause early, false positive, timeouts. Therefore we remove round_jiffies() in the calculation of keep_alive_expired() in check_for_missing_keep_alive(). Fixes: 82ef30f13be0 ("net: ena: add hardware hints capability to the driver") Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 91a65b7d3ed8450f31ab717a65dcb5f9ceb5ab02 Author: Arthur Kiyanovski Date: Tue Feb 11 15:17:40 2020 +0000 net: ena: fix potential crash when rxfh key is NULL When ethtool -X is called without an hkey, ena_com_fill_hash_function() is called with key=NULL, which is passed to memcpy causing a crash. This commit fixes this issue by checking key is not NULL. Fixes: 1738cd3ed342 ("net: ena: Add a driver for Amazon Elastic Network Adapters (ENA)") Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 457fed775c97ac2c0cd1672aaf2ff2c8a6235e87 Author: Eric Dumazet Date: Mon Feb 10 11:36:13 2020 -0800 net/smc: fix leak of kernel memory to user space As nlmsg_put() does not clear the memory that is reserved, it this the caller responsability to make sure all of this memory will be written, in order to not reveal prior content. While we are at it, we can provide the socket cookie even if clsock is not set. syzbot reported : BUG: KMSAN: uninit-value in __arch_swab32 arch/x86/include/uapi/asm/swab.h:10 [inline] BUG: KMSAN: uninit-value in __fswab32 include/uapi/linux/swab.h:59 [inline] BUG: KMSAN: uninit-value in __swab32p include/uapi/linux/swab.h:179 [inline] BUG: KMSAN: uninit-value in __be32_to_cpup include/uapi/linux/byteorder/little_endian.h:82 [inline] BUG: KMSAN: uninit-value in get_unaligned_be32 include/linux/unaligned/access_ok.h:30 [inline] BUG: KMSAN: uninit-value in ____bpf_skb_load_helper_32 net/core/filter.c:240 [inline] BUG: KMSAN: uninit-value in ____bpf_skb_load_helper_32_no_cache net/core/filter.c:255 [inline] BUG: KMSAN: uninit-value in bpf_skb_load_helper_32_no_cache+0x14a/0x390 net/core/filter.c:252 CPU: 1 PID: 5262 Comm: syz-executor.5 Not tainted 5.5.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x220 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215 __arch_swab32 arch/x86/include/uapi/asm/swab.h:10 [inline] __fswab32 include/uapi/linux/swab.h:59 [inline] __swab32p include/uapi/linux/swab.h:179 [inline] __be32_to_cpup include/uapi/linux/byteorder/little_endian.h:82 [inline] get_unaligned_be32 include/linux/unaligned/access_ok.h:30 [inline] ____bpf_skb_load_helper_32 net/core/filter.c:240 [inline] ____bpf_skb_load_helper_32_no_cache net/core/filter.c:255 [inline] bpf_skb_load_helper_32_no_cache+0x14a/0x390 net/core/filter.c:252 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline] kmsan_internal_poison_shadow+0x66/0xd0 mm/kmsan/kmsan.c:127 kmsan_kmalloc_large+0x73/0xc0 mm/kmsan/kmsan_hooks.c:128 kmalloc_large_node_hook mm/slub.c:1406 [inline] kmalloc_large_node+0x282/0x2c0 mm/slub.c:3841 __kmalloc_node_track_caller+0x44b/0x1200 mm/slub.c:4368 __kmalloc_reserve net/core/skbuff.c:141 [inline] __alloc_skb+0x2fd/0xac0 net/core/skbuff.c:209 alloc_skb include/linux/skbuff.h:1049 [inline] netlink_dump+0x44b/0x1ab0 net/netlink/af_netlink.c:2224 __netlink_dump_start+0xbb2/0xcf0 net/netlink/af_netlink.c:2352 netlink_dump_start include/linux/netlink.h:233 [inline] smc_diag_handler_dump+0x2ba/0x300 net/smc/smc_diag.c:242 sock_diag_rcv_msg+0x211/0x610 net/core/sock_diag.c:256 netlink_rcv_skb+0x451/0x650 net/netlink/af_netlink.c:2477 sock_diag_rcv+0x63/0x80 net/core/sock_diag.c:275 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0xf9e/0x1100 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x1248/0x14d0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg net/socket.c:659 [inline] kernel_sendmsg+0x433/0x440 net/socket.c:679 sock_no_sendpage+0x235/0x300 net/core/sock.c:2740 kernel_sendpage net/socket.c:3776 [inline] sock_sendpage+0x1e1/0x2c0 net/socket.c:937 pipe_to_sendpage+0x38c/0x4c0 fs/splice.c:458 splice_from_pipe_feed fs/splice.c:512 [inline] __splice_from_pipe+0x539/0xed0 fs/splice.c:636 splice_from_pipe fs/splice.c:671 [inline] generic_splice_sendpage+0x1d5/0x2d0 fs/splice.c:844 do_splice_from fs/splice.c:863 [inline] do_splice fs/splice.c:1170 [inline] __do_sys_splice fs/splice.c:1447 [inline] __se_sys_splice+0x2380/0x3350 fs/splice.c:1427 __x64_sys_splice+0x6e/0x90 fs/splice.c:1427 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: f16a7dd5cf27 ("smc: netlink interface for SMC sockets") Signed-off-by: Eric Dumazet Cc: Ursula Braun Signed-off-by: David S. Miller commit f27f37a04a69890ac85d9155f03ee2d23b678d8f Author: Brett Creeley Date: Mon Feb 10 10:59:18 2020 -0800 i40e: Fix the conditional for i40e_vc_validate_vqs_bitmaps Commit d9d6a9aed3f6 ("i40e: Fix virtchnl_queue_select bitmap validation") introduced a necessary change for verifying how queue bitmaps from the iavf driver get validated. Unfortunately, the conditional was reversed. Fix this. Fixes: d9d6a9aed3f6 ("i40e: Fix virtchnl_queue_select bitmap validation") Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller commit ad1e03b2b3d4430baaa109b77bc308dc73050de3 Author: Toke Høiland-Jørgensen Date: Mon Feb 10 17:10:46 2020 +0100 core: Don't skip generic XDP program execution for cloned SKBs The current generic XDP handler skips execution of XDP programs entirely if an SKB is marked as cloned. This leads to some surprising behaviour, as packets can end up being cloned in various ways, which will make an XDP program not see all the traffic on an interface. This was discovered by a simple test case where an XDP program that always returns XDP_DROP is installed on a veth device. When combining this with the Scapy packet sniffer (which uses an AF_PACKET) socket on the sending side, SKBs reliably end up in the cloned state, causing them to be passed through to the receiving interface instead of being dropped. A minimal reproducer script for this is included below. This patch fixed the issue by simply triggering the existing linearisation code for cloned SKBs instead of skipping the XDP program execution. This behaviour is in line with the behaviour of the native XDP implementation for the veth driver, which will reallocate and copy the SKB data if the SKB is marked as shared. Reproducer Python script (requires BCC and Scapy): from scapy.all import TCP, IP, Ether, sendp, sniff, AsyncSniffer, Raw, UDP from bcc import BPF import time, sys, subprocess, shlex SKB_MODE = (1 << 1) DRV_MODE = (1 << 2) PYTHON=sys.executable def client(): time.sleep(2) # Sniffing on the sender causes skb_cloned() to be set s = AsyncSniffer() s.start() for p in range(10): sendp(Ether(dst="aa:aa:aa:aa:aa:aa", src="cc:cc:cc:cc:cc:cc")/IP()/UDP()/Raw("Test"), verbose=False) time.sleep(0.1) s.stop() return 0 def server(mode): prog = BPF(text="int dummy_drop(struct xdp_md *ctx) {return XDP_DROP;}") func = prog.load_func("dummy_drop", BPF.XDP) prog.attach_xdp("a_to_b", func, mode) time.sleep(1) s = sniff(iface="a_to_b", count=10, timeout=15) if len(s): print(f"Got {len(s)} packets - should have gotten 0") return 1 else: print("Got no packets - as expected") return 0 if len(sys.argv) < 2: print(f"Usage: {sys.argv[0]} ") sys.exit(1) if sys.argv[1] == "client": sys.exit(client()) elif sys.argv[1] == "server": mode = SKB_MODE if sys.argv[2] == 'skb' else DRV_MODE sys.exit(server(mode)) else: try: mode = sys.argv[1] if mode not in ('skb', 'drv'): print(f"Usage: {sys.argv[0]} ") sys.exit(1) print(f"Running in {mode} mode") for cmd in [ 'ip netns add netns_a', 'ip netns add netns_b', 'ip -n netns_a link add a_to_b type veth peer name b_to_a netns netns_b', # Disable ipv6 to make sure there's no address autoconf traffic 'ip netns exec netns_a sysctl -qw net.ipv6.conf.a_to_b.disable_ipv6=1', 'ip netns exec netns_b sysctl -qw net.ipv6.conf.b_to_a.disable_ipv6=1', 'ip -n netns_a link set dev a_to_b address aa:aa:aa:aa:aa:aa', 'ip -n netns_b link set dev b_to_a address cc:cc:cc:cc:cc:cc', 'ip -n netns_a link set dev a_to_b up', 'ip -n netns_b link set dev b_to_a up']: subprocess.check_call(shlex.split(cmd)) server = subprocess.Popen(shlex.split(f"ip netns exec netns_a {PYTHON} {sys.argv[0]} server {mode}")) client = subprocess.Popen(shlex.split(f"ip netns exec netns_b {PYTHON} {sys.argv[0]} client")) client.wait() server.wait() sys.exit(server.returncode) finally: subprocess.run(shlex.split("ip netns delete netns_a")) subprocess.run(shlex.split("ip netns delete netns_b")) Fixes: d445516966dc ("net: xdp: support xdp generic on virtual devices") Reported-by: Stepan Horacek Suggested-by: Paolo Abeni Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit 359c92c02bfae1a6f1e8e37c298e518fd256642c Merge: 61a75954034f 96222d53842d Author: Linus Torvalds Date: Tue Feb 11 16:52:08 2020 -0800 Merge tag 'dax-fixes-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull dax fixes from Dan Williams: "A fix for an xfstest failure and some and an update that removes an fsdax dependency on block devices. Summary: - Fix RWF_NOWAIT writes to properly return -EAGAIN - Clean up an unused helper - Update dax_writeback_mapping_range to not need a block_device argument" * tag 'dax-fixes-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: pass NOWAIT flag to iomap_apply dax: Get rid of fs_dax_get_by_host() helper dax: Pass dax_dev instead of bdev to dax_writeback_mapping_range() commit 61a75954034f951a77d58b1cfb9186c62e6abcf8 Merge: 0a679e13ea30 7276531d4036 Author: Linus Torvalds Date: Tue Feb 11 16:39:18 2020 -0800 Merge tag 'trace-v5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Various fixes: - Fix an uninitialized variable - Fix compile bug to bootconfig userspace tool (in tools directory) - Suppress some error messages of bootconfig userspace tool - Remove unneded CONFIG_LIBXBC from bootconfig - Allocate bootconfig xbc_nodes dynamically. To ease complaints about taking up static memory at boot up - Use of parse_args() to parse bootconfig instead of strstr() usage Prevents issues of double quotes containing the interested string - Fix missing ring_buffer_nest_end() on synthetic event error path - Return zero not -EINVAL on soft disabled synthetic event (soft disabling must be the same as hard disabling, which returns zero) - Consolidate synthetic event code (remove duplicate code)" * tag 'trace-v5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Consolidate trace() functions tracing: Don't return -EINVAL when tracing soft disabled synth events tracing: Add missing nest end to synth_event_trace_start() error case tools/bootconfig: Suppress non-error messages bootconfig: Allocate xbc_nodes array dynamically bootconfig: Use parse_args() to find bootconfig and '--' tracing/kprobe: Fix uninitialized variable bug bootconfig: Remove unneeded CONFIG_LIBXBC tools/bootconfig: Fix wrong __VA_ARGS__ usage commit 6f4ecbe284df5f22e386a640d9a4b32cede62030 Author: Thierry Reding Date: Mon Feb 3 15:31:14 2020 +0100 soc/tegra: fuse: Fix build with Tegra194 configuration If only Tegra194 support is enabled, the tegra30_fuse_read() and tegra30_fuse_init() function are not declared and cause a build failure. Add Tegra194 to the preprocessor guard to make sure these functions are available for Tegra194-only builds as well. Link: https://lore.kernel.org/r/20200203143114.3967295-1-thierry.reding@gmail.com Reported-by: kbuild test robot Signed-off-by: Thierry Reding Signed-off-by: Olof Johansson commit d7a9c595118ad377b1c68524578271eb16f81a00 Merge: a9541fb7ed8e f166795871be Author: Olof Johansson Date: Tue Feb 11 14:49:37 2020 -0800 Merge tag 'arm-soc/for-5.6/defconfig-arm64-fixes' of https://github.com/Broadcom/stblinux into arm/fixes This pull request contains ARM64 defconfig changes for v5.6, please pull the following: - Nicolas enables the BCM2835 DMA engine controller as built-in since the bcm2835 SD host controller depends on the DMA engine to be available. * tag 'arm-soc/for-5.6/defconfig-arm64-fixes' of https://github.com/Broadcom/stblinux: arm64: defconfig: Set bcm2835-dma as built-in Link: https://lore.kernel.org/r/20200210145621.22599-1-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit a9541fb7ed8eb112a32772d3c2dad57b355d66b0 Merge: 0eaa9fc1d7f4 415ae604d4ac Author: Olof Johansson Date: Tue Feb 11 14:49:14 2020 -0800 Merge tag 'sunxi-config-for-5.6-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes One patch to enable the new thermal sensor driver found on newer Allwinner SoCs. * tag 'sunxi-config-for-5.6-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: sunxi: Enable CONFIG_SUN8I_THERMAL Link: https://lore.kernel.org/r/9d9805ea-cfe3-4eed-b977-1933a670ba7b.lettre@localhost Signed-off-by: Olof Johansson commit 0eaa9fc1d7f4d36fdf5e32808a412a55d08e7ace Merge: 1b32b72b2734 03c6bf464428 Author: Olof Johansson Date: Tue Feb 11 14:49:06 2020 -0800 Merge tag 'sunxi-config64-for-5.6-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/fixes Two patches to enable the new thermal sensor driver found on newer Allwinner SoCs and to enable the MIPI-DSI controller. * tag 'sunxi-config64-for-5.6-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: defconfig: Enable DRM_SUN6I_DSI arm64: defconfig: Enable CONFIG_SUN8I_THERMAL Link: https://lore.kernel.org/r/283eb531-890f-4ab2-95b5-898301af9807.lettre@localhost Signed-off-by: Olof Johansson commit 1b32b72b27341cafe5f1c8e3ebd26387a8faf664 Merge: 9c87d747cad7 bb6d3fb354c5 Author: Olof Johansson Date: Tue Feb 11 14:48:22 2020 -0800 Merge tag 'v5.6-rc1' into arm/fixes Linux 5.6-rc1 Merging in to avoid fixes pull request diffstats being noisy due to being based on -rc1. Signed-off-by: Olof Johansson commit 9c87d747cad7413a8bb0201fc457fb8eda8b3959 Merge: 3508aae9b561 3543d7ddd55f Author: Olof Johansson Date: Tue Feb 11 14:47:07 2020 -0800 Merge tag 'juno-fix-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes ARMv8 Juno/Fast Models fix for v5.6 A single fix for PCI interrupt-mapping on FVP Rev C model. This is present since the platform was added. This fix is needed to get VFIO working correctly on this model. * tag 'juno-fix-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: fast models: Fix FVP PCI interrupt-map property Link: https://lore.kernel.org/r/20200205183423.GF38466@bogus Signed-off-by: Olof Johansson commit fdde0ff8590b4c1c41b3227f5ac4265fccccb96b Author: Rafael J. Wysocki Date: Tue Feb 11 17:53:52 2020 +0100 ACPI: PM: s2idle: Prevent spurious SCIs from waking up the system If the platform triggers a spurious SCI even though the status bit is not set for any GPE when the system is suspended to idle, it will be treated as a genuine wakeup, so avoid that by checking if any GPEs are active at all before returning 'true' from acpi_s2idle_wake(). Link: https://bugzilla.kernel.org/show_bug.cgi?id=206413 Fixes: 56b991849009 ("PM: sleep: Simplify suspend-to-idle control flow") Reported-by: Tsuchiya Yuto Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki commit ea128834dd76f9a72a35d011c651fa96658f06a7 Author: Rafael J. Wysocki Date: Tue Feb 11 17:52:32 2020 +0100 ACPICA: Introduce acpi_any_gpe_status_set() Introduce a new helper function, acpi_any_gpe_status_set(), for checking the status bits of all enabled GPEs in one go. It is needed to distinguish spurious SCIs from genuine ones when deciding whether or not to wake up the system from suspend-to-idle. Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki commit e33a8cfda5198fc09554fdd77ba246de42c886bd Author: Alex Deucher Date: Thu Feb 6 14:53:06 2020 -0500 drm/amdgpu:/navi10: use the ODCAP enum to index the caps array Rather than the FEATURE_ID flags. Avoids a possible reading past the end of the array. Reviewed-by: Evan Quan Reported-by: Aleksandr Mezin Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.5.x commit c1d66bc2e531b4ed3a9464b8e87144cc6b2fd63f Author: Alex Deucher Date: Thu Feb 6 14:46:34 2020 -0500 drm/amdgpu: update smu_v11_0_pptable.h Update to the latest changes. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.5.x commit a934f9d866598ec777174d449a0dd903ea3db817 Author: Guchun Chen Date: Tue Feb 11 12:10:44 2020 +0800 drm/amdgpu: correct comment to clear up the confusion Former comment looks to be one intended behavior in code, actually it's not. So correct it. Suggested-by: Christian König Signed-off-by: Guchun Chen Acked-by: Christian König Signed-off-by: Alex Deucher commit 8fab6a2faa1eb388b5eaf1ead4394f380a6403be Author: Sung Lee Date: Tue Feb 4 15:49:54 2020 -0500 drm/amd/display: DCN2.x Do not program DPPCLK if same value [WHY] Programming DPPCLK to the same value currently set may cause underflow while playing video in certain conditions. [HOW] Only program DPPCLK if clock is not the same as the previous value programmed. Signed-off-by: Sung Lee Reviewed-by: Yongqiang Sun Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 1094c34ec53bc147e53f52ed9fe50899ad075632 Author: Nicholas Kazlauskas Date: Mon Jan 20 14:56:31 2020 -0500 drm/amd/display: Don't map ATOM_ENABLE to ATOM_INIT [Why] In DCN hardware sequencer we do actually call ATOM_INIT correctly per pipe. The workaround is not necessary for command table offloading. [How] Drop the workaround since it's not needed. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Chris Park Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit b5336bfd6fe512521539e3f0f1cf4a5a6a45d380 Author: James Zhu Date: Fri Feb 7 08:11:00 2020 -0500 drm/amdgpu/vcn2.5: fix warning Fix warning during switching to dpg pause mode for VCN firmware Version ENC: 1.1 DEC: 1 VEP: 0 Revision: 16 Signed-off-by: James Zhu Acked-by: Leo Liu Signed-off-by: Alex Deucher commit 2cabe0d4cd88f7386e9c5a82236ceda46080a80b Author: Guchun Chen Date: Sun Feb 9 16:21:09 2020 +0800 drm/amdgpu: limit GDS clearing workaround in cold boot sequence GDS clear workaround will cause gfx failure in suspend/resume case. [ 98.679559] [drm:amdgpu_device_ip_late_init [amdgpu]] *ERROR* late_init of IP block failed -110 [ 98.679561] PM: dpm_run_callback(): pci_pm_resume+0x0/0xa0 returns -110 [ 98.679562] PM: Device 0000:03:00.0 failed to resume async: error -110 As this workaround is specific to the HW bug of GDS's ECC error existing in cold boot up, so bypass this workaround in suspend/ resume case after booting up. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 46d1da733fbc867cd3c3aabec21aeaacd9a41771 Author: Jonathan Kim Date: Thu Feb 6 11:57:11 2020 -0500 drm/amdgpu: fix amdgpu pmu to use hwc->config instead of hwc->conf hwc->conf was designated specifically for AMD APU IOMMU purposes. This could cause problems in performance and/or function since APU IOMMU implementation is elsewhere. Also hwc->conf and hwc->config are different members of an anonymous union so hwc->conf aliases as hw->last_tag. Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 416611d9b6eebaeae58ed26cc7d23131c69126b1 Author: Daniel Kolesa Date: Thu Feb 6 20:14:35 2020 +0100 amdgpu: Prevent build errors regarding soft/hard-float FP ABI tags On PowerPC, the compiler will tag object files with whether they use hard or soft float FP ABI and whether they use 64 or 128-bit long double ABI. On systems with 64-bit long double ABI, a tag will get emitted whenever a double is used, as on those systems a long double is the same as a double. This will prevent linkage as other files are being compiled with hard-float. On ppc64, this code will never actually get used for the time being, as the only currently existing hardware using it are the Renoir APUs. Therefore, until this is testable and can be fixed properly, at least make sure the build will not fail. Signed-off-by: Daniel Kolesa Signed-off-by: Alex Deucher commit f4d0242b7b43977923f778b4cf787425ef05776e Author: James Zhu Date: Wed Feb 5 09:20:22 2020 -0500 drm/amdgpu/vcn2.5: fix DPG mode power off issue on instance 1 Support pause_state for multiple instance, and it will fix vcn2.5 DPG mode power off issue on instance 1. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit c134c3cabae46a56ab2e1f5e5fa49405e1758838 Author: Isabel Zhang Date: Mon Jan 27 10:57:16 2020 -0500 drm/amd/display: Add initialitions for PLL2 clock source [Why] Starting from 14nm, the PLL is built into the PHY and the PLL is mapped to PHY on 1 to 1 basis. In the code, the DP port is mapped to a PLL that was not initialized. This causes DP to HDMI dongle to not light up the display. [How] Initializations added for PLL2 when creating resources. Signed-off-by: Isabel Zhang Reviewed-by: Eric Yang Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 6c81917a0485ee2a1be0dc23321ac10ecfd9578b Author: Yongqiang Sun Date: Thu Jan 23 16:30:15 2020 -0500 drm/amd/display: Limit minimum DPPCLK to 100MHz. [Why] Underflow is observed when plug in a 4K@60 monitor with 1366x768 eDP due to DPPCLK is too low. [How] Limit minimum DPPCLK to 100MHz. Signed-off-by: Yongqiang Sun Reviewed-by: Eric Yang Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 2b63d0ec0daf79ba503fa8bfa25e07dc3da274f3 Author: Aric Cyr Date: Tue Jan 21 22:50:13 2020 -0500 drm/amd/display: Check engine is not NULL before acquiring [Why] Engine can be NULL in some cases, so we must not acquire it. [How] Check for NULL engine before acquiring. Signed-off-by: Aric Cyr Reviewed-by: Harry Wentland Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit ff5ac61ee83c13f516544d29847d28be093a40ee Author: Ard Biesheuvel Date: Sat Feb 1 09:32:21 2020 +0100 x86/ima: use correct identifier for SetupMode variable The IMA arch code attempts to inspect the "SetupMode" EFI variable by populating a variable called efi_SetupMode_name with the string "SecureBoot" and passing that to the EFI GetVariable service, which obviously does not yield the expected result. Given that the string is only referenced a single time, let's get rid of the intermediate variable, and pass the correct string as an immediate argument. While at it, do the same for "SecureBoot". Fixes: 399574c64eaf ("x86/ima: retry detecting secure boot mode") Fixes: 980ef4d22a95 ("x86/ima: check EFI SetupMode too") Cc: Matthew Garrett Signed-off-by: Ard Biesheuvel Cc: stable@vger.kernel.org # v5.3 Signed-off-by: Mimi Zohar commit d6d829d92c6e82b2627d3bb0058403ff15ee0592 Author: Arnaldo Carvalho de Melo Date: Tue Feb 11 16:03:47 2020 -0300 tools headers UAPI: Sync sched.h with the kernel To get the changes in: 769071ac9f20 ("ns: Introduce Time Namespace") Silencing this tools/perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/sched.h' differs from latest version at 'include/uapi/linux/sched.h' diff -u tools/include/uapi/linux/sched.h include/uapi/linux/sched.h Which enables 'perf trace' to decode the CLONE_NEWTIME bit in the 'flags' argument to the clone syscalls. Example of clone flags being decoded: [root@quaco ~]# perf trace -e clone* 0.000 qemu-system-x8/23923 clone(clone_flags: VM|FS|FILES|SIGHAND|THREAD|SYSVSEM|SETTLS|PARENT_SETTID|CHILD_CLEARTID, newsp: 0x7f0dad7f9870, parent_tidptr: 0x7f0dad7fa9d0, child_tidptr: 0x7f0dad7fa9d0, tls: 0x7f0dad7fa700) = 6806 (qemu-system-x86) ? qemu-system-x8/6806 ... [continued]: clone()) = 0 ^C[root@quaco ~]# At some point this should enable things like: # perf trace -e 'clone*/clone_flags&NEWTIME/' Cc: Adrian Hunter Cc: Andrei Vagin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Thomas Gleixner Signed-off-by: Arnaldo Carvalho de Melo commit d7a07b293216e5561705303751bc0d213e9fb328 Author: Arnaldo Carvalho de Melo Date: Tue Feb 11 15:54:08 2020 -0300 perf trace: Resolve prctl's 'option' arg strings to numbers # perf trace -e syscalls:sys_enter_prctl --filter="option==SET_NAME" 0.000 Socket Thread/3860 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7fc50b9733e8) 0.053 SSL Cert #78/3860 syscalls:sys_enter_prctl(option: SET_NAME, arg2: 0x7fc50b9733e8) ^C # If one uses '-v' with 'perf trace', we can see the filter it puts in place: New filter for syscalls:sys_enter_prctl: (option==0xf) && (common_pid != 3859 && common_pid != 2757) We still need to allow using plain '-e prctl' and have this turn into creating a 'syscalls:sys_enter_prctl' event so that the filter can be applied only to it as right now '-e prctl' ends up using the 'raw_syscalls:sys_enter/sys_exit'. The end goal is to have something like: # perf trace -e prctl/option==SET_NAME/ And have that use tracepoint filters or eBPF ones. Cc: Adrian Hunter Cc: Christian Brauner Cc: Jiri Olsa Cc: Mike Christie Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit c0134b3366ba5f0aba41d56006b574d3be7f5ed3 Author: Arnaldo Carvalho de Melo Date: Tue Feb 11 15:46:10 2020 -0300 perf beauty prctl: Export the 'options' strarray So that we can use it with strtoul, allowing string to number conversions in filter expressions. Cc: Adrian Hunter Cc: Christian Brauner Cc: Jiri Olsa Cc: Mike Christie Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit fc9199d46e644e6a978f69195cb849b21d2f485c Author: Arnaldo Carvalho de Melo Date: Tue Feb 11 15:25:21 2020 -0300 tools headers UAPI: Sync prctl.h with the kernel sources To get the changes in: 8d19f1c8e193 ("prctl: PR_{G,S}ET_IO_FLUSHER to support controlling memory reclaim") Which ends up having this effect in tooling, i.e. the addition of the support to those prctl's options: $ tools/perf/trace/beauty/prctl_option.sh > before $ cp include/uapi/linux/prctl.h tools/include/uapi/linux/prctl.h $ git diff diff --git a/tools/include/uapi/linux/prctl.h b/tools/include/uapi/linux/prctl.h index 7da1b37b27aa..07b4f8131e36 100644 --- a/tools/include/uapi/linux/prctl.h +++ b/tools/include/uapi/linux/prctl.h @@ -234,4 +234,8 @@ struct prctl_mm_map { #define PR_GET_TAGGED_ADDR_CTRL 56 # define PR_TAGGED_ADDR_ENABLE (1UL << 0) +/* Control reclaim behavior when allocating memory */ +#define PR_SET_IO_FLUSHER 57 +#define PR_GET_IO_FLUSHER 58 + #endif /* _LINUX_PRCTL_H */ $ tools/perf/trace/beauty/prctl_option.sh > after $ diff -u before after --- before 2020-02-11 15:24:35.339289912 -0300 +++ after 2020-02-11 15:24:56.319711315 -0300 @@ -51,6 +51,8 @@ [54] = "PAC_RESET_KEYS", [55] = "SET_TAGGED_ADDR_CTRL", [56] = "GET_TAGGED_ADDR_CTRL", + [57] = "SET_IO_FLUSHER", + [58] = "GET_IO_FLUSHER", }; static const char *prctl_set_mm_options[] = { [1] = "START_CODE", $ Cc: Adrian Hunter Cc: Christian Brauner Cc: Jiri Olsa Cc: Mike Christie Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit c75bec79fc080039e4575a0f239ea7b111aabe88 Author: Arnaldo Carvalho de Melo Date: Tue Feb 11 15:19:42 2020 -0300 tools headers UAPI: Sync copy of arm64's asm/unistd.h with the kernel sources To get the changes in: 3e3c8ca5a351 ("arm64: Move __ARCH_WANT_SYS_CLONE3 definition to uapi headers") Silencing this tools/perf/ build warning: Warning: Kernel ABI header at 'tools/arch/arm64/include/uapi/asm/unistd.h' differs from latest version at 'arch/arm64/include/uapi/asm/unistd.h' diff -u tools/arch/arm64/include/uapi/asm/unistd.h arch/arm64/include/uapi/asm/unistd.h Which will probably end up enabling the use of "clone3" in 'perf trace -e', haven't checked the build with this change on an arm64 system. Cc: Adrian Hunter Cc: Amanieu d'Antras Cc: Christian Brauner Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 484214f49bd0948d716832a94e4737ca4dd02c16 Author: Jiri Olsa Date: Mon Feb 10 15:32:18 2020 +0100 perf maps: Move kmap::kmaps setup to maps__insert() So the kmaps pointer setup is centralized and we do not need to update it in all those places (2 current places and few more missing) after calling maps__insert(). Reported-by: Ravi Bangoria Signed-off-by: Jiri Olsa Tested-by: Ravi Bangoria Tested-by: Kim Phillips Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200210143218.24948-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7ce66139a99ce57caaf47b64afed5cb6ed02c5ed Author: Jiri Olsa Date: Mon Feb 10 15:32:17 2020 +0100 perf maps: Fix map__clone() for struct kmap The map__clone() function can be called on kernel maps as well, so it needs to duplicate the whole kmap data. Reported-by: Ravi Bangoria Signed-off-by: Jiri Olsa Tested-by: Ravi Bangoria Tested-by: Kim Phillips Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200210143218.24948-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4a4eb6154d67f7766cc7eb74e9f1db424073e832 Author: Jiri Olsa Date: Mon Feb 10 21:08:47 2020 +0100 perf maps: Mark ksymbol DSOs with kernel type We add ksymbol map into machine->kmaps, so it needs to be created as 'struct kmap', which is dependent on its dso having kernel type. Reported-by: Ravi Bangoria Signed-off-by: Jiri Olsa Tested-by: Ravi Bangoria Tested-by: Kim Phillips Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200210200847.GA36715@krava Signed-off-by: Arnaldo Carvalho de Melo commit 02213cec64bbef66d7ad9ddc3b7c47236da64343 Author: Jiri Olsa Date: Mon Feb 10 15:32:15 2020 +0100 perf maps: Mark module DSOs with kernel type We add kernel module map into machine->kmaps, so it needs to be created as 'struct kmap', which is dependent on its dso having kernel type. Reported-by: Ravi Bangoria Signed-off-by: Jiri Olsa Tested-by: Kim Phillips Tested-by: Ravi Bangoria Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200210143218.24948-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c452833387624d1990c9bbb0ee1e98c10c147478 Author: Arnaldo Carvalho de Melo Date: Tue Feb 11 11:58:56 2020 -0300 tools include UAPI: Sync x86's syscalls_64.tbl, generic unistd.h and fcntl.h to pick up openat2 and pidfd_getfd fddb5d430ad9 ("open: introduce openat2(2) syscall") 9a2cef09c801 ("arch: wire up pidfd_getfd syscall") We also need to grab a copy of uapi/linux/openat2.h since it is now needed by fcntl.h, add it to tools/perf/check_headers.h. $ diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl --- tools/perf/arch/x86/entry/syscalls/syscall_64.tbl 2019-12-20 16:43:57.662429958 -0300 +++ arch/x86/entry/syscalls/syscall_64.tbl 2020-02-10 16:36:22.070012468 -0300 @@ -357,6 +357,8 @@ 433 common fspick __x64_sys_fspick 434 common pidfd_open __x64_sys_pidfd_open 435 common clone3 __x64_sys_clone3/ptregs +437 common openat2 __x64_sys_openat2 +438 common pidfd_getfd __x64_sys_pidfd_getfd # # x32-specific system call numbers start at 512 to avoid cache impact $ Update tools/'s copy of that file: $ cp arch/x86/entry/syscalls/syscall_64.tbl tools/perf/arch/x86/entry/syscalls/syscall_64.tbl See the result: $ diff -u /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c.before /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c --- /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c.before 2020-02-10 16:42:59.010636041 -0300 +++ /tmp/build/perf/arch/x86/include/generated/asm/syscalls_64.c 2020-02-10 16:43:24.149958337 -0300 @@ -346,5 +346,7 @@ [433] = "fspick", [434] = "pidfd_open", [435] = "clone3", + [437] = "openat2", + [438] = "pidfd_getfd", }; -#define SYSCALLTBL_x86_64_MAX_ID 435 +#define SYSCALLTBL_x86_64_MAX_ID 438 $ Now one can use: perf trace -e openat2,pidfd_getfd To get just those syscalls or use in things like: perf trace -e open* To get all the open variant (open, openat, openat2, etc) or: perf trace pidfd* To get the pidfd syscalls. Cc: Adrian Hunter Cc: Aleksa Sarai Cc: Al Viro Cc: Christian Brauner Cc: Jiri Olsa Cc: Namhyung Kim Cc: Sargun Dhillon Signed-off-by: Arnaldo Carvalho de Melo commit 0f8a206df7c920150d2aa45574fba0ab7ff6be4f Author: Nathan Chancellor Date: Sat Feb 8 07:08:59 2020 -0700 s390/time: Fix clk type in get_tod_clock Clang warns: In file included from ../arch/s390/boot/startup.c:3: In file included from ../include/linux/elf.h:5: In file included from ../arch/s390/include/asm/elf.h:132: In file included from ../include/linux/compat.h:10: In file included from ../include/linux/time.h:74: In file included from ../include/linux/time32.h:13: In file included from ../include/linux/timex.h:65: ../arch/s390/include/asm/timex.h:160:20: warning: passing 'unsigned char [16]' to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] get_tod_clock_ext(clk); ^~~ ../arch/s390/include/asm/timex.h:149:44: note: passing argument to parameter 'clk' here static inline void get_tod_clock_ext(char *clk) ^ Change clk's type to just be char so that it matches what happens in get_tod_clock_ext. Fixes: 57b28f66316d ("[S390] s390_hypfs: Add new attributes") Link: https://github.com/ClangBuiltLinux/linux/issues/861 Link: http://lkml.kernel.org/r/20200208140858.47970-1-natechancellor@gmail.com Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Vasily Gorbik commit 27dc0700c3be7c681cea03c5230b93d02f623492 Author: Christian Borntraeger Date: Mon Feb 10 11:27:37 2020 -0500 s390/uv: Fix handling of length extensions The query parameter block might contain additional information and can be extended in the future. If the size of the block does not suffice we get an error code of rc=0x100. The buffer will contain all information up to the specified size and the hypervisor/guest simply do not need the additional information as they do not know about the new data. That means that we can (and must) accept rc=0x100 as success. Cc: stable@vger.kernel.org Reviewed-by: Cornelia Huck Fixes: 5abb9351dfd9 ("s390/uv: introduce guest side ultravisor code") Signed-off-by: Christian Borntraeger Signed-off-by: Vasily Gorbik commit 2c25b3f68e9236365d2beaa032cc6d2a160df084 Merge: 11f044653467 dbaf10027ae9 Author: Vasily Gorbik Date: Tue Feb 11 20:14:28 2020 +0100 Merge tag 'vfio-ccw-20200206' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into HEAD fix style of SPDX License Identifier * tag 'vfio-ccw-20200206' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw: vfio-ccw: Use the correct style for SPDX License Identifier Link: https://lkml.kernel.org/r/20200206170331.1032-1-cohuck@redhat.com Signed-off-by: Vasily Gorbik commit 11f0446534679e0a77441a19a65ed8b4a3d475f0 Author: Julian Wiedmann Date: Wed Feb 5 09:41:42 2020 +0100 s390/qdio: don't allocate *aob array with GFP_ATOMIC The only way to reach this allocation is via qdio_establish() qdio_detect_hsicq() qdio_enable_async_operation() and since qdio_establish() uses wait_event_*() just a few lines ealier, we can trust that it certainly is never called from atomic context. Signed-off-by: Julian Wiedmann Reviewed-by: Steffen Maier Signed-off-by: Vasily Gorbik commit 93f9d1a4ac5930654c17412e3911b46ece73755a Author: Arvind Sankar Date: Tue Feb 11 11:22:35 2020 -0500 ALSA: usb-audio: Apply sample rate quirk for Audioengine D1 The Audioengine D1 (0x2912:0x30c8) does support reading the sample rate, but it returns the rate in byte-reversed order. When setting sampling rate, the driver produces these warning messages: [168840.944226] usb 3-2.2: current rate 4500480 is different from the runtime rate 44100 [168854.930414] usb 3-2.2: current rate 8436480 is different from the runtime rate 48000 [168905.185825] usb 3-2.1.2: current rate 30465 is different from the runtime rate 96000 As can be seen from the hexadecimal conversion, the current rate read back is byte-reversed from the rate that was set. 44100 == 0x00ac44, 4500480 == 0x44ac00 48000 == 0x00bb80, 8436480 == 0x80bb00 96000 == 0x017700, 30465 == 0x007701 Rather than implementing a new quirk to reverse the order, just skip checking the rate to avoid spamming the log. Signed-off-by: Arvind Sankar Cc: Link: https://lore.kernel.org/r/20200211162235.1639889-1-nivedita@alum.mit.edu Signed-off-by: Takashi Iwai commit 663218a3e715fd9339d143a3e10088316b180f4f Author: Krishnamraju Eraparaju Date: Fri Feb 7 19:44:29 2020 +0530 RDMA/siw: Remove unwanted WARN_ON in siw_cm_llp_data_ready() Warnings like below can fill up the dmesg while disconnecting RDMA connections. Hence, remove the unwanted WARN_ON. WARNING: CPU: 6 PID: 0 at drivers/infiniband/sw/siw/siw_cm.c:1229 siw_cm_llp_data_ready+0xc1/0xd0 [siw] RIP: 0010:siw_cm_llp_data_ready+0xc1/0xd0 [siw] Call Trace: tcp_data_queue+0x226/0xb40 tcp_rcv_established+0x220/0x620 tcp_v4_do_rcv+0x12a/0x1e0 tcp_v4_rcv+0xb05/0xc00 ip_local_deliver_finish+0x69/0x210 ip_local_deliver+0x6b/0xe0 ip_rcv+0x273/0x362 __netif_receive_skb_core+0xb35/0xc30 netif_receive_skb_internal+0x3d/0xb0 napi_gro_frags+0x13b/0x200 t4_ethrx_handler+0x433/0x7d0 [cxgb4] process_responses+0x318/0x580 [cxgb4] napi_rx_handler+0x14/0x100 [cxgb4] net_rx_action+0x149/0x3b0 __do_softirq+0xe3/0x30a irq_exit+0x100/0x110 do_IRQ+0x7f/0xe0 common_interrupt+0xf/0xf Link: https://lore.kernel.org/r/20200207141429.27927-1-krishna2@chelsio.com Signed-off-by: Krishnamraju Eraparaju Signed-off-by: Jason Gunthorpe commit d219face9059f38ad187bde133451a2a308fdb7c Author: Krishnamraju Eraparaju Date: Tue Feb 4 14:42:30 2020 +0530 RDMA/iw_cxgb4: initiate CLOSE when entering TERM As per draft-hilland-iwarp-verbs-v1.0, sec 6.2.3, always initiate a CLOSE when entering into TERM state. In c4iw_modify_qp(), disconnect operation should only be performed when the modify_qp call is invoked from ib_core. And all other internal modify_qp calls(invoked within iw_cxgb4) that needs 'disconnect' should call c4iw_ep_disconnect() explicitly after modify_qp. Otherwise, deadlocks like below can occur: Call Trace: schedule+0x2f/0xa0 schedule_preempt_disabled+0xa/0x10 __mutex_lock.isra.5+0x2d0/0x4a0 c4iw_ep_disconnect+0x39/0x430 => tries to reacquire ep lock again c4iw_modify_qp+0x468/0x10d0 rx_data+0x218/0x570 => acquires ep lock process_work+0x5f/0x70 process_one_work+0x1a7/0x3b0 worker_thread+0x30/0x390 kthread+0x112/0x130 ret_from_fork+0x35/0x40 Fixes: d2c33370ae73 ("RDMA/iw_cxgb4: Always disconnect when QP is transitioning to TERMINATE state") Link: https://lore.kernel.org/r/20200204091230.7210-1-krishna2@chelsio.com Signed-off-by: Krishnamraju Eraparaju Signed-off-by: Jason Gunthorpe commit 10189e8e6fe8dcde13435f9354800429c4474fb1 Author: Mark Zhang Date: Sun Jan 26 19:17:08 2020 +0200 IB/mlx5: Return failure when rts2rts_qp_counters_set_id is not supported When binding a QP with a counter and the QP state is not RESET, return failure if the rts2rts_qp_counters_set_id is not supported by the device. This is to prevent cases like manual bind for Connect-IB devices from returning success when the feature is not supported. Fixes: d14133dd4161 ("IB/mlx5: Support set qp counter") Link: https://lore.kernel.org/r/20200126171708.5167-1-leon@kernel.org Signed-off-by: Mark Zhang Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a72f4ac1d778f7bde93dfee69bfc23377ec3d74f Author: Avihai Horon Date: Sun Jan 26 19:15:00 2020 +0200 RDMA/core: Fix invalid memory access in spec_filter_size Add a check that the size specified in the flow spec header doesn't cause an overflow when calculating the filter size, and thus prevent access to invalid memory. The following crash from syzkaller revealed it. kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN PTI CPU: 1 PID: 17834 Comm: syz-executor.3 Not tainted 5.5.0-rc5 #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 RIP: 0010:memchr_inv+0xd3/0x330 Code: 89 f9 89 f5 83 e1 07 0f 85 f9 00 00 00 49 89 d5 49 c1 ed 03 45 85 ed 74 6f 48 89 d9 48 b8 00 00 00 00 00 fc ff df 48 c1 e9 03 <80> 3c 01 00 0f 85 0d 02 00 00 44 0f b6 e5 48 b8 01 01 01 01 01 01 RSP: 0018:ffffc9000a13fa50 EFLAGS: 00010202 RAX: dffffc0000000000 RBX: 7fff88810de9d820 RCX: 0ffff11021bd3b04 RDX: 000000000000fff8 RSI: 0000000000000000 RDI: 7fff88810de9d820 RBP: 0000000000000000 R08: ffff888110d69018 R09: 0000000000000009 R10: 0000000000000001 R11: ffffed10236267cc R12: 0000000000000004 R13: 0000000000001fff R14: ffff88810de9d820 R15: 0000000000000040 FS: 00007f9ee0e51700(0000) GS:ffff88811b100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000115ea0006 CR4: 0000000000360ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: spec_filter_size.part.16+0x34/0x50 ib_uverbs_kern_spec_to_ib_spec_filter+0x691/0x770 ib_uverbs_ex_create_flow+0x9ea/0x1b40 ib_uverbs_write+0xaa5/0xdf0 __vfs_write+0x7c/0x100 vfs_write+0x168/0x4a0 ksys_write+0xc8/0x200 do_syscall_64+0x9c/0x390 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x465b49 Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f9ee0e50c58 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000073bf00 RCX: 0000000000465b49 RDX: 00000000000003a0 RSI: 00000000200007c0 RDI: 0000000000000004 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f9ee0e516bc R13: 00000000004ca2da R14: 000000000070deb8 R15: 00000000ffffffff Modules linked in: Dumping ftrace buffer: (ftrace buffer empty) Fixes: 94e03f11ad1f ("IB/uverbs: Add support for flow tag") Link: https://lore.kernel.org/r/20200126171500.4623-1-leon@kernel.org Signed-off-by: Avihai Horon Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit aad927b5a863178a9d921044e52d66e0ccf0aff9 Author: Sung Lee Date: Mon Jan 20 18:58:45 2020 -0500 drm/amd/display: Use dcfclk to populate watermark ranges [WHY & HOW] Previously drain clk was unconstrained and fill clk was constrained on fclk. We want to change it to fill clk unconstrained and drain clock constrained to dcfclk. Signed-off-by: Sung Lee Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit df36f6cf23ada812930afa8ee76681d4ad307c61 Author: Sung Lee Date: Wed Jan 15 11:55:06 2020 -0500 drm/amd/display: Do not set optimized_require to false after plane disable [WHY] The optimized_require flag is needed to set watermarks and clocks lower in certain conditions. This flag is set to true and then set to false while programming front end in dcn20. [HOW] Do not set the flag to false while disabling plane. Signed-off-by: Sung Lee Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 7aa62404dfdefd759e6a5f8923a0b0704729295f Author: Roman Li Date: Tue Jan 14 13:56:08 2020 -0500 drm/amd/display: Fix psr static frames calculation [Why] Driver crash with psr feature enabled due to divide-by-zero error. This is a regression after rework to calculate static screen frame number entry time. [How] Correct order of operations to avoid divide-by-zero. Signed-off-by: Roman Li Reviewed-by: Zhan Liu Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit f24667779b5348279e5e4328312a141a730a1fc7 Author: Kuninori Morimoto Date: Mon Dec 16 11:08:47 2019 +0900 ARM: dts: sti: fixup sound frame-inversion for stihxxx-b2120.dtsi frame-inversion is "flag" not "uint32". This patch fixup it. Signed-off-by: Kuninori Morimoto Reviewed-by: Patrice Chotard Signed-off-by: Patrice Chotard commit 9b9be9e6dcf444de08fc675c61ac8e541b458d56 Author: Patrice Chotard Date: Tue Jan 7 11:38:33 2020 +0100 ARM: dts: sti: Remove deprecated snps PHY properties for stih410-b2260 Remove "snps,phy-bus-name", "snps,phy-bus-id" and "snps,phy-addr" properties which are deprecated. Signed-off-by: Patrice Chotard commit d75a170fd848f037a1e28893ad10be7a4c51f8a6 Author: Takashi Iwai Date: Tue Feb 11 17:05:21 2020 +0100 ALSA: usb-audio: Fix UAC2/3 effect unit parsing We've got a regression report about M-Audio Fast Track C400 device, and the git bisection resulted in the commit e0ccdef92653 ("ALSA: usb-audio: Clean up check_input_term()"). This commit was about the rewrite of the input terminal parser, and it's not too obvious from the change what really broke. The answer is: it's the interpretation of UAC2/3 effect units. In the original code, UAC2 effect unit is as if through UAC1 processing unit because both UAC1 PU and UAC2/3 EU share the same number (0x07). The old code went through a complex switch-case fallthrough, finally bailing out in the middle: if (protocol == UAC_VERSION_2 && hdr[2] == UAC2_EFFECT_UNIT) { /* UAC2/UAC1 unit IDs overlap here in an * uncompatible way. Ignore this unit for now. */ return 0; } ... and this special handling was missing in the new code; the new code treats UAC2/3 effect unit as if it were equivalent with the processing unit. Actually, the old code was too confusing. The effect unit has an incompatible unit description with the processing unit, so we shouldn't have dealt with EU in the same way. This patch addresses the regression by changing the effect unit handling to the own parser function. The own parser function makes the clear distinct with PU, so it improves the readability, too. The EU parser just sets the type and the id like the old kernels. Once when the proper effect unit support is added, we can revisit this parser function, but for now, let's keep this simple setup as is. Fixes: e0ccdef92653 ("ALSA: usb-audio: Clean up check_input_term()") Cc: BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206147 Link: https://lore.kernel.org/r/20200211160521.31990-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3b20bc2fe4c0cfd82d35838965dc7ff0b93415c6 Author: Xiubo Li Date: Tue Feb 11 01:53:16 2020 -0500 ceph: noacl mount option is effectively ignored For the old mount API, the module parameters parseing function will be called in ceph_mount() and also just after the default posix acl flag set, so we can control to enable/disable it via the mount option. But for the new mount API, it will call the module parameters parseing function before ceph_get_tree(), so the posix acl will always be enabled. Fixes: 82995cc6c5ae ("libceph, rbd, ceph: convert to use the new mount API") Signed-off-by: Xiubo Li Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit b27a939e8376a3f1ed09b9c33ef44d20f18ec3d0 Author: Ilya Dryomov Date: Mon Feb 10 22:51:08 2020 +0100 ceph: canonicalize server path in place syzbot reported that 4fbc0c711b24 ("ceph: remove the extra slashes in the server path") had caused a regression where an allocation could be done under a spinlock -- compare_mount_options() is called by sget_fc() with sb_lock held. We don't really need the supplied server path, so canonicalize it in place and compare it directly. To make this work, the leading slash is kept around and the logic in ceph_real_mount() to skip it is restored. CEPH_MSG_CLIENT_SESSION now reports the same (i.e. canonicalized) path, with the leading slash of course. Fixes: 4fbc0c711b24 ("ceph: remove the extra slashes in the server path") Reported-by: syzbot+98704a51af8e3d9425a9@syzkaller.appspotmail.com Signed-off-by: Ilya Dryomov Reviewed-by: Jeff Layton commit 8e4473bb50a1796c9c32b244e5dbc5ee24ead937 Author: Xiubo Li Date: Mon Feb 3 21:28:25 2020 -0500 ceph: do not execute direct write in parallel if O_APPEND is specified In O_APPEND & O_DIRECT mode, the data from different writers will be possibly overlapping each other since they take the shared lock. For example, both Writer1 and Writer2 are in O_APPEND and O_DIRECT mode: Writer1 Writer2 shared_lock() shared_lock() getattr(CAP_SIZE) getattr(CAP_SIZE) iocb->ki_pos = EOF iocb->ki_pos = EOF write(data1) write(data2) shared_unlock() shared_unlock() The data2 will overlap the data1 from the same file offset, the old EOF. Switch to exclusive lock instead when O_APPEND is specified. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit f92e48718889b3d49cee41853402aa88cac84a6b Author: Kaike Wan Date: Mon Feb 10 08:10:40 2020 -0500 IB/rdmavt: Reset all QPs when the device is shut down When the hfi1 device is shut down during a system reboot, it is possible that some QPs might have not not freed by ULPs. More requests could be post sent and a lingering timer could be triggered to schedule more packet sends, leading to a crash: BUG: unable to handle kernel NULL pointer dereference at 0000000000000102 IP: [ffffffff810a65f2] __queue_work+0x32/0x3c0 PGD 0 Oops: 0000 1 SMP Modules linked in: nvmet_rdma(OE) nvmet(OE) nvme(OE) dm_round_robin nvme_rdma(OE) nvme_fabrics(OE) nvme_core(OE) pal_raw(POE) pal_pmt(POE) pal_cache(POE) pal_pile(POE) pal(POE) pal_compatible(OE) rpcrdma sunrpc ib_isert iscsi_target_mod target_core_mod ib_iser libiscsi scsi_transport_iscsi ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm mlx4_ib sb_edac edac_core intel_powerclamp coretemp intel_rapl iosf_mbi kvm irqbypass crc32_pclmul ghash_clmulni_intel aesni_intel lrw gf128mul glue_helper ablk_helper cryptd iTCO_wdt iTCO_vendor_support mxm_wmi ipmi_ssif pcspkr ses enclosure joydev scsi_transport_sas i2c_i801 sg mei_me lpc_ich mei ioatdma shpchp ipmi_si ipmi_devintf ipmi_msghandler wmi acpi_power_meter acpi_pad dm_multipath hangcheck_timer ip_tables ext4 mbcache jbd2 mlx4_en sd_mod crc_t10dif crct10dif_generic mgag200 drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm mlx4_core crct10dif_pclmul crct10dif_common hfi1(OE) igb crc32c_intel rdmavt(OE) ahci ib_core libahci libata ptp megaraid_sas pps_core dca i2c_algo_bit i2c_core devlink dm_mirror dm_region_hash dm_log dm_mod CPU: 23 PID: 0 Comm: swapper/23 Tainted: P OE ------------ 3.10.0-693.el7.x86_64 #1 Hardware name: Intel Corporation S2600CWR/S2600CWR, BIOS SE5C610.86B.01.01.0028.121720182203 12/17/2018 task: ffff8808f4ec4f10 ti: ffff8808f4ed8000 task.ti: ffff8808f4ed8000 RIP: 0010:[ffffffff810a65f2] [ffffffff810a65f2] __queue_work+0x32/0x3c0 RSP: 0018:ffff88105df43d48 EFLAGS: 00010046 RAX: 0000000000000086 RBX: 0000000000000086 RCX: 0000000000000000 RDX: ffff880f74e758b0 RSI: 0000000000000000 RDI: 000000000000001f RBP: ffff88105df43d80 R08: ffff8808f3c583c8 R09: ffff8808f3c58000 R10: 0000000000000002 R11: ffff88105df43da8 R12: ffff880f74e758b0 R13: 000000000000001f R14: 0000000000000000 R15: ffff88105a300000 FS: 0000000000000000(0000) GS:ffff88105df40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000102 CR3: 00000000019f2000 CR4: 00000000001407e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Stack: ffff88105b6dd708 0000001f00000286 0000000000000086 ffff88105a300000 ffff880f74e75800 0000000000000000 ffff88105a300000 ffff88105df43d98 ffffffff810a6b85 ffff88105a301e80 ffff88105df43dc8 ffffffffc0224cde Call Trace: IRQ [ffffffff810a6b85] queue_work_on+0x45/0x50 [ffffffffc0224cde] _hfi1_schedule_send+0x6e/0xc0 [hfi1] [ffffffffc0170570] ? get_map_page+0x60/0x60 [rdmavt] [ffffffffc0224d62] hfi1_schedule_send+0x32/0x70 [hfi1] [ffffffffc0170644] rvt_rc_timeout+0xd4/0x120 [rdmavt] [ffffffffc0170570] ? get_map_page+0x60/0x60 [rdmavt] [ffffffff81097316] call_timer_fn+0x36/0x110 [ffffffffc0170570] ? get_map_page+0x60/0x60 [rdmavt] [ffffffff8109982d] run_timer_softirq+0x22d/0x310 [ffffffff81090b3f] __do_softirq+0xef/0x280 [ffffffff816b6a5c] call_softirq+0x1c/0x30 [ffffffff8102d3c5] do_softirq+0x65/0xa0 [ffffffff81090ec5] irq_exit+0x105/0x110 [ffffffff816b76c2] smp_apic_timer_interrupt+0x42/0x50 [ffffffff816b5c1d] apic_timer_interrupt+0x6d/0x80 EOI [ffffffff81527a02] ? cpuidle_enter_state+0x52/0xc0 [ffffffff81527b48] cpuidle_idle_call+0xd8/0x210 [ffffffff81034fee] arch_cpu_idle+0xe/0x30 [ffffffff810e7bca] cpu_startup_entry+0x14a/0x1c0 [ffffffff81051af6] start_secondary+0x1b6/0x230 Code: 89 e5 41 57 41 56 49 89 f6 41 55 41 89 fd 41 54 49 89 d4 53 48 83 ec 10 89 7d d4 9c 58 0f 1f 44 00 00 f6 c4 02 0f 85 be 02 00 00 41 f6 86 02 01 00 00 01 0f 85 58 02 00 00 49 c7 c7 28 19 01 00 RIP [ffffffff810a65f2] __queue_work+0x32/0x3c0 RSP ffff88105df43d48 CR2: 0000000000000102 The solution is to reset the QPs before the device resources are freed. This reset will change the QP state to prevent post sends and delete timers to prevent callbacks. Fixes: 0acb0cc7ecc1 ("IB/rdmavt: Initialize and teardown of qpn table") Link: https://lore.kernel.org/r/20200210131040.87408.38161.stgit@awfm-01.aw.intel.com Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit be8638344c70bf492963ace206a9896606b6922d Author: Mike Marciniszyn Date: Mon Feb 10 08:10:33 2020 -0500 IB/hfi1: Close window for pq and request coliding Cleaning up a pq can result in the following warning and panic: WARNING: CPU: 52 PID: 77418 at lib/list_debug.c:53 __list_del_entry+0x63/0xd0 list_del corruption, ffff88cb2c6ac068->next is LIST_POISON1 (dead000000000100) Modules linked in: mmfs26(OE) mmfslinux(OE) tracedev(OE) 8021q garp mrp ib_isert iscsi_target_mod target_core_mod crc_t10dif crct10dif_generic opa_vnic rpcrdma ib_iser libiscsi scsi_transport_iscsi ib_ipoib(OE) bridge stp llc iTCO_wdt iTCO_vendor_support intel_powerclamp coretemp intel_rapl iosf_mbi kvm_intel kvm irqbypass crct10dif_pclmul crct10dif_common crc32_pclmul ghash_clmulni_intel ast aesni_intel ttm lrw gf128mul glue_helper ablk_helper drm_kms_helper cryptd syscopyarea sysfillrect sysimgblt fb_sys_fops drm pcspkr joydev lpc_ich mei_me drm_panel_orientation_quirks i2c_i801 mei wmi ipmi_si ipmi_devintf ipmi_msghandler nfit libnvdimm acpi_power_meter acpi_pad hfi1(OE) rdmavt(OE) rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm ib_core binfmt_misc numatools(OE) xpmem(OE) ip_tables nfsv3 nfs_acl nfs lockd grace sunrpc fscache igb ahci i2c_algo_bit libahci dca ptp libata pps_core crc32c_intel [last unloaded: i2c_algo_bit] CPU: 52 PID: 77418 Comm: pvbatch Kdump: loaded Tainted: G OE ------------ 3.10.0-957.38.3.el7.x86_64 #1 Hardware name: HPE.COM HPE SGI 8600-XA730i Gen10/X11DPT-SB-SG007, BIOS SBED1229 01/22/2019 Call Trace: [] dump_stack+0x19/0x1b [] __warn+0xd8/0x100 [] warn_slowpath_fmt+0x5f/0x80 [] __list_del_entry+0x63/0xd0 [] list_del+0xd/0x30 [] kmem_cache_destroy+0x50/0x110 [] hfi1_user_sdma_free_queues+0xf0/0x200 [hfi1] [] hfi1_file_close+0x70/0x1e0 [hfi1] [] __fput+0xec/0x260 [] ____fput+0xe/0x10 [] task_work_run+0xbb/0xe0 [] do_notify_resume+0xa5/0xc0 [] int_signal+0x12/0x17 BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 IP: [] kmem_cache_close+0x7e/0x300 PGD 2cdab19067 PUD 2f7bfdb067 PMD 0 Oops: 0000 [#1] SMP Modules linked in: mmfs26(OE) mmfslinux(OE) tracedev(OE) 8021q garp mrp ib_isert iscsi_target_mod target_core_mod crc_t10dif crct10dif_generic opa_vnic rpcrdma ib_iser libiscsi scsi_transport_iscsi ib_ipoib(OE) bridge stp llc iTCO_wdt iTCO_vendor_support intel_powerclamp coretemp intel_rapl iosf_mbi kvm_intel kvm irqbypass crct10dif_pclmul crct10dif_common crc32_pclmul ghash_clmulni_intel ast aesni_intel ttm lrw gf128mul glue_helper ablk_helper drm_kms_helper cryptd syscopyarea sysfillrect sysimgblt fb_sys_fops drm pcspkr joydev lpc_ich mei_me drm_panel_orientation_quirks i2c_i801 mei wmi ipmi_si ipmi_devintf ipmi_msghandler nfit libnvdimm acpi_power_meter acpi_pad hfi1(OE) rdmavt(OE) rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm ib_core binfmt_misc numatools(OE) xpmem(OE) ip_tables nfsv3 nfs_acl nfs lockd grace sunrpc fscache igb ahci i2c_algo_bit libahci dca ptp libata pps_core crc32c_intel [last unloaded: i2c_algo_bit] CPU: 52 PID: 77418 Comm: pvbatch Kdump: loaded Tainted: G W OE ------------ 3.10.0-957.38.3.el7.x86_64 #1 Hardware name: HPE.COM HPE SGI 8600-XA730i Gen10/X11DPT-SB-SG007, BIOS SBED1229 01/22/2019 task: ffff88cc26db9040 ti: ffff88b5393a8000 task.ti: ffff88b5393a8000 RIP: 0010:[] [] kmem_cache_close+0x7e/0x300 RSP: 0018:ffff88b5393abd60 EFLAGS: 00010287 RAX: 0000000000000000 RBX: ffff88cb2c6ac000 RCX: 0000000000000003 RDX: 0000000000000400 RSI: 0000000000000400 RDI: ffffffff9095b800 RBP: ffff88b5393abdb0 R08: ffffffff9095b808 R09: ffffffff8ff77c19 R10: ffff88b73ce1f160 R11: ffffddecddde9800 R12: ffff88cb2c6ac000 R13: 000000000000000c R14: ffff88cf3fdca780 R15: 0000000000000000 FS: 00002aaaaab52500(0000) GS:ffff88b73ce00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000010 CR3: 0000002d27664000 CR4: 00000000007607e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: [] __kmem_cache_shutdown+0x14/0x80 [] kmem_cache_destroy+0x58/0x110 [] hfi1_user_sdma_free_queues+0xf0/0x200 [hfi1] [] hfi1_file_close+0x70/0x1e0 [hfi1] [] __fput+0xec/0x260 [] ____fput+0xe/0x10 [] task_work_run+0xbb/0xe0 [] do_notify_resume+0xa5/0xc0 [] int_signal+0x12/0x17 Code: 00 00 ba 00 04 00 00 0f 4f c2 3d 00 04 00 00 89 45 bc 0f 84 e7 01 00 00 48 63 45 bc 49 8d 04 c4 48 89 45 b0 48 8b 80 c8 00 00 00 <48> 8b 78 10 48 89 45 c0 48 83 c0 10 48 89 45 d0 48 8b 17 48 39 RIP [] kmem_cache_close+0x7e/0x300 RSP CR2: 0000000000000010 The panic is the result of slab entries being freed during the destruction of the pq slab. The code attempts to quiesce the pq, but looking for n_req == 0 doesn't account for new requests. Fix the issue by using SRCU to get a pq pointer and adjust the pq free logic to NULL the fd pq pointer prior to the quiesce. Fixes: e87473bc1b6c ("IB/hfi1: Only set fd pointer when base context is completely initialized") Link: https://lore.kernel.org/r/20200210131033.87408.81174.stgit@awfm-01.aw.intel.com Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit a70ed0f2e6262e723ae8d70accb984ba309eacc2 Author: Kaike Wan Date: Mon Feb 10 08:10:26 2020 -0500 IB/hfi1: Acquire lock to release TID entries when user file is closed Each user context is allocated a certain number of RcvArray (TID) entries and these entries are managed through TID groups. These groups are put into one of three lists in each user context: tid_group_list, tid_used_list, and tid_full_list, depending on the number of used TID entries within each group. When TID packets are expected, one or more TID groups will be allocated. After the packets are received, the TID groups will be freed. Since multiple user threads may access the TID groups simultaneously, a mutex exp_mutex is used to synchronize the access. However, when the user file is closed, it tries to release all TID groups without acquiring the mutex first, which risks a race condition with another thread that may be releasing its TID groups, leading to data corruption. This patch addresses the issue by acquiring the mutex first before releasing the TID groups when the file is closed. Fixes: 3abb33ac6521 ("staging/hfi1: Add TID cache receive init and free funcs") Link: https://lore.kernel.org/r/20200210131026.87408.86853.stgit@awfm-01.aw.intel.com Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 9cc68ee1d92e3ab5bd5c821e5c1f387b0e16a669 Author: Jordan Crouse Date: Wed Feb 5 13:48:17 2020 -0700 drm/msm: Fix a6xx GMU shutdown sequence Commit e812744c5f95 ("drm: msm: a6xx: Add support for A618") missed updating the VBIF flush in a6xx_gmu_shutdown and instead inserted the new sequence into a6xx_pm_suspend along with a redundant GMU idle. Move a6xx_bus_clear_pending_transactions to a6xx_gmu.c and use it in the appropriate place in the shutdown routine and remove the redundant idle call. v2: Remove newly unused variable that was triggering a warning Signed-off-by: Jordan Crouse Reviewed-by: Rob Clark Fixes: e812744c5f95 ("drm: msm: a6xx: Add support for A618") Tested-by: Douglas Anderson Signed-off-by: Rob Clark commit 1636295a9f6931e8524c416ae333cd9ff7ef4661 Author: Jordan Crouse Date: Wed Feb 5 10:01:21 2020 -0700 drm/msm/a6xx: Update the GMU bus tables for sc7180 Fixup the GMU bus table values for the sc7180 target. Signed-off-by: Jordan Crouse Reviewed-by: Rob Clark Fixes: e812744c5f95 ("drm: msm: a6xx: Add support for A618") Signed-off-by: Rob Clark commit 56d977d5610bc6a83cf5f2d69cec91f3a2b91f77 Author: Jordan Crouse Date: Tue Feb 4 10:42:28 2020 -0700 drm/msm/a6xx: Remove unneeded GBIF unhalt Commit e812744c5f95 ("drm: msm: a6xx: Add support for A618") added a universal GBIF un-halt into a6xx_start(). This can cause problems for a630 targets which do not use GBIF and might have access protection enabled on the region now occupied by the GBIF registers. But it turns out that we didn't need to unhalt the GBIF in this path since the stop function already takes care of that after executing a flush but before turning off the headswitch. We should be confident that the GBIF is open for business when we restart the hardware. Signed-off-by: Jordan Crouse Tested-by: John Stultz Reviewed-by: Rob Clark Fixes: e812744c5f95 ("drm: msm: a6xx: Add support for A618") Signed-off-by: Rob Clark commit 7fd2dfc3694922eb7ace4801b7208cf9f62ebc7d Author: John Stultz Date: Wed Jan 29 20:12:44 2020 +0000 drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI I was hitting kCFI crashes when building with clang, and after some digging finally narrowed it down to the dsi_mgr_connector_mode_valid() function being implemented as returning an int, instead of an enum drm_mode_status. This patch fixes it, and appeases the opaque word of the kCFI gods (seriously, clang inlining everything makes the kCFI backtraces only really rough estimates of where things went wrong). Thanks as always to Sami for his help narrowing this down. Cc: Rob Clark Cc: Sean Paul Cc: Sami Tolvanen Cc: Todd Kjos Cc: Alistair Delva Cc: Amit Pundir Cc: Sumit Semwal Cc: freedreno@lists.freedesktop.org Cc: clang-built-linux@googlegroups.com Signed-off-by: John Stultz Reviewed-by: Nick Desaulniers Tested-by: Amit Pundir Signed-off-by: Rob Clark commit e8e35c62ba517f73cca32bc9925d62f4c4981768 Author: Akhil P Oommen Date: Fri Jan 24 17:50:11 2020 +0530 drm/msm/a6xx: Correct the highestbank configuration Highest bank bit configuration is different for a618 gpu. Update it with the correct configuration which is the reset value incidentally. Signed-off-by: Akhil P Oommen Signed-off-by: Sharat Masetty Fixes: e812744c5f95 ("drm: msm: a6xx: Add support for A618") Reviewed-by: Rob Clark Signed-off-by: Rob Clark commit 8a4f300b978edbbaa73ef9eca660e45eb9f13873 Author: Kamal Heib Date: Wed Feb 5 13:05:30 2020 +0200 RDMA/hfi1: Fix memory leak in _dev_comp_vect_mappings_create Make sure to free the allocated cpumask_var_t's to avoid the following reported memory leak by kmemleak: $ cat /sys/kernel/debug/kmemleak unreferenced object 0xffff8897f812d6a8 (size 8): comm "kworker/1:1", pid 347, jiffies 4294751400 (age 101.703s) hex dump (first 8 bytes): 00 00 00 00 00 00 00 00 ........ backtrace: [<00000000bff49664>] alloc_cpumask_var_node+0x4c/0xb0 [<0000000075d3ca81>] hfi1_comp_vectors_set_up+0x20f/0x800 [hfi1] [<0000000098d420df>] hfi1_init_dd+0x3311/0x4960 [hfi1] [<0000000071be7e52>] init_one+0x25e/0xf10 [hfi1] [<000000005483d4c2>] local_pci_probe+0xd4/0x180 [<000000007c3cbc6e>] work_for_cpu_fn+0x51/0xa0 [<000000001d626905>] process_one_work+0x8f0/0x17b0 [<000000007e569e7e>] worker_thread+0x536/0xb50 [<00000000fd39a4a5>] kthread+0x30c/0x3d0 [<0000000056f2edb3>] ret_from_fork+0x3a/0x50 Fixes: 5d18ee67d4c1 ("IB/{hfi1, rdmavt, qib}: Implement CQ completion vector support") Link: https://lore.kernel.org/r/20200205110530.12129-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Reviewed-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit e4f9bbe9f8beab9a1ce460e7e194595b76868595 Author: Kalyan Thota Date: Thu Jan 23 15:47:55 2020 +0530 msm:disp:dpu1: add UBWC support for display on SC7180 Add UBWC global configuration for display on SC7180 target. Signed-off-by: Kalyan Thota Tested-by: Douglas Anderson Fixes: 73bfb790ac78 ("msm:disp:dpu1: setup display datapath for SC7180 target") Signed-off-by: Rob Clark commit ef8c9809acb0805c991bba8bdd4749fc46d44a98 Author: Brian Masney Date: Sat Jan 18 15:41:20 2020 -0500 drm/msm/mdp5: rate limit pp done timeout warnings Add rate limiting of the 'pp done time out' warnings since these warnings can quickly fill the dmesg buffer. Signed-off-by: Brian Masney Signed-off-by: Rob Clark commit 30744a68626db6a0029aca9c646831c869c16d83 Author: Magnus Karlsson Date: Mon Feb 10 16:27:12 2020 +0100 xsk: Publish global consumer pointers when NAPI is finished The commit 4b638f13bab4 ("xsk: Eliminate the RX batch size") introduced a much more lazy way of updating the global consumer pointers from the kernel side, by only doing so when running out of entries in the fill or Tx rings (the rings consumed by the kernel). This can result in a deadlock with the user application if the kernel requires more than one entry to proceed and the application cannot put these entries in the fill ring because the kernel has not updated the global consumer pointer since the ring is not empty. Fix this by publishing the local kernel side consumer pointer whenever we have completed Rx or Tx processing in the kernel. This way, user space will have an up-to-date view of the consumer pointers whenever it gets to execute in the one core case (application and driver on the same core), or after a certain number of packets have been processed in the two core case (application and driver on different cores). A side effect of this patch is that the one core case gets better performance, but the two core case gets worse. The reason that the one core case improves is that updating the global consumer pointer is relatively cheap since the application by definition is not running when the kernel is (they are on the same core) and it is beneficial for the application, once it gets to run, to have pointers that are as up to date as possible since it then can operate on more packets and buffers. In the two core case, the most important performance aspect is to minimize the number of accesses to the global pointers since they are shared between two cores and bounces between the caches of those cores. This patch results in more updates to global state, which means lower performance in the two core case. Fixes: 4b638f13bab4 ("xsk: Eliminate the RX batch size") Reported-by: Ryan Goodfellow Reported-by: Maxim Mikityanskiy Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Jonathan Lemon Acked-by: Maxim Mikityanskiy Link: https://lore.kernel.org/bpf/1581348432-6747-1-git-send-email-magnus.karlsson@intel.com commit da0f3e0201b87ee4bbd2175925dd57e1228c35fb Author: Andy Shevchenko Date: Mon Feb 10 17:23:02 2020 +0200 MAINTAINERS: Sort entries in database for THUNDERBOLT Run parse-maintainers.pl and choose THUNDERBOLT record. Fix it accordingly. Signed-off-by: Andy Shevchenko Signed-off-by: Mika Westerberg commit f861854e1b435b27197417f6f90d87188003cb24 Author: Kan Liang Date: Tue Jan 21 11:01:25 2020 -0800 perf/x86/intel: Fix inaccurate period in context switch for auto-reload Perf doesn't take the left period into account when auto-reload is enabled with fixed period sampling mode in context switch. Here is the MSR trace of the perf command as below. (The MSR trace is simplified from a ftrace log.) #perf record -e cycles:p -c 2000000 -- ./triad_loop //The MSR trace of task schedule out //perf disable all counters, disable PEBS, disable GP counter 0, //read GP counter 0, and re-enable all counters. //The counter 0 stops at 0xfffffff82840 write_msr: MSR_CORE_PERF_GLOBAL_CTRL(38f), value 0 write_msr: MSR_IA32_PEBS_ENABLE(3f1), value 0 write_msr: MSR_P6_EVNTSEL0(186), value 40003003c rdpmc: 0, value fffffff82840 write_msr: MSR_CORE_PERF_GLOBAL_CTRL(38f), value f000000ff //The MSR trace of the same task schedule in again //perf disable all counters, enable and set GP counter 0, //enable PEBS, and re-enable all counters. //0xffffffe17b80 (-2000000) is written to GP counter 0. write_msr: MSR_CORE_PERF_GLOBAL_CTRL(38f), value 0 write_msr: MSR_IA32_PMC0(4c1), value ffffffe17b80 write_msr: MSR_P6_EVNTSEL0(186), value 40043003c write_msr: MSR_IA32_PEBS_ENABLE(3f1), value 1 write_msr: MSR_CORE_PERF_GLOBAL_CTRL(38f), value f000000ff When the same task schedule in again, the counter should starts from previous left. However, it starts from the fixed period -2000000 again. A special variant of intel_pmu_save_and_restart() is used for auto-reload, which doesn't update the hwc->period_left. When the monitored task schedules in again, perf doesn't know the left period. The fixed period is used, which is inaccurate. With auto-reload, the counter always has a negative counter value. So the left period is -value. Update the period_left in intel_pmu_save_and_restart_reload(). With the patch: //The MSR trace of task schedule out write_msr: MSR_CORE_PERF_GLOBAL_CTRL(38f), value 0 write_msr: MSR_IA32_PEBS_ENABLE(3f1), value 0 write_msr: MSR_P6_EVNTSEL0(186), value 40003003c rdpmc: 0, value ffffffe25cbc write_msr: MSR_CORE_PERF_GLOBAL_CTRL(38f), value f000000ff //The MSR trace of the same task schedule in again write_msr: MSR_CORE_PERF_GLOBAL_CTRL(38f), value 0 write_msr: MSR_IA32_PMC0(4c1), value ffffffe25cbc write_msr: MSR_P6_EVNTSEL0(186), value 40043003c write_msr: MSR_IA32_PEBS_ENABLE(3f1), value 1 write_msr: MSR_CORE_PERF_GLOBAL_CTRL(38f), value f000000ff Fixes: d31fc13fdcb2 ("perf/x86/intel: Fix event update for auto-reload") Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20200121190125.3389-1-kan.liang@linux.intel.com commit 25d387287cf0330abf2aad761ce6eee67326a355 Author: Kim Phillips Date: Tue Jan 21 11:12:31 2020 -0600 perf/x86/amd: Add missing L2 misses event spec to AMD Family 17h's event map Commit 3fe3331bb285 ("perf/x86/amd: Add event map for AMD Family 17h"), claimed L2 misses were unsupported, due to them not being found in its referenced documentation, whose link has now moved [1]. That old documentation listed PMCx064 unit mask bit 3 as: "LsRdBlkC: LS Read Block C S L X Change to X Miss." and bit 0 as: "IcFillMiss: IC Fill Miss" We now have new public documentation [2] with improved descriptions, that clearly indicate what events those unit mask bits represent: Bit 3 now clearly states: "LsRdBlkC: Data Cache Req Miss in L2 (all types)" and bit 0 is: "IcFillMiss: Instruction Cache Req Miss in L2." So we can now add support for L2 misses in perf's genericised events as PMCx064 with both the above unit masks. [1] The commit's original documentation reference, "Processor Programming Reference (PPR) for AMD Family 17h Model 01h, Revision B1 Processors", originally available here: https://www.amd.com/system/files/TechDocs/54945_PPR_Family_17h_Models_00h-0Fh.pdf is now available here: https://developer.amd.com/wordpress/media/2017/11/54945_PPR_Family_17h_Models_00h-0Fh.pdf [2] "Processor Programming Reference (PPR) for Family 17h Model 31h, Revision B0 Processors", available here: https://developer.amd.com/wp-content/resources/55803_0.54-PUB.pdf Fixes: 3fe3331bb285 ("perf/x86/amd: Add event map for AMD Family 17h") Reported-by: Babu Moger Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Babu Moger Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20200121171232.28839-1-kim.phillips@amd.com commit 0aa0e0d6b34b89649e6b5882a7e025a0eb9bd832 Author: Kan Liang Date: Tue Jan 28 10:31:19 2020 -0800 perf/x86/msr: Add Tremont support Tremont is Intel's successor to Goldmont Plus. SMI_COUNT MSR is also supported. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1580236279-35492-3-git-send-email-kan.liang@linux.intel.com commit ecf71fbccb9ac5cb964eb7de59bb9da3755b7885 Author: Kan Liang Date: Tue Jan 28 10:31:18 2020 -0800 perf/x86/cstate: Add Tremont support Tremont is Intel's successor to Goldmont Plus. From the perspective of Intel cstate residency counters, there is nothing changed compared with Goldmont Plus and Goldmont. Share glm_cstates with Goldmont Plus and Goldmont. Update the comments for Tremont. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1580236279-35492-2-git-send-email-kan.liang@linux.intel.com commit eda23b387f6c4bb2971ac7e874a09913f533b22c Author: Kan Liang Date: Tue Jan 28 10:31:17 2020 -0800 perf/x86/intel: Add Elkhart Lake support Elkhart Lake also uses Tremont CPU. From the perspective of Intel PMU, there is nothing changed compared with Jacobsville. Share the perf code with Jacobsville. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1580236279-35492-1-git-send-email-kan.liang@linux.intel.com commit e9f5490c3574b435ce7fe7a71724aa3866babc7f Author: Randy Dunlap Date: Sun Feb 9 19:29:12 2020 -0800 sched/fair: Fix kernel-doc warning in attach_entity_load_avg() Fix kernel-doc warning in kernel/sched/fair.c, caused by a recent function parameter removal: ../kernel/sched/fair.c:3526: warning: Excess function parameter 'flags' description in 'attach_entity_load_avg' Fixes: a4f9a0e51bbf ("sched/fair: Remove redundant call to cpufreq_update_util()") Signed-off-by: Randy Dunlap Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/cbe964e4-6879-fd08-41c9-ef1917414af4@infradead.org commit 4104a562e0ca62e971089db9d3c47794a0d7d4eb Author: Madhuparna Bhowmik Date: Sat Feb 1 18:28:03 2020 +0530 sched/core: Annotate curr pointer in rq with __rcu This patch fixes the following sparse warnings in sched/core.c and sched/membarrier.c: kernel/sched/core.c:2372:27: error: incompatible types in comparison expression kernel/sched/core.c:4061:17: error: incompatible types in comparison expression kernel/sched/core.c:6067:9: error: incompatible types in comparison expression kernel/sched/membarrier.c:108:21: error: incompatible types in comparison expression kernel/sched/membarrier.c:177:21: error: incompatible types in comparison expression kernel/sched/membarrier.c:243:21: error: incompatible types in comparison expression Signed-off-by: Madhuparna Bhowmik Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20200201125803.20245-1-madhuparnabhowmik10@gmail.com commit 6fcca0fa48118e6d63733eb4644c6cd880c15b8f Author: Suren Baghdasaryan Date: Mon Feb 3 13:22:16 2020 -0800 sched/psi: Fix OOB write when writing 0 bytes to PSI files Issuing write() with count parameter set to 0 on any file under /proc/pressure/ will cause an OOB write because of the access to buf[buf_size-1] when NUL-termination is performed. Fix this by checking for buf_size to be non-zero. Signed-off-by: Suren Baghdasaryan Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Johannes Weiner Link: https://lkml.kernel.org/r/20200203212216.7076-1-surenb@google.com commit 7a7a8f549ddd18126dfa3dedbe42d877614c7995 Author: Peter Zijlstra Date: Fri Feb 7 12:57:37 2020 +0100 arm/patch: Fix !MMU compile Now that patch.o is unconditionally selected for ftrace, it can also get compiled for !MMU kernels. These (obviously) lack {set,clear}_fixmap() support. Also remove the superfluous __acquire/__release nonsense. Fixes: 42e51f187f86 ("arm/ftrace: Use __patch_text()") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar commit be993e44badc448add6a18d6f12b20615692c4c3 Author: Peter Zijlstra Date: Fri Feb 7 12:57:36 2020 +0100 arm/ftrace: Fix BE text poking The __patch_text() function already applies __opcode_to_mem_*(), so when __opcode_to_mem_*() is not the identity (BE*), it is applied twice, wrecking the instruction. Fixes: 42e51f187f86 ("arm/ftrace: Use __patch_text()") Reported-by: Dmitry Osipenko Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Dmitry Osipenko commit 74f73476c3755664504b7d266b5e8f91050ffed9 Author: Takashi Iwai Date: Tue Feb 11 12:14:19 2020 +0100 ALSA: usb-audio: Apply 48kHz fixed rate playback for Jabra Evolve 65 headset Jabra Evolve 65 headset appears as if supporting lower rates than 48kHz, but it actually doesn't work but with 48kHz for playback. This patch applies a workaround to enforce the 48kHz like LINE6 devices already did. The workaround is put in a unified helper function, set_fixed_rate(), to be called from both places now. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206149 Link: https://lore.kernel.org/r/20200211111419.5895-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit bb89abe52bf426f1f40850c441efc77426cc31e1 Author: Florian Westphal Date: Mon Feb 3 17:37:06 2020 +0100 netfilter: conntrack: split resolve_clash function Followup patch will need a helper function with the 'clashing entries refer to the identical tuple in both directions' resolution logic. This patch will add another resolve_clash helper where loser_ct must not be added to the dying list because it will be inserted into the table. Therefore this also moves the stat counters and dying-list insertion of the losing ct. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit b1b32552c1d81f0cf6a8e79043a2a47e769ff071 Author: Florian Westphal Date: Mon Feb 3 17:37:05 2020 +0100 netfilter: conntrack: place confirm-bit setting in a helper ... so it can be re-used from clash resolution in followup patch. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 3d1e0b406de16508de96f4a07fc3f94cfc678372 Author: Florian Westphal Date: Mon Feb 3 17:37:04 2020 +0100 netfilter: conntrack: remove two args from resolve_clash ctinfo is whats taken from the skb, i.e. ct = nf_ct_get(skb, &ctinfo). We do not pass 'ct' and instead re-fetch it from the skb. Just do the same for both netns and ctinfo. Also add a comment on what clash resolution is supposed to do. While at it, one indent level can be removed. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit e4edd4fcbf4daf9d4319bef0bfaf350cb672239a Author: Chris Wilson Date: Thu Jan 23 22:44:58 2020 +0000 drm/i915: Check activity on i915_vma after confirming pin_count==0 Only assert that the i915_vma is now idle if and only if no other pins are present. If another user has the i915_vma pinned, they may submit more work to the i915_vma skipping the vm->mutex used to serialise the unbind. We need to wait again, if we want to continue and unbind this vma. However, if we own the i915_vma (we hold the vm->mutex for the unbind and the pin_count is 0), we can assert that the vma remains idle as we unbind. Fixes: 2850748ef876 ("drm/i915: Pull i915_vma_pin under the vm->mutex") Closes: https://gitlab.freedesktop.org/drm/intel/issues/530 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200123224459.38128-1-chris@chris-wilson.co.uk (cherry picked from commit 60e94557fff1f5514c7fc4da7ddc2c7a13ffff26) Signed-off-by: Jani Nikula commit 051c89cf4ac487e795d87e6f3b9e0ff788da8fb4 Author: Chris Wilson Date: Thu Jan 23 12:59:34 2020 +0000 drm/i915/gem: Detect overflow in calculating dumb buffer size To multiply 2 u32 numbers to generate a u64 in C requires a bit of forewarning for the compiler. Signed-off-by: Chris Wilson Cc: Ramalingam C Cc: Joonas Lahtinen Cc: stable@vger.kernel.org Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200123125934.1401755-1-chris@chris-wilson.co.uk (cherry picked from commit 0f8f8a64300092852b9361cd835395ee71e6a7d6) Signed-off-by: Jani Nikula commit 1a9629d189f57670afd31f1aea4e59b7270d2d89 Author: Chris Wilson Date: Tue Jan 21 13:21:07 2020 +0000 drm/i915: Don't show the blank process name for internal/simulated errors For a simulated preemption reset, we don't populate the request and so do not fill in the guilty context name. [ 79.991294] i915 0000:00:02.0: GPU HANG: ecode 9:1:e757fefe, in [0] Just don't mention the empty string in the logs! Fixes: 742379c0c400 ("drm/i915: Start chopping up the GPU error capture") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200121132107.267709-1-chris@chris-wilson.co.uk (cherry picked from commit 29baf3ae8daa4c673de58106ff41c7236dff57f4) Signed-off-by: Jani Nikula commit 07ccd6bdafa22aacc4f72b7eb14474d0b356e6c3 Author: Chris Wilson Date: Mon Jan 20 10:49:22 2020 +0000 drm/i915/gem: Store mmap_offsets in an rbtree rather than a plain list Currently we create a new mmap_offset for every call to mmap_offset_ioctl. This exposes ourselves to an abusive client that may simply create new mmap_offsets ad infinitum, which will exhaust physical memory and the virtual address space. In addition to the exhaustion, a very long linear list of mmap_offsets causes other clients using the object to incur long list walks -- these long lists can also be generated by simply having many clients generate their own mmap_offset. However, we can simply use the drm_vma_node itself to manage the file association (allow/revoke) dropping our need to keep an mmo per-file. Then if we keep a small rbtree of per-type mmap_offsets, we can lookup duplicate requests quickly. Fixes: cc662126b413 ("drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET") Signed-off-by: Chris Wilson Cc: Abdiel Janulgue Reviewed-by: Abdiel Janulgue Link: https://patchwork.freedesktop.org/patch/msgid/20200120104924.4000706-3-chris@chris-wilson.co.uk (cherry picked from commit 7865559872074a9ab169c87915504661d630addf) Signed-off-by: Jani Nikula commit a754012b9f2323a5d640da7eb7b095ac3b8cd012 Author: Chris Wilson Date: Wed Jan 15 17:58:29 2020 +0000 drm/i915/execlists: Leave resetting ring to intel_ring We need to allow concurrent intel_context_unpin, which means avoiding doing destructive operations like intel_ring_reset(). This was already fixed for intel_ring_unpin() in commit 0725d9a31869 ("drm/i915/gt: Make intel_ring_unpin() safe for concurrent pint"), but I overlooked that execlists_context_unpin() also made the same mistake. Reported-by: Matthew Brost Fixes: 841350223816 ("drm/i915/gt: Drop mutex serialisation between context pin/unpin") References: 0725d9a31869 ("drm/i915/gt: Make intel_ring_unpin() safe for concurrent pint") Signed-off-by: Chris Wilson Cc: Matthew Brost Cc: Matthew Auld Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200115175829.2761329-1-chris@chris-wilson.co.uk (cherry picked from commit f3c0efc9fe7a4e61544034f525348a3aa86ac5aa) Signed-off-by: Jani Nikula commit 74a44bed8d93782affb707a33469bda7052b4207 Author: Robin Murphy Date: Mon Feb 10 19:21:01 2020 +0000 arm64: Fix CONFIG_ARCH_RANDOM=n build The entire asm/archrandom.h header is generically included via linux/archrandom.h only when CONFIG_ARCH_RANDOM is already set, so the stub definitions of __arm64_rndr() and __early_cpu_has_rndr() are only visible to KASLR if it explicitly includes the arch-internal header. Acked-by: Mark Brown Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit cf01514c5c6efa2d521d35e68dff2e0674d08e91 Author: Oded Gabbay Date: Thu Jan 23 00:43:06 2020 +0200 habanalabs: patched cb equals user cb in device memset During device memory memset, the driver allocates and use a CB (command buffer). To reuse existing code, it keeps a pointer to the CB in two variables, user_cb and patched_cb. Therefore, there is no need to "put" both the user_cb and patched_cb, as it will cause an underflow of the refcnt of the CB. Signed-off-by: Oded Gabbay commit a37e47192dfa98f79a0cd5ab991c224b5980c982 Author: Omer Shpigelman Date: Sun Jan 5 09:05:45 2020 +0000 habanalabs: do not halt CoreSight during hard reset During hard reset we must not write to the device. Hence avoid halting CoreSight during user context close if it is done during hard reset. In addition, we must not re-enable clock gating afterwards as it was deliberately disabled in the beginning of the hard reset flow. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 908087ffbe896c100ed73d5f0ce11a5b7264af4a Author: Oded Gabbay Date: Mon Dec 23 17:51:48 2019 +0200 habanalabs: halt the engines before hard-reset The driver must halt the engines before doing hard-reset, otherwise the device can go into undefined state. There is a place where the driver didn't do that and this patch fixes it. Reviewed-by: Tomer Tayar Signed-off-by: Oded Gabbay commit e3728b50cd9be7d4b1469447cdf1feb93e3b7adb Author: Rafael J. Wysocki Date: Tue Feb 11 10:11:02 2020 +0100 ACPI: PM: s2idle: Avoid possible race related to the EC GPE It is theoretically possible for the ACPI EC GPE to be set after the s2idle_ops->wake() called from s2idle_loop() has returned and before the subsequent pm_wakeup_pending() check is carried out. If that happens, the resulting wakeup event will cause the system to resume even though it may be a spurious one. To avoid that race, first make the ->wake() callback in struct platform_s2idle_ops return a bool value indicating whether or not to let the system resume and rearrange s2idle_loop() to use that value instad of the direct pm_wakeup_pending() call if ->wake() is present. Next, rework acpi_s2idle_wake() to process EC events and check pm_wakeup_pending() before re-arming the SCI for system wakeup to prevent it from triggering prematurely and add comments to that function to explain the rationale for the new code flow. Fixes: 56b991849009 ("PM: sleep: Simplify suspend-to-idle control flow") Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki commit f0ac20c3f6137910c8a927953e8a92f5b3716166 Author: Rafael J. Wysocki Date: Tue Feb 11 10:07:43 2020 +0100 ACPI: EC: Fix flushing of pending work Commit 016b87ca5c8c ("ACPI: EC: Rework flushing of pending work") introduced a subtle bug into the flushing of pending EC work while suspended to idle, which may cause the EC driver to fail to re-enable the EC GPE after handling a non-wakeup event (like a battery status change event, for example). The problem is that the work item flushed by flush_scheduled_work() in __acpi_ec_flush_work() may disable the EC GPE and schedule another work item expected to re-enable it, but that new work item is not flushed, so __acpi_ec_flush_work() returns with the EC GPE disabled and the CPU running it goes into an idle state subsequently. If all of the other CPUs are in idle states at that point, the EC GPE won't be re-enabled until at least one CPU is woken up by another interrupt source, so system wakeup events that would normally come from the EC then don't work. This is reproducible on a Dell XPS13 9360 in my office which sometimes stops reacting to power button and lid events (triggered by the EC on that machine) after switching from AC power to battery power or vice versa while suspended to idle (each of those switches causes the EC GPE to trigger for several times in a row, but they are not system wakeup events). To avoid this problem, it is necessary to drain the workqueue entirely in __acpi_ec_flush_work(), but that cannot be done with respect to system_wq, because work items may be added to it from other places while __acpi_ec_flush_work() is running. For this reason, make the EC driver use a dedicated workqueue for EC events processing (let that workqueue be ordered so that EC events are processed sequentially) and use drain_workqueue() on it in __acpi_ec_flush_work(). Fixes: 016b87ca5c8c ("ACPI: EC: Rework flushing of pending work") Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki commit 0cbb4f9c69827decf56519c2f63918f16904ede5 Author: Stephen Boyd Date: Mon Feb 3 09:46:19 2020 -0800 platform/chrome: wilco_ec: Include asm/unaligned instead of linux/ path It seems that we shouldn't try to include the include/linux/ path to unaligned functions. Just include asm/unaligned.h instead so that we don't run into compilation warnings like below. In file included from drivers/platform/chrome/wilco_ec/properties.c:8:0: include/linux/unaligned/le_memmove.h:7:19: error: redefinition of 'get_unaligned_le16' static inline u16 get_unaligned_le16(const void *p) ^~~~~~~~~~~~~~~~~~ In file included from arch/ia64/include/asm/unaligned.h:5:0, from arch/ia64/include/asm/io.h:23, from arch/ia64/include/asm/smp.h:21, from include/linux/smp.h:68, from include/linux/percpu.h:7, from include/linux/arch_topology.h:9, from include/linux/topology.h:30, from include/linux/gfp.h:9, from include/linux/xarray.h:14, from include/linux/radix-tree.h:18, from include/linux/idr.h:15, from include/linux/kernfs.h:13, from include/linux/sysfs.h:16, from include/linux/kobject.h:20, from include/linux/device.h:16, from include/linux/platform_data/wilco-ec.h:11, from drivers/platform/chrome/wilco_ec/properties.c:6: include/linux/unaligned/le_struct.h:7:19: note: previous definition of 'get_unaligned_le16' was here static inline u16 get_unaligned_le16(const void *p) ^~~~~~~~~~~~~~~~~~ Reported-by: kbuild test robot Fixes: 60fb8a8e93ca ("platform/chrome: wilco_ec: Allow wilco to be compiled in COMPILE_TEST") Signed-off-by: Stephen Boyd Signed-off-by: Enric Balletbo i Serra commit 42cd5ffe46c1037d5d9a253c72e71a024a7bfbef Author: Colin Ian King Date: Mon Feb 10 09:51:39 2020 +0000 usb: dwc3: debug: fix string position formatting mixup with ret and len Currently the string formatting is mixing up the offset of ret and len. Re-work the code to use just len, remove ret and use scnprintf instead of snprintf and len position accumulation where required. Remove the -ve return check since scnprintf never returns a failure -ve size. Also break overly long lines to clean up checkpatch warnings. Addresses-Coverity: ("Unused value") Fixes: 1381a5113caf ("usb: dwc3: debug: purge usage of strcat") Reviewed-by: Dan Carpenter Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi commit e4bfded56cf39b8d02733c1e6ef546b97961e18a Author: Sergey Organov Date: Wed Jan 29 14:21:46 2020 +0300 usb: gadget: serial: fix Tx stall after buffer overflow Symptom: application opens /dev/ttyGS0 and starts sending (writing) to it while either USB cable is not connected, or nobody listens on the other side of the cable. If driver circular buffer overflows before connection is established, no data will be written to the USB layer until/unless /dev/ttyGS0 is closed and re-opened again by the application (the latter besides having no means of being notified about the event of establishing of the connection.) Fix: on open and/or connect, kick Tx to flush circular buffer data to USB layer. Signed-off-by: Sergey Organov Reviewed-by: Michał Mirosław Signed-off-by: Felipe Balbi commit 43d565727a3a6fd24e37c7c2116475106af71806 Author: Lars-Peter Clausen Date: Thu Jan 16 15:29:01 2020 +0200 usb: gadget: ffs: ffs_aio_cancel(): Save/restore IRQ flags ffs_aio_cancel() can be called from both interrupt and thread context. Make sure that the current IRQ state is saved and restored by using spin_{un,}lock_irq{save,restore}(). Otherwise undefined behavior might occur. Acked-by: Michal Nazarewicz Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Signed-off-by: Felipe Balbi commit 9a0d6f7c0a83844baae1d6d85482863d2bf3b7a7 Author: Minas Harutyunyan Date: Tue Jan 21 14:17:07 2020 +0400 usb: dwc2: Fix SET/CLEAR_FEATURE and GET_STATUS flows SET/CLEAR_FEATURE for Remote Wakeup allowance not handled correctly. GET_STATUS handling provided not correct data on DATA Stage. Issue seen when gadget's dr_mode set to "otg" mode and connected to MacOS. Both are fixed and tested using USBCV Ch.9 tests. Signed-off-by: Minas Harutyunyan Fixes: fa389a6d7726 ("usb: dwc2: gadget: Add remote_wakeup_allowed flag") Tested-by: Jack Mitchell Cc: stable@vger.kernel.org Signed-off-by: Felipe Balbi commit 860ef6cd3f90b84a1832f8a6485c90c34d3b588b Author: Minas Harutyunyan Date: Tue Jan 21 14:24:04 2020 +0400 usb: dwc2: Fix in ISOC request length checking Moved ISOC request length checking from dwc2_hsotg_start_req() function to dwc2_hsotg_ep_queue(). Fixes: 4fca54aa58293 ("usb: gadget: s3c-hsotg: add multi count support") Signed-off-by: Minas Harutyunyan Signed-off-by: Felipe Balbi commit a2035411fa1d1206cea7d5dfe833e78481844a76 Author: Jack Pham Date: Thu Jan 30 19:10:36 2020 -0800 usb: gadget: composite: Support more than 500mA MaxPower USB 3.x SuperSpeed peripherals can draw up to 900mA of VBUS power when in configured state. However, if a configuration wanting to take advantage of this is added with MaxPower greater than 500 (currently possible if using a ConfigFS gadget) the composite driver fails to accommodate this for a couple reasons: - usb_gadget_vbus_draw() when called from set_config() and composite_resume() will be passed the MaxPower value without regard for the current connection speed, resulting in a violation for USB 2.0 since the max is 500mA. - the bMaxPower of the configuration descriptor would be incorrectly encoded, again if the connection speed is only at USB 2.0 or below, likely wrapping around U8_MAX since the 2mA multiplier corresponds to a maximum of 510mA. Fix these by adding checks against the current gadget->speed when the c->MaxPower value is used (set_config() and composite_resume()) and appropriately limit based on whether it is currently at a low-/full-/high- or super-speed connection. Because 900 is not divisible by 8, with the round-up division currently used in encode_bMaxPower() a MaxPower of 900mA will result in an encoded value of 0x71. When a host stack (including Linux and Windows) enumerates this on a single port root hub, it reads this value back and decodes (multiplies by 8) to get 904mA which is strictly greater than 900mA that is typically budgeted for that port, causing it to reject the configuration. Instead, we should be using the round-down behavior of normal integral division so that 900 / 8 -> 0x70 or 896mA to stay within range. And we might as well change it for the high/full/low case as well for consistency. N.B. USB 3.2 Gen N x 2 allows for up to 1500mA but there doesn't seem to be any any peripheral controller supported by Linux that does two lane operation, so for now keeping the clamp at 900 should be fine. Signed-off-by: Jack Pham Signed-off-by: Felipe Balbi commit c724417baf162bd3e035659e22cdf990cfb0d917 Author: Jack Pham Date: Thu Jan 30 19:10:35 2020 -0800 usb: gadget: composite: Fix bMaxPower for SuperSpeedPlus SuperSpeedPlus peripherals must report their bMaxPower of the configuration descriptor in units of 8mA as per the USB 3.2 specification. The current switch statement in encode_bMaxPower() only checks for USB_SPEED_SUPER but not USB_SPEED_SUPER_PLUS so the latter falls back to USB 2.0 encoding which uses 2mA units. Replace the switch with a simple if/else. Fixes: eae5820b852f ("usb: gadget: composite: Write SuperSpeedPlus config descriptors") Signed-off-by: Jack Pham Signed-off-by: Felipe Balbi commit 904967c60d87393a3708fed2324b684cdb79b1ee Author: John Keeping Date: Fri Jan 17 10:40:22 2020 +0000 usb: gadget: u_audio: Fix high-speed max packet size Prior to commit eb9fecb9e69b ("usb: gadget: f_uac2: split out audio core") the maximum packet size was calculated only from the high-speed descriptor but now we use the largest of the full-speed and high-speed descriptors. This is correct, but the full-speed value is likely to be higher than that for high-speed and this leads to submitting requests for OUT transfers (received by the gadget) which are larger than the endpoint's maximum packet size. These are rightly rejected by the gadget core. config_ep_by_speed() already sets up the correct maximum packet size for the enumerated speed in the usb_ep structure, so we can simply use this instead of the overall value that has been used to allocate buffers for requests. Note that the minimum period for ALSA is still set from the largest value, and this is unavoidable because it's possible to open the audio device before the gadget has been enumerated. Tested-by: Pavel Hofman Signed-off-by: John Keeping Signed-off-by: Felipe Balbi commit 5ee858975b13a9b40db00f456989a689fdbb296c Author: Anurag Kumar Vulisha Date: Mon Jan 27 19:30:46 2020 +0000 usb: dwc3: gadget: Check for IOC/LST bit in TRB->ctrl fields The current code in dwc3_gadget_ep_reclaim_completed_trb() will check for IOC/LST bit in the event->status and returns if IOC/LST bit is set. This logic doesn't work if multiple TRBs are queued per request and the IOC/LST bit is set on the last TRB of that request. Consider an example where a queued request has multiple queued TRBs and IOC/LST bit is set only for the last TRB. In this case, the core generates XferComplete/XferInProgress events only for the last TRB (since IOC/LST are set only for the last TRB). As per the logic in dwc3_gadget_ep_reclaim_completed_trb() event->status is checked for IOC/LST bit and returns on the first TRB. This leaves the remaining TRBs left unhandled. Similarly, if the gadget function enqueues an unaligned request with sglist already in it, it should fail the same way, since we will append another TRB to something that already uses more than one TRB. To aviod this, this patch changes the code to check for IOC/LST bits in TRB->ctrl instead. At a practical level, this patch resolves USB transfer stalls seen with adb on dwc3 based HiKey960 after functionfs gadget added scatter-gather support around v4.20. Cc: Felipe Balbi Cc: Yang Fei Cc: Thinh Nguyen Cc: Tejas Joglekar Cc: Andrzej Pietrasiewicz Cc: Jack Pham Cc: Todd Kjos Cc: Greg KH Cc: Linux USB List Cc: stable Tested-by: Tejas Joglekar Reviewed-by: Thinh Nguyen Signed-off-by: Anurag Kumar Vulisha [jstultz: forward ported to mainline, reworded commit log, reworked to only check trb->ctrl as suggested by Felipe] Signed-off-by: John Stultz Signed-off-by: Felipe Balbi commit 7276531d4036f5db2af15c8b6caa02e7741f5d80 Author: Tom Zanussi Date: Mon Feb 10 17:06:50 2020 -0600 tracing: Consolidate trace() functions Move the checking, buffer reserve and buffer commit code in synth_event_trace_start/end() into inline functions __synth_event_trace_start/end() so they can also be used by synth_event_trace() and synth_event_trace_array(), and then have all those functions use them. Also, change synth_event_trace_state.enabled to disabled so it only needs to be set if the event is disabled, which is not normally the case. Link: http://lkml.kernel.org/r/b1f3108d0f450e58192955a300e31d0405ab4149.1581374549.git.zanussi@kernel.org Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 0c62f6cd9ed320cb0ca39e33addf3a3da51b7328 Author: Tom Zanussi Date: Mon Feb 10 17:06:49 2020 -0600 tracing: Don't return -EINVAL when tracing soft disabled synth events There's no reason to return -EINVAL when tracing a synthetic event if it's soft disabled - treat it the same as if it were hard disabled and return normally. Have synth_event_trace() and synth_event_trace_array() just return normally, and have synth_event_trace_start set the trace state to disabled and return. Link: http://lkml.kernel.org/r/df5d02a1625aff97c9866506c5bada6a069982ba.1581374549.git.zanussi@kernel.org Fixes: 8dcc53ad956d2 ("tracing: Add synth_event_trace() and related functions") Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit d090409abbdd1fcbdfd6ed66612390ba8c814749 Author: Tom Zanussi Date: Mon Feb 10 17:06:48 2020 -0600 tracing: Add missing nest end to synth_event_trace_start() error case If the ring_buffer reserve in synth_event_trace_start() fails, the matching ring_buffer_nest_end() should be called in the error code, since nothing else will ever call it in this case. Link: http://lkml.kernel.org/r/20abc444b3eeff76425f895815380abe7aa53ff8.1581374549.git.zanussi@kernel.org Fixes: 8dcc53ad956d2 ("tracing: Add synth_event_trace() and related functions") Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 26d696192aa5f4fe9119d6d23f90ed535053abca Author: Sean Paul Date: Thu Jan 30 14:24:55 2020 -0500 drm/mediatek: Ensure the cursor plane is on top of other overlays Currently the cursor is placed on the first overlay plane, which means it will be at the bottom of the stack when the hw does the compositing with anything other than primary plane. Since mtk doesn't support plane zpos, change the cursor location to the top-most plane. Signed-off-by: Sean Paul Signed-off-by: CK Hu commit 318caac7c81cdf5806df30c3d72385659a5f0f53 Author: Evan Benn Date: Fri Feb 7 15:23:51 2020 +1100 drm/mediatek: Find the cursor plane instead of hard coding it The cursor and primary planes were hard coded. Now search for them for passing to drm_crtc_init_with_planes Signed-off-by: Evan Benn Reviewed-by: Sean Paul Signed-off-by: CK Hu commit 0a679e13ea30f85a1aef0669ee0c5a9fd7860b34 Merge: a5650acb5f33 0cd9d33ace33 Author: Linus Torvalds Date: Mon Feb 10 17:07:05 2020 -0800 Merge branch 'for-5.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fix from Tejun Heo: "I made a mistake while removing cgroup task list lazy init optimization making the root cgroup.procs show entries for the init_tasks. The zero entries doesn't cause critical failures but does make systemd print out warning messages during boot. Fix it by omitting init_tasks as they should be" * 'for-5.6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: init_tasks shouldn't be linked to the root cgroup commit c363eb48ada5cf732b3f489fab799fc881097842 Author: Jiri Benc Date: Thu Feb 6 09:40:52 2020 +0100 selftests: fix too long argument With some shells, the command construed for install of bpf selftests becomes too large due to long list of files: make[1]: execvp: /bin/sh: Argument list too long make[1]: *** [../lib.mk:73: install] Error 127 Currently, each of the file lists is replicated three times in the command: in the shell 'if' condition, in the 'echo' and in the 'rsync'. Reduce that by one instance by using make conditionals and separate the echo and rsync into two shell commands. (One would be inclined to just remove the '@' at the beginning of the rsync command and let 'make' echo it by itself; unfortunately, it appears that the '@' in the front of mkdir silences output also for the following commands.) Also, separate handling of each of the lists to its own shell command. The semantics of the makefile is unchanged before and after the patch. The ability of individual test directories to override INSTALL_RULE is retained. Reported-by: Yauheni Kaliuta Tested-by: Yauheni Kaliuta Signed-off-by: Jiri Benc Signed-off-by: Shuah Khan commit 9d235a558c689b0ecdd23bbd8beb2e0584f619ed Author: Jiri Benc Date: Thu Feb 6 09:40:00 2020 +0100 selftests: allow detection of build failures Commit 5f70bde26a48 ("selftests: fix build behaviour on targets' failures") added a logic to track failure of builds of individual targets. However, it does exactly the opposite of what a distro kernel needs: we create a RPM package with a selected set of selftests and we need the build to fail if build of any of the targets fail. Both use cases are valid. A distribution kernel is in control of what is included in the kernel and what is being built; any error needs to be flagged and acted upon. A CI system that tries to build as many tests as possible on the best effort basis is not really interested in a failure here and there. Support both use cases by introducing a FORCE_TARGETS variable. It is switched off by default to make life for CI systems easier, distributions can easily switch it on while building their packages. Reported-by: Yauheni Kaliuta Signed-off-by: Jiri Benc Reviewed-by: Cristian Marussi Tested-by: Cristian Marussi Signed-off-by: Shuah Khan commit b32694cd0724d4ceca2c62cc7c3d3a8d1ffa11fc Author: Nikita Sobolev Date: Fri Jan 31 18:25:23 2020 +0300 Kernel selftests: tpm2: check for tpm support tpm2 tests set fails if there is no /dev/tpm0 and /dev/tpmrm0 supported. Check if these files exist before run and mark test as skipped in case of absence. Signed-off-by: Nikita Sobolev Signed-off-by: Shuah Khan commit a098d9c82a0bb2f91e5cf6c780859bc00c15e1e4 Author: Steven Rostedt (VMware) Date: Thu Jan 30 21:45:27 2020 -0500 selftests/ftrace: Have pid filter test use instance flag While running the ftracetests, the pid filter test failed because the instance "foo" existed, and it was using it to rerun the test under a instance named foo. The collision caused the test to fail as the mkdir failed as the name already existed. As of commit b5b77be812de7 ("selftests: ftrace: Allow some tests to be run in a tracing instance") all a selftest needs to do to be tested in an instance is to set the "instance" flag. There's no reason a selftest needs to create an instance to run its test in an instance directly. Remove the open coded testing in an instance for the pid filter test and have it set the "instance" flag instead. Signed-off-by: Steven Rostedt (VMware) Acked-by: Masami Hiramatsu Signed-off-by: Shuah Khan commit 7714d469dcba572bbfb9cc47217fed7e7ddeb051 Author: Colin Ian King Date: Thu Jan 16 09:29:03 2020 +0000 selftests: fix spelling mistaked "chaigned" -> "chained" There is a spelling mistake in a literal string, fix it. Signed-off-by: Colin Ian King Reviewed-by: Aleksa Sarai Signed-off-by: Shuah Khan commit a5650acb5f33d8c7c26941136b2d3c46b8a243ea Merge: bb6d3fb354c5 39a706fbcf26 Author: Linus Torvalds Date: Mon Feb 10 16:51:35 2020 -0800 Merge tag 'selinux-pr-20200210' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull SELinux fixes from Paul Moore: "Two small fixes: one fixes a locking problem in the recently merged label translation code, the other fixes an embarrassing 'binderfs' / 'binder' filesystem name check" * tag 'selinux-pr-20200210' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: fix sidtab string cache locking selinux: fix typo in filesystem name commit e20d8e81a0e06c672e964c9f01100f07a64b1ce6 Author: Brendan Higgins Date: Fri Jan 31 16:01:02 2020 -0800 Documentation: kunit: fixed sphinx error in code block Fix a missing newline in a code block that was causing a warning: Documentation/dev-tools/kunit/usage.rst:553: WARNING: Error in "code-block" directive: maximum 1 argument(s) allowed, 3 supplied. .. code-block:: bash modprobe example-test Signed-off-by: Brendan Higgins Reviewed-by: Alan Maguire Signed-off-by: Shuah Khan commit 95ba79e89c107851bad4492ca23e9b9c399b8592 Author: Bartosz Golaszewski Date: Thu Jan 30 14:55:15 2020 +0100 MAINTAINERS: remove unnecessary ':' characters Commit e567cb3fef30 ("MAINTAINERS: add an entry for kfifo") added a new entry to MAINTAINERS. Following the example of the previous entry on the list I added a trailing ':' character at the end of the title line. This however results in rather strange looking output from scripts/get_maintainer.pl: $ ./scripts/get_maintainer.pl ./0001-kfifo.patch Stefani Seibold (maintainer:KFIFO:) linux-kernel@vger.kernel.org (open list) It turns out there are more entries like this. Fix the entire file by removing all trailing colons. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200130135515.30359-1-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 2bf0eb9b3b0d099b20b2c4736436b666d78b94d5 Author: Hongbo Yao Date: Mon Feb 10 09:14:41 2020 +0800 bpf: Make btf_check_func_type_match() static Fix the following sparse warning: kernel/bpf/btf.c:4131:5: warning: symbol 'btf_check_func_type_match' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Hongbo Yao Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200210011441.147102-1-yaohongbo@huawei.com commit f2e97dc126b712c0d21219ed0c42710006c1cf52 Author: John Fastabend Date: Sun Feb 9 21:44:37 2020 -0800 bpf: Selftests build error in sockmap_basic.c Fix following build error. We could push a tcp.h header into one of the include paths, but I think its easy enough to simply pull in the three defines we need here. If we end up using more of tcp.h at some point we can pull it in later. /home/john/git/bpf/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c: In function ‘connected_socket_v4’: /home/john/git/bpf/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c:20:11: error: ‘TCP_REPAIR_ON’ undeclared (first use in this function) repair = TCP_REPAIR_ON; ^ /home/john/git/bpf/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c:20:11: note: each undeclared identifier is reported only once for each function it appears in /home/john/git/bpf/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c:29:11: error: ‘TCP_REPAIR_OFF_NO_WP’ undeclared (first use in this function) repair = TCP_REPAIR_OFF_NO_WP; Then with fix, $ ./test_progs -n 44 #44/1 sockmap create_update_free:OK #44/2 sockhash create_update_free:OK #44 sockmap_basic:OK Fixes: 5d3919a953c3c ("selftests/bpf: Test freeing sockmap/sockhash with a socket in it") Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/158131347731.21414.12120493483848386652.stgit@john-Precision-5820-Tower commit 973780011106c534d69c4d25fe0749bd3a5f0b53 Author: Masami Hiramatsu Date: Sun Feb 9 22:05:13 2020 +0900 tools/bootconfig: Suppress non-error messages Suppress non-error messages when applying new bootconfig to initrd image. To enable it, replace printf for error message with pr_err() macro. This also adds a testcase for this fix. Link: http://lkml.kernel.org/r/158125351377.16911.13283712972275131160.stgit@devnote2 Reported-by: Michael Ellerman Tested-by: Michael Ellerman Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit a91e4f12ffc42fa019b5a66eaa8702f5e0f08a6a Author: Masami Hiramatsu Date: Fri Feb 7 23:28:17 2020 +0900 bootconfig: Allocate xbc_nodes array dynamically To reduce the large static array from kernel data, allocate xbc_nodes array dynamically only if the kernel loads a bootconfig. Note that this also add dummy memblock.h for user-spacae bootconfig tool. Link: http://lkml.kernel.org/r/158108569699.3187.6512834527603883707.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 3f4ef485be9d54040b695f32ec76d0f1ea50bbf3 Author: Nicolas Pitre Date: Tue Jan 28 12:50:33 2020 -0500 vt: fix scrollback flushing on background consoles Commit a6dbe4427559 ("vt: perform safe console erase in the right order") provided fixes to an earlier commit by gathering all console scrollback flushing operations in a function of its own. This includes the invocation of vc_sw->con_switch() as previously done through a update_screen() call. That commit failed to carry over the con_is_visible() conditional though, as well as cursor handling, which caused problems when "\e[3J" was written to a background console. One could argue for preserving the call to update_screen(). However this does far more than we need, and it is best to remove scrollback assumptions from it. Instead let's gather the minimum needed to actually perform scrollback flushing properly in that one place. While at it, let's document the vc_sw->con_switch() side effect being relied upon. Signed-off-by: Nicolas Pitre Reported-and-tested-by: Lukas Wunner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/nycvar.YSQ.7.76.2001281205560.1655@knanqh.ubzr Signed-off-by: Greg Kroah-Hartman commit ea3d147a474cb522bfdfe68f1f2557750dcf41dd Author: Brendan Higgins Date: Fri Jan 31 14:18:32 2020 +1030 fsi: aspeed: add unspecified HAS_IOMEM dependency Currently CONFIG_FSI_MASTER_ASPEED=y implicitly depends on CONFIG_HAS_IOMEM=y; consequently, on architectures without IOMEM we get the following build error: ld: drivers/fsi/fsi-master-aspeed.o: in function `fsi_master_aspeed_probe': drivers/fsi/fsi-master-aspeed.c:436: undefined reference to `devm_ioremap_resource' Fix the build error by adding the unspecified dependency. Fixes: 606397d67f41 ("fsi: Add ast2600 master driver") Cc: stable@vger.kernel.org Reported-by: Brendan Higgins Signed-off-by: Brendan Higgins Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20200131034832.294268-1-joel@jms.id.au Signed-off-by: Greg Kroah-Hartman commit 74835c7db0322b6eddf091b8b062f127b8999a0a Author: Greg Kroah-Hartman Date: Thu Feb 6 16:48:00 2020 +0100 COPYING: state that all contributions really are covered by this file Explicitly state that all contributions to the kernel source tree really are covered under this COPYING file in case someone thought otherwise. Lawyers love to be pedantic, even more so than software engineers at times, and this sentence makes them sleep easier. Reviewed-by: Thomas Gleixner Acked-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200206154800.GA3754085@kroah.com Signed-off-by: Greg Kroah-Hartman commit 4bc4f8128c48511b93e7285979a46cf0682cbb2f Author: James Morris Date: Thu Feb 6 10:08:34 2020 +1100 Documentation/process: Change Microsoft contact for embargoed hardware issues Update Microsoft contact from Sasha to James. Cc: Sasha Levin Signed-off-by: James Morris Link: https://lore.kernel.org/r/alpine.LRH.2.21.2002061006350.22130@namei.org Signed-off-by: Greg Kroah-Hartman commit 485d5b75980dd6c62e02522a9e8c09b5d5529e76 Author: Greg Kroah-Hartman Date: Wed Feb 5 12:25:51 2020 +0000 embargoed-hardware-issues: drop Amazon contact as the email address now bounces Peter's email address bounces, so remove him as the contact for Amazon. Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20200205122551.GA1185549@kroah.com Signed-off-by: Greg Kroah-Hartman commit ae7fce069bd7c8a54d920692f93f1d4eff2bff04 Author: Grant Likely Date: Wed Feb 5 00:16:27 2020 +0000 Documentation/process: Add Arm contact for embargoed HW issues Adding myself to list after getting voluntold Cc: Catalin Marinas Signed-off-by: Grant Likely Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20200205001627.27356-1-grant.likely@arm.com Signed-off-by: Greg Kroah-Hartman commit ae91c92565494a37c30ce9a691c87890f800d826 Author: Greg Kroah-Hartman Date: Fri Nov 22 11:44:53 2019 +0100 debugfs: remove return value of debugfs_create_regset32() No one checks the return value of debugfs_create_regset32(), as it's not needed, so make the return value void, so that no one tries to do so in the future. Link: https://lore.kernel.org/r/20191122104453.GA2017837@kroah.com Signed-off-by: Greg Kroah-Hartman commit 1f69a1273b3f204a9c00dc3bbdcc4afcd0787428 Author: Dmitry Osipenko Date: Sun Feb 9 19:44:15 2020 +0300 tty: serial: tegra: Handle RX transfer in PIO mode if DMA wasn't started It is possible to get an instant RX timeout or end-of-transfer interrupt before RX DMA was started, if transaction is less than 16 bytes. Transfer should be handled in PIO mode in this case because DMA can't handle it. This patch brings back the original behaviour of the driver that was changed by accident by a previous commit, it fixes occasional Bluetooth HW initialization failures which I started to notice recently. Fixes: d5e3fadb7012 ("tty: serial: tegra: Activate RX DMA transfer by request") Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200209164415.9632-1-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 04b5bfe3dc94e64d0590c54045815cb5183fb095 Author: Nicolas Ferre Date: Mon Feb 10 16:20:53 2020 +0100 tty/serial: atmel: manage shutdown in case of RS485 or ISO7816 mode In atmel_shutdown() we call atmel_stop_rx() and atmel_stop_tx() functions. Prevent the rx restart that is implemented in RS485 or ISO7816 modes when calling atmel_stop_tx() by using the atomic information tasklet_shutdown that is already in place for this purpose. Fixes: 98f2082c3ac4 ("tty/serial: atmel: enforce tasklet init and termination sequences") Signed-off-by: Nicolas Ferre Cc: stable Link: https://lore.kernel.org/r/20200210152053.8289-1-nicolas.ferre@microchip.com Signed-off-by: Greg Kroah-Hartman commit 0c5aae59270fb1f827acce182786094c9ccf598e Author: Johan Hovold Date: Mon Feb 10 15:57:30 2020 +0100 serdev: ttyport: restore client ops on deregistration The serdev tty-port controller driver should reset the tty-port client operations also on deregistration to avoid a NULL-pointer dereference in case the port is later re-registered as a normal tty device. Note that this can only happen with tty drivers such as 8250 which have statically allocated port structures that can end up being reused and where a later registration would not register a serdev controller (e.g. due to registration errors or if the devicetree has been changed in between). Specifically, this can be an issue for any statically defined ports that would be registered by 8250 core when an 8250 driver is being unbound. Fixes: bed35c6dfa6a ("serdev: add a tty port controller driver") Cc: stable # 4.11 Reported-by: Loic Poulain Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20200210145730.22762-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 87c5cbf71ecbb9e289d60a2df22eb686c70bf196 Author: Daniel Golle Date: Fri Feb 7 11:53:35 2020 +0200 serial: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE On AR934x this UART is usually not initialized by the bootloader as it is only used as a secondary serial port while the primary UART is a newly introduced NS16550-compatible. In order to make use of the ar933x-uart on AR934x without RTS/CTS hardware flow control, one needs to set the UART_CS_{RX,TX}_READY_ORIDE bits as other than on AR933x where this UART is used as primary/console, the bootloader on AR934x typically doesn't set those bits. Setting them explicitely on AR933x should not do any harm, so just set them unconditionally. Tested-by: Chuanhong Guo Signed-off-by: Daniel Golle Link: https://lore.kernel.org/r/20200207095335.GA179836@makrotopia.org Signed-off-by: Greg Kroah-Hartman commit 083bc0e1ce91e2a65a1aecdf8d2c5045e5d46c55 Author: Masahiro Yamada Date: Tue Feb 11 05:06:34 2020 +0900 kbuild: fix mismatch between .version and include/generated/compile.h Since commit 56d589361572 ("kbuild: do not create orphan built-in.a or obj-y objects"), scripts/link-vmlinux.sh does nothing when descending into init/. Once the version number becomes out of sync between .version and include/generated/compile.h, it is not self-healing. [How to reproduce] $ echo 100 > .version $ make You will see the number in the .version is always bigger than that in compile.h by one. After this, every time you run 'make', the vmlinux is re-linked even when none of source files is updated. Fixes: 56d589361572 ("kbuild: do not create orphan built-in.a or obj-y objects") Signed-off-by: Masahiro Yamada commit 9d1b38958b077f6c8d4bd196a115b643d7bd6717 Author: Masahiro Yamada Date: Tue Feb 11 01:18:52 2020 +0900 scripts/kallsyms: fix memory corruption caused by write over-run memcpy() writes one more byte than allocated. Fixes: 8d60526999aa ("scripts/kallsyms: change table to store (strcut sym_entry *)") Reported-by: youling257 Reported-by: Pavel Machek Signed-off-by: Masahiro Yamada Tested-by: Pavel Machek commit bc5f15be2c814ca1ff6bb4e62d5b275a8c88cbb1 Author: Kim Phillips Date: Mon Feb 10 10:31:47 2020 -0600 perf symbols: Convert symbol__is_idle() to use strlist Use the more optimized strlist implementation to do the idle function lookup. Signed-off-by: Kim Phillips Acked-by: Song Liu Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Cong Wang Cc: Davidlohr Bueso Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200210163147.25358-1-kim.phillips@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit 0e71459afcbbf69e92a65085c45515d3f3f02c31 Author: Kim Phillips Date: Fri Feb 7 17:06:12 2020 -0600 perf symbols: Update the list of kernel idle symbols The "acpi_idle_do_entry", "acpi_processor_ffh_cstate_enter", and "idle_cpu" symbols appear in 'perf top' output, at least on AMD systems. Add them to perf's idle_symbols list, so they don't dominate 'perf top' output. Signed-off-by: Kim Phillips Acked-by: Jiri Olsa Acked-by: Song Liu Cc: Alexander Shishkin Cc: Andi Kleen Cc: Cong Wang Cc: Davidlohr Bueso Cc: Jin Yao Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200207230613.26709-2-kim.phillips@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit 80cc7bb6c104d733bff60ddda09f19139c61507c Author: Kim Phillips Date: Fri Feb 7 17:06:11 2020 -0600 perf stat: Don't report a null stalled cycles per insn metric For data collected on machines with front end stalled cycles supported, such as found on modern AMD CPU families, commit 146540fb545b ("perf stat: Always separate stalled cycles per insn") introduces a new line in CSV output with a leading comma that upsets some automated scripts. Scripts have to use "-e ex_ret_instr" to work around this issue, after upgrading to a version of perf with that commit. We could add "if (have_frontend_stalled && !config->csv_sep)" to the not (total && avg) else clause, to emphasize that CSV users are usually scripts, and are written to do only what is needed, i.e., they wouldn't typically invoke "perf stat" without specifying an explicit event list. But - let alone CSV output - why should users now tolerate a constant 0-reporting extra line in regular terminal output?: BEFORE: $ sudo perf stat --all-cpus -einstructions,cycles -- sleep 1 Performance counter stats for 'system wide': 181,110,981 instructions # 0.58 insn per cycle # 0.00 stalled cycles per insn 309,876,469 cycles 1.002202582 seconds time elapsed The user would not like to see the now permanent: "0.00 stalled cycles per insn" line fixture, as it gives no useful information. So this patch removes the printing of the zeroed stalled cycles line altogether, almost reverting the very original commit fb4605ba47e7 ("perf stat: Check for frontend stalled for metrics"), which seems like it was written to normalize --metric-only column output of common Intel machines at the time: modern Intel machines have ceased to support the genericised frontend stalled metrics AFAICT. AFTER: $ sudo perf stat --all-cpus -einstructions,cycles -- sleep 1 Performance counter stats for 'system wide': 244,071,432 instructions # 0.69 insn per cycle 355,353,490 cycles 1.001862516 seconds time elapsed Output behaviour when stalled cycles is indeed measured is not affected (BEFORE == AFTER): $ sudo perf stat --all-cpus -einstructions,cycles,stalled-cycles-frontend -- sleep 1 Performance counter stats for 'system wide': 247,227,799 instructions # 0.63 insn per cycle # 0.26 stalled cycles per insn 394,745,636 cycles 63,194,485 stalled-cycles-frontend # 16.01% frontend cycles idle 1.002079770 seconds time elapsed Fixes: 146540fb545b ("perf stat: Always separate stalled cycles per insn") Signed-off-by: Kim Phillips Acked-by: Andi Kleen Acked-by: Jiri Olsa Acked-by: Song Liu Cc: Alexander Shishkin Cc: Cong Wang Cc: Davidlohr Bueso Cc: Jin Yao Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200207230613.26709-1-kim.phillips@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit 7f1b92a6a7f2b96a8647a488370b9a851433df77 Author: Johan Hovold Date: Mon Feb 3 16:38:30 2020 +0100 USB: core: clean up endpoint-descriptor parsing Use the new usb-device pointer instead of back-casting when accessing the struct usb_device when parsing endpoints. Note that this introduces two lines that are longer than 80 chars on purpose. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20200203153830.26394-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit bdd1b147b8026df0e4260b387026b251d888ed01 Author: Johan Hovold Date: Mon Feb 3 16:38:29 2020 +0100 USB: quirks: blacklist duplicate ep on Sound Devices USBPre2 This device has a broken vendor-specific altsetting for interface 1, where endpoint 0x85 is declared as an isochronous endpoint despite being used by interface 2 for audio capture. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 239 Miscellaneous Device bDeviceSubClass 2 bDeviceProtocol 1 Interface Association bMaxPacketSize0 64 idVendor 0x0926 idProduct 0x0202 bcdDevice 1.00 iManufacturer 1 Sound Devices iProduct 2 USBPre2 iSerial 3 [...] bNumConfigurations 1 [...] Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 3 bNumEndpoints 2 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0126 1x 294 bytes bInterval 1 [...] Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 1 Audio bInterfaceSubClass 2 Streaming bInterfaceProtocol 0 iInterface 0 AudioStreaming Interface Descriptor: bLength 7 bDescriptorType 36 bDescriptorSubtype 1 (AS_GENERAL) bTerminalLink 4 bDelay 1 frames wFormatTag 0x0001 PCM AudioStreaming Interface Descriptor: bLength 26 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bNrChannels 2 bSubframeSize 2 bBitResolution 16 bSamFreqType 6 Discrete tSamFreq[ 0] 8000 tSamFreq[ 1] 16000 tSamFreq[ 2] 24000 tSamFreq[ 3] 32000 tSamFreq[ 4] 44100 tSamFreq[ 5] 48000 Endpoint Descriptor: bLength 9 bDescriptorType 5 bEndpointAddress 0x85 EP 5 IN bmAttributes 5 Transfer Type Isochronous Synch Type Asynchronous Usage Type Data wMaxPacketSize 0x0126 1x 294 bytes bInterval 4 bRefresh 0 bSynchAddress 0 AudioStreaming Endpoint Descriptor: bLength 7 bDescriptorType 37 bDescriptorSubtype 1 (EP_GENERAL) bmAttributes 0x01 Sampling Frequency bLockDelayUnits 2 Decoded PCM samples wLockDelay 0x0000 Since commit 3e4f8e21c4f2 ("USB: core: fix check for duplicate endpoints") USB core ignores any duplicate endpoints found during descriptor parsing, but in this case we need to ignore the first instance in order to avoid breaking the audio capture interface. Fixes: 3e4f8e21c4f2 ("USB: core: fix check for duplicate endpoints") Cc: stable Reported-by: edes Tested-by: edes Link: https://lore.kernel.org/r/20200201105829.5682c887@acme7.acmenet Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20200203153830.26394-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 73f8bda9b5dc1c69df2bc55c0cbb24461a6391a9 Author: Johan Hovold Date: Mon Feb 3 16:38:28 2020 +0100 USB: core: add endpoint-blacklist quirk Add a new device quirk that can be used to blacklist endpoints. Since commit 3e4f8e21c4f2 ("USB: core: fix check for duplicate endpoints") USB core ignores any duplicate endpoints found during descriptor parsing. In order to handle devices where the first interfaces with duplicate endpoints are the ones that should have their endpoints ignored, we need to add a blacklist. Tested-by: edes Cc: stable Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20200203153830.26394-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit b32196e35bd7bbc8038db1aba1fbf022dc469b6a Author: Colin Ian King Date: Mon Feb 10 09:51:39 2020 +0000 usb: dwc3: debug: fix string position formatting mixup with ret and len Currently the string formatting is mixing up the offset of ret and len. Re-work the code to use just len, remove ret and use scnprintf instead of snprintf and len position accumulation where required. Remove the -ve return check since scnprintf never returns a failure -ve size. Also break overly long lines to clean up checkpatch warnings. Addresses-Coverity: ("Unused value") Fixes: 1381a5113caf ("usb: dwc3: debug: purge usage of strcat") Signed-off-by: Colin Ian King Reviewed-by: Dan Carpenter Cc: stable Link: https://lore.kernel.org/r/20200210095139.328711-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit a4a601948fc8d0a9661b83df03f5ee11e903efe6 Author: Dmitry Osipenko Date: Mon Feb 3 01:42:59 2020 +0300 usb: phy: tegra: Add clarifying comments about the shared registers Tools like Coccinelle may erroneously recommend to use the devm_platform_ioremap_resource() API for the registers mapping because these tools are not aware about the implementation details of the driver. Let's add a clarifying comments to the code, which should help to stop future attempts to break the driver. Signed-off-by: Dmitry Osipenko Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20200202224259.29187-1-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8099f58f1ecddf4f374f4828a3dff8397c7cbd74 Author: Alan Stern Date: Fri Jan 31 10:39:26 2020 -0500 USB: hub: Don't record a connect-change event during reset-resume Paul Zimmerman reports that his USB Bluetooth adapter sometimes crashes following system resume, when it receives a Get-Device-Descriptor request while it is busy doing something else. Such a request was added by commit a4f55d8b8c14 ("usb: hub: Check device descriptor before resusciation"). It gets sent when the hub driver's work thread checks whether a connect-change event on an enabled port really indicates a new device has been connected, as opposed to an old device momentarily disconnecting and then reconnecting (which can happen with xHCI host controllers, since they automatically enable connected ports). The same kind of thing occurs when a port's power session is lost during system suspend. When the system wakes up it sees a connect-change event on the port, and if the child device's persist_enabled flag was set then hub_activate() sets the device's reset_resume flag as well as the port's bit in hub->change_bits. The reset-resume code then takes responsibility for checking that the same device is still attached to the port, and it does this as part of the device's resume pathway. By the time the hub driver's work thread starts up again, the device has already been fully reinitialized and is busy doing its own thing. There's no need for the work thread to do the same check a second time, and in fact this unnecessary check is what caused the problem that Paul observed. Note that performing the unnecessary check is not actually a bug. Devices are supposed to be able to send descriptors back to the host even when they are busy doing something else. The underlying cause of Paul's problem lies in his Bluetooth adapter. Nevertheless, we shouldn't perform the same check twice in a row -- and as a nice side benefit, removing the extra check allows the Bluetooth adapter to work more reliably. The work thread performs its check when it sees that the port's bit is set in hub->change_bits. In this situation that bit is interpreted as though a connect-change event had occurred on the port _after_ the reset-resume, which is not what actually happened. One possible fix would be to make the reset-resume code clear the port's bit in hub->change_bits. But it seems simpler to just avoid setting the bit during hub_activate() in the first place. That's what this patch does. (Proving that the patch is correct when CONFIG_PM is disabled requires a little thought. In that setting hub_activate() will be called only for initialization and resets, since there won't be any resumes or reset-resumes. During initialization and hub resets the hub doesn't have any child devices, and so this code path never gets executed.) Reported-and-tested-by: Paul Zimmerman Signed-off-by: Alan Stern Link: https://marc.info/?t=157949360700001&r=1&w=2 CC: David Heinzelmann CC: Link: https://lore.kernel.org/r/Pine.LNX.4.44L0.2001311037460.1577-100000@iolanthe.rowland.org Signed-off-by: Greg Kroah-Hartman commit ca4b43c14cd88d28cfc6467d2fa075aad6818f1d Author: Peter Chen Date: Sat Feb 1 14:13:44 2020 +0800 usb: charger: assign specific number for enum value To work properly on every architectures and compilers, the enum value needs to be specific numbers. Suggested-by: Greg KH Signed-off-by: Peter Chen Link: https://lore.kernel.org/r/1580537624-10179-1-git-send-email-peter.chen@nxp.com Signed-off-by: Greg Kroah-Hartman commit 3e99862c05a9caa5a27969f41566b428696f5a9a Author: EJ Hsu Date: Thu Jan 30 01:25:06 2020 -0800 usb: uas: fix a plug & unplug racing When a uas disk is plugged into an external hub, uas_probe() will be called by the hub thread to do the probe. It will first create a SCSI host and then do the scan for this host. During the scan, it will probe the LUN using SCSI INQUERY command which will be packed in the URB and submitted to uas disk. There might be a chance that this external hub with uas disk attached is unplugged during the scan. In this case, uas driver will fail to submit the URB (due to the NOTATTACHED state of uas device) and try to put this SCSI command back to request queue waiting for next chance to run. In normal case, this cycle will terminate when hub thread gets disconnection event and calls into uas_disconnect() accordingly. But in this case, uas_disconnect() will not be called because hub thread of external hub gets stuck waiting for the completion of this SCSI command. A deadlock happened. In this fix, uas will call scsi_scan_host() asynchronously to avoid the blocking of hub thread. Signed-off-by: EJ Hsu Acked-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20200130092506.102760-1-ejh@nvidia.com Signed-off-by: Greg Kroah-Hartman commit dddb40e83038ec72533b1b5721831caf90224a09 Author: Andy Shevchenko Date: Tue Jan 28 16:29:56 2020 +0200 MAINTAINERS: Sort entries in database for USB TYPEC Run parse-maintainers.pl and choose USB TYPEC records. Fix them accordingly. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200128142956.39604-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1208f9e1d758c991b0a46a1bd60c616b906bbe27 Author: Hardik Gajjar Date: Thu Feb 6 12:49:23 2020 +0100 USB: hub: Fix the broken detection of USB3 device in SMSC hub Renesas R-Car H3ULCB + Kingfisher Infotainment Board is either not able to detect the USB3.0 mass storage devices or is detecting those as USB2.0 high speed devices. The explanation given by Renesas is that, due to a HW issue, the XHCI driver does not wake up after going to sleep on connecting a USB3.0 device. In order to mitigate that, disable the auto-suspend feature specifically for SMSC hubs from hub_probe() function, as a quirk. Renesas Kingfisher Infotainment Board has two USB3.0 ports (CN2) which are connected via USB5534B 4-port SuperSpeed/Hi-Speed, low-power, configurable hub controller. [1] SanDisk USB 3.0 device detected as USB-2.0 before the patch [ 74.036390] usb 5-1.1: new high-speed USB device number 4 using xhci-hcd [ 74.061598] usb 5-1.1: New USB device found, idVendor=0781, idProduct=5581, bcdDevice= 1.00 [ 74.069976] usb 5-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 74.077303] usb 5-1.1: Product: Ultra [ 74.080980] usb 5-1.1: Manufacturer: SanDisk [ 74.085263] usb 5-1.1: SerialNumber: 4C530001110208116550 [2] SanDisk USB 3.0 device detected as USB-3.0 after the patch [ 34.565078] usb 6-1.1: new SuperSpeed Gen 1 USB device number 3 using xhci-hcd [ 34.588719] usb 6-1.1: New USB device found, idVendor=0781, idProduct=5581, bcdDevice= 1.00 [ 34.597098] usb 6-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 34.604430] usb 6-1.1: Product: Ultra [ 34.608110] usb 6-1.1: Manufacturer: SanDisk [ 34.612397] usb 6-1.1: SerialNumber: 4C530001110208116550 Suggested-by: Alan Stern Signed-off-by: Hardik Gajjar Acked-by: Alan Stern Tested-by: Eugeniu Rosca Cc: stable Link: https://lore.kernel.org/r/1580989763-32291-1-git-send-email-hgajjar@de.adit-jv.com Signed-off-by: Greg Kroah-Hartman commit 9a4556bd8f23209c29f152e6a930b6a893b0fc81 Author: Larry Finger Date: Mon Feb 10 12:02:35 2020 -0600 staging: rtl8723bs: Remove unneeded goto statements In routines rtw_hostapd_ioctl() and wpa_supplicant_ioctl(), several error conditions involve setting a variable indicating the error, followed by a goto. The code following the target of that goto merely returns the value. It is simpler, therefore to return the error value immediately, and eliminate the got target. Signed-off-by: Larry Finger Cc: Pietro Oliva Link: https://lore.kernel.org/r/20200210180235.21691-7-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman commit e40c6d0f8763fe67585227d4afc97171db861b3b Author: Larry Finger Date: Mon Feb 10 12:02:34 2020 -0600 staging: rtl8188eu: Remove some unneeded goto statements In routines rtw_hostapd_ioctl() and wpa_supplicant_ioctl(), several error conditions involve setting a variable indicating the error, followed by a goto. The code following the target of that goto merely returns the value. It is simpler, therefore to return the error value immediately, and eliminate the got target. Signed-off-by: Larry Finger Cc: Pietro Oliva Link: https://lore.kernel.org/r/20200210180235.21691-6-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman commit 23954cb078febfc63a755301fe77e06bccdb4d2a Author: Larry Finger Date: Mon Feb 10 12:02:33 2020 -0600 staging: rtl8723bs: Fix potential overuse of kernel memory In routine wpa_supplicant_ioctl(), the user-controlled p->length is checked to be at least the size of struct ieee_param size, but the code does not detect the case where p->length is greater than the size of the struct, thus a malicious user could be wasting kernel memory. Fixes commit 554c0a3abf216 ("staging: Add rtl8723bs sdio wifi driver"). Reported by: Pietro Oliva Cc: Pietro Oliva Cc: Stable Fixes: 554c0a3abf216 ("staging: Add rtl8723bs sdio wifi driver"). Signed-off-by: Larry Finger Link: https://lore.kernel.org/r/20200210180235.21691-5-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman commit 4ddf8ab8d15ddbc52eefb44eb64e38466ce1f70f Author: Larry Finger Date: Mon Feb 10 12:02:32 2020 -0600 staging: rtl8188eu: Fix potential overuse of kernel memory In routine wpa_supplicant_ioctl(), the user-controlled p->length is checked to be at least the size of struct ieee_param size, but the code does not detect the case where p->length is greater than the size of the struct, thus a malicious user could be wasting kernel memory. Fixes commit a2c60d42d97c ("Add files for new driver - part 16"). Reported by: Pietro Oliva Cc: Pietro Oliva Cc: Stable Fixes commit a2c60d42d97c ("Add files for new driver - part 16"). Signed-off-by: Larry Finger Link: https://lore.kernel.org/r/20200210180235.21691-4-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman commit ac33597c0c0d1d819dccfe001bcd0acef7107e7c Author: Larry Finger Date: Mon Feb 10 12:02:31 2020 -0600 staging: rtl8723bs: Fix potential security hole In routine rtw_hostapd_ioctl(), the user-controlled p->length is assumed to be at least the size of struct ieee_param size, but this assumption is never checked. This could result in out-of-bounds read/write on kernel heap in case a p->length less than the size of struct ieee_param is specified by the user. If p->length is allowed to be greater than the size of the struct, then a malicious user could be wasting kernel memory. Fixes commit 554c0a3abf216 ("0taging: Add rtl8723bs sdio wifi driver"). Reported by: Pietro Oliva Cc: Pietro Oliva Cc: Stable Fixes 554c0a3abf216 ("0taging: Add rtl8723bs sdio wifi driver"). Signed-off-by: Larry Finger Link: https://lore.kernel.org/r/20200210180235.21691-3-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman commit 499c405b2b80bb3a04425ba3541d20305e014d3e Author: Larry Finger Date: Mon Feb 10 12:02:30 2020 -0600 staging: rtl8188eu: Fix potential security hole In routine rtw_hostapd_ioctl(), the user-controlled p->length is assumed to be at least the size of struct ieee_param size, but this assumption is never checked. This could result in out-of-bounds read/write on kernel heap in case a p->length less than the size of struct ieee_param is specified by the user. If p->length is allowed to be greater than the size of the struct, then a malicious user could be wasting kernel memory. Fixes commit a2c60d42d97c ("Add files for new driver - part 16"). Reported by: Pietro Oliva Cc: Pietro Oliva Cc: Stable Fixes: a2c60d42d97c ("staging: r8188eu: Add files for new driver - part 16") Signed-off-by: Larry Finger Link: https://lore.kernel.org/r/20200210180235.21691-2-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman commit 0ca2c0319a7bce0e152b51b866979d62dc261e48 Author: John Garry Date: Tue Feb 11 00:50:17 2020 +0800 perf/smmuv3: Use platform_get_irq_optional() for wired interrupt Even though a SMMUv3 PMCG implementation may use an MSI as the form of interrupt source, the kernel would still complain that it does not find the wired (GSIV) interrupt in this case: root@(none)$ dmesg | grep arm-smmu-v3-pmcg | grep "not found" [ 59.237219] arm-smmu-v3-pmcg arm-smmu-v3-pmcg.8.auto: IRQ index 0 not found [ 59.322841] arm-smmu-v3-pmcg arm-smmu-v3-pmcg.9.auto: IRQ index 0 not found [ 59.422155] arm-smmu-v3-pmcg arm-smmu-v3-pmcg.10.auto: IRQ index 0 not found [ 59.539014] arm-smmu-v3-pmcg arm-smmu-v3-pmcg.11.auto: IRQ index 0 not found [ 59.640329] arm-smmu-v3-pmcg arm-smmu-v3-pmcg.12.auto: IRQ index 0 not found [ 59.743112] arm-smmu-v3-pmcg arm-smmu-v3-pmcg.13.auto: IRQ index 0 not found [ 59.880577] arm-smmu-v3-pmcg arm-smmu-v3-pmcg.14.auto: IRQ index 0 not found [ 60.017528] arm-smmu-v3-pmcg arm-smmu-v3-pmcg.15.auto: IRQ index 0 not found Use platform_get_irq_optional() to silence the warning. If neither interrupt source is found, then the driver will still warn that IRQ setup errored and the probe will fail. Reviewed-by: Robin Murphy Signed-off-by: John Garry Signed-off-by: Will Deacon commit 557d0841bc73fbd0da643b6647781bb1f790a84b Author: Wolfram Sang Date: Mon Feb 10 09:57:23 2020 -0800 Input: psmouse - switch to using i2c_new_scanned_device() Move from the deprecated i2c_new_probed_device() to the new i2c_new_scanned_device(). Make use of the new ERRPTR if suitable. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20200210165902.5250-1-wsa+renesas@sang-engineering.com Signed-off-by: Dmitry Torokhov commit d0c5e7d4f5e5b76eeb53d098157d5b1f62ebb407 Author: Luca Weiss Date: Sun Feb 9 14:43:30 2020 -0800 Input: ili210x - add ili2120 support This adds support for the Ilitek ili2120 touchscreen found in the Fairphone 2 smartphone. Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20200209151904.661210-1-luca@z3ntu.xyz Signed-off-by: Dmitry Torokhov commit fbd1ec000213c8b457dd4fb15b6de9ba02ec5482 Author: Luca Weiss Date: Sun Feb 9 14:42:36 2020 -0800 Input: ili210x - fix return value of is_visible function The is_visible function expects the permissions associated with an attribute of the sysfs group or 0 if an attribute is not visible. Change the code to return the attribute permissions when the attribute should be visible which resolves the warning: Attribute calibrate: Invalid permissions 01 Fixes: cc12ba1872c6 ("Input: ili210x - optionally show calibrate sysfs attribute") Signed-off-by: Luca Weiss Reviewed-by: Sven Van Asbroeck Link: https://lore.kernel.org/r/20200209145628.649409-1-luca@z3ntu.xyz Signed-off-by: Dmitry Torokhov commit f61872bb58a1cd8f0422aab1940eeee8be579d38 Author: Steven Rostedt (VMware) Date: Fri Feb 7 19:07:37 2020 -0500 bootconfig: Use parse_args() to find bootconfig and '--' The current implementation does a naive search of "bootconfig" on the kernel command line. But this could find "bootconfig" that is part of another option in quotes (although highly unlikely). But it also needs to find '--' on the kernel command line to know if it should append a '--' or not when a bootconfig in the initrd file has an "init" section. The check uses the naive strstr() to find to see if it exists. But this can return a false positive if it exists in an option and then the "init" section in the initrd will not be appended properly. Using parse_args() to find both of these will solve both of these problems. Link: https://lore.kernel.org/r/202002070954.C18E7F58B@keescook Fixes: 7495e0926fdf3 ("bootconfig: Only load bootconfig if "bootconfig" is on the kernel cmdline") Fixes: 1319916209ce8 ("bootconfig: init: Allow admin to use bootconfig for init command line") Reported-by: Kees Cook Reviewed-by: Kees Cook Acked-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 10f129cb59cf6b4aee419ce4b1325fc532d975fb Author: Gustavo A. R. Silva Date: Wed Feb 5 16:34:04 2020 -0600 tracing/kprobe: Fix uninitialized variable bug There is a potential execution path in which variable *ret* is returned without being properly initialized, previously. Fix this by initializing variable *ret* to 0. Link: http://lkml.kernel.org/r/20200205223404.GA3379@embeddedor Addresses-Coverity-ID: 1491142 ("Uninitialized scalar variable") Fixes: 2a588dd1d5d6 ("tracing: Add kprobe event command generation functions") Reviewed-by: Tom Zanussi Acked-by: Masami Hiramatsu Signed-off-by: Gustavo A. R. Silva Signed-off-by: Steven Rostedt (VMware) commit 26445f98ead38b90423a2deffce2caa3b97a3d78 Author: Masami Hiramatsu Date: Thu Feb 6 20:14:53 2020 +0900 bootconfig: Remove unneeded CONFIG_LIBXBC Since there is no user except CONFIG_BOOT_CONFIG and no plan to use it from other functions, CONFIG_LIBXBC can be removed and we can use CONFIG_BOOT_CONFIG directly. Link: http://lkml.kernel.org/r/158098769281.939.16293492056419481105.stgit@devnote2 Suggested-by: Geert Uytterhoeven Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 17d25ae7f10e247bcea1f66268f746576cf9c86d Author: Masami Hiramatsu Date: Fri Feb 7 22:55:01 2020 +0900 tools/bootconfig: Fix wrong __VA_ARGS__ usage Since printk() wrapper macro uses __VA_ARGS__ without "##" prefix, it causes a build error if there is no variable arguments (e.g. only fmt is specified.) To fix this error, use ##__VA_ARGS__ instead of __VAR_ARGS__. Link: http://lkml.kernel.org/r/158108370130.2758.10893830923800978011.stgit@devnote2 Fixes: 950313ebf79c ("tools: bootconfig: Add bootconfig command") Reported-by: Michael Ellerman Tested-by: Michael Ellerman Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit b7db58105b80fa9232719c8329b995b3addfab55 Author: Dan Carpenter Date: Wed Feb 5 15:32:17 2020 +0300 staging: greybus: use after free in gb_audio_manager_remove_all() When we call kobject_put() and it's the last reference to the kobject then it calls gb_audio_module_release() and frees module. We dereference "module" on the next line which is a use after free. Fixes: c77f85bbc91a ("greybus: audio: Fix incorrect counting of 'ida'") Signed-off-by: Dan Carpenter Acked-by: Viresh Kumar Reviewed-by: Vaibhav Agarwal Link: https://lore.kernel.org/r/20200205123217.jreendkyxulqsool@kili.mountain Signed-off-by: Greg Kroah-Hartman commit c3709b3285009e0c1448510b9460e96146cd5c9a Author: Alistair Delva Date: Sun Feb 2 20:22:54 2020 -0800 staging: android: Delete the 'vsoc' driver The 'vsoc' driver was required for an early iteration of the Android 'cuttlefish' virtual platform, but this platform has been wholly converted to use virtio drivers instead. Delete this old driver. Cc: Greg Kroah-Hartman Cc: Joel Fernandes Cc: Greg Hartman Cc: kernel-team@android.com Cc: devel@driverdev.osuosl.org Signed-off-by: Alistair Delva Reviewed-by: Joel Fernandes (Google) Link: https://lore.kernel.org/r/20200203042254.80360-1-adelva@google.com Signed-off-by: Greg Kroah-Hartman commit 8ae9a588ca35eb9c32dc03299c5e1f4a1e9a9617 Author: Colin Ian King Date: Sun Jan 26 22:05:49 2020 +0000 staging: rtl8723bs: fix copy of overlapping memory Currently the rtw_sprintf prints the contents of thread_name onto thread_name and this can lead to a potential copy of a string over itself. Avoid this by printing the literal string RTWHALXT instread of the contents of thread_name. Addresses-Coverity: ("copy of overlapping memory") Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Colin Ian King Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20200126220549.9849-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 6d67b0290b4b84c477e6a2fc6e005e174d3c7786 Author: Suren Baghdasaryan Date: Mon Jan 27 15:56:16 2020 -0800 staging: android: ashmem: Disallow ashmem memory from being remapped When ashmem file is mmapped, the resulting vma->vm_file points to the backing shmem file with the generic fops that do not check ashmem permissions like fops of ashmem do. If an mremap is done on the ashmem region, then the permission checks will be skipped. Fix that by disallowing mapping operation on the backing shmem file. Reported-by: Jann Horn Signed-off-by: Suren Baghdasaryan Cc: stable # 4.4,4.9,4.14,4.18,5.4 Signed-off-by: Todd Kjos Reviewed-by: Joel Fernandes (Google) Link: https://lore.kernel.org/r/20200127235616.48920-1-tkjos@google.com Signed-off-by: Greg Kroah-Hartman commit 93134df520f23f4e9998c425b8987edca7016817 Author: Malcolm Priestley Date: Tue Feb 4 19:34:02 2020 +0000 staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi. bb_pre_ed_rssi is an u8 rx_dm always returns negative signed values add minus operator to always yield positive. fixes issue where rx sensitivity is always set to maximum because the unsigned numbers were always greater then 100. Fixes: 63b9907f58f1 ("staging: vt6656: mac80211 conversion: create rx function.") Cc: stable Signed-off-by: Malcolm Priestley Link: https://lore.kernel.org/r/aceac98c-6e69-3ce1-dfec-2bf27b980221@gmail.com Signed-off-by: Greg Kroah-Hartman commit cf5b4059ba7197d6cef9c0e024979d178ed8c8ec Author: Trond Myklebust Date: Wed Feb 5 09:01:53 2020 -0500 NFSv4: Fix races between open and dentry revalidation We want to make sure that we revalidate the dentry if and only if we've done an OPEN by filename. In order to avoid races with remote changes to the directory on the server, we want to save the verifier before calling OPEN. The exception is if the server returned a delegation with our OPEN, as we then know that the filename can't have changed on the server. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit a1147b8281bda99bda99892233e1900329a9cbf1 Author: Trond Myklebust Date: Wed Feb 5 09:01:52 2020 -0500 NFS: Fix up directory verifier races In order to avoid having our dentry revalidation race with an update of the directory on the server, we need to store the verifier before the RPC calls to LOOKUP and READDIR. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Tested-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit a3ae87dce3a5abe0b57c811bab02b2564b574106 Author: Mathias Nyman Date: Mon Feb 10 15:45:53 2020 +0200 xhci: apply XHCI_PME_STUCK_QUIRK to Intel Comet Lake platforms Intel Comet Lake based platform require the XHCI_PME_STUCK_QUIRK quirk as well. Without this xHC can not enter D3 in runtime suspend. Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200210134553.9144-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 024d411e9c5d49eb96c825af52a3ce2682895676 Author: Mathias Nyman Date: Mon Feb 10 15:45:52 2020 +0200 xhci: fix runtime pm enabling for quirky Intel hosts Intel hosts that need the XHCI_PME_STUCK_QUIRK flag should enable runtime pm by calling xhci_pme_acpi_rtd3_enable() before usb_hcd_pci_probe() calls pci_dev_run_wake(). Otherwise usage count for the device won't be decreased, and runtime suspend is prevented. usb_hcd_pci_probe() only decreases the usage count if device can generate run-time wake-up events, i.e. when pci_dev_run_wake() returns true. This issue was exposed by pci_dev_run_wake() change in commit 8feaec33b986 ("PCI / PM: Always check PME wakeup capability for runtime wakeup support") and should be backported to kernels with that change Cc: # 4.13+ Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200210134553.9144-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit fc57313d1017dd6b6f37a94e88daa8df54368ecc Author: Mathias Nyman Date: Mon Feb 10 15:45:51 2020 +0200 xhci: Fix memory leak when caching protocol extended capability PSI tables xhci driver assumed that xHC controllers have at most one custom supported speed table (PSI) for all usb 3.x ports. Memory was allocated for one PSI table under the xhci hub structure. Turns out this is not the case, some controllers have a separate "supported protocol capability" entry with a PSI table for each port. This means each usb3 roothub port can in theory support different custom speeds. To solve this, cache all supported protocol capabilities with their PSI tables in an array, and add pointers to the xhci port structure so that every port points to its capability entry in the array. When creating the SuperSpeedPlus USB Device Capability BOS descriptor for the xhci USB 3.1 roothub we for now will use only data from the first USB 3.1 capable protocol capability entry in the array. This could be improved later, this patch focuses resolving the memory leak. Reported-by: Paul Menzel Reported-by: Sajja Venkateswara Rao Fixes: 47189098f8be ("xhci: parse xhci protocol speed ID list for usb 3.1 usage") Cc: stable # v4.4+ Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200210134553.9144-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f148b9f402ef002b57bcff3964d45abc8ffb6c3f Author: Mathias Nyman Date: Mon Feb 10 15:45:50 2020 +0200 xhci: Force Maximum Packet size for Full-speed bulk devices to valid range. A Full-speed bulk USB audio device (DJ-Tech CTRL) with a invalid Maximum Packet Size of 4 causes a xHC "Parameter Error" at enumeration. This is because valid Maximum packet sizes for Full-speed bulk endpoints are 8, 16, 32 and 64 bytes. Hosts are not required to support other values than these. See usb 2 specs section 5.8.3 for details. The device starts working after forcing the maximum packet size to 8. This is most likely the case with other devices as well, so force the maximum packet size to a valid range. Cc: stable@vger.kernel.org Reported-by: Rene D Obermueller Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200210134553.9144-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3f6166aaf19902f2f3124b5426405e292e8974dd Author: Petr Pavlu Date: Mon Feb 10 10:38:14 2020 +0100 cifs: fix mount option display for sec=krb5i Fix display for sec=krb5i which was wrongly interleaved by cruid, resulting in string "sec=krb5,cruid=<...>i" instead of "sec=krb5i,cruid=<...>". Fixes: 96281b9e46eb ("smb3: for kerberos mounts display the credential uid used") Signed-off-by: Petr Pavlu Signed-off-by: Steve French commit af7aae1b1f6306a1cda4da393e920a1334eaa3d4 Author: Kai Vehmanen Date: Thu Feb 6 22:02:23 2020 +0200 ASoC: SOF: Intel: hda: move i915 init earlier To be compliant with i915 display driver requirements, i915 power-up must be done before any HDA communication takes place, including parsing the bus capabilities. Otherwise the initial codec probe may fail. Move i915 initialization earlier in the SOF HDA sequence. This sequence is now aligned with the snd-hda-intel driver where the display_power() call is before snd_hdac_bus_parse_capabilities() and rest of the capability parsing. Also remove unnecessary ifdef around hda_codec_i915_init(). There's a dummy implementation provided if CONFIG_SND_SOC_SOF_HDA is not enabled. Signed-off-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200206200223.7715-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 816938b272b0ac0203e25ce50483bd284ea4a2db Author: Kai Vehmanen Date: Thu Feb 6 22:02:22 2020 +0200 ASoC: SOF: Intel: hda: fix ordering bug in resume flow When HDA controller is resumed from suspend, i915 HDMI/DP codec requires that following order of actions is kept: - i915 display power up and configuration of link params - hda link reset and setup Current SOF HDA code delegates display codec power control to the codec driver. This works most of the time, but in runtime PM sequences, the above constraint may be violated. On platforms where BIOS values for HDA link parameters do not match hardware reset defaults, this may lead to errors in HDA verb transactions after resume. Fix the issue by explicitly powering the display codec in the HDA controller resume/suspend calls, thus ensuring correct ordering. Special handling is needed for the D0i3 flow, where display power must be turned off even though DSP is left powered. Now that we have more invocations of the display power helper functions, the conditional checks surrounding each call have been moved inside hda_codec_i915_display_power(). The two special cases of display powering at initial probe are handled separately. The intent is to avoid powering the display whenever no display codecs are used. Note that early powering of display was removed in commit 687ae9e287b3 ("ASoC: intel: skl: Fix display power regression"). This change was also copied to the SOF driver. No failures have resulted as hardware default values for link parameters have worked out of the box. However with recent i915 driver changes like done in commit 87c1694533c9 ("drm/i915: save AUD_FREQ_CNTRL state at audio domain suspend"), this does not hold anymore and errors are hit. Cc: Takashi Iwai Signed-off-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200206200223.7715-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 43bcb1c0507858cdc95e425017dcc33f8105df39 Author: Kai Vehmanen Date: Thu Feb 6 22:02:21 2020 +0200 ALSA: hda: do not override bus codec_mask in link_get() snd_hdac_ext_bus_link_get() does not work correctly in case there are multiple codecs on the bus. It unconditionally resets the bus->codec_mask value. As per documentation in hdaudio.h and existing use in client code, this field should be used to store bit flag of detected codecs on the bus. By overwriting value of the codec_mask, information on all detected codecs is lost. No current user of hdac is impacted, but use of bus->codec_mask is planned in future patches for SOF. Signed-off-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200206200223.7715-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 00516d13d4cfa56ce39da144db2dbf08b09b9357 Author: Bjørn Mork Date: Sat Feb 8 16:55:04 2020 +0100 qmi_wwan: unconditionally reject 2 ep interfaces We have been using the fact that the QMI and DIAG functions usually are the only ones with class/subclass/protocol being ff/ff/ff on Quectel modems. This has allowed us to match the QMI function without knowing the exact interface number, which can vary depending on firmware configuration. The ability to silently reject the DIAG function, which is usually handled by the option driver, is important for this method to work. This is done based on the knowledge that it has exactly 2 bulk endpoints. QMI function control interfaces will have either 3 or 1 endpoint. This rule is universal so the quirk condition can be removed. The fixed layouts known from the Gobi1k and Gobi2k modems have been gradually replaced by more dynamic layouts, and many vendors now use configurable layouts without changing device IDs. Renaming the class/subclass/protocol matching macro makes it more obvious that this is now not Quectel specific anymore. Cc: Kristian Evensen Cc: Aleksander Morgado Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller commit 5d1fbdf238b5175579a34ac1c21cd172b65e9ca7 Author: Andrew Lunn Date: Sat Feb 8 16:54:32 2020 +0100 net: dsa: mv88e6xxx: Prevent truncation of longer interrupt names When adding support for unique interrupt names, after testing on a few devices, it was assumed 32 characters would be sufficient. This assumption turned out to be incorrect, ZII RDU2 for example uses a device base name of mv88e6xxx-30be0000.ethernet-1:0, leaving no space for post fixes such as -g1-atu-prob and -watchdog. The names then become identical, defeating the point of the patch. Increase the length of the string to 64 charactoes. Reported-by: Chris Healy Fixes: 3095383a8ab4 ("net: dsa: mv88e6xxx: Unique IRQ name") Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 88bf54603f6f2c137dfee1abf6436ceac3528d2d Author: Bjørn Mork Date: Sat Feb 8 15:50:36 2020 +0100 qmi_wwan: re-add DW5821e pre-production variant Commit f25e1392fdb5 removed the support for the pre-production variant of the Dell DW5821e to avoid probing another USB interface unnecessarily. However, the pre-production samples are found in the wild, and this lack of support is causing problems for users of such samples. It is therefore necessary to support both variants. Matching on both interfaces 0 and 1 is not expected to cause any problem with either variant, as only the QMI function will be probed successfully on either. Interface 1 will be rejected based on the HID class for the production variant: T: Bus=01 Lev=03 Prnt=04 Port=00 Cnt=01 Dev#= 16 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 2 P: Vendor=413c ProdID=81d7 Rev=03.18 S: Manufacturer=DELL S: Product=DW5821e Snapdragon X20 LTE S: SerialNumber=0123456789ABCDEF C: #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan I: If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option And interface 0 will be rejected based on too few endpoints for the pre-production variant: T: Bus=01 Lev=02 Prnt=02 Port=03 Cnt=03 Dev#= 7 Spd=480 MxCh= 0 D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 2 P: Vendor=413c ProdID=81d7 Rev= 3.18 S: Manufacturer=DELL S: Product=DW5821e Snapdragon X20 LTE S: SerialNumber=0123456789ABCDEF C: #Ifs= 5 Cfg#= 1 Atr=a0 MxPwr=500mA I: If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver= I: If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan I: If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option I: If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option Fixes: f25e1392fdb5 ("qmi_wwan: fix interface number for DW5821e production firmware") Link: https://whrl.pl/Rf0vNk Reported-by: Lars Melin Cc: Aleksander Morgado Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller commit a924eae75106258c0797706a0578c5af499c9ff5 Author: Yash Shah Date: Tue Jan 28 10:54:21 2020 +0530 gpio: sifive: fix static checker warning Typcasting "irq_state" leads to the below static checker warning: The fix is to declare "irq_state" as unsigned long instead of u32. drivers/gpio/gpio-sifive.c:97 sifive_gpio_irq_enable() warn: passing casted pointer '&chip->irq_state' to 'assign_bit()' 32 vs 64. Fixes: 96868dce644d ("gpio/sifive: Add GPIO driver for SiFive SoCs") Reported-by: Dan Carpenter Signed-off-by: Yash Shah Link: https://lore.kernel.org/r/1580189061-14091-1-git-send-email-yash.shah@sifive.com Reviewed-by: Marc Zyngier Signed-off-by: Linus Walleij commit 1b5af53781654706e1a4ee479274f8a3e3f74c01 Author: Chris Wilson Date: Wed Jan 15 12:25:09 2020 +0000 drm/i915/gt: Use the BIT when checking the flags, not the index In converting over to using set_bit()/test_bit(), when manually inspecting the rq->fence.flags, we need to use BIT(). Fixes: e1c31fb5dde3 ("drm/i915: Merge i915_request.flags with i915_request.fence.flags") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Matthew Auld Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200115122509.2673075-1-chris@chris-wilson.co.uk (cherry picked from commit 72ff2b8d5f2dcb09bfa37b902c23311eec426496) Signed-off-by: Jani Nikula commit 1fdea0cb0dba0d42ffcfb619b349c1a2afa2492e Author: Chris Wilson Date: Tue Jan 14 16:00:30 2020 +0000 drm/i915/selftests: Add a mock i915_vma to the mock_ring Add a i915_vma to the mock_engine/mock_ring so that the core code can always assume the presence of ring->vma. Fixes: 8ccfc20a7d56 ("drm/i915/gt: Mark ring->vma as active while pinned") Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200114160030.2468927-1-chris@chris-wilson.co.uk (cherry picked from commit b63b4feaef7363d2cf46dd76bb6e87e060b2b0de) Signed-off-by: Jani Nikula commit c631cc8f11246f1a8075a203d55ff282ee9416db Author: Ville Syrjälä Date: Fri Jan 10 20:32:23 2020 +0200 drm/i915: Make a copy of the ggtt view for slave plane intel_prepare_plane_fb() will always pin plane_state->hw.fb whenever it is present. We copy that from the master plane to the slave plane, but we fail to copy the corresponding ggtt view. Thus when it comes time to pin the slave plane's fb we use some stale ggtt view left over from the last time the plane was used as a non-slave plane. If that previous use involved 90/270 degree rotation or remapping we'll try to shuffle the pages of the new fb around accordingingly. However the new fb may be backed by a bo with less pages than what the ggtt view rotation/remapped info requires, and so we we trip a GEM_BUG(). Steps to reproduce on icl: 1. plane 1: whatever plane 6: largish !NV12 fb + 90 degree rotation 2. plane 1: smallish NV12 fb plane 6: make invisible so it gets slaved to plane 1 3. GEM_BUG() Cc: Chris Wilson Cc: Maarten Lankhorst Closes: https://gitlab.freedesktop.org/drm/intel/issues/951 Fixes: 1f594b209fe1 ("drm/i915: Remove special case slave handling during hw programming, v3.") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200110183228.8199-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson (cherry picked from commit 103605e0d1e77cfb5d0f5a9e8aba7d97f1b49339) Signed-off-by: Jani Nikula commit 01c1b2cbf05224495eec2cf54166934f123bad61 Author: Chris Wilson Date: Mon Jan 13 15:45:55 2020 +0000 drm/i915/gem: Take local vma references for the parser Take and hold a reference to each of the vma (and their objects) as we process them with the cmdparser. This stops them being freed during the work if the GEM execbuf is interrupted and the request we expected to keep the objects alive is incomplete. Fixes: 686c7c35abc2 ("drm/i915/gem: Asynchronous cmdparser") Closes: https://gitlab.freedesktop.org/drm/intel/issues/970 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200113154555.1909639-1-chris@chris-wilson.co.uk (cherry picked from commit 36c8e356a76e147f0b631fd29838147c01b50d04) Signed-off-by: Jani Nikula commit 88a9c66d998b1d2dac412fcd458c5d17d70513c8 Author: Chris Wilson Date: Tue Jan 14 10:56:47 2020 +0000 drm/i915/pmu: Correct the rc6 offset upon enabling The rc6 residency starts ticking from 0 from BIOS POST, but the kernel starts measuring the time from its boot. If we start measuruing I915_PMU_RC6_RESIDENCY while the GT is idle, we start our sampling from 0 and then upon first activity (park/unpark) add in all the rc6 residency since boot. After the first park with the sampler engaged, the sleep/active counters are aligned. v2: With a wakeref to be sure Closes: https://gitlab.freedesktop.org/drm/intel/issues/973 Fixes: df6a42053513 ("drm/i915/pmu: Ensure monotonic rc6") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200114105648.2172026-1-chris@chris-wilson.co.uk (cherry picked from commit f4e9894b6952a2819937f363cd42e7cd7894a1e4) Signed-off-by: Jani Nikula commit 2d5a2f913b658a7ae984773a63318ed4daadf4af Author: Stephen Boyd Date: Tue Jan 21 10:37:48 2020 -0800 spmi: pmic-arb: Set lockdep class for hierarchical irq domains I see the following lockdep splat in the qcom pinctrl driver when attempting to suspend the device. WARNING: possible recursive locking detected 5.4.11 #3 Tainted: G W -------------------------------------------- cat/3074 is trying to acquire lock: ffffff81f49804c0 (&irq_desc_lock_class){-.-.}, at: __irq_get_desc_lock+0x64/0x94 but task is already holding lock: ffffff81f1cc10c0 (&irq_desc_lock_class){-.-.}, at: __irq_get_desc_lock+0x64/0x94 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&irq_desc_lock_class); lock(&irq_desc_lock_class); *** DEADLOCK *** May be due to missing lock nesting notation 6 locks held by cat/3074: #0: ffffff81f01d9420 (sb_writers#7){.+.+}, at: vfs_write+0xd0/0x1a4 #1: ffffff81bd7d2080 (&of->mutex){+.+.}, at: kernfs_fop_write+0x12c/0x1fc #2: ffffff81f4c322f0 (kn->count#337){.+.+}, at: kernfs_fop_write+0x134/0x1fc #3: ffffffe411a41d60 (system_transition_mutex){+.+.}, at: pm_suspend+0x108/0x348 #4: ffffff81f1c5e970 (&dev->mutex){....}, at: __device_suspend+0x168/0x41c #5: ffffff81f1cc10c0 (&irq_desc_lock_class){-.-.}, at: __irq_get_desc_lock+0x64/0x94 stack backtrace: CPU: 5 PID: 3074 Comm: cat Tainted: G W 5.4.11 #3 Hardware name: Google Cheza (rev3+) (DT) Call trace: dump_backtrace+0x0/0x174 show_stack+0x20/0x2c dump_stack+0xc8/0x124 __lock_acquire+0x460/0x2388 lock_acquire+0x1cc/0x210 _raw_spin_lock_irqsave+0x64/0x80 __irq_get_desc_lock+0x64/0x94 irq_set_irq_wake+0x40/0x144 qpnpint_irq_set_wake+0x28/0x34 set_irq_wake_real+0x40/0x5c irq_set_irq_wake+0x70/0x144 pm8941_pwrkey_suspend+0x34/0x44 platform_pm_suspend+0x34/0x60 dpm_run_callback+0x64/0xcc __device_suspend+0x310/0x41c dpm_suspend+0xf8/0x298 dpm_suspend_start+0x84/0xb4 suspend_devices_and_enter+0xbc/0x620 pm_suspend+0x210/0x348 state_store+0xb0/0x108 kobj_attr_store+0x14/0x24 sysfs_kf_write+0x4c/0x64 kernfs_fop_write+0x15c/0x1fc __vfs_write+0x54/0x18c vfs_write+0xe4/0x1a4 ksys_write+0x7c/0xe4 __arm64_sys_write+0x20/0x2c el0_svc_common+0xa8/0x160 el0_svc_handler+0x7c/0x98 el0_svc+0x8/0xc Set a lockdep class when we map the irq so that irq_set_wake() doesn't warn about a lockdep bug that doesn't exist. Fixes: 12a9eeaebba3 ("spmi: pmic-arb: convert to v2 irq interfaces to support hierarchical IRQ chips") Cc: Douglas Anderson Cc: Brian Masney Cc: Lina Iyer Cc: Maulik Shah Cc: Bjorn Andersson Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20200121183748.68662-1-swboyd@chromium.org Signed-off-by: Linus Walleij commit 9437bfda00f3b26eb5f475737ddaaf4dc07fee4f Author: Arnd Bergmann Date: Thu Jan 30 15:05:45 2020 +0200 ASoC: atmel: fix atmel_ssc_set_audio link failure The ssc audio driver can call into both pdc and dma backends. With the latest rework, the logic to do this in a safe way avoiding link errors was removed, bringing back link errors that were fixed long ago in commit 061981ff8cc8 ("ASoC: atmel: properly select dma driver state") such as sound/soc/atmel/atmel_ssc_dai.o: In function `atmel_ssc_set_audio': atmel_ssc_dai.c:(.text+0xac): undefined reference to `atmel_pcm_pdc_platform_register' Fix it this time using Makefile hacks and a comment to prevent this from accidentally getting removed again rather than Kconfig hacks. Fixes: 18291410557f ("ASoC: atmel: enable SOC_SSC_PDC and SOC_SSC_DMA in Kconfig") Signed-off-by: Arnd Bergmann Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20200130130545.31148-1-codrin.ciubotariu@microchip.com Reviewed-by: Michał Mirosław Signed-off-by: Mark Brown commit c3afa804c58e5c30ac63858b527fffadc88bce82 Author: Paul Thomas Date: Sat Jan 25 17:14:10 2020 -0500 gpio: xilinx: Fix bug where the wrong GPIO register is written to Care is taken with "index", however with the current version the actual xgpio_writereg is using index for data but xgpio_regoffset(chip, i) for the offset. And since i is already incremented it is incorrect. This patch fixes it so that index is used for the offset too. Cc: stable@vger.kernel.org Signed-off-by: Paul Thomas Link: https://lore.kernel.org/r/20200125221410.8022-1-pthomas8589@gmail.com Signed-off-by: Linus Walleij commit 0b6f499022b6a87d04f56edd2bf863ea76923206 Author: Julian Wiedmann Date: Mon Nov 25 14:18:29 2019 +0100 s390/qdio: simplify ACK tracking Current code uses a 'polling' flag to keep track of whether an Input Queue has any ACKed SBALs. QEBSM devices might have multiple ACKed SBALs, and those are tracked separately with 'ack_count'. By also setting ack_count for non-QEBSM devices (to a fixed value of 1), we can use 'ack_count != 0' as replacement for the polling flag. Signed-off-by: Julian Wiedmann Signed-off-by: Vasily Gorbik commit fcd98d4002539f1e381916fc1b6648938c1eac76 Author: Harald Freudenberger Date: Fri Dec 20 16:02:54 2019 +0100 s390/zcrypt: fix card and queue total counter wrap The internal statistic counters for the total number of requests processed per card and per queue used integers. So they do wrap after a rather huge amount of crypto requests processed. This patch introduces uint64 counters which should hold much longer but still may wrap. The sysfs attributes request_count for card and queue also used only %ld and now display the counter value with %llu. This is not a security relevant fix. The int overflow which happened is not in any way exploitable as a security breach. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit aab73d278d49c718b722ff5052e16c9cddf144d4 Author: Harald Freudenberger Date: Fri Jan 31 12:08:31 2020 +0100 s390/pkey: fix missing length of protected key on return The pkey ioctl call PKEY_SEC2PROTK updates a struct pkey_protkey on return. The protected key is stored in, the protected key type is stored in but the len information was not updated. This patch now fixes this and so the len field gets an update to refrect the actual size of the protected key value returned. Fixes: efc598e6c8a9 ("s390/zcrypt: move cca misc functions to new code file") Cc: Stable Signed-off-by: Harald Freudenberger Reported-by: Christian Rund Suggested-by: Ingo Franzki Signed-off-by: Vasily Gorbik commit dee7c111a458115daecb74a6e3b707260e64e983 Merge: bb6d3fb354c5 8131b73b22c2 Author: Linus Walleij Date: Mon Feb 10 12:47:26 2020 +0100 Merge tag 'gpio-fixes-for-v5.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes gpio fixes for v5.6-rc2 - fix a regression introduced by gpio_do_set_config() - sort GPIO entries in MAINTAINERS - remove leftover defines in gpio-bd71828 - remove an redundant switch case in gpio_set_config() commit 345d52c184dc7de98cff63f1bfa6f90e9db19809 Author: Qian Cai Date: Thu Jan 23 15:20:51 2020 -0500 arm64/spinlock: fix a -Wunused-function warning The commit f5bfdc8e3947 ("locking/osq: Use optimized spinning loop for arm64") introduced a warning from Clang because vcpu_is_preempted() is compiled away, kernel/locking/osq_lock.c:25:19: warning: unused function 'node_cpu' [-Wunused-function] static inline int node_cpu(struct optimistic_spin_node *node) ^ 1 warning generated. Fix it by converting vcpu_is_preempted() to a static inline function. Fixes: f5bfdc8e3947 ("locking/osq: Use optimized spinning loop for arm64") Acked-by: Waiman Long Signed-off-by: Qian Cai Signed-off-by: Will Deacon commit fca3d33d8ad61eb53eca3ee4cac476d1e31b9008 Author: Will Deacon Date: Thu Feb 6 10:42:58 2020 +0000 arm64: ssbs: Fix context-switch when SSBS is present on all CPUs When all CPUs in the system implement the SSBS extension, the SSBS field in PSTATE is the definitive indication of the mitigation state. Further, when the CPUs implement the SSBS manipulation instructions (advertised to userspace via an HWCAP), EL0 can toggle the SSBS field directly and so we cannot rely on any shadow state such as TIF_SSBD at all. Avoid forcing the SSBS field in context-switch on such a system, and simply rely on the PSTATE register instead. Cc: Cc: Catalin Marinas Cc: Srinivas Ramana Fixes: cbdf8a189a66 ("arm64: Force SSBS on context switch") Reviewed-by: Marc Zyngier Signed-off-by: Will Deacon commit 2c614c1194f2803750c14b751871bd168dcc8054 Author: Matteo Croce Date: Fri Jan 24 16:51:27 2020 +0100 arm64: use shared sysctl constants Use shared sysctl variables for zero and one constants, as in commit eec4844fae7c ("proc/sysctl: add shared variables for range check") Fixes: 63f0c6037965 ("arm64: Introduce prctl() options to control the tagged user addresses ABI") Signed-off-by: Matteo Croce Signed-off-by: Will Deacon commit 5cb7a1113f94cec20ff16d3981b94b7fdd8d73fa Author: Anshuman Khandual Date: Mon Jan 27 15:19:35 2020 +0530 arm64: Drop do_el0_ia_bp_hardening() & do_sp_pc_abort() declarations There is a redundant do_sp_pc_abort() declaration in exceptions.h which can be removed. Also do_el0_ia_bp_hardening() as been already been dropped with the commit bfe298745afc ("arm64: entry-common: don't touch daif before bp-hardening") and hence does not need a declaration any more. This should not introduce any functional change. Cc: Catalin Marinas Cc: Will Deacon Cc: James Morse Cc: Thomas Gleixner Cc: linux-kernel@vger.kernel.org Acked-by: Mark Rutland Signed-off-by: Anshuman Khandual Signed-off-by: Will Deacon commit 52262ee567ad14c9606be25f3caddcefa3c514e4 Author: Mel Gorman Date: Tue Jan 28 15:40:06 2020 +0000 sched/fair: Allow a per-CPU kthread waking a task to stack on the same CPU, to fix XFS performance regression The following XFS commit: 8ab39f11d974 ("xfs: prevent CIL push holdoff in log recovery") changed the logic from using bound workqueues to using unbound workqueues. Functionally this makes sense but it was observed at the time that the dbench performance dropped quite a lot and CPU migrations were increased. The current pattern of the task migration is straight-forward. With XFS, an IO issuer delegates work to xlog_cil_push_work ()on an unbound kworker. This runs on a nearby CPU and on completion, dbench wakes up on its old CPU as it is still idle and no migration occurs. dbench then queues the real IO on the blk_mq_requeue_work() work item which runs on a bound kworker which is forced to run on the same CPU as dbench. When IO completes, the bound kworker wakes dbench but as the kworker is a bound but, real task, the CPU is not considered idle and dbench gets migrated by select_idle_sibling() to a new CPU. dbench may ping-pong between two CPUs for a while but ultimately it starts a round-robin of all CPUs sharing the same LLC. High-frequency migration on each IO completion has poor performance overall. It has negative implications both in commication costs and power management. mpstat confirmed that at low thread counts that all CPUs sharing an LLC has low level of activity. Note that even if the CIL patch was reverted, there still would be migrations but the impact is less noticeable. It turns out that individually the scheduler, XFS, blk-mq and workqueues all made sensible decisions but in combination, the overall effect was sub-optimal. This patch special cases the IO issue/completion pattern and allows a bound kworker waker and a task wakee to stack on the same CPU if there is a strong chance they are directly related. The expectation is that the kworker is likely going back to sleep shortly. This is not guaranteed as the IO could be queued asynchronously but there is a very strong relationship between the task and kworker in this case that would justify stacking on the same CPU instead of migrating. There should be few concerns about kworker starvation given that the special casing is only when the kworker is the waker. DBench on XFS MMTests config: io-dbench4-async modified to run on a fresh XFS filesystem UMA machine with 8 cores sharing LLC 5.5.0-rc7 5.5.0-rc7 tipsched-20200124 kworkerstack Amean 1 22.63 ( 0.00%) 20.54 * 9.23%* Amean 2 25.56 ( 0.00%) 23.40 * 8.44%* Amean 4 28.63 ( 0.00%) 27.85 * 2.70%* Amean 8 37.66 ( 0.00%) 37.68 ( -0.05%) Amean 64 469.47 ( 0.00%) 468.26 ( 0.26%) Stddev 1 1.00 ( 0.00%) 0.72 ( 28.12%) Stddev 2 1.62 ( 0.00%) 1.97 ( -21.54%) Stddev 4 2.53 ( 0.00%) 3.58 ( -41.19%) Stddev 8 5.30 ( 0.00%) 5.20 ( 1.92%) Stddev 64 86.36 ( 0.00%) 94.53 ( -9.46%) NUMA machine, 48 CPUs total, 24 CPUs share cache 5.5.0-rc7 5.5.0-rc7 tipsched-20200124 kworkerstack-v1r2 Amean 1 58.69 ( 0.00%) 30.21 * 48.53%* Amean 2 60.90 ( 0.00%) 35.29 * 42.05%* Amean 4 66.77 ( 0.00%) 46.55 * 30.28%* Amean 8 81.41 ( 0.00%) 68.46 * 15.91%* Amean 16 113.29 ( 0.00%) 107.79 * 4.85%* Amean 32 199.10 ( 0.00%) 198.22 * 0.44%* Amean 64 478.99 ( 0.00%) 477.06 * 0.40%* Amean 128 1345.26 ( 0.00%) 1372.64 * -2.04%* Stddev 1 2.64 ( 0.00%) 4.17 ( -58.08%) Stddev 2 4.35 ( 0.00%) 5.38 ( -23.73%) Stddev 4 6.77 ( 0.00%) 6.56 ( 3.00%) Stddev 8 11.61 ( 0.00%) 10.91 ( 6.04%) Stddev 16 18.63 ( 0.00%) 19.19 ( -3.01%) Stddev 32 38.71 ( 0.00%) 38.30 ( 1.06%) Stddev 64 100.28 ( 0.00%) 91.24 ( 9.02%) Stddev 128 186.87 ( 0.00%) 160.34 ( 14.20%) Dbench has been modified to report the time to complete a single "load file". This is a more meaningful metric for dbench that a throughput metric as the benchmark makes many different system calls that are not throughput-related Patch shows a 9.23% and 48.53% reduction in the time to process a load file with the difference partially explained by the number of CPUs sharing a LLC. In a separate run, task migrations were almost eliminated by the patch for low client counts. In case people have issue with the metric used for the benchmark, this is a comparison of the throughputs as reported by dbench on the NUMA machine. dbench4 Throughput (misleading but traditional) 5.5.0-rc7 5.5.0-rc7 tipsched-20200124 kworkerstack-v1r2 Hmean 1 321.41 ( 0.00%) 617.82 * 92.22%* Hmean 2 622.87 ( 0.00%) 1066.80 * 71.27%* Hmean 4 1134.56 ( 0.00%) 1623.74 * 43.12%* Hmean 8 1869.96 ( 0.00%) 2212.67 * 18.33%* Hmean 16 2673.11 ( 0.00%) 2806.13 * 4.98%* Hmean 32 3032.74 ( 0.00%) 3039.54 ( 0.22%) Hmean 64 2514.25 ( 0.00%) 2498.96 * -0.61%* Hmean 128 1778.49 ( 0.00%) 1746.05 * -1.82%* Note that this is somewhat specific to XFS and ext4 shows no performance difference as it does not rely on kworkers in the same way. No major problem was observed running other workloads on different machines although not all tests have completed yet. Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200128154006.GD3466@techsingularity.net Signed-off-by: Ingo Molnar commit b460e0a9e2404450a0cc4c5e6476483d6cda1b26 Author: Brendan Higgins Date: Mon Jan 27 15:53:54 2020 -0800 reset: intel: add unspecified HAS_IOMEM dependency Currently CONFIG_RESET_INTEL_GW=y implicitly depends on CONFIG_HAS_IOMEM=y; consequently, on architectures without IOMEM we get the following build error: /usr/bin/ld: drivers/reset/reset-intel-gw.o: in function `intel_reset_probe': drivers/reset/reset-intel-gw.c:185: undefined reference to `devm_platform_ioremap_resource' Fix the build error by adding the unspecified dependency. Signed-off-by: Brendan Higgins Signed-off-by: Philipp Zabel commit 7fbcc53514c5e410dd598685c5fbbe1e6a5a87e1 Author: Brendan Higgins Date: Mon Jan 27 15:53:53 2020 -0800 reset: brcmstb-rescal: add unspecified HAS_IOMEM dependency Currently CONFIG_RESET_BRCMSTB_RESCAL=y implicitly depends on CONFIG_HAS_IOMEM=y; consequently, on architectures without IOMEM we get the following build error: /usr/bin/ld: drivers/reset/reset-brcmstb-rescal.o: in function `brcm_rescal_reset_probe': drivers/reset/reset-brcmstb-rescal.c:76: undefined reference to `devm_ioremap_resource' Fix the build error by adding the unspecified dependency. Signed-off-by: Brendan Higgins Signed-off-by: Philipp Zabel commit 71483532a3e8ec1dffbfd9183a20320f59c4ed03 Author: Lukas Bulwahn Date: Thu Jan 16 19:48:36 2020 +0100 MAINTAINERS: fix style in RESET CONTROLLER FRAMEWORK Commit 37859277374d ("MAINTAINERS: add reset controller framework keywords") slips in some formatting with spaces instead of tabs, which ./scripts/checkpatch.pl -f MAINTAINERS complains about: WARNING: MAINTAINERS entries use one tab after TYPE: #14047: FILE: MAINTAINERS:14047: +K: \b(?:devm_|of_)?reset_control(?:ler_[a-z]+|_[a-z_]+)?\b Fixes: 37859277374d ("MAINTAINERS: add reset controller framework keywords") Signed-off-by: Lukas Bulwahn Signed-off-by: Philipp Zabel commit 68131a0b8fd0522c33fffb6c9d857dc88fbd43ee Author: Rob Herring Date: Mon Jan 13 15:45:15 2020 -0600 dt-bindings: reset: intel,rcu-gw: Fix intel,global-reset schema The intel,rcu-gw binding example has an error: Documentation/devicetree/bindings/reset/intel,rcu-gw.example.dt.yaml: reset-controller@e0000000: intel,global-reset: [[16, 30]] is too short The error isn't really correct as the problem is in how the data is encoded and the schema is not fixed up by the tooling correctly. However, array properties should describe the elements in the array, so lets do that which fixes the error in the process. Fixes: b7ab0cb00d08 ("dt-bindings: reset: Add YAML schemas for the Intel Reset controller") Cc: Dilip Kota Signed-off-by: Rob Herring Signed-off-by: Philipp Zabel commit 8131b73b22c25e57e926874bb284f61cc3f8ac5e Author: Kent Gibson Date: Mon Jan 20 18:46:26 2020 +0800 gpiolib: remove unnecessary argument from set_config call Remove unnecessary argument when setting PIN_CONFIG_BIAS_DISABLE. No argument is expected by pinctrl, so removing it should be harmless. Fixes: 2148ad7790ea ("gpiolib: add support for disabling line bias") Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 4d0cabbb8b6a6cb010c19e8a3da2da5e0aaf5ef0 Author: Axel Lin Date: Wed Jan 29 20:30:21 2020 +0800 gpio: bd71828: Remove unneeded defines for GPIO_LINE_DIRECTION_IN/OUT They are defined in gpio/driver.h now. Signed-off-by: Axel Lin Signed-off-by: Bartosz Golaszewski commit e4f41de77f96e199151117646ac6df4f18301c79 Author: Andy Shevchenko Date: Tue Jan 28 18:03:25 2020 +0200 MAINTAINERS: Sort entries in database for GPIO Run parse-maintainers.pl and choose GPIO records. Fix them accordingly. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 62adc6f33d6f3c0f4831389dec0f82ea6e9a489f Author: Bartosz Golaszewski Date: Mon Feb 3 14:16:16 2020 +0100 gpiolib: fix gpio_do_set_config() Commit d90f36851d65 ("gpiolib: have a single place of calling set_config()") introduced a regression where we don't pass the right variable as argument to the set_config() callback of gpio driver from gpio_set_config(). After reverting two additional patches that came on top of it - this addresses the issue by changing the type of the last argument of gpio_do_set_config() to unsigned long and making sure the packed config variable is actually used in gpio_set_config(). Fixes: d90f36851d65 ("gpiolib: have a single place of calling set_config()") Signed-off-by: Bartosz Golaszewski Tested-by: Guenter Roeck commit 91b4ea5fc57c6a0a1beea7056dc2f83e2ec6968c Author: Bartosz Golaszewski Date: Mon Feb 3 14:03:47 2020 +0100 Revert "gpiolib: remove set but not used variable 'config'" This reverts commit e5e42ad224a040f93bf112e96f82b3a0ed97ffab. This patch came on top of another patch that introduced a regression. Revert it before addressing the culprit. Signed-off-by: Bartosz Golaszewski Tested-by: Guenter Roeck commit d99f88761ba0d135677afe546ffdd26c58e5644d Author: Bartosz Golaszewski Date: Mon Feb 3 14:03:37 2020 +0100 Revert "gpiolib: Remove duplicated function gpio_do_set_config()" This reverts commit d18fddff061d2796525e6d4a958cb3d30aed8efd. This patch came on top of another patch that introduced a regression. Revert it before addressing the culprit. Signed-off-by: Bartosz Golaszewski Tested-by: Guenter Roeck commit e7598fac323aad0e502415edeffd567315994dd6 Author: Joerg Roedel Date: Mon Feb 10 10:36:56 2020 +0100 iommu/vt-d: Fix compile warning from intel-svm.h The intel_svm_is_pasid_valid() needs to be marked inline, otherwise it causes the compile warning below: CC [M] drivers/dma/idxd/cdev.o In file included from drivers/dma/idxd/cdev.c:9:0: ./include/linux/intel-svm.h:125:12: warning: ‘intel_svm_is_pasid_valid’ defined but not used [-Wunused-function] static int intel_svm_is_pasid_valid(struct device *dev, int pasid) ^~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: Borislav Petkov Fixes: 15060aba71711 ('iommu/vt-d: Helper function to query if a pasid has any active users') Signed-off-by: Joerg Roedel commit 5391a87751a164b3194864126f3b016038abc9fe Author: Tuong Lien Date: Mon Feb 10 15:35:44 2020 +0700 tipc: fix successful connect() but timed out In commit 9546a0b7ce00 ("tipc: fix wrong connect() return code"), we fixed the issue with the 'connect()' that returns zero even though the connecting has failed by waiting for the connection to be 'ESTABLISHED' really. However, the approach has one drawback in conjunction with our 'lightweight' connection setup mechanism that the following scenario can happen: (server) (client) +- accept()| | wait_for_conn() | | |connect() -------+ | |<-------[SYN]---------| > sleeping | | *CONNECTING | |--------->*ESTABLISHED | | |--------[ACK]-------->*ESTABLISHED > wakeup() send()|--------[DATA]------->|\ > wakeup() send()|--------[DATA]------->| | > wakeup() . . . . |-> recvq . . . . . | . send()|--------[DATA]------->|/ > wakeup() close()|--------[FIN]-------->*DISCONNECTING | *DISCONNECTING | | | ~~~~~~~~~~~~~~~~~~> schedule() | wait again . . | ETIMEDOUT Upon the receipt of the server 'ACK', the client becomes 'ESTABLISHED' and the 'wait_for_conn()' process is woken up but not run. Meanwhile, the server starts to send a number of data following by a 'close()' shortly without waiting any response from the client, which then forces the client socket to be 'DISCONNECTING' immediately. When the wait process is switched to be running, it continues to wait until the timer expires because of the unexpected socket state. The client 'connect()' will finally get ‘-ETIMEDOUT’ and force to release the socket whereas there remains the messages in its receive queue. Obviously the issue would not happen if the server had some delay prior to its 'close()' (or the number of 'DATA' messages is large enough), but any kind of delay would make the connection setup/shutdown "heavy". We solve this by simply allowing the 'connect()' returns zero in this particular case. The socket is already 'DISCONNECTING', so any further write will get '-EPIPE' but the socket is still able to read the messages existing in its receive queue. Note: This solution doesn't break the previous one as it deals with a different situation that the socket state is 'DISCONNECTING' but has no error (i.e. sk->sk_err = 0). Fixes: 9546a0b7ce00 ("tipc: fix wrong connect() return code") Acked-by: Ying Xue Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit 5609e2bbefed38df060c2472af9cf0c469b8997f Author: Chen Wandun Date: Mon Feb 10 16:27:59 2020 +0800 mptcp: make the symbol 'mptcp_sk_clone_lock' static Fix the following sparse warning: net/mptcp/protocol.c:646:13: warning: symbol 'mptcp_sk_clone_lock' was not declared. Should it be static? Fixes: b0519de8b3f1 ("mptcp: fix use-after-free for ipv6") Signed-off-by: Chen Wandun Signed-off-by: David S. Miller commit 2437fd7baf299c7b8a39fa3e727755e84ee7c4ea Author: Chen Wandun Date: Mon Feb 10 16:11:09 2020 +0800 tipc: make three functions static Fix the following sparse warning: net/tipc/node.c:281:6: warning: symbol 'tipc_node_free' was not declared. Should it be static? net/tipc/node.c:2801:5: warning: symbol '__tipc_nl_node_set_key' was not declared. Should it be static? net/tipc/node.c:2878:5: warning: symbol '__tipc_nl_node_flush_key' was not declared. Should it be static? Fixes: fc1b6d6de220 ("tipc: introduce TIPC encryption & authentication") Fixes: e1f32190cf7d ("tipc: add support for AEAD key setting via netlink") Signed-off-by: Chen Wandun Signed-off-by: David S. Miller commit 48bc281e4bf049abd3bb98371209315651bf4a14 Author: Geert Uytterhoeven Date: Wed Jan 15 13:56:53 2020 +0100 drm/bridge: ti-tfp410: Update drm_connector_init_with_ddc() error message The code was changed to call drm_connector_init_with_ddc() instead of drm_connector_init(), but the corresponding error message was not updated. Fixes: cfb444552926989f ("drm/bridge: ti-tfp410: Provide ddc symlink in connector sysfs directory") Signed-off-by: Geert Uytterhoeven Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200115125653.5519-1-geert+renesas@glider.be commit 8a6483ac634acda3f599f50082c652d2d37199c7 Author: Tomi Valkeinen Date: Mon Dec 9 10:27:07 2019 +0200 drm/bridge: tc358767: fix poll timeouts Link training fails with: Link training timeout waiting for LT_LOOPDONE! main link enable error: -110 This is caused by too tight timeouts, which were changed recently in aa92213f388b ("drm/bridge: tc358767: Simplify polling in tc_link_training()"). With a quick glance, the commit does not change the timeouts. However, the method of delaying/sleeping is different, and as the timeout in the previous implementation was not explicit, the new version in practice has much tighter timeout. The same change was made to other parts in the driver, but the link training timeout is the only one I have seen causing issues. Nevertheless, 1 us sleep is not very sane, and the timeouts look pretty tight, so lets fix all the timeouts. One exception was the aux busy poll, where the poll sleep was much longer than necessary (or optimal). I measured the times on my setup, and now the sleep times are set to such values that they result in multiple loops, but not too many (say, 5-10 loops). The timeouts were all increased to 100ms, which should be more than enough for all of these, but in case of bad errors, shouldn't stop the driver as multi-second timeouts could do. Signed-off-by: Tomi Valkeinen Fixes: aa92213f388b ("drm/bridge: tc358767: Simplify polling in tc_link_training()") Tested-by: Andrey Smirnov Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20191209082707.24531-1-tomi.valkeinen@ti.com commit 7c3d02285ad558691f27fde760bcd841baa27eab Author: Johan Hovold Date: Thu Feb 6 12:18:19 2020 +0100 USB: serial: ch341: fix receiver regression While assumed not to make a difference, not using the factor-2 prescaler makes the receiver more susceptible to errors. Specifically, there have been reports of problems with devices that cannot generate a 115200 rate with a smaller error than 2.1% (e.g. 117647 bps). But this can also be reproduced with a low-speed RS232 tranceiver at 115200 when the input rate matches the nominal rate. So whenever possible, enable the factor-2 prescaler and halve the divisor in order to use settings closer to that of the previous algorithm. Fixes: 35714565089e ("USB: serial: ch341: reimplement line-speed handling") Cc: stable # 5.5 Reported-by: Jakub Nantl Tested-by: Jakub Nantl Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit c664a4fa8f69308b8f624cff4fa1294e9aef880d Author: Dan Carpenter Date: Wed Jan 29 20:30:37 2020 +0300 USB: serial: ir-usb: Silence harmless uninitialized variable warning The "actual_length" variable might be uninitialized on some failure paths. It's harmless but static analysis tools like Smatch complain and at runtime the UBSan tool will likely complain as well. Fixes: e7542bc382f8 ("USB: serial: ir-usb: make set_termios synchronous") Signed-off-by: Dan Carpenter Signed-off-by: Johan Hovold commit 03c6bf4644287601bf10d0ed9f6137c1854d3e23 Author: Jagan Teki Date: Tue Dec 31 12:25:08 2019 +0530 arm64: defconfig: Enable DRM_SUN6I_DSI Now, Allwiner MIPI-DSI support is available for ARM64 Allwinner SoC like A64. So, let's build it as a module. Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard commit 4a453ccf87d507e8c9f156f95e708cec0e70ffed Author: Yangtao Li Date: Sun Dec 29 11:17:06 2019 +0000 arm64: defconfig: Enable CONFIG_SUN8I_THERMAL Many sunxi based board needs CONFIG_SUN8I_THERMAL for thermal support. Signed-off-by: Yangtao Li Signed-off-by: Maxime Ripard commit 415ae604d4ac0c0f4e1ecd79f42891b9ca69cf70 Author: Yangtao Li Date: Sun Dec 29 11:17:07 2019 +0000 ARM: sunxi: Enable CONFIG_SUN8I_THERMAL Many sunxi based board needs CONFIG_SUN8I_THERMAL for thermal support. Signed-off-by: Yangtao Li Signed-off-by: Maxime Ripard commit bd8cac5fb8b8fb2bc80203cb444ecf5f5e2bd9e3 Author: Chen-Yu Tsai Date: Tue Jan 14 17:42:52 2020 +0800 ARM: dts: sun8i: a83t: Fix incorrect clk and reset macros for EMAC device When the raw numbers used for clk and reset indices in the EMAC device node were converted to the new macros, the order of the clk and reset properties was overlooked, and thus the incorrect macros were used. This results in the EMAC being non-responsive, as well as an oops due to incorrect usage of the reset control. Correct the macro types, and also reorder the clk and reset properties to match all the other device nodes. Fixes: 765866edb16a ("ARM: dts: sunxi: Use macros for references to CCU clocks") Signed-off-by: Chen-Yu Tsai Tested-by: Corentin Labbe Signed-off-by: Maxime Ripard commit 0acdf63d2296f9542437a4842ad94554d240eab6 Author: Vineet Gupta Date: Fri Feb 7 17:05:10 2020 -0800 ARC: fpu: fix randconfig build error reported by 0-day test service Reported-by: kbuild test robot Link: http://lists.infradead.org/pipermail/linux-snps-arc/2020-February/006845.html Signed-off-by: Vineet Gupta commit a5760db25c6e68bf8cd34e1642196826c08715ed Author: Randy Dunlap Date: Fri Jan 31 17:49:33 2020 -0800 ARC: fix some Kconfig typos Fix language typos in arch/arc/Kconfig. Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Randy Dunlap Signed-off-by: Vineet Gupta commit d560bb42814ca7ff6c9944310644d45eb53ca1ae Author: Krzysztof Kozlowski Date: Thu Jan 30 20:24:03 2020 +0100 ARC: Cleanup old Kconfig IO scheduler options CONFIG_IOSCHED_DEADLINE and CONFIG_IOSCHED_CFQ are gone since commit f382fb0bcef4 ("block: remove legacy IO schedulers"). The IOSCHED_DEADLINE was replaced by MQ_IOSCHED_DEADLINE and it will be now enabled by default (along with MQ_IOSCHED_KYBER). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Vineet Gupta commit f166795871be4a6a679a5f61ac7130b3c0b21cab Author: Nicolas Saenz Julienne Date: Fri Jan 24 22:08:33 2020 +0100 arm64: defconfig: Set bcm2835-dma as built-in With the introduction of 738987a1d6f1 ("mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()") sdhost-bcm2835 now waits for its DMA channel to be available when defined in the device-tree (it would previously default to PIO). Albeit the right behaviour, the MMC host is needed for booting. So this makes sure the DMA channel shows up in time. Fixes: 738987a1d6f1 ("mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel()") Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Florian Fainelli commit cf2b012c90e74e85d8aea7d67e48868069cfee0c Author: Mike Jones Date: Tue Jan 28 10:59:59 2020 -0700 hwmon: (pmbus/ltc2978) Fix PMBus polling of MFR_COMMON definitions. Change 21537dc driver PMBus polling of MFR_COMMON from bits 5/4 to bits 6/5. This fixs a LTC297X family bug where polling always returns not busy even when the part is busy. This fixes a LTC388X and LTM467X bug where polling used PEND and NOT_IN_TRANS, and BUSY was not polled, which can lead to NACKing of commands. LTC388X and LTM467X modules now poll BUSY and PEND, increasing reliability by eliminating NACKing of commands. Signed-off-by: Mike Jones Link: https://lore.kernel.org/r/1580234400-2829-2-git-send-email-michael-a1.jones@analog.com Fixes: e04d1ce9bbb49 ("hwmon: (ltc2978) Add polling for chips requiring it") Signed-off-by: Guenter Roeck commit 0e9d7bb293f3f9c3ee376b126141407efb265f31 Author: Igor Druzhinin Date: Mon Feb 3 15:07:01 2020 +0000 drm/i915/gvt: more locking for ppgtt mm LRU list When the lock was introduced in commit 72aabfb862e40 ("drm/i915/gvt: Add mutual lock for ppgtt mm LRU list") one place got lost. Fixes: 72aabfb862e4 ("drm/i915/gvt: Add mutual lock for ppgtt mm LRU list") Signed-off-by: Igor Druzhinin Reviewed-by: Zhenyu Wang Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/1580742421-25194-1-git-send-email-igor.druzhinin@citrix.com commit c216f12bed33f779b974cb2d69206d6202bde572 Author: Igor Druzhinin Date: Wed Jan 22 20:10:24 2020 +0000 drm/i915/gvt: fix high-order allocation failure on late load If the module happens to be loaded later at runtime there is a chance memory is already fragmented enough to fail allocation of firmware blob storage and consequently GVT init. Since it doesn't seem to be necessary to have the blob contiguous, use vmalloc() instead to avoid the issue. Reviewed-by: Zhenyu Wang Signed-off-by: Igor Druzhinin Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/1579723824-25711-1-git-send-email-igor.druzhinin@citrix.com commit 3f9e12e0df012c4a9a7fd7eb0d3ae69b459d6b2c Author: Jean Delvare Date: Thu Feb 6 16:58:45 2020 +0100 ACPI: watchdog: Allow disabling WDAT at boot In case the WDAT interface is broken, give the user an option to ignore it to let a native driver bind to the watchdog device instead. Signed-off-by: Jean Delvare Acked-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki commit bb6d3fb354c5ee8d6bde2d576eb7220ea09862b9 Author: Linus Torvalds Date: Sun Feb 9 16:08:48 2020 -0800 Linux 5.6-rc1 commit 89a47dd1af8fdda667938ec190d9595d55d7ec6f Merge: 380a129eb2c2 f566e1fbadb6 Author: Linus Torvalds Date: Sun Feb 9 16:05:50 2020 -0800 Merge tag 'kbuild-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull more Kbuild updates from Masahiro Yamada: - fix randconfig to generate a sane .config - rename hostprogs-y / always to hostprogs / always-y, which are more natual syntax. - optimize scripts/kallsyms - fix yes2modconfig and mod2yesconfig - make multiple directory targets ('make foo/ bar/') work * tag 'kbuild-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: make multiple directory targets work kconfig: Invalidate all symbols after changing to y or m. kallsyms: fix type of kallsyms_token_table[] scripts/kallsyms: change table to store (strcut sym_entry *) scripts/kallsyms: rename local variables in read_symbol() kbuild: rename hostprogs-y/always to hostprogs/always-y kbuild: fix the document to use extra-y for vmlinux.lds kconfig: fix broken dependency in randconfig-generated .config commit 380a129eb2c20d4b7b5be744e80e2ec18b24220b Merge: 490d332ea427 fcb9c24bef3d Author: Linus Torvalds Date: Sun Feb 9 15:51:46 2020 -0800 Merge tag 'zonefs-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs Pull new zonefs file system from Damien Le Moal: "Zonefs is a very simple file system exposing each zone of a zoned block device as a file. Unlike a regular file system with native zoned block device support (e.g. f2fs or the on-going btrfs effort), zonefs does not hide the sequential write constraint of zoned block devices to the user. As a result, zonefs is not a POSIX compliant file system. Its goal is to simplify the implementation of zoned block devices support in applications by replacing raw block device file accesses with a richer file based API, avoiding relying on direct block device file ioctls which may be more obscure to developers. One example of this approach is the implementation of LSM (log-structured merge) tree structures (such as used in RocksDB and LevelDB) on zoned block devices by allowing SSTables to be stored in a zone file similarly to a regular file system rather than as a range of sectors of a zoned device. The introduction of the higher level construct "one file is one zone" can help reducing the amount of changes needed in the application while at the same time allowing the use of zoned block devices with various programming languages other than C. Zonefs IO management implementation uses the new iomap generic code. Zonefs has been successfully tested using a functional test suite (available with zonefs userland format tool on github) and a prototype implementation of LevelDB on top of zonefs" * tag 'zonefs-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs: zonefs: Add documentation fs: New zonefs file system commit 490d332ea42780577f679f5d13598b195bff360c Author: Marc Zyngier Date: Sun Feb 9 22:48:50 2020 +0000 irqchip/gic-v4.1: Avoid 64bit division for the sake of 32bit ARM In order to allow the GICv4 code to link properly on 32bit ARM, make sure we don't use 64bit divisions when it isn't strictly necessary. Fixes: 4e6437f12d6e ("irqchip/gic-v4.1: Ensure L2 vPE table is allocated at RD level") Reported-by: Stephen Rothwell Cc: Zenghui Yu Signed-off-by: Marc Zyngier Signed-off-by: Linus Torvalds commit d1ea35f4cdd41ae6ac5a9e1ad6a55cc901681569 Merge: 5586c3c1e0eb 51d92d69f77b Author: Linus Torvalds Date: Sun Feb 9 13:27:17 2020 -0800 Merge tag '5.6-rc-smb3-plugfest-patches' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "13 cifs/smb3 patches, most from testing at the SMB3 plugfest this week: - Important fix for multichannel and for modefromsid mounts. - Two reconnect fixes - Addition of SMB3 change notify support - Backup tools fix - A few additional minor debug improvements (tracepoints and additional logging found useful during testing this week)" * tag '5.6-rc-smb3-plugfest-patches' of git://git.samba.org/sfrench/cifs-2.6: smb3: Add defines for new information level, FileIdInformation smb3: print warning once if posix context returned on open smb3: add one more dynamic tracepoint missing from strict fsync path cifs: fix mode bits from dir listing when mounted with modefromsid cifs: fix channel signing cifs: add SMB3 change notification support cifs: make multichannel warning more visible cifs: fix soft mounts hanging in the reconnect code cifs: Add tracepoints for errors on flush or fsync cifs: log warning message (once) if out of disk space cifs: fail i/o on soft mounts if sessionsetup errors out smb3: fix problem with null cifs super block with previous patch SMB3: Backup intent flag missing from some more ops commit 5586c3c1e0eb04cb8b16684aef779e019c8cc64e Merge: 1a2a76c2685a 0fd169576648 Author: Linus Torvalds Date: Sun Feb 9 12:41:00 2020 -0800 Merge branch 'work.vboxsf' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vboxfs from Al Viro: "This is the VirtualBox guest shared folder support by Hans de Goede, with fixups for fs_parse folded in to avoid bisection hazards from those API changes..." * 'work.vboxsf' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: Add VirtualBox guest shared folder (vboxsf) support commit 1a2a76c2685a29e46d7b37e752ccea7b15aa8e24 Merge: f41377609a72 0f378d73d429 Author: Linus Torvalds Date: Sun Feb 9 12:11:12 2020 -0800 Merge tag 'x86-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "A set of fixes for X86: - Ensure that the PIT is set up when the local APIC is disable or configured in legacy mode. This is caused by an ordering issue introduced in the recent changes which skip PIT initialization when the TSC and APIC frequencies are already known. - Handle malformed SRAT tables during early ACPI parsing which caused an infinite loop anda boot hang. - Fix a long standing race in the affinity setting code which affects PCI devices with non-maskable MSI interrupts. The problem is caused by the non-atomic writes of the MSI address (destination APIC id) and data (vector) fields which the device uses to construct the MSI message. The non-atomic writes are mandated by PCI. If both fields change and the device raises an interrupt after writing address and before writing data, then the MSI block constructs a inconsistent message which causes interrupts to be lost and subsequent malfunction of the device. The fix is to redirect the interrupt to the new vector on the current CPU first and then switch it over to the new target CPU. This allows to observe an eventually raised interrupt in the transitional stage (old CPU, new vector) to be observed in the APIC IRR and retriggered on the new target CPU and the new vector. The potential spurious interrupts caused by this are harmless and can in the worst case expose a buggy driver (all handlers have to be able to deal with spurious interrupts as they can and do happen for various reasons). - Add the missing suspend/resume mechanism for the HYPERV hypercall page which prevents resume hibernation on HYPERV guests. This change got lost before the merge window. - Mask the IOAPIC before disabling the local APIC to prevent potentially stale IOAPIC remote IRR bits which cause stale interrupt lines after resume" * tag 'x86-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/apic: Mask IOAPIC entries when disabling the local APIC x86/hyperv: Suspend/resume the hypercall page for hibernation x86/apic/msi: Plug non-maskable MSI affinity race x86/boot: Handle malformed SRAT tables during early ACPI parsing x86/timer: Don't skip PIT setup when APIC is disabled or in legacy mode commit f41377609a722fec65f4b0df4e8dc5ea946fb866 Merge: ca21b9b37059 1e474b28e788 Author: Linus Torvalds Date: Sun Feb 9 12:09:43 2020 -0800 Merge tag 'smp-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull SMP fixes from Thomas Gleixner: "Two fixes for the SMP related functionality: - Make the UP version of smp_call_function_single() match SMP semantics when called for a not available CPU. Instead of emitting a warning and assuming that the function call target is CPU0, return a proper error code like the SMP version does. - Remove a superfluous check in smp_call_function_many_cond()" * tag 'smp-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: smp/up: Make smp_call_function_single() match SMP semantics smp: Remove superfluous cond_func check in smp_call_function_many_cond() commit ca21b9b37059ee07176028de415cc4699db259cb Merge: 2fbc23c73835 45f035748b2a Author: Linus Torvalds Date: Sun Feb 9 12:04:09 2020 -0800 Merge tag 'perf-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "A set of fixes and improvements for the perf subsystem: Kernel fixes: - Install cgroup events to the correct CPU context to prevent a potential list double add - Prevent an integer underflow in the perf mlock accounting - Add a missing prototype for arch_perf_update_userpage() Tooling: - Add a missing unlock in the error path of maps__insert() in perf maps. - Fix the build with the latest libbfd - Fix the perf parser so it does not delete parse event terms, which caused a regression for using perf with the ARM CoreSight as the sink configuration was missing due to the deletion. - Fix the double free in the perf CPU map merging test case - Add the missing ustring support for the perf probe command" * tag 'perf-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf maps: Add missing unlock to maps__insert() error case perf probe: Add ustring support for perf probe command perf: Make perf able to build with latest libbfd perf test: Fix test case Merge cpu map perf parse: Copy string to perf_evsel_config_term perf parse: Refactor 'struct perf_evsel_config_term' kernel/events: Add a missing prototype for arch_perf_update_userpage() perf/cgroups: Install cgroup events to correct cpuctx perf/core: Fix mlock accounting in perf_mmap() commit 2fbc23c738350f1a47007da7ad92ae2e4ea63951 Merge: f06bed87d7cd febac332a819 Author: Linus Torvalds Date: Sun Feb 9 12:00:12 2020 -0800 Merge tag 'timers-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "Two small fixes for the time(r) subsystem: - Handle a subtle race between the clocksource watchdog and a concurrent clocksource watchdog stop/start sequence correctly to prevent a timer double add bug. - Fix the file path for the core time namespace file" * tag 'timers-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource: Prevent double add_timer_on() for watchdog_timer MAINTAINERS: Correct path to time namespace source file commit f06bed87d7cdfd51793cbb0111799f39ba75cfa3 Merge: 6ff90aa2cfdd 2f86e45a7f42 Author: Linus Torvalds Date: Sun Feb 9 11:56:41 2020 -0800 Merge tag 'irq-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull interrupt fixes from Thomas Gleixner: "A set of fixes for the interrupt subsystem: - Provision only ACPI enabled redistributors on GICv3 - Use the proper command colums when building the INVALL command for the GICv3-ITS - Ensure the allocation of the L2 vPE table for GICv4.1 - Correct the GICv4.1 VPROBASER programming so it uses the proper size - A set of small GICv4.1 tidy up patches - Configuration cleanup for C-SKY interrupt chip - Clarify the function documentation for irq_set_wake() to document that the wakeup functionality is orthogonal to the irq disable/enable mechanism" * tag 'irq-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gic-v3-its: Rename VPENDBASER/VPROPBASER accessors irqchip/gic-v3-its: Remove superfluous WARN_ON irqchip/gic-v4.1: Drop 'tmp' in inherit_vpe_l1_table_from_rd() irqchip/gic-v4.1: Ensure L2 vPE table is allocated at RD level irqchip/gic-v4.1: Set vpe_l1_base for all redistributors irqchip/gic-v4.1: Fix programming of GICR_VPROPBASER_4_1_SIZE genirq: Clarify that irq wake state is orthogonal to enable/disable irqchip/gic-v3-its: Reference to its_invall_cmd descriptor when building INVALL irqchip: Some Kconfig cleanup for C-SKY irqchip/gic-v3: Only provision redistributors that are enabled in ACPI commit 6ff90aa2cfddb1bce5450cb711069315ad17bd14 Merge: fdfa3a6778b1 59365cadfbcd Author: Linus Torvalds Date: Sun Feb 9 11:54:50 2020 -0800 Merge tag 'efi-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fix from Thomas Gleixner: "A single fix for a EFI boot regression on X86 which was caused by the recent rework of the EFI memory map parsing. On systems with invalid memmap entries the cleanup function uses an value which cannot be relied on in this stage. Use the actual EFI memmap entry instead" * tag 'efi-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/x86: Fix boot regression on systems with invalid memmap entries commit b537916ca5107c3a8714b8ab3099c0ec205aec12 Author: Jens Axboe Date: Sun Feb 9 11:29:15 2020 -0700 io_uring: retain sockaddr_storage across send/recvmsg async punt Jonas reports that he sometimes sees -97/-22 error returns from sendmsg, if it gets punted async. This is due to not retaining the sockaddr_storage between calls. Include that in the state we copy when going async. Cc: stable@vger.kernel.org # 5.3+ Reported-by: Jonas Bonn Tested-by: Jonas Bonn Signed-off-by: Jens Axboe commit c2cebbc4a593bd2ee72d46a8439dcbca512b5507 Author: Zhang Xiaoxu Date: Fri Jan 17 15:34:36 2020 +0800 drm/i915: Fix i915_error_state_store error defination Since commit 742379c0c4001 ("drm/i915: Start chopping up the GPU error capture"), function 'i915_error_state_store' was defined and used with only one parameter. But if no 'CONFIG_DRM_I915_CAPTURE_ERROR', this function was defined with two parameter. This may lead compile error. This patch fix it. Fixes: 742379c0c400 ("drm/i915: Start chopping up the GPU error capture") Reported-by: Hulk Robot Signed-off-by: Zhang Xiaoxu Reviewed-by: Andi Shyti Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200117073436.6507-1-zhangxiaoxu5@huawei.com (cherry picked from commit 04062c58faafddf62006c6f8e5077dc050e8207e) Signed-off-by: Jani Nikula commit 6ab231448fdc5e37c15a94a4700fca11e80007f7 Author: Jens Axboe Date: Sat Feb 8 20:23:59 2020 -0700 io_uring: cancel pending async work if task exits Normally we cancel all work we track, but for untracked work we could leave the async worker behind until that work completes. This is totally fine, but does leave resources pending after the task is gone until that work completes. Cancel work that this task queued up when it goes away. Signed-off-by: Jens Axboe commit 36282881a795cbf717aca79392ae9cdf0fef59c9 Author: Jens Axboe Date: Sat Feb 8 19:16:39 2020 -0700 io-wq: add io_wq_cancel_pid() to cancel based on a specific pid Add a helper that allows the caller to cancel work based on what mm it belongs to. This allows io_uring to cancel work from a given task or thread when it exits. Signed-off-by: Jens Axboe commit 00bcda13dcbf6bf7fa6f2a5886dd555362de8cfa Author: Jens Axboe Date: Sat Feb 8 19:13:32 2020 -0700 io-wq: make io_wqe_cancel_work() take a match handler We want to use the cancel functionality for canceling based on not just the work itself. Instead of matching on the work address manually, allow a match handler to tell us if we found the right work item or not. No functional changes in this patch. Signed-off-by: Jens Axboe commit e73c1486e4c867865fff1cfa0f0315a107ff4c21 Author: Vandita Kulkarni Date: Fri Jan 24 18:28:29 2020 +0530 drm/i915/bios: Fix the timing parameters Fix htotal and vtotal parameters derived from DTD block of VBT. The values miss the back porch. Fixes: 33ef6d4fd8df ("drm/i915/vbt: Handle generic DTD block") Signed-off-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200124125829.16973-1-vandita.kulkarni@intel.com (cherry picked from commit ad278f358446707d03a1fe89f880e6ac80ca06cd) Signed-off-by: Jani Nikula commit 1788fdf14e518e363bae9d18345d93102f4ee5ad Author: Vivek Kasireddy Date: Fri Jan 17 16:58:48 2020 -0800 drm/i915/dsi: Ensure that the ACPI adapter lookup overrides the bus num Remove the i2c_bus_num >= 0 check from the adapter lookup function as this would prevent ACPI bus number override. This check was mainly there to return early if the bus number has already been found but we anyway return in the next line if the slave address does not match. Fixes: 8cbf89db2941 ("drm/i915/dsi: Parse the I2C element from the VBT MIPI sequence block (v3)") Cc: Hans de Goede Cc: Nabendu Maiti Cc: Matt Roper Cc: Bob Paauwe Cc: Jani Nikula Signed-off-by: Vivek Kasireddy Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200118005848.20382-1-vivek.kasireddy@intel.com (cherry picked from commit de409661c4c90d63cfc64579edbad0a6b10bd50d) Signed-off-by: Jani Nikula commit 0887aa8744aea22c10cd4c36746596d67fa8da98 Author: Ville Syrjälä Date: Wed Jan 15 21:08:09 2020 +0200 drm/i915: Fix post-fastset modeset check for port sync The post-fastset "does anyone still need a full modeset?" for port sync looks busted. The outer loop bails out of a full modeset is still needed by the current crtc, and then we skip forcing a full modeset on the related crtcs. That's totally the opposite of what we want. The MST path has the logic mostly the other way around so it looks correct. To fix the port sync case let's follow the MST logic for both. So, if the current crtc already needs a modeset we do nothing. otherwise we check if any of the related crtcs needs a modeset, and if so we force a full modeset for the current crtc. And while at let's change the else if to a plain if to so we don't have needless coupling between the MST and port sync checks. Cc: José Roberto de Souza Cc: Manasi Navare Fixes: 05a8e45136ca ("drm/i915/display: Use external dependency loop for port sync") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200115190813.17971-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza (cherry picked from commit d0eed1545fe75f115a548691a008e94b0e7abc45) Signed-off-by: Jani Nikula commit 6f4261fa86dfe08c34ad99eba66368f43e9dd4c3 Author: Vivek Kasireddy Date: Tue Jan 14 17:23:05 2020 -0800 drm/i915/dsi: Lookup the i2c bus from ACPI NS only if CONFIG_ACPI=y (v2) Perform the i2c bus/adapter lookup from ACPI Namespace only if ACPI is enabled in the kernel config. If ACPI is not enabled or if the lookup fails, we'll fallback to using the VBT for identifying the i2c bus. v2: Add fixes tag (Jani) Fixes: 8cbf89db2941 ("drm/i915/dsi: Parse the I2C element from the VBT MIPI sequence block (v3)") Cc: Hans de Goede Cc: Nabendu Maiti Cc: Matt Roper Cc: Bob Paauwe Cc: Ville Syrjälä Cc: Jani Nikula Cc: Zhang Xiaoxu Reported-by: Hulk Robot Signed-off-by: Vivek Kasireddy Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200115012305.27395-1-vivek.kasireddy@intel.com (cherry picked from commit 960287ca58fd549af9826ff1cb735fe17d031486) Signed-off-by: Jani Nikula commit 3508aae9b5618aca727f07c183e25d09033a5b66 Author: Krzysztof Kozlowski Date: Thu Jan 30 20:55:25 2020 +0100 ARM: configs: Cleanup old Kconfig options CONFIG_MMC_BLOCK_BOUNCE is gone since commit c3dccb74be28 ("mmc: core: Delete bounce buffer Kconfig option"). CONFIG_LBDAF is gone since commit 72deb455b5ec ("block: remove CONFIG_LBDAF"). CONFIG_IOSCHED_DEADLINE and CONFIG_IOSCHED_CFQ are gone since commit f382fb0bcef4 ("block: remove legacy IO schedulers"). The IOSCHED_DEADLINE was replaced by MQ_IOSCHED_DEADLINE and it will be now enabled by default (along with MQ_IOSCHED_KYBER). The IOSCHED_BFQ seems to replace IOSCHED_CFQ so select it in configs previously choosing the latter. CONFIG_CROSS_COMPILE is gone since commit f1089c92da79 ("kbuild: remove CONFIG_CROSS_COMPILE support"). Link: https://lore.kernel.org/r/20200130195525.4525-2-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Acked-by: Arnd Bergmann Signed-off-by: Olof Johansson commit e383e871ab54f073c2a798a9e0bde7f1d0528de8 Author: Krzysztof Kozlowski Date: Thu Jan 30 20:55:24 2020 +0100 ARM: npcm: Bring back GPIOLIB support The CONFIG_ARCH_REQUIRE_GPIOLIB is gone since commit 65053e1a7743 ("gpio: delete ARCH_[WANTS_OPTIONAL|REQUIRE]_GPIOLIB") and all platforms should explicitly select GPIOLIB to have it. Link: https://lore.kernel.org/r/20200130195525.4525-1-krzk@kernel.org Cc: Fixes: 65053e1a7743 ("gpio: delete ARCH_[WANTS_OPTIONAL|REQUIRE]_GPIOLIB") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Olof Johansson commit fdfa3a6778b194974df77b384cc71eb2e503639a Merge: 291abfea4746 e0a514259378 Author: Linus Torvalds Date: Sat Feb 8 17:24:41 2020 -0800 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull misc SCSI fixes from James Bottomley: "Five small patches, all in drivers or doc, which missed the initial pull request. The qla2xxx and megaraid_sas are actual fixes and the rest are spelling and doc changes" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: fix spelling mistake "initilized" -> "initialized" scsi: pm80xx: fix spelling mistake "to" -> "too" scsi: MAINTAINERS: ufs: remove pedrom.sousa@synopsys.com scsi: megaraid_sas: fixup MSIx interrupt setup during resume scsi: qla2xxx: Fix unbound NVME response length commit 291abfea4746897b821830e0189dc225abd401eb Merge: d4f309ca4118 29ca3b31756f Author: Linus Torvalds Date: Sat Feb 8 17:15:08 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Unbalanced locking in mwifiex_process_country_ie, from Brian Norris. 2) Fix thermal zone registration in iwlwifi, from Andrei Otcheretianski. 3) Fix double free_irq in sgi ioc3 eth, from Thomas Bogendoerfer. 4) Use after free in mptcp, from Florian Westphal. 5) Use after free in wireguard's root_remove_peer_lists, from Eric Dumazet. 6) Properly access packets heads in bonding alb code, from Eric Dumazet. 7) Fix data race in skb_queue_len(), from Qian Cai. 8) Fix regression in r8169 on some chips, from Heiner Kallweit. 9) Fix XDP program ref counting in hv_netvsc, from Haiyang Zhang. 10) Certain kinds of set link netlink operations can cause a NULL deref in the ipv6 addrconf code. Fix from Eric Dumazet. 11) Don't cancel uninitialized work queue in drop monitor, from Ido Schimmel. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (84 commits) net: thunderx: use proper interface type for RGMII mt76: mt7615: fix max_nss in mt7615_eeprom_parse_hw_cap bpf: Improve bucket_log calculation logic selftests/bpf: Test freeing sockmap/sockhash with a socket in it bpf, sockhash: Synchronize_rcu before free'ing map bpf, sockmap: Don't sleep while holding RCU lock on tear-down bpftool: Don't crash on missing xlated program instructions bpf, sockmap: Check update requirements after locking drop_monitor: Do not cancel uninitialized work item mlxsw: spectrum_dpipe: Add missing error path mlxsw: core: Add validation of hardware device types for MGPIR register mlxsw: spectrum_router: Clear offload indication from IPv6 nexthops on abort selftests: mlxsw: Add test cases for local table route replacement mlxsw: spectrum_router: Prevent incorrect replacement of local table routes net: dsa: microchip: enable module autoprobe ipv6/addrconf: fix potential NULL deref in inet6_set_link_af() dpaa_eth: support all modes with rate adapting PHYs net: stmmac: update pci platform data to use phy_interface net: stmmac: xgmac: fix missing IFF_MULTICAST checki in dwxgmac2_set_filter net: stmmac: fix missing IFF_MULTICAST check in dwmac4_set_filter ... commit 0fd169576648452725fa2949bf391d10883d3991 Author: Hans de Goede Date: Thu Dec 12 15:09:14 2019 +0100 fs: Add VirtualBox guest shared folder (vboxsf) support VirtualBox hosts can share folders with guests, this commit adds a VFS driver implementing the Linux-guest side of this, allowing folders exported by the host to be mounted under Linux. This driver depends on the guest <-> host IPC functions exported by the vboxguest driver. Acked-by: Christoph Hellwig Signed-off-by: Hans de Goede Signed-off-by: Al Viro commit d4f309ca411887cd61ea389c7abfb70c2eb1e532 Merge: b0ef7cda8d9b d4bf905307a1 Author: Linus Torvalds Date: Sat Feb 8 14:28:26 2020 -0800 Merge tag 'powerpc-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix an existing bug in our user access handling, exposed by one of the bug fixes we merged this cycle. - A fix for a boot hang on 32-bit with CONFIG_TRACE_IRQFLAGS and the recently added CONFIG_VMAP_STACK. Thanks to: Christophe Leroy, Guenter Roeck. * tag 'powerpc-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: Fix CONFIG_TRACE_IRQFLAGS with CONFIG_VMAP_STACK powerpc/futex: Fix incorrect user access blocking commit b0ef7cda8d9be41ba198207c30a037bc470d9aef Author: Linus Torvalds Date: Sat Feb 8 14:19:39 2020 -0800 Fix up remaining devm_ioremap_nocache() in SGI IOC3 8250 UART driver This is a merge error on my part - the driver was merged into mainline by commit c5951e7c8ee5 ("Merge tag 'mips_5.6' of git://../mips/linux") over a week ago, but nobody apparently noticed that it didn't actually build due to still having a reference to the devm_ioremap_nocache() function, removed a few days earlier through commit 6a1000bd2703 ("Merge tag 'ioremap-5.6' of git://../ioremap"). Apparently this didn't get any build testing anywhere. Not perhaps all that surprising: it's restricted to 64-bit MIPS only, and only with the new SGI_MFD_IOC3 support enabled. I only noticed because the ioremap conflicts in the ARM SoC driver update made me check there weren't any others hiding, and I found this one. Signed-off-by: Linus Torvalds commit 4ef1a30c6bd2555d4177fc9286df32e9166d58ba Merge: 5939224ccdcc a832eb203ecd Author: Linus Torvalds Date: Sat Feb 8 14:17:27 2020 -0800 Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC late updates from Olof Johansson: "This is some material that we picked up into our tree late, or that had more complex dependencies on more than one topic branch that makes sense to keep separately. - TI support for secure accelerators and hwrng on OMAP4/5 - TI camera changes for dra7 and am437x and SGX improvement due to better reset control support on am335x, am437x and dra7 - Davinci moves to proper clocksource on DM365, and regulator/audio improvements for DM365 and DM644x eval boards" * tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (32 commits) ARM: dts: omap4-droid4: Enable hdq for droid4 ds250x 1-wire battery nvmem ARM: dts: motorola-cpcap-mapphone: Configure calibration interrupt ARM: dts: Configure interconnect target module for am437x sgx ARM: dts: Configure sgx for dra7 ARM: dts: Configure rstctrl reset for am335x SGX ARM: dts: dra7: Add ti-sysc node for VPE ARM: dts: dra7: add vpe clkctrl node ARM: dts: am43x-epos-evm: Add VPFE and OV2659 entries ARM: dts: am437x-sk-evm: Add VPFE and OV2659 entries ARM: dts: am43xx: add support for clkout1 clock arm: dts: dra76-evm: Add CAL and OV5640 nodes arm: dtsi: dra76x: Add CAL dtsi node arm: dts: dra72-evm-common: Add entries for the CSI2 cameras ARM: dts: DRA72: Add CAL dtsi node ARM: dts: dra7-l4: Add ti-sysc node for CAM ARM: OMAP: DRA7xx: Make CAM clock domain SWSUP only ARM: dts: dra7: add cam clkctrl node ARM: OMAP2+: Drop legacy platform data for omap4 des ARM: OMAP2+: Drop legacy platform data for omap4 sham ARM: OMAP2+: Drop legacy platform data for omap4 aes ... commit 5939224ccdcc9244ab82cdbdc9d21eb019f7db6a Merge: eab3540562fb 1342a6aa4abf Author: Linus Torvalds Date: Sat Feb 8 14:15:41 2020 -0800 Merge tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC defconfig updates from Olof Johansson: "We keep this in a separate branch to avoid cross-branch conflicts, but most of the material here is fairly boring -- some new drivers turned on for hardware since they were merged, and some refreshed files due to time having moved a lot of entries around" * tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (38 commits) ARM: configs: at91: enable MMC_SDHCI_OF_AT91 and MICROCHIP_PIT64B arm64: defconfig: Enable Broadcom's GENET Ethernet controller ARM: multi_v7_defconfig: Enable devfreq thermal integration ARM: exynos_defconfig: Enable devfreq thermal integration ARM: multi_v7_defconfig: Enable NFS v4.1 and v4.2 ARM: exynos_defconfig: Enable NFS v4.1 and v4.2 arm64: defconfig: Enable Actions Semi specific drivers arm64: defconfig: Enable Broadcom's STB PCIe controller arm64: defconfig: Enable CONFIG_CLK_IMX8MP by default ARM: configs: at91: enable config flags for sam9x60 SoC ARM: configs: at91: use savedefconfig arm64: defconfig: Enable tegra XUDC support ARM: defconfig: gemini: Update defconfig arm64: defconfig: enable CONFIG_ARM_QCOM_CPUFREQ_NVMEM arm64: defconfig: enable CONFIG_QCOM_CPR arm64: defconfig: Enable HFPLL arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM ARM: imx_v6_v7_defconfig: Select the TFP410 driver ARM: imx_v6_v7_defconfig: Enable NFS_V4_1 and NFS_V4_2 support arm64: defconfig: Enable ATH10K_SNOC ... commit eab3540562fb44f830e09492374fcc69a283ce47 Merge: 1afa9c3b7c9b 88b4750151a2 Author: Linus Torvalds Date: Sat Feb 8 14:04:19 2020 -0800 Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC-related driver updates from Olof Johansson: "Various driver updates for platforms: - Nvidia: Fuse support for Tegra194, continued memory controller pieces for Tegra30 - NXP/FSL: Refactorings of QuickEngine drivers to support ARM/ARM64/PPC - NXP/FSL: i.MX8MP SoC driver pieces - TI Keystone: ring accelerator driver - Qualcomm: SCM driver cleanup/refactoring + support for new SoCs. - Xilinx ZynqMP: feature checking interface for firmware. Mailbox communication for power management - Overall support patch set for cpuidle on more complex hierarchies (PSCI-based) and misc cleanups, refactorings of Marvell, TI, other platforms" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (166 commits) drivers: soc: xilinx: Use mailbox IPI callback dt-bindings: power: reset: xilinx: Add bindings for ipi mailbox drivers: soc: ti: knav_qmss_queue: Pass lockdep expression to RCU lists MAINTAINERS: Add brcmstb PCIe controller entry soc/tegra: fuse: Unmap registers once they are not needed anymore soc/tegra: fuse: Correct straps' address for older Tegra124 device trees soc/tegra: fuse: Warn if straps are not ready soc/tegra: fuse: Cache values of straps and Chip ID registers memory: tegra30-emc: Correct error message for timed out auto calibration memory: tegra30-emc: Firm up hardware programming sequence memory: tegra30-emc: Firm up suspend/resume sequence soc/tegra: regulators: Do nothing if voltage is unchanged memory: tegra: Correct reset value of xusb_hostr soc/tegra: fuse: Add APB DMA dependency for Tegra20 bus: tegra-aconnect: Remove PM_CLK dependency dt-bindings: mediatek: add MT6765 power dt-bindings soc: mediatek: cmdq: delete not used define memory: tegra: Add support for the Tegra194 memory controller memory: tegra: Only include support for enabled SoCs memory: tegra: Support DVFS on Tegra186 and later ... commit 1afa9c3b7c9bdcb562e2afe9f58cc99d0b071cdc Merge: 469030d454bd d030a0dd0130 Author: Linus Torvalds Date: Sat Feb 8 13:58:44 2020 -0800 Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM Device-tree updates from Olof Johansson: "New SoCs: - Atmel/Microchip SAM9X60 (ARM926 SoC) - OMAP 37xx gets split into AM3703/AM3715/DM3725, who are all variants of it with different GPU/media IP configurations. - ST stm32mp15 SoCs (1-2 Cortex-A7, CAN, GPU depending on SKU) - ST Ericsson ab8505 (variant of ab8500) and db8520 (variant of db8500) - Unisoc SC9863A SoC (8x Cortex-A55 mobile chipset w/ GPU, modem) - Qualcomm SC7180 (8-core 64bit SoC, unnamed CPU class) New boards: - Allwinner: + Emlid Neutis SoM (H3 variant) + Libre Computer ALL-H3-IT + PineH64 Model B - Amlogic: + Libretech Amlogic GX PC (s905d and s912-based variants) - Atmel/Microchip: + Kizboxmini, sam9x60 EK, sama5d27 Wireless SOM (wlsom1) - Marvell: + Armada 385-based SolidRun Clearfog GTR - NXP: + Gateworks GW59xx boards based on i.MX6/6Q/6QDL + Tolino Shine 3 eBook reader (i.MX6sl) + Embedded Artists COM (i.MX7ULP) + SolidRun CLearfog CX/ITX and HoneyComb (LX2160A-based systems) + Google Coral Edge TPU (i.MX8MQ) - Rockchip: + Radxa Dalang Carrier (supports rk3288 and rk3399 SOMs) + Radxa Rock Pi N10 (RK3399Pro-based) + VMARC RK3399Pro SOM - ST: + Reference boards for stm32mp15 - ST Ericsson: + Samsung Galaxy S III mini (GT-I8190) + HREF520 reference board for DB8520 - TI OMAP: + Gen1 Amazon Echo (OMAP3630-based) - Qualcomm: + Inforce 6640 Single Board Computer (msm8996-based) + SC7180 IDP (SC7180-based)" * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (623 commits) dt-bindings: fix compilation error of the example in marvell,mmp3-hsic-phy.yaml arm64: dts: ti: k3-am654-base-board: Add CSI2 OV5640 camera arm64: dts: ti: k3-am65-main Add CAL node arm64: dts: ti: k3-j721e-main: Add McASP nodes arm64: dts: ti: k3-am654-main: Add McASP nodes arm64: dts: ti: k3-j721e: DMA support arm64: dts: ti: k3-j721e-main: Move secure proxy and smmu under main_navss arm64: dts: ti: k3-j721e-main: Correct main NAVSS representation arm64: dts: ti: k3-j721e: Correct the address for MAIN NAVSS arm64: dts: ti: k3-am65: DMA support arm64: dts: ti: k3-am65-main: Move secure proxy under cbass_main_navss arm64: dts: ti: k3-am65-main: Correct main NAVSS representation ARM: dts: aspeed: rainier: Add UCD90320 power sequencer ARM: dts: aspeed: rainier: Switch PSUs to unknown version arm64: dts: rockchip: Kill off "simple-panel" compatibles ARM: dts: rockchip: Kill off "simple-panel" compatibles arm64: dts: rockchip: rename dwmmc node names to mmc ARM: dts: rockchip: rename dwmmc node names to mmc arm64: dts: exynos: Rename Samsung and Exynos to lowercase arm64: dts: uniphier: add reset-names to NAND controller node ... commit 469030d454bd1620c7b2651d9ec8cdcbaa74deb9 Merge: b85080c106b1 d8430df17211 Author: Linus Torvalds Date: Sat Feb 8 13:55:25 2020 -0800 Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC platform updates from Olof Johansson: "Most of these are smaller fixes that have accrued, and some continued cleanup of OMAP platforms towards shared frameworks. One new SoC from Atmel/Microchip: sam9x60" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (35 commits) ARM: OMAP2+: Fix undefined reference to omap_secure_init ARM: s3c64xx: Drop unneeded select of TIMER_OF ARM: exynos: Drop unneeded select of MIGHT_HAVE_CACHE_L2X0 ARM: s3c24xx: Switch to atomic pwm API in rx1950 ARM: OMAP2+: sleep43xx: Call secure suspend/resume handlers ARM: OMAP2+: Use ARM SMC Calling Convention when OP-TEE is available ARM: OMAP2+: Introduce check for OP-TEE in omap_secure_init() ARM: OMAP2+: Add omap_secure_init callback hook for secure initialization ARM: at91: Documentation: add sam9x60 product and datasheet ARM: at91: pm: use of_device_id array to find the proper shdwc node ARM: at91: pm: use SAM9X60 PMC's compatible ARM: imx: only select ARM_ERRATA_814220 for ARMv7-A ARM: zynq: use physical cpuid in zynq_slcr_cpu_stop/start ARM: tegra: Use clk_m CPU on Tegra124 LP1 resume ARM: tegra: Modify reshift divider during LP1 ARM: tegra: Enable PLLP bypass during Tegra124 LP1 ARM: samsung: Rename Samsung and Exynos to lowercase ARM: exynos: Correct the help text for platform Kconfig option ARM: bcm: Select ARM_AMBA for ARCH_BRCMSTB ARM: brcmstb: Add debug UART entry for 7216 ... commit b85080c106b1290eaebf100ee97babef833047d8 Merge: c9d35ee049b4 0a061743af93 Author: Linus Torvalds Date: Sat Feb 8 13:44:41 2020 -0800 Merge tag 'compat-ioctl-fix' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground Pull compat-ioctl fix from Arnd Bergmann: "One patch in the compat-ioctl series broke 32-bit rootfs for multiple people testing on 64-bit kernels. Let's fix it in -rc1 before others run into the same issue" * tag 'compat-ioctl-fix' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground: compat_ioctl: fix FIONREAD on devices commit c9d35ee049b40f1d73e890bf88dd55f83b1e9be8 Merge: 236f45329460 f35aa2bc809e Author: Linus Torvalds Date: Sat Feb 8 13:26:41 2020 -0800 Merge branch 'merge.nfs-fs_parse.1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs file system parameter updates from Al Viro: "Saner fs_parser.c guts and data structures. The system-wide registry of syntax types (string/enum/int32/oct32/.../etc.) is gone and so is the horror switch() in fs_parse() that would have to grow another case every time something got added to that system-wide registry. New syntax types can be added by filesystems easily now, and their namespace is that of functions - not of system-wide enum members. IOW, they can be shared or kept private and if some turn out to be widely useful, we can make them common library helpers, etc., without having to do anything whatsoever to fs_parse() itself. And we already get that kind of requests - the thing that finally pushed me into doing that was "oh, and let's add one for timeouts - things like 15s or 2h". If some filesystem really wants that, let them do it. Without somebody having to play gatekeeper for the variants blessed by direct support in fs_parse(), TYVM. Quite a bit of boilerplate is gone. And IMO the data structures make a lot more sense now. -200LoC, while we are at it" * 'merge.nfs-fs_parse.1' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (25 commits) tmpfs: switch to use of invalfc() cgroup1: switch to use of errorfc() et.al. procfs: switch to use of invalfc() hugetlbfs: switch to use of invalfc() cramfs: switch to use of errofc() et.al. gfs2: switch to use of errorfc() et.al. fuse: switch to use errorfc() et.al. ceph: use errorfc() and friends instead of spelling the prefix out prefix-handling analogues of errorf() and friends turn fs_param_is_... into functions fs_parse: handle optional arguments sanely fs_parse: fold fs_parameter_desc/fs_parameter_spec fs_parser: remove fs_parameter_description name field add prefix to fs_context->log ceph_parse_param(), ceph_parse_mon_ips(): switch to passing fc_log new primitive: __fs_parse() switch rbd and libceph to p_log-based primitives struct p_log, variants of warnf() et.al. taking that one instead teach logfc() to handle prefices, give it saner calling conventions get rid of cg_invalf() ... commit 236f45329460f76d058111de1a1cea12f5a8b734 Merge: 995933305e11 12efec560274 Author: Linus Torvalds Date: Sat Feb 8 13:04:49 2020 -0800 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs updates from Al Viro: - bmap series from cmaiolino - getting rid of convolutions in copy_mount_options() (use a couple of copy_from_user() instead of the __get_user() crap) * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: saner copy_mount_options() fibmap: Reject negative block numbers fibmap: Use bmap instead of ->bmap method in ioctl_fibmap ecryptfs: drop direct calls to ->bmap cachefiles: drop direct usage of ->bmap method. fs: Enable bmap() function to properly return errors commit 0bdbdd08a8f991bdaee54465a168c0795ea5d28b Author: Pavel Begunkov Date: Sat Feb 8 13:28:03 2020 +0300 io_uring: fix openat/statx's filename leak As in the previous patch, make openat*_prep() and statx_prep() handle double preparation to avoid resource leakage. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 5f798beaf35d79355cbf18019c1993a84475a2c3 Author: Pavel Begunkov Date: Sat Feb 8 13:28:02 2020 +0300 io_uring: fix double prep iovec leak Requests may be prepared multiple times with ->io allocated (i.e. async prepared). Preparation functions don't handle it and forget about previously allocated resources. This may happen in case of: - spurious defer_check - non-head (i.e. async prepared) request executed in sync (via nxt). Make the handlers check, whether they already allocated resources, which is true IFF REQ_F_NEED_CLEANUP is set. Cc: stable@vger.kernel.org # 5.5 Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit a93b33312f63ef6d5997f45d6fdf4de84c5396cc Author: Pavel Begunkov Date: Sat Feb 8 14:04:34 2020 +0300 io_uring: fix async close() with f_op->flush() First, io_close() misses filp_close() and io_cqring_add_event(), when f_op->flush is defined. That's because in this case it will io_queue_async_work() itself not grabbing files, so the corresponding chunk in io_close_finish() won't be executed. Second, when submitted through io_wq_submit_work(), it will do filp_close() and *_add_event() twice: first inline in io_close(), and the second one in call to io_close_finish() from io_close(). The second one will also fire, because it was submitted async through generic path, and so have grabbed files. And the last nice thing is to remove this weird pilgrimage with checking work/old_work and casting it to nxt. Just use a helper instead. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 0b5faf6ba7fb78bb1fe7336d23ea1978386a6c3a Author: Jens Axboe Date: Thu Feb 6 21:42:51 2020 -0700 io_uring: allow AT_FDCWD for non-file openat/openat2/statx Don't just check for dirfd == -1, we should allow AT_FDCWD as well for relative lookups. Signed-off-by: Jens Axboe commit ff002b30181d30cdfbca316dadd099c3ca0d739c Author: Jens Axboe Date: Fri Feb 7 16:05:21 2020 -0700 io_uring: grab ->fs as part of async preparation This passes it in to io-wq, so it assumes the right fs_struct when executing async work that may need to do lookups. Cc: stable@vger.kernel.org # 5.3+ Signed-off-by: Jens Axboe commit 9392a27d88b9707145d713654eb26f0c29789e50 Author: Jens Axboe Date: Thu Feb 6 21:42:51 2020 -0700 io-wq: add support for inheriting ->fs Some work items need this for relative path lookup, make it available like the other inherited credentials/mm/etc. Cc: stable@vger.kernel.org # 5.3+ Signed-off-by: Jens Axboe commit faac996ccd5da95bc56b91aa80f2643c2d0a1c56 Author: Jens Axboe Date: Fri Feb 7 15:45:22 2020 -0700 io_uring: retry raw bdev writes if we hit -EOPNOTSUPP For non-blocking issue, we set IOCB_NOWAIT in the kiocb. However, on a raw block device, this yields an -EOPNOTSUPP return, as non-blocking writes aren't supported. Turn this -EOPNOTSUPP into -EAGAIN, so we retry from blocking context with IOCB_NOWAIT cleared. Cc: stable@vger.kernel.org # 5.5 Signed-off-by: Jens Axboe commit 8fef80bf56a49c60b457dedb99fd6c5279a5dbe1 Author: Pavel Begunkov Date: Fri Feb 7 23:59:53 2020 +0300 io_uring: add cleanup for openat()/statx() openat() and statx() may have allocated ->open.filename, which should be be put. Add cleanup handlers for them. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 99bc4c38537d774e667d043c520914082da19abf Author: Pavel Begunkov Date: Fri Feb 7 22:04:45 2020 +0300 io_uring: fix iovec leaks Allocated iovec is freed only in io_{read,write,send,recv)(), and just leaves it if an error occured. There are plenty of such cases: - cancellation of non-head requests - fail grabbing files in __io_queue_sqe() - set REQ_F_NOWAIT and returning in __io_queue_sqe() Add REQ_F_NEED_CLEANUP, which will force such requests with custom allocated resourses go through cleanup handlers on put. Cc: stable@vger.kernel.org # 5.5 Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e96e977992d0ea40b6e70cb63dede85c9078e744 Author: Pavel Begunkov Date: Fri Feb 7 19:21:25 2020 +0300 io_uring: remove unused struct io_async_open struct io_async_open is unused, remove it. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 63e5d81f72af1bf370bf8a6745b0a8d71a7bb37d Author: Stefano Garzarella Date: Fri Feb 7 13:18:28 2020 +0100 io_uring: flush overflowed CQ events in the io_uring_poll() In io_uring_poll() we must flush overflowed CQ events before to check if there are CQ events available, to avoid missing events. We call the io_cqring_events() that checks and flushes any overflow and returns the number of CQ events available. Signed-off-by: Stefano Garzarella Signed-off-by: Jens Axboe commit cf3040ca55f2085b0a372a620ee2cb93ae19b686 Author: Jens Axboe Date: Thu Feb 6 21:31:40 2020 -0700 io_uring: statx/openat/openat2 don't support fixed files All of these opcodes take a directory file descriptor. We can't easily support fixed files for these operations, and the use case for that probably isn't all that clear (or sensible) anyway. Disable IOSQE_FIXED_FILE for these operations. Reported-by: Stefan Metzmacher Signed-off-by: Jens Axboe commit 995933305e11dc8698fdba249ca5f2d145b1d657 Merge: f757165705e9 0ddad21d3e99 Author: Linus Torvalds Date: Sat Feb 8 11:44:02 2020 -0800 Merge branch 'pipe-exclusive-wakeup' Merge thundering herd avoidance on pipe IO. This would have been applied for 5.5 already, but got delayed because of a user-space race condition in the GNU make jobserver code. Now that there's a new GNU make 4.3 release, and most distributions seem to have at least applied the (almost three year old) fix for the problem, let's see if people notice. And it might have been just bad random timing luck on my machine. If you do hit the race condition, things will still work, but the symptom is that you don't get nearly the expected parallelism when using "make -j". The jobserver bug can definitely happen without this patch too, but seems to be easier to trigger when we no longer wake up pipe waiters unnecessarily. * pipe-exclusive-wakeup: pipe: use exclusive waits when reading or writing commit 0ddad21d3e99c743a3aa473121dc5561679e26bb Author: Linus Torvalds Date: Mon Dec 9 09:48:27 2019 -0800 pipe: use exclusive waits when reading or writing This makes the pipe code use separate wait-queues and exclusive waiting for readers and writers, avoiding a nasty thundering herd problem when there are lots of readers waiting for data on a pipe (or, less commonly, lots of writers waiting for a pipe to have space). While this isn't a common occurrence in the traditional "use a pipe as a data transport" case, where you typically only have a single reader and a single writer process, there is one common special case: using a pipe as a source of "locking tokens" rather than for data communication. In particular, the GNU make jobserver code ends up using a pipe as a way to limit parallelism, where each job consumes a token by reading a byte from the jobserver pipe, and releases the token by writing a byte back to the pipe. This pattern is fairly traditional on Unix, and works very well, but will waste a lot of time waking up a lot of processes when only a single reader needs to be woken up when a writer releases a new token. A simplified test-case of just this pipe interaction is to create 64 processes, and then pass a single token around between them (this test-case also intentionally passes another token that gets ignored to test the "wake up next" logic too, in case anybody wonders about it): #include int main(int argc, char **argv) { int fd[2], counters[2]; pipe(fd); counters[0] = 0; counters[1] = -1; write(fd[1], counters, sizeof(counters)); /* 64 processes */ fork(); fork(); fork(); fork(); fork(); fork(); do { int i; read(fd[0], &i, sizeof(i)); if (i < 0) continue; counters[0] = i+1; write(fd[1], counters, (1+(i & 1)) *sizeof(int)); } while (counters[0] < 1000000); return 0; } and in a perfect world, passing that token around should only cause one context switch per transfer, when the writer of a token causes a directed wakeup of just a single reader. But with the "writer wakes all readers" model we traditionally had, on my test box the above case causes more than an order of magnitude more scheduling: instead of the expected ~1M context switches, "perf stat" shows 231,852.37 msec task-clock # 15.857 CPUs utilized 11,250,961 context-switches # 0.049 M/sec 616,304 cpu-migrations # 0.003 M/sec 1,648 page-faults # 0.007 K/sec 1,097,903,998,514 cycles # 4.735 GHz 120,781,778,352 instructions # 0.11 insn per cycle 27,997,056,043 branches # 120.754 M/sec 283,581,233 branch-misses # 1.01% of all branches 14.621273891 seconds time elapsed 0.018243000 seconds user 3.611468000 seconds sys before this commit. After this commit, I get 5,229.55 msec task-clock # 3.072 CPUs utilized 1,212,233 context-switches # 0.232 M/sec 103,951 cpu-migrations # 0.020 M/sec 1,328 page-faults # 0.254 K/sec 21,307,456,166 cycles # 4.074 GHz 12,947,819,999 instructions # 0.61 insn per cycle 2,881,985,678 branches # 551.096 M/sec 64,267,015 branch-misses # 2.23% of all branches 1.702148350 seconds time elapsed 0.004868000 seconds user 0.110786000 seconds sys instead. Much better. [ Note! This kernel improvement seems to be very good at triggering a race condition in the make jobserver (in GNU make 4.2.1) for me. It's a long known bug that was fixed back in June 2017 by GNU make commit b552b0525198 ("[SV 51159] Use a non-blocking read with pselect to avoid hangs."). But there wasn't a new release of GNU make until 4.3 on Jan 19 2020, so a number of distributions may still have the buggy version. Some have backported the fix to their 4.2.1 release, though, and even without the fix it's quite timing-dependent whether the bug actually is hit. ] Josh Triplett says: "I've been hammering on your pipe fix patch (switching to exclusive wait queues) for a month or so, on several different systems, and I've run into no issues with it. The patch *substantially* improves parallel build times on large (~100 CPU) systems, both with parallel make and with other things that use make's pipe-based jobserver. All current distributions (including stable and long-term stable distributions) have versions of GNU make that no longer have the jobserver bug" Tested-by: Josh Triplett Signed-off-by: Linus Torvalds commit 0a061743af93f472687b8c69b0d539d1f12f3fd2 Author: Arnd Bergmann Date: Fri Feb 7 17:55:48 2020 +0100 compat_ioctl: fix FIONREAD on devices My final cleanup patch for sys_compat_ioctl() introduced a regression on the FIONREAD ioctl command, which is used for both regular and special files, but only works on regular files after my patch, as I had missed the warning that Al Viro put into a comment right above it. Change it back so it can work on any file again by moving the implementation to do_vfs_ioctl() instead. Fixes: 77b9040195de ("compat_ioctl: simplify the implementation") Reported-and-tested-by: Christian Zigotzky Reported-and-tested-by: youling257 Signed-off-by: Arnd Bergmann commit 2f86e45a7f427d217f4b94603a9f43a14877e2cc Merge: f9f21cea3113 5186a6cc3ef5 Author: Thomas Gleixner Date: Sat Feb 8 15:54:03 2020 +0100 Merge tag 'irqchip-fixes-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip fixes for 5.6, take #1 from Marc Zyngier: - Guarantee allocation of L2 vPE table for GICv4.1 - Fix GICv4.1 VPROPBASER programming - Numerous GICv4.1 tidy ups - Fix disabled GICv3 redistributor provisioning with ACPI - KConfig cleanup for C-SKY commit 29ca3b31756fb7cfbfc85f2d82a0475bf38cc1ed Author: Tim Harvey Date: Fri Feb 7 12:40:26 2020 -0800 net: thunderx: use proper interface type for RGMII The configuration of the OCTEONTX XCV_DLL_CTL register via xcv_init_hw() is such that the RGMII RX delay is bypassed leaving the RGMII TX delay enabled in the MAC: /* Configure DLL - enable or bypass * TX no bypass, RX bypass */ cfg = readq_relaxed(xcv->reg_base + XCV_DLL_CTL); cfg &= ~0xFF03; cfg |= CLKRX_BYP; writeq_relaxed(cfg, xcv->reg_base + XCV_DLL_CTL); This would coorespond to a interface type of PHY_INTERFACE_MODE_RGMII_RXID and not PHY_INTERFACE_MODE_RGMII. Fixing this allows RGMII PHY drivers to do the right thing (enable RX delay in the PHY) instead of erroneously enabling both delays in the PHY. Signed-off-by: Tim Harvey Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit c76b305c237d013d83e2e75e88b0b2bd427b4b69 Merge: 2696e1146d34 d08f3010f4a3 Author: David S. Miller Date: Sat Feb 8 15:03:11 2020 +0100 Merge tag 'wireless-drivers-2020-02-08' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.6 First set of fixes for v5.6. Buffer overflow fixes to mwifiex, quite a few functionality fixes to iwlwifi and smaller fixes to other drivers. mwifiex * fix an unlock from a previous security fix * fix two buffer overflows libertas * fix two bugs from previous security fixes iwlwifi * fix module removal with multiple NICs * don't treat IGTK removal failure as an error * avoid FW crashes due to DTS measurement races * fix a potential use after free in FTM code * prevent a NULL pointer dereference in iwl_mvm_cfg_he_sta() * fix TDLS discovery * check all CPUs when trying to detect an error during resume rtw88 * fix clang warning mt76 * fix reading of max_nss value from a register ==================== Signed-off-by: David S. Miller commit 2696e1146d3490f1af4b0080955bf1628bd8ab85 Merge: dfa7f709596b 88d6f130e563 Author: David S. Miller Date: Sat Feb 8 15:01:03 2020 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2020-02-07 The following pull-request contains BPF updates for your *net* tree. We've added 15 non-merge commits during the last 10 day(s) which contain a total of 12 files changed, 114 insertions(+), 31 deletions(-). The main changes are: 1) Various BPF sockmap fixes related to RCU handling in the map's tear- down code, from Jakub Sitnicki. 2) Fix macro state explosion in BPF sk_storage map when calculating its bucket_log on allocation, from Martin KaFai Lau. 3) Fix potential BPF sockmap update race by rechecking socket's established state under lock, from Lorenz Bauer. 4) Fix crash in bpftool on missing xlated instructions when kptr_restrict sysctl is set, from Toke Høiland-Jørgensen. 5) Fix i40e's XSK wakeup code to return proper error in busy state and various misc fixes in xdpsock BPF sample code, from Maciej Fijalkowski. 6) Fix the way modifiers are skipped in BTF in the verifier while walking pointers to avoid program rejection, from Alexei Starovoitov. 7) Fix Makefile for runqslower BPF tool to i) rebuild on libbpf changes and ii) to fix undefined reference linker errors for older gcc version due to order of passed gcc parameters, from Yulia Kartseva and Song Liu. 8) Fix a trampoline_count BPF kselftest warning about missing braces around initializer, from Andrii Nakryiko. 9) Fix up redundant "HAVE" prefix from large INSN limit kernel probe in bpftool, from Michal Rostecki. ==================== Signed-off-by: David S. Miller commit d4bf905307a1c90a27714ff7a9fd29b0a2ceed98 Author: Christophe Leroy Date: Fri Feb 7 17:20:57 2020 +0000 powerpc: Fix CONFIG_TRACE_IRQFLAGS with CONFIG_VMAP_STACK When CONFIG_PROVE_LOCKING is selected together with (now default) CONFIG_VMAP_STACK, kernel enter deadlock during boot. At the point of checking whether interrupts are enabled or not, the value of MSR saved on stack is read using the physical address of the stack. But at this point, when using VMAP stack the DATA MMU translation has already been re-enabled, leading to deadlock. Don't use the physical address of the stack when CONFIG_VMAP_STACK is set. Signed-off-by: Christophe Leroy Reported-by: Guenter Roeck Fixes: 028474876f47 ("powerpc/32: prepare for CONFIG_VMAP_STACK") Tested-by: Guenter Roeck Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/daeacdc0dec0416d1c587cc9f9e7191ad3068dc0.1581095957.git.christophe.leroy@c-s.fr commit 9dc086f1e9ef39dd823bd27954b884b2062f9e70 Author: Michael Ellerman Date: Fri Feb 7 22:15:46 2020 +1100 powerpc/futex: Fix incorrect user access blocking The early versions of our kernel user access prevention (KUAP) were written by Russell and Christophe, and didn't have separate read/write access. At some point I picked up the series and added the read/write access, but I failed to update the usages in futex.h to correctly allow read and write. However we didn't notice because of another bug which was causing the low-level code to always enable read and write. That bug was fixed recently in commit 1d8f739b07bd ("powerpc/kuap: Fix set direction in allow/prevent_user_access()"). futex_atomic_cmpxchg_inatomic() is passed the user address as %3 and does: 1: lwarx %1, 0, %3 cmpw 0, %1, %4 bne- 3f 2: stwcx. %5, 0, %3 Which clearly loads and stores from/to %3. The logic in arch_futex_atomic_op_inuser() is similar, so fix both of them to use allow_read_write_user(). Without this fix, and with PPC_KUAP_DEBUG=y, we see eg: Bug: Read fault blocked by AMR! WARNING: CPU: 94 PID: 149215 at arch/powerpc/include/asm/book3s/64/kup-radix.h:126 __do_page_fault+0x600/0xf30 CPU: 94 PID: 149215 Comm: futex_requeue_p Tainted: G W 5.5.0-rc7-gcc9x-g4c25df5640ae #1 ... NIP [c000000000070680] __do_page_fault+0x600/0xf30 LR [c00000000007067c] __do_page_fault+0x5fc/0xf30 Call Trace: [c00020138e5637e0] [c00000000007067c] __do_page_fault+0x5fc/0xf30 (unreliable) [c00020138e5638c0] [c00000000000ada8] handle_page_fault+0x10/0x30 --- interrupt: 301 at cmpxchg_futex_value_locked+0x68/0xd0 LR = futex_lock_pi_atomic+0xe0/0x1f0 [c00020138e563bc0] [c000000000217b50] futex_lock_pi_atomic+0x80/0x1f0 (unreliable) [c00020138e563c30] [c00000000021b668] futex_requeue+0x438/0xb60 [c00020138e563d60] [c00000000021c6cc] do_futex+0x1ec/0x2b0 [c00020138e563d90] [c00000000021c8b8] sys_futex+0x128/0x200 [c00020138e563e20] [c00000000000b7ac] system_call+0x5c/0x68 Fixes: de78a9c42a79 ("powerpc: Add a framework for Kernel Userspace Access Protection") Cc: stable@vger.kernel.org # v5.2+ Reported-by: syzbot+e808452bad7c375cbee6@syzkaller-ppc64.appspotmail.com Signed-off-by: Michael Ellerman Reviewed-by: Christophe Leroy Link: https://lore.kernel.org/r/20200207122145.11928-1-mpe@ellerman.id.au commit 5186a6cc3ef5a3fa327c258924ef098b0de77006 Author: Zenghui Yu Date: Thu Feb 6 15:57:11 2020 +0800 irqchip/gic-v3-its: Rename VPENDBASER/VPROPBASER accessors V{PEND,PROP}BASER registers are actually located in VLPI_base frame of the *redistributor*. Rename their accessors to reflect this fact. No functional changes. Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200206075711.1275-7-yuzenghui@huawei.com commit b46353250ba3b4946adcbbabead23546fcb758b0 Author: Zenghui Yu Date: Thu Feb 6 15:57:10 2020 +0800 irqchip/gic-v3-its: Remove superfluous WARN_ON "ITS virtual pending table not cleaning" is already complained inside its_clear_vpend_valid(), there's no need to trigger a WARN_ON again. Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200206075711.1275-6-yuzenghui@huawei.com commit 4bccf1d715fe8f5fe10bd6202c8caa0ae6104cd2 Author: Zenghui Yu Date: Thu Feb 6 15:57:09 2020 +0800 irqchip/gic-v4.1: Drop 'tmp' in inherit_vpe_l1_table_from_rd() The variable 'tmp' in inherit_vpe_l1_table_from_rd() is actually not needed, drop it. Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200206075711.1275-5-yuzenghui@huawei.com commit 4e6437f12d6e929e802f5599a2d50dfcf92d0f50 Author: Zenghui Yu Date: Thu Feb 6 15:57:08 2020 +0800 irqchip/gic-v4.1: Ensure L2 vPE table is allocated at RD level In GICv4, we will ensure that level2 vPE table memory is allocated for the specified vpe_id on all v4 ITS, in its_alloc_vpe_table(). This still works well for the typical GICv4.1 implementation, where the new vPE table is shared between the ITSs and the RDs. To make it explicit, let us introduce allocate_vpe_l2_table() to make sure that the L2 tables are allocated on all v4.1 RDs. We're likely not need to allocate memory in it because the vPE table is shared and (L2 table is) already allocated at ITS level, except for the case where the ITS doesn't share anything (say SVPET == 0, practically unlikely but architecturally allowed). The implementation of allocate_vpe_l2_table() is mostly copied from its_alloc_table_entry(). Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200206075711.1275-4-yuzenghui@huawei.com commit 8b718d403c5cdc7f0ea492c33ec88169f3e76462 Author: Zenghui Yu Date: Thu Feb 6 15:57:07 2020 +0800 irqchip/gic-v4.1: Set vpe_l1_base for all redistributors Currently, we will not set vpe_l1_page for the current RD if we can inherit the vPE configuration table from another RD (or ITS), which results in an inconsistency between RDs within the same CommonLPIAff group. Let's rename it to vpe_l1_base to indicate the base address of the vPE configuration table of this RD, and set it properly for *all* v4.1 redistributors. Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200206075711.1275-3-yuzenghui@huawei.com commit e88bd316e5971fe78884ad1f466b9fc576575e5f Author: Zenghui Yu Date: Thu Feb 6 15:57:06 2020 +0800 irqchip/gic-v4.1: Fix programming of GICR_VPROPBASER_4_1_SIZE The Size field of GICv4.1 VPROPBASER register indicates number of pages minus one and together Page_Size and Size control the vPEID width. Let's respect this requirement of the architecture. Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200206075711.1275-2-yuzenghui@huawei.com commit d08f3010f4a32eec3c8aa771f03a1b342a1472fa Author: Lorenzo Bianconi Date: Fri Feb 7 11:29:51 2020 +0100 mt76: mt7615: fix max_nss in mt7615_eeprom_parse_hw_cap Fix u8 cast reading max_nss from MT_TOP_STRAP_STA register in mt7615_eeprom_parse_hw_cap routine Fixes: acf5457fd99db ("mt76: mt7615: read {tx,rx} mask from eeprom") Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo commit f757165705e92db62f85a1ad287e9251d1f2cd82 Merge: 175787e011ce cabdb4fa2f66 Author: Linus Torvalds Date: Fri Feb 7 17:59:07 2020 -0800 Merge tag 'fuse-fixes-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse fixes from Miklos Szeredi: - Fix a regression introduced in v5.1 that triggers WARNINGs for some fuse filesystems - Fix an xfstest failure - Allow overlayfs to be used on top of fuse/virtiofs - Code and documentation cleanups * tag 'fuse-fixes-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: use true,false for bool variable Documentation: filesystems: convert fuse to RST fuse: Support RENAME_WHITEOUT flag fuse: don't overflow LLONG_MAX with end offset fix up iter on short count in fuse_direct_io() commit 175787e011cec507d8e2a1dbf37beef418499bc0 Merge: 60ea27e936f2 6e5e41e2dc4e Author: Linus Torvalds Date: Fri Feb 7 17:54:46 2020 -0800 Merge tag 'gfs2-for-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fixes from Andreas Gruenbacher: - Fix a bug in Abhi Das's journal head lookup improvements that can cause a valid journal to be rejected. - Fix an O_SYNC write handling bug reported by Christoph Hellwig. * tag 'gfs2-for-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: fix O_SYNC write handling gfs2: move setting current->backing_dev_info gfs2: fix gfs2_find_jhead that returns uninitialized jhead with seq 0 commit 60ea27e936f2b9b7f011644a499c292f9cc11de3 Merge: 08dffcc7d94b 9f198a2ac543 Author: Linus Torvalds Date: Fri Feb 7 17:52:38 2020 -0800 Merge tag 'for-linus-5.6-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs fix from Mike Marshall: "Debugfs fix for orangefs. Vasliy Averin noticed that 'if seq_file .next function does not change position index, read after some lseek can generate unexpected output' and sent in this fix" * tag 'for-linus-5.6-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: help_next should increase position index commit 08dffcc7d94b7751663f1b0d66b45ff3a98375a2 Merge: f43574d0ac80 3d96208c30f8 Author: Linus Torvalds Date: Fri Feb 7 17:50:21 2020 -0800 Merge tag 'nfsd-5.6' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "Highlights: - Server-to-server copy code from Olga. To use it, client and both servers must have support, the target server must be able to access the source server over NFSv4.2, and the target server must have the inter_copy_offload_enable module parameter set. - Improvements and bugfixes for the new filehandle cache, especially in the container case, from Trond - Also from Trond, better reporting of write errors. - Y2038 work from Arnd" * tag 'nfsd-5.6' of git://linux-nfs.org/~bfields/linux: (55 commits) sunrpc: expiry_time should be seconds not timeval nfsd: make nfsd_filecache_wq variable static nfsd4: fix double free in nfsd4_do_async_copy() nfsd: convert file cache to use over/underflow safe refcount nfsd: Define the file access mode enum for tracing nfsd: Fix a perf warning nfsd: Ensure sampling of the write verifier is atomic with the write nfsd: Ensure sampling of the commit verifier is atomic with the commit sunrpc: clean up cache entry add/remove from hashtable sunrpc: Fix potential leaks in sunrpc_cache_unhash() nfsd: Ensure exclusion between CLONE and WRITE errors nfsd: Pass the nfsd_file as arguments to nfsd4_clone_file_range() nfsd: Update the boot verifier on stable writes too. nfsd: Fix stable writes nfsd: Allow nfsd_vfs_write() to take the nfsd_file as an argument nfsd: Fix a soft lockup race in nfsd_file_mark_find_or_create() nfsd: Reduce the number of calls to nfsd_file_gc() nfsd: Schedule the laundrette regularly irrespective of file errors nfsd: Remove unused constant NFSD_FILE_LRU_RESCAN nfsd: Containerise filecache laundrette ... commit f43574d0ac80d76537e265548a13b1bc46aa751b Merge: 41dcd67e8868 7dc2993a9e51 Author: Linus Torvalds Date: Fri Feb 7 17:39:56 2020 -0800 Merge tag 'nfs-for-5.6-1' of git://git.linux-nfs.org/projects/anna/linux-nfs Puyll NFS client updates from Anna Schumaker: "Stable bugfixes: - Fix memory leaks and corruption in readdir # v2.6.37+ - Directory page cache needs to be locked when read # v2.6.37+ New features: - Convert NFS to use the new mount API - Add "softreval" mount option to let clients use cache if server goes down - Add a config option to compile without UDP support - Limit the number of inactive delegations the client can cache at once - Improved readdir concurrency using iterate_shared() Other bugfixes and cleanups: - More 64-bit time conversions - Add additional diagnostic tracepoints - Check for holes in swapfiles, and add dependency on CONFIG_SWAP - Various xprtrdma cleanups to prepare for 5.7's changes - Several fixes for NFS writeback and commit handling - Fix acls over krb5i/krb5p mounts - Recover from premature loss of openstateids - Fix NFS v3 chacl and chmod bug - Compare creds using cred_fscmp() - Use kmemdup_nul() in more places - Optimize readdir cache page invalidation - Lease renewal and recovery fixes" * tag 'nfs-for-5.6-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (93 commits) NFSv4.0: nfs4_do_fsinfo() should not do implicit lease renewals NFSv4: try lease recovery on NFS4ERR_EXPIRED NFS: Fix memory leaks nfs: optimise readdir cache page invalidation NFS: Switch readdir to using iterate_shared() NFS: Use kmemdup_nul() in nfs_readdir_make_qstr() NFS: Directory page cache pages need to be locked when read NFS: Fix memory leaks and corruption in readdir SUNRPC: Use kmemdup_nul() in rpc_parse_scope_id() NFS: Replace various occurrences of kstrndup() with kmemdup_nul() NFSv4: Limit the total number of cached delegations NFSv4: Add accounting for the number of active delegations held NFSv4: Try to return the delegation immediately when marked for return on close NFS: Clear NFS_DELEGATION_RETURN_IF_CLOSED when the delegation is returned NFSv4: nfs_inode_evict_delegation() should set NFS_DELEGATION_RETURNING NFS: nfs_find_open_context() should use cred_fscmp() NFS: nfs_access_get_cached_rcu() should use cred_fscmp() NFSv4: pnfs_roc() must use cred_fscmp() to compare creds NFS: remove unused macros nfs: Return EINVAL rather than ERANGE for mount parse errors ... commit 88d6f130e5632bbf419a2e184ec7adcbe241260b Author: Martin KaFai Lau Date: Fri Feb 7 00:18:10 2020 -0800 bpf: Improve bucket_log calculation logic It was reported that the max_t, ilog2, and roundup_pow_of_two macros have exponential effects on the number of states in the sparse checker. This patch breaks them up by calculating the "nbuckets" first so that the "bucket_log" only needs to take ilog2(). In addition, Linus mentioned: Patch looks good, but I'd like to point out that it's not just sparse. You can see it with a simple make net/core/bpf_sk_storage.i grep 'smap->bucket_log = ' net/core/bpf_sk_storage.i | wc and see the end result: 1 365071 2686974 That's one line (the assignment line) that is 2,686,974 characters in length. Now, sparse does happen to react particularly badly to that (I didn't look to why, but I suspect it's just that evaluating all the types that don't actually ever end up getting used ends up being much more expensive than it should be), but I bet it's not good for gcc either. Fixes: 6ac99e8f23d4 ("bpf: Introduce bpf sk local storage") Reported-by: Randy Dunlap Reported-by: Luc Van Oostenryck Suggested-by: Linus Torvalds Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Reviewed-by: Luc Van Oostenryck Link: https://lore.kernel.org/bpf/20200207081810.3918919-1-kafai@fb.com commit 5d3919a953c3c96c02fc7a337f8376cde43ae31f Author: Jakub Sitnicki Date: Thu Feb 6 12:16:52 2020 +0100 selftests/bpf: Test freeing sockmap/sockhash with a socket in it Commit 7e81a3530206 ("bpf: Sockmap, ensure sock lock held during tear down") introduced sleeping issues inside RCU critical sections and while holding a spinlock on sockmap/sockhash tear-down. There has to be at least one socket in the map for the problem to surface. This adds a test that triggers the warnings for broken locking rules. Not a fix per se, but rather tooling to verify the accompanying fixes. Run on a VM with 1 vCPU to reproduce the warnings. Fixes: 7e81a3530206 ("bpf: Sockmap, ensure sock lock held during tear down") Signed-off-by: Jakub Sitnicki Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200206111652.694507-4-jakub@cloudflare.com commit 0b2dc83906cf1e694e48003eae5df8fa63f76fd9 Author: Jakub Sitnicki Date: Thu Feb 6 12:16:51 2020 +0100 bpf, sockhash: Synchronize_rcu before free'ing map We need to have a synchronize_rcu before free'ing the sockhash because any outstanding psock references will have a pointer to the map and when they use it, this could trigger a use after free. This is a sister fix for sockhash, following commit 2bb90e5cc90e ("bpf: sockmap, synchronize_rcu before free'ing map") which addressed sockmap, which comes from a manual audit. Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: Jakub Sitnicki Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200206111652.694507-3-jakub@cloudflare.com commit db6a5018b6e008c1d69c6628cdaa9541b8e70940 Author: Jakub Sitnicki Date: Thu Feb 6 12:16:50 2020 +0100 bpf, sockmap: Don't sleep while holding RCU lock on tear-down rcu_read_lock is needed to protect access to psock inside sock_map_unref when tearing down the map. However, we can't afford to sleep in lock_sock while in RCU read-side critical section. Grab the RCU lock only after we have locked the socket. This fixes RCU warnings triggerable on a VM with 1 vCPU when free'ing a sockmap/sockhash that contains at least one socket: | ============================= | WARNING: suspicious RCU usage | 5.5.0-04005-g8fc91b972b73 #450 Not tainted | ----------------------------- | include/linux/rcupdate.h:272 Illegal context switch in RCU read-side critical section! | | other info that might help us debug this: | | | rcu_scheduler_active = 2, debug_locks = 1 | 4 locks held by kworker/0:1/62: | #0: ffff88813b019748 ((wq_completion)events){+.+.}, at: process_one_work+0x1d7/0x5e0 | #1: ffffc900000abe50 ((work_completion)(&map->work)){+.+.}, at: process_one_work+0x1d7/0x5e0 | #2: ffffffff82065d20 (rcu_read_lock){....}, at: sock_map_free+0x5/0x170 | #3: ffff8881368c5df8 (&stab->lock){+...}, at: sock_map_free+0x64/0x170 | | stack backtrace: | CPU: 0 PID: 62 Comm: kworker/0:1 Not tainted 5.5.0-04005-g8fc91b972b73 #450 | Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 04/01/2014 | Workqueue: events bpf_map_free_deferred | Call Trace: | dump_stack+0x71/0xa0 | ___might_sleep+0x105/0x190 | lock_sock_nested+0x28/0x90 | sock_map_free+0x95/0x170 | bpf_map_free_deferred+0x58/0x80 | process_one_work+0x260/0x5e0 | worker_thread+0x4d/0x3e0 | kthread+0x108/0x140 | ? process_one_work+0x5e0/0x5e0 | ? kthread_park+0x90/0x90 | ret_from_fork+0x3a/0x50 | ============================= | WARNING: suspicious RCU usage | 5.5.0-04005-g8fc91b972b73-dirty #452 Not tainted | ----------------------------- | include/linux/rcupdate.h:272 Illegal context switch in RCU read-side critical section! | | other info that might help us debug this: | | | rcu_scheduler_active = 2, debug_locks = 1 | 4 locks held by kworker/0:1/62: | #0: ffff88813b019748 ((wq_completion)events){+.+.}, at: process_one_work+0x1d7/0x5e0 | #1: ffffc900000abe50 ((work_completion)(&map->work)){+.+.}, at: process_one_work+0x1d7/0x5e0 | #2: ffffffff82065d20 (rcu_read_lock){....}, at: sock_hash_free+0x5/0x1d0 | #3: ffff888139966e00 (&htab->buckets[i].lock){+...}, at: sock_hash_free+0x92/0x1d0 | | stack backtrace: | CPU: 0 PID: 62 Comm: kworker/0:1 Not tainted 5.5.0-04005-g8fc91b972b73-dirty #452 | Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 04/01/2014 | Workqueue: events bpf_map_free_deferred | Call Trace: | dump_stack+0x71/0xa0 | ___might_sleep+0x105/0x190 | lock_sock_nested+0x28/0x90 | sock_hash_free+0xec/0x1d0 | bpf_map_free_deferred+0x58/0x80 | process_one_work+0x260/0x5e0 | worker_thread+0x4d/0x3e0 | kthread+0x108/0x140 | ? process_one_work+0x5e0/0x5e0 | ? kthread_park+0x90/0x90 | ret_from_fork+0x3a/0x50 Fixes: 7e81a3530206 ("bpf: Sockmap, ensure sock lock held during tear down") Signed-off-by: Jakub Sitnicki Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200206111652.694507-2-jakub@cloudflare.com commit d95f1e8b462c4372ac409886070bb8719d8a4d3a Author: Toke Høiland-Jørgensen Date: Thu Feb 6 11:29:06 2020 +0100 bpftool: Don't crash on missing xlated program instructions Turns out the xlated program instructions can also be missing if kptr_restrict sysctl is set. This means that the previous fix to check the jited_prog_insns pointer was insufficient; add another check of the xlated_prog_insns pointer as well. Fixes: 5b79bcdf0362 ("bpftool: Don't crash on missing jited insns or ksyms") Fixes: cae73f233923 ("bpftool: use bpf_program__get_prog_info_linear() in prog.c:do_dump()") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20200206102906.112551-1-toke@redhat.com commit 85b8ac01a421791d66c3a458a7f83cfd173fe3fa Author: Lorenz Bauer Date: Fri Feb 7 10:37:12 2020 +0000 bpf, sockmap: Check update requirements after locking It's currently possible to insert sockets in unexpected states into a sockmap, due to a TOCTTOU when updating the map from a syscall. sock_map_update_elem checks that sk->sk_state == TCP_ESTABLISHED, locks the socket and then calls sock_map_update_common. At this point, the socket may have transitioned into another state, and the earlier assumptions don't hold anymore. Crucially, it's conceivable (though very unlikely) that a socket has become unhashed. This breaks the sockmap's assumption that it will get a callback via sk->sk_prot->unhash. Fix this by checking the (fixed) sk_type and sk_protocol without the lock, followed by a locked check of sk_state. Unfortunately it's not possible to push the check down into sock_(map|hash)_update_common, since BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB run before the socket has transitioned from TCP_SYN_RECV into TCP_ESTABLISHED. Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface") Signed-off-by: Lorenz Bauer Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20200207103713.28175-1-lmb@cloudflare.com commit 41dcd67e88688afbeb3b2bd23960eed5daec74e7 Merge: 11777ee8b04a d1c9038ab5c1 Author: Linus Torvalds Date: Fri Feb 7 13:03:10 2020 -0800 Merge tag 'docs-5.6-2' of git://git.lwn.net/linux Pull Documentation fixes from Jonathan Corbet: "A handful of small documentation fixes that wandered in" * tag 'docs-5.6-2' of git://git.lwn.net/linux: Allow git builds of Sphinx Documentation: changes.rst: update several outdated project URLs Documentation: build warnings related to missing blank lines after explicit markups has been fixed mailmap: add entry for Tiezhu Yang Documentation/ko_KR/howto: Update a broken link Documentation/ko_KR/howto: Update broken web addresses docs/locking: Fix outdated section names commit 11777ee8b04acab07c96959e9c6ac6a1603d0958 Merge: ed39ba0ec115 b49f8e0e7bd1 Author: Linus Torvalds Date: Fri Feb 7 12:54:13 2020 -0800 Merge branch 'i2c/for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "i2c core: - huge improvements and refactorizations of the Linux I2C documentation (lots of thanks to Luca for doing it and Jean for the careful review) - subsystem wide API conversion to i2c_new_client_device() - remove obsolete parport-light driver - smaller core updates (removal of 'extern', enabling more compile testing, use more helper macros) - and quite a bunch of driver updates (new IDs, simplifications, better PM, support of atomic transfers and other improvements) i2c-mux: - The main feature is the idle-state rework of the pca954x driver from Biwen Li at24 driver: - minor maintenance: update the license tag, sort headers - move support for the write-protect pin into nvmem core - add a reference to the new wp-gpios property in nvmem to at25 bindings - add support for regulator and pm_runtime control" * 'i2c/for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (91 commits) i2c: cros-ec-tunnel: Fix ACPI identifier i2c: cros-ec-tunnel: Fix slave device enumeration i2c: stm32f7: add PM_SLEEP suspend/resume support i2c: cadence: Fix wording in i2c-cadence driver i2c: cadence: Fix power management order of operations i2c: cadence: Fix error printing in case of defer i2c: cadence: Handle transfer_size rollover i2c: i801: Add support for Intel Comet Lake PCH-V docs: i2c: writing-clients: properly name the stop condition docs: i2c: i2c-protocol: use same wording as smbus-protocol docs: i2c: rename sections so the overall picture is clearer docs: i2c: old-module-parameters: use monospace instead of "" docs: i2c: old-module-parameters: clarify this is for obsolete kernels docs: i2c: old-module-parameters: fix internal hyperlink docs: i2c: instantiating-devices: use monospace for sysfs attributes docs: i2c: instantiating-devices: rearrange static instatiation docs: i2c: instantiating-devices: fix internal hyperlink docs: i2c: smbus-protocol: improve I2C Block transactions description docs: i2c: smbus-protocol: fix punctuation docs: i2c: smbus-protocol: fix typo ... commit ed39ba0ec1156407040e7509cb19299b5dda3815 Merge: ba7dcfc7bada dec0a81a7814 Author: Linus Torvalds Date: Fri Feb 7 12:51:54 2020 -0800 Merge tag 'acpi-5.6-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "Add Hisilicon Hip08-Lite I2C controller clock frequency support to the ACPI driver for AMD SoCs (APD) and to the Designware I2C driver (Hanjun Guo)" * tag 'acpi-5.6-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: i2c: designware: Add ACPI HID for Hisilicon Hip08-Lite I2C controller ACPI / APD: Add clock frequency for Hisilicon Hip08-Lite I2C controller commit ba7dcfc7badad87e450e4aaec79662a038dbf9ed Merge: c16b99d6c5a3 332008256f1f Author: Linus Torvalds Date: Fri Feb 7 12:49:10 2020 -0800 Merge tag 'pm-5.6-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: - Update the recently merged CPR (Core Power Reduction) support in the AVS (Adaptive Voltage Scaling) subsystem (Brendan Higgins, Nathan Chancellor, Niklas Cassel) - Update the rockchip-io AVS driver (Heiko Stuebner) - Add two more module parameters to intel_idle on top of the recently merged material (Rafael Wysocki) - Clean up a piece of cpuidle documentation and consolidate system sleep states documentation (Rafael Wysocki) * tag 'pm-5.6-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpuidle: Documentation: Clean up PM QoS description Documentation: admin-guide: PM: Update sleep states documentation intel_idle: Introduce 'states_off' module parameter intel_idle: Introduce 'use_acpi' module parameter power: avs: qcom-cpr: Avoid clang -Wsometimes-uninitialized in cpr_scale power: avs: qcom-cpr: add unspecified HAS_IOMEM dependency PM / AVS: rockchip-io: fix the supply naming for the emmc supply on px30 power: avs: qcom-cpr: add a printout after the driver has been initialized commit c16b99d6c5a3f103ae45e33084055a2440d70544 Merge: 8bf5973a4ef0 9f880327160f Author: Linus Torvalds Date: Fri Feb 7 12:46:08 2020 -0800 Merge tag 'drm-next-2020-02-07' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Just some fixes for this merge window: the tegra changes fix some regressions in the merge, nouveau has a few modesetting fixes. The amdgpu fixes are bit bigger, but they contain a couple of weeks of fixes, and don't seem to contain anything that isn't really a fix. Summary: tegra: - merge window regression fixes nouveau: - couple of volta/turing modesetting fixes amdgpu: - EDC fixes for Arcturus - GDDR6 memory training fixe - Fix for reading gfx clockgating registers while in GFXOFF state - i2c freq fixes - Misc display fixes - TLB invalidation fix when using semaphores - VCN 2.5 instancing fixes - Switch raven1 gfxoff to a blacklist - Coreboot workaround for KV/KB - Root cause dongle fixes for display and revert workaround - Enable GPU reset for renoir and navi - Navi overclocking fixes - Fix up confusing warnings in display clock validation on raven amdkfd: - SDMA fix radeon: - Misc LUT fixes" * tag 'drm-next-2020-02-07' of git://anongit.freedesktop.org/drm/drm: (90 commits) gpu: host1x: Set DMA direction only for DMA-mapped buffer objects drm/tegra: Reuse IOVA mapping where possible drm/tegra: Relax IOMMU usage criteria on old Tegra drm/amd/dm/mst: Ignore payload update failures drm/amdgpu: update default voltage for boot od table for navi1x drm/amdgpu/smu10: fix smu10_get_clock_by_type_with_voltage drm/amdgpu/smu10: fix smu10_get_clock_by_type_with_latency drm/amdgpu/display: handle multiple numbers of fclks in dcn_calcs.c (v2) drm/amdgpu: fetch default VDDC curve voltages (v2) drm/amdgpu/smu_v11_0: Correct behavior of restoring default tables (v2) drm/amdgpu/navi10: add OD_RANGE for navi overclocking drm/amdgpu/navi: fix index for OD MCLK drm/amd/display: Fix HW/SW state mismatch drm/amd/display: Fix a typo when computing dsc configuration drm/amd/powerplay: fix navi10 system intermittent reboot issue V2 drm/amdkfd: Fix a bug in SDMA RLC queue counting under HWS mode drm/amd/display: Only enable cursor on pipes that need it drm/nouveau/kms/gv100-: avoid sending a core update until the first modeset drm/nouveau/kms/gv100-: move window ownership setup into modesetting path drm/nouveau/disp/gv100-: halt NV_PDISP_FE_RM_INTR_STAT_CTRL_DISP_ERROR storms ... commit 8bf5973a4ef0c996d805dc70c2122f08155d14ef Merge: b34f01f76a10 5df867145f8a Author: Linus Torvalds Date: Fri Feb 7 12:40:50 2020 -0800 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "A collection of fixes: - Make of_clk.h self contained - Fix new qcom DT bindings that just merged to match the DTS files - Fix qcom clk driver to properly detect DFS clk frequencies - Fix the ls1028a driver to not deref a pointer before assigning it" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: of: clk: Make self-contained clk: qcom: Use ARRAY_SIZE in videocc-sc7180 for parent clocks clk: qcom: Get rid of the test clock for videocc-sc7180 dt-bindings: clock: Cleanup qcom,videocc bindings for sdm845/sc7180 clk: qcom: Use ARRAY_SIZE in gpucc-sc7180 for parent clocks clk: qcom: Get rid of the test clock for gpucc-sc7180 dt-bindings: clock: Fix qcom,gpucc bindings for sdm845/sc7180/msm8998 clk: qcom: Use ARRAY_SIZE in dispcc-sc7180 for parent clocks clk: qcom: Get rid of the test clock for dispcc-sc7180 clk: qcom: Get rid of fallback global names for dispcc-sc7180 dt-bindings: clock: Fix qcom,dispcc bindings for sdm845/sc7180 clk: qcom: rcg2: Don't crash if our parent can't be found; return an error clk: ls1028a: fix a dereference of pointer 'parent' before a null check dt-bindings: clk: qcom: Fix self-validation, split, and clean cruft clk: qcom: Don't overwrite 'cfg' in clk_rcg2_dfs_populate_freq() commit f9f21cea311340f38074ff93a8d89b4a9cae6bcc Author: Stephen Boyd Date: Thu Feb 6 11:15:21 2020 -0800 genirq: Clarify that irq wake state is orthogonal to enable/disable There's some confusion around if an irq that's disabled with disable_irq() can still wake the system from sleep states such as "suspend to RAM". Clarify this in the kernel documentation for irq_set_irq_wake() so that it's clear that an irq can be disabled and still wake the system if it has been marked for wakeup. Signed-off-by: Stephen Boyd Signed-off-by: Thomas Gleixner Reviewed-by: Douglas Anderson Link: https://lkml.kernel.org/r/20200206191521.94559-1-swboyd@chromium.org commit b34f01f76a10386f1877181e4f0631fa2733ecdc Merge: e0f121c5cc2c 057b52b4b3d5 Author: Linus Torvalds Date: Fri Feb 7 12:30:16 2020 -0800 Merge tag 'linux-watchdog-5.6-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - add IT8786 chipset ID - addition of sam9x60 compatible watchdog - da9062 improvements - fix UAF in reboot notifier handling in watchdog core code - other fixes and small improvements * tag 'linux-watchdog-5.6-rc1' of git://www.linux-watchdog.org/linux-watchdog: watchdog: da9062: make restart handler atomic safe watchdog: mtk_wdt: mt2712: Add reset controller watchdog: mtk_wdt: mt8183: Add reset controller dt-bindings: mediatek: mt2712: Add #reset-cells dt-bindings: mediatek: mt8183: Add #reset-cells dt-bindings: watchdog: da9062: add suspend disable option watchdog: it87_wdt: add IT8786 ID watchdog: dw_wdt: ping watchdog to reset countdown before start watchdog: fix UAF in reboot notifier handling in watchdog core code watchdog: cadence: Skip printing pointer value watchdog: qcom: Use platform_get_irq_optional() for bark irq watchdog: da9062: add power management ops watchdog: make DesignWare watchdog allow users to set bigger timeout value drivers: watchdog: stm32_iwdg: set WDOG_HW_RUNNING at probe watchdog: sama5d4_wdt: addition of sam9x60 compatible watchdog commit e0f121c5cc2cf079d13ebe65b490ca88ba6abe12 Merge: 9b7fa2880fe7 1ad6f58ea936 Author: Linus Torvalds Date: Fri Feb 7 12:26:34 2020 -0800 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: "Some bug fixes/cleanups. The deprecated scsi passthrough for virtio_blk is removed" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_balloon: Fix memory leaks on errors in virtballoon_probe() virtio-balloon: Fix memory leak when unloading while hinting is in progress virtio_balloon: prevent pfn array overflow virtio-blk: remove VIRTIO_BLK_F_SCSI support virtio-pci: check name when counting MSI-X vectors virtio-balloon: initialize all vq callbacks virtio-mmio: convert to devm_platform_ioremap_resource commit 9b7fa2880fe716a30d2359d40d12ec4bc69ec7b5 Merge: 90568ecf5615 c74c0fd2282e Author: Linus Torvalds Date: Fri Feb 7 12:22:29 2020 -0800 Merge tag 'xtensa-20200206' of git://github.com/jcmvbkbc/linux-xtensa Pull xtensa updates from Max Filippov: - reorganize exception vectors placement - small cleanups (drop unused functions/headers/defconfig entries, spelling fixes) * tag 'xtensa-20200206' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: ISS: improve simcall assembly xtensa: reorganize vectors placement xtensa: separate SMP and XIP support xtensa: move fast exception handlers close to vectors arch/xtensa: fix Kconfig typos for HAVE_SMP xtensa: clean up optional XCHAL_* definitions xtensa: drop unused function fast_coprocessor_double xtensa: drop empty platform_* functions from platforms xtensa: clean up platform headers xtensa: drop set_except_vector declaration xtensa: configs: Cleanup old Kconfig IO scheduler options commit f35aa2bc809eacc44c3cee41b52cef1c451d4a89 Author: Al Viro Date: Sat Dec 21 21:35:55 2019 -0500 tmpfs: switch to use of invalfc() Signed-off-by: Al Viro commit 58c025f0e803a45453bb5ada957cbf98163d3048 Author: Al Viro Date: Sat Dec 21 21:35:27 2019 -0500 cgroup1: switch to use of errorfc() et.al. Signed-off-by: Al Viro commit bf45f7fcc4003a8347a172354e2b8b59a259822c Author: Al Viro Date: Sat Dec 21 21:34:41 2019 -0500 procfs: switch to use of invalfc() Signed-off-by: Al Viro commit b5db30cfb9793fca05f6448ad68430ac7374bbdd Author: Al Viro Date: Sat Dec 21 21:34:06 2019 -0500 hugetlbfs: switch to use of invalfc() Signed-off-by: Al Viro commit e1ee7d8511f1b9305545837aa31358de3389c72c Author: Al Viro Date: Sat Dec 21 21:33:45 2019 -0500 cramfs: switch to use of errofc() et.al. Signed-off-by: Al Viro commit 77cb271e6a5189613f55834f4fa448c004963bb6 Author: Al Viro Date: Sat Dec 21 21:33:17 2019 -0500 gfs2: switch to use of errorfc() et.al. Signed-off-by: Al Viro commit 2e28c49ea648d29c3d7b625ea6996addf28335ec Author: Al Viro Date: Sat Dec 21 21:32:51 2019 -0500 fuse: switch to use errorfc() et.al. Signed-off-by: Al Viro commit d53d0f7461a52b08b0146156d79c64c0842fd38d Author: Al Viro Date: Sat Dec 21 21:31:52 2019 -0500 ceph: use errorfc() and friends instead of spelling the prefix out Signed-off-by: Al Viro commit a3ff937b33d9dfd0923ac5279d87723048599057 Author: Al Viro Date: Sat Dec 21 21:30:50 2019 -0500 prefix-handling analogues of errorf() and friends called errorfc/infofc/warnfc/invalfc Signed-off-by: Al Viro commit 328de5287b10abc967c517461cf2948bd8a5b4e9 Author: Al Viro Date: Wed Dec 18 00:02:31 2019 -0500 turn fs_param_is_... into functions Signed-off-by: Al Viro commit 48ce73b1bef20331007b35de7ade8fe26cd55e84 Author: Al Viro Date: Tue Dec 17 20:03:59 2019 -0500 fs_parse: handle optional arguments sanely Don't bother with "mixed" options that would allow both the form with and without argument (i.e. both -o foo and -o foo=bar). Rather than trying to shove both into a single fs_parameter_spec, allow having with-argument and no-argument specs with the same name and teach fs_parse to handle that. There are very few options of that sort, and they are actually easier to handle that way - callers end up with less postprocessing. Signed-off-by: Al Viro commit d7167b149943e38ad610191ecbb0800c78bbced9 Author: Al Viro Date: Sat Sep 7 07:23:15 2019 -0400 fs_parse: fold fs_parameter_desc/fs_parameter_spec The former contains nothing but a pointer to an array of the latter... Signed-off-by: Al Viro commit 96cafb9ccb153f6a82ff2c9bde68916d9d65501e Author: Eric Sandeen Date: Fri Dec 6 10:45:01 2019 -0600 fs_parser: remove fs_parameter_description name field Unused now. Signed-off-by: Eric Sandeen Acked-by: David Howells Signed-off-by: Al Viro commit cc3c0b533ab9142eac2e291628fbfca3685f38cd Author: Al Viro Date: Sat Dec 21 00:16:49 2019 -0500 add prefix to fs_context->log ... turning it into struct p_log embedded into fs_context. Initialize the prefix with fs_type->name, turning fs_parse() into a trivial inline wrapper for __fs_parse(). This makes fs_parameter_description->name completely unused. Signed-off-by: Al Viro commit c80c98f0dc5dc709b04254b5f30145c6ab8800a4 Author: Al Viro Date: Sat Dec 21 00:06:01 2019 -0500 ceph_parse_param(), ceph_parse_mon_ips(): switch to passing fc_log ... and now errorf() et.al. are never called with NULL fs_context, so we can get rid of conditional in those. Signed-off-by: Al Viro commit 7f5d38141e309bb4ba995d9726928af85a299c50 Author: Al Viro Date: Fri Dec 20 23:52:55 2019 -0500 new primitive: __fs_parse() fs_parse() analogue taking p_log instead of fs_context. fs_parse() turned into a wrapper, callers in ceph_common and rbd switched to __fs_parse(). As the result, fs_parse() never gets NULL fs_context and neither do fs_context-based logging primitives Signed-off-by: Al Viro commit 2c3f3dc315565941262e980029c0f74ad118231a Author: Al Viro Date: Fri Dec 20 23:43:32 2019 -0500 switch rbd and libceph to p_log-based primitives Signed-off-by: Al Viro commit 3fbb8d5554a1481d9c5f54ee7dc59f416650efb1 Author: Al Viro Date: Fri Dec 20 23:43:32 2019 -0500 struct p_log, variants of warnf() et.al. taking that one instead primitives for prefixed logging Signed-off-by: Al Viro commit 9f09f649ca3350cdb49c81f7d5ac6e64a4d7e1a1 Author: Al Viro Date: Fri Dec 20 22:10:36 2019 -0500 teach logfc() to handle prefices, give it saner calling conventions Signed-off-by: Al Viro commit fbc2d1686dc5c2e403091f3c25ca2bc16f88cccb Author: Al Viro Date: Fri Dec 20 21:06:08 2019 -0500 get rid of cg_invalf() pointless alias for invalf()... Signed-off-by: Al Viro commit aa1918f9491442a007a0cbe41a31539233209777 Author: Al Viro Date: Tue Dec 17 20:09:08 2019 -0500 get rid of fs_value_is_filename_empty Its behaviour is identical to that of fs_value_is_filename. It makes no sense, anyway - LOOKUP_EMPTY affects nothing whatsoever once the pathname has been imported from userland. And both fs_value_is_filename and fs_value_is_filename_empty carry an already imported pathname. Signed-off-by: Al Viro commit 34264ae3fa22429ec4fd9151602342d1f21486eb Author: Al Viro Date: Mon Dec 16 13:45:41 2019 -0500 don't bother with explicit length argument for __lookup_constant() Have the arrays of constant_table self-terminated (by NULL ->name in the final entry). Simplifies lookup_constant() and allows to reuse the search for enum params as well. Signed-off-by: Al Viro commit 3d96208c30f84d6edf9ab4fac813306ac0d20c10 Author: Roberto Bergantinos Corpas Date: Tue Feb 4 11:32:56 2020 +0100 sunrpc: expiry_time should be seconds not timeval When upcalling gssproxy, cache_head.expiry_time is set as a timeval, not seconds since boot. As such, RPC cache expiry logic will not clean expired objects created under auth.rpcsec.context cache. This has proven to cause kernel memory leaks on field. Using 64 bit variants of getboottime/timespec Expiration times have worked this way since 2010's c5b29f885afe "sunrpc: use seconds since boot in expiry cache". The gssproxy code introduced in 2012 added gss_proxy_save_rsc and introduced the bug. That's a while for this to lurk, but it required a bit of an extreme case to make it obvious. Signed-off-by: Roberto Bergantinos Corpas Cc: stable@vger.kernel.org Fixes: 030d794bf498 "SUNRPC: Use gssproxy upcall for server..." Tested-By: Frank Sorenson Signed-off-by: J. Bruce Fields commit 50d0def966a5f1237ba647e827a945e8ece4c10b Author: Chen Zhou Date: Mon Feb 3 09:43:57 2020 +0800 nfsd: make nfsd_filecache_wq variable static Fix sparse warning: fs/nfsd/filecache.c:55:25: warning: symbol 'nfsd_filecache_wq' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Chen Zhou Signed-off-by: J. Bruce Fields commit dfa7f709596be5ca46c070d4f8acbb344322056a Author: Ido Schimmel Date: Fri Feb 7 19:29:28 2020 +0200 drop_monitor: Do not cancel uninitialized work item Drop monitor uses a work item that takes care of constructing and sending netlink notifications to user space. In case drop monitor never started to monitor, then the work item is uninitialized and not associated with a function. Therefore, a stop command from user space results in canceling an uninitialized work item which leads to the following warning [1]. Fix this by not processing a stop command if drop monitor is not currently monitoring. [1] [ 31.735402] ------------[ cut here ]------------ [ 31.736470] WARNING: CPU: 0 PID: 143 at kernel/workqueue.c:3032 __flush_work+0x89f/0x9f0 ... [ 31.738120] CPU: 0 PID: 143 Comm: dwdump Not tainted 5.5.0-custom-09491-g16d4077796b8 #727 [ 31.741968] RIP: 0010:__flush_work+0x89f/0x9f0 ... [ 31.760526] Call Trace: [ 31.771689] __cancel_work_timer+0x2a6/0x3b0 [ 31.776809] net_dm_cmd_trace+0x300/0xef0 [ 31.777549] genl_rcv_msg+0x5c6/0xd50 [ 31.781005] netlink_rcv_skb+0x13b/0x3a0 [ 31.784114] genl_rcv+0x29/0x40 [ 31.784720] netlink_unicast+0x49f/0x6a0 [ 31.787148] netlink_sendmsg+0x7cf/0xc80 [ 31.790426] ____sys_sendmsg+0x620/0x770 [ 31.793458] ___sys_sendmsg+0xfd/0x170 [ 31.802216] __sys_sendmsg+0xdf/0x1a0 [ 31.806195] do_syscall_64+0xa0/0x540 [ 31.806885] entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: 8e94c3bc922e ("drop_monitor: Allow user to start monitoring hardware drops") Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit e036c587cabe64264e27c489b155cb72f8e4b565 Merge: f8c2afa66d53 3a99cbb6fa7b Author: David S. Miller Date: Fri Feb 7 18:47:01 2020 +0100 Merge branch 'mlxsw-Various-fixes' Ido Schimmel says: ==================== mlxsw: Various fixes This patch set contains various fixes for the mlxsw driver. Patch #1 fixes an issue introduced in 5.6 in which a route in the main table can replace an identical route in the local table despite the local table having an higher precedence. Patch #2 contains a test case for the bug fixed in patch #1. Patch #3 also fixes an issue introduced in 5.6 in which the driver failed to clear the offload indication from IPv6 nexthops upon abort. Patch #4 fixes an issue that prevents the driver from loading on Spectrum-3 systems. The problem and solution are explained in detail in the commit message. Patch #5 adds a missing error path. Discovered using smatch. ==================== Signed-off-by: David S. Miller commit 3a99cbb6fa7bca1995586ec2dc21b0368aad4937 Author: Ido Schimmel Date: Fri Feb 7 19:26:28 2020 +0200 mlxsw: spectrum_dpipe: Add missing error path In case devlink_dpipe_entry_ctx_prepare() failed, release RTNL that was previously taken and free the memory allocated by mlxsw_sp_erif_entry_prepare(). Fixes: 2ba5999f009d ("mlxsw: spectrum: Add Support for erif table entries access") Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 36844c855b896f90bab51ccecf72940eb7e3cfe1 Author: Vadim Pasternak Date: Fri Feb 7 19:26:27 2020 +0200 mlxsw: core: Add validation of hardware device types for MGPIR register When reading the number of gearboxes from the hardware, the driver does not validate the returned 'device type' field. The driver can therefore wrongly assume that the queried devices are gearboxes. On Spectrum-3 systems that support different types of devices, this can prevent the driver from loading, as it will try to query the temperature sensors from devices which it assumes are gearboxes and in fact are not. For example: [ 218.129230] mlxsw_minimal 2-0048: Reg cmd access status failed (status=7(bad parameter)) [ 218.138282] mlxsw_minimal 2-0048: Reg cmd access failed (reg_id=900a(mtmp),type=write) [ 218.147131] mlxsw_minimal 2-0048: Failed to setup temp sensor number 256 [ 218.534480] mlxsw_minimal 2-0048: Fail to register core bus [ 218.540714] mlxsw_minimal: probe of 2-0048 failed with error -5 Fix this by validating the 'device type' field. Fixes: 2e265a8b6c094 ("mlxsw: core: Extend hwmon interface with inter-connect temperature attributes") Fixes: f14f4e621b1b4 ("mlxsw: core: Extend thermal core with per inter-connect device thermal zones") Signed-off-by: Vadim Pasternak Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 490f0542a7f75572c841afa92da83b549e7d47f9 Author: Ido Schimmel Date: Fri Feb 7 19:26:26 2020 +0200 mlxsw: spectrum_router: Clear offload indication from IPv6 nexthops on abort Unlike IPv4, in IPv6 there is no unique structure to represent the nexthop and both the route and nexthop information are squashed to the same structure ('struct fib6_info'). In order to improve resource utilization the driver consolidates identical nexthop groups to the same internal representation of a nexthop group. Therefore, when the offload indication of a nexthop changes, the driver needs to iterate over all the linked fib6_info and toggle their offload flag accordingly. During abort, all the routes are removed from the device and unlinked from their nexthop group. The offload indication is cleared just before the group is destroyed, but by that time no fib6_info is linked to the group and the offload indication remains set. Fix this by clearing the offload indication just before dropping the reference from the nexthop. Fixes: ee5a0448e72b ("mlxsw: spectrum_router: Set hardware flags for routes") Reported-by: Alex Kushnarov Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Tested-by: Alex Kushnarov Signed-off-by: David S. Miller commit 6c05ca26f1153b4346ffd03cf65910ecc9cabbbf Author: Ido Schimmel Date: Fri Feb 7 19:26:25 2020 +0200 selftests: mlxsw: Add test cases for local table route replacement Test that routes in the main table do not replace identical routes in the local table and that routes in the local table do replace identical routes in the main table. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 0508ff8934f40b52a78313049b96eec29a46ba49 Author: Ido Schimmel Date: Fri Feb 7 19:26:24 2020 +0200 mlxsw: spectrum_router: Prevent incorrect replacement of local table routes The driver uses the same table to represent both the main and local routing tables. Prevent routes in the main table from replacing routes in the local table to reflect the fact that the local table is consulted first during lookup. Fixes: b6a1d871d37a ("mlxsw: spectrum_router: Start using new IPv4 route notifications") Fixes: dacad7b34b59 ("mlxsw: spectrum_router: Start using new IPv6 route notifications") Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit f8c2afa66d5397b0b9293c4347dac6dabb327685 Author: Razvan Stefanescu Date: Fri Feb 7 17:44:04 2020 +0200 net: dsa: microchip: enable module autoprobe This matches /sys/devices/.../spi1.0/modalias content. Fixes: 9b2d9f05cddf ("net: dsa: microchip: add ksz9567 to ksz9477 driver") Fixes: d9033ae95cf4 ("net: dsa: microchip: add KSZ8563 compatibility string") Fixes: 8c29bebb1f8a ("net: dsa: microchip: add KSZ9893 switch support") Fixes: 45316818371d ("net: dsa: add support for ksz9897 ethernet switch") Fixes: b987e98e50ab ("dsa: add DSA switch driver for Microchip KSZ9477") Signed-off-by: Razvan Stefanescu Signed-off-by: Codrin Ciubotariu Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit db3fa271022dacb9f741b96ea4714461a8911bb9 Author: Eric Dumazet Date: Fri Feb 7 07:16:37 2020 -0800 ipv6/addrconf: fix potential NULL deref in inet6_set_link_af() __in6_dev_get(dev) called from inet6_set_link_af() can return NULL. The needed check has been recently removed, let's add it back. While do_setlink() does call validate_linkmsg() : ... err = validate_linkmsg(dev, tb); /* OK at this point */ ... It is possible that the following call happening before the ->set_link_af() removes IPv6 if MTU is less than 1280 : if (tb[IFLA_MTU]) { err = dev_set_mtu_ext(dev, nla_get_u32(tb[IFLA_MTU]), extack); if (err < 0) goto errout; status |= DO_SETLINK_MODIFIED; } ... if (tb[IFLA_AF_SPEC]) { ... err = af_ops->set_link_af(dev, af); ->inet6_set_link_af() // CRASH because idev is NULL Please note that IPv4 is immune to the bug since inet_set_link_af() does : struct in_device *in_dev = __in_dev_get_rcu(dev); if (!in_dev) return -EAFNOSUPPORT; This problem has been mentioned in commit cf7afbfeb8ce ("rtnl: make link af-specific updates atomic") changelog : This method is not fail proof, while it is currently sufficient to make set_link_af() inerrable and thus 100% atomic, the validation function method will not be able to detect all error scenarios in the future, there will likely always be errors depending on states which are f.e. not protected by rtnl_mutex and thus may change between validation and setting. IPv6: ADDRCONF(NETDEV_CHANGE): lo: link becomes ready general protection fault, probably for non-canonical address 0xdffffc0000000056: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x00000000000002b0-0x00000000000002b7] CPU: 0 PID: 9698 Comm: syz-executor712 Not tainted 5.5.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:inet6_set_link_af+0x66e/0xae0 net/ipv6/addrconf.c:5733 Code: 38 d0 7f 08 84 c0 0f 85 20 03 00 00 48 8d bb b0 02 00 00 45 0f b6 64 24 04 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 1a 03 00 00 44 89 a3 b0 02 00 RSP: 0018:ffffc90005b06d40 EFLAGS: 00010206 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff86df39a6 RDX: 0000000000000056 RSI: ffffffff86df3e74 RDI: 00000000000002b0 RBP: ffffc90005b06e70 R08: ffff8880a2ac0380 R09: ffffc90005b06db0 R10: fffff52000b60dbe R11: ffffc90005b06df7 R12: 0000000000000000 R13: 0000000000000000 R14: ffff8880a1fcc424 R15: dffffc0000000000 FS: 0000000000c46880(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055f0494ca0d0 CR3: 000000009e4ac000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: do_setlink+0x2a9f/0x3720 net/core/rtnetlink.c:2754 rtnl_group_changelink net/core/rtnetlink.c:3103 [inline] __rtnl_newlink+0xdd1/0x1790 net/core/rtnetlink.c:3257 rtnl_newlink+0x69/0xa0 net/core/rtnetlink.c:3377 rtnetlink_rcv_msg+0x45e/0xaf0 net/core/rtnetlink.c:5438 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5456 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x59e/0x7e0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 ____sys_sendmsg+0x753/0x880 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmsg+0x105/0x1d0 net/socket.c:2430 __do_sys_sendmsg net/socket.c:2439 [inline] __se_sys_sendmsg net/socket.c:2437 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2437 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4402e9 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fffd62fbcf8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004402e9 RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 00000000006ca018 R08: 0000000000000008 R09: 00000000004002c8 R10: 0000000000000005 R11: 0000000000000246 R12: 0000000000401b70 R13: 0000000000401c00 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: ---[ end trace cfa7664b8fdcdff3 ]--- RIP: 0010:inet6_set_link_af+0x66e/0xae0 net/ipv6/addrconf.c:5733 Code: 38 d0 7f 08 84 c0 0f 85 20 03 00 00 48 8d bb b0 02 00 00 45 0f b6 64 24 04 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 08 3c 03 0f 8e 1a 03 00 00 44 89 a3 b0 02 00 RSP: 0018:ffffc90005b06d40 EFLAGS: 00010206 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff86df39a6 RDX: 0000000000000056 RSI: ffffffff86df3e74 RDI: 00000000000002b0 RBP: ffffc90005b06e70 R08: ffff8880a2ac0380 R09: ffffc90005b06db0 R10: fffff52000b60dbe R11: ffffc90005b06df7 R12: 0000000000000000 R13: 0000000000000000 R14: ffff8880a1fcc424 R15: dffffc0000000000 FS: 0000000000c46880(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000004 CR3: 000000009e4ac000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Fixes: 7dc2bccab0ee ("Validate required parameters in inet6_validate_link_af") Signed-off-by: Eric Dumazet Bisected-and-reported-by: syzbot Cc: Maxim Mikityanskiy Signed-off-by: David S. Miller commit a7da92c2c8a1faf253a3b3e292fda6910deba540 Author: Florian Westphal Date: Mon Feb 3 13:06:18 2020 +0100 netfilter: flowtable: skip offload setup if disabled nftables test case tests/shell/testcases/flowtable/0001flowtable_0 results in a crash. After the refactor, if we leave early via nf_flowtable_hw_offload(), then "struct flow_block_offload" is left in an uninitialized state, but later users assume its initialised. Fixes: a7965d58ddab02 ("netfilter: flowtable: add nf_flow_table_offload_cmd()") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 8d0015a7ab76b8b1e89a3e5f5710a6e5103f2dd5 Author: Cong Wang Date: Sun Feb 2 20:30:53 2020 -0800 netfilter: xt_hashlimit: limit the max size of hashtable The user-specified hashtable size is unbound, this could easily lead to an OOM or a hung task as we hold the global mutex while allocating and initializing the new hashtable. Add a max value to cap both cfg->size and cfg->max, as suggested by Florian. Reported-and-tested-by: syzbot+adf6c6c2be1c3a718121@syzkaller.appspotmail.com Signed-off-by: Cong Wang Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit c4a3922d2d20c710f827d3a115ee338e8d0467df Author: Cong Wang Date: Sun Feb 2 20:30:52 2020 -0800 netfilter: xt_hashlimit: reduce hashlimit_mutex scope for htable_put() It is unnecessary to hold hashlimit_mutex for htable_destroy() as it is already removed from the global hashtable and its refcount is already zero. Also, switch hinfo->use to refcount_t so that we don't have to hold the mutex until it reaches zero in htable_put(). Reported-and-tested-by: syzbot+adf6c6c2be1c3a718121@syzkaller.appspotmail.com Acked-by: Florian Westphal Signed-off-by: Cong Wang Signed-off-by: Pablo Neira Ayuso commit 1e474b28e78897d0d170fab3b28ba683149cb9ea Author: Paul E. McKenney Date: Wed Feb 5 06:34:09 2020 -0800 smp/up: Make smp_call_function_single() match SMP semantics In CONFIG_SMP=y kernels, smp_call_function_single() returns -ENXIO when invoked for a non-existent CPU. In contrast, in CONFIG_SMP=n kernels, a splat is emitted and smp_call_function_single() otherwise silently ignores its "cpu" argument, instead pretending that the caller intended to have something happen on CPU 0. Given that there is now code that expects smp_call_function_single() to return an error if a bad CPU was specified, this difference in semantics needs to be addressed. Bring the semantics of the CONFIG_SMP=n version of smp_call_function_single() into alignment with its CONFIG_SMP=y counterpart. Signed-off-by: Paul E. McKenney Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200205143409.GA7021@paulmck-ThinkPad-P72 commit 0f378d73d429d5f73fe2f00be4c9a15dbe9779ee Author: Tony W Wang-oc Date: Wed Jan 15 16:22:19 2020 +0800 x86/apic: Mask IOAPIC entries when disabling the local APIC When a system suspends, the local APIC is disabled in the suspend sequence, but the IOAPIC is left in the current state. This means unmasked interrupt lines stay unmasked. This is usually the case for IOAPIC pin 9 to which the ACPI interrupt is connected. That means that in suspended state the IOAPIC can respond to an external interrupt, e.g. the wakeup via keyboard/RTC/ACPI, but the interrupt message cannot be handled by the disabled local APIC. As a consequence the Remote IRR bit is set, but the local APIC does not send an EOI to acknowledge it. This causes the affected interrupt line to become stale and the stale Remote IRR bit will cause a hang when __synchronize_hardirq() is invoked for that interrupt line. To prevent this, mask all IOAPIC entries before disabling the local APIC. The resume code already has the unmask operation inside. [ tglx: Massaged changelog ] Signed-off-by: Tony W Wang-oc Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/1579076539-7267-1-git-send-email-TonyWWang-oc@zhaoxin.com commit 73a21fa817f0cc8022dc6226250a86bca727a56d Author: Madalin Bucur Date: Tue Feb 4 12:08:58 2020 +0200 dpaa_eth: support all modes with rate adapting PHYs Stop removing modes that are not supported on the system interface when the connected PHY is capable of rate adaptation. This addresses an issue with the LS1046ARDB board 10G interface no longer working with an 1G link partner after autonegotiation support was added for the Aquantia PHY on board in commit 09c4c57f7bc4 ("net: phy: aquantia: add support for auto-negotiation configuration") Before this commit the values advertised by the PHY were not influenced by the dpaa_eth driver removal of system-side unsupported modes as the aqr_config_aneg() was basically a no-op. After this commit, the modes removed by the dpaa_eth driver were no longer advertised thus autonegotiation with 1G link partners failed. Reported-by: Mian Yousaf Kaukab Signed-off-by: Madalin Bucur Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit bfb7bac3a8f47100ebe7961bd14e924c96e21ca7 Author: Sergey Matyukevich Date: Mon Feb 3 10:56:50 2020 +0000 cfg80211: check wiphy driver existence for drvinfo report When preparing ethtool drvinfo, check if wiphy driver is defined before dereferencing it. Driver may not exist, e.g. if wiphy is attached to a virtual platform device. Signed-off-by: Sergey Matyukevich Link: https://lore.kernel.org/r/20200203105644.28875-1-sergey.matyukevich.os@quantenna.com Signed-off-by: Johannes Berg commit a04564c99bb4a92f805a58e56b2d22cc4978f152 Author: Johannes Berg Date: Fri Jan 31 13:12:58 2020 +0200 mac80211: consider more elements in parsing CRC We only use the parsing CRC for checking if a beacon changed, and elements with an ID > 63 cannot be represented in the filter. Thus, like we did before with WMM and Cisco vendor elements, just statically add these forgotten items to the CRC: - WLAN_EID_VHT_OPERATION - WLAN_EID_OPMODE_NOTIF I guess that in most cases when VHT/HE operation change, the HT operation also changed, and so the change was picked up, but we did notice that pure operating mode notification changes were ignored. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/20200131111300.891737-22-luca@coelho.fi [restrict to VHT for the mac80211 branch] Signed-off-by: Johannes Berg commit 2bf973ff9b9aeceb8acda629ae65341820d4b35b Author: Sara Sharon Date: Fri Jan 31 13:12:51 2020 +0200 mac80211: fix quiet mode activation in action frames Previously I intended to ignore quiet mode in probe response, however I ended up ignoring it instead for action frames. As a matter of fact, this path isn't invoked for probe responses to start with. Just revert this patch. Signed-off-by: Sara Sharon Fixes: 7976b1e9e3bf ("mac80211: ignore quiet mode in probe") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/20200131111300.891737-15-luca@coelho.fi Signed-off-by: Johannes Berg commit 259039fa30457986929a324d769f543c1509987f Merge: 184367dce4f7 909c1dde67c4 Author: David S. Miller Date: Fri Feb 7 11:36:22 2020 +0100 Merge branch 'stmmac-fixes' Ong Boon Leong says: ==================== net: stmmac: general fixes for Ethernet functionality 1/5: It ensures that the previous value of GMAC_VLAN_TAG register is read first before for updating the register. 2/5: Similar to 2/6 patch but it is a fix for XGMAC_VLAN_TAG register as requested by Jose Abreu. 3/5: It ensures the GMAC IP v4.xx and above behaves correctly to:- ip link set multicast off|on 4/5: Added similar IFF_MULTICAST flag for xgmac2, similar to 4/6. 5/5: It ensures PCI platform data is using plat->phy_interface. Changes from v4:- patch 1/6 - this patch is dropped now and will take the input on handling return value from netif_set_real_num_rx| tx_queues() in future patch series. v3:- patch 1/6 - add rtnl_lock() and rtnl_unlock() for stmmac_hw_setup() called inside stmmac_resume() patch 3/6 - Added new patch to fix XGMAC_VLAN_TAG register writting v2:- patch 1/5 - added control for rtnl_lock() & rtnl_unlock() to ensure they are used forstmmac_resume() patch 4/5 - added IFF_MULTICAST flag check for xgmac to ensure multicast works correctly. v1:- - Drop v1 patches (1/7, 3/7 & 4/7) that are not valid. ==================== Signed-off-by: David S. Miller commit 909c1dde67c433f1e4122f2619cbd8ac370fcf0a Author: Voon Weifeng Date: Fri Feb 7 15:34:28 2020 +0800 net: stmmac: update pci platform data to use phy_interface The recent patch to support passive mode converter did not take care the phy interface configuration in PCI platform data. Hence, converting all the PCI platform data from plat->interface to plat->phy_interface as the default mode is meant for PHY. Fixes: 0060c8783330 ("net: stmmac: implement support for passive mode converters via dt") Signed-off-by: Voon Weifeng Tested-by: Tan, Tee Min Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 2f633d5820e4ed870f408957322acb9263bce2f4 Author: Tan, Tee Min Date: Fri Feb 7 15:34:15 2020 +0800 net: stmmac: xgmac: fix missing IFF_MULTICAST checki in dwxgmac2_set_filter Without checking for IFF_MULTICAST flag, it is wrong to assume multicast filtering is always enabled. By checking against IFF_MULTICAST, now the driver behaves correctly when the multicast support is toggled by below command:- ip link set multicast off|on Fixes: 0efedbf11f07a ("net: stmmac: xgmac: Fix XGMAC selftests") Signed-off-by: Tan, Tee Min Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 2ba31cd93784b61813226d259fd94a221ecd9d61 Author: Verma, Aashish Date: Fri Feb 7 15:33:54 2020 +0800 net: stmmac: fix missing IFF_MULTICAST check in dwmac4_set_filter Without checking for IFF_MULTICAST flag, it is wrong to assume multicast filtering is always enabled. By checking against IFF_MULTICAST, now the driver behaves correctly when the multicast support is toggled by below command:- ip link set multicast off|on Fixes: 477286b53f55 ("stmmac: add GMAC4 core support") Signed-off-by: Verma, Aashish Tested-by: Tan, Tee Min Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 907a076881f171254219faad05f46ac5baabedfb Author: Ong Boon Leong Date: Fri Feb 7 15:33:40 2020 +0800 net: stmmac: xgmac: fix incorrect XGMAC_VLAN_TAG register writting We should always do a read of current value of XGMAC_VLAN_TAG instead of directly overwriting the register value. Fixes: 3cd1cfcba26e2 ("net: stmmac: Implement VLAN Hash Filtering in XGMAC") Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 9eeeb3c9de4e3aeaa2bec097162f09305dd9f4c3 Author: Tan, Tee Min Date: Fri Feb 7 15:33:20 2020 +0800 net: stmmac: fix incorrect GMAC_VLAN_TAG register writting in GMAC4+ It should always do a read of current value of GMAC_VLAN_TAG instead of directly overwriting the register value. Fixes: c1be0022df0d ("net: stmmac: Add VLAN HASH filtering support in GMAC4+") Signed-off-by: Tan, Tee Min Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 184367dce4f744bde54377203305ccc8889aa79f Author: Haiyang Zhang Date: Thu Feb 6 14:01:05 2020 -0800 hv_netvsc: Fix XDP refcnt for synthetic and VF NICs The caller of XDP_SETUP_PROG has already incremented refcnt in __bpf_prog_get(), so drivers should only increment refcnt by num_queues - 1. To fix the issue, update netvsc_xdp_set() to add the correct number to refcnt. Hold a refcnt in netvsc_xdp_set()’s other caller, netvsc_attach(). And, do the same in netvsc_vf_setxdp(). Otherwise, every time when VF is removed and added from the host side, the refcnt will be decreased by one, which may cause page fault when unloading xdp program. Fixes: 351e1581395f ("hv_netvsc: Add XDP support") Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller commit f2b18baca9539c6a3116d48b70972c7a2ba5d766 Author: Johannes Berg Date: Wed Jan 15 12:25:50 2020 +0100 mac80211: use more bits for ack_frame_id It turns out that this wasn't a good idea, I hit a test failure in hwsim due to this. That particular failure was easily worked around, but it raised questions: if an AP needs to, for example, send action frames to each connected station, the current limit is nowhere near enough (especially if those stations are sleeping and the frames are queued for a while.) Shuffle around some bits to make more room for ack_frame_id to allow up to 8192 queued up frames, that's enough for queueing 4 frames to each connected station, even at the maximum of 2007 stations on a single AP. We take the bits from band (which currently only 2 but I leave 3 in case we add another band) and from the hw_queue, which can only need 4 since it has a limit of 16 queues. Fixes: 6912daed05e1 ("mac80211: Shrink the size of ack_frame_id to make room for tx_time_est") Signed-off-by: Johannes Berg Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20200115122549.b9a4ef9f4980.Ied52ed90150220b83a280009c590b65d125d087c@changeid Signed-off-by: Johannes Berg commit 6910fe95c61880e75b1c3a20eb13a6fd01ca501a Merge: de34d7084edd bfabd41da341 Author: David S. Miller Date: Fri Feb 7 11:30:03 2020 +0100 Merge branch 'taprio-Some-fixes' Vinicius Costa Gomes says: ==================== taprio: Some fixes Changes from v3: - Replaced ENOTSUPP error code with EOPNOTSUPP (Jakub Kicinski); - Added the missing policy validation for the flags netlink argument (Jakub Kicinski); - Fixed the destroy() flow to also destroy the priority to traffic class mapping (David Miller); - Fixed dropping packets when taprio offloading is used together with ETF offloading (more on this below); Changes from v2: - Squashed commits 2/3 and 3/3 into a single one (I think a single commit is going to be easier to review); - Removed an "improvement" that was causing changes in user visible behavior; Changes from v1: - Fixed ignoring the 'flags' argument when adding a new instance (Vladimir Oltean); - Changed the order of commits; Updated cover letter: One bit that might need some attention is the fix for not dropping all packets when taprio and ETF offloading are used, patch 5/5. The behavior when the fix is applied is that packets that have a 'txtime' that would fall outside of their transmission window are now dropped by taprio. The question that might be raised is: should taprio be responsible for dropping these packets, or should it be handled lower in the stack? My opinion is: taprio has all the information, and it's able to give feeback to the user. Lower in the stack, those packets might go into the void, and the only feedback could be a hard to find counter increasing. Patch 1/5: Reported by Po Liu, is more of a improvement of usability for drivers implementing offloading features, now they can rely on the value of dev->num_tc, instead of going through some hops to get this value. Patch 2/5: Use 'q->flags' as the source of truth for the offloading flags. Tries to solidify the current behavior, while avoiding going into invalid states, one of which was causing a "rcu stall" (more information in the commit message). Patch 3/5: Adds the missing netlink attribute validation for TCA_TAPRIO_ATTR_FLAGS. Patch 4/5: Replaces the usage of netdev_set_num_tc() with netdev_reset_tc() in taprio_destroy(), taprio_destroy() is called when applying a configuration fails, making sure that the device traffic class configuration goes back to the default state. @Vladimir: If possible, I would appreciate your Ack on patch 2/5. I have been looking at this code for so long that I might have missed something obvious (and my growing dislike for the word 'flags' may be affecting my judgement :-). ==================== Signed-off-by: David S. Miller commit bfabd41da34180d05382312533a3adc2e012dee0 Author: Vinicius Costa Gomes Date: Thu Feb 6 13:46:10 2020 -0800 taprio: Fix dropping packets when using taprio + ETF offloading When using taprio offloading together with ETF offloading, configured like this, for example: $ tc qdisc replace dev $IFACE parent root handle 100 taprio \ num_tc 4 \ map 2 2 1 0 3 2 2 2 2 2 2 2 2 2 2 2 \ queues 1@0 1@1 1@2 1@3 \ base-time $BASE_TIME \ sched-entry S 01 1000000 \ sched-entry S 0e 1000000 \ flags 0x2 $ tc qdisc replace dev $IFACE parent 100:1 etf \ offload delta 300000 clockid CLOCK_TAI During enqueue, it works out that the verification added for the "txtime" assisted mode is run when using taprio + ETF offloading, the only thing missing is initializing the 'next_txtime' of all the cycle entries. (if we don't set 'next_txtime' all packets from SO_TXTIME sockets are dropped) Fixes: 4cfd5779bd6e ("taprio: Add support for txtime-assist mode") Signed-off-by: Vinicius Costa Gomes Signed-off-by: David S. Miller commit 7c16680a08ee1e444a67d232c679ccf5b30fad16 Author: Vinicius Costa Gomes Date: Thu Feb 6 13:46:09 2020 -0800 taprio: Use taprio_reset_tc() to reset Traffic Classes configuration When destroying the current taprio instance, which can happen when the creation of one fails, we should reset the traffic class configuration back to the default state. netdev_reset_tc() is a better way because in addition to setting the number of traffic classes to zero, it also resets the priority to traffic classes mapping to the default value. Fixes: 5a781ccbd19e ("tc: Add support for configuring the taprio scheduler") Signed-off-by: Vinicius Costa Gomes Signed-off-by: David S. Miller commit 49c684d79cfdc3032344bf6f3deeea81c4efedbf Author: Vinicius Costa Gomes Date: Thu Feb 6 13:46:08 2020 -0800 taprio: Add missing policy validation for flags netlink policy validation for the 'flags' argument was missing. Fixes: 4cfd5779bd6e ("taprio: Add support for txtime-assist mode") Signed-off-by: Vinicius Costa Gomes Signed-off-by: David S. Miller commit a9d6227436f32142209f4428f2dc616761485112 Author: Vinicius Costa Gomes Date: Thu Feb 6 13:46:07 2020 -0800 taprio: Fix still allowing changing the flags during runtime Because 'q->flags' starts as zero, and zero is a valid value, we aren't able to detect the transition from zero to something else during "runtime". The solution is to initialize 'q->flags' with an invalid value, so we can detect if 'q->flags' was set by the user or not. To better solidify the behavior, 'flags' handling is moved to a separate function. The behavior is: - 'flags' if unspecified by the user, is assumed to be zero; - 'flags' cannot change during "runtime" (i.e. a change() request cannot modify it); With this new function we can remove taprio_flags, which should reduce the risk of future accidents. Allowing flags to be changed was causing the following RCU stall: [ 1730.558249] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: [ 1730.558258] rcu: 6-...0: (190 ticks this GP) idle=922/0/0x1 softirq=25580/25582 fqs=16250 [ 1730.558264] (detected by 2, t=65002 jiffies, g=33017, q=81) [ 1730.558269] Sending NMI from CPU 2 to CPUs 6: [ 1730.559277] NMI backtrace for cpu 6 [ 1730.559277] CPU: 6 PID: 0 Comm: swapper/6 Tainted: G E 5.5.0-rc6+ #35 [ 1730.559278] Hardware name: Gigabyte Technology Co., Ltd. Z390 AORUS ULTRA/Z390 AORUS ULTRA-CF, BIOS F7 03/14/2019 [ 1730.559278] RIP: 0010:__hrtimer_run_queues+0xe2/0x440 [ 1730.559278] Code: 48 8b 43 28 4c 89 ff 48 8b 75 c0 48 89 45 c8 e8 f4 bb 7c 00 0f 1f 44 00 00 65 8b 05 40 31 f0 68 89 c0 48 0f a3 05 3e 5c 25 01 <0f> 82 fc 01 00 00 48 8b 45 c8 48 89 df ff d0 89 45 c8 0f 1f 44 00 [ 1730.559279] RSP: 0018:ffff9970802d8f10 EFLAGS: 00000083 [ 1730.559279] RAX: 0000000000000006 RBX: ffff8b31645bff38 RCX: 0000000000000000 [ 1730.559280] RDX: 0000000000000000 RSI: ffffffff9710f2ec RDI: ffffffff978daf0e [ 1730.559280] RBP: ffff9970802d8f68 R08: 0000000000000000 R09: 0000000000000000 [ 1730.559280] R10: 0000018336d7944e R11: 0000000000000001 R12: ffff8b316e39f9c0 [ 1730.559281] R13: ffff8b316e39f940 R14: ffff8b316e39f998 R15: ffff8b316e39f7c0 [ 1730.559281] FS: 0000000000000000(0000) GS:ffff8b316e380000(0000) knlGS:0000000000000000 [ 1730.559281] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1730.559281] CR2: 00007f1105303760 CR3: 0000000227210005 CR4: 00000000003606e0 [ 1730.559282] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1730.559282] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1730.559282] Call Trace: [ 1730.559282] [ 1730.559283] ? taprio_dequeue_soft+0x2d0/0x2d0 [sch_taprio] [ 1730.559283] hrtimer_interrupt+0x104/0x220 [ 1730.559283] ? irqtime_account_irq+0x34/0xa0 [ 1730.559283] smp_apic_timer_interrupt+0x6d/0x230 [ 1730.559284] apic_timer_interrupt+0xf/0x20 [ 1730.559284] [ 1730.559284] RIP: 0010:cpu_idle_poll+0x35/0x1a0 [ 1730.559285] Code: 88 82 ff 65 44 8b 25 12 7d 73 68 0f 1f 44 00 00 e8 90 c3 89 ff fb 65 48 8b 1c 25 c0 7e 01 00 48 8b 03 a8 08 74 0b eb 1c f3 90 <48> 8b 03 a8 08 75 13 8b 05 be a8 a8 00 85 c0 75 ed e8 75 48 84 ff [ 1730.559285] RSP: 0018:ffff997080137ea8 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff13 [ 1730.559285] RAX: 0000000000000001 RBX: ffff8b316bc3c580 RCX: 0000000000000000 [ 1730.559286] RDX: 0000000000000001 RSI: 000000002819aad9 RDI: ffffffff978da730 [ 1730.559286] RBP: ffff997080137ec0 R08: 0000018324a6d387 R09: 0000000000000000 [ 1730.559286] R10: 0000000000000400 R11: 0000000000000001 R12: 0000000000000006 [ 1730.559286] R13: ffff8b316bc3c580 R14: 0000000000000000 R15: 0000000000000000 [ 1730.559287] ? cpu_idle_poll+0x20/0x1a0 [ 1730.559287] ? cpu_idle_poll+0x20/0x1a0 [ 1730.559287] do_idle+0x4d/0x1f0 [ 1730.559287] ? complete+0x44/0x50 [ 1730.559288] cpu_startup_entry+0x1b/0x20 [ 1730.559288] start_secondary+0x142/0x180 [ 1730.559288] secondary_startup_64+0xb6/0xc0 [ 1776.686313] nvme nvme0: I/O 96 QID 1 timeout, completion polled Fixes: 4cfd5779bd6e ("taprio: Add support for txtime-assist mode") Signed-off-by: Vinicius Costa Gomes Signed-off-by: David S. Miller commit 5652e63df3303c2a702bac25fbf710b9cb64dfba Author: Vinicius Costa Gomes Date: Thu Feb 6 13:46:06 2020 -0800 taprio: Fix enabling offload with wrong number of traffic classes If the driver implementing taprio offloading depends on the value of the network device number of traffic classes (dev->num_tc) for whatever reason, it was going to receive the value zero. The value was only set after the offloading function is called. So, moving setting the number of traffic classes to before the offloading function is called fixes this issue. This is safe because this only happens when taprio is instantiated (we don't allow this configuration to be changed without first removing taprio). Fixes: 9c66d1564676 ("taprio: Add support for hardware offloading") Reported-by: Po Liu Signed-off-by: Vinicius Costa Gomes Acked-by: Vladimir Oltean Signed-off-by: David S. Miller commit de34d7084edd069dac5aa010cfe32bd8c4619fa6 Author: Florian Fainelli Date: Thu Feb 6 11:23:52 2020 -0800 net: dsa: bcm_sf2: Only 7278 supports 2Gb/sec IMP port The 7445 switch clocking profiles do not allow us to run the IMP port at 2Gb/sec in a way that it is reliable and consistent. Make sure that the setting is only applied to the 7278 family. Fixes: 8f1880cbe8d0 ("net: dsa: bcm_sf2: Configure IMP port for 2Gb/sec") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit df373702bc0f8f2d83980ea441e71639fc1efcf8 Author: Florian Fainelli Date: Thu Feb 6 11:07:45 2020 -0800 net: dsa: b53: Always use dev->vlan_enabled in b53_configure_vlan() b53_configure_vlan() is called by the bcm_sf2 driver upon setup and indirectly through resume as well. During the initial setup, we are guaranteed that dev->vlan_enabled is false, so there is no change in behavior, however during suspend, we may have enabled VLANs before, so we do want to restore that setting. Fixes: dad8d7c6452b ("net: dsa: b53: Properly account for VLAN filtering") Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 7d10f0774f9e32aa2f2e012f7fcb312a2ce422b9 Author: Dejin Zheng Date: Thu Feb 6 23:29:17 2020 +0800 net: stmmac: fix a possible endless loop It forgot to reduce the value of the variable retry in a while loop in the ethqos_configure() function. It may cause an endless loop and without timeout. Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos") Signed-off-by: Dejin Zheng Acked-by: Vinod Koul Signed-off-by: David S. Miller commit 963485d436ccc2810177a7b08af22336ec2af67b Author: David Howells Date: Thu Feb 6 13:57:40 2020 +0000 rxrpc: Fix call RCU cleanup using non-bh-safe locks rxrpc_rcu_destroy_call(), which is called as an RCU callback to clean up a put call, calls rxrpc_put_connection() which, deep in its bowels, takes a number of spinlocks in a non-BH-safe way, including rxrpc_conn_id_lock and local->client_conns_lock. RCU callbacks, however, are normally called from softirq context, which can cause lockdep to notice the locking inconsistency. To get lockdep to detect this, it's necessary to have the connection cleaned up on the put at the end of the last of its calls, though normally the clean up is deferred. This can be induced, however, by starting a call on an AF_RXRPC socket and then closing the socket without reading the reply. Fix this by having rxrpc_rcu_destroy_call() punt the destruction to a workqueue if in softirq-mode and defer the destruction to process context. Note that another way to fix this could be to add a bunch of bh-disable annotations to the spinlocks concerned - and there might be more than just those two - but that means spending more time with BHs disabled. Note also that some of these places were covered by bh-disable spinlocks belonging to the rxrpc_transport object, but these got removed without the _bh annotation being retained on the next lock in. Fixes: 999b69f89241 ("rxrpc: Kill the client connection bundle concept") Reported-by: syzbot+d82f3ac8d87e7ccbb2c9@syzkaller.appspotmail.com Reported-by: syzbot+3f1fd6b8cbf8702d134e@syzkaller.appspotmail.com Signed-off-by: David Howells cc: Hillf Danton Signed-off-by: David S. Miller commit b39a934ec72fa2b5a74123891f25273a38378b90 Author: David Howells Date: Thu Feb 6 13:55:01 2020 +0000 rxrpc: Fix service call disconnection The recent patch that substituted a flag on an rxrpc_call for the connection pointer being NULL as an indication that a call was disconnected puts the set_bit in the wrong place for service calls. This is only a problem if a call is implicitly terminated by a new call coming in on the same connection channel instead of a terminating ACK packet. In such a case, rxrpc_input_implicit_end_call() calls __rxrpc_disconnect_call(), which is now (incorrectly) setting the disconnection bit, meaning that when rxrpc_release_call() is later called, it doesn't call rxrpc_disconnect_call() and so the call isn't removed from the peer's error distribution list and the list gets corrupted. KASAN finds the issue as an access after release on a call, but the position at which it occurs is confusing as it appears to be related to a different call (the call site is where the latter call is being removed from the error distribution list and either the next or pprev pointer points to a previously released call). Fix this by moving the setting of the flag from __rxrpc_disconnect_call() to rxrpc_disconnect_call() in the same place that the connection pointer was being cleared. Fixes: 5273a191dca6 ("rxrpc: Fix NULL pointer deref due to call->conn being cleared on disconnect") Signed-off-by: David Howells Signed-off-by: David S. Miller commit 332008256f1f7cd8294acd6e288fb821f685d1a9 Merge: c21502efdaed e093e53f4f70 f06572ef476d Author: Rafael J. Wysocki Date: Fri Feb 7 11:01:40 2020 +0100 Merge branches 'pm-avs' and 'pm-cpuidle' * pm-avs: power: avs: qcom-cpr: Avoid clang -Wsometimes-uninitialized in cpr_scale power: avs: qcom-cpr: add unspecified HAS_IOMEM dependency PM / AVS: rockchip-io: fix the supply naming for the emmc supply on px30 power: avs: qcom-cpr: add a printout after the driver has been initialized * pm-cpuidle: cpuidle: Documentation: Clean up PM QoS description intel_idle: Introduce 'states_off' module parameter intel_idle: Introduce 'use_acpi' module parameter commit fcb9c24bef3d1d0942c50fb25fbb8ab45c7c3753 Author: Damien Le Moal Date: Wed Dec 25 16:11:09 2019 +0900 zonefs: Add documentation Add the new file Documentation/filesystems/zonefs.txt to document zonefs principles and user-space tool usage. Signed-off-by: Damien Le Moal Reviewed-by: Dave Chinner commit 8dcc1a9d90c10fa4143e5c17821082e5e60e46a1 Author: Damien Le Moal Date: Wed Dec 25 16:07:44 2019 +0900 fs: New zonefs file system zonefs is a very simple file system exposing each zone of a zoned block device as a file. Unlike a regular file system with zoned block device support (e.g. f2fs), zonefs does not hide the sequential write constraint of zoned block devices to the user. Files representing sequential write zones of the device must be written sequentially starting from the end of the file (append only writes). As such, zonefs is in essence closer to a raw block device access interface than to a full featured POSIX file system. The goal of zonefs is to simplify the implementation of zoned block device support in applications by replacing raw block device file accesses with a richer file API, avoiding relying on direct block device file ioctls which may be more obscure to developers. One example of this approach is the implementation of LSM (log-structured merge) tree structures (such as used in RocksDB and LevelDB) on zoned block devices by allowing SSTables to be stored in a zone file similarly to a regular file system rather than as a range of sectors of a zoned device. The introduction of the higher level construct "one file is one zone" can help reducing the amount of changes needed in the application as well as introducing support for different application programming languages. Zonefs on-disk metadata is reduced to an immutable super block to persistently store a magic number and optional feature flags and values. On mount, zonefs uses blkdev_report_zones() to obtain the device zone configuration and populates the mount point with a static file tree solely based on this information. E.g. file sizes come from the device zone type and write pointer offset managed by the device itself. The zone files created on mount have the following characteristics. 1) Files representing zones of the same type are grouped together under a common sub-directory: * For conventional zones, the sub-directory "cnv" is used. * For sequential write zones, the sub-directory "seq" is used. These two directories are the only directories that exist in zonefs. Users cannot create other directories and cannot rename nor delete the "cnv" and "seq" sub-directories. 2) The name of zone files is the number of the file within the zone type sub-directory, in order of increasing zone start sector. 3) The size of conventional zone files is fixed to the device zone size. Conventional zone files cannot be truncated. 4) The size of sequential zone files represent the file's zone write pointer position relative to the zone start sector. Truncating these files is allowed only down to 0, in which case, the zone is reset to rewind the zone write pointer position to the start of the zone, or up to the zone size, in which case the file's zone is transitioned to the FULL state (finish zone operation). 5) All read and write operations to files are not allowed beyond the file zone size. Any access exceeding the zone size is failed with the -EFBIG error. 6) Creating, deleting, renaming or modifying any attribute of files and sub-directories is not allowed. 7) There are no restrictions on the type of read and write operations that can be issued to conventional zone files. Buffered, direct and mmap read & write operations are accepted. For sequential zone files, there are no restrictions on read operations, but all write operations must be direct IO append writes. mmap write of sequential files is not allowed. Several optional features of zonefs can be enabled at format time. * Conventional zone aggregation: ranges of contiguous conventional zones can be aggregated into a single larger file instead of the default one file per zone. * File ownership: The owner UID and GID of zone files is by default 0 (root) but can be changed to any valid UID/GID. * File access permissions: the default 640 access permissions can be changed. The mkzonefs tool is used to format zoned block devices for use with zonefs. This tool is available on Github at: git@github.com:damien-lemoal/zonefs-tools.git. zonefs-tools also includes a test suite which can be run against any zoned block device, including null_blk block device created with zoned mode. Example: the following formats a 15TB host-managed SMR HDD with 256 MB zones with the conventional zones aggregation feature enabled. $ sudo mkzonefs -o aggr_cnv /dev/sdX $ sudo mount -t zonefs /dev/sdX /mnt $ ls -l /mnt/ total 0 dr-xr-xr-x 2 root root 1 Nov 25 13:23 cnv dr-xr-xr-x 2 root root 55356 Nov 25 13:23 seq The size of the zone files sub-directories indicate the number of files existing for each type of zones. In this example, there is only one conventional zone file (all conventional zones are aggregated under a single file). $ ls -l /mnt/cnv total 137101312 -rw-r----- 1 root root 140391743488 Nov 25 13:23 0 This aggregated conventional zone file can be used as a regular file. $ sudo mkfs.ext4 /mnt/cnv/0 $ sudo mount -o loop /mnt/cnv/0 /data The "seq" sub-directory grouping files for sequential write zones has in this example 55356 zones. $ ls -lv /mnt/seq total 14511243264 -rw-r----- 1 root root 0 Nov 25 13:23 0 -rw-r----- 1 root root 0 Nov 25 13:23 1 -rw-r----- 1 root root 0 Nov 25 13:23 2 ... -rw-r----- 1 root root 0 Nov 25 13:23 55354 -rw-r----- 1 root root 0 Nov 25 13:23 55355 For sequential write zone files, the file size changes as data is appended at the end of the file, similarly to any regular file system. $ dd if=/dev/zero of=/mnt/seq/0 bs=4K count=1 conv=notrunc oflag=direct 1+0 records in 1+0 records out 4096 bytes (4.1 kB, 4.0 KiB) copied, 0.000452219 s, 9.1 MB/s $ ls -l /mnt/seq/0 -rw-r----- 1 root root 4096 Nov 25 13:23 /mnt/seq/0 The written file can be truncated to the zone size, preventing any further write operation. $ truncate -s 268435456 /mnt/seq/0 $ ls -l /mnt/seq/0 -rw-r----- 1 root root 268435456 Nov 25 13:49 /mnt/seq/0 Truncation to 0 size allows freeing the file zone storage space and restart append-writes to the file. $ truncate -s 0 /mnt/seq/0 $ ls -l /mnt/seq/0 -rw-r----- 1 root root 0 Nov 25 13:49 /mnt/seq/0 Since files are statically mapped to zones on the disk, the number of blocks of a file as reported by stat() and fstat() indicates the size of the file zone. $ stat /mnt/seq/0 File: /mnt/seq/0 Size: 0 Blocks: 524288 IO Block: 4096 regular empty file Device: 870h/2160d Inode: 50431 Links: 1 Access: (0640/-rw-r-----) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2019-11-25 13:23:57.048971997 +0900 Modify: 2019-11-25 13:52:25.553805765 +0900 Change: 2019-11-25 13:52:25.553805765 +0900 Birth: - The number of blocks of the file ("Blocks") in units of 512B blocks gives the maximum file size of 524288 * 512 B = 256 MB, corresponding to the device zone size in this example. Of note is that the "IO block" field always indicates the minimum IO size for writes and corresponds to the device physical sector size. This code contains contributions from: * Johannes Thumshirn , * Darrick J. Wong , * Christoph Hellwig , * Chaitanya Kulkarni and * Ting Yao . Signed-off-by: Damien Le Moal Reviewed-by: Dave Chinner commit 5eede625297f4d21dc12ea7a7418fd21672f131d Author: Al Viro Date: Mon Dec 16 13:33:32 2019 -0500 fold struct fs_parameter_enum into struct constant_table no real difference now Signed-off-by: Al Viro commit 2710c957a8ef4fb00f21acb306e3bd6bcf80c81f Author: Al Viro Date: Fri Sep 6 22:12:08 2019 -0400 fs_parse: get rid of ->enums Don't do a single array; attach them to fsparam_enum() entry instead. And don't bother trying to embed the names into those - it actually loses memory, with no real speedup worth mentioning. Simplifies validation as well. Signed-off-by: Al Viro commit 0f89589a8c6f1033cb847a606517998efb0da8ee Author: Al Viro Date: Tue Dec 17 14:15:04 2019 -0500 Pass consistent param->type to fs_parse() As it is, vfs_parse_fs_string() makes "foo" and "foo=" indistinguishable; both get fs_value_is_string for ->type and NULL for ->string. To make it even more unpleasant, that combination is impossible to produce with fsconfig(). Much saner rules would be "foo" => fs_value_is_flag, NULL "foo=" => fs_value_is_string, "" "foo=bar" => fs_value_is_string, "bar" All cases are distinguishable, all results are expressable by fsconfig(), ->has_value checks are much simpler that way (to the point of the field being useless) and quite a few regressions go away (gfs2 has no business accepting -o nodebug=, for example). Partially based upon patches from Miklos. Signed-off-by: Al Viro commit 9f880327160feb695de03caa29604883b0d00087 Merge: a345cc0d393e 58fe03d6dec9 Author: Dave Airlie Date: Fri Feb 7 12:29:35 2020 +1000 Merge tag 'amd-drm-next-5.6-2020-02-05' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-next-5.6-2020-02-05: amdgpu: - EDC fixes for Arcturus - GDDR6 memory training fixe - Fix for reading gfx clockgating registers while in GFXOFF state - i2c freq fixes - Misc display fixes - TLB invalidation fix when using semaphores - VCN 2.5 instancing fixes - Switch raven1 gfxoff to a blacklist - Coreboot workaround for KV/KB - Root cause dongle fixes for display and revert workaround - Enable GPU reset for renoir and navi - Navi overclocking fixes - Fix up confusing warnings in display clock validation on raven amdkfd: - SDMA fix radeon: - Misc LUT fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200206035458.3894-1-alexander.deucher@amd.com commit a345cc0d393edddde8e83aadf8be5223316442aa Merge: e139e8aed0d3 137c4ba7163a Author: Dave Airlie Date: Fri Feb 7 12:23:24 2020 +1000 Merge branch 'linux-5.6' of git://github.com/skeggsb/linux into drm-next Just a couple of fixes to Volta/Turing modesetting on some systems. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/ Date: Fri Feb 7 12:22:23 2020 +1000 Merge tag 'drm/tegra/for-5.6-rc1-fixes' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Fixes for v5.6-rc1 These are a couple of quick fixes for regressions that were found during the first two weeks of the merge window. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20200206172753.2185390-1-thierry.reding@gmail.com commit 51d92d69f77b121d8093af82eb3bd2e8e631be55 Author: Steve French Date: Thu Feb 6 12:32:03 2020 -0600 smb3: Add defines for new information level, FileIdInformation See MS-FSCC 2.4.43. Valid to be quried from most Windows servers (among others). Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit ab3459d8f0ef52c38119ed58c4c29139efc7022c Author: Steve French Date: Thu Feb 6 17:31:56 2020 -0600 smb3: print warning once if posix context returned on open SMB3.1.1 POSIX Context processing is not complete yet - so print warning (once) if server returns it on open. Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit 2391ca41b476078da5cf72c2fe82ae9f03da8b38 Author: Steve French Date: Thu Feb 6 16:04:59 2020 -0600 smb3: add one more dynamic tracepoint missing from strict fsync path We didn't have a dynamic trace point for catching errors in file_write_and_wait_range error cases in cifs_strict_fsync. Since not all apps check for write behind errors, it can be important for debugging to be able to trace these error paths. Suggested-and-reviewed-by: Pavel Shilovsky Signed-off-by: Steve French commit e3e056c35108661e418c803adfc054bf683426e7 Author: Aurelien Aptel Date: Thu Feb 6 18:16:55 2020 +0100 cifs: fix mode bits from dir listing when mounted with modefromsid When mounting with -o modefromsid, the mode bits are stored in an ACE. Directory enumeration (e.g. ls -l /mnt) triggers an SMB Query Dir which does not include ACEs in its response. The mode bits in this case are silently set to a default value of 755 instead. This patch marks the dentry created during the directory enumeration as needing re-evaluation (i.e. additional Query Info with ACEs) so that the mode bits can be properly extracted. Quick repro: $ mount.cifs //win19.test/data /mnt -o ...,modefromsid $ touch /mnt/foo && chmod 751 /mnt/foo $ stat /mnt/foo # reports 751 (OK) $ sleep 2 # dentry older than 1s by default get invalidated $ ls -l /mnt # since dentry invalid, ls does a Query Dir # and reports foo as 755 (WRONG) Signed-off-by: Aurelien Aptel Signed-off-by: Steve French CC: Stable Reviewed-by: Pavel Shilovsky commit f798a5a0a60575f329ff29b13360bf4a14cc90d1 Merge: 263a425a482f 61c00cca41ae Author: David S. Miller Date: Thu Feb 6 23:26:18 2020 +0100 Merge tag 'mlx5-fixes-2020-02-06' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 fixes 2020-02-06 This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. For -stable v4.19: ('net/mlx5: IPsec, Fix esp modify function attribute') ('net/mlx5: IPsec, fix memory leak at mlx5_fpga_ipsec_delete_sa_ctx') For -stable v5.4: ('net/mlx5: Deprecate usage of generic TLS HW capability bit') ('net/mlx5: Fix deadlock in fs_core') For -stable v5.5: ('net/mlx5e: TX, Error completion is for last WQE in batch') ==================== Signed-off-by: David S. Miller commit 1e95081cb5b4cf77065d37866f57cf3c90a3df78 Author: Pavel Begunkov Date: Thu Feb 6 19:51:16 2020 +0300 io_uring: fix deferred req iovec leak After defer, a request will be prepared, that includes allocating iovec if needed, and then submitted through io_wq_submit_work() but not custom handler (e.g. io_rw_async()/io_sendrecv_async()). However, it'll leak iovec, as it's in io-wq and the code goes as follows: io_read() { if (!io_wq_current_is_worker()) kfree(iovec); } Put all deallocation logic in io_{read,write,send,recv}(), which will leave the memory, if going async with -EAGAIN. It also fixes a leak after failed io_alloc_async_ctx() in io_{recv,send}_msg(). Cc: stable@vger.kernel.org # 5.5 Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e1d85334d62386e9503e4a0d5d022e2d8e0011a0 Author: Randy Dunlap Date: Wed Feb 5 20:57:10 2020 -0800 io_uring: fix 1-bit bitfields to be unsigned Make bitfields of size 1 bit be unsigned (since there is no room for the sign bit). This clears up the sparse warnings: CHECK ../fs/io_uring.c ../fs/io_uring.c:207:50: error: dubious one-bit signed bitfield ../fs/io_uring.c:208:55: error: dubious one-bit signed bitfield ../fs/io_uring.c:209:63: error: dubious one-bit signed bitfield ../fs/io_uring.c:210:54: error: dubious one-bit signed bitfield ../fs/io_uring.c:211:57: error: dubious one-bit signed bitfield Found by sight and then verified with sparse. Fixes: 69b3e546139a ("io_uring: change io_ring_ctx bool fields into bit fields") Signed-off-by: Randy Dunlap Cc: Jens Axboe Cc: io-uring@vger.kernel.org Signed-off-by: Jens Axboe commit 61c00cca41aeeaa8e5263c2f81f28534bc1efafb Author: Tariq Toukan Date: Mon Jan 27 14:18:14 2020 +0200 net/mlx5: Deprecate usage of generic TLS HW capability bit Deprecate the generic TLS cap bit, use the new TX-specific TLS cap bit instead. Fixes: a12ff35e0fb7 ("net/mlx5: Introduce TLS TX offload hardware bits and structures") Signed-off-by: Tariq Toukan Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit b57e66ad42d051ed31319c28ed1b62b191299a29 Author: Tariq Toukan Date: Thu Jan 9 15:53:37 2020 +0200 net/mlx5e: TX, Error completion is for last WQE in batch For a cyclic work queue, when not requesting a completion per WQE, a single CQE might indicate the completion of several WQEs. However, in case some WQE in the batch causes an error, then an error completion is issued, breaking the batch, and pointing to the offending WQE in the wqe_counter field. Hence, WQE-specific error CQE handling (like printing, breaking, etc...) should be performed only for the last WQE in batch. Fixes: 130c7b46c93d ("net/mlx5e: TX, Dump WQs wqe descriptors on CQE with error events") Fixes: fd9b4be8002c ("net/mlx5e: RX, Support multiple outstanding UMR posts") Signed-off-by: Tariq Toukan Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed commit 08db2cf577487f5123aebcc2f913e0b8a2c14b43 Author: Raed Salem Date: Wed Oct 23 16:41:21 2019 +0300 net/mlx5: IPsec, fix memory leak at mlx5_fpga_ipsec_delete_sa_ctx SA context is allocated at mlx5_fpga_ipsec_create_sa_ctx, however the counterpart mlx5_fpga_ipsec_delete_sa_ctx function nullifies sa_ctx pointer without freeing the memory allocated, hence the memory leak. Fix by free SA context when the SA is released. Fixes: d6c4f0298cec ("net/mlx5: Refactor accel IPSec code") Signed-off-by: Raed Salem Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed commit 0dc2c534f17c05bed0622b37a744bc38b48ca88a Author: Raed Salem Date: Tue Dec 24 09:54:45 2019 +0200 net/mlx5: IPsec, Fix esp modify function attribute The function mlx5_fpga_esp_validate_xfrm_attrs is wrongly used with negative negation as zero value indicates success but it used as failure return value instead. Fix by remove the unary not negation operator. Fixes: 05564d0ae075 ("net/mlx5: Add flow-steering commands for FPGA IPSec implementation") Signed-off-by: Raed Salem Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed commit c1948390d78b5183ee9b7dd831efd7f6ac496ab0 Author: Maor Gottlieb Date: Mon Jan 27 09:27:51 2020 +0200 net/mlx5: Fix deadlock in fs_core free_match_list could be called when the flow table is already locked. We need to pass this notation to tree_put_node. It fixes the following lockdep warnning: [ 1797.268537] ============================================ [ 1797.276837] WARNING: possible recursive locking detected [ 1797.285101] 5.5.0-rc5+ #10 Not tainted [ 1797.291641] -------------------------------------------- [ 1797.299917] handler10/9296 is trying to acquire lock: [ 1797.307885] ffff889ad399a0a0 (&node->lock){++++}, at: tree_put_node+0x1d5/0x210 [mlx5_core] [ 1797.319694] [ 1797.319694] but task is already holding lock: [ 1797.330904] ffff889ad399a0a0 (&node->lock){++++}, at: nested_down_write_ref_node.part.33+0x1a/0x60 [mlx5_core] [ 1797.344707] [ 1797.344707] other info that might help us debug this: [ 1797.356952] Possible unsafe locking scenario: [ 1797.356952] [ 1797.368333] CPU0 [ 1797.373357] ---- [ 1797.378364] lock(&node->lock); [ 1797.384222] lock(&node->lock); [ 1797.390031] [ 1797.390031] *** DEADLOCK *** [ 1797.390031] [ 1797.403003] May be due to missing lock nesting notation [ 1797.403003] [ 1797.414691] 3 locks held by handler10/9296: [ 1797.421465] #0: ffff889cf2c5a110 (&block->cb_lock){++++}, at: tc_setup_cb_add+0x70/0x250 [ 1797.432810] #1: ffff88a030081490 (&comp->sem){++++}, at: mlx5_devcom_get_peer_data+0x4c/0xb0 [mlx5_core] [ 1797.445829] #2: ffff889ad399a0a0 (&node->lock){++++}, at: nested_down_write_ref_node.part.33+0x1a/0x60 [mlx5_core] [ 1797.459913] [ 1797.459913] stack backtrace: [ 1797.469436] CPU: 1 PID: 9296 Comm: handler10 Kdump: loaded Not tainted 5.5.0-rc5+ #10 [ 1797.480643] Hardware name: Dell Inc. PowerEdge R730/072T6D, BIOS 2.4.3 01/17/2017 [ 1797.491480] Call Trace: [ 1797.496701] dump_stack+0x96/0xe0 [ 1797.502864] __lock_acquire.cold.63+0xf8/0x212 [ 1797.510301] ? lockdep_hardirqs_on+0x250/0x250 [ 1797.517701] ? mark_held_locks+0x55/0xa0 [ 1797.524547] ? quarantine_put+0xb7/0x160 [ 1797.531422] ? lockdep_hardirqs_on+0x17d/0x250 [ 1797.538913] lock_acquire+0xd6/0x1f0 [ 1797.545529] ? tree_put_node+0x1d5/0x210 [mlx5_core] [ 1797.553701] down_write+0x94/0x140 [ 1797.560206] ? tree_put_node+0x1d5/0x210 [mlx5_core] [ 1797.568464] ? down_write_killable_nested+0x170/0x170 [ 1797.576925] ? del_hw_flow_group+0xde/0x1f0 [mlx5_core] [ 1797.585629] tree_put_node+0x1d5/0x210 [mlx5_core] [ 1797.593891] ? free_match_list.part.25+0x147/0x170 [mlx5_core] [ 1797.603389] free_match_list.part.25+0xe0/0x170 [mlx5_core] [ 1797.612654] _mlx5_add_flow_rules+0x17e2/0x20b0 [mlx5_core] [ 1797.621838] ? lock_acquire+0xd6/0x1f0 [ 1797.629028] ? esw_get_prio_table+0xb0/0x3e0 [mlx5_core] [ 1797.637981] ? alloc_insert_flow_group+0x420/0x420 [mlx5_core] [ 1797.647459] ? try_to_wake_up+0x4c7/0xc70 [ 1797.654881] ? lock_downgrade+0x350/0x350 [ 1797.662271] ? __mutex_unlock_slowpath+0xb1/0x3f0 [ 1797.670396] ? find_held_lock+0xac/0xd0 [ 1797.677540] ? mlx5_add_flow_rules+0xdc/0x360 [mlx5_core] [ 1797.686467] mlx5_add_flow_rules+0xdc/0x360 [mlx5_core] [ 1797.695134] ? _mlx5_add_flow_rules+0x20b0/0x20b0 [mlx5_core] [ 1797.704270] ? irq_exit+0xa5/0x170 [ 1797.710764] ? retint_kernel+0x10/0x10 [ 1797.717698] ? mlx5_eswitch_set_rule_source_port.isra.9+0x122/0x230 [mlx5_core] [ 1797.728708] mlx5_eswitch_add_offloaded_rule+0x465/0x6d0 [mlx5_core] [ 1797.738713] ? mlx5_eswitch_get_prio_range+0x30/0x30 [mlx5_core] [ 1797.748384] ? mlx5_fc_stats_work+0x670/0x670 [mlx5_core] [ 1797.757400] mlx5e_tc_offload_fdb_rules.isra.27+0x24/0x90 [mlx5_core] [ 1797.767665] mlx5e_tc_add_fdb_flow+0xaf8/0xd40 [mlx5_core] [ 1797.776886] ? mlx5e_encap_put+0xd0/0xd0 [mlx5_core] [ 1797.785562] ? mlx5e_alloc_flow.isra.43+0x18c/0x1c0 [mlx5_core] [ 1797.795353] __mlx5e_add_fdb_flow+0x2e2/0x440 [mlx5_core] [ 1797.804558] ? mlx5e_tc_update_neigh_used_value+0x8c0/0x8c0 [mlx5_core] [ 1797.815093] ? wait_for_completion+0x260/0x260 [ 1797.823272] mlx5e_configure_flower+0xe94/0x1620 [mlx5_core] [ 1797.832792] ? __mlx5e_add_fdb_flow+0x440/0x440 [mlx5_core] [ 1797.842096] ? down_read+0x11a/0x2e0 [ 1797.849090] ? down_write+0x140/0x140 [ 1797.856142] ? mlx5e_rep_indr_setup_block_cb+0xc0/0xc0 [mlx5_core] [ 1797.866027] tc_setup_cb_add+0x11a/0x250 [ 1797.873339] fl_hw_replace_filter+0x25e/0x320 [cls_flower] [ 1797.882385] ? fl_hw_destroy_filter+0x1c0/0x1c0 [cls_flower] [ 1797.891607] fl_change+0x1d54/0x1fb6 [cls_flower] [ 1797.899772] ? __rhashtable_insert_fast.constprop.50+0x9f0/0x9f0 [cls_flower] [ 1797.910728] ? lock_downgrade+0x350/0x350 [ 1797.918187] ? __radix_tree_lookup+0xa5/0x130 [ 1797.926046] ? fl_set_key+0x1590/0x1590 [cls_flower] [ 1797.934611] ? __rhashtable_insert_fast.constprop.50+0x9f0/0x9f0 [cls_flower] [ 1797.945673] tc_new_tfilter+0xcd1/0x1240 [ 1797.953138] ? tc_del_tfilter+0xb10/0xb10 [ 1797.960688] ? avc_has_perm_noaudit+0x92/0x320 [ 1797.968721] ? avc_has_perm_noaudit+0x1df/0x320 [ 1797.976816] ? avc_has_extended_perms+0x990/0x990 [ 1797.985090] ? mark_lock+0xaa/0x9e0 [ 1797.991988] ? match_held_lock+0x1b/0x240 [ 1797.999457] ? match_held_lock+0x1b/0x240 [ 1798.006859] ? find_held_lock+0xac/0xd0 [ 1798.014045] ? symbol_put_addr+0x40/0x40 [ 1798.021317] ? rcu_read_lock_sched_held+0xd0/0xd0 [ 1798.029460] ? tc_del_tfilter+0xb10/0xb10 [ 1798.036810] rtnetlink_rcv_msg+0x4d5/0x620 [ 1798.044236] ? rtnl_bridge_getlink+0x460/0x460 [ 1798.052034] ? lockdep_hardirqs_on+0x250/0x250 [ 1798.059837] ? match_held_lock+0x1b/0x240 [ 1798.067146] ? find_held_lock+0xac/0xd0 [ 1798.074246] netlink_rcv_skb+0xc6/0x1f0 [ 1798.081339] ? rtnl_bridge_getlink+0x460/0x460 [ 1798.089104] ? netlink_ack+0x440/0x440 [ 1798.096061] netlink_unicast+0x2d4/0x3b0 [ 1798.103189] ? netlink_attachskb+0x3f0/0x3f0 [ 1798.110724] ? _copy_from_iter_full+0xda/0x370 [ 1798.118415] netlink_sendmsg+0x3ba/0x6a0 [ 1798.125478] ? netlink_unicast+0x3b0/0x3b0 [ 1798.132705] ? netlink_unicast+0x3b0/0x3b0 [ 1798.139880] sock_sendmsg+0x94/0xa0 [ 1798.146332] ____sys_sendmsg+0x36c/0x3f0 [ 1798.153251] ? copy_msghdr_from_user+0x165/0x230 [ 1798.160941] ? kernel_sendmsg+0x30/0x30 [ 1798.167738] ___sys_sendmsg+0xeb/0x150 [ 1798.174411] ? sendmsg_copy_msghdr+0x30/0x30 [ 1798.181649] ? lock_downgrade+0x350/0x350 [ 1798.188559] ? rcu_read_lock_sched_held+0xd0/0xd0 [ 1798.196239] ? __fget+0x21d/0x320 [ 1798.202335] ? do_dup2+0x2a0/0x2a0 [ 1798.208499] ? lock_downgrade+0x350/0x350 [ 1798.215366] ? __fget_light+0xd6/0xf0 [ 1798.221808] ? syscall_trace_enter+0x369/0x5d0 [ 1798.229112] __sys_sendmsg+0xd3/0x160 [ 1798.235511] ? __sys_sendmsg_sock+0x60/0x60 [ 1798.242478] ? syscall_trace_enter+0x233/0x5d0 [ 1798.249721] ? syscall_slow_exit_work+0x280/0x280 [ 1798.257211] ? do_syscall_64+0x1e/0x2e0 [ 1798.263680] do_syscall_64+0x72/0x2e0 [ 1798.269950] entry_SYSCALL_64_after_hwframe+0x49/0xbe Fixes: bd71b08ec2ee ("net/mlx5: Support multiple updates of steering rules in parallel") Signed-off-by: Maor Gottlieb Signed-off-by: Alaa Hleihel Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit e1cf35b94c5fd122a8780587559fc6da9fc2dd12 Author: Mauro Rossi Date: Mon Feb 3 22:31:13 2020 +0100 drm/edid: fix building error Fixes the following building error: CC [M]  drivers/gpu/drm/drm_edid.o ~/pie-x86_kernel/kernel/drivers/gpu/drm/drm_edid.c: In function 'cea_mode_alternate_timings': ~/pie-x86_kernel/kernel/drivers/gpu/drm/drm_edid.c:3275:2: error: call to '__compiletime_assert_3282' declared with attribute error: BUILD_BUG_ON failed: cea_mode_for_vic(8)->vtotal != 262 || cea_mode_for_vic(9)->vtotal != 262 || cea_mode_for_vic(12)->vtotal != 262 || cea_mode_for_vic(13)->vtotal != 262 || cea_mode_for_vic(23)->vtotal != 312 || cea_mode_for_vic(24)->vtotal != 312 || cea_mode_for_vic(27)->vtotal != 312 || cea_mode_for_vic(28)->vtotal != 312 make[4]: *** [~/pie-x86_kernel/kernel/scripts/Makefile.build:265: drivers/gpu/drm/drm_edid.o] Error 1 Fixes: 7befe621ff81 ("drm/edid: Abstract away cea_edid_modes[]") Signed-off-by: Mauro Rossi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200203213113.28183-1-issor.oruam@gmail.com commit 1cb1edb2f5ba8a3e8d47ded391007c6fe3ac0ad7 Author: Pavel Begunkov Date: Thu Feb 6 21:16:09 2020 +0300 io_uring: get rid of delayed mm check Fail fast if can't grab mm, so past that requests always have an mm when required. This allows us to remove req->user altogether. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit cc95b6772790c476b2c2de09abec739120593d98 Author: Aurelien Aptel Date: Thu Feb 6 13:49:26 2020 +0100 cifs: fix channel signing The server var was accidentally used as an iterator over the global list of connections, thus overwritten the passed argument. This resulted in the wrong signing key being returned for extra channels. Fix this by using a separate var to iterate. Signed-off-by: Aurelien Aptel Signed-off-by: Steve French Reviewed-by: Paulo Alcantara (SUSE) Reviewed-by: Pavel Shilovsky commit 4b848f20eda5974020f043ca14bacf7a7e634fc8 Author: Daniel Vetter Date: Sun Feb 2 14:21:33 2020 +0100 drm/vgem: Close use-after-free race in vgem_gem_create There's two references floating around here (for the object reference, not the handle_count reference, that's a different thing): - The temporary reference held by vgem_gem_create, acquired by creating the object and released by calling drm_gem_object_put_unlocked. - The reference held by the object handle, created by drm_gem_handle_create. This one generally outlives the function, except if a 2nd thread races with a GEM_CLOSE ioctl call. So usually everything is correct, except in that race case, where the access to gem_object->size could be looking at freed data already. Which again isn't a real problem (userspace shot its feet off already with the race, we could return garbage), but maybe someone can exploit this as an information leak. Cc: Dan Carpenter Cc: Hillf Danton Reported-by: syzbot+0dc4444774d419e916c8@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Cc: Emil Velikov Cc: Daniel Vetter Cc: Sean Paul Cc: Chris Wilson Cc: Eric Anholt Cc: Sam Ravnborg Cc: Rob Clark Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200202132133.1891846-1-daniel.vetter@ffwll.ch commit 6e5e41e2dc4e4413296d5a4af54ac92d7cd52317 Author: Andreas Gruenbacher Date: Tue Jan 14 17:12:18 2020 +0100 gfs2: fix O_SYNC write handling In gfs2_file_write_iter, for direct writes, the error checking in the buffered write fallback case is incomplete. This can cause inode write errors to go undetected. Fix and clean up gfs2_file_write_iter along the way. Based on a proposed fix by Christoph Hellwig . Fixes: 967bcc91b044 ("gfs2: iomap direct I/O support") Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Andreas Gruenbacher commit 98ae41adb252866158dd4e998551dfa85e612bed Author: Thierry Reding Date: Tue Feb 4 14:59:26 2020 +0100 gpu: host1x: Set DMA direction only for DMA-mapped buffer objects The DMA direction is only used by the DMA API, so there is no use in setting it when a buffer object isn't mapped with the DMA API. Signed-off-by: Thierry Reding Tested-by: Dmitry Osipenko Reviewed-by: Dmitry Osipenko commit 273da5a046965ccf0ec79eb63f2d5173467e20fa Author: Thierry Reding Date: Tue Feb 4 14:59:25 2020 +0100 drm/tegra: Reuse IOVA mapping where possible This partially reverts the DMA API support that was recently merged because it was causing performance regressions on older Tegra devices. Unfortunately, the cache maintenance performed by dma_map_sg() and dma_unmap_sg() causes performance to drop by a factor of 10. The right solution for this would be to cache mappings for buffers per consumer device, but that's a bit involved. Instead, we simply revert to the old behaviour of sharing IOVA mappings when we know that devices can do so (i.e. they share the same IOMMU domain). Cc: # v5.5 Reported-by: Dmitry Osipenko Signed-off-by: Thierry Reding Tested-by: Dmitry Osipenko Reviewed-by: Dmitry Osipenko commit 2d9384ff91770a71bd1ff24c25952ef1187a0e9c Author: Thierry Reding Date: Tue Feb 4 14:59:24 2020 +0100 drm/tegra: Relax IOMMU usage criteria on old Tegra Older Tegra devices only allow addressing 32 bits of memory, so whether or not the host1x is attached to an IOMMU doesn't matter. host1x IOMMU attachment is only needed on devices that can address memory beyond the 32-bit boundary and where the host1x doesn't support the wide GATHER opcode that allows it to access buffers at higher addresses. Cc: # v5.5 Signed-off-by: Thierry Reding Tested-by: Dmitry Osipenko Reviewed-by: Dmitry Osipenko commit 90568ecf561540fa330511e21fcd823b0c3829c6 Merge: d854b2d639fd a8be1ad01b79 Author: Linus Torvalds Date: Thu Feb 6 09:07:45 2020 -0800 Merge tag 'kvm-5.6-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull more KVM updates from Paolo Bonzini: "s390: - fix register corruption - ENOTSUPP/EOPNOTSUPP mixed - reset cleanups/fixes - selftests x86: - Bug fixes and cleanups - AMD support for APIC virtualization even in combination with in-kernel PIT or IOAPIC. MIPS: - Compilation fix. Generic: - Fix refcount overflow for zero page" * tag 'kvm-5.6-2' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (42 commits) KVM: vmx: delete meaningless vmx_decache_cr0_guest_bits() declaration KVM: x86: Mark CR4.UMIP as reserved based on associated CPUID bit x86: vmxfeatures: rename features for consistency with KVM and manual KVM: SVM: relax conditions for allowing MSR_IA32_SPEC_CTRL accesses KVM: x86: Fix perfctr WRMSR for running counters x86/kvm/hyper-v: don't allow to turn on unsupported VMX controls for nested guests x86/kvm/hyper-v: move VMX controls sanitization out of nested_enable_evmcs() kvm: mmu: Separate generating and setting mmio ptes kvm: mmu: Replace unsigned with unsigned int for PTE access KVM: nVMX: Remove stale comment from nested_vmx_load_cr3() KVM: MIPS: Fold comparecount_func() into comparecount_wakeup() KVM: MIPS: Fix a build error due to referencing not-yet-defined function x86/kvm: do not setup pv tlb flush when not paravirtualized KVM: fix overflow of zero page refcount with ksm running KVM: x86: Take a u64 when checking for a valid dr7 value KVM: x86: use raw clock values consistently KVM: x86: reorganize pvclock_gtod_data members KVM: nVMX: delete meaningless nested_vmx_run() declaration KVM: SVM: allow AVIC without split irqchip kvm: ioapic: Lazy update IOAPIC EOI ... commit d854b2d639fd61ccdc184385ee4036658a52e57e Merge: 9e6c535c64ad fcf2736c82ca Author: Linus Torvalds Date: Thu Feb 6 09:05:42 2020 -0800 Merge tag 'kgdb-fixes-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux Pull kgdb fix from Daniel Thompson: "One of the simplifications added for 5.6-rc1 has caused build regressions on some platforms (it was reported for sparc64). This fixes it with a revert" * tag 'kgdb-fixes-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux: Revert "kdb: Get rid of confusing diag msg from "rd" if current task has no regs" commit 4c0e8dda608a51855225c611b5c6b442f95fbc56 Author: Christoph Hellwig Date: Wed Jan 15 16:38:29 2020 +0100 gfs2: move setting current->backing_dev_info Set current->backing_dev_info just around the buffered write calls to prepare for the next fix. Fixes: 967bcc91b044 ("gfs2: iomap direct I/O support") Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Christoph Hellwig Signed-off-by: Andreas Gruenbacher commit 7582026f6f3588ecebd281965c8a71aff6fb6158 Author: Abhi Das Date: Tue Feb 4 14:14:56 2020 -0600 gfs2: fix gfs2_find_jhead that returns uninitialized jhead with seq 0 When the first log header in a journal happens to have a sequence number of 0, a bug in gfs2_find_jhead() causes it to prematurely exit, and return an uninitialized jhead with seq 0. This can cause failures in the caller. For instance, a mount fails in one test case. The correct behavior is for it to continue searching through the journal to find the correct journal head with the highest sequence number. Fixes: f4686c26ecc3 ("gfs2: read journal in large chunks") Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Abhi Das Signed-off-by: Andreas Gruenbacher commit 91fd3c3edcd7f223c5340a8324f67b03a85a73aa Author: Dan Carpenter Date: Mon Jan 13 16:23:07 2020 +0300 nfsd4: fix double free in nfsd4_do_async_copy() This frees "copy->nf_src" before and again after the goto. Fixes: ce0887ac96d3 ("NFSD add nfs4 inter ssc to nfsd4_copy") Signed-off-by: Dan Carpenter Reviewed-by: Olga Kornievskaia Signed-off-by: J. Bruce Fields commit 689827cd5bfe89e4900db7e1c0c713083a76d04c Author: Trond Myklebust Date: Tue Jan 14 12:02:44 2020 -0500 nfsd: convert file cache to use over/underflow safe refcount Use the 'refcount_t' type instead of 'atomic_t' for improved refcounting safety. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit c19285596de699e4602f9c89785e6b8c29422286 Author: Trond Myklebust Date: Tue Jan 14 12:00:22 2020 -0500 nfsd: Define the file access mode enum for tracing Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit a9ceb060b3cf37987b6162223575eaf4f4e0fc36 Author: Trond Myklebust Date: Tue Jan 14 12:00:21 2020 -0500 nfsd: Fix a perf warning perf does not know how to deal with a __builtin_bswap32() call, and complains. All other functions just store the xid etc in host endian form, so let's do that in the tracepoint for nfsd_file_acquire too. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 32f2fc5dc3992b4b60cc6b1a6a31be605cc9c3a2 Author: Vignesh Raghavendra Date: Tue Feb 4 18:18:16 2020 +0530 spi: spi-omap2-mcspi: Support probe deferral for DMA channels dma_request_channel() can return -EPROBE_DEFER, if DMA driver is not ready. Currently driver just falls back to PIO mode on probe deferral. Fix this by requesting all required channels during probe and propagating EPROBE_DEFER error code. Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200204124816.16735-3-vigneshr@ti.com Signed-off-by: Mark Brown commit e4e8276a4f652be2c7bb783a0155d4adb85f5d7d Author: Vignesh Raghavendra Date: Tue Feb 4 18:18:15 2020 +0530 spi: spi-omap2-mcspi: Handle DMA size restriction on AM65x On AM654, McSPI can only support 4K - 1 bytes per transfer when DMA is enabled. Therefore populate master->max_transfer_size callback to inform client drivers of this restriction when DMA channels are available. Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200204124816.16735-2-vigneshr@ti.com Signed-off-by: Mark Brown commit d1520889782dff58610c0b6b54d4cf3211ceb690 Author: Oleksandr Suvorov Date: Wed Feb 5 18:04:36 2020 +0200 ASoC: fsl_sai: Fix exiting path on probing failure If the imx-sdma driver is built as a module, the fsl-sai device doesn't disable on probing failure, which causes the warning in the next probing: ================================================================== fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable! fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable! fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable! fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable! fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable! fsl-sai 308a0000.sai: Unbalanced pm_runtime_enable! ================================================================== Disabling the device properly fixes the issue. Fixes: 812ad463e089 ("ASoC: fsl_sai: Add support for runtime pm") Signed-off-by: Oleksandr Suvorov Link: https://lore.kernel.org/r/20200205160436.3813642-1-oleksandr.suvorov@toradex.com Signed-off-by: Mark Brown commit cabdb4fa2f666fad21b21b04c84709204f60af21 Author: zhengbin Date: Tue Jan 14 20:39:45 2020 +0800 fuse: use true,false for bool variable Fixes coccicheck warning: fs/fuse/readdir.c:335:1-19: WARNING: Assignment of 0/1 to bool variable fs/fuse/file.c:1398:2-19: WARNING: Assignment of 0/1 to bool variable fs/fuse/file.c:1400:2-20: WARNING: Assignment of 0/1 to bool variable fs/fuse/cuse.c:454:1-20: WARNING: Assignment of 0/1 to bool variable fs/fuse/cuse.c:455:1-19: WARNING: Assignment of 0/1 to bool variable fs/fuse/inode.c:497:2-17: WARNING: Assignment of 0/1 to bool variable fs/fuse/inode.c:504:2-23: WARNING: Assignment of 0/1 to bool variable fs/fuse/inode.c:511:2-22: WARNING: Assignment of 0/1 to bool variable fs/fuse/inode.c:518:2-23: WARNING: Assignment of 0/1 to bool variable fs/fuse/inode.c:522:2-26: WARNING: Assignment of 0/1 to bool variable fs/fuse/inode.c:526:2-18: WARNING: Assignment of 0/1 to bool variable fs/fuse/inode.c:1000:1-20: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Miklos Szeredi commit 8ab13bca428bb98e98d1933eaeacc90e80cf6192 Author: Daniel W. S. Almeida Date: Wed Jan 29 02:06:21 2020 -0300 Documentation: filesystems: convert fuse to RST Converts fuse.txt to reStructuredText format, improving the presentation without changing much of the underlying content. Signed-off-by: Daniel W. S. Almeida Signed-off-by: Miklos Szeredi commit 519525fa47b5a8155f0b203e49a3a6a2319f75ae Author: Vivek Goyal Date: Wed Feb 5 08:15:46 2020 -0500 fuse: Support RENAME_WHITEOUT flag Allow fuse to pass RENAME_WHITEOUT to fuse server. Overlayfs on top of virtiofs uses RENAME_WHITEOUT. Without this patch renaming a directory in overlayfs (dir is on lower) fails with -EINVAL. With this patch it works. Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit 2f1398291bf35fe027914ae7a9610d8e601fbfde Author: Miklos Szeredi Date: Thu Feb 6 16:39:28 2020 +0100 fuse: don't overflow LLONG_MAX with end offset Handle the special case of fuse_readpages() wanting to read the last page of a hugest file possible and overflowing the end offset in the process. This is basically to unbreak xfstests:generic/525 and prevent filesystems from doing bad things with an overflowing offset. Reported-by: Xiao Yang Signed-off-by: Miklos Szeredi commit f658adeea45e430a24c7a157c3d5448925ac2038 Author: Miklos Szeredi Date: Thu Feb 6 16:39:28 2020 +0100 fix up iter on short count in fuse_direct_io() fuse_direct_io() can end up advancing the iterator by more than the amount of data read or written. This case is handled by the generic code if going through ->direct_IO(), but not in the FOPEN_DIRECT_IO case. Fix by reverting the extra bytes from the iterator in case of error or a short count. To test: install lxcfs, then the following testcase int fd = open("/var/lib/lxcfs/proc/uptime", O_RDONLY); sendfile(1, fd, NULL, 16777216); sendfile(1, fd, NULL, 16777216); will spew WARN_ON() in iov_iter_pipe(). Reported-by: Peter Geis Reported-by: Al Viro Fixes: 3c3db095b68c ("fuse: use iov_iter based generic splice helpers") Cc: # v5.1 Signed-off-by: Miklos Szeredi commit d26c2ddd33569667e3eeb577c4c1d966ca9192e2 Author: Steve French Date: Thu Feb 6 06:00:14 2020 -0600 cifs: add SMB3 change notification support A commonly used SMB3 feature is change notification, allowing an app to be notified about changes to a directory. The SMB3 Notify request blocks until the server detects a change to that directory or its contents that matches the completion flags that were passed in and the "watch_tree" flag (which indicates whether subdirectories under this directory should be also included). See MS-SMB2 2.2.35 for additional detail. To use this simply pass in the following structure to ioctl: struct __attribute__((__packed__)) smb3_notify { uint32_t completion_filter; bool watch_tree; } __packed; using CIFS_IOC_NOTIFY 0x4005cf09 or equivalently _IOW(CIFS_IOCTL_MAGIC, 9, struct smb3_notify) SMB3 change notification is supported by all major servers. The ioctl will block until the server detects a change to that directory or its subdirectories (if watch_tree is set). Signed-off-by: Steve French Reviewed-by: Aurelien Aptel Acked-by: Paulo Alcantara (SUSE) commit 343a1b777a92af3022c95ab6c188bef4a6e9ff97 Author: Aurelien Aptel Date: Thu Feb 6 10:19:11 2020 +0100 cifs: make multichannel warning more visible When no interfaces are returned by the server we cannot open multiple channels. Make it more obvious by reporting that to the user at the VFS log level. Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit 09c40b15351c1bb1af035f7f6df167366d552790 Author: Ronnie Sahlberg Date: Thu Feb 6 13:55:19 2020 +1000 cifs: fix soft mounts hanging in the reconnect code RHBZ: 1795423 This is the SMB1 version of a patch we already have for SMB2 In recent DFS updates we have a new variable controlling how many times we will retry to reconnect the share. If DFS is not used, then this variable is initialized to 0 in: static inline int dfs_cache_get_nr_tgts(const struct dfs_cache_tgt_list *tl) { return tl ? tl->tl_numtgts : 0; } This means that in the reconnect loop in smb2_reconnect() we will immediately wrap retries to -1 and never actually get to pass this conditional: if (--retries) continue; The effect is that we no longer reach the point where we fail the commands with -EHOSTDOWN and basically the kernel threads are virtually hung and unkillable. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Aurelien Aptel Reviewed-by: Paulo Alcantara (SUSE) commit 9e6c535c64adf6155e4a11fe8d63b384fe3452f8 Merge: 750ce8ccd8a8 2e34673be0bd Author: Linus Torvalds Date: Thu Feb 6 14:17:38 2020 +0000 Merge tag 'pci-v5.6-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - Define to_pci_sysdata() always to fix build breakage when !CONFIG_PCI (Jason A. Donenfeld) - Use PF PASID for VFs to fix VF IOMMU bind failures (Kuppuswamy Sathyanarayanan) * tag 'pci-v5.6-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI/ATS: Use PF PASID for VFs x86/PCI: Define to_pci_sysdata() even when !CONFIG_PCI commit 750ce8ccd8a875ed9410fab01a3f468dab692eb4 Merge: 4c46bef2e96a 6954b323a183 Author: Linus Torvalds Date: Thu Feb 6 14:15:01 2020 +0000 Merge tag 'sound-fix-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of pending small fixes: ALSA core: - PCM memory leak fix ASoC: - Lots of SOF and Intel driver fixes - Addition of COMMON_CLK for wcd934x - Regression fixes for AMD and Tegra platforms HD-audio: - DP-MST HDMI regression fix, Tegra workarounds, HP quirk fix Others: - A few fixes relevant with the recent uapi-updates - Sparse warnings and endianness fixes" * tag 'sound-fix-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (35 commits) ALSA: hda: Clear RIRB status before reading WP ALSA: hda/realtek - Fixed one of HP ALC671 platform Headset Mic supported ASoC: wcd934x: Add missing COMMON_CLK dependency to SND_SOC_ALL_CODECS ALSA: hda - Fix DP-MST support for NVIDIA codecs ASoC: wcd934x: Add missing COMMON_CLK dependency MAINTAINERS: Remove the Bard Liao from the MAINTAINERS of Realtek CODECs ASoC: tegra: Revert 24 and 32 bit support ASoC: SOF: Intel: add PCI ID for JasperLake ALSA: hdsp: Make the firmware loading ioctl a bit more readable ALSA: emu10k1: Fix annotation and cast for the recent uapi header change ALSA: dummy: Fix PCM format loop in proc output ALSA: usb-audio: Annotate endianess in Scarlett gen2 quirk ALSA: usb-audio: Fix endianess in descriptor validation ALSA: hda: Add JasperLake PCI ID and codec vid ALSA: pcm: Fix sparse warnings wrt snd_pcm_state_t ALSA: pcm: Fix memory leak at closing a stream without hw_free ALSA: uapi: Fix sparse warning ASoC: rt715: Add __maybe_unused to PM callbacks ASoC: rt711: Add __maybe_unused to PM callbacks ASoC: rt700: Add __maybe_unused to PM callbacks ... commit 263a425a482fc495d6d3f9a29b9103a664c38b69 Author: Florian Fainelli Date: Wed Feb 5 12:32:04 2020 -0800 net: systemport: Avoid RBUF stuck in Wake-on-LAN mode After a number of suspend and resume cycles, it is possible for the RBUF to be stuck in Wake-on-LAN mode, despite the MPD enable bit being cleared which instructed the RBUF to exit that mode. Avoid creating that problematic condition by clearing the RX_EN and TX_EN bits in the UniMAC prior to disable the Magic Packet Detector logic which is guaranteed to make the RBUF exit Wake-on-LAN mode. Fixes: 83e82f4c706b ("net: systemport: add Wake-on-LAN support") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 21b5f672fb2eb1366dedc4ac9d32431146b378d3 Author: Heiner Kallweit Date: Wed Feb 5 21:22:46 2020 +0100 r8169: fix performance regression related to PCIe max read request size It turned out that on low performance systems the original change can cause lower tx performance. On a N3450-based mini-PC tx performance in iperf3 was reduced from 950Mbps to ~900Mbps. Therefore effectively revert the original change, just use pcie_set_readrq() now instead of changing the PCIe capability register directly. Fixes: 2df49d365498 ("r8169: remove fiddling with the PCIe max read request size") Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 7a02ea65027523386ab4ba4af0ab93497b3073df Author: Dan Carpenter Date: Wed Feb 5 14:53:30 2020 +0300 net: sched: prevent a use after free The bug is that we call kfree_skb(skb) and then pass "skb" to qdisc_pkt_len(skb) on the next line, which is a use after free. Also Cong Wang points out that it's better to delay the actual frees until we drop the rtnl lock so we should use rtnl_kfree_skbs() instead of kfree_skb(). Cc: Cong Wang Fixes: ec97ecf1ebe4 ("net: sched: add Flow Queue PIE packet scheduler") Signed-off-by: Dan Carpenter Acked-by: Cong Wang Signed-off-by: David S. Miller commit 86b18aaa2b5b5bb48e609cd591b3d2d0fdbe0442 Author: Qian Cai Date: Tue Feb 4 13:40:29 2020 -0500 skbuff: fix a data race in skb_queue_len() sk_buff.qlen can be accessed concurrently as noticed by KCSAN, BUG: KCSAN: data-race in __skb_try_recv_from_queue / unix_dgram_sendmsg read to 0xffff8a1b1d8a81c0 of 4 bytes by task 5371 on cpu 96: unix_dgram_sendmsg+0x9a9/0xb70 include/linux/skbuff.h:1821 net/unix/af_unix.c:1761 ____sys_sendmsg+0x33e/0x370 ___sys_sendmsg+0xa6/0xf0 __sys_sendmsg+0x69/0xf0 __x64_sys_sendmsg+0x51/0x70 do_syscall_64+0x91/0xb47 entry_SYSCALL_64_after_hwframe+0x49/0xbe write to 0xffff8a1b1d8a81c0 of 4 bytes by task 1 on cpu 99: __skb_try_recv_from_queue+0x327/0x410 include/linux/skbuff.h:2029 __skb_try_recv_datagram+0xbe/0x220 unix_dgram_recvmsg+0xee/0x850 ____sys_recvmsg+0x1fb/0x210 ___sys_recvmsg+0xa2/0xf0 __sys_recvmsg+0x66/0xf0 __x64_sys_recvmsg+0x51/0x70 do_syscall_64+0x91/0xb47 entry_SYSCALL_64_after_hwframe+0x49/0xbe Since only the read is operating as lockless, it could introduce a logic bug in unix_recvq_full() due to the load tearing. Fix it by adding a lockless variant of skb_queue_len() and unix_recvq_full() where READ_ONCE() is on the read while WRITE_ONCE() is on the write similar to the commit d7d16a89350a ("net: add skb_queue_empty_lockless()"). Signed-off-by: Qian Cai Signed-off-by: David S. Miller commit f1ed10264ed6b66b9cd5e8461cffce69be482356 Author: Nicolas Dichtel Date: Tue Feb 4 17:00:27 2020 +0100 vti[6]: fix packet tx through bpf_redirect() in XinY cases I forgot the 4in6/6in4 cases in my previous patch. Let's fix them. Fixes: 95224166a903 ("vti[6]: fix packet tx through bpf_redirect()") Signed-off-by: Nicolas Dichtel Signed-off-by: Steffen Klassert commit 4c46bef2e96a92df0f40fc91848e56889ef7c15e Merge: 5b21115414f5 3325322f773b Author: Linus Torvalds Date: Thu Feb 6 12:21:01 2020 +0000 Merge tag 'ceph-for-5.6-rc1' of https://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: - a set of patches that fixes various corner cases in mount and umount code (Xiubo Li). This has to do with choosing an MDS, distinguishing between laggy and down MDSes and parsing the server path. - inode initialization fixes (Jeff Layton). The one included here mostly concerns things like open_by_handle() and there is another one that will come through Al. - copy_file_range() now uses the new copy-from2 op (Luis Henriques). The existing copy-from op turned out to be infeasible for generic filesystem use; we disable the copy offload if OSDs don't support copy-from2. - a patch to link "rbd" and "block" devices together in sysfs (Hannes Reinecke) ... and a smattering of cleanups from Xiubo, Jeff and Chengguang. * tag 'ceph-for-5.6-rc1' of https://github.com/ceph/ceph-client: (25 commits) rbd: set the 'device' link in sysfs ceph: move net/ceph/ceph_fs.c to fs/ceph/util.c ceph: print name of xattr in __ceph_{get,set}xattr() douts ceph: print r_direct_hash in hex in __choose_mds() dout ceph: use copy-from2 op in copy_file_range ceph: close holes in structs ceph_mds_session and ceph_mds_request rbd: work around -Wuninitialized warning ceph: allocate the correct amount of extra bytes for the session features ceph: rename get_session and switch to use ceph_get_mds_session ceph: remove the extra slashes in the server path ceph: add possible_max_rank and make the code more readable ceph: print dentry offset in hex and fix xattr_version type ceph: only touch the caps which have the subset mask requested ceph: don't clear I_NEW until inode metadata is fully populated ceph: retry the same mds later after the new session is opened ceph: check availability of mds cluster on mount after wait timeout ceph: keep the session state until it is released ceph: add __send_request helper ceph: ensure we have a new cap before continuing in fill_inode ceph: drop unused ttl_from parameter from fill_inode ... commit fcf2736c82ca1908e3a0e74730c404baebd8ccdf Author: Daniel Thompson Date: Thu Feb 6 11:40:09 2020 +0000 Revert "kdb: Get rid of confusing diag msg from "rd" if current task has no regs" This reverts commit bbfceba15f8d1260c328a254efc2b3f2deae4904. When DBG_MAX_REG_NUM is zero then a number of symbols are conditionally defined. It is therefore not possible to check it using C expressions. Reported-by: Anatoly Pugachev Acked-by: Doug Anderson Signed-off-by: Daniel Thompson commit 6954b323a183dc18fa9bf2ad700e0ed344918c5f Merge: 6d011d5057ff 13426feaf46c Author: Takashi Iwai Date: Thu Feb 6 11:58:44 2020 +0100 Merge tag 'asoc-v5.6-3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fix for v5.6 An incremental fix for the Qualcomm COMMON_CLK issue. commit 6d011d5057ff88ee556c000ac6fe0be23bdfcd72 Author: Mohan Kumar Date: Thu Feb 6 15:40:53 2020 +0530 ALSA: hda: Clear RIRB status before reading WP RIRB interrupt status getting cleared after the write pointer is read causes a race condition, where last response(s) into RIRB may remain unserviced by IRQ, eventually causing azx_rirb_get_response to fall back to polling mode. Clearing the RIRB interrupt status ahead of write pointer access ensures that this condition is avoided. Signed-off-by: Mohan Kumar Signed-off-by: Viswanath L Link: https://lore.kernel.org/r/1580983853-351-1-git-send-email-viswanathl@nvidia.com Signed-off-by: Takashi Iwai commit c35947b8ff8acca33134ee39c31708233765c31a Author: Lorenzo Bianconi Date: Thu Feb 6 10:14:39 2020 +0100 net: mvneta: move rx_dropped and rx_errors in per-cpu stats Move rx_dropped and rx_errors counters in mvneta_pcpu_stats in order to avoid possible races updating statistics Fixes: 562e2f467e71 ("net: mvneta: Improve the buffer allocation method for SWBM") Fixes: dc35a10f68d3 ("net: mvneta: bm: add support for hardware buffer management") Fixes: c5aff18204da ("net: mvneta: driver for Marvell Armada 370/XP network unit") Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 45a8317ed2c6f0d33a89367ec5d36e4e3aa46576 Author: Devulapally Shiva Krishna Date: Thu Feb 6 14:04:43 2020 +0530 cxgb4: Added tls stats prints. Added debugfs entry to show the tls stats. Signed-off-by: Devulapally Shiva Krishna Signed-off-by: Vinay Kumar Yadav Signed-off-by: David S. Miller commit b0519de8b3f1caf10632aca55def999ec2d2f1bc Author: Florian Westphal Date: Thu Feb 6 00:39:37 2020 +0100 mptcp: fix use-after-free for ipv6 Turns out that when we accept a new subflow, the newly created inet_sk(tcp_sk)->pinet6 points at the ipv6_pinfo structure of the listener socket. This wasn't caught by the selftest because it closes the accepted fd before the listening one. adding a close(listenfd) after accept returns is enough: BUG: KASAN: use-after-free in inet6_getname+0x6ba/0x790 Read of size 1 at addr ffff88810e310866 by task mptcp_connect/2518 Call Trace: inet6_getname+0x6ba/0x790 __sys_getpeername+0x10b/0x250 __x64_sys_getpeername+0x6f/0xb0 also alter test program to exercise this. Reported-by: Christoph Paasch Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 1ad6f58ea9364b0a5d8ae06249653ac9304a8578 Author: David Hildenbrand Date: Wed Feb 5 17:34:01 2020 +0100 virtio_balloon: Fix memory leaks on errors in virtballoon_probe() We forget to put the inode and unmount the kernfs used for compaction. Fixes: 71994620bb25 ("virtio_balloon: replace oom notifier with shrinker") Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Wei Wang Cc: Liang Li Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20200205163402.42627-3-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 6c22dc61c76b7e7d355f1697ba0ecf26d1334ba6 Author: David Hildenbrand Date: Wed Feb 5 17:34:00 2020 +0100 virtio-balloon: Fix memory leak when unloading while hinting is in progress When unloading the driver while hinting is in progress, we will not release the free page blocks back to MM, resulting in a memory leak. Fixes: 86a559787e6f ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Wei Wang Cc: Liang Li Signed-off-by: David Hildenbrand Link: https://lore.kernel.org/r/20200205163402.42627-2-david@redhat.com Signed-off-by: Michael S. Tsirkin commit 6e9826e77249355c09db6ba41cd3f84e89f4b614 Author: Michael S. Tsirkin Date: Thu Feb 6 02:40:58 2020 -0500 virtio_balloon: prevent pfn array overflow Make sure, at build time, that pfn array is big enough to hold a single page. It happens to be true since the PAGE_SHIFT value at the moment is 20, which is 1M - exactly 256 4K balloon pages. Signed-off-by: Michael S. Tsirkin Reviewed-by: David Hildenbrand commit 782e067dba52de989a445f1bfa4bb770abb34480 Author: Christoph Hellwig Date: Thu Dec 12 17:37:19 2019 +0100 virtio-blk: remove VIRTIO_BLK_F_SCSI support Since the need for a special flag to support SCSI passthrough on a block device was added in May 2017 the SCSI passthrough support in virtio-blk has been disabled. It has always been a bad idea (just ask the original author..) and we have virtio-scsi for proper passthrough. The feature also never made it into the virtio 1.0 or later specifications. Signed-off-by: Christoph Hellwig Signed-off-by: Michael S. Tsirkin Reviewed-by: Hannes Reinecke Reviewed-by: Stefan Hajnoczi commit 303090b513fd1ee45aa1536b71a3838dc054bc05 Author: Daniel Verkamp Date: Fri Jan 3 10:40:45 2020 -0800 virtio-pci: check name when counting MSI-X vectors VQs without a name specified are not valid; they are skipped in the later loop that assigns MSI-X vectors to queues, but the per_vq_vectors loop above that counts the required number of vectors previously still counted any queue with a non-NULL callback as needing a vector. Add a check to the per_vq_vectors loop so that vectors with no name are not counted to make the two loops consistent. This prevents over-counting unnecessary vectors (e.g. for features which were not negotiated with the device). Cc: stable@vger.kernel.org Fixes: 86a559787e6f ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") Reviewed-by: Cornelia Huck Signed-off-by: Daniel Verkamp Signed-off-by: Michael S. Tsirkin Reviewed-by: Wang, Wei W commit 5790b53390e18fdd21e70776e46d058c05eda2f2 Author: Daniel Verkamp Date: Fri Jan 3 10:40:43 2020 -0800 virtio-balloon: initialize all vq callbacks Ensure that elements of the callbacks array that correspond to unavailable features are set to NULL; previously, they would be left uninitialized. Since the corresponding names array elements were explicitly set to NULL, the uninitialized callback pointers would not actually be dereferenced; however, the uninitialized callbacks elements would still be read in vp_find_vqs_msix() and used to calculate the number of MSI-X vectors required. Cc: stable@vger.kernel.org Fixes: 86a559787e6f ("virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT") Reviewed-by: Cornelia Huck Signed-off-by: Daniel Verkamp Signed-off-by: Michael S. Tsirkin commit c64eb62cfce242a57a7276ca8280ae0baab29d05 Author: Yangtao Li Date: Sun Dec 22 19:08:39 2019 +0000 virtio-mmio: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code, which contains platform_get_resource, devm_request_mem_region and devm_ioremap. Signed-off-by: Yangtao Li Signed-off-by: Michael S. Tsirkin commit 5b21115414f5b5220e7ab3ca7f5d2c1396f11854 Merge: 85e5529625f0 8044aad70a1f Author: Linus Torvalds Date: Thu Feb 6 08:13:23 2020 +0000 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu updates from Greg Ungerer: "A couple of changes: - remove old CONFIG options from the m68knommu defconfig files - fix a warning in the m68k non-MMU get_user() macro" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68knommu: fix memcpy() out of bounds warning in get_user() m68k: configs: Cleanup old Kconfig IO scheduler options commit 85e5529625f0e41beefe8939eb08baf33131f7d6 Merge: 99be3f60989b 87fbfffcc89b Author: Linus Torvalds Date: Thu Feb 6 08:08:59 2020 +0000 Merge tag 'Smack-for-5.6' of git://github.com/cschaufler/smack-next Pull smack fix from Casey Schaufler: "One fix for an obscure error found using an old version of ping(1) that did not use IPv6 sockets in the documented way" * tag 'Smack-for-5.6' of git://github.com/cschaufler/smack-next: broken ping to ipv6 linklocal addresses on debian buster commit 99be3f60989b4813f625b5421427fa9ab01e3a23 Merge: e310396bb8d7 cdbcf82b86ea Author: Linus Torvalds Date: Thu Feb 6 07:58:38 2020 +0000 Merge tag 'xfs-5.6-merge-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull moar xfs updates from Darrick Wong: "This contains the buffer error code refactoring I mentioned last week, now that it has had extra time to complete the full xfs fuzz testing suite to make sure there aren't any obvious new bugs" * tag 'xfs-5.6-merge-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix xfs_buf_ioerror_alert location reporting xfs: remove unnecessary null pointer checks from _read_agf callers xfs: make xfs_*read_agf return EAGAIN to ALLOC_FLAG_TRYLOCK callers xfs: remove the xfs_btree_get_buf[ls] functions xfs: make xfs_trans_get_buf return an error code xfs: make xfs_trans_get_buf_map return an error code xfs: make xfs_buf_read return an error code xfs: make xfs_buf_get_uncached return an error code xfs: make xfs_buf_get return an error code xfs: make xfs_buf_read_map return an error code xfs: make xfs_buf_get_map return an error code xfs: make xfs_buf_alloc return an error code commit e310396bb8d7db977a0e10ef7b5040e98b89c34c Merge: c1ef57a3a3f5 a00574036c26 Author: Linus Torvalds Date: Thu Feb 6 07:12:11 2020 +0000 Merge tag 'trace-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: - Added new "bootconfig". This looks for a file appended to initrd to add boot config options, and has been discussed thoroughly at Linux Plumbers. Very useful for adding kprobes at bootup. Only enabled if "bootconfig" is on the real kernel command line. - Created dynamic event creation. Merges common code between creating synthetic events and kprobe events. - Rename perf "ring_buffer" structure to "perf_buffer" - Rename ftrace "ring_buffer" structure to "trace_buffer" Had to rename existing "trace_buffer" to "array_buffer" - Allow trace_printk() to work withing (some) tracing code. - Sort of tracing configs to be a little better organized - Fixed bug where ftrace_graph hash was not being protected properly - Various other small fixes and clean ups * tag 'trace-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (88 commits) bootconfig: Show the number of nodes on boot message tools/bootconfig: Show the number of bootconfig nodes bootconfig: Add more parse error messages bootconfig: Use bootconfig instead of boot config ftrace: Protect ftrace_graph_hash with ftrace_sync ftrace: Add comment to why rcu_dereference_sched() is open coded tracing: Annotate ftrace_graph_notrace_hash pointer with __rcu tracing: Annotate ftrace_graph_hash pointer with __rcu bootconfig: Only load bootconfig if "bootconfig" is on the kernel cmdline tracing: Use seq_buf for building dynevent_cmd string tracing: Remove useless code in dynevent_arg_pair_add() tracing: Remove check_arg() callbacks from dynevent args tracing: Consolidate some synth_event_trace code tracing: Fix now invalid var_ref_vals assumption in trace action tracing: Change trace_boot to use synth_event interface tracing: Move tracing selftests to bottom of menu tracing: Move mmio tracer config up with the other tracers tracing: Move tracing test module configs together tracing: Move all function tracing configs together tracing: Documentation for in-kernel synthetic event API ... commit f2adbae0cb20c8eaf06914b2187043ea944b0aff Author: Kailang Yang Date: Wed Feb 5 15:40:01 2020 +0800 ALSA: hda/realtek - Fixed one of HP ALC671 platform Headset Mic supported HP want to keep BIOS verb table for release platform. So, it need to add 0x19 pin for quirk. Fixes: 5af29028fd6d ("ALSA: hda/realtek - Add Headset Mic supported for HP cPC") Signed-off-by: Kailang Yang Link: https://lore.kernel.org/r/74636ccb700a4cbda24c58a99dc430ce@realtek.com Signed-off-by: Takashi Iwai commit c1ef57a3a3f5e69e98baf89055b423da62791c13 Merge: ed535f2c9e00 2faf852d1be8 Author: Linus Torvalds Date: Thu Feb 6 06:33:17 2020 +0000 Merge tag 'io_uring-5.6-2020-02-05' of git://git.kernel.dk/linux-block Pull io_uring updates from Jens Axboe: "Some later fixes for io_uring: - Small cleanup series from Pavel - Belt and suspenders build time check of sqe size and layout (Stefan) - Addition of ->show_fdinfo() on request of Jann Horn, to aid in understanding mapped personalities - eventfd recursion/deadlock fix, for both io_uring and aio - Fixup for send/recv handling - Fixup for double deferral of read/write request - Fix for potential double completion event for close request - Adjust fadvise advice async/inline behavior - Fix for shutdown hang with SQPOLL thread - Fix for potential use-after-free of fixed file table" * tag 'io_uring-5.6-2020-02-05' of git://git.kernel.dk/linux-block: io_uring: cleanup fixed file data table references io_uring: spin for sq thread to idle on shutdown aio: prevent potential eventfd recursion on poll io_uring: put the flag changing code in the same spot io_uring: iterate req cache backwards io_uring: punt even fadvise() WILLNEED to async context io_uring: fix sporadic double CQE entry for close io_uring: remove extra ->file check io_uring: don't map read/write iovec potentially twice io_uring: use the proper helpers for io_send/recv io_uring: prevent potential eventfd recursion on poll eventfd: track eventfd_signal() recursion depth io_uring: add BUILD_BUG_ON() to assert the layout of struct io_uring_sqe io_uring: add ->show_fdinfo() for the io_uring file descriptor commit ed535f2c9e00eafdeb57d6310b7c8c5a009a9262 Merge: 0384066381ed b74e58cd472c Author: Linus Torvalds Date: Thu Feb 6 06:15:23 2020 +0000 Merge tag 'block-5.6-2020-02-05' of git://git.kernel.dk/linux-block Pull more block updates from Jens Axboe: "Some later arrivals, but all fixes at this point: - bcache fix series (Coly) - Series of BFQ fixes (Paolo) - NVMe pull request from Keith with a few minor NVMe fixes - Various little tweaks" * tag 'block-5.6-2020-02-05' of git://git.kernel.dk/linux-block: (23 commits) nvmet: update AEN list and array at one place nvmet: Fix controller use after free nvmet: Fix error print message at nvmet_install_queue function brd: check and limit max_part par nvme-pci: remove nvmeq->tags nvmet: fix dsm failure when payload does not match sgl descriptor nvmet: Pass lockdep expression to RCU lists block, bfq: clarify the goal of bfq_split_bfqq() block, bfq: get a ref to a group when adding it to a service tree block, bfq: remove ifdefs from around gets/puts of bfq groups block, bfq: extend incomplete name of field on_st block, bfq: get extra ref to prevent a queue from being freed during a group move block, bfq: do not insert oom queue into position tree block, bfq: do not plug I/O for bfq_queues with no proc refs bcache: check return value of prio_read() bcache: fix incorrect data type usage in btree_flush_write() bcache: add readahead cache policy options via sysfs interface bcache: explicity type cast in bset_bkey_last() bcache: fix memory corruption in bch_cache_accounting_clear() xen/blkfront: limit allocated memory size to actual use case ... commit 0384066381ed5572cf1f57f8d01eaccd3f6d4785 Merge: 4c7d00ccf40d 7991901082f0 Author: Linus Torvalds Date: Thu Feb 6 06:11:50 2020 +0000 Merge tag 'libata-5.6-2020-02-05' of git://git.kernel.dk/linux-block Pull libata updates from Jens Axboe: - Add a Sandisk CF card to supported pata_pcmcia list (Christian) - Move pata_arasan_cf away from legacy API (Peter) - Ensure ahci DMA/ints are shut down on shutdown (Prabhakar) * tag 'libata-5.6-2020-02-05' of git://git.kernel.dk/linux-block: ata: pata_arasan_cf: Use dma_request_chan() instead dma_request_slave_channel() ata: ahci: Add shutdown to freeze hardware resources of ahci pata_pcmia: add SanDisk High (>8G) CF card to supported list commit 96222d53842dfe54869ec4e1b9d4856daf9105a2 Author: Jeff Moyer Date: Wed Feb 5 14:15:58 2020 -0500 dax: pass NOWAIT flag to iomap_apply fstests generic/471 reports a failure when run with MOUNT_OPTIONS="-o dax". The reason is that the initial pwrite to an empty file with the RWF_NOWAIT flag set does not return -EAGAIN. It turns out that dax_iomap_rw doesn't pass that flag through to iomap_apply. With this patch applied, generic/471 passes for me. Signed-off-by: Jeff Moyer Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/x49r1z86e1d.fsf@segfault.boston.devel.redhat.com Signed-off-by: Dan Williams commit f2bf09e97b47c7b13e8a918f560f6082e9bc8f8a Author: Steve French Date: Wed Feb 5 18:22:37 2020 -0600 cifs: Add tracepoints for errors on flush or fsync Makes it easier to debug errors on writeback that happen later, and are being returned on flush or fsync For example: writetest-17829 [002] .... 13583.407859: cifs_flush_err: ino=90 rc=-28 Signed-off-by: Steve French commit d6fd41905ec577851734623fb905b1763801f5ef Author: Steve French Date: Wed Feb 5 16:52:11 2020 -0600 cifs: log warning message (once) if out of disk space We ran into a confusing problem where an application wasn't checking return code on close and so user didn't realize that the application ran out of disk space. log a warning message (once) in these cases. For example: [ 8407.391909] Out of space writing to \\oleg-server\small-share Signed-off-by: Steve French Reported-by: Oleg Kravtsov Reviewed-by: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky commit 39a706fbcf2694bfb651bed9041d44c3f4fa8078 Author: Ondrej Mosnacek Date: Mon Feb 3 09:50:23 2020 +0100 selinux: fix sidtab string cache locking Avoiding taking a lock in an IRQ context is not enough to prevent deadlocks, as discovered by syzbot: === WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected 5.5.0-syzkaller #0 Not tainted ----------------------------------------------------- syz-executor.0/8927 [HC0[0]:SC0[2]:HE1:SE0] is trying to acquire: ffff888027c94098 (&(&s->cache_lock)->rlock){+.+.}, at: spin_lock include/linux/spinlock.h:338 [inline] ffff888027c94098 (&(&s->cache_lock)->rlock){+.+.}, at: sidtab_sid2str_put.part.0+0x36/0x880 security/selinux/ss/sidtab.c:533 and this task is already holding: ffffffff898639b0 (&(&nf_conntrack_locks[i])->rlock){+.-.}, at: spin_lock include/linux/spinlock.h:338 [inline] ffffffff898639b0 (&(&nf_conntrack_locks[i])->rlock){+.-.}, at: nf_conntrack_lock+0x17/0x70 net/netfilter/nf_conntrack_core.c:91 which would create a new lock dependency: (&(&nf_conntrack_locks[i])->rlock){+.-.} -> (&(&s->cache_lock)->rlock){+.+.} but this new dependency connects a SOFTIRQ-irq-safe lock: (&(&nf_conntrack_locks[i])->rlock){+.-.} [...] other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&(&s->cache_lock)->rlock); local_irq_disable(); lock(&(&nf_conntrack_locks[i])->rlock); lock(&(&s->cache_lock)->rlock); lock(&(&nf_conntrack_locks[i])->rlock); *** DEADLOCK *** [...] === Fix this by simply locking with irqsave/irqrestore and stop giving up on !in_task(). It makes the locking a bit slower, but it shouldn't make a big difference in real workloads. Under the scenario from [1] (only cache hits) it only increased the runtime overhead from the security_secid_to_secctx() function from ~2% to ~3% (it was ~5-65% before introducing the cache). [1] https://bugzilla.redhat.com/show_bug.cgi?id=1733259 Fixes: d97bd23c2d7d ("selinux: cache the SID -> context string translation") Reported-by: syzbot+61cba5033e2072d61806@syzkaller.appspotmail.com Signed-off-by: Ondrej Mosnacek Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit a20456aef80fa6dda500b46c4bd04e39135097c6 Author: Hridya Valsaraju Date: Sat Feb 1 17:46:23 2020 -0800 selinux: fix typo in filesystem name Correct the filesystem name to "binder" to enable genfscon per-file labelling for binderfs. Fixes: 7a4b5194747 ("selinux: allow per-file labelling for binderfs") Signed-off-by: Hridya Valsaraju Acked-by: Stephen Smalley [PM: slight style changes to the subj/description] Signed-off-by: Paul Moore commit 5df867145f8adad9e5cdf9d67db1fbc0f71351e9 Author: Geert Uytterhoeven Date: Wed Feb 5 20:46:49 2020 +0100 of: clk: Make self-contained Depending on include order: include/linux/of_clk.h:11:45: warning: ‘struct device_node’ declared inside parameter list will not be visible outside of this definition or declaration unsigned int of_clk_get_parent_count(struct device_node *np); ^~~~~~~~~~~ include/linux/of_clk.h:12:43: warning: ‘struct device_node’ declared inside parameter list will not be visible outside of this definition or declaration const char *of_clk_get_parent_name(struct device_node *np, int index); ^~~~~~~~~~~ include/linux/of_clk.h:13:31: warning: ‘struct of_device_id’ declared inside parameter list will not be visible outside of this definition or declaration void of_clk_init(const struct of_device_id *matches); ^~~~~~~~~~~~ Fix this by adding forward declarations for struct device_node and struct of_device_id. Signed-off-by: Geert Uytterhoeven Link: https://lkml.kernel.org/r/20200205194649.31309-1-geert+renesas@glider.be Signed-off-by: Stephen Boyd commit a00574036c261421721fa770ccd21a1012e1fbbd Author: Masami Hiramatsu Date: Wed Feb 5 22:50:23 2020 +0900 bootconfig: Show the number of nodes on boot message Show the number of bootconfig nodes on boot message. Link: http://lkml.kernel.org/r/158091062297.27924.9051634676068550285.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 0f0d0a77ccbdc6bfe51c0d184f92d99ebcc2e809 Author: Masami Hiramatsu Date: Wed Feb 5 22:50:13 2020 +0900 tools/bootconfig: Show the number of bootconfig nodes Show the number of bootconfig nodes when applying new bootconfig to initrd. Since there are limitations of bootconfig not only in its filesize, but also the number of nodes, the number should be shown when applying so that user can get the feeling of scale of current bootconfig. Link: http://lkml.kernel.org/r/158091061337.27924.10886706631693823982.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 597c0e3b4540972580ab36bcc8aa34394bd88cfb Author: Masami Hiramatsu Date: Wed Feb 5 22:50:04 2020 +0900 bootconfig: Add more parse error messages Add more error messages for following cases. - Exceeding max number of nodes - Config tree data is empty (e.g. comment only) - Config data is empty or exceeding max size - bootconfig is already initialized Link: http://lkml.kernel.org/r/158091060401.27924.9024818742827122764.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit e241d14a82910ffa9060d81864760c93b7256195 Author: Masami Hiramatsu Date: Wed Feb 5 22:49:54 2020 +0900 bootconfig: Use bootconfig instead of boot config Use "bootconfig" (1 word) instead of "boot config" (2 words) in the boot message. Link: http://lkml.kernel.org/r/158091059459.27924.14414336187441539879.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 54a16ff6f2e50775145b210bcd94d62c3c2af117 Author: Steven Rostedt (VMware) Date: Wed Feb 5 09:20:32 2020 -0500 ftrace: Protect ftrace_graph_hash with ftrace_sync As function_graph tracer can run when RCU is not "watching", it can not be protected by synchronize_rcu() it requires running a task on each CPU before it can be freed. Calling schedule_on_each_cpu(ftrace_sync) needs to be used. Link: https://lore.kernel.org/r/20200205131110.GT2935@paulmck-ThinkPad-P72 Cc: stable@vger.kernel.org Fixes: b9b0c831bed26 ("ftrace: Convert graph filter to use hash tables") Reported-by: "Paul E. McKenney" Reviewed-by: Joel Fernandes (Google) Signed-off-by: Steven Rostedt (VMware) commit 87fbfffcc89b92a4281b0aa53bd06af714087889 Author: Casey Schaufler Date: Mon Feb 3 09:15:00 2020 -0800 broken ping to ipv6 linklocal addresses on debian buster I am seeing ping failures to IPv6 linklocal addresses with Debian buster. Easiest example to reproduce is: $ ping -c1 -w1 ff02::1%eth1 connect: Invalid argument $ ping -c1 -w1 ff02::1%eth1 PING ff02::01%eth1(ff02::1%eth1) 56 data bytes 64 bytes from fe80::e0:f9ff:fe0c:37%eth1: icmp_seq=1 ttl=64 time=0.059 ms git bisect traced the failure to commit b9ef5513c99b ("smack: Check address length before reading address family") Arguably ping is being stupid since the buster version is not setting the address family properly (ping on stretch for example does): $ strace -e connect ping6 -c1 -w1 ff02::1%eth1 connect(5, {sa_family=AF_UNSPEC, sa_data="\4\1\0\0\0\0\377\2\0\0\0\0\0\0\0\0\0\0\0\0\0\1\3\0\0\0"}, 28) = -1 EINVAL (Invalid argument) but the command works fine on kernels prior to this commit, so this is breakage which goes against the Linux paradigm of "don't break userspace" Cc: stable@vger.kernel.org Reported-by: David Ahern Suggested-by: Tetsuo Handa Signed-off-by: Casey Schaufler  security/smack/smack_lsm.c | 41 +++++++++++++++++++---------------------- 1 file changed, 19 insertions(+), 22 deletions(-) commit 16052dd5bdfa16dbe18d8c1d4cde2ddab9d23177 Author: Steven Rostedt (VMware) Date: Wed Feb 5 02:17:57 2020 -0500 ftrace: Add comment to why rcu_dereference_sched() is open coded Because the function graph tracer can execute in sections where RCU is not "watching", the rcu_dereference_sched() for the has needs to be open coded. This is fine because the RCU "flavor" of the ftrace hash is protected by its own RCU handling (it does its own little synchronization on every CPU and does not rely on RCU sched). Acked-by: Joel Fernandes (Google) Signed-off-by: Steven Rostedt (VMware) commit fd0e6852c407dd9aefc594f54ddcc21d84803d3b Author: Amol Grover Date: Wed Feb 5 11:27:02 2020 +0530 tracing: Annotate ftrace_graph_notrace_hash pointer with __rcu Fix following instances of sparse error kernel/trace/ftrace.c:5667:29: error: incompatible types in comparison kernel/trace/ftrace.c:5813:21: error: incompatible types in comparison kernel/trace/ftrace.c:5868:36: error: incompatible types in comparison kernel/trace/ftrace.c:5870:25: error: incompatible types in comparison Use rcu_dereference_protected to dereference the newly annotated pointer. Link: http://lkml.kernel.org/r/20200205055701.30195-1-frextrite@gmail.com Signed-off-by: Amol Grover Signed-off-by: Steven Rostedt (VMware) commit 24a9729f831462b1d9d61dc85ecc91c59037243f Author: Amol Grover Date: Sat Feb 1 12:57:04 2020 +0530 tracing: Annotate ftrace_graph_hash pointer with __rcu Fix following instances of sparse error kernel/trace/ftrace.c:5664:29: error: incompatible types in comparison kernel/trace/ftrace.c:5785:21: error: incompatible types in comparison kernel/trace/ftrace.c:5864:36: error: incompatible types in comparison kernel/trace/ftrace.c:5866:25: error: incompatible types in comparison Use rcu_dereference_protected to access the __rcu annotated pointer. Link: http://lkml.kernel.org/r/20200201072703.17330-1-frextrite@gmail.com Reviewed-by: Joel Fernandes (Google) Signed-off-by: Amol Grover Signed-off-by: Steven Rostedt (VMware) commit f566e1fbadb686e28f1c307e356114b2865ef588 Author: Masahiro Yamada Date: Wed Feb 5 15:51:52 2020 +0900 kbuild: make multiple directory targets work Currently, the single-target build does not work when two or more sub-directories are given: $ make fs/ kernel/ lib/ CALL scripts/checksyscalls.sh CALL scripts/atomic/check-atomics.sh DESCEND objtool make[2]: Nothing to be done for 'kernel/'. make[2]: Nothing to be done for 'fs/'. make[2]: Nothing to be done for 'lib/'. Make it work properly. Reported-by: Linus Torvalds Signed-off-by: Masahiro Yamada commit b9e42724888527352604260abc6717cba21421de Merge: fc9e34f8de00 8ed47e140867 Author: Daniel Borkmann Date: Wed Feb 5 22:06:09 2020 +0100 Merge branch 'bpf-xsk-fixes' Maciej Fijalkowski says: ==================== Cameron reported [0] that on fresh bpf-next he could not run multiple xdpsock instances in Tx-only mode on single network interface with i40e driver. Turns out that Maxim's series [1] which was adding RCU protection around ndo_xsk_wakeup added check against the __I40E_CONFIG_BUSY being set on pf->state within i40e_xsk_wakeup() - if it's set, return -ENETDOWN. Since this bit is set per PF when UMEM is being enabled/disabled, the situation Cameron stumbled upon was that when he launched second xdpsock instance, second UMEM was being registered, hence set __I40E_CONFIG_BUSY which is now observed by first xdpsock and therefore xdpsock's kick_tx() gets -ENETDOWN as errno. -ENETDOWN currently is not allowed in kick_tx(), so we were exiting the first application. Such exit means also XDP program being unloaded and its dedicated resources, which caused an -ENXIO being return in the second xdpsock instance. Let's fix the issue from both sides - protect ourselves from future xdpsock crashes by allowing for -ENETDOWN errno being set in kick_tx() (patch 3) and from driver side, return -EAGAIN for the case where PF is busy (patch 1). Remove also doubled variable from xdpsock_user.c (patch 2). Note that ixgbe seems not to be affected since UMEM registration sets the busy/disable bit per ring, not per PF. [0]: https://www.spinics.net/lists/xdp-newbies/msg01558.html [1]: https://lore.kernel.org/netdev/20191217162023.16011-1-maximmi@mellanox.com/ ==================== Signed-off-by: Daniel Borkmann commit 8ed47e140867a6e7d56170f325c8d4fdee6d6b66 Author: Maciej Fijalkowski Date: Wed Feb 5 05:58:34 2020 +0100 samples: bpf: Allow for -ENETDOWN in xdpsock ndo_xsk_wakeup() can return -ENETDOWN and there's no particular reason to bail the whole application out on that case. Let's check in kick_tx() whether errno was set to mentioned value and basically allow application to further process frames. Fixes: 248c7f9c0e21 ("samples/bpf: convert xdpsock to use libbpf for AF_XDP access") Reported-by: Cameron Elliott Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20200205045834.56795-4-maciej.fijalkowski@intel.com commit 32c92c15ad3dca6f7cca8643766ad79fa3ab3d17 Author: Maciej Fijalkowski Date: Wed Feb 5 05:58:33 2020 +0100 samples: bpf: Drop doubled variable declaration in xdpsock Seems that by accident there is a doubled declaration of global variable opt_xdp_bind_flags in xdpsock_user.c. The second one is uninitialized so compiler was simply ignoring it. To keep things clean, drop the doubled variable. Fixes: c543f5469822 ("samples/bpf: add unaligned chunks mode support to xdpsock") Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20200205045834.56795-3-maciej.fijalkowski@intel.com commit c77e9f09143822623dd71a0fdc84331129e97c3a Author: Maciej Fijalkowski Date: Wed Feb 5 05:58:32 2020 +0100 i40e: Relax i40e_xsk_wakeup's return value when PF is busy Return -EAGAIN instead of -ENETDOWN to provide a slightly milder information to user space so that an application will know to retry the syscall when __I40E_CONFIG_BUSY bit is set on pf->state. Fixes: b3873a5be757 ("net/i40e: Fix concurrency issues between config flow and XSK") Signed-off-by: Maciej Fijalkowski Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20200205045834.56795-2-maciej.fijalkowski@intel.com commit fc9e34f8de001c92e6cfc6481bb30a34dbda4f5c Author: Song Liu Date: Tue Feb 4 13:50:37 2020 -0800 tools/bpf/runqslower: Rebuild libbpf.a on libbpf source change Add missing dependency of $(BPFOBJ) to $(LIBBPF_SRC), so that running make in runqslower/ will rebuild libbpf.a when there is change in libbpf/. Fixes: 9c01546d26d2 ("tools/bpf: Add runqslower tool to tools/bpf") Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200204215037.2258698-1-songliubraving@fb.com commit 4c7d00ccf40db99bfb7bd1857bcbf007275704d8 Merge: 18ea671ba40b 9871abffc810 Author: Linus Torvalds Date: Wed Feb 5 18:11:51 2020 +0000 Merge tag 'pwm/for-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "Mostly cleanups and minor improvements with some new chip support for some drivers" * tag 'pwm/for-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (37 commits) pwm: Remove set but not set variable 'pwm' pwm: sun4i: Initialize variables before use pwm: stm32: Remove automatic output enable pwm: sun4i: Narrow scope of local variable pwm: bcm2835: Allow building for ARCH_BRCMSTB pwm: imx27: Eliminate error message for defer probe pwm: sun4i: Fix inconsistent IS_ERR and PTR_ERR pwm: sun4i: Move pwm_calculate() out of spin_lock() pwm: omap-dmtimer: Allow compiling with COMPILE_TEST pwm: omap-dmtimer: put_device() after of_find_device_by_node() pwm: omap-dmtimer: Simplify error handling pwm: omap-dmtimer: Remove PWM chip in .remove before making it unfunctional pwm: Implement tracing for .get_state() and .apply_state() pwm: rcar: Document inability to set duty_cycle = 0 pwm: rcar: Drop useless call to pwm_get_state() pwm: Fix minor Kconfig whitespace issues pwm: atmel: Implement .get_state() pwm: atmel: Use register accessors for channels pwm: atmel: Document known weaknesses of both hardware and software pwm: atmel: Replace loop in prescale calculation by ad-hoc calculation ... commit 18ea671ba40bcbb15c47118e20010240186da33b Merge: 4fc2ea6a8608 bad83565eafe Author: Linus Torvalds Date: Wed Feb 5 18:07:39 2020 +0000 Merge tag 'dmaengine-fix-5.6-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "Fixes for: - Documentation build error fix - Fix dma_request_chan() error return - Remove unneeded conversion in idxd driver - Fix pointer check for dma_async_device_channel_register() - Fix slave-channel symlink cleanup" * tag 'dmaengine-fix-5.6-rc1' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: Cleanups for the slave <-> channel symlink support dmaengine: fix null ptr check for __dma_async_device_channel_register() dmaengine: idxd: fix boolconv.cocci warnings dmaengine: Fix return value for dma_request_chan() in case of failure dmaengine: doc: Properly indent metadata title commit 2e34673be0bd6bb0c6c496a861cbc3f7431e7ce3 Author: Kuppuswamy Sathyanarayanan Date: Wed Jan 29 11:14:00 2020 -0800 PCI/ATS: Use PF PASID for VFs Per PCIe r5.0, sec 9.3.7.14, if a PF implements the PASID Capability, the PF PASID configuration is shared by its VFs, and VFs must not implement their own PASID Capability. But commit 751035b8dc06 ("PCI/ATS: Cache PASID Capability offset") changed pci_max_pasids() and pci_pasid_features() to use the PASID Capability of the VF device instead of the associated PF device. This leads to IOMMU bind failures when pci_max_pasids() and pci_pasid_features() are called for VFs. In pci_max_pasids() and pci_pasid_features(), always use the PF PASID Capability. Fixes: 751035b8dc06 ("PCI/ATS: Cache PASID Capability offset") Link: https://lore.kernel.org/r/fe891f9755cb18349389609e7fed9940fc5b081a.1580325170.git.sathyanarayanan.kuppuswamy@linux.intel.com Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Bjorn Helgaas CC: stable@vger.kernel.org # v5.5+ commit 75467ee48a5e04cf3ae3cb39aea6adee73aeff91 Author: Christoph Hellwig Date: Mon Feb 3 14:54:50 2020 +0100 dma-direct: improve DMA mask overflow reporting Remove the unset dma_mask case as that won't get into mapping calls anymore, and also report the other errors unconditonally and with a slightly improved message. Remove the now pointless report_addr helper. Signed-off-by: Christoph Hellwig Reviewed-by: Konrad Rzeszutek Wilk commit 4a47cbae04844f0c5e2365aa6c217b61850bb832 Author: Christoph Hellwig Date: Mon Feb 3 14:44:38 2020 +0100 dma-direct: improve swiotlb error reporting Untangle the way how dma_direct_map_page calls into swiotlb to be able to properly report errors where the swiotlb DMA address overflows the mask separately from overflows in the !swiotlb case. This means that siotlb_map now has to do a little more work that duplicates dma_direct_map_page, but doing so greatly simplifies the calling convention. Signed-off-by: Christoph Hellwig Reviewed-by: Konrad Rzeszutek Wilk commit 91ef26f914171cf753330f13724fd9142b5b1640 Author: Christoph Hellwig Date: Mon Feb 3 18:11:10 2020 +0100 dma-direct: relax addressability checks in dma_direct_supported dma_direct_supported tries to find the minimum addressable bitmask based on the end pfn and optional magic that architectures can use to communicate the size of the magic ZONE_DMA that can be used for bounce buffering. But between the DMA offsets that can change per device (or sometimes even region), the fact the ZONE_DMA isn't even guaranteed to be the lowest addresses and failure of having proper interfaces to the MM code this fails at least for one arm subarchitecture. As all the legacy DMA implementations have supported 32-bit DMA masks, and 32-bit masks are guranteed to always work by the API contract (using bounce buffers if needed), we can short cut the complicated check and always return true without breaking existing assumptions. Hopefully we can properly clean up the interaction with the arch defined zones and the bootmem allocator eventually. Fixes: ad3c7b18c5b3 ("arm: use swiotlb for bounce buffering on LPAE configs") Reported-by: Peter Ujfalusi Signed-off-by: Christoph Hellwig Tested-by: Peter Ujfalusi commit 4fc2ea6a8608d9a649eff5e3c2ee477eb70f0fb6 Merge: d271ab29230b e3b5ee0cfb65 Author: Linus Torvalds Date: Wed Feb 5 17:49:54 2020 +0000 Merge tag 'iommu-updates-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu updates from Joerg Roedel: - Allow compiling the ARM-SMMU drivers as modules. - Fixes and cleanups for the ARM-SMMU drivers and io-pgtable code collected by Will Deacon. The merge-commit (6855d1ba7537) has all the details. - Cleanup of the iommu_put_resv_regions() call-backs in various drivers. - AMD IOMMU driver cleanups. - Update for the x2APIC support in the AMD IOMMU driver. - Preparation patches for Intel VT-d nested mode support. - RMRR and identity domain handling fixes for the Intel VT-d driver. - More small fixes and cleanups. * tag 'iommu-updates-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (87 commits) iommu/amd: Remove the unnecessary assignment iommu/vt-d: Remove unnecessary WARN_ON_ONCE() iommu/vt-d: Unnecessary to handle default identity domain iommu/vt-d: Allow devices with RMRRs to use identity domain iommu/vt-d: Add RMRR base and end addresses sanity check iommu/vt-d: Mark firmware tainted if RMRR fails sanity check iommu/amd: Remove unused struct member iommu/amd: Replace two consecutive readl calls with one readq iommu/vt-d: Don't reject Host Bridge due to scope mismatch PCI/ATS: Add PASID stubs iommu/arm-smmu-v3: Return -EBUSY when trying to re-add a device iommu/arm-smmu-v3: Improve add_device() error handling iommu/arm-smmu-v3: Use WRITE_ONCE() when changing validity of an STE iommu/arm-smmu-v3: Add second level of context descriptor table iommu/arm-smmu-v3: Prepare for handling arm_smmu_write_ctx_desc() failure iommu/arm-smmu-v3: Propagate ssid_bits iommu/arm-smmu-v3: Add support for Substream IDs iommu/arm-smmu-v3: Add context descriptor tables allocators iommu/arm-smmu-v3: Prepare arm_smmu_s1_cfg for SSID support ACPI/IORT: Parse SSID property of named component node ... commit d271ab29230b1d0ceb426f374c221c4eb2c91c64 Merge: 2634744bf38a 8557bbe5156e Author: Linus Torvalds Date: Wed Feb 5 17:44:14 2020 +0000 Merge tag 'for-linus-5.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: - fix a bug introduced in 5.5 in the Xen gntdev driver - fix the Xen balloon driver when running on ancient Xen versions - allow Xen stubdoms to control interrupt enable flags of passed-through PCI cards - release resources in Xen backends under memory pressure * tag 'for-linus-5.6-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/blkback: Consistently insert one empty line between functions xen/blkback: Remove unnecessary static variable name prefixes xen/blkback: Squeeze page pools if a memory pressure is detected xenbus/backend: Protect xenbus callback with lock xenbus/backend: Add memory pressure handler callback xen/gntdev: Do not use mm notifiers with autotranslating guests xen/balloon: Support xend-based toolstack take two xen-pciback: optionally allow interrupt enable flag writes commit 2634744bf38ab20d17fe8220f1f83b6f3801386f Merge: cfb4b571e8b5 04dbd86539fd Author: Linus Torvalds Date: Wed Feb 5 17:37:25 2020 +0000 Merge tag 'devicetree-fixes-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Fix incorrect $id paths in schemas - Two fixes for Intel LGM SoC binding schemas * tag 'devicetree-fixes-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: Fix paths in schema $id fields dt-bindings: PCI: intel: Fix dt_binding_check compilation failure dt-bindings: phy: Fix errors in intel,lgm-emmc-phy example commit d1c9038ab5c1c96c0fd9d13ec56f2d650fe4c59f Author: Stephen Kitt Date: Fri Jan 24 19:33:16 2020 +0100 Allow git builds of Sphinx When using a non-release version of Sphinx, from a local build (with improvements for kernel doc handling, why not), sphinx-build --version reports versions of the form sphinx-build 3.0.0+/4703d9119972 i.e. base version, a plus symbol, slash, and the start of the git hash of whatever repository the command is run in (no, not the hash that was used to build Sphinx!). This patch fixes the installation check in sphinx-pre-install to recognise such version output. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200124183316.1719218-1-steve@sk2.org Signed-off-by: Jonathan Corbet commit cfb4b571e8b56b65d1a893bda5153647fda823b9 Merge: 6992ca0dd017 55d0a513a0e2 Author: Linus Torvalds Date: Wed Feb 5 17:33:35 2020 +0000 Merge tag 's390-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 updates from Vasily Gorbik: "The second round of s390 fixes and features for 5.6: - Add KPROBES_ON_FTRACE support - Add EP11 AES secure keys support - PAES rework and prerequisites for paes-s390 ciphers selftests - Fix page table upgrade for hugetlbfs" * tag 's390-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/pkey/zcrypt: Support EP11 AES secure keys s390/zcrypt: extend EP11 card and queue sysfs attributes s390/zcrypt: add new low level ep11 functions support file s390/zcrypt: ep11 structs rework, export zcrypt_send_ep11_cprb s390/zcrypt: enable card/domain autoselect on ep11 cprbs s390/crypto: enable clear key values for paes ciphers s390/pkey: Add support for key blob with clear key value s390/crypto: Rework on paes implementation s390: support KPROBES_ON_FTRACE s390/mm: fix dynamic pagetable upgrade for hugetlbfs commit 599e6f8d3d23ec79d31891cda11af6e79d591ead Author: Randy Dunlap Date: Wed Jan 29 15:15:15 2020 -0800 Documentation: changes.rst: update several outdated project URLs Update projects URLs in the changes.rst file. Signed-off-by: Randy Dunlap Reviewed-by: Darrick J. Wong Acked-by: Theodore Ts'o Link: https://lore.kernel.org/r/a9c3c509-8f30-fcc4-d9e0-b53aeaa89e4f@infradead.org Signed-off-by: Jonathan Corbet commit ff1e81a7e2239f61d0e9173f113a7de4dcaab661 Author: Sameer Rahmani Date: Mon Feb 3 20:15:43 2020 +0000 Documentation: build warnings related to missing blank lines after explicit markups has been fixed Fix for several documentation build warnings related to missing blank lines after explicit mark up. Exact warning message: WARNING: Explicit markup ends without a blank line; unexpected unindent. Signed-off-by: Sameer Rahmani Link: https://lore.kernel.org/r/20200203201543.24834-1-lxsameer@gnu.org Signed-off-by: Jonathan Corbet commit 36a375c6dfad502217898c4c2f0cf05810c30ceb Author: Tiezhu Yang Date: Mon Feb 3 17:10:45 2020 +0800 mailmap: add entry for Tiezhu Yang Add an entry to connect all my email addresses. Signed-off-by: Tiezhu Yang Link: https://lore.kernel.org/r/1580721045-4988-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Jonathan Corbet commit 95c472ffca38e4aaf6000722194612d188ce5ac7 Author: SeongJae Park Date: Fri Jan 31 21:52:36 2020 +0100 Documentation/ko_KR/howto: Update a broken link Signed-off-by: SeongJae Park Link: https://lore.kernel.org/r/20200131205237.29535-5-sj38.park@gmail.com Signed-off-by: Jonathan Corbet commit 5549c20232659a43797078d035736f1e01137c46 Author: SeongJae Park Date: Fri Jan 31 21:52:35 2020 +0100 Documentation/ko_KR/howto: Update broken web addresses Commit 0ea6e6112219 ("Documentation: update broken web addresses.") removed a link to 'http://patchwork.ozlabs.org' in howto, but the change has not applied to the Korean translation. This commit simply applies the change to the Korean translation. The link is restored now, though. Signed-off-by: SeongJae Park Link: https://lore.kernel.org/r/20200131205237.29535-4-sj38.park@gmail.com Signed-off-by: Jonathan Corbet commit 4bfdebd6202da4cbf723c53f475999b7537d4e48 Author: SeongJae Park Date: Fri Jan 31 21:52:33 2020 +0100 docs/locking: Fix outdated section names Commit 2e4f5382d12a ("locking/doc: Rename LOCK/UNLOCK to ACQUIRE/RELEASE") has not appied to 'spinlock.rst'. This commit updates the doc for the change. Signed-off-by: SeongJae Park Link: https://lore.kernel.org/r/20200131205237.29535-2-sj38.park@gmail.com Signed-off-by: Jonathan Corbet commit a8be1ad01b795bd2a13297ddbaecdb956ab0efd0 Author: Miaohe Lin Date: Wed Feb 5 23:33:53 2020 +0800 KVM: vmx: delete meaningless vmx_decache_cr0_guest_bits() declaration The function vmx_decache_cr0_guest_bits() is only called below its implementation. So this is meaningless and should be removed. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit d76c7fbc01b29257359ed8b0d16d662e725b7bf9 Author: Sean Christopherson Date: Tue Jan 28 15:53:44 2020 -0800 KVM: x86: Mark CR4.UMIP as reserved based on associated CPUID bit Re-add code to mark CR4.UMIP as reserved if UMIP is not supported by the host. The UMIP handling was unintentionally dropped during a recent refactoring. Not flagging CR4.UMIP allows the guest to set its CR4.UMIP regardless of host support or userspace desires. On CPUs with UMIP support, including emulated UMIP, this allows the guest to enable UMIP against the wishes of the userspace VMM. On CPUs without any form of UMIP, this results in a failed VM-Enter due to invalid guest state. Fixes: 345599f9a2928 ("KVM: x86: Add macro to ensure reserved cr4 bits checks stay in sync") Signed-off-by: Sean Christopherson Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit bcfcff640c4d736933c5990d5a801d6a0c22c28b Author: Paolo Bonzini Date: Wed Feb 5 16:20:23 2020 +0100 x86: vmxfeatures: rename features for consistency with KVM and manual Three of the feature bits in vmxfeatures.h have names that are different from the Intel SDM. The names have been adjusted recently in KVM but they were using the old name in the tip tree's x86/cpu branch. Adjust for consistency. Signed-off-by: Paolo Bonzini commit ef09f4f463350ef4c174158648d91bb7ebfd10db Merge: df7e8818926e b2ff728bae9b Author: Paolo Bonzini Date: Wed Feb 5 16:15:05 2020 +0100 Merge tag 'kvm-s390-next-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: Fixes and cleanups for 5.6 - fix register corruption - ENOTSUPP/EOPNOTSUPP mixed - reset cleanups/fixes - selftests commit df7e8818926eb4712b67421442acf7d568fe2645 Author: Paolo Bonzini Date: Wed Feb 5 16:10:52 2020 +0100 KVM: SVM: relax conditions for allowing MSR_IA32_SPEC_CTRL accesses Userspace that does not know about the AMD_IBRS bit might still allow the guest to protect itself with MSR_IA32_SPEC_CTRL using the Intel SPEC_CTRL bit. However, svm.c disallows this and will cause a #GP in the guest when writing to the MSR. Fix this by loosening the test and allowing the Intel CPUID bit, and in fact allow the AMD_STIBP bit as well since it allows writing to MSR_IA32_SPEC_CTRL too. Reported-by: Zhiyi Guo Analyzed-by: Dr. David Alan Gilbert Analyzed-by: Laszlo Ersek Signed-off-by: Paolo Bonzini commit 4400cf546b4bb62d49198f6642add01bf6e9b34d Author: Eric Hankland Date: Mon Jan 27 13:22:56 2020 -0800 KVM: x86: Fix perfctr WRMSR for running counters Correct the logic in intel_pmu_set_msr() for fixed and general purpose counters. This was recently changed to set pmc->counter without taking in to account the value of pmc_read_counter() which will be incorrect if the counter is currently running and non-zero; this changes back to the old logic which accounted for the value of currently running counters. Signed-off-by: Eric Hankland Signed-off-by: Paolo Bonzini commit a83502314ce303c6341b249c41121759c7477ba1 Author: Vitaly Kuznetsov Date: Wed Feb 5 13:30:34 2020 +0100 x86/kvm/hyper-v: don't allow to turn on unsupported VMX controls for nested guests Sane L1 hypervisors are not supposed to turn any of the unsupported VMX controls on for its guests and nested_vmx_check_controls() checks for that. This is, however, not the case for the controls which are supported on the host but are missing in enlightened VMCS and when eVMCS is in use. It would certainly be possible to add these missing checks to nested_check_vm_execution_controls()/_vm_exit_controls()/.. but it seems preferable to keep eVMCS-specific stuff in eVMCS and reduce the impact on non-eVMCS guests by doing less unrelated checks. Create a separate nested_evmcs_check_controls() for this purpose. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 31de3d2500e49e9f44fdda1830a37f4d9735bcdd Author: Vitaly Kuznetsov Date: Wed Feb 5 13:30:33 2020 +0100 x86/kvm/hyper-v: move VMX controls sanitization out of nested_enable_evmcs() With fine grained VMX feature enablement QEMU>=4.2 tries to do KVM_SET_MSRS with default (matching CPU model) values and in case eVMCS is also enabled, fails. It would be possible to drop VMX feature filtering completely and make this a guest's responsibility: if it decides to use eVMCS it should know which fields are available and which are not. Hyper-V mostly complies to this, however, there are some problematic controls: SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES VM_{ENTRY,EXIT}_LOAD_IA32_PERF_GLOBAL_CTRL which Hyper-V enables. As there are no corresponding fields in eVMCS, we can't handle this properly in KVM. This is a Hyper-V issue. Move VMX controls sanitization from nested_enable_evmcs() to vmx_get_msr(), and do the bare minimum (only clear controls which are known to cause issues). This allows userspace to keep setting controls it wants and at the same time hides them from the guest. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 8f79b064959b1c858cddad1cecbf0511adca8209 Author: Ben Gardon Date: Mon Feb 3 15:09:10 2020 -0800 kvm: mmu: Separate generating and setting mmio ptes Separate the functions for generating MMIO page table entries from the function that inserts them into the paging structure. This refactoring will facilitate changes to the MMU sychronization model to use atomic compare / exchanges (which are not guaranteed to succeed) instead of a monolithic MMU lock. No functional change expected. Tested by running kvm-unit-tests on an Intel Haswell machine. This commit introduced no new failures. Signed-off-by: Ben Gardon Reviewed-by: Oliver Upton Reviewed-by: Peter Shier Signed-off-by: Paolo Bonzini commit 0a2b64c50db00196c85ec9e8e4c3d7506cd09db9 Author: Ben Gardon Date: Mon Feb 3 15:09:09 2020 -0800 kvm: mmu: Replace unsigned with unsigned int for PTE access There are several functions which pass an access permission mask for SPTEs as an unsigned. This works, but checkpatch complains about it. Switch the occurrences of unsigned to unsigned int to satisfy checkpatch. No functional change expected. Tested by running kvm-unit-tests on an Intel Haswell machine. This commit introduced no new failures. Signed-off-by: Ben Gardon Reviewed-by: Oliver Upton Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit ea79a750927e1835fa869c9136bfd6da28e605e6 Author: Sean Christopherson Date: Tue Feb 4 07:32:59 2020 -0800 KVM: nVMX: Remove stale comment from nested_vmx_load_cr3() The blurb pertaining to the return value of nested_vmx_load_cr3() no longer matches reality, remove it entirely as the behavior it is attempting to document is quite obvious when reading the actual code. Signed-off-by: Sean Christopherson Reviewed-by: Krish Sadhukhan Signed-off-by: Paolo Bonzini commit 879a37632b403eb8c0fe00e14f907759100c8071 Author: Sean Christopherson Date: Mon Feb 3 10:42:00 2020 -0800 KVM: MIPS: Fold comparecount_func() into comparecount_wakeup() Fold kvm_mips_comparecount_func() into kvm_mips_comparecount_wakeup() to eliminate the nondescript function name as well as its unnecessary cast of a vcpu to "unsigned long" and back to a vcpu. Presumably func() was used as a callback at some point during pre-upstream development, as wakeup() is the only user of func() and has been the only user since both with introduced by commit 669e846e6c4e ("KVM/MIPS32: MIPS arch specific APIs for KVM"). Cc: Davidlohr Bueso Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 09df6307125cec07ef9168f1db2ffdbbcb304b1a Author: Sean Christopherson Date: Mon Feb 3 10:41:59 2020 -0800 KVM: MIPS: Fix a build error due to referencing not-yet-defined function Hoist kvm_mips_comparecount_wakeup() above its only user, kvm_arch_vcpu_create() to fix a compilation error due to referencing an undefined function. Fixes: d11dfed5d700 ("KVM: MIPS: Move all vcpu init code into kvm_arch_vcpu_create()") Reported-by: kbuild test robot Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 64b38bd1906bb62a040b4e91815e56005db4784d Author: Thadeu Lima de Souza Cascardo Date: Fri Jan 31 12:56:55 2020 -0300 x86/kvm: do not setup pv tlb flush when not paravirtualized kvm_setup_pv_tlb_flush will waste memory and print a misguiding message when KVM paravirtualization is not available. Intel SDM says that the when cpuid is used with EAX higher than the maximum supported value for basic of extended function, the data for the highest supported basic function will be returned. So, in some systems, kvm_arch_para_features will return bogus data, causing kvm_setup_pv_tlb_flush to detect support for pv tlb flush. Testing for kvm_para_available will work as it checks for the hypervisor signature. Besides, when the "nopv" command line parameter is used, it should not continue as well, as kvm_guest_init will no be called in that case. Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Paolo Bonzini commit 7df003c85218b5f5b10a7f6418208f31e813f38f Author: Zhuang Yanying Date: Sat Oct 12 11:37:31 2019 +0800 KVM: fix overflow of zero page refcount with ksm running We are testing Virtual Machine with KSM on v5.4-rc2 kernel, and found the zero_page refcount overflow. The cause of refcount overflow is increased in try_async_pf (get_user_page) without being decreased in mmu_set_spte() while handling ept violation. In kvm_release_pfn_clean(), only unreserved page will call put_page. However, zero page is reserved. So, as well as creating and destroy vm, the refcount of zero page will continue to increase until it overflows. step1: echo 10000 > /sys/kernel/pages_to_scan/pages_to_scan echo 1 > /sys/kernel/pages_to_scan/run echo 1 > /sys/kernel/pages_to_scan/use_zero_pages step2: just create several normal qemu kvm vms. And destroy it after 10s. Repeat this action all the time. After a long period of time, all domains hang because of the refcount of zero page overflow. Qemu print error log as follow: … error: kvm run failed Bad address EAX=00006cdc EBX=00000008 ECX=80202001 EDX=078bfbfd ESI=ffffffff EDI=00000000 EBP=00000008 ESP=00006cc4 EIP=000efd75 EFL=00010002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0 ES =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] CS =0008 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA] SS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] DS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] FS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] GS =0010 00000000 ffffffff 00c09300 DPL=0 DS [-WA] LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT TR =0000 00000000 0000ffff 00008b00 DPL=0 TSS32-busy GDT= 000f7070 00000037 IDT= 000f70ae 00000000 CR0=00000011 CR2=00000000 CR3=00000000 CR4=00000000 DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 DR6=00000000ffff0ff0 DR7=0000000000000400 EFER=0000000000000000 Code=00 01 00 00 00 e9 e8 00 00 00 c7 05 4c 55 0f 00 01 00 00 00 <8b> 35 00 00 01 00 8b 3d 04 00 01 00 b8 d8 d3 00 00 c1 e0 08 0c ea a3 00 00 01 00 c7 05 04 … Meanwhile, a kernel warning is departed. [40914.836375] WARNING: CPU: 3 PID: 82067 at ./include/linux/mm.h:987 try_get_page+0x1f/0x30 [40914.836412] CPU: 3 PID: 82067 Comm: CPU 0/KVM Kdump: loaded Tainted: G OE 5.2.0-rc2 #5 [40914.836415] RIP: 0010:try_get_page+0x1f/0x30 [40914.836417] Code: 40 00 c3 0f 1f 84 00 00 00 00 00 48 8b 47 08 a8 01 75 11 8b 47 34 85 c0 7e 10 f0 ff 47 34 b8 01 00 00 00 c3 48 8d 78 ff eb e9 <0f> 0b 31 c0 c3 66 90 66 2e 0f 1f 84 00 0 0 00 00 00 48 8b 47 08 a8 [40914.836418] RSP: 0018:ffffb4144e523988 EFLAGS: 00010286 [40914.836419] RAX: 0000000080000000 RBX: 0000000000000326 RCX: 0000000000000000 [40914.836420] RDX: 0000000000000000 RSI: 00004ffdeba10000 RDI: ffffdf07093f6440 [40914.836421] RBP: ffffdf07093f6440 R08: 800000424fd91225 R09: 0000000000000000 [40914.836421] R10: ffff9eb41bfeebb8 R11: 0000000000000000 R12: ffffdf06bbd1e8a8 [40914.836422] R13: 0000000000000080 R14: 800000424fd91225 R15: ffffdf07093f6440 [40914.836423] FS: 00007fb60ffff700(0000) GS:ffff9eb4802c0000(0000) knlGS:0000000000000000 [40914.836425] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [40914.836426] CR2: 0000000000000000 CR3: 0000002f220e6002 CR4: 00000000003626e0 [40914.836427] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [40914.836427] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [40914.836428] Call Trace: [40914.836433] follow_page_pte+0x302/0x47b [40914.836437] __get_user_pages+0xf1/0x7d0 [40914.836441] ? irq_work_queue+0x9/0x70 [40914.836443] get_user_pages_unlocked+0x13f/0x1e0 [40914.836469] __gfn_to_pfn_memslot+0x10e/0x400 [kvm] [40914.836486] try_async_pf+0x87/0x240 [kvm] [40914.836503] tdp_page_fault+0x139/0x270 [kvm] [40914.836523] kvm_mmu_page_fault+0x76/0x5e0 [kvm] [40914.836588] vcpu_enter_guest+0xb45/0x1570 [kvm] [40914.836632] kvm_arch_vcpu_ioctl_run+0x35d/0x580 [kvm] [40914.836645] kvm_vcpu_ioctl+0x26e/0x5d0 [kvm] [40914.836650] do_vfs_ioctl+0xa9/0x620 [40914.836653] ksys_ioctl+0x60/0x90 [40914.836654] __x64_sys_ioctl+0x16/0x20 [40914.836658] do_syscall_64+0x5b/0x180 [40914.836664] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [40914.836666] RIP: 0033:0x7fb61cb6bfc7 Signed-off-by: LinFeng Signed-off-by: Zhuang Yanying Signed-off-by: Paolo Bonzini commit 51b2569402a38e206d26728b0099eb059ab315b5 Author: Jeremy Cline Date: Wed Feb 5 08:41:46 2020 -0500 KVM: arm/arm64: Fix up includes for trace.h Fedora kernel builds on armv7hl began failing recently because kvm_arm_exception_type and kvm_arm_exception_class were undeclared in trace.h. Add the missing include. Fixes: 0e20f5e25556 ("KVM: arm/arm64: Cleanup MMIO handling") Signed-off-by: Jeremy Cline Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200205134146.82678-1-jcline@redhat.com commit 0202d293c2faecba791ba4afc5aec086249c393d Author: Sudarsana Reddy Kalluru Date: Wed Feb 5 05:10:55 2020 -0800 qed: Fix timestamping issue for L2 unicast ptp packets. commit cedeac9df4b8 ("qed: Add support for Timestamping the unicast PTP packets.") handles the timestamping of L4 ptp packets only. This patch adds driver changes to detect/timestamp both L2/L4 unicast PTP packets. Fixes: cedeac9df4b8 ("qed: Add support for Timestamping the unicast PTP packets.") Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Ariel Elior Signed-off-by: David S. Miller commit 9b5e85320fcc3af20ce0397b2c6363b6ee5815b6 Author: Sean Christopherson Date: Fri Jan 24 15:07:22 2020 -0800 KVM: x86: Take a u64 when checking for a valid dr7 value Take a u64 instead of an unsigned long in kvm_dr7_valid() to fix a build warning on i386 due to right-shifting a 32-bit value by 32 when checking for bits being set in dr7[63:32]. Alternatively, the warning could be resolved by rewriting the check to use an i386-friendly method, but taking a u64 fixes another oddity on 32-bit KVM. Beause KVM implements natural width VMCS fields as u64s to avoid layout issues between 32-bit and 64-bit, a devious guest can stuff vmcs12->guest_dr7 with a 64-bit value even when both the guest and host are 32-bit kernels. KVM eventually drops vmcs12->guest_dr7[63:32] when propagating vmcs12->guest_dr7 to vmcs02, but ideally KVM would not rely on that behavior for correctness. Cc: Jim Mattson Cc: Krish Sadhukhan Fixes: ecb697d10f70 ("KVM: nVMX: Check GUEST_DR7 on vmentry of nested guests") Reported-by: Randy Dunlap Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 8171cd68806bd2fc28ef688e32fb2a3b3deb04e5 Author: Paolo Bonzini Date: Wed Jan 22 14:36:09 2020 +0100 KVM: x86: use raw clock values consistently Commit 53fafdbb8b21f ("KVM: x86: switch KVMCLOCK base to monotonic raw clock") changed kvmclock to use tkr_raw instead of tkr_mono. However, the default kvmclock_offset for the VM was still based on the monotonic clock and, if the raw clock drifted enough from the monotonic clock, this could cause a negative system_time to be written to the guest's struct pvclock. RHEL5 does not like it and (if it boots fast enough to observe a negative time value) it hangs. There is another thing to be careful about: getboottime64 returns the host boot time with tkr_mono frequency, and subtracting the tkr_raw-based kvmclock value will cause the wallclock to be off if tkr_raw drifts from tkr_mono. To avoid this, compute the wallclock delta from the current time instead of being clever and using getboottime64. Fixes: 53fafdbb8b21f ("KVM: x86: switch KVMCLOCK base to monotonic raw clock") Cc: stable@vger.kernel.org Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 917f9475c0a8ab8958db7f22a5d495b9a1d51be6 Author: Paolo Bonzini Date: Wed Jan 22 14:32:20 2020 +0100 KVM: x86: reorganize pvclock_gtod_data members We will need a copy of tk->offs_boot in the next patch. Store it and cleanup the struct: instead of storing tk->tkr_xxx.base with the tk->offs_boot included, store the raw value in struct pvclock_clock and sum it in do_monotonic_raw and do_realtime. tk->tkr_xxx.xtime_nsec also moves to struct pvclock_clock. While at it, fix a (usually harmless) typo in do_monotonic_raw, which was using gtod->clock.shift instead of gtod->raw_clock.shift. Fixes: 53fafdbb8b21f ("KVM: x86: switch KVMCLOCK base to monotonic raw clock") Cc: stable@vger.kernel.org Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 33aabd029ffbafe314dad4763dadbc23d71296eb Author: Miaohe Lin Date: Thu Jan 23 10:08:20 2020 +0800 KVM: nVMX: delete meaningless nested_vmx_run() declaration The function nested_vmx_run() declaration is below its implementation. So this is meaningless and should be removed. Signed-off-by: Miaohe Lin Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit e8ef2a19a051b755b0b9973ef1b3f81e895e2bce Author: Paolo Bonzini Date: Wed Jan 22 17:02:36 2020 +0100 KVM: SVM: allow AVIC without split irqchip SVM is now able to disable AVIC dynamically whenever the in-kernel PIT sets up an ack notifier, so we can enable it even if in-kernel IOAPIC/PIC/PIT are in use. Signed-off-by: Paolo Bonzini commit f458d039db7e8518041db4169d657407e3217008 Author: Suravee Suthikulpanit Date: Thu Nov 14 14:15:19 2019 -0600 kvm: ioapic: Lazy update IOAPIC EOI In-kernel IOAPIC does not receive EOI with AMD SVM AVIC since the processor accelerate write to APIC EOI register and does not trap if the interrupt is edge-triggered. Workaround this by lazy check for pending APIC EOI at the time when setting new IOPIC irq, and update IOAPIC EOI if no pending APIC EOI. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini commit 1ec2405c7cbf3afa7598c6b7546c81aa0cac78dc Author: Suravee Suthikulpanit Date: Thu Nov 14 14:15:18 2019 -0600 kvm: ioapic: Refactor kvm_ioapic_update_eoi() Refactor code for handling IOAPIC EOI for subsequent patch. There is no functional change. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini commit e2ed4078a6ef3ddf4063329298852e24c36d46c8 Author: Suravee Suthikulpanit Date: Thu Nov 14 14:15:16 2019 -0600 kvm: i8254: Deactivate APICv when using in-kernel PIT re-injection mode. AMD SVM AVIC accelerates EOI write and does not trap. This causes in-kernel PIT re-injection mode to fail since it relies on irq-ack notifier mechanism. So, APICv is activated only when in-kernel PIT is in discard mode e.g. w/ qemu option: -global kvm-pit.lost_tick_policy=discard Also, introduce APICV_INHIBIT_REASON_PIT_REINJ bit to be used for this reason. Suggested-by: Paolo Bonzini Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini commit f3515dc3bef81e96bdb2ac93ef8fd20b1c2aaae5 Author: Suravee Suthikulpanit Date: Thu Nov 14 14:15:15 2019 -0600 svm: Temporarily deactivate AVIC during ExtINT handling AMD AVIC does not support ExtINT. Therefore, AVIC must be temporary deactivated and fall back to using legacy interrupt injection via vINTR and interrupt window. Also, introduce APICV_INHIBIT_REASON_IRQWIN to be used for this reason. Signed-off-by: Suravee Suthikulpanit [Rename svm_request_update_avic to svm_toggle_avic_for_extint. - Paolo] Signed-off-by: Paolo Bonzini commit 9a0bf05430699dc94b7ced940f6270c7cf1d77ef Author: Suravee Suthikulpanit Date: Thu Nov 14 14:15:14 2019 -0600 svm: Deactivate AVIC when launching guest with nested SVM support Since AVIC does not currently work w/ nested virtualization, deactivate AVIC for the guest if setting CPUID Fn80000001_ECX[SVM] (i.e. indicate support for SVM, which is needed for nested virtualization). Also, introduce a new APICV_INHIBIT_REASON_NESTED bit to be used for this reason. Suggested-by: Alexander Graf Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini commit f4fdc0a2edf48f16f7b10cceaf4781fc56ab7fd9 Author: Suravee Suthikulpanit Date: Thu Nov 14 14:15:13 2019 -0600 kvm: x86: hyperv: Use APICv update request interface Since disabling APICv has to be done for all vcpus on AMD-based system, adopt the newly introduced kvm_request_apicv_update() interface, and introduce a new APICV_INHIBIT_REASON_HYPERV. Also, remove the kvm_vcpu_deactivate_apicv() since no longer used. Cc: Roman Kagan Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini commit 6c3e4422dd201c107948adc1b7615610d7381bcb Author: Suravee Suthikulpanit Date: Thu Nov 14 14:15:12 2019 -0600 svm: Add support for dynamic APICv Add necessary logics to support (de)activate AVIC at runtime. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini commit 2de9d0ccd0fea32fc6a684f3f22496967ed608bc Author: Suravee Suthikulpanit Date: Thu Nov 14 14:15:11 2019 -0600 kvm: x86: Introduce x86 ops hook for pre-update APICv AMD SVM AVIC needs to update APIC backing page mapping before changing APICv mode. Introduce struct kvm_x86_ops.pre_update_apicv_exec_ctrl function hook to be called prior KVM APICv update request to each vcpu. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini commit ef8efd7a15bb7147a4ffb09758a6bd25d744a14e Author: Suravee Suthikulpanit Date: Thu Nov 14 14:15:10 2019 -0600 kvm: x86: Introduce APICv x86 ops for checking APIC inhibit reasons Inibit reason bits are used to determine if APICv deactivation is applicable for a particular hardware virtualization architecture. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini commit dcbcfa287e964931f7051ff00ed33dbf33d39abd Author: Suravee Suthikulpanit Date: Thu Nov 14 14:15:09 2019 -0600 KVM: svm: avic: Add support for dynamic setup/teardown of virtual APIC backing page Re-factor avic_init_access_page() to avic_update_access_page() since activate/deactivate AVIC requires setting/unsetting the memory region used for virtual APIC backing page (APIC_ACCESS_PAGE_PRIVATE_MEMSLOT). Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini commit 8937d762396d22bdb59f02732a66db6b58e746b1 Author: Suravee Suthikulpanit Date: Thu Nov 14 14:15:08 2019 -0600 kvm: x86: svm: Add support to (de)activate posted interrupts Introduce interface for (de)activate posted interrupts, and implement SVM hooks to toggle AMD IOMMU guest virtual APIC mode. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini commit 24bbf74c0c36bfbaa276c9921b55b844018b241e Author: Suravee Suthikulpanit Date: Thu Nov 14 14:15:07 2019 -0600 kvm: x86: Add APICv (de)activate request trace points Add trace points when sending request to (de)activate APICv. Suggested-by: Alexander Graf Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini commit 8df14af42f00a434c492c9964a8095bf59831a45 Author: Suravee Suthikulpanit Date: Thu Nov 14 14:15:06 2019 -0600 kvm: x86: Add support for dynamic APICv activation Certain runtime conditions require APICv to be temporary deactivated during runtime. The current implementation only support run-time deactivation of APICv when Hyper-V SynIC is enabled, which is not temporary. In addition, for AMD, when APICv is (de)activated at runtime, all vcpus in the VM have to operate in the same mode. Thus the requesting vcpu must notify the others. So, introduce the following: * A new KVM_REQ_APICV_UPDATE request bit * Interfaces to request all vcpus to update APICv status * A new interface to update APICV-related parameters for each vcpu Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini commit 7e3e67a98701cbcb4378b4f69b28a43351ca27c2 Author: Paolo Bonzini Date: Wed Jan 22 16:54:37 2020 +0100 KVM: x86: remove get_enable_apicv from kvm_x86_ops It is unused now. Signed-off-by: Paolo Bonzini commit 4e19c36f2df8f84da22c7287de86729aaf3e352b Author: Suravee Suthikulpanit Date: Thu Nov 14 14:15:05 2019 -0600 kvm: x86: Introduce APICv inhibit reason bits There are several reasons in which a VM needs to deactivate APICv e.g. disable APICv via parameter during module loading, or when enable Hyper-V SynIC support. Additional inhibit reasons will be introduced later on when dynamic APICv is supported, Introduce KVM APICv inhibit reason bits along with a new variable, apicv_inhibit_reasons, to help keep track of APICv state for each VM, Initially, the APICV_INHIBIT_REASON_DISABLE bit is used to indicate the case where APICv is disabled during KVM module load. (e.g. insmod kvm_amd avic=0 or insmod kvm_intel enable_apicv=0). Signed-off-by: Suravee Suthikulpanit [Do not use get_enable_apicv; consider irqchip_split in svm.c. - Paolo] Signed-off-by: Paolo Bonzini commit b26a695a1d78cc415fe26d74d0463f5d887980de Author: Suravee Suthikulpanit Date: Thu Nov 14 14:15:04 2019 -0600 kvm: lapic: Introduce APICv update helper function Re-factor code into a helper function for setting lapic parameters when activate/deactivate APICv, and export the function for subsequent usage. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini commit 83576e32a71717d1912b7dcb247a0f15613272da Merge: 38f88c454042 f822e9c4ffa5 Author: David S. Miller Date: Wed Feb 5 14:46:04 2020 +0100 Merge branch 'macb-TSO-bug-fixes' Harini Katakam says: ==================== macb: TSO bug fixes An IP errata was recently discovered when testing TSO enabled versions with perf test tools where a false amba error is reported by the IP. Some ways to reproduce would be to use iperf or applications with payload descriptor sizes very close to 16K. Once the error is observed TXERR (or bit 6 of ISR) will be constantly triggered leading to a series of tx path error handling and clean up. Workaround the same by limiting this size to 0x3FC0 as recommended by Cadence. There was no performance impact on 1G system that I tested with. Note on patch 1: The alignment code may be unused but leaving it there in case anyone is using UFO. Added Fixes tag to patch 1. ==================== Signed-off-by: David S. Miller commit f822e9c4ffa511a5c681cf866287d9383a3b6f1b Author: Harini Katakam Date: Wed Feb 5 18:08:12 2020 +0530 net: macb: Limit maximum GEM TX length in TSO GEM_MAX_TX_LEN currently resolves to 0x3FF8 for any IP version supporting TSO with full 14bits of length field in payload descriptor. But an IP errata causes false amba_error (bit 6 of ISR) when length in payload descriptors is specified above 16387. The error occurs because the DMA falsely concludes that there is not enough space in SRAM for incoming payload. These errors were observed continuously under stress of large packets using iperf on a version where SRAM was 16K for each queue. This errata will be documented shortly and affects all versions since TSO functionality was added. Hence limit the max length to 0x3FC0 (rounded). Signed-off-by: Harini Katakam Signed-off-by: David S. Miller commit 41c1ef978c8d0259c6636e6d2d854777e92650eb Author: Harini Katakam Date: Wed Feb 5 18:08:11 2020 +0530 net: macb: Remove unnecessary alignment check for TSO The IP TSO implementation does NOT require the length to be a multiple of 8. That is only a requirement for UFO as per IP documentation. Hence, exit macb_features_check function in the beginning if the protocol is not UDP. Only when it is UDP, proceed further to the alignment checks. Update comments to reflect the same. Also remove dead code checking for protocol TCP when calculating header length. Fixes: 1629dd4f763c ("cadence: Add LSO support.") Signed-off-by: Harini Katakam Signed-off-by: David S. Miller commit 38f88c45404293bbc027b956def6c10cbd45c616 Author: Eric Dumazet Date: Tue Feb 4 19:26:05 2020 -0800 bonding/alb: properly access headers in bond_alb_xmit() syzbot managed to send an IPX packet through bond_alb_xmit() and af_packet and triggered a use-after-free. First, bond_alb_xmit() was using ipx_hdr() helper to reach the IPX header, but ipx_hdr() was using the transport offset instead of the network offset. In the particular syzbot report transport offset was 0xFFFF This patch removes ipx_hdr() since it was only (mis)used from bonding. Then we need to make sure IPv4/IPv6/IPX headers are pulled in skb->head before dereferencing anything. BUG: KASAN: use-after-free in bond_alb_xmit+0x153a/0x1590 drivers/net/bonding/bond_alb.c:1452 Read of size 2 at addr ffff8801ce56dfff by task syz-executor.2/18108 (if (ipx_hdr(skb)->ipx_checksum != IPX_NO_CHECKSUM) ...) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: [] __dump_stack lib/dump_stack.c:17 [inline] [] dump_stack+0x14d/0x20b lib/dump_stack.c:53 [] print_address_description+0x6f/0x20b mm/kasan/report.c:282 [] kasan_report_error mm/kasan/report.c:380 [inline] [] kasan_report mm/kasan/report.c:438 [inline] [] kasan_report.cold+0x8c/0x2a0 mm/kasan/report.c:422 [] __asan_report_load_n_noabort+0xf/0x20 mm/kasan/report.c:469 [] bond_alb_xmit+0x153a/0x1590 drivers/net/bonding/bond_alb.c:1452 [] __bond_start_xmit drivers/net/bonding/bond_main.c:4199 [inline] [] bond_start_xmit+0x4f4/0x1570 drivers/net/bonding/bond_main.c:4224 [] __netdev_start_xmit include/linux/netdevice.h:4525 [inline] [] netdev_start_xmit include/linux/netdevice.h:4539 [inline] [] xmit_one net/core/dev.c:3611 [inline] [] dev_hard_start_xmit+0x168/0x910 net/core/dev.c:3627 [] __dev_queue_xmit+0x1f55/0x33b0 net/core/dev.c:4238 [] dev_queue_xmit+0x18/0x20 net/core/dev.c:4278 [] packet_snd net/packet/af_packet.c:3226 [inline] [] packet_sendmsg+0x4919/0x70b0 net/packet/af_packet.c:3252 [] sock_sendmsg_nosec net/socket.c:673 [inline] [] sock_sendmsg+0x12c/0x160 net/socket.c:684 [] __sys_sendto+0x262/0x380 net/socket.c:1996 [] SYSC_sendto net/socket.c:2008 [inline] [] SyS_sendto+0x40/0x60 net/socket.c:2004 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Jay Vosburgh Cc: Veaceslav Falico Cc: Andy Gospodarek Signed-off-by: David S. Miller commit d5b90e99e1d51b7b5d2b74fbc4c2db236a510913 Author: Jacob Keller Date: Tue Feb 4 15:59:50 2020 -0800 devlink: report 0 after hitting end in region read commit fdd41ec21e15 ("devlink: Return right error code in case of errors for region read") modified the region read code to report errors properly in unexpected cases. In the case where the start_offset and ret_offset match, it unilaterally converted this into an error. This causes an issue for the "dump" version of the command. In this case, the devlink region dump will always report an invalid argument: 000000000000ffd0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 000000000000ffe0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff devlink answers: Invalid argument 000000000000fff0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff This occurs because the expected flow for the dump is to return 0 after there is no further data. The simplest fix would be to stop converting the error code to -EINVAL if start_offset == ret_offset. However, avoid unnecessary work by checking for when start_offset is larger than the region size and returning 0 upfront. Fixes: fdd41ec21e15 ("devlink: Return right error code in case of errors for region read") Signed-off-by: Jacob Keller Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 33e2b32b5df2b544ac5d43c4de2194bcc822b1b5 Author: Moritz Fischer Date: Tue Feb 4 15:01:18 2020 -0800 net: ethernet: dec: tulip: Fix length mask in receive length calculation The receive frame length calculation uses a wrong mask to calculate the length of the received frames. Per spec table 4-1 the length is contained in the FL (Frame Length) field in bits 30:16. This didn't show up as an issue so far since frames were limited to 1500 bytes which falls within the 11 bit window. Signed-off-by: Moritz Fischer Signed-off-by: David S. Miller commit 7bb77d4b8567b35aadd57f3154a08d873572ae20 Merge: 52b5ae501c04 88f404a9b1d7 Author: David S. Miller Date: Wed Feb 5 14:14:19 2020 +0100 Merge branch 'wg-fixes' Jason A. Donenfeld says: ==================== wireguard fixes for 5.6-rc1 Here are fixes for WireGuard before 5.6-rc1 is tagged. It includes: 1) A fix for a UaF (caused by kmalloc failing during a very small allocation) that syzkaller found, from Eric Dumazet. 2) A fix for a deadlock that syzkaller found, along with an additional selftest to ensure that the bug fix remains correct, from me. 3) Two little fixes/cleanups to the selftests from Krzysztof Kozlowski and me. ==================== Signed-off-by: David S. Miller commit 88f404a9b1d75388225b1c67b6dd327cb2182777 Author: Jason A. Donenfeld Date: Tue Feb 4 22:17:29 2020 +0100 wireguard: selftests: tie socket waiting to target pid Without this, we wind up proceeding too early sometimes when the previous process has just used the same listening port. So, we tie the listening socket query to the specific pid we're interested in. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 4a2ef721e60f0d2babeb29dbcfe05904b53ea19e Author: Krzysztof Kozlowski Date: Tue Feb 4 22:17:28 2020 +0100 wireguard: selftests: cleanup CONFIG_ENABLE_WARN_DEPRECATED CONFIG_ENABLE_WARN_DEPRECATED is gone since commit 771c035372a0 ("deprecate the '__deprecated' attribute warnings entirely and for good"). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit f9398acba6a4ae9cb98bfe4d56414d376eff8d57 Author: Jason A. Donenfeld Date: Tue Feb 4 22:17:27 2020 +0100 wireguard: selftests: ensure non-addition of peers with failed precomputation Ensure that peers with low order points are ignored, both in the case where we already have a device private key and in the case where we do not. This adds points that naturally give a zero output. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit ec31c2676a10e064878927b243fada8c2fb0c03c Author: Jason A. Donenfeld Date: Tue Feb 4 22:17:26 2020 +0100 wireguard: noise: reject peers with low order public keys Our static-static calculation returns a failure if the public key is of low order. We check for this when peers are added, and don't allow them to be added if they're low order, except in the case where we haven't yet been given a private key. In that case, we would defer the removal of the peer until we're given a private key, since at that point we're doing new static-static calculations which incur failures we can act on. This meant, however, that we wound up removing peers rather late in the configuration flow. Syzkaller points out that peer_remove calls flush_workqueue, which in turn might then wait for sending a handshake initiation to complete. Since handshake initiation needs the static identity lock, holding the static identity lock while calling peer_remove can result in a rare deadlock. We have precisely this case in this situation of late-stage peer removal based on an invalid public key. We can't drop the lock when removing, because then incoming handshakes might interact with a bogus static-static calculation. While the band-aid patch for this would involve breaking up the peer removal into two steps like wg_peer_remove_all does, in order to solve the locking issue, there's actually a much more elegant way of fixing this: If the static-static calculation succeeds with one private key, it *must* succeed with all others, because all 32-byte strings map to valid private keys, thanks to clamping. That means we can get rid of this silly dance and locking headaches of removing peers late in the configuration flow, and instead just reject them early on, regardless of whether the device has yet been assigned a private key. For the case where the device doesn't yet have a private key, we safely use zeros just for the purposes of checking for low order points by way of checking the output of the calculation. The following PoC will trigger the deadlock: ip link add wg0 type wireguard ip addr add 10.0.0.1/24 dev wg0 ip link set wg0 up ping -f 10.0.0.2 & while true; do wg set wg0 private-key /dev/null peer AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= allowed-ips 10.0.0.0/24 endpoint 10.0.0.3:1234 wg set wg0 private-key <(echo AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=) done [ 0.949105] ====================================================== [ 0.949550] WARNING: possible circular locking dependency detected [ 0.950143] 5.5.0-debug+ #18 Not tainted [ 0.950431] ------------------------------------------------------ [ 0.950959] wg/89 is trying to acquire lock: [ 0.951252] ffff8880333e2128 ((wq_completion)wg-kex-wg0){+.+.}, at: flush_workqueue+0xe3/0x12f0 [ 0.951865] [ 0.951865] but task is already holding lock: [ 0.952280] ffff888032819bc0 (&wg->static_identity.lock){++++}, at: wg_set_device+0x95d/0xcc0 [ 0.953011] [ 0.953011] which lock already depends on the new lock. [ 0.953011] [ 0.953651] [ 0.953651] the existing dependency chain (in reverse order) is: [ 0.954292] [ 0.954292] -> #2 (&wg->static_identity.lock){++++}: [ 0.954804] lock_acquire+0x127/0x350 [ 0.955133] down_read+0x83/0x410 [ 0.955428] wg_noise_handshake_create_initiation+0x97/0x700 [ 0.955885] wg_packet_send_handshake_initiation+0x13a/0x280 [ 0.956401] wg_packet_handshake_send_worker+0x10/0x20 [ 0.956841] process_one_work+0x806/0x1500 [ 0.957167] worker_thread+0x8c/0xcb0 [ 0.957549] kthread+0x2ee/0x3b0 [ 0.957792] ret_from_fork+0x24/0x30 [ 0.958234] [ 0.958234] -> #1 ((work_completion)(&peer->transmit_handshake_work)){+.+.}: [ 0.958808] lock_acquire+0x127/0x350 [ 0.959075] process_one_work+0x7ab/0x1500 [ 0.959369] worker_thread+0x8c/0xcb0 [ 0.959639] kthread+0x2ee/0x3b0 [ 0.959896] ret_from_fork+0x24/0x30 [ 0.960346] [ 0.960346] -> #0 ((wq_completion)wg-kex-wg0){+.+.}: [ 0.960945] check_prev_add+0x167/0x1e20 [ 0.961351] __lock_acquire+0x2012/0x3170 [ 0.961725] lock_acquire+0x127/0x350 [ 0.961990] flush_workqueue+0x106/0x12f0 [ 0.962280] peer_remove_after_dead+0x160/0x220 [ 0.962600] wg_set_device+0xa24/0xcc0 [ 0.962994] genl_rcv_msg+0x52f/0xe90 [ 0.963298] netlink_rcv_skb+0x111/0x320 [ 0.963618] genl_rcv+0x1f/0x30 [ 0.963853] netlink_unicast+0x3f6/0x610 [ 0.964245] netlink_sendmsg+0x700/0xb80 [ 0.964586] __sys_sendto+0x1dd/0x2c0 [ 0.964854] __x64_sys_sendto+0xd8/0x1b0 [ 0.965141] do_syscall_64+0x90/0xd9a [ 0.965408] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 0.965769] [ 0.965769] other info that might help us debug this: [ 0.965769] [ 0.966337] Chain exists of: [ 0.966337] (wq_completion)wg-kex-wg0 --> (work_completion)(&peer->transmit_handshake_work) --> &wg->static_identity.lock [ 0.966337] [ 0.967417] Possible unsafe locking scenario: [ 0.967417] [ 0.967836] CPU0 CPU1 [ 0.968155] ---- ---- [ 0.968497] lock(&wg->static_identity.lock); [ 0.968779] lock((work_completion)(&peer->transmit_handshake_work)); [ 0.969345] lock(&wg->static_identity.lock); [ 0.969809] lock((wq_completion)wg-kex-wg0); [ 0.970146] [ 0.970146] *** DEADLOCK *** [ 0.970146] [ 0.970531] 5 locks held by wg/89: [ 0.970908] #0: ffffffff827433c8 (cb_lock){++++}, at: genl_rcv+0x10/0x30 [ 0.971400] #1: ffffffff82743480 (genl_mutex){+.+.}, at: genl_rcv_msg+0x642/0xe90 [ 0.971924] #2: ffffffff827160c0 (rtnl_mutex){+.+.}, at: wg_set_device+0x9f/0xcc0 [ 0.972488] #3: ffff888032819de0 (&wg->device_update_lock){+.+.}, at: wg_set_device+0xb0/0xcc0 [ 0.973095] #4: ffff888032819bc0 (&wg->static_identity.lock){++++}, at: wg_set_device+0x95d/0xcc0 [ 0.973653] [ 0.973653] stack backtrace: [ 0.973932] CPU: 1 PID: 89 Comm: wg Not tainted 5.5.0-debug+ #18 [ 0.974476] Call Trace: [ 0.974638] dump_stack+0x97/0xe0 [ 0.974869] check_noncircular+0x312/0x3e0 [ 0.975132] ? print_circular_bug+0x1f0/0x1f0 [ 0.975410] ? __kernel_text_address+0x9/0x30 [ 0.975727] ? unwind_get_return_address+0x51/0x90 [ 0.976024] check_prev_add+0x167/0x1e20 [ 0.976367] ? graph_lock+0x70/0x160 [ 0.976682] __lock_acquire+0x2012/0x3170 [ 0.976998] ? register_lock_class+0x1140/0x1140 [ 0.977323] lock_acquire+0x127/0x350 [ 0.977627] ? flush_workqueue+0xe3/0x12f0 [ 0.977890] flush_workqueue+0x106/0x12f0 [ 0.978147] ? flush_workqueue+0xe3/0x12f0 [ 0.978410] ? find_held_lock+0x2c/0x110 [ 0.978662] ? lock_downgrade+0x6e0/0x6e0 [ 0.978919] ? queue_rcu_work+0x60/0x60 [ 0.979166] ? netif_napi_del+0x151/0x3b0 [ 0.979501] ? peer_remove_after_dead+0x160/0x220 [ 0.979871] peer_remove_after_dead+0x160/0x220 [ 0.980232] wg_set_device+0xa24/0xcc0 [ 0.980516] ? deref_stack_reg+0x8e/0xc0 [ 0.980801] ? set_peer+0xe10/0xe10 [ 0.981040] ? __ww_mutex_check_waiters+0x150/0x150 [ 0.981430] ? __nla_validate_parse+0x163/0x270 [ 0.981719] ? genl_family_rcv_msg_attrs_parse+0x13f/0x310 [ 0.982078] genl_rcv_msg+0x52f/0xe90 [ 0.982348] ? genl_family_rcv_msg_attrs_parse+0x310/0x310 [ 0.982690] ? register_lock_class+0x1140/0x1140 [ 0.983049] netlink_rcv_skb+0x111/0x320 [ 0.983298] ? genl_family_rcv_msg_attrs_parse+0x310/0x310 [ 0.983645] ? netlink_ack+0x880/0x880 [ 0.983888] genl_rcv+0x1f/0x30 [ 0.984168] netlink_unicast+0x3f6/0x610 [ 0.984443] ? netlink_detachskb+0x60/0x60 [ 0.984729] ? find_held_lock+0x2c/0x110 [ 0.984976] netlink_sendmsg+0x700/0xb80 [ 0.985220] ? netlink_broadcast_filtered+0xa60/0xa60 [ 0.985533] __sys_sendto+0x1dd/0x2c0 [ 0.985763] ? __x64_sys_getpeername+0xb0/0xb0 [ 0.986039] ? sockfd_lookup_light+0x17/0x160 [ 0.986397] ? __sys_recvmsg+0x8c/0xf0 [ 0.986711] ? __sys_recvmsg_sock+0xd0/0xd0 [ 0.987018] __x64_sys_sendto+0xd8/0x1b0 [ 0.987283] ? lockdep_hardirqs_on+0x39b/0x5a0 [ 0.987666] do_syscall_64+0x90/0xd9a [ 0.987903] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 0.988223] RIP: 0033:0x7fe77c12003e [ 0.988508] Code: c3 8b 07 85 c0 75 24 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 4 [ 0.989666] RSP: 002b:00007fffada2ed58 EFLAGS: 00000246 ORIG_RAX: 000000000000002c [ 0.990137] RAX: ffffffffffffffda RBX: 00007fe77c159d48 RCX: 00007fe77c12003e [ 0.990583] RDX: 0000000000000040 RSI: 000055fd1d38e020 RDI: 0000000000000004 [ 0.991091] RBP: 000055fd1d38e020 R08: 000055fd1cb63358 R09: 000000000000000c [ 0.991568] R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000002c [ 0.992014] R13: 0000000000000004 R14: 000055fd1d38e020 R15: 0000000000000001 Signed-off-by: Jason A. Donenfeld Reported-by: syzbot Signed-off-by: David S. Miller commit 9981159fc3b677b357f84e069a11de5a5ec8a2a8 Author: Eric Dumazet Date: Tue Feb 4 22:17:25 2020 +0100 wireguard: allowedips: fix use-after-free in root_remove_peer_lists In the unlikely case a new node could not be allocated, we need to remove @newnode from @peer->allowedips_list before freeing it. syzbot reported: BUG: KASAN: use-after-free in __list_del_entry_valid+0xdc/0xf5 lib/list_debug.c:54 Read of size 8 at addr ffff88809881a538 by task syz-executor.4/30133 CPU: 0 PID: 30133 Comm: syz-executor.4 Not tainted 5.5.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x32 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135 __list_del_entry_valid+0xdc/0xf5 lib/list_debug.c:54 __list_del_entry include/linux/list.h:132 [inline] list_del include/linux/list.h:146 [inline] root_remove_peer_lists+0x24f/0x4b0 drivers/net/wireguard/allowedips.c:65 wg_allowedips_free+0x232/0x390 drivers/net/wireguard/allowedips.c:300 wg_peer_remove_all+0xd5/0x620 drivers/net/wireguard/peer.c:187 wg_set_device+0xd01/0x1350 drivers/net/wireguard/netlink.c:542 genl_family_rcv_msg_doit net/netlink/genetlink.c:672 [inline] genl_family_rcv_msg net/netlink/genetlink.c:717 [inline] genl_rcv_msg+0x67d/0xea0 net/netlink/genetlink.c:734 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 genl_rcv+0x29/0x40 net/netlink/genetlink.c:745 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x59e/0x7e0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 ____sys_sendmsg+0x753/0x880 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmsg+0x105/0x1d0 net/socket.c:2430 __do_sys_sendmsg net/socket.c:2439 [inline] __se_sys_sendmsg net/socket.c:2437 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2437 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45b399 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f99a9bcdc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f99a9bce6d4 RCX: 000000000045b399 RDX: 0000000000000000 RSI: 0000000020001340 RDI: 0000000000000003 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 R13: 00000000000009ba R14: 00000000004cb2b8 R15: 0000000000000009 Allocated by task 30103: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:486 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:527 kmem_cache_alloc_trace+0x158/0x790 mm/slab.c:3551 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:670 [inline] add+0x70a/0x1970 drivers/net/wireguard/allowedips.c:236 wg_allowedips_insert_v4+0xf6/0x160 drivers/net/wireguard/allowedips.c:320 set_allowedip drivers/net/wireguard/netlink.c:343 [inline] set_peer+0xfb9/0x1150 drivers/net/wireguard/netlink.c:468 wg_set_device+0xbd4/0x1350 drivers/net/wireguard/netlink.c:591 genl_family_rcv_msg_doit net/netlink/genetlink.c:672 [inline] genl_family_rcv_msg net/netlink/genetlink.c:717 [inline] genl_rcv_msg+0x67d/0xea0 net/netlink/genetlink.c:734 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 genl_rcv+0x29/0x40 net/netlink/genetlink.c:745 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x59e/0x7e0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 ____sys_sendmsg+0x753/0x880 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmsg+0x105/0x1d0 net/socket.c:2430 __do_sys_sendmsg net/socket.c:2439 [inline] __se_sys_sendmsg net/socket.c:2437 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2437 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 30103: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:474 kasan_slab_free+0xe/0x10 mm/kasan/common.c:483 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 add+0x12d2/0x1970 drivers/net/wireguard/allowedips.c:266 wg_allowedips_insert_v4+0xf6/0x160 drivers/net/wireguard/allowedips.c:320 set_allowedip drivers/net/wireguard/netlink.c:343 [inline] set_peer+0xfb9/0x1150 drivers/net/wireguard/netlink.c:468 wg_set_device+0xbd4/0x1350 drivers/net/wireguard/netlink.c:591 genl_family_rcv_msg_doit net/netlink/genetlink.c:672 [inline] genl_family_rcv_msg net/netlink/genetlink.c:717 [inline] genl_rcv_msg+0x67d/0xea0 net/netlink/genetlink.c:734 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 genl_rcv+0x29/0x40 net/netlink/genetlink.c:745 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x59e/0x7e0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 ____sys_sendmsg+0x753/0x880 net/socket.c:2343 ___sys_sendmsg+0x100/0x170 net/socket.c:2397 __sys_sendmsg+0x105/0x1d0 net/socket.c:2430 __do_sys_sendmsg net/socket.c:2439 [inline] __se_sys_sendmsg net/socket.c:2437 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2437 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88809881a500 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 56 bytes inside of 64-byte region [ffff88809881a500, ffff88809881a540) The buggy address belongs to the page: page:ffffea0002620680 refcount:1 mapcount:0 mapping:ffff8880aa400380 index:0x0 raw: 00fffe0000000200 ffffea000250b748 ffffea000254bac8 ffff8880aa400380 raw: 0000000000000000 ffff88809881a000 0000000100000020 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809881a400: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88809881a480: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc >ffff88809881a500: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88809881a580: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88809881a600: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Jason A. Donenfeld Cc: wireguard@lists.zx2c4.com Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 52b5ae501c045010aeeb1d5ac0373ff161a88291 Author: Cong Wang Date: Tue Feb 4 11:10:12 2020 -0800 net_sched: fix a resource leak in tcindex_set_parms() Jakub noticed there is a potential resource leak in tcindex_set_parms(): when tcindex_filter_result_init() fails and it jumps to 'errout1' which doesn't release the memory and resources allocated by tcindex_alloc_perfect_hash(). We should just jump to 'errout_alloc' which calls tcindex_free_perfect_hash(). Fixes: b9a24bb76bf6 ("net_sched: properly handle failure case of tcf_exts_init()") Reported-by: Jakub Kicinski Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 2c22c06ce426a0d025a3dacd17cd8868f3dbe96b Author: Florian Westphal Date: Tue Feb 4 18:12:30 2020 +0100 mptcp: fix use-after-free on tcp fallback When an mptcp socket connects to a tcp peer or when a middlebox interferes with tcp options, mptcp needs to fall back to plain tcp. Problem is that mptcp is trying to be too clever in this case: It attempts to close the mptcp meta sk and transparently replace it with the (only) subflow tcp sk. Unfortunately, this is racy -- the socket is already exposed to userspace. Any parallel calls to send/recv/setsockopt etc. can cause use-after-free: BUG: KASAN: use-after-free in atomic_try_cmpxchg include/asm-generic/atomic-instrumented.h:693 [inline] CPU: 1 PID: 2083 Comm: syz-executor.1 Not tainted 5.5.0 #2 atomic_try_cmpxchg include/asm-generic/atomic-instrumented.h:693 [inline] queued_spin_lock include/asm-generic/qspinlock.h:78 [inline] do_raw_spin_lock include/linux/spinlock.h:181 [inline] __raw_spin_lock_bh include/linux/spinlock_api_smp.h:136 [inline] _raw_spin_lock_bh+0x71/0xd0 kernel/locking/spinlock.c:175 spin_lock_bh include/linux/spinlock.h:343 [inline] __lock_sock+0x105/0x190 net/core/sock.c:2414 lock_sock_nested+0x10f/0x140 net/core/sock.c:2938 lock_sock include/net/sock.h:1516 [inline] mptcp_setsockopt+0x2f/0x1f0 net/mptcp/protocol.c:800 __sys_setsockopt+0x152/0x240 net/socket.c:2130 __do_sys_setsockopt net/socket.c:2146 [inline] __se_sys_setsockopt net/socket.c:2143 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2143 do_syscall_64+0xb7/0x3d0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x44/0xa9 While the use-after-free can be resolved, there is another problem: sock->ops and sock->sk assignments are not atomic, i.e. we may get calls into mptcp functions with sock->sk already pointing at the subflow socket, or calls into tcp functions with a mptcp meta sk. Remove the fallback code and call the relevant functions for the (only) subflow in case the mptcp socket is connected to tcp peer. Reported-by: Christoph Paasch Diagnosed-by: Paolo Abeni Signed-off-by: Florian Westphal Reviewed-by: Mat Martineau Tested-by: Christoph Paasch Signed-off-by: David S. Miller commit 8b7a07c7d4420c7d684f661697c6a878040c8b65 Author: Andy Shevchenko Date: Wed Feb 5 11:29:03 2020 +0200 net: dsa: microchip: Platform data shan't include kernel.h Replace with appropriate types.h. Signed-off-by: Andy Shevchenko Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit e22e0790595dad409d610651f4eb17742607e35d Author: Andy Shevchenko Date: Wed Feb 5 11:29:02 2020 +0200 net: dsa: b53: Platform data shan't include kernel.h Replace with appropriate types.h. Signed-off-by: Andy Shevchenko Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 34611e6996f331399ee26382fdbc2bd009f9cdd6 Author: kbuild test robot Date: Tue Feb 4 22:22:02 2020 +0800 netdevsim: fix ptr_ret.cocci warnings drivers/net/netdevsim/dev.c:937:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Fixes: 6556ff32f12d ("netdevsim: use IS_ERR instead of IS_ERR_OR_NULL for debugfs") CC: Taehee Yoo Signed-off-by: kbuild test robot Signed-off-by: David S. Miller commit 9784e619f0a0ada7421ffd777872a199cdcb73cd Author: Thomas Bogendoerfer Date: Tue Feb 4 14:58:20 2020 +0100 net: sgi: ioc3-eth: Remove leftover free_irq() Commit 0ce5ebd24d25 ("mfd: ioc3: Add driver for SGI IOC3 chip") moved request_irq() from ioc3_open into probe function, but forgot to remove free_irq() from ioc3_close. Fixes: 0ce5ebd24d25 ("mfd: ioc3: Add driver for SGI IOC3 chip") Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit b0dd940e582b6a60296b9847a54012a4b080dc72 Author: Ronnie Sahlberg Date: Wed Feb 5 11:08:01 2020 +1000 cifs: fail i/o on soft mounts if sessionsetup errors out RHBZ: 1579050 If we have a soft mount we should fail commands for session-setup failures (such as the password having changed/ account being deleted/ ...) and return an error back to the application. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French CC: Stable commit 87f93d82e0952da18af4d978e7d887b4c5326c0b Author: Steve French Date: Tue Feb 4 13:02:59 2020 -0600 smb3: fix problem with null cifs super block with previous patch Add check for null cifs_sb to create_options helper Signed-off-by: Steve French Reviewed-by: Amir Goldstein Reviewed-by: Aurelien Aptel commit 9db028827315550ea7e65898eebaf15d2456d830 Merge: c7e661a1c2ae 42b716359bec Author: Takashi Iwai Date: Wed Feb 5 12:33:45 2020 +0100 Merge tag 'asoc-v5.6-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.6 A collection of updates for bugs fixed since the initial pull request, the most important one being the addition of COMMON_CLK for wcd934x which is needed for MFD to be merged. commit 13426feaf46c48fcddb591e89d35120fcc90527f Author: Geert Uytterhoeven Date: Tue Feb 4 14:18:57 2020 +0100 ASoC: wcd934x: Add missing COMMON_CLK dependency to SND_SOC_ALL_CODECS Just adding a dependency on COMMON_CLK to SND_SOC_WCD934X is not sufficient, as enabling SND_SOC_ALL_CODECS will still select it, breaking the build later: WARNING: unmet direct dependencies detected for SND_SOC_WCD934X Depends on [n]: SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && COMMON_CLK [=n] && MFD_WCD934X [=m] Selected by [m]: - SND_SOC_ALL_CODECS [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && COMPILE_TEST [=y] && MFD_WCD934X [=m] ... ERROR: "of_clk_add_provider" [sound/soc/codecs/snd-soc-wcd934x.ko] undefined! ERROR: "of_clk_src_simple_get" [sound/soc/codecs/snd-soc-wcd934x.ko] undefined! ERROR: "clk_hw_register" [sound/soc/codecs/snd-soc-wcd934x.ko] undefined! ERROR: "__clk_get_name" [sound/soc/codecs/snd-soc-wcd934x.ko] undefined! Fix this by adding the missing dependency to SND_SOC_ALL_CODECS Fixes: 42b716359beca106 ("ASoC: wcd934x: Add missing COMMON_CLK dependency") Signed-off-by: Geert Uytterhoeven Tested-by: Stephen Rothwell Link: https://lore.kernel.org/r/20200204131857.7634-1-geert@linux-m68k.org Signed-off-by: Mark Brown commit 7495e0926fdf302cb9e62a49f7c22198815624cd Author: Steven Rostedt (VMware) Date: Tue Feb 4 07:33:53 2020 -0500 bootconfig: Only load bootconfig if "bootconfig" is on the kernel cmdline As the bootconfig is appended to the initrd it is not as easy to modify as the kernel command line. If there's some issue with the kernel, and the developer wants to boot a pristine kernel, it should not be needed to modify the initrd to remove the bootconfig for a single boot. As bootconfig is silently added (if the admin does not know where to look they may not know it's being loaded). It should be explicitly added to the kernel cmdline. The loading of the bootconfig is only done if "bootconfig" is on the kernel command line. This will let admins know that the kernel command line is extended. Note, after adding printk()s for when the size is too great or the checksum is wrong, exposed that the current method always looked for the boot config, and if this size and checksum matched, it would parse it (as if either is wrong a printk has been added to show this). It's better to only check this if the boot config is asked to be looked for. Link: https://lore.kernel.org/r/CAHk-=wjfjO+h6bQzrTf=YCZA53Y3EDyAs3Z4gEsT7icA3u_Psw@mail.gmail.com Acked-by: Masami Hiramatsu Suggested-by: Linus Torvalds Signed-off-by: Steven Rostedt (VMware) commit 04dbd86539fd2f0a65fdd5a0416b7f6606f95e16 Author: Rob Herring Date: Fri Jan 31 09:27:12 2020 -0600 dt-bindings: Fix paths in schema $id fields The $id path checks were inadequately checking the path part of the $id value. With the check fixed, there's a number of errors that need to be fixed. Most of the errors are including 'bindings/' in the path which should not be as that is considered the root. Cc: Andy Gross Cc: Bjorn Andersson Cc: Manivannan Sadhasivam Cc: Michael Turquette Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: "Nuno Sá" Cc: Jean Delvare Cc: Stefan Popa Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Cc: Marcus Folkesson Cc: Kent Gustavsson Cc: Dmitry Torokhov Cc: linux-clk@vger.kernel.org Cc: linux-iio@vger.kernel.org Cc: linux-input@vger.kernel.org Reviewed-by: Guenter Roeck Reviewed-by: Stephen Boyd Signed-off-by: Rob Herring commit 2343d1529aff8b552589f622c23932035ed7a05d Author: Jason A. Donenfeld Date: Fri Jan 17 12:01:36 2020 +0100 crypto: Kconfig - allow tests to be disabled when manager is disabled The library code uses CRYPTO_MANAGER_DISABLE_TESTS to conditionalize its tests, but the library code can also exist without CRYPTO_MANAGER. That means on minimal configs, the test code winds up being built with no way to disable it. Signed-off-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit 45f035748b2aa29840fec6ba01cd8e44c63034c2 Merge: fdff7c21ea00 85fc95d75970 Author: Ingo Molnar Date: Wed Feb 5 08:44:40 2020 +0100 Merge tag 'perf-core-for-mingo-5.6-20200201' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf maps: Cengiz Can: - Add missing unlock to maps__insert() error case. srcline: Changbin Du: - Make perf able to build with latest libbfd. perf parse: Leo Yan: - Keep copy of string in perf_evsel_config_term() to fix sink terms processing in ARM CoreSight. perf test: Thomas Richter: - Fix test case Merge cpu map, removing extra reference count drop that causes a segfault on s/390. perf probe: Thomas Richter: - Add ustring support for perf probe command Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit fdff7c21ea00787e3f70a1a00b40b88eb998c6ad Merge: f1ec3a517b43 b3a608222336 Author: Ingo Molnar Date: Wed Feb 5 08:44:22 2020 +0100 Merge branch 'linus' into perf/urgent, to synchronize with upstream Signed-off-by: Ingo Molnar commit 6992ca0dd017ebaa2bf8e9dcc49f1c3b7033b082 Merge: 51a198e89a96 84669923e1ed Author: Linus Torvalds Date: Wed Feb 5 07:29:40 2020 +0000 Merge branch 'parisc-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "A page table initialization cleanup from Mike Rapoport and regenerated defconfig files from Helge Deller" * 'parisc-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Regenerate parisc defconfigs parisc: map_pages(): cleanup page table initialization commit c74c0fd2282e0e3ce891cb571f325b9412cbaa3f Author: Max Filippov Date: Tue Feb 4 12:51:21 2020 -0800 xtensa: ISS: improve simcall assembly Drop redundant result moving from inline assembly, use a1 and b1 values as return value and errno value respectively. Signed-off-by: Max Filippov commit 5e4417f921238b5acf101bfcd59a7b3463fb2dbd Author: Max Filippov Date: Fri Jan 31 20:11:24 2020 -0800 xtensa: reorganize vectors placement Allow vectors to be either merged into the kernel .text or put at a fixed virtual address independently of XIP option. Drop option that puts vectors at a fixed offset from the kernel text. Add choice to Kconfig. Vectors at fixed virtual address may be useful for XIP-aware MTD support and for noMMU configurations with available IRAM. Configurations without VECBASE register must put their vectors at specific locations regardless of the selected option. All other configurations should happily use merged vectors. Signed-off-by: Max Filippov commit 4f17664a4407004f71dc76de01c89fdb6efc0776 Author: Max Filippov Date: Fri Jan 31 21:25:03 2020 -0800 xtensa: separate SMP and XIP support There's no real dependency between SMP and XIP, allow them to be selected together. Always define 2- and 4-argument SECTION_VECTOR macros, always use 4-argument macro for the secondary reset vector and always define relocation entry for it. Signed-off-by: Max Filippov commit 50722f0bf631cfcbcce18dac6b3fb5c2b6432628 Author: Max Filippov Date: Fri Jan 31 18:48:43 2020 -0800 xtensa: move fast exception handlers close to vectors On XIP kernels it makes sense to have exception vectors and fast exception handlers together (in a fast memory). In addition, with MTD XIP support both vectors and fast exception handlers must be outside of the FLASH. Add section .exception.text and move fast exception handlers to it. Put it together with vectors when vectors are outside of the .text. Signed-off-by: Max Filippov commit 51a198e89a96c34b3944034b2ebda9002ff57827 Merge: 72f582ff8569 802a5017ffb2 Author: Linus Torvalds Date: Wed Feb 5 05:28:20 2020 +0000 Merge tag 'jfs-5.6' of git://github.com/kleikamp/linux-shaggy Pull jfs update from David Kleikamp: "Trivial cleanup for jfs" * tag 'jfs-5.6' of git://github.com/kleikamp/linux-shaggy: jfs: remove unused MAXL2PAGES commit 72f582ff8569900ccc4439b26bbe5e2fff509f08 Merge: bddea11b1b93 a3d1e7eb5abe Author: Linus Torvalds Date: Wed Feb 5 05:09:46 2020 +0000 Merge branch 'work.recursive_removal' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs recursive removal updates from Al Viro: "We have quite a few places where synthetic filesystems do an equivalent of 'rm -rf', with varying amounts of code duplication, wrong locking, etc. That really ought to be a library helper. Only debugfs (and very similar tracefs) are converted here - I have more conversions, but they'd never been in -next, so they'll have to wait" * 'work.recursive_removal' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: simple_recursive_removal(): kernel-side rm -rf for ramfs-style filesystems commit bddea11b1b9385f713006820f16a9fbe5efe6b47 Merge: 33b40134e5cf f0f3588f7a95 Author: Linus Torvalds Date: Wed Feb 5 05:02:42 2020 +0000 Merge branch 'imm.timestamp' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs timestamp updates from Al Viro: "More 64bit timestamp work" * 'imm.timestamp' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: kernfs: don't bother with timestamp truncation fs: Do not overload update_time fs: Delete timespec64_trunc() fs: ubifs: Eliminate timespec64_trunc() usage fs: ceph: Delete timespec64_trunc() usage fs: cifs: Delete usage of timespec64_trunc fs: fat: Eliminate timespec64_trunc() usage utimes: Clamp the timestamps in notify_change() commit 089b7d890f972f6b649fedc9259f6b93a18fb970 Author: Tetsuo Handa Date: Tue Feb 4 13:08:44 2020 +0900 kconfig: Invalidate all symbols after changing to y or m. Since commit 89b9060987d9 ("kconfig: Add yes2modconfig and mod2yesconfig targets.") forgot to clear SYMBOL_VALID bit after changing to y or m, these targets did not save the changes. Call sym_clear_all_valid() so that all symbols are revalidated. Fixes: 89b9060987d9 ("kconfig: Add yes2modconfig and mod2yesconfig targets.") Signed-off-by: Tetsuo Handa Signed-off-by: Masahiro Yamada commit cde26a6e17ec36f6f20102a7e5767c2a0096c95f Author: Masahiro Yamada Date: Sun Feb 2 14:09:22 2020 +0900 kallsyms: fix type of kallsyms_token_table[] kallsyms_token_table[] only contains ASCII characters. It should be char instead of u8. Signed-off-by: Masahiro Yamada Reviewed-by: Masami Hiramatsu commit 58fe03d6dec908a1bec07eea7e94907af5c07eec Author: Lyude Paul Date: Fri Jan 24 14:10:46 2020 -0500 drm/amd/dm/mst: Ignore payload update failures Disabling a display on MST can potentially happen after the entire MST topology has been removed, which means that we can't communicate with the topology at all in this scenario. Likewise, this also means that we can't properly update payloads on the topology and as such, it's a good idea to ignore payload update failures when disabling displays. Currently, amdgpu makes the mistake of halting the payload update process when any payload update failures occur, resulting in leaving DC's local copies of the payload tables out of date. This ends up causing problems with hotplugging MST topologies, and causes modesets on the second hotplug to fail like so: [drm] Failed to updateMST allocation table forpipe idx:1 ------------[ cut here ]------------ WARNING: CPU: 5 PID: 1511 at drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:2677 update_mst_stream_alloc_table+0x11e/0x130 [amdgpu] Modules linked in: cdc_ether usbnet fuse xt_conntrack nf_conntrack nf_defrag_ipv6 libcrc32c nf_defrag_ipv4 ipt_REJECT nf_reject_ipv4 nft_counter nft_compat nf_tables nfnetlink tun bridge stp llc sunrpc vfat fat wmi_bmof uvcvideo snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi videobuf2_vmalloc snd_hda_intel videobuf2_memops videobuf2_v4l2 snd_intel_dspcfg videobuf2_common crct10dif_pclmul snd_hda_codec videodev crc32_pclmul snd_hwdep snd_hda_core ghash_clmulni_intel snd_seq mc joydev pcspkr snd_seq_device snd_pcm sp5100_tco k10temp i2c_piix4 snd_timer thinkpad_acpi ledtrig_audio snd wmi soundcore video i2c_scmi acpi_cpufreq ip_tables amdgpu(O) rtsx_pci_sdmmc amd_iommu_v2 gpu_sched mmc_core i2c_algo_bit ttm drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops cec drm crc32c_intel serio_raw hid_multitouch r8152 mii nvme r8169 nvme_core rtsx_pci pinctrl_amd CPU: 5 PID: 1511 Comm: gnome-shell Tainted: G O 5.5.0-rc7Lyude-Test+ #4 Hardware name: LENOVO FA495SIT26/FA495SIT26, BIOS R12ET22W(0.22 ) 01/31/2019 RIP: 0010:update_mst_stream_alloc_table+0x11e/0x130 [amdgpu] Code: 28 00 00 00 75 2b 48 8d 65 e0 5b 41 5c 41 5d 41 5e 5d c3 0f b6 06 49 89 1c 24 41 88 44 24 08 0f b6 46 01 41 88 44 24 09 eb 93 <0f> 0b e9 2f ff ff ff e8 a6 82 a3 c2 66 0f 1f 44 00 00 0f 1f 44 00 RSP: 0018:ffffac428127f5b0 EFLAGS: 00010202 RAX: 0000000000000002 RBX: ffff8d1e166eee80 RCX: 0000000000000000 RDX: ffffac428127f668 RSI: ffff8d1e166eee80 RDI: ffffac428127f610 RBP: ffffac428127f640 R08: ffffffffc03d94a8 R09: 0000000000000000 R10: ffff8d1e24b02000 R11: ffffac428127f5b0 R12: ffff8d1e1b83d000 R13: ffff8d1e1bea0b08 R14: 0000000000000002 R15: 0000000000000002 FS: 00007fab23ffcd80(0000) GS:ffff8d1e28b40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f151f1711e8 CR3: 00000005997c0000 CR4: 00000000003406e0 Call Trace: ? mutex_lock+0xe/0x30 dc_link_allocate_mst_payload+0x9a/0x210 [amdgpu] ? dm_read_reg_func+0x39/0xb0 [amdgpu] ? core_link_enable_stream+0x656/0x730 [amdgpu] core_link_enable_stream+0x656/0x730 [amdgpu] dce110_apply_ctx_to_hw+0x58e/0x5d0 [amdgpu] ? dcn10_verify_allow_pstate_change_high+0x1d/0x280 [amdgpu] ? dcn10_wait_for_mpcc_disconnect+0x3c/0x130 [amdgpu] dc_commit_state+0x292/0x770 [amdgpu] ? add_timer+0x101/0x1f0 ? ttm_bo_put+0x1a1/0x2f0 [ttm] amdgpu_dm_atomic_commit_tail+0xb59/0x1ff0 [amdgpu] ? amdgpu_move_blit.constprop.0+0xb8/0x1f0 [amdgpu] ? amdgpu_bo_move+0x16d/0x2b0 [amdgpu] ? ttm_bo_handle_move_mem+0x118/0x570 [ttm] ? ttm_bo_validate+0x134/0x150 [ttm] ? dm_plane_helper_prepare_fb+0x1b9/0x2a0 [amdgpu] ? _cond_resched+0x15/0x30 ? wait_for_completion_timeout+0x38/0x160 ? _cond_resched+0x15/0x30 ? wait_for_completion_interruptible+0x33/0x190 commit_tail+0x94/0x130 [drm_kms_helper] drm_atomic_helper_commit+0x113/0x140 [drm_kms_helper] drm_atomic_helper_set_config+0x70/0xb0 [drm_kms_helper] drm_mode_setcrtc+0x194/0x6a0 [drm] ? _cond_resched+0x15/0x30 ? mutex_lock+0xe/0x30 ? drm_mode_getcrtc+0x180/0x180 [drm] drm_ioctl_kernel+0xaa/0xf0 [drm] drm_ioctl+0x208/0x390 [drm] ? drm_mode_getcrtc+0x180/0x180 [drm] amdgpu_drm_ioctl+0x49/0x80 [amdgpu] do_vfs_ioctl+0x458/0x6d0 ksys_ioctl+0x5e/0x90 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x55/0x1b0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fab2121f87b Code: 0f 1e fa 48 8b 05 0d 96 2c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d dd 95 2c 00 f7 d8 64 89 01 48 RSP: 002b:00007ffd045f9068 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ffd045f90a0 RCX: 00007fab2121f87b RDX: 00007ffd045f90a0 RSI: 00000000c06864a2 RDI: 000000000000000b RBP: 00007ffd045f90a0 R08: 0000000000000000 R09: 000055dbd2985d10 R10: 000055dbd2196280 R11: 0000000000000246 R12: 00000000c06864a2 R13: 000000000000000b R14: 0000000000000000 R15: 000055dbd2196280 ---[ end trace 6ea888c24d2059cd ]--- Note as well, I have only been able to reproduce this on setups with 2 MST displays. Changes since v1: * Don't return false when part 1 or part 2 of updating the payloads fails, we don't want to abort at any step of the process even if things fail Reviewed-by: Mikita Lipski Signed-off-by: Lyude Paul Acked-by: Harry Wentland Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher commit 7b913a76a6cdda87e538df50df496624407373bf Author: Alex Deucher Date: Tue Feb 4 09:07:19 2020 -0500 drm/amdgpu: update default voltage for boot od table for navi1x It needed to be updated as well so it will show the proper values if you reset to the defaults. Bug: https://gitlab.freedesktop.org/drm/amd/issues/1020 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 2faf852d1be8a4960d328492298da6448cca0279 Author: Jens Axboe Date: Tue Feb 4 19:54:55 2020 -0700 io_uring: cleanup fixed file data table references syzbot reports a use-after-free in io_ring_file_ref_switch() when it tries to switch back to percpu mode. When we put the final reference to the table by calling percpu_ref_kill_and_confirm(), we don't want the zero reference to queue async work for flushing the potentially queued up items. We currently do a few flush_work(), but they merely paper around the issue, since the work item may not have been queued yet depending on the when the percpu-ref callback gets run. Coming into the file unregister, we know we have the ring quiesced. io_ring_file_ref_switch() can check for whether or not the ref is dying or not, and not queue anything async at that point. Once the ref has been confirmed killed, flush any potential items manually. Reported-by: syzbot+7caeaea49c2c8a591e3d@syzkaller.appspotmail.com Fixes: 05f3fb3c5397 ("io_uring: avoid ring quiesce for fixed file set unregister and update") Signed-off-by: Jens Axboe commit f06572ef476d368a239f0238ecf7b00b9cdbf5bf Author: Rafael J. Wysocki Date: Wed Feb 5 02:08:31 2020 +0100 cpuidle: Documentation: Clean up PM QoS description Clean up the language in one paragraph in the PM QoS description in Documentation/admin-guide/pm/cpuidle.rst. Signed-off-by: Rafael J. Wysocki commit df069d80c8e38c19531c392322e9a16617475c44 Author: Jens Axboe Date: Tue Feb 4 16:48:34 2020 -0700 io_uring: spin for sq thread to idle on shutdown As part of io_uring shutdown, we cancel work that is pending and won't necessarily complete on its own. That includes requests like poll commands and timeouts. If we're using SQPOLL for kernel side submission and we shutdown the ring immediately after queueing such work, we can race with the sqthread doing the submission. This means we may miss cancelling some work, which results in the io_uring shutdown hanging forever. Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe commit 34129bb831cc27e5368270562d11d12f73db1e49 Author: Dilip Kota Date: Fri Dec 20 17:53:24 2019 +0800 dt-bindings: PCI: intel: Fix dt_binding_check compilation failure Remove dependency as it is not present in the mainline tree. Use numeric value instead of LGM_GCLK_PCIE10 macro. Signed-off-by: Dilip Kota [robh: Also drop interrupt-parent from example] Signed-off-by: Rob Herring commit 4ae87b17cc327f32335608f953681906cdcf69fc Author: Rob Herring Date: Fri Jan 31 09:25:29 2020 -0600 dt-bindings: phy: Fix errors in intel,lgm-emmc-phy example DT labels can't have '-' in them causing a compile failure in the example. Fixing that leads to more warnings: Documentation/devicetree/bindings/phy/intel,lgm-emmc-phy.example.dts:23.13-33: Warning (reg_format): /example-0/chiptop@e0200000/emmc-phy@a8:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1) Documentation/devicetree/bindings/phy/intel,lgm-emmc-phy.example.dt.yaml: Warning (pci_device_bus_num): Failed prerequisite 'reg_format' Documentation/devicetree/bindings/phy/intel,lgm-emmc-phy.example.dt.yaml: Warning (i2c_bus_reg): Failed prerequisite 'reg_format' Documentation/devicetree/bindings/phy/intel,lgm-emmc-phy.example.dt.yaml: Warning (spi_bus_reg): Failed prerequisite 'reg_format' Documentation/devicetree/bindings/phy/intel,lgm-emmc-phy.example.dts:21.33-26.13: Warning (avoid_default_addr_size): /example-0/chiptop@e0200000/emmc-phy@a8: Relying on default #address-cells value Documentation/devicetree/bindings/phy/intel,lgm-emmc-phy.example.dts:21.33-26.13: Warning (avoid_default_addr_size): /example-0/chiptop@e0200000/emmc-phy@a8: Relying on default #size-cells value Fixes: 5bc999108025 ("dt-bindings: phy: intel-emmc-phy: Add YAML schema for LGM eMMC PHY") Cc: Ramuthevar Vadivel Murugan Cc: Dafna Hirschfeld Cc: Kishon Vijay Abraham I Signed-off-by: Rob Herring commit 9f198a2ac543eaaf47be275531ad5cbd50db3edf Author: Vasily Averin Date: Fri Jan 24 09:10:47 2020 +0300 help_next should increase position index if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: Mike Marshall commit b74e58cd472cb782d34ecfad553c12c66eb02b6b Merge: c8ab422553c8 0f5be6a4ff7b Author: Jens Axboe Date: Tue Feb 4 11:29:36 2020 -0700 Merge branch 'nvme-5.6' of git://git.infradead.org/nvme into block-5.6 Pull NVMe fixes from Keith. * 'nvme-5.6' of git://git.infradead.org/nvme: nvmet: update AEN list and array at one place nvmet: Fix controller use after free nvmet: Fix error print message at nvmet_install_queue function nvme-pci: remove nvmeq->tags nvmet: fix dsm failure when payload does not match sgl descriptor nvmet: Pass lockdep expression to RCU lists commit 7dc2993a9e51dd2eee955944efec65bef90265b7 Author: Robert Milkowski Date: Thu Jan 30 09:43:25 2020 +0000 NFSv4.0: nfs4_do_fsinfo() should not do implicit lease renewals Currently, each time nfs4_do_fsinfo() is called it will do an implicit NFS4 lease renewal, which is not compliant with the NFS4 specification. This can result in a lease being expired by an NFS server. Commit 83ca7f5ab31f ("NFS: Avoid PUTROOTFH when managing leases") introduced implicit client lease renewal in nfs4_do_fsinfo(), which can result in the NFSv4.0 lease to expire on a server side, and servers returning NFS4ERR_EXPIRED or NFS4ERR_STALE_CLIENTID. This can easily be reproduced by frequently unmounting a sub-mount, then stat'ing it to get it mounted again, which will delay or even completely prevent client from sending RENEW operations if no other NFS operations are issued. Eventually nfs server will expire client's lease and return an error on file access or next RENEW. This can also happen when a sub-mount is automatically unmounted due to inactivity (after nfs_mountpoint_expiry_timeout), then it is mounted again via stat(). This can result in a short window during which client's lease will expire on a server but not on a client. This specific case was observed on production systems. This patch removes the implicit lease renewal from nfs4_do_fsinfo(). Fixes: 83ca7f5ab31f ("NFS: Avoid PUTROOTFH when managing leases") Signed-off-by: Robert Milkowski Signed-off-by: Anna Schumaker commit 924491f2e476f7234d722b24171a4daff61bbe13 Author: Robert Milkowski Date: Tue Jan 28 08:37:47 2020 +0000 NFSv4: try lease recovery on NFS4ERR_EXPIRED Currently, if an nfs server returns NFS4ERR_EXPIRED to open(), we return EIO to applications without even trying to recover. Fixes: 272289a3df72 ("NFSv4: nfs4_do_handle_exception() handle revoke/expiry of a single stateid") Signed-off-by: Robert Milkowski Reviewed-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 0f5be6a4ff7b3f8bf3db15f904e3e76797a43d9a Author: Daniel Wagner Date: Thu Jan 30 10:29:34 2020 -0800 nvmet: update AEN list and array at one place All async events are enqueued via nvmet_add_async_event() which updates the ctrl->async_event_cmds[] array and additionally an struct nvmet_async_event is added to the ctrl->async_events list. Under normal operations the nvmet_async_event_work() updates again the ctrl->async_event_cmds and removes the corresponding struct nvmet_async_event from the list again. Though nvmet_sq_destroy() could be called which calls nvmet_async_events_free() which only updates the ctrl->async_event_cmds[] array. Add new functions nvmet_async_events_process() and nvmet_async_events_free() to process async events, update an array and the list. When we destroy submission queue after clearing the aen present on the ctrl->async list we also loop over ctrl->async_event_cmds[] for any requests posted by the host for which we don't have the AEN in the ctrl->async_events list by calling nvmet_async_event_process() and nvmet_async_events_free(). Reviewed-by: Christoph Hellwig Signed-off-by: Daniel Wagner [chaitanya.kulkarni@wdc.com * Loop over and clear out outstanding requests * Update changelog ] Signed-off-by: Chaitanya Kulkarni Signed-off-by: Keith Busch commit c7e661a1c2ae98a4754db6a85fc686b4a89322ad Author: Nikhil Mahale Date: Tue Feb 4 15:57:46 2020 +0530 ALSA: hda - Fix DP-MST support for NVIDIA codecs If dyn_pcm_assign is set, different jack objects are being created for pcm and pins. If dyn_pcm_assign is set, generic_hdmi_build_jack() calls into add_hdmi_jack_kctl() to create and track separate jack object for pcm. Like sync_eld_via_acomp(), hdmi_present_sense_via_verbs() also need to report status change of the pcm jack. Rename pin_idx_to_jack() to pin_idx_to_pcm_jack(). Update hdmi_present_sense_via_verbs() to report plug state of pcm jack object. Unlike sync_eld_via_acomp(), for !acomp drivers the pcm jack's plug state must be consistent with plug state of pin's jack. Fixes: 5398e94fb753 ("ALSA: hda - Add DP-MST support for NVIDIA codecs") Reported-and-tested-by: Martin Regner Signed-off-by: Nikhil Mahale Reviewed-by: Kai Vehmanen Cc: Link: https://lore.kernel.org/r/20200204102746.1356-1-nmahale@nvidia.com Signed-off-by: Takashi Iwai commit 1a3f540d63152b8db0a12de508bfa03776217d83 Author: Israel Rukshin Date: Tue Feb 4 14:38:10 2020 +0200 nvmet: Fix controller use after free After nvmet_install_queue() sets sq->ctrl calling to nvmet_sq_destroy() reduces the controller refcount. In case nvmet_install_queue() fails, calling to nvmet_ctrl_put() is done twice (at nvmet_sq_destroy and nvmet_execute_io_connect/nvmet_execute_admin_connect) instead of once for the queue which leads to use after free of the controller. Fix this by set NULL at sq->ctrl in case of a failure at nvmet_install_queue(). The bug leads to the following Call Trace: [65857.994862] refcount_t: underflow; use-after-free. [65858.108304] Workqueue: events nvmet_rdma_release_queue_work [nvmet_rdma] [65858.115557] RIP: 0010:refcount_warn_saturate+0xe5/0xf0 [65858.208141] Call Trace: [65858.211203] nvmet_sq_destroy+0xe1/0xf0 [nvmet] [65858.216383] nvmet_rdma_release_queue_work+0x37/0xf0 [nvmet_rdma] [65858.223117] process_one_work+0x167/0x370 [65858.227776] worker_thread+0x49/0x3e0 [65858.232089] kthread+0xf5/0x130 [65858.235895] ? max_active_store+0x80/0x80 [65858.240504] ? kthread_bind+0x10/0x10 [65858.244832] ret_from_fork+0x1f/0x30 [65858.249074] ---[ end trace f82d59250b54beb7 ]--- Fixes: bb1cc74790eb ("nvmet: implement valid sqhd values in completions") Fixes: 1672ddb8d691 ("nvmet: Add install_queue callout") Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 0b87a2b795d66be7b54779848ef0f3901c5e46fc Author: Israel Rukshin Date: Tue Feb 4 14:38:09 2020 +0200 nvmet: Fix error print message at nvmet_install_queue function Place the arguments in the correct order. Fixes: 1672ddb8d691 ("nvmet: Add install_queue callout") Signed-off-by: Israel Rukshin Reviewed-by: Max Gurtovoy Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch commit 123c23c6a7b7ecd2a3d6060bea1d94019f71fd66 Author: Wenwen Wang Date: Mon Feb 3 03:47:53 2020 +0000 NFS: Fix memory leaks In _nfs42_proc_copy(), 'res->commit_res.verf' is allocated through kzalloc() if 'args->sync' is true. In the following code, if 'res->synchronous' is false, handle_async_copy() will be invoked. If an error occurs during the invocation, the following code will not be executed and the error will be returned . However, the allocated 'res->commit_res.verf' is not deallocated, leading to a memory leak. This is also true if the invocation of process_copy_commit() returns an error. To fix the above leaks, redirect the execution to the 'out' label if an error is encountered. Signed-off-by: Wenwen Wang Signed-off-by: Anna Schumaker commit 227823d2074da0c138d2abc0074b2dd281bbf923 Author: Dai Ngo Date: Wed Jan 22 20:45:39 2020 -0500 nfs: optimise readdir cache page invalidation When the directory is large and it's being modified by one client while another client is doing the 'ls -l' on the same directory then the cache page invalidation from nfs_force_use_readdirplus causes the reading client to keep restarting READDIRPLUS from cookie 0 which causes the 'ls -l' to take a very long time to complete, possibly never completing. Currently when nfs_force_use_readdirplus is called to switch from READDIR to READDIRPLUS, it invalidates all the cached pages of the directory. This cache page invalidation causes the next nfs_readdir to re-read the directory content from cookie 0. This patch is to optimise the cache invalidation in nfs_force_use_readdirplus by only truncating the cached pages from last page index accessed to the end the file. It also marks the inode to delay invalidating all the cached page of the directory until the next initial nfs_readdir of the next 'ls' instance. Signed-off-by: Dai Ngo Reviewed-by: Trond Myklebust [Anna - Fix conflicts with Trond's readdir patches] [Anna - Remove redundant call to nfs_zap_mapping()] [Anna - Replace d_inode(file_dentry(desc->file)) with file_inode(desc->file)] Signed-off-by: Anna Schumaker commit 1064ad4aeef94f51ca230ac639a9e996fb7867a0 Author: Alex Deucher Date: Wed Jan 29 12:42:57 2020 -0500 drm/amdgpu/smu10: fix smu10_get_clock_by_type_with_voltage Cull out 0 clocks to avoid a warning in DC. Bug: https://gitlab.freedesktop.org/drm/amd/issues/963 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 4d0a72b66065dd7e274bad6aa450196d42fd8f84 Author: Alex Deucher Date: Tue Jan 28 13:19:51 2020 -0500 drm/amdgpu/smu10: fix smu10_get_clock_by_type_with_latency Only send non-0 clocks to DC for validation. This mirrors what the windows driver does. Bug: https://gitlab.freedesktop.org/drm/amd/issues/963 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit c37243579d6c881c575dcfb54cf31c9ded88f946 Author: Alex Deucher Date: Tue Jan 28 14:39:45 2020 -0500 drm/amdgpu/display: handle multiple numbers of fclks in dcn_calcs.c (v2) We might get different numbers of clocks from powerplay depending on what the OEM has populated. v2: add assert for at least one level Bug: https://gitlab.freedesktop.org/drm/amd/issues/963 Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 0531aa6eb38bfa9514609e2727558a051da7365f Author: Alex Deucher Date: Sat Jan 25 13:30:45 2020 -0500 drm/amdgpu: fetch default VDDC curve voltages (v2) Ask the SMU for the default VDDC curve voltage values. This properly reports the VDDC values in the OD interface. v2: only update if the original values are 0 Bug: https://gitlab.freedesktop.org/drm/amd/issues/1020 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.5.x commit 93c5f1f66c6ad4a3b180c1644f74e1b3b4be7864 Author: Matt Coffin Date: Sat Jan 25 13:04:05 2020 -0500 drm/amdgpu/smu_v11_0: Correct behavior of restoring default tables (v2) Previously, the syfs functionality for restoring the default powerplay table was sourcing it's information from the currently-staged powerplay table. This patch adds a step to cache the first overdrive table that we see on boot, so that it can be used later to "restore" the powerplay table v2: sqaush my original with Matt's fix Bug: https://gitlab.freedesktop.org/drm/amd/issues/1020 Signed-off-by: Matt Coffin Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.5.x commit ee23a518fdc2c1dd1aaaf3a2c7ffdd6c83b396ec Author: Alex Deucher Date: Sat Jan 25 11:27:06 2020 -0500 drm/amdgpu/navi10: add OD_RANGE for navi overclocking So users can see the range of valid values. Bug: https://gitlab.freedesktop.org/drm/amd/issues/1020 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.5.x commit 45826e9c4e9e952db43053f4fbed58ec602a410f Author: Alex Deucher Date: Sat Jan 25 11:51:41 2020 -0500 drm/amdgpu/navi: fix index for OD MCLK You can only adjust the max mclk, not the min. Bug: https://gitlab.freedesktop.org/drm/amd/issues/1020 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 5.5.x commit a30a8c2f884c2835383cc5cce134fafbcaa62c1f Author: Bhawanpreet Lakha Date: Fri Dec 6 13:16:08 2019 -0500 drm/amd/display: Fix HW/SW state mismatch [Why] When we disable a connector we don't explicitly remove it from the module so the display is still cached(SW) in the hdcp_module. SST: no issues because we can only have 1 display per link MST: We have x displays per link, now if we disable 1 we don't remove it from the module so the module has x display cached(SW). If we try to enable HDCP, psp verification will fail because we are reporting x displays while the HW only has x-1 display enabled [How] Check the callback for when we disable stream and call remove display. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 47eed65178e8fa626097648eb90cb6b31952efbc Author: Mikita Lipski Date: Fri Jan 31 09:51:23 2020 -0500 drm/amd/display: Fix a typo when computing dsc configuration [why] Remove a backslash symbol accidentally left in increase bpp function when computing mst dsc configuration. Signed-off-by: Mikita Lipski Reviewed-by: Zhan Liu Signed-off-by: Alex Deucher commit 1cf8c930b378016846c88ef0f1444248033326ec Author: Evan Quan Date: Thu Jan 30 16:46:38 2020 +0800 drm/amd/powerplay: fix navi10 system intermittent reboot issue V2 This workaround is needed only for Navi10 12 Gbps SKUs. V2: added SMU firmware version guard Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit f38abc15d157b7b31fa7f651dc8bf92858c963f8 Author: Yong Zhao Date: Wed Jan 29 19:55:47 2020 -0500 drm/amdkfd: Fix a bug in SDMA RLC queue counting under HWS mode The sdma_queue_count increment should be done before execute_queues_cpsch(), which calls pm_calc_rlib_size() where sdma_queue_count is used to calculate whether over_subscription is triggered. With the previous code, when a SDMA queue is created, compute_queue_count in pm_calc_rlib_size() is one more than the actual compute queue number, because the queue_count has been incremented while sdma_queue_count has not. This patch fixes that. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit c6a228be7f440ad5c341b3039f6033d4a8f070a4 Author: Nicholas Kazlauskas Date: Thu Jan 30 13:29:05 2020 -0500 drm/amd/display: Only enable cursor on pipes that need it [Why] In current code we're essentially drawing the cursor on every pipe that contains it. This only works when the planes have the same scaling for src to dest rect, otherwise we'll get "double cursor" where one cursor is incorrectly filtered and offset from the real position. [How] Without dedicated cursor planes on DCN we require at least one pipe that matches the scaling of the current timing. This is an optimization and workaround for the most common case where the top-most plane is not scaled but the bottom-most plane is scaled. Whenever a pipe has a parent pipe in the blending tree whose recout fully contains the current pipe we can disable the pipe. This only applies when the pipe is actually visible of course. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit b9303bb1990950bd2f49ec1c85c015b5b6aac24b Author: Jason A. Donenfeld Date: Mon Feb 3 22:53:06 2020 +0100 x86/PCI: Define to_pci_sysdata() even when !CONFIG_PCI Recently, the to_pci_sysdata() helper was added inside the CONFIG_PCI guard, but it is used inside a CONFIG_NUMA guard, which does not require CONFIG_PCI. This breaks builds on !CONFIG_PCI machines. Make to_pci_sysdata() available in all configurations. Fixes: aad6aa0cd674 ("x86/PCI: Add to_pci_sysdata() helper") Link: https://lore.kernel.org/r/20200203215306.172000-1-Jason@zx2c4.com Reported-by: Randy Dunlap Signed-off-by: Jason A. Donenfeld Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig Acked-by: Randy Dunlap # build-tested commit c8ab422553c81a0eb070329c63725df1cd1425bc Author: Zhiqiang Liu Date: Tue Feb 4 19:30:20 2020 +0800 brd: check and limit max_part par In brd_init func, rd_nr num of brd_device are firstly allocated and add in brd_devices, then brd_devices are traversed to add each brd_device by calling add_disk func. When allocating brd_device, the disk->first_minor is set to i * max_part, if rd_nr * max_part is larger than MINORMASK, two different brd_device may have the same devt, then only one of them can be successfully added. when rmmod brd.ko, it will cause oops when calling brd_exit. Follow those steps: # modprobe brd rd_nr=3 rd_size=102400 max_part=1048576 # rmmod brd then, the oops will appear. Oops log: [ 726.613722] Call trace: [ 726.614175] kernfs_find_ns+0x24/0x130 [ 726.614852] kernfs_find_and_get_ns+0x44/0x68 [ 726.615749] sysfs_remove_group+0x38/0xb0 [ 726.616520] blk_trace_remove_sysfs+0x1c/0x28 [ 726.617320] blk_unregister_queue+0x98/0x100 [ 726.618105] del_gendisk+0x144/0x2b8 [ 726.618759] brd_exit+0x68/0x560 [brd] [ 726.619501] __arm64_sys_delete_module+0x19c/0x2a0 [ 726.620384] el0_svc_common+0x78/0x130 [ 726.621057] el0_svc_handler+0x38/0x78 [ 726.621738] el0_svc+0x8/0xc [ 726.622259] Code: aa0203f6 aa0103f7 aa1e03e0 d503201f (7940e260) Here, we add brd_check_and_reset_par func to check and limit max_part par. -- V5->V6: - remove useless code V4->V5:(suggested by Ming Lei) - make sure max_part is not larger than DISK_MAX_PARTS V3->V4:(suggested by Ming Lei) - remove useless change - add one limit of max_part V2->V3: (suggested by Ming Lei) - clear .minors when running out of consecutive minor space in brd_alloc - remove limit of rd_nr V1->V2: - add more checks in brd_check_par_valid as suggested by Ming Lei. Signed-off-by: Zhiqiang Liu Reviewed-by: Bob Liu Reviewed-by: Ming Lei Signed-off-by: Jens Axboe commit 33b40134e5cfbbccad7f3040d1919889537a3df7 Merge: d60ddd244215 bd5cd35b782a Author: Linus Torvalds Date: Tue Feb 4 13:32:20 2020 +0000 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Use after free in rxrpc_put_local(), from David Howells. 2) Fix 64-bit division error in mlxsw, from Nathan Chancellor. 3) Make sure we clear various bits of TCP state in response to tcp_disconnect(). From Eric Dumazet. 4) Fix netlink attribute policy in cls_rsvp, from Eric Dumazet. 5) txtimer must be deleted in stmmac suspend(), from Nicolin Chen. 6) Fix TC queue mapping in bnxt_en driver, from Michael Chan. 7) Various netdevsim fixes from Taehee Yoo (use of uninitialized data, snapshot panics, stack out of bounds, etc.) 8) cls_tcindex changes hash table size after allocating the table, fix from Cong Wang. 9) Fix regression in the enforcement of session ID uniqueness in l2tp. We only have to enforce uniqueness for IP based tunnels not UDP ones. From Ridge Kennedy. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (46 commits) gtp: use __GFP_NOWARN to avoid memalloc warning l2tp: Allow duplicate session creation with UDP r8152: Add MAC passthrough support to new device net_sched: fix an OOB access in cls_tcindex qed: Remove set but not used variable 'p_link' tc-testing: add missing 'nsPlugin' to basic.json tc-testing: fix eBPF tests failure on linux fresh clones net: hsr: fix possible NULL deref in hsr_handle_frame() netdevsim: remove unused sdev code netdevsim: use __GFP_NOWARN to avoid memalloc warning netdevsim: use IS_ERR instead of IS_ERR_OR_NULL for debugfs netdevsim: fix stack-out-of-bounds in nsim_dev_debugfs_init() netdevsim: fix panic in nsim_dev_take_snapshot_write() netdevsim: disable devlink reload when resources are being used netdevsim: fix using uninitialized resources bnxt_en: Fix TC queue mapping. bnxt_en: Fix logic that disables Bus Master during firmware reset. bnxt_en: Fix RDMA driver failure with SRIOV after firmware reset. bnxt_en: Refactor logic to re-enable SRIOV after firmware reset detected. net: stmmac: Delete txtimer in suspend() ... commit d60ddd244215da7c695cba858427094d8e366aa7 Merge: 71c3a888cbca 03a575a6a1d2 Author: Linus Torvalds Date: Tue Feb 4 13:12:19 2020 +0000 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: - decompressor updates - prevention of out-of-bounds access while stacktracing - fix a section mismatch warning with free_memmap() - make kexec depend on MMU to avoid some build errors - remove swapops stubs * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8954/1: NOMMU: remove stubs for swapops ARM: 8952/1: Disable kmemleak on XIP kernels ARM: 8951/1: Fix Kexec compilation issue. ARM: 8949/1: mm: mark free_memmap as __init ARM: 8948/1: Prevent OOB access in stacktrace ARM: 8945/1: decompressor: use CONFIG option instead of cc-option ARM: 8942/1: Revert "8857/1: efi: enable CP15 DMB instructions before cleaning the cache" ARM: 8941/1: decompressor: enable CP15 barrier instructions in v7 cache setup code commit 71c3a888cbcaf453aecf8d2f8fb003271d28073f Merge: 153b5c566d30 4c25df5640ae Author: Linus Torvalds Date: Tue Feb 4 13:06:46 2020 +0000 Merge tag 'powerpc-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: "A pretty small batch for us, and apologies for it being a bit late, I wanted to sneak Christophe's user_access_begin() series in. Summary: - Implement user_access_begin() and friends for our platforms that support controlling kernel access to userspace. - Enable CONFIG_VMAP_STACK on 32-bit Book3S and 8xx. - Some tweaks to our pseries IOMMU code to allow SVMs ("secure" virtual machines) to use the IOMMU. - Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE to the 32-bit VDSO, and some other improvements. - A series to use the PCI hotplug framework to control opencapi card's so that they can be reset and re-read after flashing a new FPGA image. As well as other minor fixes and improvements as usual. Thanks to: Alastair D'Silva, Alexandre Ghiti, Alexey Kardashevskiy, Andrew Donnellan, Aneesh Kumar K.V, Anju T Sudhakar, Bai Yingjie, Chen Zhou, Christophe Leroy, Frederic Barrat, Greg Kurz, Jason A. Donenfeld, Joel Stanley, Jordan Niethe, Julia Lawall, Krzysztof Kozlowski, Laurent Dufour, Laurentiu Tudor, Linus Walleij, Michael Bringmann, Nathan Chancellor, Nicholas Piggin, Nick Desaulniers, Oliver O'Halloran, Peter Ujfalusi, Pingfan Liu, Ram Pai, Randy Dunlap, Russell Currey, Sam Bobroff, Sebastian Andrzej Siewior, Shawn Anastasio, Stephen Rothwell, Steve Best, Sukadev Bhattiprolu, Thiago Jung Bauermann, Tyrel Datwyler, Vaibhav Jain" * tag 'powerpc-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (131 commits) powerpc: configs: Cleanup old Kconfig options powerpc/configs/skiroot: Enable some more hardening options powerpc/configs/skiroot: Disable xmon default & enable reboot on panic powerpc/configs/skiroot: Enable security features powerpc/configs/skiroot: Update for symbol movement only powerpc/configs/skiroot: Drop default n CONFIG_CRYPTO_ECHAINIV powerpc/configs/skiroot: Drop HID_LOGITECH powerpc/configs: Drop NET_VENDOR_HP which moved to staging powerpc/configs: NET_CADENCE became NET_VENDOR_CADENCE powerpc/configs: Drop CONFIG_QLGE which moved to staging powerpc: Do not consider weak unresolved symbol relocations as bad powerpc/32s: Fix kasan_early_hash_table() for CONFIG_VMAP_STACK powerpc: indent to improve Kconfig readability powerpc: Provide initial documentation for PAPR hcalls powerpc: Implement user_access_save() and user_access_restore() powerpc: Implement user_access_begin and friends powerpc/32s: Prepare prevent_user_access() for user_access_end() powerpc/32s: Drop NULL addr verification powerpc/kuap: Fix set direction in allow/prevent_user_access() powerpc/32s: Fix bad_kuap_fault() ... commit 153b5c566d30fb984827acb12fd93c3aa6c147d3 Merge: 7f879e1a94ac 6aa71ef9bcf9 Author: Linus Torvalds Date: Tue Feb 4 11:58:07 2020 +0000 Merge tag 'microblaze-v5.6-rc1' of git://git.monstr.eu/linux-2.6-microblaze Pull Microblaze update from Michal Simek: - enable CMA - add support for MB v11 - defconfig updates - minor fixes * tag 'microblaze-v5.6-rc1' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: Add ID for Microblaze v11 microblaze: Prevent the overflow of the start microblaze: Wire CMA allocator asm-generic: Make dma-contiguous.h a mandatory include/asm header microblaze: Sync defconfig with latest Kconfig layout microblaze: defconfig: Disable EXT2 driver and Enable EXT3 & EXT4 drivers microblaze: Align comments with register usage commit 7f879e1a94ac99586abf0659c03f35c1e48279c4 Merge: a45ad71e8995 a4ac9d45c0cd Author: Linus Torvalds Date: Tue Feb 4 11:45:21 2020 +0000 Merge tag 'ovl-update-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs update from Miklos Szeredi: - Try to preserve holes in sparse files when copying up, thus saving disk space and improving performance. - Fix a performance regression introduced in v4.19 by preserving asynchronicity of IO when fowarding to underlying layers. Add VFS helpers to submit async iocbs. - Fix a regression in lseek(2) introduced in v4.19 that breaks >2G seeks on 32bit kernels. - Fix a corner case where st_ino/st_dev was not preserved across copy up. - Miscellaneous fixes and cleanups. * tag 'ovl-update-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: fix lseek overflow on 32bit ovl: add splice file read write helper ovl: implement async IO routines vfs: add vfs_iocb_iter_[read|write] helper functions ovl: layer is const ovl: fix corner case of non-constant st_dev;st_ino ovl: fix corner case of conflicting lower layer uuid ovl: generalize the lower_fs[] array ovl: simplify ovl_same_sb() helper ovl: generalize the lower_layers[] array ovl: improving copy-up efficiency for big sparse file ovl: use ovl_inode_lock in ovl_llseek() ovl: use pr_fmt auto generate prefix ovl: fix wrong WARN_ON() in ovl_cache_update_ino() commit 03891f820c2117b19e80b370281eb924a09cf79f Author: Raed Salem Date: Sun Feb 2 13:19:34 2020 +0200 xfrm: handle NETDEV_UNREGISTER for xfrm device This patch to handle the asynchronous unregister device event so the device IPsec offload resources could be cleanly released. Fixes: e4db5b61c572 ("xfrm: policy: remove pcpu policy cache") Signed-off-by: Raed Salem Reviewed-by: Boris Pismenny Reviewed-by: Saeed Mahameed Signed-off-by: Steffen Klassert commit bd5cd35b782abf5437fbd01dfaee12437d20e832 Author: Taehee Yoo Date: Tue Feb 4 03:24:59 2020 +0000 gtp: use __GFP_NOWARN to avoid memalloc warning gtp hashtable size is received by user-space. So, this hashtable size could be too large. If so, kmalloc will internally print a warning message. This warning message is actually not necessary for the gtp module. So, this patch adds __GFP_NOWARN to avoid this message. Splat looks like: [ 2171.200049][ T1860] WARNING: CPU: 1 PID: 1860 at mm/page_alloc.c:4713 __alloc_pages_nodemask+0x2f3/0x740 [ 2171.238885][ T1860] Modules linked in: gtp veth openvswitch nsh nf_conncount nf_nat nf_conntrack nf_defrag_ipv] [ 2171.262680][ T1860] CPU: 1 PID: 1860 Comm: gtp-link Not tainted 5.5.0+ #321 [ 2171.263567][ T1860] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 2171.264681][ T1860] RIP: 0010:__alloc_pages_nodemask+0x2f3/0x740 [ 2171.265332][ T1860] Code: 64 fe ff ff 65 48 8b 04 25 c0 0f 02 00 48 05 f0 12 00 00 41 be 01 00 00 00 49 89 47 0 [ 2171.267301][ T1860] RSP: 0018:ffff8880b51af1f0 EFLAGS: 00010246 [ 2171.268320][ T1860] RAX: ffffed1016a35e43 RBX: 0000000000000000 RCX: 0000000000000000 [ 2171.269517][ T1860] RDX: 0000000000000000 RSI: 000000000000000b RDI: 0000000000000000 [ 2171.270305][ T1860] RBP: 0000000000040cc0 R08: ffffed1018893109 R09: dffffc0000000000 [ 2171.275973][ T1860] R10: 0000000000000001 R11: ffffed1018893108 R12: 1ffff11016a35e43 [ 2171.291039][ T1860] R13: 000000000000000b R14: 000000000000000b R15: 00000000000f4240 [ 2171.292328][ T1860] FS: 00007f53cbc83740(0000) GS:ffff8880da000000(0000) knlGS:0000000000000000 [ 2171.293409][ T1860] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 2171.294586][ T1860] CR2: 000055f540014508 CR3: 00000000b49f2004 CR4: 00000000000606e0 [ 2171.295424][ T1860] Call Trace: [ 2171.295756][ T1860] ? mark_held_locks+0xa5/0xe0 [ 2171.296659][ T1860] ? __alloc_pages_slowpath+0x21b0/0x21b0 [ 2171.298283][ T1860] ? gtp_encap_enable_socket+0x13e/0x400 [gtp] [ 2171.298962][ T1860] ? alloc_pages_current+0xc1/0x1a0 [ 2171.299475][ T1860] kmalloc_order+0x22/0x80 [ 2171.299936][ T1860] kmalloc_order_trace+0x1d/0x140 [ 2171.300437][ T1860] __kmalloc+0x302/0x3a0 [ 2171.300896][ T1860] gtp_newlink+0x293/0xba0 [gtp] [ ... ] Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 0d0d9a388a858e271bb70e71e99e7fe2a6fd6f64 Author: Ridge Kennedy Date: Tue Feb 4 12:24:00 2020 +1300 l2tp: Allow duplicate session creation with UDP In the past it was possible to create multiple L2TPv3 sessions with the same session id as long as the sessions belonged to different tunnels. The resulting sessions had issues when used with IP encapsulated tunnels, but worked fine with UDP encapsulated ones. Some applications began to rely on this behaviour to avoid having to negotiate unique session ids. Some time ago a change was made to require session ids to be unique across all tunnels, breaking the applications making use of this "feature". This change relaxes the duplicate session id check to allow duplicates if both of the colliding sessions belong to UDP encapsulated tunnels. Fixes: dbdbc73b4478 ("l2tp: fix duplicate session creation") Signed-off-by: Ridge Kennedy Acked-by: James Chapman Signed-off-by: David S. Miller commit 42b716359beca10684195fd6e93a74ecd8ca8003 Author: Srinivas Kandagatla Date: Tue Feb 4 11:12:41 2020 +0000 ASoC: wcd934x: Add missing COMMON_CLK dependency Looks like some platforms are not yet using COMMON CLK. PowerPC allyesconfig failed with below error in next ld: sound/soc/codecs/wcd934x.o:(.toc+0x0): undefined reference to `of_clk_src_simple_get' ld: sound/soc/codecs/wcd934x.o: in function `.wcd934x_codec_probe': wcd934x.c:(.text.wcd934x_codec_probe+0x3d4): undefined reference to `.__clk_get_name' ld: wcd934x.c:(.text.wcd934x_codec_probe+0x438): undefined reference to `.clk_hw_register' ld: wcd934x.c:(.text.wcd934x_codec_probe+0x474): undefined reference to `.of_clk_add_provider' Add the missing COMMON_CLK dependency to fix this errors. Reported-by: Stephen Rothwell Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200204111241.6927-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit b4b771fd51fda70577dc980429347c41e807c64f Author: Kai-Heng Feng Date: Tue Feb 4 13:33:13 2020 +0800 r8152: Add MAC passthrough support to new device Device 0xa387 also supports MAC passthrough, therefore add it to the whitelst. BugLink: https://bugs.launchpad.net/bugs/1827961/comments/30 Signed-off-by: Kai-Heng Feng Signed-off-by: David S. Miller commit 599be01ee567b61f4471ee8078870847d0a11e8e Author: Cong Wang Date: Sun Feb 2 21:14:35 2020 -0800 net_sched: fix an OOB access in cls_tcindex As Eric noticed, tcindex_alloc_perfect_hash() uses cp->hash to compute the size of memory allocation, but cp->hash is set again after the allocation, this caused an out-of-bound access. So we have to move all cp->hash initialization and computation before the memory allocation. Move cp->mask and cp->shift together as cp->hash may need them for computation too. Reported-and-tested-by: syzbot+35d4dea36c387813ed31@syzkaller.appspotmail.com Fixes: 331b72922c5f ("net: sched: RCU cls_tcindex") Cc: Eric Dumazet Cc: John Fastabend Cc: Jamal Hadi Salim Cc: Jiri Pirko Cc: Jakub Kicinski Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 6aa71ef9bcf9d8688c777dfbff340348cb89a5b4 Author: Michal Simek Date: Tue Jan 14 14:42:51 2020 +0100 microblaze: Add ID for Microblaze v11 List Microblaze v11 from PVR. Signed-off-by: Michal Simek commit 061d2c1d593076424c910cb1b64ecdb5c9a6923f Author: Shubhrajyoti Datta Date: Sat Jan 11 18:44:34 2020 +0530 microblaze: Prevent the overflow of the start In case the start + cache size is more than the max int the start overflows. Prevent the same. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek commit 2602276d3d3811b1a48c48113042cd75fcbfc27d Author: Michal Simek Date: Tue Jan 14 10:05:24 2020 +0100 microblaze: Wire CMA allocator Based on commit 04e3543e228f ("microblaze: use the generic dma coherent remap allocator") CMA can be easily enabled by calling dma_contiguous_reserve() at the end of mmu_init(). High limit is end of lowmem space which is completely unused at this point of time. Signed-off-by: Michal Simek Reviewed-by: Christoph Hellwig commit def3f7cefe4e81c296090e1722a76551142c227c Author: Michal Simek Date: Fri Jan 17 08:48:17 2020 +0100 asm-generic: Make dma-contiguous.h a mandatory include/asm header dma-continuguous.h is generic for all architectures except arm32 which has its own version. Similar change was done for msi.h by commit a1b39bae16a6 ("asm-generic: Make msi.h a mandatory include/asm header") Suggested-by: Christoph Hellwig Link: https://lore.kernel.org/linux-arm-kernel/20200117080446.GA8980@lst.de/T/#m92bb56b04161057635d4142e1b3b9b6b0a70122e Signed-off-by: Michal Simek Reviewed-by: Christoph Hellwig Acked-by: Thomas Gleixner Acked-by: Arnd Bergmann Acked-by: Paul Walmsley # for arch/riscv commit 5fefd796c8992a4441b64de29716f8f0cdaf6a79 Author: Michal Simek Date: Tue Jan 14 12:10:38 2020 +0100 microblaze: Sync defconfig with latest Kconfig layout Layout was changed by commit 6210b6402f58 ("kernel-hacking: group sysrq/kgdb/ubsan into 'Generic Kernel Debugging Instruments'") Signed-off-by: Michal Simek commit 6162cd2b408fbef550e5cb3b3742a91368ee439b Author: Manish Narani Date: Fri Aug 16 03:09:58 2019 -0600 microblaze: defconfig: Disable EXT2 driver and Enable EXT3 & EXT4 drivers As EXT4 filesystem driver is used for handling EXT2 file systems as well. There is no need to enable EXT2 driver. This patch disables EXT2 and enables EXT3/EXT4 drivers. Signed-off-by: Manish Narani Signed-off-by: Michal Simek commit 18ffa34b73fc4acd73fb2cd0750f09ff8433fa88 Author: Oder Chiou Date: Mon Feb 3 02:28:21 2020 +0000 MAINTAINERS: Remove the Bard Liao from the MAINTAINERS of Realtek CODECs Remove the maintainer "Bard Liao" since he had quitted from Realtek. Signed-off-by: Oder Chiou Link: https://lore.kernel.org/r/3ae27357f98a406a958304386a1457bc@realtek.com Signed-off-by: Mark Brown commit a45ad71e8995eed2b95c6ef0f4c442da0c4f6677 Merge: 685097986b5e 600c39b34369 Author: Linus Torvalds Date: Tue Feb 4 09:06:24 2020 +0000 Merge tag 'rproc-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "This adds support for the Mediatek MT8183 SCP, modem remoteproc on Qualcomm SC7180 platform, audio and sensor remoteprocs on Qualcomm MSM8998 and audio, compute, modem and sensor remoteprocs on Qualcomm SM8150. It adds votes for necessary power-domains for all Qualcomm TrustZone based remoteproc instances are held, fixes a bug related to remoteproc drivers registering before the core has been initialized and does clean up the Qualcomm modem remoteproc driver" * tag 'rproc-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: (21 commits) remoteproc: qcom: q6v5-mss: Improve readability of reset_assert remoteproc: qcom: q6v5-mss: Use regmap_read_poll_timeout remoteproc: qcom: q6v5-mss: Rename boot status timeout remoteproc: qcom: q6v5-mss: Improve readability across clk handling remoteproc: use struct_size() helper remoteproc: Initialize rproc_class before use rpmsg: add rpmsg support for mt8183 SCP. remoteproc/mediatek: add SCP support for mt8183 dt-bindings: Add a binding for Mediatek SCP remoteproc: mss: q6v5-mss: Add modem support on SC7180 dt-bindings: remoteproc: qcom: Add Q6V5 Modem PIL binding for SC7180 remoteproc: qcom: pas: Add MSM8998 ADSP and SLPI support dt-bindings: remoteproc: qcom: Add ADSP and SLPI support for MSM8998 SoC remoteproc: q6v5-mss: Remove mem clk from the active pool remoteproc: qcom: Remove unneeded semicolon remoteproc: qcom: pas: Add auto_boot flag remoteproc: qcom: pas: Add SM8150 ADSP, CDSP, Modem and SLPI support dt-bindings: remoteproc: qcom: SM8150 Add ADSP, CDSP, MPSS and SLPI support remoteproc: qcom: pas: Vote for active/proxy power domains dt-bindings: remoteproc: qcom: Add power-domain bindings for Q6V5 PAS ... commit 685097986b5ef8b8c4b19dbb6a1d6069c3626ba2 Merge: cc12071ff390 cb36017a8b1b Author: Linus Torvalds Date: Tue Feb 4 09:04:37 2020 +0000 Merge tag 'hwlock-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull hwspinlock updates from Bjorn Andersson: "This continues the transition of drivers to device managed resources and removal of unnecessary PM runtime integration, with cleanups to the SIRF, OMAP and Qualcomm hwspinlock drivers. It also adds Baolin as reviewer in MAINTAINERS" * tag 'hwlock-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: hwspinlock: sirf: Use devm_hwspin_lock_register() to register hwlock controller hwspinlock: sirf: Remove redundant PM runtime functions hwspinlock: sirf: Change to use devm_platform_ioremap_resource() hwspinlock: omap: Use devm_kzalloc() to allocate memory hwspinlock: omap: Change to use devm_platform_ioremap_resource() hwspinlock: qcom: Use devm_hwspin_lock_register() to register hwlock controller hwspinlock: qcom: Remove redundant PM runtime functions hwspinlock: stm32: convert to devm_platform_ioremap_resource MAINTAINERS: Add myself as reviewer for the hwspinlock subsystem commit 83b43045308ea0600099830292955f18818f8d5e Author: YueHaibing Date: Tue Feb 4 02:24:41 2020 +0000 qed: Remove set but not used variable 'p_link' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/qlogic/qed/qed_cxt.c: In function 'qed_qm_init_pf': drivers/net/ethernet/qlogic/qed/qed_cxt.c:1401:29: warning: variable 'p_link' set but not used [-Wunused-but-set-variable] commit 92fae6fb231f ("qed: FW 8.42.2.0 Queue Manager changes") leave behind this unused variable. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 9afe2322cb90a8fbc27e32bfc691100c653cab2a Merge: 2b5b8251bc9f e9ed4fa7b440 Author: David S. Miller Date: Tue Feb 4 09:30:00 2020 +0100 Merge branch 'unbreak-basic-and-bpf-tdc-testcases' Davide Caratti says: ==================== unbreak 'basic' and 'bpf' tdc testcases - patch 1/2 fixes tdc failures with 'bpf' action on fresch clones of the kernel tree - patch 2/2 allow running tdc for the 'basic' classifier without tweaking tdc_config.py ==================== Signed-off-by: David S. Miller commit e9ed4fa7b4400d7b2cf03108842a30e6c9bd0eb2 Author: Davide Caratti Date: Mon Feb 3 16:29:30 2020 +0100 tc-testing: add missing 'nsPlugin' to basic.json since tdc tests for cls_basic need $DEV1, use 'nsPlugin' so that the following command can be run without errors: [root@f31 tc-testing]# ./tdc.py -c basic Fixes: 4717b05328ba ("tc-testing: Introduced tdc tests for basic filter") Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit 7145fcfffef1fad4266aaf5ca96727696916edb7 Author: Davide Caratti Date: Mon Feb 3 16:29:29 2020 +0100 tc-testing: fix eBPF tests failure on linux fresh clones when the following command is done on a fresh clone of the kernel tree, [root@f31 tc-testing]# ./tdc.py -c bpf test cases that need to build the eBPF sample program fail systematically, because 'buildebpfPlugin' is unable to install the kernel headers (i.e, the 'khdr' target fails). Pass the correct environment to 'make', in place of ENVIR, to allow running these tests. Fixes: 4c2d39bd40c1 ("tc-testing: use a plugin to build eBPF program") Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit 2b5b8251bc9fe2f9118411f037862ee17cf81e97 Author: Eric Dumazet Date: Mon Feb 3 10:15:07 2020 -0800 net: hsr: fix possible NULL deref in hsr_handle_frame() hsr_port_get_rcu() can return NULL, so we need to be careful. general protection fault, probably for non-canonical address 0xdffffc0000000006: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000030-0x0000000000000037] CPU: 1 PID: 10249 Comm: syz-executor.5 Not tainted 5.5.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__read_once_size include/linux/compiler.h:199 [inline] RIP: 0010:hsr_addr_is_self+0x86/0x330 net/hsr/hsr_framereg.c:44 Code: 04 00 f3 f3 f3 65 48 8b 04 25 28 00 00 00 48 89 45 d0 31 c0 e8 6b ff 94 f9 4c 89 f2 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 75 02 00 00 48 8b 43 30 49 39 c6 49 89 47 c0 0f RSP: 0018:ffffc90000da8a90 EFLAGS: 00010206 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff87e0cc33 RDX: 0000000000000006 RSI: ffffffff87e035d5 RDI: 0000000000000000 RBP: ffffc90000da8b20 R08: ffff88808e7de040 R09: ffffed1015d2707c R10: ffffed1015d2707b R11: ffff8880ae9383db R12: ffff8880a689bc5e R13: 1ffff920001b5153 R14: 0000000000000030 R15: ffffc90000da8af8 FS: 00007fd7a42be700(0000) GS:ffff8880ae900000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b32338000 CR3: 00000000a928c000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: hsr_handle_frame+0x1c5/0x630 net/hsr/hsr_slave.c:31 __netif_receive_skb_core+0xfbc/0x30b0 net/core/dev.c:5099 __netif_receive_skb_one_core+0xa8/0x1a0 net/core/dev.c:5196 __netif_receive_skb+0x2c/0x1d0 net/core/dev.c:5312 process_backlog+0x206/0x750 net/core/dev.c:6144 napi_poll net/core/dev.c:6582 [inline] net_rx_action+0x508/0x1120 net/core/dev.c:6650 __do_softirq+0x262/0x98c kernel/softirq.c:292 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1082 Fixes: c5a759117210 ("net/hsr: Use list_head (and rcu) instead of array for slave devices.") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit cc12071ff39060fc2e47c58b43e249fe0d0061ee Merge: 9717c1cea16e f3cc4e1d44a8 Author: Linus Torvalds Date: Tue Feb 4 07:24:48 2020 +0000 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: "The rest of MM and the rest of everything else: hotfixes, ipc, misc, procfs, lib, cleanups, arm" * emailed patches from Andrew Morton : (67 commits) ARM: dma-api: fix max_pfn off-by-one error in __dma_supported() treewide: remove redundant IS_ERR() before error code check include/linux/cpumask.h: don't calculate length of the input string lib: new testcases for bitmap_parse{_user} lib: rework bitmap_parse() lib: make bitmap_parse_user a wrapper on bitmap_parse lib: add test for bitmap_parse() bitops: more BITS_TO_* macros lib/string: add strnchrnul() proc: convert everything to "struct proc_ops" proc: decouple proc from VFS with "struct proc_ops" asm-generic/tlb: provide MMU_GATHER_TABLE_FREE asm-generic/tlb: rename HAVE_MMU_GATHER_NO_GATHER asm-generic/tlb: rename HAVE_MMU_GATHER_PAGE_SIZE asm-generic/tlb: rename HAVE_RCU_TABLE_FREE asm-generic/tlb: add missing CONFIG symbol asm-gemeric/tlb: remove stray function declarations asm-generic/tlb: avoid potential double flush mm/mmu_gather: invalidate TLB correctly on batch allocation failure and flush powerpc/mmu_gather: enable RCU_TABLE_FREE even for !SMP case ... commit 9717c1cea16e3eae81ca226f4c3670bb799b61ad Merge: 79703e014ba0 b45f1b3b585e Author: Linus Torvalds Date: Tue Feb 4 07:21:04 2020 +0000 Merge tag 'drm-next-2020-02-04' of git://anongit.freedesktop.org/drm/drm Pull drm ttm/mm updates from Dave Airlie: "Thomas Hellstrom has some more changes to the TTM layer that needed a patch to the mm subsystem. This adds a new mm API vmf_insert_mixed_prot to avoid an ugly hack that has limitations in the TTM layer" * tag 'drm-next-2020-02-04' of git://anongit.freedesktop.org/drm/drm: mm, drm/ttm: Fix vm page protection handling mm: Add a vmf_insert_mixed_prot() function commit 79703e014ba02ad86af4bcdf0c16e4b208cca406 Merge: eadc4e40e688 034dbec179e5 Author: Linus Torvalds Date: Tue Feb 4 07:17:41 2020 +0000 Merge tag 'tag-chrome-platform-for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform updates from Benson Leung: "CrOS EC: - Refactoring of some of cros_ec's headers: include/linux/mfd/cros_ec.h now removed, new cros_ec.h added to drivers/platform/chrome which contains shared operations of cros_ec transport drivers. - Response tracing in cros_ec_proto Wilco EC: - Fix unregistration order. - Fix keyboard backlight probing on systems without keyboard backlight - Minor cleanup (newlines in printks, COMPILE_TEST) Misc: - chromeos_laptop converted to use i2c_new_scanned_device instead of i2c_new_probed_device" * tag 'tag-chrome-platform-for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: cros_ec: Match implementation with headers platform/chrome: cros_ec: Drop unaligned.h include platform/chrome: wilco_ec: Allow wilco to be compiled in COMPILE_TEST platform/chrome: wilco_ec: Add newlines to printks platform/chrome: wilco_ec: Fix unregistration order cros_ec: treewide: Remove 'include/linux/mfd/cros_ec.h' platform/chrome: cros_ec_ishtp: Make init_lock static platform/chrome: chromeos_laptop: Convert to i2c_new_scanned_device platform/chrome: cros_ec_lpc: Use platform_get_irq_optional() for optional IRQs platform/chrome: cros_ec_proto: Add response tracing platform/chrome: cros_ec_trace: Match trace commands with EC commands commit 563528b831746792cb8a4ab50a757e648c626b3e Author: Douglas Anderson Date: Mon Feb 3 10:31:46 2020 -0800 clk: qcom: Use ARRAY_SIZE in videocc-sc7180 for parent clocks It's nicer to use ARRAY_SIZE instead of hardcoding. Had we always been doing this it would have prevented a previous bug. See commit 74c31ff9c84a ("clk: qcom: gpu_cc_gmu_clk_src has 5 parents, not 6"). Signed-off-by: Douglas Anderson Link: https://lkml.kernel.org/r/20200203103049.v4.13.If37e4b1b5553ac9db5ea51e84a6eec286cdf209e@changeid Signed-off-by: Stephen Boyd commit abc8f93f33e75e22ab293648edbeb51157e9b6c9 Author: Douglas Anderson Date: Mon Feb 3 10:31:45 2020 -0800 clk: qcom: Get rid of the test clock for videocc-sc7180 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: Douglas Anderson Link: https://lkml.kernel.org/r/20200203103049.v4.12.Ifd19a2701a102ec9f04e61a09345198383a9e937@changeid Signed-off-by: Stephen Boyd commit 8cff43d46cfcdeb11ee1b48ad86692785a351e0b Author: Douglas Anderson Date: Mon Feb 3 10:31:44 2020 -0800 dt-bindings: clock: Cleanup qcom,videocc bindings for sdm845/sc7180 This makes the qcom,videocc bindings match the recent changes to the dispcc and gpucc. 1. Switched to using "bi_tcxo" instead of "xo". 2. Adds a description for the XO clock. Not terribly important but nice if it cleanly matches its cousins. 3. Updates the example to use the symbolic name for the RPMH clock and also show that the real devices are currently using 2 address cells / size cells and fixes the spacing on the closing brace. 4. Split into 2 files. In this case they could probably share one file, but let's be consistent. Signed-off-by: Douglas Anderson Link: https://lkml.kernel.org/r/20200203103049.v4.11.I27bbd90045f38cd3218c259526409d52a48efb35@changeid Signed-off-by: Stephen Boyd commit 72de7a19ef5b1aff90ab406a2238c72d4dcf6df4 Author: Douglas Anderson Date: Mon Feb 3 10:31:43 2020 -0800 clk: qcom: Use ARRAY_SIZE in gpucc-sc7180 for parent clocks It's nicer to use ARRAY_SIZE instead of hardcoding. Had we always been doing this it would have prevented a previous bug. See commit 74c31ff9c84a ("clk: qcom: gpu_cc_gmu_clk_src has 5 parents, not 6"). Signed-off-by: Douglas Anderson Link: https://lkml.kernel.org/r/20200203103049.v4.10.I3bf44e33f4dc7ecca10a50dbccb7dc082894fa59@changeid Signed-off-by: Stephen Boyd commit 39c064a0e6052276e9c7a6dc4ab153059496e2ab Author: Douglas Anderson Date: Mon Feb 3 10:31:42 2020 -0800 clk: qcom: Get rid of the test clock for gpucc-sc7180 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: Douglas Anderson Link: https://lkml.kernel.org/r/20200203103049.v4.9.I6d5276b768f6593053be036a3e70cce298d39f0c@changeid Signed-off-by: Stephen Boyd commit e6747e24f15d9d25bcc771154825c582e970bfa9 Author: Douglas Anderson Date: Mon Feb 3 10:31:40 2020 -0800 dt-bindings: clock: Fix qcom,gpucc bindings for sdm845/sc7180/msm8998 The qcom,gpucc bindings had a few problems with them: 1. When things were converted to yaml the name of the "gpll0 main" clock got changed from "gpll0" to "gpll0_main". Change it back for msm8998. 2. Apparently there is a push not to use purist aliases for clocks but instead to just use the internal Qualcomm names. For sdm845 and sc7180 (where the drivers haven't already been changed) move in this direction. Things were also getting complicated harder to deal with by jamming several SoCs into one file. Splitting simplifies things. Fixes: 5c6f3a36b913 ("dt-bindings: clock: Add YAML schemas for the QCOM GPUCC clock bindings") Signed-off-by: Douglas Anderson Link: https://lkml.kernel.org/r/20200203103049.v4.7.I513cd73b16665065ae6c22cf594d8b543745e28c@changeid Signed-off-by: Stephen Boyd commit 3696ebe4e1fc45ea391412ff1a82cec9ae4f6e8f Author: Douglas Anderson Date: Mon Feb 3 10:31:39 2020 -0800 clk: qcom: Use ARRAY_SIZE in dispcc-sc7180 for parent clocks It's nicer to use ARRAY_SIZE instead of hardcoding. Had we always been doing this it would have prevented a previous bug. See commit 74c31ff9c84a ("clk: qcom: gpu_cc_gmu_clk_src has 5 parents, not 6"). Signed-off-by: Douglas Anderson Link: https://lkml.kernel.org/r/20200203103049.v4.6.If590c468722d2985cea63adf60c0d2b3098f37d9@changeid Signed-off-by: Stephen Boyd commit c1ef343612cd51a8c97ca3004bffc6db33f639c6 Author: Douglas Anderson Date: Mon Feb 3 10:31:38 2020 -0800 clk: qcom: Get rid of the test clock for dispcc-sc7180 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: Douglas Anderson Link: https://lkml.kernel.org/r/20200203103049.v4.5.I28ac8f801456f1b950f7da10ed0f74a1344d4a35@changeid Signed-off-by: Stephen Boyd commit 0a97e8a5bf0a79c9f82f6c22d9845f7c179ea758 Author: Douglas Anderson Date: Mon Feb 3 10:31:37 2020 -0800 clk: qcom: Get rid of fallback global names for dispcc-sc7180 In the new world input clocks should be matched by ".fw_name". sc7180 is new enough that no backward compatibility use of global names should be needed. Remove it. With a proper device tree and downstream display patches I have verified booting a sc7180 up and seeing the display after this patch. Fixes: dd3d06622138 ("clk: qcom: Add display clock controller driver for SC7180") Signed-off-by: Douglas Anderson Link: https://lkml.kernel.org/r/20200203103049.v4.4.Ia3706a5d5add72e88dbff60fd13ec06bf7a2fd48@changeid Signed-off-by: Stephen Boyd commit 48cabc221f0d914db3ba1af0924cf4f53ebaced5 Author: Douglas Anderson Date: Mon Feb 3 10:31:35 2020 -0800 dt-bindings: clock: Fix qcom,dispcc bindings for sdm845/sc7180 The qcom,dispcc bindings had a few problems with them: 1. They didn't specify all the clocks that dispcc is a client of. Specifically on sc7180 there are two clocks from the DSI PHY and two from the DP PHY. On sdm845 there are actually two DSI PHYs (each of which has two clocks) and an extra clock from the gcc. These all need to be specified. 2. The sdm845.dtsi has existed for quite some time without specifying the clocks. The Linux driver was relying on global names to match things up. While we should transition things, it should be noted in the bindings. 3. The names used the bindings for "xo" and "gpll0" didn't match the names that QC used for these clocks internally and this was causing confusion / difficulty with their code generation tools. Switched to the internal names to simplify everyone's lives. It's not quite as clean in a purist sense but it should avoid headaches. This officially changes the binding, but that seems OK in this case. Also note that I updated the example. Fixes: 5d28e44ba630 ("dt-bindings: clock: Add YAML schemas for the QCOM DISPCC clock bindings") Signed-off-by: Douglas Anderson Link: https://lkml.kernel.org/r/20200203103049.v4.2.I0c4bbb0f75a0880cd4bd90d8b267271e2375e0d0@changeid Signed-off-by: Stephen Boyd commit 908b050114d8fefdddc57ec9fbc213c3690e7f5f Author: Douglas Anderson Date: Mon Feb 3 10:31:34 2020 -0800 clk: qcom: rcg2: Don't crash if our parent can't be found; return an error When I got my clock parenting slightly wrong I ended up with a crash that looked like this: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 ... pc : clk_hw_get_rate+0x14/0x44 ... Call trace: clk_hw_get_rate+0x14/0x44 _freq_tbl_determine_rate+0x94/0xfc clk_rcg2_determine_rate+0x2c/0x38 clk_core_determine_round_nolock+0x4c/0x88 clk_core_round_rate_nolock+0x6c/0xa8 clk_core_round_rate_nolock+0x9c/0xa8 clk_core_set_rate_nolock+0x70/0x180 clk_set_rate+0x3c/0x6c of_clk_set_defaults+0x254/0x360 platform_drv_probe+0x28/0xb0 really_probe+0x120/0x2dc driver_probe_device+0x64/0xfc device_driver_attach+0x4c/0x6c __driver_attach+0xac/0xc0 bus_for_each_dev+0x84/0xcc driver_attach+0x2c/0x38 bus_add_driver+0xfc/0x1d0 driver_register+0x64/0xf8 __platform_driver_register+0x4c/0x58 msm_drm_register+0x5c/0x60 ... It turned out that clk_hw_get_parent_by_index() was returning NULL and we weren't checking. Let's check it so that we don't crash. Fixes: ac269395cdd8 ("clk: qcom: Convert to clk_hw based provider APIs") Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Link: https://lkml.kernel.org/r/20200203103049.v4.1.I7487325fe8e701a68a07d3be8a6a4b571eca9cfa@changeid Signed-off-by: Stephen Boyd commit 73cb3106e883ac03cc4f15b20d525e6bde650526 Author: Colin Ian King Date: Mon Feb 3 22:37:36 2020 +0000 clk: ls1028a: fix a dereference of pointer 'parent' before a null check Currently the pointer 'parent' is being dereferenced before it is being null checked. Fix this by performing the null check before it is dereferenced. Addresses-Coverity: ("Dereference before null check") Fixes: d37010a3c162 ("clk: ls1028a: Add clock driver for Display output interface") Signed-off-by: Colin Ian King Link: https://lkml.kernel.org/r/20200203223736.99645-1-colin.king@canonical.com Signed-off-by: Stephen Boyd commit eadc4e40e68832fc61ae5e3ef2ef5cfcd9308b2c Merge: 322bf2d3446a f45719240700 Author: Linus Torvalds Date: Tue Feb 4 07:03:40 2020 +0000 Merge tag 'rtc-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "The VL_READ and VL_CLR ioctls have been reworked to be more useful. This will not break userspace as there are very few users and they are using the integer value as a boolean. Apart from that, two drivers were reworked and a few fixes here and there for a net reduction of number of lines. Summary: Subsystem: - the VL_READ and VL_CLR ioctls are now documented and their behavior is unified across all the drivers. - RTC_I2C_AND_SPI Kconfig option rework to avoid selecting both REGMAP_I2C and REGMAP_SPI unecessarily. Drivers: - at91rm9200: remove deprecated procfs, add sam9x60, sama5d4 and sama5d2 compatibles. - cmos: solve lost interrupts issue on MS Surface 3 - hym8563: return proper errno when time is invalid - rv3029: many fixes, nvram support" * tag 'rtc-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (63 commits) dt-bindings: rtc: at91rm9200: document clocks property rtc: i2c/spi: Avoid inclusion of REGMAP support when not needed rtc: Kconfig: select REGMAP_I2C when necessary rtc: Kconfig: properly indent sd3078 entry rtc: cmos: Refactor code by using the new dmi_get_bios_year() helper rtc: cmos: Use predefined value for RTC IRQ on legacy x86 rtc: cmos: Stop using shared IRQ rtc: tps6586x: Use IRQ_NOAUTOEN flag rtc: at91rm9200: use FIELD_PREP/FIELD_GET rtc: at91rm9200: avoid time readout in at91_rtc_setalarm rtc: at91rm9200: move register definitions to C file rtc: at91rm9200: add sama5d4 and sama5d2 compatibles dt-bindings: rtc: at91rm9200: convert bindings to json-schema rtc: at91rm9200: remove procfs information dt-bindings: atmel, at91rm9200-rtc: add microchip, sam9x60-rtc rtc: pcf8563: Use BIT rtc: moxart: Convert to SPDX identifier rtc: ds1343: Remove unused struct spi_device in struct ds1343_priv rtc: rx8025: Remove struct i2c_client from struct rx8025_data rtc: hym8563: Read the valid flag directly instead of caching it ... commit f3cc4e1d44a813a0685f2e558b78ace3db559722 Author: Chen-Yu Tsai Date: Mon Feb 3 17:37:48 2020 -0800 ARM: dma-api: fix max_pfn off-by-one error in __dma_supported() max_pfn, as set in arch/arm/mm/init.c: static void __init find_limits(unsigned long *min, unsigned long *max_low, unsigned long *max_high) { *max_low = PFN_DOWN(memblock_get_current_limit()); *min = PFN_UP(memblock_start_of_DRAM()); *max_high = PFN_DOWN(memblock_end_of_DRAM()); } with memblock_end_of_DRAM() pointing to the next byte after DRAM. As such, max_pfn points to the PFN after the end of DRAM. Thus when using max_pfn to check DMA masks, we should subtract one when checking DMA ranges against it. Commit 8bf1268f48ad ("ARM: dma-api: fix off-by-one error in __dma_supported()") fixed the same issue, but missed this spot. This issue was found while working on the sun4i-csi v4l2 driver on the Allwinner R40 SoC. On Allwinner SoCs, DRAM is offset at 0x40000000, and we are starting to use of_dma_configure() with the "dma-ranges" property in the device tree to have the DMA API handle the offset. In this particular instance, dma-ranges was set to the same range as the actual available (2 GiB) DRAM. The following error appeared when the driver attempted to allocate a buffer: sun4i-csi 1c09000.csi: Coherent DMA mask 0x7fffffff (pfn 0x40000-0xc0000) covers a smaller range of system memory than the DMA zone pfn 0x0-0xc0001 sun4i-csi 1c09000.csi: dma_alloc_coherent of size 307200 failed Fixing the off-by-one error makes things work. Link: http://lkml.kernel.org/r/20191224030239.5656-1-wens@kernel.org Fixes: 11a5aa32562e ("ARM: dma-mapping: check DMA mask against available memory") Fixes: 9f28cde0bc64 ("ARM: another fix for the DMA mapping checks") Fixes: ab746573c405 ("ARM: dma-mapping: allow larger DMA mask than supported") Signed-off-by: Chen-Yu Tsai Reviewed-by: Christoph Hellwig Cc: Russell King Cc: Robin Murphy Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 45586c7078d42b932c5399953d21746800083691 Author: Masahiro Yamada Date: Mon Feb 3 17:37:45 2020 -0800 treewide: remove redundant IS_ERR() before error code check 'PTR_ERR(p) == -E*' is a stronger condition than IS_ERR(p). Hence, IS_ERR(p) is unneeded. The semantic patch that generates this commit is as follows: // @@ expression ptr; constant error_code; @@ -IS_ERR(ptr) && (PTR_ERR(ptr) == - error_code) +PTR_ERR(ptr) == - error_code // Link: http://lkml.kernel.org/r/20200106045833.1725-1-masahiroy@kernel.org Signed-off-by: Masahiro Yamada Cc: Julia Lawall Acked-by: Stephen Boyd [drivers/clk/clk.c] Acked-by: Bartosz Golaszewski [GPIO] Acked-by: Wolfram Sang [drivers/i2c] Acked-by: Rafael J. Wysocki [acpi/scan.c] Acked-by: Rob Herring Cc: Eric Biggers Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 190535f7cf50f2d6d6e603715201c58cd6ec696b Author: Yury Norov Date: Mon Feb 3 17:37:41 2020 -0800 include/linux/cpumask.h: don't calculate length of the input string New design of inner bitmap_parse() allows to avoid calculating the size of a null-terminated string. Link: http://lkml.kernel.org/r/20200102043031.30357-8-yury.norov@gmail.com Signed-off-by: Yury Norov Reviewed-by: Andy Shevchenko Cc: Amritha Nambiar Cc: Arnaldo Carvalho de Melo Cc: Chris Wilson Cc: Kees Cook Cc: Matthew Wilcox Cc: Miklos Szeredi Cc: Rasmus Villemoes Cc: Steffen Klassert Cc: "Tobin C . Harding" Cc: Vineet Gupta Cc: Will Deacon Cc: Willem de Bruijn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 809e308f7f854933a792e4a14c4571320cd11f7e Author: Yury Norov Date: Mon Feb 3 17:37:38 2020 -0800 lib: new testcases for bitmap_parse{_user} New version of bitmap_parse() is unified with bitmap_parse_list(), and therefore: - weakens rules on whitespaces and commas between hex chunks; - in addition to - allows passing UINT_MAX or any other big number as the length of input string instead of actual string length. The patch covers the cases. Link: http://lkml.kernel.org/r/20200102043031.30357-7-yury.norov@gmail.com Signed-off-by: Yury Norov Reviewed-by: Andy Shevchenko Cc: Amritha Nambiar Cc: Arnaldo Carvalho de Melo Cc: Chris Wilson Cc: Kees Cook Cc: Matthew Wilcox Cc: Miklos Szeredi Cc: Rasmus Villemoes Cc: Steffen Klassert Cc: "Tobin C . Harding" Cc: Vineet Gupta Cc: Will Deacon Cc: Willem de Bruijn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2d6261583be005a91e4933aa53bbd678ef98e4c4 Author: Yury Norov Date: Mon Feb 3 17:37:34 2020 -0800 lib: rework bitmap_parse() bitmap_parse() is ineffective and full of opaque variables and opencoded parts. It leads to hard understanding and usage of it. This rework includes: - remove bitmap_shift_left() call from the cycle. Now it makes the complexity of the algorithm as O(nbits^2). In the suggested approach the input string is parsed in reverse direction, so no shifts needed; - relax requirement on a single comma and no white spaces between chunks. It is considered useful in scripting, and it aligns with bitmap_parselist(); - split bitmap_parse() to small readable helpers; - make an explicit calculation of the end of input line at the beginning, so users of the bitmap_parse() won't bother doing this. Link: http://lkml.kernel.org/r/20200102043031.30357-6-yury.norov@gmail.com Signed-off-by: Yury Norov Cc: Amritha Nambiar Cc: Andy Shevchenko Cc: Arnaldo Carvalho de Melo Cc: Chris Wilson Cc: Kees Cook Cc: Matthew Wilcox Cc: Miklos Szeredi Cc: Rasmus Villemoes Cc: Steffen Klassert Cc: "Tobin C . Harding" Cc: Vineet Gupta Cc: Will Deacon Cc: Willem de Bruijn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e66eda0615c8767694150b3c595f3e9cf9ac4294 Author: Yury Norov Date: Mon Feb 3 17:37:31 2020 -0800 lib: make bitmap_parse_user a wrapper on bitmap_parse Currently we parse user data byte after byte which leads to overcomplicating of parsing algorithm. There are no performance critical users of bitmap_parse_user(), and so we can duplicate user data to kernel buffer and simply call bitmap_parselist(). This rework lets us unify and simplify bitmap_parse() and bitmap_parse_user(), which is done in the following patch. Link: http://lkml.kernel.org/r/20200102043031.30357-5-yury.norov@gmail.com Signed-off-by: Yury Norov Reviewed-by: Andy Shevchenko Cc: Amritha Nambiar Cc: Arnaldo Carvalho de Melo Cc: Chris Wilson Cc: Kees Cook Cc: Matthew Wilcox Cc: Miklos Szeredi Cc: Rasmus Villemoes Cc: Steffen Klassert Cc: "Tobin C . Harding" Cc: Vineet Gupta Cc: Will Deacon Cc: Willem de Bruijn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7eb2e94e969435519cfd8e07dc654508b3a42d81 Author: Yury Norov Date: Mon Feb 3 17:37:27 2020 -0800 lib: add test for bitmap_parse() The test is derived from bitmap_parselist() NO_LEN is reserved for use in following patches. [yury.norov@gmail.com: fix rebase issue] Link: http://lkml.kernel.org/r/20200102182659.6685-1-yury.norov@gmail.com [andriy.shevchenko@linux.intel.com: fix address space when test user buffer] Link: http://lkml.kernel.org/r/20200109103601.45929-2-andriy.shevchenko@linux.intel.com Link: http://lkml.kernel.org/r/20200102043031.30357-4-yury.norov@gmail.com Signed-off-by: Yury Norov Signed-off-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Cc: Amritha Nambiar Cc: Arnaldo Carvalho de Melo Cc: Chris Wilson Cc: Kees Cook Cc: Matthew Wilcox Cc: Miklos Szeredi Cc: Rasmus Villemoes Cc: Steffen Klassert Cc: "Tobin C . Harding" Cc: Vineet Gupta Cc: Will Deacon Cc: Willem de Bruijn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0bddc1bd05d6973fee9303005abab6567f743ea7 Author: Yury Norov Date: Mon Feb 3 17:37:24 2020 -0800 bitops: more BITS_TO_* macros Introduce BITS_TO_U64, BITS_TO_U32 and BITS_TO_BYTES as they are handy in the following patches (BITS_TO_U32 specifically). Reimplement tools/ version of the macros according to the kernel implementation. Also fix indentation for BITS_PER_TYPE definition. Link: http://lkml.kernel.org/r/20200102043031.30357-3-yury.norov@gmail.com Signed-off-by: Yury Norov Reviewed-by: Andy Shevchenko Cc: Amritha Nambiar Cc: Arnaldo Carvalho de Melo Cc: Chris Wilson Cc: Kees Cook Cc: Matthew Wilcox Cc: Miklos Szeredi Cc: Rasmus Villemoes Cc: Steffen Klassert Cc: "Tobin C . Harding" Cc: Vineet Gupta Cc: Will Deacon Cc: Willem de Bruijn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0bee0cece2a6a71ccc347fdc1d46cf638cd5fd1c Author: Yury Norov Date: Mon Feb 3 17:37:20 2020 -0800 lib/string: add strnchrnul() Patch series "lib: rework bitmap_parse", v5. Similarl to the recently revisited bitmap_parselist(), bitmap_parse() is ineffective and overcomplicated. This series reworks it, aligns its interface with bitmap_parselist() and makes it simpler to use. The series also adds a test for the function and fixes usage of it in cpumask_parse() according to the new design - drops the calculating of length of an input string. bitmap_parse() takes the array of numbers to be put into the map in the BE order which is reversed to the natural LE order for bitmaps. For example, to construct bitmap containing a bit on the position 42, we have to put a line '400,0'. Current implementation reads chunk one by one from the beginning ('400' before '0') and makes bitmap shift after each successful parse. It makes the complexity of the whole process as O(n^2). We can do it in reverse direction ('0' before '400') and avoid shifting, but it requires reverse parsing helpers. This patch (of 7): New function works like strchrnul() with a length limited string. Link: http://lkml.kernel.org/r/20200102043031.30357-2-yury.norov@gmail.com Signed-off-by: Yury Norov Reviewed-by: Andy Shevchenko Cc: Rasmus Villemoes Cc: Amritha Nambiar Cc: Willem de Bruijn Cc: Kees Cook Cc: Matthew Wilcox Cc: "Tobin C . Harding" Cc: Will Deacon Cc: Miklos Szeredi Cc: Vineet Gupta Cc: Chris Wilson Cc: Arnaldo Carvalho de Melo Cc: Steffen Klassert Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 97a32539b9568bb653683349e5a76d02ff3c3e2c Author: Alexey Dobriyan Date: Mon Feb 3 17:37:17 2020 -0800 proc: convert everything to "struct proc_ops" The most notable change is DEFINE_SHOW_ATTRIBUTE macro split in seq_file.h. Conversion rule is: llseek => proc_lseek unlocked_ioctl => proc_ioctl xxx => proc_xxx delete ".owner = THIS_MODULE" line [akpm@linux-foundation.org: fix drivers/isdn/capi/kcapi_proc.c] [sfr@canb.auug.org.au: fix kernel/sched/psi.c] Link: http://lkml.kernel.org/r/20200122180545.36222f50@canb.auug.org.au Link: http://lkml.kernel.org/r/20191225172546.GB13378@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d56c0d45f0e27f814e87a1676b6bdccccbc252e9 Author: Alexey Dobriyan Date: Mon Feb 3 17:37:14 2020 -0800 proc: decouple proc from VFS with "struct proc_ops" Currently core /proc code uses "struct file_operations" for custom hooks, however, VFS doesn't directly call them. Every time VFS expands file_operations hook set, /proc code bloats for no reason. Introduce "struct proc_ops" which contains only those hooks which /proc allows to call into (open, release, read, write, ioctl, mmap, poll). It doesn't contain module pointer as well. Save ~184 bytes per usage: add/remove: 26/26 grow/shrink: 1/4 up/down: 1922/-6674 (-4752) Function old new delta sysvipc_proc_ops - 72 +72 ... config_gz_proc_ops - 72 +72 proc_get_inode 289 339 +50 proc_reg_get_unmapped_area 110 107 -3 close_pdeo 227 224 -3 proc_reg_open 289 284 -5 proc_create_data 60 53 -7 rt_cpu_seq_fops 256 - -256 ... default_affinity_proc_fops 256 - -256 Total: Before=5430095, After=5425343, chg -0.09% Link: http://lkml.kernel.org/r/20191225172228.GA13378@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0d6e24d430ef23280d8dea0ba1faeefc66c26a57 Author: Peter Zijlstra Date: Mon Feb 3 17:37:11 2020 -0800 asm-generic/tlb: provide MMU_GATHER_TABLE_FREE As described in the comment, the correct order for freeing pages is: 1) unhook page 2) TLB invalidate page 3) free page This order equally applies to page directories. Currently there are two correct options: - use tlb_remove_page(), when all page directores are full pages and there are no futher contraints placed by things like software walkers (HAVE_FAST_GUP). - use MMU_GATHER_RCU_TABLE_FREE and tlb_remove_table() when the architecture does not do IPI based TLB invalidate and has HAVE_FAST_GUP (or software TLB fill). This however leaves architectures that don't have page based directories but don't need RCU in a bind. For those, provide MMU_GATHER_TABLE_FREE, which provides the independent batching for directories without the additional RCU freeing. Link: http://lkml.kernel.org/r/20200116064531.483522-10-aneesh.kumar@linux.ibm.com Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Aneesh Kumar K.V Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 580a586c409ab3040b7284a19cd9e281692c40c7 Author: Peter Zijlstra Date: Mon Feb 3 17:37:08 2020 -0800 asm-generic/tlb: rename HAVE_MMU_GATHER_NO_GATHER Towards a more consistent naming scheme. Link: http://lkml.kernel.org/r/20200116064531.483522-9-aneesh.kumar@linux.ibm.com Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Aneesh Kumar K.V Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3af4bd033759c4dab4f0ff594f0aa1e8d182b9d7 Author: Peter Zijlstra Date: Mon Feb 3 17:37:05 2020 -0800 asm-generic/tlb: rename HAVE_MMU_GATHER_PAGE_SIZE Towards a more consistent naming scheme. Link: http://lkml.kernel.org/r/20200116064531.483522-8-aneesh.kumar@linux.ibm.com Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Aneesh Kumar K.V Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ff2e6d7259f82ccc9a5aaa7f41194161d9262392 Author: Peter Zijlstra Date: Mon Feb 3 17:37:02 2020 -0800 asm-generic/tlb: rename HAVE_RCU_TABLE_FREE Towards a more consistent naming scheme. [akpm@linux-foundation.org: fix sparc64 Kconfig] Link: http://lkml.kernel.org/r/20200116064531.483522-7-aneesh.kumar@linux.ibm.com Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Aneesh Kumar K.V Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 27796d03c9c4b2b937ed4cc2b10f21559ad5a8c9 Author: Peter Zijlstra Date: Mon Feb 3 17:36:59 2020 -0800 asm-generic/tlb: add missing CONFIG symbol Without this the symbol will not actually end up in .config files. Link: http://lkml.kernel.org/r/20200116064531.483522-6-aneesh.kumar@linux.ibm.com Fixes: a30e32bd79e9 ("asm-generic/tlb: Provide generic tlb_flush() based on flush_tlb_mm()") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Aneesh Kumar K.V Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 491a49ff14b2475ad84c97b93c0182ae6daf8b37 Author: Peter Zijlstra Date: Mon Feb 3 17:36:56 2020 -0800 asm-gemeric/tlb: remove stray function declarations We removed the actual functions a while ago. Link: http://lkml.kernel.org/r/20200116064531.483522-5-aneesh.kumar@linux.ibm.com Fixes: 1808d65b55e4 ("asm-generic/tlb: Remove arch_tlb*_mmu()") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Aneesh Kumar K.V Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0758cd8304942292e95a0f750c374533db378b32 Author: Peter Zijlstra Date: Mon Feb 3 17:36:53 2020 -0800 asm-generic/tlb: avoid potential double flush Aneesh reported that: tlb_flush_mmu() tlb_flush_mmu_tlbonly() tlb_flush() <-- #1 tlb_flush_mmu_free() tlb_table_flush() tlb_table_invalidate() tlb_flush_mmu_tlbonly() tlb_flush() <-- #2 does two TLBIs when tlb->fullmm, because __tlb_reset_range() will not clear tlb->end in that case. Observe that any caller to __tlb_adjust_range() also sets at least one of the tlb->freed_tables || tlb->cleared_p* bits, and those are unconditionally cleared by __tlb_reset_range(). Change the condition for actually issuing TLBI to having one of those bits set, as opposed to having tlb->end != 0. Link: http://lkml.kernel.org/r/20200116064531.483522-4-aneesh.kumar@linux.ibm.com Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Aneesh Kumar K.V Reported-by: "Aneesh Kumar K.V" Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0ed1325967ab5f7a4549a2641c6ebe115f76e228 Author: Peter Zijlstra Date: Mon Feb 3 17:36:49 2020 -0800 mm/mmu_gather: invalidate TLB correctly on batch allocation failure and flush Architectures for which we have hardware walkers of Linux page table should flush TLB on mmu gather batch allocation failures and batch flush. Some architectures like POWER supports multiple translation modes (hash and radix) and in the case of POWER only radix translation mode needs the above TLBI. This is because for hash translation mode kernel wants to avoid this extra flush since there are no hardware walkers of linux page table. With radix translation, the hardware also walks linux page table and with that, kernel needs to make sure to TLB invalidate page walk cache before page table pages are freed. More details in commit d86564a2f085 ("mm/tlb, x86/mm: Support invalidating TLB caches for RCU_TABLE_FREE") The changes to sparc are to make sure we keep the old behavior since we are now removing HAVE_RCU_TABLE_NO_INVALIDATE. The default value for tlb_needs_table_invalidate is to always force an invalidate and sparc can avoid the table invalidate. Hence we define tlb_needs_table_invalidate to false for sparc architecture. Link: http://lkml.kernel.org/r/20200116064531.483522-3-aneesh.kumar@linux.ibm.com Fixes: a46cc7a90fd8 ("powerpc/mm/radix: Improve TLB/PWC flushes") Signed-off-by: Peter Zijlstra (Intel) Acked-by: Michael Ellerman [powerpc] Cc: [4.14+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 12e4d53f3f04e81f9e83d6fc10edc7314ab9f6b9 Author: Aneesh Kumar K.V Date: Mon Feb 3 17:36:46 2020 -0800 powerpc/mmu_gather: enable RCU_TABLE_FREE even for !SMP case Patch series "Fixup page directory freeing", v4. This is a repost of patch series from Peter with the arch specific changes except ppc64 dropped. ppc64 changes are added here because we are redoing the patch series on top of ppc64 changes. This makes it easy to backport these changes. Only the first 2 patches need to be backported to stable. The thing is, on anything SMP, freeing page directories should observe the exact same order as normal page freeing: 1) unhook page/directory 2) TLB invalidate 3) free page/directory Without this, any concurrent page-table walk could end up with a Use-after-Free. This is esp. trivial for anything that has software page-table walkers (HAVE_FAST_GUP / software TLB fill) or the hardware caches partial page-walks (ie. caches page directories). Even on UP this might give issues since mmu_gather is preemptible these days. An interrupt or preempted task accessing user pages might stumble into the free page if the hardware caches page directories. This patch series fixes ppc64 and add generic MMU_GATHER changes to support the conversion of other architectures. I haven't added patches w.r.t other architecture because they are yet to be acked. This patch (of 9): A followup patch is going to make sure we correctly invalidate page walk cache before we free page table pages. In order to keep things simple enable RCU_TABLE_FREE even for !SMP so that we don't have to fixup the !SMP case differently in the followup patch !SMP case is right now broken for radix translation w.r.t page walk cache flush. We can get interrupted in between page table free and that would imply we have page walk cache entries pointing to tables which got freed already. Michael said "both our platforms that run on Power9 force SMP on in Kconfig, so the !SMP case is unlikely to be a problem for anyone in practice, unless they've hacked their kernel to build it !SMP." Link: http://lkml.kernel.org/r/20200116064531.483522-2-aneesh.kumar@linux.ibm.com Signed-off-by: Aneesh Kumar K.V Acked-by: Peter Zijlstra (Intel) Acked-by: Michael Ellerman Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e47690d756a760579141560ded06ec1020dd85e8 Author: Steven Price Date: Mon Feb 3 17:36:42 2020 -0800 x86: mm: avoid allocating struct mm_struct on the stack struct mm_struct is quite large (~1664 bytes) and so allocating on the stack may cause problems as the kernel stack size is small. Since ptdump_walk_pgd_level_core() was only allocating the structure so that it could modify the pgd argument we can instead introduce a pgd override in struct mm_walk and pass this down the call stack to where it is needed. Since the correct mm_struct is now being passed down, it is now also unnecessary to take the mmap_sem semaphore because ptdump_walk_pgd() will now take the semaphore on the real mm. [steven.price@arm.com: restore missed arm64 changes] Link: http://lkml.kernel.org/r/20200108145710.34314-1-steven.price@arm.com Link: http://lkml.kernel.org/r/20200108145710.34314-1-steven.price@arm.com Signed-off-by: Steven Price Reported-by: Stephen Rothwell Cc: Catalin Marinas Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f8f0d0b6fa203bfa363d30f34f6fecce9e5cc2f7 Author: Steven Price Date: Mon Feb 3 17:36:38 2020 -0800 mm: ptdump: reduce level numbers by 1 in note_page() Rather than having to increment the 'depth' number by 1 in ptdump_hole(), let's change the meaning of 'level' in note_page() since that makes the code simplier. Note that for x86, the level numbers were previously increased by 1 in commit 45dcd2091363 ("x86/mm/dump_pagetables: Fix printout of p4d level") and the comment "Bit 7 has a different meaning" was not updated, so this change also makes the code match the comment again. Link: http://lkml.kernel.org/r/20191218162402.45610-24-steven.price@arm.com Signed-off-by: Steven Price Reviewed-by: Catalin Marinas Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9c7869c7f1720855f90e5bf15539939738d18cb9 Author: Steven Price Date: Mon Feb 3 17:36:34 2020 -0800 arm64: mm: display non-present entries in ptdump Previously the /sys/kernel/debug/kernel_page_tables file would only show lines for entries present in the page tables. However it is useful to also show non-present entries as this makes the size and level of the holes more visible. This aligns the behaviour with x86 which also shows holes. Link: http://lkml.kernel.org/r/20191218162402.45610-23-steven.price@arm.com Signed-off-by: Steven Price Acked-by: Catalin Marinas Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 102f45fdbe420f7d31182a69f4b11e8a6ae998da Author: Steven Price Date: Mon Feb 3 17:36:29 2020 -0800 arm64: mm: convert mm/dump.c to use walk_page_range() Now walk_page_range() can walk kernel page tables, we can switch the arm64 ptdump code over to using it, simplifying the code. Link: http://lkml.kernel.org/r/20191218162402.45610-22-steven.price@arm.com Signed-off-by: Steven Price Reviewed-by: Catalin Marinas Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2ae27137b2db89365f623a7694786cf6d1acb6c7 Author: Steven Price Date: Mon Feb 3 17:36:24 2020 -0800 x86: mm: convert dump_pagetables to use walk_page_range Make use of the new functionality in walk_page_range to remove the arch page walking code and use the generic code to walk the page tables. The effective permissions are passed down the chain using new fields in struct pg_state. The KASAN optimisation is implemented by setting action=CONTINUE in the callbacks to skip an entire tree of entries. Link: http://lkml.kernel.org/r/20191218162402.45610-21-steven.price@arm.com Signed-off-by: Steven Price Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 30d621f6723b1c98a142861f7a52849d286bc7fa Author: Steven Price Date: Mon Feb 3 17:36:20 2020 -0800 mm: add generic ptdump Add a generic version of page table dumping that architectures can opt-in to. Link: http://lkml.kernel.org/r/20191218162402.45610-20-steven.price@arm.com Signed-off-by: Steven Price Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c5cfae12fdd50809b16482c13a94fa6cf1e45b31 Author: Steven Price Date: Mon Feb 3 17:36:16 2020 -0800 x86: mm: convert ptdump_walk_pgd_level_debugfs() to take an mm_struct To enable x86 to use the generic walk_page_range() function, the callers of ptdump_walk_pgd_level_debugfs() need to pass in the mm_struct. This means that ptdump_walk_pgd_level_core() is now always passed a valid pgd, so drop the support for pgd==NULL. Link: http://lkml.kernel.org/r/20191218162402.45610-19-steven.price@arm.com Signed-off-by: Steven Price Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e455248d5ee9c8a12469d21cfa92c8432be4a4fd Author: Steven Price Date: Mon Feb 3 17:36:11 2020 -0800 x86: mm+efi: convert ptdump_walk_pgd_level() to take a mm_struct To enable x86 to use the generic walk_page_range() function, the callers of ptdump_walk_pgd_level() need to pass an mm_struct rather than the raw pgd_t pointer. Luckily since commit 7e904a91bf60 ("efi: Use efi_mm in x86 as well as ARM") we now have an mm_struct for EFI on x86. Link: http://lkml.kernel.org/r/20191218162402.45610-18-steven.price@arm.com Signed-off-by: Steven Price Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 74d2aaa16f15254373ae53189c38eedc20a2df8e Author: Steven Price Date: Mon Feb 3 17:36:07 2020 -0800 x86: mm: point to struct seq_file from struct pg_state mm/dump_pagetables.c passes both struct seq_file and struct pg_state down the chain of walk_*_level() functions to be passed to note_page(). Instead place the struct seq_file in struct pg_state and access it from struct pg_state (which is private to this file) in note_page(). Link: http://lkml.kernel.org/r/20191218162402.45610-17-steven.price@arm.com Signed-off-by: Steven Price Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b7a16c7ad790d0ecb44dcb08a6a75d0d0455ab5f Author: Steven Price Date: Mon Feb 3 17:36:03 2020 -0800 mm: pagewalk: add 'depth' parameter to pte_hole The pte_hole() callback is called at multiple levels of the page tables. Code dumping the kernel page tables needs to know what at what depth the missing entry is. Add this is an extra parameter to pte_hole(). When the depth isn't know (e.g. processing a vma) then -1 is passed. The depth that is reported is the actual level where the entry is missing (ignoring any folding that is in place), i.e. any levels where PTRS_PER_P?D is set to 1 are ignored. Note that depth starts at 0 for a PGD so that PUD/PMD/PTE retain their natural numbers as levels 2/3/4. Link: http://lkml.kernel.org/r/20191218162402.45610-16-steven.price@arm.com Signed-off-by: Steven Price Tested-by: Zong Li Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c02a98753e0a36ba65a05818626fa6adeb4e7c97 Author: Steven Price Date: Mon Feb 3 17:35:58 2020 -0800 mm: pagewalk: fix termination condition in walk_pte_range() If walk_pte_range() is called with a 'end' argument that is beyond the last page of memory (e.g. ~0UL) then the comparison between 'addr' and 'end' will always fail and the loop will be infinite. Instead change the comparison to >= while accounting for overflow. Link: http://lkml.kernel.org/r/20191218162402.45610-15-steven.price@arm.com Signed-off-by: Steven Price Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fbf56346b855872db45af7c1274180f9d91f46cd Author: Steven Price Date: Mon Feb 3 17:35:54 2020 -0800 mm: pagewalk: don't lock PTEs for walk_page_range_novma() walk_page_range_novma() can be used to walk page tables or the kernel or for firmware. These page tables may contain entries that are not backed by a struct page and so it isn't (in general) possible to take the PTE lock for the pte_entry() callback. So update walk_pte_range() to only take the lock when no_vma==false by splitting out the inner loop to a separate function and add a comment explaining the difference to walk_page_range_novma(). Link: http://lkml.kernel.org/r/20191218162402.45610-14-steven.price@arm.com Signed-off-by: Steven Price Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 488ae6a2b933cb538b5d91b1c0a3420188d28771 Author: Steven Price Date: Mon Feb 3 17:35:50 2020 -0800 mm: pagewalk: allow walking without vma Since 48684a65b4e3: "mm: pagewalk: fix misbehavior of walk_page_range for vma(VM_PFNMAP)", page_table_walk() will report any kernel area as a hole, because it lacks a vma. This means each arch has re-implemented page table walking when needed, for example in the per-arch ptdump walker. Remove the requirement to have a vma in the generic code and add a new function walk_page_range_novma() which ignores the VMAs and simply walks the page tables. Link: http://lkml.kernel.org/r/20191218162402.45610-13-steven.price@arm.com Signed-off-by: Steven Price Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3afc423632a194d7d6afef34e4bb98f804cd071d Author: Steven Price Date: Mon Feb 3 17:35:45 2020 -0800 mm: pagewalk: add p4d_entry() and pgd_entry() pgd_entry() and pud_entry() were removed by commit 0b1fbfe50006c410 ("mm/pagewalk: remove pgd_entry() and pud_entry()") because there were no users. We're about to add users so reintroduce them, along with p4d_entry() as we now have 5 levels of tables. Note that commit a00cc7d9dd93d66a ("mm, x86: add support for PUD-sized transparent hugepages") already re-added pud_entry() but with different semantics to the other callbacks. This commit reverts the semantics back to match the other callbacks. To support hmm.c which now uses the new semantics of pud_entry() a new member ('action') of struct mm_walk is added which allows the callbacks to either descend (ACTION_SUBTREE, the default), skip (ACTION_CONTINUE) or repeat the callback (ACTION_AGAIN). hmm.c is then updated to call pud_trans_huge_lock() itself and make use of the splitting/retry logic of the core code. After this change pud_entry() is called for all entries, not just transparent huge pages. [arnd@arndb.de: fix unused variable warning] Link: http://lkml.kernel.org/r/20200107204607.1533842-1-arnd@arndb.de Link: http://lkml.kernel.org/r/20191218162402.45610-12-steven.price@arm.com Signed-off-by: Steven Price Signed-off-by: Arnd Bergmann Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 757b2a4ab560b84d1859cfdfb9c7489af4ef5fd6 Author: Steven Price Date: Mon Feb 3 17:35:41 2020 -0800 x86: mm: add p?d_leaf() definitions walk_page_range() is going to be allowed to walk page tables other than those of user space. For this it needs to know when it has reached a 'leaf' entry in the page tables. This information is provided by the p?d_leaf() functions/macros. For x86 we already have p?d_large() functions, so simply add macros to provide the generic p?d_leaf() names for the generic code. Link: http://lkml.kernel.org/r/20191218162402.45610-11-steven.price@arm.com Signed-off-by: Steven Price Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8094249358d6d79fdf9ac6f990d5fa3f56bfabaa Author: Steven Price Date: Mon Feb 3 17:35:36 2020 -0800 sparc: mm: add p?d_leaf() definitions walk_page_range() is going to be allowed to walk page tables other than those of user space. For this it needs to know when it has reached a 'leaf' entry in the page tables. This information is provided by the p?d_leaf() functions/macros. For sparc 64 bit, pmd_large() and pud_large() are already provided, so add macros to provide the p?d_leaf names required by the generic code. Link: http://lkml.kernel.org/r/20191218162402.45610-10-steven.price@arm.com Signed-off-by: Steven Price Acked-by: David S. Miller Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8d2109f2998288c6cca1be9402442170ac5eb61e Author: Steven Price Date: Mon Feb 3 17:35:32 2020 -0800 s390: mm: add p?d_leaf() definitions walk_page_range() is going to be allowed to walk page tables other than those of user space. For this it needs to know when it has reached a 'leaf' entry in the page tables. This information is provided by the p?d_leaf() functions/macros. For s390, pud_large() and pmd_large() are already implemented as static inline functions. Add a macro to provide the p?d_leaf names for the generic code to use. Link: http://lkml.kernel.org/r/20191218162402.45610-9-steven.price@arm.com Signed-off-by: Steven Price Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dave Hansen Cc: David S. Miller Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit af6513ead0462ce64dde48386d42098da682b882 Author: Steven Price Date: Mon Feb 3 17:35:28 2020 -0800 riscv: mm: add p?d_leaf() definitions walk_page_range() is going to be allowed to walk page tables other than those of user space. For this it needs to know when it has reached a 'leaf' entry in the page tables. This information is provided by the p?d_leaf() functions/macros. For riscv a page is a leaf page when it has a read, write or execute bit set on it. Link: http://lkml.kernel.org/r/20191218162402.45610-8-steven.price@arm.com Signed-off-by: Steven Price Reviewed-by: Alexandre Ghiti Reviewed-by: Zong Li Acked-by: Paul Walmsley [arch/riscv] Cc: Albert Ou Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 070434b13b6ef3d41fa5ebe25d73aa31b359b0c4 Author: Steven Price Date: Mon Feb 3 17:35:24 2020 -0800 powerpc: mm: add p?d_leaf() definitions walk_page_range() is going to be allowed to walk page tables other than those of user space. For this it needs to know when it has reached a 'leaf' entry in the page tables. This information is provided by the p?d_leaf() functions/macros. For powerpc p?d_is_leaf() functions already exist. Export them using the new p?d_leaf() name. Link: http://lkml.kernel.org/r/20191218162402.45610-7-steven.price@arm.com Signed-off-by: Steven Price Acked-by: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Paul Burton Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 501b81046701408a23bb11f75f1fb4e8521c64a6 Author: Steven Price Date: Mon Feb 3 17:35:19 2020 -0800 mips: mm: add p?d_leaf() definitions walk_page_range() is going to be allowed to walk page tables other than those of user space. For this it needs to know when it has reached a 'leaf' entry in the page tables. This information is provided by the p?d_leaf() functions/macros. If _PAGE_HUGE is defined we can simply look for it. When not defined we can be confident that there are no leaf pages in existence and fall back on the generic implementation (added in a later patch) which returns 0. Link: http://lkml.kernel.org/r/20191218162402.45610-6-steven.price@arm.com Signed-off-by: Steven Price Acked-by: Paul Burton Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8aa82df3c123129025a364d8f823929cc488b834 Author: Steven Price Date: Mon Feb 3 17:35:14 2020 -0800 arm64: mm: add p?d_leaf() definitions walk_page_range() is going to be allowed to walk page tables other than those of user space. For this it needs to know when it has reached a 'leaf' entry in the page tables. This information will be provided by the p?d_leaf() functions/macros. For arm64, we already have p?d_sect() macros which we can reuse for p?d_leaf(). pud_sect() is defined as a dummy function when CONFIG_PGTABLE_LEVELS < 3 or CONFIG_ARM64_64K_PAGES is defined. However when the kernel is configured this way then architecturally it isn't allowed to have a large page at this level, and any code using these page walking macros is implicitly relying on the page size/number of levels being the same as the kernel. So it is safe to reuse this for p?d_leaf() as it is an architectural restriction. Link: http://lkml.kernel.org/r/20191218162402.45610-5-steven.price@arm.com Signed-off-by: Steven Price Acked-by: Catalin Marinas Cc: Catalin Marinas Cc: Will Deacon Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8a0af66b35f8c8df3c50b4153f5141be6d4d8158 Author: Steven Price Date: Mon Feb 3 17:35:10 2020 -0800 arm: mm: add p?d_leaf() definitions walk_page_range() is going to be allowed to walk page tables other than those of user space. For this it needs to know when it has reached a 'leaf' entry in the page tables. This information is provided by the p?d_leaf() functions/macros. For arm pmd_large() already exists and does what we want. So simply provide the generic pmd_leaf() name. Link: http://lkml.kernel.org/r/20191218162402.45610-4-steven.price@arm.com Signed-off-by: Steven Price Cc: Russell King Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4f6b2c083c86c7b13cb7900e7d3a6f18e38ba724 Author: Steven Price Date: Mon Feb 3 17:35:06 2020 -0800 arc: mm: add p?d_leaf() definitions walk_page_range() is going to be allowed to walk page tables other than those of user space. For this it needs to know when it has reached a 'leaf' entry in the page tables. This information will be provided by the p?d_leaf() functions/macros. For arc, we only have two levels, so only pmd_leaf() is needed. Link: http://lkml.kernel.org/r/20191218162402.45610-3-steven.price@arm.com Signed-off-by: Steven Price Acked-by: Vineet Gupta Cc: Albert Ou Cc: Alexandre Ghiti Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Dave Hansen Cc: David S. Miller Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: James Hogan Cc: James Morse Cc: Jerome Glisse Cc: "Liang, Kan" Cc: Mark Rutland Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Russell King Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Will Deacon Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 93fab1b22ef7c4abcbc760ce4432762b02e7f3d1 Author: Steven Price Date: Mon Feb 3 17:35:01 2020 -0800 mm: add generic p?d_leaf() macros Patch series "Generic page walk and ptdump", v17. Many architectures current have a debugfs file for dumping the kernel page tables. Currently each architecture has to implement custom functions for this because the details of walking the page tables used by the kernel are different between architectures. This series extends the capabilities of walk_page_range() so that it can deal with the page tables of the kernel (which have no VMAs and can contain larger huge pages than exist for user space). A generic PTDUMP implementation is the implemented making use of the new functionality of walk_page_range() and finally arm64 and x86 are switch to using it, removing the custom table walkers. To enable a generic page table walker to walk the unusual mappings of the kernel we need to implement a set of functions which let us know when the walker has reached the leaf entry. After a suggestion from Will Deacon I've chosen the name p?d_leaf() as this (hopefully) describes the purpose (and is a new name so has no historic baggage). Some architectures have p?d_large macros but this is easily confused with "large pages". This series ends with a generic PTDUMP implemention for arm64 and x86. Mostly this is a clean up and there should be very little functional change. The exceptions are: * arm64 PTDUMP debugfs now displays pages which aren't present (patch 22). * arm64 has the ability to efficiently process KASAN pages (which previously only x86 implemented). This means that the combination of KASAN and DEBUG_WX is now useable. This patch (of 23): Exposing the pud/pgd levels of the page tables to walk_page_range() means we may come across the exotic large mappings that come with large areas of contiguous memory (such as the kernel's linear map). For architectures that don't provide all p?d_leaf() macros, provide generic do nothing default that are suitable where there cannot be leaf pages at that level. Futher patches will add implementations for individual architectures. The name p?d_leaf() is chosen to minimize the confusion with existing uses of "large" pages and "huge" pages which do not necessary mean that the entry is a leaf (for example it may be a set of contiguous entries that only take 1 TLB slot). For the purpose of walking the page tables we don't need to know how it will be represented in the TLB, but we do need to know for sure if it is a leaf of the tree. Link: http://lkml.kernel.org/r/20191218162402.45610-2-steven.price@arm.com Signed-off-by: Steven Price Acked-by: Mark Rutland Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Catalin Marinas Cc: Dave Hansen Cc: Ingo Molnar Cc: James Morse Cc: Jerome Glisse Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Will Deacon Cc: "H. Peter Anvin" Cc: "Liang, Kan" Cc: Albert Ou Cc: Alexandre Ghiti Cc: Benjamin Herrenschmidt Cc: Christian Borntraeger Cc: David S. Miller Cc: Heiko Carstens Cc: James Hogan Cc: Michael Ellerman Cc: Paul Burton Cc: Paul Mackerras Cc: Paul Walmsley Cc: Ralf Baechle Cc: Russell King Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Zong Li Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1c948715a159d0d02c1e1c9228327ba3c408795c Author: Florian Westphal Date: Mon Feb 3 17:34:58 2020 -0800 mm: remove __krealloc Since 5.5-rc1 the last user of this function is gone, so remove the functionality. See commit 2ad9d7747c10 ("netfilter: conntrack: free extension area immediately") for details. Link: http://lkml.kernel.org/r/20191212223442.22141-1-fw@strlen.de Signed-off-by: Florian Westphal Acked-by: Andrew Morton Acked-by: David Rientjes Reviewed-by: David Hildenbrand Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9a8c8b431b21cddb31c43c090ad1678a999e18fa Author: Randy Dunlap Date: Mon Feb 3 17:34:55 2020 -0800 pinctrl: fix pxa2xx.c build warnings Add #include of to fix build warnings in pinctrl-pxa2xx.c. Fixes these warnings: In file included from ../drivers/pinctrl/pxa/pinctrl-pxa2xx.c:24:0: ../drivers/pinctrl/pxa/../pinctrl-utils.h:36:8: warning: `enum pinctrl_map_type' declared inside parameter list [enabled by default] enum pinctrl_map_type type); ^ ../drivers/pinctrl/pxa/../pinctrl-utils.h:36:8: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] Link: http://lkml.kernel.org/r/0024542e-cba9-8f13-6c18-32d0050a6007@infradead.org Signed-off-by: Randy Dunlap Cc: Robert Jarzmik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 046755a28f9ddc95fd153e76e62d4b3205ac79cd Author: Andrew Morton Date: Mon Feb 3 17:34:52 2020 -0800 drivers/block/null_blk_main.c: fix uninitialized var warnings With gcc-7.2, many instances of drivers/block/null_blk_main.c: In function ‘nullb_device_zone_nr_conv_store’: drivers/block/null_blk_main.c:291:12: warning: ‘new_value’ may be used uninitialized in this function [-Wmaybe-uninitialized] dev->NAME = new_value; \ ^ drivers/block/null_blk_main.c:279:7: note: ‘new_value’ was declared here TYPE new_value; \ ^ Presumably notabug, so use uninitialized_var() to suppress them. Cc: Shaohua Li Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ca0a95a6ac0c444d782abdcb44fd633a5c320d61 Author: Andrew Morton Date: Mon Feb 3 17:34:49 2020 -0800 drivers/block/null_blk_main.c: fix layout Each line here overflows 80 cols by exactly one character. Delete one tab per line to fix. Cc: Shaohua Li Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 889b331724c82c11e15ba0a60979cf7bded0a26c Author: Lu Shuaibing Date: Mon Feb 3 17:34:46 2020 -0800 ipc/msg.c: consolidate all xxxctl_down() functions A use of uninitialized memory in msgctl_down() because msqid64 in ksys_msgctl hasn't been initialized. The local | msqid64 | is created in ksys_msgctl() and then passed into msgctl_down(). Along the way msqid64 is never initialized before msgctl_down() checks msqid64->msg_qbytes. KUMSAN(KernelUninitializedMemorySantizer, a new error detection tool) reports: ================================================================== BUG: KUMSAN: use of uninitialized memory in msgctl_down+0x94/0x300 Read of size 8 at addr ffff88806bb97eb8 by task syz-executor707/2022 CPU: 0 PID: 2022 Comm: syz-executor707 Not tainted 5.2.0-rc4+ #63 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 Call Trace: dump_stack+0x75/0xae __kumsan_report+0x17c/0x3e6 kumsan_report+0xe/0x20 msgctl_down+0x94/0x300 ksys_msgctl.constprop.14+0xef/0x260 do_syscall_64+0x7e/0x1f0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x4400e9 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffd869e0598 EFLAGS: 00000246 ORIG_RAX: 0000000000000047 RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 00000000004400e9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00000000006ca018 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 0000000000401970 R13: 0000000000401a00 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the page: page:ffffea0001aee5c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x100000000000000() raw: 0100000000000000 0000000000000000 ffffffff01ae0101 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kumsan: bad access detected ================================================================== Syzkaller reproducer: msgctl$IPC_RMID(0x0, 0x0) C reproducer: // autogenerated by syzkaller (https://github.com/google/syzkaller) int main(void) { syscall(__NR_mmap, 0x20000000, 0x1000000, 3, 0x32, -1, 0); syscall(__NR_msgctl, 0, 0, 0); return 0; } [natechancellor@gmail.com: adjust indentation in ksys_msgctl] Link: https://github.com/ClangBuiltLinux/linux/issues/829 Link: http://lkml.kernel.org/r/20191218032932.37479-1-natechancellor@gmail.com Link: http://lkml.kernel.org/r/20190613014044.24234-1-shuaibinglu@126.com Signed-off-by: Lu Shuaibing Signed-off-by: Nathan Chancellor Suggested-by: Arnd Bergmann Cc: Davidlohr Bueso Cc: Manfred Spraul Cc: NeilBrown From: Andrew Morton Subject: drivers/block/null_blk_main.c: fix layout Each line here overflows 80 cols by exactly one character. Delete one tab per line to fix. Cc: Shaohua Li Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8116b54e7e23ef948ecac0e0ab78d10888265cab Author: Manfred Spraul Date: Mon Feb 3 17:34:42 2020 -0800 ipc/sem.c: document and update memory barriers Document and update the memory barriers in ipc/sem.c: - Add smp_store_release() to wake_up_sem_queue_prepare() and document why it is needed. - Read q->status using READ_ONCE+smp_acquire__after_ctrl_dep(). as the pair for the barrier inside wake_up_sem_queue_prepare(). - Add comments to all barriers, and mention the rules in the block regarding locking. - Switch to using wake_q_add_safe(). Link: http://lkml.kernel.org/r/20191020123305.14715-6-manfred@colorfullife.com Signed-off-by: Manfred Spraul Cc: Waiman Long Cc: Davidlohr Bueso Cc: <1vier1@web.de> Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0d97a82ba830d89a1e541cc9cd11f1e38c28e416 Author: Manfred Spraul Date: Mon Feb 3 17:34:39 2020 -0800 ipc/msg.c: update and document memory barriers Transfer findings from ipc/mqueue.c: - A control barrier was missing for the lockless receive case So in theory, not yet initialized data may have been copied to user space - obviously only for architectures where control barriers are not NOP. - use smp_store_release(). In theory, the refount may have been decreased to 0 already when wake_q_add() tries to get a reference. Link: http://lkml.kernel.org/r/20191020123305.14715-5-manfred@colorfullife.com Signed-off-by: Manfred Spraul Cc: Waiman Long Cc: Davidlohr Bueso Cc: <1vier1@web.de> Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c5b2cbdbdac563f46ecd5e187253ab1abbd6fc04 Author: Manfred Spraul Date: Mon Feb 3 17:34:36 2020 -0800 ipc/mqueue.c: update/document memory barriers Update and document memory barriers for mqueue.c: - ewp->state is read without any locks, thus READ_ONCE is required. - add smp_aquire__after_ctrl_dep() after the READ_ONCE, we need acquire semantics if the value is STATE_READY. - use wake_q_add_safe() - document why __set_current_state() may be used: Reading task->state cannot happen before the wake_q_add() call, which happens while holding info->lock. Thus the spin_unlock() is the RELEASE, and the spin_lock() is the ACQUIRE. For completeness: there is also a 3 CPU scenario, if the to be woken up task is already on another wake_q. Then: - CPU1: spin_unlock() of the task that goes to sleep is the RELEASE - CPU2: the spin_lock() of the waker is the ACQUIRE - CPU2: smp_mb__before_atomic inside wake_q_add() is the RELEASE - CPU3: smp_mb__after_spinlock() inside try_to_wake_up() is the ACQUIRE Link: http://lkml.kernel.org/r/20191020123305.14715-4-manfred@colorfullife.com Signed-off-by: Manfred Spraul Reviewed-by: Davidlohr Bueso Cc: Waiman Long Cc: <1vier1@web.de> Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ed29f171518cbe11c81e8c20d393bb094a9e2ce7 Author: Davidlohr Bueso Date: Mon Feb 3 17:34:32 2020 -0800 ipc/mqueue.c: remove duplicated code pipelined_send() and pipelined_receive() are identical, so merge them. [manfred@colorfullife.com: add changelog] Link: http://lkml.kernel.org/r/20191020123305.14715-3-manfred@colorfullife.com Signed-off-by: Davidlohr Bueso Signed-off-by: Manfred Spraul Cc: <1vier1@web.de> Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 39323c64b8a95d10ddc66dc815dd14efdddf6777 Author: Manfred Spraul Date: Mon Feb 3 17:34:29 2020 -0800 smp_mb__{before,after}_atomic(): update Documentation When adding the _{acquire|release|relaxed}() variants of some atomic operations, it was forgotten to update Documentation/memory_barrier.txt: smp_mb__{before,after}_atomic() is now intended for all RMW operations that do not imply a memory barrier. 1) smp_mb__before_atomic(); atomic_add(); 2) smp_mb__before_atomic(); atomic_xchg_relaxed(); 3) smp_mb__before_atomic(); atomic_fetch_add_relaxed(); Invalid would be: smp_mb__before_atomic(); atomic_set(); In addition, the patch splits the long sentence into multiple shorter sentences. Link: http://lkml.kernel.org/r/20191020123305.14715-2-manfred@colorfullife.com Fixes: 654672d4ba1a ("locking/atomics: Add _{acquire|release|relaxed}() variants of some atomic operations") Signed-off-by: Manfred Spraul Acked-by: Waiman Long Cc: Davidlohr Bueso Cc: Peter Zijlstra Cc: Will Deacon Cc: Peter Zijlstra Cc: <1vier1@web.de> Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 92917998849eea951707c8fea2dc3007bb2ad2cd Author: David Hildenbrand Date: Mon Feb 3 17:34:26 2020 -0800 mm/memory_hotplug: drop valid_start/valid_end from test_pages_in_a_zone() The callers are only interested in the actual zone, they don't care about boundaries. Return the zone instead to simplify. Link: http://lkml.kernel.org/r/20200110183308.11849-1-david@redhat.com Signed-off-by: David Hildenbrand Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Michal Hocko Cc: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 52fb87c81f11daa7027af25fc24ac7974eb8f45a Author: David Hildenbrand Date: Mon Feb 3 17:34:23 2020 -0800 mm/memory_hotplug: cleanup __remove_pages() Let's drop the basically unused section stuff and simplify. Also, let's use a shorter variant to calculate the number of pages to the next section boundary. Link: http://lkml.kernel.org/r/20191006085646.5768-11-david@redhat.com Signed-off-by: David Hildenbrand Cc: Oscar Salvador Cc: Michal Hocko Cc: "Matthew Wilcox (Oracle)" Cc: "Aneesh Kumar K.V" Cc: Pavel Tatashin Cc: Greg Kroah-Hartman Cc: Dan Williams Cc: Logan Gunthorpe Cc: Pankaj Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5d12071c5de8621b911ac77dd1a3929f3aee7335 Author: David Hildenbrand Date: Mon Feb 3 17:34:19 2020 -0800 mm/memory_hotplug: drop local variables in shrink_zone_span() Get rid of the unnecessary local variables. Link: http://lkml.kernel.org/r/20191006085646.5768-10-david@redhat.com Signed-off-by: David Hildenbrand Cc: "Aneesh Kumar K.V" Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: Logan Gunthorpe Cc: "Matthew Wilcox (Oracle)" Cc: Michal Hocko Cc: Oscar Salvador Cc: Pankaj Gupta Cc: Pavel Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 950b68d9178b6209e92461ec371eee81f0f20190 Author: David Hildenbrand Date: Mon Feb 3 17:34:16 2020 -0800 mm/memory_hotplug: don't check for "all holes" in shrink_zone_span() If we have holes, the holes will automatically get detected and removed once we remove the next bigger/smaller section. The extra checks can go. Link: http://lkml.kernel.org/r/20191006085646.5768-9-david@redhat.com Signed-off-by: David Hildenbrand Cc: Michal Hocko Cc: "Matthew Wilcox (Oracle)" Cc: "Aneesh Kumar K.V" Cc: Pavel Tatashin Cc: Greg Kroah-Hartman Cc: Dan Williams Cc: Logan Gunthorpe Cc: Oscar Salvador Cc: Pankaj Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9b05158f5d805e0cf373f6e5a43efb9306bcb6a2 Author: David Hildenbrand Date: Mon Feb 3 17:34:12 2020 -0800 mm/memory_hotplug: we always have a zone in find_(smallest|biggest)_section_pfn With shrink_pgdat_span() out of the way, we now always have a valid zone. Link: http://lkml.kernel.org/r/20191006085646.5768-8-david@redhat.com Signed-off-by: David Hildenbrand Cc: Michal Hocko Cc: "Matthew Wilcox (Oracle)" Cc: "Aneesh Kumar K.V" Cc: Pavel Tatashin Cc: Greg Kroah-Hartman Cc: Dan Williams Cc: Logan Gunthorpe Cc: Oscar Salvador Cc: Pankaj Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d33695b16a9f0b5f62aefb0a4e073509690ee533 Author: David Hildenbrand Date: Mon Feb 3 17:34:09 2020 -0800 mm/memory_hotplug: poison memmap in remove_pfn_range_from_zone() Let's poison the pages similar to when adding new memory in sparse_add_section(). Also call remove_pfn_range_from_zone() from memunmap_pages(), so we can poison the memmap from there as well. Link: http://lkml.kernel.org/r/20191006085646.5768-7-david@redhat.com Signed-off-by: David Hildenbrand Cc: Michal Hocko Cc: "Matthew Wilcox (Oracle)" Cc: "Aneesh Kumar K.V" Cc: Pavel Tatashin Cc: Greg Kroah-Hartman Cc: Dan Williams Cc: Logan Gunthorpe Cc: Oscar Salvador Cc: Pankaj Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1f8d75c1b7dc62f017c542ca99e7da4a0839fb1e Author: Aneesh Kumar K.V Date: Mon Feb 3 17:34:06 2020 -0800 mm/memmap_init: update variable name in memmap_init_zone Patch series "mm/memory_hotplug: Shrink zones before removing memory", v6. This series fixes the access of uninitialized memmaps when shrinking zones/nodes and when removing memory. Also, it contains all fixes for crashes that can be triggered when removing certain namespace using memunmap_pages() - ZONE_DEVICE, reported by Aneesh. We stop trying to shrink ZONE_DEVICE, as it's buggy, fixing it would be more involved (we don't have SECTION_IS_ONLINE as an indicator), and shrinking is only of limited use (set_zone_contiguous() cannot detect the ZONE_DEVICE as contiguous). We continue shrinking !ZONE_DEVICE zones, however, I reduced the amount of code to a minimum. Shrinking is especially necessary to keep zone->contiguous set where possible, especially, on memory unplug of DIMMs at zone boundaries. -------------------------------------------------------------------------- Zones are now properly shrunk when offlining memory blocks or when onlining failed. This allows to properly shrink zones on memory unplug even if the separate memory blocks of a DIMM were onlined to different zones or re-onlined to a different zone after offlining. Example: :/# cat /proc/zoneinfo Node 1, zone Movable spanned 0 present 0 managed 0 :/# echo "online_movable" > /sys/devices/system/memory/memory41/state :/# echo "online_movable" > /sys/devices/system/memory/memory43/state :/# cat /proc/zoneinfo Node 1, zone Movable spanned 98304 present 65536 managed 65536 :/# echo 0 > /sys/devices/system/memory/memory43/online :/# cat /proc/zoneinfo Node 1, zone Movable spanned 32768 present 32768 managed 32768 :/# echo 0 > /sys/devices/system/memory/memory41/online :/# cat /proc/zoneinfo Node 1, zone Movable spanned 0 present 0 managed 0 This patch (of 6): The third argument is actually number of pages. Change the variable name from size to nr_pages to indicate this better. No functional change in this patch. Link: http://lkml.kernel.org/r/20191006085646.5768-3-david@redhat.com Signed-off-by: Aneesh Kumar K.V Signed-off-by: David Hildenbrand Reviewed-by: Pankaj Gupta Reviewed-by: David Hildenbrand Cc: Michal Hocko Cc: "Matthew Wilcox (Oracle)" Cc: "Aneesh Kumar K.V" Cc: Pavel Tatashin Cc: Greg Kroah-Hartman Cc: Dan Williams Cc: Logan Gunthorpe Cc: Oscar Salvador Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4c6058814ec4460c25111e29452ef596acdcd61b Author: David Hildenbrand Date: Mon Feb 3 17:34:02 2020 -0800 mm: factor out next_present_section_nr() Let's move it to the header and use the shorter variant from mm/page_alloc.c (the original one will also check "__highest_present_section_nr + 1", which is not necessary). While at it, make the section_nr in next_pfn() const. In next_pfn(), we now return section_nr_to_pfn(-1) instead of -1 once we exceed __highest_present_section_nr, which doesn't make a difference in the caller as it is big enough (>= all sane end_pfn). Link: http://lkml.kernel.org/r/20200113144035.10848-3-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Kirill A. Shutemov Cc: Baoquan He Cc: Dan Williams Cc: "Jin, Zhi" Cc: "Kirill A. Shutemov" Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Oscar Salvador Cc: Pavel Tatashin Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 948c436e463d34e0d716aff0f333bb74471e5399 Author: David Hildenbrand Date: Mon Feb 3 17:33:59 2020 -0800 mm/page_alloc: fix and rework pfn handling in memmap_init_zone() Let's update the pfn manually whenever we continue the loop. This makes the code easier to read but also less error prone (and we can directly fix one issue). When overlap_memmap_init() returns true, pfn is updated to "memblock_region_memory_end_pfn(r)". So it already points at the *next* pfn to process. Incrementing the pfn another time is wrong, we might leave one uninitialized. I spotted this by inspecting the code, so I have no idea if this is relevant in practise (with kernelcore=mirror). Link: http://lkml.kernel.org/r/20200113144035.10848-2-david@redhat.com Fixes: a9a9e77fbf27 ("mm: move mirrored memory specific code outside of memmap_init_zone") Signed-off-by: David Hildenbrand Acked-by: Kirill A. Shutemov Reviewed-by: Alexander Duyck Cc: Pavel Tatashin Cc: Michal Hocko Cc: Oscar Salvador Cc: Kirill A. Shutemov Cc: Baoquan He Cc: Dan Williams Cc: Vlastimil Babka Cc: Mel Gorman Cc: "Jin, Zhi" Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4b094b7851bf4bf551ad456195d3f26e1c03bd74 Author: David Hildenbrand Date: Mon Feb 3 17:33:55 2020 -0800 mm/page_alloc.c: initialize memmap of unavailable memory directly Let's make sure that all memory holes are actually marked PageReserved(), that page_to_pfn() produces reliable results, and that these pages are not detected as "mmap" pages due to the mapcount. E.g., booting a x86-64 QEMU guest with 4160 MB: [ 0.010585] Early memory node ranges [ 0.010586] node 0: [mem 0x0000000000001000-0x000000000009efff] [ 0.010588] node 0: [mem 0x0000000000100000-0x00000000bffdefff] [ 0.010589] node 0: [mem 0x0000000100000000-0x0000000143ffffff] max_pfn is 0x144000. Before this change: [root@localhost ~]# ./page-types -r -a 0x144000, flags page-count MB symbolic-flags long-symbolic-flags 0x0000000000000800 16384 64 ___________M_______________________________ mmap total 16384 64 After this change: [root@localhost ~]# ./page-types -r -a 0x144000, flags page-count MB symbolic-flags long-symbolic-flags 0x0000000100000000 16384 64 ___________________________r_______________ reserved total 16384 64 IOW, especially the unavailable physical memory ("memory hole") in the last section would not get properly marked PageReserved() and is indicated to be "mmap" memory. Drop the trace of that function from include/linux/mm.h - nobody else needs it, and rename it accordingly. Note: The fake zone/node might not be covered by the zone/node span. This is not an urgent issue (for now, we had the same node/zone due to the zeroing). We'll need a clean way to mark memory holes (e.g., using a page type PageHole() if possible or a fake ZONE_INVALID) and eventually stop marking these memory holes PageReserved(). Link: http://lkml.kernel.org/r/20191211163201.17179-4-david@redhat.com Signed-off-by: David Hildenbrand Cc: Oscar Salvador Cc: Michal Hocko Cc: Dan Williams Cc: Alexey Dobriyan Cc: Bob Picco Cc: Daniel Jordan Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Pavel Tatashin Cc: Stephen Rothwell Cc: Steven Sistare Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit abec749facfff7fece8732be2f8f0bf56d78950b Author: David Hildenbrand Date: Mon Feb 3 17:33:52 2020 -0800 fs/proc/page.c: allow inspection of last section and fix end detection If max_pfn does not fall onto a section boundary, it is possible to inspect PFNs up to max_pfn, and PFNs above max_pfn, however, max_pfn itself can't be inspected. We can have a valid (and online) memmap at and above max_pfn if max_pfn is not aligned to a section boundary. The whole early section has a memmap and is marked online. Being able to inspect the state of these PFNs is valuable for debugging, especially because max_pfn can change on memory hotplug and expose these memmaps. Also, querying page flags via "./page-types -r -a 0x144001," (tools/vm/page-types.c) inside a x86-64 guest with 4160MB under QEMU results in an (almost) endless loop in user space, because the end is not detected properly when starting after max_pfn. Instead, let's allow to inspect all pages in the highest section and return 0 directly if we try to access pages above that section. While at it, check the count before adjusting it, to avoid masking user errors. Link: http://lkml.kernel.org/r/20191211163201.17179-3-david@redhat.com Signed-off-by: David Hildenbrand Cc: Alexey Dobriyan Cc: Oscar Salvador Cc: Michal Hocko Cc: Stephen Rothwell Cc: Bob Picco Cc: Daniel Jordan Cc: Dan Williams Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Pavel Tatashin Cc: Steven Sistare Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e822969cab48b786b64246aad1a3ba2a774f5d23 Author: David Hildenbrand Date: Mon Feb 3 17:33:48 2020 -0800 mm/page_alloc.c: fix uninitialized memmaps on a partially populated last section Patch series "mm: fix max_pfn not falling on section boundary", v2. Playing with different memory sizes for a x86-64 guest, I discovered that some memmaps (highest section if max_mem does not fall on the section boundary) are marked as being valid and online, but contain garbage. We have to properly initialize these memmaps. Looking at /proc/kpageflags and friends, I found some more issues, partially related to this. This patch (of 3): If max_pfn is not aligned to a section boundary, we can easily run into BUGs. This can e.g., be triggered on x86-64 under QEMU by specifying a memory size that is not a multiple of 128MB (e.g., 4097MB, but also 4160MB). I was told that on real HW, we can easily have this scenario (esp., one of the main reasons sub-section hotadd of devmem was added). The issue is, that we have a valid memmap (pfn_valid()) for the whole section, and the whole section will be marked "online". pfn_to_online_page() will succeed, but the memmap contains garbage. E.g., doing a "./page-types -r -a 0x144001" when QEMU was started with "-m 4160M" - (see tools/vm/page-types.c): [ 200.476376] BUG: unable to handle page fault for address: fffffffffffffffe [ 200.477500] #PF: supervisor read access in kernel mode [ 200.478334] #PF: error_code(0x0000) - not-present page [ 200.479076] PGD 59614067 P4D 59614067 PUD 59616067 PMD 0 [ 200.479557] Oops: 0000 [#4] SMP NOPTI [ 200.479875] CPU: 0 PID: 603 Comm: page-types Tainted: G D W 5.5.0-rc1-next-20191209 #93 [ 200.480646] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu4 [ 200.481648] RIP: 0010:stable_page_flags+0x4d/0x410 [ 200.482061] Code: f3 ff 41 89 c0 48 b8 00 00 00 00 01 00 00 00 45 84 c0 0f 85 cd 02 00 00 48 8b 53 08 48 8b 2b 48f [ 200.483644] RSP: 0018:ffffb139401cbe60 EFLAGS: 00010202 [ 200.484091] RAX: fffffffffffffffe RBX: fffffbeec5100040 RCX: 0000000000000000 [ 200.484697] RDX: 0000000000000001 RSI: ffffffff9535c7cd RDI: 0000000000000246 [ 200.485313] RBP: ffffffffffffffff R08: 0000000000000000 R09: 0000000000000000 [ 200.485917] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000144001 [ 200.486523] R13: 00007ffd6ba55f48 R14: 00007ffd6ba55f40 R15: ffffb139401cbf08 [ 200.487130] FS: 00007f68df717580(0000) GS:ffff9ec77fa00000(0000) knlGS:0000000000000000 [ 200.487804] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 200.488295] CR2: fffffffffffffffe CR3: 0000000135d48000 CR4: 00000000000006f0 [ 200.488897] Call Trace: [ 200.489115] kpageflags_read+0xe9/0x140 [ 200.489447] proc_reg_read+0x3c/0x60 [ 200.489755] vfs_read+0xc2/0x170 [ 200.490037] ksys_pread64+0x65/0xa0 [ 200.490352] do_syscall_64+0x5c/0xa0 [ 200.490665] entry_SYSCALL_64_after_hwframe+0x49/0xbe But it can be triggered much easier via "cat /proc/kpageflags > /dev/null" after cold/hot plugging a DIMM to such a system: [root@localhost ~]# cat /proc/kpageflags > /dev/null [ 111.517275] BUG: unable to handle page fault for address: fffffffffffffffe [ 111.517907] #PF: supervisor read access in kernel mode [ 111.518333] #PF: error_code(0x0000) - not-present page [ 111.518771] PGD a240e067 P4D a240e067 PUD a2410067 PMD 0 This patch fixes that by at least zero-ing out that memmap (so e.g., page_to_pfn() will not crash). Commit 907ec5fca3dc ("mm: zero remaining unavailable struct pages") tried to fix a similar issue, but forgot to consider this special case. After this patch, there are still problems to solve. E.g., not all of these pages falling into a memory hole will actually get initialized later and set PageReserved - they are only zeroed out - but at least the immediate crashes are gone. A follow-up patch will take care of this. Link: http://lkml.kernel.org/r/20191211163201.17179-2-david@redhat.com Fixes: f7f99100d8d9 ("mm: stop zeroing memory during allocation in vmemmap") Signed-off-by: David Hildenbrand Tested-by: Daniel Jordan Cc: Naoya Horiguchi Cc: Pavel Tatashin Cc: Andrew Morton Cc: Steven Sistare Cc: Michal Hocko Cc: Daniel Jordan Cc: Bob Picco Cc: Oscar Salvador Cc: Alexey Dobriyan Cc: Dan Williams Cc: Michal Hocko Cc: Stephen Rothwell Cc: [4.15+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2d797e9ff95ecbcf0a83d657928ed20579444857 Author: Gang He Date: Mon Feb 3 17:33:45 2020 -0800 ocfs2: fix oops when writing cloned file Writing a cloned file triggers a kernel oops and the user-space command process is also killed by the system. The bug can be reproduced stably via: 1) create a file under ocfs2 file system directory. journalctl -b > aa.txt 2) create a cloned file for this file. reflink aa.txt bb.txt 3) write the cloned file with dd command. dd if=/dev/zero of=bb.txt bs=512 count=1 conv=notrunc The dd command is killed by the kernel, then you can see the oops message via dmesg command. [ 463.875404] BUG: kernel NULL pointer dereference, address: 0000000000000028 [ 463.875413] #PF: supervisor read access in kernel mode [ 463.875416] #PF: error_code(0x0000) - not-present page [ 463.875418] PGD 0 P4D 0 [ 463.875425] Oops: 0000 [#1] SMP PTI [ 463.875431] CPU: 1 PID: 2291 Comm: dd Tainted: G OE 5.3.16-2-default [ 463.875433] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 [ 463.875500] RIP: 0010:ocfs2_refcount_cow+0xa4/0x5d0 [ocfs2] [ 463.875505] Code: 06 89 6c 24 38 89 eb f6 44 24 3c 02 74 be 49 8b 47 28 [ 463.875508] RSP: 0018:ffffa2cb409dfce8 EFLAGS: 00010202 [ 463.875512] RAX: ffff8b1ebdca8000 RBX: 0000000000000001 RCX: ffff8b1eb73a9df0 [ 463.875515] RDX: 0000000000056a01 RSI: 0000000000000000 RDI: 0000000000000000 [ 463.875517] RBP: 0000000000000001 R08: ffff8b1eb73a9de0 R09: 0000000000000000 [ 463.875520] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000 [ 463.875522] R13: ffff8b1eb922f048 R14: 0000000000000000 R15: ffff8b1eb922f048 [ 463.875526] FS: 00007f8f44d15540(0000) GS:ffff8b1ebeb00000(0000) knlGS:0000000000000000 [ 463.875529] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 463.875532] CR2: 0000000000000028 CR3: 000000003c17a000 CR4: 00000000000006e0 [ 463.875546] Call Trace: [ 463.875596] ? ocfs2_inode_lock_full_nested+0x18b/0x960 [ocfs2] [ 463.875648] ocfs2_file_write_iter+0xaf8/0xc70 [ocfs2] [ 463.875672] new_sync_write+0x12d/0x1d0 [ 463.875688] vfs_write+0xad/0x1a0 [ 463.875697] ksys_write+0xa1/0xe0 [ 463.875710] do_syscall_64+0x60/0x1f0 [ 463.875743] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 463.875758] RIP: 0033:0x7f8f4482ed44 [ 463.875762] Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 80 00 00 00 [ 463.875765] RSP: 002b:00007fff300a79d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 463.875769] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f8f4482ed44 [ 463.875771] RDX: 0000000000000200 RSI: 000055f771b5c000 RDI: 0000000000000001 [ 463.875774] RBP: 0000000000000200 R08: 00007f8f44af9c78 R09: 0000000000000003 [ 463.875776] R10: 000000000000089f R11: 0000000000000246 R12: 000055f771b5c000 [ 463.875779] R13: 0000000000000200 R14: 0000000000000000 R15: 000055f771b5c000 This regression problem was introduced by commit e74540b28556 ("ocfs2: protect extent tree in ocfs2_prepare_inode_for_write()"). Link: http://lkml.kernel.org/r/20200121050153.13290-1-ghe@suse.com Fixes: e74540b28556 ("ocfs2: protect extent tree in ocfs2_prepare_inode_for_write()"). Signed-off-by: Gang He Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 12efec5602744c5a185049eb4fcfd9aebe01bd6f Author: Al Viro Date: Mon Jan 20 19:49:57 2020 -0500 saner copy_mount_options() don't bother with the byte-by-byte loops, etc. Signed-off-by: Al Viro commit 01d7a356872eec22ef34a33a5f9cfa917d145468 Author: Jens Axboe Date: Mon Feb 3 10:33:42 2020 -0700 aio: prevent potential eventfd recursion on poll If we have nested or circular eventfd wakeups, then we can deadlock if we run them inline from our poll waitqueue wakeup handler. It's also possible to have very long chains of notifications, to the extent where we could risk blowing the stack. Check the eventfd recursion count before calling eventfd_signal(). If it's non-zero, then punt the signaling to async context. This is always safe, as it takes us out-of-line in terms of stack and locking context. Cc: stable@vger.kernel.org # 4.19+ Reviewed-by: Jeff Moyer Signed-off-by: Jens Axboe commit 3e577dcd73a1fdc641bf45e5ea4a37869de221b5 Author: Pavel Begunkov Date: Sat Feb 1 03:58:42 2020 +0300 io_uring: put the flag changing code in the same spot Both iocb_flags() and kiocb_set_rw_flags() are inline and modify kiocb->ki_flags. Place them close, so they can be potentially better optimised. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 6c8a31346925cbb373f84a18428ab3df59d3950e Author: Pavel Begunkov Date: Sat Feb 1 03:58:00 2020 +0300 io_uring: iterate req cache backwards Grab requests from cache-array from the end, so can get by only free_reqs. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 3e69426da2599677ebbe76e2d97a606c4797bd74 Author: Jens Axboe Date: Sat Feb 1 09:22:49 2020 -0700 io_uring: punt even fadvise() WILLNEED to async context Andres correctly points out that read-ahead can block, if it needs to read in meta data (or even just through the page cache page allocations). Play it safe for now and just ensure WILLNEED is also punted to async context. While in there, allow the file settings hints from non-blocking context. They don't need to start/do IO, and we can safely do them inline. Fixes: 4840e418c2fc ("io_uring: add IORING_OP_FADVISE") Reported-by: Andres Freund Signed-off-by: Jens Axboe commit 1a417f4e618e05fba29ba222f1e8555c302376ce Author: Jens Axboe Date: Fri Jan 31 17:16:48 2020 -0700 io_uring: fix sporadic double CQE entry for close We punt close to async for the final fput(), but we log the completion even before that even in that case. We rely on the request not having a files table assigned to detect what the final async close should do. However, if we punt the async queue to __io_queue_sqe(), we'll get ->files assigned and this makes io_close_finish() think it should both close the filp again (which does no harm) AND log a new CQE event for this request. This causes duplicate CQEs. Queue the request up for async manually so we don't grab files needlessly and trigger this condition. Signed-off-by: Jens Axboe commit 9250f9ee194dc3dcee28a42a1533fa2cc0edd215 Author: Pavel Begunkov Date: Sat Feb 1 01:22:08 2020 +0300 io_uring: remove extra ->file check It won't ever get into io_prep_rw() when req->file haven't been set in io_req_set_file(), hence remove the check. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 5d204bcfa09330972ad3428a8f81c23f371d3e6d Author: Jens Axboe Date: Fri Jan 31 12:06:52 2020 -0700 io_uring: don't map read/write iovec potentially twice If we have a read/write that is deferred, we already setup the async IO context for that request, and mapped it. When we later try and execute the request and we get -EAGAIN, we don't want to attempt to re-map it. If we do, we end up with garbage in the iovec, which typically leads to an -EFAULT or -EINVAL completion. Cc: stable@vger.kernel.org # 5.5 Reported-by: Dan Melnic Signed-off-by: Jens Axboe commit 0b7b21e42ba2d6ac9595a4358a9354249605a3af Author: Jens Axboe Date: Fri Jan 31 08:34:59 2020 -0700 io_uring: use the proper helpers for io_send/recv Don't use the recvmsg/sendmsg helpers, use the same helpers that the recv(2) and send(2) system calls use. Reported-by: 李通洲 Signed-off-by: Jens Axboe commit f0b493e6b9a8959356983f57112229e69c2f7b8c Author: Jens Axboe Date: Sat Feb 1 21:30:11 2020 -0700 io_uring: prevent potential eventfd recursion on poll If we have nested or circular eventfd wakeups, then we can deadlock if we run them inline from our poll waitqueue wakeup handler. It's also possible to have very long chains of notifications, to the extent where we could risk blowing the stack. Check the eventfd recursion count before calling eventfd_signal(). If it's non-zero, then punt the signaling to async context. This is always safe, as it takes us out-of-line in terms of stack and locking context. Cc: stable@vger.kernel.org # 5.1+ Signed-off-by: Jens Axboe commit b5e683d5cab8cd433b06ae178621f083cabd4f63 Author: Jens Axboe Date: Sun Feb 2 08:23:03 2020 -0700 eventfd: track eventfd_signal() recursion depth eventfd use cases from aio and io_uring can deadlock due to circular or resursive calling, when eventfd_signal() tries to grab the waitqueue lock. On top of that, it's also possible to construct notification chains that are deep enough that we could blow the stack. Add a percpu counter that tracks the percpu recursion depth, warn if we exceed it. The counter is also exposed so that users of eventfd_signal() can do the right thing if it's non-zero in the context where it is called. Cc: stable@vger.kernel.org # 4.19+ Signed-off-by: Jens Axboe commit a444ad1432c5a0fb3bd43fc9ac39fb88b1fb141e Merge: 2b5ea2947fbd 245311637fdd Author: Jakub Kicinski Date: Mon Feb 3 15:38:50 2020 -0800 Merge branch 'netdevsim-fix-several-bugs-in-netdevsim-module' Taehee Yoo says: ===================== netdevsim: fix several bugs in netdevsim module This patchset fixes several bugs in netdevsim module. 1. The first patch fixes using uninitialized resources This patch fixes two similar problems, which is to use uninitialized resources. a) In the current code, {new/del}_device_store() use resource, they are initialized by __init(). But, these functions could be called before __init() is finished. So, accessing uninitialized data could occur and it eventually makes panic. b) In the current code, {new/del}_port_store() uses resource, they are initialized by new_device_store(). But thes functions could be called before new_device_store() is finished. 2. The second patch fixes another race condition. The main problem is a race condition in {new/del}_port() and devlink reload function. These functions would allocate and remove resources. So these functions should not be executed concurrently. 3. The third patch fixes a panic in nsim_dev_take_snapshot_write(). nsim_dev_take_snapshot_write() uses nsim_dev and nsim_dev->dummy_region. But these data could be removed by both reload routine and del_device_store(). And these functions could be executed concurrently. 4. The fourth patch fixes stack-out-of-bound in nsim_dev_debugfs_init(). nsim_dev_debugfs_init() provides only 16bytes for name pointer. But, there are some case the name length is over 16bytes. So, stack-out-of-bound occurs. 5. The fifth patch uses IS_ERR instead of IS_ERR_OR_NULL. debugfs_create_{dir/file} doesn't return NULL. So, IS_ERR() is more correct. 6. The sixth patch avoids kmalloc warning. When too large memory allocation is requested by user-space, kmalloc internally prints warning message. That warning message is not necessary. In order to avoid that, it adds __GFP_NOWARN. 7. The last patch removes an unused sdev.c file Change log: v2 -> v3: - Use smp_load_acquire() and smp_store_release() for flag variables. - Change variable names. - Fix deadlock in second patch. - Update lock variable comment. - Add new patch for fixing panic in snapshot_write(). - Include Reviewed-by tags. - Update some log messages and comment. v1 -> v2: - Splits a fixing race condition patch into two patches. - Fix incorrect Fixes tags. - Update comments - Fix use-after-free - Add a new patch, which removes an unused sdev.c file. - Remove a patch, which tries to avoid debugfs warning. ===================== Signed-off-by: Jakub Kicinski commit 245311637fddeca96c1f0758a649eb1fb437978e Author: Taehee Yoo Date: Sat Feb 1 16:43:48 2020 +0000 netdevsim: remove unused sdev code sdev.c code is merged into dev.c and is not used anymore. it would be removed. Reviewed-by: Jakub Kicinski Signed-off-by: Taehee Yoo Signed-off-by: Jakub Kicinski commit 83cf4213bafc4e3c747f0a25ad22cfbf55af7e84 Author: Taehee Yoo Date: Sat Feb 1 16:43:39 2020 +0000 netdevsim: use __GFP_NOWARN to avoid memalloc warning vfnum buffer size and binary_len buffer size is received by user-space. So, this buffer size could be too large. If so, kmalloc will internally print a warning message. This warning message is actually not necessary for the netdevsim module. So, this patch adds __GFP_NOWARN. Test commands: modprobe netdevsim echo 1 > /sys/bus/netdevsim/new_device echo 1000000000 > /sys/devices/netdevsim1/sriov_numvfs Splat looks like: [ 357.847266][ T1000] WARNING: CPU: 0 PID: 1000 at mm/page_alloc.c:4738 __alloc_pages_nodemask+0x2f3/0x740 [ 357.850273][ T1000] Modules linked in: netdevsim veth openvswitch nsh nf_conncount nf_nat nf_conntrack nf_defrx [ 357.852989][ T1000] CPU: 0 PID: 1000 Comm: bash Tainted: G B 5.5.0-rc5+ #270 [ 357.854334][ T1000] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 357.855703][ T1000] RIP: 0010:__alloc_pages_nodemask+0x2f3/0x740 [ 357.856669][ T1000] Code: 64 fe ff ff 65 48 8b 04 25 c0 0f 02 00 48 05 f0 12 00 00 41 be 01 00 00 00 49 89 47 0 [ 357.860272][ T1000] RSP: 0018:ffff8880b7f47bd8 EFLAGS: 00010246 [ 357.861009][ T1000] RAX: ffffed1016fe8f80 RBX: 1ffff11016fe8fae RCX: 0000000000000000 [ 357.861843][ T1000] RDX: 0000000000000000 RSI: 0000000000000017 RDI: 0000000000000000 [ 357.862661][ T1000] RBP: 0000000000040dc0 R08: 1ffff11016fe8f67 R09: dffffc0000000000 [ 357.863509][ T1000] R10: ffff8880b7f47d68 R11: fffffbfff2798180 R12: 1ffff11016fe8f80 [ 357.864355][ T1000] R13: 0000000000000017 R14: 0000000000000017 R15: ffff8880c2038d68 [ 357.865178][ T1000] FS: 00007fd9a5b8c740(0000) GS:ffff8880d9c00000(0000) knlGS:0000000000000000 [ 357.866248][ T1000] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 357.867531][ T1000] CR2: 000055ce01ba8100 CR3: 00000000b7dbe005 CR4: 00000000000606f0 [ 357.868972][ T1000] Call Trace: [ 357.869423][ T1000] ? lock_contended+0xcd0/0xcd0 [ 357.870001][ T1000] ? __alloc_pages_slowpath+0x21d0/0x21d0 [ 357.870673][ T1000] ? _kstrtoull+0x76/0x160 [ 357.871148][ T1000] ? alloc_pages_current+0xc1/0x1a0 [ 357.871704][ T1000] kmalloc_order+0x22/0x80 [ 357.872184][ T1000] kmalloc_order_trace+0x1d/0x140 [ 357.872733][ T1000] __kmalloc+0x302/0x3a0 [ 357.873204][ T1000] nsim_bus_dev_numvfs_store+0x1ab/0x260 [netdevsim] [ 357.873919][ T1000] ? kernfs_get_active+0x12c/0x180 [ 357.874459][ T1000] ? new_device_store+0x450/0x450 [netdevsim] [ 357.875111][ T1000] ? kernfs_get_parent+0x70/0x70 [ 357.875632][ T1000] ? sysfs_file_ops+0x160/0x160 [ 357.876152][ T1000] kernfs_fop_write+0x276/0x410 [ 357.876680][ T1000] ? __sb_start_write+0x1ba/0x2e0 [ 357.877225][ T1000] vfs_write+0x197/0x4a0 [ 357.877671][ T1000] ksys_write+0x141/0x1d0 [ ... ] Reviewed-by: Jakub Kicinski Fixes: 79579220566c ("netdevsim: add SR-IOV functionality") Fixes: 82c93a87bf8b ("netdevsim: implement couple of testing devlink health reporters") Signed-off-by: Taehee Yoo Signed-off-by: Jakub Kicinski commit 6556ff32f12d0a5380dd2fa6bbaa01373925a7d1 Author: Taehee Yoo Date: Sat Feb 1 16:43:30 2020 +0000 netdevsim: use IS_ERR instead of IS_ERR_OR_NULL for debugfs Debugfs APIs return valid pointer or error pointer. it doesn't return NULL. So, using IS_ERR is enough, not using IS_ERR_OR_NULL. Reviewed-by: Jakub Kicinski Reported-by: kbuild test robot Reported-by: Dan Carpenter Signed-off-by: Taehee Yoo Signed-off-by: Jakub Kicinski commit 6fb8852b1298200da39bd85788bc5755d1d56f32 Author: Taehee Yoo Date: Sat Feb 1 16:43:22 2020 +0000 netdevsim: fix stack-out-of-bounds in nsim_dev_debugfs_init() When netdevsim dev is being created, a debugfs directory is created. The variable "dev_ddir_name" is 16bytes device name pointer and device name is "netdevsim". The maximum dev id length is 10. So, 16bytes for device name isn't enough. Test commands: modprobe netdevsim echo "1000000000 0" > /sys/bus/netdevsim/new_device Splat looks like: [ 249.622710][ T900] BUG: KASAN: stack-out-of-bounds in number+0x824/0x880 [ 249.623658][ T900] Write of size 1 at addr ffff88804c527988 by task bash/900 [ 249.624521][ T900] [ 249.624830][ T900] CPU: 1 PID: 900 Comm: bash Not tainted 5.5.0+ #322 [ 249.625691][ T900] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 249.626712][ T900] Call Trace: [ 249.627103][ T900] dump_stack+0x96/0xdb [ 249.627639][ T900] ? number+0x824/0x880 [ 249.628173][ T900] print_address_description.constprop.5+0x1be/0x360 [ 249.629022][ T900] ? number+0x824/0x880 [ 249.629569][ T900] ? number+0x824/0x880 [ 249.630105][ T900] __kasan_report+0x12a/0x170 [ 249.630717][ T900] ? number+0x824/0x880 [ 249.631201][ T900] kasan_report+0xe/0x20 [ 249.631723][ T900] number+0x824/0x880 [ 249.632235][ T900] ? put_dec+0xa0/0xa0 [ 249.632716][ T900] ? rcu_read_lock_sched_held+0x90/0xc0 [ 249.633392][ T900] vsnprintf+0x63c/0x10b0 [ 249.633983][ T900] ? pointer+0x5b0/0x5b0 [ 249.634543][ T900] ? mark_lock+0x11d/0xc40 [ 249.635200][ T900] sprintf+0x9b/0xd0 [ 249.635750][ T900] ? scnprintf+0xe0/0xe0 [ 249.636370][ T900] nsim_dev_probe+0x63c/0xbf0 [netdevsim] [ ... ] Reviewed-by: Jakub Kicinski Fixes: ab1d0cc004d7 ("netdevsim: change debugfs tree topology") Signed-off-by: Taehee Yoo Signed-off-by: Jakub Kicinski commit 8526ad9646b17c59b6d430d8baa8f152a14fe177 Author: Taehee Yoo Date: Sat Feb 1 16:43:13 2020 +0000 netdevsim: fix panic in nsim_dev_take_snapshot_write() nsim_dev_take_snapshot_write() uses nsim_dev and nsim_dev->dummy_region. So, during this function, these data shouldn't be removed. But there is no protecting stuff in this function. There are two similar cases. 1. reload case reload could be called during nsim_dev_take_snapshot_write(). When reload is being executed, nsim_dev_reload_down() is called and it calls nsim_dev_reload_destroy(). nsim_dev_reload_destroy() calls devlink_region_destroy() to destroy nsim_dev->dummy_region. So, during nsim_dev_take_snapshot_write(), nsim_dev->dummy_region() would be removed. At this point, snapshot_write() would access freed pointer. In order to fix this case, take_snapshot file will be removed before devlink_region_destroy(). The take_snapshot file will be re-created by ->reload_up(). 2. del_device_store case del_device_store() also could call nsim_dev_reload_destroy() during nsim_dev_take_snapshot_write(). If so, panic would occur. This problem is actually the same problem with the first case. So, this problem will be fixed by the first case's solution. Test commands: modprobe netdevsim while : do echo 1 > /sys/bus/netdevsim/new_device & echo 1 > /sys/bus/netdevsim/del_device & devlink dev reload netdevsim/netdevsim1 & echo 1 > /sys/kernel/debug/netdevsim/netdevsim1/take_snapshot & done Splat looks like: [ 45.564513][ T975] general protection fault, probably for non-canonical address 0xdffffc000000003a: 0000 [#1] SMP DEI [ 45.566131][ T975] KASAN: null-ptr-deref in range [0x00000000000001d0-0x00000000000001d7] [ 45.566135][ T975] CPU: 1 PID: 975 Comm: bash Not tainted 5.5.0+ #322 [ 45.569020][ T975] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 45.569026][ T975] RIP: 0010:__mutex_lock+0x10a/0x14b0 [ 45.570518][ T975] Code: 08 84 d2 0f 85 7f 12 00 00 44 8b 0d 10 23 65 02 45 85 c9 75 29 49 8d 7f 68 48 b8 00 00 00 0f [ 45.570522][ T975] RSP: 0018:ffff888046ccfbf0 EFLAGS: 00010206 [ 45.572305][ T975] RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 45.572308][ T975] RDX: 000000000000003a RSI: ffffffffac926440 RDI: 00000000000001d0 [ 45.576843][ T975] RBP: ffff888046ccfd70 R08: ffffffffab610645 R09: 0000000000000000 [ 45.576847][ T975] R10: ffff888046ccfd90 R11: ffffed100d6360ad R12: 0000000000000000 [ 45.578471][ T975] R13: dffffc0000000000 R14: ffffffffae1976c0 R15: 0000000000000168 [ 45.578475][ T975] FS: 00007f614d6e7740(0000) GS:ffff88806c400000(0000) knlGS:0000000000000000 [ 45.581492][ T975] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 45.582942][ T975] CR2: 00005618677d1cf0 CR3: 000000005fb9c002 CR4: 00000000000606e0 [ 45.584543][ T975] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 45.586633][ T975] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 45.589889][ T975] Call Trace: [ 45.591445][ T975] ? devlink_region_snapshot_create+0x55/0x4a0 [ 45.601250][ T975] ? mutex_lock_io_nested+0x1380/0x1380 [ 45.602817][ T975] ? mutex_lock_io_nested+0x1380/0x1380 [ 45.603875][ T975] ? mark_held_locks+0xa5/0xe0 [ 45.604769][ T975] ? _raw_spin_unlock_irqrestore+0x2d/0x50 [ 45.606147][ T975] ? __mutex_unlock_slowpath+0xd0/0x670 [ 45.607723][ T975] ? crng_backtrack_protect+0x80/0x80 [ 45.613530][ T975] ? wait_for_completion+0x390/0x390 [ 45.615152][ T975] ? devlink_region_snapshot_create+0x55/0x4a0 [ 45.616834][ T975] devlink_region_snapshot_create+0x55/0x4a0 [ ... ] Fixes: 4418f862d675 ("netdevsim: implement support for devlink region and snapshots") Signed-off-by: Taehee Yoo Signed-off-by: Jakub Kicinski commit 6ab63366e1ec4ec1900f253aa64727b4b5f4ee73 Author: Taehee Yoo Date: Sat Feb 1 16:43:04 2020 +0000 netdevsim: disable devlink reload when resources are being used devlink reload destroys resources and allocates resources again. So, when devices and ports resources are being used, devlink reload function should not be executed. In order to avoid this race, a new lock is added and new_port() and del_port() call devlink_reload_disable() and devlink_reload_enable(). Thread0 Thread1 {new/del}_port() {new/del}_port() devlink_reload_disable() devlink_reload_disable() devlink_reload_enable() //here devlink_reload_enable() Before Thread1's devlink_reload_enable(), the devlink is already allowed to execute reload because Thread0 allows it. devlink reload disable/enable variable type is bool. So the above case would exist. So, disable/enable should be executed atomically. In order to do that, a new lock is used. Test commands: modprobe netdevsim echo 1 > /sys/bus/netdevsim/new_device while : do echo 1 > /sys/devices/netdevsim1/new_port & echo 1 > /sys/devices/netdevsim1/del_port & devlink dev reload netdevsim/netdevsim1 & done Splat looks like: [ 23.342145][ T932] DEBUG_LOCKS_WARN_ON(mutex_is_locked(lock)) [ 23.342159][ T932] WARNING: CPU: 0 PID: 932 at kernel/locking/mutex-debug.c:103 mutex_destroy+0xc7/0xf0 [ 23.344182][ T932] Modules linked in: netdevsim openvswitch nsh nf_conncount nf_nat nf_conntrack nf_defrag_ipv6 nf_dx [ 23.346485][ T932] CPU: 0 PID: 932 Comm: devlink Not tainted 5.5.0+ #322 [ 23.347696][ T932] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 23.348893][ T932] RIP: 0010:mutex_destroy+0xc7/0xf0 [ 23.349505][ T932] Code: e0 07 83 c0 03 38 d0 7c 04 84 d2 75 2e 8b 05 00 ac b0 02 85 c0 75 8b 48 c7 c6 00 5e 07 96 40 [ 23.351887][ T932] RSP: 0018:ffff88806208f810 EFLAGS: 00010286 [ 23.353963][ T932] RAX: dffffc0000000008 RBX: ffff888067f6f2c0 RCX: ffffffff942c4bd4 [ 23.355222][ T932] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff96dac5b4 [ 23.356169][ T932] RBP: ffff888067f6f000 R08: fffffbfff2d235a5 R09: fffffbfff2d235a5 [ 23.357160][ T932] R10: 0000000000000001 R11: fffffbfff2d235a4 R12: ffff888067f6f208 [ 23.358288][ T932] R13: ffff88806208fa70 R14: ffff888067f6f000 R15: ffff888069ce3800 [ 23.359307][ T932] FS: 00007fe2a3876740(0000) GS:ffff88806c000000(0000) knlGS:0000000000000000 [ 23.360473][ T932] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 23.361319][ T932] CR2: 00005561357aa000 CR3: 000000005227a006 CR4: 00000000000606f0 [ 23.362323][ T932] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 23.363417][ T932] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 23.364414][ T932] Call Trace: [ 23.364828][ T932] nsim_dev_reload_destroy+0x77/0xb0 [netdevsim] [ 23.365655][ T932] nsim_dev_reload_down+0x84/0xb0 [netdevsim] [ 23.366433][ T932] devlink_reload+0xb1/0x350 [ 23.367010][ T932] genl_rcv_msg+0x580/0xe90 [ ...] [ 23.531729][ T1305] kernel BUG at lib/list_debug.c:53! [ 23.532523][ T1305] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI [ 23.533467][ T1305] CPU: 2 PID: 1305 Comm: bash Tainted: G W 5.5.0+ #322 [ 23.534962][ T1305] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 23.536503][ T1305] RIP: 0010:__list_del_entry_valid+0xe6/0x150 [ 23.538346][ T1305] Code: 89 ea 48 c7 c7 00 73 1e 96 e8 df f7 4c ff 0f 0b 48 c7 c7 60 73 1e 96 e8 d1 f7 4c ff 0f 0b 44 [ 23.541068][ T1305] RSP: 0018:ffff888047c27b58 EFLAGS: 00010282 [ 23.542001][ T1305] RAX: 0000000000000054 RBX: ffff888067f6f318 RCX: 0000000000000000 [ 23.543051][ T1305] RDX: 0000000000000054 RSI: 0000000000000008 RDI: ffffed1008f84f61 [ 23.544072][ T1305] RBP: ffff88804aa0fca0 R08: ffffed100d940539 R09: ffffed100d940539 [ 23.545085][ T1305] R10: 0000000000000001 R11: ffffed100d940538 R12: ffff888047c27cb0 [ 23.546422][ T1305] R13: ffff88806208b840 R14: ffffffff981976c0 R15: ffff888067f6f2c0 [ 23.547406][ T1305] FS: 00007f76c0431740(0000) GS:ffff88806c800000(0000) knlGS:0000000000000000 [ 23.548527][ T1305] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 23.549389][ T1305] CR2: 00007f5048f1a2f8 CR3: 000000004b310006 CR4: 00000000000606e0 [ 23.550636][ T1305] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 23.551578][ T1305] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 23.552597][ T1305] Call Trace: [ 23.553004][ T1305] mutex_remove_waiter+0x101/0x520 [ 23.553646][ T1305] __mutex_lock+0xac7/0x14b0 [ 23.554218][ T1305] ? nsim_dev_port_del+0x4e/0x140 [netdevsim] [ 23.554908][ T1305] ? mutex_lock_io_nested+0x1380/0x1380 [ 23.555570][ T1305] ? _parse_integer+0xf0/0xf0 [ 23.556043][ T1305] ? kstrtouint+0x86/0x110 [ 23.556504][ T1305] ? nsim_dev_port_del+0x4e/0x140 [netdevsim] [ 23.557133][ T1305] nsim_dev_port_del+0x4e/0x140 [netdevsim] [ 23.558024][ T1305] del_port_store+0xcc/0xf0 [netdevsim] [ ... ] Fixes: 75ba029f3c07 ("netdevsim: implement proper devlink reload") Signed-off-by: Taehee Yoo Signed-off-by: Jakub Kicinski commit f5cd21605ecd249e5fc715411df22cc1bc877b32 Author: Taehee Yoo Date: Sat Feb 1 16:42:54 2020 +0000 netdevsim: fix using uninitialized resources When module is being initialized, __init() calls bus_register() and driver_register(). These functions internally create various resources and sysfs files. The sysfs files are used for basic operations(add/del device). /sys/bus/netdevsim/new_device /sys/bus/netdevsim/del_device These sysfs files use netdevsim resources, they are mostly allocated and initialized in ->probe() function, which is nsim_dev_probe(). But, sysfs files could be executed before ->probe() is finished. So, accessing uninitialized data would occur. Another problem is very similar. /sys/bus/netdevsim/new_device internally creates sysfs files. /sys/devices/netdevsim/new_port /sys/devices/netdevsim/del_port These sysfs files also use netdevsim resources, they are mostly allocated and initialized in creating device routine, which is nsim_bus_dev_new(). But they also could be executed before nsim_bus_dev_new() is finished. So, accessing uninitialized data would occur. To fix these problems, this patch adds flags, which means whether the operation is finished or not. The flag variable 'nsim_bus_enable' means whether netdevsim bus was initialized or not. This is protected by nsim_bus_dev_list_lock. The flag variable 'nsim_bus_dev->init' means whether nsim_bus_dev was initialized or not. This could be used in {new/del}_port_store() with no lock. Test commands: #SHELL1 modprobe netdevsim while : do echo "1 1" > /sys/bus/netdevsim/new_device echo "1 1" > /sys/bus/netdevsim/del_device done #SHELL2 while : do echo 1 > /sys/devices/netdevsim1/new_port echo 1 > /sys/devices/netdevsim1/del_port done Splat looks like: [ 47.508954][ T1008] general protection fault, probably for non-canonical address 0xdffffc0000000021: 0000 I [ 47.510793][ T1008] KASAN: null-ptr-deref in range [0x0000000000000108-0x000000000000010f] [ 47.511963][ T1008] CPU: 2 PID: 1008 Comm: bash Not tainted 5.5.0+ #322 [ 47.512823][ T1008] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 47.514041][ T1008] RIP: 0010:__mutex_lock+0x10a/0x14b0 [ 47.514699][ T1008] Code: 08 84 d2 0f 85 7f 12 00 00 44 8b 0d 10 23 65 02 45 85 c9 75 29 49 8d 7f 68 48 b8 00 00 00 0f [ 47.517163][ T1008] RSP: 0018:ffff888059b4fbb0 EFLAGS: 00010206 [ 47.517802][ T1008] RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 47.518941][ T1008] RDX: 0000000000000021 RSI: ffffffff85926440 RDI: 0000000000000108 [ 47.519732][ T1008] RBP: ffff888059b4fd30 R08: ffffffffc073fad0 R09: 0000000000000000 [ 47.520729][ T1008] R10: ffff888059b4fd50 R11: ffff88804bb38040 R12: 0000000000000000 [ 47.521702][ T1008] R13: dffffc0000000000 R14: ffffffff871976c0 R15: 00000000000000a0 [ 47.522760][ T1008] FS: 00007fd4be05a740(0000) GS:ffff88806c800000(0000) knlGS:0000000000000000 [ 47.523877][ T1008] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 47.524627][ T1008] CR2: 0000561c82b69cf0 CR3: 0000000065dd6004 CR4: 00000000000606e0 [ 47.527662][ T1008] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 47.528604][ T1008] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 47.529531][ T1008] Call Trace: [ 47.529874][ T1008] ? nsim_dev_port_add+0x50/0x150 [netdevsim] [ 47.530470][ T1008] ? mutex_lock_io_nested+0x1380/0x1380 [ 47.531018][ T1008] ? _kstrtoull+0x76/0x160 [ 47.531449][ T1008] ? _parse_integer+0xf0/0xf0 [ 47.531874][ T1008] ? kernfs_fop_write+0x1cf/0x410 [ 47.532330][ T1008] ? sysfs_file_ops+0x160/0x160 [ 47.532773][ T1008] ? kstrtouint+0x86/0x110 [ 47.533168][ T1008] ? nsim_dev_port_add+0x50/0x150 [netdevsim] [ 47.533721][ T1008] nsim_dev_port_add+0x50/0x150 [netdevsim] [ 47.534336][ T1008] ? sysfs_file_ops+0x160/0x160 [ 47.534858][ T1008] new_port_store+0x99/0xb0 [netdevsim] [ 47.535439][ T1008] ? del_port_store+0xb0/0xb0 [netdevsim] [ 47.536035][ T1008] ? sysfs_file_ops+0x112/0x160 [ 47.536544][ T1008] ? sysfs_kf_write+0x3b/0x180 [ 47.537029][ T1008] kernfs_fop_write+0x276/0x410 [ 47.537548][ T1008] ? __sb_start_write+0x215/0x2e0 [ 47.538110][ T1008] vfs_write+0x197/0x4a0 [ ... ] Fixes: f9d9db47d3ba ("netdevsim: add bus attributes to add new and delete devices") Fixes: 794b2c05ca1c ("netdevsim: extend device attrs to support port addition and deletion") Signed-off-by: Taehee Yoo Signed-off-by: Jakub Kicinski commit 8fc91b972b734a62a3f3ef45db06d06617f739ea Author: Andrii Nakryiko Date: Sat Feb 1 22:51:52 2020 -0800 selftests/bpf: Fix trampoline_count.c selftest compilation warning Fix missing braces compilation warning in trampoline_count test: .../prog_tests/trampoline_count.c: In function ‘test_trampoline_count’: .../prog_tests/trampoline_count.c:49:9: warning: missing braces around initializer [-Wmissing-braces] struct inst inst[MAX_TRAMP_PROGS] = { 0 }; ^ .../prog_tests/trampoline_count.c:49:9: warning: (near initialization for ‘inst[0]’) [-Wmissing-braces] Fixes: d633d57902a5 ("selftest/bpf: Add test for allowed trampolines count") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200202065152.2718142-1-andriin@fb.com commit 2b5ea2947fbdf4e650169afd5ef30ce1c7d8cba8 Merge: 14b41a2959fb 18e4960c18f4 Author: Jakub Kicinski Date: Mon Feb 3 15:07:26 2020 -0800 Merge branch 'bnxt_en-Bug-fixes' Michael Chan says: ===================== bnxt_en: Bug fixes 3 patches that fix some issues in the firmware reset logic, starting with a small patch to refactor the code that re-enables SRIOV. The last patch fixes a TC queue mapping issue. ==================== Signed-off-by: Jakub Kicinski commit 18e4960c18f484ac288f41b43d0e6c4c88e6ea78 Author: Michael Chan Date: Sun Feb 2 02:41:38 2020 -0500 bnxt_en: Fix TC queue mapping. The driver currently only calls netdev_set_tc_queue when the number of TCs is greater than 1. Instead, the comparison should be greater than or equal to 1. Even with 1 TC, we need to set the queue mapping. This bug can cause warnings when the number of TCs is changed back to 1. Fixes: 7809592d3e2e ("bnxt_en: Enable MSIX early in bnxt_init_one().") Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit d407302895d3f3ca3a333c711744a95e0b1b0150 Author: Vasundhara Volam Date: Sun Feb 2 02:41:37 2020 -0500 bnxt_en: Fix logic that disables Bus Master during firmware reset. The current logic that calls pci_disable_device() in __bnxt_close_nic() during firmware reset is flawed. If firmware is still alive, we're disabling the device too early, causing some firmware commands to not reach the firmware. Fix it by moving the logic to bnxt_reset_close(). If firmware is in fatal condition, we call pci_disable_device() before we free any of the rings to prevent DMA corruption of the freed rings. If firmware is still alive, we call pci_disable_device() after the last firmware message has been sent. Fixes: 3bc7d4a352ef ("bnxt_en: Add BNXT_STATE_IN_FW_RESET state.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 12de2eadf87825c3990c1aa68b5e93101ca2f043 Author: Michael Chan Date: Sun Feb 2 02:41:36 2020 -0500 bnxt_en: Fix RDMA driver failure with SRIOV after firmware reset. bnxt_ulp_start() needs to be called before SRIOV is re-enabled after firmware reset. Re-enabling SRIOV may consume all the resources and may cause the RDMA driver to fail to get MSIX and other resources. Fix it by calling bnxt_ulp_start() first before calling bnxt_reenable_sriov(). We re-arrange the logic so that we call bnxt_ulp_start() and bnxt_reenable_sriov() in proper sequence in bnxt_fw_reset_task() and bnxt_open(). The former is the normal coordinated firmware reset sequence and the latter is firmware reset while the function is down. This new logic is now more straight forward and will now fix both scenarios. Fixes: f3a6d206c25a ("bnxt_en: Call bnxt_ulp_stop()/bnxt_ulp_start() during error recovery.") Reported-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit c16d4ee0e397163fe7ceac281eaa952e63fadec7 Author: Michael Chan Date: Sun Feb 2 02:41:35 2020 -0500 bnxt_en: Refactor logic to re-enable SRIOV after firmware reset detected. Put the current logic in bnxt_open() to re-enable SRIOV after detecting firmware reset into a new function bnxt_reenable_sriov(). This call needs to be invoked in the firmware reset path also in the next patch. Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 257af63d7f84f0672aa6a24b5511871f00741f19 Author: Alexei Starovoitov Date: Fri Jan 31 16:03:14 2020 -0800 bpf: Fix modifier skipping logic Fix the way modifiers are skipped while walking pointers. Otherwise second level dereferences of 'const struct foo *' will be rejected by the verifier. Fixes: 9e15db66136a ("bpf: Implement accurate raw_tp context access via BTF") Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200201000314.261392-1-ast@kernel.org commit a525b0881de7742617343f02df4073ddc1571237 Author: Michal Rostecki Date: Sun Feb 2 12:02:00 2020 +0100 bpftool: Remove redundant "HAVE" prefix from the large INSN limit check "HAVE" prefix is already applied by default to feature macros and before this change, the large INSN limit macro had the incorrect name with double "HAVE". Fixes: 2faef64aa6b3 ("bpftool: Add misc section and probe for large INSN limit") Signed-off-by: Michal Rostecki Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200202110200.31024-1-mrostecki@opensuse.org commit 14b41a2959fbaa50932699d32ceefd6643abacc6 Author: Nicolin Chen Date: Fri Jan 31 18:01:24 2020 -0800 net: stmmac: Delete txtimer in suspend() When running v5.5 with a rootfs on NFS, memory abort may happen in the system resume stage: Unable to handle kernel paging request at virtual address dead00000000012a [dead00000000012a] address between user and kernel address ranges pc : run_timer_softirq+0x334/0x3d8 lr : run_timer_softirq+0x244/0x3d8 x1 : ffff800011cafe80 x0 : dead000000000122 Call trace: run_timer_softirq+0x334/0x3d8 efi_header_end+0x114/0x234 irq_exit+0xd0/0xd8 __handle_domain_irq+0x60/0xb0 gic_handle_irq+0x58/0xa8 el1_irq+0xb8/0x180 arch_cpu_idle+0x10/0x18 do_idle+0x1d8/0x2b0 cpu_startup_entry+0x24/0x40 secondary_start_kernel+0x1b4/0x208 Code: f9000693 a9400660 f9000020 b4000040 (f9000401) ---[ end trace bb83ceeb4c482071 ]--- Kernel panic - not syncing: Fatal exception in interrupt SMP: stopping secondary CPUs SMP: failed to stop secondary CPUs 2-3 Kernel Offset: disabled CPU features: 0x00002,2300aa30 Memory Limit: none ---[ end Kernel panic - not syncing: Fatal exception in interrupt ]--- It's found that stmmac_xmit() and stmmac_resume() sometimes might run concurrently, possibly resulting in a race condition between mod_timer() and setup_timer(), being called by stmmac_xmit() and stmmac_resume() respectively. Since the resume() runs setup_timer() every time, it'd be safer to have del_timer_sync() in the suspend() as the counterpart. Signed-off-by: Nicolin Chen Signed-off-by: Jakub Kicinski commit 322bf2d3446aabdaf5e8887775bd9ced80dbc0f0 Merge: 1716f536425f 264b0d2bee14 Author: Linus Torvalds Date: Mon Feb 3 22:27:33 2020 +0000 Merge branch 'for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu Pull percpu updates from Dennis Zhou: "Separate out variables that can be decrypted into their own page anytime encryption can be enabled and fix __percpu annotations in asm-generic for sparse" * 'for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu: percpu: Separate decrypted varaibles anytime encryption can be enabled percpu: fix __percpu annotation in asm-generic commit 1716f536425f72cca4b0ff42c4be9466ed38dbd9 Merge: a6d5f9dca42e c08406033fe8 Author: Linus Torvalds Date: Mon Feb 3 22:25:27 2020 +0000 Merge branch 'stable/for-linus-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft Pull ibft update from Konrad Rzeszutek Wilk: "Adhere to the iBFT spec and extend the structure to handle more than two NICs" * 'stable/for-linus-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft: iscsi_ibft: Don't limits Targets and NICs to two commit a6d5f9dca42eab3526e2f73aa5b7df2a5fec2c9d Merge: f4a6365ae88d 7b5372ba04ca Author: Linus Torvalds Date: Mon Feb 3 22:22:05 2020 +0000 Merge tag 'vfio-v5.6-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Fix nvlink error path (Alexey Kardashevskiy) - Update nvlink and spapr to use mmgrab() (Julia Lawall) - Update static declaration (Ben Dooks) - Annotate __iomem to fix sparse warnings (Ben Dooks) * tag 'vfio-v5.6-rc1' of git://github.com/awilliam/linux-vfio: vfio: platform: fix __iomem in vfio_platform_amdxgbe.c vfio/mdev: make create attribute static vfio/spapr_tce: use mmgrab vfio: vfio_pci_nvlink2: use mmgrab vfio/spapr/nvlink2: Skip unpinning pages on error exit commit 0f060936e490c6279dfe773d75d526d3d3d77111 Author: Amir Goldstein Date: Mon Feb 3 21:46:43 2020 +0200 SMB3: Backup intent flag missing from some more ops When "backup intent" is requested on the mount (e.g. backupuid or backupgid mount options), the corresponding flag was missing from some of the operations. Change all operations to use the macro cifs_create_options() to set the backup intent flag if needed. Signed-off-by: Amir Goldstein Signed-off-by: Steve French commit f4a6365ae88d38528b4eec717326dab877b515ea Merge: fe70da5a325c fc6a15c85308 Author: Linus Torvalds Date: Mon Feb 3 22:10:18 2020 +0000 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "There are a few changes to the core framework this time around, in addition to the normal collection of driver updates to support new SoCs, fix incorrect data, and convert various drivers to clk_hw based APIs. In the core, we allow clk_ops::init() to return an error code now so that we can fail clk registration if the callback does something like fail to allocate memory. We also add a new "terminate" clk_op so that things done in clk_ops::init() can be undone, e.g. free memory. We also spit out a warning now when critical clks fail to enable and we support changing clk rates and enable/disable state through debugfs when developers compile the kernel themselves. On the driver front, we get support for what seems like a lot of Qualcomm and NXP SoCs given that those vendors dominate the diffstat. There are a couple new drivers for Xilinx and Amlogic SoCs too. The updates are all small things like fixing the way glitch free muxes switch parents, avoiding div-by-zero problems, or fixing data like parent names. See the updates section below for more details. Finally, the "basic" clk types have been converted to support specifying parents with clk_hw pointers. This work includes an overhaul of the fixed-rate clk type to be more modern by using clk_hw APIs. Core: - Let clk_ops::init() return an error code - Add a clk_ops::terminate() callback to undo clk_ops::init() - Warn about critical clks that fail to enable or prepare - Support dangerous debugfs actions on clks with dead code New Drivers: - Support for Xilinx Versal platform clks - Display clk controller on qcom sc7180 - Video clk controller on qcom sc7180 - Graphics clk controller on qcom sc7180 - CPU PLLs for qcom msm8916 - Move qcom msm8974 gfx3d clk to RPM control - Display port clk support on qcom sdm845 SoCs - Global clk controller on qcom ipq6018 - Add a driver for BCLK of Freescale SAI cores - Add cam, vpe and sgx clock support for TI dra7 - Add aess clock support for TI omap5 - Enable clks for CPUfreq on Allwinner A64 SoCs - Add Amlogic meson8b DDR clock controller - Add input clocks to Amlogic meson8b controllers - Add SPIBSC (SPI FLASH) clock on Renesas RZ/A2 - i.MX8MP clk driver support Updates: - Convert gpio, fixed-factor, mux, gate, divider basic clks to hw based APIs - Detect more PRMCU variants in ux500 driver - Adjust the composite clk type to new way of describing clk parents - Fixes for clk controllers on qcom msm8998 SoCs - Fix gmac main clock for TI dra7 - Move TI dra7-atl clock header to correct location - Fix hidden node name dependency on TI clkctrl clocks - Fix Amlogic meson8b mali clock update using the glitch free mux - Fix Amlogic pll driver division by zero at init - Prepare for split of Renesas R-Car H3 ES1.x and ES2.0+ config symbols - Switch more i.MX clk drivers to clk_hw based APIs - Disable non-functional divider between pll4_audio_div and pll4_post_div on imx6q - Fix watchdog2 clock name typo in imx7ulp clock driver - Set CLK_GET_RATE_NOCACHE flag for DRAM related clocks on i.MX8M SoCs - Suppress bind attrs for i.MX8M clock driver - Add a big comment in imx8qxp-lpcg driver to tell why devm_platform_ioremap_resource() shouldn't be used for the driver - A correction on i.MX8MN usb1_ctrl parent clock setting" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (140 commits) dt/bindings: clk: fsl,plldig: Drop 'bindings' from schema id clk: ls1028a: Fix warning on clamp() usage clk: qoriq: add ls1088a hwaccel clocks support clk: ls1028a: Add clock driver for Display output interface dt/bindings: clk: Add YAML schemas for LS1028A Display Clock bindings clk: fsl-sai: new driver dt-bindings: clock: document the fsl-sai driver clk: composite: add _register_composite_pdata() variants clk: qcom: rpmh: Sort OF match table dt-bindings: fix warnings in validation of qcom,gcc.yaml dt-binding: fix compilation error of the example in qcom,gcc.yaml clk: zynqmp: Add support for clock with CLK_DIVIDER_POWER_OF_TWO flag clk: zynqmp: Fix divider calculation clk: zynqmp: Add support for get max divider clk: zynqmp: Warn user if clock user are more than allowed clk: zynqmp: Extend driver for versal dt-bindings: clock: Add bindings for versal clock driver clk: ti: clkctrl: Fix hidden dependency to node name clk: ti: add clkctrl data dra7 sgx clk: ti: omap5: Add missing AESS clock ... commit fe70da5a325c1ac860d463ca802dae6a8bb05e21 Merge: d4e9056daedc b19efcabb587 Author: Linus Torvalds Date: Mon Feb 3 22:05:15 2020 +0000 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - a driver for SGI IOC3 PS/2 controller - updates to driver for FocalTech FT5x06 series touch screen controllers - other assorted fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: synaptics-rmi4 - switch to reduced reporting mode dt-bindings: touchscreen: Convert Goodix touchscreen to json-schema dt-bindings: touchscreen: Add touchscreen schema Input: add IOC3 serio driver Input: axp20x-pek - enable wakeup for all AXP variants Input: axp20x-pek - respect userspace wakeup configuration Input: ads7846 - use new `delay` structure for SPI transfer delays Input: edt-ft5x06 - use pm core to enable/disable the wake irq Input: edt-ft5x06 - make wakeup-source switchable Input: edt-ft5x06 - document wakeup-source capability Input: edt-ft5x06 - alphabetical include reorder Input: edt-ft5x06 - work around first register access error Input: apbps2 - add __iomem to register struct Input: axp20x-pek - make device attributes static Input: elants_i2c - check Remark ID when attempting firmware update commit 84669923e1edf30f55e71fce9f831242502372c9 Author: Helge Deller Date: Mon Feb 3 22:31:22 2020 +0100 parisc: Regenerate parisc defconfigs Regenerate the 32- and 64-bit defconfigs and drop the outdated specific machine defconfigs for the 712, A500, B160, C3000 and C8000 workstations. Signed-off-by: Helge Deller commit 93a6ab7b691fe33d5a30e7fc8e85276de2815108 Author: Trond Myklebust Date: Sun Feb 2 17:53:56 2020 -0500 NFS: Switch readdir to using iterate_shared() Now that the page cache locking is repaired, we should be able to switch to using iterate_shared() for improved concurrency when doing readdir(). Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit 3803d6721baff3d5dd6cd6b8c7294e54d124bc41 Author: Trond Myklebust Date: Sun Feb 2 17:53:55 2020 -0500 NFS: Use kmemdup_nul() in nfs_readdir_make_qstr() The directory strings stored in the readdir cache may be used with printk(), so it is better to ensure they are nul-terminated. Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit 114de38225d9b300f027e2aec9afbb6e0def154b Author: Trond Myklebust Date: Sun Feb 2 17:53:54 2020 -0500 NFS: Directory page cache pages need to be locked when read When a NFS directory page cache page is removed from the page cache, its contents are freed through a call to nfs_readdir_clear_array(). To prevent the removal of the page cache entry until after we've finished reading it, we must take the page lock. Fixes: 11de3b11e08c ("NFS: Fix a memory leak in nfs_readdir") Cc: stable@vger.kernel.org # v2.6.37+ Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit 4b310319c6a8ce708f1033d57145e2aa027a883c Author: Trond Myklebust Date: Sun Feb 2 17:53:53 2020 -0500 NFS: Fix memory leaks and corruption in readdir nfs_readdir_xdr_to_array() must not exit without having initialised the array, so that the page cache deletion routines can safely call nfs_readdir_clear_array(). Furthermore, we should ensure that if we exit nfs_readdir_filler() with an error, we free up any page contents to prevent a leak if we try to fill the page again. Fixes: 11de3b11e08c ("NFS: Fix a memory leak in nfs_readdir") Cc: stable@vger.kernel.org # v2.6.37+ Signed-off-by: Trond Myklebust Reviewed-by: Benjamin Coddington Signed-off-by: Anna Schumaker commit 7ccbddbe3e67591a02ddd20078d1241bd8fe79f3 Author: Trond Myklebust Date: Sun Feb 2 17:57:08 2020 -0500 SUNRPC: Use kmemdup_nul() in rpc_parse_scope_id() Using kmemdup_nul() is more efficient when the length is known. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit a8bd9ddf397be8e0d812ce3da4e40440ac25f6d0 Author: Trond Myklebust Date: Sun Feb 2 17:57:07 2020 -0500 NFS: Replace various occurrences of kstrndup() with kmemdup_nul() When we already know the string length, it is more efficient to use kmemdup_nul(). Signed-off-by: Trond Myklebust [Anna - Changes to super.c were already made during fscontext conversion] Signed-off-by: Anna Schumaker commit 10717f45639f6c1bc27b56405252c3a027406d92 Author: Trond Myklebust Date: Mon Jan 27 09:58:19 2020 -0500 NFSv4: Limit the total number of cached delegations Delegations can be expensive to return, and can cause scalability issues for the server. Let's therefore try to limit the number of inactive delegations we hold. Once the number of delegations is above a certain threshold, start to return them on close. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit d2269ea14ebd2a73f291d6b3a7a7d320ec00270c Author: Trond Myklebust Date: Mon Jan 27 09:58:18 2020 -0500 NFSv4: Add accounting for the number of active delegations held In order to better manage our delegation caching, add a counter to track the number of active delegations. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit b7b7dac6843e483b6fe8e29cef99e3dbb7594a53 Author: Trond Myklebust Date: Mon Jan 27 09:58:17 2020 -0500 NFSv4: Try to return the delegation immediately when marked for return on close Add a routine to return the delegation immediately upon close of the file if it was marked for return-on-close. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 0d10416797c27b9e359d4bd94fb9db6f34f25d83 Author: Trond Myklebust Date: Mon Jan 27 09:58:16 2020 -0500 NFS: Clear NFS_DELEGATION_RETURN_IF_CLOSED when the delegation is returned If a delegation is marked as needing to be returned when the file is closed, then don't clear that marking until we're ready to return it. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit f885ea640d65d98c8f1a326efb3abe13f1865c89 Author: Trond Myklebust Date: Mon Jan 27 09:58:15 2020 -0500 NFSv4: nfs_inode_evict_delegation() should set NFS_DELEGATION_RETURNING In particular, the pnfs return-on-close code will check for that flag, so ensure we set it appropriately. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 65f5160376212094b477c7309ba9867e69ec69d5 Author: Trond Myklebust Date: Sun Jan 26 17:31:15 2020 -0500 NFS: nfs_find_open_context() should use cred_fscmp() We want to find open contexts that match our filesystem access properties. They don't have to exactly match the cred. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 9a206de2ea878f4502e86b81c0d7eb9b651bde82 Author: Trond Myklebust Date: Sun Jan 26 17:31:14 2020 -0500 NFS: nfs_access_get_cached_rcu() should use cred_fscmp() We do not need to have the rcu lookup method fail in the case where the fsuid/fsgid and supplemental groups match. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 387122478775be5d9816c34aa29de53d0b926835 Author: Trond Myklebust Date: Sun Jan 26 17:31:13 2020 -0500 NFSv4: pnfs_roc() must use cred_fscmp() to compare creds When comparing two 'struct cred' for equality w.r.t. behaviour under filesystem access, we need to use cred_fscmp(). Fixes: a52458b48af1 ("NFS/NFSD/SUNRPC: replace generic creds with 'struct cred'.") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 2a8aa18c113124434a32c1bd01054d67f799e4ee Author: Douglas Anderson Date: Mon Feb 3 09:49:43 2020 -0800 dt-bindings: clk: qcom: Fix self-validation, split, and clean cruft The 'qcom,gcc.yaml' file failed self-validation (dt_binding_check) because it required a property to be either (3 entries big), (3 entries big), or (7 entries big), but not more than one of those things. That didn't make a ton of sense. This patch splits all of the exceptional device trees (AKA those that would have needed if/then/else rules) from qcom,gcc.yaml. It also cleans up some cruft found while doing that. After this lands, this worked for me atop clk-next with just the known error about msm8998: for f in \ Documentation/devicetree/bindings/clock/qcom,gcc-apq8064.yaml \ Documentation/devicetree/bindings/clock/qcom,gcc-ipq8074.yaml \ Documentation/devicetree/bindings/clock/qcom,gcc-msm8996.yaml \ Documentation/devicetree/bindings/clock/qcom,gcc-msm8998.yaml \ Documentation/devicetree/bindings/clock/qcom,gcc-qcs404.yaml \ Documentation/devicetree/bindings/clock/qcom,gcc-sc7180.yaml \ Documentation/devicetree/bindings/clock/qcom,gcc-sm8150.yaml \ Documentation/devicetree/bindings/clock/qcom,gcc.yaml; do \ ARCH=arm64 make dtbs_check DT_SCHEMA_FILES=$f; \ done I then picked this patch atop linux-next (next-20200129) and ran: # Delete broken yaml: rm Documentation/devicetree/bindings/pci/intel-gw-pcie.yaml ARCH=arm64 make dt_binding_check | grep 'clock/qcom' ...and that didn't seem to indicate problems. Arbitrary decisions made (yell if you want changed): - Left all the older devices (where clocks / clock-names weren't specified) in a single file. - Didn't make clocks "required" for msm8996 but left them as listed. This seems a little weird but it matches the old binding. Misc cleanups as part of this patch: - Fixed schema id to not have "bindings/" as per Rob [1]. - Listed include files as per Stephen. - sm8150 was claimed to be same set of clocks as sc7180, but driver and dts appear to say that "bi_tcxo_ao" doesn't exist. Fixed. - In "apq8064", "#thermal-sensor-cells" was missing the "#". - Got rid of "|" at the end of top description since spacing doesn't matter. - Changed indentation to consistently 2 spaces (it was 3 in some places). - Added period at the end of protected-clocks description. - No space before ":". - Updated sc7180/sm8150 example to use the 'qcom,rpmh.h' include. - Updated sc7180/sm8150 example to use larger address/size cells as per reality. - Updated sc7180/sm8150 example to point to the sleep_clk rather than <0>. - Made it so that gcc-ipq8074 didn't require #power-domain-cells since actual dts didn't have it and I got no hits from: git grep _GDSC include/dt-bindings/clock/qcom,gcc-ipq8074.h - Made it so that gcc-qcs404 didn't require #power-domain-cells since actual dts didn't have it and I got no hits from: git grep _GDSC include/dt-bindings/clock/qcom,gcc-qcs404.h Noticed, but not done in this patch (volunteers needed): - Add "aud_ref_clk" to sm8150 bindings / dts even though I found a reference to it in "gcc-sm8150.c". - Fix node name in actual ipq8074 to be "clock-controller" (it's gcc). - Since the example doesn't need phandes to exist, in msm8998 could just make up places providing some of the clocks currently bogused out with <0>. - On msm8998 clocks are listed as required but current dts doesn't have them. [1] https://lore.kernel.org/r/CAL_Jsq+_2E-bAbP9F6VYkWRp0crEyRGa5peuwP58-PZniVny7w@mail.gmail.com Fixes: ab91f72e018a ("clk: qcom: gcc-msm8996: Fix parent for CLKREF clocks") Signed-off-by: Douglas Anderson Reviewed-by: Rob Herring Reviewed-by: Jeffrey Hugo Link: https://lkml.kernel.org/r/20200203094843.v3.1.I4452dc951d7556ede422835268742b25a18b356b@changeid Signed-off-by: Stephen Boyd commit 21e157c62eeded8b1558a991b4820b761d48a730 Author: Stephen Boyd Date: Tue Jan 28 11:33:29 2020 -0800 clk: qcom: Don't overwrite 'cfg' in clk_rcg2_dfs_populate_freq() The DFS frequency table logic overwrites 'cfg' while detecting the parent clk and then later on in clk_rcg2_dfs_populate_freq() we use that same variable to figure out the mode of the clk, either MND or not. Add a new variable to hold the parent clk bit so that 'cfg' is left untouched for use later. This fixes problems in detecting the supported frequencies for any clks in DFS mode. Fixes: cc4f6944d0e3 ("clk: qcom: Add support for RCG to register for DFS") Reported-by: Rajendra Nayak Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20200128193329.45635-1-sboyd@kernel.org Tested-by: Rajendra Nayak commit fc6a15c853085f04c30e08bbba7d49cb611f7773 Author: Stephen Boyd Date: Sun Feb 2 21:25:07 2020 -0800 dt/bindings: clk: fsl,plldig: Drop 'bindings' from schema id Having 'bindings' in here causes a warning when checking the schema. Documentation/devicetree/bindings/clock/fsl,plldig.yaml: $id: relative path/filename doesn't match actual path or filename expected: http://devicetree.org/schemas/clock/fsl,plldig.yaml# Remove it. Cc: Rob Herring Cc: Wen He Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20200203052507.93215-2-sboyd@kernel.org Acked-by: Rob Herring commit 0d152f2db535c207d1ea5bee62ff889f9d850a25 Author: Stephen Boyd Date: Sun Feb 2 21:25:06 2020 -0800 clk: ls1028a: Fix warning on clamp() usage These constants are used in clamp() with the value being clamped an unsigned long. Make them unsigned long defines so that clamp() doesn't complain about comparing different types. In file included from include/linux/list.h:9, from include/linux/kobject.h:19, from include/linux/of.h:17, from include/linux/clk-provider.h:9, from drivers/clk/clk-plldig.c:8: drivers/clk/clk-plldig.c: In function 'plldig_determine_rate': include/linux/kernel.h:835:29: warning: comparison of distinct pointer types lacks a cast 835 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) | Reported-by: Stephen Rothwell Cc: Wen He Fixes: d37010a3c162 ("clk: ls1028a: Add clock driver for Display output interface") Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20200203052507.93215-1-sboyd@kernel.org commit 3d80c653f99658af6af3ac1b74f70bf9a069e71f Merge: 83d0585f91da 5273a191dca6 Author: Jakub Kicinski Date: Mon Feb 3 10:26:23 2020 -0800 Merge tag 'rxrpc-fixes-20200203' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== RxRPC fixes Here are a number of fixes for AF_RXRPC: (1) Fix a potential use after free in rxrpc_put_local() where it was accessing the object just put to get tracing information. (2) Fix insufficient notifications being generated by the function that queues data packets on a call. This occasionally causes recvmsg() to stall indefinitely. (3) Fix a number of packet-transmitting work functions to hold an active count on the local endpoint so that the UDP socket doesn't get destroyed whilst they're calling kernel_sendmsg() on it. (4) Fix a NULL pointer deref that stemmed from a call's connection pointer being cleared when the call was disconnected. Changes: v2: Removed a couple of BUG() statements that got added. ==================== Signed-off-by: Jakub Kicinski commit ebe8e6116ac49d182b060f843904caf5eacf5b87 Author: Chin-Yen Lee Date: Mon Feb 3 14:01:57 2020 +0800 rtw88: Fix return value of rtw_wow_check_fw_status Clang warns that ret is used uninitialzed. And we found that actually the return type should be "int" instead of "bool". Fixes: 44bc17f7f5b3 ("rtw88: support wowlan feature for 8822c") Link: https://github.com/ClangBuiltLinux/linux/issues/850 Reported-by: Nathan Chancellor Signed-off-by: Chin-Yen Lee Signed-off-by: Yan-Hsuan Chuang Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor # build Signed-off-by: Kalle Valo commit 577ddbee1f43a355cc733829da96c8ffb3b99cc5 Author: Mordechay Goodstein Date: Fri Jan 31 15:45:30 2020 +0200 iwlwifi: d3: read all FW CPUs error info Continue the wakeup flow only if no FW CPUs have an error If we don't check for error in all FW CPUs the driver can think based on one CPU that the FW is operational and try to access and send commands. Also, handle the error_id endianness correctly as le32 Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit b5b878e36c1836c0195575132cc7c199e5a34a7b Author: Emmanuel Grumbach Date: Fri Jan 31 15:45:29 2020 +0200 iwlwifi: mvm: fix TDLS discovery with the new firmware API I changed the API for asking for a session protection but I omitted the TDLS flows. Fix that now. Note that for the TDLS flow, we need to block until the session protection actually starts, so add this option to iwl_mvm_schedule_session_protection. This patch fixes a firmware assert in the TDLS flow since the old TIME_EVENT_CMD is not supported anymore by newer firwmare versions. Signed-off-by: Emmanuel Grumbach Fixes: fe959c7b2049 ("iwlwifi: mvm: use the new session protection command") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 12d47f0ea5e0aa63f19ba618da55a7c67850ca10 Author: Andrei Otcheretianski Date: Fri Jan 31 15:45:28 2020 +0200 iwlwifi: mvm: Check the sta is not NULL in iwl_mvm_cfg_he_sta() Fix a kernel panic by checking that the sta is not NULL. This could happen during a reconfig flow, as mac80211 moves the sta between all the states without really checking if the previous state was successfully set. So, if for some reason we failed to add back the station, subsequent calls to sta_state() callback will be done when the station is NULL. This would result in a following panic: BUG: unable to handle kernel NULL pointer dereference at 0000000000000040 IP: iwl_mvm_cfg_he_sta+0xfc/0x690 [iwlmvm] [..] Call Trace: iwl_mvm_mac_sta_state+0x629/0x6f0 [iwlmvm] drv_sta_state+0xf4/0x950 [mac80211] ieee80211_reconfig+0xa12/0x2180 [mac80211] ieee80211_restart_work+0xbb/0xe0 [mac80211] process_one_work+0x1e2/0x610 worker_thread+0x4d/0x3e0 [..] Signed-off-by: Andrei Otcheretianski Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit cc4255eff523f25187bb95561642941de0e57497 Author: Avraham Stern Date: Fri Jan 31 15:45:27 2020 +0200 iwlwifi: mvm: avoid use after free for pmsr request When a FTM request is aborted, the driver sends the abort command to the fw and waits for a response. When the response arrives, the driver calls cfg80211_pmsr_complete() for that request. However, cfg80211 frees the requested data immediately after sending the abort command, so this may lead to use after free. Fix it by clearing the request data in the driver when the abort command arrives and ignoring the fw notification that will come afterwards. Signed-off-by: Avraham Stern Fixes: fc36ffda3267 ("iwlwifi: mvm: support FTM initiator") Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 6bd5fa332a8c24c8b9079a70c44240b61858fab8 Author: Golan Ben Ami Date: Fri Jan 31 15:45:26 2020 +0200 iwlwifi: mvm: update the DTS measurement type Till now, the driver asked the fw for a DTS measurement in automatic mode. This triggered a flow in which the fw actively measured the temperature. This is not needed anymore, as the fw performs measurements by itself, without the driver triggering them, and the current cadence in which the fw performs such measurements is sufficient. In addition, in some time-sensitive scenarios, in which the driver asks the fw for an active measurement twice in a short time (<100ms), the fw asserts with code 0x20100801. Change the DTS measurement to _WITHOUT_MEASURE instead, so the fw will respond with the last measurement it has performed. Signed-off-by: Golan Ben Ami Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit 197288d5ba8a5289f22d3aeb4fca3824bfd9b4af Author: Luca Coelho Date: Fri Jan 31 15:45:25 2020 +0200 iwlwifi: don't throw error when trying to remove IGTK The IGTK keys are only removed by mac80211 after it has already removed the AP station. This causes the driver to throw an error because mac80211 is trying to remove the IGTK when the station doesn't exist anymore. The firmware is aware that the station has been removed and can deal with it the next time we try to add an IGTK for a station, so we shouldn't try to remove the key if the station ID is IWL_MVM_INVALID_STA. Do this by removing the check for mvm_sta before calling iwl_mvm_send_sta_igtk() and check return from that function gracefully if the station ID is invalid. Cc: stable@vger.kernel.org # 4.12+ Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit baa6cf8450b72dcab11f37c47efce7c5b9b8ad0f Author: Andrei Otcheretianski Date: Fri Jan 31 15:45:24 2020 +0200 iwlwifi: mvm: Fix thermal zone registration Use a unique name when registering a thermal zone. Otherwise, with multiple NICS, we hit the following warning during the unregistration. WARNING: CPU: 2 PID: 3525 at fs/sysfs/group.c:255 RIP: 0010:sysfs_remove_group+0x80/0x90 Call Trace: dpm_sysfs_remove+0x57/0x60 device_del+0x5a/0x350 ? sscanf+0x4e/0x70 device_unregister+0x1a/0x60 hwmon_device_unregister+0x4a/0xa0 thermal_remove_hwmon_sysfs+0x175/0x1d0 thermal_zone_device_unregister+0x188/0x1e0 iwl_mvm_thermal_exit+0xe7/0x100 [iwlmvm] iwl_op_mode_mvm_stop+0x27/0x180 [iwlmvm] _iwl_op_mode_stop.isra.3+0x2b/0x50 [iwlwifi] iwl_opmode_deregister+0x90/0xa0 [iwlwifi] __exit_compat+0x10/0x2c7 [iwlmvm] __x64_sys_delete_module+0x13f/0x270 do_syscall_64+0x5a/0x110 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Andrei Otcheretianski Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo commit cfa27356f835dc7755192e7b941d4f4851acbcc7 Author: Christoph Hellwig Date: Thu Jan 30 19:40:24 2020 +0100 nvme-pci: remove nvmeq->tags There is no real need to have a pointer to the tagset in struct nvme_queue, as we only need it in a single place, and that place can derive the used tagset from the device and qid trivially. This fixes a problem with stale pointer exposure when tagsets are reset, and also shrinks the nvme_queue structure. It also matches what most other transports have done since day 1. Reported-by: Edmund Nadolski Signed-off-by: Christoph Hellwig Signed-off-by: Keith Busch commit b716e6889c95f64ba32af492461f6cc9341f3f05 Author: Sagi Grimberg Date: Sun Jan 26 23:23:28 2020 -0800 nvmet: fix dsm failure when payload does not match sgl descriptor The host is allowed to pass the controller an sgl describing a buffer that is larger than the dsm payload itself, allow it when executing dsm. Reported-by: Dakshaja Uppalapati Reviewed-by: Christoph Hellwig , Reviewed-by: Max Gurtovoy Signed-off-by: Sagi Grimberg Signed-off-by: Keith Busch commit 4ac76436a6d07dec1c3c766f234aa787a16e8f65 Author: Amol Grover Date: Sat Jan 11 13:08:16 2020 +0530 nvmet: Pass lockdep expression to RCU lists ctrl->subsys->namespaces and subsys->namespaces are traversed with list_for_each_entry_rcu outside an RCU read-side critical section but under the protection of ctrl->subsys->lock and subsys->lock respectively. Hence, add the corresponding lockdep expression to the list traversal primitive to silence false-positive lockdep warnings, and harden RCU lists. Reported-by: kbuild test robot Reviewed-by: Joel Fernandes (Google) Signed-off-by: Amol Grover Signed-off-by: Keith Busch commit d4e9056daedca3891414fe3c91de3449a5dad0f2 Author: Masahiro Yamada Date: Tue Feb 4 01:47:08 2020 +0900 initramfs: do not show compression mode choice if INITRAMFS_SOURCE is empty Since commit ddd09bcc899f ("initramfs: make compression options not depend on INITRAMFS_SOURCE"), Kconfig asks the compression mode for the built-in initramfs regardless of INITRAMFS_SOURCE. It is technically simpler, but pointless from a UI perspective, Linus says [1]. When INITRAMFS_SOURCE is empty, usr/Makefile creates a tiny default cpio, which is so small that nobody cares about the compression. This commit hides the Kconfig choice in that case. The default cpio is embedded without compression, which was the original behavior. [1]: https://lkml.org/lkml/2020/2/1/160 Suggested-by: Linus Torvalds Signed-off-by: Masahiro Yamada Signed-off-by: Linus Torvalds commit ad801428366ebbd541a5b8a1bf4d8b57ee7a8200 Merge: e17ac02b18c6 d55966c4279b Author: Linus Torvalds Date: Mon Feb 3 17:03:42 2020 +0000 Merge tag 'for-5.6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull more btrfs updates from David Sterba: "Fixes that arrived after the merge window freeze, mostly stable material. - fix race in tree-mod-log element tracking - fix bio flushing inside extent writepages - fix assertion when in-memory tracking of discarded extents finds an empty tree (eg. after adding a new device) - update logic of temporary read-only block groups to take into account overcommit - fix some fixup worker corner cases: - page could not go through proper COW cycle and the dirty status is lost due to page migration - deadlock if delayed allocation is performed under page lock - fix send emitting invalid clones within the same file - fix statfs reporting 0 free space when global block reserve size is larger than remaining free space but there is still space for new chunks" * tag 'for-5.6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: do not zero f_bavail if we have available space Btrfs: send, fix emission of invalid clone operations within the same file btrfs: do not do delalloc reservation under page lock btrfs: drop the -EBUSY case in __extent_writepage_io Btrfs: keep pages dirty when using btrfs_writepage_fixup_worker btrfs: take overcommit into account in inc_block_group_ro btrfs: fix force usage in inc_block_group_ro btrfs: Correctly handle empty trees in find_first_clear_extent_bit btrfs: flush write bio if we loop in extent_write_cache_pages Btrfs: fix race between adding and putting tree mod seq elements and nodes commit e17ac02b18c61f0d5f85c6ec9e49f3ff00b2b3cd Merge: 754beeec1d90 dc2c733e6584 Author: Linus Torvalds Date: Mon Feb 3 16:59:51 2020 +0000 Merge tag 'kgdb-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux Pull kgdb updates from Daniel Thompson: "Everything for kgdb this time around is either simplifications or clean ups. In particular Douglas Anderson's modifications to the backtrace machine in the *last* dev cycle have enabled Doug to tidy up some MIPS specific backtrace code and stop sharing certain data structures across the kernel. Note that The MIPS folks were on Cc: for the MIPS patch and reacted positively (but without an explicit Acked-by). Doug also got rid of the implicit switching between tasks and register sets during some but not of kdb's backtrace actions (because the implicit switching was either confusing for users, pointless or both). Finally there is a coverity fix and patch to replace open coded console traversal with the proper helper function" * tag 'kgdb-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux: kdb: Use for_each_console() helper kdb: remove redundant assignment to pointer bp kdb: Get rid of confusing diag msg from "rd" if current task has no regs kdb: Gid rid of implicit setting of the current task / regs kdb: kdb_current_task shouldn't be exported kdb: kdb_current_regs should be private MIPS: kdb: Remove old workaround for backtracing on other CPUs commit 8d60526999aace135de37220ec94ba40bc792234 Author: Masahiro Yamada Date: Sun Feb 2 14:09:21 2020 +0900 scripts/kallsyms: change table to store (strcut sym_entry *) The symbol table is extended every 10000 addition by using realloc(), where data copy might occur to the new buffer. To decrease the amount of possible data copy, let's change the table to store the pointer. The symbol type + symbol name part is appended at the end of (struct sym_entry), and allocated together with the struct body. Signed-off-by: Masahiro Yamada commit be9f6133f8770bb9c5f4a3cb3df6d30d7d3f7e5b Author: Masahiro Yamada Date: Sun Feb 2 14:09:20 2020 +0900 scripts/kallsyms: rename local variables in read_symbol() I will use 'sym' for the point to struce sym_entry in the next commit. Rename 'sym', 'stype' to 'name', 'type', which are more intuitive. Signed-off-by: Masahiro Yamada commit 5f2fb52fac15a8a8e10ce020dd532504a8abfc4e Author: Masahiro Yamada Date: Sun Feb 2 01:49:24 2020 +0900 kbuild: rename hostprogs-y/always to hostprogs/always-y In old days, the "host-progs" syntax was used for specifying host programs. It was renamed to the current "hostprogs-y" in 2004. It is typically useful in scripts/Makefile because it allows Kbuild to selectively compile host programs based on the kernel configuration. This commit renames like follows: always -> always-y hostprogs-y -> hostprogs So, scripts/Makefile will look like this: always-$(CONFIG_BUILD_BIN2C) += ... always-$(CONFIG_KALLSYMS) += ... ... hostprogs := $(always-y) $(always-m) I think this makes more sense because a host program is always a host program, irrespective of the kernel configuration. We want to specify which ones to compile by CONFIG options, so always-y will be handier. The "always", "hostprogs-y", "hostprogs-m" will be kept for backward compatibility for a while. Signed-off-by: Masahiro Yamada commit faa7bdd7e9e1441ed82819b8db8bb43d3d3fd818 Author: Masahiro Yamada Date: Sun Feb 2 01:49:23 2020 +0900 kbuild: fix the document to use extra-y for vmlinux.lds The difference between "always" and "extra-y" is that the targets listed in $(always) are always built, whereas the ones in $(extra-y) are built only when KBUILD_BUILTIN is set. So, "make modules" does not build the targets in $(extra-y). vmlinux.lds is only needed for linking vmlinux. So, adding it to extra-y is more correct. In fact, arch/x86/kernel/Makefile does this. Fix the example code. Signed-off-by: Masahiro Yamada commit c8fb7d7e48d11520ad24808cfce7afb7b9c9f798 Author: Masahiro Yamada Date: Sat Feb 1 14:03:11 2020 +0900 kconfig: fix broken dependency in randconfig-generated .config Running randconfig on arm64 using KCONFIG_SEED=0x40C5E904 (e.g. on v5.5) produces the .config with CONFIG_EFI=y and CONFIG_CPU_BIG_ENDIAN=y, which does not meet the !CONFIG_CPU_BIG_ENDIAN dependency. This is because the user choice for CONFIG_CPU_LITTLE_ENDIAN vs CONFIG_CPU_BIG_ENDIAN is set by randomize_choice_values() after the value of CONFIG_EFI is calculated. When this happens, the has_changed flag should be set. Currently, it takes the result from the last iteration. It should accumulate all the results of the loop. Fixes: 3b9a19e08960 ("kconfig: loop as long as we changed some symbols in randconfig") Reported-by: Vincenzo Frascino Signed-off-by: Masahiro Yamada commit 034dbec179e5d2820480f477c43acbc50245e56d Author: Enric Balletbo i Serra Date: Wed Jan 22 10:07:01 2020 +0100 platform/chrome: cros_ec: Match implementation with headers The 'cros_ec' core driver is the common interface for the cros_ec transport drivers to do the shared operations to register, unregister, suspend, resume and handle_event. The interface is provided by including the header 'include/linux/platform_data/cros_ec_proto.h', however, instead of have the implementation of these functions in cros_ec_proto.c, it is in 'cros_ec.c', which is a different kernel module. Apart from being a bad practice, this can induce confusions allowing the users of the cros_ec protocol to call these functions. The register, unregister, suspend, resume and handle_event functions *should* only be called by the different transport drivers (i2c, spi, lpc, etc.), so make this a bit less confusing by moving these functions from the public in-kernel space to a private include in platform/chrome, and then, the interface for cros_ec module and for the cros_ec_proto module is clean. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Benson Leung commit 183edb20e60a73925bf3b60e2f4796898167262f Author: Yangtao Li Date: Mon Feb 3 15:45:17 2020 +0000 cpufreq: Make cpufreq_global_kobject static The cpufreq_global_kobject is only used internally by cpufreq.c after commit 2361be236662 ("cpufreq: Don't create empty /sys/devices/system/cpu/cpufreq directory"). Make it static. Signed-off-by: Yangtao Li [ rjw: Add empty line after cpufreq_global_kobject definition ] Signed-off-by: Rafael J. Wysocki commit c0399cf668a2a1b7310dbedd424f6a4b60aabffc Author: Alex Shi Date: Tue Jan 21 16:49:56 2020 +0800 NFS: remove unused macros MNT_fhs_status_sz/MNT_fhandle3_sz are never used after they were introduced. So better to remove them. Signed-off-by: Alex Shi Cc: Trond Myklebust Cc: Anna Schumaker Cc: linux-nfs@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Anna Schumaker commit 754beeec1d9024eef0db8dc4be2636331dd413c6 Merge: 2367da5b51cd 98c49f1746ac Author: Linus Torvalds Date: Mon Feb 3 14:57:33 2020 +0000 Merge tag 'char-misc-5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc fix from Greg KH: "Here is a single patch, that fixes up a commit that came in the previous char/misc merge. It fixes a bug in the hpet driver that everyone keeps tripping over in their automated testing. Good thing is, people are catching it. Bad thing it wasn't caught by anyone testing before this. Oh well... This has been in linux-next for a few days with no reported issues" * tag 'char-misc-5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: char: hpet: Fix out-of-bounds read bug commit 2367da5b51cd2819d630432e6a8876f973b1bbc3 Merge: af32f3a414d3 7af43a76695d Author: Linus Torvalds Date: Mon Feb 3 14:55:08 2020 +0000 Merge tag 'backlight-next-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "Fix-ups: - Remove superfluous code in ams369fg06 - Convert over to GPIO descriptor (gpiod) in bd6107 Bug Fixes: - Fix unsigned comparison to less than zero in qcom-wled" * tag 'backlight-next-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: qcom-wled: Fix unsigned comparison to zero backlight: bd6107: Convert to use GPIO descriptor backlight: ams369fg06: Drop GPIO include commit af32f3a414d340b0ab92e88ffb80a19632ff345e Merge: d0fa9250317f 5312f321a67c Author: Linus Torvalds Date: Mon Feb 3 14:51:57 2020 +0000 Merge tag 'mfd-next-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers: - Add support for ROHM BD71828 PMICs and GPIOs - Add support for Qualcomm Aqstic Audio Codecs WCD9340 and WCD9341 New Device Support: - Add support for BD71828 to BD70528 RTC driver - Add support for Intel's Jasper Lake to LPSS PCI New Functionality: - Add support for Power Key to ROHM BD71828 - Add support for Clocks to ROHM BD71828 - Add support for GPIOs to Dialog DA9062 - Add support for USB PD Notify to ChromiumOS EC - Allow callers to specify args when requesting regmap lookup; syscon Fix-ups: - Improve error handling and sanity checking; atmel-hlcdc, dln2 - Device Tree support/documentation; bd71828, da9062, xylon,logicvc, ab8500, max14577, atmel-usart - Match devices using platform IDs; bd7xxxx - Refactor BD718x7 regulator component; bd718x7-regulator - Use standard interfaces/helpers; syscon, sm501 - Trivial (whitespace, spelling, etc); ab8500-core, Kconfig - Remove unused code; db8500-prcmu, tqmx86 - Wait until boot has finished before accessing registers; madera-core - Provide missing register value defaults; cs47l15-tables - Allow more time for hardware to reset; madera-core Bug Fixes: - Fix erroneous register values; rohm-bd70528 - Fix register volatility; axp20x, rn5t618 - Fix Kconfig dependencies; MFD_MAX77650 - Fix incorrect compatible string; da9062-core - Fix syscon_regmap_lookup_by_phandle_args() stub; syscon" * tag 'mfd-next-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (41 commits) mfd: syscon: Fix syscon_regmap_lookup_by_phandle_args() dummy mfd: wcd934x: Add support to wcd9340/wcd9341 codec mfd: syscon: Add arguments support for syscon reference mfd: rn5t618: Mark ADC control register volatile dt-bindings: atmel-usart: Add microchip,sam9x60-{usart, dbgu} dt-bindings: atmel-usart: Remove wildcard mfd: cros_ec: Add cros-usbpd-notify subdevice mfd: da9062: Fix watchdog compatible string mfd: madera: Allow more time for hardware reset mfd: cs47l15: Add missing register default mfd: madera: Wait for boot done before accessing any other registers mfd: Kconfig: Rename Samsung to lowercase mfd: tqmx86: remove set but not used variable 'i2c_ien' mfd: dbx500-prcmu: Drop DSI pll clock functions mfd: dbx500-prcmu: Drop set_display_clocks() mfd: max77650: Select REGMAP_IRQ in Kconfig mfd: axp20x: Mark AXP20X_VBUS_IPSOUT_MGMT as volatile mfd: ab8500: Fix ab8500-clk typo mfd: intel-lpss: Add Intel Jasper Lake PCI IDs dt-bindings: mfd: max14577: Add reference to max14040_battery.txt descriptions ... commit d0fa9250317ff6e92a1397ebf7cf4d83014f38a6 Merge: 46d6b7becb1d 54e19d34011f Author: Linus Torvalds Date: Mon Feb 3 14:42:03 2020 +0000 Merge tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull Hyper-V updates from Sasha Levin: - Most of the commits here are work to enable host-initiated hibernation support by Dexuan Cui. - Fix for a warning shown when host sends non-aligned balloon requests by Tianyu Lan. * tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: hv_utils: Add the support of hibernation hv_utils: Support host-initiated hibernation request hv_utils: Support host-initiated restart request Tools: hv: Reopen the devices if read() or write() returns errors video: hyperv: hyperv_fb: Use physical memory for fb on HyperV Gen 1 VMs. Drivers: hv: vmbus: Ignore CHANNELMSG_TL_CONNECT_RESULT(23) video: hyperv_fb: Fix hibernation for the deferred IO feature Input: hyperv-keyboard: Add the support of hibernation hv_balloon: Balloon up according to request page number commit beae56192a2570578ae45050e73c5ff9254f63e6 Author: Hans de Goede Date: Sat Feb 1 12:56:48 2020 +0100 HID: ite: Only bind to keyboard USB interface on Acer SW5-012 keyboard dock Commit 8f18eca9ebc5 ("HID: ite: Add USB id match for Acer SW5-012 keyboard dock") added the USB id for the Acer SW5-012's keyboard dock to the hid-ite driver to fix the rfkill driver not working. Most keyboard docks with an ITE 8595 keyboard/touchpad controller have the "Wireless Radio Control" bits which need the special hid-ite driver on the second USB interface (the mouse interface) and their touchpad only supports mouse emulation, so using generic hid-input handling for anything but the "Wireless Radio Control" bits is fine. On these devices we simply bind to all USB interfaces. But unlike other ITE8595 using keyboard docks, the Acer Aspire Switch 10 (SW5-012)'s touchpad not only does mouse emulation it also supports HID-multitouch and all the keys including the "Wireless Radio Control" bits have been moved to the first USB interface (the keyboard intf). So we need hid-ite to handle the first (keyboard) USB interface and have it NOT bind to the second (mouse) USB interface so that that can be handled by hid-multitouch.c and we get proper multi-touch support. This commit changes the hid_device_id for the SW5-012 keyboard dock to only match on hid devices from the HID_GROUP_GENERIC group, this way hid-ite will not bind the the mouse/multi-touch interface which has HID_GROUP_MULTITOUCH_WIN_8 as group. This fixes the regression to mouse-emulation mode introduced by adding the keyboard dock USB id. Cc: stable@vger.kernel.org Fixes: 8f18eca9ebc5 ("HID: ite: Add USB id match for Acer SW5-012 keyboard dock") Reported-by: Zdeněk Rampas Signed-off-by: Hans de Goede Signed-off-by: Benjamin Tissoires commit c92bddee77353a773f0df76115c1a01877ce1eae Author: Paolo Valente Date: Mon Feb 3 11:41:00 2020 +0100 block, bfq: clarify the goal of bfq_split_bfqq() The exact, general goal of the function bfq_split_bfqq() is not that apparent. Add a comment to make it clear. Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe commit db37a34c563bf4692b36990ae89005c031385e52 Author: Paolo Valente Date: Mon Feb 3 11:40:59 2020 +0100 block, bfq: get a ref to a group when adding it to a service tree BFQ schedules generic entities, which may represent either bfq_queues or groups of bfq_queues. When an entity is inserted into a service tree, a reference must be taken, to make sure that the entity does not disappear while still referred in the tree. Unfortunately, such a reference is mistakenly taken only if the entity represents a bfq_queue. This commit takes a reference also in case the entity represents a group. Tested-by: Oleksandr Natalenko Tested-by: Chris Evich Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe commit 4d8340d0d4d90e7ca367d18ec16c2fefa89a339c Author: Paolo Valente Date: Mon Feb 3 11:40:58 2020 +0100 block, bfq: remove ifdefs from around gets/puts of bfq groups ifdefs around gets and puts of bfq groups reduce readability, remove them. Tested-by: Oleksandr Natalenko Reported-by: Jens Axboe Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe commit 33a16a9804688b2f4c4281ec31bc393ef2645ae4 Author: Paolo Valente Date: Mon Feb 3 11:40:57 2020 +0100 block, bfq: extend incomplete name of field on_st The flag on_st in the bfq_entity data structure is true if the entity is on a service tree or is in service. Yet the name of the field, confusingly, does not mention the second, very important case. Extend the name to mention the second case too. Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe commit ecedd3d7e19911ab8fe42f17b77c0a30fe7f4db3 Author: Paolo Valente Date: Mon Feb 3 11:40:56 2020 +0100 block, bfq: get extra ref to prevent a queue from being freed during a group move In bfq_bfqq_move(), the bfq_queue, say Q, to be moved to a new group may happen to be deactivated in the scheduling data structures of the source group (and then activated in the destination group). If Q is referred only by the data structures in the source group when the deactivation happens, then Q is freed upon the deactivation. This commit addresses this issue by getting an extra reference before the possible deactivation, and releasing this extra reference after Q has been moved. Tested-by: Chris Evich Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe commit 32c59e3a9a5a0b180dd015755d6d18ca31e55935 Author: Paolo Valente Date: Mon Feb 3 11:40:55 2020 +0100 block, bfq: do not insert oom queue into position tree BFQ maintains an ordered list, implemented with an RB tree, of head-request positions of non-empty bfq_queues. This position tree, inherited from CFQ, is used to find bfq_queues that contain I/O close to each other. BFQ merges these bfq_queues into a single shared queue, if this boosts throughput on the device at hand. There is however a special-purpose bfq_queue that does not participate in queue merging, the oom bfq_queue. Yet, also this bfq_queue could be wrongly added to the position tree. So bfqq_find_close() could return the oom bfq_queue, which is a source of further troubles in an out-of-memory situation. This commit prevents the oom bfq_queue from being inserted into the position tree. Tested-by: Patrick Dung Tested-by: Oleksandr Natalenko Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe commit f718b093277df582fbf8775548a4f163e664d282 Author: Paolo Valente Date: Mon Feb 3 11:40:54 2020 +0100 block, bfq: do not plug I/O for bfq_queues with no proc refs Commit 478de3380c1c ("block, bfq: deschedule empty bfq_queues not referred by any process") fixed commit 3726112ec731 ("block, bfq: re-schedule empty queues if they deserve I/O plugging") by descheduling an empty bfq_queue when it remains with not process reference. Yet, this still left a case uncovered: an empty bfq_queue with not process reference that remains in service. This happens for an in-service sync bfq_queue that is deemed to deserve I/O-dispatch plugging when it remains empty. Yet no new requests will arrive for such a bfq_queue if no process sends requests to it any longer. Even worse, the bfq_queue may happen to be prematurely freed while still in service (because there may remain no reference to it any longer). This commit solves this problem by preventing I/O dispatch from being plugged for the in-service bfq_queue, if the latter has no process reference (the bfq_queue is then prevented from remaining in service). Fixes: 3726112ec731 ("block, bfq: re-schedule empty queues if they deserve I/O plugging") Tested-by: Oleksandr Natalenko Reported-by: Patrick Dung Tested-by: Patrick Dung Signed-off-by: Paolo Valente Signed-off-by: Jens Axboe commit 324282c0252a44a97d628813e30ea7258940d469 Author: Carlos Maiolino Date: Thu Jan 9 14:30:45 2020 +0100 fibmap: Reject negative block numbers FIBMAP receives an integer from userspace which is then implicitly converted into sector_t to be passed to bmap(). No check is made to ensure userspace didn't send a negative block number, which can end up in an underflow, and returning to userspace a corrupted block address. As a side-effect, the underflow caused by a negative block here, will trigger the WARN() in iomap_bmap_actor(), which is how this issue was first discovered. Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino Signed-off-by: Al Viro commit 0d89fdae2afe833dd3025edd8c8287675d45c74e Author: Carlos Maiolino Date: Thu Jan 9 14:30:44 2020 +0100 fibmap: Use bmap instead of ->bmap method in ioctl_fibmap Now we have the possibility of proper error return in bmap, use bmap() function in ioctl_fibmap() instead of calling ->bmap method directly. Signed-off-by: Carlos Maiolino Signed-off-by: Al Viro commit 569d2056def7add85c0a9add03c19017e5525012 Author: Carlos Maiolino Date: Thu Jan 9 14:30:43 2020 +0100 ecryptfs: drop direct calls to ->bmap Replace direct ->bmap calls by bmap() method. Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino Signed-off-by: Al Viro commit 10d83e11a582631a14579a087a55608075c6f539 Author: Carlos Maiolino Date: Thu Jan 9 14:30:42 2020 +0100 cachefiles: drop direct usage of ->bmap method. Replace the direct usage of ->bmap method by a bmap() call. Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino Signed-off-by: Al Viro commit 30460e1ea3e62f8457e087db9a309ed1031630da Author: Carlos Maiolino Date: Thu Jan 9 14:30:41 2020 +0100 fs: Enable bmap() function to properly return errors By now, bmap() will either return the physical block number related to the requested file offset or 0 in case of error or the requested offset maps into a hole. This patch makes the needed changes to enable bmap() to proper return errors, using the return value as an error return, and now, a pointer must be passed to bmap() to be filled with the mapped physical block. It will change the behavior of bmap() on return: - negative value in case of error - zero on success or map fell into a hole In case of a hole, the *block will be zero too Since this is a prep patch, by now, the only error return is -EINVAL if ->bmap doesn't exist. Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino Signed-off-by: Al Viro commit 137c4ba7163ad9d5696b9fde78b1c0898a9c115b Author: Ben Skeggs Date: Mon Feb 3 03:37:07 2020 -0500 drm/nouveau/kms/gv100-: avoid sending a core update until the first modeset The OR routing logic in NVKM does not expect to receive supervisor interrupts until the DD has provided consistent information on the ORs it's using and the EVO/NVD assembly state to match. The combination of changing window ownership + core channel update during display init triggered a situation where we'd disconnect an OR from the pad it was meant to still be driving on some systems. Signed-off-by: Ben Skeggs commit 5bb88d07948b6779cb783ec0f08b4c1474d592dd Author: Ben Skeggs Date: Mon Feb 3 03:36:30 2020 -0500 drm/nouveau/kms/gv100-: move window ownership setup into modesetting path For various complicated reasons, we need to avoid sending a core update method during display init. Something, which we've been required to do on GV100 and up because we've been assigning windows to heads there and the HW is rather picky about when that's allowed. This moves window assignment into the modesetting path at a point where it's much safer to send our first update methods to NVDisplay. Signed-off-by: Ben Skeggs commit 58ae5284f663f0856a13bc6caad93a0fe49d7cb4 Author: Ben Skeggs Date: Mon Feb 3 01:58:45 2020 -0500 drm/nouveau/disp/gv100-: halt NV_PDISP_FE_RM_INTR_STAT_CTRL_DISP_ERROR storms Signed-off-by: Ben Skeggs commit 7e0cf7e9936c4358b0863357b90aa12afe6489da Author: Boris Brezillon Date: Fri Nov 29 14:59:08 2019 +0100 drm/panfrost: Make sure the shrinker does not reclaim referenced BOs Userspace might tag a BO purgeable while it's still referenced by GPU jobs. We need to make sure the shrinker does not purge such BOs until all jobs referencing it are finished. Fixes: 013b65101315 ("drm/panfrost: Add madvise and shrinker support") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20191129135908.2439529-9-boris.brezillon@collabora.com commit dec0a81a7814c8a876e663e0627468e6b1a7d2fb Author: Hanjun Guo Date: Mon Feb 3 09:36:07 2020 +0800 i2c: designware: Add ACPI HID for Hisilicon Hip08-Lite I2C controller Add ACPI HID HISI02A3 for Hisilicon Hip08 Lite, which has different clock frequency from Hip08 for I2C controller. Tested-by: Sheng Feng Signed-off-by: Hanjun Guo Acked-by: Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit c01a4a136440cb9727a519bb10f5f2696a80e8de Author: Hanjun Guo Date: Mon Feb 3 09:36:06 2020 +0800 ACPI / APD: Add clock frequency for Hisilicon Hip08-Lite I2C controller I2C clock frequency of Designware ip for Hisilicon Hip08 Lite is 125M, use a new ACPI HID to enable it. Tested-by: Sheng Feng Signed-off-by: Hanjun Guo Reviewed-by: Jarkko Nikula Signed-off-by: Rafael J. Wysocki commit c21502efdaedfdf9fc71334883a164341881bc22 Author: Rafael J. Wysocki Date: Fri Jan 31 11:05:17 2020 +0100 Documentation: admin-guide: PM: Update sleep states documentation There is some information in Documentation/power/interface.rst that is still missing from Documentation/admin-guide/pm/sleep-states.rst and really should be present in there, so update the latter by adding that information to it and delete the former (as it becomes redundant after that and it is somewhat outdated). While at it, clean up some assorted pieces of sleep-states.rst a bit. Signed-off-by: Rafael J. Wysocki commit 4dcb78ee579cdf90e30c5a0223f6f160ea37182d Author: Rafael J. Wysocki Date: Mon Feb 3 11:57:18 2020 +0100 intel_idle: Introduce 'states_off' module parameter In certain system configurations it may not be desirable to use some C-states assumed to be available by intel_idle and the driver needs to be prevented from using them even before the cpuidle sysfs interface becomes accessible to user space. Currently, the only way to achieve that is by setting the 'max_cstate' module parameter to a value lower than the index of the shallowest of the C-states in question, but that may be overly intrusive, because it effectively makes all of the idle states deeper than the 'max_cstate' one go away (and the C-state to avoid may be in the middle of the range normally regarded as available). To allow that limitation to be overcome, introduce a new module parameter called 'states_off' to represent a list of idle states to be disabled by default in the form of a bitmask and update the documentation to cover it. Signed-off-by: Rafael J. Wysocki commit 3a5be9b8f43346a24f31c0017cb2566a6b2c72c5 Author: Rafael J. Wysocki Date: Mon Feb 3 11:57:08 2020 +0100 intel_idle: Introduce 'use_acpi' module parameter For diagnostics, it is generally useful to be able to make intel_idle take the system's ACPI tables into consideration even if that is not required for the processor model in there, so introduce a new module parameter, 'use_acpi', to make that happen and update the documentation to cover it. While at it, fix the 'no_acpi' module parameter name in the documentation. Signed-off-by: Rafael J. Wysocki commit a4ac9d45c0cd14a2adc872186431c79804b77dbf Author: Miklos Szeredi Date: Mon Feb 3 11:41:53 2020 +0100 ovl: fix lseek overflow on 32bit ovl_lseek() is using ssize_t to return the value from vfs_llseek(). On a 32-bit kernel ssize_t is a 32-bit signed int, which overflows above 2 GB. Assign the return value of vfs_llseek() to loff_t to fix this. Reported-by: Boris Gjenero Fixes: 9e46b840c705 ("ovl: support stacked SEEK_HOLE/SEEK_DATA") Cc: # v4.19 Signed-off-by: Miklos Szeredi commit 5273a191dca65a675dc0bcf3909e59c6933e2831 Author: David Howells Date: Thu Jan 30 21:50:36 2020 +0000 rxrpc: Fix NULL pointer deref due to call->conn being cleared on disconnect When a call is disconnected, the connection pointer from the call is cleared to make sure it isn't used again and to prevent further attempted transmission for the call. Unfortunately, there might be a daemon trying to use it at the same time to transmit a packet. Fix this by keeping call->conn set, but setting a flag on the call to indicate disconnection instead. Remove also the bits in the transmission functions where the conn pointer is checked and a ref taken under spinlock as this is now redundant. Fixes: 8d94aa381dab ("rxrpc: Calls shouldn't hold socket refs") Signed-off-by: David Howells commit 107945227ac5d4c37911c7841b27c64b489ce9a9 Author: Zenghui Yu Date: Mon Dec 2 15:10:21 2019 +0800 irqchip/gic-v3-its: Reference to its_invall_cmd descriptor when building INVALL It looks like an obvious mistake to use its_mapc_cmd descriptor when building the INVALL command block. It so far worked by luck because both its_mapc_cmd.col and its_invall_cmd.col sit at the same offset of the ITS command descriptor, but we should not rely on it. Fixes: cc2d3216f53c ("irqchip: GICv3: ITS command queue") Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191202071021.1251-1-yuzenghui@huawei.com commit 5312f321a67cfee1fe4de245bc558fa857dce33b Author: Geert Uytterhoeven Date: Thu Jan 30 13:55:29 2020 +0100 mfd: syscon: Fix syscon_regmap_lookup_by_phandle_args() dummy If CONFIG_MFD_SYSCON=n: include/linux/mfd/syscon.h:54:23: warning: ‘syscon_regmap_lookup_by_phandle_args’ defined but not used [-Wunused-function] Fix this by adding the missing inline keyword. Fixes: 6a24f567af4accef ("mfd: syscon: Add arguments support for syscon reference") Signed-off-by: Geert Uytterhoeven Signed-off-by: Lee Jones commit 8044aad70a1fbd66376cdb2a13e536db9dd6c132 Author: Greg Ungerer Date: Fri Jan 17 16:28:19 2020 +1000 m68knommu: fix memcpy() out of bounds warning in get_user() Newer versions of gcc are giving warnings in the non-MMU m68k version of the get_user() macro: ./arch/m68k/include/asm/string.h:72:25: warning: ‘__builtin_memcpy’ forming offset [3, 4] is out of the bounds [0, 2] of object ‘__gu_val’ with type ‘short unsigned int’ [-Warray-bounds] The warnings are generated when smaller sized variables are used as the result of user space pointers to larger values. For example a short/2-byte variable stores the result of a user space int (4-byte) pointer. The warning is in the 8-byte branch of get_user() - even though that branch is not the taken branch in the warning cases. Refactor the 8-byte branch of get_user() so that it uses a correctly formed union type to read and write the source and destination objects. Keep using the memcpy() just in case the user space pointer is not naturaly aligned (not required for ColdFire, but needed for early 68000). Signed-off-by: Greg Ungerer commit bad83565eafe8a00922ad4eed6920625a10a2126 Author: Peter Ujfalusi Date: Fri Jan 31 11:38:58 2020 +0200 dmaengine: Cleanups for the slave <-> channel symlink support No need to use goto to jump over the return chan ? chan : ERR_PTR(-EPROBE_DEFER); We can just revert the check and return right there. Do not fail the channel request if the chan->name allocation fails, but print a warning about it. Change the dev_err to dev_warn if sysfs_create_link() fails as it is not fatal. Only attempt to remove the DMA_SLAVE_NAME symlink if it is created - or it was attempted to be created. Signed-off-by: Peter Ujfalusi Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200131093859.3311-2-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 5429b51f606cb82f315f68678b959112766f235e Author: Dave Jiang Date: Fri Jan 31 10:58:39 2020 -0700 dmaengine: fix null ptr check for __dma_async_device_channel_register() Add check to pointer after assignment before accessing members. Fixes: d2fb0a043838: ("dmaengine: break out channel registration") Reported-by: Dan Carpenter Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/158049351973.45445.3291586905226032744.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit a9113a90f5f0ff476a4ac2bf15861fa4358a3643 Author: kbuild test robot Date: Thu Jan 30 15:44:49 2020 +0100 dmaengine: idxd: fix boolconv.cocci warnings Remove unneeded conversion to bool Generated by: scripts/coccinelle/misc/boolconv.cocci CC: Dave Jiang Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall Acked-by: Dave Jiang Link: https://lore.kernel.org/r/alpine.DEB.2.21.2001301543150.7476@hadrien Signed-off-by: Vinod Koul commit 83d0585f91da441a0b11bc5ff93f4cda56de6703 Merge: dff6bc1bfd46 af8c8a450bf4 Author: Jakub Kicinski Date: Sun Feb 2 13:39:11 2020 -0800 Merge branch 'Fix-reconnection-latency-caused-by-FIN-ACK-handling-race' SeongJae Park says: ==================== Fix reconnection latency caused by FIN/ACK handling race The first patch fixes the problem by adjusting the first resend delay of the SYN in the case. The second one adds a user space test to reproduce this problem. From v2 (https://lore.kernel.org/linux-kselftest/20200201071859.4231-1-sj38.park@gmail.com/) - Use TCP_TIMEOUT_MIN as reduced delay (Neal Cardwall) - Add Reviewed-by and Signed-off-by from Eric Dumazet From v1 (https://lore.kernel.org/linux-kselftest/20200131122421.23286-1-sjpark@amazon.com/) - Drop the trivial comment fix patch (Eric Dumazet) - Limit the delay adjustment to only the first SYN resend (Eric Dumazet) - selftest: Avoid use of hard-coded port number (Eric Dumazet) - Explain RST/ACK and FIN/ACK has no big difference (Neal Cardwell) ==================== Signed-off-by: Jakub Kicinski commit af8c8a450bf4698a8a6a7c68956ea5ccafe4cc88 Author: SeongJae Park Date: Sun Feb 2 03:38:27 2020 +0000 selftests: net: Add FIN_ACK processing order related latency spike test This commit adds a test for FIN_ACK process races related reconnection latency spike issues. The issue has described and solved by the previous commit ("tcp: Reduce SYN resend delay if a suspicous ACK is received"). The test program is configured with a server and a client process. The server creates and binds a socket to a port that dynamically allocated, listen on it, and start a infinite loop. Inside the loop, it accepts connection, reads 4 bytes from the socket, and closes the connection. The client is constructed as an infinite loop. Inside the loop, it creates a socket with LINGER and NODELAY option, connect to the server, send 4 bytes data, try read some data from server. After the read() returns, it measure the latency from the beginning of this loop to this point and if the latency is larger than 1 second (spike), print a message. Reviewed-by: Eric Dumazet Signed-off-by: SeongJae Park Signed-off-by: Jakub Kicinski commit 9603d47bad4642118fa19fd1562569663d9235f6 Author: SeongJae Park Date: Sun Feb 2 03:38:26 2020 +0000 tcp: Reduce SYN resend delay if a suspicous ACK is received When closing a connection, the two acks that required to change closing socket's status to FIN_WAIT_2 and then TIME_WAIT could be processed in reverse order. This is possible in RSS disabled environments such as a connection inside a host. For example, expected state transitions and required packets for the disconnection will be similar to below flow. 00 (Process A) (Process B) 01 ESTABLISHED ESTABLISHED 02 close() 03 FIN_WAIT_1 04 ---FIN--> 05 CLOSE_WAIT 06 <--ACK--- 07 FIN_WAIT_2 08 <--FIN/ACK--- 09 TIME_WAIT 10 ---ACK--> 11 LAST_ACK 12 CLOSED CLOSED In some cases such as LINGER option applied socket, the FIN and FIN/ACK will be substituted to RST and RST/ACK, but there is no difference in the main logic. The acks in lines 6 and 8 are the acks. If the line 8 packet is processed before the line 6 packet, it will be just ignored as it is not a expected packet, and the later process of the line 6 packet will change the status of Process A to FIN_WAIT_2, but as it has already handled line 8 packet, it will not go to TIME_WAIT and thus will not send the line 10 packet to Process B. Thus, Process B will left in CLOSE_WAIT status, as below. 00 (Process A) (Process B) 01 ESTABLISHED ESTABLISHED 02 close() 03 FIN_WAIT_1 04 ---FIN--> 05 CLOSE_WAIT 06 (<--ACK---) 07 (<--FIN/ACK---) 08 (fired in right order) 09 <--FIN/ACK--- 10 <--ACK--- 11 (processed in reverse order) 12 FIN_WAIT_2 Later, if the Process B sends SYN to Process A for reconnection using the same port, Process A will responds with an ACK for the last flow, which has no increased sequence number. Thus, Process A will send RST, wait for TIMEOUT_INIT (one second in default), and then try reconnection. If reconnections are frequent, the one second latency spikes can be a big problem. Below is a tcpdump results of the problem: 14.436259 IP 127.0.0.1.45150 > 127.0.0.1.4242: Flags [S], seq 2560603644 14.436266 IP 127.0.0.1.4242 > 127.0.0.1.45150: Flags [.], ack 5, win 512 14.436271 IP 127.0.0.1.45150 > 127.0.0.1.4242: Flags [R], seq 2541101298 /* ONE SECOND DELAY */ 15.464613 IP 127.0.0.1.45150 > 127.0.0.1.4242: Flags [S], seq 2560603644 This commit mitigates the problem by reducing the delay for the next SYN if the suspicous ACK is received while in SYN_SENT state. Following commit will add a selftest, which can be also helpful for understanding of this issue. Signed-off-by: Eric Dumazet Signed-off-by: SeongJae Park Signed-off-by: Jakub Kicinski commit dff6bc1bfd462b76dc13ec19dedc2c134a62ac59 Author: Lukas Bulwahn Date: Sat Feb 1 13:43:01 2020 +0100 MAINTAINERS: correct entries for ISDN/mISDN section Commit 6d97985072dc ("isdn: move capi drivers to staging") cleaned up the isdn drivers and split the MAINTAINERS section for ISDN, but missed to add the terminal slash for the two directories mISDN and hardware. Hence, all files in those directories were not part of the new ISDN/mISDN SUBSYSTEM, but were considered to be part of "THE REST". Rectify the situation, and while at it, also complete the section with two further build files that belong to that subsystem. This was identified with a small script that finds all files belonging to "THE REST" according to the current MAINTAINERS file, and I investigated upon its output. Fixes: 6d97985072dc ("isdn: move capi drivers to staging") Signed-off-by: Lukas Bulwahn Acked-by: Arnd Bergmann Signed-off-by: Jakub Kicinski commit 46d6b7becb1d5a8e697db786590c19e4067a975a Merge: 545ae66582f7 11648b8339f8 Author: Linus Torvalds Date: Sun Feb 2 11:50:58 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fix from David Miller: "adjtimex regression fix from Arnd" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: fix adjtimex regression commit 545ae66582f7627870b719d318954d0252902519 Merge: 15f8e73355df 260718b3a35d Author: Linus Torvalds Date: Sun Feb 2 11:48:46 2020 -0800 Merge tag 'leds-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds Pull LED updates from Pavel Machek: - New driver for TI TPS6105X - Add managed API to get a LED from a device driver - Misc fixes and updates * tag 'leds-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: (22 commits) leds: lm3692x: Disable chip on brightness 0 leds: lm3692x: Split out lm3692x_leds_disable leds: lm3692x: Move lm3692x_init and rename to lm3692x_leds_enable leds: lm3692x: Make sure we don't exceed the maximum LED current dt: bindings: lm3692x: Add led-max-microamp property leds: lm3692x: Allow to configure over voltage protection dt: bindings: lm3692x: Add ti,ovp-microvolt property leds: populate the device's of_node leds: Add managed API to get a LED from a device driver leds: Add of_led_get() and led_put() leds: lm3532: add pointer to documentation and fix typo leds: lm3532: use extended registration so that LED can be used for backlight leds: lm3642: remove warnings for bad strtol, cleanup gotos leds: rb532: cleanup whitespace ledtrig-pattern: fix email address quoting in MODULE_AUTHOR() dt-bindings: mfd: update TI tps6105x chip bindings leds: tps6105x: add driver for MFD chip LED mode led: max77650: add of_match table leds: bd2802: Convert to use GPIO descriptors leds: pca963x: Fix open-drain initialization ... commit 15f8e73355df9ec48902d128a0ef01a6b8bff453 Merge: 94f2630b1897 71705c611263 Author: Linus Torvalds Date: Sun Feb 2 11:31:52 2020 -0800 Merge branch 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux Pull pcmcia updates from Dominik Brodowski: "This is a series co-developed by Simon Geis and Lukas Panzer to clean up the i82092 PCMCIA device driver" * 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux: PCMCIA/i82092: remove #if 0 block PCMCIA/i82092: delete enter/leave macro PCMCIA/i82092: include instead of PCMCIA/i82092: shorten the lines with over 80 characters PCMCIA/i82092: move assignment out of if condition PCMCIA/i82092: change code indentation PCMCIA/i82092: insert blank line after declarations PCMCIA/i82092: remove braces around single statement blocks PCMCIA/i82092: add/remove spaces to improve readability PCMCIA/i82092: use dev_ instead of printk commit d55966c4279bfc6a0cf0b32bf13f5df228a1eeb6 Author: Josef Bacik Date: Fri Jan 31 09:31:05 2020 -0500 btrfs: do not zero f_bavail if we have available space There was some logic added a while ago to clear out f_bavail in statfs() if we did not have enough free metadata space to satisfy our global reserve. This was incorrect at the time, however didn't really pose a problem for normal file systems because we would often allocate chunks if we got this low on free metadata space, and thus wouldn't really hit this case unless we were actually full. Fast forward to today and now we are much better about not allocating metadata chunks all of the time. Couple this with d792b0f19711 ("btrfs: always reserve our entire size for the global reserve") which now means we'll easily have a larger global reserve than our free space, we are now more likely to trip over this while still having plenty of space. Fix this by skipping this logic if the global rsv's space_info is not full. space_info->full is 0 unless we've attempted to allocate a chunk for that space_info and that has failed. If this happens then the space for the global reserve is definitely sacred and we need to report b_avail == 0, but before then we can just use our calculated b_avail. Reported-by: Martin Steigerwald Fixes: ca8a51b3a979 ("btrfs: statfs: report zero available if metadata are exhausted") CC: stable@vger.kernel.org # 4.5+ Reviewed-by: Qu Wenruo Tested-By: Martin Steigerwald Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit e19ac9d9a978f8238a85a28ed624094a497d5ae6 Author: Olivier Moysan Date: Tue Jan 21 12:02:56 2020 +0100 iio: adc: stm32-dfsdm: fix sleep in atomic context This commit fixes the error message: "BUG: sleeping function called from invalid context at kernel/irq/chip.c" Suppress the trigger irq handler. Make the buffer transfers directly in DMA callback, instead. Push buffers without timestamps, as timestamps are not supported in DFSDM driver. Fixes: 11646e81d775 ("iio: adc: stm32-dfsdm: add support for buffer modes") Signed-off-by: Olivier Moysan Cc: Signed-off-by: Jonathan Cameron commit 961b91a93ea27495022b2bdc3ca0f608f2c97b5f Author: Jon Hunter Date: Fri Jan 31 09:19:01 2020 +0000 ASoC: tegra: Revert 24 and 32 bit support Commit f3ee99087c8ca0ecfdd549ef5a94f557c42d5428 ("ASoC: tegra: Allow 24bit and 32bit samples") added 24-bit and 32-bit support for to the Tegra30 I2S driver. However, there are two additional commits that are also needed to get 24-bit and 32-bit support to work correctly. These commits are not yet applied because there are still some review comments that need to be addressed. With only this change applied, 24-bit and 32-bit support is advertised by the I2S driver, but it does not work and the audio is distorted. Therefore, revert this patch for now until the other changes are also ready. Furthermore, a clock issue with 24-bit support has been identified with this change and so if we revert this now, we can also fix that in the updated version. Reported-by: Dmitry Osipenko Signed-off-by: Jon Hunter Tested-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200131091901.13014-1-jonathanh@nvidia.com Signed-off-by: Mark Brown Cc: stable@vger.kernel.org commit 6ba7fc99680b2250deba1a23f34d31fd25125d61 Author: Yong Zhi Date: Fri Jan 31 14:40:32 2020 -0600 ASoC: SOF: Intel: add PCI ID for JasperLake Mirror ID added for legacy HDaudio. Signed-off-by: Yong Zhi Signed-off-by: Divagar Mohandass Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200131204032.10213-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit a500f3bd787f8224341e44b238f318c407b10897 Author: Eugen Hristev Date: Tue Jan 28 12:57:39 2020 +0000 iio: adc: at91-sama5d2_adc: fix differential channels in triggered mode The differential channels require writing the channel offset register (COR). Otherwise they do not work in differential mode. The configuration of COR is missing in triggered mode. Fixes: 5e1a1da0f8c9 ("iio: adc: at91-sama5d2_adc: add hw trigger and buffer support") Signed-off-by: Eugen Hristev Cc: Signed-off-by: Jonathan Cameron commit 11648b8339f840d4b1f4c54a1abec8025d9e077d Author: Arnd Bergmann Date: Sat Feb 1 22:20:52 2020 +0100 sparc64: fix adjtimex regression Anatoly Pugachev reported one of the y2038 patches to introduce a fatal bug from a stupid typo: [ 96.384129] watchdog: BUG: soft lockup - CPU#8 stuck for 22s! ... [ 96.385624] [0000000000652ca4] handle_mm_fault+0x84/0x320 [ 96.385668] [0000000000b6f2bc] do_sparc64_fault+0x43c/0x820 [ 96.385720] [0000000000407754] sparc64_realfault_common+0x10/0x20 [ 96.385769] [000000000042fa28] __do_sys_sparc_clock_adjtime+0x28/0x80 [ 96.385819] [00000000004307f0] sys_sparc_clock_adjtime+0x10/0x20 [ 96.385866] [0000000000406294] linux_sparc_syscall+0x34/0x44 Fix the code to dereference the correct pointer again. Reported-by: Anatoly Pugachev Tested-by: Anatoly Pugachev Fixes: 251ec1c159e4 ("y2038: sparc: remove use of struct timex") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 59365cadfbcd299b8cdbe0c165faf15767c5f166 Author: Ard Biesheuvel Date: Sun Feb 2 00:33:04 2020 +0100 efi/x86: Fix boot regression on systems with invalid memmap entries In efi_clean_memmap(), we do a pass over the EFI memory map to remove bogus entries that may be returned on certain systems. This recent commit: 1db91035d01aa8bf ("efi: Add tracking for dynamically allocated memmaps") refactored this code to pass the input to efi_memmap_install() via a temporary struct on the stack, which is populated using an initializer which inadvertently defines the value of its size field in terms of its desc_size field, which value cannot be relied upon yet in the initializer itself. Fix this by using efi.memmap.desc_size instead, which is where we get the value for desc_size from in the first place. Reported-by: Jörg Otte Tested-by: Jörg Otte Tested-by: Dan Williams Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: linux-efi@vger.kernel.org Cc: jrg.otte@gmail.com Cc: torvalds@linux-foundation.org Cc: mingo@kernel.org Link: https://lore.kernel.org/r/20200201233304.18322-1-ardb@kernel.org commit 112e3f5ac505ea0f1e3c59cc757db3c45252c41d Author: Takashi Iwai Date: Sun Feb 2 10:07:24 2020 +0100 ALSA: hdsp: Make the firmware loading ioctl a bit more readable The firmware loading ioctl that is implemented for hdsp hwdep device takes the reference of the address pointer, hence the current code is rather confusing. Also, due to the recent change in uapi header, sparse also complains about the cast. This patch tries to improve the readability by converting the straightforward copy_from_user of the whole struct (which contains only the pointer). Fixes: d63e63d42107 ("ALSA: hdsp: Make uapi/hdsp.h compilable again") Link: https://lore.kernel.org/r/20200202090724.18232-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 81b450909bfb4b71b4ae1c07add4feada32892bd Author: Takashi Iwai Date: Sun Feb 2 10:07:23 2020 +0100 ALSA: emu10k1: Fix annotation and cast for the recent uapi header change The recent sound/emu10k1.h uapi header change by the commit 2e4688676392 ("ALSA: emu10k1: Make uapi/emu10k1.h compilable again") made sparse angry because of the inconsistency of __user annotation and the own ctl id struct that were changed in uapi header. This patch addresses those by adjusting the cast and annotations properly again. Fixes: 2e4688676392 ("ALSA: emu10k1: Make uapi/emu10k1.h compilable again") Link: https://lore.kernel.org/r/20200202090724.18232-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit b7c3a17c6062701d97a0959890a2c882bfaac537 Merge: cb3c0e6bdf64 78e06cf43093 Author: Jakub Kicinski Date: Sat Feb 1 12:38:20 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for net: 1) Fix suspicious RCU usage in ipset, from Jozsef Kadlecsik. 2) Use kvcalloc, from Joe Perches. 3) Flush flowtable hardware workqueue after garbage collection run, from Paul Blakey. 4) Missing flowtable hardware workqueue flush from nf_flow_table_free(), also from Paul. 5) Restore NF_FLOW_HW_DEAD in flow_offload_work_del(), from Paul. 6) Flowtable documentation fixes, from Matteo Croce. ==================== Signed-off-by: Jakub Kicinski commit cb3c0e6bdf64d0d124e94ce43cbe4ccbb9b37f51 Author: Eric Dumazet Date: Fri Jan 31 15:27:04 2020 -0800 cls_rsvp: fix rsvp_policy NLA_BINARY can be confusing, since .len value represents the max size of the blob. cls_rsvp really wants user space to provide long enough data for TCA_RSVP_DST and TCA_RSVP_SRC attributes. BUG: KMSAN: uninit-value in rsvp_get net/sched/cls_rsvp.h:258 [inline] BUG: KMSAN: uninit-value in gen_handle net/sched/cls_rsvp.h:402 [inline] BUG: KMSAN: uninit-value in rsvp_change+0x1ae9/0x4220 net/sched/cls_rsvp.h:572 CPU: 1 PID: 13228 Comm: syz-executor.1 Not tainted 5.5.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x220 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:118 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215 rsvp_get net/sched/cls_rsvp.h:258 [inline] gen_handle net/sched/cls_rsvp.h:402 [inline] rsvp_change+0x1ae9/0x4220 net/sched/cls_rsvp.h:572 tc_new_tfilter+0x31fe/0x5010 net/sched/cls_api.c:2104 rtnetlink_rcv_msg+0xcb7/0x1570 net/core/rtnetlink.c:5415 netlink_rcv_skb+0x451/0x650 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x50/0x60 net/core/rtnetlink.c:5442 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0xf9e/0x1100 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x1248/0x14d0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg net/socket.c:659 [inline] ____sys_sendmsg+0x12b6/0x1350 net/socket.c:2330 ___sys_sendmsg net/socket.c:2384 [inline] __sys_sendmsg+0x451/0x5f0 net/socket.c:2417 __do_sys_sendmsg net/socket.c:2426 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2424 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2424 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45b349 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f269d43dc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f269d43e6d4 RCX: 000000000045b349 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 0000000000000003 RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000009c2 R14: 00000000004cb338 R15: 000000000075bfd4 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:144 [inline] kmsan_internal_poison_shadow+0x66/0xd0 mm/kmsan/kmsan.c:127 kmsan_slab_alloc+0x8a/0xe0 mm/kmsan/kmsan_hooks.c:82 slab_alloc_node mm/slub.c:2774 [inline] __kmalloc_node_track_caller+0xb40/0x1200 mm/slub.c:4382 __kmalloc_reserve net/core/skbuff.c:141 [inline] __alloc_skb+0x2fd/0xac0 net/core/skbuff.c:209 alloc_skb include/linux/skbuff.h:1049 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1174 [inline] netlink_sendmsg+0x7d3/0x14d0 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg net/socket.c:659 [inline] ____sys_sendmsg+0x12b6/0x1350 net/socket.c:2330 ___sys_sendmsg net/socket.c:2384 [inline] __sys_sendmsg+0x451/0x5f0 net/socket.c:2417 __do_sys_sendmsg net/socket.c:2426 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2424 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2424 do_syscall_64+0xb8/0x160 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 6fa8c0144b77 ("[NET_SCHED]: Use nla_policy for attribute validation in classifiers") Signed-off-by: Eric Dumazet Reported-by: syzbot Acked-by: Cong Wang Signed-off-by: Jakub Kicinski commit e8d5bb4dfaa7282e6e2672a8369bcbd38e885b4f Author: Sven Eckelmann Date: Fri Jan 31 09:59:19 2020 +0100 MAINTAINERS: Orphan HSR network protocol The current maintainer Arvid Brodin hasn't contributed to the kernel since 2015-02-27. His company mail address is also bouncing and the company confirmed (2020-01-31) that no Arvid Brodin is working for them: > Vi har dessvärre ingen Arvid Brodin som arbetar på ALTEN. A MIA person cannot be the maintainer. It is better to mark is as orphaned until some other person can jump in and take over the responsibility for HSR. Signed-off-by: Sven Eckelmann Signed-off-by: Jakub Kicinski commit d32a06f5434f5e0cdef8e88dc62d079d980088e1 Author: Dan Carpenter Date: Fri Jan 31 08:03:26 2020 +0300 qed: Fix a error code in qed_hw_init() If the qed_fw_overlay_mem_alloc() then we should return -ENOMEM instead of success. Fixes: 30d5f85895fa ("qed: FW 8.42.2.0 Add fw overlay feature") Signed-off-by: Dan Carpenter Signed-off-by: Jakub Kicinski commit 08ff78182fa170dbbe1ebf31e798e9340d6802a5 Author: Dan Carpenter Date: Fri Jan 31 08:02:41 2020 +0300 octeontx2-pf: Fix an IS_ERR() vs NULL bug The otx2_mbox_get_rsp() function never returns NULL, it returns error pointers on error. Fixes: 34bfe0ebedb7 ("octeontx2-pf: MTU, MAC and RX mode config support") Signed-off-by: Dan Carpenter Signed-off-by: Jakub Kicinski commit 94f2630b18975bb56eee5d1a36371db967643479 Merge: 6404674acd59 b581098482e6 Author: Linus Torvalds Date: Sat Feb 1 11:22:41 2020 -0800 Merge tag '5.6-rc-small-smb3-fix-for-stable' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fix from Steve French: "Small SMB3 fix for stable (fixes problem with soft mounts)" * tag '5.6-rc-small-smb3-fix-for-stable' of git://git.samba.org/sfrench/cifs-2.6: cifs: update internal module version number cifs: fix soft mounts hanging in the reconnect code commit 6404674acd596de41fd3ad5f267b4525494a891a Author: Al Viro Date: Sat Feb 1 16:26:45 2020 +0000 vfs: fix do_last() regression Brown paperbag time: fetching ->i_uid/->i_mode really should've been done from nd->inode. I even suggested that, but the reason for that has slipped through the cracks and I went for dir->d_inode instead - made for more "obvious" patch. Analysis: - at the entry into do_last() and all the way to step_into(): dir (aka nd->path.dentry) is known not to have been freed; so's nd->inode and it's equal to dir->d_inode unless we are already doomed to -ECHILD. inode of the file to get opened is not known. - after step_into(): inode of the file to get opened is known; dir might be pointing to freed memory/be negative/etc. - at the call of may_create_in_sticky(): guaranteed to be out of RCU mode; inode of the file to get opened is known and pinned; dir might be garbage. The last was the reason for the original patch. Except that at the do_last() entry we can be in RCU mode and it is possible that nd->path.dentry->d_inode has already changed under us. In that case we are going to fail with -ECHILD, but we need to be careful; nd->inode is pointing to valid struct inode and it's the same as nd->path.dentry->d_inode in "won't fail with -ECHILD" case, so we should use that. Reported-by: "Rantala, Tommi T. (Nokia - FI/Espoo)" Reported-by: syzbot+190005201ced78a74ad6@syzkaller.appspotmail.com Wearing-brown-paperbag: Al Viro Cc: stable@kernel.org Fixes: d0cb50185ae9 ("do_last(): fetch directory ->i_mode and ->i_uid before it's too late") Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit 14cd0bd04907df79b36a31e55f18768172230987 Merge: 368d060bb497 2b5072b9dfab Author: Linus Torvalds Date: Sat Feb 1 10:25:55 2020 -0800 Merge tag 'kconfig-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kconfig updates from Masahiro Yamada: - add 'yes2modconfig' and 'mod2yesconfig' targets (useful mainly for turning syzbot configs into more modular ones as a step to minimizing the result) - sanitize help text - various code cleanups * tag 'kconfig-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: fix documentation typos kconfig: fix an "implicit declaration of function" warning kconfig: fix nesting of symbol help text kconfig: distinguish between dependencies and visibility in help text kconfig: list all definitions of a symbol in help text kconfig: Add yes2modconfig and mod2yesconfig targets. kconfig: use $(PERL) in Makefile kconfig: fix too deep indentation in Makefile kconfig: localmodconfig: fix indentation for closing brace kconfig: localmodconfig: remove unused $config kconfig: squash prop_alloc() into menu_add_prop() kconfig: remove sym from struct property kconfig: remove 'prompt' argument from menu_add_prop() kconfig: move prompt handling to menu_add_prompt() from menu_add_prop() kconfig: remove 'prompt' symbol kconfig: drop T_WORD from the RHS of 'prompt' symbol kconfig: use parent->dep as the parentdep of 'menu' kconfig: remove the rootmenu check in menu_add_prop() commit 2b90927c77c973771cc658d639724d5b247a83eb Author: Tom Zanussi Date: Fri Jan 31 15:55:34 2020 -0600 tracing: Use seq_buf for building dynevent_cmd string The dynevent_cmd commands that build up the command string don't need to do that themselves - there's a seq_buf facility that does pretty much the same thing those command are doing manually, so use it instead. Link: http://lkml.kernel.org/r/eb8a6e835c964d0ab8a38cbf5ffa60746b54a465.1580506712.git.zanussi@kernel.org Reviewed-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit e9260f6257efa6a6293507696e875b6494ee3744 Author: Tom Zanussi Date: Fri Jan 31 15:55:33 2020 -0600 tracing: Remove useless code in dynevent_arg_pair_add() The final addition to q is unnecessary, since q isn't ever used afterwards. Link: http://lkml.kernel.org/r/7880a1268217886cdba7035526650195668da856.1580506712.git.zanussi@kernel.org Reviewed-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 74403b6c50dd7a633d3f22f59f975d6081eae093 Author: Tom Zanussi Date: Fri Jan 31 15:55:32 2020 -0600 tracing: Remove check_arg() callbacks from dynevent args It's kind of strange to have check_arg() callbacks as part of the arg objects themselves; it makes more sense to just pass these in when the args are added instead. Remove the check_arg() callbacks from those objects which also means removing the check_arg() args from the init functions, adding them to the add functions and fixing up existing callers. Link: http://lkml.kernel.org/r/c7708d6f177fcbe1a36b6e4e8e150907df0fa5d2.1580506712.git.zanussi@kernel.org Reviewed-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 368d060bb497775e42e323b9f676c45e2011da27 Merge: acd77500aa8a 451dff37f075 Author: Linus Torvalds Date: Sat Feb 1 10:01:52 2020 -0800 Merge tag 'kbuild-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - detect missing include guard in UAPI headers - do not create orphan built-in.a or obj-y objects - generate modules.builtin more simply, and drop tristate.conf - simplify built-in initramfs creation - make linux-headers deb package thinner - optimize the deb package build script - misc cleanups * tag 'kbuild-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (34 commits) builddeb: split libc headers deployment out into a function builddeb: split kernel headers deployment out into a function builddeb: remove redundant make for ARCH=um builddeb: avoid invoking sub-shells where possible builddeb: remove redundant $objtree/ builddeb: match temporary directory name to the package name builddeb: remove unneeded files in hdrobjfiles for headers package kbuild: use -S instead of -E for precise cc-option test in Kconfig builddeb: allow selection of .deb compressor kbuild: remove 'Building modules, stage 2.' log kbuild: remove *.tmp file when filechk fails kbuild: remove PYTHON2 variable modpost: assume STT_SPARC_REGISTER is defined gen_initramfs.sh: remove intermediate cpio_list on errors initramfs: refactor the initramfs build rules gen_initramfs.sh: always output cpio even without -o option initramfs: add default_cpio_list, and delete -d option support initramfs: generate dependency list and cpio at the same time initramfs: specify $(src)/gen_initramfs.sh as a prerequisite in Makefile initramfs: make initramfs compression choice non-optional ... commit acd77500aa8a337baa6d853568c4b55aca48e20f Merge: 26dca6dbd62d 4cb760b02419 Author: Linus Torvalds Date: Sat Feb 1 09:48:37 2020 -0800 Merge tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random Pull random changes from Ted Ts'o: "Change /dev/random so that it uses the CRNG and only blocking if the CRNG hasn't initialized, instead of the old blocking pool. Also clean up archrandom.h, and some other miscellaneous cleanups" * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: (24 commits) s390x: Mark archrandom.h functions __must_check powerpc: Mark archrandom.h functions __must_check powerpc: Use bool in archrandom.h x86: Mark archrandom.h functions __must_check linux/random.h: Mark CONFIG_ARCH_RANDOM functions __must_check linux/random.h: Use false with bool linux/random.h: Remove arch_has_random, arch_has_random_seed s390: Remove arch_has_random, arch_has_random_seed powerpc: Remove arch_has_random, arch_has_random_seed x86: Remove arch_has_random, arch_has_random_seed random: remove some dead code of poolinfo random: fix typo in add_timer_randomness() random: Add and use pr_fmt() random: convert to ENTROPY_BITS for better code readability random: remove unnecessary unlikely() random: remove kernel.random.read_wakeup_threshold random: delete code to pull data into pools random: remove the blocking pool random: make /dev/random be almost like /dev/urandom random: ignore GRND_RANDOM in getentropy(2) ... commit 49d08d596e85f39ded48e85df362827cbab1f5ae Author: Coly Li Date: Sat Feb 1 22:42:35 2020 +0800 bcache: check return value of prio_read() Now if prio_read() failed during starting a cache set, we can print out error message in run_cache_set() and handle the failure properly. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit d1c3cc34f5a78b38d2b809b289d912c3560545df Author: Coly Li Date: Sat Feb 1 22:42:34 2020 +0800 bcache: fix incorrect data type usage in btree_flush_write() Dan Carpenter points out that from commit 2aa8c529387c ("bcache: avoid unnecessary btree nodes flushing in btree_flush_write()"), there is a incorrect data type usage which leads to the following static checker warning: drivers/md/bcache/journal.c:444 btree_flush_write() warn: 'ref_nr' unsigned <= 0 drivers/md/bcache/journal.c 422 static void btree_flush_write(struct cache_set *c) 423 { 424 struct btree *b, *t, *btree_nodes[BTREE_FLUSH_NR]; 425 unsigned int i, nr, ref_nr; ^^^^^^ 426 atomic_t *fifo_front_p, *now_fifo_front_p; 427 size_t mask; 428 429 if (c->journal.btree_flushing) 430 return; 431 432 spin_lock(&c->journal.flush_write_lock); 433 if (c->journal.btree_flushing) { 434 spin_unlock(&c->journal.flush_write_lock); 435 return; 436 } 437 c->journal.btree_flushing = true; 438 spin_unlock(&c->journal.flush_write_lock); 439 440 /* get the oldest journal entry and check its refcount */ 441 spin_lock(&c->journal.lock); 442 fifo_front_p = &fifo_front(&c->journal.pin); 443 ref_nr = atomic_read(fifo_front_p); 444 if (ref_nr <= 0) { ^^^^^^^^^^^ Unsigned can't be less than zero. 445 /* 446 * do nothing if no btree node references 447 * the oldest journal entry 448 */ 449 spin_unlock(&c->journal.lock); 450 goto out; 451 } 452 spin_unlock(&c->journal.lock); As the warning information indicates, local varaible ref_nr in unsigned int type is wrong, which does not matche atomic_read() and the "<= 0" checking. This patch fixes the above error by defining local variable ref_nr as int type. Fixes: 2aa8c529387c ("bcache: avoid unnecessary btree nodes flushing in btree_flush_write()") Reported-by: Dan Carpenter Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 038ba8cc1bffc51250add4a9b9249d4331576d8f Author: Coly Li Date: Sat Feb 1 22:42:33 2020 +0800 bcache: add readahead cache policy options via sysfs interface In year 2007 high performance SSD was still expensive, in order to save more space for real workload or meta data, the readahead I/Os for non-meta data was bypassed and not cached on SSD. In now days, SSD price drops a lot and people can find larger size SSD with more comfortable price. It is unncessary to alway bypass normal readahead I/Os to save SSD space for now. This patch adds options for readahead data cache policies via sysfs file /sys/block/bcache/readahead_cache_policy, the options are, - "all": cache all readahead data I/Os. - "meta-only": only cache meta data, and bypass other regular I/Os. If users want to make bcache continue to only cache readahead request for metadata and bypass regular data readahead, please set "meta-only" to this sysfs file. By default, bcache will back to cache all read- ahead requests now. Cc: stable@vger.kernel.org Signed-off-by: Coly Li Acked-by: Eric Wheeler Cc: Michael Lyle Signed-off-by: Jens Axboe commit 7c02b0055f774ed9afb6e1c7724f33bf148ffdc0 Author: Coly Li Date: Sat Feb 1 22:42:32 2020 +0800 bcache: explicity type cast in bset_bkey_last() In bset.h, macro bset_bkey_last() is defined as, bkey_idx((struct bkey *) (i)->d, (i)->keys) Parameter i can be variable type of data structure, the macro always works once the type of struct i has member 'd' and 'keys'. bset_bkey_last() is also used in macro csum_set() to calculate the checksum of a on-disk data structure. When csum_set() is used to calculate checksum of on-disk bcache super block, the parameter 'i' data type is struct cache_sb_disk. Inside struct cache_sb_disk (also in struct cache_sb) the member keys is __u16 type. But bkey_idx() expects unsigned int (a 32bit width), so there is problem when sending parameters via stack to call bkey_idx(). Sparse tool from Intel 0day kbuild system reports this incompatible problem. bkey_idx() is part of user space API, so the simplest fix is to cast the (i)->keys to unsigned int type in macro bset_bkey_last(). Reported-by: kbuild test robot Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 5bebf7486d4f4940b2a8e4009beb1dff5041853d Author: Coly Li Date: Sat Feb 1 22:42:31 2020 +0800 bcache: fix memory corruption in bch_cache_accounting_clear() Commit 83ff9318c44ba ("bcache: not use hard coded memset size in bch_cache_accounting_clear()") tries to make the code more easy to understand by removing the hard coded number with following change, void bch_cache_accounting_clear(...) { memset(&acc->total.cache_hits, 0, - sizeof(unsigned long) * 7); + sizeof(struct cache_stats)); } Unfortunately the change was wrong (it also tells us the original code was not easy to correctly understand). The hard coded number 7 is used because in struct cache_stats, 15 struct cache_stats { 16 struct kobject kobj; 17 18 unsigned long cache_hits; 19 unsigned long cache_misses; 20 unsigned long cache_bypass_hits; 21 unsigned long cache_bypass_misses; 22 unsigned long cache_readaheads; 23 unsigned long cache_miss_collisions; 24 unsigned long sectors_bypassed; 25 26 unsigned int rescale; 27 }; only members in LINE 18-24 want to be set to 0. It is wrong to use 'sizeof(struct cache_stats)' to replace 'sizeof(unsigned long) * 7), the memory objects behind acc->total is staled by this change. Сорокин Артем Сергеевич reports that by the following steps, kernel panic will be triggered, 1. Create new set: make-bcache -B /dev/nvme1n1 -C /dev/sda --wipe-bcache 2. Run in /sys/fs/bcache/: echo 1 > clear_stats && cat stats_five_minute/cache_bypass_hits I can reproduce the panic and get following dmesg with KASAN enabled, [22613.172742] ================================================================== [22613.172862] BUG: KASAN: null-ptr-deref in sysfs_kf_seq_show+0x117/0x230 [22613.172864] Read of size 8 at addr 0000000000000000 by task cat/6753 [22613.172870] CPU: 1 PID: 6753 Comm: cat Not tainted 5.5.0-rc7-lp151.28.16-default+ #11 [22613.172872] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/29/2019 [22613.172873] Call Trace: [22613.172964] dump_stack+0x8b/0xbb [22613.172968] ? sysfs_kf_seq_show+0x117/0x230 [22613.172970] ? sysfs_kf_seq_show+0x117/0x230 [22613.173031] __kasan_report+0x176/0x192 [22613.173064] ? pr_cont_kernfs_name+0x40/0x60 [22613.173067] ? sysfs_kf_seq_show+0x117/0x230 [22613.173070] kasan_report+0xe/0x20 [22613.173072] sysfs_kf_seq_show+0x117/0x230 [22613.173105] seq_read+0x199/0x6d0 [22613.173110] vfs_read+0xa5/0x1a0 [22613.173113] ksys_read+0x110/0x160 [22613.173115] ? kernel_write+0xb0/0xb0 [22613.173177] do_syscall_64+0x77/0x290 [22613.173238] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [22613.173241] RIP: 0033:0x7fc2c886ac61 [22613.173244] Code: fe ff ff 48 8d 3d c7 a0 09 00 48 83 ec 08 e8 46 03 02 00 66 0f 1f 44 00 00 8b 05 ca fb 2c 00 48 63 ff 85 c0 75 13 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 57 f3 c3 0f 1f 44 00 00 55 53 48 89 d5 48 89 [22613.173245] RSP: 002b:00007ffebe776d68 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [22613.173248] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007fc2c886ac61 [22613.173249] RDX: 0000000000020000 RSI: 00007fc2c8cca000 RDI: 0000000000000003 [22613.173250] RBP: 0000000000020000 R08: ffffffffffffffff R09: 0000000000000000 [22613.173251] R10: 000000000000038c R11: 0000000000000246 R12: 00007fc2c8cca000 [22613.173253] R13: 0000000000000003 R14: 00007fc2c8cca00f R15: 0000000000020000 [22613.173255] ================================================================== [22613.173256] Disabling lock debugging due to kernel taint [22613.173350] BUG: kernel NULL pointer dereference, address: 0000000000000000 [22613.178380] #PF: supervisor read access in kernel mode [22613.180959] #PF: error_code(0x0000) - not-present page [22613.183444] PGD 0 P4D 0 [22613.184867] Oops: 0000 [#1] SMP KASAN PTI [22613.186797] CPU: 1 PID: 6753 Comm: cat Tainted: G B 5.5.0-rc7-lp151.28.16-default+ #11 [22613.191253] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/29/2019 [22613.196706] RIP: 0010:sysfs_kf_seq_show+0x117/0x230 [22613.199097] Code: ff 48 8b 0b 48 8b 44 24 08 48 01 e9 eb a6 31 f6 48 89 cf ba 00 10 00 00 48 89 4c 24 10 e8 b1 e6 e9 ff 4c 89 ff e8 19 07 ea ff <49> 8b 07 48 85 c0 48 89 44 24 08 0f 84 91 00 00 00 49 8b 6d 00 48 [22613.208016] RSP: 0018:ffff8881d4f8fd78 EFLAGS: 00010246 [22613.210448] RAX: 0000000000000000 RBX: ffff8881eb99b180 RCX: ffffffff810d9ef6 [22613.213691] RDX: 0000000000000001 RSI: 0000000000000246 RDI: 0000000000000246 [22613.216893] RBP: 0000000000001000 R08: fffffbfff072ddcd R09: fffffbfff072ddcd [22613.220075] R10: 0000000000000001 R11: fffffbfff072ddcc R12: ffff8881de5c0200 [22613.223256] R13: ffff8881ed175500 R14: ffff8881eb99b198 R15: 0000000000000000 [22613.226290] FS: 00007fc2c8d3d500(0000) GS:ffff8881f2a80000(0000) knlGS:0000000000000000 [22613.229637] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [22613.231993] CR2: 0000000000000000 CR3: 00000001ec89a004 CR4: 00000000003606e0 [22613.234909] Call Trace: [22613.235931] seq_read+0x199/0x6d0 [22613.237259] vfs_read+0xa5/0x1a0 [22613.239229] ksys_read+0x110/0x160 [22613.240590] ? kernel_write+0xb0/0xb0 [22613.242040] do_syscall_64+0x77/0x290 [22613.243625] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [22613.245450] RIP: 0033:0x7fc2c886ac61 [22613.246706] Code: fe ff ff 48 8d 3d c7 a0 09 00 48 83 ec 08 e8 46 03 02 00 66 0f 1f 44 00 00 8b 05 ca fb 2c 00 48 63 ff 85 c0 75 13 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 57 f3 c3 0f 1f 44 00 00 55 53 48 89 d5 48 89 [22613.253296] RSP: 002b:00007ffebe776d68 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [22613.255835] RAX: ffffffffffffffda RBX: 0000000000020000 RCX: 00007fc2c886ac61 [22613.258472] RDX: 0000000000020000 RSI: 00007fc2c8cca000 RDI: 0000000000000003 [22613.260807] RBP: 0000000000020000 R08: ffffffffffffffff R09: 0000000000000000 [22613.263188] R10: 000000000000038c R11: 0000000000000246 R12: 00007fc2c8cca000 [22613.265598] R13: 0000000000000003 R14: 00007fc2c8cca00f R15: 0000000000020000 [22613.268729] Modules linked in: scsi_transport_iscsi af_packet iscsi_ibft iscsi_boot_sysfs vmw_vsock_vmci_transport vsock fuse bnep kvm_intel kvm irqbypass crc32_pclmul crc32c_intel ghash_clmulni_intel snd_ens1371 snd_ac97_codec ac97_bus bcache snd_pcm btusb btrtl btbcm btintel crc64 aesni_intel glue_helper crypto_simd vmw_balloon cryptd bluetooth snd_timer snd_rawmidi snd joydev pcspkr e1000 rfkill vmw_vmci soundcore ecdh_generic ecc gameport i2c_piix4 mptctl ac button hid_generic usbhid sr_mod cdrom ata_generic ehci_pci vmwgfx uhci_hcd drm_kms_helper syscopyarea serio_raw sysfillrect sysimgblt fb_sys_fops ttm ehci_hcd mptspi scsi_transport_spi mptscsih ata_piix mptbase ahci usbcore libahci drm sg dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua [22613.292429] CR2: 0000000000000000 [22613.293563] ---[ end trace a074b26a8508f378 ]--- [22613.295138] RIP: 0010:sysfs_kf_seq_show+0x117/0x230 [22613.296769] Code: ff 48 8b 0b 48 8b 44 24 08 48 01 e9 eb a6 31 f6 48 89 cf ba 00 10 00 00 48 89 4c 24 10 e8 b1 e6 e9 ff 4c 89 ff e8 19 07 ea ff <49> 8b 07 48 85 c0 48 89 44 24 08 0f 84 91 00 00 00 49 8b 6d 00 48 [22613.303553] RSP: 0018:ffff8881d4f8fd78 EFLAGS: 00010246 [22613.305280] RAX: 0000000000000000 RBX: ffff8881eb99b180 RCX: ffffffff810d9ef6 [22613.307924] RDX: 0000000000000001 RSI: 0000000000000246 RDI: 0000000000000246 [22613.310272] RBP: 0000000000001000 R08: fffffbfff072ddcd R09: fffffbfff072ddcd [22613.312685] R10: 0000000000000001 R11: fffffbfff072ddcc R12: ffff8881de5c0200 [22613.315076] R13: ffff8881ed175500 R14: ffff8881eb99b198 R15: 0000000000000000 [22613.318116] FS: 00007fc2c8d3d500(0000) GS:ffff8881f2a80000(0000) knlGS:0000000000000000 [22613.320743] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [22613.322628] CR2: 0000000000000000 CR3: 00000001ec89a004 CR4: 00000000003606e0 Here this patch fixes the following problem by explicity set all the 7 members to 0 in bch_cache_accounting_clear(). Reported-by: Сорокин Артем Сергеевич Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 4c25df5640ae6e4491ee2c50d3f70c1559ef037d Merge: 34b5a946a954 3d7dfd632f9b Author: Michael Ellerman Date: Sat Feb 1 21:47:17 2020 +1100 Merge branch 'topic/user-access-begin' into next Merge the user_access_begin() series from Christophe. This is based on a commit from Linus that went into v5.5-rc7. commit febac332a819f0e764aa4da62757ba21d18c182b Author: Konstantin Khlebnikov Date: Fri Jan 31 19:08:59 2020 +0300 clocksource: Prevent double add_timer_on() for watchdog_timer Kernel crashes inside QEMU/KVM are observed: kernel BUG at kernel/time/timer.c:1154! BUG_ON(timer_pending(timer) || !timer->function) in add_timer_on(). At the same time another cpu got: general protection fault: 0000 [#1] SMP PTI of poinson pointer 0xdead000000000200 in: __hlist_del at include/linux/list.h:681 (inlined by) detach_timer at kernel/time/timer.c:818 (inlined by) expire_timers at kernel/time/timer.c:1355 (inlined by) __run_timers at kernel/time/timer.c:1686 (inlined by) run_timer_softirq at kernel/time/timer.c:1699 Unfortunately kernel logs are badly scrambled, stacktraces are lost. Printing the timer->function before the BUG_ON() pointed to clocksource_watchdog(). The execution of clocksource_watchdog() can race with a sequence of clocksource_stop_watchdog() .. clocksource_start_watchdog(): expire_timers() detach_timer(timer, true); timer->entry.pprev = NULL; raw_spin_unlock_irq(&base->lock); call_timer_fn clocksource_watchdog() clocksource_watchdog_kthread() or clocksource_unbind() spin_lock_irqsave(&watchdog_lock, flags); clocksource_stop_watchdog(); del_timer(&watchdog_timer); watchdog_running = 0; spin_unlock_irqrestore(&watchdog_lock, flags); spin_lock_irqsave(&watchdog_lock, flags); clocksource_start_watchdog(); add_timer_on(&watchdog_timer, ...); watchdog_running = 1; spin_unlock_irqrestore(&watchdog_lock, flags); spin_lock(&watchdog_lock); add_timer_on(&watchdog_timer, ...); BUG_ON(timer_pending(timer) || !timer->function); timer_pending() -> true BUG() I.e. inside clocksource_watchdog() watchdog_timer could be already armed. Check timer_pending() before calling add_timer_on(). This is sufficient as all operations are synchronized by watchdog_lock. Fixes: 75c5158f70c0 ("timekeeping: Update clocksource with stop_machine") Signed-off-by: Konstantin Khlebnikov Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/158048693917.4378.13823603769948933793.stgit@buzz commit 58bc6c69afe51ed19d1294ab0bb319b7df1cf75a Author: Randy Dunlap Date: Fri Jan 31 17:59:26 2020 -0800 arch/xtensa: fix Kconfig typos for HAVE_SMP Fix typos in xtensa Kconfig help text for HAVE_SMP. Signed-off-by: Randy Dunlap Cc: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Message-Id: <500b2132-ea3c-a385-1f37-05664de5f1dd@infradead.org> Signed-off-by: Max Filippov commit a922b1561137fc516e7c77c478779f7d198cc9cf Author: Max Filippov Date: Fri Jan 31 21:20:58 2020 -0800 xtensa: clean up optional XCHAL_* definitions Simplify users of XCHAL_HAVE_EXTERN_REGS and XCHAL_HAVE_VECBASE and always define them as 0 if they're not defined in the variant/core.h Signed-off-by: Max Filippov commit 5b787914408ed903d087ffc3281bd6d4e93f94b5 Author: Max Filippov Date: Fri Jan 31 18:15:36 2020 -0800 xtensa: drop unused function fast_coprocessor_double fast_coprocessor_double is not used since commit c658eac628aa ("[XTENSA] Add support for configurable registers and coprocessors"). Remove it. There should be no coprocessor exceptions generated in the exception handling paths while PS.EXCM is set. Signed-off-by: Max Filippov commit 05bd330a7fd8875c423fc07d8ddcad73c10e556e Author: Dexuan Cui Date: Mon Jan 6 14:42:39 2020 -0800 x86/hyperv: Suspend/resume the hypercall page for hibernation For hibernation the hypercall page must be disabled before the hibernation image is created so that subsequent hypercall operations fail safely. On resume the hypercall page has to be restored and reenabled to ensure proper operation of the resumed kernel. Implement the necessary suspend/resume callbacks. [ tglx: Decrypted changelog ] Signed-off-by: Dexuan Cui Signed-off-by: Thomas Gleixner Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1578350559-130275-1-git-send-email-decui@microsoft.com commit 6f1a4891a5928a5969c87fa5a584844c983ec823 Author: Thomas Gleixner Date: Fri Jan 31 15:26:52 2020 +0100 x86/apic/msi: Plug non-maskable MSI affinity race Evan tracked down a subtle race between the update of the MSI message and the device raising an interrupt internally on PCI devices which do not support MSI masking. The update of the MSI message is non-atomic and consists of either 2 or 3 sequential 32bit wide writes to the PCI config space. - Write address low 32bits - Write address high 32bits (If supported by device) - Write data When an interrupt is migrated then both address and data might change, so the kernel attempts to mask the MSI interrupt first. But for MSI masking is optional, so there exist devices which do not provide it. That means that if the device raises an interrupt internally between the writes then a MSI message is sent built from half updated state. On x86 this can lead to spurious interrupts on the wrong interrupt vector when the affinity setting changes both address and data. As a consequence the device interrupt can be lost causing the device to become stuck or malfunctioning. Evan tried to handle that by disabling MSI accross an MSI message update. That's not feasible because disabling MSI has issues on its own: If MSI is disabled the PCI device is routing an interrupt to the legacy INTx mechanism. The INTx delivery can be disabled, but the disablement is not working on all devices. Some devices lose interrupts when both MSI and INTx delivery are disabled. Another way to solve this would be to enforce the allocation of the same vector on all CPUs in the system for this kind of screwed devices. That could be done, but it would bring back the vector space exhaustion problems which got solved a few years ago. Fortunately the high address (if supported by the device) is only relevant when X2APIC is enabled which implies interrupt remapping. In the interrupt remapping case the affinity setting is happening at the interrupt remapping unit and the PCI MSI message is programmed only once when the PCI device is initialized. That makes it possible to solve it with a two step update: 1) Target the MSI msg to the new vector on the current target CPU 2) Target the MSI msg to the new vector on the new target CPU In both cases writing the MSI message is only changing a single 32bit word which prevents the issue of inconsistency. After writing the final destination it is necessary to check whether the device issued an interrupt while the intermediate state #1 (new vector, current CPU) was in effect. This is possible because the affinity change is always happening on the current target CPU. The code runs with interrupts disabled, so the interrupt can be detected by checking the IRR of the local APIC. If the vector is pending in the IRR then the interrupt is retriggered on the new target CPU by sending an IPI for the associated vector on the target CPU. This can cause spurious interrupts on both the local and the new target CPU. 1) If the new vector is not in use on the local CPU and the device affected by the affinity change raised an interrupt during the transitional state (step #1 above) then interrupt entry code will ignore that spurious interrupt. The vector is marked so that the 'No irq handler for vector' warning is supressed once. 2) If the new vector is in use already on the local CPU then the IRR check might see an pending interrupt from the device which is using this vector. The IPI to the new target CPU will then invoke the handler of the device, which got the affinity change, even if that device did not issue an interrupt 3) If the new vector is in use already on the local CPU and the device affected by the affinity change raised an interrupt during the transitional state (step #1 above) then the handler of the device which uses that vector on the local CPU will be invoked. expose issues in device driver interrupt handlers which are not prepared to handle a spurious interrupt correctly. This not a regression, it's just exposing something which was already broken as spurious interrupts can happen for a lot of reasons and all driver handlers need to be able to deal with them. Reported-by: Evan Green Debugged-by: Evan Green Signed-off-by: Thomas Gleixner Tested-by: Evan Green Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/87imkr4s7n.fsf@nanos.tec.linutronix.de commit 2acf25f13ebe8beb40e97a1bbe76f36277c64f1e Author: Takashi Iwai Date: Sat Feb 1 09:05:30 2020 +0100 ALSA: dummy: Fix PCM format loop in proc output The loop termination for iterating over all formats should contain SNDRV_PCM_FORMAT_LAST, not less than it. Fixes: 9b151fec139d ("ALSA: dummy - Add debug proc file") Cc: Link: https://lore.kernel.org/r/20200201080530.22390-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit d8f489355cff55b30731354317739a00cf1238bd Author: Takashi Iwai Date: Sat Feb 1 09:05:29 2020 +0100 ALSA: usb-audio: Annotate endianess in Scarlett gen2 quirk The Scarlett gen2 mixer quirk code defines a few record types to communicate via USB hub, and those must be all little-endian. This patch changes the field types to LE to annotate endianess properly. It also fixes the incorrect usage of leXX_to_cpu() in a couple of places, which was caught by sparse after this change. Fixes: 9e4d5c1be21f ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Cc: Link: https://lore.kernel.org/r/20200201080530.22390-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit f8e5f90b3a53bb75f05124ed19156388379a337d Author: Takashi Iwai Date: Sat Feb 1 09:05:28 2020 +0100 ALSA: usb-audio: Fix endianess in descriptor validation I overlooked that some fields are words and need the converts from LE in the recently added USB descriptor validation code. This patch fixes those with the proper macro usages. Fixes: 57f8770620e9 ("ALSA: usb-audio: More validations of descriptor units") Cc: Link: https://lore.kernel.org/r/20200201080530.22390-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 78be2228c15dd45865b102b29d72e721f0ace9b1 Author: Yong Zhi Date: Fri Jan 31 14:40:03 2020 -0600 ALSA: hda: Add JasperLake PCI ID and codec vid Add HD Audio Device PCI ID and codec vendor_id for the Intel JasperLake REV2/A0 silicon. Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Cc: Link: https://lore.kernel.org/r/20200131204003.10153-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 784f8344de750a41344f4bbbebb8507a730fc99c Author: Eric Dumazet Date: Fri Jan 31 10:44:50 2020 -0800 tcp: clear tp->segs_{in|out} in tcp_disconnect() tp->segs_in and tp->segs_out need to be cleared in tcp_disconnect(). tcp_disconnect() is rarely used, but it is worth fixing it. Fixes: 2efd055c53c0 ("tcp: add tcpi_segs_in and tcpi_segs_out to tcp_info") Signed-off-by: Eric Dumazet Cc: Marcelo Ricardo Leitner Cc: Yuchung Cheng Cc: Neal Cardwell Acked-by: Neal Cardwell Signed-off-by: Jakub Kicinski commit db7ffee6f3eb3683cdcaeddecc0a630a14546fe3 Author: Eric Dumazet Date: Fri Jan 31 10:32:41 2020 -0800 tcp: clear tp->data_segs{in|out} in tcp_disconnect() tp->data_segs_in and tp->data_segs_out need to be cleared in tcp_disconnect(). tcp_disconnect() is rarely used, but it is worth fixing it. Fixes: a44d6eacdaf5 ("tcp: Add RFC4898 tcpEStatsPerfDataSegsOut/In") Signed-off-by: Eric Dumazet Cc: Martin KaFai Lau Cc: Yuchung Cheng Cc: Neal Cardwell Acked-by: Neal Cardwell Signed-off-by: Jakub Kicinski commit 2fbdd56251b5c62f96589f39eded277260de7267 Author: Eric Dumazet Date: Fri Jan 31 10:22:47 2020 -0800 tcp: clear tp->delivered in tcp_disconnect() tp->delivered needs to be cleared in tcp_disconnect(). tcp_disconnect() is rarely used, but it is worth fixing it. Fixes: ddf1af6fa00e ("tcp: new delivery accounting") Signed-off-by: Eric Dumazet Cc: Yuchung Cheng Cc: Neal Cardwell Acked-by: Yuchung Cheng Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Signed-off-by: Jakub Kicinski commit c13c48c00a6bc1febc73902505bdec0967bd7095 Author: Eric Dumazet Date: Fri Jan 31 09:14:47 2020 -0800 tcp: clear tp->total_retrans in tcp_disconnect() total_retrans needs to be cleared in tcp_disconnect(). tcp_disconnect() is rarely used, but it is worth fixing it. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Cc: SeongJae Park Signed-off-by: Jakub Kicinski commit b19efcabb587e5470a423ef778905f47e5a47f1a Merge: 996d5d5f89a5 c5ccf2ad3d33 Author: Dmitry Torokhov Date: Fri Jan 31 17:42:33 2020 -0800 Merge branch 'next' into for-linus Prepare input updates for 5.6 merge window. commit c5ccf2ad3d33413fee06ae87d0b970d8cc540db6 Author: Lucas Stach Date: Fri Jan 31 17:38:19 2020 -0800 Input: synaptics-rmi4 - switch to reduced reporting mode When the distance thresholds are set the controller must be in reduced reporting mode for them to have any effect on the interrupt generation. This has a potentially large impact on the number of events the host needs to process. Signed-off-by: Lucas Stach Reviewed-by: Andrew Duggan Link: https://lore.kernel.org/r/20200120111628.18376-1-l.stach@pengutronix.de Signed-off-by: Dmitry Torokhov commit 249d7b2ef674cdae28c377cfe6f56696548305d5 Author: Tom Zanussi Date: Fri Jan 31 15:55:31 2020 -0600 tracing: Consolidate some synth_event_trace code The synth_event trace code contains some almost identical functions and some small functions that are called only once - consolidate the common code into single functions and fold in the small functions to simplify the code overall. Link: http://lkml.kernel.org/r/d1c8d8ad124a653b7543afe801d38c199ca5c20e.1580506712.git.zanussi@kernel.org Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 26dca6dbd62d74a5012cafab6b2d6d65a01ea69c Merge: 846de71bedef 01b810ed7187 Author: Linus Torvalds Date: Fri Jan 31 14:48:54 2020 -0800 Merge tag 'pci-v5.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: "Resource management: - Improve resource assignment for hot-added nested bridges, e.g., Thunderbolt (Nicholas Johnson) Power management: - Optionally print config space of devices before suspend (Chen Yu) - Increase D3 delay for AMD Ryzen5/7 XHCI controllers (Daniel Drake) Virtualization: - Generalize DMA alias quirks (James Sewart) - Add DMA alias quirk for PLX PEX NTB (James Sewart) - Fix IOV memory leak (Navid Emamdoost) AER: - Log which device prevents error recovery (Yicong Yang) Peer-to-peer DMA: - Whitelist Intel SkyLake-E (Armen Baloyan) Broadcom iProc host bridge driver: - Apply PAXC quirk whether driver is built-in or module (Wei Liu) Broadcom STB host bridge driver: - Add Broadcom STB PCIe host controller driver (Jim Quinlan) Intel Gateway SoC host bridge driver: - Add driver for Intel Gateway SoC (Dilip Kota) Intel VMD host bridge driver: - Add support for DMA aliases on other buses (Jon Derrick) - Remove dma_map_ops overrides (Jon Derrick) - Remove now-unused X86_DEV_DMA_OPS (Christoph Hellwig) NVIDIA Tegra host bridge driver: - Fix Tegra30 afi_pex2_ctrl register offset (Marcel Ziswiler) Panasonic UniPhier host bridge driver: - Remove module code since driver can't be built as a module (Masahiro Yamada) Qualcomm host bridge driver: - Add support for SDM845 PCIe controller (Bjorn Andersson) TI Keystone host bridge driver: - Fix "num-viewport" DT property error handling (Kishon Vijay Abraham I) - Fix link training retries initiation (Yurii Monakov) - Fix outbound region mapping (Yurii Monakov) Misc: - Add Switchtec Gen4 support (Kelvin Cao) - Add Switchtec Intercomm Notify and Upstream Error Containment support (Logan Gunthorpe) - Use dma_set_mask_and_coherent() since Switchtec supports 64-bit addressing (Wesley Sheng)" * tag 'pci-v5.6-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (60 commits) PCI: Allow adjust_bridge_window() to shrink resource if necessary PCI: Set resource size directly in adjust_bridge_window() PCI: Rename extend_bridge_window() to adjust_bridge_window() PCI: Rename extend_bridge_window() parameter PCI: Consider alignment of hot-added bridges when assigning resources PCI: Remove local variable usage in pci_bus_distribute_available_resources() PCI: Pass size + alignment to pci_bus_distribute_available_resources() PCI: Rename variables PCI: vmd: Add two VMD Device IDs PCI: Remove unnecessary braces PCI: brcmstb: Add MSI support PCI: brcmstb: Add Broadcom STB PCIe host controller driver x86/PCI: Remove X86_DEV_DMA_OPS PCI: vmd: Remove dma_map_ops overrides iommu/vt-d: Remove VMD child device sanity check iommu/vt-d: Use pci_real_dma_dev() for mapping PCI: Introduce pci_real_dma_dev() x86/PCI: Expose VMD's pci_dev in struct pci_sysdata x86/PCI: Add to_pci_sysdata() helper PCI/AER: Initialize aer_fifo ... commit 846de71bedefb530461ee70ec82f7c810ef14e59 Merge: 8fdd4019bcb2 1697d9812481 Author: Linus Torvalds Date: Fri Jan 31 14:43:23 2020 -0800 Merge tag 'media/v5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - New staging driver for Rockship ISPv1 unit - New staging driver for Rockchip MIPI Synopsys DPHY RX0 - y2038 fixes at V4L2 API (backward-compatible) - A dvb core fix when receiving invalid EIT sections - Some clang-specific warnings got fixed - Added support for touch V4L2 interface at vivid - Several drivers were converted to use the new i2c_new_scanned_device() kAPI - Added sm1 support at meson's vdec driver - Several other driver cleanups, fixes and improvements * tag 'media/v5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (207 commits) media: staging/intel-ipu3: remove TODO item about acronyms media: v4l2-fwnode: Print the node name while parsing endpoints media: Revert "media: staging/intel-ipu3: make imgu use fixed running mode" media: mt9v111: constify copied structure media: platform: VIDEO_MEDIATEK_JPEG can also depend on MTK_IOMMU media: uvcvideo: Add a quirk to force GEO GC6500 Camera bits-per-pixel value media: uvcvideo: Avoid cyclic entity chains due to malformed USB descriptors media: hantro: fix post-processing NULL pointer dereference media: rcar-vin: Use correct pixel format when aligning format media: MAINTAINERS: add entry for Rockchip ISP1 driver media: staging: rkisp1: add TODO file for staging media: staging: rkisp1: add document for rkisp1 meta buffer format media: staging: rkisp1: add output device for parameters media: staging: rkisp1: add capture device for statistics media: staging: rkisp1: add user space ABI definitions media: staging: rkisp1: add streaming paths media: staging: rkisp1: add Rockchip ISP1 base driver media: staging: phy-rockchip-dphy-rx0: add Rockchip MIPI Synopsys DPHY RX0 driver media: staging: dt-bindings: add Rockchip MIPI RX D-PHY RX0 yaml bindings media: staging: dt-bindings: add Rockchip ISP1 yaml bindings ... commit 8fdd4019bcb2d824c5ab45c6fc340293cfed843f Merge: 68b62e5d965a 8889f6fa3588 Author: Linus Torvalds Date: Fri Jan 31 14:40:36 2020 -0800 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "A very quiet cycle with few notable changes. Mostly the usual list of one or two patches to drivers changing something that isn't quite rc worthy. The subsystem seems to be seeing a larger number of rework and cleanup style patches right now, I feel that several vendors are prepping their drivers for new silicon. Summary: - Driver updates and cleanup for qedr, bnxt_re, hns, siw, mlx5, mlx4, rxe, i40iw - Larger series doing cleanup and rework for hns and hfi1. - Some general reworking of the CM code to make it a little more understandable - Unify the different code paths connected to the uverbs FD scheme - New UAPI ioctls conversions for get context and get async fd - Trace points for CQ and CM portions of the RDMA stack - mlx5 driver support for virtio-net formatted rings as RDMA raw ethernet QPs - verbs support for setting the PCI-E relaxed ordering bit on DMA traffic connected to a MR - A couple of bug fixes that came too late to make rc7" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (108 commits) RDMA/core: Make the entire API tree static RDMA/efa: Mask access flags with the correct optional range RDMA/cma: Fix unbalanced cm_id reference count during address resolve RDMA/umem: Fix ib_umem_find_best_pgsz() IB/mlx4: Fix leak in id_map_find_del IB/opa_vnic: Spelling correction of 'erorr' to 'error' IB/hfi1: Fix logical condition in msix_request_irq RDMA/cm: Remove CM message structs RDMA/cm: Use IBA functions for complex structure members RDMA/cm: Use IBA functions for simple structure members RDMA/cm: Use IBA functions for swapping get/set acessors RDMA/cm: Use IBA functions for simple get/set acessors RDMA/cm: Add SET/GET implementations to hide IBA wire format RDMA/cm: Add accessors for CM_REQ transport_type IB/mlx5: Return the administrative GUID if exists RDMA/core: Ensure that rdma_user_mmap_entry_remove() is a fence IB/mlx4: Fix memory leak in add_gid error flow IB/mlx5: Expose RoCE accelerator counters RDMA/mlx5: Set relaxed ordering when requested RDMA/core: Add the core support field to METHOD_GET_CONTEXT ... commit 68b62e5d965a8cbcfa287ee7754cf06e9b3775ab Merge: ffda81b69fce 8c173d5e044d Author: Linus Torvalds Date: Fri Jan 31 14:39:21 2020 -0800 Merge tag 'thermal-v5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal fixes from Daniel Lezcano: - Fix a severe docs build failure for cpu idle cooling device (Randy Dunlap) - Fix a spelling mistake in the error message for the stm32 (Colin Ian King) * tag 'thermal-v5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: thermal: stm32: fix spelling mistake "preprare" -> "prepare" Documentation: cpu-idle-cooling: fix a SEVERE docs build failure commit ffda81b69fce50f2543be99ef2d7c77dffc1ebc1 Merge: cf3c8f84d140 d8639f0d6c23 Author: Linus Torvalds Date: Fri Jan 31 14:38:17 2020 -0800 Merge tag 'acpi-5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "Fix up MAINTAINERS entires related to ACPI (Andy Shevchenko)" * tag 'acpi-5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: MAINTAINERS: Sort entries in database for X-POWERS AXP288 MAINTAINERS: Sort entries in database for ACPICA MAINTAINERS: Sort entries in database for ACPI commit cf3c8f84d1401fed5010784034d104cc689061d5 Merge: a62aa6f7f50a 82b2c6ffd399 Author: Linus Torvalds Date: Fri Jan 31 14:36:35 2020 -0800 Merge tag 'pm-5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power manadement updates from Rafael Wysocki: "Prevent cpufreq from creating excessively large stack frames and fix the handling of devices deleted during system-wide resume in the PM core (Rafael Wysocki), revert a problematic commit affecting the cpupower utility and correct its man page (Thomas Renninger, Brahadambal Srinivasan), and improve the intel_pstate_tracer utility (Doug Smythies)" * tag 'pm-5.6-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: tools/power/x86/intel_pstate_tracer: change several graphs to autoscale y-axis tools/power/x86/intel_pstate_tracer: changes for python 3 compatibility Correction to manpage of cpupower cpufreq: Avoid creating excessively large stack frames PM: core: Fix handling of devices deleted during system-wide resume cpupower: Revert library ABI changes from commit ae2917093fb60bdc1ed3e commit db865ee447d46eccd641dc70c7f9acc231a3141e Merge: 6e7a9f0c4ea8 498e165274f3 660b94e0d8fe 34bbe0361707 185dfe32d7e2 9e0cda721d18 9cd10205227c a932872f1b76 Author: Stephen Boyd Date: Fri Jan 31 13:14:26 2020 -0800 Merge branches 'clk-imx', 'clk-ti', 'clk-xilinx', 'clk-nvidia', 'clk-qcom', 'clk-freescale' and 'clk-qoriq' into clk-next - Support for Xilinx Versal platform clks - Display clk controller on qcom sc7180 - Video clk controller on qcom sc7180 - Graphics clk controller on qcom sc7180 - CPU PLLs for qcom msm8916 - Fixes for clk controllers on qcom msm8998 SoCs - Move qcom msm8974 gfx3d clk to RPM control - Display port clk support on qcom sdm845 SoCs - Global clk controller on qcom ipq6018 - Adjust composite clk to new way of describing clk parents - Add a driver for BCLK of Freescale SAI cores * clk-imx: (32 commits) clk: imx: Add support for i.MX8MP clock driver dt-bindings: imx: Add clock binding doc for i.MX8MP clk: imx: gate4: Switch imx_clk_gate4_flags() to clk_hw based API clk: imx: imx8mq: Switch to clk_hw based API clk: imx: imx8mm: Switch to clk_hw based API clk: imx: imx8mn: Switch to clk_hw based API clk: imx: Remove __init for imx_obtain_fixed_clk_hw() API clk: imx: gate3: Switch to clk_hw based API clk: imx: add hw API imx_clk_hw_mux2_flags clk: imx: add imx_unregister_hw_clocks clk: imx: clk-composite-8m: Switch to clk_hw based API clk: imx: clk-pll14xx: Switch to clk_hw based API clk: imx7up: Rename the clks to hws clk: imx: Rename the imx_clk_divider_gate to imply it's clk_hw based clk: imx: Rename the imx_clk_pfdv2 to imply it's clk_hw based clk: imx: Rename the imx_clk_pllv4 to imply it's clk_hw based clk: imx: Rename sccg and frac pll register to suggest clk_hw clk: imx: imx7ulp composite: Rename to show is clk_hw based clk: imx: pllv2: Switch to clk_hw based API clk: imx: pllv1: Switch to clk_hw based API ... * clk-ti: clk: ti: clkctrl: Fix hidden dependency to node name clk: ti: add clkctrl data dra7 sgx clk: ti: omap5: Add missing AESS clock clk: ti: dra7: fix parent for gmac_clkctrl clk: ti: dra7: add vpe clkctrl data clk: ti: dra7: add cam clkctrl data dt-bindings: clock: Move ti-dra7-atl.h to dt-bindings/clock * clk-xilinx: clk: zynqmp: Add support for clock with CLK_DIVIDER_POWER_OF_TWO flag clk: zynqmp: Fix divider calculation clk: zynqmp: Add support for get max divider clk: zynqmp: Warn user if clock user are more than allowed clk: zynqmp: Extend driver for versal dt-bindings: clock: Add bindings for versal clock driver * clk-nvidia: clk: tegra20/30: Explicitly set parent clock for Video Decoder clk: tegra20/30: Don't pre-initialize displays parent clock clk: tegra: divider: Check UART's divider enable-bit state on rate's recalculation clk: tegra: clk-dfll: Remove call to pm_runtime_irq_safe() clk: tegra: Mark fuse clock as critical * clk-qcom: (35 commits) clk: qcom: rpmh: Sort OF match table dt-bindings: fix warnings in validation of qcom,gcc.yaml dt-binding: fix compilation error of the example in qcom,gcc.yaml clk: qcom: Add ipq6018 Global Clock Controller support clk: qcom: Add DT bindings for ipq6018 gcc clock controller clk: qcom: gcc-msm8996: Fix parent for CLKREF clocks clk: qcom: rpmh: Add IPA clock for SC7180 clk: qcom: rpmh: skip undefined clocks when registering clk: qcom: Add video clock controller driver for SC7180 dt-bindings: clock: Introduce SC7180 QCOM Video clock bindings dt-bindings: clock: Add YAML schemas for the QCOM VIDEOCC clock bindings clk: qcom: Add graphics clock controller driver for SC7180 dt-bindings: clock: Introduce SC7180 QCOM Graphics clock bindings dt-bindings: clock: Add YAML schemas for the QCOM GPUCC clock bindings clk: qcom: apcs-msm8916: use clk_parent_data to specify the parent clk: qcom: Add display clock controller driver for SC7180 dt-bindings: clock: Introduce QCOM sc7180 display clock bindings dt-bindings: clock: Add YAML schemas for the QCOM DISPCC clock bindings clk: qcom: clk-alpha-pll: Add support for Fabia PLL calibration clk: qcom: alpha-pll: Remove useless read from set rate ... * clk-freescale: clk: fsl-sai: new driver dt-bindings: clock: document the fsl-sai driver clk: composite: add _register_composite_pdata() variants * clk-qoriq: clk: qoriq: add ls1088a hwaccel clocks support clk: ls1028a: Add clock driver for Display output interface dt/bindings: clk: Add YAML schemas for LS1028A Display Clock bindings commit b581098482e6f177a4f64ea021fd5a9327ea08d5 Author: Steve French Date: Fri Jan 31 15:13:22 2020 -0600 cifs: update internal module version number To 2.25 Signed-off-by: Steve French commit 6e7a9f0c4ea83b570175c08e7af3ce4711b554f3 Merge: 36bf7a5bdd34 37215da5553e ff258817137a c1c95a46ed15 31ef091770da fa9ae3057d7a Author: Stephen Boyd Date: Fri Jan 31 13:12:14 2020 -0800 Merge branches 'clk-debugfs-danger', 'clk-basic-hw', 'clk-renesas', 'clk-amlogic' and 'clk-allwinner' into clk-next - Support dangerous debugfs actions on clks with dead code - Convert gpio, fixed-factor, mux, gate, divider basic clks to hw based APIs * clk-debugfs-danger: clk: Add support for setting clk_rate via debugfs * clk-basic-hw: clk: divider: Add support for specifying parents via DT/pointers clk: gate: Add support for specifying parents via DT/pointers clk: mux: Add support for specifying parents via DT/pointers clk: asm9260: Use parent accuracy in fixed rate clk clk: fixed-rate: Document that accuracy isn't a rate clk: fixed-rate: Add clk flags for parent accuracy clk: fixed-rate: Add support for specifying parents via DT/pointers clk: fixed-rate: Document accuracy member clk: fixed-rate: Move to_clk_fixed_rate() to C file clk: fixed-rate: Remove clk_register_fixed_rate_with_accuracy() clk: fixed-rate: Convert to clk_hw based APIs clk: gpio: Use DT way of specifying parents * clk-renesas: clk: renesas: Prepare for split of R-Car H3 config symbol dt-bindings: clock: renesas: cpg-mssr: Fix r8a774b1 typo clk: renesas: r7s9210: Add SPIBSC clock clk: renesas: rcar-gen3: Allow changing the RPC[D2] clocks clk: renesas: Remove use of ARCH_R8A7796 clk: renesas: rcar-gen2: Change multipliers and dividers to u8 * clk-amlogic: clk: clarify that clk_set_rate() does updates from top to bottom clk: meson: meson8b: make the CCF use the glitch-free mali mux clk: meson: pll: Fix by 0 division in __pll_params_to_rate() clk: meson: g12a: fix missing uart2 in regmap table clk: meson: meson8b: use of_clk_hw_register to register the clocks clk: meson: meson8b: don't register the XTAL clock when provided via OF clk: meson: meson8b: change references to the XTAL clock to use [fw_]name clk: meson: meson8b: use clk_hw_set_parent in the CPU clock notifier clk: meson: add a driver for the Meson8/8b/8m2 DDR clock controller dt-bindings: clock: meson8b: add the clock inputs dt-bindings: clock: add the Amlogic Meson8 DDR clock controller binding * clk-allwinner: clk: sunxi: a23/a33: Export the MIPI PLL clk: sunxi: a31: Export the MIPI PLL clk: sunxi-ng: a64: export CLK_CPUX clock for DVFS clk: sunxi-ng: add mux and pll notifiers for A64 CPU clock clk: sunxi-ng: r40: Export MBUS clock clk: sunxi: use of_device_get_match_data commit 36bf7a5bdd349dd150b9c6bc8d5601bd1069ce9f Merge: 28db9a8c82a8 1ec09a2ec67a 2d2699926143 248fdcc77a35 333d2d19df09 66d9f5214c9b Author: Stephen Boyd Date: Fri Jan 31 13:12:00 2020 -0800 Merge branches 'clk-uniphier', 'clk-warn-critical', 'clk-ux500', 'clk-kconfig' and 'clk-at91' into clk-next - Warn about critical clks that fail to enable or prepare - Detect more PRMCU variants in ux500 driver * clk-uniphier: clk: uniphier: Add SCSSI clock gate for each channel * clk-warn-critical: clk: Warn about critical clks that fail to enable clk: Don't try to enable critical clocks if prepare failed clk: tegra: Fix double-free in tegra_clk_init() clk: samsung: exynos5420: Keep top G3D clocks enabled clk: qcom: Avoid SMMU/cx gdsc corner cases clk: qcom: gcc-sc7180: Fix setting flag for votable GDSCs clk: Move clk_core_reparent_orphans() under CONFIG_OF clk: at91: fix possible deadlock clk: walk orphan list on clock provider registration clk: imx: pll14xx: fix clk_pll14xx_wait_lock clk: imx: clk-imx7ulp: Add missing sentinel of ulp_div_table clk: imx: clk-composite-8m: add lock to gate/mux * clk-ux500: clk: ux500: Fix up the SGA clock for some variants * clk-kconfig: clk: Fix Kconfig indentation * clk-at91: clk: at91: sam9x60: fix programmable clock prescaler clk: at91: sam9x60-pll: adapt PMC_PLL_ACR default value commit 28db9a8c82a81efb8c2548104a5416bb8d101176 Merge: f873744c2903 59ef4da4e408 9011f92622e5 Author: Stephen Boyd Date: Fri Jan 31 13:11:52 2020 -0800 Merge branches 'clk-init-allocation', 'clk-unused' and 'clk-register-dt-node-better' into clk-next - Let clk_ops::init() return an error code - Add a clk_ops::terminate() callback to undo clk_ops::init() * clk-init-allocation: clk: add terminate callback to clk_ops clk: let init callback return an error code clk: actually call the clock init before any other callback of the clock * clk-unused: clk: bm1800: Remove set but not used variable 'fref' * clk-register-dt-node-better: clk: Use parent node pointer during registration if necessary commit a62aa6f7f50a9a0af5e07d98774f8a7b439d390f Merge: 677b60dcb68a a31b4ec539e9 Author: Linus Torvalds Date: Fri Jan 31 13:07:16 2020 -0800 Merge tag 'gfs2-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Andreas Gruenbacher: - Fix some corner cases on filesystems with a block size < page size. - Fix a corner case that could expose incorrect access times over nfs. - Revert an otherwise sensible revoke accounting cleanup that causes assertion failures. The revoke accounting is whacky and needs to be fixed properly before we can add back this cleanup. - Various other minor cleanups. In addition, please expect to see another pull request from Bob Peterson about his gfs2 recovery patch queue shortly. * tag 'gfs2-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: Revert "gfs2: eliminate tr_num_revoke_rm" gfs2: remove unused LBIT macros fs/gfs2: remove unused IS_DINODE and IS_LEAF macros gfs2: Remove GFS2_MIN_LVB_SIZE define gfs2: Fix incorrect variable name gfs2: Avoid access time thrashing in gfs2_inode_lookup gfs2: minor cleanup: remove unneeded variable ret in gfs2_jdata_writepage gfs2: eliminate ssize parameter from gfs2_struct2blk gfs2: Another gfs2_find_jhead fix commit 677b60dcb68a0c43822b5a8ad97733b4193386b9 Merge: 7eec11d3a784 243145bc4336 Author: Linus Torvalds Date: Fri Jan 31 12:58:12 2020 -0800 Merge tag 'iomap-5.6-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap fix from Darrick Wong: "A single patch fixing an off-by-one error when we're checking to see how far we're gotten into an EOF page" * tag 'iomap-5.6-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: fs: Fix page_mkwrite off-by-one errors commit c472a0b0a1fd1688157b4ad6efc1c3fb8e571a53 Author: Thierry Reding Date: Fri Jan 31 17:59:10 2020 +0100 drm/tegra: sor: Initialize runtime PM before use Commit fd67e9c6ed5a ("drm/tegra: Do not implement runtime PM") replaced the generic runtime PM usage by a host1x bus-specific implementation in order to work around some assumptions baked into runtime PM that are in conflict with the requirements in the Tegra DRM driver. Unfortunately the new runtime PM callbacks are not setup yet at the time when the SOR driver first needs to resume the device to register the SOR pad clock, and accesses to register will cause the system to hang. Note that this only happens on Tegra124 and Tegra210 because those are the only SoCs where the SOR pad clock is registered from the SOR driver. Later generations use a SOR pad clock provided by the BPMP. Fix this by moving the registration of the SOR pad clock after the host1x client has been registered. That's somewhat suboptimal because this could potentially, though it's very unlikely, cause the Tegra DRM to be probed if the SOR happens to be the last subdevice to register, only to be immediately removed again if the SOR pad output clock fails to register. That's just a minor annoyance, though, and doesn't justify implementing a workaround. Fixes: fd67e9c6ed5a ("drm/tegra: Do not implement runtime PM") Signed-off-by: Thierry Reding commit ad2139cb80a7a9afbfe428d0448d351a84e22ee6 Author: Thierry Reding Date: Fri Jan 31 17:59:09 2020 +0100 drm/tegra: sor: Disable runtime PM on probe failure If the driver fails to probe, make sure to disable runtime PM again. While at it, make the cleanup code in ->remove() symmetric. Signed-off-by: Thierry Reding commit a5127a2dbe95dd72b6a21c98dee0857511f30357 Author: Thierry Reding Date: Fri Jan 31 17:59:08 2020 +0100 drm/tegra: sor: Suspend on clock registration failure Make sure the SOR module is suspenden after we fail to register the SOR pad output clock. Signed-off-by: Thierry Reding commit 64716b9ec5ba3342d3a9f0464d2abb48de65b327 Author: Max Filippov Date: Sun Dec 15 02:48:51 2019 -0800 xtensa: drop empty platform_* functions from platforms Provide missing default implementation for platform_init and drop copies of default platform_init, platform_setup and platform_heartbeet from platforms/*/setup.c Signed-off-by: Max Filippov commit e725331354924b3f720c8bb7ca579d44cc63e574 Author: Max Filippov Date: Sun Dec 15 02:44:59 2019 -0800 xtensa: clean up platform headers Drop include directives for irrelevant headers in asm/platform.h and its users. Sort remaining headers. Signed-off-by: Max Filippov commit 7da04e48798461f6598d2c0ef8c1bac3e5ea1dee Author: Max Filippov Date: Sun Dec 15 02:55:58 2019 -0800 xtensa: drop set_except_vector declaration There's no implementation for set_except_vector function in the xtensa code. Drop its declaration. Signed-off-by: Max Filippov commit 7eec11d3a784a283f916590e5aa30b855c2ccfd7 Merge: ddaefe8947b4 43e76af85fa7 Author: Linus Torvalds Date: Fri Jan 31 12:16:36 2020 -0800 Merge branch 'akpm' (patches from Andrew) Pull updates from Andrew Morton: "Most of -mm and quite a number of other subsystems: hotfixes, scripts, ocfs2, misc, lib, binfmt, init, reiserfs, exec, dma-mapping, kcov. MM is fairly quiet this time. Holidays, I assume" * emailed patches from Andrew Morton : (118 commits) kcov: ignore fault-inject and stacktrace include/linux/io-mapping.h-mapping: use PHYS_PFN() macro in io_mapping_map_atomic_wc() execve: warn if process starts with executable stack reiserfs: prevent NULL pointer dereference in reiserfs_insert_item() init/main.c: fix misleading "This architecture does not have kernel memory protection" message init/main.c: fix quoted value handling in unknown_bootoption init/main.c: remove unnecessary repair_env_string in do_initcall_level init/main.c: log arguments and environment passed to init fs/binfmt_elf.c: coredump: allow process with empty address space to coredump fs/binfmt_elf.c: coredump: delete duplicated overflow check fs/binfmt_elf.c: coredump: allocate core ELF header on stack fs/binfmt_elf.c: make BAD_ADDR() unlikely fs/binfmt_elf.c: better codegen around current->mm fs/binfmt_elf.c: don't copy ELF header around fs/binfmt_elf.c: fix ->start_code calculation fs/binfmt_elf.c: smaller code generation around auxv vector fill lib/find_bit.c: uninline helper _find_next_bit() lib/find_bit.c: join _find_next_bit{_le} uapi: rename ext2_swab() to swab() and share globally in swab.h lib/scatterlist.c: adjust indentation in __sg_alloc_table ... commit ddaefe8947b48b638f726cf89730ecc1000ebcc3 Merge: c5951e7c8ee5 6080d608eeff Author: Linus Torvalds Date: Fri Jan 31 11:42:13 2020 -0800 Merge tag 'modules-for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull module updates from Jessica Yu: "Summary of modules changes for the 5.6 merge window: - Add "MS" (SHF_MERGE|SHF_STRINGS) section flags to __ksymtab_strings to indicate to the linker that it can perform string deduplication (i.e., duplicate strings are reduced to a single copy in the string table). This means any repeated namespace string would be merged to just one entry in __ksymtab_strings. - Various code cleanups and small fixes (fix small memleak in error path, improve moduleparam docs, silence rcu warnings, improve error logging)" * tag 'modules-for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: module.h: Annotate mod_kallsyms with __rcu module: avoid setting info->name early in case we can fall back to info->mod->name modsign: print module name along with error message kernel/module: Fix memleak in module_add_modinfo_attrs() export.h: reduce __ksymtab_strings string duplication by using "MS" section flags moduleparam: fix kerneldoc modules: lockdep: Suppress suspicious RCU usage warning commit c5951e7c8ee5cb04b8b41c32bf567b90117a2124 Merge: b7e573bb4a7a 2c4288719806 Author: Linus Torvalds Date: Fri Jan 31 11:28:31 2020 -0800 Merge tag 'mips_5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS changes from Paul Burton: "Nothing too big or scary in here: - Support mremap() for the VDSO, primarily to allow CRIU to restore the VDSO to its checkpointed location. - Restore the MIPS32 cBPF JIT, after having reverted the enablement of the eBPF JIT for MIPS32 systems in the 5.5 cycle. - Improve cop0 counter synchronization behaviour whilst onlining CPUs by running with interrupts disabled. - Better match FPU behaviour when emulating multiply-accumulate instructions on pre-r6 systems that implement IEEE754-2008 style MACs. - Loongson64 kernels now build using the MIPS64r2 ISA, allowing them to take advantage of instructions introduced by r2. - Support for the Ingenic X1000 SoC & the really nice little CU Neo development board that's using it. - Support for WMAC on GARDENA Smart Gateway devices. - Lots of cleanup & refactoring of SGI IP27 (Origin 2*) support in preparation for introducing IP35 (Origin 3*) support. - Various Kconfig & Makefile cleanups" * tag 'mips_5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (60 commits) MIPS: PCI: Add detection of IOC3 on IO7, IO8, IO9 and Fuel MIPS: Loongson64: Disable exec hazard MIPS: Loongson64: Bump ISA level to MIPSR2 MIPS: Make DIEI support as a config option MIPS: OCTEON: octeon-irq: fix spelling mistake "to" -> "too" MIPS: asm: local: add barriers for Loongson MIPS: Loongson64: Select mac2008 only feature MIPS: Add MAC2008 Support Revert "MIPS: Add custom serial.h with BASE_BAUD override for generic kernel" MIPS: sort MIPS and MIPS_GENERIC Kconfig selects alphabetically (again) MIPS: make CPU_HAS_LOAD_STORE_LR opt-out MIPS: generic: don't unconditionally select PINCTRL MIPS: don't explicitly select LIBFDT in Kconfig MIPS: sync-r4k: do slave counter synchronization with disabled HW interrupts MIPS: SGI-IP30: Check for valid pointer before using it MIPS: syscalls: fix indentation of the 'SYSNR' message MIPS: boot: fix typo in 'vmlinux.lzma.its' target MIPS: fix indentation of the 'RELOCS' message dt-bindings: Document loongson vendor-prefix MIPS: CU1000-Neo: Refresh defconfig to support HWMON and WiFi. ... commit b7e573bb4a7a511741f8942b1fb03cfe602ee57f Merge: a1084542a8e8 f45ba2bd6da0 Author: Linus Torvalds Date: Fri Jan 31 11:26:11 2020 -0800 Merge tag 'arc-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC updates from Vineet Gupta: - Wire up clone3 syscall - ARCv2 FPU state save/restore across context switch - AXS10x platform and misc fixes * tag 'arc-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARCv2: fpu: preserve userspace fpu state ARC: fpu: declutter code, move bits out into fpu.h ARC: wireup clone3 syscall ARC: [plat-axs10x]: Add missing multicast filter number to GMAC node ARC: update feature support for jump-labels commit a1084542a8e83b8eb5aaf7e8ccb81b461e7d4ce8 Merge: b70a2d6b29f7 61ffb9d27860 Author: Linus Torvalds Date: Fri Jan 31 11:23:29 2020 -0800 Merge tag 'riscv-for-linus-5.6-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: "This contains a handful of patches for this merge window: - Support for kasan - 32-bit physical addresses on rv32i-based systems - Support for CONFIG_DEBUG_VIRTUAL - DT entry for the FU540 GPIO controller, which has recently had a device driver merged These boot a buildroot-based system on QEMU's virt board for me" * tag 'riscv-for-linus-5.6-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: dts: Add DT support for SiFive FU540 GPIO driver riscv: mm: add support for CONFIG_DEBUG_VIRTUAL riscv: keep 32-bit kernel to 32-bit phys_addr_t kasan: Add riscv to KASAN documentation. riscv: Add KASAN support kasan: No KASAN's memmove check if archs don't have it. commit 264b0d2bee148073c117e7bbbde5be7125a53be1 Author: Erdem Aktas Date: Fri Dec 13 13:31:46 2019 -0800 percpu: Separate decrypted varaibles anytime encryption can be enabled CONFIG_VIRTUALIZATION may not be enabled for memory encrypted guests. If disabled, decrypted per-CPU variables may end up sharing the same page with variables that should be left encrypted. Always separate per-CPU variables that should be decrypted into their own page anytime memory encryption can be enabled in the guest rather than rely on any other config option that may not be enabled. Fixes: ac26963a1175 ("percpu: Introduce DEFINE_PER_CPU_DECRYPTED") Cc: stable@vger.kernel.org # 4.15+ Signed-off-by: Erdem Aktas Signed-off-by: David Rientjes Signed-off-by: Dennis Zhou commit becef184dfe9bfef522c80501d22a5e02efba8d8 Author: Luc Van Oostenryck Date: Wed Dec 4 02:06:23 2019 +0100 percpu: fix __percpu annotation in asm-generic The generic implementation of raw_cpu_generic_add_return() is: #define raw_cpu_generic_add_return(pcp, val) \ ({ \ typeof(&(pcp)) __p = raw_cpu_ptr(&(pcp)); \ \ *__p += val; \ *__p; \ }) where the 'pcp' argument is a __percpu lvalue. There, the variable '__p' is declared as a __percpu pointer the type of the address of 'pcp') but: 1) the value assigned to it, the return value of raw_cpu_ptr(), is a plain (__kernel) pointer, not a __percpu one. 2) this variable is dereferenced just after while a __percpu pointer is implicitly __noderef. So, fix the declaration of the 'pcp' variable to its correct type: the plain (non-percpu) pointer corresponding to pcp's address, using the fact that typeof() ignores the address space and the 'noderef' attribute of its agument. Same for raw_cpu_generic_xchg(), raw_cpu_generic_cmpxchg() & raw_cpu_generic_cmpxchg_double(). This removes 209 warnings on ARM, 525 on ARM64, 220 on x86 & more than 2600 on ppc64 (all of them with the default config). Cc: Tejun Heo Cc: Nicholas Piggin Reported-by: Ben Dooks Signed-off-by: Luc Van Oostenryck Acked-by: Christoph Lameter Signed-off-by: Dennis Zhou commit b70a2d6b29f7c5b621bf83f903f26fee5fe28efc Merge: e813e6503838 6bd3357b6181 Author: Linus Torvalds Date: Fri Jan 31 11:05:33 2020 -0800 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc fixes: - three fixes and a cleanup for the resctrl code - a HyperV fix - a fix to /proc/kcore contents in live debugging sessions - a fix for the x86 decoder opcode map" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/decoder: Add TEST opcode to Group3-2 x86/resctrl: Clean up unused function parameter in mkdir path x86/resctrl: Fix a deadlock due to inaccurate reference x86/resctrl: Fix use-after-free due to inaccurate refcount of rdtgroup x86/resctrl: Fix use-after-free when deleting resource groups x86/hyper-v: Add "polling" bit to hv_synic_sint x86/crash: Define arch_crash_save_vmcoreinfo() if CONFIG_CRASH_CORE=y commit 2b73ea3796242608b4ccf019ff217156c92e92fe Author: Steven Clarkson Date: Thu Jan 30 16:48:16 2020 -0800 x86/boot: Handle malformed SRAT tables during early ACPI parsing Break an infinite loop when early parsing of the SRAT table is caused by a subtable with zero length. Known to affect the ASUS WS X299 SAGE motherboard with firmware version 1201 which has a large block of zeros in its SRAT table. The kernel could boot successfully on this board/firmware prior to the introduction of early parsing this table or after a BIOS update. [ bp: Fixup whitespace damage and commit message. Make it return 0 to denote that there are no immovable regions because who knows what else is broken in this BIOS. ] Fixes: 02a3e3cdb7f1 ("x86/boot: Parse SRAT table and count immovable memory regions") Signed-off-by: Steven Clarkson Signed-off-by: Borislav Petkov Cc: linux-acpi@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=206343 Link: https://lkml.kernel.org/r/CAHKq8taGzj0u1E_i=poHUam60Bko5BpiJ9jn0fAupFUYexvdUQ@mail.gmail.com commit 78e06cf430934fc3768c342cbebdd1013dcd6fa7 Author: Matteo Croce Date: Thu Jan 30 20:10:19 2020 +0100 netfilter: nf_flowtable: fix documentation In the flowtable documentation there is a missing semicolon, the command as is would give this error: nftables.conf:5:27-33: Error: syntax error, unexpected devices, expecting newline or semicolon hook ingress priority 0 devices = { br0, pppoe-data }; ^^^^^^^ nftables.conf:4:12-13: Error: invalid hook (null) flowtable ft { ^^ Fixes: 19b351f16fd9 ("netfilter: add flowtable documentation") Signed-off-by: Matteo Croce Signed-off-by: Pablo Neira Ayuso commit c22208b7ce3ef0c2c184ff0d9f6423614b1799d9 Author: Paul Blakey Date: Thu Jan 30 18:04:37 2020 +0200 netfilter: flowtable: Fix setting forgotten NF_FLOW_HW_DEAD flag During the refactor this was accidently removed. Fixes: ae29045018c8 ("netfilter: flowtable: add nf_flow_offload_tuple() helper") Signed-off-by: Paul Blakey Signed-off-by: Pablo Neira Ayuso commit 0f34f30a1be80f3f59efeaab596396bc698e7337 Author: Paul Blakey Date: Thu Jan 30 18:04:36 2020 +0200 netfilter: flowtable: Fix missing flush hardware on table free If entries exist when freeing a hardware offload enabled table, we queue work for hardware while running the gc iteration. Execute it (flush) after queueing. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: Paul Blakey Signed-off-by: Pablo Neira Ayuso commit 91bfaa15a379e9af24f71fb4ee08d8019b6e8ec7 Author: Paul Blakey Date: Thu Jan 30 18:04:35 2020 +0200 netfilter: flowtable: Fix hardware flush order on nf_flow_table_cleanup On netdev down event, nf_flow_table_cleanup() is called for the relevant device and it cleans all the tables that are on that device. If one of those tables has hardware offload flag, nf_flow_table_iterate_cleanup flushes hardware and then runs the gc. But the gc can queue more hardware work, which will take time to execute. Instead first add the work, then flush it, to execute it now. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: Paul Blakey Signed-off-by: Pablo Neira Ayuso commit b9e0102a57d768bdb99cbbfa01225f73d58e03bc Author: Joe Perches Date: Tue Jan 28 11:07:27 2020 -0800 netfilter: Use kvcalloc Convert the uses of kvmalloc_array with __GFP_ZERO to the equivalent kvcalloc. Signed-off-by: Joe Perches Signed-off-by: Pablo Neira Ayuso commit 43e76af85fa7e75ac9b71fc2fcc250abb1889bff Author: Dmitry Vyukov Date: Thu Jan 30 22:17:35 2020 -0800 kcov: ignore fault-inject and stacktrace Don't instrument 3 more files that contain debugging facilities and produce large amounts of uninteresting coverage for every syscall. The following snippets are sprinkled all over the place in kcov traces in a debugging kernel. We already try to disable instrumentation of stack unwinding code and of most debug facilities. I guess we did not use fault-inject.c at the time, and stacktrace.c was somehow missed (or something has changed in kernel/configs). This change both speeds up kcov (kernel doesn't need to store these PCs, user-space doesn't need to process them) and frees trace buffer capacity for more useful coverage. should_fail lib/fault-inject.c:149 fail_dump lib/fault-inject.c:45 stack_trace_save kernel/stacktrace.c:124 stack_trace_consume_entry kernel/stacktrace.c:86 stack_trace_consume_entry kernel/stacktrace.c:89 ... a hundred frames skipped ... stack_trace_consume_entry kernel/stacktrace.c:93 stack_trace_consume_entry kernel/stacktrace.c:86 Link: http://lkml.kernel.org/r/20200116111449.217744-1-dvyukov@gmail.com Signed-off-by: Dmitry Vyukov Reviewed-by: Andrey Konovalov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2b755626cad6d9dcbad09d022ba7bdfc39ed773d Author: Andy Shevchenko Date: Thu Jan 30 22:17:32 2020 -0800 include/linux/io-mapping.h-mapping: use PHYS_PFN() macro in io_mapping_map_atomic_wc() Use PHYS_PFN() macro in io_mapping_map_atomic_wc() instead of open coded variant. Link: http://lkml.kernel.org/r/20191209165624.56351-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 47a2ebb7f5053387f5753b524f4920b9b829f922 Author: Alexey Dobriyan Date: Thu Jan 30 22:17:29 2020 -0800 execve: warn if process starts with executable stack There were few episodes of silent downgrade to an executable stack over years: 1) linking innocent looking assembly file will silently add executable stack if proper linker options is not given as well: $ cat f.S .intel_syntax noprefix .text .globl f f: ret $ cat main.c void f(void); int main(void) { f(); return 0; } $ gcc main.c f.S $ readelf -l ./a.out GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 RWE 0x10 ^^^ 2) converting C99 nested function into a closure https://nullprogram.com/blog/2019/11/15/ void intsort2(int *base, size_t nmemb, _Bool invert) { int cmp(const void *a, const void *b) { int r = *(int *)a - *(int *)b; return invert ? -r : r; } qsort(base, nmemb, sizeof(*base), cmp); } will silently require stack trampolines while non-closure version will not. Without doubt this behaviour is documented somewhere, add a warning so that developers and users can at least notice. After so many years of x86_64 having proper executable stack support it should not cause too many problems. Link: http://lkml.kernel.org/r/20191208171918.GC19716@avx2 Signed-off-by: Alexey Dobriyan Cc: Dan Carpenter Cc: Will Deacon Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aacee5446a2a1aa35d0a49dab289552578657fb4 Author: Yunfeng Ye Date: Thu Jan 30 22:17:26 2020 -0800 reiserfs: prevent NULL pointer dereference in reiserfs_insert_item() The variable inode may be NULL in reiserfs_insert_item(), but there is no check before accessing the member of inode. Fix this by adding NULL pointer check before calling reiserfs_debug(). Link: http://lkml.kernel.org/r/79c5135d-ff25-1cc9-4e99-9f572b88cc00@huawei.com Signed-off-by: Yunfeng Ye Cc: zhengbin Cc: Hu Shiyuan Cc: Feilong Lin Cc: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f596ded1a044517afc4e9325f0dea449858450ac Author: Christophe Leroy Date: Thu Jan 30 22:17:23 2020 -0800 init/main.c: fix misleading "This architecture does not have kernel memory protection" message This message leads to thinking that memory protection is not implemented for the said architecture, whereas absence of CONFIG_STRICT_KERNEL_RWX only means that memory protection has not been selected at compile time. Don't print this message when CONFIG_ARCH_HAS_STRICT_KERNEL_RWX is selected by the architecture. Instead, print "Kernel memory protection not selected by kernel config." Link: http://lkml.kernel.org/r/62477e446d9685459d4f27d193af6ff1bd69d55f.1578557581.git.christophe.leroy@c-s.fr Signed-off-by: Christophe Leroy Acked-by: Kees Cook Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 283900e82847e10898650c66a249c10b213934fb Author: Arvind Sankar Date: Thu Jan 30 22:17:19 2020 -0800 init/main.c: fix quoted value handling in unknown_bootoption Patch series "init/main.c: minor cleanup/bugfix of envvar handling", v2. unknown_bootoption passes unrecognized command line arguments to init as either environment variables or arguments. Some of the logic in the function is broken for quoted command line arguments. When an argument of the form param="value" is processed by parse_args and passed to unknown_bootoption, the command line has param\0"value\0 with val pointing to the beginning of value. The helper function repair_env_string is then used to restore the '=' character that was removed by parse_args, and strip the quotes off fully. This results in param=value\0\0 and val ends up pointing to the 'a' instead of the 'v' in value. This bug was introduced when repair_env_string was refactored into a separate function, and the decrement of val in repair_env_string became dead code. This causes two problems in unknown_bootoption in the two places where the val pointer is used as a substitute for the length of param: 1. An argument of the form param=".value" is misinterpreted as a potential module parameter, with the result that it will not be placed in init's environment. 2. An argument of the form param="value" is checked to see if param is an existing environment variable that should be overwritten, but the comparison is off-by-one and compares 'param=v' instead of 'param=' against the existing environment. So passing, for example, TERM="vt100" on the command line results in init being passed both TERM=linux and TERM=vt100 in its environment. Patch 1 adds logging for the arguments and environment passed to init and is independent of the rest: it can be dropped if this is unnecessarily verbose. Patch 2 removes repair_env_string from initcall parameter parsing in do_initcall_level, as that uses a separate copy of the command line now and the repairing is no longer necessary. Patch 3 fixes the bug in unknown_bootoption by recording the length of param explicitly instead of implying it from val-param. This patch (of 3): Commit a99cd1125189 ("init: fix bug where environment vars can't be passed via boot args") introduced two minor bugs in unknown_bootoption by factoring out the quoted value handling into a separate function. When value is quoted, repair_env_string will move the value up 1 byte to strip the quotes, so val in unknown_bootoption no longer points to the actual location of the value. The result is that an argument of the form param=".value" is mistakenly treated as a potential module parameter and is not placed in init's environment, and an argument of the form param="value" can result in a duplicate environment variable: eg TERM="vt100" on the command line will result in both TERM=linux and TERM=vt100 being placed into init's environment. Fix this by recording the length of the param before calling repair_env_string instead of relying on val. Link: http://lkml.kernel.org/r/20191212180023.24339-4-nivedita@alum.mit.edu Signed-off-by: Arvind Sankar Cc: Chris Metcalf Cc: Krzysztof Mazur Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7e2762e1d9f4b9cb67ed6c3b7aff2020c367d4ac Author: Arvind Sankar Date: Thu Jan 30 22:17:16 2020 -0800 init/main.c: remove unnecessary repair_env_string in do_initcall_level Since commit 08746a65c296 ("init: fix in-place parameter modification regression"), parse_args in do_initcall_level is called on a copy of saved_command_line. It is unnecessary to call repair_env_string during this parsing, as this copy is not used for anything later. Remove the now unnecessary arguments from repair_env_string as well. Link: http://lkml.kernel.org/r/20191212180023.24339-3-nivedita@alum.mit.edu Signed-off-by: Arvind Sankar Cc: Krzysztof Mazur Cc: Chris Metcalf Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b88c50ac304a14f14e70c4ad22577b6b84632d5e Author: Arvind Sankar Date: Thu Jan 30 22:17:13 2020 -0800 init/main.c: log arguments and environment passed to init Extend logging in `run_init_process` to also show the arguments and environment that we are passing to init. Link: http://lkml.kernel.org/r/20191212180023.24339-2-nivedita@alum.mit.edu Signed-off-by: Arvind Sankar Cc: Chris Metcalf Cc: Krzysztof Mazur Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1fbede6e6f3dc6c1c33e84b6989cf8079d899f89 Author: Alexey Dobriyan Date: Thu Jan 30 22:17:10 2020 -0800 fs/binfmt_elf.c: coredump: allow process with empty address space to coredump Unmapping whole address space at once with munmap(0, (1ULL<<47) - 4096) or equivalent will create empty coredump. It is silly way to exit, however registers content may still be useful. The right to coredump is fundamental right of a process! Link: http://lkml.kernel.org/r/20191222150137.GA1277@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28f46656ad18534f4488590b5447ec48b954420d Author: Alexey Dobriyan Date: Thu Jan 30 22:17:07 2020 -0800 fs/binfmt_elf.c: coredump: delete duplicated overflow check array_size() macro will do overflow check anyway. Link: http://lkml.kernel.org/r/20191222144009.GB24341@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 225a3f53e7fc7ae9e57d336d712cadae62c39516 Author: Alexey Dobriyan Date: Thu Jan 30 22:17:04 2020 -0800 fs/binfmt_elf.c: coredump: allocate core ELF header on stack Comment says ELF header is "too large to be on stack". 64 bytes on 64-bit is not large by any means. Link: http://lkml.kernel.org/r/20191222143850.GA24341@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 18676ffcee596079037b1767e4efe38b06f05eb8 Author: Alexey Dobriyan Date: Thu Jan 30 22:17:01 2020 -0800 fs/binfmt_elf.c: make BAD_ADDR() unlikely If some mapping goes past TASK_SIZE it will be rejected by kernel which means no such userspace binaries exist. Mark every such check as unlikely. Link: http://lkml.kernel.org/r/20191215124355.GA21124@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 03c6d723eeac2d7beaa6d9682768469659088d77 Author: Alexey Dobriyan Date: Thu Jan 30 22:16:58 2020 -0800 fs/binfmt_elf.c: better codegen around current->mm "current->mm" pointer is stable in general except few cases one of which execve(2). Compiler can't treat is as stable but it _is_ stable most of the time. During ELF loading process ->mm becomes stable right after flush_old_exec(). Help compiler by caching current->mm, otherwise it continues to refetch it. add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-141 (-141) Function old new delta elf_core_dump 5062 5039 -23 load_elf_binary 5426 5308 -118 Note: other cases are left as is because it is either pessimisation or no change in binary size. Link: http://lkml.kernel.org/r/20191215124755.GB21124@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a62c5b1b6647ea069b8a23cb8edb7925dea89dd8 Author: Alexey Dobriyan Date: Thu Jan 30 22:16:55 2020 -0800 fs/binfmt_elf.c: don't copy ELF header around ELF header is read into bprm->buf[] by generic execve code. Save a memcpy and allocate just one header for the interpreter instead of two headers (64 bytes instead of 128 on 64-bit). Link: http://lkml.kernel.org/r/20191208171242.GA19716@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f67ef446291a09114f979a129fa42a859c5eb595 Author: Alexey Dobriyan Date: Thu Jan 30 22:16:52 2020 -0800 fs/binfmt_elf.c: fix ->start_code calculation Only executable segments should be accounted to ->start_code just like they do to ->end_code (correctly). Link: http://lkml.kernel.org/r/20191208171410.GB19716@avx2 Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1f83d80677a24ae737fe0ab4008e7c72b8a33b35 Author: Alexey Dobriyan Date: Thu Jan 30 22:16:50 2020 -0800 fs/binfmt_elf.c: smaller code generation around auxv vector fill Filling auxv vector as array with index (auxv[i++] = ...) generates terrible code. "saved_auxv" should be reworked because it is the worst member of mm_struct by size/usefullness ratio but do it later. Meanwhile help gcc a little with *auxv++ idiom. Space savings on x86_64: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-127 (-127) Function old new delta load_elf_binary 5470 5343 -127 Link: http://lkml.kernel.org/r/20191208172301.GD19716@avx2 Signed-off-by: Alexey Dobriyan Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7dfaa98f646bbc29c3575bc184f2b37aa2dd62c5 Author: Yury Norov Date: Thu Jan 30 22:16:47 2020 -0800 lib/find_bit.c: uninline helper _find_next_bit() It saves 25% of .text for arm64, and more for BE architectures. Before: $ size lib/find_bit.o text data bss dec hex filename 1012 56 0 1068 42c lib/find_bit.o After: $ size lib/find_bit.o text data bss dec hex filename 776 56 0 832 340 lib/find_bit.o Link: http://lkml.kernel.org/r/20200103202846.21616-3-yury.norov@gmail.com Signed-off-by: Yury Norov Cc: Thomas Gleixner Cc: Allison Randal Cc: William Breathitt Gray Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b78c57135d470cfc5b461f2abde4eaeb07d100fb Author: Yury Norov Date: Thu Jan 30 22:16:43 2020 -0800 lib/find_bit.c: join _find_next_bit{_le} _find_next_bit and _find_next_bit_le are very similar functions. It's possible to join them by adding 1 parameter and a couple of simple checks. It's simplify maintenance and make possible to shrink the size of .text by un-inlining the unified function (in the following patch). Link: http://lkml.kernel.org/r/20200103202846.21616-2-yury.norov@gmail.com Signed-off-by: Yury Norov Cc: Allison Randal Cc: Joe Perches Cc: Thomas Gleixner Cc: William Breathitt Gray Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d5767057c9a76a29f073dad66b7fa12a90e8c748 Author: Yury Norov Date: Thu Jan 30 22:16:40 2020 -0800 uapi: rename ext2_swab() to swab() and share globally in swab.h ext2_swab() is defined locally in lib/find_bit.c However it is not specific to ext2, neither to bitmaps. There are many potential users of it, so rename it to just swab() and move to include/uapi/linux/swab.h ABI guarantees that size of unsigned long corresponds to BITS_PER_LONG, therefore drop unneeded cast. Link: http://lkml.kernel.org/r/20200103202846.21616-1-yury.norov@gmail.com Signed-off-by: Yury Norov Cc: Allison Randal Cc: Joe Perches Cc: Thomas Gleixner Cc: William Breathitt Gray Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4e456fee215677584cafa7f67298a76917e89c64 Author: Nathan Chancellor Date: Thu Jan 30 22:16:37 2020 -0800 lib/scatterlist.c: adjust indentation in __sg_alloc_table Clang warns: ../lib/scatterlist.c:314:5: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] return -ENOMEM; ^ ../lib/scatterlist.c:311:4: note: previous statement is here if (prv) ^ 1 warning generated. This warning occurs because there is a space before the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns. Link: http://lkml.kernel.org/r/20191218033606.11942-1-natechancellor@gmail.com Link: https://github.com/ClangBuiltLinux/linux/issues/830 Fixes: edce6820a9fd ("scatterlist: prevent invalid free when alloc fails") Signed-off-by: Nathan Chancellor Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3fd396afc05fc90097276c6b7a70c406ad4df5bb Author: Mikhail Zaslonko Date: Thu Jan 30 22:16:33 2020 -0800 btrfs: use larger zlib buffer for s390 hardware compression In order to benefit from s390 zlib hardware compression support, increase the btrfs zlib workspace buffer size from 1 to 4 pages (if s390 zlib hardware support is enabled on the machine). This brings up to 60% better performance in hardware on s390 compared to the PAGE_SIZE buffer and much more compared to the software zlib processing in btrfs. In case of memory pressure, fall back to a single page buffer during workspace allocation. The data compressed with larger input buffers will still conform to zlib standard and thus can be decompressed also on a systems that uses only PAGE_SIZE buffer for btrfs zlib. Link: http://lkml.kernel.org/r/20200108105103.29028-1-zaslonko@linux.ibm.com Signed-off-by: Mikhail Zaslonko Reviewed-by: David Sterba Cc: Chris Mason Cc: Josef Bacik Cc: David Sterba Cc: Richard Purdie Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Eduard Shishkin Cc: Ilya Leoshkevich Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 803521b149c8c71a712445a32bd9316e074df76a Author: Mikhail Zaslonko Date: Thu Jan 30 22:16:30 2020 -0800 lib/zlib: add zlib_deflate_dfltcc_enabled() function Add a new function to zlib.h checking if s390 Deflate-Conversion facility is installed and enabled. Link: http://lkml.kernel.org/r/20200103223334.20669-6-zaslonko@linux.ibm.com Signed-off-by: Mikhail Zaslonko Cc: Chris Mason Cc: Christian Borntraeger Cc: David Sterba Cc: Eduard Shishkin Cc: Heiko Carstens Cc: Ilya Leoshkevich Cc: Josef Bacik Cc: Richard Purdie Cc: Vasily Gorbik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c65e6815db1c2e28d5554bd99d3a6e522ab599d1 Author: Mikhail Zaslonko Date: Thu Jan 30 22:16:27 2020 -0800 s390/boot: add dfltcc= kernel command line parameter Add the new kernel command line parameter 'dfltcc=' to configure s390 zlib hardware support. Format: { on | off | def_only | inf_only | always } on: s390 zlib hardware support for compression on level 1 and decompression (default) off: No s390 zlib hardware support def_only: s390 zlib hardware support for deflate only (compression on level 1) inf_only: s390 zlib hardware support for inflate only (decompression) always: Same as 'on' but ignores the selected compression level always using hardware support (used for debugging) Link: http://lkml.kernel.org/r/20200103223334.20669-5-zaslonko@linux.ibm.com Signed-off-by: Mikhail Zaslonko Cc: Chris Mason Cc: Christian Borntraeger Cc: David Sterba Cc: Eduard Shishkin Cc: Heiko Carstens Cc: Ilya Leoshkevich Cc: Josef Bacik Cc: Richard Purdie Cc: Vasily Gorbik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 12619610006371bfc30159937d4546e731d7b297 Author: Mikhail Zaslonko Date: Thu Jan 30 22:16:23 2020 -0800 lib/zlib: add s390 hardware support for kernel zlib_inflate Add decompression functions to zlib_dfltcc library. Update zlib_inflate functions with the hooks for s390 hardware support and adjust workspace structures with extra parameter lists required for hardware inflate decompression. Link: http://lkml.kernel.org/r/20200103223334.20669-4-zaslonko@linux.ibm.com Signed-off-by: Ilya Leoshkevich Signed-off-by: Mikhail Zaslonko Co-developed-by: Ilya Leoshkevich Cc: Chris Mason Cc: Christian Borntraeger Cc: David Sterba Cc: Eduard Shishkin Cc: Heiko Carstens Cc: Josef Bacik Cc: Richard Purdie Cc: Vasily Gorbik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1b3e3faf29d3acb7a2243c7e1bfb34184fdc6ece Author: Mikhail Zaslonko Date: Thu Jan 30 22:16:20 2020 -0800 s390/boot: rename HEAP_SIZE due to name collision Change the conflicting macro name in preparation for zlib_inflate hardware support. Link: http://lkml.kernel.org/r/20200103223334.20669-3-zaslonko@linux.ibm.com Signed-off-by: Mikhail Zaslonko Reviewed-by: Christian Borntraeger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aa5b395b69b65450e008b95ec623b4fc4b175f9f Author: Mikhail Zaslonko Date: Thu Jan 30 22:16:17 2020 -0800 lib/zlib: add s390 hardware support for kernel zlib_deflate Patch series "S390 hardware support for kernel zlib", v3. With IBM z15 mainframe the new DFLTCC instruction is available. It implements deflate algorithm in hardware (Nest Acceleration Unit - NXU) with estimated compression and decompression performance orders of magnitude faster than the current zlib. This patchset adds s390 hardware compression support to kernel zlib. The code is based on the userspace zlib implementation: https://github.com/madler/zlib/pull/410 The coding style is also preserved for future maintainability. There is only limited set of userspace zlib functions represented in kernel. Apart from that, all the memory allocation should be performed in advance. Thus, the workarea structures are extended with the parameter lists required for the DEFLATE CONVENTION CALL instruction. Since kernel zlib itself does not support gzip headers, only Adler-32 checksum is processed (also can be produced by DFLTCC facility). Like it was implemented for userspace, kernel zlib will compress in hardware on level 1, and in software on all other levels. Decompression will always happen in hardware (when enabled). Two DFLTCC compression calls produce the same results only when they both are made on machines of the same generation, and when the respective buffers have the same offset relative to the start of the page. Therefore care should be taken when using hardware compression when reproducible results are desired. However it does always produce the standard conform output which can be inflated anyway. The new kernel command line parameter 'dfltcc' is introduced to configure s390 zlib hardware support: Format: { on | off | def_only | inf_only | always } on: s390 zlib hardware support for compression on level 1 and decompression (default) off: No s390 zlib hardware support def_only: s390 zlib hardware support for deflate only (compression on level 1) inf_only: s390 zlib hardware support for inflate only (decompression) always: Same as 'on' but ignores the selected compression level always using hardware support (used for debugging) The main purpose of the integration of the NXU support into the kernel zlib is the use of hardware deflate in btrfs filesystem with on-the-fly compression enabled. Apart from that, hardware support can also be used during boot for decompressing the kernel or the ramdisk image With the patch for btrfs expanding zlib buffer from 1 to 4 pages (patch 6) the following performance results have been achieved using the ramdisk with btrfs. These are relative numbers based on throughput rate and compression ratio for zlib level 1: Input data Deflate rate Inflate rate Compression ratio NXU/Software NXU/Software NXU/Software stream of zeroes 1.46 1.02 1.00 random ASCII data 10.44 3.00 0.96 ASCII text (dickens) 6,21 3.33 0.94 binary data (vmlinux) 8,37 3.90 1.02 This means that s390 hardware deflate can provide up to 10 times faster compression (on level 1) and up to 4 times faster decompression (refers to all compression levels) for btrfs zlib. Disclaimer: Performance results are based on IBM internal tests using DD command-line utility on btrfs on a Fedora 30 based internal driver in native LPAR on a z15 system. Results may vary based on individual workload, configuration and software levels. This patch (of 9): Create zlib_dfltcc library with the s390 DEFLATE CONVERSION CALL implementation and related compression functions. Update zlib_deflate functions with the hooks for s390 hardware support and adjust workspace structures with extra parameter lists required for hardware deflate. Link: http://lkml.kernel.org/r/20200103223334.20669-2-zaslonko@linux.ibm.com Signed-off-by: Ilya Leoshkevich Signed-off-by: Mikhail Zaslonko Co-developed-by: Ilya Leoshkevich Cc: Chris Mason Cc: Christian Borntraeger Cc: David Sterba Cc: Eduard Shishkin Cc: Heiko Carstens Cc: Josef Bacik Cc: Richard Purdie Cc: Vasily Gorbik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f88b4265450fc879f6db8a811e33068ae168c4a4 Author: Akinobu Mita Date: Thu Jan 30 22:16:13 2020 -0800 iio: adc: qcom-vadc-common: use helpers This switches the qcom-vadc-common to use milli_kelvin_to_millicelsius() in . Link: http://lkml.kernel.org/r/1576386975-7941-13-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Acked-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Cc: Amit Kucheria Cc: Andy Shevchenko Cc: Christoph Hellwig Cc: Daniel Lezcano Cc: Darren Hart Cc: Emmanuel Grumbach Cc: Guenter Roeck Cc: Jean Delvare Cc: Jens Axboe Cc: Johannes Berg Cc: Jonathan Cameron Cc: Kalle Valo Cc: Keith Busch Cc: Luca Coelho Cc: Sagi Grimberg Cc: Stanislaw Gruszka Cc: Sujith Thomas Cc: Zhang Rui Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b741ffb4bf2cb8fa80a90c246cc36d9583c36701 Author: Akinobu Mita Date: Thu Jan 30 22:16:09 2020 -0800 thermal: armada: remove unused TO_MCELSIUS macro This removes unused TO_MCELSIUS() macro. Link: http://lkml.kernel.org/r/1576386975-7941-12-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Reviewed-by: Andy Shevchenko Cc: Zhang Rui Cc: Daniel Lezcano Cc: Amit Kucheria Cc: Andy Shevchenko Cc: Christoph Hellwig Cc: Darren Hart Cc: Emmanuel Grumbach Cc: Guenter Roeck Cc: Hartmut Knaack Cc: Jean Delvare Cc: Jens Axboe Cc: Johannes Berg Cc: Jonathan Cameron Cc: Jonathan Cameron Cc: Kalle Valo Cc: Keith Busch Cc: Lars-Peter Clausen Cc: Luca Coelho Cc: Peter Meerwald-Stadler Cc: Sagi Grimberg Cc: Stanislaw Gruszka Cc: Sujith Thomas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b1a79b2f31a661be3d4a90f3646e1464d65b37e0 Author: Akinobu Mita Date: Thu Jan 30 22:16:05 2020 -0800 iwlwifi: use helpers This switches the iwlwifi driver to use celsius_to_kelvin() and kelvin_to_celsius() in . Link: http://lkml.kernel.org/r/1576386975-7941-11-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Reviewed-by: Andy Shevchenko Acked-by: Luca Coelho Cc: Kalle Valo Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Amit Kucheria Cc: Andy Shevchenko Cc: Christoph Hellwig Cc: Daniel Lezcano Cc: Darren Hart Cc: Guenter Roeck Cc: Hartmut Knaack Cc: Jean Delvare Cc: Jens Axboe Cc: Jonathan Cameron Cc: Jonathan Cameron Cc: Keith Busch Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Cc: Sagi Grimberg Cc: Stanislaw Gruszka Cc: Sujith Thomas Cc: Zhang Rui Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1410b2fc8d5c94c713c03ed95d01640154e2c287 Author: Akinobu Mita Date: Thu Jan 30 22:16:01 2020 -0800 iwlegacy: use helpers This switches the iwlegacy driver to use celsius_to_kelvin() and kelvin_to_celsius() in . [akinobu.mita@gmail.com: fix build warnings with format string] Link: http://lkml.kernel.org/r/1579014483-9226-1-git-send-email-akinobu.mita@gmail.com Link: https://lore.kernel.org/r/20200106171452.201c3b4c@canb.auug.org.au Link: http://lkml.kernel.org/r/1576386975-7941-10-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Reviewed-by: Andy Shevchenko Acked-by: Kalle Valo Cc: Kalle Valo Cc: Stanislaw Gruszka Cc: Amit Kucheria Cc: Andy Shevchenko Cc: Christoph Hellwig Cc: Daniel Lezcano Cc: Darren Hart Cc: Emmanuel Grumbach Cc: Guenter Roeck Cc: Hartmut Knaack Cc: Jean Delvare Cc: Jens Axboe Cc: Johannes Berg Cc: Jonathan Cameron Cc: Keith Busch Cc: Lars-Peter Clausen Cc: Luca Coelho Cc: Peter Meerwald-Stadler Cc: Sagi Grimberg Cc: Sujith Thomas Cc: Zhang Rui Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cdf309fb38ad419aadb8f5856a088864688fad90 Author: Akinobu Mita Date: Thu Jan 30 22:15:57 2020 -0800 thermal: remove kelvin to/from Celsius conversion helpers from This removes the kelvin to/from Celsius conversion helper macros in which were switched to the inline helper functions in . Link: http://lkml.kernel.org/r/1576386975-7941-9-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Reviewed-by: Andy Shevchenko Cc: Sujith Thomas Cc: Darren Hart Cc: Andy Shevchenko Cc: Zhang Rui Cc: Daniel Lezcano Cc: Amit Kucheria Cc: Jean Delvare Cc: Guenter Roeck Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Emmanuel Grumbach Cc: Hartmut Knaack Cc: Johannes Berg Cc: Jonathan Cameron Cc: Jonathan Cameron Cc: Kalle Valo Cc: Lars-Peter Clausen Cc: Luca Coelho Cc: Peter Meerwald-Stadler Cc: Stanislaw Gruszka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7724cd2bff55d29206d6f6d236ec222d155b2e41 Author: Akinobu Mita Date: Thu Jan 30 22:15:53 2020 -0800 nvme: hwmon: switch to use helpers This switches the nvme driver to use kelvin_to_millicelsius() and millicelsius_to_kelvin() in . Link: http://lkml.kernel.org/r/1576386975-7941-8-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Reviewed-by: Christoph Hellwig Reviewed-by: Guenter Roeck Reviewed-by: Keith Busch Reviewed-by: Andy Shevchenko Cc: Sujith Thomas Cc: Darren Hart Cc: Andy Shevchenko Cc: Zhang Rui Cc: Daniel Lezcano Cc: Amit Kucheria Cc: Jean Delvare Cc: Guenter Roeck Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Emmanuel Grumbach Cc: Hartmut Knaack Cc: Johannes Berg Cc: Jonathan Cameron Cc: Jonathan Cameron Cc: Kalle Valo Cc: Lars-Peter Clausen Cc: Luca Coelho Cc: Peter Meerwald-Stadler Cc: Stanislaw Gruszka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 97a0a49d55ebd859509712c44b071140fd838d3e Author: Akinobu Mita Date: Thu Jan 30 22:15:48 2020 -0800 thermal: intel_pch: switch to use helpers This switches the intel pch thermal driver to use deci_kelvin_to_millicelsius() in instead of helpers in . This is preparation for centralizing the kelvin to/from Celsius conversion helpers in . Link: http://lkml.kernel.org/r/1576386975-7941-7-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Reviewed-by: Andy Shevchenko Cc: Sujith Thomas Cc: Darren Hart Cc: Andy Shevchenko Cc: Zhang Rui Cc: Daniel Lezcano Cc: Amit Kucheria Cc: Jean Delvare Cc: Guenter Roeck Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Emmanuel Grumbach Cc: Hartmut Knaack Cc: Johannes Berg Cc: Jonathan Cameron Cc: Jonathan Cameron Cc: Kalle Valo Cc: Lars-Peter Clausen Cc: Luca Coelho Cc: Peter Meerwald-Stadler Cc: Stanislaw Gruszka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 006a6021789c916a0697c98c116f02e5967a2a13 Author: Akinobu Mita Date: Thu Jan 30 22:15:44 2020 -0800 thermal: int340x: switch to use helpers This switches the int340x thermal zone driver to use deci_kelvin_to_millicelsius() and millicelsius_to_deci_kelvin() in instead of helpers in . This is preparation for centralizing the kelvin to/from Celsius conversion helpers in . Link: http://lkml.kernel.org/r/1576386975-7941-6-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Reviewed-by: Andy Shevchenko Cc: Sujith Thomas Cc: Darren Hart Cc: Andy Shevchenko Cc: Zhang Rui Cc: Daniel Lezcano Cc: Amit Kucheria Cc: Jean Delvare Cc: Guenter Roeck Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Emmanuel Grumbach Cc: Hartmut Knaack Cc: Johannes Berg Cc: Jonathan Cameron Cc: Jonathan Cameron Cc: Kalle Valo Cc: Lars-Peter Clausen Cc: Luca Coelho Cc: Peter Meerwald-Stadler Cc: Stanislaw Gruszka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dccad6f78cd9020844b7ef3f6366d2b77be1ca69 Author: Akinobu Mita Date: Thu Jan 30 22:15:40 2020 -0800 platform/x86: intel_menlow: switch to use helpers This switches the intel_menlow driver to use deci_kelvin_to_celsius() and celsius_to_deci_kelvin() in instead of helpers in . This is preparation for centralizing the kelvin to/from Celsius conversion helpers in . This also removes a trailing space, while we're at it. Link: http://lkml.kernel.org/r/1576386975-7941-5-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Reviewed-by: Andy Shevchenko Cc: Sujith Thomas Cc: Darren Hart Cc: Andy Shevchenko Cc: Zhang Rui Cc: Daniel Lezcano Cc: Amit Kucheria Cc: Jean Delvare Cc: Guenter Roeck Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Emmanuel Grumbach Cc: Hartmut Knaack Cc: Johannes Berg Cc: Jonathan Cameron Cc: Jonathan Cameron Cc: Kalle Valo Cc: Lars-Peter Clausen Cc: Luca Coelho Cc: Peter Meerwald-Stadler Cc: Stanislaw Gruszka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f07b9fdf000e7fee2d8fa7143fd0b736a674cb5d Author: Akinobu Mita Date: Thu Jan 30 22:15:37 2020 -0800 platform/x86: asus-wmi: switch to use helpers The asus-wmi driver doesn't implement the thermal device functionality directly, so including just for DECI_KELVIN_TO_CELSIUS() is a bit odd. This switches the asus-wmi driver to use deci_kelvin_to_millicelsius() in . The format string is changed from %d to %ld due to function returned type. Link: http://lkml.kernel.org/r/1576386975-7941-4-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Acked-by: Andy Shevchenko Cc: Sujith Thomas Cc: Darren Hart Cc: Andy Shevchenko Cc: Zhang Rui Cc: Daniel Lezcano Cc: Amit Kucheria Cc: Jean Delvare Cc: Guenter Roeck Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Emmanuel Grumbach Cc: Hartmut Knaack Cc: Johannes Berg Cc: Jonathan Cameron Cc: Jonathan Cameron Cc: Kalle Valo Cc: Lars-Peter Clausen Cc: Luca Coelho Cc: Peter Meerwald-Stadler Cc: Stanislaw Gruszka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7f49a5cb94e68a0aae4ccd619798daf5a92c0533 Author: Akinobu Mita Date: Thu Jan 30 22:15:33 2020 -0800 ACPI: thermal: switch to use helpers This switches the ACPI thermal zone driver to use celsius_to_deci_kelvin(), deci_kelvin_to_celsius(), and deci_kelvin_to_millicelsius_with_offset() in instead of helpers in . This is preparation for centralizing the kelvin to/from Celsius conversion helpers in . Link: http://lkml.kernel.org/r/1576386975-7941-3-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Cc: Sujith Thomas Cc: Darren Hart Cc: Andy Shevchenko Cc: Zhang Rui Cc: Daniel Lezcano Cc: Amit Kucheria Cc: Jean Delvare Cc: Guenter Roeck Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Andy Shevchenko Cc: Emmanuel Grumbach Cc: Hartmut Knaack Cc: Johannes Berg Cc: Jonathan Cameron Cc: Jonathan Cameron Cc: Kalle Valo Cc: Lars-Peter Clausen Cc: Luca Coelho Cc: Peter Meerwald-Stadler Cc: Stanislaw Gruszka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 23331e4893614deb555c65cdf115c8a28ed32471 Author: Akinobu Mita Date: Thu Jan 30 22:15:28 2020 -0800 include/linux/units.h: add helpers for kelvin to/from Celsius conversion Patch series "add header file for kelvin to/from Celsius conversion helpers", v4. There are several helper macros to convert kelvin to/from Celsius in for thermal drivers. These are useful for any other drivers or subsystems, but it's odd to include just for the helpers. This adds a new that provides the equivalent inline functions for any drivers or subsystems, and switches all the users of conversion helpers in to use helpers. This patch (of 12): There are several helper macros to convert kelvin to/from Celsius in for thermal drivers. These are useful for any other drivers or subsystems, but it's odd to include just for the helpers. This adds a new that provides the equivalent inline functions for any drivers or subsystems. It is intended to replace the helpers in . Link: http://lkml.kernel.org/r/1576386975-7941-2-git-send-email-akinobu.mita@gmail.com Signed-off-by: Akinobu Mita Reviewed-by: Andy Shevchenko Cc: Sujith Thomas Cc: Darren Hart Cc: Zhang Rui Cc: Daniel Lezcano Cc: Amit Kucheria Cc: Jean Delvare Cc: Guenter Roeck Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Kalle Valo Cc: Stanislaw Gruszka Cc: Johannes Berg Cc: Emmanuel Grumbach Cc: Luca Coelho Cc: Jonathan Cameron Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Cc: Andy Shevchenko Cc: Jonathan Cameron Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b82a051c10143639a378dcd12019f2353cc9054 Author: Colin Ian King Date: Thu Jan 30 22:15:25 2020 -0800 drivers/block/zram/zram_drv.c: fix error return codes not being returned in writeback_store Currently when an error code -EIO or -ENOSPC in the for-loop of writeback_store the error code is being overwritten by a ret = len assignment at the end of the function and the error codes are being lost. Fix this by assigning ret = len at the start of the function and remove the assignment from the end, hence allowing ret to be preserved when error codes are assigned to it. Addresses Coverity ("Unused value") Link: http://lkml.kernel.org/r/20191128122958.178290-1-colin.king@canonical.com Fixes: a939888ec38b ("zram: support idle/huge page writeback") Signed-off-by: Colin Ian King Acked-by: Minchan Kim Cc: Sergey Senozhatsky Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 90f82cbfe502e96e602614ebbaf7725470c5208a Author: Taejoon Song Date: Thu Jan 30 22:15:22 2020 -0800 zram: try to avoid worst-case scenario on same element pages The worst-case scenario on finding same element pages is that almost all elements are same at the first glance but only last few elements are different. Since the same element tends to be grouped from the beginning of the pages, if we check the first element with the last element before looping through all elements, we might have some chances to quickly detect non-same element pages. 1. Test is done under LG webOS TV (64-bit arch) 2. Dump the swap-out pages (~819200 pages) 3. Analyze the pages with simple test script which counts the iteration number and measures the speed at off-line Under 64-bit arch, the worst iteration count is PAGE_SIZE / 8 bytes = 512. The speed is based on the time to consume page_same_filled() function only. The result, on average, is listed as below: Num of Iter Speed(MB/s) Looping-Forward (Orig) 38 99265 Looping-Backward 36 102725 Last-element-check (This Patch) 33 125072 The result shows that the average iteration count decreases by 13% and the speed increases by 25% with this patch. This patch does not increase the overall time complexity, though. I also ran simpler version which uses backward loop. Just looping backward also makes some improvement, but less than this patch. [taejoon.song@lge.com: fix off-by-one] Link: http://lkml.kernel.org/r/1578642001-11765-1-git-send-email-taejoon.song@lge.com Link: http://lkml.kernel.org/r/1575424418-16119-1-git-send-email-taejoon.song@lge.com Signed-off-by: Taejoon Song Acked-by: Minchan Kim Cc: Sergey Senozhatsky Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0a3c57729768e08de690ba872dd52ee9c3c11e8b Author: Hao Lee Date: Thu Jan 30 22:15:19 2020 -0800 mm: fix comments related to node reclaim As zone reclaim has been replaced by node reclaim, this patch fixes related comments. Link: http://lkml.kernel.org/r/20191126141346.GA22665@haolee.github.io Signed-off-by: Hao Lee Reviewed-by: Andrew Morton Cc: Anshuman Khandual Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 068964541db6dbacce26e75b390e87e63ad1c100 Author: Anshuman Khandual Date: Thu Jan 30 22:15:16 2020 -0800 include/linux/memory.h: drop fields 'hw' and 'phys_callback' from struct memory_block memory_block structure elements 'hw' and 'phys_callback' are not getting used. This was originally added with commit 3947be1969a9 ("[PATCH] memory hotplug: sysfs and add/remove functions") but never seem to have been used. Just drop them now. Link: http://lkml.kernel.org/r/1576728650-13867-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reviewed-by: Dan Williams Reviewed-by: David Hildenbrand Cc: Michal Hocko Cc: Pavel Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ca023a92c8f753a78c37cc8290bd8e3c54f1a936 Author: Wei Yang Date: Thu Jan 30 22:15:13 2020 -0800 include/linux/mm.h: remove dead code totalram_pages_set() totalram_pages_set() was introduced in commit ca79b0c211af ("mm: convert totalram_pages and totalhigh_pages variables to atomic"), but no one uses it. Link: http://lkml.kernel.org/r/20191218005543.24146-1-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 26b56e116a69e70cc13976a1b0b818036f539f53 Author: Yu Zhao Date: Thu Jan 30 22:15:10 2020 -0800 include/linux/mm.h: clean up obsolete check on space in page->flags The check was intended to make sure we don't overrun page flags. But it's obsolete because it doesn't include LAST_CPUPID_WIDTH nor KASAN_TAG_WIDTH. Just remove check since we already have it covered in linux/page-flags-layout.h (near the end of the file). Link: http://lkml.kernel.org/r/20191208183508.89177-1-yuzhao@google.com Signed-off-by: Yu Zhao Reviewed-by: David Hildenbrand Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 38aeb071b3310866e0e75fec8e5d3c5f0f175cb9 Author: Dan Carpenter Date: Thu Jan 30 22:15:07 2020 -0800 zswap: potential NULL dereference on error in init_zswap() The "pool" pointer can be NULL at the end of the init_zswap(). (We would allocate a new pool later in that situation) So in the error handling then we need to make sure pool is a valid pointer before calling "zswap_pool_destroy(pool);" because that function dereferences the argument. Link: http://lkml.kernel.org/r/20200114050902.og32fkllkod5ycf5@kili.mountain Fixes: 93d4dfa9fbd0 ("mm/zswap.c: add allocation hysteresis if pool limit is hit") Signed-off-by: Dan Carpenter Cc: Vitaly Wool Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 45190f01dd402112d3d22c0ddc4152994f9e1e55 Author: Vitaly Wool Date: Thu Jan 30 22:15:04 2020 -0800 mm/zswap.c: add allocation hysteresis if pool limit is hit zswap will always try to shrink pool when zswap is full. If there is a high pressure on zswap it will result in flipping pages in and out zswap pool without any real benefit, and the overall system performance will drop. The previous discussion on this subject [1] ended up with a suggestion to implement a sort of hysteresis to refuse taking pages into zswap pool until it has sufficient space if the limit has been hit. This is my take on this. Hysteresis is controlled with a sysfs-configurable parameter (namely, /sys/kernel/debug/zswap/accept_threhsold_percent). It specifies the threshold at which zswap would start accepting pages again after it became full. Setting this parameter to 100 disables the hysteresis and sets the zswap behavior to pre-hysteresis state. [1] https://lkml.org/lkml/2019/11/8/949 Link: http://lkml.kernel.org/r/20200108200118.15563-1-vitaly.wool@konsulko.com Signed-off-by: Vitaly Wool Cc: Dan Streetman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3d680bdf60a5bade3e8cbd049927e7f8b1d3fe97 Author: Qian Cai Date: Thu Jan 30 22:15:01 2020 -0800 mm/page_isolation: fix potential warning from user It makes sense to call the WARN_ON_ONCE(zone_idx(zone) == ZONE_MOVABLE) from start_isolate_page_range(), but should avoid triggering it from userspace, i.e, from is_mem_section_removable() because it could crash the system by a non-root user if warn_on_panic is set. While at it, simplify the code a bit by removing an unnecessary jump label. Link: http://lkml.kernel.org/r/20200120163915.1469-1-cai@lca.pw Signed-off-by: Qian Cai Suggested-by: Michal Hocko Acked-by: Michal Hocko Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4a55c0474a92d5c418bcbbe122368de0910aeac2 Author: Qian Cai Date: Thu Jan 30 22:14:57 2020 -0800 mm/hotplug: silence a lockdep splat with printk() It is not that hard to trigger lockdep splats by calling printk from under zone->lock. Most of them are false positives caused by lock chains introduced early in the boot process and they do not cause any real problems (although most of the early boot lock dependencies could happen after boot as well). There are some console drivers which do allocate from the printk context as well and those should be fixed. In any case, false positives are not that trivial to workaround and it is far from optimal to lose lockdep functionality for something that is a non-issue. So change has_unmovable_pages() so that it no longer calls dump_page() itself - instead it returns a "struct page *" of the unmovable page back to the caller so that in the case of a has_unmovable_pages() failure, the caller can call dump_page() after releasing zone->lock. Also, make dump_page() is able to report a CMA page as well, so the reason string from has_unmovable_pages() can be removed. Even though has_unmovable_pages doesn't hold any reference to the returned page this should be reasonably safe for the purpose of reporting the page (dump_page) because it cannot be hotremoved in the context of memory unplug. The state of the page might change but that is the case even with the existing code as zone->lock only plays role for free pages. While at it, remove a similar but unnecessary debug-only printk() as well. A sample of one of those lockdep splats is, WARNING: possible circular locking dependency detected ------------------------------------------------------ test.sh/8653 is trying to acquire lock: ffffffff865a4460 (console_owner){-.-.}, at: console_unlock+0x207/0x750 but task is already holding lock: ffff88883fff3c58 (&(&zone->lock)->rlock){-.-.}, at: __offline_isolated_pages+0x179/0x3e0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&(&zone->lock)->rlock){-.-.}: __lock_acquire+0x5b3/0xb40 lock_acquire+0x126/0x280 _raw_spin_lock+0x2f/0x40 rmqueue_bulk.constprop.21+0xb6/0x1160 get_page_from_freelist+0x898/0x22c0 __alloc_pages_nodemask+0x2f3/0x1cd0 alloc_pages_current+0x9c/0x110 allocate_slab+0x4c6/0x19c0 new_slab+0x46/0x70 ___slab_alloc+0x58b/0x960 __slab_alloc+0x43/0x70 __kmalloc+0x3ad/0x4b0 __tty_buffer_request_room+0x100/0x250 tty_insert_flip_string_fixed_flag+0x67/0x110 pty_write+0xa2/0xf0 n_tty_write+0x36b/0x7b0 tty_write+0x284/0x4c0 __vfs_write+0x50/0xa0 vfs_write+0x105/0x290 redirected_tty_write+0x6a/0xc0 do_iter_write+0x248/0x2a0 vfs_writev+0x106/0x1e0 do_writev+0xd4/0x180 __x64_sys_writev+0x45/0x50 do_syscall_64+0xcc/0x76c entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #2 (&(&port->lock)->rlock){-.-.}: __lock_acquire+0x5b3/0xb40 lock_acquire+0x126/0x280 _raw_spin_lock_irqsave+0x3a/0x50 tty_port_tty_get+0x20/0x60 tty_port_default_wakeup+0xf/0x30 tty_port_tty_wakeup+0x39/0x40 uart_write_wakeup+0x2a/0x40 serial8250_tx_chars+0x22e/0x440 serial8250_handle_irq.part.8+0x14a/0x170 serial8250_default_handle_irq+0x5c/0x90 serial8250_interrupt+0xa6/0x130 __handle_irq_event_percpu+0x78/0x4f0 handle_irq_event_percpu+0x70/0x100 handle_irq_event+0x5a/0x8b handle_edge_irq+0x117/0x370 do_IRQ+0x9e/0x1e0 ret_from_intr+0x0/0x2a cpuidle_enter_state+0x156/0x8e0 cpuidle_enter+0x41/0x70 call_cpuidle+0x5e/0x90 do_idle+0x333/0x370 cpu_startup_entry+0x1d/0x1f start_secondary+0x290/0x330 secondary_startup_64+0xb6/0xc0 -> #1 (&port_lock_key){-.-.}: __lock_acquire+0x5b3/0xb40 lock_acquire+0x126/0x280 _raw_spin_lock_irqsave+0x3a/0x50 serial8250_console_write+0x3e4/0x450 univ8250_console_write+0x4b/0x60 console_unlock+0x501/0x750 vprintk_emit+0x10d/0x340 vprintk_default+0x1f/0x30 vprintk_func+0x44/0xd4 printk+0x9f/0xc5 -> #0 (console_owner){-.-.}: check_prev_add+0x107/0xea0 validate_chain+0x8fc/0x1200 __lock_acquire+0x5b3/0xb40 lock_acquire+0x126/0x280 console_unlock+0x269/0x750 vprintk_emit+0x10d/0x340 vprintk_default+0x1f/0x30 vprintk_func+0x44/0xd4 printk+0x9f/0xc5 __offline_isolated_pages.cold.52+0x2f/0x30a offline_isolated_pages_cb+0x17/0x30 walk_system_ram_range+0xda/0x160 __offline_pages+0x79c/0xa10 offline_pages+0x11/0x20 memory_subsys_offline+0x7e/0xc0 device_offline+0xd5/0x110 state_store+0xc6/0xe0 dev_attr_store+0x3f/0x60 sysfs_kf_write+0x89/0xb0 kernfs_fop_write+0x188/0x240 __vfs_write+0x50/0xa0 vfs_write+0x105/0x290 ksys_write+0xc6/0x160 __x64_sys_write+0x43/0x50 do_syscall_64+0xcc/0x76c entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: console_owner --> &(&port->lock)->rlock --> &(&zone->lock)->rlock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&(&zone->lock)->rlock); lock(&(&port->lock)->rlock); lock(&(&zone->lock)->rlock); lock(console_owner); *** DEADLOCK *** 9 locks held by test.sh/8653: #0: ffff88839ba7d408 (sb_writers#4){.+.+}, at: vfs_write+0x25f/0x290 #1: ffff888277618880 (&of->mutex){+.+.}, at: kernfs_fop_write+0x128/0x240 #2: ffff8898131fc218 (kn->count#115){.+.+}, at: kernfs_fop_write+0x138/0x240 #3: ffffffff86962a80 (device_hotplug_lock){+.+.}, at: lock_device_hotplug_sysfs+0x16/0x50 #4: ffff8884374f4990 (&dev->mutex){....}, at: device_offline+0x70/0x110 #5: ffffffff86515250 (cpu_hotplug_lock.rw_sem){++++}, at: __offline_pages+0xbf/0xa10 #6: ffffffff867405f0 (mem_hotplug_lock.rw_sem){++++}, at: percpu_down_write+0x87/0x2f0 #7: ffff88883fff3c58 (&(&zone->lock)->rlock){-.-.}, at: __offline_isolated_pages+0x179/0x3e0 #8: ffffffff865a4920 (console_lock){+.+.}, at: vprintk_emit+0x100/0x340 stack backtrace: Hardware name: HPE ProLiant DL560 Gen10/ProLiant DL560 Gen10, BIOS U34 05/21/2019 Call Trace: dump_stack+0x86/0xca print_circular_bug.cold.31+0x243/0x26e check_noncircular+0x29e/0x2e0 check_prev_add+0x107/0xea0 validate_chain+0x8fc/0x1200 __lock_acquire+0x5b3/0xb40 lock_acquire+0x126/0x280 console_unlock+0x269/0x750 vprintk_emit+0x10d/0x340 vprintk_default+0x1f/0x30 vprintk_func+0x44/0xd4 printk+0x9f/0xc5 __offline_isolated_pages.cold.52+0x2f/0x30a offline_isolated_pages_cb+0x17/0x30 walk_system_ram_range+0xda/0x160 __offline_pages+0x79c/0xa10 offline_pages+0x11/0x20 memory_subsys_offline+0x7e/0xc0 device_offline+0xd5/0x110 state_store+0xc6/0xe0 dev_attr_store+0x3f/0x60 sysfs_kf_write+0x89/0xb0 kernfs_fop_write+0x188/0x240 __vfs_write+0x50/0xa0 vfs_write+0x105/0x290 ksys_write+0xc6/0x160 __x64_sys_write+0x43/0x50 do_syscall_64+0xcc/0x76c entry_SYSCALL_64_after_hwframe+0x49/0xbe Link: http://lkml.kernel.org/r/20200117181200.20299-1-cai@lca.pw Signed-off-by: Qian Cai Reviewed-by: David Hildenbrand Cc: Michal Hocko Cc: Sergey Senozhatsky Cc: Petr Mladek Cc: Steven Rostedt (VMware) Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bd5c2344f9eb1ebf7ff2501ddb13d83151939780 Author: David Hildenbrand Date: Thu Jan 30 22:14:54 2020 -0800 mm/memory_hotplug: pass in nid to online_pages() Patch series "mm/memory_hotplug: pass in nid to online_pages()". Simplify onlining code and get rid of find_memory_block(). Pass in the nid from the memory block we are trying to online directly, instead of manually looking it up. This patch (of 2): No need to lookup the memory block, we can directly pass in the nid. Link: http://lkml.kernel.org/r/20200113113354.6341-2-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Andrew Morton Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Michal Hocko Cc: Oscar Salvador Cc: Anshuman Khandual Cc: Dan Williams Cc: Pavel Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a67c8caae98f165d4b2caf73a5b32343524bc037 Author: Miaohe Lin Date: Thu Jan 30 22:14:51 2020 -0800 mm/mmap.c: get rid of odd jump labels in find_mergeable_anon_vma() The jump labels try_prev and none are not really needed in find_mergeable_anon_vma(), eliminate them to improve readability. Link: http://lkml.kernel.org/r/1574079844-17493-1-git-send-email-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: David Hildenbrand Reviewed-by: John Hubbard Reviewed-by: Wei Yang Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f42f25526502d851d0e3ca1e46297da8aafce8a7 Author: David Rientjes Date: Thu Jan 30 22:14:48 2020 -0800 mm, thp: fix defrag setting if newline is not used If thp defrag setting "defer" is used and a newline is *not* used when writing to the sysfs file, this is interpreted as the "defer+madvise" option. This is because we do prefix matching and if five characters are written without a newline, the current code ends up comparing to the first five bytes of the "defer+madvise" option and using that instead. Use the more appropriate sysfs_streq() that handles the trailing newline for us. Since this doubles as a nice cleanup, do it in enabled_store() as well. The current implementation relies on prefix matching: the number of bytes compared is either the number of bytes written or the length of the option being compared. With a newline, "defer\n" does not match "defer+"madvise"; without a newline, however, "defer" is considered to match "defer+madvise" (prefix matching is only comparing the first five bytes). End result is that writing "defer" is broken unless it has an additional trailing character. This means that writing "madv" in the past would match and set "madvise". With strict checking, that no longer is the case but it is unlikely anybody is currently doing this. Link: http://lkml.kernel.org/r/alpine.DEB.2.21.2001171411020.56385@chino.kir.corp.google.com Fixes: 21440d7eb904 ("mm, thp: add new defer+madvise defrag option") Signed-off-by: David Rientjes Suggested-by: Andrew Morton Acked-by: Vlastimil Babka Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 34290e2c6419d3a61391416b5ab6ceb37f857fde Author: Ralph Campbell Date: Thu Jan 30 22:14:44 2020 -0800 mm/migrate: add stable check in migrate_vma_insert_page() migrate_vma_insert_page() closely follows the code in: __handle_mm_fault() handle_pte_fault() do_anonymous_page() Add a call to check_stable_address_space() after locking the page table entry before inserting a ZONE_DEVICE private zero page mapping similar to page faulting a new anonymous page. Link: http://lkml.kernel.org/r/20200107211208.24595-4-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Reviewed-by: Christoph Hellwig Cc: Jerome Glisse Cc: John Hubbard Cc: Jason Gunthorpe Cc: Bharata B Rao Cc: Michal Hocko Cc: Chris Down Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c23a0c99793fb7e2daac0f8fc7ff3bd7d77c9250 Author: Ralph Campbell Date: Thu Jan 30 22:14:41 2020 -0800 mm/migrate: clean up some minor coding style Fix some comment typos and coding style clean up in preparation for the next patch. No functional changes. Link: http://lkml.kernel.org/r/20200107211208.24595-3-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Acked-by: Chris Down Reviewed-by: Christoph Hellwig Cc: Jerome Glisse Cc: John Hubbard Cc: Jason Gunthorpe Cc: Bharata B Rao Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 872ea707511ad43afe202f401ccb8de01e2b2a3b Author: Ralph Campbell Date: Thu Jan 30 22:14:38 2020 -0800 mm/migrate: remove useless mask of start address Addresses passed to walk_page_range() callback functions are already page aligned and don't need to be masked with PAGE_MASK. Link: http://lkml.kernel.org/r/20200107211208.24595-2-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Reviewed-by: Christoph Hellwig Cc: Jerome Glisse Cc: John Hubbard Cc: Jason Gunthorpe Cc: Bharata B Rao Cc: Michal Hocko Cc: Chris Down Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit afb971729a0bca7676606013e913025bc5619301 Author: Wei Yang Date: Thu Jan 30 22:14:35 2020 -0800 mm/huge_memory.c: reduce critical section protected by split_queue_lock split_queue_lock protects data in struct deferred_split. We can release the lock after delete the page from deferred_split_queue. This patch moves the THP accounting out of the lock protection, which is introduced in commit 65c453778aea ("mm, rmap: account shmem thp pages"). Link: http://lkml.kernel.org/r/20200110025516.23996-1-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Reviewed-by: Andrew Morton Acked-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a8803e6c177f490fe5624397b07f4eb05a15f532 Author: Wei Yang Date: Thu Jan 30 22:14:32 2020 -0800 mm/huge_memory.c: use head to emphasize the purpose of page During split huge page, it checks the property of the page. Currently we do the check on page and head without emphasizing the check is on the compound page. In case the page passed to split_huge_page_to_list is a tail page, audience would take some time to think about whether the check is on compound page or tail page itself. To make it explicit, use head instead of page for those checks. After this, audience would be more clear about the checks are on compound page and the page is used to do the split and dump error message if failed. Link: http://lkml.kernel.org/r/20200110032610.26499-2-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Acked-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cb829624867b5ab10bc6a7036d183b1b82bfe9f8 Author: Wei Yang Date: Thu Jan 30 22:14:29 2020 -0800 mm/huge_memory.c: use head to check huge zero page The page could be a tail page, if this is the case, this BUG_ON will never be triggered. Link: http://lkml.kernel.org/r/20200110032610.26499-1-richardw.yang@linux.intel.com Fixes: e9b61f19858a ("thp: reintroduce split_huge_page()") Signed-off-by: Wei Yang Acked-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8a7ff02acabbd877669fecb0a2e75d0930b62c85 Author: David Rientjes Date: Thu Jan 30 22:14:26 2020 -0800 mm, oom: dump stack of victim when reaping failed When a process cannot be oom reaped, for whatever reason, currently the list of locks that are held is currently dumped to the kernel log. Much more interesting is the stack trace of the victim that cannot be reaped. If the stack trace is dumped, we have the ability to find related occurrences in the same kernel code and hopefully solve the issue that is making it wedged. Dump the stack trace when a process fails to be oom reaped. Link: http://lkml.kernel.org/r/alpine.DEB.2.21.2001141519280.200484@chino.kir.corp.google.com Signed-off-by: David Rientjes Acked-by: Michal Hocko Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a090d711dd2ebd7e445bf09f98a4feba6c22f2ff Author: Anshuman Khandual Date: Thu Jan 30 22:14:23 2020 -0800 memblock: Use __func__ in remaining memblock_dbg() call sites Replace open function name strings with %s (__func__) in all remaining memblock_dbg() call sites. Link: http://lkml.kernel.org/r/1578285510-28261-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reviewed-by: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 02634a44b8aba2d4f16ea09d3c17400d9320327e Author: Anshuman Khandual Date: Thu Jan 30 22:14:20 2020 -0800 mm/memblock: define memblock_physmem_add() On the s390 platform memblock.physmem array is being built by directly calling into memblock_add_range() which is a low level function not intended to be used outside of memblock. Hence lets conditionally add helper functions for physmem array when HAVE_MEMBLOCK_PHYS_MAP is enabled. Also use MAX_NUMNODES instead of 0 as node ID similar to memblock_add() and memblock_reserve(). Make memblock_add_range() a static function as it is no longer getting used outside of memblock. Link: http://lkml.kernel.org/r/1578283835-21969-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Reviewed-by: Mike Rapoport Acked-by: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Martin Schwidefsky Cc: Collin Walling Cc: Gerald Schaefer Cc: Philipp Rudo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e25974aa72a0303a20e9b6a3f3cb32e1873889a8 Author: Daniel Wagner Date: Thu Jan 30 22:14:17 2020 -0800 tools/vm/slabinfo: fix sanity checks enabling The sysfs file name for enabling sanity checking is called 'sanity_checks' and not 'sanity'. The name of the file has never changed since the introduction of the slub allocator. Obviously, most people turn the checks on via the command line option and not during runtime using slabinfo. Link: http://lkml.kernel.org/r/20200116131642.642-1-dwagner@suse.de Signed-off-by: Daniel Wagner Reviewed-by: Andrew Morton Cc: "Tobin C. Harding" Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 648b5cf368e06c783d3cd13776645a60317cca13 Author: Alex Shi Date: Thu Jan 30 22:14:14 2020 -0800 mm/vmscan: remove unused RECLAIM_OFF/RECLAIM_ZONE Commit 1b2ffb7896ad ("[PATCH] Zone reclaim: Allow modification of zone reclaim behavior")' defined RECLAIM_OFF/RECLAIM_ZONE, but never use them, so better to remove them. [dwagner@suse.de: fix sanity checks enabling] Link: http://lkml.kernel.org/r/20200116131642.642-1-dwagner@suse.de [akpm@linux-foundation.org: renumber the bits for neatness] Link: http://lkml.kernel.org/r/1579005573-58923-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Signed-off-by: Daniel Wagner Reviewed-by: Andrew Morton Cc: "Tobin C. Harding" Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fffbacc1ec28f07e6f26df00b9eff012c3141048 Author: Alex Shi Date: Thu Jan 30 22:14:10 2020 -0800 mm/vmscan: remove prefetch_prev_lru_page This macro was never used in git history. So better to remove. Link: http://lkml.kernel.org/r/1579006500-127143-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Reviewed-by: Andrew Morton Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6c9e0907fc8bc978e97bb78bbbc6e9bc8fc51cb3 Author: Liu Song Date: Thu Jan 30 22:14:08 2020 -0800 mm/vmscan.c: remove unused return value of shrink_node The return value of shrink_node is not used, so remove unnecessary operations. Link: http://lkml.kernel.org/r/20191128143524.3223-1-fishland@aliyun.com Signed-off-by: Liu Song Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fe4c86c916d9151113372369f322e7436167e6f3 Author: David Hildenbrand Date: Thu Jan 30 22:14:04 2020 -0800 mm: remove "count" parameter from has_unmovable_pages() Now that the memory isolate notifier is gone, the parameter is always 0. Drop it and cleanup has_unmovable_pages(). Link: http://lkml.kernel.org/r/20191114131911.11783-3-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Michal Hocko Cc: Oscar Salvador Cc: Anshuman Khandual Cc: Qian Cai Cc: Pingfan Liu Cc: Stephen Rothwell Cc: Dan Williams Cc: Pavel Tatashin Cc: Vlastimil Babka Cc: Mel Gorman Cc: Mike Rapoport Cc: Wei Yang Cc: Alexander Duyck Cc: Alexander Potapenko Cc: Arun KS Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3f9903b9ca5e981b5862d7b10086d0e8caa20298 Author: David Hildenbrand Date: Thu Jan 30 22:14:01 2020 -0800 mm: remove the memory isolate notifier Luckily, we have no users left, so we can get rid of it. Cleanup set_migratetype_isolate() a little bit. Link: http://lkml.kernel.org/r/20191114131911.11783-2-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Greg Kroah-Hartman Acked-by: Michal Hocko Cc: "Rafael J. Wysocki" Cc: Pavel Tatashin Cc: Dan Williams Cc: Oscar Salvador Cc: Qian Cai Cc: Anshuman Khandual Cc: Pingfan Liu Cc: Michael Ellerman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3f1353552e256cb3bf0f23334c48f50476044673 Author: Kirill A. Shutemov Date: Thu Jan 30 22:13:57 2020 -0800 mm/page_alloc: skip non present sections on zone initialization memmap_init_zone() can be called on the ranges with holes during the boot. It will skip any non-valid PFNs one-by-one. It works fine as long as holes are not too big. But huge holes in the memory map causes a problem. It takes over 20 seconds to walk 32TiB hole. x86-64 with 5-level paging allows for much larger holes in the memory map which would practically hang the system. Deferred struct page init doesn't help here. It only works on the present ranges. Skipping non-present sections would fix the issue. Link: http://lkml.kernel.org/r/20191230093828.24613-1-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Reviewed-by: Baoquan He Acked-by: Michal Hocko Cc: Dan Williams Cc: Vlastimil Babka Cc: Mel Gorman Cc: "Jin, Zhi" Cc: David Hildenbrand Cc: Michal Hocko Cc: Oscar Salvador Cc: Pavel Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7b69d79f94d42ac26a5397a07b9d78b066c400aa Author: Andy Shevchenko Date: Thu Jan 30 22:13:54 2020 -0800 mm/early_ioremap.c: use %pa to print resource_size_t variables %pa takes into consideration the special types such as resource_size_t. Use this specifier %instead of explicit casting. Link: http://lkml.kernel.org/r/20191209165413.56263-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Reviewed-by: David Hildenbrand Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3e21d9a501bf99aee2e5835d7f34d8c823f115b5 Author: Gustavo A. R. Silva Date: Thu Jan 30 22:13:51 2020 -0800 lib/test_kasan.c: fix memory leak in kmalloc_oob_krealloc_more() In case memory resources for _ptr2_ were allocated, release them before return. Notice that in case _ptr1_ happens to be NULL, krealloc() behaves exactly like kmalloc(). Addresses-Coverity-ID: 1490594 ("Resource leak") Link: http://lkml.kernel.org/r/20200123160115.GA4202@embeddedor Fixes: 3f15801cdc23 ("lib: add kasan test module") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Dmitry Vyukov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7e168b9babab254c3f9a6c7ed100faee73d493f8 Author: Junyong Sun Date: Thu Jan 30 22:13:48 2020 -0800 mm, tracing: print symbol name for kmem_alloc_node call_site events Print the call_site ip of kmem_alloc_node using '%pS' to improve the readability of raw slab trace points. Link: http://lkml.kernel.org/r/1577949568-4518-1-git-send-email-sunjunyong@xiaomi.com Signed-off-by: Junyong Sun Acked-by: Steven Rostedt (VMware) Cc: Ingo Molnar Cc: Joel Fernandes (Google) Cc: Changbin Du Cc: Tim Murray Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5b8d6e37b519e455661cd847654c2e6ad20b4b1d Author: Li Xinhai Date: Thu Jan 30 22:13:45 2020 -0800 mm/page_vma_mapped.c: explicitly compare pfn for normal, hugetlbfs and THP page When check_pte, pfn of normal, hugetlbfs and THP page need be compared. The current implementation apply comparison as - normal 4K page: page_pfn <= pfn < page_pfn + 1 - hugetlbfs page: page_pfn <= pfn < page_pfn + HPAGE_PMD_NR - THP page: page_pfn <= pfn < page_pfn + HPAGE_PMD_NR in pfn_in_hpage. For hugetlbfs page, it should be page_pfn == pfn Now, change pfn_in_hpage to pfn_is_match to highlight that comparison is not only for THP and explicitly compare for these cases. No impact upon current behavior, just make the code clear. I think it is important to make the code clear - comparing hugetlbfs page in range page_pfn <= pfn < page_pfn + HPAGE_PMD_NR is confusing. Link: http://lkml.kernel.org/r/1578737885-8890-1-git-send-email-lixinhai.lxh@gmail.com Signed-off-by: Li Xinhai Acked-by: Kirill A. Shutemov Acked-by: Mike Kravetz Cc: Kirill A. Shutemov Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 92855270ff0827865109447b59e7e5df9c2bef68 Author: Kaitao Cheng Date: Thu Jan 30 22:13:42 2020 -0800 mm/memcontrol.c: cleanup some useless code Compound pages handling in mem_cgroup_migrate is more convoluted than necessary. The state is duplicated in compound variable and the same could be achieved by PageTransHuge check which is trivial and hpage_nr_pages is already PageTransHuge aware. It is much simpler to just use hpage_nr_pages for nr_pages and replace the local variable by PageTransHuge check directly Link: http://lkml.kernel.org/r/20191210160450.3395-1-pilgrimtao@gmail.com Signed-off-by: Kaitao Cheng Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 10c8d69f314d557d94d74ec492575ae6a4f1eb1c Author: Vasily Averin Date: Thu Jan 30 22:13:39 2020 -0800 mm/swapfile.c: swap_next should increase position index If seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. In Aug 2018 NeilBrown noticed commit 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code and interface") "Some ->next functions do not increment *pos when they return NULL... Note that such ->next functions are buggy and should be fixed. A simple demonstration is dd if=/proc/swaps bs=1000 skip=1 Choose any block size larger than the size of /proc/swaps. This will always show the whole last line of /proc/swaps" Described problem is still actual. If you make lseek into middle of last output line following read will output end of last line and whole last line once again. $ dd if=/proc/swaps bs=1 # usual output Filename Type Size Used Priority /dev/dm-0 partition 4194812 97536 -2 104+0 records in 104+0 records out 104 bytes copied $ dd if=/proc/swaps bs=40 skip=1 # last line was generated twice dd: /proc/swaps: cannot skip to specified offset v/dm-0 partition 4194812 97536 -2 /dev/dm-0 partition 4194812 97536 -2 3+1 records in 3+1 records out 131 bytes copied https://bugzilla.kernel.org/show_bug.cgi?id=206283 Link: http://lkml.kernel.org/r/bd8cfd7b-ac95-9b91-f9e7-e8438bd5047d@virtuozzo.com Signed-off-by: Vasily Averin Reviewed-by: Andrew Morton Cc: Jann Horn Cc: Alexander Viro Cc: Kees Cook Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f1f6a7dd9b53aafd81b696b9017036e7b08e57ea Author: John Hubbard Date: Thu Jan 30 22:13:35 2020 -0800 mm, tree-wide: rename put_user_page*() to unpin_user_page*() In order to provide a clearer, more symmetric API for pinning and unpinning DMA pages. This way, pin_user_pages*() calls match up with unpin_user_pages*() calls, and the API is a lot closer to being self-explanatory. Link: http://lkml.kernel.org/r/20200107224558.2362728-23-jhubbard@nvidia.com Signed-off-by: John Hubbard Reviewed-by: Jan Kara Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Dan Williams Cc: Hans Verkuil Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jerome Glisse Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bdffe23eee672fcaa732198c3661f7c1302c6bfa Author: John Hubbard Date: Thu Jan 30 22:13:32 2020 -0800 mm/gup_benchmark: use proper FOLL_WRITE flags instead of hard-coding "1" Fix the gup benchmark flags to use the symbolic FOLL_WRITE, instead of a hard-coded "1" value. Also, clean up the filtering of gup flags a little, by just doing it once before issuing any of the get_user_pages*() calls. This makes it harder to overlook, instead of having little "gup_flags & 1" phrases in the function calls. Link: http://lkml.kernel.org/r/20200107224558.2362728-22-jhubbard@nvidia.com Signed-off-by: John Hubbard Reviewed-by: Ira Weiny Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Dan Williams Cc: Hans Verkuil Cc: Jan Kara Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jerome Glisse Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aa4b87fe9ea34a1816dcb99c537d5726b80ed452 Author: John Hubbard Date: Thu Jan 30 22:13:28 2020 -0800 powerpc: book3s64: convert to pin_user_pages() and put_user_page() 1. Convert from get_user_pages() to pin_user_pages(). 2. As required by pin_user_pages(), release these pages via put_user_page(). Link: http://lkml.kernel.org/r/20200107224558.2362728-21-jhubbard@nvidia.com Signed-off-by: John Hubbard Reviewed-by: Jan Kara Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Dan Williams Cc: Hans Verkuil Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jerome Glisse Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 19fed0dae94dbe66235c116a0e058712d8bc291c Author: John Hubbard Date: Thu Jan 30 22:13:24 2020 -0800 vfio, mm: pin_user_pages (FOLL_PIN) and put_user_page() conversion 1. Change vfio from get_user_pages_remote(), to pin_user_pages_remote(). 2. Because all FOLL_PIN-acquired pages must be released via put_user_page(), also convert the put_page() call over to put_user_pages_dirty_lock(). Note that this effectively changes the code's behavior in vfio_iommu_type1.c: put_pfn(): it now ultimately calls set_page_dirty_lock(), instead of set_page_dirty(). This is probably more accurate. As Christoph Hellwig put it, "set_page_dirty() is only safe if we are dealing with a file backed page where we have reference on the inode it hangs off." [1] [1] https://lore.kernel.org/r/20190723153640.GB720@lst.de Link: http://lkml.kernel.org/r/20200107224558.2362728-20-jhubbard@nvidia.com Signed-off-by: John Hubbard Tested-by: Alex Williamson Acked-by: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Dan Williams Cc: Hans Verkuil Cc: Ira Weiny Cc: Jan Kara Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jerome Glisse Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1f815afcfca703f48143bf962cf7bdbcf4474df2 Author: John Hubbard Date: Thu Jan 30 22:13:20 2020 -0800 media/v4l2-core: pin_user_pages (FOLL_PIN) and put_user_page() conversion 1. Change v4l2 from get_user_pages() to pin_user_pages(). 2. Because all FOLL_PIN-acquired pages must be released via put_user_page(), also convert the put_page() call over to put_user_pages_dirty_lock(). Link: http://lkml.kernel.org/r/20200107224558.2362728-19-jhubbard@nvidia.com Signed-off-by: John Hubbard Acked-by: Hans Verkuil Cc: Ira Weiny Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Dan Williams Cc: Jan Kara Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jerome Glisse Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fb48b4746a5d77f352b8c1f793e2a6f4211c8ec2 Author: John Hubbard Date: Thu Jan 30 22:13:17 2020 -0800 net/xdp: set FOLL_PIN via pin_user_pages() Convert net/xdp to use the new pin_longterm_pages() call, which sets FOLL_PIN. Setting FOLL_PIN is now required for code that requires tracking of pinned pages. In partial anticipation of this work, the net/xdp code was already calling put_user_page() instead of put_page(). Therefore, in order to convert from the get_user_pages()/put_page() model, to the pin_user_pages()/put_user_page() model, the only change required here is to change get_user_pages() to pin_user_pages(). Link: http://lkml.kernel.org/r/20200107224558.2362728-18-jhubbard@nvidia.com Signed-off-by: John Hubbard Acked-by: Björn Töpel Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Dan Williams Cc: Hans Verkuil Cc: Ira Weiny Cc: Jan Kara Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jerome Glisse Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2113b05d039e9213216ec647df58c5a43593631b Author: John Hubbard Date: Thu Jan 30 22:13:13 2020 -0800 fs/io_uring: set FOLL_PIN via pin_user_pages() Convert fs/io_uring to use the new pin_user_pages() call, which sets FOLL_PIN. Setting FOLL_PIN is now required for code that requires tracking of pinned pages, and therefore for any code that calls put_user_page(). In partial anticipation of this work, the io_uring code was already calling put_user_page() instead of put_page(). Therefore, in order to convert from the get_user_pages()/put_page() model, to the pin_user_pages()/put_user_page() model, the only change required here is to change get_user_pages() to pin_user_pages(). Link: http://lkml.kernel.org/r/20200107224558.2362728-17-jhubbard@nvidia.com Signed-off-by: John Hubbard Reviewed-by: Jens Axboe Reviewed-by: Jan Kara Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Dan Williams Cc: Hans Verkuil Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a5adf0a08b076f99a06e141d9884994ef8bd17cb Author: John Hubbard Date: Thu Jan 30 22:13:09 2020 -0800 drm/via: set FOLL_PIN via pin_user_pages_fast() Convert drm/via to use the new pin_user_pages_fast() call, which sets FOLL_PIN. Setting FOLL_PIN is now required for code that requires tracking of pinned pages, and therefore for any code that calls put_user_page(). In partial anticipation of this work, the drm/via driver was already calling put_user_page() instead of put_page(). Therefore, in order to convert from the get_user_pages()/put_page() model, to the pin_user_pages()/put_user_page() model, the only change required is to change get_user_pages() to pin_user_pages(). Link: http://lkml.kernel.org/r/20200107224558.2362728-16-jhubbard@nvidia.com Signed-off-by: John Hubbard Acked-by: Daniel Vetter Reviewed-by: Jérôme Glisse Reviewed-by: Ira Weiny Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Christoph Hellwig Cc: Dan Williams Cc: Hans Verkuil Cc: Jan Kara Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 803e4572d7c5db03cbc155e9dd0530f50ebba336 Author: John Hubbard Date: Thu Jan 30 22:13:05 2020 -0800 mm/process_vm_access: set FOLL_PIN via pin_user_pages_remote() Convert process_vm_access to use the new pin_user_pages_remote() call, which sets FOLL_PIN. Setting FOLL_PIN is now required for code that requires tracking of pinned pages. Also, release the pages via put_user_page*(). Also, rename "pages" to "pinned_pages", as this makes for easier reading of process_vm_rw_single_vec(). Link: http://lkml.kernel.org/r/20200107224558.2362728-15-jhubbard@nvidia.com Signed-off-by: John Hubbard Reviewed-by: Jan Kara Reviewed-by: Jérôme Glisse Reviewed-by: Ira Weiny Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Dan Williams Cc: Hans Verkuil Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dfa0a4fff11b32740c67fb0baf219702b978fc51 Author: John Hubbard Date: Thu Jan 30 22:13:02 2020 -0800 IB/{core,hw,umem}: set FOLL_PIN via pin_user_pages*(), fix up ODP Convert infiniband to use the new pin_user_pages*() calls. Also, revert earlier changes to Infiniband ODP that had it using put_user_page(). ODP is "Case 3" in Documentation/core-api/pin_user_pages.rst, which is to say, normal get_user_pages() and put_page() is the API to use there. The new pin_user_pages*() calls replace corresponding get_user_pages*() calls, and set the FOLL_PIN flag. The FOLL_PIN flag requires that the caller must return the pages via put_user_page*() calls, but infiniband was already doing that as part of an earlier commit. Link: http://lkml.kernel.org/r/20200107224558.2362728-14-jhubbard@nvidia.com Signed-off-by: John Hubbard Reviewed-by: Jason Gunthorpe Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Dan Williams Cc: Hans Verkuil Cc: Ira Weiny Cc: Jan Kara Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jerome Glisse Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 57459435cff564cc4c3f863419b32839c2e431f3 Author: John Hubbard Date: Thu Jan 30 22:12:58 2020 -0800 goldish_pipe: convert to pin_user_pages() and put_user_page() 1. Call the new global pin_user_pages_fast(), from pin_goldfish_pages(). 2. As required by pin_user_pages(), release these pages via put_user_page(). In this case, do so via put_user_pages_dirty_lock(). That has the side effect of calling set_page_dirty_lock(), instead of set_page_dirty(). This is probably more accurate. As Christoph Hellwig put it, "set_page_dirty() is only safe if we are dealing with a file backed page where we have reference on the inode it hangs off." [1] Another side effect is that the release code is simplified because the page[] loop is now in gup.c instead of here, so just delete the local release_user_pages() entirely, and call put_user_pages_dirty_lock() directly, instead. [1] https://lore.kernel.org/r/20190723153640.GB720@lst.de Link: http://lkml.kernel.org/r/20200107224558.2362728-13-jhubbard@nvidia.com Signed-off-by: John Hubbard Reviewed-by: Jan Kara Reviewed-by: Ira Weiny Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Dan Williams Cc: Hans Verkuil Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jerome Glisse Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eddb1c228f7951d399240a0cc57455dccc7f8777 Author: John Hubbard Date: Thu Jan 30 22:12:54 2020 -0800 mm/gup: introduce pin_user_pages*() and FOLL_PIN Introduce pin_user_pages*() variations of get_user_pages*() calls, and also pin_longterm_pages*() variations. For now, these are placeholder calls, until the various call sites are converted to use the correct get_user_pages*() or pin_user_pages*() API. These variants will eventually all set FOLL_PIN, which is also introduced, and thoroughly documented. pin_user_pages() pin_user_pages_remote() pin_user_pages_fast() All pages that are pinned via the above calls, must be unpinned via put_user_page(). The underlying rules are: * FOLL_PIN is a gup-internal flag, so the call sites should not directly set it. That behavior is enforced with assertions. * Call sites that want to indicate that they are going to do DirectIO ("DIO") or something with similar characteristics, should call a get_user_pages()-like wrapper call that sets FOLL_PIN. These wrappers will: * Start with "pin_user_pages" instead of "get_user_pages". That makes it easy to find and audit the call sites. * Set FOLL_PIN * For pages that are received via FOLL_PIN, those pages must be returned via put_user_page(). Thanks to Jan Kara and Vlastimil Babka for explaining the 4 cases in this documentation. (I've reworded it and expanded upon it.) Link: http://lkml.kernel.org/r/20200107224558.2362728-12-jhubbard@nvidia.com Signed-off-by: John Hubbard Reviewed-by: Jan Kara Reviewed-by: Mike Rapoport [Documentation] Reviewed-by: Jérôme Glisse Cc: Jonathan Corbet Cc: Ira Weiny Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Dan Williams Cc: Hans Verkuil Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3c7470b6f68434acae459482ab920d1e3fabd1c7 Author: John Hubbard Date: Thu Jan 30 22:12:50 2020 -0800 media/v4l2-core: set pages dirty upon releasing DMA buffers After DMA is complete, and the device and CPU caches are synchronized, it's still required to mark the CPU pages as dirty, if the data was coming from the device. However, this driver was just issuing a bare put_page() call, without any set_page_dirty*() call. Fix the problem, by calling set_page_dirty_lock() if the CPU pages were potentially receiving data from the device. Link: http://lkml.kernel.org/r/20200107224558.2362728-11-jhubbard@nvidia.com Signed-off-by: John Hubbard Reviewed-by: Christoph Hellwig Acked-by: Hans Verkuil Cc: Mauro Carvalho Chehab Cc: Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Daniel Vetter Cc: Dan Williams Cc: Ira Weiny Cc: Jan Kara Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jerome Glisse Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4789fcdd14095281952b5dd19a928d5d8b279e90 Author: John Hubbard Date: Thu Jan 30 22:12:47 2020 -0800 IB/umem: use get_user_pages_fast() to pin DMA pages And get rid of the mmap_sem calls, as part of that. Note that get_user_pages_fast() will, if necessary, fall back to __gup_longterm_unlocked(), which takes the mmap_sem as needed. Link: http://lkml.kernel.org/r/20200107224558.2362728-10-jhubbard@nvidia.com Signed-off-by: John Hubbard Reviewed-by: Leon Romanovsky Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Jason Gunthorpe Reviewed-by: Ira Weiny Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Daniel Vetter Cc: Dan Williams Cc: Hans Verkuil Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jerome Glisse Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f4000fdf435b8301a11cf85237c561047f8c4c72 Author: John Hubbard Date: Thu Jan 30 22:12:43 2020 -0800 mm/gup: allow FOLL_FORCE for get_user_pages_fast() Commit 817be129e6f2 ("mm: validate get_user_pages_fast flags") allowed only FOLL_WRITE and FOLL_LONGTERM to be passed to get_user_pages_fast(). This, combined with the fact that get_user_pages_fast() falls back to "slow gup", which *does* accept FOLL_FORCE, leads to an odd situation: if you need FOLL_FORCE, you cannot call get_user_pages_fast(). There does not appear to be any reason for filtering out FOLL_FORCE. There is nothing in the _fast() implementation that requires that we avoid writing to the pages. So it appears to have been an oversight. Fix by allowing FOLL_FORCE to be set for get_user_pages_fast(). Link: http://lkml.kernel.org/r/20200107224558.2362728-9-jhubbard@nvidia.com Fixes: 817be129e6f2 ("mm: validate get_user_pages_fast flags") Signed-off-by: John Hubbard Reviewed-by: Leon Romanovsky Reviewed-by: Jan Kara Cc: Christoph Hellwig Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Daniel Vetter Cc: Dan Williams Cc: Hans Verkuil Cc: Ira Weiny Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jerome Glisse Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3567813eae5e9b4d02dc227e2060e85abc912045 Author: John Hubbard Date: Thu Jan 30 22:12:39 2020 -0800 vfio: fix FOLL_LONGTERM use, simplify get_user_pages_remote() call Update VFIO to take advantage of the recently loosened restriction on FOLL_LONGTERM with get_user_pages_remote(). Also, now it is possible to fix a bug: the VFIO caller is logically a FOLL_LONGTERM user, but it wasn't setting FOLL_LONGTERM. Also, remove an unnessary pair of calls that were releasing and reacquiring the mmap_sem. There is no need to avoid holding mmap_sem just in order to call page_to_pfn(). Also, now that the the DAX check ("if a VMA is DAX, don't allow long term pinning") is in the internals of get_user_pages_remote() and __gup_longterm_locked(), there's no need for it at the VFIO call site. So remove it. Link: http://lkml.kernel.org/r/20200107224558.2362728-8-jhubbard@nvidia.com Signed-off-by: John Hubbard Tested-by: Alex Williamson Acked-by: Alex Williamson Reviewed-by: Jason Gunthorpe Reviewed-by: Ira Weiny Suggested-by: Jason Gunthorpe Cc: Dan Williams Cc: Jerome Glisse Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Hans Verkuil Cc: Jan Kara Cc: Jens Axboe Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c4237f8b1f4f2857c3079c99f69d971f883dd69c Author: John Hubbard Date: Thu Jan 30 22:12:36 2020 -0800 mm: fix get_user_pages_remote()'s handling of FOLL_LONGTERM As it says in the updated comment in gup.c: current FOLL_LONGTERM behavior is incompatible with FAULT_FLAG_ALLOW_RETRY because of the FS DAX check requirement on vmas. However, the corresponding restriction in get_user_pages_remote() was slightly stricter than is actually required: it forbade all FOLL_LONGTERM callers, but we can actually allow FOLL_LONGTERM callers that do not set the "locked" arg. Update the code and comments to loosen the restriction, allowing FOLL_LONGTERM in some cases. Also, copy the DAX check ("if a VMA is DAX, don't allow long term pinning") from the VFIO call site, all the way into the internals of get_user_pages_remote() and __gup_longterm_locked(). That is: get_user_pages_remote() calls __gup_longterm_locked(), which in turn calls check_dax_vmas(). This check will then be removed from the VFIO call site in a subsequent patch. Thanks to Jason Gunthorpe for pointing out a clean way to fix this, and to Dan Williams for helping clarify the DAX refactoring. Link: http://lkml.kernel.org/r/20200107224558.2362728-7-jhubbard@nvidia.com Signed-off-by: John Hubbard Tested-by: Alex Williamson Acked-by: Alex Williamson Reviewed-by: Jason Gunthorpe Reviewed-by: Ira Weiny Suggested-by: Jason Gunthorpe Cc: Kirill A. Shutemov Cc: Dan Williams Cc: Jerome Glisse Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Hans Verkuil Cc: Jan Kara Cc: Jens Axboe Cc: Jonathan Corbet Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1023369c6e941f1099b54b5cd04c35788885426b Author: John Hubbard Date: Thu Jan 30 22:12:32 2020 -0800 goldish_pipe: rename local pin_user_pages() routine Avoid naming conflicts: rename local static function from "pin_user_pages()" to "goldfish_pin_pages()". An upcoming patch will introduce a global pin_user_pages() function. Link: http://lkml.kernel.org/r/20200107224558.2362728-6-jhubbard@nvidia.com Signed-off-by: John Hubbard Reviewed-by: Jan Kara Reviewed-by: Jérôme Glisse Reviewed-by: Ira Weiny Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Christoph Hellwig Cc: Daniel Vetter Cc: Dan Williams Cc: Hans Verkuil Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 07d8026995287c2a2f03e28c69cdd8152fa69107 Author: John Hubbard Date: Thu Jan 30 22:12:28 2020 -0800 mm: devmap: refactor 1-based refcounting for ZONE_DEVICE pages An upcoming patch changes and complicates the refcounting and especially the "put page" aspects of it. In order to keep everything clean, refactor the devmap page release routines: * Rename put_devmap_managed_page() to page_is_devmap_managed(), and limit the functionality to "read only": return a bool, with no side effects. * Add a new routine, put_devmap_managed_page(), to handle decrementing the refcount for ZONE_DEVICE pages. * Change callers (just release_pages() and put_page()) to check page_is_devmap_managed() before calling the new put_devmap_managed_page() routine. This is a performance point: put_page() is a hot path, so we need to avoid non- inline function calls where possible. * Rename __put_devmap_managed_page() to free_devmap_managed_page(), and limit the functionality to unconditionally freeing a devmap page. This is originally based on a separate patch by Ira Weiny, which applied to an early version of the put_user_page() experiments. Since then, Jérôme Glisse suggested the refactoring described above. Link: http://lkml.kernel.org/r/20200107224558.2362728-5-jhubbard@nvidia.com Signed-off-by: Ira Weiny Signed-off-by: John Hubbard Suggested-by: Jérôme Glisse Reviewed-by: Dan Williams Reviewed-by: Jan Kara Cc: Christoph Hellwig Cc: Kirill A. Shutemov Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Daniel Vetter Cc: Hans Verkuil Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jonathan Corbet Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 429589d647c1adc80b32645fbb8852689525d9cd Author: Dan Williams Date: Thu Jan 30 22:12:24 2020 -0800 mm: Cleanup __put_devmap_managed_page() vs ->page_free() After the removal of the device-public infrastructure there are only 2 ->page_free() call backs in the kernel. One of those is a device-private callback in the nouveau driver, the other is a generic wakeup needed in the DAX case. In the hopes that all ->page_free() callbacks can be migrated to common core kernel functionality, move the device-private specific actions in __put_devmap_managed_page() under the is_device_private_page() conditional, including the ->page_free() callback. For the other page types just open-code the generic wakeup. Yes, the wakeup is only needed in the MEMORY_DEVICE_FSDAX case, but it does no harm in the MEMORY_DEVICE_DEVDAX and MEMORY_DEVICE_PCI_P2PDMA case. Link: http://lkml.kernel.org/r/20200107224558.2362728-4-jhubbard@nvidia.com Signed-off-by: Dan Williams Signed-off-by: John Hubbard Reviewed-by: Christoph Hellwig Reviewed-by: Jérôme Glisse Cc: Jan Kara Cc: Ira Weiny Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Daniel Vetter Cc: Hans Verkuil Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a707cdd55f0f8bbf409214ab42028d89c3eddec6 Author: John Hubbard Date: Thu Jan 30 22:12:21 2020 -0800 mm/gup: move try_get_compound_head() to top, fix minor issues An upcoming patch uses try_get_compound_head() more widely, so move it to the top of gup.c. Also fix a tiny spelling error and a checkpatch.pl warning. Link: http://lkml.kernel.org/r/20200107224558.2362728-3-jhubbard@nvidia.com Signed-off-by: John Hubbard Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Reviewed-by: Ira Weiny Cc: Alex Williamson Cc: Aneesh Kumar K.V Cc: Björn Töpel Cc: Daniel Vetter Cc: Dan Williams Cc: Hans Verkuil Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jerome Glisse Cc: Jonathan Corbet Cc: Kirill A. Shutemov Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a43e982082c24c2f5c0b139daac9657ac352eed3 Author: John Hubbard Date: Thu Jan 30 22:12:17 2020 -0800 mm/gup: factor out duplicate code from four routines Patch series "mm/gup: prereqs to track dma-pinned pages: FOLL_PIN", v12. Overview: This is a prerequisite to solving the problem of proper interactions between file-backed pages, and [R]DMA activities, as discussed in [1], [2], [3], and in a remarkable number of email threads since about 2017. :) A new internal gup flag, FOLL_PIN is introduced, and thoroughly documented in the last patch's Documentation/vm/pin_user_pages.rst. I believe that this will provide a good starting point for doing the layout lease work that Ira Weiny has been working on. That's because these new wrapper functions provide a clean, constrained, systematically named set of functionality that, again, is required in order to even know if a page is "dma-pinned". In contrast to earlier approaches, the page tracking can be incrementally applied to the kernel call sites that, until now, have been simply calling get_user_pages() ("gup"). In other words, opt-in by changing from this: get_user_pages() (sets FOLL_GET) put_page() to this: pin_user_pages() (sets FOLL_PIN) unpin_user_page() Testing: * I've done some overall kernel testing (LTP, and a few other goodies), and some directed testing to exercise some of the changes. And as you can see, gup_benchmark is enhanced to exercise this. Basically, I've been able to runtime test the core get_user_pages() and pin_user_pages() and related routines, but not so much on several of the call sites--but those are generally just a couple of lines changed, each. Not much of the kernel is actually using this, which on one hand reduces risk quite a lot. But on the other hand, testing coverage is low. So I'd love it if, in particular, the Infiniband and PowerPC folks could do a smoke test of this series for me. Runtime testing for the call sites so far is pretty light: * io_uring: Some directed tests from liburing exercise this, and they pass. * process_vm_access.c: A small directed test passes. * gup_benchmark: the enhanced version hits the new gup.c code, and passes. * infiniband: Ran rdma-core tests: rdma-core/build/bin/run_tests.py * VFIO: compiles (I'm vowing to set up a run time test soon, but it's not ready just yet) * powerpc: it compiles... * drm/via: compiles... * goldfish: compiles... * net/xdp: compiles... * media/v4l2: compiles... [1] Some slow progress on get_user_pages() (Apr 2, 2019): https://lwn.net/Articles/784574/ [2] DMA and get_user_pages() (LPC: Dec 12, 2018): https://lwn.net/Articles/774411/ [3] The trouble with get_user_pages() (Apr 30, 2018): https://lwn.net/Articles/753027/ This patch (of 22): There are four locations in gup.c that have a fair amount of code duplication. This means that changing one requires making the same changes in four places, not to mention reading the same code four times, and wondering if there are subtle differences. Factor out the common code into static functions, thus reducing the overall line count and the code's complexity. Also, take the opportunity to slightly improve the efficiency of the error cases, by doing a mass subtraction of the refcount, surrounded by get_page()/put_page(). Also, further simplify (slightly), by waiting until the the successful end of each routine, to increment *nr. Link: http://lkml.kernel.org/r/20200107224558.2362728-2-jhubbard@nvidia.com Signed-off-by: John Hubbard Reviewed-by: Christoph Hellwig Reviewed-by: Jérôme Glisse Reviewed-by: Jan Kara Cc: Kirill A. Shutemov Cc: Ira Weiny Cc: Christoph Hellwig Cc: Aneesh Kumar K.V Cc: Alex Williamson Cc: Björn Töpel Cc: Daniel Vetter Cc: Dan Williams Cc: Hans Verkuil Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Jens Axboe Cc: Jonathan Corbet Cc: Leon Romanovsky Cc: Mauro Carvalho Chehab Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit be9d30458913f70bed1801abb5ee6f7b7d6f4b19 Author: Wei Yang Date: Thu Jan 30 22:12:14 2020 -0800 mm/gup.c: use is_vm_hugetlb_page() to check whether to follow huge No functional change, just leverage the helper function to improve readability as others. Link: http://lkml.kernel.org/r/20200113070322.26627-1-richardw.yang@linux.intel.com Signed-off-by: Wei Yang Acked-by: Vlastimil Babka Acked-by: David Rientjes Reviewed-by: Ralph Campbell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 15494520b776aa2eadc3e2fefae524764cab9cea Author: Qiujun Huang Date: Thu Jan 30 22:12:10 2020 -0800 mm: fix gup_pud_range sorry for not processing for a long time. I met it again. patch v1 https://lkml.org/lkml/2019/9/20/656 do_machine_check() do_memory_failure() memory_failure() hw_poison_user_mappings() try_to_unmap() pteval = swp_entry_to_pte(make_hwpoison_entry(subpage)); ...and now we have a swap entry that indicates that the page entry refers to a bad (and poisoned) page of memory, but gup_fast() at this level of the page table was ignoring swap entries, and incorrectly assuming that "!pxd_none() == valid and present". And this was not just a poisoned page problem, but a generaly swap entry problem. So, any swap entry type (device memory migration, numa migration, or just regular swapping) could lead to the same problem. Fix this by checking for pxd_present(), instead of pxd_none(). Link: http://lkml.kernel.org/r/1578479084-15508-1-git-send-email-hqjagain@gmail.com Signed-off-by: Qiujun Huang Cc: John Hubbard Cc: Aneesh Kumar K.V Cc: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ddf8f376d137ba41ca67347a0b80ba0c357a1018 Author: Ira Weiny Date: Thu Jan 30 22:12:07 2020 -0800 mm/filemap.c: clean up filemap_write_and_wait() At some point filemap_write_and_wait() and filemap_write_and_wait_range() got the exact same implementation with the exception of the range being specified in *_range() Similar to other functions in fs.h which call *_range(..., 0, LLONG_MAX), change filemap_write_and_wait() to be a static inline which calls filemap_write_and_wait_range() Link: http://lkml.kernel.org/r/20191129160713.30892-1-ira.weiny@intel.com Signed-off-by: Ira Weiny Reviewed-by: Nikolay Borisov Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5b57b8f22709f07c0ab5921c94fd66e8c59c3e11 Author: Vlastimil Babka Date: Thu Jan 30 22:12:03 2020 -0800 mm/debug.c: always print flags in dump_page() Commit 76a1850e4572 ("mm/debug.c: __dump_page() prints an extra line") inadvertently removed printing of page flags for pages that are neither anon nor ksm nor have a mapping. Fix that. Using pr_cont() again would be a solution, but the commit explicitly removed its use. Avoiding the danger of mixing up split lines from multiple CPUs might be beneficial for near-panic dumps like this, so fix this without reintroducing pr_cont(). Link: http://lkml.kernel.org/r/9f884d5c-ca60-dc7b-219c-c081c755fab6@suse.cz Fixes: 76a1850e4572 ("mm/debug.c: __dump_page() prints an extra line") Signed-off-by: Vlastimil Babka Reported-by: Anshuman Khandual Reported-by: Michal Hocko Acked-by: Michal Hocko Cc: David Hildenbrand Cc: Qian Cai Cc: Oscar Salvador Cc: Mel Gorman Cc: Mike Rapoport Cc: Dan Williams Cc: Pavel Tatashin Cc: Ralph Campbell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8c96f1bc6fc49c724c4cdd22d3e99260263b7384 Author: He Zhe Date: Thu Jan 30 22:12:00 2020 -0800 mm/kmemleak: turn kmemleak_lock and object->lock to raw_spinlock_t kmemleak_lock as a rwlock on RT can possibly be acquired in atomic context which does work. Since the kmemleak operation is performed in atomic context make it a raw_spinlock_t so it can also be acquired on RT. This is used for debugging and is not enabled by default in a production like environment (where performance/latency matters) so it makes sense to make it a raw_spinlock_t instead trying to get rid of the atomic context. Turn also the kmemleak_object->lock into raw_spinlock_t which is acquired (nested) while the kmemleak_lock is held. The time spent in "echo scan > kmemleak" slightly improved on 64core box with this patch applied after boot. [bigeasy@linutronix.de: redo the description, update comments. Merge the individual bits: He Zhe did the kmemleak_lock, Liu Haitao the ->lock and Yongxin Liu forwarded Liu's patch.] Link: http://lkml.kernel.org/r/20191219170834.4tah3prf2gdothz4@linutronix.de Link: https://lkml.kernel.org/r/20181218150744.GB20197@arrakis.emea.arm.com Link: https://lkml.kernel.org/r/1542877459-144382-1-git-send-email-zhe.he@windriver.com Link: https://lkml.kernel.org/r/20190927082230.34152-1-yongxin.liu@windriver.com Signed-off-by: He Zhe Signed-off-by: Liu Haitao Signed-off-by: Yongxin Liu Signed-off-by: Sebastian Andrzej Siewior Acked-by: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 90e9f6a66c78fdf3c2e5884ffe97bfc2736863c2 Author: Yu Zhao Date: Thu Jan 30 22:11:57 2020 -0800 mm/slub.c: avoid slub allocation while holding list_lock If we are already under list_lock, don't call kmalloc(). Otherwise we will run into a deadlock because kmalloc() also tries to grab the same lock. Fix the problem by using a static bitmap instead. WARNING: possible recursive locking detected -------------------------------------------- mount-encrypted/4921 is trying to acquire lock: (&(&n->list_lock)->rlock){-.-.}, at: ___slab_alloc+0x104/0x437 but task is already holding lock: (&(&n->list_lock)->rlock){-.-.}, at: __kmem_cache_shutdown+0x81/0x3cb other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&n->list_lock)->rlock); lock(&(&n->list_lock)->rlock); *** DEADLOCK *** Link: http://lkml.kernel.org/r/20191108193958.205102-2-yuzhao@google.com Signed-off-by: Yu Zhao Acked-by: Kirill A. Shutemov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Tetsuo Handa Cc: Yu Zhao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 25b69918d9f16c729193cc7c6f48f0b8991813f9 Author: wangyan Date: Thu Jan 30 22:11:53 2020 -0800 ocfs2: use ocfs2_update_inode_fsync_trans() to access t_tid in handle->h_transaction For the uniform format, we use ocfs2_update_inode_fsync_trans() to access t_tid in handle->h_transaction Link: http://lkml.kernel.org/r/6ff9a312-5f7d-0e27-fb51-bc4e062fcd97@huawei.com Signed-off-by: Yan Wang Reviewed-by: Jun Piao Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Cc: Gang He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9f16ca48fc818a17de8be1f75d08e7f4addc4497 Author: wangyan Date: Thu Jan 30 22:11:50 2020 -0800 ocfs2: fix a NULL pointer dereference when call ocfs2_update_inode_fsync_trans() I found a NULL pointer dereference in ocfs2_update_inode_fsync_trans(), handle->h_transaction may be NULL in this situation: ocfs2_file_write_iter ->__generic_file_write_iter ->generic_perform_write ->ocfs2_write_begin ->ocfs2_write_begin_nolock ->ocfs2_write_cluster_by_desc ->ocfs2_write_cluster ->ocfs2_mark_extent_written ->ocfs2_change_extent_flag ->ocfs2_split_extent ->ocfs2_try_to_merge_extent ->ocfs2_extend_rotate_transaction ->ocfs2_extend_trans ->jbd2_journal_restart ->jbd2__journal_restart // handle->h_transaction is NULL here ->handle->h_transaction = NULL; ->start_this_handle /* journal aborted due to storage network disconnection, return error */ ->return -EROFS; /* line 3806 in ocfs2_try_to_merge_extent (), it will ignore ret error. */ ->ret = 0; ->... ->ocfs2_write_end ->ocfs2_write_end_nolock ->ocfs2_update_inode_fsync_trans // NULL pointer dereference ->oi->i_sync_tid = handle->h_transaction->t_tid; The information of NULL pointer dereference as follows: JBD2: Detected IO errors while flushing file data on dm-11-45 Aborting journal on device dm-11-45. JBD2: Error -5 detected when updating journal superblock for dm-11-45. (dd,22081,3):ocfs2_extend_trans:474 ERROR: status = -30 (dd,22081,3):ocfs2_try_to_merge_extent:3877 ERROR: status = -30 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 Mem abort info: ESR = 0x96000004 Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000004 CM = 0, WnR = 0 user pgtable: 4k pages, 48-bit VAs, pgdp = 00000000e74e1338 [0000000000000008] pgd=0000000000000000 Internal error: Oops: 96000004 [#1] SMP Process dd (pid: 22081, stack limit = 0x00000000584f35a9) CPU: 3 PID: 22081 Comm: dd Kdump: loaded Hardware name: Huawei TaiShan 2280 V2/BC82AMDD, BIOS 0.98 08/25/2019 pstate: 60400009 (nZCv daif +PAN -UAO) pc : ocfs2_write_end_nolock+0x2b8/0x550 [ocfs2] lr : ocfs2_write_end_nolock+0x2a0/0x550 [ocfs2] sp : ffff0000459fba70 x29: ffff0000459fba70 x28: 0000000000000000 x27: ffff807ccf7f1000 x26: 0000000000000001 x25: ffff807bdff57970 x24: ffff807caf1d4000 x23: ffff807cc79e9000 x22: 0000000000001000 x21: 000000006c6cd000 x20: ffff0000091d9000 x19: ffff807ccb239db0 x18: ffffffffffffffff x17: 000000000000000e x16: 0000000000000007 x15: ffff807c5e15bd78 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000001 x9 : 0000000000000228 x8 : 000000000000000c x7 : 0000000000000fff x6 : ffff807a308ed6b0 x5 : ffff7e01f10967c0 x4 : 0000000000000018 x3 : d0bc661572445600 x2 : 0000000000000000 x1 : 000000001b2e0200 x0 : 0000000000000000 Call trace: ocfs2_write_end_nolock+0x2b8/0x550 [ocfs2] ocfs2_write_end+0x4c/0x80 [ocfs2] generic_perform_write+0x108/0x1a8 __generic_file_write_iter+0x158/0x1c8 ocfs2_file_write_iter+0x668/0x950 [ocfs2] __vfs_write+0x11c/0x190 vfs_write+0xac/0x1c0 ksys_write+0x6c/0xd8 __arm64_sys_write+0x24/0x30 el0_svc_common+0x78/0x130 el0_svc_handler+0x38/0x78 el0_svc+0x8/0xc To prevent NULL pointer dereference in this situation, we use is_handle_aborted() before using handle->h_transaction->t_tid. Link: http://lkml.kernel.org/r/03e750ab-9ade-83aa-b000-b9e81e34e539@huawei.com Signed-off-by: Yan Wang Reviewed-by: Jun Piao Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Cc: Gang He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dd3e7cba16274831f5a69f071ed3cf13ffb352ea Author: Andy Shevchenko Date: Thu Jan 30 22:11:47 2020 -0800 ocfs2/dlm: move BITS_TO_BYTES() to bitops.h for wider use There are users already and will be more of BITS_TO_BYTES() macro. Move it to bitops.h for wider use. In the case of ocfs2 the replacement is identical. As for bnx2x, there are two places where floor version is used. In the first case to calculate the amount of structures that can fit one memory page. In this case obviously the ceiling variant is correct and original code might have a potential bug, if amount of bits % 8 is not 0. In the second case the macro is used to calculate bytes transmitted in one microsecond. This will work for all speeds which is multiply of 1Gbps without any change, for the rest new code will give ceiling value, for instance 100Mbps will give 13 bytes, while old code gives 12 bytes and the arithmetically correct one is 12.5 bytes. Further the value is used to setup timer threshold which in any case has its own margins due to certain resolution. I don't see here an issue with slightly shifting thresholds for low speed connections, the card is supposed to utilize highest available rate, which is usually 10Gbps. Link: http://lkml.kernel.org/r/20200108121316.22411-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Reviewed-by: Joseph Qi Acked-by: Sudarsana Reddy Kalluru 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 d8f18750690367b6a636878e8725f78398fe0748 Author: Colin Ian King Date: Thu Jan 30 22:11:43 2020 -0800 ocfs2/dlm: remove redundant assignment to 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") Link: http://lkml.kernel.org/r/20191202164833.62865-1-colin.king@canonical.com Signed-off-by: Colin Ian King Reviewed-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 ca322fb6030956c2337fbf1c1beeb08c5dd5c943 Author: Masahiro Yamada Date: Thu Jan 30 22:11:40 2020 -0800 ocfs2: make local header paths relative to C files Gang He reports the failure of building fs/ocfs2/ as an external module of the kernel installed on the system: $ cd fs/ocfs2 $ make -C /lib/modules/`uname -r`/build M=`pwd` modules If you want to make it work reliably, I'd recommend to remove ccflags-y from the Makefiles, and to make header paths relative to the C files. I think this is the correct usage of the #include "..." directive. Link: http://lkml.kernel.org/r/20191227022950.14804-1-ghe@suse.com Signed-off-by: Masahiro Yamada Signed-off-by: Gang He Reported-by: Gang He Reviewed-by: Gang He Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5b43d6453a944c207e6b518044561dbab1250a7f Author: zhengbin Date: Thu Jan 30 22:11:36 2020 -0800 ocfs2: remove unneeded semicolons Fixes coccicheck warnings: fs/ocfs2/cluster/quorum.c:76:2-3: Unneeded semicolon fs/ocfs2/dlmglue.c:573:2-3: Unneeded semicolon Link: http://lkml.kernel.org/r/6ee3aa16-9078-30b1-df3f-22064950bd98@linux.alibaba.com Signed-off-by: zhengbin Reported-by: Hulk 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 67e2d2eb542338145a2e0b2336c1cdabd2424fd3 Author: Aditya Pakki Date: Thu Jan 30 22:11:33 2020 -0800 fs: ocfs: remove unnecessary assertion in dlm_migrate_lockres In the only caller of dlm_migrate_lockres() - dlm_empty_lockres(), target is checked for O2NM_MAX_NODES. Thus, the assertion in dlm_migrate_lockres() is unnecessary and can be removed. The patch eliminates such a check. Link: http://lkml.kernel.org/r/20191218194111.26041-1-pakki001@umn.edu Signed-off-by: Aditya Pakki Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4efc61c798cd7725a47ec1e9c2a2f755891dcaa3 Author: Luca Ceresoli Date: Thu Jan 30 22:11:30 2020 -0800 scripts/spelling.txt: add "issus" typo Add "issus" and correct it as "issues". Link: http://lkml.kernel.org/r/20200105221950.8384-1-luca@lucaceresoli.net Signed-off-by: Luca Ceresoli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2ab1278fe401af3cbb52c4492068b3cae2375959 Author: Xiong Date: Thu Jan 30 22:11:27 2020 -0800 scripts/spelling.txt: add more spellings to spelling.txt Here are some of the common spelling mistakes and typos that I've found while fixing up spelling mistakes in the kernel. Most of them still exist in more than two source files. Link: http://lkml.kernel.org/r/20191229143626.51238-1-xndchn@gmail.com Signed-off-by: Xiong Cc: Colin Ian King Cc: Stephen Boyd Cc: Paul Walmsley Cc: Chris Paterson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5984fabb6e82d9ab4e6305cb99694c85d46de8ae Author: Yang Shi Date: Thu Jan 30 22:11:24 2020 -0800 mm: move_pages: report the number of non-attempted pages Since commit a49bd4d71637 ("mm, numa: rework do_pages_move"), the semantic of move_pages() has changed to return the number of non-migrated pages if they were result of a non-fatal reasons (usually a busy page). This was an unintentional change that hasn't been noticed except for LTP tests which checked for the documented behavior. There are two ways to go around this change. We can even get back to the original behavior and return -EAGAIN whenever migrate_pages is not able to migrate pages due to non-fatal reasons. Another option would be to simply continue with the changed semantic and extend move_pages documentation to clarify that -errno is returned on an invalid input or when migration simply cannot succeed (e.g. -ENOMEM, -EBUSY) or the number of pages that couldn't have been migrated due to ephemeral reasons (e.g. page is pinned or locked for other reasons). This patch implements the second option because this behavior is in place for some time without anybody complaining and possibly new users depending on it. Also it allows to have a slightly easier error handling as the caller knows that it is worth to retry when err > 0. But since the new semantic would be aborted immediately if migration is failed due to ephemeral reasons, need include the number of non-attempted pages in the return value too. Link: http://lkml.kernel.org/r/1580160527-109104-1-git-send-email-yang.shi@linux.alibaba.com Fixes: a49bd4d71637 ("mm, numa: rework do_pages_move") Signed-off-by: Yang Shi Suggested-by: Michal Hocko Acked-by: Michal Hocko Reviewed-by: Wei Yang Cc: [4.17+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fac0516b5534897bf4c4a88daa06a8cfa5611b23 Author: Wei Yang Date: Thu Jan 30 22:11:20 2020 -0800 mm: thp: don't need care deferred split queue in memcg charge move path If compound is true, this means it is a PMD mapped THP. Which implies the page is not linked to any defer list. So the first code chunk will not be executed. Also with this reason, it would not be proper to add this page to a defer list. So the second code chunk is not correct. Based on this, we should remove the defer list related code. [yang.shi@linux.alibaba.com: better patch title] Link: http://lkml.kernel.org/r/20200117233836.3434-1-richardw.yang@linux.intel.com Fixes: 87eaceb3faa5 ("mm: thp: make deferred split shrinker memcg aware") Signed-off-by: Wei Yang Suggested-by: Kirill A. Shutemov Acked-by: Yang Shi Cc: David Rientjes Cc: Michal Hocko Cc: Kirill A. Shutemov Cc: Johannes Weiner Cc: Vladimir Davydov Cc: [5.4+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f1037ec0cc8ac1a450974ad9754e991f72884f48 Author: Dan Williams Date: Thu Jan 30 22:11:17 2020 -0800 mm/memory_hotplug: fix remove_memory() lockdep splat The daxctl unit test for the dax_kmem driver currently triggers the (false positive) lockdep splat below. It results from the fact that remove_memory_block_devices() is invoked under the mem_hotplug_lock() causing lockdep entanglements with cpu_hotplug_lock() and sysfs (kernfs active state tracking). It is a false positive because the sysfs attribute path triggering the memory remove is not the same attribute path associated with memory-block device. sysfs_break_active_protection() is not applicable since there is no real deadlock conflict, instead move memory-block device removal outside the lock. The mem_hotplug_lock() is not needed to synchronize the memory-block device removal vs the page online state, that is already handled by lock_device_hotplug(). Specifically, lock_device_hotplug() is sufficient to allow try_remove_memory() to check the offline state of the memblocks and be assured that any in progress online attempts are flushed / blocked by kernfs_drain() / attribute removal. The add_memory() path safely creates memblock devices under the mem_hotplug_lock(). There is no kernfs active state synchronization in the memblock device_register() path, so nothing to fix there. This change is only possible thanks to the recent change that refactored memory block device removal out of arch_remove_memory() (commit 4c4b7f9ba948 "mm/memory_hotplug: remove memory block devices before arch_remove_memory()"), and David's due diligence tracking down the guarantees afforded by kernfs_drain(). Not flagged for -stable since this only impacts ongoing development and lockdep validation, not a runtime issue. ====================================================== WARNING: possible circular locking dependency detected 5.5.0-rc3+ #230 Tainted: G OE ------------------------------------------------------ lt-daxctl/6459 is trying to acquire lock: ffff99c7f0003510 (kn->count#241){++++}, at: kernfs_remove_by_name_ns+0x41/0x80 but task is already holding lock: ffffffffa76a5450 (mem_hotplug_lock.rw_sem){++++}, at: percpu_down_write+0x20/0xe0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (mem_hotplug_lock.rw_sem){++++}: __lock_acquire+0x39c/0x790 lock_acquire+0xa2/0x1b0 get_online_mems+0x3e/0xb0 kmem_cache_create_usercopy+0x2e/0x260 kmem_cache_create+0x12/0x20 ptlock_cache_init+0x20/0x28 start_kernel+0x243/0x547 secondary_startup_64+0xb6/0xc0 -> #1 (cpu_hotplug_lock.rw_sem){++++}: __lock_acquire+0x39c/0x790 lock_acquire+0xa2/0x1b0 cpus_read_lock+0x3e/0xb0 online_pages+0x37/0x300 memory_subsys_online+0x17d/0x1c0 device_online+0x60/0x80 state_store+0x65/0xd0 kernfs_fop_write+0xcf/0x1c0 vfs_write+0xdb/0x1d0 ksys_write+0x65/0xe0 do_syscall_64+0x5c/0xa0 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (kn->count#241){++++}: check_prev_add+0x98/0xa40 validate_chain+0x576/0x860 __lock_acquire+0x39c/0x790 lock_acquire+0xa2/0x1b0 __kernfs_remove+0x25f/0x2e0 kernfs_remove_by_name_ns+0x41/0x80 remove_files.isra.0+0x30/0x70 sysfs_remove_group+0x3d/0x80 sysfs_remove_groups+0x29/0x40 device_remove_attrs+0x39/0x70 device_del+0x16a/0x3f0 device_unregister+0x16/0x60 remove_memory_block_devices+0x82/0xb0 try_remove_memory+0xb5/0x130 remove_memory+0x26/0x40 dev_dax_kmem_remove+0x44/0x6a [kmem] device_release_driver_internal+0xe4/0x1c0 unbind_store+0xef/0x120 kernfs_fop_write+0xcf/0x1c0 vfs_write+0xdb/0x1d0 ksys_write+0x65/0xe0 do_syscall_64+0x5c/0xa0 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: kn->count#241 --> cpu_hotplug_lock.rw_sem --> mem_hotplug_lock.rw_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(mem_hotplug_lock.rw_sem); lock(cpu_hotplug_lock.rw_sem); lock(mem_hotplug_lock.rw_sem); lock(kn->count#241); *** DEADLOCK *** No fixes tag as this has been a long standing issue that predated the addition of kernfs lockdep annotations. Link: http://lkml.kernel.org/r/157991441887.2763922.4770790047389427325.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams Acked-by: Michal Hocko Reviewed-by: David Hildenbrand Cc: Vishal Verma Cc: Pavel Tatashin Cc: Dave Hansen Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dfe9aa23cab7880a794db9eb2d176c00ed064eb6 Author: Wei Yang Date: Thu Jan 30 22:11:14 2020 -0800 mm/migrate.c: also overwrite error when it is bigger than zero If we get here after successfully adding page to list, err would be 1 to indicate the page is queued in the list. Current code has two problems: * on success, 0 is not returned * on error, if add_page_for_migratioin() return 1, and the following err1 from do_move_pages_to_node() is set, the err1 is not returned since err is 1 And these behaviors break the user interface. Link: http://lkml.kernel.org/r/20200119065753.21694-1-richardw.yang@linux.intel.com Fixes: e0153fc2c760 ("mm: move_pages: return valid node id in status if the page is already on the target node"). Signed-off-by: Wei Yang Acked-by: Yang Shi Cc: John Hubbard Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1f503443e7df8dc8366608b4d810ce2d6669827c Author: Pingfan Liu Date: Thu Jan 30 22:11:10 2020 -0800 mm/sparse.c: reset section's mem_map when fully deactivated After commit ba72b4c8cf60 ("mm/sparsemem: support sub-section hotplug"), when a mem section is fully deactivated, section_mem_map still records the section's start pfn, which is not used any more and will be reassigned during re-addition. In analogy with alloc/free pattern, it is better to clear all fields of section_mem_map. Beside this, it breaks the user space tool "makedumpfile" [1], which makes assumption that a hot-removed section has mem_map as NULL, instead of checking directly against SECTION_MARKED_PRESENT bit. (makedumpfile will be better to change the assumption, and need a patch) The bug can be reproduced on IBM POWERVM by "drmgr -c mem -r -q 5" , trigger a crash, and save vmcore by makedumpfile [1]: makedumpfile, commit e73016540293 ("[v1.6.7] Update version") Link: http://lkml.kernel.org/r/1579487594-28889-1-git-send-email-kernelfans@gmail.com Signed-off-by: Pingfan Liu Acked-by: Michal Hocko Acked-by: David Hildenbrand Cc: Dan Williams Cc: Oscar Salvador Cc: Baoquan He Cc: Qian Cai Cc: Kazuhito Hagio Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c7a91bc7c2e17e0a9c8b9745a2cb118891218fd1 Author: Dan Carpenter Date: Thu Jan 30 22:11:07 2020 -0800 mm/mempolicy.c: fix out of bounds write in mpol_parse_str() What we are trying to do is change the '=' character to a NUL terminator and then at the end of the function we restore it back to an '='. The problem is there are two error paths where we jump to the end of the function before we have replaced the '=' with NUL. We end up putting the '=' in the wrong place (possibly one element before the start of the buffer). Link: http://lkml.kernel.org/r/20200115055426.vdjwvry44nfug7yy@kili.mountain Reported-by: syzbot+e64a13c5369a194d67df@syzkaller.appspotmail.com Fixes: 095f1fc4ebf3 ("mempolicy: rework shmem mpol parsing and display") Signed-off-by: Dan Carpenter Acked-by: Vlastimil Babka Dmitry Vyukov Cc: Michal Hocko Cc: Dan Carpenter Cc: Lee Schermerhorn Cc: Andrea Arcangeli Cc: Hugh Dickins Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 68f23b89067fdf187763e75a56087550624fdbee Author: Theodore Ts'o Date: Thu Jan 30 22:11:04 2020 -0800 memcg: fix a crash in wb_workfn when a device disappears Without memcg, there is a one-to-one mapping between the bdi and bdi_writeback structures. In this world, things are fairly straightforward; the first thing bdi_unregister() does is to shutdown the bdi_writeback structure (or wb), and part of that writeback ensures that no other work queued against the wb, and that the wb is fully drained. With memcg, however, there is a one-to-many relationship between the bdi and bdi_writeback structures; that is, there are multiple wb objects which can all point to a single bdi. There is a refcount which prevents the bdi object from being released (and hence, unregistered). So in theory, the bdi_unregister() *should* only get called once its refcount goes to zero (bdi_put will drop the refcount, and when it is zero, release_bdi gets called, which calls bdi_unregister). Unfortunately, del_gendisk() in block/gen_hd.c never got the memo about the Brave New memcg World, and calls bdi_unregister directly. It does this without informing the file system, or the memcg code, or anything else. This causes the root wb associated with the bdi to be unregistered, but none of the memcg-specific wb's are shutdown. So when one of these wb's are woken up to do delayed work, they try to dereference their wb->bdi->dev to fetch the device name, but unfortunately bdi->dev is now NULL, thanks to the bdi_unregister() called by del_gendisk(). As a result, *boom*. Fortunately, it looks like the rest of the writeback path is perfectly happy with bdi->dev and bdi->owner being NULL, so the simplest fix is to create a bdi_dev_name() function which can handle bdi->dev being NULL. This also allows us to bulletproof the writeback tracepoints to prevent them from dereferencing a NULL pointer and crashing the kernel if one is tracing with memcg's enabled, and an iSCSI device dies or a USB storage stick is pulled. The most common way of triggering this will be hotremoval of a device while writeback with memcg enabled is going on. It was triggering several times a day in a heavily loaded production environment. Google Bug Id: 145475544 Link: https://lore.kernel.org/r/20191227194829.150110-1-tytso@mit.edu Link: http://lkml.kernel.org/r/20191228005211.163952-1-tytso@mit.edu Signed-off-by: Theodore Ts'o Cc: Chris Mason Cc: Tejun Heo Cc: Jens Axboe Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 69334ca530da80c1563ac6a3bd32afa40884ccd3 Author: Andy Shevchenko Date: Thu Jan 30 22:11:01 2020 -0800 lib/test_bitmap: correct test data offsets for 32-bit On 32-bit platform the size of long is only 32 bits which makes wrong offset in the array of 64 bit size. Calculate offset based on BITS_PER_LONG. Link: http://lkml.kernel.org/r/20200109103601.45929-1-andriy.shevchenko@linux.intel.com Fixes: 30544ed5de43 ("lib/bitmap: introduce bitmap_replace() helper") Signed-off-by: Andy Shevchenko Reported-by: Guenter Roeck Cc: Rasmus Villemoes Cc: Yury Norov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d380dcde9a07ca5de4805dee11f58a98ec0ad6ff Author: Tom Zanussi Date: Wed Jan 29 21:18:18 2020 -0500 tracing: Fix now invalid var_ref_vals assumption in trace action The patch 'tracing: Fix histogram code when expression has same var as value' added code to return an existing variable reference when creating a new variable reference, which resulted in var_ref_vals slots being reused instead of being duplicated. The implementation of the trace action assumes that the end of the var_ref_vals array starting at action_data.var_ref_idx corresponds to the values that will be assigned to the trace params. The patch mentioned above invalidates that assumption, which means that each param needs to explicitly specify its index into var_ref_vals. This fix changes action_data.var_ref_idx to an array of var ref indexes to account for that. Link: https://lore.kernel.org/r/1580335695.6220.8.camel@kernel.org Fixes: 8bcebc77e85f ("tracing: Fix histogram code when expression has same var as value") Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit fdeb1aca2861472b38779be44141757483300827 Author: Tom Zanussi Date: Wed Jan 29 12:59:26 2020 -0600 tracing: Change trace_boot to use synth_event interface Have trace_boot_add_synth_event() use the synth_event interface. Also, rename synth_event_run_cmd() to synth_event_run_command() now that trace_boot's version is gone. Link: http://lkml.kernel.org/r/94f1fa0e31846d0bddca916b8663404b20559e34.1580323897.git.zanussi@kernel.org Acked-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit dc2c733e65848b1df8d55c83eea79fc4a868c800 Author: Andy Shevchenko Date: Fri Jan 24 18:14:40 2020 +0200 kdb: Use for_each_console() helper Replace open coded single-linked list iteration loop with for_each_console() helper in use. Signed-off-by: Andy Shevchenko Signed-off-by: Daniel Thompson commit a4f8a7fb1963bc02fbd40a0a28e128bb56d2fcc9 Author: Colin Ian King Date: Thu Nov 28 13:07:53 2019 +0000 kdb: remove redundant assignment to pointer bp The point bp is assigned a value that is never read, it is being re-assigned later to bp = &kdb_breakpoints[lowbp] in a for-loop. Remove the redundant assignment. Addresses-Coverity ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191128130753.181246-1-colin.king@canonical.com Signed-off-by: Daniel Thompson commit bbfceba15f8d1260c328a254efc2b3f2deae4904 Author: Douglas Anderson Date: Sat Nov 9 11:16:44 2019 -0800 kdb: Get rid of confusing diag msg from "rd" if current task has no regs If you switch to a sleeping task with the "pid" command and then type "rd", kdb tells you this: No current kdb registers. You may need to select another task diag: -17: Invalid register name The first message makes sense, but not the second. Fix it by just returning 0 after commands accessing the current registers finish if we've already printed the "No current kdb registers" error. While fixing kdb_rd(), change the function to use "if" rather than "ifdef". It cleans the function up a bit and any modern compiler will have no trouble handling still producing good code. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20191109111624.5.I121f4c6f0c19266200bf6ef003de78841e5bfc3d@changeid Signed-off-by: Daniel Thompson commit 9441d5f6b77770ee388884f04b14a99b028a15e6 Author: Douglas Anderson Date: Sat Nov 9 11:16:43 2019 -0800 kdb: Gid rid of implicit setting of the current task / regs Some (but not all?) of the kdb backtrace paths would cause the kdb_current_task and kdb_current_regs to remain changed. As discussed in a review of a previous patch [1], this doesn't seem intuitive, so let's fix that. ...but, it turns out that there's actually no longer any reason to set the current task / current regs while backtracing anymore anyway. As of commit 2277b492582d ("kdb: Fix stack crawling on 'running' CPUs that aren't the master") if we're backtracing on a task running on a CPU we ask that CPU to do the backtrace itself. Linux can do that without anything fancy. If we're doing backtrace on a sleeping task we can also do that fine without updating globals. So this patch mostly just turns into deleting a bunch of code. [1] https://lore.kernel.org/r/20191010150735.dhrj3pbjgmjrdpwr@holly.lan Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20191109111624.4.Ibc3d982bbeb9e46872d43973ba808cd4c79537c7@changeid Signed-off-by: Daniel Thompson commit a8649fb0a8c1de9c842c9c492f189cabbc468272 Author: Douglas Anderson Date: Sat Nov 9 11:16:42 2019 -0800 kdb: kdb_current_task shouldn't be exported The kdb_current_task variable has been declared in "kernel/debug/kdb/kdb_private.h" since 2010 when kdb was added to the mainline kernel. This is not a public header. There should be no reason that kdb_current_task should be exported and there are no in-kernel users that need it. Remove the export. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20191109111623.3.I14b22b5eb15ca8f3812ab33e96621231304dc1f7@changeid Signed-off-by: Daniel Thompson commit c67c10a67f6b2edcc7804317947cbfdeab71048c Author: Douglas Anderson Date: Sat Nov 9 11:16:41 2019 -0800 kdb: kdb_current_regs should be private As of the patch ("MIPS: kdb: Remove old workaround for backtracing on other CPUs") there is no reason for kdb_current_regs to be in the public "kdb.h". Let's move it next to kdb_current_task. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20191109111623.2.Iadbfb484e90b557cc4b5ac9890bfca732cd99d77@changeid Signed-off-by: Daniel Thompson commit b356e89b89cc950dc142e906c1ad5c2d4eb1fa13 Author: Douglas Anderson Date: Sat Nov 9 11:16:40 2019 -0800 MIPS: kdb: Remove old workaround for backtracing on other CPUs As of commit 2277b492582d ("kdb: Fix stack crawling on 'running' CPUs that aren't the master") we no longer need any special case for doing stack dumps on CPUs that are not the kdb master. Let's remove. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20191109111623.1.I30a0cac4d9880040c8d41495bd9a567fe3e24989@changeid Signed-off-by: Daniel Thompson commit e813e65038389b66d2f8dd87588694caf8dc2923 Merge: ccaaaf6fe5a5 4cbc418a44d5 Author: Linus Torvalds Date: Fri Jan 31 09:30:41 2020 -0800 Merge tag 'kvm-5.6-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Paolo Bonzini: "This is the first batch of KVM changes. ARM: - cleanups and corner case fixes. PPC: - Bugfixes x86: - Support for mapping DAX areas with large nested page table entries. - Cleanups and bugfixes here too. A particularly important one is a fix for FPU load when the thread has TIF_NEED_FPU_LOAD. There is also a race condition which could be used in guest userspace to exploit the guest kernel, for which the embargo expired today. - Fast path for IPI delivery vmexits, shaving about 200 clock cycles from IPI latency. - Protect against "Spectre-v1/L1TF" (bring data in the cache via speculative out of bound accesses, use L1TF on the sibling hyperthread to read it), which unfortunately is an even bigger whack-a-mole game than SpectreV1. Sean continues his mission to rewrite KVM. In addition to a sizable number of x86 patches, this time he contributed a pretty large refactoring of vCPU creation that affects all architectures but should not have any visible effect. s390 will come next week together with some more x86 patches" * tag 'kvm-5.6-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (204 commits) x86/KVM: Clean up host's steal time structure x86/KVM: Make sure KVM_VCPU_FLUSH_TLB flag is not missed x86/kvm: Cache gfn to pfn translation x86/kvm: Introduce kvm_(un)map_gfn() x86/kvm: Be careful not to clear KVM_VCPU_FLUSH_TLB bit KVM: PPC: Book3S PR: Fix -Werror=return-type build failure KVM: PPC: Book3S HV: Release lock on page-out failure path KVM: arm64: Treat emulated TVAL TimerValue as a signed 32-bit integer KVM: arm64: pmu: Only handle supported event counters KVM: arm64: pmu: Fix chained SW_INCR counters KVM: arm64: pmu: Don't mark a counter as chained if the odd one is disabled KVM: arm64: pmu: Don't increment SW_INCR if PMCR.E is unset KVM: x86: Use a typedef for fastop functions KVM: X86: Add 'else' to unify fastop and execute call path KVM: x86: inline memslot_valid_for_gpte KVM: x86/mmu: Use huge pages for DAX-backed files KVM: x86/mmu: Remove lpage_is_disallowed() check from set_spte() KVM: x86/mmu: Fold max_mapping_level() into kvm_mmu_hugepage_adjust() KVM: x86/mmu: Zap any compound page when collapsing sptes KVM: x86/mmu: Remove obsolete gfn restoration in FNAME(fetch) ... commit 91a7d4bf3ee3794d4090cedd17b8e865645f5f79 Author: Nathan Chancellor Date: Thu Jan 30 18:51:23 2020 -0700 mlxsw: spectrum_qdisc: Fix 64-bit division error in mlxsw_sp_qdisc_tbf_rate_kbps When building arm32 allmodconfig: ERROR: "__aeabi_uldivmod" [drivers/net/ethernet/mellanox/mlxsw/mlxsw_spectrum.ko] undefined! rate_bytes_ps has type u64, we need to use a 64-bit division helper to avoid a build error. Fixes: a44f58c41bfb ("mlxsw: spectrum_qdisc: Support offloading of TBF Qdisc") Signed-off-by: Nathan Chancellor Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: Jakub Kicinski commit b5ce31b5e11b768b7d685b2bab7db09ad5549493 Author: Shannon Nelson Date: Thu Jan 30 10:07:06 2020 -0800 ionic: fix rxq comp packet type mask Be sure to include all the packet type bits in the mask. Fixes: fbfb8031533c ("ionic: Add hardware init and device commands") Signed-off-by: Shannon Nelson Signed-off-by: Jakub Kicinski commit 2318ca8aef3877da2b16b92edce47a497370a86e Author: Michael Walle Date: Thu Jan 30 18:54:02 2020 +0100 net: phy: at803x: disable vddio regulator The probe() might enable a VDDIO regulator, which needs to be disabled again before calling regulator_put(). Add a remove() function. Fixes: 2f664823a470 ("net: phy: at803x: add device tree binding") Signed-off-by: Michael Walle Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski commit 2e1bf3a76576eebc787d8882c3f91fa4ec743efc Author: Michael Walle Date: Thu Jan 30 18:44:51 2020 +0100 net: mii_timestamper: fix static allocation by PHY driver If phydev->mii_ts is set by the PHY driver, it will always be overwritten in of_mdiobus_register_phy(). Fix it. Also make sure, that the unregister() doesn't do anything if the mii_timestamper was provided by the PHY driver. Fixes: 1dca22b18421 ("net: mdio: of: Register discovered MII time stampers.") Signed-off-by: Michael Walle Acked-by: Richard Cochran Signed-off-by: Jakub Kicinski commit 0e0daf6ac3be70608569262246f6dc33cb3f45fe Author: Michael Walle Date: Thu Jan 30 18:44:50 2020 +0100 net: mdio: of: fix potential NULL pointer derefernce of_find_mii_timestamper() returns NULL if no timestamper is found. Therefore, guard the unregister_mii_timestamper() calls. Fixes: 1dca22b18421 ("net: mdio: of: Register discovered MII time stampers.") Signed-off-by: Michael Walle Acked-by: Richard Cochran Signed-off-by: Jakub Kicinski commit cb639a420e2e74dba5432e8ebcfb3559ce925148 Author: Takashi Iwai Date: Fri Jan 31 16:22:14 2020 +0100 ALSA: pcm: Fix sparse warnings wrt snd_pcm_state_t Since we have a bitwise definition of snd_pcm_state_t and use it for certain struct fields, a few new (and years old) sparse warnings came up. This patch is an attempt to cover them. - The state fields in snd_pcm_mmap_status* and co are all defined as snd_pcm_state_t type now - The PCM action callbacks take snd_pcm_state_t argument as well; some actions taking special values got the explicit cast and comments - For the PCM action that doesn't need an extra argument receives ACTION_ARG_IGNORE instead of ambiguous 0 While we're at it, the boolean argument is also properly changed to bool and true/false, as well as a slight refactoring of PCM pause helper function to make easier to read. No functional changes, just shutting up chatty sparse. Fixes: 46b770f720bd ("ALSA: uapi: Fix sparse warning") Reported-by: kbuild test robot Link: https://lore.kernel.org/r/20200131152214.11698-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9722b10148504c4153a74a9c89725af271e490fc Author: Filipe Manana Date: Wed Jan 29 17:09:53 2020 +0000 Btrfs: send, fix emission of invalid clone operations within the same file When doing an incremental send and a file has extents shared with itself at different file offsets, it's possible for send to emit clone operations that will fail at the destination because the source range goes beyond the file's current size. This happens when the file size has increased in the send snapshot, there is a hole between the shared extents and both shared extents are at file offsets which are greater the file's size in the parent snapshot. Example: $ mkfs.btrfs -f /dev/sdb $ mount /dev/sdb /mnt/sdb $ xfs_io -f -c "pwrite -S 0xf1 0 64K" /mnt/sdb/foobar $ btrfs subvolume snapshot -r /mnt/sdb /mnt/sdb/base $ btrfs send -f /tmp/1.snap /mnt/sdb/base # Create a 320K extent at file offset 512K. $ xfs_io -c "pwrite -S 0xab 512K 64K" /mnt/sdb/foobar $ xfs_io -c "pwrite -S 0xcd 576K 64K" /mnt/sdb/foobar $ xfs_io -c "pwrite -S 0xef 640K 64K" /mnt/sdb/foobar $ xfs_io -c "pwrite -S 0x64 704K 64K" /mnt/sdb/foobar $ xfs_io -c "pwrite -S 0x73 768K 64K" /mnt/sdb/foobar # Clone part of that 320K extent into a lower file offset (192K). # This file offset is greater than the file's size in the parent # snapshot (64K). Also the clone range is a bit behind the offset of # the 320K extent so that we leave a hole between the shared extents. $ xfs_io -c "reflink /mnt/sdb/foobar 448K 192K 192K" /mnt/sdb/foobar $ btrfs subvolume snapshot -r /mnt/sdb /mnt/sdb/incr $ btrfs send -p /mnt/sdb/base -f /tmp/2.snap /mnt/sdb/incr $ mkfs.btrfs -f /dev/sdc $ mount /dev/sdc /mnt/sdc $ btrfs receive -f /tmp/1.snap /mnt/sdc $ btrfs receive -f /tmp/2.snap /mnt/sdc ERROR: failed to clone extents to foobar: Invalid argument The problem is that after processing the extent at file offset 256K, which refers to the first 128K of the 320K extent created by the buffered write operations, we have 'cur_inode_next_write_offset' set to 384K, which corresponds to the end offset of the partially shared extent (256K + 128K) and to the current file size in the receiver. Then when we process the extent at offset 512K, we do extent backreference iteration to figure out if we can clone the extent from some other inode or from the same inode, and we consider the extent at offset 256K of the same inode as a valid source for a clone operation, which is not correct because at that point the current file size in the receiver is 384K, which corresponds to the end of last processed extent (at file offset 256K), so using a clone source range from 256K to 256K + 320K is invalid because that goes past the current size of the file (384K) - this makes the receiver get an -EINVAL error when attempting the clone operation. So fix this by excluding clone sources that have a range that goes beyond the current file size in the receiver when iterating extent backreferences. A test case for fstests follows soon. Fixes: 11f2069c113e02 ("Btrfs: send, allow clone operations within the same file") CC: stable@vger.kernel.org # 5.5+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit f4b1363cae43fef7c86c993b7ca7fe7d546b3c68 Author: Josef Bacik Date: Tue Jan 21 14:34:52 2020 -0500 btrfs: do not do delalloc reservation under page lock We ran into a deadlock in production with the fixup worker. The stack traces were as follows: Thread responsible for the writeout, waiting on the page lock [<0>] io_schedule+0x12/0x40 [<0>] __lock_page+0x109/0x1e0 [<0>] extent_write_cache_pages+0x206/0x360 [<0>] extent_writepages+0x40/0x60 [<0>] do_writepages+0x31/0xb0 [<0>] __writeback_single_inode+0x3d/0x350 [<0>] writeback_sb_inodes+0x19d/0x3c0 [<0>] __writeback_inodes_wb+0x5d/0xb0 [<0>] wb_writeback+0x231/0x2c0 [<0>] wb_workfn+0x308/0x3c0 [<0>] process_one_work+0x1e0/0x390 [<0>] worker_thread+0x2b/0x3c0 [<0>] kthread+0x113/0x130 [<0>] ret_from_fork+0x35/0x40 [<0>] 0xffffffffffffffff Thread of the fixup worker who is holding the page lock [<0>] start_delalloc_inodes+0x241/0x2d0 [<0>] btrfs_start_delalloc_roots+0x179/0x230 [<0>] btrfs_alloc_data_chunk_ondemand+0x11b/0x2e0 [<0>] btrfs_check_data_free_space+0x53/0xa0 [<0>] btrfs_delalloc_reserve_space+0x20/0x70 [<0>] btrfs_writepage_fixup_worker+0x1fc/0x2a0 [<0>] normal_work_helper+0x11c/0x360 [<0>] process_one_work+0x1e0/0x390 [<0>] worker_thread+0x2b/0x3c0 [<0>] kthread+0x113/0x130 [<0>] ret_from_fork+0x35/0x40 [<0>] 0xffffffffffffffff Thankfully the stars have to align just right to hit this. First you have to end up in the fixup worker, which is tricky by itself (my reproducer does DIO reads into a MMAP'ed region, so not a common operation). Then you have to have less than a page size of free data space and 0 unallocated space so you go down the "commit the transaction to free up pinned space" path. This was accomplished by a random balance that was running on the host. Then you get this deadlock. I'm still in the process of trying to force the deadlock to happen on demand, but I've hit other issues. I can still trigger the fixup worker path itself so this patch has been tested in that regard, so the normal case is fine. Fixes: 87826df0ec36 ("btrfs: delalloc for page dirtied out-of-band in fixup worker") Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5ab580556994eea3e3a95a07b79384a7a96320a0 Author: Josef Bacik Date: Tue Jan 21 11:51:43 2020 -0500 btrfs: drop the -EBUSY case in __extent_writepage_io Now that we only return 0 or -EAGAIN from btrfs_writepage_cow_fixup, we do not need this -EBUSY case. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 25f3c5021985e885292980d04a1423fd83c967bb Author: Chris Mason Date: Tue Jan 21 11:51:42 2020 -0500 Btrfs: keep pages dirty when using btrfs_writepage_fixup_worker For COW, btrfs expects pages dirty pages to have been through a few setup steps. This includes reserving space for the new block allocations and marking the range in the state tree for delayed allocation. A few places outside btrfs will dirty pages directly, especially when unmapping mmap'd pages. In order for these to properly go through COW, we run them through a fixup worker to wait for stable pages, and do the delalloc prep. 87826df0ec36 added a window where the dirty pages were cleaned, but pending more action from the fixup worker. We clear_page_dirty_for_io() before we call into writepage, so the page is no longer dirty. The commit changed it so now we leave the page clean between unlocking it here and the fixup worker starting at some point in the future. During this window, page migration can jump in and relocate the page. Once our fixup work actually starts, it finds page->mapping is NULL and we end up freeing the page without ever writing it. This leads to crc errors and other exciting problems, since it screws up the whole statemachine for waiting for ordered extents. The fix here is to keep the page dirty while we're waiting for the fixup worker to get to work. This is accomplished by returning -EAGAIN from btrfs_writepage_cow_fixup if we queued the page up for fixup, which will cause the writepage function to redirty the page. Because we now expect the page to be dirty once it gets to the fixup worker we must adjust the error cases to call clear_page_dirty_for_io() on the page. That is the bulk of the patch, but it is not the fix, the fix is the -EAGAIN from btrfs_writepage_cow_fixup. We cannot separate these two changes out because the error conditions change with the new expectations. Signed-off-by: Chris Mason Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit a30a3d2067536cbcce26c055e70cc3a6ae4fd45c Author: Josef Bacik Date: Fri Jan 17 09:07:39 2020 -0500 btrfs: take overcommit into account in inc_block_group_ro inc_block_group_ro does a calculation to see if we have enough room left over if we mark this block group as read only in order to see if it's ok to mark the block group as read only. The problem is this calculation _only_ works for data, where our used is always less than our total. For metadata we will overcommit, so this will almost always fail for metadata. Fix this by exporting btrfs_can_overcommit, and then see if we have enough space to remove the remaining free space in the block group we are trying to mark read only. If we do then we can mark this block group as read only. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit a7a63acc6575ded6f48ab293e275e8b903325e54 Author: Josef Bacik Date: Fri Jan 17 09:07:38 2020 -0500 btrfs: fix force usage in inc_block_group_ro For some reason we've translated the do_chunk_alloc that goes into btrfs_inc_block_group_ro to force in inc_block_group_ro, but these are two different things. force for inc_block_group_ro is used when we are forcing the block group read only no matter what, for example when the underlying chunk is marked read only. We need to not do the space check here as this block group needs to be read only. btrfs_inc_block_group_ro() has a do_chunk_alloc flag that indicates that we need to pre-allocate a chunk before marking the block group read only. This has nothing to do with forcing, and in fact we _always_ want to do the space check in this case, so unconditionally pass false for force in this case. Then fixup inc_block_group_ro to honor force as it's expected and documented to do. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5750c37523a2c8cbb450b9ef31e21c2ba876b05e Author: Nikolay Borisov Date: Mon Jan 27 11:59:26 2020 +0200 btrfs: Correctly handle empty trees in find_first_clear_extent_bit Raviu reported that running his regular fs_trim segfaulted with the following backtrace: [ 237.525947] assertion failed: prev, in ../fs/btrfs/extent_io.c:1595 [ 237.525984] ------------[ cut here ]------------ [ 237.525985] kernel BUG at ../fs/btrfs/ctree.h:3117! [ 237.525992] invalid opcode: 0000 [#1] SMP PTI [ 237.525998] CPU: 4 PID: 4423 Comm: fstrim Tainted: G U OE 5.4.14-8-vanilla #1 [ 237.526001] Hardware name: ASUSTeK COMPUTER INC. [ 237.526044] RIP: 0010:assfail.constprop.58+0x18/0x1a [btrfs] [ 237.526079] Call Trace: [ 237.526120] find_first_clear_extent_bit+0x13d/0x150 [btrfs] [ 237.526148] btrfs_trim_fs+0x211/0x3f0 [btrfs] [ 237.526184] btrfs_ioctl_fitrim+0x103/0x170 [btrfs] [ 237.526219] btrfs_ioctl+0x129a/0x2ed0 [btrfs] [ 237.526227] ? filemap_map_pages+0x190/0x3d0 [ 237.526232] ? do_filp_open+0xaf/0x110 [ 237.526238] ? _copy_to_user+0x22/0x30 [ 237.526242] ? cp_new_stat+0x150/0x180 [ 237.526247] ? do_vfs_ioctl+0xa4/0x640 [ 237.526278] ? btrfs_ioctl_get_supported_features+0x30/0x30 [btrfs] [ 237.526283] do_vfs_ioctl+0xa4/0x640 [ 237.526288] ? __do_sys_newfstat+0x3c/0x60 [ 237.526292] ksys_ioctl+0x70/0x80 [ 237.526297] __x64_sys_ioctl+0x16/0x20 [ 237.526303] do_syscall_64+0x5a/0x1c0 [ 237.526310] entry_SYSCALL_64_after_hwframe+0x49/0xbe That was due to btrfs_fs_device::aloc_tree being empty. Initially I thought this wasn't possible and as a percaution have put the assert in find_first_clear_extent_bit. Turns out this is indeed possible and could happen when a file system with SINGLE data/metadata profile has a 2nd device added. Until balance is run or a new chunk is allocated on this device it will be completely empty. In this case find_first_clear_extent_bit should return the full range [0, -1ULL] and let the caller handle this i.e for trim the end will be capped at the size of actual device. Link: https://lore.kernel.org/linux-btrfs/izW2WNyvy1dEDweBICizKnd2KDwDiDyY2EYQr4YCwk7pkuIpthx-JRn65MPBde00ND6V0_Lh8mW0kZwzDiLDv25pUYWxkskWNJnVP0kgdMA=@protonmail.com/ Fixes: 45bfcfc168f8 ("btrfs: Implement find_first_clear_extent_bit") CC: stable@vger.kernel.org # 5.2+ Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit 42ffb0bf584ae5b6b38f72259af1e0ee417ac77f Author: Josef Bacik Date: Thu Jan 23 15:33:02 2020 -0500 btrfs: flush write bio if we loop in extent_write_cache_pages There exists a deadlock with range_cyclic that has existed forever. If we loop around with a bio already built we could deadlock with a writer who has the page locked that we're attempting to write but is waiting on a page in our bio to be written out. The task traces are as follows PID: 1329874 TASK: ffff889ebcdf3800 CPU: 33 COMMAND: "kworker/u113:5" #0 [ffffc900297bb658] __schedule at ffffffff81a4c33f #1 [ffffc900297bb6e0] schedule at ffffffff81a4c6e3 #2 [ffffc900297bb6f8] io_schedule at ffffffff81a4ca42 #3 [ffffc900297bb708] __lock_page at ffffffff811f145b #4 [ffffc900297bb798] __process_pages_contig at ffffffff814bc502 #5 [ffffc900297bb8c8] lock_delalloc_pages at ffffffff814bc684 #6 [ffffc900297bb900] find_lock_delalloc_range at ffffffff814be9ff #7 [ffffc900297bb9a0] writepage_delalloc at ffffffff814bebd0 #8 [ffffc900297bba18] __extent_writepage at ffffffff814bfbf2 #9 [ffffc900297bba98] extent_write_cache_pages at ffffffff814bffbd PID: 2167901 TASK: ffff889dc6a59c00 CPU: 14 COMMAND: "aio-dio-invalid" #0 [ffffc9003b50bb18] __schedule at ffffffff81a4c33f #1 [ffffc9003b50bba0] schedule at ffffffff81a4c6e3 #2 [ffffc9003b50bbb8] io_schedule at ffffffff81a4ca42 #3 [ffffc9003b50bbc8] wait_on_page_bit at ffffffff811f24d6 #4 [ffffc9003b50bc60] prepare_pages at ffffffff814b05a7 #5 [ffffc9003b50bcd8] btrfs_buffered_write at ffffffff814b1359 #6 [ffffc9003b50bdb0] btrfs_file_write_iter at ffffffff814b5933 #7 [ffffc9003b50be38] new_sync_write at ffffffff8128f6a8 #8 [ffffc9003b50bec8] vfs_write at ffffffff81292b9d #9 [ffffc9003b50bf00] ksys_pwrite64 at ffffffff81293032 I used drgn to find the respective pages we were stuck on page_entry.page 0xffffea00fbfc7500 index 8148 bit 15 pid 2167901 page_entry.page 0xffffea00f9bb7400 index 7680 bit 0 pid 1329874 As you can see the kworker is waiting for bit 0 (PG_locked) on index 7680, and aio-dio-invalid is waiting for bit 15 (PG_writeback) on index 8148. aio-dio-invalid has 7680, and the kworker epd looks like the following crash> struct extent_page_data ffffc900297bbbb0 struct extent_page_data { bio = 0xffff889f747ed830, tree = 0xffff889eed6ba448, extent_locked = 0, sync_io = 0 } Probably worth mentioning as well that it waits for writeback of the page to complete while holding a lock on it (at prepare_pages()). Using drgn I walked the bio pages looking for page 0xffffea00fbfc7500 which is the one we're waiting for writeback on bio = Object(prog, 'struct bio', address=0xffff889f747ed830) for i in range(0, bio.bi_vcnt.value_()): bv = bio.bi_io_vec[i] if bv.bv_page.value_() == 0xffffea00fbfc7500: print("FOUND IT") which validated what I suspected. The fix for this is simple, flush the epd before we loop back around to the beginning of the file during writeout. Fixes: b293f02e1423 ("Btrfs: Add writepages support") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 7227ff4de55d931bbdc156c8ef0ce4f100c78a5b Author: Filipe Manana Date: Wed Jan 22 12:23:20 2020 +0000 Btrfs: fix race between adding and putting tree mod seq elements and nodes There is a race between adding and removing elements to the tree mod log list and rbtree that can lead to use-after-free problems. Consider the following example that explains how/why the problems happens: 1) Task A has mod log element with sequence number 200. It currently is the only element in the mod log list; 2) Task A calls btrfs_put_tree_mod_seq() because it no longer needs to access the tree mod log. When it enters the function, it initializes 'min_seq' to (u64)-1. Then it acquires the lock 'tree_mod_seq_lock' before checking if there are other elements in the mod seq list. Since the list it empty, 'min_seq' remains set to (u64)-1. Then it unlocks the lock 'tree_mod_seq_lock'; 3) Before task A acquires the lock 'tree_mod_log_lock', task B adds itself to the mod seq list through btrfs_get_tree_mod_seq() and gets a sequence number of 201; 4) Some other task, name it task C, modifies a btree and because there elements in the mod seq list, it adds a tree mod elem to the tree mod log rbtree. That node added to the mod log rbtree is assigned a sequence number of 202; 5) Task B, which is doing fiemap and resolving indirect back references, calls btrfs get_old_root(), with 'time_seq' == 201, which in turn calls tree_mod_log_search() - the search returns the mod log node from the rbtree with sequence number 202, created by task C; 6) Task A now acquires the lock 'tree_mod_log_lock', starts iterating the mod log rbtree and finds the node with sequence number 202. Since 202 is less than the previously computed 'min_seq', (u64)-1, it removes the node and frees it; 7) Task B still has a pointer to the node with sequence number 202, and it dereferences the pointer itself and through the call to __tree_mod_log_rewind(), resulting in a use-after-free problem. This issue can be triggered sporadically with the test case generic/561 from fstests, and it happens more frequently with a higher number of duperemove processes. When it happens to me, it either freezes the VM or it produces a trace like the following before crashing: [ 1245.321140] general protection fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC PTI [ 1245.321200] CPU: 1 PID: 26997 Comm: pool Not tainted 5.5.0-rc6-btrfs-next-52 #1 [ 1245.321235] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-0-ga698c8995f-prebuilt.qemu.org 04/01/2014 [ 1245.321287] RIP: 0010:rb_next+0x16/0x50 [ 1245.321307] Code: .... [ 1245.321372] RSP: 0018:ffffa151c4d039b0 EFLAGS: 00010202 [ 1245.321388] RAX: 6b6b6b6b6b6b6b6b RBX: ffff8ae221363c80 RCX: 6b6b6b6b6b6b6b6b [ 1245.321409] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8ae221363c80 [ 1245.321439] RBP: ffff8ae20fcc4688 R08: 0000000000000002 R09: 0000000000000000 [ 1245.321475] R10: ffff8ae20b120910 R11: 00000000243f8bb1 R12: 0000000000000038 [ 1245.321506] R13: ffff8ae221363c80 R14: 000000000000075f R15: ffff8ae223f762b8 [ 1245.321539] FS: 00007fdee1ec7700(0000) GS:ffff8ae236c80000(0000) knlGS:0000000000000000 [ 1245.321591] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1245.321614] CR2: 00007fded4030c48 CR3: 000000021da16003 CR4: 00000000003606e0 [ 1245.321642] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1245.321668] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1245.321706] Call Trace: [ 1245.321798] __tree_mod_log_rewind+0xbf/0x280 [btrfs] [ 1245.321841] btrfs_search_old_slot+0x105/0xd00 [btrfs] [ 1245.321877] resolve_indirect_refs+0x1eb/0xc60 [btrfs] [ 1245.321912] find_parent_nodes+0x3dc/0x11b0 [btrfs] [ 1245.321947] btrfs_check_shared+0x115/0x1c0 [btrfs] [ 1245.321980] ? extent_fiemap+0x59d/0x6d0 [btrfs] [ 1245.322029] extent_fiemap+0x59d/0x6d0 [btrfs] [ 1245.322066] do_vfs_ioctl+0x45a/0x750 [ 1245.322081] ksys_ioctl+0x70/0x80 [ 1245.322092] ? trace_hardirqs_off_thunk+0x1a/0x1c [ 1245.322113] __x64_sys_ioctl+0x16/0x20 [ 1245.322126] do_syscall_64+0x5c/0x280 [ 1245.322139] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 1245.322155] RIP: 0033:0x7fdee3942dd7 [ 1245.322177] Code: .... [ 1245.322258] RSP: 002b:00007fdee1ec6c88 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 1245.322294] RAX: ffffffffffffffda RBX: 00007fded40210d8 RCX: 00007fdee3942dd7 [ 1245.322314] RDX: 00007fded40210d8 RSI: 00000000c020660b RDI: 0000000000000004 [ 1245.322337] RBP: 0000562aa89e7510 R08: 0000000000000000 R09: 00007fdee1ec6d44 [ 1245.322369] R10: 0000000000000073 R11: 0000000000000246 R12: 00007fdee1ec6d48 [ 1245.322390] R13: 00007fdee1ec6d40 R14: 00007fded40210d0 R15: 00007fdee1ec6d50 [ 1245.322423] Modules linked in: .... [ 1245.323443] ---[ end trace 01de1e9ec5dff3cd ]--- Fix this by ensuring that btrfs_put_tree_mod_seq() computes the minimum sequence number and iterates the rbtree while holding the lock 'tree_mod_log_lock' in write mode. Also get rid of the 'tree_mod_seq_lock' lock, since it is now redundant. Fixes: bd989ba359f2ac ("Btrfs: add tree modification log functions") Fixes: 097b8a7c9e48e2 ("Btrfs: join tree mod log code with the code holding back delayed refs") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Josef Bacik Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit b2ff728bae9b04b533fbc8de66f1719c4dc889de Author: Pierre Morel Date: Fri Jan 31 05:02:05 2020 -0500 selftests: KVM: testing the local IRQs resets Local IRQs are reset by a normal cpu reset. The initial cpu reset and the clear cpu reset, as superset of the normal reset, both clear the IRQs too. Let's inject an interrupt to a vCPU before calling a reset and see if it is gone after the reset. We choose to inject only an emergency interrupt at this point and can extend the test to other types of IRQs later. Signed-off-by: Pierre Morel Signed-off-by: Janosch Frank [minor fixups] Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth Link: https://lore.kernel.org/r/20200131100205.74720-7-frankja@linux.ibm.com Signed-off-by: Christian Borntraeger commit b25d4cb43f31e31c176eb862db2ad3072b496d44 Author: Janosch Frank Date: Fri Jan 31 05:02:04 2020 -0500 selftests: KVM: s390x: Add reset tests Test if the registers end up having the correct values after a normal, initial and clear reset. Signed-off-by: Janosch Frank Reviewed-by: Thomas Huth Reviewed-by: Cornelia Huck Link: https://lore.kernel.org/r/20200131100205.74720-6-frankja@linux.ibm.com Signed-off-by: Christian Borntraeger commit ada0a50d7685e35c1b8ee1deb9a38203acda6683 Author: Janosch Frank Date: Fri Jan 31 05:02:03 2020 -0500 selftests: KVM: Add fpu and one reg set/get library functions Add library access to more registers. Signed-off-by: Janosch Frank Reviewed-by: Thomas Huth Reviewed-by: Cornelia Huck Link: https://lore.kernel.org/r/20200131100205.74720-5-frankja@linux.ibm.com Signed-off-by: Christian Borntraeger commit 7de3f1423ff9431f3bd5023bb78d1e062314e7f0 Author: Janosch Frank Date: Fri Jan 31 05:02:02 2020 -0500 KVM: s390: Add new reset vcpu API The architecture states that we need to reset local IRQs for all CPU resets. Because the old reset interface did not support the normal CPU reset we never did that on a normal reset. Let's implement an interface for the missing normal and clear resets and reset all local IRQs, registers and control structures as stated in the architecture. Userspace might already reset the registers via the vcpu run struct, but as we need the interface for the interrupt clearing part anyway, we implement the resets fully and don't rely on userspace to reset the rest. Signed-off-by: Janosch Frank Reviewed-by: Cornelia Huck Reviewed-by: Christian Borntraeger Reviewed-by: Thomas Huth Link: https://lore.kernel.org/r/20200131100205.74720-4-frankja@linux.ibm.com Signed-off-by: Christian Borntraeger commit cca00ebb8ad3b3a5eb6e60b1ac7e9211f66af477 Author: Janosch Frank Date: Fri Jan 31 05:02:01 2020 -0500 KVM: s390: Cleanup initial cpu reset The code seems to be quite old and uses lots of unneeded spaces for alignment, which doesn't really help with readability. Let's: * Get rid of the extra spaces * Remove the ULs as they are not needed on 0s * Define constants for the CR 0 and 14 initial values * Use the sizeof of the gcr array to memset it to 0 Signed-off-by: Janosch Frank Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth Link: https://lore.kernel.org/r/20200131100205.74720-3-frankja@linux.ibm.com Signed-off-by: Christian Borntraeger commit 55680890ea78be0df5e1384989f1be835043c084 Author: Christian Borntraeger Date: Fri Jan 31 05:02:00 2020 -0500 KVM: s390: do not clobber registers during guest reset/store status The initial CPU reset clobbers the userspace fpc and the store status ioctl clobbers the guest acrs + fpr. As these calls are only done via ioctl (and not via vcpu_run), no CPU context is loaded, so we can (and must) act directly on the sync regs, not on the thread context. Cc: stable@kernel.org Fixes: e1788bb995be ("KVM: s390: handle floating point registers in the run ioctl not in vcpu_put/load") Fixes: 31d8b8d41a7e ("KVM: s390: handle access registers in the run ioctl not in vcpu_put/load") Signed-off-by: Christian Borntraeger Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Signed-off-by: Janosch Frank Link: https://lore.kernel.org/r/20200131100205.74720-2-frankja@linux.ibm.com Signed-off-by: Christian Borntraeger commit c611990844c28c61ca4b35ff69d3a2ae95ccd486 Author: Christian Borntraeger Date: Thu Dec 5 07:40:43 2019 -0500 KVM: s390: ENOTSUPP -> EOPNOTSUPP fixups There is no ENOTSUPP for userspace. Reported-by: Julian Wiedmann Fixes: 519783935451 ("KVM: s390: introduce ais mode modify function") Fixes: 2c1a48f2e5ed ("KVM: S390: add new group for flic") Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth Signed-off-by: Christian Borntraeger commit 34b5a946a9543ce38d8ad1aacc4362533a813db7 Author: Krzysztof Kozlowski Date: Thu Jan 30 20:52:23 2020 +0100 powerpc: configs: Cleanup old Kconfig options CONFIG_ENABLE_WARN_DEPRECATED is gone since commit 771c035372a0 ("deprecate the '__deprecated' attribute warnings entirely and for good"). CONFIG_IOSCHED_DEADLINE and CONFIG_IOSCHED_CFQ are gone since commit f382fb0bcef4 ("block: remove legacy IO schedulers"). The IOSCHED_DEADLINE was replaced by MQ_IOSCHED_DEADLINE and it will be now enabled by default (along with MQ_IOSCHED_KYBER). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200130195223.3843-1-krzk@kernel.org commit 5e84dd547bce965c203cae71418cacb8592a0d3f Author: Michael Ellerman Date: Tue Jan 21 15:29:59 2020 +1100 powerpc/configs/skiroot: Enable some more hardening options Enable more hardening options. Note BUG_ON_DATA_CORRUPTION selects DEBUG_LIST and is essentially just a synonym for it. DEBUG_SG, DEBUG_NOTIFIERS, DEBUG_LIST, DEBUG_CREDENTIALS and SCHED_STACK_END_CHECK should all be low overhead and just add a few extra checks. SLAB_FREELIST_RANDOM, and SLUB_DEBUG_ON will add some overhead to the SLAB allocator, but nothing that should be meaningful for skiroot. Unselecting SLAB_MERGE_DEFAULT causes the SLAB to use more memory, but the skiroot kernel shouldn't be memory constrained on any of our systems, all it does is run a small bootloader. Disabling merging has some security/robustness benefit as it means a user-after-free or overflow will be limited to the objects in that slab, rather than potentially affecting objects from unrelated slabs that have been merged. Note also that slab merging is disabled anyway by enabling SLUB_DEBUG_ON, because of the SLAB_NEVER_MERGE mask. Signed-off-by: Michael Ellerman Acked-by: Joel Stanley Link: https://lore.kernel.org/r/20200121043000.16212-9-mpe@ellerman.id.au commit 3554c12d835d16824afb0abaa6689bd89d26a009 Author: Michael Ellerman Date: Tue Jan 21 15:29:58 2020 +1100 powerpc/configs/skiroot: Disable xmon default & enable reboot on panic If the skiroot kernel crashes we don't want it sitting at an xmon prompt forever. Instead it's more helpful to reboot and bring the boot loader back up, and if the crash was transient we can then boot successfully. Similarly if we panic we should reboot, with a short timeout in case someone is watching the console. Signed-off-by: Michael Ellerman Acked-by: Joel Stanley Link: https://lore.kernel.org/r/20200121043000.16212-8-mpe@ellerman.id.au commit 579baeece66ef9360da7d815fd328faf271a3008 Author: Joel Stanley Date: Tue Jan 21 15:29:57 2020 +1100 powerpc/configs/skiroot: Enable security features This turns on HARDENED_USERCOPY with HARDENED_USERCOPY_PAGESPAN, and FORTIFY_SOURCE. It also enables SECURITY_LOCKDOWN_LSM with _EARLY and LOCK_DOWN_KERNEL_FORCE_INTEGRITY options enabled. This still allows xmon to be used in read-only mode. MODULE_SIG is selected by lockdown, so it is still enabled. Because we're setting LOCK_DOWN_KERNELFORCE_INTEGRITY=y we also need to enable KEXEC_FILE=y so that kexec continues to work. Signed-off-by: Joel Stanley [mpe: Switch to lockdown integrity mode per oohal, enable KEXEC_FILE as reported by jms] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200121043000.16212-7-mpe@ellerman.id.au commit cdc7b23f1e90983cb5fb0c9a0a5e6e08b5d71563 Author: Michael Ellerman Date: Tue Jan 21 15:29:56 2020 +1100 powerpc/configs/skiroot: Update for symbol movement only Signed-off-by: Michael Ellerman Acked-by: Joel Stanley Link: https://lore.kernel.org/r/20200121043000.16212-6-mpe@ellerman.id.au commit 81881e0998bcdf4dd151fa7162ad9f9fd00e0fe3 Author: Michael Ellerman Date: Tue Jan 21 15:29:55 2020 +1100 powerpc/configs/skiroot: Drop default n CONFIG_CRYPTO_ECHAINIV It's default n so we don't need to disable it. Signed-off-by: Michael Ellerman Acked-by: Joel Stanley Link: https://lore.kernel.org/r/20200121043000.16212-5-mpe@ellerman.id.au commit 028fb6ded72f89b090a455656bb2ce091fbf996f Author: Michael Ellerman Date: Tue Jan 21 15:29:54 2020 +1100 powerpc/configs/skiroot: Drop HID_LOGITECH Commit bdd08fff4915 ("HID: logitech: Add depends on LEDS_CLASS to Logitech Kconfig entry") made HID_LOGITECH depend on LEDS_CLASS which we do not enable, meaning we are not actually enabling those drivers any more. The Kconfig help text suggests USB HID compliant Logictech devices will continue to work without HID_LOGITECH, so just drop it. Signed-off-by: Michael Ellerman Acked-by: Joel Stanley Link: https://lore.kernel.org/r/20200121043000.16212-4-mpe@ellerman.id.au commit 7115bf789c4b907e4b82dc0a2965b4ee668c545d Author: Michael Ellerman Date: Tue Jan 21 15:29:53 2020 +1100 powerpc/configs: Drop NET_VENDOR_HP which moved to staging The HP network driver moved to staging in commit 52340b82cf1a ("hp100: Move 100BaseVG AnyLAN driver to staging") meaning we don't need to disable it any more in our defconfigs. Signed-off-by: Michael Ellerman Acked-by: Joel Stanley Link: https://lore.kernel.org/r/20200121043000.16212-3-mpe@ellerman.id.au commit f3e96a71aaa9aa84fd40f93c417d3da917b8f13d Author: Michael Ellerman Date: Tue Jan 21 15:29:52 2020 +1100 powerpc/configs: NET_CADENCE became NET_VENDOR_CADENCE The NET_CADENCE symbol was renamed to NET_VENDOR_CADENCE, so we don't need to disable the former, see commit 0df5f81c481e ("net: ethernet: Add missing VENDOR to Cadence and Packet Engines symbols"). Signed-off-by: Michael Ellerman Acked-by: Joel Stanley Link: https://lore.kernel.org/r/20200121043000.16212-2-mpe@ellerman.id.au commit 76e4bd93369b87d97c2b1bcd6e754a89f422235b Author: Michael Ellerman Date: Tue Jan 21 15:29:51 2020 +1100 powerpc/configs: Drop CONFIG_QLGE which moved to staging The QLGE driver moved to staging in commit 955315b0dc8c ("qlge: Move drivers/net/ethernet/qlogic/qlge/ to drivers/staging/qlge/"), meaning our defconfigs that enable it have no effect as we don't enable CONFIG_STAGING. It sounds like the device is obsolete, so drop the driver. Signed-off-by: Michael Ellerman Acked-by: Joel Stanley Link: https://lore.kernel.org/r/20200121043000.16212-1-mpe@ellerman.id.au commit e093e53f4f70b126ff63bc422e5135e934e35a1b Author: Nathan Chancellor Date: Wed Jan 29 18:41:30 2020 -0700 power: avs: qcom-cpr: Avoid clang -Wsometimes-uninitialized in cpr_scale Clang warns (trimmed for brevity): ../drivers/power/avs/qcom-cpr.c:570:13: warning: variable 'reg_mask' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] ../drivers/power/avs/qcom-cpr.c:520:13: warning: variable 'new_uV' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] Due to the fact that Clang's static analysis happens before any optimization passes are taken into account, it cannot see that both branches in the if statement must be taken because dir cannot be something other than UP or DOWN due to the check at the top of this function. Change the else if condition to else to fix this false positive. Fixes: bf6910abf548 ("power: avs: Add support for CPR (Core Power Reduction)") Link: https://github.com/ClangBuiltLinux/linux/issues/840 Signed-off-by: Nathan Chancellor Acked-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki commit db5a10c172ed0d41aa4139ef9f1abd8128568267 Author: Brendan Higgins Date: Mon Jan 27 15:53:56 2020 -0800 power: avs: qcom-cpr: add unspecified HAS_IOMEM dependency Currently CONFIG_QCOM_CPR=y implicitly depends on CONFIG_HAS_IOMEM=y; consequently, on architectures without IOMEM we get the following build error: /usr/bin/ld: drivers/power/avs/qcom-cpr.o: in function `cpr_probe': drivers/power/avs/qcom-cpr.c:1690: undefined reference to `devm_ioremap_resource' Fix the build error by adding the unspecified dependency. Signed-off-by: Brendan Higgins Signed-off-by: Rafael J. Wysocki commit adef0cedeaaee0a1a9495adb599806d3c0a8b31e Author: Heiko Stuebner Date: Tue Jan 21 23:28:59 2020 +0100 PM / AVS: rockchip-io: fix the supply naming for the emmc supply on px30 The supply going to the emmc/flash is named vccio6, not vccio0 and while the code does this correctly already, the comments and error output do not. So just change these values to the correct ones. Signed-off-by: Heiko Stuebner Signed-off-by: Rafael J. Wysocki commit 03b10951e9f6e6297d967a903c8d743b245ae3b8 Author: Niklas Cassel Date: Mon Jan 13 21:02:58 2020 +0100 power: avs: qcom-cpr: add a printout after the driver has been initialized In order to easier inform the user that the driver has been initialized successfully, add a printout after the driver has been initialized. At the same time, remove a dev_dbg() that is now redundant. Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Signed-off-by: Rafael J. Wysocki commit 8c173d5e044d7e7fc9f6070c0fc1c79c0f8256a6 Author: Colin Ian King Date: Thu Jan 30 10:05:37 2020 +0000 thermal: stm32: fix spelling mistake "preprare" -> "prepare" There is a spelling mistake in a dev_err error message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200130100537.18069-1-colin.king@canonical.com commit fe27f13d677ccd826386094df6977cfbc13ccf5e Author: Randy Dunlap Date: Mon Jan 20 14:33:16 2020 -0800 Documentation: cpu-idle-cooling: fix a SEVERE docs build failure Sphinx ('make htmldocs') stops with a SEVERE error: Sphinx parallel build error: SystemMessage: /home/rdunlap/lnx/next/linux-next-20200120/Documentation/driver-api/thermal/cpu-idle-cooling.rst:69: (SEVERE/4) Unexpected section title. ^ | so fix the .rst file so that the SEVERE build error does not happen. Also fix another minor formatting warning (unexpected unindent). Signed-off-by: Randy Dunlap Cc: Zhang Rui Cc: Daniel Lezcano Cc: Amit Kucheria Cc: linux-pm@vger.kernel.org Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/712c1152-56b5-307f-b3f3-ed03a30b804a@infradead.org commit 82b2c6ffd399c9fcd542fd681bb8c6d41f035c7e Merge: 709bd70d070e 1e4f63aecb53 0552e05fdfea Author: Rafael J. Wysocki Date: Fri Jan 31 10:28:23 2020 +0100 Merge branches 'pm-cpufreq' and 'pm-core' * pm-cpufreq: cpufreq: Avoid creating excessively large stack frames * pm-core: PM: core: Fix handling of devices deleted during system-wide resume commit 43e76cd368fbb67e767da5363ffeaa3989993c8c Author: Alexandre Ghiti Date: Sat Jan 18 12:03:35 2020 -0500 powerpc: Do not consider weak unresolved symbol relocations as bad Commit 8580ac9404f6 ("bpf: Process in-kernel BTF") introduced two weak symbols that may be unresolved at link time which result in an absolute relocation to 0. relocs_check.sh emits the following warning: "WARNING: 2 bad relocations c000000001a41478 R_PPC64_ADDR64 _binary__btf_vmlinux_bin_start c000000001a41480 R_PPC64_ADDR64 _binary__btf_vmlinux_bin_end" whereas those relocations are legitimate even for a relocatable kernel compiled with -pie option. relocs_check.sh already excluded some weak unresolved symbols explicitly: remove those hardcoded symbols and add some logic that parses the symbols using nm, retrieves all the weak unresolved symbols and excludes those from the list of the potential bad relocations. Reported-by: Stephen Rothwell Signed-off-by: Alexandre Ghiti Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200118170335.21440-1-alex@ghiti.fr commit 85fc95d75970ee7dd8e01904e7fb1197c275ba6b Author: Cengiz Can Date: Mon Jan 20 17:15:54 2020 +0300 perf maps: Add missing unlock to maps__insert() error case `tools/perf/util/map.c` has a function named `maps__insert` that acquires a write lock if its in multithread context. Even though this lock is released when function successfully completes, there's a branch that is executed when `maps_by_name == NULL` that returns from this function without releasing the write lock. Added an `up_write` to release the lock when this happens. Fixes: a7c2b572e217 ("perf map_groups: Auto sort maps by name, if needed") Signed-off-by: Cengiz Can Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20200120141553.23934-1-cengiz@kernel.wtf Signed-off-by: Arnaldo Carvalho de Melo commit 1873f1547dde65c687de143938581347a9312207 Author: Thomas Richter Date: Mon Jan 20 14:20:10 2020 +0100 perf probe: Add ustring support for perf probe command Kernel commit 88903c464321 ("tracing/probe: Add ustring type for user-space string") adds support for user-space strings when type 'ustring' is specified. Here is an example using sysfs command line interface for kprobes: Function to probe: struct filename * getname_flags(const char __user *filename, int flags, int *empty) Setup: # cd /sys/kernel/debug/tracing/ # echo 'p:tmr1 getname_flags +0(%r2):ustring' > kprobe_events # cat events/kprobes/tmr1/format | fgrep print print fmt: "(%lx) arg1=\"%s\"", REC->__probe_ip, REC->arg1 # echo 1 > events/kprobes/tmr1/enable # touch /tmp/111 # echo 0 > events/kprobes/tmr1/enable # cat trace|fgrep /tmp/111 touch-5846 [005] d..2 255520.717960: tmr1:\ (getname_flags+0x0/0x400) arg1="/tmp/111" Doing the same with the perf tool fails. Using type 'string' succeeds: # perf probe "vfs_getname=getname_flags:72 pathname=filename:string" Added new event: probe:vfs_getname (on getname_flags:72 with pathname=filename:string) .... # perf probe -d probe:vfs_getname Removed event: probe:vfs_getname However using type 'ustring' fails (output before): # perf probe "vfs_getname=getname_flags:72 pathname=filename:ustring" Failed to write event: Invalid argument Error: Failed to add events. # Fix this by adding type 'ustring' in function convert_variable_type(). Using ustring succeeds (output after): # ./perf probe "vfs_getname=getname_flags:72 pathname=filename:ustring" Added new event: probe:vfs_getname (on getname_flags:72 with pathname=filename:ustring) You can now use it in all perf tools, such as: perf record -e probe:vfs_getname -aR sleep 1 # Note: This issue also exists on x86, it is not s390 specific. Signed-off-by: Thomas Richter Cc: Heiko Carstens Cc: Vasily Gorbik Cc: sumanthk@linux.ibm.com Link: http://lore.kernel.org/lkml/20200120132011.64698-2-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit b49f8e0e7bd17b968129790e40f9e2566f4f95ec Author: Raul E Rangel Date: Thu Nov 21 14:10:51 2019 -0700 i2c: cros-ec-tunnel: Fix ACPI identifier The initial patch was using the incorrect identifier. Fixes: 9af1563a5486 ("i2c: cros-ec-tunnel: Make the device acpi compatible") Signed-off-by: Raul E Rangel Acked-by: Enric Balletbo i Serra Signed-off-by: Wolfram Sang commit 8ff2d7ca4a55dfabf12e876369835bd024eb4621 Author: Akshu Agrawal Date: Thu Nov 21 14:36:17 2019 +0530 i2c: cros-ec-tunnel: Fix slave device enumeration During adding of the adapter the slave device registration use to fail as the acpi companion field was not populated. Fixes: 9af1563a5486 ("i2c: cros-ec-tunnel: Make the device acpi compatible") Signed-off-by: Akshu Agrawal Acked-by: Raul E Rangel Reviewed-by: Enric Balletbo i Serra Signed-off-by: Wolfram Sang commit b45f1b3b585e195a7daead16d914e164310b1df6 Merge: d47c7f062680 5379e4dd3220 Author: Dave Airlie Date: Fri Jan 31 15:18:21 2020 +1000 Merge branch 'ttm-prot-fix' of git://people.freedesktop.org/~thomash/linux into drm-next A small fix for the long-standing ttm vm page protection hack. Sent as a separate PR as it touches mm, has all acks in place. Signed-off-by: Dave Airlie From: Thomas Hellström (VMware) Link: https://patchwork.freedesktop.org/patch/msgid/20200116102411.3056-1-thomas_os@shipmail.org commit d5fae240b9bdb2d374624e6aa9f99a4527f111ec Author: Krzysztof Kozlowski Date: Thu Jan 30 20:25:20 2020 +0100 m68k: configs: Cleanup old Kconfig IO scheduler options CONFIG_IOSCHED_DEADLINE and CONFIG_IOSCHED_CFQ are gone since commit f382fb0bcef4 ("block: remove legacy IO schedulers"). The IOSCHED_DEADLINE was replaced by MQ_IOSCHED_DEADLINE and it will be now enabled by default (along with MQ_IOSCHED_KYBER). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Greg Ungerer commit a932872f1b76f287497da2f4501f4ea26622ad9e Author: Yangbo Lu Date: Mon Dec 16 18:01:11 2019 +0800 clk: qoriq: add ls1088a hwaccel clocks support This patch is to add hwaccel clocks information for ls1088a. Signed-off-by: Yangbo Lu Link: https://lkml.kernel.org/r/20191216100111.17122-1-yangbo.lu@nxp.com Signed-off-by: Stephen Boyd commit d37010a3c162f23e47a11a8f5946dbd974999c42 Author: Wen He Date: Fri Dec 13 16:34:02 2019 +0800 clk: ls1028a: Add clock driver for Display output interface Add clock driver for QorIQ LS1028A Display output interfaces(LCD, DPHY), as implemented in TSMC CLN28HPM PLL, this PLL supports the programmable integer division and range of the display output pixel clock's 27-594MHz. Signed-off-by: Wen He Signed-off-by: Michael Walle Link: https://lkml.kernel.org/r/20191213083402.35678-2-wen.he_1@nxp.com Signed-off-by: Stephen Boyd commit 87a5ffb34b475263c3f3d187f776d77178be8eb9 Author: Wen He Date: Fri Dec 13 16:34:01 2019 +0800 dt/bindings: clk: Add YAML schemas for LS1028A Display Clock bindings LS1028A has a clock domain PXLCLK0 used for provide pixel clocks to Display output interface. Add a YAML schema for this. Signed-off-by: Wen He Signed-off-by: Michael Walle Reviewed-by: Rob Herring Link: https://lkml.kernel.org/r/20191213083402.35678-1-wen.he_1@nxp.com Signed-off-by: Stephen Boyd commit 2577e373bbc07f18680287b3958d3b2fdebe4b20 Author: Yulia Kartseva Date: Thu Jan 30 15:13:10 2020 -0800 runqslower: Fix Makefile Fix undefined reference linker errors when building runqslower with gcc 7.4.0 on Ubuntu 18.04. The issue is with misplaced -lelf, -lz options in Makefile: $(Q)$(CC) $(CFLAGS) -lelf -lz $^ -o $@ -lelf, -lz options should follow the list of target dependencies: $(Q)$(CC) $(CFLAGS) $^ -lelf -lz -o $@ or after substitution cc -g -Wall runqslower.o libbpf.a -lelf -lz -o runqslower The current order of gcc params causes failure in libelf symbols resolution, e.g. undefined reference to `elf_memory' Fixes: 9c01546d26d2 ("tools/bpf: Add runqslower tool to tools/bpf") Signed-off-by: Julia Kartseva Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/908498f794661c44dca54da9e09dc0c382df6fcb.1580425879.git.hex@fb.com commit ccaaaf6fe5a5e1fffca5cca0f3fc4ec84d7ae752 Merge: 35c222fd3236 45fc24e89b7c Author: Linus Torvalds Date: Thu Jan 30 16:11:50 2020 -0800 Merge tag 'mpx-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/daveh/x86-mpx Pull x86 MPX removal from Dave Hansen: "MPX requires recompiling applications, which requires compiler support. Unfortunately, GCC 9.1 is expected to be be released without support for MPX. This means that there was only a relatively small window where folks could have ever used MPX. It failed to gain wide adoption in the industry, and Linux was the only mainstream OS to ever support it widely. Support for the feature may also disappear on future processors. This set completes the process that we started during the 5.4 merge window when the MPX prctl()s were removed. XSAVE support is left in place, which allows MPX-using KVM guests to continue to function" * tag 'mpx-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/daveh/x86-mpx: x86/mpx: remove MPX from arch/x86 mm: remove arch_bprm_mm_init() hook x86/mpx: remove bounds exception code x86/mpx: remove build infrastructure x86/alternatives: add missing insn.h include commit 079a8834bb6596d74eca5356b0d0ea0529d4f60d Author: Krzysztof Kozlowski Date: Thu Jan 30 20:21:29 2020 +0100 xtensa: configs: Cleanup old Kconfig IO scheduler options CONFIG_IOSCHED_DEADLINE and CONFIG_IOSCHED_CFQ are gone since commit f382fb0bcef4 ("block: remove legacy IO schedulers"). The IOSCHED_DEADLINE was replaced by MQ_IOSCHED_DEADLINE and it will be now enabled by default (along with MQ_IOSCHED_KYBER). Signed-off-by: Krzysztof Kozlowski Message-Id: <20200130192129.2677-1-krzk@kernel.org> Signed-off-by: Max Filippov commit 35c222fd323629cf2e834eb8aff77058856ffdda Merge: e84bcd61f686 4575243c5c17 Author: Linus Torvalds Date: Thu Jan 30 15:46:02 2020 -0800 Merge tag 'mtd/for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD updates from Miquel Raynal: "MTD core - block2mtd: page index should use pgoff_t - maps: physmap: minimal Runtime PM support - maps: pcmciamtd: avoid possible sleep-in-atomic-context bugs - concat: Fix a comment referring to an unknown symbol Raw NAND: - Macronix: Use match_string() helper - Atmel: switch to using devm_fwnode_gpiod_get() - Denali: rework the SKIP_BYTES feature and add reset controlling - Brcmnand: set appropriate DMA mask - Cadence: add unspecified HAS_IOMEM dependency - Various cleanup. Onenand: - Rename Samsung and Omap2 drivers to avoid possible build warnings - Enable compile testing - Various build issues - Kconfig cleanup SPI-NAND: - Support for Toshiba TC58CVG2S0HRAIJ SPI-NOR: - Add support for TB selection using SR bit 6, - Add support for few flashes" * tag 'mtd/for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (41 commits) mtd: concat: Fix a comment referring to an unknown symbol mtd: rawnand: add unspecified HAS_IOMEM dependency mtd: block2mtd: page index should use pgoff_t mtd: maps: physmap: Add minimal Runtime PM support mtd: maps: pcmciamtd: fix possible sleep-in-atomic-context bugs in pcmciamtd_set_vpp() mtd: onenand: Rename omap2 driver to avoid a build warning mtd: onenand: Use a better name for samsung driver mtd: rawnand: atmel: switch to using devm_fwnode_gpiod_get() mtd: spinand: add support for Toshiba TC58CVG2S0HRAIJ mtd: rawnand: macronix: Use match_string() helper to simplify the code mtd: sharpslpart: Fix unsigned comparison to zero mtd: onenand: Enable compile testing of OMAP and Samsung drivers mtd: onenand: samsung: Fix printing format for size_t on 64-bit mtd: onenand: samsung: Fix pointer cast -Wpointer-to-int-cast warnings on 64 bit mtd: rawnand: denali: remove hard-coded DENALI_DEFAULT_OOB_SKIP_BYTES mtd: rawnand: denali_dt: add reset controlling dt-bindings: mtd: denali_dt: document reset property mtd: rawnand: denali_dt: Add support for configuring SPARE_AREA_SKIP_BYTES mtd: rawnand: denali_dt: error out if platform has no associated data mtd: rawnand: brcmnand: Set appropriate DMA mask ... commit e84bcd61f686d65956c9f54872778bb215059519 Merge: 6e135baed8e7 5d3805af279c Author: Linus Torvalds Date: Thu Jan 30 15:44:12 2020 -0800 Merge tag 'upstream-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull UBI/UBIFS updates from Miquel Raynal: "This pull request contains mostly fixes for UBI and UBIFS: UBI: - Fixes for memory leaks in error paths - Fix for an logic error in a fastmap selfcheck UBIFS: - Fix for FS_IOC_SETFLAGS related to fscrypt flag - Support for FS_ENCRYPT_FL - Fix for a dead lock in bulk-read mode" Sent on behalf of Richard Weinberger who is traveling. * tag 'upstream-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubi: Fix an error pointer dereference in error handling code ubifs: Fix memory leak from c->sup_node ubifs: Fix ino_t format warnings in orphan_delete() ubifs: Fix deadlock in concurrent bulk-read and writepage ubifs: Fix wrong memory allocation ubi: Free the normal volumes in error paths of ubi_attach_mtd_dev() ubi: Check the presence of volume before call ubi_fastmap_destroy_checkmap() ubifs: Add support for FS_ENCRYPT_FL ubifs: Fix FS_IOC_SETFLAGS unexpectedly clearing encrypt flag ubi: wl: Remove set but not used variable 'prev_e' ubi: fastmap: Fix inverted logic in seen selfcheck commit 6e135baed8e70b00b88f7608f6b041461a5270bc Merge: 0196be12aab2 80f2388afa6e Author: Linus Torvalds Date: Thu Jan 30 15:39:24 2020 -0800 Merge tag 'f2fs-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this series, we've implemented transparent compression experimentally. It supports LZO and LZ4, but will add more later as we investigate in the field more. At this point, the feature doesn't expose compressed space to user directly in order to guarantee potential data updates later to the space. Instead, the main goal is to reduce data writes to flash disk as much as possible, resulting in extending disk life time as well as relaxing IO congestion. Alternatively, we're also considering to add ioctl() to reclaim compressed space and show it to user after putting the immutable bit. Enhancements: - add compression support - avoid unnecessary locks in quota ops - harden power-cut scenario for zoned block devices - use private bio_set to avoid IO congestion - replace GC mutex with rwsem to serialize callers Bug fixes: - fix dentry consistency and memory corruption in rename()'s error case - fix wrong swap extent reports - fix casefolding bugs - change lock coverage to avoid deadlock - avoid GFP_KERNEL under f2fs_lock_op And, we've cleaned up sysfs entries to prepare no debugfs" * tag 'f2fs-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (31 commits) f2fs: fix race conditions in ->d_compare() and ->d_hash() f2fs: fix dcache lookup of !casefolded directories f2fs: Add f2fs stats to sysfs f2fs: delete duplicate information on sysfs nodes f2fs: change to use rwsem for gc_mutex f2fs: update f2fs document regarding to fsync_mode f2fs: add a way to turn off ipu bio cache f2fs: code cleanup for f2fs_statfs_project() f2fs: fix miscounted block limit in f2fs_statfs_project() f2fs: show the CP_PAUSE reason in checkpoint traces f2fs: fix deadlock allocating bio_post_read_ctx from mempool f2fs: remove unneeded check for error allocating bio_post_read_ctx f2fs: convert inline_dir early before starting rename f2fs: fix memleak of kobject f2fs: fix to add swap extent correctly f2fs: run fsck when getting bad inode during GC f2fs: support data compression f2fs: free sysfs kobject f2fs: declare nested quota_sem and remove unnecessary sems f2fs: don't put new_page twice in f2fs_rename ... commit 0196be12aab2dc3a3e44824045229b0e539be8fd Merge: 91f1a9566f38 154a4dcfc95f Author: Linus Torvalds Date: Thu Jan 30 15:37:41 2020 -0800 Merge tag 'for_v5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull UDF, quota, reiserfs, ext2 fixes and cleanups from Jan Kara: "A few assorted fixes and cleanups for udf, quota, reiserfs, and ext2" * tag 'for_v5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fs/reiserfs: remove unused macros fs/quota: remove unused macro udf: Clarify meaning of f_files in udf_statfs udf: Allow writing to 'Rewritable' partitions udf: Disallow R/W mode for disk with Metadata partition udf: Fix meaning of ENTITYID_FLAGS_* macros to be really bitwise-or flags udf: Fix free space reporting for metadata and virtual partitions udf: Update header files to UDF 2.60 udf: Move OSTA Identifier Suffix macros from ecma_167.h to osta_udf.h udf: Fix spelling in EXT_NEXT_EXTENT_ALLOCDESCS ext2: Adjust indentation in ext2_fill_super quota: avoid time_t in v1_disk_dqblk definition reiserfs: Fix spurious unlock in reiserfs_fill_super() error handling reiserfs: Fix memory leak of journal device string ext2: set proper errno in error case of ext2_fill_super() commit 91f1a9566f387137f2da1957792a8f9f07cd058f Merge: e5da4c933c50 b3531f5fc16d Author: Linus Torvalds Date: Thu Jan 30 15:24:24 2020 -0800 Merge tag 'xfs-5.6-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Darrick Wong: "In this release we clean out the last of the old 32-bit timestamp code, fix a number of bugs and memory corruptions on 32-bit platforms, and a refactoring of some of the extended attribute code. I think I'll be back next week with some refactoring of how the XFS buffer code returns error codes, however I prefer to hold onto that for another week to let it soak a while longer Summary: - Get rid of compat_time_t - Convert time_t to time64_t in quota code - Remove shadow variables - Prevent ATTR_ flag misuse in the attrmulti ioctls - Clean out strlen in the attr code - Remove some bogus asserts - Fix various file size limit calculation errors with 32-bit kernels - Pack xfs_dir2_sf_entry_t to fix build errors on arm oabi - Fix nowait inode locking calls for directio aio reads - Fix memory corruption bugs when invalidating remote xattr value buffers - Streamline remote attr value removal - Make the buffer log format size consistent across platforms - Strengthen buffer log format size checking - Fix messed up return types of xfs_inode_need_cow - Fix some unused variable warnings" * tag 'xfs-5.6-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (24 commits) xfs: remove unused variable 'done' xfs: fix uninitialized variable in xfs_attr3_leaf_inactive xfs: change return value of xfs_inode_need_cow to int xfs: check log iovec size to make sure it's plausibly a buffer log format xfs: make struct xfs_buf_log_format have a consistent size xfs: complain if anyone tries to create a too-large buffer log item xfs: clean up xfs_buf_item_get_format return value xfs: streamline xfs_attr3_leaf_inactive xfs: fix memory corruption during remote attr value buffer invalidation xfs: refactor remote attr value buffer invalidation xfs: fix IOCB_NOWAIT handling in xfs_file_dio_aio_read xfs: Add __packed to xfs_dir2_sf_entry_t definition xfs: fix s_maxbytes computation on 32-bit kernels xfs: truncate should remove all blocks, not just to the end of the page cache xfs: introduce XFS_MAX_FILEOFF xfs: remove bogus assertion when online repair isn't enabled xfs: Remove all strlen in all xfs_attr_* functions for attr names. xfs: fix misuse of the XFS_ATTR_INCOMPLETE flag xfs: also remove cached ACLs when removing the underlying attr xfs: reject invalid flags combinations in XFS_IOC_ATTRMULTI_BY_HANDLE ... commit e5da4c933c50d98d7990a7c1ca0bbf8946e80c4a Merge: 9f68e3655aae 7f6225e446cc Author: Linus Torvalds Date: Thu Jan 30 15:17:05 2020 -0800 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "This merge window, we've added some performance improvements in how we handle inode locking in the read/write paths, and improving the performance of Direct I/O overwrites. We also now record the error code which caused the first and most recent ext4_error() report in the superblock, to make it easier to root cause problems in production systems. There are also many of the usual cleanups and miscellaneous bug fixes" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (49 commits) jbd2: clean __jbd2_journal_abort_hard() and __journal_abort_soft() jbd2: make sure ESHUTDOWN to be recorded in the journal superblock ext4, jbd2: ensure panic when aborting with zero errno jbd2: switch to use jbd2_journal_abort() when failed to submit the commit record jbd2_seq_info_next should increase position index jbd2: remove pointless assertion in __journal_remove_journal_head ext4,jbd2: fix comment and code style jbd2: delete the duplicated words in the comments ext4: fix extent_status trace points ext4: fix symbolic enum printing in trace output ext4: choose hardlimit when softlimit is larger than hardlimit in ext4_statfs_project() ext4: fix race conditions in ->d_compare() and ->d_hash() ext4: make dioread_nolock the default ext4: fix extent_status fragmentation for plain files jbd2: clear JBD2_ABORT flag before journal_reset to update log tail info when load journal ext4: drop ext4_kvmalloc() ext4: Add EXT4_IOC_FSGETXATTR/EXT4_IOC_FSSETXATTR to compat_ioctl ext4: remove unused macro MPAGE_DA_EXTENT_TAIL ext4: add missing braces in ext4_ext_drop_refs() ext4: fix some nonstandard indentation in extents.c ... commit e0d5322c29ef9f19a445c4960e9f89b4a85571bc Author: Alex Deucher Date: Sat Jan 25 11:30:25 2020 -0500 drm/amdgpu/navi10: add mclk to navi10_get_clock_by_type_with_latency Doesn't seem to be used, but add it just in case. Reviewed-by: Matt Coffin Signed-off-by: Alex Deucher commit 968162204adf5f2292214356978357e9dcd35de1 Author: Nathan Chancellor Date: Wed Jan 29 18:24:35 2020 -0700 drm/amdgpu: Fix implicit enum conversion in gfx_v9_4_ras_error_inject Clang warns: ../drivers/gpu/drm/amd/amdgpu/gfx_v9_4.c:967:35: warning: implicit conversion from enumeration type 'enum amdgpu_ras_block' to different enumeration type 'enum ta_ras_block' [-Wenum-conversion] block_info.block_id = info->head.block; ~ ~~~~~~~~~~~^~~~~ 1 warning generated. Use the function added in commit 828cfa29093f ("drm/amdgpu: Fix amdgpu ras to ta enums conversion") that handles this conversion explicitly. Fixes: 4c461d89db4f ("drm/amdgpu: add RAS support for the gfx block of Arcturus") Link: https://github.com/ClangBuiltLinux/linux/issues/849 Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher commit eca31a4ac89bd5af26eccc6c32acbee396950b30 Author: Daniel Vetter Date: Wed Jan 29 09:09:05 2020 +0100 radeon: completely remove lut leftovers This is an oversight from commit 42585395ebc1034a98937702849669f17eadb35f Author: Peter Rosin Date: Thu Jul 13 18:25:36 2017 +0200 drm: radeon: remove dead code and pointless local lut storage v2: Also remove leftover local variable. Cc: Peter Rosin Cc: Alex Deucher Cc: Michel Dänzer Reviewed-by: Michel Dänzer Signed-off-by: Daniel Vetter Signed-off-by: Alex Deucher commit ded58c7bbbf3b52c018db99fd4d530c3448a0c83 Author: Zhan Liu Date: Tue Jan 28 16:38:53 2020 -0500 drm/amd/display: Move drm_dp_mst_atomic_check() to the front of dc_validate_global_state() [Why] Need to do atomic check first, then validate global state. If not, when connecting both MST and HDMI displays and set a bad mode via xrandr, system will hang. [How] Move drm_dp_mst_atomic_check() to the front of dc_validate_global_state(). Signed-off-by: Zhan Liu Reviewed-by: Mikita Lipski Signed-off-by: Alex Deucher commit ec3d65082d7dabad6fa8f66a8ef166f2d522d6b2 Author: Daniel Vetter Date: Tue Jan 28 17:09:52 2020 +0100 radeon: insert 10ms sleep in dce5_crtc_load_lut Per at least one tester this is enough magic to recover the regression introduced for some people (but not all) in commit b8e2b0199cc377617dc238f5106352c06dcd3fa2 Author: Peter Rosin Date: Tue Jul 4 12:36:57 2017 +0200 drm/fb-helper: factor out pseudo-palette which for radeon had the side-effect of refactoring out a seemingly redudant writing of the color palette. 10ms in a fairly slow modeset path feels like an acceptable form of duct-tape, so maybe worth a shot and see what sticks. Cc: Alex Deucher Cc: Michel Dänzer References: https://bugzilla.kernel.org/show_bug.cgi?id=198123 Signed-off-by: Daniel Vetter Signed-off-by: Alex Deucher commit 2a239597dfc65fb097a3d7ddcd01066745fea069 Author: Colin Ian King Date: Tue Jan 28 11:28:27 2020 +0000 drm/amd/display: fix spelling mistake link_integiry_check -> link_integrity_check There is a spelling mistake on the struct field name link_integiry_check, fix this by renaming it. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 7044cb6c20776a1d546f08c332601bb6005388a2 Author: Stephen Rothwell Date: Tue Jan 28 15:42:27 2020 +1100 amdgpu: using vmalloc requires includeing vmalloc.h Fixes: 240c811ccde4 ("drm/amdgpu: fix VRAM partially encroached issue in GDDR6 memory training(V2)") Signed-off-by: Stephen Rothwell Signed-off-by: Alex Deucher commit 977f7e1068be60f3cac7d80ab18692341f3b7fc5 Author: Nirmoy Das Date: Tue Jan 21 15:53:53 2020 +0100 drm/amdgpu: allocate entities on demand Currently we pre-allocate entities and fences for all the HW IPs on context creation and some of which are might never be used. This patch tries to resolve entity/fences wastage by creating entity only when needed. v2: allocate memory for entity and fences together Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 18c6b74e7cfc9a599917d9e98f9835de8208e19a Author: Joseph Greathouse Date: Mon Jan 27 16:08:11 2020 -0600 drm/amdgpu: Enable DISABLE_BARRIER_WAITCNT for Arcturus In previous gfx9 parts, S_BARRIER shader instructions are implicitly S_WAITCNT 0 instructions as well. This setting turns off that mechanism in Arcturus and beyond. With this, shaders must follow the ISA guide insofar as putting in explicit S_WAITCNT operations even after an S_BARRIER. v2: Fix patch title to list component Signed-off-by: Joseph Greathouse Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 8ccb5bf7619c6523e7a4384a84b72e7be804298c Author: José Roberto de Souza Date: Wed Jan 29 15:24:48 2020 -0800 drm/mst: Fix possible NULL pointer dereference in drm_dp_mst_process_up_req() According to DP specification, DP_SINK_EVENT_NOTIFY is also a broadcast message but as this function only handles DP_CONNECTION_STATUS_NOTIFY I will only make the static analyzer that caught this issue happy by not calling drm_dp_get_mst_branch_device_by_guid() with a NULL guid, causing drm_dp_mst_process_up_req() to return in the "if (!mstb)" right bellow. Fixes: 9408cc94eb04 ("drm/dp_mst: Handle UP requests asynchronously") Cc: Lyude Paul Cc: Sean Paul Cc: # v5.5+ Signed-off-by: José Roberto de Souza [added cc to stable] Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200129232448.84704-1-jose.souza@intel.com commit 04d36d748fac349b068ef621611f454010054c58 Author: David Howells Date: Thu Jan 30 21:50:36 2020 +0000 rxrpc: Fix missing active use pinning of rxrpc_local object The introduction of a split between the reference count on rxrpc_local objects and the usage count didn't quite go far enough. A number of kernel work items need to make use of the socket to perform transmission. These also need to get an active count on the local object to prevent the socket from being closed. Fix this by getting the active count in those places. Also split out the raw active count get/put functions as these places tend to hold refs on the rxrpc_local object already, so getting and putting an extra object ref is just a waste of time. The problem can lead to symptoms like: BUG: kernel NULL pointer dereference, address: 0000000000000018 .. CPU: 2 PID: 818 Comm: kworker/u9:0 Not tainted 5.5.0-fscache+ #51 ... RIP: 0010:selinux_socket_sendmsg+0x5/0x13 ... Call Trace: security_socket_sendmsg+0x2c/0x3e sock_sendmsg+0x1a/0x46 rxrpc_send_keepalive+0x131/0x1ae rxrpc_peer_keepalive_worker+0x219/0x34b process_one_work+0x18e/0x271 worker_thread+0x1a3/0x247 kthread+0xe6/0xeb ret_from_fork+0x1f/0x30 Fixes: 730c5fd42c1e ("rxrpc: Fix local endpoint refcounting") Signed-off-by: David Howells commit f71dbf2fb28489a79bde0dca1c8adfb9cdb20a6b Author: David Howells Date: Thu Jan 30 21:50:36 2020 +0000 rxrpc: Fix insufficient receive notification generation In rxrpc_input_data(), rxrpc_notify_socket() is called if the base sequence number of the packet is immediately following the hard-ack point at the end of the function. However, this isn't sufficient, since the recvmsg side may have been advancing the window and then overrun the position in which we're adding - at which point rx_hard_ack >= seq0 and no notification is generated. Fix this by always generating a notification at the end of the input function. Without this, a long call may stall, possibly indefinitely. Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code") Signed-off-by: David Howells commit fac20b9e738523fc884ee3ea5be360a321cd8bad Author: David Howells Date: Thu Jan 30 21:50:35 2020 +0000 rxrpc: Fix use-after-free in rxrpc_put_local() Fix rxrpc_put_local() to not access local->debug_id after calling atomic_dec_return() as, unless that returned n==0, we no longer have the right to access the object. Fixes: 06d9532fa6b3 ("rxrpc: Fix read-after-free in rxrpc_queue_local()") Signed-off-by: David Howells commit c54849ddd832ae0a45cab16bcd1ed2db7da090d7 Author: Ronnie Sahlberg Date: Fri Jan 31 05:52:51 2020 +1000 cifs: fix soft mounts hanging in the reconnect code RHBZ: 1795429 In recent DFS updates we have a new variable controlling how many times we will retry to reconnect the share. If DFS is not used, then this variable is initialized to 0 in: static inline int dfs_cache_get_nr_tgts(const struct dfs_cache_tgt_list *tl) { return tl ? tl->tl_numtgts : 0; } This means that in the reconnect loop in smb2_reconnect() we will immediately wrap retries to -1 and never actually get to pass this conditional: if (--retries) continue; The effect is that we no longer reach the point where we fail the commands with -EHOSTDOWN and basically the kernel threads are virtually hung and unkillable. Fixes: a3a53b7603798fd8 (cifs: Add support for failover in smb2_reconnect()) Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Paulo Alcantara (SUSE) CC: Stable commit 8889f6fa35884d09f24734e10fea0c9ddcbc6429 Author: Jason Gunthorpe Date: Thu Jan 30 11:21:21 2020 -0400 RDMA/core: Make the entire API tree static Compilation of mlx5 driver without CONFIG_INFINIBAND_USER_ACCESS generates the following error. on x86_64: ld: drivers/infiniband/hw/mlx5/main.o: in function `mlx5_ib_handler_MLX5_IB_METHOD_VAR_OBJ_ALLOC': main.c:(.text+0x186d): undefined reference to `ib_uverbs_get_ucontext_file' ld: drivers/infiniband/hw/mlx5/main.o:(.rodata+0x2480): undefined reference to `uverbs_idr_class' ld: drivers/infiniband/hw/mlx5/main.o:(.rodata+0x24d8): undefined reference to `uverbs_destroy_def_handler' This is happening because some parts of the UAPI description are not static. This is a hold over from earlier code that relied on struct pointers to refer to object types, now object types are referenced by number. Remove the unused globals and add statics to the remaining UAPI description elements. Remove the redundent #ifdefs around mlx5_ib_*defs and obsolete mlx5_ib_get_devx_tree(). The compiler now trims alot more unused code, including the above problematic definitions when !CONFIG_INFINIBAND_USER_ACCESS. Fixes: 7be76bef320b ("IB/mlx5: Introduce VAR object and its alloc/destroy methods") Reported-by: Randy Dunlap Acked-by: Randy Dunlap Signed-off-by: Jason Gunthorpe commit d7f62e825fd19202a0749d10fb439714c51f67d2 Author: Stefan Metzmacher Date: Wed Jan 29 14:39:41 2020 +0100 io_uring: add BUILD_BUG_ON() to assert the layout of struct io_uring_sqe With nesting of anonymous unions and structs it's hard to review layout changes. It's better to ask the compiler for these things. Signed-off-by: Stefan Metzmacher Signed-off-by: Jens Axboe commit 87ce955b24c9940cb2ca7e5173fcf175578d9fe9 Author: Jens Axboe Date: Thu Jan 30 08:25:34 2020 -0700 io_uring: add ->show_fdinfo() for the io_uring file descriptor It can be hard to know exactly what is registered with the ring. Especially for credentials, it'd be handy to be able to see which ones are registered, what personalities they have, and what the ID of each of them is. This adds support for showing information registered in the ring from the fdinfo of the io_uring fd. Here's an example from a test case that registers 4 files (two of them sparse), 4 buffers, and 2 personalities: pos: 0 flags: 02000002 mnt_id: 14 UserFiles: 4 0: file-no-1 1: file-no-2 2: 3: UserBufs: 4 0: 0x563817c46000/128 1: 0x563817c47000/256 2: 0x563817c48000/512 3: 0x563817c49000/1024 Personalities: 1 Uid: 0 0 0 0 Gid: 0 0 0 0 Groups: 0 CapEff: 0000003fffffffff 2 Uid: 0 0 0 0 Gid: 0 0 0 0 Groups: 0 CapEff: 0000003fffffffff Suggested-by: Jann Horn Signed-off-by: Jens Axboe commit 4cbc418a44d5067133271bb6eeac2382f2bf94f7 Merge: 1d5920c306f1 a6bd811f1209 Author: Paolo Bonzini Date: Thu Jan 30 18:47:38 2020 +0100 Merge branch 'cve-2019-3016' into kvm-next-5.6 From Boris Ostrovsky: The KVM hypervisor may provide a guest with ability to defer remote TLB flush when the remote VCPU is not running. When this feature is used, the TLB flush will happen only when the remote VPCU is scheduled to run again. This will avoid unnecessary (and expensive) IPIs. Under certain circumstances, when a guest initiates such deferred action, the hypervisor may miss the request. It is also possible that the guest may mistakenly assume that it has already marked remote VCPU as needing a flush when in fact that request had already been processed by the hypervisor. In both cases this will result in an invalid translation being present in a vCPU, potentially allowing accesses to memory locations in that guest's address space that should not be accessible. Note that only intra-guest memory is vulnerable. The five patches address both of these problems: 1. The first patch makes sure the hypervisor doesn't accidentally clear a guest's remote flush request 2. The rest of the patches prevent the race between hypervisor acknowledging a remote flush request and guest issuing a new one. Conflicts: arch/x86/kvm/x86.c [move from kvm_arch_vcpu_free to kvm_arch_vcpu_destroy] commit a6bd811f1209fe1c64c9f6fd578101d6436c6b6e Author: Boris Ostrovsky Date: Fri Dec 6 15:36:12 2019 +0000 x86/KVM: Clean up host's steal time structure Now that we are mapping kvm_steal_time from the guest directly we don't need keep a copy of it in kvm_vcpu_arch.st. The same is true for the stime field. This is part of CVE-2019-3016. Signed-off-by: Boris Ostrovsky Reviewed-by: Joao Martins Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit b043138246a41064527cf019a3d51d9f015e9796 Author: Boris Ostrovsky Date: Thu Dec 5 03:45:32 2019 +0000 x86/KVM: Make sure KVM_VCPU_FLUSH_TLB flag is not missed There is a potential race in record_steal_time() between setting host-local vcpu->arch.st.steal.preempted to zero (i.e. clearing KVM_VCPU_PREEMPTED) and propagating this value to the guest with kvm_write_guest_cached(). Between those two events the guest may still see KVM_VCPU_PREEMPTED in its copy of kvm_steal_time, set KVM_VCPU_FLUSH_TLB and assume that hypervisor will do the right thing. Which it won't. Instad of copying, we should map kvm_steal_time and that will guarantee atomicity of accesses to @preempted. This is part of CVE-2019-3016. Signed-off-by: Boris Ostrovsky Reviewed-by: Joao Martins Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 917248144db5d7320655dbb41d3af0b8a0f3d589 Author: Boris Ostrovsky Date: Thu Dec 5 01:30:51 2019 +0000 x86/kvm: Cache gfn to pfn translation __kvm_map_gfn()'s call to gfn_to_pfn_memslot() is * relatively expensive * in certain cases (such as when done from atomic context) cannot be called Stashing gfn-to-pfn mapping should help with both cases. This is part of CVE-2019-3016. Signed-off-by: Boris Ostrovsky Reviewed-by: Joao Martins Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 1eff70a9abd46f175defafd29bc17ad456f398a7 Author: Boris Ostrovsky Date: Tue Nov 12 16:35:06 2019 +0000 x86/kvm: Introduce kvm_(un)map_gfn() kvm_vcpu_(un)map operates on gfns from any current address space. In certain cases we want to make sure we are not mapping SMRAM and for that we can use kvm_(un)map_gfn() that we are introducing in this patch. This is part of CVE-2019-3016. Signed-off-by: Boris Ostrovsky Reviewed-by: Joao Martins Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 8c6de56a42e0c657955e12b882a81ef07d1d073e Author: Boris Ostrovsky Date: Wed Oct 30 19:01:31 2019 +0000 x86/kvm: Be careful not to clear KVM_VCPU_FLUSH_TLB bit kvm_steal_time_set_preempted() may accidentally clear KVM_VCPU_FLUSH_TLB bit if it is called more than once while VCPU is preempted. This is part of CVE-2019-3016. (This bug was also independently discovered by Jim Mattson ) Signed-off-by: Boris Ostrovsky Reviewed-by: Joao Martins Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 1d5920c306f11db2c9e517f12843216b58c15046 Merge: 621ab20c06e0 fd24a8624eb2 Author: Paolo Bonzini Date: Thu Jan 30 18:14:26 2020 +0100 Merge tag 'kvm-ppc-next-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD Second KVM PPC update for 5.6 * Fix compile warning on 32-bit machines * Fix locking error in secure VM support commit 621ab20c06e0c0b45eb2382c048a0426bbff9b0e Merge: 3009afc6e39e 4a267aa70795 Author: Paolo Bonzini Date: Thu Jan 30 18:13:14 2020 +0100 Merge tag 'kvmarm-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm updates for Linux 5.6 - Fix MMIO sign extension - Fix HYP VA tagging on tag space exhaustion - Fix PSTATE/CPSR handling when generating exception - Fix MMU notifier's advertizing of young pages - Fix poisoned page handling - Fix PMU SW event handling - Fix TVAL register access - Fix AArch32 external abort injection - Fix ITS unmapped collection handling - Various cleanups commit 0cd9d33ace336bc424fc30944aa3defd6786e4fe Author: Tejun Heo Date: Thu Jan 30 11:37:33 2020 -0500 cgroup: init_tasks shouldn't be linked to the root cgroup 5153faac18d2 ("cgroup: remove cgroup_enable_task_cg_lists() optimization") removed lazy initialization of css_sets so that new tasks are always lniked to its css_set. In the process, it incorrectly ended up adding init_tasks to root css_set. They show up as PID 0's in root's cgroup.procs triggering warnings in systemd and generally confusing people. Fix it by skip css_set linking for init_tasks. Signed-off-by: Tejun Heo Reported-by: https://github.com/joanbm Link: https://github.com/systemd/systemd/issues/14682 Fixes: 5153faac18d2 ("cgroup: remove cgroup_enable_task_cg_lists() optimization") Cc: stable@vger.kernel.org # v5.5+ commit 9f68e3655aae6d49d6ba05dd263f99f33c2567af Merge: 4cadc60d6bcf d47c7f062680 Author: Linus Torvalds Date: Thu Jan 30 08:04:01 2020 -0800 Merge tag 'drm-next-2020-01-30' of git://anongit.freedesktop.org/drm/drm Pull drm updates from Davbe Airlie: "This is the main pull request for graphics for 5.6. Usual selection of changes all over. I've got one outstanding vmwgfx pull that touches mm so kept it separate until after all of this lands. I'll try and get it to you soon after this, but it might be early next week (nothing wrong with code, just my schedule is messy) This also hits a lot of fbdev drivers with some cleanups. Other notables: - vulkan timeline semaphore support added to syncobjs - nouveau turing secureboot/graphics support - Displayport MST display stream compression support Detailed summary: uapi: - dma-buf heaps added (and fixed) - command line add support for panel oreientation - command line allow overriding penguin count drm: - mipi dsi definition updates - lockdep annotations for dma_resv - remove dma-buf kmap/kunmap support - constify fb_ops in all fbdev drivers - MST fix for daisy chained hotplug- - CTA-861-G modes with VIC >= 193 added - fix drm_panel_of_backlight export - LVDS decoder support - more device based logging support - scanline alighment for dumb buffers - MST DSC helpers scheduler: - documentation fixes - job distribution improvements panel: - Logic PD type 28 panel support - Jimax8729d MIPI-DSI - igenic JZ4770 - generic DSI devicetree bindings - sony acx424AKP panel - Leadtek LTK500HD1829 - xinpeng XPP055C272 - AUO B116XAK01 - GiantPlus GPM940B0 - BOE NV140FHM-N49 - Satoz SAT050AT40H12R2 - Sharp LS020B1DD01D panels. ttm: - use blocking WW lock i915: - hw/uapi state separation - Lock annotation improvements - selftest improvements - ICL/TGL DSI VDSC support - VBT parsing improvments - Display refactoring - DSI updates + fixes - HDCP 2.2 for CFL - CML PCI ID fixes - GLK+ fbc fix - PSR fixes - GEN/GT refactor improvments - DP MST fixes - switch context id alloc to xarray - workaround updates - LMEM debugfs support - tiled monitor fixes - ICL+ clock gating programming removed - DP MST disable sequence fixed - LMEM discontiguous object maps - prefaulting for discontiguous objects - use LMEM for dumb buffers if possible - add LMEM mmap support amdgpu: - enable sync object timelines for vulkan - MST atomic routines - enable MST DSC support - add DMCUB display microengine support - DC OEM i2c support - Renoir DC fixes - Initial HDCP 2.x support - BACO support for Arcturus - Use BACO for runtime PM power save - gfxoff on navi10 - gfx10 golden updates and fixes - DCN support on POWER - GFXOFF for raven1 refresh - MM engine idle handlers cleanup - 10bpc EDP panel fixes - renoir watermark fixes - SR-IOV fixes - Arcturus VCN fixes - GDDR6 training fixes - freesync fixes - Pollock support amdkfd: - unify more codepath with amdgpu - use KIQ to setup HIQ rather than MMIO radeon: - fix vma fault handler race - PPC DMA fix - register check fixes for r100/r200 nouveau: - mmap_sem vs dma_resv fix - rewrite the ACR secure boot code for Turing - TU10x graphics engine support (TU11x pending) - Page kind mapping for turing - 10-bit LUT support - GP10B Tegra fixes - HD audio regression fix hisilicon/hibmc: - use generic fbdev code and helpers rockchip: - dsi/px30 support virtio: - fb damage support - static some functions vc4: - use dma_resv lock wrappers msm: - use dma_resv lock wrappers - sc7180 display + DSI support - a618 support - UBWC support improvements vmwgfx: - updates + new logging uapi exynos: - enable/disable callback cleanups etnaviv: - use dma_resv lock wrappers atmel-hlcdc: - clock fixes mediatek: - cmdq support - non-smooth cursor fixes - ctm property support sun4i: - suspend support - A64 mipi dsi support rcar-du: - Color management module support - LVDS encoder dual-link support - R8A77980 support analogic: - add support for an6345 ast: - atomic modeset support - primary plane garbage fix arcgpu: - fixes for fourcc handling tegra: - minor fixes and improvments mcde: - vblank support meson: - OSD1 plane AFBC commit gma500: - add pageflip support - reomve global drm_dev komeda: - tweak debugfs output - d32 support - runtime PM suppotr udl: - use generic shmem helpers - cleanup and fixes" * tag 'drm-next-2020-01-30' of git://anongit.freedesktop.org/drm/drm: (1998 commits) drm/nouveau/fb/gp102-: allow module to load even when scrubber binary is missing drm/nouveau/acr: return error when registering LSF if ACR not supported drm/nouveau/disp/gv100-: not all channel types support reporting error codes drm/nouveau/disp/nv50-: prevent oops when no channel method map provided drm/nouveau: support synchronous pushbuf submission drm/nouveau: signal pending fences when channel has been killed drm/nouveau: reject attempts to submit to dead channels drm/nouveau: zero vma pointer even if we only unreference it rather than free drm/nouveau: Add HD-audio component notifier support drm/nouveau: fix build error without CONFIG_IOMMU_API drm/nouveau/kms/nv04: remove set but not used variable 'width' drm/nouveau/kms/nv50: remove set but not unused variable 'nv_connector' drm/nouveau/mmu: fix comptag memory leak drm/nouveau/gr/gp10b: Use gp100_grctx and gp100_gr_zbc drm/nouveau/pmu/gm20b,gp10b: Fix Falcon bootstrapping drm/exynos: Rename Exynos to lowercase drm/exynos: change callback names drm/mst: Don't do atomic checks over disabled managers drm/amdgpu: add the lost mutex_init back drm/amd/display: skip opp blank or unblank if test pattern enabled ... commit 4cadc60d6bcfee9c626d4b55e9dc1475d21ad3bb Merge: 893e591b5903 3d32a8437c05 Author: Linus Torvalds Date: Thu Jan 30 07:51:24 2020 -0800 Merge tag 'for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "Core: - Add battery internal resistance temperature table support Drivers: - sc27xx: Optimize the battery resistance with measuring temperature - max17042-battery: Add MAX17055 support - bq25890-charger: Add support of BQ25892 and BQ25896 chips - misc fixes" * tag 'for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (44 commits) power: supply: ipaq_micro_battery: remove unneeded semicolon power: supply: bq25890_charger: fix incorrect error return when bq25890_field_read fails power: supply: axp20x_usb_power: Only poll while offline power: supply: axp20x_usb_power: Add wakeup control power: supply: axp20x_usb_power: Allow offlining power: supply: axp20x_usb_power: Use a match structure power: suppy: ucs1002: Make the symbol 'ucs1002_regulator_enable' static power: reset: at91-poweroff: use proper master clock register offset power: reset: at91-poweroff: introduce struct shdwc_reg_config power: supply: bq25890_charger: Add DT and I2C ids for all supported chips dt-bindings: Add new chips to bq25890 binding documentation power: supply: bq25890_charger: Add support of BQ25892 and BQ25896 chips power: supply: core: Update sysfs-class-power ABI document power: supply: sbs-battery: Fix a signedness bug in sbs_get_battery_capacity() power: supply: ltc2941-battery-gauge: fix use-after-free power: supply: max17040: Correct IRQ wake handling power: supply: axp20x_usb_power: Remove unused device_node power: supply: axp20x_ac_power: Add wakeup control power: supply: axp20x_ac_power: Allow offlining power: supply: axp20x_ac_power: Fix reporting online status ... commit 893e591b59036f9bc629f55bce715d67bdd266a2 Merge: 1c715a659a16 e9a3bfe38e39 Author: Linus Torvalds Date: Thu Jan 30 07:47:58 2020 -0800 Merge tag 'devicetree-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: - Update dtc to upstream v1.5.1-22-gc40aeb60b47a (plus 1 revert) - Fix for DMA coherent devices on Power - Rework and simplify the DT phandle cache code - DT schema conversions for LEDS, gpio-leds, STM32 dfsdm, STM32 UART, STM32 ROMEM, STM32 watchdog, STM32 DMAs, STM32 mlahb, STM32 RTC, STM32 RCC, STM32 syscon, rs485, Renesas rCar CSI2, Faraday FTIDE010, DWC2, Arm idle-states, Allwinner legacy resets, PRCM and clocks, Allwinner H6 OPP, Allwinner AHCI, Allwinner MBUS, Allwinner A31 CSI, Allwinner h/w codec, Allwinner A10 system ctrl, Allwinner SRAM, Allwinner USB PHY, Renesas CEU, generic PCI host, Arm Versatile PCI - New binding schemas for SATA and PATA controllers, TI and Infineon VR controllers, MAX31730 - New compatible strings for i.MX8QM, WCN3991, renesas,r8a77961-wdt, renesas,etheravb-r8a77961 - Add USB 'super-speed-plus' as a documented speed - Vendor prefixes for broadmobi, calaosystems, kam, and mps - Clean-up the multiple flavors of ST-Ericsson vendor prefixes * tag 'devicetree-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (66 commits) scripts/dtc: Revert "yamltree: Ensure consistent bracketing of properties with phandles" of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc dt-bindings: leds: Convert gpio-leds to DT schema dt-bindings: leds: Convert common LED binding to schema dt-bindings: PCI: Convert generic host binding to DT schema dt-bindings: PCI: Convert Arm Versatile binding to DT schema dt-bindings: Be explicit about installing deps dt-bindings: stm32: convert dfsdm to json-schema dt-bindings: serial: Convert STM32 UART to json-schema dt-bindings: serial: Convert rs485 bindings to json-schema dt-bindings: timer: Use non-empty ranges in example dt-bindings: arm-boards: typo fix dt-bindings: Add TI and Infineon VR Controllers as trivial devices dt-binding: usb: add "super-speed-plus" dt-bindings: rcar-csi2: Convert bindings to json-schema dt-bindings: iio: adc: ad7606: Fix wrong maxItems value dt-bindings: Convert Faraday FTIDE010 to DT schema dt-bindings: Create DT bindings for PATA controllers dt-bindings: Create DT bindings for SATA controllers dt: bindings: add vendor prefix for Kamstrup A/S ... commit 1c715a659a16e193a23051ddff4becdad8e18ba1 Merge: 5e237e8c7727 9fbf082f5699 Author: Linus Torvalds Date: Thu Jan 30 07:42:00 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Various mptcp fixupes from Florian Westphal and Geery Uytterhoeven. 2) Don't clear the node/port GUIDs after we've assigned the correct values to them. From Leon Romanovsky. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: net/core: Do not clear VF index for node/port GUIDs query mptcp: Fix undefined mptcp_handle_ipv6_mapped for modular IPV6 net: drop_monitor: Use kstrdup udp: document udp_rcv_segment special case for looped packets mptcp: MPTCP_HMAC_TEST should depend on MPTCP mptcp: Fix incorrect IPV6 dependency check Revert "MAINTAINERS: mptcp@ mailing list is moderated" mptcp: handle tcp fallback when using syn cookies mptcp: avoid a lockdep splat when mcast group was joined mptcp: fix panic on user pointer access mptcp: defer freeing of cached ext until last moment net: mvneta: fix XDP support if sw bm is used as fallback sch_choke: Use kvcalloc mptcp: Fix build with PROC_FS disabled. MAINTAINERS: mptcp@ mailing list is moderated commit 5e237e8c77279a0873a5e9806a5459ebc840c9ce Merge: 9ca4c6429f92 2fd3c5c61793 Author: Linus Torvalds Date: Thu Jan 30 07:39:10 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide Pull IDE updates from David Miller: 1) Fix mem region name in tx4949ide driver, from Christophe JAILLET. 2) Make drive->dn read only, it should not be changeable by users. From Dan Carpenter. 3) Several cast fixups from Krzysztof Kozlowski. There is also going to be a removal of a now unused IDE driver, but that will come via the MIPS tree. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide: ide: make drive->dn read only ide: serverworks: potential overflow in svwks_set_pio_mode() cmd64x: potential buffer overflow in cmd64x_program_timings() ide: remove unneeded header include path to drivers/ide ide: qd65xx: Fix cast to pointer from integer of different size ide: ht6560b: Fix cast to pointer from integer of different size ide: remove set but not used variable 'hwif' ide: remove unnecessary touch_softlockup_watchdog ide: tx4939ide: Fix the name used in a 'devm_request_mem_region()' call ide: Use dev_get_drvdata where possible commit 9ca4c6429f92598a84e4c3292ea7d187c9d7b033 Merge: 11f2534bae8c d68712ee3506 Author: Linus Torvalds Date: Thu Jan 30 07:36:43 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc updates from David Miller: 1) Add a proper .exit.data section. 2) Fix ipc64_perm type definition, from Arnd Bergmann. 3) Support folded p4d page tables on sparc64, from Mike Rapport. 4) Remove uses of struct timex, also from Arnd Bergmann. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: y2038: sparc: remove use of struct timex sparc64: add support for folded p4d page tables sparc/console: kill off obsolete declarations sparc32: fix struct ipc64_perm type definition sparc32, leon: Stop adding vendor and device id to prom ambapp path components sparc: Add .exit.data section. sparc: remove unneeded uapi/asm/statfs.h commit 11f2534bae8c9dc6dace2018226733e4899a57c3 Merge: 39bed42de2e7 4942dc6638b0 Author: Linus Torvalds Date: Thu Jan 30 07:34:33 2020 -0800 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 KVM fix from Catalin Marinas: "Set the correct MDCR_EL2 register value on the first run of a vCPU" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: KVM: arm64: Write arch.mdcr_el2 changes since last vcpu_load on VHE commit e0a514259378718e0deea1def03b7025a0daaf42 Author: Colin Ian King Date: Wed Jan 22 09:12:50 2020 +0000 scsi: ufs: fix spelling mistake "initilized" -> "initialized" There is a spelling mistake in a pr_err message. Fix it. Link: https://lore.kernel.org/r/20200122091250.2777221-1-colin.king@canonical.com Signed-off-by: Colin Ian King Reviewed-by: Bean Huo Signed-off-by: Martin K. Petersen commit 20bc1ad2e4da2e59e1b8481f19f022d78b43429e Author: Colin Ian King Date: Thu Jan 23 00:57:06 2020 +0000 scsi: pm80xx: fix spelling mistake "to" -> "too" There is a spelling mistake in a pm8001_printk message. Fix it. Link: https://lore.kernel.org/r/20200123005706.2834281-1-colin.king@canonical.com Signed-off-by: Colin Ian King Acked-by: Jack Wang Signed-off-by: Martin K. Petersen commit 0171c1c10d2684a6bbaf4d0a1a64fd4b40d69644 Author: Bean Huo Date: Wed Jan 22 11:27:51 2020 +0100 scsi: MAINTAINERS: ufs: remove pedrom.sousa@synopsys.com Pedro has left Synopsys and his email address doesn't work anymore. Everytime after sending email I will receive his undeliverable email. Remove his email address from MAINTAINERS. Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 92b4f9d150593a7a78d9872c2d5dc05ffae4521b Author: Hannes Reinecke Date: Mon Jan 13 14:26:09 2020 +0100 scsi: megaraid_sas: fixup MSIx interrupt setup during resume Streamline resume workflow by using the same functions for enabling MSIx interrupts as used during initialisation. Without it the driver might crash during resume with: WARNING: CPU: 2 PID: 4306 at ../drivers/pci/msi.c:1303 pci_irq_get_affinity+0x3b/0x90 Link: https://lore.kernel.org/r/20200113132609.69536-1-hare@suse.de Signed-off-by: Hannes Reinecke Acked-by: Sumit Saxena Signed-off-by: Martin K. Petersen commit 00fe717ee1ea3c2979db4f94b1533c57aed8dea9 Author: Arun Easi Date: Thu Jan 23 20:50:14 2020 -0800 scsi: qla2xxx: Fix unbound NVME response length On certain cases when response length is less than 32, NVME response data is supplied inline in IOCB. This is indicated by some combination of state flags. There was an instance when a high, and incorrect, response length was indicated causing driver to overrun buffers. Fix this by checking and limiting the response payload length. Fixes: 7401bc18d1ee3 ("scsi: qla2xxx: Add FC-NVMe command handling") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200124045014.23554-1-hmadhani@marvell.com Signed-off-by: Arun Easi Signed-off-by: Himanshu Madhani Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen commit 1e837945a8854227f3f4e4d2d7abff64ed320830 Author: Steven Rostedt (VMware) Date: Wed Jan 29 16:30:30 2020 -0500 tracing: Move tracing selftests to bottom of menu Move all the tracing selftest configs to the bottom of the tracing menu. There's no reason for them to be interspersed throughout. Also, move the bootconfig menu to the top. Signed-off-by: Steven Rostedt (VMware) commit 21b3ce3063be8eb7150a717d7c5286fb56ba8cea Author: Steven Rostedt (VMware) Date: Wed Jan 29 16:26:45 2020 -0500 tracing: Move mmio tracer config up with the other tracers Move the config that enables the mmiotracer with the other tracers such that all the tracers are together. Signed-off-by: Steven Rostedt (VMware) commit a48fc4f5f1d24c70906359731d7080f9ad78a1cb Author: Steven Rostedt (VMware) Date: Wed Jan 29 16:23:04 2020 -0500 tracing: Move tracing test module configs together The MMIO test module was by itself, move it to the other test modules. Also, add the text "Test module" to PREEMPTIRQ_DELAY_TEST as that create a test module as well. Signed-off-by: Steven Rostedt (VMware) commit 61778cd70c1dcef082e5ee6781c7c0c4d7d5b576 Author: Steven Rostedt (VMware) Date: Wed Jan 29 16:19:10 2020 -0500 tracing: Move all function tracing configs together The features that depend on the function tracer were spread out through the tracing menu, pull them together as it is easier to manage. Signed-off-by: Steven Rostedt (VMware) commit 34ed63573b664f984a4b84df02a9ecdfaa3a6034 Author: Tom Zanussi Date: Wed Jan 29 12:59:32 2020 -0600 tracing: Documentation for in-kernel synthetic event API Add Documentation for creating and generating synthetic events from modules. Link: http://lkml.kernel.org/r/734bf8789ff8700000c9acde61a553427910ddb5.1580323897.git.zanussi@kernel.org Acked-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 64836248dda20c8e7427b493f7e06d9bf8f58850 Author: Tom Zanussi Date: Wed Jan 29 12:59:31 2020 -0600 tracing: Add kprobe event command generation test module Add a test module that checks the basic functionality of the in-kernel kprobe event command generation API by creating kprobe events from a module. Link: http://lkml.kernel.org/r/97e502b204f9dba948e3fa3a4315448298218787.1580323897.git.zanussi@kernel.org Acked-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 29a15481054681fa2d450b60a6feea8e6ca6f511 Author: Tom Zanussi Date: Wed Jan 29 12:59:30 2020 -0600 tracing: Change trace_boot to use kprobe_event interface Have trace_boot_add_kprobe_event() use the kprobe_event interface. Also, rename kprobe_event_run_cmd() to kprobe_event_run_command() now that trace_boot's version is gone. Link: http://lkml.kernel.org/r/af5429d11291ab1e9a85a0ff944af3b2bcf193c7.1580323897.git.zanussi@kernel.org Acked-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 2a588dd1d5d649a183a2ff6fa1b80e870cf821d8 Author: Tom Zanussi Date: Wed Jan 29 12:59:29 2020 -0600 tracing: Add kprobe event command generation functions Add functions used to generate kprobe event commands, built on top of the dynevent_cmd interface. kprobe_event_gen_cmd_start() is used to create a kprobe event command using a variable arg list, and kretprobe_event_gen_cmd_start() does the same for kretprobe event commands. kprobe_event_add_fields() can be used to add single fields one by one or as a group. Once all desired fields are added, kprobe_event_gen_cmd_end() or kretprobe_event_gen_cmd_end() respectively are used to actually execute the command and create the event. Link: http://lkml.kernel.org/r/95cc4696502bb6017f9126f306a45ad19b4cc14f.1580323897.git.zanussi@kernel.org Acked-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 9fe41efaca08416657efa8731c0d47ccb6a3f3eb Author: Tom Zanussi Date: Wed Jan 29 12:59:28 2020 -0600 tracing: Add synth event generation test module Add a test module that checks the basic functionality of the in-kernel synthetic event generation API by generating and tracing synthetic events from a module. Link: http://lkml.kernel.org/r/fcb4dd9eb9eefb70ab20538d3529d51642389664.1580323897.git.zanussi@kernel.org Acked-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 8dcc53ad956d2caf4c5c2dda196e6801b71a3154 Author: Tom Zanussi Date: Wed Jan 29 12:59:27 2020 -0600 tracing: Add synth_event_trace() and related functions Add an exported function named synth_event_trace(), allowing modules or other kernel code to trace synthetic events. Also added are several functions that allow the same functionality to be broken out in a piecewise fashion, which are useful in situations where tracing an event from a full array of values would be cumbersome. Those functions are synth_event_trace_start/end() and synth_event_add_(next)_val(). Link: http://lkml.kernel.org/r/7a84de5f1854acf4144b57efe835ca645afa764f.1580323897.git.zanussi@kernel.org Acked-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 35ca5207c2d111abb9e072f028945d5c12b20836 Author: Tom Zanussi Date: Wed Jan 29 12:59:25 2020 -0600 tracing: Add synthetic event command generation functions Add functions used to generate synthetic event commands, built on top of the dynevent_cmd interface. synth_event_gen_cmd_start() is used to create a synthetic event command using a variable arg list and synth_event_gen_cmd_array_start() does the same thing but using an array of field descriptors. synth_event_add_field(), synth_event_add_field_str() and synth_event_add_fields() can be used to add single fields one by one or as a group. Once all desired fields are added, synth_event_gen_cmd_end() is used to actually execute the command and create the event. synth_event_create() does everything, including creating the event, in a single call. Link: http://lkml.kernel.org/r/38fef702fad5ef208009f459552f34a94befd860.1580323897.git.zanussi@kernel.org Acked-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 86c5426baddae9ff192e3159b9c2e7c14e3964c6 Author: Tom Zanussi Date: Wed Jan 29 12:59:24 2020 -0600 tracing: Add dynamic event command creation interface Add an interface used to build up dynamic event creation commands, such as synthetic and kprobe events. Interfaces specific to those particular types of events and others can be built on top of this interface. Command creation is started by first using the dynevent_cmd_init() function to initialize the dynevent_cmd object. Following that, args are appended and optionally checked by the dynevent_arg_add() and dynevent_arg_pair_add() functions, which use objects representing arguments and pairs of arguments, initialized respectively by dynevent_arg_init() and dynevent_arg_pair_init(). Finally, once all args have been successfully added, the command is finalized and actually created using dynevent_create(). The code here for actually printing into the dyn_event->cmd buffer using snprintf() etc was adapted from v4 of Masami's 'tracing/boot: Add synthetic event support' patch. Link: http://lkml.kernel.org/r/1f65fa44390b6f238f6036777c3784ced1dcc6a0.1580323897.git.zanussi@kernel.org Signed-off-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit f5f6b255a253e2c3132ca283e9090a6343bfb719 Author: Tom Zanussi Date: Wed Jan 29 12:59:23 2020 -0600 tracing: Add synth_event_delete() create_or_delete_synth_event() contains code to delete a synthetic event, which would be useful on its own - specifically, it would be useful to allow event-creating modules to call it separately. Separate out the delete code from that function and create an exported function named synth_event_delete(). Link: http://lkml.kernel.org/r/050db3b06df7f0a4b8a2922da602d1d879c7c1c2.1580323897.git.zanussi@kernel.org Acked-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit e3e2a2cc9c96725457ad6f31712ea7681a55666e Author: Tom Zanussi Date: Wed Jan 29 12:59:22 2020 -0600 tracing: Add trace_get/put_event_file() Add a function to get an event file and prevent it from going away on module or instance removal. trace_get_event_file() will find an event file in a given instance (if instance is NULL, it assumes the top trace array) and return it, pinning the instance's trace array as well as the event's module, if applicable, so they won't go away while in use. trace_put_event_file() does the matching release. Link: http://lkml.kernel.org/r/bb31ac4bdda168d5ed3c4b5f5a4c8f633e8d9118.1580323897.git.zanussi@kernel.org Acked-by: Masami Hiramatsu Signed-off-by: Tom Zanussi [ Moved trace_array_put() to end of trace_put_event_file() ] Signed-off-by: Steven Rostedt (VMware) commit 89c95fcef1942415e0f20d8c82e6e36ff8eeca9c Author: Tom Zanussi Date: Wed Jan 29 12:59:21 2020 -0600 tracing: Add trace_array_find/_get() to find instance trace arrays Add a new trace_array_find() function that can be used to find a trace array given the instance name, and replace existing code that does the same thing with it. Also add trace_array_find_get() which does the same but returns the trace array after upping its refcount. Also make both available for use outside of trace.c. Link: http://lkml.kernel.org/r/cb68528c975eba95bee4561ac67dd1499423b2e5.1580323897.git.zanussi@kernel.org Acked-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 6722b23e7a2ace078344064a9735fb73e554e9ef Author: Vasily Averin Date: Fri Jan 24 10:03:06 2020 +0300 trigger_next should increase position index if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. Without patch: # dd bs=30 skip=1 if=/sys/kernel/tracing/events/sched/sched_switch/trigger dd: /sys/kernel/tracing/events/sched/sched_switch/trigger: cannot skip to specified offset n traceoff snapshot stacktrace enable_event disable_event enable_hist disable_hist hist # Available triggers: # traceon traceoff snapshot stacktrace enable_event disable_event enable_hist disable_hist hist 6+1 records in 6+1 records out 206 bytes copied, 0.00027916 s, 738 kB/s Notice the printing of "# Available triggers:..." after the line. With the patch: # dd bs=30 skip=1 if=/sys/kernel/tracing/events/sched/sched_switch/trigger dd: /sys/kernel/tracing/events/sched/sched_switch/trigger: cannot skip to specified offset n traceoff snapshot stacktrace enable_event disable_event enable_hist disable_hist hist 2+1 records in 2+1 records out 88 bytes copied, 0.000526867 s, 167 kB/s It only prints the end of the file, and does not restart. Link: http://lkml.kernel.org/r/3c35ee24-dd3a-8119-9c19-552ed253388a@virtuozzo.com https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: Steven Rostedt (VMware) commit 039958a5f7aad695d4d52683c7d48aa13fb18249 Author: Vasily Averin Date: Fri Jan 24 10:03:01 2020 +0300 tracing: eval_map_next() should always increase position index if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. Link: http://lkml.kernel.org/r/7ad85b22-1866-977c-db17-88ac438bc764@virtuozzo.com Signed-off-by: Vasily Averin [ This is not a bug fix, it just makes it "technically correct" which is why I applied it. NULL is only returned on an anomaly which triggers a WARN_ON ] Signed-off-by: Steven Rostedt (VMware) commit e4075e8bdffd93a9b6d6e1d52fabedceeca5a91b Author: Vasily Averin Date: Fri Jan 24 10:02:56 2020 +0300 ftrace: fpid_next() should increase position index if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. Without patch: # dd bs=4 skip=1 if=/sys/kernel/tracing/set_ftrace_pid dd: /sys/kernel/tracing/set_ftrace_pid: cannot skip to specified offset id no pid 2+1 records in 2+1 records out 10 bytes copied, 0.000213285 s, 46.9 kB/s Notice the "id" followed by "no pid". With the patch: # dd bs=4 skip=1 if=/sys/kernel/tracing/set_ftrace_pid dd: /sys/kernel/tracing/set_ftrace_pid: cannot skip to specified offset id 0+1 records in 0+1 records out 3 bytes copied, 0.000202112 s, 14.8 kB/s Notice that it only prints "id" and not the "no pid" afterward. Link: http://lkml.kernel.org/r/4f87c6ad-f114-30bb-8506-c32274ce2992@virtuozzo.com https://bugzilla.kernel.org/show_bug.cgi?id=206283 Signed-off-by: Vasily Averin Signed-off-by: Steven Rostedt (VMware) commit 64ae572bc7d0060429e40e1c8d803ce5eb31a0d6 Author: Mathieu Desnoyers Date: Sat Aug 17 10:12:08 2019 -0400 tracing: Fix sched switch start/stop refcount racy updates Reading the sched_cmdline_ref and sched_tgid_ref initial state within tracing_start_sched_switch without holding the sched_register_mutex is racy against concurrent updates, which can lead to tracepoint probes being registered more than once (and thus trigger warnings within tracepoint.c). [ May be the fix for this bug ] Link: https://lore.kernel.org/r/000000000000ab6f84056c786b93@google.com Link: http://lkml.kernel.org/r/20190817141208.15226-1-mathieu.desnoyers@efficios.com Cc: stable@vger.kernel.org CC: Steven Rostedt (VMware) CC: Joel Fernandes (Google) CC: Peter Zijlstra CC: Thomas Gleixner CC: Paul E. McKenney Reported-by: syzbot+774fddf07b7ab29a1e55@syzkaller.appspotmail.com Fixes: d914ba37d7145 ("tracing: Add support for recording tgid of tasks") Signed-off-by: Mathieu Desnoyers Signed-off-by: Steven Rostedt (VMware) commit 9fbf082f569980ddd7cab348e0a118678db0e47e Author: Leon Romanovsky Date: Thu Jan 30 14:59:49 2020 +0200 net/core: Do not clear VF index for node/port GUIDs query VF numbers were assigned to node_guid and port_guid, but cleared right before such query calls were issued. It caused to return node/port GUIDs of VF index 0 for all VFs. Fixes: 30aad41721e0 ("net/core: Add support for getting VF GUIDs") Reported-by: Adrian Chiris Signed-off-by: Leon Romanovsky Signed-off-by: David S. Miller commit 8c8c5a4994a306c217fd061cbfc5903399fd4c1c Author: Nicolas Saenz Julienne Date: Fri Jan 10 18:19:33 2020 +0100 dma-contiguous: CMA: give precedence to cmdline Although the device tree might contain a reserved-memory DT node dedicated as the default CMA pool, users might want to change CMA's parameters using the kernel command line for debugging purposes and whatnot. Honor this by bypassing the reserved memory CMA setup, which will ultimately end up freeing the memblock and allow the command line CMA configuration routine to run. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Phil Elwell Signed-off-by: Christoph Hellwig commit 41196224883a64e56e0ef237c19eb837058df071 Author: Christophe Leroy Date: Wed Jan 29 12:34:36 2020 +0000 powerpc/32s: Fix kasan_early_hash_table() for CONFIG_VMAP_STACK On book3s/32 CPUs that are handling MMU through a hash table, MMU_init_hw() function was adapted for VMAP_STACK in order to handle virtual addresses instead of physical addresses in the low level hash functions. When using KASAN, the same adaptations are required for the early hash table set up by kasan_early_hash_table() function. Fixes: cd08f109e262 ("powerpc/32s: Enable CONFIG_VMAP_STACK") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/fc8390a33c2a470105f01abbcbdc7916c30c0a54.1580301269.git.christophe.leroy@c-s.fr commit 55d0a513a0e202c68af2c8f4b1e923a345227bbb Author: Harald Freudenberger Date: Fri Dec 6 14:21:38 2019 +0100 s390/pkey/zcrypt: Support EP11 AES secure keys Extend the low level ep11 misc functions implementation by several functions to support EP11 key objects for paes and pkey: - EP11 AES secure key generation - EP11 AES secure key generation from given clear key value - EP11 AES secure key blob check - findcard function returns list of apqns based on given criterias - EP11 AES secure key derive to CPACF protected key Extend the pkey module to be able to generate and handle EP11 secure keys and also use them as base for deriving protected keys for CPACF usage. These ioctls are extended to support EP11 keys: PKEY_GENSECK2, PKEY_CLR2SECK2, PKEY_VERIFYKEY2, PKEY_APQNS4K, PKEY_APQNS4KT, PKEY_KBLOB2PROTK2. Additionally the 'clear key' token to protected key now uses an EP11 card if the other ways (via PCKMO, via CCA) fail. The PAES cipher implementation needed a new upper limit for the max key size, but is now also working with EP11 keys. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit a17becc112535b912f2165f80a98c21b59655119 Author: Harald Freudenberger Date: Fri Aug 30 16:17:47 2019 +0200 s390/zcrypt: extend EP11 card and queue sysfs attributes This patch introduces new sysfs attributes for EP11 cards and queues: An EP11 card gets four new sysfs attributes: /sys/devices/ap/cardxx/API_ordinalnr The EP11 card firmware API ordinal number. /sys/devices/ap/cardxx/FW_version The EP11 card firmware major and minor version. /sys/devices/ap/cardxx/serialnr Displays the serial number of the EP11 card. The serial number is a 16 character string unique for this EP11 card. /sys/devices/ap/cardxx/op_modes Displays operation modes for this EP11 card. Known operation modes are: FIPS2009, BSI2009, FIPS2011, BSI2011 and BSICC2017. The EP11 queues get two new sysfs attributes: /sys/devices/ap/cardxx/xx.yyyy/mkvps Displays information about the master key(s) states and verification patterns. Two lines are displayed: WK CUR: WK NEW: with : 'invalid' or 'valid' : 'empty' or 'uncommitted' or 'committed' and : '-' or a 32 byte hash pattern /sys/devices/ap/cardxx/xx.yyyy/op_modes Displays operation modes for this EP11 queue. Known operation modes are: FIPS2009, BSI2009, FIPS2011, BSI2011 and BSICC2017. The card information displayed with the sysfs attributes is fresh fetched from the card if the card is online, otherwise cached values are used. The queue information displayed with the sysfs attributes is always fetched on the fly and not cached. So each read of any of these sysfs attributes will cause an request/reply CPRB communication with the EP11 crypto card. The queue attributes address the corresponding EP11 domain within the EP11 card. The card attributes addresses any domain within the EP11 card (subject to the dispatch algorithm within the zcrypt device driver). If the addressed domain is offline or for card addressing all domains are offline the attributes will display '-' for state and verification patterns and an empty string for op mode, serial number, API_ordinalnr and FW_version. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 7384eb725e2d55649850331a560bac2d48ed5002 Author: Harald Freudenberger Date: Fri Aug 30 16:07:08 2019 +0200 s390/zcrypt: add new low level ep11 functions support file This patch introduces two new files which provide some low level functions to interact with EP11 crypto cards: ep11_get_card_info() sends an EP11 query module info CPRB to the addressed card, processes the returning reply and exposes some of the information returned in the new ep11_card_info struct. ep11_get_domain_info() sends an EP11 query domain info CPRB to the addressed card/queue, processes the returning reply and exposes some of the information returned in the new ep11_domain_info struct. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit a7367997abb64b5e5a4f6fe6091629440b10da40 Author: Harald Freudenberger Date: Fri Aug 30 15:57:17 2019 +0200 s390/zcrypt: ep11 structs rework, export zcrypt_send_ep11_cprb Minor rework for struct ep11_cprb and struct ep11_urb. Use of u8, u16, u32 instead of unsigned char. Declare pointers to mem from userspace with __user to give sparse a chance to check. Export zcrypt_send_ep11_cprb() function as this function will be called by code in progress which will build ep11 cprbs within the zcrypt device driver zoo and send them to EP11 crypto cards. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 8f291ebf327050822d4ebf3812e5cc033ee0a88a Author: Harald Freudenberger Date: Fri Aug 30 15:17:27 2019 +0200 s390/zcrypt: enable card/domain autoselect on ep11 cprbs For EP11 CPRBs there was only to choose between specify one or more ep11 targets or not give a target at all. Without any target the zcrypt code assumed AUTOSELECT. For EP11 this ended up in choosing any EP11 APQN with regards to the weight. However, CCA CPRBs can have a more fine granular target addressing. The caller can give 0xFFFF as AUTOSELECT for the card and/or the domain. So it's possible to address any card but domain given or any domain but card given. This patch now introduces the very same for EP11 CPRB handling. An EP11 target entry now may contain 0xFFFF as card and/or domain value with the meaning of ANY card or domain. So now the same behavior as with CCA CPRBs becomes possible: Address any card with given domain or address any domain within given card. For convenience the zcrypt.h header file now has two new defines AUTOSEL_AP and AUTOSEL_DOM covering the 0xFFFF value to address card any and domain any. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 7f820d053948ca82bd8221b1df3d676b9c93a494 Author: Harald Freudenberger Date: Wed Jan 22 12:24:00 2020 +0100 s390/crypto: enable clear key values for paes ciphers With this patch the paes ciphers do accept AES clear key values of size 16, 24 or 32 byte. The key value is internal rearranged to form a paes clear key token so that the pkey kernel module recognizes and handles this key material as source for protected keys. Using clear key material as a source for protected keys is a security risc as the raw key material is kept in memory. However, so the AES selftests provided with the testmanager can be run during registration of the paes ciphers. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 888edbc48857c7189592fb0be3ab09994247199c Author: Harald Freudenberger Date: Fri Sep 27 11:16:42 2019 +0200 s390/pkey: Add support for key blob with clear key value This patch adds support for a new key blob format to the pkey kernel module. The new key blob comprises a clear key value together with key type information. The implementation tries to derive an protected key from the blob with the clear key value inside with 1) the PCKMO instruction. This may fail as the LPAR profile may disable this way. 2) Generate an CCA AES secure data key with exact the clear key value. This requires to have a working crypto card in CCA Coprocessor mode. Then derive an protected key from the CCA AES secure key again with the help of a working crypto card in CCA mode. If both way fail, the transformation of the clear key blob into a protected key will fail. For the PAES cipher this would result in a failure at setkey() invocation. A clear key value exposed in main memory is a security risk. The intention of this new 'clear key blob' support for pkey is to provide self-tests for the PAES cipher key implementation. These known answer tests obviously need to be run with well known key values. So with the clear key blob format there is a way to provide knwon answer tests together with an pkey clear key blob for the in-kernel self tests done at cipher registration. Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 6f3196b74d64fe4b0a51cefa6f2f80f7f55bcf49 Author: Harald Freudenberger Date: Wed Jan 22 10:29:33 2020 +0100 s390/crypto: Rework on paes implementation There have been some findings during Eric Biggers rework of the paes implementation which this patch tries to address: A very minor finding within paes ctr where when the cpacf instruction returns with only partially data en/decrytped the walk_done() was mistakenly done with the all data counter. Please note this can only happen when the kmctr returns because the protected key became invalid in the middle of the operation. And this is only with suspend and resume on a system with different effective wrapping key. Eric Biggers mentioned that the context struct within the tfm struct may be shared among multiple kernel threads. So here now a rework which uses a spinlock per context to protect the read and write of the protected key blob value. The en/decrypt functions copy the protected key(s) at the beginning into a param struct and do not work with the protected key within the context any more. If the protected key in the param struct becomes invalid, the key material is again converted to protected key(s) and the context gets this update protected by the spinlock. Race conditions are still possible and may result in writing the very same protected key value more than once. So the spinlock needs to make sure the protected key(s) within the context are consistent updated. The ctr page is now locked by a mutex instead of a spinlock. A similar patch went into the aes_s390 code as a result of a complain "sleeping function called from invalid context at ...algapi.h". See commit 1c2c7029c008 ("s390/crypto: fix possible sleep during spinlock aquired")' for more. During testing with instrumented code another issue with the xts en/decrypt function revealed. The retry cleared the running iv value and thus let to wrong en/decrypted data. Tested and verified with additional testcases via AF_ALG interface and additional selftests within the kernel (which will be made available as soon as possible). Reported-by: Eric Biggers Signed-off-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 657480d9c01574d1e11bbb29e725db9907daf782 Author: Sven Schnelle Date: Tue Jan 21 12:31:47 2020 +0100 s390: support KPROBES_ON_FTRACE Instead of using our own kprobes-on-ftrace handling convert the code to support KPROBES_ON_FTRACE. Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 5f490a520bcb393389a4d44bec90afcb332eb112 Author: Gerald Schaefer Date: Thu Jan 16 19:59:04 2020 +0100 s390/mm: fix dynamic pagetable upgrade for hugetlbfs Commit ee71d16d22bb ("s390/mm: make TASK_SIZE independent from the number of page table levels") changed the logic of TASK_SIZE and also removed the arch_mmap_check() implementation for s390. This combination has a subtle effect on how get_unmapped_area() for hugetlbfs pages works. It is now possible that a user process establishes a hugetlbfs mapping at an address above 4 TB, without triggering a dynamic pagetable upgrade from 3 to 4 levels. This is because hugetlbfs mappings will not use mm->get_unmapped_area, but rather file->f_op->get_unmapped_area, which currently is the generic implementation of hugetlb_get_unmapped_area() that does not know about s390 dynamic pagetable upgrades, but with the new definition of TASK_SIZE, it will now allow mappings above 4 TB. Subsequent access to such a mapped address above 4 TB will result in a page fault loop, because the CPU cannot translate such a large address with 3 pagetable levels. The fault handler will try to map in a hugepage at the address, but due to the folded pagetable logic it will end up with creating entries in the 3 level pagetable, possibly overwriting existing mappings, and then it all repeats when the access is retried. Apart from the page fault loop, this can have various nasty effects, e.g. kernel panic from one of the BUG_ON() checks in memory management code, or even data loss if an existing mapping gets overwritten. Fix this by implementing HAVE_ARCH_HUGETLB_UNMAPPED_AREA support for s390, providing an s390 version for hugetlb_get_unmapped_area() with pagetable upgrade support similar to arch_get_unmapped_area(), which will then be used instead of the generic version. Fixes: ee71d16d22bb ("s390/mm: make TASK_SIZE independent from the number of page table levels") Cc: # 4.12+ Signed-off-by: Gerald Schaefer Signed-off-by: Vasily Gorbik commit 0ada120c883d4f1f6aafd01cf0fbb10d8bbba015 Author: Changbin Du Date: Tue Jan 28 23:29:38 2020 +0800 perf: Make perf able to build with latest libbfd libbfd has changed the bfd_section_* macros to inline functions bfd_section_ since 2019-09-18. See below two commits: o http://www.sourceware.org/ml/gdb-cvs/2019-09/msg00064.html o https://www.sourceware.org/ml/gdb-cvs/2019-09/msg00072.html This fix make perf able to build with both old and new libbfd. Signed-off-by: Changbin Du Acked-by: Jiri Olsa Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200128152938.31413-1-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 0dd1979f7f9981dcc5c497e68390f208580032ae Author: Thomas Richter Date: Mon Jan 20 14:20:09 2020 +0100 perf test: Fix test case Merge cpu map Commit a2408a70368a ("perf evlist: Maintain evlist->all_cpus") introduces a test case for cpumap merge operation, see functions perf_cpu_map__merge() and test__cpu_map_merge(). The test case fails on s390 with this error message: [root@m35lp76 perf]# ./perf test -Fvvvvv 52 52: Merge cpu map : --- start --- cpumask list: 1-2,4-5,7 perf: /root/linux/tools/include/linux/refcount.h:131:\ refcount_sub_and_test: Assertion `!(new > val)' failed. Aborted (core dumped) [root@m35lp76 perf]# The root cause is in the function test__cpu_map_merge(): It creates two cpu_maps named 'a' and 'b': struct perf_cpu_map *a = perf_cpu_map__new("4,2,1"); struct perf_cpu_map *b = perf_cpu_map__new("4,5,7"); and creates a third map named 'c' which is the result of the merge of maps a and b: struct perf_cpu_map *c = perf_cpu_map__merge(a, b); After some verifaction of the merged cpu_map all three of them are have their reference count reduced and are freed: perf_cpu_map__put(a); (1) perf_cpu_map__put(b); perf_cpu_map__put(c); The release of perf_cpu_map__put(a) is wrong. The map is already released and free'ed as part of the function perf_cpu_map__merge(struct perf_cpu_map *orig, | struct perf_cpu_map *other) +--> perf_cpu_map__put(orig); | +--> cpu_map__delete(orig) At the end perf_cpu_map_put() is called for map 'orig' alias 'a' and since the reference count is 1, the map is deleted, as can be seen by the following gdb trace: (gdb) where #0 tcache_put (tc_idx=0, chunk=0x156cc30) at malloc.c:2940 #1 _int_free (av=0x3fffd49ee80 , p=0x156cc30, have_lock=) at malloc.c:4222 #2 0x00000000012d5e78 in cpu_map__delete (map=0x156cc40) at cpumap.c:31 #3 0x00000000012d5f7a in perf_cpu_map__put (map=0x156cc40) at cpumap.c:45 #4 0x00000000012d723a in perf_cpu_map__merge (orig=0x156cc40, other=0x156cc60) at cpumap.c:343 #5 0x000000000110cdd0 in test__cpu_map_merge ( test=0x14ea6c8 , subtest=-1) at tests/cpumap.c:128 Thus the perf_cpu_map__put(a) (see (1) above) frees map 'a' a second time and causes the failure. Fix this be removing that function call. Output after: [root@m35lp76 perf]# ./perf test -Fvvvvv 52 52: Merge cpu map : --- start --- cpumask list: 1-2,4-5,7 ---- end ---- Merge cpu map: Ok [root@m35lp76 perf]# Signed-off-by: Thomas Richter Reviewed-by: Andi Kleen Cc: Heiko Carstens Cc: Vasily Gorbik Cc: sumanthk@linux.ibm.com Link: http://lore.kernel.org/lkml/20200120132011.64698-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 3220fb8d5e59d7a9b59d02965d4209aef7691e9f Author: Leo Yan Date: Fri Jan 17 13:52:51 2020 +0800 perf parse: Copy string to perf_evsel_config_term perf with CoreSight fails to record trace data with command: perf record -e cs_etm/@tmc_etr0/u --per-thread ls failed to set sink "" on event cs_etm/@tmc_etr0/u with 21 (Is a directory)/perf/ This failure is root caused with the commit 1dc925568f01 ("perf parse: Add a deep delete for parse event terms"). The log shows, cs_etm fails to parse the sink attribution; cs_etm event relies on the event configuration to pass sink name, but the event specific configuration data cannot be passed properly with flow: get_config_terms() ADD_CONFIG_TERM(DRV_CFG, term->val.str); __t->val.str = term->val.str; `> __t->val.str is assigned to term->val.str; parse_events_terms__purge() parse_events_term__delete() zfree(&term->val.str); `> term->val.str is freed and assigned to NULL pointer; cs_etm_set_sink_attr() sink = __t->val.str; `> sink string has been freed. To fix this issue, in the function get_config_terms(), this patch changes to use strdup() for allocation a new duplicate string rather than directly assignment string pointer. This patch addes a new field 'free_str' in the data structure perf_evsel_config_term; 'free_str' is set to true when the union is used as a string pointer; thus it can tell perf_evsel__free_config_terms() to free the string. Fixes: 1dc925568f01 ("perf parse: Add a deep delete for parse event terms") Suggested-by: Jiri Olsa Signed-off-by: Leo Yan Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20200117055251.24058-2-leo.yan@linaro.org [ Use zfree() in perf_evsel__free_config_terms ] Signed-off-by: Arnaldo Carvalho de Melo :# modified: tools/perf/util/evsel_config.h commit e884602b57c07fae54ff357e4b996b2053b47c1e Author: Leo Yan Date: Fri Jan 17 13:52:50 2020 +0800 perf parse: Refactor 'struct perf_evsel_config_term' The struct perf_evsel_config_term::val is a union which contains fields 'callgraph', 'drv_cfg' and 'branch' as string pointers. This leads to the complex code logic for handling every type's string separately, and it's hard to release string as a general way. This patch refactors the structure to add a common field 'str' in the 'val' union as string pointer and remove the other three fields 'callgraph', 'drv_cfg' and 'branch'. Without passing field name, the patch simplifies the string handling with macro ADD_CONFIG_TERM_STR() for string pointer assignment. This patch fixes multiple warnings of line over 80 characters detected by checkpatch tool. Signed-off-by: Leo Yan Reviewed-by: Andi Kleen Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20200117055251.24058-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit d68712ee35069455ea4043d443c8d4fb9a1ee956 Author: Arnd Bergmann Date: Mon Dec 16 15:48:53 2019 +0100 y2038: sparc: remove use of struct timex 'struct timex' is one of the last users of 'struct timeval' and is only referenced in one place in the kernel any more, to convert the user space timex into the kernel-internal version on sparc64, with a different tv_usec member type. As a preparation for hiding the time_t definition and everything using that in the kernel, change the implementation once more to only convert the timeval member, and then enclose the struct definition in an #ifdef. Signed-off-by: Arnd Bergmann Reviewed-by: Julian Calaby Acked-by: Thomas Gleixner Signed-off-by: David S. Miller commit 5637bc5048340456176fcd4c8986edc1ac1acbe1 Author: Mike Rapoport Date: Sun Nov 24 10:57:20 2019 +0200 sparc64: add support for folded p4d page tables Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h. Signed-off-by: Mike Rapoport Acked-by: David S. Miller Signed-off-by: David S. Miller commit 2fd3c5c617937cde5aafa48db4f4056e1f705987 Author: Dan Carpenter Date: Tue Jan 21 16:06:42 2020 +0300 ide: make drive->dn read only The IDE core always sets ->dn correctly so changing it is never required. Setting it to a different value than assigned by IDE core is very likely to result in data corruption (due to wrong transfer timings being set on the controller etc.) Signed-off-by: Dan Carpenter Acked-by: Bartlomiej Zolnierkiewicz Tested-by: Bartlomiej Zolnierkiewicz Signed-off-by: David S. Miller commit 31484d56ca9511e62c08626db338d2aaafb3aa3f Author: Geert Uytterhoeven Date: Thu Jan 30 10:45:26 2020 +0100 mptcp: Fix undefined mptcp_handle_ipv6_mapped for modular IPV6 If CONFIG_MPTCP=y, CONFIG_MPTCP_IPV6=n, and CONFIG_IPV6=m: ERROR: "mptcp_handle_ipv6_mapped" [net/ipv6/ipv6.ko] undefined! This does not happen if CONFIG_MPTCP_IPV6=y, as CONFIG_MPTCP_IPV6 selects CONFIG_IPV6, and thus forces CONFIG_IPV6 builtin. As exporting a symbol for an empty function would be a bit wasteful, fix this by providing a dummy version of mptcp_handle_ipv6_mapped() for the CONFIG_MPTCP_IPV6=n case. Rename mptcp_handle_ipv6_mapped() to mptcpv6_handle_mapped(), to make it clear this is a pure-IPV6 function, just like mptcpv6_init(). Fixes: cec37a6e41aae7bf ("mptcp: Handle MP_CAPABLE options for outgoing connections") Signed-off-by: Geert Uytterhoeven Signed-off-by: David S. Miller commit 72d62c4e422ed2380a2acd51747789b48146e4ee Author: Joe Perches Date: Tue Jan 28 11:02:50 2020 -0800 net: drop_monitor: Use kstrdup Convert the equivalent but rather odd uses of kmemdup with __GFP_ZERO to the more common kstrdup and avoid unnecessary zeroing of copied over memory. Signed-off-by: Joe Perches Signed-off-by: David S. Miller commit d0208bf4da97f76237300afb83c097de25645de6 Author: Willem de Bruijn Date: Wed Jan 29 15:20:17 2020 -0500 udp: document udp_rcv_segment special case for looped packets Commit 6cd021a58c18a ("udp: segment looped gso packets correctly") fixes an issue with rare udp gso multicast packets looped onto the receive path. The stable backport makes the narrowest change to target only these packets, when needed. As opposed to, say, expanding __udp_gso_segment, which is harder to reason to be free from unintended side-effects. But the resulting code is hardly self-describing. Document its purpose and rationale. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit 389b8fb3c4befcc42edbc6d40525c6cb7704daf8 Author: Geert Uytterhoeven Date: Wed Jan 29 19:02:24 2020 +0100 mptcp: MPTCP_HMAC_TEST should depend on MPTCP As the MPTCP HMAC test is integrated into the MPTCP code, it can be built only when MPTCP is enabled. Hence when MPTCP is disabled, asking the user if the test code should be enabled is futile. Wrap the whole block of MPTCP-specific config options inside a check for MPTCP. While at it, drop the "default n" for MPTCP_HMAC_TEST, as that is the default anyway. Fixes: 65492c5a6ab5df50 ("mptcp: move from sha1 (v0) to sha256 (v1)") Signed-off-by: Geert Uytterhoeven Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 8e1974a2a02bf5b77831c686f01761163ea0cd3e Author: Geert Uytterhoeven Date: Wed Jan 29 19:01:17 2020 +0100 mptcp: Fix incorrect IPV6 dependency check If CONFIG_MPTCP=y, CONFIG_MPTCP_IPV6=n, and CONFIG_IPV6=m: net/mptcp/protocol.o: In function `__mptcp_tcp_fallback': protocol.c:(.text+0x786): undefined reference to `inet6_stream_ops' Fix this by checking for CONFIG_MPTCP_IPV6 instead of CONFIG_IPV6, like is done in all other places in the mptcp code. Fixes: 8ab183deb26a3b79 ("mptcp: cope with later TCP fallback") Signed-off-by: Geert Uytterhoeven Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit ea6dd25deeb5b797a145be7f860e3085e7d104c3 Author: Alain Volmat Date: Mon Jan 6 14:28:32 2020 +0100 i2c: stm32f7: add PM_SLEEP suspend/resume support Backup/restore I2C registers as part of the suspend/resume handlers. The device is marked as suspended to ensure that transfers are rejected during the suspended period. Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Alain Volmat Signed-off-by: Wolfram Sang commit 474809a28e7b0671a5090de6e0db91f0e3821360 Author: Marek Szyprowski Date: Thu Jan 30 08:08:34 2020 +0100 dmaengine: Fix return value for dma_request_chan() in case of failure Commit 71723a96b8b1 ("dmaengine: Create symlinks between DMA channels and slaves") changed the dma_request_chan() function flow in such a way that it always returns EPROBE_DEFER in case of channels that cannot be found. This break the operation of the devices which have optional DMA channels as it puts their drivers in endless deferred probe loop. Fix this by propagating the proper error value. Fixes: 71723a96b8b1 ("dmaengine: Create symlinks between DMA channels and slaves") Signed-off-by: Marek Szyprowski Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200130070834.17537-1-m.szyprowski@samsung.com [vkoul: fix typo in patch title] Signed-off-by: Vinod Koul commit 9253975bcba65bece2d982db06bb959186ec7780 Author: Michal Simek Date: Thu Jan 9 11:07:53 2020 +0530 i2c: cadence: Fix wording in i2c-cadence driver Fix wording based on checkpatch.pl Signed-off-by: Michal Simek Signed-off-by: Shubhrajyoti Datta Signed-off-by: Wolfram Sang commit db3fad841d9bf5c8b002ce86fd82aec32af80fc0 Author: Topi Kuutela Date: Mon Dec 9 16:10:50 2019 +0530 i2c: cadence: Fix power management order of operations E.g. pm_runtime_set_active must be called while the power management system is disabled. Fixes extra hanging clk_enable. Signed-off-by: Topi Kuutela Acked-by: Sören Brinkmann Signed-off-by: Michal Simek Signed-off-by: Shubhrajyoti Datta Signed-off-by: Wolfram Sang commit 69dc44bcbc11fab397b614b1204ce10f3d74219c Author: Shubhrajyoti Datta Date: Mon Dec 9 16:10:49 2019 +0530 i2c: cadence: Fix error printing in case of defer Do not print error in case of EPROBE_DEFER. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Wolfram Sang commit bbf967b223b3f1b55eb494d735226152afbad64e Author: Alex Williams Date: Thu Jan 31 13:39:57 2019 -0800 i2c: cadence: Handle transfer_size rollover Under certain conditions, Cadence's I2C controller's transfer_size register will roll over and generate invalid read transactions. Before this change, the ISR relied solely on the RXDV bit to determine when to write more data to the user's buffer. The invalid read data would cause overruns, smashing stacks and worse. This change stops the buffer writes to the requested boundary and reports the error. The controller will be reset so normal transactions may resume. Signed-off-by: Alex Williams Reviewed-by: Shubhrajyoti Datta Reviewed-by: Michal Simek # in a seperate mail Signed-off-by: Wolfram Sang commit 98c49f1746ac44ccc164e914b9a44183fad09f51 Author: Gustavo A. R. Silva Date: Tue Jan 28 20:26:13 2020 -0600 char: hpet: Fix out-of-bounds read bug Currently, there is an out-of-bounds read on array hpetp->hp_dev in the following for loop: 870 for (i = 0; i < hdp->hd_nirqs; i++) 871 hpetp->hp_dev[i].hd_hdwirq = hdp->hd_irq[i]; This is due to the recent change from one-element array to flexible-array member in struct hpets: 104 struct hpets { ... 113 struct hpet_dev hp_dev[]; 114 }; This change affected the total size of the dynamic memory allocation, decreasing it by one time the size of struct hpet_dev. Fix this by adjusting the allocation size when calling struct_size(). Fixes: 987f028b8637c ("char: hpet: Use flexible-array member") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Tetsuo Handa Acked-by: Eric Biggers Link: https://lore.kernel.org/r/20200129022613.GA24281@embeddedor.com Signed-off-by: Greg Kroah-Hartman commit d47c7f06268082bc0082a15297a07c0da59b0fc4 Merge: c689b069916c c3463aed05ab Author: Dave Airlie Date: Thu Jan 30 15:18:33 2020 +1000 Merge branch 'linux-5.6' of git://github.com/skeggsb/linux into drm-next A couple of OOPS fixes, fixes for TU1xx if firmware isn't available, better behaviour in the face of GPU faults, and a patch to make HD audio work again after runpm changes. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/ Date: Mon Jan 13 16:27:47 2020 +0200 ata: pata_arasan_cf: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. The dma_request_chan() is the standard API to request slave channel, clients should be moved away from the legacy API to allow us to retire them. Acked-by: Viresh Kumar Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Peter Ujfalusi Signed-off-by: Jens Axboe commit 0265d6e8ddb8901c2c03d09f9444f382a60ba6b1 Author: Juergen Gross Date: Fri Jan 17 15:39:55 2020 +0100 xen/blkfront: limit allocated memory size to actual use case Today the Xen blkfront driver allocates memory for one struct blkfront_ring_info for each communication ring. This structure is statically sized for the maximum supported configuration resulting in a size of more than 90 kB. As the main size contributor is one array inside the struct, the memory allocation can easily be limited by moving this array to be the last structure element and to allocate only the memory for the actually needed array size. Acked-by: Roger Pau Monné Signed-off-by: Juergen Gross Signed-off-by: Jens Axboe commit 5c0dd228b5fc30a3b732c7ae2657e0161ec7ed80 Author: Sun Ke Date: Wed Jan 22 11:18:57 2020 +0800 nbd: add a flush_workqueue in nbd_start_device When kzalloc fail, may cause trying to destroy the workqueue from inside the workqueue. If num_connections is m (2 < m), and NO.1 ~ NO.n (1 < n < m) kzalloc are successful. The NO.(n + 1) failed. Then, nbd_start_device will return ENOMEM to nbd_start_device_ioctl, and nbd_start_device_ioctl will return immediately without running flush_workqueue. However, we still have n recv threads. If nbd_release run first, recv threads may have to drop the last config_refs and try to destroy the workqueue from inside the workqueue. To fix it, add a flush_workqueue in nbd_start_device. Fixes: e9e006f5fcf2 ("nbd: fix max number of supported devs") Signed-off-by: Sun Ke Signed-off-by: Jens Axboe commit 6a365874a43c43b227492266f59cd68ecc5a6f83 Author: Stephen Kitt Date: Fri Jan 24 21:03:07 2020 +0100 drbd: fifo_alloc() should use struct_size Switching to struct_size for the allocation in fifo_alloc avoids hard-coding the type of fifo_buffer.values in fifo_alloc. It also provides overflow protection; to avoid pessimistic code being generated by the compiler as a result, this patch also switches fifo_size to unsigned, propagating the change as appropriate. Reviewed-by: Gustavo A. R. Silva Signed-off-by: Stephen Kitt Signed-off-by: Jens Axboe commit 10a663a1b15134a5a714aa515e11425a44d4fdf7 Author: Prabhakar Kushwaha Date: Sat Jan 25 03:37:29 2020 +0000 ata: ahci: Add shutdown to freeze hardware resources of ahci device_shutdown() called from reboot or power_shutdown expect all devices to be shutdown. Same is true for even ahci pci driver. As no ahci shutdown function is implemented, the ata subsystem always remains alive with DMA & interrupt support. File system related calls should not be honored after device_shutdown(). So defining ahci pci driver shutdown to freeze hardware (mask interrupt, stop DMA engine and free DMA resources). Signed-off-by: Prabhakar Kushwaha Signed-off-by: Jens Axboe commit 39bed42de2e7d74686a2d5a45638d6a5d7e7d473 Merge: 83fa805bcbfc 5292e24a6acf Author: Linus Torvalds Date: Wed Jan 29 19:56:50 2020 -0800 Merge tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull mmu_notifier updates from Jason Gunthorpe: "This small series revises the names in mmu_notifier to make the code clearer and more readable" * tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: mm/mmu_notifiers: Use 'interval_sub' as the variable for mmu_interval_notifier mm/mmu_notifiers: Use 'subscription' as the variable name for mmu_notifier mm/mmu_notifier: Rename struct mmu_notifier_mm to mmu_notifier_subscriptions commit 73e4eab0a8dacd0ad6921a1717eb38a959b53f09 Author: Christian Zigotzky Date: Wed Jan 29 20:54:43 2020 -0700 pata_pcmia: add SanDisk High (>8G) CF card to supported list Add new SanDisk High (>8G) CF cards to the pata_pcmcia driver. Signed-off-by: Christian Zigotzky Signed-off-by: Jens Axboe commit a258edbca2d94a4d902daeecb3073c88b57ac7ad Author: Jon Derrick Date: Fri Jan 10 14:56:46 2020 -0700 MAINTAINERS: Add Revanth Rajashekar as a SED-Opal maintainer Scott hasn't worked for Intel for some time and has already given us his blessing. CC: Scott Bauer Signed-off-by: Revanth Rajashekar Signed-off-by: Jon Derrick Signed-off-by: Jens Axboe commit 83fa805bcbfc53ae82eedd65132794ae324798e5 Merge: 896f8d23d0cb 8d19f1c8e193 Author: Linus Torvalds Date: Wed Jan 29 19:38:34 2020 -0800 Merge tag 'threads-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull thread management updates from Christian Brauner: "Sargun Dhillon over the last cycle has worked on the pidfd_getfd() syscall. This syscall allows for the retrieval of file descriptors of a process based on its pidfd. A task needs to have ptrace_may_access() permissions with PTRACE_MODE_ATTACH_REALCREDS (suggested by Oleg and Andy) on the target. One of the main use-cases is in combination with seccomp's user notification feature. As a reminder, seccomp's user notification feature was made available in v5.0. It allows a task to retrieve a file descriptor for its seccomp filter. The file descriptor is usually handed of to a more privileged supervising process. The supervisor can then listen for syscall events caught by the seccomp filter of the supervisee and perform actions in lieu of the supervisee, usually emulating syscalls. pidfd_getfd() is needed to expand its uses. There are currently two major users that wait on pidfd_getfd() and one future user: - Netflix, Sargun said, is working on a service mesh where users should be able to connect to a dns-based VIP. When a user connects to e.g. 1.2.3.4:80 that runs e.g. service "foo" they will be redirected to an envoy process. This service mesh uses seccomp user notifications and pidfd to intercept all connect calls and instead of connecting them to 1.2.3.4:80 connects them to e.g. 127.0.0.1:8080. - LXD uses the seccomp notifier heavily to intercept and emulate mknod() and mount() syscalls for unprivileged containers/processes. With pidfd_getfd() more uses-cases e.g. bridging socket connections will be possible. - The patchset has also seen some interest from the browser corner. Right now, Firefox is using a SECCOMP_RET_TRAP sandbox managed by a broker process. In the future glibc will start blocking all signals during dlopen() rendering this type of sandbox impossible. Hence, in the future Firefox will switch to a seccomp-user-nofication based sandbox which also makes use of file descriptor retrieval. The thread for this can be found at https://sourceware.org/ml/libc-alpha/2019-12/msg00079.html With pidfd_getfd() it is e.g. possible to bridge socket connections for the supervisee (binding to a privileged port) and taking actions on file descriptors on behalf of the supervisee in general. Sargun's first version was using an ioctl on pidfds but various people pushed for it to be a proper syscall which he duely implemented as well over various review cycles. Selftests are of course included. I've also added instructions how to deal with merge conflicts below. There's also a small fix coming from the kernel mentee project to correctly annotate struct sighand_struct with __rcu to fix various sparse warnings. We've received a few more such fixes and even though they are mostly trivial I've decided to postpone them until after -rc1 since they came in rather late and I don't want to risk introducing build warnings. Finally, there's a new prctl() command PR_{G,S}ET_IO_FLUSHER which is needed to avoid allocation recursions triggerable by storage drivers that have userspace parts that run in the IO path (e.g. dm-multipath, iscsi, etc). These allocation recursions deadlock the device. The new prctl() allows such privileged userspace components to avoid allocation recursions by setting the PF_MEMALLOC_NOIO and PF_LESS_THROTTLE flags. The patch carries the necessary acks from the relevant maintainers and is routed here as part of prctl() thread-management." * tag 'threads-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: prctl: PR_{G,S}ET_IO_FLUSHER to support controlling memory reclaim sched.h: Annotate sighand_struct with __rcu test: Add test for pidfd getfd arch: wire up pidfd_getfd syscall pid: Implement pidfd_getfd syscall vfs, fdtable: Add fget_task helper commit 896f8d23d0cb5889021d66eab6107e97109c5459 Merge: 33c84e89abe4 3e4827b05d2a Author: Linus Torvalds Date: Wed Jan 29 18:53:37 2020 -0800 Merge tag 'for-5.6/io_uring-vfs-2020-01-29' of git://git.kernel.dk/linux-block Pull io_uring updates from Jens Axboe: - Support for various new opcodes (fallocate, openat, close, statx, fadvise, madvise, openat2, non-vectored read/write, send/recv, and epoll_ctl) - Faster ring quiesce for fileset updates - Optimizations for overflow condition checking - Support for max-sized clamping - Support for probing what opcodes are supported - Support for io-wq backend sharing between "sibling" rings - Support for registering personalities - Lots of little fixes and improvements * tag 'for-5.6/io_uring-vfs-2020-01-29' of git://git.kernel.dk/linux-block: (64 commits) io_uring: add support for epoll_ctl(2) eventpoll: support non-blocking do_epoll_ctl() calls eventpoll: abstract out epoll_ctl() handler io_uring: fix linked command file table usage io_uring: support using a registered personality for commands io_uring: allow registering credentials io_uring: add io-wq workqueue sharing io-wq: allow grabbing existing io-wq io_uring/io-wq: don't use static creds/mm assignments io-wq: make the io_wq ref counted io_uring: fix refcounting with batched allocations at OOM io_uring: add comment for drain_next io_uring: don't attempt to copy iovec for READ/WRITE io_uring: honor IOSQE_ASYNC for linked reqs io_uring: prep req when do IOSQE_ASYNC io_uring: use labeled array init in io_op_defs io_uring: optimise sqe-to-req flags translation io_uring: remove REQ_F_IO_DRAINED io_uring: file switch work needs to get flushed on exit io_uring: hide uring_fd in ctx ... commit 76be4414be4a0d17e29e2337167bf976533149cd Author: Randy Dunlap Date: Tue Jan 28 18:22:25 2020 -0800 powerpc: indent to improve Kconfig readability Indent a Kconfig continuation line to improve readability. Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ff8729c1-3a4b-c720-48ba-a1a42b0ef892@infradead.org commit 33c84e89abe4a92ab699c33029bd54269d574782 Merge: e9f8ca0ae7b7 11e673206f21 Author: Linus Torvalds Date: Wed Jan 29 18:16:16 2020 -0800 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "This series is slightly unusual because it includes Arnd's compat ioctl tree here: 1c46a2cf2dbd Merge tag 'block-ioctl-cleanup-5.6' into 5.6/scsi-queue Excluding Arnd's changes, this is mostly an update of the usual drivers: megaraid_sas, mpt3sas, qla2xxx, ufs, lpfc, hisi_sas. There are a couple of core and base updates around error propagation and atomicity in the attribute container base we use for the SCSI transport classes. The rest is minor changes and updates" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (149 commits) scsi: hisi_sas: Rename hisi_sas_cq.pci_irq_mask scsi: hisi_sas: Add prints for v3 hw interrupt converge and automatic affinity scsi: hisi_sas: Modify the file permissions of trigger_dump to write only scsi: hisi_sas: Replace magic number when handle channel interrupt scsi: hisi_sas: replace spin_lock_irqsave/spin_unlock_restore with spin_lock/spin_unlock scsi: hisi_sas: use threaded irq to process CQ interrupts scsi: ufs: Use UFS device indicated maximum LU number scsi: ufs: Add max_lu_supported in struct ufs_dev_info scsi: ufs: Delete is_init_prefetch from struct ufs_hba scsi: ufs: Inline two functions into their callers scsi: ufs: Move ufshcd_get_max_pwr_mode() to ufshcd_device_params_init() scsi: ufs: Split ufshcd_probe_hba() based on its called flow scsi: ufs: Delete struct ufs_dev_desc scsi: ufs: Fix ufshcd_probe_hba() reture value in case ufshcd_scsi_add_wlus() fails scsi: ufs-mediatek: enable low-power mode for hibern8 state scsi: ufs: export some functions for vendor usage scsi: ufs-mediatek: add dbg_register_dump implementation scsi: qla2xxx: Fix a NULL pointer dereference in an error path scsi: qla1280: Make checking for 64bit support consistent scsi: megaraid_sas: Update driver version to 07.713.01.00-rc1 ... commit e9f8ca0ae7b7bc9a032b429929431c626a69dd5e Merge: 05ef8b97ddf9 47ace7e012b9 Author: Linus Torvalds Date: Wed Jan 29 18:08:49 2020 -0800 Merge tag 'for-5.6/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - Fix DM core's potential for q->make_request_fn NULL pointer in the unlikely case that a DM device is created without a DM table and then accessed due to upper-layer userspace code or user error. - Fix DM thin-provisioning's metadata_pre_commit_callback to not use memory after it is free'd. Also refactor code to disallow changing the thin-pool's data device once in use -- doing so guarantees smae lifetime of pool's data device relative to the pool metadata. - Fix DM space maps used by DM thinp and DM cache to avoid reuse of a already used block. This race was identified with extremely heavy snapshot use in the context of DM thin provisioning. - Fix DM raid's table status relative to an active rebuild. - Fix DM crypt to use GFP_NOIO rather than GFP_NOFS in call to skcipher_request_alloc(). Also fix benbi IV constructor crash if used in authenticated mode. - Add DM crypt support for Elephant diffuser to allow for Bitlocker compatibility. - Fix DM verity target to not prefetch hash blocks for data that has already been verified. - Fix DM writecache's incorrect flush sequence during commit when in SSD mode. - Improve DM writecache's sequential write performance on SSDs. - Add DM zoned target support for zone sizes smaller than 128MiB. - Add DM multipath 'queue_if_no_path_timeout_secs' module param to allow timeout if path isn't reinstated. This allows users a kernel safety-net against IO hanging indefinitely, due to no active paths, that has historically only been provided by multipathd userspace. - Various DM code cleanups to use true/false rather than 1/0, a variable rename in dm-dust, and fix for a math error in comment for DM thin metadata's ondisk format. * tag 'for-5.6/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (21 commits) dm: fix potential for q->make_request_fn NULL pointer dm writecache: improve performance of large linear writes on SSDs dm mpath: Add timeout mechanism for queue_if_no_path dm thin: change data device's flush_bio to be member of struct pool dm thin: don't allow changing data device during thin-pool reload dm thin: fix use-after-free in metadata_pre_commit_callback dm thin metadata: use pool locking at end of dm_pool_metadata_close dm writecache: fix incorrect flush sequence when doing SSD mode commit dm crypt: fix benbi IV constructor crash if used in authenticated mode dm crypt: Implement Elephant diffuser for Bitlocker compatibility dm space map common: fix to ensure new block isn't already in use dm verity: don't prefetch hash blocks for already-verified data dm crypt: fix GFP flags passed to skcipher_request_alloc() dm thin metadata: Fix trivial math error in on-disk format documentation dm thin metadata: use true/false for bool variable dm snapshot: use true/false for bool variable dm bio prison v2: use true/false for bool variable dm mpath: use true/false for bool variable dm zoned: support zone sizes smaller than 128MiB dm raid: table line rebuild status fixes ... commit 05ef8b97ddf9aed40df977477daeab01760d7f9a Merge: 08a3ef8f6b0b 77ce1a47ebca Author: Linus Torvalds Date: Wed Jan 29 15:27:31 2020 -0800 Merge tag 'docs-5.6' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "It has been a relatively quiet cycle for documentation, but there's still a couple of things of note: - Conversion of the NFS documentation to RST - A new document on how to help with documentation (and a maintainer profile entry too) Plus the usual collection of typo fixes, etc" * tag 'docs-5.6' of git://git.lwn.net/linux: (40 commits) docs: filesystems: add overlayfs to index.rst docs: usb: remove some broken references scripts/find-unused-docs: Fix massive false positives docs: nvdimm: use ReST notation for subsection zram: correct documentation about sysfs node of huge page writeback Documentation: zram: various fixes in zram.rst Add a maintainer entry profile for documentation Add a document on how to contribute to the documentation docs: Keep up with the location of NoUri Documentation: Call out example SYM_FUNC_* usage as x86-specific Documentation: nfs: fault_injection: convert to ReST Documentation: nfs: pnfs-scsi-server: convert to ReST Documentation: nfs: convert pnfs-block-server to ReST Documentation: nfs: idmapper: convert to ReST Documentation: convert nfsd-admin-interfaces to ReST Documentation: nfs-rdma: convert to ReST Documentation: nfsroot.rst: COSMETIC: refill a paragraph Documentation: nfsroot.txt: convert to ReST Documentation: convert nfs.txt to ReST Documentation: filesystems: convert vfat.txt to RST ... commit 08a3ef8f6b0b1341c670caba35f782c9a452d488 Merge: ce7ae9d9fe43 35c57fc3f8ea Author: Linus Torvalds Date: Wed Jan 29 15:25:34 2020 -0800 Merge tag 'linux-kselftest-5.6-rc1-kunit' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest kunit updates from Shuah Khan: "This kunit update consists of: - Support for building kunit as a module from Alan Maguire - AppArmor KUnit tests for policy unpack from Mike Salvatore" * tag 'linux-kselftest-5.6-rc1-kunit' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: building kunit as a module breaks allmodconfig kunit: update documentation to describe module-based build kunit: allow kunit to be loaded as a module kunit: remove timeout dependence on sysctl_hung_task_timeout_seconds kunit: allow kunit tests to be loaded as a module kunit: hide unexported try-catch interface in try-catch-impl.h kunit: move string-stream.h to lib/kunit apparmor: add AppArmor KUnit tests for policy unpack commit ce7ae9d9fe4391413db680ce0732da2144b6f4a3 Merge: 22b17db4ea05 af4ddd607dff Author: Linus Torvalds Date: Wed Jan 29 15:24:03 2020 -0800 Merge tag 'linux-kselftest-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest update from Shuah Khan: "This Kselftest update consists of several fixes to framework and individual tests. In addition, it enables LKDTM tests adding lkdtm target to kselftest Makefile" * tag 'linux-kselftest-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/ftrace: fix glob selftest selftests: settings: tests can be in subsubdirs kselftest: Minimise dependency of get_size on C library interfaces selftests/livepatch: Remove unused local variable in set_ftrace_enabled() selftests/livepatch: Replace set_dynamic_debug() with setup_config() in README selftests/lkdtm: Add tests for LKDTM targets selftests: Uninitialized variable in test_cgcore_proc_migration() selftests: fix build behaviour on targets' failures commit 01b810ed71878785d189d01e4d7425a11203d7a8 Merge: b647d2bd8064 d36925be5382 Author: Bjorn Helgaas Date: Wed Jan 29 17:00:08 2020 -0600 Merge branch 'remotes/lorenzo/pci/uniphier' - Remove unused modular code from uniphier, which cannot be built as a module (Masahiro Yamada) * remotes/lorenzo/pci/uniphier: PCI: uniphier: remove module code from built-in driver commit b647d2bd8064c6a5113e7b50e3adbbf6108d7e21 Merge: c11dfed9caa2 21a92676e1fe Author: Bjorn Helgaas Date: Wed Jan 29 17:00:07 2020 -0600 Merge branch 'remotes/lorenzo/pci/tegra' - Fix checking of pm_runtime_get_sync() return value (David Engraf) - Fix AFI_PEX2_CTRL reg offset for Tegra30 (Marcel Ziswiler) * remotes/lorenzo/pci/tegra: PCI: tegra: Fix afi_pex2_ctrl reg offset for Tegra30 PCI: tegra: Fix return value check of pm_runtime_get_sync() commit c11dfed9caa2a01237fd4281fc3b44b1e6425d8b Merge: d86936363c10 ed8cc3b1fc84 Author: Bjorn Helgaas Date: Wed Jan 29 17:00:06 2020 -0600 Merge branch 'remotes/lorenzo/pci/qcom' - Add DT clock/reset info for SDM845 PCIe controller (Bjorn Andersson) - Add support for SDM845 PCIe controller to the qcom driver (Bjorn Andersson) * remotes/lorenzo/pci/qcom: PCI: qcom: Add support for SDM845 PCIe controller dt-bindings: PCI: qcom: Add support for SDM845 PCIe commit d86936363c108bcd7fa1635601f78633c7ee1f71 Merge: 518fc4a3a609 216bbaa337bf Author: Bjorn Helgaas Date: Wed Jan 29 17:00:05 2020 -0600 Merge branch 'remotes/lorenzo/pci/misc' - Fix "EXYNOS" typographical styling (Krzysztof Kozlowski) - Update MAINTAINERS with Andrew Murray's email address (Andrew Murray) * remotes/lorenzo/pci/misc: MAINTAINERS: Update my email address PCI: exynos: Rename Exynos to lowercase commit 518fc4a3a609dd5a5ce7044fed1338c76511a182 Merge: 4c6a8fe3aaa5 b0de922af53e Author: Bjorn Helgaas Date: Wed Jan 29 17:00:05 2020 -0600 Merge branch 'remotes/lorenzo/pci/keystone' - Fix link training so we can do it more than once (Yurii Monakov) - Fix keystone outbound window mapping (Yurii Monakov) - Fix error handling when DT lacks "num-viewport" (Kishon Vijay Abraham I) * remotes/lorenzo/pci/keystone: PCI: keystone: Fix error handling when "num-viewport" DT property is not populated PCI: keystone: Fix outbound region mapping PCI: keystone: Fix link training retries initiation commit 4c6a8fe3aaa5ea5508207e062fdd67014fbdd2f7 Merge: 61d02c37fcd0 6fd622c226e6 Author: Bjorn Helgaas Date: Wed Jan 29 17:00:04 2020 -0600 Merge branch 'remotes/lorenzo/pci/dwc' - Add intel-gw driver for PCIe host controller on Intel Gateway SoC (Dilip Kota) - Use shared DesignWare helpers to configure Fast Training Sequence (FTS) in artpec6 (Dilip Kota) * remotes/lorenzo/pci/dwc: PCI: artpec6: Configure FTS with dwc helper function PCI: dwc: intel: PCIe RC controller driver dt-bindings: PCI: intel: Add YAML schemas for the PCIe RC controller commit 61d02c37fcd0b7d3adc8a51160b9335a7b24638f Merge: db83c269d225 40ca1bf580ef Author: Bjorn Helgaas Date: Wed Jan 29 17:00:03 2020 -0600 Merge branch 'remotes/lorenzo/pci/brcmstb' - Add brcmstb PCIe bindings for Raspberry Pi 4 (Jim Quinlan) - Add Broadcom STB PCIe host controller driver (Jim Quinlan) - Add MSI support for Broadcom STB PCIe host controller driver (Jim Quinlan) * remotes/lorenzo/pci/brcmstb: PCI: brcmstb: Add MSI support PCI: brcmstb: Add Broadcom STB PCIe host controller driver dt-bindings: PCI: Add bindings for brcmstb's PCIe device commit db83c269d22598ec1f5e3e6692a58a92a153e5f1 Merge: c7417cf36aab db51b4c85fb7 Author: Bjorn Helgaas Date: Wed Jan 29 17:00:02 2020 -0600 Merge branch 'pci/host-vmd' - Save VMD's pci_dev in x86 struct pci_sysdata (Jon Derrick) - Add pci_real_dma_dev() for DMA aliases not on the same bus as requester (Jon Derrick) - Add IOMMU mappings for pci_real_dma_dev() (Jon Derrick) - Remove IOMMU sanity checks for VMD devices (Jon Derrick) - Remove VMD dma_map_ops overrides (Jon Derrick) - Remove unused X86_DEV_DMA_OPS (Christoph Hellwig) - Add VMD device IDs that need bus restriction mode (Sushma Kalakota) * pci/host-vmd: PCI: vmd: Add two VMD Device IDs x86/PCI: Remove X86_DEV_DMA_OPS PCI: vmd: Remove dma_map_ops overrides iommu/vt-d: Remove VMD child device sanity check iommu/vt-d: Use pci_real_dma_dev() for mapping PCI: Introduce pci_real_dma_dev() x86/PCI: Expose VMD's pci_dev in struct pci_sysdata x86/PCI: Add to_pci_sysdata() helper commit c7417cf36aabb93f3b1e37b7e28bece46711429e Merge: 5272b7fc3a45 7b90dfc4873b Author: Bjorn Helgaas Date: Wed Jan 29 17:00:01 2020 -0600 Merge branch 'pci/virtualization' - Fix memory leak in pci_iov_add_virtfn() (Navid Emamdoost) - Extend pci_add_dma_alias() so it can add a range of aliases (James Sewart) - Add DMA aliases for PLX PEX NTB (James Sewart) * pci/virtualization: PCI: Add DMA alias quirk for PLX PEX NTB PCI: Add nr_devfns parameter to pci_add_dma_alias() PCI: Fix pci_add_dma_alias() bitmask size PCI/IOV: Fix memory leak in pci_iov_add_virtfn() commit 5272b7fc3a45466a01d58a3169423218e218bc4c Merge: cee538f6a24e 7a30ebb9f2a2 Author: Bjorn Helgaas Date: Wed Jan 29 17:00:00 2020 -0600 Merge branch 'pci/switchtec' - Support 64-bit addressing for both streaming and coherent DMA (Wesley Sheng) - Read vep_vector_number with 16-bit, not 32-bit read (Logan Gunthorpe) - Add Intercomm Notify and Upstream Error Containment support (Logan Gunthorpe) - Remove redundant valid PFF number count (Wesley Sheng) - Avoid unnecessary CSR read in ISR (Wesley Sheng) - Rename Gen3-specific constants (Logan Gunthorpe) - Rework infrastructure to support Gen3- and Gen4-specific code (Logan Gunthorpe) - Add Gen4 system info register support (Logan Gunthorpe) - Add Gen4 flash information interface support (Kelvin Cao) - Add Gen4 MRPC GAS access permission check (Kelvin Cao) * pci/switchtec: PCI/switchtec: Add Gen4 device IDs PCI/switchtec: Add Gen4 MRPC GAS access permission check PCI/switchtec: Add Gen4 flash information interface support PCI/switchtec: Add Gen4 system info register support PCI/switchtec: Separate Gen3 register structures into unions PCI/switchtec: Factor out Gen3 ioctl_flash_part_info() PCI/switchtec: Add 'generation' variable PCI/switchtec: Rename generation-specific constants PCI/switchtec: Move check event ID from mask_event() to switchtec_event_isr() PCI/switchtec: Remove redundant valid PFF number count PCI/switchtec: Add support for Intercomm Notify and Upstream Error Containment PCI/switchtec: Fix vep_vector_number ioread width PCI/switchtec: Use dma_set_mask_and_coherent() commit cee538f6a24eefdbdb7820d3e97b120d496bb345 Merge: f629ddc9cd3d 948675736a77 Author: Bjorn Helgaas Date: Wed Jan 29 16:59:59 2020 -0600 Merge branch 'pci/resource' - Clear only bridge windows (not BARs) while assigning bus resources (Logan Gunthorpe) - Improve resource assignment for deep hotplug hierarchies, e.g., Thunderbolt (Nicholas Johnson) * pci/resource: PCI: Allow adjust_bridge_window() to shrink resource if necessary PCI: Set resource size directly in adjust_bridge_window() PCI: Rename extend_bridge_window() to adjust_bridge_window() PCI: Rename extend_bridge_window() parameter PCI: Consider alignment of hot-added bridges when assigning resources PCI: Remove local variable usage in pci_bus_distribute_available_resources() PCI: Pass size + alignment to pci_bus_distribute_available_resources() PCI: Rename variables PCI: Remove unnecessary braces PCI: Don't disable bridge BARs when assigning bus resources commit f629ddc9cd3d88363f58ad3130165fcdff837779 Merge: 4161953f9545 47b802d5d80c Author: Bjorn Helgaas Date: Wed Jan 29 16:59:58 2020 -0600 Merge branch 'pci/pm' - Print config space before suspend for debugging (Chen Yu) * pci/pm: PCI/PM: Print config space of devices before suspend commit 4161953f95454c4ad465fcc01cca1c870dd1057f Merge: 04df6ad95a5e bc123a515cb7 Author: Bjorn Helgaas Date: Wed Jan 29 16:59:58 2020 -0600 Merge branch 'pci/p2pdma' - Add Intel SkyLake-E to the whitelist of host bridges that support peer-to-peer DMA (Armen Baloyan) * pci/p2pdma: PCI/P2PDMA: Add Intel SkyLake-E to the whitelist commit 04df6ad95a5e4bf332c9ed364ddb24ac3e9d334c Merge: ba51b7188db4 7730c3be06e2 Author: Bjorn Helgaas Date: Wed Jan 29 16:59:57 2020 -0600 Merge branch 'pci/misc' - Fix Broadcom iProc quirk so it's applied regardless of whether the iproc driver is built-in or a module (Wei Liu) - Add extra delay when resuming AMD Ryzen5/7 XHCI controllers from D3hot so they work after resume from runtime suspend or suspend-to-idle (Daniel Drake) - Fix pci_alloc_irq_vectors() function name typo in docs (Zenghui Yu) * pci/misc: Documentation: PCI: Fix pci_alloc_irq_vectors() function name typo PCI: Increase D3 delay for AMD Ryzen5/7 XHCI controllers PCI: Add generic quirk for increasing D3hot delay PCI: iproc: Apply quirk_paxc_bridge() for module as well as built-in commit ba51b7188db4a879d600d95471adac24a7b90a66 Merge: e42617b825f8 d95f20c4f070 Author: Bjorn Helgaas Date: Wed Jan 29 16:59:57 2020 -0600 Merge branch 'pci/aer' - Log a message to identify the device that caused AER/DPC recovery to fail (Yicong Yang) - Initialize aer_fifo before use (Dongdong Liu) * pci/aer: PCI/AER: Initialize aer_fifo PCI/AER: Factor message prefixes with dev_fmt() PCI/AER: Log which device prevents error recovery commit 948675736a77cb951b40bcb646d22dd794f8ed14 Author: Nicholas Johnson Date: Mon Jan 6 15:48:06 2020 +0000 PCI: Allow adjust_bridge_window() to shrink resource if necessary Remove checks for resource size in adjust_bridge_window(). This is necessary to allow pci_bus_distribute_available_resources() to function when the kernel parameter "pci=hpmemsize=nn[KMG]" is used to allocate resources. Because the kernel parameter sets the size of all hotplug bridges to be the same, there are problems when nested hotplug bridges are encountered. Fitting a downstream hotplug bridge with size X and normal bridges with non-zero size Y into parent hotplug bridge with size X is impossible, and hence the downstream hotplug bridge needs to shrink to fit into its parent. Add check for if bridge is extended or shrunken and reflect that in the call to pci_dbg(). Reset the resource if its new size is zero (if we have run out of a bridge window resource) to prevent the PCI resource assignment code from attempting to assign a zero-sized resource. Link: https://lore.kernel.org/r/PSXP216MB0438D3E2CFE64EBAA32AF691803C0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM Signed-off-by: Nicholas Johnson Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit ae4611f1d7e99eda6916bbc5fc8df26516edf95e Author: Nicholas Johnson Date: Mon Jan 6 15:47:46 2020 +0000 PCI: Set resource size directly in adjust_bridge_window() Change adjust_bridge_window() to set resource size directly instead of using additional resource lists. Because additional resource lists are optional resources, any algorithm that requires guaranteed allocation that uses them cannot be guaranteed to work. Remove the resource from add_list, as a zero-sized additional resource is redundant. Update comment in pci_bus_distribute_available_resources() to reflect the above changes. Link: https://lore.kernel.org/r/PSXP216MB04386BA48874B56BC5CB0292803C0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM Signed-off-by: Nicholas Johnson Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit 1e58f4e1cb47de03988f8b14f07f6941acc7e669 Author: Nicholas Johnson Date: Mon Jan 6 15:47:26 2020 +0000 PCI: Rename extend_bridge_window() to adjust_bridge_window() Rename extend_bridge_window() to adjust_bridge_window() to prepare for the fact that the window will be able to shrink. No functional change intended. Link: https://lore.kernel.org/r/PSXP216MB0438C47B3473D0C9DE531F18803C0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM Signed-off-by: Nicholas Johnson Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit 3d264da9b741fc6503ea54e3bb65c08a77dabca4 Author: Nicholas Johnson Date: Mon Jan 6 15:47:05 2020 +0000 PCI: Rename extend_bridge_window() parameter In extend_bridge_window(), change "available" parameter name to "new_size". This makes more sense as this parameter represents the new size for the window. No functional change intended. Link: https://lore.kernel.org/r/PSXP216MB043853617ECA4118C472A417803C0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM Signed-off-by: Nicholas Johnson Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit f924c26e4ee651493f602da2a3d7ff628824e636 Author: Nicholas Johnson Date: Mon Jan 6 15:46:13 2020 +0000 PCI: Consider alignment of hot-added bridges when assigning resources Change pci_bus_distribute_available_resources() to better handle bridges with different resource alignment requirements. The arguments io, mmio and mmio_pref represent the start and end addresses of resource, into which we must fit the current bridge window. The steps taken by pci_bus_distribute_available_resources(): - For io, mmio and mmio_pref, increase .start to align with the alignment of the current bridge window (otherwise the current bridge window may not fit within the available range). - For io, mmio and mmio_pref, adjust the current bridge window to the size after the above. - Count the number of hotplug bridges and normal bridges on this bus. - If the total number of bridges is one, give that bridge all of the resources and return. - If there are no hotplug bridges, return. - For io, mmio and mmio_pref, increase .start by the amount required for each bridge resource on the bus for non hotplug bridges, giving extra room to make up for alignment of those resources. - For io, mmio and mmio_pref, calculate the resource size per hotplug bridge which is available after the previous steps. - For io, mmio and mmio_pref, distribute the resources to each hotplug bridge, with the sizes calculated above. The motivation for fixing this is enabling devices that require greater than 1MB alignment. This fixes the case where the user hot-adds devices with BAR alignment >1MB and Linux fails to assign resources to it. Link: https://bugzilla.kernel.org/show_bug.cgi?id=199581 Link: https://lore.kernel.org/r/PSXP216MB0438C2BFD0FD3691ED9C83F4803C0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM Reported-by: Mika Westerberg Signed-off-by: Nicholas Johnson Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit 7779385484dad7c95b624f7c9ee1aa07ab8cf43b Author: Nicholas Johnson Date: Tue Jan 28 15:57:09 2020 -0600 PCI: Remove local variable usage in pci_bus_distribute_available_resources() In pci_bus_distribute_available_resources(), use resource_size() rather than the local available_io, etc. No functional change intended; this just makes the preceding patch smaller. [bhelgaas: extracted from https://lore.kernel.org/r/PSXP216MB0438587C47CBEDF365B1EA27803C0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM] Signed-off-by: Nicholas Johnson Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit d555a50fd6e0280735cabf8581feff875f3f39d7 Author: Nicholas Johnson Date: Mon Jan 6 15:45:52 2020 +0000 PCI: Pass size + alignment to pci_bus_distribute_available_resources() Change pci_bus_distribute_available_resources() arguments from resource_size_t to struct resource to add more information required to get the alignment correct for bridge windows with alignment >1M. We require (size, alignment), instead of just (size) which is what is currently available. The change from resource_size_t to struct resource does just that. Note that the struct resource arguments are passed by value and not by reference. We do not want to pass by reference and change the resource size of the parent bridge window. We only want the size information. No functional change intended. Link: https://lore.kernel.org/r/PSXP216MB0438587C47CBEDF365B1EA27803C0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM [bhelgaas: split parts to other patches to reduce the size of this one] Signed-off-by: Nicholas Johnson Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit 053eb5c150fd732624a1ea2f456337972d52b163 Author: Nicholas Johnson Date: Tue Jan 28 14:59:23 2020 -0600 PCI: Rename variables In pci_bus_distribute_available_resources(), rename: io => io_per_hp mmio => mmio_per_hp mmio_pref => mmio_pref_per_hp No functional change; this is just to make a subsequent patch smaller. [bhelgaas: extracted from https://lore.kernel.org/r/PSXP216MB0438587C47CBEDF365B1EA27803C0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM] Signed-off-by: Nicholas Johnson Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit 22b17db4ea05561c7c8e4d770f10751e22e339f9 Merge: a4fe2b4d87c9 c4e71212a245 Author: Linus Torvalds Date: Wed Jan 29 14:55:47 2020 -0800 Merge tag 'y2038-drivers-for-v5.6-signed' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground Pull y2038 updates from Arnd Bergmann: "Core, driver and file system changes These are updates to device drivers and file systems that for some reason or another were not included in the kernel in the previous y2038 series. I've gone through all users of time_t again to make sure the kernel is in a long-term maintainable state, replacing all remaining references to time_t with safe alternatives. Some related parts of the series were picked up into the nfsd, xfs, alsa and v4l2 trees. A final set of patches in linux-mm removes the now unused time_t/timeval/timespec types and helper functions after all five branches are merged for linux-5.6, ensuring that no new users get merged. As a result, linux-5.6, or my backport of the patches to 5.4 [1], should be the first release that can serve as a base for a 32-bit system designed to run beyond year 2038, with a few remaining caveats: - All user space must be compiled with a 64-bit time_t, which will be supported in the coming musl-1.2 and glibc-2.32 releases, along with installed kernel headers from linux-5.6 or higher. - Applications that use the system call interfaces directly need to be ported to use the time64 syscalls added in linux-5.1 in place of the existing system calls. This impacts most users of futex() and seccomp() as well as programming languages that have their own runtime environment not based on libc. - Applications that use a private copy of kernel uapi header files or their contents may need to update to the linux-5.6 version, in particular for sound/asound.h, xfs/xfs_fs.h, linux/input.h, linux/elfcore.h, linux/sockios.h, linux/timex.h and linux/can/bcm.h. - A few remaining interfaces cannot be changed to pass a 64-bit time_t in a compatible way, so they must be configured to use CLOCK_MONOTONIC times or (with a y2106 problem) unsigned 32-bit timestamps. Most importantly this impacts all users of 'struct input_event'. - All y2038 problems that are present on 64-bit machines also apply to 32-bit machines. In particular this affects file systems with on-disk timestamps using signed 32-bit seconds: ext4 with ext3-style small inodes, ext2, xfs (to be fixed soon) and ufs" [1] https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/log/?h=y2038-endgame * tag 'y2038-drivers-for-v5.6-signed' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground: (21 commits) Revert "drm/etnaviv: reject timeouts with tv_nsec >= NSEC_PER_SEC" y2038: sh: remove timeval/timespec usage from headers y2038: sparc: remove use of struct timex y2038: rename itimerval to __kernel_old_itimerval y2038: remove obsolete jiffies conversion functions nfs: fscache: use timespec64 in inode auxdata nfs: fix timstamp debug prints nfs: use time64_t internally sunrpc: convert to time64_t for expiry drm/etnaviv: avoid deprecated timespec drm/etnaviv: reject timeouts with tv_nsec >= NSEC_PER_SEC drm/msm: avoid using 'timespec' hfs/hfsplus: use 64-bit inode timestamps hostfs: pass 64-bit timestamps to/from user space packet: clarify timestamp overflow tsacct: add 64-bit btime field acct: stop using get_seconds() um: ubd: use 64-bit time_t where possible xtensa: ISS: avoid struct timeval dlm: use SO_SNDTIMEO_NEW instead of SO_SNDTIMEO_OLD ... commit a4fe2b4d87c9f2298ae6a641a7a64bc941d079d0 Merge: 3893c2025fec def97da13651 Author: Linus Torvalds Date: Wed Jan 29 14:53:23 2020 -0800 Merge tag 'printk-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk Pull printk update from Petr Mladek: "Prevent replaying log on all consoles" * tag 'printk-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: printk: fix exclusive_console replaying commit db51b4c85fb756f33617c1d29643e57be9bd2f1d Author: Sushma Kalakota Date: Wed Jan 8 15:05:10 2020 -0700 PCI: vmd: Add two VMD Device IDs Add new VMD device IDs that require the bus restriction mode. Signed-off-by: Sushma Kalakota Signed-off-by: Jon Derrick Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas commit 3e4827b05d2ac2d377ed136a52829ec46787bf4b Author: Jens Axboe Date: Wed Jan 8 15:18:09 2020 -0700 io_uring: add support for epoll_ctl(2) This adds IORING_OP_EPOLL_CTL, which can perform the same work as the epoll_ctl(2) system call. Signed-off-by: Jens Axboe commit 39220e8d4a2aaab045ea03cc16d737e85d0817bf Author: Jens Axboe Date: Wed Jan 8 15:05:37 2020 -0700 eventpoll: support non-blocking do_epoll_ctl() calls Also make it available outside of epoll, along with the helper that decides if we need to copy the passed in epoll_event. Signed-off-by: Jens Axboe commit 58e41a44c488f3e9601fd8150f58377ef8f44889 Author: Jens Axboe Date: Wed Jan 8 14:35:13 2020 -0700 eventpoll: abstract out epoll_ctl() handler No functional changes in this patch. Signed-off-by: Jens Axboe commit f53938d2c79ae3c768dc92b1c3d898dfe820a491 Author: Jarkko Nikula Date: Thu Jan 16 09:46:51 2020 +0200 i2c: i801: Add support for Intel Comet Lake PCH-V Add support for Intel Comet Lake PCH-V which is based on Intel Kaby Lake. Difference between it and other Comet Lake variants is that former uses previous iTCO version 4 and latter use version 6 like Intel Cannon Lake PCH. Signed-off-by: Jarkko Nikula Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 4fcb445ec688a62da9c864ab05a4bd39b0307cdc Author: Luca Ceresoli Date: Wed Jan 29 16:19:53 2020 +0100 docs: i2c: writing-clients: properly name the stop condition In I2C there is no such thing as a "stop bit". Use the proper naming: "stop condition". Signed-off-by: Luca Ceresoli Reported-by: Jean Delvare Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit ca5dbb0272cc30bbebd40315bb8a329e780f347a Author: Luca Ceresoli Date: Wed Jan 29 16:19:52 2020 +0100 docs: i2c: i2c-protocol: use same wording as smbus-protocol In smbus-protocol.rst we use the text "Implemented by" for the same meaning as "This corresponds to". Change everything to "Implemented by" for coherency. Signed-off-by: Luca Ceresoli Reported-by: Jean Delvare Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit f6fcefa10fdbc852ececadb1fd600570228b49ab Author: Luca Ceresoli Date: Wed Jan 29 16:19:51 2020 +0100 docs: i2c: rename sections so the overall picture is clearer Some of the section names are not very clear. Reading those names in the index.rst page does not help much in grasping what the content is supposed to be. Rename those sections to clarify their content, especially when reading the index page. Signed-off-by: Luca Ceresoli Acked-by: Peter Rosin Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 1ef0572296273b634339dd9c640c20ce1b8f436f Author: Luca Ceresoli Date: Wed Jan 29 16:19:50 2020 +0100 docs: i2c: old-module-parameters: use monospace instead of "" Use a monospace (literal) formatting for better readability of sysfs attributes and the "dummy" client name. This looks much more readable in ReST-generated output. Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit dfea2b16cc993ff00d0e1c137fd9b3e8f4badcd3 Author: Luca Ceresoli Date: Wed Jan 29 16:19:49 2020 +0100 docs: i2c: old-module-parameters: clarify this is for obsolete kernels This section applies only to code for very old kernels. Avoid people reading this unnecessarily. Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 899b56b37eb64ce1406e5de079147984b284f439 Author: Luca Ceresoli Date: Wed Jan 29 16:19:48 2020 +0100 docs: i2c: old-module-parameters: fix internal hyperlink Use ReST syntax so that a proper hyperlink is generated. Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 22714ef85478f7ff3a2dfd3e2bc854b72271ab8f Author: Luca Ceresoli Date: Wed Jan 29 16:19:47 2020 +0100 docs: i2c: instantiating-devices: use monospace for sysfs attributes Use a monospace (literal) formatting for better readability of sysfs attributes. Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit da9a80bf1976148cfb26feebe34b626cd460f3d3 Author: Luca Ceresoli Date: Wed Jan 29 16:19:46 2020 +0100 docs: i2c: instantiating-devices: rearrange static instatiation Among the "static" instantiation methods the "board file" method is described first. Move it as last, since it is being replaced by the other methods. Also fix subsubsection heading syntax and remove the "Method 1[abc]" prefix as the subsubsection structure clarifies the logical hierarchy. Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 4f71daf6294be7f376b52c668f044575764d97b3 Author: Luca Ceresoli Date: Wed Jan 29 16:19:45 2020 +0100 docs: i2c: instantiating-devices: fix internal hyperlink Use ReST syntax so that a proper hyperlink is generated. Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 95b83774e310fa5ef8fc60434ac55fe3dc375adc Author: Luca Ceresoli Date: Wed Jan 29 16:19:44 2020 +0100 docs: i2c: smbus-protocol: improve I2C Block transactions description Clarify from the beginning what these transactions are, and specifically how they differ from the SMBus counterparts, i.e. the lack of a Count byte. Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit c7148b059c2f88b2b70325cfe45a3271f5c16c43 Author: Luca Ceresoli Date: Wed Jan 29 16:19:43 2020 +0100 docs: i2c: smbus-protocol: fix punctuation Remove misplaced dot before colon. Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 414a596454a68c8672d339c916d8d2ed03245444 Author: Luca Ceresoli Date: Wed Jan 29 16:19:42 2020 +0100 docs: i2c: smbus-protocol: fix typo The subject is plural, fix the verb. Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit b36cbb70e4a2b81b26042b04538ffa69cfa24642 Author: Luca Ceresoli Date: Wed Jan 29 16:19:41 2020 +0100 docs: i2c: smbus-protocol: fix kernel-doc function syntax This clarifies these are functions (and would/will adds a hyperlink to the function documentation if/when documented). Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 3c13f1fbec59c75b115392b18271701ed6f77242 Author: Luca Ceresoli Date: Wed Jan 29 16:19:40 2020 +0100 docs: i2c: smbus-protocol: enable kernel-doc function syntax Hyperlinks from function names are not generated in headings. Move them in the plain text so they are rendered as clickable hyperlinks. While there also remove an unneeded colon in a heading. Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 9e89d61878f2969bfe018881566bc78871a00fa1 Author: Luca Ceresoli Date: Wed Jan 29 16:19:39 2020 +0100 docs: i2c: smbus-protocol: use proper names for ACK and NACK Use the proper ACK and NACK naming from the I2C specification instead of "accept" and "reverse accept". Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 026c0fe666dfa2cc759467b5e2dd3d963b5f43fb Author: Luca Ceresoli Date: Wed Jan 29 16:19:38 2020 +0100 docs: i2c: smbus-protocol: remove unneeded colons from table These colons are not needed: the columns already nicely separate the symbols from their description. They are also inconsistently preceded by whitespace. Remove the colons completely to simplify and clean up. Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit c0faa8a6be2465f6df8bf1249df321e6966fa062 Author: Luca Ceresoli Date: Wed Jan 29 16:19:37 2020 +0100 docs: i2c: smbus-protocol: properly name start and stop conditions In I2C there is no such thing as a "start bit" or a "stop bit". Use the proper naming: "start condition" and "stop condition". Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 924fbb4d2eb8941ff576b6dca57dff8222048cb5 Author: Luca Ceresoli Date: Wed Jan 29 16:19:36 2020 +0100 docs: i2c: smbus-protocol: fix link syntax Use the proper ReST syntax to generate a valid hyperlink. Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit db0d7424e774d830eb998de1b13b937ae6a55335 Author: Luca Ceresoli Date: Wed Jan 29 16:19:35 2020 +0100 docs: i2c: i2c-protocol: use proper names for ACK and NACK Use the proper ACK and NACK naming from the I2C specification instead of "accept" and "reverse accept". Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 02622c88618bb24faf50c51926e744e9e3ab334d Author: Luca Ceresoli Date: Wed Jan 29 16:19:34 2020 +0100 docs: i2c: i2c-protocol: remove unneeded colons from table These colons are not needed: the columns already nicely separate the symbols from their description. They are also inconsistently preceded by whitespace. Remove the colons completely to simplify and clean up. Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit f954731d2af433ce012f8dc456206eccd3cf2ee4 Author: Luca Ceresoli Date: Wed Jan 29 16:19:33 2020 +0100 docs: i2c: i2c-protocol: properly name start and stop conditions In I2C there is no such thing as a "start bit" or a "stop bit". Use the proper naming: "start condition" and "stop condition". Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit f72beb8bf9c401483a08fb548bbc9b946680a637 Author: Luca Ceresoli Date: Wed Jan 29 16:19:32 2020 +0100 docs: i2c: i2c-protocol: fix kernel-doc function syntax This clarifies these are functions and adds a hyperlink to the function documentation. Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 48ca3b7fb82ccc00a20e8d97f35ee7e6813ac1f9 Author: Luca Ceresoli Date: Wed Jan 29 16:19:31 2020 +0100 docs: i2c: replace "I2C-transfer" -> "I2C transfer" consistently "I2C transfer" is a legitimate english sentence, no need for a hyphen between the two words, as as such it is used in most of the documentation. Remove the hyphen in the few places where it is present. Signed-off-by: Luca Ceresoli Acked-by: Peter Rosin Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 40c573d12ea5d13c740322f6b9cdd93e593ceb1d Author: Luca Ceresoli Date: Wed Jan 29 16:19:30 2020 +0100 docs: i2c: fix typo Fix "issus" -> "issues". Signed-off-by: Luca Ceresoli Acked-by: Peter Rosin Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 2f07c05f14a8bf5ee815e159a451d580d9113db9 Author: Luca Ceresoli Date: Wed Jan 29 16:19:29 2020 +0100 docs: i2c: call it "I2C" consistently Uppercase "I2C" is used almost everywhere in the docs, but the lowercase version "i2c" is used somewhere. Use the uppercase form consistently. Signed-off-by: Luca Ceresoli Acked-by: Peter Rosin Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 020bc5b9296af6d3e0b255cff3a2674191287624 Author: Luca Ceresoli Date: Wed Jan 29 16:19:28 2020 +0100 docs: i2c: summary: rewrite the "terminology" section This section, partly dating back to the pre-git era, is somewhat unclear and partly incorrect. Rewrite it almost completely including a reference figure, concise but precise definition of each term and the paths where drivers are found. Particular care has been put in clarifying the relation between adapter and algorithm, which has no correspondence in the I2C spec terminology. Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 096c22f88ea09dab449f039863a46cb504b9b3ec Author: Luca Ceresoli Date: Wed Jan 29 16:19:27 2020 +0100 docs: i2c: summary: extend introduction - state the "official" name (I²C, not I2C, according to the spec) at the beginning but keep using the more practical I2C elsewhere - mention some known different names - add link to the specification document Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 21593938086fa2886fe07d06aaeb674254a02e3f Author: Luca Ceresoli Date: Wed Jan 29 16:19:26 2020 +0100 docs: i2c: sort index logically The index page currently lists sections in alphabetical file order without caring about their content. Sort sections based on their content logically, according to the following structure: * Intro to I2C/SMBus and their usage in Linux: summary, i2c-protocol, smbus-protocol, instantiating-devices, busses/index, i2c-topology, muxes/i2c-mux-gpio * Implementing drivers: writing-clients, dev-interface, dma-considerations, fault-codes, functionality * Debugging: gpio-fault-injection, i2c-stub * Slave I2C: slave-interface, slave-eeprom-backend * Advanced: ten-bit-addresses * Obsolete info: upgrading-clients, old-module-parameters Signed-off-by: Luca Ceresoli Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 4a890148df4740a6fce25f9bd4a70d1587a8e8e8 Merge: 6810df46c418 e65e228eb096 Author: Wolfram Sang Date: Wed Jan 29 21:59:20 2020 +0100 Merge branch 'i2c-mux/for-next' of https://github.com/peda-r/i2c-mux into i2c/for-5.6 The main feature is the idle-state rework of the pca954x driver from Biwen Li. commit 6810df46c41879eba8437ab020c7abf5d1db827e Merge: 878508aed477 cd5676db0574 Author: Wolfram Sang Date: Wed Jan 29 21:56:36 2020 +0100 Merge tag 'at24-updates-for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-5.6 at24 updates for linux v5.6 - minor maintenance: update the license tag, sort headers - move support for the write-protect pin into nvmem core - add a reference to the new wp-gpios property in nvmem to at25 bindings - add support for regulator and pm_runtime control commit 878508aed4776a5b08dcc000d33a01a42e3fd07d Author: Colin Ian King Date: Mon Jan 27 11:13:36 2020 +0000 i2c: xiic: fix indentation issue There is a statement that is indented one level too deeply, remove the extraneous tab. Fixes: b4c119dbc300 ("i2c: xiic: Add timeout to the rx fifo wait loop") Signed-off-by: Colin Ian King Reviewed-by: Shubhrajyoti Datta Signed-off-by: Wolfram Sang commit eca95cd5a36d1fb547e84b8fd86fa2b7ba7f4b91 Author: Colin Ian King Date: Sat Jan 25 20:20:20 2020 +0000 i2c: parport: fix spelling mistake: "Atmost" -> "At most" There is a spelling mistake in a module parameter description. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit f86cd20c9454847a524ddbdcdec32c0380ed7c9b Author: Jens Axboe Date: Wed Jan 29 13:46:44 2020 -0700 io_uring: fix linked command file table usage We're not consistent in how the file table is grabbed and assigned if we have a command linked that requires the use of it. Add ->file_table to the io_op_defs[] array, and use that to determine when to grab the table instead of having the handlers set it if they need to defer. This also means we can kill the IO_WQ_WORK_NEEDS_FILES flag. We always initialize work->files, so io-wq can just check for that. Signed-off-by: Jens Axboe commit ba19e16651a5c67fa8b53ce4fb5bfbab8d326b6c Author: Gal Pressman Date: Wed Jan 29 09:18:03 2020 +0200 RDMA/efa: Mask access flags with the correct optional range The uapi value IB_UVERBS_ACCESS_OPTIONAL_RANGE shouldn't be used inside the driver, use IB_ACCESS_OPTIONAL instead. Fixes: 86dd738cf20c ("RDMA/efa: Allow passing of optional access flags for MR registration") Link: https://lore.kernel.org/r/20200129071803.40117-1-galpress@amazon.com Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 3d67a2dbdbe9400523164d8557a7a5fb7ef83c7e Author: Nicholas Johnson Date: Mon Jan 6 15:45:32 2020 +0000 PCI: Remove unnecessary braces Remove unnecessary braces in pci_bus_distribute_available_resources(). No functional changes. Link: https://lore.kernel.org/r/PSXP216MB0438061CB4442460BB92A75F803C0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM Signed-off-by: Nicholas Johnson Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit 66f2d19f8116e16898f8d82e28573a384ddc430d Author: Takashi Iwai Date: Wed Jan 29 20:59:07 2020 +0100 ALSA: pcm: Fix memory leak at closing a stream without hw_free ALSA PCM core recently introduced a new managed PCM buffer allocation mode that does allocate / free automatically at hw_params and hw_free. However, it overlooked the code path directly calling hw_free PCM ops at releasing the PCM substream, and it may result in a memory leak as spotted by syzkaller when no buffer preallocation is used (e.g. vmalloc buffer). This patch papers over it with a slight refactoring. The hw_free ops call and relevant tasks are unified in a new helper function, and call it from both places. Fixes: 0dba808eae26 ("ALSA: pcm: Introduce managed buffer allocation mode") Reported-by: syzbot+30edd0f34bfcdc548ac4@syzkaller.appspotmail.com Cc: Link: https://lore.kernel.org/r/20200129195907.12197-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 46b770f720bdd8a7de1c04a1cab5d4e9e21d6666 Author: Ranjani Sridharan Date: Wed Jan 29 10:44:48 2020 -0800 ALSA: uapi: Fix sparse warning Fix the following sparse warning generated due to 64-bit compat type having fields defined explicitly with __s32: sound/soc/sof/sof-audio.c:46:31: warning: incorrect type in assignment (different base types) sound/soc/sof/sof-audio.c:46:31: expected restricted snd_pcm_state_t [usertype] state sound/soc/sof/sof-audio.c:46:31: got signed int [usertype] state Fixes: 80fe7430c708 ("ALSA: add new 32-bit layout for snd_pcm_mmap_status/control") Reported-by: Pierre-Louis Bossart Suggested-by: Takashi Iwai Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200129184448.3005-1-ranjani.sridharan@linux.intel.com Signed-off-by: Takashi Iwai commit 3893c2025fec6f0fa4b2d794f36bd56a55e46dec Merge: 5307040655d0 1e4a29556794 Author: Linus Torvalds Date: Wed Jan 29 11:47:08 2020 -0800 Merge tag 'erofs-for-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs updates from Gao Xiang: "A regression fix, several cleanups and (maybe) plus an upcoming new mount api convert patch as a part of vfs update are considered available for this cycle. All commits have been in linux-next and tested with no smoke out. Summary: - fix an out-of-bound read access introduced in v5.3, which could rarely cause data corruption - various cleanup patches" * tag 'erofs-for-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: clean up z_erofs_submit_queue() erofs: fold in postsubmit_is_all_bypassed() erofs: fix out-of-bound read for shifted uncompressed block erofs: remove void tagging/untagging of workgroup pointers erofs: remove unused tag argument while registering a workgroup erofs: remove unused tag argument while finding a workgroup erofs: correct indentation of an assigned structure inside a function commit 5307040655d0b8d465a2f54d9c67be5b3a780bcd Merge: 6aee4badd812 587065dcac64 Author: Linus Torvalds Date: Wed Jan 29 11:45:09 2020 -0800 Merge branch 'work.adfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull adfs updates from Al Viro: "adfs stuff for this cycle" * 'work.adfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (42 commits) fs/adfs: bigdir: Fix an error code in adfs_fplus_read() Documentation: update adfs filesystem documentation fs/adfs: mostly divorse inode number from indirect disc address fs/adfs: super: add support for E and E+ floppy image formats fs/adfs: super: extract filesystem block probe fs/adfs: dir: remove debug in adfs_dir_update() fs/adfs: super: fix inode dropping fs/adfs: bigdir: implement directory update support fs/adfs: bigdir: calculate and validate directory checkbyte fs/adfs: bigdir: directory validation strengthening fs/adfs: bigdir: extract directory validation fs/adfs: bigdir: factor out directory entry offset calculation fs/adfs: newdir: split out directory commit from update fs/adfs: newdir: clean up adfs_f_update() fs/adfs: newdir: merge adfs_dir_read() into adfs_f_read() fs/adfs: newdir: improve directory validation fs/adfs: newdir: factor out directory format validation fs/adfs: dir: use pointers to access directory head/tails fs/adfs: dir: add more efficient iterate() per-format method fs/adfs: dir: switch to iterate_shared method ... commit ccd1f27368e42a11117cf1bdb113cc640802f91e Author: Mat Martineau Date: Wed Jan 29 09:41:37 2020 -0800 Revert "MAINTAINERS: mptcp@ mailing list is moderated" This reverts commit 74759e1693311a8d1441de836c4080c192374238. mptcp@lists.01.org accepts messages from non-subscribers. There was an invisible and unexpected server-wide rule limiting the number of recipients for subscribers and non-subscribers alike, and that has now been turned off for this list. Cc: Randy Dunlap Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 6aee4badd8126f3a2b6d31c5e2db2439d316374f Merge: 15d663249653 b55eef872a96 Author: Linus Torvalds Date: Wed Jan 29 11:20:24 2020 -0800 Merge branch 'work.openat2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull openat2 support from Al Viro: "This is the openat2() series from Aleksa Sarai. I'm afraid that the rest of namei stuff will have to wait - it got zero review the last time I'd posted #work.namei, and there had been a leak in the posted series I'd caught only last weekend. I was going to repost it on Monday, but the window opened and the odds of getting any review during that... Oh, well. Anyway, openat2 part should be ready; that _did_ get sane amount of review and public testing, so here it comes" From Aleksa's description of the series: "For a very long time, extending openat(2) with new features has been incredibly frustrating. This stems from the fact that openat(2) is possibly the most famous counter-example to the mantra "don't silently accept garbage from userspace" -- it doesn't check whether unknown flags are present[1]. This means that (generally) the addition of new flags to openat(2) has been fraught with backwards-compatibility issues (O_TMPFILE has to be defined as __O_TMPFILE|O_DIRECTORY|[O_RDWR or O_WRONLY] to ensure old kernels gave errors, since it's insecure to silently ignore the flag[2]). All new security-related flags therefore have a tough road to being added to openat(2). Furthermore, the need for some sort of control over VFS's path resolution (to avoid malicious paths resulting in inadvertent breakouts) has been a very long-standing desire of many userspace applications. This patchset is a revival of Al Viro's old AT_NO_JUMPS[3] patchset (which was a variant of David Drysdale's O_BENEATH patchset[4] which was a spin-off of the Capsicum project[5]) with a few additions and changes made based on the previous discussion within [6] as well as others I felt were useful. In line with the conclusions of the original discussion of AT_NO_JUMPS, the flag has been split up into separate flags. However, instead of being an openat(2) flag it is provided through a new syscall openat2(2) which provides several other improvements to the openat(2) interface (see the patch description for more details). The following new LOOKUP_* flags are added: LOOKUP_NO_XDEV: Blocks all mountpoint crossings (upwards, downwards, or through absolute links). Absolute pathnames alone in openat(2) do not trigger this. Magic-link traversal which implies a vfsmount jump is also blocked (though magic-link jumps on the same vfsmount are permitted). LOOKUP_NO_MAGICLINKS: Blocks resolution through /proc/$pid/fd-style links. This is done by blocking the usage of nd_jump_link() during resolution in a filesystem. The term "magic-links" is used to match with the only reference to these links in Documentation/, but I'm happy to change the name. It should be noted that this is different to the scope of ~LOOKUP_FOLLOW in that it applies to all path components. However, you can do openat2(NO_FOLLOW|NO_MAGICLINKS) on a magic-link and it will *not* fail (assuming that no parent component was a magic-link), and you will have an fd for the magic-link. In order to correctly detect magic-links, the introduction of a new LOOKUP_MAGICLINK_JUMPED state flag was required. LOOKUP_BENEATH: Disallows escapes to outside the starting dirfd's tree, using techniques such as ".." or absolute links. Absolute paths in openat(2) are also disallowed. Conceptually this flag is to ensure you "stay below" a certain point in the filesystem tree -- but this requires some additional to protect against various races that would allow escape using "..". Currently LOOKUP_BENEATH implies LOOKUP_NO_MAGICLINKS, because it can trivially beam you around the filesystem (breaking the protection). In future, there might be similar safety checks done as in LOOKUP_IN_ROOT, but that requires more discussion. In addition, two new flags are added that expand on the above ideas: LOOKUP_NO_SYMLINKS: Does what it says on the tin. No symlink resolution is allowed at all, including magic-links. Just as with LOOKUP_NO_MAGICLINKS this can still be used with NOFOLLOW to open an fd for the symlink as long as no parent path had a symlink component. LOOKUP_IN_ROOT: This is an extension of LOOKUP_BENEATH that, rather than blocking attempts to move past the root, forces all such movements to be scoped to the starting point. This provides chroot(2)-like protection but without the cost of a chroot(2) for each filesystem operation, as well as being safe against race attacks that chroot(2) is not. If a race is detected (as with LOOKUP_BENEATH) then an error is generated, and similar to LOOKUP_BENEATH it is not permitted to cross magic-links with LOOKUP_IN_ROOT. The primary need for this is from container runtimes, which currently need to do symlink scoping in userspace[7] when opening paths in a potentially malicious container. There is a long list of CVEs that could have bene mitigated by having RESOLVE_THIS_ROOT (such as CVE-2017-1002101, CVE-2017-1002102, CVE-2018-15664, and CVE-2019-5736, just to name a few). In order to make all of the above more usable, I'm working on libpathrs[8] which is a C-friendly library for safe path resolution. It features a userspace-emulated backend if the kernel doesn't support openat2(2). Hopefully we can get userspace to switch to using it, and thus get openat2(2) support for free once it's ready. Future work would include implementing things like RESOLVE_NO_AUTOMOUNT and possibly a RESOLVE_NO_REMOTE (to allow programs to be sure they don't hit DoSes though stale NFS handles)" * 'work.openat2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: Documentation: path-lookup: include new LOOKUP flags selftests: add openat2(2) selftests open: introduce openat2(2) syscall namei: LOOKUP_{IN_ROOT,BENEATH}: permit limited ".." resolution namei: LOOKUP_IN_ROOT: chroot-like scoped resolution namei: LOOKUP_BENEATH: O_BENEATH-like scoped resolution namei: LOOKUP_NO_XDEV: block mountpoint crossing namei: LOOKUP_NO_MAGICLINKS: block magic-link resolution namei: LOOKUP_NO_SYMLINKS: block symlink resolution namei: allow set_root() to produce errors namei: allow nd_jump_link() to produce errors nsfs: clean-up ns_get_path() signature to return int namei: only return -ECHILD from follow_dotdot_rcu() commit 15d6632496537fa66488221ee5dd2f9fb318ef2e Merge: 80b60e3849bf 59d8cc6b2e37 Author: Linus Torvalds Date: Wed Jan 29 11:04:49 2020 -0800 Merge branch 'urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull RCU warning removal from Paul McKenney: "A single commit that fixes an embarrassing bug discussed here: https://lore.kernel.org/lkml/20200125131425.GB16136@zn.tnic/ which apparently also affects smaller systems" [ This was sent to Ingo, but since I see the issue on the laptop I use for testing during the merge window, I'm doing the pull directly - Linus ] * 'urgent-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: rcu: Forgive slow expedited grace periods at boot time commit 80b60e3849bfe987801a73ebd4bab43b7b591a09 Merge: 701a9c8092dd 74777eaf7aef Author: Linus Torvalds Date: Wed Jan 29 11:03:21 2020 -0800 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core fixes from Ingo Molnar: "Three objtool fixes, plus marking SFI as obsolete" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Skip samples subdirectory objtool: Fix ARCH=x86_64 build error objtool: Silence build output MAINTAINERS: Mark simple firmware interface (SFI) obsolete commit 701a9c8092ddf299d7f90ab2d66b19b4526d1186 Merge: 975f9ce9a067 0db4a15d4c27 Author: Linus Torvalds Date: Wed Jan 29 10:35:54 2020 -0800 Merge tag 'char-misc-5.6-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 char/misc/whatever driver changes for 5.6-rc1 Included in here are loads of things from a variety of different driver subsystems: - soundwire updates - binder updates - nvmem updates - firmware drivers updates - extcon driver updates - various misc driver updates - fpga driver updates - interconnect subsystem and driver updates - bus driver updates - uio driver updates - mei driver updates - w1 driver cleanups - various other small driver updates All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (86 commits) mei: me: add jasper point DID char: hpet: Use flexible-array member binder: fix log spam for existing debugfs file creation. mei: me: add comet point (lake) H device ids nvmem: add QTI SDAM driver dt-bindings: nvmem: add binding for QTI SPMI SDAM dt-bindings: imx-ocotp: Add i.MX8MP compatible dt-bindings: soundwire: fix example soundwire: cadence: fix kernel-doc parameter descriptions soundwire: intel: report slave_ids for each link to SOF driver siox: Use the correct style for SPDX License Identifier w1: omap-hdq: Simplify driver with PM runtime autosuspend firmware: stratix10-svc: Remove unneeded semicolon firmware: google: Probe for a GSMI handler in firmware firmware: google: Unregister driver_info on failure and exit in gsmi firmware: google: Release devices before unregistering the bus slimbus: qcom: add missed clk_disable_unprepare in remove slimbus: Use the correct style for SPDX License Identifier slimbus: qcom-ngd-ctrl: Use dma_request_chan() instead dma_request_slave_channel() dt-bindings: SLIMBus: add slim devices optional properties ... commit 975f9ce9a067a82b89d49e63938e01b2773ac9d4 Merge: 7ba31c3f2f1e 85db1cde8253 Author: Linus Torvalds Date: Wed Jan 29 10:18:20 2020 -0800 Merge tag 'driver-core-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is a small set of changes for 5.6-rc1 for the driver core and some firmware subsystem changes. Included in here are: - device.h splitup like you asked for months ago - devtmpfs minor cleanups - firmware core minor changes - debugfs fix for lockdown mode - kernfs cleanup fix - cpu topology minor fix All of these have been in linux-next for a while with no reported issues" * tag 'driver-core-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (22 commits) firmware: Rename FW_OPT_NOFALLBACK to FW_OPT_NOFALLBACK_SYSFS devtmpfs: factor out common tail of devtmpfs_{create,delete}_node devtmpfs: initify a bit devtmpfs: simplify initialization of mount_dev devtmpfs: factor out setup part of devtmpfsd() devtmpfs: fix theoretical stale pointer deref in devtmpfsd() driver core: platform: fix u32 greater or equal to zero comparison cpu-topology: Don't error on more than CONFIG_NR_CPUS CPUs in device tree debugfs: Return -EPERM when locked down driver core: Print device when resources present in really_probe() driver core: Fix test_async_driver_probe if NUMA is disabled driver core: platform: Prevent resouce overflow from causing infinite loops fs/kernfs/dir.c: Clean code by removing always true condition component: do not dereference opaque pointer in debugfs drivers/component: remove modular code debugfs: Fix warnings when building documentation device.h: move 'struct driver' stuff out to device/driver.h device.h: move 'struct class' stuff out to device/class.h device.h: move 'struct bus' stuff out to device/bus.h device.h: move dev_printk()-like functions to dev_printk.h ... commit 7ba31c3f2f1ee095d8126f4d3757fc3b2bc3c838 Merge: ca9b5b628398 fc157998b825 Author: Linus Torvalds Date: Wed Jan 29 10:15:11 2020 -0800 Merge tag 'staging-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO updates from Greg KH: "Here is the big staging/iio driver patches for 5.6-rc1 Included in here are: - lots of new IIO drivers and updates for that subsystem - the usual huge quantity of minor cleanups for staging drivers - removal of the following staging drivers: - isdn/avm - isdn/gigaset - isdn/hysdn - octeon-usb - octeon ethernet Overall we deleted far more lines than we added, removing over 40k of old and obsolete driver code. All of these changes have been in linux-next for a while with no reported issues" * tag 'staging-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (353 commits) staging: most: usb: check for NULL device staging: next: configfs: fix release link staging: most: core: fix logging messages staging: most: core: remove container struct staging: most: remove struct device core driver staging: most: core: drop device reference staging: most: remove device from interface structure staging: comedi: drivers: fix spelling mistake "to" -> "too" staging: exfat: remove fs_func struct. staging: wilc1000: avoid mutex unlock without lock in wilc_wlan_handle_txq() staging: wilc1000: return zero on success and non-zero on function failure staging: axis-fifo: replace spinlock with mutex staging: wilc1000: remove unused code prior to throughput enhancement in SPI staging: wilc1000: added 'wilc_' prefix for 'struct assoc_resp' name staging: wilc1000: move firmware API struct's to separate header file staging: wilc1000: remove use of infinite loop conditions staging: kpc2000: rename variables with kpc namespace staging: vt6656: Remove memory buffer from vnt_download_firmware. staging: vt6656: Just check NEWRSR_DECRYPTOK for RX_FLAG_DECRYPTED. staging: vt6656: Use vnt_rx_tail struct for tail variables. ... commit ca9b5b6283984f67434cee810f3b08e19630226d Merge: aac96626713f 85f4c95172d6 Author: Linus Torvalds Date: Wed Jan 29 10:13:27 2020 -0800 Merge tag 'tty-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial driver updates from Greg KH: "Here are the big set of tty and serial driver updates for 5.6-rc1 Included in here are: - dummy_con cleanups (touches lots of arch code) - sysrq logic cleanups (touches lots of serial drivers) - samsung driver fixes (wasn't really being built) - conmakeshash move to tty subdir out of scripts - lots of small tty/serial driver updates All of these have been in linux-next for a while with no reported issues" * tag 'tty-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (140 commits) tty: n_hdlc: Use flexible-array member and struct_size() helper tty: baudrate: SPARC supports few more baud rates tty: baudrate: Synchronise baud_table[] and baud_bits[] tty: serial: meson_uart: Add support for kernel debugger serial: imx: fix a race condition in receive path serial: 8250_bcm2835aux: Document struct bcm2835aux_data serial: 8250_bcm2835aux: Use generic remapping code serial: 8250_bcm2835aux: Allocate uart_8250_port on stack serial: 8250_bcm2835aux: Suppress register_port error on -EPROBE_DEFER serial: 8250_bcm2835aux: Suppress clk_get error on -EPROBE_DEFER serial: 8250_bcm2835aux: Fix line mismatch on driver unbind serial_core: Remove unused member in uart_port vt: Correct comment documenting do_take_over_console() vt: Delete comment referencing non-existent unbind_con_driver() arch/xtensa/setup: Drop dummy_con initialization arch/x86/setup: Drop dummy_con initialization arch/unicore32/setup: Drop dummy_con initialization arch/sparc/setup: Drop dummy_con initialization arch/sh/setup: Drop dummy_con initialization arch/s390/setup: Drop dummy_con initialization ... commit aac96626713fe167c672f9a008be0f514aa3e237 Merge: 6ba3d7066c71 eaa519983fd9 Author: Linus Torvalds Date: Wed Jan 29 10:09:44 2020 -0800 Merge tag 'usb-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/Thunderbolt/PHY driver updates from Greg KH: "Here is the big USB and Thunderbolt and PHY driver updates for 5.6-rc1. With the advent of USB4, "Thunderbolt" has really become USB4, so the renaming of the Kconfig option and starting to share subsystem code has begun, hence both subsystems coming in through the same tree here. PHY driver updates also touched USB drivers, so that is coming in through here as well. Major stuff included in here are: - USB 4 initial support added (i.e. Thunderbolt) - musb driver updates - USB gadget driver updates - PHY driver updates - USB PHY driver updates - lots of USB serial stuff fixed up - USB typec updates - USB-IP fixes - lots of other smaller USB driver updates All of these have been in linux-next for a while now (the usb-serial tree is already tested in linux-next on its own before merged into here), with no reported issues" [ Removed an incorrect compile test enablement for PHY_EXYNOS5250_SATA that causes configuration warnings - Linus ] * tag 'usb-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (207 commits) Doc: ABI: add usb charger uevent usb: phy: show USB charger type for user usb: cdns3: fix spelling mistake and rework grammar in text usb: phy: phy-gpio-vbus-usb: Convert to GPIO descriptors USB: serial: cyberjack: fix spelling mistake "To" -> "Too" USB: serial: ir-usb: simplify endpoint check USB: serial: ir-usb: make set_termios synchronous USB: serial: ir-usb: fix IrLAP framing USB: serial: ir-usb: fix link-speed handling USB: serial: ir-usb: add missing endpoint sanity check usb: typec: fusb302: fix "op-sink-microwatt" default that was in mW usb: typec: wcove: fix "op-sink-microwatt" default that was in mW usb: dwc3: pci: add ID for the Intel Comet Lake -V variant usb: typec: tcpci: mask event interrupts when remove driver usb: host: xhci-tegra: set MODULE_FIRMWARE for tegra186 usb: chipidea: add inline for ci_hdrc_host_driver_init if host is not defined usb: chipidea: handle single role for usb role class usb: musb: fix spelling mistake: "periperal" -> "peripheral" phy: ti: j721e-wiz: Fix build error without CONFIG_OF_ADDRESS USB: usbfs: Always unlink URBs in reverse order ... commit 6ba3d7066c71d2103da255df19eb613d299bab15 Merge: fa889d85551e 122ce22cb37b Author: Linus Torvalds Date: Wed Jan 29 09:51:36 2020 -0800 Merge tag 'pinctrl-v5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "This is the bulk of pin control changes, nothing too exciting about this. Some changes hit arch/sh and arch/arm but are well isolated and acknowledged by the respective arch maintainers. Core changes: - Dropped the chained IRQ setup callback into GPIOLIB as we got rid of the last users of that in this changeset. New drivers: - New driver for Ingenic X1830. - New driver for Freescale i.MX8MP. Driver enhancements: - Fix all remaining Intel drivers to pass their IRQ chips along with the GPIO chips. - Intel Baytrail allocates its irqchip dynamically. - Intel Lynxpoint is thoroughly rewritten and modernized. - Aspeed AST2600 pin muxing and configuration is much improved. - Qualcomm SC7180 functions are updated and wakeup interrupt map is provided. - A whole slew of Renesas SH-PFC cleanups and improvements. - Fix up the Intel DT bindings to use the generic YAML DT bindings schema (a first user of this)" * tag 'pinctrl-v5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (99 commits) pinctrl: madera: Remove extra blank line pinctrl: qcom: Don't lock around irq_set_irq_wake() pinctrl: mvebu: armada-37xx: use use platform api gpio: Drop the chained IRQ handler assign function pinctrl: freescale: Add i.MX8MP pinctrl driver support dt-bindings: imx: Add pinctrl binding doc for i.MX8MP pinctrl: tigerlake: Tiger Lake uses _HID enumeration pinctrl: sunrisepoint: Add Coffee Lake-S ACPI ID pinctrl: iproc: Use platform_get_irq_optional() to avoid error message pinctrl: dt-bindings: Fix some errors in the lgm and pinmux schema pinctrl: intel: Pass irqchip when adding gpiochip pinctrl: intel: Add GPIO <-> pin mapping ranges via callback pinctrl: baytrail: Replace WARN with dev_info_once when setting direct-irq pin to output pinctrl: baytrail: Do not clear IRQ flags on direct-irq enabled pins pinctrl: sunrisepoint: Add missing Interrupt Status register offset pinctrl: sh-pfc: Split R-Car H3 support in two independent drivers pinctrl: artpec6: fix __iomem on reg in set pinctrl: ingenic: Use devm_platform_ioremap_resource() pinctrl: ingenic: Factorize irq_set_type function pinctrl: ingenic: Remove duplicated ingenic_chip_info structures ... commit a5b0cda136f4f420a8e24e50d19dfcef2f81df2e Author: Petr Vorel Date: Tue Jan 28 00:14:39 2020 +0100 regulator: qcom_spmi: Fix docs for PM8004 Fixes: 2e36e140b8b8 ("regulator: qcom_spmi: Add support for PM8004 regulators") Signed-off-by: Petr Vorel Link: https://lore.kernel.org/r/20200127231439.3562452-1-petr.vorel@gmail.com Signed-off-by: Mark Brown commit 4099c3295e480907e37b93d51fc17fda81dd5bed Author: Takashi Iwai Date: Mon Jan 27 20:28:31 2020 +0100 ASoC: rt715: Add __maybe_unused to PM callbacks Fix the compile warnings by adding __maybe_unused to PM callbacks: sound/soc/codecs/rt715-sdw.c:566:12: warning: ‘rt715_dev_resume’ defined but not used [-Wunused-function] sound/soc/codecs/rt715-sdw.c:552:12: warning: ‘rt715_dev_suspend’ defined but not used [-Wunused-function] Fixes: d1ede0641b05 ("ASoC: rt715: add RT715 codec driver") Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20200127192831.14057-5-tiwai@suse.de Signed-off-by: Mark Brown commit 973649d38e2664eb45e1ae9adfdce53626c29f94 Author: Takashi Iwai Date: Mon Jan 27 20:28:30 2020 +0100 ASoC: rt711: Add __maybe_unused to PM callbacks Fix the compile warnings by adding __maybe_unused to PM callbacks: sound/soc/codecs/rt711-sdw.c:504:12: warning: ‘rt711_dev_resume’ defined but not used [-Wunused-function] sound/soc/codecs/rt711-sdw.c:490:12: warning: ‘rt711_dev_suspend’ defined but not used [-Wunused-function] Fixes: 320b8b0d13b8 ("ASoC: rt711: add rt711 codec driver") Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20200127192831.14057-4-tiwai@suse.de Signed-off-by: Mark Brown commit 809a9b63323278e94f73d8b1f85b64e347f639ba Author: Takashi Iwai Date: Mon Jan 27 20:28:29 2020 +0100 ASoC: rt700: Add __maybe_unused to PM callbacks Fix the compile warnings by adding __maybe_unused to PM callbacks: sound/soc/codecs/rt700-sdw.c:503:12: warning: ‘rt700_dev_resume’ defined but not used [-Wunused-function] sound/soc/codecs/rt700-sdw.c:489:12: warning: ‘rt700_dev_suspend’ defined but not used [-Wunused-function] Fixes: 7d2a5f9ae41e ("ASoC: rt700: add rt700 codec driver") Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20200127192831.14057-3-tiwai@suse.de Signed-off-by: Mark Brown commit faa37a9318899752d85761d47e79a42f3a0aa1b9 Author: Takashi Iwai Date: Mon Jan 27 20:28:28 2020 +0100 ASoC: rt1308-sdw: Add __maybe_unused to PM callbacks Fix the compile warnings by adding __maybe_unused to PM callbacks: sound/soc/codecs/rt1308-sdw.c:690:12: warning: ‘rt1308_dev_resume’ defined but not used [-Wunused-function] sound/soc/codecs/rt1308-sdw.c:676:12: warning: ‘rt1308_dev_suspend’ defined but not used [-Wunused-function] Fixes: a87a6653a28c ("ASoC: rt1308-sdw: add rt1308 SdW amplifier driver") Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20200127192831.14057-2-tiwai@suse.de Signed-off-by: Mark Brown commit 67e69e1d46becd934a03489c38fc42bb2510c1c6 Author: Akshu Agrawal Date: Tue Jan 28 16:00:22 2020 +0530 ASoC: amd: Fix simultaneous playback and capture Stopping of one stream is killing the other stream when they are running simultaneously. This is because, IER register is cleared which disables I2S and overrides any other block enables. Clearing IER register only when all streams on a channel are disabled, fixes the issue. Signed-off-by: Akshu Agrawal Link: https://lore.kernel.org/r/20200128103029.128841-1-akshu.agrawal@amd.com Signed-off-by: Mark Brown commit fa889d85551e0bd962fdefe1cc113f9ba1d04a36 Merge: b3a608222336 0282c72d30d3 Author: Linus Torvalds Date: Wed Jan 29 09:43:39 2020 -0800 Merge tag 'gpio-v5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v5.6 kernel cycle. This is a pretty calm cycle so far, nothing special going on really. Some more changes will come in from the irqchip and pin control trees. I also deleted an orphan include file for FMC that was dangling since subsystem was removed. Core changes: - Document the usecases for the kernelspace vs userspace handling of GPIOs. - Handle MSI (message signalled interrupts) properly in the core hierarchical irqdomain code. - Fix a rare race condition while initializing the descriptor array. New drivers: - Xylon LogiCVC GPIO driver. - WDC934x GPIO controller driver. Driver improvements: - Implemented suspend/resume in the Tegra driver. - MPC8xx edge detection fixup. - Properly convert ThunderX to use hierarchical irqdomain with GPIOLIB_IRQCHIP on top of the revert of the previous buggy switchover. This time it works (hopefully). Misc: - Drop a FMC remnant file - A slew of fixes" * tag 'gpio-v5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (48 commits) MAINTAINERS: Replace Tien Hock Loh as Altera PIO maintainer gpiolib: hold gpio devices lock until ->descs array is initialised gpio: aspeed-sgpio: fixed typos gpio: mvebu: clear irq in edge cause register before unmask edge irq gpiolib: Lower verbosity when allocating hierarchy irq gpiolib: Remove duplicated function gpio_do_set_config() gpio: Fix the no return statement warning gpio: wcd934x: Add support to wcd934x gpio controller gpiolib: remove set but not used variable 'config' gpio: vx855: fixed a typo gpio: mockup: sort headers alphabetically gpio: mockup: update the license tag gpio: Remove the unused flags gpiolib: Set lockdep class for hierarchical irq domains gpio: thunderx: Switch to GPIOLIB_IRQCHIP gpiolib: Add the support for the msi parent domain gpiolib: Add support for the irqdomain which doesn't use irq_fwspec as arg gpio: Add use guidance documentation dt-bindings: gpio: wcd934x: Add bindings for gpio gpio: altera: change to platform_get_irq_optional to avoid false-positive error ... commit 5038517119d50ed0240059b1d7fc2faa92371c08 Author: Kadlecsik József Date: Sat Jan 25 20:39:25 2020 +0100 netfilter: ipset: fix suspicious RCU usage in find_set_and_id find_set_and_id() is called when the NFNL_SUBSYS_IPSET mutex is held. However, in the error path there can be a follow-up recvmsg() without the mutex held. Use the start() function of struct netlink_dump_control instead of dump() to verify and report if the specified set does not exist. Thanks to Pablo Neira Ayuso for helping me to understand the subleties of the netlink protocol. Reported-by: syzbot+fc69d7cb21258ab4ae4d@syzkaller.appspotmail.com Signed-off-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit d55c6ab4b368633f39f8fe059f3b877f978cfb4c Merge: 44efc78d0e46 ae2dd7164943 Author: David S. Miller Date: Wed Jan 29 17:45:20 2020 +0100 Merge branch 'mptcp-fix-sockopt-crash-and-lockdep-splats' Florian Westphal says: ==================== mptcp: fix sockopt crash and lockdep splats Christoph Paasch reported a few bugs and lockdep splats triggered by syzkaller. One patch fixes a crash in set/getsockopt. Two patches fix lockdep splats related to the order in which RTNL and socket lock are taken. Last patch fixes out-of-bounds access when TCP syncookies are used. Change since last iteration on mptcp-list: - add needed refcount in patch 2 - call tcp_get/setsockopt directly in patch 2 Other patches unchanged except minor amends to commit messages. ==================== Signed-off-by: David S. Miller commit ae2dd7164943e03644293af92802550d052632e6 Author: Florian Westphal Date: Wed Jan 29 15:54:46 2020 +0100 mptcp: handle tcp fallback when using syn cookies We can't deal with syncookie mode yet, the syncookie rx path will create tcp reqsk, i.e. we get OOB access because we treat tcp reqsk as mptcp reqsk one: TCP: SYN flooding on port 20002. Sending cookies. BUG: KASAN: slab-out-of-bounds in subflow_syn_recv_sock+0x451/0x4d0 net/mptcp/subflow.c:191 Read of size 1 at addr ffff8881167bc148 by task syz-executor099/2120 subflow_syn_recv_sock+0x451/0x4d0 net/mptcp/subflow.c:191 tcp_get_cookie_sock+0xcf/0x520 net/ipv4/syncookies.c:209 cookie_v6_check+0x15a5/0x1e90 net/ipv6/syncookies.c:252 tcp_v6_cookie_check net/ipv6/tcp_ipv6.c:1123 [inline] [..] Bug can be reproduced via "sysctl net.ipv4.tcp_syncookies=2". Note that MPTCP should work with syncookies (4th ack would carry needed state), but it appears better to sort that out in -next so do tcp fallback for now. I removed the MPTCP ifdef for tcp_rsk "is_mptcp" member because if (IS_ENABLED()) is easier to read than "#ifdef IS_ENABLED()/#endif" pair. Cc: Eric Dumazet Fixes: cec37a6e41aae7bf ("mptcp: Handle MP_CAPABLE options for outgoing connections") Reported-by: Christoph Paasch Tested-by: Christoph Paasch Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit b2c5b614ca6ed460144788e7f9634569cc0c7b51 Author: Florian Westphal Date: Wed Jan 29 15:54:45 2020 +0100 mptcp: avoid a lockdep splat when mcast group was joined syzbot triggered following lockdep splat: ffffffff82d2cd40 (rtnl_mutex){+.+.}, at: ip_mc_drop_socket+0x52/0x180 but task is already holding lock: ffff8881187a2310 (sk_lock-AF_INET){+.+.}, at: mptcp_close+0x18/0x30 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (sk_lock-AF_INET){+.+.}: lock_acquire+0xee/0x230 lock_sock_nested+0x89/0xc0 do_ip_setsockopt.isra.0+0x335/0x22f0 ip_setsockopt+0x35/0x60 tcp_setsockopt+0x5d/0x90 __sys_setsockopt+0xf3/0x190 __x64_sys_setsockopt+0x61/0x70 do_syscall_64+0x72/0x300 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (rtnl_mutex){+.+.}: check_prevs_add+0x2b7/0x1210 __lock_acquire+0x10b6/0x1400 lock_acquire+0xee/0x230 __mutex_lock+0x120/0xc70 ip_mc_drop_socket+0x52/0x180 inet_release+0x36/0xe0 __sock_release+0xfd/0x130 __mptcp_close+0xa8/0x1f0 inet_release+0x7f/0xe0 __sock_release+0x69/0x130 sock_close+0x18/0x20 __fput+0x179/0x400 task_work_run+0xd5/0x110 do_exit+0x685/0x1510 do_group_exit+0x7e/0x170 __x64_sys_exit_group+0x28/0x30 do_syscall_64+0x72/0x300 entry_SYSCALL_64_after_hwframe+0x49/0xbe The trigger is: socket(AF_INET, SOCK_STREAM, 0x106 /* IPPROTO_MPTCP */) = 4 setsockopt(4, SOL_IP, MCAST_JOIN_GROUP, {gr_interface=7, gr_group={sa_family=AF_INET, sin_port=htons(20003), sin_addr=inet_addr("224.0.0.2")}}, 136) = 0 exit(0) Which results in a call to rtnl_lock while we are holding the parent mptcp socket lock via mptcp_close -> lock_sock(msk) -> inet_release -> ip_mc_drop_socket -> rtnl_lock(). >From lockdep point of view we thus have both 'rtnl_lock; lock_sock' and 'lock_sock; rtnl_lock'. Fix this by stealing the msk conn_list and doing the subflow close without holding the msk lock. Fixes: cec37a6e41aae7bf ("mptcp: Handle MP_CAPABLE options for outgoing connections") Reported-by: Christoph Paasch Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 50e741bb3b15fd5410bac379bdb4bc795d62b45c Author: Florian Westphal Date: Wed Jan 29 15:54:44 2020 +0100 mptcp: fix panic on user pointer access Its not possible to call the kernel_(s|g)etsockopt functions here, the address points to user memory: General protection fault in user access. Non-canonical address? WARNING: CPU: 1 PID: 5352 at arch/x86/mm/extable.c:77 ex_handler_uaccess+0xba/0xe0 arch/x86/mm/extable.c:77 Kernel panic - not syncing: panic_on_warn set ... [..] Call Trace: fixup_exception+0x9d/0xcd arch/x86/mm/extable.c:178 general_protection+0x2d/0x40 arch/x86/entry/entry_64.S:1202 do_ip_getsockopt+0x1f6/0x1860 net/ipv4/ip_sockglue.c:1323 ip_getsockopt+0x87/0x1c0 net/ipv4/ip_sockglue.c:1561 tcp_getsockopt net/ipv4/tcp.c:3691 [inline] tcp_getsockopt+0x8c/0xd0 net/ipv4/tcp.c:3685 kernel_getsockopt+0x121/0x1f0 net/socket.c:3736 mptcp_getsockopt+0x69/0x90 net/mptcp/protocol.c:830 __sys_getsockopt+0x13a/0x220 net/socket.c:2175 We can call tcp_get/setsockopt functions instead. Doing so fixes crashing, but still leaves rtnl related lockdep splat: WARNING: possible circular locking dependency detected 5.5.0-rc6 #2 Not tainted ------------------------------------------------------ syz-executor.0/16334 is trying to acquire lock: ffffffff84f7a080 (rtnl_mutex){+.+.}, at: do_ip_setsockopt.isra.0+0x277/0x3820 net/ipv4/ip_sockglue.c:644 but task is already holding lock: ffff888116503b90 (sk_lock-AF_INET){+.+.}, at: lock_sock include/net/sock.h:1516 [inline] ffff888116503b90 (sk_lock-AF_INET){+.+.}, at: mptcp_setsockopt+0x28/0x90 net/mptcp/protocol.c:1284 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (sk_lock-AF_INET){+.+.}: lock_sock_nested+0xca/0x120 net/core/sock.c:2944 lock_sock include/net/sock.h:1516 [inline] do_ip_setsockopt.isra.0+0x281/0x3820 net/ipv4/ip_sockglue.c:645 ip_setsockopt+0x44/0xf0 net/ipv4/ip_sockglue.c:1248 udp_setsockopt+0x5d/0xa0 net/ipv4/udp.c:2639 __sys_setsockopt+0x152/0x240 net/socket.c:2130 __do_sys_setsockopt net/socket.c:2146 [inline] __se_sys_setsockopt net/socket.c:2143 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2143 do_syscall_64+0xbd/0x5b0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (rtnl_mutex){+.+.}: check_prev_add kernel/locking/lockdep.c:2475 [inline] check_prevs_add kernel/locking/lockdep.c:2580 [inline] validate_chain kernel/locking/lockdep.c:2970 [inline] __lock_acquire+0x1fb2/0x4680 kernel/locking/lockdep.c:3954 lock_acquire+0x127/0x330 kernel/locking/lockdep.c:4484 __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x158/0x1340 kernel/locking/mutex.c:1103 do_ip_setsockopt.isra.0+0x277/0x3820 net/ipv4/ip_sockglue.c:644 ip_setsockopt+0x44/0xf0 net/ipv4/ip_sockglue.c:1248 tcp_setsockopt net/ipv4/tcp.c:3159 [inline] tcp_setsockopt+0x8c/0xd0 net/ipv4/tcp.c:3153 kernel_setsockopt+0x121/0x1f0 net/socket.c:3767 mptcp_setsockopt+0x69/0x90 net/mptcp/protocol.c:1288 __sys_setsockopt+0x152/0x240 net/socket.c:2130 __do_sys_setsockopt net/socket.c:2146 [inline] __se_sys_setsockopt net/socket.c:2143 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2143 do_syscall_64+0xbd/0x5b0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_INET); lock(rtnl_mutex); lock(sk_lock-AF_INET); lock(rtnl_mutex); The lockdep complaint is because we hold mptcp socket lock when calling the sk_prot get/setsockopt handler, and those might need to acquire the rtnl mutex. Normally, order is: rtnl_lock(sk) -> lock_sock Whereas for mptcp the order is lock_sock(mptcp_sk) rtnl_lock -> lock_sock(subflow_sk) We can avoid this by releasing the mptcp socket lock early, but, as Paolo points out, we need to get/put the subflow socket refcount before doing so to avoid race with concurrent close(). Fixes: 717e79c867ca5 ("mptcp: Add setsockopt()/getsockopt() socket operations") Reported-by: Christoph Paasch Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit c9fd9c5f4b935516ba8be31f2e7590caf0bc2c6f Author: Florian Westphal Date: Wed Jan 29 15:54:43 2020 +0100 mptcp: defer freeing of cached ext until last moment access to msk->cached_ext is only legal if the msk is locked or all concurrent accesses are impossible. Furthermore, once we start to tear down, we must make sure nothing else can step in and allocate a new cached ext. So place this code in the destroy callback where it belongs. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit d3e42bb0a329fadff98fcb927714d0a486840e3b Author: Martin KaFai Lau Date: Mon Jan 27 09:51:45 2020 -0800 bpf: Reuse log from btf_prase_vmlinux() in btf_struct_ops_init() Instead of using a locally defined "struct bpf_verifier_log log = {}", btf_struct_ops_init() should reuse the "log" from its calling function "btf_parse_vmlinux()". It should also resolve the frame-size too large compiler warning in some ARCH. Fixes: 27ae7997a661 ("bpf: Introduce BPF_PROG_TYPE_STRUCT_OPS") Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200127175145.1154438-1-kafai@fb.com commit 61ffb9d27860769c5d5596f6e4cca3cded2755e0 Author: Yash Shah Date: Tue Dec 10 16:41:14 2019 +0530 riscv: dts: Add DT support for SiFive FU540 GPIO driver Add the gpio DT node in SiFive FU540 soc-specific DT file. Enable the gpio node in HiFive Unleashed board-specific DT file. Signed-off-by: Yash Shah Signed-off-by: Palmer Dabbelt commit 5c3469cb899abe998299aafb8f16f325d62d2d68 Author: Masami Hiramatsu Date: Wed Jan 29 18:36:44 2020 +0900 tracing/boot: Move external function declarations to kernel/trace/trace.h Move external function declarations into kernel/trace/trace.h from trace_boot.c for tracing subsystem internal use. Link: http://lkml.kernel.org/r/158029060405.12381.11944554430359702545.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 76a598ec8c4fde58aab79b9f7c40c33d54eca67b Author: Masami Hiramatsu Date: Wed Jan 29 18:36:35 2020 +0900 tracing/boot: Include required headers and sort it alphabetically Include some required (but currently indirectly included) headers and sort it alphabetically. Link: http://lkml.kernel.org/r/158029059514.12381.6597832266860248781.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 8557bbe5156e5fba022d5a5220004b1e016227ee Author: SeongJae Park Date: Mon Jan 27 09:19:57 2020 +0100 xen/blkback: Consistently insert one empty line between functions The number of empty lines between functions in the xenbus.c is inconsistent. This trivial style cleanup commit fixes the file to consistently place only one empty line. Acked-by: Roger Pau Monné Signed-off-by: SeongJae Park Signed-off-by: Boris Ostrovsky commit 823f20914693673e5e057ff8eac1acfd8954cf85 Author: SeongJae Park Date: Mon Jan 27 09:18:11 2020 +0100 xen/blkback: Remove unnecessary static variable name prefixes A few of static variables in blkback have 'xen_blkif_' prefix, though it is unnecessary for static variables. This commit removes such prefixes. Reviewed-by: Roger Pau Monné Signed-off-by: SeongJae Park Signed-off-by: Boris Ostrovsky commit cb9369bdbb84440e9a8fded7eb2d0f94014f9a8f Author: SeongJae Park Date: Mon Jan 27 09:18:10 2020 +0100 xen/blkback: Squeeze page pools if a memory pressure is detected Each `blkif` has a free pages pool for the grant mapping. The size of the pool starts from zero and is increased on demand while processing the I/O requests. If current I/O requests handling is finished or 100 milliseconds has passed since last I/O requests handling, it checks and shrinks the pool to not exceed the size limit, `max_buffer_pages`. Therefore, host administrators can cause memory pressure in blkback by attaching a large number of block devices and inducing I/O. Such problematic situations can be avoided by limiting the maximum number of devices that can be attached, but finding the optimal limit is not so easy. Improper set of the limit can results in memory pressure or a resource underutilization. This commit avoids such problematic situations by squeezing the pools (returns every free page in the pool to the system) for a while (users can set this duration via a module parameter) if memory pressure is detected. Discussions =========== The `blkback`'s original shrinking mechanism returns only pages in the pool which are not currently be used by `blkback` to the system. In other words, the pages that are not mapped with granted pages. Because this commit is changing only the shrink limit but still uses the same freeing mechanism it does not touch pages which are currently mapping grants. Once memory pressure is detected, this commit keeps the squeezing limit for a user-specified time duration. The duration should be neither too long nor too short. If it is too long, the squeezing incurring overhead can reduce the I/O performance. If it is too short, `blkback` will not free enough pages to reduce the memory pressure. This commit sets the value as `10 milliseconds` by default because it is a short time in terms of I/O while it is a long time in terms of memory operations. Also, as the original shrinking mechanism works for at least every 100 milliseconds, this could be a somewhat reasonable choice. I also tested other durations (refer to the below section for more details) and confirmed that 10 milliseconds is the one that works best with the test. That said, the proper duration depends on actual configurations and workloads. That's why this commit allows users to set the duration as a module parameter. Memory Pressure Test ==================== To show how this commit fixes the memory pressure situation well, I configured a test environment on a xen-running virtualization system. On the `blkfront` running guest instances, I attach a large number of network-backed volume devices and induce I/O to those. Meanwhile, I measure the number of pages that swapped in (pswpin) and out (pswpout) on the `blkback` running guest. The test ran twice, once for the `blkback` before this commit and once for that after this commit. As shown below, this commit has dramatically reduced the memory pressure: pswpin pswpout before 76,672 185,799 after 867 3,967 Optimal Aggressive Shrinking Duration ------------------------------------- To find a best squeezing duration, I repeated the test with three different durations (1ms, 10ms, and 100ms). The results are as below: duration pswpin pswpout 1 707 5,095 10 867 3,967 100 362 3,348 As expected, the memory pressure decreases as the duration increases, but the reduction become slow from the `10ms`. Based on this results, I chose the default duration as 10ms. Performance Overhead Test ========================= This commit could incur I/O performance degradation under severe memory pressure because the squeezing will require more page allocations per I/O. To show the overhead, I artificially made a worst-case squeezing situation and measured the I/O performance of a `blkfront` running guest. For the artificial squeezing, I set the `blkback.max_buffer_pages` using the `/sys/module/xen_blkback/parameters/max_buffer_pages` file. In this test, I set the value to `1024` and `0`. The `1024` is the default value. Setting the value as `0` is same to a situation doing the squeezing always (worst-case). If the underlying block device is slow enough, the squeezing overhead could be hidden. For the reason, I use a fast block device, namely the rbd[1]: # xl block-attach guest phy:/dev/ram0 xvdb w For the I/O performance measurement, I run a simple `dd` command 5 times directly to the device as below and collect the 'MB/s' results. $ for i in {1..5}; do dd if=/dev/zero of=/dev/xvdb \ bs=4k count=$((256*512)); sync; done The results are as below. 'max_pgs' represents the value of the `blkback.max_buffer_pages` parameter. max_pgs Min Max Median Avg Stddev 0 417 423 420 419.4 2.5099801 1024 414 425 416 417.8 4.4384682 No difference proven at 95.0% confidence In short, even worst case squeezing on ramdisk based fast block device makes no visible performance degradation. Please note that this is just a very simple and minimal test. On systems using super-fast block devices and a special I/O workload, the results might be different. If you have any doubt, test on your machine with your workload to find the optimal squeezing duration for you. [1] https://www.kernel.org/doc/html/latest/admin-guide/blockdev/ramdisk.html Reviewed-by: Roger Pau Monné Signed-off-by: SeongJae Park Signed-off-by: Boris Ostrovsky commit 060eabe8fbe726aca341b518366da4d79e338100 Author: SeongJae Park Date: Mon Jan 27 09:18:09 2020 +0100 xenbus/backend: Protect xenbus callback with lock A driver's 'reclaim_memory' callback can race with 'probe' or 'remove' because it will be called whenever memory pressure is detected. To avoid such race, this commit embeds a spinlock in each 'xenbus_device' and make 'xenbus' to hold the lock while the corresponded callbacks are running. Reviewed-by: Juergen Gross Signed-off-by: SeongJae Park Signed-off-by: Boris Ostrovsky commit 8a105678fb3ec4763352db84745968bf2cb4aa65 Author: SeongJae Park Date: Mon Jan 27 09:18:08 2020 +0100 xenbus/backend: Add memory pressure handler callback Granting pages consumes backend system memory. In systems configured with insufficient spare memory for those pages, it can cause a memory pressure situation. However, finding the optimal amount of the spare memory is challenging for large systems having dynamic resource utilization patterns. Also, such a static configuration might lack flexibility. To mitigate such problems, this commit adds a memory reclaim callback to 'xenbus_driver'. If a memory pressure is detected, 'xenbus' requests every backend driver to volunarily release its memory. Note that it would be able to improve the callback facility for more sophisticated handlings of general pressures. For example, it would be possible to monitor the memory consumption of each device and issue the release requests to only devices which causing the pressure. Also, the callback could be extended to handle not only memory, but general resources. Nevertheless, this version of the implementation defers such sophisticated goals as a future work. Reviewed-by: Juergen Gross Reviewed-by: Roger Pau Monné Signed-off-by: SeongJae Park Signed-off-by: Boris Ostrovsky commit 44efc78d0e464ce70b45b165c005f8bedc17952e Author: Lorenzo Bianconi Date: Wed Jan 29 12:50:53 2020 +0100 net: mvneta: fix XDP support if sw bm is used as fallback In order to fix XDP support if sw buffer management is used as fallback for hw bm devices, define MVNETA_SKB_HEADROOM as maximum between XDP_PACKET_HEADROOM and NET_SKB_PAD and let the hw aligns the IP header to 4-byte boundary. Fix rx_offset_correction initialization if mvneta_bm_port_init fails in mvneta_resume routine Fixes: 0db51da7a8e9 ("net: mvneta: add basic XDP support") Tested-by: Sven Auhagen Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 656b42deddea57e55a570671db9403af0ed3c439 Author: Randy Dunlap Date: Tue Jan 28 18:25:14 2020 -0800 irqchip: Some Kconfig cleanup for C-SKY Fixes to Kconfig help text: - spell out "hardware" - fix verb usage Signed-off-by: Randy Dunlap Signed-off-by: Marc Zyngier Acked-by: Guo Ren Link: https://lore.kernel.org/r/d44baeee-cceb-7c02-7249-e6b4817f0847@infradead.org commit 979923871f69a4dc926658f9f9a1a4c1bde57552 Author: Thomas Gleixner Date: Thu Jan 23 12:54:53 2020 +0100 x86/timer: Don't skip PIT setup when APIC is disabled or in legacy mode Tony reported a boot regression caused by the recent workaround for systems which have a disabled (clock gate off) PIT. On his machine the kernel fails to initialize the PIT because apic_needs_pit() does not take into account whether the local APIC interrupt delivery mode will actually allow to setup and use the local APIC timer. This should be easy to reproduce with acpi=off on the command line which also disables HPET. Due to the way the PIT/HPET and APIC setup ordering works (APIC setup can require working PIT/HPET) the information is not available at the point where apic_needs_pit() makes this decision. To address this, split out the interrupt mode selection from apic_intr_mode_init(), invoke the selection before making the decision whether PIT is required or not, and add the missing checks into apic_needs_pit(). Fixes: c8c4076723da ("x86/timer: Skip PIT initialization on modern chipsets") Reported-by: Anthony Buckley Tested-by: Anthony Buckley Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Cc: Daniel Drake Link: https://bugzilla.kernel.org/show_bug.cgi?id=206125 Link: https://lore.kernel.org/r/87sgk6tmk2.fsf@nanos.tec.linutronix.de commit 6ac7e4d7ad70640310feedc2e5f1cb712685cb05 Author: Srinivas Kandagatla Date: Thu Dec 19 10:31:44 2019 +0000 mfd: wcd934x: Add support to wcd9340/wcd9341 codec Qualcomm WCD9340/WCD9341 Codec is a standalone Hi-Fi audio codec IC. This codec has integrated SoundWire controller, pin controller and interrupt controller. Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Signed-off-by: Lee Jones commit 793da4bfba7b8a785d38662f57fbcb2252b6f904 Author: Joe Perches Date: Tue Jan 28 11:12:03 2020 -0800 sch_choke: Use kvcalloc Convert the use of kvmalloc_array with __GFP_ZERO to the equivalent kvcalloc. Signed-off-by: Joe Perches Signed-off-by: David S. Miller commit 58b278f568f0509497e2df7310bfd719156a60d1 Author: Vaibhav Jain Date: Wed Aug 28 13:57:29 2019 +0530 powerpc: Provide initial documentation for PAPR hcalls This doc patch provides an initial description of the hcall op-codes that are used by Linux kernel running as a guest (LPAR) on top of PowerVM or any other sPAPR compliant hyper-visor (e.g qemu). Apart from documenting the hcalls the doc-patch also provides a rudimentary overview of how hcall ABI, how they are issued with the Linux kernel and how information/control flows between the guest and hypervisor. Signed-off-by: Vaibhav Jain Reviewed-by: Laurent Dufour Acked-by: Nicholas Piggin [mpe: Add SPDX tag, add it to index.rst] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190828082729.16695-1-vaibhav@linux.ibm.com commit f6f7d8cf55348751cc8a5f40c8f9835ee1752df4 Author: David S. Miller Date: Wed Jan 29 10:39:23 2020 +0100 mptcp: Fix build with PROC_FS disabled. net/mptcp/subflow.c: In function ‘mptcp_subflow_create_socket’: net/mptcp/subflow.c:624:25: error: ‘struct netns_core’ has no member named ‘sock_inuse’ Reported-by: Randy Dunlap Signed-off-by: David S. Miller commit 74759e1693311a8d1441de836c4080c192374238 Author: Randy Dunlap Date: Tue Jan 28 20:45:54 2020 -0800 MAINTAINERS: mptcp@ mailing list is moderated Note that mptcp@lists.01.org is moderated, like we note for other mailing lists. Signed-off-by: Randy Dunlap Cc: Mat Martineau Cc: Matthieu Baerts Cc: netdev@vger.kernel.org Cc: mptcp@lists.01.org Signed-off-by: David S. Miller commit c3463aed05abf06bd5ebaac12f2c015db298b98f Author: Ben Skeggs Date: Wed Jan 29 11:29:05 2020 +1000 drm/nouveau/fb/gp102-: allow module to load even when scrubber binary is missing Without relaxing this requirement, TU10x boards will fail to load without an updated linux-firmware, and TU11x will completely fail to load because FW isn't available yet. Signed-off-by: Ben Skeggs commit 1c338ed5e52b62737a9d45f37f085bdbb367821b Author: Ben Skeggs Date: Wed Jan 29 11:20:34 2020 +1000 drm/nouveau/acr: return error when registering LSF if ACR not supported This fixes an oops on TU11x GPUs where SEC2 attempts to register its falcon, and triggers a NULL-pointer deref because ACR isn't yet supported. Signed-off-by: Ben Skeggs commit 86e18ebd87072ed1ba6ecd86271e7a712115d579 Author: Ben Skeggs Date: Tue Jan 28 15:03:25 2020 +1000 drm/nouveau/disp/gv100-: not all channel types support reporting error codes Signed-off-by: Ben Skeggs commit 0e6176c6d286316e9431b4f695940cfac4ffe6c2 Author: Ben Skeggs Date: Tue Jan 28 14:39:26 2020 +1000 drm/nouveau/disp/nv50-: prevent oops when no channel method map provided The implementations for most channel types contains a map of methods to priv registers in order to provide debugging info when a disp exception has been raised. This info is missing from the implementation of PIO channels as they're rather simplistic already, however, if an exception is raised by one of them, we'd end up triggering a NULL-pointer deref. Not ideal... Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206299 Signed-off-by: Ben Skeggs commit 0352029ed83ff4d3f99e6bcf31bed5a97b07e3cf Author: Ben Skeggs Date: Thu Jan 23 15:52:12 2020 +1000 drm/nouveau: support synchronous pushbuf submission This is useful for debugging GPU hangs. Signed-off-by: Ben Skeggs commit ea13e5abf807ea912ce84eef6a1946b9a38c6508 Author: Ben Skeggs Date: Thu Jan 23 15:39:27 2020 +1000 drm/nouveau: signal pending fences when channel has been killed Signed-off-by: Ben Skeggs commit 0181f4bfbdcdfdf8474946bf14fd644727fb8363 Author: Ben Skeggs Date: Thu Jan 23 13:47:12 2020 +1000 drm/nouveau: reject attempts to submit to dead channels Signed-off-by: Ben Skeggs commit 4c9ee1bfca820b93f107957f5322845c862ea368 Author: Ben Skeggs Date: Thu Jan 23 13:55:19 2020 +1000 drm/nouveau: zero vma pointer even if we only unreference it rather than free I'm not sure this affects anything, but best be safe. Signed-off-by: Ben Skeggs commit 742db30c4ee6cd28142e83e154b5271f95a2c67a Author: Takashi Iwai Date: Mon Jan 13 15:17:21 2020 +0100 drm/nouveau: Add HD-audio component notifier support This patch adds the support for the notification of HD-audio hotplug via the already existing drm_audio_component framework. This allows us more reliable hotplug notification and ELD transfer without accessing HD-audio bus; it's more efficient, and more importantly, it works without waking up the runtime PM. The implementation is rather simplistic: nouveau driver provides the get_eld ops for HD-audio, and it notifies the audio hotplug via pin_eld_notify callback upon each nv50_audio_enable() and _disable() call. As the HD-audio pin assignment seems corresponding to the CRTC, the crtc->index number is passed directly as the zero-based port number. The bind and unbind callbacks handle the device-link so that it assures the PM call order. Link: https://lore.kernel.org/r/20190722143815.7339-3-tiwai@suse.de Reviewed-by: Lyude Paul Cc: Jaroslav Kysela Signed-off-by: Takashi Iwai Signed-off-by: Ben Skeggs commit fd24a8624eb29d3b6b7df68096ce0321b19b03c6 Author: David Michael Date: Sun Jan 26 17:31:58 2020 -0500 KVM: PPC: Book3S PR: Fix -Werror=return-type build failure Fixes: 3a167beac07c ("kvm: powerpc: Add kvmppc_ops callback") Signed-off-by: David Michael Signed-off-by: Paul Mackerras commit e032e3b55b6f487e48c163c5dca74086f147a169 Author: Bharata B Rao Date: Wed Jan 22 10:25:42 2020 +0530 KVM: PPC: Book3S HV: Release lock on page-out failure path When migrate_vma_setup() fails in kvmppc_svm_page_out(), release kvm->arch.uvmem_lock before returning. Fixes: ca9f4942670 ("KVM: PPC: Book3S HV: Support for running secure guests") Signed-off-by: Bharata B Rao Reviewed-by: Kamalesh Babulal Signed-off-by: Paul Mackerras commit 34f71a4a2de84dde52ccfcb96ce25240ea7981a8 Author: Tom Zanussi Date: Fri Jun 28 12:40:23 2019 -0500 tracing: Add new testcases for hist trigger parsing errors Add a testcase ensuring that the tracing error_log correctly displays hist trigger parsing errors. Link: http://lkml.kernel.org/r/62ec58d9aca661cde46ba678e32a938427945e9e.1561743018.git.zanussi@kernel.org Reviewed-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit d0a497066f92eee6e5750af6a0ca32866030931a Author: Tom Zanussi Date: Fri Jun 28 12:40:22 2019 -0500 tracing: Add 'hist:' to hist trigger error log error string The 'hist:' prefix gets stripped from the command text during command processing, but should be added back when displaying the command during error processing. Not only because it's what should be displayed but also because not having it means the test cases fail because the caret is miscalculated by the length of the prefix string. Link: http://lkml.kernel.org/r/449df721f560042e22382f67574bcc5b4d830d3d.1561743018.git.zanussi@kernel.org Reviewed-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 4de26c8c967d55551d3983771116a2c3c0a4f464 Author: Tom Zanussi Date: Fri Jun 28 12:40:21 2019 -0500 tracing: Add hist trigger error messages for sort specification Add error codes and messages for all the error paths leading to sort specification parsing errors. Link: http://lkml.kernel.org/r/237830dc05e583fbb53664d817a784297bf961be.1561743018.git.zanussi@kernel.org Reviewed-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit b527b638fd63ba791dc90a0a6e9a3035b10df52b Author: Tom Zanussi Date: Fri Jun 28 12:40:20 2019 -0500 tracing: Simplify assignment parsing for hist triggers In the process of adding better error messages for sorting, I realized that strsep was being used incorrectly and some of the error paths I was expecting to be hit weren't and just fell through to the common invalid key error case. It also became obvious that for keyword assignments, it wasn't necessary to save the full assignment and reparse it later, and having a common empty-assignment check would also make more sense in terms of error processing. Change the code to fix these problems and simplify it for new error message changes in a subsequent patch. Link: http://lkml.kernel.org/r/1c3ef0b6655deaf345f6faee2584a0298ac2d743.1561743018.git.zanussi@kernel.org Fixes: e62347d24534 ("tracing: Add hist trigger support for user-defined sorting ('sort=' param)") Fixes: 7ef224d1d0e3 ("tracing: Add 'hist' event trigger command") Fixes: a4072fe85ba3 ("tracing: Add a clock attribute for hist triggers") Reported-by: Masami Hiramatsu Reviewed-by: Masami Hiramatsu Signed-off-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit d0ce47cb993ec88d293bac7b51ba2d97ea99594c Author: Mauro Carvalho Chehab Date: Tue Jun 18 15:51:17 2019 -0300 docs: tracing: Fix a broken label Sphinx warnings about his: Documentation/trace/kprobetrace.rst:68: WARNING: undefined label: user_mem_access (if the link has no caption the label must precede a section header) The problem is quite simple: Sphinx wants a blank line after references. Link: http://lkml.kernel.org/r/a83ea390bc28784518fce772b4c961ea1c976f14.1560883872.git.mchehab+samsung@kernel.org Acked-by: Masami Hiramatsu Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Steven Rostedt (VMware) commit b3a6082223369203d7e7db7e81253ac761377644 Merge: 73a0bff2058f 10c2d111c906 Author: Linus Torvalds Date: Tue Jan 28 18:55:17 2020 -0800 Merge branch 'for-v5.6' of git://git.kernel.org:/pub/scm/linux/kernel/git/jmorris/linux-security Pull security subsystem update from James Morris: "Just one minor fix this time" * 'for-v5.6' of git://git.kernel.org:/pub/scm/linux/kernel/git/jmorris/linux-security: security: remove EARLY_LSM_COUNT which never used commit 73a0bff2058f2403c604371c325fec737ac2ac61 Merge: 2cf64d7cb20b d54e17b40666 Author: Linus Torvalds Date: Tue Jan 28 18:52:09 2020 -0800 Merge branch 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull IMA updates from Mimi Zohar: "Two new features - measuring certificates and querying IMA for a file hash - and three bug fixes: - Measuring certificates is like the rest of IMA, based on policy, but requires loading a custom policy. Certificates loaded onto a keyring, for example during early boot, before a custom policy has been loaded, are queued and only processed after loading the custom policy. - IMA calculates and caches files hashes. Other kernel subsystems, and possibly kernel modules, are interested in accessing these cached file hashes. The bug fixes prevent classifying a file short read (e.g. shutdown) as an invalid file signature, add a missing blank when displaying the securityfs policy rules containing LSM labels, and, lastly, fix the handling of the IMA policy information for unknown LSM labels" * 'next-integrity' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: IMA: Defined delayed workqueue to free the queued keys IMA: Call workqueue functions to measure queued keys IMA: Define workqueue for early boot key measurements IMA: pre-allocate buffer to hold keyrings string ima: ima/lsm policy rule loading logic bug fixes ima: add the ability to query the cached hash of a given file ima: Add a space after printing LSM rules for readability IMA: fix measuring asymmetric keys Kconfig IMA: Read keyrings= option from the IMA policy IMA: Add support to limit measuring keys KEYS: Call the IMA hook to measure keys IMA: Define an IMA hook to measure keys IMA: Add KEY_CHECK func to measure keys IMA: Check IMA policy flag ima: avoid appraise error for hash calc interrupt commit 2cf64d7cb20b04cf25e4ebffc37833298f1d4bde Merge: 740eaf7d4dd2 a8772fad0172 Author: Linus Torvalds Date: Tue Jan 28 18:49:23 2020 -0800 Merge tag 'tomoyo-pr-20200128' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1 Pull tomoyo update from Tetsuo Handa: "One 'int' -> 'atomic_t' conversion patch to suppress KCSAN's warning" * tag 'tomoyo-pr-20200128' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1: tomoyo: Use atomic_t for statistics counter commit 740eaf7d4dd255789987a543b0203ca239b37087 Merge: fad7bdc9b054 17248ea03674 Author: Linus Torvalds Date: Tue Jan 28 18:43:08 2020 -0800 Merge tag 's390-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Vasily Gorbik: - Add clang 10 build support. - Fix BUG() implementation to contain precise bug address, which is relevant for kprobes. - Make ftraced function appear in a stacktrace. - Minor perf improvements and refactoring. - Possible deadlock and recovery fixes in pci code. * tag 's390-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: fix __EMIT_BUG() macro s390/ftrace: generate traced function stack frame s390: adjust -mpacked-stack support check for clang 10 s390/jump_label: use "i" constraint for clang s390/cpum_sf: Use DIV_ROUND_UP s390/cpum_sf: Use kzalloc and minor changes s390/cpum_sf: Convert debug trace to common layout s390/pci: Fix possible deadlock in recover_store() s390/pci: Recover handle in clp_set_pci_fn() commit fad7bdc9b054a3dc2f5e77a8061c07aead6f5a5e Merge: a78416d97425 d65197ad5249 Author: Linus Torvalds Date: Tue Jan 28 18:29:25 2020 -0800 Merge tag 'for-linus-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Anton Ivanov: "I am sending this on behalf of Richard who is traveling. This contains the following changes for UML: - Fix for time travel mode - Disable CONFIG_CONSTRUCTORS again - A new command line option to have an non-raw serial line - Preparations to remove obsolete UML network drivers" * tag 'for-linus-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: Fix time-travel=inf-cpu with xor/raid6 Revert "um: Enable CONFIG_CONSTRUCTORS" um: Mark non-vector net transports as obsolete um: Add an option to make serial driver non-raw commit a78416d97425551b6790dc56626ac5c87415f3fc Merge: abb22e44cff3 20279420ae3a Author: Linus Torvalds Date: Tue Jan 28 18:26:09 2020 -0800 Merge tag 'trace-v5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Kprobe events added 'ustring' to distinguish reading strings from kernel space or user space. But the creating of the event format file only checks for 'string' to display string formats. 'ustring' must also be handled" * tag 'trace-v5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing/kprobes: Have uname use __get_str() in print_fmt commit 75c6a03904e0dd414a4d99a3072075cb5117e5bc Author: Jens Axboe Date: Tue Jan 28 10:15:23 2020 -0700 io_uring: support using a registered personality for commands For personalities previously registered via IORING_REGISTER_PERSONALITY, allow any command to select them. This is done through setting sqe->personality to the id returned from registration, and then flagging sqe->flags with IOSQE_PERSONALITY. Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 071698e13ac6ba786dfa22349a7b62deb5a9464d Author: Jens Axboe Date: Tue Jan 28 10:04:42 2020 -0700 io_uring: allow registering credentials If an application wants to use a ring with different kinds of credentials, it can register them upfront. We don't lookup credentials, the credentials of the task calling IORING_REGISTER_PERSONALITY is used. An 'id' is returned for the application to use in subsequent personality support. Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 24369c2e3bb06d8c4e71fd6ceaf4f8a01ae79b7c Author: Pavel Begunkov Date: Tue Jan 28 03:15:48 2020 +0300 io_uring: add io-wq workqueue sharing If IORING_SETUP_ATTACH_WQ is set, it expects wq_fd in io_uring_params to be a valid io_uring fd io-wq of which will be shared with the newly created io_uring instance. If the flag is set but it can't share io-wq, it fails. This allows creation of "sibling" io_urings, where we prefer to keep the SQ/CQ private, but want to share the async backend to minimize the amount of overhead associated with having multiple rings that belong to the same backend. Reported-by: Jens Axboe Reported-by: Daurnimator Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit eba6f5a330cf042bb0001f0b5e8cbf21be1b25d6 Author: Pavel Begunkov Date: Tue Jan 28 03:15:47 2020 +0300 io-wq: allow grabbing existing io-wq Export a helper to attach to an existing io-wq, rather than setting up a new one. This is doable now that we have reference counted io_wq's. Reported-by: Jens Axboe Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit cccf0ee834559ae0b327b40290e14f6a2a017177 Author: Jens Axboe Date: Mon Jan 27 16:34:48 2020 -0700 io_uring/io-wq: don't use static creds/mm assignments We currently setup the io_wq with a static set of mm and creds. Even for a single-use io-wq per io_uring, this is suboptimal as we have may have multiple enters of the ring. For sharing the io-wq backend, it doesn't work at all. Switch to passing in the creds and mm when the work item is setup. This means that async work is no longer deferred to the io_uring mm and creds, it is done with the current mm and creds. Flag this behavior with IORING_FEAT_CUR_PERSONALITY, so applications know they can rely on the current personality (mm and creds) being the same for direct issue and async issue. Reviewed-by: Stefan Metzmacher Signed-off-by: Jens Axboe commit abb22e44cff3f11d9e087bdd46c04bb32ff57678 Merge: fb95aae6e67c 2f23e319b133 Author: Linus Torvalds Date: Tue Jan 28 16:31:08 2020 -0800 Merge tag 'thermal-v5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal updates from Daniel Lezcano: - Depromote debug print on the db8500 platform (Linus Walleij) - Fix compilation warning when compiling with make W=1 (Amit Kucheria) - Code cleanup and refactoring, regmap conversion and add hwmon support on Qoriq (Andrey Smirnov) - Add an idle injection cpu cooling device and its documentation, rename the cpu_cooling device to cpufreq_cooling device (Daniel Lezcano) - Convert unexported functions to static, add the __init annotation in the thermal-of code and remove the pointless wrapper functions (Daniel Lezcano) - Fix register offset for Armada XP and register reset bit initialization (Zak Hays) - Enable hwmon on the rockchip (Stefan Schaeckeler) - Add the thermal sensor for the H6/H5/H3/A64/A83T/R40 sun8i platform and their device tree bindings, followed by a fix for the ths number and the sparse warnings (Yangtao Li) - Code cleansup for the sun8i and hwmon support (Yangtao Li) - Silent some messages which are misleading given the changes made in the previous version on generic-adc (Martin Blumenstingl) - Rename exynos to Exynos (Krzysztof Kozlowski) - Add the bcm2711 thermal driver with the device tree bindings (Stefan Wahren) - Use usleep_range() instead of udelay() as the call is always done in a sleep-able context (Geert Uytterhoeven) - Do code cleanup and re-organization to set the scene for a new process for the brcmstb (Florian Fainelli) - Fix bindings check issues on brcm (Stefan Wahren) - Add Jasper Lake support on int340x (Nivedita Swaminathan) - Add Comet Lake support on intel pch (Gayatri Kammela) - Fix unmatched pci_release_region() on x86 (Chuhong Yuan) - Remove temperature boundaries for rcar and rcar3 (Niklas Söderlund) - Fix return value to -ENODEV when thermal_zone_of_sensor_register() is called with the of-node is missing (Peter Mamonov) - Code cleanup, interrupt bouncing, and better support on stm32 (Pascal Paillet) * tag 'thermal-v5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (66 commits) thermal: stm32: Fix low threshold interrupt flood thermal: stm32: Improve temperature computing thermal: stm32: Handle multiple trip points thermal: stm32: Disable interrupts at probe thermal: stm32: Rework sensor mode management thermal: stm32: Fix icifr register name thermal: of: Make thermal_zone_of_sensor_register return -ENODEV if a sensor OF node is missing thermal: rcar_gen3_thermal: Remove temperature bound thermal: rcar_thermal: Remove temperature bound thermal: intel: intel_pch_thermal: Add Comet Lake (CML) platform support thermal: intel: Fix unmatched pci_release_region thermal: int340x: processor_thermal: Add Jasper Lake support dt-bindings: brcm,avs-ro-thermal: Fix binding check issues thermal: brcmstb_thermal: Register different ops per process thermal: brcmstb_thermal: Restructure interrupt registration thermal: brcmstb_thermal: Add 16nm process thermal parameters dt-bindings: thermal: Define BCM7216 thermal sensor compatible thermal: brcmstb_thermal: Prepare to support a different process thermal: brcmstb_thermal: Do not use DT coefficients thermal: rcar_thermal: Use usleep_range() instead of udelay() ... commit fb95aae6e67c4e319a24b3eea32032d4246a5335 Merge: bd2463ac7d7e 90fb04f890bc Author: Linus Torvalds Date: Tue Jan 28 16:26:57 2020 -0800 Merge tag 'sound-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "As the diffstat shows we've had again a lot of works done for this cycle: the majority of changes are the continued componentization and code refactoring in ASoC, the tree-wide PCM API updates and cleanups and SOF updates while a few ASoC driver updates are seen, too. Here we go, some highlights: Core: - Finally y2038 support landed to ALSA ABI; some ioctls have been extended and lots of tricks were applied - Applying the new managed PCM buffer API to all drivers; the API itself was already merged in 5.5 - The already deprecated dimension support in ALSA control API is dropped completely now - Verification of ALSA control elements to catch API misuses ASoC: - Further code refactorings and moving things to the component level - Lots of updates and improvements on SOF / Intel drivers; now including common HDMI driver and SoundWire support - New driver support for Ingenic JZ4770, Mediatek MT6660, Qualcomm WCD934x and WSA881x, and Realtek RT700, RT711, RT715, RT1011, RT1015 and RT1308 HD-audio: - Improved ring-buffer communications using waitqueue - Drop the superfluous buffer preallocation on x86 Others: - Many code cleanups, mostly constifications over the whole tree - USB-audio: quirks for MOTU, Corsair Virtuoso, Line6 Helix - FireWire: code refactoring for oxfw and dice drivers" * tag 'sound-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (638 commits) ALSA: usb-audio: add quirks for Line6 Helix devices fw>=2.82 ALSA: hda: Add Clevo W65_67SB the power_save blacklist ASoC: soc-core: remove null_snd_soc_ops ASoC: soc-pcm: add soc_rtd_trigger() ASoC: soc-pcm: add soc_rtd_hw_free() ASoC: soc-pcm: add soc_rtd_hw_params() ASoC: soc-pcm: add soc_rtd_prepare() ASoC: soc-pcm: add soc_rtd_shutdown() ASoC: soc-pcm: add soc_rtd_startup() ASoC: rt1015: add rt1015 amplifier driver ASoC: madera: Correct some kernel doc ASoC: topology: fix soc_tplg_fe_link_create() - link->dobj initialization order ASoC: Intel: skl_hda_dsp_common: Fix global-out-of-bounds bug ASoC: madera: Correct DMIC only input hook ups ALSA: cs46xx: fix spelling mistake "to" -> "too" ALSA: hda - Add docking station support for Lenovo Thinkpad T420s ASoC: Add MediaTek MT6660 Speaker Amp Driver ASoC: dt-bindings: rt5645: add suppliers ASoC: max98090: fix deadlock in max98090_dapm_put_enum_double() ASoC: dapm: add snd_soc_dapm_put_enum_double_locked ... commit bd2463ac7d7ec51d432f23bf0e893fb371a908cd Merge: a78208e24369 f76e4c167ea2 Author: Linus Torvalds Date: Tue Jan 28 16:02:33 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from David Miller: 1) Add WireGuard 2) Add HE and TWT support to ath11k driver, from John Crispin. 3) Add ESP in TCP encapsulation support, from Sabrina Dubroca. 4) Add variable window congestion control to TIPC, from Jon Maloy. 5) Add BCM84881 PHY driver, from Russell King. 6) Start adding netlink support for ethtool operations, from Michal Kubecek. 7) Add XDP drop and TX action support to ena driver, from Sameeh Jubran. 8) Add new ipv4 route notifications so that mlxsw driver does not have to handle identical routes itself. From Ido Schimmel. 9) Add BPF dynamic program extensions, from Alexei Starovoitov. 10) Support RX and TX timestamping in igc, from Vinicius Costa Gomes. 11) Add support for macsec HW offloading, from Antoine Tenart. 12) Add initial support for MPTCP protocol, from Christoph Paasch, Matthieu Baerts, Florian Westphal, Peter Krystad, and many others. 13) Add Octeontx2 PF support, from Sunil Goutham, Geetha sowjanya, Linu Cherian, and others. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (1469 commits) net: phy: add default ARCH_BCM_IPROC for MDIO_BCM_IPROC udp: segment looped gso packets correctly netem: change mailing list qed: FW 8.42.2.0 debug features qed: rt init valid initialization changed qed: Debug feature: ilt and mdump qed: FW 8.42.2.0 Add fw overlay feature qed: FW 8.42.2.0 HSI changes qed: FW 8.42.2.0 iscsi/fcoe changes qed: Add abstraction for different hsi values per chip qed: FW 8.42.2.0 Additional ll2 type qed: Use dmae to write to widebus registers in fw_funcs qed: FW 8.42.2.0 Parser offsets modified qed: FW 8.42.2.0 Queue Manager changes qed: FW 8.42.2.0 Expose new registers and change windows qed: FW 8.42.2.0 Internal ram offsets modifications MAINTAINERS: Add entry for Marvell OcteonTX2 Physical Function driver Documentation: net: octeontx2: Add RVU HW and drivers overview octeontx2-pf: ethtool RSS config support octeontx2-pf: Add basic ethtool support ... commit a78208e2436963d0b2c7d186277d6e1a9755029a Merge: 68353984d63d 0bc81767c5bd Author: Linus Torvalds Date: Tue Jan 28 15:38:56 2020 -0800 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto updates from Herbert Xu: "API: - Removed CRYPTO_TFM_RES flags - Extended spawn grabbing to all algorithm types - Moved hash descsize verification into API code Algorithms: - Fixed recursive pcrypt dead-lock - Added new 32 and 64-bit generic versions of poly1305 - Added cryptogams implementation of x86/poly1305 Drivers: - Added support for i.MX8M Mini in caam - Added support for i.MX8M Nano in caam - Added support for i.MX8M Plus in caam - Added support for A33 variant of SS in sun4i-ss - Added TEE support for Raven Ridge in ccp - Added in-kernel API to submit TEE commands in ccp - Added AMD-TEE driver - Added support for BCM2711 in iproc-rng200 - Added support for AES256-GCM based ciphers for chtls - Added aead support on SEC2 in hisilicon" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (244 commits) crypto: arm/chacha - fix build failured when kernel mode NEON is disabled crypto: caam - add support for i.MX8M Plus crypto: x86/poly1305 - emit does base conversion itself crypto: hisilicon - fix spelling mistake "disgest" -> "digest" crypto: chacha20poly1305 - add back missing test vectors and test chunking crypto: x86/poly1305 - fix .gitignore typo tee: fix memory allocation failure checks on drv_data and amdtee crypto: ccree - erase unneeded inline funcs crypto: ccree - make cc_pm_put_suspend() void crypto: ccree - split overloaded usage of irq field crypto: ccree - fix PM race condition crypto: ccree - fix FDE descriptor sequence crypto: ccree - cc_do_send_request() is void func crypto: ccree - fix pm wrongful error reporting crypto: ccree - turn errors to debug msgs crypto: ccree - fix AEAD decrypt auth fail crypto: ccree - fix typo in comment crypto: ccree - fix typos in error msgs crypto: atmel-{aes,sha,tdes} - Retire crypto_platform_data crypto: x86/sha - Eliminate casts on asm implementations ... commit 68353984d63d8d7ea728819dbdb7aecc5f32d360 Merge: c8994374d90b f1f27ad74557 Author: Linus Torvalds Date: Tue Jan 28 15:34:03 2020 -0800 Merge tag '5.6-smb3-fixes-and-dfs-and-readdir-improvements' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs updates from Steve French: "Various SMB3/CIFS fixes including four for stable. - Improvement to fallocate (enables 3 additional xfstests) - Fix for file creation when mounting with modefromsid - Add ability to backup/restore dos attributes and creation time - DFS failover and reconnect fixes - performance optimization for readir Note that due to the upcoming SMB3 Test Event (at SNIA SDC next week) there will likely be more changesets near the end of the merge window (since we will be testing heavily next week, I held off on some patches and I expect some additional multichannel patches as well as patches to enable some additional xfstests)" * tag '5.6-smb3-fixes-and-dfs-and-readdir-improvements' of git://git.samba.org/sfrench/cifs-2.6: (24 commits) CIFS: Fix task struct use-after-free on reconnect cifs: use PTR_ERR_OR_ZERO() to simplify code cifs: add support for fallocate mode 0 for non-sparse files cifs: fix NULL dereference in match_prepath smb3: fix default permissions on new files when mounting with modefromsid CIFS: Add support for setting owner info, dos attributes, and create time cifs: remove set but not used variable 'server' cifs: Fix memory allocation in __smb2_handle_cancelled_cmd() cifs: Fix mount options set in automount cifs: fix unitialized variable poential problem with network I/O cache lock patch cifs: Fix return value in __update_cache_entry cifs: Avoid doing network I/O while holding cache lock cifs: Fix potential deadlock when updating vol in cifs_reconnect() cifs: Merge is_path_valid() into get_normalized_path() cifs: Introduce helpers for finding TCP connection cifs: Get rid of kstrdup_const()'d paths cifs: Clean up DFS referral cache cifs: Don't use iov_iter::type directly cifs: set correct max-buffer-size for smb2_ioctl_init() cifs: use compounding for open and first query-dir for readdir() ... commit c8994374d90b5823b3b29a5e5d8648ac418b57b4 Merge: f0d874414329 da3a3da4e6c6 Author: Linus Torvalds Date: Tue Jan 28 15:31:03 2020 -0800 Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fsverity updates from Eric Biggers: - Optimize fs-verity sequential read performance by implementing readahead of Merkle tree pages. This allows the Merkle tree to be read in larger chunks. - Optimize FS_IOC_ENABLE_VERITY performance in the uncached case by implementing readahead of data pages. - Allocate the hash requests from a mempool in order to eliminate the possibility of allocation failures during I/O. * tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fs-verity: use u64_to_user_ptr() fs-verity: use mempool for hash requests fs-verity: implement readahead of Merkle tree pages fs-verity: implement readahead for FS_IOC_ENABLE_VERITY commit f0d874414329a86b67198cb0299d0dc9310592f1 Merge: b5f7ab6b1c4e edc440e3d27f Author: Linus Torvalds Date: Tue Jan 28 15:22:21 2020 -0800 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fscrypt updates from Eric Biggers: - Extend the FS_IOC_ADD_ENCRYPTION_KEY ioctl to allow the raw key to be provided via a keyring key. - Prepare for the new dirhash method (SipHash of plaintext name) that will be used by directories that are both encrypted and casefolded. - Switch to a new format for "no-key names" that prepares for the new dirhash method, and also fixes a longstanding bug where multiple filenames could map to the same no-key name. - Allow the crypto algorithms used by fscrypt to be built as loadable modules when the fscrypt-capable filesystems are. - Optimize fscrypt_zeroout_range(). - Various cleanups. * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: (26 commits) fscrypt: improve format of no-key names ubifs: allow both hash and disk name to be provided in no-key names ubifs: don't trigger assertion on invalid no-key filename fscrypt: clarify what is meant by a per-file key fscrypt: derive dirhash key for casefolded directories fscrypt: don't allow v1 policies with casefolding fscrypt: add "fscrypt_" prefix to fname_encrypt() fscrypt: don't print name of busy file when removing key ubifs: use IS_ENCRYPTED() instead of ubifs_crypt_is_encrypted() fscrypt: document gfp_flags for bounce page allocation fscrypt: optimize fscrypt_zeroout_range() fscrypt: remove redundant bi_status check fscrypt: Allow modular crypto algorithms fscrypt: include in UAPI header fscrypt: don't check for ENOKEY from fscrypt_get_encryption_info() fscrypt: remove fscrypt_is_direct_key_policy() fscrypt: move fscrypt_valid_enc_modes() to policy.c fscrypt: check for appropriate use of DIRECT_KEY flag earlier fscrypt: split up fscrypt_supported_policy() by policy version fscrypt: introduce fscrypt_needs_contents_encryption() ... commit b5f7ab6b1c4ed967fb76258f79251193cb1ad41d Merge: 81a046b18b33 831d2fa25ab8 Author: Linus Torvalds Date: Tue Jan 28 15:18:23 2020 -0800 Merge tag 'fs-dedupe-last-block-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull fs deduplication fix from David Sterba: "This is a fix for deduplication bug: the last block of two files is allowed to deduplicated. This got broken in 5.1 by lifting some generic checks to VFS layer. The affected filesystems are btrfs and xfs. The patches are marked for stable as the bug decreases deduplication effectivity" * tag 'fs-dedupe-last-block-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: Btrfs: make deduplication with range including the last block work fs: allow deduplication of eof block into the end of the destination file commit 81a046b18b331ed6192e6fd9ff6d12a1f18058cf Merge: 511fdb784422 4e19443da194 Author: Linus Torvalds Date: Tue Jan 28 14:53:31 2020 -0800 Merge tag 'for-5.6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "Features, highlights: - async discard - "mount -o discard=async" to enable it - freed extents are not discarded immediatelly, but grouped together and trimmed later, with IO rate limiting - the "sync" mode submits short extents that could have been ignored completely by the device, for SATA prior to 3.1 the requests are unqueued and have a big impact on performance - the actual discard IO requests have been moved out of transaction commit to a worker thread, improving commit latency - IO rate and request size can be tuned by sysfs files, for now enabled only with CONFIG_BTRFS_DEBUG as we might need to add/delete the files and don't have a stable-ish ABI for general use, defaults are conservative - export device state info in sysfs, eg. missing, writeable - no discard of extents known to be untouched on disk (eg. after reservation) - device stats reset is logged with process name and PID that called the ioctl Fixes: - fix missing hole after hole punching and fsync when using NO_HOLES - writeback: range cyclic mode could miss some dirty pages and lead to OOM - two more corner cases for metadata_uuid change after power loss during the change - fix infinite loop during fsync after mix of rename operations Core changes: - qgroup assign returns ENOTCONN when quotas not enabled, used to return EINVAL that was confusing - device closing does not need to allocate memory anymore - snapshot aware code got removed, disabled for years due to performance problems, reimplmentation will allow to select wheter defrag breaks or does not break COW on shared extents - tree-checker: - check leaf chunk item size, cross check against number of stripes - verify location keys for DIR_ITEM, DIR_INDEX and XATTR items - new self test for physical -> logical mapping code, used for super block range exclusion - assertion helpers/macros updated to avoid objtool "unreachable code" reports on older compilers or config option combinations" * tag 'for-5.6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (84 commits) btrfs: free block groups after free'ing fs trees btrfs: Fix split-brain handling when changing FSID to metadata uuid btrfs: Handle another split brain scenario with metadata uuid feature btrfs: Factor out metadata_uuid code from find_fsid. btrfs: Call find_fsid from find_fsid_inprogress Btrfs: fix infinite loop during fsync after rename operations btrfs: set trans->drity in btrfs_commit_transaction btrfs: drop log root for dropped roots btrfs: sysfs, add devid/dev_state kobject and device attributes btrfs: Refactor btrfs_rmap_block to improve readability btrfs: Add self-tests for btrfs_rmap_block btrfs: selftests: Add support for dummy devices btrfs: Move and unexport btrfs_rmap_block btrfs: separate definition of assertion failure handlers btrfs: device stats, log when stats are zeroed btrfs: fix improper setting of scanned for range cyclic write cache pages btrfs: safely advance counter when looking up bio csums btrfs: remove unused member btrfs_device::work btrfs: remove unnecessary wrapper get_alloc_profile btrfs: add correction to handle -1 edge case in async discard ... commit d8639f0d6c230d4c632cbf8ed1f3b9456f338ca0 Author: Andy Shevchenko Date: Tue Jan 28 17:42:00 2020 +0200 MAINTAINERS: Sort entries in database for X-POWERS AXP288 Run parse-maintainers.pl and choose X-POWERS AXP288 record. Fix it accordingly. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 4e384d715e0348a4806ce9222078c97fb669640c Author: Andy Shevchenko Date: Tue Jan 28 17:21:51 2020 +0200 MAINTAINERS: Sort entries in database for ACPICA Run parse-maintainers.pl and choose ACPICA record. Fix it accordingly. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 54d963968707e21aecd46d5244bc9ae61adac8a0 Author: Andy Shevchenko Date: Tue Jan 28 17:16:41 2020 +0200 MAINTAINERS: Sort entries in database for ACPI Run parse-maintainers.pl and choose ACPI records. Fix them accordingly. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 709bd70d070ee6d775c6e77e40e8444bd5fa123f Author: Doug Smythies Date: Mon Jan 27 19:59:57 2020 -0800 tools/power/x86/intel_pstate_tracer: change several graphs to autoscale y-axis Processors have exceeded some of the fixed y-axis scale maximum values. Change them to autoscale the y-axis. Signed-off-by: Doug Smythies Signed-off-by: Rafael J. Wysocki commit e749e09db30c38f1a275945814b0109e530a07b0 Author: Doug Smythies Date: Mon Jan 27 19:59:56 2020 -0800 tools/power/x86/intel_pstate_tracer: changes for python 3 compatibility Some syntax needs to be more rigorous for python 3. Backwards compatibility tested with python 2.7 Signed-off-by: Doug Smythies Signed-off-by: Rafael J. Wysocki commit a7aebdeb13b922590841b7982f75a337aacf43a1 Merge: 6d277aca488f 8c30fa7666ff Author: Rafael J. Wysocki Date: Tue Jan 28 23:38:45 2020 +0100 Merge tag 'linux-cpupower-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Pull cpupower utility updates for v5.6 from Shuah Khan: "This cpupower update for Linux 5.6-rc1 consists of a revert from Thomas Renninger and a manpage correction from Brahadambal Srinivasan." * tag 'linux-cpupower-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: Correction to manpage of cpupower cpupower: Revert library ABI changes from commit ae2917093fb60bdc1ed3e commit c4e71212a245017d2ab05f322f7722f0b87a55da Author: Arnd Bergmann Date: Tue Jan 28 14:01:52 2020 +0100 Revert "drm/etnaviv: reject timeouts with tv_nsec >= NSEC_PER_SEC" This reverts commit 245595e83fbedda9e107eb0b37cec0ad07733778. Guido Günther reported issues with this patch that broke existing user space. Let's revert it for now and fix it properly later on. Link: https://patchwork.kernel.org/patch/11291089/ https://lore.kernel.org/lkml/20200121114553.2667556-1-arnd@arndb.de/ Cc: Guido Günther Signed-off-by: Arnd Bergmann commit f45719240700398b63a165f6b7f3fbab04f0b052 Author: Alexandre Belloni Date: Tue Jan 28 21:42:00 2020 +0100 dt-bindings: rtc: at91rm9200: document clocks property The clocks property is mandatory, document it. Reported-by: Rob Herring Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200128204200.22201-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 9cd10205227cbe9bbd48fd6bf78dad88b45526b0 Author: Michael Walle Date: Fri Jan 3 00:11:01 2020 +0100 clk: fsl-sai: new driver With this driver it is possible to use the BCLK pin of the SAI module as a generic clock output. This is esp. useful if you want to drive a clock to an audio codec. Because the output only allows integer divider values the audio codec needs an integrated PLL. Signed-off-by: Michael Walle Link: https://lkml.kernel.org/r/20200102231101.11834-3-michael@walle.cc Signed-off-by: Stephen Boyd commit 8798e8fb08b72c60aa1a9e06af7f10425ef40efd Author: Michael Walle Date: Fri Jan 3 00:11:00 2020 +0100 dt-bindings: clock: document the fsl-sai driver Signed-off-by: Michael Walle Reviewed-by: Rob Herring Link: https://lkml.kernel.org/r/20200102231101.11834-2-michael@walle.cc Signed-off-by: Stephen Boyd commit 73ef657275c01928c30c8cec5878834d44af9685 Author: Michael Walle Date: Fri Jan 3 00:10:59 2020 +0100 clk: composite: add _register_composite_pdata() variants Add support for the new way of specifying the clock parents. Add the two new functions clk_hw_register_composite_pdata() clk_register_composite_pdata() to let the driver provide parent_data instead of the parent_names. Signed-off-by: Michael Walle Link: https://lkml.kernel.org/r/20200102231101.11834-1-michael@walle.cc Signed-off-by: Stephen Boyd commit 511fdb78442229ac11057b4a55c3f03c253c062f Merge: 4d6245ce8c8b 4fc265a9c9b2 Author: Linus Torvalds Date: Tue Jan 28 13:06:05 2020 -0800 Merge branch 'x86-mtrr-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 mtrr updates from Ingo Molnar: "Two changes: restrict /proc/mtrr to CAP_SYS_ADMIN, plus a cleanup" * 'x86-mtrr-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mtrr: Require CAP_SYS_ADMIN for all access x86/mtrr: Get rid of mtrr_seq_show() forward declaration commit 4d6245ce8c8b441e01a3a1c1e67a1963a84498dd Merge: c0275ae758f8 bbc55341b9c6 Author: Linus Torvalds Date: Tue Jan 28 13:04:38 2020 -0800 Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 FPU updates from Ingo Molnar: "Three changes: fix a race that can result in FPU corruption, plus two cleanups" * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fpu: Deactivate FPU state after failure during state load x86/fpu/xstate: Make xfeature_is_supervisor()/xfeature_is_user() return bool x86/fpu/xstate: Fix small issues commit c0275ae758f8ce72306da200b195d1e1d66d0a8d Merge: f6170f0afbe2 283bab980978 Author: Linus Torvalds Date: Tue Jan 28 12:46:42 2020 -0800 Merge branch 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpu-features updates from Ingo Molnar: "The biggest change in this cycle was a large series from Sean Christopherson to clean up the handling of VMX features. This both fixes bugs/inconsistencies and makes the code more coherent and future-proof. There are also two cleanups and a minor TSX syslog messages enhancement" * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) x86/cpu: Remove redundant cpu_detect_cache_sizes() call x86/cpu: Print "VMX disabled" error message iff KVM is enabled KVM: VMX: Allow KVM_INTEL when building for Centaur and/or Zhaoxin CPUs perf/x86: Provide stubs of KVM helpers for non-Intel CPUs KVM: VMX: Use VMX_FEATURE_* flags to define VMCS control bits KVM: VMX: Check for full VMX support when verifying CPU compatibility KVM: VMX: Use VMX feature flag to query BIOS enabling KVM: VMX: Drop initialization of IA32_FEAT_CTL MSR x86/cpufeatures: Add flag to track whether MSR IA32_FEAT_CTL is configured x86/cpu: Set synthetic VMX cpufeatures during init_ia32_feat_ctl() x86/cpu: Print VMX flags in /proc/cpuinfo using VMX_FEATURES_* x86/cpu: Detect VMX features on Intel, Centaur and Zhaoxin CPUs x86/vmx: Introduce VMX_FEATURES_* x86/cpu: Clear VMX feature flag if VMX is not fully enabled x86/zhaoxin: Use common IA32_FEAT_CTL MSR initialization x86/centaur: Use common IA32_FEAT_CTL MSR initialization x86/mce: WARN once if IA32_FEAT_CTL MSR is left unlocked x86/intel: Initialize IA32_FEAT_CTL MSR at boot tools/x86: Sync msr-index.h from kernel sources selftests, kvm: Replace manual MSR defs with common msr-index.h ... commit 77ce1a47ebca88bf1eb3018855fc1709c7a1ed86 Author: Mauro Carvalho Chehab Date: Tue Jan 28 07:41:01 2020 +0100 docs: filesystems: add overlayfs to index.rst While the document is there, it is currently missing at the index file. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/3b8e7783b1fcc71e4f94af5ea8e5fa264392f8c4.1580193653.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 1edca3c64e44df1665b0287fd536e79d74d884b6 Author: Mauro Carvalho Chehab Date: Tue Jan 28 07:41:00 2020 +0100 docs: usb: remove some broken references It seems that some files were removed from USB documentation. Update the links accordingly. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/00008303fde6b4e06d027d3b76ae7032614a7030.1580193653.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 2a4b03ffc69f2dedc6388e9a6438b5f4c133a40d Author: Vincent Guittot Date: Tue Jan 14 15:13:56 2020 +0100 sched/fair: Prevent unlimited runtime on throttled group When a running task is moved on a throttled task group and there is no other task enqueued on the CPU, the task can keep running using 100% CPU whatever the allocated bandwidth for the group and although its cfs rq is throttled. Furthermore, the group entity of the cfs_rq and its parents are not enqueued but only set as curr on their respective cfs_rqs. We have the following sequence: sched_move_task -dequeue_task: dequeue task and group_entities. -put_prev_task: put task and group entities. -sched_change_group: move task to new group. -enqueue_task: enqueue only task but not group entities because cfs_rq is throttled. -set_next_task : set task and group_entities as current sched_entity of their cfs_rq. Another impact is that the root cfs_rq runnable_load_avg at root rq stays null because the group_entities are not enqueued. This situation will stay the same until an "external" event triggers a reschedule. Let trigger it immediately instead. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Ben Segall Link: https://lkml.kernel.org/r/1579011236-31256-1-git-send-email-vincent.guittot@linaro.org commit e938b9c94164e4d981039f1cf6007d7453883e5a Author: Wanpeng Li Date: Mon Jan 13 08:50:27 2020 +0800 sched/nohz: Optimize get_nohz_timer_target() On a machine, CPU 0 is used for housekeeping, the other 39 CPUs in the same socket are in nohz_full mode. We can observe huge time burn in the loop for seaching nearest busy housekeeper cpu by ftrace. 2) | get_nohz_timer_target() { 2) 0.240 us | housekeeping_test_cpu(); 2) 0.458 us | housekeeping_test_cpu(); ... 2) 0.292 us | housekeeping_test_cpu(); 2) 0.240 us | housekeeping_test_cpu(); 2) 0.227 us | housekeeping_any_cpu(); 2) + 43.460 us | } This patch optimizes the searching logic by finding a nearest housekeeper CPU in the housekeeping cpumask, it can minimize the worst searching time from ~44us to < 10us in my testing. In addition, the last iterated busy housekeeper can become a random candidate while current CPU is a better fallback if it is a housekeeper. Signed-off-by: Wanpeng Li Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Frederic Weisbecker Link: https://lkml.kernel.org/r/1578876627-11938-1-git-send-email-wanpengli@tencent.com commit b562d140649966d4daedd0483a8fe59ad3bb465a Author: Qais Yousef Date: Tue Jan 14 21:09:47 2020 +0000 sched/uclamp: Reject negative values in cpu_uclamp_write() The check to ensure that the new written value into cpu.uclamp.{min,max} is within range, [0:100], wasn't working because of the signed comparison 7301 if (req.percent > UCLAMP_PERCENT_SCALE) { 7302 req.ret = -ERANGE; 7303 return req; 7304 } # echo -1 > cpu.uclamp.min # cat cpu.uclamp.min 42949671.96 Cast req.percent into u64 to force the comparison to be unsigned and work as intended in capacity_from_percent(). # echo -1 > cpu.uclamp.min sh: write error: Numerical result out of range Fixes: 2480c093130f ("sched/uclamp: Extend CPU's cgroup controller") Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20200114210947.14083-1-qais.yousef@arm.com commit b396f52326de20ec974471b7b19168867b365cbf Author: Mel Gorman Date: Tue Jan 14 10:13:20 2020 +0000 sched/fair: Allow a small load imbalance between low utilisation SD_NUMA domains The CPU load balancer balances between different domains to spread load and strives to have equal balance everywhere. Communicating tasks can migrate so they are topologically close to each other but these decisions are independent. On a lightly loaded NUMA machine, two communicating tasks pulled together at wakeup time can be pushed apart by the load balancer. In isolation, the load balancer decision is fine but it ignores the tasks data locality and the wakeup/LB paths continually conflict. NUMA balancing is also a factor but it also simply conflicts with the load balancer. This patch allows a fixed degree of imbalance of two tasks to exist between NUMA domains regardless of utilisation levels. In many cases, this prevents communicating tasks being pulled apart. It was evaluated whether the imbalance should be scaled to the domain size. However, no additional benefit was measured across a range of workloads and machines and scaling adds the risk that lower domains have to be rebalanced. While this could change again in the future, such a change should specify the use case and benefit. The most obvious impact is on netperf TCP_STREAM -- two simple communicating tasks with some softirq offload depending on the transmission rate. 2-socket Haswell machine 48 core, HT enabled netperf-tcp -- mmtests config config-network-netperf-unbound baseline lbnuma-v3 Hmean 64 568.73 ( 0.00%) 577.56 * 1.55%* Hmean 128 1089.98 ( 0.00%) 1128.06 * 3.49%* Hmean 256 2061.72 ( 0.00%) 2104.39 * 2.07%* Hmean 1024 7254.27 ( 0.00%) 7557.52 * 4.18%* Hmean 2048 11729.20 ( 0.00%) 13350.67 * 13.82%* Hmean 3312 15309.08 ( 0.00%) 18058.95 * 17.96%* Hmean 4096 17338.75 ( 0.00%) 20483.66 * 18.14%* Hmean 8192 25047.12 ( 0.00%) 27806.84 * 11.02%* Hmean 16384 27359.55 ( 0.00%) 33071.88 * 20.88%* Stddev 64 2.16 ( 0.00%) 2.02 ( 6.53%) Stddev 128 2.31 ( 0.00%) 2.19 ( 5.05%) Stddev 256 11.88 ( 0.00%) 3.22 ( 72.88%) Stddev 1024 23.68 ( 0.00%) 7.24 ( 69.43%) Stddev 2048 79.46 ( 0.00%) 71.49 ( 10.03%) Stddev 3312 26.71 ( 0.00%) 57.80 (-116.41%) Stddev 4096 185.57 ( 0.00%) 96.15 ( 48.19%) Stddev 8192 245.80 ( 0.00%) 100.73 ( 59.02%) Stddev 16384 207.31 ( 0.00%) 141.65 ( 31.67%) In this case, there was a sizable improvement to performance and a general reduction in variance. However, this is not univeral. For most machines, the impact was roughly a 3% performance gain. Ops NUMA base-page range updates 19796.00 292.00 Ops NUMA PTE updates 19796.00 292.00 Ops NUMA PMD updates 0.00 0.00 Ops NUMA hint faults 16113.00 143.00 Ops NUMA hint local faults % 8407.00 142.00 Ops NUMA hint local percent 52.18 99.30 Ops NUMA pages migrated 4244.00 1.00 Without the patch, only 52.18% of sampled accesses are local. In an earlier changelog, 100% of sampled accesses are local and indeed on most machines, this was still the case. In this specific case, the local sampled rates was 99.3% but note the "base-page range updates" and "PTE updates". The activity with the patch is negligible as were the number of faults. The small number of pages migrated were related to shared libraries. A 2-socket Broadwell showed better results on average but are not presented for brevity as the performance was similar except it showed 100% of the sampled NUMA hints were local. The patch holds up for a 4-socket Haswell, an AMD EPYC and AMD Epyc 2 machine. For dbench, the impact depends on the filesystem used and the number of clients. On XFS, there is little difference as the clients typically communicate with workqueues which have a separate class of scheduler problem at the moment. For ext4, performance is generally better, particularly for small numbers of clients as NUMA balancing activity is negligible with the patch applied. A more interesting example is the Facebook schbench which uses a number of messaging threads to communicate with worker threads. In this configuration, one messaging thread is used per NUMA node and the number of worker threads is varied. The 50, 75, 90, 95, 99, 99.5 and 99.9 percentiles for response latency is then reported. Lat 50.00th-qrtle-1 44.00 ( 0.00%) 37.00 ( 15.91%) Lat 75.00th-qrtle-1 53.00 ( 0.00%) 41.00 ( 22.64%) Lat 90.00th-qrtle-1 57.00 ( 0.00%) 42.00 ( 26.32%) Lat 95.00th-qrtle-1 63.00 ( 0.00%) 43.00 ( 31.75%) Lat 99.00th-qrtle-1 76.00 ( 0.00%) 51.00 ( 32.89%) Lat 99.50th-qrtle-1 89.00 ( 0.00%) 52.00 ( 41.57%) Lat 99.90th-qrtle-1 98.00 ( 0.00%) 55.00 ( 43.88%) Lat 50.00th-qrtle-2 42.00 ( 0.00%) 42.00 ( 0.00%) Lat 75.00th-qrtle-2 48.00 ( 0.00%) 47.00 ( 2.08%) Lat 90.00th-qrtle-2 53.00 ( 0.00%) 52.00 ( 1.89%) Lat 95.00th-qrtle-2 55.00 ( 0.00%) 53.00 ( 3.64%) Lat 99.00th-qrtle-2 62.00 ( 0.00%) 60.00 ( 3.23%) Lat 99.50th-qrtle-2 63.00 ( 0.00%) 63.00 ( 0.00%) Lat 99.90th-qrtle-2 68.00 ( 0.00%) 66.00 ( 2.94% For higher worker threads, the differences become negligible but it's interesting to note the difference in wakeup latency at low utilisation and mpstat confirms that activity was almost all on one node until the number of worker threads increase. Hackbench generally showed neutral results across a range of machines. This is different to earlier versions of the patch which allowed imbalances for higher degrees of utilisation. perf bench pipe showed negligible differences in overall performance as the differences are very close to the noise. An earlier prototype of the patch showed major regressions for NAS C-class when running with only half of the available CPUs -- 20-30% performance hits were measured at the time. With this version of the patch, the impact is negligible with small gains/losses within the noise measured. This is because the number of threads far exceeds the small imbalance the aptch cares about. Similarly, there were report of regressions for the autonuma benchmark against earlier versions but again, normal load balancing now applies for that workload. In general, the patch simply seeks to avoid unnecessary cross-node migrations in the basic case where imbalances are very small. For low utilisation communicating workloads, this patch generally behaves better with less NUMA balancing activity. For high utilisation, there is no change in behaviour. Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Reviewed-by: Vincent Guittot Reviewed-by: Srikar Dronamraju Acked-by: Phil Auld Tested-by: Phil Auld Link: https://lkml.kernel.org/r/20200114101319.GO3466@techsingularity.net commit af4ddd607dff7aabd466a4a878e01b9f592a75ab Author: Sven Schnelle Date: Tue Jan 28 09:30:29 2020 +0100 selftests/ftrace: fix glob selftest test.d/ftrace/func-filter-glob.tc is failing on s390 because it has ARCH_INLINE_SPIN_LOCK and friends set to 'y'. So the usual __raw_spin_lock symbol isn't in the ftrace function list. Change '*aw*lock' to '*spin*lock' which would hopefully match some of the locking functions on all platforms. Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Sven Schnelle Signed-off-by: Shuah Khan commit ebc0f83c78a2d26384401ecf2d2fa48063c0ee27 Author: Peter Zijlstra (Intel) Date: Sat Jan 11 04:53:39 2020 -0500 timers/nohz: Update NOHZ load in remote tick The way loadavg is tracked during nohz only pays attention to the load upon entering nohz. This can be particularly noticeable if full nohz is entered while non-idle, and then the cpu goes idle and stays that way for a long time. Use the remote tick to ensure that full nohz cpus report their deltas within a reasonable time. [ swood: Added changelog and removed recheck of stopped tick. ] Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Scott Wood Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/1578736419-14628-3-git-send-email-swood@redhat.com commit 488603b815a7514c7009e6fc339d74ed4a30f343 Author: Scott Wood Date: Sat Jan 11 04:53:38 2020 -0500 sched/core: Don't skip remote tick for idle CPUs This will be used in the next patch to get a loadavg update from nohz cpus. The delta check is skipped because idle_sched_class doesn't update se.exec_start. Signed-off-by: Scott Wood Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/1578736419-14628-2-git-send-email-swood@redhat.com commit f6170f0afbe23ad82b4a1195168949c31e3a2527 Merge: 6da49d1abd2c 248ed51048c4 Author: Linus Torvalds Date: Tue Jan 28 12:28:06 2020 -0800 Merge branch 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc x86 updates from Ingo Molnar: "Misc changes: - Enhance #GP fault printouts by distinguishing between canonical and non-canonical address faults, and also add KASAN fault decoding. - Fix/enhance the x86 NMI handler by putting the duration check into a direct function call instead of an irq_work which we know to be broken in some cases. - Clean up do_general_protection() a bit" * 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/nmi: Remove irq_work from the long duration NMI handler x86/traps: Cleanup do_general_protection() x86/kasan: Print original address on #GP x86/dumpstack: Introduce die_addr() for die() with #GP fault address x86/traps: Print address on #GP x86/insn-eval: Add support for 64-bit kernel mode commit f1ec3a517b4352e78dbef6b1e591f43202ecb3fe Author: Benjamin Thiel Date: Thu Jan 9 14:13:51 2020 +0100 kernel/events: Add a missing prototype for arch_perf_update_userpage() ... in order to fix a -Wmissing-prototype warning. No functional changes. Signed-off-by: Benjamin Thiel Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20200109131351.9468-1-b.thiel@posteo.de commit 07c5972951f088094776038006a0592a46d14bbc Author: Song Liu Date: Wed Jan 22 11:50:27 2020 -0800 perf/cgroups: Install cgroup events to correct cpuctx cgroup events are always installed in the cpuctx. However, when it is not installed via IPI, list_update_cgroup_event() adds it to cpuctx of current CPU, which triggers list corruption: [] list_add double add: new=ffff888ff7cf0db0, prev=ffff888ff7ce82f0, next=ffff888ff7cf0db0. To reproduce this, we can simply run: # perf stat -e cs -a & # perf stat -e cs -G anycgroup Fix this by installing it to cpuctx that contains event->ctx, and the proper cgrp_cpuctx_list. Fixes: db0503e4f675 ("perf/core: Optimize perf_install_in_event()") Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Song Liu Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Link: https://lkml.kernel.org/r/20200122195027.2112449-1-songliubraving@fb.com commit 003461559ef7a9bd0239bae35a22ad8924d6e9ad Author: Song Liu Date: Thu Jan 23 10:11:46 2020 -0800 perf/core: Fix mlock accounting in perf_mmap() Decreasing sysctl_perf_event_mlock between two consecutive perf_mmap()s of a perf ring buffer may lead to an integer underflow in locked memory accounting. This may lead to the undesired behaviors, such as failures in BPF map creation. Address this by adjusting the accounting logic to take into account the possibility that the amount of already locked memory may exceed the current limit. Fixes: c4b75479741c ("perf/core: Make the mlock accounting simple again") Suggested-by: Alexander Shishkin Signed-off-by: Song Liu Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Cc: Acked-by: Alexander Shishkin Link: https://lkml.kernel.org/r/20200123181146.2238074-1-songliubraving@fb.com commit 6da49d1abd2c2b70063f3606e3974c13d22497a1 Merge: 4244057c3da1 3c749b81ee99 Author: Linus Torvalds Date: Tue Jan 28 12:11:23 2020 -0800 Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Ingo Molnar: "Misc cleanups all around the map" * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/CPU/AMD: Remove amd_get_topology_early() x86/tsc: Remove redundant assignment x86/crash: Use resource_size() x86/cpu: Add a missing prototype for arch_smt_update() x86/nospec: Remove unused RSB_FILL_LOOPS x86/vdso: Provide missing include file x86/Kconfig: Correct spelling and punctuation Documentation/x86/boot: Fix typo x86/boot: Fix a comment's incorrect file reference x86/process: Remove set but not used variables prev and next x86/Kconfig: Fix Kconfig indentation commit 4244057c3da1dde07c0f338ea32fed6e79d6a657 Merge: 6b90e71a472b e79f15a4598c Author: Linus Torvalds Date: Tue Jan 28 12:00:29 2020 -0800 Merge branch 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 resource control updates from Ingo Molnar: "The main change in this tree is the extension of the resctrl procfs ABI with a new file that helps tooling to navigate from tasks back to resctrl groups: /proc/{pid}/cpu_resctrl_groups. Also fix static key usage for certain feature combinations and simplify the task exit resctrl case" * 'x86-cache-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/resctrl: Add task resctrl information display x86/resctrl: Check monitoring static key in the MBM overflow handler x86/resctrl: Do not reconfigure exiting tasks commit 6b90e71a472be131186276a5fd19d319fa2125d9 Merge: bcc8aff6af53 dacc9092336b Author: Linus Torvalds Date: Tue Jan 28 11:54:05 2020 -0800 Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot update from Ingo Molnar: "Two minor changes: fix an atypical binutils combination build bug, and also fix a VRAM size check for simplefb" * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sysfb: Fix check for bad VRAM size x86/boot: Discard .eh_frame sections commit bcc8aff6af53907ecb60e5aa8b34fbd429408a7a Merge: 435dd727a411 183ef7adf4ed Author: Linus Torvalds Date: Tue Jan 28 11:08:13 2020 -0800 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm updates from Ingo Molnar: "Misc updates: - Remove last remaining calls to exception_enter/exception_exit() and simplify the entry code some more. - Remove force_iret() - Add support for "Fast Short Rep Mov", which is available starting with Ice Lake Intel CPUs - and make the x86 assembly version of memmove() use REP MOV for all sizes when FSRM is available. - Micro-optimize/simplify the 32-bit boot code a bit. - Use a more future-proof SYSRET instruction mnemonic" * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot: Simplify calculation of output address x86/entry/64: Add instruction suffix to SYSRET x86: Remove force_iret() x86/cpufeatures: Add support for fast short REP; MOVSB x86/context-tracking: Remove exception_enter/exit() from KVM_PV_REASON_PAGE_NOT_PRESENT async page fault x86/context-tracking: Remove exception_enter/exit() from do_page_fault() commit 435dd727a411004d9402ad0c868c958408271a48 Merge: c677124e631d d0b778880448 Author: Linus Torvalds Date: Tue Jan 28 11:06:49 2020 -0800 Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 apic fix from Ingo Molnar: "A single commit that simplifies the code and gets rid of a compiler warning" * 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/apic/uv: Avoid unused variable warning commit 9e0cda721d18f44f1cd74d3a426931d71c1f1b30 Author: Bjorn Andersson Date: Fri Jan 24 09:59:34 2020 -0800 clk: qcom: rpmh: Sort OF match table sc7180 was added to the end of the match table, sort the table. Fixes: eee28109f871 ("clk: qcom: clk-rpmh: Add support for RPMHCC for SC7180") Signed-off-by: Bjorn Andersson Link: https://lkml.kernel.org/r/20200124175934.3937473-1-bjorn.andersson@linaro.org Signed-off-by: Stephen Boyd commit 7914d5c6266abff4918f0fd91ee53e8b537d65a1 Author: Dafna Hirschfeld Date: Wed Jan 22 14:57:41 2020 +0100 dt-bindings: fix warnings in validation of qcom,gcc.yaml The last example in qcom,gcc.yaml set 'sleep' as the second value of 'clock-names'. According to the schema is should be 'sleep_clk'. Fix the example to conform the schema. This fixes a warning when validating the schema: "clock-names: ... is not valid under any of the given schemas" Signed-off-by: Dafna Hirschfeld Link: https://lkml.kernel.org/r/20200122135741.12123-1-dafna.hirschfeld@collabora.com Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit 957d100926b4dbdd9a67b3de5065bfafbe4ac19f Author: Dafna Hirschfeld Date: Wed Jan 22 14:46:39 2020 +0100 dt-binding: fix compilation error of the example in qcom,gcc.yaml Running `make dt_binging_check`, gives the error: DTC Documentation/devicetree/bindings/clock/qcom,gcc.example.dt.yaml Error: Documentation/devicetree/bindings/clock/qcom,gcc.example.dts:111.28-29 syntax error FATAL ERROR: Unable to parse input tree This is because the last example uses the macro RPM_SMD_XO_CLK_SRC which is defined in qcom,rpmcc.h but the include of this header is missing. Add the include to fix the error. Signed-off-by: Dafna Hirschfeld Link: https://lkml.kernel.org/r/20200122134639.11735-1-dafna.hirschfeld@collabora.com Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit 9293724192a73f49c722e9685d45649c6df67dfe Author: Boris Ostrovsky Date: Tue Jan 28 10:31:26 2020 -0500 xen/gntdev: Do not use mm notifiers with autotranslating guests Commit d3eeb1d77c5d ("xen/gntdev: use mmu_interval_notifier_insert") missed a test for use_ptemod when calling mmu_interval_read_begin(). Fix that. Fixes: d3eeb1d77c5d ("xen/gntdev: use mmu_interval_notifier_insert") CC: stable@vger.kernel.org # 5.5 Reported-by: Ilpo Järvinen Tested-by: Ilpo Järvinen Signed-off-by: Boris Ostrovsky Reviewed-by: Jason Gunthorpe Acked-by: Juergen Gross commit b4fb4cc5ba83b20dae13cef116c33648e81d2f44 Author: Parav Pandit Date: Sun Jan 26 16:26:46 2020 +0200 RDMA/cma: Fix unbalanced cm_id reference count during address resolve Below commit missed the AF_IB and loopback code flow in rdma_resolve_addr(). This leads to an unbalanced cm_id refcount in cma_work_handler() which puts the refcount which was not incremented prior to queuing the work. A call trace is observed with such code flow: BUG: unable to handle kernel NULL pointer dereference at (null) [] __mutex_lock_slowpath+0x166/0x1d0 [] mutex_lock+0x1f/0x2f [] cma_work_handler+0x25/0xa0 [] process_one_work+0x17f/0x440 [] worker_thread+0x126/0x3c0 Hence, hold the cm_id reference when scheduling the resolve work item. Fixes: 722c7b2bfead ("RDMA/{cma, core}: Avoid callback on rdma_addr_cancel()") Link: https://lore.kernel.org/r/20200126142652.104803-2-leon@kernel.org Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 36798d5ae1af62e830c5e045b2e41ce038690c61 Author: Artemy Kovalyov Date: Tue Jan 28 15:56:12 2020 +0200 RDMA/umem: Fix ib_umem_find_best_pgsz() Except for the last entry, the ending iova alignment sets the maximum possible page size as the low bits of the iova must be zero when starting the next chunk. Fixes: 4a35339958f1 ("RDMA/umem: Add API to find best driver supported page size in an MR") Link: https://lore.kernel.org/r/20200128135612.174820-1-leon@kernel.org Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Tested-by: Gal Pressman Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 6bd3357b6181bd38c1a757168a8842e09ec6f3fb Merge: 32ada3b9e04c 538f127cd3bc 8757dc970f55 8b7e20a7ba54 Author: Ingo Molnar Date: Tue Jan 28 19:08:52 2020 +0100 Merge branches 'x86/hyperv', 'x86/kdump' and 'x86/misc' into x86/urgent, to pick up single-commit branches Signed-off-by: Ingo Molnar commit c677124e631d97130e4ff7db6e10acdfb7a82321 Merge: c0e809e24480 afa70d941f66 Author: Linus Torvalds Date: Tue Jan 28 10:07:09 2020 -0800 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: "These were the main changes in this cycle: - More -rt motivated separation of CONFIG_PREEMPT and CONFIG_PREEMPTION. - Add more low level scheduling topology sanity checks and warnings to filter out nonsensical topologies that break scheduling. - Extend uclamp constraints to influence wakeup CPU placement - Make the RT scheduler more aware of asymmetric topologies and CPU capacities, via uclamp metrics, if CONFIG_UCLAMP_TASK=y - Make idle CPU selection more consistent - Various fixes, smaller cleanups, updates and enhancements - please see the git log for details" * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (58 commits) sched/fair: Define sched_idle_cpu() only for SMP configurations sched/topology: Assert non-NUMA topology masks don't (partially) overlap idle: fix spelling mistake "iterrupts" -> "interrupts" sched/fair: Remove redundant call to cpufreq_update_util() sched/psi: create /proc/pressure and /proc/pressure/{io|memory|cpu} only when psi enabled sched/fair: Fix sgc->{min,max}_capacity calculation for SD_OVERLAP sched/fair: calculate delta runnable load only when it's needed sched/cputime: move rq parameter in irqtime_account_process_tick stop_machine: Make stop_cpus() static sched/debug: Reset watchdog on all CPUs while processing sysrq-t sched/core: Fix size of rq::uclamp initialization sched/uclamp: Fix a bug in propagating uclamp value in new cgroups sched/fair: Load balance aggressively for SCHED_IDLE CPUs sched/fair : Improve update_sd_pick_busiest for spare capacity case watchdog: Remove soft_lockup_hrtimer_cnt and related code sched/rt: Make RT capacity-aware sched/fair: Make EAS wakeup placement consider uclamp restrictions sched/fair: Make task_fits_capacity() consider uclamp restrictions sched/uclamp: Rename uclamp_util_with() into uclamp_rq_util_with() sched/uclamp: Make uclamp util helpers use and return UL values ... commit c0e809e244804d428bcd976eaf9369f60508ea8a Merge: 2180f214f4a5 0cc4bd8f70d1 Author: Linus Torvalds Date: Tue Jan 28 09:44:15 2020 -0800 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Ingo Molnar: "Kernel side changes: - Ftrace is one of the last W^X violators (after this only KLP is left). These patches move it over to the generic text_poke() interface and thereby get rid of this oddity. This requires a surprising amount of surgery, by Peter Zijlstra. - x86/AMD PMUs: add support for 'Large Increment per Cycle Events' to count certain types of events that have a special, quirky hw ABI (by Kim Phillips) - kprobes fixes by Masami Hiramatsu Lots of tooling updates as well, the following subcommands were updated: annotate/report/top, c2c, clang, record, report/top TUI, sched timehist, tests; plus updates were done to the gtk ui, libperf, headers and the parser" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (57 commits) perf/x86/amd: Add support for Large Increment per Cycle Events perf/x86/amd: Constrain Large Increment per Cycle events perf/x86/intel/rapl: Add Comet Lake support tracing: Initialize ret in syscall_enter_define_fields() perf header: Use last modification time for timestamp perf c2c: Fix return type for histogram sorting comparision functions perf beauty sockaddr: Fix augmented syscall format warning perf/ui/gtk: Fix gtk2 build perf ui gtk: Add missing zalloc object perf tools: Use %define api.pure full instead of %pure-parser libperf: Setup initial evlist::all_cpus value perf report: Fix no libunwind compiled warning break s390 issue perf tools: Support --prefix/--prefix-strip perf report: Clarify in help that --children is default tools build: Fix test-clang.cpp with Clang 8+ perf clang: Fix build with Clang 9 kprobes: Fix optimize_kprobe()/unoptimize_kprobe() cancellation logic tools lib: Fix builds when glibc contains strlcpy() perf report/top: Make 'e' visible in the help and make it toggle showing callchains perf report/top: Do not offer annotation for symbols without samples ... commit 2180f214f4a5d8e2d8b7138d9a59246ee05753b9 Merge: 634cd4b6afe1 f5bfdc8e3947 Author: Linus Torvalds Date: Tue Jan 28 09:33:25 2020 -0800 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: "Just a handful of changes in this cycle: an ARM64 performance optimization, a comment fix and a debug output fix" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/osq: Use optimized spinning loop for arm64 locking/qspinlock: Fix inaccessible URL of MCS lock paper locking/lockdep: Fix lockdep_stats indentation problem commit 634cd4b6afe15dca8df02bcba242b9b0c5e9b5a5 Merge: d99391ec2b42 ac6119e7f25b Author: Linus Torvalds Date: Tue Jan 28 09:03:40 2020 -0800 Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI updates from Ingo Molnar: "The main changes in this cycle were: - Cleanup of the GOP [graphics output] handling code in the EFI stub - Complete refactoring of the mixed mode handling in the x86 EFI stub - Overhaul of the x86 EFI boot/runtime code - Increase robustness for mixed mode code - Add the ability to disable DMA at the root port level in the EFI stub - Get rid of RWX mappings in the EFI memory map and page tables, where possible - Move the support code for the old EFI memory mapping style into its only user, the SGI UV1+ support code. - plus misc fixes, updates, smaller cleanups. ... and due to interactions with the RWX changes, another round of PAT cleanups make a guest appearance via the EFI tree - with no side effects intended" * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (75 commits) efi/x86: Disable instrumentation in the EFI runtime handling code efi/libstub/x86: Fix EFI server boot failure efi/x86: Disallow efi=old_map in mixed mode x86/boot/compressed: Relax sed symbol type regex for LLVM ld.lld efi/x86: avoid KASAN false positives when accessing the 1: 1 mapping efi: Fix handling of multiple efi_fake_mem= entries efi: Fix efi_memmap_alloc() leaks efi: Add tracking for dynamically allocated memmaps efi: Add a flags parameter to efi_memory_map efi: Fix comment for efi_mem_type() wrt absent physical addresses efi/arm: Defer probe of PCIe backed efifb on DT systems efi/x86: Limit EFI old memory map to SGI UV machines efi/x86: Avoid RWX mappings for all of DRAM efi/x86: Don't map the entire kernel text RW for mixed mode x86/mm: Fix NX bit clearing issue in kernel_map_pages_in_pgd efi/libstub/x86: Fix unused-variable warning efi/libstub/x86: Use mandatory 16-byte stack alignment in mixed mode efi/libstub/x86: Use const attribute for efi_is_64bit() efi: Allow disabling PCI busmastering on bridges during boot efi/x86: Allow translating 64-bit arguments for mixed mode calls ... commit 451dff37f0752cc8ad6f1bb82081a98d7b760310 Author: Masahiro Yamada Date: Sat Jan 25 13:12:35 2020 +0900 builddeb: split libc headers deployment out into a function Deploy user-space headers (linux-libc-dev package) in a separate function for readability. Signed-off-by: Masahiro Yamada commit 3126c17d28b696ba555bb959888fe4b5143bb389 Author: Masahiro Yamada Date: Sat Jan 25 13:12:34 2020 +0900 builddeb: split kernel headers deployment out into a function Deploy kernel headers (linux-headers package) in a separate function for readability. Signed-off-by: Masahiro Yamada commit aae6a6712440d566ae148fc3af223dc25fbd9794 Author: Masahiro Yamada Date: Sat Jan 25 13:12:33 2020 +0900 builddeb: remove redundant make for ARCH=um The kernel build has already been done before builddeb is invoked. Signed-off-by: Masahiro Yamada commit 9a92eee38790c63b45b32876cb1967154f8b9ee5 Author: Masahiro Yamada Date: Sat Jan 25 13:12:32 2020 +0900 builddeb: avoid invoking sub-shells where possible The commands surrounded by ( ... ) is run in a sub-shell, but you do not have to spawn a sub-shell for every single line. Use just one ( ... ) for creating debian/hdrsrcfiles. For tar, use -C option instead. Signed-off-by: Masahiro Yamada commit f9a4711ebb248ad37c830b2715342ec60edb1330 Author: Masahiro Yamada Date: Sat Jan 25 13:12:31 2020 +0900 builddeb: remove redundant $objtree/ This script works only when it is invoked in the $objtree, that is, it is already relying on $objtree is '.' Signed-off-by: Masahiro Yamada commit 1694e94e4f4698b7fdd37e6700ca6c5b7e01d25a Author: Masahiro Yamada Date: Sat Jan 25 13:12:30 2020 +0900 builddeb: match temporary directory name to the package name The temporary directory names, debian/hdrtmp (linux-headers package) vs debian/headertmp (linux-libc-dev package), are confusing. Matching the directory name to the package name is clearer, IMHO. Signed-off-by: Masahiro Yamada commit 7e61b167eb29f949f74a465aa135c69fac3d1c8f Author: Masahiro Yamada Date: Sat Jan 25 13:12:29 2020 +0900 builddeb: remove unneeded files in hdrobjfiles for headers package - We do not need tools/objtool/fixdep or tools/objtool/sync-check.sh for building external modules. Including tools/objtool/objtool is enough. - gcc-common.h is a check-in file. I do not see any point to search for it in objtree. Signed-off-by: Masahiro Yamada commit d99391ec2b42d827d92003dcdcb96fadac9d862b Merge: 8b561778f297 f8a4bb6bfa63 Author: Linus Torvalds Date: Tue Jan 28 08:46:13 2020 -0800 Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU updates from Ingo Molnar: "The RCU changes in this cycle were: - Expedited grace-period updates - kfree_rcu() updates - RCU list updates - Preemptible RCU updates - Torture-test updates - Miscellaneous fixes - Documentation updates" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (69 commits) rcu: Remove unused stop-machine #include powerpc: Remove comment about read_barrier_depends() .mailmap: Add entries for old paulmck@kernel.org addresses srcu: Apply *_ONCE() to ->srcu_last_gp_end rcu: Switch force_qs_rnp() to for_each_leaf_node_cpu_mask() rcu: Move rcu_{expedited,normal} definitions into rcupdate.h rcu: Move gp_state_names[] and gp_state_getname() to tree_stall.h rcu: Remove the declaration of call_rcu() in tree.h rcu: Fix tracepoint tracking RCU CPU kthread utilization rcu: Fix harmless omission of "CONFIG_" from #if condition rcu: Avoid tick_dep_set_cpu() misordering rcu: Provide wrappers for uses of ->rcu_read_lock_nesting rcu: Use READ_ONCE() for ->expmask in rcu_read_unlock_special() rcu: Clear ->rcu_read_unlock_special only once rcu: Clear .exp_hint only when deferred quiescent state has been reported rcu: Rename some instance of CONFIG_PREEMPTION to CONFIG_PREEMPT_RCU rcu: Remove kfree_call_rcu_nobatch() rcu: Remove kfree_rcu() special casing and lazy-callback handling rcu: Add support for debug_objects debugging for kfree_rcu() rcu: Add multiple in-flight batches of kfree_rcu() work ... commit 8b561778f29766675e88566215aa835fff9dc1f7 Merge: 9f2a43019edc 22a7fa8848c5 Author: Linus Torvalds Date: Tue Jan 28 08:38:25 2020 -0800 Merge branch 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool updates from Ingo Molnar: "The main changes are to move the ORC unwind table sorting from early init to build-time - this speeds up booting. No change in functionality intended" * 'core-objtool-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/unwind/orc: Fix !CONFIG_MODULES build warning x86/unwind/orc: Remove boot-time ORC unwind tables sorting scripts/sorttable: Implement build-time ORC unwind table sorting scripts/sorttable: Rename 'sortextable' to 'sorttable' scripts/sortextable: Refactor the do_func() function scripts/sortextable: Remove dead code scripts/sortextable: Clean up the code to meet the kernel coding style better scripts/sortextable: Rewrite error/success handling commit e9a3bfe38e393e1d8bd74986cdc9b99b8f9d1efc Author: Rob Herring Date: Tue Jan 28 10:16:45 2020 -0600 scripts/dtc: Revert "yamltree: Ensure consistent bracketing of properties with phandles" This reverts upstream commit 18d7b2f4ee45fec422b7d82bab0b3c762ee907e4. A revert in upstream dtc is pending. This commit didn't work for properties such as 'interrupt-map' that have phandle in the middle of an entry. It would also not work for a 0 or -1 phandle value that acts as a NULL. Signed-off-by: Rob Herring commit 9f2a43019edc097347900daade277571834a3e2c Merge: b0be0eff1a5a 960786422fe9 Author: Linus Torvalds Date: Tue Jan 28 08:20:54 2020 -0800 Merge branch 'core-headers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull header cleanup from Ingo Molnar: "This is a treewide cleanup, mostly (but not exclusively) with x86 impact, which breaks implicit dependencies on the asm/realtime.h header and finally removes it from asm/acpi.h" * 'core-headers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ACPI/sleep: Move acpi_get_wakeup_address() into sleep.c, remove from ACPI/sleep: Convert acpi_wakeup_address into a function x86/ACPI/sleep: Remove an unnecessary include of asm/realmode.h ASoC: Intel: Skylake: Explicitly include linux/io.h for virt_to_phys() vmw_balloon: Explicitly include linux/io.h for virt_to_phys() virt: vbox: Explicitly include linux/io.h to pick up various defs efi/capsule-loader: Explicitly include linux/io.h for page_to_phys() perf/x86/intel: Explicitly include asm/io.h to use virt_to_phys() x86/kprobes: Explicitly include vmalloc.h for set_vm_flush_reset_perms() x86/ftrace: Explicitly include vmalloc.h for set_vm_flush_reset_perms() x86/boot: Explicitly include realmode.h to handle RM reservations x86/efi: Explicitly include realmode.h to handle RM trampoline quirk x86/platform/intel/quark: Explicitly include linux/io.h for virt_to_phys() x86/setup: Enhance the comments x86/setup: Clean up the header portion of setup.c commit 4ab2bb3c311a45d80d31f2f189606871669ed792 Author: Filipe Laíns Date: Sat Jan 11 19:24:19 2020 +0000 HID: logitech-hidpp: BatteryVoltage: only read chargeStatus if extPower is active In the HID++ 2.0 function getBatteryInfo() from the BatteryVoltage (0x1001) feature, chargeStatus is only valid if extPower is active. Previously we were ignoring extPower, which resulted in wrong values. Example: With an unplugged mouse $ cat /sys/class/power_supply/hidpp_battery_0/status Charging This patch fixes that, it also renames charge_sts to flags as charge_sts can be confused with chargeStatus from the spec. Spec: +--------+-------------------------------------------------------------------------+ | byte | 2 | +--------+--------------+------------+------------+----------+----------+----------+ | bit | 0..2 | 3 | 4 | 5 | 6 | 7 | +--------+--------------+------------+------------+----------+----------+----------+ | buffer | chargeStatus | fastCharge | slowCharge | critical | (unused) | extPower | +--------+--------------+------------+------------+----------+----------+----------+ Table 1 - battery voltage (0x1001), getBatteryInfo() (ASE 0), 3rd byte +-------+--------------------------------------+ | value | meaning | +-------+--------------------------------------+ | 0 | Charging | +-------+--------------------------------------+ | 1 | End of charge (100% charged) | +-------+--------------------------------------+ | 2 | Charge stopped (any "normal" reason) | +-------+--------------------------------------+ | 7 | Hardware error | +-------+--------------------------------------+ Table 2 - chargeStatus value Signed-off-by: Filipe Laíns Tested-by: Pedro Vanzella Reviewed-by: Pedro Vanzella Signed-off-by: Benjamin Tissoires commit 25a3a15417cf4311f812f5a2b18c5fc2809f66d7 Author: Sebastian Andrzej Siewior Date: Mon Jan 27 09:39:15 2020 +0100 smp: Remove superfluous cond_func check in smp_call_function_many_cond() It was requested to remove the cond_func check but the follow up patch was overlooked. Remove it now. Fixes: 67719ef25eeb ("smp: Add a smp_cond_func_t argument to smp_call_function_many()") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200127083915.434tdkztorkklpdu@linutronix.de commit dabf6b36b83a18d57e3d4b9d50544ed040d86255 Author: Michael Ellerman Date: Sun Jan 26 22:52:47 2020 +1100 of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc There's an OF helper called of_dma_is_coherent(), which checks if a device has a "dma-coherent" property to see if the device is coherent for DMA. But on some platforms devices are coherent by default, and on some platforms it's not possible to update existing device trees to add the "dma-coherent" property. So add a Kconfig symbol to allow arch code to tell of_dma_is_coherent() that devices are coherent by default, regardless of the presence of the property. Select that symbol on powerpc when NOT_COHERENT_CACHE is not set, ie. when the system has a coherent cache. Fixes: 92ea637edea3 ("of: introduce of_dma_is_coherent() helper") Cc: stable@vger.kernel.org # v3.16+ Reported-by: Christian Zigotzky Tested-by: Christian Zigotzky Signed-off-by: Michael Ellerman Reviewed-by: Ulf Hansson Signed-off-by: Rob Herring commit a31b4ec539e966515f1f97f4000d0e2a399930ce Author: Bob Peterson Date: Mon Jan 20 15:49:28 2020 +0100 Revert "gfs2: eliminate tr_num_revoke_rm" This reverts commit e955537e3262de8e56f070b13817f525f472fa00. Before patch e955537e32, tr_num_revoke tracked the number of revokes added to the transaction, and tr_num_revoke_rm tracked how many revokes were removed. But since revokes are queued off the sdp (superblock) pointer, some transactions could remove more revokes than they added. (e.g. revokes added by a different process). Commit e955537e32 eliminated transaction variable tr_num_revoke_rm, but in order to do so, it changed the accounting to always use tr_num_revoke for its math. Since you can remove more revokes than you add, tr_num_revoke could now become a negative value. This negative value broke the assert in function gfs2_trans_end: if (gfs2_assert_withdraw(sdp, (nbuf <=3D tr->tr_blocks) && (tr->tr_num_revoke <=3D tr->tr_revokes))) One way to fix this is to simply remove the tr_num_revoke clause from the assert and allow the value to become negative. Andreas didn't like that idea, so instead, we decided to revert e955537e32. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 40ca1bf580ef24df30702032ba5e40dfdcaa200b Author: Jim Quinlan Date: Mon Dec 16 12:01:10 2019 +0100 PCI: brcmstb: Add MSI support This adds MSI support to the Broadcom STB PCIe host controller. The MSI controller is physically located within the PCIe block, however, there is no reason why the MSI controller could not be moved elsewhere in the future. MSIX is not supported by the HW. Since the internal Brcmstb MSI controller is intertwined with the PCIe controller, it is not its own platform device but rather part of the PCIe platform device. Signed-off-by: Jim Quinlan Co-developed-by: Nicolas Saenz Julienne Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Lorenzo Pieralisi Reviewed-by: Marc Zyngier Reviewed-by: Andrew Murray commit c0452137034bda8f686dd9a2e167949bfffd6776 Author: Jim Quinlan Date: Mon Dec 16 12:01:09 2019 +0100 PCI: brcmstb: Add Broadcom STB PCIe host controller driver This adds a basic driver for Broadcom's STB PCIe controller, for now aimed at Raspberry Pi 4's SoC, bcm2711. Signed-off-by: Jim Quinlan Co-developed-by: Nicolas Saenz Julienne Signed-off-by: Nicolas Saenz Julienne [lorenzo.pieralisi@arm.com: updated brcm_pcie_get_rc_bar2_size_and_offset()according to https://lore.kernel.org/linux-pci/be8ddb33a7360af1815cf686f77f3f0913d02be3.camel@suse.de] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Reviewed-by: Jeremy Linton commit 926b5dfa6b8dc666ff398044af6906b156e1d949 Author: Marc Zyngier Date: Mon Dec 16 11:24:57 2019 +0000 irqchip/gic-v3: Only provision redistributors that are enabled in ACPI We currently allocate redistributor region structures for individual redistributors when ACPI doesn't present us with compact MMIO regions covering multiple redistributors. It turns out that we allocate these structures even when the redistributor is flagged as disabled by ACPI. It works fine until someone actually tries to tarse one of these structures, and access the corresponding MMIO region. Instead, track the number of enabled redistributors, and only allocate what is required. This makes sure that there is no invalid data to misuse. Signed-off-by: Marc Zyngier Reported-by: Heyi Guo Tested-by: Heyi Guo Link: https://lore.kernel.org/r/20191216062745.63397-1-guoheyi@huawei.com commit 4a267aa707953a9a73d1f5dc7f894dd9024a92be Author: Alexandru Elisei Date: Mon Jan 27 10:36:52 2020 +0000 KVM: arm64: Treat emulated TVAL TimerValue as a signed 32-bit integer According to the ARM ARM, registers CNT{P,V}_TVAL_EL0 have bits [63:32] RES0 [1]. When reading the register, the value is truncated to the least significant 32 bits [2], and on writes, TimerValue is treated as a signed 32-bit integer [1, 2]. When the guest behaves correctly and writes 32-bit values, treating TVAL as an unsigned 64 bit register works as expected. However, things start to break down when the guest writes larger values, because (u64)0x1_ffff_ffff = 8589934591. but (s32)0x1_ffff_ffff = -1, and the former will cause the timer interrupt to be asserted in the future, but the latter will cause it to be asserted now. Let's treat TVAL as a signed 32-bit register on writes, to match the behaviour described in the architecture, and the behaviour experimentally exhibited by the virtual timer on a non-vhe host. [1] Arm DDI 0487E.a, section D13.8.18 [2] Arm DDI 0487E.a, section D11.2.4 Signed-off-by: Alexandru Elisei [maz: replaced the read-side mask with lower_32_bits] Signed-off-by: Marc Zyngier Fixes: 8fa761624871 ("KVM: arm/arm64: arch_timer: Fix CNTP_TVAL calculation") Link: https://lore.kernel.org/r/20200127103652.2326-1-alexandru.elisei@arm.com commit c01d6a18023b94fdd0cb7cf11bbfe769bf71653f Author: Eric Auger Date: Fri Jan 24 15:25:35 2020 +0100 KVM: arm64: pmu: Only handle supported event counters Let the code never use unsupported event counters. Change kvm_pmu_handle_pmcr() to only reset supported counters and kvm_pmu_vcpu_reset() to only stop supported counters. Other actions are filtered on the supported counters in kvm/sysregs.c Signed-off-by: Eric Auger Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200124142535.29386-5-eric.auger@redhat.com commit 08607e8319c76a8a37fc2a0ecac328833f4e9f39 Author: Vinod Koul Date: Tue Jan 28 18:20:32 2020 +0530 dmaengine: doc: Properly indent metadata title The newly added metadata documentation title was not properly indented resulting in doc build break: Sphinx parallel build error: docutils.utils.SystemMessage: /linux/Documentation/driver-api/dmaengine/client.rst:155: (SEVERE/4) Unexpected section title. Optional: per descriptor metadata --------------------------------- Fix this by doing the right indent Reported-by: Michael Ellerman Fixes: 7d083ae98357 ("dmaengine: doc: Add sections for per descriptor metadata support") Link: https://lore.kernel.org/r/20200128125032.1650816-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit aa76829171e98bd75a0cc00b6248eca269ac7f4f Author: Eric Auger Date: Fri Jan 24 15:25:34 2020 +0100 KVM: arm64: pmu: Fix chained SW_INCR counters At the moment a SW_INCR counter always overflows on 32-bit boundary, independently on whether the n+1th counter is programmed as CHAIN. Check whether the SW_INCR counter is a 64b counter and if so, implement the 64b logic. Fixes: 80f393a23be6 ("KVM: arm/arm64: Support chained PMU counters") Signed-off-by: Eric Auger Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200124142535.29386-4-eric.auger@redhat.com commit 76c9fc56ddfdfeb0c9ff984d0d63b083e608fc92 Author: Eric Auger Date: Fri Jan 24 15:25:33 2020 +0100 KVM: arm64: pmu: Don't mark a counter as chained if the odd one is disabled At the moment we update the chain bitmap on type setting. This does not take into account the enable state of the odd register. Let's make sure a counter is never considered as chained if the high counter is disabled. We recompute the chain state on enable/disable and type changes. Also let create_perf_event() use the chain bitmap and not use kvm_pmu_idx_has_chain_evtype(). Suggested-by: Marc Zyngier Signed-off-by: Eric Auger Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200124142535.29386-3-eric.auger@redhat.com commit 3837407c1aa1101ed5e214c7d6041e7a23335c6e Author: Eric Auger Date: Fri Jan 24 15:25:32 2020 +0100 KVM: arm64: pmu: Don't increment SW_INCR if PMCR.E is unset The specification says PMSWINC increments PMEVCNTR_EL1 by 1 if PMEVCNTR_EL0 is enabled and configured to count SW_INCR. For PMEVCNTR_EL0 to be enabled, we need both PMCNTENSET to be set for the corresponding event counter but we also need the PMCR.E bit to be set. Fixes: 7a0adc7064b8 ("arm64: KVM: Add access handler for PMSWINC register") Signed-off-by: Eric Auger Signed-off-by: Marc Zyngier Reviewed-by: Andrew Murray Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20200124142535.29386-2-eric.auger@redhat.com commit 3d7dfd632f9b60cfce069b4da517e6b1a1c3f613 Author: Christophe Leroy Date: Fri Jan 24 11:54:45 2020 +0000 powerpc: Implement user_access_save() and user_access_restore() Implement user_access_save() and user_access_restore() On 8xx and radix: - On save, get the value of the associated special register then prevent user access. - On restore, set back the saved value to the associated special register. On book3s/32: - On save, get the value stored in current->thread.kuap and prevent user access. - On restore, regenerate address range from the stored value and reopen read/write access for that range. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/54f2f74938006b33c55a416674807b42ef222068.1579866752.git.christophe.leroy@c-s.fr commit 5cd623333e7cf4e3a334c70529268b65f2a6c2c7 Author: Christophe Leroy Date: Fri Jan 24 11:54:44 2020 +0000 powerpc: Implement user_access_begin and friends Today, when a function like strncpy_from_user() is called, the userspace access protection is de-activated and re-activated for every word read. By implementing user_access_begin and friends, the protection is de-activated at the beginning of the copy and re-activated at the end. Implement user_access_begin(), user_access_end() and unsafe_get_user(), unsafe_put_user() and unsafe_copy_to_user() For the time being, we keep user_access_save() and user_access_restore() as nops. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/36d4fbf9e56a75994aca4ee2214c77b26a5a8d35.1579866752.git.christophe.leroy@c-s.fr commit bedb4dbe443c11ff551b4ae4e48c8676fdc96467 Author: Christophe Leroy Date: Fri Jan 24 11:54:43 2020 +0000 powerpc/32s: Prepare prevent_user_access() for user_access_end() In preparation of implementing user_access_begin and friends on powerpc, the book3s/32 version of prevent_user_access() need to be prepared for user_access_end(). user_access_end() doesn't provide the address and size which were passed to user_access_begin(), required by prevent_user_access() to know which segment to modify. The list of segments which where unprotected by allow_user_access() are available in current->kuap. But we don't want prevent_user_access() to read this all the time, especially everytime it is 0 (for instance because the access was not a write access). Implement a special direction named KUAP_CURRENT. In this case only, the addr and end are retrieved from current->kuap. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/55bcc1f25d8200892a31f67a0b024ff3b816c3cc.1579866752.git.christophe.leroy@c-s.fr commit 88f8c080d47f307871840a0a825ef556673eb592 Author: Christophe Leroy Date: Fri Jan 24 11:54:42 2020 +0000 powerpc/32s: Drop NULL addr verification NULL addr is a user address. Don't waste time checking it. If someone tries to access it, it will SIGFAULT the same way as for address 1, so no need to make it special. The special case is when not doing a write, in that case we want to drop the entire function. This is now handled by 'dir' param and not by the nulity of 'to' anymore. Also make beginning of prevent_user_access() similar to beginning of allow_user_access(), and tell the compiler that writing in kernel space or with a 0 length is unlikely Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/85e971223dfe6ace734637db1841678939a76155.1579866752.git.christophe.leroy@c-s.fr commit 1d8f739b07bd538f272f60bf53f10e7e6248d295 Author: Christophe Leroy Date: Fri Jan 24 11:54:41 2020 +0000 powerpc/kuap: Fix set direction in allow/prevent_user_access() __builtin_constant_p() always return 0 for pointers, so on RADIX we always end up opening both direction (by writing 0 in SPR29): 0000000000000170 <._copy_to_user>: ... 1b0: 4c 00 01 2c isync 1b4: 39 20 00 00 li r9,0 1b8: 7d 3d 03 a6 mtspr 29,r9 1bc: 4c 00 01 2c isync 1c0: 48 00 00 01 bl 1c0 <._copy_to_user+0x50> 1c0: R_PPC64_REL24 .__copy_tofrom_user ... 0000000000000220 <._copy_from_user>: ... 2ac: 4c 00 01 2c isync 2b0: 39 20 00 00 li r9,0 2b4: 7d 3d 03 a6 mtspr 29,r9 2b8: 4c 00 01 2c isync 2bc: 7f c5 f3 78 mr r5,r30 2c0: 7f 83 e3 78 mr r3,r28 2c4: 48 00 00 01 bl 2c4 <._copy_from_user+0xa4> 2c4: R_PPC64_REL24 .__copy_tofrom_user ... Use an explicit parameter for direction selection, so that GCC is able to see it is a constant: 00000000000001b0 <._copy_to_user>: ... 1f0: 4c 00 01 2c isync 1f4: 3d 20 40 00 lis r9,16384 1f8: 79 29 07 c6 rldicr r9,r9,32,31 1fc: 7d 3d 03 a6 mtspr 29,r9 200: 4c 00 01 2c isync 204: 48 00 00 01 bl 204 <._copy_to_user+0x54> 204: R_PPC64_REL24 .__copy_tofrom_user ... 0000000000000260 <._copy_from_user>: ... 2ec: 4c 00 01 2c isync 2f0: 39 20 ff ff li r9,-1 2f4: 79 29 00 04 rldicr r9,r9,0,0 2f8: 7d 3d 03 a6 mtspr 29,r9 2fc: 4c 00 01 2c isync 300: 7f c5 f3 78 mr r5,r30 304: 7f 83 e3 78 mr r3,r28 308: 48 00 00 01 bl 308 <._copy_from_user+0xa8> 308: R_PPC64_REL24 .__copy_tofrom_user ... Signed-off-by: Christophe Leroy [mpe: Spell out the directions, s/KUAP_R/KUAP_READ/ etc.] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f4e88ec4941d5facb35ce75026b0112f980086c3.1579866752.git.christophe.leroy@c-s.fr commit 6ec20aa2e510b6297906c45f009aa08b2d97269a Author: Christophe Leroy Date: Fri Jan 24 11:54:40 2020 +0000 powerpc/32s: Fix bad_kuap_fault() At the moment, bad_kuap_fault() reports a fault only if a bad access to userspace occurred while access to userspace was not granted. But if a fault occurs for a write outside the allowed userspace segment(s) that have been unlocked, bad_kuap_fault() fails to detect it and the kernel loops forever in do_page_fault(). Fix it by checking that the accessed address is within the allowed range. Fixes: a68c31fc01ef ("powerpc/32s: Implement Kernel Userspace Access Protection") Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f48244e9485ada0a304ed33ccbb8da271180c80d.1579866752.git.christophe.leroy@c-s.fr commit 9933819099c4600b41a042f27a074470a43cf6b9 Author: Christophe Leroy Date: Mon Jan 27 10:42:04 2020 +0000 powerpc/32s: Fix CPU wake-up from sleep mode Commit f7354ccac844 ("powerpc/32: Remove CURRENT_THREAD_INFO and rename TI_CPU") broke the CPU wake-up from sleep mode (i.e. when _TLF_SLEEPING is set) by delaying the tovirt(r2, r2). This is because r2 is not restored by fast_exception_return. It used to work (by chance ?) because CPU wake-up interrupt never comes from user, so r2 is expected to point to 'current' on return. Commit e2fb9f544431 ("powerpc/32: Prepare for Kernel Userspace Access Protection") broke it even more by clobbering r0 which is not restored by fast_exception_return either. Use r6 instead of r0. This is possible because r3-r6 are restored by fast_exception_return and only r3-r5 are used for exception arguments. For r2 it could be converted back to virtual address, but stay on the safe side and restore it from the stack instead. It should be live in the cache at that moment, so loading from the stack should make no difference compared to converting it from phys to virt. Fixes: f7354ccac844 ("powerpc/32: Remove CURRENT_THREAD_INFO and rename TI_CPU") Fixes: e2fb9f544431 ("powerpc/32: Prepare for Kernel Userspace Access Protection") Cc: stable@vger.kernel.org Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6d02c3ae6ad77af34392e98117e44c2bf6d13ba1.1580121710.git.christophe.leroy@c-s.fr commit fcfd7345209210ab309f4422a308bad3e1fa6b8c Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Jan 27 14:37:48 2020 +0000 MAINTAINERS: Correct path to time namespace source file According to reviews, Time Namespace source was moved from kernel/time_namespace.c to kernel/time/namespace.c between patchset versions, while the path in MAINTERNERS file wasn't adjusted properly. Correct it, so get_maintainer.pl produces a correct emails list again. Fixes: 769071ac9f20 ("ns: Introduce Time Namespace") Reported-by: Dmitry Vyukov Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200127143748.268515-1-dima@arista.com commit f76e4c167ea2212e23c15ee7e601a865e822c291 Author: Scott Branden Date: Mon Jan 27 16:38:28 2020 -0800 net: phy: add default ARCH_BCM_IPROC for MDIO_BCM_IPROC Add default MDIO_BCM_IPROC Kconfig setting such that it is default on for IPROC family of devices. Signed-off-by: Scott Branden Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 6cd021a58c18a1731f7e47f83e172c0c302d65e5 Author: Willem de Bruijn Date: Mon Jan 27 15:40:31 2020 -0500 udp: segment looped gso packets correctly Multicast and broadcast packets can be looped from egress to ingress pre segmentation with dev_loopback_xmit. That function unconditionally sets ip_summed to CHECKSUM_UNNECESSARY. udp_rcv_segment segments gso packets in the udp rx path. Segmentation usually executes on egress, and does not expect packets of this type. __udp_gso_segment interprets !CHECKSUM_PARTIAL as CHECKSUM_NONE. But the offsets are not correct for gso_make_checksum. UDP GSO packets are of type CHECKSUM_PARTIAL, with their uh->check set to the correct pseudo header checksum. Reset ip_summed to this type. (CHECKSUM_PARTIAL is allowed on ingress, see comments in skbuff.h) Reported-by: syzbot Fixes: cf329aa42b66 ("udp: cope with UDP GRO packet misdirection") Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit 3127642dc1d16124cdf175f8235e89bc2b63f424 Author: Stephen Hemminger Date: Mon Jan 27 06:40:36 2020 -0800 netem: change mailing list The old netem mailing list was inactive and recently was targeted by spammers. Switch to just using netdev mailing list which is where all the real change happens. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller commit 7faa26c1bbe312d9191524e4b7ab010f91fcd654 Author: Mohan Kumar Date: Tue Jan 28 10:45:08 2020 +0530 ALSA: hda: Reset stream if DMA RUN bit not cleared Tegra HDA has FIFO size which can hold upto 10 audio frames to support DVFS. When HDA DMA RUN bit is set to 0 to stop the stream, the DMA RUN bit will be cleared to 0 only after transferring all the remaining audio frames queued up in the fifo. This is not in sync with spec which states the controller will stop transmitting(output) in the beginning of the next frame for the relevant stream. The above behavior with Tegra HDA was resulting in machine check error during the system suspend flow with active audio playback with below kernel error logs. [ 33.524583] mc-err: [mcerr] (hda) csr_hdar: EMEM address decode error [ 33.531088] mc-err: [mcerr] status = 0x20000015; addr = 0x00000000 [ 33.537431] mc-err: [mcerr] secure: no, access-type: read, SMMU fault: none This was due to the fifo has more than one audio frame when the DMA RUN bit is set to 0 during system suspend flow and the timeout handling in snd_hdac_stream_sync() was not designed to handle this scenario. So the DMA will continue running even after timeout hit until all remaining audio frames in the fifo are transferred, but the suspend flow will try to reset the controller and turn off the hda clocks without the knowledge of the DMA is still running and could result in mc-err. The above issue can be resolved by doing stream reset with the help of snd_hdac_stream_reset() which would ensure the DMA RUN bit is cleared if the timeout was hit in snd_hdac_stream_sync(). Signed-off-by: Mohan Kumar Link: https://lore.kernel.org/r/20200128051508.26064-1-mkumard@nvidia.com Signed-off-by: Takashi Iwai commit 8d19f1c8e1937baf74e1962aae9f90fa3aeab463 Author: Mike Christie Date: Mon Nov 11 18:19:00 2019 -0600 prctl: PR_{G,S}ET_IO_FLUSHER to support controlling memory reclaim There are several storage drivers like dm-multipath, iscsi, tcmu-runner, amd nbd that have userspace components that can run in the IO path. For example, iscsi and nbd's userspace deamons may need to recreate a socket and/or send IO on it, and dm-multipath's daemon multipathd may need to send SG IO or read/write IO to figure out the state of paths and re-set them up. In the kernel these drivers have access to GFP_NOIO/GFP_NOFS and the memalloc_*_save/restore functions to control the allocation behavior, but for userspace we would end up hitting an allocation that ended up writing data back to the same device we are trying to allocate for. The device is then in a state of deadlock, because to execute IO the device needs to allocate memory, but to allocate memory the memory layers want execute IO to the device. Here is an example with nbd using a local userspace daemon that performs network IO to a remote server. We are using XFS on top of the nbd device, but it can happen with any FS or other modules layered on top of the nbd device that can write out data to free memory. Here a nbd daemon helper thread, msgr-worker-1, is performing a write/sendmsg on a socket to execute a request. This kicks off a reclaim operation which results in a WRITE to the nbd device and the nbd thread calling back into the mm layer. [ 1626.609191] msgr-worker-1 D 0 1026 1 0x00004000 [ 1626.609193] Call Trace: [ 1626.609195] ? __schedule+0x29b/0x630 [ 1626.609197] ? wait_for_completion+0xe0/0x170 [ 1626.609198] schedule+0x30/0xb0 [ 1626.609200] schedule_timeout+0x1f6/0x2f0 [ 1626.609202] ? blk_finish_plug+0x21/0x2e [ 1626.609204] ? _xfs_buf_ioapply+0x2e6/0x410 [ 1626.609206] ? wait_for_completion+0xe0/0x170 [ 1626.609208] wait_for_completion+0x108/0x170 [ 1626.609210] ? wake_up_q+0x70/0x70 [ 1626.609212] ? __xfs_buf_submit+0x12e/0x250 [ 1626.609214] ? xfs_bwrite+0x25/0x60 [ 1626.609215] xfs_buf_iowait+0x22/0xf0 [ 1626.609218] __xfs_buf_submit+0x12e/0x250 [ 1626.609220] xfs_bwrite+0x25/0x60 [ 1626.609222] xfs_reclaim_inode+0x2e8/0x310 [ 1626.609224] xfs_reclaim_inodes_ag+0x1b6/0x300 [ 1626.609227] xfs_reclaim_inodes_nr+0x31/0x40 [ 1626.609228] super_cache_scan+0x152/0x1a0 [ 1626.609231] do_shrink_slab+0x12c/0x2d0 [ 1626.609233] shrink_slab+0x9c/0x2a0 [ 1626.609235] shrink_node+0xd7/0x470 [ 1626.609237] do_try_to_free_pages+0xbf/0x380 [ 1626.609240] try_to_free_pages+0xd9/0x1f0 [ 1626.609245] __alloc_pages_slowpath+0x3a4/0xd30 [ 1626.609251] ? ___slab_alloc+0x238/0x560 [ 1626.609254] __alloc_pages_nodemask+0x30c/0x350 [ 1626.609259] skb_page_frag_refill+0x97/0xd0 [ 1626.609274] sk_page_frag_refill+0x1d/0x80 [ 1626.609279] tcp_sendmsg_locked+0x2bb/0xdd0 [ 1626.609304] tcp_sendmsg+0x27/0x40 [ 1626.609307] sock_sendmsg+0x54/0x60 [ 1626.609308] ___sys_sendmsg+0x29f/0x320 [ 1626.609313] ? sock_poll+0x66/0xb0 [ 1626.609318] ? ep_item_poll.isra.15+0x40/0xc0 [ 1626.609320] ? ep_send_events_proc+0xe6/0x230 [ 1626.609322] ? hrtimer_try_to_cancel+0x54/0xf0 [ 1626.609324] ? ep_read_events_proc+0xc0/0xc0 [ 1626.609326] ? _raw_write_unlock_irq+0xa/0x20 [ 1626.609327] ? ep_scan_ready_list.constprop.19+0x218/0x230 [ 1626.609329] ? __hrtimer_init+0xb0/0xb0 [ 1626.609331] ? _raw_spin_unlock_irq+0xa/0x20 [ 1626.609334] ? ep_poll+0x26c/0x4a0 [ 1626.609337] ? tcp_tsq_write.part.54+0xa0/0xa0 [ 1626.609339] ? release_sock+0x43/0x90 [ 1626.609341] ? _raw_spin_unlock_bh+0xa/0x20 [ 1626.609342] __sys_sendmsg+0x47/0x80 [ 1626.609347] do_syscall_64+0x5f/0x1c0 [ 1626.609349] ? prepare_exit_to_usermode+0x75/0xa0 [ 1626.609351] entry_SYSCALL_64_after_hwframe+0x44/0xa9 This patch adds a new prctl command that daemons can use after they have done their initial setup, and before they start to do allocations that are in the IO path. It sets the PF_MEMALLOC_NOIO and PF_LESS_THROTTLE flags so both userspace block and FS threads can use it to avoid the allocation recursion and try to prevent from being throttled while writing out data to free up memory. Signed-off-by: Mike Christie Acked-by: Michal Hocko Tested-by: Masato Suzuki Reviewed-by: Damien Le Moal Reviewed-by: Bart Van Assche Reviewed-by: Dave Chinner Reviewed-by: Darrick J. Wong Link: https://lore.kernel.org/r/20191112001900.9206-1-mchristi@redhat.com Signed-off-by: Christian Brauner commit 0cc4bd8f70d1ea2940295f1050508c663fe9eff9 Merge: 56ee04aa6328 31537cf8f3f9 Author: Ingo Molnar Date: Tue Jan 28 07:59:05 2020 +0100 Merge branch 'core/kprobes' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 74777eaf7aef0f80276cb1c3fad5b8292c368859 Merge: 872849789579 b2aa09178d11 Author: Ingo Molnar Date: Tue Jan 28 07:53:12 2020 +0100 Merge branch 'core/documentation' into core/urgent, to pick up single commit Signed-off-by: Ingo Molnar commit b0be0eff1a5ab77d588b76bd8b1c92d5d17b3f73 Merge: 3d3b44a61a9c a84de2fa962c Author: Linus Torvalds Date: Mon Jan 27 17:28:52 2020 -0800 Merge tag 'x86-pti-2020-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 pti updates from Thomas Gleixner: "The performance deterioration departement provides a few non-scary fixes and improvements: - Update the cached HLE state when the TSX state is changed via the new control register. This ensures feature bit consistency. - Exclude the new Zhaoxin CPUs from Spectre V2 and SWAPGS vulnerabilities" * tag 'x86-pti-2020-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/speculation/swapgs: Exclude Zhaoxin CPUs from SWAPGS vulnerability x86/speculation/spectre_v2: Exclude Zhaoxin CPUs from SPECTRE_V2 x86/cpu: Update cached HLE state on write to TSX_CTRL_CPUID_CLEAR commit 3d3b44a61a9cfd268fc071ea1b1c5dfea7ed133d Merge: ab67f600253f 43ee74487bd2 Author: Linus Torvalds Date: Mon Jan 27 17:22:21 2020 -0800 Merge tag 'irq-core-2020-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "The interrupt departement provides: - A mechanism to shield isolated tasks from managed interrupts: The affinity of managed interrupts is completely controlled by the kernel and user space has no influence on them. The reason is that the automatically assigned affinity correlates to the multi-queue CPU handling of block devices. If the generated affinity mask spaws both housekeeping and isolated CPUs the interrupt could be routed to an isolated CPU which would then be disturbed by I/O submitted by a housekeeping CPU. The new mechamism ensures that as long as one housekeeping CPU is online in the assigned affinity mask the interrupt is routed to a housekeeping CPU. If there is no online housekeeping CPU in the affinity mask, then the interrupt is routed to an isolated CPU to keep the device queue intact, but unless the isolated CPU submits I/O by itself these interrupts are not raised. - A small addon to the device tree irqdomain core code to avoid duplication in irq chip drivers - Conversion of the SiFive PLIC to hierarchical domains - The usual pile of new irq chip drivers: SiFive GPIO, Aspeed SCI, NXP INTMUX, Meson A1 GPIO - The first cut of support for the new ARM GICv4.1 - The usual pile of fixes and improvements in core and driver code" * tag 'irq-core-2020-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (33 commits) genirq, sched/isolation: Isolate from handling managed interrupts irqchip/gic-v4.1: Allow direct invalidation of VLPIs irqchip/gic-v4.1: Suppress per-VLPI doorbell irqchip/gic-v4.1: Add VPE INVALL callback irqchip/gic-v4.1: Add VPE eviction callback irqchip/gic-v4.1: Add VPE residency callback irqchip/gic-v4.1: Add mask/unmask doorbell callbacks irqchip/gic-v4.1: Plumb skeletal VPE irqchip irqchip/gic-v4.1: Implement the v4.1 flavour of VMOVP irqchip/gic-v4.1: Don't use the VPE proxy if RVPEID is set irqchip/gic-v4.1: Implement the v4.1 flavour of VMAPP irqchip/gic-v4.1: VPE table (aka GICR_VPROPBASER) allocation irqchip/gic-v3: Add GICv4.1 VPEID size discovery irqchip/gic-v3: Detect GICv4.1 supporting RVPEID irqchip/gic-v3-its: Fix get_vlpi_map() breakage with doorbells irqdomain: Fix a memory leak in irq_domain_push_irq() irqchip: Add NXP INTMUX interrupt multiplexer support dt-bindings: interrupt-controller: Add binding for NXP INTMUX interrupt multiplexer irqchip: Define EXYNOS_IRQ_COMBINER irqchip/meson-gpio: Add support for meson a1 SoCs ... commit ab67f600253f0f7b3992399918cf69e71b22ff37 Merge: e279160f4913 cb923159bbb8 Author: Linus Torvalds Date: Mon Jan 27 17:04:51 2020 -0800 Merge tag 'smp-core-2020-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core SMP updates from Thomas Gleixner: "A small set of SMP core code changes: - Rework the smp function call core code to avoid the allocation of an additional cpumask - Remove the not longer required GFP argument from on_each_cpu_cond() and on_each_cpu_cond_mask() and fixup the callers" * tag 'smp-core-2020-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: smp: Remove allocation mask from on_each_cpu_cond.*() smp: Add a smp_cond_func_t argument to smp_call_function_many() smp: Use smp_cond_func_t as type for the conditional function commit e279160f491392f1345f6eb4b0eeec5a6a2ecdd7 Merge: 534b0a8b6774 fd928f3e32ba Author: Linus Torvalds Date: Mon Jan 27 16:47:05 2020 -0800 Merge tag 'timers-core-2020-01-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "The timekeeping and timers departement provides: - Time namespace support: If a container migrates from one host to another then it expects that clocks based on MONOTONIC and BOOTTIME are not subject to disruption. Due to different boot time and non-suspended runtime these clocks can differ significantly on two hosts, in the worst case time goes backwards which is a violation of the POSIX requirements. The time namespace addresses this problem. It allows to set offsets for clock MONOTONIC and BOOTTIME once after creation and before tasks are associated with the namespace. These offsets are taken into account by timers and timekeeping including the VDSO. Offsets for wall clock based clocks (REALTIME/TAI) are not provided by this mechanism. While in theory possible, the overhead and code complexity would be immense and not justified by the esoteric potential use cases which were discussed at Plumbers '18. The overhead for tasks in the root namespace (ie where host time offsets = 0) is in the noise and great effort was made to ensure that especially in the VDSO. If time namespace is disabled in the kernel configuration the code is compiled out. Kudos to Andrei Vagin and Dmitry Sofanov who implemented this feature and kept on for more than a year addressing review comments, finding better solutions. A pleasant experience. - Overhaul of the alarmtimer device dependency handling to ensure that the init/suspend/resume ordering is correct. - A new clocksource/event driver for Microchip PIT64 - Suspend/resume support for the Hyper-V clocksource - The usual pile of fixes, updates and improvements mostly in the driver code" * tag 'timers-core-2020-01-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (71 commits) alarmtimer: Make alarmtimer_get_rtcdev() a stub when CONFIG_RTC_CLASS=n alarmtimer: Use wakeup source from alarmtimer platform device alarmtimer: Make alarmtimer platform device child of RTC device alarmtimer: Update alarmtimer_get_rtcdev() docs to reflect reality hrtimer: Add missing sparse annotation for __run_timer() lib/vdso: Only read hrtimer_res when needed in __cvdso_clock_getres() MIPS: vdso: Define BUILD_VDSO32 when building a 32bit kernel clocksource/drivers/hyper-v: Set TSC clocksource as default w/ InvariantTSC clocksource/drivers/hyper-v: Untangle stimers and timesync from clocksources clocksource/drivers/timer-microchip-pit64b: Fix sparse warning clocksource/drivers/exynos_mct: Rename Exynos to lowercase clocksource/drivers/timer-ti-dm: Fix uninitialized pointer access clocksource/drivers/timer-ti-dm: Switch to platform_get_irq clocksource/drivers/timer-ti-dm: Convert to devm_platform_ioremap_resource clocksource/drivers/em_sti: Fix variable declaration in em_sti_probe clocksource/drivers/em_sti: Convert to devm_platform_ioremap_resource clocksource/drivers/bcm2835_timer: Fix memory leak of timer clocksource/drivers/cadence-ttc: Use ttc driver as platform driver clocksource/drivers/timer-microchip-pit64b: Add Microchip PIT64B support clocksource/drivers/hyper-v: Reserve PAGE_SIZE space for tsc page ... commit 534b0a8b677443c0aa8c4c71ff7887f08a2b9b41 Merge: b11c89a158f2 35fd7a637c42 Author: Linus Torvalds Date: Mon Jan 27 16:45:58 2020 -0800 Merge tag 'core-debugobjects-2020-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull debugobjects update from Thomas Gleixner: "A single commit for debug objects which fixes a pile of potential data races detected by KCSAN" * tag 'core-debugobjects-2020-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Fix various data races commit b11c89a158f29a9b9d740f8f60b74f261ce6557f Merge: a56c41e5d766 11e31f608b49 Author: Linus Torvalds Date: Mon Jan 27 16:42:11 2020 -0800 Merge tag 'core-core-2020-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull watchdog updates from Thomas Gleixner: "A set of watchdog/softlockup related improvements: - Enforce that the watchdog timestamp is always valid on boot. The original implementation caused a watchdog disabled gap of one second in the boot process due to truncation of the underlying sched clock. The sched clock is divided by 1e9 to convert nanoseconds to seconds. So for the first second of the boot process the result is 0 which is at the same time the indicator to disable the watchdog. The trivial fix is to change the disabled indicator to ULONG_MAX. - Two cleanup patches removing unused and redundant code which got forgotten to be cleaned up in previous changes" * tag 'core-core-2020-01-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: watchdog/softlockup: Enforce that timestamp is valid on boot watchdog/softlockup: Remove obsolete check of last reported task watchdog: Remove soft_lockup_hrtimer_cnt and related code commit a56c41e5d766871231828046f477611d6ee7d2db Merge: b1dba2473114 9f24c540f7f8 Author: Linus Torvalds Date: Mon Jan 27 16:37:40 2020 -0800 Merge tag 'timers-urgent-2020-01-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "Two fixes for the generic VDSO code which missed 5.5: - Make the update to the coarse timekeeper unconditional. This is required because the coarse timekeeper interfaces in the VDSO do not depend on a VDSO capable clocksource. If the system does not have a VDSO capable clocksource and the update is depending on the VDSO capable clocksource, the coarse VDSO interfaces would operate on stale data forever. - Invert the logic of __arch_update_vdso_data() to avoid further head scratching. Tripped over this several times while analyzing the update problem above" * tag 'timers-urgent-2020-01-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: lib/vdso: Update coarse timekeeper unconditionally lib/vdso: Make __arch_update_vdso_data() logic understandable commit b1dba2473114588be3df916bf629a61bdcc83737 Merge: 07e309a972ca 98aa00345de5 Author: Linus Torvalds Date: Mon Jan 27 15:38:15 2020 -0800 Merge tag 'selinux-pr-20200127' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull SELinux update from Paul Moore: "This is one of the bigger SELinux pull requests in recent years with 28 patches. Everything is passing our test suite and the highlights are below: - Mark CONFIG_SECURITY_SELINUX_DISABLE as deprecated. We're some time away from actually attempting to remove this in the kernel, but the only distro we know that still uses it (Fedora) is working on moving away from this so we want to at least let people know we are planning to remove it. - Reorder the SELinux hooks to help prevent bad things when SELinux is disabled at runtime. The proper fix is to remove the CONFIG_SECURITY_SELINUX_DISABLE functionality (see above) and just take care of it at boot time (e.g. "selinux=0"). - Add SELinux controls for the kernel lockdown functionality, introducing a new SELinux class/permissions: "lockdown { integrity confidentiality }". - Add a SELinux control for move_mount(2) that reuses the "file { mounton }" permission. - Improvements to the SELinux security label data store lookup functions to speed up translations between our internal label representations and the visible string labels (both directions). - Revisit a previous fix related to SELinux inode auditing and permission caching and do it correctly this time. - Fix the SELinux access decision cache to cleanup properly on error. In some extreme cases this could limit the cache size and result in a decrease in performance. - Enable SELinux per-file labeling for binderfs. - The SELinux initialized and disabled flags were wrapped with accessors to ensure they are accessed correctly. - Mark several key SELinux structures with __randomize_layout. - Changes to the LSM build configuration to only build security/lsm_audit.c when needed. - Changes to the SELinux build configuration to only build the IB object cache when CONFIG_SECURITY_INFINIBAND is enabled. - Move a number of single-caller functions into their callers. - Documentation fixes (/selinux -> /sys/fs/selinux). - A handful of cleanup patches that aren't worth mentioning on their own, the individual descriptions have plenty of detail" * tag 'selinux-pr-20200127' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: (28 commits) selinux: fix regression introduced by move_mount(2) syscall selinux: do not allocate ancillary buffer on first load selinux: remove redundant allocation and helper functions selinux: remove redundant selinux_nlmsg_perm selinux: fix wrong buffer types in policydb.c selinux: reorder hooks to make runtime disable less broken selinux: treat atomic flags more carefully selinux: make default_noexec read-only after init selinux: move ibpkeys code under CONFIG_SECURITY_INFINIBAND. selinux: remove redundant msg_msg_alloc_security Documentation,selinux: fix references to old selinuxfs mount point selinux: deprecate disabling SELinux and runtime selinux: allow per-file labelling for binderfs selinuxfs: use scnprintf to get real length for inode selinux: remove set but not used variable 'sidtab' selinux: ensure the policy has been loaded before reading the sidtab stats selinux: ensure we cleanup the internal AVC counters on error in avc_update() selinux: randomize layout of key structures selinux: clean up selinux_enabled/disabled/enforcing_boot selinux: remove unnecessary selinux cred request ... commit 07e309a972cae9de1807f48968f4673f6868e211 Merge: 03aa8c8cfaec cb5172d96d16 Author: Linus Torvalds Date: Mon Jan 27 15:35:50 2020 -0800 Merge tag 'audit-pr-20200127' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit update from Paul Moore: "One small audit patch for the Linux v5.6 merge window, and unsurprisingly it passes our test suite with flying colors" * tag 'audit-pr-20200127' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: Add __rcu annotation to RCU pointer commit 03aa8c8cfaec1aab6b1ea7fde656bbc893f6cff8 Merge: 16d06120d73a 9ea37e24d4a9 Author: Linus Torvalds Date: Mon Jan 27 15:18:25 2020 -0800 Merge branch 'for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup updates from Tejun Heo: - cgroup2 interface for hugetlb controller. I think this was the last remaining bit which was missing from cgroup2 - fixes for race and a spurious warning in threaded cgroup handling - other minor changes * 'for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: iocost: Fix iocost_monitor.py due to helper type mismatch cgroup: Prevent double killing of css when enabling threaded cgroup cgroup: fix function name in comment mm: hugetlb controller for cgroups v2 commit 16d06120d73acde39ac0d5e3c539b4f407e9e588 Merge: 6a1000bd2703 e8ab20d9bcb3 Author: Linus Torvalds Date: Mon Jan 27 15:16:52 2020 -0800 Merge branch 'for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue updates from Tejun Heo: "Just a couple tracepoint patches" * 'for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: remove workqueue_work event class workqueue: add worker function to workqueue_execute_end tracepoint commit 848f7e1887c46f21679c2c12b9e8022f17750721 Author: Jens Axboe Date: Thu Jan 23 15:33:32 2020 -0700 io-wq: make the io_wq ref counted In preparation for sharing an io-wq across different users, add a reference count that manages destruction of it. Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 34719de919af07682861cb0fa2bcf64da33ecf44 Author: Geert Uytterhoeven Date: Sun Jan 12 18:13:49 2020 +0100 rtc: i2c/spi: Avoid inclusion of REGMAP support when not needed Merely enabling I2C and RTC selects REGMAP_I2C and REGMAP_SPI, even when no driver needs it. While the former can be moduler, the latter cannot, and thus becomes built-in. Fix this by moving the select statements for REGMAP_I2C and REGMAP_SPI from the RTC_I2C_AND_SPI helper to the individual drivers that depend on it. Note that the comment for RTC_I2C_AND_SPI refers to SND_SOC_I2C_AND_SPI for more information, but the latter does not select REGMAP_{I2C,SPI} itself, and defers that to the individual drivers, too. Fixes: 080481f54ef62121 ("rtc: merge ds3232 and ds3234") Signed-off-by: Geert Uytterhoeven Reported-by: kbuild test robot Reported-by: kbuild test robot Link: https://lore.kernel.org/r/20200112171349.22268-1-geert@linux-m68k.org Signed-off-by: Alexandre Belloni commit 9466f43741bc08edd7b1bee642dd6f5561091634 Author: Pavel Begunkov Date: Sat Jan 25 22:34:01 2020 +0300 io_uring: fix refcounting with batched allocations at OOM In case of out of memory the second argument of percpu_ref_put_many() in io_submit_sqes() may evaluate into "nr - (-EAGAIN)", that is clearly wrong. Fixes: 2b85edfc0c90 ("io_uring: batch getting pcpu references") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 8cdf2193a3335b4cfb6e023b41ac293d0843d287 Author: Pavel Begunkov Date: Sat Jan 25 00:40:24 2020 +0300 io_uring: add comment for drain_next Draining the middle of a link is tricky, so leave a comment there Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 980ad26304abf11e78caaa68023411b9c088b848 Author: Jens Axboe Date: Fri Jan 24 23:08:54 2020 -0700 io_uring: don't attempt to copy iovec for READ/WRITE For the non-vectored variant of READV/WRITEV, we don't need to setup an async io context, and we flag that appropriately in the io_op_defs array. However, in fixing this for the 5.5 kernel in commit 74566df3a71c we didn't have these opcodes, so the check there was added just for the READ_FIXED and WRITE_FIXED opcodes. Replace that check with just a single check for needing async context, that covers all four of these read/write variants that don't use an iovec. Signed-off-by: Jens Axboe commit 578c2b661e2b1b474ea3571a3c3c6d57bae89e8d Author: Alexandre Belloni Date: Mon Jan 27 23:17:24 2020 +0100 rtc: Kconfig: select REGMAP_I2C when necessary Some i2c RTC drivers are using regmap but are not selecting REGMAP_I2C which may lead to build failures. Link: https://lore.kernel.org/r/20200127221724.10160-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit c68209410752117fd0b11d88ca514563878f64aa Author: Alexandre Belloni Date: Mon Jan 27 23:17:23 2020 +0100 rtc: Kconfig: properly indent sd3078 entry The RTC_DRV_SD3078 is indented using spaces, use tabs instead. Link: https://lore.kernel.org/r/20200127221724.10160-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit f61023dfb6d489cc4dfa235d3f02a9feb6f1ec7e Author: Benjamin Gaignard Date: Mon Jan 27 14:07:04 2020 -0800 dt-bindings: touchscreen: Convert Goodix touchscreen to json-schema Convert the Goodix binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200108091118.5130-3-benjamin.gaignard@st.com Signed-off-by: Dmitry Torokhov commit 1d6204e2f51fcef7dd174e7703294fa0abbc0740 Author: Benjamin Gaignard Date: Mon Jan 27 14:06:32 2020 -0800 dt-bindings: touchscreen: Add touchscreen schema Add touchscreen schema for common properties Signed-off-by: Benjamin Gaignard Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200108091118.5130-2-benjamin.gaignard@st.com Signed-off-by: Dmitry Torokhov commit 269a0bf79b3346fbebe7f62aef516ce61c2f02d0 Author: Colin Ian King Date: Sat Jan 25 20:26:13 2020 +0000 drm/amd/powerplay: fix spelling mistake "Attemp" -> "Attempt" There are several spelling mistakes in PP_ASSERT_WITH_CODE messages. Fix these. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 54f73df4cab18734b71a4325feb4749d334dc877 Author: Colin Ian King Date: Fri Jan 17 13:33:05 2020 +0000 drm/amd/display: fix for-loop with incorrectly sized loop counter (v2) A for-loop is iterating from 0 up to 1000 however the loop variable count is a u8 and hence not large enough. Fix this by making count an int. Also remove the redundant initialization of count since this is never used and add { } on the loop statement make the loop block clearer. v2: drop useless else (Walter Harms) Addresses-Coverity: ("Operands don't affect result") Fixes: ed581a0ace44 ("drm/amd/display: wait for update when setting dpg test pattern") Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 2cb44fb09305e23fe60dbfcccad3f8c4028749f1 Author: Alex Deucher Date: Mon Jan 27 14:35:10 2020 -0500 drm/amdgpu: enable GPU reset by default on renoir Everything is in place. Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 658c663947b04b1f8a2fd061a3ef767983c880e5 Author: Alex Deucher Date: Mon Jan 27 14:31:49 2020 -0500 drm/amdgpu: enable GPU reset by default on Navi Has been working fine for a while. Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit bb67bfd2e7101bf2ac5327b0b7a847cd9fb9723f Author: Dor Askayo Date: Sat Jan 4 14:22:15 2020 +0200 drm/amd/display: do not allocate display_mode_lib unnecessarily This allocation isn't required and can fail when resuming from suspend. Bug: https://gitlab.freedesktop.org/drm/amd/issues/1009 Signed-off-by: Dor Askayo Reviewed-by: Leo Li Signed-off-by: Alex Deucher commit 77171eade8faa713c1104b29ea7ff96915ecf9fb Author: Christian König Date: Thu Jan 16 14:06:59 2020 +0100 drm/amdgpu: add coreboot workaround for KV/KB Coreboot seems to have a problem correctly setting up access to the stolen VRAM on KV/KB. Use the direct access only when necessary. Signed-off-by: Christian König Reported-and-tested-by: Fredrik Bruhn Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit da2f84ba73df11186cf23bec45d039f3b9162bd8 Author: Harry Wentland Date: Tue Jan 21 16:29:54 2020 -0500 Revert "drm/amd/display: Don't skip link training for empty dongle" This reverts commit 80adaebd2d411b7d6872a097634848a71eb13d20. [WHY] This change was working around a regression that occured in this: commit 0301ccbaf67d ("drm/amd/display: DP Compliance 400.1.1 failure") With the fix to run verify_link_cap when the SINK_COUNT of dongles becomes non-zero this change is no longer needed. Cc: Louis Li Cc: Wenjing Liu Cc: Hersen Wu Cc: Eric Yang Reviewed-by: Wenjing Liu Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher commit 3eb6d7aca53d81ce888624f09cd44dc0302161e8 Author: Harry Wentland Date: Tue Jan 21 16:12:45 2020 -0500 drm/amd/display: Retrain dongles when SINK_COUNT becomes non-zero [WHY] Two years ago the patch referenced by the Fixes tag stopped running dp_verify_link_cap_with_retries during DP detection when the reason for the detection was a short-pulse interrupt. This effectively meant that we were no longer doing the verify_link_cap training on active dongles when their SINK_COUNT changed from 0 to 1. A year ago this was partly remedied with: commit 80adaebd2d41 ("drm/amd/display: Don't skip link training for empty dongle") This made sure that we trained the dongle on initial hotplug (without connected downstream devices). This is all fine and dandy if it weren't for the fact that there are some dongles on the market that don't like link training when SINK_COUNT is 0 These dongles will in fact indicate a SINK_COUNT of 0 immediately after hotplug, even when a downstream device is connected, and then trigger a shortpulse interrupt indicating a SINK_COUNT change to 1. In order to play nicely we will need our policy to not link train an active DP dongle when SINK_COUNT is 0 but ensure we train it when the SINK_COUNT changes to 1. [HOW] Call dp_verify_link_cap_with_retries on detection even when the detection is triggered from a short pulse interrupt. With this change we can also revert this commit which we'll do in a separate follow-up change: commit 80adaebd2d41 ("drm/amd/display: Don't skip link training for empty dongle") Fixes: 0301ccbaf67d ("drm/amd/display: DP Compliance 400.1.1 failure") Suggested-by: Louis Li Tested-by: Louis Li Cc: Wenjing Liu Cc: Hersen Wu Cc: Eric Yang Reviewed-by: Wenjing Liu Signed-off-by: Harry Wentland Signed-off-by: Alex Deucher commit 276cc92945ab4af02d8bedce18b4b6f87b9c1609 Author: Alex Deucher Date: Wed Jan 15 12:56:37 2020 -0500 drm/amdgpu: original raven doesn't support full asic reset So don't use it. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7af2a5771e0918cdadb1614c1f81dd67a58e00aa Author: Alex Deucher Date: Wed Jan 15 12:26:51 2020 -0500 drm/amdgpu: attempt to enable gfxoff on more raven1 boards (v2) Switch to a blacklist so we can disable specific boards that are problematic. v2: make the blacklist non-raven specific. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b20dcd72c150d82c56682606202f3f028403e581 Author: Colin Ian King Date: Thu Jan 23 00:22:16 2020 +0000 drm/amd/amdgpu: fix spelling mistake "to" -> "too" There is a spelling mistake in a DRM_ERROR message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit a16afcdd8c58285e83951ce318b55eafb7948997 Author: zhengbin Date: Wed Jan 22 15:53:11 2020 +0800 drm/amd/powerplay: use true, false for bool variable in smu7_hwmgr.c Fixes coccicheck warning: drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:723:2-50: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:733:3-52: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:747:3-51: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 2639f453f28e71dc4149fb06c71bcf6f93eb468f Author: Nirmoy Das Date: Wed Jan 22 10:37:56 2020 +0100 drm/amdgpu: fix doc by clarifying sched_list definition expand sched_list definition for better understanding. Also fix a typo atleast -> at least Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit f583cc57ba70afdd02e36b0ada3790e8bf4fb10f Author: xinhui pan Date: Wed Jan 22 11:03:30 2020 +0800 drm/amdgpu: initialize bo_va_list when add gws to process bo_va_list is list_head, so initialize it. Signed-off-by: xinhui pan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 55bbb747ecfa39806198419e96e7bc2c44221d4e Author: James Zhu Date: Tue Jan 21 16:33:21 2020 -0500 drm/amdgpu/vcn: use inst_idx relacing inst Use inst_idx relacing inst in SOC15_DPG_MODE macro to avoid confusion. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit a4555732142e96855c854fa7b2a65035044391b3 Author: James Zhu Date: Tue Jan 21 16:28:07 2020 -0500 drm/amdgpu/vcn: fix typo error Fix typo error, should be inst_idx instead of inst. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 326b523eeb521368fd1566c8ceeddf04a68cb01e Author: James Zhu Date: Mon Jan 20 21:44:07 2020 -0500 drm/amdgpu/vcn: fix vcn2.5 instance issue Fix vcn2.5 instance issue, vcn0 and vcn1 have same register offset Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 62884a7bf34379b2cacd391c510cb9d852b36560 Author: James Zhu Date: Mon Jan 20 15:47:35 2020 -0500 drm/amdgpu/vcn2.5: fix a bug for the 2nd vcn instance (v2) Fix a bug for the 2nd vcn instance at start and stop. v2: squash in unused label removal. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit b6501217265f770957548eec818f6c08aa1ef6a1 Author: James Zhu Date: Mon Jan 20 15:43:04 2020 -0500 drm/amdgpu/vcn: Share vcn_v2_0_dec_ring_test_ring to vcn2.5 Share vcn_v2_0_dec_ring_test_ring to vcn2.5 to support vcn software ring. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit fa34edbed46178545285fd080c8d4d3fbc8fbc71 Author: Felix Kuehling Date: Fri Jan 17 20:08:42 2020 -0500 drm/amdgpu: Use the correct flush_type in flush_gpu_tlb_pasid The flush_type was incorrectly hard-coded to 0 when calling falling back to MMIO-based invalidation in flush_gpu_tlb_pasid. Fixes: ea930000a6dc ("drm/amdgpu: export function to flush TLB via pasid") Signed-off-by: Felix Kuehling Reviewed-by: Christian König Reviewed-by: Oak Zeng Signed-off-by: Alex Deucher commit 37c58ddf57364d1a636850bb8ba6acbe1e16195e Author: Felix Kuehling Date: Fri Jan 17 19:54:45 2020 -0500 drm/amdgpu: Fix TLB invalidation request when using semaphore Use a more meaningful variable name for the invalidation request that is distinct from the tmp variable that gets overwritten when acquiring the invalidation semaphore. Fixes: 4ed8a03740d0 ("drm/amdgpu: invalidate mmhub semaphore workaround in gmc9/gmc10") Signed-off-by: Felix Kuehling Reviewed-by: Christian König Reviewed-by: Yong Zhao Signed-off-by: Alex Deucher commit 1630146db2111412e7524d05d812ff8f2c75977e Author: Geert Uytterhoeven Date: Mon Jan 27 10:31:07 2020 +0100 scripts/find-unused-docs: Fix massive false positives scripts/find-unused-docs.sh invokes scripts/kernel-doc to find out if a source file contains kerneldoc or not. However, as it passes the no longer supported "-text" option to scripts/kernel-doc, the latter prints out its help text, causing all files to be considered containing kerneldoc. Get rid of these false positives by removing the no longer supported "-text" option from the scripts/kernel-doc invocation. Cc: stable@vger.kernel.org # 4.16+ Fixes: b05142675310d2ac ("scripts: kernel-doc: get rid of unused output formats") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200127093107.26401-1-geert+renesas@glider.be Signed-off-by: Jonathan Corbet commit 6a1000bd27035bba17ede9dc915166276a811edb Merge: 9dd70e2880b8 4bdc0d676a64 Author: Linus Torvalds Date: Mon Jan 27 13:03:00 2020 -0800 Merge tag 'ioremap-5.6' of git://git.infradead.org/users/hch/ioremap Pull ioremap updates from Christoph Hellwig: "Remove the ioremap_nocache API (plus wrappers) that are always identical to ioremap" * tag 'ioremap-5.6' of git://git.infradead.org/users/hch/ioremap: remove ioremap_nocache and devm_ioremap_nocache MIPS: define ioremap_nocache to ioremap commit 9dd70e2880b8c8386097de51564c60352b3e4070 Merge: 22a8f39c520f 7e053d3e820b Author: Linus Torvalds Date: Mon Jan 27 12:57:17 2020 -0800 Merge tag 'for-5.6/libata-2020-01-27' of git://git.kernel.dk/linux-block Pull libata updates from Jens Axboe: "As usual pretty quiet, mostly trivial fixes (or dead code removal), outside of various fixes for ahci_bcrm" * tag 'for-5.6/libata-2020-01-27' of git://git.kernel.dk/linux-block: ata/acard_ahci: remove unused variable n_elem ata: pata_macio: fix comparing pointer to 0 ata: ahci_brcm: BCM7216 reset is self de-asserting ata: ahci_brcm: Perform reset after obtaining resources ata: brcm: fix reset controller API usage ata: brcm: mark PM functions as __maybe_unused ata: ahci_brcm: Support BCM7216 reset controller name dt-bindings: ata: Document BCM7216 AHCI controller compatible ata: ahci_brcm: Add a shutdown callback ata: ahci_brcm: Manage reset line during suspend/resume commit 22a8f39c520fc577c02b4e5c99f8bb3b6017680b Merge: 48b4b4ff1ee0 e3de04469a49 Author: Linus Torvalds Date: Mon Jan 27 12:55:48 2020 -0800 Merge tag 'for-5.6/drivers-2020-01-27' of git://git.kernel.dk/linux-block Pull block driver updates from Jens Axboe: "Like the core side, not a lot of changes here, just two main items: - Series of patches (via Coly) with fixes for bcache (Coly, Christoph) - MD pull request from Song" * tag 'for-5.6/drivers-2020-01-27' of git://git.kernel.dk/linux-block: (31 commits) bcache: reap from tail of c->btree_cache in bch_mca_scan() bcache: reap c->btree_cache_freeable from the tail in bch_mca_scan() bcache: remove member accessed from struct btree bcache: print written and keys in trace_bcache_btree_write bcache: avoid unnecessary btree nodes flushing in btree_flush_write() bcache: add code comments for state->pool in __btree_sort() lib: crc64: include for 'crc64_be' bcache: use read_cache_page_gfp to read the superblock bcache: store a pointer to the on-disk sb in the cache and cached_dev structures bcache: return a pointer to the on-disk sb from read_super bcache: transfer the sb_page reference to register_{bdev,cache} bcache: fix use-after-free in register_bcache() bcache: properly initialize 'path' and 'err' in register_bcache() bcache: rework error unwinding in register_bcache bcache: use a separate data structure for the on-disk super block bcache: cached_dev_free needs to put the sb page md/raid1: introduce wait_for_serialization md/raid1: use bucket based mechanism for IO serialization md: introduce a new struct for IO serialization md: don't destroy serial_info_pool if serialize_policy is true ... commit ea660ad7c1c476fd6e5e3b17780d47159db71dea Author: Håkon Bugge Date: Thu Jan 23 16:55:21 2020 +0100 IB/mlx4: Fix leak in id_map_find_del Using CX-3 virtual functions, either from a bare-metal machine or pass-through from a VM, MAD packets are proxied through the PF driver. Since the VF drivers have separate name spaces for MAD Transaction Ids (TIDs), the PF driver has to re-map the TIDs and keep the book keeping in a cache. Following the RDMA Connection Manager (CM) protocol, it is clear when an entry has to evicted from the cache. When a DREP is sent from mlx4_ib_multiplex_cm_handler(), id_map_find_del() is called. Similar when a REJ is received by the mlx4_ib_demux_cm_handler(), id_map_find_del() is called. This function wipes out the TID in use from the IDR or XArray and removes the id_map_entry from the table. In short, it does everything except the topping of the cake, which is to remove the entry from the list and free it. In other words, for the REJ case enumerated above, one id_map_entry will be leaked. For the other case above, a DREQ has been received first. The reception of the DREQ will trigger queuing of a delayed work to delete the id_map_entry, for the case where the VM doesn't send back a DREP. In the normal case, the VM _will_ send back a DREP, and id_map_find_del() will be called. But this scenario introduces a secondary leak. First, when the DREQ is received, a delayed work is queued. The VM will then return a DREP, which will call id_map_find_del(). As stated above, this will free the TID used from the XArray or IDR. Now, there is window where that particular TID can be re-allocated, lets say by an outgoing REQ. This TID will later be wiped out by the delayed work, when the function id_map_ent_timeout() is called. But the id_map_entry allocated by the outgoing REQ will not be de-allocated, and we have a leak. Both leaks are fixed by removing the id_map_find_del() function and only using schedule_delayed(). Of course, a check in schedule_delayed() to see if the work already has been queued, has been added. Another benefit of always using the delayed version for deleting entries, is that we do get a TimeWait effect; a TID no longer in use, will occupy the XArray or IDR for CM_CLEANUP_CACHE_TIMEOUT time, without any ability of being re-used for that time period. Fixes: 3cf69cc8dbeb ("IB/mlx4: Add CM paravirtualization") Link: https://lore.kernel.org/r/20200123155521.1212288-1-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge Signed-off-by: Manjunath Patil Reviewed-by: Rama Nichanamatlu Reviewed-by: Jack Morgenstein Signed-off-by: Jason Gunthorpe commit 48b4b4ff1ee044a977929bcf80e79f8212f756b4 Merge: 34dabd81160f 5336da37a5ea Author: Linus Torvalds Date: Mon Jan 27 12:38:25 2020 -0800 Merge tag 'for-5.6/block-2020-01-27' of git://git.kernel.dk/linux-block Pull core block updates from Jens Axboe: "This may be the most quiet round we've had in years. I'm not complaining. Really not a lot to detail here, outside of spelling and documentation improvements/fixes, we have: - Allow t10-pi to be modular (Herbert) - Remove dead code in bfq (Alex) - Mark zone management requests with REQ_SYNC (Chaitanya) - BFQ division improvement (Wen) - Small series improving plugging (Pavel)" * tag 'for-5.6/block-2020-01-27' of git://git.kernel.dk/linux-block: partitions/ldm: fix spelling mistake "to" -> "too" block, bfq: improve arithmetic division in bfq_delta() block/bfq: remove unused bfq_class_rt which never used block: mark zone-mgmt bios with REQ_SYNC blk-mq: Document functions for sending request block: Allow t10-pi to be modular blk-mq: optimise blk_mq_flush_plug_list() list: introduce list_for_each_continue() blk-mq: optimise rq sort function commit 34dabd81160f7bfb18b67c1161b3c4d7ca6cab83 Merge: 85c009e8e5d2 786c87cd312a Author: Linus Torvalds Date: Mon Jan 27 12:04:48 2020 -0800 Merge tag 'pnp-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull PNP updates from Rafael Wysocki: "Get rid of unused variable and function (yu kuai)" * tag 'pnp-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PNP: isapnp: remove defined but not used function 'isapnp_checksum' PNP: isapnp: remove set but not used variable 'checksum' commit 85c009e8e5d2794e2efb1019e3648f3d8126f1b5 Merge: 55816dc1a504 aa811e3cecec Author: Linus Torvalds Date: Mon Jan 27 11:57:40 2020 -0800 Merge tag 'devprop-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework updates from Rafael Wysocki: "Add support for reference properties in sofrware nodes (Dmitry Torokhov) and a basic test for property entries along with fixes on top of it (Dmitry Torokhov, Qian Cai, Alan Maguire)" * tag 'devprop-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: software node: introduce CONFIG_KUNIT_DRIVER_PE_TEST usb: dwc3: use proper initializers for property entries drivers/base/test: fix global-out-of-bounds error software node: add basic tests for property entries software node: remove separate handling of references platform/x86: intel_cht_int33fe: use inline reference properties software node: implement reference properties software node: allow embedding of small arrays into property_entry software node: replace is_array with is_inline commit 47ace7e012b9f7ad71d43ac9063d335ea3d6820b Author: Mike Snitzer Date: Mon Jan 27 14:07:23 2020 -0500 dm: fix potential for q->make_request_fn NULL pointer Move blk_queue_make_request() to dm.c:alloc_dev() so that q->make_request_fn is never NULL during the lifetime of a DM device (even one that is created without a DM table). Otherwise generic_make_request() will crash simply by doing: dmsetup create -n test mount /dev/dm-N /mnt While at it, move ->congested_data initialization out of dm.c:alloc_dev() and into the bio-based specific init method. Reported-by: Stefan Bader BugLink: https://bugs.launchpad.net/bugs/1860231 Fixes: ff36ab34583a ("dm: remove request-based logic from make_request_fn wrapper") Depends-on: c12c9a3c3860c ("dm: various cleanups to md->queue initialization code") Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit 55816dc1a50463ec0ea45954e87ec3dff70e2863 Merge: 6d277aca488f ca11abf11347 Author: Linus Torvalds Date: Mon Jan 27 11:48:47 2020 -0800 Merge tag 'acpi-5.6-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 (20200110), add new hardware support to a handful of ACPI drivers, make the ACPI fan driver expose power states information for fans, add some more quirks, fix bugs and clean up assorted things. Specifics: - Update the ACPICA code in the kernel to upstream revision 20200110 including: - Update of copyright notices to 2020 (Bob Moore). - Dispatcher fix to always generate buffer objects for the ASL create_field() operator (Maximilian Luz). - Debugger cleanup (Colin Ian King). - Disassembler change to create buffer fields in ACPI_PARSE_LOAD_PASS1 (Erik Kaneda). - UNIX line ending support for non-windows builds in acpisrc (Erik Kaneda). - Update the list of ACPICA maintainers (Rafael Wysocki). - Add Intel Tiger Lake ACPI device IDs to the ACPI DPTF, ACPI fan, int340x_thermal and intel-hid drivers (Gayatri Kammela). - Make the ACPI fan driver create additional sysfs attributes to expose power states information for fans (Srinivas Pandruvada). - Fix up the ACPI battery driver to deal with unexpected battery capacity information in a better way (Hans de Goede). - Add ACPI backlight quirks for Lenovo E41-25/45 and MSI MS-7721 boards (Aaron Ma, Hans de Goede). - Add DMI quirk for Razer Blade Stealth 13 late 2019 lid switch to the ACPI button driver (Jason Ekstrand). - Drop TIMER_DEFERRABLE from the GHES polling mode timer function flags to make it run precisely at the configured time (Bhaskar Upadhaya). - Fix race condition related to the reference counting of query handlers in the ACPI EC driver (Rafael Wysocki). - Fix ACPI tools build issue (Zhengyuan Liu). - Replace dma_request_slave_channel() with dma_request_chan() in the firmware guide documentation for ACPI (Peter Ujfalusi). - Fix typo in a comment and clean up function parameter data type inconsistencies (Kacper Piwiński, Tian Tao)" * tag 'acpi-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (25 commits) ACPICA: Update version to 20200110 ACPICA: All acpica: Update copyrights to 2020 Including tool signons. apei/ghes: Do not delay GHES polling ACPI: button: Add DMI quirk for Razer Blade Stealth 13 late 2019 lid switch ACPI: PPTT: Consistently use unsigned int as parameter type ACPI: EC: Reference count query handlers under lock ACPICA: Update the list of maintainers ACPICA: Update version to 20191213 ACPICA: Dispatcher: always generate buffer objects for ASL create_field() operator ACPICA: acpisrc: add unix line ending support for non-windows build ACPICA: Disassembler: create buffer fields in ACPI_PARSE_LOAD_PASS1 ACPICA: debugger: fix spelling mistake "adress" -> "address" ACPI: video: Do not export a non working backlight interface on MSI MS-7721 boards docs: firmware-guide: ACPI: Replace dma_request_slave_channel() with dma_request_chan() thermal: int340x_thermal: Add Tiger Lake ACPI device IDs platform/x86: intel-hid: Add Tiger Lake ACPI device ID ACPI: fan: Add Tiger Lake ACPI device ID ACPI: DPTF: Add Tiger Lake ACPI device IDs ACPI: fan: Expose fan performance state information tools/power/acpi: fix compilation error ... commit 6d277aca488fdf0a1e67cd14b5a58869f66197c9 Merge: aae1464f46a2 c102671af085 Author: Linus Torvalds Date: Mon Jan 27 11:23:54 2020 -0800 Merge tag 'pm-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These add ACPI support to the intel_idle driver along with an admin guide document for it, add support for CPR (Core Power Reduction) to the AVS (Adaptive Voltage Scaling) subsystem, add new hardware support in a few places, add some new sysfs attributes, debugfs files and tracepoints, fix bugs and clean up a bunch of things all over. Specifics: - Update the ACPI processor driver in order to export acpi_processor_evaluate_cst() to the code outside of it, add ACPI support to the intel_idle driver based on that and clean up that driver somewhat (Rafael Wysocki). - Add an admin guide document for the intel_idle driver (Rafael Wysocki). - Clean up cpuidle core and drivers, enable compilation testing for some of them (Benjamin Gaignard, Krzysztof Kozlowski, Rafael Wysocki, Yangtao Li). - Fix reference counting of OPP (operating performance points) table structures (Viresh Kumar). - Add support for CPR (Core Power Reduction) to the AVS (Adaptive Voltage Scaling) subsystem (Niklas Cassel, Colin Ian King, YueHaibing). - Add support for TigerLake Mobile and JasperLake to the Intel RAPL power capping driver (Zhang Rui). - Update cpufreq drivers: - Add i.MX8MP support to imx-cpufreq-dt (Anson Huang). - Fix usage of a macro in loongson2_cpufreq (Alexandre Oliva). - Fix cpufreq policy reference counting issues in s3c and brcmstb-avs (chenqiwu). - Fix ACPI table reference counting issue and HiSilicon quirk handling in the CPPC driver (Hanjun Guo). - Clean up spelling mistake in intel_pstate (Harry Pan). - Convert the kirkwood and tegra186 drivers to using devm_platform_ioremap_resource() (Yangtao Li). - Update devfreq core: - Add 'name' sysfs attribute for devfreq devices (Chanwoo Choi). - Clean up the handing of transition statistics and allow them to be reset by writing 0 to the 'trans_stat' devfreq device attribute in sysfs (Kamil Konieczny). - Add 'devfreq_summary' to debugfs (Chanwoo Choi). - Clean up kerneldoc comments and Kconfig indentation (Krzysztof Kozlowski, Randy Dunlap). - Update devfreq drivers: - Add dynamic scaling for the imx8m DDR controller and clean up imx8m-ddrc (Leonard Crestez, YueHaibing). - Fix DT node reference counting and nitialization error code path in rk3399_dmc and add COMPILE_TEST and HAVE_ARM_SMCCC dependency for it (Chanwoo Choi, Yangtao Li). - Fix DT node reference counting in rockchip-dfi and make it use devm_platform_ioremap_resource() (Yangtao Li). - Fix excessive stack usage in exynos-ppmu (Arnd Bergmann). - Fix initialization error code paths in exynos-bus (Yangtao Li). - Clean up exynos-bus and exynos somewhat (Artur Świgoń, Krzysztof Kozlowski). - Add tracepoints for tracking usage_count updates unrelated to status changes in PM-runtime (Michał Mirosław). - Add sysfs attribute to control the "sync on suspend" behavior during system-wide suspend (Jonas Meurer). - Switch system-wide suspend tests over to 64-bit time (Alexandre Belloni). - Make wakeup sources statistics in debugfs cover deleted ones which used to be the case some time ago (zhuguangqing). - Clean up computations carried out during hibernation, update messages related to hibernation and fix a spelling mistake in one of them (Wen Yang, Luigi Semenzato, Colin Ian King). - Add mailmap entry for maintainer e-mail address that has not been functional for several years (Rafael Wysocki)" * tag 'pm-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (83 commits) cpufreq: loongson2_cpufreq: adjust cpufreq uses of LOONGSON_CHIPCFG intel_idle: Clean up irtl_2_usec() intel_idle: Move 3 functions closer to their callers intel_idle: Annotate initialization code and data structures intel_idle: Move and clean up intel_idle_cpuidle_devices_uninit() intel_idle: Rearrange intel_idle_cpuidle_driver_init() intel_idle: Clean up NULL pointer check in intel_idle_init() intel_idle: Fold intel_idle_probe() into intel_idle_init() intel_idle: Eliminate __setup_broadcast_timer() cpuidle: fix cpuidle_find_deepest_state() kerneldoc warnings cpuidle: sysfs: fix warnings when compiling with W=1 cpuidle: coupled: fix warnings when compiling with W=1 cpufreq: brcmstb-avs: fix imbalance of cpufreq policy refcount PM: suspend: Add sysfs attribute to control the "sync on suspend" behavior PM / devfreq: Add debugfs support with devfreq_summary file Documentation: admin-guide: PM: Add intel_idle document cpuidle: arm: Enable compile testing for some of drivers PM-runtime: add tracepoints for usage_count changes cpufreq: intel_pstate: fix spelling mistake: "Whethet" -> "Whether" PM: hibernate: fix spelling mistake "shapshot" -> "snapshot" ... commit 10c2d111c906599942efd13109061885631c4a0c Author: Alex Shi Date: Tue Jan 21 16:50:03 2020 +0800 security: remove EARLY_LSM_COUNT which never used This macro is never used from it was introduced in commit e6b1db98cf4d5 ("security: Support early LSMs"), better to remove it. Signed-off-by: Alex Shi Acked-by: Serge Hallyn Signed-off-by: James Morris commit aae1464f46a2403565f75717438118691d31ccf1 Merge: 1e1ab4ba4747 e4e4c2ff78ed Author: Linus Torvalds Date: Mon Jan 27 11:18:55 2020 -0800 Merge tag 'regulator-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "Hardly anything going on in the core this time around with the regulator API and pretty quiet on the driver front: - An API for comparing regulators, useful for devices that need to check if supply voltages exactly match rather than just nominally match. - Conversion of several DT bindings to YAML format. - Conversion of I2C drivers to probe_new(). - New drivers for Monolithic MPQ7920 and MP8859, and Rohm BD71828" * tag 'regulator-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (34 commits) dt-bindings: regulator: add document bindings for mpq7920 regulator: core: Fix exported symbols to the exported GPL version regulator: mpq7920: Fix incorrect defines regulator: vqmmc-ipq4019: Fix platform_no_drv_owner.cocci warnings regulator: vctrl-regulator: Avoid deadlock getting and setting the voltage regulator fix for "regulator: core: Add regulator_is_equal() helper" regulator: core: Add regulator_is_equal() helper regulator: mpq7920: Convert to use .probe_new regulator: mpq7920: Remove unneeded fields from struct mpq7920_regulator_info regulator: vqmmc-ipq4019: Trivial clean up regulator: vqmmc-ipq4019: Remove ipq4019_regulator_remove regulator: bindings: Drop document bindings for mpq7920 dt-bindings: Drop entry for Monolithic Power System, MPS regulator: bd718x7: Simplify the code by removing struct bd718xx_pmic_inits regulator: add IPQ4019 SDHCI VQMMC LDO driver regulator: Convert i2c drivers to use .probe_new regulator: mpq7920: Check the correct variable in mpq7920_regulator_register() regulator: mpq7920: Fix Woverflow warning on conversion regulator: mp8859: tidy up white space in probe regulator: mpq7920: add mpq7920 regulator driver ... commit 1e1ab4ba4747afad3e44a77dded1bab4cb77049e Merge: e83a0ed2a6a3 754a36a58c29 Author: Linus Torvalds Date: Mon Jan 27 11:15:34 2020 -0800 Merge tag 'spi-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "Not much going on in the core for SPI this time but a reasonable amount of change in the drivers: - Removal of dmal_request_slave_channel() from Peter Ujfalusi. - More conversions of drivers to GPIO descriptors from Linus Walleij. - A big rework of the sh-msiof driver from Geert Uytterhoeven moving it over to the generic native chipselect support. - DMA support for the uniphier driver from Kunihiko Hayashi. - New driver support for HiSilcon v3xx SPI NOR controllers from John Garry" * tag 'spi-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (52 commits) dt-binding: spi: add NPCM PSPI reset binding spi: pxa2xx: Avoid touching SSCR0_SSE on MMP2 spi: spi-fsl-qspi: Ensure width is respected in spi-mem operations spi: npcm-pspi: modify reset support spi: npcm-pspi: improve spi transfer performance spi: spi-ti-qspi: fix warning spi: npcm-pspi: fix 16 bit send and receive support spi: pxa2xx: Add support for Intel Comet Lake PCH-V spi: fsl: simplify error path in of_fsl_spi_probe() spi: fsl-lpspi: fix only one cs-gpio working spi: spi-ti-qspi: optimize byte-transfers spi: spi-ti-qspi: support large flash devices spi: spi-qcom-qspi: Use device managed memory for clk_bulk_data MAINTAINERS: Add a maintainer for the HiSilicon v3xx SFC driver spi: Add HiSilicon v3xx SPI NOR flash controller driver dt-bindings: spi_atmel: add microchip,sam9x60-spi spi: bcm2835: Raise maximum number of slaves to 4 spi: sh-msiof: Do not redefine STR while compile testing spi: rspi: Add support for GPIO chip selects spi: rspi: Add support for multiple native chip selects ... commit e83a0ed2a6a3f6e67630d1580f1ade97a54c524f Merge: a5b871c91d47 ea87683909bc Author: Linus Torvalds Date: Mon Jan 27 11:13:02 2020 -0800 Merge tag 'regmap-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "This is quite a busy release for a subsystem that's usually very quiet, though still a small set of updates in the grand scheme of things: - A fix for writes to non-incrementing registers. - An iopoll() style helper for use with atomic safe regmaps, making it easier to transition from raw memory mapped I/O. - Some constification" * tag 'regmap-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: fix writes to non incrementing registers regmap: add iopoll-like atomic polling macro regmap-i2c: constify regmap_bus structures commit 185dfe32d7e27b2cbf56c441160f4b8407eed055 Merge: e42617b825f8 41a1f096e94c Author: Stephen Boyd Date: Mon Jan 27 11:00:24 2020 -0800 Merge tag 'for-5.6-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into clk-nvidia Pull Nvidia Tegra clk driver updates from Thierry Reding * tag 'for-5.6-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: clk: tegra20/30: Explicitly set parent clock for Video Decoder clk: tegra20/30: Don't pre-initialize displays parent clock clk: tegra: divider: Check UART's divider enable-bit state on rate's recalculation clk: tegra: clk-dfll: Remove call to pm_runtime_irq_safe() clk: tegra: Mark fuse clock as critical commit 3009afc6e39e78708d8fb444ae50544b3bcd3a3f Author: Sean Christopherson Date: Tue Jan 21 20:43:39 2020 -0800 KVM: x86: Use a typedef for fastop functions Add a typedef to for the fastop function prototype to make the code more readable. No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 52db369823b28616377b8ceb6b6b3879735b9e75 Author: Miaohe Lin Date: Wed Jan 22 11:21:44 2020 +0800 KVM: X86: Add 'else' to unify fastop and execute call path It also helps eliminate some duplicated code. Signed-off-by: Miaohe Lin Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 91b0d268a59dd9c18221ea750b80f9a317b29ed2 Author: Paolo Bonzini Date: Tue Jan 21 16:16:32 2020 +0100 KVM: x86: inline memslot_valid_for_gpte The function now has a single caller, so there is no point in keeping it separate. Signed-off-by: Paolo Bonzini commit e851265a816f96a86c5a0316d2fc4d45be76d1d4 Author: Sean Christopherson Date: Wed Jan 8 12:24:48 2020 -0800 KVM: x86/mmu: Use huge pages for DAX-backed files Walk the host page tables to identify hugepage mappings for ZONE_DEVICE pfns, i.e. DAX pages. Explicitly query kvm_is_zone_device_pfn() when deciding whether or not to bother walking the host page tables, as DAX pages do not set up the head/tail infrastructure, i.e. will return false for PageCompound() even when using huge pages. Zap ZONE_DEVICE sptes when disabling dirty logging, e.g. if live migration fails, to allow KVM to rebuild large pages for DAX-based mappings. Presumably DAX favors large pages, and worst case scenario is a minor performance hit as KVM will need to re-fault all DAX-based pages. Suggested-by: Barret Rhoden Cc: David Hildenbrand Cc: Dan Williams Cc: Jason Zeng Cc: Dave Jiang Cc: Liran Alon Cc: linux-nvdimm Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 2c0629f4b95cf5adf5b6f78f7d318df894b5f9a1 Author: Sean Christopherson Date: Wed Jan 8 12:24:47 2020 -0800 KVM: x86/mmu: Remove lpage_is_disallowed() check from set_spte() Remove the late "lpage is disallowed" check from set_spte() now that the initial check is performed after acquiring mmu_lock. Fold the guts of the remaining helper, __mmu_gfn_lpage_is_disallowed(), into kvm_mmu_hugepage_adjust() to eliminate the unnecessary slot !NULL check. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 293e306e7faac4eafaefb9518a1cd6eaecad88e9 Author: Sean Christopherson Date: Wed Jan 8 12:24:46 2020 -0800 KVM: x86/mmu: Fold max_mapping_level() into kvm_mmu_hugepage_adjust() Fold max_mapping_level() into kvm_mmu_hugepage_adjust() now that HugeTLB mappings are handled in kvm_mmu_hugepage_adjust(), i.e. there isn't a need to pre-calculate the max mapping level. Co-locating all hugepage checks eliminates a memslot lookup, at the cost of performing the __mmu_gfn_lpage_is_disallowed() checks while holding mmu_lock. The latency of lpage_is_disallowed() is likely negligible relative to the rest of the code run while holding mmu_lock, and can be offset to some extent by eliminating the mmu_gfn_lpage_is_disallowed() check in set_spte() in a future patch. Eliminating the check in set_spte() is made possible by performing the initial lpage_is_disallowed() checks while holding mmu_lock. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit d32ec81bab670e599e645e1d1d5231d62de7d0d6 Author: Sean Christopherson Date: Wed Jan 8 12:24:45 2020 -0800 KVM: x86/mmu: Zap any compound page when collapsing sptes Zap any compound page, e.g. THP or HugeTLB pages, when zapping sptes that can potentially be converted to huge sptes after disabling dirty logging on the associated memslot. Note, this approach could result in false positives, e.g. if a random compound page is mapped into the guest, but mapping non-huge compound pages into the guest is far from the norm, and toggling dirty logging is not a frequent operation. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 09c4453ee8e63a710774ae10da7909289aa6a58e Author: Sean Christopherson Date: Wed Jan 8 12:24:44 2020 -0800 KVM: x86/mmu: Remove obsolete gfn restoration in FNAME(fetch) Remove logic to retrieve the original gfn now that HugeTLB mappings are are identified in FNAME(fetch), i.e. FNAME(page_fault) no longer adjusts the level or gfn. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 83f06fa7a6fd9d5758e5f8438e2137f25f6f2e6b Author: Sean Christopherson Date: Wed Jan 8 12:24:43 2020 -0800 KVM: x86/mmu: Rely on host page tables to find HugeTLB mappings Remove KVM's HugeTLB specific logic and instead rely on walking the host page tables (already done for THP) to identify HugeTLB mappings. Eliminating the HugeTLB-only logic avoids taking mmap_sem and calling find_vma() for all hugepage compatible page faults, and simplifies KVM's page fault code by consolidating all hugepage adjustments into a common helper. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit f9fa2509e5ca8229b4baca295865b542803bf25d Author: Sean Christopherson Date: Wed Jan 8 12:24:42 2020 -0800 KVM: x86/mmu: Drop level optimization from fast_page_fault() Remove fast_page_fault()'s optimization to stop the shadow walk if the iterator level drops below the intended map level. The intended map level is only acccurate for HugeTLB mappings (THP mappings are detected after fast_page_fault()), i.e. it's not required for correctness, and a future patch will also move HugeTLB mapping detection to after fast_page_fault(). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit db5432165e9b51d2a36572be38d078e79f8df0d8 Author: Sean Christopherson Date: Wed Jan 8 12:24:41 2020 -0800 KVM: x86/mmu: Walk host page tables to find THP mappings Explicitly walk the host page tables to identify THP mappings instead of relying solely on the metadata in struct page. This sets the stage for using a common method of identifying huge mappings regardless of the underlying implementation (HugeTLB vs THB vs DAX), and hopefully avoids the pitfalls of relying on metadata to identify THP mappings, e.g. see commit 169226f7e0d2 ("mm: thp: handle page cache THP correctly in PageTransCompoundMap") and the need for KVM to explicitly check for a THP compound page. KVM will also naturally work with 1gb THP pages, if they are ever supported. Walking the tables for THP mappings is likely marginally slower than querying metadata, but a future patch will reuse the walk to identify HugeTLB mappings, at which point eliminating the existing VMA lookup for HugeTLB will make this a net positive. Cc: Andrea Arcangeli Cc: Barret Rhoden Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 17eff01904f5f2fa12f4a56666637ce69ce5c645 Author: Sean Christopherson Date: Wed Jan 8 12:24:40 2020 -0800 KVM: x86/mmu: Refactor THP adjust to prep for changing query Refactor transparent_hugepage_adjust() in preparation for walking the host page tables to identify hugepage mappings, initially for THP pages, and eventualy for HugeTLB and DAX-backed pages as well. The latter cases support 1gb pages, i.e. the adjustment logic needs access to the max allowed level. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 13c72c060f1ba6f4eddd7b1c4f52a8aded43d6d9 Author: Sean Christopherson Date: Wed Jan 8 12:24:39 2020 -0800 x86/mm: Introduce lookup_address_in_mm() Add a helper, lookup_address_in_mm(), to traverse the page tables of a given mm struct. KVM will use the helper to retrieve the host mapping level, e.g. 4k vs. 2mb vs. 1gb, of a compound (or DAX-backed) page without having to resort to implementation specific metadata. E.g. KVM currently uses different logic for HugeTLB vs. THP, and would add a third variant for DAX-backed files. Cc: Dan Williams Signed-off-by: Sean Christopherson Reviewed-by: Thomas Gleixner Signed-off-by: Paolo Bonzini commit 42cde48b2d39772dba47e680781a32a6c4b7dc33 Author: Sean Christopherson Date: Wed Jan 8 12:24:38 2020 -0800 KVM: Play nice with read-only memslots when querying host page size Avoid the "writable" check in __gfn_to_hva_many(), which will always fail on read-only memslots due to gfn_to_hva() assuming writes. Functionally, this allows x86 to create large mappings for read-only memslots that are backed by HugeTLB mappings. Note, the changelog for commit 05da45583de9 ("KVM: MMU: large page support") states "If the largepage contains write-protected pages, a large pte is not used.", but "write-protected" refers to pages that are temporarily read-only, e.g. read-only memslots didn't even exist at the time. Fixes: 4d8b81abc47b ("KVM: introduce readonly memslot") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson [Redone using kvm_vcpu_gfn_to_memslot_prot. - Paolo] Signed-off-by: Paolo Bonzini commit f9b84e19221efc5f493156ee0329df3142085f28 Author: Sean Christopherson Date: Wed Jan 8 12:24:37 2020 -0800 KVM: Use vcpu-specific gva->hva translation when querying host page size Use kvm_vcpu_gfn_to_hva() when retrieving the host page size so that the correct set of memslots is used when handling x86 page faults in SMM. Fixes: 54bf36aac520 ("KVM: x86: use vcpu-specific functions to read/write/translate GFNs") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 005ba37cb89bcc0cf63c2029a41f8db165aeb615 Author: Sean Christopherson Date: Wed Jan 8 12:24:36 2020 -0800 mm: thp: KVM: Explicitly check for THP when populating secondary MMU Add a helper, is_transparent_hugepage(), to explicitly check whether a compound page is a THP and use it when populating KVM's secondary MMU. The explicit check fixes a bug where a remapped compound page, e.g. for an XDP Rx socket, is mapped into a KVM guest and is mistaken for a THP, which results in KVM incorrectly creating a huge page in its secondary MMU. Fixes: 936a5fe6e6148 ("thp: kvm mmu transparent hugepage support") Reported-by: syzbot+c9d1fb51ac9d0d10c39d@syzkaller.appspotmail.com Cc: Andrea Arcangeli Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 22b1d57b032cea4d612746473ed28cb20665d876 Author: Sean Christopherson Date: Wed Jan 8 12:24:35 2020 -0800 KVM: x86/mmu: Enforce max_level on HugeTLB mappings Limit KVM's mapping level for HugeTLB based on its calculated max_level. The max_level check prior to invoking host_mapping_level() only filters out the case where KVM cannot create a 2mb mapping, it doesn't handle the scenario where KVM can create a 2mb but not 1gb mapping, and the host is using a 1gb HugeTLB mapping. Fixes: 2f57b7051fe8 ("KVM: x86/mmu: Persist gfn_lpage_is_disallowed() to max_level") Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit dc9ce71e66b84497c375c529d818d8e8d0d793a9 Author: Sean Christopherson Date: Thu Jan 9 15:56:20 2020 -0800 KVM: Return immediately if __kvm_gfn_to_hva_cache_init() fails Check the result of __kvm_gfn_to_hva_cache_init() and return immediately instead of relying on the kvm_is_error_hva() check to detect errors so that it's abundantly clear KVM intends to immediately bail on an error. Note, the hva check is still mandatory to handle errors on subqeuesnt calls with the same generation. Similarly, always return -EFAULT on error so that multiple (bad) calls for a given generation will get the same result, e.g. on an illegal gfn wrap, propagating the return from __kvm_gfn_to_hva_cache_init() would cause the initial call to return -EINVAL and subsequent calls to return -EFAULT. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 6ad1e29fe0aba843dfffc714fced0ef6a2e19502 Author: Sean Christopherson Date: Thu Jan 9 14:58:55 2020 -0500 KVM: Clean up __kvm_gfn_to_hva_cache_init() and its callers Barret reported a (technically benign) bug where nr_pages_avail can be accessed without being initialized if gfn_to_hva_many() fails. virt/kvm/kvm_main.c:2193:13: warning: 'nr_pages_avail' may be used uninitialized in this function [-Wmaybe-uninitialized] Rather than simply squashing the warning by initializing nr_pages_avail, fix the underlying issues by reworking __kvm_gfn_to_hva_cache_init() to return immediately instead of continuing on. Now that all callers check the result and/or bail immediately on a bad hva, there's no need to explicitly nullify the memslot on error. Reported-by: Barret Rhoden Fixes: f1b9dd5eb86c ("kvm: Disallow wraparound in kvm_gfn_to_hva_cache_init") Cc: Jim Mattson Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit fcfbc617547fc6d9552cb6c1c563b6a90ee98085 Author: Sean Christopherson Date: Thu Jan 9 15:56:18 2020 -0800 KVM: Check for a bad hva before dropping into the ghc slow path When reading/writing using the guest/host cache, check for a bad hva before checking for a NULL memslot, which triggers the slow path for handing cross-page accesses. Because the memslot is nullified on error by __kvm_gfn_to_hva_cache_init(), if the bad hva is encountered after crossing into a new page, then the kvm_{read,write}_guest() slow path could potentially write/access the first chunk prior to detecting the bad hva. Arguably, performing a partial access is semantically correct from an architectural perspective, but that behavior is certainly not intended. In the original implementation, memslot was not explicitly nullified and therefore the partial access behavior varied based on whether the memslot itself was null, or if the hva was simply bad. The current behavior was introduced as a seemingly unintentional side effect in commit f1b9dd5eb86c ("kvm: Disallow wraparound in kvm_gfn_to_hva_cache_init"), which justified the change with "since some callers don't check the return code from this function, it sit seems prudent to clear ghc->memslot in the event of an error". Regardless of intent, the partial access is dependent on _not_ checking the result of the cache initialization, which is arguably a bug in its own right, at best simply weird. Fixes: 8f964525a121 ("KVM: Allow cross page reads and writes from cached translations.") Cc: Jim Mattson Cc: Andrew Honig Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 4d6d07aee8343eac68ebde9389ba829c8c17dfc7 Author: Peng Hao Date: Wed Nov 27 08:30:25 2019 +0800 kvm/x86: export kvm_vector_hashing_enabled() is unnecessary kvm_vector_hashing_enabled() is just called in kvm.ko module. Signed-off-by: Peng Hao Signed-off-by: Paolo Bonzini commit cef6db76f3165ac01ea49e023dea17002ee91618 Author: Miaohe Lin Date: Tue Jan 21 10:15:18 2020 -0500 KVM: VMX: remove duplicated segment cache clear vmx_set_segment() clears segment cache unconditionally, so we should not clear it again by calling vmx_segment_cache_clear(). Signed-off-by: Miaohe Lin Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 17ac43a894ed3dd237d6def00c5ec2c7d975567e Author: Haiwei Li Date: Thu Jan 16 16:50:21 2020 +0800 Adding 'else' to reduce checking. These two conditions are in conflict, adding 'else' to reduce checking. Signed-off-by: Haiwei Li Reviewed-by: Vitaly Kuznetsov Reviewed-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit b91991bf6b707482953c094dbd9615f6382ba2cb Author: Krish Sadhukhan Date: Wed Jan 15 19:54:32 2020 -0500 KVM: nVMX: Check GUEST_DR7 on vmentry of nested guests According to section "Checks on Guest Control Registers, Debug Registers, and and MSRs" in Intel SDM vol 3C, the following checks are performed on vmentry of nested guests: If the "load debug controls" VM-entry control is 1, bits 63:32 in the DR7 field must be 0. In KVM, GUEST_DR7 is set prior to the vmcs02 VM-entry by kvm_set_dr() and the latter synthesizes a #GP if any bit in the high dword in the former is set. Hence this field needs to be checked in software. Signed-off-by: Krish Sadhukhan Reviewed-by: Karl Heubaum Signed-off-by: Paolo Bonzini commit e174bb94831e792a50877754c78c1f340543bb64 Author: Alex Shi Date: Thu Jan 16 11:32:39 2020 +0800 KVM: remove unused guest_enter After commit 61bd0f66ff92 ("KVM: PPC: Book3S HV: Fix guest time accounting with VIRT_CPU_ACCOUNTING_GEN"), no one use this function anymore, So better to remove it. Signed-off-by: Alex Shi Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Frederic Weisbecker Cc: linux-kernel@vger.kernel.org Signed-off-by: Paolo Bonzini commit 7495e22bb165e7030bae4d9c6e84addb5ea17b29 Author: Paolo Bonzini Date: Thu Jan 9 09:57:19 2020 -0500 KVM: Move running VCPU from ARM to common code For ring-based dirty log tracking, it will be more efficient to account writes during schedule-out or schedule-in to the currently running VCPU. We would like to do it even if the write doesn't use the current VCPU's address space, as is the case for cached writes (see commit 4e335d9e7ddb, "Revert "KVM: Support vCPU-based gfn->hva cache"", 2017-05-02). Therefore, add a mechanism to track the currently-loaded kvm_vcpu struct. There is already something similar in KVM/ARM; one important difference is that kvm_arch_vcpu_{load,put} have two callers in virt/kvm/kvm_main.c: we have to update both the architecture-independent vcpu_{load,put} and the preempt notifiers. Another change made in the process is to allow using kvm_get_running_vcpu() in preemptible code. This is allowed because preempt notifiers ensure that the value does not change even after the VCPU thread is migrated. Signed-off-by: Paolo Bonzini Reviewed-by: Paolo Bonzini Signed-off-by: Peter Xu Signed-off-by: Paolo Bonzini commit 6a3c623ba8a842f895e80a7fa0feb94b7b4368f2 Author: Peter Xu Date: Thu Jan 9 09:57:16 2020 -0500 KVM: X86: Drop x86_set_memory_region() The helper x86_set_memory_region() is only used in vmx_set_tss_addr() and kvm_arch_destroy_vm(). Push the lock upper in both cases. With that, drop x86_set_memory_region(). This prepares to allow __x86_set_memory_region() to return a HVA mapped, because the HVA will need to be protected by the lock too even after __x86_set_memory_region() returns. Signed-off-by: Peter Xu Signed-off-by: Paolo Bonzini commit 2a5755bb21ee2f6567ce3eb2af10e8948df047d6 Author: Peter Xu Date: Thu Jan 9 09:57:14 2020 -0500 KVM: X86: Don't take srcu lock in init_rmode_identity_map() We've already got the slots_lock, so we should be safe. Signed-off-by: Peter Xu Signed-off-by: Paolo Bonzini commit fcd97ad58f76efcd58808941e4dd2bc6c544b9de Author: Peter Xu Date: Thu Jan 9 09:57:12 2020 -0500 KVM: Add build-time error check on kvm_run size It's already going to reach 2400 Bytes (which is over half of page size on 4K page archs), so maybe it's good to have this build-time check in case it overflows when adding new fields. Signed-off-by: Peter Xu Signed-off-by: Paolo Bonzini commit ef82eddc0e3179b4529a67ed102fe4f7efba2e65 Author: Peter Xu Date: Thu Jan 9 09:57:11 2020 -0500 KVM: Remove kvm_read_guest_atomic() Remove kvm_read_guest_atomic() because it's not used anywhere. Signed-off-by: Peter Xu Signed-off-by: Paolo Bonzini commit de9bf4d4cea369355440c5afbbbc7e62302de8fd Author: Vitaly Kuznetsov Date: Wed Jan 15 18:10:12 2020 +0100 x86/kvm/hyper-v: remove stale evmcs_already_enabled check from nested_enable_evmcs() In nested_enable_evmcs() evmcs_already_enabled check doesn't really do anything: controls are already sanitized and we return '0' regardless. Just drop the check. Signed-off-by: Vitaly Kuznetsov Reviewed-by: Liran Alon Signed-off-by: Paolo Bonzini commit de761ea792c8344b7170624dbbcba4d730e23897 Author: Sean Christopherson Date: Wed Jan 15 10:36:05 2020 -0800 KVM: x86: Perform non-canonical checks in 32-bit KVM Remove the CONFIG_X86_64 condition from the low level non-canonical helpers to effectively enable non-canonical checks on 32-bit KVM. Non-canonical checks are performed by hardware if the CPU *supports* 64-bit mode, whether or not the CPU is actually in 64-bit mode is irrelevant. For the most part, skipping non-canonical checks on 32-bit KVM is ok-ish because 32-bit KVM always (hopefully) drops bits 63:32 of whatever value it's checking before propagating it to hardware, and architecturally, the expected behavior for the guest is a bit of a grey area since the vCPU itself doesn't support 64-bit mode. I.e. a 32-bit KVM guest can observe the missed checks in several paths, e.g. INVVPID and VM-Enter, but it's debatable whether or not the missed checks constitute a bug because technically the vCPU doesn't support 64-bit mode. The primary motivation for enabling the non-canonical checks is defense in depth. As mentioned above, a guest can trigger a missed check via INVVPID or VM-Enter. INVVPID is straightforward as it takes a 64-bit virtual address as part of its 128-bit INVVPID descriptor and fails if the address is non-canonical, even if INVVPID is executed in 32-bit PM. Nested VM-Enter is a bit more convoluted as it requires the guest to write natural width VMCS fields via memory accesses and then VMPTRLD the VMCS, but it's still possible. In both cases, KVM is saved from a true bug only because its flows that propagate values to hardware (correctly) take "unsigned long" parameters and so drop bits 63:32 of the bad value. Explicitly performing the non-canonical checks makes it less likely that a bad value will be propagated to hardware, e.g. in the INVVPID case, if __invvpid() didn't implicitly drop bits 63:32 then KVM would BUG() on the resulting unexpected INVVPID failure due to hardware rejecting the non-canonical address. The only downside to enabling the non-canonical checks is that it adds a relatively small amount of overhead, but the affected flows are not hot paths, i.e. the overhead is negligible. Note, KVM technically could gate the non-canonical checks on 32-bit KVM with static_cpu_has(X86_FEATURE_LM), but on bare metal that's an even bigger waste of code for everyone except the 0.00000000000001% of the population running on Yonah, and nested 32-bit on 64-bit already fudges things with respect to 64-bit CPU behavior. Signed-off-by: Sean Christopherson [Also do so in nested_vmx_check_host_state as reported by Krish. - Paolo] Signed-off-by: Paolo Bonzini commit d196842150e046a523f75785438137a9243c9627 Author: Oliver Upton Date: Fri Dec 13 16:33:58 2019 -0800 KVM: nVMX: WARN on failure to set IA32_PERF_GLOBAL_CTRL Writes to MSR_CORE_PERF_GLOBAL_CONTROL should never fail if the VM-exit and VM-entry controls are exposed to L1. Promote the checks to perform a full WARN if kvm_set_msr() fails and remove the now unused macro SET_MSR_OR_WARN(). Suggested-by: Sean Christopherson Cc: Paolo Bonzini Signed-off-by: Oliver Upton Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit c0a21c3f9d9b21a4bd67a46d96eaeb372b0daf20 Author: Sean Christopherson Date: Fri Jan 17 11:30:52 2020 -0800 KVM: x86: Remove unused ctxt param from emulator's FPU accessors Remove an unused struct x86_emulate_ctxt * param from low level helpers used to access guest FPU state. The unused param was left behind by commit 6ab0b9feb82a ("x86,kvm: remove KVM emulator get_fpu / put_fpu"). No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 2620fe268e80d667a94553cd37a94ccaa2cb8c83 Author: Sean Christopherson Date: Fri Jan 17 11:30:51 2020 -0800 KVM: x86: Revert "KVM: X86: Fix fpu state crash in kvm guest" Reload the current thread's FPU state, which contains the guest's FPU state, to the CPU registers if necessary during vcpu_enter_guest(). TIF_NEED_FPU_LOAD can be set any time control is transferred out of KVM, e.g. if I/O is triggered during a KVM call to get_user_pages() or if a softirq occurs while KVM is scheduled in. Moving the handling of TIF_NEED_FPU_LOAD from vcpu_enter_guest() to kvm_arch_vcpu_load(), effectively kvm_sched_in(), papered over a bug where kvm_put_guest_fpu() failed to account for TIF_NEED_FPU_LOAD. The easiest way to the kvm_put_guest_fpu() bug was to run with involuntary preemption enable, thus handling TIF_NEED_FPU_LOAD during kvm_sched_in() made the bug go away. But, removing the handling in vcpu_enter_guest() exposed KVM to the rare case of a softirq triggering kernel_fpu_begin() between vcpu_load() and vcpu_enter_guest(). Now that kvm_{load,put}_guest_fpu() correctly handle TIF_NEED_FPU_LOAD, revert the commit to both restore the vcpu_enter_guest() behavior and eliminate the superfluous switch_fpu_return() in kvm_arch_vcpu_load(). Note, leaving the handling in kvm_arch_vcpu_load() isn't wrong per se, but it is unnecessary, and most critically, makes it extremely difficult to find bugs such as the kvm_put_guest_fpu() issue due to shrinking the window where a softirq can corrupt state. A sample trace triggered by warning if TIF_NEED_FPU_LOAD is set while vcpu state is loaded: gcmaes_crypt_by_sg.constprop.12+0x26e/0x660 ? 0xffffffffc024547d ? __qdisc_run+0x83/0x510 ? __dev_queue_xmit+0x45e/0x990 ? ip_finish_output2+0x1a8/0x570 ? fib4_rule_action+0x61/0x70 ? fib4_rule_action+0x70/0x70 ? fib_rules_lookup+0x13f/0x1c0 ? helper_rfc4106_decrypt+0x82/0xa0 ? crypto_aead_decrypt+0x40/0x70 ? crypto_aead_decrypt+0x40/0x70 ? crypto_aead_decrypt+0x40/0x70 ? esp_output_tail+0x8f4/0xa5a [esp4] ? skb_ext_add+0xd3/0x170 ? xfrm_input+0x7a6/0x12c0 ? xfrm4_rcv_encap+0xae/0xd0 ? xfrm4_transport_finish+0x200/0x200 ? udp_queue_rcv_one_skb+0x1ba/0x460 ? udp_unicast_rcv_skb.isra.63+0x72/0x90 ? __udp4_lib_rcv+0x51b/0xb00 ? ip_protocol_deliver_rcu+0xd2/0x1c0 ? ip_local_deliver_finish+0x44/0x50 ? ip_local_deliver+0xe0/0xf0 ? ip_protocol_deliver_rcu+0x1c0/0x1c0 ? ip_rcv+0xbc/0xd0 ? ip_rcv_finish_core.isra.19+0x380/0x380 ? __netif_receive_skb_one_core+0x7e/0x90 ? netif_receive_skb_internal+0x3d/0xb0 ? napi_gro_receive+0xed/0x150 ? 0xffffffffc0243c77 ? net_rx_action+0x149/0x3b0 ? __do_softirq+0xe4/0x2f8 ? handle_irq_event_percpu+0x6a/0x80 ? irq_exit+0xe6/0xf0 ? do_IRQ+0x7f/0xd0 ? common_interrupt+0xf/0xf ? irq_entries_start+0x20/0x660 ? vmx_get_interrupt_shadow+0x2f0/0x710 [kvm_intel] ? kvm_set_msr_common+0xfc7/0x2380 [kvm] ? recalibrate_cpu_khz+0x10/0x10 ? ktime_get+0x3a/0xa0 ? kvm_arch_vcpu_ioctl_run+0x107/0x560 [kvm] ? kvm_init+0x6bf/0xd00 [kvm] ? __seccomp_filter+0x7a/0x680 ? do_vfs_ioctl+0xa4/0x630 ? security_file_ioctl+0x32/0x50 ? ksys_ioctl+0x60/0x90 ? __x64_sys_ioctl+0x16/0x20 ? do_syscall_64+0x5f/0x1a0 ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 ---[ end trace 9564a1ccad733a90 ]--- This reverts commit e751732486eb3f159089a64d1901992b1357e7cc. Fixes: e751732486eb3 ("KVM: X86: Fix fpu state crash in kvm guest") Reported-by: Derek Yerger Reported-by: kernel@najdan.com Cc: Wanpeng Li Cc: Thomas Lambertz Cc: Rik van Riel Cc: Sebastian Andrzej Siewior Cc: Borislav Petkov Cc: Dave Hansen Cc: Thomas Gleixner Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit a7baead7e312f5a05381d68585fb6dc68e19e90f Author: Sean Christopherson Date: Fri Jan 17 11:30:50 2020 -0800 KVM: x86: Ensure guest's FPU state is loaded when accessing for emulation Lock the FPU regs and reload the current thread's FPU state, which holds the guest's FPU state, to the CPU registers if necessary prior to accessing guest FPU state as part of emulation. kernel_fpu_begin() can be called from softirq context, therefore KVM must ensure softirqs are disabled (locking the FPU regs disables softirqs) when touching CPU FPU state. Note, for all intents and purposes this reverts commit 6ab0b9feb82a7 ("x86,kvm: remove KVM emulator get_fpu / put_fpu"), but at the time it was applied, removing get/put_fpu() was correct. The re-introduction of {get,put}_fpu() is necessitated by the deferring of FPU state load. Fixes: 5f409e20b7945 ("x86/fpu: Defer FPU state load until return to userspace") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit c9aef3b85f425d1f6635382ec210ee5a7ef55d7d Author: Sean Christopherson Date: Fri Jan 17 11:30:49 2020 -0800 KVM: x86: Handle TIF_NEED_FPU_LOAD in kvm_{load,put}_guest_fpu() Handle TIF_NEED_FPU_LOAD similar to how fpu__copy() handles the flag when duplicating FPU state to a new task struct. TIF_NEED_FPU_LOAD can be set any time control is transferred out of KVM, be it voluntarily, e.g. if I/O is triggered during a KVM call to get_user_pages, or involuntarily, e.g. if softirq runs after an IRQ occurs. Therefore, KVM must account for TIF_NEED_FPU_LOAD whenever it is (potentially) accessing CPU FPU state. Fixes: 5f409e20b7945 ("x86/fpu: Defer FPU state load until return to userspace") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 3911b65ee1d3e3fc5e3786b1f309dcad0e33f7fd Author: Paolo Bonzini Date: Sat Jan 18 22:29:46 2020 +0100 Revert "KVM: x86: Add a WARN on TIF_NEED_FPU_LOAD in kvm_load_guest_fpu()" This reverts commit 95145c25a78cc0a9d3cbc75708abde432310c5a1. The next few patches will fix the issue so the warning is not needed anymore; revert it separately to simplify application to stable kernels. Signed-off-by: Paolo Bonzini commit 3ce4dc17e0c1e7280d53abeb85ce851a88868c63 Author: Miaohe Lin Date: Sat Jan 18 10:50:37 2020 +0800 KVM: apic: short-circuit kvm_apic_accept_pic_intr() when pic intr is accepted Short-circuit kvm_apic_accept_pic_intr() when pic intr is accepted, there is no need to proceed further. Also remove unnecessary var r. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 767b839afa5d62ba9cf859f4e90fef3d4a1780b5 Author: Miaohe Lin Date: Sat Jan 18 10:41:55 2020 +0800 KVM: x86: avoid clearing pending exception event twice The exception pending event is cleared by kvm_clear_exception_queue(). We shouldn't clear it again. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 66061740f1a487f4ed54fde75e724709f805da53 Author: Marios Pomonis Date: Wed Dec 11 12:47:53 2019 -0800 KVM: x86: Protect pmu_intel.c from Spectre-v1/L1TF attacks This fixes Spectre-v1/L1TF vulnerabilities in intel_find_fixed_event() and intel_rdpmc_ecx_to_pmc(). kvm_rdpmc() (ancestor of intel_find_fixed_event()) and reprogram_fixed_counter() (ancestor of intel_rdpmc_ecx_to_pmc()) are exported symbols so KVM should treat them conservatively from a security perspective. Fixes: 25462f7f5295 ("KVM: x86/vPMU: Define kvm_pmu_ops to support vPMU function dispatch") Signed-off-by: Nick Finco Signed-off-by: Marios Pomonis Reviewed-by: Andrew Honig Cc: stable@vger.kernel.org Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit ea740059ecb37807ba47b84b33d1447435a8d868 Author: Marios Pomonis Date: Wed Dec 11 12:47:52 2019 -0800 KVM: x86: Protect DR-based index computations from Spectre-v1/L1TF attacks This fixes a Spectre-v1/L1TF vulnerability in __kvm_set_dr() and kvm_get_dr(). Both kvm_get_dr() and kvm_set_dr() (a wrapper of __kvm_set_dr()) are exported symbols so KVM should tream them conservatively from a security perspective. Fixes: 020df0794f57 ("KVM: move DR register access handling into generic code") Signed-off-by: Nick Finco Signed-off-by: Marios Pomonis Reviewed-by: Andrew Honig Cc: stable@vger.kernel.org Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit c926f2f7230b1a29e31914b51db680f8cbf3103f Author: Marios Pomonis Date: Wed Dec 11 12:47:51 2019 -0800 KVM: x86: Protect exit_reason from being used in Spectre-v1/L1TF attacks This fixes a Spectre-v1/L1TF vulnerability in vmx_handle_exit(). While exit_reason is set by the hardware and therefore should not be attacker-influenced, an unknown exit_reason could potentially be used to perform such an attack. Fixes: 55d2375e58a6 ("KVM: nVMX: Move nested code to dedicated files") Signed-off-by: Marios Pomonis Signed-off-by: Nick Finco Suggested-by: Sean Christopherson Reviewed-by: Andrew Honig Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 125ffc5e0a56a3eded608dc51e09d5ebf72cf652 Author: Marios Pomonis Date: Wed Dec 11 12:47:50 2019 -0800 KVM: x86: Refactor prefix decoding to prevent Spectre-v1/L1TF attacks This fixes Spectre-v1/L1TF vulnerabilities in vmx_read_guest_seg_selector(), vmx_read_guest_seg_base(), vmx_read_guest_seg_limit() and vmx_read_guest_seg_ar(). When invoked from emulation, these functions contain index computations based on the (attacker-influenced) segment value. Using constants prevents the attack. Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 6ec4c5eee1750d5d17951c4e1960d953376a0dda Author: Marios Pomonis Date: Wed Dec 11 12:47:49 2019 -0800 KVM: x86: Protect MSR-based index computations from Spectre-v1/L1TF attacks in x86.c This fixes a Spectre-v1/L1TF vulnerability in set_msr_mce() and get_msr_mce(). Both functions contain index computations based on the (attacker-controlled) MSR number. Fixes: 890ca9aefa78 ("KVM: Add MCE support") Signed-off-by: Nick Finco Signed-off-by: Marios Pomonis Reviewed-by: Andrew Honig Cc: stable@vger.kernel.org Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 13c5183a4e643cc2b03a22d0e582c8e17bb7457d Author: Marios Pomonis Date: Wed Dec 11 12:47:48 2019 -0800 KVM: x86: Protect MSR-based index computations in pmu.h from Spectre-v1/L1TF attacks This fixes a Spectre-v1/L1TF vulnerability in the get_gp_pmc() and get_fixed_pmc() functions. They both contain index computations based on the (attacker-controlled) MSR number. Fixes: 25462f7f5295 ("KVM: x86/vPMU: Define kvm_pmu_ops to support vPMU function dispatch") Signed-off-by: Nick Finco Signed-off-by: Marios Pomonis Reviewed-by: Andrew Honig Cc: stable@vger.kernel.org Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 25a5edea71b7c154b6a0b8cec14c711cafa31d26 Author: Marios Pomonis Date: Wed Dec 11 12:47:47 2019 -0800 KVM: x86: Protect MSR-based index computations in fixed_msr_to_seg_unit() from Spectre-v1/L1TF attacks This fixes a Spectre-v1/L1TF vulnerability in fixed_msr_to_seg_unit(). This function contains index computations based on the (attacker-controlled) MSR number. Fixes: de9aef5e1ad6 ("KVM: MTRR: introduce fixed_mtrr_segment table") Signed-off-by: Nick Finco Signed-off-by: Marios Pomonis Reviewed-by: Andrew Honig Cc: stable@vger.kernel.org Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 4bf79cb089f6b1c6c632492c0271054ce52ad766 Author: Marios Pomonis Date: Wed Dec 11 12:47:46 2019 -0800 KVM: x86: Protect kvm_lapic_reg_write() from Spectre-v1/L1TF attacks This fixes a Spectre-v1/L1TF vulnerability in kvm_lapic_reg_write(). This function contains index computations based on the (attacker-controlled) MSR number. Fixes: 0105d1a52640 ("KVM: x2apic interface to lapic") Signed-off-by: Nick Finco Signed-off-by: Marios Pomonis Reviewed-by: Andrew Honig Cc: stable@vger.kernel.org Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 670564559ca35b439c8d8861fc399451ddf95137 Author: Marios Pomonis Date: Wed Dec 11 12:47:45 2019 -0800 KVM: x86: Protect ioapic_write_indirect() from Spectre-v1/L1TF attacks This fixes a Spectre-v1/L1TF vulnerability in ioapic_write_indirect(). This function contains index computations based on the (attacker-controlled) IOREGSEL register. This patch depends on patch "KVM: x86: Protect ioapic_read_indirect() from Spectre-v1/L1TF attacks". Fixes: 70f93dae32ac ("KVM: Use temporary variable to shorten lines.") Signed-off-by: Nick Finco Signed-off-by: Marios Pomonis Reviewed-by: Andrew Honig Cc: stable@vger.kernel.org Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 8c86405f606ca8508b8d9280680166ca26723695 Author: Marios Pomonis Date: Wed Dec 11 12:47:44 2019 -0800 KVM: x86: Protect ioapic_read_indirect() from Spectre-v1/L1TF attacks This fixes a Spectre-v1/L1TF vulnerability in ioapic_read_indirect(). This function contains index computations based on the (attacker-controlled) IOREGSEL register. Fixes: a2c118bfab8b ("KVM: Fix bounds checking in ioapic indirect register reads (CVE-2013-1798)") Signed-off-by: Nick Finco Signed-off-by: Marios Pomonis Reviewed-by: Andrew Honig Cc: stable@vger.kernel.org Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 14e32321f3606e4b0970200b6e5e47ee6f1e6410 Author: Marios Pomonis Date: Wed Dec 11 12:47:43 2019 -0800 KVM: x86: Refactor picdev_write() to prevent Spectre-v1/L1TF attacks This fixes a Spectre-v1/L1TF vulnerability in picdev_write(). It replaces index computations based on the (attacked-controlled) port number with constants through a minor refactoring. Fixes: 85f455f7ddbe ("KVM: Add support for in-kernel PIC emulation") Signed-off-by: Nick Finco Signed-off-by: Marios Pomonis Reviewed-by: Andrew Honig Cc: stable@vger.kernel.org Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 8618793750071d66028584a83ed0b4fa7eb4f607 Author: Marios Pomonis Date: Wed Dec 11 12:47:42 2019 -0800 KVM: x86: Protect kvm_hv_msr_[get|set]_crash_data() from Spectre-v1/L1TF attacks This fixes Spectre-v1/L1TF vulnerabilities in kvm_hv_msr_get_crash_data() and kvm_hv_msr_set_crash_data(). These functions contain index computations that use the (attacker-controlled) MSR number. Fixes: e7d9513b60e8 ("kvm/x86: added hyper-v crash msrs into kvm hyperv context") Signed-off-by: Nick Finco Signed-off-by: Marios Pomonis Reviewed-by: Andrew Honig Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 3c9053a2cae7ba2ba73766a34cea41baa70f57f7 Author: Marios Pomonis Date: Wed Dec 11 12:47:41 2019 -0800 KVM: x86: Protect x86_decode_insn from Spectre-v1/L1TF attacks This fixes a Spectre-v1/L1TF vulnerability in x86_decode_insn(). kvm_emulate_instruction() (an ancestor of x86_decode_insn()) is an exported symbol, so KVM should treat it conservatively from a security perspective. Fixes: 045a282ca415 ("KVM: emulator: implement fninit, fnstsw, fnstcw") Signed-off-by: Nick Finco Signed-off-by: Marios Pomonis Reviewed-by: Andrew Honig Cc: stable@vger.kernel.org Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit a47970ed74a535b1accb4bc73643fd5a93993c3e Author: John Allen Date: Thu Dec 19 14:17:59 2019 -0600 kvm/svm: PKU not currently supported Current SVM implementation does not have support for handling PKU. Guests running on a host with future AMD cpus that support the feature will read garbage from the PKRU register and will hit segmentation faults on boot as memory is getting marked as protected that should not be. Ensure that cpuid from SVM does not advertise the feature. Signed-off-by: John Allen Cc: stable@vger.kernel.org Fixes: 0556cbdc2fbc ("x86/pkeys: Don't check if PKRU is zero before writing it") Signed-off-by: Paolo Bonzini commit 8bd826d629d6ff4a4e647079db15d64d06346004 Author: Sean Christopherson Date: Wed Dec 18 13:55:30 2019 -0800 KVM: Move vcpu->run page allocation out of kvm_vcpu_init() Open code the allocation and freeing of the vcpu->run page in kvm_vm_ioctl_create_vcpu() and kvm_vcpu_destroy() respectively. Doing so allows kvm_vcpu_init() to be a pure init function and eliminates kvm_vcpu_uninit() entirely. Signed-off-by: Sean Christopherson Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit 9941d224fb7c765bc20f3cb6c747786adc5cd002 Author: Sean Christopherson Date: Wed Dec 18 13:55:29 2019 -0800 KVM: Move putting of vcpu->pid to kvm_vcpu_destroy() Move the putting of vcpu->pid to kvm_vcpu_destroy(). vcpu->pid is guaranteed to be NULL when kvm_vcpu_uninit() is called in the error path of kvm_vm_ioctl_create_vcpu(), e.g. it is explicitly nullified by kvm_vcpu_init() and is only changed by KVM_RUN. No functional change intended. Acked-by: Christoffer Dall Signed-off-by: Sean Christopherson Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit ddd259c9aaba08244dba8877687ee856f79c4f45 Author: Sean Christopherson Date: Wed Dec 18 13:55:28 2019 -0800 KVM: Drop kvm_arch_vcpu_init() and kvm_arch_vcpu_uninit() Remove kvm_arch_vcpu_init() and kvm_arch_vcpu_uninit() now that all arch specific implementations are nops. Acked-by: Christoffer Dall Signed-off-by: Sean Christopherson Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit 19bcc89eb8a9fa1d4be4bff5b5e7917cb8bbc1f7 Author: Sean Christopherson Date: Wed Dec 18 13:55:27 2019 -0800 KVM: arm64: Free sve_state via arm specific hook Add an arm specific hook to free the arm64-only sve_state. Doing so eliminates the last functional code from kvm_arch_vcpu_uninit() across all architectures and paves the way for removing kvm_arch_vcpu_init() and kvm_arch_vcpu_uninit() entirely. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 74ce2e60d4874fc2464e321af1397c6fae984ec9 Author: Sean Christopherson Date: Wed Dec 18 13:55:26 2019 -0800 KVM: PPC: Move all vcpu init code into kvm_arch_vcpu_create() Fold init() into create() now that the two are called back-to-back by common KVM code (kvm_vcpu_init() calls kvm_arch_vcpu_init() as its last action, and kvm_vm_ioctl_create_vcpu() calls kvm_arch_vcpu_create() immediately thereafter). Rinse and repeat for kvm_arch_vcpu_uninit() and kvm_arch_vcpu_destroy(). This paves the way for removing kvm_arch_vcpu_{un}init() entirely. Note, calling kvmppc_mmu_destroy() if kvmppc_core_vcpu_create() fails may or may not be necessary. Move it along with the more obvious call to kvmppc_subarch_vcpu_uninit() so as not to inadvertantly introduce a functional change and/or bug. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 39a93a8794719a37a37140460865c4edaff795a6 Author: Sean Christopherson Date: Wed Dec 18 13:55:25 2019 -0800 KVM: ARM: Move all vcpu init code into kvm_arch_vcpu_create() Fold init() into create() now that the two are called back-to-back by common KVM code (kvm_vcpu_init() calls kvm_arch_vcpu_init() as its last action, and kvm_vm_ioctl_create_vcpu() calls kvm_arch_vcpu_create() immediately thereafter). This paves the way for removing kvm_arch_vcpu_{un}init() entirely. Note, there is no associated unwinding in kvm_arch_vcpu_uninit() that needs to be relocated (to kvm_arch_vcpu_destroy()). No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit d11dfed5d700b8973d5742300e04b2aaa9d11217 Author: Sean Christopherson Date: Wed Dec 18 13:55:24 2019 -0800 KVM: MIPS: Move all vcpu init code into kvm_arch_vcpu_create() Fold init() into create() now that the two are called back-to-back by common KVM code (kvm_vcpu_init() calls kvm_arch_vcpu_init() as its last action, and kvm_vm_ioctl_create_vcpu() calls kvm_arch_vcpu_create() immediately thereafter). Rinse and repeat for kvm_arch_vcpu_uninit() and kvm_arch_vcpu_destroy(). This paves the way for removing kvm_arch_vcpu_{un}init() entirely. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 95a0d01eef7a1b97358c25d335c4a28f91345cf9 Author: Sean Christopherson Date: Wed Dec 18 13:55:23 2019 -0800 KVM: x86: Move all vcpu init code into kvm_arch_vcpu_create() Fold init() into create() now that the two are called back-to-back by common KVM code (kvm_vcpu_init() calls kvm_arch_vcpu_init() as its last action, and kvm_vm_ioctl_create_vcpu() calls kvm_arch_vcpu_create() immediately thereafter). This paves the way for removing kvm_arch_vcpu_init() entirely. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit afede96df55e9cba948c8cc8a682e962244285b4 Author: Sean Christopherson Date: Wed Dec 18 13:55:22 2019 -0800 KVM: Drop kvm_arch_vcpu_setup() Remove kvm_arch_vcpu_setup() now that all arch specific implementations are nops. Acked-by: Christoffer Dall Signed-off-by: Sean Christopherson Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit b3d42c9862e0e2a2d95839d91120ddf8dd8a8af6 Author: Sean Christopherson Date: Wed Dec 18 13:55:21 2019 -0800 KVM: PPC: BookE: Setup vcpu during kvmppc_core_vcpu_create() Fold setup() into create() now that the two are called back-to-back by common KVM code. This paves the way for removing kvm_arch_vcpu_setup(). Note, BookE directly implements kvm_arch_vcpu_setup() and PPC's common kvm_arch_vcpu_create() is responsible for its own cleanup, thus the only cleanup required when directly invoking kvmppc_core_vcpu_setup() is to call .vcpu_free(), which is the BookE specific portion of PPC's kvm_arch_vcpu_destroy() by way of kvmppc_core_vcpu_free(). No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit ff72bb55cbfd060172cfbafafe4838ce92ab080f Author: Sean Christopherson Date: Wed Dec 18 13:55:20 2019 -0800 KVM: s390: Manually invoke vcpu setup during kvm_arch_vcpu_create() Rename kvm_arch_vcpu_setup() to kvm_s390_vcpu_setup() and manually call the new function during kvm_arch_vcpu_create(). Define an empty kvm_arch_vcpu_setup() as it's still required for compilation. This is effectively a nop as kvm_arch_vcpu_create() and kvm_arch_vcpu_setup() are called back-to-back by common KVM code. Obsoleting kvm_arch_vcpu_setup() paves the way for its removal. Note, gmap_remove() is now called if setup fails, as s390 was previously freeing it via kvm_arch_vcpu_destroy(), which is called by common KVM code if kvm_arch_vcpu_setup() fails. No functional change intended. Signed-off-by: Sean Christopherson Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit 5259878432098ffd26cef7294b0a85ab5cfaf556 Author: Sean Christopherson Date: Wed Dec 18 13:55:19 2019 -0800 KVM: MIPS: Move .vcpu_setup() call to kvm_arch_vcpu_create() Fold setup() into create() now that the two are called back-to-back by common KVM code. This paves the way for removing kvm_arch_vcpu_setup(). Note, there is no unwind function associated with kvm_arch_vcpu_setup(), i.e. no teardown path that also needs to be moved. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 5f73db112e597b30efb7f81ab5fee87a9febad3e Author: Sean Christopherson Date: Wed Dec 18 13:55:18 2019 -0800 KVM: x86: Move guts of kvm_arch_vcpu_setup() into kvm_arch_vcpu_create() Fold setup() into create() now that the two are called back-to-back by common KVM code. This paves the way for removing kvm_arch_vcpu_setup(). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit d5c48debcc4fbdd09e3e0871980b7ebf06ec6e07 Author: Sean Christopherson Date: Wed Dec 18 13:55:17 2019 -0800 KVM: Move initialization of preempt notifier to kvm_vcpu_init() Initialize the preempt notifier immediately in kvm_vcpu_init() to pave the way for removing kvm_arch_vcpu_setup(), i.e. to allow arch specific code to call vcpu_load() during kvm_arch_vcpu_create(). Back when preemption support was added, the location of the call to init the preempt notifier was perfectly sane. The overall vCPU creation flow featured a single arch specific hook and the preempt notifer was used immediately after its initialization (by vcpu_load()). E.g.: vcpu = kvm_arch_ops->vcpu_create(kvm, n); if (IS_ERR(vcpu)) return PTR_ERR(vcpu); preempt_notifier_init(&vcpu->preempt_notifier, &kvm_preempt_ops); vcpu_load(vcpu); r = kvm_mmu_setup(vcpu); vcpu_put(vcpu); if (r < 0) goto free_vcpu; Today, the call to preempt_notifier_init() is sandwiched between two arch specific calls, kvm_arch_vcpu_create() and kvm_arch_vcpu_setup(), which needlessly forces x86 (and possibly others?) to split its vCPU creation flow. Init the preempt notifier prior to any arch specific call so that each arch can independently decide how best to organize its creation flow. Acked-by: Christoffer Dall Signed-off-by: Sean Christopherson Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit aaba298c6bca8d8625880a8016e5b80adc8a11af Author: Sean Christopherson Date: Wed Dec 18 13:55:16 2019 -0800 KVM: Unexport kvm_vcpu_cache and kvm_vcpu_{un}init() Unexport kvm_vcpu_cache and kvm_vcpu_{un}init() and make them static now that they are referenced only in kvm_main.c. Acked-by: Christoffer Dall Signed-off-by: Sean Christopherson Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit e529ef66e6b53b34f9b8caac55950c8a55c79dac Author: Sean Christopherson Date: Wed Dec 18 13:55:15 2019 -0800 KVM: Move vcpu alloc and init invocation to common code Now that all architectures tightly couple vcpu allocation/free with the mandatory calls to kvm_{un}init_vcpu(), move the sequences verbatim to common KVM code. Move both allocation and initialization in a single patch to eliminate thrash in arch specific code. The bisection benefits of moving the two pieces in separate patches is marginal at best, whereas the odds of introducing a transient arch specific bug are non-zero. Acked-by: Christoffer Dall Signed-off-by: Sean Christopherson Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit a5b871c91d470326eed3ae0ebd2fc07f3aee9050 Merge: 715d12856953 71723a96b8b1 Author: Linus Torvalds Date: Mon Jan 27 10:55:50 2020 -0800 Merge tag 'dmaengine-5.6-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine updates from Vinod Koul: "This time we have a bunch of core changes to support dynamic channels, hotplug of controllers, new apis for metadata ops etc along with new drivers for Intel data accelerators, TI K3 UDMA, PLX DMA engine and hisilicon Kunpeng DMA engine. Also usual assorted updates to drivers. Core: - Support for dynamic channels - Removal of various slave wrappers - Make few slave request APIs as private to dmaengine - Symlinks between channels and slaves - Support for hotplug of controllers - Support for metadata_ops for dma_async_tx_descriptor - Reporting DMA cached data amount - Virtual dma channel locking updates New drivers/device/feature support support: - Driver for Intel data accelerators - Driver for TI K3 UDMA - Driver for PLX DMA engine - Driver for hisilicon Kunpeng DMA engine - Support for eDMA support for QorIQ LS1028A in fsl edma driver - Support for cyclic dma in sun4i driver - Support for X1830 in JZ4780 driver" * tag 'dmaengine-5.6-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (62 commits) dmaengine: Create symlinks between DMA channels and slaves dmaengine: hisilicon: Add Kunpeng DMA engine support dmaengine: idxd: add char driver to expose submission portal to userland dmaengine: idxd: connect idxd to dmaengine subsystem dmaengine: idxd: add descriptor manipulation routines dmaengine: idxd: add sysfs ABI for idxd driver dmaengine: idxd: add configuration component of driver dmaengine: idxd: Init and probe for Intel data accelerators dmaengine: add support to dynamic register/unregister of channels dmaengine: break out channel registration x86/asm: add iosubmit_cmds512() based on MOVDIR64B CPU instruction dmaengine: ti: k3-udma: fix spelling mistake "limted" -> "limited" dmaengine: s3c24xx-dma: fix spelling mistake "to" -> "too" dmaengine: Move dma_get_{,any_}slave_channel() to private dmaengine.h dmaengine: Remove dma_request_slave_channel_compat() wrapper dmaengine: Remove dma_device_satisfies_mask() wrapper dt-bindings: fsl-imx-sdma: Add i.MX8MM/i.MX8MN/i.MX8MP compatible string dmaengine: zynqmp_dma: fix burst length configuration dmaengine: sun4i: Add support for cyclic requests with dedicated DMA dmaengine: fsl-qdma: fix duplicated argument to && ... commit 715d1285695382b5074e49a0fe475b9ba56a1101 Merge: 12fb2b993e15 f46e49a9cc38 Author: Linus Torvalds Date: Mon Jan 27 10:54:24 2020 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching updates from Jiri Kosina: "Fixes for selftests and samples for 'shadow variables' livepatching feature, from Petr Mladek" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: livepatch: Handle allocation failure in the sample of shadow variable API livepatch/samples/selftest: Use klp_shadow_alloc() API correctly livepatch/selftest: Clean up shadow variable names and type livepatch/sample: Use the right type for the leaking data pointer commit 12fb2b993e1508a0d9032a2314dfdda2a3a5535e Merge: 08c49dc13522 fef684af392b Author: Linus Torvalds Date: Mon Jan 27 10:48:30 2020 -0800 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Jiri Kosina: "This time it's surprisingly quiet (probably due to the christmas break): - Logitech HID++ protocol improvements from Mazin Rezk, Pedro Vanzella and Adrian Freund - support for hidraw uniq ioctl from Marcel Holtmann" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: logitech-hidpp: avoid duplicate error handling code in 'hidpp_probe()' hid-logitech-hidpp: read battery voltage from newer devices HID: logitech: Add MX Master 3 Mouse HID: logitech-hidpp: Support WirelessDeviceStatus connect events HID: logitech-hidpp: Support translations from short to long reports HID: hidraw: add support uniq ioctl commit 08c49dc135225ab29569df955114912544df5c53 Merge: 9e1af7567b26 cf85e7c7f437 Author: Linus Torvalds Date: Mon Jan 27 10:42:35 2020 -0800 Merge tag 'platform-drivers-x86-v5.6-1' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Andy Shevchenko: - Enable thermal policy for ASUS TUF FX705DY/FX505DY - Support left round button on ASUS N56VB - Support new Mellanox platforms of basic class VMOD0009 and VMOD0010 - Intel Comet Lake, Tiger Lake and Elkhart Lake support in the PMC driver - Big clean-up to Intel PMC core, PMC IPC and SCU IPC drivers - Touchscreen support for the PiPO W11 tablet * tag 'platform-drivers-x86-v5.6-1' of git://git.infradead.org/linux-platform-drivers-x86: (64 commits) platform/x86: intel_pmc_ipc: Switch to use driver->dev_groups platform/x86: intel_pmc_ipc: Propagate error from kstrtoul() platform/x86: intel_pmc_ipc: Use octal permissions in sysfs attributes platform/x86: intel_pmc_ipc: Get rid of unnecessary includes platform/x86: intel_pmc_ipc: Drop ipc_data_readb() platform/x86: intel_pmc_ipc: Drop intel_pmc_gcr_read() and intel_pmc_gcr_write() platform/x86: intel_pmc_ipc: Make intel_pmc_ipc_raw_cmd() static platform/x86: intel_pmc_ipc: Make intel_pmc_ipc_simple_command() static platform/x86: intel_pmc_ipc: Make intel_pmc_gcr_update() static platform/x86: intel_scu_ipc: Reformat kernel-doc comments of exported functions platform/x86: intel_scu_ipc: Drop intel_scu_ipc_raw_command() platform/x86: intel_scu_ipc: Drop intel_scu_ipc_io[read|write][8|16]() platform/x86: intel_scu_ipc: Drop unused macros platform/x86: intel_scu_ipc: Drop unused prototype intel_scu_ipc_fw_update() platform/x86: intel_scu_ipc: Sleeping is fine when polling platform/x86: intel_scu_ipc: Drop intel_scu_ipc_i2c_cntrl() platform/x86: intel_scu_ipc: Remove Lincroft support platform/x86: intel_scu_ipc: Add constants for register offsets platform/x86: intel_scu_ipc: Fix interrupt support platform/x86: intel_scu_ipcutil: Remove default y from Kconfig ... commit 9e1af7567b266dc6c3c8fd434ea807b3206bfdc1 Merge: b9b627a44988 533a6cfe08f9 Author: Linus Torvalds Date: Mon Jan 27 10:30:42 2020 -0800 Merge tag 'mmc-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "There are no updates for the MEMSTICK subsystem this time. But note that I am also carrying a patch from the pinctrl tree, which has been shared through an immutable branch. Summary: MMC core: - Convert to reasonable timeouts for all CMD6 commands (updates for BKOPS, CACHE_FLUSH and INAND_CMD38_ARG_EXT_CSD) for eMMC - Respect f_max clock rate at card initialization - Add gpiod_toggle_active_low() API - Consolidate slot-gpio code by using gpiod_toggle_active_low() MMC host: - Add pinctrl_select_default_state() API - Consolidate pintctrl code by using pinctrl_select_default_state() - mmci: Support any block sizes for SDIO for some variants - mmci: Enable reset control for stm32_sdmmc - mmc_spi: Toggle SPI_CS_HIGH polarity rather than hard-coding it - renesas_sdhi: Add support for the r8a77961 variant - renesas_sdhi: A few minor improvements - rockchip-dw-mshc: Add support for the rk3308 variant - sdhci: Enable support for external DMA controllers - sdhci: Fixup error path when sending CMD12 - sdhci-brcmstb: Add support for 7216b0 variant - sdhci-brcmstb: Add support for command queuing (CQHCI) - sdhci-brcmstb: Add support for eMMC HS400ES mode - sdhci-msm: Add support for the sc7180 variant - sdhci-msm: Add support for command queuing (CQHCI) - sdhci-of-at91: Add support for the SAM9x60 variant - sdhci-of-at91: Improve support for tunings - sdhci-of-esdhc: A few fixups for some clock related issues - sdhci-omap: Add support for the am335x and the am437x variants - sdhci-omap: Improve support for erase operations - sdhci-omap: Add support for external DMA" * tag 'mmc-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (89 commits) mmc: core: Default to generic_cmd6_time as timeout in __mmc_switch() mmc: block: Use generic_cmd6_time when modifying INAND_CMD38_ARG_EXT_CSD mmc: core: Specify timeouts for BKOPS and CACHE_FLUSH for eMMC mmc: sdhci-cadence: remove unneeded 'inline' marker dt-bindings: mmc: rockchip-dw-mshc: add description for rk3308 dt-bindings: mmc: convert rockchip dw-mshc bindings to yaml dt-bindings: mmc: convert synopsys dw-mshc bindings to yaml mmc: sdhci-msm: Add CQHCI support for sdhci-msm mmc: sdhci: Let a vendor driver supply and update ADMA descriptor size mmc: sdhci-of-esdhc: fix serious issue clock is always disabled mmc: sdhci-of-esdhc: fix transfer mode register reading mmc: sdhci-brcmstb: Fix incorrect switch to HS mode mmc: sdhci-brcmstb: Add support for Command Queuing (CQE) mmc: sdhci-brcmstb: Add shutdown callback mmc: sdhci-brcmstb: Fix driver to defer on clk_get defer mmc: sdhci-brcmstb: Add ability to use HS400ES transfer mode dt-bindings: mmc: brcm,sdhci-brcmstb: Add support for 7216b0 mmc: core: limit probe clock frequency to configured f_max mmc: sdhci-milbeaut: Remove redundant platform_get_irq error message mmc: sdhci: fix an issue of mixing different types ... commit b9b627a449889e9dacfe9e7ac3cdf829a0004845 Merge: 067ba54c7a7d 3952cf8ff2f7 Author: Linus Torvalds Date: Mon Jan 27 10:28:43 2020 -0800 Merge tag 'i3c/for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3c updates from Boris Brezillon: "Core changes: - Make i3c_bus_set_mode() static Driver changes: - Add a per-SoC data_hold_delay property to the Cadence driver - Fix formatting issues in the 'CADENCE I3C MASTER IP' MAINTAINERS entry - Use devm_platform_ioremap_resource() where appropriate - Adjust DesignWare reattach logic" * tag 'i3c/for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: i3c: master: dw: reattach device on first available location of address table i3c: master: cdns: convert to devm_platform_ioremap_resource i3c: master: dw: convert to devm_platform_ioremap_resource MAINTAINERS: fix style in CADENCE I3C MASTER IP entry i3c: master: make i3c_bus_set_mode static i3c: master: cdns: add data hold delay support commit 98ff5c262f27aafee077a4c096f71a8566e9e948 Author: Guennadi Liakhovetski Date: Fri Jan 24 15:36:25 2020 -0600 ASoC: Intel: consistent HDMI codec probing code Multiple Intel ASoC machine drivers repeat the same pattern in their .late_probe() methods: they first check whether the common HDMI codec driver is used, if not, they proceed by linking the legacy HDMI driver to each HDMI port. While doing that they use some inconsistent code: 1. after the loop they check, whether the list contained at least one element and if not, they return an error. However, the earlier code to use the common HDMI driver uses the first element of the same list without checking. To fix this we move the check to the top of the function. 2. some of those .late_probe() implementations execute code, only needed for the common HDMI driver, before checking, whether the driver is used. Move the code to after the check. 3. Some of those functions also perform a redundant initialisation of the "err" variable. This patch fixes those issues. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200124213625.30186-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit bd01cf38eedceb87d43f9205a75b259361e056ea Author: Bard Liao Date: Fri Jan 24 15:36:24 2020 -0600 ASoC: intel: soc-acpi-intel-icl-match: fix rt715 ADR Fix the part id of rt715 (typo with zero in the wrong place) Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200124213625.30186-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e3b9f5f4ef92801f62c58665283c61cece0af905 Author: Pan Xiuli Date: Fri Jan 24 15:36:23 2020 -0600 ASoC: SOF: pci: add missing default_fw_name of JasperLake jsl_desc missed default_fw_name, this will fail the probe in nocodec or generice HDA mode due the firmware path is intel/sof/(null) Signed-off-by: Pan Xiuli Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200124213625.30186-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e6110114d18d330c05fd6de9f31283fd086a5a3a Author: Kai Vehmanen Date: Fri Jan 24 15:36:22 2020 -0600 ASoC: SOF: trace: fix unconditional free in trace release Check if DMA pages were successfully allocated in initialization before calling free. For many types of memory (like sgbufs) the extra free is harmless, but not all backends track allocation state, so add an explicit check. Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200124213625.30186-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 410e5e55c9c1c9c0d452ac5b9adb37b933a7747e Author: Pierre-Louis Bossart Date: Fri Jan 24 15:36:21 2020 -0600 ASoC: SOF: core: release resources on errors in probe_continue The initial intent of releasing resources in the .remove does not work well with HDaudio codecs. If the probe_continue() fails in a work queue, e.g. due to missing firmware or authentication issues, we don't release any resources, and as a result the kernel oopses during suspend operations. The suggested fix is to release all resources during errors in probe_continue(), and use fw_state to track resource allocation state, so that .remove does not attempt to release the same hardware resources twice. PM operations are also modified so that no action is done if DSP resources have been freed due to an error at probe. Reported-by: Takashi Iwai Co-developed-by: Kai Vehmanen Signed-off-by: Kai Vehmanen Bugzilla: http://bugzilla.suse.com/show_bug.cgi?id=1161246 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200124213625.30186-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown Cc: stable@vger.kernel.org commit 37e97e6faeabda405d0c4319f8419dcc3da14b2b Author: Pierre-Louis Bossart Date: Fri Jan 24 15:36:20 2020 -0600 ASoC: SOF: core: free trace on errors free_trace() is not called on probe errors, fix Reviewed-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200124213625.30186-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown Cc: stable@vger.kernel.org commit 4f7f9564a8937f38f97e8624cb7d6a28ee35f7cb Author: Guennadi Liakhovetski Date: Fri Jan 24 15:36:19 2020 -0600 ASoC: SOF: fix an Oops, caused by invalid topology It is possible to create invalid topology that will cause a kernel Oops when trying to allocate buffers for a NULL substream. Specifically such an Oops was caused by a topology, where a DAI on a capture pipeline was referencing the PCM ID from a playback pipeline. Fix the Oops by explicitly checking for NULL. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200124213625.30186-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 90b141614a4133ffeb1075049a49c702f98e26df Author: Ravulapati Vishnu vardhan rao Date: Mon Jan 27 16:56:03 2020 +0530 ASoC: amd: Fix for Subsequent Playback issue. If we play audio back to back, which kills one playback and immediately start another, we can hear clicks. This patch fixes the issue. Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/1580124397-19842-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit 0c75419a94a20b2bf791825a665d8b64cf7c560d Author: Kai Vehmanen Date: Mon Jan 20 18:01:16 2020 +0200 ASoC: SOF: Intel: do not disable i915 power during probe Change HDA probe behaviour slightly so that i915 power is not turned off if i915 audio codecs are found in the initial probe done by SOF Intel driver, and power is kept on until HDA codec driver probe runs. This will reduce number of mode sets on platforms with low minimum CDCLK (like GLK) and brings the SOF probe sequence closer to legacy HDA driver in terms of i915 audio codec power management. BugLink: https://github.com/thesofproject/linux/issues/1642 Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200120160117.29130-3-kai.vehmanen@linux.intel.com Pierre-Louis Bossart Signed-off-by: Mark Brown commit 23ee09032d44736c5e8c7becbe03170dbc6f2e8d Author: Kai Vehmanen Date: Mon Jan 20 18:01:15 2020 +0200 ASoC: SOF: Intel: refactor i915_get/put functions The current interface to control i915 display power is misleading. The hda_codec_i915_get() and hda_codec_i915_put() names suggest a refcounting based interface. This is confusing as no refcounting is done and the underlying HDAC library interface does not support refcounts eithers. Clarify the code by replacing the functions with a single hda_codec_i915_display_power() that is aligned with snd_hdac_display_power(). Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200120160117.29130-2-kai.vehmanen@linux.intel.com Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit ac87813d4372f4c005264acbe3b7f00c1dee37c4 Author: Matthieu Baerts Date: Tue Oct 22 19:12:20 2019 +0200 selftests: settings: tests can be in subsubdirs Commit 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second timeout per test") adds support for a new per-test-directory "settings" file. But this only works for tests not in a sub-subdirectories, e.g. - tools/testing/selftests/rtc (rtc) is OK, - tools/testing/selftests/net/mptcp (net/mptcp) is not. We have to increase the timeout for net/mptcp tests which are not upstreamed yet but this fix is valid for other tests if they need to add a "settings" file, see the full list with: tools/testing/selftests/*/*/**/Makefile Note that this patch changes the text header message printed at the end of the execution but this text is modified only for the tests that are in sub-subdirectories, e.g. ok 1 selftests: net/mptcp: mptcp_connect.sh Before we had: ok 1 selftests: mptcp: mptcp_connect.sh But showing the full target name is probably better, just in case a subsubdir has the same name as another one in another subdirectory. Fixes: 852c8cbf34d3 (selftests/kselftest/runner.sh: Add 45 second timeout per test) Signed-off-by: Matthieu Baerts Reviewed-by: Kees Cook Signed-off-by: Shuah Khan commit 067ba54c7a7d4cb76da4c8434bd6f117b61ac8ee Merge: 30f5a7564099 82c881b28aa8 Author: Linus Torvalds Date: Mon Jan 27 09:25:59 2020 -0800 Merge branch 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 microcode update from Borislav Petkov: "Another boring branch this time around: mark a stub function inline, by Valdis Kletnieks" * 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode/AMD: Make stub function static inline commit e4e4c2ff78edd2f9c7d2d3e588ca68ffa1dd8dc8 Merge: ebe0bdf9cfb9 44e9b3446423 Author: Mark Brown Date: Mon Jan 27 17:24:38 2020 +0000 Merge branch 'regulator-5.6' into regulator-next commit 44e9b3446423164dd04f58a5f9efd988c4d5e84b Author: Saravanan Sekar Date: Thu Jan 23 22:53:38 2020 +0100 dt-bindings: regulator: add document bindings for mpq7920 Add device tree binding information for mpq7920 regulator driver. Example bindings for mpq7920 are added. Signed-off-by: Saravanan Sekar Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200123215338.11109-1-sravanhome@gmail.com Signed-off-by: Mark Brown commit 30f5a75640998900d995e099e060e920e72790b2 Merge: b62061b82a6e 86e9f9d60eb5 Author: Linus Torvalds Date: Mon Jan 27 09:19:35 2020 -0800 Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS updates from Borislav Petkov: - Misc fixes to the MCE code all over the place, by Jan H. Schönherr. - Initial support for AMD F19h and other cleanups to amd64_edac, by Yazen Ghannam. - Other small cleanups. * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: EDAC/mce_amd: Make fam_ops static global EDAC/amd64: Drop some family checks for newer systems EDAC/amd64: Add family ops for Family 19h Models 00h-0Fh x86/amd_nb: Add Family 19h PCI IDs EDAC/mce_amd: Always load on SMCA systems x86/MCE/AMD, EDAC/mce_amd: Add new Load Store unit McaType x86/mce: Fix use of uninitialized MCE message string x86/mce: Fix mce=nobootlog x86/mce: Take action on UCNA/Deferred errors again x86/mce: Remove mce_inject_log() in favor of mce_log() x86/mce: Pass MCE message to mce_panic() on failed kernel recovery x86/mce/therm_throt: Mark throttle_active_work() as __maybe_unused commit b62061b82a6e6783bed5f9052326694ba1418bba Merge: 35417d57efaa 7e5d6cf35329 Author: Linus Torvalds Date: Mon Jan 27 09:16:22 2020 -0800 Merge tag 'edac_for_5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC updates from Borislav Petkov: "A totally boring branch this time around: a garden variety of small fixes all over the place" * tag 'edac_for_5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/amd64: Do not warn when removing instances EDAC/sifive: Fix return value check in ecc_register() EDAC/aspeed: Remove unneeded semicolon EDAC: remove set but not used variable 'ecc_loc' EDAC: skx_common: downgrade message importance on missing PCI device EDAC/Kconfig: Fix Kconfig indentation commit 35417d57efaaf06894868a2e8dfcd7b9f31bd0bf Merge: 189fc98efe59 fd8bdb23b918 Author: Linus Torvalds Date: Mon Jan 27 09:14:11 2020 -0800 Merge tag 'hwmon-for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "core: - Add support for enable attributes to hwmon core - Add intrusion templates pmbus: - Support for Infineon Multi-phase xdpe122 family controllers - Support for Intel IMVP9 and AMD 6.25mV modes - Support for vid mode detection per page bases - Detect if chip is write protected - Support for MAX20730, MAX20734, MAX20743, MAX20796, UCD90320, TPS53688 - Various improvements to ibm-cffps driver k10temp: - Support for additional temperature sensors as well as voltage and current telemetry for Zen CPUs w83627ehf: - Remove support for NCT6775, NCT6776 (they have their own driver) New drivers: - ADM1177 - MAX31730 - Driver for disk and solid state drives with temperature sensors Other: - pwm-fan: stop fan on shutdown" * tag 'hwmon-for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (35 commits) hwmon: (k10temp) Display up to eight sets of CCD temperatures hwmon: (k10temp) Add debugfs support hwmon: (k10temp) Don't show temperature limits on Ryzen (Zen) CPUs hwmon: (k10temp) Show core and SoC current and voltages on Ryzen CPUs hwmon: (k10temp) Report temperatures per CPU die hmon: (k10temp) Convert to use devm_hwmon_device_register_with_info hwmon: (k10temp) Use bitops hwmon: (pwm-fan) stop fan on shutdown MAINTAINERS: add entry for ADM1177 driver dt-binding: hwmon: Add documentation for ADM1177 hwmon: (adm1177) Add ADM1177 Hot Swap Controller and Digital Power Monitor driver docs: hwmon: Include 'xdpe12284.rst' into docs hwmon: (pmbus) Add support for Infineon Multi-phase xdpe122 family controllers hwmon: (pmbus/tps53679) Extend device list supported by driver hwmon: (pmbus/core) Add support for Intel IMVP9 and AMD 6.25mV modes hwmon: (pmbus/core) Add support for vid mode detection per page bases hwmon: (pmbus/ibm-cffps) Prevent writing on_off_config with bad data hwmon: (w83627ehf) Remove set but not used variable 'fan4min' hwmon: Driver for disk and solid state drives with temperature sensors hwmon: (pmbus/ibm-cffps) Fix the LED behavior when turned off ... commit 189fc98efe59b9b0a49a4f29ee3d91eeded4e4d4 Merge: f11ba7de1565 7084eddf6be9 Author: Linus Torvalds Date: Mon Jan 27 09:12:13 2020 -0800 Merge tag 'tpmdd-next-20200122' of git://git.infradead.org/users/jjs/linux-tpmdd Pull tpm updates from Jarkko Sakkinen: "This adds a new sysfs file for querying TPM major version, which can be used by the user space the TPM protocol used to communicate with the chip" * tag 'tpmdd-next-20200122' of git://git.infradead.org/users/jjs/linux-tpmdd: tpm: Add tpm_version_major sysfs file tpm: Update mailing list contact information in sysfs-class-tpm commit f11ba7de156558ac5e78e285dbf9e9af60ceb2a8 Merge: 0238d3c75303 6aabc1facdb2 Author: Linus Torvalds Date: Mon Jan 27 09:05:55 2020 -0800 Merge tag 'm68k-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - wire up clone3() syscall - defconfig updates * tag 'm68k-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: Implement copy_thread_tls() m68k: defconfig: Update defconfigs for v5.5-rc3 m68k: Wire up clone3() syscall commit 0238d3c75303d63839ca20e71e4993fdab3fec7b Merge: d5226fa6dbae e533dbe9dcb1 Author: Linus Torvalds Date: Mon Jan 27 08:58:19 2020 -0800 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: "The changes are a real mixed bag this time around. The only scary looking one from the diffstat is the uapi change to asm-generic/mman-common.h, but this has been acked by Arnd and is actually just adding a pair of comments in an attempt to prevent allocation of some PROT values which tend to get used for arch-specific purposes. We'll be using them for Branch Target Identification (a CFI-like hardening feature), which is currently under review on the mailing list. New architecture features: - Support for Armv8.5 E0PD, which benefits KASLR in the same way as KPTI but without the overhead. This allows KPTI to be disabled on CPUs that are not affected by Meltdown, even is KASLR is enabled. - Initial support for the Armv8.5 RNG instructions, which claim to provide access to a high bandwidth, cryptographically secure hardware random number generator. As well as exposing these to userspace, we also use them as part of the KASLR seed and to seed the crng once all CPUs have come online. - Advertise a bunch of new instructions to userspace, including support for Data Gathering Hint, Matrix Multiply and 16-bit floating point. Kexec: - Cleanups in preparation for relocating with the MMU enabled - Support for loading crash dump kernels with kexec_file_load() Perf and PMU drivers: - Cleanups and non-critical fixes for a couple of system PMU drivers FPU-less (aka broken) CPU support: - Considerable fixes to support CPUs without the FP/SIMD extensions, including their presence in heterogeneous systems. Good luck finding a 64-bit userspace that handles this. Modern assembly function annotations: - Start migrating our use of ENTRY() and ENDPROC() over to the new-fangled SYM_{CODE,FUNC}_{START,END} macros, which are intended to aid debuggers Kbuild: - Cleanup detection of LSE support in the assembler by introducing 'as-instr' - Remove compressed Image files when building clean targets IP checksumming: - Implement optimised IPv4 checksumming routine when hardware offload is not in use. An IPv6 version is in the works, pending testing. Hardware errata: - Work around Cortex-A55 erratum #1530923 Shadow call stack: - Work around some issues with Clang's integrated assembler not liking our perfectly reasonable assembly code - Avoid allocating the X18 register, so that it can be used to hold the shadow call stack pointer in future ACPI: - Fix ID count checking in IORT code. This may regress broken firmware that happened to work with the old implementation, in which case we'll have to revert it and try something else - Fix DAIF corruption on return from GHES handler with pseudo-NMIs Miscellaneous: - Whitelist some CPUs that are unaffected by Spectre-v2 - Reduce frequency of ASID rollover when KPTI is compiled in but inactive - Reserve a couple of arch-specific PROT flags that are already used by Sparc and PowerPC and are planned for later use with BTI on arm64 - Preparatory cleanup of our entry assembly code in preparation for moving more of it into C later on - Refactoring and cleanup" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (73 commits) arm64: acpi: fix DAIF manipulation with pNMI arm64: kconfig: Fix alignment of E0PD help text arm64: Use v8.5-RNG entropy for KASLR seed arm64: Implement archrandom.h for ARMv8.5-RNG arm64: kbuild: remove compressed images on 'make ARCH=arm64 (dist)clean' arm64: entry: Avoid empty alternatives entries arm64: Kconfig: select HAVE_FUTEX_CMPXCHG arm64: csum: Fix pathological zero-length calls arm64: entry: cleanup sp_el0 manipulation arm64: entry: cleanup el0 svc handler naming arm64: entry: mark all entry code as notrace arm64: assembler: remove smp_dmb macro arm64: assembler: remove inherit_daif macro ACPI/IORT: Fix 'Number of IDs' handling in iort_id_map() mm: Reserve asm-generic prot flags 0x10 and 0x20 for arch use arm64: Use macros instead of hard-coded constants for MAIR_EL1 arm64: Add KRYO{3,4}XX CPU cores to spectre-v2 safe list arm64: kernel: avoid x18 in __cpu_soft_restart arm64: kvm: stop treating register x18 as caller save arm64/lib: copy_page: avoid x18 register in assembler code ... commit 4575243c5c173f8adbc08a5c6ea2269742ea2b47 Merge: 701ddf0bbfc7 d85339d9ea26 Author: Miquel Raynal Date: Mon Jan 27 17:49:15 2020 +0100 Merge tag 'nand/for-5.6' into mtd/next Raw NAND * Macronix: Use match_string() helper * Atmel: switch to using devm_fwnode_gpiod_get() * Denali: rework the SKIP_BYTES feature and add reset controlling * Brcmnand: set appropriate DMA mask * Various cleanup. Onenand drivers * Rename Samsung and Omap2 drivers to avoid possible build warnings * Enable compile testing * Various build issues * Kconfig cleanup SPI-NAND * Support for Toshiba TC58CVG2S0HRAIJ commit 701ddf0bbfc761b8bdc974ce9c4e05f9833683e3 Merge: 0dcf2572710d ccfb9299a0b6 Author: Miquel Raynal Date: Mon Jan 27 17:48:30 2020 +0100 Merge tag 'spi-nor/for-5.6' into mtd/next SPI NOR core changes: - Add support for TB selection using SR bit 6, - Add support for few flashes. commit 90fb04f890bcb7384b4d4c216dc2640b0a870df3 Merge: 9b132f2764e5 a7196caf83ea Author: Takashi Iwai Date: Mon Jan 27 17:45:44 2020 +0100 Merge tag 'asoc-v5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v5.6 A pretty big release this time around, a lot of new drivers and both Morimoto-san and Takashi were doing subsystem wide updates as well: - Further big refactorings from Morimoto-san simplifying the core interfaces and moving things to the component level. - Transition of drivers to managed buffer allocation and removal of redundant PCM ioctls. - New driver support for Ingenic JZ4770, Mediatek MT6660, Qualcomm WCD934x and WSA881x, and Realtek RT700, RT711, RT715, RT1011, RT1015 and RT1308. commit 0dcf2572710d68c305e58946c435ddf67ea16bf3 Author: Miquel Raynal Date: Wed Nov 13 18:15:02 2019 +0100 mtd: concat: Fix a comment referring to an unknown symbol Fix the comment describing what the mtd_concat_destroy() function does. It referrers to the concat_mtd_devs symbol which has never existed (at least not since the beginning of the Git era). Signed-off-by: Miquel Raynal commit baebaa2b13d92bd588ed8d06b28d787611b52a46 Author: Brendan Higgins Date: Wed Dec 11 11:27:37 2019 -0800 mtd: rawnand: add unspecified HAS_IOMEM dependency Currently CONFIG_MTD_NAND_CADENCE implicitly depends on CONFIG_HAS_IOMEM=y; consequently, on architectures without IOMEM we get the following build error: ld: drivers/mtd/nand/raw/cadence-nand-controller.o: in function `cadence_nand_dt_probe.cold.31': drivers/mtd/nand/raw/cadence-nand-controller.c:2969: undefined reference to `devm_platform_ioremap_resource' ld: drivers/mtd/nand/raw/cadence-nand-controller.c:2977: undefined reference to `devm_ioremap_resource' Fix the build error by adding the unspecified dependency. Reported-by: Brendan Higgins Signed-off-by: Brendan Higgins Signed-off-by: Miquel Raynal commit 20279420ae3a8ef4c5d9fedc360a2c37a1dbdf1b Author: Steven Rostedt (VMware) Date: Fri Jan 24 10:07:42 2020 -0500 tracing/kprobes: Have uname use __get_str() in print_fmt Thomas Richter reported: > Test case 66 'Use vfs_getname probe to get syscall args filenames' > is broken on s390, but works on x86. The test case fails with: > > [root@m35lp76 perf]# perf test -F 66 > 66: Use vfs_getname probe to get syscall args filenames > :Recording open file: > [ perf record: Woken up 1 times to write data ] > [ perf record: Captured and wrote 0.004 MB /tmp/__perf_test.perf.data.TCdYj\ > (20 samples) ] > Looking at perf.data file for vfs_getname records for the file we touched: > FAILED! > [root@m35lp76 perf]# The root cause was the print_fmt of the kprobe event that referenced the "ustring" > Setting up the kprobe event using perf command: > > # ./perf probe "vfs_getname=getname_flags:72 pathname=filename:ustring" > > generates this format file: > [root@m35lp76 perf]# cat /sys/kernel/debug/tracing/events/probe/\ > vfs_getname/format > name: vfs_getname > ID: 1172 > format: > field:unsigned short common_type; offset:0; size:2; signed:0; > field:unsigned char common_flags; offset:2; size:1; signed:0; > field:unsigned char common_preempt_count; offset:3; size:1; signed:0; > field:int common_pid; offset:4; size:4; signed:1; > > field:unsigned long __probe_ip; offset:8; size:8; signed:0; > field:__data_loc char[] pathname; offset:16; size:4; signed:1; > > print fmt: "(%lx) pathname=\"%s\"", REC->__probe_ip, REC->pathname Instead of using "__get_str(pathname)" it referenced it directly. Link: http://lkml.kernel.org/r/20200124100742.4050c15e@gandalf.local.home Cc: stable@vger.kernel.org Fixes: 88903c464321 ("tracing/probe: Add ustring type for user-space string") Acked-by: Masami Hiramatsu Reported-by: Thomas Richter Tested-by: Thomas Richter Signed-off-by: Steven Rostedt (VMware) commit c3917a04843fa38d9e3926e7508813e115d3df78 Author: Liu Song Date: Fri Nov 29 22:33:52 2019 +0800 mtd: block2mtd: page index should use pgoff_t Page index use pgoff_t to prevent risk of truncation. Signed-off-by: Liu Song Signed-off-by: Miquel Raynal commit 0bc448b49e8a017e16edf843baf5b4221e191b1f Author: Geert Uytterhoeven Date: Mon Dec 9 14:48:23 2019 +0100 mtd: maps: physmap: Add minimal Runtime PM support Add minimal runtime PM support (enable on probe, disable on remove), to ensure proper operation with a parent device that uses runtime PM. This is needed on systems where the FLASH is connected to a bus controller that is contained in a PM domain and/or has a gateable functional clock. In such cases, before accessing any device connected to the external bus, the PM domain must be powered up, and/or the functional clock must be enabled, which is typically handled through runtime PM by the bus controller driver. An example of this is the Renesas APE6-EVM development board, which has an Ethernet controller and a CFI FLASH connected to the Bus State Controller (BSC) of an R-Mobile APE6 SoC. As long as the Ethernet driver, which had Runtime PM support since commit 3a611e26e958b037 ("net/smsc911x: Add minimal runtime PM support"), keeps the BSC powered, accessing the FLASH works. When the ethernet node in r8a73a4-ape6evm.dts is disabled, the BSC is never powered up, and the kernel crashes when trying to access the FLASH: Unhandled fault: imprecise external abort (0x1406) at 0x00000000 pgd = (ptrval) [00000000] *pgd=7fef2835 Internal error: : 1406 [#1] SMP ARM CPU: 0 PID: 122 Comm: hd Tainted: G W 5.5.0-rc1-ape6evm-00814-g38ca966db25b9dbd-dirty #136 Hardware name: Generic R8A73A4 (Flattened Device Tree) PC is at chip_ready+0x12c/0x380 LR is at chip_ready+0x10c/0x380 Signed-off-by: Geert Uytterhoeven Signed-off-by: Miquel Raynal commit 2a0b390b472b7be8909beb77d47db361b613cdc8 Author: Jia-Ju Bai Date: Thu Dec 19 11:20:23 2019 +0800 mtd: maps: pcmciamtd: fix possible sleep-in-atomic-context bugs in pcmciamtd_set_vpp() The driver may sleep while holding a spinlock. The function call path (from bottom to top) in Linux 4.19 is: drivers/pcmcia/pcmcia_resource.c, 312: mutex_lock in pcmcia_fixup_vpp drivers/mtd/maps/pcmciamtd.c, 309: pcmcia_fixup_vpp in pcmciamtd_set_vpp drivers/mtd/maps/pcmciamtd.c, 306: _raw_spin_lock_irqsave in pcmciamtd_set_vpp drivers/pcmcia/pcmcia_resource.c, 312: mutex_lock in pcmcia_fixup_vpp drivers/mtd/maps/pcmciamtd.c, 312: pcmcia_fixup_vpp in pcmciamtd_set_vpp drivers/mtd/maps/pcmciamtd.c, 306: _raw_spin_lock_irqsave in pcmciamtd_set_vp mutex_lock() may sleep at runtime. To fix these bugs, the spinlock is replaced with a mutex. These bugs are found by a static analysis tool STCheck written by myself. Signed-off-by: Jia-Ju Bai Reviewed-by: Dominik Brodowski Signed-off-by: Miquel Raynal commit 3325322f773bae68b20d8fa0e9e8ebb005271db5 Author: Hannes Reinecke Date: Thu Jan 23 13:44:33 2020 +0100 rbd: set the 'device' link in sysfs The rbd driver already provides additional information in sysfs under /sys/bus/rbd, so we should set the 'device' link in the block device to reference this information. Signed-off-by: Hannes Reinecke Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 24604f7e2bde5e6458812c3e9ee2a0d60c8c99fe Author: Jeff Layton Date: Mon Jan 6 19:05:19 2020 -0500 ceph: move net/ceph/ceph_fs.c to fs/ceph/util.c All of these functions are only called from CephFS, so move them into ceph.ko, and drop the exports. Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit d36e0b620aa53d9a33c739f0368e85707a997430 Author: Jeff Layton Date: Tue Jan 7 13:12:57 2020 -0500 ceph: print name of xattr in __ceph_{get,set}xattr() douts Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 3c802092dab69351b1c2e52a2250f47d5bf60253 Author: Xiubo Li Date: Wed Jan 1 22:09:37 2020 -0500 ceph: print r_direct_hash in hex in __choose_mds() dout It's hard to read, especially when it is: ceph: __choose_mds 00000000b7bc9c15 is_hash=1 (-271041095) mode 0 At the same time, switch to __func__ to get rid of the checkpatch warning. Signed-off-by: Xiubo Li Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit 78beb0ff2feceb1d7568333f93195e1a4d95a49a Author: Luis Henriques Date: Wed Jan 8 10:03:53 2020 +0000 ceph: use copy-from2 op in copy_file_range Instead of using the copy-from operation, switch copy_file_range to the new copy-from2 operation, which allows to send the truncate_seq and truncate_size parameters. If an OSD does not support the copy-from2 operation it will return -EOPNOTSUPP. In that case, the kernel client will stop trying to do remote object copies for this fs client and will always use the generic VFS copy_file_range. Signed-off-by: Luis Henriques Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 045100cd79f503487b95a1d11e96b221fe50693c Author: Jeff Layton Date: Fri Nov 15 09:13:59 2019 -0500 ceph: close holes in structs ceph_mds_session and ceph_mds_request Move s_ref up to plug a 4 byte hole, which plugs another. Move r_kref to shave 8 bytes off per request on x86_64. Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit a55e601b2f02df5db7070e9a37bd655c9c576a52 Author: Arnd Bergmann Date: Tue Jan 7 22:01:04 2020 +0100 rbd: work around -Wuninitialized warning gcc -O3 warns about a dummy variable that is passed down into rbd_img_fill_nodata without being initialized: drivers/block/rbd.c: In function 'rbd_img_fill_nodata': drivers/block/rbd.c:2573:13: error: 'dummy' is used uninitialized in this function [-Werror=uninitialized] fctx->iter = *fctx->pos; Since this is a dummy, I assume the warning is harmless, but it's better to initialize it anyway and avoid the warning. Fixes: mmtom ("init/Kconfig: enable -O3 for all arches") Signed-off-by: Arnd Bergmann Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 9ba1e224538a021b989302bb2777abc7a3b3ec79 Author: Xiubo Li Date: Wed Jan 8 05:17:31 2020 -0500 ceph: allocate the correct amount of extra bytes for the session features The total bytes may potentially be larger than 8. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 5b3248c6772459a0737afe0c85bb45ee3ba79eeb Author: Xiubo Li Date: Thu Dec 19 19:44:09 2019 -0500 ceph: rename get_session and switch to use ceph_get_mds_session Just in case the session's refcount reach 0 and is releasing, and if we get the session without checking it, we may encounter kernel crash. Rename get_session to ceph_get_mds_session and make it global. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 4fbc0c711b2464ee1551850b85002faae0b775d5 Author: Xiubo Li Date: Fri Dec 20 09:34:04 2019 -0500 ceph: remove the extra slashes in the server path It's possible to pass the mount helper a server path that has more than one contiguous slash character. For example: $ mount -t ceph 192.168.195.165:40176:/// /mnt/cephfs/ In the MDS server side the extra slashes of the server path will be treated as snap dir, and then we can get the following debug logs: ceph: mount opening path // ceph: open_root_inode opening '//' ceph: fill_trace 0000000059b8a3bc is_dentry 0 is_target 1 ceph: alloc_inode 00000000dc4ca00b ceph: get_inode created new inode 00000000dc4ca00b 1.ffffffffffffffff ino 1 ceph: get_inode on 1=1.ffffffffffffffff got 00000000dc4ca00b And then when creating any new file or directory under the mount point, we can hit the following BUG_ON in ceph_fill_trace(): BUG_ON(ceph_snap(dir) != dvino.snap); Have the client ignore the extra slashes in the server path when mounting. This will also canonicalize the path, so that identical mounts can be consilidated. 1) "//mydir1///mydir//" 2) "/mydir1/mydir" 3) "/mydir1/mydir/" Regardless of the internal treatment of these paths, the kernel still stores the original string including the leading '/' for presentation to userland. URL: https://tracker.ceph.com/issues/42771 Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit b38c9eb4757d5bac1eb8634a9516ef918fca2525 Author: Xiubo Li Date: Wed Dec 4 06:57:39 2019 -0500 ceph: add possible_max_rank and make the code more readable The m_num_mds here is actually the number for MDSs which are in up:active status, and it will be duplicated to m_num_active_mds, so remove it. Add possible_max_rank to the mdsmap struct and this will be the correctly possible largest rank boundary. Remove the special case for one mds in __mdsmap_get_random_mds(), because the validate mds rank may not always be 0. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 0eb308531f0776fc87f7a7eb4a8efe943d98ab8c Author: Xiubo Li Date: Wed Dec 18 21:15:18 2019 -0500 ceph: print dentry offset in hex and fix xattr_version type In the debug logs about the di->offset or ctx->pos it is in hex format, but some others are using the dec format. It is a little hard to read. For the xattr version, it is u64 type, using a shorter type may truncate it. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 9f8b72b3a9485d659410989c6daf5467ebe264ea Author: Xiubo Li Date: Mon Dec 16 00:12:07 2019 -0500 ceph: only touch the caps which have the subset mask requested For the caps having no any subset mask requested we shouldn't touch them. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 893e456b2c0bae61e172d2600a89c96abf9b3daf Author: Jeff Layton Date: Wed Dec 11 15:21:24 2019 -0500 ceph: don't clear I_NEW until inode metadata is fully populated Currently, we could have an open-by-handle (or NFS server) call into the filesystem and start working with an inode before it's properly filled out. Don't clear I_NEW until we have filled out the inode, and discard it properly if that fails. Note that we occasionally take an extra reference to the inode to ensure that we don't put the last reference in discard_new_inode, but rather leave it for ceph_async_iput. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit c4853e9776caefbd2f59739ce1a75798a2b4b7a5 Author: Xiubo Li Date: Mon Dec 9 07:47:15 2019 -0500 ceph: retry the same mds later after the new session is opened If max_mds > 1 and a request is submitted that chooses a random mds rank, and the relating session is not opened yet, the request will wait until the session has been opened and resend again. Every time the request goes through __do_request, it will release the req->session first and choose a random one again, which may be a completely different rank than the one it just waited on. In the worst case, it will open all the mds sessions one by one just before the request can be successfully sent out. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 97820058fb2831a4b203981fa2566ceaaa396103 Author: Xiubo Li Date: Tue Dec 10 20:29:40 2019 -0500 ceph: check availability of mds cluster on mount after wait timeout If all the MDS daemons are down for some reason, then the first mount attempt will fail with EIO after the mount request times out. A mount attempt will also fail with EIO if all of the MDS's are laggy. This patch changes the code to return -EHOSTUNREACH in these situations and adds a pr_info error message to help the admin determine the cause. URL: https://tracker.ceph.com/issues/4386 Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 4d681c2f9141cf50261eef85b3233151c83d068b Author: Xiubo Li Date: Thu Dec 5 22:35:51 2019 -0500 ceph: keep the session state until it is released When reconnecting the session but if it is denied by the MDS due to client was in blacklist or something else, kclient will receive a session close reply, and we will never see the important log: "ceph: mds%d reconnect denied" And with the confusing log: "ceph: handle_session mds0 close 0000000085804730 state ??? seq 0" Let's keep the session state until its memories is released. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 9cf54563b090f52db10ae6ebdca29dcc76bc7f34 Author: Xiubo Li Date: Thu Dec 5 20:50:21 2019 -0500 ceph: add __send_request helper Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 9a6bed4fe0c8bf57785cbc4db9f86086cb9b193d Author: Jeff Layton Date: Thu Dec 5 08:41:25 2019 -0500 ceph: ensure we have a new cap before continuing in fill_inode If the caller passes in a NULL cap_reservation, and we can't allocate one then ensure that we fail gracefully. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 57c219948245cb1e8970040a365058baab450316 Author: Jeff Layton Date: Wed Dec 4 15:28:17 2019 -0500 ceph: drop unused ttl_from parameter from fill_inode Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 07edc0571ef1b13e124b462aca8d09f79809d6dd Author: Xiubo Li Date: Wed Dec 4 01:27:18 2019 -0500 ceph: fix possible long time wait during umount During umount, if there has no any unsafe request in the mdsc and some requests still in-flight and not got reply yet, and if the rest requets are all safe ones, after that even all of them in mdsc are unregistered, the umount must wait until after mount_timeout seconds anyway. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 5d47648fe95412beffe2089d6d6484adb5ea0f96 Author: Xiubo Li Date: Tue Nov 26 07:24:22 2019 -0500 ceph: only choose one MDS who is in up:active state without laggy Even the MDS is in up:active state, but it also maybe laggy. Here will skip the laggy MDSs. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 4d7ace02ba5c6ef1f8eeb32a86fef7c528bd7f36 Author: Xiubo Li Date: Tue Nov 26 07:24:21 2019 -0500 ceph: fix mdsmap cluster available check based on laggy number In case the max_mds > 1 in MDS cluster and there is no any standby MDS and all the max_mds MDSs are in up:active state, if one of the up:active MDSs is dead, the m->m_num_laggy in kclient will be 1. Then the mount will fail without considering other healthy MDSs. There manybe some MDSs still "in" the cluster but not in up:active state, we will ignore them. Only when all the up:active MDSs in the cluster are laggy will treat the cluster as not be available. In case decreasing the max_mds, the cluster will not stop the extra up:active MDSs immediately and there will be a latency. During it the up:active MDS number will be larger than the max_mds, so later the m_info memories will 100% be reallocated. Here will pick out the up:active MDSs as the m_num_mds and allocate the needed memories once. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit d80865bff5201cc56bc247989ebbab6169b3a101 Author: Chengguang Xu Date: Fri Aug 17 22:05:31 2018 +0800 ceph: remove unnecessary assignment in ceph_pre_init_acls() ceph_pagelist_encode_string() will not fail in reserved case, also, we do not check err code here, so remove unnecessary assignment. Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit 8f5ac172abb79171eac9ecb7bedc071b56630097 Author: Chengguang Xu Date: Thu Jul 12 16:45:08 2018 +0800 ceph: delete redundant douts in con_get/put() We print session's refcount in debug message inside ceph_put_mds_session() and get_session(), so we don't have to print it in con_get()/__ceph_lookup_mds_session()/con_put(). Signed-off-by: Chengguang Xu Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit 8c30fa7666ff08dad632411d1a9b9883940e53ef Author: Brahadambal Srinivasan Date: Thu Jan 23 20:03:19 2020 +0530 Correction to manpage of cpupower Manpage of cpupower is listing wrong sub-commands in "See Also" section. The option for cpupower-idle(1) should actually be cpupower-idle-info(1) and cpupower-idle-set(1). This patch corrects this anomaly. Signed-off-by: Brahadambal Srinivasan Signed-off-by: Shuah Khan commit a832eb203ecd34e486bdde0042cf166e687eb227 Merge: 19d52e94e083 5e06d19694a4 Author: Olof Johansson Date: Mon Jan 27 07:36:40 2020 -0800 Merge tag 'davinci-for-v5.6/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into arm/late DaVinci SoC updates for v5.6 include migrating DM365 SoC to use drivers/clocksource based driver for timer. This leads to removal of machine specific timer driver. There are two patches adding missing fixed regulators for audio codecs on DM365 and DM644x EVMs. * tag 'davinci-for-v5.6/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: dm644x-evm: Add Fixed regulators needed for tlv320aic33 ARM: davinci: dm365-evm: Add Fixed regulators needed for tlv320aic3101 ARM: davinci: remove legacy timer support ARM: davinci: dm365: switch to using the clocksource driver clocksource: davinci: only enable clockevents once tim34 is initialized Link: https://lore.kernel.org/r/043eb5b2-a302-4de6-a3e8-8238e49483b1@ti.com/ Signed-off-by: Olof Johansson commit 057b52b4b3d58f4ee5944171da50f77b00a1bb0d Author: Marco Felsch Date: Wed Jan 15 17:23:07 2020 +0100 watchdog: da9062: make restart handler atomic safe The restart handler is executed during the shutdown phase which is atomic/irq-less. The i2c framework supports atomic transfers since commit 63b96983a5dd ("i2c: core: introduce callbacks for atomic transfers") to address this use case. Using regmap within an atomic context is allowed only if the regmap type is MMIO and the cache type 'flat' or no cache is used. Using the i2c_smbus_write_byte_data() function can be done without additional tests because: 1) the DA9062 is an i2c-only device and 2) the i2c framework emulates the smbus protocol if the host adapter does not support smbus_xfer by using the master_xfer. Signed-off-by: Marco Felsch Reviewed-by: Guenter Roeck Reviewed-by: Stefan Lengfeld Tested-by: Stefan Lengfeld Reviewed-by: Adam Thomson Link: https://lore.kernel.org/r/20200115162307.7336-1-m.felsch@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 9e5236e7cec110610f3bc824a4d535c1271e4bb5 Author: yong.liang Date: Wed Jan 15 16:58:28 2020 +0800 watchdog: mtk_wdt: mt2712: Add reset controller Add reset controller for 2712. Besides watchdog, MTK toprgu module alsa provide sub-system (eg, audio, camera, codec and connectivity) software reset functionality. Signed-off-by: yong.liang Signed-off-by: Jiaxin Yu Reviewed-by: Yingjoe Chen Reviewed-by: Philipp Zabel Acked-by: Matthias Brugger Link: https://lore.kernel.org/r/20200115085828.27791-5-yong.liang@mediatek.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit c254e103082b74e4f0987c364e5e3b138dbef1cc Author: yong.liang Date: Wed Jan 15 16:58:27 2020 +0800 watchdog: mtk_wdt: mt8183: Add reset controller Add reset controller API in watchdog driver. Besides watchdog, MTK toprgu module alsa provide sub-system (eg, audio, camera, codec and connectivity) software reset functionality. Signed-off-by: yong.liang Signed-off-by: Jiaxin Yu Reviewed-by: Yingjoe Chen Reviewed-by: Philipp Zabel Reviewed-by: Guenter Roeck Acked-by: Matthias Brugger Link: https://lore.kernel.org/r/20200115085828.27791-4-yong.liang@mediatek.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit fe42cc30a965143a10ed7823989b7e50d7529dac Author: yong.liang Date: Wed Jan 15 16:58:26 2020 +0800 dt-bindings: mediatek: mt2712: Add #reset-cells Add #reset-cells and update mtk-wdt.txt Signed-off-by: yong.liang Signed-off-by: Jiaxin Yu Reviewed-by: Yingjoe Chen Reviewed-by: Philipp Zabel Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200115085828.27791-3-yong.liang@mediatek.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f43f97a0fc0e568a6f68480b043e8f7fdfa8fb23 Author: yong.liang Date: Wed Jan 15 16:58:25 2020 +0800 dt-bindings: mediatek: mt8183: Add #reset-cells Add #reset-cells property and update example Signed-off-by: yong.liang Signed-off-by: Jiaxin Yu Reviewed-by: Yingjoe Chen Reviewed-by: Philipp Zabel Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200115085828.27791-2-yong.liang@mediatek.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit c514430c51ee83a40a31b98336d31dfaf736b9c4 Author: Marco Felsch Date: Wed Jan 8 10:57:03 2020 +0100 dt-bindings: watchdog: da9062: add suspend disable option Document the watchdog disable option which can be used if the hardware automatic suspend option is broken. Signed-off-by: Marco Felsch Reviewed-by: Adam Thomson Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200108095704.23233-3-m.felsch@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 6ae58eecad31362f5caa0bd44ff7e78fbac391dd Author: Vincent Prince Date: Thu Jan 23 15:05:44 2020 +0100 watchdog: it87_wdt: add IT8786 ID IT8786 watchdog works as in IT872x Tested on VECOW ECS-9000 board. Signed-off-by: Vincent Prince Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200123140544.25937-1-vincent.prince.fr@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e7046df873548bfc87c0c594ca473226c5d3317b Author: Jack Mitchell Date: Tue Jan 7 15:51:55 2020 +0000 watchdog: dw_wdt: ping watchdog to reset countdown before start Currently on an rk3288 SoC when trying to use the watchdog the SoC will instantly reset. This is due to the watchdog countdown counter being set to its initial value of 0x0. Reset the watchdog counter before start in order to correctly start the countdown timer from the right position. Signed-off-by: Jack Mitchell Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200107155155.278521-1-ml@embed.me.uk Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 69503e585192fdd84b240f18a0873d20e18a2e0a Author: Vladis Dronov Date: Wed Jan 8 13:53:47 2020 +0100 watchdog: fix UAF in reboot notifier handling in watchdog core code After the commit 44ea39420fc9 ("drivers/watchdog: make use of devm_register_reboot_notifier()") the struct notifier_block reboot_nb in the struct watchdog_device is removed from the reboot notifiers chain at the time watchdog's chardev is closed. But at least in i6300esb.c case reboot_nb is embedded in the struct esb_dev which can be freed on its device removal and before the chardev is closed, thus UAF at reboot: [ 7.728581] esb_probe: esb_dev.watchdog_device ffff91316f91ab28 ts# uname -r note the address ^^^ 5.5.0-rc5-ae6088-wdog ts# ./openwdog0 & [1] 696 ts# opened /dev/watchdog0, sleeping 10s... ts# echo 1 > /sys/devices/pci0000\:00/0000\:00\:09.0/remove [ 178.086079] devres:rel_nodes: dev ffff91317668a0b0 data ffff91316f91ab28 esb_dev.watchdog_device.reboot_nb memory is freed here ^^^ ts# ...woken up [ 181.459010] devres:rel_nodes: dev ffff913171781000 data ffff913174a1dae8 [ 181.460195] devm_unreg_reboot_notifier: res ffff913174a1dae8 nb ffff91316f91ab78 attempt to use memory already freed ^^^ [ 181.461063] devm_unreg_reboot_notifier: nb->call 6b6b6b6b6b6b6b6b [ 181.461243] devm_unreg_reboot_notifier: nb->next 6b6b6b6b6b6b6b6b freed memory is filled with a slub poison ^^^ [1]+ Done ./openwdog0 ts# reboot [ 229.921862] systemd-shutdown[1]: Rebooting. [ 229.939265] notifier_call_chain: nb ffffffff9c6c2f20 nb->next ffffffff9c6d50c0 [ 229.943080] notifier_call_chain: nb ffffffff9c6d50c0 nb->next 6b6b6b6b6b6b6b6b [ 229.946054] notifier_call_chain: nb 6b6b6b6b6b6b6b6b INVAL [ 229.957584] general protection fault: 0000 [#1] SMP [ 229.958770] CPU: 0 PID: 1 Comm: systemd-shutdow Not tainted 5.5.0-rc5-ae6088-wdog [ 229.960224] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), ... [ 229.963288] RIP: 0010:notifier_call_chain+0x66/0xd0 [ 229.969082] RSP: 0018:ffffb20dc0013d88 EFLAGS: 00010246 [ 229.970812] RAX: 000000000000002e RBX: 6b6b6b6b6b6b6b6b RCX: 00000000000008b3 [ 229.972929] RDX: 0000000000000000 RSI: 0000000000000096 RDI: ffffffff9ccc46ac [ 229.975028] RBP: 0000000000000001 R08: 0000000000000000 R09: 00000000000008b3 [ 229.977039] R10: 0000000000000001 R11: ffffffff9c26c740 R12: 0000000000000000 [ 229.979155] R13: 6b6b6b6b6b6b6b6b R14: 0000000000000000 R15: 00000000fffffffa ... slub_debug=FZP poison ^^^ [ 229.989089] Call Trace: [ 229.990157] blocking_notifier_call_chain+0x43/0x59 [ 229.991401] kernel_restart_prepare+0x14/0x30 [ 229.992607] kernel_restart+0x9/0x30 [ 229.993800] __do_sys_reboot+0x1d2/0x210 [ 230.000149] do_syscall_64+0x3d/0x130 [ 230.001277] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 230.002639] RIP: 0033:0x7f5461bdd177 [ 230.016402] Modules linked in: i6300esb [ 230.050261] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b Fix the crash by reverting 44ea39420fc9 so unregister_reboot_notifier() is called when watchdog device is removed. This also makes handling of the reboot notifier unified with the handling of the restart handler, which is freed with unregister_restart_handler() in the same place. Fixes: 44ea39420fc9 ("drivers/watchdog: make use of devm_register_reboot_notifier()") Cc: stable@vger.kernel.org # v4.15+ Signed-off-by: Vladis Dronov Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200108125347.6067-1-vdronov@redhat.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit b1301b9022e9769f3228a353a83bb9623c0f6e41 Author: Srinivas Neeli Date: Fri Dec 20 12:28:16 2019 +0530 watchdog: cadence: Skip printing pointer value "%p" is not printing the pointer value. In driver, printing pointer value is not useful so avoiding print. Signed-off-by: Srinivas Neeli Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1576825096-26605-1-git-send-email-srinivas.neeli@xilinx.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e0b4f4e0cf7fa9d62628d4249c765ec18dffd143 Author: Sai Prakash Ranjan Date: Fri Dec 13 12:19:34 2019 +0530 watchdog: qcom: Use platform_get_irq_optional() for bark irq platform_get_irq() prints an error message when the interrupt is not available. So on platforms where bark interrupt is not specified, following error message is observed on SDM845. [ 2.975888] qcom_wdt 17980000.watchdog: IRQ index 0 not found This is also seen on SC7180, SM8150 SoCs as well. Fix this by using platform_get_irq_optional() instead. Fixes: 36375491a4395654 ("watchdog: qcom: support pre-timeout when the bark irq is available") Signed-off-by: Sai Prakash Ranjan Reviewed-by: Bjorn Andersson Reviewed-by: Guenter Roeck Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20191213064934.4112-1-saiprakash.ranjan@codeaurora.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f6c98b08381c774a56b2f0f0067da646c23f1447 Author: Marco Felsch Date: Thu Nov 28 18:19:31 2019 +0100 watchdog: da9062: add power management ops Disable the watchdog during suspend if it is enabled and re-enable it on resume. So we can sleep without the interruptions. Signed-off-by: Marco Felsch Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191128171931.22563-1-m.felsch@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit d4ba76d79854178ffff55d66e1a72580484a741d Author: Wang, Peng 1. (NSB - CN/Hangzhou) Date: Mon Nov 25 02:04:13 2019 +0000 watchdog: make DesignWare watchdog allow users to set bigger timeout value watchdog_dev.c provides means to allow users to set bigger timeout value than HW can support, make DesignWare watchdog align with this. Signed-off-by: Peng Wang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/8fa54e92c6cd4544a7a3eb60a373ac43@nokia-sbell.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 85fdc63fe256b595f923a69848cd99972ff446d8 Author: Christophe Roullier Date: Fri Nov 22 14:22:46 2019 +0100 drivers: watchdog: stm32_iwdg: set WDOG_HW_RUNNING at probe If the watchdog hardware is already enabled during the boot process, when the Linux watchdog driver loads, it should start/reset the watchdog and tell the watchdog framework. As a result, ping can be generated from the watchdog framework (if CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED is set), until the userspace watchdog daemon takes over control Fixes:4332d113c66a ("watchdog: Add STM32 IWDG driver") Signed-off-by: Christophe Roullier Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20191122132246.8473-1-christophe.roullier@st.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit bb44aa09e53960c0230a645144fe566e094a2a02 Author: Eugen Hristev Date: Mon Nov 18 08:50:36 2019 +0000 watchdog: sama5d4_wdt: addition of sam9x60 compatible watchdog Add support for SAM9X60 WDT into sama5d4_wdt. This means that this driver gets a flag inside the data struct that represents the sam9x60 support. This flag differentiates between the two hardware blocks, and is set according to the compatible of the driver instantiation. Signed-off-by: Eugen Hristev Reviewed-by-off-by: Guenter Roeck Link: https://lore.kernel.org/r/1574067012-18559-3-git-send-email-eugen.hristev@microchip.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit fef684af392b91ade9c83f7ed0f8164af2aae142 Merge: a09ac40e420d 8f2828d73724 Author: Jiri Kosina Date: Mon Jan 27 15:49:49 2020 +0100 Merge branch 'for-5.6/logitech' into for-linus - voltage support for newer Logitech HID++ devices, from Pedro Vanzella. - MX Master support improvements, from Adrian Freund and Mazin Rezk commit a09ac40e420d547f58a40608f05a3a3b3a538ce8 Merge: 9e635c2851df 2f48865db332 Author: Jiri Kosina Date: Mon Jan 27 15:49:30 2020 +0100 Merge branch 'for-5.6/hidraw' into for-linus - support for uniq ioctl() commit 2f23e319b133c7392493e77f515a237c8e1e6dd6 Author: Pascal Paillet Date: Fri Jan 10 11:16:05 2020 +0100 thermal: stm32: Fix low threshold interrupt flood With the STM32 thermal peripheral, it is not possible to dump the temperature that has caused the interrupt. When the temperature reaches the low threshold, we generally read a temperature that is a little bit higher than the low threshold. This maybe due to sampling precision, and also because the CPU becomes hotter when it quits WFI mode. In that case, the framework does not change the trip points. This leads to a lot of low threshold interrupts. The fix is to set the low threshold value 0.5 degrees Celsius below the actual request. The problem is not so frequent with the high threshold and it would no be a good idea to set the threshold value higher than the request. Signed-off-by: Pascal Paillet Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200110101605.24984-7-p.paillet@st.com commit 9d8593f22ea33a88f89075b14fc58a95fc15b8ae Author: Pascal Paillet Date: Fri Jan 10 11:16:04 2020 +0100 thermal: stm32: Improve temperature computing Change the way of computing to avoid rounds by 1 or 2 degrees. Also simplify the sampling time management that is hard-coded to maximum value during probe. Signed-off-by: Pascal Paillet Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200110101605.24984-6-p.paillet@st.com commit dd4c3919a83074683aab3c1950c69e1131f3c46e Author: Pascal Paillet Date: Fri Jan 10 11:16:03 2020 +0100 thermal: stm32: Handle multiple trip points Let the thermal framework handle the trip points instead of custom code inside the driver. This is backward compatible, simplifies the driver and offers the possibility to the user to set any trip point he needs. stm_thermal_set_trips callback that is registered to set_trips ops to handle the low and high thresholds and replaces stm_thermal_set_threshold and stm_thermal_update_threshold functions. modify irq enable to handle the thresholds. Signed-off-by: Pascal Paillet Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200110101605.24984-5-p.paillet@st.com commit 1f64fa365148f003e39b28a86ce3ada020ea3eec Author: Pascal Paillet Date: Fri Jan 10 11:16:02 2020 +0100 thermal: stm32: Disable interrupts at probe In case of CPU reset, the interrupts could be enabled at boot time. Disable interrupts and clear flags. Signed-off-by: Pascal Paillet Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200110101605.24984-4-p.paillet@st.com commit d4a7e0538fe957fc78187468fa404060da7fa6f4 Author: Pascal Paillet Date: Fri Jan 10 11:16:01 2020 +0100 thermal: stm32: Rework sensor mode management Be sure get_temp returns an error while disabling or enabling the device. Set THERMAL_DEVICE_ENABLED state at the end of power on function. Set THERMAL_DEVICE_DISABLED state at the beginning of power off function. Signed-off-by: Pascal Paillet Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200110101605.24984-3-p.paillet@st.com commit d401652c1c92f164bc5590548aa3a90f4636af89 Author: Pascal Paillet Date: Fri Jan 10 11:16:00 2020 +0100 thermal: stm32: Fix icifr register name Fix a mistake with the ICIFR register name. Signed-off-by: Pascal Paillet Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200110101605.24984-2-p.paillet@st.com commit 370f995d587852dc8da4ce5687acae8be61d7529 Author: Peter Mamonov Date: Tue Aug 27 17:39:52 2019 +0300 thermal: of: Make thermal_zone_of_sensor_register return -ENODEV if a sensor OF node is missing When devm_thermal_zone_of_sensor_register() is called from hwmon_thermal_add_sensor() it is possible that the relevant sensor is missing an OF node. In this case thermal_zone_of_sensor_register() returns -EINVAL which causes hwmon_thermal_add_sensor() to fail as well. This patch changes relevant return code of thermal_zone_of_sensor_register() to -ENODEV, which is tolerated by hwmon_thermal_add_sensor(). Here is a particular case of such behaviour: the Marvell ethernet PHYs driver registers hwmon device for the built-in temperature sensor (see drivers/net/phy/marvell.c). Since the sensor doesn't have associated OF node devm_hwmon_device_register() returns error which ultimately causes failure of the PHY driver's probe function. Signed-off-by: Peter Mamonov Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20190827143952.19591-1-pmamonov@gmail.com commit 1754c4f60aaf1e17d886afefee97e94d7f27b4cb Author: Nicolai Stange Date: Tue Jan 14 11:39:03 2020 +0100 libertas: make lbs_ibss_join_existing() return error code on rates overflow Commit e5e884b42639 ("libertas: Fix two buffer overflows at parsing bss descriptor") introduced a bounds check on the number of supplied rates to lbs_ibss_join_existing() and made it to return on overflow. However, the aforementioned commit doesn't set the return value accordingly and thus, lbs_ibss_join_existing() would return with zero even though it failed. Make lbs_ibss_join_existing return -EINVAL in case the bounds check on the number of supplied rates fails. Fixes: e5e884b42639 ("libertas: Fix two buffer overflows at parsing bss descriptor") Signed-off-by: Nicolai Stange Signed-off-by: Kalle Valo commit c7bf1fb7ddca331780b9a733ae308737b39f1ad4 Author: Nicolai Stange Date: Tue Jan 14 11:39:02 2020 +0100 libertas: don't exit from lbs_ibss_join_existing() with RCU read lock held Commit e5e884b42639 ("libertas: Fix two buffer overflows at parsing bss descriptor") introduced a bounds check on the number of supplied rates to lbs_ibss_join_existing(). Unfortunately, it introduced a return path from within a RCU read side critical section without a corresponding rcu_read_unlock(). Fix this. Fixes: e5e884b42639 ("libertas: Fix two buffer overflows at parsing bss descriptor") Signed-off-by: Nicolai Stange Signed-off-by: Kalle Valo commit b70261a288ea4d2f4ac7cd04be08a9f0f2de4f4d Author: Qing Xu Date: Thu Jan 2 10:39:27 2020 +0800 mwifiex: Fix possible buffer overflows in mwifiex_cmd_append_vsie_tlv() mwifiex_cmd_append_vsie_tlv() calls memcpy() without checking the destination size may trigger a buffer overflower, which a local user could use to cause denial of service or the execution of arbitrary code. Fix it by putting the length check before calling memcpy(). Signed-off-by: Qing Xu Signed-off-by: Kalle Valo commit 3a9b153c5591548612c3955c9600a98150c81875 Author: Qing Xu Date: Thu Jan 2 10:39:26 2020 +0800 mwifiex: Fix possible buffer overflows in mwifiex_ret_wmm_get_status() mwifiex_ret_wmm_get_status() calls memcpy() without checking the destination size.Since the source is given from remote AP which contains illegal wmm elements , this may trigger a heap buffer overflow. Fix it by putting the length check before calling memcpy(). Signed-off-by: Qing Xu Signed-off-by: Kalle Valo commit 65b1aae0d9d5962faccc06bdb8e91a2a0b09451c Author: Brian Norris Date: Mon Jan 6 14:42:12 2020 -0800 mwifiex: fix unbalanced locking in mwifiex_process_country_ie() We called rcu_read_lock(), so we need to call rcu_read_unlock() before we return. Fixes: 3d94a4a8373b ("mwifiex: fix possible heap overflow in mwifiex_process_country_ie()") Cc: stable@vger.kernel.org Cc: huangwen Cc: Ganapathi Bhat Signed-off-by: Brian Norris Acked-by: Ganapathi Bhat Signed-off-by: Kalle Valo commit 8e5aa6173ad3ef794e52afa2bb56451db18642b9 Merge: 3d4864b30bed 2d22bc8354b1 Author: David S. Miller Date: Mon Jan 27 14:35:40 2020 +0100 Merge branch 'qed-Utilize-FW-8.42.2.0' Michal Kalderon says: ==================== qed*: Utilize FW 8.42.2.0 This FW contains several fixes and features, main ones listed below. We have taken into consideration past comments on previous FW versions that were uploaded and tried to separate this one to smaller patches to ease review. - RoCE - SRIOV support - Fixes in following flows: - latency optimization flow for inline WQEs - iwarp OOO packed DDPs flow - tx-dif workaround calculations flow - XRC-SRQ exceed cache num - iSCSI - Fixes: - iSCSI TCP out-of-order handling. - iscsi retransmit flow - Fcoe - Fixes: - upload + cleanup flows - Debug - Better handling of extracting data during traffic - ILT Dump -> dumping host memory used by chip - MDUMP -> collect debug data on system crash and extract after reboot Patches prefixed with FW 8.42.2.0 are required to work with binary 8.42.2.0 FW where as the rest are FW related but do not require the binary. Changes from V2 --------------- - Move FW version to the start of the series to maintain minimal compatibility - Fix some kbuild errors: - frame size larger than 1024 (Queue Manager patch - remove redundant field from struct) - sparse warning on endianity (Dmae patch fix - wrong use of __le32 for field used only on host, should be u32) - static should be used for some functions (Debug feature ilt and mdump) Reported-by: kbuild test robot Changes from V1 --------------- - Remove epoch + kernel version from device debug dump - don't bump driver version ==================== Signed-off-by: David S. Miller commit 2d22bc8354b15abe413dff76cfe0f7aeb88ef9aa Author: Michal Kalderon Date: Mon Jan 27 15:26:19 2020 +0200 qed: FW 8.42.2.0 debug features Add to debug dump more information on the platform it was collected from (pci func, path id). Provide human readable reg fifo erros. Removed static debug arrays from HSI Functions, and move them to the hwfn. Some structures were slightly changed (removing reserved chip id for example) which lead to many long initializations being modified with one parameter less during initialization. This leads to some long diffs that don't really change anything. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 6bc82d9b7e6371673992ed5e3897cf7fb8cc4f41 Author: Michal Kalderon Date: Mon Jan 27 15:26:18 2020 +0200 qed: rt init valid initialization changed The QM phase init tool can be invoked multiple times during the driver lifetime. Part of the init comes from the runtime array. The logic for setting the values did not init all values, basically assuming the runtime array was all zeroes. But if it was invoked multiple times, nobody was zeroing it after the first time. In this change we zero the runtime array right after using it. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 8a52bbab39c9791480cbae86c69ad0d47f62972e Author: Michal Kalderon Date: Mon Jan 27 15:26:17 2020 +0200 qed: Debug feature: ilt and mdump Part of the FW drop includes new debug capabilities implemented in the qed_debug file. This patch dumps additional information during ethtool -d for better debugging. The data dumped is the ilt (internal logical table) and information gathered by the management firmware incase there was a crash and driver was not able to extract the information (mdump). Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 30d5f85895fad1b3fec34b86cb779d4f56f85e32 Author: Michal Kalderon Date: Mon Jan 27 15:26:16 2020 +0200 qed: FW 8.42.2.0 Add fw overlay feature This feature enables the FW to page out FW code when required Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 0500a70d6e071040ffdaadebb966986afa83c5e9 Author: Michal Kalderon Date: Mon Jan 27 15:26:15 2020 +0200 qed: FW 8.42.2.0 HSI changes This patch contains several HSI changes. The changes are part of features like RDMA VF and OVS, the patch also contains a fix to how the init code determines if the dmae is ready to be used. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 6459d93619b5bc21f775e7eb12bc4d051743d7aa Author: Michal Kalderon Date: Mon Jan 27 15:26:14 2020 +0200 qed: FW 8.42.2.0 iscsi/fcoe changes - Remove struct iscsi_slow_path_hdr and field fw_cid from several structs - Remove struct iscsi_spe_func_dstry - Remove fields pbe_page_size_log and pbl_page_size_log from struct iscsi_conn_offload_param Signed-off-by: Manish Rangankar Signed-off-by: Saurav Kashyap Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 1392d19ff1d6ddd370cefa73b552a0262f9c35ea Author: Michal Kalderon Date: Mon Jan 27 15:26:13 2020 +0200 qed: Add abstraction for different hsi values per chip The number of BTB blocks was modified to be different between the two chip flavors supported (BB/K2) as a result, this lead to a re-write of selecting the default hsi value based on the chip. This patch creates a lookup table for hsi values per chip rather than ask again and again for every value. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 997af5df230e3288ec1f5b332955f9be643e450b Author: Michal Kalderon Date: Mon Jan 27 15:26:12 2020 +0200 qed: FW 8.42.2.0 Additional ll2 type LL2 queues were a limited resource due to FW constraints. This FW introduced a new resource which is a context based ll2 queue (memory on host). The additional ll2 queues are required for RDMA SRIOV. The code refers to the previous ll2 queues as ram-based or legacy, and the new queues as ctx-based. This change decreased the "legacy" ram-based queues therefore the first ll2 queue used for iWARP was converted to the ctx-based ll2 queue. This feature also exposed a bug in the DIRECT_REG_WR64 macro implementation which didn't have an effect in other use cases. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 804c5702fc583afbdb6860f79e9d4058570ccc43 Author: Michal Kalderon Date: Mon Jan 27 15:26:11 2020 +0200 qed: Use dmae to write to widebus registers in fw_funcs There are several wide-bus registers written to by the fw_funcs that require using the dmae for atomicity. Therefore using the dmae channel functionality was added to the fw_funcs file, since the code is very similar to the previously used code, the structures used were moved to qed_hsi. Due to FW conventions, the names of the flags in the struct changed. Since this required slight modification in the places that set the flags the code was modified to use GET/SET FIELD macros. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 63ddca3052ce2397ffd71899390d552cd40ddb6f Author: Michal Kalderon Date: Mon Jan 27 15:26:10 2020 +0200 qed: FW 8.42.2.0 Parser offsets modified Convert storm ram line to regpair rather than two distinct u32 to better represent the u64 width of the ram. Convert some defines to be hex instead of negative values these values also changed by FW from previous value. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 92fae6fb231f66ce0e71ed348e788180c1a603f9 Author: Michal Kalderon Date: Mon Jan 27 15:26:09 2020 +0200 qed: FW 8.42.2.0 Queue Manager changes This patch contains changes in initialization and usage of the QM blocks. Instead of setting a rate limiter per vport the rate limiters are now a global resource and set independentaly. The patch also contains a field name change: vport_wfq which is part of vport_params was renamed to wfq as the vport prefix is redundant. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 6aebde8dc767088a3171b864755f26ceae2f8bc7 Author: Michal Kalderon Date: Mon Jan 27 15:26:08 2020 +0200 qed: FW 8.42.2.0 Expose new registers and change windows This patch contains register initialization related changes. - Modifications to the runtime offsets - these are defines used by the driver or firmware functions to set values that are used by the initialization functions to set device register values. - Global window values changes to provide different device register ranges. - Additional device registers addresses were added to the register file, used in later stages. Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 2924e0699963b839f88f8c4e855929ea49185870 Author: Michal Kalderon Date: Mon Jan 27 15:26:07 2020 +0200 qed: FW 8.42.2.0 Internal ram offsets modifications IRO stands for internal RAM offsets. Updating the FW binary produces different iro offsets. This file contains the different values, and a new representation of the values. Update the FW version Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 3d4864b30bed73ebfcffd45771c28bdc89e2a07e Merge: 9e0703a2650d 688b3e829d60 Author: David S. Miller Date: Mon Jan 27 14:33:40 2020 +0100 Merge branch 'octeontx2-pf-Add-network-driver-for-physical-function' Sunil Goutham says: ==================== octeontx2-pf: Add network driver for physical function OcteonTX2 SOC's resource virtualization unit (RVU) supports multiple physical and virtual functions. Each of the PF's functionality is determined by what kind of resources are attached to it. If NPA and NIX blocks are attached to a PF it can function as a highly capable network device. This patch series add a network driver for the PF. Initial set of patches adds mailbox communication with admin function (RVU AF) and configuration of queues. Followed by Rx and tx pkts NAPI handler and then support for HW offloads like RSS, TSO, Rxhash etc. Ethtool support to extract stats, config RSS, queue sizes, queue count is also added. Added documentation to give a high level overview of HW and different drivers which will be upstreamed and how they interact. Changes from v5: * Fixed otx2_atomic64_add() non ARM64 fallback definition. - Suggested by David Miller Changes from v4: * Replaced pci_set_dma_mask and pci_set_consistent_dma_mask fn()s with dma_set_mask_and_coherent(). * Some additonal code cleanup. * Fixed receive buffer segmnetation logic in otx2_alloc_rbuf() * Removed all unused BIG_ENDIAN structure definitions. * Removed unnecessary memory barriers - Sugested by Jakub Kicinski * Fixed mailbox initalization failure handling * Removed unused function parameter in otx2_skb_add_frag() - Suggested by Maciej Fijalkowski Changes from v3: * Fixed receive side scaling reinitialization during interface DOWN and UP to retain user configured settings, if any. * Removed driver version from ethtool. * Fixed otx2_set_rss_hash_opts() to return error incase RSS is not enabled. - Sugested by Jakub Kicinski Changes from v2: * Removed frames, bytes, dropped packet stats from ethtool to avoid duplication of same stats in netlink and ethtool. - Sugested by Jakub Kicinski * Removed number of channels and ringparam upper bound checking in ethtool support. * Fixed RSS hash option setting to reject unsupported config. - Suggested by Michal Kubecek Changes from v1: * Made driver dependent on 64bit, to fix build errors related to non availability of writeq/readq APIs for 32bit platforms. - Reported by kbuild test robot ==================== Signed-off-by: David S. Miller commit 688b3e829d60a290c9a0a2c8b0b99f816ed37a8c Author: Sunil Goutham Date: Mon Jan 27 18:35:31 2020 +0530 MAINTAINERS: Add entry for Marvell OcteonTX2 Physical Function driver Added maintainers entry for Marvell OcteonTX2 SOC's physical function NIC driver. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 493aeb26e12ad4f0f7ad7f320b5706b6902e6eed Author: Sunil Goutham Date: Mon Jan 27 18:35:30 2020 +0530 Documentation: net: octeontx2: Add RVU HW and drivers overview Added high level overview of OcteonTx2 RVU HW and functionality of various drivers which will be upstreamed. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 6e92d71bf88208ddcbd48b3c831c0e394d0f56e2 Author: Sunil Goutham Date: Mon Jan 27 18:35:29 2020 +0530 octeontx2-pf: ethtool RSS config support Added support to show or configure RSS hash key, indirection table, 2,4 tuple via ethtool. Also added debug msg_level support to dump messages when HW reports errors in packet received or transmitted. Signed-off-by: Prakash Brahmajyosyula Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit d45d8979840d9c9ac93d3fe8cfc8e794b7228445 Author: Christina Jacob Date: Mon Jan 27 18:35:28 2020 +0530 octeontx2-pf: Add basic ethtool support This patch adds ethtool support for - Driver stats, Tx/Rx perqueue and CGX LMAC stats - Set/show Rx/Tx queue count - Set/show Rx/Tx ring sizes - Set/show IRQ coalescing parameters Signed-off-by: Christina Jacob Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit e239d0c78c42e49558ea2c0e5857c4f9ca064f48 Author: Geetha sowjanya Date: Mon Jan 27 18:35:27 2020 +0530 octeontx2-pf: Add ndo_get_stats64 Added ndo_get_stats64 which returns stats maintained by HW. Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 86d7476078b87874ce5dee39cbbd094055c73d49 Author: Sunil Goutham Date: Mon Jan 27 18:35:26 2020 +0530 octeontx2-pf: TCP segmentation offload support Adds TCP segmentation offload (TSO) support. First version of the silicon didn't support TSO offload, for this driver level TSO support is added. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 85069e95e53161f8bcc1aa266f47c60c1f3e4ec3 Author: Sunil Goutham Date: Mon Jan 27 18:35:25 2020 +0530 octeontx2-pf: Receive side scaling support Adds receive side scaling (RSS) support to distribute pkts/flows across multiple queues. Sets up key, indirection table etc. Also added extraction of HW calculated rxhash and adding to same to SKB ie NETIF_F_RXHASH offload support. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 4ff7d1488a8496fddcfdf40c42489eaa64892f3e Author: Geetha sowjanya Date: Mon Jan 27 18:35:24 2020 +0530 octeontx2-pf: Error handling support HW reports many errors on the receive and transmit paths. Such as incorrect queue configuration, pkt transmission errors, LMTST instruction errors, transmit queue full etc. These are reported via QINT interrupt. Most of the errors are fatal and needs reinitialization. Also added support to allocate receive buffers in non-atomic context when allocation fails in NAPI context. Signed-off-by: Geetha sowjanya Signed-off-by: Aleksey Makarov Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 34bfe0ebedb76aeb964341d96cf7c5135d14e1bf Author: Sunil Goutham Date: Mon Jan 27 18:35:23 2020 +0530 octeontx2-pf: MTU, MAC and RX mode config support This patch addes support to change interface MTU, MAC address retrieval and config, RX mode ie unicast, multicast and promiscuous. Also added link loopback support Signed-off-by: Tomasz Duszynski Signed-off-by: Subbaraya Sundeep Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 50fe6c02e5ad50727fb1069bb31099385fb59883 Author: Linu Cherian Date: Mon Jan 27 18:35:22 2020 +0530 octeontx2-pf: Register and handle link notifications PF and AF (admin function) shares 64KB of reserved memory region for communication. This region is shared for - Messages sent by PF and responses sent by AF. - Notifications sent by AF and ACKs sent by PF. This patch adds infrastructure to handle notifications sent by AF and adds handlers to process them. One of the main usecase of notifications from AF is physical link changes. So this patch adds registration of PF with AF to receive link status change notifications and also adds the handler for that notification. Signed-off-by: Linu Cherian Signed-off-by: Tomasz Duszynski Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 3ca6c4c882a7f34085b170d93cf0d0e843aa00e6 Author: Sunil Goutham Date: Mon Jan 27 18:35:21 2020 +0530 octeontx2-pf: Add packet transmission support This patch adds the packet transmission support. For a given skb prepares send queue descriptors (SQEs) and pushes them to HW. Here driver doesn't maintain it's own SQ rings, SQEs are pushed to HW using a silicon specific operations called LMTST. From the instuction HW derives the transmit queue number and queues the SQE to that queue. These LMTST instructions are designed to avoid queue maintenance in SW and lockless behavior ie when multiple cores are trying to add SQEs to same queue then HW will takecare of serialization, no need for SW to hold locks. Also supports scatter/gather. Co-developed-by: Geetha sowjanya Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit abe0254333124598d1e7452c19e9e753c6bfaada Author: Sunil Goutham Date: Mon Jan 27 18:35:20 2020 +0530 octeontx2-pf: Receive packet handling support Added receive packet handling (NAPI) support, error stats, RX_ALL capability config option to passon error pkts to stack upon user request. In subsequent patches these error stats will be added to ethttool. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 04a21ef303df74737259190d7d7cf77a129bb56a Author: Sunil Goutham Date: Mon Jan 27 18:35:19 2020 +0530 octeontx2-pf: Setup interrupts and NAPI handler Completion queue (CQ) is the one with which HW notifies SW on a packet reception or transmission. Each of the RQ and SQ are mapped to a unique CQ and again both CQs are mapped to same interrupt ie the CINT. So that each core has one interrupt source in whose handler both Rx and Tx notifications are processed. Also - Registered a NAPI handler for the CINT. - Setup coalescing parameters. - IRQ affinity hints etc Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit caa2da34fd25a37e9fd43343b6966fb9d730a6d5 Author: Sunil Goutham Date: Mon Jan 27 18:35:18 2020 +0530 octeontx2-pf: Initialize and config queues This patch does the initialization of all queues ie the receive buffer pools, receive and transmit queues, completion or notification queues etc. Allocates all required resources (eg transmit schedulers, receive buffers etc) and configures them for proper functioning of queues. Also sets up receive queue's RED dropping levels. Co-developed-by: Geetha sowjanya Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 05fcc9e08955b7c04afb7f53402902f4a86e553c Author: Sunil Goutham Date: Mon Jan 27 18:35:17 2020 +0530 octeontx2-pf: Attach NIX and NPA block LFs For a PF to function as a NIC, NPA (for Rx buffers, Tx descriptors etc) and NIX (for rcv, send and completion queues) are the minimum resources needed. So request admin function (AF) to attach one each of NIX and NPA block LFs (local functions). Only AF can configure a LF's contexts, so request AF to allocate memory for NPA aura/pool and NIX RQ/SQ/CQ HW contexts. Upon receiving response, save some of the HW constants like number of pointers per stack page, size of send queue buffer (SQBs, where SQEs are queued by HW) e.t.c which are later used to initialize queues. A HW context here is like a state machine maintained for a descriptor queue. eg size, head/tail pointers, irq etc etc. HW maintains this in memory. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 5a6d7c9daef392370d873f8a626bb525629cdd6a Author: Sunil Goutham Date: Mon Jan 27 18:35:16 2020 +0530 octeontx2-pf: Mailbox communication with AF In the resource virtualization unit (RVU) each of the PF and AF (admin function) share a 64KB of reserved memory region for communication. This patch initializes PF <=> AF mailbox IRQs, registers handlers for processing these communication messages. Also adds support to process these messages in both directions ie responses to PF initiated DOWN (PF => AF) messages and AF initiated UP messages (AF => PF). Mbox communication APIs and message formats are defined in AF driver (drivers/net/ethernet/marvell/octeontx2/af), mbox.h from AF driver is included here to avoid duplication. Signed-off-by: Geetha sowjanya Signed-off-by: Christina Jacob Signed-off-by: Subbaraya Sundeep Signed-off-by: Aleksey Makarov Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 165475779ba1d4758429f48d65960473df9dc35a Author: Sunil Goutham Date: Mon Jan 27 18:35:15 2020 +0530 octeontx2-pf: Add Marvell OcteonTX2 NIC driver This patch adds template for the Marvell's OcteonTX2 network controller's physical function driver. Just the probe, PCI specific initialization and netdev registration. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 9e0703a2650def6fffe91235a880bb6f37d9ad74 Merge: c312840cd790 82650dab9a5a Author: David S. Miller Date: Mon Jan 27 14:31:40 2020 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2020-01-27 The following pull-request contains BPF updates for your *net-next* tree. We've added 20 non-merge commits during the last 5 day(s) which contain a total of 24 files changed, 433 insertions(+), 104 deletions(-). The main changes are: 1) Make BPF trampolines and dispatcher aware for the stack unwinder, from Jiri Olsa. 2) Improve handling of failed CO-RE relocations in libbpf, from Andrii Nakryiko. 3) Several fixes to BPF sockmap and reuseport selftests, from Lorenz Bauer. 4) Various cleanups in BPF devmap's XDP flush code, from John Fastabend. 5) Fix BPF flow dissector when used with port ranges, from Yoshiki Komachi. 6) Fix bpffs' map_seq_next callback to always inc position index, from Vasily Averin. 7) Allow overriding LLVM tooling for runqslower utility, from Andrey Ignatov. 8) Silence false-positive lockdep splats in devmap hash lookup, from Amol Grover. 9) Fix fentry/fexit selftests to initialize a variable before use, from John Sperbeck. ==================== Signed-off-by: David S. Miller commit c312840cd79061af37158cb42590931cfa364c1b Author: David S. Miller Date: Mon Jan 27 13:49:33 2020 +0100 Revert "pktgen: Allow configuration of IPv6 source address range" This reverts commit 7786a1af2a6bceb07860ec720e74714004438834. It causes build failures on 32-bit, for example: net/core/pktgen.o: In function `mod_cur_headers': >> pktgen.c:(.text.mod_cur_headers+0xba0): undefined reference to `__umoddi3' Signed-off-by: David S. Miller commit 6a7e25c7fb482dba3e80fec953f1907bcb24d52c Author: Leon Romanovsky Date: Mon Jan 27 09:20:28 2020 +0200 net/core: Replace driver version to be kernel version In order to stop useless driver version bumps and unify output presented by ethtool -i, let's set default version string. As Linus said in [1]: "Things are supposed to be backwards and forwards compatible, because we don't accept breakage in user space anyway. So versioning is pointless, and only causes problems." They cause problems when users start to see version changes and expect specific set of features which will be different for stable@, vanilla and distribution kernels. Distribution kernels are based on some kernel version with extra patches on top, for example, in RedHat world this "extra" is a lot and for them your driver version say nothing. Users who run vanilla kernels won't use driver version information too, because running such kernels requires knowledge and understanding. Another set of problems are related to difference in versioning scheme and such doesn't allow to write meaningful automation which will work sanely on all ethtool capable devices. Before this change: [leonro@erver ~]$ ethtool -i eth0 driver: virtio_net version: 1.0.0 After this change and once ->version assignment will be deleted from virtio_net: [leonro@server ~]$ ethtool -i eth0 driver: virtio_net version: 5.5.0-rc6+ Link: https://lore.kernel.org/ksummit-discuss/CA+55aFx9A=5cc0QZ7CySC4F2K7eYaEfzkdYEc9JaNgCcV25=rg@mail.gmail.com/ Link: https://lore.kernel.org/linux-rdma/20200122152627.14903-1-michal.kalderon@marvell.com/T/#md460ff8f976c532a89d6860411c3c50bb811038b Link: https://lore.kernel.org/linux-rdma/20200127060835.GA570@unicorn.suse.cz Signed-off-by: Leon Romanovsky Acked-by: Shannon Nelson Signed-off-by: David S. Miller commit 7d9996870ae49b4febe8b6ac458a2f8f70cea132 Merge: 4d94e4350e11 6c77065bbdff Author: David S. Miller Date: Mon Jan 27 13:05:43 2020 +0100 Merge branch 'sfc-refactor-mcdi-filtering-code' Alex Maftei says: ==================== sfc: refactor mcdi filtering code Splitting final bits of the driver code into different files, which will later be used in another driver for a new product. This is a continuation to my previous patch series. (three of them) Refactoring will be concluded with this series, for now. As instructed, split the renaming and moving into different patches. Removed stray spaces before tabs... twice. Minor refactoring was done with the renaming, as explained in the first patch. ==================== Signed-off-by: David S. Miller commit 6c77065bbdff817cea4c391720b120d4dd81e1c8 Author: Alex Maftei (amaftei) Date: Mon Jan 27 11:13:55 2020 +0000 sfc: move mcdi filtering code Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 00aaf7e56f890b0b5fd4568ad0d82c6c1d89a2d4 Author: Alex Maftei (amaftei) Date: Mon Jan 27 11:13:40 2020 +0000 sfc: create header for mcdi filtering code Moved structs, enums, and added function prototypes. The affected functions are no longer static. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 90c914d2a39367b18b25b67b0a69335df8b92d56 Author: Alex Maftei (amaftei) Date: Mon Jan 27 11:13:27 2020 +0000 sfc: rename mcdi filtering functions/structs Minor style fixes included due to name lengths changing. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 21613cfad181c882b1effd227dcfbddc61dc80f7 Author: Christophe Leroy Date: Tue Jan 14 17:54:04 2020 +0000 powerpc/32: Reuse orphaned memblocks in kasan_init_shadow_page_tables() If concurrent PMD population has happened, re-use orphaned memblocks. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b29ffffb9206dc14541fa420c17604240728041b.1579024426.git.christophe.leroy@c-s.fr commit 509cd3f2b473330238c768bb21a4f2cdc80393fa Author: Christophe Leroy Date: Tue Jan 14 17:54:03 2020 +0000 powerpc/32: Simplify KASAN init Since kasan_init_region() is not used anymore for modules, KASAN init is done while slab_is_available() is false. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/84b27bf08b41c8343efd88e10f2eccd8e9f85593.1579024426.git.christophe.leroy@c-s.fr commit 47febbeeec440eec213960e3d25c57a8312d5340 Author: Christophe Leroy Date: Tue Jan 14 17:54:02 2020 +0000 powerpc/32: Force KASAN_VMALLOC for modules Unloading/Reloading of modules seems to fail with KASAN_VMALLOC but works properly with it. Force selection of KASAN_VMALLOC when MODULES are selected, and drop module_alloc() which was dedicated to KASAN for modules. Reported-by: Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://bugzilla.kernel.org/show_bug.cgi?id=205283 Link: https://lore.kernel.org/r/f909da11aecb59ab7f32ba01fae6f356eaa4d7bc.1579024426.git.christophe.leroy@c-s.fr commit af1725d2493dcad4eeb7e63141678181fcd8a2ff Author: Christophe Leroy Date: Tue Jan 14 17:54:01 2020 +0000 powerpc/kconfig: Move CONFIG_PPC32 into Kconfig.cputype Move CONFIG_PPC32 at the same place as CONFIG_PPC64 for consistency. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6f28085c2a1aa987093d50db17586633bbf8e206.1579024426.git.christophe.leroy@c-s.fr commit 3d4247fcc938d0ab5cf6fdb752dae07fdeab9736 Author: Christophe Leroy Date: Tue Jan 14 17:54:00 2020 +0000 powerpc/32: Add support of KASAN_VMALLOC Add support of KASAN_VMALLOC on PPC32. To allow this, the early shadow covering the VMALLOC space need to be removed once high_memory var is set and before freeing memblock. And the VMALLOC area need to be aligned such that boundaries are covered by a full shadow page. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/031dec5487bde9b2181c8b3c9800e1879cf98c1a.1579024426.git.christophe.leroy@c-s.fr commit 0f9aee0cb9da7db7d96f63cfa2dc5e4f1bffeb87 Author: Christophe Leroy Date: Mon Dec 23 07:54:22 2019 +0000 powerpc/mm: Don't log user reads to 0xffffffff Running vdsotest leaves many times the following log: [ 79.629901] vdsotest[396]: User access of kernel address (ffffffff) - exploit attempt? (uid: 0) A pointer set to (-1) is likely a programming error similar to a NULL pointer and is not worth logging as an exploit attempt. Don't log user accesses to 0xffffffff. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0728849e826ba16f1fbd6fa7f5c6cc87bd64e097.1577087627.git.christophe.leroy@c-s.fr commit cd08f109e26231b279bcc0388428afcac6408ec6 Author: Christophe Leroy Date: Sat Dec 21 08:32:38 2019 +0000 powerpc/32s: Enable CONFIG_VMAP_STACK A few changes to retrieve DAR and DSISR from struct regs instead of retrieving them directly, as they may have changed due to a TLB miss. Also modifies hash_page() and friends to work with virtual data addresses instead of physical ones. Same on load_up_fpu() and load_up_altivec(). Signed-off-by: Christophe Leroy [mpe: Fix tovirt_vmstack call in head_32.S to fix CHRP build] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2e2509a242fd5f3e23df4a06530c18060c4d321e.1576916812.git.christophe.leroy@c-s.fr commit 94dd54c51a410b9ffa6356c3ed2ab0317f998ded Author: Christophe Leroy Date: Sat Dec 21 08:32:37 2019 +0000 powerpc/32s: Avoid crossing page boundary while changing SRR0/1. Trying VMAP_STACK with KVM, vmlinux was not starting. This was due to SRR0 and SRR1 clobbered by an ISI due to the rfi being in a different page than the mtsrr0/1: c0003fe0 : c0003fe0: 38 83 00 54 addi r4,r3,84 c0003fe4: 7c 60 00 a6 mfmsr r3 c0003fe8: 70 60 00 30 andi. r0,r3,48 c0003fec: 4d 82 00 20 beqlr c0003ff0: 7c 63 00 78 andc r3,r3,r0 c0003ff4: 7c 9a 03 a6 mtsrr0 r4 c0003ff8: 7c 7b 03 a6 mtsrr1 r3 c0003ffc: 7c 00 04 ac hwsync c0004000: 4c 00 00 64 rfi Align the 4 instruction block used to deactivate MMU to order 4, so that the block never crosses a page boundary. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/30d2cda111b7977227fff067fa7e358440e2b3a4.1576916812.git.christophe.leroy@c-s.fr commit 2e15001ea9ea110837a6eb6dba518416dedb4c39 Author: Christophe Leroy Date: Sat Dec 21 08:32:36 2019 +0000 powerpc/32s: Reorganise DSI handler. The part decidated to handling hash_page() is fully unneeded for processors not having real hash pages like the 603. Lets enlarge the content of the feature fixup, and provide an alternative which jumps directly instead of getting NIPs. Also, in preparation of VMAP stacks, the end of DSI handler has moved to later in the code as it won't fit anymore once VMAP stacks are there. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c31b22c91af8b011d0a4fd9e52ad6afb4b593f71.1576916812.git.christophe.leroy@c-s.fr commit 99b229161f8d99742cdfd6be21059ebd9eb7b696 Author: Christophe Leroy Date: Sat Dec 21 08:32:35 2019 +0000 powerpc/8xx: Enable CONFIG_VMAP_STACK This patch enables CONFIG_VMAP_STACK. For that, a few changes are done in head_8xx.S. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d7ba1e34e80898310d6a314cbebe48baa32894ef.1576916812.git.christophe.leroy@c-s.fr commit d52668f6b3e052fa97e93e536c492f5880c73474 Author: Michael Ellerman Date: Sun Jan 26 00:20:16 2020 +1100 powerpc/8xx: Move tail of alignment exception out of line When we enable VMAP_STACK there will not be enough room for the alignment handler at 0x600 in head_8xx.S. For now move the tail of the alignment handler out of line, and branch to it. Suggested-by: Christophe Leroy Signed-off-by: Michael Ellerman commit afe1ec5ab83029baf0f8368a255dc6b998bde576 Author: Christophe Leroy Date: Sat Dec 21 08:32:34 2019 +0000 powerpc/8xx: Split breakpoint exception Breakpoint exception is big. Split it to support future growth on exception prolog. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1dda3293d86d0f715b13b2633c95d2188a42a02c.1576916812.git.christophe.leroy@c-s.fr commit 596419afed72656a4529d3d67475e4b2b1912485 Author: Christophe Leroy Date: Sat Dec 21 08:32:33 2019 +0000 powerpc/8xx: Move DataStoreTLBMiss perf handler Move DataStoreTLBMiss perf handler in order to cope with future growing exception prolog. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/75dd28b04efd2cbdbf01153173d99c11cdff2f08.1576916812.git.christophe.leroy@c-s.fr commit 9260f76ae2533787e92be58d5e509e81b72f5f9c Author: Christophe Leroy Date: Sat Dec 21 08:32:32 2019 +0000 powerpc/8xx: Drop exception entries for non-existing exceptions head_8xx.S has entries for all exceptions from 0x100 to 0x1f00. Several of them do not exist and are never generated by the 8xx in accordance with the documentation. Remove those entry points to make some room for future growing exception code. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/66f92866fe9524cf0f056016921c7d53adaef3a0.1576916812.git.christophe.leroy@c-s.fr commit 6edc318585410b9cae5a7e4d156f09c8e5e3a700 Author: Christophe Leroy Date: Sat Dec 21 08:32:31 2019 +0000 powerpc/8xx: Use alternative scratch registers in DTLB miss handler In preparation of handling CONFIG_VMAP_STACK, DTLB miss handler need to use different scratch registers than other exception handlers in order to not jeopardise exception entry on stack DTLB misses. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c5287ea59ae9630f505019b309bf94029241635f.1576916812.git.christophe.leroy@c-s.fr commit 547db12fd8a0ce753c6bafd130827f1755c93fe6 Author: Christophe Leroy Date: Sat Dec 21 08:32:30 2019 +0000 powerpc/32: Use vmapped stacks for interrupts In order to also catch overflows on IRQ stacks, use vmapped stacks. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d33ad1b36ddff4dcc19f96c592c12a61cf85d406.1576916812.git.christophe.leroy@c-s.fr commit 3978eb78517c1fc06dd75405d732af45c80f5bd2 Author: Christophe Leroy Date: Sat Dec 21 08:32:29 2019 +0000 powerpc/32: Add early stack overflow detection with VMAP stack. To avoid recursive faults, stack overflow detection has to be performed before writing in the stack in exception prologs. Do it by checking the alignment. If the stack pointer alignment is wrong, it means it is pointing to the following or preceding page. Without VMAP stack, a stack overflow is catastrophic. With VMAP stack, a stack overflow isn't destructive, so don't panic. Kill the task with SIGSEGV instead. A dedicated overflow stack is set up for each CPU. lkdtm: Performing direct entry EXHAUST_STACK lkdtm: Calling function with 512 frame size to depth 32 ... lkdtm: loop 32/32 ... lkdtm: loop 31/32 ... lkdtm: loop 30/32 ... lkdtm: loop 29/32 ... lkdtm: loop 28/32 ... lkdtm: loop 27/32 ... lkdtm: loop 26/32 ... lkdtm: loop 25/32 ... lkdtm: loop 24/32 ... lkdtm: loop 23/32 ... lkdtm: loop 22/32 ... lkdtm: loop 21/32 ... lkdtm: loop 20/32 ... Kernel stack overflow in process test[359], r1=c900c008 Oops: Kernel stack overflow, sig: 6 [#1] BE PAGE_SIZE=4K MMU=Hash PowerMac Modules linked in: CPU: 0 PID: 359 Comm: test Not tainted 5.3.0-rc7+ #2225 NIP: c0622060 LR: c0626710 CTR: 00000000 REGS: c0895f48 TRAP: 0000 Not tainted (5.3.0-rc7+) MSR: 00001032 CR: 28004224 XER: 00000000 GPR00: c0626ca4 c900c008 c783c000 c07335cc c900c010 c07335cc c900c0f0 c07335cc GPR08: c900c0f0 00000001 00000000 00000000 28008222 00000000 00000000 00000000 GPR16: 00000000 00000000 10010128 10010000 b799c245 10010158 c07335cc 00000025 GPR24: c0690000 c08b91d4 c068f688 00000020 c900c0f0 c068f668 c08b95b4 c08b91d4 NIP [c0622060] format_decode+0x0/0x4d4 LR [c0626710] vsnprintf+0x80/0x5fc Call Trace: [c900c068] [c0626ca4] vscnprintf+0x18/0x48 [c900c078] [c007b944] vprintk_store+0x40/0x214 [c900c0b8] [c007bf50] vprintk_emit+0x90/0x1dc [c900c0e8] [c007c5cc] printk+0x50/0x60 [c900c128] [c03da5b0] recursive_loop+0x44/0x6c [c900c338] [c03da5c4] recursive_loop+0x58/0x6c [c900c548] [c03da5c4] recursive_loop+0x58/0x6c [c900c758] [c03da5c4] recursive_loop+0x58/0x6c [c900c968] [c03da5c4] recursive_loop+0x58/0x6c [c900cb78] [c03da5c4] recursive_loop+0x58/0x6c [c900cd88] [c03da5c4] recursive_loop+0x58/0x6c [c900cf98] [c03da5c4] recursive_loop+0x58/0x6c [c900d1a8] [c03da5c4] recursive_loop+0x58/0x6c [c900d3b8] [c03da5c4] recursive_loop+0x58/0x6c [c900d5c8] [c03da5c4] recursive_loop+0x58/0x6c [c900d7d8] [c03da5c4] recursive_loop+0x58/0x6c [c900d9e8] [c03da5c4] recursive_loop+0x58/0x6c [c900dbf8] [c03da5c4] recursive_loop+0x58/0x6c [c900de08] [c03da67c] lkdtm_EXHAUST_STACK+0x30/0x4c [c900de18] [c03da3e8] direct_entry+0xc8/0x140 [c900de48] [c029fb40] full_proxy_write+0x64/0xcc [c900de68] [c01500f8] __vfs_write+0x30/0x1d0 [c900dee8] [c0152cb8] vfs_write+0xb8/0x1d4 [c900df08] [c0152f7c] ksys_write+0x58/0xe8 [c900df38] [c0014208] ret_from_syscall+0x0/0x34 --- interrupt: c01 at 0xf806664 LR = 0x1000c868 Instruction dump: 4bffff91 80010014 7c832378 7c0803a6 38210010 4e800020 3d20c08a 3ca0c089 8089a0cc 38a58f0c 38600001 4ba2d494 <9421ffe0> 7c0802a6 bfc10018 7c9f2378 Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1b89c121b4070c7ee99e4f22cc178f15a736b07b.1576916812.git.christophe.leroy@c-s.fr commit 0f510a2457cbbba18a98492bab1bf540be57ebd1 Author: Niklas Söderlund Date: Fri Jan 17 17:05:54 2020 +0100 thermal: rcar_gen3_thermal: Remove temperature bound The hardware manual states that the operation of the sensor is not guaranteed with temperatures above 125°C, not that the readings are invalid. Remove the bound check and try to deliver temperature readings even if we are outside the guaranteed operation range. Signed-off-by: Niklas Söderlund Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200117160554.3812787-3-niklas.soderlund+renesas@ragnatech.se commit dff6d4f80509d1aaf07da9534f3f4b6876876caf Author: Niklas Söderlund Date: Fri Jan 17 17:05:53 2020 +0100 thermal: rcar_thermal: Remove temperature bound The hardware manual states that the operation of the sensor is not guaranteed outside the range of -45°C to 125°C, not that the readings are invalid. Remove the bound check and try to deliver temperature readings even if we are outside the guaranteed operation range. Signed-off-by: Niklas Söderlund Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200117160554.3812787-2-niklas.soderlund+renesas@ragnatech.se commit 35709c4ee772afc3818cd6d42d123d608feeaa33 Author: Gayatri Kammela Date: Wed Dec 11 12:00:43 2019 -0800 thermal: intel: intel_pch_thermal: Add Comet Lake (CML) platform support Add Comet Lake to the list of the platforms to support intel_pch_thermal driver. Cc: Zhang rui Cc: Srinivas Pandruvada Signed-off-by: Gayatri Kammela Acked-by: Zhang Rui Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191211200043.4985-1-gayatri.kammela@intel.com commit 66dd8b802c555a9becd81679dc0ee57ede67b142 Author: Chuhong Yuan Date: Fri Dec 6 15:55:31 2019 +0800 thermal: intel: Fix unmatched pci_release_region The driver calls pci_request_regions() in probe and uses pci_release_regions() in probe failure. However, it calls pci_release_region() in remove, which does match the other two calls. Use pci_release_regions() instead to unify them. Signed-off-by: Chuhong Yuan Acked-by: Zhang Rui Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191206075531.18637-1-hslester96@gmail.com commit f64a6583d3f527b297b88441e1c20e6ed45f8f56 Author: Swaminathan, Nivedita Date: Thu Dec 12 12:30:25 2019 -0800 thermal: int340x: processor_thermal: Add Jasper Lake support Added new PCI id for Jasper Lake processor thermal device. Signed-off-by: Swaminathan, Nivedita Signed-off-by: Srinivas Pandruvada Acked-by: Zhang Rui Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191212203025.36310-1-srinivas.pandruvada@linux.intel.com commit c168baec00a04e06cd3a6b644946190f5bbb472a Author: Stefan Wahren Date: Thu Jan 16 19:41:17 2020 +0100 dt-bindings: brcm,avs-ro-thermal: Fix binding check issues Drop the reg property since this only necessary for the parent and add the missing thermal-sensor-cells property description. Signed-off-by: Stefan Wahren Fixes: 37e9cc08e9678 ("dt-bindings: Add Broadcom AVS RO thermal") Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1579200077-17496-1-git-send-email-stefan.wahren@i2se.com commit 5fdd4e310b450939aac5486cd20e222a127cf114 Author: Florian Fainelli Date: Tue Jan 14 11:06:07 2020 -0800 thermal: brcmstb_thermal: Register different ops per process Since we do not have interrupts on BCM7216, we cannot have trip point crossing, the thermal subsystem expects us to provide a NULL set_trips operation in that case, so make it possible to provide per-process thermal_zone_of_device_ops Reviewed-by: Amit Kucheria Signed-off-by: Florian Fainelli Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200114190607.29339-7-f.fainelli@gmail.com commit eaf7a88d4f4c48efff77e0c66462d152d3334bcc Author: Florian Fainelli Date: Tue Jan 14 11:06:06 2020 -0800 thermal: brcmstb_thermal: Restructure interrupt registration If we are successful grabbing the interrupt resource, then register an interrupt handler, this makes it easier to support the interrupt as being optional, which is it for 7216. Reviewed-by: Amit Kucheria Signed-off-by: Florian Fainelli Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200114190607.29339-6-f.fainelli@gmail.com commit c9a506139b7a772be286c34493792ce1b428e992 Author: Florian Fainelli Date: Tue Jan 14 11:06:05 2020 -0800 thermal: brcmstb_thermal: Add 16nm process thermal parameters Match the 7216 compatible string in order to derive the correct 16nm process thermal parameters to obtain correct readings. Reviewed-by: Amit Kucheria Signed-off-by: Florian Fainelli Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200114190607.29339-5-f.fainelli@gmail.com commit ea0ad0ff382f5c86a090dc164a0df6993fb85d06 Author: Florian Fainelli Date: Tue Jan 14 11:06:04 2020 -0800 dt-bindings: thermal: Define BCM7216 thermal sensor compatible BCM7216 is a 16nm process STB chip, which requires a different compatible string to differentiate different temperature formulas. Reviewed-by: Rob Herring Signed-off-by: Florian Fainelli Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200114190607.29339-4-f.fainelli@gmail.com commit 8bcda3257acf86b652fb98b7d1ef6bf6c911bd28 Author: Florian Fainelli Date: Tue Jan 14 11:06:03 2020 -0800 thermal: brcmstb_thermal: Prepare to support a different process The driver is currently assuming that it is operating with a 28nm process chip, which has a specific formula to convert temperature to a code and vice versa. Update the code to support providing two key values: offset and multiplier to derive the correct formulas. Signed-off-by: Florian Fainelli Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200114190607.29339-3-f.fainelli@gmail.com commit e1ff6fc22f19e2af8adbad618526b80067911d40 Author: Florian Fainelli Date: Tue Jan 14 11:06:02 2020 -0800 thermal: brcmstb_thermal: Do not use DT coefficients At the time the brcmstb_thermal driver and its binding were merged, the DT binding did not make the coefficients properties a mandatory one, therefore all users of the brcmstb_thermal driver out there have a non functional implementation with zero coefficients. Even if these properties were provided, the formula used for computation is incorrect. The coefficients are entirely process specific (right now, only 28nm is supported) and not board or SoC specific, it is therefore appropriate to hard code them in the driver given the compatibility string we are probed with which has to be updated whenever a new process is introduced. We remove the existing coefficients definition since subsequent patches are going to add support for a new process and will introduce new coefficients as well. Fixes: 9e03cf1b2dd5 ("thermal: add brcmstb AVS TMON driver") Signed-off-by: Florian Fainelli Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200114190607.29339-2-f.fainelli@gmail.com commit 263c8c4c76d9da63f1f8805ac5fc62a270448301 Author: Geert Uytterhoeven Date: Wed Jan 15 13:54:17 2020 +0100 thermal: rcar_thermal: Use usleep_range() instead of udelay() rcar_thermal_update_temp() takes a mutex, so it is always called in a context that can sleep. Hence replace the 300 µs busy loop by a call to usleep_range(), to allow other threads to run. Signed-off-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200115125417.5263-1-geert+renesas@glider.be commit 1a90e73248c4d0add6583bd88bb5e082c3e090bc Author: Stefan Wahren Date: Mon Jan 13 19:56:18 2020 +0100 ARM: configs: Build BCM2711 thermal as module This builds the BCM2711 thermal driver as module for the Raspberry Pi 4. Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1578941778-23321-5-git-send-email-stefan.wahren@i2se.com commit a1d6989bf12b01cd9198e2c31a96678ac9c47415 Author: Stefan Wahren Date: Mon Jan 13 19:56:17 2020 +0100 ARM: dts: bcm2711: Enable thermal This enables thermal for the BCM2711 (used on Raspberry Pi 4) by adding the AVS monitor and a subnode for the thermal part. Signed-off-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Signed-off-by: Florian Fainelli Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1578941778-23321-4-git-send-email-stefan.wahren@i2se.com commit 59b781352dc4cb9ae27a8ddae0cda979d29d8af7 Author: Stefan Wahren Date: Mon Jan 13 19:56:16 2020 +0100 thermal: Add BCM2711 thermal driver This adds the thermal sensor driver for the Broadcom BCM2711 SoC, which is placed on the Raspberry Pi 4. The driver only provides SoC temperature reading so far. Signed-off-by: Stefan Wahren Reviewed-by: Florian Fainelli Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1578941778-23321-3-git-send-email-stefan.wahren@i2se.com commit ee31ff373da6602e7a4e60fe11322b41ac38eb22 Author: Stefan Wahren Date: Mon Jan 13 19:56:15 2020 +0100 dt-bindings: Add Broadcom AVS RO thermal Since the BCM2711 doesn't have a AVS TMON block, the thermal information must be retrieved from the AVS ring oscillator block. This block is part of the AVS monitor which contains a bunch of raw sensors. Signed-off-by: Stefan Wahren Reviewed-by: Rob Herring Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1578941778-23321-2-git-send-email-stefan.wahren@i2se.com commit 85f0ad221317c18e6032b6735f6b36c8a6a96ea9 Author: Yangtao Li Date: Sat Dec 28 17:19:04 2019 +0000 thermal: sun8i: Add hwmon support Expose sun8i thermal as a HWMON device. Signed-off-by: Yangtao Li Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191228171904.24618-1-tiny.windzz@gmail.com commit 291292cddccaca99f48b4701121bcb1870e4f7ce Author: Yangtao Li Date: Sun Jan 12 18:09:25 2020 +0000 thermal: sun8i: Remove unused variable and unneeded macros The cp_ft_flag variable is not used after initialization, so delete it. After that, THS_EFUSE_CP_FT_MASK, THS_EFUSE_CP_FT_BIT and THS_CALIBRATION_IN_FT are not needed, so delete them. Signed-off-by: Yangtao Li Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200112180925.23705-1-tiny.windzz@gmail.com commit 69d5f3a9c0c9044202db8793f34f0f0eb1e0302b Author: Yangtao Li Date: Sun Jan 12 17:13:18 2020 +0000 thermal: sun8i: Fix using plain integer as NULL pointer in sun8i_ths_resource_init sparse returns a warning: "drivers/thermal/sun8i_thermal.c:341:60: sparse: sparse: Using plain integer as NULL pointer". Fix it by replacing the zero integer by a NULL pointer. Reported-by: kbuild test robot Signed-off-by: Yangtao Li Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200112171318.23025-1-tiny.windzz@gmail.com commit d8186285f1fdbc847af75dfeaa4fcc574753c97c Author: Yangtao Li Date: Mon Jan 6 17:46:38 2020 +0000 thermal: sun8i: Fix r40 ths number According to the spec, r40 has 2 thermal sensors. Sensor0 located in the CPU, another in the GPU. Fixes: dccc5c3b6f30f ("thermal/drivers/sun8i: Add thermal driver for H6/H5/H3/A64/A83T/R40") Signed-off-by: Yangtao Li Tested-by: Corentin Labbe Tested-on: sun8i-r40-bananapi-m2-ultra Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200106174639.20862-1-tiny.windzz@gmail.com commit 4d94e4350e119050be5122a01849d000024d5c88 Merge: db038b1b2778 92439915e0e3 Author: David S. Miller Date: Mon Jan 27 11:33:29 2020 +0100 Merge branch 'bnxt_en-next' Michael Chan says: ==================== bnxt_en: Updates for net-next. This patch-set includes link up and link initialization improvements, RSS and aRFS improvements, devlink refactoring and registration improvements, devlink info support including documentation. v2: Removed the TC ingress rate limiting patch. The developer Harsha needs to rework some code. Use fw.psid suggested by Jakub Kicinski. ==================== Signed-off-by: David S. Miller commit 92439915e0e37495389bdaec5bda877293dd68b4 Author: Vasundhara Volam Date: Mon Jan 27 04:56:27 2020 -0500 devlink: document devlink info versions reported by bnxt_en driver Add the set of info versions reported by bnxt_en driver, including a description of what the version represents, and what modes (fixed, running, stored) it reports. v2: Use fw.psid. Cc: Jiri Pirko Cc: Jakub Kicinski Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 9599e036b161243d7c62399a1b6c250573e08a43 Author: Vasundhara Volam Date: Mon Jan 27 04:56:26 2020 -0500 bnxt_en: Add support for devlink info command Display the following information via devlink info command: - Driver name - Board id - Broad revision - Board Serial number - Board FW version - FW parameter set version - FW App version - FW management version - FW RoCE version Standard output example: $ devlink dev info pci/0000:3b:00.0 pci/0000:3b:00.0: driver bnxt_en serial_number 00-10-18-FF-FE-AD-05-00 versions: fixed: asic.id D802 asic.rev 1 running: fw 216.1.124.0 fw.psid 0.0.0 fw.app 216.1.122.0 fw.mgmt 864.0.32.0 fw.roce 216.1.15.0 [ This version has incorporated changes suggested by Jakub Kicinski to use generic devlink version tags. ] v2: Use fw.psid Cc: Jiri Pirko Cc: Jakub Kicinski Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 41c0d917d11edf9a34461f56e14f067aadb36101 Author: Vasundhara Volam Date: Mon Jan 27 04:56:25 2020 -0500 devlink: add macro for "fw.roce" Add definition and documentation for the new generic info "fw.roce". v2: Remove board.nvm_cfg since fw.psid is similar. Cc: Jiri Pirko Cc: Jakub Kicinski Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit b014232f7f56f6db10b8540b0b97ae8c7eeef28e Author: Vasundhara Volam Date: Mon Jan 27 04:56:24 2020 -0500 bnxt_en: Rename switch_id to dsn Instead of switch_id, renaming it to dsn will be more meaningful so that it can be used to display device serial number in follow up patch via devlink_info command. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 8159cbe3e0b24489f97ca0fb7df7a1710f03a26b Author: Vasundhara Volam Date: Mon Jan 27 04:56:23 2020 -0500 bnxt_en: Add support to update progress of flash update This patch adds status notification to devlink flash update while flashing is in progress. $ devlink dev flash pci/0000:05:00.0 file 103.pkg Preparing to flash Flashing done Cc: Jiri Pirko Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit cda2cab0771183932d6ba73c5ac63bb63decdadf Author: Vasundhara Volam Date: Mon Jan 27 04:56:22 2020 -0500 bnxt_en: Move devlink_register before registering netdev Latest kernels get the phys_port_name via devlink, if ndo_get_phys_port_name is not defined. To provide the phys_port_name correctly, register devlink before registering netdev. Also call devlink_port_type_eth_set() after registering netdev as devlink port updates the netdev structure and notifies user. Cc: Jiri Pirko Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 002870ebdabb75809d753e3c171c68c4e70a0e91 Author: Vasundhara Volam Date: Mon Jan 27 04:56:21 2020 -0500 bnxt_en: Register devlink irrespective of firmware spec version This will allow to register for devlink port and use port features. Also register params only if firmware spec version is at least 0x10600 which will support reading/setting numbered variables in NVRAM. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit d6292ade7f6f109bffe9e1065de37f688fa0107f Author: Vasundhara Volam Date: Mon Jan 27 04:56:20 2020 -0500 bnxt_en: Refactor bnxt_dl_register() Define bnxt_dl_params_register() and bnxt_dl_params_unregister() functions and move params register/unregister code to these newly defined functions. This patch is in preparation to register devlink irrespective of firmware spec. version in the next patch. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 5313845f491f22761c675f7009dd77b5ae64172d Author: Michael Chan Date: Mon Jan 27 04:56:19 2020 -0500 bnxt_en: Disable workaround for lost interrupts on 575XX B0 and newer chips. The hardware bug has been fixed on B0 and newer chips, so disable the workaround on these chips. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 87d67f59d6a33f741b5c6a42fa01b99ea2b14b7d Author: Pavan Chebbi Date: Mon Jan 27 04:56:18 2020 -0500 bnxt_en: Periodically check and remove aged-out ntuple filters Currently the only time we check and remove expired filters is when we are inserting new filters. Improving the aRFS expiry handling by adding code to do the above work periodically. Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit f47d0e19ae99329177423db80f86a601f8cd8e3e Author: Michael Chan Date: Mon Jan 27 04:56:17 2020 -0500 bnxt_en: Do not accept fragments for aRFS flow steering. In bnxt_rx_flow_steer(), if the dissected packet is a fragment, do not proceed to create the ntuple filter and return error instead. Otherwise we would create a filter with 0 source and destination ports because the dissected ports would not be available for fragments. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit c66c06c5e28a55920c87b386876461c139aa1878 Author: Michael Chan Date: Mon Jan 27 04:56:16 2020 -0500 bnxt_en: Support UDP RSS hashing on 575XX chips. 575XX (P5) chips have the same UDP RSS hashing capability as P4 chips, so we can enable it on P5 chips. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 1d86859fdf31a0d50cc82b5d0d6bfb5fe98f6c00 Author: Michael Chan Date: Mon Jan 27 04:56:15 2020 -0500 bnxt_en: Remove the setting of dev_port. The dev_port is meant to distinguish the network ports belonging to the same PCI function. Our devices only have one network port associated with each PCI function and so we should not set it for correctness. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 43a5107dc1acbf88a8a194beb9ff4e8563a2c7a3 Author: Michael Chan Date: Mon Jan 27 04:56:14 2020 -0500 bnxt_en: Improve bnxt_probe_phy(). If the 2nd parameter fw_dflt is not set, we are calling bnxt_probe_phy() after the firmware has reset. There is no need to query the current PHY settings from firmware as these settings may be different from the ethtool settings that the driver will re-establish later. So return earlier in bnxt_probe_phy() to save one firmware call. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 83d8f5e92d034a4c4a04d780107e73af31a38504 Author: Michael Chan Date: Mon Jan 27 04:56:13 2020 -0500 bnxt_en: Improve link up detection. In bnxt_update_phy_setting(), ethtool_get_link_ksettings() and bnxt_disable_an_for_lpbk(), we inconsistently use netif_carrier_ok() to determine link. Instead, we should use bp->link_info.link_up which has the true link state. The netif_carrier state may be off during self-test and while the device is being reset and may not always reflect the true link state. By always using bp->link_info.link_up, the code is now more consistent and more correct. Some unnecessary link toggles are now prevented with this patch. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit db038b1b277886e3a082175a6ef6c1d4da17715d Merge: 82bc2e4a26a6 67bffa79231f Author: David S. Miller Date: Mon Jan 27 11:31:36 2020 +0100 Merge branch 'ethtool-netlink-interface-part-2' Michal Kubecek says: ==================== ethtool netlink interface, part 2 This shorter series adds support for getting and setting of wake-on-lan settings and message mask (originally message level). Together with the code already in net-next, this will allow full implementation of "ethtool " and "ethtool -s ...". Older versions of the ethtool netlink series allowed getting WoL settings by unprivileged users and only filtered out the password but this was a source of controversy so for now, ETHTOOL_MSG_WOL_GET request always requires CAP_NET_ADMIN as ETHTOOL_GWOL ioctl request does. ==================== Signed-off-by: David S. Miller commit 67bffa79231f15ba372007972563cc8aa5e48bfa Author: Michal Kubecek Date: Sun Jan 26 23:11:19 2020 +0100 ethtool: add WOL_NTF notification Send ETHTOOL_MSG_WOL_NTF notification whenever wake-on-lan settings of a device are modified using ETHTOOL_MSG_WOL_SET netlink message or ETHTOOL_SWOL ioctl request. As notifications can be received by anyone, do not include SecureOn(tm) password in notification messages. Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller commit 8d425b19b305a77cb1ba67b84e7c1ca547de032f Author: Michal Kubecek Date: Sun Jan 26 23:11:16 2020 +0100 ethtool: set wake-on-lan settings with WOL_SET request Implement WOL_SET netlink request to set wake-on-lan settings. This is equivalent to ETHTOOL_SWOL ioctl request. Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller commit 51ea22b04ea0c210f9ce87b8a600965dbe476bc2 Author: Michal Kubecek Date: Sun Jan 26 23:11:13 2020 +0100 ethtool: provide WoL settings with WOL_GET request Implement WOL_GET request to get wake-on-lan settings for a device, traditionally available via ETHTOOL_GWOL ioctl request. As part of the implementation, provide symbolic names for wake-on-line modes as ETH_SS_WOL_MODES string set. Signed-off-by: Michal Kubecek Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 0bda7af39d2ba6ef83bd18e26bcb027f1630004e Author: Michal Kubecek Date: Sun Jan 26 23:11:10 2020 +0100 ethtool: add DEBUG_NTF notification Send ETHTOOL_MSG_DEBUG_NTF notification message whenever debugging message mask for a device are modified using ETHTOOL_MSG_DEBUG_SET netlink message or ETHTOOL_SMSGLVL ioctl request. The notification message has the same format as reply to DEBUG_GET request. As with other ethtool notifications, netlink requests only trigger the notification if the mask is actually changed while ioctl request trigger it whenever the request results in calling the ethtool_ops handler. Signed-off-by: Michal Kubecek Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e54d04e3afead22d8e7d6edaaac487a1205bac39 Author: Michal Kubecek Date: Sun Jan 26 23:11:07 2020 +0100 ethtool: set message mask with DEBUG_SET request Implement DEBUG_SET netlink request to set debugging settings for a device. At the moment, only message mask corresponding to message level as set by ETHTOOL_SMSGLVL ioctl request can be set. (It is called message level in ioctl interface but almost all drivers interpret it as a bit mask.) Signed-off-by: Michal Kubecek Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 6a94b8ccf6b77f005ab1b36a878e1d81df0c033e Author: Michal Kubecek Date: Sun Jan 26 23:11:04 2020 +0100 ethtool: provide message mask with DEBUG_GET request Implement DEBUG_GET request to get debugging settings for a device. At the moment, only message mask corresponding to message level as reported by ETHTOOL_GMSGLVL ioctl request is provided. (It is called message level in ioctl interface but almost all drivers interpret it as a bit mask.) As part of the implementation, provide symbolic names for message mask bits as ETH_SS_MSG_CLASSES string set. Signed-off-by: Michal Kubecek Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d2c4b444fd13f4699ab8c4c49062cd2c7516c241 Author: Michal Kubecek Date: Sun Jan 26 23:11:01 2020 +0100 ethtool: fix kernel-doc descriptions Fix missing or incorrect function argument and struct member descriptions. Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller commit c102671af085aacf17219e9bdcfccddc6620a866 Merge: c95d9c140cea 854e334903df Author: Rafael J. Wysocki Date: Mon Jan 27 11:30:38 2020 +0100 Merge branch 'pm-devfreq' * pm-devfreq: (24 commits) PM / devfreq: Add debugfs support with devfreq_summary file PM / devfreq: exynos: Rename Exynos to lowercase PM / devfreq: imx8m-ddrc: Fix inconsistent IS_ERR and PTR_ERR PM / devfreq: exynos-bus: Add error log when fail to get devfreq-event PM / devfreq: exynos-bus: Disable devfreq-event device when fails PM / devfreq: rk3399_dmc: Disable devfreq-event device when fails PM / devfreq: imx8m-ddrc: Remove unused defines PM / devfreq: exynos-bus: Reduce goto statements and remove unused headers PM / devfreq: rk3399_dmc: Add COMPILE_TEST and HAVE_ARM_SMCCC dependency PM / devfreq: rockchip-dfi: Convert to devm_platform_ioremap_resource PM / devfreq: rk3399_dmc: Add missing of_node_put() PM / devfreq: rockchip-dfi: Add missing of_node_put() PM / devfreq: Fix multiple kernel-doc warnings PM / devfreq: exynos-bus: Extract exynos_bus_profile_init_passive() PM / devfreq: exynos-bus: Extract exynos_bus_profile_init() PM / devfreq: Move declaration of DEVICE_ATTR_RW(min_freq) PM / devfreq: Move statistics to separate struct devfreq_stats PM / devfreq: Add clearing transitions stats PM / devfreq: Change time stats to 64-bit PM / devfreq: Add new name attribute for sysfs ... commit c95d9c140cea04bb052bd853eee24d0020734d9d Merge: 245224d1cb54 d229290689ae ead067beb56f c267930f3f10 f9900c178d61 0b7c99d9a229 Author: Rafael J. Wysocki Date: Mon Jan 27 11:30:13 2020 +0100 Merge branches 'pm-core', 'powercap', 'pm-opp', 'pm-avs' and 'pm-misc' * pm-core: PM-runtime: add tracepoints for usage_count changes * powercap: powercap/intel_rapl: add support for JasperLake x86/cpu: Add Jasper Lake to Intel family powercap/intel_rapl: add support for TigerLake Mobile * pm-opp: opp: Replace list_kref with a local counter opp: Free static OPPs on errors while adding them * pm-avs: power: avs: qcom-cpr: remove duplicated include from qcom-cpr.c power: avs: fix uninitialized error return on failed cpr_read_fuse_uV() call power: avs: qcom-cpr: make cpr_get_opp_hz_for_req() static power: avs: qcom-cpr: remove set but unused variable power: avs: qcom-cpr: make sure that regmap is available power: avs: qcom-cpr: fix unsigned expression compared with zero power: avs: qcom-cpr: fix invalid printk specifier in debug print power: avs: Add support for CPR (Core Power Reduction) dt-bindings: power: avs: Add support for CPR (Core Power Reduction) * pm-misc: mailmap: Add entry for commit 245224d1cb5465414e52fcd1873057f7ce7b14ca Merge: 5b82ba70ded0 0a9db0a0e32c 322e929d196c Author: Rafael J. Wysocki Date: Mon Jan 27 11:29:09 2020 +0100 Merge branches 'pm-cpufreq' and 'pm-sleep' * pm-cpufreq: cpufreq: loongson2_cpufreq: adjust cpufreq uses of LOONGSON_CHIPCFG cpufreq: brcmstb-avs: fix imbalance of cpufreq policy refcount cpufreq: intel_pstate: fix spelling mistake: "Whethet" -> "Whether" cpufreq: s3c: fix unbalances of cpufreq policy refcount cpufreq: imx-cpufreq-dt: Add i.MX8MP support cpufreq: Use imx-cpufreq-dt for i.MX8MP's speed grading cpufreq: tegra186: convert to devm_platform_ioremap_resource cpufreq: kirkwood: convert to devm_platform_ioremap_resource cpufreq: CPPC: put ACPI table after using it cpufreq : CPPC: Break out if HiSilicon CPPC workaround is matched * pm-sleep: PM: suspend: Add sysfs attribute to control the "sync on suspend" behavior PM: hibernate: fix spelling mistake "shapshot" -> "snapshot" PM: hibernate: Add more logging on hibernation failure PM: hibernate: improve arithmetic division in preallocate_highmem_fraction() PM: wakeup: Show statistics for deleted wakeup sources again PM: sleep: Switch to rtc_time64_to_tm()/rtc_tm_to_time64() commit 5b82ba70ded00337eafa7de65ffe40b530bfbe61 Merge: 3a83c8c81c91 86e9466ae620 Author: Rafael J. Wysocki Date: Mon Jan 27 11:28:57 2020 +0100 Merge branch 'pm-cpuidle' * pm-cpuidle: (27 commits) intel_idle: Clean up irtl_2_usec() intel_idle: Move 3 functions closer to their callers intel_idle: Annotate initialization code and data structures intel_idle: Move and clean up intel_idle_cpuidle_devices_uninit() intel_idle: Rearrange intel_idle_cpuidle_driver_init() intel_idle: Clean up NULL pointer check in intel_idle_init() intel_idle: Fold intel_idle_probe() into intel_idle_init() intel_idle: Eliminate __setup_broadcast_timer() cpuidle: fix cpuidle_find_deepest_state() kerneldoc warnings cpuidle: sysfs: fix warnings when compiling with W=1 cpuidle: coupled: fix warnings when compiling with W=1 Documentation: admin-guide: PM: Add intel_idle document cpuidle: arm: Enable compile testing for some of drivers cpuidle: Drop unused cpuidle_driver_ref/unref() functions intel_idle: Use ACPI _CST on server systems intel_idle: Add module parameter to prevent ACPI _CST from being used intel_idle: Allow ACPI _CST to be used for selected known processors cpuidle: Allow idle states to be disabled by default intel_idle: Use ACPI _CST for processor models without C-state tables intel_idle: Refactor intel_idle_cpuidle_driver_init() ... commit 82bc2e4a26a65e8b23590565b89115f8634d4fe6 Merge: c4c57b974d27 2a13513f99e7 Author: David S. Miller Date: Mon Jan 27 11:25:36 2020 +0100 Merge tag 'wireless-drivers-next-2020-01-26' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.6 Second set of patches for v5.6. Nothing special standing out, smaller new features and fixes allover. Major changes: ar5523 * add support for SMCWUSBT-G2 USB device iwlwifi * support new versions of the FTM FW APIs * support new version of the beacon template FW API * print some extra information when the driver is loaded rtw88 * support wowlan feature for 8822c * add support for WIPHY_WOWLAN_NET_DETECT brcmfmac * add initial support for monitor mode qtnfmac * add module parameter to enable DFS offloading in firmware * add support for STA HE rates * add support for TWT responder and spatial reuse ==================== Signed-off-by: David S. Miller commit 82650dab9a5a2928c8d982cce5e3c687f14f8716 Merge: b23bfa5633b1 265bb359061d Author: Daniel Borkmann Date: Mon Jan 27 11:25:07 2020 +0100 Merge branch 'bpf-flow-dissector-fix-port-ranges' Yoshiki Komachi says: ==================== When I tried a test based on the selftest program for BPF flow dissector (test_flow_dissector.sh), I observed unexpected result as below: $ tc filter add dev lo parent ffff: protocol ip pref 1337 flower ip_proto \ udp src_port 8-10 action drop $ tools/testing/selftests/bpf/test_flow_dissector -i 4 -f 9 -F inner.dest4: 127.0.0.1 inner.source4: 127.0.0.3 pkts: tx=10 rx=10 The last rx means the number of received packets. I expected rx=0 in this test (i.e., all received packets should have been dropped), but it resulted in acceptance. Although the previous commit 8ffb055beae5 ("cls_flower: Fix the behavior using port ranges with hw-offload") added new flag and field toward filtering based on port ranges with hw-offload, it missed applying for BPF flow dissector then. As a result, BPF flow dissector currently stores data extracted from packets in incorrect field used for exact match whenever packets are classified by filters based on port ranges. Thus, they never match rules in such cases because flow dissector gives rise to generating incorrect flow keys. This series fixes the issue by replacing incorrect flag and field with new ones in BPF flow dissector, and adds a test for filtering based on specified port ranges to the existing selftest program. Changes in v2: - set key_ports to NULL at the top of __skb_flow_bpf_to_target() ==================== Signed-off-by: Daniel Borkmann commit 265bb359061db6ef825dec3912f341a604966371 Author: Yoshiki Komachi Date: Fri Jan 17 16:05:33 2020 +0900 selftests/bpf: Add test based on port range for BPF flow dissector Add a simple test to make sure that a filter based on specified port range classifies packets correctly. Signed-off-by: Yoshiki Komachi Signed-off-by: Daniel Borkmann Acked-by: Petar Penkov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200117070533.402240-3-komachi.yoshiki@gmail.com commit 59fb9b62fb6c929a756563152a89f39b07cf8893 Author: Yoshiki Komachi Date: Fri Jan 17 16:05:32 2020 +0900 flow_dissector: Fix to use new variables for port ranges in bpf hook This patch applies new flag (FLOW_DISSECTOR_KEY_PORTS_RANGE) and field (tp_range) to BPF flow dissector to generate appropriate flow keys when classified by specified port ranges. Fixes: 8ffb055beae5 ("cls_flower: Fix the behavior using port ranges with hw-offload") Signed-off-by: Yoshiki Komachi Signed-off-by: Daniel Borkmann Acked-by: Petar Penkov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200117070533.402240-2-komachi.yoshiki@gmail.com commit c4c57b974d27f53744b1bc5669e002f080cec839 Merge: 5a44c71ccda6 11eb85ec42dc Author: David S. Miller Date: Mon Jan 27 11:24:46 2020 +0100 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: bluetooth-next 2020-01-26 Here's (probably) the last bluetooth-next pull request for the 5.6 kernel. - Initial pieces of Bluetooth 5.2 Isochronous Channels support - mgmt: Various cleanups and a new Set Blocked Keys command - btusb: Added support for 04ca:3021 QCA_ROME device - hci_qca: Multiple fixes & cleanups - hci_bcm: Fixes & improved device tree support - Fixed attempts to create duplicate debugfs entries Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 5a44c71ccda60a50073c5d7fe3f694cdfa3ab0c2 Author: Christophe JAILLET Date: Sun Jan 26 11:44:29 2020 +0100 drivers: net: xgene: Fix the order of the arguments of 'alloc_etherdev_mqs()' 'alloc_etherdev_mqs()' expects first 'tx', then 'rx'. The semantic here looks reversed. Reorder the arguments passed to 'alloc_etherdev_mqs()' in order to keep the correct semantic. In fact, this is a no-op because both XGENE_NUM_[RT]X_RING are 8. Fixes: 107dec2749fe ("drivers: net: xgene: Add support for multiple queues") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit b23bfa5633b19bf1db87b36a76b2225c734f794c Author: John Fastabend Date: Sun Jan 26 16:14:02 2020 -0800 bpf, xdp: Remove no longer required rcu_read_{un}lock() Now that we depend on rcu_call() and synchronize_rcu() to also wait for preempt_disabled region to complete the rcu read critical section in __dev_map_flush() is no longer required. Except in a few special cases in drivers that need it for other reasons. These originally ensured the map reference was safe while a map was also being free'd. And additionally that bpf program updates via ndo_bpf did not happen while flush updates were in flight. But flush by new rules can only be called from preempt-disabled NAPI context. The synchronize_rcu from the map free path and the rcu_call from the delete path will ensure the reference there is safe. So lets remove the rcu_read_lock and rcu_read_unlock pair to avoid any confusion around how this is being protected. If the rcu_read_lock was required it would mean errors in the above logic and the original patch would also be wrong. Now that we have done above we put the rcu_read_lock in the driver code where it is needed in a driver dependent way. I think this helps readability of the code so we know where and why we are taking read locks. Most drivers will not need rcu_read_locks here and further XDP drivers already have rcu_read_locks in their code paths for reading xdp programs on RX side so this makes it symmetric where we don't have half of rcu critical sections define in driver and the other half in devmap. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/1580084042-11598-4-git-send-email-john.fastabend@gmail.com commit 9719c6b98db42462bfb9aa172f017bdfd6d66c6f Author: John Fastabend Date: Sun Jan 26 16:14:01 2020 -0800 bpf, xdp: virtio_net use access ptr macro for xdp enable check virtio_net currently relies on rcu critical section to access the xdp program in its xdp_xmit handler. However, the pointer to the xdp program is only used to do a NULL pointer comparison to determine if xdp is enabled or not. Use rcu_access_pointer() instead of rcu_dereference() to reflect this. Then later when we drop rcu_read critical section virtio_net will not need in special handling. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/1580084042-11598-3-git-send-email-john.fastabend@gmail.com commit 42a84a8cd0ff0cbff5a4595e1304c4567a30267d Author: John Fastabend Date: Sun Jan 26 16:14:00 2020 -0800 bpf, xdp: Update devmap comments to reflect napi/rcu usage Now that we rely on synchronize_rcu and call_rcu waiting to exit perempt-disable regions (NAPI) lets update the comments to reflect this. Fixes: 0536b85239b84 ("xdp: Simplify devmap cleanup") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Acked-by: Song Liu Link: https://lore.kernel.org/bpf/1580084042-11598-2-git-send-email-john.fastabend@gmail.com commit a8ec173a3f29fd777681c72835d4d8642ebea899 Author: Heiner Kallweit Date: Sun Jan 26 10:40:44 2020 +0100 r8169: don't set min_mtu/max_mtu if not needed Defaults for min_mtu and max_mtu are set by ether_setup(), which is called from devm_alloc_etherdev(). Let rtl_jumbo_max() only return a positive value if actually jumbo packets are supported. This also allows to remove constant Jumbo_1K which is a little misleading anyway. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 6dd4b4f3936e17fedea1308bc70e9716f68bf232 Author: Christophe JAILLET Date: Sat Jan 25 22:18:47 2020 +0100 mlxsw: minimal: Fix an error handling path in 'mlxsw_m_port_create()' An 'alloc_etherdev()' called is not ballanced by a corresponding 'free_netdev()' call in one error handling path. Slighly reorder the error handling code to catch the missed case. Fixes: c100e47caa8e ("mlxsw: minimal: Add ethtool support") Signed-off-by: Christophe JAILLET Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 6dc43cd3aae0ffeeaebe427e1bf5e5faf9de7d42 Author: Vladimir Oltean Date: Sat Jan 25 23:01:11 2020 +0200 net: dsa: Fix use-after-free in probing of DSA switch tree DSA sets up a switch tree little by little. Every switch of the N members of the tree calls dsa_register_switch, and (N - 1) will just touch the dst->ports list with their ports and quickly exit. Only the last switch that calls dsa_register_switch will find all DSA links complete in dsa_tree_setup_routing_table, and not return zero as a result but instead go ahead and set up the entire DSA switch tree (practically on behalf of the other switches too). The trouble is that the (N - 1) switches don't clean up after themselves after they get an error such as EPROBE_DEFER. Their footprint left in dst->ports by dsa_switch_touch_ports is still there. And switch N, the one responsible with actually setting up the tree, is going to work with those stale dp, dp->ds and dp->ds->dev pointers. In particular ds and ds->dev might get freed by the device driver. Be there a 2-switch tree and the following calling order: - Switch 1 calls dsa_register_switch - Calls dsa_switch_touch_ports, populates dst->ports - Calls dsa_port_parse_cpu, gets -EPROBE_DEFER, exits. - Switch 2 calls dsa_register_switch - Calls dsa_switch_touch_ports, populates dst->ports - Probe doesn't get deferred, so it goes ahead. - Calls dsa_tree_setup_routing_table, which returns "complete == true" due to Switch 1 having called dsa_switch_touch_ports before. - Because the DSA links are complete, it calls dsa_tree_setup_switches now. - dsa_tree_setup_switches iterates through dst->ports, initializing the Switch 1 ds structure (invalid) and the Switch 2 ds structure (valid). - Undefined behavior (use after free, sometimes NULL pointers, etc). Real example below (debugging prints added by me, as well as guards against NULL pointers): [ 5.477947] dsa_tree_setup_switches: Setting up port 0 of switch ffffff803df0b980 (dev ffffff803f775c00) [ 6.313002] dsa_tree_setup_switches: Setting up port 1 of switch ffffff803df0b980 (dev ffffff803f775c00) [ 6.319932] dsa_tree_setup_switches: Setting up port 2 of switch ffffff803df0b980 (dev ffffff803f775c00) [ 6.329693] dsa_tree_setup_switches: Setting up port 3 of switch ffffff803df0b980 (dev ffffff803f775c00) [ 6.339458] dsa_tree_setup_switches: Setting up port 4 of switch ffffff803df0b980 (dev ffffff803f775c00) [ 6.349226] dsa_tree_setup_switches: Setting up port 5 of switch ffffff803df0b980 (dev ffffff803f775c00) [ 6.358991] dsa_tree_setup_switches: Setting up port 6 of switch ffffff803df0b980 (dev ffffff803f775c00) [ 6.368758] dsa_tree_setup_switches: Setting up port 7 of switch ffffff803df0b980 (dev ffffff803f775c00) [ 6.378524] dsa_tree_setup_switches: Setting up port 8 of switch ffffff803df0b980 (dev ffffff803f775c00) [ 6.388291] dsa_tree_setup_switches: Setting up port 9 of switch ffffff803df0b980 (dev ffffff803f775c00) [ 6.398057] dsa_tree_setup_switches: Setting up port 10 of switch ffffff803df0b980 (dev ffffff803f775c00) [ 6.407912] dsa_tree_setup_switches: Setting up port 0 of switch ffffff803da02f80 (dev 0000000000000000) [ 6.417682] dsa_tree_setup_switches: Setting up port 1 of switch ffffff803da02f80 (dev 0000000000000000) [ 6.427446] dsa_tree_setup_switches: Setting up port 2 of switch ffffff803da02f80 (dev 0000000000000000) [ 6.437212] dsa_tree_setup_switches: Setting up port 3 of switch ffffff803da02f80 (dev 0000000000000000) [ 6.446979] dsa_tree_setup_switches: Setting up port 4 of switch ffffff803da02f80 (dev 0000000000000000) [ 6.456744] dsa_tree_setup_switches: Setting up port 5 of switch ffffff803da02f80 (dev 0000000000000000) [ 6.466512] dsa_tree_setup_switches: Setting up port 6 of switch ffffff803da02f80 (dev 0000000000000000) [ 6.476277] dsa_tree_setup_switches: Setting up port 7 of switch ffffff803da02f80 (dev 0000000000000000) [ 6.486043] dsa_tree_setup_switches: Setting up port 8 of switch ffffff803da02f80 (dev 0000000000000000) [ 6.495810] dsa_tree_setup_switches: Setting up port 9 of switch ffffff803da02f80 (dev 0000000000000000) [ 6.505577] dsa_tree_setup_switches: Setting up port 10 of switch ffffff803da02f80 (dev 0000000000000000) [ 6.515433] dsa_tree_setup_switches: Setting up port 0 of switch ffffff803db15b80 (dev ffffff803d8e4800) [ 7.354120] dsa_tree_setup_switches: Setting up port 1 of switch ffffff803db15b80 (dev ffffff803d8e4800) [ 7.361045] dsa_tree_setup_switches: Setting up port 2 of switch ffffff803db15b80 (dev ffffff803d8e4800) [ 7.370805] dsa_tree_setup_switches: Setting up port 3 of switch ffffff803db15b80 (dev ffffff803d8e4800) [ 7.380571] dsa_tree_setup_switches: Setting up port 4 of switch ffffff803db15b80 (dev ffffff803d8e4800) [ 7.390337] dsa_tree_setup_switches: Setting up port 5 of switch ffffff803db15b80 (dev ffffff803d8e4800) [ 7.400104] dsa_tree_setup_switches: Setting up port 6 of switch ffffff803db15b80 (dev ffffff803d8e4800) [ 7.409872] dsa_tree_setup_switches: Setting up port 7 of switch ffffff803db15b80 (dev ffffff803d8e4800) [ 7.419637] dsa_tree_setup_switches: Setting up port 8 of switch ffffff803db15b80 (dev ffffff803d8e4800) [ 7.429403] dsa_tree_setup_switches: Setting up port 9 of switch ffffff803db15b80 (dev ffffff803d8e4800) [ 7.439169] dsa_tree_setup_switches: Setting up port 10 of switch ffffff803db15b80 (dev ffffff803d8e4800) The solution is to recognize that the functions that call dsa_switch_touch_ports (dsa_switch_parse_of, dsa_switch_parse) have side effects, and therefore one should clean up their side effects on error path. The cleanup of dst->ports was taken from dsa_switch_remove and moved into a dedicated dsa_switch_release_ports function, which should really be per-switch (free only the members of dst->ports that are also members of ds, instead of all switch ports). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit a85dd3a5170c8812cd835ea968ccadf0ebf1648e Author: Heiner Kallweit Date: Sat Jan 25 13:42:14 2020 +0100 net: remove eth_change_mtu All usage of this function was removed three years ago, and the function was marked as deprecated: a52ad514fdf3 ("net: deprecate eth_change_mtu, remove usage") So I think we can remove it now. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 0e6223ea903a892ba6962bdf823572e595dc8236 Merge: 09917a126d5b 02758cb6dac3 Author: David S. Miller Date: Mon Jan 27 11:05:42 2020 +0100 Merge branch 'XDP-fixes-for-socionext-driver' Lorenzo Bianconi says: ==================== XDP fixes for socionext driver Fix possible user-after-in XDP rx path Fix rx statistics accounting if no bpf program is attached ==================== Signed-off-by: David S. Miller commit 02758cb6dac31a2b4bd9e535cffbe718acd46404 Author: Lorenzo Bianconi Date: Sat Jan 25 12:48:51 2020 +0100 net: socionext: fix xdp_result initialization in netsec_process_rx Fix xdp_result initialization in netsec_process_rx in order to not increase rx counters if there is no bpf program attached to the xdp hook and napi_gro_receive returns GRO_DROP Fixes: ba2b232108d3c ("net: netsec: add XDP support") Signed-off-by: Lorenzo Bianconi Acked-by: Jesper Dangaard Brouer Acked-by: Ilias Apalodimas Signed-off-by: David S. Miller commit b5e82e3c89c78ee0407ea8e8087af5519b6c7bae Author: Lorenzo Bianconi Date: Sat Jan 25 12:48:50 2020 +0100 net: socionext: fix possible user-after-free in netsec_process_rx Fix possible use-after-free in in netsec_process_rx that can occurs if the first packet is sent to the normal networking stack and the following one is dropped by the bpf program attached to the xdp hook. Fix the issue defining the skb pointer in the 'budget' loop Fixes: ba2b232108d3c ("net: netsec: add XDP support") Signed-off-by: Lorenzo Bianconi Acked-by: Jesper Dangaard Brouer Acked-by: Ilias Apalodimas Signed-off-by: David S. Miller commit 09917a126d5babd9d0d9bee8ee2c5fc8517851e6 Merge: cd94ef06392f d48834f9d4b4 Author: David S. Miller Date: Mon Jan 27 11:03:44 2020 +0100 Merge branch 'net-allow-per-net-notifier-to-follow-netdev-into-namespace' Jiri Pirko says: ==================== net: allow per-net notifier to follow netdev into namespace Currently we have per-net notifier, which allows to get only notifications relevant to particular network namespace. That is enough for drivers that have netdevs local in a particular namespace (cannot move elsewhere). However if netdev can change namespace, per-net notifier cannot be used. Introduce dev_net variant that is basically per-net notifier with an extension that re-registers the per-net notifier upon netdev namespace change. Basically the per-net notifier follows the netdev into namespace. ==================== Signed-off-by: David S. Miller commit d48834f9d4b4e7611cc84ac2c5018f1b420d59c2 Author: Jiri Pirko Date: Sat Jan 25 12:17:09 2020 +0100 mlx5: Use dev_net netdevice notifier registrations Register the dev_net notifier and allow the per-net notifier to follow the device into different namespace. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 93642e14bd50e59b11cf6389ce3fc243e932777a Author: Jiri Pirko Date: Sat Jan 25 12:17:08 2020 +0100 net: introduce dev_net notifier register/unregister variants Introduce dev_net variants of netdev notifier register/unregister functions and allow per-net notifier to follow the netdevice into the namespace it is moved to. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 1f637703d8b63f1ba411b4c798e998e3f828b6cb Author: Jiri Pirko Date: Sat Jan 25 12:17:07 2020 +0100 net: push code from net notifier reg/unreg into helpers Push the code which is done under rtnl lock in net notifier register and unregister function into separate helpers. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit 48b3a1379fc6603c1ff26893ea05322c1c41e31c Author: Jiri Pirko Date: Sat Jan 25 12:17:06 2020 +0100 net: call call_netdevice_unregister_net_notifiers from unregister The function does the same thing as the existing code, so rather call call_netdevice_unregister_net_notifiers() instead of code duplication. Signed-off-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller commit cd94ef06392ffd49e0a0e1c28bc5cd44f37f1f6b Author: Kuniyuki Iwashima Date: Sat Jan 25 10:41:02 2020 +0000 soreuseport: Cleanup duplicate initialization of more_reuse->max_socks. reuseport_grow() does not need to initialize the more_reuse->max_socks again. It is already initialized in __reuseport_alloc(). Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller commit 4d434705cbdbb2415b20a0d89f0a3065f5501e28 Merge: 79572c98c554 9fd1ff5d2ac7 Author: David S. Miller Date: Mon Jan 27 11:00:21 2020 +0100 Merge branch 'Support-fraglist-GRO-GSO' Steffen Klassert says: ==================== Support fraglist GRO/GSO This patchset adds support to do GRO/GSO by chaining packets of the same flow at the SKB frag_list pointer. This avoids the overhead to merge payloads into one big packet, and on the other end, if GSO is needed it avoids the overhead of splitting the big packet back to the native form. Patch 1 adds netdev feature flags to enable fraglist GRO, this implements one of the configuration options discussed at netconf 2019. Patch 2 adds a netdev software feature set that defaults to off and assigns the new fraglist GRO feature flag to it. Patch 3 adds the core infrastructure to do fraglist GRO/GSO. Patch 4 enables UDP to use fraglist GRO/GSO if configured. I have only meaningful forwarding performance measurements. I did some tests for the local receive path with netperf and iperf, but in this case the sender that generates the packets is the bottleneck. So the benchmarks are not that meaningful for the receive path. Paolo Abeni did some benchmarks of the local receive path for the RFC v2 version of this pachset, results can be found here: https://www.spinics.net/lists/netdev/msg551158.html I used my IPsec forwarding test setup for the performance measurements: ------------ ------------ -->| router 1 |-------->| router 2 |-- | ------------ ------------ | | | | -------------------- | --------|Spirent Testcenter|<---------- -------------------- net-next (September 7th 2019): Single stream UDP frame size 1460 Bytes: 1.161.000 fps (13.5 Gbps). ---------------------------------------------------------------------- net-next (September 7th 2019) + standard UDP GRO/GSO (not implemented in this patchset): Single stream UDP frame size 1460 Bytes: 1.801.000 fps (21 Gbps). ---------------------------------------------------------------------- net-next (September 7th 2019) + fraglist UDP GRO/GSO: Single stream UDP frame size 1460 Bytes: 2.860.000 fps (33.4 Gbps). ======================================================================= net-next (January 23th 2020): Single stream UDP frame size 1460 Bytes: 919.000 fps (10.73 Gbps). ---------------------------------------------------------------------- net-next (January 23th 2020) + fraglist UDP GRO/GSO: Single stream UDP frame size 1460 Bytes: 2.430.000 fps (28.38 Gbps). ----------------------------------------------------------------------- Changes from RFC v1: - Add IPv6 support. - Split patchset to enable UDP GRO by default before adding fraglist GRO support. - Mark fraglist GRO packets as CHECKSUM_NONE. - Take a refcount on the first segment skb when doing fraglist segmentation. With this we can use the same error handling path as with standard segmentation. Changes from RFC v2: - Add a netdev feature flag to configure listifyed GRO. - Fix UDP GRO enabling for IPv6. - Fix a rcu_read_lock() imbalance. - Fix error path in skb_segment_list(). Changes from RFC v3: - Rename NETIF_F_GRO_LIST to NETIF_F_GRO_FRAGLIST and add NETIF_F_GSO_FRAGLIST. - Move introduction of SKB_GSO_FRAGLIST to patch 2. - Use udpv6_encap_needed_key instead of udp_encap_needed_key in IPv6. - Move some missplaced code from patch 5 to patch 1 where it belongs to. Changes from RFC v4: - Drop the 'UDP: enable GRO by default' patch for now. Standard UDP GRO is not changed with this patchset. - Rebase to net-next current. Changes fom v1 (December 18th): - Do a full __copy_skb_header instead of tryng to find the really needed subset header fields. Thisa can be done later. - Mark all fraglist GRO packets with CHECKSUM_UNNECESSARY. - Rebase to net-next current. Changes fom v2 (January 24th): - Do the CHECKSUM_UNNECESSARY setting from IPv4 for IPv6 too. ==================== Signed-off-by: David S. Miller commit 9fd1ff5d2ac7181844735806b0a703c942365291 Author: Steffen Klassert Date: Sat Jan 25 11:26:45 2020 +0100 udp: Support UDP fraglist GRO/GSO. This patch extends UDP GRO to support fraglist GRO/GSO by using the previously introduced infrastructure. If the feature is enabled, all UDP packets are going to fraglist GRO (local input and forward). After validating the csum, we mark ip_summed as CHECKSUM_UNNECESSARY for fraglist GRO packets to make sure that the csum is not touched. Signed-off-by: Steffen Klassert Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 3a1296a38d0cf62bffb9a03c585cbd5dbf15d596 Author: Steffen Klassert Date: Sat Jan 25 11:26:44 2020 +0100 net: Support GRO/GSO fraglist chaining. This patch adds the core functions to chain/unchain GSO skbs at the frag_list pointer. This also adds a new GSO type SKB_GSO_FRAGLIST and a is_flist flag to napi_gro_cb which indicates that this flow will be GROed by fraglist chaining. Signed-off-by: Steffen Klassert Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 1a3c998f3a27ab6ecf56bdbb17e27e55fd6d47cd Author: Steffen Klassert Date: Sat Jan 25 11:26:43 2020 +0100 net: Add a netdev software feature set that defaults to off. The previous patch added the NETIF_F_GRO_FRAGLIST feature. This is a software feature that should default to off. Current software features default to on, so add a new feature set that defaults to off. Signed-off-by: Steffen Klassert Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 3b33583265ed3b0ae76eddbabf9d038b4076d1a9 Author: Steffen Klassert Date: Sat Jan 25 11:26:42 2020 +0100 net: Add fraglist GRO/GSO feature flags This adds new Fraglist GRO/GSO feature flags. They will be used to configure fraglist GRO/GSO what will be implemented with some followup paches. Signed-off-by: Steffen Klassert Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 79572c98c554dcdb080bca547c871a51716dcdf8 Author: Sven Auhagen Date: Sat Jan 25 08:07:03 2020 +0000 mvneta driver disallow XDP program on hardware buffer management Recently XDP Support was added to the mvneta driver for software buffer management only. It is still possible to attach an XDP program if hardware buffer management is used. It is not doing anything at that point. The patch disallows attaching XDP programs to mvneta if hardware buffer management is used. I am sorry about that. It is my first submission and I am having some troubles with the format of my emails. v4 -> v5: - Remove extra tabs v3 -> v4: - Please ignore v3 I accidentally submitted my other patch with git-send-mail and v4 is correct v2 -> v3: - My mailserver corrupted the patch resubmission with git-send-email v1 -> v2: - Fixing the patches indentation Signed-off-by: Sven Auhagen Signed-off-by: David S. Miller commit ca11abf113474fe8e1205c6851a9a6ffd598bb26 Merge: 3dd855147fef 643956e61ced 0528904926aa 3df663a147fe 0435bcd9e185 1985f8c7f9a4 Author: Rafael J. Wysocki Date: Mon Jan 27 10:58:05 2020 +0100 Merge branches 'acpi-tables', 'acpi-button', 'acpi-ec', 'acpi-doc' and 'acpi-tools' * acpi-tables: ACPI: PPTT: Consistently use unsigned int as parameter type * acpi-button: ACPI: button: Add DMI quirk for Razer Blade Stealth 13 late 2019 lid switch * acpi-ec: ACPI: EC: Reference count query handlers under lock * acpi-doc: docs: firmware-guide: ACPI: Replace dma_request_slave_channel() with dma_request_chan() * acpi-tools: tools/power/acpi: fix compilation error commit 3dd855147feff375dfa6737331628ea919e9da59 Merge: ff7a672f83b3 ff3154d1d89a d21a91629f4b d19e470b6605 9b1b5535dfc9 Author: Rafael J. Wysocki Date: Mon Jan 27 10:57:09 2020 +0100 Merge branches 'acpi-battery', 'acpi-video', 'acpi-fan' and 'acpi-drivers' * acpi-battery: ACPI / battery: Deal better with neither design nor full capacity not being reported ACPI / battery: Use design-cap for capacity calculations if full-cap is not available ACPI / battery: Deal with design or full capacity being reported as -1 * acpi-video: ACPI: video: Do not export a non working backlight interface on MSI MS-7721 boards ACPI: video: Use native backlight on Lenovo E41-25/45 ACPI: video: fix typo in comment * acpi-fan: ACPI: fan: Expose fan performance state information * acpi-drivers: thermal: int340x_thermal: Add Tiger Lake ACPI device IDs platform/x86: intel-hid: Add Tiger Lake ACPI device ID ACPI: fan: Add Tiger Lake ACPI device ID ACPI: DPTF: Add Tiger Lake ACPI device IDs commit ff7a672f83b355365478a1fdfb60933ef34d8d02 Merge: cea79e7e2f24 be91c44288be Author: Rafael J. Wysocki Date: Mon Jan 27 10:56:49 2020 +0100 Merge branch 'acpica' * acpica: ACPICA: Update version to 20200110 ACPICA: All acpica: Update copyrights to 2020 Including tool signons. ACPICA: Update the list of maintainers ACPICA: Update version to 20191213 ACPICA: Dispatcher: always generate buffer objects for ASL create_field() operator ACPICA: acpisrc: add unix line ending support for non-windows build ACPICA: Disassembler: create buffer fields in ACPI_PARSE_LOAD_PASS1 ACPICA: debugger: fix spelling mistake "adress" -> "address" commit 122d74fac84204b9a98263636f6f9a3b2e665639 Author: David Howells Date: Fri Jan 24 23:08:04 2020 +0000 rxrpc: Fix use-after-free in rxrpc_receive_data() The subpacket scanning loop in rxrpc_receive_data() references the subpacket count in the private data part of the sk_buff in the loop termination condition. However, when the final subpacket is pasted into the ring buffer, the function is no longer has a ref on the sk_buff and should not be looking at sp->* any more. This point is actually marked in the code when skb is cleared (but sp is not - which is an error). Fix this by caching sp->nr_subpackets in a local variable and using that instead. Also clear 'sp' to catch accesses after that point. This can show up as an oops in rxrpc_get_skb() if sp->nr_subpackets gets trashed by the sk_buff getting freed and reused in the meantime. Fixes: e2de6c404898 ("rxrpc: Use info in skbuff instead of reparsing a jumbo packet") Signed-off-by: David Howells Signed-off-by: David S. Miller commit 55cd9f67f1e45de8517cdaab985fb8e56c0bc1d8 Author: Eric Dumazet Date: Fri Jan 24 14:57:20 2020 -0800 net_sched: ematch: reject invalid TCF_EM_SIMPLE It is possible for malicious userspace to set TCF_EM_SIMPLE bit even for matches that should not have this bit set. This can fool two places using tcf_em_is_simple() 1) tcf_em_tree_destroy() -> memory leak of em->data if ops->destroy() is NULL 2) tcf_em_tree_dump() wrongly report/leak 4 low-order bytes of a kernel pointer. BUG: memory leak unreferenced object 0xffff888121850a40 (size 32): comm "syz-executor927", pid 7193, jiffies 4294941655 (age 19.840s) hex dump (first 32 bytes): 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000f67036ea>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline] [<00000000f67036ea>] slab_post_alloc_hook mm/slab.h:586 [inline] [<00000000f67036ea>] slab_alloc mm/slab.c:3320 [inline] [<00000000f67036ea>] __do_kmalloc mm/slab.c:3654 [inline] [<00000000f67036ea>] __kmalloc_track_caller+0x165/0x300 mm/slab.c:3671 [<00000000fab0cc8e>] kmemdup+0x27/0x60 mm/util.c:127 [<00000000d9992e0a>] kmemdup include/linux/string.h:453 [inline] [<00000000d9992e0a>] em_nbyte_change+0x5b/0x90 net/sched/em_nbyte.c:32 [<000000007e04f711>] tcf_em_validate net/sched/ematch.c:241 [inline] [<000000007e04f711>] tcf_em_tree_validate net/sched/ematch.c:359 [inline] [<000000007e04f711>] tcf_em_tree_validate+0x332/0x46f net/sched/ematch.c:300 [<000000007a769204>] basic_set_parms net/sched/cls_basic.c:157 [inline] [<000000007a769204>] basic_change+0x1d7/0x5f0 net/sched/cls_basic.c:219 [<00000000e57a5997>] tc_new_tfilter+0x566/0xf70 net/sched/cls_api.c:2104 [<0000000074b68559>] rtnetlink_rcv_msg+0x3b2/0x4b0 net/core/rtnetlink.c:5415 [<00000000b7fe53fb>] netlink_rcv_skb+0x61/0x170 net/netlink/af_netlink.c:2477 [<00000000e83a40d0>] rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5442 [<00000000d62ba933>] netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] [<00000000d62ba933>] netlink_unicast+0x223/0x310 net/netlink/af_netlink.c:1328 [<0000000088070f72>] netlink_sendmsg+0x2c0/0x570 net/netlink/af_netlink.c:1917 [<00000000f70b15ea>] sock_sendmsg_nosec net/socket.c:639 [inline] [<00000000f70b15ea>] sock_sendmsg+0x54/0x70 net/socket.c:659 [<00000000ef95a9be>] ____sys_sendmsg+0x2d0/0x300 net/socket.c:2330 [<00000000b650f1ab>] ___sys_sendmsg+0x8a/0xd0 net/socket.c:2384 [<0000000055bfa74a>] __sys_sendmsg+0x80/0xf0 net/socket.c:2417 [<000000002abac183>] __do_sys_sendmsg net/socket.c:2426 [inline] [<000000002abac183>] __se_sys_sendmsg net/socket.c:2424 [inline] [<000000002abac183>] __x64_sys_sendmsg+0x23/0x30 net/socket.c:2424 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reported-by: syzbot+03c4738ed29d5d366ddf@syzkaller.appspotmail.com Cc: Cong Wang Acked-by: Cong Wang Signed-off-by: David S. Miller commit 90435a7891a2259b0f74c5a1bc5600d0d64cba8f Author: Vasily Averin Date: Sat Jan 25 12:10:02 2020 +0300 bpf: map_seq_next should always increase position index If seq_file .next fuction does not change position index, read after some lseek can generate an unexpected output. See also: https://bugzilla.kernel.org/show_bug.cgi?id=206283 v1 -> v2: removed missed increment in end of function Signed-off-by: Vasily Averin Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/eca84fdd-c374-a154-d874-6c7b55fc3bc4@virtuozzo.com commit f9e95555757915fc194288862d2978e370fe316b Author: Stephen Worley Date: Fri Jan 24 16:53:27 2020 -0500 net: include struct nhmsg size in nh nlmsg size Include the size of struct nhmsg size when calculating how much of a payload to allocate in a new netlink nexthop notification message. Without this, we will fail to fill the skbuff at certain nexthop group sizes. You can reproduce the failure with the following iproute2 commands: ip link add dummy1 type dummy ip link add dummy2 type dummy ip link add dummy3 type dummy ip link add dummy4 type dummy ip link add dummy5 type dummy ip link add dummy6 type dummy ip link add dummy7 type dummy ip link add dummy8 type dummy ip link add dummy9 type dummy ip link add dummy10 type dummy ip link add dummy11 type dummy ip link add dummy12 type dummy ip link add dummy13 type dummy ip link add dummy14 type dummy ip link add dummy15 type dummy ip link add dummy16 type dummy ip link add dummy17 type dummy ip link add dummy18 type dummy ip link add dummy19 type dummy ip ro add 1.1.1.1/32 dev dummy1 ip ro add 1.1.1.2/32 dev dummy2 ip ro add 1.1.1.3/32 dev dummy3 ip ro add 1.1.1.4/32 dev dummy4 ip ro add 1.1.1.5/32 dev dummy5 ip ro add 1.1.1.6/32 dev dummy6 ip ro add 1.1.1.7/32 dev dummy7 ip ro add 1.1.1.8/32 dev dummy8 ip ro add 1.1.1.9/32 dev dummy9 ip ro add 1.1.1.10/32 dev dummy10 ip ro add 1.1.1.11/32 dev dummy11 ip ro add 1.1.1.12/32 dev dummy12 ip ro add 1.1.1.13/32 dev dummy13 ip ro add 1.1.1.14/32 dev dummy14 ip ro add 1.1.1.15/32 dev dummy15 ip ro add 1.1.1.16/32 dev dummy16 ip ro add 1.1.1.17/32 dev dummy17 ip ro add 1.1.1.18/32 dev dummy18 ip ro add 1.1.1.19/32 dev dummy19 ip next add id 1 via 1.1.1.1 dev dummy1 ip next add id 2 via 1.1.1.2 dev dummy2 ip next add id 3 via 1.1.1.3 dev dummy3 ip next add id 4 via 1.1.1.4 dev dummy4 ip next add id 5 via 1.1.1.5 dev dummy5 ip next add id 6 via 1.1.1.6 dev dummy6 ip next add id 7 via 1.1.1.7 dev dummy7 ip next add id 8 via 1.1.1.8 dev dummy8 ip next add id 9 via 1.1.1.9 dev dummy9 ip next add id 10 via 1.1.1.10 dev dummy10 ip next add id 11 via 1.1.1.11 dev dummy11 ip next add id 12 via 1.1.1.12 dev dummy12 ip next add id 13 via 1.1.1.13 dev dummy13 ip next add id 14 via 1.1.1.14 dev dummy14 ip next add id 15 via 1.1.1.15 dev dummy15 ip next add id 16 via 1.1.1.16 dev dummy16 ip next add id 17 via 1.1.1.17 dev dummy17 ip next add id 18 via 1.1.1.18 dev dummy18 ip next add id 19 via 1.1.1.19 dev dummy19 ip next add id 1111 group 1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19 ip next del id 1111 Fixes: 430a049190de ("nexthop: Add support for nexthop groups") Signed-off-by: Stephen Worley Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 07fdbee134b3530ef30c709aa4251ca04ea9e3f8 Author: Andrey Ignatov Date: Fri Jan 24 14:41:42 2020 -0800 tools/bpf: Allow overriding llvm tools for runqslower tools/testing/selftests/bpf/Makefile supports overriding clang, llc and other tools so that custom ones can be used instead of those from PATH. It's convinient and heavily used by some users. Apply same rules to runqslower/Makefile. Signed-off-by: Andrey Ignatov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200124224142.1833678-1-rdna@fb.com commit 760d228e322e99cdf6d81b4b60a268b8f13cf67a Author: Cong Wang Date: Thu Jan 23 17:27:08 2020 -0800 net_sched: walk through all child classes in tc_bind_tclass() In a complex TC class hierarchy like this: tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 100Mbit \ avpkt 1000 cell 8 tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 100Mbit \ rate 6Mbit weight 0.6Mbit prio 8 allot 1514 cell 8 maxburst 20 \ avpkt 1000 bounded tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip \ sport 80 0xffff flowid 1:3 tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip \ sport 25 0xffff flowid 1:4 tc class add dev eth0 parent 1:1 classid 1:3 cbq bandwidth 100Mbit \ rate 5Mbit weight 0.5Mbit prio 5 allot 1514 cell 8 maxburst 20 \ avpkt 1000 tc class add dev eth0 parent 1:1 classid 1:4 cbq bandwidth 100Mbit \ rate 3Mbit weight 0.3Mbit prio 5 allot 1514 cell 8 maxburst 20 \ avpkt 1000 where filters are installed on qdisc 1:0, so we can't merely search from class 1:1 when creating class 1:3 and class 1:4. We have to walk through all the child classes of the direct parent qdisc. Otherwise we would miss filters those need reverse binding. Fixes: 07d79fc7d94e ("net_sched: add reverse binding for tc class") Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 2e24cd755552350b94a7617617c6877b8cbcb701 Author: Cong Wang Date: Thu Jan 23 16:26:18 2020 -0800 net_sched: fix ops->bind_class() implementations The current implementations of ops->bind_class() are merely searching for classid and updating class in the struct tcf_result, without invoking either of cl_ops->bind_tcf() or cl_ops->unbind_tcf(). This breaks the design of them as qdisc's like cbq use them to count filters too. This is why syzbot triggered the warning in cbq_destroy_class(). In order to fix this, we have to call cl_ops->bind_tcf() and cl_ops->unbind_tcf() like the filter binding path. This patch does so by refactoring out two helper functions __tcf_bind_filter() and __tcf_unbind_filter(), which are lockless and accept a Qdisc pointer, then teaching each implementation to call them correctly. Note, we merely pass the Qdisc pointer as an opaque pointer to each filter, they only need to pass it down to the helper functions without understanding it at all. Fixes: 07d79fc7d94e ("net_sched: add reverse binding for tc class") Reported-and-tested-by: syzbot+0a0596220218fcb603a8@syzkaller.appspotmail.com Reported-and-tested-by: syzbot+63bdb6006961d8c917c6@syzkaller.appspotmail.com Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit cf913e9683273f2640501094fa63a67e29f437b3 Author: Jernej Skrabec Date: Sun Jan 26 07:59:37 2020 +0100 Revert "drm/sun4i: drv: Allow framebuffer modifiers in mode config" This reverts commit 9db9c0cf5895e4ddde2814360cae7bea9282edd2. Setting mode_config.allow_fb_modifiers manually is completely unnecessary. It is set automatically by drm_universal_plane_init() based on the fact if modifier list is provided or not. Even more, it breaks DE2 and DE3 as they don't support any modifiers beside linear. Modifiers aware applications can be confused by provided empty modifier list - at least linear modifier should be included, but it's not for DE2 and DE3. Fixes: 9db9c0cf5895 ("drm/sun4i: drv: Allow framebuffer modifiers in mode config") Signed-off-by: Jernej Skrabec Reviewed-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200126065937.9564-1-jernej.skrabec@siol.net commit c267930f3f10afc225e6c18f34be2fd4fd928194 Merge: e42617b825f8 03758d60265c Author: Rafael J. Wysocki Date: Mon Jan 27 10:38:51 2020 +0100 Merge branch 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull operating performance points (OPP) framework updates for v5.6 from Viresh Kumar: "This contains a single patchset to fix reference counting of OPP table structures." * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: Replace list_kref with a local counter opp: Free static OPPs on errors while adding them commit 1e4f63aecb53e48468661e922fc2fa3b83e55722 Author: Rafael J. Wysocki Date: Sun Jan 26 23:40:11 2020 +0100 cpufreq: Avoid creating excessively large stack frames In the process of modifying a cpufreq policy, the cpufreq core makes a copy of it including all of the internals which is stored on the CPU stack. Because struct cpufreq_policy is relatively large, this may cause the size of the stack frame to exceed the 2 KB limit and so the GCC complains when -Wframe-larger-than= is used. In fact, it is not necessary to copy the entire policy structure in order to modify it, however. First, because cpufreq_set_policy() obtains the min and max policy limits from frequency QoS now, it is not necessary to pass the limits to it from the callers. The only things that need to be passed to it from there are the new governor pointer or (if there is a built-in governor in the driver) the "policy" value representing the governor choice. They both can be passed as individual arguments, though, so make cpufreq_set_policy() take them this way and rework its callers accordingly. This avoids making copies of cpufreq policies in the callers of cpufreq_set_policy(). Second, cpufreq_set_policy() still needs to pass the new policy data to the ->verify() callback of the cpufreq driver whose task is to sanitize the min and max policy limits. It still does not need to make a full copy of struct cpufreq_policy for this purpose, but it needs to pass a few items from it to the driver in case they are needed (different drivers have different needs in that respect and all of them have to be covered). For this reason, introduce struct cpufreq_policy_data to hold copies of the members of struct cpufreq_policy used by the existing ->verify() driver callbacks and pass a pointer to a temporary structure of that type to ->verify() (instead of passing a pointer to full struct cpufreq_policy to it). While at it, notice that intel_pstate and longrun don't really need to verify the "policy" value in struct cpufreq_policy, so drop those check from them to avoid copying "policy" into struct cpufreq_policy_data (which allows it to be slightly smaller). Also while at it fix up white space in a couple of places and make cpufreq_set_policy() static (as it can be so). Fixes: 3000ce3c52f8 ("cpufreq: Use per-policy frequency QoS") Link: https://lore.kernel.org/linux-pm/CAMuHMdX6-jb1W8uC2_237m8ctCpsnGp=JCxqt8pCWVqNXHmkVg@mail.gmail.com Reported-by: kbuild test robot Reported-by: Geert Uytterhoeven Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar commit 0a9db0a0e32c450a937206cec56d7bd5bb8c8907 Merge: 1250c1a568ca a48ac1c9f294 Author: Rafael J. Wysocki Date: Mon Jan 27 10:31:11 2020 +0100 Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull cpufreq material for v5.6 from Viresh Kumar: "This contains: - Update to imx cpufreq driver to add support for i.MX8MP platform. - Blacklists few NVIDIA SoCs from cpufreq-dt-platdev layer. - Convertion of few platform drivers to use devm_platform_ioremap_resource(). - Fixed refcount imbalance in few drivers." * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: brcmstb-avs: fix imbalance of cpufreq policy refcount cpufreq: s3c: fix unbalances of cpufreq policy refcount cpufreq: imx-cpufreq-dt: Add i.MX8MP support cpufreq: Use imx-cpufreq-dt for i.MX8MP's speed grading cpufreq: tegra186: convert to devm_platform_ioremap_resource cpufreq: kirkwood: convert to devm_platform_ioremap_resource commit ca07ee4e3de468582e9a370ccfad3e4cf83b5268 Author: Krzysztof Kozlowski Date: Sat Jan 4 16:20:53 2020 +0100 thermal: exynos: Rename Samsung and Exynos to lowercase Fix up inconsistent usage of upper and lowercase letters in "Samsung" and "Exynos" names. "SAMSUNG" and "EXYNOS" are not abbreviations but regular trademarked names. Therefore they should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Although advertisement materials usually use uppercase "SAMSUNG", the lowercase version is used in all legal aspects (e.g. on Wikipedia and in privacy/legal statements on https://www.samsung.com/semiconductor/privacy-global/). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200104152107.11407-7-krzk@kernel.org commit 07d243a6249712c4a32caf18057a4008d3610d48 Author: Martin Blumenstingl Date: Wed Jan 8 00:20:44 2020 +0100 thermal: generic-adc: silence info message for IIO_TEMP channels Since commit d36e2fa0253875 ("thermal: generic-adc: make lookup table optional") "generic-adc-thermal" can be used with an IIO_TEMP channel. In this case the following message is logged at probe time: no lookup table, assuming DAC channel returns milliCelcius Silence this info message if the channel type is known to be in milli celsius. Keep this message when the channel type is unknown or not of type temperature. Signed-off-by: Martin Blumenstingl Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200107232044.889075-3-martin.blumenstingl@googlemail.com commit c1fde6e19f23f78146a4aeb4a70bbf273224bb0c Author: Martin Blumenstingl Date: Wed Jan 8 00:20:43 2020 +0100 thermal: generic-adc: silence "no lookup table" on deferred probe A "generic-adc-thermal" without "temperature-lookup-table" is perfectly valid since commit d36e2fa0253875 ("thermal: generic-adc: make lookup table optional"). On deferred probe the message "no lookup table, assuming DAC channel returns milliCelcius" is still logged. Prevent this message on deferred probe of the IIO channel by first looking up the IIO channel. Signed-off-by: Martin Blumenstingl Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200107232044.889075-2-martin.blumenstingl@googlemail.com commit 0b28594d67a80894aa97f466fbe547d74d3f740c Author: Yangtao Li Date: Thu Dec 19 09:28:18 2019 -0800 dt-bindings: thermal: Add YAML schema for sun8i-thermal driver bindings sun8i-thermal driver supports thermal sensor in wide range of Allwinner SoCs. Add YAML schema for its bindings. Signed-off-by: Yangtao Li Signed-off-by: Vasily Khoruzhick Acked-by: Maxime Ripard Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191219172823.1652600-3-anarsoul@gmail.com commit dccc5c3b6f30f27ed0f1bea82221e18face20bef Author: Yangtao Li Date: Thu Dec 19 09:28:17 2019 -0800 thermal/drivers/sun8i: Add thermal driver for H6/H5/H3/A64/A83T/R40 This patch adds the support for allwinner thermal sensor, within allwinner SoC. It will register sensors for thermal framework and use device tree to bind cooling device. Signed-off-by: Yangtao Li Signed-off-by: Ondrej Jirman Signed-off-by: Vasily Khoruzhick Acked-by: Maxime Ripard Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191219172823.1652600-2-anarsoul@gmail.com commit 93802b031b3664a72c54d731f5e68f4f5a4c56a0 Author: Daniel Lezcano Date: Thu Dec 19 23:21:53 2019 +0100 thermal/drivers/of-thermal: Move the of_thermal_free_zone() to the init section The function of_thermal_free_zone() is only used the initialization function which all belonging to the init section. Move it also to the __init section. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191219222154.16100-2-daniel.lezcano@linaro.org commit 8c24b85d2dd479558dc7a53be3f598007ec1a489 Author: Daniel Lezcano Date: Thu Dec 19 23:21:52 2019 +0100 thermal/drivers/of-thermal: Make of_thermal_destroy_zones static The function of_thermal_destroy_zones() is only used internally by the of_parse_thermal_zones() for rollbacking in case of error. Make it static and tag it as an __init function. Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191219222154.16100-1-daniel.lezcano@linaro.org commit 23affa2e29c5faa8cb59778f71e3bce2c8b3aa5c Author: Daniel Lezcano Date: Thu Dec 19 23:53:17 2019 +0100 thermal/drivers/cpu_cooling: Rename to cpufreq_cooling As we introduced the idle injection cooling device called cpuidle_cooling, let's be consistent and rename the cpu_cooling to cpufreq_cooling as this one mitigates with OPPs changes. Signed-off-by: Daniel Lezcano Acked-by: Viresh Kumar Reviewed-by: Amit Kucheria Link: https://lore.kernel.org/r/20191219225317.17158-3-daniel.lezcano@linaro.org commit a4c428e523490bf53e9c4ba2d809130c58c06ac7 Author: Daniel Lezcano Date: Thu Dec 19 23:53:16 2019 +0100 thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver The cpu idle cooling device offers a new method to cool down a CPU by injecting idle cycles at runtime. It has some similarities with the intel power clamp driver but it is actually designed to be more generic and relying on the idle injection powercap framework. The idle injection duration is fixed while the running duration is variable. That allows to have control on the device reactivity for the user experience. An idle state powering down the CPU or the cluster will allow to drop the static leakage, thus restoring the heat capacity of the SoC. It can be set with a trip point between the hot and the critical points, giving the opportunity to prevent a hard reset of the system when the cpufreq cooling fails to cool down the CPU. With more sophisticated boards having a per core sensor, the idle cooling device allows to cool down a single core without throttling the compute capacity of several cpus belonging to the same clock line, so it could be used in collaboration with the cpufreq cooling device. Signed-off-by: Daniel Lezcano Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20191219225317.17158-2-daniel.lezcano@linaro.org commit 0a1990a2d1f2217db20b30f915f48d9b8b976949 Author: Daniel Lezcano Date: Thu Dec 19 23:53:15 2019 +0100 thermal/drivers/cpu_cooling: Add idle cooling device documentation Provide some documentation for the idle injection cooling effect in order to let people to understand the rational of the approach for the idle injection CPU cooling device. Signed-off-by: Daniel Lezcano Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20191219225317.17158-1-daniel.lezcano@linaro.org commit d27970b82a0f552f70e76fab154855b3192aac23 Author: Stefan Schaeckeler Date: Wed Dec 11 22:17:02 2019 -0800 thermal: rockchip: Enable hwmon By default, of-based thermal drivers do not enable hwmon. Explicitly enable hwmon for both, the soc and gpu temperature sensor. Signed-off-by: Stefan Schaeckeler Tested-by: Daniel Lezcano Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191212061702.BFE2D6E85603@corona.crabdance.com commit ff6628951c214ff9f88dd0b3e292b2b54ca28276 Author: Zak Hays Date: Mon Dec 9 18:57:23 2019 +0000 thermal: armada: Clear reset in armadaxp_init The reset bit needs to be cleared in the init sequence otherwise it holds the block in reset. Signed-off-by: Zachary Hays Reviewed-by: Miquel Raynal Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/BN8PR10MB33797EECAC557B5018A0A6628C580@BN8PR10MB3379.namprd10.prod.outlook.com commit 4abb629bea046758b712f4e26b83d7478d3400b2 Author: Zak Hays Date: Mon Dec 9 18:55:51 2019 +0000 thermal: armada: Fix register offsets for AXP As shown in its device tree, Armada XP has the control1 register at 0x184d0, not 0x182d0. Signed-off-by: Zachary Hays Reviewed-by: Miquel Raynal Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/BN8PR10MB337990B7688320D736760BB68C580@BN8PR10MB3379.namprd10.prod.outlook.com commit 2b586feab44f41db605924db15c5b039535b1f9b Author: Daniel Lezcano Date: Wed Dec 4 16:39:27 2019 +0100 thermal/drivers/Kconfig: Convert the CPU cooling device to a choice The next changes will add a new way to cool down a CPU by injecting idle cycles. With the current configuration, a CPU cooling device is the cpufreq cooling device. As we want to add a new CPU cooling device, let's convert the CPU cooling to a choice giving a list of CPU cooling devices. At this point, there is obviously only one CPU cooling device. There is no functional changes. Signed-off-by: Daniel Lezcano Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20191204153930.9128-1-daniel.lezcano@linaro.org commit fd8433099c5b78c2a1915e1b9911ecfdfc041103 Author: Andrey Smirnov Date: Tue Dec 10 08:41:53 2019 -0800 thermal: qoriq: Add hwmon support Expose thermal readings as a HWMON device, so that it could be accessed using lm-sensors. Signed-off-by: Andrey Smirnov Reviewed-by: Daniel Lezcano Tested-by: Lucas Stach Cc: Chris Healy Cc: Lucas Stach Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Angus Ainslie (Purism) Cc: linux-imx@nxp.com Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191210164153.10463-13-andrew.smirnov@gmail.com commit c7fc403e40b0ea18976a59e968c23439a80809e8 Author: Andrey Smirnov Date: Tue Dec 10 08:41:52 2019 -0800 thermal_hwmon: Add devres wrapper for thermal_add_hwmon_sysfs() Add devres wrapper for thermal_add_hwmon_sysfs() to simplify driver code. Signed-off-by: Andrey Smirnov Reviewed-by: Daniel Lezcano Tested-by: Lucas Stach Cc: Chris Healy Cc: Lucas Stach Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Angus Ainslie (Purism) Cc: linux-imx@nxp.com Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191210164153.10463-12-andrew.smirnov@gmail.com commit 36564d7e53f9efd14ab5692cd9475a75e8000c98 Author: Andrey Smirnov Date: Tue Dec 10 08:41:51 2019 -0800 thermal: qoriq: Do not report invalid temperature reading Before returning measured temperature data to upper layer we need to make sure that the reading was marked as "valid" to avoid reporting bogus data. Signed-off-by: Andrey Smirnov Reviewed-by: Daniel Lezcano Tested-by: Lucas Stach Cc: Chris Healy Cc: Lucas Stach Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Angus Ainslie (Purism) Cc: linux-imx@nxp.com Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191210164153.10463-11-andrew.smirnov@gmail.com commit 45038e03d633b0d49e4211e6dc2b5774ca1672f4 Author: Andrey Smirnov Date: Tue Dec 10 08:41:50 2019 -0800 thermal: qoriq: Enable all sensors before registering them Tmu_get_temp will get called as a part of sensor registration via devm_thermal_zone_of_sensor_register(). To prevent it from retruning bogus data we need to enable sensor monitoring before that. Looking at the datasheet (i.MX8MQ RM) there doesn't seem to be any harm in enabling them all, so, for the sake of simplicity, change the code to do just that. Signed-off-by: Andrey Smirnov Tested-by: Lucas Stach Cc: Chris Healy Cc: Lucas Stach Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Angus Ainslie (Purism) Cc: linux-imx@nxp.com Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191210164153.10463-10-andrew.smirnov@gmail.com commit 4316237bd62728a33e7c069ffb3350399ecdab37 Author: Andrey Smirnov Date: Tue Dec 10 08:41:49 2019 -0800 thermal: qoriq: Convert driver to use regmap API Convert driver to use regmap API, drop custom LE/BE IO helpers and simplify bit manipulation using regmap_update_bits(). This also allows us to convert some register initialization to use loops and adds convenient debug access to TMU registers via debugfs. Signed-off-by: Andrey Smirnov Reviewed-by: Daniel Lezcano Tested-by: Lucas Stach Cc: Chris Healy Cc: Lucas Stach Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Angus Ainslie (Purism) Cc: linux-imx@nxp.com Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191210164153.10463-9-andrew.smirnov@gmail.com commit 01dc58420a2a506848d26cb80f062e6ae84db458 Author: Andrey Smirnov Date: Tue Dec 10 08:41:48 2019 -0800 thermal: qoriq: Drop unnecessary drvdata cleanup Driver data of underlying struct device will be set to NULL by Linux's driver infrastructure. Clearing it here is unnecessary. Signed-off-by: Andrey Smirnov Reviewed-by: Daniel Lezcano Tested-by: Lucas Stach Cc: Chris Healy Cc: Lucas Stach Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Angus Ainslie (Purism) Cc: linux-imx@nxp.com Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191210164153.10463-8-andrew.smirnov@gmail.com commit 8e1cda35c3be8ed35cafa50c2b5f719032dd7224 Author: Andrey Smirnov Date: Tue Dec 10 08:41:47 2019 -0800 thermal: qoriq: Pass data to qoriq_tmu_calibration() directly We can simplify error cleanup code if instead of passing a "struct platform_device *" to qoriq_tmu_calibration() and deriving a bunch of pointers from it, we pass those pointers directly. This way we won't be force to call platform_set_drvdata() as early in qoriq_tmu_probe() and need to have "platform_set_drvdata(pdev, NULL);" in error path. Signed-off-by: Andrey Smirnov Reviewed-by: Daniel Lezcano Tested-by: Lucas Stach Cc: Chris Healy Cc: Lucas Stach Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Angus Ainslie (Purism) Cc: linux-imx@nxp.com Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191210164153.10463-7-andrew.smirnov@gmail.com commit 03036625d35b6b9c152bb81e406aaf98a7cd3c85 Author: Andrey Smirnov Date: Tue Dec 10 08:41:46 2019 -0800 thermal: qoriq: Pass data to qoriq_tmu_register_tmu_zone() directly Pass all necessary data to qoriq_tmu_register_tmu_zone() directly instead of passing a platform device and then deriving it. This is done as a first step to simplify resource deallocation code. Signed-off-by: Andrey Smirnov Acked-by: Daniel Lezcano Tested-by: Lucas Stach Cc: Chris Healy Cc: Lucas Stach Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Angus Ainslie (Purism) Cc: linux-imx@nxp.com Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191210164153.10463-6-andrew.smirnov@gmail.com commit b319da1b00d28fb7717784a81e5d9ecac0e98bec Author: Andrey Smirnov Date: Tue Dec 10 08:41:45 2019 -0800 thermal: qoriq: Embed per-sensor data into struct qoriq_tmu_data Embed per-sensor data into struct qoriq_tmu_data so we can drop the code allocating it. This also allows us to get rid of per-sensor back reference to struct qoriq_tmu_data since now its address can be calculated using container_of(). Signed-off-by: Andrey Smirnov Cc: Chris Healy Cc: Lucas Stach Cc: Zhang Rui Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Angus Ainslie (Purism) Cc: linux-imx@nxp.com Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191210164153.10463-5-andrew.smirnov@gmail.com commit d6fb05647b10bfd440616de12ca92df6b80652cd Author: Andrey Smirnov Date: Tue Dec 10 08:41:44 2019 -0800 thermal: qoriq: Add local struct qoriq_sensor pointer Add local struct qoriq_sensor pointer in qoriq_tmu_register_tmu_zone() for brevity. Signed-off-by: Andrey Smirnov Cc: Chris Healy Cc: Lucas Stach Cc: Zhang Rui Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Angus Ainslie (Purism) Cc: linux-imx@nxp.com Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191210164153.10463-4-andrew.smirnov@gmail.com commit 11ef00f799133b141eb50cab68bca96480c72d80 Author: Andrey Smirnov Date: Tue Dec 10 08:41:43 2019 -0800 thermal: qoriq: Don't store struct thermal_zone_device reference Struct thermal_zone_device reference stored as sensor's private data isn't really used anywhere in the code. Drop it. Signed-off-by: Andrey Smirnov Acked-by: Daniel Lezcano Tested-by: Lucas Stach Cc: Chris Healy Cc: Lucas Stach Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Angus Ainslie (Purism) Cc: linux-imx@nxp.com Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191210164153.10463-3-andrew.smirnov@gmail.com commit e167dc43295fb76ff711dd55ce4e39d3656c5481 Author: Andrey Smirnov Date: Tue Dec 10 08:41:42 2019 -0800 thermal: qoriq: Add local struct device pointer Use a local "struct device *dev" for brevity. No functional change intended. Signed-off-by: Andrey Smirnov Acked-by: Daniel Lezcano Tested-by: Lucas Stach Cc: Chris Healy Cc: Lucas Stach Cc: Eduardo Valentin Cc: Daniel Lezcano Cc: Angus Ainslie (Purism) Cc: linux-imx@nxp.com Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191210164153.10463-2-andrew.smirnov@gmail.com commit 5ca73af203951c60b328c7f394825b3fa0f6b0b8 Author: Amit Kucheria Date: Wed Nov 20 21:15:20 2019 +0530 thermal: zx2967: Appease the kernel-doc deity Fix up the following warning when compiled with make W=1: linux.git/drivers/thermal/zx2967_thermal.c:57: warning: Function parameter or member 'dev' not described in 'zx2967_thermal_priv' Signed-off-by: Amit Kucheria Reviewed-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1b4f6fb91e2e713ad5135f0d40dcded65dee9d0e.1574242756.git.amit.kucheria@linaro.org commit be7b848be582ef0c39963d8bd8915b82b99469d6 Author: Amit Kucheria Date: Wed Nov 20 21:15:19 2019 +0530 thermal: amlogic: Appease the kernel-doc deity Fix up the following warning when compiled with make W=1: linux.git/drivers/thermal/amlogic_thermal.c:78: warning: Function parameter or member 'A' not described in 'amlogic_thermal_soc_calib_data' linux.git/drivers/thermal/amlogic_thermal.c:78: warning: Function parameter or member 'B' not described in 'amlogic_thermal_soc_calib_data' linux.git/drivers/thermal/amlogic_thermal.c:78: warning: Function parameter or member 'm' not described in 'amlogic_thermal_soc_calib_data' linux.git/drivers/thermal/amlogic_thermal.c:78: warning: Function parameter or member 'n' not described in 'amlogic_thermal_soc_calib_data' Signed-off-by: Amit Kucheria Reviewed-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/139c9191f1a18d528b5f94376facf40291d28244.1574242756.git.amit.kucheria@linaro.org commit 6a6d634cd8df10471775911a0d21e0deebbf7ff5 Author: Amit Kucheria Date: Wed Nov 20 21:15:18 2019 +0530 thermal: tegra: Appease the kernel-doc deity Fix up the following warning when compiled with make W=1: linux.git/drivers/thermal/tegra/soctherm.c:369: warning: Function parameter or member 'value' not described in 'ccroc_writel' linux.git/drivers/thermal/tegra/soctherm.c:369: warning: Excess function parameter 'v' description in 'ccroc_writel' linux.git/drivers/thermal/tegra/soctherm.c:447: warning: Function parameter or member 'dev' not described in 'enforce_temp_range' linux.git/drivers/thermal/tegra/soctherm.c:772: warning: Function parameter or member 'sg' not described in 'tegra_soctherm_set_hwtrips' linux.git/drivers/thermal/tegra/soctherm.c:772: warning: Function parameter or member 'tz' not described in 'tegra_soctherm_set_hwtrips' linux.git/drivers/thermal/tegra/soctherm.c:944: warning: Function parameter or member 'ts' not described in 'soctherm_oc_intr_enable' linux.git/drivers/thermal/tegra/soctherm.c:1167: warning: Function parameter or member 'data' not described in 'soctherm_oc_irq_disable' linux.git/drivers/thermal/tegra/soctherm.c:1167: warning: Excess function parameter 'irq_data' description in 'soctherm_oc_irq_disable' linux.git/drivers/thermal/tegra/soctherm.c:1224: warning: Function parameter or member 'ctrlr' not described in 'soctherm_irq_domain_xlate_twocell' linux.git/drivers/thermal/tegra/soctherm.c:1686: warning: Function parameter or member 'pdev' not described in 'soctherm_init_hw_throt_cdev' linux.git/drivers/thermal/tegra/soctherm.c:1764: warning: Function parameter or member 'ts' not described in 'throttlectl_cpu_level_cfg' linux.git/drivers/thermal/tegra/soctherm.c:1812: warning: Function parameter or member 'ts' not described in 'throttlectl_cpu_level_select' linux.git/drivers/thermal/tegra/soctherm.c:1855: warning: Function parameter or member 'ts' not described in 'throttlectl_cpu_mn' linux.git/drivers/thermal/tegra/soctherm.c:1886: warning: Function parameter or member 'ts' not described in 'throttlectl_gpu_level_select' linux.git/drivers/thermal/tegra/soctherm.c:1928: warning: Function parameter or member 'ts' not described in 'soctherm_throttle_program' Signed-off-by: Amit Kucheria Reviewed-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/db764f71253bb2ad569b0aeab4c91207a39317ce.1574242756.git.amit.kucheria@linaro.org commit 9625e9e694e7470beaa4bf61244f3568d1457081 Author: Amit Kucheria Date: Wed Nov 20 21:15:17 2019 +0530 thermal: samsung: Appease the kernel-doc deity Fix up the following warning when compiled with make W=1: linux.git/drivers/thermal/samsung/exynos_tmu.c:141: warning: bad line: driver linux.git/drivers/thermal/samsung/exynos_tmu.c:203: warning: Function parameter or member 'tzd' not described in 'exynos_tmu_data' linux.git/drivers/thermal/samsung/exynos_tmu.c:203: warning: Function parameter or member 'tmu_set_trip_temp' not described in 'exynos_tmu_data' linux.git/drivers/thermal/samsung/exynos_tmu.c:203: warning: Function parameter or member 'tmu_set_trip_hyst' not described in 'exynos_tmu_data' Signed-off-by: Amit Kucheria Reviewed-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1ded1697c6e5eff11b034b3302b9c79e88fa9c42.1574242756.git.amit.kucheria@linaro.org commit 66ec4bfcb55e5da0a7258a954f7be1495c053167 Author: Amit Kucheria Date: Wed Nov 20 21:15:16 2019 +0530 thermal: rockchip: Appease the kernel-doc deity Replace a comment starting with /** by simply /* to avoid having it interpreted as a kernel-doc comment. Describe missing function parameters where needed. Fixes up the following warnings when compiled with make W=1: linux.git/drivers/thermal/rockchip_thermal.c:27: warning: cannot understand function prototype: 'enum tshut_mode ' linux.git/drivers/thermal/rockchip_thermal.c:37: warning: cannot understand function prototype: 'enum tshut_polarity ' linux.git/drivers/thermal/rockchip_thermal.c:46: warning: cannot understand function prototype: 'enum sensor_id ' linux.git/drivers/thermal/rockchip_thermal.c:56: warning: cannot understand function prototype: 'enum adc_sort_mode ' linux.git/drivers/thermal/rockchip_thermal.c:123: warning: Function parameter or member 'chn_id' not described in 'rockchip_tsadc_chip' linux.git/drivers/thermal/rockchip_thermal.c:123: warning: Function parameter or member 'control' not described in 'rockchip_tsadc_chip' linux.git/drivers/thermal/rockchip_thermal.c:167: warning: Function parameter or member 'sensors' not described in 'rockchip_thermal_data' linux.git/drivers/thermal/rockchip_thermal.c:608: warning: Function parameter or member 'grf' not described in 'rk_tsadcv2_initialize' linux.git/drivers/thermal/rockchip_thermal.c:608: warning: Function parameter or member 'regs' not described in 'rk_tsadcv2_initialize' linux.git/drivers/thermal/rockchip_thermal.c:608: warning: Function parameter or member 'tshut_polarity' not described in 'rk_tsadcv2_initialize' linux.git/drivers/thermal/rockchip_thermal.c:644: warning: Function parameter or member 'grf' not described in 'rk_tsadcv3_initialize' linux.git/drivers/thermal/rockchip_thermal.c:644: warning: Function parameter or member 'regs' not described in 'rk_tsadcv3_initialize' linux.git/drivers/thermal/rockchip_thermal.c:644: warning: Function parameter or member 'tshut_polarity' not described in 'rk_tsadcv3_initialize' linux.git/drivers/thermal/rockchip_thermal.c:732: warning: Function parameter or member 'regs' not described in 'rk_tsadcv3_control' linux.git/drivers/thermal/rockchip_thermal.c:732: warning: Function parameter or member 'enable' not described in 'rk_tsadcv3_control' linux.git/drivers/thermal/rockchip_thermal.c:1211: warning: Function parameter or member 'reset' not described in 'rockchip_thermal_reset_controller' Signed-off-by: Amit Kucheria Reviewed-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/c3cbdb0619fec602668ba7ae703ba49d67e30b33.1574242756.git.amit.kucheria@linaro.org commit 3772bb422072d499683f6dc8a9e3a6c8791bbd86 Author: Amit Kucheria Date: Wed Nov 20 21:15:15 2019 +0530 thermal: mediatek: Appease the kernel-doc deity Replace a comment starting with /** by simply /* to avoid having it interpreted as a kernel-doc comment. Describe missing function parameters where needed. Fixes up the following warnings when compiled with make W=1: linux.git/drivers/thermal/mtk_thermal.c:374: warning: cannot understand function prototype: 'const struct mtk_thermal_data mt8173_thermal_data = ' linux.git/drivers/thermal/mtk_thermal.c:413: warning: cannot understand function prototype: 'const struct mtk_thermal_data mt2701_thermal_data = ' linux.git/drivers/thermal/mtk_thermal.c:443: warning: cannot understand function prototype: 'const struct mtk_thermal_data mt2712_thermal_data = ' linux.git/drivers/thermal/mtk_thermal.c:499: warning: cannot understand function prototype: 'const struct mtk_thermal_data mt8183_thermal_data = ' linux.git/drivers/thermal/mtk_thermal.c:529: warning: Function parameter or member 'sensno' not described in 'raw_to_mcelsius' Signed-off-by: Amit Kucheria Reviewed-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/ba10b886705879fd1b7d529fec50503d6696df20.1574242756.git.amit.kucheria@linaro.org commit 0f43e646dddd60e51e66f8cf53de0a13d8fdd06b Author: Amit Kucheria Date: Wed Nov 20 21:15:14 2019 +0530 thermal: max77620: Appease the kernel-doc deity Fix up the following warning when compiled with make W=1: linux.git/drivers/thermal/max77620_thermal.c:48: warning: Function parameter or member 'temp' not described in 'max77620_thermal_read_temp' Signed-off-by: Amit Kucheria Reviewed-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/c943d51e7913a4b73cda447547b8ee77c857f7ba.1574242756.git.amit.kucheria@linaro.org commit 1b5cb9570670a6277cc0bba70409402359f7715d Author: Amit Kucheria Date: Wed Nov 20 21:15:13 2019 +0530 thermal: devfreq_cooling: Appease the kernel-doc deity Fix up the following warnings with make W=1: linux.git/drivers/thermal/devfreq_cooling.c:68: warning: Function parameter or member 'capped_state' not described in 'devfreq_cooling_device' linux.git/drivers/thermal/devfreq_cooling.c:593: warning: Function parameter or member 'cdev' not described in 'devfreq_cooling_unregister' linux.git/drivers/thermal/devfreq_cooling.c:593: warning: Excess function parameter 'dfc' description in 'devfreq_cooling_unregister' Signed-off-by: Amit Kucheria Reviewed-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/7059d82472fe12139fc7a3379c5b9716a23cce5c.1574242756.git.amit.kucheria@linaro.org commit 53d256e7966d13d0f48556680e7fe682ee18084b Author: Amit Kucheria Date: Wed Nov 20 21:15:12 2019 +0530 thermal: step_wise: Appease the kernel-doc deity Replace - with : to appease the kernel-doc gods and fix warnings such as the following when compiled with make W=1: linux-amit.git/drivers/thermal/step_wise.c:187: warning: Function parameter or member 'tz' not described in 'step_wise_throttle' linux-amit.git/drivers/thermal/step_wise.c:187: warning: Function parameter or member 'trip' not described in 'step_wise_throttle' linux.git/drivers/thermal/fair_share.c:79: warning: Function parameter or member 'tz' not described in 'fair_share_throttle' linux.git/drivers/thermal/fair_share.c:79: warning: Function parameter or member 'trip' not described in 'fair_share_throttle' Signed-off-by: Amit Kucheria Reviewed-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/5d48ac6f85667a53902092ad5bbfef8cc89a7162.1574242756.git.amit.kucheria@linaro.org commit 7b4e7f07a2c6dab26344e9802822206ba7337bed Author: Amit Kucheria Date: Wed Nov 20 21:15:11 2019 +0530 thermal: cpu_cooling: Appease the kernel-doc deity Describe the function parameter to fix the following warning with make W=1: linux.git/drivers/thermal/cpu_cooling.c:92: warning: Function parameter or member 'qos_req' not described in 'cpufreq_cooling_device' Signed-off-by: Amit Kucheria Reviewed-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/ddb09e9728533c274edae7ff3da515b3cf7ef231.1574242756.git.amit.kucheria@linaro.org commit faae0ed7a5a2d212143d615ec27f9e46aade01a9 Author: Amit Kucheria Date: Wed Nov 20 21:15:10 2019 +0530 thermal: of-thermal: Appease the kernel-doc deity Replace a comment starting with /** by simply /* to avoid having it interpreted as a kernel-doc comment. Fixes the following warning when compile with make W=1: linux.git/drivers/thermal/of-thermal.c:761: warning: cannot understand function prototype: 'const char *trip_types[] = ' Signed-off-by: Amit Kucheria Reviewed-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/dc742789bf4b3c8207b01c7946f2b401350536a7.1574242756.git.amit.kucheria@linaro.org commit c56dcfa3d4d0f49f0c37cd24886aa86db7aa7f30 Author: Linus Walleij Date: Tue Nov 19 08:46:50 2019 +0100 thermal: db8500: Depromote debug print We are not interested in getting this debug print on our console all the time. Cc: Daniel Lezcano Cc: Stephan Gerhold Fixes: 6c375eccded4 ("thermal: db8500: Rewrite to be a pure OF sensor") Signed-off-by: Linus Walleij Reviewed-by: Stephan Gerhold Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191119074650.2664-1-linus.walleij@linaro.org commit eaa519983fd9e53c2a62a1e56777e1fb461865a9 Merge: 880082666c8d 19c64e7354e5 Author: Greg Kroah-Hartman Date: Mon Jan 27 10:21:22 2020 +0100 Merge tag 'usb-serial-5.6-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: Here are the USB-serial updates for 5.6-rc1, including: - a missing ir-usb endpoint sanity check - fixes for two long-standing regressions in ir-usb - opticon chars_in_buffer support Included are also various clean ups. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold * tag 'usb-serial-5.6-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: cyberjack: fix spelling mistake "To" -> "Too" USB: serial: ir-usb: simplify endpoint check USB: serial: ir-usb: make set_termios synchronous USB: serial: ir-usb: fix IrLAP framing USB: serial: ir-usb: fix link-speed handling USB: serial: ir-usb: add missing endpoint sanity check USB: serial: garmin_gps: Use flexible-array member USB: serial: opticon: stop all I/O on close() USB: serial: opticon: add chars_in_buffer() implementation commit 16b25d1a968e683eeef7523a4bbc4c8fd63aeedc Merge: 32efcc06d2a1 611973c1e06f Author: David S. Miller Date: Mon Jan 27 10:17:15 2020 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next This batch contains Netfilter updates for net-next: 1) Add nft_setelem_parse_key() helper function. 2) Add NFTA_SET_ELEM_KEY_END to specify a range with one single element. 3) Add NFTA_SET_DESC_CONCAT to describe the set element concatenation, from Stefano Brivio. 4) Add bitmap_cut() to copy n-bits from source to destination, from Stefano Brivio. 5) Add set to match on arbitrary concatenations, from Stefano Brivio. 6) Add selftest for this new set type. An extract of Stefano's description follows: "Existing nftables set implementations allow matching entries with interval expressions (rbtree), e.g. 192.0.2.1-192.0.2.4, entries specifying field concatenation (hash, rhash), e.g. 192.0.2.1:22, but not both. In other words, none of the set types allows matching on range expressions for more than one packet field at a time, such as ipset does with types bitmap:ip,mac, and, to a more limited extent (netmasks, not arbitrary ranges), with types hash:net,net, hash:net,port, hash:ip,port,net, and hash:net,port,net. As a pure hash-based approach is unsuitable for matching on ranges, and "proxying" the existing red-black tree type looks impractical as elements would need to be shared and managed across all employed trees, this new set implementation intends to fill the functionality gap by employing a relatively novel approach. The fundamental idea, illustrated in deeper detail in patch 5/9, is to use lookup tables classifying a small number of grouped bits from each field, and map the lookup results in a way that yields a verdict for the full set of specified fields. The grouping bit aspect is loosely inspired by the Grouper algorithm, by Jay Ligatti, Josh Kuhn, and Chris Gage (see patch 5/9 for the full reference). A reference, stand-alone implementation of the algorithm itself is available at: https://pipapo.lameexcu.se Some notes about possible future optimisations are also mentioned there. This algorithm reduces the matching problem to, essentially, a repetitive sequence of simple bitwise operations, and is particularly suitable to be optimised by leveraging SIMD instruction sets." ==================== Signed-off-by: David S. Miller commit 8121fbc4ebbbb2ad29f4393ebfaaa588905dc693 Author: Mike Rapoport Date: Sun Jan 12 13:36:15 2020 +0200 parisc: map_pages(): cleanup page table initialization The current code uses '#if PTRS_PER_PMD == 1' to distinguish 2 vs 3 levels, setup, it casts pgd to pgd to cope with page table folding and converts addresses of page table entries from physical to virtual and back for no good reason. Simplify the accesses to the page table entries using proper unfolding of the upper layers and replacing '#if PTRS_PER_PMD' with explicit '#if CONFIG_PGTABLE_LEVELS == 3' Signed-off-by: Mike Rapoport Signed-off-by: Helge Deller commit 611973c1e06faef31d034deeb3ae7b7960b1f043 Author: Stefano Brivio Date: Wed Jan 22 00:17:56 2020 +0100 selftests: netfilter: Introduce tests for sets with range concatenation This test covers functionality and stability of the newly added nftables set implementation supporting concatenation of ranged fields. For some selected set expression types, test: - correctness, by checking that packets match or don't - concurrency, by attempting races between insertion, deletion, lookup - timeout feature, checking that packets don't match expired entries and (roughly) estimate matching rates, comparing to baselines for simple drop on netdev ingress hook and for hash and rbtrees sets. In order to send packets, this needs one of sendip, netcat or bash. To flood with traffic, iperf3, iperf and netperf are supported. For performance measurements, this relies on the sample pktgen script pktgen_bench_xmit_mode_netif_receive.sh. If none of the tools suitable for a given test are available, specific tests will be skipped. Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 3c4287f62044a90e73a561aa05fc46e62da173da Author: Stefano Brivio Date: Wed Jan 22 00:17:55 2020 +0100 nf_tables: Add set type for arbitrary concatenation of ranges This new set type allows for intervals in concatenated fields, which are expressed in the usual way, that is, simple byte concatenation with padding to 32 bits for single fields, and given as ranges by specifying start and end elements containing, each, the full concatenation of start and end values for the single fields. Ranges are expanded to composing netmasks, for each field: these are inserted as rules in per-field lookup tables. Bits to be classified are divided in 4-bit groups, and for each group, the lookup table contains 4^2 buckets, representing all the possible values of a bit group. This approach was inspired by the Grouper algorithm: http://www.cse.usf.edu/~ligatti/projects/grouper/ Matching is performed by a sequence of AND operations between bucket values, with buckets selected according to the value of packet bits, for each group. The result of this sequence tells us which rules matched for a given field. In order to concatenate several ranged fields, per-field rules are mapped using mapping arrays, one per field, that specify which rules should be considered while matching the next field. The mapping array for the last field contains a reference to the element originally inserted. The notes in nft_set_pipapo.c cover the algorithm in deeper detail. A pure hash-based approach is of no use here, as ranges need to be classified. An implementation based on "proxying" the existing red-black tree set type, creating a tree for each field, was considered, but deemed impractical due to the fact that elements would need to be shared between trees, at least as long as we want to keep UAPI changes to a minimum. A stand-alone implementation of this algorithm is available at: https://pipapo.lameexcu.se together with notes about possible future optimisations (in pipapo.c). This algorithm was designed with data locality in mind, and can be highly optimised for SIMD instruction sets, as the bulk of the matching work is done with repetitive, simple bitwise operations. At this point, without further optimisations, nft_concat_range.sh reports, for one AMD Epyc 7351 thread (2.9GHz, 512 KiB L1D$, 8 MiB L2$): TEST: performance net,port [ OK ] baseline (drop from netdev hook): 10190076pps baseline hash (non-ranged entries): 6179564pps baseline rbtree (match on first field only): 2950341pps set with 1000 full, ranged entries: 2304165pps port,net [ OK ] baseline (drop from netdev hook): 10143615pps baseline hash (non-ranged entries): 6135776pps baseline rbtree (match on first field only): 4311934pps set with 100 full, ranged entries: 4131471pps net6,port [ OK ] baseline (drop from netdev hook): 9730404pps baseline hash (non-ranged entries): 4809557pps baseline rbtree (match on first field only): 1501699pps set with 1000 full, ranged entries: 1092557pps port,proto [ OK ] baseline (drop from netdev hook): 10812426pps baseline hash (non-ranged entries): 6929353pps baseline rbtree (match on first field only): 3027105pps set with 30000 full, ranged entries: 284147pps net6,port,mac [ OK ] baseline (drop from netdev hook): 9660114pps baseline hash (non-ranged entries): 3778877pps baseline rbtree (match on first field only): 3179379pps set with 10 full, ranged entries: 2082880pps net6,port,mac,proto [ OK ] baseline (drop from netdev hook): 9718324pps baseline hash (non-ranged entries): 3799021pps baseline rbtree (match on first field only): 1506689pps set with 1000 full, ranged entries: 783810pps net,mac [ OK ] baseline (drop from netdev hook): 10190029pps baseline hash (non-ranged entries): 5172218pps baseline rbtree (match on first field only): 2946863pps set with 1000 full, ranged entries: 1279122pps v4: - fix build for 32-bit architectures: 64-bit division needs div_u64() (kbuild test robot ) v3: - rework interface for field length specification, NFT_SET_SUBKEY disappears and information is stored in description - remove scratch area to store closing element of ranges, as elements now come with an actual attribute to specify the upper range limit (Pablo Neira Ayuso) - also remove pointer to 'start' element from mapping table, closing key is now accessible via extension data - use bytes right away instead of bits for field lengths, this way we can also double the inner loop of the lookup function to take care of upper and lower bits in a single iteration (minor performance improvement) - make it clearer that set operations are actually atomic API-wise, but we can't e.g. implement flush() as one-shot action - fix type for 'dup' in nft_pipapo_insert(), check for duplicates only in the next generation, and in general take care of differentiating generation mask cases depending on the operation (Pablo Neira Ayuso) - report C implementation matching rate in commit message, so that AVX2 implementation can be compared (Pablo Neira Ayuso) v2: - protect access to scratch maps in nft_pipapo_lookup() with local_bh_disable/enable() (Florian Westphal) - drop rcu_read_lock/unlock() from nft_pipapo_lookup(), it's already implied (Florian Westphal) - explain why partial allocation failures don't need handling in pipapo_realloc_scratch(), rename 'm' to clone and update related kerneldoc to make it clear we're not operating on the live copy (Florian Westphal) - add expicit check for priv->start_elem in nft_pipapo_insert() to avoid ending up in nft_pipapo_walk() with a NULL start element, and also zero it out in every operation that might make it invalid, so that insertion doesn't proceed with an invalid element (Florian Westphal) Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 2092767168f0681aa03727448b801600a364c013 Author: Stefano Brivio Date: Wed Jan 22 00:17:54 2020 +0100 bitmap: Introduce bitmap_cut(): cut bits and shift remaining The new bitmap function bitmap_cut() copies bits from source to destination by removing the region specified by parameters first and cut, and remapping the bits above the cut region by right shifting them. Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit f3a2181e16f1dcbf5446ed43f6b5d9f56c459f85 Author: Stefano Brivio Date: Wed Jan 22 00:17:53 2020 +0100 netfilter: nf_tables: Support for sets with multiple ranged fields Introduce a new nested netlink attribute, NFTA_SET_DESC_CONCAT, used to specify the length of each field in a set concatenation. This allows set implementations to support concatenation of multiple ranged items, as they can divide the input key into matching data for every single field. Such set implementations would be selected as they specify support for NFT_SET_INTERVAL and allow desc->field_count to be greater than one. Explicitly disallow this for nft_set_rbtree. In order to specify the interval for a set entry, userspace would include in NFTA_SET_DESC_CONCAT attributes field lengths, and pass range endpoints as two separate keys, represented by attributes NFTA_SET_ELEM_KEY and NFTA_SET_ELEM_KEY_END. While at it, export the number of 32-bit registers available for packet matching, as nftables will need this to know the maximum number of field lengths that can be specified. For example, "packets with an IPv4 address between 192.0.2.0 and 192.0.2.42, with destination port between 22 and 25", can be expressed as two concatenated elements: NFTA_SET_ELEM_KEY: 192.0.2.0 . 22 NFTA_SET_ELEM_KEY_END: 192.0.2.42 . 25 and NFTA_SET_DESC_CONCAT attribute would contain: NFTA_LIST_ELEM NFTA_SET_FIELD_LEN: 4 NFTA_LIST_ELEM NFTA_SET_FIELD_LEN: 2 v4: No changes v3: Complete rework, NFTA_SET_DESC_CONCAT instead of NFTA_SET_SUBKEY v2: No changes Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 7b225d0b5c6dda5fefab578175f210c6fc7e389a Author: Pablo Neira Ayuso Date: Wed Jan 22 00:17:52 2020 +0100 netfilter: nf_tables: add NFTA_SET_ELEM_KEY_END attribute Add NFTA_SET_ELEM_KEY_END attribute to convey the closing element of the interval between kernel and userspace. This patch also adds the NFT_SET_EXT_KEY_END extension to store the closing element value in this interval. v4: No changes v3: New patch [sbrivio: refactor error paths and labels; add corresponding nft_set_ext_type for new key; rebase] Signed-off-by: Pablo Neira Ayuso commit 20a1452c35425b2cef76f21f8395ef069dfddfa9 Author: Pablo Neira Ayuso Date: Wed Jan 22 00:17:51 2020 +0100 netfilter: nf_tables: add nft_setelem_parse_key() Add helper function to parse the set element key netlink attribute. v4: No changes v3: New patch [sbrivio: refactor error paths and labels; use NFT_DATA_VALUE_MAXLEN instead of sizeof(*key) in helper, value can be longer than that; rebase] Signed-off-by: Pablo Neira Ayuso commit 54e19d34011fea26d39aa74781131de0ce642a01 Author: Dexuan Cui Date: Sat Jan 25 21:49:44 2020 -0800 hv_utils: Add the support of hibernation Add util_pre_suspend() and util_pre_resume() for some hv_utils devices (e.g. kvp/vss/fcopy), because they need special handling before util_suspend() calls vmbus_close(). For kvp, all the possible pending work items should be cancelled. For vss and fcopy, some extra clean-up needs to be done, i.e. fake a THAW message for hv_vss_daemon and fake a CANCEL_FCOPY message for hv_fcopy_daemon, otherwise when the VM resums back, the daemons can end up in an inconsistent state (i.e. the file systems are frozen but will never be thawed; the file transmitted via fcopy may not be complete). Note: there is an extra patch for the daemons: "Tools: hv: Reopen the devices if read() or write() returns errors", because the hv_utils driver can not guarantee the whole transaction finishes completely once util_suspend() starts to run (at this time, all the userspace processes are frozen). util_probe() disables channel->callback_event to avoid the race with the channel callback. Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit ffd1d4a49336b7f0078f45332fa4b93d25720f6c Author: Dexuan Cui Date: Sat Jan 25 21:49:43 2020 -0800 hv_utils: Support host-initiated hibernation request Update the Shutdown IC version to 3.2, which is required for the host to send the hibernation request. The user is expected to create the below udev rule file, which is applied upon the host-initiated hibernation request: root@localhost:~# cat /usr/lib/udev/rules.d/40-vm-hibernation.rules SUBSYSTEM=="vmbus", ACTION=="change", DRIVER=="hv_utils", ENV{EVENT}=="hibernate", RUN+="/usr/bin/systemctl hibernate" Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit 3e9c72056ed5618bef253f602e79dd2312a0d8a5 Author: Dexuan Cui Date: Sat Jan 25 21:49:42 2020 -0800 hv_utils: Support host-initiated restart request The hv_utils driver currently supports a "shutdown" operation initiated from the Hyper-V host. Newer versions of Hyper-V also support a "restart" operation. So add support for the updated protocol version that has "restart" support, and perform a clean reboot when such a message is received from Hyper-V. To test the restart functionality, run this PowerShell command on the Hyper-V host: Restart-VM -Type Reboot Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit 9fc3c01a1fae669a2ef9f13ee1e1a26e057d79f8 Author: Dexuan Cui Date: Sat Jan 25 21:49:41 2020 -0800 Tools: hv: Reopen the devices if read() or write() returns errors The state machine in the hv_utils driver can run out of order in some corner cases, e.g. if the kvp daemon doesn't call write() fast enough due to some reason, kvp_timeout_func() can run first and move the state to HVUTIL_READY; next, when kvp_on_msg() is called it returns -EINVAL since kvp_transaction.state is smaller than HVUTIL_USERSPACE_REQ; later, the daemon's write() gets an error -EINVAL, and the daemon will exit(). We can reproduce the issue by sending a SIGSTOP signal to the daemon, wait for 1 minute, and send a SIGCONT signal to the daemon: the daemon will exit() quickly. We can fix the issue by forcing a reset of the device (which means the daemon can close() and open() the device again) and doing extra necessary clean-up. Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit 3a6fb6c4255c3893ab61e2bd4e9ae01ca6bbcd94 Author: Wei Hu Date: Mon Dec 9 15:57:49 2019 +0800 video: hyperv: hyperv_fb: Use physical memory for fb on HyperV Gen 1 VMs. On Hyper-V, Generation 1 VMs can directly use VM's physical memory for their framebuffers. This can improve the efficiency of framebuffer and overall performence for VM. The physical memory assigned to framebuffer must be contiguous. We use CMA allocator to get contiguouse physicial memory when the framebuffer size is greater than 4MB. For size under 4MB, we use alloc_pages to achieve this. To enable framebuffer memory allocation from CMA, supply a kernel parameter to give enough space to CMA allocator at boot time. For example: cma=130m This gives 130MB memory to CAM allocator that can be allocated to framebuffer. If this fails, we fall back to the old way of using mmio for framebuffer. Reported-by: kbuild test robot Signed-off-by: Wei Hu Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Sasha Levin commit f1f27ad74557e39f67a8331a808b860f89254f2d Author: Vincent Whitchurch Date: Thu Jan 23 17:09:06 2020 +0100 CIFS: Fix task struct use-after-free on reconnect The task which created the MID may be gone by the time cifsd attempts to call the callbacks on MIDs from cifs_reconnect(). This leads to a use-after-free of the task struct in cifs_wake_up_task: ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x31a0/0x3270 Read of size 8 at addr ffff8880103e3a68 by task cifsd/630 CPU: 0 PID: 630 Comm: cifsd Not tainted 5.5.0-rc6+ #119 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 Call Trace: dump_stack+0x8e/0xcb print_address_description.constprop.5+0x1d3/0x3c0 ? __lock_acquire+0x31a0/0x3270 __kasan_report+0x152/0x1aa ? __lock_acquire+0x31a0/0x3270 ? __lock_acquire+0x31a0/0x3270 kasan_report+0xe/0x20 __lock_acquire+0x31a0/0x3270 ? __wake_up_common+0x1dc/0x630 ? _raw_spin_unlock_irqrestore+0x4c/0x60 ? mark_held_locks+0xf0/0xf0 ? _raw_spin_unlock_irqrestore+0x39/0x60 ? __wake_up_common_lock+0xd5/0x130 ? __wake_up_common+0x630/0x630 lock_acquire+0x13f/0x330 ? try_to_wake_up+0xa3/0x19e0 _raw_spin_lock_irqsave+0x38/0x50 ? try_to_wake_up+0xa3/0x19e0 try_to_wake_up+0xa3/0x19e0 ? cifs_compound_callback+0x178/0x210 ? set_cpus_allowed_ptr+0x10/0x10 cifs_reconnect+0xa1c/0x15d0 ? generic_ip_connect+0x1860/0x1860 ? rwlock_bug.part.0+0x90/0x90 cifs_readv_from_socket+0x479/0x690 cifs_read_from_socket+0x9d/0xe0 ? cifs_readv_from_socket+0x690/0x690 ? mempool_resize+0x690/0x690 ? rwlock_bug.part.0+0x90/0x90 ? memset+0x1f/0x40 ? allocate_buffers+0xff/0x340 cifs_demultiplex_thread+0x388/0x2a50 ? cifs_handle_standard+0x610/0x610 ? rcu_read_lock_held_common+0x120/0x120 ? mark_lock+0x11b/0xc00 ? __lock_acquire+0x14ed/0x3270 ? __kthread_parkme+0x78/0x100 ? lockdep_hardirqs_on+0x3e8/0x560 ? lock_downgrade+0x6a0/0x6a0 ? lockdep_hardirqs_on+0x3e8/0x560 ? _raw_spin_unlock_irqrestore+0x39/0x60 ? cifs_handle_standard+0x610/0x610 kthread+0x2bb/0x3a0 ? kthread_create_worker_on_cpu+0xc0/0xc0 ret_from_fork+0x3a/0x50 Allocated by task 649: save_stack+0x19/0x70 __kasan_kmalloc.constprop.5+0xa6/0xf0 kmem_cache_alloc+0x107/0x320 copy_process+0x17bc/0x5370 _do_fork+0x103/0xbf0 __x64_sys_clone+0x168/0x1e0 do_syscall_64+0x9b/0xec0 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: save_stack+0x19/0x70 __kasan_slab_free+0x11d/0x160 kmem_cache_free+0xb5/0x3d0 rcu_core+0x52f/0x1230 __do_softirq+0x24d/0x962 The buggy address belongs to the object at ffff8880103e32c0 which belongs to the cache task_struct of size 6016 The buggy address is located 1960 bytes inside of 6016-byte region [ffff8880103e32c0, ffff8880103e4a40) The buggy address belongs to the page: page:ffffea000040f800 refcount:1 mapcount:0 mapping:ffff8880108da5c0 index:0xffff8880103e4c00 compound_mapcount: 0 raw: 4000000000010200 ffffea00001f2208 ffffea00001e3408 ffff8880108da5c0 raw: ffff8880103e4c00 0000000000050003 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880103e3900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880103e3980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880103e3a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880103e3a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880103e3b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== This can be reliably reproduced by adding the below delay to cifs_reconnect(), running find(1) on the mount, restarting the samba server while find is running, and killing find during the delay: spin_unlock(&GlobalMid_Lock); mutex_unlock(&server->srv_mutex); + msleep(10000); + cifs_dbg(FYI, "%s: issuing mid callbacks\n", __func__); list_for_each_safe(tmp, tmp2, &retry_list) { mid_entry = list_entry(tmp, struct mid_q_entry, qhead); Fix this by holding a reference to the task struct until the MID is freed. Signed-off-by: Vincent Whitchurch Signed-off-by: Steve French CC: Stable Reviewed-by: Paulo Alcantara (SUSE) Reviewed-by: Pavel Shilovsky commit 050d2a8b6992fd012773e75de9f82d45e3b3dfff Author: Chen Zhou Date: Wed Jan 22 18:20:30 2020 +0800 cifs: use PTR_ERR_OR_ZERO() to simplify code PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR, just use PTR_ERR_OR_ZERO directly. Signed-off-by: Chen Zhou Signed-off-by: Steve French Reviewed-by: Paulo Alcantara (SUSE) commit 8bd0d701445ef263a52968ced2854c3d35712695 Author: Ronnie Sahlberg Date: Fri Jan 17 11:45:02 2020 +1000 cifs: add support for fallocate mode 0 for non-sparse files RHBZ 1336264 When we extend a file we must also force the size to be updated. This fixes an issue with holetest in xfs-tests which performs the following sequence : 1, create a new file 2, use fallocate mode==0 to populate the file 3, mmap the file 4, touch each page by reading the mmapped region. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit fe1292686333d1dadaf84091f585ee903b9ddb84 Author: Ronnie Sahlberg Date: Wed Jan 22 11:07:56 2020 +1000 cifs: fix NULL dereference in match_prepath RHBZ: 1760879 Fix an oops in match_prepath() by making sure that the prepath string is not NULL before we pass it into strcmp(). This is similar to other checks we make for example in cifs_root_iget() Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 643fbceef48e5b22bf8e0905f903e908b5d2ba69 Author: Steve French Date: Thu Jan 16 19:55:33 2020 -0600 smb3: fix default permissions on new files when mounting with modefromsid When mounting with "modefromsid" mount parm most servers will require that some default permissions are given to users in the ACL on newly created files, files created with the new 'sd context' - when passing in an sd context on create, permissions are not inherited from the parent directory, so in addition to the ACE with the special SID which contains the mode, we also must pass in an ACE allowing users to access the file (GENERIC_ALL for authenticated users seemed like a reasonable default, although later we could allow a mount option or config switch to make it GENERIC_ALL for EVERYONE special sid). CC: Stable Signed-off-by: Steve French Reviewed-By: Ronnie Sahlberg Reviewed-by: Pavel Shilovsky commit 438471b67963b8267e94beab383b6d6fc41b3481 Author: Boris Protopopov Date: Thu Dec 19 16:52:50 2019 +0000 CIFS: Add support for setting owner info, dos attributes, and create time This is needed for backup/restore scenarios among others. Add extended attribute "system.cifs_ntsd" (and alias "system.smb3_ntsd") to allow for setting owner and DACL in the security descriptor. This is in addition to the existing "system.cifs_acl" and "system.smb3_acl" attributes that allow for setting DACL only. Add support for setting creation time and dos attributes using set_file_info() calls to complement the existing support for getting these attributes via query_path_info() calls. Signed-off-by: Boris Protopopov Signed-off-by: Steve French commit c4985c3d9902dcd66f0b61d048560ef2cc415542 Author: YueHaibing Date: Fri Jan 17 10:57:17 2020 +0800 cifs: remove set but not used variable 'server' fs/cifs/smb2pdu.c: In function 'SMB2_query_directory': fs/cifs/smb2pdu.c:4444:26: warning: variable 'server' set but not used [-Wunused-but-set-variable] struct TCP_Server_Info *server; It is not used, so remove it. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Steve French commit 0a5a98863c9debc02387b3d23c46d187756f5e2b Author: Paulo Alcantara (SUSE) Date: Mon Jan 13 17:46:59 2020 -0300 cifs: Fix memory allocation in __smb2_handle_cancelled_cmd() __smb2_handle_cancelled_cmd() is called under a spin lock held in cifs_mid_q_entry_release(), so make its memory allocation GFP_ATOMIC. This issue was observed when running xfstests generic/028: [ 1722.589204] CIFS VFS: \\192.168.30.26 Cancelling wait for mid 72064 cmd: 5 [ 1722.590687] CIFS VFS: \\192.168.30.26 Cancelling wait for mid 72065 cmd: 17 [ 1722.593529] CIFS VFS: \\192.168.30.26 Cancelling wait for mid 72066 cmd: 6 [ 1723.039014] BUG: sleeping function called from invalid context at mm/slab.h:565 [ 1723.040710] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 30877, name: cifsd [ 1723.045098] CPU: 3 PID: 30877 Comm: cifsd Not tainted 5.5.0-rc4+ #313 [ 1723.046256] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba527-rebuilt.opensuse.org 04/01/2014 [ 1723.048221] Call Trace: [ 1723.048689] dump_stack+0x97/0xe0 [ 1723.049268] ___might_sleep.cold+0xd1/0xe1 [ 1723.050069] kmem_cache_alloc_trace+0x204/0x2b0 [ 1723.051051] __smb2_handle_cancelled_cmd+0x40/0x140 [cifs] [ 1723.052137] smb2_handle_cancelled_mid+0xf6/0x120 [cifs] [ 1723.053247] cifs_mid_q_entry_release+0x44d/0x630 [cifs] [ 1723.054351] ? cifs_reconnect+0x26a/0x1620 [cifs] [ 1723.055325] cifs_demultiplex_thread+0xad4/0x14a0 [cifs] [ 1723.056458] ? cifs_handle_standard+0x2c0/0x2c0 [cifs] [ 1723.057365] ? kvm_sched_clock_read+0x14/0x30 [ 1723.058197] ? sched_clock+0x5/0x10 [ 1723.058838] ? sched_clock_cpu+0x18/0x110 [ 1723.059629] ? lockdep_hardirqs_on+0x17d/0x250 [ 1723.060456] kthread+0x1ab/0x200 [ 1723.061149] ? cifs_handle_standard+0x2c0/0x2c0 [cifs] [ 1723.062078] ? kthread_create_on_node+0xd0/0xd0 [ 1723.062897] ret_from_fork+0x3a/0x50 Signed-off-by: Paulo Alcantara (SUSE) Fixes: 9150c3adbf24 ("CIFS: Close open handle after interrupted close") Cc: Stable Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky commit 5739375ee4230980166807d347cc21c305532bbc Author: Paulo Alcantara (SUSE) Date: Thu Jan 9 10:03:19 2020 -0300 cifs: Fix mount options set in automount Starting from 4a367dc04435, we must set the mount options based on the DFS full path rather than the resolved target, that is, cifs_mount() will be responsible for resolving the DFS link (cached) as well as performing failover to any other targets in the referral. Signed-off-by: Paulo Alcantara (SUSE) Reported-by: Martijn de Gouw Fixes: 4a367dc04435 ("cifs: Add support for failover in cifs_mount()") Link: https://lore.kernel.org/linux-cifs/39643d7d-2abb-14d3-ced6-c394fab9a777@prodrive-technologies.com Tested-by: Martijn de Gouw Signed-off-by: Steve French commit 463a7b457c02250a84faa1d23c52da9e3364aed2 Author: Steve French Date: Thu Jan 16 15:58:00 2020 -0600 cifs: fix unitialized variable poential problem with network I/O cache lock patch static analysis with Coverity detected an issue with the following commit: Author: Paulo Alcantara (SUSE) Date: Wed Dec 4 17:38:03 2019 -0300 cifs: Avoid doing network I/O while holding cache lock Addresses-Coverity: ("Uninitialized pointer read") Reported-by: Colin Ian King Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit eecfc57130b5faa11fa5fe556313254c7ecfabed Author: YueHaibing Date: Fri Jan 17 10:21:56 2020 +0800 cifs: Fix return value in __update_cache_entry copy_ref_data() may return error, it should be returned to upstream caller. Fixes: 03535b72873b ("cifs: Avoid doing network I/O while holding cache lock") Signed-off-by: YueHaibing Signed-off-by: Steve French commit 742d8de0186e9f8ec469f8171ea25781a17421bf Author: Paulo Alcantara (SUSE) Date: Wed Dec 4 17:38:03 2019 -0300 cifs: Avoid doing network I/O while holding cache lock When creating or updating a cache entry, we need to get an DFS referral (get_dfs_referral), so avoid holding any locks during such network operation. To prevent that, do the following: * change cache hashtable sync method from RCU sync to a read/write lock. * use GFP_ATOMIC in memory allocations. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit 06d57378bcc9b2c33640945174842115593795d1 Author: Paulo Alcantara (SUSE) Date: Wed Dec 4 17:38:02 2019 -0300 cifs: Fix potential deadlock when updating vol in cifs_reconnect() We can't acquire volume lock while refreshing the DFS cache because cifs_reconnect() may call dfs_cache_update_vol() while we are walking through the volume list. To prevent that, make vol_info refcounted, create a temp list with all volumes eligible for refreshing, and then use it without any locks held. Besides, replace vol_lock with a spinlock and protect cache_ttl from concurrent accesses or changes. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit ff2f7fc08268f266372c30a815349749e8499eb5 Author: Paulo Alcantara (SUSE) Date: Wed Dec 4 17:38:01 2019 -0300 cifs: Merge is_path_valid() into get_normalized_path() Just do the trivial path validation in get_normalized_path(). Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 345c1a4a9e09dc5842b7bbb6728a77910db69c52 Author: Paulo Alcantara (SUSE) Date: Wed Dec 4 17:38:00 2019 -0300 cifs: Introduce helpers for finding TCP connection Add helpers for finding TCP connections that are good candidates for being used by DFS refresh worker. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 199c6bdfb04b71d88a7765e08285885fbca60df4 Author: Paulo Alcantara (SUSE) Date: Wed Dec 4 17:37:59 2019 -0300 cifs: Get rid of kstrdup_const()'d paths The DFS cache API is mostly used with heap allocated strings. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 185352ae6171c845951e21017b2925a6f2795904 Author: Paulo Alcantara (SUSE) Date: Wed Dec 4 17:37:58 2019 -0300 cifs: Clean up DFS referral cache Do some renaming and code cleanup. No functional changes. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 6629400a2227c843a84e84c2aa4275dfe6c3bdbc Author: David Howells Date: Thu Nov 21 08:13:58 2019 +0000 cifs: Don't use iov_iter::type directly Don't use iov_iter::type directly, but rather use the new accessor functions that have been added. This allows the .type field to be split and rearranged without the need to update the filesystems. Signed-off-by: David Howells Signed-off-by: Steve French commit 731b82bb1750a906c1e7f070aedf5505995ebea7 Author: Ronnie Sahlberg Date: Wed Jan 8 13:08:07 2020 +1000 cifs: set correct max-buffer-size for smb2_ioctl_init() Fix two places where we need to adjust down the max response size for ioctl when it is used together with compounding. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky CC: Stable commit 37478608f0eb6f232e62791683875a1f557b1b10 Author: Ronnie Sahlberg Date: Wed Jan 8 13:08:06 2020 +1000 cifs: use compounding for open and first query-dir for readdir() Combine the initial SMB2_Open and the first SMB2_Query_Directory in a compound. This shaves one round-trip of each directory listing, changing it from 4 to 3 for small directories. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky commit af08f9e79c602835f975f0f8f6e90fc48848bffa Author: Ronnie Sahlberg Date: Wed Jan 8 13:08:05 2020 +1000 cifs: create a helper function to parse the query-directory response buffer Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky commit 0a17799cc02f81c4c82c2de6f7071701714c2267 Author: Ronnie Sahlberg Date: Wed Jan 8 13:08:04 2020 +1000 cifs: prepare SMB2_query_directory to be used with compounding Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Reviewed-by: Pavel Shilovsky commit 01d1bd76a170c1cf1864b3b3ef1f8502f189148e Author: zhengbin Date: Wed Dec 25 11:30:21 2019 +0800 fs/cifs/cifssmb.c: use true,false for bool variable Fixes coccicheck warning: fs/cifs/cifssmb.c:4622:3-22: WARNING: Assignment of 0/1 to bool variable fs/cifs/cifssmb.c:4756:3-22: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Steve French commit 720aec01262d49dbce17d862d8cdbfd3cfef4261 Author: zhengbin Date: Wed Dec 25 11:30:20 2019 +0800 fs/cifs/smb2ops.c: use true,false for bool variable Fixes coccicheck warning: fs/cifs/smb2ops.c:807:2-36: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Steve French commit cdbcf82b86ea24aa942991b4233cd8ddf13f590c Author: Darrick J. Wong Date: Thu Jan 23 17:01:20 2020 -0800 xfs: fix xfs_buf_ioerror_alert location reporting Instead of passing __func__ to the error reporting function, let's use the return address builtins so that the messages actually tell you which higher level function called the buffer functions. This was previously true for the xfs_buf_read callers, but not for the xfs_trans_read_buf callers. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 706b8c5bc70391be510a5454f307db90b622b279 Author: Darrick J. Wong Date: Thu Jan 23 17:01:20 2020 -0800 xfs: remove unnecessary null pointer checks from _read_agf callers Drop the null buffer pointer checks in all code that calls xfs_alloc_read_agf and doesn't pass XFS_ALLOC_FLAG_TRYLOCK because they're no longer necessary. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit f48e2df8a877ca1c19d92cfd7e74cc5956fa84cb Author: Darrick J. Wong Date: Thu Jan 23 17:01:19 2020 -0800 xfs: make xfs_*read_agf return EAGAIN to ALLOC_FLAG_TRYLOCK callers Refactor xfs_read_agf and xfs_alloc_read_agf to return EAGAIN if the caller passed TRYLOCK and we weren't able to get the lock; and change the callers to recognize this. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit ee647f85cb81b09bbfa2886954828ed03fa3ec38 Author: Darrick J. Wong Date: Thu Jan 23 17:01:19 2020 -0800 xfs: remove the xfs_btree_get_buf[ls] functions Remove the xfs_btree_get_bufs and xfs_btree_get_bufl functions, since they're pretty trivial oneliners. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit ce92464c180b60e79022bdf1175b7737a11f59b7 Author: Darrick J. Wong Date: Thu Jan 23 17:01:18 2020 -0800 xfs: make xfs_trans_get_buf return an error code Convert xfs_trans_get_buf() to return numeric error codes like most everywhere else in xfs. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit 9676b54e6e28689af1b4247569f14466bdfc5390 Author: Darrick J. Wong Date: Thu Jan 23 17:01:18 2020 -0800 xfs: make xfs_trans_get_buf_map return an error code Convert xfs_trans_get_buf_map() to return numeric error codes like most everywhere else in xfs. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit 0e3eccce5e0e438bc1aa3c2913221d3d43a1bef4 Author: Darrick J. Wong Date: Thu Jan 23 17:01:17 2020 -0800 xfs: make xfs_buf_read return an error code Convert xfs_buf_read() to return numeric error codes like most everywhere else in xfs. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit 2842b6db3d539bec08d080b22635b6e8acaa30ec Author: Darrick J. Wong Date: Thu Jan 23 17:01:17 2020 -0800 xfs: make xfs_buf_get_uncached return an error code Convert xfs_buf_get_uncached() to return numeric error codes like most everywhere else in xfs. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit 841263e93310595c30653a9f530b2d7bbeed5aae Author: Darrick J. Wong Date: Thu Jan 23 17:01:16 2020 -0800 xfs: make xfs_buf_get return an error code Convert xfs_buf_get() to return numeric error codes like most everywhere else in xfs. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit 4ed8e27b4f755f50d78dc3d9f9760b60e891f97b Author: Darrick J. Wong Date: Thu Jan 23 17:01:16 2020 -0800 xfs: make xfs_buf_read_map return an error code Convert xfs_buf_read_map() to return numeric error codes like most everywhere else in xfs. This involves moving the open-coded logic that reports metadata IO read / corruption errors and stales the buffer into xfs_buf_read_map so that the logic is all in one place. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit 3848b5f6709221b7ab52c9639baee50dc4b006bb Author: Darrick J. Wong Date: Thu Jan 23 17:01:15 2020 -0800 xfs: make xfs_buf_get_map return an error code Convert xfs_buf_get_map() to return numeric error codes like most everywhere else in xfs. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit 32dff5e5d1b5889b068e411d490453834c639701 Author: Darrick J. Wong Date: Thu Jan 23 17:01:15 2020 -0800 xfs: make xfs_buf_alloc return an error code Convert _xfs_buf_alloc() to return numeric error codes like most everywhere else in xfs. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit 2a13513f99e735184fd6f889d78da6424fda80a1 Merge: c2f9a4e4a5ab d7809bd9eae6 Author: Kalle Valo Date: Sun Jan 26 17:54:46 2020 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.6. Major changes: ar5523 * add support for SMCWUSBT-G2 USB device commit c2f9a4e4a5abfc84c01b738496b3fd2d471e0b18 Author: Colin Ian King Date: Sun Jan 26 00:09:54 2020 +0000 iwlegacy: ensure loop counter addr does not wrap and cause an infinite loop The loop counter addr is a u16 where as the upper limit of the loop is an int. In the unlikely event that the il->cfg->eeprom_size is greater than 64K then we end up with an infinite loop since addr will wrap around an never reach upper loop limit. Fix this by making addr an int. Addresses-Coverity: ("Infinite loop") Fixes: be663ab67077 ("iwlwifi: split the drivers for agn and legacy devices 3945/4965") Signed-off-by: Colin Ian King Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit f76c34082b24534c813a9e3e175ef778c11e9950 Author: Colin Ian King Date: Wed Jan 22 09:33:40 2020 +0000 rtlwifi: btcoex: fix spelling mistake "initilized" -> "initialized" There is a spelling mistake in one of the fields in the btc_coexist struct, fix it. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit c5f9852411098474ab21f5d7b1b84e5cdd59ca5a Author: YueHaibing Date: Tue Jan 21 11:04:28 2020 +0800 rtlwifi: rtl8723ae: remove unused variables drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c:16:18: warning: ofdmswing_table defined but not used [-Wunused-const-variable=] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c:56:17: warning: cckswing_table_ch1ch13 defined but not used [-Wunused-const-variable=] drivers/net/wireless/realtek/rtlwifi/rtl8723ae/dm.c:92:17: warning: cckswing_table_ch14 defined but not used [-Wunused-const-variable=] These variable is never used, so remove them. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit 253e5aba937973fd29bd5c559d21e35d0642242e Author: YueHaibing Date: Tue Jan 21 10:19:24 2020 +0800 rtlwifi: rtl8192ee: remove unused variables drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c:15:18: warning: ofdmswing_table defined but not used [-Wunused-const-variable=] drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c:61:17: warning: cckswing_table_ch1ch13 defined but not used [-Wunused-const-variable=] drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c:97:17: warning: cckswing_table_ch14 defined but not used [-Wunused-const-variable=] These variable is never used, so remove them. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit cc071a6f26aae3321cf193dc2e8c35090709b8ab Author: YueHaibing Date: Tue Jan 21 10:09:58 2020 +0800 rtlwifi: rtl8821ae: remove unused variables drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:142:17: warning: cckswing_table_ch1ch13 defined but not used [-Wunused-const-variable=] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:178:17: warning: cckswing_table_ch14 defined but not used [-Wunused-const-variable=] drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:96:18: warning: ofdmswing_table defined but not used [-Wunused-const-variable=] These variable is never used, so remove them. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Kalle Valo commit c3a913357c3e3d2225a83508f06ece01f5bada20 Author: Colin Ian King Date: Tue Jan 14 16:56:01 2020 +0000 rtlwifi: rtl8188ee: remove redundant assignment to variable cond Variable cond is being assigned with a value that is never read, it is assigned a new value later on. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo commit ed7791d9d0abc7e24223ab1663931c8e5351fea8 Author: Mikhail Karpenko Date: Thu Jan 9 16:17:55 2020 +0300 qtnfmac: add support for TWT responder and spatial reuse Add support for 11ax features: TWT responder and spatial reuse. Add separate structure for spatial reuse parameters and pass this structure to firmware along with other parameters in start_ap command. Pass TWT responder value to firmware. Bump qlink protocol version. Signed-off-by: Mikhail Karpenko Signed-off-by: Kalle Valo commit b73f0aac731ce87a656d9911cb9e2e79eb721d1a Author: Sergey Matyukevich Date: Thu Jan 9 16:17:54 2020 +0300 qtnfmac: add support for STA HE rates Add HE rates into STA info. Report HE Rx/Tx MCS if STA supports them. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit e14291752e568bf936907be7f11ae3cc39d89fd2 Author: Sergey Matyukevich Date: Thu Jan 9 16:17:53 2020 +0300 qtnfmac: control qtnfmac wireless interfaces bridging Bridging qtnfmac interfaces is possible only if the following two conditions are fulfilled: - firmware advertises proper support with QLINK_HW_CAPAB_HW_BRIDGE - kernel is built with CONFIG_NET_SWITCHDEV support Otherwise adding qtnfmac wireless interfaces into the same bridge should not be allowed since packets flooded by kernel may break internal forwarding rules between interfaces. This patch disables adding qtnfmac wireless interfaces into the same bridge if no support is provided either by card or by kernel. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit 155b424c86f8169b30d30beb46ad216c5e61749a Author: Sergey Matyukevich Date: Thu Jan 9 16:17:52 2020 +0300 qtnfmac: add module param to configure DFS offload Firmware may support DFS offload. However the final decision on whether to use it or not should be up to the user. So even if firmware supports DFS offload, it should be enabled only if user explicitly requests it. For this purpose introduce kernel param dfs_offload which is disabled by default. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit e92b07a20b5f039ccd8776dc7c6323a3e1d726d9 Author: Sergey Matyukevich Date: Thu Jan 9 16:17:51 2020 +0300 qtnfmac: cleanup slave_radar access function Currently this parameter is global, it is not specific to mac. So this function does not need any input parameters. Signed-off-by: Sergey Matyukevich Signed-off-by: Kalle Valo commit 627b0d094240c38393b2f2d40626c33a8fff6103 Author: yuehaibing Date: Wed Jan 8 21:57:48 2020 +0800 brcmfmac: Remove always false 'idx < 0' statement idx is declared as u32, it will never less than 0. Signed-off-by: yuehaibing Signed-off-by: Kalle Valo commit 6b6c150b8464e91af26be805f88d5e58c6d626ae Author: Yan-Hsuan Chuang Date: Tue Jan 7 22:27:29 2020 +0800 rtw88: use shorter delay time to poll PS state When TX packet arrives, driver should leave deep PS state to make sure the DMA is working. After requested to leave deep PS state, driver needs to poll the PS state to check if the mode has been changed successfully. The driver used to check the state of the hardware every 20 msecs, which means upon the first failure of state check, the CPU is delayed 20 msecs for next check. This is harmful for some time-sensitive applications such as media players. So, use shorter delay time each check from 20 msecs to 100 usecs. The state should be changed in several tries. But we still need to reserve ~15 msecs in total in case of the state just took too long to be changed successfully. If the states of driver and the hardware is not synchronized, the power state could be locked forever, which mean we could never enter/leave the PS state. Signed-off-by: Yan-Hsuan Chuang Reviewed-by: Chris Chiu Signed-off-by: Kalle Valo commit f4f84ff8377d4cedf18317747bc407b2cf657d0f Author: Yan-Hsuan Chuang Date: Tue Jan 7 16:08:07 2020 +0800 rtw88: fix potential NULL skb access in TX ISR Sometimes the TX queue may be empty and we could possible dequeue a NULL pointer, crash the kernel. If the skb is NULL then there is nothing to do, just leave the ISR. And the TX queue should not be empty here, so print an error to see if there is anything wrong for DMA ring. Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 20f2c5fa3af060401c72e444999470a4cab641cf Author: Rafał Miłecki Date: Thu Dec 26 14:30:50 2019 +0100 brcmfmac: add initial support for monitor mode Report monitor interface availability using cfg80211 and support it in the add_virtual_intf() and del_virtual_intf() callbacks. This new feature is conditional and depends on firmware flagging monitor packets. Receiving monitor frames is already handled by the brcmf_netif_mon_rx(). Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo commit 24332f8068ff6df7f16aefee45d514de1de4de80 Author: Rafał Miłecki Date: Thu Dec 26 14:30:49 2019 +0100 brcmfmac: simplify building interface combinations Move similar/duplicated code out of combination specific code blocks. This simplifies code a bit and allows adding more combinations later. A list of combinations remains unchanged. Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo commit 8c8e60fb86a90a30721bbd797f58f96b3980dcc1 Author: Jean-Philippe Brucker Date: Thu Dec 26 10:20:33 2019 +0100 brcmfmac: sdio: Fix OOB interrupt initialization on brcm43362 Commit 262f2b53f679 ("brcmfmac: call brcmf_attach() just before calling brcmf_bus_started()") changed the initialization order of the brcmfmac SDIO driver. Unfortunately since brcmf_sdiod_intr_register() is now called before the sdiodev->bus_if initialization, it reads the wrong chip ID and fails to initialize the GPIO on brcm43362. Thus the chip cannot send interrupts and fails to probe: [ 12.517023] brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout [ 12.531214] ieee80211 phy0: brcmf_bus_started: failed: -110 [ 12.536976] ieee80211 phy0: brcmf_attach: dongle is not responding: err=-110 [ 12.566467] brcmfmac: brcmf_sdio_firmware_callback: brcmf_attach failed Initialize the bus interface earlier to ensure that brcmf_sdiod_intr_register() properly sets up the OOB interrupt. BugLink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908438 Fixes: 262f2b53f679 ("brcmfmac: call brcmf_attach() just before calling brcmf_bus_started()") Signed-off-by: Jean-Philippe Brucker Reviewed-by: Arend van Spriel Signed-off-by: Kalle Valo commit b92c017deda819e45a0f054f6df6b53e645d7fe4 Author: zhengbin Date: Tue Dec 24 22:16:06 2019 +0800 brcmfmac: use true,false for bool variable Fixes coccicheck warning: drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c:911:2-24: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit ab36bb72d00e24ae637a87ce8cde568435322a56 Author: zhengbin Date: Tue Dec 24 22:16:02 2019 +0800 cw1200: use true,false for bool variable Fixes coccicheck warning: drivers/net/wireless/st/cw1200/txrx.c:718:6-16: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit 891984bccf64138cb721f87abae838af5636281a Author: zhengbin Date: Tue Dec 24 22:16:01 2019 +0800 rtw88: use true,false for bool variable Fixes coccicheck warning: drivers/net/wireless/realtek/rtw88/phy.c:1437:1-24: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit 8ddd4a2a6b5930b8318b994e416db4491795a8aa Author: Amadeusz Sławiński Date: Mon Dec 23 13:37:15 2019 +0100 rtlwifi: rtl8821ae: Make functions static & rm sw.h Some of functions which were exposed in sw.h, are only used in sw.c, so just make them static. This makes sw.h unnecessary, so remove it. Signed-off-by: Amadeusz Sławiński Signed-off-by: Kalle Valo commit 02a214e29ea4415437d9e38c6bf5604e564397da Author: Amadeusz Sławiński Date: Mon Dec 23 13:37:14 2019 +0100 rtlwifi: rtl8723be: Make functions static & rm sw.h Some of functions which were exposed in sw.h, are only used in sw.c, so just make them static. This makes sw.h unnecessary, so remove it. Signed-off-by: Amadeusz Sławiński Signed-off-by: Kalle Valo commit c218acfaa637d02830549cf27798921f820ec818 Author: Amadeusz Sławiński Date: Mon Dec 23 13:37:13 2019 +0100 rtlwifi: rtl8723ae: Make functions static & rm sw.h Some of functions which were exposed in sw.h, are only used in sw.c, so just make them static. This makes sw.h unnecessary, so remove it. Signed-off-by: Amadeusz Sławiński Signed-off-by: Kalle Valo commit 5b2640835a3443e629ee2af4b8367f6abdeb142a Author: Amadeusz Sławiński Date: Mon Dec 23 13:37:12 2019 +0100 rtlwifi: rtl8192se: Remove sw.h header It has one define, which is already defined in include from reg.h. All the declared functions are not implemented anywhere, sw.c has ones with similar names which are already static. Signed-off-by: Amadeusz Sławiński Signed-off-by: Kalle Valo commit fef8a2d969af25638f48411930f491088d6ccea0 Author: Amadeusz Sławiński Date: Mon Dec 23 13:37:11 2019 +0100 rtlwifi: rtl8192ee: Make functions static & rm sw.h Some of functions which were exposed in sw.h, are only used in sw.c, so just make them static. This makes sw.h unnecessary, so remove it. Signed-off-by: Amadeusz Sławiński Signed-off-by: Kalle Valo commit a3cda3c363ca747758a3bcc6fc23529003a1c983 Author: Amadeusz Sławiński Date: Mon Dec 23 13:37:10 2019 +0100 rtlwifi: rtl8192cu: Remove sw.h header It has one define, which is already defined in include from reg.h. All functions are declared in their own headers and included in *.c files belonging to them. This makes sw.h unnecessary, so we can remove it. Signed-off-by: Amadeusz Sławiński Signed-off-by: Kalle Valo commit be913e3f49ac943c230dca5de40974f3a5f7ae90 Author: Amadeusz Sławiński Date: Mon Dec 23 13:37:09 2019 +0100 rtlwifi: rtl8192ce: Make functions static & rm sw.h Some of functions which were exposed in sw.h, are only used in sw.c, so just make them static. The rtl92c_init_var_map function is not defined anywhere, while declared in sw.h. Two other functions are also declared in phy.h (which is included in sw.c) and their definitions are in phy.c Overall sw.h is unnecessary and can be removed. Signed-off-by: Amadeusz Sławiński Signed-off-by: Kalle Valo commit 5d3f9145f54ee81b33752f68285eb15ef644e08a Author: Amadeusz Sławiński Date: Mon Dec 23 13:37:08 2019 +0100 rtlwifi: rtl8188ee: Make functions static & rm sw.h Some of functions which were exposed in sw.h, are only used in sw.c, so just make them static. This makes sw.h unnecessary, so remove it. Signed-off-by: Amadeusz Sławiński Signed-off-by: Kalle Valo commit fd156bdf62bb06271084f45eff9384b24f734fd8 Author: Amadeusz Sławiński Date: Mon Dec 23 13:37:07 2019 +0100 rtlwifi: rtl8192cu: Fix typo Replace USB_VENDER_ID_REALTEK with USB_VENDOR_ID_REALTEK. Signed-off-by: Amadeusz Sławiński Signed-off-by: Kalle Valo commit bbdd1d854e0a97b771ab642fc07992b28e853036 Author: Zong-Zhe Yang Date: Fri Dec 20 17:21:56 2019 +0800 rtw88: change max_num_of_tx_queue() definition to inline in pci.h It's more reasonable to define max_num_of_tx_queue() as an inline function. Signed-off-by: Zong-Zhe Yang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit f48abf064ade7a08015bc3a50a873437375843b2 Author: Yan-Hsuan Chuang Date: Fri Dec 20 17:21:55 2019 +0800 rtw88: assign NULL to skb after being kfree()'ed Should assign NULL to skb after kfree(), in case of driver trying to free the same skb again. This could happen if driver failed to allocate an skb when building reserved page. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit fc83c616d4d95c386e2bac7994b635b24662bca4 Author: Chin-Yen Lee Date: Fri Dec 20 17:21:54 2019 +0800 rtw88: use rtw_hci_stop() instead of rtwdev->hci.ops->stop() Fix typo, should use rtw_hci_stop() Signed-off-by: Chin-Yen Lee Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 65ae64d375751cad79c6e74222d348f72e310e4c Author: Yan-Hsuan Chuang Date: Fri Dec 20 17:21:53 2019 +0800 rtw88: remove unused vif pointer in struct rtw_vif As driver can easily get vif with container_of(), we can just remove it. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 962562cde15463f712e9cc007086f6140930199d Author: Yan-Hsuan Chuang Date: Fri Dec 20 17:21:52 2019 +0800 rtw88: remove unused variable 'in_lps' Unused, will not be used neither, because the hardware/firmware can only support one vif for LPS currnetly. If there's more than one vif, than driver will never enter LPS. So remove it. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 3f43f10bd619b1acebb570bebf989265920aeb27 Author: Tzu-En Huang Date: Fri Dec 20 17:21:51 2019 +0800 rtw88: remove unused spinlock dm_lock is never used. Thus, remove this redundant spinlock. Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit e339b649352437c529616daa0c15db04c76f0e85 Author: Tzu-En Huang Date: Fri Dec 20 17:21:49 2019 +0800 rtw88: 8822c: update power sequence to v15 Update card enable power sequence flow, to fix CMD11 fail after reboot and wrong PLL clock. Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 73a2d0b83424f7150a1f607470dac67c95b8b2d4 Author: Ping-Ke Shih Date: Fri Dec 20 17:21:47 2019 +0800 rtw88: fix TX secondary channel offset of 40M if current bw is 20M or 40M TX secondary channel offset is valid only if current bandwidth is 80M, otherwise leave this value as zero. The wrong value of txsc40 causes MAC unpredictable behavior. Signed-off-by: Ping-Ke Shih Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 35a68fa5f96a80797e11b6952a47c5a84939a7bf Author: Ping-Ke Shih Date: Fri Dec 20 17:21:46 2019 +0800 rtw88: fix rate mask for 1SS chip The rate mask is used to tell firmware the supported rate depends on negotiation. We loop 2 times for all VHT/HT 2SS rate mask first, and then only keep the part according to chip's NSS. This commit fixes the logic error of '&' operations for VHT/HT rate, and we should run this logic before adding legacy rate. To access HT MCS map, index 0/1 represent MCS 0-7/8-15 respectively. Use NL80211_BAND_xxx is incorrect, so fix it as well. Signed-off-by: Ping-Ke Shih Signed-off-by: Yan-Hsuan Chuang Reviewed-by: Chris Chiu Signed-off-by: Kalle Valo commit b6c12908a33e4e413523e73464cd5957690f1a76 Author: Chin-Yen Lee Date: Thu Dec 19 16:58:16 2019 +0800 rtw88: Add wowlan net-detect support Net-detect is an option of wowlan to allow the device to be woken up from suspend mode when configured network is detected. When user enables net-detect and lets the device enter suspend state, wowlan firmware will periodically scan until beacon or probe response of configured networks are received. Between two scans, wowlan firmware keeps wifi chip in idle mode to reduce power consumption. If configured networks are detected, wowlan firmware will trigger resume process. Signed-off-by: Chin-Yen Lee Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit e3e400df30078830871b927ca24826667d97d1f6 Author: Chin-Yen Lee Date: Thu Dec 19 16:58:15 2019 +0800 rtw88: Add wowlan pattern match support Pattern match is an option of wowlan to allow the device to be woken up from suspend mode when receiving packets matched user-designed patterns. The patterns are written into hardware cam in suspend flow if users have set up them. If packets matched designed pattern are received, wowlan firmware will get an interrupt and then wake up the device. Signed-off-by: Chin-Yen Lee Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 44bc17f7f5b3b2cc4084eba6307ba750078a8a73 Author: Chin-Yen Lee Date: Thu Dec 19 16:58:14 2019 +0800 rtw88: support wowlan feature for 8822c Wake on WLAN(wowlan) is a feature which allows devices to be woken up from suspend state through wlan events. When user enables wowlan feature and then let the device enter suspend state, wowlan firmware will be loaded by the driver and periodically monitors wifi packets. Power consumption of wifi chip will be reduced in this state. If wowlan firmware detects that specific wlan event happens, it will issue wakeup signal to trigger resume process. Driver will load normal firmware and let wifi chip return to the original state. Currently supported wlan events include receiving magic packet, rekey packet and deauth packet, and disconnecting from AP. Signed-off-by: Chin-Yen Lee Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit c8e5695eae9959fc5774c0f490f2450be8bad3de Author: Chin-Yen Lee Date: Thu Dec 19 16:58:13 2019 +0800 rtw88: load wowlan firmware if wowlan is supported Driver used to download normal firmware only, but some devices support wowlan and require to download wowlan firmware when system suspends. So modify rtw_load_firmware() and its callback to allow driver to download both normal and wowlan firmware. Signed-off-by: Chin-Yen Lee Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit 786221048e8f74bafb87b4ba8b613cd5bc0ea159 Author: Yan-Hsuan Chuang Date: Thu Dec 19 16:58:12 2019 +0800 rtw88: add interface config for 8822c Some devices need to configure interface/HCI related reigsters in power on flow. Add interface_cfg for HCI for the settings. The driver only supports RTL8822BE/RTL8822CE now, and since RTL8822BE does not need to configure PCIE, the configuration is only added for RTL8822CE. Without it, some of the RTL8822CE device can crash and disconnected to host in suspend/wowlan mode. Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit fd30e891e0bc68735b52d480d078959e5fb30e70 Author: Chin-Yen Lee Date: Thu Dec 19 16:58:11 2019 +0800 rtw88: pci: reset dma when reset pci trx ring When PCI trx rings are reset, the DMA engine should also be reset. Otherswise, the rx_tag of rx flow is not synchronous to hw. Remove DMA reset when rtw_pci_start() as we added it in rtw_pci_setup(). Signed-off-by: Chin-Yen Lee Signed-off-by: Yan-Hsuan Chuang Reviewed-by: Chris Chiu Signed-off-by: Kalle Valo commit 25cab7e71da32d46651f5fc9373eef9b79938629 Author: Chin-Yen Lee Date: Thu Dec 19 16:58:10 2019 +0800 rtw88: pci: reset ring index when release skbs in tx ring When skbs queued for each TX ring are relased in PCI stop flow, the ring index should be reset at the same time. Signed-off-by: Chin-Yen Lee Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo commit b61156fba74f659d0bc2de8f2dbf5bad9f4b8faf Author: Nathan Chancellor Date: Tue Dec 17 18:15:46 2019 -0700 hostap: Adjust indentation in prism2_hostapd_add_sta Clang warns: ../drivers/net/wireless/intersil/hostap/hostap_ap.c:2511:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] if (sta->tx_supp_rates & WLAN_RATE_5M5) ^ ../drivers/net/wireless/intersil/hostap/hostap_ap.c:2509:2: note: previous statement is here if (sta->tx_supp_rates & WLAN_RATE_2M) ^ 1 warning generated. This warning occurs because there is a space before the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns. Fixes: ff1d2767d5a4 ("Add HostAP wireless driver.") Link: https://github.com/ClangBuiltLinux/linux/issues/813 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Kalle Valo commit cf33a7728bf27e6f8c5e9190410db85c11103699 Author: Maital Hahn Date: Thu Jan 16 08:33:53 2020 -0600 wlcore: mesh: Add support for RX Broadcast Key In order to support authentication of equals peers, need to save RX Broadcast key per peer (on top of 1 TX broadcast key and unicast key per peer). Signed-off-by: Maital Hahn Acked-by: Guy Mishol Signed-off-by: Hari Nagalla Signed-off-by: Kalle Valo commit d7809bd9eae67b4252cbc4672431610227cbb729 Author: Colin Ian King Date: Thu Jan 23 00:51:17 2020 +0000 wcn36xx: fix spelling mistake "to" -> "too" There is a spelling mistake in a wcn36xx_err message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit d92e8fa8ce882107e3f5be1244ff77ea1a74e63e Author: Colin Ian King Date: Thu Jan 23 00:18:01 2020 +0000 ar5523: fix spelling mistake "to" -> "too" There is a spelling mistake in a ar5523_err message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit 5b362498a79631f283578b64bf6f4d15ed4cc19a Author: Mert Dirik Date: Thu Jan 16 14:11:25 2020 +0300 ar5523: Add USB ID of SMCWUSBT-G2 wireless adapter Add the required USB ID for running SMCWUSBT-G2 wireless adapter (SMC "EZ Connect g"). This device uses ar5523 chipset and requires firmware to be loaded. Even though pid of the device is 4507, this patch adds it as 4506 so that AR5523_DEVICE_UG macro can set the AR5523_FLAG_PRE_FIRMWARE flag for pid 4507. Signed-off-by: Mert Dirik Signed-off-by: Kalle Valo commit fa43e99dd4b76201eb323ee3918c68132e8abba9 Author: Stephen Boyd Date: Thu Jan 23 15:29:44 2020 -0800 ath10k: Use device_get_match_data() to simplify code Use device_get_match_data() here to simplify the code a bit. Signed-off-by: Stephen Boyd Signed-off-by: Kalle Valo commit 79a4b788451dd5afd4ef62d5ff9bcde219ce5286 Author: Stephen Boyd Date: Thu Jan 23 15:24:56 2020 -0800 ath10k: Add newlines to printk messages Some printks in here don't have newlines at the end, meaning the log will be sort of hard to read. Add newlines. Signed-off-by: Stephen Boyd Signed-off-by: Kalle Valo commit 32efcc06d2a15fa87585614d12d6c2308cc2d3f3 Author: Abdul Kabbani Date: Fri Jan 24 16:34:02 2020 -0500 tcp: export count for rehash attempts Using IPv6 flow-label to swiftly route around avoid congested or disconnected network path can greatly improve TCP reliability. This patch adds SNMP counters and a OPT_STATS counter to track both host-level and connection-level statistics. Network administrators can use these counters to evaluate the impact of this new ability better. Export count for rehash attempts to 1) two SNMP counters: TcpTimeoutRehash (rehash due to timeouts), and TcpDuplicateDataRehash (rehash due to receiving duplicate packets) 2) Timestamping API SOF_TIMESTAMPING_OPT_STATS. Signed-off-by: Abdul Kabbani Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Kevin(Yudong) Yang Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 6ba8b3b6bd772f575f7736c8fd893c6981fcce16 Author: Rakesh Pillai Date: Tue Jan 21 12:42:28 2020 +0530 ath10k: Correct the DMA direction for management tx buffers The management packets, send to firmware via WMI, are mapped using the direction DMA_TO_DEVICE. Currently in case of wmi cleanup, these buffers are being unmapped using an incorrect DMA direction. This can cause unwanted behavior when the host driver is handling a restart of the wlan firmware. We might see a trace like below [] __dma_inv_area+0x28/0x58 [] ath10k_wmi_mgmt_tx_clean_up_pending+0x60/0xb0 [ath10k_core] [] idr_for_each+0x78/0xe4 [] ath10k_wmi_detach+0x4c/0x7c [ath10k_core] [] ath10k_core_stop+0x58/0x68 [ath10k_core] [] ath10k_halt+0xec/0x13c [ath10k_core] [] ath10k_core_restart+0x11c/0x1a8 [ath10k_core] [] process_one_work+0x16c/0x31c Fix the incorrect DMA direction during the wmi management tx buffer cleanup. Tested HW: WCN3990 Tested FW: WLAN.HL.3.1-00784-QCAHLSWMTPLZ-1 Fixes: dc405152bb6 ("ath10k: handle mgmt tx completion event") Signed-off-by: Rakesh Pillai Signed-off-by: Kalle Valo commit 6efca894e92295174a95b0b9a0c59012a1bb2d20 Merge: 14a1d2468ab3 17d9723e69d4 Author: David S. Miller Date: Sun Jan 26 15:20:32 2020 +0100 Merge branch 's390-qeth-next' Julian Wiedmann says: ==================== s390/qeth: updates 2020-01-25 please apply the following patch series for qeth to your net-next tree. This brings a number of cleanups for the init/teardown code paths. ==================== Signed-off-by: David S. Miller commit 17d9723e69d44491d04289213006fea1647bd0a6 Author: Julian Wiedmann Date: Sat Jan 25 16:53:03 2020 +0100 s390/qeth: remove HARDSETUP state qeth_l?_stop_card() is _never_ called while in HARDSETUP state, and there's no other usage of the card state that relies on the DOWN -> HARDSETUP -> SOFTSETUP transition. As related cleanup, remove the check in qeth_realloc_buffer_pool() as it is already done by the callers. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 7f92316c5393b583c5217bb2cfc789d6820ec393 Author: Julian Wiedmann Date: Sat Jan 25 16:53:02 2020 +0100 s390/qeth: make cmd/reply matching more flexible When data is received on the READ channel, the matching logic for cmds that are waiting for a reply is currently hard-coded into the channel's main IO callback. Move this into a per-cmd callback, so that we can apply custom matching logic for each individual cmd. This also allows us to remove the coarse-grained check for unexpected non-IPA replies, since they will no longer match against _all_ pending cmds. Note that IDX cmds use _no_ matcher, since their reply is synchronously received as part of the cmd's IO. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 91003f354e6bbe8d225b4d54127d80c694d201d9 Author: Julian Wiedmann Date: Sat Jan 25 16:53:01 2020 +0100 s390/qeth: consolidate online/offline code Large parts of the online/offline code are identical now, and cleaning up the remaining stuff is easier with a shared core. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit aa3ad3920301f2cf6d406209b14acde0c50f2323 Author: Julian Wiedmann Date: Sat Jan 25 16:53:00 2020 +0100 s390/qeth: consolidate QDIO queue setup Move some duplicated logic into a shared code path. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 8ca769e2b88f9e564aecdfab54fcc5a9d20190c1 Author: Julian Wiedmann Date: Sat Jan 25 16:52:59 2020 +0100 s390/qeth: shift some bridgeport code around qeth_l2_setup_bridgeport_attrs() is entirely unrelated to sysfs functionality, move it where it belongs. While at it merge all the bridgeport-specific code in the set-online path together. Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller commit d04bf42891a7ea43d15384262ae6ddd8e0461642 Author: Ganapathi Bhat Date: Mon Jan 13 10:42:46 2020 +0000 MAINTAINERS: update for mwifiex driver maintainers Remove Nishant Sarmukadam from Maintainer list, as he is no longer working in NXP. Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo commit 70e5b8f445fd27fde0c5583460e82539a7242424 Author: Brian Norris Date: Fri Dec 6 11:45:35 2019 -0800 mwifiex: drop most magic numbers from mwifiex_process_tdls_action_frame() Before commit 1e58252e334d ("mwifiex: Fix heap overflow in mmwifiex_process_tdls_action_frame()"), mwifiex_process_tdls_action_frame() already had too many magic numbers. But this commit just added a ton more, in the name of checking for buffer overflows. That seems like a really bad idea. Let's make these magic numbers a little less magic, by (a) factoring out 'pos[1]' as 'ie_len' (b) using 'sizeof' on the appropriate source or destination fields where possible, instead of bare numbers (c) dropping redundant checks, per below. Regarding redundant checks: the beginning of the loop has this: if (pos + 2 + pos[1] > end) break; but then individual 'case's include stuff like this: if (pos > end - 3) return; if (pos[1] != 1) return; Note that the second 'return' (validating the length, pos[1]) combined with the above condition (ensuring 'pos + 2 + length' doesn't exceed 'end'), makes the first 'return' (whose 'if' can be reworded as 'pos > end - pos[1] - 2') redundant. Rather than unwind the magic numbers there, just drop those conditions. Fixes: 1e58252e334d ("mwifiex: Fix heap overflow in mmwifiex_process_tdls_action_frame()") Signed-off-by: Brian Norris Signed-off-by: Kalle Valo commit 63289e7d3a645a4291ec43c1d526dd4a811da1a0 Author: Christophe Leroy Date: Sat Dec 21 08:32:28 2019 +0000 powerpc: align stack to 2 * THREAD_SIZE with VMAP_STACK In order to ease stack overflow detection, align stack to 2 * THREAD_SIZE when using VMAP_STACK. This allows overflow detection using a single bit check. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/60e9ae86b7d2cdcf21468787076d345663648f46.1576916812.git.christophe.leroy@c-s.fr commit 028474876f472c3b6eee633aed528a1206609657 Author: Christophe Leroy Date: Sat Dec 21 08:32:27 2019 +0000 powerpc/32: prepare for CONFIG_VMAP_STACK To support CONFIG_VMAP_STACK, the kernel has to activate Data MMU Translation for accessing the stack. Before doing that it must save SRR0, SRR1 and also DAR and DSISR when relevant, in order to not loose them in case there is a Data TLB Miss once the translation is reactivated. This patch adds fields in thread struct for saving those registers. It prepares entry_32.S to handle exception entry with Data MMU Translation enabled and alters EXCEPTION_PROLOG macros to save SRR0, SRR1, DAR and DSISR then reenables Data MMU. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a775a1fea60f190e0f63503463fb775310a2009b.1576916812.git.christophe.leroy@c-s.fr commit c9c84fd945bbaadbf69d953be308e6f35737fef6 Author: Christophe Leroy Date: Sat Dec 21 08:32:26 2019 +0000 powerpc/32: add a macro to get and/or save DAR and DSISR on stack. Refactor reading and saving of DAR and DSISR in exception vectors. This will ease the implementation of VMAP stack. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1286b3e51b07727c6b4b05f2df9af3f9b1717fb5.1576916812.git.christophe.leroy@c-s.fr commit 5ae8fabc644632d31babbc7162aa876c79aaadb3 Author: Christophe Leroy Date: Sat Dec 21 08:32:25 2019 +0000 powerpc/32: move MSR_PR test into EXCEPTION_PROLOG_0 In order to simplify VMAP stack implementation, move MSR_PR test into EXCEPTION_PROLOG_0. This requires to not modify cr0 between EXCEPTION_PROLOG_0 and EXCEPTION_PROLOG_1. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5c8b5bba692b92654dbd363a229a1ba91db725bb.1576916812.git.christophe.leroy@c-s.fr commit 1ca9db5b6556c38aacac4c50a617aa3f7efbb306 Author: Christophe Leroy Date: Sat Dec 21 08:32:24 2019 +0000 powerpc/32: save DEAR/DAR before calling handle_page_fault handle_page_fault() is the only function that save DAR/DEAR itself. Save DAR/DEAR before calling handle_page_fault() to prepare for VMAP stack which will require to save even before. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/3a4d58d378091086f00fde42b59610c80289e120.1576916812.git.christophe.leroy@c-s.fr commit 1f1c4d0122eebd204468684f21f0270ea8a4999d Author: Christophe Leroy Date: Sat Dec 21 08:32:23 2019 +0000 powerpc/32: Add EXCEPTION_PROLOG_0 in head_32.h This patch creates a macro for the very first part of exception prolog, this will help when implementing CONFIG_VMAP_STACK Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2249fe62f481121a180e9655ad2b998093f318f3.1576916812.git.christophe.leroy@c-s.fr commit 39bccfd164970557c5cfc60b2db029f70542549f Author: Christophe Leroy Date: Sat Dec 21 08:32:22 2019 +0000 powerpc/32: replace MTMSRD() by mtmsr On PPC32, MTMSRD() is simply defined as mtmsr. Replace MTMSRD(reg) by mtmsr reg in files dedicated to PPC32, this makes the code less obscure. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/22469e78230edea3dbd0c79a555d73124f6c6d93.1576916812.git.christophe.leroy@c-s.fr commit 7195c8747e8757daaf48d862e1314f8bcfdb3207 Author: Dan Carpenter Date: Wed Jan 15 20:46:52 2020 +0300 ath11k: fix up some error paths There are two error paths where "ret" wasn't set. Also one error path we set the error code to -EINVAL but we should just preserve the error code from ath11k_hal_srng_get_entrysize(). That function only returns -EINVAL so this doesn't change anything. I removed the "ret = 0;" initializers so that hopefully GCC will be able to detect these sorts of bugs in the future. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo commit 93634c61056e34522e824d56ff77ee2332ed7f8a Author: John Crispin Date: Tue Dec 17 21:20:57 2019 +0100 ath11k: make sure to also report the RX bandwidth inside radiotap Add IEEE80211_RADIOTAP_HE_DATA1_BW_RU_ALLOC_KNOWN to the list of known fields. Not doing so will result in wireshark not calculating the bitrate correctly. Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit 3b4516838eaabacc56770f12407d5f791c88838a Author: Colin Ian King Date: Sat Jan 11 09:08:24 2020 +0000 ath11k: avoid null pointer dereference when pointer band is null In the unlikely event that cap->supported_bands has neither WMI_HOST_WLAN_2G_CAP set or WMI_HOST_WLAN_5G_CAP set then pointer band is null and a null dereference occurs when assigning band->n_iftype_data. Move the assignment to the if blocks to avoid this. Cleans up static analysis warnings. Addresses-Coverity: ("Explicit null dereference") Fixes: 9f056ed8ee01 ("ath11k: add HE support") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit 875603b3de9fb5dc11acf80b6df45709adec68b2 Author: Bhagavathi Perumal S Date: Thu Jan 9 17:18:50 2020 +0530 ath11k: Add missing pdev rx rate stats This adds missing rx rate info stats like pilot evm, per chain rssi, per user ul ppdu and mpdu counts and ul ofdma rate info etc. And add null checks for memory alloc failures. Signed-off-by: Bhagavathi Perumal S Signed-off-by: Kalle Valo commit eefca584140b42551e642277515ca26be0ca5ef3 Author: Colin Ian King Date: Sat Dec 21 00:40:46 2019 +0000 ath11k: ensure ts.flags is initialized before bit-wise or'ing in values Currently the structure ts is not inititalized and ts.flags contains garbage values from the stack. This is being passed into function ath11k_dp_tx_status_parse that bit-wise or'ing in settings into the ts.flags field. To avoid flags (and other fields) from containing garbage, initialize the structure to zero before use. Addresses-Coverity: ("Uninitialized scalar variable)" Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit 5815719dd2714a369448159a562f6fdf75ffe87b Author: Bhagavathi Perumal S Date: Tue Dec 17 17:49:17 2019 +0100 ath11k: set TxBf parameters after vdev start The channel info parameters are required by the firmware to process TxBf parameters. Currently TxBf is passed prior to the channel info. This patch moves TxBf setup after the channel setup. Signed-off-by: John Crispin Signed-off-by: Bhagavathi Perumal S Signed-off-by: Kalle Valo commit 14a1d2468ab370c8f02d341b1551bc742a8975d3 Merge: 4d8773b68e83 18a8d3586310 Author: David S. Miller Date: Sun Jan 26 11:38:10 2020 +0100 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2020-01-25 This series contains updates to the ice driver to add support for RSS. Henry and Tony enable the driver to write the filtering hardware tables to allow for changing of RSS rules, also introduced and initialized the structures for storing the configuration. Then followed it up by creating an extraction sequence based on the packet header protocols to be programmed. Next was storing the TCAM entry with the profile data and VSI group in the respective software structures. Md Fahad sets up the configuration to support RSS tables for the virtual function (VF) driver (iavf). Add support for flow types TCP4, TCP6, UDP4, UDP6, SCTP4 and SCTP6 for RSS via ethtool. ==================== Signed-off-by: David S. Miller commit 1e93a78113b4eaf009b3c994595db44356544b05 Author: Anilkumar Kolli Date: Tue Dec 17 17:21:40 2019 +0100 ath11k: enable HE tlvs in ppdu stats for pktlog lite This patch enables HE tlvs in ppdu stats for pktlog lite mode. Signed-off-by: John Crispin Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit a45ceea5015d5be4bab4f6ce59cffcbeceba7e6c Author: Arnd Bergmann Date: Tue Jan 7 22:50:04 2020 +0100 ath11k: fix debugfs build failure When CONFIG_ATH11K_DEBUGFS is disabled, but CONFIG_MAC80211_DEBUGFS is turned on, the driver fails to build: drivers/net/wireless/ath/ath11k/debugfs_sta.c: In function 'ath11k_dbg_sta_open_htt_peer_stats': drivers/net/wireless/ath/ath11k/debugfs_sta.c:416:4: error: 'struct ath11k' has no member named 'debug' ar->debug.htt_stats.stats_req = stats_req; ^~ It appears that just using the former symbol is sufficient here, adding a Kconfig dependency takes care of the corner cases. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo commit ab000ea6a3939972b6eaca78046c4cd7d3aeee22 Author: Govind Singh Date: Fri Jan 3 19:14:14 2020 +0530 ath10k: Don't call SCM interface for statically mapped msa region For some targets ex: QCS404, SCM permissions for MSA region is statically configured in TrustZone fw. Add SCM call disable option for such targets to avoid duplicate permissions. Testing: Tested on WCN3990 HW Tested FW: WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1 Signed-off-by: Govind Singh Signed-off-by: Kalle Valo commit 6ca71a10aee8d5613446a180f85aa5efbb370b10 Author: Govind Singh Date: Fri Jan 3 19:14:13 2020 +0530 dt: bindings: add dt entry flag to skip SCM call for msa region Add boolean context flag to disable SCM call for statically mapped msa region. Signed-off-by: Govind Singh Acked-by: Rob Herring Signed-off-by: Kalle Valo commit a1769bb68a850508a492e3674ab1e5e479b11254 Author: Zhi Chen Date: Tue Jan 14 12:35:21 2020 +0800 Revert "ath10k: fix DMA related firmware crashes on multiple devices" This reverts commit 76d164f582150fd0259ec0fcbc485470bcd8033e. PCIe hung issue was observed on multiple platforms. The issue was reproduced when DUT was configured as AP and associated with 50+ STAs. For QCA9984/QCA9888, the DMA_BURST_SIZE register controls the AXI burst size of the RD/WR access to the HOST MEM. 0 - No split , RAW read/write transfer size from MAC is put out on bus as burst length 1 - Split at 256 byte boundary 2,3 - Reserved With PCIe protocol analyzer, we can see DMA Read crossing 4KB boundary when issue happened. It broke PCIe spec and caused PCIe stuck. So revert the default value from 0 to 1. Tested: IPQ8064 + QCA9984 with firmware 10.4-3.10-00047 QCS404 + QCA9984 with firmware 10.4-3.9.0.2--00044 Synaptics AS370 + QCA9888 with firmware 10.4-3.9.0.2--00040 Signed-off-by: Zhi Chen Signed-off-by: Kalle Valo commit 218f646d235a84d716c603100a6aa5447bc3c9a2 Author: Wen Gong Date: Tue Dec 31 17:27:06 2019 +0800 ath10k: drop RX skb with invalid length for sdio When simulate random transfer fail for sdio write and read, it crash sometimes. Test steps: 1. Add config and update kernel: CONFIG_FAIL_MMC_REQUEST=y CONFIG_FAULT_INJECTION=y CONFIG_FAULT_INJECTION_DEBUG_FS=y 2. run simulate fail: cd /sys/kernel/debug/mmc1/fail_mmc_request echo 10 > probability echo 10 > times # repeat until hitting issues 3. it crash, the act len of ath10k_htc_hdr is higher than allocate len, it cause panic: [ 99.723482] skbuff: skb_over_panic: text:00000000caa0f780 len:57013 put:57013 head:000000004116f24a data:0000000019ecb4dc tail:0xdef5 end:0x640 dev: [ 99.737697] ------------[ cut here ]------------ [ 99.742327] kernel BUG at /mnt/host/source/src/third_party/kernel/v4.19/net/core/skbuff.c:104! [ 99.750937] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [ 99.831154] Process kworker/0:2 (pid: 151, stack limit = 0x00000000728010bf) [ 99.838200] CPU: 0 PID: 151 Comm: kworker/0:2 Tainted: G W 4.19.85 #48 [ 99.846022] Hardware name: MediaTek krane sku0 board (DT) [ 99.851429] Workqueue: events sdio_irq_work [ 99.855614] pstate: 60000005 (nZCv daif -PAN -UAO) [ 99.860402] pc : skb_panic+0x64/0x68 [ 99.863974] lr : skb_panic+0x64/0x68 [ 99.867542] sp : ffffff8008833a90 [ 99.870850] x29: ffffff8008833ac0 x28: ffffffe52e337370 [ 99.876159] x27: ffffffe52e328a90 x26: 000000000000e0d0 [ 99.881469] x25: ffffffe52e336b60 x24: 000000000000deb5 [ 99.886779] x23: ffffffe52e340680 x22: ffffffe4efd47e00 [ 99.892088] x21: 000000000000deb5 x20: ffffffa516d85b4c [ 99.897397] x19: ffffffa526928037 x18: 0000000000000000 [ 99.902706] x17: 000000000000003c x16: ffffffa5265b6c80 [ 99.908015] x15: 0000000000000006 x14: 3a76656420303436 [ 99.913325] x13: 0000000000029bf0 x12: 0000000000000000 [ 99.918634] x11: 0000000000000000 x10: 0000000000000000 [ 99.923943] x9 : a3b907e4b2783000 x8 : a3b907e4b2783000 [ 99.929253] x7 : 0000000000000000 x6 : ffffffa526f66d76 [ 99.934563] x5 : 0000000000000000 x4 : 0000000000000000 [ 99.939872] x3 : 000000000002a5ab x2 : ffffffe53feed918 [ 99.945182] x1 : ffffffe53fee4a08 x0 : 000000000000008e [ 99.950491] Call trace: [ 99.952937] skb_panic+0x64/0x68 [ 99.956165] skb_put+0x7c/0x84 [ 99.959224] ath10k_sdio_irq_handler+0x740/0xbb8 [ath10k_sdio] [ 99.965055] process_sdio_pending_irqs+0x58/0x1a4 [ 99.969758] sdio_run_irqs+0x34/0x60 [ 99.973329] sdio_irq_work+0x1c/0x28 [ 99.974930] cros-ec-spi spi2.0: SPI transfer timed out [ 99.976904] process_one_work+0x210/0x410 [ 99.976911] worker_thread+0x234/0x3dc [ 99.976923] kthread+0x120/0x130 [ 99.982090] cros-ec-spi spi2.0: spi transfer failed: -110 [ 99.986054] ret_from_fork+0x10/0x18 [ 99.986063] Code: aa1403e2 2a1503e4 a90023e9 97e37d1a (d4210000) [ 99.986068] ---[ end trace cb6d948c5a0fd6c7 ]--- [ 100.017250] Kernel panic - not syncing: Fatal exception [ 100.018879] cros-ec-spi spi2.0: Command xfer error (err:-110) [ 100.023659] SMP: stopping secondary CPUs [ 100.023703] Kernel Offset: 0x251dc00000 from 0xffffff8008000000 [ 100.023707] CPU features: 0x0,2188200c [ 100.023709] Memory Limit: none The simulate fail of sdio is not a real sdio transter fail, it only set an error status in mmc_should_fail_request after the transfer end, actually the transfer is success, then sdio_io_rw_ext_helper will return error status and stop transfer the left data. For example, the really RX len is 286 bytes, then it will split to 2 blocks in sdio_io_rw_ext_helper, one is 256 bytes, left is 30 bytes, if the first 256 bytes get an error status by mmc_should_fail_request,then the left 30 bytes will not read in this RX operation. Then when the next RX arrive, the left 30 bytes will be considered as the header of the read, the top 8 bytes will be considered as ath10k_htc_hdr, but actually the 8 bytes is not the ath10k_htc_hdr, so the act_len from this ath10k_htc_hdr is not correct, if it is a big value, such as 57013, it will trigger skb_panic. Drop the skb with invalid length will be reasonable. This patch only effect sdio chips. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00029. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 0f7ab288ade970b7754d89b594e872ea40af8f66 Author: zhengbin Date: Tue Dec 24 22:16:04 2019 +0800 ath10k: use true,false for bool variable Fixes coccicheck warning: drivers/net/wireless/ath/ath10k/htt_rx.c:2143:2-31: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit 57a3b60ddbfa87e8707c453c69915a3c5d2c9e50 Author: Bjorn Andersson Date: Sun Dec 22 21:48:54 2019 -0800 ath10k: Add optional qdss clk The WiFi firmware found on sm8150 requires that the QDSS clock is ticking in order to operate, so add an optional clock to the binding to allow this to be specified in the sm8150 dts and add the clock to the list of clocks in the driver. Signed-off-by: Bjorn Andersson Acked-by: Rob Herring Signed-off-by: Kalle Valo commit 63ec5cbc31f7c37870b7fbd33d9f1a50ba320221 Author: Bryan O'Donoghue Date: Thu Dec 19 13:15:39 2019 +0000 ath10k: pci: Fix comment on ath10k_pci_dump_memory_sram The description of ath10k_pci_dump_memory_sram() is inaccurate, an error can never be returned, it is always the length. Update the comment to reflect. Fixes: 219cc084c6706 ("ath10k: add memory dump support QCA9984") Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo commit d239380196c4e27a26fa4bea73d2bf994c14ec2d Author: Bryan O'Donoghue Date: Thu Dec 19 13:15:38 2019 +0000 ath10k: pci: Only dump ATH10K_MEM_REGION_TYPE_IOREG when safe ath10k_pci_dump_memory_reg() will try to access memory of type ATH10K_MEM_REGION_TYPE_IOREG however, if a hardware restart is in progress this can crash a system. Individual ioread32() time has been observed to jump from 15-20 ticks to > 80k ticks followed by a secure-watchdog bite and a system reset. Work around this corner case by only issuing the read transaction when the driver state is ATH10K_STATE_ON. Tested-on: QCA9988 PCI 10.4-3.9.0.2-00044 Fixes: 219cc084c6706 ("ath10k: add memory dump support QCA9984") Signed-off-by: Bryan O'Donoghue Signed-off-by: Kalle Valo commit f89ee9927a49d805ae355c6d88a22e11a7ec083a Author: zhengbin Date: Tue Dec 24 22:16:05 2019 +0800 wil6210: use true,false for bool variable Fixes coccicheck warning: drivers/net/wireless/ath/wil6210/main.c:765:1-14: WARNING: Assignment of 0/1 to bool variable drivers/net/wireless/ath/wil6210/txrx.c:1143:1-19: WARNING: Assignment of 0/1 to bool variable drivers/net/wireless/ath/wil6210/wmi.c:1516:4-23: WARNING: Assignment of 0/1 to bool variable drivers/net/wireless/ath/wil6210/wmi.c:1523:4-23: WARNING: Assignment of 0/1 to bool variable drivers/net/wireless/ath/wil6210/wmi.c:1538:4-30: WARNING: Assignment of 0/1 to bool variable drivers/net/wireless/ath/wil6210/wmi.c:1545:4-30: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit d27c768f3b617a5a94844e58b18f773d2e40f41c Author: zhengbin Date: Tue Dec 24 22:16:03 2019 +0800 ath9k: use true,false for bool variable Fixes coccicheck warning: drivers/net/wireless/ath/ath9k/ar9003_aic.c:409:2-12: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit fafa7424ba7d091da274f661bd41772ce69cd1e1 Merge: e07c5f2e4e91 0b295a1eb81f Author: Kalle Valo Date: Sun Jan 26 12:10:02 2020 +0200 Merge tag 'iwlwifi-next-for-kalle-2020-01-11' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next First set of patches intended for v5.6 * Support new versions of the FTM FW APIs; * Fix an old bug in D3 (WoWLAN); * A couple of fixes/improvements in the receive-buffers code; * Fix in the debugging where we were skipping one TXQ; * Support new version of the beacon template FW API; * Print some extra information when the driver is loaded; * Some debugging infrastructure (aka. yoyo) updates; * Support for a new HW version; * Second phase of device configuration work started; * Some clean-ups; commit 913292c97d750fe4188b4f5aa770e5e0ca1e5a91 Author: Madhuparna Bhowmik Date: Fri Jan 24 10:29:08 2020 +0530 sched.h: Annotate sighand_struct with __rcu This patch fixes the following sparse errors by annotating the sighand_struct with __rcu kernel/fork.c:1511:9: error: incompatible types in comparison expression kernel/exit.c:100:19: error: incompatible types in comparison expression kernel/signal.c:1370:27: error: incompatible types in comparison expression This fix introduces the following sparse error in signal.c due to checking the sighand pointer without rcu primitives: kernel/signal.c:1386:21: error: incompatible types in comparison expression This new sparse error is also fixed in this patch. Signed-off-by: Madhuparna Bhowmik Acked-by: Paul E. McKenney Link: https://lore.kernel.org/r/20200124045908.26389-1-madhuparnabhowmik10@gmail.com Signed-off-by: Christian Brauner commit 4d8773b68e83558025303f266070b31bc4101e73 Merge: 3333e50b64fe 2821e26f3a0a Author: David S. Miller Date: Sun Jan 26 10:40:21 2020 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Minor conflict in mlx5 because changes happened to code that has moved meanwhile. Signed-off-by: David S. Miller commit 11eb85ec42dc8c7a7ec519b90ccf2eeae9409de8 Author: Dan Carpenter Date: Wed Jan 15 20:49:04 2020 +0300 Bluetooth: Fix race condition in hci_release_sock() Syzbot managed to trigger a use after free "KASAN: use-after-free Write in hci_sock_bind". I have reviewed the code manually and one possibly cause I have found is that we are not holding lock_sock(sk) when we do the hci_dev_put(hdev) in hci_sock_release(). My theory is that the bind and the release are racing against each other which results in this use after free. Reported-by: syzbot+eba992608adf3d796bcc@syzkaller.appspotmail.com Signed-off-by: Dan Carpenter Signed-off-by: Johan Hedberg commit 9b132f2764e5a04bfb2e6c6f51cf5a729617d6a4 Merge: 5396c4bd9fd8 b81cbf7abfc9 Author: Takashi Iwai Date: Sun Jan 26 09:31:34 2020 +0100 Merge branch 'for-linus' into for-next Resolve conflicts and correct the hex numbers, too. Signed-off-by: Takashi Iwai commit b81cbf7abfc94878a3c6f0789f2185ee55b1cc21 Author: Nicola Lunghi Date: Sat Jan 25 15:09:17 2020 +0000 ALSA: usb-audio: add quirks for Line6 Helix devices fw>=2.82 With firmware 2.82 Line6 changed the usb id of some of the Helix devices but the quirks is still needed. Add it to the quirk list for line6 helix family of devices. Thanks to Jens for pointing out the missing ids. Signed-off-by: Nicola Lunghi Link: https://lore.kernel.org/r/20200125150917.5040-1-nick83ola@gmail.com Signed-off-by: Takashi Iwai commit d8feb6080bb0c9f4d799a423d9453048fdd06990 Author: Hans de Goede Date: Sat Jan 25 19:10:21 2020 +0100 ALSA: hda: Add Clevo W65_67SB the power_save blacklist Using HDA power-saving on the Clevo W65_67SB causes the first 0.5 seconds of audio to be missing every time audio starts playing. This commit adds the Clevo W65_67SB the power_save blacklist to avoid this issue. Cc: stable@vger.kernel.org BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1525104 Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200125181021.70446-1-hdegoede@redhat.com Signed-off-by: Takashi Iwai commit 18a8d3586310743d451c94db46319797e72727da Author: Tony Nguyen Date: Fri Jan 17 07:39:19 2020 -0800 ice: Bump version Bump version to 0.8.2-k Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 6876fb6404a50d764cc1409870207b62f6e21dff Author: Md Fahad Iqbal Polash Date: Fri Jan 17 07:39:18 2020 -0800 ice: Implement ethtool get/set rx-flow-hash Provide support to change or retrieve RSS hash options for a flow type. The supported flow-types are: tcp4, tcp6, udp4, udp6, sctp4, sctp6. Signed-off-by: Md Fahad Iqbal Polash Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 1c01c8c6c969a9da1b0783c2b4138debc4d868c2 Author: Md Fahad Iqbal Polash Date: Fri Jan 17 07:39:17 2020 -0800 ice: Initilialize VF RSS tables Set configuration for hardware RSS tables for VFs. Signed-off-by: Md Fahad Iqbal Polash Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 2c61054c5fdaf3df267c4fa95c8cfc33f7665615 Author: Tony Nguyen Date: Fri Jan 17 07:39:16 2020 -0800 ice: Optimize table usage Attempt to optimize TCAM entries and reduce table resource usage by searching for profiles that can be reused. Provide resource cleanup of both hardware and software structures. Signed-off-by: Tony Nguyen Signed-off-by: Henry Tieman Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 43dbfc7bb8f0bd79a98f3fd628266a853d4bae61 Author: Tony Nguyen Date: Fri Jan 17 07:39:15 2020 -0800 ice: Enable writing filtering tables Write the hardware tables based on the populated software structures. Signed-off-by: Tony Nguyen Signed-off-by: Henry Tieman Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 451f2c4406e035295169a3abe127e377af694398 Author: Tony Nguyen Date: Fri Jan 17 07:39:14 2020 -0800 ice: Populate TCAM filter software structures Store the TCAM entry with the profile data and the VSI group in the respective SW structures. This will be subsequently used to write out the tables to hardware. Signed-off-by: Tony Nguyen Signed-off-by: Henry Tieman Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 0282c72d30d32913d641dc81f3f38607ace98802 Merge: 81563bed1e11 1e4d149e9017 Author: Linus Walleij Date: Sun Jan 26 01:01:55 2020 +0100 Merge tag 'gpio-updates-for-v5.6-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel gpio: updates for v5.6 - use platform_get_irq_optional() in gpio-altera commit ddc9d357b991838c2d975e8d7e4e9db26f37a7ff Author: Dexuan Cui Date: Sun Jan 19 15:29:22 2020 -0800 Drivers: hv: vmbus: Ignore CHANNELMSG_TL_CONNECT_RESULT(23) When a Linux hv_sock app tries to connect to a Service GUID on which no host app is listening, a recent host (RS3+) sends a CHANNELMSG_TL_CONNECT_RESULT (23) message to Linux and this triggers such a warning: unknown msgtype=23 WARNING: CPU: 2 PID: 0 at drivers/hv/vmbus_drv.c:1031 vmbus_on_msg_dpc Actually Linux can safely ignore the message because the Linux app's connect() will time out in 2 seconds: see VSOCK_DEFAULT_CONNECT_TIMEOUT and vsock_stream_connect(). We don't bother to make use of the message because: 1) it's only supported on recent hosts; 2) a non-trivial effort is required to use the message in Linux, but the benefit is small. So, let's not see the warning by silently ignoring the message. Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit 382a46221757250966621f046e91d8c05adac12b Author: Dexuan Cui Date: Mon Jan 6 14:41:51 2020 -0800 video: hyperv_fb: Fix hibernation for the deferred IO feature fb_deferred_io_work() can access the vmbus ringbuffer by calling fbdefio->deferred_io() -> synthvid_deferred_io() -> synthvid_update(). Because the vmbus ringbuffer is inaccessible between hvfb_suspend() and hvfb_resume(), we must cancel info->deferred_work before calling vmbus_close() and then reschedule it after we reopen the channel in hvfb_resume(). Fixes: a4ddb11d297e ("video: hyperv: hyperv_fb: Support deferred IO for Hyper-V frame buffer driver") Fixes: 824946a8b6fb ("video: hyperv_fb: Add the support of hibernation") Signed-off-by: Dexuan Cui Reviewed-by: Wei Hu Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Sasha Levin commit e2379b30324ca5ba808f16cb3d2504349264912f Author: Dexuan Cui Date: Mon Jan 6 14:40:44 2020 -0800 Input: hyperv-keyboard: Add the support of hibernation Add suspend() and resume() functions so the Hyper-V virtual keyboard can participate in VM hibernation. Note that the keyboard is a "wakeup" device that could abort an in-progress hibernation if there is keyboard event. No attempt is made to suppress this behavior. If desired, a sysadmin can disable the keyboard as a wakeup device using standard mechanisms such as: echo disabled > /sys/bus/vmbus/drivers/hyperv_keyboard/XXX/power/wakeup (where XXX is the device's GUID) Reviewed-by: Michael Kelley Signed-off-by: Dexuan Cui Signed-off-by: Sasha Levin commit d33c240d47dab4fd15123d9e73fc8810cbc6ed6a Author: Tianyu Lan Date: Sat Jan 25 16:50:47 2020 -0500 hv_balloon: Balloon up according to request page number Current code has assumption that balloon request memory size aligns with 2MB. But actually Hyper-V doesn't guarantee such alignment. When balloon driver receives non-aligned balloon request, it produces warning and balloon up more memory than requested in order to keep 2MB alignment. Remove the warning and balloon up memory according to actual requested memory size. Fixes: f6712238471a ("hv: hv_balloon: avoid memory leak on alloc_error of 2MB memory block") Cc: stable@vger.kernel.org Reviewed-by: Vitaly Kuznetsov Signed-off-by: Tianyu Lan Reviewed-by: Michael Kelley Signed-off-by: Sasha Levin commit 19d52e94e08391cd05cee227bcc1360a8fb29369 Merge: 955d8f3ecb9d 2256e6f68c9e Author: Olof Johansson Date: Sat Jan 25 13:28:41 2020 -0800 Merge tag 'omap-for-v5.6/dt-late-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/late Late omap dts changes for v5.6 merge window This series of changes mostly configures the cameras for dra7 and am437x that have been pending for few months now because of waiting for clock dependencies to clear. So these changes are based on earlier dts changes with with Tero Kristo's for-5.6-ti-clk branch merged in. Then there's a series of changes to configure powervr sgx target module for am335x, am437x and dra7 that have been waiting to have the rstctrl reset driver dependencies to clear. Also included are few minor patches to configure 1-wire and coulomb counter calibration interrupt for droid4. * tag 'omap-for-v5.6/dt-late-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (25 commits) ARM: dts: omap4-droid4: Enable hdq for droid4 ds250x 1-wire battery nvmem ARM: dts: motorola-cpcap-mapphone: Configure calibration interrupt ARM: dts: Configure interconnect target module for am437x sgx ARM: dts: Configure sgx for dra7 ARM: dts: Configure rstctrl reset for am335x SGX ARM: dts: dra7: Add ti-sysc node for VPE ARM: dts: dra7: add vpe clkctrl node ARM: dts: am43x-epos-evm: Add VPFE and OV2659 entries ARM: dts: am437x-sk-evm: Add VPFE and OV2659 entries ARM: dts: am43xx: add support for clkout1 clock arm: dts: dra76-evm: Add CAL and OV5640 nodes arm: dtsi: dra76x: Add CAL dtsi node arm: dts: dra72-evm-common: Add entries for the CSI2 cameras ARM: dts: DRA72: Add CAL dtsi node ARM: dts: dra7-l4: Add ti-sysc node for CAM ARM: OMAP: DRA7xx: Make CAM clock domain SWSUP only ARM: dts: dra7: add cam clkctrl node ARM: dts: Add omap3-echo ARM: dts: Add dtsi files for AM3703, AM3715 and DM3725 ARM: dts: am335x-icev2: Add support for OSD9616P0899-10 at i2c0 ... Link: https://lore.kernel.org/r/pull-1579896427-50330@atomide.com-3 Signed-off-by: Olof Johansson commit 955d8f3ecb9d5d50f9729dd0dfd6164cd726d4bb Merge: d1eef1c61974 885d21e4956d Author: Olof Johansson Date: Sat Jan 25 13:28:04 2020 -0800 Merge tag 'omap-for-v5.6/ti-sysc-drop-pdata-crypto-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/late Late changes for omap secure accelerators for v5.6 merge window A series of changes to configure secure accelerators for omap4 & 5 to finally get hardware random number generator working. Apologies on a late pull request on these changes, but this pull request could not be sent out earlier because of a dependency to recent clock changes. This is based on earlier changes to drop omap legacy platform data with Tero Kristo's for-5.6-ti-clk branch merged in. * tag 'omap-for-v5.6/ti-sysc-drop-pdata-crypto-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (98 commits) ARM: OMAP2+: Drop legacy platform data for omap4 des ARM: OMAP2+: Drop legacy platform data for omap4 sham ARM: OMAP2+: Drop legacy platform data for omap4 aes ARM: dts: Configure interconnect target module for omap4 des ARM: dts: Configure interconnect target module for omap4 aes ARM: dts: Configure interconnect target module for omap4 sham ARM: dts: Configure omap5 rng to probe with ti-sysc ARM: dts: Configure omap4 rng to probe with ti-sysc ARM: dts: Add missing omap5 secure clocks ARM: dts: Add missing omap4 secure clocks clk: ti: clkctrl: Fix hidden dependency to node name clk: ti: add clkctrl data dra7 sgx clk: ti: omap5: Add missing AESS clock clk: ti: dra7: fix parent for gmac_clkctrl clk: ti: dra7: add vpe clkctrl data clk: ti: dra7: add cam clkctrl data dt-bindings: clock: Move ti-dra7-atl.h to dt-bindings/clock dmaengine: ti: omap-dma: don't allow a null od->plat pointer to be dereferenced ARM: OMAP2+: Drop legacy platform data for sdma ARM: OMAP2+: Drop legacy init for sdma ... Link: https://lore.kernel.org/r/pull-1579896427-50330@atomide.com-2 Signed-off-by: Olof Johansson commit d8430df172118336d050aa61999fb82e55102641 Merge: a9eeb0e61128 c37baa06f8a9 Author: Olof Johansson Date: Sat Jan 25 13:25:41 2020 -0800 Merge tag 'omap-for-v5.6/soc-build-fix-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc Randconfig build fix for recent SoC changes for v5.6 We can get build failures if let's say if only am335x SoC is selected. Let's fix this by always building secure-common. * tag 'omap-for-v5.6/soc-build-fix-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Fix undefined reference to omap_secure_init Link: https://lore.kernel.org/r/pull-1579896427-50330@atomide.com Signed-off-by: Olof Johansson commit 604c521259c8051b7607c000eda7938f7a705d92 Author: Andy Shevchenko Date: Thu Jan 23 15:14:37 2020 +0200 rtc: cmos: Refactor code by using the new dmi_get_bios_year() helper Refactor code by using the new dmi_get_bios_year() helper instead of open coding its functionality. This also makes logic slightly clearer. No changes intended. Cc: Hans de Goede Signed-off-by: Andy Shevchenko Tested-by: Guilherme G. Piccoli Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20200123131437.28157-3-andriy.shevchenko@linux.intel.com Signed-off-by: Alexandre Belloni commit 5848ad2f1bcbb1bfbf3db3ee1a51fa5d0994ead6 Author: Andy Shevchenko Date: Thu Jan 23 15:14:36 2020 +0200 rtc: cmos: Use predefined value for RTC IRQ on legacy x86 When legacy devices are present on x86 machine, the RTC IRQ has a dedicated pre-defined value. Use it instead of hard coded number. Cc: Hans de Goede Signed-off-by: Andy Shevchenko Tested-by: Guilherme G. Piccoli Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20200123131437.28157-2-andriy.shevchenko@linux.intel.com Signed-off-by: Alexandre Belloni commit b6da197a2e9670df6f07e6698629e9ce95ab614e Author: Andy Shevchenko Date: Thu Jan 23 15:14:35 2020 +0200 rtc: cmos: Stop using shared IRQ As reported by Guilherme G. Piccoli: ---8<---8<---8<--- The rtc-cmos interrupt setting was changed in the commit 079062b28fb4 ("rtc: cmos: prevent kernel warning on IRQ flags mismatch") in order to allow shared interrupts; according to that commit's description, some machine got kernel warnings due to the interrupt line being shared between rtc-cmos and other hardware, and rtc-cmos didn't allow IRQ sharing that time. After the aforementioned commit though it was observed a huge increase in lost HPET interrupts in some systems, observed through the following kernel message: [...] hpet1: lost 35 rtc interrupts After investigation, it was narrowed down to the shared interrupts usage when having the kernel option "irqpoll" enabled. In this case, all IRQ handlers are called for non-timer interrupts, if such handlers are setup in shared IRQ lines. The rtc-cmos IRQ handler could be set to hpet_rtc_interrupt(), which will produce the kernel "lost interrupts" message after doing work - lots of readl/writel to HPET registers, which are known to be slow. Although "irqpoll" is not a default kernel option, it's used in some contexts, one being the kdump kernel (which is an already "impaired" kernel usually running with 1 CPU available), so the performance burden could be considerable. Also, the same issue would happen (in a shorter extent though) when using "irqfixup" kernel option. In a quick experiment, a virtual machine with uptime of 2 minutes produced >300 calls to hpet_rtc_interrupt() when "irqpoll" was set, whereas without sharing interrupts this number reduced to 1 interrupt. Machines with more hardware than a VM should generate even more unnecessary HPET interrupts in this scenario. ---8<---8<---8<--- After looking into the rtc-cmos driver history and DSDT table from the Microsoft Surface 3, we may notice that Hans de Goede submitted a correct fix (see dependency below). Thus, we simply revert the culprit commit. Fixes: 079062b28fb4 ("rtc: cmos: prevent kernel warning on IRQ flags mismatch") Depends-on: a1e23a42f1bd ("rtc: cmos: Do not assume irq 8 for rtc when there are no legacy irqs") Reported-by: Guilherme G. Piccoli Cc: Hans de Goede Signed-off-by: Andy Shevchenko Tested-by: Guilherme G. Piccoli Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20200123131437.28157-1-andriy.shevchenko@linux.intel.com Signed-off-by: Alexandre Belloni commit 4c4ab451ae367031884629c854eba1716d7e410f Author: Dmitry Osipenko Date: Mon Jan 6 04:56:15 2020 +0300 rtc: tps6586x: Use IRQ_NOAUTOEN flag The IRQ_NOAUTOEN flag tells interrupt core that interrupt shall not be auto-enabled at the time of requesting interrupt. This is a minor clean-up change that doesn't fix any problems. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106015615.12602-1-digetx@gmail.com Signed-off-by: Alexandre Belloni commit 59d8cc6b2e375ff486b030da6703b1d481e186e6 Author: Paul E. McKenney Date: Sat Jan 25 12:00:40 2020 -0800 rcu: Forgive slow expedited grace periods at boot time Boot-time processing often loops in the kernel longer than one might prefer, which can prevent expedited grace periods from completing in a timely manner. This in turn triggers a splat In nohz_full CPUs One could argue that long-looping code should be fixed, but on the other hand, boot time is a bit special. This commit therefore removes the splat. Later commits will add the splat back in, but in a way that removes false positives. Reported-by: Borislav Petkov Signed-off-by: Paul E. McKenney commit 7f04c71f1fc2618f2aeb2d41c65e3b01ee20b3d5 Author: Dillon Brock Date: Sat Jan 18 11:25:42 2020 -0500 IB/opa_vnic: Spelling correction of 'erorr' to 'error' Correcting a minor spelling mistake in the comments. Link: https://lore.kernel.org/r/20200118162542.15188-1-dab9861@gmail.com Signed-off-by: Dillon Brock Acked-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 79ba4f9310673a8870fda5a062a558923fa65c93 Author: Nathan Chancellor Date: Thu Jan 16 15:26:58 2020 -0700 IB/hfi1: Fix logical condition in msix_request_irq Clang warns: drivers/infiniband/hw/hfi1/msix.c:136:22: warning: overlapping comparisons always evaluate to false [-Wtautological-overlap-compare] if (type < IRQ_SDMA && type >= IRQ_OTHER) ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ 1 warning generated. It is impossible for something to be less than 0 (IRQ_SDMA) and greater than or equal to 3 (IRQ_OTHER) at the same time. A logical OR should have been used to keep the same logic as before. Link: https://lore.kernel.org/r/20200116222658.5285-1-natechancellor@gmail.com Link: https://github.com/ClangBuiltLinux/linux/issues/841 Fixes: 13d2a8384bd9 ("IB/hfi1: Decouple IRQ name from type") Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Acked-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 13e0af1801f2e74639b4eadb69ed1fad2cf802f7 Author: Jason Gunthorpe Date: Thu Jan 16 13:00:37 2020 -0400 RDMA/cm: Remove CM message structs All accesses now use the new IBA acessor scheme, so delete the structs entirely and generate the structures from the schema file. Link: https://lore.kernel.org/r/20200116170037.30109-8-jgg@ziepe.ca Tested-by: Leon Romanovsky Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4ca662a30a3c9c8a320549f7ef3066921e36f0b4 Author: Jason Gunthorpe Date: Thu Jan 16 13:00:36 2020 -0400 RDMA/cm: Use IBA functions for complex structure members Use a Coccinelle spatch to replace CM structure members used as structures, arrays, or pointers with IBA_GET/SET versions. Applied with $ spatch --sp-file edits.sp --in-place drivers/infiniband/core/cm.c The spatch file was generated using the template pattern: @@ expression src; expression len; {struct} *msg; @@ - memcpy(msg->{old_name}, src, len) + IBA_SET_MEM({new_name}, msg, src, len) @@ {struct} *msg; identifier x; @@ - msg->{old_name}.x + IBA_GET_MEM_PTR({new_name}, msg)->x @@ {struct} *msg; @@ - &msg->{old_name} + IBA_GET_MEM_PTR({new_name}, msg) For GIDs: @@ {struct} *msg; @@ - msg->{old_name} + *IBA_GET_MEM_PTR({new_name}, msg) For non-GIDs: @@ {struct} *msg; @@ - msg->{old_name} + IBA_GET_MEM_PTR({new_name}, msg) Iterated for every remaining IBA_CHECK_OFF()/IBA_CHECK_GET() pairing. Touched up with clang-format after. Link: https://lore.kernel.org/r/20200116170037.30109-7-jgg@ziepe.ca Tested-by: Leon Romanovsky Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 91b60a7128d96244794beb9b324eb39273872da2 Author: Jason Gunthorpe Date: Thu Jan 16 13:00:35 2020 -0400 RDMA/cm: Use IBA functions for simple structure members Use a Coccinelle spatch script to replace use of simple CM structure members with IBA_GET/SET versions. Applied with $ spatch --sp-file edits.sp --in-place drivers/infiniband/core/cm.c The spatch file was generated using the template pattern: @@ expression val; {struct} *msg; @@ - msg->{old_name} = val + IBA_SET({new_name}, msg, be{bits}_to_cpu(val)) @@ {struct} *msg; @@ - msg->{old_name} + cpu_to_be{bits}(IBA_GET({new_name}, msg)) Iterated for every IBA_CHECK_OFF that isn't a CM_FIELD_MLOC. And the below iterated over all byte sizes to remove doubled byte swaps: @@ expression val; @@ -be{bits}_to_cpu(cpu_to_be{bits}(val)) +val (and __be_to_cpu and ntoh varients) Touched up with clang-format after. Link: https://lore.kernel.org/r/20200116170037.30109-6-jgg@ziepe.ca Tested-by: Leon Romanovsky Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 01adb7f46fe455975d9aec07966e72958bc20f8e Author: Jason Gunthorpe Date: Thu Jan 16 13:00:34 2020 -0400 RDMA/cm: Use IBA functions for swapping get/set acessors Use a Coccinelle spatch script to replace CM helper functions that return/accept BE values with IBA_GET/SET versions. Applied with $ spatch --sp-file edits.sp --in-place drivers/infiniband/core/cm.c The spatch file was generated using the template pattern: @@ expression val; {struct} *msg; @@ - {old_setter}(msg, val) + IBA_SET({new_name}, msg, be{bits}_to_cpu(val)) @@ {struct} *msg; @@ - {old_getter}(msg) + cpu_to_be{bits}(IBA_GET({new_name}, msg)) Iterated for every IBA_CHECK_GET_BE()/IBA_CHECK_SET_BE() pairing. And the below iterated over all byte sizes to remove doubled byte swaps: @@ expression val; @@ -be{bits}_to_cpu(cpu_to_be{bits}(val)) +val (and __be_to_cpu and ntoh varients) Touched up with clang-format after. Link: https://lore.kernel.org/r/20200116170037.30109-5-jgg@ziepe.ca Tested-by: Leon Romanovsky Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b6bbee6889300372e8d84373de0afbd980155f90 Author: Jason Gunthorpe Date: Thu Jan 16 13:00:33 2020 -0400 RDMA/cm: Use IBA functions for simple get/set acessors Use a Coccinelle spatch to replace CM helper functions with IBA_GET/SET versions. Applied with $ spatch --sp-file edits.sp --in-place drivers/infiniband/core/cm.c The spatch file was generated using the template pattern: @@ expression val; {struct} *msg; @@ - {old_setter} + IBA_SET({new_name}, msg, val) @@ {struct} *msg; @@ - {old_getter} + IBA_GET({new_name}, msg) Iterated for every IBA_CHECK_GET()/IBA_CHECK_GET() pairing. Touched up with clang-format after. Link: https://lore.kernel.org/r/20200116170037.30109-4-jgg@ziepe.ca Tested-by: Leon Romanovsky Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d05d4ac4c9316a2e2ea5be434a7f7a021ec44a3c Author: Leon Romanovsky Date: Thu Jan 16 13:00:32 2020 -0400 RDMA/cm: Add SET/GET implementations to hide IBA wire format There is no separation between RDMA-CM wire format as it is declared in IBTA and kernel logic which implements needed support. Such situation causes to many mistakes in conversion between big-endian (wire format) and CPU format used by kernel. It also mixes RDMA core code with combination of uXX and beXX variables. The idea that all accesses to IBA definitions will go through special GET/SET macros to ensure that no conversion mistakes are made. The shifting and masking required to read the value is automatically deduced using the field offset description from the tables in the IBA specification. This starts with the CM MADs described in IBTA release 1.3 volume 1. To confirm that the new macros behave the same as the old accessors a self-test is included in this patch. Each macro replacing a straightforward struct field compile-time tests that the new field has the same offsetof() and width as the old field. For the fields with accessor functions a runtime test, the 'all ones' value is placed in a dummy message and read back in several ways to confirm that both approaches give identical results. Later patches in this series delete the self test. This creates a tested table of new field name, old field name(s) and some meta information like BE coding for the functions which will be used in the next patches. Link: https://lore.kernel.org/r/20200116170037.30109-3-jgg@ziepe.ca Link: https://lore.kernel.org/r/20191212093830.316934-5-leon@kernel.org Signed-off-by: Leon Romanovsky Tested-by: Leon Romanovsky Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 792a7c1f2e74bba878a1836cfbe9611f98576d3b Author: Jason Gunthorpe Date: Thu Jan 16 13:00:31 2020 -0400 RDMA/cm: Add accessors for CM_REQ transport_type Access the two fields through wrappers, like all other fields, to make it clearer what is happening. Link: https://lore.kernel.org/r/20200116170037.30109-2-jgg@ziepe.ca Tested-by: Leon Romanovsky Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4bbd4923d1f5627b0c47a9d7dfb5cc91224cfe0c Author: Danit Goldberg Date: Thu Jan 16 14:00:48 2020 +0200 IB/mlx5: Return the administrative GUID if exists A user can change the operational GUID (a.k.a affective GUID) through link/infiniband. Therefore it is preferred to return the currently set GUID if it exists instead of the operational. This way the PF can query which VF GUID will be set in the next bind. In order to align with MAC address, zero is returned if administrative GUID is not set. For example, before setting administrative GUID: $ ip link show ib0: mtu 4092 qdisc mq state UP mode DEFAULT group default qlen 256 link/infiniband 00:00:00:08:fe:80:00:00:00:00:00:00:52:54:00:c0:fe:12:34:55 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff vf 0 link/infiniband 00:00:00:08:fe:80:00:00:00:00:00:00:52:54:00:c0:fe:12:34:55 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, NODE_GUID 00:00:00:00:00:00:00:00, PORT_GUID 00:00:00:00:00:00:00:00, link-state auto, trust off, query_rss off Then: $ ip link set ib0 vf 0 node_guid 11:00:af:21:cb:05:11:00 $ ip link set ib0 vf 0 port_guid 22:11:af:21:cb:05:11:00 After setting administrative GUID: $ ip link show ib0: mtu 4092 qdisc mq state UP mode DEFAULT group default qlen 256 link/infiniband 00:00:00:08:fe:80:00:00:00:00:00:00:52:54:00:c0:fe:12:34:55 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff vf 0 link/infiniband 00:00:00:08:fe:80:00:00:00:00:00:00:52:54:00:c0:fe:12:34:55 brd 00:ff:ff:ff:ff:12:40:1b:ff:ff:00:00:00:00:00:00:ff:ff:ff:ff, spoof checking off, NODE_GUID 11:00:af:21:cb:05:11:00, PORT_GUID 22:11:af:21:cb:05:11:00, link-state auto, trust off, query_rss off Fixes: 9c0015ef0928 ("IB/mlx5: Implement callbacks for getting VFs GUID attributes") Link: https://lore.kernel.org/r/20200116120048.12744-1-leon@kernel.org Signed-off-by: Danit Goldberg Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6b3712c0246ca7b2b8fa05eab2362cf267410f7e Author: Jason Gunthorpe Date: Wed Jan 15 20:20:44 2020 +0000 RDMA/core: Ensure that rdma_user_mmap_entry_remove() is a fence The set of entry->driver_removed is missing locking, protect it with xa_lock() which is held by the only reader. Otherwise readers may continue to see driver_removed = false after rdma_user_mmap_entry_remove() returns and may continue to try and establish new mmaps. Fixes: 3411f9f01b76 ("RDMA/core: Create mmap database and cookie helper functions") Link: https://lore.kernel.org/r/20200115202041.GA17199@ziepe.ca Reviewed-by: Gal Pressman Acked-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit 03a575a6a1d27e4e8c954ac0e4d2a8f72b12cbfb Author: Vladimir Murzin Date: Mon Jan 20 11:42:23 2020 +0100 ARM: 8954/1: NOMMU: remove stubs for swapops Stubs for swapops are not required after 9b98fa229485 (mm: stub out all of swapops.h for !CONFIG_MMU) Signed-off-by: Vladimir Murzin Signed-off-by: Russell King commit bc420c6ceefbb86cbbc8c00061bd779c17fa6997 Author: Vincenzo Frascino Date: Fri Jan 10 13:39:26 2020 +0100 ARM: 8952/1: Disable kmemleak on XIP kernels Kmemleak relies on specific symbols to register the read only data during init (e.g. __start_ro_after_init). Trying to build an XIP kernel on arm results in the linking error reported below because when this option is selected read only data after init are not allowed since .data is read only (.rodata). arm-linux-gnueabihf-ld: mm/kmemleak.o: in function `kmemleak_init': kmemleak.c:(.init.text+0x148): undefined reference to `__end_ro_after_init' arm-linux-gnueabihf-ld: kmemleak.c:(.init.text+0x14c): undefined reference to `__end_ro_after_init' arm-linux-gnueabihf-ld: kmemleak.c:(.init.text+0x150): undefined reference to `__start_ro_after_init' arm-linux-gnueabihf-ld: kmemleak.c:(.init.text+0x156): undefined reference to `__start_ro_after_init' arm-linux-gnueabihf-ld: kmemleak.c:(.init.text+0x162): undefined reference to `__start_ro_after_init' arm-linux-gnueabihf-ld: kmemleak.c:(.init.text+0x16a): undefined reference to `__start_ro_after_init' linux/Makefile:1078: recipe for target 'vmlinux' failed Fix the issue enabling kmemleak only on non XIP kernels. Signed-off-by: Vincenzo Frascino Signed-off-by: Russell King commit 76950f7162cad51d2200ebd22c620c14af38f718 Author: Vincenzo Frascino Date: Fri Jan 10 13:37:59 2020 +0100 ARM: 8951/1: Fix Kexec compilation issue. To perform the reserve_crashkernel() operation kexec uses SECTION_SIZE to find a memblock in a range. SECTION_SIZE is not defined for nommu systems. Trying to compile kexec in these conditions results in a build error: linux/arch/arm/kernel/setup.c: In function ‘reserve_crashkernel’: linux/arch/arm/kernel/setup.c:1016:25: error: ‘SECTION_SIZE’ undeclared (first use in this function); did you mean ‘SECTIONS_WIDTH’? crash_size, SECTION_SIZE); ^~~~~~~~~~~~ SECTIONS_WIDTH linux/arch/arm/kernel/setup.c:1016:25: note: each undeclared identifier is reported only once for each function it appears in linux/scripts/Makefile.build:265: recipe for target 'arch/arm/kernel/setup.o' failed Make KEXEC depend on MMU to fix the compilation issue. Signed-off-by: Vincenzo Frascino Signed-off-by: Russell King commit 31f3010e60522ede237fb145a63b4af5a41718c2 Author: Olof Johansson Date: Wed Dec 18 01:18:49 2019 +0100 ARM: 8949/1: mm: mark free_memmap as __init As of commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly"), free_memmap() might not always be inlined, and thus is triggering a section warning: WARNING: vmlinux.o(.text.unlikely+0x904): Section mismatch in reference from the function free_memmap() to the function .meminit.text:memblock_free() Mark it as __init, since the faller (free_unused_memmap) already is. Fixes: ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly") Signed-off-by: Olof Johansson Signed-off-by: Russell King commit 40ff1ddb5570284e039e0ff14d7a859a73dc3673 Author: Vincent Whitchurch Date: Mon Dec 16 11:48:28 2019 +0100 ARM: 8948/1: Prevent OOB access in stacktrace The stacktrace code can read beyond the stack size, when it attempts to read pt_regs from exception frames. This can happen on normal, non-corrupt stacks. Since the unwind information in the extable is not correct for function prologues, the unwinding code can return data from the stack which is not actually the caller function address, and if in_entry_text() happens to succeed on this value, we can end up reading data from outside the task's stack when attempting to read pt_regs, since there is no bounds check. Example: [<8010e729>] (unwind_backtrace) from [<8010a9c9>] (show_stack+0x11/0x14) [<8010a9c9>] (show_stack) from [<8057d8d7>] (dump_stack+0x87/0xac) [<8057d8d7>] (dump_stack) from [<8012271d>] (tasklet_action_common.constprop.4+0xa5/0xa8) [<8012271d>] (tasklet_action_common.constprop.4) from [<80102333>] (__do_softirq+0x11b/0x31c) [<80102333>] (__do_softirq) from [<80122485>] (irq_exit+0xad/0xd8) [<80122485>] (irq_exit) from [<8015f3d7>] (__handle_domain_irq+0x47/0x84) [<8015f3d7>] (__handle_domain_irq) from [<8036a523>] (gic_handle_irq+0x43/0x78) [<8036a523>] (gic_handle_irq) from [<80101a49>] (__irq_svc+0x69/0xb4) Exception stack(0xeb491f58 to 0xeb491fa0) 1f40: 7eb14794 00000000 1f60: ffffffff 008dd32c 008dd324 ffffffff 008dd314 0000002a 801011e4 eb490000 1f80: 0000002a 7eb1478c 50c5387d eb491fa8 80101001 8023d09c 40080033 ffffffff [<80101a49>] (__irq_svc) from [<8023d09c>] (do_pipe2+0x0/0xac) [<8023d09c>] (do_pipe2) from [] (0xffffffff) Exception stack(0xeb491fc8 to 0xeb492010) 1fc0: 008dd314 0000002a 00511ad8 008de4c8 7eb14790 7eb1478c 1fe0: 00511e34 7eb14774 004c8557 76f44098 60080030 7eb14794 00000000 00000000 2000: 00000001 00000000 ea846c00 ea847cc0 In this example, the stack limit is 0xeb492000, but 16 bytes outside the stack have been read. Fix it by adding bounds checks. Signed-off-by: Vincent Whitchurch Signed-off-by: Russell King commit 9db78852739e9f4335d1f2350c01a6b5e2998507 Author: Masahiro Yamada Date: Wed Dec 4 05:28:12 2019 +0100 ARM: 8945/1: decompressor: use CONFIG option instead of cc-option The Kconfig stage (arch/Kconfig) has already evaluated whether the compiler supports -fno-stack-protector. You can use CONFIG_CC_HAS_STACKPROTECTOR_NONE instead of invoking the compiler to check the flag here. Signed-off-by: Masahiro Yamada Signed-off-by: Russell King commit cf17a1e3aa1ad33d375d71a1c30356b86b2683ef Author: Ard Biesheuvel Date: Fri Nov 22 13:01:17 2019 +0100 ARM: 8942/1: Revert "8857/1: efi: enable CP15 DMB instructions before cleaning the cache" This reverts commit e17b1af96b2afc38e684aa2f1033387e2ed10029, which is no longer necessary now that the v7 specific routines take care not to issue CP15 barrier instructions before they are enabled in SCTLR. Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King commit 8239fc7755fd3d410920006615abd0c7d653560f Author: Ard Biesheuvel Date: Fri Nov 22 12:59:00 2019 +0100 ARM: 8941/1: decompressor: enable CP15 barrier instructions in v7 cache setup code Commit e17b1af96b2afc38e684aa2f1033387e2ed10029 "ARM: 8857/1: efi: enable CP15 DMB instructions before cleaning the cache" added some explicit handling of the CP15BEN bit in the SCTLR system register, to ensure that CP15 barrier instructions are enabled, even if we enter the decompressor via the EFI stub. However, as it turns out, there are other ways in which we may end up using CP15 barrier instructions without them being enabled. I.e., when the decompressor startup code skips the cache_on() initially, we end up calling cache_clean_flush() with the caches and MMU off, in which case the CP15BEN bit in SCTLR may not be programmed either. And in fact, cache_on() itself issues CP15 barrier instructions before actually enabling them by programming the new SCTLR value (and issuing an ISB) Since these routines are shared between v7 CPUs and older ones that implement the CPUID extension as well, using the ordinary v7 barrier instructions in this code is not possible, and so we should enable the CP15 ones explicitly before issuing them. Note that a v7 ISB is still required between programming the SCTLR register and using the CP15 barrier instructions, and we should take care to branch over it if the CP15BEN bit is already set, given that in that case, the CPU may not support it. Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King commit 4cb760b02419061209b9b4cc2557986a6bf93e73 Author: Richard Henderson Date: Fri Jan 10 14:54:22 2020 +0000 s390x: Mark archrandom.h functions __must_check We must not use the pointer output without validating the success of the random read. Reviewed-by: Harald Freudenberger Reviewed-by: Ard Biesheuvel Signed-off-by: Richard Henderson Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20200110145422.49141-11-broonie@kernel.org Signed-off-by: Theodore Ts'o commit 8dae77ac56fec1e085fca3ecea49abda1b4b73d2 Author: Richard Henderson Date: Fri Jan 10 14:54:21 2020 +0000 powerpc: Mark archrandom.h functions __must_check We must not use the pointer output without validating the success of the random read. Acked-by: Michael Ellerman Reviewed-by: Ard Biesheuvel Signed-off-by: Richard Henderson Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20200110145422.49141-10-broonie@kernel.org Signed-off-by: Theodore Ts'o commit 98dcfce69729f9ce0fb14f96a39bbdba21429597 Author: Richard Henderson Date: Fri Jan 10 14:54:20 2020 +0000 powerpc: Use bool in archrandom.h The generic interface uses bool not int; match that. Reviewed-by: Ard Biesheuvel Signed-off-by: Richard Henderson Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20200110145422.49141-9-broonie@kernel.org Signed-off-by: Theodore Ts'o commit 1640a7b9f48293ef548596bdba4a461a89ceec6e Author: Richard Henderson Date: Fri Jan 10 14:54:19 2020 +0000 x86: Mark archrandom.h functions __must_check We must not use the pointer output without validating the success of the random read. Reviewed-by: Ard Biesheuvel Signed-off-by: Richard Henderson Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20200110145422.49141-8-broonie@kernel.org Signed-off-by: Theodore Ts'o commit 904caa6413c87aacbf7d0682da617c39ca18cf1a Author: Richard Henderson Date: Fri Jan 10 14:54:18 2020 +0000 linux/random.h: Mark CONFIG_ARCH_RANDOM functions __must_check We must not use the pointer output without validating the success of the random read. Reviewed-by: Ard Biesheuvel Signed-off-by: Richard Henderson Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20200110145422.49141-7-broonie@kernel.org Signed-off-by: Theodore Ts'o commit 66f5ae899ada79c0e9a3d8d954f93a72344cd350 Author: Richard Henderson Date: Fri Jan 10 14:54:17 2020 +0000 linux/random.h: Use false with bool Keep the generic fallback versions in sync with the other architecture specific implementations and use the proper name for false. Suggested-by: Ard Biesheuvel Signed-off-by: Richard Henderson Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20200110145422.49141-6-broonie@kernel.org Signed-off-by: Theodore Ts'o commit 647f50d5d9d933b644b29c54f13ac52af1b1774d Author: Richard Henderson Date: Fri Jan 10 14:54:16 2020 +0000 linux/random.h: Remove arch_has_random, arch_has_random_seed The arm64 version of archrandom.h will need to be able to test for support and read the random number without preemption, so a separate query predicate is not practical. Since this part of the generic interface is unused, remove it. Signed-off-by: Richard Henderson Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20200110145422.49141-5-broonie@kernel.org Signed-off-by: Theodore Ts'o commit 5e054c820f59bbb9714d5767f5f476581c309ca8 Author: Richard Henderson Date: Fri Jan 10 14:54:15 2020 +0000 s390: Remove arch_has_random, arch_has_random_seed These symbols are currently part of the generic archrandom.h interface, but are currently unused and can be removed. Signed-off-by: Richard Henderson Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20200110145422.49141-4-broonie@kernel.org Signed-off-by: Theodore Ts'o commit cbac004995a0ce8453bdc555fab579e2bdb842a6 Author: Richard Henderson Date: Fri Jan 10 14:54:14 2020 +0000 powerpc: Remove arch_has_random, arch_has_random_seed These symbols are currently part of the generic archrandom.h interface, but are currently unused and can be removed. Signed-off-by: Richard Henderson Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20200110145422.49141-3-broonie@kernel.org Signed-off-by: Theodore Ts'o commit 5f2ed7f5b99b54389b74e53309677831ac9cb9d7 Author: Richard Henderson Date: Fri Jan 10 14:54:13 2020 +0000 x86: Remove arch_has_random, arch_has_random_seed Use the expansion of these macros directly in arch_get_random_*. These symbols are currently part of the generic archrandom.h interface, but are currently unused and can be removed. Signed-off-by: Richard Henderson Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20200110145422.49141-2-broonie@kernel.org Signed-off-by: Theodore Ts'o commit 587065dcac64e88132803cdb0a7f26bb4a79cf46 Author: Dan Carpenter Date: Fri Jan 24 13:15:37 2020 +0300 fs/adfs: bigdir: Fix an error code in adfs_fplus_read() This code accidentally returns success, but it should return the -EIO error code from adfs_fplus_validate_header(). Acked-by: Russell King Fixes: d79288b4f61b ("fs/adfs: bigdir: calculate and validate directory checkbyte") Signed-off-by: Dan Carpenter Signed-off-by: Al Viro commit 24589e3a20876dc07c62f45c8f8f8266dd39ba38 Author: Steven Rostedt (VMware) Date: Sat Jan 25 10:52:30 2020 -0500 tracing: Use pr_err() instead of WARN() for memory failures As warnings can trigger panics, especially when "panic_on_warn" is set, memory failure warnings can cause panics and fail fuzz testers that are stressing memory. Create a MEM_FAIL() macro to use instead of WARN() in the tracing code (perhaps this should be a kernel wide macro?), and use that for memory failure issues. This should stop failing fuzz tests due to warnings. Link: https://lore.kernel.org/r/CACT4Y+ZP-7np20GVRu3p+eZys9GPtbu+JpfV+HtsufAzvTgJrg@mail.gmail.com Suggested-by: Dmitry Vyukov Signed-off-by: Steven Rostedt (VMware) commit e9f02a8027675e3957d463d7f8422d79fa90f2ba Merge: 35b9211c0a24 d633d57902a5 Author: Alexei Starovoitov Date: Sat Jan 25 07:12:41 2020 -0800 Merge branch 'trampoline-fixes' Jiri Olsa says: ==================== hi, sending 2 fixes to fix kernel support for loading trampoline programs in bcc/bpftrace and allow to unwind through trampoline/dispatcher. Original rfc post [1]. Speedup output of perf bench while running klockstat.py on kprobes vs trampolines: Without: $ perf bench sched messaging -l 50000 ... Total time: 18.571 [sec] With current kprobe tracing: $ perf bench sched messaging -l 50000 ... Total time: 183.395 [sec] With kfunc tracing: $ perf bench sched messaging -l 50000 ... Total time: 39.773 [sec] v4 changes: - rebased on latest bpf-next/master - removed image tree mutex and use trampoline_mutex instead - checking directly for string pointer in patch 1 [Alexei] - skipped helpers patches, as they are no longer needed [Alexei] v3 changes: - added ack from John Fastabend for patch 1 - move out is_bpf_image_address from is_bpf_text_address call [David] v2 changes: - make the unwind work for dispatcher as well - added test for allowed trampolines count - used raw tp pt_regs nest-arrays for trampoline helpers thanks, jirka [1] https://lore.kernel.org/netdev/20191229143740.29143-1-jolsa@kernel.org/ ==================== Signed-off-by: Alexei Starovoitov commit d633d57902a510debd4ec5b7a374a009c8c2d620 Author: Jiri Olsa Date: Thu Jan 23 17:15:08 2020 +0100 selftest/bpf: Add test for allowed trampolines count There's limit of 40 programs tht can be attached to trampoline for one function. Adding test that tries to attach that many plus one extra that needs to fail. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200123161508.915203-4-jolsa@kernel.org commit e9b4e606c2289d6610113253922bb8c9ac7f68b0 Author: Jiri Olsa Date: Thu Jan 23 17:15:07 2020 +0100 bpf: Allow to resolve bpf trampoline and dispatcher in unwind When unwinding the stack we need to identify each address to successfully continue. Adding latch tree to keep trampolines for quick lookup during the unwind. The patch uses first 48 bytes for latch tree node, leaving 4048 bytes from the rest of the page for trampoline or dispatcher generated code. It's still enough not to affect trampoline and dispatcher progs maximum counts. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200123161508.915203-3-jolsa@kernel.org commit 84ad7a7ab69f112c0c4b878c9be91b950a1fb1f8 Author: Jiri Olsa Date: Thu Jan 23 17:15:06 2020 +0100 bpf: Allow BTF ctx access for string pointers When accessing the context we allow access to arguments with scalar type and pointer to struct. But we deny access for pointer to scalar type, which is the case for many functions. Alexei suggested to take conservative approach and allow currently only string pointer access, which is the case for most functions now: Adding check if the pointer is to string type and allow access to it. Suggested-by: Alexei Starovoitov Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200123161508.915203-2-jolsa@kernel.org commit 18f81241b74fb49d576c83fbbab9a0b6e3bb20d4 Author: Marcel Holtmann Date: Sat Jan 25 09:19:51 2020 +0100 Bluetooth: Move {min,max}_key_size debugfs into hci_debugfs_create_le The debugfs entries for {min,max}_key_size are created during SMP registration and thus it might lead to multiple attempts to create the same entries. Avoid this by moving them to the LE controller init section. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit cc974003615afa044fa62c7520ae690091fa684a Author: Marcel Holtmann Date: Sat Jan 25 09:23:47 2020 +0100 Bluetooth: Add missing checks for HCI_ISODATA_PKT packet type The checks for HCI_ISODATA_PKT packet type are required in a few additional locations to allow sending/receiving of this new packet type. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 414f50434aa2463202a5b35e844f4125dd1a7101 Author: Oliver O'Halloran Date: Wed Jan 22 14:11:25 2020 +1100 selftests/eeh: Bump EEH wait time to 60s Some newer cards supported by aacraid can take up to 40s to recover after an EEH event. This causes spurious failures in the basic EEH self-test since the current maximim timeout is only 30s. Fix the immediate issue by bumping the timeout to a default of 60s, and allow the wait time to be specified via an environmental variable (EEH_MAX_WAIT). Reported-by: Steve Best Suggested-by: Douglas Miller Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200122031125.25991-1-oohall@gmail.com commit f1dbc1c5c70d0d4c60b5d467ba941fba167c12f6 Author: Michael Bringmann Date: Wed Jan 15 08:53:59 2020 -0600 powerpc/pseries/lparcfg: Fix display of Maximum Memory Correct overflow problem in calculation and display of Maximum Memory value to syscfg. Signed-off-by: Michael Bringmann [mpe: Only n_lmbs needs casting to unsigned long] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5577aef8-1d5a-ca95-ff0a-9c7b5977e5bf@linux.ibm.com commit 736bcdd3a9fc672af33fb83230ecd0570ec38ec6 Author: Jordan Niethe Date: Fri Dec 6 14:17:22 2019 +1100 powerpc/mm: Remove kvm radix prefetch workaround for Power9 DD2.2 Commit a25bd72badfa ("powerpc/mm/radix: Workaround prefetch issue with KVM") introduced a number of workarounds as coming out of a guest with the mmu enabled would make the cpu would start running in hypervisor state with the PID value from the guest. The cpu will then start prefetching for the hypervisor with that PID value. In Power9 DD2.2 the cpu behaviour was modified to fix this. When accessing Quadrant 0 in hypervisor mode with LPID != 0 prefetching will not be performed. This means that we can get rid of the workarounds for Power9 DD2.2 and later revisions. Add a new cpu feature CPU_FTR_P9_RADIX_PREFETCH_BUG to indicate if the workarounds are needed. Signed-off-by: Jordan Niethe Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191206031722.25781-1-jniethe5@gmail.com commit 5649607a8d0b0e019a4db14aab3de1e16c3a2b4f Author: Vaibhav Jain Date: Wed Jan 22 21:21:40 2020 +0530 powerpc/papr_scm: Fix leaking 'bus_desc.provider_name' in some paths String 'bus_desc.provider_name' allocated inside papr_scm_nvdimm_init() will leaks in case call to nvdimm_bus_register() fails or when papr_scm_remove() is called. This minor patch ensures that 'bus_desc.provider_name' is freed in error path for nvdimm_bus_register() as well as in papr_scm_remove(). Fixes: b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions") Signed-off-by: Vaibhav Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200122155140.120429-1-vaibhav@linux.ibm.com commit 493a55f1e7724dee5e71bc726d5b819292094587 Author: Sukadev Bhattiprolu Date: Wed Jan 22 18:57:18 2020 -0600 powerpc/xmon: Fix compile error in print_insn* functions Fix couple of compile errors I stumbled upon with CONFIG_XMON=y and CONFIG_XMON_DISASSEMBLY=n Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200123010455.GA15080@us.ibm.com commit def0bfdbd6039e96a9eb2baaa4470b079daab0d4 Author: Christophe Leroy Date: Thu Jan 23 17:30:47 2020 +0000 powerpc: use probe_user_read() and probe_user_write() Instead of opencoding, use probe_user_read() to failessly read a user location and probe_user_write() for writing to user. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e041f5eedb23f09ab553be8a91c3de2087147320.1579800517.git.christophe.leroy@c-s.fr commit 1e3531982ee70adf1880715a968d9c3365f321ed Author: Chen Zhou Date: Tue Jan 21 09:31:53 2020 +0800 powerpc/maple: Fix comparing pointer to 0 Fixes coccicheck warning: arch/powerpc/platforms/maple/setup.c:232:15-16: WARNING comparing pointer to 0 Compare pointer-typed values to NULL rather than 0. Signed-off-by: Chen Zhou Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200121013153.9937-1-chenzhou10@huawei.com commit aff8c8242bc638ba57247ae1ec5f272ac3ed3b92 Author: Tyrel Datwyler Date: Mon Jan 20 14:10:02 2020 -0800 powerpc/pseries/vio: Fix iommu_table use-after-free refcount warning Commit e5afdf9dd515 ("powerpc/vfio_spapr_tce: Add reference counting to iommu_table") missed an iommu_table allocation in the pseries vio code. The iommu_table is allocated with kzalloc and as a result the associated kref gets a value of zero. This has the side effect that during a DLPAR remove of the associated virtual IOA the iommu_tce_table_put() triggers a use-after-free underflow warning. Call Trace: [c0000002879e39f0] [c00000000071ecb4] refcount_warn_saturate+0x184/0x190 (unreliable) [c0000002879e3a50] [c0000000000500ac] iommu_tce_table_put+0x9c/0xb0 [c0000002879e3a70] [c0000000000f54e4] vio_dev_release+0x34/0x70 [c0000002879e3aa0] [c00000000087cfa4] device_release+0x54/0xf0 [c0000002879e3b10] [c000000000d64c84] kobject_cleanup+0xa4/0x240 [c0000002879e3b90] [c00000000087d358] put_device+0x28/0x40 [c0000002879e3bb0] [c0000000007a328c] dlpar_remove_slot+0x15c/0x250 [c0000002879e3c50] [c0000000007a348c] remove_slot_store+0xac/0xf0 [c0000002879e3cd0] [c000000000d64220] kobj_attr_store+0x30/0x60 [c0000002879e3cf0] [c0000000004ff13c] sysfs_kf_write+0x6c/0xa0 [c0000002879e3d10] [c0000000004fde4c] kernfs_fop_write+0x18c/0x260 [c0000002879e3d60] [c000000000410f3c] __vfs_write+0x3c/0x70 [c0000002879e3d80] [c000000000415408] vfs_write+0xc8/0x250 [c0000002879e3dd0] [c0000000004157dc] ksys_write+0x7c/0x120 [c0000002879e3e20] [c00000000000b278] system_call+0x5c/0x68 Further, since the refcount was always zero the iommu_tce_table_put() fails to call the iommu_table release function resulting in a leak. Fix this issue be initilizing the iommu_table kref immediately after allocation. Fixes: e5afdf9dd515 ("powerpc/vfio_spapr_tce: Add reference counting to iommu_table") Signed-off-by: Tyrel Datwyler Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1579558202-26052-1-git-send-email-tyreld@linux.ibm.com commit 7e6f8cbc5e10cf7601c762db267b795273d53078 Author: Aneesh Kumar K.V Date: Wed Jan 8 12:16:47 2020 +0530 powerpc/papr_scm: Don't enable direct map for a region by default Setting ND_REGION_PAGEMAP flag implies namespace mode defaults to fsdax mode. This also means kernel ends up creating struct page backing for these namspace ranges. With large namespaces that is not the right thing to do. We should let the user select the mode he/she wants the namespace to be created with. Hence disable ND_REGION_PAGEMAP for papr_scm regions. We still keep the flag for of_pmem because it supports only small persistent memory regions. This is similar to what is done for x86 with commit commit: 004f1afbe199 ("libnvdimm, pmem: direct map legacy pmem by default") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200108064647.169637-1-aneesh.kumar@linux.ibm.com commit 3c749b81ee99ef1a01d342ee5e4bc01e4332eb75 Author: Borislav Petkov Date: Thu Jan 23 17:54:33 2020 +0100 x86/CPU/AMD: Remove amd_get_topology_early() ... and fold its function body into its single call site. No functional changes: # arch/x86/kernel/cpu/amd.o: text data bss dec hex filename 5994 385 1 6380 18ec amd.o.before 5994 385 1 6380 18ec amd.o.after md5: 99ec6daa095b502297884e949c520f90 amd.o.before.asm 99ec6daa095b502297884e949c520f90 amd.o.after.asm Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200123165811.5288-1-bp@alien8.de commit 3333e50b64fe30b7e53cf02456a2f567f689ae4f Merge: 2f64ab27c838 e814c58d454d Author: David S. Miller Date: Sat Jan 25 10:56:31 2020 +0100 Merge branch 'mlxsw-Offload-TBF' Ido Schimmel says: ==================== mlxsw: Offload TBF Petr says: In order to allow configuration of shapers on Spectrum family of machines, recognize TBF either as root Qdisc, or as a child of ETS or PRIO. Configure rate of maximum shaper according to TBF rate setting, and maximum shaper burst size according to TBF burst setting. - Patches #1 and #2 make the TBF shaper suitable for offloading. - Patches #3, #4 and #5 are refactoring aimed at easier support of leaf Qdiscs in general. - Patches #6 to #10 gradually introduce TBF offload. - Patches #11 to #14 add selftests. ==================== Signed-off-by: David S. Miller commit e814c58d454d952778fbb70bd0e71564f8c49f28 Author: Petr Machata Date: Fri Jan 24 15:23:18 2020 +0200 selftests: mlxsw: Add a TBF selftest Add a test that runs traffic across a port throttled with TBF. The test checks that the observed throughput is within +-5% from the installed shaper. To allow checking both the software datapath and the offloaded one, make the test suitable for inclusion from driver-specific wrapper. Introduce such wrappers for mlxsw. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit c143139b7fd36cb66afb4423ac14a1efd8a45609 Author: Petr Machata Date: Fri Jan 24 15:23:17 2020 +0200 selftests: forwarding: lib: Allow reading TC rule byte counters The function tc_rule_stats_get() fetches a packet counter of a given TC rule. Extend it to support byte counters as well by adding an optional argument with selector. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 4121d9479b24c20ff7d3e7b62a7cf330fae7b2af Author: Petr Machata Date: Fri Jan 24 15:23:16 2020 +0200 selftests: forwarding: lib: Add helpers for busywaiting The function busywait() is handy as a safety-latched variant of a while loop. Many selftests deal specifically with counter values, and busywaiting on them is likely to be rather common (it is not quite common now, but busywait() has not been around for very long). To facilitate expressing simply what is tested, introduce two helpers: - until_counter_is(), which can be used as a predicate passed to busywait(), which holds when expression, which is itself passed as an argument to until_counter_is(), reaches a desired value. - busywait_for_counter(), which is useful for waiting until a given counter changes "by" (as opposed to "to") a certain amount. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit adc6c7ec11293117ec2763ccbe17d58349e011cf Author: Petr Machata Date: Fri Jan 24 15:23:15 2020 +0200 selftests: Move two functions from mlxsw's qos_lib to lib The function humanize() is used for converting value in bits/s to a human-friendly approximate value in Kbps, Mbps or Gbps. There is nothing hardware-specific in that, so move the function to lib.sh. Similarly for the rate() function, which just does a bit of math to calculate a rate, given two counter values and a time interval. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a44f58c41bfbb921c1c4586bed9ad26aa2c6208a Author: Petr Machata Date: Fri Jan 24 15:23:14 2020 +0200 mlxsw: spectrum_qdisc: Support offloading of TBF Qdisc React to the TC messages that were introduced in a preceding patch and configure egress maximum shaper as appropriate. TBF can be used as a root qdisc or under one of PRIO or strict ETS bands. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit dbacf8ba5860e79d5191b0868bffa9e351d205e4 Author: Petr Machata Date: Fri Jan 24 15:23:13 2020 +0200 mlxsw: spectrum: Configure shaper rate and burst size together In order to allow configuration of burst size together with shaper rate, extend mlxsw_sp_port_ets_maxrate_set() with a burst_size argument. Convert call sites to pass 0 (for default). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 47259544e0fc0659f74f6ca6680745658969a803 Author: Petr Machata Date: Fri Jan 24 15:23:12 2020 +0200 mlxsw: spectrum: Add lowest_shaper_bs to struct mlxsw_sp Lower limit of burst size configuration is dependent on system type. Add a datum to track the value. Initialize as appropriate in mlxsw_spX_init(). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 92afbfedb77d59a4077d292b88a316f3de706344 Author: Petr Machata Date: Fri Jan 24 15:23:11 2020 +0200 mlxsw: reg: Increase MLXSW_REG_QEEC_MAS_DIS As the port speeds grow, the current value of "unlimited shaper", 200000000Kbps, might become lower than the actually supported speeds. Bump it to the maximum value that fits in the corresponding QEEC field, which is about 2.1Tbps. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 23effa2479bae2fbea69493afaab9914ee3862ca Author: Petr Machata Date: Fri Jan 24 15:23:10 2020 +0200 mlxsw: reg: Add max_shaper_bs to QoS ETS Element Configuration The QEEC register configures scheduling elements. One of the bits of configuration is the burst size to use for the shaper installed on the element. Add the necessary fields to support this configuration. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit be1d5a8a7728cc734fc31b837796e7addc4ba832 Author: Petr Machata Date: Fri Jan 24 15:23:09 2020 +0200 mlxsw: spectrum_qdisc: Extract a common leaf unoffload function When the RED Qdisc is unoffloaded, it needs to reduce the reported backlog by the amount that is in the HW, so that only the SW backlog is contained in the counter. The same thing will need to be done by TBF, and likely any other leaf Qdisc as well. Extract a helper mlxsw_sp_qdisc_leaf_unoffload() and call it from mlxsw_sp_qdisc_red_unoffload(). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 3d0d592193dce954bf5ccac5128080830dd8e982 Author: Petr Machata Date: Fri Jan 24 15:23:08 2020 +0200 mlxsw: spectrum_qdisc: Add mlxsw_sp_qdisc_get_class_stats() Add a wrapper around mlxsw_sp_qdisc_collect_tc_stats() and mlxsw_sp_qdisc_update_stats() for the simple case of doing both in one go: mlxsw_sp_qdisc_get_class_stats(). Dispatch to that function from mlxsw_sp_qdisc_get_red_stats(). This new function will be useful for other leaf Qdiscs as well. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit cf9af379cd672d6873ae97ec416148708c6575e9 Author: Petr Machata Date: Fri Jan 24 15:23:07 2020 +0200 mlxsw: spectrum_qdisc: Extract a per-TC stat function Extract from mlxsw_sp_qdisc_get_prio_stats() two new functions: mlxsw_sp_qdisc_collect_tc_stats() to accumulate stats for that one TC only, and mlxsw_sp_qdisc_update_stats() that makes the stats relative to base values stored earlier. Use them from mlxsw_sp_qdisc_get_red_stats(). Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit ef6aadcc76c97e25f62adc4e9d19684d3e5d0b87 Author: Petr Machata Date: Fri Jan 24 15:23:06 2020 +0200 net: sched: Make TBF Qdisc offloadable Invoke ndo_setup_tc as appropriate to signal init / replacement, destroying and dumping of TBF Qdisc. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit c2070152747ebc294f018e4b28bf2d9f719a6b36 Author: Petr Machata Date: Fri Jan 24 15:23:05 2020 +0200 net: sched: sch_tbf: Don't overwrite backlog before dumping In 2011, in commit b0460e4484f9 ("sch_tbf: report backlog information"), TBF started copying backlog depth from the child Qdisc before dumping, with the motivation that the backlog was otherwise not visible in "tc -s qdisc show". Later, in 2016, in commit 8d5958f424b6 ("sch_tbf: update backlog as well"), TBF got a full-blown backlog tracking. However it kept copying the child's backlog over before dumping. That line is now unnecessary, so remove it. As shown in the following example, backlog is still reported correctly: # tc -s qdisc show dev veth0 invisible qdisc tbf 1: root refcnt 2 rate 1Mbit burst 128Kb lat 82.8s Sent 505475370 bytes 406985 pkt (dropped 0, overlimits 812544 requeues 0) backlog 81972b 66p requeues 0 qdisc bfifo 0: parent 1:1 limit 10Mb Sent 505475370 bytes 406985 pkt (dropped 0, overlimits 0 requeues 0) backlog 81972b 66p requeues 0 Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 2f64ab27c838c012b17ac162726e2303cb3e80dd Merge: 6ec8b6cd79a4 12fa74383ed4 Author: David S. Miller Date: Sat Jan 25 10:43:19 2020 +0100 Merge branch 'hv_netvsc-Add-XDP-support' Haiyang Zhang says: ==================== hv_netvsc: Add XDP support Add XDP support and update related document. ==================== Signed-off-by: David S. Miller commit 12fa74383ed4d1ffa283f77c1e7fe038e8182405 Author: Haiyang Zhang Date: Thu Jan 23 13:52:35 2020 -0800 hv_netvsc: Update document for XDP support Added the new section in the document regarding XDP support by hv_netvsc driver. Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller commit 351e1581395fcc7fb952bbd7dda01238f69968fd Author: Haiyang Zhang Date: Thu Jan 23 13:52:34 2020 -0800 hv_netvsc: Add XDP support This patch adds support of XDP in native mode for hv_netvsc driver, and transparently sets the XDP program on the associated VF NIC as well. Setting / unsetting XDP program on synthetic NIC (netvsc) propagates to VF NIC automatically. Setting / unsetting XDP program on VF NIC directly is not recommended, also not propagated to synthetic NIC, and may be overwritten by setting of synthetic NIC. The Azure/Hyper-V synthetic NIC receive buffer doesn't provide headroom for XDP. We thought about re-use the RNDIS header space, but it's too small. So we decided to copy the packets to a page buffer for XDP. And, most of our VMs on Azure have Accelerated Network (SRIOV) enabled, so most of the packets run on VF NIC. The synthetic NIC is considered as a fallback data-path. So the data copy on netvsc won't impact performance significantly. XDP program cannot run with LRO (RSC) enabled, so you need to disable LRO before running XDP: ethtool -K eth0 lro off XDP actions not yet supported: XDP_REDIRECT Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller commit 6ec8b6cd79a4360e375da99d848d63f8d4fb08b3 Author: Moshe Shemesh Date: Thu Jan 23 19:57:13 2020 +0200 devlink: Add health recover notifications on devlink flows Devlink health recover notifications were added only on driver direct updates of health_state through devlink_health_reporter_state_update(). Add notifications on updates of health_state by devlink flows of report and recover. Moved functions devlink_nl_health_reporter_fill() and devlink_recover_notify() to avoid forward declaration. Fixes: 97ff3bd37fac ("devlink: add devink notification when reporter update health state") Signed-off-by: Moshe Shemesh Signed-off-by: David S. Miller commit 53c677009581ac5dbe46c4cf667e408ebfe3049a Author: Andy Shevchenko Date: Thu Jan 23 16:27:29 2020 +0200 net: fddi: skfp: Use print_hex_dump() helper Use the print_hex_dump() helper, instead of open-coding the same operations. Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller commit 79ac522402fca97deef3e07be9600bfab20d47a8 Author: Andy Shevchenko Date: Thu Jan 23 16:20:02 2020 +0200 net: atm: use %*ph to print small buffer Use %*ph format to print small buffer as hex string. Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller commit ac6119e7f25b842fc061e8aec88c4f32d3bc28ef Author: Ard Biesheuvel Date: Tue Jan 21 10:39:12 2020 +0100 efi/x86: Disable instrumentation in the EFI runtime handling code We already disable KASAN instrumentation specifically for the EFI routines that are known to dereference memory addresses that KASAN does not know about, avoiding false positive KASAN splats. However, as it turns out, having GCOV or KASAN instrumentation enabled interferes with the compiler's ability to optimize away function calls that are guarded by IS_ENABLED() checks that should have resulted in those references to have been const-propagated out of existence. But with instrumenation enabled, we may get build errors like: ld: arch/x86/platform/efi/efi_64.o: in function `efi_thunk_set_virtual_address_map': ld: arch/x86/platform/efi/efi_64.o: in function `efi_set_virtual_address_map': in builds where CONFIG_EFI=y but CONFIG_EFI_MIXED or CONFIG_X86_UV are not defined, even though the invocations are conditional on IS_ENABLED() checks against the respective Kconfig symbols. So let's disable instrumentation entirely for this subdirectory, which isn't that useful here to begin with. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: linux-efi@vger.kernel.org commit cada0b6dbb8c07ab353d209437243bec8cc7c64a Author: Qian Cai Date: Wed Jan 22 14:14:30 2020 -0500 efi/libstub/x86: Fix EFI server boot failure x86_64 EFI systems are unable to boot due to a typo in a recent commit: EFI config tables not found. -- System halted This was probably due to the absense of CONFIG_EFI_MIXED=y in testing. Fixes: 796eb8d26a57 ("efi/libstub/x86: Use const attribute for efi_is_64bit()") Signed-off-by: Qian Cai Acked-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Cc: tglx@linutronix.de Cc: linux-efi@vger.kernel.org Link: https://lore.kernel.org/r/20200122191430.4888-1-cai@lca.pw commit f8a4bb6bfa639fbdd07aede615be6dffe86a9713 Merge: 4703d9119972 0e247386d9ed Author: Ingo Molnar Date: Sat Jan 25 10:05:23 2020 +0100 Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull RCU updates from Paul E. McKenney: - Expedited grace-period updates - kfree_rcu() updates - RCU list updates - Preemptible RCU updates - Torture-test updates - Miscellaneous fixes - Documentation updates Signed-off-by: Ingo Molnar commit 7f6225e446cc8dfa4c3c7959a4de3dd03ec277bf Author: zhangyi (F) Date: Wed Dec 4 20:46:14 2019 +0800 jbd2: clean __jbd2_journal_abort_hard() and __journal_abort_soft() __jbd2_journal_abort_hard() is no longer used, so now we can merge __jbd2_journal_abort_hard() and __journal_abort_soft() these two functions into jbd2_journal_abort() and remove them. Signed-off-by: zhangyi (F) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20191204124614.45424-5-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 0e98c084a21177ef136149c6a293b3d1eb33ff92 Author: zhangyi (F) Date: Wed Dec 4 20:46:13 2019 +0800 jbd2: make sure ESHUTDOWN to be recorded in the journal superblock Commit fb7c02445c49 ("ext4: pass -ESHUTDOWN code to jbd2 layer") want to allow jbd2 layer to distinguish shutdown journal abort from other error cases. So the ESHUTDOWN should be taken precedence over any other errno which has already been recoded after EXT4_FLAGS_SHUTDOWN is set, but it only update errno in the journal suoerblock now if the old errno is 0. Fixes: fb7c02445c49 ("ext4: pass -ESHUTDOWN code to jbd2 layer") Signed-off-by: zhangyi (F) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20191204124614.45424-4-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 51f57b01e4a3c7d7bdceffd84de35144e8c538e7 Author: zhangyi (F) Date: Wed Dec 4 20:46:12 2019 +0800 ext4, jbd2: ensure panic when aborting with zero errno JBD2_REC_ERR flag used to indicate the errno has been updated when jbd2 aborted, and then __ext4_abort() and ext4_handle_error() can invoke panic if ERRORS_PANIC is specified. But if the journal has been aborted with zero errno, jbd2_journal_abort() didn't set this flag so we can no longer panic. Fix this by always record the proper errno in the journal superblock. Fixes: 4327ba52afd03 ("ext4, jbd2: ensure entering into panic after recording an error in superblock") Signed-off-by: zhangyi (F) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20191204124614.45424-3-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit d0a186e0d3e7ac05cc77da7c157dae5aa59f95d9 Author: zhangyi (F) Date: Wed Dec 4 20:46:11 2019 +0800 jbd2: switch to use jbd2_journal_abort() when failed to submit the commit record We invoke jbd2_journal_abort() to abort the journal and record errno in the jbd2 superblock when committing journal transaction besides the failure on submitting the commit record. But there is no need for the case and we can also invoke jbd2_journal_abort() instead of __jbd2_journal_abort_hard(). Fixes: 818d276ceb83a ("ext4: Add the journal checksum feature") Signed-off-by: zhangyi (F) Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20191204124614.45424-2-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 1a8e9cf40c9a6a2e40b1e924b13ed303aeea4418 Author: Vasily Averin Date: Thu Jan 23 12:05:10 2020 +0300 jbd2_seq_info_next should increase position index if seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. Script below generates endless output $ q=;while read -r r;do echo "$((++q)) $r";done Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/d13805e5-695e-8ac3-b678-26ca2313629f@virtuozzo.com Signed-off-by: Theodore Ts'o commit 17c51d836c19ecc58714fc671a914a47b6ae4db7 Author: Shijie Luo Date: Thu Jan 23 02:00:54 2020 -0500 jbd2: remove pointless assertion in __journal_remove_journal_head Only when jh->b_jcount = 0 in jbd2_journal_put_journal_head, we are allowed to call __journal_remove_journal_head. This assertion is meaningless, just remove it. Signed-off-by: Shijie Luo Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20200123070054.50585-1-luoshijie1@huawei.com Signed-off-by: Theodore Ts'o commit 8d6ce136790268fba2fc66cb8d6fa2161d4b2385 Author: Shijie Luo Date: Thu Jan 23 01:43:25 2020 -0500 ext4,jbd2: fix comment and code style Fix comment and remove unneccessary blank. Signed-off-by: Shijie Luo Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20200123064325.36358-1-luoshijie1@huawei.com Signed-off-by: Theodore Ts'o commit 0c1cba6cca862c56bf8cb726314e5196505017f6 Author: wangyan Date: Wed Jan 22 17:33:10 2020 +0800 jbd2: delete the duplicated words in the comments Delete the duplicated words "is" in the comments Signed-off-by: Yan Wang Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/12087f77-ab4d-c7ba-53b4-893dbf0026f0@huawei.com Signed-off-by: Theodore Ts'o commit edc7e4898d5fdb164de1ab9d3a0c30ef9888e4f1 Author: Mat Martineau Date: Fri Jan 24 16:04:03 2020 -0800 mptcp: Fix code formatting checkpatch.pl had a few complaints in the last set of MPTCP patches: ERROR: code indent should use tabs where possible +^I subflow, sk->sk_family, icsk->icsk_af_ops, target, mapped);$ CHECK: Comparison to NULL could be written "!new_ctx" + if (new_ctx == NULL) { ERROR: "foo * bar" should be "foo *bar" +static const struct proto_ops * tcp_proto_ops(struct sock *sk) Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit e42f1ac626e7f799717d006e0f8393b6d6f9fc8c Author: Florian Westphal Date: Fri Jan 24 16:04:02 2020 -0800 mptcp: do not inherit inet proto ops We need to initialise the struct ourselves, else we expose tcp-specific callbacks such as tcp_splice_read which will then trigger splat because the socket is an mptcp one: BUG: KASAN: slab-out-of-bounds in tcp_mstamp_refresh+0x80/0xa0 net/ipv4/tcp_output.c:57 Write of size 8 at addr ffff888116aa21d0 by task syz-executor.0/5478 CPU: 1 PID: 5478 Comm: syz-executor.0 Not tainted 5.5.0-rc6 #3 Call Trace: tcp_mstamp_refresh+0x80/0xa0 net/ipv4/tcp_output.c:57 tcp_rcv_space_adjust+0x72/0x7f0 net/ipv4/tcp_input.c:612 tcp_read_sock+0x622/0x990 net/ipv4/tcp.c:1674 tcp_splice_read+0x20b/0xb40 net/ipv4/tcp.c:791 do_splice+0x1259/0x1560 fs/splice.c:1205 To prevent build error with ipv6, add the recv/sendmsg function declaration to ipv6.h. The functions are already accessible "thanks" to retpoline related work, but they are currently only made visible by socket.c specific INDIRECT_CALLABLE macros. Reported-by: Christoph Paasch Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 52144d893d76294db9ed79a909397ea81bc25a02 Author: Dmitry Monakhov Date: Thu Nov 14 20:01:47 2019 +0000 ext4: fix extent_status trace points Show pblock only if it has meaningful value. # before ext4:ext4_es_lookup_extent_exit: dev 253,0 ino 12 found 1 [1/4294967294) 576460752303423487 H ext4:ext4_es_lookup_extent_exit: dev 253,0 ino 12 found 1 [2/4294967293) 576460752303423487 HR # after ext4:ext4_es_lookup_extent_exit: dev 253,0 ino 12 found 1 [1/4294967294) 0 H ext4:ext4_es_lookup_extent_exit: dev 253,0 ino 12 found 1 [2/4294967293) 0 HR Signed-off-by: Dmitry Monakhov Link: https://lore.kernel.org/r/20191114200147.1073-2-dmonakhov@gmail.com Signed-off-by: Theodore Ts'o commit 459c80742e6a4a5375d9765a326e6047103460f5 Author: Dmitry Monakhov Date: Thu Nov 14 20:01:46 2019 +0000 ext4: fix symbolic enum printing in trace output Trace's macro __print_flags() produce raw event's decraration w/o knowing actual flags value cat /sys/kernel/debug/tracing/events/ext4/ext4_ext_map_blocks_exit/format .. __print_flags(REC->mflags, "", { (1 << BH_New), For that reason we have to explicitly define it via special macro TRACE_DEFINE_ENUM() Also add missed EXTENT_STATUS_REFERENCED flag. #Before patch ext4:ext4_ext_map_blocks_exit: dev 253,0 ino 2 flags lblk 0 pblk 4177 len 1 mflags 0x20 ret 1 ext4:ext4_ext_map_blocks_exit: dev 253,0 ino 12 flags CREATE lblk 0 pblk 34304 len 1 mflags 0x60 ret 1 #With patch ext4:ext4_ext_map_blocks_exit: dev 253,0 ino 2 flags lblk 0 pblk 4177 len 1 mflags M ret 1 ext4:ext4_ext_map_blocks_exit: dev 253,0 ino 12 flags CREATE lblk 0 pblk 34816 len 1 mflags NM ret 1 Signed-off-by: Dmitry Monakhov Link: https://lore.kernel.org/r/20191114200147.1073-1-dmonakhov@gmail.com Signed-off-by: Theodore Ts'o commit 57c32ea42f8e802bda47010418e25043e0c9337f Author: Chengguang Xu Date: Wed Oct 16 10:25:01 2019 +0800 ext4: choose hardlimit when softlimit is larger than hardlimit in ext4_statfs_project() Setting softlimit larger than hardlimit seems meaningless for disk quota but currently it is allowed. In this case, there may be a bit of comfusion for users when they run df comamnd to directory which has project quota. For example, we set 20M softlimit and 10M hardlimit of block usage limit for project quota of test_dir(project id 123). [root@hades mnt_ext4]# repquota -P -a *** Report for project quotas on device /dev/loop0 Block grace time: 7days; Inode grace time: 7days Block limits File limits Project used soft hard grace used soft hard grace ---------------------------------------------------------------------- 0 -- 13 0 0 2 0 0 123 -- 10237 20480 10240 5 200 100 The result of df command as below: [root@hades mnt_ext4]# df -h test_dir Filesystem Size Used Avail Use% Mounted on /dev/loop0 20M 10M 10M 50% /home/cgxu/test/mnt_ext4 Even though it looks like there is another 10M free space to use, if we write new data to diretory test_dir(inherit project id), the write will fail with errno(-EDQUOT). After this patch, the df result looks like below. [root@hades mnt_ext4]# df -h test_dir Filesystem Size Used Avail Use% Mounted on /dev/loop0 10M 10M 3.0K 100% /home/cgxu/test/mnt_ext4 Signed-off-by: Chengguang Xu Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20191016022501.760-1-cgxu519@mykernel.net Signed-off-by: Theodore Ts'o commit ec772f01307a2c06ebf6cdd221e6b518a71ddae7 Author: Eric Biggers Date: Thu Jan 23 20:12:34 2020 -0800 ext4: fix race conditions in ->d_compare() and ->d_hash() Since ->d_compare() and ->d_hash() can be called in RCU-walk mode, ->d_parent and ->d_inode can be concurrently modified, and in particular, ->d_inode may be changed to NULL. For ext4_d_hash() this resulted in a reproducible NULL dereference if a lookup is done in a directory being deleted, e.g. with: int main() { if (fork()) { for (;;) { mkdir("subdir", 0700); rmdir("subdir"); } } else { for (;;) access("subdir/file", 0); } } ... or by running the 't_encrypted_d_revalidate' program from xfstests. Both repros work in any directory on a filesystem with the encoding feature, even if the directory doesn't actually have the casefold flag. I couldn't reproduce a crash in ext4_d_compare(), but it appears that a similar crash is possible there. Fix these bugs by reading ->d_parent and ->d_inode using READ_ONCE() and falling back to the case sensitive behavior if the inode is NULL. Reported-by: Al Viro Fixes: b886ee3e778e ("ext4: Support case-insensitive file name lookups") Cc: # v5.2+ Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20200124041234.159740-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 28394da25888168df379c40910591b95e8e449f7 Author: Steven Rostedt (VMware) Date: Fri Jan 24 20:47:46 2020 -0500 tracing: Decrement trace_array when bootconfig creates an instance The trace_array_get_by_name() creates a ftrace instance and trace_array_put() is used to remove the reference. Even though the trace_array_get_by_name() creates the instance, it also adds a reference count to it, that prevents user space from removing it. As the bootconfig just creates the instance on boot up, it should still be used where it can be deleted by user space after boot. A trace_array_put() is required to let that happen. Also, change the documentation on trace_array_get_by_name() to make this not be so confusing. Link: https://lore.kernel.org/r/20200124205927.76128804@rorschach.local.home Fixes: 4f712a4d04a4e ("tracing/boot: Add instance node support") Acked-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 244adf6426ee31a83f397b700d964cff12a247d3 Author: Theodore Ts'o Date: Thu Jan 23 12:23:17 2020 -0500 ext4: make dioread_nolock the default This fixes the direct I/O versus writeback race which can reveal stale data, and it improves the tail latency of commits on slow devices. Link: https://lore.kernel.org/r/20200125022254.1101588-1-tytso@mit.edu Signed-off-by: Theodore Ts'o commit 31ad4e4ee1e4e2e12985e46aa6263c8bd5ad4271 Author: Tony Nguyen Date: Fri Jan 17 07:39:13 2020 -0800 ice: Allocate flow profile Create an extraction sequence based on the packet header protocols to be programmed and allocate a flow profile for the extraction sequence. Signed-off-by: Tony Nguyen Signed-off-by: Henry Tieman Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit eba12ab71e71a2f82836c517596b6bd12664325c Author: Hou Pengyang Date: Tue Mar 3 21:48:18 2015 +0000 tracing: Fix comments about trace/ftrace.h commit f42c85e74faa422cf0bc747ed808681145448f88 moved tracepoint's ftrace creation into include/trace/ftrace.h and trace/define_trace.h was deleted as a result. However some comment info does not adapt to the change, which is such a misguiding when reading related code. This patch fix this by moving trace/trace_events.h to , since tracepoint headers have already been moved to tarce/events/. Link: http://lkml.kernel.org/r/1425419298-61941-1-git-send-email-houpengyang@huawei.com Signed-off-by: Hou Pengyang [ Pulled from the archeological digging of my INBOX ] Signed-off-by: Steven Rostedt (VMware) commit b3f7a6cd490112085eadb578b6f4a5a34d140726 Author: Dan Carpenter Date: Sat Nov 22 21:30:12 2014 +0300 tracing: Remove unneeded NULL check We checked "iter->trace" earlier so there is no need to check here. Link: http://lkml.kernel.org/r/20141122183012.GB6994@mwanda Signed-off-by: Dan Carpenter [ Pulled from the archeological digging of my INBOX ] Signed-off-by: Steven Rostedt (VMware) commit cbc3b92ce037f5e7536f6db157d185cd8b8f615c Author: Josef Bacik Date: Wed Sep 24 16:14:12 2014 -0400 tracing: Set kernel_stack's caller size properly I noticed when trying to use the trace-cmd python interface that reading the raw buffer wasn't working for kernel_stack events. This is because it uses a stubbed version of __dynamic_array that doesn't do the __data_loc trick and encode the length of the array into the field. Instead it just shows up as a size of 0. So change this to __array and set the len to FTRACE_STACK_ENTRIES since this is what we actually do in practice and matches how user_stack_trace works. Link: http://lkml.kernel.org/r/1411589652-1318-1-git-send-email-jbacik@fb.com Signed-off-by: Josef Bacik [ Pulled from the archeological digging of my INBOX ] Signed-off-by: Steven Rostedt (VMware) commit afccc00f75bbbee4e4ae833a96c2d29a7259c693 Author: Luis Henriques Date: Tue Sep 9 22:49:41 2014 +0100 tracing: Fix tracing_stat return values in error handling paths tracing_stat_init() was always returning '0', even on the error paths. It now returns -ENODEV if tracing_init_dentry() fails or -ENOMEM if it fails to created the 'trace_stat' debugfs directory. Link: http://lkml.kernel.org/r/1410299381-20108-1-git-send-email-luis.henriques@canonical.com Fixes: ed6f1c996bfe4 ("tracing: Check return value of tracing_init_dentry()") Signed-off-by: Luis Henriques [ Pulled from the archeological digging of my INBOX ] Signed-off-by: Steven Rostedt (VMware) commit dfb6cd1e654315168e36d947471bd2a0ccd834ae Author: Steven Rostedt (VMware) Date: Fri Jan 24 17:47:49 2020 -0500 tracing: Fix very unlikely race of registering two stat tracers Looking through old emails in my INBOX, I came across a patch from Luis Henriques that attempted to fix a race of two stat tracers registering the same stat trace (extremely unlikely, as this is done in the kernel, and probably doesn't even exist). The submitted patch wasn't quite right as it needed to deal with clean up a bit better (if two stat tracers were the same, it would have the same files). But to make the code cleaner, all we needed to do is to keep the all_stat_sessions_mutex held for most of the registering function. Link: http://lkml.kernel.org/r/1410299375-20068-1-git-send-email-luis.henriques@canonical.com Fixes: 002bb86d8d42f ("tracing/ftrace: separate events tracing and stats tracing engine") Reported-by: Luis Henriques Signed-off-by: Steven Rostedt (VMware) commit 3a21409a0b4bce3171001b168ca42285004c873c Author: David Howells Date: Fri Jan 17 15:55:09 2020 +0000 nfs: Return EINVAL rather than ERANGE for mount parse errors Return EINVAL rather than ERANGE for mount parse errors as the userspace mount command doesn't necessarily understand what to do with anything other than EINVAL. The old code returned -ERANGE as an intermediate error that then get converted to -EINVAL, whereas the new code returns -ERANGE. This was induced by passing minorversion=1 to a v4 mount where CONFIG_NFS_V4_1 was disabled in the kernel build. Fixes: 68f65ef40e1e ("NFS: Convert mount option parsing to use functionality from fs_parser.h") Reported-by: Krzysztof Kozlowski Signed-off-by: David Howells Signed-off-by: Anna Schumaker commit b24ee6c64ca785739b3ef8d95fd6becaad1bde39 Author: Olga Kornievskaia Date: Mon Dec 16 16:34:02 2019 -0500 NFS: allow deprecation of NFS UDP protocol Add a kernel config CONFIG_NFS_DISABLE_UDP_SUPPORT to disallow NFS UDP mounts and enable it by default. Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker commit f7b37b8b139860ed786bf8ce4358290c6053d94d Author: Trond Myklebust Date: Tue Jan 14 12:06:34 2020 -0500 NFS: Add softreval behaviour to nfs_lookup_revalidate() If the server is unavaliable, we want to allow the revalidating lookup to time out, and to default to validating the cached dentry if the 'softreval' mount option is set. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 35b9211c0a2427e8f39e534f442f43804fc8d5ca Author: Andrii Nakryiko Date: Fri Jan 24 12:18:46 2020 -0800 libbpf: Fix realloc usage in bpf_core_find_cands Fix bug requesting invalid size of reallocated array when constructing CO-RE relocation candidate list. This can cause problems if there are many potential candidates and a very fine-grained memory allocator bucket sizes are used. Fixes: ddc7c3042614 ("libbpf: implement BPF CO-RE offset relocation algorithm") Reported-by: William Smith Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200124201847.212528-1-andriin@fb.com commit c90ed40cefe187a20fc565650b119aa696abc2ed Author: Tony Nguyen Date: Fri Jan 17 07:39:12 2020 -0800 ice: Enable writing hardware filtering tables Enable the driver to write the filtering hardware tables to allow for changing of RSS rules. Upon loading of DDP package, a minimal configuration should be written to hardware. Introduce and initialize structures for storing configuration and make the top level calls to configure the RSS tables to initial values. A packet segment will be created but nothing is written to hardware yet. Signed-off-by: Tony Nguyen Signed-off-by: Henry Tieman Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit d7a252708dbc950ca2064310217e8b9f85846e2f Author: Andrii Nakryiko Date: Thu Jan 23 21:38:37 2020 -0800 libbpf: Improve handling of failed CO-RE relocations Previously, if libbpf failed to resolve CO-RE relocation for some instructions, it would either return error immediately, or, if .relaxed_core_relocs option was set, would replace relocatable offset/imm part of an instruction with a bogus value (-1). Neither approach is good, because there are many possible scenarios where relocation is expected to fail (e.g., when some field knowingly can be missing on specific kernel versions). On the other hand, replacing offset with invalid one can hide programmer errors, if this relocation failue wasn't anticipated. This patch deprecates .relaxed_core_relocs option and changes the approach to always replacing instruction, for which relocation failed, with invalid BPF helper call instruction. For cases where this is expected, BPF program should already ensure that that instruction is unreachable, in which case this invalid instruction is going to be silently ignored. But if instruction wasn't guarded, BPF program will be rejected at verification step with verifier log pointing precisely to the place in assembly where the problem is. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200124053837.2434679-1-andriin@fb.com commit 51bad0f05616c43d6d34b0a19bcc9bdab8e8fb39 Author: Lorenz Bauer Date: Fri Jan 24 11:27:54 2020 +0000 selftests: bpf: Reset global state between reuseport test runs Currently, there is a lot of false positives if a single reuseport test fails. This is because expected_results and the result map are not cleared. Zero both after individual test runs, which fixes the mentioned false positives. Fixes: 91134d849a0e ("bpf: Test BPF_PROG_TYPE_SK_REUSEPORT") Signed-off-by: Lorenz Bauer Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Acked-by: Martin KaFai Lau Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200124112754.19664-5-lmb@cloudflare.com commit 603fba9dfd0b2e2a844ece9ed98ce874c38aa98e Author: Lorenz Bauer Date: Fri Jan 24 11:27:53 2020 +0000 selftests: bpf: Make reuseport test output more legible Include the name of the mismatching result in human readable format when reporting an error. The new output looks like the following: unexpected result result: [1, 0, 0, 0, 0, 0] expected: [0, 0, 0, 0, 0, 0] mismatch on DROP_ERR_INNER_MAP (bpf_prog_linum:153) check_results:FAIL:382 Signed-off-by: Lorenz Bauer Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Acked-by: Martin KaFai Lau Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200124112754.19664-4-lmb@cloudflare.com commit 8bec4f665e0baecb5f1b683379fc10b3745eb612 Author: Lorenz Bauer Date: Fri Jan 24 11:27:52 2020 +0000 selftests: bpf: Ignore FIN packets for reuseport tests The reuseport tests currently suffer from a race condition: FIN packets count towards DROP_ERR_SKB_DATA, since they don't contain a valid struct cmd. Tests will spuriously fail depending on whether check_results is called before or after the FIN is processed. Exit the BPF program early if FIN is set. Fixes: 91134d849a0e ("bpf: Test BPF_PROG_TYPE_SK_REUSEPORT") Signed-off-by: Lorenz Bauer Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Acked-by: Martin KaFai Lau Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200124112754.19664-3-lmb@cloudflare.com commit c31dbb1e41d1857b403f9bf58c87f5898519a0bc Author: Lorenz Bauer Date: Fri Jan 24 11:27:51 2020 +0000 selftests: bpf: Use a temporary file in test_sockmap Use a proper temporary file for sendpage tests. This means that running the tests doesn't clutter the working directory, and allows running the test on read-only filesystems. Fixes: 16962b2404ac ("bpf: sockmap, add selftests") Signed-off-by: Lorenz Bauer Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Acked-by: Martin KaFai Lau Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200124112754.19664-2-lmb@cloudflare.com commit dab0198413d227f13be7da8abf0d5bc8620427f0 Author: Christoph Hellwig Date: Tue Jan 21 06:37:51 2020 -0700 x86/PCI: Remove X86_DEV_DMA_OPS There are no users of X86_DEV_DMA_OPS left, so remove the code. Link: https://lore.kernel.org/r/1579613871-301529-8-git-send-email-jonathan.derrick@intel.com Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Reviewed-by: Jon Derrick commit 962e329d888cfcb923d39af4e14fd616467de167 Author: Jon Derrick Date: Tue Jan 21 06:37:50 2020 -0700 PCI: vmd: Remove dma_map_ops overrides Devices on the VMD domain use the VMD endpoint's requester ID and have been relying on the VMD endpoint's DMA operations. The problem with this was that VMD domain devices would use the VMD endpoint's attributes when doing DMA and IOMMU mapping. We can be smarter about this by only using the VMD endpoint when mapping and providing the correct child device's attributes during DMA operations. Remove the dma_map_ops redirect. Link: https://lore.kernel.org/r/1579613871-301529-7-git-send-email-jonathan.derrick@intel.com Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas Reviewed-by: Keith Busch Acked-by: Lorenzo Pieralisi commit e3560ee4cfb29e232ea99ff9adfaa8ac5b414345 Author: Jon Derrick Date: Tue Jan 21 06:37:49 2020 -0700 iommu/vt-d: Remove VMD child device sanity check Remove the sanity check required for VMD child devices. The new pci_real_dma_dev() DMA alias mechanism places them in the same IOMMU group as the VMD endpoint. Assignment of the group would require assigning the VMD endpoint, where unbinding the VMD endpoint removes the child device domain from the hierarchy. Link: https://lore.kernel.org/r/1579613871-301529-6-git-send-email-jonathan.derrick@intel.com Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas Acked-by: Lu Baolu commit 2b0140c69637e6f3cf9f8a0b7629567de9645680 Author: Jon Derrick Date: Tue Jan 21 06:37:48 2020 -0700 iommu/vt-d: Use pci_real_dma_dev() for mapping The PCI device may have a DMA requester on another bus, such as VMD subdevices needing to use the VMD endpoint. This case requires the real DMA device for the IOMMU mapping, so use pci_real_dma_dev() to find that device. Link: https://lore.kernel.org/r/1579613871-301529-5-git-send-email-jonathan.derrick@intel.com Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas Acked-by: Lu Baolu commit 2856ba6020fc5cbf051d5a75b2abb3046072c144 Author: Jon Derrick Date: Tue Jan 21 06:37:47 2020 -0700 PCI: Introduce pci_real_dma_dev() The current DMA alias implementation requires the aliased device be on the same PCI bus as the requester ID. Add an arch-specific mechanism to point to another PCI device when doing mapping and PCI DMA alias search. The default case returns the actual device. Link: https://lore.kernel.org/r/1579613871-301529-4-git-send-email-jonathan.derrick@intel.com Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas Cc: Christoph Hellwig commit 34067c56fa177d3582695da8e3e162ef78cd0371 Author: Jon Derrick Date: Tue Jan 21 06:37:46 2020 -0700 x86/PCI: Expose VMD's pci_dev in struct pci_sysdata Expose VMD's pci_dev pointer in struct pci_sysdata. This will be used indirectly by intel-iommu.c to find the correct domain. Link: https://lore.kernel.org/r/1579613871-301529-3-git-send-email-jonathan.derrick@intel.com [bhelgaas: commit log] Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas Cc: Christoph Hellwig commit aad6aa0cd674b7935957354666f82e5b2cdc813d Author: Christoph Hellwig Date: Tue Jan 21 06:37:45 2020 -0700 x86/PCI: Add to_pci_sysdata() helper Various helpers need the pci_sysdata just to dereference a single field in it. Add a little helper that returns the properly typed sysdata pointer to require a little less boilerplate code. [jonathan.derrick: to_pci_sysdata const argument] Link: https://lore.kernel.org/r/1579613871-301529-2-git-send-email-jonathan.derrick@intel.com Signed-off-by: Christoph Hellwig Signed-off-by: Jon Derrick Signed-off-by: Bjorn Helgaas commit d030a0dd01306d45569c6a4449dee603f994744a Merge: 0ea5115a02f0 be28d4da7c73 Author: Olof Johansson Date: Fri Jan 24 12:12:24 2020 -0800 Merge tag 'ti-k3-soc-for-v5.6-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into arm/dt Texas Instruments K3 SoC family changes for 5.6, part 2. - Add DMA nodes for am65x and j721e - Add McASP nodes for am65x and j721e, showcasing the DMA usage - Add CAL node for am65x - Add OV5640 camera support for am65x * tag 'ti-k3-soc-for-v5.6-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux: arm64: dts: ti: k3-am654-base-board: Add CSI2 OV5640 camera arm64: dts: ti: k3-am65-main Add CAL node arm64: dts: ti: k3-j721e-main: Add McASP nodes arm64: dts: ti: k3-am654-main: Add McASP nodes arm64: dts: ti: k3-j721e: DMA support arm64: dts: ti: k3-j721e-main: Move secure proxy and smmu under main_navss arm64: dts: ti: k3-j721e-main: Correct main NAVSS representation arm64: dts: ti: k3-j721e: Correct the address for MAIN NAVSS arm64: dts: ti: k3-am65: DMA support arm64: dts: ti: k3-am65-main: Move secure proxy under cbass_main_navss arm64: dts: ti: k3-am65-main: Correct main NAVSS representation Link: https://lore.kernel.org/r/83546942-6215-9c3a-16cd-be7e7c000c0e@ti.com Signed-off-by: Olof Johansson commit 0ea5115a02f08a86e1fe01b837d941263ba870a3 Author: Dafna Hirschfeld Date: Fri Jan 24 11:57:53 2020 +0100 dt-bindings: fix compilation error of the example in marvell,mmp3-hsic-phy.yaml Running `make dt_binging_check`, gives the error: DTC Documentation/devicetree/bindings/phy/marvell,mmp3-hsic-phy.example.dt.yaml Error: Documentation/devicetree/bindings/phy/marvell,mmp3-hsic-phy.example.dts:20.41-42 syntax error FATAL ERROR: Unable to parse input tree This is because the example uses the macro GPIO_ACTIVE_HIGH which is defined in gpio.h but the include of this header is missing. Add the include to fix the error. Fixes: f6f149604eef ("dt-bindings: phy: Add binding for marvell,mmp3-hsic-phy") Link: https://lore.kernel.org/r/20200124105753.15976-1-dafna.hirschfeld@collabora.com Signed-off-by: Dafna Hirschfeld Acked-by: Rob Herring Signed-off-by: Olof Johansson commit e6ecae6b8f6e16b085a70bc6c368626371e3a609 Merge: 3a29339b21a2 e98d5023fe1f Author: Olof Johansson Date: Fri Jan 24 12:06:17 2020 -0800 Merge tag 'uniphier-dt64-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into arm/dt UniPhier ARM64 SoC DT updates for v5.6 - Add reset-names to NAND controller node * tag 'uniphier-dt64-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: arm64: dts: uniphier: add reset-names to NAND controller node Link: https://lore.kernel.org/r/CAK7LNASehDHWgOug=Rz0uBBSP2ntJnNLiarfSdj97tZu+OXLkA@mail.gmail.com Signed-off-by: Olof Johansson commit 3a29339b21a290d9ef9700a00aa4c49492afb00f Merge: 9b0b308a1586 37f3e0096f71 Author: Olof Johansson Date: Fri Jan 24 12:05:58 2020 -0800 Merge tag 'uniphier-dt-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into arm/dt UniPhier ARM SoC DT updates for v5.6 - Add pinmux nodes for I2C ch5, ch6 - Add reset-names to NAND controller node * tag 'uniphier-dt-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: ARM: dts: uniphier: add reset-names to NAND controller node ARM: dts: uniphier: add pinmux nodes for I2C ch5, ch6 Link: https://lore.kernel.org/r/CAK7LNARYrzv4QU-eXxqYCcC9dziJmx9F02YNZ3mMnF47EfL3fA@mail.gmail.com Signed-off-by: Olof Johansson commit fd928f3e32ba09381b287f8b732418434d932855 Author: Stephen Boyd Date: Thu Jan 23 21:58:48 2020 -0800 alarmtimer: Make alarmtimer_get_rtcdev() a stub when CONFIG_RTC_CLASS=n The stubbed version of alarmtimer_get_rtcdev() is not exported. so this won't work if this function is used in a module when CONFIG_RTC_CLASS=n. Move the stub function to the header file and make it inline so that callers don't have to worry about linking against this symbol. rtcdev isn't used outside of this ifdef so it's not required to be redefined to NULL. Drop that while touching this area. Signed-off-by: Stephen Boyd Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200124055849.154411-4-swboyd@chromium.org commit 7c94caca877b0feeca6f5f7b07d48c508e20d58f Author: Stephen Boyd Date: Thu Jan 23 21:58:47 2020 -0800 alarmtimer: Use wakeup source from alarmtimer platform device Use the wakeup source that can be associated with the 'alarmtimer' platform device instead of registering another one by hand. Signed-off-by: Stephen Boyd Signed-off-by: Thomas Gleixner Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20200124055849.154411-3-swboyd@chromium.org commit c79108bd19a8490315847e0c95ac6526fcd8e770 Author: Stephen Boyd Date: Thu Jan 23 21:58:46 2020 -0800 alarmtimer: Make alarmtimer platform device child of RTC device The alarmtimer_suspend() function will fail if an RTC device is on a bus such as SPI or i2c and that RTC device registers and probes after alarmtimer_init() registers and probes the 'alarmtimer' platform device. This is because system wide suspend suspends devices in the reverse order of their probe. When alarmtimer_suspend() attempts to program the RTC for a wakeup it will try to program an RTC device on a bus that has already been suspended. Move the alarmtimer device registration to happen when the RTC which is used for wakeup is registered. Register the 'alarmtimer' platform device as a child of the RTC device too, so that it can be guaranteed that the RTC device won't be suspended when alarmtimer_suspend() is called. Reported-by: Douglas Anderson Signed-off-by: Stephen Boyd Signed-off-by: Thomas Gleixner Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20200124055849.154411-2-swboyd@chromium.org commit 6b088cefbeaa87ba48bf838edfc1e19c9ff3976b Author: Stephen Boyd Date: Thu Jan 23 21:58:49 2020 -0800 alarmtimer: Update alarmtimer_get_rtcdev() docs to reflect reality This function doesn't do anything like this comment says when an RTC device hasn't been chosen. It looks like we used to do something like that before commit 8bc0dafb5cf3 ("alarmtimers: Rework RTC device selection using class interface") but that's long gone now. Remove this sentence to avoid confusing the reader. Signed-off-by: Stephen Boyd Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200124055849.154411-5-swboyd@chromium.org commit cb923159bbb8cc8fe09c19a3435ee11fd546f3d3 Author: Sebastian Andrzej Siewior Date: Fri Jan 17 10:01:37 2020 +0100 smp: Remove allocation mask from on_each_cpu_cond.*() The allocation mask is no longer used by on_each_cpu_cond() and on_each_cpu_cond_mask() and can be removed. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20200117090137.1205765-4-bigeasy@linutronix.de commit 67719ef25eeb2048b11befa6a757aeb3848b5df1 Author: Sebastian Andrzej Siewior Date: Fri Jan 17 10:01:36 2020 +0100 smp: Add a smp_cond_func_t argument to smp_call_function_many() on_each_cpu_cond_mask() allocates a new CPU mask. The newly allocated mask is a subset of the provided mask based on the conditional function. This memory allocation can be avoided by extending smp_call_function_many() with the conditional function and performing the remote function call based on the mask and the conditional function. Rename smp_call_function_many() to smp_call_function_many_cond() and add the smp_cond_func_t argument. If smp_cond_func_t is provided then it is used before invoking the function. Provide smp_call_function_many() with cond_func set to NULL. Let on_each_cpu_cond_mask() use smp_call_function_many_cond(). Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20200117090137.1205765-3-bigeasy@linutronix.de commit 5671d814dbd204b4ecc705045b5f1a647bff6f3b Author: Sebastian Andrzej Siewior Date: Fri Jan 17 10:01:35 2020 +0100 smp: Use smp_cond_func_t as type for the conditional function Use a typdef for the conditional function instead defining it each time in the function prototype. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20200117090137.1205765-2-bigeasy@linutronix.de commit 2c4288719806ca0b3de1b742ada26b25a60d6a45 Author: Thomas Bogendoerfer Date: Fri Jan 24 14:16:08 2020 +0100 MIPS: PCI: Add detection of IOC3 on IO7, IO8, IO9 and Fuel Add detection for IOC3 chips in IP35 machines. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 43ee74487bd2842cb4d37b5c62f074fbed2366b9 Merge: 11ea68f553e2 f4a81f5a853e Author: Thomas Gleixner Date: Fri Jan 24 20:08:51 2020 +0100 Merge tag 'irqchip-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates from Marc Zyngier: - Conversion of the SiFive PLIC to hierarchical domains - New SiFive GPIO irqchip driver - New Aspeed SCI irqchip driver - New NXP INTMUX irqchip driver - Additional support for the Meson A1 GPIO irqchip - First part of the GICv4.1 support - Assorted fixes commit 268d3636dfb22254324774de1f8875174b3be064 Author: Maxim Mikityanskiy Date: Fri Jan 24 19:15:35 2020 +0200 Bluetooth: btrtl: Use kvmalloc for FW allocations Currently, kmemdup is applied to the firmware data, and it invokes kmalloc under the hood. The firmware size and patch_length are big (more than PAGE_SIZE), and on some low-end systems (like ASUS E202SA) kmalloc may fail to allocate a contiguous chunk under high memory usage and fragmentation: Bluetooth: hci0: RTL: examining hci_ver=06 hci_rev=000a lmp_ver=06 lmp_subver=8821 Bluetooth: hci0: RTL: rom_version status=0 version=1 Bluetooth: hci0: RTL: loading rtl_bt/rtl8821a_fw.bin kworker/u9:2: page allocation failure: order:4, mode:0x40cc0(GFP_KERNEL|__GFP_COMP), nodemask=(null),cpuset=/,mems_allowed=0 As firmware load happens on each resume, Bluetooth will stop working after several iterations, when the kernel fails to allocate an order-4 page. This patch replaces kmemdup with kvmalloc+memcpy. It's not required to have a contiguous chunk here, because it's not mapped to the device directly. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Marcel Holtmann commit 0e247386d9ed5ab8b7dad010cf4b183efeb1e47d Merge: 6e6eca2ee79a df1e849ae455 f6105fc2a9c0 189a6883dcf7 afa47fdfa29f 5b14557b073c b22eb7cefb9d Author: Paul E. McKenney Date: Fri Jan 24 10:37:27 2020 -0800 Merge branches 'doc.2019.12.10a', 'exp.2019.12.09a', 'fixes.2020.01.24a', 'kfree_rcu.2020.01.24a', 'list.2020.01.10a', 'preempt.2020.01.24a' and 'torture.2019.12.09a' into HEAD doc.2019.12.10a: Documentations updates exp.2019.12.09a: Expedited grace-period updates fixes.2020.01.24a: Miscellaneous fixes kfree_rcu.2020.01.24a: Batch kfree_rcu() work list.2020.01.10a: RCU-protected-list updates preempt.2020.01.24a: Preemptible RCU updates torture.2019.12.09a: Torture-test updates commit f6105fc2a9c0ea5be6b9e5c19b2551af0b8b4eac Author: Paul E. McKenney Date: Wed Nov 27 11:36:07 2019 -0800 rcu: Remove unused stop-machine #include Long ago, RCU used the stop-machine mechanism to implement expedited grace periods, but no longer does so. This commit therefore removes the no-longer-needed #includes of linux/stop_machine.h. Link: https://lwn.net/Articles/805317/ Reported-by: Viresh Kumar Signed-off-by: Paul E. McKenney commit c7e9c01f928a0e7e467ec3efe1b56bc566678bae Author: Will Deacon Date: Fri Nov 8 17:01:18 2019 +0000 powerpc: Remove comment about read_barrier_depends() 'read_barrier_depends()' doesn't exist anymore so stop talking about it. Signed-off-by: Will Deacon Acked-by: Michael Ellerman Signed-off-by: Paul E. McKenney commit 05d35961c20b8919bb94df6f626f306553758d59 Author: Paul E. McKenney Date: Mon Nov 25 15:35:26 2019 -0800 .mailmap: Add entries for old paulmck@kernel.org addresses [ paulmck: Apply Florian Fainelli feedback. ] Signed-off-by: Paul E. McKenney commit 844a378de3372c923909681706d62336d702531e Author: Paul E. McKenney Date: Mon Nov 4 08:08:30 2019 -0800 srcu: Apply *_ONCE() to ->srcu_last_gp_end The ->srcu_last_gp_end field is accessed from any CPU at any time by synchronize_srcu(), so non-initialization references need to use READ_ONCE() and WRITE_ONCE(). This commit therefore makes that change. Reported-by: syzbot+08f3e9d26e5541e1ecf2@syzkaller.appspotmail.com Acked-by: Marco Elver Signed-off-by: Paul E. McKenney commit 7441e7661d6586ae36329b7956e4d713d81e9903 Author: Paul E. McKenney Date: Wed Oct 30 09:37:11 2019 -0700 rcu: Switch force_qs_rnp() to for_each_leaf_node_cpu_mask() Currently, force_qs_rnp() uses a for_each_leaf_node_possible_cpu() loop containing a check of the current CPU's bit in ->qsmask. This works, but this commit saves three lines by instead using for_each_leaf_node_cpu_mask(), which combines the functionality of for_each_leaf_node_possible_cpu() and leaf_node_cpu_bit(). This commit also replaces the use of the local variable "bit" with rdp->grpmask. Signed-off-by: Paul E. McKenney commit e1350e8e0ea5d959c23c5e593ff3026a67dbb049 Author: Ben Dooks Date: Tue Oct 15 14:48:22 2019 +0100 rcu: Move rcu_{expedited,normal} definitions into rcupdate.h This commit moves the rcu_{expedited,normal} definitions from kernel/rcu/update.c to include/linux/rcupdate.h to make sure they are in sync, and also to avoid the following warning from sparse: kernel/ksysfs.c:150:5: warning: symbol 'rcu_expedited' was not declared. Should it be static? kernel/ksysfs.c:167:5: warning: symbol 'rcu_normal' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Paul E. McKenney commit e2167b38c87a0c9e85c342a823dae1e6f67b11d9 Author: Lai Jiangshan Date: Tue Oct 15 10:28:47 2019 +0000 rcu: Move gp_state_names[] and gp_state_getname() to tree_stall.h Only tree_stall.h needs to get name from GP state, so this commit moves the gp_state_names[] array and the gp_state_getname() from kernel/rcu/tree.h and kernel/rcu/tree.c, respectively, to kernel/rcu/tree_stall.h. While moving gp_state_names[], this commit uses the GCC syntax to ensure that the right string is associated with the right CPP macro. Signed-off-by: Lai Jiangshan Signed-off-by: Lai Jiangshan Signed-off-by: Paul E. McKenney commit 4778339df0ee361dbf2cbdcb87abaec9dfbc841d Author: Lai Jiangshan Date: Tue Oct 15 10:28:46 2019 +0000 rcu: Remove the declaration of call_rcu() in tree.h The call_rcu() function is an external RCU API that is declared in include/linux/rcupdate.h. There is thus no point in redeclaring it in kernel/rcu/tree.h, so this commit removes that redundant declaration. Signed-off-by: Lai Jiangshan Signed-off-by: Lai Jiangshan Signed-off-by: Paul E. McKenney commit 2488a5e695564897a0f8ea42cd3af71647cd26d2 Author: Lai Jiangshan Date: Tue Oct 15 10:23:57 2019 +0000 rcu: Fix tracepoint tracking RCU CPU kthread utilization In the call to trace_rcu_utilization() at the start of the loop in rcu_cpu_kthread(), "rcu_wait" is incorrect, plus this trace event needs to be hoisted above the loop to balance with either the "rcu_wait" or "rcu_yield", depending on how the loop exits. This commit therefore makes these changes. Signed-off-by: Lai Jiangshan Signed-off-by: Lai Jiangshan Signed-off-by: Paul E. McKenney commit 822175e72995a9ff7eeef4f5cd3f945f2697b67d Author: Lai Jiangshan Date: Tue Oct 15 10:23:56 2019 +0000 rcu: Fix harmless omission of "CONFIG_" from #if condition The C preprocessor macros SRCU and TINY_RCU should instead be CONFIG_SRCU and CONFIG_TINY_RCU, respectively in the #f in kernel/rcu/rcu.h. But there is no harm when "TINY_RCU" is wrongly used, which are always non-defined, which makes "!defined(TINY_RCU)" always true, which means the code block is always included, and the included code block doesn't cause any compilation error so far in CONFIG_TINY_RCU builds. It is also the reason this change should not be taken in -stable. This commit adds the needed "CONFIG_" prefix to both macros. Not for -stable. Signed-off-by: Lai Jiangshan Signed-off-by: Lai Jiangshan Signed-off-by: Paul E. McKenney commit 5b14557b073c96a7cf79adc4d7b6c4a8c26b2a43 Author: Paul E. McKenney Date: Tue Nov 26 18:05:45 2019 -0800 rcu: Avoid tick_dep_set_cpu() misordering In the current code, rcu_nmi_enter_common() might decide to turn on the tick using tick_dep_set_cpu(), but be delayed just before doing so. Then the grace-period kthread might notice that the CPU in question had in fact gone through a quiescent state, thus turning off the tick using tick_dep_clear_cpu(). The later invocation of tick_dep_set_cpu() would then incorrectly leave the tick on. This commit therefore enlists the aid of the leaf rcu_node structure's ->lock to ensure that decisions to enable or disable the tick are carried out before they can be reversed. Signed-off-by: Paul E. McKenney commit 77339e61aa309310a535bd01eb3388f7a27b36f9 Author: Lai Jiangshan Date: Fri Nov 15 14:08:53 2019 -0800 rcu: Provide wrappers for uses of ->rcu_read_lock_nesting This commit provides wrapper functions for uses of ->rcu_read_lock_nesting to improve readability and to ease future changes to support inlining of __rcu_read_lock() and __rcu_read_unlock(). Signed-off-by: Lai Jiangshan Signed-off-by: Paul E. McKenney commit c51f83c315c392d9776c33eb16a2fe1349d65c7f Author: Paul E. McKenney Date: Mon Nov 4 08:22:45 2019 -0800 rcu: Use READ_ONCE() for ->expmask in rcu_read_unlock_special() The rcu_node structure's ->expmask field is updated only when holding the ->lock, but is also accessed locklessly. This means that all ->expmask updates must use WRITE_ONCE() and all reads carried out without holding ->lock must use READ_ONCE(). This commit therefore changes the lockless ->expmask read in rcu_read_unlock_special() to use READ_ONCE(). Reported-by: syzbot+99f4ddade3c22ab0cf23@syzkaller.appspotmail.com Signed-off-by: Paul E. McKenney Acked-by: Marco Elver commit 3717e1e9f25ec7059e421ab6fc602cab7063c11c Author: Lai Jiangshan Date: Fri Nov 1 05:06:21 2019 -0700 rcu: Clear ->rcu_read_unlock_special only once In rcu_preempt_deferred_qs_irqrestore(), ->rcu_read_unlock_special is cleared one piece at a time. Given that the "if" statements in this function use the copy in "special", this commit removes the clearing of the individual pieces in favor of clearing ->rcu_read_unlock_special in one go just after it has been determined to be non-zero. Signed-off-by: Lai Jiangshan Signed-off-by: Paul E. McKenney commit 2eeba5838fd8c5e19bb91e25624116936348e7af Author: Lai Jiangshan Date: Fri Nov 1 04:06:22 2019 -0700 rcu: Clear .exp_hint only when deferred quiescent state has been reported Currently, the .exp_hint flag is cleared in rcu_read_unlock_special(), which works, but which can also prevent subsequent rcu_read_unlock() calls from helping expedite the quiescent state needed by an ongoing expedited RCU grace period. This commit therefore defers clearing of .exp_hint from rcu_read_unlock_special() to rcu_preempt_deferred_qs_irqrestore(), thus ensuring that intervening calls to rcu_read_unlock() have a chance to help end the expedited grace period. Signed-off-by: Lai Jiangshan Signed-off-by: Paul E. McKenney commit c130d2dc93cd03323494d82dbe7b5fb0d101ab62 Author: Lai Jiangshan Date: Tue Oct 15 10:28:48 2019 +0000 rcu: Rename some instance of CONFIG_PREEMPTION to CONFIG_PREEMPT_RCU CONFIG_PREEMPTION and CONFIG_PREEMPT_RCU are always identical, but some code depends on CONFIG_PREEMPTION to access to rcu_preempt functionality. This patch changes CONFIG_PREEMPTION to CONFIG_PREEMPT_RCU in these cases. Signed-off-by: Lai Jiangshan Signed-off-by: Lai Jiangshan Signed-off-by: Paul E. McKenney commit 189a6883dcf7fa70e17403ae4225c60ffc9e404b Author: Joel Fernandes (Google) Date: Fri Aug 30 12:36:33 2019 -0400 rcu: Remove kfree_call_rcu_nobatch() Now that the kfree_rcu() special-casing has been removed from tree RCU, this commit removes kfree_call_rcu_nobatch() since it is no longer needed. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 77a40f97030b27b3fc1640a3ed203870f0817f57 Author: Joel Fernandes (Google) Date: Fri Aug 30 12:36:32 2019 -0400 rcu: Remove kfree_rcu() special casing and lazy-callback handling This commit removes kfree_rcu() special-casing and the lazy-callback handling from Tree RCU. It moves some of this special casing to Tiny RCU, the removal of which will be the subject of later commits. This results in a nice negative delta. Suggested-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) [ paulmck: Add slab.h #include, thanks to kbuild test robot . ] Signed-off-by: Paul E. McKenney commit e99637becb2e684bee2b9117f817f4d1346b8353 Author: Joel Fernandes (Google) Date: Sun Sep 22 13:03:17 2019 -0700 rcu: Add support for debug_objects debugging for kfree_rcu() This commit applies RCU's debug_objects debugging to the new batched kfree_rcu() implementations. The object is queued at the kfree_rcu() call and dequeued during reclaim. Tested that enabling CONFIG_DEBUG_OBJECTS_RCU_HEAD successfully detects double kfree_rcu() calls. Signed-off-by: Joel Fernandes (Google) [ paulmck: Fix IRQ per kbuild test robot feedback. ] Signed-off-by: Paul E. McKenney commit 0392bebebf26f09434e6c7ca4c09c014efeef76a Author: Joel Fernandes (Google) Date: Thu Sep 19 14:58:26 2019 -0700 rcu: Add multiple in-flight batches of kfree_rcu() work During testing, it was observed that amount of memory consumed due kfree_rcu() batching is 300-400MB. Previously we had only a single head_free pointer pointing to the list of rcu_head(s) that are to be freed after a grace period. Until this list is drained, we cannot queue any more objects on it since such objects may not be ready to be reclaimed when the worker thread eventually gets to drainin g the head_free list. We can do better by maintaining multiple lists as done by this patch. Testing shows that memory consumption came down by around 100-150MB with just adding another list. Adding more than 1 additional list did not show any improvement. Suggested-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) [ paulmck: Code style and initialization handling. ] [ paulmck: Fix field name, reported by kbuild test robot . ] Signed-off-by: Paul E. McKenney commit 569d767087ef56a59bc2d1d5f25ee447eeae442a Author: Joel Fernandes Date: Sun Sep 22 10:49:57 2019 -0700 rcu: Make kfree_rcu() use a non-atomic ->monitor_todo Because the ->monitor_todo field is always protected by krcp->lock, this commit downgrades from xchg() to non-atomic unmarked assignment statements. Signed-off-by: Joel Fernandes [ paulmck: Update to include early-boot kick code. ] Signed-off-by: Paul E. McKenney commit e6e78b004fa7e0ab455d46d27f218bf6ce178a18 Author: Joel Fernandes (Google) Date: Fri Aug 30 12:36:29 2019 -0400 rcuperf: Add kfree_rcu() performance Tests This test runs kfree_rcu() in a loop to measure performance of the new kfree_rcu() batching functionality. The following table shows results when booting with arguments: rcuperf.kfree_loops=20000 rcuperf.kfree_alloc_num=8000 rcuperf.kfree_rcu_test=1 rcuperf.kfree_no_batch=X rcuperf.kfree_no_batch=X # Grace Periods Test Duration (s) X=1 (old behavior) 9133 11.5 X=0 (new behavior) 1732 12.5 On a 16 CPU system with the above boot parameters, we see that the total number of grace periods that elapse during the test drops from 9133 when not batching to 1732 when batching (a 5X improvement). The kfree_rcu() flood itself slows down a bit when batching, though, as shown. Note that the active memory consumption during the kfree_rcu() flood does increase to around 200-250MB due to the batching (from around 50MB without batching). However, this memory consumption is relatively constant. In other words, the system is able to keep up with the kfree_rcu() load. The memory consumption comes down considerably if KFREE_DRAIN_JIFFIES is increased from HZ/50 to HZ/80. A later patch will reduce memory consumption further by using multiple lists. Also, when running the test, please disable CONFIG_DEBUG_PREEMPT and CONFIG_PROVE_RCU for realistic comparisons with/without batching. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit a35d16905efc6ad5523d864a5c6efcb1e657e386 Author: Byungchul Park Date: Mon Aug 5 18:22:27 2019 -0400 rcu: Add basic support for kfree_rcu() batching Recently a discussion about stability and performance of a system involving a high rate of kfree_rcu() calls surfaced on the list [1] which led to another discussion how to prepare for this situation. This patch adds basic batching support for kfree_rcu(). It is "basic" because we do none of the slab management, dynamic allocation, code moving or any of the other things, some of which previous attempts did [2]. These fancier improvements can be follow-up patches and there are different ideas being discussed in those regards. This is an effort to start simple, and build up from there. In the future, an extension to use kfree_bulk and possibly per-slab batching could be done to further improve performance due to cache-locality and slab-specific bulk free optimizations. By using an array of pointers, the worker thread processing the work would need to read lesser data since it does not need to deal with large rcu_head(s) any longer. Torture tests follow in the next patch and show improvements of around 5x reduction in number of grace periods on a 16 CPU system. More details and test data are in that patch. There is an implication with rcu_barrier() with this patch. Since the kfree_rcu() calls can be batched, and may not be handed yet to the RCU machinery in fact, the monitor may not have even run yet to do the queue_rcu_work(), there seems no easy way of implementing rcu_barrier() to wait for those kfree_rcu()s that are already made. So this means a kfree_rcu() followed by an rcu_barrier() does not imply that memory will be freed once rcu_barrier() returns. Another implication is higher active memory usage (although not run-away..) until the kfree_rcu() flooding ends, in comparison to without batching. More details about this are in the second patch which adds an rcuperf test. Finally, in the near future we will get rid of kfree_rcu() special casing within RCU such as in rcu_do_batch and switch everything to just batching. Currently we don't do that since timer subsystem is not yet up and we cannot schedule the kfree_rcu() monitor as the timer subsystem's lock are not initialized. That would also mean getting rid of kfree_call_rcu_nobatch() entirely. [1] http://lore.kernel.org/lkml/20190723035725-mutt-send-email-mst@kernel.org [2] https://lkml.org/lkml/2017/12/19/824 Cc: kernel-team@android.com Cc: kernel-team@lge.com Co-developed-by: Byungchul Park Signed-off-by: Byungchul Park Signed-off-by: Joel Fernandes (Google) [ paulmck: Applied 0day and Paul Walmsley feedback on ->monitor_todo. ] [ paulmck: Make it work during early boot. ] [ paulmck: Add a crude early boot self-test. ] [ paulmck: Style adjustments and experimental docbook structure header. ] Link: https://lore.kernel.org/lkml/alpine.DEB.2.21.9999.1908161931110.32497@viisi.sifive.com/T/#me9956f66cb611b95d26ae92700e1d901f46e8c59 Signed-off-by: Paul E. McKenney commit 80f2388afa6ef985f9c5c228e36705c4d4db4756 Author: Eric Biggers Date: Thu Jan 23 20:15:49 2020 -0800 f2fs: fix race conditions in ->d_compare() and ->d_hash() Since ->d_compare() and ->d_hash() can be called in RCU-walk mode, ->d_parent and ->d_inode can be concurrently modified, and in particular, ->d_inode may be changed to NULL. For f2fs_d_hash() this resulted in a reproducible NULL dereference if a lookup is done in a directory being deleted, e.g. with: int main() { if (fork()) { for (;;) { mkdir("subdir", 0700); rmdir("subdir"); } } else { for (;;) access("subdir/file", 0); } } ... or by running the 't_encrypted_d_revalidate' program from xfstests. Both repros work in any directory on a filesystem with the encoding feature, even if the directory doesn't actually have the casefold flag. I couldn't reproduce a crash in f2fs_d_compare(), but it appears that a similar crash is possible there. Fix these bugs by reading ->d_parent and ->d_inode using READ_ONCE() and falling back to the case sensitive behavior if the inode is NULL. Reported-by: Al Viro Fixes: 2c2eb7a300cd ("f2fs: Support case-insensitive file name lookups") Cc: # v5.4+ Signed-off-by: Eric Biggers Signed-off-by: Jaegeuk Kim commit 5515eae647426169e4b7969271fb207881eba7f6 Author: Eric Biggers Date: Thu Jan 23 20:15:48 2020 -0800 f2fs: fix dcache lookup of !casefolded directories Do the name comparison for non-casefolded directories correctly. This is analogous to ext4's commit 66883da1eee8 ("ext4: fix dcache lookup of !casefolded directories"). Fixes: 2c2eb7a300cd ("f2fs: Support case-insensitive file name lookups") Cc: # v5.4+ Signed-off-by: Eric Biggers Signed-off-by: Jaegeuk Kim commit 600c39b34369e2a1bf78eb67afb99ce550f271cc Author: Sibi Sankar Date: Thu Jan 23 18:42:36 2020 +0530 remoteproc: qcom: q6v5-mss: Improve readability of reset_assert Define AXI_GATING_VALID_OVERRIDE and fixup comments to improve readability of Q6 modem reset sequence on SC7180 SoCs. Reviewed-by: Evan Green Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200123131236.1078-3-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 01bf3fec38e9188846f6755cd29da515f5852bc5 Author: Sibi Sankar Date: Thu Jan 23 18:42:35 2020 +0530 remoteproc: qcom: q6v5-mss: Use regmap_read_poll_timeout Replace the loop for HALT_ACK detection with regmap_read_poll_timeout. Reviewed-by: Evan Green Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200123131236.1078-2-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 06b9c269938ba1e9356b74584cd1ff738c0cf4de Author: Lukas Bulwahn Date: Sat Jan 18 16:36:20 2020 +0100 docs: nvdimm: use ReST notation for subsection The ACPI Device Specific Methods (_DSM) paragraph is intended to be a subsection of the Submit Checklist Addendum section. Dan Williams however used Markdown notation for this subsection, which does not parse as intended in a ReST documentation. Change the markup to ReST notation, as described in the Specific guidelines for the kernel documentation section in Documentation/doc-guide/sphinx.rst. Fixes: 47843401e3a0 ("libnvdimm, MAINTAINERS: Maintainer Entry Profile") Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20200118153620.8276-1-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet commit e91440ddfbf4a5d7c541aed8c55c0ec76d9b26c7 Author: Nathan Chancellor Date: Fri Jan 24 08:57:50 2020 -0700 ASoC: rt1015: Remove unnecessary const Clang warns: ../sound/soc/codecs/rt1015.c:392:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier] static const SOC_ENUM_SINGLE_DECL(rt1015_boost_mode_enum, 0, 0, ^ ../include/sound/soc.h:355:2: note: expanded from macro 'SOC_ENUM_SINGLE_DECL' SOC_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xtexts) ^ ../include/sound/soc.h:352:2: note: expanded from macro 'SOC_ENUM_DOUBLE_DECL' const struct soc_enum name = SOC_ENUM_DOUBLE(xreg, xshift_l, xshift_r, \ ^ 1 warning generated. Remove the const after static to fix it. Fixes: df31007400c3 ("ASoC: rt1015: add rt1015 amplifier driver") Link: https://github.com/ClangBuiltLinux/linux/issues/845 Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20200124155750.33753-1-natechancellor@gmail.com Signed-off-by: Mark Brown commit 3a6adf3263f43593c0df66a62ffed9daea562bfd Author: Marek Szyprowski Date: Thu Jan 23 14:40:46 2020 +0100 ASoC: max98090: silence lockdep warning Commit 08df0d9a00f7 ("ASoC: max98090: revert "ASoC: max98090: fix lockdep warning"") provided a good rationale for removing separate lock for the SHDN register access. However it restored the lockdep warning during the system boot. To silence the lockdep warning, mark the mutex taken in the max98090_shdn_save() function with the lockdep class dedicated for the runtime DAPM operations: SND_SOC_DAPM_CLASS_RUNTIME. This finally fixes the following lockdep warning observed on Exynos4412-based Odroid U3 board: ====================================================== WARNING: possible circular locking dependency detected 5.5.0-rc7-next-20200123 #7329 Not tainted ------------------------------------------------------ alsactl/1105 is trying to acquire lock: ed4f7cf4 (&card->dapm_mutex){+.+.}, at: max98090_shdn_save+0x1c/0x28 but task is already holding lock: edb8d49c (&card->controls_rwsem){++++}, at: snd_ctl_ioctl+0xcc/0xbb8 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&card->controls_rwsem){++++}: snd_ctl_add_replace+0x3c/0x84 dapm_create_or_share_kcontrol+0x24c/0x2e0 snd_soc_dapm_new_widgets+0x308/0x594 snd_soc_bind_card+0x834/0xa94 devm_snd_soc_register_card+0x34/0x6c odroid_audio_probe+0x288/0x34c platform_drv_probe+0x6c/0xa4 really_probe+0x200/0x48c driver_probe_device+0x78/0x1f8 bus_for_each_drv+0x74/0xb8 __device_attach+0xd4/0x16c bus_probe_device+0x88/0x90 deferred_probe_work_func+0x3c/0xd0 process_one_work+0x230/0x7bc worker_thread+0x44/0x524 kthread+0x130/0x164 ret_from_fork+0x14/0x20 0x0 -> #0 (&card->dapm_mutex){+.+.}: lock_acquire+0xe8/0x270 __mutex_lock+0x9c/0xb18 mutex_lock_nested+0x1c/0x24 max98090_shdn_save+0x1c/0x28 max98090_put_enum_double+0x20/0x40 snd_ctl_ioctl+0x190/0xbb8 ksys_ioctl+0x484/0xb10 ret_fast_syscall+0x0/0x28 0xbede0564 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&card->controls_rwsem); lock(&card->dapm_mutex); lock(&card->controls_rwsem); lock(&card->dapm_mutex); *** DEADLOCK *** 1 lock held by alsactl/1105: #0: edb8d49c (&card->controls_rwsem){++++}, at: snd_ctl_ioctl+0xcc/0xbb8 stack backtrace: CPU: 2 PID: 1105 Comm: alsactl Not tainted 5.5.0-rc7-next-20200123 #7329 Hardware name: Samsung Exynos (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xb4/0xe0) [] (dump_stack) from [] (check_noncircular+0x1ec/0x208) [] (check_noncircular) from [] (__lock_acquire+0x1210/0x25ec) [] (__lock_acquire) from [] (lock_acquire+0xe8/0x270) [] (lock_acquire) from [] (__mutex_lock+0x9c/0xb18) [] (__mutex_lock) from [] (mutex_lock_nested+0x1c/0x24) [] (mutex_lock_nested) from [] (max98090_shdn_save+0x1c/0x28) [] (max98090_shdn_save) from [] (max98090_put_enum_double+0x20/0x40) [] (max98090_put_enum_double) from [] (snd_ctl_ioctl+0x190/0xbb8) [] (snd_ctl_ioctl) from [] (ksys_ioctl+0x484/0xb10) [] (ksys_ioctl) from [] (ret_fast_syscall+0x0/0x28) Exception stack(0xed331fa8 to 0xed331ff0) ... Fixes: 08df0d9a00f7 ("ASoC: max98090: revert "ASoC: max98090: fix lockdep warning"") Signed-off-by: Marek Szyprowski Reviewed-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200123134046.9769-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown commit 5871023c3a316e8fe8c03e7bad1d35057e69ab40 Author: Yue Hu Date: Mon Jan 20 18:29:49 2020 +0800 zram: correct documentation about sysfs node of huge page writeback sysfs node for huge page writeback is writeback rather than write. Signed-off-by: Yue Hu Acked-by: Minchan Kim Link: https://lore.kernel.org/r/20200120102949.12132-1-zbestahu@gmail.com Signed-off-by: Jonathan Corbet commit a3e1c56a0b8f3b83807d67db4c3bdb6292a54dce Author: Randy Dunlap Date: Mon Jan 20 14:51:41 2020 -0800 Documentation: zram: various fixes in zram.rst Fix various items in zram.rst: - typos/spellos - punctuation - grammar - shell syntax - indentation - sysfs file names Signed-off-by: Randy Dunlap Acked-by: Minchan Kim Link: https://lore.kernel.org/r/77000e12-677a-62f6-9f78-343be5bd6630@infradead.org Signed-off-by: Jonathan Corbet commit 53b7f3aa411bb812c7a4f8af1ab9e0d2288b56cf Author: Jonathan Corbet Date: Wed Jan 22 16:05:43 2020 -0700 Add a maintainer entry profile for documentation Documentation should lead by example, so here's a basic maintainer entry profile for this subsystem. Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Jonathan Corbet commit d96574b0b49d6c93f148333bd36d541281fc4636 Author: Jonathan Corbet Date: Wed Jan 22 10:34:11 2020 -0700 Add a document on how to contribute to the documentation This is mostly a collection of thoughts for how people who want to help out can make the docs better. Hopefully the world will respond with a flurry of useful patches. Acked-by: Jani Nikula Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Randy Dunlap Signed-off-by: Jonathan Corbet commit bcac386f3d3940354e76ab6309e4279134848424 Author: Jonathan Corbet Date: Wed Jan 22 16:06:28 2020 -0700 docs: Keep up with the location of NoUri Sphinx 2.1 moved sphinx.environment.NoUri into sphinx.errors; that produced this warning in the docs build: /usr/lib/python3.7/site-packages/sphinx/registry.py:473: RemovedInSphinx30Warning: sphinx.environment.NoUri is deprecated. Grab NoUri from the right place and make the warning go away. That symbol was only added to sphinx.errors in 2.1, so we must still import it from the old location when running in older versions. Signed-off-by: Jonathan Corbet commit 1a980b8cbf0059a5308eea61522f232fd03002e2 Author: Murphy Zhou Date: Fri Jan 17 20:49:29 2020 +0800 ovl: add splice file read write helper Now overlayfs falls back to use default file splice read and write, which is not compatiple with overlayfs, returning EFAULT. xfstests generic/591 can reproduce part of this. Tested this patch with xfstests auto group tests. Signed-off-by: Murphy Zhou Signed-off-by: Miklos Szeredi commit e3b5ee0cfb65646f4a915643fe53e0a51829d891 Merge: 8c17bbf6c8f7 6855d1ba7537 154e3a65f404 857f081426e5 c11738cf9d29 Author: Joerg Roedel Date: Fri Jan 24 15:39:39 2020 +0100 Merge branches 'iommu/fixes', 'arm/smmu', 'x86/amd', 'x86/vt-d' and 'core' into next commit 154e3a65f404cfd5fbb7f49df01905d4ad025264 Author: Adrian Huang Date: Wed Jan 22 22:36:29 2020 +0800 iommu/amd: Remove the unnecessary assignment The assignment of the global variable 'iommu_detected' has been moved from amd_iommu_init_dma_ops() to amd_iommu_detect(), so this patch removes the assignment in amd_iommu_init_dma_ops(). Signed-off-by: Adrian Huang Signed-off-by: Joerg Roedel commit 857f081426e5aa38313426c13373730f1345fe95 Author: Lu Baolu Date: Thu Jan 16 09:52:36 2020 +0800 iommu/vt-d: Remove unnecessary WARN_ON_ONCE() Address field in device TLB invalidation descriptor is qualified by the S field. If S field is zero, a single page at page address specified by address [63:12] is requested to be invalidated. If S field is set, the least significant bit in the address field with value 0b (say bit N) indicates the invalidation address range. The spec doesn't require the address [N - 1, 0] to be cleared, hence remove the unnecessary WARN_ON_ONCE(). Otherwise, the caller might set "mask = MAX_AGAW_PFN_WIDTH" in order to invalidating all the cached mappings on an endpoint, and below overflow error will be triggered. [...] UBSAN: Undefined behaviour in drivers/iommu/dmar.c:1354:3 shift exponent 64 is too large for 64-bit type 'long long unsigned int' [...] Reported-and-tested-by: Frank Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit b89b6605b85f13b0cf41a047aa5759ea0a5663ec Author: Lu Baolu Date: Wed Jan 15 11:03:59 2020 +0800 iommu/vt-d: Unnecessary to handle default identity domain The iommu default domain framework has been designed to take care of setting identity default domain type. It's unnecessary to handle this again in the VT-d driver. Hence, remove it. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 9235cb13d7d17baba0b3a9277381258361e95c16 Author: Lu Baolu Date: Wed Jan 15 11:03:58 2020 +0800 iommu/vt-d: Allow devices with RMRRs to use identity domain Since commit ea2447f700cab ("intel-iommu: Prevent devices with RMRRs from being placed into SI Domain"), the Intel IOMMU driver doesn't allow any devices with RMRR locked to use the identity domain. This was added to to fix the issue where the RMRR info for devices being placed in and out of the identity domain gets lost. This identity maps all RMRRs when setting up the identity domain, so that devices with RMRRs could also use it. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit ce4cc52b51dfaefff65c6d2f31f169122a8659d4 Author: Barret Rhoden Date: Wed Jan 15 11:03:57 2020 +0800 iommu/vt-d: Add RMRR base and end addresses sanity check The VT-d spec specifies requirements for the RMRR entries base and end (called 'Limit' in the docs) addresses. This commit will cause the DMAR processing to mark the firmware as tainted if any RMRR entries that do not meet these requirements. Signed-off-by: Barret Rhoden Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit f5a68bb0752e0cf77c06f53f72258e7beb41381b Author: Barret Rhoden Date: Wed Jan 15 11:03:56 2020 +0800 iommu/vt-d: Mark firmware tainted if RMRR fails sanity check RMRR entries describe memory regions that are DMA targets for devices outside the kernel's control. RMRR entries that fail the sanity check are pointing to regions of memory that the firmware did not tell the kernel are reserved or otherwise should not be used. Instead of aborting DMAR processing, this commit marks the firmware as tainted. These RMRRs will still be identity mapped, otherwise, some devices, e.x. graphic devices, will not work during boot. Signed-off-by: Barret Rhoden Signed-off-by: Lu Baolu Fixes: f036c7fa0ab60 ("iommu/vt-d: Check VT-d RMRR region in BIOS is reported as reserved") Signed-off-by: Joerg Roedel commit 0552e05fdfea191a2cf3a0abd33574b5ef9ca818 Author: Rafael J. Wysocki Date: Thu Jan 23 00:11:24 2020 +0100 PM: core: Fix handling of devices deleted during system-wide resume If a device is deleted by one of its system-wide resume callbacks (for example, because it does not appear to be present or accessible any more) along with its children, the resume of the children may continue leading to use-after-free errors and other issues (potentially). Namely, if the device's children are resumed asynchronously, their resume may have been scheduled already before the device's callback runs and so the device may be deleted while dpm_wait_for_superior() is being executed for them. The memory taken up by the parent device object may be freed then while dpm_wait() is waiting for the parent's resume callback to complete, which leads to a use-after-free. Moreover, the resume of the children is really not expected to continue after they have been unregistered, so it must be terminated right away in that case. To address this problem, modify dpm_wait_for_superior() to check if the target device is still there in the system-wide PM list of devices and if so, to increment its parent's reference counter, both under dpm_list_mtx which prevents device_del() running for the child from dropping the parent's reference counter prematurely. If the device is not present in the system-wide PM list of devices any more, the resume of it cannot continue, so check that again after dpm_wait() returns, which means that the parent's callback has been completed, and pass the result of that check to the caller of dpm_wait_for_superior() to allow it to abort the device's resume if it is not there any more. Link: https://lore.kernel.org/linux-pm/1579568452-27253-1-git-send-email-chanho.min@lge.com Reported-by: Chanho Min Cc: All applicable Signed-off-by: Rafael J. Wysocki Acked-by: Greg Kroah-Hartman commit 08a45c59f16efe33ca715e894231a9b7afd3b7b4 Merge: 23f4eacdd24a 8ab183deb26a Author: David S. Miller Date: Fri Jan 24 13:44:08 2020 +0100 Merge branch 'mptcp-part-two' Christoph Paasch says: ==================== Multipath TCP part 2: Single subflow & RFC8684 support v2 -> v3: Added RFC8684-style handshake (see below fore more details) and some minor fixes v1 -> v2: Rebased on latest "Multipath TCP: Prerequisites" v3 series This set adds MPTCP connection establishment, writing & reading MPTCP options on data packets, a sysctl to allow MPTCP per-namespace, and self tests. This is sufficient to establish and maintain a connection with a MPTCP peer, but will not yet allow or initiate establishment of additional MPTCP subflows. We also add the necessary code for the RFC8684-style handshake. RFC8684 obsoletes the experimental RFC6824 and makes MPTCP move-on to version 1. Originally our plan was to submit single-subflow and RFC8684 support in two patchsets, but to simplify the merging-process and ensure that a coherent MPTCP-version lands in Linux we decided to merge the two sets into a single one. The MPTCP patchset exclusively supports RFC 8684. Although all MPTCP deployments are currently based on RFC 6824, future deployments will be migrating to MPTCP version 1. 3GPP's 5G standardization also solely supports RFC 8684. In addition, we believe that this initial submission of MPTCP will be cleaner by solely supporting RFC 8684. If later on support for the old MPTCP-version is required it can always be added in the future. The major difference between RFC 8684 and RFC 6824 is that it has a better support for servers using TCP SYN-cookies by reliably retransmitting the MP_CAPABLE option. Before ending this cover letter with some refs, it is worth mentioning that we promise David Miller that merging this series will be rewarded by Twitter dopamine hits :-D Clone/fetch: https://github.com/multipath-tcp/mptcp_net-next.git (tag: netdev-v3-part2) Browse: https://github.com/multipath-tcp/mptcp_net-next/tree/netdev-v3-part2 Thank you for your review. You can find us at mptcp@lists.01.org and https://is.gd/mptcp_upstream ==================== Signed-off-by: David S. Miller commit 8ab183deb26a3b79f8021afa9e83cc1bbd812031 Author: Paolo Abeni Date: Tue Jan 21 16:56:33 2020 -0800 mptcp: cope with later TCP fallback With MPTCP v1, passive connections can fallback to TCP after the subflow becomes established: syn + MP_CAPABLE -> <- syn, ack + MP_CAPABLE ack, seq = 3 -> // OoO packet is accepted because in-sequence // passive socket is created, is in ESTABLISHED // status and tentatively as MP_CAPABLE ack, seq = 2 -> // no MP_CAPABLE opt, subflow should fallback to TCP We can't use the 'subflow' socket fallback, as we don't have it available for passive connection. Instead, when the fallback is detected, replace the mptcp socket with the underlying TCP subflow. Beyond covering the above scenario, it makes a TCP fallback socket as efficient as plain TCP ones. Co-developed-by: Florian Westphal Signed-off-by: Florian Westphal Signed-off-by: Paolo Abeni Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit d22f4988ffecbe284e4d00e897525adbd0edd801 Author: Christoph Paasch Date: Tue Jan 21 16:56:32 2020 -0800 mptcp: process MP_CAPABLE data option This patch implements the handling of MP_CAPABLE + data option, as per RFC 6824 bis / RFC 8684: MPTCP v1. On the server side we can receive the remote key after that the connection is established. We need to explicitly track the 'missing remote key' status and avoid emitting a mptcp ack until we get such info. When a late/retransmitted/OoO pkt carrying MP_CAPABLE[+data] option is received, we have to propagate the mptcp seq number info to the msk socket. To avoid ABBA locking issue, explicitly check for that in recvmsg(), where we own msk and subflow sock locks. The above also means that an established mp_capable subflow - still waiting for the remote key - can be 'downgraded' to plain TCP. Such change could potentially block a reader waiting for new data forever - as they hook to msk, while later wake-up after the downgrade will be on subflow only. The above issue is not handled here, we likely have to get rid of msk->fallback to handle that cleanly. Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit cc7972ea1932335e0a0ee00ac8a24b3e8304630d Author: Christoph Paasch Date: Tue Jan 21 16:56:31 2020 -0800 mptcp: parse and emit MP_CAPABLE option according to v1 spec This implements MP_CAPABLE options parsing and writing according to RFC 6824 bis / RFC 8684: MPTCP v1. Local key is sent on syn/ack, and both keys are sent on 3rd ack. MP_CAPABLE messages len are updated accordingly. We need the skbuff to correctly emit the above, so we push the skbuff struct as an argument all the way from tcp code to the relevant mptcp callbacks. When processing incoming MP_CAPABLE + data, build a full blown DSS-like map info, to simplify later processing. On child socket creation, we need to record the remote key, if available. Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit 65492c5a6ab5df5091a77562dbcca2d2dc3877c0 Author: Paolo Abeni Date: Tue Jan 21 16:56:30 2020 -0800 mptcp: move from sha1 (v0) to sha256 (v1) For simplicity's sake use directly sha256 primitives (and pull them as a required build dep). Add optional, boot-time self-tests for the hmac function. Signed-off-by: Paolo Abeni Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit 048d19d444be1e42abca19a6b969343954ae4e17 Author: Florian Westphal Date: Tue Jan 21 16:56:29 2020 -0800 mptcp: add basic kselftest for mptcp Add mptcp_connect tool: xmit two files back and forth between two processes, several net namespaces including some adding delays, losses and reordering. Wrapper script tests that data was transmitted without corruption. The "-c" command line option for mptcp_connect.sh is there for debugging: The script will use tcpdump to create one .pcap file per test case, named according to the namespaces, protocols, and connect address in use. For example, the first test case writes the capture to ns1-ns1-MPTCP-MPTCP-10.0.1.1.pcap. The stderr output from tcpdump is printed after the test completes to show tcpdump's "packets dropped by kernel" information. Also check that userspace can't create MPTCP sockets when mptcp.enabled sysctl is off. The "-b" option allows to tune/lower send buffer size. "-m mmap" can be used to test blocking io. Default is non-blocking io using read/write/poll. Will run automatically on "make kselftest". Note that the default timeout of 45 seconds is used even if there is a "settings" changing it to 450. 45 seconds should be enough in most cases but this depends on the machine running the tests. A fix to correctly read the "settings" file has been proposed upstream but not applied yet. It is not blocking the execution of these new tests but it would be nice to have it: https://patchwork.kernel.org/patch/11204935/ Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Co-developed-by: Mat Martineau Signed-off-by: Mat Martineau Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Co-developed-by: Davide Caratti Signed-off-by: Davide Caratti Signed-off-by: Florian Westphal Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit 784325e9f037e5f7a7f9a46ecbb27384128f8b6e Author: Matthieu Baerts Date: Tue Jan 21 16:56:28 2020 -0800 mptcp: new sysctl to control the activation per NS New MPTCP sockets will return -ENOPROTOOPT if MPTCP support is disabled for the current net namespace. We are providing here a way to control access to the feature for those that need to turn it on or off. The value of this new sysctl can be different per namespace. We can then restrict the usage of MPTCP to the selected NS. In case of serious issues with MPTCP, administrators can now easily turn MPTCP off. Co-developed-by: Peter Krystad Signed-off-by: Peter Krystad Signed-off-by: Matthieu Baerts Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit 57040755a3e43a1ee2d4ce9c83e87de27b570104 Author: Paolo Abeni Date: Tue Jan 21 16:56:27 2020 -0800 mptcp: allow collapsing consecutive sendpages on the same substream If the current sendmsg() lands on the same subflow we used last, we can try to collapse the data. Signed-off-by: Paolo Abeni Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit 7a6a6cbc3e592e339ad23e4e8ede9a3f6160bda8 Author: Paolo Abeni Date: Tue Jan 21 16:56:26 2020 -0800 mptcp: recvmsg() can drain data from multiple subflows With the previous patch in place, the msk can detect which subflow has the current map with a simple walk, let's update the main loop to always select the 'current' subflow. The exit conditions now closely mirror tcp_recvmsg() to get expected timeout and signal behavior. Co-developed-by: Peter Krystad Signed-off-by: Peter Krystad Co-developed-by: Davide Caratti Signed-off-by: Davide Caratti Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Co-developed-by: Mat Martineau Signed-off-by: Mat Martineau Co-developed-by: Florian Westphal Signed-off-by: Florian Westphal Signed-off-by: Paolo Abeni Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit 1891c4a07672b300b3160ceec59755063b20222b Author: Florian Westphal Date: Tue Jan 21 16:56:25 2020 -0800 mptcp: add subflow write space signalling and mptcp_poll Add new SEND_SPACE flag to indicate that a subflow has enough space to accept more data for transmission. It gets cleared at the end of mptcp_sendmsg() in case ssk has run below the free watermark. It is (re-set) from the wspace callback. This allows us to use msk->flags to determine the poll mask. Co-developed-by: Peter Krystad Signed-off-by: Peter Krystad Signed-off-by: Florian Westphal Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit 648ef4b88673dadb8463bf0d4b10fbf33d55def8 Author: Mat Martineau Date: Tue Jan 21 16:56:24 2020 -0800 mptcp: Implement MPTCP receive path Parses incoming DSS options and populates outgoing MPTCP ACK fields. MPTCP fields are parsed from the TCP option header and placed in an skb extension, allowing the upper MPTCP layer to access MPTCP options after the skb has gone through the TCP stack. The subflow implements its own data_ready() ops, which ensures that the pending data is in sequence - according to MPTCP seq number - dropping out-of-seq skbs. The DATA_READY bit flag is set if this is the case. This allows the MPTCP socket layer to determine if more data is available without having to consult the individual subflows. It additionally validates the current mapping and propagates EoF events to the connection socket. Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Co-developed-by: Peter Krystad Signed-off-by: Peter Krystad Co-developed-by: Davide Caratti Signed-off-by: Davide Caratti Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Co-developed-by: Florian Westphal Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit 6d0060f600adfddaa43fefb96b6b12643331961e Author: Mat Martineau Date: Tue Jan 21 16:56:23 2020 -0800 mptcp: Write MPTCP DSS headers to outgoing data packets Per-packet metadata required to write the MPTCP DSS option is written to the skb_ext area. One write to the socket may contain more than one packet of data, which is copied to page fragments and mapped in to MPTCP DSS segments with size determined by the available page fragments and the maximum mapping length allowed by the MPTCP specification. If do_tcp_sendpages() splits a DSS segment in to multiple skbs, that's ok - the later skbs can either have duplicated DSS mapping information or none at all, and the receiver can handle that. The current implementation uses the subflow frag cache and tcp sendpages to avoid excessive code duplication. More work is required to ensure that it works correctly under memory pressure and to support MPTCP-level retransmissions. The MPTCP DSS checksum is not yet implemented. Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Co-developed-by: Peter Krystad Signed-off-by: Peter Krystad Co-developed-by: Florian Westphal Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit 717e79c867ca5f27815578815feafa3f3944f06b Author: Peter Krystad Date: Tue Jan 21 16:56:22 2020 -0800 mptcp: Add setsockopt()/getsockopt() socket operations set/getsockopt behaviour with multiple subflows is undefined. Therefore, for now, we return -EOPNOTSUPP unless we're in fallback mode. Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Peter Krystad Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit 214984901aaf50cc52eebeabf14017edeb3a845f Author: Peter Krystad Date: Tue Jan 21 16:56:21 2020 -0800 mptcp: Add shutdown() socket operation Call shutdown on all subflows in use on the given socket, or on the fallback socket. Co-developed-by: Florian Westphal Signed-off-by: Florian Westphal Signed-off-by: Peter Krystad Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit 79c0949e9a09f6a14a6dd18dc8396029423f9b68 Author: Peter Krystad Date: Tue Jan 21 16:56:20 2020 -0800 mptcp: Add key generation and token tree Generate the local keys, IDSN, and token when creating a new socket. Introduce the token tree to track all tokens in use using a radix tree with the MPTCP token itself as the index. Override the rebuild_header callback in inet_connection_sock_af_ops for creating the local key on a new outgoing connection. Override the init_req callback of tcp_request_sock_ops for creating the local key on a new incoming connection. Will be used to obtain the MPTCP parent socket to handle incoming joins. Co-developed-by: Davide Caratti Signed-off-by: Davide Caratti Co-developed-by: Florian Westphal Signed-off-by: Florian Westphal Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Peter Krystad Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit cf7da0d66cc1a2a19fc5930bb746ffbb2d4cd1be Author: Peter Krystad Date: Tue Jan 21 16:56:19 2020 -0800 mptcp: Create SUBFLOW socket for incoming connections Add subflow_request_sock type that extends tcp_request_sock and add an is_mptcp flag to tcp_request_sock distinguish them. Override the listen() and accept() methods of the MPTCP socket proto_ops so they may act on the subflow socket. Override the conn_request() and syn_recv_sock() handlers in the inet_connection_sock to handle incoming MPTCP SYNs and the ACK to the response SYN. Add handling in tcp_output.c to add MP_CAPABLE to an outgoing SYN-ACK response for a subflow_request_sock. Co-developed-by: Davide Caratti Signed-off-by: Davide Caratti Co-developed-by: Florian Westphal Signed-off-by: Florian Westphal Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Peter Krystad Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit cec37a6e41aae7bf3df9a3da783380a4d9325fd8 Author: Peter Krystad Date: Tue Jan 21 16:56:18 2020 -0800 mptcp: Handle MP_CAPABLE options for outgoing connections Add hooks to tcp_output.c to add MP_CAPABLE to an outgoing SYN request, to capture the MP_CAPABLE in the received SYN-ACK, to add MP_CAPABLE to the final ACK of the three-way handshake. Use the .sk_rx_dst_set() handler in the subflow proto to capture when the responding SYN-ACK is received and notify the MPTCP connection layer. Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Co-developed-by: Florian Westphal Signed-off-by: Florian Westphal Signed-off-by: Peter Krystad Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit 2303f994b3e187091fd08148066688b08f837efc Author: Peter Krystad Date: Tue Jan 21 16:56:17 2020 -0800 mptcp: Associate MPTCP context with TCP socket Use ULP to associate a subflow_context structure with each TCP subflow socket. Creating these sockets requires new bind and connect functions to make sure ULP is set up immediately when the subflow sockets are created. Co-developed-by: Florian Westphal Signed-off-by: Florian Westphal Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Co-developed-by: Davide Caratti Signed-off-by: Davide Caratti Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Peter Krystad Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit eda7acddf8080bb2d022a8d4b8b2345eb80c63ec Author: Peter Krystad Date: Tue Jan 21 16:56:16 2020 -0800 mptcp: Handle MPTCP TCP options Add hooks to parse and format the MP_CAPABLE option. This option is handled according to MPTCP version 0 (RFC6824). MPTCP version 1 MP_CAPABLE (RFC6824bis/RFC8684) will be added later in coordination with related code changes. Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Co-developed-by: Florian Westphal Signed-off-by: Florian Westphal Co-developed-by: Davide Caratti Signed-off-by: Davide Caratti Signed-off-by: Peter Krystad Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit f870fa0b5768842cb4690c1c11f19f28b731ae6d Author: Mat Martineau Date: Tue Jan 21 16:56:15 2020 -0800 mptcp: Add MPTCP socket stubs Implements the infrastructure for MPTCP sockets. MPTCP sockets open one in-kernel TCP socket per subflow. These subflow sockets are only managed by the MPTCP socket that owns them and are not visible from userspace. This commit allows a userspace program to open an MPTCP socket with: sock = socket(AF_INET, SOCK_STREAM, IPPROTO_MPTCP); The resulting socket is simply a wrapper around a single regular TCP socket, without any of the MPTCP protocol implemented over the wire. Co-developed-by: Florian Westphal Signed-off-by: Florian Westphal Co-developed-by: Peter Krystad Signed-off-by: Peter Krystad Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Christoph Paasch Signed-off-by: David S. Miller commit 23f4eacdd24a64e7792bdee7327d32876e14cd51 Merge: 9bbc8be29d66 a580c76d534c Author: David S. Miller Date: Fri Jan 24 12:58:14 2020 +0100 Merge branch 'net-bridge-add-per-vlan-state-option' Nikolay Aleksandrov says: ==================== net: bridge: add per-vlan state option This set adds the first per-vlan option - state, which uses the new vlan infrastructure that was recently added. It gives us forwarding control on per-vlan basis. The first 3 patches prepare the vlan code to support option dumping and modification. We still compress vlan ranges which have equal options, each new option will have to add its own equality check to br_vlan_opts_eq(). The vlans are created in forwarding state by default to be backwards compatible and vlan state is considered only when the port state is forwarding (more info in patch 4). I'll send the selftest for the vlan state with the iproute2 patch-set. v2: patch 3: do full (all-vlan) notification only on vlan create/delete, otherwise use the per-vlan notifications only, rework how option change ranges are detected, add more verbose error messages when setting options and add checks if a vlan should be used. ==================== Signed-off-by: David S. Miller commit a580c76d534c7360ba68042b19cb255e8420e987 Author: Nikolay Aleksandrov Date: Fri Jan 24 13:40:22 2020 +0200 net: bridge: vlan: add per-vlan state The first per-vlan option added is state, it is needed for EVPN and for per-vlan STP. The state allows to control the forwarding on per-vlan basis. The vlan state is considered only if the port state is forwarding in order to avoid conflicts and be consistent. br_allowed_egress is called only when the state is forwarding, but the ingress case is a bit more complicated due to the fact that we may have the transition between port:BR_STATE_FORWARDING -> vlan:BR_STATE_LEARNING which should still allow the bridge to learn from the packet after vlan filtering and it will be dropped after that. Also to optimize the pvid state check we keep a copy in the vlan group to avoid one lookup. The state members are modified with *_ONCE() to annotate the lockless access. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit a5d29ae226812ae620f58a0726525d8af9b1d751 Author: Nikolay Aleksandrov Date: Fri Jan 24 13:40:21 2020 +0200 net: bridge: vlan: add basic option setting support This patch adds support for option modification of single vlans and ranges. It allows to only modify options, i.e. skip create/delete by using the BRIDGE_VLAN_INFO_ONLY_OPTS flag. When working with a range option changes we try to pack the notifications as much as possible. v2: do full port (all vlans) notification only when creating/deleting vlans for compatibility, rework the range detection when changing options, add more verbose extack errors and check if a vlan should be used (br_vlan_should_use checks) Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 7a53e718c551752924416b33235bf338729b5115 Author: Nikolay Aleksandrov Date: Fri Jan 24 13:40:20 2020 +0200 net: bridge: vlan: add basic option dumping support We'll be dumping the options for the whole range if they're equal. The first range vlan will be used to extract the options. The commit doesn't change anything yet it just adds the skeleton for the support. The dump will happen when the first option is added. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit ac0e932d0e2988c125be251715d83e95839cdae3 Author: Nikolay Aleksandrov Date: Fri Jan 24 13:40:19 2020 +0200 net: bridge: check port state before br_allowed_egress If we make sure that br_allowed_egress is called only when we have BR_STATE_FORWARDING state then we can avoid a test later when we add per-vlan state. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 533a6cfe08f96a7b5c65e06d20916d552c11b256 Author: Ulf Hansson Date: Wed Jan 22 15:27:47 2020 +0100 mmc: core: Default to generic_cmd6_time as timeout in __mmc_switch() All callers of __mmc_switch() should now be specifying a valid timeout for the CMD6 command. However, just to be sure, let's print a warning and default to use the generic_cmd6_time in case the provided timeout_ms argument is zero. In this context, let's also simplify some of the corresponding code and clarify some related comments. Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20200122142747.5690-4-ulf.hansson@linaro.org commit ad91619aa9d78ab1c6d4a969c3db68bc331ae76c Author: Ulf Hansson Date: Wed Jan 22 15:27:46 2020 +0100 mmc: block: Use generic_cmd6_time when modifying INAND_CMD38_ARG_EXT_CSD The INAND_CMD38_ARG_EXT_CSD is a vendor specific EXT_CSD register, which is used to prepare an erase/trim operation. However, it doesn't make sense to use a timeout of 10 minutes while updating the register, which becomes the case when the timeout_ms argument for mmc_switch() is set to zero. Instead, let's use the generic_cmd6_time, as that seems like a reasonable timeout to use for these cases. Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20200122142747.5690-3-ulf.hansson@linaro.org commit 24ed3bd01d6a844fd5e8a75f48d0a3d10ed71bf9 Author: Ulf Hansson Date: Wed Jan 22 15:27:45 2020 +0100 mmc: core: Specify timeouts for BKOPS and CACHE_FLUSH for eMMC The timeout values used while waiting for a CMD6 for BKOPS or a CACHE_FLUSH to complete, are not defined by the eMMC spec. However, a timeout of 10 minutes as is currently being used, is just silly for both of these cases. Instead, let's specify more reasonable timeouts, 120s for BKOPS and 30s for CACHE_FLUSH. Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20200122142747.5690-2-ulf.hansson@linaro.org commit 1d45a3f47c0be28989cdbace166e4f73214ff88c Author: Masahiro Yamada Date: Tue Jan 21 19:58:58 2020 +0900 mmc: sdhci-cadence: remove unneeded 'inline' marker 'static inline' in .c files does not make much sense because functions may or may not be inlined irrespective of the 'inline' marker. It is just a hint. This function is quite small, so very likely to be inlined by the compiler's optimization (-O2 or -Os), but it is up to the compiler after all. Signed-off-by: Masahiro Yamada Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200121105858.13325-1-yamada.masahiro@socionext.com Signed-off-by: Ulf Hansson commit be28d4da7c73f51d4ccd5c3f9cd215d0858bc8c8 Author: Benoit Parrot Date: Wed Dec 11 08:05:58 2019 -0600 arm64: dts: ti: k3-am654-base-board: Add CSI2 OV5640 camera Add support for the OV5640 CSI camera: - add the OV5640 nodes - add the CAL node linkage - enable CAL node Signed-off-by: Benoit Parrot Signed-off-by: Tero Kristo commit e98a0424817a08e2e62bdb1cc49de8da38bf6a3d Author: Benoit Parrot Date: Wed Dec 11 08:05:57 2019 -0600 arm64: dts: ti: k3-am65-main Add CAL node Add CAL dtsi node for AM654 device. Including proper power-domains and clock properties. Signed-off-by: Benoit Parrot Signed-off-by: Tero Kristo commit c389b0035f0cda5f59f2514303feb9586b6f493a Author: Johan Jonker Date: Thu Jan 16 16:22:30 2020 +0100 dt-bindings: mmc: rockchip-dw-mshc: add description for rk3308 The description below is already in use for rk3308.dtsi, but was somehow never added to a document, so add "rockchip,rk3308-dw-mshc", "rockchip,rk3288-dw-mshc" for mmc nodes on a rk3308 platform to rockchip-dw-mshc.yaml. Signed-off-by: Johan Jonker Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200116152230.29831-3-jbx6244@gmail.com Signed-off-by: Ulf Hansson commit 1eece23dba3230572d9c64fd530167aac8ada2f7 Author: Johan Jonker Date: Thu Jan 16 16:22:29 2020 +0100 dt-bindings: mmc: convert rockchip dw-mshc bindings to yaml Current dts files with 'dwmmc' nodes are manually verified. In order to automate this process rockchip-dw-mshc.txt has to be converted to yaml. In the new setup rockchip-dw-mshc.yaml will inherit properties from mmc-controller.yaml and synopsys-dw-mshc-common.yaml. 'dwmmc' will no longer be a valid name for a node and should be changed to 'mmc'. Signed-off-by: Johan Jonker Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200116152230.29831-2-jbx6244@gmail.com Signed-off-by: Ulf Hansson commit 8655ff21c8ce6e6332166d518c2444652f0b99b6 Author: Johan Jonker Date: Thu Jan 16 16:22:28 2020 +0100 dt-bindings: mmc: convert synopsys dw-mshc bindings to yaml Current dts files with 'dwmmc' nodes are manually verified. In order to automate this process synopsys-dw-mshc.txt has to be converted to yaml. In the new setup synopsys-dw-mshc.yaml will inherit properties from mmc-controller.yaml and synopsys-dw-mshc-common.yaml. 'dwmmc' will no longer be a valid name for a node and should be changed to 'mmc'. Signed-off-by: Johan Jonker Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200116152230.29831-1-jbx6244@gmail.com Signed-off-by: Ulf Hansson commit 87a8df0dce6ad0af14c08858fa51dfcc8c509ab3 Author: Ritesh Harjani Date: Thu Jan 16 22:33:11 2020 +0530 mmc: sdhci-msm: Add CQHCI support for sdhci-msm This adds CQHCI support for sdhci-msm platforms. Signed-off-by: Ritesh Harjani Signed-off-by: Veerabhadrarao Badiganti Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/1579194192-7942-3-git-send-email-vbadigan@codeaurora.org Signed-off-by: Ulf Hansson commit a663f64bf18dea0816642ff343c5e3bf8fb22fca Author: Veerabhadrarao Badiganti Date: Mon Jan 20 20:08:38 2020 +0530 mmc: sdhci: Let a vendor driver supply and update ADMA descriptor size Let a vendor driver supply the maximum descriptor size that it can operate on. ADMA descriptor table would be allocated using this supplied size. If any SD Host controller is of version prior to v4.10 spec but supports 16byte descriptor, this change allows them to supply correct descriptor size for ADMA table allocation. Also let a vendor driver update the descriptor size by overriding sdhc_host->desc_size if it has to operates on a different descriptor sizes in different conditions. Suggested-by: Adrian Hunter Signed-off-by: Veerabhadrarao Badiganti Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/1579531122-28341-1-git-send-email-vbadigan@codeaurora.org Signed-off-by: Ulf Hansson commit 41258289a8e9e3e110bab316e0aeded25fa8beb6 Author: Andrii Nakryiko Date: Thu Jan 23 21:43:17 2020 -0800 bpftool: Print function linkage in BTF dump Add printing out BTF_KIND_FUNC's linkage. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20200124054317.2459436-1-andriin@fb.com commit 03506297d205e5fa25b5ead0f6338b5a4a996a93 Author: Andrii Nakryiko Date: Thu Jan 23 21:41:48 2020 -0800 selftests/bpf: Improve bpftool changes detection Detect when bpftool source code changes and trigger rebuild within selftests/bpf Makefile. Also fix few small formatting problems. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20200124054148.2455060-1-andriin@fb.com commit 1a6fa10640d97e16d4184fa1c24aa8c3337d4653 Author: John Sperbeck Date: Thu Jan 23 15:51:44 2020 -0800 selftests/bpf: Initialize duration variable before using The 'duration' variable is referenced in the CHECK() macro, and there are some uses of the macro before 'duration' is set. The clang compiler (validly) complains about this. Sample error: .../selftests/bpf/prog_tests/fexit_test.c:23:6: warning: variable 'duration' is uninitialized when used here [-Wuninitialized] if (CHECK(err, "prog_load sched cls", "err %d errno %d\n", err, errno)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .../selftests/bpf/test_progs.h:134:25: note: expanded from macro 'CHECK' if (CHECK(err, "prog_load sched cls", "err %d errno %d\n", err, errno)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _CHECK(condition, tag, duration, format) ^~~~~~~~ Signed-off-by: John Sperbeck Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200123235144.93610-1-sdf@google.com commit fc157998b8257fb9cfe753e7f4af1411da995c9b Author: Christian Gromm Date: Thu Jan 23 16:38:23 2020 +0100 staging: most: usb: check for NULL device Check if the dci structer has been allocated before trying to release it. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1579793906-5054-8-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit f9e6b51a998da782cfc201dc9309d3a3d8579fef Author: Christian Gromm Date: Thu Jan 23 16:38:22 2020 +0100 staging: next: configfs: fix release link The functions link_destroy and link_release are both deleting list items. link_release, however, does not check whether a certain link has already been deleted from the list by function link_destroy. By fixing this this patch prevents a kernel crash when removing the configuration directory of a link that already has been destroyed. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1579793906-5054-7-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit b7935e52dd98696a8c1379f5b67b0c344ee3bc35 Author: Christian Gromm Date: Thu Jan 23 16:38:21 2020 +0100 staging: most: core: fix logging messages This patch fixes the module's logging messages. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1579793906-5054-6-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit d693e90d897854b09b9267350920cda964a66c11 Author: Christian Gromm Date: Thu Jan 23 16:38:20 2020 +0100 staging: most: core: remove container struct This patch declares and initializes the bus, bus driver and the component list without a container struct, as it introduces an unnecessary level of abstraction. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1579793906-5054-5-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 6a82c7758129441e7450703e6887d6cde003ff85 Author: Christian Gromm Date: Thu Jan 23 16:38:19 2020 +0100 staging: most: remove struct device core driver This patch removes the device from the MOST core driver and uses the device from the adapter driver. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1579793906-5054-4-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 2485055394be272d098ca7dd63193d5041fb8140 Author: Christian Gromm Date: Thu Jan 23 16:38:18 2020 +0100 staging: most: core: drop device reference This patch drops the device reference added by function bus_find_device_by_name. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1579793906-5054-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 723de0f9171eeb49a3ae98cae82ebbbb992b3a7c Author: Christian Gromm Date: Thu Jan 23 16:38:17 2020 +0100 staging: most: remove device from interface structure This patch makes the adapter drivers use their own device structures when registering a most interface with the core module. With this the module that actually operates the physical device is the owner of the device. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1579793906-5054-2-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 85db1cde825344cc1419d3adadaf4187154ad687 Author: Hans de Goede Date: Wed Jan 15 17:35:47 2020 +0100 firmware: Rename FW_OPT_NOFALLBACK to FW_OPT_NOFALLBACK_SYSFS This is a preparation patch for adding a new platform fallback mechanism, which will have its own enable/disable FW_OPT_xxx option. Note this also fixes a typo in one of the re-wordwrapped comments: enfoce -> enforce. Acked-by: Luis Chamberlain Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200115163554.101315-4-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 2406a307ac7ddfd7effeeaff6947149ec6a95b4e Author: Jiufei Xue Date: Wed Nov 20 17:45:26 2019 +0800 ovl: implement async IO routines A performance regression was observed since linux v4.19 with aio test using fio with iodepth 128 on overlayfs. The queue depth of the device was always 1 which is unexpected. After investigation, it was found that commit 16914e6fc7e1 ("ovl: add ovl_read_iter()") and commit 2a92e07edc5e ("ovl: add ovl_write_iter()") resulted in vfs_iter_{read,write} being called on underlying filesystem, which always results in syncronous IO. Implement async IO for stacked reading and writing. This resolves the performance regresion. This is implemented by allocating a new kiocb for submitting the AIO request on the underlying filesystem. When the request is completed, the new kiocb is freed and the completion callback is called on the original iocb. Signed-off-by: Jiufei Xue Signed-off-by: Miklos Szeredi commit 5dcdc43e24a1810d3c3f4959af3d0c8e0026d863 Author: Jiufei Xue Date: Wed Nov 20 17:45:25 2019 +0800 vfs: add vfs_iocb_iter_[read|write] helper functions This doesn't cause any behavior changes and will be used by overlay async IO implementation. Signed-off-by: Jiufei Xue Signed-off-by: Miklos Szeredi commit 1346416564f06444ca59778c05607bedb91a991a Author: Miklos Szeredi Date: Fri Jan 24 09:46:45 2020 +0100 ovl: layer is const The ovl_layer struct is never modified except at initialization. Signed-off-by: Miklos Szeredi commit b7bf9908e17c4dc4b80876f299ac03ddf188efd9 Author: Amir Goldstein Date: Tue Jan 14 22:17:25 2020 +0200 ovl: fix corner case of non-constant st_dev;st_ino On non-samefs overlay without xino, non pure upper inodes should use a pseudo_dev assigned to each unique lower fs, but if lower layer is on the same fs and upper layer, it has no pseudo_dev assigned. In this overlay layers setup: - two filesystems, A and B - upper layer is on A - lower layer 1 is also on A - lower layer 2 is on B Non pure upper overlay inode, whose origin is in layer 1 will have the st_dev;st_ino values of the real lower inode before copy up and the st_dev;st_ino values of the real upper inode after copy up. Fix this inconsitency by assigning a unique pseudo_dev also for upper fs, that will be used as st_dev value along with the lower inode st_dev for overlay inodes in the case above. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 1b81dddd354cf304574d79004400a6385613ae4e Author: Amir Goldstein Date: Sat Nov 16 18:52:20 2019 +0200 ovl: fix corner case of conflicting lower layer uuid This fixes ovl_lower_uuid_ok() to correctly detect the corner case: - two filesystems, A and B, both have null uuid - upper layer is on A - lower layer 1 is also on A - lower layer 2 is on B In this case, bad_uuid would not have been set for B, because the check only involved the list of lower fs. Hence we'll try to decode a layer 2 origin on layer 1 and fail. We check for conflicting (and null) uuid among all lower layers, including those layers that are on the same fs as the upper layer. Reported-by: Miklos Szeredi Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 07f1e59637a8e5a8bddba5da7567d46635da510f Author: Amir Goldstein Date: Tue Jan 14 21:59:22 2020 +0200 ovl: generalize the lower_fs[] array Rename lower_fs[] array to fs[], extend its size by one and use index fsid (instead of fsid-1) to access the fs[] array. Initialize fs[0] with upper fs values. fsid 0 is reserved even with lower only overlay, so fs[0] remains null in this case. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 0f831ec85eda1ae27490baba106aba632c1d8e94 Author: Amir Goldstein Date: Sat Nov 16 18:14:41 2019 +0200 ovl: simplify ovl_same_sb() helper No code uses the sb returned from this helper, so make it retrun a boolean and rename it to ovl_same_fs(). The xino mode is irrelevant when all layers are on same fs, so instead of describing samefs with mode OVL_XINO_OFF, use a new xino_mode state, which is 0 in the case of samefs, -1 in the case of xino=off and > 0 with xino enabled. Create a new helper ovl_same_dev(), to use instead of the common check for (ovl_same_fs() || xinobits). Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 880082666c8d08909bca0a3ea0d7162781f22786 Author: Peter Chen Date: Thu Jan 16 11:28:53 2020 +0800 Doc: ABI: add usb charger uevent When the USB charger is inserted or removed, the users could get USB charger state and type through the uevent. Signed-off-by: Peter Chen Link: https://lore.kernel.org/r/1579145333-1657-2-git-send-email-peter.chen@nxp.com Signed-off-by: Greg Kroah-Hartman commit 3bdcfe6c1d90b343c3de5fffdc83d988e76f8679 Author: Peter Chen Date: Thu Jan 16 11:28:52 2020 +0800 usb: phy: show USB charger type for user Current USB charger framework only shows charger state for user, but the user may also need charger type for further use, add support for it. Signed-off-by: Peter Chen Link: https://lore.kernel.org/r/1579145333-1657-1-git-send-email-peter.chen@nxp.com Signed-off-by: Greg Kroah-Hartman commit c120431347246fe481b73026cad49920f705e92f Author: Colin Ian King Date: Wed Jan 22 23:44:37 2020 +0000 usb: cdns3: fix spelling mistake and rework grammar in text The text contains a spelling mistake, "to" should be "too" so fix this and re-work the grammar to make it more readable. Signed-off-by: Colin Ian King Acked-by: Felipe Balbi Link: https://lore.kernel.org/r/20200122234437.2829803-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 0db4a15d4c2787b1112001790d4f95bd2c5fed6f Author: Tomas Winkler Date: Fri Jan 24 02:14:55 2020 +0200 mei: me: add jasper point DID Add Jasper Point (Jasper Lake) device id for MEI Signed-off-by: Tomas Winkler Cc: stable Link: https://lore.kernel.org/r/20200124001455.24176-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 4543bdc08857e8026475a477e7ba88e461f38271 Author: Sean Christopherson Date: Wed Dec 18 13:55:14 2019 -0800 KVM: Introduce kvm_vcpu_destroy() Add kvm_vcpu_destroy() and wire up all architectures to call the common function instead of their arch specific implementation. The common destruction function will be used by future patches to move allocation and initialization of vCPUs to common KVM code, i.e. to free resources that are allocated by arch agnostic code. No functional change intended. Acked-by: Christoffer Dall Signed-off-by: Sean Christopherson Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit d2423b347de46657c306d4c58f2e08feba4a19c4 Author: Sean Christopherson Date: Wed Dec 18 13:55:13 2019 -0800 KVM: x86: Invoke kvm_vcpu_uninit() immediately prior to freeing vcpu Move the call to kvm_vcpu_uninit() in kvm_arch_vcpu_destroy() down a few lines so that it is invoked immediately prior to freeing the vCPU. This paves the way for moving the uninit and free sequence to common KVM code without an associated functional change. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit aaf532c57927982b2523994698f994255a722f5f Author: Sean Christopherson Date: Wed Dec 18 13:55:12 2019 -0800 KVM: MIPS: Invoke kvm_vcpu_uninit() immediately prior to freeing vcpu Move the call to kvm_vcpu_uninit() in kvm_arch_vcpu_destroy() down a few lines so that it is invoked immediately prior to freeing the vCPU. This paves the way for moving the uninit and free sequence to common KVM code without an associated functional change. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit a2017f17fa175b812ce7de302316f67e8f2b7db0 Author: Sean Christopherson Date: Wed Dec 18 13:55:11 2019 -0800 KVM: s390: Invoke kvm_vcpu_init() before allocating sie_page Now that s390's implementation of kvm_arch_vcpu_init() is empty, move the call to kvm_vcpu_init() above the allocation of the sie_page. This paves the way for moving vcpu allocation and initialization into common KVM code without any associated functional change. Signed-off-by: Sean Christopherson Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit 321f8ee559d697d69efa81e8b6d4ea1e487c8bcc Author: Sean Christopherson Date: Wed Dec 18 13:55:10 2019 -0800 KVM: s390: Move guts of kvm_arch_vcpu_init() into kvm_arch_vcpu_create() Move all of kvm_arch_vcpu_init(), which is invoked at the very end of kvm_vcpu_init(), into kvm_arch_vcpu_create() in preparation of moving the call to kvm_vcpu_init(). Moving kvm_vcpu_init() is itself a preparatory step for moving allocation and initialization to common KVM code. No functional change inteded. Signed-off-by: Sean Christopherson Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit 897cc38eaab96d006ab17edd0f50a2f432f584cf Author: Sean Christopherson Date: Wed Dec 18 13:55:09 2019 -0800 KVM: Add kvm_arch_vcpu_precreate() to handle pre-allocation issues Add a pre-allocation arch hook to handle checks that are currently done by arch specific code prior to allocating the vCPU object. This paves the way for moving the allocation to common KVM code. Acked-by: Christoffer Dall Signed-off-by: Sean Christopherson Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini commit fe931f12277186d1a9d38ba6729b42e8edb68988 Author: Sean Christopherson Date: Wed Dec 18 13:55:08 2019 -0800 KVM: Remove kvm_arch_vcpu_free() declaration Remove KVM's declaration of kvm_arch_vcpu_free() now that the function is gone from all architectures (several architectures were relying on the forward declaration). Acked-by: Christoffer Dall Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 50b143e1b3cfb71c38bdd20dd64c98aa3528117f Author: Sean Christopherson Date: Wed Dec 18 13:55:07 2019 -0800 KVM: x86: Drop kvm_arch_vcpu_free() Remove the superfluous kvm_arch_vcpu_free() as it is no longer called from commmon KVM code. Note, kvm_arch_vcpu_destroy() *is* called from common code, i.e. choosing which function to whack is not completely arbitrary. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 208050dac5ef4de5cb83ffcafa78499c94d0b5ad Author: Sean Christopherson Date: Wed Dec 18 13:55:06 2019 -0800 KVM: x86: Remove spurious clearing of async #PF MSR Remove a bogus clearing of apf.msr_val from kvm_arch_vcpu_destroy(). apf.msr_val is only set to a non-zero value by kvm_pv_enable_async_pf(), which is only reachable by kvm_set_msr_common(), i.e. by writing MSR_KVM_ASYNC_PF_EN. KVM does not autonomously write said MSR, i.e. can only be written via KVM_SET_MSRS or KVM_RUN. Since KVM_SET_MSRS and KVM_RUN are vcpu ioctls, they require a valid vcpu file descriptor. kvm_arch_vcpu_destroy() is only called if KVM_CREATE_VCPU fails, and KVM declares KVM_CREATE_VCPU successful once the vcpu fd is installed and thus visible to userspace. Ergo, apf.msr_val cannot be non-zero when kvm_arch_vcpu_destroy() is called. Fixes: 344d9588a9df0 ("KVM: Add PV MSR to enable asynchronous page faults delivery.") Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 9d979c7e6ff43ca3200ffcb74f57415fd633a2da Author: Sean Christopherson Date: Wed Dec 18 13:55:05 2019 -0800 KVM: x86: Remove spurious kvm_mmu_unload() from vcpu destruction path x86 does not load its MMU until KVM_RUN, which cannot be invoked until after vCPU creation succeeds. Given that kvm_arch_vcpu_destroy() is called if and only if vCPU creation fails, it is impossible for the MMU to be loaded. Note, the bogus kvm_mmu_unload() call was added during an unrelated refactoring of vCPU allocation, i.e. was presumably added as an opportunstic "fix" for a perceived leak. Fixes: fb3f0f51d92d1 ("KVM: Dynamically allocate vcpus") Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 4b8fff780b07570993a966475b7500b6964cd91e Author: Sean Christopherson Date: Wed Dec 18 13:55:04 2019 -0800 KVM: arm: Drop kvm_arch_vcpu_free() Remove the superfluous kvm_arch_vcpu_free() as it is no longer called from commmon KVM code. Note, kvm_arch_vcpu_destroy() *is* called from common code, i.e. choosing which function to whack is not completely arbitrary. Acked-by: Christoffer Dall Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit d5279f3a882c3c5b57703b602d872d3bc7ffa51d Author: Sean Christopherson Date: Wed Dec 18 13:55:03 2019 -0800 KVM: PPC: Drop kvm_arch_vcpu_free() Remove the superfluous kvm_arch_vcpu_free() as it is no longer called from commmon KVM code. Note, kvm_arch_vcpu_destroy() *is* called from common code, i.e. choosing which function to whack is not completely arbitrary. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 47d51e5eb5fe0bd7440cf7f1217936e2d85c63cf Author: Sean Christopherson Date: Wed Dec 18 13:55:02 2019 -0800 KVM: MIPS: Drop kvm_arch_vcpu_free() Remove the superfluous kvm_arch_vcpu_free() as it is no longer called from commmon KVM code. Note, kvm_arch_vcpu_destroy() *is* called from common code, i.e. choosing which function to whack is not completely arbitrary. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 5233009fab8e0a037c38a8c2b28ba4b3df203935 Author: Sean Christopherson Date: Wed Dec 18 13:55:01 2019 -0800 KVM: MIPS: Use kvm_vcpu_cache to allocate vCPUs For reasons unknown, MIPS configures the vCPU allocation cache but allocates vCPUs via kzalloc(). Allocate from the vCPU cache in preparation for moving vCPU allocation to common KVM code. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit ff030fdf55732266c2d35b1a4a0baaf9ce49e9dd Author: Sean Christopherson Date: Wed Dec 18 13:55:00 2019 -0800 KVM: PPC: Move kvm_vcpu_init() invocation to common code Move the kvm_cpu_{un}init() calls to common PPC code as an intermediate step towards removing kvm_cpu_{un}init() altogether. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 4dbf6fec78868ef02e8bf32834f16b22f58723f5 Author: Sean Christopherson Date: Wed Dec 18 13:54:59 2019 -0800 KVM: PPC: e500mc: Move reset of oldpir below call to kvm_vcpu_init() Move the initialization of oldpir so that the call to kvm_vcpu_init() is at the top of kvmppc_core_vcpu_create_e500mc(). oldpir is only use when loading/putting a vCPU, which currently cannot be done until after kvm_arch_vcpu_create() completes. Reording the call to kvm_vcpu_init() paves the way for moving the invocation to common PPC code. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit d30769522294fbbd182659614bda16b5da231413 Author: Sean Christopherson Date: Wed Dec 18 13:54:58 2019 -0800 KVM: PPC: Book3S PR: Allocate book3s and shadow vcpu after common init Call kvm_vcpu_init() in kvmppc_core_vcpu_create_pr() prior to allocating the book3s and shadow_vcpu objects in preparation of moving said call to common PPC code. Although kvm_vcpu_init() has an arch callback, the callback is empty for Book3S PR, i.e. barring unseen black magic, moving the allocation has no real functional impact. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit c50bfbdc38ec56cf8e53afb4f9ebb600dfcabd49 Author: Sean Christopherson Date: Wed Dec 18 13:54:57 2019 -0800 KVM: PPC: Allocate vcpu struct in common PPC code Move allocation of all flavors of PPC vCPUs to common PPC code. All variants either allocate 'struct kvm_vcpu' directly, or require that the embedded 'struct kvm_vcpu' member be located at offset 0, i.e. guarantee that the allocation can be directly interpreted as a 'struct kvm_vcpu' object. Remove the message from the build-time assertion regarding placement of the struct, as compatibility with the arch usercopy region is no longer the sole dependent on 'struct kvm_vcpu' being at offset zero. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 3ec8ca29647078db11a820ab22855dd64d9a4897 Author: Sean Christopherson Date: Wed Dec 18 13:54:56 2019 -0800 KVM: PPC: e500mc: Add build-time assert that vcpu is at offset 0 In preparation for moving vcpu allocation to common PPC code, add an explicit, albeit redundant, build-time assert to ensure the vcpu member is located at offset 0. The assert is redundant in the sense that kvmppc_core_vcpu_create_e500() contains a functionally identical assert. The motiviation for adding the extra assert is to provide visual confirmation of the correctness of moving vcpu allocation to common code. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 987b2594ed5d128c95c5255a9c7755f7480bf407 Author: Sean Christopherson Date: Wed Dec 18 13:54:55 2019 -0800 KVM: x86: Move kvm_vcpu_init() invocation to common code Move the kvm_cpu_{un}init() calls to common x86 code as an intermediate step to removing kvm_cpu_{un}init() altogether. Note, VMX'x alloc_apic_access_page() and init_rmode_identity_map() are per-VM allocations and are intentionally kept if vCPU creation fails. They are freed by kvm_arch_destroy_vm(). No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit d813a8ba54f94fd6a0276230bdf53c97b36c2101 Author: Sean Christopherson Date: Wed Dec 18 13:54:54 2019 -0800 KVM: x86: Move allocation of pio_data page down a few lines Allocate the pio_data page after creating the MMU and local APIC so that all direct memory allocations are grouped together. This allows setting the return value to -ENOMEM prior to starting the allocations instead of setting it in the fail path for every allocation. The pio_data page is only consumed when KVM_RUN is invoked, i.e. moving its allocation has no real functional impact. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit fc6e2a1845abfcfa335aef5ffaac664e104d72ca Author: Sean Christopherson Date: Wed Dec 18 13:54:53 2019 -0800 KVM: x86: Move FPU allocation to common x86 code The allocation of FPU structs is identical across VMX and SVM, move it to common x86 code. Somewhat arbitrarily place the allocation so that it resides directly above the associated initialization via fx_init(), e.g. instead of retaining its position with respect to the overall vcpu creation flow. Although the names names kvm_arch_vcpu_create() and kvm_arch_vcpu_init() might suggest otherwise, x86 does not have a clean split between 'create' and 'init'. Allocating the struct immediately prior to the first use arguably improves readability *now*, and will yield even bigger improvements when kvm_arch_vcpu_init() is removed in a future patch. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit a9dd6f09d7e54d3f58be32d7d051196f7a00e69e Author: Sean Christopherson Date: Wed Dec 18 13:54:52 2019 -0800 KVM: x86: Allocate vcpu struct in common x86 code Move allocation of VMX and SVM vcpus to common x86. Although the struct being allocated is technically a VMX/SVM struct, it can be interpreted directly as a 'struct kvm_vcpu' because of the pre-existing requirement that 'struct kvm_vcpu' be located at offset zero of the arch/vendor vcpu struct. Remove the message from the build-time assertions regarding placement of the struct, as compatibility with the arch usercopy region is no longer the sole dependent on 'struct kvm_vcpu' being at offset zero. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 7f27179a88a693f2d357860fddef65704578edf5 Author: Sean Christopherson Date: Wed Dec 18 13:54:51 2019 -0800 KVM: SVM: Use direct vcpu pointer during vCPU create/free Capture the vcpu pointer in a local varaible and replace '&svm->vcpu' references with a direct reference to the pointer in anticipation of moving bits of the code to common x86 and passing the vcpu pointer into svm_create_vcpu(), i.e. eliminate unnecessary noise from future patches. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 34109c0476f10c033945b630a58c087e9d0ef8a0 Author: Sean Christopherson Date: Wed Dec 18 13:54:50 2019 -0800 KVM: VMX: Use direct vcpu pointer during vCPU create/free Capture the vcpu pointer in a local varaible and replace '&vmx->vcpu' references with a direct reference to the pointer in anticipation of moving bits of the code to common x86 and passing the vcpu pointer into vmx_create_vcpu(), i.e. eliminate unnecessary noise from future patches. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 034d8e2cb929ed73e32e2dba98cb8067eab85964 Author: Sean Christopherson Date: Wed Dec 18 13:54:49 2019 -0800 KVM: VMX: Allocate VPID after initializing VCPU Do VPID allocation after calling the common kvm_vcpu_init() as a step towards doing vCPU allocation (via kmem_cache_zalloc()) and calling kvm_vcpu_init() back-to-back. Squishing allocation and initialization together will eventually allow the sequence to be moved to arch-agnostic creation code. Note, the VPID is not consumed until KVM_RUN, slightly delaying its allocation should have no real function impact. VPID allocation was arbitrarily placed in the original patch, commit 2384d2b326408 ("KVM: VMX: Enable Virtual Processor Identification (VPID)"). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 16be9ddea268ad841457a59109963fff8c9de38d Author: Sean Christopherson Date: Wed Dec 18 13:54:48 2019 -0800 KVM: x86: Free wbinvd_dirty_mask if vCPU creation fails Free the vCPU's wbinvd_dirty_mask if vCPU creation fails after kvm_arch_vcpu_init(), e.g. when installing the vCPU's file descriptor. Do the freeing by calling kvm_arch_vcpu_free() instead of open coding the freeing. This adds a likely superfluous, but ultimately harmless, call to kvmclock_reset(), which only clears vcpu->arch.pv_time_enabled. Using kvm_arch_vcpu_free() allows for additional cleanup in the future. Fixes: f5f48ee15c2ee ("KVM: VMX: Execute WBINVD to keep data consistency with assigned devices") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit cb10bf9194f4d2c5d830eddca861f7ca0fecdbb4 Author: Sean Christopherson Date: Wed Dec 18 13:54:47 2019 -0800 KVM: PPC: Book3S PR: Free shared page if mmu initialization fails Explicitly free the shared page if kvmppc_mmu_init() fails during kvmppc_core_vcpu_create(), as the page is freed only in kvmppc_core_vcpu_free(), which is not reached via kvm_vcpu_uninit(). Fixes: 96bc451a15329 ("KVM: PPC: Introduce shared page") Cc: stable@vger.kernel.org Reviewed-by: Greg Kurz Signed-off-by: Sean Christopherson Acked-by: Paul Mackerras Signed-off-by: Paolo Bonzini commit 1a978d9d3e72ddfa40ac60d26301b154247ee0bc Author: Sean Christopherson Date: Wed Dec 18 13:54:46 2019 -0800 KVM: PPC: Book3S HV: Uninit vCPU if vcore creation fails Call kvm_vcpu_uninit() if vcore creation fails to avoid leaking any resources allocated by kvm_vcpu_init(), i.e. the vcpu->run page. Fixes: 371fefd6f2dc4 ("KVM: PPC: Allow book3s_hv guests to use SMT processor modes") Cc: stable@vger.kernel.org Reviewed-by: Greg Kurz Signed-off-by: Sean Christopherson Acked-by: Paul Mackerras Signed-off-by: Paolo Bonzini commit 6441fa6178f5456d1d4b512c08798888f99db185 Author: Paolo Bonzini Date: Mon Jan 20 16:33:06 2020 +0100 KVM: x86: avoid incorrect writes to host MSR_IA32_SPEC_CTRL If the guest is configured to have SPEC_CTRL but the host does not (which is a nonsensical configuration but these are not explicitly forbidden) then a host-initiated MSR write can write vmx->spec_ctrl (respectively svm->spec_ctrl) and trigger a #GP when KVM tries to restore the host value of the MSR. Add a more comprehensive check for valid bits of SPEC_CTRL, covering host CPUID flags and, since we are at it and it is more correct that way, guest CPUID flags too. For AMD, remove the unnecessary is_guest_mode check around setting the MSR interception bitmap, so that the code looks the same as for Intel. Cc: Jim Mattson Signed-off-by: Paolo Bonzini commit 6a24f567af4accef6d73b0be407227c537b94a1f Author: Orson Zhai Date: Tue Jan 21 15:09:38 2020 +0800 mfd: syscon: Add arguments support for syscon reference There are a lot of similar global registers being used across multiple SoCs from Unisoc. But most of these registers are assigned with different offset for different SoCs. It is hard to handle all of them in an all-in-one kernel image. Add a helper function to get regmap with arguments where we could put some extra information such as the offset value. Signed-off-by: Orson Zhai Tested-by: Baolin Wang Reviewed-by: Arnd Bergmann Signed-off-by: Lee Jones commit 2f3dc25c0118de03a00ddc88b61f7216854f534d Author: Andreas Kemnade Date: Fri Jan 17 22:59:22 2020 +0100 mfd: rn5t618: Mark ADC control register volatile There is a bit which gets cleared after conversion. Fixes: 9bb9e29c78f8 ("mfd: Add Ricoh RN5T618 PMIC core driver") Signed-off-by: Andreas Kemnade Signed-off-by: Lee Jones commit aac5d8fec9cae8bcdf1eaf0e9733f8839c8a72b4 Author: Claudiu Beznea Date: Fri Jan 17 13:58:29 2020 +0200 dt-bindings: atmel-usart: Add microchip,sam9x60-{usart, dbgu} Add microchip,sam9x60-usart and add microchip,sam9x60-dbgu to DT bindings documentation. Signed-off-by: Claudiu Beznea Signed-off-by: Lee Jones commit 8334240fa0a63d4e4a872a1a011bbd6138d9dbd0 Author: Claudiu Beznea Date: Fri Jan 17 13:58:28 2020 +0200 dt-bindings: atmel-usart: Remove wildcard Remove chip whildcard and introduce the list of compatibles instead. Signed-off-by: Claudiu Beznea Signed-off-by: Lee Jones commit 4602dce0361ebc67b9bfbed9338eee588e3c7e7e Author: Prashant Malani Date: Tue Jan 14 15:22:20 2020 -0800 mfd: cros_ec: Add cros-usbpd-notify subdevice Add the cros-usbpd-notify driver as a subdevice on platforms that support the EC_FEATURE_USB_PD EC feature flag and don't have the ACPI PD notification device defined. This driver allows other cros-ec devices to receive PD event notifications from the Chrome OS Embedded Controller (EC) via a notification chain. Signed-off-by: Prashant Malani Reviewed-by: Benson Leung Signed-off-by: Lee Jones commit 1112ba02ff1190ca9c15a912f9269e54b46d2d82 Author: Marco Felsch Date: Wed Jan 8 10:57:02 2020 +0100 mfd: da9062: Fix watchdog compatible string The watchdog driver compatible is "dlg,da9062-watchdog" and not "dlg,da9062-wdt". Therefore the mfd-core can't populate the of_node and fwnode. As result the watchdog driver can't parse the devicetree. Fixes: 9b40b030c4ad ("mfd: da9062: Supply core driver") Signed-off-by: Marco Felsch Acked-by: Guenter Roeck Reviewed-by: Adam Thomson Signed-off-by: Lee Jones commit 003035b3eb7085ee7d85f7ed063f10acf66b56d4 Author: Charles Keepax Date: Tue Jan 14 15:10:48 2020 +0000 mfd: madera: Allow more time for hardware reset Both manual and power on resets have a brief period where the chip will not be accessible immediately afterwards. Extend the time allowed for this from a minimum of 1mS to 2mS based on newer evaluation of the hardware and ensure this reset happens in all reset conditions. Whilst making the change also remove the redundant NULL checks in the reset functions as the GPIO functions already check for this. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones commit e9f47591793e9c9abf340077daf3bafbcb0daad0 Author: Charles Keepax Date: Tue Jan 14 15:10:46 2020 +0000 mfd: cs47l15: Add missing register default Accessory detect mode 1 is missing a default, add one to the table. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones commit 7f6d869846eca3800bf0a7fe080260bcc6439c2c Author: Charles Keepax Date: Mon Jan 6 10:28:34 2020 +0000 mfd: madera: Wait for boot done before accessing any other registers It is advised to wait for the boot done bit to be set before reading any other register, update the driver to respect this. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones commit 5e2540c17feb7df510244c1374329d7322392d1c Author: Krzysztof Kozlowski Date: Sat Jan 4 16:21:05 2020 +0100 mfd: Kconfig: Rename Samsung to lowercase Fix up inconsistent usage of upper and lowercase letters in "Samsung" name. "SAMSUNG" is not an abbreviation but a regular trademarked name. Therefore it should be written with lowercase letters starting with capital letter. Although advertisement materials usually use uppercase "SAMSUNG", the lowercase version is used in all legal aspects (e.g. on Wikipedia and in privacy/legal statements on https://www.samsung.com/semiconductor/privacy-global/). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 7ad2915f7a83184e8d492d0b88015a817e772d5d Author: yu kuai Date: Fri Jan 3 20:09:25 2020 +0800 mfd: tqmx86: remove set but not used variable 'i2c_ien' Fixes gcc '-Wunused-but-set-variable' warning: drivers/mfd/tqmx86.c: In function ‘tqmx86_probe’: drivers/mfd/tqmx86.c:161:29: warning: variable ‘i2c_ien’ set but not used I[-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai Signed-off-by: Lee Jones commit 2cce09eb11228386260a1b73133aee41f4bb33b1 Author: Linus Walleij Date: Sat Dec 28 23:26:15 2019 +0100 mfd: dbx500-prcmu: Drop DSI pll clock functions The DSI PLLs are handled by the generic clock framework since ages, this code is completely unused and misleading. Delete it. Cc: Stephan Gerhold Cc: Ulf Hansson Signed-off-by: Linus Walleij Signed-off-by: Lee Jones commit f41810921bdca37161a63f689cdcb36155f0fad6 Author: Linus Walleij Date: Sat Dec 28 23:26:14 2019 +0100 mfd: dbx500-prcmu: Drop set_display_clocks() The display clocks are handled by the generic clock framework since ages, this code is completely unused and misleading. Delete it. Cc: Stephan Gerhold Cc: Ulf Hansson Signed-off-by: Linus Walleij Signed-off-by: Lee Jones commit cb7a374a5e7a5af3f8c839f74439193add6d0589 Author: Bartosz Golaszewski Date: Fri Jan 3 12:41:56 2020 +0100 mfd: max77650: Select REGMAP_IRQ in Kconfig MAX77650 MFD driver uses regmap_irq API but doesn't select the required REGMAP_IRQ option in Kconfig. This can cause the following build error if regmap irq is not enabled implicitly by someone else: ld: drivers/mfd/max77650.o: in function `max77650_i2c_probe': max77650.c:(.text+0xcb): undefined reference to `devm_regmap_add_irq_chip' ld: max77650.c:(.text+0xdb): undefined reference to `regmap_irq_get_domain' make: *** [Makefile:1079: vmlinux] Error 1 Fix it by adding the missing option. Fixes: d0f60334500b ("mfd: Add new driver for MAX77650 PMIC") Reported-by: Paul Gazzillo Signed-off-by: Bartosz Golaszewski Signed-off-by: Lee Jones commit dc91c3b6fe66a13ac76f6cb3b2100c0779cd3350 Author: Samuel Holland Date: Sat Jan 4 19:24:08 2020 -0600 mfd: axp20x: Mark AXP20X_VBUS_IPSOUT_MGMT as volatile On AXP288 and newer PMICs, bit 7 of AXP20X_VBUS_IPSOUT_MGMT can be set to prevent using the VBUS input. However, when the VBUS unplugged and plugged back in, the bit automatically resets to zero. We need to set the register as volatile to prevent regmap from caching that bit. Otherwise, regcache will think the bit is already set and not write the register. Fixes: cd53216625a0 ("mfd: axp20x: Fix axp288 volatile ranges") Cc: stable@vger.kernel.org Signed-off-by: Samuel Holland Reviewed-by: Chen-Yu Tsai Signed-off-by: Lee Jones commit 702204c22c53f94b2e25a3bdcda759cce7b26305 Author: Linus Walleij Date: Wed Dec 11 12:46:39 2019 +0100 mfd: ab8500: Fix ab8500-clk typo Commit f4d41ad84433 ("mfd: ab8500: Example using new OF_MFD_CELL MACRO") has a typo error renaming "ab8500-clk" to "abx500-clk" with the result att ALSA SoC audio broke as the clock driver was not probing anymore. Fixed it up. Fixes: f4d41ad84433 ("mfd: ab8500: Example using new OF_MFD_CELL MACRO") Signed-off-by: Linus Walleij Reviewed-by: Stephan Gerhold Signed-off-by: Lee Jones commit 57b89dd220be5e48bdbf0352a673db5ef4bc905e Author: Andy Shevchenko Date: Mon Dec 9 16:15:07 2019 +0200 mfd: intel-lpss: Add Intel Jasper Lake PCI IDs Intel Jasper Lake has the same LPSS than Intel Ice Lake. Add the new IDs to the list of supported devices. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 9b98662e25721e5b1b65937ca803ed51975650cb Author: Matheus Castello Date: Thu Dec 5 12:44:08 2019 -0300 dt-bindings: mfd: max14577: Add reference to max14040_battery.txt descriptions max77836 MFD has a fuel gauge that has a low SOC alert feature that is described in: Documentation/devicetree/bindings/power/supply/max17040_battery.txt Adding the reference to the documentation here. Signed-off-by: Matheus Castello Acked-by: Rob Herring Reviewed-by: Krzysztof Kozlowski [Lee: Fix relative path] Signed-off-by: Lee Jones commit 1c0769d2093518b192a36eebab9134d597d4bc02 Author: Stephan Gerhold Date: Sun Nov 17 23:10:53 2019 +0100 mfd: ab8500-core: Add device tree support for AB8505 AB8505 support was never fully converted to the device tree. Most of the MFD cells for AB8505 lack an "of_compatible", which prevents them from being configured through the device tree. Align the definition of the AB8505 MFD cells with the ones for AB8500, and add device tree compatibles. Except for GPIO and regulators the compatibles are equal to those used for AB8500 because the hardware does not differ much. Finally, change db8500_prcmu_register_ab8500() to check for the AB8505 device tree node additionally, and probe it if it is found. Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Signed-off-by: Lee Jones commit 1c2f57d3391d32469cf1bcd2d29206107842dadd Author: Stephan Gerhold Date: Sun Nov 17 23:10:52 2019 +0100 dt-bindings: mfd: ab8500: Document AB8505 bindings AB8505 can now be configured from the device tree. The configuration is almost identical to AB8500, so just add a note for the nodes/compatibles that differ between the two revisions. Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 2b091ce1f62a7ab592fb3ede53e71c348225a721 Author: Paul Kocialkowski Date: Thu Nov 28 16:54:35 2019 +0100 dt-bindings: mfd: Document the Xylon LogiCVC multi-function device The LogiCVC is a display engine which also exposes GPIO functionality. For this reason, it is described as a multi-function device that is expected to provide register access to its children nodes for gpio and display. Signed-off-by: Paul Kocialkowski Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit c5f45619cfe62539739a2a0860799937a30a750e Author: Marco Felsch Date: Thu Dec 12 17:04:11 2019 +0100 dt-bindings: mfd: da9062: add gpio bindings Add gpio device documentation to make the da9062 gpios available for users. Signed-off-by: Marco Felsch Reviewed-by: Adam Thomson Signed-off-by: Lee Jones commit 1ea9bd88eeffd4e4505f3f93102bd4dad9f2471d Author: Marco Felsch Date: Thu Dec 12 17:04:12 2019 +0100 mfd: da9062: add support for the DA9062 GPIOs in the core Currently the da9062 GPIO's aren't available. The patch adds the support to make these available by adding a gpio device with the corresponding irq resources. Furthermore the patch fixes a minor style issue for the onkey device. Signed-off-by: Marco Felsch Acked-by: Linus Walleij Reviewed-by: Adam Thomson Signed-off-by: Lee Jones commit 2b8bd606b1e60ca28c765f69c1eedd7d2a2e9dca Author: Oliver Neukum Date: Thu Nov 21 11:28:10 2019 +0100 mfd: dln2: More sanity checking for endpoints It is not enough to check for the number of endpoints. The types must also be correct. Reported-and-tested-by: syzbot+48a2851be24583b864dc@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum Reviewed-by: Greg Kroah-Hartman Signed-off-by: Lee Jones commit b88aa8509828b56919b3cb0901803354fc156320 Author: Chuhong Yuan Date: Sat Nov 16 23:13:08 2019 +0800 mfd: sm501: Fix mismatches of request_mem_region This driver misuses release_resource + kfree to match request_mem_region, which is incorrect. The right way is to use release_mem_region. Replace the mismatched calls with the right ones to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Lee Jones commit f2a19c5b78670af5986ab0a625631f8f8a6adac1 Author: Andy Shevchenko Date: Fri Nov 15 10:49:30 2019 +0200 mfd: syscon: Re-use resource_size() to count max_register Instead of open coded variant use resource_size() and replace weird '- 3' to more understandable '- 4'. Signed-off-by: Andy Shevchenko Acked-by: Arnd Bergmann Signed-off-by: Lee Jones commit 18490cdb9e321a62a9c2cac6fb506843cbc84926 Merge: 10f916766436 c31f625d06c9 Author: Lee Jones Date: Fri Jan 24 07:33:25 2020 +0000 Merge branches 'ib-mfd-drm-5.6' and 'ib-mfd-clk-gpio-regulator-rtc-5.6' into ibs-for-mfd-merged commit 1c4d35265fb2945c1c4bf2628c81cbc8231afe7f Author: Peter Ujfalusi Date: Thu Jan 23 13:45:28 2020 +0200 arm64: dts: ti: k3-j721e-main: Add McASP nodes Add the nodes for McASP 0-11 and keep them disabled because several required properties are not present as they are board specific. Signed-off-by: Peter Ujfalusi Reviewed-by: Lokesh Vutla Signed-off-by: Tero Kristo commit 9bcb631e9953bb434e58a414ee1f5ae93924735e Author: Peter Ujfalusi Date: Thu Jan 23 13:45:27 2020 +0200 arm64: dts: ti: k3-am654-main: Add McASP nodes Add the nodes for McASP 0-2 and keep them disabled because several required properties are not present as they are board specific. Signed-off-by: Peter Ujfalusi Reviewed-by: Lokesh Vutla Signed-off-by: Tero Kristo commit 6f73c1e599c422e9c3d21287e7b991216798078d Author: Peter Ujfalusi Date: Thu Jan 23 13:45:26 2020 +0200 arm64: dts: ti: k3-j721e: DMA support Add the ringacc and udmap nodes for main and mcu NAVSS. Signed-off-by: Peter Ujfalusi Reviewed-by: Lokesh Vutla Signed-off-by: Tero Kristo commit 515c034013542b892fd8468b3b1df8a9bb036978 Author: Peter Ujfalusi Date: Thu Jan 23 13:45:25 2020 +0200 arm64: dts: ti: k3-j721e-main: Move secure proxy and smmu under main_navss Secure proxy (NAVSS0_SEC_PROXY0) and smmu (NAVSS0_TCU) is part of the Navigator Subsystem. Signed-off-by: Peter Ujfalusi Reviewed-by: Lokesh Vutla Signed-off-by: Tero Kristo commit ab641f2811dd9f142c140745da42dc2076d5069e Author: Peter Ujfalusi Date: Thu Jan 23 13:45:24 2020 +0200 arm64: dts: ti: k3-j721e-main: Correct main NAVSS representation NAVSS is a subsystem containing different IPs, it is not really a bus. Change the compatible from "simple-bus" to "simple-mfd" to reflect that. Signed-off-by: Peter Ujfalusi Reviewed-by: Lokesh Vutla Signed-off-by: Tero Kristo commit 8c0deacaf40b523820419ac749cd955bfd66c6c7 Author: Peter Ujfalusi Date: Thu Jan 23 13:45:23 2020 +0200 arm64: dts: ti: k3-j721e: Correct the address for MAIN NAVSS On am654 the MAIN NAVSS base address was 0x30800000, but in j721e it is at 0x30000000 Signed-off-by: Peter Ujfalusi Reviewed-by: Lokesh Vutla Signed-off-by: Tero Kristo commit 3d6230548c308c5fcb10f567ff44e6f23567f719 Author: Peter Ujfalusi Date: Thu Jan 23 13:45:22 2020 +0200 arm64: dts: ti: k3-am65: DMA support Add the ringacc and udmap nodes for main and mcu NAVSS. Signed-off-by: Peter Ujfalusi Reviewed-by: Lokesh Vutla Signed-off-by: Tero Kristo commit 12f207003c53edeefeb8afd383e988d354eca76e Author: Peter Ujfalusi Date: Thu Jan 23 13:45:21 2020 +0200 arm64: dts: ti: k3-am65-main: Move secure proxy under cbass_main_navss Secure proxy (NAVSS0_SEC_PROXY0) is part of the Navigator Subsystem. Signed-off-by: Peter Ujfalusi Reviewed-by: Lokesh Vutla Signed-off-by: Tero Kristo commit 2daaa180148602e16eb7ec0ab5dde0ad666659dc Author: Peter Ujfalusi Date: Thu Jan 23 13:45:20 2020 +0200 arm64: dts: ti: k3-am65-main: Correct main NAVSS representation NAVSS is a subsystem containing different IPs, it is not really a bus. Change the compatible from "simple-bus" to "simple-mfd" to reflect that. Signed-off-by: Peter Ujfalusi Reviewed-by: Lokesh Vutla Signed-off-by: Tero Kristo commit c31f625d06c9166f753a2f21ac9c3f859647ca9f Author: Matti Vaittinen Date: Mon Jan 20 15:47:37 2020 +0200 gpio: bd71828: Initial support for ROHM BD71828 PMIC GPIOs ROHM BD71828 PMIC contains 4 pins which can be configured by OTP to be used for general purposes. First 3 can be used as outputs and 4.th pin can be used as input. Allow them to be controlled via GPIO framework. The driver assumes all of the pins are configured as GPIOs and trusts that the reserved pins in other OTP configurations are excluded from control using "gpio-reserved-ranges" device tree property (or left untouched by GPIO users). Typical use for 4.th pin (input) is to use it as HALL sensor input so that this pin state is toggled when HALL sensor detects LID position change (from close to open or open to close). PMIC HW implements some extra logic which allows PMIC to power-up the system when this pin is toggled. Please see the data sheet for details of GPIO options which can be selected by OTP settings. Signed-off-by: Matti Vaittinen Reviewed-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Signed-off-by: Lee Jones commit fe5a591b7814ffbc90aff661aeb8264937002f54 Author: Matti Vaittinen Date: Mon Jan 20 15:45:36 2020 +0200 rtc: bd70528: add BD71828 support ROHM BD71828 PMIC RTC block is from many parts similar to one on BD70528. Support BD71828 RTC using BD70528 RTC driver and avoid re-inventing the wheel. Signed-off-by: Matti Vaittinen Acked-by: Alexandre Belloni Signed-off-by: Lee Jones commit 6c883472e1c11cb05561b6dd0c28bb037c2bf2de Author: Matti Vaittinen Date: Mon Jan 20 15:45:11 2020 +0200 mfd: bd70528: Fix hour register mask When RTC is used in 24H mode (and it is by this driver) the maximum hour value is 24 in BCD. This occupies bits [5:0] - which means correct mask for HOUR register is 0x3f not 0x1f. Fix the mask Fixes: 32a4a4ebf768 ("rtc: bd70528: Initial support for ROHM bd70528 RTC") Signed-off-by: Matti Vaittinen Acked-by: Alexandre Belloni Signed-off-by: Lee Jones commit 21b72156ede8b7da0367c6338574c1bc40439157 Author: Matti Vaittinen Date: Mon Jan 20 15:44:45 2020 +0200 regulator: bd718x7: Split driver to common and bd718x7 specific parts Few ROHM PMICs allow setting the voltage states for different system states like RUN, IDLE, SUSPEND and LPSR. States are then changed via SoC specific mechanisms. bd718x7 driver implemented device-tree parsing functions for these state specific voltages. The parsing functions can be re-used by other ROHM chip drivers like bd71828. Split the generic functions from bd718x7-regulator.c to rohm-regulator.c and export them for other modules to use. Signed-off-by: Matti Vaittinen Acked-by: Mark Brown Signed-off-by: Lee Jones commit ae866dec742687b0bff407013b91badba524f7ee Author: Matti Vaittinen Date: Mon Jan 20 15:44:19 2020 +0200 clk: bd718x7: Support ROHM BD71828 clk block BD71828GW is a single-chip power management IC for battery-powered portable devices. Add support for controlling BD71828 clk using bd718x7 driver. Signed-off-by: Matti Vaittinen Acked-by: Stephen Boyd Signed-off-by: Lee Jones commit e795bf725dabc918298e74cb29303ea6783f1874 Author: Matti Vaittinen Date: Mon Jan 20 15:43:55 2020 +0200 mfd: bd71828: Add power-key support Use gpio_keys to send power input-event to user-space when power button (short) press is detected. Signed-off-by: Matti Vaittinen Signed-off-by: Lee Jones commit 1c743ad523bb2f77a43a740a43c3b5bb9cbd82cd Author: Matti Vaittinen Date: Mon Jan 20 15:43:28 2020 +0200 mfd: bd71828: Support ROHM BD71828 PMIC - core BD71828GW is a single-chip power management IC for battery-powered portable devices. The IC integrates 7 buck converters, 7 LDOs, and a 1500 mA single-cell linear charger. Also included is a Coulomb counter, a real-time clock (RTC), 3 GPO/regulator control pins, HALL input and a 32.768 kHz clock gate. Add MFD core driver providing interrupt controller facilities and i2c access to sub device drivers. Signed-off-by: Matti Vaittinen Signed-off-by: Lee Jones commit 8c352e68dd2e50570afe6177d57484366a1cb615 Author: Matti Vaittinen Date: Mon Jan 20 15:43:01 2020 +0200 mfd: bd718x7: Add compatible for BD71850 ROHM BD71850 PMIC is almost identical to BD71847. Main difference is some initial voltage values for regulators. The BD71850 can be handled by BD71847 driver but adding own compatible makes it clearer for one who creates the DT for board containing this PMIC and allows SW to be differentiating PMICs if needed. Signed-off-by: Matti Vaittinen Signed-off-by: Lee Jones commit 1b1c26b24a6e75d96967515e55fba6c9954d4009 Author: Matti Vaittinen Date: Mon Jan 20 15:42:38 2020 +0200 mfd: Rohm PMICs: Use platform_device_id to match MFD sub-devices Thanks to Stephen Boyd I today learned we can use platform_device_id to do device and module matching for MFD sub-devices! Do device matching using the platform_device_id instead of using explicit module_aliases to load modules and custom parent-data field to do module loading and sub-device matching. Cc: Stephen Boyd Signed-off-by: Matti Vaittinen Acked-by: Mark Brown Signed-off-by: Lee Jones commit 1af5332fcf7c7f29eef55a2304b9ca4e5d09050c Author: Matti Vaittinen Date: Mon Jan 20 15:41:12 2020 +0200 dt-bindings: mfd: Document ROHM BD71828 bindings ROHM BD71828 Power management IC integrates 7 buck converters, 7 LDOs, a real-time clock (RTC), 3 GPO/regulator control pins, HALL input and a 32.768 kHz clock gate. Document the dt bindings drivers are using. Signed-off-by: Matti Vaittinen Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 873e443dd25ae7a9388d634543f8490a987c2095 Author: Matti Vaittinen Date: Mon Jan 20 15:40:47 2020 +0200 dt-bindings: leds: ROHM BD71282 PMIC LED driver Document ROHM BD71828 PMIC LED driver device tree bindings. Signed-off-by: Matti Vaittinen Reviewed-by: Rob Herring Acked-by: Pavel Machek Signed-off-by: Lee Jones commit 71723a96b8b1367fefc18f60025dae792477d602 Author: Geert Uytterhoeven Date: Fri Jan 17 16:30:56 2020 +0100 dmaengine: Create symlinks between DMA channels and slaves Currently it is not easy to find out which DMA channels are in use, and which slave devices are using which channels. Fix this by creating two symlinks between the DMA channel and the actual slave device when a channel is requested: 1. A "slave" symlink from DMA channel to slave device, 2. A "dma:" symlink slave device to DMA channel. When the channel is released, the symlinks are removed again. The latter requires keeping track of the slave device and the channel name in the dma_chan structure. Note that this is limited to channel request functions for requesting an exclusive slave channel that take a device pointer (dma_request_chan() and dma_request_slave_channel*()). Signed-off-by: Geert Uytterhoeven Tested-by: Niklas Söderlund Link: https://lore.kernel.org/r/20200117153056.31363-1-geert+renesas@glider.be Signed-off-by: Vinod Koul commit e9f08b65250d73ab70e79e194813f52b8d306784 Author: Zhou Wang Date: Thu Jan 16 14:10:57 2020 +0800 dmaengine: hisilicon: Add Kunpeng DMA engine support This patch adds a driver for HiSilicon Kunpeng DMA engine. This DMA engine which is an PCIe iEP offers 30 channels, each channel has a send queue, a complete queue and an interrupt to help to do tasks. This DMA engine can do memory copy between memory blocks or between memory and device buffer. Signed-off-by: Zhou Wang Signed-off-by: Zhenfa Qiu Link: https://lore.kernel.org/r/1579155057-80523-1-git-send-email-wangzhou1@hisilicon.com Signed-off-by: Vinod Koul commit 42d279f9137ab7d5503836baec2739284b278d8f Author: Dave Jiang Date: Tue Jan 21 16:44:29 2020 -0700 dmaengine: idxd: add char driver to expose submission portal to userland Create a char device region that will allow acquisition of user portals in order to allow applications to submit DMA operations. A char device will be created per work queue that gets exposed. The workqueue type "user" is used to mark a work queue for user char device. For example if the workqueue 0 of DSA device 0 is marked for char device, then a device node of /dev/dsa/wq0.0 will be created. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/157965026985.73301.976523230037106742.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 8f47d1a5e545f903cd049c42da31a3be36178447 Author: Dave Jiang Date: Tue Jan 21 16:44:23 2020 -0700 dmaengine: idxd: connect idxd to dmaengine subsystem Add plumbing for dmaengine subsystem connection. The driver register a DMA device per DSA device. The channels are dynamically registered when a workqueue is configured to be "kernel:dmanegine" type. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/157965026376.73301.13867988830650740445.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit d1dfe5b8ac644a0ffccfe7af22abed7c80b34702 Author: Dave Jiang Date: Tue Jan 21 16:44:17 2020 -0700 dmaengine: idxd: add descriptor manipulation routines This commit adds helper functions for DSA descriptor allocation, submission, and free operations. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/157965025757.73301.12692876585357550065.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit b131ad593884cb3decc4950f807af2faffc05a3c Author: Jing Lin Date: Tue Jan 21 16:44:11 2020 -0700 dmaengine: idxd: add sysfs ABI for idxd driver Add the sysfs ABI information for idxd driver in Documentation/ABI/stable directory. Signed-off-by: Jing Lin Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/157965025170.73301.13428570530450446901.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit c52ca478233c172b2d322b5241d6279a8661cbba Author: Dave Jiang Date: Tue Jan 21 16:44:05 2020 -0700 dmaengine: idxd: add configuration component of driver The device is left unconfigured when the driver is loaded. Various components are configured via the driver sysfs attributes. Once configuration is done, the device can be enabled by writing the device name to the bind attribute of the device driver sysfs. Disabling can be done similarly. Also the individual work queues can also be enabled and disabled through the bind/unbind attributes. A constructed hierarchy is created through the struct device framework in order to provide appropriate configuration points and device state and status. This hierarchy is presented off the virtual DSA bus. i.e. /sys/bus/dsa/... Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/157965024585.73301.6431413676230150589.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit bfe1d56091c1a404b3d4ce7e9809d745fc4453bb Author: Dave Jiang Date: Tue Jan 21 16:43:59 2020 -0700 dmaengine: idxd: Init and probe for Intel data accelerators The idxd driver introduces the Intel Data Stream Accelerator [1] that will be available on future Intel Xeon CPUs. One of the kernel access point for the driver is through the dmaengine subsystem. It will initially provide the DMA copy service to the kernel. Some of the main functionality introduced with this accelerator are: shared virtual memory (SVM) support, and descriptor submission using Intel CPU instructions movdir64b and enqcmds. There will be additional accelerator devices that share the same driver with variations to capabilities. This commit introduces the probe and initialization component of the driver. [1]: https://software.intel.com/en-us/download/intel-data-streaming-accelerator-preliminary-architecture-specification Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/157965023991.73301.6186843973135311580.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit e81274cd6b5264809384066e09a5253708822522 Author: Dave Jiang Date: Tue Jan 21 16:43:53 2020 -0700 dmaengine: add support to dynamic register/unregister of channels With the channel registration routines broken out, now add support code to allow independent registering and unregistering of channels in a hotplug fashion. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/157965023364.73301.7821862091077299040.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit d2fb0a0438384fee08a418025f743913020033ce Author: Dave Jiang Date: Tue Jan 21 16:43:47 2020 -0700 dmaengine: break out channel registration In preparation for dynamic channel registration, the code segment that does the channel registration is broken out to its own function. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/157965022778.73301.8929944324898985438.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 232bb01bb8ad2f88aefbd88b0d3fe3f9a253502b Author: Dave Jiang Date: Tue Jan 21 16:43:41 2020 -0700 x86/asm: add iosubmit_cmds512() based on MOVDIR64B CPU instruction With the introduction of MOVDIR64B instruction, there is now an instruction that can write 64 bytes of data atomically. Quoting from Intel SDM: "There is no atomicity guarantee provided for the 64-byte load operation from source address, and processor implementations may use multiple load operations to read the 64-bytes. The 64-byte direct-store issued by MOVDIR64B guarantees 64-byte write-completion atomicity. This means that the data arrives at the destination in a single undivided 64-byte write transaction." We have identified at least 3 different use cases for this instruction in the format of func(dst, src, count): 1) Clear poison / Initialize MKTME memory @dst is normal memory. @src in normal memory. Does not increment. (Copy same line to all targets) @count (to clear/init multiple lines) 2) Submit command(s) to new devices @dst is a special MMIO region for a device. Does not increment. @src is normal memory. Increments. @count usually is 1, but can be multiple. 3) Copy to iomem in big chunks @dst is iomem and increments @src in normal memory and increments @count is number of chunks to copy Add support for case #2 to support device that will accept commands via this instruction. We provide a @count in order to submit a batch of preprogrammed descriptors in virtually contiguous memory. This allows the caller to submit multiple descriptors to a device with a single submission. The special device requires the entire 64bytes descriptor to be written atomically and will accept MOVDIR64B instruction. Signed-off-by: Dave Jiang Acked-by: Borislav Petkov Link: https://lore.kernel.org/r/157965022175.73301.10174614665472962675.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit b3531f5fc16d4df2b12567bce48cd9f3ab5f9131 Author: YueHaibing Date: Thu Jan 23 21:22:49 2020 -0800 xfs: remove unused variable 'done' fs/xfs/xfs_inode.c: In function 'xfs_itruncate_extents_flags': fs/xfs/xfs_inode.c:1523:8: warning: unused variable 'done' [-Wunused-variable] commit 4bbb04abb4ee ("xfs: truncate should remove all blocks, not just to the end of the page cache") left behind this, so remove it. Fixes: 4bbb04abb4ee ("xfs: truncate should remove all blocks, not just to the end of the page cache") Reported-by: Hulk Robot Reported-by: Stephen Rothwell Signed-off-by: YueHaibing Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 54027a49938bbee1af62fad191139b14d4ee5cd2 Author: Darrick J. Wong Date: Thu Jan 23 07:54:09 2020 -0800 xfs: fix uninitialized variable in xfs_attr3_leaf_inactive Dan Carpenter pointed out that error is uninitialized. While there never should be an attr leaf block with zero entries, let's not leave that logic bomb there. Fixes: 0bb9d159bd01 ("xfs: streamline xfs_attr3_leaf_inactive") Reported-by: Dan Carpenter Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins Reviewed-by: Eric Sandeen commit 122ce22cb37b087e7e28ebb16044a622b0a22233 Author: Charles Keepax Date: Wed Jan 22 11:11:50 2020 +0000 pinctrl: madera: Remove extra blank line Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200122111150.11033-1-ckeepax@opensource.cirrus.com Signed-off-by: Linus Walleij commit 1d44616e7549d0154c1224a3eee3c407029294dc Author: Stephen Boyd Date: Tue Jan 21 10:09:50 2020 -0800 pinctrl: qcom: Don't lock around irq_set_irq_wake() We don't need to hold the local pinctrl lock here to set irq wake on the summary irq line. Doing so only leads to lockdep warnings instead of protecting us from anything. Remove the locking. WARNING: possible circular locking dependency detected 5.4.11 #2 Tainted: G W ------------------------------------------------------ cat/3083 is trying to acquire lock: ffffff81f4fa58c0 (&irq_desc_lock_class){-.-.}, at: __irq_get_desc_lock+0x64/0x94 but task is already holding lock: ffffff81f4880c18 (&pctrl->lock){-.-.}, at: msm_gpio_irq_set_wake+0x48/0x7c which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&pctrl->lock){-.-.}: _raw_spin_lock_irqsave+0x64/0x80 msm_gpio_irq_ack+0x68/0xf4 __irq_do_set_handler+0xe0/0x180 __irq_set_handler+0x60/0x9c irq_domain_set_info+0x90/0xb4 gpiochip_hierarchy_irq_domain_alloc+0x110/0x200 __irq_domain_alloc_irqs+0x130/0x29c irq_create_fwspec_mapping+0x1f0/0x300 irq_create_of_mapping+0x70/0x98 of_irq_get+0xa4/0xd4 spi_drv_probe+0x4c/0xb0 really_probe+0x138/0x3f0 driver_probe_device+0x70/0x140 __device_attach_driver+0x9c/0x110 bus_for_each_drv+0x88/0xd0 __device_attach+0xb0/0x160 device_initial_probe+0x20/0x2c bus_probe_device+0x34/0x94 device_add+0x35c/0x3f0 spi_add_device+0xbc/0x194 of_register_spi_devices+0x2c8/0x408 spi_register_controller+0x57c/0x6fc spi_geni_probe+0x260/0x328 platform_drv_probe+0x90/0xb0 really_probe+0x138/0x3f0 driver_probe_device+0x70/0x140 device_driver_attach+0x4c/0x6c __driver_attach+0xcc/0x154 bus_for_each_dev+0x84/0xcc driver_attach+0x2c/0x38 bus_add_driver+0x108/0x1fc driver_register+0x64/0xf8 __platform_driver_register+0x4c/0x58 spi_geni_driver_init+0x1c/0x24 do_one_initcall+0x1a4/0x3e8 do_initcall_level+0xb4/0xcc do_basic_setup+0x30/0x48 kernel_init_freeable+0x124/0x1a8 kernel_init+0x14/0x100 ret_from_fork+0x10/0x18 -> #0 (&irq_desc_lock_class){-.-.}: __lock_acquire+0xeb4/0x2388 lock_acquire+0x1cc/0x210 _raw_spin_lock_irqsave+0x64/0x80 __irq_get_desc_lock+0x64/0x94 irq_set_irq_wake+0x40/0x144 msm_gpio_irq_set_wake+0x5c/0x7c set_irq_wake_real+0x40/0x5c irq_set_irq_wake+0x70/0x144 cros_ec_rtc_suspend+0x38/0x4c platform_pm_suspend+0x34/0x60 dpm_run_callback+0x64/0xcc __device_suspend+0x310/0x41c dpm_suspend+0xf8/0x298 dpm_suspend_start+0x84/0xb4 suspend_devices_and_enter+0xbc/0x620 pm_suspend+0x210/0x348 state_store+0xb0/0x108 kobj_attr_store+0x14/0x24 sysfs_kf_write+0x4c/0x64 kernfs_fop_write+0x15c/0x1fc __vfs_write+0x54/0x18c vfs_write+0xe4/0x1a4 ksys_write+0x7c/0xe4 __arm64_sys_write+0x20/0x2c el0_svc_common+0xa8/0x160 el0_svc_handler+0x7c/0x98 el0_svc+0x8/0xc other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&pctrl->lock); lock(&irq_desc_lock_class); lock(&pctrl->lock); lock(&irq_desc_lock_class); *** DEADLOCK *** 7 locks held by cat/3083: #0: ffffff81f06d1420 (sb_writers#7){.+.+}, at: vfs_write+0xd0/0x1a4 #1: ffffff81c8935680 (&of->mutex){+.+.}, at: kernfs_fop_write+0x12c/0x1fc #2: ffffff81f4c322f0 (kn->count#337){.+.+}, at: kernfs_fop_write+0x134/0x1fc #3: ffffffe89a641d60 (system_transition_mutex){+.+.}, at: pm_suspend+0x108/0x348 #4: ffffff81f190e970 (&dev->mutex){....}, at: __device_suspend+0x168/0x41c #5: ffffff81f183d8c0 (lock_class){-.-.}, at: __irq_get_desc_lock+0x64/0x94 #6: ffffff81f4880c18 (&pctrl->lock){-.-.}, at: msm_gpio_irq_set_wake+0x48/0x7c stack backtrace: CPU: 4 PID: 3083 Comm: cat Tainted: G W 5.4.11 #2 Hardware name: Google Cheza (rev3+) (DT) Call trace: dump_backtrace+0x0/0x174 show_stack+0x20/0x2c dump_stack+0xc8/0x124 print_circular_bug+0x2ac/0x2c4 check_noncircular+0x1a0/0x1a8 __lock_acquire+0xeb4/0x2388 lock_acquire+0x1cc/0x210 _raw_spin_lock_irqsave+0x64/0x80 __irq_get_desc_lock+0x64/0x94 irq_set_irq_wake+0x40/0x144 msm_gpio_irq_set_wake+0x5c/0x7c set_irq_wake_real+0x40/0x5c irq_set_irq_wake+0x70/0x144 cros_ec_rtc_suspend+0x38/0x4c platform_pm_suspend+0x34/0x60 dpm_run_callback+0x64/0xcc __device_suspend+0x310/0x41c dpm_suspend+0xf8/0x298 dpm_suspend_start+0x84/0xb4 suspend_devices_and_enter+0xbc/0x620 pm_suspend+0x210/0x348 state_store+0xb0/0x108 kobj_attr_store+0x14/0x24 sysfs_kf_write+0x4c/0x64 kernfs_fop_write+0x15c/0x1fc __vfs_write+0x54/0x18c vfs_write+0xe4/0x1a4 ksys_write+0x7c/0xe4 __arm64_sys_write+0x20/0x2c el0_svc_common+0xa8/0x160 el0_svc_handler+0x7c/0x98 el0_svc+0x8/0xc Fixes: 6aced33f4974 ("pinctrl: msm: drop wake_irqs bitmap") Cc: Douglas Anderson Cc: Brian Masney Cc: Lina Iyer Cc: Maulik Shah Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20200121180950.36959-1-swboyd@chromium.org Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij commit fd8bdb23b91876ac1e624337bb88dc1dcc21d67e Author: Guenter Roeck Date: Wed Jan 22 18:41:18 2020 -0800 hwmon: (k10temp) Display up to eight sets of CCD temperatures In HWiNFO, we see support for Tccd1, Tccd3, Tccd5, and Tccd7 temperature sensors on Zen2 based Threadripper CPUs. Checking register maps on Threadripper 3970X confirms SMN register addresses and values for those sensors. Register values observed in an idle system: 0x059950: 00000000 00000abc 00000000 00000ad8 0x059960: 00000000 00000ade 00000000 00000ae4 Under load: 0x059950: 00000000 00000c02 00000000 00000c14 0x059960: 00000000 00000c30 00000000 00000c22 More analysis shows that EPYC CPUs support up to 8 CCD temperature sensors. EPYC 7601 supports three CCD temperature sensors. Unlike Zen2 CPUs, the register space in Zen1 CPUs supports a maximum of four sensors, so only search for a maximum of four sensors on Zen1 CPUs. On top of that, in thm_10_0_sh_mask.h in the Linux kernel, we find definitions for THM_DIE{1-3}_TEMP__VALID_MASK, set to 0x00000800, as well as matching SMN addresses. This lets us conclude that bit 11 of the respective registers is a valid bit. With this assumption, the temperature offset is now 49 degrees C. This conveniently matches the documented temperature offset for Tdie, again suggesting that above registers indeed report temperatures sensor values. Assume that bit 11 is indeed a valid bit, and add support for the additional sensors. With this patch applied, output from 3970X (idle) looks as follows: k10temp-pci-00c3 Adapter: PCI adapter Tdie: +55.9°C Tctl: +55.9°C Tccd1: +39.8°C Tccd3: +43.8°C Tccd5: +43.8°C Tccd7: +44.8°C Tested-by: Michael Larabel Signed-off-by: Guenter Roeck commit d95f20c4f07020ebc605f3b46af4b6db9eb5fc99 Author: Dongdong Liu Date: Thu Jan 23 16:26:31 2020 +0800 PCI/AER: Initialize aer_fifo Previously we did not call INIT_KFIFO() for aer_fifo. This leads to kfifo_put() sometimes returning 0 (queue full) when in fact it is not. It is easy to reproduce the problem by using aer-inject: $ aer-inject -s :82:00.0 multiple-corr-nonfatal The content of the multiple-corr-nonfatal file is as below: AER COR RCVR HL 0 1 2 3 AER UNCOR POISON_TLP HL 4 5 6 7 Fixes: 27c1ce8bbed7 ("PCI/AER: Use kfifo for tracking events instead of reimplementing it") Link: https://lore.kernel.org/r/1579767991-103898-1-git-send-email-liudongdong3@huawei.com Signed-off-by: Dongdong Liu Signed-off-by: Bjorn Helgaas commit 8d077c3ce0109c406c265cafc334258caee47e6d Author: Bjorn Helgaas Date: Fri Dec 13 16:46:05 2019 -0600 PCI/AER: Factor message prefixes with dev_fmt() Define dev_fmt() with the common prefix of log messages so we don't have to repeat it in every printk. No functional change intended. Link: https://lore.kernel.org/r/20191213225709.GA213811@google.com Signed-off-by: Bjorn Helgaas commit 01daacfb9035e5b86d43a01f11a0614648f306c1 Author: Yicong Yang Date: Fri Dec 13 19:44:34 2019 +0800 PCI/AER: Log which device prevents error recovery PCI error recovery will fail if any device under the Root Port doesn't have an error_detected callback. Currently only the failure result is printed, which is not enough to identify the driver that lacks the callback. Log a message to identify the device with no error_detected callback. [bhelgaas: tweak log message] Link: https://lore.kernel.org/r/1576237474-32021-1-git-send-email-yangyicong@hisilicon.com Signed-off-by: Yicong Yang Signed-off-by: Bjorn Helgaas commit d54e17b4066612d88c4ef3e5fb3115f12733763d Merge: 5c7bac9fb2c5 5b3014b95272 Author: Mimi Zohar Date: Thu Jan 23 17:24:35 2020 -0500 Merge branch 'next-integrity.defer-measuring-keys' into next-integrity From patch set cover letter: The IMA subsystem supports measuring asymmetric keys when the key is created or updated[1]. But keys created or updated before a custom IMA policy is loaded are currently not measured. This includes keys added, for instance, to either the .ima or .builtin_trusted_keys keyrings, which happens early in the boot process. Measuring the early boot keys, by design, requires loading a custom IMA policy. This change adds support for queuing keys created or updated before a custom IMA policy is loaded. The queued keys are processed when a custom policy is loaded. Keys created or updated after a custom policy is loaded are measured immediately (not queued). In the case when a custom policy is not loaded within 5 minutes of IMA initialization, the queued keys are freed. [1] https://lore.kernel.org/linux-integrity/20191211164707.4698-1-nramas@linux.microsoft.com/ commit 485ec2ea9cf556e9c120e07961b7b459d776a115 Author: Amol Grover Date: Thu Jan 23 17:34:38 2020 +0530 bpf, devmap: Pass lockdep expression to RCU lists head is traversed using hlist_for_each_entry_rcu outside an RCU read-side critical section but under the protection of dtab->index_lock. Hence, add corresponding lockdep expression to silence false-positive lockdep warnings, and harden RCU lists. Fixes: 6f9d451ab1a3 ("xdp: Add devmap_hash map type for looking up devices by hashed index") Signed-off-by: Amol Grover Signed-off-by: Daniel Borkmann Acked-by: Jesper Dangaard Brouer Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20200123120437.26506-1-frextrite@gmail.com commit 34bbe036170785bd288d8a74573ee8ad7946f4a1 Author: Tejas Patel Date: Wed Dec 4 22:35:59 2019 -0800 clk: zynqmp: Add support for clock with CLK_DIVIDER_POWER_OF_TWO flag Existing clock divider functions is not checking for base of divider. So, if any clock divider is power of 2 then clock rate calculation will be wrong. Add support to calculate divider value for the clocks with CLK_DIVIDER_POWER_OF_TWO flag. Signed-off-by: Tejas Patel Signed-off-by: Radhey Shyam Pandey Signed-off-by: Rajan Vaja Link: https://lkml.kernel.org/r/1575527759-26452-7-git-send-email-rajan.vaja@xilinx.com Signed-off-by: Stephen Boyd commit 4ebd92d2e228ceb33bafa273fd9cb2b16615cdd4 Author: Rajan Vaja Date: Wed Dec 4 22:35:58 2019 -0800 clk: zynqmp: Fix divider calculation zynqmp_clk_divider_round_rate() returns actual divider value after calculating from parent rate and desired rate, even though that rate is not supported by single divider of hardware. It is also possible that such divisor value can be achieved through 2 different dividers. As, Linux tries to set such divisor value(out of range) in single divider set divider is getting failed. Fix the same by computing best possible combination of two divisors which provides more accurate clock rate. Signed-off-by: Michal Simek Signed-off-by: Tejas Patel Signed-off-by: Rajan Vaja Link: https://lkml.kernel.org/r/1575527759-26452-6-git-send-email-rajan.vaja@xilinx.com Signed-off-by: Stephen Boyd commit e942171bbb762977afaa1eb24a312c3bd56386a5 Author: Rajan Vaja Date: Wed Dec 4 22:35:57 2019 -0800 clk: zynqmp: Add support for get max divider To achieve best possible rate, maximum limit of divider is required while computation. Get maximum supported divisor from firmware. To maintain backward compatibility assign maximum possible value(0xFFFF) if query for max divisor is not successful. Signed-off-by: Rajan Vaja Link: https://lkml.kernel.org/r/1575527759-26452-5-git-send-email-rajan.vaja@xilinx.com Acked-by: Michal Simek [sboyd@kernel.org: Remove else return and just return] Signed-off-by: Stephen Boyd commit df2a4d94f1720e24643a9870a01a1c2895d13b20 Author: Rajan Vaja Date: Wed Dec 4 22:35:56 2019 -0800 clk: zynqmp: Warn user if clock user are more than allowed Warn user if clock is used by more than allowed devices. This check is done by firmware and returns respective error code. Upon receiving error code for excessive user, warn user for the same. This change is done to restrict VPLL use count. It is assumed that VPLL is used by one user only. Signed-off-by: Michal Simek Signed-off-by: Rajan Vaja Link: https://lkml.kernel.org/r/1575527759-26452-4-git-send-email-rajan.vaja@xilinx.com Acked-by: Michal Simek Signed-off-by: Stephen Boyd commit c1e846b8ee5eee78765242fe204f566596c52ad1 Author: Rajan Vaja Date: Wed Dec 4 22:35:55 2019 -0800 clk: zynqmp: Extend driver for versal Add Versal compatible string to support Versal binding. Signed-off-by: Jolly Shah Signed-off-by: Michal Simek Signed-off-by: Rajan Vaja Link: https://lkml.kernel.org/r/1575527759-26452-3-git-send-email-rajan.vaja@xilinx.com Signed-off-by: Stephen Boyd commit 352546805a44871b68affea09a2fbd5a48e452d0 Author: Rajan Vaja Date: Wed Dec 4 22:35:54 2019 -0800 dt-bindings: clock: Add bindings for versal clock driver Add documentation to describe Xilinx Versal clock driver bindings. Signed-off-by: Rajan Vaja Reviewed-by: Rob Herring Link: https://lkml.kernel.org/r/1575527759-26452-2-git-send-email-rajan.vaja@xilinx.com Signed-off-by: Stephen Boyd commit 9243f296916794d86dfcabd802b4dac1ac1448a9 Author: Rob Herring Date: Tue Nov 19 13:31:20 2019 -0600 dt-bindings: leds: Convert gpio-leds to DT schema Convert the gpio-leds binding to DT schema format. Drop the last example as the node name collides when built, and it doesn't add much value. Cc: Pavel Machek Cc: Dan Murphy Acked-by: Jacek Anaszewski Signed-off-by: Rob Herring commit 24a71afe05a8859f1b490fc59f0023a890db16f0 Author: Rob Herring Date: Tue Nov 19 11:25:53 2019 -0600 dt-bindings: leds: Convert common LED binding to schema Convert the common LEDs properties bindings to a schema. As trigger source providers are different nodes, we need to split trigger source properties to a separate file. Bindings for LED controllers can reference the common schema for the LED child nodes: patternProperties: "^led@[0-4]": type: object allOf: - $ref: common.yaml# Cc: Pavel Machek Cc: Dan Murphy Cc: linux-leds@vger.kernel.org Acked-by: Jacek Anaszewski Signed-off-by: Rob Herring commit 9c4a38f19ed2bda2df2765e98ed661daf61b2cb2 Author: Guenter Roeck Date: Tue Jan 21 21:33:54 2020 -0800 hwmon: (k10temp) Add debugfs support Show thermal and SVI registers for Family 17h CPUs. Tested-by: Sebastian Reichel Signed-off-by: Guenter Roeck commit 70831c8a91845434c3792b0c3ef966dc30741ec0 Author: Guenter Roeck Date: Fri Jan 17 06:43:20 2020 -0800 hwmon: (k10temp) Don't show temperature limits on Ryzen (Zen) CPUs The maximum Tdie or Tctl is not published for Ryzen CPUs. What is known, however, is that the traditional value of 70 degrees C is no longer correct. On top of that, the limit applies to Tctl, not to Tdie. Displaying it in either context is meaningless, confusing, and wrong. Stop doing it. Tested-by: Brad Campbell Tested-by: Holger Kiehl Tested-by: Michael Larabel Tested-by: Jonathan McDowell Tested-by: Ken Moffat Signed-off-by: Guenter Roeck commit b00647c46c9d7f6ee1ff6aaf335906101755e614 Author: Guenter Roeck Date: Tue Jan 14 17:54:05 2020 -0800 hwmon: (k10temp) Show core and SoC current and voltages on Ryzen CPUs Ryzen CPUs report core and SoC voltages and currents. Add support for it to the k10temp driver. For the time being, only report voltages and currents for Ryzen CPUs. Threadripper and EPYC appear to use a different mechanism. Tested-by: Brad Campbell Tested-by: Bernhard Gebetsberger Tested-by: Holger Kiehl Tested-by: Michael Larabel Tested-by: Jonathan McDowell Tested-by: Ken Moffat Tested-by: Darren Salt Signed-off-by: Guenter Roeck commit c757938929c9e1de52e31400f673fac02e1f26bb Author: Guenter Roeck Date: Tue Jan 14 17:40:12 2020 -0800 hwmon: (k10temp) Report temperatures per CPU die Zen2 reports reporting temperatures per CPU die (called Core Complex Dies, or CCD, by AMD). Add support for it to the k10temp driver. Tested-by: Brad Campbell Tested-by: Bernhard Gebetsberger Tested-by: Holger Kiehl Tested-by: Michael Larabel Tested-by: Jonathan McDowell Tested-by: Ken Moffat Tested-by: Darren Salt Signed-off-by: Guenter Roeck commit d547552a1bf1deb321e787a6e6e2a9774573a35f Author: Guenter Roeck Date: Tue Dec 24 07:20:55 2019 -0800 hmon: (k10temp) Convert to use devm_hwmon_device_register_with_info Convert driver to use devm_hwmon_device_register_with_info to simplify the code and to reduce its size. Old size (x86_64): text data bss dec hex filename 8247 4488 64 12799 31ff drivers/hwmon/k10temp.o New size: text data bss dec hex filename 6778 2792 64 9634 25a2 drivers/hwmon/k10temp.o Tested-by: Brad Campbell Tested-by: Bernhard Gebetsberger Tested-by: Holger Kiehl Tested-by: Michael Larabel Tested-by: Jonathan McDowell Tested-by: Ken Moffat Tested-by: Darren Salt Signed-off-by: Guenter Roeck commit a6d210da1a01cb5c3fd4d2dd7b5920642f66677c Author: Guenter Roeck Date: Sun Apr 29 08:39:24 2018 -0700 hwmon: (k10temp) Use bitops Using bitops makes bit masks and shifts easier to read. Tested-by: Brad Campbell Tested-by: Bernhard Gebetsberger Tested-by: Holger Kiehl Tested-by: Michael Larabel Tested-by: Jonathan McDowell Tested-by: Ken Moffat Tested-by: Darren Salt Signed-off-by: Guenter Roeck commit 7992db7cb9d133bc6d3d1731fcd72fe2bec944d4 Author: Akinobu Mita Date: Tue Jan 21 00:32:24 2020 +0900 hwmon: (pwm-fan) stop fan on shutdown The pwm-fan driver stops the fan in suspend but leaves the fan on in shutdown. It seems strange to leave the fan on in shutdown because there is no use case in my mind and the gpio-fan driver on the other hand stops in shutdown. This change turns off the fan in shutdown. If anyone complains then we'll add an optional property to switch the behavior. Cc: Rob Herring Cc: Mark Rutland Cc: Kamil Debski Cc: Bartlomiej Zolnierkiewicz Cc: Guenter Roeck Cc: Thierry Reding Cc: Uwe Kleine-König Signed-off-by: Akinobu Mita Link: https://lore.kernel.org/r/1579534344-11694-1-git-send-email-akinobu.mita@gmail.com Signed-off-by: Guenter Roeck commit 05592bea7a8684e6e5e7c75a6083506b8e534d9f Author: Beniamin Bia Date: Tue Jan 14 13:21:59 2020 +0200 MAINTAINERS: add entry for ADM1177 driver Add Beniamin Bia and Michael Hennerich as a maintainer for ADM1177 ADC. Signed-off-by: Beniamin Bia Link: https://lore.kernel.org/r/20200114112159.25998-3-beniamin.bia@analog.com Signed-off-by: Guenter Roeck commit 7866716170dbf5719839b5e829f825779c277b30 Author: Beniamin Bia Date: Tue Jan 14 13:21:58 2020 +0200 dt-binding: hwmon: Add documentation for ADM1177 Documentation for ADM1177 was added. Signed-off-by: Beniamin Bia Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200114112159.25998-2-beniamin.bia@analog.com Signed-off-by: Guenter Roeck commit 09b08ac9e8d5869c1840de423cd361161964fe8e Author: Beniamin Bia Date: Tue Jan 14 13:21:57 2020 +0200 hwmon: (adm1177) Add ADM1177 Hot Swap Controller and Digital Power Monitor driver ADM1177 is a Hot Swap Controller and Digital Power Monitor with Soft Start Pin. Datasheet: Link: https://www.analog.com/media/en/technical-documentation/data-sheets/ADM1177.pdf Signed-off-by: Beniamin Bia Link: https://lore.kernel.org/r/20200114112159.25998-1-beniamin.bia@analog.com Signed-off-by: Guenter Roeck commit 971dfd8cdcd60fcf78566e3d1e20d865fc4073b5 Author: Vadim Pasternak Date: Mon Jan 13 15:08:41 2020 +0000 docs: hwmon: Include 'xdpe12284.rst' into docs Add documentation for 'xdpe122' devices. Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20200113150841.17670-7-vadimp@mellanox.com [groeck: Added to index.rst] Signed-off-by: Guenter Roeck commit aaafb7c8eb1c53d50ac1857f3b997baeac383378 Author: Vadim Pasternak Date: Mon Jan 13 15:08:39 2020 +0000 hwmon: (pmbus) Add support for Infineon Multi-phase xdpe122 family controllers Add support for devices XDPE12254, XDPE12284. All these device support two pages. The below lists of VOUT_MODE command readout with their related VID protocols, Digital to Analog Converter steps, supported by these devices: VR12.0 mode, 5-mV DAC - 0x01; VR12.5 mode, 10-mV DAC - 0x02; IMVP9 mode, 5-mV DAC - 0x03; AMD mode 6.25mV - 0x10. Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20200113150841.17670-5-vadimp@mellanox.com [groeck: Added missing break statement] Signed-off-by: Guenter Roeck commit 583dc921275c5a0cc7f657550cbf0caae7bf49c3 Author: Vadim Pasternak Date: Mon Jan 13 15:08:38 2020 +0000 hwmon: (pmbus/tps53679) Extend device list supported by driver Extends driver with support of the additional devices: Texas Instruments Dual channel DCAP+ multiphase controllers: TPS53688. Extend Kconfig with added device. Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20200113150841.17670-4-vadimp@mellanox.com Signed-off-by: Guenter Roeck commit 9d72340b6ade9457fc79c7059fcc62e5b888f9a5 Author: Vadim Pasternak Date: Mon Jan 13 15:08:37 2020 +0000 hwmon: (pmbus/core) Add support for Intel IMVP9 and AMD 6.25mV modes Extend "vrm_version" with the type for Intel IMVP9 and AMD 6.25mV VID modes. Add calculation for those types. Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20200113150841.17670-3-vadimp@mellanox.com Signed-off-by: Guenter Roeck commit b9fa0a3acfd86c7d02cf0aac5105c0297bf3c5b0 Author: Vadim Pasternak Date: Mon Jan 13 15:08:36 2020 +0000 hwmon: (pmbus/core) Add support for vid mode detection per page bases Add support for VID protocol detection per page bases, instead of detecting it based on "PMBU_VOUT" readout from page 0 for all the pages supported by particular device. The reason that some devices allows to configure different VID modes per page within the same device. Patch modifies the field "vrm_version" within the structure "pmbus_driver_info" to be per page array. Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20200113150841.17670-2-vadimp@mellanox.com Signed-off-by: Guenter Roeck commit d9c8ae69b9962197883f79c7df3fd562cc52b21a Author: Eddie James Date: Tue Jan 7 09:40:40 2020 -0600 hwmon: (pmbus/ibm-cffps) Prevent writing on_off_config with bad data If the user write parameters resulted in no bytes being written to the temporary buffer, then ON_OFF_CONFIG will be written with uninitialized data. Prevent this by bailing out in this case. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/1578411640-16929-1-git-send-email-eajames@linux.ibm.com Signed-off-by: Guenter Roeck commit 392923715d8b0bbb7e72567fd4090e92bd5a9a3b Author: YueHaibing Date: Wed Jan 8 03:45:14 2020 +0000 hwmon: (w83627ehf) Remove set but not used variable 'fan4min' Fixes gcc '-Wunused-but-set-variable' warning: drivers/hwmon/w83627ehf.c: In function 'w83627ehf_check_fan_inputs': drivers/hwmon/w83627ehf.c:1296:24: warning: variable 'fan4min' set but not used [-Wunused-but-set-variable] commit 62000264cfa8 ("hwmon: (w83627ehf) remove nct6775 and nct6776 support") left behind this unused variable. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200108034514.50130-1-yuehaibing@huawei.com Signed-off-by: Guenter Roeck commit 5b46903d8bf372e563bf2150d46b87fff197a109 Author: Guenter Roeck Date: Thu Nov 28 21:34:40 2019 -0800 hwmon: Driver for disk and solid state drives with temperature sensors Reading the temperature of ATA drives has been supported for years by userspace tools such as smarttools or hddtemp. The downside of such tools is that they need to run with super-user privilege, that the temperatures are not reported by standard tools such as 'sensors' or 'libsensors', and that drive temperatures are not available for use in the kernel's thermal subsystem. This driver solves this problem by adding support for reading the temperature of ATA drives from the kernel using the hwmon API and by adding a temperature zone for each drive. With this driver, the hard disk temperature can be read using the unprivileged 'sensors' application: $ sensors drivetemp-scsi-1-0 drivetemp-scsi-1-0 Adapter: SCSI adapter temp1: +23.0°C or directly from sysfs: $ grep . /sys/class/hwmon/hwmon9/{name,temp1_input} /sys/class/hwmon/hwmon9/name:drivetemp /sys/class/hwmon/hwmon9/temp1_input:23000 If the drive supports SCT transport and reports temperature limits, those are reported as well. drivetemp-scsi-0-0 Adapter: SCSI adapter temp1: +27.0°C (low = +0.0°C, high = +60.0°C) (crit low = -41.0°C, crit = +85.0°C) (lowest = +23.0°C, highest = +34.0°C) The driver attempts to use SCT Command Transport to read the drive temperature. If the SCT Command Transport feature set is not available, or if it does not report the drive temperature, drive temperatures may be readable through SMART attributes. Since SMART attributes are not well defined, this method is only used as fallback mechanism. Cc: Chris Healy Cc: Linus Walleij Cc: Martin K. Petersen Cc: Bart Van Assche Reviewed-by: Linus Walleij Tested-by: Linus Walleij Signed-off-by: Guenter Roeck commit 74a71a831bea81ebb3feb379e62c8accbbec5476 Author: Eddie James Date: Thu Dec 19 14:50:07 2019 -0600 hwmon: (pmbus/ibm-cffps) Fix the LED behavior when turned off The driver should remain in control of the LED on the PSU, even while off, not the PSU firmware as previously indicated. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/1576788607-13567-4-git-send-email-eajames@linux.ibm.com Signed-off-by: Guenter Roeck commit 1952d79a0d2635c9130a48a598dd2f1eea70c45b Author: Eddie James Date: Thu Dec 19 14:50:06 2019 -0600 hwmon: (pmbus/ibm-cffps) Add the VMON property for version 2 Version 2 of the PSU supports reading an auxiliary voltage. Use the pmbus VMON property and associated virtual register to read it. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/1576788607-13567-3-git-send-email-eajames@linux.ibm.com Signed-off-by: Guenter Roeck commit abe508b66d23cf2ed18c991c200b957e92f4bfbc Author: Eddie James Date: Thu Dec 19 14:50:05 2019 -0600 hwmon: (pmbus/ibm-cffps) Add new manufacturer debugfs entries Add support for a number of manufacturer-specific registers in the debugfs entries, as well as support to read and write the PMBUS_ON_OFF_CONFIG register through debugfs. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/1576788607-13567-2-git-send-email-eajames@linux.ibm.com Signed-off-by: Guenter Roeck commit cce209581a61d01f2b7309bed68d22fd8af34ee4 Author: Guenter Roeck Date: Thu Dec 5 20:26:24 2019 -0800 hwmon: (pmbus) Driver for MAX20730, MAX20734, and MAX20743 Add support for Maxim MAX20730, MAX20734, MAX20743 Integrated, Step-Down Switching Regulators with PMBus support. Signed-off-by: Guenter Roeck commit 931f397bc6243f2def1f2c147d415cfcd83a3df5 Author: Dr. David Alan Gilbert Date: Wed Dec 25 02:32:25 2019 +0000 hwmon: (w83627ehf) Now only one intrusion channel The 2nd intrusion channel was only used on the nct6776 Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20191225023225.2785-4-linux@treblig.org Signed-off-by: Guenter Roeck commit 695955028a42793fd09c3149727cbb8085ec6905 Author: Dr. David Alan Gilbert Date: Wed Dec 25 02:32:24 2019 +0000 hwmon: (w83627ehf) Remove code not needed after nct677* removal Now the nct677* are gone, we can clean up some flags that are always the same now and simplify some code. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20191225023225.2785-3-linux@treblig.org Signed-off-by: Guenter Roeck commit 3207408ab4cbe242d48471ce4e10047022a65232 Author: Dr. David Alan Gilbert Date: Wed Dec 25 02:32:23 2019 +0000 hwmon: (w83627ehf) remove nct6775 and nct6776 support The nct6775 and nct6776 are supported by the separate nct6775.c driver, so remove the code from the w83627ehf driver. Suggested-by: Guenter Roeck Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20191225023225.2785-2-linux@treblig.org Signed-off-by: Guenter Roeck commit 1a1ea120afdff06174c62101020005949e0b2056 Author: Guenter Roeck Date: Fri Dec 13 13:36:36 2019 -0800 hwmon: (pmbus) Add MAX20796 to devices supported by generic pmbus driver MAX20796 is a dual-phase scalable integrated voltage regulator with PMBus interface. Signed-off-by: Guenter Roeck commit 8f77203587f5bee21b344f743dbac407871067a3 Author: Chen Zhou Date: Fri Dec 13 09:56:05 2019 +0800 hwmon: (w83627ehf) make sensor_dev_attr_##_name variables static Fix sparse warning: drivers/hwmon/w83627ehf.c:1202:1: warning: symbol 'sensor_dev_attr_pwm1_target' was not declared. Should it be static? and many more similar messages. Reported-by: Hulk Robot Signed-off-by: Chen Zhou Link: https://lore.kernel.org/r/20191213015605.172472-1-chenzhou10@huawei.com [groeck: Dropped all but one log message from description] Signed-off-by: Guenter Roeck commit 9e347728c4fe0f0661194243384ac9f61d7a5c73 Author: Guenter Roeck Date: Thu Dec 12 09:14:34 2019 -0800 hwmon: (pmbus) Detect if chip is write protected If a chip is write protected, we can not change any limits, and we can not clear status flags. This may be the reason why clearing status flags is reported to not work for some chips. Detect the condition in the pmbus core. If the chip is write protected, set limit attributes as read-only, and set the flag indicating that the status flag should be ignored. Signed-off-by: Guenter Roeck commit d21ed22ba7b110746315dff56f62d76352ac5437 Author: Guenter Roeck Date: Sat Nov 23 11:11:26 2019 -0800 hwmon: Driver for MAX31730 MAX31730 is a 3-Channel Remote Temperature Sensor. Signed-off-by: Guenter Roeck commit 002c6b545b85676539add33add8aa7f1f49cbfff Author: Guenter Roeck Date: Tue Jul 17 10:17:19 2018 -0700 hwmon: Add support for enable attributes to hwmon core The hwmon ABI supports enable attributes since commit fb41a710f84e ("hwmon: Document the sensor enable attribute"), but did not add support for those attributes to the hwmon core. Do that now. Since the enable attributes are logically the most important attributes, they are added as first attribute to the attribute list. Move hwmon_in_enable from last to first place for consistency. Signed-off-by: Guenter Roeck commit 266cd5835947d08b7c963b6d9d9f15d9e481bd0a Author: Dr. David Alan Gilbert Date: Sun Nov 24 20:20:30 2019 +0000 hwmon: (w83627ehf) convert to with_info interface Convert the old hwmon_device_register code to devm_hwmon_device_register_with_info. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20191124202030.45360-3-linux@treblig.org Signed-off-by: Guenter Roeck commit a470f11c5ba2febbbba941167e106c726bc1297b Author: Jim Wright Date: Thu Dec 5 17:24:11 2019 -0600 hwmon: (pmbus/ucd9000) Add support for UCD90320 Power Sequencer Add support for the UCD90320 chip and its expanded set of GPIO pins. Signed-off-by: Jim Wright Link: https://lore.kernel.org/r/20191205232411.21492-3-wrightj@linux.vnet.ibm.com Signed-off-by: Guenter Roeck commit 8a36e38d8b0fbb92609e837a67f919202ec7ec51 Author: Jim Wright Date: Thu Dec 5 17:24:10 2019 -0600 dt-bindings: hwmon/pmbus: Add ti,ucd90320 power sequencer Document the UCD90320 device tree binding. Signed-off-by: Jim Wright Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191205232411.21492-2-wrightj@linux.vnet.ibm.com Signed-off-by: Guenter Roeck commit 4413405f931ef97ab1263ae3588e6f656ec220b7 Author: Dr. David Alan Gilbert Date: Sun Nov 24 20:20:29 2019 +0000 hwmon: Add intrusion templates Add templates for intrusion%d_alarm and intrusion%d_beep. Note, these start at 0. Signed-off-by: Dr. David Alan Gilbert Link: https://lore.kernel.org/r/20191124202030.45360-2-linux@treblig.org Signed-off-by: Guenter Roeck commit e1ac611f57c9315e79c4ca9fb2a21c81106d3680 Author: Rob Herring Date: Fri Nov 8 13:18:29 2019 -0600 dt-bindings: PCI: Convert generic host binding to DT schema Convert the generic PCI host binding to DT schema. The derivative Juno, PLDA XpressRICH3-AXI, and Designware ECAM bindings all just vary in their compatible strings. The simplest way to convert those to schema is just add them into the common generic PCI host schema. The HiSilicon ECAM and Cavium ThunderX PEM bindings have an additional 'reg' entry, but are otherwise the same binding as well. Cc: Bjorn Helgaas Cc: Lorenzo Pieralisi Cc: Andrew Murray Cc: Zhou Wang Cc: Will Deacon Cc: David Daney Signed-off-by: Rob Herring commit 919ba6e739eb76d7a99284795b72c45e096c9aa0 Author: Rob Herring Date: Fri Nov 8 13:18:29 2019 -0600 dt-bindings: PCI: Convert Arm Versatile binding to DT schema Convert the Arm Versatile PCI host binding to a DT schema. Cc: Bjorn Helgaas Cc: Lorenzo Pieralisi Cc: Andrew Murray Acked-by: Linus Walleij Signed-off-by: Rob Herring commit 7dcde0f337c3225ebe25ba070bd244d291219627 Author: Linus Walleij Date: Thu Oct 31 10:06:02 2019 +0100 dt-bindings: Be explicit about installing deps Make sure the reader of the document is aware that some active installation of the libyaml development package is required and provide two examples. Signed-off-by: Linus Walleij Signed-off-by: Rob Herring commit 11183ac07a7460b93acb4b5860528bf30f4d319f Author: Olivier Moysan Date: Thu Jan 23 09:34:31 2020 +0100 dt-bindings: stm32: convert dfsdm to json-schema Convert the STM32 DFSDM bindings to DT schema format using json-schema. Signed-off-by: Olivier Moysan Signed-off-by: Rob Herring commit af1c2d81695b1a565069619f7c0d3f2d0dec8e74 Author: Benjamin Gaignard Date: Wed Jan 22 10:55:58 2020 +0100 dt-bindings: serial: Convert STM32 UART to json-schema Convert STM32 UART bindings to json-schema. Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit d50f974c4f7fef1b2d1d010f4f81d40e1ad09f8a Author: Benjamin Gaignard Date: Wed Jan 22 10:55:57 2020 +0100 dt-bindings: serial: Convert rs485 bindings to json-schema Convert rs485 binding to yaml style file. Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit c5c689d3221e5fc82525db454021b1adcb33d855 Author: Douglas Anderson Date: Fri Jan 17 15:53:26 2020 -0800 dt-bindings: timer: Use non-empty ranges in example On many arm64 qcom device trees, running `make dtbs_check` yells: timer@17c20000: #size-cells:0:0: 1 was expected It appears that someone was trying to assert the fact that sub-nodes describing frames would never have a size that's more than 32-bits big. That does indeed appear to be true for all cases I could find. Currently many arm64 qcom device tree files have a #address-cells and about in commit bede7d2dc8f3 ("arm64: dts: qcom: sdm845: Increase address and size cells for soc"). That means the only way we can shrink them down is to use a non-empty ranges. Since forever it has said in "writing-bindings.txt" to "DO use non-empty 'ranges' to limit the size of child buses/devices". I guess we should start listening to it. I believe (but am not certain) that this also means that we should use "ranges" to simplify the "reg" of our sub devices by specifying an offset. Let's update the example in the bindings to make this obvious. Signed-off-by: Douglas Anderson Signed-off-by: Rob Herring commit 9bbc8be29d66cc34b650510f2c67b5c55235fe5d Merge: 790e01149a11 7c453526dc50 Author: David S. Miller Date: Thu Jan 23 21:27:23 2020 +0100 Merge tag 'mlx5-updates-2020-01-22' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2020-01-22 This series provides updates to mlx5 driver. 1) Misc small cleanups 2) Some SW steering updates including header copy support 3) Full ethtool statistics support for E-Switch uplink representor Some refactoring was required to share the bare-metal NIC ethtool stats with the Uplink representor. On Top of this Vlad converts the ethtool stats support in E-Swtich vports representors to use the mlx5e "stats groups" infrastructure and then applied all applicable stats to the uplink representor netdev. ==================== Signed-off-by: David S. Miller commit 790e01149a115f77f5aa075e4ea0f81e45961523 Merge: 6d9f6e6790e7 2ace13e10dbd Author: David S. Miller Date: Thu Jan 23 21:21:12 2020 +0100 Merge branch 'Add-PHY-IDs-for-DP83825-6' Dan Murphy says: ==================== Add PHY IDs for DP83825/6 Adding new PHY IDs for the DP83825 and DP83826 TI Ethernet PHYs to the DP83822 PHY driver. ==================== Signed-off-by: David S. Miller commit 2ace13e10dbd1c8c5c9f118e5d4d0e0a77b152c7 Author: Dan Murphy Date: Wed Jan 22 09:34:55 2020 -0600 net: phy: DP83822: Add support for additional DP83825 devices Add PHY IDs for the DP83825CS, DP83825CM and the DP83825S devices to the DP83822 driver. Signed-off-by: Dan Murphy Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 783da36bb90cbf45be7fa82a0d0d3910f1f6fcc7 Author: Dan Murphy Date: Wed Jan 22 09:34:54 2020 -0600 phy: dp83826: Add phy IDs for DP83826N and 826NC Add phy IDs to the DP83822 phy driver for the DP83826N and the DP83826NC devices. The register map and features are the same for basic enablement. Signed-off-by: Dan Murphy Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 987f028b8637cfa7658aa456ae73f8f21a7a7f6f Author: Gustavo A. R. Silva Date: Mon Jan 20 17:53:26 2020 -0600 char: hpet: Use flexible-array member Old code in the kernel uses 1-byte and 0-byte arrays to indicate the presence of a "variable length array": struct something { int length; u8 data[1]; }; struct something *instance; instance = kmalloc(sizeof(*instance) + size, GFP_KERNEL); instance->length = size; memcpy(instance->data, source, size); There is also 0-byte arrays. Both cases pose confusion for things like sizeof(), CONFIG_FORTIFY_SOURCE, etc.[1] Instead, the preferred mechanism to declare variable-length types such as the one above is a flexible array member[2] which need to be the last member of a structure and empty-sized: struct something { int stuff; u8 data[]; }; Also, by making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being unadvertenly introduced[3] to the codebase from now on. [1] https://github.com/KSPP/linux/issues/21 [2] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200120235326.GA29231@embeddedor.com Signed-off-by: Greg Kroah-Hartman commit 5336da37a5eac761611352707c3890a3cf857aa6 Author: Colin Ian King Date: Thu Jan 23 00:29:21 2020 +0000 partitions/ldm: fix spelling mistake "to" -> "too" There is a spelling mistake in a ldm_error message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Jens Axboe commit 45fc24e89b7cc2e227b2f03d99dda0a2204bf383 Author: Dave Hansen Date: Thu Jan 23 10:41:20 2020 -0800 x86/mpx: remove MPX from arch/x86 From: Dave Hansen MPX is being removed from the kernel due to a lack of support in the toolchain going forward (gcc). This removes all the remaining (dead at this point) MPX handling code remaining in the tree. The only remaining code is the XSAVE support for MPX state which is currently needd for KVM to handle VMs which might use MPX. Cc: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: x86@kernel.org Cc: Linus Torvalds Cc: Andrew Morton Signed-off-by: Dave Hansen commit 42222eae17f7c930833dfda7896ef280879de94a Author: Dave Hansen Date: Thu Jan 23 10:41:16 2020 -0800 mm: remove arch_bprm_mm_init() hook From: Dave Hansen MPX is being removed from the kernel due to a lack of support in the toolchain going forward (gcc). arch_bprm_mm_init() is used at execve() time. The only non-stub implementation is on x86 for MPX. Remove the hook entirely from all architectures and generic code. Cc: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: x86@kernel.org Cc: Linus Torvalds Cc: linux-arch@vger.kernel.org Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: Guan Xuetao Cc: Andrew Morton Signed-off-by: Dave Hansen commit aa9ccb7b47f909e2e7206ebb47e4c63e477199fc Author: Dave Hansen Date: Thu Jan 23 10:41:15 2020 -0800 x86/mpx: remove bounds exception code From: Dave Hansen MPX is being removed from the kernel due to a lack of support in the toolchain going forward (gcc). Remove the other user-visible ABI: signal handling. This code should basically have been inactive after the prctl()s were removed, but there may be some small ABI remnants from this code. Remove it. Cc: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: x86@kernel.org Cc: Linus Torvalds Cc: Andrew Morton Signed-off-by: Dave Hansen commit 4ba68d00055774308ede6c4c2133e5a8b70a2ab8 Author: Dave Hansen Date: Thu Jan 23 10:41:14 2020 -0800 x86/mpx: remove build infrastructure From: Dave Hansen MPX is being removed from the kernel due to a lack of support in the toolchain going forward (gcc). Remove the Kconfig option and the Makefile line. This makes arch/x86/mm/mpx.c and anything under an #ifdef for X86_INTEL_MPX dead code. Cc: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: x86@kernel.org Cc: Linus Torvalds Cc: Andrew Morton Signed-off-by: Dave Hansen commit 3a1255396b5aba40299d5dd5bde67b160a44117f Author: Dave Hansen Date: Thu Jan 23 10:41:13 2020 -0800 x86/alternatives: add missing insn.h include From: Dave Hansen While testing my MPX removal series, Borislav noted compilation failure with an allnoconfig build. Turned out to be a missing include of insn.h in alternative.c. With MPX, it got it implicitly from: asm/mmu_context.h -> asm/mpx.h -> asm/insn.h Fixes: c3d6324f841b ("x86/alternatives: Teach text_poke_bp() to emulate instructions") Reported-by: Borislav Petkov Cc: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: x86@kernel.org Cc: Linus Torvalds Cc: Andrew Morton Signed-off-by: Dave Hansen commit 6435f773d81f02193228685a7e3fe65c983c5de0 Author: Zong Li Date: Thu Jan 2 11:12:39 2020 +0800 riscv: mm: add support for CONFIG_DEBUG_VIRTUAL This patch implements CONFIG_DEBUG_VIRTUAL to do additional checks on virt_to_phys and __pa_symbol calls. virt_to_phys used for linear mapping check, and __pa_symbol used for kernel symbol check. In current RISC-V, kernel image maps to linear mapping area. If CONFIG_DEBUG_VIRTUAL is disable, these two functions calculate the offset on the address feded directly without any checks. The result of test_debug_virtual as follows: [ 0.358456] ------------[ cut here ]------------ [ 0.358738] virt_to_phys used for non-linear address: (____ptrval____) (0xffffffd000000000) [ 0.359174] WARNING: CPU: 0 PID: 1 at arch/riscv/mm/physaddr.c:16 __virt_to_phys+0x3c/0x50 [ 0.359409] Modules linked in: [ 0.359630] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.5.0-rc3-00002-g5133c5c0ca13 #57 [ 0.359861] epc: ffffffe000253d1a ra : ffffffe000253d1a sp : ffffffe03aa87da0 [ 0.360019] gp : ffffffe000ae03b0 tp : ffffffe03aa88000 t0 : ffffffe000af2660 [ 0.360175] t1 : 0000000000000064 t2 : 00000000000000b7 s0 : ffffffe03aa87dc0 [ 0.360330] s1 : ffffffd000000000 a0 : 000000000000004f a1 : 0000000000000000 [ 0.360492] a2 : 0000000000000000 a3 : 0000000000000000 a4 : ffffffe000a84358 [ 0.360672] a5 : 0000000000000000 a6 : 0000000000000000 a7 : 0000000000000000 [ 0.360876] s2 : ffffffe000ae0600 s3 : ffffffe00000fc7c s4 : ffffffe0000224b0 [ 0.361067] s5 : ffffffe000030890 s6 : ffffffe000022470 s7 : 0000000000000008 [ 0.361267] s8 : ffffffe0000002c4 s9 : ffffffe000ae0640 s10: ffffffe000ae0630 [ 0.361453] s11: 0000000000000000 t3 : 0000000000000000 t4 : 000000000001e6d0 [ 0.361636] t5 : ffffffe000ae0a18 t6 : ffffffe000aee54e [ 0.361806] status: 0000000000000120 badaddr: 0000000000000000 cause: 0000000000000003 [ 0.362056] ---[ end trace aec0bf78d4978122 ]--- [ 0.362404] PA: 0xfffffff080200000 for VA: 0xffffffd000000000 [ 0.362607] PA: 0x00000000baddd2d0 for VA: 0xffffffe03abdd2d0 Signed-off-by: Zong Li Reviewed-by: Paul Walmsley Tested-by: Paul Walmsley Signed-off-by: Palmer Dabbelt commit e3de04469a49ee09c89e80bf821508df458ccee6 Author: Coly Li Date: Fri Jan 24 01:01:42 2020 +0800 bcache: reap from tail of c->btree_cache in bch_mca_scan() When shrink btree node cache from c->btree_cache in bch_mca_scan(), no matter the selected node is reaped or not, it will be rotated from the head to the tail of c->btree_cache list. But in bcache journal code, when flushing the btree nodes with oldest journal entry, btree nodes are iterated and slected from the tail of c->btree_cache list in btree_flush_write(). The list_rotate_left() in bch_mca_scan() will make btree_flush_write() iterate more nodes in c->btree_list in reverse order. This patch just reaps the selected btree node cache, and not move it from the head to the tail of c->btree_cache list. Then bch_mca_scan() will not mess up c->btree_cache list to btree_flush_write(). Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit d5c9c470b01177e4d90cdbf178b8c7f37f5b8795 Author: Coly Li Date: Fri Jan 24 01:01:41 2020 +0800 bcache: reap c->btree_cache_freeable from the tail in bch_mca_scan() In order to skip the most recently freed btree node cahce, currently in bch_mca_scan() the first 3 caches in c->btree_cache_freeable list are skipped when shrinking bcache node caches in bch_mca_scan(). The related code in bch_mca_scan() is, 737 list_for_each_entry_safe(b, t, &c->btree_cache_freeable, list) { 738 if (nr <= 0) 739 goto out; 740 741 if (++i > 3 && 742 !mca_reap(b, 0, false)) { lines free cache memory 746 } 747 nr--; 748 } The problem is, if virtual memory code calls bch_mca_scan() and the calculated 'nr' is 1 or 2, then in the above loop, nothing will be shunk. In such case, if slub/slab manager calls bch_mca_scan() for many times with small scan number, it does not help to shrink cache memory and just wasts CPU cycles. This patch just selects btree node caches from tail of the c->btree_cache_freeable list, then the newly freed host cache can still be allocated by mca_alloc(), and at least 1 node can be shunk. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 125d98edd11464c8e0ec9eaaba7d682d0f832686 Author: Coly Li Date: Fri Jan 24 01:01:40 2020 +0800 bcache: remove member accessed from struct btree The member 'accessed' of struct btree is used in bch_mca_scan() when shrinking btree node caches. The original idea is, if b->accessed is set, clean it and look at next btree node cache from c->btree_cache list, and only shrink the caches whose b->accessed is cleaned. Then only cold btree node cache will be shrunk. But when I/O pressure is high, it is very probably that b->accessed of a btree node cache will be set again in bch_btree_node_get() before bch_mca_scan() selects it again. Then there is no chance for bch_mca_scan() to shrink enough memory back to slub or slab system. This patch removes member accessed from struct btree, then once a btree node ache is selected, it will be immediately shunk. By this change, bch_mca_scan() may release btree node cahce more efficiently. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit d44330b7f13e7f243f7d0e0426741219708ff7de Author: Guoju Fang Date: Fri Jan 24 01:01:38 2020 +0800 bcache: print written and keys in trace_bcache_btree_write It's useful to dump written block and keys on btree write, this patch add them into trace_bcache_btree_write. Signed-off-by: Guoju Fang Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 2aa8c529387c25606fdc1484154b92f8bfbc5746 Author: Coly Li Date: Fri Jan 24 01:01:37 2020 +0800 bcache: avoid unnecessary btree nodes flushing in btree_flush_write() the commit 91be66e1318f ("bcache: performance improvement for btree_flush_write()") was an effort to flushing btree node with oldest btree node faster in following methods, - Only iterate dirty btree nodes in c->btree_cache, avoid scanning a lot of clean btree nodes. - Take c->btree_cache as a LRU-like list, aggressively flushing all dirty nodes from tail of c->btree_cache util the btree node with oldest journal entry is flushed. This is to reduce the time of holding c->bucket_lock. Guoju Fang and Shuang Li reported that they observe unexptected extra write I/Os on cache device after applying the above patch. Guoju Fang provideed more detailed diagnose information that the aggressive btree nodes flushing may cause 10x more btree nodes to flush in his workload. He points out when system memory is large enough to hold all btree nodes in memory, c->btree_cache is not a LRU-like list any more. Then the btree node with oldest journal entry is very probably not- close to the tail of c->btree_cache list. In such situation much more dirty btree nodes will be aggressively flushed before the target node is flushed. When slow SATA SSD is used as cache device, such over- aggressive flushing behavior will cause performance regression. After spending a lot of time on debug and diagnose, I find the real condition is more complicated, aggressive flushing dirty btree nodes from tail of c->btree_cache list is not a good solution. - When all btree nodes are cached in memory, c->btree_cache is not a LRU-like list, the btree nodes with oldest journal entry won't be close to the tail of the list. - There can be hundreds dirty btree nodes reference the oldest journal entry, before flushing all the nodes the oldest journal entry cannot be reclaimed. When the above two conditions mixed together, a simply flushing from tail of c->btree_cache list is really NOT a good idea. Fortunately there is still chance to make btree_flush_write() work better. Here is how this patch avoids unnecessary btree nodes flushing, - Only acquire c->journal.lock when getting oldest journal entry of fifo c->journal.pin. In rested locations check the journal entries locklessly, so their values can be changed on other cores in parallel. - In loop list_for_each_entry_safe_reverse(), checking latest front point of fifo c->journal.pin. If it is different from the original point which we get with locking c->journal.lock, it means the oldest journal entry is reclaim on other cores. At this moment, all selected dirty nodes recorded in array btree_nodes[] are all flushed and clean on other CPU cores, it is unncessary to iterate c->btree_cache any longer. Just quit the list_for_each_entry_safe_reverse() loop and the following for-loop will skip all the selected clean nodes. - Find a proper time to quit the list_for_each_entry_safe_reverse() loop. Check the refcount value of orignial fifo front point, if the value is larger than selected node number of btree_nodes[], it means more matching btree nodes should be scanned. Otherwise it means no more matching btee nodes in rest of c->btree_cache list, the loop can be quit. If the original oldest journal entry is reclaimed and fifo front point is updated, the refcount of original fifo front point will be 0, then the loop will be quit too. - Not hold c->bucket_lock too long time. c->bucket_lock is also required for space allocation for cached data, hold it for too long time will block regular I/O requests. When iterating list c->btree_cache, even there are a lot of maching btree nodes, in order to not holding c->bucket_lock for too long time, only BTREE_FLUSH_NR nodes are selected and to flush in following for-loop. With this patch, only btree nodes referencing oldest journal entry are flushed to cache device, no aggressive flushing for unnecessary btree node any more. And in order to avoid blocking regluar I/O requests, each time when btree_flush_write() called, at most only BTREE_FLUSH_NR btree nodes are selected to flush, even there are more maching btree nodes in list c->btree_cache. At last, one more thing to explain: Why it is safe to read front point of c->journal.pin without holding c->journal.lock inside the list_for_each_entry_safe_reverse() loop ? Here is my answer: When reading the front point of fifo c->journal.pin, we don't need to know the exact value of front point, we just want to check whether the value is different from the original front point (which is accurate value because we get it while c->jouranl.lock is held). For such purpose, it works as expected without holding c->journal.lock. Even the front point is changed on other CPU core and not updated to local core, and current iterating btree node has identical journal entry local as original fetched fifo front point, it is still safe. Because after holding mutex b->write_lock (with memory barrier) this btree node can be found as clean and skipped, the loop will quite latter when iterate on next node of list c->btree_cache. Fixes: 91be66e1318f ("bcache: performance improvement for btree_flush_write()") Reported-by: Guoju Fang Reported-by: Shuang Li Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 7a0bc2a8966040d54289b64842d55e2cf4343ad9 Author: Coly Li Date: Fri Jan 24 01:01:36 2020 +0800 bcache: add code comments for state->pool in __btree_sort() To explain the pages allocated from mempool state->pool can be swapped in __btree_sort(), because state->pool is a page pool, which allocates pages by alloc_pages() indeed. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 0e0c12316d8a645e7b1880e135837ee78d18aed9 Author: Ben Dooks (Codethink) Date: Fri Jan 24 01:01:35 2020 +0800 lib: crc64: include for 'crc64_be' The crc64_be() is declared in so include this where the symbol is defined to avoid the following warning: lib/crc64.c:43:12: warning: symbol 'crc64_be' was not declared. Should it be static? Signed-off-by: Ben Dooks (Codethink) Reviewed-by: Andy Shevchenko Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 6321bef028de43724c47cfa7f9dee69ecb783796 Author: Christoph Hellwig Date: Fri Jan 24 01:01:34 2020 +0800 bcache: use read_cache_page_gfp to read the superblock Avoid a pointless dependency on buffer heads in bcache by simply open coding reading a single page. Also add a SB_OFFSET define for the byte offset of the superblock instead of using magic numbers. Signed-off-by: Christoph Hellwig Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 475389ae5c08656f8bb5cc3adc88a531c7c4877f Author: Christoph Hellwig Date: Fri Jan 24 01:01:33 2020 +0800 bcache: store a pointer to the on-disk sb in the cache and cached_dev structures This allows to properly build the superblock bio including the offset in the page using the normal bio helpers. This fixes writing the superblock for page sizes larger than 4k where the sb write bio would need an offset in the bio_vec. Signed-off-by: Christoph Hellwig Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit cfa0c56db9c087227988f6af2c7b9888d24a3b16 Author: Christoph Hellwig Date: Fri Jan 24 01:01:32 2020 +0800 bcache: return a pointer to the on-disk sb from read_super Returning the properly typed actual data structure insteaf of the containing struct page will save the callers some work going forward. Signed-off-by: Christoph Hellwig Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit fc8f19cc5dce183cde4fecb9a1da07d81fa6ea8d Author: Christoph Hellwig Date: Fri Jan 24 01:01:31 2020 +0800 bcache: transfer the sb_page reference to register_{bdev,cache} Avoid an extra reference count roundtrip by transferring the sb_page ownership to the lower level register helpers. Signed-off-by: Christoph Hellwig Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit ae3cd299919af6eb670d5af0bc9d7ba14086bd8e Author: Coly Li Date: Fri Jan 24 01:01:30 2020 +0800 bcache: fix use-after-free in register_bcache() The patch "bcache: rework error unwinding in register_bcache" introduces a use-after-free regression in register_bcache(). Here are current code, 2510 out_free_path: 2511 kfree(path); 2512 out_module_put: 2513 module_put(THIS_MODULE); 2514 out: 2515 pr_info("error %s: %s", path, err); 2516 return ret; If some error happens and the above code path is executed, at line 2511 path is released, but referenced at line 2515. Then KASAN reports a use- after-free error message. This patch changes line 2515 in the following way to fix the problem, 2515 pr_info("error %s: %s", path?path:"", err); Signed-off-by: Coly Li Cc: Christoph Hellwig Signed-off-by: Jens Axboe commit 29cda393bcaad160c4bf3676ddd99855adafc72f Author: Coly Li Date: Fri Jan 24 01:01:29 2020 +0800 bcache: properly initialize 'path' and 'err' in register_bcache() Patch "bcache: rework error unwinding in register_bcache" from Christoph Hellwig changes the local variables 'path' and 'err' in undefined initial state. If the code in register_bcache() jumps to label 'out:' or 'out_module_put:' by goto, these two variables might be reference with undefined value by the following line, out_module_put: module_put(THIS_MODULE); out: pr_info("error %s: %s", path, err); return ret; Therefore this patch initializes these two local variables properly in register_bcache() to avoid such issue. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 50246693f81fe887f4db78bf7089051d7f1894cc Author: Christoph Hellwig Date: Fri Jan 24 01:01:28 2020 +0800 bcache: rework error unwinding in register_bcache Split the successful and error return path, and use one goto label for each resource to unwind. This also fixes some small errors like leaking the module reference count in the reboot case (which seems entirely harmless) or printing the wrong warning messages for early failures. Signed-off-by: Christoph Hellwig Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit a702a692cd7559053ea573f4e2c84828f0e62824 Author: Christoph Hellwig Date: Fri Jan 24 01:01:27 2020 +0800 bcache: use a separate data structure for the on-disk super block Split out an on-disk version struct cache_sb with the proper endianness annotations. This fixes a fair chunk of sparse warnings, but there are some left due to the way the checksum is defined. Signed-off-by: Christoph Hellwig Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit e8547d42095e58bee658f00fef8e33d2a185c927 Author: Liang Chen Date: Fri Jan 24 01:01:26 2020 +0800 bcache: cached_dev_free needs to put the sb page Same as cache device, the buffer page needs to be put while freeing cached_dev. Otherwise a page would be leaked every time a cached_dev is stopped. Signed-off-by: Liang Chen Signed-off-by: Christoph Hellwig Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 1306cc0a30910d92314d18b17a947cd6294ee4af Author: Jiaxun Yang Date: Mon Jan 13 18:15:01 2020 +0800 MIPS: Loongson64: Disable exec hazard Loongson64 has hardware mechanism to prevent hazard issue, so we can simply disable exec hazard in cpu-features. Signed-off-by: Jiaxun Yang Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: chenhc@lemote.com Cc: paul.burton@mips.com Cc: linux-kernel@vger.kernel.org commit 51522217f65f1f937f421d9f417cf0e714ef3c02 Author: Jiaxun Yang Date: Mon Jan 13 18:15:00 2020 +0800 MIPS: Loongson64: Bump ISA level to MIPSR2 Despite early sample of Loongson-3A1000, the whole Loongson64 family have implemented all the features required by MIPS64 Release2. Thus we decide to bump the ISA option to R2. Signed-off-by: Jiaxun Yang Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: chenhc@lemote.com Cc: paul.burton@mips.com Cc: linux-kernel@vger.kernel.org commit ba9196d2e005a07dc616a044a57b47665efe133d Author: Jiaxun Yang Date: Mon Jan 13 18:14:59 2020 +0800 MIPS: Make DIEI support as a config option DI(Disable Interrupt) and EI(Enable Interrupt) instructions is required by MIPSR2/MIPSR6, however, it appears to be buggy on some processors such as Loongson-3A1000. Thus we make it as a config option to allow disable it at compile time with CPU_MIPSR2 selected. Signed-off-by: Jiaxun Yang Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: chenhc@lemote.com Cc: paul.burton@mips.com Cc: linux-kernel@vger.kernel.org commit 85f4c95172d606dd66f7ee1fa50c45a245535ffd Author: Gustavo A. R. Silva Date: Tue Jan 21 11:21:38 2020 -0600 tty: n_hdlc: Use flexible-array member and struct_size() helper Old code in the kernel uses 1-byte and 0-byte arrays to indicate the presence of a "variable length array": struct something { int length; u8 data[1]; }; struct something *instance; instance = kmalloc(sizeof(*instance) + size, GFP_KERNEL); instance->length = size; memcpy(instance->data, source, size); There is also 0-byte arrays. Both cases pose confusion for things like sizeof(), CONFIG_FORTIFY_SOURCE, etc.[1] Instead, the preferred mechanism to declare variable-length types such as the one above is a flexible array member[2] which need to be the last member of a structure and empty-sized: struct something { int stuff; u8 data[]; }; Also, by making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertenly introduced[3] to the codebase from now on. Lastly, make use of the struct_size() helper to safely calculate the allocation size for instances of struct n_hdlc_buf and avoid any potential type mistakes[4][5]. [1] https://github.com/KSPP/linux/issues/21 [2] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") [4] https://lore.kernel.org/lkml/60e14fb7-8596-e21c-f4be-546ce39e7bdb@embeddedor.com/ [5] commit 553d66cb1e86 ("iommu/vt-d: Use struct_size() helper") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Jiri Slaby Link: https://lore.kernel.org/r/20200121172138.GA3162@embeddedor Signed-off-by: Greg Kroah-Hartman commit 636e9d23dd45ec7d637c2c2ca63c38d9aa5c5fbd Author: Colin Ian King Date: Thu Jan 23 00:54:22 2020 +0000 MIPS: OCTEON: octeon-irq: fix spelling mistake "to" -> "too" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: linux-mips@vger.kernel.org Cc: kernel-janitors@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 3e86460ebe2340df6a33b35a55312cc369bdcbd0 Author: Wang Xuerui Date: Thu Jan 23 12:04:09 2020 +0800 MIPS: asm: local: add barriers for Loongson Somehow these LL/SC usages are not taken care of, breaking Loongson builds. Add the SYNCs appropriately. Signed-off-by: Wang Xuerui Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Huacai Chen Cc: Jiaxun Yang Cc: # v5.5+ commit fdabc466f335bc3cbda8eca2270a8af783cae7eb Author: Linus Walleij Date: Thu Jan 23 16:50:13 2020 +0100 usb: phy: phy-gpio-vbus-usb: Convert to GPIO descriptors Instead of using the legacy GPIO API and keeping track on polarity inversion semantics in the driver, switch to use GPIO descriptors for this driver and change all consumers in the process. This makes it possible to retire platform data completely: the only remaining platform data member was "wakeup" which was intended to make the vbus interrupt wakeup capable, but was not set by any users and thus remained unused. VBUS was not waking any devices up. Leave a comment about it so later developers using the platform can consider setting it to always enabled so plugging in USB wakes up the platform. Cc: Daniel Mack Cc: Haojian Zhuang Acked-by: Robert Jarzmik Acked-by: Felipe Balbi Acked-by: Sylwester Nawrocki Acked-by: Philipp Zabel Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20200123155013.93249-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2893c678321904722dd588d91efa074e24828c6f Author: Colin Ian King Date: Thu Jan 23 01:03:44 2020 +0000 staging: comedi: drivers: fix spelling mistake "to" -> "too" There is a spelling mistake in a deb_dbg message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200123010344.2834618-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 52b0c4709d23ad018a6acf34ca194fa60c71814b Author: Tetsuhiro Kohada Date: Thu Jan 23 19:24:45 2020 +0900 staging: exfat: remove fs_func struct. Remove 'fs_func struct' and change indirect calls to direct calls. The following issues are described in exfat's TODO. > Create helper function for exfat_set_entry_time () and > exfat_set_entry_type () because it's sort of ugly to be calling the same functionn directly and other code calling through the fs_func struc ponters ... The fs_func struct was used for switching the helper functions of fat16/fat32/exfat. Now, it has lost the role of switching, just making the code less readable. Signed-off-by: Tetsuhiro Kohada Link: https://lore.kernel.org/r/20200123102445.123033-1-Kohada.Tetsuhiro@dc.MitsubishiElectric.co.jp Signed-off-by: Greg Kroah-Hartman commit bd4217cb9d54171a109fe63d0ac801cc7a18edb9 Author: Ajay Singh Date: Thu Jan 23 12:50:49 2020 +0000 staging: wilc1000: avoid mutex unlock without lock in wilc_wlan_handle_txq() In wilc_wlan_handle_txq(), mutex unlock was called without acquiring it. Also error code for full VMM condition was incorrect as discussed in [1]. Now used a proper code to indicate VMM is full, for which transfer to VMM is required again. 'wilc_wlan_handle_txq()' should be called again if the VMM space was full earlier or otherwise based on 'txq_event' signal. 1. https://lore.kernel.org/driverdev-devel/20191113183322.a54mh2w6dulklgsd@kili.mountain/ Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20200123182129.4053-2-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit 7a80aa23d0f0f52478339840577137f556bf9121 Author: Ajay Singh Date: Thu Jan 23 12:50:47 2020 +0000 staging: wilc1000: return zero on success and non-zero on function failure Some of the HIF layer API's return zero for failure and non-zero for success condition. Now, modified the functions to return zero for success and non-zero for failure as its recommended approach suggested in [1]. 1. https://lore.kernel.org/driverdev-devel/20191113183322.a54mh2w6dulklgsd@kili.mountain/ Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20200123182129.4053-1-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit 2256e6f68c9e02524182640ba9584d978d490145 Author: Tony Lindgren Date: Sun Jan 19 11:56:59 2020 -0800 ARM: dts: omap4-droid4: Enable hdq for droid4 ds250x 1-wire battery nvmem With "[PATCHv3] w1: omap-hdq: Simplify driver with PM runtime autosuspend" we can read the droid4 battery information over 1-wire with this patch with something like: # modprobe omap_hdq # hd /sys/bus/w1/devices/89-*/89-*/nvmem ... Unfortunately the format of the battery data seems to be Motorola specific and is currently unusable for battery charger unless somebody figures out what it means. Note that currently keeping omap_hdq module loaded will cause extra power consumption as it seems to scan devices periodically. Cc: Merlijn Wajer Cc: Pavel Machek Acked-by: Pavel Machek Signed-off-by: Tony Lindgren commit 36f808f2f1e9edb6fb129002a5ae71551b925225 Author: Tony Lindgren Date: Sun Jan 19 11:45:01 2020 -0800 ARM: dts: motorola-cpcap-mapphone: Configure calibration interrupt We added coulomb counter calibration support With commit 0cb90f071f73 ("power: supply: cpcap-battery: Add basic coulomb counter calibrate support"), but we also need to configure the related interrupt. Without the interrupt calibration happens based on a timeout after two seconds, with the interrupt the calibration just gets done a bit faster. Cc: Merlijn Wajer Cc: Pavel Machek Acked-by: Pavel Machek Signed-off-by: Tony Lindgren commit a5ebccc822d8f84cd899e3e64f770f2bd4d7951b Author: Tony Lindgren Date: Fri Nov 8 13:31:25 2019 -0800 ARM: dts: Configure interconnect target module for am437x sgx This seems to be similar to what we have for am335x. The following can be tested via sysfs with the to ensure the SGX module gets enabled and disabled properly: # echo on > /sys/bus/platform/devices/5600fe00.target-module/power/control # rwmem 0x5600fe00 # revision register 0x5600fe00 = 0x40000000 # echo auto > /sys/bus/platform/devices/5600fe00.target-module/power/control # rwmem 0x5000fe00 Bus error Note that this patch depends on the PRM rstctrl driver that has been recently posted. If the child device driver(s) need to prevent rstctrl reset on PM runtime suspend, the drivers need to increase the usecount for the shared rstctrl reset that can be mapped also for the child device(s) or accessed via dev->parent. Cc: Adam Ford Cc: Filip Matijević Cc: "H. Nikolaus Schaller" Cc: Ivaylo Dimitrov Cc: moaz korena Cc: Merlijn Wajer Cc: Paweł Chmiel Cc: Philipp Rossak Cc: Tomi Valkeinen Signed-off-by: Tony Lindgren commit 45e118b7805e618db39a2b1b85bd50d8c8614643 Author: Tony Lindgren Date: Fri Nov 1 09:31:23 2019 -0700 ARM: dts: Configure sgx for dra7 I've tested that the interconnect target module enables and idles just fine when probed with ti-sysc with PM runtime control via sys: # echo on > $(find /sys -name control | grep \/5600) # rwmem 0x5600fe00 # OCP Revision 0x5600fe00 = 0x40000000 # echo auto > $(find /sys -name control | grep \/5600) Cc: "H. Nikolaus Schaller" Cc: Robert Nelson Cc: Tomi Valkeinen Signed-off-by: Tony Lindgren commit c3fb99f46efdd34ea84c1968065aaa15164d4500 Author: Tony Lindgren Date: Wed Aug 14 06:14:08 2019 -0700 ARM: dts: Configure rstctrl reset for am335x SGX The following can be tested via sysfs with the following to ensure the SGX module gets enabled and disabled properly: # echo on > /sys/bus/platform/devices/5600fe00.target-module/power/control # rwmem 0x5600fe00 # revision register 0x5600fe00 = 0x40000000 # echo auto > /sys/bus/platform/devices/5600fe00.target-module/power/control # rwmem 0x5000fe00 Bus error Note that this patch depends on the PRM rstctrl driver that has been recently posted. If the child device driver(s) need to prevent rstctrl reset on PM runtime suspend, the drivers need to increase the usecount for the shared rstctrl reset that can be mapped also for the child device(s) or accessed via dev->parent. Cc: Adam Ford Cc: Filip Matijević Cc: "H. Nikolaus Schaller" Cc: Ivaylo Dimitrov Cc: moaz korena Cc: Merlijn Wajer Cc: Paweł Chmiel Cc: Philipp Rossak Cc: Tomi Valkeinen Signed-off-by: Tony Lindgren commit d7a9d45d5f060aec1e1909e3d57da5635a1bac97 Merge: 6bcc319fc619 1a2095160594 Author: Tony Lindgren Date: Thu Jan 23 09:59:29 2020 -0800 Merge branch 'omap-for-v5.6/ti-sysc-dt-cam' into omap-for-v5.6/dt commit 1a2095160594f52ce8fecca634038f1deeb3577c Author: Benoit Parrot Date: Wed Dec 11 08:08:10 2019 -0600 ARM: dts: dra7: Add ti-sysc node for VPE Add VPE node as a child of l4 interconnect in order for it to probe using ti-sysc. Signed-off-by: Benoit Parrot Signed-off-by: Tony Lindgren commit 79312524dbf1c3b24226e1804235c2578422c86d Author: Benoit Parrot Date: Wed Dec 11 08:08:09 2019 -0600 ARM: dts: dra7: add vpe clkctrl node Add clkctrl nodes for VPE module. Note that because of the current dts node name dependency for mapping to clock domain, we must still use "vpe-clkctrl@" naming instead of generic "clock@" naming for the node. And because of this, it's probably best to apply the dts node addition together along with the other clock changes. Signed-off-by: Benoit Parrot Acked-by: Tony Lindgren Signed-off-by: Tony Lindgren commit d916ab415b5f4583e79ecd6ecc17b0bd414abcc3 Author: Benoit Parrot Date: Wed Dec 11 08:07:20 2019 -0600 ARM: dts: am43x-epos-evm: Add VPFE and OV2659 entries Add VPFE device nodes entries. Add OmniVision OV2659 sensor device nodes and linkage. Since Rev1.2a on this board the sensor source clock (xvclk) has a dedicated 12Mhz oscillator instead of using clkout1. Add 'audio_mstrclk' fixed clock object to represent it. Signed-off-by: Benoit Parrot Signed-off-by: Tony Lindgren commit f8404f159515eae8495ec042ab964660fcc165ce Author: Benoit Parrot Date: Wed Dec 11 08:07:19 2019 -0600 ARM: dts: am437x-sk-evm: Add VPFE and OV2659 entries Add VPFE device nodes entries. Add OmniVision OV2659 sensor device nodes and linkage. The sensor clock (xvclk) is sourced from clkout1. Add clock entries to properly select clkout1 and set its parent clock to sys_clkin_ck. Signed-off-by: Benoit Parrot Signed-off-by: Tony Lindgren commit 01053dadb79d63b65f7b353e68b4b6ccf4effedb Author: Tero Kristo Date: Wed Dec 11 08:07:18 2019 -0600 ARM: dts: am43xx: add support for clkout1 clock clkout1 clock node and its generation tree was missing. Add this based on the data on TRM and PRCM functional spec. commit 664ae1ab2536 ("ARM: dts: am43xx: add clkctrl nodes") effectively reverted this commit 8010f13a40d3 ("ARM: dts: am43xx: add support for clkout1 clock") which is needed for the ov2659 camera sensor clock definition hence it is being re-applied here. Note that because of the current dts node name dependency for mapping to clock domain, we must still use "clkout1-*ck" naming instead of generic "clock@" naming for the node. And because of this, it's probably best to apply the dts node addition together along with the other clock changes. Fixes: 664ae1ab2536 ("ARM: dts: am43xx: add clkctrl nodes") Signed-off-by: Tero Kristo Tested-by: Benoit Parrot Acked-by: Tony Lindgren Signed-off-by: Benoit Parrot Signed-off-by: Tony Lindgren commit fc7100ea2a52fcf200be75421bfd32652827d287 Author: Hridya Valsaraju Date: Wed Jan 22 10:51:16 2020 -0800 f2fs: Add f2fs stats to sysfs Currently f2fs stats are only available from /d/f2fs/status. This patch adds some of the f2fs stats to sysfs so that they are accessible even when debugfs is not mounted. The following sysfs nodes are added: -/sys/fs/f2fs//free_segments -/sys/fs/f2fs//cp_foreground_calls -/sys/fs/f2fs//cp_background_calls -/sys/fs/f2fs//gc_foreground_calls -/sys/fs/f2fs//gc_background_calls -/sys/fs/f2fs//moved_blocks_foreground -/sys/fs/f2fs//moved_blocks_background -/sys/fs/f2fs//avg_vblocks Signed-off-by: Hridya Valsaraju [Jaegeuk Kim: allow STAT_FS without DEBUG_FS] Signed-off-by: Jaegeuk Kim commit 831d2fa25ab8e27592b1b0268dae6f2dfaf7cc43 Author: Filipe Manana Date: Mon Dec 16 18:26:56 2019 +0000 Btrfs: make deduplication with range including the last block work Since btrfs was migrated to use the generic VFS helpers for clone and deduplication, it stopped allowing for the last block of a file to be deduplicated when the source file size is not sector size aligned (when eof is somewhere in the middle of the last block). There are two reasons for that: 1) The generic code always rounds down, to a multiple of the block size, the range's length for deduplications. This means we end up never deduplicating the last block when the eof is not block size aligned, even for the safe case where the destination range's end offset matches the destination file's size. That rounding down operation is done at generic_remap_check_len(); 2) Because of that, the btrfs specific code does not expect anymore any non-aligned range length's for deduplication and therefore does not work if such nona-aligned length is given. This patch addresses that second part, and it depends on a patch that fixes generic_remap_check_len(), in the VFS, which was submitted ealier and has the following subject: "fs: allow deduplication of eof block into the end of the destination file" These two patches address reports from users that started seeing lower deduplication rates due to the last block never being deduplicated when the file size is not aligned to the filesystem's block size. Link: https://lore.kernel.org/linux-btrfs/2019-1576167349.500456@svIo.N5dq.dFFD/ CC: stable@vger.kernel.org # 5.1+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit a5e6ea18e3d132be4716eb5fdd520c2c234e3003 Author: Filipe Manana Date: Mon Dec 16 18:26:55 2019 +0000 fs: allow deduplication of eof block into the end of the destination file We always round down, to a multiple of the filesystem's block size, the length to deduplicate at generic_remap_check_len(). However this is only needed if an attempt to deduplicate the last block into the middle of the destination file is requested, since that leads into a corruption if the length of the source file is not block size aligned. When an attempt to deduplicate the last block into the end of the destination file is requested, we should allow it because it is safe to do it - there's no stale data exposure and we are prepared to compare the data ranges for a length not aligned to the block (or page) size - in fact we even do the data compare before adjusting the deduplication length. After btrfs was updated to use the generic helpers from VFS (by commit 34a28e3d77535e ("Btrfs: use generic_remap_file_range_prep() for cloning and deduplication")) we started to have user reports of deduplication not reflinking the last block anymore, and whence users getting lower deduplication scores. The main use case is deduplication of entire files that have a size not aligned to the block size of the filesystem. We already allow cloning the last block to the end (and beyond) of the destination file, so allow for deduplication as well. Link: https://lore.kernel.org/linux-btrfs/2019-1576167349.500456@svIo.N5dq.dFFD/ CC: stable@vger.kernel.org # 5.1+ Reviewed-by: Josef Bacik Reviewed-by: Darrick J. Wong Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 6080d608eeff7cb5090a2ddbaf723bfb0ff133fc Author: Madhuparna Bhowmik Date: Wed Jan 22 22:34:47 2020 +0530 module.h: Annotate mod_kallsyms with __rcu This patch fixes the following sparse errors: kernel/module.c:3623:9: error: incompatible types in comparison expression kernel/module.c:4060:41: error: incompatible types in comparison expression kernel/module.c:4203:28: error: incompatible types in comparison expression kernel/module.c:4225:41: error: incompatible types in comparison expression Signed-off-by: Madhuparna Bhowmik Signed-off-by: Jessica Yu commit 3bd7b487a6dd3e43475bb473ecb8b9c5203a0de1 Author: Benoit Parrot Date: Wed Dec 11 08:05:56 2019 -0600 arm: dts: dra76-evm: Add CAL and OV5640 nodes Add device nodes for CSI2 camera board OV5640. Add the CAL port nodes with the necessary linkage to the ov5640 nodes. Signed-off-by: Benoit Parrot Signed-off-by: Tony Lindgren commit 807276375ff44bdd5f94d26021ae630b5ed64bfc Author: Benoit Parrot Date: Wed Dec 11 08:05:55 2019 -0600 arm: dtsi: dra76x: Add CAL dtsi node Add the required dtsi node to support the Camera Adaptation Layer (CAL) for the DRA76 family of devices. Signed-off-by: Benoit Parrot Signed-off-by: Tony Lindgren commit 414dc3d33b912fb1a98b0d2df05e16e359705fd3 Author: Benoit Parrot Date: Wed Dec 11 08:05:54 2019 -0600 arm: dts: dra72-evm-common: Add entries for the CSI2 cameras Add device nodes for CSI2 camera board OV5640. Add the CAL port nodes with the necessary linkage to the ov5640 nodes. Signed-off-by: Benoit Parrot Signed-off-by: Tony Lindgren commit 86a7e226dd73f8676f2bee6dccf5a705f649521a Author: Benoit Parrot Date: Wed Dec 11 08:05:53 2019 -0600 ARM: dts: DRA72: Add CAL dtsi node This patch adds the required dtsi node to support the Camera Adaptation Layer (CAL) for the DRA72 family of devices. Signed-off-by: Benoit Parrot Signed-off-by: Tony Lindgren commit b31617258977ff1e63c8c3582fb27207f8ec292d Author: Benoit Parrot Date: Wed Dec 11 08:05:52 2019 -0600 ARM: dts: dra7-l4: Add ti-sysc node for CAM Add CAM nodes as a child of l4 interconnect in order for it to probe using ti-sysc. Signed-off-by: Benoit Parrot Signed-off-by: Tony Lindgren commit 2baee0c5b359a4ce76f56b06c6cc4d7d642537a9 Author: Benoit Parrot Date: Wed Dec 11 08:05:51 2019 -0600 ARM: OMAP: DRA7xx: Make CAM clock domain SWSUP only Both CAL and VIP rely on this clock domain. But CAL DPHY require LVDSRX_96M_GFCLK to be active. When this domain is set to HWSUP the LVDSRX_96M_GFCLK is on;y active when VIP1 clock is also active. If only CAL on DRA72x (which uses the VIP2 clkctrl) probes the CAM domain is enabled but the LVDSRX_96M_GFCLK is left gated. Since LVDSRX_96M_GFCLK is sourcing the input clock to the DPHY then actual frame capture cannot start as the phy are inactive. So we either have to also enabled VIP1 even if we don't intend on using it or we need to set the CAM domain to use SWSUP only. This patch implements the latter. Signed-off-by: Benoit Parrot Acked-by: Tony Lindgren Signed-off-by: Tony Lindgren commit 215d103f36626da36c424aa7309ae1b5e7e38d14 Author: Benoit Parrot Date: Wed Dec 11 08:05:50 2019 -0600 ARM: dts: dra7: add cam clkctrl node Add clkctrl nodes for CAM domain. Note that because of the current dts node name dependency for mapping to clock domain, we must still use "cam-clkctrl@" naming instead of generic "clock@" naming for the node. And because of this, it's probably best to apply the dts node addition together along with the other clock changes. Signed-off-by: Benoit Parrot Acked-by: Tony Lindgren Signed-off-by: Tony Lindgren commit 4068664e3cd2312610ceac05b74c4cf1853b8325 Author: Dmitry Monakhov Date: Wed Nov 6 12:25:02 2019 +0000 ext4: fix extent_status fragmentation for plain files Extents are cached in read_extent_tree_block(); as a result, extents are not cached for inodes with depth == 0 when we try to find the extent using ext4_find_extent(). The result of the lookup is cached in ext4_map_blocks() but is only a subset of the extent on disk. As a result, the contents of extents status cache can get very badly fragmented for certain workloads, such as a random 4k read workload. File size of /mnt/test is 33554432 (8192 blocks of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 8191: 40960.. 49151: 8192: last,eof $ perf record -e 'ext4:ext4_es_*' /root/bin/fio --name=t --direct=0 --rw=randread --bs=4k --filesize=32M --size=32M --filename=/mnt/test $ perf script | grep ext4_es_insert_extent | head -n 10 fio 131 [000] 13.975421: ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [494/1) mapped 41454 status W fio 131 [000] 13.975939: ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [6064/1) mapped 47024 status W fio 131 [000] 13.976467: ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [6907/1) mapped 47867 status W fio 131 [000] 13.976937: ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [3850/1) mapped 44810 status W fio 131 [000] 13.977440: ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [3292/1) mapped 44252 status W fio 131 [000] 13.977931: ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [6882/1) mapped 47842 status W fio 131 [000] 13.978376: ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [3117/1) mapped 44077 status W fio 131 [000] 13.978957: ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [2896/1) mapped 43856 status W fio 131 [000] 13.979474: ext4:ext4_es_insert_extent: dev 253,0 ino 12 es [7479/1) mapped 48439 status W Fix this by caching the extents for inodes with depth == 0 in ext4_find_extent(). [ Renamed ext4_es_cache_extents() to ext4_cache_extents() since this newly added function is not in extents_cache.c, and to avoid potential visual confusion with ext4_es_cache_extent(). -TYT ] Signed-off-by: Dmitry Monakhov Link: https://lore.kernel.org/r/20191106122502.19986-1-dmonakhov@gmail.com Signed-off-by: Theodore Ts'o commit 885d21e4956dd70fcd84ed653a8368c9729cfb3e Merge: a25e29bd0fe9 ddf664da3b9c Author: Tony Lindgren Date: Thu Jan 23 08:38:34 2020 -0800 Merge branch 'omap-for-v5.6/ti-sysc-omap45-rng' into omap-for-v5.6/ti-sysc-drop-pdata commit ddf664da3b9c6d5c31e0d0c6e5aeb3e65250fdff Author: Tony Lindgren Date: Thu Dec 12 09:46:14 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap4 des 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: Tero Kristo Signed-off-by: Tony Lindgren commit bea5e904728e797fce2fb21e119f3831aa640d07 Author: Tony Lindgren Date: Thu Dec 12 09:46:13 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap4 sham 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: Tero Kristo Signed-off-by: Tony Lindgren commit 814b253877345d01d78ea4786ad246c16e537378 Author: Tony Lindgren Date: Thu Dec 12 09:46:13 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap4 aes 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: Tero Kristo Signed-off-by: Tony Lindgren commit 23673f17358ac2bb4d3b33dad3f5645b54937344 Author: Tony Lindgren Date: Thu Dec 12 09:46:13 2019 -0800 ARM: dts: Configure interconnect target module for omap4 des 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: Tero Kristo Signed-off-by: Tony Lindgren commit 316a418e28b6a4c72b991eebdd191c44ad5c2215 Author: Tony Lindgren Date: Thu Dec 12 09:46:12 2019 -0800 ARM: dts: Configure interconnect target module for omap4 aes 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: Tero Kristo Signed-off-by: Tony Lindgren commit 4e19443da1941050b346f8fc4c368aa68413bc88 Author: Josef Bacik Date: Tue Jan 21 09:17:06 2020 -0500 btrfs: free block groups after free'ing fs trees Sometimes when running generic/475 we would trip the WARN_ON(cache->reserved) check when free'ing the block groups on umount. This is because sometimes we don't commit the transaction because of IO errors and thus do not cleanup the tree logs until at umount time. These blocks are still reserved until they are cleaned up, but they aren't cleaned up until _after_ we do the free block groups work. Fix this by moving the free after free'ing the fs roots, that way all of the tree logs are cleaned up and we have a properly cleaned fs. A bunch of loops of generic/475 confirmed this fixes the problem. CC: stable@vger.kernel.org # 4.9+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1362089d2ad7e20d16371b39d3c11990d4ec23e4 Author: Nikolay Borisov Date: Fri Jan 10 14:11:35 2020 +0200 btrfs: Fix split-brain handling when changing FSID to metadata uuid Current code doesn't correctly handle the situation which arises when a file system that has METADATA_UUID_INCOMPAT flag set and has its FSID changed to the one in metadata uuid. This causes the incompat flag to disappear. In case of a power failure we could end up in a situation where part of the disks in a multi-disk filesystem are correctly reverted to METADATA_UUID_INCOMPAT flag unset state, while others have METADATA_UUID_INCOMPAT set and CHANGING_FSID_V2_IN_PROGRESS. This patch corrects the behavior required to handle the case where a disk of the second type is scanned first, creating the necessary btrfs_fs_devices. Subsequently, when a disk which has already completed the transition is scanned it should overwrite the data in btrfs_fs_devices. Reported-by: Su Yue Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 05840710149c7d1a78ea85a2db5723f706e97d8f Author: Nikolay Borisov Date: Fri Jan 10 14:11:34 2020 +0200 btrfs: Handle another split brain scenario with metadata uuid feature There is one more cases which isn't handled by the original metadata uuid work. Namely, when a filesystem has METADATA_UUID incompat bit and the user decides to change the FSID to the original one e.g. have metadata_uuid and fsid match. In case of power failure while this operation is in progress we could end up in a situation where some of the disks have the incompat bit removed and the other half have both METADATA_UUID_INCOMPAT and FSID_CHANGING_IN_PROGRESS flags. This patch handles the case where a disk that has successfully changed its FSID such that it equals METADATA_UUID is scanned first. Subsequently when a disk with both METADATA_UUID_INCOMPAT/FSID_CHANGING_IN_PROGRESS flags is scanned find_fsid_changed won't be able to find an appropriate btrfs_fs_devices. This is done by extending find_fsid_changed to correctly find btrfs_fs_devices whose metadata_uuid/fsid are the same and they match the metadata_uuid of the currently scanned device. Fixes: cc5de4e70256 ("btrfs: Handle final split-brain possibility during fsid change") Reviewed-by: Josef Bacik Reported-by: Su Yue Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit c6730a0e5778bf2d83189f97ab5e3efe61f6aad1 Author: Su Yue Date: Fri Jan 10 14:11:33 2020 +0200 btrfs: Factor out metadata_uuid code from find_fsid. find_fsid became rather hairy with the introduction of metadata uuid changing feature. Alleviate this by factoring out the metadata uuid specific code in a dedicated function which deals with finding correct fsid for a device with changed uuid. Reviewed-by: Josef Bacik Signed-off-by: Su Yue Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit c0d81c7cb236782d674ae5701d1a237949e47a7a Author: Su Yue Date: Fri Jan 10 14:11:32 2020 +0200 btrfs: Call find_fsid from find_fsid_inprogress Since find_fsid_inprogress should also handle the case in which an fs didn't change its FSID make it call find_fsid directly. This makes the code in device_list_add simpler by eliminating a conditional call of find_fsid. No functional changes. Reviewed-by: Josef Bacik Signed-off-by: Su Yue Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit b5e4ff9d465da1233a2d9a47ebce487c70d8f4ab Author: Filipe Manana Date: Wed Jan 15 13:21:35 2020 +0000 Btrfs: fix infinite loop during fsync after rename operations Recently fsstress (from fstests) sporadically started to trigger an infinite loop during fsync operations. This turned out to be because support for the rename exchange and whiteout operations was added to fsstress in fstests. These operations, unlike any others in fsstress, cause file names to be reused, whence triggering this issue. However it's not necessary to use rename exchange and rename whiteout operations trigger this issue, simple rename operations and file creations are enough to trigger the issue. The issue boils down to when we are logging inodes that conflict (that had the name of any inode we need to log during the fsync operation), we keep logging them even if they were already logged before, and after that we check if there's any other inode that conflicts with them and then add it again to the list of inodes to log. Skipping already logged inodes fixes the issue. Consider the following example: $ mkfs.btrfs -f /dev/sdb $ mount /dev/sdb /mnt $ mkdir /mnt/testdir # inode 257 $ touch /mnt/testdir/zz # inode 258 $ ln /mnt/testdir/zz /mnt/testdir/zz_link $ touch /mnt/testdir/a # inode 259 $ sync # The following 3 renames achieve the same result as a rename exchange # operation ( /mnt/testdir/zz_link to /mnt/testdir/a). $ mv /mnt/testdir/a /mnt/testdir/a/tmp $ mv /mnt/testdir/zz_link /mnt/testdir/a $ mv /mnt/testdir/a/tmp /mnt/testdir/zz_link # The following rename and file creation give the same result as a # rename whiteout operation ( zz to a2). $ mv /mnt/testdir/zz /mnt/testdir/a2 $ touch /mnt/testdir/zz # inode 260 $ xfs_io -c fsync /mnt/testdir/zz --> results in the infinite loop The following steps happen: 1) When logging inode 260, we find that its reference named "zz" was used by inode 258 in the previous transaction (through the commit root), so inode 258 is added to the list of conflicting indoes that need to be logged; 2) After logging inode 258, we find that its reference named "a" was used by inode 259 in the previous transaction, and therefore we add inode 259 to the list of conflicting inodes to be logged; 3) After logging inode 259, we find that its reference named "zz_link" was used by inode 258 in the previous transaction - we add inode 258 to the list of conflicting inodes to log, again - we had already logged it before at step 3. After logging it again, we find again that inode 259 conflicts with him, and we add again 259 to the list, etc - we end up repeating all the previous steps. So fix this by skipping logging of conflicting inodes that were already logged. Fixes: 6b5fc433a7ad67 ("Btrfs: fix fsync after succession of renames of different files") CC: stable@vger.kernel.org # 5.1+ Signed-off-by: Filipe Manana Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit d62b23c94952e78211a383b7d90ef0afbd9a3717 Author: Josef Bacik Date: Fri Jan 17 08:57:51 2020 -0500 btrfs: set trans->drity in btrfs_commit_transaction If we abort a transaction we have the following sequence if (!trans->dirty && list_empty(&trans->new_bgs)) return; WRITE_ONCE(trans->transaction->aborted, err); The idea being if we didn't modify anything with our trans handle then we don't really need to abort the whole transaction, maybe the other trans handles are fine and we can carry on. However in the case of create_snapshot we add a pending_snapshot object to our transaction and then commit the transaction. We don't actually modify anything. sync() behaves the same way, attach to an existing transaction and commit it. This means that if we have an IO error in the right places we could abort the committing transaction with our trans->dirty being not set and thus not set transaction->aborted. This is a problem because in the create_snapshot() case we depend on pending->error being set to something, or btrfs_commit_transaction returning an error. If we are not the trans handle that gets to commit the transaction, and we're waiting on the commit to happen we get our return value from cur_trans->aborted. If this was not set to anything because sync() hit an error in the transaction commit before it could modify anything then cur_trans->aborted would be 0. Thus we'd return 0 from btrfs_commit_transaction() in create_snapshot. This is a problem because we then try to do things with pending_snapshot->snap, which will be NULL because we didn't create the snapshot, and then we'll get a NULL pointer dereference like the following "BUG: kernel NULL pointer dereference, address: 00000000000001f0" RIP: 0010:btrfs_orphan_cleanup+0x2d/0x330 Call Trace: ? btrfs_mksubvol.isra.31+0x3f2/0x510 btrfs_mksubvol.isra.31+0x4bc/0x510 ? __sb_start_write+0xfa/0x200 ? mnt_want_write_file+0x24/0x50 btrfs_ioctl_snap_create_transid+0x16c/0x1a0 btrfs_ioctl_snap_create_v2+0x11e/0x1a0 btrfs_ioctl+0x1534/0x2c10 ? free_debug_processing+0x262/0x2a3 do_vfs_ioctl+0xa6/0x6b0 ? do_sys_open+0x188/0x220 ? syscall_trace_enter+0x1f8/0x330 ksys_ioctl+0x60/0x90 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x4a/0x1b0 In order to fix this we need to make sure anybody who calls commit_transaction has trans->dirty set so that they properly set the trans->transaction->aborted value properly so any waiters know bad things happened. This was found while I was running generic/475 with my modified fsstress, it reproduced within a few runs. I ran with this patch all night and didn't see the problem again. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 889bfa39086e86b52fcfaa04d72c95eaeb12f9a5 Author: Josef Bacik Date: Fri Jan 17 09:12:45 2020 -0500 btrfs: drop log root for dropped roots If we fsync on a subvolume and create a log root for that volume, and then later delete that subvolume we'll never clean up its log root. Fix this by making switch_commit_roots free the log for any dropped roots we encounter. The extra churn is because we need a btrfs_trans_handle, not the btrfs_transaction. CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 668e48af7a94985be7cf3b97a860d9819271d8bf Author: Anand Jain Date: Mon Jan 6 19:38:31 2020 +0800 btrfs: sysfs, add devid/dev_state kobject and device attributes New sysfs attributes that track the filesystem status of devices, stored in the per-filesystem directory in /sys/fs/btrfs/FSID/devinfo . There's a directory for each device, with name corresponding to the numerical device id. in_fs_metadata - device is in the list of fs metadata missing - device is missing (no device node or block device) replace_target - device is target of replace writeable - writes from fs are allowed These attributes reflect the state of the device::dev_state and created at mount time. Sample output: $ pwd /sys/fs/btrfs/6e1961f1-5918-4ecc-a22f-948897b409f7/devinfo/1/ $ ls in_fs_metadata missing replace_target writeable $ cat missing 0 The output from these attributes are 0 or 1. 0 indicates unset and 1 indicates set. These attributes are readonly. It is observed that the device delete thread and sysfs read thread will not race because the delete thread calls sysfs kobject_put() which in turn waits for existing sysfs read to complete. Note for device replace devid swap: During the replace the target device temporarily assumes devid 0 before assigning the devid of the soruce device. In btrfs_dev_replace_finishing() we remove source sysfs devid using the function btrfs_sysfs_remove_devices_attr(), so after that call kobject_rename() to update the devid in the sysfs. This adds and calls btrfs_sysfs_update_devid() helper function to update the device id. Signed-off-by: Anand Jain Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit 1776ad172e1ff09d4aa57daac74c56b4e1b0c636 Author: Nikolay Borisov Date: Tue Nov 19 14:05:53 2019 +0200 btrfs: Refactor btrfs_rmap_block to improve readability Move variables to appropriate scope. Remove last BUG_ON in the function and rework error handling accordingly. Make the duplicate detection code more straightforward. Use in_range macro. And give variables more descriptive name by explicitly distinguishing between IO stripe size (size recorded in the chunk item) and data stripe size (the size of an actual stripe, constituting a logical chunk/block group). Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit bf2e2eb060fa29dd892fa42dd0a03f130815acf0 Author: Nikolay Borisov Date: Tue Dec 10 20:00:45 2019 +0200 btrfs: Add self-tests for btrfs_rmap_block Add RAID1 and single testcases to verify that data stripes are excluded from super block locations and that the address mapping is valid. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit b3ad2c17fd80f2db3b824c28691adaaa4ffa2fc4 Author: Nikolay Borisov Date: Tue Nov 19 14:05:51 2019 +0200 btrfs: selftests: Add support for dummy devices Add basic infrastructure to create and link dummy btrfs_devices. This will be used in the pending btrfs_rmap_block test which deals with the block groups. Calling btrfs_alloc_dummy_device will link the newly created device to the passed fs_info and the test framework will free them once the test is finished. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 96a14336bd8fc13cc3db036a5745acdf3bc185f4 Author: Nikolay Borisov Date: Tue Dec 10 19:57:51 2019 +0200 btrfs: Move and unexport btrfs_rmap_block It's used only during initial block group reading to map physical address of super block to a list of logical ones. Make it private to block-group.c, add proper kernel doc and ensure it's exported only for tests. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 68c467cbb2f389b6c933e235bce0d1756fc8cc34 Author: David Sterba Date: Mon Dec 16 20:00:48 2019 +0100 btrfs: separate definition of assertion failure handlers There's a report where objtool detects unreachable instructions, eg.: fs/btrfs/ctree.o: warning: objtool: btrfs_search_slot()+0x2d4: unreachable instruction This seems to be a false positive due to compiler version. The cause is in the ASSERT macro implementation that does the conditional check as IS_DEFINED(CONFIG_BTRFS_ASSERT) and not an #ifdef. To avoid that, use the ifdefs directly. There are still 2 reports that aren't fixed: fs/btrfs/extent_io.o: warning: objtool: __set_extent_bit()+0x71f: unreachable instruction fs/btrfs/relocation.o: warning: objtool: find_data_references()+0x4e0: unreachable instruction Co-developed-by: Josh Poimboeuf Signed-off-by: Josh Poimboeuf Reported-by: Randy Dunlap Signed-off-by: David Sterba commit 18c48e6d5bb21558ea7f9bcc8e263b83fbad127a Author: Tony Lindgren Date: Thu Dec 12 09:46:12 2019 -0800 ARM: dts: Configure interconnect target module for omap4 sham 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: Tero Kristo Signed-off-by: Tony Lindgren commit 30c2d7ca3fbcee7920979097b2d9bd5b0114ff68 Author: Tony Lindgren Date: Thu Dec 12 09:46:11 2019 -0800 ARM: dts: Configure omap5 rng to probe with ti-sysc This is similar to dra7 and omap4 with different clock naming and module address. Cc: devicetree@vger.kernel.org Cc: Rob Herring Signed-off-by: Tony Lindgren commit fbb8bb8370f6fdaaaccf85201f4ee2a665aae42d Author: Tony Lindgren Date: Thu Dec 12 09:46:11 2019 -0800 ARM: dts: Configure omap4 rng to probe with ti-sysc Add RNG interconnect data for omap4 similar to what dra7 has. The clock is OMAP4_CM_L4SEC_RNG_CLKCTRL_OFFSET at offset address 0x01c0, which matches what dra7 also has with DRA7_L4SEC_CLKCTRL_INDEX(0x1c0). Note that we need to also add the related l4_secure clock entries. I've only added RNG, the others can be added as they get tested. They are probably very similar to what we already have for dra7 in dra7_l4sec_clkctrl_regs[]. With the clock tagged CLKF_SOC_NONSEC, clock is set disabled for secure devices and clk_get() will fail. Additionally we disable the RNG target module on droid4 to avoid introducing new boot time warnings. Cc: devicetree@vger.kernel.org Cc: Rob Herring Signed-off-by: Tony Lindgren commit 723a567f43b8ffa8089009bc8a260cc6f963661e Author: Tony Lindgren Date: Thu Dec 12 09:46:10 2019 -0800 ARM: dts: Add missing omap5 secure clocks The secure clocks on omap5 are similar to what we already have for dra7 with dra7_l4sec_clkctrl_regs and documented in the omap5432 TRM in "Table 3-1044. CORE_CM_CORE Registers Mapping Summary". The secure clocks are part of the l4per clock manager. As the l4per clock manager has now two clock domains as children, let's also update the l4per clockdomain node name to follow the "clock" node naming with a domain specific compatible property. Compared to omap4, omap5 has more clocks working in hardare autogating mode. Cc: devicetree@vger.kernel.org Cc: Rob Herring Acked-by: Stephen Boyd Signed-off-by: Tony Lindgren commit cfcbc2dbb70826b91aa45ae37168b2db2aac1803 Author: Tony Lindgren Date: Thu Dec 12 09:46:10 2019 -0800 ARM: dts: Add missing omap4 secure clocks The secure clocks on omap4 are similar to what we already have for dra7 in dra7_l4sec_clkctrl_regs and documented in the omap4460 TRM "Table 3-1346 L4PER_CM2 Registers Mapping Summary". The secure clocks are part of the l4_per clock manager. As the l4_per clock manager has now two clock domains as children, let's also update the l4_per clockdomain node name to follow the "clock" node naming with a domain specific compatible property. Cc: devicetree@vger.kernel.org Cc: Rob Herring Acked-by: Stephen Boyd Signed-off-by: Tony Lindgren commit 3543d7ddd55fe12c37e8a9db846216c51846015b Author: Marc Zyngier Date: Thu Jan 23 14:51:12 2020 +0000 arm64: dts: fast models: Fix FVP PCI interrupt-map property The interrupt map for the FVP's PCI node is missing the parent-unit-address cells for each of the INTx entries, leading to the kernel code failing to parse the entries correctly. Add the missing zero cells, which are pretty useless as far as the GIC is concerned, but that the spec requires. This allows INTx to be usable on the model, and VFIO to work correctly. Fixes: fa083b99eb28 ("arm64: dts: fast models: Add DTS fo Base RevC FVP") Signed-off-by: Marc Zyngier Signed-off-by: Sudeep Holla commit c37baa06f8a970e4a533d41f7d33e5e57de5ad25 Author: Andrew F. Davis Date: Wed Jan 22 12:20:17 2020 -0500 ARM: OMAP2+: Fix undefined reference to omap_secure_init omap_secure_init() is now called from all OMAP2+ platforms during their init_early() call. This function is in omap-secure.o so include that in the build for these platforms. Fixes: db711893eac8 ("ARM: OMAP2+: Add omap_secure_init callback hook for secure initialization") Reported-by: Dan Murphy Signed-off-by: Andrew F. Davis Tested-by: Dan Murphy Signed-off-by: Tony Lindgren commit 81563bed1e11a184a753148c0e7dfc5e26a71981 Author: Ooi, Joyce Date: Sat Jan 4 01:01:55 2020 +0800 MAINTAINERS: Replace Tien Hock Loh as Altera PIO maintainer This patch is to replace Tien Hock Loh as Altera PIO maintainer as he has moved to a different role. Signed-off-by: Ooi, Joyce Link: https://lore.kernel.org/r/20200103170155.100743-1-joyce.ooi@intel.com Acked-by: Tien Hock Loh Signed-off-by: Linus Walleij commit 207270dd0b2d593a8b92043c9bcdabb42111fcc3 Author: Dan Callaghan Date: Tue Jan 21 10:12:17 2020 +1000 gpiolib: hold gpio devices lock until ->descs array is initialised If a driver consuming the GPIO chip is being probed at the same time as the GPIO driver is registering the chip, it is possible for the consuming driver to see the ->descs array in an uninitialised state. For example, the gpio-keys-polled driver can fail like this: kernel: gpiod_request: invalid GPIO (no device) kernel: gpio-keys-polled PRP0001:07: failed to get gpio: -22 kernel: gpio-keys-polled: probe of PRP0001:07 failed with error -22 This patch makes gpiochip_add() hold the lock protecting gpio_devices until it has finished setting desc->gdev on the newly inserted list entry. Signed-off-by: Dan Callaghan Link: https://lore.kernel.org/r/20200121001216.15964-1-dan.callaghan@opengear.com Signed-off-by: Linus Walleij commit 0d311d8b93cfc8ab36aa11f09e15a5fe87147c02 Author: Sachin agarwal Date: Sat Jan 18 16:23:19 2020 +0530 gpio: aspeed-sgpio: fixed typos This fixes some various typos. Signed-off-by: Sachin Agarwal Link: https://lore.kernel.org/r/20200118105319.68637-1-sachinagarwal@sachins-MacBook-2.local Signed-off-by: Linus Walleij commit 06e26b75f5e613b400116fdb7ff6206a681ab271 Author: Peng Fan Date: Wed Dec 18 12:43:53 2019 +0000 pinctrl: mvebu: armada-37xx: use use platform api platform_irq_count() and platform_get_irq() is the more generic way (independent of device trees) to determine the count of available interrupts. So use this instead. As platform_irq_count() might return an error code (which of_irq_count doesn't) some additional handling is necessary. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1576672860-14420-1-git-send-email-peng.fan@nxp.com Signed-off-by: Linus Walleij commit 322e929d196c27fa1bd50b389b800e9c30419bde Merge: 18451f9f9e58 c052bf82c6b0 Author: Rafael J. Wysocki Date: Thu Jan 23 16:00:56 2020 +0100 Merge back new material related to system-wide PM for v5.6. commit 72780ce5f1a4189f3c8dcfb1c596c65146452668 Author: Linus Walleij Date: Mon Jan 13 23:08:00 2020 +0100 gpio: Drop the chained IRQ handler assign function gpiochip_set_chained_irqchip() would assign a chained handler to a GPIO chip. We now populate struct gpio_irq_chip for all chained GPIO irqchips so drop this function. Cc: Andy Shevchenko Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20200113220800.77817-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij commit d5331ec2cc6e8b79b8b0027091d1ebb395e833b5 Author: Maxim Kiselev Date: Wed Jan 15 10:38:11 2020 +0300 gpio: mvebu: clear irq in edge cause register before unmask edge irq When input GPIO set from 0 to 1, the interrupt bit asserted in the GPIO Interrupt Cause Register (ICR) even if the corresponding interrupt masked in the GPIO Interrupt Mask Register. Because interrupt mask register only affects assertion of the interrupt bits in Main Interrupt Cause Register and it does not affect the setting of bits in the GPIO ICR. So, there is problem, when we unmask interrupt with already asserted bit in the GPIO ICR, then false interrupt immediately occurs even if GPIO don't change their value since last unmask. Signed-off-by: Maxim Kiselev Link: https://lore.kernel.org/r/20200115073811.24438-1-bigunclemax@gmail.com Signed-off-by: Linus Walleij commit 1697d98124819aab09b86602978bd4f50e101e2d Author: Bingbu Cao Date: Sun Jan 19 05:26:55 2020 +0100 media: staging/intel-ipu3: remove TODO item about acronyms The Imgu acronyms are moved from header file into Document by previous commit b8726aea59de ("media: ipu3: update meta format documentation"), so the item can be removed from TODO list now. [Sakari Ailus: Use commit [0-9a-f]{12} plus subject] Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5adf3edde812e1eeef2492893b0e88224695ba03 Author: Sakari Ailus Date: Mon Oct 21 09:29:26 2019 +0200 media: v4l2-fwnode: Print the node name while parsing endpoints Print the node name during endpoint parsing for better debuggability. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit eec6d97d6da400226529f4748fb8998bb69a5bbf Author: Anson Huang Date: Wed Jan 15 09:39:07 2020 +0800 pinctrl: freescale: Add i.MX8MP pinctrl driver support Add the pinctrl driver support for i.MX8MP. Signed-off-by: Anson Huang Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/1579052348-32167-2-git-send-email-Anson.Huang@nxp.com Reviewed-by: Fabio Estevam Signed-off-by: Linus Walleij commit 0b09f98987568842422610f6622068c14e79b707 Author: Bingbu Cao Date: Fri Jan 17 09:18:30 2020 +0100 media: Revert "media: staging/intel-ipu3: make imgu use fixed running mode" This reverts commit e878742c83ec26ef256ebb6b36a4d44644548f25. Imgu should still keep the capability and flexibility to allow user to run 2 video pipes, as the user may use the video pipe to capture still frames with less system load and power than still pipe. Suggested-by: Tomasz Figa Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 364efd0db7c336c6defc885e077e73e83daca999 Author: Anson Huang Date: Wed Jan 15 09:39:06 2020 +0800 dt-bindings: imx: Add pinctrl binding doc for i.MX8MP Add binding doc for i.MX8MP pinctrl driver. Signed-off-by: Anson Huang Reviewed-by: Abel Vesa Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1579052348-32167-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Linus Walleij commit a03003c528e6996b90de5b60ee2864565a917186 Author: Julia Lawall Date: Wed Jan 1 08:43:24 2020 +0100 media: mt9v111: constify copied structure The mt9v111_def_fmt structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall Acked-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 366950eeb6ee7ba6693129899452e0ba890cbe4d Author: Kevin Hao Date: Mon Jan 20 17:56:25 2020 +0800 gpiolib: Lower verbosity when allocating hierarchy irq In the current codes, the following 3 lines would be output to the console for each irq line. gpio gpiochip0: (gpio_thunderx): allocate IRQ 10, hwirq 0 gpio gpiochip0: (gpio_thunderx): found parent hwirq 245784 gpio gpiochip0: (gpio_thunderx): alloc_irqs_parent for 10 parent hwirq 245784 In general, there are about tens of irq lines for each gpio chip, and then it would emit so many insignificant log in the boot process. These infos are more suitable for the dbg purpose. So change these to the dbg level. With this change, about 200 lines are suppressed on my Marvell cn96xx board. Signed-off-by: Kevin Hao Link: https://lore.kernel.org/r/20200120095625.25164-1-haokexin@gmail.com Signed-off-by: Linus Walleij commit a1dd4bfb145e88bdc8374a506409f95916bae368 Merge: 783e998653b4 cd0a32371db7 Author: Linus Walleij Date: Thu Jan 23 15:44:29 2020 +0100 Merge tag 'intel-pinctrl-v5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into devel intel-pinctrl for v5.6-1 * Tiger Lake appears to have _HID enumeration, thus driver has been updated * Coffee Lake-S has the same IP as Sunrisepoint, thus ID has been added * Baytrail has got more clean ups and bug fixes, such as direct IRQ handling * Lynxpoint GPIO has been converted to true pin control driver * The common driver now uses IRQ chip enumeration via GPIO chip The following is an automated git shortlog grouped by driver: baytrail: - Replace WARN with dev_info_once when setting direct-irq pin to output - Do not clear IRQ flags on direct-irq enabled pins - Reuse struct intel_pinctrl in the driver - Use local variable to keep device pointer - Keep pointer to struct device instead of its container - Use GPIO direction definitions - Move IRQ valid mask initialization to a dedicated callback - Group GPIO IRQ chip initialization - Allocate IRQ chip dynamic cherryview: - Use GPIO direction definitions intel: - Pass irqchip when adding gpiochip - Add GPIO <-> pin mapping ranges via callback - Share struct intel_pinctrl for wider use - Use GPIO direction definitions lynxpoint: - Update summary in the driver - Switch to pin control API - Add GPIO <-> pin mapping ranges via callback - Implement ->pin_dbg_show() - Add pin control operations - Reuse struct intel_pinctrl in the driver - Add pin control data structures - Implement intel_gpio_get_direction callback - Implement ->irq_ack() callback - Move ownership check to IRQ chip - Move lp_irq_type() closer to IRQ related routines - Move ->remove closer to ->probe() - Extract lp_gpio_acpi_use() for future use - Convert unsigned to unsigned int - Switch to memory mapped IO accessors - Keep pointer to struct device instead of its container - Relax GPIO request rules - Assume 2 bits for mode selector - Use standard pattern for memory allocation - Use %pR to print IO resource - Drop useless assignment - Correct amount of pins - Use raw_spinlock for locking - Move GPIO driver to pin controller folder sunrisepoint: - Add Coffee Lake-S ACPI ID - Add missing Interrupt Status register offset tigerlake: - Tiger Lake uses _HID enumeration commit 5b3014b95272a432b7705142f7081967fc1547f9 Author: Lakshmi Ramasubramanian Date: Wed Jan 22 17:32:06 2020 -0800 IMA: Defined delayed workqueue to free the queued keys Keys queued for measurement should be freed if a custom IMA policy was not loaded. Otherwise, the keys will remain queued forever consuming kernel memory. This patch defines a delayed workqueue to handle the above scenario. The workqueue handler is setup to execute 5 minutes after IMA initialization is completed. If a custom IMA policy is loaded before the workqueue handler is scheduled to execute, the workqueue task is cancelled and any queued keys are processed for measurement. But if a custom policy was not loaded then the queued keys are just freed when the delayed workqueue handler is run. Signed-off-by: Lakshmi Ramasubramanian Reported-by: kernel test robot # sleeping function called from invalid context Reported-by: kbuild test robot # redefinition of ima_init_key_queue() function. Signed-off-by: Mimi Zohar commit 754a36a58c29718bf5e28b8789b17bffbb60e8a6 Merge: 7265e8fc5108 a5362b84bdff Author: Mark Brown Date: Thu Jan 23 12:37:18 2020 +0000 Merge branch 'spi-5.6' into spi-next commit 7265e8fc51081f08728cc7528fd4640a81ec6768 Merge: def9d2780727 29d7e05c5f75 Author: Mark Brown Date: Thu Jan 23 12:37:15 2020 +0000 Merge branch 'spi-5.5' into spi-linus commit ebe0bdf9cfb97afc5ef4ef85e4f05d0585291ebf Merge: 9909f7986a81 0468e667a5be Author: Mark Brown Date: Thu Jan 23 12:37:08 2020 +0000 Merge remote-tracking branch 'regulator/topic/equal' into regulator-next commit 9909f7986a8159200eaa8320ea081f337ebdd940 Merge: f7abb7e33b29 53ba2f1aa386 Author: Mark Brown Date: Thu Jan 23 12:37:06 2020 +0000 Merge branch 'regulator-5.6' into regulator-next commit f7abb7e33b295a3556b7e86ba3dbb7390e7880af Merge: def9d2780727 3d7610e8da99 Author: Mark Brown Date: Thu Jan 23 12:37:04 2020 +0000 Merge branch 'regulator-5.5' into regulator-linus commit a7196caf83ea9e9b56c5c8c95fbfe0d45acec46b Merge: 20230620b445 d8e2e0d2491e Author: Mark Brown Date: Thu Jan 23 12:36:45 2020 +0000 Merge branch 'asoc-5.6' into asoc-next commit 20230620b44510ce968a719a1d6ee7483583178d Merge: def9d2780727 8ce1cbd6ce0b Author: Mark Brown Date: Thu Jan 23 12:36:42 2020 +0000 Merge branch 'asoc-5.5' into asoc-linus commit 450d0fd515648dcd90a9940b498f9913ed69566b Author: Lakshmi Ramasubramanian Date: Wed Jan 22 17:32:05 2020 -0800 IMA: Call workqueue functions to measure queued keys Measuring keys requires a custom IMA policy to be loaded. Keys should be queued for measurement if a custom IMA policy is not yet loaded. Keys queued for measurement, if any, should be processed when a custom policy is loaded. This patch updates the IMA hook function ima_post_key_create_or_update() to queue the key if a custom IMA policy has not yet been loaded. And, ima_update_policy() function, which is called when a custom IMA policy is loaded, is updated to process queued keys. Signed-off-by: Lakshmi Ramasubramanian Signed-off-by: Mimi Zohar commit 9f81a2eda488fef4c4e33a3965ae1759eb7db280 Author: Lakshmi Ramasubramanian Date: Wed Jan 22 17:32:04 2020 -0800 IMA: Define workqueue for early boot key measurements Measuring keys requires a custom IMA policy to be loaded. Keys created or updated before a custom IMA policy is loaded should be queued and will be processed after a custom policy is loaded. This patch defines a workqueue for queuing keys when a custom IMA policy has not yet been loaded. An intermediate Kconfig boolean option namely IMA_QUEUE_EARLY_BOOT_KEYS is used to declare the workqueue functions. A flag namely ima_process_keys is used to check if the key should be queued or should be processed immediately. Signed-off-by: Lakshmi Ramasubramanian Signed-off-by: Mimi Zohar commit d8e2e0d2491e78f3f7b451c3a93ba29950efe2cf Author: Kuninori Morimoto Date: Wed Jan 22 09:45:00 2020 +0900 ASoC: soc-core: remove null_snd_soc_ops All rtd->dai_link callback functions are controlled by soc_rtd_xxxx(), and checking rtd->dai_link->ops. We don't need to have null_snd_soc_ops anymore. This patch removes it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87zhegl3oz.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit ad2bf9f252d667b385df606b4b762c26151bee78 Author: Kuninori Morimoto Date: Wed Jan 22 09:44:56 2020 +0900 ASoC: soc-pcm: add soc_rtd_trigger() Add soc_rtd_trigger() to make the code easier to read Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/871rrsmi9j.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 49f020e5714d2c48c8ed9a89169ef6a058e54c2f Author: Kuninori Morimoto Date: Wed Jan 22 09:44:52 2020 +0900 ASoC: soc-pcm: add soc_rtd_hw_free() Add soc_rtd_hw_free() to make the code easier to read Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/8736c8mi9n.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit de9ad990284f16a435675e4e73c7ffaaea9ee4b2 Author: Kuninori Morimoto Date: Wed Jan 22 09:44:48 2020 +0900 ASoC: soc-pcm: add soc_rtd_hw_params() Add soc_rtd_hw_params() to make the code easier to read Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/874kwomi9r.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 44c1a75b0d889b3a5faff9edc837d972806bb46a Author: Kuninori Morimoto Date: Wed Jan 22 09:44:44 2020 +0900 ASoC: soc-pcm: add soc_rtd_prepare() Add soc_rtd_prepare() to make the code easier to read Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/875zh4mi9v.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 0be429f9fcfccfbbbcdb40e154a5c2328da17ca9 Author: Kuninori Morimoto Date: Wed Jan 22 09:44:40 2020 +0900 ASoC: soc-pcm: add soc_rtd_shutdown() Add soc_rtd_shutdown() to make the code easier to read Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/877e1kmi9z.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit f183f9277a0f16e340bbcb28bf30834652ef10e1 Author: Kuninori Morimoto Date: Wed Jan 22 09:44:35 2020 +0900 ASoC: soc-pcm: add soc_rtd_startup() Add soc_rtd_startup() to make the code easier to read Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/878sm0mia4.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 29951078bb5be1f2105c2841a4ac119f1b81531b Author: Maoguang Meng Date: Mon Jan 13 04:52:02 2020 +0100 media: platform: VIDEO_MEDIATEK_JPEG can also depend on MTK_IOMMU mediatek jpeg codec driver can depend on MTK_IOMMU or MTK_IOMMU_V1 Signed-off-by: Maoguang Meng Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1dd2e8f942574e2be18374ebb81751082d8d467c Author: Sergey Zakharchenko Date: Thu Oct 3 11:31:23 2019 +0200 media: uvcvideo: Add a quirk to force GEO GC6500 Camera bits-per-pixel value This device does not function correctly in raw mode in kernel versions validating buffer sizes in bulk mode. It erroneously announces 16 bits per pixel instead of 12 for NV12 format, so it needs this quirk to fix computed frame size and avoid legitimate frames getting discarded. [Move info and div variables to local scope] Signed-off-by: Sergey Zakharchenko Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 68035c80e129c4cfec659aac4180354530b26527 Author: Will Deacon Date: Fri Nov 8 16:48:38 2019 +0100 media: uvcvideo: Avoid cyclic entity chains due to malformed USB descriptors Way back in 2017, fuzzing the 4.14-rc2 USB stack with syzkaller kicked up the following WARNING from the UVC chain scanning code: | list_add double add: new=ffff880069084010, prev=ffff880069084010, | next=ffff880067d22298. | ------------[ cut here ]------------ | WARNING: CPU: 1 PID: 1846 at lib/list_debug.c:31 __list_add_valid+0xbd/0xf0 | Modules linked in: | CPU: 1 PID: 1846 Comm: kworker/1:2 Not tainted | 4.14.0-rc2-42613-g1488251d1a98 #238 | Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 | Workqueue: usb_hub_wq hub_event | task: ffff88006b01ca40 task.stack: ffff880064358000 | RIP: 0010:__list_add_valid+0xbd/0xf0 lib/list_debug.c:29 | RSP: 0018:ffff88006435ddd0 EFLAGS: 00010286 | RAX: 0000000000000058 RBX: ffff880067d22298 RCX: 0000000000000000 | RDX: 0000000000000058 RSI: ffffffff85a58800 RDI: ffffed000c86bbac | RBP: ffff88006435dde8 R08: 1ffff1000c86ba52 R09: 0000000000000000 | R10: 0000000000000002 R11: 0000000000000000 R12: ffff880069084010 | R13: ffff880067d22298 R14: ffff880069084010 R15: ffff880067d222a0 | FS: 0000000000000000(0000) GS:ffff88006c900000(0000) knlGS:0000000000000000 | CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 | CR2: 0000000020004ff2 CR3: 000000006b447000 CR4: 00000000000006e0 | Call Trace: | __list_add ./include/linux/list.h:59 | list_add_tail+0x8c/0x1b0 ./include/linux/list.h:92 | uvc_scan_chain_forward.isra.8+0x373/0x416 | drivers/media/usb/uvc/uvc_driver.c:1471 | uvc_scan_chain drivers/media/usb/uvc/uvc_driver.c:1585 | uvc_scan_device drivers/media/usb/uvc/uvc_driver.c:1769 | uvc_probe+0x77f2/0x8f00 drivers/media/usb/uvc/uvc_driver.c:2104 Looking into the output from usbmon, the interesting part is the following data packet: ffff880069c63e00 30710169 C Ci:1:002:0 0 143 = 09028f00 01030080 00090403 00000e01 00000924 03000103 7c003328 010204db If we drop the lead configuration and interface descriptors, we're left with an output terminal descriptor describing a generic display: /* Output terminal descriptor */ buf[0] 09 buf[1] 24 buf[2] 03 /* UVC_VC_OUTPUT_TERMINAL */ buf[3] 00 /* ID */ buf[4] 01 /* type == 0x0301 (UVC_OTT_DISPLAY) */ buf[5] 03 buf[6] 7c buf[7] 00 /* source ID refers to self! */ buf[8] 33 The problem with this descriptor is that it is self-referential: the source ID of 0 matches itself! This causes the 'struct uvc_entity' representing the display to be added to its chain list twice during 'uvc_scan_chain()': once via 'uvc_scan_chain_entity()' when it is processed directly from the 'dev->entities' list and then again immediately afterwards when trying to follow the source ID in 'uvc_scan_chain_forward()' Add a check before adding an entity to a chain list to ensure that the entity is not already part of a chain. Link: https://lore.kernel.org/linux-media/CAAeHK+z+Si69jUR+N-SjN9q4O+o5KFiNManqEa-PjUta7EOb7A@mail.gmail.com/ Cc: Fixes: c0efd232929c ("V4L/DVB (8145a): USB Video Class driver") Reported-by: Andrey Konovalov Signed-off-by: Will Deacon Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit a5362b84bdff1def10c136e36ef2126f7f545b2c Author: Tomer Maimon Date: Wed Jan 15 18:23:00 2020 +0200 dt-binding: spi: add NPCM PSPI reset binding Add NPCM Peripheral SPI reset binding documentation, Removing unnecessary aliases use. Signed-off-by: Tomer Maimon Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200115162301.235926-4-tmaimon77@gmail.com Signed-off-by: Mark Brown commit df31007400c3905ec15b1065241baf3864decbfa Author: Jack Yu Date: Wed Jan 15 19:25:19 2020 +0800 ASoC: rt1015: add rt1015 amplifier driver This is initial amplifier driver for rt1015. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/20200115112519.22050-1-jack.yu@realtek.com Signed-off-by: Mark Brown commit b2333f7fcd950854afe9c428377e105425d5083a Author: Charles Keepax Date: Wed Jan 22 10:45:59 2020 +0000 ASoC: madera: Correct some kernel doc Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200122104559.17043-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 8ce1cbd6ce0b1bda0c980c64fee4c1e1378355f1 Author: Jaroslav Kysela Date: Wed Jan 22 20:07:52 2020 +0100 ASoC: topology: fix soc_tplg_fe_link_create() - link->dobj initialization order The code which checks the return value for snd_soc_add_dai_link() call in soc_tplg_fe_link_create() moved the snd_soc_add_dai_link() call before link->dobj members initialization. While it does not affect the latest kernels, the old soc-core.c code in the stable kernels is affected. The snd_soc_add_dai_link() function uses the link->dobj.type member to check, if the link structure is valid. Reorder the link->dobj initialization to make things work again. It's harmless for the recent code (and the structure should be properly initialized before other calls anyway). The problem is in stable linux-5.4.y since version 5.4.11 when the upstream commit 76d270364932 was applied. Fixes: 76d270364932 ("ASoC: topology: Check return value for snd_soc_add_dai_link()") Cc: Dragos Tarcatu Cc: Pierre-Louis Bossart Cc: Ranjani Sridharan Cc: Mark Brown Cc: Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20200122190752.3081016-1-perex@perex.cz Signed-off-by: Mark Brown commit 15adb20f64c302b31e10ad50f22bb224052ce1df Author: Cezary Rojewski Date: Wed Jan 22 19:12:54 2020 +0100 ASoC: Intel: skl_hda_dsp_common: Fix global-out-of-bounds bug Definitions for idisp snd_soc_dai_links within skl_hda_dsp_common are missing platform component. Add it to address following bug reported by KASAN: [ 10.538502] BUG: KASAN: global-out-of-bounds in skl_hda_audio_probe+0x13a/0x2b0 [snd_soc_skl_hda_dsp] [ 10.538509] Write of size 8 at addr ffffffffc0606840 by task systemd-udevd/299 (...) [ 10.538519] Call Trace: [ 10.538524] dump_stack+0x62/0x95 [ 10.538528] print_address_description+0x2f5/0x3b0 [ 10.538532] ? skl_hda_audio_probe+0x13a/0x2b0 [snd_soc_skl_hda_dsp] [ 10.538535] __kasan_report+0x134/0x191 [ 10.538538] ? skl_hda_audio_probe+0x13a/0x2b0 [snd_soc_skl_hda_dsp] [ 10.538542] ? skl_hda_audio_probe+0x13a/0x2b0 [snd_soc_skl_hda_dsp] [ 10.538544] kasan_report+0x12/0x20 [ 10.538546] __asan_store8+0x57/0x90 [ 10.538550] skl_hda_audio_probe+0x13a/0x2b0 [snd_soc_skl_hda_dsp] [ 10.538553] platform_drv_probe+0x51/0xb0 [ 10.538556] really_probe+0x311/0x600 [ 10.538559] driver_probe_device+0x87/0x1b0 [ 10.538562] device_driver_attach+0x8f/0xa0 [ 10.538565] ? device_driver_attach+0xa0/0xa0 [ 10.538567] __driver_attach+0x102/0x1a0 [ 10.538569] ? device_driver_attach+0xa0/0xa0 [ 10.538572] bus_for_each_dev+0xe8/0x160 [ 10.538574] ? subsys_dev_iter_exit+0x10/0x10 [ 10.538577] ? preempt_count_sub+0x18/0xc0 [ 10.538580] ? _raw_write_unlock+0x1f/0x40 [ 10.538582] driver_attach+0x2b/0x30 [ 10.538585] bus_add_driver+0x251/0x340 [ 10.538588] driver_register+0xd3/0x1c0 [ 10.538590] __platform_driver_register+0x6c/0x80 [ 10.538592] ? 0xffffffffc03e8000 [ 10.538595] skl_hda_audio_init+0x1c/0x1000 [snd_soc_skl_hda_dsp] [ 10.538598] do_one_initcall+0xd0/0x36a [ 10.538600] ? trace_event_raw_event_initcall_finish+0x160/0x160 [ 10.538602] ? kasan_unpoison_shadow+0x36/0x50 [ 10.538605] ? __kasan_kmalloc+0xcc/0xe0 [ 10.538607] ? kasan_unpoison_shadow+0x36/0x50 [ 10.538609] ? kasan_poison_shadow+0x2f/0x40 [ 10.538612] ? __asan_register_globals+0x65/0x80 [ 10.538615] do_init_module+0xf9/0x36f [ 10.538619] load_module+0x398e/0x4590 [ 10.538625] ? module_frob_arch_sections+0x20/0x20 [ 10.538628] ? __kasan_check_write+0x14/0x20 [ 10.538630] ? kernel_read+0x9a/0xc0 [ 10.538632] ? __kasan_check_write+0x14/0x20 [ 10.538634] ? kernel_read_file+0x1d3/0x3c0 [ 10.538638] ? cap_capable+0xca/0x110 [ 10.538642] __do_sys_finit_module+0x190/0x1d0 [ 10.538644] ? __do_sys_finit_module+0x190/0x1d0 [ 10.538646] ? __x64_sys_init_module+0x50/0x50 [ 10.538649] ? expand_files+0x380/0x380 [ 10.538652] ? __kasan_check_write+0x14/0x20 [ 10.538654] ? fput_many+0x20/0xc0 [ 10.538658] __x64_sys_finit_module+0x43/0x50 [ 10.538660] do_syscall_64+0xce/0x700 [ 10.538662] ? syscall_return_slowpath+0x230/0x230 [ 10.538665] ? __do_page_fault+0x51e/0x640 [ 10.538668] ? __kasan_check_read+0x11/0x20 [ 10.538670] ? prepare_exit_to_usermode+0xc7/0x200 [ 10.538673] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: a78959f407e6 ("ASoC: Intel: skl_hda_dsp_common: use modern dai_link style") Signed-off-by: Cezary Rojewski Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200122181254.22801-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit ca34fa860fd34b0b22ff829aeb51884429a3a753 Author: Charles Keepax Date: Wed Jan 22 10:41:43 2020 +0000 ASoC: madera: Correct DMIC only input hook ups Both the data and clock should be connected to both the left and right inputs for DMIC only inputs, add the missing routes. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200122104143.16725-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit d239aa00fe7bb40175822da4b4300c140877fe06 Author: Jonas Karlman Date: Sun Jan 12 14:34:24 2020 +0100 media: hantro: fix post-processing NULL pointer dereference The RK3399 variant does not have postproc_regs declared, this can cause a NULL pointer dereference trying to decode: [ 89.331359] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 [ 89.352804] Call trace: [ 89.353191] hantro_postproc_disable+0x20/0xe8 [hantro_vpu] [ 89.354056] hantro_start_prepare_run+0x58/0x68 [hantro_vpu] [ 89.354923] hantro_h264_dec_prepare_run+0x30/0x6f0 [hantro_vpu] [ 89.355846] rk3399_vpu_h264_dec_run+0x1c/0x14a8 [hantro_vpu] [ 89.356748] device_run+0xa4/0xb8 [hantro_vpu] Fix this by adding a NULL check in hantro_postproc_enable/disable. Fixes: 8c2d66b036c7 ("media: hantro: Support color conversion via post-processing") Signed-off-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1fd4d9cb739bd47b74840f8933616cc75341db05 Author: Niklas Söderlund Date: Wed Dec 4 18:57:59 2019 +0100 media: rcar-vin: Use correct pixel format when aligning format When aligning the format the pixel format that is being processed shall be used to figure out alignment constraints, not the currently active pixel format. The alignment might be part of a try operation and shall not be effected by the active format. Fix this by looking at the correct pixel format. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cd5676db0574cc1c0b234bc3b17565b07290aa72 Author: Bibby Hsieh Date: Thu Jan 23 12:52:57 2020 +0100 misc: eeprom: at24: support pm_runtime control Although in the most platforms, the power of eeprom are alway on, some platforms disable the eeprom power in order to meet low power request. This patch add the pm_runtime ops to control power to support all platforms. Signed-off-by: Bibby Hsieh [Bartosz: rebased on top of current at24/for-next] Signed-off-by: Bartosz Golaszewski commit c6cadc7538bb6df746f1613ee317b646230b2f5e Author: Bibby Hsieh Date: Thu Jan 16 10:56:34 2020 +0800 dt-binding: eeprom: at24: add vcc-supply property In some platforms, they disable the power-supply of eeprom due to power consumption reduction. This patch add vcc-supply property. Signed-off-by: Bibby Hsieh Reviewed-by: Rob Herring Signed-off-by: Bartosz Golaszewski commit 6c0157be02f02c490dbe74af0d469ed1ddc30b1e Author: Colin Ian King Date: Wed Jan 22 09:38:18 2020 +0000 dmaengine: ti: k3-udma: fix spelling mistake "limted" -> "limited" There are spelling mistakes in dev_err messages. Fix them. Signed-off-by: Colin Ian King Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200122093818.2800743-1-colin.king@canonical.com Signed-off-by: Vinod Koul commit e606c8b9d751e593b71bdcb636ac3392c62c1c50 Author: Colin Ian King Date: Wed Jan 22 23:52:37 2020 +0000 dmaengine: s3c24xx-dma: fix spelling mistake "to" -> "too" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200122235237.2830344-1-colin.king@canonical.com Signed-off-by: Vinod Koul commit a009310fade9165483483b235360458f1286f32a Author: Krzysztof Kozlowski Date: Tue Jan 7 09:12:59 2020 +0100 i2c: exynos: Update Kconfig documentation Update the help text to reflect current support devices: 1. The Exynos high speed I2C driver supports Exynos5 (ARMv7), Exynos5433 and Exynos7 (both ARMv8) SoCs, 2. The S3C I2C driver supports S3C, S5Pv210 and Exynos{3,4,5} SoCs. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit 4a2d5f663dab6614772d8e28ca190b127ba46d9d Author: Krzysztof Kozlowski Date: Tue Jan 7 09:12:58 2020 +0100 i2c: Enable compile testing for more drivers Some of the I2C bus drivers can be compile tested to increase build coverage. This requires also: 1. Adding dependencies on COMMON_CLK for BCM2835 and Meson I2C controllers, 2. Adding 'if' conditional to 'default y' so they will not get enabled by default on all other architectures, 3. Limiting few compile test options to supported architectures (which provide the readsX()/writesX() primitives). Signed-off-by: Krzysztof Kozlowski [wsa: revert chunk for ZX2967. it needs more preparation] Signed-off-by: Wolfram Sang commit 183ef7adf4ed638ac0fb0c3c9a71fc00e8512b61 Author: Arvind Sankar Date: Tue Jan 7 14:44:34 2020 -0500 x86/boot: Simplify calculation of output address Condense the calculation of decompressed kernel start a little. Committer notes: before: ebp = ebx - (init_size - _end) after: eax = (ebx + _end) - init_size where in both ebx contains the temporary address the kernel is moved to for in-place decompression. The before and after difference in register state is %eax and %ebp but that is immaterial because the compressed image is not built with -mregparm, i.e., all arguments of the following extract_kernel() call are passed on the stack. Signed-off-by: Arvind Sankar Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200107194436.2166846-1-nivedita@alum.mit.edu commit 6d9f6e6790e794461ff3a16e4f3778f01ff6cca2 Merge: fd786fb1d2ca ec97ecf1ebe4 Author: David S. Miller Date: Thu Jan 23 11:38:31 2020 +0100 Merge branch 'net-sched-add-Flow-Queue-PIE-packet-scheduler' Gautam Ramakrishnan says: ==================== net: sched: add Flow Queue PIE packet scheduler Flow Queue PIE packet scheduler This patch series implements the Flow Queue Proportional Integral controller Enhanced (FQ-PIE) active queue Management algorithm. It is an enhancement over the PIE algorithm. It integrates the PIE aqm with a deficit round robin scheme. FQ-PIE is implemented over the latest version of PIE which uses timestamps to calculate queue delay with an additional option of using average dequeue rate to calculate the queue delay. This patch also adds a memory limit of all the packets across all queues to a default value of 32Mb. - Patch #1 - Creates pie.h and moves all small functions and structures common to PIE and FQ-PIE here. The functions are all made inline. - Patch #2 - #8 - Addresses code formatting, indentation, comment changes and rearrangement of structure members. - Patch #9 - Refactors sch_pie.c by changing arguments to calculate_probability(), [pie_]drop_early() and pie_process_dequeue() to make it generic enough to be used by sch_fq_pie.c. These functions are exported to be used by sch_fq_pie.c. - Patch #10 - Adds the FQ-PIE Qdisc. For more information: https://tools.ietf.org/html/rfc8033 Changes from v6 to v7 - Call tcf_block_put() when destroying the Qdisc as suggested by Jakub Kicinski. Changes from v5 to v6 - Rearranged struct members according to their access pattern and to remove holes. Changes from v4 to v5 - This patch series breaks down patch 1 of v4 into separate logical commits as suggested by David Miller. Changes from v3 to v4 - Used non deprecated version of nla_parse_nested - Used SZ_32M macro - Removed an unused variable - Code cleanup All suggested by Jakub and Toke. Changes from v2 to v3 - Exported drop_early, pie_process_dequeue and calculate_probability functions from sch_pie as suggested by Stephen Hemminger. Changes from v1 ( and RFC patch) to v2 - Added timestamp to calculate queue delay as recommended by Dave Taht - Packet memory limit implemented as recommended by Toke. - Added external classifier as recommended by Toke. - Used NET_XMIT_CN instead of NET_XMIT_DROP as the return value in the fq_pie_qdisc_enqueue function. ==================== Signed-off-by: David S. Miller commit ec97ecf1ebe485a17cd8395a5f35e6b80b57665a Author: Mohit P. Tahiliani Date: Wed Jan 22 23:52:33 2020 +0530 net: sched: add Flow Queue PIE packet scheduler Principles: - Packets are classified on flows. - This is a Stochastic model (as we use a hash, several flows might be hashed to the same slot) - Each flow has a PIE managed queue. - Flows are linked onto two (Round Robin) lists, so that new flows have priority on old ones. - For a given flow, packets are not reordered. - Drops during enqueue only. - ECN capability is off by default. - ECN threshold (if ECN is enabled) is at 10% by default. - Uses timestamps to calculate queue delay by default. Usage: tc qdisc ... fq_pie [ limit PACKETS ] [ flows NUMBER ] [ target TIME ] [ tupdate TIME ] [ alpha NUMBER ] [ beta NUMBER ] [ quantum BYTES ] [ memory_limit BYTES ] [ ecnprob PERCENTAGE ] [ [no]ecn ] [ [no]bytemode ] [ [no_]dq_rate_estimator ] defaults: limit: 10240 packets, flows: 1024 target: 15 ms, tupdate: 15 ms (in jiffies) alpha: 1/8, beta : 5/4 quantum: device MTU, memory_limit: 32 Mb ecnprob: 10%, ecn: off bytemode: off, dq_rate_estimator: off Signed-off-by: Mohit P. Tahiliani Signed-off-by: Sachin D. Patil Signed-off-by: V. Saicharan Signed-off-by: Mohit Bhasi Signed-off-by: Leslie Monis Signed-off-by: Gautam Ramakrishnan Signed-off-by: David S. Miller commit 5205ea00cda1ac23cebfb97dfccca84722d58dfe Author: Mohit P. Tahiliani Date: Wed Jan 22 23:52:32 2020 +0530 net: sched: pie: export symbols to be reused by FQ-PIE This patch makes the drop_early(), calculate_probability() and pie_process_dequeue() functions generic enough to be used by both PIE and FQ-PIE (to be added in a future commit). The major change here is in the way the functions take in arguments. This patch exports these functions and makes FQ-PIE dependent on sch_pie. Signed-off-by: Mohit P. Tahiliani Signed-off-by: Leslie Monis Signed-off-by: Gautam Ramakrishnan Signed-off-by: David S. Miller commit 00ea2fb7274f568cd982a5958c66cab578aada25 Author: Mohit P. Tahiliani Date: Wed Jan 22 23:52:31 2020 +0530 net: sched: pie: fix alignment in struct instances Make the alignment in the initialization of the struct instances consistent in the file. Signed-off-by: Mohit P. Tahiliani Signed-off-by: Leslie Monis Signed-off-by: Gautam Ramakrishnan Signed-off-by: David S. Miller commit 55f780c4a6c3046461352f4081427b077f8d06ed Author: Mohit P. Tahiliani Date: Wed Jan 22 23:52:30 2020 +0530 net: sched: pie: fix commenting Fix punctuation and logical mistakes in the comments. The logical mistake was that "dequeue_rate" is no longer the default way to calculate queuing delay and is not needed. The default way to calculate queue delay was changed in commit cec2975f2b70 ("net: sched: pie: enable timestamp based delay calculation"). Signed-off-by: Mohit P. Tahiliani Signed-off-by: Leslie Monis Signed-off-by: Gautam Ramakrishnan Signed-off-by: David S. Miller commit b42a3d7c7cfff3555d7057c20dbbe57fe75d77c0 Author: Mohit P. Tahiliani Date: Wed Jan 22 23:52:29 2020 +0530 pie: improve comments and commenting style Improve the comments along with the commenting style used to describe the members of the structures and their initial values in the init functions. Signed-off-by: Mohit P. Tahiliani Signed-off-by: Leslie Monis Signed-off-by: Gautam Ramakrishnan Signed-off-by: David S. Miller commit 2dfb1952a9a1fde0b515f58605c11902e69415bf Author: Mohit P. Tahiliani Date: Wed Jan 22 23:52:28 2020 +0530 pie: rearrange structure members and their initializations Rearrange the members of the structure such that closely referenced members appear together and/or fit in the same cacheline. Also, change the order of their initializations to match the order in which they appear in the structure. Signed-off-by: Mohit P. Tahiliani Signed-off-by: Leslie Monis Signed-off-by: Gautam Ramakrishnan Signed-off-by: David S. Miller commit 1dbfc5e071db3f5acc3c7c87a564bf57b838cf49 Author: Mohit P. Tahiliani Date: Wed Jan 22 23:52:27 2020 +0530 pie: use u8 instead of bool in pie_vars Linux best practice recommends using u8 for true/false values in structures. Signed-off-by: Mohit P. Tahiliani Signed-off-by: Leslie Monis Signed-off-by: Gautam Ramakrishnan Signed-off-by: David S. Miller commit cf4eeee5ff56180b525bfb6a204071216ca4000a Author: Mohit P. Tahiliani Date: Wed Jan 22 23:52:26 2020 +0530 pie: rearrange macros in order of length Rearrange macros in order of length and align the values to improve readability. Signed-off-by: Mohit P. Tahiliani Signed-off-by: Leslie Monis Signed-off-by: Gautam Ramakrishnan Signed-off-by: David S. Miller commit 805a5a23a4c4ee126e781bd14a1deb242395e817 Author: Mohit P. Tahiliani Date: Wed Jan 22 23:52:25 2020 +0530 pie: use U64_MAX to denote (2^64 - 1) Use the U64_MAX macro to denote the constant (2^64 - 1). Signed-off-by: Mohit P. Tahiliani Signed-off-by: Leslie Monis Signed-off-by: Gautam Ramakrishnan Signed-off-by: David S. Miller commit 84bf557fb02f5924c109a21a160ffc353d878487 Author: Mohit P. Tahiliani Date: Wed Jan 22 23:52:24 2020 +0530 net: sched: pie: move common code to pie.h This patch moves macros, structures and small functions common to PIE and FQ-PIE (to be added in a future commit) from the file net/sched/sch_pie.c to the header file include/net/pie.h. All the moved functions are made inline. Signed-off-by: Mohit P. Tahiliani Signed-off-by: Leslie Monis Signed-off-by: Gautam Ramakrishnan Signed-off-by: David S. Miller commit 21aecdbd7f3ab02c9b82597dc733ee759fb8b274 Author: James Morse Date: Tue Jan 21 12:33:56 2020 +0000 KVM: arm: Make inject_abt32() inject an external abort instead KVM's inject_abt64() injects an external-abort into an aarch64 guest. The KVM_CAP_ARM_INJECT_EXT_DABT is intended to do exactly this, but for an aarch32 guest inject_abt32() injects an implementation-defined exception, 'Lockdown fault'. Change this to external abort. For non-LPAE we now get the documented: | Unhandled fault: external abort on non-linefetch (0x008) at 0x9c800f00 and for LPAE: | Unhandled fault: synchronous external abort (0x210) at 0x9c800f00 Fixes: 74a64a981662a ("KVM: arm/arm64: Unify 32bit fault injection") Reported-by: Beata Michalska Signed-off-by: James Morse Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200121123356.203000-3-james.morse@arm.com commit 018f22f95e8a6c3e27188b7317ef2c70a34cb2cd Author: James Morse Date: Tue Jan 21 12:33:55 2020 +0000 KVM: arm: Fix DFSR setting for non-LPAE aarch32 guests Beata reports that KVM_SET_VCPU_EVENTS doesn't inject the expected exception to a non-LPAE aarch32 guest. The host intends to inject DFSR.FS=0x14 "IMPLEMENTATION DEFINED fault (Lockdown fault)", but the guest receives DFSR.FS=0x04 "Fault on instruction cache maintenance". This fault is hooked by do_translation_fault() since ARMv6, which goes on to silently 'handle' the exception, and restart the faulting instruction. It turns out, when TTBCR.EAE is clear DFSR is split, and FS[4] has to shuffle up to DFSR[10]. As KVM only does this in one place, fix up the static values. We now get the expected: | Unhandled fault: lock abort (0x404) at 0x9c800f00 Fixes: 74a64a981662a ("KVM: arm/arm64: Unify 32bit fault injection") Reported-by: Beata Michalska Signed-off-by: James Morse Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200121123356.203000-2-james.morse@arm.com commit cf2d23e0bac9f6b5cd1cba8898f5f05ead40e530 Author: Gavin Shan Date: Tue Jan 21 16:56:59 2020 +1100 KVM: arm/arm64: Fix young bit from mmu notifier kvm_test_age_hva() is called upon mmu_notifier_test_young(), but wrong address range has been passed to handle_hva_to_gpa(). With the wrong address range, no young bits will be checked in handle_hva_to_gpa(). It means zero is always returned from mmu_notifier_test_young(). This fixes the issue by passing correct address range to the underly function handle_hva_to_gpa(), so that the hardware young (access) bit will be visited. Fixes: 35307b9a5f7e ("arm/arm64: KVM: Implement Stage-2 page aging") Signed-off-by: Gavin Shan Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200121055659.19560-1-gshan@redhat.com commit 6645d8542ef922486b733d415d2bec3b0622c27e Author: Mark Brown Date: Mon Jan 20 12:47:06 2020 +0000 arm64: KVM: Annotate guest entry/exit as a single function In an effort to clarify and simplify the annotations of assembly functions in the kernel new macros have been introduced replacing ENTRY and ENDPROC. There are separate annotations SYM_FUNC_ for normal C functions and SYM_CODE_ for other code. Currently __guest_enter and __guest_exit are annotated as standard functions but this is not entirely correct as the former doesn't do a normal return and the latter is not entered in a normal fashion. From the point of view of the hypervisor the guest entry/exit may be viewed as a single function which happens to have an eret in the middle of it so let's annotate it as such. Suggested-by: Mark Rutland Signed-off-by: Mark Brown Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200120124706.8681-1-broonie@kernel.org commit 290a6bb06de9ec24cecbb11bf4be35411d0b2625 Author: Andrew Jones Date: Mon Jan 20 14:08:25 2020 +0100 arm64: KVM: Add UAPI notes for swapped registers Two UAPI system register IDs do not derive their values from the ARM system register encodings. This is because their values were accidentally swapped. As the IDs are API, they cannot be changed. Add WARNING notes to point them out. Suggested-by: Marc Zyngier Signed-off-by: Andrew Jones [maz: turned XXX into WARNING] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200120130825.28838-1-drjones@redhat.com commit 0e20f5e25556c00ee813469d373b00abcf298708 Author: Marc Zyngier Date: Fri Dec 13 13:25:25 2019 +0000 KVM: arm/arm64: Cleanup MMIO handling Our MMIO handling is a bit odd, in the sense that it uses an intermediate per-vcpu structure to store the various decoded information that describe the access. But the same information is readily available in the HSR/ESR_EL2 field, and we actually use this field to populate the structure. Let's simplify the whole thing by getting rid of the superfluous structure and save a (tiny) bit of space in the vcpu structure. [32bit fix courtesy of Olof Johansson ] Signed-off-by: Marc Zyngier commit b059c63620fbba8a5da60f01d99d003681447e3c Author: Greg Kurz Date: Fri Nov 15 19:10:58 2019 +0100 powerpc/xive: Drop extern qualifiers from header function prototypes As reported by ./scripts/checkpatch.pl --strict: CHECK: extern prototypes should be avoided in .h files Signed-off-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/157384145834.181768.944827793193636924.stgit@bahia.lan commit 6a3163212f311daaf2ca3b676db2e11cfd81c6b3 Author: Greg Kurz Date: Thu Jul 4 00:03:19 2019 +0200 KVM: PPC: Book3S HV: XIVE: Fix typo in comment Signed-off-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/156219139988.578018.1046848908285019838.stgit@bahia.lan commit 25dd118f4b2773490df12b9d190c1956cf3250c3 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:41:15 2019 +0800 macintosh: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191120134115.14918-1-krzk@kernel.org commit 173bf44bdfc768af3c07cd0aeeb6ad8d1331b77d Author: Laurentiu Tudor Date: Tue Jan 14 11:00:25 2020 +0000 MAINTAINERS: Add myself as maintainer of ehv_bytechan tty driver Michael Ellerman made a call for volunteers from NXP to maintain this driver and I offered myself. Signed-off-by: Laurentiu Tudor Acked-by: Timur Tabi Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200114110012.17351-1-laurentiu.tudor@nxp.com commit 946743d035bd2cfff059ae79012ab22148caeac2 Author: Oliver O'Halloran Date: Fri Jan 10 18:02:07 2020 +1100 powernv/pci: Move pnv_pci_dma_bus_setup() to pci-ioda.c This is only used in pci-ioda.c so move it there and rename it to match. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200110070207.439-6-oohall@gmail.com commit 0a25d9c40161269067c47f6c09a12d76cfe72581 Author: Oliver O'Halloran Date: Fri Jan 10 18:02:06 2020 +1100 powernv/pci: Fold pnv_pci_dma_dev_setup() into the pci-ioda.c version pnv_pci_dma_dev_setup() does nothing but call the phb->dma_dev_setup() callback, if one exists. That callback is only set for normal PCIe PHBs so we can remove the layer of indirection and use the ioda version in the pci_controller_ops. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200110070207.439-5-oohall@gmail.com commit 965c94f309be58fbcc6c8d3e4f123376c5970d79 Author: Oliver O'Halloran Date: Fri Jan 10 18:02:05 2020 +1100 powerpc/iov: Move VF pdev fixup into pcibios_fixup_iov() An ioda_pe for each VF is allocated in pnv_pci_sriov_enable() before the pci_dev for the VF is created. We need to set the pe->pdev pointer at some point after the pci_dev is created. Currently we do that in: pcibios_bus_add_device() pnv_pci_dma_dev_setup() (via phb->ops.dma_dev_setup) /* fixup is done here */ pnv_pci_ioda_dma_dev_setup() (via pnv_phb->dma_dev_setup) The fixup needs to be done before setting up DMA for for the VF's PE, but there's no real reason to delay it until this point. Move the fixup into pnv_pci_ioda_fixup_iov() so the ordering is: pcibios_add_device() pnv_pci_ioda_fixup_iov() (via ppc_md.pcibios_fixup_sriov) pcibios_bus_add_device() ... This isn't strictly required, but it's a slightly more logical place to do the fixup and it simplifies pnv_pci_dma_dev_setup(). Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200110070207.439-4-oohall@gmail.com commit ac1172019593f80818a2fdc406d3d30d8bbb05f2 Author: Oliver O'Halloran Date: Fri Jan 10 18:02:04 2020 +1100 powernv/pci: Remove dma_dev_setup() for NPU PHBs The pnv_pci_dma_dev_setup() only does something when: 1) There PHB contains VFs, or 2) The PHB defines a dma_dev_setup() callback in the pnv_phb structure. Neither is true for NPU PHBs so there's no reason to set the callback. Reviewed-by: Alexey Kardashevskiy Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200110070207.439-3-oohall@gmail.com commit 3ab3f3c9df348324029e3fbdf381f551b1df8f1e Author: Oliver O'Halloran Date: Fri Jan 10 18:02:03 2020 +1100 powerpc/pci: Fold pcibios_setup_device() into pcibios_bus_add_device() pcibios_bus_add_device() is the only caller of pcibios_setup_device(). Fold them together since there's no real reason to keep them separate. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200110070207.439-2-oohall@gmail.com commit 37f6f8e88caef5f69774b82117ca35bdc4a985d8 Author: Oliver O'Halloran Date: Fri Nov 1 19:55:22 2019 +1100 powerpc/powernv: Allow manually invoking special reboots OPAL provides several different kinds of reboot for the kernel to use, namely forcing a full reboot, platform error reboot and MPIPL. Right now triggering the alternative resets requires some ad-hoc method such as triggering a kernel crash and hoping the stars align. It's sometimes handy to be able to trigger one of these resets directly, so add a way to do that. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191101085522.3055-2-oohall@gmail.com commit 2d9b332d99b24f27f77e9ba38ce3c8beb11a81c0 Author: Oliver O'Halloran Date: Fri Nov 1 19:55:21 2019 +1100 powerpc/xmon: Allow passing an argument to ppc_md.restart() On PowerNV a few different kinds of reboot are supported. We'd like to be able to exercise these from xmon so allow 'zr' to take an argument, and pass that to the ppc_md.restart() function. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191101085522.3055-1-oohall@gmail.com commit 846a17a53aeeee426cbc1252f517a6660eab1427 Author: Oliver O'Halloran Date: Fri Nov 1 17:26:11 2019 +1100 powerpc/powernv: Use common code for the symbol_map export Long before we had a generic way for firmware to export memory ranges of interest we added a special case for the skiboot symbol map. The code is pretty much identical to the generic export so re-use the code. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191101062611.32610-2-oohall@gmail.com commit db93361260e2411f854514e8b54b6c31a5b2d5bd Author: Oliver O'Halloran Date: Fri Nov 1 17:26:10 2019 +1100 powerpc/powernv: Rework exports to support subnodes Originally we only had a handful of exported memory ranges, but we'd to export the per-core trace buffers. This results in a lot of files in the exports directory which is a but unfortunate. We can clean things up a bit by turning subnodes into subdirectories of the exports directory. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191101062611.32610-1-oohall@gmail.com commit 4e0942c0302b5ad76b228b1a7b8c09f658a1d58a Author: Oliver O'Halloran Date: Wed Oct 16 12:25:36 2019 +1100 powerpc/eeh: Only dump stack once if an MMIO loop is detected Many drivers don't check for errors when they get a 0xFFs response from an MMIO load. As a result after an EEH event occurs a driver can get stuck in a polling loop unless it some kind of internal timeout logic. Currently EEH tries to detect and report stuck drivers by dumping a stack trace after eeh_dev_check_failure() is called EEH_MAX_FAILS times on an already frozen PE. The value of EEH_MAX_FAILS was chosen so that a dump would occur every few seconds if the driver was spinning in a loop. This results in a lot of spurious stack traces in the kernel log. Fix this by limiting it to printing one stack trace for each PE freeze. If the driver is truely stuck the kernel's hung task detector is better suited to reporting the probelm anyway. Signed-off-by: Oliver O'Halloran Reviewed-by: Sam Bobroff Tested-by: Sam Bobroff Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191016012536.22588-1-oohall@gmail.com commit 18697d2b08622b35278fc4312e86e6b5d3cd758d Author: Oliver O'Halloran Date: Thu Sep 12 15:29:45 2019 +1000 powernv/pci: Add a debugfs entry to dump PHB's IODA PE state Add a debugfs entry to dump the state of the active IODA PEs. The IODA PE state reflects how the PHB's internal concept of a PE is configured. This is separate to the EEH PE state and is managed power the PowerNV PCI backend rather than the EEH core. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy [mpe: Use DEFINE_DEBUGFS_ATTRIBUTE] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190912052945.12589-3-oohall@gmail.com commit c13a17b73eb0b30070a347111b8c386f4e6a844e Author: Oliver O'Halloran Date: Thu Sep 12 15:29:44 2019 +1000 powernv/pci: Allow any write trigger the diag dump Make the dump trigger off any input rather than just '1'. This allows you to write "echo 1> dump_diag_data" and it'll do what you want rather than erroring out pointlessly. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190912052945.12589-2-oohall@gmail.com commit 22ba7289079be12c85895fee41602139e9553c93 Author: Oliver O'Halloran Date: Thu Sep 12 15:29:43 2019 +1000 powernv/pci: Use pnv_phb as the private data for debugfs entries Use the pnv_phb structure as the private data pointer for the debugfs files. This lets us delete some code and an open-coded use of hose->private_data. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190912052945.12589-1-oohall@gmail.com commit a4af49f34f76f1e6125b22b50d18580426d935e0 Author: Oliver O'Halloran Date: Wed Aug 21 16:26:55 2019 +1000 powerpc/pcidn: Warn when sriov pci_dn management is used incorrectly These functions can only be used on a SR-IOV capable physical function and they're only called in pcibios_sriov_enable / disable. Make them emit a warning in the future if they're used incorrectly and remove the dead code that checks if the device is a VF. Signed-off-by: Oliver O'Halloran Reviewed-by: Sam Bobroff Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190821062655.19735-3-oohall@gmail.com commit 8cd6aacc640116213f9373808a627ecd3728accc Author: Oliver O'Halloran Date: Wed Aug 21 16:26:54 2019 +1000 powerpc/pcidn: Make VF pci_dn management CONFIG_PCI_IOV specific The powerpc PCI code requires that a pci_dn structure exists for all devices in the system. This is fine for real devices since at boot a pci_dn is created for each PCI device in the DT and it's fine for hotplugged devices since the hotplug slot driver will manage the pci_dn's devices in hotplug slots. For SR-IOV, we need the platform / pcibios to manage the pci_dn for virtual functions since firmware is unaware of VFs, and they aren't "hot plugged" in the traditional sense. Management of the pci_dn is handled by the, poorly named, functions: add_pci_dev_data() and remove_pci_dev_data(). The entire body of these functions is #ifdef`ed around CONFIG_PCI_IOV and they cannot be used in any other context, so make them only available when CONFIG_PCI_IOV is selected, and rename them to reflect their actual usage rather than having them masquerade as generic code. Signed-off-by: Oliver O'Halloran Reviewed-by: Sam Bobroff Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190821062655.19735-2-oohall@gmail.com commit 1fb4124ca9d456656a324f1ee29b7bf942f59ac8 Author: Oliver O'Halloran Date: Wed Aug 21 16:26:53 2019 +1000 powerpc/sriov: Remove VF eeh_dev state when disabling SR-IOV When disabling virtual functions on an SR-IOV adapter we currently do not correctly remove the EEH state for the now-dead virtual functions. When removing the pci_dn that was created for the VF when SR-IOV was enabled we free the corresponding eeh_dev without removing it from the child device list of the eeh_pe that contained it. This can result in crashes due to the use-after-free. Signed-off-by: Oliver O'Halloran Reviewed-by: Sam Bobroff Tested-by: Sam Bobroff Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190821062655.19735-1-oohall@gmail.com commit 3489cdc417b20d929b33eff4d8312b4dd1f39ca1 Author: Oliver O'Halloran Date: Mon Jul 15 18:56:12 2019 +1000 powerpc/eeh_sysfs: Make clearing EEH_DEV_SYSFS saner The eeh_sysfs_remove_device() function is supposed to clear the EEH_DEV_SYSFS flag since it indicates the EEH sysfs entries have been added for a pci_dev. When the sysfs files are removed eeh_remove_device() the eeh_dev and the pci_dev have already been de-associated. This then causes the pci_dev_to_eeh_dev() call in eeh_sysfs_remove_device() to return NULL so the flag can't be cleared from the still-live eeh_dev. This problem is worked around in the caller by clearing the flag manually. However, this behaviour doesn't make a whole lot of sense, so this patch fixes it by: a) Re-ordering eeh_remove_device() so that eeh_sysfs_remove_device() is called before de-associating the pci_dev and eeh_dev. b) Making eeh_sysfs_remove_device() emit a warning if there's no corresponding eeh_dev for a pci_dev. The paths where the sysfs files are only reachable if EEH was setup for the device for the device in the first place so hitting this warning indicates a programming error. Signed-off-by: Oliver O'Halloran Reviewed-by: Sam Bobroff Tested-by: Sam Bobroff Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190715085612.8802-6-oohall@gmail.com commit 758b423275f0738fa4d382057c03f3d45c12905d Author: Oliver O'Halloran Date: Mon Jul 15 18:56:11 2019 +1000 powerpc/eeh_sysfs: Remove double pci_dn lookup. In eeh_notify_resume_show() the pci_dn for the device is looked up once in the declaration block and then once after checking for a NULL eeh_dev. Remove the second lookup since it's pointless. Signed-off-by: Oliver O'Halloran Reviewed-by: Sam Bobroff Tested-by: Sam Bobroff Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190715085612.8802-5-oohall@gmail.com commit 4107248c5615ab20b64073f2dd5917b3961239dc Author: Oliver O'Halloran Date: Mon Jul 15 18:56:10 2019 +1000 powerpc/eeh_sysfs: ifdef pseries sr-iov sysfs properties There are several EEH sysfs properties that only exists when the "ibm,is-open-sriov-pf" property appears in the device tree node of the PCI device. This used on pseries to indicate to the guest that the hypervisor allows the guest to configure the SR-IOV capability. Doing this requires some handshaking between the guest, hypervisor and userspace when a VF is EEH frozen which is why these properties exist. This is all dead code on non-pseries platforms so wrap it in an #ifdef CONFIG_PPC_PSERIES to make the dependency clearer. Signed-off-by: Oliver O'Halloran Tested-by: Sam Bobroff Reviewed-by: Sam Bobroff Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190715085612.8802-4-oohall@gmail.com commit 89f51839bd75b1aa8fa062a5f2b4bbcde560f6e2 Author: Oliver O'Halloran Date: Mon Jul 15 18:56:09 2019 +1000 powerpc/eeh_sysfs: Fix incorrect comment The EEH_ATTR_SHOW() helper is used to display fields from struct eeh_dev not struct pci_dn. Signed-off-by: Oliver O'Halloran Reviewed-by: Sam Bobroff Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190715085612.8802-3-oohall@gmail.com commit b1268f4cdba71c0cd40b533778812340d36de8ae Author: Oliver O'Halloran Date: Mon Jul 15 18:56:08 2019 +1000 powerpc/eeh_cache: Don't use pci_dn when inserting new ranges At the point where we start inserting ranges into the EEH address cache the binding between pci_dev and eeh_dev has already been set up. Instead of consulting the pci_dn tree we can retrieve the eeh_dev directly using pci_dev_to_eeh_dev(). Signed-off-by: Oliver O'Halloran Reviewed-by: Sam Bobroff Tested-by: Sam Bobroff Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190715085612.8802-2-oohall@gmail.com commit 49ce94b8677c7d7a15c4d7cbbb9ff1cd8387827b Author: Frederic Barrat Date: Thu Nov 21 14:49:18 2019 +0100 ocxl: Add PCI hotplug dependency to Kconfig The PCI hotplug framework is used to update the devices when a new image is written to the FPGA. Reviewed-by: Alastair D'Silva Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191121134918.7155-12-fbarrat@linux.ibm.com commit 748ac391ab9acd8d7f3c93cbf3e63c773c0b2638 Author: Frederic Barrat Date: Thu Nov 21 14:49:17 2019 +0100 pci/hotplug/pnv-php: Wrap warnings in macro An opencapi slot doesn't have an associated bridge device. It's not needed for operation, but any warning is displayed through pci_warn() which uses the pci_dev struct of the assocated bridge device. So wrap those warning so that a different trace mechanism can be used if it's an opencapi slot. Reviewed-by: Alastair D'Silva Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191121134918.7155-11-fbarrat@linux.ibm.com commit be1611e043de63948c21cc7dd27ea6798ffd6fa4 Author: Frederic Barrat Date: Thu Nov 21 14:49:16 2019 +0100 pci/hotplug/pnv-php: Relax check when disabling slot The driver only allows to disable a slot in the POPULATED state. However, if an error occurs while enabling the slot, say because the link couldn't be trained, then the POPULATED state may not be reached, yet the power state of the slot is on. So allow to disable a slot in the REGISTERED state. Removing the devices will do nothing since it's not populated, and we'll set the power state of the slot back to off. Reviewed-by: Alastair D'Silva Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191121134918.7155-10-fbarrat@linux.ibm.com commit ea53919b15bf1e821b034b9c89758008de521437 Author: Frederic Barrat Date: Thu Nov 21 14:49:15 2019 +0100 pci/hotplug/pnv-php: Register opencapi slots Add the opencapi PHBs to the list of PHBs being scanned to look for slots. Signed-off-by: Frederic Barrat Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191121134918.7155-9-fbarrat@linux.ibm.com commit 323c2a26ff43500a96799250330fab68903d776f Author: Frederic Barrat Date: Thu Nov 21 14:49:14 2019 +0100 pci/hotplug/pnv-php: Improve error msg on power state change failure When changing the slot state, if opal hits an error and tells as such in the asynchronous reply, the warning "Wrong msg" is logged, which is rather confusing. Instead we can reuse the better message which is already used when we couldn't submit the asynchronous opal request initially. Reviewed-by: Alastair D'Silva Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191121134918.7155-8-fbarrat@linux.ibm.com commit 658ab186dd22060408d94f5c5a6d02d809baba44 Author: Frederic Barrat Date: Thu Nov 21 14:49:13 2019 +0100 pci/hotplug/pnv-php: Remove erroneous warning On powernv, when removing a device through hotplug, the following warning is logged: Invalid refcount <.> on <...> It may be incorrect, the refcount may be set to a higher value than 1 and be valid. of_detach_node() can drop more than one reference. As it doesn't seem trivial to assert the correct value, let's remove the warning. Reviewed-by: Alastair D'Silva Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191121134918.7155-7-fbarrat@linux.ibm.com commit bbb789046084d18fff1a32a7bcdeca36dfa0ac14 Author: Frederic Barrat Date: Thu Nov 21 14:49:12 2019 +0100 powerpc/powernv/ioda: Find opencapi slot for a device node Unlike real PCI slots, opencapi slots are directly associated to the (virtual) opencapi PHB, there's no intermediate bridge. So when looking for a slot ID, we must start the search from the device node itself and not its parent. Also, the slot ID is not attached to a specific bdfn, so let's build it from the PHB ID, like skiboot. Signed-off-by: Frederic Barrat Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191121134918.7155-6-fbarrat@linux.ibm.com commit f724385fea0136af31a850fbcff01a6e8cf8c889 Author: Frederic Barrat Date: Thu Nov 21 14:49:11 2019 +0100 powerpc/powernv/ioda: Release opencapi device With hotplug, an opencapi device can now go away. It needs to be released, mostly to clean up its PE state. We were previously not defining any device callback. We can reuse the standard PCI release callback, it does a bit too much for an opencapi device, but it's harmless, and only needs minor tuning. Also separate the undo of the PELT-V code in a separate function, it is not needed for NPU devices and it improves a bit the readability of the code. Signed-off-by: Frederic Barrat Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191121134918.7155-5-fbarrat@linux.ibm.com commit c1a2feade085fb4213e2823dabaa2401626843c8 Author: Frederic Barrat Date: Thu Nov 21 14:49:10 2019 +0100 powerpc/powernv/ioda: set up PE on opencapi device when enabling The PE for an opencapi device was set as part of a late PHB fixup operation, when creating the PHB. To use the PCI hotplug framework, this is not going to work, as the PHB stays the same, it's only the devices underneath which are updated. For regular PCI devices, it is done as part of the reconfiguration of the bridge, but for opencapi PHBs, we don't have an intermediate bridge. So let's define the PE when the device is enabled. PEs are meaningless for opencapi, the NPU doesn't define them and opal is not doing anything with them. Reviewed-by: Alastair D'Silva Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191121134918.7155-4-fbarrat@linux.ibm.com commit 80f1ff83fa113aa718ff4009684981386c574954 Author: Frederic Barrat Date: Thu Nov 21 14:49:09 2019 +0100 powerpc/powernv/ioda: Protect PE list Protect the PHB's list of PE. Probably not needed as long as it was populated during PHB creation, but it feels right and will become required once we can add/remove opencapi devices on hotplug. Reviewed-by: Andrew Donnellan Signed-off-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191121134918.7155-3-fbarrat@linux.ibm.com commit 05dd7da76986937fb288b4213b1fa10dbe0d1b33 Author: Frederic Barrat Date: Thu Nov 21 14:49:08 2019 +0100 powerpc/powernv/ioda: Fix ref count for devices with their own PE The pci_dn structure used to store a pointer to the struct pci_dev, so taking a reference on the device was required. However, the pci_dev pointer was later removed from the pci_dn structure, but the reference was kept for the npu device. See commit 902bdc57451c ("powerpc/powernv/idoa: Remove unnecessary pcidev from pci_dn"). We don't need to take a reference on the device when assigning the PE as the struct pnv_ioda_pe is cleaned up at the same time as the (physical) device is released. Doing so prevents the device from being released, which is a problem for opencapi devices, since we want to be able to remove them through PCI hotplug. Now the ugly part: nvlink npu devices are not meant to be released. Because of the above, we've always leaked a reference and simply removing it now is dangerous and would likely require more work. There's currently no release device callback for nvlink devices for example. So to be safe, this patch leaks a reference on the npu device, but only for nvlink and not opencapi. Signed-off-by: Frederic Barrat Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191121134918.7155-2-fbarrat@linux.ibm.com commit bfc2eae0ad72a43d2a270acce2581c065223aa12 Author: Christophe Leroy Date: Mon Dec 2 07:57:35 2019 +0000 powerpc/vdso32: miscellaneous optimisations Various optimisations by inverting branches and removing redundant instructions. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b4e79f963845545bcce1459cd6fcfe46bdde7863.1575273217.git.christophe.leroy@c-s.fr commit e33ffc956b086675551b86f5f83cf50ca47aa71c Author: Christophe Leroy Date: Mon Dec 2 07:57:33 2019 +0000 powerpc/vdso32: implement clock_getres entirely clock_getres returns hrtimer_res for all clocks but coarse ones for which it returns KTIME_LOW_RES. return EINVAL for unknown clocks. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/37f94e47c91070b7606fb3ec3fe6fd2302a475a0.1575273217.git.christophe.leroy@c-s.fr commit 6e2f9e9cfd560f5d9ce86503e5ae66330ccb97fc Author: Christophe Leroy Date: Mon Dec 2 07:57:32 2019 +0000 powerpc/vdso32: use LOAD_REG_IMMEDIATE() Use LOAD_REG_IMMEDIATE() to load registers with immediate value. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/36f111437e66e601929308f5d5dce230e1ce472f.1575273217.git.christophe.leroy@c-s.fr commit 2c29eef9fc6f61cfb81b54683be8f116dac80e7a Author: Christophe Leroy Date: Mon Dec 2 07:57:31 2019 +0000 powerpc/vdso32: Don't read cache line size from the datapage on PPC32. On PPC32, the cache lines have a fixed size known at build time. Don't read it from the datapage. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/dfa7b35e27e01964fcda84bf1ed8b2b31cf93826.1575273217.git.christophe.leroy@c-s.fr commit ec0895f08f99515194e9fcfe1338becf6f759d38 Author: Christophe Leroy Date: Mon Dec 2 07:57:30 2019 +0000 powerpc/vdso32: inline __get_datapage() __get_datapage() is only a few instructions to retrieve the address of the page where the kernel stores data to the VDSO. By inlining this function into its users, a bl/blr pair and a mflr/mtlr pair is avoided, plus a few reg moves. The improvement is noticeable (about 55 nsec/call on an 8xx) vdsotest before the patch: gettimeofday: vdso: 731 nsec/call clock-gettime-realtime-coarse: vdso: 668 nsec/call clock-gettime-monotonic-coarse: vdso: 745 nsec/call vdsotest after the patch: gettimeofday: vdso: 677 nsec/call clock-gettime-realtime-coarse: vdso: 613 nsec/call clock-gettime-monotonic-coarse: vdso: 690 nsec/call Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c39ef7f3dfa25356b01e211d539671f279086c09.1575273217.git.christophe.leroy@c-s.fr commit 654abc69ef2e69712e6d4e8a6cb9292b97a4aa39 Author: Christophe Leroy Date: Mon Dec 2 07:57:28 2019 +0000 powerpc/vdso32: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE This is copied and adapted from commit 5c929885f1bb ("powerpc/vdso64: Add support for CLOCK_{REALTIME/MONOTONIC}_COARSE") from Santosh Sivaraj Benchmark from vdsotest-all: clock-gettime-realtime: syscall: 3601 nsec/call clock-gettime-realtime: libc: 1072 nsec/call clock-gettime-realtime: vdso: 931 nsec/call clock-gettime-monotonic: syscall: 4034 nsec/call clock-gettime-monotonic: libc: 1213 nsec/call clock-gettime-monotonic: vdso: 1076 nsec/call clock-gettime-realtime-coarse: syscall: 2722 nsec/call clock-gettime-realtime-coarse: libc: 805 nsec/call clock-gettime-realtime-coarse: vdso: 668 nsec/call clock-gettime-monotonic-coarse: syscall: 2949 nsec/call clock-gettime-monotonic-coarse: libc: 882 nsec/call clock-gettime-monotonic-coarse: vdso: 745 nsec/call Additional test passed with: vdsotest -d 30 clock-gettime-monotonic-coarse verify Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://github.com/linuxppc/issues/issues/41 Link: https://lore.kernel.org/r/d1d24a376e396540194eeb85a2efe481e92ade24.1575273217.git.christophe.leroy@c-s.fr commit 902137ba8e469ed07c7f120a390161937a6288fb Author: Christophe Leroy Date: Mon Dec 2 07:57:27 2019 +0000 powerpc/32: Add VDSO version of getcpu on non SMP Commit 18ad51dd342a ("powerpc: Add VDSO version of getcpu") added getcpu() for PPC64 only, by making use of a user readable general purpose SPR. PPC32 doesn't have any such SPR. For non SMP, just return CPU id 0 from the VDSO directly. PPC32 doesn't support CONFIG_NUMA so NUMA node is always 0. Before the patch, vdsotest reported: getcpu: syscall: 1572 nsec/call getcpu: libc: 1787 nsec/call getcpu: vdso: not tested Now, vdsotest reports: getcpu: syscall: 1582 nsec/call getcpu: libc: 502 nsec/call getcpu: vdso: 187 nsec/call Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/eaac4b6494ecff1811220fccc895bf282aab884a.1575273217.git.christophe.leroy@c-s.fr commit 8c452a889821ca0cd2a5f2e3e87fbc01e56408cb Author: Christophe Leroy Date: Thu Nov 28 12:16:35 2019 +0000 powerpc/devicetrees: Change 'gpios' to 'cs-gpios' on fsl, spi nodes Since commit 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors"), the prefered way to define chipselect GPIOs is using 'cs-gpios' property instead of the legacy 'gpios' property. Signed-off-by: Christophe Leroy Reviewed-by: Linus Walleij Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7556683b57d8ce100855857f03d1cd3d2903d045.1574943062.git.christophe.leroy@c-s.fr commit a426ea9bb3889b3ce3bec52f2467c1becdcc330a Author: Christophe Leroy Date: Tue Nov 26 17:43:30 2019 +0000 selftests/powerpc: Enable range tests on 8xx in ptrace-hwbreak.c selftest 8xx is now able to support any range length so range tests can be enabled. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/081e3b4e3a17a8ec9fdac46b505e3a29ca15f209.1574790198.git.christophe.leroy@c-s.fr commit 39413ae009674c6ba745850515b551bbb9d6374b Author: Christophe Leroy Date: Tue Nov 26 17:43:29 2019 +0000 powerpc/hw_breakpoints: Rewrite 8xx breakpoints to allow any address range size. Unlike standard powerpc, Powerpc 8xx doesn't have SPRN_DABR, but it has a breakpoint support based on a set of comparators which allow more flexibility. Commit 4ad8622dc548 ("powerpc/8xx: Implement hw_breakpoint") implemented breakpoints by emulating the DABR behaviour. It did this by setting one comparator the match 4 bytes at breakpoint address and the other comparator to match 4 bytes at breakpoint address + 4. Rewrite 8xx hw_breakpoint to make breakpoints match all addresses defined by the breakpoint address and length by making full use of comparators. Now, comparator E is set to match any address greater than breakpoint address minus one. Comparator F is set to match any address lower than breakpoint address plus breakpoint length. Addresses are aligned to 32 bits. When the breakpoint range starts at address 0, the breakpoint is set to match comparator F only. When the breakpoint range end at address 0xffffffff, the breakpoint is set to match comparator E only. Otherwise the breakpoint is set to match comparator E and F. At the same time, use registers bit names instead of hardcoded values. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/05105deeaf63bc02151aea2cdeaf525534e0e9d4.1574790198.git.christophe.leroy@c-s.fr commit 991d656d722dbc783481f408d6e4cbcce2e8bb78 Author: Christophe Leroy Date: Tue Nov 26 13:16:50 2019 +0000 powerpc/8xx: Fix permanently mapped IMMR region. When not using large TLBs, the IMMR region is still mapped as a whole block in the FIXMAP area. Properly report that the IMMR region is block-mapped even when not using large TLBs. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/45f4f414bcd7198b0755cf4287ff216fbfc24b9d.1574774187.git.christophe.leroy@c-s.fr commit f509247b08f2dcf7754d9ed85ad69a7972aa132b Author: Christophe Leroy Date: Tue Jan 14 08:13:10 2020 +0000 powerpc/ptdump: Only enable PPC_CHECK_WX with STRICT_KERNEL_RWX ptdump_check_wx() is called from mark_rodata_ro() which only exists when CONFIG_STRICT_KERNEL_RWX is selected. Fixes: 453d87f6a8ae ("powerpc/mm: Warn if W+X pages found on boot") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/922d4939c735c6b52b4137838bcc066fffd4fc33.1578989545.git.christophe.leroy@c-s.fr commit d80ae83f1f932ab7af47b54d0d3bef4f4dba489f Author: Christophe Leroy Date: Tue Jan 14 08:13:09 2020 +0000 powerpc/ptdump: Fix W+X verification Verification cannot rely on simple bit checking because on some platforms PAGE_RW is 0, checking that a page is not W means checking that PAGE_RO is set instead of checking that PAGE_RW is not set. Use pte helpers instead of checking bits. Fixes: 453d87f6a8ae ("powerpc/mm: Warn if W+X pages found on boot") Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0d894839fdbb19070f0e1e4140363be4f2bb62fc.1578989540.git.christophe.leroy@c-s.fr commit e26ad936dd89d79f66c2b567f700e0c2a7103070 Author: Christophe Leroy Date: Tue Jan 14 08:13:08 2020 +0000 powerpc/ptdump: Fix W+X verification call in mark_rodata_ro() ptdump_check_wx() also have to be called when pages are mapped by blocks. Fixes: 453d87f6a8ae ("powerpc/mm: Warn if W+X pages found on boot") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/37517da8310f4457f28921a4edb88fb21d27b62a.1578989531.git.christophe.leroy@c-s.fr commit 1e1c8b2cc37afb333c1829e8e0360321813bf220 Author: Christophe Leroy Date: Tue Jan 14 07:14:40 2020 +0000 powerpc/ptdump: don't entirely rebuild kernel when selecting CONFIG_PPC_DEBUG_WX Selecting CONFIG_PPC_DEBUG_WX only impacts ptdump and pgtable_32/64 init calls. Declaring related functions in asm/pgtable.h implies rebuilding almost everything. Move ptdump_check_wx() declaration in mm/mmu_decl.h Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/bf34fd9dca61eadf9a134a9f89ebbc162cfd5f86.1578986011.git.christophe.leroy@c-s.fr commit fd786fb1d2cad70b9aaba8c73872cbf63262bd58 Author: Heiner Kallweit Date: Tue Jan 21 22:09:33 2020 +0100 net: convert suitable drivers to use phy_do_ioctl_running Convert suitable drivers to use new helper phy_do_ioctl_running. Signed-off-by: Heiner Kallweit Acked-by: Timur Tabi Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 4425f567b0dd2cb5ad2b16ce03a8951d0ccf935d Author: Paolo Bonzini Date: Mon Jan 20 16:14:37 2020 +0100 KVM: async_pf: drop kvm_arch_async_page_present wrappers The wrappers make it less clear that the position of the call to kvm_arch_async_page_present depends on the architecture, and that only one of the two call sites will actually be active. Remove them. Cc: Andy Lutomirski Cc: Christian Borntraeger Signed-off-by: Paolo Bonzini commit 99634e3ec0d4e0df28ae465b10f3613a4ceee58b Author: Paolo Bonzini Date: Mon Jan 20 14:22:55 2020 +0100 KVM: x86: list MSR_IA32_UCODE_REV as an emulated MSR Even if it's read-only, it can still be written to by userspace. Let them know by adding it to KVM_GET_MSR_INDEX_LIST. Signed-off-by: Paolo Bonzini commit 5fcf3a55a62afb0760ccb6f391d62f20bce4a42f Author: Gavin Shan Date: Tue Dec 10 15:48:29 2019 +1100 tools/kvm_stat: Fix kvm_exit filter name The filter name is fixed to "exit_reason" for some kvm_exit events, no matter what architect we have. Actually, the filter name ("exit_reason") is only applicable to x86, meaning it's broken on other architects including aarch64. This fixes the issue by providing various kvm_exit filter names, depending on architect we're on. Afterwards, the variable filter name is picked and applied through ioctl(fd, SET_FILTER). Reported-by: Andrew Jones Signed-off-by: Gavin Shan Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 56871d444bc4d7ea66708775e62e2e0926384dbc Author: Paolo Bonzini Date: Sat Jan 18 20:09:03 2020 +0100 KVM: x86: fix overlap between SPTE_MMIO_MASK and generation The SPTE_MMIO_MASK overlaps with the bits used to track MMIO generation number. A high enough generation number would overwrite the SPTE_SPECIAL_MASK region and cause the MMIO SPTE to be misinterpreted. Likewise, setting bits 52 and 53 would also cause an incorrect generation number to be read from the PTE, though this was partially mitigated by the (useless if it weren't for the bug) removal of SPTE_SPECIAL_MASK from the spte in get_mmio_spte_generation. Drop that removal, and replace it with a compile-time assertion. Fixes: 6eeb4ef049e7 ("KVM: x86: assign two bits to track SPTE kinds") Reported-by: Ben Gardon Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 5396c4bd9fd8429050f6191663b6c491e6402da2 Author: Colin Ian King Date: Thu Jan 23 00:00:50 2020 +0000 ALSA: cs46xx: fix spelling mistake "to" -> "too" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200123000050.2831088-1-colin.king@canonical.com Signed-off-by: Takashi Iwai commit 19c64e7354e50d19e7b5ddf94bfb5fa24d69594c Author: Colin Ian King Date: Wed Jan 22 23:39:55 2020 +0000 USB: serial: cyberjack: fix spelling mistake "To" -> "Too" There is a spelling mistake in a dev_dbg message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Johan Hovold commit a1c91c1036397f2f7074aa4f5df8a2412e94ab97 Author: Johan Hovold Date: Wed Jan 22 11:15:30 2020 +0100 USB: serial: ir-usb: simplify endpoint check Simplify the endpoint sanity check by letting core verify that the required endpoints are present. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit e7542bc382f8ca2eae25adaa444044513e474925 Author: Johan Hovold Date: Wed Jan 22 11:15:29 2020 +0100 USB: serial: ir-usb: make set_termios synchronous Use a synchronous usb_bulk_msg() when switching link speed in set_termios(). This way we do not need to keep track of outstanding URBs in order to be able to stop them at close. Note that there's no need to set URB_ZERO_PACKET as the one-byte transfer will always be short. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 38c0d5bdf4973f9f5a888166e9d3e9ed0d32057a Author: Johan Hovold Date: Wed Jan 22 11:15:28 2020 +0100 USB: serial: ir-usb: fix IrLAP framing Commit f4a4cbb2047e ("USB: ir-usb: reimplement using generic framework") switched to using the generic write implementation which may combine multiple write requests into larger transfers. This can break the IrLAP protocol where end-of-frame is determined using the USB short packet mechanism, for example, if multiple frames are sent in rapid succession. Fixes: f4a4cbb2047e ("USB: ir-usb: reimplement using generic framework") Cc: stable # 2.6.35 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 17a0184ca17e288decdca8b2841531e34d49285f Author: Johan Hovold Date: Wed Jan 22 11:15:27 2020 +0100 USB: serial: ir-usb: fix link-speed handling Commit e0d795e4f36c ("usb: irda: cleanup on ir-usb module") added a USB IrDA header with common defines, but mistakingly switched to using the class-descriptor baud-rate bitmask values for the outbound header. This broke link-speed handling for rates above 9600 baud, but a device would also be able to operate at the default 9600 baud until a link-speed request was issued (e.g. using the TCGETS ioctl). Fixes: e0d795e4f36c ("usb: irda: cleanup on ir-usb module") Cc: stable # 2.6.27 Cc: Felipe Balbi Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 2988a8ae7476fe9535ab620320790d1714bdad1d Author: Johan Hovold Date: Wed Jan 22 11:15:26 2020 +0100 USB: serial: ir-usb: add missing endpoint sanity check Add missing endpoint sanity check to avoid dereferencing a NULL-pointer on open() in case a device lacks a bulk-out endpoint. Note that prior to commit f4a4cbb2047e ("USB: ir-usb: reimplement using generic framework") the oops would instead happen on open() if the device lacked a bulk-in endpoint and on write() if it lacked a bulk-out endpoint. Fixes: f4a4cbb2047e ("USB: ir-usb: reimplement using generic framework") Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 7af43a76695db71a57203793fb9dd3c81a5783b1 Author: Chen Zhou Date: Wed Jan 22 09:32:40 2020 +0800 backlight: qcom-wled: Fix unsigned comparison to zero Fixes coccicheck warning: ./drivers/video/backlight/qcom-wled.c:1104:5-15: WARNING: Unsigned expression compared with zero: string_len > 0 The unsigned variable string_len is assigned a return value from the call to of_property_count_elems_of_size(), which may return negative error code. Fixes: 775d2ffb4af6 ("backlight: qcom-wled: Restructure the driver for WLED3") Signed-off-by: Chen Zhou Reviewed-by: Bjorn Andersson Reviewed-by: Daniel Thompson Reviewed-by: Kiran Gunda Signed-off-by: Lee Jones commit 954b3c4397792c8614aa4aaf25030ae87ece8307 Merge: c5d19a6ecfce 85cc12f85138 Author: David S. Miller Date: Thu Jan 23 08:10:16 2020 +0100 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2020-01-22 The following pull-request contains BPF updates for your *net-next* tree. We've added 92 non-merge commits during the last 16 day(s) which contain a total of 320 files changed, 7532 insertions(+), 1448 deletions(-). The main changes are: 1) function by function verification and program extensions from Alexei. 2) massive cleanup of selftests/bpf from Toke and Andrii. 3) batched bpf map operations from Brian and Yonghong. 4) tcp congestion control in bpf from Martin. 5) bulking for non-map xdp_redirect form Toke. 6) bpf_send_signal_thread helper from Yonghong. ==================== Signed-off-by: David S. Miller commit 7c453526dc50460c63ff28df7673570dd057c5d0 Author: Vlad Buslov Date: Tue Jan 21 20:08:42 2020 +0200 net/mlx5e: Enable all available stats for uplink reps Extend stats group array of uplink representor with all stats that are available for PF in legacy mode, besides ipsec and TLS which are not supported. Don't output vport stats for uplink representor because they are already handled by 802_3 group (with different names: {tx|rx}_{bytes|packets}_phy). Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 8520fa57a4e934eff631883cf80744d3a84c734b Author: Vlad Buslov Date: Tue Jan 21 21:36:40 2020 +0200 net/mlx5e: Create q counters on uplink representors Q counters were disabled for all types of representors to prevent an issue where there is not enough resources to init q counters for 127 representor instances. Enable q counters only for uplink representors to support "rx_out_of_buffer", "rx_if_down_packets" counters in ethtool. Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 8a236b15144b29ce47f80c37bc55740a5388ecb1 Author: Vlad Buslov Date: Tue Jan 21 19:38:21 2020 +0200 net/mlx5e: Convert rep stats to mlx5e_stats_grp-based infra In order to support all of the supported stats that are available in legacy mode for switchdev uplink representors, convert rep stats infrastructure to reuse struct mlx5e_stats_grp that is already used when device is in legacy mode. Refactor rep code to use array of mlx5e_stats_grp structures (constructed using macros provided by stats infra) to fill/update stats, instead of fixed hardcoded set of values. This approach allows to easily extend representors with new stats types. Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 2a303f13f9cda5a8f5729ccb84b211c1ef6bed92 Author: Saeed Mahameed Date: Tue Jan 21 01:15:28 2020 -0800 net/mlx5e: IPoIB, use separate stats groups Don't copy all of the stats groups used for mlx5e ethernet NIC profile, have a separate stats groups for IPoIB with the set of the needed stats only. Signed-off-by: Saeed Mahameed commit f0ff8e8c7206886a5360eee7d3f664480ed473c9 Author: Saeed Mahameed Date: Tue Jan 21 00:54:00 2020 -0800 net/mlx5e: Convert stats groups array to array of group pointers Convert stats groups array to array of "stats group" pointers to allow sharing and individual selection of groups per profile as illustrated in the next patches. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan commit 96b12796550d0f0a7613f03efa0140f39120946b Author: Saeed Mahameed Date: Tue Jan 21 00:24:53 2020 -0800 net/mlx5e: Declare stats groups via macro Introduce new macros to declare stats callbacks and groups, for better code reuse and for individual groups selection per profile which will be introduced in next patches. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan commit 3460c184dfb0b41118b5000ad78dd997c034b2b5 Author: Saeed Mahameed Date: Mon Jan 20 22:32:12 2020 -0800 net/mlx5e: Profile specific stats groups Attach stats groups array to the profiles and make the stats utility functions (get_num, update, fill, fill_strings) generic and use the profile->stats_grps rather the hardcoded NIC stats groups. This will allow future extension to have per profile stats groups. In this patch mlx5e NIC and IPoIB will still share the same stats groups. Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan commit 29b598ddb8d2d401257013c2af5e9f003bf84ec4 Author: Roi Dayan Date: Wed Oct 23 09:59:36 2019 +0300 net/mlx5e: Move uplink rep init/cleanup code into own functions Clean up the code and allows to call uplink rep init/cleanup from different location later. To be used later for a new uplink representor mode. Signed-off-by: Roi Dayan Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed commit 4c7cea2f31f1dde9c578e4729e0d34f340052037 Author: Yevgeny Kliteynik Date: Mon Jan 20 11:51:36 2020 +0200 net/mlx5: DR, Allow connecting flow table to a lower/same level table Allow connecting SW steering source table to a lower/same level destination table. Lifting this limitation is required to support Connection Tracking. Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit c21a49b360e16657f42f1a9269c3aa714738fec7 Author: Hamdan Igbaria Date: Thu Jan 9 13:27:16 2020 +0200 net/mlx5: DR, Modify header copy support Modify header supports ADD/SET and from this patch also COPY. Copy allows to copy header fields and metadata. Signed-off-by: Hamdan Igbaria Signed-off-by: Alex Vesker Signed-off-by: Saeed Mahameed commit a51dcc10a04ac476240befb875b0a21388a429cd Author: Hamdan Igbaria Date: Tue Dec 24 18:07:41 2019 +0200 net/mlx5: DR, Modify set action limitation extension Modify set actions are not supported on both tx and rx, added a check for that. Also refactored the code in a way that every modify action has his own functions, this needed so in the future we could add copy action more smoothly. Signed-off-by: Hamdan Igbaria Signed-off-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 6d65bc64e232896251daba7c43933f0f35859bc3 Author: wenxu Date: Tue Jan 7 17:16:06 2020 +0800 net/mlx5e: Add mlx5e_flower_parse_meta support In the flowtables offload all the devices in the flowtables share the same flow_block. An offload rule will be installed on all the devices. This scenario is not correct. It is no problem if there are only two devices in the flowtable, The rule with ingress and egress on the same device can be reject by driver. But more than two devices in the flowtable will install the wrong rules on hardware. For example: Three devices in a offload flowtables: dev_a, dev_b, dev_c A rule ingress from dev_a and egress to dev_b: The rule will install on device dev_a. The rule will try to install on dev_b but failed for ingress and egress on the same device. The rule will install on dev_c. This is not correct. The flowtables offload avoid this case through restricting the ingress dev with FLOW_DISSECTOR_KEY_META. So the mlx5e driver also should support the FLOW_DISSECTOR_KEY_META parse. Signed-off-by: wenxu Acked-by: Roi Dayan Signed-off-by: Saeed Mahameed commit e15cf98ee8a76472144a19a24ca73d26fefa5237 Author: Chen Wandun Date: Mon Jan 20 20:41:53 2020 +0800 net/mlx5: make the symbol 'ESW_POOLS' static Fix the following sparse warning: drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_chains.c:35:20: warning: symbol 'ESW_POOLS' was not declared. Should it be static? Fixes: 39ac237ce009 ("net/mlx5: E-Switch, Refactor chains and priorities") Signed-off-by: Chen Wandun Acked-by: Paul Blakey Signed-off-by: Saeed Mahameed commit a1718505d7f67ee0ab051322f1cbc7ac42b5da82 Author: Davide Caratti Date: Thu Jan 9 12:07:59 2020 +0100 net/mlx5e: allow TSO on VXLAN over VLAN topologies since mlx5 hardware can segment correctly TSO packets on VXLAN over VLAN topologies, CPU usage can improve significantly if we enable tunnel offloads in dev->vlan_features, like it was done in the past with other NIC drivers (e.g. mlx4, be2net and ixgbe). Signed-off-by: Davide Caratti Signed-off-by: Saeed Mahameed commit ca9c74ae9be5e78541c2058db9a754947a7d4a9b Author: Olof Johansson Date: Thu Dec 19 16:15:17 2019 -0800 net/mlx5e: Fix printk format warning Use "%zu" for size_t. Seen on ARM allmodconfig: drivers/net/ethernet/mellanox/mlx5/core/wq.c: In function 'mlx5_wq_cyc_wqe_dump': include/linux/kern_levels.h:5:18: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=] Fixes: 130c7b46c93d ("net/mlx5e: TX, Dump WQs wqe descriptors on CQE with error events") Signed-off-by: Olof Johansson Signed-off-by: Saeed Mahameed commit f5fa7c8bb6307624b2177dfedc67da8dbc3a7a52 Author: Hridya Valsaraju Date: Wed Jan 22 10:49:20 2020 -0800 f2fs: delete duplicate information on sysfs nodes This patch merges the sysfs node documentation present in Documentation/filesystems/f2fs.txt and Documentation/ABI/testing/sysfs-fs-f2fs and deletes the duplicate information from Documentation/filesystems/f2fs.txt. This is to prevent having to update both files when a new sysfs node is added for f2fs. The patch also makes minor formatting changes to Documentation/ABI/testing/sysfs-fs-f2fs. Signed-off-by: Hridya Valsaraju Signed-off-by: Jaegeuk Kim commit a9eeb0e61128ed6cdd0b910eab2df7b2729d7d15 Merge: 31a7d26fbc51 af15a11b9046 Author: Olof Johansson Date: Wed Jan 22 16:41:24 2020 -0800 Merge tag 'samsung-soc-5.6-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc Samsung mach/soc changes for v5.6, part 2 1. Switch from legacy to atomic pwm API in rx1950 (s3c24xx), 2. Cleanups of unneeded selects in Kconfig. * tag 'samsung-soc-5.6-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: s3c64xx: Drop unneeded select of TIMER_OF ARM: exynos: Drop unneeded select of MIGHT_HAVE_CACHE_L2X0 ARM: s3c24xx: Switch to atomic pwm API in rx1950 Link: https://lore.kernel.org/r/20200122172649.3143-1-krzk@kernel.org Signed-off-by: Olof Johansson commit 85cc12f85138f2ce3edf24833edd2179690306db Merge: 1b2fd38de9fc 6de4a9c430b5 Author: Alexei Starovoitov Date: Wed Jan 22 16:30:11 2020 -0800 Merge branch 'bpf_cubic' Martin KaFai Lau says: ==================== This set adds bpf_cubic.c example. It was separated from the earlier BPF STRUCT_OPS series. Some highlights since the last post: 1. It is based on EricD recent fixes to the kernel tcp_cubic. [1] 2. The bpf jiffies reading helper is inlined by the verifier. Different from the earlier version, it only reads jiffies alone and does not do usecs/jiffies conversion. 3. The bpf .kconfig map is used to read CONFIG_HZ. [1]: https://patchwork.ozlabs.org/cover/1215066/ v3: - Remove __weak from CONFIG_HZ in patch 3. (Andrii) v2: - Move inlining to fixup_bpf_calls() in patch 1. (Daniel) - It is inlined for 64 BITS_PER_LONG and jit_requested as the map_gen_lookup(). Other cases could be considered together with map_gen_lookup() if needed. - Use usec resolution in bictcp_update() calculation in patch 3. usecs_to_jiffies() is then removed(). (Eric) ==================== Signed-off-by: Alexei Starovoitov commit 6de4a9c430b57c6ebbccd2a1725f42e9be75f592 Author: Martin KaFai Lau Date: Wed Jan 22 15:36:58 2020 -0800 bpf: tcp: Add bpf_cubic example This patch adds a bpf_cubic example. Some highlights: 1. CONFIG_HZ .kconfig map is used. 2. In bictcp_update(), calculation is changed to use usec resolution (i.e. USEC_PER_JIFFY) instead of using jiffies. Thus, usecs_to_jiffies() is not used in the bpf_cubic.c. 3. In bitctcp_update() [under tcp_friendliness], the original "while (ca->ack_cnt > delta)" loop is changed to the equivalent "ca->ack_cnt / delta" operation. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200122233658.903774-1-kafai@fb.com commit 0a49c1a8e26266ad505704f54f9fdaf2ae14cbdb Author: Martin KaFai Lau Date: Wed Jan 22 15:36:52 2020 -0800 bpf: Sync uapi bpf.h to tools/ This patch sync uapi bpf.h to tools/. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200122233652.903348-1-kafai@fb.com commit 5576b991e9c1a11d2cc21c4b94fc75ec27603896 Author: Martin KaFai Lau Date: Wed Jan 22 15:36:46 2020 -0800 bpf: Add BPF_FUNC_jiffies64 This patch adds a helper to read the 64bit jiffies. It will be used in a later patch to implement the bpf_cubic.c. The helper is inlined for jit_requested and 64 BITS_PER_LONG as the map_gen_lookup(). Other cases could be considered together with map_gen_lookup() if needed. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200122233646.903260-1-kafai@fb.com commit c9444384f0d5cfdbd4ed165b17e53e1537e109cc Author: Jiaxun Yang Date: Mon Jan 13 18:16:12 2020 +0800 MIPS: Loongson64: Select mac2008 only feature Some Loongson-64 processor didn't set MAC2008 bit in fcsr, but actually all Loongson64 processors are MAC2008 only. Signed-off-by: Jiaxun Yang Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: chenhc@lemote.com Cc: paul.burton@mips.com Cc: linux-kernel@vger.kernel.org commit ece276de2a1f90b6a7836d388c372b9025345469 Author: Jiaxun Yang Date: Mon Jan 13 18:16:11 2020 +0800 MIPS: Add MAC2008 Support MAC2008 means the processor implemented IEEE754 style Fused MADD instruction. It was introduced in Release3 but removed in Release5. The toolchain support of MAC2008 have never landed except for Loongson processors. This patch aimed to disabled the MAC2008 if it's optional. For MAC2008 only processors, we corrected math-emu behavior to align with actual hardware behavior. Signed-off-by: Jiaxun Yang [paulburton@kernel.org: Fixup MIPSr2-r5 check in cpu_set_fpu_2008.] Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: chenhc@lemote.com Cc: paul.burton@mips.com Cc: linux-kernel@vger.kernel.org commit 1250c1a568ca33e9c9b586b99a763277684c6899 Author: Alexandre Oliva Date: Tue Jan 21 09:30:45 2020 -0300 cpufreq: loongson2_cpufreq: adjust cpufreq uses of LOONGSON_CHIPCFG The post-fork cleanup of loongson2ef from loongson64 changed LOONGSON_CHIPCFG from a single-argument functional macro to a non-functional macro with an mmio address in loongson2ef, but loongson2_cpufreq still uses the notation of a functional macro call expecting it to be an lvalue. Fixed based on loongson_suspend_enter. Signed-off-by: Alexandre Oliva Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit c689b069916c69c0afd2f72a9bbcd910bba7e590 Merge: a04616a30a51 ee8642162a9e Author: Dave Airlie Date: Thu Jan 23 09:39:02 2020 +1000 Merge branch 'linux-5.6' of git://github.com/skeggsb/linux into drm-next Just a couple of fixes to GP10x ACR support after the work, and a (fairly severe if you're running piglit a lot) memory leak fix. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/ Date: Fri Jan 17 11:46:24 2020 +0100 intel_idle: Clean up irtl_2_usec() Move the irtl_ns_units[] definition into irtl_2_usec() which is the only user of it, use div_u64() for the division in there (as the divisor is small enough) and use the NSEC_PER_USEC symbol for the divisor. Also convert the irtl_2_usec() comment to a proper kerneldo one. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit 1aefbd7aeb7695c1a9e6ece9a1612ee88e1ea3f8 Author: Rafael J. Wysocki Date: Fri Jan 10 11:52:32 2020 +0100 intel_idle: Move 3 functions closer to their callers Move intel_idle_verify_cstate(), auto_demotion_disable() and c1e_promotion_disable() closer to their callers. While at it, annotate intel_idle_verify_cstate() with __init, as it is only used during the initialization of the driver. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit 095928ae484b9f765fb4967c6cf76a2f86fc9787 Author: Rafael J. Wysocki Date: Fri Jan 10 11:51:22 2020 +0100 intel_idle: Annotate initialization code and data structures Annotate the functions that are only used at the initialization time with __init and the data structures used by them with __initdata or __initconst. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit 0755a9bd9963ec3d611129cf2cdbb3e041ccbd6a Author: Rafael J. Wysocki Date: Fri Jan 10 11:49:58 2020 +0100 intel_idle: Move and clean up intel_idle_cpuidle_devices_uninit() Move intel_idle_cpuidle_devices_uninit() closer to its caller, intel_idle_init(), add the __init modifier to its header, drop a redundant local variable from it and fix up its kerneldoc comment. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit 3d3a1ae9b4bedc3e8c88ff4baeb0a195cb447fa1 Author: Rafael J. Wysocki Date: Fri Jan 10 11:48:25 2020 +0100 intel_idle: Rearrange intel_idle_cpuidle_driver_init() Notice that intel_idle_state_table_update() only needs to be called if icpu is not NULL, so fold it into intel_idle_init_cstates_icpu(), and pass a pointer to the driver object to intel_idle_cpuidle_driver_init() as an argument instead of referencing it locally in there. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit 533da74a8c8d75af7958f4aa1abc944f061d1d85 Author: Rafael J. Wysocki Date: Fri Jan 10 11:45:49 2020 +0100 intel_idle: Clean up NULL pointer check in intel_idle_init() Instead of comparing intel_idle_cpuidle_devices with NULL apply the "!" (not) operator to it when checking it against NULL. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit a6c86e336282c67a0b04f64b3b5574794249e3e1 Author: Rafael J. Wysocki Date: Fri Jan 10 11:44:58 2020 +0100 intel_idle: Fold intel_idle_probe() into intel_idle_init() There is no particular reason why intel_idle_probe() needs to be a separate function and folding it into intel_idle_init() causes the code to be somewhat easier to follow, so do just that. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit cbd2c4c25d7e0ba7afe42f2397865b164d1109eb Author: Rafael J. Wysocki Date: Fri Jan 10 11:43:23 2020 +0100 intel_idle: Eliminate __setup_broadcast_timer() The __setup_broadcast_timer() static function is only called in one place and "true" is passed to it as the argument in there, so effectively it is a wrapper arround tick_broadcast_enable(). To simplify the code, call tick_broadcast_enable() directly instead of __setup_broadcast_timer() and drop the latter. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit e6cf623ba3f83118b0f75be2cc1675931e21c887 Merge: cefb9409ff99 a32991822163 Author: Rafael J. Wysocki Date: Thu Jan 23 00:35:50 2020 +0100 Merge branch 'intel_idle+acpi' Merge changes updating the ACPI processor driver in order to export acpi_processor_evaluate_cst() to the code outside of it and adding ACPI support to the intel_idle driver based on that. * intel_idle+acpi: Documentation: admin-guide: PM: Add intel_idle document intel_idle: Use ACPI _CST on server systems intel_idle: Add module parameter to prevent ACPI _CST from being used intel_idle: Allow ACPI _CST to be used for selected known processors cpuidle: Allow idle states to be disabled by default intel_idle: Use ACPI _CST for processor models without C-state tables intel_idle: Refactor intel_idle_cpuidle_driver_init() ACPI: processor: Export acpi_processor_evaluate_cst() ACPI: processor: Make ACPI_PROCESSOR_CSTATE depend on ACPI_PROCESSOR ACPI: processor: Clean up acpi_processor_evaluate_cst() ACPI: processor: Introduce acpi_processor_evaluate_cst() ACPI: processor: Export function to claim _CST control commit a04616a30a515e6659c198b82d2925e4aabd3a99 Merge: 61ff410faefc c0bf499f6f84 Author: Dave Airlie Date: Thu Jan 23 09:32:54 2020 +1000 Merge tag 'exynos-drm-next-for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Change Exynos DRM specific callback function names - it changes enable and disable callback functions names of struct exynos_drm_crtc_ops to atomic_enable and atomic_disable for consistency. Modify "EXYNOS" prefix to "Exynos" - "Exynos" name is a regular trademarked name promoted by its manufacturer, Samsung Electronics Co., Ltd.. This patch corrects the name. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/1579567970-4467-1-git-send-email-inki.dae@samsung.com commit cefb9409ff995fcc98ce44a07b549ba1b827c31b Author: Benjamin Gaignard Date: Tue Jan 21 09:27:58 2020 +0100 cpuidle: fix cpuidle_find_deepest_state() kerneldoc warnings Fix cpuidle_find_deepest_state() kernel documentation to avoid warnings when compiling with W=1. Signed-off-by: Benjamin Gaignard Acked-by: Randy Dunlap Signed-off-by: Rafael J. Wysocki commit a09da3fbc17f36feac00fea37a225596ae302360 Author: Benjamin Gaignard Date: Mon Jan 20 14:33:59 2020 +0100 cpuidle: sysfs: fix warnings when compiling with W=1 Fix kernel documentation comments to remove warnings when compiling with W=1. Signed-off-by: Benjamin Gaignard Signed-off-by: Rafael J. Wysocki commit 32014c86d4e1639b430d1f833f0848b99638ca39 Author: Benjamin Gaignard Date: Mon Jan 20 14:24:08 2020 +0100 cpuidle: coupled: fix warnings when compiling with W=1 Fix warnings that show up when compiling with W=1 Signed-off-by: Benjamin Gaignard Signed-off-by: Rafael J. Wysocki commit 786c87cd312ad2ec774bc4606834b06844dada6c Author: yu kuai Date: Mon Jan 20 09:23:31 2020 +0800 PNP: isapnp: remove defined but not used function 'isapnp_checksum' Fix gcc '-Wunused-function' warnning: drivers/pnp/isapnp/core.c:752:29: warning: 'isapnp_checksum' defined but not used [-Wunused-function] 752 | static unsigned char __init isapnp_checksum(unsigned char *data) Commit 04c589f35bc5 ("PNP: isapnp: remove set but not used variable 'checksum'") removes the last caller of the function. It is never used and so can be removed. Fixes: 04c589f35bc5 ("PNP: isapnp: remove set but not used variable 'checksum'") Signed-off-by: yu kuai Signed-off-by: Rafael J. Wysocki commit 61ff410faefc97866ba0fd86113d072b1e2acc9d Merge: d7ca2d19c751 b20414252068 Author: Dave Airlie Date: Mon Jan 20 14:16:32 2020 +1000 Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next vmwgfx updates + new logging uapi https://patchwork.freedesktop.org/patch/349809/ is appropriate userpsace patch. Signed-off-by: Dave Airlie From: =?UTF-8?q?Thomas=20Hellstr=C3=B6m=20=28VMware=29?= Link: https://patchwork.freedesktop.org/patch/msgid/20200116092934.5276-1-thomas_os@shipmail.org commit ee8642162a9edd40daafd3fb894e3fd3f909e361 Author: Chen Zhou Date: Thu Jan 16 20:50:10 2020 +0800 drm/nouveau: fix build error without CONFIG_IOMMU_API If CONFIG_IOMMU_API is n, build fails: vers/gpu/drm/nouveau/nvkm/subdev/ltc/gp10b.c:37:9: error: implicit declaration of function dev_iommu_fwspec_get; did you mean iommu_fwspec_free? [-Werror=implicit-function-declaration] spec = dev_iommu_fwspec_get(device->dev); ^~~~~~~~~~~~~~~~~~~~ iommu_fwspec_free drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp10b.c:37:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion] spec = dev_iommu_fwspec_get(device->dev); ^ drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gp10b.c:39:17: error: struct iommu_fwspec has no member named ids u32 sid = spec->ids[0] & 0xffff; Seletc IOMMU_API under config DRM_NOUVEAU to fix this. Reported-by: Hulk Robot Signed-off-by: Chen Zhou Signed-off-by: Ben Skeggs commit 67d52f0f1379e93d1052c459b5e56ad50e98e74d Author: YueHaibing Date: Fri Jan 17 10:01:02 2020 +0800 drm/nouveau/kms/nv04: remove set but not used variable 'width' drivers/gpu/drm/nouveau/dispnv04/arb.c: In function nv04_calc_arb: drivers/gpu/drm/nouveau/dispnv04/arb.c:56:21: warning: variable width set but not used [-Wunused-but-set-variable] 'width' is never used, so remove it. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Ben Skeggs commit 39496368ba96b40b1dca07315418e473998eef15 Author: YueHaibing Date: Fri Jan 17 11:36:42 2020 +0800 drm/nouveau/kms/nv50: remove set but not unused variable 'nv_connector' drivers/gpu/drm/nouveau/dispnv50/disp.c: In function nv50_pior_enable: drivers/gpu/drm/nouveau/dispnv50/disp.c:1672:28: warning: variable nv_connector set but not used [-Wunused-but-set-variable] commit ac2d9275f371 ("drm/nouveau/kms/nv50-: Store the bpc we're using in nv50_head_atom") left behind this. Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: Lyude Paul Signed-off-by: Ben Skeggs commit 35e4909b6a2b4005ced3c4238da60d926b78fdea Author: Ben Skeggs Date: Thu Jan 23 08:23:06 2020 +1000 drm/nouveau/mmu: fix comptag memory leak Signed-off-by: Ben Skeggs commit 90e2e96ea37745ae18a1ff7b322e3321731828e4 Author: Thierry Reding Date: Wed Jan 15 15:07:56 2020 +0100 drm/nouveau/gr/gp10b: Use gp100_grctx and gp100_gr_zbc gp10b doesn't have all the registers that gp102_gr_zbc wants to access, which causes IBUS MMIO faults to occur. Avoid this by using the gp100 variants of grctx and gr_zbc. Signed-off-by: Thierry Reding Signed-off-by: Ben Skeggs commit 89b34254bb61d0ad5c701413572cf3d993c9bff8 Author: Thierry Reding Date: Wed Jan 15 15:06:13 2020 +0100 drm/nouveau/pmu/gm20b,gp10b: Fix Falcon bootstrapping The low-level Falcon bootstrapping callbacks are expected to return 0 on success or a negative error code on failure. However, the implementation on Tegra returns the ID or mask of the Falcons that were bootstrapped on success, thus breaking the calling code, which treats this as failure. Fix this by making sure we only return 0 or a negative error code, just like the code for discrete GPUs does. Fixes: 86ce2a71539c ("drm/nouveau/flcn/cmdq: move command generation to subdevs") Signed-off-by: Thierry Reding Signed-off-by: Ben Skeggs commit edc440e3d27fb31e6f9663cf413fad97d714c060 Author: Daniel Rosenberg Date: Mon Jan 20 14:32:01 2020 -0800 fscrypt: improve format of no-key names When an encrypted directory is listed without the key, the filesystem must show "no-key names" that uniquely identify directory entries, are at most 255 (NAME_MAX) bytes long, and don't contain '/' or '\0'. Currently, for short names the no-key name is the base64 encoding of the ciphertext filename, while for long names it's the base64 encoding of the ciphertext filename's dirhash and second-to-last 16-byte block. This format has the following problems: - Since it doesn't always include the dirhash, it's incompatible with directories that will use a secret-keyed dirhash over the plaintext filenames. In this case, the dirhash won't be computable from the ciphertext name without the key, so it instead must be retrieved from the directory entry and always included in the no-key name. Casefolded encrypted directories will use this type of dirhash. - It's ambiguous: it's possible to craft two filenames that map to the same no-key name, since the method used to abbreviate long filenames doesn't use a proper cryptographic hash function. Solve both these problems by switching to a new no-key name format that is the base64 encoding of a variable-length structure that contains the dirhash, up to 149 bytes of the ciphertext filename, and (if any bytes remain) the SHA-256 of the remaining bytes of the ciphertext filename. This ensures that each no-key name contains everything needed to find the directory entry again, contains only legal characters, doesn't exceed NAME_MAX, is unambiguous unless there's a SHA-256 collision, and that we only take the performance hit of SHA-256 on very long filenames. Note: this change does *not* address the existing issue where users can modify the 'dirhash' part of a no-key name and the filesystem may still accept the name. Signed-off-by: Daniel Rosenberg [EB: improved comments and commit message, fixed checking return value of base64_decode(), check for SHA-256 error, continue to set disk_name for short names to keep matching simpler, and many other cleanups] Link: https://lore.kernel.org/r/20200120223201.241390-7-ebiggers@kernel.org Signed-off-by: Eric Biggers commit aec992aab890b2dece2c5c95dbd6953aeecd45cb Author: Eric Biggers Date: Mon Jan 20 14:32:00 2020 -0800 ubifs: allow both hash and disk name to be provided in no-key names In order to support a new dirhash method that is a secret-keyed hash over the plaintext filenames (which will be used by encrypted+casefolded directories on ext4 and f2fs), fscrypt will be switching to a new no-key name format that always encodes the dirhash in the name. UBIFS isn't happy with this because it has assertions that verify that either the hash or the disk name is provided, not both. Change it to use the disk name if one is provided, even if a hash is available too; else use the hash. Link: https://lore.kernel.org/r/20200120223201.241390-6-ebiggers@kernel.org Signed-off-by: Eric Biggers commit f0d07a98a070bb5e443df19c3aa55693cbca9341 Author: Eric Biggers Date: Mon Jan 20 14:31:59 2020 -0800 ubifs: don't trigger assertion on invalid no-key filename If userspace provides an invalid fscrypt no-key filename which encodes a hash value with any of the UBIFS node type bits set (i.e. the high 3 bits), gracefully report ENOENT rather than triggering ubifs_assert(). Test case with kvm-xfstests shell: . fs/ubifs/config . ~/xfstests/common/encrypt dev=$(__blkdev_to_ubi_volume /dev/vdc) ubiupdatevol $dev -t mount $dev /mnt -t ubifs mkdir /mnt/edir xfs_io -c set_encpolicy /mnt/edir rm /mnt/edir/_,,,,,DAAAAAAAAAAAAAAAAAAAAAAAAAA With the bug, the following assertion fails on the 'rm' command: [ 19.066048] UBIFS error (ubi0:0 pid 379): ubifs_assert_failed: UBIFS assert failed: !(hash & ~UBIFS_S_KEY_HASH_MASK), in fs/ubifs/key.h:170 Fixes: f4f61d2cc6d8 ("ubifs: Implement encrypted filenames") Cc: # v4.10+ Link: https://lore.kernel.org/r/20200120223201.241390-5-ebiggers@kernel.org Signed-off-by: Eric Biggers commit f592efe735a29c764e0d473307dab0f59665f02b Author: Eric Biggers Date: Mon Jan 20 14:31:58 2020 -0800 fscrypt: clarify what is meant by a per-file key Now that there's sometimes a second type of per-file key (the dirhash key), clarify some function names, macros, and documentation that specifically deal with per-file *encryption* keys. Link: https://lore.kernel.org/r/20200120223201.241390-4-ebiggers@kernel.org Reviewed-by: Daniel Rosenberg Signed-off-by: Eric Biggers commit aa408f835d025a839033988d3f5a2866314414ef Author: Daniel Rosenberg Date: Mon Jan 20 14:31:57 2020 -0800 fscrypt: derive dirhash key for casefolded directories When we allow indexed directories to use both encryption and casefolding, for the dirhash we can't just hash the ciphertext filenames that are stored on-disk (as is done currently) because the dirhash must be case insensitive, but the stored names are case-preserving. Nor can we hash the plaintext names with an unkeyed hash (or a hash keyed with a value stored on-disk like ext4's s_hash_seed), since that would leak information about the names that encryption is meant to protect. Instead, if we can accept a dirhash that's only computable when the fscrypt key is available, we can hash the plaintext names with a keyed hash using a secret key derived from the directory's fscrypt master key. We'll use SipHash-2-4 for this purpose. Prepare for this by deriving a SipHash key for each casefolded encrypted directory. Make sure to handle deriving the key not only when setting up the directory's fscrypt_info, but also in the case where the casefold flag is enabled after the fscrypt_info was already set up. (We could just always derive the key regardless of casefolding, but that would introduce unnecessary overhead for people not using casefolding.) Signed-off-by: Daniel Rosenberg [EB: improved commit message, updated fscrypt.rst, squashed with change that avoids unnecessarily deriving the key, and many other cleanups] Link: https://lore.kernel.org/r/20200120223201.241390-3-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 6e1918cfb263acacd3fc9239127732b69de64695 Author: Daniel Rosenberg Date: Mon Jan 20 14:31:56 2020 -0800 fscrypt: don't allow v1 policies with casefolding Casefolded encrypted directories will use a new dirhash method that requires a secret key. If the directory uses a v2 encryption policy, it's easy to derive this key from the master key using HKDF. However, v1 encryption policies don't provide a way to derive additional keys. Therefore, don't allow casefolding on directories that use a v1 policy. Specifically, make it so that trying to enable casefolding on a directory that has a v1 policy fails, trying to set a v1 policy on a casefolded directory fails, and trying to open a casefolded directory that has a v1 policy (if one somehow exists on-disk) fails. Signed-off-by: Daniel Rosenberg [EB: improved commit message, updated fscrypt.rst, and other cleanups] Link: https://lore.kernel.org/r/20200120223201.241390-2-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 1b3b827ee5230a73c8ed1b2cd8d53b4bd001268b Author: Eric Biggers Date: Sun Jan 19 23:17:36 2020 -0800 fscrypt: add "fscrypt_" prefix to fname_encrypt() fname_encrypt() is a global function, due to being used in both fname.c and hooks.c. So it should be prefixed with "fscrypt_", like all the other global functions in fs/crypto/. Link: https://lore.kernel.org/r/20200120071736.45915-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 13a10da94615d81087e718517794f2868a8b3fab Author: Eric Biggers Date: Sun Jan 19 22:07:32 2020 -0800 fscrypt: don't print name of busy file when removing key When an encryption key can't be fully removed due to file(s) protected by it still being in-use, we shouldn't really print the path to one of these files to the kernel log, since parts of this path are likely to be encrypted on-disk, and (depending on how the system is set up) the confidentiality of this path might be lost by printing it to the log. This is a trade-off: a single file path often doesn't matter at all, especially if it's a directory; the kernel log might still be protected in some way; and I had originally hoped that any "inode(s) still busy" bugs (which are security weaknesses in their own right) would be quickly fixed and that to do so it would be super helpful to always know the file path and not have to run 'find dir -inum $inum' after the fact. But in practice, these bugs can be hard to fix (e.g. due to asynchronous process killing that is difficult to eliminate, for performance reasons), and also not tied to specific files, so knowing a file path doesn't necessarily help. So to be safe, for now let's just show the inode number, not the path. If someone really wants to know a path they can use 'find -inum'. Fixes: b1c0ec3599f4 ("fscrypt: add FS_IOC_REMOVE_ENCRYPTION_KEY ioctl") Cc: # v5.4+ Link: https://lore.kernel.org/r/20200120060732.390362-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 1b2fd38de9fcc73d6994f8f6c7c23ee3435b6a12 Merge: 2a67a6ccb01f 7805fe843964 Author: Daniel Borkmann Date: Wed Jan 22 23:04:53 2020 +0100 Merge branch 'bpf-dynamic-relinking' Alexei Starovoitov says: ==================== The last few month BPF community has been discussing an approach to call chaining, since exiting bpt_tail_call() mechanism used in production XDP programs has plenty of downsides. The outcome of these discussion was a conclusion to implement dynamic re-linking of BPF programs. Where rootlet XDP program attached to a netdevice can programmatically define a policy of execution of other XDP programs. Such rootlet would be compiled as normal XDP program and provide a number of placeholder global functions which later can be replaced with future XDP programs. BPF trampoline, function by function verification were building blocks towards that goal. The patch 1 is a final building block. It introduces dynamic program extensions. A number of improvements like more flexible function by function verification and better libbpf api will be implemented in future patches. v1->v2: - addressed Andrii's comments - rebase ==================== Signed-off-by: Daniel Borkmann commit 7805fe843964f81f98592bf580b9cd736ac4ad4c Author: Alexei Starovoitov Date: Mon Jan 20 16:53:48 2020 -0800 selftests/bpf: Add tests for program extensions Add program extension tests that build on top of fexit_bpf2bpf tests. Replace three global functions in previously loaded test_pkt_access.c program with three new implementations: int get_skb_len(struct __sk_buff *skb); int get_constant(long val); int get_skb_ifindex(int val, struct __sk_buff *skb, int var); New function return the same results as original only if arguments match. new_get_skb_ifindex() demonstrates that 'skb' argument doesn't have to be first and only argument of BPF program. All normal skb based accesses are available. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Andrii Nakryiko Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20200121005348.2769920-4-ast@kernel.org commit 2db6eab18b9778d55f48c804f8efebd7097e7958 Author: Alexei Starovoitov Date: Mon Jan 20 16:53:47 2020 -0800 libbpf: Add support for program extensions Add minimal support for program extensions. bpf_object_open_opts() needs to be called with attach_prog_fd = target_prog_fd and BPF program extension needs to have in .c file section definition like SEC("freplace/func_to_be_replaced"). libbpf will search for "func_to_be_replaced" in the target_prog_fd's BTF and will pass it in attach_btf_id to the kernel. This approach works for tests, but more compex use case may need to request function name (and attach_btf_id that kernel sees) to be more dynamic. Such API will be added in future patches. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Andrii Nakryiko Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20200121005348.2769920-3-ast@kernel.org commit be8704ff07d2374bcc5c675526f95e70c6459683 Author: Alexei Starovoitov Date: Mon Jan 20 16:53:46 2020 -0800 bpf: Introduce dynamic program extensions Introduce dynamic program extensions. The users can load additional BPF functions and replace global functions in previously loaded BPF programs while these programs are executing. Global functions are verified individually by the verifier based on their types only. Hence the global function in the new program which types match older function can safely replace that corresponding function. This new function/program is called 'an extension' of old program. At load time the verifier uses (attach_prog_fd, attach_btf_id) pair to identify the function to be replaced. The BPF program type is derived from the target program into extension program. Technically bpf_verifier_ops is copied from target program. The BPF_PROG_TYPE_EXT program type is a placeholder. It has empty verifier_ops. The extension program can call the same bpf helper functions as target program. Single BPF_PROG_TYPE_EXT type is used to extend XDP, SKB and all other program types. The verifier allows only one level of replacement. Meaning that the extension program cannot recursively extend an extension. That also means that the maximum stack size is increasing from 512 to 1024 bytes and maximum function nesting level from 8 to 16. The programs don't always consume that much. The stack usage is determined by the number of on-stack variables used by the program. The verifier could have enforced 512 limit for combined original plus extension program, but it makes for difficult user experience. The main use case for extensions is to provide generic mechanism to plug external programs into policy program or function call chaining. BPF trampoline is used to track both fentry/fexit and program extensions because both are using the same nop slot at the beginning of every BPF function. Attaching fentry/fexit to a function that was replaced is not allowed. The opposite is true as well. Replacing a function that currently being analyzed with fentry/fexit is not allowed. The executable page allocated by BPF trampoline is not used by program extensions. This inefficiency will be optimized in future patches. Function by function verification of global function supports scalars and pointer to context only. Hence program extensions are supported for such class of global functions only. In the future the verifier will be extended with support to pointers to structures, arrays with sizes, etc. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Andrii Nakryiko Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20200121005348.2769920-2-ast@kernel.org commit d478667253f988dbd6215734a11e35f6953b540d Author: Wenjing Liu Date: Mon Jan 13 17:05:42 2020 -0500 drm/amd/display: use odm combine for YCbCr420 timing with h_active greater than 4096 [why] FMT has limitation to support YCbCr420 with h_active greater than 4096. [how] Use odm combine to overcome the limitation. Signed-off-by: Wenjing Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 09f6dd6e6d4305cf199443bb7d099f4f64dc374b Author: Lewis Huang Date: Tue Jan 14 11:08:34 2020 +0800 drm/amd/display: init hw i2c speed [Why] Driver didn't init hw i2c speed cause hdcp hw cannot send command, because the default value of speed register is 0x2. [How] Restore the default speed when release i2c engine Signed-off-by: Lewis Huang Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 947daab2a2d1813a8d973c59551545e44bdf1549 Author: Isabel Zhang Date: Thu Jan 9 12:05:21 2020 -0500 drm/amd/display: changed max_downscale_src_width to 4096. [Why] MPO isn't enabled on some 4k videos due to video source width is 4096 and the current limit is 3840. [How] Changed the limit to 4096. Signed-off-by: Isabel Zhang Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 23bc5f3404de2e8b3adaedf33507409fda6f5528 Author: Wenjing Liu Date: Wed Jan 8 16:59:23 2020 -0500 drm/amd/display: support VSC SDP update on video test pattern request [why] MSA will be deprecated in the future. Need to support VSC during DP test automation. [how] Do not disable VSC during DP test automation. TODO - need to add VSC update on DM side on test request. Signed-off-by: Wenjing Liu Reviewed-by: Nikola Cornij Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit e5f0b5214beea71bd25584da451897300742795e Author: Nicholas Kazlauskas Date: Mon Jan 13 09:00:46 2020 -0500 drm/amd/display: Check hw_init state when determining if DMCUB is initialized [Why] CW2 may already be programmed when coming back from S4. In this case we want to unconditionally replace whatever DMCUB version is currently enabled with the latest. [How] Check the hw_init flag to know whether or not we've previously executed the initliazed routine. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit a7da96fbccc682a67bcc15f3461cdd60a622ffaf Author: Nicholas Kazlauskas Date: Mon Jan 13 08:58:00 2020 -0500 drm/amd/display: Reset inbox rptr/wptr when resetting DMCUB [Why] These logically make sense more to be set after the DMCUB has been reset rather than when we setup the inbox. [How] Move them into the reset callback. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit cc934031dc2a0be9535477dbef4b0e94c9f06ecd Author: Nicholas Kazlauskas Date: Sat Jan 11 13:43:39 2020 -0500 drm/amd/display: Call ATOM_INIT instead of ATOM_ENABLE for DMCUB [Why] DMCUB command table doesn't support ATOM_ENABLE/ATOM_DISABLE anymore so we never end up calling the DCN init path in DMCUB. [How] Map ATOM_ENABLE to ATOM_INIT only for DMCUB command table offloading. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 0167da498d57dddf31eb30516d1fae0f31ddecb6 Author: Nicholas Kazlauskas Date: Thu Jan 9 14:41:22 2020 -0500 drm/amd/display: Add hardware reset interface for DMUB service [Why] We'll need this to perform a clean shutdown before unloading the driver. [How] It will call reset internally and set hw_init to false. It won't do anything if the hardware isn't initialized. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 7527791e1fbd595a294cf6e6f41999d8acf6c43f Author: Roman Li Date: Mon Jan 13 10:26:19 2020 -0500 drm/amd/display: Fix update type for multiple planes [Why] determine_update_type_for_commit() uses pointers to single instance of local variable to fill scaling/color info for all planes updates. This is a bug, that leads to incorrect update type for commit in case of multiple planes per crtc. Each plane should refer to separate scaling/color data. [How] Use arrays for plane properties. Bundle all properties into a single structure to simplify memory allocation. Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauskas Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 022205ffbb8fc48bb12c7941f07c6e19bdf11155 Author: Brandon Syu Date: Thu Jan 9 14:19:20 2020 +0800 drm/amd/display: fix rotation_angle to use enum values [Why] Hardcoded fixed values are not proper. [How] Use enum values instead of fixed numbers. Signed-off-by: Brandon Syu Reviewed-by: Eric Yang Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 2c61704bcaeed3b51dd48f97003533f40dbf3050 Author: Aric Cyr Date: Mon Jan 13 08:40:00 2020 -0500 drm/amd/display: 3.2.69 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 9eeec26a13392d6efb5215c26b5e9965ef7ac2af Author: Lewis Huang Date: Sat Jan 11 00:51:15 2020 +0800 drm/amd/display: Refine i2c frequency calculating sequence [Why] In HG mode, vbios didn't call DispController_Init to program NV1x XTAL_REF_DIV value when ASIC_INIT, but driver read XTAL_REF_DIV to calculate i2c reference frequency. it cause i2c frequency change from 100kHz to 200kHz. [How] remove get_speed function and calculate reference frequency at set_speed functiton. Signed-off-by: Lewis Huang Reviewed-by: Jun Lei Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 887ff121987d1bf56ce7c126731a396d4e29a53c Author: Anthony Koo Date: Fri Jan 10 14:44:28 2020 -0500 drm/amd/display: Refactor to remove diags specific rgam func [Why] It has duplicate code for building regamma curve [How] Remove the duplicate code and use the same function for building regamma Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Reviewed-by: Krunoslav Kovac Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 819d4b3fbfaf40b4537e80b01aef612e4140a91b Author: Jerry (Fangzhi) Zuo Date: Thu Dec 12 10:37:35 2019 -0500 drm/amd/display: Fix DML dummyinteger types mismatch [Why] The types for dummyinteger1 and dummyinteger2 are unsigned as part of the DML spec. They should not be long. [How] Make them unsigned int instead of long. Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit bb6785c1212988c76c21cd1d4647c31545231e8b Author: Nicholas Kazlauskas Date: Fri Jan 10 09:17:58 2020 -0500 drm/amd/display: Do DMCUB hw_init before DC [Why] For DMCUB enabled hardware DC has a dependency on DMCUB already being running. Command table offloading will fail on first modeset if DMCUB isn't initialized first. [How] Perform DMCUB hardware initialization before DC. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Hersen Wu Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 5ea3985098048ba6850547c816208e5c2a40bef4 Author: Haiyi Zhou Date: Thu Jan 9 11:08:33 2020 -0500 drm/amd/display: Fixed comment styling Switched to C-style comments for consistency Signed-off-by: Haiyi Zhou Reviewed-by: Reza Amini Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 14ae7665e70a982b3653f2aa024251d69d89f81c Author: Paul Hsieh Date: Thu Jan 9 15:11:06 2020 +0800 drm/amd/display: check pipe_ctx is split pipe or not [Why] Driver use pipe_ctx to reallocate payload may cause allocate payload twice on same sink with split pipe. [How] Drvier must to check pipe_ctx is split pipe or not to avoid reallocate payload twice on same sink. Signed-off-by: Paul Hsieh Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 830821a64db63026a8b7414b2b539f262821ad23 Author: Nicholas Kazlauskas Date: Mon Jan 6 13:21:48 2020 -0500 drm/amd/display: Fallback to DMCUB when command table is missing [Why] If the command table isn't available then we can fallback to DMCUB offloading if it's enabled and available. [How] Instead of assigning NULL for supported command table functions we can fallback to the DMCUB when it's available. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Wesley Chalmers Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 153ca760219277997e2c3146ae9a15c979c50520 Author: Nicholas Kazlauskas Date: Mon Jan 6 10:29:13 2020 -0500 drm/amd/display: Get fb base and fb offset for DMUB from registers [Why] Under some hardware initialization sequences the fb base/fb offset provided can be zero or hardwareinit can happen too late. We want to ensure that we always have the correct fb_base/fb_offset when performing DMCUB hardware initialization so we can do DMCUB command table offloading during first dc hardware init. [How] Read from the DCN registers. VBIOS already filled these in for us. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Wesley Chalmers Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 07d4f905329438b8e4daf7f58f5afea7d781a9b2 Author: Wenjing Liu Date: Tue Jan 7 16:33:32 2020 -0500 drm/amd/display: Add debug option to disable DSC support [how] Empty dsc enc caps when debug option is set to disable DSC. Signed-off-by: Wenjing Liu Reviewed-by: Nikola Cornij Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 50d2c6027ef4d09d7c2a9d12b2a7957576c0fa3c Author: Sung Lee Date: Fri Jan 3 14:03:52 2020 -0500 drm/amd/display: Do not send training pattern if VS Different [Why] The DP 1.4a Spec requires that training pattern only under certain specific conditions. Currently driver will re-send training pattern every time voltage swing value changes, but that should not be the case. [How] Do not re-send training pattern every time VS values are different. Only send it on the first iteration. Signed-off-by: Sung Lee Reviewed-by: Tony Cheng Acked-by: Abdoulaye Berthe Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 43563bc2e6a769502d23f4ec9cd590e4636cf0ea Author: Wenjing Liu Date: Mon Dec 23 16:02:13 2019 -0500 drm/amd/display: update MSA and VSC SDP on video test pattern request [why] On video test pattern request we need to update MSA and VSC so it will match the requested test pattern dynamic range field. [how] Update dynamic range field in MSA and disable VSC as updating VSC info packet is complicated and not required for test pattern purpose. Signed-off-by: Wenjing Liu Reviewed-by: Nikola Cornij Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 63e3ab9a8226c0271e823f32fc1c3de67d142c78 Author: Nirmoy Das Date: Tue Jan 21 13:29:20 2020 +0100 drm/amdgpu: individualize fence allocation per entity Allocate fences for each entity and remove ctx->fences reference as fences should be bound to amdgpu_ctx_entity instead amdgpu_ctx. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 7db1d560a4fab1e4668b1964e77f52cefce9e9c7 Author: Tianci.Yin Date: Mon Jan 20 17:20:10 2020 +0800 Revert "drm/amdgpu: fix modprobe failure of the secondary GPU when GDDR6 training enabled(V5)" This reverts commit 9e441478623fd913d4340654682b19f0c24e629d. The patch will be replaced with a better solution, revert it. Reviewed-by: Christian König Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 240c811ccde49ad336b23c582018c6001690f19d Author: Tianci.Yin Date: Mon Jan 20 15:08:35 2020 +0800 drm/amdgpu: fix VRAM partially encroached issue in GDDR6 memory training(V2) [why] In GDDR6 BIST training, a certain mount of bottom VRAM will be encroached by UMC, that causes problems(like GTT corrupted and page fault observed). [how] Saving the content of this bottom VRAM to system memory before training, and restoring it after training to avoid VRAM corruption. Acked-by: Christian König Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit a9d4fe2fd6529c3129ec6883b8649ea5c7eee4d3 Author: Nirmoy Das Date: Mon Jan 20 13:54:30 2020 +0100 drm/amdgpu: remove unnecessary conversion to bool Better clean that up before some automation starts to complain about it Signed-off-by: Nirmoy Das Acked-by: Christian König Signed-off-by: Alex Deucher commit 4c461d89db4f8f40509b044b0daf3ac6edf4fbd7 Author: Dennis Li Date: Thu Jan 16 13:40:52 2020 +0800 drm/amdgpu: add RAS support for the gfx block of Arcturus Implement functions to do the RAS error injection and query EDC counter. Signed-off-by: Dennis Li Reviewed-by: Guchun Chen Reviewed-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 19cf0dd4b9d2771015fc9d74ec1b0b9203cf8c5a Author: Dennis Li Date: Thu Jan 16 12:30:33 2020 +0800 drm/amdgpu: add EDC counter registers of gc for Arcturus add reg headers to gc includes v2: remove unused registers and fields in this patch set Signed-off-by: Dennis Li Reviewed-by: Guchun Chen Reviewed-by: Tao Zhou Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 504c5e72d781e48946c32bf427c665ed15d532d0 Author: Dennis Li Date: Thu Jan 16 11:25:08 2020 +0800 drm/amdgpu: abstract EDC counter clear to a separated function 1. Add IP prefix for the IP related codes. 2. Refactor the code to clear EDC counter. Signed-off-by: Dennis Li Reviewed-by: Guchun Chen Reviewed-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5e66403e4d709decacf2b53e55deb55d8f6e6982 Author: Dennis Li Date: Thu Jan 16 11:07:55 2020 +0800 drm/amdgpu: refine the security check for RAS functions To avoid calling RAS related functions when RAS feature isn't supported in hardware. Change to check supported features, instead of checking asic type. v2: reuse amdgpu_ras_is_supported function, instead of introducing a new flag for hardware ras feature. Signed-off-by: Dennis Li Reviewed-by: Guchun Chen Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 39aa0ef1638ad7722e8182331c61deae8da97105 Author: Dennis Li Date: Mon Jan 13 17:03:53 2020 +0800 drm/amdgpu: enable RAS feature for more mmhub sub-blocks of Acrturus Compared with Vg20, the size of mmhub range is changed from 2 to 8. Signed-off-by: Dennis Li Reviewed-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit f519cd13c23e8c884011295b205c1463babbf416 Author: Dennis Li Date: Mon Jan 13 16:15:38 2020 +0800 drm/amdgpu: update mmhub 9.4.1 header files for Acrturus Add mask & shift definition of MAM_D(0~3)MEM for all mmhub ranges. Signed-off-by: Dennis Li Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e3cd03603dbe0e972196f12db75b6917b4db049c Author: chen gong Date: Tue Jan 14 14:28:48 2020 +0800 drm/amdgpu: read gfx register using RREG32_KIQ macro Reading CP_MEM_SLP_CNTL register with RREG32_SOC15 macro will lead to hang when GPU is in "gfxoff" state. I do a uniform substitution here. Signed-off-by: chen gong Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher commit c68dbcd8f9b0aa01e0459a5841716cb6a2f447b9 Author: chen gong Date: Wed Jan 15 14:44:43 2020 +0800 drm/amdgpu: add kiq version interface for RREG32/WREG32 Reading some registers by mmio will result in hang when GPU is in "gfxoff" state.This problem can be solved by GPU in "ring command packages" way. Signed-off-by: chen gong Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher commit d33a99c4b63643d3d7a85d4dfb2ac5afb01eebca Author: chen gong Date: Wed Jan 15 14:32:00 2020 +0800 drm/amdgpu: provide a generic function interface for reading/writing register by KIQ Move amdgpu_virt_kiq_rreg/amdgpu_virt_kiq_wreg function to amdgpu_gfx.c, and rename them to amdgpu_kiq_rreg/amdgpu_kiq_wreg.Make it generic and flexible. Signed-off-by: chen gong Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit a6c44d2538c469f412c3fded0de2290494d762d7 Author: John Clements Date: Fri Jan 17 12:18:00 2020 +0800 drm/amdgpu: added support to get mGPU DRAM base resolves issue with RAS error injection in mGPU configuration Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 36a1707afda9abc704543d6b419a998c64df41ca Author: Alex Sierra Date: Mon Jan 13 21:27:56 2020 -0600 drm/amdgpu: modify packet size for pm4 flush tlbs [Why] PM4 packet size for flush message was oversized. [How] Packet size adjusted to allocate flush + fence packets. Signed-off-by: Alex Sierra Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 19e0663ff9bce2efb87be8b30f9e46b7843600f3 Author: Trond Myklebust Date: Mon Jan 6 13:40:37 2020 -0500 nfsd: Ensure sampling of the write verifier is atomic with the write When doing an unstable write, we need to ensure that we sample the write verifier before releasing the lock, and allowing a commit to the same file to proceed. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 524ff1af226ce0f6348d48b413849b2bd16c5b60 Author: Trond Myklebust Date: Mon Jan 6 13:40:36 2020 -0500 nfsd: Ensure sampling of the commit verifier is atomic with the commit When we have a successful commit, ensure we sample the commit verifier before releasing the lock. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 809fe3c533789ebb51c1873b80c7dafbad9dbf19 Author: Trond Myklebust Date: Mon Jan 6 13:40:35 2020 -0500 sunrpc: clean up cache entry add/remove from hashtable Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 1d82163714c16ebe09c7a8c9cd3cef7abcc16208 Author: Trond Myklebust Date: Mon Jan 6 13:40:34 2020 -0500 sunrpc: Fix potential leaks in sunrpc_cache_unhash() When we unhash the cache entry, we need to handle any pending upcalls by calling cache_fresh_unlocked(). Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 1b28d756b2eaee03e838390465754e431389e483 Author: Trond Myklebust Date: Mon Jan 6 13:40:33 2020 -0500 nfsd: Ensure exclusion between CLONE and WRITE errors Ensure that we can distinguish between synchronous CLONE and WRITE errors, and that we can assign them correctly. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit b66ae6dd0c30c750cbc5c633dea08712203abc03 Author: Trond Myklebust Date: Mon Jan 6 13:40:32 2020 -0500 nfsd: Pass the nfsd_file as arguments to nfsd4_clone_file_range() Needed in order to fix exclusion w.r.t. writes. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 7bf94c6ba9fb291bd28fac3228553cb305bfc92a Author: Trond Myklebust Date: Mon Jan 6 13:40:31 2020 -0500 nfsd: Update the boot verifier on stable writes too. We don't know if the error returned by the fsync() call is exclusive to the data written by the stable write, so play it safe. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 5011af4c698a95b4dc4e374b1ce3acd122a9170f Author: Trond Myklebust Date: Mon Jan 6 13:40:30 2020 -0500 nfsd: Fix stable writes Strictly speaking, a stable write error needs to reflect the write + the commit of that write (and only that write). To ensure that we don't pick up the write errors from other writebacks, add a rw_semaphore to provide exclusion. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 16f8f894108270fd99667f06bae6ebcdd0f4e4bf Author: Trond Myklebust Date: Mon Jan 6 13:40:29 2020 -0500 nfsd: Allow nfsd_vfs_write() to take the nfsd_file as an argument Needed in order to fix stable writes. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 90d2f1da832fd23290ef0c0d964d97501e5e8553 Author: Trond Myklebust Date: Mon Jan 6 13:20:47 2020 -0500 nfsd: Fix a soft lockup race in nfsd_file_mark_find_or_create() If nfsd_file_mark_find_or_create() keeps winning the race for the nfsd_file_fsnotify_group->mark_mutex against nfsd_file_mark_put() then it can soft lock up, since fsnotify_add_inode_mark() ends up always finding an existing entry. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit b6669305d35a3459877afef6e9f68e81bef92972 Author: Trond Myklebust Date: Mon Jan 6 13:18:08 2020 -0500 nfsd: Reduce the number of calls to nfsd_file_gc() Don't call nfsd_file_gc() on every put of the reference in nfsd_file_put(). Instead, do it only when we're expecting the refcount to go to 1. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 55f84cc47f73bdc84ef73b702c23051b426505a4 Author: Trond Myklebust Date: Mon Jan 6 13:18:07 2020 -0500 nfsd: Schedule the laundrette regularly irrespective of file errors Emsure we schedule the laundrette even if the struct file is carrying file errors. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit bd6e1cece834f1b1322c85269b93379f8092077f Author: Trond Myklebust Date: Mon Jan 6 13:18:06 2020 -0500 nfsd: Remove unused constant NFSD_FILE_LRU_RESCAN Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 9542e6a643fc69d528dfb3303f145719c61d3050 Author: Trond Myklebust Date: Mon Jan 6 13:18:05 2020 -0500 nfsd: Containerise filecache laundrette Ensure that if the filecache laundrette gets stuck, it only affects the knfsd instances of one container. The notifier callbacks can be called from various contexts so avoid using synchonous filesystem operations that might deadlock. Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 36ebbdb96b694dd9c6b25ad98f2bbd263d022b63 Author: Trond Myklebust Date: Mon Jan 6 13:18:04 2020 -0500 nfsd: cleanup nfsd_file_lru_dispose() Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 28c7d86bb6172ffbb1a1237c6388e77f9fe5f181 Author: Trond Myklebust Date: Mon Jan 6 13:18:03 2020 -0500 nfsd: fix filecache lookup If the lookup keeps finding a nfsd_file with an unhashed open file, then retry once only. Signed-off-by: Trond Myklebust Cc: stable@vger.kernel.org Fixes: 65294c1f2c5e "nfsd: add a new struct file caching facility to nfsd" Signed-off-by: J. Bruce Fields commit fc76324fa27fa4cab2cf115460d3a1d8e7e201ee Author: Olof Johansson Date: Mon Jan 6 15:20:24 2020 -0800 riscv: keep 32-bit kernel to 32-bit phys_addr_t While rv32 technically has 34-bit physical addresses, no current platforms use it and it's likely to shake out driver bugs. Let's keep 64-bit phys_addr_t off on 32-bit builds until one shows up, since other work will be needed to make such a system useful anyway. PHYS_ADDR_T_64BIT is def_bool 64BIT, so just remove the select. Signed-off-by: Olof Johansson Signed-off-by: Palmer Dabbelt commit ea01ce67326d75e243afc8b5f6d5b21322183e97 Author: Nick Hu Date: Mon Oct 28 10:41:01 2019 +0800 kasan: Add riscv to KASAN documentation. Add riscv to the KASAN documentation to mention that riscv is supporting generic kasan now. Signed-off-by: Nick Hu Signed-off-by: Palmer Dabbelt commit 8ad8b72721d0f07fa02dbe71f901743f9c71c8e6 Author: Nick Hu Date: Mon Jan 6 10:38:32 2020 -0800 riscv: Add KASAN support This patch ports the feature Kernel Address SANitizer (KASAN). Note: The start address of shadow memory is at the beginning of kernel space, which is 2^64 - (2^39 / 2) in SV39. The size of the kernel space is 2^38 bytes so the size of shadow memory should be 2^38 / 8. Thus, the shadow memory would not overlap with the fixmap area. There are currently two limitations in this port, 1. RV64 only: KASAN need large address space for extra shadow memory region. 2. KASAN can't debug the modules since the modules are allocated in VMALLOC area. We mapped the shadow memory, which corresponding to VMALLOC area, to the kasan_early_shadow_page because we don't have enough physical space for all the shadow memory corresponding to VMALLOC area. Signed-off-by: Nick Hu Reported-by: Greentime Hu Signed-off-by: Palmer Dabbelt commit 57ee58e39321ab4ac3f2949b90117786726cb216 Author: Nick Hu Date: Mon Oct 28 10:40:59 2019 +0800 kasan: No KASAN's memmove check if archs don't have it. If archs don't have memmove then the C implementation from lib/string.c is used, and then it's instrumented by compiler. So there is no need to add KASAN's memmove to manual checks. Signed-off-by: Nick Hu Acked-by: Dmitry Vyukov Acked-by: Andrey Ryabinin Signed-off-by: Palmer Dabbelt commit 86a761f81ec87a96572214f5db606f60d36aaf08 Author: Pavel Begunkov Date: Wed Jan 22 23:09:36 2020 +0300 io_uring: honor IOSQE_ASYNC for linked reqs REQ_F_FORCE_ASYNC is checked only for the head of a link. Fix it. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 1118591ab883f46df4ab614cc976bc4c8e04a464 Author: Pavel Begunkov Date: Wed Jan 22 23:09:35 2020 +0300 io_uring: prep req when do IOSQE_ASYNC Whenever IOSQE_ASYNC is set, requests will be punted to async without getting into io_issue_req() and without proper preparation done (e.g. io_req_defer_prep()). Hence they will be left uninitialised. Prepare them before punting. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 6613babaf662cfbd283fcd0abdd758e338dd181d Author: Alain Michaud Date: Wed Jan 22 19:47:44 2020 +0000 Bluetooth: fix appearance typo in mgmt.c This change addresses a typo in the set_appearance handler. Signed-off-by: Alain Michaud Signed-off-by: Marcel Holtmann commit 5c7bac9fb2c5929a3b8600c45a972aabf9f410b5 Author: Lakshmi Ramasubramanian Date: Thu Jan 16 18:18:21 2020 -0800 IMA: pre-allocate buffer to hold keyrings string ima_match_keyring() is called while holding rcu read lock. Since this function executes in atomic context, it should not call any function that can sleep (such as kstrdup()). This patch pre-allocates a buffer to hold the keyrings string read from the IMA policy and uses that to match the given keyring. Signed-off-by: Lakshmi Ramasubramanian Fixes: e9085e0ad38a ("IMA: Add support to limit measuring keys") Signed-off-by: Mimi Zohar commit 483ec26eed42bf050931d9a5c5f9f0b5f2ad5f3b Author: Janne Karhunen Date: Wed Jan 15 17:42:30 2020 +0200 ima: ima/lsm policy rule loading logic bug fixes Keep the ima policy rules around from the beginning even if they appear invalid at the time of loading, as they may become active after an lsm policy load. However, loading a custom IMA policy with unknown LSM labels is only safe after we have transitioned from the "built-in" policy rules to a custom IMA policy. Patch also fixes the rule re-use during the lsm policy reload and makes some prints a bit more human readable. Changelog: v4: - Do not allow the initial policy load refer to non-existing lsm rules. v3: - Fix too wide policy rule matching for non-initialized LSMs v2: - Fix log prints Fixes: b16942455193 ("ima: use the lsm policy update notifier") Cc: Casey Schaufler Reported-by: Mimi Zohar Signed-off-by: Janne Karhunen Signed-off-by: Konsta Karsisto Signed-off-by: Mimi Zohar commit 6beea7afcc72b86986080ea1d228a42f2000f2a9 Author: Florent Revest Date: Mon Jan 13 10:42:44 2020 +0100 ima: add the ability to query the cached hash of a given file This allows other parts of the kernel (perhaps a stacked LSM allowing system monitoring, eg. the proposed KRSI LSM [1]) to retrieve the hash of a given file from IMA if it's present in the iint cache. It's true that the existence of the hash means that it's also in the audit logs or in /sys/kernel/security/ima/ascii_runtime_measurements, but it can be difficult to pull that information out for every subsequent exec. This is especially true if a given host has been up for a long time and the file was first measured a long time ago. It should be kept in mind that this function gives access to cached entries which can be removed, for instance on security_inode_free(). This is based on Peter Moody's patch: https://sourceforge.net/p/linux-ima/mailman/message/33036180/ [1] https://lkml.org/lkml/2019/9/10/393 Signed-off-by: Florent Revest Reviewed-by: KP Singh Signed-off-by: Mimi Zohar commit 5350ceb0b7befba9f607fd4c09b1a424e117fe1c Author: Clay Chang Date: Sun Jan 5 09:18:13 2020 +0800 ima: Add a space after printing LSM rules for readability When reading ima_policy from securityfs, there is a missing space between output string of LSM rules and the remaining rules. Signed-off-by: Clay Chang Signed-off-by: Mimi Zohar commit c5d19a6ecfce72d0352191d75f03eea4748a8c45 Author: Heiner Kallweit Date: Tue Jan 21 22:05:14 2020 +0100 net: convert additional drivers to use phy_do_ioctl The first batch of driver conversions missed a few cases where we can use phy_do_ioctl too. Signed-off-by: Heiner Kallweit Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 94375f9d5103c2eb2f905381993a2fb70c297364 Author: Amir Goldstein Date: Fri Nov 15 14:12:40 2019 +0200 ovl: generalize the lower_layers[] array Rename lower_layers[] array to layers[], extend its size by one and initialize layers[0] with upper layer values. Lower layers are now addressed with index 1..numlower. layers[0] is reserved even with lower only overlay. [SzM: replace ofs->numlower with ofs->numlayer, the latter's value is incremented by one] Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit b504c6540d1752c73e16548062c49bc9f447cb12 Author: Chengguang Xu Date: Fri Nov 1 20:35:51 2019 +0800 ovl: improving copy-up efficiency for big sparse file Current copy-up is not efficient for big sparse file, It's not only slow but also wasting more disk space when the target lower file has huge hole inside. This patch tries to recognize file hole and skip it during copy-up. Detail logic of hole detection as below: When we detect next data position is larger than current position we will skip that hole, otherwise we copy data in the size of OVL_COPY_UP_CHUNK_SIZE. Actually, it may not recognize all kind of holes and sometimes only skips partial of hole area. However, it will be enough for most of the use cases. Additionally, this optimization relies on lseek(2) SEEK_DATA implementation, so for some specific filesystems which do not support this feature will behave as before on copy-up. Reviewed-by: Amir Goldstein Signed-off-by: Chengguang Xu Signed-off-by: Miklos Szeredi commit b1f9d3858f724ed45b279b689fb5b400d91352e3 Author: Amir Goldstein Date: Sat Dec 21 11:42:29 2019 +0200 ovl: use ovl_inode_lock in ovl_llseek() In ovl_llseek() we use the overlay inode rwsem to protect against concurrent modifications to real file f_pos, because we copy the overlay file f_pos to/from the real file f_pos. This caused a lockdep warning of locking order violation when the ovl_llseek() operation was called on a lower nested overlay layer while the upper layer fs sb_writers is held (with patch improving copy-up efficiency for big sparse file). Use the internal ovl_inode_lock() instead of the overlay inode rwsem in those cases. It is meant to be used for protecting against concurrent changes to overlay inode internal state changes. The locking order rules are documented to explain this case. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 1bd0a3aea4357e1dce8b3f0f889fd3fe756353e6 Author: lijiazi Date: Mon Dec 16 19:12:32 2019 +0800 ovl: use pr_fmt auto generate prefix Use pr_fmt auto generate "overlayfs: " prefix. Signed-off-by: lijiazi Signed-off-by: Miklos Szeredi commit 4c37e71b713ecffe81f8e6273c6835e54306d412 Author: Amir Goldstein Date: Sun Dec 22 22:47:54 2019 +0200 ovl: fix wrong WARN_ON() in ovl_cache_update_ino() The WARN_ON() that child entry is always on overlay st_dev became wrong when we allowed this function to update d_ino in non-samefs setup with xino enabled. It is not true in case of xino bits overflow on a non-dir inode. Leave the WARN_ON() only for directories, where assertion is still true. Fixes: adbf4f7ea834 ("ovl: consistent d_ino for non-samefs with xino") Cc: # v4.17+ Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 4942dc6638b07b5326b6d2faa142635c559e7cd5 Author: Andrew Murray Date: Fri Jan 17 13:43:24 2020 +0000 KVM: arm64: Write arch.mdcr_el2 changes since last vcpu_load on VHE On VHE systems arch.mdcr_el2 is written to mdcr_el2 at vcpu_load time to set options for self-hosted debug and the performance monitors extension. Unfortunately the value of arch.mdcr_el2 is not calculated until kvm_arm_setup_debug() in the run loop after the vcpu has been loaded. This means that the initial brief iterations of the run loop use a zero value of mdcr_el2 - until the vcpu is preempted. This also results in a delay between changes to vcpu->guest_debug taking effect. Fix this by writing to mdcr_el2 in kvm_arm_setup_debug() on VHE systems when a change to arch.mdcr_el2 has been detected. Fixes: d5a21bcc2995 ("KVM: arm64: Move common VHE/non-VHE trap config in separate functions") Cc: # 4.17.x- Suggested-by: James Morse Acked-by: Will Deacon Reviewed-by: Marc Zyngier Signed-off-by: Andrew Murray Signed-off-by: Catalin Marinas commit 0a3d5b577784e93ae1b21aff4c1f150eca25813a Author: Alexander Lobakin Date: Wed Jan 22 13:58:52 2020 +0300 Revert "MIPS: Add custom serial.h with BASE_BAUD override for generic kernel" This reverts commit c8ec2041f549e7f2dee0c34d25381be6f7805f99. There's no more need to set BASE_BAUD to 0 to make earlycon work properly on DTS-based boards since such cases were handled in commit 182ead3e418a ("earlycon: Remove hardcoded port->uartclk initialization in of_setup_earlycon"). earlycon no longer initializes port->uartclk with a value of BASE_BAUD * 16 when starting from FDT/OF. Signed-off-by: Alexander Lobakin Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Alexandre Belloni Cc: Microchip Linux Driver Support Cc: Will Deacon Cc: Greg Kroah-Hartman Cc: Masahiro Yamada Cc: Paul Walmsley Cc: Michal Simek Cc: Allison Randal Cc: Thomas Gleixner Cc: Eric W. Biederman Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 34c01e41b24785f5bdd9cb36cc4ca74518463590 Author: Alexander Lobakin Date: Wed Jan 22 13:58:51 2020 +0300 MIPS: sort MIPS and MIPS_GENERIC Kconfig selects alphabetically (again) Cycles "sort selects alphabetically -> add new options at the end or at random place -> repeat" go on and on. Please double-check when adding new options and make sure that they don't break the existing order to prevent dumb commits like this one from appearing. Signed-off-by: Alexander Lobakin Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Alexandre Belloni Cc: Microchip Linux Driver Support Cc: Will Deacon Cc: Greg Kroah-Hartman Cc: Masahiro Yamada Cc: Paul Walmsley Cc: Michal Simek Cc: Allison Randal Cc: Thomas Gleixner Cc: Eric W. Biederman Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 18d84e2e55b6abe1e5b8a658ad078796122899fb Author: Alexander Lobakin Date: Wed Jan 22 13:58:50 2020 +0300 MIPS: make CPU_HAS_LOAD_STORE_LR opt-out CPU_HAS_LOAD_STORE_LR was introduced in 932afdeec18b ("MIPS: Add Kconfig variable for CPUs with unaligned load/store instructions") to make code in kernel/unaligned.c and lib/mem{cpy,set}.S more intuitive and give a possibility to easily add new CPUs without these instruction sets in future. Hovewer, this variant is not optimal for mainly two reasons: * For now, we have 20+ CPUs with such instructions and only two (MIPS R6) without. It will obviously be more effective and straightforward to have an option for these two rather than for the rest. * You can easily miss the fact that you need to select this option when adding a new CPU, while all processors lacking these sets are well-known, so the probability of missing something is way much lower. We can address both points by turning CPU_HAS_LOAD_STORE_LR into opt-out CPU_NO_LOAD_STORE_LR. This also makes MIPS root Kconfig more clear and understandable. Signed-off-by: Alexander Lobakin Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Alexandre Belloni Cc: Microchip Linux Driver Support Cc: Will Deacon Cc: Greg Kroah-Hartman Cc: Masahiro Yamada Cc: Paul Walmsley Cc: Michal Simek Cc: Allison Randal Cc: Thomas Gleixner Cc: Eric W. Biederman Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 7de86604bbe4ecb3da0c8c40d4e4b1549e879f92 Author: Alexander Lobakin Date: Wed Jan 22 13:58:49 2020 +0300 MIPS: generic: don't unconditionally select PINCTRL CONFIG_PINCTRL was converted from hidden selectable to a visible option with commit d219b924611a ("pinctrl: change Kconfig PINCTRL variable to a menuconfig"). Remove unconditional select and enable this symbol in Ocelot config, which currently is the only user among generic boards. Signed-off-by: Alexander Lobakin Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Alexandre Belloni Cc: Microchip Linux Driver Support Cc: Will Deacon Cc: Greg Kroah-Hartman Cc: Masahiro Yamada Cc: Paul Walmsley Cc: Michal Simek Cc: Allison Randal Cc: Thomas Gleixner Cc: Eric W. Biederman Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 7c8f13790958d1cfec120a3dafc4a57be7012c9b Author: Alexander Lobakin Date: Wed Jan 22 13:58:48 2020 +0300 MIPS: don't explicitly select LIBFDT in Kconfig It gets selected anyway through USE_OF -> OF_EARLY_FLATTREE -> OF_FLATTREE -> LIBFDT, no need to double-check. Signed-off-by: Alexander Lobakin Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Alexandre Belloni Cc: Microchip Linux Driver Support Cc: Will Deacon Cc: Greg Kroah-Hartman Cc: Masahiro Yamada Cc: Paul Walmsley Cc: Michal Simek Cc: Allison Randal Cc: Thomas Gleixner Cc: Eric W. Biederman Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 0956be29a96c1ce879b6a8fad1cc61f53c140ec8 Author: Sergey Korolev Date: Wed Jan 22 15:39:08 2020 +0300 MIPS: sync-r4k: do slave counter synchronization with disabled HW interrupts synchronise_count_slave() called with an enabled in mips_clockevent_init() timer interrupt which may decrease synchronization precision. Signed-off-by: Sergey Korolev Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: Ralf Baechle Cc: James Hogan Cc: linux-kernel@vger.kernel.org commit c0e79fd89749b0cda1c72049e2772dd2eeada86f Author: Thomas Bogendoerfer Date: Wed Jan 22 14:13:34 2020 +0100 MIPS: SGI-IP30: Check for valid pointer before using it Fix issue detected by Smatch: ./arch/mips/sgi-ip30/ip30-irq.c:236 heart_domain_free() warn: variable dereferenced before check 'irqd' (see line 235) Fixes: 7505576d1c1a ("MIPS: add support for SGI Octane (IP30)") Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: # v5.5+ commit 273db8f03509619cd570a4b1225b399f8fb4b0b7 Author: Thomas Bogendoerfer Date: Wed Jan 22 09:59:24 2020 -0800 Input: add IOC3 serio driver This patch adds a platform driver for supporting keyboard and mouse interface of SGI IOC3 chips. Signed-off-by: Thomas Bogendoerfer Link: https://lore.kernel.org/r/20200122135220.22354-1-tbogendoerfer@suse.de Signed-off-by: Dmitry Torokhov commit 554d21efb0d2e102a14f8c4b6bdfbcfbe54b3c65 Author: Wen Yang Date: Mon Jan 20 18:04:43 2020 +0800 block, bfq: improve arithmetic division in bfq_delta() do_div() does a 64-by-32 division. Use div64_ul() instead of it if the divisor is unsigned long, to avoid truncation to 32-bit. And as a nice side effect also cleans up the function a bit. Signed-off-by: Wen Yang Cc: Paolo Valente Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Jens Axboe commit 7e053d3e820bedd7ea4dad598d40bfc7639428c6 Author: Alex Shi Date: Tue Jan 21 16:48:49 2020 +0800 ata/acard_ahci: remove unused variable n_elem No one care the varible acard_ahci in func acard_ahci_qc_prep. better to remove it. Signed-off-by: Alex Shi Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Jens Axboe commit ffa302efe84ed8aa84aaf061ec4448036880b934 Author: Chen Zhou Date: Tue Jan 21 09:28:27 2020 +0800 ata: pata_macio: fix comparing pointer to 0 Fixes coccicheck warning: ./drivers/ata/pata_macio.c:982:31-32: WARNING comparing pointer to 0, suggest !E Compare pointer-typed values to NULL rather than 0. Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Chen Zhou Signed-off-by: Jens Axboe commit b7f22d993f51c64d79b7fd7ad2c060e3fdc006c0 Author: Alex Shi Date: Tue Jan 21 16:48:54 2020 +0800 block/bfq: remove unused bfq_class_rt which never used This macro is never used after introduced from commit aee69d78dec0 ("block, bfq: introduce the BFQ-v0 I/O scheduler as an extra scheduler") Better to remove it. Signed-off-by: Alex Shi Cc: Paolo Valente Cc: Jens Axboe Cc: linux-block@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Jens Axboe commit ef7d84caa5928b40b1c93a26dbe5a3f12737c6ab Author: Peter Große Date: Wed Jan 22 19:01:06 2020 +0100 ALSA: hda - Add docking station support for Lenovo Thinkpad T420s Lenovo Thinkpad T420s uses the same codec as T420, so apply the same quirk to enable audio output on a docking station. Signed-off-by: Peter Große Link: https://lore.kernel.org/r/20200122180106.9351-1-pegro@friiks.de Signed-off-by: Takashi Iwai commit 2a67a6ccb01f21b854715d86ff6432a18b97adb3 Author: Chris Down Date: Wed Jan 22 00:01:10 2020 +0000 bpf, btf: Always output invariant hit in pahole DWARF to BTF transform When trying to compile with CONFIG_DEBUG_INFO_BTF enabled, I got this error: % make -s Failed to generate BTF for vmlinux Try to disable CONFIG_DEBUG_INFO_BTF make[3]: *** [vmlinux] Error 1 Compiling again without -s shows the true error (that pahole is missing), but since this is fatal, we should show the error unconditionally on stderr as well, not silence it using the `info` function. With this patch: % make -s BTF: .tmp_vmlinux.btf: pahole (pahole) is not available Failed to generate BTF for vmlinux Try to disable CONFIG_DEBUG_INFO_BTF make[3]: *** [vmlinux] Error 1 Signed-off-by: Chris Down Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200122000110.GA310073@chrisdown.name commit cf85e7c7f437cb4e378bddbdb366477096714819 Author: Mika Westerberg Date: Wed Jan 22 19:46:19 2020 +0300 platform/x86: intel_pmc_ipc: Switch to use driver->dev_groups The driver core provides support for adding additional attributes for devices via new ->dev_groups member of struct device_driver. Convert the driver to use that instead of adding the attributes manually. Suggested-by: Andy Shevchenko Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit fc07ac64499702ca217e857e3ef924f30e0506bd Author: Mika Westerberg Date: Wed Jan 22 19:46:18 2020 +0300 platform/x86: intel_pmc_ipc: Propagate error from kstrtoul() kstrtoul() already returns negative error if the input was not valid so return it directly. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit 1e3872ccda65b6a2ae81ed19f746115d6fbfe562 Author: Mika Westerberg Date: Wed Jan 22 19:46:17 2020 +0300 platform/x86: intel_pmc_ipc: Use octal permissions in sysfs attributes This is the current preferred way so replace the S_IWUSR with the corresponding octal value. While there move the attributes to follow directly their store functions. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit 63d91d815ddd7ccd7ea8ec61f8f313d00c05eecf Author: Mika Westerberg Date: Wed Jan 22 19:46:16 2020 +0300 platform/x86: intel_pmc_ipc: Get rid of unnecessary includes There is no point including headers that are not needed in the driver so drop them. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit 09874a3acdc7dc560594a77933e8ca672b442cdb Author: Mika Westerberg Date: Wed Jan 22 19:46:15 2020 +0300 platform/x86: intel_pmc_ipc: Drop ipc_data_readb() This function is not used anywhere so drop it completely. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit a97368b314efc7ea4b88c881de6c2bd22d9a08cd Author: Mika Westerberg Date: Wed Jan 22 19:46:14 2020 +0300 platform/x86: intel_pmc_ipc: Drop intel_pmc_gcr_read() and intel_pmc_gcr_write() These functions are not used anywhere so drop them completely. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit f827e5300da460f55673b0b7f1d3cd8434b6d64c Author: Mika Westerberg Date: Wed Jan 22 19:46:13 2020 +0300 platform/x86: intel_pmc_ipc: Make intel_pmc_ipc_raw_cmd() static This function is not called outside of intel_pmc_ipc.c so we can make it static instead. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit 3f751ba58499b4aa535319d32a3a310e5d9c74fd Author: Mika Westerberg Date: Wed Jan 22 19:46:12 2020 +0300 platform/x86: intel_pmc_ipc: Make intel_pmc_ipc_simple_command() static This function is not called outside of intel_pmc_ipc.c so we can make it static instead. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit e1f461631123fa808ff1d1fca5f39cee21085143 Author: Mika Westerberg Date: Wed Jan 22 19:46:11 2020 +0300 platform/x86: intel_pmc_ipc: Make intel_pmc_gcr_update() static This function is not called outside of intel_pmc_ipc.c so we can make it static instead. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit 8b236565600833a6bd7bc76b3aacb101ac720313 Author: Mika Westerberg Date: Wed Jan 22 19:28:13 2020 +0300 platform/x86: intel_scu_ipc: Reformat kernel-doc comments of exported functions Format kernel-doc comments of the exported functions to follow the typical format that does not have tab indentation. Also capitalize parameter descriptions and add a missing period. No functional changes intended. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit 4907898873a0c7eebbf01c66c7541800c8e7cbe4 Author: Mika Westerberg Date: Wed Jan 22 19:28:12 2020 +0300 platform/x86: intel_scu_ipc: Drop intel_scu_ipc_raw_command() There is no user for this function so we can drop it from the driver. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit b7380a16268975443f394a3213f2ab6bb48ae940 Author: Mika Westerberg Date: Wed Jan 22 19:28:11 2020 +0300 platform/x86: intel_scu_ipc: Drop intel_scu_ipc_io[read|write][8|16]() There are no users for these so we can remove them. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit 59aa78e325d890ddbd2aa6f3522704621c1a6d0f Author: Mika Westerberg Date: Wed Jan 22 19:28:10 2020 +0300 platform/x86: intel_scu_ipc: Drop unused macros These macros are not used anywhere in the driver so drop them. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit a5f04a2e5e3324ba1ebab7e3a0315682fb54b127 Author: Mika Westerberg Date: Wed Jan 22 19:28:09 2020 +0300 platform/x86: intel_scu_ipc: Drop unused prototype intel_scu_ipc_fw_update() There is no implementation for that anymore so drop the prototype. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit e7b7ab3847c9e727e14ba724024506beb156993c Author: Mika Westerberg Date: Wed Jan 22 19:28:08 2020 +0300 platform/x86: intel_scu_ipc: Sleeping is fine when polling There is no reason why the driver would need to block other threads from running the CPU while it is waiting for the SCU IPC to complete its work. For this reason switch the driver to use usleep_range() instead with a bit more relaxed polling loop. Also add constant for the timeout and use the same value for both polling and interrupt modes. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit 74e9748b9b218e7863711b8c0dffb181154e4a23 Author: Mika Westerberg Date: Wed Jan 22 19:28:07 2020 +0300 platform/x86: intel_scu_ipc: Drop intel_scu_ipc_i2c_cntrl() There are no existing users for this functionality so drop it from the driver completely. This also means we don't need to keep the struct intel_scu_ipc_pdata_t around anymore so remove that as well. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit b47018a778c1a18cbc98b4a11936dec4f8c4bb7b Author: Mika Westerberg Date: Wed Jan 22 19:28:06 2020 +0300 platform/x86: intel_scu_ipc: Remove Lincroft support Moorestown support was removed years ago with by the commit 1a8359e411eb ("x86/mid: Remove Intel Moorestown"). Lincroft is the CPU side chip of Moorestown and not supported anymore so remove the code from the driver. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit 19e2d350aeaa5aac4b5cfc121d596ec205a9c530 Author: Mika Westerberg Date: Wed Jan 22 19:28:05 2020 +0300 platform/x86: intel_scu_ipc: Add constants for register offsets This makes the code more readable. These are taken from intel_pmc_ipc.c which implements the same thing. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit e48b72a568bbd641c91dad354138d3c17d03ee6f Author: Mika Westerberg Date: Wed Jan 22 19:28:04 2020 +0300 platform/x86: intel_scu_ipc: Fix interrupt support Currently the driver has disabled interrupt support for Tangier but actually interrupt works just fine if the command is not written twice in a row. Also we need to ack the interrupt in the handler. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Cc: stable@vger.kernel.org Signed-off-by: Andy Shevchenko commit 298ef70f3ae5f00eda1f8f6d388c06151ce0b4d0 Author: Mika Westerberg Date: Wed Jan 22 19:18:43 2020 +0300 platform/x86: intel_scu_ipcutil: Remove default y from Kconfig This driver is by no means essential for system to boot up so remove default y from it. Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit 5e0c94d3aeeecc68c573033f08d9678fecf253bd Author: Mika Westerberg Date: Wed Jan 22 19:05:20 2020 +0300 platform/x86: intel_mid_powerbtn: Take a copy of ddata The driver gets driver_data from memory that is marked as const (which is probably put to read-only memory) and it then modifies it. This likely causes some sort of fault to happen. Fix this by taking a copy of the structure. Fixes: c94a8ff14de3 ("platform/x86: intel_mid_powerbtn: make mid_pb_ddata const") Signed-off-by: Mika Westerberg Reviewed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit 1222653cc0489fa9304a36f7d9593ecaeb51efe1 Author: Daniel Díaz Date: Wed Jan 22 17:44:24 2020 +0100 selftests/bpf: Build urandom_read with LDFLAGS and LDLIBS During cross-compilation, it was discovered that LDFLAGS and LDLIBS were not being used while building binaries, leading to defaults which were not necessarily correct. OpenEmbedded reported this kind of problem: ERROR: QA Issue: No GNU_HASH in the ELF binary [...], didn't pass LDFLAGS? Signed-off-by: Daniel Díaz Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: John Fastabend commit bdf2aca703e83eeecac2b492494687d5009a694e Author: Alain Michaud Date: Wed Jan 22 16:09:16 2020 +0000 Bluetooth: adding missing const decoration to mgmt_status_table This change simply adds a missing const decoration to the mtmt_status_table definition. Signed-off-by: Alain Michaud Signed-off-by: Marcel Holtmann commit 11ea68f553e244851d15793a7fa33a97c46d8271 Author: Ming Lei Date: Mon Jan 20 17:16:25 2020 +0800 genirq, sched/isolation: Isolate from handling managed interrupts The affinity of managed interrupts is completely handled in the kernel and cannot be changed via the /proc/irq/* interfaces from user space. As the kernel tries to spread out interrupts evenly accross CPUs on x86 to prevent vector exhaustion, it can happen that a managed interrupt whose affinity mask contains both isolated and housekeeping CPUs is routed to an isolated CPU. As a consequence IO submitted on a housekeeping CPU causes interrupts on the isolated CPU. Add a new sub-parameter 'managed_irq' for 'isolcpus' and the corresponding logic in the interrupt affinity selection code. The subparameter indicates to the interrupt affinity selection logic that it should try to avoid the above scenario. This isolation is best effort and only effective if the automatically assigned interrupt mask of a device queue contains isolated and housekeeping CPUs. If housekeeping CPUs are online then such interrupts are directed to the housekeeping CPU so that IO submitted on the housekeeping CPU cannot disturb the isolated CPU. If a queue's affinity mask contains only isolated CPUs then this parameter has no effect on the interrupt routing decision, though interrupts are only happening when tasks running on those isolated CPUs submit IO. IO submitted on housekeeping CPUs has no influence on those queues. If the affinity mask contains both housekeeping and isolated CPUs, but none of the contained housekeeping CPUs is online, then the interrupt is also routed to an isolated CPU. Interrupts are only delivered when one of the isolated CPUs in the affinity mask submits IO. If one of the contained housekeeping CPUs comes online, the CPU hotplug logic migrates the interrupt automatically back to the upcoming housekeeping CPU. Depending on the type of interrupt controller, this can require that at least one interrupt is delivered to the isolated CPU in order to complete the migration. [ tglx: Removed unused parameter, added and edited comments/documentation and rephrased the changelog so it contains more details. ] Signed-off-by: Ming Lei Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200120091625.17912-1-ming.lei@redhat.com commit eda4eabf86fd6806eaabc23fb90dd056fdac037b Author: Juergen Gross Date: Fri Jan 17 14:49:31 2020 +0100 xen/balloon: Support xend-based toolstack take two Commit 3aa6c19d2f38be ("xen/balloon: Support xend-based toolstack") tried to fix a regression with running on rather ancient Xen versions. Unfortunately the fix was based on the assumption that xend would just use another Xenstore node, but in reality only some downstream versions of xend are doing that. The upstream xend does not write that Xenstore node at all, so the problem must be fixed in another way. The easiest way to achieve that is to fall back to the behavior before commit 96edd61dcf4436 ("xen/balloon: don't online new memory initially") in case the static memory maximum can't be read. This is achieved by setting static_max to the current number of memory pages known by the system resulting in target_diff becoming zero. Fixes: 3aa6c19d2f38be ("xen/balloon: Support xend-based toolstack") Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Cc: # 4.13 Signed-off-by: Boris Ostrovsky commit db735fc4036bbe1fbe606819b5f0ff26cc76cdff Author: Sean Paul Date: Tue Jan 21 11:18:48 2020 -0800 drm/msm: Set dma maximum segment size for mdss Turning on CONFIG_DMA_API_DEBUG_SG results in the following error: [ 12.078665] msm ae00000.mdss: DMA-API: mapping sg segment longer than device claims to support [len=3526656] [max=65536] [ 12.089870] WARNING: CPU: 6 PID: 334 at /mnt/host/source/src/third_party/kernel/v4.19/kernel/dma/debug.c:1301 debug_dma_map_sg+0x1dc/0x318 [ 12.102655] Modules linked in: joydev [ 12.106442] CPU: 6 PID: 334 Comm: frecon Not tainted 4.19.0 #2 [ 12.112450] Hardware name: Google Cheza (rev3+) (DT) [ 12.117566] pstate: 60400009 (nZCv daif +PAN -UAO) [ 12.122506] pc : debug_dma_map_sg+0x1dc/0x318 [ 12.126995] lr : debug_dma_map_sg+0x1dc/0x318 [ 12.131487] sp : ffffff800cc3ba80 [ 12.134913] x29: ffffff800cc3ba80 x28: 0000000000000000 [ 12.140395] x27: 0000000000000004 x26: 0000000000000004 [ 12.145868] x25: ffffff8008e55b18 x24: 0000000000000000 [ 12.151337] x23: 00000000ffffffff x22: ffffff800921c000 [ 12.156809] x21: ffffffc0fa75b080 x20: ffffffc0f7195090 [ 12.162280] x19: ffffffc0f1c53280 x18: 0000000000000000 [ 12.167749] x17: 0000000000000000 x16: 0000000000000000 [ 12.173218] x15: 0000000000000000 x14: 0720072007200720 [ 12.178689] x13: 0720072007200720 x12: 0720072007200720 [ 12.184161] x11: 0720072007200720 x10: 0720072007200720 [ 12.189641] x9 : ffffffc0f1fc6b60 x8 : 0000000000000000 [ 12.195110] x7 : ffffff8008132ce0 x6 : 0000000000000000 [ 12.200585] x5 : 0000000000000000 x4 : ffffff8008134734 [ 12.206058] x3 : ffffff800cc3b830 x2 : ffffffc0f1fc6240 [ 12.211532] x1 : 25045a74f48a7400 x0 : 25045a74f48a7400 [ 12.217006] Call trace: [ 12.219535] debug_dma_map_sg+0x1dc/0x318 [ 12.223671] get_pages+0x19c/0x20c [ 12.227177] msm_gem_fault+0x64/0xfc [ 12.230874] __do_fault+0x3c/0x140 [ 12.234383] __handle_mm_fault+0x70c/0xdb8 [ 12.238603] handle_mm_fault+0xac/0xc4 [ 12.242473] do_page_fault+0x1bc/0x3d4 [ 12.246342] do_translation_fault+0x54/0x88 [ 12.250652] do_mem_abort+0x60/0xf0 [ 12.254250] el0_da+0x20/0x24 [ 12.257317] irq event stamp: 67260 [ 12.260828] hardirqs last enabled at (67259): [] console_unlock+0x214/0x608 [ 12.269693] hardirqs last disabled at (67260): [] do_debug_exception+0x5c/0x178 [ 12.278820] softirqs last enabled at (67256): [] __do_softirq+0x4d4/0x520 [ 12.287510] softirqs last disabled at (67249): [] irq_exit+0xa8/0x100 [ 12.295742] ---[ end trace e63cfc40c313ffab ]--- The root of the problem is that the default segment size for sgt is (UINT_MAX & PAGE_MASK), and the default segment size for device dma is 64K. As such, if you compare the 2, you would deduce that the sg segment will overflow the device's capacity. In reality, the hardware can accommodate the larger sg segments, it's just not initializing its max segment properly. This patch initializes the max segment size for the mdss device, which gets rid of that pesky warning. Reported-by: Stephen Boyd Tested-by: Stephen Boyd Tested-by: Sai Prakash Ranjan Reviewed-by: Rob Clark Signed-off-by: Sean Paul Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20200121111813.REPOST.1.I92c66a35fb13f368095b05287bdabdbe88ca6922@changeid commit eb5a4d0a9ee976008d1add75e3d64545399e80a3 Author: Jules Irenge Date: Mon Jan 20 22:43:47 2020 +0000 hrtimer: Add missing sparse annotation for __run_timer() Sparse reports a warning at __run_hrtimer() |warning: context imbalance in __run_hrtimer() - unexpected unlock Add the missing must_hold() annotation. Signed-off-by: Jules Irenge Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200120224347.51843-1-jbi.octave@gmail.com commit e533dbe9dcb199bb637a2c465f3a6e70564994fe Author: Mark Rutland Date: Wed Jan 22 12:45:46 2020 +0000 arm64: acpi: fix DAIF manipulation with pNMI Since commit: d44f1b8dd7e66d80 ("arm64: KVM/mm: Move SEA handling behind a single 'claim' interface") ... the top-level APEI SEA handler has the shape: 1. current_flags = arch_local_save_flags() 2. local_daif_restore(DAIF_ERRCTX) 3. 4. local_daif_restore(current_flags) However, since commit: 4a503217ce37e1f4 ("arm64: irqflags: Use ICC_PMR_EL1 for interrupt masking") ... when pseudo-NMIs (pNMIs) are in use, arch_local_save_flags() will save the PMR value rather than the DAIF flags. The combination of these two commits means that the APEI SEA handler will erroneously attempt to restore the PMR value into DAIF. Fix this by factoring local_daif_save_flags() out of local_daif_save(), so that we can consistently save DAIF in step #1, regardless of whether pNMIs are in use. Both commits were introduced concurrently in v5.0. Cc: Fixes: 4a503217ce37e1f4 ("arm64: irqflags: Use ICC_PMR_EL1 for interrupt masking") Fixes: d44f1b8dd7e66d80 ("arm64: KVM/mm: Move SEA handling behind a single 'claim' interface") Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Julien Thierry Cc: Will Deacon Signed-off-by: Will Deacon commit 72a9cc952f123948ca1d1011a12e5e1312140b68 Author: Rasmus Villemoes Date: Wed Jan 15 19:41:53 2020 +0100 devtmpfs: factor out common tail of devtmpfs_{create,delete}_node There's some common boilerplate in devtmpfs_{create,delete}_node, put that in a little helper. Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20200115184154.3492-6-linux@rasmusvillemoes.dk Signed-off-by: Greg Kroah-Hartman commit fad1db8a351cc913bbfb9ee4fe7ca4939cb19f2e Author: Rasmus Villemoes Date: Wed Jan 15 19:41:52 2020 +0100 devtmpfs: initify a bit devtmpfs_mount() is only called from prepare_namespace() in init/do_mounts.c, which is an __init function, so devtmpfs_mount() can also be moved to .init.text. Then the mount_dev static variable is only referenced from __init functions (devtmpfs_mount and its initializer function mount_param). Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20200115184154.3492-5-linux@rasmusvillemoes.dk Signed-off-by: Greg Kroah-Hartman commit 21766d11d151c82eb41c09338c8e149da6019a8b Author: Rasmus Villemoes Date: Wed Jan 15 19:41:51 2020 +0100 devtmpfs: simplify initialization of mount_dev Avoid a bit of ifdeffery by using the IS_ENABLED() helper. Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20200115184154.3492-4-linux@rasmusvillemoes.dk Signed-off-by: Greg Kroah-Hartman commit 0ff0e95e9909e6ddefc8caa3948f20c0cb3dd6fb Author: Rasmus Villemoes Date: Wed Jan 15 19:41:50 2020 +0100 devtmpfs: factor out setup part of devtmpfsd() Factor out the setup part of devtmpfsd() to make it a bit easier to see that we always call setup_done() exactly once (provided of course the kthread is succesfully created). Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20200115184154.3492-3-linux@rasmusvillemoes.dk Signed-off-by: Greg Kroah-Hartman commit c9d6b287d786db3a6bf3d99c1d99cd7e1d639485 Author: Rasmus Villemoes Date: Wed Jan 15 19:41:49 2020 +0100 devtmpfs: fix theoretical stale pointer deref in devtmpfsd() After complete(&setup_done), devtmpfs_init proceeds and may actually return, invalidating the *err pointer, before devtmpfsd() proceeds to reading back *err. This is of course completely theoretical since the error conditions never trigger in practice, and even if they did, nobody cares about the exit value from a kernel thread, so it doesn't matter if we happen to read back some garbage from some other stack frame. Still, this isn't a pattern that should be copy-pasted, so fix it. Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20200115184154.3492-2-linux@rasmusvillemoes.dk Signed-off-by: Greg Kroah-Hartman commit 0707cfa5c3ef58effb143db9db6d6e20503f9dec Author: Colin Ian King Date: Thu Jan 16 17:57:58 2020 +0000 driver core: platform: fix u32 greater or equal to zero comparison Currently the check that a u32 variable i is >= 0 is always true because the unsigned variable will never be negative, causing the loop to run forever. Fix this by changing the pre-decrement check to a zero check on i followed by a decrement of i. Addresses-Coverity: ("Unsigned compared against 0") Fixes: 39cc539f90d0 ("driver core: platform: Prevent resouce overflow from causing infinite loops") Signed-off-by: Colin Ian King Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20200116175758.88396-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit f4a81f5a853e0b7c38bfad3afd6d0365d654e777 Author: Marc Zyngier Date: Tue Dec 24 11:10:38 2019 +0000 irqchip/gic-v4.1: Allow direct invalidation of VLPIs Just like for INVALL, GICv4.1 has grown a VPE-aware INVLPI register. Let's plumb it in and make use of the DirectLPI code in that case. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191224111055.11836-16-maz@kernel.org commit 3858d4dfdfb845e51ee8b4045f61ccba2c3111ee Author: Marc Zyngier Date: Tue Dec 24 11:10:37 2019 +0000 irqchip/gic-v4.1: Suppress per-VLPI doorbell Since GICv4.1 gives us a per-VPE doorbell, avoid programming anything else on VMOVI/VMAPI/VMAPTI and on any other action that would have otherwise resulted in a per-VLPI doorbell to be programmed. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191224111055.11836-15-maz@kernel.org commit b4a4bd0f2629ec2ece7690de1b4721529da29871 Author: Marc Zyngier Date: Tue Dec 24 11:10:36 2019 +0000 irqchip/gic-v4.1: Add VPE INVALL callback GICv4.1 redistributors have a VPE-aware INVALL register. Progress! We can now emulate a guest-requested INVALL without emiting a VINVALL command. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191224111055.11836-14-maz@kernel.org commit e64fab1a1477dbf0c355691914511612ba312932 Author: Marc Zyngier Date: Tue Dec 24 11:10:35 2019 +0000 irqchip/gic-v4.1: Add VPE eviction callback When descheduling a VPE, special care must be taken to tell the GIC about whether we want to receive a doorbell or not. This is a major improvement on GICv4.0, where the doorbell had to be separately enabled/disabled. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191224111055.11836-13-maz@kernel.org commit 91bf6395f7b8614a5a9934a0ae9c8b5312d77b29 Author: Marc Zyngier Date: Tue Dec 24 11:10:34 2019 +0000 irqchip/gic-v4.1: Add VPE residency callback Making a VPE resident on GICv4.1 is pretty simple, as it is just a single write to the local redistributor. We just need extra information about which groups to enable, which the KVM code will have to provide. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191224111055.11836-12-maz@kernel.org commit d97c97baa214486cc3d64c996a2214475f6cc83c Author: Marc Zyngier Date: Tue Dec 24 11:10:33 2019 +0000 irqchip/gic-v4.1: Add mask/unmask doorbell callbacks masking/unmasking doorbells on GICv4.1 relies on a new INVDB command, which broadcasts the invalidation to all RDs. Implement the new command as well as the masking callbacks, and plug the whole thing into the v4.1 VPE irqchip. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191224111055.11836-11-maz@kernel.org commit 29c647f3b5ae1a20221d477442dcdf058cea4a21 Author: Marc Zyngier Date: Tue Dec 24 11:10:32 2019 +0000 irqchip/gic-v4.1: Plumb skeletal VPE irqchip Just like for GICv4.0, each VPE has its own doorbell interrupt, and thus an irqchip that manages them. Since the doorbell management is quite different on GICv4.1, let's introduce an almost empty irqchip the will get populated over the next new patches. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191224111055.11836-10-maz@kernel.org commit dd3f050a216ef7c8ce21ba48fd3b2ece2155382f Author: Marc Zyngier Date: Tue Dec 24 11:10:31 2019 +0000 irqchip/gic-v4.1: Implement the v4.1 flavour of VMOVP With GICv4.1, VMOVP is extended to allow a default doorbell to be specified, as well as a validity bit for this doorbell. As an added bonus, VMOVP isn't required anymore of moving a VPE between redistributors that share the same affinity. Let's add this support to the VMOVP builder, and make sure we don't issue the command if we don't really need to. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191224111055.11836-9-maz@kernel.org commit 0684c7046590dd1e8047e187aaf4c7910cc35bce Author: Marc Zyngier Date: Tue Dec 24 11:10:30 2019 +0000 irqchip/gic-v4.1: Don't use the VPE proxy if RVPEID is set The infamous VPE proxy device isn't used with GICv4.1 because: - we can invalidate any LPI from the DirectLPI MMIO interface - the ITS and redistributors understand the life cycle of the doorbell, so we don't need to enable/disable it all the time So let's escape early from the proxy related functions. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191224111055.11836-8-maz@kernel.org commit 64edfaa9a2342a3ce34f8cb982c2c2df84db4de3 Author: Marc Zyngier Date: Tue Dec 24 11:10:29 2019 +0000 irqchip/gic-v4.1: Implement the v4.1 flavour of VMAPP The ITS VMAPP command gains some new fields with GICv4.1: - a default doorbell, which allows a single doorbell to be used for all the VLPIs routed to a given VPE - a pointer to the configuration table (instead of having it in a register that gets context switched) - a flag indicating whether this is the first map or the last unmap for this particular VPE - a flag indicating whether the pending table is known to be zeroed, or not Plumb in the new fields in the VMAPP builder, and add the map/unmap refcounting so that the ITS can do the right thing. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191224111055.11836-7-maz@kernel.org commit 5e5168461c22c8738d31d4ee12a5cbc2ab0aa440 Author: Marc Zyngier Date: Tue Dec 24 11:10:28 2019 +0000 irqchip/gic-v4.1: VPE table (aka GICR_VPROPBASER) allocation GICv4.1 defines a new VPE table that is potentially shared between both the ITSs and the redistributors, following complicated affinity rules. To make things more confusing, the programming of this table at the redistributor level is reusing the GICv4.0 GICR_VPROPBASER register for something completely different. The code flow is somewhat complexified by the need to respect the affinities required by the HW, meaning that tables can either be inherited from a previously discovered ITS or redistributor. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191224111055.11836-6-maz@kernel.org commit f2d834092ee276610ccb6637e5109b61fc79ab89 Author: Marc Zyngier Date: Tue Dec 24 11:10:25 2019 +0000 irqchip/gic-v3: Add GICv4.1 VPEID size discovery While GICv4.0 mandates 16 bit worth of VPEIDs, GICv4.1 allows smaller implementations to be built. Add the required glue to dynamically compute the limit. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191224111055.11836-3-maz@kernel.org commit b25319d279b63781b972c4966b4082193e69afac Author: Marc Zyngier Date: Tue Dec 24 11:10:24 2019 +0000 irqchip/gic-v3: Detect GICv4.1 supporting RVPEID GICv4.1 supports the RVPEID ("Residency per vPE ID"), which allows for a much efficient way of making virtual CPUs resident (to allow direct injection of interrupts). The functionnality needs to be discovered on each and every redistributor in the system, and disabled if the settings are inconsistent. Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191224111055.11836-2-maz@kernel.org commit 093bf439fee0d40ade7e309c1288b409cdc3b38f Author: Marc Zyngier Date: Wed Jan 22 13:53:44 2020 +0000 irqchip/gic-v3-its: Fix get_vlpi_map() breakage with doorbells When updating an LPI configuration, get_vlpi_map() may be passed a irq_data structure relative to an ITS domain (the normal case) or one that is relative to the core GICv3 domain in the case of a GICv4 doorbell. In the latter case, special care must be take not to dereference the irq_chip data as an its_dev structure, as that isn't what is stored there. Instead, check *first* whether the IRQ is forwarded to a vcpu, and only then try to obtain the vlpi mapping. Fixes: c1d4d5cd203c ("irqchip/gic-v3-its: Add its_vlpi_map helpers") Signed-off-by: Marc Zyngier Reported-by: Zenghui Yu Link: https://lore.kernel.org/r/20200122085609.658-1-yuzenghui@huawei.com commit eb143f8756e77c8fcfc4d574922ae9efd3a43ca9 Author: Martin Fuzzey Date: Fri Jan 10 16:44:01 2020 +0100 binder: fix log spam for existing debugfs file creation. Since commit 43e23b6c0b01 ("debugfs: log errors when something goes wrong") debugfs logs attempts to create existing files. However binder attempts to create multiple debugfs files with the same name when a single PID has multiple contexts, this leads to log spamming during an Android boot (17 such messages during boot on my system). Fix this by checking if we already know the PID and only create the debugfs entry for the first context per PID. Do the same thing for binderfs for symmetry. Signed-off-by: Martin Fuzzey Acked-by: Todd Kjos Fixes: 43e23b6c0b01 ("debugfs: log errors when something goes wrong") Cc: stable Link: https://lore.kernel.org/r/1578671054-5982-1-git-send-email-martin.fuzzey@flowbird.group Signed-off-by: Greg Kroah-Hartman commit 4144fddbd3932b59370e6e279002991c3e2b2fc6 Author: Mateusz Nosek Date: Sat Jan 18 18:11:43 2020 +0100 x86/tsc: Remove redundant assignment Previously, the assignment to the local variable 'now' took place before the for loop. The loop is unconditional so it will be entered at least once. The variable 'now' is reassigned in the loop and is not used before reassigning. Therefore, the assignment before the loop is unnecessary and can be removed. No code changed: # arch/x86/kernel/tsc_sync.o: text data bss dec hex filename 3569 198 44 3811 ee3 tsc_sync.o.before 3569 198 44 3811 ee3 tsc_sync.o.after md5: 36216de29b208edbcd34fed9fe7f7b69 tsc_sync.o.before.asm 36216de29b208edbcd34fed9fe7f7b69 tsc_sync.o.after.asm [ bp: Massage commit message. ] Signed-off-by: Mateusz Nosek Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200118171143.25178-1-mateusznosek0@gmail.com commit 659ded30272d67a04b3692f0bfa12263be20d790 Author: Alex Shi Date: Tue Jan 21 13:54:35 2020 +0800 trace/kprobe: Remove unused MAX_KPROBE_CMDLINE_SIZE This limitation are never lunched from introduce commit 970988e19eb0 ("tracing/kprobe: Add kprobe_event= boot parameter") Could we remove it if no intention to implement it? Link: http://lkml.kernel.org/r/1579586075-45132-1-git-send-email-alex.shi@linux.alibaba.com Acked-by: Masami Hiramatsu Signed-off-by: Alex Shi Signed-off-by: Steven Rostedt (VMware) commit 17248ea0367465f4aaef728f6af661ed38e38cf1 Author: Sven Schnelle Date: Wed Jan 15 13:42:27 2020 +0100 s390: fix __EMIT_BUG() macro Setting a kprobe on getname_flags() failed: $ echo 'p:tmr1 getname_flags +0(%r2):ustring' > kprobe_events -bash: echo: write error: Invalid argument Debugging the kprobes code showed that the address of getname_flags() is contained in the __bug_table. Kprobes doesn't allow to set probes at BUG() locations. $ objdump -j __bug_table -x build/fs/namei.o [..] 0000000000000108 R_390_PC32 .text+0x00000000000075a8 000000000000010c R_390_PC32 .L223+0x0000000000000004 I was expecting getname_flags() to start with a BUG(), but: 7598: e3 20 10 00 00 04 lg %r2,0(%r1) 759e: c0 f4 00 00 00 00 jg 759e 75a0: R_390_PLT32DBL kmem_cache_free+0x2 75a4: a7 f4 00 01 j 75a6 00000000000075a8 : 75a8: c0 04 00 00 00 00 brcl 0,75a8 75ae: eb 6f f0 48 00 24 stmg %r6,%r15,72(%r15) 75b4: b9 04 00 ef lgr %r14,%r15 75b8: e3 f0 ff a8 ff 71 lay %r15,-88(%r15) So the BUG() is actually the last opcode of the previous function. Fix this by switching to using the MONITOR CALL (MC) instruction, and set the entry in __bug_table to the beginning of that MC. Reviewed-by: Heiko Carstens Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit 45f7a0da600d3c409b5ad8d5ddddacd98ddc8840 Author: Vasily Gorbik Date: Tue Dec 10 14:33:39 2019 +0100 s390/ftrace: generate traced function stack frame Currently backtrace from ftraced function does not contain ftraced function itself. e.g. for "path_openat": arch_stack_walk+0x15c/0x2d8 stack_trace_save+0x50/0x68 stack_trace_call+0x15e/0x3d8 ftrace_graph_caller+0x0/0x1c <-- ftrace code do_filp_open+0x7c/0xe8 <-- ftraced function caller do_open_execat+0x76/0x1b8 open_exec+0x52/0x78 load_elf_binary+0x180/0x1160 search_binary_handler+0x8e/0x288 load_script+0x2a8/0x2b8 search_binary_handler+0x8e/0x288 __do_execve_file.isra.39+0x6fa/0xb40 __s390x_sys_execve+0x56/0x68 system_call+0xdc/0x2d8 Ftraced function is expected in the backtrace by ftrace kselftests, which are now failing. It would also be nice to have it for clarity reasons. "ftrace_caller" itself is called without stack frame allocated for it and does not store its caller (ftraced function). Instead it simply allocates a stack frame for "ftrace_trace_function" and sets backchain to point to ftraced function stack frame (which contains ftraced function caller in saved r14). To fix this issue make "ftrace_caller" allocate a stack frame for itself just to store ftraced function for the stack unwinder. As a result backtrace looks like the following: arch_stack_walk+0x15c/0x2d8 stack_trace_save+0x50/0x68 stack_trace_call+0x15e/0x3d8 ftrace_graph_caller+0x0/0x1c <-- ftrace code path_openat+0x6/0xd60 <-- ftraced function do_filp_open+0x7c/0xe8 <-- ftraced function caller do_open_execat+0x76/0x1b8 open_exec+0x52/0x78 load_elf_binary+0x180/0x1160 search_binary_handler+0x8e/0x288 load_script+0x2a8/0x2b8 search_binary_handler+0x8e/0x288 __do_execve_file.isra.39+0x6fa/0xb40 __s390x_sys_execve+0x56/0x68 system_call+0xdc/0x2d8 Reported-by: Sven Schnelle Tested-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 253b3c4b2920e07ce9e2b18800b9b65245e2fafa Author: Vasily Gorbik Date: Wed Jan 8 14:46:00 2020 +0100 s390: adjust -mpacked-stack support check for clang 10 clang 10 introduces -mpacked-stack compiler option implementation. At the same time currently it does not support a combination of -mpacked-stack and -mbackchain. This leads to the following build error: clang: error: unsupported option '-mpacked-stack with -mbackchain' for target 's390x-ibm-linux' If/when clang adds support for a combination of -mpacked-stack and -mbackchain it would also require -msoft-float (like gcc does). According to Ulrich Weigand "stack slot assigned to the kernel backchain overlaps the stack slot assigned to the FPR varargs (both are required to be placed immediately after the saved r15 slot if present)." Extend -mpacked-stack compiler option support check to include all 3 options -mpacked-stack -mbackchain -msoft-float which must present to support -mpacked-stack with -mbackchain. Acked-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit c4e5c229b610ac974f284c760e47c40e651258f2 Author: Vasily Gorbik Date: Wed Dec 25 14:13:32 2019 +0100 s390/jump_label: use "i" constraint for clang Currently kernel build fails under clang if jump labels are enabled. The problem is "X" constraint usage "Any operand whatsoever is allowed", for which clang produces the following: .pushsection __jump_table,"aw" .balign 8 .long 0b-.,.Ltmp577-. .quad %r0+0-. # %r0 is not allowed here .popsection Under gcc constraints "X" or "jdd" (gcc > 9) are used for static keys. Ideally, we'd have used "i" for gcc, but it doesn't work in all cases with -fPIC code. This is gcc-specific problem that doesn't exist in llvm. Since clang does not have "jdd" simply always use "i" constraint for it. Suggested-by: Ulrich Weigand Acked-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit ee09c91480b10f306bfd1856776f673b4efe68a5 Author: Thomas Richter Date: Fri Jan 3 11:37:12 2020 +0100 s390/cpum_sf: Use DIV_ROUND_UP Use macro DIV_ROUND_UP() for calculation of number of SDBT SDBT pages required for index pages. This macro is already used throughout the file. Signed-off-by: Thomas Richter Signed-off-by: Vasily Gorbik commit 32dab6828c42f087439d3e2617dc7283546bd8f7 Author: Thomas Richter Date: Thu Dec 19 14:56:13 2019 +0100 s390/cpum_sf: Use kzalloc and minor changes Use kzalloc() to allocate auxiliary buffer structure initialized with all zeroes to avoid random value in trace output. Avoid double access to SBD hardware flags. Signed-off-by: Thomas Richter Signed-off-by: Vasily Gorbik commit ee5c4ccfd51d5dbaa9b9ddeed97c8d5526e55f17 Author: Thomas Richter Date: Tue Dec 17 15:07:35 2019 +0100 s390/cpum_sf: Convert debug trace to common layout Convert debug traces to print the head/alert/empty marks consistently as decimal numbers. Add some trace statements to enable easier debugging during auxiliary tracing. Signed-off-by: Thomas Richter Signed-off-by: Vasily Gorbik commit 576c75e36c689bec6a940e807bae27291ab0c0de Author: Niklas Schnelle Date: Thu Dec 19 09:16:59 2019 +0100 s390/pci: Fix possible deadlock in recover_store() With zpci_disable() working, lockdep detected a potential deadlock (lockdep output at the end). The deadlock is between recovering a PCI function via the /sys/bus/pci/devices//recover attribute vs powering it off via /sys/bus/pci/slots//power. The fix is analogous to the changes in commit 0ee223b2e1f6 ("scsi: core: Avoid that SCSI device removal through sysfs triggers a deadlock") that fixed a potential deadlock on removing a SCSI device via sysfs. [ 204.830107] ====================================================== [ 204.830109] WARNING: possible circular locking dependency detected [ 204.830111] 5.5.0-rc2-06072-gbc03ecc9a672 #6 Tainted: G W [ 204.830112] ------------------------------------------------------ [ 204.830113] bash/1034 is trying to acquire lock: [ 204.830115] 0000000192a1a610 (kn->count#200){++++}, at: kernfs_remove_by_name_ns+0x5c/0xa8 [ 204.830122] but task is already holding lock: [ 204.830123] 00000000c16134a8 (pci_rescan_remove_lock){+.+.}, at: pci_stop_and_remove_bus_device_locked+0x26/0x48 [ 204.830128] which lock already depends on the new lock. [ 204.830129] the existing dependency chain (in reverse order) is: [ 204.830130] -> #1 (pci_rescan_remove_lock){+.+.}: [ 204.830134] validate_chain+0x93a/0xd08 [ 204.830136] __lock_acquire+0x4ae/0x9d0 [ 204.830137] lock_acquire+0x114/0x280 [ 204.830140] __mutex_lock+0xa2/0x960 [ 204.830142] mutex_lock_nested+0x32/0x40 [ 204.830145] recover_store+0x4c/0xa8 [ 204.830147] kernfs_fop_write+0xe6/0x218 [ 204.830151] vfs_write+0xb0/0x1b8 [ 204.830152] ksys_write+0x6c/0xf8 [ 204.830154] system_call+0xd8/0x2d8 [ 204.830155] -> #0 (kn->count#200){++++}: [ 204.830187] check_noncircular+0x1e6/0x240 [ 204.830189] check_prev_add+0xfc/0xdb0 [ 204.830190] validate_chain+0x93a/0xd08 [ 204.830192] __lock_acquire+0x4ae/0x9d0 [ 204.830193] lock_acquire+0x114/0x280 [ 204.830194] __kernfs_remove.part.0+0x2e4/0x360 [ 204.830196] kernfs_remove_by_name_ns+0x5c/0xa8 [ 204.830198] remove_files.isra.0+0x4c/0x98 [ 204.830199] sysfs_remove_group+0x66/0xc8 [ 204.830201] sysfs_remove_groups+0x46/0x68 [ 204.830204] device_remove_attrs+0x52/0x90 [ 204.830207] device_del+0x182/0x418 [ 204.830208] pci_remove_bus_device+0x8a/0x130 [ 204.830210] pci_stop_and_remove_bus_device_locked+0x3a/0x48 [ 204.830212] disable_slot+0x68/0x100 [ 204.830213] power_write_file+0x7c/0x130 [ 204.830215] kernfs_fop_write+0xe6/0x218 [ 204.830217] vfs_write+0xb0/0x1b8 [ 204.830218] ksys_write+0x6c/0xf8 [ 204.830220] system_call+0xd8/0x2d8 [ 204.830221] other info that might help us debug this: [ 204.830223] Possible unsafe locking scenario: [ 204.830224] CPU0 CPU1 [ 204.830225] ---- ---- [ 204.830226] lock(pci_rescan_remove_lock); [ 204.830227] lock(kn->count#200); [ 204.830229] lock(pci_rescan_remove_lock); [ 204.830231] lock(kn->count#200); [ 204.830233] *** DEADLOCK *** [ 204.830234] 4 locks held by bash/1034: [ 204.830235] #0: 00000001b6fbc498 (sb_writers#4){.+.+}, at: vfs_write+0x158/0x1b8 [ 204.830239] #1: 000000018c9f5090 (&of->mutex){+.+.}, at: kernfs_fop_write+0xaa/0x218 [ 204.830242] #2: 00000001f7da0810 (kn->count#235){.+.+}, at: kernfs_fop_write+0xb6/0x218 [ 204.830245] #3: 00000000c16134a8 (pci_rescan_remove_lock){+.+.}, at: pci_stop_and_remove_bus_device_locked+0x26/0x48 [ 204.830248] stack backtrace: [ 204.830250] CPU: 2 PID: 1034 Comm: bash Tainted: G W 5.5.0-rc2-06072-gbc03ecc9a672 #6 [ 204.830252] Hardware name: IBM 8561 T01 703 (LPAR) [ 204.830253] Call Trace: [ 204.830257] [<00000000c05e10c0>] show_stack+0x88/0xf0 [ 204.830260] [<00000000c112dca4>] dump_stack+0xa4/0xe0 [ 204.830261] [<00000000c0694c06>] check_noncircular+0x1e6/0x240 [ 204.830263] [<00000000c0695bec>] check_prev_add+0xfc/0xdb0 [ 204.830264] [<00000000c06971da>] validate_chain+0x93a/0xd08 [ 204.830266] [<00000000c06994c6>] __lock_acquire+0x4ae/0x9d0 [ 204.830267] [<00000000c069867c>] lock_acquire+0x114/0x280 [ 204.830269] [<00000000c09ca15c>] __kernfs_remove.part.0+0x2e4/0x360 [ 204.830270] [<00000000c09cb5c4>] kernfs_remove_by_name_ns+0x5c/0xa8 [ 204.830272] [<00000000c09cee14>] remove_files.isra.0+0x4c/0x98 [ 204.830274] [<00000000c09cf2ae>] sysfs_remove_group+0x66/0xc8 [ 204.830276] [<00000000c09cf356>] sysfs_remove_groups+0x46/0x68 [ 204.830278] [<00000000c0e3dfe2>] device_remove_attrs+0x52/0x90 [ 204.830280] [<00000000c0e40382>] device_del+0x182/0x418 [ 204.830281] [<00000000c0dcfd7a>] pci_remove_bus_device+0x8a/0x130 [ 204.830283] [<00000000c0dcfe92>] pci_stop_and_remove_bus_device_locked+0x3a/0x48 [ 204.830285] [<00000000c0de7190>] disable_slot+0x68/0x100 [ 204.830286] [<00000000c0de6514>] power_write_file+0x7c/0x130 [ 204.830288] [<00000000c09cc846>] kernfs_fop_write+0xe6/0x218 [ 204.830290] [<00000000c08f3480>] vfs_write+0xb0/0x1b8 [ 204.830291] [<00000000c08f378c>] ksys_write+0x6c/0xf8 [ 204.830293] [<00000000c1154374>] system_call+0xd8/0x2d8 [ 204.830294] INFO: lockdep is turned off. Signed-off-by: Niklas Schnelle Reviewed-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik commit 17cdec960cf776b20b1fb08c622221babe591d51 Author: Niklas Schnelle Date: Tue Dec 17 09:34:46 2019 +0100 s390/pci: Recover handle in clp_set_pci_fn() When we try to recover a PCI function using echo 1 > /sys/bus/pci/devices//recover or manually with echo 1 > /sys/bus/pci/devices//remove echo 0 > /sys/bus/pci/slots//power echo 1 > /sys/bus/pci/slots//power clp_disable_fn() / clp_enable_fn() call clp_set_pci_fn() to first disable and then reenable the function. When the function is already in the requested state we may be left with an invalid function handle. To get a new valid handle we do a clp_list_pci() call. For this we need both the function ID and function handle in clp_set_pci_fn() so pass the zdev and get both. To simplify things also pull setting the refreshed function handle into clp_set_pci_fn() Signed-off-by: Niklas Schnelle Reviewed-by: Peter Oberparleiter Signed-off-by: Vasily Gorbik commit 34423f250a372d71346922edf2b84a19d811a311 Author: Steven Rostedt (VMware) Date: Wed Jan 22 06:44:50 2020 -0500 tracing: Fix uninitialized buffer var on early exit to trace_vbprintk() If we exit due to a bad input to trace_printk() (highly unlikely), then the buffer variable will not be initialized when we unnest the ring buffer. Reported-by: kbuild test robot Signed-off-by: Steven Rostedt (VMware) commit bc206065944e2d6bd917e719dc897ffff8dbbca8 Merge: ab3906c53144 2e8e1ea88cbc Author: Will Deacon Date: Wed Jan 22 11:38:53 2020 +0000 Merge branch 'for-next/rng' into for-next/core * for-next/rng: (2 commits) arm64: Use v8.5-RNG entropy for KASLR seed ... commit ab3906c53144837f1a192b5c3ba71ec2f938c187 Merge: aa246c056c43 275fa0ea2cf7 Author: Will Deacon Date: Wed Jan 22 11:35:05 2020 +0000 Merge branch 'for-next/errata' into for-next/core * for-next/errata: (3 commits) arm64: Workaround for Cortex-A55 erratum 1530923 ... commit aa246c056c43d41140c26706e519b498f056de8a Merge: 4f6cdf296cc4 73d6890fe8ff Author: Will Deacon Date: Wed Jan 22 11:34:21 2020 +0000 Merge branch 'for-next/asm-annotations' into for-next/core * for-next/asm-annotations: (6 commits) arm64: kernel: Correct annotation of end of el0_sync ... commit 4f6cdf296cc4b5b25c85bd04a84b59e562ce234b Merge: 3c23b83a88d0 8e3747beff8c c2c24edb1d9c e717d93b1c3f 3e3934176a4f d7bbd6c1b01c 1595fe299eb5 3751e728cef2 108eae2d4d10 52f73c383b24 9ee68b314e9a 500d14affdf7 Author: Will Deacon Date: Wed Jan 22 11:32:31 2020 +0000 Merge branches 'for-next/acpi', 'for-next/cpufeatures', 'for-next/csum', 'for-next/e0pd', 'for-next/entry', 'for-next/kbuild', 'for-next/kexec/cleanup', 'for-next/kexec/file-kdump', 'for-next/misc', 'for-next/nofpsimd', 'for-next/perf' and 'for-next/scs' into for-next/core * for-next/acpi: ACPI/IORT: Fix 'Number of IDs' handling in iort_id_map() * for-next/cpufeatures: (2 commits) arm64: Introduce ID_ISAR6 CPU register ... * for-next/csum: (2 commits) arm64: csum: Fix pathological zero-length calls ... * for-next/e0pd: (7 commits) arm64: kconfig: Fix alignment of E0PD help text ... * for-next/entry: (5 commits) arm64: entry: cleanup sp_el0 manipulation ... * for-next/kbuild: (4 commits) arm64: kbuild: remove compressed images on 'make ARCH=arm64 (dist)clean' ... * for-next/kexec/cleanup: (11 commits) Revert "arm64: kexec: make dtb_mem always enabled" ... * for-next/kexec/file-kdump: (2 commits) arm64: kexec_file: add crash dump support ... * for-next/misc: (12 commits) arm64: entry: Avoid empty alternatives entries ... * for-next/nofpsimd: (7 commits) arm64: nofpsmid: Handle TIF_FOREIGN_FPSTATE flag cleanly ... * for-next/perf: (2 commits) perf/imx_ddr: Fix cpu hotplug state cleanup ... * for-next/scs: (6 commits) arm64: kernel: avoid x18 in __cpu_soft_restart ... commit e717d93b1c3f5e263c6c43b6ff0835a1279cb6fc Author: Will Deacon Date: Wed Jan 22 11:23:54 2020 +0000 arm64: kconfig: Fix alignment of E0PD help text Remove the additional space. Signed-off-by: Will Deacon commit 8b7e20a7ba54836076ff35a28349dabea4cec48f Author: Masami Hiramatsu Date: Wed Jan 22 13:11:54 2020 +0900 x86/decoder: Add TEST opcode to Group3-2 Add TEST opcode to Group3-2 reg=001b as same as Group3-1 does. Commit 12a78d43de76 ("x86/decoder: Add new TEST instruction pattern") added a TEST opcode assignment to f6 XX/001/XXX (Group 3-1), but did not add f7 XX/001/XXX (Group 3-2). Actually, this TEST opcode variant (ModRM.reg /1) is not described in the Intel SDM Vol2 but in AMD64 Architecture Programmer's Manual Vol.3, Appendix A.2 Table A-6. ModRM.reg Extensions for the Primary Opcode Map. Without this fix, Randy found a warning by insn_decoder_test related to this issue as below. HOSTCC arch/x86/tools/insn_decoder_test HOSTCC arch/x86/tools/insn_sanity TEST posttest arch/x86/tools/insn_decoder_test: warning: Found an x86 instruction decoder bug, please report this. arch/x86/tools/insn_decoder_test: warning: ffffffff81000bf1: f7 0b 00 01 08 00 testl $0x80100,(%rbx) arch/x86/tools/insn_decoder_test: warning: objdump says 6 bytes, but insn_get_length() says 2 arch/x86/tools/insn_decoder_test: warning: Decoded and checked 11913894 instructions with 1 failures TEST posttest arch/x86/tools/insn_sanity: Success: decoded and checked 1000000 random instructions with 0 errors (seed:0x871ce29c) To fix this error, add the TEST opcode according to AMD64 APM Vol.3. [ bp: Massage commit message. ] Reported-by: Randy Dunlap Signed-off-by: Masami Hiramatsu Signed-off-by: Borislav Petkov Acked-by: Randy Dunlap Tested-by: Randy Dunlap Link: https://lkml.kernel.org/r/157966631413.9580.10311036595431878351.stgit@devnote2 commit f59bbfc2f6099e8655f9e8f585e10ffde17176d0 Author: Alexei Starovoitov Date: Tue Jan 21 18:41:38 2020 -0800 bpf: Fix error path under memory pressure Restore the 'if (env->cur_state)' check that was incorrectly removed during code move. Under memory pressure env->cur_state can be freed and zeroed inside do_check(). Hence the check is necessary. Fixes: 51c39bb1d5d1 ("bpf: Introduce function-by-function verification") Reported-by: syzbot+b296579ba5015704d9fa@syzkaller.appspotmail.com Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200122024138.3385590-1-ast@kernel.org commit 216bbaa337bf240dc8c2ac413f0a0f3cf08ee338 Author: Andrew Murray Date: Wed Jan 22 10:18:31 2020 +0000 MAINTAINERS: Update my email address I will lose access to my @arm.com email address next week, so let's update the MAINTAINERS file and map it correctly in .mailmap Signed-off-by: Andrew Murray Signed-off-by: Lorenzo Pieralisi commit 05d57f1793fb250c85028c9952c3720010baa853 Author: Alexei Starovoitov Date: Mon Jan 20 19:22:31 2020 -0800 bpf: Fix trampoline usage in preempt Though the second half of trampoline page is unused a task could be preempted in the middle of the first half of trampoline and two updates to trampoline would change the code from underneath the preempted task. Hence wait for tasks to voluntarily schedule or go to userspace. Add similar wait before freeing the trampoline. Fixes: fec56f5890d9 ("bpf: Introduce BPF trampoline") Reported-by: Jann Horn Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Paul E. McKenney Link: https://lore.kernel.org/bpf/20200121032231.3292185-1-ast@kernel.org commit 2e8e1ea88cbcb19a77b7acb67f6ffe39cc15740c Author: Mark Brown Date: Tue Jan 21 12:58:53 2020 +0000 arm64: Use v8.5-RNG entropy for KASLR seed When seeding KALSR on a system where we have architecture level random number generation make use of that entropy, mixing it in with the seed passed by the bootloader. Since this is run very early in init before feature detection is complete we open code rather than use archrandom.h. Signed-off-by: Mark Brown Reviewed-by: Mark Rutland Reviewed-by: Ard Biesheuvel Signed-off-by: Will Deacon commit 1a50ec0b3b2e9a83f1b1245ea37a853aac2f741c Author: Richard Henderson Date: Tue Jan 21 12:58:52 2020 +0000 arm64: Implement archrandom.h for ARMv8.5-RNG Expose the ID_AA64ISAR0.RNDR field to userspace, as the RNG system registers are always available at EL0. Implement arch_get_random_seed_long using RNDR. Given that the TRNG is likely to be a shared resource between cores, and VMs, do not explicitly force re-seeding with RNDRRS. In order to avoid code complexity and potential issues with hetrogenous systems only provide values after cpufeature has finalized the system capabilities. Signed-off-by: Richard Henderson [Modified to only function after cpufeature has finalized the system capabilities and move all the code into the header -- broonie] Signed-off-by: Mark Brown Reviewed-by: Mark Rutland Reviewed-by: Ard Biesheuvel [will: Advertise HWCAP via /proc/cpuinfo] Signed-off-by: Will Deacon commit 1ddeb5a74ab6941dfd310b73c8554c393c70c2ef Author: Andy Shevchenko Date: Thu Jan 16 00:41:24 2020 +0200 tty: baudrate: SPARC supports few more baud rates According to termbits.h SPARC supports few more baud rates than currently defined in tty_baudrate.c. Append supported ones to baud_table[] and baud_bits[]. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200115224124.74684-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 6ada6064b239f5e8e3d4dae0717d3ced437d0527 Author: Andy Shevchenko Date: Thu Jan 16 00:41:23 2020 +0200 tty: baudrate: Synchronise baud_table[] and baud_bits[] Synchronize baud rate tables baud_table and baud_bits with each other for better readability. This makes clear what is being used for SPARC. No functional change intended. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200115224124.74684-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 8412ba1db8250087eb5d6e3525254df3be79dc3e Author: Julien Masson Date: Tue Jan 21 18:22:52 2020 +0100 tty: serial: meson_uart: Add support for kernel debugger The kgdb invokes the poll_put_char and poll_get_char when communicating with the host. This patch implement the serial polling hooks for the meson_uart to be used for KGDB debugging over serial line. Signed-off-by: Julien Masson Link: https://lore.kernel.org/r/867e1klo48.fsf@julienm-fedora-R90NQGV9.i-did-not-set--mail-host-address--so-tickle-me Signed-off-by: Greg Kroah-Hartman commit 101aa46bd221b768dfff8ef3745173fc8dbb85ee Author: Uwe Kleine-König Date: Tue Jan 21 08:17:02 2020 +0100 serial: imx: fix a race condition in receive path The main irq handler function starts by first masking disabled interrupts in the status register values to ensure to only handle enabled interrupts. This is important as when the RX path in the hardware is disabled reading the RX fifo results in an external abort. This checking must be done under the port lock, otherwise the following can happen: CPU1 | CPU2 | irq triggers as there are chars | in the RX fifo | | grab port lock imx_uart_int finds RRDY enabled | and calls imx_uart_rxint which | has to wait for port lock | | disable RX (e.g. because we're | using RS485 with !RX_DURING_TX) | | release port lock read from RX fifo with RX | disabled => exception | So take the port lock only once in imx_uart_int() instead of in the functions called from there. Reported-by: Andre Renaud Cc: stable@vger.kernel.org Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20200121071702.20150-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 48d414a3f2ecd995b65e52df3f8d6b5d0e8d026b Author: Lukas Wunner Date: Thu Jan 16 13:14:06 2020 +0100 serial: 8250_bcm2835aux: Document struct bcm2835aux_data Document the driver private data of the BCM2835 auxiliary UART so that upcoming commits may add further members with proper kerneldoc. Signed-off-by: Lukas Wunner Reviewed-by: Matthias Brugger Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/aea363c27fd541dba96d2ebfeee4f596c6d34932.1579175223.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman commit 644d776c7729e7a9cc04ee0587a82fe0d83252f0 Author: Lukas Wunner Date: Thu Jan 16 13:14:05 2020 +0100 serial: 8250_bcm2835aux: Use generic remapping code On probe the bcm2835aux UART driver misreports the register base address as 0x0: ttyS0 at MMIO 0x0 (irq = 53, base_baud = 50000000) is a 16550 That's because the driver remaps the registers itself. Take advantage of the generic remapping code in serial8250_request_std_resource() to get a message with the correct address and to simplify the driver. Signed-off-by: Lukas Wunner Cc: Martin Sperl Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/7d1a9bdb05090d8e465fd15cd26d6e81538d07f9.1579175223.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman commit 8c3cde5dd639afc7a17fb1e78f4579735a1c95e6 Author: Lukas Wunner Date: Thu Jan 16 13:14:04 2020 +0100 serial: 8250_bcm2835aux: Allocate uart_8250_port on stack The bcm2835aux UART driver stores a struct uart_8250_port in its private data even though it's only passed once to serial8250_register_8250_port() (which copies all relevant data) and becomes obsolete afterwards. Allocate the struct on the stack instead for simplicity and to conserve memory. The driver also initializes a spinlock in the struct which is never used. Drop that as well. Signed-off-by: Lukas Wunner Cc: Martin Sperl Reviewed-by: Matthias Brugger Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/421d3aed4c34cc8447ac9c26c320961f1b787f11.1579175223.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman commit e2f2a994ad7ce98f01e833a778e22b1813eb5586 Author: Lukas Wunner Date: Thu Jan 16 13:14:03 2020 +0100 serial: 8250_bcm2835aux: Suppress register_port error on -EPROBE_DEFER Suppress a gratuitous error message if serial8250_register_8250_port() returns -EPROBE_DEFER. Signed-off-by: Lukas Wunner Reviewed-by: Matthias Brugger Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/6aea0eacf3bfa73fe2d81082cc723265413410c8.1579175223.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman commit 324c0a1432110bf1bb778c03b52e5bcb3b8aa228 Author: Phil Elwell Date: Thu Jan 16 13:14:02 2020 +0100 serial: 8250_bcm2835aux: Suppress clk_get error on -EPROBE_DEFER Suppress a gratuitous error message if devm_clk_get() returns -EPROBE_DEFER. Signed-off-by: Phil Elwell [lukas: extend commit message] Signed-off-by: Lukas Wunner Reviewed-by: Matthias Brugger Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/deafc13cdfd7a31c6a81b0db95adcd3599accc26.1579175223.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman commit dc76697d7e933d5e299116f219c890568785ea15 Author: Lukas Wunner Date: Thu Jan 16 13:14:01 2020 +0100 serial: 8250_bcm2835aux: Fix line mismatch on driver unbind Unbinding the bcm2835aux UART driver raises the following error if the maximum number of 8250 UARTs is set to 1 (via the 8250.nr_uarts module parameter or CONFIG_SERIAL_8250_RUNTIME_UARTS): (NULL device *): Removing wrong port: a6f80333 != fa20408b That's because bcm2835aux_serial_probe() retrieves UART line number 1 from the devicetree and stores it in data->uart.port.line, while serial8250_register_8250_port() instead uses UART line number 0, which is stored in data->line. On driver unbind, bcm2835aux_serial_remove() uses data->uart.port.line, which contains the wrong number. Fix it. The issue does not occur if the maximum number of 8250 UARTs is >= 2. Fixes: bdc5f3009580 ("serial: bcm2835: add driver for bcm2835-aux-uart") Signed-off-by: Lukas Wunner Cc: stable@vger.kernel.org # v4.6+ Cc: Martin Sperl Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/912ccf553c5258135c6d7e8f404a101ef320f0f4.1579175223.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman commit eb7a3bb8c955b3694e0e0998413ce1563c02f90c Author: Thomas Hebb Date: Mon Jan 20 06:09:06 2020 -0800 usb: typec: fusb302: fix "op-sink-microwatt" default that was in mW commit 8f6244055bd3 ("usb: typec: fusb302: Always provide fwnode for the port") didn't convert this value from mW to uW when migrating to a new specification format like it should have. Fixes: 8f6244055bd3 ("usb: typec: fusb302: Always provide fwnode for the port") Cc: stable@vger.kernel.org Signed-off-by: Thomas Hebb Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/0da564559af75ec829c6c7e3aa4024f857c91bee.1579529334.git.tommyhebb@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0e64350bf4668d0fbbfec66fd8e637b971b4e976 Author: Thomas Hebb Date: Mon Jan 20 06:09:05 2020 -0800 usb: typec: wcove: fix "op-sink-microwatt" default that was in mW commit 4c912bff46cc ("usb: typec: wcove: Provide fwnode for the port") didn't convert this value from mW to uW when migrating to a new specification format like it should have. Fixes: 4c912bff46cc ("usb: typec: wcove: Provide fwnode for the port") Cc: stable@vger.kernel.org Signed-off-by: Thomas Hebb Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/d8be32512efd31995ad7d65b27df9d443131b07c.1579529334.git.tommyhebb@gmail.com Signed-off-by: Greg Kroah-Hartman commit f5ae8869095552e3396ee3e404f9586cc6a828f0 Author: Heikki Krogerus Date: Fri Jan 17 12:30:33 2020 +0300 usb: dwc3: pci: add ID for the Intel Comet Lake -V variant There is one more Comet Lake PCH variant, CML-V, that has its own PCI ID. Signed-off-by: Heikki Krogerus Cc: stable Link: https://lore.kernel.org/r/20200117093033.48616-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3ba76256fc4e2a0d7fb26cc95459041ea0e88972 Author: Jun Li Date: Mon Jan 20 06:43:19 2020 +0000 usb: typec: tcpci: mask event interrupts when remove driver This is to prevent any possible events generated while unregister tpcm port. Fixes: 74e656d6b055 ("staging: typec: Type-C Port Controller Interface driver (tcpci)") Signed-off-by: Li Jun Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1579502333-4145-1-git-send-email-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 943063b65d93fb396cab55764e1075e50e1cd331 Author: Stephen Boyd Date: Tue Jan 21 16:49:58 2020 -0800 platform/chrome: cros_ec: Drop unaligned.h include This include isn't used. Remove it. Signed-off-by: Stephen Boyd Signed-off-by: Enric Balletbo i Serra commit 60fb8a8e93ca94e752a509bb3f6f74068ccca739 Author: Stephen Boyd Date: Tue Jan 21 17:24:34 2020 -0800 platform/chrome: wilco_ec: Allow wilco to be compiled in COMPILE_TEST Enable this Kconfig on COMPILE_TEST enabled configs so we can get more build coverage. Signed-off-by: Stephen Boyd Signed-off-by: Enric Balletbo i Serra commit a532149c992eed9f8523d4ed5960b0068f213cd7 Author: Stephen Boyd Date: Tue Jan 21 16:40:32 2020 -0800 platform/chrome: wilco_ec: Add newlines to printks printk messages all require newlines, or it looks very odd in the log when messages are not on different lines. Add them. Cc: Nick Crews Cc: Daniel Campello Cc: Enric Balletbo i Serra Signed-off-by: Stephen Boyd Signed-off-by: Enric Balletbo i Serra commit e1f236efd9c579a29d7df75aa052127d0d975267 Author: Peter Robinson Date: Mon Jan 20 14:19:10 2020 +0000 usb: host: xhci-tegra: set MODULE_FIRMWARE for tegra186 Set the MODULE_FIRMWARE for tegra186, it's registered for 124/210 and ensures the firmware is available at the appropriate time such as in the initrd, else if the firmware is unavailable the driver fails with the following errors: tegra-xusb 3530000.usb: Direct firmware load for nvidia/tegra186/xusb.bin failed with error -2 tegra-xusb 3530000.usb: failed to request firmware: -2 tegra-xusb 3530000.usb: failed to load firmware: -2 tegra-xusb: probe of 3530000.usb failed with error -2 Fixes: 5f9be5f3f899 ("usb: host: xhci-tegra: Add Tegra186 XUSB support") Signed-off-by: Peter Robinson Acked-by: Thierry Reding Cc: stable Link: https://lore.kernel.org/r/20200120141910.116097-1-pbrobinson@gmail.com Signed-off-by: Greg Kroah-Hartman commit 10d3e38c7923853967cea97513213bba923dde64 Merge: 3634a4a80f3d 30c8fa3ec61a Author: Greg Kroah-Hartman Date: Wed Jan 22 10:04:39 2020 +0100 Merge tag 'icc-5.6-rc1' of https://git.linaro.org/people/georgi.djakov/linux into char-misc-next Georgi writes: interconnect patches for 5.6 Here are the interconnect patches for the 5.6-rc1 merge window. - New core helper functions for some common functionalities in drivers. - Improvements in the information exposed via debugfs. - Basic tracepoints support. - New interconnect driver for msm8916 platforms. - Misc fixes. Signed-off-by: Georgi Djakov * tag 'icc-5.6-rc1' of https://git.linaro.org/people/georgi.djakov/linux: interconnect: qcom: Add MSM8916 interconnect provider driver dt-bindings: interconnect: Add Qualcomm MSM8916 DT bindings interconnect: Check for valid path in icc_set_bw() interconnect: Print the tag in the debugfs summary interconnect: Add interconnect_graph file to debugfs interconnect: qcom: Use the standard aggregate function interconnect: Add a common standard aggregate function interconnect: Add basic tracepoints interconnect: Add a name to struct icc_path interconnect: Move internal structs into a separate file interconnect: qcom: Use the new common helper for node removal interconnect: Add a common helper for removing all nodes commit 3634a4a80f3d3d89545f04dd0145736a50c53659 Merge: 559e575a8946 28910cee898c Author: Greg Kroah-Hartman Date: Wed Jan 22 10:02:45 2020 +0100 Merge tag 'fpga-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga into char-misc-next Moritz writes: Here is the first set of FPGA changes for 5.6 The first two patches are minor cleanups to the DFL drivers, that remove unused warnings. The third patch removes a redundant error message to the ts73xx driver. The last patch removes a confusing print in case a call to devm_clk_get returns -EPROBE_DEFER. All patches have been reviewed on the mailing list and have been in the last couple of linux-next releases without issues. Signed-off-by: Moritz Fischer * tag 'fpga-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga: fpga: xilinx-pr-decoupler: Remove clk_get error message for probe defer fpga: remove redundant dev_err message fpga: dfl: afu: remove set but not used variable 'afu' fpga: dfl: fme: remove set but not used variable 'fme' commit 559e575a8946a6561dfe8880de341d4ef78d5994 Author: Tomas Winkler Date: Sun Jan 19 11:42:29 2020 +0200 mei: me: add comet point (lake) H device ids Add Comet Point device IDs for Comet Lake H platforms. Cc: Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200119094229.20116-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 0443b3f4436321e1098fdf74432c8867016339da Author: Quentin Deslandes Date: Tue Jan 21 10:40:24 2020 +0000 staging: axis-fifo: replace spinlock with mutex Following the device's documentation guidance, reading a packet from the device or writing a packet to it must be atomic. Previously, only reading device's vacancy (before writing on it) or occupancy (before reading from it) was locked. Hence, effectively reading the packet or writing the packet wasn't locked at all. However, reading a packet (and writing one, to a lesser extent) requires to read 3 different registers in a specific order, without missing one or else we should reset the device. This patch fixes the device's locking mechanism on the FIFO character device. As the device was using copy_from_user() and copy_to_user(), we need to replace spinlocks with mutexes. Signed-off-by: Quentin Deslandes Link: https://lore.kernel.org/r/20200121103958.12941-1-quentin.deslandes@itdev.co.uk Signed-off-by: Greg Kroah-Hartman commit b17028d289d37e828a66a6cfd614cd4723334ace Author: Ajay Singh Date: Fri Jan 17 10:31:27 2020 +0000 staging: wilc1000: remove unused code prior to throughput enhancement in SPI The firmware now uses throughput enhancement code by default for SPI so remove the previous implementation as its not used anymore. Removed the use of 'has_thrpt_enh' element as its always true. Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20200117160157.8706-5-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit 1d58fec42fdf6098d8e34c679d3377bb87866add Author: Ajay Singh Date: Fri Jan 17 10:31:26 2020 +0000 staging: wilc1000: added 'wilc_' prefix for 'struct assoc_resp' name Use 'wilc_' prefix for 'assoc_resp' struct to have proper naming convention. Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20200117160157.8706-4-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit c5295d1a41fe2f1bd0877f74817a3b63b989b10e Author: Ajay Singh Date: Fri Jan 17 10:31:25 2020 +0000 staging: wilc1000: move firmware API struct's to separate header file It's recommended to keep the 'struct' used for passing data to firmware in separate header file. So added 'fw.h' header file to keep struct's used to pass data to firmware. Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20200117160157.8706-3-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit 9d442d2b9add140ddc2c5de6a0ac93050dfaef16 Author: Ajay Singh Date: Fri Jan 17 10:31:23 2020 +0000 staging: wilc1000: remove use of infinite loop conditions Avoid the use of 'while (1)' infinite loop conditions. It's not recommended to have infinite loop in kernel code because a small bug can cause never ending loops so use terminator condition as suggested in full driver review [1]. [1]. https://lore.kernel.org/linux-wireless/20191023100313.52B3F606CF@smtp.codeaurora.org/ Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20200117160157.8706-2-ajay.kathat@microchip.com Signed-off-by: Greg Kroah-Hartman commit b5909c6d16fd4e3972b0cd48dedde08d55575342 Author: Jerry Lin Date: Tue Jan 21 10:46:21 2020 +0800 staging: kpc2000: rename variables with kpc namespace Some namings in kpc2000_i2c are too ambiguous that may causing confusion to the readers. Rename some variable, function and struct name to prefix with 'kpc_i2c' to eliminate confusions. Signed-off-by: Jerry Lin Link: https://lore.kernel.org/r/20200121024620.GA10842@compute1 Signed-off-by: Greg Kroah-Hartman commit 747a64bd01f869f8b987e17992bba1db8108161a Author: Malcolm Priestley Date: Sun Jan 19 12:04:34 2020 +0000 staging: vt6656: Remove memory buffer from vnt_download_firmware. The memory buffer is being done twice here as vnt_control_out passes it straight to kmemdup. Remove buffer and add const to the variable in vnt_control_out to pass the pointer to it. Signed-off-by: Malcolm Priestley Link: https://lore.kernel.org/r/be025ed0-204d-e957-4bc9-963e841fcb2c@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1ca9c731057994e5b1f98e9869127af61f3c0cd3 Author: Malcolm Priestley Date: Sun Jan 19 12:04:05 2020 +0000 staging: vt6656: Just check NEWRSR_DECRYPTOK for RX_FLAG_DECRYPTED. At present the driver does a number of checks for RX_FLAG_DECRYPTED. Remove all these and just pass check NEWRSR_DECRYPTOK mac80211 will handle the processing of the sk_buff and dispose of it. This means that mac80211 can do unsupported encryption modes on stack. Signed-off-by: Malcolm Priestley Link: https://lore.kernel.org/r/75bbaa08-2465-b057-64ce-b67933409bc6@gmail.com Signed-off-by: Greg Kroah-Hartman commit b653174327e989cbc97f545ce33d30e1fe9de532 Author: Malcolm Priestley Date: Sun Jan 19 12:03:41 2020 +0000 staging: vt6656: Use vnt_rx_tail struct for tail variables. Place tsf_time, sq, new_rsr, rssi, rsr and sq3 packed in the structure. Unused variables are removed along with skb_data and structure is placed beyond vnt_rx_header + pay_load_with_padding on skb->data. Signed-off-by: Malcolm Priestley Link: https://lore.kernel.org/r/6ac6eae0-7b71-fefe-9230-da3b345b634b@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8902ecd70b3e3f13370af9f9e0134ad16e46fb50 Author: Malcolm Priestley Date: Sun Jan 19 12:02:56 2020 +0000 staging: vt6656: create vnt rx header for sk_buff. vnt_rx_header contains the structure of the original variables wbk_status, rx_sts, rx_rate and pay_load_len packed. Replace all the old variables for the ones in this. Signed-off-by: Malcolm Priestley Link: https://lore.kernel.org/r/094ee227-b114-ee75-67f7-bf07f8de099f@gmail.com Signed-off-by: Greg Kroah-Hartman commit 743b2b7e08c76d3090373e9cd354edef6a0822b7 Author: Malcolm Priestley Date: Sun Jan 19 12:02:24 2020 +0000 staging: vt6656: Simplify RX finding bit rates The bit rate can be found by multiplying the rate value by 5. Use rx_bitrate to compared to sband bitrates removing the need to find it by hw_value. Signed-off-by: Malcolm Priestley Link: https://lore.kernel.org/r/50d3c4b8-6d17-4fae-ce9c-88a50614450f@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4d1356ac12f4d5180d0df345d85ff0ee42b89c72 Author: Andrey Shvetsov Date: Thu Jan 16 18:22:39 2020 +0100 staging: most: net: fix buffer overflow If the length of the socket buffer is 0xFFFFFFFF (max size for an unsigned int), then payload_len becomes 0xFFFFFFF1 after subtracting 14 (ETH_HLEN). Then, mdp_len is set to payload_len + 16 (MDP_HDR_LEN) which overflows and results in a value of 2. These values for payload_len and mdp_len will pass current buffer size checks. This patch checks if derived from skb->len sum may overflow. The check is based on the following idea: For any `unsigned V1, V2` and derived `unsigned SUM = V1 + V2`, `V1 + V2` overflows iif `SUM < V1`. Reported-by: Greg Kroah-Hartman Signed-off-by: Andrey Shvetsov Cc: stable Link: https://lore.kernel.org/r/20200116172238.6046-1-andrey.shvetsov@microchip.com Signed-off-by: Greg Kroah-Hartman commit 7084eddf6be94e73f8298c1a28078b91536f2975 Author: Jerry Snitselaar Date: Wed Oct 30 15:58:43 2019 -0700 tpm: Add tpm_version_major sysfs file Easily determining what TCG version a tpm device implements has been a pain point for userspace for a long time, so add a sysfs file to report the TCG major version of a tpm device. Also add an entry to Documentation/ABI/stable/sysfs-class-tpm describing the new file. Cc: Jarkko Sakkinen Cc: Mimi Zohar Cc: Peter Huewe Cc: Jason Gunthorpe Cc: linux-integrity@vger.kernel.org Signed-off-by: Jerry Snitselaar Reviewed-by: Mimi Zohar Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 3063da91ca569ccafd6d07cd877d6d3588b2c85a Author: Michael Straube Date: Sat Jan 18 20:53:05 2020 +0100 staging: rtl8712: simplify evm_db2percentage() Use clamp() to simplify function evm_db2percentage() and reduce object file size. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200118195305.16685-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 38c03040e24f7066cfa5b1718d07f0700ecb400b Author: Michael Straube Date: Sat Jan 18 20:53:04 2020 +0100 staging: rtl8192u: simplify rtl819x_evm_dbtopercentage() Use clamp() to simplify function rtl819x_evm_dbtopercentage() and reduce object file size. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200118195305.16685-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 05ecd1038b0c06c4546e28fbe67732c3fa28ae10 Author: Michael Straube Date: Sat Jan 18 20:53:03 2020 +0100 staging: rtl8192e: simplify rtl92e_evm_db_to_percent() Use clamp() to simplify function rtl92e_evm_db_to_percent() and reduce object file size. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200118195305.16685-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3cdab8823a50c208dbacaa8f1fb4a82ed2227ad9 Author: Michael Straube Date: Sat Jan 18 18:33:43 2020 +0100 staging: rtl8188eu: remove unused enum and defines IQK_BB_REG_NUM_MAX, RTL8711_RF_MAX_SENS, RTL8711_RF_DEF_SENS, NUM_REGULATORYS and enum _RTL8712_RF_MIMO_CONFIG_ are not used in the driver code, remove them. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200118173343.32405-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2dda0602859350b3868367601253d29eeccfd50a Author: Michael Straube Date: Sat Jan 18 18:33:42 2020 +0100 staging: rtl8188eu: remove redundant defines Remove redundant defines from hal8188e_phy_cfg.h and rtl8188e_dm.h. All of them are defined in odm.h with the same values. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200118173343.32405-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0b4d1d0da7e16f6faa572a8c7f865ff82e097819 Author: Michael Straube Date: Sat Jan 18 18:33:41 2020 +0100 staging: rtl8188eu: remove else after break or return Remove unnecessary else after break or return to improve readability and clear checkpatch warnings. WARNING: else is not generally useful after a break or return Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200118173343.32405-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 27f391a5d628f860e2245f59f97461cbd22433f1 Author: Felipe Cardoso Resende Date: Thu Jan 16 21:42:14 2020 -0300 Staging: kpc2000: Remove warning: "dubious: x | !y" detected by sparse Sparse complains about "dubious: x | !y". This patch adds some macros to make it clear if a flag will be enabled or not so Sparse stops complaining about dubious code construct. Signed-off-by: Felipe Cardoso Resende Link: https://lore.kernel.org/r/20200117004214.GA1800@felipe-pc Signed-off-by: Greg Kroah-Hartman commit c269e876c5affd4d240d5fc85b29e9c9942d8465 Author: Jerry Snitselaar Date: Fri Oct 25 12:36:28 2019 -0700 tpm: Update mailing list contact information in sysfs-class-tpm All of the entries in Documentation/ABI/stable/sysfs-class-tpm point to the old tpmdd-devel mailing list. This patch updates the entries to point to linux-intergrity. Cc: Jarkko Sakkinen Cc: Peter Huewe Cc: Jason Gunthorpe Cc: linux-integrity@vger.kernel.org Signed-off-by: Jerry Snitselaar Acked-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 0bc81767c5bd9d005fae1099fb39eb3688370cb1 Author: Ard Biesheuvel Date: Fri Jan 17 17:43:18 2020 +0100 crypto: arm/chacha - fix build failured when kernel mode NEON is disabled When the ARM accelerated ChaCha driver is built as part of a configuration that has kernel mode NEON disabled, we expect the compiler to propagate the build time constant expression IS_ENABLED(CONFIG_KERNEL_MODE_NEON) in a way that eliminates all the cross-object references to the actual NEON routines, which allows the chacha-neon-core.o object to be omitted from the build entirely. Unfortunately, this fails to work as expected in some cases, and we may end up with a build error such as chacha-glue.c:(.text+0xc0): undefined reference to `chacha_4block_xor_neon' caused by the fact that chacha_doneon() has not been eliminated from the object code, even though it will never be called in practice. Let's fix this by adding some IS_ENABLED(CONFIG_KERNEL_MODE_NEON) tests that are not strictly needed from a logical point of view, but should help the compiler infer that the NEON code paths are unreachable in those cases. Fixes: b36d8c09e710c71f ("crypto: arm/chacha - remove dependency on generic ...") Reported-by: Russell King Cc: Arnd Bergmann Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 7e2b89fb4a2e636ad94fe47b76257c3cc0234666 Author: Horia Geantă Date: Fri Jan 17 16:35:13 2020 +0200 crypto: caam - add support for i.MX8M Plus Add support for the crypto engine used in i.mx8mp (i.MX 8M "Plus"), which is very similar to the one used in i.mx8mq, i.mx8mm, i.mx8mn. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit f9e7fe32a792726186301423ff63a465d63386e1 Author: Jason A. Donenfeld Date: Fri Jan 17 11:42:22 2020 +0100 crypto: x86/poly1305 - emit does base conversion itself The emit code does optional base conversion itself in assembly, so we don't need to do that here. Also, neither one of these functions uses simd instructions, so checking for that doesn't make sense either. Signed-off-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit 2203d3f7971d28a2bcd8e2439bcead9069089e9a Author: Colin Ian King Date: Fri Jan 17 09:28:19 2020 +0000 crypto: hisilicon - fix spelling mistake "disgest" -> "digest" There is a spelling mistake in an error message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu commit 72c7943792c9e7788ddd182337bcf8f650cf56f5 Author: Jason A. Donenfeld Date: Thu Jan 16 21:26:34 2020 +0100 crypto: chacha20poly1305 - add back missing test vectors and test chunking When this was originally ported, the 12-byte nonce vectors were left out to keep things simple. I agree that we don't need nor want a library interface for 12-byte nonces. But these test vectors were specially crafted to look at issues in the underlying primitives and related interactions. Therefore, we actually want to keep around all of the test vectors, and simply have a helper function to test them with. Secondly, the sglist-based chunking code in the library interface is rather complicated, so this adds a developer-only test for ensuring that all the book keeping is correct, across a wide array of possibilities. Signed-off-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit 1f6868995326cc82102049e349d8dbd116bdb656 Author: Jason A. Donenfeld Date: Thu Jan 16 18:23:55 2020 +0100 crypto: x86/poly1305 - fix .gitignore typo Admist the kbuild robot induced changes, the .gitignore file for the generated file wasn't updated with the non-clashing filename. This commit adjusts that. Signed-off-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit 48d625e4c4cec813cdd1e439864a8ffc0b5081f1 Author: Colin Ian King Date: Thu Jan 16 15:48:52 2020 +0000 tee: fix memory allocation failure checks on drv_data and amdtee Currently the memory allocation failure checks on drv_data and amdtee are using IS_ERR rather than checking for a null pointer. Fix these checks to use the conventional null pointer check. Addresses-Coverity: ("Dereference null return") Fixes: 757cc3e9ff1d ("tee: add AMD-TEE driver") Signed-off-by: Colin Ian King Reviewed-by: Rijo Thomas Acked-by: Jens Wiklander Signed-off-by: Herbert Xu commit 38c0d0abf2685bf77a844e00f104038dd07257a6 Author: Gilad Ben-Yossef Date: Thu Jan 16 12:14:46 2020 +0200 crypto: ccree - erase unneeded inline funcs These inline versions of PM function for the case of CONFIG_PM is not set are never used. Erase them. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit bc88606ac030c4d89976e4dd8f00f31ba1640f2f Author: Gilad Ben-Yossef Date: Thu Jan 16 12:14:45 2020 +0200 crypto: ccree - make cc_pm_put_suspend() void cc_pm_put_suspend() return value was never checked and is not useful. Turn it into a void functions. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit 33c4b310981f351ce8fde485a8450177e4f3d133 Author: Gilad Ben-Yossef Date: Thu Jan 16 12:14:44 2020 +0200 crypto: ccree - split overloaded usage of irq field We were using the irq field of the drvdata struct in an overloaded fahsion - saving the IRQ number during init and then storing the pending itnerrupt sources during interrupt in the same field. This worked because these usage are mutually exclusive but are confusing. So simplify the code and change the init use case to use a simple local variable. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit 15fd2566bf54ee4d4781d8f170acfc9472a1541f Author: Gilad Ben-Yossef Date: Thu Jan 16 12:14:43 2020 +0200 crypto: ccree - fix PM race condition The PM code was racy, possibly causing the driver to submit requests to a powered down device. Fix the race and while at it simplify the PM code. Signed-off-by: Gilad Ben-Yossef Fixes: 1358c13a48c4 ("crypto: ccree - fix resume race condition on init") Cc: stable@kernel.org # v4.20 Signed-off-by: Herbert Xu commit 5c83e8ec4d51ac4cc58482ed04297e6882b32a09 Author: Ofir Drang Date: Thu Jan 16 12:14:42 2020 +0200 crypto: ccree - fix FDE descriptor sequence In FDE mode (xts, essiv and bitlocker) the cryptocell hardware requires that the the XEX key will be loaded after Key1. Signed-off-by: Ofir Drang Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu commit 8b0c4366cb08d5064b882e82e31b025da8b36c87 Author: Gilad Ben-Yossef Date: Thu Jan 16 12:14:41 2020 +0200 crypto: ccree - cc_do_send_request() is void func cc_do_send_request() cannot fail and always returns -EINPROGRESS. Turn it into a void function and simplify code. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit cedca59fae5834af8445b403c66c9953754375d7 Author: Gilad Ben-Yossef Date: Thu Jan 16 12:14:40 2020 +0200 crypto: ccree - fix pm wrongful error reporting pm_runtime_get_sync() can return 1 as a valid (none error) return code. Treat it as such. Signed-off-by: Gilad Ben-Yossef Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Herbert Xu commit c7b31c88da242153b3c2a2afe8486ae5c5f36556 Author: Gilad Ben-Yossef Date: Thu Jan 16 12:14:39 2020 +0200 crypto: ccree - turn errors to debug msgs We have several loud error log messages that are already reported via the normal return code mechanism and produce a lot of noise when the new testmgr extra test are enabled. Turn these into debug only messages Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit 2a6bc713f1cef32e39e3c4e6f2e1a9849da6379c Author: Gilad Ben-Yossef Date: Thu Jan 16 12:14:38 2020 +0200 crypto: ccree - fix AEAD decrypt auth fail On AEAD decryption authentication failure we are suppose to zero out the output plaintext buffer. However, we've missed skipping the optional associated data that may prefix the ciphertext. This commit fixes this issue. Signed-off-by: Gilad Ben-Yossef Fixes: e88b27c8eaa8 ("crypto: ccree - use std api sg_zero_buffer") Cc: stable@vger.kernel.org Signed-off-by: Herbert Xu commit 684cf266eb04911825a6de10dadd188cf801d063 Author: Hadar Gat Date: Thu Jan 16 12:14:37 2020 +0200 crypto: ccree - fix typo in comment Fixed a typo in a commnet. Signed-off-by: Hadar Gat Signed-off-by: Herbert Xu commit 509f2885a2d216e1cfe7d995ce39ede120ddebc0 Author: Hadar Gat Date: Thu Jan 16 12:14:36 2020 +0200 crypto: ccree - fix typos in error msgs Fixed typos in ccree error msgs. Signed-off-by: Hadar Gat Signed-off-by: Herbert Xu commit b46f36c05ab40d8339ec08809f89e45b1817cf86 Author: Tudor Ambarus Date: Wed Jan 15 12:53:53 2020 +0000 crypto: atmel-{aes,sha,tdes} - Retire crypto_platform_data These drivers no longer need it as they are only probed via DT. crypto_platform_data was allocated but unused, so remove it. This is a follow up for: commit 45a536e3a7e0 ("crypto: atmel-tdes - Retire dma_request_slave_channel_compat()") commit db28512f48e2 ("crypto: atmel-sha - Retire dma_request_slave_channel_compat()") commit 62f72cbdcf02 ("crypto: atmel-aes - Retire dma_request_slave_channel_compat()") Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 41419a289010836bd759bf7e254fe041a3dc52d2 Author: Kees Cook Date: Tue Jan 14 19:57:29 2020 -0800 crypto: x86/sha - Eliminate casts on asm implementations In order to avoid CFI function prototype mismatches, this removes the casts on assembly implementations of sha1/256/512 accelerators. The safety checks from BUILD_BUG_ON() remain. Additionally, this renames various arguments for clarity, as suggested by Eric Biggers. Signed-off-by: Kees Cook Signed-off-by: Herbert Xu commit e0437dc6470c46a116aeb65769698dbc1487ed16 Author: Vinay Kumar Yadav Date: Tue Jan 14 17:58:48 2020 +0530 crypto: chtls - Fixed listen fail when max stid range reached Do not return error when max stid reached, to Fallback to nic mode. Signed-off-by: Vinay Kumar Yadav Signed-off-by: Herbert Xu commit c9f0d33c367fb4b8fd71ea70fc7fa22552d824a0 Author: Vinay Kumar Yadav Date: Tue Jan 14 17:58:47 2020 +0530 crypto: chtls - Corrected function call context corrected function call context and moved t4_defer_reply to apropriate location. Signed-off-by: Vinay Kumar Yadav Signed-off-by: Herbert Xu commit 53146d152510584c2034c62778a7cbca25743ce9 Author: Horia Geantă Date: Mon Jan 13 10:54:35 2020 +0200 crypto: caam/qi2 - fix typo in algorithm's driver name Fixes: 8d818c105501 ("crypto: caam/qi2 - add DPAA2-CAAM driver") Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit fd2d11cc8af46f50a71b16590275d5bad550c504 Merge: c20c76acf6ec def9d2780727 Author: Greg Kroah-Hartman Date: Wed Jan 22 09:08:01 2020 +0100 Merge 5.5-rc7 into char-misc-next We need the char-misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit c318f074d9fdeae16e19cbb2ed53b50d2bcdfdb8 Merge: 7b2d7faa09fc def9d2780727 Author: Greg Kroah-Hartman Date: Wed Jan 22 09:05:34 2020 +0100 Merge 5.5-rc7 into staging-next We want the staging fixes in here as well Signed-off-by: Greg Kroah-Hartman commit 0779221e7166c6865555bb6d29bf6af76fc316bd Author: Ard Biesheuvel Date: Sat Jan 18 17:57:05 2020 +0100 efi/x86: Disallow efi=old_map in mixed mode Before: 1f299fad1e31: ("efi/x86: Limit EFI old memory map to SGI UV machines") enabling the old EFI memory map on mixed mode systems disabled EFI runtime services altogether. Given that efi=old_map is a debug feature designed to work around firmware problems related to EFI runtime services, and disabling them can be achieved more straightforwardly using 'noefi' or 'efi=noruntime', it makes more sense to ignore efi=old_map on mixed mode systems. Currently, we do neither, and try to use the old memory map in combination with mixed mode routines, which results in crashes, so let's fix this by making efi=old_map functional on native systems only. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar commit 8728497895794d1f207a836e02dae762ad175d56 Author: Josh Poimboeuf Date: Mon Jan 20 12:14:09 2020 -0600 objtool: Skip samples subdirectory The code in the 'samples' subdirectory isn't part of the kernel, so there's no need to validate it. Reported-by: Randy Dunlap Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/c4cb4ef635ec606454ab834cb49fc3e9381fb1b1.1579543924.git.jpoimboe@redhat.com commit 8580bed7e751e6d4f17881e059daf3cb37ba4717 Author: Shile Zhang Date: Mon Jan 20 12:14:08 2020 -0600 objtool: Fix ARCH=x86_64 build error Building objtool with ARCH=x86_64 fails with: $make ARCH=x86_64 -C tools/objtool ... CC arch/x86/decode.o arch/x86/decode.c:10:22: fatal error: asm/insn.h: No such file or directory #include ^ compilation terminated. mv: cannot stat ‘arch/x86/.decode.o.tmp’: No such file or directory make[2]: *** [arch/x86/decode.o] Error 1 ... The root cause is that the command-line variable 'ARCH' cannot be overridden. It can be replaced by 'SRCARCH', which is defined in 'tools/scripts/Makefile.arch'. Signed-off-by: Shile Zhang Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Reviewed-by: Kamalesh Babulal Link: https://lore.kernel.org/r/d5d11370ae116df6c653493acd300ec3d7f5e925.1579543924.git.jpoimboe@redhat.com commit 6ec14aa7a58a1c2fb303692f8cb1ff82d9abd10a Author: Olof Johansson Date: Mon Jan 20 12:14:07 2020 -0600 objtool: Silence build output The sync-check.sh script prints out the path due to a "cd -" at the end of the script, even on silent builds. This isn't even needed, since the script is executed in our build instead of sourced (so it won't change the working directory of the surrounding build anyway). Just remove the cd to make the build silent. Fixes: 2ffd84ae973b ("objtool: Update sync-check.sh from perf's check-headers.sh") Signed-off-by: Olof Johansson Signed-off-by: Josh Poimboeuf Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/cb002857fafa8186cfb9c3e43fb62e4108a1bab9.1579543924.git.jpoimboe@redhat.com commit 9d69cd82fe02619ec68e5d770283576712188874 Author: Jun Li Date: Wed Jan 22 01:47:02 2020 +0000 usb: chipidea: add inline for ci_hdrc_host_driver_init if host is not defined Otherwise, there is a build warning if this header file is included by non host source file, eg, otg.c. Signed-off-by: Jun Li Signed-off-by: Peter Chen Link: https://lore.kernel.org/r/20200122014639.22667-3-peter.chen@nxp.com Signed-off-by: Greg Kroah-Hartman commit 27bf5be8fbe0b60b1f1aa13083198dac64fc4249 Author: Jun Li Date: Wed Jan 22 01:46:59 2020 +0000 usb: chipidea: handle single role for usb role class If usb port is configed to be single role, but usb role class is trying to set unavailable role, don't try to do role change. Signed-off-by: Jun Li Signed-off-by: Peter Chen Link: https://lore.kernel.org/r/20200122014639.22667-2-peter.chen@nxp.com Signed-off-by: Greg Kroah-Hartman commit 734b188136faed64b528a5a5559a32a2b8294c39 Author: Samuel Holland Date: Tue Jan 21 22:04:00 2020 -0800 Input: axp20x-pek - enable wakeup for all AXP variants There are many devices, including several mobile battery-powered devices, using other AXP variants as their PMIC. Allow them to use the power key as a wakeup source. Reviewed-by: Hans de Goede Signed-off-by: Samuel Holland Link: https://lore.kernel.org/r/20200115051253.32603-3-samuel@sholland.org Signed-off-by: Dmitry Torokhov commit fe77f9bb1185e6986fd0246cf16f02954d7a09bf Author: Samuel Holland Date: Tue Jan 21 22:03:14 2020 -0800 Input: axp20x-pek - respect userspace wakeup configuration Unlike most other power button drivers, this driver unconditionally enables its wakeup IRQ. It should be using device_may_wakeup() to respect the userspace configuration of wakeup sources. Because the AXP20x MFD device uses regmap-irq, the AXP20x PEK IRQs are nested off of regmap-irq's threaded interrupt handler. The device core ignores such interrupts, so to actually disable wakeup, we must explicitly disable all non-wakeup interrupts during suspend. Signed-off-by: Samuel Holland Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20200115051253.32603-2-samuel@sholland.org Signed-off-by: Dmitry Torokhov commit 3bed1b7b9d79ca40e41e3af130931a3225e951a3 Author: Masahiro Yamada Date: Sat Jan 18 02:14:35 2020 +0900 kbuild: use -S instead of -E for precise cc-option test in Kconfig Currently, -E (stop after the preprocessing stage) is used to check whether the given compiler flag is supported. While it is faster than -S (or -c), it can be false-positive. You need to run the compilation proper to check the flag more precisely. For example, -E and -S disagree about the support of "--param asan-instrument-allocas=1". $ gcc -Werror --param asan-instrument-allocas=1 -E -x c /dev/null -o /dev/null $ echo $? 0 $ gcc -Werror --param asan-instrument-allocas=1 -S -x c /dev/null -o /dev/null cc1: error: invalid --param name ‘asan-instrument-allocas’; did you mean ‘asan-instrument-writes’? $ echo $? 1 Signed-off-by: Masahiro Yamada commit 660b94e0d8fecc54478384e0e43c3f8fe931957c Merge: e42617b825f8 6c3090520554 Author: Stephen Boyd Date: Tue Jan 21 16:18:11 2020 -0800 Merge tag 'ti-clk-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into clk-ti Pull TI clk driver updates from Tero Kristo: - cam, vpe and sgx clock support for dra7 - fix gmac main clock for dra7 - aess clock support for omap5 - move dra7-atl clock header to correct location - fix hidden node name dependency on clkctrl clocks * tag 'ti-clk-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux: clk: ti: clkctrl: Fix hidden dependency to node name clk: ti: add clkctrl data dra7 sgx clk: ti: omap5: Add missing AESS clock clk: ti: dra7: fix parent for gmac_clkctrl clk: ti: dra7: add vpe clkctrl data clk: ti: dra7: add cam clkctrl data dt-bindings: clock: Move ti-dra7-atl.h to dt-bindings/clock commit cb36017a8b1b582bcb7063e44c598c3e36aa0228 Author: Baolin Wang Date: Wed Jan 8 11:23:46 2020 +0800 hwspinlock: sirf: Use devm_hwspin_lock_register() to register hwlock controller Use devm_hwspin_lock_register() to register the hwlock controller instead of unregistering the hwlock controller explicitly when removing the device. Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/8f94e67b5f9af20a93418a2fc9cc71b194f1285c.1578453662.git.baolin.wang7@gmail.com Signed-off-by: Bjorn Andersson commit 8f2a0dc87dad7f5c644fc9210a1efb4617acd6a1 Author: Baolin Wang Date: Wed Jan 8 11:23:45 2020 +0800 hwspinlock: sirf: Remove redundant PM runtime functions Since the hwspinlock core has changed the PM runtime to be optional, and the SIRF hardware spinlock has no pm runtime requirement, thus remove these redundant PM runtime functions. Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/c921e391aa2a652d8d6ae0e4041202cec9d917e7.1578453662.git.baolin.wang7@gmail.com Signed-off-by: Bjorn Andersson commit 77d99a6a9df2ac3d1832b408123e48549d1e01fd Author: Baolin Wang Date: Wed Jan 8 11:23:44 2020 +0800 hwspinlock: sirf: Change to use devm_platform_ioremap_resource() Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together, which can simpify the code. Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/dfa043f317c609a6172468ac11598968dd751bce.1578453662.git.baolin.wang7@gmail.com Signed-off-by: Bjorn Andersson commit 498e165274f3296246bf5fd2dfa0d55b623866c1 Merge: e42617b825f8 9c140d992676 Author: Stephen Boyd Date: Tue Jan 21 16:14:48 2020 -0800 Merge tag 'imx-clk-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-imx Pull i.MX clk driver updates from Shawn Guo: - A series from Abel Vesa to do some trivial cleanups which will be helpful for i.MX clock driver switching to clk_hw based API - A series from Anson Huang to add i.MX8MP clock driver support - Disable non-functional divider between pll4_audio_div and pll4_post_div on imx6q - Fix watchdog2 clock name typo in imx7ulp clock driver - A couple of patches from Leonard Crestez to set CLK_GET_RATE_NOCACHE flag for DRAM related clocks on i.MX8M SoCs - Suppress bind attrs for i.MX8M clock driver to avoid the possibility of reloading the driver at runtime - Add a big comment in imx8qxp-lpcg driver to tell why devm_platform_ioremap_resource() shouldn't be used for the driver - A correction on i.MX8MN usb1_ctrl parent clock setting - A couple of trivial cleanup on clk-divider-gate driver - A series from Peng Fan to convert i.MX8M clock drivers to clk_hw based API * tag 'imx-clk-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (32 commits) clk: imx: Add support for i.MX8MP clock driver dt-bindings: imx: Add clock binding doc for i.MX8MP clk: imx: gate4: Switch imx_clk_gate4_flags() to clk_hw based API clk: imx: imx8mq: Switch to clk_hw based API clk: imx: imx8mm: Switch to clk_hw based API clk: imx: imx8mn: Switch to clk_hw based API clk: imx: Remove __init for imx_obtain_fixed_clk_hw() API clk: imx: gate3: Switch to clk_hw based API clk: imx: add hw API imx_clk_hw_mux2_flags clk: imx: add imx_unregister_hw_clocks clk: imx: clk-composite-8m: Switch to clk_hw based API clk: imx: clk-pll14xx: Switch to clk_hw based API clk: imx7up: Rename the clks to hws clk: imx: Rename the imx_clk_divider_gate to imply it's clk_hw based clk: imx: Rename the imx_clk_pfdv2 to imply it's clk_hw based clk: imx: Rename the imx_clk_pllv4 to imply it's clk_hw based clk: imx: Rename sccg and frac pll register to suggest clk_hw clk: imx: imx7ulp composite: Rename to show is clk_hw based clk: imx: pllv2: Switch to clk_hw based API clk: imx: pllv1: Switch to clk_hw based API ... commit 42f291ebfdd83a5bf04254f6bdc169f6e5a4152b Author: Baolin Wang Date: Wed Jan 8 11:14:00 2020 +0800 hwspinlock: omap: Use devm_kzalloc() to allocate memory Use devm_kzalloc() to allocate memory, which can simplify the error handling. Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/c066ad704c1a5fd52c3002cac80ddd59b3901b01.1578453062.git.baolin.wang7@gmail.com Signed-off-by: Bjorn Andersson commit fa9ae3057d7aa46bba99fe43e53fee8ce3617125 Merge: e42617b825f8 9c232d324bfa Author: Stephen Boyd Date: Tue Jan 21 16:11:18 2020 -0800 Merge tag 'sunxi-clk-for-5.6' 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 set of patches for sunxi, with a bunch of them required to enable the MBUS controller, and two patches to enable cpufreq on the A64. * tag 'sunxi-clk-for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi: a23/a33: Export the MIPI PLL clk: sunxi: a31: Export the MIPI PLL clk: sunxi-ng: a64: export CLK_CPUX clock for DVFS clk: sunxi-ng: add mux and pll notifiers for A64 CPU clock clk: sunxi-ng: r40: Export MBUS clock clk: sunxi: use of_device_get_match_data commit bf2740068a87e258ccc695d366c8a2c05b46de71 Author: Baolin Wang Date: Wed Jan 8 11:13:59 2020 +0800 hwspinlock: omap: Change to use devm_platform_ioremap_resource() Use the new helper that wraps the calls to platform_get_resource() and devm_ioremap_resource() together, which can simpify the code. Meanwhile renaming the error label to make more sense after removing iounmap(). Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/6c09c5034a7e68fdfc22d2cb5daa375bccb33a66.1578453062.git.baolin.wang7@gmail.com Signed-off-by: Bjorn Andersson commit ed0611a604297a642c3fbec86d3482d580b4f764 Author: Baolin Wang Date: Wed Jan 8 11:09:11 2020 +0800 hwspinlock: qcom: Use devm_hwspin_lock_register() to register hwlock controller Use devm_hwspin_lock_register() to register the hwlock controller instead of unregistering the hwlock controller explicitly when removing the device. Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/d69ad8611a68b0cac3c927d19901f3c113c5435c.1578452735.git.baolin.wang7@gmail.com Signed-off-by: Bjorn Andersson commit 98ec52ad814013042e0ed386dcfb0c571782e844 Author: Baolin Wang Date: Wed Jan 8 11:09:10 2020 +0800 hwspinlock: qcom: Remove redundant PM runtime functions Since the hwspinlock core has changed the PM runtime to be optional, and the Qualcomm hardware spinlock has no pm runtime requirement, thus remove these redundant PM runtime functions. Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/e0bb751feb7af709f92e52a07d0e8ebcf1ee44ff.1578452735.git.baolin.wang7@gmail.com Signed-off-by: Bjorn Andersson commit 532f49a6f19a153e202b5a174f8556fd50c36dd4 Author: Dan Carpenter Date: Fri Jan 17 08:30:07 2020 +0300 tracing/boot: Fix an IS_ERR() vs NULL bug The trace_array_get_by_name() function doesn't return error pointers, it returns NULL on error. Link: http://lkml.kernel.org/r/20200117053007.5h2juv272pokqhtq@kili.mountain Fixes: 4f712a4d04a4 ("tracing/boot: Add instance node support") Acked-by: Masami Hiramatsu Signed-off-by: Dan Carpenter Signed-off-by: Steven Rostedt (VMware) commit 141597204ea2dc173668c8cd7202c4bac2b0c476 Author: Alex Shi Date: Tue Jan 21 13:54:46 2020 +0800 tracing: Remove unused TRACE_SEQ_BUF_USED This macro isn't used from commit 3a161d99c43c ("tracing: Create seq_buf layer in trace_seq"). so no needs to keep it. Link: http://lkml.kernel.org/r/1579586086-45543-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Signed-off-by: Steven Rostedt (VMware) commit b83479482ff6f856b1308a17768f228be779543a Author: Alex Shi Date: Tue Jan 21 13:54:40 2020 +0800 ring-buffer: Remove abandoned macro RB_MISSED_FLAGS This macro isn't used since commit d325c402964e ("ring-buffer: Remove unused function ring_buffer_page_len()"), so better to remove it. Link: http://lkml.kernel.org/r/1579586080-45300-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Signed-off-by: Steven Rostedt (VMware) commit 0c2caf75aa40b2622900ed47ff59cf342a4b5b09 Author: Sibi Sankar Date: Fri Jan 17 19:21:29 2020 +0530 remoteproc: qcom: q6v5-mss: Rename boot status timeout Rename the FSM timeout on SC7180 to BOOT_STATUS_TIMEOUT_US. Reviewed-by: Evan Green Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200117135130.3605-4-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 7e0f8688798c72ba29c50abb7156c40c72954290 Author: Sibi Sankar Date: Fri Jan 17 19:21:28 2020 +0530 remoteproc: qcom: q6v5-mss: Improve readability across clk handling Define CLKEN and CLKOFF for improving readability of Q6SS clock handling. Reviewed-by: Evan Green Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200117135130.3605-3-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit bcc717ed95dea6c6b87013e97f39ee393aed0487 Author: Colin Ian King Date: Thu Jan 16 09:22:06 2020 +0000 tools: bootconfig: Fix spelling mistake "faile" -> "failed" There are two spelling mistakes in printf statements, fix these. Link: http://lkml.kernel.org/r/20200116092206.52192-1-colin.king@canonical.com Acked-by: Masami Hiramatsu Signed-off-by: Colin Ian King Signed-off-by: Steven Rostedt (VMware) commit b8381ce7aa8ef1ab5a79bf710508e504c494acf7 Author: Masami Hiramatsu Date: Mon Jan 20 12:23:23 2020 +0900 Documentation: tracing: Fix typos in boot-time tracing documentation Fix typos in boottime-trace.rst according to Randy's suggestions. Link: http://lkml.kernel.org/r/157949060335.25888.13153184562531693684.stgit@devnote2 Suggested-by: Randy Dunlap Acked-by: Randy Dunlap Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit a4798eb42a261ff39d991b198a09b840c11010d5 Author: Masami Hiramatsu Date: Mon Jan 20 12:23:12 2020 +0900 Documentation: bootconfig: Fix typos in bootconfig documentation Fix typos in bootconfig.rst according to Randy's suggestions. Link: http://lkml.kernel.org/r/157949059219.25888.16939971423610233631.stgit@devnote2 Suggested-by: Randy Dunlap Acked-by: Randy Dunlap Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 0947db01d9b9fd77a627e501fe563bdaf4c724a1 Author: Masami Hiramatsu Date: Mon Jan 20 12:23:00 2020 +0900 bootconfig: Fix Kconfig help message for BOOT_CONFIG Fix Kconfig help message since the bootconfig file is only available to be appended to initramfs. And also add a reference to the documentation. Link: http://lkml.kernel.org/r/157949058031.25888.18399447161895787505.stgit@devnote2 Reported-by: Randy Dunlap Acked-by: Randy Dunlap Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 43a825afc91e2b06af1e8e7422198e759c2c5e20 Author: Björn Töpel Date: Mon Jan 20 10:29:17 2020 +0100 xsk, net: Make sock_def_readable() have external linkage XDP sockets use the default implementation of struct sock's sk_data_ready callback, which is sock_def_readable(). This function is called in the XDP socket fast-path, and involves a retpoline. By letting sock_def_readable() have external linkage, and being called directly, the retpoline can be avoided. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200120092917.13949-1-bjorn.topel@gmail.com commit 9b0b308a1586f620a49c50605ae8abf509190661 Merge: 498f2a4be634 02a93929e3e4 Author: Olof Johansson Date: Tue Jan 21 15:07:31 2020 -0800 Merge tag 'zynq-dt-for-v5.6-v2' of https://github.com/Xilinx/linux-xlnx into arm/dt ARM: dts: zynq: DT changes for v5.6 v2 - Enable coresight topology for Zynq * tag 'zynq-dt-for-v5.6-v2' of https://github.com/Xilinx/linux-xlnx: ARM: dts: zynq: enablement of coresight topology Link: https://lore.kernel.org/r/5db334df-89b5-1d07-3884-93f77b0f4e60@monstr.eu Signed-off-by: Olof Johansson commit 31a7d26fbc51a39292bf9911f9e9efdf6d8e22b2 Merge: 21473e16b116 6c6b3f1f260b Author: Olof Johansson Date: Tue Jan 21 15:07:03 2020 -0800 Merge tag 'zynq-soc-for-v5.6' of https://github.com/Xilinx/linux-xlnx into arm/soc ARM: Xilinx Zynq SoC patches for v5.6 - Fix cpuid handling logic in platform SMP startup code * tag 'zynq-soc-for-v5.6' of https://github.com/Xilinx/linux-xlnx: ARM: zynq: use physical cpuid in zynq_slcr_cpu_stop/start Link: https://lore.kernel.org/r/50dec3cf-5f80-69be-c3d1-cc14b9bce5ff@monstr.eu Signed-off-by: Olof Johansson commit 498f2a4be634d93a53fee825082dfd20982fbb77 Merge: c14e723e4074 5a25e646902f Author: Olof Johansson Date: Tue Jan 21 15:06:09 2020 -0800 Merge tag 'zynqmp-dt-for-v5.6' of https://github.com/Xilinx/linux-xlnx into arm/dt arm64: dts: zynqmp: DT changes for v5.6 - Switch from fixed to firmware based clock driver - Wire power domain driver - Wire all ina226 chips through IIO and IIO hwmon drivers - Add missing dr_mode property to usb nodes - Use gpio-line-names property instead of comments - Use clock-output-names for si570 differentiation - Minor DT fixes * tag 'zynqmp-dt-for-v5.6' of https://github.com/Xilinx/linux-xlnx: (21 commits) arm64: zynqmp: Add label property to all ina226 on zcu106 arm64: zynqmp: Enable iio-hwmon for ina226 on zcu106 arm64: zynqmp: Add label property to all ina226 on zcu102 arm64: zynqmp: Enable iio-hwmon for ina226 on zcu102 arm64: zynqmp: Add label property to all ina226 on zcu111 arm64: zynqmp: Enable iio-hwmon for ina226 on zcu111 arm64: zynqmp: Enable iio-hwmon for ina226 on zcu100 arm64: zynqmp: Setup default number of chipselects for zcu100 arm64: zynqmp: Remove broken-cd from zcu100-revC arm64: zynqmp: Fix the si570 clock frequency on zcu111 arm64: zynqmp: Setup clock-output-names for si570 chips arm64: zynqmp: Turn comment to gpio-line-names arm64: zynqmp: Fix address for tca6416_u97 chip on zcu104 arm64: zynqmp: Remove addition number in node name arm64: zynqmp: Use ethernet-phy as node name for ethernet phys arm64: dts: xilinx: Add the power nodes for zynqmp arm64: dts: xilinx: Remove dtsi for fixed clock arm64: dts: xilinx: Add the clock nodes for zynqmp arm64: zynqmp: Add dr_mode property to usb node arm64: dts: zynqmp: Use decimal values for drm-clock properties ... Link: https://lore.kernel.org/r/c70d2efa-9ee2-a764-5248-0e5bfbf29f8a@monstr.eu Signed-off-by: Olof Johansson commit 88b4750151a2739761bb1af7fedeae1ff5d9aed9 Merge: 684415d0de30 ffdbae28d9d1 Author: Olof Johansson Date: Tue Jan 21 15:05:13 2020 -0800 Merge tag 'zynqmp-soc-for-v5.6' of https://github.com/Xilinx/linux-xlnx into arm/drivers arm64: soc: ZynqMP SoC changes for v5.6 - Extend firmware interface for feature checking - Use mailbox for communication with firmware for power management * tag 'zynqmp-soc-for-v5.6' of https://github.com/Xilinx/linux-xlnx: drivers: soc: xilinx: Use mailbox IPI callback dt-bindings: power: reset: xilinx: Add bindings for ipi mailbox drivers: firmware: xilinx: Add support for feature check Link: https://lore.kernel.org/r/f6fb26f8-b00d-a3e8-bf7d-c7ff2a8483b1@monstr.eu Signed-off-by: Olof Johansson commit b87121dd3fa0a4d2636c0ad02a3b3fc5161fa26b Author: Al Viro Date: Mon Jan 20 23:28:58 2020 +0000 bpf: don't bother with getname/kern_path - use user_path_at kernel/bpf/inode.c misuses kern_path...() - it's much simpler (and more efficient, on top of that) to use user_path...() counterparts rather than bothering with doing getname() manually. Signed-off-by: Al Viro Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200120232858.GF8904@ZenIV.linux.org.uk commit aff4866db56e5cc5601dcd896e056160e07ca361 Author: Alex Shi Date: Tue Jan 21 13:54:23 2020 +0800 ftrace: Remove NR_TO_INIT macro This macro isn't used from commit cb7be3b2fc2c ("ftrace: remove daemon"). So no needs to keep it. Link: http://lkml.kernel.org/r/1579586063-44984-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Signed-off-by: Steven Rostedt (VMware) commit 9a09cd74e7dc6c2ac34b39ea6e74440ceb4c501e Author: Alex Shi Date: Tue Jan 21 13:50:07 2020 +0800 ftrace: Remove abandoned macros These 2 macros aren't used from commit eee8ded131f1 ("ftrace: Have the function probes call their own function"), so remove them. Link: http://lkml.kernel.org/r/1579585807-43316-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Signed-off-by: Steven Rostedt (VMware) commit d8cacecf36e33c3a6fb9ffd88eb5c01c0c74004a Author: Peng Fan Date: Tue Jan 14 06:41:49 2020 +0000 dt-bindings: arm-boards: typo fix Typo fix, "withe" -> "with". Signed-off-by: Peng Fan Signed-off-by: Rob Herring commit af15a11b9046722f831588eff8fc423d28a1df44 Author: Geert Uytterhoeven Date: Tue Jan 21 11:37:21 2020 +0100 ARM: s3c64xx: Drop unneeded select of TIMER_OF Support for Samsung S3C64XX systems depends on ARCH_MULTI_V6, and thus on ARCH_MULTIPLATFORM. As the latter selects TIMER_OF, there is no need for MACH_S3C64XX_DT to select TIMER_OF. Signed-off-by: Geert Uytterhoeven Signed-off-by: Krzysztof Kozlowski commit 21829ec37e1b9356e442729fcdd7e189fc28d63b Author: Geert Uytterhoeven Date: Tue Jan 21 11:37:12 2020 +0100 ARM: exynos: Drop unneeded select of MIGHT_HAVE_CACHE_L2X0 Support for Samsung Exynos SoCs depends on ARCH_MULTI_V7, which selects ARCH_MULTI_V6_V7. As the latter selects MIGHT_HAVE_CACHE_L2X0, there is no need for ARCH_EXYNOS4 to select MIGHT_HAVE_CACHE_L2X0. Signed-off-by: Geert Uytterhoeven Signed-off-by: Krzysztof Kozlowski commit 5ec6fd39f5f23278c6c2f528b412dcff6a29eb59 Author: Uwe Kleine-König Date: Mon Jan 20 20:33:28 2020 +0100 ARM: s3c24xx: Switch to atomic pwm API in rx1950 Stop using the legacy PWM API which only still exists because there are some users left. Note this change make use of the fact that the value of struct pwm_state::duty_cycle doesn't matter for a disabled PWM and so its value can stay constant simplifying the code a bit. A side effect of the conversion is that the pwm isn't stopped in rx1950_backlight_init() by the call to pwm_apply_args() just before reenabling it when rx1950_lcd_power(1) is called. Signed-off-by: Uwe Kleine-König Reviewed-by: Vasily Khoruzhick Signed-off-by: Krzysztof Kozlowski commit d85339d9ea2660b550f12aca8bd040be4395c963 Author: Miquel Raynal Date: Mon Dec 30 18:31:03 2019 +0100 mtd: onenand: Rename omap2 driver to avoid a build warning As previously reported by Sudip Mukherjee for the Samsung driver, the omap2 onenand driver is called omap2.c in our directory and omap2.c in the tty/serial/ directory. If both drivers are compiled as modules, it would produce the following warning: warning: same module names found: drivers/tty/serial/omap2.ko drivers/mtd/nand/onenand/omap2.ko Rename the onenand omap2 driver so that it fits the folder's convention: onenand_omap2.c. Signed-off-by: Miquel Raynal commit 446b6dc8d87482af53fa30d29780a78bbae1e9b8 Author: Miquel Raynal Date: Mon Dec 30 18:31:02 2019 +0100 mtd: onenand: Use a better name for samsung driver Commit 55ed51fff224 ("{tty: serial, nand: onenand}: samsung: rename to fix build warning") has changed the samsung.c driver to be samsung_mtd.c in order to avoid a conflict in module names with the tty driver. Since the *_mtd suffix is very undescriptive, rename it to onenand_samsung.c, following the folder's convention. Same will be applied to the omap2 onenand driver. Signed-off-by: Miquel Raynal commit 7a95a72e052a7d15333de932e0a89b4934ce6085 Author: Dmitry Torokhov Date: Sat Jan 4 12:27:23 2020 -0800 mtd: rawnand: atmel: switch to using devm_fwnode_gpiod_get() devm_fwnode_get_index_gpiod_from_child() is going away as the name is too unwieldy, let's switch to using the new devm_fwnode_gpiod_get(). Signed-off-by: Dmitry Torokhov Signed-off-by: Miquel Raynal commit 9ee0f956cfbb87b19dfbbb9d588fef282eb5e95e Author: Robert Marko Date: Fri Jan 3 17:14:27 2020 +0100 mtd: spinand: add support for Toshiba TC58CVG2S0HRAIJ Toshiba recently launched new revisions of their serial SLC NAND series. TC58CVG2S0HRAIJ is a refresh of previous series with minor improvements. Basic parameters are same so lets add support for this new revision. Datasheet: https://business.kioxia.com/info/docget.jsp?did=58601&prodName=TC58CVG2S0HRAIJ Tested under kernel 5.4.7. Signed-off-by: Robert Marko Cc: Luka Perkov Signed-off-by: Miquel Raynal commit db7b6aeca2a7cc500a3f31d8dd1625272771f36b Author: YueHaibing Date: Tue Dec 31 09:36:48 2019 +0800 mtd: rawnand: macronix: Use match_string() helper to simplify the code match_string() returns the array index of a matching string. Use it instead of the open-coded implementation. Signed-off-by: YueHaibing Signed-off-by: Miquel Raynal commit f33113b542219448fa02d77ca1c6f4265bd7f130 Author: YueHaibing Date: Mon Dec 30 11:29:45 2019 +0800 mtd: sharpslpart: Fix unsigned comparison to zero The unsigned variable log_num is being assigned a return value from the call to sharpsl_nand_get_logical_num that can return -EINVAL. Detected using Coccinelle: ./drivers/mtd/parsers/sharpslpart.c:207:6-13: WARNING: Unsigned expression compared with zero: log_num > 0 Fixes: 8a4580e4d298 ("mtd: sharpslpart: Add sharpslpart partition parser") Signed-off-by: YueHaibing Signed-off-by: Miquel Raynal commit 05a5a6e57e6aebdab588d47acc8643e566c170fa Author: Krzysztof Kozlowski Date: Sun Dec 29 19:36:12 2019 +0100 mtd: onenand: Enable compile testing of OMAP and Samsung drivers OMAP and Samsung OneNAND drivers can be compile tested. The OMAP drivers still depends on mach header so limit the compile testing to ARMv7. Signed-off-by: Krzysztof Kozlowski Reported-by: kbuild test robot Signed-off-by: Miquel Raynal commit 440c24535caf9a2ae393a555b2e23854037d65e2 Author: Krzysztof Kozlowski Date: Sun Dec 29 19:36:11 2019 +0100 mtd: onenand: samsung: Fix printing format for size_t on 64-bit Print size_t as %zu to fix -Wformat warnings when compiling on 64-bit platform (e.g. with COMPILE_TEST): drivers/mtd/nand/onenand/samsung_mtd.c: In function ‘s5pc110_read_bufferram’: drivers/mtd/nand/onenand/samsung_mtd.c:661:16: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=] dev_err(dev, "Couldn't map a %d byte buffer for DMA\n", count); Signed-off-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal commit 14b292adcc780b2a319862f22a60054fe72e382f Author: Krzysztof Kozlowski Date: Sun Dec 29 19:36:10 2019 +0100 mtd: onenand: samsung: Fix pointer cast -Wpointer-to-int-cast warnings on 64 bit iomem pointers should be casted to unsigned long to avoid -Wpointer-to-int-cast warnings when compiling on 64-bit platform (e.g. with COMPILE_TEST): drivers/mtd/nand/onenand/samsung_mtd.c: In function ‘s3c_onenand_readw’: drivers/mtd/nand/onenand/samsung_mtd.c:251:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] if ((unsigned int) addr < ONENAND_DATARAM && onenand->bootram_command) { ^ Signed-off-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal commit a3b839e4e061c60c5f9abf4f3af638f712bf4285 Author: Masahiro Yamada Date: Fri Dec 20 20:31:55 2019 +0900 mtd: rawnand: denali: remove hard-coded DENALI_DEFAULT_OOB_SKIP_BYTES As commit 0d55c668b218 (mtd: rawnand: denali: set SPARE_AREA_SKIP_BYTES register to 8 if unset") says, there were three solutions discussed: [1] Add a DT property to specify the skipped bytes in OOB [2] Associate the preferred value with compatible [3] Hard-code the default value in the driver At that time, [3] was chosen because I did not have enough information about the other platforms than UniPhier. That commit also says "The preferred value may vary by platform. If so, please trade up to a different solution." My intention was to replace [3] with [2], not keep both [2] and [3]. Now that we have switched to [2] for SOCFPGA's SPARE_AREA_SKIP_BYTES=2, [3] should be removed. This should be OK because denali_pci.c just gets back to the original behavior. Signed-off-by: Masahiro Yamada Signed-off-by: Miquel Raynal commit 711fafc287e1be25b4420752062f852930e4c1d2 Author: Masahiro Yamada Date: Fri Dec 20 20:31:54 2019 +0900 mtd: rawnand: denali_dt: add reset controlling According to the Denali NAND Flash Memory Controller User's Guide, this IP has two reset signals. rst_n: reset most of FFs in the controller core reg_rst_n: reset all FFs in the register interface, and in the initialization sequencer This commit supports controlling those reset signals. It is possible to control them separately from the IP point of view although they might be often tied up together in actual SoC integration. The IP spec says, asserting only the reg_rst_n without asserting rst_n will cause unpredictable behavior in the controller. So, the driver deasserts ->rst_reg and ->rst in this order. Another thing that should be kept in mind is the automated initialization sequence (a.k.a. 'bootstrap' process) is kicked off when reg_rst_n is deasserted. When the reset is deasserted, the controller issues a RESET command to the chip select 0, and attempts to read out the chip ID, and further more, ONFI parameters if it is an ONFI-compliant device. Then, the controller sets up the relevant registers based on the detected device parameters. This process might be useful for tiny boot firmware, but is redundant for Linux Kernel because nand_scan_ident() probes devices and sets up parameters accordingly. Rather, this hardware feature is annoying because it ends up with misdetection due to bugs. So, commit 0615e7ad5d52 ("mtd: nand: denali: remove Toshiba and Hynix specific fixup code") changed the driver to not rely on it. However, there is no way to prevent it from running. The IP provides the 'bootstrap_inhibit_init' port to suppress this sequence, but it is usually out of software control, and dependent on SoC implementation. As for the Socionext UniPhier platform, LD4 always enables it. For the later SoCs, the bootstrap sequence runs depending on the boot mode. I added usleep_range() to make the driver wait until the sequence finishes. Otherwise, the driver would fail to detect the chip due to the race between the driver and hardware-controlled sequence. Signed-off-by: Masahiro Yamada Reviewed-by: Philipp Zabel Signed-off-by: Miquel Raynal commit 48aad493e353db386ea8fc82f082220342e7e633 Author: Masahiro Yamada Date: Fri Dec 20 20:31:53 2019 +0900 dt-bindings: mtd: denali_dt: document reset property According to the Denali NAND Flash Memory Controller User's Guide, this IP has two reset signals. rst_n: reset most of FFs in the controller core reg_rst_n: reset all FFs in the register interface, and in the initialization sequencer This commit specifies these reset signals. It is possible to control them separately from the IP point of view although they might be often tied up together in actual SoC integration. At least for the upstream platforms, Altera/Intel SOCFPGA and Socionext UniPhier, the reset controller seems to provide only 1-bit control for the NAND controller. If it is the case, the resets property should reference to the same phandles for "nand" and "reg" resets, like this: resets = <&nand_rst>, <&nand_rst>; reset-names = "nand", "reg"; Signed-off-by: Masahiro Yamada Acked-by: Rob Herring Signed-off-by: Miquel Raynal commit f5561a7c42d690b51151d955d0a6a80fa3ad6689 Author: Marek Vasut Date: Fri Dec 20 20:31:52 2019 +0900 mtd: rawnand: denali_dt: Add support for configuring SPARE_AREA_SKIP_BYTES The SPARE_AREA_SKIP_BYTES register is reset when the controller reset signal is toggled. Yet, this register must be configured to match the content of the NAND OOB area. The current default value is always set to 8 and is programmed into the hardware in case the hardware was not programmed before (e.g. in a bootloader) with a different value. This however does not work when the block is reset properly by Linux. On Altera SoCFPGA CycloneV, ArriaV and Arria10, which are the SoCFPGA platforms which support booting from NAND, the SPARE_AREA_SKIP_BYTES value must be set to 2. On Socionext Uniphier, the value is 8. This patch adds support for preconfiguring the default value and handles the special SoCFPGA case by setting the default to 2 on all SoCFPGA platforms, while retaining the original behavior and default value of 8 on all the other platforms. Signed-off-by: Marek Vasut Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra To: linux-mtd@lists.infradead.org Reviewed-by: Tudor Ambarus Acked-by: Masahiro Yamada Signed-off-by: Miquel Raynal commit 82348201384d4481ab92beecfbca7c195120670e Author: Masahiro Yamada Date: Fri Dec 20 20:31:51 2019 +0900 mtd: rawnand: denali_dt: error out if platform has no associated data denali->ecc_caps is a mandatory parameter. If it were left unset, nand_ecc_choose_conf() would end up with NULL pointer access. So, every compatible must be associated with proper denali_dt_data. If of_device_get_match_data() returns NULL, let it fail immediately. Signed-off-by: Masahiro Yamada Signed-off-by: Miquel Raynal commit 393947e5823fdfe96bd290e5d6311d5b08d03aa7 Author: Florian Fainelli Date: Tue Dec 17 16:56:35 2019 -0800 mtd: rawnand: brcmnand: Set appropriate DMA mask NAND controllers >= 7.0 with FLASH_DMA support physical addresses up to 40-bit, set an appropriate DMA mask for that purpose. Signed-off-by: Florian Fainelli Signed-off-by: Miquel Raynal commit 0e7ca83e82d021c928dadf4c13c137d57337540d Author: Nathan Chancellor Date: Mon Dec 9 14:44:23 2019 -0700 mtd: onenand_base: Adjust indentation in onenand_read_ops_nolock Clang warns: ../drivers/mtd/nand/onenand/onenand_base.c:1269:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] while (!ret) { ^ ../drivers/mtd/nand/onenand/onenand_base.c:1266:2: note: previous statement is here if (column + thislen > writesize) ^ 1 warning generated. This warning occurs because there is a space before the tab of the while loop. There are spaces at the beginning of a lot of the lines in this block, remove them so that the indentation is consistent with the Linux kernel coding style and clang no longer warns. Fixes: a8de85d55700 ("[MTD] OneNAND: Implement read-while-load") Link: https://github.com/ClangBuiltLinux/linux/issues/794 Signed-off-by: Nathan Chancellor Signed-off-by: Miquel Raynal commit 73b265ae7bdbb5f4ce13b2afc53afa7c14cd0980 Author: zhengbin Date: Thu Nov 28 11:14:12 2019 +0800 mtd: rawnand: mpc5121: Remove unneeded semicolon Fixes coccicheck warning: drivers/mtd/nand/raw/mpc5121_nfc.c:441:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Miquel Raynal commit 75b3ff79c5656d75b18501c56610f79596dd1441 Author: Chen Wandun Date: Fri Nov 22 20:08:54 2019 +0800 mtd: onenand: samsung: remove set but not used variable Fixes gcc '-Wunused-but-set-variable' warning: drivers/mtd/nand/onenand/samsung_mtd.c: In function s3c_onenand_check_lock_status: drivers/mtd/nand/onenand/samsung_mtd.c:731:6: warning: variable tmp set but not used [-Wunused-but-set-variable] Signed-off-by: Chen Wandun Signed-off-by: Miquel Raynal commit 296a32b54a73898ad8828630423b399b5d1cb3d7 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:40:50 2019 +0800 mtd: onenand: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal commit 1e31d3caa262cffa728e007ad209fb8e72b276a8 Author: Colin Ian King Date: Fri Jan 17 09:31:24 2020 +0000 usb: musb: fix spelling mistake: "periperal" -> "peripheral" There is a spelling mistake in a dev_err error message. Fix it. Signed-off-by: Colin Ian King Acked-by: Bin Liu Link: https://lore.kernel.org/r/20200117093124.97965-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit dd7d99dc688d0fc448976f52f8517fbdeccdccda Merge: 42bbdd99221b def9d2780727 Author: Greg Kroah-Hartman Date: Tue Jan 21 19:36:59 2020 +0100 Merge 5.5-rc7 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit f289e55c6eeb4391101a42334e8c69bf8c9fe987 Author: Jeff Chang Date: Thu Jan 16 13:46:37 2020 +0800 ASoC: Add MediaTek MT6660 Speaker Amp Driver The MT6660 is a boosted BTL class-D amplifier with V/I sensing. A built-in DC-DC step-up converter is used to provide efficient power for class-D amplifier with multi-level class-G operation. The digital audio interface supports I2S, left-justified, right-justified, TDM and DSP A/B format for audio in with a data out used for chip information like voltage sense and current sense, which are able to be monitored via DATAO through proper Signed-off-by: Jeff Chang Link: https://lore.kernel.org/r/1579153597-23286-1-git-send-email-richtek.jeff.chang@gmail.com Signed-off-by: Mark Brown commit ea87683909bcda665527a828505c5e9c6a625429 Merge: def9d2780727 2e31aab08bad Author: Mark Brown Date: Tue Jan 21 17:29:48 2020 +0000 Merge branch 'regmap-5.6' into regmap-next commit 29d7e05c5f75fc2ebf3608743b6809aa0ff56800 Author: Lubomir Rintel Date: Sat Jan 18 10:40:31 2020 +0100 spi: pxa2xx: Avoid touching SSCR0_SSE on MMP2 A read from a Winbond W25Q32FV SPI NOR memory chip on my MMP2 returns wrong data. It seems like SSE doesn't do the right thing on MMP2 at all. After enabling the SPI port back again, the FIFO reads return garbage. Things can be brought back to order by telling the PMU to reset the block. Here's a good transaction with said chip: # busybox devmem 0xd4035000 32 0x00001987 # SSCR0 # echo 0 >/sys/class/gpio/gpio46/value # (assert CS) # busybox devmem 0xd4035010 32 0x0000009f # SSDR (read ID command) # busybox devmem 0xd4035010 32 0x00000000 # SSDR # busybox devmem 0xd4035010 32 0x00000000 # SSDR # busybox devmem 0xd4035010 32 0x00000000 # SSDR # busybox devmem 0xd4035010 32 0x00000000 # SSDR # busybox devmem 0xd4035010 32 0x00000000 # SSDR # busybox devmem 0xd4035010 32 0x00000000 # SSDR # busybox devmem 0xd4035010 # SSDR 0x000000ff # busybox devmem 0xd4035010 # SSDR 0x000000ef # Correct response # busybox devmem 0xd4035010 # SSDR 0x00000040 # busybox devmem 0xd4035010 # SSDR 0x00000016 # busybox devmem 0xd4035010 # SSDR 0x00000000 # busybox devmem 0xd4035010 # SSDR 0x00000000 # busybox devmem 0xd4035010 # SSDR 0x00000000 # echo 1 >/sys/class/gpio/gpio46/value # (deassert CS) # Flipping off an on SSE, then running another transaction: # busybox devmem 0xd4035000 32 0x00001907 # SSCR0, SSE off # busybox devmem 0xd4035000 32 0x00001987 # SSCR0, SSE on # echo 0 >/sys/class/gpio/gpio46/value # (assert CS) # busybox devmem 0xd4035010 32 0x0000009f # SSDR (read ID command) # busybox devmem 0xd4035010 32 0x00000000 # SSDR # busybox devmem 0xd4035010 32 0x00000000 # SSDR # busybox devmem 0xd4035010 32 0x00000000 # SSDR # busybox devmem 0xd4035010 32 0x00000000 # SSDR # busybox devmem 0xd4035010 32 0x00000000 # SSDR # busybox devmem 0xd4035010 32 0x00000000 # SSDR # busybox devmem 0xd4035010 # SSDR 0x000000ff # busybox devmem 0xd4035010 # SSDR 0x000000ff # Garbage! # busybox devmem 0xd4035010 # SSDR 0x000000ff # Oh no # busybox devmem 0xd4035010 # SSDR 0x000000ff # busybox devmem 0xd4035010 # SSDR 0x000000ff # busybox devmem 0xd4035010 # SSDR 0x000000ff # busybox devmem 0xd4035010 # SSDR 0x000000ff # echo 1 >/sys/class/gpio/gpio46/value # (deassert CS) # Sometimes the response is not just ones, but something that looks like bits of a response from a previous transaction. I can't see a fix other than not touching the SSE altogether after the device is first brought up. Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20200118094031.327373-1-lkundrak@v3.sk Signed-off-by: Mark Brown commit 2e31aab08bad0d4ee3d3d890a7b74cb6293e0a41 Author: Ben Whitten Date: Sat Jan 18 20:56:24 2020 +0000 regmap: fix writes to non incrementing registers When checking if a register block is writable we must ensure that the block does not start with or contain a non incrementing register. Fixes: 8b9f9d4dc511 ("regmap: verify if register is writeable before writing operations") Signed-off-by: Ben Whitten Link: https://lore.kernel.org/r/20200118205625.14532-1-ben.whitten@gmail.com Signed-off-by: Mark Brown commit 26aa19174f0d1837cb268b744f6dcb013265ab03 Author: Matthias Brugger Date: Tue Jan 14 16:01:50 2020 +0100 ASoC: dt-bindings: rt5645: add suppliers The rt5645 and rt5650 have two suppliers, document them. Signed-off-by: Matthias Brugger Link: https://lore.kernel.org/r/20200114150151.8537-1-matthias.bgg@kernel.org Signed-off-by: Mark Brown commit 294b7380ffe88d4a0626af1fee5843a3db0c913c Author: Tzung-Bi Shih Date: Fri Jan 17 15:38:14 2020 +0800 ASoC: max98090: fix deadlock in max98090_dapm_put_enum_double() Commit 62d5ae4cafb7 ("ASoC: max98090: save and restore SHDN when changing sensitive registers SHDN bit") uses dapm_mutex to protect SHDN bit. However, snd_soc_dapm_put_enum_double() in max98090_dapm_put_enum_double() acquires the dapm_mutex again which cause a deadlock. Use snd_soc_dapm_put_enum_double_locked() instead to fix the deadlock. Fixes: 62d5ae4cafb7 ("ASoC: max98090: save and restore SHDN when changing sensitive registers SHDN bit") Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200117073814.82441-4-tzungbi@google.com Signed-off-by: Mark Brown commit 839284e794822ebc8b66f32006a5d4cad863e1fb Author: Tzung-Bi Shih Date: Fri Jan 17 15:38:13 2020 +0800 ASoC: dapm: add snd_soc_dapm_put_enum_double_locked Adds snd_soc_dapm_put_enum_double_locked() for those use cases if dapm_mutex has already locked. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200117073814.82441-3-tzungbi@google.com Signed-off-by: Mark Brown commit 08df0d9a00f7ca07511614dd3b137fadd2de56fc Author: Tzung-Bi Shih Date: Fri Jan 17 15:38:12 2020 +0800 ASoC: max98090: revert "ASoC: max98090: fix lockdep warning" Commit 2dc98af62c32 ("ASoC: max98090: fix lockdep warning") introduced a helpful-less small lock: shdn_lock. Reverts the commit. Reasons: 1. Lockdep should not be happy by either the original or current code. From lockdep's point of view, there is a lock inversion anyway. Let d = dapm_mutex, c = controls_rwsem, s = shdn_lock, From the reported calling stack: lock acquisition order of snd_soc_register_card() is: d -> c. > snd_ctl_add_replace+0x3c/0x84 > dapm_create_or_share_kcontrol+0x24c/0x2e0 > snd_soc_dapm_new_widgets+0x308/0x594 > snd_soc_bind_card+0x80c/0xad4 > devm_snd_soc_register_card+0x34/0x6c If calling snd_soc_dapm_put_enum_double() in kcontrol's put (e.g. SOC_DAPM_ENUM_EXT), lock acquisition order is: c -> d. Note that, snd_soc_dapm_put_enum_double() acquires d. The possible lock inversion is always there if registering sound card and putting mixer control happen at the same time. In fact, it never happens because the control device don't show up to the userspace until the sound card build success. Commit 2dc98af62c32 ("ASoC: max98090: fix lockdep warning") changes the order to: c -> s -> d. The lock inversion is still there. 2. Commit 62d5ae4cafb7 ("ASoC: max98090: save and restore SHDN when changing sensitive registers SHDN bit") designed to use dapm_mutex to protect SHDN bit. Use a separate lock breaks the protection. DAPM changes SHDN bit automatically when it finds the path. Thus, any code wants to change the SHDN bit, need to acquire the dapm_mutex first. > SND_SOC_DAPM_SUPPLY("SHDN", M98090_REG_DEVICE_SHUTDOWN, > M98090_SHDNN_SHIFT, 0, NULL, 0), Fixes: 2dc98af62c32 ("ASoC: max98090: fix lockdep warning") Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200117073814.82441-2-tzungbi@google.com Signed-off-by: Mark Brown commit b0177aca7aea7e8917d4e463334b51facb293d02 Author: Michael Walle Date: Tue Jan 14 16:46:13 2020 +0100 spi: spi-fsl-qspi: Ensure width is respected in spi-mem operations Make use of a core helper to ensure the desired width is respected when calling spi-mem operators. Otherwise only the SPI controller will be matched with the flash chip, which might lead to wrong widths. Also consider the width specified by the user in the device tree. Fixes: 84d043185dbe ("spi: Add a driver for the Freescale/NXP QuadSPI controller") Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20200114154613.8195-1-michael@walle.cc Signed-off-by: Mark Brown commit 250a15cf575a655097151ad887cea02dd0977136 Author: Kuninori Morimoto Date: Mon Jan 20 10:05:07 2020 +0900 ASoC: soc-core: remove bus_control Now, snd_soc_dai_driver::bus_control is used for how to resume. But, no driver which has bus_control has DAI driver suspend/resume support. This patch removes pointless bus_control from ALSA SoC. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pnffx7i4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 450312b640f9c6caeeaf4bd8d4130f86ea27f456 Author: Kuninori Morimoto Date: Mon Jan 20 10:05:03 2020 +0900 ASoC: soc-core: remove DAI suspend/resume Historically, CPU and Codec were implemented different, but now it is merged as Component. ALSA SoC is supporting suspend/resume at DAI and Component level. The method is like below. 1) Suspend/Resume all CPU DAI if bus-control was 0 2) Suspend/Resume all Component 3) Suspend/Resume all CPU DAI if bus-control was 1 Historically 2) was Codec special operation. Because CPU and Codec were merged into Component, CPU suspend/resume has 3 chance to suspend(= 1/2/3), but Codec suspend/resume has 1 chance (= 2). Here, DAI side suspend/resume is caring bus-control, but no driver which is supporting suspend/resume is setting bus-control. This means 3) was never used. Here, used parameter for suspend/resume component->dev and dai->dev are same pointer. For that reason, we can merge DAI and Component suspend/resume. One note is that we should use 2), because it is caring BIAS level. This patch removes 1) and 3). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87r1zvx7i8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0b1c89944207975dac17a176052b92780642b90b Author: Kuninori Morimoto Date: Mon Jan 20 10:04:59 2020 +0900 ASoC: pxa: pxa2xx-i2s: move .suspend/.resume to component There is no big difference at implementation for .suspend/.resume between DAI driver and Component driver. But because some driver is using DAI version, thus ALSA SoC needs to keep supporting it, hence, framework becoming verbose. If we can switch all DAI driver .suspend/.resume to Component driver, we can remove verbose code from ALSA SoC. Driver is getting its private data via dai->dev. But dai->dev and component->dev are same dev, thus, we can convert these. For same reason, we can convert dai->active to component->active if necessary. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87sgkbx7ic.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2c55f0be586a14a35f67baf76df4d5c7782ed36a Author: Kuninori Morimoto Date: Mon Jan 20 10:04:52 2020 +0900 ASoC: pxa: pxa-ssp: move .suspend/.resume to component There is no big difference at implementation for .suspend/.resume between DAI driver and Component driver. But because some driver is using DAI version, thus ALSA SoC needs to keep supporting it, hence, framework becoming verbose. If we can swtcih all DAI driver .suspend/.resume to Component driver, we can remove verbose code from ALSA SoC. Driver is getting its private data via dai->dev. But dai->dev and component->dev are same dev, thus, we can convert these. For same reason, we can convert dai->active to component->active if necessary. This patch moves DAI driver .suspend/.resume to Component driver Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87tv4rx7ij.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2db023cdb386874c51f4219508bd2d5f0caa7ffa Author: Kuninori Morimoto Date: Mon Jan 20 10:04:47 2020 +0900 ASoC: ux500: ux500_msp_dai: remove unused DAI .suspend/.resume This patch removes unused DAI driver .suspend/.resume Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87v9p7x7io.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 21385a4faa8469b129af56a8c5a9405e3189c787 Author: Kuninori Morimoto Date: Mon Jan 20 10:04:42 2020 +0900 ASoC: samsung: i2s: move .suspend/.resume to component There is no big difference at implementation for .suspend/.resume between DAI driver and Component driver. But because some driver is using DAI version, thus ALSA SoC needs to keep supporting it, hence, framework becoming verbose. If we can switch all DAI driver .suspend/.resume to Component driver, we can remove verbose code from ALSA SoC. Driver is getting its private data via dai->dev. But dai->dev and component->dev are same dev, thus, we can convert these. For same reason, we can convert dai->active to component->active if necessary. This patch moves DAI driver .suspend/.resume to Component driver Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87wo9nx7it.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ef20061a34e0e6822cbfd20c11667ae23a96798d Author: Kuninori Morimoto Date: Mon Jan 20 10:04:37 2020 +0900 ASoC: dwc: dwc-i2s: move .suspend/.resume to component There is no big difference at implementation for .suspend/.resume between DAI driver and Component driver. But because some driver is using DAI version, thus ALSA SoC needs to keep supporting it, hence, framework becoming verbose. If we can switch all DAI driver .suspend/.resume to Component driver, we can remove verbose code from ALSA SoC. Driver is getting its private data via dai->dev. But dai->dev and component->dev are same dev, thus, we can convert these. For same reason, we can convert dai->active to component->active if necessary. This patch moves DAI driver .suspend/.resume to Component driver Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87y2u3x7iy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 9b79b1cd164f4ec64dc0847b03297095e39cdee9 Author: Kuninori Morimoto Date: Mon Jan 20 10:04:31 2020 +0900 ASoC: uniphier: move .suspend/.resume to component There is no big difference at implementation for .suspend/.resume between DAI driver and Component driver. But because some driver is using DAI version, thus ALSA SoC needs to keep supporting it, hence, framework becoming verbose. If we can switch all DAI driver .suspend/.resume to Component driver, we can remove verbose code from ALSA SoC. Driver is getting its private data via dai->dev. But dai->dev and component->dev are same dev, thus, we can convert these. For same reason, we can convert dai->active to component->active if necessary. This patch moves DAI driver .suspend/.resume to Component driver Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87zhejx7j4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 78dbafbd04ddcc3a21879c4403c57d979689a3fe Author: Kuninori Morimoto Date: Mon Jan 20 10:04:26 2020 +0900 ASoC: ti: omap-mcpdm: move .suspend/.resume to component There is no big difference at implementation for .suspend/.resume between DAI driver and Component driver. But because some driver is using DAI version, thus ALSA SoC needs to keep supporting it, hence, framework becoming verbose. If we can switch all DAI driver .suspend/.resume to Component driver, we can remove verbose code from ALSA SoC. Driver is getting its private data via dai->dev. But dai->dev and component->dev are same dev, thus, we can convert these. For same reason, we can convert dai->active to component->active if necessary. This patch moves DAI driver .suspend/.resume to Component driver Signed-off-by: Kuninori Morimoto Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/871rrvym3p.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4a58fb71b5799328ea4ec84f3caee2fd4419404d Author: Kuninori Morimoto Date: Mon Jan 20 10:04:18 2020 +0900 ASoC: sti: sti_uniperif: move .suspend/.resume to component There is no big difference at implementation for .suspend/.resume between DAI driver and Component driver. But because some driver is using DAI version, thus ALSA SoC needs to keep supporting it, hence, framework becoming verbose. If we can switch all DAI driver .suspend/.resume to Component driver, we can remove verbose code from ALSA SoC. Driver is getting its private data via dai->dev. But dai->dev and component->dev are same dev, thus, we can convert these. For same reason, we can convert dai->active to component->active if necessary. This patch moves DAI driver .suspend/.resume to Component driver Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/8736cbym3x.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 79a5cf90f8719c3f69a0dc53efebb38da654512f Author: Kuninori Morimoto Date: Mon Jan 20 10:04:13 2020 +0900 ASoC: samsung: spdif: move .suspend/.resume to component There is no big difference at implementation for .suspend/.resume between DAI driver and Component driver. But because some driver is using DAI version, thus ALSA SoC needs to keep supporting it, hence, framework becoming verbose. If we can switch all DAI driver .suspend/.resume to Component driver, we can remove verbose code from ALSA SoC. Driver is getting its private data via dai->dev. But dai->dev and component->dev are same dev, thus, we can convert these. For same reason, we can convert dai->active to component->active if necessary. This patch moves DAI driver .suspend/.resume to Component driver Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/874kwrym42.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 45cfa792f6608dc1b3e0fdc354716e87a40a747d Author: Kuninori Morimoto Date: Mon Jan 20 10:04:07 2020 +0900 ASoC: samsung: s3c24xx-i2s: move .suspend/.resume to component There is no big difference at implementation for .suspend/.resume between DAI driver and Component driver. But because some driver is using DAI version, thus ALSA SoC needs to keep supporting it, hence, framework becoming verbose. If we can switch all DAI driver .suspend/.resume to Component driver, we can remove verbose code from ALSA SoC. Driver is getting its private data via dai->dev. But dai->dev and component->dev are same dev, thus, we can convert these. For same reason, we can convert dai->active to component->active if necessary. This patch moves DAI driver .suspend/.resume to Component driver Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/875zh7ym48.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 7ec6b43125c070fadf389b80083d939014e13ac9 Author: Kuninori Morimoto Date: Mon Jan 20 10:04:01 2020 +0900 ASoC: mediatek: move .suspend/.resume to component There is no big difference at implementation for .suspend/.resume between DAI driver and Component driver. But because some driver is using DAI version, thus ALSA SoC needs to keep supporting it, hence, framework becoming verbose. If we can switch all DAI driver .suspend/.resume to Component driver, we can remove verbose code from ALSA SoC. Driver is getting its private data via dai->dev. But dai->dev and component->dev are same dev, thus, we can convert these. For same reason, we can convert dai->active to component->active if necessary. This patch moves DAI driver .suspend/.resume to Component driver Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/877e1nym4e.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit aa3c4765b3e8931e2e3c70894b717a993f96fff5 Author: Kuninori Morimoto Date: Mon Jan 20 10:03:56 2020 +0900 ASoC: jz4740: jz4740-i2s: move .suspend/.resume to component There is no big difference at implementation for .suspend/.resume between DAI driver and Component driver. But because some driver is using DAI version, thus ALSA SoC needs to keep supporting it, hence, framework becoming verbose. If we can switch all DAI driver .suspend/.resume to Component driver, we can remove verbose code from ALSA SoC. Driver is getting its private data via dai->dev. But dai->dev and component->dev are same dev, thus, we can convert these. For same reason, we can convert dai->active to component->active if necessary. This patch moves DAI driver .suspend/.resume to Component driver Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/878sm3ym4j.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 7b6e7b137e2ae5f789d2c8ab7df9f3650b5deaf1 Author: Kuninori Morimoto Date: Mon Jan 20 10:03:50 2020 +0900 ASoC: cirrus: ep93xx-i2s: move .suspend/.resume to component There is no big difference at implementation for .suspend/.resume between DAI driver and Component driver. But because some driver is using DAI version, thus ALSA SoC needs to keep supporting it, hence, framework becoming verbose. If we can switch all DAI driver .suspend/.resume to Component driver, we can remove verbose code from ALSA SoC. Driver is getting its private data via dai->dev. But dai->dev and component->dev are same dev, thus, we can convert these. For same reason, we can convert dai->active to component->active if necessary. This patch moves DAI driver .suspend/.resume to Component driver Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a76jym4p.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e4f8bb37efae2b2be51f4d872fffcd09001c1f75 Author: Kuninori Morimoto Date: Mon Jan 20 10:03:36 2020 +0900 ASoC: atmel: atmel_ssc_dai: move .suspend/.resume to component There is no big difference at implementation for .suspend/.resume between DAI driver and Component driver. But because some driver is using DAI version, thus ALSA SoC needs to keep supporting it, hence, framework becoming verbose. If we can switch all DAI driver .suspend/.resume to Component driver, we can remove verbose code from ALSA SoC. Driver is getting its private data via dai->dev. But dai->dev and component->dev are same dev, thus, we can convert these. For same reason, we can convert dai->active to component->active if necessary. This patch moves DAI driver .suspend/.resume to Component driver Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87d0bfym53.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 7307d33a280b300f69c00580be9fa210f8587039 Author: Kuninori Morimoto Date: Mon Jan 20 10:03:43 2020 +0900 ASoC: bcm: cygnus-ssp: move .suspend/.resume to component There is no big difference at implementation for .suspend/.resume between DAI driver and Component driver. But because some driver is using DAI version, thus ALSA SoC needs to keep supporting it, hence, framework becoming verbose. If we can switch all DAI driver .suspend/.resume to Component driver, we can remove verbose code from ALSA SoC. Driver is getting its private data via dai->dev. But dai->dev and component->dev are same dev, thus, we can convert these. For same reason, we can convert dai->active to component->active if necessary. This patch moves DAI driver .suspend/.resume to Component driver Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87blqzym4w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 130128098a4e5ce9a0dfbdf9a7e27a43579901fd Author: Shengjiu Wang Date: Mon Jan 20 15:28:06 2020 +0800 ASoC: soc-generic-dmaengine-pcm: Fix error handling Remove the return value checking, that is to align with the code before adding snd_dmaengine_pcm_refine_runtime_hwparams function. Otherwise it causes a regression on the HiKey board: [ 17.721424] hi6210_i2s f7118000.i2s: ASoC: can't open component f7118000.i2s: -6 Fixes: e957204e732b ("ASoC: pcm_dmaengine: Extract snd_dmaengine_pcm_refine_runtime_hwparams") Signed-off-by: Shengjiu Wang Reported-by: John Stultz Link: https://lore.kernel.org/r/1579505286-32085-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit af4bac11531fbc0b5955fdccbe3f5ea265cd7374 Author: Sameer Pujar Date: Sun Jan 19 19:49:23 2020 +0530 ASoC: soc-pcm: crash in snd_soc_dapm_new_dai Crash happens in snd_soc_dapm_new_dai() when substream->private_data access is made and substream is NULL here. This is seen for DAIs where only playback or capture stream is defined. This seems to be happening for codec2codec DAI link. Both playback and capture are 0 during soc_new_pcm(). This is probably happening because cpu_dai and codec_dai are both validated either for SNDRV_PCM_STREAM_PLAYBACK or SNDRV_PCM_STREAM_CAPTURE. Shouldn't be playback = 1 when, - playback stream is available for codec_dai AND - capture stream is available for cpu_dai and vice-versa for capture = 1? Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1579443563-12287-1-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit b0de922af53eede340986a2d05b6cd4b6d6efa43 Author: Kishon Vijay Abraham I Date: Tue Jan 21 17:27:34 2020 +0530 PCI: keystone: Fix error handling when "num-viewport" DT property is not populated Fix error handling when "num-viewport" DT property is not populated. Fixes: 23284ad677a9 ("PCI: keystone: Add support for PCIe EP in AM654x Platforms") Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Cc: stable@vger.kernel.org # v5.2+ commit d7bbd6c1b01cb5dd13c245d4586a83145c1d5f52 Author: Dirk Behme Date: Tue Jan 21 16:54:39 2020 +0100 arm64: kbuild: remove compressed images on 'make ARCH=arm64 (dist)clean' Since v4.3-rc1 commit 0723c05fb75e44 ("arm64: enable more compressed Image formats"), it is possible to build Image.{bz2,lz4,lzma,lzo} AArch64 images. However, the commit missed adding support for removing those images on 'make ARCH=arm64 (dist)clean'. Fix this by adding them to the target list. Make sure to match the order of the recipes in the makefile. Cc: stable@vger.kernel.org # v4.3+ Fixes: 0723c05fb75e44 ("arm64: enable more compressed Image formats") Signed-off-by: Dirk Behme Signed-off-by: Eugeniu Rosca Reviewed-by: Masahiro Yamada Signed-off-by: Will Deacon commit 154a4dcfc95f9dfcb2fda3ddf24c0602060d1120 Author: Alex Shi Date: Tue Jan 21 18:25:38 2020 +0800 fs/reiserfs: remove unused macros these macros are never used from introduced. better to remove them. Link: https://lore.kernel.org/r/1579602338-57079-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Cc: Andrew Morton Cc: Jan Kara Cc: Bharath Vedartham Cc: Hariprasad Kelam Cc: Jason Yan Cc: zhengbin Cc: Jia-Ju Bai Cc: reiserfs-devel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Jan Kara commit ed21c58eefa7a2f95c87c37677b51d5b480759b6 Author: Alex Shi Date: Tue Jan 21 18:25:34 2020 +0800 fs/quota: remove unused macro __QUOTA_V2_PARANOIA macro is never used. better to remove it. Link: https://lore.kernel.org/r/1579602334-57039-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Alex Shi Cc: Jan Kara Cc: linux-kernel@vger.kernel.org Signed-off-by: Jan Kara commit 802a5017ffb27ade616d0fe605f699a3c6303aa3 Author: Alex Shi Date: Tue Jan 21 16:49:20 2020 +0800 jfs: remove unused MAXL2PAGES This has never been used. Signed-off-by: Alex Shi Signed-off-by: Dave Kleikamp Cc: jfs-discussion@lists.sourceforge.net Cc: linux-kernel@vger.kernel.org commit 1a7f0a34ea7d05d1ffcd32c9b1b4e07ac0687538 Author: Michał Mirosław Date: Tue Jan 14 19:11:26 2020 +0100 builddeb: allow selection of .deb compressor Select deb compression using KDEB_COMPRESS make variable. This allows to use gzip compression for local or test builds, and that's way faster than now-default xz compression. Signed-off-by: Michał Mirosław Signed-off-by: Masahiro Yamada commit 2b5072b9dfab1bc9e4f605bba19b4470e429c60c Author: Bjorn Helgaas Date: Fri Jan 17 10:18:22 2020 -0600 kconfig: fix documentation typos Fix a couple typos in kconfig-language documentation. Signed-off-by: Bjorn Helgaas Signed-off-by: Masahiro Yamada commit e8b3a426fb4a9e2856a69b6e19de044c7416c316 Merge: eaad647e5cc2 b2dfc6765e45 Author: Jason Gunthorpe Date: Tue Jan 21 09:55:04 2020 -0400 Merge tag 'rds-odp-for-5.5' into rdma.git for-next From https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma Leon Romanovsky says: ==================== Use ODP MRs for kernel ULPs The following series extends MR creation routines to allow creation of user MRs through kernel ULPs as a proxy. The immediate use case is to allow RDS to work over FS-DAX, which requires ODP (on-demand-paging) MRs to be created and such MRs were not possible to create prior this series. The first part of this patchset extends RDMA to have special verb ib_reg_user_mr(). The common use case that uses this function is a userspace application that allocates memory for HCA access but the responsibility to register the memory at the HCA is on an kernel ULP. This ULP acts as an agent for the userspace application. The second part provides advise MR functionality for ULPs. This is integral part of ODP flows and used to trigger pagefaults in advance to prepare memory before running working set. The third part is actual user of those in-kernel APIs. ==================== * tag 'rds-odp-for-5.5': net/rds: Use prefetch for On-Demand-Paging MR net/rds: Handle ODP mr registration/unregistration net/rds: Detect need of On-Demand-Paging memory registration RDMA/mlx5: Fix handling of IOVA != user_va in ODP paths IB/mlx5: Mask out unsupported ODP capabilities for kernel QPs RDMA/mlx5: Don't fake udata for kernel path IB/mlx5: Add ODP WQE handlers for kernel QPs IB/core: Add interface to advise_mr for kernel users IB/core: Introduce ib_reg_user_mr IB: Allow calls to ib_umem_get from kernel ULPs Signed-off-by: Jason Gunthorpe commit 09cbcef6c60e77af11c3f27e62ea3f291a5d436c Author: Milan Pandurov Date: Fri Dec 13 14:07:21 2019 +0100 kvm: Refactor handling of VM debugfs files We can store reference to kvm_stats_debugfs_item instead of copying its values to kvm_stat_data. This allows us to remove duplicated code and usage of temporary kvm_stat_data inside vm_stat_get et al. Signed-off-by: Milan Pandurov Reviewed-by: Alexander Graf Signed-off-by: Paolo Bonzini commit e30a7d623dccdb3f880fbcad980b0cb589a1da45 Author: Sean Christopherson Date: Tue Jan 7 16:12:10 2020 -0800 KVM: x86/mmu: Apply max PA check for MMIO sptes to 32-bit KVM Remove the bogus 64-bit only condition from the check that disables MMIO spte optimization when the system supports the max PA, i.e. doesn't have any reserved PA bits. 32-bit KVM always uses PAE paging for the shadow MMU, and per Intel's SDM: PAE paging translates 32-bit linear addresses to 52-bit physical addresses. The kernel's restrictions on max physical addresses are limits on how much memory the kernel can reasonably use, not what physical addresses are supported by hardware. Fixes: ce88decffd17 ("KVM: MMU: mmio page fault support") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit a4d956b9390418623ae5d07933e2679c68b6f83c Author: Miaohe Lin Date: Sat Dec 28 14:25:24 2019 +0800 KVM: nVMX: vmread should not set rflags to specify success in case of #PF In case writing to vmread destination operand result in a #PF, vmread should not call nested_vmx_succeed() to set rflags to specify success. Similar to as done in VMPTRST (See handle_vmptrst()). Reviewed-by: Liran Alon Signed-off-by: Miaohe Lin Cc: stable@vger.kernel.org Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit b5c3c1b3c6e95cc67910e27a1e7603d838c2ebed Author: Sean Christopherson Date: Thu Jan 9 15:06:40 2020 -0800 KVM: x86/mmu: Micro-optimize nEPT's bad memptype/XWR checks Rework the handling of nEPT's bad memtype/XWR checks to micro-optimize the checks as much as possible. Move the check to a separate helper, __is_bad_mt_xwr(), which allows the guest_rsvd_check usage in paging_tmpl.h to omit the check entirely for paging32/64 (bad_mt_xwr is always zero for non-nEPT) while retaining the bitwise-OR of the current code for the shadow_zero_check in walk_shadow_page_get_mmio_spte(). Add a comment for the bitwise-OR usage in the mmio spte walk to avoid future attempts to "fix" the code, which is what prompted this optimization in the first place[*]. Opportunistically remove the superfluous '!= 0' and parantheses, and use BIT_ULL() instead of open coding its equivalent. The net effect is that code generation is largely unchanged for walk_shadow_page_get_mmio_spte(), marginally better for ept_prefetch_invalid_gpte(), and significantly improved for paging32/64_prefetch_invalid_gpte(). Note, walk_shadow_page_get_mmio_spte() can't use a templated version of the memtype/XRW as it works on the host's shadow PTEs, e.g. checks that KVM hasn't borked its EPT tables. Even if it could be templated, the benefits of having a single implementation far outweight the few uops that would be saved for NPT or non-TDP paging, e.g. most compilers inline it all the way to up kvm_mmu_page_fault(). [*] https://lkml.kernel.org/r/20200108001859.25254-1-sean.j.christopherson@intel.com Cc: Jim Mattson Cc: David Laight Cc: Arvind Sankar Signed-off-by: Sean Christopherson Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit f8052a053a7af2a53288901d27d6419e100ad8e2 Author: Sean Christopherson Date: Thu Jan 9 15:06:39 2020 -0800 KVM: x86/mmu: Reorder the reserved bit check in prefetch_invalid_gpte() Move the !PRESENT and !ACCESSED checks in FNAME(prefetch_invalid_gpte) above the call to is_rsvd_bits_set(). For a well behaved guest, the !PRESENT and !ACCESSED are far more likely to evaluate true than the reserved bit checks, and they do not require additional memory accesses. Before: Dump of assembler code for function paging32_prefetch_invalid_gpte: 0x0000000000044240 <+0>: callq 0x44245 0x0000000000044245 <+5>: mov %rcx,%rax 0x0000000000044248 <+8>: shr $0x7,%rax 0x000000000004424c <+12>: and $0x1,%eax 0x000000000004424f <+15>: lea 0x0(,%rax,4),%r8 0x0000000000044257 <+23>: add %r8,%rax 0x000000000004425a <+26>: mov %rcx,%r8 0x000000000004425d <+29>: and 0x120(%rsi,%rax,8),%r8 0x0000000000044265 <+37>: mov 0x170(%rsi),%rax 0x000000000004426c <+44>: shr %cl,%rax 0x000000000004426f <+47>: and $0x1,%eax 0x0000000000044272 <+50>: or %rax,%r8 0x0000000000044275 <+53>: jne 0x4427c 0x0000000000044277 <+55>: test $0x1,%cl 0x000000000004427a <+58>: jne 0x4428a 0x000000000004427c <+60>: mov %rdx,%rsi 0x000000000004427f <+63>: callq 0x44080 0x0000000000044284 <+68>: mov $0x1,%eax 0x0000000000044289 <+73>: retq 0x000000000004428a <+74>: xor %eax,%eax 0x000000000004428c <+76>: and $0x20,%ecx 0x000000000004428f <+79>: jne 0x44289 0x0000000000044291 <+81>: mov %rdx,%rsi 0x0000000000044294 <+84>: callq 0x44080 0x0000000000044299 <+89>: mov $0x1,%eax 0x000000000004429e <+94>: jmp 0x44289 End of assembler dump. After: Dump of assembler code for function paging32_prefetch_invalid_gpte: 0x0000000000044240 <+0>: callq 0x44245 0x0000000000044245 <+5>: test $0x1,%cl 0x0000000000044248 <+8>: je 0x4424f 0x000000000004424a <+10>: test $0x20,%cl 0x000000000004424d <+13>: jne 0x4425d 0x000000000004424f <+15>: mov %rdx,%rsi 0x0000000000044252 <+18>: callq 0x44080 0x0000000000044257 <+23>: mov $0x1,%eax 0x000000000004425c <+28>: retq 0x000000000004425d <+29>: mov %rcx,%rax 0x0000000000044260 <+32>: mov (%rsi),%rsi 0x0000000000044263 <+35>: shr $0x7,%rax 0x0000000000044267 <+39>: and $0x1,%eax 0x000000000004426a <+42>: lea 0x0(,%rax,4),%r8 0x0000000000044272 <+50>: add %r8,%rax 0x0000000000044275 <+53>: mov %rcx,%r8 0x0000000000044278 <+56>: and 0x120(%rsi,%rax,8),%r8 0x0000000000044280 <+64>: mov 0x170(%rsi),%rax 0x0000000000044287 <+71>: shr %cl,%rax 0x000000000004428a <+74>: and $0x1,%eax 0x000000000004428d <+77>: mov %rax,%rcx 0x0000000000044290 <+80>: xor %eax,%eax 0x0000000000044292 <+82>: or %rcx,%r8 0x0000000000044295 <+85>: je 0x4425c 0x0000000000044297 <+87>: mov %rdx,%rsi 0x000000000004429a <+90>: callq 0x44080 0x000000000004429f <+95>: mov $0x1,%eax 0x00000000000442a4 <+100>: jmp 0x4425c End of assembler dump. Signed-off-by: Sean Christopherson Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 52918ed5fcf05d97d257f4131e19479da18f5d16 Author: Tom Lendacky Date: Thu Jan 9 17:42:16 2020 -0600 KVM: SVM: Override default MMIO mask if memory encryption is enabled The KVM MMIO support uses bit 51 as the reserved bit to cause nested page faults when a guest performs MMIO. The AMD memory encryption support uses a CPUID function to define the encryption bit position. Given this, it is possible that these bits can conflict. Use svm_hardware_setup() to override the MMIO mask if memory encryption support is enabled. Various checks are performed to ensure that the mask is properly defined and rsvd_bits() is used to generate the new mask (as was done prior to the change that necessitated this patch). Fixes: 28a1f3ac1d0c ("kvm: x86: Set highest physical address bits in non-present/reserved SPTEs") Suggested-by: Sean Christopherson Reviewed-by: Sean Christopherson Signed-off-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit d8010a779a2f3f92fb10d617b8aa1ddd772e987c Author: Miaohe Lin Date: Sat Dec 14 14:48:45 2019 +0800 KVM: vmx: delete meaningless nested_vmx_prepare_msr_bitmap() declaration The function nested_vmx_prepare_msr_bitmap() declaration is below its implementation. So this is meaningless and should be removed. Signed-off-by: Miaohe Lin Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 87382003e3555926017228452dae7e7064b0f915 Author: Sean Christopherson Date: Tue Dec 17 13:32:42 2019 -0800 KVM: x86: Refactor and rename bit() to feature_bit() macro Rename bit() to __feature_bit() to give it a more descriptive name, and add a macro, feature_bit(), to stuff the X68_FEATURE_ prefix to keep line lengths manageable for code that hardcodes the bit to be retrieved. No functional change intended. Cc: Jim Mattson Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit a7c48c3f56db8d18d15ee6d8c2c5e2da447c77cc Author: Sean Christopherson Date: Tue Dec 17 13:32:41 2019 -0800 KVM: x86: Expand build-time assertion on reverse CPUID usage Add build-time checks to ensure KVM isn't trying to do a reverse CPUID lookup on Linux-defined feature bits, along with comments to explain the gory details of X86_FEATUREs and bit(). No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit daa0d8c3a48732e5f64c69cca4c597cab1dfd455 Author: Sean Christopherson Date: Tue Dec 17 13:32:40 2019 -0800 KVM: x86: Add CPUID_7_1_EAX to the reverse CPUID table Add an entry for CPUID_7_1_EAX in the reserve_cpuid array in preparation for incorporating the array in bit() build-time assertions, specifically to avoid an assertion on F(AVX512_BF16) in do_cpuid_7_mask(). No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit a0a2260c12d8658e522f21ed8ece72bbdede58fd Author: Sean Christopherson Date: Tue Dec 17 13:32:39 2019 -0800 KVM: x86: Move bit() helper to cpuid.h Move bit() to cpuid.h in preparation for incorporating the reverse_cpuid array in bit() build-time assertions. Opportunistically use the BIT() macro instead of open-coding the shift. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 5ae78e95ed0c771935d0d24291d221312524830c Author: Sean Christopherson Date: Tue Dec 17 13:32:38 2019 -0800 KVM: x86: Add dedicated emulator helpers for querying CPUID features Add feature-specific helpers for querying guest CPUID support from the emulator instead of having the emulator do a full CPUID and perform its own bit tests. The primary motivation is to eliminate the emulator's usage of bit() so that future patches can add more extensive build-time assertions on the usage of bit() without having to expose yet more code to the emulator. Note, providing a generic guest_cpuid_has() to the emulator doesn't work due to the existing built-time assertions in guest_cpuid_has(), which require the feature being checked to be a compile-time constant. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 345599f9a292899bf5474651f3cea9b7a0576436 Author: Sean Christopherson Date: Tue Dec 10 14:44:16 2019 -0800 KVM: x86: Add macro to ensure reserved cr4 bits checks stay in sync Add a helper macro to generate the set of reserved cr4 bits for both host and guest to ensure that adding a check on guest capabilities is also added for host capabilities, and vice versa. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 96be4e069c938e4a5fc7125de7e1cc7089b1adef Author: Sean Christopherson Date: Tue Dec 10 14:44:15 2019 -0800 KVM: x86: Drop special XSAVE handling from guest_cpuid_has() Now that KVM prevents setting host-reserved CR4 bits, drop the dedicated XSAVE check in guest_cpuid_has() in favor of open coding similar checks in the SVM/VMX XSAVES enabling flows. Note, checking boot_cpu_has(X86_FEATURE_XSAVE) in the XSAVES flows is technically redundant with respect to the CR4 reserved bit checks, e.g. XSAVES #UDs if CR4.OSXSAVE=0 and arch.xsaves_enabled is consumed if and only if CR4.OXSAVE=1 in guest. Keep (add?) the explicit boot_cpu_has() checks to help document KVM's usage of arch.xsaves_enabled. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit f1cdecf5807b1a91829a2dc4f254bfe6bafd4776 Author: Sean Christopherson Date: Tue Dec 10 14:44:14 2019 -0800 KVM: x86: Ensure all logical CPUs have consistent reserved cr4 bits Check the current CPU's reserved cr4 bits against the mask calculated for the boot CPU to ensure consistent behavior across all CPUs. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit b11306b53b2540c6ba068c4deddb6a17d9f8d95b Author: Sean Christopherson Date: Tue Dec 10 14:44:13 2019 -0800 KVM: x86: Don't let userspace set host-reserved cr4 bits Calculate the host-reserved cr4 bits at runtime based on the system's capabilities (using logic similar to __do_cpuid_func()), and use the dynamically generated mask for the reserved bit check in kvm_set_cr4() instead using of the static CR4_RESERVED_BITS define. This prevents userspace from "enabling" features in cr4 that are not supported by the system, e.g. by ignoring KVM_GET_SUPPORTED_CPUID and specifying a bogus CPUID for the vCPU. Allowing userspace to set unsupported bits in cr4 can lead to a variety of undesirable behavior, e.g. failed VM-Enter, and in general increases KVM's attack surface. A crafty userspace can even abuse CR4.LA57 to induce an unchecked #GP on a WRMSR. On a platform without LA57 support: KVM_SET_CPUID2 // CPUID_7_0_ECX.LA57 = 1 KVM_SET_SREGS // CR4.LA57 = 1 KVM_SET_MSRS // KERNEL_GS_BASE = 0x0004000000000000 KVM_RUN leads to a #GP when writing KERNEL_GS_BASE into hardware: unchecked MSR access error: WRMSR to 0xc0000102 (tried to write 0x0004000000000000) at rIP: 0xffffffffa00f239a (vmx_prepare_switch_to_guest+0x10a/0x1d0 [kvm_intel]) Call Trace: kvm_arch_vcpu_ioctl_run+0x671/0x1c70 [kvm] kvm_vcpu_ioctl+0x36b/0x5d0 [kvm] do_vfs_ioctl+0xa1/0x620 ksys_ioctl+0x66/0x70 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x4c/0x170 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fc08133bf47 Note, the above sequence fails VM-Enter due to invalid guest state. Userspace can allow VM-Enter to succeed (after the WRMSR #GP) by adding a KVM_SET_SREGS w/ CR4.LA57=0 after KVM_SET_MSRS, in which case KVM will technically leak the host's KERNEL_GS_BASE into the guest. But, as KERNEL_GS_BASE is a userspace-defined value/address, the leak is largely benign as a malicious userspace would simply be exposing its own data to the guest, and attacking a benevolent userspace would require multiple bugs in the userspace VMM. Cc: stable@vger.kernel.org Cc: Jun Nakajima Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit e348ac7c9e34bb2109facaafd3eea65f47314a9d Author: Sean Christopherson Date: Tue Dec 10 15:24:33 2019 -0800 KVM: VMX: Add helper to consolidate up PT/RTIT WRMSR fault logic Add a helper to consolidate the common checks for writing PT MSRs, and opportunistically clean up the formatting of the affected code. No functional change intended. Cc: Chao Peng Cc: Luwei Kang Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit fe6ed369fca98e99df55c932b85782a5687526b5 Author: Sean Christopherson Date: Tue Dec 10 15:24:32 2019 -0800 KVM: VMX: Add non-canonical check on writes to RTIT address MSRs Reject writes to RTIT address MSRs if the data being written is a non-canonical address as the MSRs are subject to canonical checks, e.g. KVM will trigger an unchecked #GP when loading the values to hardware during pt_guest_enter(). Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 311497e0c5565e7d9cf7b0987d17626b228b8fec Author: Miaohe Lin Date: Wed Dec 11 14:26:25 2019 +0800 KVM: Fix some writing mistakes Fix some writing mistakes in the comments. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 2f9f5cddb29b4fbdf2d328c7a6326d53227e6329 Author: Miaohe Lin Date: Wed Dec 11 14:26:24 2019 +0800 KVM: hyperv: Fix some typos in vcpu unimpl info Fix some typos in vcpu unimpl info. It should be unhandled rather than uhandled. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 00116795aa87ca309a4cf1eaa3d82614807c8668 Author: Miaohe Lin Date: Wed Dec 11 14:26:23 2019 +0800 KVM: Fix some grammar mistakes Fix some grammar mistakes in the comments. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 67b0ae43df179fb095f32a011446e7a883758877 Author: Miaohe Lin Date: Wed Dec 11 14:26:22 2019 +0800 KVM: Fix some comment typos and missing parentheses Fix some typos and add missing parentheses in the comments. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 4d516fe7d38555e8fa08de5d68168b011a144fcb Author: Miaohe Lin Date: Wed Dec 11 14:26:21 2019 +0800 KVM: Fix some out-dated function names in comment Since commit b1346ab2afbe ("KVM: nVMX: Rename prepare_vmcs02_*_full to prepare_vmcs02_*_rare"), prepare_vmcs02_full has been renamed to prepare_vmcs02_rare. nested_vmx_merge_msr_bitmap is renamed to nested_vmx_prepare_msr_bitmap since commit c992384bde84 ("KVM: vmx: speed up MSR bitmap merge"). Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 668effb63de8962e931196e4ebeae8387bfe6d3c Author: Miaohe Lin Date: Wed Dec 11 14:26:20 2019 +0800 KVM: Fix some wrong function names in comment Fix some wrong function names in comment. mmu_check_roots is a typo for mmu_check_root, vmcs_read_any should be vmcs12_read_any and so on. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit cad23e72b7742578fad2e4ec8856d376ec8db923 Author: Miaohe Lin Date: Sat Dec 7 17:25:22 2019 +0800 KVM: x86: check kvm_pit outside kvm_vm_ioctl_reinject() check kvm_pit outside kvm_vm_ioctl_reinject() to keep codestyle consistent with other kvm_pit func and prepare for futher cleanups. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit dfd146fcae8974d40ef6dcfc047d7a1631e064d9 Author: Wanpeng Li Date: Thu Nov 21 11:17:12 2019 +0800 KVM: LAPIC: micro-optimize fixed mode ipi delivery This patch optimizes redundancy logic before fixed mode ipi is delivered in the fast path, broadcast handling needs to go slow path, so the delivery mode repair can be delayed to before slow path. Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini commit 1e9e2622a149e88bd636c9f8fb346a6e6aefeae0 Author: Wanpeng Li Date: Thu Nov 21 11:17:11 2019 +0800 KVM: VMX: FIXED+PHYSICAL mode single target IPI fastpath ICR and TSCDEADLINE MSRs write cause the main MSRs write vmexits in our product observation, multicast IPIs are not as common as unicast IPI like RESCHEDULE_VECTOR and CALL_FUNCTION_SINGLE_VECTOR etc. This patch introduce a mechanism to handle certain performance-critical WRMSRs in a very early stage of KVM VMExit handler. This mechanism is specifically used for accelerating writes to x2APIC ICR that attempt to send a virtual IPI with physical destination-mode, fixed delivery-mode and single target. Which was found as one of the main causes of VMExits for Linux workloads. The reason this mechanism significantly reduce the latency of such virtual IPIs is by sending the physical IPI to the target vCPU in a very early stage of KVM VMExit handler, before host interrupts are enabled and before expensive operations such as reacquiring KVM’s SRCU lock. Latency is reduced even more when KVM is able to use APICv posted-interrupt mechanism (which allows to deliver the virtual IPI directly to target vCPU without the need to kick it to host). Testing on Xeon Skylake server: The virtual IPI latency from sender send to receiver receive reduces more than 200+ cpu cycles. Reviewed-by: Liran Alon Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Sean Christopherson Cc: Vitaly Kuznetsov Cc: Liran Alon Signed-off-by: Wanpeng Li Signed-off-by: Paolo Bonzini commit 9167bd96346473de5b61124f4589949fdf3026cf Author: Arvind Sankar Date: Wed Jan 15 11:07:50 2020 -0500 sparc/console: kill off obsolete declarations commit 09d3f3f0e02c ("sparc: Kill PROM console driver.") missed removing the declarations of the deleted prom_con structure and prom_con_init function from console.h. Kill them off now. Signed-off-by: Arvind Sankar Signed-off-by: David S. Miller commit 34ca70ef7d3a9fa7e89151597db5e37ae1d429b4 Author: Arnd Bergmann Date: Tue Jan 14 14:26:14 2020 +0100 sparc32: fix struct ipc64_perm type definition As discussed in the strace issue tracker, it appears that the sparc32 sysvipc support has been broken for the past 11 years. It was however working in compat mode, which is how it must have escaped most of the regular testing. The problem is that a cleanup patch inadvertently changed the uid/gid fields in struct ipc64_perm from 32-bit types to 16-bit types in uapi headers. Both glibc and uclibc-ng still use the original types, so they should work fine with compat mode, but not natively. Change the definitions to use __kernel_uid32_t and __kernel_gid32_t again. Fixes: 83c86984bff2 ("sparc: unify ipcbuf.h") Link: https://github.com/strace/strace/issues/116 Cc: # v2.6.29 Cc: Sam Ravnborg Cc: "Dmitry V . Levin" Cc: Rich Felker Cc: libc-alpha@sourceware.org Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit e2b9fc2dd6911b730279352a676251e70e51643b Author: Andreas Larsson Date: Mon Jan 13 17:01:47 2020 +0100 sparc32, leon: Stop adding vendor and device id to prom ambapp path components These extra fields before the @ are not handled in of_node_name_eq, making commit b3e46d1a0590500335f0b95e669ad6d84b12b03a break node name comparisons for ambapp path components, thereby making LEON systems unable to boot. As there is no need for the tacked on vendor and device ID fields in the path component, resolve this situation by removing them. Signed-off-by: Andreas Larsson Signed-off-by: David S. Miller commit 4f2c17e0f3324b3b82a3e0985245aefd6dcc5495 Merge: d84b99ff69c1 e27cca96cd68 Author: David S. Miller Date: Tue Jan 21 12:18:20 2020 +0100 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next Steffen Klassert says: ==================== pull request (net-next): ipsec-next 2020-01-21 1) Add support for TCP encapsulation of IKE and ESP messages, as defined by RFC 8229. Patchset from Sabrina Dubroca. Please note that there is a merge conflict in: net/unix/af_unix.c between commit: 3c32da19a858 ("unix: Show number of pending scm files of receive queue in fdinfo") from the net-next tree and commit: b50b0580d27b ("net: add queue argument to __skb_wait_for_more_packets and __skb_{,try_}recv_datagram") from the ipsec-next tree. The conflict can be solved as done in linux-next. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit d84b99ff69c14a03d76e7fdf9c04895848e6aece Author: Chen Zhou Date: Tue Jan 21 17:24:55 2020 +0800 drivers: net: declance: fix comparing pointer to 0 Fixes coccicheck warning: ./drivers/net/ethernet/amd/declance.c:611:14-15: WARNING comparing pointer to 0 Replace "skb == 0" with "!skb". Signed-off-by: Chen Zhou Signed-off-by: David S. Miller commit aeaec7bcebd9c85372191fb42a4478d21972d99e Author: Alex Shi Date: Tue Jan 21 16:50:07 2020 +0800 tcp/ipv4: remove AF_INET_FAMILY After commit 079096f103fa ("tcp/dccp: install syn_recv requests into ehash table") the macro isn't used anymore. remove it. Signed-off-by: Alex Shi Cc: "David S. Miller" Cc: Alexey Kuznetsov Cc: Hideaki YOSHIFUJI Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller commit 339821f7d2d890a61cebeb9d085643668d4df6e4 Author: Alex Shi Date: Tue Jan 21 16:49:53 2020 +0800 net/hsr: remove seq_nr_after_or_eq It's never used after introduced. So maybe better to remove. Signed-off-by: Alex Shi Cc: Arvid Brodin Cc: "David S. Miller" Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller commit e09538eac996e11d36027cb546a9ac50d07edeb1 Author: David S. Miller Date: Tue Jan 21 12:02:25 2020 +0100 hdlx_x25: Fix backwards compat test. drivers/net/wan/hdlc_x25.c: In function ‘x25_ioctl’: drivers/net/wan/hdlc_x25.c:256:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 256 | if (ifr->ifr_settings.size = 0) { | ^~~ Signed-off-by: David S. Miller commit 0159984796dc66ab6dc1a7cbd891e8f6bca640dd Merge: 953c4a08dfc9 60df7e91cc3e Author: David S. Miller Date: Tue Jan 21 11:46:21 2020 +0100 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: misc updates for -net-next This series includes some misc updates for the HNS3 ethernet driver. [patch 1] adds a limitation for the error log in the hns3_clean_tx_ring(). [patch 2] adds a check for pfmemalloc flag before reusing pages since these pages may be used some special case. [patch 3] assigns a default reset type 'HNAE3_NONE_RESET' to VF's reset_type after initializing or reset. [patch 4] unifies macro HCLGE_DFX_REG_TYPE_CNT's definition into header file. [patch 5] refines the parameter 'size' of snprintf() in the hns3_init_module(). [patch 6] rewrites a debug message in hclge_put_vector(). [patch 7~9] adds some cleanups related to coding style. ==================== Signed-off-by: David S. Miller commit 60df7e91cc3efa141802dffad3a82b95c2ec479e Author: Huazhong Tan Date: Tue Jan 21 16:42:13 2020 +0800 net: hns3: cleanup some coding style issue This patch removes some unnecessary return value assignments, some duplicated printing in the caller, refines the judgment of 0 and uses le16_to_cpu to replace __le16_to_cpu. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 322cb97c0734555d7a10299954624363de370c9c Author: Huazhong Tan Date: Tue Jan 21 16:42:12 2020 +0800 net: hns3: remove redundant print on ENOMEM All kmalloc-based functions print enough information on failures. So this patch removes the log in hclge_get_dfx_reg() when returns ENOMEM. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit e31053298408dc1fbb33ad2fdc9a114e70a9dfd6 Author: Guangbin Huang Date: Tue Jan 21 16:42:11 2020 +0800 net: hns3: delete unnecessary blank line and space for cleanup This patch deletes some unnecessary blank lines and spaces to clean up code, and in hclgevf_set_vlan_filter() moves the comment to the front of hclgevf_send_mbx_msg(). Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 6f8e330d27464a7ff436f2944b84d640e42e5e6e Author: Yonglong Liu Date: Tue Jan 21 16:42:10 2020 +0800 net: hns3: rewrite a log in hclge_put_vector() When gets vector fails, hclge_put_vector() should print out the vector instead of vector_id in the log and return the wrong vector_id to its caller. Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit cdc37385e3abaf2704adf8bb15a2c14f04762d3d Author: Guojia Liao Date: Tue Jan 21 16:42:09 2020 +0800 net: hns3: refine the input parameter 'size' for snprintf() The function snprintf() writes at most size bytes (including the terminating null byte ('\0') to str. Now, We can guarantee that the parameter of size is lager than the length of str to be formatting including its terminating null byte. So it's unnecessary to minus 1 for the input parameter 'size'. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 9027d043fc31145918b40b7a68956eaff4ddb5de Author: Guojia Liao Date: Tue Jan 21 16:42:08 2020 +0800 net: hns3: move duplicated macro definition into header Macro HCLGE_GET_DFX_REG_TYPE_CNT in hclge_dbg_get_dfx_bd_num() and macro HCLGE_DFX_REG_BD_NUM in hclge_get_dfx_reg_bd_num() have the same meaning, so just defines HCLGE_GET_DFX_REG_TYPE_CNT in hclge_main.h. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit afb6afdb8dc67988d17e4926df8c8fe248ea555a Author: Huazhong Tan Date: Tue Jan 21 16:42:07 2020 +0800 net: hns3: set VF's default reset_type to HNAE3_NONE_RESET reset_type means what kind of reset the driver is handling now, so after initializing or reset, the reset_type of VF should be set to HNAE3_NONE_RESET, otherwise, this unknown default value may be a little misleading when the device is running. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 08bb3857c6c2e2a62fe0cdc593af57215e9b95bc Author: Yunsheng Lin Date: Tue Jan 21 16:42:06 2020 +0800 net: hns3: do not reuse pfmemalloc pages HNS3 driver allocates pages for DMA with dev_alloc_pages(), which calls alloc_pages_node() with the __GFP_MEMALLOC flag. So, in case of OOM condition, HNS3 can get pages with pfmemalloc flag set. So do not reuse the pages with pfmemalloc flag set because those pages are reserved for special cases, such as low memory case. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 09783d448bccf1ec1c91d0b9e5443b0bcb034dbb Author: Yunsheng Lin Date: Tue Jan 21 16:42:05 2020 +0800 net: hns3: limit the error logging in the hns3_clean_tx_ring() The error log printed by netdev_err() in the hns3_clean_tx_ring() may spam the kernel log. This patch uses hns3_rl_err() to ratelimit the error log in the hns3_clean_tx_ring(). Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 953c4a08dfc9ffe763a8340ac10f459d6c6cc4eb Author: Martin Schiller Date: Tue Jan 21 07:00:34 2020 +0100 wan/hdlc_x25: fix skb handling o call skb_reset_network_header() before hdlc->xmit() o change skb proto to HDLC (0x0019) before hdlc->xmit() o call dev_queue_xmit_nit() before hdlc->xmit() This changes make it possible to trace (tcpdump) outgoing layer2 (ETH_P_HDLC) packets Additionally call skb_reset_network_header() after each skb_push() / skb_pull(). Signed-off-by: Martin Schiller Signed-off-by: David S. Miller commit f362e5fe0f1f9774b28c5b4c9b07b0168575cf6e Author: Martin Schiller Date: Tue Jan 21 07:00:33 2020 +0100 wan/hdlc_x25: make lapb params configurable This enables you to configure mode (DTE/DCE), Modulo, Window, T1, T2, N2 via sethdlc (which needs to be patched as well). Signed-off-by: Martin Schiller Signed-off-by: David S. Miller commit 29237d22bc45d340792be217f40fb728ca48b6e6 Author: Hans Wippel Date: Tue Jan 21 01:04:46 2020 +0100 net/smc: allow unprivileged users to read pnet table The current flags of the SMC_PNET_GET command only allow privileged users to retrieve entries from the pnet table via netlink. The content of the pnet table may be useful for all users though, e.g., for debugging smc connection problems. This patch removes the GENL_ADMIN_PERM flag so that unprivileged users can read the pnet table. Signed-off-by: Hans Wippel Signed-off-by: David S. Miller commit c04f2e0dd5309607dbc425f02b5ac076b395f19d Author: Alex Shi Date: Tue Jan 21 16:49:17 2020 +0800 gfs2: remove unused LBIT macros Since commit 223b2b889f37 ("GFS2: Fix alignment issue and tidy gfs2_bitfit"), these 3 macros aren't used anymore, so remove them. Signed-off-by: Alex Shi Signed-off-by: Andreas Gruenbacher commit b3ca4e447dba6c30c7867a1353712e3507dc5110 Author: Alex Shi Date: Tue Jan 21 16:49:12 2020 +0800 fs/gfs2: remove unused IS_DINODE and IS_LEAF macros Since commit 1579343a73e3 ("GFS2: Remove dirent_first() function"), these macros aren't used any more, so remove them. Signed-off-by: Alex Shi Signed-off-by: Andreas Gruenbacher commit 108eae2d4d10cd29f7af75d45e38bc3bcde24a7c Author: Julien Thierry Date: Thu Jan 9 16:02:59 2020 +0000 arm64: entry: Avoid empty alternatives entries kernel_ventry will create alternative entries to potentially replace 0 instructions with 0 instructions for EL1 vectors. While this does not cause an issue, it pointlessly takes up some bytes in the alternatives section. Do not generate such entries. Acked-by: Mark Rutland Signed-off-by: Julien Thierry Signed-off-by: Will Deacon commit 3ccc897b228a08db741469e1d19812b38afe015e Merge: bea5416561b1 f1294617d2f3 Author: David S. Miller Date: Tue Jan 21 10:50:41 2020 +0100 Merge branch 'phy-add-new-version-of-phy_do_ioctl-and-convert-suitable-drivers' Heiner Kallweit says: ==================== net: phy: add new version of phy_do_ioctl and convert suitable drivers We just added phy_do_ioctl, but it turned out that we need another version of this function that doesn't check whether net_device is running. So rename phy_do_ioctl to phy_do_ioctl_running and add a new version of phy_do_ioctl. Eventually convert suitable drivers to use phy_do_ioctl. ==================== Signed-off-by: David S. Miller commit f1294617d2f38bd2b9f6cce516b0326858b61182 Author: Heiner Kallweit Date: Mon Jan 20 22:18:37 2020 +0100 net: convert suitable network drivers to use phy_do_ioctl Convert suitable network drivers to use phy_do_ioctl. Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit bbbf8430afe6906abbf879352fe10d24d380e588 Author: Heiner Kallweit Date: Mon Jan 20 22:17:11 2020 +0100 net: phy: add new version of phy_do_ioctl Add a new version of phy_do_ioctl that doesn't check whether net_device is running. It will typically be used if suitable drivers attach the PHY in probe already. Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 3231e5d2228a2078ce5982d63ea9a617e4972c00 Author: Heiner Kallweit Date: Mon Jan 20 22:16:07 2020 +0100 net: phy: rename phy_do_ioctl to phy_do_ioctl_running We just added phy_do_ioctl, but it turned out that we need another version of this function that doesn't check whether net_device is running. So rename phy_do_ioctl to phy_do_ioctl_running. Signed-off-by: Heiner Kallweit Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit bea5416561b1b997adbe3a04a5665e647c589a13 Author: Chen Zhou Date: Mon Jan 20 20:50:33 2020 +0800 net: hns3: replace snprintf with scnprintf in hns3_update_strings snprintf returns the number of bytes that would be written, which may be greater than the the actual length to be written. Here use extra code to handle this. scnprintf returns the number of bytes that was actually written, just use scnprintf to simplify the code. Signed-off-by: Chen Zhou Signed-off-by: David S. Miller commit 49e211c0e357d8c5ccdc3c6c5fb8f94ab85d037f Author: Chen Zhou Date: Mon Jan 20 20:49:43 2020 +0800 net: hns3: replace snprintf with scnprintf in hns3_dbg_cmd_read The return value of snprintf may be greater than the size of HNS3_DBG_READ_LEN, use scnprintf instead in hns3_dbg_cmd_read. Signed-off-by: Chen Zhou Signed-off-by: David S. Miller commit ffdbae28d9d1af70b7d63ffd7827e9795cd8d0df Author: Tejas Patel Date: Mon Dec 2 02:38:51 2019 -0800 drivers: soc: xilinx: Use mailbox IPI callback Add support for init suspend callback through mailbox IPI callback. Signed-off-by: Tejas Patel Signed-off-by: Rajan Vaja Signed-off-by: Michal Simek commit a117daa83385be3876a6012eba459866586c94eb Author: Rajan Vaja Date: Mon Dec 2 02:38:50 2019 -0800 dt-bindings: power: reset: xilinx: Add bindings for ipi mailbox Add IPI mailbox property and its example in xilinx zynqmp-power documentation. Signed-off-by: Rajan Vaja Reviewed-by: Rob Herring Signed-off-by: Michal Simek commit c3c431de99c068e3f64d01335c1532b22e4b1d1b Author: Geert Uytterhoeven Date: Tue Jan 21 10:33:11 2020 +0100 dmaengine: Move dma_get_{,any_}slave_channel() to private dmaengine.h The functions dma_get_slave_channel() and dma_get_any_slave_channel() are called from DMA engine drivers only. Hence move their declarations from the public header file to the private header file drivers/dma/dmaengine.h. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200121093311.28639-4-geert+renesas@glider.be Signed-off-by: Vinod Koul commit 71ca5b78235e79c36f774773491064d7921d1942 Author: Geert Uytterhoeven Date: Tue Jan 21 10:33:10 2020 +0100 dmaengine: Remove dma_request_slave_channel_compat() wrapper At its original introduction, dma_request_slave_channel_compat() used a wrapper, to accommodate filter functions that modify the mask passed. Filter functions can no longer modify masks, and the mask parameter was made const in commit a53e28da574a40bc ("dma: Make the 'mask' parameter of __dma_request_channel const") consecutively. Hence remove the wrapper, and rename __dma_request_slave_channel_compat() to dma_request_slave_channel_compat(), to get rid of one more function name starting with a double underscore. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200121093311.28639-3-geert+renesas@glider.be Signed-off-by: Vinod Koul commit 69b1189ba2cd6643474312004f10685324e38f58 Author: Geert Uytterhoeven Date: Tue Jan 21 10:33:09 2020 +0100 dmaengine: Remove dma_device_satisfies_mask() wrapper Commit aa1e6f1a385eb2b0 ("dmaengine: kill struct dma_client and supporting infrastructure") removed the last user of the dma_device_satisfies_mask() wrapper. Remove the wrapper, and rename __dma_device_satisfies_mask() to dma_device_satisfies_mask(), to get rid of one more function starting with a double underscore. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200121093311.28639-2-geert+renesas@glider.be Signed-off-by: Vinod Koul commit ad063075d406dd04d2d9bc1005161a5a08fb38c5 Merge: 17e10a15a796 b2dfc6765e45 Author: David S. Miller Date: Tue Jan 21 10:22:51 2020 +0100 Merge tag 'rds-odp-for-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma Leon Romanovsky says: ==================== Use ODP MRs for kernel ULPs The following series extends MR creation routines to allow creation of user MRs through kernel ULPs as a proxy. The immediate use case is to allow RDS to work over FS-DAX, which requires ODP (on-demand-paging) MRs to be created and such MRs were not possible to create prior this series. The first part of this patchset extends RDMA to have special verb ib_reg_user_mr(). The common use case that uses this function is a userspace application that allocates memory for HCA access but the responsibility to register the memory at the HCA is on an kernel ULP. This ULP acts as an agent for the userspace application. The second part provides advise MR functionality for ULPs. This is integral part of ODP flows and used to trigger pagefaults in advance to prepare memory before running working set. The third part is actual user of those in-kernel APIs. ==================== Signed-off-by: David S. Miller commit d00fdf694b11f53f25b243bcbdb850e7c369a7d0 Author: Anson Huang Date: Mon Jan 13 13:33:16 2020 +0800 dt-bindings: fsl-imx-sdma: Add i.MX8MM/i.MX8MN/i.MX8MP compatible string Add imx8mm/imx8mn/imx8mp sdma support. Signed-off-by: Anson Huang Acked-by: Rob Herring Link: https://lore.kernel.org/r/1578893602-14395-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Vinod Koul commit cc88525ebffc757e00cc5a5d61da6271646c7f5f Author: Matthias Fend Date: Wed Jan 15 11:22:49 2020 +0100 dmaengine: zynqmp_dma: fix burst length configuration Since the dma engine expects the burst length register content as power of 2 value, the burst length needs to be converted first. Additionally add a burst length range check to avoid corrupting unrelated register bits. Signed-off-by: Matthias Fend Link: https://lore.kernel.org/r/20200115102249.24398-1-matthias.fend@wolfvision.net Signed-off-by: Vinod Koul commit 98346023365931948b78436ae761544b09035b3b Author: Vladimir Murzin Date: Mon Jan 20 10:36:02 2020 +0000 arm64: Kconfig: select HAVE_FUTEX_CMPXCHG arm64 provides always working implementation of futex_atomic_cmpxchg_inatomic(), so there is no need to check it runtime. Reported-by: Piyush swami Signed-off-by: Vladimir Murzin Signed-off-by: Will Deacon commit 1e4a295567949ee8e6896a7db70afd1b6246966e Author: Gao Xiang Date: Tue Jan 21 14:48:19 2020 +0800 erofs: clean up z_erofs_submit_queue() A label and extra variables will be eliminated, which is more cleaner. Link: https://lore.kernel.org/r/20200121064819.139469-1-gaoxiang25@huawei.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 587a67b77789f822930d8f5e65bdd161c82e6365 Author: Gao Xiang Date: Tue Jan 21 14:47:47 2020 +0800 erofs: fold in postsubmit_is_all_bypassed() No need to introduce such separated helper since cache strategy compile configs were changed into runtime options instead in v5.4. No logic changes. Link: https://lore.kernel.org/r/20200121064747.138987-1-gaoxiang25@huawei.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit ffc079a4accc2bd02758eb93cb8efcb3bfee1891 Author: Stefan Mavrodiev Date: Fri Jan 10 16:11:39 2020 +0200 dmaengine: sun4i: Add support for cyclic requests with dedicated DMA Currently the cyclic transfers can be used only with normal DMAs. They can be used by pcm_dmaengine module, which is required for implementing sound with sun4i-hdmi encoder. This is so because the controller can accept audio only from a dedicated DMA. This patch enables them, following the existing style for the scatter/gather type transfers. Signed-off-by: Stefan Mavrodiev Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20200110141140.28527-2-stefan@olimex.com Signed-off-by: Vinod Koul commit 4b048178854da11656596d36a107577d66fd1e08 Author: Chen Zhou Date: Mon Jan 20 20:58:43 2020 +0800 dmaengine: fsl-qdma: fix duplicated argument to && There is duplicated argument to && in function fsl_qdma_free_chan_resources, which looks like a typo, pointer fsl_queue->desc_pool also needs NULL check, fix it. Detected with coccinelle. Fixes: b092529e0aa0 ("dmaengine: fsl-qdma: Add qDMA controller driver for Layerscape SoCs") Signed-off-by: Chen Zhou Reviewed-by: Peng Ma Tested-by: Peng Ma Link: https://lore.kernel.org/r/20200120125843.34398-1-chenzhou10@huawei.com Signed-off-by: Vinod Koul commit 2bd8010a618c9181dd8d49097a1c72fd396c632e Author: Peter Ujfalusi Date: Tue Jan 21 09:01:04 2020 +0200 dmaengine: ti: k3-psil: make symbols static Fixe the following warnings by making these static drivers/dma/ti/k3-psil-j721e.c:62:16: warning: symbol 'j721e_src_ep_map' was not declared. Should it be static? drivers/dma/ti/k3-psil-j721e.c:172:16: warning: symbol 'j721e_dst_ep_map' was not declared. Should it be static? drivers/dma/ti/k3-psil-j721e.c:216:20: warning: symbol 'j721e_ep_map' was not declared. Should it be static? CC drivers/dma/ti/k3-psil-j721e.o drivers/dma/ti/k3-psil-am654.c:52:16: warning: symbol 'am654_src_ep_map' was not declared. Should it be static? drivers/dma/ti/k3-psil-am654.c:127:16: warning: symbol 'am654_dst_ep_map' was not declared. Should it be static? drivers/dma/ti/k3-psil-am654.c:169:20: warning: symbol 'am654_ep_map' was not declared. Should it be static? Reported-by: Vinod Koul Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200121070104.4393-1-peter.ujfalusi@ti.com [vkoul: updated patch title] Signed-off-by: Vinod Koul commit 2928fa0a97ebb9549cb877fdc99aed9b95438c3a Author: Kai Vehmanen Date: Mon Jan 20 18:01:17 2020 +0200 ALSA: hda/hdmi - add retry logic to parse_intel_hdmi() The initial snd_hda_get_sub_node() can fail on certain devices (e.g. some Chromebook models using Intel GLK). The failure rate is very low, but as this is is part of the probe process, end-user impact is high. In observed cases, related hardware status registers have expected values, but the node query still fails. Retrying the node query does seem to help, so fix the problem by adding retry logic to the query. This does not impact non-Intel platforms. BugLink: https://github.com/thesofproject/linux/issues/1642 Signed-off-by: Kai Vehmanen Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200120160117.29130-4-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit c31427d0d21e198c74d5d92082c4b8194b257f82 Author: Takashi Iwai Date: Mon Jan 20 13:44:23 2020 +0100 ALSA: hda: No preallocation on x86 platforms Like many other drivers, HD-audio drivers also do PCM buffer preallocation to assure the buffer pages allocated at the early boot stage. This step is useful for platforms that may fail to allocate the PCM hardware buffers -- which is mostly for either large continuous pages or with the specific DMA mask (like emu10k1). OTOH, when a buffer is allocated as SG-buffer and the DMA mask is either 32 or 64 bits, the allocation almost never fails unless it hits the real OOM situation. In such a case, we don't need the preallocation inevitably unlike the cases above. That said, we may drop the preallocation for HD-audio that does allocate via SG-buffers, and the patch achieves it. However, there is one caveat: the buffer allocation behavior depends on CONFIG_SND_DMA_SGBUF, and it falls back to the continuous pages when it's not set. And, currently this SG buffer allocation is enabled only on x86 platforms. So, covering those fall-outs, the patch adjusts CONFIG_SND_HDA_PREALLOC_SIZE depending on the condition, and keeps the old behavior as-is for non-x86 platforms. On x86, the kconfig item is no longer adjustable but always set to zero for disabling the preallocation. You can still enable the preallocation via procfs interface at any time later, too. Link: https://lore.kernel.org/r/20200120124423.11862-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit d4cfb30fce03093ad944e0b44bd8f40bdad5330e Author: Takashi Iwai Date: Mon Jan 20 13:44:22 2020 +0100 ALSA: pcm: Set per-card upper limit of PCM buffer allocations Currently, the available buffer allocation size for a PCM stream depends on the preallocated size; when a buffer has been preallocated, the max buffer size is set to that size, so that application won't re-allocate too much memory. OTOH, when no preallocation is done, each substream may allocate arbitrary size of buffers as long as snd_pcm_hardware.buffer_bytes_max allows -- which can be quite high, HD-audio sets 1GB there. It means that the system may consume a high amount of pages for PCM buffers, and they are pinned and never swapped out. This can lead to OOM easily. For avoiding such a situation, this patch adds the upper limit per card. Each snd_pcm_lib_malloc_pages() and _free_pages() calls are tracked and it will return an error if the total amount of buffers goes over the defined upper limit. The default value is set to 32MB, which should be really large enough for usual operations. If larger buffers are needed for any specific usage, it can be adjusted (also dynamically) via snd_pcm.max_alloc_per_card option. Setting zero there means no chceck is performed, and again, unlimited amount of buffers are allowed. Link: https://lore.kernel.org/r/20200120124423.11862-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit d702419134133db1eab2067dc6ea5723467fd917 Author: Grygorii Strashko Date: Mon Dec 23 13:04:51 2019 +0200 dmaengine: ti: k3-udma: Add glue layer for non DMAengine users Certain users can not use right now the DMAengine API due to missing features in the core. Prime example is Networking. These users can use the glue layer interface to avoid misuse of DMAengine API and when the core gains the needed features they can be converted to use generic API. The most prominent features the glue layer clients are depending on: - most PSI-L native peripheral use extra rflow ranges on a receive channel and depending on the peripheral's configuration packets from a single free descriptor ring is going to be received to different receive ring - it is also possible to have different free descriptor rings per rflow and an rflow can also support 4 additional free descriptor ring based on the size of the incoming packet - out of order completion of descriptors on a channel - when we have several queues to handle different priority packets the descriptors will be completed 'out-of-order' - the notion of prep_slave_sg is not matching with what the streaming type of operation is demanding for networking - Streaming type of operation - Ability to fill the free descriptor ring with descriptors in anticipation of incoming traffic and when a packet arrives UDMAP will form a packet and gives it to the client driver - the descriptors are not backed with exact size data buffers as we don't know the size of the packet we will receive, but as a generic pool of buffers to be used by the receive channel - NAPI type of operation (polling instead of interrupt driven transfer) - without this we can not sustain gigabit speeds and we need to support NAPI - not to limit this to networking, but other high performance operations Signed-off-by: Grygorii Strashko Signed-off-by: Peter Ujfalusi Tested-by: Keerthy Link: https://lore.kernel.org/r/20191223110458.30766-12-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 25dcb5dd7b7ce5587c1df18f584ff78f51a68a94 Author: Peter Ujfalusi Date: Mon Dec 23 13:04:50 2019 +0200 dmaengine: ti: New driver for K3 UDMA Split patch for review containing: defines, structs, io and low level functions and interrupt callbacks. DMA driver for Texas Instruments K3 NAVSS Unified DMA – Peripheral Root Complex (UDMA-P) The UDMA-P is intended to perform similar (but significantly upgraded) functions as the packet-oriented DMA used on previous SoC devices. The UDMA-P module supports the transmission and reception of various packet types. The UDMA-P is architected to facilitate the segmentation and reassembly of SoC DMA data structure compliant packets to/from smaller data blocks that are natively compatible with the specific requirements of each connected peripheral. Multiple Tx and Rx channels are provided within the DMA which allow multiple segmentation or reassembly operations to be ongoing. The DMA controller maintains state information for each of the channels which allows packet segmentation and reassembly operations to be time division multiplexed between channels in order to share the underlying DMA hardware. An external DMA scheduler is used to control the ordering and rate at which this multiplexing occurs for Transmit operations. The ordering and rate of Receive operations is indirectly controlled by the order in which blocks are pushed into the DMA on the Rx PSI-L interface. The UDMA-P also supports acting as both a UTC and UDMA-C for its internal channels. Channels in the UDMA-P can be configured to be either Packet-Based or Third-Party channels on a channel by channel basis. The initial driver supports: - MEM_TO_MEM (TR mode) - DEV_TO_MEM (Packet / TR mode) - MEM_TO_DEV (Packet / TR mode) - Cyclic (Packet / TR mode) - Metadata for descriptors Signed-off-by: Peter Ujfalusi Tested-by: Keerthy Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20191223110458.30766-11-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit d3cd299bb151c1c8579c782bf6ef2cb01ebf6e5e Author: Peter Ujfalusi Date: Mon Dec 23 13:04:49 2019 +0200 dt-bindings: dma: ti: Add document for K3 UDMA New binding document for Texas Instruments K3 NAVSS Unified DMA – Peripheral Root Complex (UDMA-P). UDMA-P is introduced as part of the K3 architecture and can be found in AM654 and j721e. Signed-off-by: Peter Ujfalusi Reviewed-by: Rob Herring Tested-by: Keerthy Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20191223110458.30766-10-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 8c6bb62f6b4a24c446511e8f894251946dcc2ef1 Author: Peter Ujfalusi Date: Mon Dec 23 13:04:48 2019 +0200 dmaengine: ti: k3 PSI-L remote endpoint configuration In K3 architecture the DMA operates within threads. One end of the thread is UDMAP, the other is on the peripheral side. The UDMAP channel configuration depends on the needs of the remote endpoint and it can be differ from peripheral to peripheral. This patch adds database for am654 and j721e and small API to fetch the PSI-L endpoint configuration from the database which should only used by the DMA driver(s). Another API is added for native peripherals to give possibility to pass new configuration for the threads they are using, which is needed to be able to handle changes caused by different firmware loaded for the peripheral for example. Signed-off-by: Peter Ujfalusi Tested-by: Keerthy Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20191223110458.30766-9-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 69bafc318560d02dc07e3b52af0d7cf5fc036bfe Author: Peter Ujfalusi Date: Mon Dec 23 13:04:47 2019 +0200 dmaengine: ti: Add cppi5 header for K3 NAVSS/UDMA The K3 DMA architecture uses CPPI5 (Communications Port Programming Interface) specified descriptors over PSI-L bus within NAVSS. The header provides helpers, macros to work with these descriptors in a consistent way. Signed-off-by: Peter Ujfalusi Tested-by: Keerthy Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20191223110458.30766-8-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 816ebf48442eef1c61db26d2ec055f5c8ac83b21 Author: Peter Ujfalusi Date: Mon Dec 23 13:04:46 2019 +0200 dmaengine: Add helper function to convert direction value to text dmaengine_get_direction_text() can be useful when the direction is printed out. The text is easier to comprehend than the number. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191223110458.30766-7-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 6755ec06d1333765d2b935e4e4a5bd011332bac6 Author: Peter Ujfalusi Date: Mon Dec 23 13:04:45 2019 +0200 dmaengine: Add support for reporting DMA cached data amount A DMA hardware can have big cache or FIFO and the amount of data sitting in the DMA fabric can be an interest for the clients. For example in audio we want to know the delay in the data flow and in case the DMA have significantly large FIFO/cache, it can affect the latenc/delay Signed-off-by: Peter Ujfalusi Reviewed-by: Tero Kristo Tested-by: Keerthy Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20191223110458.30766-6-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 4db8fd32ed2be7cc510e51e43ec3349aa64074a9 Author: Peter Ujfalusi Date: Mon Dec 23 13:04:44 2019 +0200 dmaengine: Add metadata_ops for dma_async_tx_descriptor The metadata is best described as side band data or parameters traveling alongside the data DMAd by the DMA engine. It is data which is understood by the peripheral and the peripheral driver only, the DMA engine see it only as data block and it is not interpreting it in any way. The metadata can be different per descriptor as it is a parameter for the data being transferred. If the DMA supports per descriptor metadata it can implement the attach, get_ptr/set_len callbacks. Client drivers must only use either attach or get_ptr/set_len to avoid misconfiguration. Client driver can check if a given metadata mode is supported by the channel during probe time with dmaengine_is_metadata_mode_supported(chan, DESC_METADATA_CLIENT); dmaengine_is_metadata_mode_supported(chan, DESC_METADATA_ENGINE); and based on this information can use either mode. Wrappers are also added for the metadata_ops. To be used in DESC_METADATA_CLIENT mode: dmaengine_desc_attach_metadata() To be used in DESC_METADATA_ENGINE mode: dmaengine_desc_get_metadata_ptr() dmaengine_desc_set_metadata_len() Signed-off-by: Peter Ujfalusi Reviewed-by: Tero Kristo Tested-by: Keerthy Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20191223110458.30766-5-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 7d083ae983573de16e3ab0bfd47486996d211417 Author: Peter Ujfalusi Date: Mon Dec 23 13:04:43 2019 +0200 dmaengine: doc: Add sections for per descriptor metadata support Update the provider and client documentation with details about the metadata support. Signed-off-by: Peter Ujfalusi Reviewed-by: Tero Kristo Tested-by: Keerthy Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20191223110458.30766-4-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 5fe4beaac239816338b132517cf638d690f74d39 Merge: 4d3df16840a2 3277e8aa2504 Author: Vinod Koul Date: Tue Jan 21 11:01:09 2020 +0530 Merge TI ringacc driver from Santosh This is for dependency of new TI ringacc dmaengine drivers Merge tag 'drivers_soc_for_5.6' into topic/ti SOC: TI Keystone Ring Accelerator driver The Ring Accelerator (RINGACC or RA) provides hardware acceleration to enable straightforward passing of work between a producer and a consumer. There is one RINGACC module per NAVSS on TI AM65x SoCs. Signed-off-by: Vinod Koul commit 0dfed6dc24576f256782d5288537927c69256081 Author: Alexandru Ardelean Date: Fri Jan 10 15:38:15 2020 -0800 Input: ads7846 - use new `delay` structure for SPI transfer delays In a recent change to the SPI subsystem [1], a new `delay` struct was added to replace the `delay_usecs`. This change replaces the current `delay_usecs` with `delay` for this driver. The `spi_transfer_delay_exec()` function [in the SPI framework] makes sure that both `delay_usecs` & `delay` are used (in this order to preserve backwards compatibility). [1] commit bebcfd272df6485 ("spi: introduce `delay` field for `spi_transfer` + spi_transfer_delay_exec()") Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20191210141103.15910-1-alexandru.ardelean@analog.com Signed-off-by: Dmitry Torokhov commit 76ed99d199f7b66b1f762392b19d115994d7e81b Author: Russell King Date: Mon Dec 9 11:11:43 2019 +0000 Documentation: update adfs filesystem documentation Add an introduction to adfs to its documentation detailing which formats are supported by the module. Signed-off-by: Russell King Signed-off-by: Al Viro commit 25e5d4df3b46a345dccc0a07f998ce443077b4ff Author: Russell King Date: Mon Dec 9 11:11:38 2019 +0000 fs/adfs: mostly divorse inode number from indirect disc address Avoid using the inode number as the indirect disc address, even though these currently have the same value. Signed-off-by: Russell King Signed-off-by: Al Viro commit 08ead1b8b98d90795bf934d93a718328d11f6ce6 Author: Russell King Date: Mon Dec 9 11:11:33 2019 +0000 fs/adfs: super: add support for E and E+ floppy image formats Add support for ADFS E and E+ floppy image formats, which, unlike their hard disk variants, do not have a filesystem boot block - they have a single map zone, with the map fragment stored at sector 0. Signed-off-by: Russell King Signed-off-by: Al Viro commit e3858e125bd57b827af52dfb38df6c8602559886 Author: Russell King Date: Mon Dec 9 11:11:28 2019 +0000 fs/adfs: super: extract filesystem block probe Separate the filesystem block probing from the superblock filling so we can support other ADFS filesystem formats, such as the single-zone E and E+ floppy image formats which do not have a boot block. Signed-off-by: Russell King Signed-off-by: Al Viro commit ccbc80a89d1399b79e43544cfbe44df964a29810 Author: Russell King Date: Mon Dec 9 11:11:23 2019 +0000 fs/adfs: dir: remove debug in adfs_dir_update() Remove the noisy debug in adfs_dir_update(). Signed-off-by: Russell King Signed-off-by: Al Viro commit f352064275adfeb6f88cb0fb25cc623750adf89f Author: Russell King Date: Mon Dec 9 11:11:18 2019 +0000 fs/adfs: super: fix inode dropping When we have write support enabled, we must not drop inodes before they have been written back, otherwise we lose updates to the filesystem on umount. Keep the inodes around unless we are built in read-only mode, or we are mounted read-only. Signed-off-by: Russell King Signed-off-by: Al Viro commit a464152f2e6dfd6d8be45c5e591cb8be20a97bdb Author: Russell King Date: Mon Dec 9 11:11:13 2019 +0000 fs/adfs: bigdir: implement directory update support Implement big directory entry update support in the same way that we do for new directories. Signed-off-by: Russell King Signed-off-by: Al Viro commit d79288b4f61b40976182786ba2cb05ed5f2b6945 Author: Russell King Date: Mon Dec 9 11:11:08 2019 +0000 fs/adfs: bigdir: calculate and validate directory checkbyte When reading a big directory, calculate the validate the directory checkbyte to ensure that the directory contents are valid. Signed-off-by: Russell King Signed-off-by: Al Viro commit aa3d4e015298fd523617c2bea392d02ea19eaa1a Author: Russell King Date: Mon Dec 9 11:11:02 2019 +0000 fs/adfs: bigdir: directory validation strengthening Strengthen the directory validation by ensuring that the header fields contain sensible values that fit inside the directory, and limit the directory size to 4MB as per RISC OS requirements. Signed-off-by: Russell King Signed-off-by: Al Viro commit 6674ecab9004dcc4d8a65744f581b9ccf1f17504 Author: Russell King Date: Mon Dec 9 11:10:57 2019 +0000 fs/adfs: bigdir: extract directory validation Extract the directory validation from the directory reading function as we will want to re-use this code. Signed-off-by: Russell King Signed-off-by: Al Viro commit 0db35a02a1c3f3abdfac9d56c1cee2fe23b66987 Author: Russell King Date: Mon Dec 9 11:10:52 2019 +0000 fs/adfs: bigdir: factor out directory entry offset calculation Factor out the directory entry byte offset calculation. Signed-off-by: Russell King Signed-off-by: Al Viro commit aacc954c1be8910a994e09a8f8757a2e3e231c37 Author: Russell King Date: Mon Dec 9 11:10:47 2019 +0000 fs/adfs: newdir: split out directory commit from update After changing a directory, we need to update the sequence numbers and calculate the new check byte before the directory is scheduled to be written back to the media. Since this needs to happen for any change to the directory, move this into a separate method. Signed-off-by: Russell King Signed-off-by: Al Viro commit cc625ccd0e6c2804cd0935743e3b51121a712562 Author: Russell King Date: Mon Dec 9 11:10:42 2019 +0000 fs/adfs: newdir: clean up adfs_f_update() __adfs_dir_put() and adfs_dir_find_entry() are only called from adfs_f_update(), so move them into this function, removing some unnecessary entry copying by doing so. Signed-off-by: Russell King Signed-off-by: Al Viro commit 9318731bec8d38bdbe701d395cf103157046831d Author: Russell King Date: Mon Dec 9 11:10:37 2019 +0000 fs/adfs: newdir: merge adfs_dir_read() into adfs_f_read() adfs_dir_read() is only called from adfs_f_read(), so merge it into that function. As new directories are always 2048 bytes in size, (which we rely on elsewhere) we can consolidate some of the code. Signed-off-by: Russell King Signed-off-by: Al Viro commit 7a0e4048bfd16848ac115b17f49a3df7993a2fac Author: Russell King Date: Mon Dec 9 11:10:32 2019 +0000 fs/adfs: newdir: improve directory validation Check that the lastmask and reserved fields are all zero, as per the documentation. Signed-off-by: Russell King Signed-off-by: Al Viro commit ffc8df347e4934c8bad776f7bdacb4842620b0c7 Author: Russell King Date: Mon Dec 9 11:10:27 2019 +0000 fs/adfs: newdir: factor out directory format validation We have two locations where we validate the new directory format, so factor this out to a helper. Signed-off-by: Russell King Signed-off-by: Al Viro commit 016936b32131d0b33328d8c109f83fabb56618a3 Author: Russell King Date: Mon Dec 9 11:10:21 2019 +0000 fs/adfs: dir: use pointers to access directory head/tails Add and use pointers in the adfs_dir structure to access the directory head and tail structures, which will always be contiguous in a buffer. This allows us to avoid memcpy()ing the data in the new directory code, making it slightly more efficient. Signed-off-by: Russell King Signed-off-by: Al Viro commit 4287e4deb1280633ffbda608f946d6d7c2d76d4a Author: Russell King Date: Mon Dec 9 11:10:16 2019 +0000 fs/adfs: dir: add more efficient iterate() per-format method Rather than using setpos + getnext to iterate through the directory entries, pass iterate() down to the dir format code to populate the dirents. Signed-off-by: Russell King Signed-off-by: Al Viro commit cdc46e99e1c9f50802c4f543f10151887e4c4e0e Author: Russell King Date: Mon Dec 9 11:10:11 2019 +0000 fs/adfs: dir: switch to iterate_shared method There is nothing in our readdir (aka iterate) method that relies on the directory inode being exclusively locked, so switch to using the iterate_shared() hook rather than iterate(). Signed-off-by: Russell King Signed-off-by: Al Viro commit 4a0a88b6660b48f773b6e7631e0be57b7f5048ed Author: Russell King Date: Mon Dec 9 11:10:06 2019 +0000 fs/adfs: dir: improve compiler coverage in adfs_dir_update Get rid of the ifdef, using IS_ENABLED() instead to detect whether the code should be callable. This allows the compiler to always parse the following code, reducing the chances of errors being missed. Signed-off-by: Russell King Signed-off-by: Al Viro commit f6075c79074378910e131bbebc9d1dab53fd9986 Author: Russell King Date: Mon Dec 9 11:10:01 2019 +0000 fs/adfs: dir: improve update failure handling When we update a directory, a number of errors may happen. If we failed to find the entry to update, we can just release the directory buffers as normal. However, if we have some other error, we may have partially updated the buffers, resulting in an invalid directory. In this case, we need to discard the buffers to avoid writing the contents back to the media, and later re-read the directory from the media. Signed-off-by: Russell King Signed-off-by: Al Viro commit ae5df41390eb1c40b9a5c220673d8c31a4cb57db Author: Russell King Date: Mon Dec 9 11:09:56 2019 +0000 fs/adfs: dir: modernise on-disk directory structures Use __u8 and pack the structures for on-disk directories. Signed-off-by: Russell King Signed-off-by: Al Viro commit deed1bfd150c7c71bcdc16419c90933096c1c75e Author: Russell King Date: Mon Dec 9 11:09:51 2019 +0000 fs/adfs: dir: update directory locking Update directory locking such that it covers the validation of the directory, which could fail if another thread is concurrently writing to the same directory. Since we may sleep, we need to use a rwsem rather than a rw spinlock. Signed-off-by: Russell King Signed-off-by: Al Viro commit c3c8149b3552b6656ded9ac86d53072f74771ba7 Author: Russell King Date: Mon Dec 9 11:09:45 2019 +0000 fs/adfs: dir: add helper to mark directory buffers dirty Provide a helper for marking directory buffers dirty so they get written back to disk. Signed-off-by: Russell King Signed-off-by: Al Viro commit 90011c7ad999c9565a5c97704cd5bda151ebe447 Author: Russell King Date: Mon Dec 9 11:09:40 2019 +0000 fs/adfs: dir: add helper to read directory using inode Add a helper to read a directory using the inode, which we do in two places. Signed-off-by: Russell King Signed-off-by: Al Viro commit 419a6e5e82ca0bdba0cc3624d969b65ae49d959b Author: Russell King Date: Mon Dec 9 11:09:35 2019 +0000 fs/adfs: dir: add generic directory reading Both directory formats code the mechanics of fetching the directory buffers using their own implementations. Consolidate these into one implementation. Signed-off-by: Russell King Signed-off-by: Al Viro commit a317120bf7f8306b594ee650ee14f08a0e599602 Author: Russell King Date: Mon Dec 9 11:09:30 2019 +0000 fs/adfs: dir: add generic copy functions Directories can span multiple buffers, and we currently open-code memcpy access to these buffers, including dealing with entries that are split across multiple buffers. Such code exists in both directory format implementations. Provide common functions to allow data to be copied from/to the directory buffers as if they were a contiguous set of buffers, and use them when accessing directories. Signed-off-by: Russell King Signed-off-by: Al Viro commit acf5f0be8a520c02bfed74cfc6735bf5fdd4a9e5 Author: Russell King Date: Mon Dec 9 11:09:25 2019 +0000 fs/adfs: dir: add common directory sync method adfs_fplus_sync() can be used for both directory formats since we now have a common way to access the buffer heads, so move it into dir.c and appropriately rename it. Remove the directory-format specific implementations. Signed-off-by: Russell King Signed-off-by: Al Viro commit 1dd9f5babfd95fea5a77b27bab48c04c29db1f5f Author: Russell King Date: Mon Dec 9 11:09:20 2019 +0000 fs/adfs: dir: add common directory buffer release method With the bhs pointer in place, we have no need for separate per-format free() methods, since a generic version will do. Provide a generic implementation, remove the format specific implementations and the method function pointer. Signed-off-by: Russell King Signed-off-by: Al Viro commit 95fbadbb5566e383f0cfe40d895e698ab38bdbc7 Author: Russell King Date: Mon Dec 9 11:09:15 2019 +0000 fs/adfs: dir: add common dir object initialisation Initialise the dir object before we pass it down to the directory format specific read handler. This allows us to get rid of the initialisation inside those handlers. Signed-off-by: Russell King Signed-off-by: Al Viro commit 71b2612776c1b9c34c460f79bcdaef46d0e77ed2 Author: Russell King Date: Mon Dec 9 11:09:10 2019 +0000 fs/adfs: dir: rename bh_fplus to bhs Rename bh_fplus to bhs in preparation to make some of the directory handling code sharable between implementations. Signed-off-by: Russell King Signed-off-by: Al Viro commit f93793fd73a629f4c86b0d91fd84fe175705aff9 Author: Russell King Date: Mon Dec 9 11:09:04 2019 +0000 fs/adfs: map: fix map scanning When scanning the map for a fragment id, we need to keep track of the free space links, so we don't inadvertently believe that the freespace link is a valid fragment id. Signed-off-by: Russell King Signed-off-by: Al Viro commit f6f14a0d71b0773a1d4147d1a3c33d537cd213ab Author: Russell King Date: Mon Dec 9 11:08:59 2019 +0000 fs/adfs: map: move map-specific sb initialisation to map.c Move map specific superblock initialisation to map.c, rather than having it spread into super.c. Signed-off-by: Russell King Signed-off-by: Al Viro commit 792314f8b223f77037b85e6242c67df15623cf75 Author: Russell King Date: Mon Dec 9 11:08:54 2019 +0000 fs/adfs: map: use find_next_bit_le() rather than open coding it Use find_next_bit_le() to find the end of a fragment in the map rather than open-coding this functionality. Signed-off-by: Russell King Signed-off-by: Al Viro commit 197ba3c519312a0bed91aeaf34095b2c09c6431a Author: Russell King Date: Mon Dec 9 11:08:49 2019 +0000 fs/adfs: map: incorporate map offsets into layout lookup_zone() and scan_free_map() cope in different ways with the location of the map data within a zone: 1. lookup_zone() adds a four byte offset to the map data pointer to skip over the check and free link bytes. 2. scan_free_map() needs to use the free link pointer, which is an offset from itself, so we end up adding a 32-bit offset to the end pointer (aka mapsize) which is really confusing. Rename mapsize to endbit as this is really what it is, and incorporate the 32-bit offset into the map layout. This means that both dm_startbit and dm_endbit are now bit offsets from the start of the buffer, rather than four bytes in to the buffer. Signed-off-by: Russell King Signed-off-by: Al Viro commit 7b1952676256d2cdc03d0415a4c0e6bfb64e00ff Author: Russell King Date: Mon Dec 9 11:08:44 2019 +0000 fs/adfs: map: factor out map cleanup We have several places which deal with releasing the map buffers and freeing the map array. Provide a helper for this. Signed-off-by: Russell King Signed-off-by: Al Viro commit 6092b6be304494e311b65935f5e09b510cbd57cc Author: Russell King Date: Mon Dec 9 11:08:39 2019 +0000 fs/adfs: map: break up adfs_read_map() Split up adfs_read_map() into separate helpers to layout the map, read the map, and release the map buffers. Signed-off-by: Russell King Signed-off-by: Al Viro commit e6160e469f56a23cb69e1dc37aa0d895bf29ac24 Author: Russell King Date: Mon Dec 9 11:08:34 2019 +0000 fs/adfs: map: rename adfs_map_free() to adfs_map_statfs() adfs_map_free() is not obvious whether it is freeing the map or returning the number of free blocks on the filesystem. Rename it to the more generic statfs() to make it clear that it's a statistic function. Signed-off-by: Russell King Signed-off-by: Al Viro commit f75d398d6ee61b04c16124e3eddd786526bc7d40 Author: Russell King Date: Mon Dec 9 11:08:28 2019 +0000 fs/adfs: map: move map reading and validation to map.c Keep all the map code together in map.c, rather than having some in super.c Signed-off-by: Russell King Signed-off-by: Al Viro commit 81916245ce231f7405ce444161d09b8a899a38af Author: Russell King Date: Mon Dec 9 11:08:23 2019 +0000 fs/adfs: inode: fix adfs_mode2atts() Fix adfs_mode2atts() to actually update the file permissions on the media rather than using the current inode mode. Note also that directories do not have read/write permissions stored on the media. Signed-off-by: Russell King Signed-off-by: Al Viro commit eeeb9dd98ec353a19988b010223f29a8783127fa Author: Russell King Date: Mon Dec 9 11:08:18 2019 +0000 fs/adfs: inode: update timestamps to centisecond precision Despite ADFS timestamps having centi-second granularity, and Linux gaining fine-grained timestamp support in v2.5.48, fs/adfs was never updated. Update fs/adfs to centi-second support, and ensure that the inode ctime always reflects what is written in underlying media. Signed-off-by: Russell King Signed-off-by: Al Viro commit d49d0661b92478ec9362e379e7ba82450ec88048 Merge: f1c3656c6d9c a2c9652f751e Author: Alexei Starovoitov Date: Mon Jan 20 16:37:46 2020 -0800 Merge branch 'libbpf-include-path' Toke Høiland-Jørgensen says: ==================== We are currently being somewhat inconsistent with the libbpf include paths, which makes it difficult to move files from the kernel into an external libbpf-using project without adjusting include paths. Having the bpf/ subdir of $INCLUDEDIR in the include path has never been a requirement for building against libbpf before, and indeed the libbpf pkg-config file doesn't include it. So let's make all libbpf includes across the kernel tree use the bpf/ prefix in their includes. Since bpftool skeleton generation emits code with a libbpf include, this also ensures that those can be used in existing external projects using the regular pkg-config include path. This turns out to be a somewhat invasive change in the number of files touched; however, the actual changes to files are fairly trivial (most of them are simply made with 'sed'). The series is split to make the change for one tool subdir at a time, while trying not to break the build along the way. It is structured like this: - Patch 1-3: Trivial fixes to Makefiles for issues I discovered while changing the include paths. - Patch 4-8: Change the include directives to use the bpf/ prefix, and updates Makefiles to make sure tools/lib/ is part of the include path, but without removing tools/lib/bpf - Patch 9-11: Remove tools/lib/bpf from include paths to make sure we don't inadvertently re-introduce includes without the bpf/ prefix. Changelog: v5: - Combine the libbpf build rules in selftests Makefile (using Andrii's suggestion for a make rule). - Re-use self-tests libbpf build for runqslower (new patch 10) - Formatting fixes v4: - Move runqslower error on missing BTF into make rule - Make sure we don't always force a rebuild selftests - Rebase on latest bpf-next (dropping patch 11) v3: - Don't add the kernel build dir to the runqslower Makefile, pass it in from selftests instead. - Use libbpf's 'make install_headers' in selftests instead of trying to generate bpf_helper_defs.h in-place (to also work on read-only filesystems). - Use a scratch builddir for both libbpf and bpftool when building in selftests. - Revert bpf_helpers.h to quoted include instead of angled include with a bpf/ prefix. - Fix a few style nits from Andrii v2: - Do a full cleanup of libbpf includes instead of just changing the bpf_helper_defs.h include. ==================== Acked-by: Andrii Nakryiko Tested-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit a2c9652f751e3ab39738e2b30bc45293d53604fd Author: Toke Høiland-Jørgensen Date: Mon Jan 20 14:06:52 2020 +0100 selftests: Refactor build to remove tools/lib/bpf from include path To make sure no new files are introduced that doesn't include the bpf/ prefix in its #include, remove tools/lib/bpf from the include path entirely. Instead, we introduce a new header files directory under the scratch tools/ dir, and add a rule to run the 'install_headers' rule from libbpf to have a full set of consistent libbpf headers in $(OUTPUT)/tools/include/bpf, and then use $(OUTPUT)/tools/include as the include path for selftests. For consistency we also make sure we put all the scratch build files from other bpftool and libbpf into tools/build/, so everything stays within selftests/. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/157952561246.1683545.2762245552022369203.stgit@toke.dk commit b6580cd8999d4f6846db9f6daa0b759c75aff33e Author: Toke Høiland-Jørgensen Date: Mon Jan 20 14:06:51 2020 +0100 runsqslower: Support user-specified libbpf include and object paths This adds support for specifying the libbpf include and object paths as arguments to the runqslower Makefile, to support reusing the libbpf version built as part of the selftests. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/157952561135.1683545.5660339645093141381.stgit@toke.dk commit a9ed34c0b7a537e38564d92eb4ff9eee91c84544 Author: Toke Høiland-Jørgensen Date: Mon Jan 20 14:06:50 2020 +0100 tools/runqslower: Remove tools/lib/bpf from include path Since we are now consistently using the bpf/ prefix on #include directives, we don't need to include tools/lib/bpf in the include path. Remove it to make sure we don't inadvertently introduce new includes without the prefix. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157952561027.1683545.1976265477926794138.stgit@toke.dk commit 7cf245a37ef013b2c1c5ca7ae25061de2ba7ad01 Author: Toke Høiland-Jørgensen Date: Mon Jan 20 14:06:49 2020 +0100 samples/bpf: Use consistent include paths for libbpf Fix all files in samples/bpf to include libbpf header files with the bpf/ prefix, to be consistent with external users of the library. Also ensure that all includes of exported libbpf header files (those that are exported on 'make install' of the library) use bracketed includes instead of quoted. To make sure no new files are introduced that doesn't include the bpf/ prefix in its include, remove tools/lib/bpf from the include path entirely, and use tools/lib instead. Fixes: 6910d7d3867a ("selftests/bpf: Ensure bpf_helper_defs.h are taken from selftests dir") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Jesper Dangaard Brouer Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157952560911.1683545.8795966751309534150.stgit@toke.dk commit 521fe8bb5874963d5f6fd58d5c5ad80fbc9c6b1c Author: Toke Høiland-Jørgensen Date: Mon Jan 20 14:06:48 2020 +0100 perf: Use consistent include paths for libbpf Fix perf to include libbpf header files with the bpf/ prefix, to be consistent with external users of the library. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157952560797.1683545.7685921032671386301.stgit@toke.dk commit 229c3b47b794e7257744224b21a95d3d9938d00a Author: Toke Høiland-Jørgensen Date: Mon Jan 20 14:06:46 2020 +0100 bpftool: Use consistent include paths for libbpf Fix bpftool to include libbpf header files with the bpf/ prefix, to be consistent with external users of the library. Also ensure that all includes of exported libbpf header files (those that are exported on 'make install' of the library) use bracketed includes instead of quoted. To make sure no new files are introduced that doesn't include the bpf/ prefix in its include, remove tools/lib/bpf from the include path entirely, and use tools/lib instead. Fixes: 6910d7d3867a ("selftests/bpf: Ensure bpf_helper_defs.h are taken from selftests dir") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157952560684.1683545.4765181397974997027.stgit@toke.dk commit 3e689141e64df91b009a289c0559adedfe62f511 Author: Toke Høiland-Jørgensen Date: Mon Jan 20 14:06:45 2020 +0100 selftests: Use consistent include paths for libbpf Fix all selftests to include libbpf header files with the bpf/ prefix, to be consistent with external users of the library. Also ensure that all includes of exported libbpf header files (those that are exported on 'make install' of the library) use bracketed includes instead of quoted. To not break the build, keep the old include path until everything has been changed to the new one; a subsequent patch will remove that. Fixes: 6910d7d3867a ("selftests/bpf: Ensure bpf_helper_defs.h are taken from selftests dir") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157952560568.1683545.9649335788846513446.stgit@toke.dk commit 5b554ce518afee47d4ba4330ad8fbfd6e29e1c13 Author: Toke Høiland-Jørgensen Date: Mon Jan 20 14:06:44 2020 +0100 tools/runqslower: Use consistent include paths for libbpf Fix the runqslower tool to include libbpf header files with the bpf/ prefix, to be consistent with external users of the library. Also ensure that all includes of exported libbpf header files (those that are exported on 'make install' of the library) use bracketed includes instead of quoted. To not break the build, keep the old include path until everything has been changed to the new one; a subsequent patch will remove that. Fixes: 6910d7d3867a ("selftests/bpf: Ensure bpf_helper_defs.h are taken from selftests dir") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157952560457.1683545.9913736511685743625.stgit@toke.dk commit bfe42797bc7e962f01028436e106769ca9338b65 Author: Toke Høiland-Jørgensen Date: Mon Jan 20 14:06:43 2020 +0100 selftests: Pass VMLINUX_BTF to runqslower Makefile Add a VMLINUX_BTF variable with the locally-built path when calling the runqslower Makefile from selftests. This makes sure a simple 'make' invocation in the selftests dir works even when there is no BTF information for the running kernel. Do a wildcard expansion and include the same paths for BTF for the running kernel as in the runqslower Makefile, to make it possible to build selftests without having a vmlinux in the local tree. Also fix the make invocation to use $(OUTPUT)/tools as the destination directory instead of $(CURDIR)/tools. Fixes: 3a0d3092a4ed ("selftests/bpf: Build runqslower from selftests") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157952560344.1683545.2723631988771664417.stgit@toke.dk commit a835d38d41ca4f8eab5f97512446212f42f094a1 Author: Toke Høiland-Jørgensen Date: Mon Jan 20 14:06:42 2020 +0100 tools/bpf/runqslower: Fix override option for VMLINUX_BTF The runqslower tool refuses to build without a file to read vmlinux BTF from. The build fails with an error message to override the location by setting the VMLINUX_BTF variable if autodetection fails. However, the Makefile doesn't actually work with that override - the error message is still emitted. Fix this by including the value of VMLINUX_BTF in the expansion, and only emitting the error message if the *result* is empty. Also permit running 'make clean' even though no VMLINUX_BTF is set. Fixes: 9c01546d26d2 ("tools/bpf: Add runqslower tool to tools/bpf") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157952560237.1683545.17771785178857224877.stgit@toke.dk commit b2e5e93ae8af6a34bca536cdc4b453ab1e707b8b Author: Toke Høiland-Jørgensen Date: Mon Jan 20 14:06:41 2020 +0100 samples/bpf: Don't try to remove user's homedir on clean The 'clean' rule in the samples/bpf Makefile tries to remove backup files (ending in ~). However, if no such files exist, it will instead try to remove the user's home directory. While the attempt is mostly harmless, it does lead to a somewhat scary warning like this: rm: cannot remove '~': Is a directory Fix this by using find instead of shell expansion to locate any actual backup files that need to be removed. Fixes: b62a796c109c ("samples/bpf: allow make to be run from samples/bpf/ directory") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/157952560126.1683545.7273054725976032511.stgit@toke.dk commit 11e673206f217ce6604b7b0269e3cfc65171c380 Author: John Garry Date: Mon Jan 20 20:22:36 2020 +0800 scsi: hisi_sas: Rename hisi_sas_cq.pci_irq_mask In future we will want to use hisi_sas_cq.pci_irq_mask for non-pci interrupt masks, so rename to be more general. Link: https://lore.kernel.org/r/1579522957-4393-7-git-send-email-john.garry@huawei.com Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 33c77c31b752c561dd4b3c25661f949014c31370 Author: Luo Jiaxing Date: Mon Jan 20 20:22:35 2020 +0800 scsi: hisi_sas: Add prints for v3 hw interrupt converge and automatic affinity Add prints to inform the user of enabled features. Link: https://lore.kernel.org/r/1579522957-4393-6-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 3cd2f3c35d29a50947a975feffdcbe2d6a2418c0 Author: Luo Jiaxing Date: Mon Jan 20 20:22:34 2020 +0800 scsi: hisi_sas: Modify the file permissions of trigger_dump to write only The trigger_dump file is only used to manually trigger the dump, and did not provide a read callback function for it, so its file permission setting to 600 is wrong,and should be changed to 200. Link: https://lore.kernel.org/r/1579522957-4393-5-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit d2815fdf9a0e6c629d062f9a7e24cb7cdbef3dee Author: Luo Jiaxing Date: Mon Jan 20 20:22:33 2020 +0800 scsi: hisi_sas: Replace magic number when handle channel interrupt We use magic number as offset and mask when handle channel interrupt, so use macro to replace it. Link: https://lore.kernel.org/r/1579522957-4393-4-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit e9dc5e11c97ee981dac9ac5cd6f8f1c2384135ca Author: Xiang Chen Date: Mon Jan 20 20:22:32 2020 +0800 scsi: hisi_sas: replace spin_lock_irqsave/spin_unlock_restore with spin_lock/spin_unlock After changing tasklet to workqueue or threaded irq, some critical resources are only used on threads (not in interrupt or bottom half of interrupt), so replace spin_lock_irqsave/spin_unlock_restore with spin_lock/spin_unlock to protect those critical resources. Link: https://lore.kernel.org/r/1579522957-4393-3-git-send-email-john.garry@huawei.com Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 81f338e9709db0b67d05bab02809d6a4e6694884 Author: Xiang Chen Date: Mon Jan 20 20:22:31 2020 +0800 scsi: hisi_sas: use threaded irq to process CQ interrupts Currently IRQ_EFFECTIVE_AFF_MASK is enabled for ARM_GIC and ARM_GIC3, so it only allows a single target CPU in the affinity mask to process interrupts and also interrupt thread, and the performance of using threaded irq is almost the same as tasklet. But if the config is not enabled, the interrupt thread will be allowed all the CPUs in the affinity mask. At that situation it improves the performance (about 20%). Note: IRQ_EFFECTIVE_AFF_MASK is configured differently for different architecture chip, and it seems to be better to make it be configured easily. Link: https://lore.kernel.org/r/1579522957-4393-2-git-send-email-john.garry@huawei.com Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 1baa80118e0324bf5063c2576b531a14cb57f874 Author: Bean Huo Date: Mon Jan 20 14:08:20 2020 +0100 scsi: ufs: Use UFS device indicated maximum LU number According to Jedec standard UFS 3.0 and UFS 2.1 Spec, Maximum number of logical units supported by the UFS device is indicated by parameter bMaxNumberLU in Geometry Descriptor. This patch is to delete current hard code macro definition of UFS_UPIU_MAX_GENERAL_LUN, and switch to use device indicated number instead. Link: https://lore.kernel.org/r/20200120130820.1737-9-huobean@gmail.com Reviewed-by: Asutosh Das Reviewed-by: Alim Akhtar Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 731f06216df3d605c466571a1c89222b4cca2fbc Author: Bean Huo Date: Mon Jan 20 14:08:19 2020 +0100 scsi: ufs: Add max_lu_supported in struct ufs_dev_info Add one new parameter max_lu_supported in struct ufs_dev_info, which will be used to express exactly how many general LUs being supported by UFS device, and initialize it during booting stage. This patch also adds a new function ufshcd_device_geo_params_init() for initialization of UFS device geometry descriptor related parameters. Link: https://lore.kernel.org/r/20200120130820.1737-8-huobean@gmail.com Reviewed-by: Asutosh Das Reviewed-by: Alim Akhtar Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 046c1e6f2707890a2e64f3f15388ca389aaebcbf Author: Bean Huo Date: Mon Jan 20 14:08:18 2020 +0100 scsi: ufs: Delete is_init_prefetch from struct ufs_hba Without variable is_init_prefetch, the current logic can guarantee ufshcd_init_icc_levels() will execute only once, delete it now. Link: https://lore.kernel.org/r/20200120130820.1737-7-huobean@gmail.com Reviewed-by: Asutosh Das Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 8c9a51b00743163862325dfc15ece4642821919a Author: Bean Huo Date: Mon Jan 20 14:08:17 2020 +0100 scsi: ufs: Inline two functions into their callers Delete ufshcd_read_power_desc() and ufshcd_read_device_desc(), directly inline ufshcd_read_desc() into its callers. Link: https://lore.kernel.org/r/20200120130820.1737-6-huobean@gmail.com Reviewed-by: Alim Akhtar Reviewed-by: Asutosh Das Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 2b35b2adfecd456c98b9828e03900e7be9f1b33d Author: Bean Huo Date: Mon Jan 20 14:08:16 2020 +0100 scsi: ufs: Move ufshcd_get_max_pwr_mode() to ufshcd_device_params_init() ufshcd_get_max_pwr_mode() only need to be called once while booting, take it out from ufshcd_probe_hba() and inline into ufshcd_device_params_init(). Link: https://lore.kernel.org/r/20200120130820.1737-5-huobean@gmail.com Reviewed-by: Stanley Chu Reviewed-by: Asutosh Das Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 1b9e21412f72d6f89e2bcc5f24b5e9a010c8a74f Author: Bean Huo Date: Mon Jan 20 14:08:15 2020 +0100 scsi: ufs: Split ufshcd_probe_hba() based on its called flow This patch has two major non-functionality changes: 1. Take scanning host if-statement out from ufshcd_probe_hba(), and move into a new added function ufshcd_add_lus(). In this new function ufshcd_add_lus(), the main functionalitis include: ICC initialization, add well-known LUs, devfreq initialization, UFS bsg probe and scsi host scan. The reason for this change is that these functionalities only being called during booting stage flow ufshcd_init()->ufshcd_async_scan(). In the processes of error handling and power management ufshcd_suspend(), ufshcd_resume(), ufshcd_probe_hba() being called, but these functionalitis above metioned are not hit. 2. Move context of initialization of parameters associated with the UFS device to a new added function ufshcd_device_params_init(). The reason of this change is that all of these parameters are used by driver, but only need to be initialized once when booting. Combine them into an integral function, make them easier maintain. Link: https://lore.kernel.org/r/20200120130820.1737-4-huobean@gmail.com Reviewed-by: Asutosh Das Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 097500666ec9912a9245160e0e53c1e3944d80d9 Author: Bean Huo Date: Mon Jan 20 14:08:14 2020 +0100 scsi: ufs: Delete struct ufs_dev_desc In consideration of UFS host driver uses parameters of struct ufs_dev_desc, move its parameters to struct ufs_dev_info, delete struct ufs_dev_desc. Link: https://lore.kernel.org/r/20200120130820.1737-3-huobean@gmail.com Reviewed-by: Bart Van Assche Reviewed-by: Asutosh Das Reviewed-by: Alim Akhtar Reviewed-by: Stanley Chu Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit b9fc5320212efdfb4e08b825aaa007815fd11d16 Author: Bean Huo Date: Mon Jan 20 14:08:13 2020 +0100 scsi: ufs: Fix ufshcd_probe_hba() reture value in case ufshcd_scsi_add_wlus() fails A non-zero error value likely being returned by ufshcd_scsi_add_wlus() in case of failure of adding the WLs, but ufshcd_probe_hba() doesn't use this value, and doesn't report this failure to upper caller. This patch is to fix this issue. Fixes: 2a8fa600445c ("ufs: manually add well known logical units") Link: https://lore.kernel.org/r/20200120130820.1737-2-huobean@gmail.com Reviewed-by: Asutosh Das Reviewed-by: Alim Akhtar Reviewed-by: Stanley Chu Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit fdb2c232497296025c27e47d379fe55ba46ff9e6 Author: Stanley Chu Date: Fri Jan 17 11:51:08 2020 +0800 scsi: ufs-mediatek: enable low-power mode for hibern8 state In MediaTek Chipsets, UniPro link and ufshci can enter proprietary low-power mode while link is in hibern8 state. Link: https://lore.kernel.org/r/20200117035108.19699-4-stanley.chu@mediatek.com Reviewed-by: Alim Akhtar Reviewed-by: Asutosh Das Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 9d19bf7ad168a8ef5fe0e1cdd64313d76207934a Author: Stanley Chu Date: Fri Jan 17 11:51:07 2020 +0800 scsi: ufs: export some functions for vendor usage Export below functions for vendor usage: int ufshcd_hba_enable(struct ufs_hba *hba); int ufshcd_make_hba_operational(struct ufs_hba *hba); int ufshcd_uic_hibern8_exit(struct ufs_hba *hba); Link: https://lore.kernel.org/r/20200117035108.19699-3-stanley.chu@mediatek.com Reviewed-by: Alim Akhtar Reviewed-by: Asutosh Das Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit b406a1978376b40f6737d5cc37bbb836b4428963 Author: Stanley Chu Date: Fri Jan 17 11:51:06 2020 +0800 scsi: ufs-mediatek: add dbg_register_dump implementation Add dbg_register_dump variant vendor implementation in MediaTek UFS driver. Link: https://lore.kernel.org/r/20200117035108.19699-2-stanley.chu@mediatek.com Reviewed-by: Alim Akhtar Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit c0bf499f6f84634c14cdec0afd1f17ff4121afa2 Author: Krzysztof Kozlowski Date: Sat Jan 4 16:21:01 2020 +0100 drm/exynos: Rename Exynos to lowercase Fix up inconsistent usage of upper and lowercase letters in "Exynos" name. "EXYNOS" is not an abbreviation but a regular trademarked name. Therefore it should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Inki Dae commit 11f954899d55c622afbbf23925ce1faf5d647c81 Author: Inki Dae Date: Thu Dec 19 11:07:53 2019 +0900 drm/exynos: change callback names This patch changes Exynos specific 'disable' and 'enable' callback names to 'atomic_disable/enable' for the consistency. Signed-off-by: Inki Dae commit 0463b6c58e557118d602b2f225fa3bbe9b6f3560 Author: Pavel Begunkov Date: Sat Jan 18 21:35:38 2020 +0300 io_uring: use labeled array init in io_op_defs Don't rely on implicit ordering of IORING_OP_ and explicitly place them at a right place in io_op_defs. Now former comments are now a part of the code and won't ever outdate. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 6b47ee6ecab142f938a40bf3b297abac74218ee2 Author: Pavel Begunkov Date: Sat Jan 18 20:22:41 2020 +0300 io_uring: optimise sqe-to-req flags translation For each IOSQE_* flag there is a corresponding REQ_F_* flag. And there is a repetitive pattern of their translation: e.g. if (sqe->flags & SQE_FLAG*) req->flags |= REQ_F_FLAG* Use same numeric values/bits for them and copy instead of manual handling. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 87987898a1dbc69b1138f7c10eb9abd655c03396 Author: Pavel Begunkov Date: Sat Jan 18 01:22:30 2020 +0300 io_uring: remove REQ_F_IO_DRAINED A request can get into the defer list only once, there is no need for marking it as drained, so remove it. This probably was left after extracting __need_defer() for use in timeouts. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e46a7950d362231a4d0b078af5f4c109b8e5ac9e Author: Jens Axboe Date: Fri Jan 17 11:15:34 2020 -0700 io_uring: file switch work needs to get flushed on exit We currently flush early, but if we have something in progress and a new switch is scheduled, we need to ensure to flush after our teardown as well. Signed-off-by: Jens Axboe commit b14cca0c84c760fbd39ad6bb7e1181e2df103d25 Author: Pavel Begunkov Date: Fri Jan 17 04:45:59 2020 +0300 io_uring: hide uring_fd in ctx req->ring_fd and req->ring_file are used only during the prep stage during submission, which is is protected by mutex. There is no need to store them per-request, place them in ctx. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 0791015837f1520dd72918355dcb1f1e79175255 Author: Pavel Begunkov Date: Fri Jan 17 03:52:46 2020 +0300 io_uring: remove extra check in __io_commit_cqring __io_commit_cqring() is almost always called when there is a change in the rings, so the check is rather pessimising. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 711be0312df4d350fb5bf1671c132cccae5aaf9a Author: Pavel Begunkov Date: Fri Jan 17 03:57:59 2020 +0300 io_uring: optimise use of ctx->drain_next Move setting ctx->drain_next to the only place it could be set, when it got linked non-head requests. The same for checking it, it's interesting only for a head of a link or a non-linked request. No functional changes here. This removes some code from the common path and also removes REQ_F_DRAIN_LINK flag, as it doesn't need it anymore. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 66f4af93da5761d2fa05c0dc673a47003cdb9cfe Author: Jens Axboe Date: Thu Jan 16 15:36:52 2020 -0700 io_uring: add support for probing opcodes The application currently has no way of knowing if a given opcode is supported or not without having to try and issue one and see if we get -EINVAL or not. And even this approach is fraught with peril, as maybe we're getting -EINVAL due to some fields being missing, or maybe it's just not that easy to issue that particular command without doing some other leg work in terms of setup first. This adds IORING_REGISTER_PROBE, which fills in a structure with info on what it supported or not. This will work even with sparse opcode fields, which may happen in the future or even today if someone backports specific features to older kernels. Signed-off-by: Jens Axboe commit 10fef4bebf979bb705feed087611293d5864adfe Author: Jens Axboe Date: Thu Jan 9 07:52:28 2020 -0700 io_uring: account fixed file references correctly in batch We can't assume that the whole batch has fixed files in it. If it's a mix, or none at all, then we can end up doing a ref put that either messes up accounting, or causes an oops if we have no fixed files at all. Also ensure we free requests properly between inflight accounted and normal requests. Fixes: 82c721577011 ("io_uring: extend batch freeing to cover more cases") Reported-by: Dmitrii Dolgov <9erthalion6@gmail.com> Reported-by: Pavel Begunkov Tested-by: Dmitrii Dolgov <9erthalion6@gmail.com> Signed-off-by: Jens Axboe commit 354420f705ccd0aa2d41249f3bb55b4afbed1873 Author: Jens Axboe Date: Wed Jan 8 18:55:15 2020 -0700 io_uring: add opcode to issue trace event For some test apps at least, user_data is just zeroes. So it's not a good way to tell what the command actually is. Add the opcode to the issue trace point. Signed-off-by: Jens Axboe commit cebdb98617ae3e842c81c73758a185248b37cfd6 Author: Jens Axboe Date: Wed Jan 8 17:59:24 2020 -0700 io_uring: add support for IORING_OP_OPENAT2 Add support for the new openat2(2) system call. It's trivial to do, as we can have openat(2) just be wrapped around it. Suggested-by: Stefan Metzmacher Signed-off-by: Jens Axboe commit f8748881b17dc56b3faa1d30c823f071c56593e5 Author: Jens Axboe Date: Wed Jan 8 17:47:02 2020 -0700 io_uring: remove 'fname' from io_open structure We only use it internally in the prep functions for both statx and openat, so we don't need it to be persistent across the request. Signed-off-by: Jens Axboe commit c12cedf24e786509de031a832e6b0e5f8b3ca37b Author: Jens Axboe Date: Wed Jan 8 17:41:21 2020 -0700 io_uring: add 'struct open_how' to the openat request context We'll need this for openat2(2) support, remove flags and mode from the existing io_open struct. Signed-off-by: Jens Axboe commit f2842ab5b72d7ee5f7f8385c2d4f32c133f5837b Author: Jens Axboe Date: Wed Jan 8 11:04:00 2020 -0700 io_uring: enable option to only trigger eventfd for async completions If an application is using eventfd notifications with poll to know when new SQEs can be issued, it's expecting the following read/writes to complete inline. And with that, it knows that there are events available, and don't want spurious wakeups on the eventfd for those requests. This adds IORING_REGISTER_EVENTFD_ASYNC, which works just like IORING_REGISTER_EVENTFD, except it only triggers notifications for events that happen from async completions (IRQ, or io-wq worker completions). Any completions inline from the submission itself will not trigger notifications. Suggested-by: Mark Papadakis Signed-off-by: Jens Axboe commit 69b3e546139a21b3046b6bf0cb79d5e8c9a3fa75 Author: Jens Axboe Date: Wed Jan 8 11:01:46 2020 -0700 io_uring: change io_ring_ctx bool fields into bit fields In preparation for adding another one, which would make us spill into another long (and hence bump the size of the ctx), change them to bit fields. Signed-off-by: Jens Axboe commit c150368b496837cb207712e78f903ccfd7633b93 Author: Jens Axboe Date: Wed Jan 8 08:26:07 2020 -0700 io_uring: file set registration should use interruptible waits If an application attempts to register a set with unbounded requests pending, we can be stuck here forever if they don't complete. We can make this wait interruptible, and just abort if we get signaled. Signed-off-by: Jens Axboe commit 96fd84d83a778450ffae737d9efa546ac3983b1f Author: YueHaibing Date: Tue Jan 7 22:22:44 2020 +0800 io_uring: Remove unnecessary null check Null check kfree is redundant, so remove it. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Jens Axboe commit fddafacee287b3140212c92464077e971401f860 Author: Jens Axboe Date: Sat Jan 4 20:19:44 2020 -0700 io_uring: add support for send(2) and recv(2) This adds IORING_OP_SEND for send(2) support, and IORING_OP_RECV for recv(2) support. Signed-off-by: Jens Axboe commit 2550878f8421f7912fdd56b38c630b797f95c749 Author: Pavel Begunkov Date: Mon Dec 30 21:24:47 2019 +0300 io_uring: remove extra io_wq_current_is_worker() io_wq workers use io_issue_sqe() to forward sqes and never io_queue_sqe(). Remove extra check for io_wq_current_is_worker() Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit caf582c652feccd42c50923f0467c4f2dcef279e Author: Pavel Begunkov Date: Mon Dec 30 21:24:46 2019 +0300 io_uring: optimise commit_sqring() for common case It should be pretty rare to not submitting anything when there is something in the ring. No need to keep heuristics for this case. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ee7d46d9db19ded7b7222af95add63606318a480 Author: Pavel Begunkov Date: Mon Dec 30 21:24:45 2019 +0300 io_uring: optimise head checks in io_get_sqring() A user may ask to submit more than there is in the ring, and then io_uring will submit as much as it can. However, in the last iteration it will allocate an io_kiocb and immediately free it. It could do better and adjust @to_submit to what is in the ring. And since the ring's head is already checked here, there is no need to do it in the loop, spamming with smp_load_acquire()'s barriers Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9ef4f124894b7b9241a3cf5f9b40db0812783d66 Author: Pavel Begunkov Date: Mon Dec 30 21:24:44 2019 +0300 io_uring: clamp to_submit in io_submit_sqes() Make io_submit_sqes() to clamp @to_submit itself. It removes duplicated code and prepares for following changes. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 8110c1a6212e430a84edd2b83fe9043def8b743e Author: Jens Axboe Date: Sat Dec 28 15:39:54 2019 -0700 io_uring: add support for IORING_SETUP_CLAMP Some applications like to start small in terms of ring size, and then ramp up as needed. This is a bit tricky to do currently, since we don't advertise the max ring size. This adds IORING_SETUP_CLAMP. If set, and the values for SQ or CQ ring size exceed what we support, then clamp them at the max values instead of returning -EINVAL. Since we return the chosen ring sizes after setup, no further changes are needed on the application side. io_uring already changes the ring sizes if the application doesn't ask for power-of-two sizes, for example. Signed-off-by: Jens Axboe commit c6ca97b30c47c7ad36107d3764bb4dc37026d171 Author: Jens Axboe Date: Sat Dec 28 12:11:08 2019 -0700 io_uring: extend batch freeing to cover more cases Currently we only batch free if fixed files are used, no links, no aux data, etc. This extends the batch freeing to only exclude the linked case and fallback case, and make io_free_req_many() handle the other cases just fine. Signed-off-by: Jens Axboe commit 8237e045983d82ba78eaab5f60b9300927fc6796 Author: Jens Axboe Date: Sat Dec 28 10:48:22 2019 -0700 io_uring: wrap multi-req freeing in struct req_batch This cleans up the code a bit, and it allows us to build on top of the multi-req freeing. Signed-off-by: Jens Axboe commit 2b85edfc0c90efc68dea3d665bb4111bf0694e05 Author: Pavel Begunkov Date: Sat Dec 28 14:13:03 2019 +0300 io_uring: batch getting pcpu references percpu_ref_tryget() has its own overhead. Instead getting a reference for each request, grab a bunch once per io_submit_sqes(). ~5% throughput boost for a "submit and wait 128 nops" benchmark. Signed-off-by: Pavel Begunkov __io_req_free_empty() -> __io_req_do_free() Signed-off-by: Jens Axboe commit 4e5ef02317b12e2ed3d604281ffb6b75261f7612 Author: Pavel Begunkov Date: Sat Dec 28 14:13:02 2019 +0300 pcpu_ref: add percpu_ref_tryget_many() Add percpu_ref_tryget_many(), which works the same way as percpu_ref_tryget(), but grabs specified number of refs. Signed-off-by: Pavel Begunkov Acked-by: Tejun Heo Acked-by: Dennis Zhou Cc: Christoph Lameter Signed-off-by: Jens Axboe commit c1ca757bd6f4632c510714631ddcc2d13030fe1e Author: Jens Axboe Date: Wed Dec 25 22:18:28 2019 -0700 io_uring: add IORING_OP_MADVISE This adds support for doing madvise(2) through io_uring. We assume that any operation can block, and hence punt everything async. This could be improved, but hard to make bullet proof. The async punt ensures it's safe. Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit db08ca25253d56f1f76eb4b3fe32a7ac1fbab741 Author: Jens Axboe Date: Wed Dec 25 22:14:54 2019 -0700 mm: make do_madvise() available internally This is in preparation for enabling this functionality through io_uring. Add a helper that is just exporting what sys_madvise() does, and have the system call use it. No functional changes in this patch. Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 4840e418c2fc533d55ff6caa5b9313eed1d26cfd Author: Jens Axboe Date: Wed Dec 25 22:03:45 2019 -0700 io_uring: add IORING_OP_FADVISE This adds support for doing fadvise through io_uring. We assume that WILLNEED doesn't block, but that DONTNEED may block. Reviewed-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ba04291eb66ed895f194ae5abd3748d72bf8aaea Author: Jens Axboe Date: Wed Dec 25 16:33:42 2019 -0700 io_uring: allow use of offset == -1 to mean file position This behaves like preadv2/pwritev2 with offset == -1, it'll use (and update) the current file position. This obviously comes with the caveat that if the application has multiple read/writes in flight, then the end result will not be as expected. This is similar to threads sharing a file descriptor and doing IO using the current file position. Since this feature isn't easily detectable by doing a read or write, add a feature flags, IORING_FEAT_RW_CUR_POS, to allow applications to detect presence of this feature. Reported-by: 李通洲 Signed-off-by: Jens Axboe commit 3a6820f2bb8a079975109c25a5d1f29f46bce5d2 Author: Jens Axboe Date: Sun Dec 22 15:19:35 2019 -0700 io_uring: add non-vectored read/write commands For uses cases that don't already naturally have an iovec, it's easier (or more convenient) to just use a buffer address + length. This is particular true if the use case is from languages that want to create a memory safe abstraction on top of io_uring, and where introducing the need for the iovec may impose an ownership issue. For those cases, they currently need an indirection buffer, which means allocating data just for this purpose. Add basic read/write that don't require the iovec. Signed-off-by: Jens Axboe commit e94f141bd248ebdadcb7351f1e70b31cee5add53 Author: Jens Axboe Date: Thu Dec 19 12:06:02 2019 -0700 io_uring: improve poll completion performance For busy IORING_OP_POLL_ADD workloads, we can have enough contention on the completion lock that we fail the inline completion path quite often as we fail the trylock on that lock. Add a list for deferred completions that we can use in that case. This helps reduce the number of async offloads we have to do, as if we get multiple completions in a row, we'll piggy back on to the poll_llist instead of having to queue our own offload. Signed-off-by: Jens Axboe commit ad3eb2c89fb24d14ac81f43eff8e85fece2c934d Author: Jens Axboe Date: Wed Dec 18 17:12:20 2019 -0700 io_uring: split overflow state into SQ and CQ side We currently check ->cq_overflow_list from both SQ and CQ context, which causes some bouncing of that cache line. Add separate bits of state for this instead, so that the SQ side can check using its own state, and likewise for the CQ side. This adds ->sq_check_overflow with the SQ state, and ->cq_check_overflow with the CQ state. If we hit an overflow condition, both of these bits are set. Likewise for overflow flush clear, we clear both bits. For the fast path of just checking if there's an overflow condition on either the SQ or CQ side, we can use our own private bit for this. Signed-off-by: Jens Axboe commit d3656344fea0339fb0365c8df4d2beba4e0089cd Author: Jens Axboe Date: Wed Dec 18 09:50:26 2019 -0700 io_uring: add lookup table for various opcode needs We currently have various switch statements that check if an opcode needs a file, mm, etc. These are hard to keep in sync as opcodes are added. Add a struct io_op_def that holds all of this information, so we have just one spot to update when opcodes are added. This also enables us to NOT allocate req->io if a deferred command doesn't need it, and corrects some mistakes we had in terms of what commands need mm context. Signed-off-by: Jens Axboe commit add7b6b85a4dfa89283834d181e87ea2144b9028 Author: Jens Axboe Date: Wed Dec 18 08:54:21 2019 -0700 io_uring: remove two unnecessary function declarations __io_free_req() and io_double_put_req() aren't used before they are defined, so we can kill these two forwards. Signed-off-by: Jens Axboe commit 32fe525b6d10fec956cfe68f0db76839cd7f0ea5 Author: Pavel Begunkov Date: Tue Dec 17 22:26:58 2019 +0300 io_uring: move *queue_link_head() from common path Move io_queue_link_head() to links handling code in io_submit_sqe(), so it wouldn't need extra checks and would have better data locality. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9d76377f7e13c19441fdd066033345289f89b5fe Author: Pavel Begunkov Date: Tue Dec 17 02:22:07 2019 +0300 io_uring: rename prev to head Calling "prev" a head of a link is a bit misleading. Rename it Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ce35a47a3a0208a77b4d31b7f2e8ed57d624093d Author: Jens Axboe Date: Tue Dec 17 08:04:44 2019 -0700 io_uring: add IOSQE_ASYNC io_uring defaults to always doing inline submissions, if at all possible. But for larger copies, even if the data is fully cached, that can take a long time. Add an IOSQE_ASYNC flag that the application can set on the SQE - if set, it'll ensure that we always go async for those kinds of requests. Use the io-wq IO_WQ_WORK_CONCURRENT flag to ensure we get the concurrency we desire for this case. Signed-off-by: Jens Axboe commit 895e2ca0f693c672902191747b548bdc56f0c7de Author: Jens Axboe Date: Tue Dec 17 08:46:33 2019 -0700 io-wq: support concurrent non-blocking work io-wq assumes that work will complete fast (and not block), so it doesn't create a new worker when work is enqueued, if we already have at least one worker running. This is done on the assumption that if work is running, then it will complete fast. Add an option to force io-wq to fork a new worker for work queued. This is signaled by setting IO_WQ_WORK_CONCURRENT on the work item. For that case, io-wq will create a new worker, even though workers are already running. Signed-off-by: Jens Axboe commit eddc7ef52a6b37b7ba3d1c8a8fbb63d5d9914f8a Author: Jens Axboe Date: Fri Dec 13 21:18:10 2019 -0700 io_uring: add support for IORING_OP_STATX This provides support for async statx(2) through io_uring. Signed-off-by: Jens Axboe commit 3934e36f6099e6277db33f433fe135c6644e8ac2 Author: Jens Axboe Date: Sat Dec 14 13:26:33 2019 -0700 fs: make two stat prep helpers available To implement an async stat, we need to provide the flags mapping and the statx user copy. Make them available internally, through fs/internal.h. Signed-off-by: Jens Axboe commit 05f3fb3c5397524feae2e73ee8e150a9090a7da2 Author: Jens Axboe Date: Mon Dec 9 11:22:50 2019 -0700 io_uring: avoid ring quiesce for fixed file set unregister and update We currently fully quiesce the ring before an unregister or update of the fixed fileset. This is very expensive, and we can be a bit smarter about this. Add a percpu refcount for the file tables as a whole. Grab a percpu ref when we use a registered file, and put it on completion. This is cheap to do. Upon removal of a file from a set, switch the ref count to atomic mode. When we hit zero ref on the completion side, then we know we can drop the previously registered files. When the old files have been dropped, switch the ref back to percpu mode for normal operation. Since there's a period between doing the update and the kernel being done with it, add a IORING_OP_FILES_UPDATE opcode that can perform the same action. The application knows the update has completed when it gets the CQE for it. Between doing the update and receiving this completion, the application must continue to use the unregistered fd if submitting IO on this particular file. This takes the runtime of test/file-register from liburing from 14s to about 0.7s. Signed-off-by: Jens Axboe commit b5dba59e0cf7e2cc4d3b3b1ac5fe81ddf21959eb Author: Jens Axboe Date: Wed Dec 11 14:02:38 2019 -0700 io_uring: add support for IORING_OP_CLOSE This works just like close(2), unsurprisingly. We remove the file descriptor and post the completion inline, then offload the actual (potential) last file put to async context. Mark the async part of this work as uncancellable, as we really must guarantee that the latter part of the close is run. Signed-off-by: Jens Axboe commit 0c9d5ccd26a004f59333c06fbbb98f9cb1eed93d Author: Jens Axboe Date: Wed Dec 11 19:29:43 2019 -0700 io-wq: add support for uncancellable work Not all work can be cancelled, some of it we may need to guarantee that it runs to completion. Allow the caller to set IO_WQ_WORK_NO_CANCEL on work that must not be cancelled. Note that the caller work function must also check for IO_WQ_WORK_NO_CANCEL on work that is marked IO_WQ_WORK_CANCEL. Signed-off-by: Jens Axboe commit 6e802a4ba056a6f2f51ac9d54eead3ed6f9829a2 Author: Jens Axboe Date: Wed Dec 11 14:10:35 2019 -0700 fs: move filp_close() outside of __close_fd_get_file() Just one caller of this, and just use filp_close() there manually. This is important to allow async close/removal of the fd. Signed-off-by: Jens Axboe commit 15b71abe7b52df214785dde0de9f581cc0216d17 Author: Jens Axboe Date: Wed Dec 11 11:20:36 2019 -0700 io_uring: add support for IORING_OP_OPENAT This works just like openat(2), except it can be performed async. For the normal case of a non-blocking path lookup this will complete inline. If we have to do IO to perform the open, it'll be done from async context. Signed-off-by: Jens Axboe commit 35cb6d54c1d5daf1d1ed585ef5ce4557e7ab284c Author: Jens Axboe Date: Fri Dec 13 11:10:11 2019 -0700 fs: make build_open_flags() available internally This is a prep patch for supporting non-blocking open from io_uring. Signed-off-by: Jens Axboe commit d63d1b5edb7b832210bfde587ba9e7549fa064eb Author: Jens Axboe Date: Tue Dec 10 10:38:56 2019 -0700 io_uring: add support for fallocate() This exposes fallocate(2) through io_uring. Signed-off-by: Jens Axboe commit 4d927483732f759769613388813ff5dbb29902a7 Merge: fa7773deb344 1292e972fff2 Author: Jens Axboe Date: Mon Jan 20 17:01:17 2020 -0700 Merge branch 'io_uring-5.5' into for-5.6/io_uring-vfs Pull in compatability fix for the files_update command. * io_uring-5.5: io_uring: fix compat for IORING_REGISTER_FILES_UPDATE commit 4f29ad200f7b40fbcf73cd65f95087535ba78380 Author: Alexander Lobakin Date: Fri Jan 17 17:02:09 2020 +0300 MIPS: syscalls: fix indentation of the 'SYSNR' message It also lacks a whitespace (copy'n'paste error?) and also messes up the output: SYSHDR arch/mips/include/generated/uapi/asm/unistd_n32.h SYSHDR arch/mips/include/generated/uapi/asm/unistd_n64.h SYSHDR arch/mips/include/generated/uapi/asm/unistd_o32.h SYSNR arch/mips/include/generated/uapi/asm/unistd_nr_n32.h SYSNR arch/mips/include/generated/uapi/asm/unistd_nr_n64.h SYSNR arch/mips/include/generated/uapi/asm/unistd_nr_o32.h WRAP arch/mips/include/generated/uapi/asm/bpf_perf_event.h WRAP arch/mips/include/generated/uapi/asm/ipcbuf.h After: SYSHDR arch/mips/include/generated/uapi/asm/unistd_n32.h SYSHDR arch/mips/include/generated/uapi/asm/unistd_n64.h SYSHDR arch/mips/include/generated/uapi/asm/unistd_o32.h SYSNR arch/mips/include/generated/uapi/asm/unistd_nr_n32.h SYSNR arch/mips/include/generated/uapi/asm/unistd_nr_n64.h SYSNR arch/mips/include/generated/uapi/asm/unistd_nr_o32.h WRAP arch/mips/include/generated/uapi/asm/bpf_perf_event.h WRAP arch/mips/include/generated/uapi/asm/ipcbuf.h Present since day 0 of syscall table generation introduction for MIPS. Fixes: 9bcbf97c6293 ("mips: add system call table generation support") Cc: # v5.0+ Signed-off-by: Alexander Lobakin Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: Masahiro Yamada Cc: Rob Herring Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 16202c09577f3d0c533274c0410b7de05fb0d458 Author: Alexander Lobakin Date: Fri Jan 17 17:02:08 2020 +0300 MIPS: boot: fix typo in 'vmlinux.lzma.its' target Commit 92b34a976348 ("MIPS: boot: add missing targets for vmlinux.*.its") fixed constant rebuild of *.its files on every make invocation, but due to typo ("lzmo") it made no sense for vmlinux.lzma.its. Fixes: 92b34a976348 ("MIPS: boot: add missing targets for vmlinux.*.its") Cc: # v4.19+ Signed-off-by: Alexander Lobakin [paulburton@kernel.org: s/invokation/invocation/] Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: Masahiro Yamada Cc: Rob Herring Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 17c5f65db629a3bd95ac8eb960940b6fbb39a310 Author: Bart Van Assche Date: Fri Jan 17 20:20:56 2020 -0800 scsi: qla2xxx: Fix a NULL pointer dereference in an error path This patch fixes the following Coverity complaint: FORWARD_NULL qla_init.c: 5275 in qla2x00_configure_local_loop() 5269 5270 if (fcport->scan_state == QLA_FCPORT_FOUND) 5271 qla24xx_fcport_handle_login(vha, fcport); 5272 } 5273 5274 cleanup_allocation: >>> CID 353340: (FORWARD_NULL) >>> Passing null pointer "new_fcport" to "qla2x00_free_fcport", which dereferences it. 5275 qla2x00_free_fcport(new_fcport); 5276 5277 if (rval != QLA_SUCCESS) { 5278 ql_dbg(ql_dbg_disc, vha, 0x2098, 5279 "Configure local loop error exit: rval=%x.\n", rval); 5280 } qla_init.c: 5275 in qla2x00_configure_local_loop() 5269 5270 if (fcport->scan_state == QLA_FCPORT_FOUND) 5271 qla24xx_fcport_handle_login(vha, fcport); 5272 } 5273 5274 cleanup_allocation: >>> CID 353340: (FORWARD_NULL) >>> Passing null pointer "new_fcport" to "qla2x00_free_fcport", which dereferences it. 5275 qla2x00_free_fcport(new_fcport); 5276 5277 if (rval != QLA_SUCCESS) { 5278 ql_dbg(ql_dbg_disc, vha, 0x2098, 5279 "Configure local loop error exit: rval=%x.\n", rval); 5280 } Fixes: 3dae220595ba ("scsi: qla2xxx: Use common routine to free fcport struct") Cc: Himanshu Madhani Cc: Quinn Tran Cc: Martin Wilck Cc: Daniel Wagner Cc: Roman Bolshakov Link: https://lore.kernel.org/r/20200118042056.32232-1-bvanassche@acm.org Signed-off-by: Bart Van Assche Reviewed-by: Ewan D. Milne Reviewed-by: Daniel Wagner Signed-off-by: Martin K. Petersen commit a53998802e178451701d59d38e36f551422977ba Author: Alexander Lobakin Date: Fri Jan 17 17:02:07 2020 +0300 MIPS: fix indentation of the 'RELOCS' message quiet_cmd_relocs lacks a whitespace which results in: LD vmlinux SORTEX vmlinux SYSMAP System.map RELOCS vmlinux Building modules, stage 2. MODPOST 64 modules After this patch: LD vmlinux SORTEX vmlinux SYSMAP System.map RELOCS vmlinux Building modules, stage 2. MODPOST 64 modules Typo is present in kernel tree since the introduction of relocatable kernel support in commit e818fac595ab ("MIPS: Generate relocation table when CONFIG_RELOCATABLE"), but the relocation scripts were moved to Makefile.postlink later with commit 44079d3509ae ("MIPS: Use Makefile.postlink to insert relocations into vmlinux"). Fixes: 44079d3509ae ("MIPS: Use Makefile.postlink to insert relocations into vmlinux") Cc: # v4.11+ Signed-off-by: Alexander Lobakin [paulburton@kernel.org: Fixup commit references in commit message.] Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: Masahiro Yamada Cc: Rob Herring Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 6ca67a8e7bed55389a0297647b6196910776971c Author: Thomas Bogendoerfer Date: Fri Jan 17 12:56:27 2020 +0100 scsi: qla1280: Make checking for 64bit support consistent Use #ifdef QLA_64BIT_PTR to check if 64bit support is enabled. This fixes ("scsi: qla1280: Fix dma firmware download, if dma address is 64bit"). Link: https://lore.kernel.org/r/20200117115628.13219-1-tbogendoerfer@suse.de Signed-off-by: Thomas Bogendoerfer Signed-off-by: Martin K. Petersen commit aa124436f329cc23e88ce67c81b5f6b7f4930529 Author: zhengbin Date: Mon Jan 20 14:34:47 2020 -0800 xfs: change return value of xfs_inode_need_cow to int Fixes coccicheck warning: fs/xfs/xfs_reflink.c:236:9-10: WARNING: return of 0/1 in function 'xfs_inode_need_cow' with return type bool Reported-by: Hulk Robot Signed-off-by: zhengbin [darrick: rename the function so it doesn't sound like a predicate] Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit f1c3656c6d9c147d07d16614455aceb34932bdeb Author: Hangbin Liu Date: Fri Jan 17 18:06:56 2020 +0800 selftests/bpf: Skip perf hw events test if the setup disabled it The same with commit 4e59afbbed96 ("selftests/bpf: skip nmi test when perf hw events are disabled"), it would make more sense to skip the test_stacktrace_build_id_nmi test if the setup (e.g. virtual machines) has disabled hardware perf events. Fixes: 13790d1cc72c ("bpf: add selftest for stackmap with build_id in NMI context") Signed-off-by: Hangbin Liu Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200117100656.10359-1-liuhangbin@gmail.com commit 396b83fa75a3deb9aa68296c090f4eb540917d9d Author: Stanislav Fomichev Date: Fri Jan 17 17:05:46 2020 -0800 selftests/bpf: Don't check for btf fd in test_btf After commit 0d13bfce023a ("libbpf: Don't require root for bpf_object__open()") we no longer load BTF during bpf_object__open(), so let's remove the expectation from test_btf that the fd is not -1. The test currently fails. Before: BTF libbpf test[1] (test_btf_haskv.o): do_test_file:4152:FAIL bpf_object__btf_fd: -1 BTF libbpf test[2] (test_btf_newkv.o): do_test_file:4152:FAIL bpf_object__btf_fd: -1 BTF libbpf test[3] (test_btf_nokv.o): do_test_file:4152:FAIL bpf_object__btf_fd: -1 After: BTF libbpf test[1] (test_btf_haskv.o): OK BTF libbpf test[2] (test_btf_newkv.o): OK BTF libbpf test[3] (test_btf_nokv.o): OK Fixes: 0d13bfce023a ("libbpf: Don't require root for bpf_object__open()") Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200118010546.74279-1-sdf@google.com commit 2e3a94aa2bfc6de95a0700f0a868c6f5db3a9592 Author: Brian Vazquez Date: Sun Jan 19 11:40:40 2020 -0800 bpf: Fix memory leaks in generic update/delete batch ops Generic update/delete batch ops functions were using __bpf_copy_key without properly freeing the memory. Handle the memory allocation and copy_from_user separately. Fixes: aa2e93b8e58e ("bpf: Add generic support for update and delete batch ops") Reported-by: Dan Carpenter Signed-off-by: Brian Vazquez Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200119194040.128369-1-brianvv@google.com commit 684415d0de3009cdc78dc0e8ab1b2bdcd919d834 Merge: 96b34bac4133 9c26abeb86ce Author: Olof Johansson Date: Mon Jan 20 11:26:09 2020 -0800 Merge tag 'v5.5-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/drivers cmdq: - clean ups of unused code and debuggability - add cmdq_instruction to make the function call interface more readable - add functions for polling and providing info for the user of cmdq scpsys: - add bindings for MT6765 * tag 'v5.5-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: dt-bindings: mediatek: add MT6765 power dt-bindings soc: mediatek: cmdq: delete not used define soc: mediatek: cmdq: add cmdq_dev_get_client_reg function soc: mediatek: cmdq: add polling function soc: mediatek: cmdq: define the instruction struct soc: mediatek: cmdq: remove OR opertaion from err return Link: https://lore.kernel.org/r/9b365e76-e346-f813-d750-d7cfd0d16e4e@gmail.com Signed-off-by: Olof Johansson commit 96b34bac41338328cf655743c87f0c1b4a230e40 Merge: feec214afb53 e0b70940536a Author: Olof Johansson Date: Mon Jan 20 11:22:48 2020 -0800 Merge tag 'arm-soc/for-5.6/maintainers' of https://github.com/Broadcom/stblinux into arm/drivers This pull request contains Broadcom SoCs MAINTAINERS file updates for 5.6, please pull the following: - Nicolas adds an entry for the Broadcom STB PCIe Root Complex files for both BCM7xxx (actual STB SoCs) and BCM2711 (Raspberry Pi 4). * tag 'arm-soc/for-5.6/maintainers' of https://github.com/Broadcom/stblinux: MAINTAINERS: Add brcmstb PCIe controller entry Link: https://lore.kernel.org/r/20200118032935.1346-1-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 1342a6aa4abf6a56e83ce24ce5e84243c365ab4d Merge: 5ad443607d24 cdfc88f1cdbf Author: Olof Johansson Date: Mon Jan 20 11:20:21 2020 -0800 Merge tag 'samsung-defconfig-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/defconfig Samsung defconfig changes for v5.6 1. Bring back explicitly wanted options which were removed through `make savedefconfig`. savedefconfig removes options selected by other symbol, however developers of this other symbol can remove anytime 'select' statement. 2. Enable NFS v4.1 and v4.2, useful in testing/CI systems. 3. Enable thermal throttling through devfreq framework. * tag 'samsung-defconfig-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: multi_v7_defconfig: Enable devfreq thermal integration ARM: exynos_defconfig: Enable devfreq thermal integration ARM: multi_v7_defconfig: Enable NFS v4.1 and v4.2 ARM: exynos_defconfig: Enable NFS v4.1 and v4.2 ARM: exynos_defconfig: Bring back explicitly wanted options Link: https://lore.kernel.org/r/20200120180227.9061-1-krzk@kernel.org Signed-off-by: Olof Johansson commit 0f394daef89b38d58c91118a2b08b8a1b316703b Author: Kevin Hao Date: Mon Jan 20 12:35:47 2020 +0800 irqdomain: Fix a memory leak in irq_domain_push_irq() Fix a memory leak reported by kmemleak: unreferenced object 0xffff000bc6f50e80 (size 128): comm "kworker/23:2", pid 201, jiffies 4294894947 (age 942.132s) hex dump (first 32 bytes): 00 00 00 00 41 00 00 00 86 c0 03 00 00 00 00 00 ....A........... 00 a0 b2 c6 0b 00 ff ff 40 51 fd 10 00 80 ff ff ........@Q...... backtrace: [<00000000e62d2240>] kmem_cache_alloc_trace+0x1a4/0x320 [<00000000279143c9>] irq_domain_push_irq+0x7c/0x188 [<00000000d9f4c154>] thunderx_gpio_probe+0x3ac/0x438 [<00000000fd09ec22>] pci_device_probe+0xe4/0x198 [<00000000d43eca75>] really_probe+0xdc/0x320 [<00000000d3ebab09>] driver_probe_device+0x5c/0xf0 [<000000005b3ecaa0>] __device_attach_driver+0x88/0xc0 [<000000004e5915f5>] bus_for_each_drv+0x7c/0xc8 [<0000000079d4db41>] __device_attach+0xe4/0x140 [<00000000883bbda9>] device_initial_probe+0x18/0x20 [<000000003be59ef6>] bus_probe_device+0x98/0xa0 [<0000000039b03d3f>] deferred_probe_work_func+0x74/0xa8 [<00000000870934ce>] process_one_work+0x1c8/0x470 [<00000000e3cce570>] worker_thread+0x1f8/0x428 [<000000005d64975e>] kthread+0xfc/0x128 [<00000000f0eaa764>] ret_from_fork+0x10/0x18 Fixes: 495c38d3001f ("irqdomain: Add irq_domain_{push,pop}_irq() functions") Signed-off-by: Kevin Hao Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200120043547.22271-1-haokexin@gmail.com commit 2fbb13961e741494992bae7bfaf7259b65769f9f Author: Joakim Zhang Date: Fri Jan 17 06:10:10 2020 +0000 irqchip: Add NXP INTMUX interrupt multiplexer support The Interrupt Multiplexer (INTMUX) expands the number of peripherals that can interrupt the core: * The INTMUX has 8 channels that are assigned to 8 NVIC interrupt slots. * Each INTMUX channel can receive up to 32 interrupt sources and has 1 interrupt output. * The INTMUX routes the interrupt sources to the interrupt outputs. Signed-off-by: Shengjiu Wang Signed-off-by: Joakim Zhang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200117060653.27485-3-qiangqing.zhang@nxp.com commit 618ea6275b9806909ef384c6d57f40641d7985d2 Author: Joakim Zhang Date: Fri Jan 17 06:10:05 2020 +0000 dt-bindings: interrupt-controller: Add binding for NXP INTMUX interrupt multiplexer This patch adds the DT bindings for the NXP INTMUX interrupt multiplexer for i.MX8 family SoCs. Signed-off-by: Joakim Zhang Signed-off-by: Marc Zyngier Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200117060653.27485-2-qiangqing.zhang@nxp.com commit b74416dba33be3ed934e21df8286076cbd85b97f Author: Hyunki Koo Date: Wed Dec 25 06:11:07 2019 +0900 irqchip: Define EXYNOS_IRQ_COMBINER This patch is written to clean up dependency of ARCH_EXYNOS Not all exynos device have IRQ_COMBINER, especially aarch64 EXYNOS but it is built for all exynos devices. Thus add the config for EXYNOS_IRQ_COMBINER remove direct dependency between ARCH_EXYNOS and exynos-combiner.c and only selected on the aarch32 devices Signed-off-by: Hyunki Koo Signed-off-by: Marc Zyngier Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191224211108.7128-1-hyunki00.koo@gmail.com commit 8f78bd62bdd7a7b0a9906c4827245bf17056f781 Author: Qianggui Song Date: Mon Dec 16 20:36:44 2019 +0800 irqchip/meson-gpio: Add support for meson a1 SoCs The meson a1 Socs have some changes compared with previous chips. For A113L, it contains 62 pins and can be spied on: - 62:128 undefined - 61:50 12 pins on bank A - 49:37 13 pins on bank F - 36:20 17 pins on bank X - 19:13 7 pins on bank B - 12:0 13 pins on bank P There are five relative registers for gpio interrupt controller, details are as below: - PADCTRL_GPIO_IRQ_CTRL0 bit[31]: enable/disable the whole irq lines bit[16-23]: both edge trigger bit[8-15]: single edge trigger bit[0-7]: pol trigger - PADCTRL_GPIO_IRQ_CTRL[X] bit[0-6]: 7 bits to choose gpio source for irq line 2*[X] - 2 bit[16-22]: 7 bits to choose gpio source for irq line 2*[X] - 1 where X =1,2,3,4 Signed-off-by: Qianggui Song Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191216123645.10099-4-qianggui.song@amlogic.com commit e2514165f36edac382a95474a73ba2bfa51bc2b2 Author: Qianggui Song Date: Mon Dec 16 20:36:43 2019 +0800 irqchip/meson-gpio: Rework meson irqchip driver to support meson-A1 SoCs Since Meson-A1 SoCs register layout of gpio interrupt controller has difference with previous chips, registers to decide irq line and offset of trigger method are all changed, the current driver should be modified. Signed-off-by: Qianggui Song Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20191216123645.10099-3-qianggui.song@amlogic.com commit fd6765b4c991bb9e4dd6b384b529166db82e5931 Author: Qianggui Song Date: Mon Dec 16 20:36:42 2019 +0800 dt-bindings: interrupt-controller: New binding for Meson-A1 SoCs Update dt-binding document for GPIO interrupt controller of Meson-A1 SoCs Signed-off-by: Qianggui Song Signed-off-by: Marc Zyngier Acked-by: Rob Herring Link: https://lore.kernel.org/r/20191216123645.10099-2-qianggui.song@amlogic.com commit d6152e6ec9e2171280436f7b31a571509b9287e1 Author: John Garry Date: Fri Jan 17 01:38:43 2020 +0800 irqchip/mbigen: Set driver .suppress_bind_attrs to avoid remove problems The following crash can be seen for setting CONFIG_DEBUG_TEST_DRIVER_REMOVE=y for DT FW (which some people still use): Hisilicon MBIGEN-V2 60080000.interrupt-controller: Failed to create mbi-gen irqdomain Hisilicon MBIGEN-V2: probe of 60080000.interrupt-controller failed with error -12 [...] Unable to handle kernel paging request at virtual address 0000000000005008 Mem abort info: ESR = 0x96000004 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000004 CM = 0, WnR = 0 user pgtable: 4k pages, 48-bit VAs, pgdp=0000041fb9990000 [0000000000005008] pgd=0000000000000000 Internal error: Oops: 96000004 [#1] PREEMPT SMP Modules linked in: CPU: 7 PID: 1 Comm: swapper/0 Not tainted 5.5.0-rc6-00002-g3fc42638a506-dirty #1622 Hardware name: Huawei Taishan 2280 /D05, BIOS Hisilicon D05 IT21 Nemo 2.0 RC0 04/18/2018 pstate: 40000085 (nZcv daIf -PAN -UAO) pc : mbigen_set_type+0x38/0x60 lr : __irq_set_trigger+0x6c/0x188 sp : ffff800014b4b400 x29: ffff800014b4b400 x28: 0000000000000007 x27: 0000000000000000 x26: 0000000000000000 x25: ffff041fd83bd0d4 x24: ffff041fd83bd188 x23: 0000000000000000 x22: ffff80001193ce00 x21: 0000000000000004 x20: 0000000000000000 x19: ffff041fd83bd000 x18: ffffffffffffffff x17: 0000000000000000 x16: 0000000000000000 x15: ffff8000119098c8 x14: ffff041fb94ec91c x13: ffff041fb94ec1a1 x12: 0000000000000030 x11: 0101010101010101 x10: 0000000000000040 x9 : 0000000000000000 x8 : ffff041fb98c6680 x7 : ffff800014b4b380 x6 : ffff041fd81636c8 x5 : 0000000000000000 x4 : 000000000000025f x3 : 0000000000005000 x2 : 0000000000005008 x1 : 0000000000000004 x0 : 0000000080000000 Call trace: mbigen_set_type+0x38/0x60 __setup_irq+0x744/0x900 request_threaded_irq+0xe0/0x198 pcie_pme_probe+0x98/0x118 pcie_port_probe_service+0x38/0x78 really_probe+0xa0/0x3e0 driver_probe_device+0x58/0x100 __device_attach_driver+0x90/0xb0 bus_for_each_drv+0x64/0xc8 __device_attach+0xd8/0x138 device_initial_probe+0x10/0x18 bus_probe_device+0x90/0x98 device_add+0x4c4/0x770 device_register+0x1c/0x28 pcie_port_device_register+0x1e4/0x4f0 pcie_portdrv_probe+0x34/0xd8 local_pci_probe+0x3c/0xa0 pci_device_probe+0x128/0x1c0 really_probe+0xa0/0x3e0 driver_probe_device+0x58/0x100 __device_attach_driver+0x90/0xb0 bus_for_each_drv+0x64/0xc8 __device_attach+0xd8/0x138 device_attach+0x10/0x18 pci_bus_add_device+0x4c/0xb8 pci_bus_add_devices+0x38/0x88 pci_host_probe+0x3c/0xc0 pci_host_common_probe+0xf0/0x208 hisi_pcie_almost_ecam_probe+0x24/0x30 platform_drv_probe+0x50/0xa0 really_probe+0xa0/0x3e0 driver_probe_device+0x58/0x100 device_driver_attach+0x6c/0x90 __driver_attach+0x84/0xc8 bus_for_each_dev+0x74/0xc8 driver_attach+0x20/0x28 bus_add_driver+0x148/0x1f0 driver_register+0x60/0x110 __platform_driver_register+0x40/0x48 hisi_pcie_almost_ecam_driver_init+0x1c/0x24 The specific problem here is that the mbigen driver real probe has failed as the mbigen_of_create_domain()->of_platform_device_create() call fails, the reason for that being that we never destroyed the platform device created during the remove test dry run and there is some conflict. Since we generally would never want to unbind this driver, and to save adding a driver tear down path for that, just set the driver .suppress_bind_attrs member to avoid this possibility. Signed-off-by: John Garry Signed-off-by: Marc Zyngier Reviewed-by: Hanjun Guo Link: https://lore.kernel.org/r/1579196323-180137-1-git-send-email-john.garry@huawei.com commit 04f605906ff00c649751519ca73d3058372cdc78 Author: Eddie James Date: Wed Jan 15 15:29:40 2020 -0600 irqchip: Add Aspeed SCU interrupt controller The Aspeed SOCs provide some interrupts through the System Control Unit registers. Add an interrupt controller that provides these interrupts to the system. Signed-off-by: Eddie James Signed-off-by: Marc Zyngier Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/1579123790-6894-3-git-send-email-eajames@linux.ibm.com commit 5350a237b4525ad12170f16239c9e9c7797df02f Author: Eddie James Date: Wed Jan 15 15:29:39 2020 -0600 dt-bindings: interrupt-controller: Add Aspeed SCU interrupt controller Document the Aspeed SCU interrupt controller and add an include file for the interrupts it provides. Signed-off-by: Eddie James Signed-off-by: Marc Zyngier Reviewed-by: Rob Herring Acked-by: Andrew Jeffery Link: https://lore.kernel.org/r/1579123790-6894-2-git-send-email-eajames@linux.ibm.com commit 96868dce644d002383f6d5eb575a6ce3c8779f39 Author: Yash Shah Date: Tue Dec 10 16:41:13 2019 +0530 gpio/sifive: Add GPIO driver for SiFive SoCs Adds the GPIO driver for SiFive RISC-V SoCs. Signed-off-by: Wesley W. Terpstra [Atish: Various fixes and code cleanup] Signed-off-by: Atish Patra Signed-off-by: Yash Shah Signed-off-by: Marc Zyngier Reviewed-by: Bartosz Golaszewski Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/1575976274-13487-6-git-send-email-yash.shah@sifive.com commit 3d7610e8da993539346dce6f7c909fd3d56bf4d5 Author: Enric Balletbo i Serra Date: Mon Jan 20 13:39:21 2020 +0100 regulator: core: Fix exported symbols to the exported GPL version Change the exported symbols introduced by commit e9153311491da ("regulator: vctrl-regulator: Avoid deadlock getting and setting the voltage") from EXPORT_SYMBOL() to EXPORT_SYMBOL_GPL(), like is used for all the core parts. Fixes: e9153311491da ("regulator: vctrl-regulator: Avoid deadlock getting and setting the voltage") Reported-by: Dmitry Osipenko Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20200120123921.1204339-1-enric.balletbo@collabora.com Signed-off-by: Mark Brown commit c87846571587f1c2217f16104586fd33216fc9e0 Author: Gustavo A. R. Silva Date: Fri Aug 30 10:14:06 2019 -0500 remoteproc: use struct_size() helper One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct fw_rsc_vdev { ... struct fw_rsc_vdev_vring vring[0]; } __packed; Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. So, replace the following form: sizeof(*rsc) + rsc->num_of_vrings * sizeof(struct fw_rsc_vdev_vring) with: struct_size(rsc, vring, rsc->num_of_vrings) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20190830151406.GA23274@embeddedor Signed-off-by: Bjorn Andersson commit 50d9fad73a45a78f8b974b46307712556c9a42d3 Author: Eric Biggers Date: Mon Dec 9 13:27:21 2019 -0800 ubifs: use IS_ENCRYPTED() instead of ubifs_crypt_is_encrypted() There's no need for the ubifs_crypt_is_encrypted() function anymore. Just use IS_ENCRYPTED() instead, like ext4 and f2fs do. IS_ENCRYPTED() checks the VFS-level flag instead of the UBIFS-specific flag, but it shouldn't change any behavior since the flags are kept in sync. Link: https://lore.kernel.org/r/20191209212721.244396-1-ebiggers@kernel.org Acked-by: Richard Weinberger Signed-off-by: Eric Biggers commit a8f40111d184098cd2b3dc0c7170c42250a5fa09 Author: Brandon Maier Date: Thu May 30 17:52:23 2019 -0500 remoteproc: Initialize rproc_class before use The remoteproc_core and remoteproc drivers all initialize with module_init(). However remoteproc drivers need the rproc_class during their probe. If one of the remoteproc drivers runs init and gets through probe before remoteproc_init() runs, a NULL pointer access of rproc_class's `glue_dirs` spinlock occurs. > Unable to handle kernel NULL pointer dereference at virtual address 000000dc > pgd = c0004000 > [000000dc] *pgd=00000000 > Internal error: Oops: 5 [#1] PREEMPT ARM > Modules linked in: > CPU: 0 PID: 1 Comm: swapper Tainted: G W 4.14.106-rt56 #1 > Hardware name: Generic OMAP36xx (Flattened Device Tree) > task: c6050000 task.stack: c604a000 > PC is at rt_spin_lock+0x40/0x6c > LR is at rt_spin_lock+0x28/0x6c > pc : [] lr : [] psr: 60000013 > sp : c604bdc0 ip : 00000000 fp : 00000000 > r10: 00000000 r9 : c61c7c10 r8 : c6269c20 > r7 : c0905888 r6 : c6269c20 r5 : 00000000 r4 : 000000d4 > r3 : 000000dc r2 : c6050000 r1 : 00000002 r0 : 000000d4 > Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none ... > [] (rt_spin_lock) from [] (get_device_parent+0x54/0x17c) > [] (get_device_parent) from [] (device_add+0xe0/0x5b4) > [] (device_add) from [] (rproc_add+0x18/0xd8) > [] (rproc_add) from [] (my_rproc_probe+0x158/0x204) > [] (my_rproc_probe) from [] (platform_drv_probe+0x34/0x70) > [] (platform_drv_probe) from [] (driver_probe_device+0x2c8/0x420) > [] (driver_probe_device) from [] (__driver_attach+0x100/0x11c) > [] (__driver_attach) from [] (bus_for_each_dev+0x7c/0xc0) > [] (bus_for_each_dev) from [] (bus_add_driver+0x1cc/0x264) > [] (bus_add_driver) from [] (driver_register+0x78/0xf8) > [] (driver_register) from [] (do_one_initcall+0x100/0x190) > [] (do_one_initcall) from [] (kernel_init_freeable+0x130/0x1d0) > [] (kernel_init_freeable) from [] (kernel_init+0x8/0x114) > [] (kernel_init) from [] (ret_from_fork+0x14/0x24) > Code: e2843008 e3c2203f f5d3f000 e5922010 (e193cf9f) > ---[ end trace 0000000000000002 ]--- Signed-off-by: Brandon Maier Link: https://lore.kernel.org/r/20190530225223.136420-1-brandon.maier@rockwellcollins.com Signed-off-by: Bjorn Andersson commit 7017996951fde84698ddfe7fd47f92bd9d9eb85d Author: Pi-Hsun Shih Date: Tue Nov 12 19:03:26 2019 +0800 rpmsg: add rpmsg support for mt8183 SCP. Add a simple rpmsg support for mt8183 SCP, that use IPI / IPC directly. Signed-off-by: Pi-Hsun Shih Link: https://lore.kernel.org/r/20191112110330.179649-4-pihsun@chromium.org Signed-off-by: Bjorn Andersson commit 63c13d61eafe4606f1c16c54da40c4eee78e9edf Author: Erin Lo Date: Tue Nov 12 19:03:25 2019 +0800 remoteproc/mediatek: add SCP support for mt8183 Provide a basic driver to control Cortex M4 co-processor Signed-off-by: Erin Lo Signed-off-by: Nicolas Boichat Signed-off-by: Pi-Hsun Shih Link: https://lore.kernel.org/r/20191112110330.179649-3-pihsun@chromium.org Signed-off-by: Bjorn Andersson commit e47e98877bf4d743697efc7bb523d69eb243fe59 Author: Erin Lo Date: Tue Nov 12 19:03:24 2019 +0800 dt-bindings: Add a binding for Mediatek SCP Add a DT binding documentation of SCP for the MT8183 SoC from Mediatek. Signed-off-by: Erin Lo Signed-off-by: Pi-Hsun Shih Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191112110330.179649-2-pihsun@chromium.org Signed-off-by: Bjorn Andersson commit e0354d147e5889b5faa12e64fa38187aed39aad4 Author: Colin Ian King Date: Tue Jan 14 14:40:31 2020 +0000 drivers: ipmi: fix off-by-one bounds check that leads to a out-of-bounds write The end of buffer check is off-by-one since the check is against an index that is pre-incremented before a store to buf[]. Fix this adjusting the bounds check appropriately. Addresses-Coverity: ("Out-of-bounds write") Fixes: 51bd6f291583 ("Add support for IPMB driver") Signed-off-by: Colin Ian King Message-Id: <20200114144031.358003-1-colin.king@canonical.com> Reviewed-by: Asmaa Mnebhi Signed-off-by: Corey Minyard commit 32ada3b9e04c6f6d4916967bd8bbe2450ad5bc5e Author: Xiaochen Shen Date: Thu Jan 9 00:28:06 2020 +0800 x86/resctrl: Clean up unused function parameter in mkdir path Commit 334b0f4e9b1b ("x86/resctrl: Fix a deadlock due to inaccurate reference") changed the argument to rdtgroup_kn_lock_live()/rdtgroup_kn_unlock() within mkdir_rdt_prepare(). That change resulted in an unused function parameter to mkdir_rdt_prepare(). Clean up the unused function parameter in mkdir_rdt_prepare() and its callers rdtgroup_mkdir_mon() and rdtgroup_mkdir_ctrl_mon(). Signed-off-by: Xiaochen Shen Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Reviewed-by: Tony Luck Acked-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1578500886-21771-5-git-send-email-xiaochen.shen@intel.com commit 708e0ada1916be765b7faa58854062f2bc620bbf Author: Jessica Yu Date: Fri Jan 17 13:32:21 2020 +0100 module: avoid setting info->name early in case we can fall back to info->mod->name In setup_load_info(), info->name (which contains the name of the module, mostly used for early logging purposes before the module gets set up) gets unconditionally assigned if .modinfo is missing despite the fact that there is an if (!info->name) check near the end of the function. Avoid assigning a placeholder string to info->name if .modinfo doesn't exist, so that we can fall back to info->mod->name later on. Fixes: 5fdc7db6448a ("module: setup load info before module_sig_check()") Reviewed-by: Miroslav Benes Signed-off-by: Jessica Yu commit 334b0f4e9b1b4a1d475f803419d202f6c5e4d18e Author: Xiaochen Shen Date: Thu Jan 9 00:28:05 2020 +0800 x86/resctrl: Fix a deadlock due to inaccurate reference There is a race condition which results in a deadlock when rmdir and mkdir execute concurrently: $ ls /sys/fs/resctrl/c1/mon_groups/m1/ cpus cpus_list mon_data tasks Thread 1: rmdir /sys/fs/resctrl/c1 Thread 2: mkdir /sys/fs/resctrl/c1/mon_groups/m1 3 locks held by mkdir/48649: #0: (sb_writers#17){.+.+}, at: [] mnt_want_write+0x20/0x50 #1: (&type->i_mutex_dir_key#8/1){+.+.}, at: [] filename_create+0x7b/0x170 #2: (rdtgroup_mutex){+.+.}, at: [] rdtgroup_kn_lock_live+0x3d/0x70 4 locks held by rmdir/48652: #0: (sb_writers#17){.+.+}, at: [] mnt_want_write+0x20/0x50 #1: (&type->i_mutex_dir_key#8/1){+.+.}, at: [] do_rmdir+0x13f/0x1e0 #2: (&type->i_mutex_dir_key#8){++++}, at: [] vfs_rmdir+0x4d/0x120 #3: (rdtgroup_mutex){+.+.}, at: [] rdtgroup_kn_lock_live+0x3d/0x70 Thread 1 is deleting control group "c1". Holding rdtgroup_mutex, kernfs_remove() removes all kernfs nodes under directory "c1" recursively, then waits for sub kernfs node "mon_groups" to drop active reference. Thread 2 is trying to create a subdirectory "m1" in the "mon_groups" directory. The wrapper kernfs_iop_mkdir() takes an active reference to the "mon_groups" directory but the code drops the active reference to the parent directory "c1" instead. As a result, Thread 1 is blocked on waiting for active reference to drop and never release rdtgroup_mutex, while Thread 2 is also blocked on trying to get rdtgroup_mutex. Thread 1 (rdtgroup_rmdir) Thread 2 (rdtgroup_mkdir) (rmdir /sys/fs/resctrl/c1) (mkdir /sys/fs/resctrl/c1/mon_groups/m1) ------------------------- ------------------------- kernfs_iop_mkdir /* * kn: "m1", parent_kn: "mon_groups", * prgrp_kn: parent_kn->parent: "c1", * * "mon_groups", parent_kn->active++: 1 */ kernfs_get_active(parent_kn) kernfs_iop_rmdir /* "c1", kn->active++ */ kernfs_get_active(kn) rdtgroup_kn_lock_live atomic_inc(&rdtgrp->waitcount) /* "c1", kn->active-- */ kernfs_break_active_protection(kn) mutex_lock rdtgroup_rmdir_ctrl free_all_child_rdtgrp sentry->flags = RDT_DELETED rdtgroup_ctrl_remove rdtgrp->flags = RDT_DELETED kernfs_get(kn) kernfs_remove(rdtgrp->kn) __kernfs_remove /* "mon_groups", sub_kn */ atomic_add(KN_DEACTIVATED_BIAS, &sub_kn->active) kernfs_drain(sub_kn) /* * sub_kn->active == KN_DEACTIVATED_BIAS + 1, * waiting on sub_kn->active to drop, but it * never drops in Thread 2 which is blocked * on getting rdtgroup_mutex. */ Thread 1 hangs here ----> wait_event(sub_kn->active == KN_DEACTIVATED_BIAS) ... rdtgroup_mkdir rdtgroup_mkdir_mon(parent_kn, prgrp_kn) mkdir_rdt_prepare(parent_kn, prgrp_kn) rdtgroup_kn_lock_live(prgrp_kn) atomic_inc(&rdtgrp->waitcount) /* * "c1", prgrp_kn->active-- * * The active reference on "c1" is * dropped, but not matching the * actual active reference taken * on "mon_groups", thus causing * Thread 1 to wait forever while * holding rdtgroup_mutex. */ kernfs_break_active_protection( prgrp_kn) /* * Trying to get rdtgroup_mutex * which is held by Thread 1. */ Thread 2 hangs here ----> mutex_lock ... The problem is that the creation of a subdirectory in the "mon_groups" directory incorrectly releases the active protection of its parent directory instead of itself before it starts waiting for rdtgroup_mutex. This is triggered by the rdtgroup_mkdir() flow calling rdtgroup_kn_lock_live()/rdtgroup_kn_unlock() with kernfs node of the parent control group ("c1") as argument. It should be called with kernfs node "mon_groups" instead. What is currently missing is that the kn->priv of "mon_groups" is NULL instead of pointing to the rdtgrp. Fix it by pointing kn->priv to rdtgrp when "mon_groups" is created. Then it could be passed to rdtgroup_kn_lock_live()/rdtgroup_kn_unlock() instead. And then it operates on the same rdtgroup structure but handles the active reference of kernfs node "mon_groups" to prevent deadlock. The same changes are also made to the "mon_data" directories. This results in some unused function parameters that will be cleaned up in follow-up patch as the focus here is on the fix only in support of backporting efforts. Fixes: c7d9aac61311 ("x86/intel_rdt/cqm: Add mkdir support for RDT monitoring") Suggested-by: Reinette Chatre Signed-off-by: Xiaochen Shen Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Reviewed-by: Tony Luck Acked-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1578500886-21771-4-git-send-email-xiaochen.shen@intel.com commit 074fadee59ee7a9d2b216e9854bd4efb5dad679f Author: Xiaochen Shen Date: Thu Jan 9 00:28:04 2020 +0800 x86/resctrl: Fix use-after-free due to inaccurate refcount of rdtgroup There is a race condition in the following scenario which results in an use-after-free issue when reading a monitoring file and deleting the parent ctrl_mon group concurrently: Thread 1 calls atomic_inc() to take refcount of rdtgrp and then calls kernfs_break_active_protection() to drop the active reference of kernfs node in rdtgroup_kn_lock_live(). In Thread 2, kernfs_remove() is a blocking routine. It waits on all sub kernfs nodes to drop the active reference when removing all subtree kernfs nodes recursively. Thread 2 could block on kernfs_remove() until Thread 1 calls kernfs_break_active_protection(). Only after kernfs_remove() completes the refcount of rdtgrp could be trusted. Before Thread 1 calls atomic_inc() and kernfs_break_active_protection(), Thread 2 could call kfree() when the refcount of rdtgrp (sentry) is 0 instead of 1 due to the race. In Thread 1, in rdtgroup_kn_unlock(), referring to earlier rdtgrp memory (rdtgrp->waitcount) which was already freed in Thread 2 results in use-after-free issue. Thread 1 (rdtgroup_mondata_show) Thread 2 (rdtgroup_rmdir) -------------------------------- ------------------------- rdtgroup_kn_lock_live /* * kn active protection until * kernfs_break_active_protection(kn) */ rdtgrp = kernfs_to_rdtgroup(kn) rdtgroup_kn_lock_live atomic_inc(&rdtgrp->waitcount) mutex_lock rdtgroup_rmdir_ctrl free_all_child_rdtgrp /* * sentry->waitcount should be 1 * but is 0 now due to the race. */ kfree(sentry)*[1] /* * Only after kernfs_remove() * completes, the refcount of * rdtgrp could be trusted. */ atomic_inc(&rdtgrp->waitcount) /* kn->active-- */ kernfs_break_active_protection(kn) rdtgroup_ctrl_remove rdtgrp->flags = RDT_DELETED /* * Blocking routine, wait for * all sub kernfs nodes to drop * active reference in * kernfs_break_active_protection. */ kernfs_remove(rdtgrp->kn) rdtgroup_kn_unlock mutex_unlock atomic_dec_and_test( &rdtgrp->waitcount) && (flags & RDT_DELETED) kernfs_unbreak_active_protection(kn) kfree(rdtgrp) mutex_lock mon_event_read rdtgroup_kn_unlock mutex_unlock /* * Use-after-free: refer to earlier rdtgrp * memory which was freed in [1]. */ atomic_dec_and_test(&rdtgrp->waitcount) && (flags & RDT_DELETED) /* kn->active++ */ kernfs_unbreak_active_protection(kn) kfree(rdtgrp) Fix it by moving free_all_child_rdtgrp() to after kernfs_remove() in rdtgroup_rmdir_ctrl() to ensure it has the accurate refcount of rdtgrp. Fixes: f3cbeacaa06e ("x86/intel_rdt/cqm: Add rmdir support") Suggested-by: Reinette Chatre Signed-off-by: Xiaochen Shen Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Reviewed-by: Tony Luck Acked-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1578500886-21771-3-git-send-email-xiaochen.shen@intel.com commit b8511ccc75c033f6d54188ea4df7bf1e85778740 Author: Xiaochen Shen Date: Thu Jan 9 00:28:03 2020 +0800 x86/resctrl: Fix use-after-free when deleting resource groups A resource group (rdtgrp) contains a reference count (rdtgrp->waitcount) that indicates how many waiters expect this rdtgrp to exist. Waiters could be waiting on rdtgroup_mutex or some work sitting on a task's workqueue for when the task returns from kernel mode or exits. The deletion of a rdtgrp is intended to have two phases: (1) while holding rdtgroup_mutex the necessary cleanup is done and rdtgrp->flags is set to RDT_DELETED, (2) after releasing the rdtgroup_mutex, the rdtgrp structure is freed only if there are no waiters and its flag is set to RDT_DELETED. Upon gaining access to rdtgroup_mutex or rdtgrp, a waiter is required to check for the RDT_DELETED flag. When unmounting the resctrl file system or deleting ctrl_mon groups, all of the subdirectories are removed and the data structure of rdtgrp is forcibly freed without checking rdtgrp->waitcount. If at this point there was a waiter on rdtgrp then a use-after-free issue occurs when the waiter starts running and accesses the rdtgrp structure it was waiting on. See kfree() calls in [1], [2] and [3] in these two call paths in following scenarios: (1) rdt_kill_sb() -> rmdir_all_sub() -> free_all_child_rdtgrp() (2) rdtgroup_rmdir() -> rdtgroup_rmdir_ctrl() -> free_all_child_rdtgrp() There are several scenarios that result in use-after-free issue in following: Scenario 1: ----------- In Thread 1, rdtgroup_tasks_write() adds a task_work callback move_myself(). If move_myself() is scheduled to execute after Thread 2 rdt_kill_sb() is finished, referring to earlier rdtgrp memory (rdtgrp->waitcount) which was already freed in Thread 2 results in use-after-free issue. Thread 1 (rdtgroup_tasks_write) Thread 2 (rdt_kill_sb) ------------------------------- ---------------------- rdtgroup_kn_lock_live atomic_inc(&rdtgrp->waitcount) mutex_lock rdtgroup_move_task __rdtgroup_move_task /* * Take an extra refcount, so rdtgrp cannot be freed * before the call back move_myself has been invoked */ atomic_inc(&rdtgrp->waitcount) /* Callback move_myself will be scheduled for later */ task_work_add(move_myself) rdtgroup_kn_unlock mutex_unlock atomic_dec_and_test(&rdtgrp->waitcount) && (flags & RDT_DELETED) mutex_lock rmdir_all_sub /* * sentry and rdtgrp are freed * without checking refcount */ free_all_child_rdtgrp kfree(sentry)*[1] kfree(rdtgrp)*[2] mutex_unlock /* * Callback is scheduled to execute * after rdt_kill_sb is finished */ move_myself /* * Use-after-free: refer to earlier rdtgrp * memory which was freed in [1] or [2]. */ atomic_dec_and_test(&rdtgrp->waitcount) && (flags & RDT_DELETED) kfree(rdtgrp) Scenario 2: ----------- In Thread 1, rdtgroup_tasks_write() adds a task_work callback move_myself(). If move_myself() is scheduled to execute after Thread 2 rdtgroup_rmdir() is finished, referring to earlier rdtgrp memory (rdtgrp->waitcount) which was already freed in Thread 2 results in use-after-free issue. Thread 1 (rdtgroup_tasks_write) Thread 2 (rdtgroup_rmdir) ------------------------------- ------------------------- rdtgroup_kn_lock_live atomic_inc(&rdtgrp->waitcount) mutex_lock rdtgroup_move_task __rdtgroup_move_task /* * Take an extra refcount, so rdtgrp cannot be freed * before the call back move_myself has been invoked */ atomic_inc(&rdtgrp->waitcount) /* Callback move_myself will be scheduled for later */ task_work_add(move_myself) rdtgroup_kn_unlock mutex_unlock atomic_dec_and_test(&rdtgrp->waitcount) && (flags & RDT_DELETED) rdtgroup_kn_lock_live atomic_inc(&rdtgrp->waitcount) mutex_lock rdtgroup_rmdir_ctrl free_all_child_rdtgrp /* * sentry is freed without * checking refcount */ kfree(sentry)*[3] rdtgroup_ctrl_remove rdtgrp->flags = RDT_DELETED rdtgroup_kn_unlock mutex_unlock atomic_dec_and_test( &rdtgrp->waitcount) && (flags & RDT_DELETED) kfree(rdtgrp) /* * Callback is scheduled to execute * after rdt_kill_sb is finished */ move_myself /* * Use-after-free: refer to earlier rdtgrp * memory which was freed in [3]. */ atomic_dec_and_test(&rdtgrp->waitcount) && (flags & RDT_DELETED) kfree(rdtgrp) If CONFIG_DEBUG_SLAB=y, Slab corruption on kmalloc-2k can be observed like following. Note that "0x6b" is POISON_FREE after kfree(). The corrupted bits "0x6a", "0x64" at offset 0x424 correspond to waitcount member of struct rdtgroup which was freed: Slab corruption (Not tainted): kmalloc-2k start=ffff9504c5b0d000, len=2048 420: 6b 6b 6b 6b 6a 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkjkkkkkkkkkkk Single bit error detected. Probably bad RAM. Run memtest86+ or a similar memory test tool. Next obj: start=ffff9504c5b0d800, len=2048 000: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk 010: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk Slab corruption (Not tainted): kmalloc-2k start=ffff9504c58ab800, len=2048 420: 6b 6b 6b 6b 64 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkdkkkkkkkkkkk Prev obj: start=ffff9504c58ab000, len=2048 000: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk 010: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk Fix this by taking reference count (waitcount) of rdtgrp into account in the two call paths that currently do not do so. Instead of always freeing the resource group it will only be freed if there are no waiters on it. If there are waiters, the resource group will have its flags set to RDT_DELETED. It will be left to the waiter to free the resource group when it starts running and finding that it was the last waiter and the resource group has been removed (rdtgrp->flags & RDT_DELETED) since. (1) rdt_kill_sb() -> rmdir_all_sub() -> free_all_child_rdtgrp() (2) rdtgroup_rmdir() -> rdtgroup_rmdir_ctrl() -> free_all_child_rdtgrp() Fixes: f3cbeacaa06e ("x86/intel_rdt/cqm: Add rmdir support") Fixes: 60cf5e101fd4 ("x86/intel_rdt: Add mkdir to resctrl file system") Suggested-by: Reinette Chatre Signed-off-by: Xiaochen Shen Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Reviewed-by: Tony Luck Acked-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1578500886-21771-2-git-send-email-xiaochen.shen@intel.com commit a69976bc69308aa475d0ba3b8b3efd1d013c0460 Author: Anand Jain Date: Fri Jan 10 12:26:34 2020 +0800 btrfs: device stats, log when stats are zeroed We had a report indicating that some read errors aren't reported by the device stats in the userland. It is important to have the errors reported in the device stat as user land scripts might depend on it to take the reasonable corrective actions. But to debug these issue we need to be really sure that request to reset the device stat did not come from the userland itself. So log an info message when device error reset happens. For example: BTRFS info (device sdc): device stats zeroed by btrfs(9223) Reported-by: philip@philip-seeger.de Link: https://www.spinics.net/lists/linux-btrfs/msg96528.html Reviewed-by: Josef Bacik Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 556755a8a99be8ca3cd9fbe36aaf9b3b0339a00d Author: Josef Bacik Date: Fri Jan 3 10:38:44 2020 -0500 btrfs: fix improper setting of scanned for range cyclic write cache pages We noticed that we were having regular CG OOM kills in cases where there was still enough dirty pages to avoid OOM'ing. It turned out there's this corner case in btrfs's handling of range_cyclic where files that were being redirtied were not getting fully written out because of how we do range_cyclic writeback. We unconditionally were setting scanned = 1; the first time we found any pages in the inode. This isn't actually what we want, we want it to be set if we've scanned the entire file. For range_cyclic we could be starting in the middle or towards the end of the file, so we could write one page and then not write any of the other dirty pages in the file because we set scanned = 1. Fix this by not setting scanned = 1 if we find pages. The rules for setting scanned should be 1) !range_cyclic. In this case we have a specified range to write out. 2) range_cyclic && index == 0. In this case we've started at the beginning and there is no need to loop around a second time. 3) range_cyclic && we started at index > 0 and we've reached the end of the file without satisfying our nr_to_write. This patch fixes both of our writepages implementations to make sure these rules hold true. This fixed our over zealous CG OOMs in production. Fixes: d1310b2e0cd9 ("Btrfs: Split the extent_map code into two parts") Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add comment ] Signed-off-by: David Sterba commit 4babad10198fa73fe73239d02c2e99e3333f5f5c Author: David Sterba Date: Wed Jan 8 15:29:53 2020 +0100 btrfs: safely advance counter when looking up bio csums Dan's smatch tool reports fs/btrfs/file-item.c:295 btrfs_lookup_bio_sums() warn: should this be 'count == -1' which points to the while (count--) loop. With count == 0 the check itself could decrement it to -1. There's a WARN_ON a few lines below that has never been seen in practice though. It turns out that the value of page_bytes_left matches the count (by sectorsize multiples). The loop never reaches the state where count would go to -1, because page_bytes_left == 0 is found first and this breaks out. For clarity, use only plain check on count (and only for positive value), decrement safely inside the loop. Any other discrepancy after the whole bio list processing should be reported by the exising WARN_ON_ONCE as well. Reported-by: Dan Carpenter Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 94f8c46566485974c155c5cb4507f03873cf4d71 Author: David Sterba Date: Mon Jan 6 17:14:23 2020 +0100 btrfs: remove unused member btrfs_device::work This is a leftover from recently removed bio scheduling framework. Fixes: ba8a9d079543 ("Btrfs: delete the entire async bio submission framework") Reviewed-by: Anand Jain Signed-off-by: David Sterba commit ef0a82da81d689860a36cf058497dad2a5ae32c5 Author: Johannes Thumshirn Date: Thu Jan 2 17:14:57 2020 +0100 btrfs: remove unnecessary wrapper get_alloc_profile btrfs_get_alloc_profile() is a simple wrapper over get_alloc_profile(). The only difference is btrfs_get_alloc_profile() is visible to other functions in btrfs while get_alloc_profile() is static and thus only visible to functions in block-group.c. Let's just fold get_alloc_profile() into btrfs_get_alloc_profile() to get rid of the unnecessary second function. Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 81b29a3bf7cce4373526ff91a7a89aa6505597f7 Author: Dennis Zhou Date: Thu Jan 2 16:26:46 2020 -0500 btrfs: add correction to handle -1 edge case in async discard From Dave's testing described below, it's possible to drive a file system to have bogus values of discardable_extents and _bytes. As btrfs_discard_calc_delay() is the only user of discardable_extents, we can correct here for any negative discardable_extents/discardable_bytes. The problem is not reliably reproducible. The workload that created it was based on linux git tree, switching between release tags, then everytihng deleted followed by a full rebalance. At this state the values of discardable_bytes was 16K and discardable_extents was -1, expected values 0 and 0. Repeating the workload again did not correct the bogus values so the offset seems to be stable once it happens. Reported-by: David Sterba Signed-off-by: Dennis Zhou Signed-off-by: David Sterba commit 27f0afc7376bf6e1405ee3a0ef0ab85171059ae8 Author: Dennis Zhou Date: Thu Jan 2 16:26:45 2020 -0500 btrfs: ensure removal of discardable_* in free_bitmap() Most callers of free_bitmap() only call it if bitmap_info->bytes is 0. However, there are certain cases where we may free the free space cache via __btrfs_remove_free_space_cache(). This exposes a path where free_bitmap() is called regardless. This may result in a bad accounting situation for discardable_bytes and discardable_extents. So, remove the stats and call btrfs_discard_update_discardable(). Signed-off-by: Dennis Zhou Signed-off-by: David Sterba commit f9bb615af2ba8724bff82376275a14b02eef5eb2 Author: Dennis Zhou Date: Thu Jan 2 16:26:44 2020 -0500 btrfs: make smaller extents more likely to go into bitmaps It's less than ideal for small extents to eat into our extent budget, so force extents <= 32KB into the bitmaps save for the first handful. Reviewed-by: Josef Bacik Signed-off-by: Dennis Zhou Signed-off-by: David Sterba commit 5d90c5c75711d9734e9d3d38a6e3b849b7bea742 Author: Dennis Zhou Date: Thu Jan 2 16:26:43 2020 -0500 btrfs: increase the metadata allowance for the free_space_cache Currently, there is no way for the free space cache to recover from being serviced by purely bitmaps because the extent threshold is set to 0 in recalculate_thresholds() when we surpass the metadata allowance. This adds a recovery mechanism by keeping large extents out of the bitmaps and increases the metadata upper bound to 64KB. The recovery mechanism bypasses this upper bound, thus making it a soft upper bound. But, with the bypass being 1MB or greater, it shouldn't add unbounded overhead. Reviewed-by: Josef Bacik Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit dbc2a8c92756507e8183a4c23a02fa2a994eb640 Author: Dennis Zhou Date: Thu Jan 2 16:26:42 2020 -0500 btrfs: add async discard implementation overview Give a brief overview for how async discard is implemented. Reviewed-by: Josef Bacik Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9ddf648f9c2a492cef4e41e31c50515a817d0562 Author: Dennis Zhou Date: Thu Jan 2 16:26:41 2020 -0500 btrfs: keep track of discard reuse stats Keep track of how much we are discarding and how often we are reusing with async discard. The discard_*_bytes values don't need any special protection because the work item provides the single threaded access. Reviewed-by: Josef Bacik Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5cb0724e1b4653629c508906ca6098bae77d2f95 Author: Dennis Zhou Date: Thu Jan 2 16:26:40 2020 -0500 btrfs: only keep track of data extents for async discard As mentioned earlier, discarding data can be done either by issuing an explicit discard or implicitly by reusing the LBA. Metadata block_groups see much more frequent reuse due to well it being metadata. So instead of explicitly discarding metadata block_groups, just leave them be and let the latter implicit discarding be done for them. For mixed block_groups, block_groups which contain both metadata and data, we let them be as higher fragmentation is expected. Reviewed-by: Josef Bacik Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7fe6d45e4009d9502fef32ac6222862ac17f8674 Author: Dennis Zhou Date: Thu Jan 2 16:26:39 2020 -0500 btrfs: have multiple discard lists Non-block group destruction discarding currently only had a single list with no minimum discard length. This can lead to caravaning more meaningful discards behind a heavily fragmented block group. This adds support for multiple lists with minimum discard lengths to prevent the caravan effect. We promote block groups back up when we exceed the BTRFS_ASYNC_DISCARD_MAX_FILTER size, currently we support only 2 lists with filters of 1MB and 32KB respectively. Reviewed-by: Josef Bacik Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit 19b2a2c71979f849cadc33af3577f739cc95e1f0 Author: Dennis Zhou Date: Thu Jan 2 16:26:38 2020 -0500 btrfs: make max async discard size tunable Expose max_discard_size as a tunable via sysfs and switch the current fixed maximum to the default value. Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4aa9ad520398bf9cef70fc9c363567da44312045 Author: Dennis Zhou Date: Thu Jan 2 16:26:37 2020 -0500 btrfs: limit max discard size for async discard Throttle the maximum size of a discard so that we can provide an upper bound for the rate of async discard. While the block layer is able to split discards into the appropriate sized discards, we want to be able to account more accurately the rate at which we are consuming NCQ slots as well as limit the upper bound of work for a discard. Reviewed-by: Josef Bacik Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit e93591bb6ecf3e31c8f5366eac143f4f9c270915 Author: Dennis Zhou Date: Thu Jan 2 16:26:36 2020 -0500 btrfs: add kbps discard rate limit for async discard Provide the ability to rate limit based on kbps in addition to iops as additional guides for the target discard rate. The delay used ends up being max(kbps_delay, iops_delay). Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit a2309300841207de28307ecd2f0e031fccde37a3 Author: Dennis Zhou Date: Thu Jan 2 16:26:35 2020 -0500 btrfs: calculate discard delay based on number of extents An earlier patch keeps track of discardable_extents. These are undiscarded extents managed by the free space cache. Here, we will use this to dynamically calculate the discard delay interval. There are 3 rate to consider. The first is the target convergence rate, the rate to discard all discardable_extents over the BTRFS_DISCARD_TARGET_MSEC time frame. This is clamped by the lower limit, the iops limit or BTRFS_DISCARD_MIN_DELAY (1ms), and the upper limit, BTRFS_DISCARD_MAX_DELAY (1s). We reevaluate this delay every transaction commit. Reviewed-by: Josef Bacik Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5dc7c10b87474c98116d3438739743cd77263e9f Author: Dennis Zhou Date: Fri Dec 13 16:22:21 2019 -0800 btrfs: keep track of discardable_bytes for async discard Keep track of this metric so that we can understand how ahead or behind we are in discarding rate. This uses the same accounting method as discardable_extents, deltas between previous/current values and propagating them up. Signed-off-by: Dennis Zhou Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit dfb79ddb130e0a239e3e90aaf5f5b908555f52bb Author: Dennis Zhou Date: Fri Dec 13 16:22:20 2019 -0800 btrfs: track discardable extents for async discard The number of discardable extents will serve as the rate limiting metric for how often we should discard. This keeps track of discardable extents in the free space caches by maintaining deltas and propagating them to the global count. The deltas are calculated from 2 values stored in PREV and CURR entries, then propagated up to the global discard ctl. The current counter value becomes the previous counter value after update. Signed-off-by: Dennis Zhou Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit e4faab844a55edb9b628bf1f982fbc30f07b9700 Author: Dennis Zhou Date: Fri Dec 13 16:22:19 2019 -0800 btrfs: sysfs: add UUID/debug/discard directory Setup base sysfs directory for discard stats + tunables. Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit 93945cb43ead1e22e0d5ab50ae361a62cb783ab2 Author: Dennis Zhou Date: Fri Dec 13 16:22:18 2019 -0800 btrfs: sysfs: make UUID/debug have its own kobject Btrfs only allowed attributes to be exposed in debug/. Let's let other groups be created by making debug its own kobject. This also makes the per-fs debug options separate from the global features mount attributes. This seems to be needed as sysfs_create_files() requires const struct attribute * while sysfs_create_group() can take struct attribute *. This seems nicer as per file system, you'll probably use to_fs_info(). Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit 71e8978eb456958784539f02fa56087300f3a993 Author: Dennis Zhou Date: Fri Dec 13 16:22:17 2019 -0800 btrfs: sysfs: add removal calls for debug/ We probably should call sysfs_remove_group() on debug/. Reviewed-by: Josef Bacik Reviewed-by: Anand Jain Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2bee7eb8bb8185679ea282b8ccff6bfabcf52a63 Author: Dennis Zhou Date: Fri Dec 13 16:22:16 2019 -0800 btrfs: discard one region at a time in async discard The prior two patches added discarding via a background workqueue. This just piggybacked off of the fstrim code to trim the whole block at once. Well inevitably this is worse performance wise and will aggressively overtrim. But it was nice to plumb the other infrastructure to keep the patches easier to review. This adds the real goal of this series which is discarding slowly (ie. a slow long running fstrim). The discarding is split into two phases, extents and then bitmaps. The reason for this is two fold. First, the bitmap regions overlap the extent regions. Second, discarding the extents first will let the newly trimmed bitmaps have the highest chance of coalescing when being readded to the free space cache. Reviewed-by: Josef Bacik Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6e80d4f8c422d3b2b0c37324d3243f5ed9b558c8 Author: Dennis Zhou Date: Fri Dec 13 16:22:15 2019 -0800 btrfs: handle empty block_group removal for async discard block_group removal is a little tricky. It can race with the extent allocator, the cleaner thread, and balancing. The current path is for a block_group to be added to the unused_bgs list. Then, when the cleaner thread comes around, it starts a transaction and then proceeds with removing the block_group. Extents that are pinned are subsequently removed from the pinned trees and then eventually a discard is issued for the entire block_group. Async discard introduces another player into the game, the discard workqueue. While it has none of the racing issues, the new problem is ensuring we don't leave free space untrimmed prior to forgetting the block_group. This is handled by placing fully free block_groups on a separate discard queue. This is necessary to maintain discarding order as in the future we will slowly trim even fully free block_groups. The ordering helps us make progress on the same block_group rather than say the last fully freed block_group or needing to search through the fully freed block groups at the beginning of a list and insert after. The new order of events is a fully freed block group gets placed on the unused discard queue first. Once it's processed, it will be placed on the unusued_bgs list and then the original sequence of events will happen, just without the final whole block_group discard. The mount flags can change when processing unused_bgs, so when flipping from DISCARD to DISCARD_ASYNC, the unused_bgs must be punted to the discard_list to be trimmed. If we flip off DISCARD_ASYNC, we punt free block groups on the discard_list to the unused_bg queue which will do the final discard for us. Reviewed-by: Josef Bacik Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit b0643e59cfa609c4b5f246f2b2c33b078f87e9d9 Author: Dennis Zhou Date: Fri Dec 13 16:22:14 2019 -0800 btrfs: add the beginning of async discard, discard workqueue When discard is enabled, everytime a pinned extent is released back to the block_group's free space cache, a discard is issued for the extent. This is an overeager approach when it comes to discarding and helping the SSD maintain enough free space to prevent severe garbage collection situations. This adds the beginning of async discard. Instead of issuing a discard prior to returning it to the free space, it is just marked as untrimmed. The block_group is then added to a LRU which then feeds into a workqueue to issue discards at a much slower rate. Full discarding of unused block groups is still done and will be addressed in a future patch of the series. For now, we don't persist the discard state of extents and bitmaps. Therefore, our failure recovery mode will be to consider extents untrimmed. This lets us handle failure and unmounting as one in the same. On a number of Facebook webservers, I collected data every minute accounting the time we spent in btrfs_finish_extent_commit() (col. 1) and in btrfs_commit_transaction() (col. 2). btrfs_finish_extent_commit() is where we discard extents synchronously before returning them to the free space cache. discard=sync: p99 total per minute p99 total per minute Drive | extent_commit() (ms) | commit_trans() (ms) --------------------------------------------------------------- Drive A | 434 | 1170 Drive B | 880 | 2330 Drive C | 2943 | 3920 Drive D | 4763 | 5701 discard=async: p99 total per minute p99 total per minute Drive | extent_commit() (ms) | commit_trans() (ms) -------------------------------------------------------------- Drive A | 134 | 956 Drive B | 64 | 1972 Drive C | 59 | 1032 Drive D | 62 | 1200 While it's not great that the stats are cumulative over 1m, all of these servers are running the same workload and and the delta between the two are substantial. We are spending significantly less time in btrfs_finish_extent_commit() which is responsible for discarding. Reviewed-by: Josef Bacik Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit da080fe1bad4777b02f6a3db42823a8797aadbca Author: Dennis Zhou Date: Fri Dec 13 16:22:13 2019 -0800 btrfs: keep track of free space bitmap trim status cleanliness There is a cap in btrfs in the amount of free extents that a block group can have. When it surpasses that threshold, future extents are placed into bitmaps. Instead of keeping track of if a certain bit is trimmed or not in a second bitmap, keep track of the relative state of the bitmap. With async discard, trimming bitmaps becomes a more frequent operation. As a trade off with simplicity, we keep track of if discarding a bitmap is in progress. If we fully scan a bitmap and trim as necessary, the bitmap is marked clean. This has some caveats as the min block size may skip over regions deemed too small. But this should be a reasonable trade off rather than keeping a second bitmap and making allocation paths more complex. The downside is we may overtrim, but ideally the min block size should prevent us from doing that too often and getting stuck trimming pathological cases. BTRFS_TRIM_STATE_TRIMMING is added to indicate a bitmap is in the process of being trimmed. If additional free space is added to that bitmap, the bit is cleared. A bitmap will be marked BTRFS_TRIM_STATE_TRIMMED if the trimming code was able to reach the end of it and the former is still set. Reviewed-by: Josef Bacik Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit a7ccb255852413dd59263e551fd0ef13f76fc9b9 Author: Dennis Zhou Date: Fri Dec 13 16:22:12 2019 -0800 btrfs: keep track of which extents have been discarded Async discard will use the free space cache as backing knowledge for which extents to discard. This patch plumbs knowledge about which extents need to be discarded into the free space cache from unpin_extent_range(). An untrimmed extent can merge with everything as this is a new region. Absorbing trimmed extents is a tradeoff to for greater coalescing which makes life better for find_free_extent(). Additionally, it seems the size of a trim isn't as problematic as the trim io itself. When reading in the free space cache from disk, if sync is set, mark all extents as trimmed. The current code ensures at transaction commit that all free space is trimmed when sync is set, so this reflects that. Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit 46b27f5059e6ce7a7e3805d53144b37897723e3b Author: Dennis Zhou Date: Fri Dec 13 16:22:11 2019 -0800 btrfs: rename DISCARD mount option to to DISCARD_SYNC This series introduces async discard which will use the flag DISCARD_ASYNC, so rename the original flag to DISCARD_SYNC as it is synchronously done in transaction commit. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit e837dfde15a49c97dcbb059757d96c71e9e7bd54 Author: Dennis Zhou Date: Fri Dec 13 16:22:10 2019 -0800 bitmap: genericize percpu bitmap region iterators Bitmaps are fairly popular for their space efficiency, but we don't have generic iterators available. Make percpu's bitmap region iterators available to everyone. Reviewed-by: Josef Bacik Signed-off-by: Dennis Zhou Reviewed-by: David Sterba Signed-off-by: David Sterba commit 147a097cf035ef7225542605f4a61d9fab70dc84 Author: Qu Wenruo Date: Mon Dec 9 18:54:35 2019 +0800 btrfs: tree-checker: Verify location key for DIR_ITEM/DIR_INDEX [PROBLEM] There is a user report in the mail list, showing the following corrupted tree blocks: item 62 key (486836 DIR_ITEM 2543451757) itemoff 6273 itemsize 74 location key (4065004 INODE_ITEM 1073741824) type FILE transid 21397 data_len 0 name_len 44 name: FILENAME Note that location key, its offset should be 0 for all INODE_ITEMS. This caused failed lookup of the inode. [CAUSE] That offending value, 1073741824, is 0x40000000. So this looks like a memory bit flip. [FIX] This patch will enhance tree-checker to check location key of DIR_INDEX/DIR_ITEM/XATTR_ITEM. There are several different combinations needs to check: - item_key.type == DIR_INDEX/DIR_ITEM * location_key.type == BTRFS_INODE_ITEM_KEY This location_key should follow the check in inode_item check. * location_key.type == BTRFS_ROOT_ITEM_KEY Despite the existing check, DIR_INDEX/DIR_ITEM can only points to subvolume trees. * All other keys are not allowed. - item_key.type == XATTR_ITEM location_key should be all 0. Reported-by: Mike Gilbert Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 57a0e67491914f6187b1847ee3b1a01a556b9238 Author: Qu Wenruo Date: Mon Dec 9 18:54:34 2019 +0800 btrfs: tree-checker: Refactor root key check into separate function ROOT_ITEM key check itself is not as simple as single line check, and will be reused for both ROOT_ITEM and DIR_ITEM/DIR_INDEX location key check, so refactor such check into check_root_key(). Also since we are here, fix a comment error about ROOT_ITEM offset, which is transid of snapshot creation, not some "older kernel behavior". Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit c23c77b097dc52d5c166720467a62058e4a3c058 Author: Qu Wenruo Date: Mon Dec 9 18:54:33 2019 +0800 btrfs: tree-checker: Refactor inode key check into seperate function Inode key check is not as easy as several lines, and it will be called in more than one location (INODE_ITEM check and DIR_ITEM/DIR_INDEX/XATTR_ITEM location key check). So here refactor such check into check_inode_key(). And add extra checks for XATTR_ITEM. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit c3053ebb0b8044d8360db0f6717f8fdcbde8c370 Author: Qu Wenruo Date: Mon Dec 9 18:54:32 2019 +0800 btrfs: tree-checker: Clean up fs_info parameter from error message wrapper The @fs_info parameter can be extracted from extent_buffer structure, and there are already some wrappers getting rid of the @fs_info parameter. Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit f6d2a5c263afca84646cf3300dc13061bedbd99e Author: Qu Wenruo Date: Tue Dec 17 18:58:20 2019 +0800 btrfs: tree-checker: Check leaf chunk item size Inspired by btrfs-progs github issue #208, where chunk item in chunk tree has invalid num_stripes (0). Although that can already be caught by current btrfs_check_chunk_valid(), that function doesn't really check item size as it needs to handle chunk item in super block sys_chunk_array(). This patch will add two extra checks for chunk items in chunk tree: - Basic chunk item size If the item is smaller than btrfs_chunk (which already contains one stripe), exit right now as reading num_stripes may even go beyond eb boundary. - Item size check against num_stripes If item size doesn't match with calculated chunk size, then either the item size or the num_stripes is corrupted. Error out anyway. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0ab575c5df5e4a7eb3a80c682de1165189d888e0 Author: zhengbin Date: Thu Dec 19 17:25:34 2019 +0800 btrfs: Remove unneeded semicolon Fixes coccicheck warning: fs/btrfs/print-tree.c:320:3-4: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: David Sterba commit 95690e58e1220e99e2a3ec9d5ebe7341fcc96745 Author: Omar Sandoval Date: Mon Dec 2 17:34:25 2019 -0800 btrfs: remove struct find_free_extent.ram_bytes This hasn't been used since it was first introduced in commit b4bd745d1230 ("btrfs: Introduce find_free_extent_ctl structure for later rework"). Passing that to btrfs_add_reserved_bytes in find_free_extent is not strictly necessary and using the local ram_bytes instead seems cleaner. Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit c8b04030c5ec006e161969d77c07fb03a8b67112 Author: Omar Sandoval Date: Mon Dec 2 17:34:24 2019 -0800 btrfs: simplify compressed/inline check in __extent_writepage_io() Commit 7087a9d8db88 ("btrfs: Remove extent_io_ops::writepage_end_io_hook") left this logic in a confusing state. Simplify it. Reviewed-by: Johannes Thumshirn Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit 39b07b5d7072f8e9fd8cc2f840d3749f86699bbb Author: Omar Sandoval Date: Mon Dec 2 17:34:23 2019 -0800 btrfs: drop create parameter to btrfs_get_extent() We only pass this as 1 from __extent_writepage_io(). The parameter basically means "pretend I didn't pass in a page". This is silly since we can simply not pass in the page. Get rid of the parameter from btrfs_get_extent(), and since it's used as a get_extent_t callback, remove it from get_extent_t and btree_get_extent(), neither of which need it. While we're here, let's document btrfs_get_extent(). Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit f95d713b540487901871f90512f01f2fb3e6dfaa Author: Omar Sandoval Date: Mon Dec 2 17:34:22 2019 -0800 btrfs: remove redundant i_size check in __extent_writepage_io() In __extent_writepage_io(), we check whether i_size <= page_offset(page). Note that if i_size < page_offset(page), then i_size >> PAGE_SHIFT < page->index. If i_size == page_offset(page), then i_size >> PAGE_SHIFT == page->index && offset_in_page(i_size) == 0. __extent_writepage() already has a check for these cases that returns without calling __extent_writepage_io(): end_index = i_size >> PAGE_SHIFT pg_offset = offset_in_page(i_size); if (page->index > end_index || (page->index == end_index && !pg_offset)) { page->mapping->a_ops->invalidatepage(page, 0, PAGE_SIZE); unlock_page(page); return 0; } Get rid of the one in __extent_writepage_io(), which was obsoleted in 211c17f51f46 ("Fix corners in writepage and btrfs_truncate_page"). Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit 169d2c875ec6461f6d18aaddbc1f30ba2b6b5a29 Author: Omar Sandoval Date: Mon Dec 2 17:34:21 2019 -0800 btrfs: remove trivial goto label in __extent_writepage() Since 40f765805f08 ("Btrfs: split up __extent_writepage to lower stack usage"), done_unlocked is simply a return 0. Get rid of it. Mid-statement block returns don seem to make the code less readable here. Reviewed-by: Johannes Thumshirn Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit eb70d2226347efe3b7de771f8034166c2740418d Author: Omar Sandoval Date: Mon Dec 2 17:34:20 2019 -0800 btrfs: remove unnecessary pg_offset assignments in __extent_writepage() We're initializing pg_offset to 0, setting it immediately, then reassigning it to 0 again after. The former became unnecessary in 211c17f51f46 ("Fix corners in writepage and btrfs_truncate_page"). The latter is a leftover that should've been removed in 40f765805f08 ("Btrfs: split up __extent_writepage to lower stack usage"). Remove both. Reviewed-by: Johannes Thumshirn Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit bffe633e00fb6b904817137fc17a44b42efcd985 Author: Omar Sandoval Date: Mon Dec 2 17:34:19 2019 -0800 btrfs: make btrfs_ordered_extent naming consistent with btrfs_file_extent_item ordered->start, ordered->len, and ordered->disk_len correspond to fi->disk_bytenr, fi->num_bytes, and fi->disk_num_bytes, respectively. It's confusing to translate between the two naming schemes. Since a btrfs_ordered_extent is basically a pending btrfs_file_extent_item, let's make the former use the naming from the latter. Note that I didn't touch the names in tracepoints just in case there are scripts depending on the current naming. Reviewed-by: Johannes Thumshirn Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: David Sterba commit 313facc5bd83c8090f28ab1ee71ff01b01d20524 Author: Omar Sandoval Date: Mon Dec 2 17:34:18 2019 -0800 btrfs: remove dead snapshot-aware defrag code Snapshot-aware defrag has been disabled since commit 8101c8dbf624 ("Btrfs: disable snapshot aware defrag for now") almost 6 years ago. Let's remove the dead code. If someone is up to the task of bringing it back, they can dig it up from git. This is logically a revert of commit 38c227d87c49 ("Btrfs: snapshot-aware defrag") except that now we have to clear the EXTENT_DEFRAG bit to avoid need_force_cow() returning true forever. The reasons to disable were caused by runtime problems (like long stalls or memory consumption) on heavily referenced extents (eg. thousands of snapshots). There were attempts to fix that but never finished. Current defrag breaks the extent references and some users prefer that behaviour over the one implemented by snapshot aware (ie. keeping links for defragmentation). To enable both usecases we'd need to extend defrag ioctl but let's do that properly from scratch. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Omar Sandoval Reviewed-by: David Sterba [ enhance ] Signed-off-by: David Sterba commit db72e47f79c5dbd95611edd453328d46c1eae93a Author: Omar Sandoval Date: Tue Dec 10 10:37:35 2019 -0800 btrfs: get rid of at_offset parameter to btrfs_lookup_bio_sums() We can encode this in the offset parameter: -1 means use the page offsets, anything else is a valid offset. Signed-off-by: Omar Sandoval Signed-off-by: David Sterba commit e62958fce94b30ef6aab99bb1bc49fde7fac73ea Author: Omar Sandoval Date: Mon Dec 2 17:34:17 2019 -0800 btrfs: get rid of trivial __btrfs_lookup_bio_sums() wrappers Currently, we have two wrappers for __btrfs_lookup_bio_sums(): btrfs_lookup_bio_sums_dio(), which is used for direct I/O, and btrfs_lookup_bio_sums(), which is used everywhere else. The only difference is that the _dio variant looks up csums starting at the given offset instead of using the page index, which isn't actually direct I/O-specific. Let's clean up the signature and return value of __btrfs_lookup_bio_sums(), rename it to btrfs_lookup_bio_sums(), and get rid of the trivial helpers. Reviewed-by: Nikolay Borisov Signed-off-by: Omar Sandoval Signed-off-by: David Sterba commit 321f69f86a0fc40203b43659c3a39464f15c2ee9 Author: Johannes Thumshirn Date: Wed Dec 4 14:36:39 2019 +0100 btrfs: reset device back to allocation state when removing When closing a device, btrfs_close_one_device() first allocates a new device, copies the device to close's name, replaces it in the dev_list with the copy and then finally frees it. This involves two memory allocation, which can potentially fail. As this code path is tricky to unwind, the allocation failures where handled by BUG_ON()s. But this copying isn't strictly needed, all that is needed is resetting the device in question to it's state it had after the allocation. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3fff3975a7155c49b85736786c6bcb1dd9dcec18 Author: Johannes Thumshirn Date: Tue Nov 26 09:40:05 2019 +0100 btrfs: decrement number of open devices after closing the device not before In btrfs_close_one_device we're decrementing the number of open devices before we're calling btrfs_close_bdev(). As there is no intermediate exit between these points in this function it is technically OK to do so, but it makes the code a bit harder to understand. Move both operations closer together and move the decrement step after btrfs_close_bdev(). Reviewed-by: Qu Wenruo Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6bb6b51447ca114980c2debab8241ae21f8557c7 Author: Omar Sandoval Date: Thu Dec 5 10:36:04 2019 -0800 btrfs: use simple_dir_inode_operations for placeholder subvolume directory When you snapshot a subvolume containing a subvolume, you get a placeholder directory where the subvolume would be. These directories have their own btrfs_dir_ro_inode_operations. Al pointed out [1] that these directories can use simple_lookup() instead of btrfs_lookup(), as they are always empty. Furthermore, they can use the default generic_permission() instead of btrfs_permission(); the additional checks in the latter don't matter because we can't write to the directory anyways. Finally, they can use the default generic_update_time() instead of btrfs_update_time(), as the inode doesn't exist on disk and doesn't need any special handling. All together, this means that we can get rid of btrfs_dir_ro_inode_operations and use simple_dir_inode_operations instead. 1: https://lore.kernel.org/linux-btrfs/20190929052934.GY26530@ZenIV.linux.org.uk/ Cc: Al Viro Reviewed-by: Josef Bacik Signed-off-by: Omar Sandoval Reviewed-by: David Sterba [ add comment ] Signed-off-by: David Sterba commit b38f4cbd65fb56180f8d283f410ddec3965c93bf Author: Johannes Thumshirn Date: Thu Dec 5 14:19:59 2019 +0100 btrfs: remove impossible WARN_ON in btrfs_destroy_dev_replace_tgtdev() We have a user report, that cppcheck is complaining about a possible NULL-pointer dereference in btrfs_destroy_dev_replace_tgtdev(). We're first dereferencing the 'tgtdev' variable and the later check for the validity of the pointer with a WARN_ON(!tgtdev); But all callers of btrfs_destroy_dev_replace_tgtdev() either explicitly check if 'tgtdev' is non-NULL or directly allocate 'tgtdev', so the WARN_ON() is impossible to hit. Just remove it to silence the checker's complains. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=205003 Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 129699522581f465e0300a286ed28a0aab0893d3 Author: Johannes Thumshirn Date: Thu Dec 5 14:19:58 2019 +0100 btrfs: remove superfluous BUG_ON() in integrity checks btrfsic_process_superblock() BUG_ON()s if 'state' is NULL. But this can never happen as the only caller from btrfsic_process_superblock() is btrfsic_mount() which allocates 'state' some lines above calling btrfsic_process_superblock() and checks for the allocation to succeed. Let's just remove the impossible to hit BUG_ON(). Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3dbd351df42109902fbcebf27104149226a4fcd9 Author: Johannes Thumshirn Date: Thu Dec 5 14:19:57 2019 +0100 btrfs: fix possible NULL-pointer dereference in integrity checks A user reports a possible NULL-pointer dereference in btrfsic_process_superblock(). We are assigning state->fs_info to a local fs_info variable and afterwards checking for the presence of state. While we would BUG_ON() a NULL state anyways, we can also just remove the local fs_info copy, as fs_info is only used once as the first argument for btrfs_num_copies(). There we can just pass in state->fs_info as well. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=205003 Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit f8935566372c579cf9076d344a76e7781365c6e3 Author: Josef Bacik Date: Tue Nov 26 11:25:54 2019 -0500 btrfs: kill min_allocable_bytes in inc_block_group_ro This is a relic from a time before we had a proper reservation mechanism and you could end up with really full chunks at chunk allocation time. This doesn't make sense anymore, so just kill it. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9f246926b4d5db4c5e8c78e4897757de26c95be6 Author: Josef Bacik Date: Tue Nov 26 11:25:53 2019 -0500 btrfs: don't pass system_chunk into can_overcommit We have the space_info, we can just check its flags to see if it's the system chunk space info. Reviewed-by: Nikolay Borisov Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 511a32b5493f0d0d89b1a07bdbb82ac777993575 Author: Nikolay Borisov Date: Fri Nov 29 11:38:13 2019 +0200 btrfs: Opencode ordered_data_tree_panic It's a simple wrapper over btrfs_panic and is called only once. Just open code it. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 430640e31649beeb84e2c66f77ab68d7423b66bd Author: Qu Wenruo Date: Fri Nov 29 12:40:59 2019 +0800 btrfs: relocation: Output current relocation stage at btrfs_relocate_block_group() There are two relocation stages but both print the same message. Add the description of the stage. This can help debugging or provides informative message to users. BTRFS info (device dm-5): balance: start -d -m -s BTRFS info (device dm-5): relocating block group 30408704 flags metadata|dup BTRFS info (device dm-5): found 2 extents, stage: move data extents BTRFS info (device dm-5): relocating block group 22020096 flags system|dup BTRFS info (device dm-5): found 1 extents, stage: move data extents BTRFS info (device dm-5): relocating block group 13631488 flags data BTRFS info (device dm-5): found 1 extents, stage: move data extents BTRFS info (device dm-5): found 1 extents, stage: update data pointers BTRFS info (device dm-5): balance: ended with status: 0 Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 76de60ed044f26f0ab62c2f752cb3d0eade2cde0 Author: Yunfeng Ye Date: Tue Dec 3 16:59:25 2019 +0800 btrfs: remove unused condition check in btrfs_page_mkwrite() The condition '!ret2' is always true. commit 717beb96d969 ("Btrfs: fix regression in btrfs_page_mkwrite() from vm_fault_t conversion") left behind the check after moving this code out of the goto, so remove the unused condition check. Reviewed-by: Omar Sandoval Signed-off-by: Yunfeng Ye Reviewed-by: David Sterba Signed-off-by: David Sterba commit 36ee0b44ad238c7797e1f7cbefdf75c6cf887101 Author: Nikolay Borisov Date: Mon Dec 2 11:40:14 2019 +0200 btrfs: Remove redundant WARN_ON in walk_down_log_tree level <0 and level >= BTRFS_MAX_LEVEL are already performed upon extent buffer read by tree checker in btrfs_check_node. go. As far as 'level <= 0' we are guaranteed that level is '> 0' because the value of level _before_ reading 'next' is larger than 1 (otherwise we wouldn't have executed that code at all) this in turn guarantees that 'level' after btrfs_read_buffer is 'level - 1' since we verify this invariant in: btrfs_read_buffer btree_read_extent_buffer_pages btrfs_verify_level_key This guarantees that level can never be '<= 0' so the warn on is never triggered. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5c4b691eb8958dfdba9bb77d5ac4897bbaeb9064 Author: Nikolay Borisov Date: Mon Dec 2 11:40:13 2019 +0200 btrfs: Remove WARN_ON in walk_log_tree The log_root passed to walk_log_tree is guaranteed to have its root_key.objectid always be BTRFS_TREE_LOG_OBJECTID. This is by merit that all log roots of an ordinary root are allocated in alloc_log_tree which hard-codes objectid to be BTRFS_TREE_LOG_OBJECTID. In case walk_log_tree is called for a log tree found by btrfs_read_fs_root in btrfs_recover_log_trees, that function already ensures found_key.objectid is BTRFS_TREE_LOG_OBJECTID. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit a0fbf736d35efcddbfaacddd88aa4ca61c1668c3 Author: Nikolay Borisov Date: Thu Nov 21 14:03:31 2019 +0200 btrfs: Rename __btrfs_free_reserved_extent to btrfs_pin_reserved_extent __btrfs_free_reserved_extent now performs the actions of btrfs_free_and_pin_reserved_extent. But this name is a bit of a misnomer, since the extent is not really freed but just pinned. Reflect this in the new name. No semantics changes. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit 7ef54d54bf6aacb5faeb5a7f3db18b7828498099 Author: Nikolay Borisov Date: Thu Nov 21 14:03:30 2019 +0200 btrfs: Open code __btrfs_free_reserved_extent in btrfs_free_reserved_extent __btrfs_free_reserved_extent performs 2 entirely different operations depending on whether its 'pin' argument is true or false. This patch lifts the 2nd case (pin is false) into it's sole caller btrfs_free_reserved_extent. No semantics changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4eaaec24c087a52c6b2ed75856037ae42cc6a830 Author: Nikolay Borisov Date: Thu Nov 21 14:03:29 2019 +0200 btrfs: Don't discard unwritten extents All callers of btrfs_free_reserved_extent (respectively __btrfs_free_reserved_extent with in set to 0) pass in extents which have only been reserved but not yet written to. Namely, * in cow_file_range that function is called only if create_io_em fails or btrfs_add_ordered_extent fail, both of which happen _before_ any IO is submitted to the newly reserved range * in submit_compressed_extents the code flow is similar - out_free_reserve can be called only before btrfs_submit_compressed_write which is where any writes to the range could occur * btrfs_new_extent_direct also calls btrfs_free_reserved_extent only if extent_map fails, before any IO is issued * __btrfs_prealloc_file_range also calls btrfs_free_reserved_extent in case insertion of the metadata fails * btrfs_alloc_tree_block again can only be called in case in-memory operations fail, before any IO is submitted * btrfs_finish_ordered_io - this is the only caller where discarding the extent could have a material effect, since it can be called for an extent which was partially written. With this change the submission of discards is optimised since discards are now not being created for extents which are known to not have been touched on disk. Reviewed-by: Filipe Manana Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit 8a36e408d40606e21cd4e2dd9601004a67b14868 Author: Marcos Paulo de Souza Date: Mon Nov 25 21:58:51 2019 -0300 btrfs: qgroup: return ENOTCONN instead of EINVAL when quotas are not enabled [PROBLEM] qgroup create/remove code is currently returning EINVAL when the user tries to create a qgroup on a subvolume without quota enabled. EINVAL is already being used for too many error scenarios so that is hard to depict what is the problem. [FIX] Currently scrub and balance code return -ENOTCONN when the user tries to cancel/pause and no scrub or balance is currently running for the desired subvolume. Do the same here by returning -ENOTCONN when a user tries to create/delete/assing/list a qgroup on a subvolume without quota enabled. Reviewed-by: Qu Wenruo Signed-off-by: Marcos Paulo de Souza Reviewed-by: David Sterba Signed-off-by: David Sterba commit e3b0edd29737d44137fc7583a9c185abda6e23b8 Author: Marcos Paulo de Souza Date: Mon Nov 25 21:58:50 2019 -0300 btrfs: qgroup: remove one-time use variables for quota_root checks Remove some variables that are set only to be checked later, and never used. Reviewed-by: Qu Wenruo Signed-off-by: Marcos Paulo de Souza Reviewed-by: David Sterba Signed-off-by: David Sterba commit bc036bb33524dcb2525d74c336e9694d5d3c0047 Author: Anand Jain Date: Thu Nov 21 17:33:34 2019 +0800 btrfs: sysfs, merge btrfs_sysfs_add devices_kobj and fsid Merge btrfs_sysfs_add_fsid() and btrfs_sysfs_add_devices_kobj() functions as these two are small and they are called one after the other. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit be2cf92e0a2f64efe0709a2cfe5d9f4852d14b61 Author: Anand Jain Date: Thu Nov 21 17:33:33 2019 +0800 btrfs: sysfs, rename btrfs_sysfs_add_device() btrfs_sysfs_add_device() creates the directory /sys/fs/btrfs/UUID/devices but its function name is misleading. Rename it to btrfs_sysfs_add_devices_kobj() instead. No functional changes. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit c6761a9ed329dd41fee09dc2926126768e5ca34c Author: Anand Jain Date: Thu Nov 21 17:33:32 2019 +0800 btrfs: sysfs, btrfs_sysfs_add_fsid() drop unused argument parent Commit 24bd69cb ("Btrfs: sysfs: add support to add parent for fsid") added parent argument in preparation to show the seed fsid under the sprout fsid as in the patch [1] in the mailing list. [1] Btrfs: sysfs: support seed devices in the sysfs layout But later this idea was superseded by another idea to rename the fsid as in the commit f93c39970b1d ("btrfs: factor out sysfs code for updating sprout fsid"). So we don't need parent argument anymore. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit b5501504cb6a70d55c3dcf1b2ceb15386e615237 Author: Anand Jain Date: Thu Nov 21 17:33:30 2019 +0800 btrfs: sysfs, rename devices kobject holder to devices_kobj The struct member btrfs_device::device_dir_kobj holds the kobj of the sysfs directory /sys/fs/btrfs/UUID/devices, so rename it from device_dir_kobj to devices_kobj. No functional changes. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit db26a024497c004fa1bdf26263d90de2bfb0edba Author: David Sterba Date: Mon Nov 25 15:34:48 2019 +0100 btrfs: fill ncopies for all raid table entries Make the number of copies explicit even for entries that use the default 0 value for consistency. Signed-off-by: David Sterba commit e4f6c6be814850249a745ea43d5c49800e7178d4 Author: David Sterba Date: Tue May 14 01:59:54 2019 +0200 btrfs: use raid_attr table in calc_stripe_length for nparity The table is already used for ncopies, replace open coding of stripes with the raid_attr value. Signed-off-by: David Sterba commit 0e56315ca147b3e60c7bf240233a301d3c7fb508 Author: Filipe Manana Date: Tue Nov 19 12:07:33 2019 +0000 Btrfs: fix missing hole after hole punching and fsync when using NO_HOLES When using the NO_HOLES feature, if we punch a hole into a file and then fsync it, there are cases where a subsequent fsync will miss the fact that a hole was punched, resulting in the holes not existing after replaying the log tree. Essentially these cases all imply that, tree-log.c:copy_items(), is not invoked for the leafs that delimit holes, because nothing changed those leafs in the current transaction. And it's precisely copy_items() where we currenly detect and log holes, which works as long as the holes are between file extent items in the input leaf or between the beginning of input leaf and the previous leaf or between the last item in the leaf and the next leaf. First example where we miss a hole: *) The extent items of the inode span multiple leafs; *) The punched hole covers a range that affects only the extent items of the first leaf; *) The fsync operation is done in full mode (BTRFS_INODE_NEEDS_FULL_SYNC is set in the inode's runtime flags). That results in the hole not existing after replaying the log tree. For example, if the fs/subvolume tree has the following layout for a particular inode: Leaf N, generation 10: [ ... INODE_ITEM INODE_REF EXTENT_ITEM (0 64K) EXTENT_ITEM (64K 128K) ] Leaf N + 1, generation 10: [ EXTENT_ITEM (128K 64K) ... ] If at transaction 11 we punch a hole coverting the range [0, 128K[, we end up dropping the two extent items from leaf N, but we don't touch the other leaf, so we end up in the following state: Leaf N, generation 11: [ ... INODE_ITEM INODE_REF ] Leaf N + 1, generation 10: [ EXTENT_ITEM (128K 64K) ... ] A full fsync after punching the hole will only process leaf N because it was modified in the current transaction, but not leaf N + 1, since it was not modified in the current transaction (generation 10 and not 11). As a result the fsync will not log any holes, because it didn't process any leaf with extent items. Second example where we will miss a hole: *) An inode as its items spanning 5 (or more) leafs; *) A hole is punched and it covers only the extents items of the 3rd leaf. This resulsts in deleting the entire leaf and not touching any of the other leafs. So the only leaf that is modified in the current transaction, when punching the hole, is the first leaf, which contains the inode item. During the full fsync, the only leaf that is passed to copy_items() is that first leaf, and that's not enough for the hole detection code in copy_items() to determine there's a hole between the last file extent item in the 2nd leaf and the first file extent item in the 3rd leaf (which was the 4th leaf before punching the hole). Fix this by scanning all leafs and punch holes as necessary when doing a full fsync (less common than a non-full fsync) when the NO_HOLES feature is enabled. The lack of explicit file extent items to mark holes makes it necessary to scan existing extents to determine if holes exist. A test case for fstests follows soon. Fixes: 16e7549f045d33 ("Btrfs: incompatible format change to remove hole extents") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 283bab9809786cf41798512f5c1e97f4b679ba96 Author: Tony W Wang-oc Date: Wed Jan 15 16:00:57 2020 +0800 x86/cpu: Remove redundant cpu_detect_cache_sizes() call Both functions call init_intel_cacheinfo() which computes L2 and L3 cache sizes from CPUID(4). But then they also call cpu_detect_cache_sizes() a bit later which computes ->x86_tlbsize and L2 size from CPUID(80000006). However, the latter call is not needed because - on these CPUs, CPUID(80000006).EBX for ->x86_tlbsize is reserved - CPUID(80000006).ECX for the L2 size has the same result as CPUID(4) Therefore, remove the latter call to simplify the code. [ bp: Rewrite commit message. ] Signed-off-by: Tony W Wang-oc Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/1579075257-6985-1-git-send-email-TonyWWang-oc@zhaoxin.com commit e79f15a4598c1f3f3f7f3319ca308c63c91fdaf2 Author: Chen Yu Date: Wed Jan 15 17:28:51 2020 +0800 x86/resctrl: Add task resctrl information display Monitoring tools that want to find out which resctrl control and monitor groups a task belongs to must currently read the "tasks" file in every group until they locate the process ID. Add an additional file /proc/{pid}/cpu_resctrl_groups to provide this information: 1) res: mon: resctrl is not available. 2) res:/ mon: Task is part of the root resctrl control group, and it is not associated to any monitor group. 3) res:/ mon:mon0 Task is part of the root resctrl control group and monitor group mon0. 4) res:group0 mon: Task is part of resctrl control group group0, and it is not associated to any monitor group. 5) res:group0 mon:mon1 Task is part of resctrl control group group0 and monitor group mon1. Signed-off-by: Chen Yu Signed-off-by: Borislav Petkov Tested-by: Jinshi Chen Link: https://lkml.kernel.org/r/20200115092851.14761-1-yu.c.chen@intel.com commit 9871abffc81048e20f02e15d6aa4558a44ad53ea Author: yu kuai Date: Mon Jan 20 19:51:43 2020 +0800 pwm: Remove set but not set variable 'pwm' Fixes gcc '-Wunused-but-set-variable' warning: drivers/pwm/pwm-pca9685.c: In function ‘pca9685_pwm_gpio_free’: drivers/pwm/pwm-pca9685.c:162:21: warning: variable ‘pwm’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. In that case, hold and release the lock 'pca->lock' can be removed since nothing will be done between them. Fixes: e926b12c611c ("pwm: Clear chip_data in pwm_put()") Signed-off-by: yu kuai Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 413c2a110d649a3a313ee91920e3d9373b9f2045 Author: Thierry Reding Date: Mon Jan 20 15:22:37 2020 +0100 pwm: sun4i: Initialize variables before use GCC can't always determine that the duty, period and prescaler values are initialized when returning from sun4i_pwm_calculate(), so help out a little by initializing them to 0. Signed-off-by: Thierry Reding commit 356557be8670ffdb6dc01cc2702e3614bcf64310 Author: Jan Kara Date: Fri Jan 17 12:36:38 2020 +0100 udf: Clarify meaning of f_files in udf_statfs UDF does not have separate preallocated table of inodes. So similarly to XFS we pretend that every free block is also a free inode in statfs(2) output. Clarify this in a comment. Signed-off-by: Jan Kara commit 15fb05fd286ac57a0802d71624daeb5c1c2d5b07 Author: Jan Kara Date: Fri Jan 17 12:11:14 2020 +0100 udf: Allow writing to 'Rewritable' partitions UDF 2.60 standard states in section 2.2.14.2: A partition with Access Type 3 (rewritable) shall define a Freed Space Bitmap or a Freed Space Table, see 2.3.3. All other partitions shall not define a Freed Space Bitmap or a Freed Space Table. Rewritable partitions are used on media that require some form of preprocessing before re-writing data (for example legacy MO). Such partitions shall use Access Type 3. Overwritable partitions are used on media that do not require preprocessing before overwriting data (for example: CD-RW, DVD-RW, DVD+RW, DVD-RAM, BD-RE, HD DVD-Rewritable). Such partitions shall use Access Type 4. however older versions of the standard didn't have this wording and there are tools out there that create UDF filesystems with rewritable partitions but that don't contain a Freed Space Bitmap or a Freed Space Table on media that does not require pre-processing before overwriting a block. So instead of forcing media with rewritable partition read-only, base this decision on presence of a Freed Space Bitmap or a Freed Space Table. Reported-by: Pali Rohár Reviewed-by: Pali Rohár Fixes: b085fbe2ef7f ("udf: Fix crash during mount") Link: https://lore.kernel.org/linux-fsdevel/20200112144735.hj2emsoy4uwsouxz@pali Signed-off-by: Jan Kara commit 0c73201c5c094256236b129799ab6761b491d8cd Author: Fabrice Gasnier Date: Thu Nov 21 11:58:00 2019 +0100 pwm: stm32: Remove automatic output enable Don't use AOE (automatic output enable) by default. In case of break events, PWM is automatically re-enabled on next PWM cycle otherwise. Signed-off-by: Fabrice Gasnier Signed-off-by: Thierry Reding commit 98aa00345de54b8340dc2ddcd87f446d33387b5e Author: Stephen Smalley Date: Fri Jan 17 15:24:07 2020 -0500 selinux: fix regression introduced by move_mount(2) syscall commit 2db154b3ea8e ("vfs: syscall: Add move_mount(2) to move mounts around") introduced a new move_mount(2) system call and a corresponding new LSM security_move_mount hook but did not implement this hook for any existing LSM. This creates a regression for SELinux with respect to consistent checking of mounts; the existing selinux_mount hook checks mounton permission to the mount point path. Provide a SELinux hook implementation for move_mount that applies this same check for consistency. In the future we may wish to add a new move_mount filesystem permission and check as well, but this addresses the immediate regression. Fixes: 2db154b3ea8e ("vfs: syscall: Add move_mount(2) to move mounts around") Signed-off-by: Stephen Smalley Reviewed-by: Ondrej Mosnacek Signed-off-by: Paul Moore commit ce1f31b4c0b9551dd51874dd5364654ed4ca13ae Author: Dan Carpenter Date: Tue Jan 7 16:06:07 2020 +0300 ide: serverworks: potential overflow in svwks_set_pio_mode() The "drive->dn" variable is a u8 controlled by root. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 117fcc3053606d8db5cef8821dca15022ae578bb Author: Dan Carpenter Date: Tue Jan 7 16:04:41 2020 +0300 cmd64x: potential buffer overflow in cmd64x_program_timings() The "drive->dn" value is a u8 and it is controlled by root only, but it could be out of bounds here so let's check. Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 0fdeae5036086aa214a45e598c079a3334bc15c3 Author: Masahiro Yamada Date: Sun Jan 5 01:40:11 2020 +0900 ide: remove unneeded header include path to drivers/ide I can build drivers/ide/ without this. Signed-off-by: Masahiro Yamada Signed-off-by: David S. Miller commit 5b10c23e180950c71703e02efbf998ed25bdc682 Author: Krzysztof Kozlowski Date: Sat Jan 4 15:33:48 2020 +0100 ide: qd65xx: Fix cast to pointer from integer of different size Integer passed as pointer to drvdata should be cast to unsigned long to avoid warning (compile testing on alpha architecture): drivers/ide/qd65xx.c: In function ‘qd6580_init_dev’: drivers/ide/qd65xx.c:312:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 1011b6908a74755b2385d4cc569e9d061532ad53 Author: Krzysztof Kozlowski Date: Sat Jan 4 15:33:47 2020 +0100 ide: ht6560b: Fix cast to pointer from integer of different size Integer passed as pointer to drvdata should be cast to unsigned long to avoid warning (compile testing on alpha architecture): drivers/ide/ht6560b.c: In function ‘ht6560b_init_dev’: drivers/ide/ht6560b.c:318:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 98949a1946d70771789def0c9dbc239497f9f138 Author: Wang Hai Date: Sat Oct 26 09:57:38 2019 +0800 ide: remove set but not used variable 'hwif' Fix the following gcc warning: drivers/ide/pmac.c: In function pmac_ide_setup_device: drivers/ide/pmac.c:1027:14: warning: variable hwif set but not used [-Wunused-but-set-variable] Fixes: d58b0c39e32f ("powerpc/macio: Rework hotplug media bay support") Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 77df3500a75d946b3f60112a5207900e29e13b68 Author: Guoqing Jiang Date: Thu Sep 26 15:13:44 2019 +0200 ide: remove unnecessary touch_softlockup_watchdog Call touch_softlockup_watchdog before touch_nmi_watchdog is not needed, since touch_softlockup_watchdog is called inside touch_nmi_watchdog. Signed-off-by: Guoqing Jiang Signed-off-by: David S. Miller commit 044b1a933108bc1122fda85c711ed5a93bc5ecd5 Author: Christophe JAILLET Date: Thu Jul 25 00:01:45 2019 +0200 ide: tx4939ide: Fix the name used in a 'devm_request_mem_region()' call This should be "tx4939ide" instead of "tx4938ide", but here MODNAME is even better. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 17e10a15a796247549302f40ffb1160c916a9e46 Merge: 794eee259e8e 3a3e627ce0ac Author: David S. Miller Date: Mon Jan 20 13:25:47 2020 +0100 Merge branch 'mlxsw-SPAN-egress-mirroring-buffer-size' Ido Schimmel says: ==================== mlxsw: Adjust SPAN egress mirroring buffer size handling for Spectrum-2 Jiri says: For Spectrum-2 the computation of SPAN egress mirroring buffer uses a different formula. On top of MTU it needs also current port speed. Fix the computation and also trigger the buffer size set according to PUDE event, which happens when port speed changes. ==================== Signed-off-by: David S. Miller commit 3a3e627ce0ac0fe15e0a011540a1f7c96bf8a07b Author: Jiri Pirko Date: Mon Jan 20 09:52:53 2020 +0200 spectrum: Add a delayed work to update SPAN buffsize according to speed When PUDE event is handled and the link is up, update the port SPAN buffer size according to the current speed. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ff9fdfec5f96e9e70469775da498226a1aaa8a68 Author: Jiri Pirko Date: Mon Jan 20 09:52:52 2020 +0200 mlxsw: spectrum: Fix SPAN egress mirroring buffer size for Spectrum-2 For SPAN egress mirroring buffer size, it is needed to use a different formula for Spectrum and Spectrum-2. Move the buffer size computation to ops and implement new formula for Spectrum-2. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 31c25b949813292e2f85b0e8708b767e55aba093 Author: Jiri Pirko Date: Mon Jan 20 09:52:51 2020 +0200 mlxsw: spectrum_span: Put buffsize update code into helper function Avoid duplication of code that is doing buffsize update and put it into a separate helper function. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ac9cc4e25044b699eb8f0f4822ad58a2f5130abb Author: Jiri Pirko Date: Mon Jan 20 09:52:50 2020 +0200 mlxsw: spectrum: Push code getting port speed into a helper Currently PTP code queries directly PTYS register for port speed from work scheduled upon PUDE event. Since the speed needs to be used for SPAN buffer size computation as well, push the code into a separate helper. Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit f6003f948226c87b6ce0e5130a43f7b705fe0fd8 Author: Uwe Kleine-König Date: Tue Dec 10 11:24:44 2019 +0100 pwm: sun4i: Narrow scope of local variable The variable pval is only used in a single block in the function sun4i_pwm_calculate(). So declare it in a more local scope to simplify the function for humans and compilers. While at it also simplify assignment to pval. While the diffstat for this patch is negative for this patch I still thing the advantage of having a narrower scope is beneficial. In my compiler / .config setup (gcc 8.2.1, arm/imx_v6_v7_defconfig + COMPILE_TEST + PWM_SUN4I) this change doesn't result in any binary changes. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit fdf47ff69d61a4e77f5536ee44bd869334053cb6 Author: Florian Fainelli Date: Mon Dec 9 15:25:03 2019 -0800 pwm: bcm2835: Allow building for ARCH_BRCMSTB BCM7211 is supported using ARCH_BRCMSTB and uses this PWM controller driver, make it possible to build it. Signed-off-by: Florian Fainelli Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit a368c34340c2543592f7bcd8941b797091a9e74a Author: Anson Huang Date: Mon Dec 30 11:02:40 2019 +0800 pwm: imx27: Eliminate error message for defer probe For defer probe error, no need to output error message which will cause confusion. Signed-off-by: Anson Huang Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit cba8d3bfdc967561b1c953f67d2053d526ae1f88 Author: Gustavo A. R. Silva Date: Thu Jan 9 01:27:35 2020 -0600 pwm: sun4i: Fix inconsistent IS_ERR and PTR_ERR Fix inconsistent IS_ERR and PTR_ERR in sun4i_pwm_probe(). The proper pointers to be passed as arguments are pwm->clk and pwm->bus_clk. This bug was detected with the help of Coccinelle. Fixes: b8d74644f34a ("pwm: sun4i: Prefer "mod" clock to unnamed") Fixes: 5b090b430d75 ("pwm: sun4i: Add an optional probe for bus clock") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 3e954d9626895d374704bb49a8fb538a974ebcf5 Author: Clément Péron Date: Mon Jan 13 10:23:13 2020 +0100 pwm: sun4i: Move pwm_calculate() out of spin_lock() pwm_calculate() calls clk_get_rate() while holding a spin_lock(). This create an issue as clk_get_rate() may sleep. Move pwm_calculate() out of this spin_lock(). Fixes: c32c5c50d4fe ("pwm: sun4i: Switch to atomic PWM") Reported-by: Alexander Finger Sugested-by: Vasily Khoruzhick Tested-by: Alexander Finger Reviewed-by: Uwe Kleine-König Signed-off-by: Clément Péron Signed-off-by: Thierry Reding commit 9f2919e9b40ec480609ee1f45567531de06ab3fe Author: Uwe Kleine-König Date: Mon Nov 11 10:03:57 2019 +0100 pwm: omap-dmtimer: Allow compiling with COMPILE_TEST The dependency on OMAP_DM_TIMER is only a runtime dependency. Also OMAP_DM_TIMER cannot be enabled without ARCH_OMAP being enabled. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit c7cb3a1dd53f63c64fb2b567d0be130b92a44d91 Author: Uwe Kleine-König Date: Mon Nov 11 10:03:56 2019 +0100 pwm: omap-dmtimer: put_device() after of_find_device_by_node() This was found by coccicheck: drivers/pwm/pwm-omap-dmtimer.c:304:2-8: ERROR: missing put_device; call of_find_device_by_node on line 255, but without a corresponding object release within this function. Reported-by: Markus Elfring Fixes: 6604c6556db9 ("pwm: Add PWM driver for OMAP using dual-mode timers") Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit c4cf7aa57eb83b108d2d9c6c37c143388fee2a4d Author: Uwe Kleine-König Date: Mon Nov 11 10:03:55 2019 +0100 pwm: omap-dmtimer: Simplify error handling Instead of doing error handling in the middle of ->probe(), move error handling and freeing the reference to timer to the end. This fixes a resource leak as dm_timer wasn't freed when allocating *omap failed. Implementation note: The put: label was never reached without a goto and ret being unequal to 0, so the removed return statement is fine. Fixes: 6604c6556db9 ("pwm: Add PWM driver for OMAP using dual-mode timers") Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 43efdc8f0e6d7088ec61bd55a73bf853f002d043 Author: Uwe Kleine-König Date: Mon Nov 11 10:03:54 2019 +0100 pwm: omap-dmtimer: Remove PWM chip in .remove before making it unfunctional In the old code (e.g.) mutex_destroy() was called before pwmchip_remove(). Between these two calls it is possible that a PWM callback is used which tries to grab the mutex. Fixes: 6604c6556db9 ("pwm: Add PWM driver for OMAP using dual-mode timers") Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 1188829abc2abbef0da7a082fdb6a315a050a0a0 Author: Uwe Kleine-König Date: Thu Oct 24 10:08:29 2019 +0200 pwm: Implement tracing for .get_state() and .apply_state() This allows to log all calls to the driver's lowlevel functions which simplifies debugging in some cases. Signed-off-by: Uwe Kleine-König Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Thierry Reding commit af4fab8bedcfe87f297c65ded128e7ee036488c6 Author: Uwe Kleine-König Date: Thu Oct 24 09:14:10 2019 +0200 pwm: rcar: Document inability to set duty_cycle = 0 When .apply() is called with state->duty_cycle = 0 the duty_ns parameter to rcar_pwm_set_counter() is 0 which results in ph being 0 and rcar_pwm_set_counter() returning -EINVAL. Signed-off-by: Uwe Kleine-König Reviewed-by: Yoshihiro Shimoda Signed-off-by: Thierry Reding commit bca900829d6035a782d8209c834400ed44539c1d Author: Uwe Kleine-König Date: Thu Oct 24 09:14:09 2019 +0200 pwm: rcar: Drop useless call to pwm_get_state() pwm_get_state has no side effects and the resulting pwm_state is unused. So drop the call to pwm_get_state() and the local variable from rcar_pwm_apply(). The call was introduced in commit 7f68ce8287d3 ("pwm: rcar: Add support "atomic" API") and already then was useless. Signed-off-by: Uwe Kleine-König Reviewed-by: Yoshihiro Shimoda Signed-off-by: Thierry Reding commit 80c7482356ac9f08dbdb01a3c8485401494d9e05 Author: Yangbo Lu Date: Mon Jan 20 17:48:35 2020 +0800 mmc: sdhci-of-esdhc: fix serious issue clock is always disabled This patch is to fix a serious issue that clock is always disabled in esdhc_of_set_clock(). Fixes: 1b21a701aed9 ("mmc: sdhci-of-esdhc: fix clock setting for different controller versions") Signed-off-by: Yangbo Lu Link: https://lore.kernel.org/r/20200120094835.28050-1-yangbo.lu@nxp.com Signed-off-by: Ulf Hansson commit 429d939c194b2e81e4a669671efc8c0c2fb9887e Author: Yangbo Lu Date: Fri Jan 17 14:38:58 2020 +0800 mmc: sdhci-of-esdhc: fix transfer mode register reading The standard SD controller uses two 16-bit registers for command sending. 0xC: Transfer Mode Register 0xE: Command Register But the eSDHC controller uses one 32-bit register instead. 0xC: XFERTYPE For Transfer Mode Register and Command Register writing, the eSDHC driver will store Transfer Mode Register value in a variable first. When Command Register writing happens, driver will directly write a 32-bit value into XFERTYPE register. But for Transfer Mode Register reading, driver just returns a actual value. This may cause issue for some read-modify-write operations. We should make both reading and write on that variable for Transfer Mode Register. Signed-off-by: Yangbo Lu Link: https://lore.kernel.org/r/20200117063858.37296-1-yangbo.lu@nxp.com Signed-off-by: Ulf Hansson commit 2fefc7c5f7d16e2e0e66f1e3ebd1cd0755ecd82e Author: Al Cooper Date: Mon Jan 13 16:07:06 2020 -0500 mmc: sdhci-brcmstb: Fix incorrect switch to HS mode When switching from any MMC speed mode that requires 1.8v (HS200, HS400 and HS400ES) to High Speed (HS) mode, the system ends up configured for SDR12 with a 50MHz clock which is an illegal mode. This happens because the SDHCI_CTRL_VDD_180 bit in the SDHCI_HOST_CONTROL2 register is left set and when this bit is set, the speed mode is controlled by the SDHCI_CTRL_UHS field in the SDHCI_HOST_CONTROL2 register. The SDHCI_CTRL_UHS field will end up being set to 0 (SDR12) by sdhci_set_uhs_signaling() because there is no UHS mode being set. The fix is to change sdhci_set_uhs_signaling() to set the SDHCI_CTRL_UHS field to SDR25 (which is the same as HS) for any switch to HS mode. This was found on a new eMMC controller that does strict checking of the speed mode and the corresponding clock rate. It caused the switch to HS400 mode to fail because part of the sequence to switch to HS400 requires a switch from HS200 to HS before going to HS400. This issue was previously fixed by commit c894e33ddc191 ("mmc: sdhci: Fix incorrect switch to HS mode") and later removed by commit 07bcc411567c ("Revert \"mmc: sdhci: Fix incorrect switch to HS mode\"") because it caused failures with some SD cards on AM65X systems. The fix will now be done in a platform specific callback instead of common sdhci code. Signed-off-by: Al Cooper Suggested-by: Adrian Hunter Link: https://lore.kernel.org/r/20200113210706.11972-7-alcooperx@gmail.com Signed-off-by: Ulf Hansson commit d46ba2d17f902680807f9f7e951ae659c5e0d64c Author: Al Cooper Date: Mon Jan 13 16:07:05 2020 -0500 mmc: sdhci-brcmstb: Add support for Command Queuing (CQE) The latest Arasan controller first used in the 7216 now supports CQE so enable this feature. Signed-off-by: Al Cooper Link: https://lore.kernel.org/r/20200113210706.11972-6-alcooperx@gmail.com Signed-off-by: Ulf Hansson commit e7b5d63a82fea9082eb9570df8cb88d5d0e075c3 Author: Al Cooper Date: Mon Jan 13 16:07:04 2020 -0500 mmc: sdhci-brcmstb: Add shutdown callback Shutdown controller and disable it's clocks to insure max power savings in S5 on systems that leave power on. Signed-off-by: Al Cooper Link: https://lore.kernel.org/r/20200113210706.11972-5-alcooperx@gmail.com Signed-off-by: Ulf Hansson commit 6f2aa55b85c070e60865504f88c08486771b2255 Author: Al Cooper Date: Mon Jan 13 16:07:03 2020 -0500 mmc: sdhci-brcmstb: Fix driver to defer on clk_get defer The new SCMI clock protocol driver does not get probed that early in boot. Brcmstb drivers typically have the following code when getting a clock: priv->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(priv->clk)) { dev_err(&pdev->dev, "Clock not found in Device Tree\n"); priv->clk = NULL; } This commit changes the driver to do what is below. priv->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(priv->clk)) { if (PTR_ERR(priv->clk) == -EPROBE_DEFER) return -EPROBE_DEFER; dev_err(&pdev->dev, "Clock not found in Device Tree\n"); priv->clk = NULL; } Signed-off-by: Al Cooper Link: https://lore.kernel.org/r/20200113210706.11972-4-alcooperx@gmail.com Signed-off-by: Ulf Hansson commit 78ab82fdb65c703fa21db348c50c3f3eae773d62 Author: Al Cooper Date: Mon Jan 13 16:07:02 2020 -0500 mmc: sdhci-brcmstb: Add ability to use HS400ES transfer mode The latest eMMC JEDEC specification version 5.1 added a new transfer mode, HS400 with enhanced strobe (HS400ES). This mode will be selected if both the host controller and eMMC device support it. The latest Arasan 5.1 controller in the 7216a0 supports this mode. The "Host Controller Specification" has not been updated so the controller register bit used to enable this mode is not specified and varies the with controller vendor. The Linux SDHCI driver supplies a callback for enabling HS400ES mode and that callback will be used to supply a routine that will set the proper bit in the Arasan Vendor register. Signed-off-by: Al Cooper Link: https://lore.kernel.org/r/20200113210706.11972-3-alcooperx@gmail.com Signed-off-by: Ulf Hansson commit 61696bbb25f8dddf07f118efc35fc22914f58162 Author: Al Cooper Date: Mon Jan 13 16:07:01 2020 -0500 dt-bindings: mmc: brcm,sdhci-brcmstb: Add support for 7216b0 Add 7216b0 with supports CQE, HS400, HS400-ES and SDR104. Signed-off-by: Al Cooper Link: https://lore.kernel.org/r/20200113210706.11972-2-alcooperx@gmail.com Signed-off-by: Ulf Hansson commit 661cf2d8973a0211be8d4ee1430b66690b291e83 Author: Michał Mirosław Date: Thu Jan 2 11:54:58 2020 +0100 mmc: core: limit probe clock frequency to configured f_max Currently MMC core disregards host->f_max during card initialization phase. Obey upper boundary for the clock frequency and skip faster speeds when they are above the limit. Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/f471bceaf237d582d746bd289c4c4f3639cb7b45.1577962382.git.mirq-linux@rere.qmqm.pl Signed-off-by: Ulf Hansson commit 557c03157c277cab1e895866ea4f7cc725964870 Author: YueHaibing Date: Thu Jan 16 22:43:22 2020 +0800 mmc: sdhci-milbeaut: Remove redundant platform_get_irq error message platform_get_irq() will call dev_err() itself on failure, so there is no need for the driver to also do this. This is detected by coccinelle. Signed-off-by: YueHaibing Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200116144322.57308-1-yuehaibing@huawei.com Signed-off-by: Ulf Hansson commit 1215c025e870ba001cbfc1bed91a05f415fc0a1c Author: Chunyan Zhang Date: Mon Jan 20 11:32:23 2020 +0800 mmc: sdhci: fix an issue of mixing different types Fix an issue reported by sparse, since mixed types of parameters are used on calling dmaengine_prep_slave_sg(). Fixes: 36e1da441fec (mmc: sdhci: add support for using external DMA devices) Reported-by: kbuild test robot Signed-off-by: Chunyan Zhang Reviewed-by: Nathan Chancellor Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200120033223.897-1-zhang.chunyan@linaro.org Signed-off-by: Ulf Hansson commit 9d0af44c2ed036c663832f3b764ffd1109c8b79e Merge: 5af29028fd6d 4d024fe8f806 Author: Takashi Iwai Date: Mon Jan 20 11:44:35 2020 +0100 Merge branch 'for-linus' into for-next Resolved the merge conflict in HD-audio Tegra driver. Signed-off-by: Takashi Iwai commit 4d024fe8f806e20e577cc934204c5784c7063293 Author: Takashi Iwai Date: Mon Jan 20 11:41:27 2020 +0100 ALSA: hda: Apply aligned MMIO access only conditionally It turned out that the recent simplification of HD-audio bus access helpers caused a regression on the virtual HD-audio device on QEMU with ARM platforms. The driver got a CORB/RIRB timeout and couldn't probe any codecs. The essential difference that caused a problem was the enforced aligned MMIO accesses by simplification. Since snd-hda-tegra driver is enabled on ARM, it enables CONFIG_SND_HDA_ALIGNED_MMIO, which makes the all HD-audio drivers using the aligned MMIO accesses. While this is mandatory for snd-hda-tegra, it seems that snd-hda-intel on ARM gets broken by this access pattern. For addressing the regression, this patch introduces a new flag, aligned_mmio, to hdac_bus object, and applies the aligned MMIO only when this flag is set. This change affects only platforms with CONFIG_SND_HDA_ALIGNED_MMIO set, i.e. mostly only for ARM platforms. Unfortunately the patch became a big bigger than it should be, just because the former calls didn't take hdac_bus object in the argument, hence we had to extend the call patterns. Fixes: 19abfefd4c76 ("ALSA: hda: Direct MMIO accesses") BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1161152 Cc: Link: https://lore.kernel.org/r/20200120104127.28985-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6c3090520554d535db04f807c313d9a4b81a285c Author: Tony Lindgren Date: Tue Dec 10 09:21:04 2019 -0800 clk: ti: clkctrl: Fix hidden dependency to node name We currently have a hidden dependency to the device tree node name for the clkctrl clocks. Instead of using standard node name like "clock", we must use "l4-per-clkctrl" type naming so the clock driver can find the associated clock domain. Further, if "clk" is specified for a clock node name, the driver sets TI_CLK_CLKCTRL_COMPAT flag that uses different logic for the clock name based on the parent node name for the all the clkctrl clocks for the SoC. If the clock node naming dependency is not understood, the related clockdomain is not found, or a wrong one can get used if a clock manager has multiple clock domains. As each clkctrl instance represents a single clock domain, let's allow using domain specific compatible names to specify the clock domain. This simplifies things and removes the hidden dependency to the node name. And then later on, after the node names have been standardized, we can drop the related code for parsing the node names. Let's also update the binding to use standard "clock" node naming instead of "clk" and add the missing description for reg. Cc: devicetree@vger.kernel.org Cc: Rob Herring Signed-off-by: Tony Lindgren Acked-by: Rob Herring Acked-by: Stephen Boyd Signed-off-by: Tero Kristo commit dacc9092336be20b01642afe1a51720b31f60369 Author: Arvind Sankar Date: Tue Jan 7 18:04:10 2020 -0500 x86/sysfb: Fix check for bad VRAM size When checking whether the reported lfb_size makes sense, the height * stride result is page-aligned before seeing whether it exceeds the reported size. This doesn't work if height * stride is not an exact number of pages. For example, as reported in the kernel bugzilla below, an 800x600x32 EFI framebuffer gets skipped because of this. Move the PAGE_ALIGN to after the check vs size. Reported-by: Christopher Head Tested-by: Christopher Head Signed-off-by: Arvind Sankar Signed-off-by: Borislav Petkov Link: https://bugzilla.kernel.org/show_bug.cgi?id=206051 Link: https://lkml.kernel.org/r/20200107230410.2291947-1-nivedita@alum.mit.edu commit 794eee259e8e1a7e6f31417ec8f6fa809597bb24 Merge: 4262c38dc42e df007186488e Author: David S. Miller Date: Mon Jan 20 10:43:24 2020 +0100 Merge branch 'net-phy-add-generic-ndo_do_ioctl-handler-phy_do_ioctl' Heiner Kallweit says: ==================== net: phy: add generic ndo_do_ioctl handler phy_do_ioctl A number of network drivers has the same glue code to use phy_mii_ioctl as ndo_do_ioctl handler. So let's add such a generic ndo_do_ioctl handler to phylib. As first user convert r8169. ==================== Signed-off-by: David S. Miller commit df007186488e33716ccf0c01f93cc5fe1ef91847 Author: Heiner Kallweit Date: Sun Jan 19 14:32:49 2020 +0100 r8169: use generic ndo_do_ioctl handler phy_do_ioctl Replace rtl8169_ioctl with new generic function phy_do_ioctl. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 2ab1d925aa4c0c179dd1eb492e8c03536972707b Author: Heiner Kallweit Date: Sun Jan 19 14:31:55 2020 +0100 net: phy: add generic ndo_do_ioctl handler phy_do_ioctl A number of network drivers has the same glue code to use phy_mii_ioctl as ndo_do_ioctl handler. So let's add such a generic ndo_do_ioctl handler to phylib. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 6fac4a3cb0599b32a3437356ab03e7be10e1f036 Merge: 9e84a2e688d7 2a187d033520 Author: Ulf Hansson Date: Mon Jan 20 10:40:37 2020 +0100 Merge branch 'fixes' into next commit a3e2b51ca31f56317d2b88fe226b06306aecc5b6 Author: Paul Cercueil Date: Mon Jan 13 19:39:27 2020 -0300 platform/x86: asus-nb-wmi: Support left round button on N56VB The N56VB laptop has a round button located on the left side above the keyboard. Map it to F13 since it does not have any predeterminated purpose. Signed-off-by: Paul Cercueil Signed-off-by: Andy Shevchenko commit 19be0b2a2e4444d41ca70554422a1f0c1d5312d6 Author: Srinivas Pandruvada Date: Tue Jan 14 11:22:17 2020 -0800 tools/power/x86/intel-speed-select: Update version As we added new set of mailbox commands, increment version. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 097a522257ea3446b1e3b03f5c2498c23f9cd84f Author: Srinivas Pandruvada Date: Tue Jan 14 11:22:16 2020 -0800 tools/power/x86/intel-speed-select: Change the order for clos disable In turbo-freq or base-freq auto mode, for disable, first disable the feature and then disable clos. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 78e77b7dfd9abdf0bb003b679e0afbde78d98f47 Author: Srinivas Pandruvada Date: Tue Jan 14 11:22:15 2020 -0800 tools/power/x86/intel-speed-select: Fix result display for turbo-freq auto mode The turbo-freq enable with auto mode, prints result for the last possible CPU, which is not correct when either CPU is not present or user wants command to be limited to a single die/package. For example, in the below command user wants to limit to die/package 0, but the "turbo-freq --auto" result is displayed using the other package. $ sudo intel-speed-select -c 0 turbo-freq enable -a Intel(R) Speed Select Technology package-0 die-0 cpu-0 turbo-freq enable:success package--1 die-0 cpu-31 turbo-freq --auto enable:success Since we do have to traverse all CPUs, don't display CPU info for "turbo-freq --auto", as we already displayed the result for turbo-freq enable with the CPU information. With the fix, the same command results in: $ sudo intel-speed-select -c 0 turbo-freq enable -a Intel(R) Speed Select Technology package-0 die-0 cpu-0 turbo-freq enable:success turbo-freq --auto enable:success Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 645feeb2f571acfc36a7205a6302e8c7e442d617 Author: Srinivas Pandruvada Date: Tue Jan 14 11:22:14 2020 -0800 tools/power/x86/intel-speed-select: Add support for core-power discovery It is possible that BIOS may not enable core-power feature. In this case this additional interface will allow to enable from this utility. Also the information dump, includes the current status of core-power. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 9749b376be181a98c75b6c2093e6fc30d92e38cc Author: Srinivas Pandruvada Date: Tue Jan 14 11:22:13 2020 -0800 platform/x86: ISST: Allow additional core-power mailbox commands To discover core-power capability, some new mailbox commands are added. Allow those commands to execute. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 9e84a2e688d7ac0f23ab73ad541ee2081dcb53ec Author: Faiz Abbas Date: Thu Jan 16 16:21:54 2020 +0530 mmc: sdhci-omap: Add special reset capability Some omap controllers need software to monitor a 0->1->0 for software reset. Add a SDHCI_OMAP_SPECIAL_RESET flag to indicate this. Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200116105154.7685-11-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit d6fe49286ea1b271e128b4284f14d32ba11ba707 Author: Faiz Abbas Date: Thu Jan 16 16:21:53 2020 +0530 mmc: sdhci-omap: Add am335x and am437x specific compatibles Add support for new compatible for TI's am335x and am437x devices. Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200116105154.7685-10-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 53bcebbe81b6e27ea7b6665bfe6ae24b489d9e82 Author: Faiz Abbas Date: Thu Jan 16 16:21:52 2020 +0530 dt-bindings: sdhci-omap: Add am335x and am437x specific bindings Add binding for the TI's sdhci-omap controller present in am335x and am437x devices. Signed-off-by: Faiz Abbas Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200116105154.7685-9-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 5da5e494a50c6a1fd0b9c24c2c9a190f98a7164c Author: Faiz Abbas Date: Thu Jan 16 16:21:51 2020 +0530 mmc: sdhci-omap: Disable data timeout interrupt during erase Disable data timeout interrupt during an erase operation. Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200116105154.7685-8-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 7d76ed77cfbd39468ae58d419f537d35ca892d83 Author: Faiz Abbas Date: Thu Jan 16 16:21:50 2020 +0530 mmc: sdhci: Refactor sdhci_set_timeout() Refactor sdhci_set_timeout() such that platform drivers can do some functionality in a set_timeout() callback and then call __sdhci_set_timeout() to complete the operation. Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200116105154.7685-7-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 7907ebe741a7f14ed12889ebe770438a4ff47613 Author: Faiz Abbas Date: Thu Jan 16 16:21:49 2020 +0530 mmc: sdhci: Convert sdhci_set_timeout_irq() to non-static Export sdhci_set_timeout_irq() so that it is accessible from platform drivers. Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200116105154.7685-6-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 195fadb71b73c565a4ea249a88f9b634820a3c54 Author: Chunyan Zhang Date: Thu Jan 16 16:21:48 2020 +0530 mmc: sdhci-omap: Add using external dma sdhci-omap can support both external dma controller via dmaengine framework as well as ADMA which standard SD host controller provides. Fixes by Faiz Abbas : 1. Switch to DMA slave mode when using external DMA 2. Add offset to mapbase Signed-off-by: Chunyan Zhang Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200116105154.7685-5-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 18e762e3b7a7be764c50957edd2fa0879cb9c67e Author: Chunyan Zhang Date: Thu Jan 16 16:21:47 2020 +0530 mmc: sdhci: add support for using external DMA devices Some standard SD host controllers can support both external dma controllers as well as ADMA/SDMA in which the SD host controller acts as DMA master. TI's omap controller is the case as an example. Currently the generic SDHCI code supports ADMA/SDMA integrated in the host controller but does not have any support for external DMA controllers implemented using dmaengine, meaning that custom code is needed for any systems that use an external DMA controller with SDHCI. Fixes by Faiz Abbas : 1. Map scatterlists before dmaengine_prep_slave_sg() 2. Use dma_async() functions inside of the send_command() path and call terminate_sync() in non-atomic context in case of an error. Signed-off-by: Chunyan Zhang Signed-off-by: Faiz Abbas Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200116105154.7685-4-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 15db1836918db903794f9ef3d6eb7b80ab09174a Author: Faiz Abbas Date: Thu Jan 16 16:21:46 2020 +0530 mmc: sdhci: Factor out some operations set to their own functions In preparation for adding external dma support, factor out data initialization, block info and mrq_done to their own functions. Signed-off-by: Faiz Abbas Tested-by: Baolin Wang Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200116105154.7685-3-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 83a1b4cc80fa0d167c71b75ed727da9627d03928 Author: Chunyan Zhang Date: Thu Jan 16 16:21:45 2020 +0530 dt-bindings: sdhci-omap: Add properties for using external dma sdhci-omap can support both external dma controller via dmaengine framework as well as ADMA which standard SD host controller provides. Add binding documentation for these external dma properties. Signed-off-by: Chunyan Zhang Signed-off-by: Faiz Abbas Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200116105154.7685-2-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 2aae18f65f916497c400f8aac4a88fe44b9439bf Author: Anson Huang Date: Mon Jan 13 13:33:17 2020 +0800 dt-bindings: mmc: fsl-imx-esdhc: add i.MX8MP compatible string Add compatible string for imx8mp Signed-off-by: Anson Huang Acked-by: Rob Herring Link: https://lore.kernel.org/r/1578893602-14395-2-git-send-email-Anson.Huang@nxp.com Signed-off-by: Ulf Hansson commit 4262c38dc42e092987f41cb1695240ac7dab86a9 Author: Andrew Lunn Date: Sat Jan 18 19:40:56 2020 +0100 net: dsa: mv88e6xxx: Add SERDES stats counters to all 6390 family members The SERDES statistics are valid for all members of the 6390 family, not just the 6390 itself. Add the needed callbacks to all members of the family. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 04e2246329d4a72c2ec8ebd1ebc3f7250dece2da Author: Alex Marginean Date: Sat Jan 18 14:19:15 2020 +0200 net: phylink: allow in-band AN for USXGMII USXGMII supports passing link information in-band between PHY and MAC PCS, add it to the list of protocols that support in-band AN mode. Being a MAC-PHY protocol that can auto-negotiate link speeds up to 10 Gbps, we populate the initial supported mask with the entire spectrum of link modes up to 10G that PHYLINK supports, and we let the driver reduce that mask in its .phylink_validate method. Signed-off-by: Alex Marginean Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 7875f8242494f8e4c8a75f2aeab4a6fb742599bd Author: Yash Shah Date: Tue Dec 10 16:41:12 2019 +0530 gpio/sifive: Add DT documentation for SiFive GPIO DT json-schema for GPIO controller added. Signed-off-by: Wesley W. Terpstra [Atish: Compatible string update] Signed-off-by: Atish Patra Signed-off-by: Yash Shah Signed-off-by: Marc Zyngier Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1575976274-13487-5-git-send-email-yash.shah@sifive.com commit 466008f984358231f4608a0a4171b0e6e8251de8 Author: Yash Shah Date: Tue Dec 10 16:41:11 2019 +0530 irqchip/sifive-plic: Support irq domain hierarchy Add support for hierarchical irq domains. This is needed as pre-requisite for gpio-sifive driver. Signed-off-by: Yash Shah Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1575976274-13487-4-git-send-email-yash.shah@sifive.com commit 459c3bc8c497d6b665c2efd15ee7df0f4e19452a Author: Yash Shah Date: Tue Dec 10 16:41:10 2019 +0530 irqchip/nvic: Use irq_domain_translate_onecell instead of custom func Make use of newly introduced irq_domain_translate_onecell() instead of custom made function. Signed-off-by: Yash Shah Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1575976274-13487-3-git-send-email-yash.shah@sifive.com commit b01ecceaf2c0c4b3f2d24aa0adcf096ab1648253 Author: Yash Shah Date: Tue Dec 10 16:41:09 2019 +0530 genirq: Introduce irq_domain_translate_onecell Add a new function irq_domain_translate_onecell() that is to be used as the translate function in struct irq_domain_ops. Signed-off-by: Yash Shah Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1575976274-13487-2-git-send-email-yash.shah@sifive.com commit 3e41d04e2b7373490977d7145fb12109f23cde9c Author: Alex Marginean Date: Thu Jan 16 19:46:28 2020 +0200 net: phy: don't crash in phy_read/_write_mmd without a PHY driver The APIs can be used by Ethernet drivers without actually loading a PHY driver. This may become more widespread in the future with 802.3z compatible MAC PCS devices being locally driven by the MAC driver when configuring for a PHY mode with in-band negotiation. Check that drv is not NULL before reading from it. Signed-off-by: Alex Marginean Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 6cbdcf25bdec944f85bb2ef7ebe959bdb7dc59b8 Author: Vladimir Oltean Date: Thu Jan 16 19:36:56 2020 +0200 net: phylink: Allow 2.5BASE-T, 5GBASE-T and 10GBASE-T for the 10G link modes For some reason, PHYLINK does not put the copper modes for 802.3bz (NBASE-T) and 802.3an-2006 (10GBASE-T) in the PHY's supported mask, when the PHY-MAC connection is a 10G-capable one (10GBase-KR, 10GBase-R, USXGMII). One possible way through which the cable side can work at the lower speed is by having the PHY emit PAUSE frames towards the MAC. So fix that omission. Also include the 2500Base-X fiber mode in this list while we're at it. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit a47b9e15c32f8cd7ad5cb124a54d607b28879f79 Author: Dejin Zheng Date: Wed Jan 15 23:53:23 2020 +0800 net: stmmac: modified pcs mode support for RGMII snps databook noted that physical coding sublayer (PCS) interface that can be used when the MAC is configured for the TBI, RTBI, or SGMII PHY interface. we have RGMII and SGMII in a SoC and it also has the PCS block. it needs stmmac_init_phy and stmmac_mdio_register function for initializing phy when it used RGMII interface. Signed-off-by: Dejin Zheng Signed-off-by: David S. Miller commit a48ac1c9f294e1a9b692d9458de6e6b58da8b07d Author: chenqiwu Date: Mon Jan 20 15:41:28 2020 +0800 cpufreq: brcmstb-avs: fix imbalance of cpufreq policy refcount brcm_avs_cpufreq_get() calls cpufreq_cpu_get() to get the cpufreq policy, meanwhile, it also increments the kobject reference count to mark it busy. However, a corresponding call of cpufreq_cpu_put() is ignored to decrement the kobject reference count back, which may lead to a potential stuck risk that the cpuhp thread deadly waits for dropping of kobject refcount when cpufreq policy free. With this patch, the cpuhp thread can be easily exercised by attempting to force an unbind of the CPUfreq driver. Signed-off-by: chenqiwu [ Viresh: Dropped !policy check ] Signed-off-by: Viresh Kumar commit f7be987b825434e2cac5027d47501ae1102881b4 Author: Andreas Gruenbacher Date: Thu Jan 16 00:25:32 2020 +0100 gfs2: Remove GFS2_MIN_LVB_SIZE define The dlm lockspace is set up to have lock value blocks of GDLM_LVB_SIZE bytes, and dlm is the only lock manager we support, so there is no point in claiming that the lock value block could have any other size. Signed-off-by: Andreas Gruenbacher commit 5d43975859bf4fa5a27d568f37091f46a73a9725 Author: Andreas Gruenbacher Date: Thu Jan 9 13:54:36 2020 +0100 gfs2: Fix incorrect variable name Rename sd_log_commited_revoke to sd_log_committed_revoke. Signed-off-by: Andreas Gruenbacher commit 56ee04aa63285d6bc8a995a26e2441ae3d419bcd Merge: cb6c82df684e 8af19d66b956 Author: Ingo Molnar Date: Mon Jan 20 08:44:04 2020 +0100 Merge tag 'perf-core-for-mingo-5.6-20200116' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf report: Andi Kleen: - Clarify in help that --children is default. Jin Yao: - Fix no libunwind compiled warning breaking s390. perf annotate/report/top: Andi Kleen: - Support --prefix/--prefix-strip, use it with objdump when doing disassembly. perf c2c: Andres Freund: - Fix return type for histogram sorting comparision functions. perf header: Michael Petlan: - Use last modification time for timestamp, i.e. st.st_mtime instead of the st_ctime. perf beauty: Cengiz Can: - Fix sockaddr printf format for long integers. libperf: Jiri Olsa: - Setup initial evlist::all_cpus value perf parser: Jiri Olsa: - Use %define api.pure full instead of %pure-parser, nuking warning from bison about using deprecated stuff. perf ui gtk: - Add missing zalloc object, fixing gtk browser build. perf clang: Maciej S. Szmigiero: - Fix build issues with Clang 9 and 8+. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit 957ad44ff5f266d280aff6a92a6aa74698b016a5 Author: Tony Lindgren Date: Fri Nov 1 09:27:19 2019 -0700 clk: ti: add clkctrl data dra7 sgx This is similar to what we have for omap5 except the gpu_cm address is different, the mux clocks have one more source option, and there's no divider clock. Note that because of the current dts node name dependency for mapping to clock domain, we must still use "gpu-clkctrl@" naming instead of generic "clock@" naming for the node. And because of this, it's probably best to apply the dts node addition together along with the other clock changes. For accessing the GPU, we also need to configure the interconnect target module for GPU similar to what we have for omap5, I'll send that change separately. Cc: Benoit Parrot Cc: "H. Nikolaus Schaller" Cc: Robert Nelson Cc: Tomi Valkeinen Signed-off-by: Tony Lindgren Acked-by: Stephen Boyd Signed-off-by: Tero Kristo commit cb6c82df684e912b10245c13200ef09c9d372fc2 Merge: 5738891229a2 def9d2780727 Author: Ingo Molnar Date: Mon Jan 20 08:43:44 2020 +0100 Merge tag 'v5.5-rc7' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 364975eeb43f25c0a78f73277f076694e6f30b17 Author: Tony Lindgren Date: Tue Jan 14 07:06:07 2020 -0800 clk: ti: omap5: Add missing AESS clock Looks like we're missing AESS clock for omap5. This is similar to what omap4 has. Cc: H. Nikolaus Schaller Cc: Matthijs van Duin Cc: Peter Ujfalusi Signed-off-by: Tony Lindgren Reviewed-by: Peter Ujfalusi Signed-off-by: Tero Kristo commit 69e300283796dae7e8c2e6acdabcd31336c0c93e Author: Grygorii Strashko Date: Sat Dec 21 13:00:04 2019 +0200 clk: ti: dra7: fix parent for gmac_clkctrl The parent clk for gmac clk ctrl has to be gmac_main_clk (125MHz) instead of dpll_gmac_ck (1GHz). This is caused incorrect CPSW MDIO operation. Hence, fix it. Fixes: dffa9051d546 ('clk: ti: dra7: add new clkctrl data') Signed-off-by: Grygorii Strashko Signed-off-by: Tero Kristo commit 7dfd5e619d3908d8a6876a95062a35b8e0000cd4 Author: Benoit Parrot Date: Wed Dec 11 08:08:08 2019 -0600 clk: ti: dra7: add vpe clkctrl data Add clkctrl data for VPE. Signed-off-by: Benoit Parrot Acked-by: Tony Lindgren Acked-by: Rob Herring Acked-by: Stephen Boyd Signed-off-by: Tero Kristo commit 7054c14f0555e68f47f03be5105d4d7e95be1f70 Author: Benoit Parrot Date: Wed Dec 11 08:05:49 2019 -0600 clk: ti: dra7: add cam clkctrl data Add clkctrl data for CAM domain. Signed-off-by: Benoit Parrot Acked-by: Tony Lindgren Acked-by: Rob Herring Acked-by: Stephen Boyd Signed-off-by: Tero Kristo commit 8e28918a85a088362f3450078c5519f27aecdd3a Author: Peter Ujfalusi Date: Thu Nov 14 12:18:17 2019 +0200 dt-bindings: clock: Move ti-dra7-atl.h to dt-bindings/clock Most of the clock related dt-binding header files are located in dt-bindings/clock folder. It would be good to keep all the similar header files at a single location. Suggested-by: Tony Lindgren Signed-off-by: Peter Ujfalusi Acked-by: Tony Lindgren Acked-by: Rob Herring Signed-off-by: Tero Kristo commit bc310baf2ba381c648983c7f4748327f17324562 Author: Ard Biesheuvel Date: Sat Jan 18 17:57:04 2020 +0100 x86/boot/compressed: Relax sed symbol type regex for LLVM ld.lld The final build stage of the x86 kernel captures some symbol addresses from the decompressor binary and copies them into zoffset.h. It uses sed with a regular expression that matches the address, symbol type and symbol name, and mangles the captured addresses and the names of symbols of interest into #define directives that are added to zoffset.h The symbol type is indicated by a single letter, which we match strictly: only letters in the set 'ABCDGRSTVW' are matched, even though the actual symbol type is relevant and therefore ignored. Commit bc7c9d620 ("efi/libstub/x86: Force 'hidden' visibility for extern declarations") made a change to the way external symbol references are classified, resulting in 'startup_32' now being emitted as a hidden symbol. This prevents the use of GOT entries to refer to this symbol via its absolute address, which recent toolchains (including Clang based ones) already avoid by default, making this change a no-op in the majority of cases. However, as it turns out, the LLVM linker classifies such hidden symbols as symbols with static linkage in fully linked ELF binaries, causing tools such as NM to output a lowercase 't' rather than an upper case 'T' for the type of such symbols. Since our sed expression only matches upper case letters for the symbol type, the line describing startup_32 is disregarded, resulting in a build error like the following arch/x86/boot/header.S:568:18: error: symbol 'ZO_startup_32' can not be undefined in a subtraction expression init_size: .long (0x00000000008fd000 - ZO_startup_32 + (((0x0000000001f6361c + ((0x0000000001f6361c >> 8) + 65536) - 0x00000000008c32e5) + 4095) & ~4095)) # kernel initialization size Given that we are only interested in the value of the symbol, let's match any character in the set 'a-zA-Z' instead. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Tested-by: Nathan Chancellor commit 3cc028619e284188cdde652631e1c3c5a83692b9 Author: Ard Biesheuvel Date: Sat Jan 18 17:57:03 2020 +0100 efi/x86: avoid KASAN false positives when accessing the 1: 1 mapping When installing the EFI virtual address map during early boot, we access the EFI system table to retrieve the 1:1 mapped address of the SetVirtualAddressMap() EFI runtime service. This memory is not known to KASAN, so on KASAN enabled builds, this may result in a splat like ================================================================== BUG: KASAN: user-memory-access in efi_set_virtual_address_map+0x141/0x354 Read of size 4 at addr 000000003fbeef38 by task swapper/0/0 CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.5.0-rc5+ #758 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 Call Trace: dump_stack+0x8b/0xbb ? efi_set_virtual_address_map+0x141/0x354 ? efi_set_virtual_address_map+0x141/0x354 __kasan_report+0x176/0x192 ? efi_set_virtual_address_map+0x141/0x354 kasan_report+0xe/0x20 efi_set_virtual_address_map+0x141/0x354 ? efi_thunk_runtime_setup+0x148/0x148 ? __inc_numa_state+0x19/0x90 ? memcpy+0x34/0x50 efi_enter_virtual_mode+0x5fd/0x67d start_kernel+0x5cd/0x682 ? mem_encrypt_init+0x6/0x6 ? x86_family+0x5/0x20 ? load_ucode_bsp+0x46/0x154 secondary_startup_64+0xa4/0xb0 ================================================================== Since this code runs only a single time during early boot, let's annotate it as __no_sanitize_address so KASAN disregards it entirely. Fixes: 698294704573 ("efi/x86: Split SetVirtualAddresMap() wrappers into ...") Reported-by: Qian Cai Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar commit 484a418d075488c6999528247cc711d12c373447 Author: Dan Williams Date: Mon Jan 13 18:22:45 2020 +0100 efi: Fix handling of multiple efi_fake_mem= entries Dave noticed that when specifying multiple efi_fake_mem= entries only the last entry was successfully being reflected in the efi memory map. This is due to the fact that the efi_memmap_insert() is being called multiple times, but on successive invocations the insertion should be applied to the last new memmap rather than the original map at efi_fake_memmap() entry. Rework efi_fake_memmap() to install the new memory map after each efi_fake_mem= entry is parsed. This also fixes an issue in efi_fake_memmap() that caused it to litter emtpy entries into the end of the efi memory map. An empty entry causes efi_memmap_insert() to attempt more memmap splits / copies than efi_memmap_split_count() accounted for when sizing the new map. When that happens efi_memmap_insert() may overrun its allocation, and if you are lucky will spill over to an unmapped page leading to crash signature like the following rather than silent corruption: BUG: unable to handle page fault for address: ffffffffff281000 [..] RIP: 0010:efi_memmap_insert+0x11d/0x191 [..] Call Trace: ? bgrt_init+0xbe/0xbe ? efi_arch_mem_reserve+0x1cb/0x228 ? acpi_parse_bgrt+0xa/0xd ? acpi_table_parse+0x86/0xb8 ? acpi_boot_init+0x494/0x4e3 ? acpi_parse_x2apic+0x87/0x87 ? setup_acpi_sci+0xa2/0xa2 ? setup_arch+0x8db/0x9e1 ? start_kernel+0x6a/0x547 ? secondary_startup_64+0xb6/0xc0 Commit af1648984828 "x86/efi: Update e820 with reserved EFI boot services data to fix kexec breakage" introduced more occurrences where efi_memmap_insert() is invoked after an efi_fake_mem= configuration has been parsed. Previously the side effects of vestigial empty entries were benign, but with commit af1648984828 that follow-on efi_memmap_insert() invocation triggers efi_memmap_insert() overruns. Reported-by: Dave Young Signed-off-by: Dan Williams Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20191231014630.GA24942@dhcp-128-65.nay.redhat.com Link: https://lore.kernel.org/r/20200113172245.27925-14-ardb@kernel.org commit f0ef6523475f18ccd213e22ee593dfd131a2c5ea Author: Dan Williams Date: Mon Jan 13 18:22:44 2020 +0100 efi: Fix efi_memmap_alloc() leaks With efi_fake_memmap() and efi_arch_mem_reserve() the efi table may be updated and replaced multiple times. When that happens a previous dynamically allocated efi memory map can be garbage collected. Use the new EFI_MEMMAP_{SLAB,MEMBLOCK} flags to detect when a dynamically allocated memory map is being replaced. Debug statements in efi_memmap_free() reveal: efi: __efi_memmap_free:37: phys: 0x23ffdd580 size: 2688 flags: 0x2 efi: __efi_memmap_free:37: phys: 0x9db00 size: 2640 flags: 0x2 efi: __efi_memmap_free:37: phys: 0x9e580 size: 2640 flags: 0x2 ...a savings of 7968 bytes on a qemu boot with 2 entries specified to efi_fake_mem=. [ ardb: added a comment to clarify that efi_memmap_free() does nothing when called from efi_clean_memmap(), i.e., with data->flags == 0x0 ] Signed-off-by: Dan Williams Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200113172245.27925-13-ardb@kernel.org commit 1db91035d01aa8bfa2350c00ccb63d629b4041ad Author: Dan Williams Date: Mon Jan 13 18:22:43 2020 +0100 efi: Add tracking for dynamically allocated memmaps In preparation for fixing efi_memmap_alloc() leaks, add support for recording whether the memmap was dynamically allocated from slab, memblock, or is the original physical memmap provided by the platform. Given this tracking is established in efi_memmap_alloc() and needs to be carried to efi_memmap_install(), use 'struct efi_memory_map_data' to convey the flags. Some small cleanups result from this reorganization, specifically the removal of local variables for 'phys' and 'size' that are already tracked in @data. Signed-off-by: Dan Williams Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200113172245.27925-12-ardb@kernel.org commit 26c0e44a213b272abec0e8fba4a5a2801f95208e Author: Dan Williams Date: Mon Jan 13 18:22:42 2020 +0100 efi: Add a flags parameter to efi_memory_map In preparation for garbage collecting dynamically allocated EFI memory maps, where the allocation method of memblock vs slab needs to be recalled, convert the existing 'late' flag into a 'flags' bitmask. Arrange for the flag to be passed via 'struct efi_memory_map_data'. This structure grows additional flags in follow-on changes. Signed-off-by: Dan Williams Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200113172245.27925-11-ardb@kernel.org commit 62b605b53ad4dc6d9ec11ab4c7aa61df10b76af6 Author: Anshuman Khandual Date: Mon Jan 13 18:22:41 2020 +0100 efi: Fix comment for efi_mem_type() wrt absent physical addresses A previous commit f99afd08a45f ("efi: Update efi_mem_type() to return an error rather than 0") changed the return value from EFI_RESERVED_TYPE to -EINVAL when the searched physical address is not present in any memory descriptor. But the comment preceding the function never changed. Let's change the comment now to reflect the new return value -EINVAL. Signed-off-by: Anshuman Khandual Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200113172245.27925-10-ardb@kernel.org commit 64c8a0cd0a535891d5905c3a1651150f0f141439 Author: Ard Biesheuvel Date: Mon Jan 13 18:22:40 2020 +0100 efi/arm: Defer probe of PCIe backed efifb on DT systems The new of_devlink support breaks PCIe probing on ARM platforms booting via UEFI if the firmware exposes a EFI framebuffer that is backed by a PCI device. The reason is that the probing order gets reversed, resulting in a resource conflict on the framebuffer memory window when the PCIe probes last, causing it to give up entirely. Given that we rely on PCI quirks to deal with EFI framebuffers that get moved around in memory, we cannot simply drop the memory reservation, so instead, let's use the device link infrastructure to register this dependency, and force the probing to occur in the expected order. Co-developed-by: Saravana Kannan Signed-off-by: Ard Biesheuvel Signed-off-by: Saravana Kannan Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200113172245.27925-9-ardb@kernel.org commit 1f299fad1e312947c974c6a1d8a3a484f27a6111 Author: Ard Biesheuvel Date: Mon Jan 13 18:22:39 2020 +0100 efi/x86: Limit EFI old memory map to SGI UV machines We carry a quirk in the x86 EFI code to switch back to an older method of mapping the EFI runtime services memory regions, because it was deemed risky at the time to implement a new method without providing a fallback to the old method in case problems arose. Such problems did arise, but they appear to be limited to SGI UV1 machines, and so these are the only ones for which the fallback gets enabled automatically (via a DMI quirk). The fallback can be enabled manually as well, by passing efi=old_map, but there is very little evidence that suggests that this is something that is being relied upon in the field. Given that UV1 support is not enabled by default by the distros (Ubuntu, Fedora), there is no point in carrying this fallback code all the time if there are no other users. So let's move it into the UV support code, and document that efi=old_map now requires this support code to be enabled. Note that efi=old_map has been used in the past on other SGI UV machines to work around kernel regressions in production, so we keep the option to enable it by hand, but only if the kernel was built with UV support. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200113172245.27925-8-ardb@kernel.org commit 97bb9cdc32108036170d9d0d208257168f80d9e9 Author: Ard Biesheuvel Date: Mon Jan 13 18:22:38 2020 +0100 efi/x86: Avoid RWX mappings for all of DRAM The EFI code creates RWX mappings for all memory regions that are occupied after the stub completes, and in the mixed mode case, it even creates RWX mappings for all of the remaining DRAM as well. Let's try to avoid this, by setting the NX bit for all memory regions except the ones that are marked as EFI runtime services code [which means text+rodata+data in practice, so we cannot mark them read-only right away]. For cases of buggy firmware where boot services code is called during SetVirtualAddressMap(), map those regions with exec permissions as well - they will be unmapped in efi_free_boot_services(). Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200113172245.27925-7-ardb@kernel.org commit d9e3d2c4f103200d87f2c243a84c1fd3b3bfea8c Author: Ard Biesheuvel Date: Mon Jan 13 18:22:37 2020 +0100 efi/x86: Don't map the entire kernel text RW for mixed mode The mixed mode thunking routine requires a part of it to be mapped 1:1, and for this reason, we currently map the entire kernel .text read/write in the EFI page tables, which is bad. In fact, the kernel_map_pages_in_pgd() invocation that installs this mapping is entirely redundant, since all of DRAM is already 1:1 mapped read/write in the EFI page tables when we reach this point, which means that .rodata is mapped read-write as well. So let's remap both .text and .rodata read-only in the EFI page tables. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200113172245.27925-6-ardb@kernel.org commit 75fbef0a8b6b4bb19b9a91b5214f846c2dc5139e Author: Ard Biesheuvel Date: Mon Jan 13 18:22:36 2020 +0100 x86/mm: Fix NX bit clearing issue in kernel_map_pages_in_pgd The following commit: 15f003d20782 ("x86/mm/pat: Don't implicitly allow _PAGE_RW in kernel_map_pages_in_pgd()") modified kernel_map_pages_in_pgd() to manage writable permissions of memory mappings in the EFI page table in a different way, but in the process, it removed the ability to clear NX attributes from read-only mappings, by clobbering the clear mask if _PAGE_RW is not being requested. Failure to remove the NX attribute from read-only mappings is unlikely to be a security issue, but it does prevent us from tightening the permissions in the EFI page tables going forward, so let's fix it now. Fixes: 15f003d20782 ("x86/mm/pat: Don't implicitly allow _PAGE_RW in kernel_map_pages_in_pgd() Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200113172245.27925-5-ardb@kernel.org commit bd1d7093a8086df37d260bd1f1d896c0922d34ef Author: Arnd Bergmann Date: Mon Jan 13 18:22:35 2020 +0100 efi/libstub/x86: Fix unused-variable warning The only users of these got removed, so they also need to be removed to avoid warnings: arch/x86/boot/compressed/eboot.c: In function 'setup_efi_pci': arch/x86/boot/compressed/eboot.c:117:16: error: unused variable 'nr_pci' [-Werror=unused-variable] unsigned long nr_pci; ^~~~~~ arch/x86/boot/compressed/eboot.c: In function 'setup_uga': arch/x86/boot/compressed/eboot.c:244:16: error: unused variable 'nr_ugas' [-Werror=unused-variable] unsigned long nr_ugas; ^~~~~~~ Fixes: 2732ea0d5c0a ("efi/libstub: Use a helper to iterate over a EFI handle array") Signed-off-by: Arnd Bergmann Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200113172245.27925-4-ardb@kernel.org commit ac3c76cc6d6deef573dd8c14232f20c6aa744f83 Author: Ard Biesheuvel Date: Mon Jan 13 18:22:34 2020 +0100 efi/libstub/x86: Use mandatory 16-byte stack alignment in mixed mode Reduce the stack frame of the EFI stub's mixed mode thunk routine by 8 bytes, by moving the GDT and return addresses to EBP and EBX, which we need to preserve anyway, since their top halves will be cleared by the call into 32-bit firmware code. Doing so results in the UEFI code being entered with a 16 byte aligned stack, as mandated by the UEFI spec, fixing the last occurrence in the 64-bit kernel where we violate this requirement. Also, move the saved GDT from a global variable to an unused part of the stack frame, and touch up some other parts of the code. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200113172245.27925-3-ardb@kernel.org commit 796eb8d26a57f917bf22d781666aeab491f5c4f1 Author: Ard Biesheuvel Date: Mon Jan 13 18:22:33 2020 +0100 efi/libstub/x86: Use const attribute for efi_is_64bit() Reshuffle the x86 stub code a bit so that we can tag the efi_is_64bit() function with the 'const' attribute, which permits the compiler to optimize away any redundant calls. Since we have two different entry points for 32 and 64 bit firmware in the startup code, this also simplifies the C code since we'll enter it with the efi_is64 variable already set. Signed-off-by: Ard Biesheuvel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200113172245.27925-2-ardb@kernel.org commit a786810cc864e31237a755b933e8872ba3e118bc Merge: 4444f8541dad def9d2780727 Author: Ingo Molnar Date: Mon Jan 20 08:05:16 2020 +0100 Merge tag 'v5.5-rc7' into efi/core, to pick up fixes Signed-off-by: Ingo Molnar commit afa70d941f663c69c9a64ec1021bbcfa82f0e54a Author: Viresh Kumar Date: Mon Jan 20 11:29:05 2020 +0530 sched/fair: Define sched_idle_cpu() only for SMP configurations sched_idle_cpu() isn't used for non SMP configuration and with a recent change, we have started getting following warning: kernel/sched/fair.c:5221:12: warning: ‘sched_idle_cpu’ defined but not used [-Wunused-function] Fix that by defining sched_idle_cpu() only for SMP configurations. Fixes: 323af6deaf70 ("sched/fair: Load balance aggressively for SCHED_IDLE CPUs") Reported-by: Stephen Rothwell Signed-off-by: Viresh Kumar Signed-off-by: Ingo Molnar Cc: Juri Lelli Cc: Vincent Guittot Cc: Dietmar Eggemann Link: https://lore.kernel.org/r/f0554f590687478b33914a4aff9f0e6a62886d44.1579499907.git.viresh.kumar@linaro.org commit c14e723e4074ab07d32ed77a5c0f805957df8e1c Merge: 55a03ac8374d 39be9e84f65b Author: Olof Johansson Date: Sun Jan 19 22:49:08 2020 -0800 Merge tag 'aspeed-5.6-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into arm/dt ASPEED device tree updates for 5.6 - Cleanups for dtc warnings - Ethernet hardware checksum cleanups. A bug in the driver was fixed so machines don't need to specify this anymore. - Misc improvements * tag 'aspeed-5.6-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: ARM: dts: aspeed: rainier: Add UCD90320 power sequencer ARM: dts: aspeed: rainier: Switch PSUs to unknown version ARM: dts: aspeed: Add SD card for Vesnin ARM: dts: aspeed: yamp: Delete no-hw-checksum ARM: dts: aspeed: netbmc: Delete no-hw-checksum ARM: dts: aspeed: AST2400 disables hw checksum ARM: dts: ibm-power9-dual: Add a unit address for OCC nodes ARM: dts: aspeed-g6: Cleanup watchdog unit address ARM: dts: aspeed-g5: Sort LPC child nodes by unit address ARM: dts: aspeed: Add reg hints to syscon children ARM: dts: aspeed: Cleanup lpc-ctrl and snoop regs ARM: dts: witherspoon: Cleanup gpio-keys-polled properties ARM: dts: swift: Cleanup gpio-keys-polled properties ARM: dts: fp5280g2: Cleanup gpio-keys-polled properties ARM: dts: vesnin: Add unit address for memory node ARM: dts: aspeed-g5: Use recommended generic node name for SDMC ARM: dts: aspeed-g5: Move EDAC node to APB dt-bindings: misc: Document reg for aspeed, p2a-ctrl nodes dt-bindings: pinctrl: aspeed: Add reg property as a hint Link: https://lore.kernel.org/r/CACPK8XepSy6D4CNWjSWDDK0p7Dx_rneWne4t4uyy=di5nx3zmA@mail.gmail.com Signed-off-by: Olof Johansson commit 5ad443607d240d0a17bf72dd391137ef851de982 Merge: bba9d2b16309 82720a53472d Author: Olof Johansson Date: Sun Jan 19 22:48:26 2020 -0800 Merge tag 'at91-5.6-defconfig-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/defconfig AT91 defconfig for 5.6 #2 - Add pit64 and sdhci support for at91_dt * tag 'at91-5.6-defconfig-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: configs: at91: enable MMC_SDHCI_OF_AT91 and MICROCHIP_PIT64B Link: https://lore.kernel.org/r/20200119235223.GA92283@piout.net Signed-off-by: Olof Johansson commit 55a03ac8374d1f6ad149624419777bfbf077dc42 Merge: 71acc94c4932 1e5f532c2737 Author: Olof Johansson Date: Sun Jan 19 22:48:11 2020 -0800 Merge tag 'at91-5.6-dt-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt AT91 DT for 5.6 #2 - Add sam9x60 dtsi - New board sam9x60 Evaluation Kit * tag 'at91-5.6-dt-2' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sam9x60: add device tree for soc and board dt-bindings: arm: add sam9x60-ek board dt-bindings: atmel-gpbr: add microchip,sam9x60-gpbr dt-bindings: atmel-smc: add microchip,sam9x60-smc dt-bindings: atmel-sysreg: add microchip,sam9x60-ddramc dt-bindings: atmel-nand: add microchip,sam9x60-pmecc dt-bindings: atmel-matrix: add microchip,sam9x60-matrix dt-bindings: at91-sama5d2_adc: add microchip,sam9x60-adc dt-bindings: atmel-isi: add microchip,sam9x60-isi dt-bindings: atmel-can: add microchip,sam9x60-can dt-bindings: at_xdmac: add microchip,sam9x60-dma dt-bindings: at_xdmac: remove wildcard Link: https://lore.kernel.org/r/20200119234707.GA90094@piout.net Signed-off-by: Olof Johansson commit 71acc94c493299b68061bbf0d272590b903bd4a0 Merge: b744f09879a1 62b5efc919b1 Author: Olof Johansson Date: Sun Jan 19 22:47:46 2020 -0800 Merge tag 'v5.6-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt DSI display for px30 evaluation board and a number of cleanups accross multiple socs. * tag 'v5.6-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Kill off "simple-panel" compatibles arm64: dts: rockchip: rename dwmmc node names to mmc arm64: dts: rockchip: hook up the px30-evb dsi display arm64: dts: rockchip: Enable sdio0 and uart0 on rk3399-roc-pc-mezzanine arm64: dts: rockchip: add reg property to brcmf sub-nodes arm64: dts: rockchip: fix dwmmc clock name for rk3308 arm64: dts: rockchip: fix dwmmc clock name for px30 Link: https://lore.kernel.org/r/7641353.lIegmeFAIi@phil Signed-off-by: Olof Johansson commit b744f09879a178cb0bca762a9a070c7151750294 Merge: faaa9f6e8ab9 8039c828a6cb Author: Olof Johansson Date: Sun Jan 19 22:47:27 2020 -0800 Merge tag 'v5.6-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt Removal of the simple-panel compatible and some minor additional cleanups. * tag 'v5.6-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: Kill off "simple-panel" compatibles ARM: dts: rockchip: rename dwmmc node names to mmc ARM: dts: rockchip: add reg property to brcmf sub node for rk3188-bqedison2qc Link: https://lore.kernel.org/r/3473489.DgqFdXXe5V@phil Signed-off-by: Olof Johansson commit feec214afb53f17554c9c0c85f72de709b7ba3e4 Author: Amol Grover Date: Sat Jan 18 09:54:34 2020 +0530 drivers: soc: ti: knav_qmss_queue: Pass lockdep expression to RCU lists inst->handles is traversed using list_for_each_entry_rcu outside an RCU read-side critical section but under the protection of knav_dev_lock. Hence, add corresponding lockdep expression to silence false-positive lockdep warnings, and harden RCU lists. Add macro for the corresponding lockdep expression. Link: https://lore.kernel.org/r/20200118042433.4968-1-frextrite@gmail.com Signed-off-by: Amol Grover Acked-by: Santosh Shilimkar Signed-off-by: Olof Johansson commit 39be9e84f65be599919c7069bdad24dc2d9cd65d Author: Jim Wright Date: Wed Dec 18 15:41:14 2019 -0600 ARM: dts: aspeed: rainier: Add UCD90320 power sequencer Change Rainier device tree to use UCD90320 chip and only bind driver to port which excepts PMBus commands. Signed-off-by: Jim Wright Signed-off-by: Joel Stanley commit 09fa16f065a583957ab536accf1cdcd33071969f Author: Eddie James Date: Fri Nov 8 15:14:35 2019 -0600 ARM: dts: aspeed: rainier: Switch PSUs to unknown version Rainier can use either version of the IBM CFFPS, so don't set the version in the devicetree so the driver can detect it automatically. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit d7ca2d19c751b6715e9cb899a6b94f47b3499d02 Merge: 3d4743131b8d 5f9935f514d6 Author: Dave Airlie Date: Mon Jan 20 14:09:23 2020 +1000 Merge tag 'drm-msm-next-2020-01-14' of https://gitlab.freedesktop.org/drm/msm into drm-next + sc7180 display + DSI support + a618 (sc7180) support + more UBWC (bandwidth compression) support + various cleanups to handle devices that use vs don't use zap fw, etc + usual random cleanups and fixes Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/ Date: Sun Jan 19 19:47:04 2020 -0700 Merge branch 'work.openat2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs into for-5.6/io_uring-vfs Pull in Al's openat2 branch, since we'll need that for the openat2 support. * 'work.openat2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: Documentation: path-lookup: include new LOOKUP flags selftests: add openat2(2) selftests open: introduce openat2(2) syscall namei: LOOKUP_{IN_ROOT,BENEATH}: permit limited ".." resolution namei: LOOKUP_IN_ROOT: chroot-like scoped resolution namei: LOOKUP_BENEATH: O_BENEATH-like scoped resolution namei: LOOKUP_NO_XDEV: block mountpoint crossing namei: LOOKUP_NO_MAGICLINKS: block magic-link resolution namei: LOOKUP_NO_SYMLINKS: block symlink resolution namei: allow set_root() to produce errors namei: allow nd_jump_link() to produce errors nsfs: clean-up ns_get_path() signature to return int namei: only return -ECHILD from follow_dotdot_rcu() commit 3d4743131b8de970faa4b979ead0fadfe5d2de9d Merge: df95968ff789 def9d2780727 Author: Dave Airlie Date: Mon Jan 20 11:08:11 2020 +1000 Backmerge v5.5-rc7 into drm-next msm needs 5.5-rc4, go to the latest. Signed-off-by: Dave Airlie commit 82720a53472db7e4313342bb778a6e6fd910c6c6 Author: Claudiu Beznea Date: Wed Jan 15 12:59:46 2020 +0200 ARM: configs: at91: enable MMC_SDHCI_OF_AT91 and MICROCHIP_PIT64B Enable MMC_SDHCI_OF_AT91 and MICROCHIP_PIT64B. These are necessary for SAM9X60. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1579085987-13976-5-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit 5d3805af279c93ef49a64701f35254676d709622 Author: Dan Carpenter Date: Mon Jan 13 16:23:46 2020 +0300 ubi: Fix an error pointer dereference in error handling code If "seen_pebs = init_seen(ubi);" fails then "seen_pebs" is an error pointer and we try to kfree() it which results in an Oops. This patch re-arranges the error handling so now it only frees things which have been allocated successfully. Fixes: daef3dd1f0ae ("UBI: Fastmap: Add self check to detect absent PEBs") Signed-off-by: Dan Carpenter Signed-off-by: Richard Weinberger commit ff90bdfb206e49c8b418811efbdd0c77380fa8c2 Author: Quanyang Wang Date: Tue Jan 14 13:43:11 2020 +0800 ubifs: Fix memory leak from c->sup_node The c->sup_node is allocated in function ubifs_read_sb_node but is not freed. This will cause memory leak as below: unreferenced object 0xbc9ce000 (size 4096): comm "mount", pid 500, jiffies 4294952946 (age 315.820s) hex dump (first 32 bytes): 31 18 10 06 06 7b f1 11 02 00 00 00 00 00 00 00 1....{.......... 00 10 00 00 06 00 00 00 00 00 00 00 08 00 00 00 ................ backtrace: [] ubifs_read_superblock+0x48/0xebc [] ubifs_mount+0x974/0x1420 [<8589ecc3>] legacy_get_tree+0x2c/0x50 [<5f1fb889>] vfs_get_tree+0x28/0xfc [] do_mount+0x4f8/0x748 [<4151f538>] ksys_mount+0x78/0xa0 [] ret_fast_syscall+0x0/0x54 [<1cc40005>] 0x7ea02790 Free it in ubifs_umount and in the error path of mount_ubifs. Fixes: fd6150051bec ("ubifs: Store read superblock node") Signed-off-by: Quanyang Wang Signed-off-by: Richard Weinberger commit d65197ad52494bed3b5e64708281b8295f76c391 Author: Johannes Berg Date: Fri Dec 13 10:01:28 2019 +0100 um: Fix time-travel=inf-cpu with xor/raid6 Today, I erroneously built a time-travel configuration with btrfs enabled, and noticed it cannot boot in time-travel=inf-cpu mode, both xor and raid6 speed measurement gets stuck. For xor, work around it by picking the first algorithm if inf-cpu mode is enabled. For raid6, I didn't find such a workaround, so disallow enabling time-travel mode if RAID6_PQ_BENCHMARK is enabled. With this, and RAID6_PQ_BENCHMARK disabled, I can boot a kernel that has btrfs enabled in time-travel=inf-cpu mode. Signed-off-by: Johannes Berg Acked-by: Anton Ivanov Signed-off-by: Richard Weinberger commit 87c9366e17259040a9118e06b6dc8de986e5d3d1 Author: Johannes Berg Date: Wed Dec 4 17:43:46 2019 +0100 Revert "um: Enable CONFIG_CONSTRUCTORS" This reverts commit 786b2384bf1c ("um: Enable CONFIG_CONSTRUCTORS"). There are two issues with this commit, uncovered by Anton in tests on some (Debian) systems: 1) I completely forgot to call any constructors if CONFIG_CONSTRUCTORS isn't set. Don't recall now if it just wasn't needed on my system, or if I never tested this case. 2) With that fixed, it works - with CONFIG_CONSTRUCTORS *unset*. If I set CONFIG_CONSTRUCTORS, it fails again, which isn't totally unexpected since whatever wanted to run is likely to have to run before the kernel init etc. that calls the constructors in this case. Basically, some constructors that gcc emits (libc has?) need to run very early during init; the failure mode otherwise was that the ptrace fork test already failed: ---------------------- $ ./linux mem=512M Core dump limits : soft - 0 hard - NONE Checking that ptrace can change system call numbers...check_ptrace : child exited with exitcode 6, while expecting 0; status 0x67f Aborted ---------------------- Thinking more about this, it's clear that we simply cannot support CONFIG_CONSTRUCTORS in UML. All the cases we need now (gcov, kasan) involve not use of the __attribute__((constructor)), but instead some constructor code/entry generated by gcc. Therefore, we cannot distinguish between kernel constructors and system constructors. Thus, revert this commit. Cc: stable@vger.kernel.org [5.4+] Fixes: 786b2384bf1c ("um: Enable CONFIG_CONSTRUCTORS") Reported-by: Anton Ivanov Signed-off-by: Johannes Berg Acked-by: Anton Ivanov Signed-off-by: Richard Weinberger commit 40814b98a57089463eb4be09c72205f551481f39 Author: Brendan Higgins Date: Tue Dec 10 14:34:03 2019 -0800 um: Mark non-vector net transports as obsolete UML_NET_VECTOR now supports filters compiled with pcap outside of UML; it also supports: EoGRE, EoL2TPv3, RAW (+/- BPF), TAP and BESS. While vector drivers are not 1:1 replacements for the existing drivers, you can achieve the same topologies and the same connectivity at much higher performance (2.5 to 9 Gbit on mid-range Ryzen desktop) - the old drivers test out in the 500Mbit range on the same hardware. For all these reasons, the non-vector based transports are now unnecessary, and some, most notably pcap and vde are maintenance burdens. Thus, it makes sense to at least start thinking about removing the non-vector transports, so for now, mark them as obsolete. Link: https://lore.kernel.org/lkml/15f048d3-07ab-61c1-c6e0-0712e626dd33@cambridgegreys.com/T/#u Suggested-by: Anton Ivanov Signed-off-by: Brendan Higgins Signed-off-by: Richard Weinberger commit f1dc67d0e7df21b3d27beb3ec7b2c9e2b721daff Author: Johannes Berg Date: Sat May 25 00:08:43 2019 +0200 um: Add an option to make serial driver non-raw In some cases, for example when the program(s) running inside UML isn't/aren't interactive (like the hwsim tests for wpa_supplicant) there's really no value in having the serial lines configured to be raw as they are now by default. Setting them to non-raw lets one abort the whole UML with Ctrl-C, which is really the right thing to do in these cases, basically the whole UML instance is more like a single (testing) program. Add a "ssl-non-raw" option to UML to support such a mode. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit b3f7e3f23a763ccaae7b52d88d2c91e66c80d406 Merge: 4ee9e6e027c0 7008ee121089 Author: David S. Miller Date: Sun Jan 19 22:10:04 2020 +0100 Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net commit 31a9b0b11b1c5264433a4fa1e1e1e8aa03954b1c Author: Zenghui Yu Date: Sun Jan 19 17:06:04 2020 +0800 KVM: arm/arm64: vgic: Drop the kvm_vgic_register_mmio_region() kvm_vgic_register_mmio_region() was introduced in commit 4493b1c4866a ("KVM: arm/arm64: vgic-new: Add MMIO handling framework") but never used, and even never implemented. Remove it to avoid confusing readers. Reported-by: Haibin Wang Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200119090604.398-1-yuzenghui@huawei.com commit 821c10c2ae0bac5a8503cc7e961e7af90ea676eb Author: Zenghui Yu Date: Tue Jan 14 19:22:12 2020 +0800 KVM: arm/arm64: vgic-its: Properly check the unmapped coll in DISCARD handler Discard is supposed to fail if the collection is not mapped to any target redistributor. We currently check if the collection is mapped by "ite->collection" but this is incomplete (e.g., mapping a LPI to an unmapped collection also results in a non NULL ite->collection). What actually needs to be checked is its_is_collection_mapped(), let's turn to it. Also take this chance to remove an extra blank line. Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20200114112212.1411-1-yuzenghui@huawei.com commit 1cfbb484de158e378e8971ac40f3082e53ecca55 Author: Mark Rutland Date: Wed Jan 8 13:43:24 2020 +0000 KVM: arm/arm64: Correct AArch32 SPSR on exception entry Confusingly, there are three SPSR layouts that a kernel may need to deal with: (1) An AArch64 SPSR_ELx view of an AArch64 pstate (2) An AArch64 SPSR_ELx view of an AArch32 pstate (3) An AArch32 SPSR_* view of an AArch32 pstate When the KVM AArch32 support code deals with SPSR_{EL2,HYP}, it's either dealing with #2 or #3 consistently. On arm64 the PSR_AA32_* definitions match the AArch64 SPSR_ELx view, and on arm the PSR_AA32_* definitions match the AArch32 SPSR_* view. However, when we inject an exception into an AArch32 guest, we have to synthesize the AArch32 SPSR_* that the guest will see. Thus, an AArch64 host needs to synthesize layout #3 from layout #2. This patch adds a new host_spsr_to_spsr32() helper for this, and makes use of it in the KVM AArch32 support code. For arm64 we need to shuffle the DIT bit around, and remove the SS bit, while for arm we can use the value as-is. I've open-coded the bit manipulation for now to avoid having to rework the existing PSR_* definitions into PSR64_AA32_* and PSR32_AA32_* definitions. I hope to perform a more thorough refactoring in future so that we can handle pstate view manipulation more consistently across the kernel tree. Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier Reviewed-by: Alexandru Elisei Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200108134324.46500-4-mark.rutland@arm.com commit 3c2483f15499b877ccb53250d88addb8c91da147 Author: Mark Rutland Date: Wed Jan 8 13:43:23 2020 +0000 KVM: arm/arm64: Correct CPSR on exception entry When KVM injects an exception into a guest, it generates the CPSR value from scratch, configuring CPSR.{M,A,I,T,E}, and setting all other bits to zero. This isn't correct, as the architecture specifies that some CPSR bits are (conditionally) cleared or set upon an exception, and others are unchanged from the original context. This patch adds logic to match the architectural behaviour. To make this simple to follow/audit/extend, documentation references are provided, and bits are configured in order of their layout in SPSR_EL2. This layout can be seen in the diagram on ARM DDI 0487E.a page C5-426. Note that this code is used by both arm and arm64, and is intended to fuction with the SPSR_EL2 and SPSR_HYP layouts. Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier Reviewed-by: Alexandru Elisei Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200108134324.46500-3-mark.rutland@arm.com commit a425372e733177eb0779748956bc16c85167af48 Author: Mark Rutland Date: Wed Jan 8 13:43:22 2020 +0000 KVM: arm64: Correct PSTATE on exception entry When KVM injects an exception into a guest, it generates the PSTATE value from scratch, configuring PSTATE.{M[4:0],DAIF}, and setting all other bits to zero. This isn't correct, as the architecture specifies that some PSTATE bits are (conditionally) cleared or set upon an exception, and others are unchanged from the original context. This patch adds logic to match the architectural behaviour. To make this simple to follow/audit/extend, documentation references are provided, and bits are configured in order of their layout in SPSR_EL2. This layout can be seen in the diagram on ARM DDI 0487E.a page C5-429. Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier Reviewed-by: Alexandru Elisei Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200108134324.46500-2-mark.rutland@arm.com commit 1559b7583ff6ed018c5320d1503fa80b435775f0 Author: James Morse Date: Tue Dec 17 12:38:09 2019 +0000 KVM: arm/arm64: Re-check VMA on detecting a poisoned page When we check for a poisoned page, we use the VMA to tell userspace about the looming disaster. But we pass a pointer to this VMA after having released the mmap_sem, which isn't a good idea. Instead, stash the shift value that goes with this pfn while we are holding the mmap_sem. Reported-by: Marc Zyngier Signed-off-by: James Morse Signed-off-by: Marc Zyngier Reviewed-by: Christoffer Dall Link: https://lore.kernel.org/r/20191211165651.7889-3-maz@kernel.org Link: https://lore.kernel.org/r/20191217123809.197392-1-james.morse@arm.com commit de9375634b1ef49091004d08e5cd4f68695adf0f Author: YueHaibing Date: Wed Nov 13 09:40:45 2019 +0800 KVM: arm: Remove duplicate include Remove duplicate header which is included twice. Signed-off-by: YueHaibing Signed-off-by: Marc Zyngier Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20191113014045.15276-1-yuehaibing@huawei.com commit c3e35409b54e8833ab936e667e3e7fcb8bdace00 Author: Shannon Zhao Date: Mon Dec 2 15:42:11 2019 +0800 KVM: ARM: Call hyp_cpu_pm_exit at the right place It doesn't needs to call hyp_cpu_pm_exit() in init_hyp_mode() when some error occurs. hyp_cpu_pm_exit() only needs to be called in kvm_arch_init() if init_subsystems() fails. So move hyp_cpu_pm_exit() out from teardown_hyp_mode() and call it directly in kvm_arch_init(). Signed-off-by: Shannon Zhao Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1575272531-3204-1-git-send-email-shannon.zhao@linux.alibaba.com commit f5523423defb0d929e23813c8dd16c0131043a8c Author: Russell King Date: Sat Dec 28 11:57:14 2019 +0000 arm64: kvm: Fix IDMAP overlap with HYP VA Booting 5.4 on LX2160A reveals that KVM is non-functional: kvm: Limiting the IPA size due to kernel Virtual Address limit kvm [1]: IPA Size Limit: 43bits kvm [1]: IDMAP intersecting with HYP VA, unable to continue kvm [1]: error initializing Hyp mode: -22 Debugging shows: kvm [1]: IDMAP page: 81a26000 kvm [1]: HYP VA range: 0:22ffffffff as RAM is located at: 80000000-fbdfffff : System RAM 2080000000-237fffffff : System RAM Comparing this with the same kernel on Armada 8040 shows: kvm: Limiting the IPA size due to kernel Virtual Address limit kvm [1]: IPA Size Limit: 43bits kvm [1]: IDMAP page: 2a26000 kvm [1]: HYP VA range: 4800000000:493fffffff ... kvm [1]: Hyp mode initialized successfully which indicates that hyp_va_msb is set, and is always set to the opposite value of the idmap page to avoid the overlap. This does not happen with the LX2160A. Further debugging shows vabits_actual = 39, kva_msb = 38 on LX2160A and kva_msb = 33 on Armada 8040. Looking at the bit layout of the HYP VA, there is still one bit available for hyp_va_msb. Set this bit appropriately. This allows KVM to be functional on the LX2160A, but without any HYP VA randomisation: kvm: Limiting the IPA size due to kernel Virtual Address limit kvm [1]: IPA Size Limit: 43bits kvm [1]: IDMAP page: 81a24000 kvm [1]: HYP VA range: 4000000000:62ffffffff ... kvm [1]: Hyp mode initialized successfully Fixes: ed57cac83e05 ("arm64: KVM: Introduce EL2 VA randomisation") Signed-off-by: Russell King [maz: small additional cleanups, preserved case where the tag is legitimately 0 and we can just use the mask, Fixes tag] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/E1ilAiY-0000MA-RG@rmk-PC.armlinux.org.uk commit 5f675c56ed262103b825cbab0e96c34fe681318d Author: Zenghui Yu Date: Fri Dec 20 19:18:33 2019 +0800 KVM: arm/arm64: vgic: Handle GICR_PENDBASER.PTZ filed as RAZ Although guest will hardly read and use the PTZ (Pending Table Zero) bit in GICR_PENDBASER, let us emulate the architecture strictly. As per IHI 0069E 9.11.30, PTZ field is WO, and reads as 0. Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20191220111833.1422-1-yuzenghui@huawei.com commit 8c58be34494b7f1b2adb446e2d8beeb90e5de65b Author: Eric Auger Date: Fri Dec 13 10:42:37 2019 +0100 KVM: arm/arm64: vgic-its: Fix restoration of unmapped collections Saving/restoring an unmapped collection is a valid scenario. For example this happens if a MAPTI command was sent, featuring an unmapped collection. At the moment the CTE fails to be restored. Only compare against the number of online vcpus if the rdist base is set. Fixes: ea1ad53e1e31a ("KVM: arm64: vgic-its: Collection table save/restore") Signed-off-by: Eric Auger Signed-off-by: Marc Zyngier Reviewed-by: Zenghui Yu Link: https://lore.kernel.org/r/20191213094237.19627-1-eric.auger@redhat.com commit b6ae256afd32f96bec0117175b329d0dd617655e Author: Christoffer Dall Date: Thu Dec 12 20:50:55 2019 +0100 KVM: arm64: Only sign-extend MMIO up to register width On AArch64 you can do a sign-extended load to either a 32-bit or 64-bit register, and we should only sign extend the register up to the width of the register as specified in the operation (by using the 32-bit Wn or 64-bit Xn register specifier). As it turns out, the architecture provides this decoding information in the SF ("Sixty-Four" -- how cute...) bit. Let's take advantage of this with the usual 32-bit/64-bit header file dance and do the right thing on AArch64 hosts. Signed-off-by: Christoffer Dall Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191212195055.5541-1-christoffer.dall@arm.com commit 4ee9e6e027c06eb1dd1cdbe025d461e407ece755 Merge: 95ae2d1d1149 b3073dfba8ee Author: David S. Miller Date: Sun Jan 19 16:23:53 2020 +0100 Merge branch 'mlxsw-Add-tunnel-devlink-trap-support' Ido Schimmel says: ==================== mlxsw: Add tunnel devlink-trap support This patch set from Amit adds support in mlxsw for tunnel traps and a few additional layer 3 traps that can report drops and exceptions via devlink-trap. These traps allow the user to more quickly diagnose problems relating to tunnel decapsulation errors, such as packet being too short to decapsulate or a packet containing wrong GRE key in its GRE header. Patch set overview: Patches #1-#4 add three additional layer 3 traps. Two of which are mlxsw-specific as they relate to hardware-specific errors. The patches include documentation of each trap and selftests. Patches #5-#8 are preparations. They ensure that the correct ECN bits are set in the outer header during IPinIP encapsulation and that packets with an invalid ECN combination in underlay and overlay are trapped to the kernel and not decapsulated in hardware. Patches #9-#15 add support for two tunnel related traps. Each trap is documented and selftested using both VXLAN and IPinIP tunnels, if applicable. ==================== Signed-off-by: David S. Miller commit b3073dfba8ee95697ebcafab90489ee847a74433 Author: Amit Cohen Date: Sun Jan 19 15:01:00 2020 +0200 selftests: devlink_trap_tunnel_vxlan: Add test case for overlay_smac_is_mc Test that the trap is triggered under the right conditions and that devlink counters increase when action is trap. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 3aed0722f7d75240ab7ea0ee2813f6a82f53c60e Author: Amit Cohen Date: Sun Jan 19 15:00:59 2020 +0200 mlxsw: Add OVERLAY_SMAC_MC trap Add a trap for NVE packets that the device decided to drop because their overlay source MAC is multicast. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit c3cae4916e57d2f0364d5e7769218547fb1b7c60 Author: Amit Cohen Date: Sun Jan 19 15:00:58 2020 +0200 devlink: Add overlay source MAC is multicast trap Add packet trap that can report NVE packets that the device decided to drop because their overlay source MAC is multicast. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 27942c700017ba84c8fcfcc921bbaf8a91caaefd Author: Amit Cohen Date: Sun Jan 19 15:00:57 2020 +0200 selftests: devlink_trap_tunnel_ipip: Add test case for decap_error Test that the trap is triggered under the right conditions and that devlink counters increase. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ca264ef6ed7cc1f15201d298a44fb79e2c63449c Author: Amit Cohen Date: Sun Jan 19 15:00:56 2020 +0200 selftests: devlink_trap_tunnel_vxlan: Add test case for decap_error Test that the trap is triggered under the right conditions and that devlink counters increase. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a318bf621a6eabc45e51ed9297b4c01991bfd7e4 Author: Amit Cohen Date: Sun Jan 19 15:00:55 2020 +0200 mlxsw: Add tunnel devlink-trap support Add the trap IDs and trap group used to report tunnel drops. Register tunnel packet traps and associated tunnel trap group with devlink during driver initialization. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 13c056ec7d006b11557cebd9f1803edd646d2876 Author: Amit Cohen Date: Sun Jan 19 15:00:54 2020 +0200 devlink: Add tunnel generic packet traps Add packet traps that can report packets that were dropped during tunnel decapsulation. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit f528dfc460ef015bb612595112508ef469d0d3b9 Author: Amit Cohen Date: Sun Jan 19 15:00:53 2020 +0200 mlxsw: spectrum_trap: Reorder cases according to enum order Move L3_DROPS case to appear after L2_DROPS case. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 4a44ee67a7cd6603d28d71f8fe5e4e0e4dfae1e5 Author: Amit Cohen Date: Sun Jan 19 15:00:52 2020 +0200 mlxsw: Add ECN configurations with IPinIP tunnels Initialize ECN mapping registers during router init according to INET_ECN_encapsulate() and INET_ECN_decapsulate(). For IP-in-IP encapsulation, this is required to ensure that ECN bits in the underlay are set in accordance with the kernel. For decapsulation, this is required to ensure that packets with invalid ECN combination in underlay and overlay are trapped to the kernel and not forwarded. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 839607e2ec8dbe7c3e43995921dae487976e8899 Author: Amit Cohen Date: Sun Jan 19 15:00:51 2020 +0200 mlxsw: reg: Add Tunneling IPinIP Decapsulation ECN Mapping Register This register configures the actions that are done during IPinIP decapsulation based on the ECN bits. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 20174900ad38cb090616add90665e2ff41c29dc9 Author: Amit Cohen Date: Sun Jan 19 15:00:50 2020 +0200 mlxsw: reg: Add Tunneling IPinIP Encapsulation ECN Mapping Register This register performs mapping from overlay ECN to underlay ECN during IPinIP encapsulation. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 196442ec5f13751ed0c66d5c4bc9b58288dea430 Author: Amit Cohen Date: Sun Jan 19 15:00:49 2020 +0200 mlxsw: Add NON_ROUTABLE trap Add a trap for packets that the device decided to drop because they are not supposed to be routed. For example, IGMP queries can be flooded by the device in layer 2 and reach the router. Such packets should not be routed and instead dropped. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 95f0ead8f04bec18e474594ef585f3734bd85b4c Author: Amit Cohen Date: Sun Jan 19 15:00:48 2020 +0200 devlink: Add non-routable packet trap Add packet trap that can report packets that reached the router, but are non-routable. For example, IGMP queries can be flooded by the device in layer 2 and reach the router. Such packets should not be routed and instead dropped. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 740e87bc3db8fe299e17877b7055e9ae3c33e4e6 Author: Amit Cohen Date: Sun Jan 19 15:00:47 2020 +0200 selftests: devlink_trap_l3_drops: Add test cases of irif and erif disabled Add test cases to check that packets routed through disabled RIFs and packets routed from disabled RIFs are dropped and devlink counters increase when the action is trap. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 5b051621609d535fac6bdcd232530cc5248e791d Author: Amit Cohen Date: Sun Jan 19 15:00:46 2020 +0200 mlxsw: Add irif and erif disabled traps IRIF_DISABLED and ERIF_DISABLED are driver specific traps. Packets are dropped for these reasons when they need to be routed through/from existing router interfaces (RIF) which are disabled. Add devlink driver-specific traps and mlxsw trap IDs used to report these traps. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 95ae2d1d114989ce07db59dcf357eb78d7357fe1 Merge: 0c58ac1e0155 278d51f24330 Author: David S. Miller Date: Sun Jan 19 16:17:07 2020 +0100 Merge branch 'for-net-next' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== Mellanox, mlx5 E-Switch chains and prios This series has two parts, 1) A merge commit with mlx5-next branch that include updates for mlx5 HW layouts needed for this and upcoming submissions. 2) From Paul, Increase the number of chains and prios Currently the Mellanox driver supports offloading tc rules that are defined on the first 4 chains and the first 16 priorities. The restriction stems from the firmware flow level enforcement requiring a flow table of a certain level to point to a flow table of a higher level. This limitation may be ignored by setting the ignore_flow_level bit when creating flow table entries. Use unmanaged tables and ignore flow level to create more tables than declared by fs_core steering. Manually manage the connections between the tables themselves. HW table is instantiated for every tc tuple. The miss rule of every table either jumps to the next table, or continues to slow_fdb. This logic is realized by following this sequence: 1. Create an auto-grouped flow table for the specified priority with reserved entries Reserved entries are allocated at the end of the flow table. Flow groups are evaluated in sequence and therefore it is guaranteed that the flow group defined on the last FTEs will be the last to evaluate. Define a "match all" flow group on the reserved entries, providing the platform to add table miss actions. 2. Set the miss rule action to jump to the next table or the slow_fdb. 3. Link the previous priority table to point to the new table by updating its miss rule. Please pull and let me know if there's any problem. ==================== Signed-off-by: David S. Miller commit 0c58ac1e0155fdbefb976ff2d321d1093b92fe50 Author: Dejin Zheng Date: Fri Jan 17 23:10:42 2020 +0800 net: phy: adin: fix a warning about msleep found a warning by the following command: ./scripts/checkpatch.pl -f drivers/net/phy/adin.c WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.rst #628: FILE: drivers/net/phy/adin.c:628: + msleep(10); Signed-off-by: Dejin Zheng Signed-off-by: David S. Miller commit d82f28726f6c1bae7f696b57d9d93303d6b7a021 Merge: 7f013edebaa4 74984a1904b3 Author: David S. Miller Date: Sun Jan 19 16:00:17 2020 +0100 Merge branch 'Rate-adaptation-for-Felix-DSA-switch' Vladimir Oltean says: ==================== Rate adaptation for Felix DSA switch When operating the MAC at 2.5Gbps (2500Base-X and USXGMII/QSXGMII) and in combination with certain PHYs, it is possible that the copper side may operate at lower link speeds. In this case, it is the PHY who has a MAC inside of it that emits pause frames towards the switch's MAC, telling it to slow down so that the transmission is lossless. These patches are the support needed for the switch side of things to work. ==================== Signed-off-by: David S. Miller commit 74984a1904b3768625ef45032643f1dc2b21eb31 Author: Alex Marginean Date: Thu Jan 16 20:19:33 2020 +0200 net: dsa: felix: Allow PHY to AN 10/100/1000 with 2500 serdes link If the serdes link is set to 2500 using interfce type 2500base-X, lower link speeds over on the line side should still be supported. Rate adaptation is done out of band, in our case using AQR PHYs this is done using flow control. Signed-off-by: Alex Marginean Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit f3660937e17c6fcc3a9184dd7d5091110e7e9094 Author: Alex Marginean Date: Thu Jan 16 20:19:32 2020 +0200 net: dsa: felix: Handle PAUSE RX regardless of AN result Flow control is used with 2500Base-X and AQR PHYs to do rate adaptation between line side 100/1000 links and MAC running at 2.5G. This is independent of the flow control configuration settled on line side though AN. In general, allowing the MAC to handle flow control even if not negotiated with the link partner should not be a problem, so the patch just enables it in all cases. Signed-off-by: Alex Marginean Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 7b2d7faa09fcbd0184634544f732f4b2da0b20a8 Merge: 270f104ba26f d344961f55fd Author: Greg Kroah-Hartman Date: Sun Jan 19 14:59:05 2020 +0100 Merge tag 'iio-for-5.6b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Second set of new device support, features and minor fixes for IIO in the 5.6 cycle Just a small set this time. As we are very near the merge window, I've rolled a few fixes in here rather than adding noise just before release. A short delay here will do little harm. New device support * adis16480 - Add support for adis16490. After earlier rework this is simple ID plus chip info. Features * kxcjk1013 - mount matrix support. * lsm_6dsx - mount matrix support. Cleanups / minor or late breaking fixes * ad7124 - add support to ad-sigma-delta and use it in this driver to allow the the interrupt type to be IRQF_TRIGGER_LOW unlike most other devices using this framework. * adis - use delay structure now available in SPI to handle transfer delays - introduce a timeouts structure to allow support of new devices * ak8975 - drop platform data support. No one is using it and it adds complexity. - use device_get_match_data rather than open coding much the same thing. * dht11 - drop meaningless todo * at91-samad2_adc - switch to dma_request_chan * altas-sensor - add a helper function to compute number of channels. Needed for new device support that is under review. * bma400 - add a lower bound check on scale. * inv_mpu6050 - add support for temperature data in the fifos for all chips. - support an odd situation where a board supports only interrupt triggering on both edges. * st_lsm6dsx - check and handle potential error return. * st_sensors - fix some values for the LSM9DS0 which is ever so slightly different from other devices using the same whoami value. - switch over to generic functions from dt ones, avoiding need for separate ACPI support. * stm32-adc - switch to dma_request_chan - suppress an error print in deferred probe case. * stm32-dac - drop private data structure element for reset controller as only used in probe. - reflect more cleanly that the reset controller is optional whilst ensuring that if is specified any errors are caught. * stm32-dfsdm - switch to dma_request_chan - fix missing application of formatting to single conversions. - ensure the sampling rate is updated when the oversampling ratio is changed. * tag 'iio-for-5.6b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (29 commits) iio: dac: stm32-dac: better handle reset controller failures iio: dac: stm32-dac: use reset controller only at probe time dt-bindings: iio: accel: kxcjk1013: Document mount-matrix property iio: accel: kxcjk1013: Support orientation matrix iio: imu: st_lsm6dsx: add mount matrix support iio: adc: stm32-adc: don't print an error on probe deferral dt-bindings: iio: adis16480: add compatible entry for ADIS16490 iio: imu: adis16480: Add support for ADIS16490 iio: accel: bma400: prevent setting accel scale too low iio: imu/mpu6050: support dual-edge IRQ iio: imu: inv_mpu6050: add fifo temperature data support iio: magnetometer: ak8975: Convert to use device_get_match_data() iio: magnetometer: ak8975: Get rid of platform data iio: adc: ad7124: Set IRQ type to falling iio: adc: ad-sigma-delta: Allow custom IRQ flags iio: imu: adis: use new `delay` structure for SPI transfer delays iio: adc: stm32-dfsdm: adapt sampling rate to oversampling ratio iio: adc: stm32-dfsdm: fix single conversion iio: st_sensors: Make use of device properties iio: st_sensors: Drop redundant parameter from st_sensors_of_name_probe() ... commit 7f013edebaa4ea910bc88f324d24f6765435d644 Merge: 9aaa29494030 567d746b55bc Author: David S. Miller Date: Sun Jan 19 10:29:05 2020 +0100 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, they are: 1) Incorrect uapi header comment in bitwise, from Jeremy Sowden. 2) Fetch flow statistics if flow is still active. 3) Restrict flow matching on hardware based on input device. 4) Add nf_flow_offload_work_alloc() helper function. 5) Remove the last client of the FLOW_OFFLOAD_DYING flag, use teardown instead. 6) Use atomic bitwise operation to operate with flow flags. 7) Add nf_flowtable_hw_offload() helper function to check for the NF_FLOWTABLE_HW_OFFLOAD flag. 8) Add NF_FLOW_HW_REFRESH to retry hardware offload from the flowtable software datapath. 9) Remove indirect calls in xt_hashlimit, from Florian Westphal. 10) Add nf_flow_offload_tuple() helper to consolidate code. 11) Add nf_flow_table_offload_cmd() helper function. 12) A few whitespace cleanups in nf_tables in bitwise and the bitmap/hash set types, from Jeremy Sowden. 13) Cleanup netlink attribute checks in bitwise, from Jeremy Sowden. 14) Replace goto by return in error path of nft_bitwise_dump(), from Jeremy Sowden. 15) Add bitwise operation netlink attribute, also from Jeremy. 16) Add nft_bitwise_init_bool(), from Jeremy Sowden. 17) Add nft_bitwise_eval_bool(), also from Jeremy. 18) Add nft_bitwise_dump_bool(), from Jeremy Sowden. 19) Disallow hardware offload for other that NFT_BITWISE_BOOL, from Jeremy Sowden. 20) Add NFTA_BITWISE_DATA netlink attribute, again from Jeremy. 21) Add support for bitwise shift operation, from Jeremy Sowden. ==================== Signed-off-by: David S. Miller commit ccfb9299a0b63da4fde607c822e1470472a46177 Author: Michael Walle Date: Thu Jan 16 17:02:09 2020 +0100 mtd: spi-nor: Add support for at25sl321 This was tested in single, dual and quad mode on a custom board with the NXP FlexSPI controller. Signed-off-by: Michael Walle Signed-off-by: Tudor Ambarus commit f3418718c0ec934013a36d717a00554d5fbcffc5 Author: Michael Walle Date: Thu Jan 16 16:42:09 2020 +0100 mtd: spi-nor: Add support for w25q32jwm Add support for the Winbond W25Q32JW-xM flashes. These have a programmable QE bit. There is also the W25Q32JW-xQ variant which shares the ID with the W25Q32DW and W25Q32FW parts. The W25Q32JW-xQ has the QE bit hard strapped to 1, thus don't support the /HOLD and /WP pins. This was tested in single, dual and quad mode on a custom board with the NXP FlexSPI controller. Also the BP bits as well as the TB bit were tested. Signed-off-by: Michael Walle Signed-off-by: Tudor Ambarus commit 62b5efc919b12c0effc6fd5720b6d5ddc1d1ee5f Author: Rob Herring Date: Fri Jan 17 17:08:51 2020 -0600 arm64: dts: rockchip: Kill off "simple-panel" compatibles "simple-panel" is a Linux driver and has never been an accepted upstream compatible string, so remove it. Cc: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20200117230851.25434-1-robh@kernel.org Signed-off-by: Heiko Stuebner commit 8039c828a6cba966c9bdfacebff21ff823a94617 Author: Rob Herring Date: Fri Jan 17 17:08:51 2020 -0600 ARM: dts: rockchip: Kill off "simple-panel" compatibles "simple-panel" is a Linux driver and has never been an accepted upstream compatible string, so remove it. Cc: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20200117230851.25434-1-robh@kernel.org Signed-off-by: Heiko Stuebner commit 3ef7c2558f31745588473b75a655894b37e62116 Author: Johan Jonker Date: Wed Jan 15 19:52:44 2020 +0100 arm64: dts: rockchip: rename dwmmc node names to mmc Current dts files with 'dwmmc' nodes are manually verified. In order to automate this process rockchip-dw-mshc.txt has to be converted to yaml. In the new setup rockchip-dw-mshc.yaml will inherit properties from mmc-controller.yaml and synopsys-dw-mshc-common.yaml. 'dwmmc' will no longer be a valid name for a node, so change them all to 'mmc' Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200115185244.18149-2-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit fed1fc5194884a22857cc642e64b13b36ce47a12 Author: Johan Jonker Date: Wed Jan 15 19:52:43 2020 +0100 ARM: dts: rockchip: rename dwmmc node names to mmc Current dts files with 'dwmmc' nodes are manually verified. In order to automate this process rockchip-dw-mshc.txt has to be converted to yaml. In the new setup rockchip-dw-mshc.yaml will inherit properties from mmc-controller.yaml and synopsys-dw-mshc-common.yaml. 'dwmmc' will no longer be a valid name for a node, so change them all to 'mmc' Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200115185244.18149-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit d344961f55fd6321937d3bc92ad3930dea31189f Author: Etienne Carriere Date: Mon Jan 13 14:14:26 2020 +0100 iio: dac: stm32-dac: better handle reset controller failures Use devm_reset_control_get_optional_exclusive() instead of devm_reset_control_get_exclusive() as reset controller is optional. Nevertheless if reset controller is expected but reports an error, propagate the error code to the caller. In such case a nice error trace is emitted unless we're deferring the probe operation. Signed-off-by: Etienne Carriere Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron commit 4a001c96b1c6d39831be3ef957968404be96d75e Author: Etienne Carriere Date: Mon Jan 13 14:14:25 2020 +0100 iio: dac: stm32-dac: use reset controller only at probe time This change removes the reset controller reference from the local DAC instance since it is used only at probe time. Signed-off-by: Etienne Carriere Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron commit 0013ccaa136ddaa59c6fc2b2c8fbb3e865cdf8b1 Author: Dmitry Osipenko Date: Sun Jan 12 23:33:01 2020 +0300 dt-bindings: iio: accel: kxcjk1013: Document mount-matrix property The generic IIO mount-matrix property conveys physical orientation of the hardware chip. Signed-off-by: Dmitry Osipenko Acked-by: Rob Herring Signed-off-by: Jonathan Cameron commit 1bde330ca0e8173d9a735a8a0a590a6e87a366cf Author: Dmitry Osipenko Date: Sun Jan 12 23:33:00 2020 +0300 iio: accel: kxcjk1013: Support orientation matrix Hardware could be physically mounted in any possible direction and userpspace needs to be aware of the mounting orientation in order to process sensor's data correctly. In particular this helps iio-sensor-proxy to report display's orientation properly on a phone/tablet devices. Signed-off-by: Dmitry Osipenko Acked-by: Srinivas Pandruvada Signed-off-by: Jonathan Cameron commit 04e6fedb18f6899453e59a748fb95be56ef73836 Author: Martin Kepplinger Date: Mon Jan 13 11:11:40 2020 +0100 iio: imu: st_lsm6dsx: add mount matrix support Allow to read the mount-matrix device tree property and provide the mount_matrix file for userspace to read. Signed-off-by: Martin Kepplinger Signed-off-by: Jonathan Cameron commit 622b4339f93e2c2641919d405cd15e1d256f8fd3 Author: Etienne Carriere Date: Mon Jan 13 14:18:59 2020 +0100 iio: adc: stm32-adc: don't print an error on probe deferral Do not print an error trace when deferring probe for some resource. Signed-off-by: Etienne Carriere Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron commit b55eef872a96738ea9cb35774db5ce9a7d3a648f Author: Aleksa Sarai Date: Sat Dec 7 01:13:38 2019 +1100 Documentation: path-lookup: include new LOOKUP flags Now that we have new LOOKUP flags, we should document them in the relevant path-walking documentation. And now that we've settled on a common name for nd_jump_link() style symlinks ("magic links"), use that term where magic-link semantics are described. Signed-off-by: Aleksa Sarai Signed-off-by: Al Viro commit b28a10aedcd4d175470171a32f4f20b0a60a612b Author: Aleksa Sarai Date: Sat Jan 18 23:08:00 2020 +1100 selftests: add openat2(2) selftests Test all of the various openat2(2) flags. A small stress-test of a symlink-rename attack is included to show that the protections against ".."-based attacks are sufficient. The main things these self-tests are enforcing are: * The struct+usize ABI for openat2(2) and copy_struct_from_user() to ensure that upgrades will be handled gracefully (in addition, ensuring that misaligned structures are also handled correctly). * The -EINVAL checks for openat2(2) are all correctly handled to avoid userspace passing unknown or conflicting flag sets (most importantly, ensuring that invalid flag combinations are checked). * All of the RESOLVE_* semantics (including errno values) are correctly handled with various combinations of paths and flags. * RESOLVE_IN_ROOT correctly protects against the symlink rename(2) attack that has been responsible for several CVEs (and likely will be responsible for several more). Cc: Shuah Khan Signed-off-by: Aleksa Sarai Signed-off-by: Al Viro commit fddb5d430ad9fa91b49b1d34d0202ffe2fa0e179 Author: Aleksa Sarai Date: Sat Jan 18 23:07:59 2020 +1100 open: introduce openat2(2) syscall /* Background. */ For a very long time, extending openat(2) with new features has been incredibly frustrating. This stems from the fact that openat(2) is possibly the most famous counter-example to the mantra "don't silently accept garbage from userspace" -- it doesn't check whether unknown flags are present[1]. This means that (generally) the addition of new flags to openat(2) has been fraught with backwards-compatibility issues (O_TMPFILE has to be defined as __O_TMPFILE|O_DIRECTORY|[O_RDWR or O_WRONLY] to ensure old kernels gave errors, since it's insecure to silently ignore the flag[2]). All new security-related flags therefore have a tough road to being added to openat(2). Userspace also has a hard time figuring out whether a particular flag is supported on a particular kernel. While it is now possible with contemporary kernels (thanks to [3]), older kernels will expose unknown flag bits through fcntl(F_GETFL). Giving a clear -EINVAL during openat(2) time matches modern syscall designs and is far more fool-proof. In addition, the newly-added path resolution restriction LOOKUP flags (which we would like to expose to user-space) don't feel related to the pre-existing O_* flag set -- they affect all components of path lookup. We'd therefore like to add a new flag argument. Adding a new syscall allows us to finally fix the flag-ignoring problem, and we can make it extensible enough so that we will hopefully never need an openat3(2). /* Syscall Prototype. */ /* * open_how is an extensible structure (similar in interface to * clone3(2) or sched_setattr(2)). The size parameter must be set to * sizeof(struct open_how), to allow for future extensions. All future * extensions will be appended to open_how, with their zero value * acting as a no-op default. */ struct open_how { /* ... */ }; int openat2(int dfd, const char *pathname, struct open_how *how, size_t size); /* Description. */ The initial version of 'struct open_how' contains the following fields: flags Used to specify openat(2)-style flags. However, any unknown flag bits or otherwise incorrect flag combinations (like O_PATH|O_RDWR) will result in -EINVAL. In addition, this field is 64-bits wide to allow for more O_ flags than currently permitted with openat(2). mode The file mode for O_CREAT or O_TMPFILE. Must be set to zero if flags does not contain O_CREAT or O_TMPFILE. resolve Restrict path resolution (in contrast to O_* flags they affect all path components). The current set of flags are as follows (at the moment, all of the RESOLVE_ flags are implemented as just passing the corresponding LOOKUP_ flag). RESOLVE_NO_XDEV => LOOKUP_NO_XDEV RESOLVE_NO_SYMLINKS => LOOKUP_NO_SYMLINKS RESOLVE_NO_MAGICLINKS => LOOKUP_NO_MAGICLINKS RESOLVE_BENEATH => LOOKUP_BENEATH RESOLVE_IN_ROOT => LOOKUP_IN_ROOT open_how does not contain an embedded size field, because it is of little benefit (userspace can figure out the kernel open_how size at runtime fairly easily without it). It also only contains u64s (even though ->mode arguably should be a u16) to avoid having padding fields which are never used in the future. Note that as a result of the new how->flags handling, O_PATH|O_TMPFILE is no longer permitted for openat(2). As far as I can tell, this has always been a bug and appears to not be used by userspace (and I've not seen any problems on my machines by disallowing it). If it turns out this breaks something, we can special-case it and only permit it for openat(2) but not openat2(2). After input from Florian Weimer, the new open_how and flag definitions are inside a separate header from uapi/linux/fcntl.h, to avoid problems that glibc has with importing that header. /* Testing. */ In a follow-up patch there are over 200 selftests which ensure that this syscall has the correct semantics and will correctly handle several attack scenarios. In addition, I've written a userspace library[4] which provides convenient wrappers around openat2(RESOLVE_IN_ROOT) (this is necessary because no other syscalls support RESOLVE_IN_ROOT, and thus lots of care must be taken when using RESOLVE_IN_ROOT'd file descriptors with other syscalls). During the development of this patch, I've run numerous verification tests using libpathrs (showing that the API is reasonably usable by userspace). /* Future Work. */ Additional RESOLVE_ flags have been suggested during the review period. These can be easily implemented separately (such as blocking auto-mount during resolution). Furthermore, there are some other proposed changes to the openat(2) interface (the most obvious example is magic-link hardening[5]) which would be a good opportunity to add a way for userspace to restrict how O_PATH file descriptors can be re-opened. Another possible avenue of future work would be some kind of CHECK_FIELDS[6] flag which causes the kernel to indicate to userspace which openat2(2) flags and fields are supported by the current kernel (to avoid userspace having to go through several guesses to figure it out). [1]: https://lwn.net/Articles/588444/ [2]: https://lore.kernel.org/lkml/CA+55aFyyxJL1LyXZeBsf2ypriraj5ut1XkNDsunRBqgVjZU_6Q@mail.gmail.com [3]: commit 629e014bb834 ("fs: completely ignore unknown open flags") [4]: https://sourceware.org/bugzilla/show_bug.cgi?id=17523 [5]: https://lore.kernel.org/lkml/20190930183316.10190-2-cyphar@cyphar.com/ [6]: https://youtu.be/ggD-eb3yPVs Suggested-by: Christian Brauner Signed-off-by: Aleksa Sarai Signed-off-by: Al Viro commit c20c76acf6ec1df0af3bdd3370f7e3fef4494ba8 Merge: 1660557bd7cf 5098cae1f79c Author: Greg Kroah-Hartman Date: Sat Jan 18 14:53:41 2020 +0100 Merge tag 'soundwire-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-next Vinod writes: soundwire updates for v5.6-rc1 This round we have bunch of updates to interfaces for ASoC (audio) subsystem by Intel and a new Qualcomm controller driver Details - Updates for sdw_slave interfaces for ASoC - Updates to cadence library and intel driver - New Soundwire controller for Qualcomm masters - Rework of device number assignment * tag 'soundwire-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: (27 commits) dt-bindings: soundwire: fix example soundwire: cadence: fix kernel-doc parameter descriptions soundwire: intel: report slave_ids for each link to SOF driver soundwire: intel: fix factor of two in MCLK handling soundwire: bus: fix device number leak on errors soundwire: cadence: remove useless variable incrementation soundwire: cadence: update kernel-doc parameter descriptions soundwire: qcom: add support for SoundWire controller dt-bindings: soundwire: add bindings for Qcom controller soundwire: bus: check first if Slaves become UNATTACHED soundwire: cadence_master: handle multiple status reports per Slave soundwire: cadence_master: remove config update for interrupt setting soundwire: cadence_master: log more useful information during timeouts soundwire: cadence_master: clear interrupt status before enabling interrupt soundwire: cadence_master: filter out bad interrupts soundwire: stream: remove redundant pr_err traces soundwire: intel: add clock stop quirks soundwire: intel: add mutex for shared SHIM register access soundwire: intel: add prototype for WAKEEN interrupt processing soundwire: intel: add link_list to handle interrupts with a single thread ... commit 49576627b33496651d5f30ec79e164c6ba6f0410 Author: Alexandru Ardelean Date: Thu Jan 16 15:11:48 2020 +0200 dt-bindings: iio: adis16480: add compatible entry for ADIS16490 This change adds an entry for ADIS16490 in the list of compatible devices defined in the dt-bindings of the adis16480 driver. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 80cbc848c4fa03580954ab6598e415b6b56a66ac Author: Stefan Popa Date: Thu Jan 16 15:11:47 2020 +0200 iio: imu: adis16480: Add support for ADIS16490 The ADIS16490 is part of the same family with ADIS16495 and ADIS16497, the main difference is the temperature, accelerometer and gyroscope scales. Datasheet: Link: https://www.analog.com/media/en/technical-documentation/data-sheets/adis16490.pdf Signed-off-by: Stefan Popa Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 98496ccdf0dd88696203e69542e07ef824c56ead Author: Dan Carpenter Date: Thu Jan 16 13:08:29 2020 +0300 iio: accel: bma400: prevent setting accel scale too low This puts an upper bound on "val2" but it also needs to have a lower bound (BMA400_SCALE_MIN). Fixes: 465c811f1f20 ("iio: accel: Add driver for the BMA400") Signed-off-by: Dan Carpenter Signed-off-by: Jonathan Cameron commit 84961af78c509d500b9b4a45989e449f048c821a Author: Michał Mirosław Date: Sat Jan 11 16:19:11 2020 +0100 iio: imu/mpu6050: support dual-edge IRQ Make mpu6050 usable on platforms which provide only any-edge interrupts. One example of this kind of platform is AT91SAM9G45 Signed-off-by: Michał Mirosław Acked-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 9aaa29494030a8ba89311b70123a367a26788323 Merge: 56f200c78ce4 102d412a3d56 Author: David S. Miller Date: Sat Jan 18 14:30:27 2020 +0100 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2020-01-17 This series contains updates to igc, i40e, fm10k and ice drivers. Sasha fixes a typo in a code comment that referred to silicon that is not supported in the igc driver. Cleaned up a defined that was not being used. Added support for another i225 SKU which does not have an NVM. Added support for TCP segmentation offload (TSO) into igc. Added support for PHY power management control to provide a reliable and accurate indication of PHY reset completion. Jake adds support for the new txqueue parameter to the transmit timeout function in fm10k which reduces the code complexity when determining which transmit queue is stuck. Julio Faracco makes the similar changes that Jake did for fm10k, for i40e and ice drivers. Added support for the new txqueue parameter in the transmit timeout functions for i40e and ice. Colin Ian King cleans up a redundant initialization of a local variable. ==================== Signed-off-by: David S. Miller commit 2e4c0a5e25768097ecdb514ef453b423e932beea Author: Jean-Baptiste Maneyrol Date: Thu Jan 16 18:56:45 2020 +0100 iio: imu: inv_mpu6050: add fifo temperature data support Add support of temperature data in fifo for all chips. Enable unification of scan elements for icm20602. Add macros for generating scan elements. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 71f221f8a0cd73f985e37d8a05dea2d63eb95b71 Author: Andy Shevchenko Date: Wed Jan 15 19:44:25 2020 +0200 iio: magnetometer: ak8975: Convert to use device_get_match_data() Convert to use device_get_match_data() instead of open coded variant. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 608184788502fd475e7bca4b1692fda5f0fef5b6 Author: Andy Shevchenko Date: Wed Jan 15 19:44:24 2020 +0200 iio: magnetometer: ak8975: Get rid of platform data Since IIO framework supports device property API and driver has been moved already to the use of GPIO descriptors the logical continuation is to get rid of platform data completely. We are on the safe side here since there are no users of it in the kernel. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 79ef91493f5494e9ddbad85bf571ec03940a7f5c Author: Alexandru Tachici Date: Mon Jan 13 12:26:53 2020 +0200 iio: adc: ad7124: Set IRQ type to falling Ad7124 data-sheet specifies that the falling edge of the DOUT line should be used for an interrupt. The current irq flag (IRQF_TRIGGER_LOW) used will cause unwanted behaviour. When enabling the interrupt it will fire once because the DOUT line is already low. This will make the driver to read an unfinished conversion from the chip. This patch sets the irq type to the one specified in the data-sheet. Signed-off-by: Alexandru Tachici Signed-off-by: Jonathan Cameron commit da4d3d6bb9f6047217d549c233303161bb4678d9 Author: Alexandru Tachici Date: Mon Jan 13 12:26:52 2020 +0200 iio: adc: ad-sigma-delta: Allow custom IRQ flags Before this patch the ad_sigma_delta implementation hardcoded the irq trigger type to low, assuming that all Sigma-Delta ADCs have the same interrupt-type. This patch allows all drivers using the ad_sigma_delta layer to set the irq trigger type to the one specified in the datasheet. Signed-off-by: Alexandru Tachici Signed-off-by: Jonathan Cameron commit b2aa09178d1132bc6731af609a079dde83feddc1 Author: Lukas Bulwahn Date: Sat Jan 18 09:25:45 2020 +0100 MAINTAINERS: Mark simple firmware interface (SFI) obsolete Len Brown has not been active in this part since around 2010 and confirmed that he is not maintaining this part of the kernel sources anymore and the git log suggests that nobody is actively maintaining it. The referenced git tree does not exist. Instead, I found an sfi branch in Len's kernel git repository, but that has not been updated since 2014; so that is not worth to be mentioned in MAINTAINERS now anymore either. Len Brown expects no further systems to be shipped with SFI, so we can mark it obsolete and schedule it for deletion. This change was motivated after I found that I could not send any mails to the sfi-devel mailing list, and that the mailing list does not exist anymore. Signed-off-by: Lukas Bulwahn Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200118082545.23464-1-lukas.bulwahn@gmail.com commit b2dfc6765e45a3154800333234e4952b5412d792 Author: Hans Westgaard Ry Date: Wed Jan 15 14:43:40 2020 +0200 net/rds: Use prefetch for On-Demand-Paging MR Try prefetching pages when using On-Demand-Paging MR using ib_advise_mr. Signed-off-by: Hans Westgaard Ry Acked-by: Santosh Shilimkar Signed-off-by: Leon Romanovsky commit 2eafa1746f17872483d1033b0116ec71435ea19d Author: Hans Westgaard Ry Date: Wed Jan 15 14:43:39 2020 +0200 net/rds: Handle ODP mr registration/unregistration On-Demand-Paging MRs are registered using ib_reg_user_mr and unregistered with ib_dereg_mr. Signed-off-by: Hans Westgaard Ry Acked-by: Santosh Shilimkar Signed-off-by: Leon Romanovsky commit e0b70940536a45dea784f2d013f1d796798dc3ba Author: Nicolas Saenz Julienne Date: Mon Dec 16 12:01:11 2019 +0100 MAINTAINERS: Add brcmstb PCIe controller entry The controller serves both the Raspberry Pi 4 (bcm2711) and brcmstb platforms. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Florian Fainelli commit df95968ff78931576ac7a3d3b30312894aaaf22e Merge: 71e7274066c6 7b19914383fc Author: Dave Airlie Date: Sat Jan 18 13:00:23 2020 +1000 Merge tag 'amd-drm-next-5.6-2020-01-17' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-next-5.6-2020-01-17: amdgpu: - Fix 32 bit harder - Powerplay cleanups - VCN fixes for Arcturus - RAS fixes - eDP/DP fixes - SR-IOV fixes - Re-enable S/G display for PCO/RV2 - Free stolen memory after init on gmc10 - DF hashing optimizations for Arcturus - Properly handle runtime pm in sysfs and debugfs - Unify more GC programming between amdgpu and amdkfd - Golden settings updates for gfx10 - GDDR6 training fixes - Freesync fixes - DSC fixes - TMDS fixes - Renoir USB-C fixes - DC dml updates from hw team - Pollock support - Mutex init regresson fix amdkfd: - Unify more GC programming between amdgpu and amdkfd - Use KIQ to setup HIQ rather than using MMIO scheduler: - Documentation fixes - Improve job distribution with load sharing drm: - DP MST fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200117213625.4722-1-alexander.deucher@amd.com commit faaa9f6e8ab9a2da03cb215e7311e824e96b8bf7 Merge: b0e55fef624e d5c8dc0d4c88 Author: Olof Johansson Date: Fri Jan 17 17:08:01 2020 -0800 Merge tag 'arm-soc/for-5.6/devicetree-part2' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM-based SoC changes for 5.6, please pull the following: - Nicolas unifies the CMA reserved region declaration between all BCM283x/BCM2711 chips in order for firmwares to easily adjust those based on the use case needs - Nicolas adds the Broadcom STB PCIe Root Complex Device Tree node for the Raspberry Pi 4. The driver will go through the PCIe maintainers pull request for 5.6. * tag 'arm-soc/for-5.6/devicetree-part2' of https://github.com/Broadcom/stblinux: ARM: dts: bcm2711: Enable PCIe controller ARM: dts: bcm283x: Unify CMA configuration Link: https://lore.kernel.org/r/20200117222705.25391-2-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit bba9d2b163099ff91a8547527f66af658e836cdc Merge: 0109ef6e6956 e926791a9670 Author: Olof Johansson Date: Fri Jan 17 17:07:34 2020 -0800 Merge tag 'arm-soc/for-5.6/defconfig-arm64' of https://github.com/Broadcom/stblinux into arm/defconfig This pull request contains Broadcom ARM64-based SoCs defconfig changes for 5.6, please pull the following: - Nicolas enables the Broadcom GENET controller and Broadcom STB PCIe Root Complex driver as a module for the ARM64 defconfig. The PCIe RC driver will go through the PCIe maintainers pull request for 5.6. * tag 'arm-soc/for-5.6/defconfig-arm64' of https://github.com/Broadcom/stblinux: arm64: defconfig: Enable Broadcom's GENET Ethernet controller arm64: defconfig: Enable Broadcom's STB PCIe controller Link: https://lore.kernel.org/r/20200117222705.25391-1-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit f45ba2bd6da0dc8000aa7ea7a3858fb51608f766 Author: Vineet Gupta Date: Fri Jan 17 15:04:03 2020 -0800 ARCv2: fpu: preserve userspace fpu state Signed-off-by: Vineet Gupta commit f05523aa7a1e63bfada5e222c0a57e02dbd4fcfa Author: Vineet Gupta Date: Fri Jan 17 16:00:41 2020 -0800 ARC: fpu: declutter code, move bits out into fpu.h Signed-off-by: Vineet Gupta commit fb24fea75ca5ceef59f753494b2efd453606e08a Author: Chao Yu Date: Tue Jan 14 19:36:50 2020 +0800 f2fs: change to use rwsem for gc_mutex Mutex lock won't serialize callers, in order to avoid starving of unlucky caller, let's use rwsem lock instead. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d7b0a23d81507deb095859250cd7dd4aa5d8875e Author: Jaegeuk Kim Date: Wed Jan 8 15:10:02 2020 -0800 f2fs: update f2fs document regarding to fsync_mode This patch adds missing fsync_mode entry in f2fs document. Fixes: 04485987f053 ("f2fs: introduce async IPU policy") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0e7f41974e9c6ceac3ac9b5d0377c5f74b1bc4fc Author: Jaegeuk Kim Date: Mon Jan 6 16:43:09 2020 -0800 f2fs: add a way to turn off ipu bio cache Setting 0x40 in /sys/fs/f2fs/dev/ipu_policy gives a way to turn off bio cache, which is useufl to check whether block layer using hardware encryption engine merges IOs correctly. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit bf2cbd3c57159c2b639ee8797b52ab5af180bf83 Author: Chengguang Xu Date: Sat Jan 4 22:20:04 2020 +0800 f2fs: code cleanup for f2fs_statfs_project() Calling min_not_zero() to simplify complicated prjquota limit comparison in f2fs_statfs_project(). Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit acdf2172172a511f97fa21ed0ee7609a6d3b3a07 Author: Chengguang Xu Date: Sat Jan 4 22:20:03 2020 +0800 f2fs: fix miscounted block limit in f2fs_statfs_project() statfs calculates Total/Used/Avail disk space in block unit, so we should translate soft/hard prjquota limit to block unit as well. Below testing result shows the block/inode numbers of Total/Used/Avail from df command are all correct afer applying this patch. [root@localhost quota-tools]\# ./repquota -P /dev/sdb1 *** Report for project quotas on device /dev/sdb1 Block grace time: 7days; Inode grace time: 7days Block limits File limits Project used soft hard grace used soft hard grace ----------------------------------------------------------- \#0 -- 4 0 0 1 0 0 \#101 -- 0 0 0 2 0 0 \#102 -- 0 10240 0 2 10 0 \#103 -- 0 0 20480 2 0 20 \#104 -- 0 10240 20480 2 10 20 \#105 -- 0 20480 10240 2 20 10 [root@localhost sdb1]\# lsattr -p t{1,2,3,4,5} 101 ----------------N-- t1/a1 102 ----------------N-- t2/a2 103 ----------------N-- t3/a3 104 ----------------N-- t4/a4 105 ----------------N-- t5/a5 [root@localhost sdb1]\# df -hi t{1,2,3,4,5} Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sdb1 2.4M 21 2.4M 1% /mnt/sdb1 /dev/sdb1 10 2 8 20% /mnt/sdb1 /dev/sdb1 20 2 18 10% /mnt/sdb1 /dev/sdb1 10 2 8 20% /mnt/sdb1 /dev/sdb1 10 2 8 20% /mnt/sdb1 [root@localhost sdb1]\# df -h t{1,2,3,4,5} Filesystem Size Used Avail Use% Mounted on /dev/sdb1 10G 489M 9.6G 5% /mnt/sdb1 /dev/sdb1 10M 0 10M 0% /mnt/sdb1 /dev/sdb1 20M 0 20M 0% /mnt/sdb1 /dev/sdb1 10M 0 10M 0% /mnt/sdb1 /dev/sdb1 10M 0 10M 0% /mnt/sdb1 Fixes: 909110c060f2 ("f2fs: choose hardlimit when softlimit is larger than hardlimit in f2fs_statfs_project()") Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit fad5fbce4f072f05d3c8adefecdfd149a268d0ff Author: Sahitya Tummala Date: Fri Jan 3 08:49:28 2020 +0530 f2fs: show the CP_PAUSE reason in checkpoint traces Remove the duplicate CP_UMOUNT enum and add the new CP_PAUSE enum to show the checkpoint reason in the trace prints. Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 644c8c92adb669bdb2d4b2a271dfa9569ae07ee8 Author: Eric Biggers Date: Tue Dec 31 12:14:16 2019 -0600 f2fs: fix deadlock allocating bio_post_read_ctx from mempool Without any form of coordination, any case where multiple allocations from the same mempool are needed at a time to make forward progress can deadlock under memory pressure. This is the case for struct bio_post_read_ctx, as one can be allocated to decrypt a Merkle tree page during fsverity_verify_bio(), which itself is running from a post-read callback for a data bio which has its own struct bio_post_read_ctx. Fix this by freeing first bio_post_read_ctx before calling fsverity_verify_bio(). This works because verity (if enabled) is always the last post-read step. This deadlock can be reproduced by trying to read from an encrypted verity file after reducing NUM_PREALLOC_POST_READ_CTXS to 1 and patching mempool_alloc() to pretend that pool->alloc() always fails. Note that since NUM_PREALLOC_POST_READ_CTXS is actually 128, to actually hit this bug in practice would require reading from lots of encrypted verity files at the same time. But it's theoretically possible, as N available objects doesn't guarantee forward progress when > N/2 threads each need 2 objects at a time. Fixes: 95ae251fe828 ("f2fs: add fs-verity support") Signed-off-by: Eric Biggers Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e8ce5749d781ec0ccdf03f4f174cc8f709c0057a Author: Eric Biggers Date: Tue Dec 31 12:14:56 2019 -0600 f2fs: remove unneeded check for error allocating bio_post_read_ctx Since allocating an object from a mempool never fails when __GFP_DIRECT_RECLAIM (which is included in GFP_NOFS) is set, the check for failure to allocate a bio_post_read_ctx is unnecessary. Remove it. Signed-off-by: Eric Biggers Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b06af2aff28b41099b0efd4f71c8bb4148bf29b5 Author: Jaegeuk Kim Date: Mon Dec 9 19:03:05 2019 -0800 f2fs: convert inline_dir early before starting rename If we hit an error during rename, we'll get two dentries in different directories. Chao adds to check the room in inline_dir which can avoid needless inversion. This should be done by inode_lock(&old_dir). Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit fe396ad8e7526f059f7b8c7290d33a1b84adacab Author: Chao Yu Date: Mon Dec 30 17:41:41 2019 +0800 f2fs: fix memleak of kobject If kobject_init_and_add() failed, caller needs to invoke kobject_put() to release kobject explicitly. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3e5e479a39ce9ed60cd63f7565cc1d9da77c2a4e Author: Chao Yu Date: Fri Dec 27 18:44:56 2019 +0800 f2fs: fix to add swap extent correctly As Youling reported in mailing list: https://www.linuxquestions.org/questions/linux-newbie-8/the-file-system-f2fs-is-broken-4175666043/ https://www.linux.org/threads/the-file-system-f2fs-is-broken.26490/ There is a test case can corrupt f2fs image: - dd if=/dev/zero of=/swapfile bs=1M count=4096 - chmod 600 /swapfile - mkswap /swapfile - swapon --discard /swapfile The root cause is f2fs_swap_activate() intends to return zero value to setup_swap_extents() to enable SWP_FS mode (swap file goes through fs), in this flow, setup_swap_extents() setups swap extent with wrong block address range, result in discard_swap() erasing incorrect address. Because f2fs_swap_activate() has pinned swapfile, its data block address will not change, it's safe to let swap to handle IO through raw device, so we can get rid of SWAP_FS mode and initial swap extents inside f2fs_swap_activate(), by this way, later discard_swap() can trim in right address range. Fixes: 4969c06a0d83 ("f2fs: support swap file w/ DIO") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4eea93e3ff98aa185302d562f0df1ad501c51e70 Author: Jaegeuk Kim Date: Fri Dec 20 17:20:05 2019 -0800 f2fs: run fsck when getting bad inode during GC This is to avoid inifinite GC when trying to disable checkpoint. Signed-off-by: Jaegeuk Kim commit 4c8ff7095bef64fc47e996a938f7d57f9e077da3 Author: Chao Yu Date: Fri Nov 1 18:07:14 2019 +0800 f2fs: support data compression This patch tries to support compression in f2fs. - New term named cluster is defined as basic unit of compression, file can be divided into multiple clusters logically. One cluster includes 4 << n (n >= 0) logical pages, compression size is also cluster size, each of cluster can be compressed or not. - In cluster metadata layout, one special flag is used to indicate cluster is compressed one or normal one, for compressed cluster, following metadata maps cluster to [1, 4 << n - 1] physical blocks, in where f2fs stores data including compress header and compressed data. - In order to eliminate write amplification during overwrite, F2FS only support compression on write-once file, data can be compressed only when all logical blocks in file are valid and cluster compress ratio is lower than specified threshold. - To enable compression on regular inode, there are three ways: * chattr +c file * chattr +c dir; touch dir/file * mount w/ -o compress_extension=ext; touch file.ext Compress metadata layout: [Dnode Structure] +-----------------------------------------------+ | cluster 1 | cluster 2 | ......... | cluster N | +-----------------------------------------------+ . . . . . . . . . Compressed Cluster . . Normal Cluster . +----------+---------+---------+---------+ +---------+---------+---------+---------+ |compr flag| block 1 | block 2 | block 3 | | block 1 | block 2 | block 3 | block 4 | +----------+---------+---------+---------+ +---------+---------+---------+---------+ . . . . . . +-------------+-------------+----------+----------------------------+ | data length | data chksum | reserved | compressed data | +-------------+-------------+----------+----------------------------+ Changelog: 20190326: - fix error handling of read_end_io(). - remove unneeded comments in f2fs_encrypt_one_page(). 20190327: - fix wrong use of f2fs_cluster_is_full() in f2fs_mpage_readpages(). - don't jump into loop directly to avoid uninitialized variables. - add TODO tag in error path of f2fs_write_cache_pages(). 20190328: - fix wrong merge condition in f2fs_read_multi_pages(). - check compressed file in f2fs_post_read_required(). 20190401 - allow overwrite on non-compressed cluster. - check cluster meta before writing compressed data. 20190402 - don't preallocate blocks for compressed file. - add lz4 compress algorithm - process multiple post read works in one workqueue Now f2fs supports processing post read work in multiple workqueue, it shows low performance due to schedule overhead of multiple workqueue executing orderly. 20190921 - compress: support buffered overwrite C: compress cluster flag V: valid block address N: NEW_ADDR One cluster contain 4 blocks before overwrite after overwrite - VVVV -> CVNN - CVNN -> VVVV - CVNN -> CVNN - CVNN -> CVVV - CVVV -> CVNN - CVVV -> CVVV 20191029 - add kconfig F2FS_FS_COMPRESSION to isolate compression related codes, add kconfig F2FS_FS_{LZO,LZ4} to cover backend algorithm. note that: will remove lzo backend if Jaegeuk agreed that too. - update codes according to Eric's comments. 20191101 - apply fixes from Jaegeuk 20191113 - apply fixes from Jaegeuk - split workqueue for fsverity 20191216 - apply fixes from Jaegeuk 20200117 - fix to avoid NULL pointer dereference [Jaegeuk Kim] - add tracepoint for f2fs_{,de}compress_pages() - fix many bugs and add some compression stats - fix overwrite/mmap bugs - address 32bit build error, reported by Geert. - bug fixes when handling errors and i_compressed_blocks Reported-by: Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 272ecd60a636a8508997ff997ddfa143474e7c81 Author: Florian Fainelli Date: Fri Jan 17 15:53:13 2020 -0800 ata: ahci_brcm: BCM7216 reset is self de-asserting The BCM7216 reset controller line is self-deasserting, unlike other platforms, so make use of reset_control_reset() instead of reset_control_deassert(). Signed-off-by: Florian Fainelli Signed-off-by: Jens Axboe commit 1a0600d112e32eac893d2120207da7887f345495 Author: Florian Fainelli Date: Fri Jan 17 15:53:12 2020 -0800 ata: ahci_brcm: Perform reset after obtaining resources Resources such as clocks, PHYs, regulators are likely to get a probe deferral return code, which could lead to the AHCI controller being reset a few times until it gets successfully probed. Since this is typically the most time consuming operation, move it after the resources have been acquired. Signed-off-by: Florian Fainelli Signed-off-by: Jens Axboe commit 42bbdd99221bac206dde2b5e87098177fcd2a48e Author: Hongbo Yao Date: Sat Jan 18 02:53:10 2020 +0530 phy: ti: j721e-wiz: Fix build error without CONFIG_OF_ADDRESS If CONFIG_OF_ADDRESS is not set and COMPILE_TEST=y, the following error is seen while building phy-j721e-wiz.c drivers/phy/ti/phy-j721e-wiz.o: In function `wiz_remove': phy-j721e-wiz.c:(.text+0x1a): undefined reference to `of_platform_device_destroy' Fix the config dependency for PHY_J721E_WIZ here. Reported-by: Hulk Robot Fixes: 091876cc355d ("phy: ti: j721e-wiz: Add support for WIZ module present in TI J721E SoC") Signed-off-by: Hongbo Yao Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20200117212310.2864-1-kishon@ti.com Signed-off-by: Greg Kroah-Hartman commit 41ddb7e1f79693d904502ae9bea609837973eff8 Author: Thomas Renninger Date: Fri Jan 17 08:55:54 2020 +0100 cpupower: Revert library ABI changes from commit ae2917093fb60bdc1ed3e Commit ae2917093fb6 ("tools/power/cpupower: Display boost frequency separately") modified the library function: struct cpufreq_available_frequencies *cpufreq_get_available_frequencies(unsigned int cpu) to struct cpufreq_frequencies *cpufreq_get_frequencies(const char *type, unsigned int cpu) This patch recovers the old API and implements the new functionality in a newly introduce method: struct cpufreq_boost_frequencies *cpufreq_get_available_frequencies(unsigned int cpu) This one should get merged into stable kernels back to 5.0 when the above had been introduced. Fixes: ae2917093fb6 ("tools/power/cpupower: Display boost frequency separately") Cc: stable@vger.kernel.org Signed-off-by: Thomas Renninger Signed-off-by: Shuah Khan commit a6ed02cac690b635dbb938690e795812ce1e14ca Author: KP Singh Date: Fri Jan 17 22:28:25 2020 +0100 libbpf: Load btf_vmlinux only once per object. As more programs (TRACING, STRUCT_OPS, and upcoming LSM) use vmlinux BTF information, loading the BTF vmlinux information for every program in an object is sub-optimal. The fix was originally proposed in: https://lore.kernel.org/bpf/CAEf4BzZodr3LKJuM7QwD38BiEH02Cc1UbtnGpVkCJ00Mf+V_Qg@mail.gmail.com/ The btf_vmlinux is populated in the object if any of the programs in the object requires it just before the programs are loaded and freed after the programs finish loading. Reported-by: Andrii Nakryiko Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Reviewed-by: Brendan Jackman Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200117212825.11755-1-kpsingh@chromium.org commit a09decff5c32060639a685581c380f51b14e1fc2 Author: Kai Li Date: Sat Jan 11 10:25:42 2020 +0800 jbd2: clear JBD2_ABORT flag before journal_reset to update log tail info when load journal If the journal is dirty when the filesystem is mounted, jbd2 will replay the journal but the journal superblock will not be updated by journal_reset() because JBD2_ABORT flag is still set (it was set in journal_init_common()). This is problematic because when a new transaction is then committed, it will be recorded in block 1 (journal->j_tail was set to 1 in journal_reset()). If unclean shutdown happens again before the journal superblock is updated, the new recorded transaction will not be replayed during the next mount (because of stale sb->s_start and sb->s_sequence values) which can lead to filesystem corruption. Fixes: 85e0c4e89c1b ("jbd2: if the journal is aborted then don't allow update of the log tail") Signed-off-by: Kai Li Link: https://lore.kernel.org/r/20200111022542.5008-1-li.kai4@h3c.com Signed-off-by: Theodore Ts'o commit 71b565ceff377a52e7d58cd871745cd339447323 Author: Theodore Ts'o Date: Thu Jan 16 10:08:16 2020 -0500 ext4: drop ext4_kvmalloc() As Jan pointed out[1], as of commit 81378da64de ("jbd2: mark the transaction context with the scope GFP_NOFS context") we use memalloc_nofs_{save,restore}() while a jbd2 handle is active. So ext4_kvmalloc() so we can call allocate using GFP_NOFS is no longer necessary. [1] https://lore.kernel.org/r/20200109100007.GC27035@quack2.suse.cz Signed-off-by: Theodore Ts'o Link: https://lore.kernel.org/r/20200116155031.266620-1-tytso@mit.edu Reviewed-by: Jan Kara commit a54d8d34d2354f3a2a9dda00d9dd6666a50c486b Author: Martijn Coenen Date: Fri Dec 27 14:46:39 2019 +0100 ext4: Add EXT4_IOC_FSGETXATTR/EXT4_IOC_FSSETXATTR to compat_ioctl These are backed by 'struct fsxattr' which has the same size on all architectures. Signed-off-by: Martijn Coenen Link: https://lore.kernel.org/r/20191227134639.35869-1-maco@android.com Signed-off-by: Theodore Ts'o commit e128d516d81289db7dd977b7706c96501f48c011 Author: Ritesh Harjani Date: Wed Jan 1 15:21:37 2020 +0530 ext4: remove unused macro MPAGE_DA_EXTENT_TAIL Remove unused macro MPAGE_DA_EXTENT_TAIL which is no more used after below commit 4e7ea81d ("ext4: restructure writeback path") Signed-off-by: Ritesh Harjani Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20200101095137.25656-1-riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o commit de7454854d6e8e3c3585c6df4b0b99017820aa0f Author: Eric Biggers Date: Tue Dec 31 12:04:44 2019 -0600 ext4: add missing braces in ext4_ext_drop_refs() For clarity, add braces to the loop in ext4_ext_drop_refs(). Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191231180444.46586-9-ebiggers@kernel.org Signed-off-by: Theodore Ts'o Reviewed-by: Ritesh Harjani Reviewed-by: Jan Kara commit 6e89bbb79bc78f31e86a4de1ca3a36474bc3fb62 Author: Eric Biggers Date: Tue Dec 31 12:04:43 2019 -0600 ext4: fix some nonstandard indentation in extents.c Clean up some code that was using 2-character indents. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191231180444.46586-8-ebiggers@kernel.org Signed-off-by: Theodore Ts'o Reviewed-by: Ritesh Harjani Reviewed-by: Jan Kara commit 61a6cb49da8147bc5377b60dfe540f9ef320aeb8 Author: Eric Biggers Date: Tue Dec 31 12:04:42 2019 -0600 ext4: remove obsolete comment from ext4_can_extents_be_merged() Support for unwritten extents was added to ext4 a long time ago, so remove a misleading comment that says they're a future feature. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191231180444.46586-7-ebiggers@kernel.org Signed-off-by: Theodore Ts'o Reviewed-by: Ritesh Harjani Reviewed-by: Jan Kara commit adde81cfd5a8d4966f5805e030ab3d0a7825b118 Author: Eric Biggers Date: Tue Dec 31 12:04:41 2019 -0600 ext4: fix documentation for ext4_ext_try_to_merge() Don't mention the nonexistent return value, and mention both types of merges that are attempted. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191231180444.46586-6-ebiggers@kernel.org Signed-off-by: Theodore Ts'o Reviewed-by: Ritesh Harjani Reviewed-by: Jan Kara commit 43f816772ff3b4adc5cef24c78916bfbc8fee57f Author: Eric Biggers Date: Tue Dec 31 12:04:40 2019 -0600 ext4: make some functions static in extents.c Make the following functions static since they're only used in extents.c: __ext4_ext_dirty() ext4_can_extents_be_merged() ext4_collapse_range() ext4_insert_range() Also remove the prototype for ext4_ext_writepage_trans_blocks(), as this function is not defined anywhere. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191231180444.46586-5-ebiggers@kernel.org Signed-off-by: Theodore Ts'o Reviewed-by: Ritesh Harjani Reviewed-by: Jan Kara commit a1180994f52c0867c134e411a6a532ffa166ceac Author: Eric Biggers Date: Tue Dec 31 12:04:39 2019 -0600 ext4: remove redundant S_ISREG() checks from ext4_fallocate() ext4_fallocate() is only used in the file_operations for regular files. Also, the VFS only allows fallocate() on regular files and block devices, but block devices always use blkdev_fallocate(). For both of these reasons, S_ISREG() is always true in ext4_fallocate(). Therefore the S_ISREG() checks in ext4_zero_range(), ext4_collapse_range(), ext4_insert_range(), and ext4_punch_hole() are redundant. Remove them. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191231180444.46586-4-ebiggers@kernel.org Signed-off-by: Theodore Ts'o Reviewed-by: Ritesh Harjani Reviewed-by: Jan Kara commit 9b02e4987ab092caed8f3bccdacaef9acf9015dd Author: Eric Biggers Date: Tue Dec 31 12:04:38 2019 -0600 ext4: clean up len and offset checks in ext4_fallocate() - Fix some comments. - Consistently access i_size directly rather than using i_size_read(), since in all relevant cases we're under inode_lock(). - Simplify the alignment checks by using the IS_ALIGNED() macro. - In ext4_insert_range(), do the check against s_maxbytes in a way that is safe against signed overflow. (This doesn't currently matter for ext4 due to ext4's limited max file size, but this is something other filesystems have gotten wrong. We might as well do it safely.) Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191231180444.46586-3-ebiggers@kernel.org Signed-off-by: Theodore Ts'o Reviewed-by: Ritesh Harjani Reviewed-by: Jan Kara commit dd6683e6efad2339894575da46bc519646e37c24 Author: Eric Biggers Date: Tue Dec 31 12:04:37 2019 -0600 ext4: remove ext4_{ind,ext}_calc_metadata_amount() Remove the ext4_ind_calc_metadata_amount() and ext4_ext_calc_metadata_amount() functions, which have been unused since commit 71d4f7d03214 ("ext4: remove metadata reservation checks"). Also remove the i_da_metadata_calc_last_lblock and i_da_metadata_calc_len fields from struct ext4_inode_info, as these were only used by these removed functions. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191231180444.46586-2-ebiggers@kernel.org Signed-off-by: Theodore Ts'o Reviewed-by: Ritesh Harjani Reviewed-by: Jan Kara commit fd5fe2535642982af695f2f77bb7dba5d4aa6aa5 Author: Eric Biggers Date: Tue Dec 31 12:12:56 2019 -0600 ext4: remove unneeded check for error allocating bio_post_read_ctx Since allocating an object from a mempool never fails when __GFP_DIRECT_RECLAIM (which is included in GFP_NOFS) is set, the check for failure to allocate a bio_post_read_ctx is unnecessary. Remove it. Also remove the redundant assignment to ->bi_private. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191231181256.47770-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 68e45330e341dad2d3a0a3f8ef2ec46a2a0a3bbc Author: Eric Biggers Date: Tue Dec 31 12:12:22 2019 -0600 ext4: fix deadlock allocating bio_post_read_ctx from mempool Without any form of coordination, any case where multiple allocations from the same mempool are needed at a time to make forward progress can deadlock under memory pressure. This is the case for struct bio_post_read_ctx, as one can be allocated to decrypt a Merkle tree page during fsverity_verify_bio(), which itself is running from a post-read callback for a data bio which has its own struct bio_post_read_ctx. Fix this by freeing the first bio_post_read_ctx before calling fsverity_verify_bio(). This works because verity (if enabled) is always the last post-read step. This deadlock can be reproduced by trying to read from an encrypted verity file after reducing NUM_PREALLOC_POST_READ_CTXS to 1 and patching mempool_alloc() to pretend that pool->alloc() always fails. Note that since NUM_PREALLOC_POST_READ_CTXS is actually 128, to actually hit this bug in practice would require reading from lots of encrypted verity files at the same time. But it's theoretically possible, as N available objects isn't enough to guarantee forward progress when > N/2 threads each need 2 objects at a time. Fixes: 22cfe4b48ccb ("ext4: add fs-verity read support") Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191231181222.47684-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 547c556f4db7c09447ecf5f833ab6aaae0c5ab58 Author: Eric Biggers Date: Tue Dec 31 12:11:49 2019 -0600 ext4: fix deadlock allocating crypto bounce page from mempool ext4_writepages() on an encrypted file has to encrypt the data, but it can't modify the pagecache pages in-place, so it encrypts the data into bounce pages and writes those instead. All bounce pages are allocated from a mempool using GFP_NOFS. This is not correct use of a mempool, and it can deadlock. This is because GFP_NOFS includes __GFP_DIRECT_RECLAIM, which enables the "never fail" mode for mempool_alloc() where a failed allocation will fall back to waiting for one of the preallocated elements in the pool. But since this mode is used for all a bio's pages and not just the first, it can deadlock waiting for pages already in the bio to be freed. This deadlock can be reproduced by patching mempool_alloc() to pretend that pool->alloc() always fails (so that it always falls back to the preallocations), and then creating an encrypted file of size > 128 KiB. Fix it by only using GFP_NOFS for the first page in the bio. For subsequent pages just use GFP_NOWAIT, and if any of those fail, just submit the bio and start a new one. This will need to be fixed in f2fs too, but that's less straightforward. Fixes: c9af28fdd449 ("ext4 crypto: don't let data integrity writebacks fail with ENOMEM") Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191231181149.47619-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 8f27fd0ab569f5d09410010b15a3f45399e89fcf Author: Naoto Kobayashi Date: Fri Dec 27 17:05:21 2019 +0900 ext4: Delete ext4_kvzvalloc() Since we're not using ext4_kvzalloc(), delete this function. Signed-off-by: Naoto Kobayashi Link: https://lore.kernel.org/r/20191227080523.31808-2-naoto.kobayashi4c@gmail.com Signed-off-by: Theodore Ts'o commit d85926474ffd5395dc39dbbedb969c31c4059a61 Author: Eric Biggers Date: Thu Dec 26 10:11:14 2019 -0600 ext4: re-enable extent zeroout optimization on encrypted files For encrypted files, commit 36086d43f657 ("ext4 crypto: fix bugs in ext4_encrypted_zeroout()") disabled the optimization where when a write occurs to the middle of an unwritten extent, the head and/or tail of the extent (when they aren't too large) are zeroed out, turned into an initialized extent, and merged with the part being written to. This optimization helps prevent fragmentation of the extent tree. However, disabling this optimization also made fscrypt_zeroout_range() nearly impossible to test, as now it's only reachable via the very rare case in ext4_split_extent_at() where allocating a new extent tree block fails due to ENOSPC. 'gce-xfstests -c ext4/encrypt -g auto' doesn't even hit this at all. It's preferable to avoid really rare cases that are hard to test. That commit also cited data corruption in xfstest generic/127 as a reason to disable the extent zeroout optimization, but that's no longer reproducible anymore. It also cited fscrypt_zeroout_range() having poor performance, but I've written a patch to fix that. Therefore, re-enable the extent zeroout optimization on encrypted files. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191226161114.53606-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 33b4cc2501d323feef3cc3ec9a084d80bef5b5e8 Author: Eric Biggers Date: Thu Dec 26 10:10:22 2019 -0600 ext4: only use fscrypt_zeroout_range() on regular files fscrypt_zeroout_range() is only for encrypted regular files, not for encrypted directories or symlinks. Fortunately, currently it seems it's never called on non-regular files. But to be safe ext4 should explicitly check S_ISREG() before calling it. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191226161022.53490-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 457b1e353c739af39159269723949f315320446c Author: Eric Biggers Date: Thu Dec 26 09:42:16 2019 -0600 ext4: allow ZERO_RANGE on encrypted files When ext4 encryption support was first added, ZERO_RANGE was disallowed, supposedly because test failures (e.g. ext4/001) were seen when enabling it, and at the time there wasn't enough time/interest to debug it. However, there's actually no reason why ZERO_RANGE can't work on encrypted files. And it fact it *does* work now. Whole blocks in the zeroed range are converted to unwritten extents, as usual; encryption makes no difference for that part. Partial blocks are zeroed in the pagecache and then ->writepages() encrypts those blocks as usual. ext4_block_zero_page_range() handles reading and decrypting the block if needed before actually doing the pagecache write. Also, f2fs has always supported ZERO_RANGE on encrypted files. As far as I can tell, the reason that ext4/001 was failing in v4.1 was actually because of one of the bugs fixed by commit 36086d43f657 ("ext4 crypto: fix bugs in ext4_encrypted_zeroout()"). The bug made ext4_encrypted_zeroout() always return a positive value, which caused unwritten extents in encrypted files to sometimes not be marked as initialized after being written to. This bug was not actually in ZERO_RANGE; it just happened to trigger during the extents manipulation done in ext4/001 (and probably other tests too). So, let's enable ZERO_RANGE on encrypted files on ext4. Tested with: gce-xfstests -c ext4/encrypt -g auto gce-xfstests -c ext4/encrypt_1k -g auto Got the same set of test failures both with and without this patch. But with this patch 6 fewer tests are skipped: ext4/001, generic/008, generic/009, generic/033, generic/096, and generic/511. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191226154216.4808-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 834f1565fa3f9c8f78adbfcaa80ae510fe4971c3 Author: Eric Biggers Date: Thu Dec 26 09:41:05 2019 -0600 ext4: handle decryption error in __ext4_block_zero_page_range() fscrypt_decrypt_pagecache_blocks() can fail, because it uses skcipher_request_alloc(), which uses kmalloc(), which can fail; and also because it calls crypto_skcipher_decrypt(), which can fail depending on the driver that actually implements the crypto. Therefore it's not appropriate to WARN on decryption error in __ext4_block_zero_page_range(). Remove the WARN and just handle the error instead. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191226154105.4704-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 2fdff4c843907e0ad71d6d72d8303bb7199569f7 Author: Eric Biggers Date: Thu Dec 26 09:40:07 2019 -0600 docs: ext4.rst: add encryption and verity to features list Mention encryption and verity in the ext4 features list. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191226154007.4569-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 284b3f6edbbb020ce479b8df1d2ac745b100cf53 Author: Eric Biggers Date: Thu Dec 26 09:39:20 2019 -0600 ext4: remove unnecessary selections from EXT3_FS Since EXT3_FS already selects EXT4_FS, there's no reason for it to redundantly select all the selections of EXT4_FS -- notwithstanding the comments that claim otherwise. Remove these redundant selections to avoid confusion. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191226153920.4466-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara commit 4756ee183f25b1fa2a7306a439da3bcd687244e0 Author: zhengbin Date: Wed Dec 25 10:45:59 2019 +0800 ext4: use true,false for bool variable Fixes coccicheck warning: fs/ext4/extents.c:5271:6-12: WARNING: Assignment of 0/1 to bool variable fs/ext4/extents.c:5287:4-10: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/1577241959-138695-1-git-send-email-zhengbin13@huawei.com Signed-off-by: Theodore Ts'o commit 46797ad75af747652545f69240fdc78743446ac3 Author: Eric Biggers Date: Mon Dec 9 15:36:02 2019 -0800 ext4: uninline ext4_inode_journal_mode() Determining an inode's journaling mode has gotten more complicated over time. Move ext4_inode_journal_mode() from an inline function into ext4_jbd2.c to reduce the compiled code size. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191209233602.117778-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara commit 64c314ff822786b4634bb5cfe91ed5a34ba8743e Author: Eric Biggers Date: Mon Dec 9 13:32:25 2019 -0800 ext4: remove unnecessary ifdefs in htree_dirblock_to_tree() The ifdefs for CONFIG_FS_ENCRYPTION in htree_dirblock_to_tree() are unnecessary, as the called functions are already stubbed out when !CONFIG_FS_ENCRYPTION. Remove them. Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20191209213225.18477-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara commit 7063743f6860874fedc943fb168e079abdc62f2c Author: Chengguang Xu Date: Fri Dec 6 13:43:17 2019 +0800 ext4: remove unnecessary assignment in ext4_htree_store_dirent() We have allocated memory using kzalloc() so don't have to set 0 again in last byte. Signed-off-by: Chengguang Xu Link: https://lore.kernel.org/r/20191206054317.3107-1-cgxu519@mykernel.net Signed-off-by: Theodore Ts'o commit d4c5e960bf202d99ec9a6922ad387eafb798b848 Author: Theodore Ts'o Date: Thu Nov 28 22:26:51 2019 -0500 ext4: avoid fetching btime in ext4_getattr() unless requested Linus observed that an allmodconfig build which does a lot of stat(2) calls that ext4_getattr() was a noticeable (1%) amount of CPU time, due to the cache line for i_extra_isize getting pulled in. Since the normal stat system call doesn't return btime, it's a complete waste. So only calculate btime when it is explicitly requested. [ Fixed to check against request_mask instead of query_flags. ] Link: https://lore.kernel.org/r/CAHk-=wivmk_j6KbTX+Er64mLrG8abXZo0M10PNdAnHc8fWXfsQ@mail.gmail.com Reported-by: Linus Torvalds Reviewed-by: Andreas Dilger Signed-off-by: Theodore Ts'o commit 7b19914383fc008a6b51871f18da72cf9aa43cae Author: José Roberto de Souza Date: Thu Jan 16 17:58:34 2020 -0800 drm/mst: Don't do atomic checks over disabled managers When a main MST port is disconnected drivers should call drm_dp_mst_topology_mgr_set_mst() disabling the MST manager, this function will set manager mst_primary to NULL and it will cause the crash bellow on the next atomic check when trying to access mst_primary->port. As there is no use in running checks over managers that are not active this patch will skip it. [ 305.616450] [drm:drm_dp_mst_atomic_check] [MST PORT:00000000cc2049e9] releases all VCPI slots [ 305.625085] [drm:drm_dp_mst_atomic_check] [MST PORT:00000000020ab43e] releases all VCPI slots [ 305.633729] [drm:drm_dp_mst_atomic_check] [MST MGR:00000000cdd467d4] mst state 00000000b67672eb VCPI avail=63 used=0 [ 305.644405] BUG: kernel NULL pointer dereference, address: 0000000000000030 [ 305.651448] #PF: supervisor read access in kernel mode [ 305.656640] #PF: error_code(0x0000) - not-present page [ 305.661807] PGD 0 P4D 0 [ 305.664396] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 305.668789] CPU: 3 PID: 183 Comm: kworker/3:2 Not tainted 5.5.0-rc6+ #1404 [ 305.675703] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3201.A00.1905140358 05/14/2019 [ 305.689425] Workqueue: events drm_dp_delayed_destroy_work [ 305.694874] RIP: 0010:drm_dp_mst_atomic_check+0x138/0x2c0 [ 305.700306] Code: 00 00 00 41 29 d9 41 89 d8 4c 89 fa 4c 89 f1 48 c7 c6 b0 b1 34 82 bf 10 00 00 00 45 31 ed e8 3f 99 02 00 4d 8b bf 80 04 00 00 <49> 8b 47 30 49 8d 5f 30 4c 8d 60 e8 48 39 c3 74 35 49 8b 7c 24 28 [ 305.719169] RSP: 0018:ffffc90001687b58 EFLAGS: 00010246 [ 305.724434] RAX: 0000000000000000 RBX: 000000000000003f RCX: 0000000000000000 [ 305.731611] RDX: 0000000000000000 RSI: ffff88849fba8cb8 RDI: 00000000ffffffff [ 305.738785] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 [ 305.745962] R10: ffffc900016879a0 R11: ffffc900016879a5 R12: 0000000000000000 [ 305.753139] R13: 0000000000000000 R14: ffff8884905c9bc0 R15: 0000000000000000 [ 305.760315] FS: 0000000000000000(0000) GS:ffff88849fb80000(0000) knlGS:0000000000000000 [ 305.768452] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 305.774263] CR2: 0000000000000030 CR3: 0000000005610006 CR4: 0000000000760ee0 [ 305.781441] PKRU: 55555554 [ 305.784228] Call Trace: [ 305.786739] intel_atomic_check+0xb2e/0x2560 [i915] [ 305.791678] ? printk+0x53/0x6a [ 305.794856] ? drm_atomic_check_only+0x3e/0x810 [ 305.799417] ? __drm_dbg+0x82/0x90 [ 305.802848] drm_atomic_check_only+0x56a/0x810 [ 305.807322] drm_atomic_commit+0xe/0x50 [ 305.811185] drm_client_modeset_commit_atomic+0x1e2/0x250 [ 305.816619] drm_client_modeset_commit_force+0x4d/0x180 [ 305.821921] drm_fb_helper_restore_fbdev_mode_unlocked+0x46/0xa0 [ 305.827963] drm_fb_helper_set_par+0x2b/0x40 [ 305.832265] drm_fb_helper_hotplug_event.part.0+0xb2/0xd0 [ 305.837755] drm_kms_helper_hotplug_event+0x21/0x30 [ 305.842694] process_one_work+0x25b/0x5b0 [ 305.846735] worker_thread+0x4b/0x3b0 [ 305.850439] kthread+0x100/0x140 [ 305.853690] ? process_one_work+0x5b0/0x5b0 [ 305.857901] ? kthread_park+0x80/0x80 [ 305.861588] ret_from_fork+0x24/0x50 [ 305.865202] Modules linked in: snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic i915 btusb btrtl btbcm btintel bluetooth prime_numbers snd_hda_intel snd_intel_dspcfg snd_hda_codec e1000e snd_hwdep snd_hda_core thunderbolt mei_hdcp mei_me asix cdc_ether x86_pkg_temp_thermal r8152 mei coretemp usbnet snd_pcm mii crct10dif_pclmul ptp crc32_pclmul ecdh_generic ghash_clmulni_intel pps_core ecc i2c_i801 intel_lpss_pci [ 305.903096] CR2: 0000000000000030 [ 305.906431] ---[ end trace 70ee364eed801cb0 ]--- [ 305.940816] RIP: 0010:drm_dp_mst_atomic_check+0x138/0x2c0 [ 305.946261] Code: 00 00 00 41 29 d9 41 89 d8 4c 89 fa 4c 89 f1 48 c7 c6 b0 b1 34 82 bf 10 00 00 00 45 31 ed e8 3f 99 02 00 4d 8b bf 80 04 00 00 <49> 8b 47 30 49 8d 5f 30 4c 8d 60 e8 48 39 c3 74 35 49 8b 7c 24 28 [ 305.965125] RSP: 0018:ffffc90001687b58 EFLAGS: 00010246 [ 305.970382] RAX: 0000000000000000 RBX: 000000000000003f RCX: 0000000000000000 [ 305.977571] RDX: 0000000000000000 RSI: ffff88849fba8cb8 RDI: 00000000ffffffff [ 305.984747] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 [ 305.991921] R10: ffffc900016879a0 R11: ffffc900016879a5 R12: 0000000000000000 [ 305.999099] R13: 0000000000000000 R14: ffff8884905c9bc0 R15: 0000000000000000 [ 306.006271] FS: 0000000000000000(0000) GS:ffff88849fb80000(0000) knlGS:0000000000000000 [ 306.014407] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 306.020185] CR2: 0000000000000030 CR3: 000000048b3aa003 CR4: 0000000000760ee0 [ 306.027404] PKRU: 55555554 [ 306.030127] BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:38 [ 306.039049] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 183, name: kworker/3:2 [ 306.047272] INFO: lockdep is turned off. [ 306.051217] irq event stamp: 77505 [ 306.054647] hardirqs last enabled at (77505): [] _raw_spin_unlock_irqrestore+0x47/0x60 [ 306.064270] hardirqs last disabled at (77504): [] _raw_spin_lock_irqsave+0xf/0x50 [ 306.073404] softirqs last enabled at (77402): [] __do_softirq+0x389/0x47f [ 306.081885] softirqs last disabled at (77395): [] irq_exit+0xa9/0xc0 [ 306.089859] CPU: 3 PID: 183 Comm: kworker/3:2 Tainted: G D 5.5.0-rc6+ #1404 [ 306.098167] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3201.A00.1905140358 05/14/2019 [ 306.111882] Workqueue: events drm_dp_delayed_destroy_work [ 306.117314] Call Trace: [ 306.119780] dump_stack+0x71/0xa0 [ 306.123135] ___might_sleep.cold+0xf7/0x10b [ 306.127399] exit_signals+0x2b/0x360 [ 306.131014] do_exit+0xa7/0xc70 [ 306.134189] ? kthread+0x100/0x140 [ 306.137615] rewind_stack_do_exit+0x17/0x20 Fixes: cd82d82cbc04 ("drm/dp_mst: Add branch bandwidth validation to MST atomic check") Cc: Mikita Lipski Cc: Alex Deucher Cc: Lyude Paul Acked-by: Mikita Lipski Reviewed-by: Lyude Paul Signed-off-by: José Roberto de Souza Signed-off-by: Alex Deucher commit bd0522112332663e386df1b8642052463ea9b3b9 Author: Pan, Xinhui Date: Thu Jan 16 06:09:41 2020 +0000 drm/amdgpu: add the lost mutex_init back Initialize notifier_lock. Bug: https://gitlab.freedesktop.org/drm/amd/issues/1016 Reviewed-by: Feifei Xu Reviewed-by: Christian König Signed-off-by: xinhui pan Signed-off-by: Alex Deucher commit b0e55fef624e511e060fa05e4ca96cae6d902f04 Author: Krzysztof Kozlowski Date: Fri Jan 17 20:03:05 2020 +0100 arm64: dts: exynos: Rename Samsung and Exynos to lowercase Fix up inconsistent usage of upper and lowercase letters in "Samsung" and "Exynos" names. "SAMSUNG" and "EXYNOS" are not abbreviations but regular trademarked names. Therefore they should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Although advertisement materials usually use uppercase "SAMSUNG", the lowercase version is used in all legal aspects (e.g. on Wikipedia and in privacy/legal statements on https://www.samsung.com/semiconductor/privacy-global/). Link: https://lore.kernel.org/r/20200117190305.5257-1-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Olof Johansson commit e926791a9670c24b391277dad2460912576b1575 Author: Nicolas Saenz Julienne Date: Tue Jan 14 17:48:59 2020 +0100 arm64: defconfig: Enable Broadcom's GENET Ethernet controller Currently used on the Raspberry Pi 4 and various Broadcom STB SoCs. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Florian Fainelli commit bd4d5488d37adabd572acbf3f7744a37da909d8e Merge: b252fd42b126 3f03a58b2575 Author: Olof Johansson Date: Fri Jan 17 11:24:30 2020 -0800 Merge tag 'ti-k3-soc-for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into arm/dt Texas Instruments K3 SoC family changes for 5.6 - Add missing power domains for smmu for J721e - Add I2C, ADC, OSPI and UFS nodes for J721e - Add OSPI and MCU syscon nodes for am65x - Add IRQ line for GPIO expander on am65x * tag 'ti-k3-soc-for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux: arm64: dts: ti: k3-j721e-main: Add missing power-domains for smmu arm64: dts: ti: k3-am65-mcu: add system control module node arm64: dts: k3-am654-base-board: Add IRQ line for GPIO expander arm64: dts: ti: k3-am65: Add OSPI DT node arm64: dts: ti: k3-j721e: Add DT nodes for few peripherials Link: https://lore.kernel.org/r/c5b74bfc-f2f0-1b72-4a3c-4c1d478a023a@ti.com Signed-off-by: Olof Johansson commit 9ea37e24d4a95dd934a0600d65caa25e409705bb Author: Tejun Heo Date: Fri Jan 17 11:54:35 2020 -0800 iocost: Fix iocost_monitor.py due to helper type mismatch iocost_monitor.py broke with recent versions of drgn due to helper being stricter about types. Fix it so that it uses the correct type. Signed-off-by: Tejun Heo Suggested-by: Omar Sandoval commit 2ced5a3449f19de77c9790affda213a7d3b59dd6 Merge: 061937296a3b 3277e8aa2504 Author: Olof Johansson Date: Fri Jan 17 11:29:48 2020 -0800 Merge tag 'drivers_soc_for_5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into arm/drivers SOC: TI Keystone Ring Accelerator driver The Ring Accelerator (RINGACC or RA) provides hardware acceleration to enable straightforward passing of work between a producer and a consumer. There is one RINGACC module per NAVSS on TI AM65x SoCs. * tag 'drivers_soc_for_5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: soc: ti: k3: add navss ringacc driver bindings: soc: ti: add documentation for k3 ringacc Link: https://lore.kernel.org/r/1579205259-4845-1-git-send-email-santosh.shilimkar@oracle.com Signed-off-by: Olof Johansson commit cdfc88f1cdbf12b666dcf2da3f1de38fb1512262 Author: Marek Szyprowski Date: Fri Jan 17 13:34:48 2020 +0100 ARM: multi_v7_defconfig: Enable devfreq thermal integration Panfrost driver provides a devfreq driver for the Mali GPU and allows to scale GPU core frequency. Enable support for devfreq thermal integration to enable cooling of GPU thermal zone by reducing GPU core frequency. This fixes following warning during boot on Exynos5422-based Odroid XU4: panfrost 11800000.gpu: [drm:panfrost_devfreq_init] Failed to register cooling device Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 9947d108d824d6fd57c6faf3f024b66ef553d78b Author: Marek Szyprowski Date: Fri Jan 17 13:34:47 2020 +0100 ARM: exynos_defconfig: Enable devfreq thermal integration Panfrost driver provides a devfreq driver for the Mali GPU and allows to scale GPU core frequency. Enable support for devfreq thermal integration to enable cooling of GPU thermal zone by reducing GPU core frequency. This fixes following warning during boot on Exynos5422-based Odroid XU4: panfrost 11800000.gpu: [drm:panfrost_devfreq_init] Failed to register cooling device Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 484603387077803d0e5f993faa987e06d8d98a43 Author: Krzysztof Kozlowski Date: Thu Jan 16 12:44:07 2020 +0100 ARM: multi_v7_defconfig: Enable NFS v4.1 and v4.2 NFS is widely used in debugging and Continuous Integration systems, so enable the newest versions of protocol: v4.1 and v4.2. Signed-off-by: Krzysztof Kozlowski commit b52e1f4b159a134fad9507e0a6485e7032b5d40a Author: Krzysztof Kozlowski Date: Thu Jan 16 12:44:06 2020 +0100 ARM: exynos_defconfig: Enable NFS v4.1 and v4.2 NFS is widely used in debugging and Continuous Integration systems, so enable the newest versions of protocol: v4.1 and v4.2. Signed-off-by: Krzysztof Kozlowski commit 31ef091770da008b4b181e70858e2742ed0c3e39 Merge: e42617b825f8 64c76b31774d Author: Stephen Boyd Date: Fri Jan 17 11:01:09 2020 -0800 Merge tag 'clk-meson-v5.6-1' of https://github.com/BayLibre/clk-meson into clk-amlogic Pull Amlogic clk driver updates from Jerome Brunet: - Add meson8b DDR clock controller - Add input clocks to meson8b controllers - Fix meson8b mali clock update using the glitch free mux - Fix pll driver division by zero init * tag 'clk-meson-v5.6-1' of https://github.com/BayLibre/clk-meson: clk: clarify that clk_set_rate() does updates from top to bottom clk: meson: meson8b: make the CCF use the glitch-free mali mux clk: meson: pll: Fix by 0 division in __pll_params_to_rate() clk: meson: g12a: fix missing uart2 in regmap table clk: meson: meson8b: use of_clk_hw_register to register the clocks clk: meson: meson8b: don't register the XTAL clock when provided via OF clk: meson: meson8b: change references to the XTAL clock to use [fw_]name clk: meson: meson8b: use clk_hw_set_parent in the CPU clock notifier clk: meson: add a driver for the Meson8/8b/8m2 DDR clock controller dt-bindings: clock: meson8b: add the clock inputs dt-bindings: clock: add the Amlogic Meson8 DDR clock controller binding commit 536a0d8e79fb928f2735db37dda95682b6754f9a Author: Xiaochen Shen Date: Thu Dec 12 04:05:05 2019 +0800 x86/resctrl: Check monitoring static key in the MBM overflow handler Currently, there are three static keys in the resctrl file system: rdt_mon_enable_key and rdt_alloc_enable_key indicate if the monitoring feature and the allocation feature are enabled, respectively. The rdt_enable_key is enabled when either the monitoring feature or the allocation feature is enabled. If no monitoring feature is present (either hardware doesn't support a monitoring feature or the feature is disabled by the kernel command line option "rdt="), rdt_enable_key is still enabled but rdt_mon_enable_key is disabled. MBM is a monitoring feature. The MBM overflow handler intends to check if the monitoring feature is not enabled for fast return. So check the rdt_mon_enable_key in it instead of the rdt_enable_key as former is the more accurate check. [ bp: Massage commit message. ] Fixes: e33026831bdb ("x86/intel_rdt/mbm: Handle counter overflow") Signed-off-by: Xiaochen Shen Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/1576094705-13660-1-git-send-email-xiaochen.shen@intel.com commit a84de2fa962c1b0551653fe245d6cb5f6129179c Author: Tony W Wang-oc Date: Fri Jan 17 10:24:32 2020 +0800 x86/speculation/swapgs: Exclude Zhaoxin CPUs from SWAPGS vulnerability New Zhaoxin family 7 CPUs are not affected by the SWAPGS vulnerability. So mark these CPUs in the cpu vulnerability whitelist accordingly. Signed-off-by: Tony W Wang-oc Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/1579227872-26972-3-git-send-email-TonyWWang-oc@zhaoxin.com commit 1e41a766c98b481400ab8c5a7aa8ea63a1bb03de Author: Tony W Wang-oc Date: Fri Jan 17 10:24:31 2020 +0800 x86/speculation/spectre_v2: Exclude Zhaoxin CPUs from SPECTRE_V2 New Zhaoxin family 7 CPUs are not affected by SPECTRE_V2. So define a separate cpu_vuln_whitelist bit NO_SPECTRE_V2 and add these CPUs to the cpu vulnerability whitelist. Signed-off-by: Tony W Wang-oc Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/1579227872-26972-2-git-send-email-TonyWWang-oc@zhaoxin.com commit 5efc6fa9044c3356d6046c6e1da6d02572dbed6b Author: Pawan Gupta Date: Fri Jan 10 14:50:54 2020 -0800 x86/cpu: Update cached HLE state on write to TSX_CTRL_CPUID_CLEAR /proc/cpuinfo currently reports Hardware Lock Elision (HLE) feature to be present on boot cpu even if it was disabled during the bootup. This is because cpuinfo_x86->x86_capability HLE bit is not updated after TSX state is changed via the new MSR IA32_TSX_CTRL. Update the cached HLE bit also since it is expected to change after an update to CPUID_CLEAR bit in MSR IA32_TSX_CTRL. Fixes: 95c5824f75f3 ("x86/cpu: Add a "tsx=" cmdline option with TSX disabled by default") Signed-off-by: Pawan Gupta Signed-off-by: Thomas Gleixner Tested-by: Neelima Krishnan Reviewed-by: Dave Hansen Reviewed-by: Josh Poimboeuf Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/2529b99546294c893dfa1c89e2b3e46da3369a59.1578685425.git.pawan.kumar.gupta@linux.intel.com commit 102d412a3d565a105f16e883169239dd66b680b5 Author: Colin Ian King Date: Thu Dec 19 23:45:35 2019 +0000 ice: remove redundant assignment to variable xmit_done The variable xmit_done 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 Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ed5a3f664c557e2ee5d92f75398a0fc8ab522ad5 Author: Julio Faracco Date: Wed Dec 18 15:38:45 2019 -0300 ice: Removing hung_queue variable to use txqueue function parameter The scope of function .ndo_tx_timeout was changed to include the hang queue when a TX timeout event occurs. See commit 0290bd291cc0 ("netdev: pass the stuck queue to the timeout handler") for more details. Now, drivers don't need to identify which queue is stopped. Drivers can simply use the queue index provided by dev_watchdog and execute all actions needed to restore network traffic. This commit do some cleanups into Intel ice driver to remove a redundant loop to find stopped queue. Signed-off-by: Julio Faracco Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 65279beec34565a3d9d4d098ea7f602ffc419695 Author: Julio Faracco Date: Wed Dec 18 15:38:44 2019 -0300 i40e: Removing hung_queue variable to use txqueue function parameter The scope of function .ndo_tx_timeout was changed to include the hang queue when a TX timeout event occurs. See commit 0290bd291cc0 ("netdev: pass the stuck queue to the timeout handler") for more details. Now, drivers don't need to identify which queue is stopped. Drivers can simply use the queue index provided by dev_watchdog and execute all actions needed to restore network traffic. This commit do some cleanups into Intel i40e driver to remove a redundant loop to find stopped queue. Signed-off-by: Julio Faracco Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 2da259c5fe1f528dd9bd4d0430a2732de18c190b Author: Jacob Keller Date: Thu Dec 19 12:10:00 2019 -0800 fm10k: use txqueue parameter in fm10k_tx_timeout Make use of the new txqueue parameter to the .ndo_tx_timeout function. In fm10k_tx_timeout, remove the now unnecessary loop to determine which Tx queue is stuck. Instead, just double check the specified queue This could be improved further to attempt resetting only the specific queue that got stuck. However, that is a much larger refactor and has been left as a future improvement. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit bcb3244ccdc4cebb6ed3d47d973da7b1a03837c0 Author: Sasha Neftin Date: Wed Jan 8 10:19:24 2020 +0200 igc: Add PHY power management control PHY power management control should provide a reliable and accurate indication of PHY reset completion and decrease the delay time after a PHY reset Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit f38b782dccabb2ada5c5b3c0dfb5ef0758a67ce0 Author: Sasha Neftin Date: Sun Jan 5 14:20:53 2020 +0200 igc: Add support for TSO TCP segmentation offload allows a device to segment a single frame into multiple frames with a data payload size specified in socket buffer. As a result we can now send data approximately up to seven percents fast than was previously possible on my system. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 0e7d4b93b0de94386be44d2a7ffa417a5c4adc1b Author: Sasha Neftin Date: Wed Jan 1 09:14:17 2020 +0200 igc: Add SKU for i225 device Add support for blank NVM SKU Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 34e9c162f09e224e94e519643970f6d7d607c8fd Author: Sasha Neftin Date: Wed Jan 1 08:49:13 2020 +0200 igc: Remove unused definition Remove the unused IGC_FUNC_0 definition and make the code cleaner Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 93d85dc5651d8337e3681441df1d5dd4184784ab Author: Sasha Neftin Date: Sun Dec 29 16:09:09 2019 +0200 igc: Fix typo in a comment Fix typo in a context descriptor comment Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit fdd64df7b9d1e20dbe28c9c205682b66ad821e6c Author: Alan Stern Date: Fri Jan 17 10:47:13 2020 -0500 USB: usbfs: Always unlink URBs in reverse order When the kernel unlinks a bunch of URBs for a single endpoint, it should always unlink them in reverse order. This eliminates any possibility that some URB x will be unlinked before it can execute but the following URB x+1 will execute before it can be unlinked. Such an event would be bad, for obvious reasons. Chris Dickens pointed out that usbfs doesn't behave this way when it is unbound from an interface. All pending URBs are cancelled, but in the order of submission. This patch changes the behavior to make the unlinks occur in reverse order. It similarly changes the behavior when usbfs cancels the continuation URBs for a BULK endpoint. Suggested-by: Chris Dickens Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/Pine.LNX.4.44L0.2001171045380.1571-100000@iolanthe.rowland.org Signed-off-by: Greg Kroah-Hartman commit c701917e647c6aaee5e7bbb7a2c1ca99e8552c58 Author: Andrii Nakryiko Date: Thu Jan 16 22:08:00 2020 -0800 libbpf: Fix potential multiplication overflow in mmap() size calculation Prevent potential overflow performed in 32-bit integers, before assigning result to size_t. Reported by LGTM static analysis. Fixes: eba9c5f498a1 ("libbpf: Refactor global data map initialization") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200117060801.1311525-4-andriin@fb.com commit b7d7f3e185b6e643dcd49d1486b11cade8519008 Author: Andrii Nakryiko Date: Thu Jan 16 22:07:59 2020 -0800 libbpf: Simplify BTF initialization logic Current implementation of bpf_object's BTF initialization is very convoluted and thus prone to errors. It doesn't have to be like that. This patch simplifies it significantly. This code also triggered static analysis issues over logically dead code due to redundant error checks. This simplification should fix that as well. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200117060801.1311525-3-andriin@fb.com commit bc0eb9a333918d2cc4f42f7f4cf09eaf029ac9de Author: Andrii Nakryiko Date: Thu Jan 16 22:07:58 2020 -0800 libbpf: Fix error handling bug in btf_dump__new Fix missing jump to error handling in btf_dump__new, found by Coverity static code analysis. Fixes: 9f81654eebe8 ("libbpf: Expose BTF-to-C type declaration emitting API") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200117060801.1311525-2-andriin@fb.com commit c2c24edb1d9c308011f5a1328563d8da8c92c849 Author: Robin Murphy Date: Fri Jan 17 15:48:39 2020 +0000 arm64: csum: Fix pathological zero-length calls In validating the checksumming results of the new routine, I sadly neglected to test its not-checksumming results. Thus it slipped through that the one case where @buff is already dword-aligned and @len = 0 manages to defeat the tail-masking logic and behave as if @len = 8. For a zero length it doesn't make much sense to deference @buff anyway, so just add an early return (which has essentially zero impact on performance). Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit e98d5023fe1f062bb549354a2428d930775fd67e Author: Masahiro Yamada Date: Thu Jan 16 21:50:45 2020 +0900 arm64: dts: uniphier: add reset-names to NAND controller node The Denali NAND controller IP has separate reset control for the controller core and registers. Add the reset-names, and one more phandle accordingly. This is the approved DT-binding. Signed-off-by: Masahiro Yamada commit 37f3e0096f716b06338a4771633b32b8e2a36f7f Author: Masahiro Yamada Date: Thu Jan 16 21:50:44 2020 +0900 ARM: dts: uniphier: add reset-names to NAND controller node The Denali NAND controller IP has separate reset control for the controller core and registers. Add the reset-names, and one more phandle accordingly. This is the approved DT-binding. Signed-off-by: Masahiro Yamada commit 791a0059e2585c094c2b8ff61983074c657dabf8 Author: Damian van Soelen Date: Wed Jan 15 17:46:19 2020 +0100 ASoC: Intel: cht_bsw_rt5645: Remove unnecessary string buffers and snprintf calls The snprintf calls filling cht_rt5645_cpu_dai_name / cht_rt5645_codec_aif_name always fill them with the same string ("ssp0-port" resp "rt5645-aif2") so instead of keeping these buffers around and making cpus->dai_name / codecs->dai_name point to this, simply update the *->dai_name pointers to directly point to a string constant containing the desired string. Signed-off-by: Damian van Soelen Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200115164619.101705-5-hdegoede@redhat.com Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit fcce38d85cb865346da9b8f2d87c9427153dc5ca Author: Jordy Ubink Date: Wed Jan 15 17:46:18 2020 +0100 ASoC: Intel: bytcr_rt5651: Remove unnecessary string buffers and snprintf calls The snprintf calls filling byt_rt56*_codec_aif_name/byt_rt56*_cpu_dai_name always fill them with the same string ("rt56*-aif2" resp. ssp0-port"). So instead of keeping these buffers around and making codecs->dai_name / cpus->dai_name point to them, simply update the *->dai_name pointers to directly point to a string constant containing the desired string. Signed-off-by: Jordy Ubink Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200115164619.101705-4-hdegoede@redhat.com Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 296868315c692a1f63465a9ec27cdfa3a46ec840 Author: Nariman Etemadi Date: Wed Jan 15 17:46:17 2020 +0100 ASoC: Intel: bytcr_rt5640: Remove unnecessary string buffers and snprintf calls The snprintf calls filling byt_rt56*_codec_aif_name/byt_rt56*_cpu_dai_name always fill them with the same string ("rt56*-aif2" resp. ssp0-port"). So instead of keeping these buffers around and making codecs->dai_name / cpus->dai_name point to them, simply update the *->dai_name pointers to directly point to a string constant containing the desired string. Signed-off-by: Nariman Etemadi Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200115164619.101705-3-hdegoede@redhat.com Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 332719b1840b9bf3e09938d1fda566f414fcf0e6 Author: Erik Bussing Date: Wed Jan 15 17:46:16 2020 +0100 ASoC: Intel: bytcr_rt5640: Remove code duplication in byt_rt5640_codec_fixup The 16 and 24 bit paths in byt_rt5640_codec_fixup are mostly identical, introduce a local bits variable to address the only difference and move the common bits out of the if ... else ... . Signed-off-by: Erik Bussing Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200115164619.101705-2-hdegoede@redhat.com Acked-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 00d852326e524214f046a5e1301eee84535a6863 Author: Stephan Gerhold Date: Tue Jan 14 19:12:29 2020 +0100 ASoC: msm8916-wcd-analog: Add MIC BIAS Internal3 PM8916 has three TX inputs that each have an (optional) internal RBIAS resistor. MIC BIAS Internal1/2 (for TX1/2) are already supported. TX3 does not have its own MIC BIAS supply, instead it is also supplied from MIC_BIAS1. Now that we have simplified the MIC BIAS Internal* implementation we can easily add support for it: Add a MIC BIAS Internal3 supply that enables the internal RBIAS resistor on TX3, and make sure to also enable the MIC_BIAS1 supply. Tested-by: Nikita Travkin # longcheer-l8150 Cc: Srinivas Kandagatla Signed-off-by: Stephan Gerhold Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200114181229.42302-2-stephan@gerhold.net Signed-off-by: Mark Brown commit 65fe457e7bafcbb844c66e8c54a414f090967eaa Author: Stephan Gerhold Date: Tue Jan 14 19:12:28 2020 +0100 ASoC: msm8916-wcd-analog: Simplify MIC BIAS Internal At the moment, MIC BIAS Internal* and MIC BIAS External* both reference the same register, and have a part of their initialization sequence duplicated. For example, the sequence for enabling MIC BIAS Internal1 is: I1. Enable MIC_BIAS1 supply (MICB_EN bit in CDC_A_MICB_1_EN) I2. Enable internal RBIAS (TX1_INT_RBIAS_EN bit in CDC_A_MICB_1_INT_RBIAS) The sequence for enabling MIC BIAS External1 is: E1. Enable MIC_BIAS1 supply (MICB_EN bit in CDC_A_MICB_1_EN) (E2. Ideally, make sure internal RBIAS is disabled. However, this should not happen in practice because DAPM will disable unused supplies...) Right now we have: SND_SOC_DAPM_SUPPLY("MIC BIAS Internal1", CDC_A_MICB_1_EN, 7, 0, ...) // I1 SND_SOC_DAPM_SUPPLY("MIC BIAS External1", CDC_A_MICB_1_EN, 7, 0, ...) // E1 and I2 is done in the PM event handler (pm8916_wcd_analog_enable_micbias_int1). We can simplify this by defining a common DAPM supply for I1/E1 ("MIC_BIAS1"), and one DAPM supply for I2 ("MIC BIAS Internal1"). Additional DAPM routes ensure that we also enable the MIC_BIAS1 supply for the internal and external pull up resistor. Another advantage of this is that we now disable the internal RBIAS when it is not needed. This makes it much easier to add support for MIC BIAS Internal3 as a next step. Tested-by: Nikita Travkin # longcheer-l8150 Cc: Srinivas Kandagatla Signed-off-by: Stephan Gerhold Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200114181229.42302-1-stephan@gerhold.net Signed-off-by: Mark Brown commit ea3f0ce756d678f94fd3060311030c5ed855e591 Merge: a174a6c22679 85578bbd642f Author: Mark Brown Date: Fri Jan 17 15:38:56 2020 +0000 Merge tag 'asoc-fix-v5.5-rc6' into asoc-5.6 ASoC: Fixes for v5.5 This is mostly driver specific fixes, plus an error handling fix in the core. There is a rather large diffstat for the stm32 SAI driver, this is a very large but mostly mechanical update which wraps every register access in the driver to allow a fix to the locking which avoids circular locks, the active change is much smaller and more reasonably sized. commit b5df0b2ee2ee6b5bdeb55d76c17f695a1aa5388f Author: Tomer Maimon Date: Wed Jan 15 18:23:01 2020 +0200 spi: npcm-pspi: modify reset support Modify NPCM perphiral SPI reset support from direct register access to reset controller support. Signed-off-by: Tomer Maimon Link: https://lore.kernel.org/r/20200115162301.235926-5-tmaimon77@gmail.com Signed-off-by: Mark Brown commit b4adf5b27d59cdefff1e6fcba99151edea65a9f7 Author: Tomer Maimon Date: Wed Jan 15 18:22:59 2020 +0200 spi: npcm-pspi: improve spi transfer performance Improving spi 8 bit per word mode transfer performance by using 16 bit per word transfer and receive when the data length is even and larger than one. Signed-off-by: Tomer Maimon Link: https://lore.kernel.org/r/20200115162301.235926-3-tmaimon77@gmail.com Signed-off-by: Mark Brown commit 6925212f328bf2abde0c8f0d037fddd36751d489 Author: Jean Pihet Date: Wed Jan 15 11:07:00 2020 +0100 spi: spi-ti-qspi: fix warning drivers/spi/spi-ti-qspi.c: In function ‘ti_qspi_start_transfer_one’: drivers/spi/spi-ti-qspi.c:392:8: warning: ‘rx_wlen’ may be used uninitialized in this function [-Wmaybe-uninitialized] 392 | if (rx_wlen >= 32) | ^ drivers/spi/spi-ti-qspi.c:318:12: note: ‘rx_wlen’ was declared here 318 | u8 rxlen, rx_wlen; | ^~~~~~~ The warning is a false positive; it is not thrown by all compiler versions, e.g. Red Hat Cross 9.2.1-1 but not Linaro GCC 7.5-2019.12. Signed-off-by: Jean Pihet Link: https://lore.kernel.org/r/20200115100700.3357-1-jean.pihet@newoldbits.com Signed-off-by: Mark Brown commit 47416a5f27be0a0e815ef5f9f2f06618ae5e0470 Author: Tomer Maimon Date: Wed Jan 15 18:22:58 2020 +0200 spi: npcm-pspi: fix 16 bit send and receive support Fixing NPCM BMC Peripheral SPI controller 16 bit send and receive support by writing and reading the SPI data in the right order. Signed-off-by: Tomer Maimon Link: https://lore.kernel.org/r/20200115162301.235926-2-tmaimon77@gmail.com Signed-off-by: Mark Brown commit 6157d4c255609da28f5a271ec1d56d74beb4c8be Author: Jarkko Nikula Date: Thu Jan 16 11:10:35 2020 +0200 spi: pxa2xx: Add support for Intel Comet Lake PCH-V Add support for Intel Comet Lake PCH-V which has the same LPSS than on Intel Kaby lake unlike other Intel Comet Lake PCH variants that are based on Intel Cannon Lake PCH LPSS. Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20200116091035.575175-1-jarkko.nikula@linux.intel.com Signed-off-by: Mark Brown commit 53ba2f1aa3860f7ea0bf81543aab4a66af3f01d0 Author: Axel Lin Date: Wed Jan 15 08:29:53 2020 +0800 regulator: mpq7920: Fix incorrect defines Fix defines for MPQ7920_MASK_BUCK_ILIM and MPQ7920_DISCHARGE_ON Remove unused MPQ7920_REG_REGULATOR_EN1. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20200115002953.14731-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 493a31ee0dbdb58d23aa3b06da2da7901f55f76b Author: YueHaibing Date: Thu Jan 16 02:33:44 2020 +0000 regulator: vqmmc-ipq4019: Fix platform_no_drv_owner.cocci warnings Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200116023344.163592-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit e9153311491da9d9863ead9888a1613531cb4a1b Author: Enric Balletbo i Serra Date: Thu Jan 16 10:45:43 2020 +0100 regulator: vctrl-regulator: Avoid deadlock getting and setting the voltage `cat /sys/kernel/debug/regulator/regulator_summary` ends on a deadlock when you have a voltage controlled regulator (vctrl). The problem is that the vctrl_get_voltage() and vctrl_set_voltage() calls the regulator_get_voltage() and regulator_set_voltage() and that will try to lock again the dependent regulators (the regulator supplying the control voltage). Fix the issue by exporting the unlocked version of the regulator_get_voltage() and regulator_set_voltage() API so drivers that need it, like the voltage controlled regulator driver can use it. Fixes: f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking") Reported-by: Douglas Anderson Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20200116094543.2847321-1-enric.balletbo@collabora.com Signed-off-by: Mark Brown commit a174a6c226796824cb2f78157c0b183ed472fa3f Author: Ravulapati Vishnu vardhan rao Date: Fri Jan 17 17:15:09 2020 +0530 ASoC: amd: Additional DAI for I2S SP instance. I2S SP instance has separate BCLK and LRCLK for Tx and Rx. Creating additional DAI for Rx. Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/1579261510-12580-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit f9f5bbf5783cd63369d3e6c8cf27e2bd7c5ac2c3 Author: Wei Yongjun Date: Fri Jan 17 02:41:49 2020 +0000 ASoC: rt715: fix return value check in rt715_sdw_probe() In case of error, the function devm_regmap_init() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: d1ede0641b05 ("ASoC: rt715: add RT715 codec driver") Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20200117024149.75515-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown commit b03c29c1b13afa18ee88cce07bbe87298eb0d3a3 Author: Wei Yongjun Date: Wed Jan 15 14:30:34 2020 +0000 ASoC: rt711: fix return value check in rt711_sdw_probe() In case of error, the function devm_regmap_init() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 320b8b0d13b8 ("ASoC: rt711: add rt711 codec driver") Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20200115143034.94492-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown commit 20435df1c1d708b44f58da17653f2ea609aee790 Author: Wei Yongjun Date: Wed Jan 15 14:30:27 2020 +0000 ASoC: rt700: fix return value check in rt700_sdw_probe() In case of error, the function devm_regmap_init() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 7d2a5f9ae41e ("ASoC: rt700: add rt700 codec driver") Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20200115143027.94364-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown commit a62c449f4cc1498d040d84e6210209c474b5c746 Author: YueHaibing Date: Thu Jan 16 02:11:42 2020 +0000 ASoC: rt715: remove unused including Remove including that don't need it. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200116021142.149000-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit 0e4ba0290e5851833f17b2b56deab6a28827bb07 Author: Shuming Fan Date: Thu Jan 16 17:18:54 2020 +0800 ASoC: rt1011: set the different setting for QFN/WLCSP package The QFN package is a new one. There is a different initial setting to the chip of QFN and WLCSP package. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20200116091854.18095-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 4061fdc89ff7704a71dc6df8e5841f861138e7e1 Author: Charles Keepax Date: Tue Jan 14 16:18:40 2020 +0000 ASoC: madera: Correct error path handling in madera_out1_demux_put Should the write to MADERA_OUTPUT_ENABLES_1 fail and out_clamp[0] not be set an additional error message will be printed. Clear the ret variable to avoid this. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200114161841.451-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit a6947c9d86bcfd61b758b5693eba58defe7fd2ae Author: Cezary Rojewski Date: Mon Jan 13 12:40:54 2020 +0100 ASoC: SOF: Intel: hda: Fix SKL dai count With fourth pin added for iDisp for skl_dai, update SOF_SKL_DAI_NUM to account for the change. Without this, dais from the bottom of the list are skipped. In current state that's the case for 'Alt Analog CPU DAI'. Fixes: ac42b142cd76 ("ASoC: SOF: Intel: hda: Add iDisp4 DAI") Signed-off-by: Cezary Rojewski Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113114054.9716-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 8ab6ddc5c51b09630f3c89eb410ac48e13a2f0ff Author: Charles Keepax Date: Tue Jan 14 16:18:41 2020 +0000 ASoC: madera: Update handling of DAPM routes for mono muxed outputs Correctly link both channels on the DAC if an output muxed between a stereo and mono output. Without this one channel of the DAC may be erroneously powered down whilst in mono mode. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200114161841.451-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 73ecf1a673d3502dff1445f06675aba65ff20ce7 Author: Charles Keepax Date: Tue Jan 14 16:18:38 2020 +0000 ASoC: wm_adsp: Correct cache handling of new kernel control API The recently added API that exposes firmware mixer controls to the kernel is missing cache handling and all writes bypass the cache, this obviously causes the cache to get out of sync with the hardware. Factor out the cache handling into two new helper functions and call those from both the normal ALSA control handlers and the new kernel API. Fixes: eb65ccdb0836 ("ASoC: wm_adsp: Expose mixer control API") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200114161841.451-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 9f24c540f7f8eb3a981528da9a9a636a5bdf5987 Author: Thomas Gleixner Date: Tue Jan 14 19:52:39 2020 +0100 lib/vdso: Update coarse timekeeper unconditionally The low resolution parts of the VDSO, i.e.: clock_gettime(CLOCK_*_COARSE), clock_getres(), time() can be used even if there is no VDSO capable clocksource. But if an architecture opts out of the VDSO data update then this information becomes stale. This affects ARM when there is no architected timer available. The lack of update causes userspace to use stale data forever. Make the update of the low resolution parts unconditional and only skip the update of the high resolution parts if the architecture requests it. Fixes: 44f57d788e7d ("timekeeping: Provide a generic update_vsyscall() implementation") Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200114185946.765577901@linutronix.de commit 9a6b55ac4a44060bcb782baf002859b2a2c63267 Author: Thomas Gleixner Date: Tue Jan 14 19:52:38 2020 +0100 lib/vdso: Make __arch_update_vdso_data() logic understandable The function name suggests that this is a boolean checking whether the architecture asks for an update of the VDSO data, but it works the other way round. To spare further confusion invert the logic. Fixes: 44f57d788e7d ("timekeeping: Provide a generic update_vsyscall() implementation") Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200114185946.656652824@linutronix.de commit 35fd7a637c42bb54ba4608f4d40ae6e55fc88781 Author: Marco Elver Date: Thu Jan 16 19:55:29 2020 +0100 debugobjects: Fix various data races The counters obj_pool_free, and obj_nr_tofree, and the flag obj_freeing are read locklessly outside the pool_lock critical sections. If read with plain accesses, this would result in data races. This is addressed as follows: * reads outside critical sections become READ_ONCE()s (pairing with WRITE_ONCE()s added); * writes become WRITE_ONCE()s (pairing with READ_ONCE()s added); since writes happen inside critical sections, only the write and not the read of RMWs needs to be atomic, thus WRITE_ONCE(var, var +/- X) is sufficient. The data races were reported by KCSAN: BUG: KCSAN: data-race in __free_object / fill_pool write to 0xffffffff8beb04f8 of 4 bytes by interrupt on cpu 1: __free_object+0x1ee/0x8e0 lib/debugobjects.c:404 __debug_check_no_obj_freed+0x199/0x330 lib/debugobjects.c:969 debug_check_no_obj_freed+0x3c/0x44 lib/debugobjects.c:994 slab_free_hook mm/slub.c:1422 [inline] read to 0xffffffff8beb04f8 of 4 bytes by task 1 on cpu 2: fill_pool+0x3d/0x520 lib/debugobjects.c:135 __debug_object_init+0x3c/0x810 lib/debugobjects.c:536 debug_object_init lib/debugobjects.c:591 [inline] debug_object_activate+0x228/0x320 lib/debugobjects.c:677 debug_rcu_head_queue kernel/rcu/rcu.h:176 [inline] BUG: KCSAN: data-race in __debug_object_init / fill_pool read to 0xffffffff8beb04f8 of 4 bytes by task 10 on cpu 6: fill_pool+0x3d/0x520 lib/debugobjects.c:135 __debug_object_init+0x3c/0x810 lib/debugobjects.c:536 debug_object_init_on_stack+0x39/0x50 lib/debugobjects.c:606 init_timer_on_stack_key kernel/time/timer.c:742 [inline] write to 0xffffffff8beb04f8 of 4 bytes by task 1 on cpu 3: alloc_object lib/debugobjects.c:258 [inline] __debug_object_init+0x717/0x810 lib/debugobjects.c:544 debug_object_init lib/debugobjects.c:591 [inline] debug_object_activate+0x228/0x320 lib/debugobjects.c:677 debug_rcu_head_queue kernel/rcu/rcu.h:176 [inline] BUG: KCSAN: data-race in free_obj_work / free_object read to 0xffffffff9140c190 of 4 bytes by task 10 on cpu 6: free_object+0x4b/0xd0 lib/debugobjects.c:426 debug_object_free+0x190/0x210 lib/debugobjects.c:824 destroy_timer_on_stack kernel/time/timer.c:749 [inline] write to 0xffffffff9140c190 of 4 bytes by task 93 on cpu 1: free_obj_work+0x24f/0x480 lib/debugobjects.c:313 process_one_work+0x454/0x8d0 kernel/workqueue.c:2264 worker_thread+0x9a/0x780 kernel/workqueue.c:2410 Reported-by: Qian Cai Signed-off-by: Marco Elver Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200116185529.11026-1-elver@google.com commit f3c19481820cca412a768ae1d6737f59b68acfed Author: Zeng Tao Date: Fri Jan 17 09:52:52 2020 +0800 cpu-topology: Don't error on more than CONFIG_NR_CPUS CPUs in device tree When the kernel is configured with CONFIG_NR_CPUS smaller than the number of CPU nodes in the device tree(DT), all the CPU nodes parsing done to fetch topology information will fail. This is not reasonable as it is legal to have all the physical CPUs in the system in the DT. Let us just skip such CPU DT nodes that are not used in the kernel rather than returning an error. Reviewed-by: Sudeep Holla Signed-off-by: Zeng Tao Link: https://lore.kernel.org/r/1579225973-32423-1-git-send-email-prime.zeng@hisilicon.com Signed-off-by: Greg Kroah-Hartman commit 538f127cd3bcf76071139f4bfe9cc3b2a46f3b3d Author: Wei Liu Date: Sun Dec 22 23:34:04 2019 +0000 x86/hyper-v: Add "polling" bit to hv_synic_sint That bit is documented in TLFS 5.0c as follows: Setting the polling bit will have the effect of unmasking an interrupt source, except that an actual interrupt is not generated. Signed-off-by: Wei Liu Signed-off-by: Thomas Gleixner Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20191222233404.1629-1-wei.liu@kernel.org commit d0b7788804482b2689946cd8d910ac3e03126c8d Author: Arnd Bergmann Date: Thu Dec 12 15:03:57 2019 +0100 x86/apic/uv: Avoid unused variable warning When CONFIG_PROC_FS is disabled, the compiler warns about an unused variable: arch/x86/kernel/apic/x2apic_uv_x.c: In function 'uv_setup_proc_files': arch/x86/kernel/apic/x2apic_uv_x.c:1546:8: error: unused variable 'name' [-Werror=unused-variable] char *name = hubless ? "hubless" : "hubbed"; Simplify the code so this variable is no longer needed. Fixes: 8785968bce1c ("x86/platform/uv: Add UV Hubbed/Hubless Proc FS Files") Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191212140419.315264-1-arnd@arndb.de commit 3e3934176a4f9d479dea5cdd2fe6dd560f0ca0cf Author: Mark Rutland Date: Thu Jan 16 18:35:48 2020 +0000 arm64: entry: cleanup sp_el0 manipulation The kernel stashes the current task struct in sp_el0 so that this can be acquired consistently/cheaply when required. When we take an exception from EL0 we have to: 1) stash the original sp_el0 value 2) find the current task 3) update sp_el0 with the current task pointer Currently steps #1 and #2 occur in one place, and step #3 a while later. As the value of sp_el0 is immaterial between these points, let's move them together to make the code clearer and minimize ifdeffery. This necessitates moving the comment for MDSCR_EL1.SS. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon Signed-off-by: Will Deacon commit 7a2c094464e39a54f5b9228cd78208cd43872bbd Author: Mark Rutland Date: Thu Jan 16 18:35:47 2020 +0000 arm64: entry: cleanup el0 svc handler naming For most of the exception entry code, _handler() is the first C function called from the entry assembly in entry-common.c, and external functions handling the bulk of the logic are called do_(). For consistency, apply this scheme to el0_svc_handler and el0_svc_compat_handler, renaming them to do_el0_svc and do_el0_svc_compat respectively. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Reviewed-by: Anshuman Khandual Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon Signed-off-by: Will Deacon commit 2d226c1e1c194a4737bf17ad8432a479e4e7e4a6 Author: Mark Rutland Date: Thu Jan 16 18:35:46 2020 +0000 arm64: entry: mark all entry code as notrace Almost all functions in entry-common.c are marked notrace, with el1_undef and el1_inv being the only exceptions. We appear to have done this on the assumption that there were no exception registers that we needed to snapshot, and thus it was safe to run trace code that might result in further exceptions and clobber those registers. However, until we inherit the DAIF flags, our irq flag tracing is stale, and this discrepancy could set off warnings in some configurations. For example if CONFIG_DEBUG_LOCKDEP is selected and a trace function calls into any flag-checking locking routines. Given we don't expect to trigger el1_undef or el1_inv unless something is already wrong, any irqflag warnigns are liable to mask the information we'd actually care about. Let's keep things simple and mark el1_undef and el1_inv as notrace. Developers can trace do_undefinstr and bad_mode if they really want to monitor these cases. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon Signed-off-by: Will Deacon commit ddb953f86cfb1ec450eff16a94230fc6d9901552 Author: Mark Rutland Date: Thu Jan 16 18:35:45 2020 +0000 arm64: assembler: remove smp_dmb macro These days arm64 kernels are always SMP, and thus smp_dmb is an overly-long way of writing dmb. Naturally, no-one uses it. Remove the unused macro. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon commit 170b25fa6aab84dc9bdba88d4c64af5fbb789b6b Author: Mark Rutland Date: Thu Jan 16 18:35:44 2020 +0000 arm64: assembler: remove inherit_daif macro We haven't needed the inherit_daif macro since commit: ed3768db588291dd ("arm64: entry: convert el1_sync to C") ... which converted all callers to C and the local_daif_inherit function. Remove the unused macro. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: James Morse Cc: Will Deacon Signed-off-by: Will Deacon commit 3c23b83a88d00383e1d498cfa515249aa2fe0238 Author: Hanjun Guo Date: Tue Jan 14 20:14:11 2020 +0800 ACPI/IORT: Fix 'Number of IDs' handling in iort_id_map() The IORT specification [0] (Section 3, table 4, page 9) defines the 'Number of IDs' as 'The number of IDs in the range minus one'. However, the IORT ID mapping function iort_id_map() treats the 'Number of IDs' field as if it were the full IDs mapping count, with the following check in place to detect out of boundary input IDs: InputID >= Input base + Number of IDs This check is flawed in that it considers the 'Number of IDs' field as the full number of IDs mapping and disregards the 'minus one' from the IDs count. The correct check in iort_id_map() should be implemented as: InputID > Input base + Number of IDs this implements the specification correctly but unfortunately it breaks existing firmwares that erroneously set the 'Number of IDs' as the full IDs mapping count rather than IDs mapping count minus one. e.g. PCI hostbridge mapping entry 1: Input base: 0x1000 ID Count: 0x100 Output base: 0x1000 Output reference: 0xC4 //ITS reference PCI hostbridge mapping entry 2: Input base: 0x1100 ID Count: 0x100 Output base: 0x2000 Output reference: 0xD4 //ITS reference Two mapping entries which the second entry's Input base = the first entry's Input base + ID count, so for InputID 0x1100 and with the correct InputID check in place in iort_id_map() the kernel would map the InputID to ITS 0xC4 not 0xD4 as it would be expected. Therefore, to keep supporting existing flawed firmwares, introduce a workaround that instructs the kernel to use the old InputID range check logic in iort_id_map(), so that we can support both firmwares written with the flawed 'Number of IDs' logic and the correct one as defined in the specifications. [0]: http://infocenter.arm.com/help/topic/com.arm.doc.den0049d/DEN0049D_IO_Remapping_Table.pdf Reported-by: Pankaj Bansal Link: https://lore.kernel.org/linux-acpi/20191215203303.29811-1-pankaj.bansal@nxp.com/ Signed-off-by: Hanjun Guo Signed-off-by: Lorenzo Pieralisi Cc: Pankaj Bansal Cc: Will Deacon Cc: Sudeep Holla Cc: Catalin Marinas Cc: Robin Murphy Signed-off-by: Will Deacon commit d41938d2cbee926a7de0c1dcff94ca34bf2cab78 Author: Dave Martin Date: Wed Dec 11 18:40:06 2019 +0000 mm: Reserve asm-generic prot flags 0x10 and 0x20 for arch use The asm-generic/mman.h definitions are used by a few architectures that also define arch-specific PROT flags with value 0x10 and 0x20. This currently applies to sparc and powerpc for 0x10, while arm64 will soon join with 0x10 and 0x20. To help future maintainers, document the use of this flag in the asm-generic header too. Acked-by: Arnd Bergmann Signed-off-by: Dave Martin [catalin.marinas@arm.com: reserve 0x20 as well] Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon commit 95b3f74bec203804658e17f86fe20755bb8abcb9 Author: Catalin Marinas Date: Wed Dec 11 18:40:09 2019 +0000 arm64: Use macros instead of hard-coded constants for MAIR_EL1 Currently, the arm64 __cpu_setup has hard-coded constants for the memory attributes that go into the MAIR_EL1 register. Define proper macros in asm/sysreg.h and make use of them in proc.S. Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon commit 83b0c36b8a136042aa9209fc9ca2fab31d5fbe7c Author: Sai Prakash Ranjan Date: Fri Jan 17 01:33:53 2020 +0530 arm64: Add KRYO{3,4}XX CPU cores to spectre-v2 safe list The "silver" KRYO3XX and KRYO4XX CPU cores are not affected by Spectre variant 2. Add them to spectre_v2 safe list to correct the spurious ARM_SMCCC_ARCH_WORKAROUND_1 warning and vulnerability status reported under sysfs. Reviewed-by: Stephen Boyd Tested-by: Stephen Boyd Signed-off-by: Sai Prakash Ranjan [will: tweaked commit message to remove stale mention of "gold" cores] Signed-off-by: Will Deacon commit 56f200c78ce4d94680a27a1ce97a29ebeb4f23e1 Author: Guillaume Nault Date: Thu Jan 16 21:16:46 2020 +0100 netns: Constify exported functions Mark function parameters as 'const' where possible. Signed-off-by: Guillaume Nault Acked-by: Nicolas Dichtel Signed-off-by: David S. Miller commit 37fe45ad126dd5e9ade8be7ae5010fa1072abbbc Author: Vladimir Oltean Date: Thu Jan 16 20:41:53 2020 +0200 net: dsa: felix: Don't error out on disabled ports with no phy-mode The felix_parse_ports_node function was tested only on device trees where all ports were enabled. Fix this check so that the driver continues to probe only with the ports where status is not "disabled", as expected. Fixes: bdeced75b13f ("net: dsa: felix: Add PCS operations for PHYLINK") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 8c6123e150f26eda011bc284e7aff221ea4d306b Author: Alex Marginean Date: Thu Jan 16 20:09:59 2020 +0200 net: dsa: felix: Don't restart PCS SGMII AN if not needed Some PHYs like VSC8234 don't like it when AN restarts on their system side and they restart line side AN too, going into an endless link up/down loop. Don't restart PCS AN if link is up already. Although in theory this feedback loop should be possible with the other in-band AN modes too, for some reason it was not seen with the VSC8514 QSGMII and AQR412 USXGMII PHYs. So keep this logic only for SGMII where the problem was found. Fixes: bdeced75b13f ("net: dsa: felix: Add PCS operations for PHYLINK") Suggested-by: Vladimir Oltean Signed-off-by: Alex Marginean Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 062a33b1ad7c8df9f8f03f7b01c18e31a794a01d Author: Alex Marginean Date: Thu Jan 16 20:05:06 2020 +0200 net: dsa: felix: Set USXGMII link based on BMSR, not LPA At least some PHYs (AQR412) don't advertise copper-side link status during system side AN. So remove this duplicate assignment to pcs->link and rely on the previous one for link state: the local indication from the MAC PCS. Fixes: bdeced75b13f ("net: dsa: felix: Add PCS operations for PHYLINK") Signed-off-by: Alex Marginean Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 1d0ee02b35b5173f84f97912fd7c982bd063a1f5 Author: Ido Schimmel Date: Thu Jan 16 19:59:44 2020 +0200 Documentation: Fix typo in devlink documentation The driver is named "mlxsw", not "mlx5". Fixes: d4255d75856f ("devlink: document info versions for each driver") Signed-off-by: Ido Schimmel Reviewed-by: Jacob Keller Signed-off-by: David S. Miller commit 7e5d6cf35329c8b232a1e97114545c1745d79083 Author: Borislav Petkov Date: Fri Jan 17 12:30:20 2020 +0100 EDAC/amd64: Do not warn when removing instances On machines which do not populate all nodes with DIMMs, the driver doesn't initialize an instance there. However, the instance removal remove_one_instance() path will warn unconditionally, which is wrong. Remove the WARN_ON() even if the warning is innocent because it causes a splat in dmesg. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200117115939.5524-1-bp@alien8.de commit 90f29f0eada4d60e1f6ae537502ddb2202b9540d Author: Vladimir Oltean Date: Thu Jan 16 19:18:28 2020 +0200 enetc: Don't print from enetc_sched_speed_set when link goes down It is not an error to unplug a cable from the ENETC port even with TSN offloads, so don't spam the log with link-related messages from the tc-taprio offload subsystem, a single notification is sufficient: [10972.351859] fsl_enetc 0000:00:00.0 eno0: Qbv PSPEED set speed link down. [10972.360241] fsl_enetc 0000:00:00.0 eno0: Link is Down Fixes: 2e47cb415f0a ("enetc: update TSN Qbv PSPEED set according to adjust link speed") Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 5af29028fd6db9438b5584ab7179710a0a22569d Author: Kailang Yang Date: Fri Jan 17 14:04:01 2020 +0800 ALSA: hda/realtek - Add Headset Mic supported for HP cPC HP ALC671 need to support Headset Mic. Signed-off-by: Kailang Yang Link: https://lore.kernel.org/r/06a9d2b176e14706976d6584cbe2d92a@realtek.com Signed-off-by: Takashi Iwai commit 50c3c5e1c1b000d6a321ffdc0003bc6b7ac0b0e5 Author: Gustavo A. R. Silva Date: Thu Jan 16 16:03:27 2020 -0600 USB: serial: garmin_gps: Use flexible-array member Old code in the kernel uses 1-byte and 0-byte arrays to indicate the presence of a "variable length array": struct something { int length; u8 data[1]; }; struct something *instance; instance = kmalloc(sizeof(*instance) + size, GFP_KERNEL); instance->length = size; memcpy(instance->data, source, size); There is also 0-byte arrays. Both cases pose confusion for things like sizeof(), CONFIG_FORTIFY_SOURCE, etc.[1] Instead, the preferred mechanism to declare variable-length types such as the one above is a flexible array member[2] which need to be the last member of a structure and empty-sized: struct something { int stuff; u8 data[]; }; Also, by making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being unadvertenly introduced[3] to the codebase from now on. [1] https://github.com/KSPP/linux/issues/21 [2] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Johan Hovold commit aa63b9471bcaca7392df461caafd570a565d17f0 Author: Alexandru Ardelean Date: Thu Jan 16 16:15:35 2020 +0200 net: phy: adin: const-ify static data Some bits of static data should have been made const from the start. This change adds the const qualifier where appropriate. Reviewed-by: Andrew Lunn Signed-off-by: Alexandru Ardelean Signed-off-by: David S. Miller commit e6421583953fd92eba1785f90b228d70345125d6 Author: Johan Hovold Date: Tue Jan 14 12:01:46 2020 +0100 USB: serial: opticon: stop all I/O on close() Make sure to stop any submitted write URBs on close(). Note that the tty layer will wait up to 30 seconds for the buffers to drain before close() is called. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit a00e7182308f41cac1aa071912ff7a16797dade9 Author: Johan Hovold Date: Tue Jan 14 12:01:45 2020 +0100 USB: serial: opticon: add chars_in_buffer() implementation Add a chars_in_buffer() implementation so that the tty layer will wait for outgoing buffered data to be drained when needed (e.g. on final close()). Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 1f399fc797b5f78df8a993effdc0ef04304fdcea Author: Hongbo Yao Date: Thu Jan 16 21:14:04 2020 +0800 drivers/net: netdevsim depends on INET If CONFIG_INET is not set and CONFIG_NETDEVSIM=y. Building drivers/net/netdevsim/fib.o will get the following error: drivers/net/netdevsim/fib.o: In function `nsim_fib4_rt_hw_flags_set': fib.c:(.text+0x12b): undefined reference to `fib_alias_hw_flags_set' drivers/net/netdevsim/fib.o: In function `nsim_fib4_rt_destroy': fib.c:(.text+0xb11): undefined reference to `free_fib_info' Correct the Kconfig for netdevsim. Reported-by: Hulk Robot Fixes: 48bb9eb47b270 ("netdevsim: fib: Add dummy implementation for FIB offload") Signed-off-by: Hongbo Yao Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 854e334903dfed8eae58c7ddc43945e3885c4bfb Merge: b3a987b0264d 490a421bc575 Author: Rafael J. Wysocki Date: Fri Jan 17 11:19:45 2020 +0100 Merge tag 'devfreq-next-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux Pull devfreq updates for v5.6 from Chanwoo Choi: "1. Update devfreq core - Add new 'name' attribute of sysfs to show the device name : /sys/class/devfreq/devfreqX/name - Make 'trans_stat' sysfs reset by entering zero(0) : echo 0 > /sys/class/devfreq/devfreqX/trans_stat - Add debugfs support with 'devfreq_summary' to show the summary : /sys/kernel/debug/devfreq/devfreq_summary - Change the type of time variable to 64bit to avoid overflows. - Make separate devfreq_stats including the statistics information. - Fix minor coding-style like indentation and kernel-doc warnings. 2. Update devfreq drivers - Add new imx8m-ddrc.c devfreq driver for dynamic scaling of DDR frequency. It changes the DDR frequency by using ARM SMCCC(SMC Calling Convention) interface to control TF-A firmware. - Add COMPILE_TEST dependency for rk3399_dmc.c. - Clean-up code for exynos-bus.c and rk3399_dmc.c without behavior changes 3. Update devfreq-event drivers - Fix excessive stack usage of exynos-ppmu.c and clean-up code of rockchip-dfi.c without behavior changes." * tag 'devfreq-next-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: (24 commits) PM / devfreq: Add debugfs support with devfreq_summary file PM / devfreq: exynos: Rename Exynos to lowercase PM / devfreq: imx8m-ddrc: Fix inconsistent IS_ERR and PTR_ERR PM / devfreq: exynos-bus: Add error log when fail to get devfreq-event PM / devfreq: exynos-bus: Disable devfreq-event device when fails PM / devfreq: rk3399_dmc: Disable devfreq-event device when fails PM / devfreq: imx8m-ddrc: Remove unused defines PM / devfreq: exynos-bus: Reduce goto statements and remove unused headers PM / devfreq: rk3399_dmc: Add COMPILE_TEST and HAVE_ARM_SMCCC dependency PM / devfreq: rockchip-dfi: Convert to devm_platform_ioremap_resource PM / devfreq: rk3399_dmc: Add missing of_node_put() PM / devfreq: rockchip-dfi: Add missing of_node_put() PM / devfreq: Fix multiple kernel-doc warnings PM / devfreq: exynos-bus: Extract exynos_bus_profile_init_passive() PM / devfreq: exynos-bus: Extract exynos_bus_profile_init() PM / devfreq: Move declaration of DEVICE_ATTR_RW(min_freq) PM / devfreq: Move statistics to separate struct devfreq_stats PM / devfreq: Add clearing transitions stats PM / devfreq: Change time stats to 64-bit PM / devfreq: Add new name attribute for sysfs ... commit 11e31f608b499f044f24b20be73f1dcab3e43f8a Author: Thomas Gleixner Date: Thu Jan 16 19:17:02 2020 +0100 watchdog/softlockup: Enforce that timestamp is valid on boot Robert reported that during boot the watchdog timestamp is set to 0 for one second which is the indicator for a watchdog reset. The reason for this is that the timestamp is in seconds and the time is taken from sched clock and divided by ~1e9. sched clock starts at 0 which means that for the first second during boot the watchdog timestamp is 0, i.e. reset. Use ULONG_MAX as the reset indicator value so the watchdog works correctly right from the start. ULONG_MAX would only conflict with a real timestamp if the system reaches an uptime of 136 years on 32bit and almost eternity on 64bit. Reported-by: Robert Richter Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/87o8v3uuzl.fsf@nanos.tec.linutronix.de commit 080bb352fad00d04995102f681b134e3754bfb6e Author: Florian Fainelli Date: Wed Jan 15 20:48:50 2020 -0800 net: phy: Maintain MDIO device and bus statistics We maintain global statistics for an entire MDIO bus, as well as broken down, per MDIO bus address statistics. Given that it is possible for MDIO devices such as switches to access MDIO bus addresses for which there is not a mdio_device instance created (therefore not a a corresponding device directory in sysfs either), we also maintain per-address statistics under the statistics folder. The layout looks like this: /sys/class/mdio_bus/../statistics/ transfers errrors writes reads transfers_ errors_ writes_ reads_ When a mdio_device instance is registered, a statistics/ folder is created with the tranfers, errors, writes and reads attributes which point to the appropriate MDIO bus statistics structure. Statistics are 64-bit unsigned quantities and maintained through the u64_stats_sync.h helper functions. Signed-off-by: Florian Fainelli Tested-by: Andrew Lunn Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f46e49a9cc3814f3564477f0fffc00e0a2bc9e80 Author: Petr Mladek Date: Thu Jan 16 16:31:45 2020 +0100 livepatch: Handle allocation failure in the sample of shadow variable API klp_shadow_alloc() is not handled in the sample of shadow variable API. It is not strictly necessary because livepatch_fix1_dummy_free() is able to handle the potential failure. But it is an example and it should use the API a clean way. Signed-off-by: Petr Mladek Reviewed-by: Joe Lawrence Acked-by: Miroslav Benes Reviewed-by: Kamalesh Babulal Signed-off-by: Jiri Kosina commit be6da98425b69388ed31b18bd2497f826116f29b Author: Petr Mladek Date: Thu Jan 16 16:31:44 2020 +0100 livepatch/samples/selftest: Use klp_shadow_alloc() API correctly The commit e91c2518a5d22a ("livepatch: Initialize shadow variables safely by a custom callback") leads to the following static checker warning: samples/livepatch/livepatch-shadow-fix1.c:86 livepatch_fix1_dummy_alloc() error: 'klp_shadow_alloc()' 'leak' too small (4 vs 8) It is because klp_shadow_alloc() is used a wrong way: int *leak; shadow_leak = klp_shadow_alloc(d, SV_LEAK, sizeof(leak), GFP_KERNEL, shadow_leak_ctor, leak); The code is supposed to store the "leak" pointer into the shadow variable. 3rd parameter correctly passes size of the data (size of pointer). But the 5th parameter is wrong. It should pass pointer to the data (pointer to the pointer) but it passes the pointer directly. It works because shadow_leak_ctor() handle "ctor_data" as the data instead of pointer to the data. But it is semantically wrong and confusing. The same problem is also in the module used by selftests. In this case, "pvX" variables are introduced. They represent the data stored in the shadow variables. Reported-by: Dan Carpenter Signed-off-by: Petr Mladek Reviewed-by: Joe Lawrence Acked-by: Miroslav Benes Reviewed-by: Kamalesh Babulal Signed-off-by: Jiri Kosina commit c24c57a4cc8a2f64de32084958920773c0906bc7 Author: Petr Mladek Date: Thu Jan 16 16:31:43 2020 +0100 livepatch/selftest: Clean up shadow variable names and type The shadow variable selftest is quite tricky. Especially it is problematic to understand what values are stored, returned, and printed. Make it easier to understand by using "int *var, **sv" variables consistently everywhere instead of the generic "void *", "ret", and "ctor_data". Signed-off-by: Petr Mladek Reviewed-by: Joe Lawrence Acked-by: Miroslav Benes Reviewed-by: Kamalesh Babulal Signed-off-by: Jiri Kosina commit 8f6b88662cacb1d01398c1e8be52aeac433189f6 Author: Petr Mladek Date: Thu Jan 16 16:31:42 2020 +0100 livepatch/sample: Use the right type for the leaking data pointer The "leak" pointer, in the sample of shadow variable API, is allocated as sizeof(int). Let's help developers and static analyzers with understanding the code by using the appropriate pointer type. Reported-by: Dan Carpenter Signed-off-by: Petr Mladek Reviewed-by: Joe Lawrence Acked-by: Miroslav Benes Reviewed-by: Kamalesh Babulal Signed-off-by: Jiri Kosina commit 96466748780dc41d2fa951f3c4e010f98832e182 Author: Adrian Huang Date: Thu Jan 9 11:02:51 2020 +0800 iommu/amd: Remove unused struct member Commit c805b428f206 ("iommu/amd: Remove amd_iommu_pd_list") removes the global list for the allocated protection domains. The corresponding member 'list' of the protection_domain struct is not used anymore, so it can be removed. Signed-off-by: Adrian Huang Signed-off-by: Joerg Roedel commit 62dcee71608506ad83b0525aa1b53a78b3f1689a Author: Adrian Huang Date: Thu Jan 9 11:02:50 2020 +0800 iommu/amd: Replace two consecutive readl calls with one readq Optimize the reigster reading by using readq instead of the two consecutive readl calls. Signed-off-by: Adrian Huang Signed-off-by: Joerg Roedel commit 6855d1ba7537e21e8f36988bad36d1ad76841f1d Merge: 1ea27ee2f76e 5a4549fd7905 Author: Joerg Roedel Date: Fri Jan 17 11:01:01 2020 +0100 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.6 - Support for building, and {un,}loading the SMMU drivers as modules - Minor cleanups - SMMUv3: * Non-critical fix to encoding of TLBI_NH_VA invalidation command * Fix broken sanity check on size of MMIO resource during probe * Support for Substream IDs which will soon be provided by PCI PASIDs - io-pgtable: * Finish off the TTBR1 preparation work partially merged last cycle * Ensure correct memory attributes for non-cacheable mappings - SMMU: * Namespace public #defines to avoid collisions with arch/arm64/ * Avoid using valid SMR register when probing mask size commit 41cdc741048b0d04604c02aad9ec19f7d9130b70 Author: Eric Dumazet Date: Wed Jan 15 11:57:41 2020 -0800 netdevsim: fix nsim_fib6_rt_create() error path It seems nsim_fib6_rt_create() intent was to return either a valid pointer or an embedded error code. BUG: unable to handle page fault for address: fffffffffffffff4 PGD 9870067 P4D 9870067 PUD 9872067 PMD 0 Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 22851 Comm: syz-executor.1 Not tainted 5.5.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:jhash2 include/linux/jhash.h:125 [inline] RIP: 0010:rhashtable_jhash2+0x76/0x2c0 lib/rhashtable.c:963 Code: b9 00 00 00 00 00 fc ff df 48 c1 e8 03 0f b6 14 08 4c 89 f0 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 30 02 00 00 49 8d 7e 04 <41> 8b 06 48 be 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 0f b6 RSP: 0018:ffffc90016127190 EFLAGS: 00010246 RAX: 0000000000000007 RBX: 00000000dfb3ab49 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: ffffffff839ba7c8 RDI: fffffffffffffff8 RBP: ffffc900161271c0 R08: ffff8880951f8640 R09: ffffed1015d0703d R10: ffffed1015d0703c R11: ffff8880ae8381e3 R12: 00000000dfb3ab49 R13: 00000000dfb3ab49 R14: fffffffffffffff4 R15: 0000000000000007 FS: 00007f40bfbc6700(0000) GS:ffff8880ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: fffffffffffffff4 CR3: 0000000093660000 CR4: 00000000001406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: rht_key_get_hash include/linux/rhashtable.h:133 [inline] rht_key_hashfn include/linux/rhashtable.h:159 [inline] rht_head_hashfn include/linux/rhashtable.h:174 [inline] __rhashtable_insert_fast.constprop.0+0xe15/0x1180 include/linux/rhashtable.h:723 rhashtable_insert_fast include/linux/rhashtable.h:832 [inline] nsim_fib6_rt_add drivers/net/netdevsim/fib.c:603 [inline] nsim_fib6_rt_insert drivers/net/netdevsim/fib.c:658 [inline] nsim_fib6_event drivers/net/netdevsim/fib.c:719 [inline] nsim_fib_event drivers/net/netdevsim/fib.c:744 [inline] nsim_fib_event_nb+0x1b16/0x2600 drivers/net/netdevsim/fib.c:772 notifier_call_chain+0xc2/0x230 kernel/notifier.c:83 __atomic_notifier_call_chain+0xa6/0x1a0 kernel/notifier.c:173 atomic_notifier_call_chain+0x2e/0x40 kernel/notifier.c:183 call_fib_notifiers+0x173/0x2a0 net/core/fib_notifier.c:35 call_fib6_notifiers+0x4b/0x60 net/ipv6/fib6_notifier.c:22 call_fib6_entry_notifiers+0xfb/0x150 net/ipv6/ip6_fib.c:399 fib6_add_rt2node net/ipv6/ip6_fib.c:1216 [inline] fib6_add+0x20cd/0x3ec0 net/ipv6/ip6_fib.c:1471 __ip6_ins_rt+0x54/0x80 net/ipv6/route.c:1315 ip6_ins_rt+0x96/0xd0 net/ipv6/route.c:1325 __ipv6_dev_ac_inc+0x76f/0xb20 net/ipv6/anycast.c:324 ipv6_sock_ac_join+0x4c1/0x790 net/ipv6/anycast.c:139 do_ipv6_setsockopt.isra.0+0x3908/0x4290 net/ipv6/ipv6_sockglue.c:670 ipv6_setsockopt+0xff/0x180 net/ipv6/ipv6_sockglue.c:944 udpv6_setsockopt+0x68/0xb0 net/ipv6/udp.c:1564 sock_common_setsockopt+0x94/0xd0 net/core/sock.c:3149 __sys_setsockopt+0x261/0x4c0 net/socket.c:2130 __do_sys_setsockopt net/socket.c:2146 [inline] __se_sys_setsockopt net/socket.c:2143 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:2143 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45aff9 Fixes: 48bb9eb47b27 ("netdevsim: fib: Add dummy implementation for FIB offload") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Ido Schimmel Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 53291622e2607db53ded78b534874b8fb515ba57 Author: jimyan Date: Wed Jan 15 11:03:55 2020 +0800 iommu/vt-d: Don't reject Host Bridge due to scope mismatch On a system with two host bridges(0000:00:00.0,0000:80:00.0), iommu initialization fails with DMAR: Device scope type does not match for 0000:80:00.0 This is because the DMAR table reports this device as having scope 2 (ACPI_DMAR_SCOPE_TYPE_BRIDGE): but the device has a type 0 PCI header: 80:00.0 Class 0600: Device 8086:2020 (rev 06) 00: 86 80 20 20 47 05 10 00 06 00 00 06 10 00 00 00 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 86 80 00 00 30: 00 00 00 00 90 00 00 00 00 00 00 00 00 01 00 00 VT-d works perfectly on this system, so there's no reason to bail out on initialization due to this apparent scope mismatch. Add the class 0x06 ("PCI_BASE_CLASS_BRIDGE") as a heuristic for allowing DMAR initialization for non-bridge PCI devices listed with scope bridge. Signed-off-by: jimyan Reviewed-by: Jerry Snitselaar Reviewed-by: Roland Dreier Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit f3265971ded98a069ad699b51b8a5ab95e9e5be1 Author: Madhuparna Bhowmik Date: Wed Jan 15 21:25:53 2020 +0530 net: xen-netback: hash.c: Use built-in RCU list checking list_for_each_entry_rcu has built-in RCU and lock checking. Pass cond argument to list_for_each_entry_rcu. Signed-off-by: Madhuparna Bhowmik Acked-by: Wei Liu Signed-off-by: David S. Miller commit f5bfdc8e3947a7ae489cf8ae9cfd6b3fb357b952 Author: Waiman Long Date: Mon Jan 13 10:07:35 2020 -0500 locking/osq: Use optimized spinning loop for arm64 Arm64 has a more optimized spinning loop (atomic_cond_read_acquire) using wfe for spinlock that can boost performance of sibling threads by putting the current cpu to a wait state that is broken only when the monitored variable changes or an external event happens. OSQ has a more complicated spinning loop. Besides the lock value, it also checks for need_resched() and vcpu_is_preempted(). The check for need_resched() is not a problem as it is only set by the tick interrupt handler. That will be detected by the spinning cpu right after iret. The vcpu_is_preempted() check, however, is a problem as changes to the preempt state of of previous node will not affect the wait state. For ARM64, vcpu_is_preempted is not currently defined and so is a no-op. Will has indicated that he is planning to para-virtualize wfe instead of defining vcpu_is_preempted for PV support. So just add a comment in arch/arm64/include/asm/spinlock.h to indicate that vcpu_is_preempted() should not be defined as suggested. On a 2-socket 56-core 224-thread ARM64 system, a kernel mutex locking microbenchmark was run for 10s with and without the patch. The performance numbers before patch were: Running locktest with mutex [runtime = 10s, load = 1] Threads = 224, Min/Mean/Max = 316/123,143/2,121,269 Threads = 224, Total Rate = 2,757 kop/s; Percpu Rate = 12 kop/s After patch, the numbers were: Running locktest with mutex [runtime = 10s, load = 1] Threads = 224, Min/Mean/Max = 334/147,836/1,304,787 Threads = 224, Total Rate = 3,311 kop/s; Percpu Rate = 15 kop/s So there was about 20% performance improvement. Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Link: https://lkml.kernel.org/r/20200113150735.21956-1-longman@redhat.com commit 57097124cbbd310cc2b5884189e22e60a3c20514 Author: Waiman Long Date: Tue Jan 7 12:49:14 2020 -0500 locking/qspinlock: Fix inaccessible URL of MCS lock paper It turns out that the URL of the MCS lock paper listed in the source code is no longer accessible. I did got question about where the paper was. This patch updates the URL to BZ 206115 which contains a copy of the paper from https://www.cs.rochester.edu/u/scott/papers/1991_TOCS_synch.pdf Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Link: https://lkml.kernel.org/r/20200107174914.4187-1-longman@redhat.com commit a030f9767da1a6bbcec840fc54770eb11c2414b6 Author: Waiman Long Date: Wed Dec 11 16:31:39 2019 -0500 locking/lockdep: Fix lockdep_stats indentation problem It was found that two lines in the output of /proc/lockdep_stats have indentation problem: # cat /proc/lockdep_stats : in-process chains: 25057 stack-trace entries: 137827 [max: 524288] number of stack traces: 7973 number of stack hash chains: 6355 combined max dependencies: 1356414598 hardirq-safe locks: 57 hardirq-unsafe locks: 1286 : All the numbers displayed in /proc/lockdep_stats except the two stack trace numbers are formatted with a field with of 11. To properly align all the numbers, a field width of 11 is now added to the two stack trace numbers. Fixes: 8c779229d0f4 ("locking/lockdep: Report more stack trace statistics") Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Bart Van Assche Link: https://lkml.kernel.org/r/20191211213139.29934-1-longman@redhat.com commit 5738891229a25e9e678122a843cbf0466a456d0c Author: Kim Phillips Date: Thu Nov 14 12:37:20 2019 -0600 perf/x86/amd: Add support for Large Increment per Cycle Events Description of hardware operation --------------------------------- The core AMD PMU has a 4-bit wide per-cycle increment for each performance monitor counter. That works for most events, but now with AMD Family 17h and above processors, some events can occur more than 15 times in a cycle. Those events are called "Large Increment per Cycle" events. In order to count these events, two adjacent h/w PMCs get their count signals merged to form 8 bits per cycle total. In addition, the PERF_CTR count registers are merged to be able to count up to 64 bits. Normally, events like instructions retired, get programmed on a single counter like so: PERF_CTL0 (MSR 0xc0010200) 0x000000000053ff0c # event 0x0c, umask 0xff PERF_CTR0 (MSR 0xc0010201) 0x0000800000000001 # r/w 48-bit count The next counter at MSRs 0xc0010202-3 remains unused, or can be used independently to count something else. When counting Large Increment per Cycle events, such as FLOPs, however, we now have to reserve the next counter and program the PERF_CTL (config) register with the Merge event (0xFFF), like so: PERF_CTL0 (msr 0xc0010200) 0x000000000053ff03 # FLOPs event, umask 0xff PERF_CTR0 (msr 0xc0010201) 0x0000800000000001 # rd 64-bit cnt, wr lo 48b PERF_CTL1 (msr 0xc0010202) 0x0000000f004000ff # Merge event, enable bit PERF_CTR1 (msr 0xc0010203) 0x0000000000000000 # wr hi 16-bits count The count is widened from the normal 48-bits to 64 bits by having the second counter carry the higher 16 bits of the count in its lower 16 bits of its counter register. The odd counter, e.g., PERF_CTL1, is programmed with the enabled Merge event before the even counter, PERF_CTL0. The Large Increment feature is available starting with Family 17h. For more details, search any Family 17h PPR for the "Large Increment per Cycle Events" section, e.g., section 2.1.15.3 on p. 173 in this version: https://www.amd.com/system/files/TechDocs/56176_ppr_Family_17h_Model_71h_B0_pub_Rev_3.06.zip Description of software operation --------------------------------- The following steps are taken in order to support reserving and enabling the extra counter for Large Increment per Cycle events: 1. In the main x86 scheduler, we reduce the number of available counters by the number of Large Increment per Cycle events being scheduled, tracked by a new cpuc variable 'n_pair' and a new amd_put_event_constraints_f17h(). This improves the counter scheduler success rate. 2. In perf_assign_events(), if a counter is assigned to a Large Increment event, we increment the current counter variable, so the counter used for the Merge event is removed from assignment consideration by upcoming event assignments. 3. In find_counter(), if a counter has been found for the Large Increment event, we set the next counter as used, to prevent other events from using it. 4. We perform steps 2 & 3 also in the x86 scheduler fastpath, i.e., we add Merge event accounting to the existing used_mask logic. 5. Finally, we add on the programming of Merge event to the neighbouring PMC counters in the counter enable/disable{_all} code paths. Currently, software does not support a single PMU with mixed 48- and 64-bit counting, so Large increment event counts are limited to 48 bits. In set_period, we zero-out the upper 16 bits of the count, so the hardware doesn't copy them to the even counter's higher bits. Simple invocation example showing counting 8 FLOPs per 256-bit/%ymm vaddps instruction executed in a loop 100 million times: perf stat -e cpu/fp_ret_sse_avx_ops.all/,cpu/instructions/ Performance counter stats for '': 800,000,000 cpu/fp_ret_sse_avx_ops.all/u 300,042,101 cpu/instructions/u Prior to this patch, the reported SSE/AVX FLOPs retired count would be wrong. [peterz: lots of renames and edits to the code] Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) commit 471af006a747f1c535c8a8c6c0973c320fe01b22 Author: Kim Phillips Date: Thu Nov 14 12:37:19 2019 -0600 perf/x86/amd: Constrain Large Increment per Cycle events AMD Family 17h processors and above gain support for Large Increment per Cycle events. Unfortunately there is no CPUID or equivalent bit that indicates whether the feature exists or not, so we continue to determine eligibility based on a CPU family number comparison. For Large Increment per Cycle events, we add a f17h-and-compatibles get_event_constraints_f17h() that returns an even counter bitmask: Large Increment per Cycle events can only be placed on PMCs 0, 2, and 4 out of the currently available 0-5. The only currently public event that requires this feature to report valid counts is PMCx003 "Retired SSE/AVX Operations". Note that the CPU family logic in amd_core_pmu_init() is changed so as to be able to selectively add initialization for features available in ranges of backward-compatible CPU families. This Large Increment per Cycle feature is expected to be retained in future families. A side-effect of assigning a new get_constraints function for f17h disables calling the old (prior to f15h) amd_get_event_constraints implementation left enabled by commit e40ed1542dd7 ("perf/x86: Add perf support for AMD family-17h processors"), which is no longer necessary since those North Bridge event codes are obsoleted. Also fix a spelling mistake whilst in the area (calulating -> calculating). Fixes: e40ed1542dd7 ("perf/x86: Add perf support for AMD family-17h processors") Signed-off-by: Kim Phillips Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191114183720.19887-2-kim.phillips@amd.com commit 1e0f17724a74c8e94a5235bee7397987b424893f Author: Harry Pan Date: Fri Dec 27 17:19:46 2019 +0800 perf/x86/intel/rapl: Add Comet Lake support Comet Lake supports the same RAPL counters like Kaby Lake and Skylake. After this, on CML machine the energy counters appear in perf list. Signed-off-by: Harry Pan Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191227171944.1.Id6f3ab98474d7d1dba5b95390b24e0a67368d364@changeid commit ccf74128d66ce937876184ad55db2e0276af08d3 Author: Valentin Schneider Date: Wed Jan 15 16:09:15 2020 +0000 sched/topology: Assert non-NUMA topology masks don't (partially) overlap topology.c::get_group() relies on the assumption that non-NUMA domains do not partially overlap. Zeng Tao pointed out in [1] that such topology descriptions, while completely bogus, can end up being exposed to the scheduler. In his example (8 CPUs, 2-node system), we end up with: MC span for CPU3 == 3-7 MC span for CPU4 == 4-7 The first pass through get_group(3, sdd@MC) will result in the following sched_group list: 3 -> 4 -> 5 -> 6 -> 7 ^ / `----------------' And a later pass through get_group(4, sdd@MC) will "corrupt" that to: 3 -> 4 -> 5 -> 6 -> 7 ^ / `-----------' which will completely break things like 'while (sg != sd->groups)' when using CPU3's base sched_domain. There already are some architecture-specific checks in place such as x86/kernel/smpboot.c::topology.sane(), but this is something we can detect in the core scheduler, so it seems worthwhile to do so. Warn and abort the construction of the sched domains if such a broken topology description is detected. Note that this is somewhat expensive (O(t.c²), 't' non-NUMA topology levels and 'c' CPUs) and could be gated under SCHED_DEBUG if deemed necessary. Testing ======= Dietmar managed to reproduce this using the following qemu incantation: $ qemu-system-aarch64 -kernel ./Image -hda ./qemu-image-aarch64.img \ -append 'root=/dev/vda console=ttyAMA0 loglevel=8 sched_debug' -smp \ cores=8 --nographic -m 512 -cpu cortex-a53 -machine virt -numa \ node,cpus=0-2,nodeid=0 -numa node,cpus=3-7,nodeid=1 alongside the following drivers/base/arch_topology.c hack (AIUI wouldn't be needed if '-smp cores=X, sockets=Y' would work with qemu): 8<--- @@ -465,6 +465,9 @@ void update_siblings_masks(unsigned int cpuid) if (cpuid_topo->package_id != cpu_topo->package_id) continue; + if ((cpu < 4 && cpuid > 3) || (cpu > 3 && cpuid < 4)) + continue; + cpumask_set_cpu(cpuid, &cpu_topo->core_sibling); cpumask_set_cpu(cpu, &cpuid_topo->core_sibling); 8<--- [1]: https://lkml.kernel.org/r/1577088979-8545-1-git-send-email-prime.zeng@hisilicon.com Reported-by: Zeng Tao Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200115160915.22575-1-valentin.schneider@arm.com commit 3e0de271fff77abb933f1b69c213854c3eda9125 Author: Hewenliang Date: Thu Jan 9 21:56:04 2020 -0500 idle: fix spelling mistake "iterrupts" -> "interrupts" There is a spelling misake in comments of cpuidle_idle_call. Fix it. Signed-off-by: Hewenliang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Link: https://lkml.kernel.org/r/20200110025604.34373-1-hewenliang4@huawei.com commit a4f9a0e51bbf89cb461b1985a1a570e6b87da3b5 Author: Vincent Guittot Date: Wed Jan 15 11:20:20 2020 +0100 sched/fair: Remove redundant call to cpufreq_update_util() With commit bef69dd87828 ("sched/cpufreq: Move the cfs_rq_util_change() call to cpufreq_update_util()") update_load_avg() has become the central point for calling cpufreq (not including the update of blocked load). This change helps to simplify further the number of calls to cpufreq_update_util() and to remove last redundant ones. With update_load_avg(), we are now sure that cpufreq_update_util() will be called after every task attachment to a cfs_rq and especially after propagating this event down to the util_avg of the root cfs_rq, which is the level that is used by cpufreq governors like schedutil to set the frequency of a CPU. The SCHED_CPUFREQ_MIGRATION flag forces an early call to cpufreq when the migration happens in a cgroup whereas util_avg of root cfs_rq is not yet updated and this call is duplicated with the one that happens immediately after when the migration event reaches the root cfs_rq. The dedicated flag SCHED_CPUFREQ_MIGRATION is now useless and can be removed. The interface of attach_entity_load_avg() can also be simplified accordingly. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Rafael J. Wysocki Link: https://lkml.kernel.org/r/1579083620-24943-1-git-send-email-vincent.guittot@linaro.org commit 3d817689a62cf71bbb290af18cd26cf9764f38fe Author: Wang Long Date: Wed Dec 18 20:38:18 2019 +0800 sched/psi: create /proc/pressure and /proc/pressure/{io|memory|cpu} only when psi enabled when CONFIG_PSI_DEFAULT_DISABLED set to N or the command line set psi=0, I think we should not create /proc/pressure and /proc/pressure/{io|memory|cpu}. In the future, user maybe determine whether the psi feature is enabled by checking the existence of the /proc/pressure dir or /proc/pressure/{io|memory|cpu} files. Signed-off-by: Wang Long Signed-off-by: Peter Zijlstra (Intel) Acked-by: Johannes Weiner Link: https://lkml.kernel.org/r/1576672698-32504-1-git-send-email-w@laoqinren.net commit 4c58f57fa6e93318a0899f70d8b99fe6bac22ce8 Author: Peng Liu Date: Sat Jan 4 21:08:28 2020 +0800 sched/fair: Fix sgc->{min,max}_capacity calculation for SD_OVERLAP commit bf475ce0a3dd ("sched/fair: Add per-CPU min capacity to sched_group_capacity") introduced per-cpu min_capacity. commit e3d6d0cb66f2 ("sched/fair: Add sched_group per-CPU max capacity") introduced per-cpu max_capacity. In the SD_OVERLAP case, the local variable 'capacity' represents the sum of CPU capacity of all CPUs in the first sched group (sg) of the sched domain (sd). It is erroneously used to calculate sg's min and max CPU capacity. To fix this use capacity_of(cpu) instead of 'capacity'. The code which achieves this via cpu_rq(cpu)->sd->groups->sgc->capacity (for rq->sd != NULL) can be removed since it delivers the same value as capacity_of(cpu) which is currently only used for the (!rq->sd) case (see update_cpu_capacity()). An sg of the lowest sd (rq->sd or sd->child == NULL) represents a single CPU (and hence sg->sgc->capacity == capacity_of(cpu)). Signed-off-by: Peng Liu Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20200104130828.GA7718@iZj6chx1xj0e0buvshuecpZ commit fe71bbb21ee14160f73f81b113d71145327a1c0d Author: Peng Wang Date: Fri Jan 3 19:44:00 2020 +0800 sched/fair: calculate delta runnable load only when it's needed Move the code of calculation for delta_sum/delta_avg to where it is really needed to be done. Signed-off-by: Peng Wang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20200103114400.17668-1-rocking@linux.alibaba.com commit 9dec1b6949ae9509cdc3edb2d75fda39c9db9fa2 Author: Alex Shi Date: Thu Jan 2 18:07:52 2020 +0800 sched/cputime: move rq parameter in irqtime_account_process_tick Every time we call irqtime_account_process_tick() is in a interrupt, Every caller will get and assign a parameter rq = this_rq(), This is unnecessary and increase the code size a little bit. Move the rq getting action to irqtime_account_process_tick internally is better. base with this patch cputime.o 578792 bytes 577888 bytes Signed-off-by: Alex Shi Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1577959674-255537-1-git-send-email-alex.shi@linux.alibaba.com commit 35f4cd96f5551dc1b2641159e7bb7bf91de6600f Author: Yangtao Li Date: Sat Dec 28 16:19:12 2019 +0000 stop_machine: Make stop_cpus() static The function stop_cpus() is only used internally by the stop_machine for stop multiple cpus. Make it static. Signed-off-by: Yangtao Li Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191228161912.24082-1-tiny.windzz@gmail.com commit 02d4ac5885a18d326b500b94808f0956dcce2832 Author: Wei Li Date: Thu Dec 26 16:52:24 2019 +0800 sched/debug: Reset watchdog on all CPUs while processing sysrq-t Lengthy output of sysrq-t may take a lot of time on slow serial console with lots of processes and CPUs. So we need to reset NMI-watchdog to avoid spurious lockup messages, and we also reset softlockup watchdogs on all other CPUs since another CPU might be blocked waiting for us to process an IPI or stop_machine. Add to sysrq_sched_debug_show() as what we did in show_state_filter(). Signed-off-by: Wei Li Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Link: https://lkml.kernel.org/r/20191226085224.48942-1-liwei391@huawei.com commit dcd6dffb0a75741471297724640733fa4e958d72 Author: Li Guanglei Date: Wed Dec 25 15:44:04 2019 +0800 sched/core: Fix size of rq::uclamp initialization rq::uclamp is an array of struct uclamp_rq, make sure we clear the whole thing. Fixes: 69842cba9ace ("sched/uclamp: Add CPU's clamp buckets refcountinga") Signed-off-by: Li Guanglei Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Qais Yousef Link: https://lkml.kernel.org/r/1577259844-12677-1-git-send-email-guangleix.li@gmail.com commit 7226017ad37a888915628e59a84a2d1e57b40707 Author: Qais Yousef Date: Tue Dec 24 11:54:04 2019 +0000 sched/uclamp: Fix a bug in propagating uclamp value in new cgroups When a new cgroup is created, the effective uclamp value wasn't updated with a call to cpu_util_update_eff() that looks at the hierarchy and update to the most restrictive values. Fix it by ensuring to call cpu_util_update_eff() when a new cgroup becomes online. Without this change, the newly created cgroup uses the default root_task_group uclamp values, which is 1024 for both uclamp_{min, max}, which will cause the rq to to be clamped to max, hence cause the system to run at max frequency. The problem was observed on Ubuntu server and was reproduced on Debian and Buildroot rootfs. By default, Ubuntu and Debian create a cpu controller cgroup hierarchy and add all tasks to it - which creates enough noise to keep the rq uclamp value at max most of the time. Imitating this behavior makes the problem visible in Buildroot too which otherwise looks fine since it's a minimal userspace. Fixes: 0b60ba2dd342 ("sched/uclamp: Propagate parent clamps") Reported-by: Doug Smythies Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Tested-by: Doug Smythies Link: https://lore.kernel.org/lkml/000701d5b965$361b6c60$a2524520$@net/ commit 323af6deaf70f204880caf94678350802682e0dc Author: Viresh Kumar Date: Wed Jan 8 13:57:04 2020 +0530 sched/fair: Load balance aggressively for SCHED_IDLE CPUs The fair scheduler performs periodic load balance on every CPU to check if it can pull some tasks from other busy CPUs. The duration of this periodic load balance is set to sd->balance_interval for the idle CPUs and is calculated by multiplying the sd->balance_interval with the sd->busy_factor (set to 32 by default) for the busy CPUs. The multiplication is done for busy CPUs to avoid doing load balance too often and rather spend more time executing actual task. While that is the right thing to do for the CPUs busy with SCHED_OTHER or SCHED_BATCH tasks, it may not be the optimal thing for CPUs running only SCHED_IDLE tasks. With the recent enhancements in the fair scheduler around SCHED_IDLE CPUs, we now prefer to enqueue a newly-woken task to a SCHED_IDLE CPU instead of other busy or idle CPUs. The same reasoning should be applied to the load balancer as well to make it migrate tasks more aggressively to a SCHED_IDLE CPU, as that will reduce the scheduling latency of the migrated (SCHED_OTHER) tasks. This patch makes minimal changes to the fair scheduler to do the next load balance soon after the last non SCHED_IDLE task is dequeued from a runqueue, i.e. making the CPU SCHED_IDLE. Also the sd->busy_factor is ignored while calculating the balance_interval for such CPUs. This is done to avoid delaying the periodic load balance by few hundred milliseconds for SCHED_IDLE CPUs. This is tested on ARM64 Hikey620 platform (octa-core) with the help of rt-app and it is verified, using kernel traces, that the newly SCHED_IDLE CPU does load balancing shortly after it becomes SCHED_IDLE and pulls tasks from other busy CPUs. Signed-off-by: Viresh Kumar Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/e485827eb8fe7db0943d6f3f6e0f5a4a70272781.1578471925.git.viresh.kumar@linaro.org commit 5f68eb19b5716f8cf3ccfa833cffd1522813b0e8 Author: Vincent Guittot Date: Fri Dec 20 12:04:53 2019 +0100 sched/fair : Improve update_sd_pick_busiest for spare capacity case Similarly to calculate_imbalance() and find_busiest_group(), using the number of idle CPUs when there is only 1 CPU in the group is not efficient because we can't make a difference between a CPU running 1 task and a CPU running dozens of small tasks competing for the same CPU but not enough to overload it. More generally speaking, we should use the number of running tasks when there is the same number of idle CPUs in a group instead of blindly select the 1st one. When the groups have spare capacity and the same number of idle CPUs, we compare the number of running tasks to select the busiest group. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1576839893-26930-1-git-send-email-vincent.guittot@linaro.org commit db5793c5993d265fe6644b6638fcb0758f6b5347 Author: Jisheng Zhang Date: Wed Dec 18 05:31:25 2019 +0000 watchdog: Remove soft_lockup_hrtimer_cnt and related code After commit 9cf57731b63e ("watchdog/softlockup: Replace "watchdog/%u" threads with cpu_stop_work"), the percpu soft_lockup_hrtimer_cnt is not used any more, so remove it and related code. Signed-off-by: Jisheng Zhang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191218131720.4146aea2@xhacker.debian commit 31537cf8f3f95d45360b995ad8be2c870edc5b02 Author: Steven Rostedt (VMware) Date: Wed Jan 8 08:57:55 2020 -0500 tracing: Initialize ret in syscall_enter_define_fields() If syscall_enter_define_fields() is called on a system call with no arguments, the return code variable "ret" will never get initialized. Initialize it to zero. Fixes: 04ae87a52074e ("ftrace: Rework event_create_dir()") Reported-by: Qian Cai Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/0FA8C6E3-D9F5-416D-A1B0-5E4CD583A101@lca.pw commit 3f03a58b25753843ce9e4511e9e246c51bd11011 Author: Lokesh Vutla Date: Fri Nov 22 15:33:56 2019 +0530 arm64: dts: ti: k3-j721e-main: Add missing power-domains for smmu Add power-domains entry for smmu, so that the it is accessible as long as the driver is active. Without this device shutdown is throwing the below warning: "[ 44.736348] arm-smmu-v3 36600000.smmu: failed to clear cr0" Reported-by: Suman Anna Signed-off-by: Lokesh Vutla Signed-off-by: Tero Kristo commit f2965b99795a131ad60089ff5f6456e75c26d2a9 Author: Grygorii Strashko Date: Mon Dec 16 21:39:33 2019 +0200 arm64: dts: ti: k3-am65-mcu: add system control module node The MCU System control module support is added to the device tree to allow drivers to access to their System control module registers. Signed-off-by: Grygorii Strashko Signed-off-by: Tero Kristo commit ca3be22dd0de6e0845420a9fa0fec850e8134198 Author: Vignesh Raghavendra Date: Wed Dec 11 22:34:14 2019 +0530 arm64: dts: k3-am654-base-board: Add IRQ line for GPIO expander Add IRQ line for IO expander present on wkup_i2c bus on AM654 EVM Signed-off-by: Vignesh Raghavendra Signed-off-by: Tero Kristo commit 07481770e84c7512cff73965aaaa637431cf267d Author: Vignesh Raghavendra Date: Wed Dec 11 22:34:13 2019 +0530 arm64: dts: ti: k3-am65: Add OSPI DT node AM654 SoC has two Cadence OSPI controller instances under Flash subsystem (FSS). Add DT nodes for the same. Signed-off-by: Vignesh Raghavendra Signed-off-by: Tero Kristo commit cb27354b38f3b414e27172ee600e4f3bb92cb807 Author: Vignesh Raghavendra Date: Wed Dec 11 22:34:12 2019 +0530 arm64: dts: ti: k3-j721e: Add DT nodes for few peripherials Enable I2Cs, ADCs, OSPIs and UFS peripherals present on J721e. Signed-off-by: Vignesh Raghavendra Signed-off-by: Tero Kristo commit d18fddff061d2796525e6d4a958cb3d30aed8efd Author: YueHaibing Date: Thu Jan 16 22:29:27 2020 +0800 gpiolib: Remove duplicated function gpio_do_set_config() gpio_set_config() simply call gpio_do_set_config(), so remove the duplicated function. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200116142927.58908-1-yuehaibing@huawei.com Signed-off-by: Linus Walleij commit 8b844d78a72a9975730f4a65d66f7388a4dd9c38 Merge: 6a77de2596a8 9c6722d85e92 Author: Linus Walleij Date: Fri Jan 17 09:00:35 2020 +0100 Merge branch 'fixup-thunderx-hierarchy' into devel commit 6a77de2596a8d02cbfe9cebe448d8575e4354c9a Merge: 59c324683400 b3a987b0264d Author: Linus Walleij Date: Fri Jan 17 08:59:29 2020 +0100 Merge tag 'v5.5-rc6' into devel Linux 5.5-rc6 commit 1660557bd7cfced58b12389d7e99e21cde7e1cbe Merge: 40ce9798794f b7365587f513 Author: Greg Kroah-Hartman Date: Fri Jan 17 08:06:08 2020 +0100 Merge tag 'extcon-next-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon for 5.6 Detailed description for this pull request: 1. Remove unneeded 'extern' keyword from extcon.h header file 2. Clean-up the extcon provider - Clean-up the code for readability of extcon-arizona/sm5502.c * tag 'extcon-next-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: extcon: Remove unneeded extern keyword from extcon.h extcon: sm5502: Remove unneeded semicolon extcon: arizona: Factor out microphone and button detection extcon: arizona: Factor out microphone impedance into a function extcon: arizona: Invert logic of check in arizona_hpdet_do_id extcon: arizona: Remove excessive WARN_ON extcon: arizona: Remove unnecessary sets of ACCDET_MODE extcon: arizona: Tidy up transition from mic to headphone detect extcon: arizona: Clear jack status regardless of detection type extcon: arizona: Move pdata extraction to probe extcon: arizona: Make rev A register sequences atomic extcon: arizona: Correct clean up if arizona_identify_headphone fails commit 50f737ab96c7977317a47e60c52f4f0ce8b64e7f Merge: 4baa550ecc86 8a79db5e83a5 Author: Greg Kroah-Hartman Date: Fri Jan 17 07:52:26 2020 +0100 Merge tag 'phy-for-5.6_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-next Kishon writes: phy: for 5.6 *) Add support in PHY core to create link between PHY consumer and PHY provider *) Add DisplayPort PHY configuration set to be used for negotiating the configurations to be used between DisplayPort controller and DisplayPort PHY *) Add PHY wrapper driver (configure inputs to Cadence Sierra PHY) for TI's J721E SoC and adapt Cadence Sierra PHY driver to be used for J721E SoC (Supports USB and PCIe) *) Add PHY driver for eMMC PHY in Intel LGM SoC *) Add PHY support for 7216 and 7211 Broadcom SoCs which uses the new Synopsys USB Controller *) Add support for 16nm SATA PHY present in Broadcom 7216 SoC *) Fix lost packet issue, fix MDIO from getting inaccessible, fix occasional transaction failures, fix USB driver from crashing in Broadcom USB PHY driver *) Fix missing PCS SW reset in UFS PHY of Qualcomm SM8150 *) Use "struct phy_configure_opts_mipi_dphy" to pass parameters from display controller to rockchip-inno-dsidphy *) Other cleanups including compile testing for some of the PHY drivers, fixing Kconfig indentation, duplicate writes in drivers etc., Signed-off-by: Kishon Vijay Abraham I * tag 'phy-for-5.6_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy: (54 commits) dt-bindings: phy: Add PHY_TYPE_DP definition phy: ti: j721e-wiz: Fix return value check in wiz_probe() dt-bindings: usb: Convert Allwinner A80 USB PHY controller to a schema phy: intel-lgm-emmc: Fix warning by adding missing MODULE_LICENSE phy: ti: j721e-wiz: Manage typec-gpio-dir dt-bindings: phy: ti,phy-j721e-wiz: Add Type-C dir GPIO phy: cadence: Sierra: add phy_reset hook phy: cadence: Sierra: remove redundant initialization of pointer regmap phy: Add DisplayPort configuration options phy: Enable compile testing for some of drivers phy: mediatek: Fix Kconfig indentation phy: intel-lgm-emmc: Add support for eMMC PHY dt-bindings: phy: intel-emmc-phy: Add YAML schema for LGM eMMC PHY phy: ti: j721e-wiz: Add support for WIZ module present in TI J721E SoC dt-bindings: phy: Document WIZ (SERDES wrapper) bindings phy: cadence: Sierra: Use correct dev pointer in cdns_sierra_phy_remove() phy: cadence: Sierra: Set cmn_refclk_dig_div/cmn_refclk1_dig_div frequency to 25MHz phy: cadence: Sierra: Change MAX_LANES of Sierra to 16 phy: cadence: Sierra: Check for PLL lock during PHY power on phy: cadence: Sierra: Get reset control "array" for each link ... commit 8a79db5e83a5d52c74e6f3c40d6f312cf899213e Author: Jyri Sarha Date: Wed Jan 8 10:30:07 2020 +0200 dt-bindings: phy: Add PHY_TYPE_DP definition Add definition for DisplayPort phy type. Signed-off-by: Jyri Sarha Reviewed-by: Roger Quadros Reviewed-by: Kishon Vijay Abraham I Signed-off-by: Kishon Vijay Abraham I commit 0d5677ecb014dfa26dca0c96a4c44fd9012e17ba Author: Wei Yongjun Date: Fri Jan 10 01:25:33 2020 +0000 phy: ti: j721e-wiz: Fix return value check in wiz_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: 091876cc355d ("phy: ti: j721e-wiz: Add support for WIZ module present in TI J721E SoC") Signed-off-by: Wei Yongjun Signed-off-by: Kishon Vijay Abraham I commit 6fedae3cad8b122c8b0afb26a0569d9910255edd Author: Arnd Bergmann Date: Tue Jan 7 23:15:00 2020 +0100 ata: brcm: fix reset controller API usage While fixing another issue in this driver I noticed it uses IS_ERR_OR_NULL(), which is almost always a mistake. Change the driver to use the proper devm_reset_control_get_optional() interface instead and remove the checks except for the one that checks for a failure in that function. Fixes: 2b2c47d9e1fe ("ata: ahci_brcm: Allow optional reset controller to be used") Signed-off-by: Arnd Bergmann Signed-off-by: Jens Axboe commit ed87ad196dab6a757352d39c4c3fbc599340fe2c Author: Arnd Bergmann Date: Tue Jan 7 23:14:59 2020 +0100 ata: brcm: mark PM functions as __maybe_unused The new shutdown callback causes a link failure: drivers/ata/ahci_brcm.c: In function 'brcm_ahci_shutdown': drivers/ata/ahci_brcm.c:552:8: error: implicit declaration of function 'brcm_ahci_suspend'; did you mean 'brcm_ahci_shutdown'? [-Werror=implicit-function-declaration] ret = brcm_ahci_suspend(&pdev->dev); ^~~~~~~~~~~~~~~~~ Remove the incorrect #ifdef and use __maybe_unused annotations instead to make this more robust. Fixes: 7de9b1688c1d ("ata: ahci_brcm: Add a shutdown callback") Acked-by: Florian Fainelli Signed-off-by: Arnd Bergmann Signed-off-by: Jens Axboe commit 81f2b572cf4fd5c4178fe0e2b5bb1ab096385fd8 Author: YueHaibing Date: Thu Jan 16 22:53:00 2020 +0800 bpf: Remove set but not used variable 'first_key' kernel/bpf/syscall.c: In function generic_map_lookup_batch: kernel/bpf/syscall.c:1339:7: warning: variable first_key set but not used [-Wunused-but-set-variable] It is never used, so remove it. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Alexei Starovoitov Acked-by: Brian Vazquez Link: https://lore.kernel.org/bpf/20200116145300.59056-1-yuehaibing@huawei.com commit 3a43970d55e9fd5475d3c4e5fe398ab831ec6c3a Author: Sukadev Bhattiprolu Date: Mon Jan 6 18:02:37 2020 -0800 KVM: PPC: Book3S HV: Implement H_SVM_INIT_ABORT hcall Implement the H_SVM_INIT_ABORT hcall which the Ultravisor can use to abort an SVM after it has issued the H_SVM_INIT_START and before the H_SVM_INIT_DONE hcalls. This hcall could be used when Ultravisor encounters security violations or other errors when starting an SVM. Note that this hcall is different from UV_SVM_TERMINATE ucall which is used by HV to terminate/cleanup an VM that has becore secure. The H_SVM_INIT_ABORT basically undoes operations that were done since the H_SVM_INIT_START hcall - i.e page-out all the VM pages back to normal memory, and terminate the SVM. (If we do not bring the pages back to normal memory, the text/data of the VM would be stuck in secure memory and since the SVM did not go secure, its MSR_S bit will be clear and the VM wont be able to access its pages even to do a clean exit). Based on patches and discussion with Paul Mackerras, Ram Pai and Bharata Rao. Signed-off-by: Ram Pai Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Bharata B Rao Signed-off-by: Paul Mackerras commit ce477a7a1cdfc9aaafcfd03b45bde131a88d51de Author: Sukadev Bhattiprolu Date: Thu Dec 19 13:51:45 2019 -0800 KVM: PPC: Add skip_page_out parameter to uvmem functions Add 'skip_page_out' parameter to kvmppc_uvmem_drop_pages() so the callers can specify whetheter or not to skip paging out pages. This will be needed in a follow-on patch that implements H_SVM_INIT_ABORT hcall. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Paul Mackerras commit e1bd0a7e248c3ce59b0509e47f035c0759fc68a3 Author: Leonardo Bras Date: Tue Nov 26 19:36:31 2019 -0300 KVM: PPC: Book3E: Replace current->mm by kvm->mm Given that in kvm_create_vm() there is: kvm->mm = current->mm; And that on every kvm_*_ioctl we have: if (kvm->mm != current->mm) return -EIO; I see no reason to keep using current->mm instead of kvm->mm. By doing so, we would reduce the use of 'global' variables on code, relying more in the contents of kvm struct. Signed-off-by: Leonardo Bras Signed-off-by: Paul Mackerras commit 8a9c8925149f195d0bbd6b42aa3130ced0a075fb Author: Leonardo Bras Date: Tue Nov 26 19:36:30 2019 -0300 KVM: PPC: Book3S: Replace current->mm by kvm->mm Given that in kvm_create_vm() there is: kvm->mm = current->mm; And that on every kvm_*_ioctl we have: if (kvm->mm != current->mm) return -EIO; I see no reason to keep using current->mm instead of kvm->mm. By doing so, we would reduce the use of 'global' variables on code, relying more in the contents of kvm struct. Signed-off-by: Leonardo Bras Signed-off-by: Paul Mackerras commit 4de0a8355463e068e443b48eb5ae32370155368b Author: zhengbin Date: Tue Nov 19 14:27:40 2019 +0800 KVM: PPC: Remove set but not used variable 'ra', 'rs', 'rt' Fixes gcc '-Wunused-but-set-variable' warning: arch/powerpc/kvm/emulate_loadstore.c: In function kvmppc_emulate_loadstore: arch/powerpc/kvm/emulate_loadstore.c:87:6: warning: variable ra set but not used [-Wunused-but-set-variable] arch/powerpc/kvm/emulate_loadstore.c: In function kvmppc_emulate_loadstore: arch/powerpc/kvm/emulate_loadstore.c:87:10: warning: variable rs set but not used [-Wunused-but-set-variable] arch/powerpc/kvm/emulate_loadstore.c: In function kvmppc_emulate_loadstore: arch/powerpc/kvm/emulate_loadstore.c:87:14: warning: variable rt set but not used [-Wunused-but-set-variable] They are not used since commit 2b33cb585f94 ("KVM: PPC: Reimplement LOAD_FP/STORE_FP instruction mmio emulation with analyse_instr() input") Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Paul Mackerras commit ba92660362ec42db3baee5af2b47b85d70c1c4be Merge: 20f21d98cf12 58aa94f922c1 Author: Alexei Starovoitov Date: Thu Jan 16 20:03:35 2020 -0800 Merge branch 'xdp_redirect-bulking' Toke Høiland-Jørgensen says: ==================== Since commit 96360004b862 ("xdp: Make devmap flush_list common for all map instances"), devmap flushing is a global operation instead of tied to a particular map. This means that with a bit of refactoring, we can finally fix the performance delta between the bpf_redirect_map() and bpf_redirect() helper functions, by introducing bulking for the latter as well. This series makes this change by moving the data structure used for the bulking into struct net_device itself, so we can access it even when there is not devmap. Once this is done, moving the bpf_redirect() helper to use the bulking mechanism becomes quite trivial, and brings bpf_redirect() up to the same as bpf_redirect_map(): Before: After: 1 CPU: bpf_redirect_map: 8.4 Mpps 8.4 Mpps (no change) bpf_redirect: 5.0 Mpps 8.4 Mpps (+68%) 2 CPUs: bpf_redirect_map: 15.9 Mpps 16.1 Mpps (+1% or ~no change) bpf_redirect: 9.5 Mpps 15.9 Mpps (+67%) After this patch series, the only semantics different between the two variants of the bpf() helper (apart from the absence of a map argument, obviously) is that the _map() variant will return an error if passed an invalid map index, whereas the bpf_redirect() helper will succeed, but drop packets on xdp_do_redirect(). This is because the helper has no reference to the calling netdev, so unfortunately we can't do the ifindex lookup directly in the helper. Changelog: v3: - Switch two more fields to avoid a list_head spanning two cache lines - Include Jesper's tracepoint patch - Also rename xdp_do_flush_map() - Fix a few nits from Maciej v2: - Consolidate code paths and tracepoints for map and non-map redirect variants (Björn) - Add performance data for 2-CPU test (Jesper) - Move fields to avoid shifting cache lines in struct net_device (Eric) ==================== Signed-off-by: Alexei Starovoitov commit 58aa94f922c1b44e0919d1814d2eab5b9e8bf945 Author: Jesper Dangaard Brouer Date: Thu Jan 16 16:14:46 2020 +0100 devmap: Adjust tracepoint for map-less queue flush Now that we don't have a reference to a devmap when flushing the device bulk queue, let's change the the devmap_xmit tracepoint to remote the map_id and map_index fields entirely. Rearrange the fields so 'drops' and 'sent' stay in the same position in the tracepoint struct, to make it possible for the xdp_monitor utility to read both the old and the new format. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/157918768613.1458396.9165902403373826572.stgit@toke.dk commit 1d233886dd904edbf239eeffe435c3308ae97625 Author: Toke Høiland-Jørgensen Date: Thu Jan 16 16:14:45 2020 +0100 xdp: Use bulking for non-map XDP_REDIRECT and consolidate code paths Since the bulk queue used by XDP_REDIRECT now lives in struct net_device, we can re-use the bulking for the non-map version of the bpf_redirect() helper. This is a simple matter of having xdp_do_redirect_slow() queue the frame on the bulk queue instead of sending it out with __bpf_tx_xdp(). Unfortunately we can't make the bpf_redirect() helper return an error if the ifindex doesn't exit (as bpf_redirect_map() does), because we don't have a reference to the network namespace of the ingress device at the time the helper is called. So we have to leave it as-is and keep the device lookup in xdp_do_redirect_slow(). Since this leaves less reason to have the non-map redirect code in a separate function, so we get rid of the xdp_do_redirect_slow() function entirely. This does lose us the tracepoint disambiguation, but fortunately the xdp_redirect and xdp_redirect_map tracepoints use the same tracepoint entry structures. This means both can contain a map index, so we can just amend the tracepoint definitions so we always emit the xdp_redirect(_err) tracepoints, but with the map ID only populated if a map is present. This means we retire the xdp_redirect_map(_err) tracepoints entirely, but keep the definitions around in case someone is still listening for them. With this change, the performance of the xdp_redirect sample program goes from 5Mpps to 8.4Mpps (a 68% increase). Since the flush functions are no longer map-specific, rename the flush() functions to drop _map from their names. One of the renamed functions is the xdp_do_flush_map() callback used in all the xdp-enabled drivers. To keep from having to update all drivers, use a #define to keep the old name working, and only update the virtual drivers in this patch. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/157918768505.1458396.17518057312953572912.stgit@toke.dk commit 75ccae62cb8d42a619323a85c577107b8b37d797 Author: Toke Høiland-Jørgensen Date: Thu Jan 16 16:14:44 2020 +0100 xdp: Move devmap bulk queue into struct net_device Commit 96360004b862 ("xdp: Make devmap flush_list common for all map instances"), changed devmap flushing to be a global operation instead of a per-map operation. However, the queue structure used for bulking was still allocated as part of the containing map. This patch moves the devmap bulk queue into struct net_device. The motivation for this is reusing it for the non-map variant of XDP_REDIRECT, which will be changed in a subsequent commit. To avoid other fields of struct net_device moving to different cache lines, we also move a couple of other members around. We defer the actual allocation of the bulk queue structure until the NETDEV_REGISTER notification devmap.c. This makes it possible to check for ndo_xdp_xmit support before allocating the structure, which is not possible at the time struct net_device is allocated. However, we keep the freeing in free_netdev() to avoid adding another RCU callback on NETDEV_UNREGISTER. Because of this change, we lose the reference back to the map that originated the redirect, so change the tracepoint to always return 0 as the map ID and index. Otherwise no functional change is intended with this patch. After this patch, the relevant part of struct net_device looks like this, according to pahole: /* --- cacheline 14 boundary (896 bytes) --- */ struct netdev_queue * _tx __attribute__((__aligned__(64))); /* 896 8 */ unsigned int num_tx_queues; /* 904 4 */ unsigned int real_num_tx_queues; /* 908 4 */ struct Qdisc * qdisc; /* 912 8 */ unsigned int tx_queue_len; /* 920 4 */ spinlock_t tx_global_lock; /* 924 4 */ struct xdp_dev_bulk_queue * xdp_bulkq; /* 928 8 */ struct xps_dev_maps * xps_cpus_map; /* 936 8 */ struct xps_dev_maps * xps_rxqs_map; /* 944 8 */ struct mini_Qdisc * miniq_egress; /* 952 8 */ /* --- cacheline 15 boundary (960 bytes) --- */ struct hlist_head qdisc_hash[16]; /* 960 128 */ /* --- cacheline 17 boundary (1088 bytes) --- */ struct timer_list watchdog_timer; /* 1088 40 */ /* XXX last struct has 4 bytes of padding */ int watchdog_timeo; /* 1128 4 */ /* XXX 4 bytes hole, try to pack */ struct list_head todo_list; /* 1136 16 */ /* --- cacheline 18 boundary (1152 bytes) --- */ Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Björn Töpel Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/157918768397.1458396.12673224324627072349.stgit@toke.dk commit 20f21d98cf12b8ecd69e8defc93fae9e3b353b13 Author: Andrii Nakryiko Date: Thu Jan 16 16:41:02 2020 -0800 libbpf: Revert bpf_helper_defs.h inclusion regression Revert bpf_helpers.h's change to include auto-generated bpf_helper_defs.h through <> instead of "", which causes it to be searched in include path. This can break existing applications that don't have their include path pointing directly to where libbpf installs its headers. There is ongoing work to make all (not just bpf_helper_defs.h) includes more consistent across libbpf and its consumers, but this unbreaks user code as is right now without any regressions. Selftests still behave sub-optimally (taking bpf_helper_defs.h from libbpf's source directory, if it's present there), which will be fixed in subsequent patches. Fixes: 6910d7d3867a ("selftests/bpf: Ensure bpf_helper_defs.h are taken from selftests dir") Reported-by: Toke Høiland-Jørgensen Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200117004103.148068-1-andriin@fb.com commit 3d32a8437c051013352baf5cbd0844fcf5d2f409 Author: Chen Zhou Date: Wed Jan 15 21:40:10 2020 +0800 power: supply: ipaq_micro_battery: remove unneeded semicolon Fixes coccicheck warning: ./drivers/power/supply/ipaq_micro_battery.c:188:2-3: Unneeded semicolon ./drivers/power/supply/ipaq_micro_battery.c:152:3-4: Unneeded semicolon ./drivers/power/supply/ipaq_micro_battery.c:171:2-3: Unneeded semicolon Signed-off-by: Chen Zhou Signed-off-by: Sebastian Reichel commit 6cd18453b68942913fd3b1913b707646e544c2ac Author: Wei Yongjun Date: Wed Jan 15 15:03:03 2020 +0000 EDAC/sifive: Fix return value check in ecc_register() In case of error, the function edac_device_alloc_ctl_info() returns a NULL pointer, not ERR_PTR(). Replace the IS_ERR() test in the return value check with a NULL test. Fixes: 91abaeaaff35 ("EDAC/sifive: Add EDAC platform driver for SiFive SoCs") Signed-off-by: Wei Yongjun Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200115150303.112627-1-weiyongjun1@huawei.com commit b252fd42b1269f1fd4c7e54660f4e02b738dcd9e Merge: 25e3e8119ae9 6bcc319fc619 Author: Olof Johansson Date: Thu Jan 16 15:59:02 2020 -0800 Merge tag 'omap-for-v5.6/dt-part2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt More dts changes for omaps for v5.6 merge window Add basic support for first generation Amazon omap3-echo. This got applied rather late as we discussed how to deal with SoC variants with some accelerators unaccessible, and eventually ended up setting up few more SoC specific dtsi files. Eventually we'll need to also detect the disabled accelerators on driver init, but more patching is needed for that. * tag 'omap-for-v5.6/dt-part2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: Add omap3-echo ARM: dts: Add dtsi files for AM3703, AM3715 and DM3725 Link: https://lore.kernel.org/r/pull-1579200367-372444@atomide.com-4 Signed-off-by: Olof Johansson commit 061937296a3b260ea83eb55985e5c418b5b9285a Merge: 333505a40658 3f2c420596be Author: Olof Johansson Date: Thu Jan 16 15:58:24 2020 -0800 Merge tag 'omap-for-v5.6/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/drivers ti-sysc driver changes for omaps for v5.6 merge window Few changes to implement quirk handling for cases where we need to block clockdomain autoidle, drop old MMU specific quirks, and simplify the return code for sysc_init_resets(). * tag 'omap-for-v5.6/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: bus: ti-sysc: Use PTR_ERR_OR_ZERO() to simplify code bus: ti-sysc: Drop MMU quirks bus: ti-sysc: Implement quirk handling for CLKDM_NOAUTO Link: https://lore.kernel.org/r/pull-1579200367-372444@atomide.com-3 Signed-off-by: Olof Johansson commit 21473e16b1161fd2f3c531c06efab5f7812e421a Merge: e9d440157e75 8ab871f8bdfc Author: Olof Johansson Date: Thu Jan 16 15:57:41 2020 -0800 Merge tag 'omap-for-v5.6/soc-smc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc SMC related changes for omaps for v5.6 merge window A series of changes to use optee SMC calls if optee is initialized by the bootloader. Based on the discussions on LAKML in mailing list thread "arm_smccc_smc as generic smc interface?" we don't want to add more quirk handling to arm_smccc_smc() and want to handle it locally instead. * tag 'omap-for-v5.6/soc-smc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: sleep43xx: Call secure suspend/resume handlers ARM: OMAP2+: Use ARM SMC Calling Convention when OP-TEE is available ARM: OMAP2+: Introduce check for OP-TEE in omap_secure_init() ARM: OMAP2+: Add omap_secure_init callback hook for secure initialization Link: https://lore.kernel.org/r/pull-1579200367-372444@atomide.com-2 Signed-off-by: Olof Johansson commit 25e3e8119ae9218670b60bee39863ff6b223fa05 Merge: dee0be5c2138 a25e29bd0fe9 Author: Olof Johansson Date: Thu Jan 16 15:57:09 2020 -0800 Merge tag 'omap-for-v5.6/sdma-fix-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Fix omap sdma handling for missing auxdata for v5.6 merge window Turns out I was overly optimistic about making platform data optional, and we still need it to pass various quirk flags. If the platform data is missing for whatever reason, we will currently try to access non-existing data later on. * tag 'omap-for-v5.6/sdma-fix-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: dmaengine: ti: omap-dma: don't allow a null od->plat pointer to be dereferenced Link: https://lore.kernel.org/r/pull-1579200367-372444@atomide.com Signed-off-by: Olof Johansson commit 0109ef6e695613714ad425293ebea2291c07d6f7 Author: Manivannan Sadhasivam Date: Tue Jan 14 14:13:48 2020 +0530 arm64: defconfig: Enable Actions Semi specific drivers Since the Actions Semi platform has been enabled in defconfig, let's also enable the relevant device drivers there. Link: https://lore.kernel.org/r/20200114084348.25659-3-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Olof Johansson commit 278d51f24330718aefd7fe86996a6da66fd345e7 Author: Paul Blakey Date: Wed Nov 20 15:06:19 2019 +0200 net/mlx5: E-Switch, Increase number of chains and priorities Increase the number of chains and priorities to support the whole range available in tc. We use unmanaged tables and ignore flow level to create more tables than what we declared to fs_core steering, and we manage the connections between the tables themselves. To support that we need FW with ignore_flow_level capability. Otherwise the old behaviour will be used, where we are limited by the number of levels we declared (4 chains, 16 prios). Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Reviewed-by: Oz Shlomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 39ac237ce00968545e7298faa9e07ecb7e440fb5 Author: Paul Blakey Date: Wed Jan 8 12:11:04 2020 +0200 net/mlx5: E-Switch, Refactor chains and priorities To support the entire chain and prio range (32bit + 16bit), instead of a using a static array of chains/prios of limited size, create them dynamically, and use a rhashtable to search for existing chains/prio combinations. This will be used in next patch to actually increase the number using unamanged tables support and ignore flow level capability. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Reviewed-by: Oz Shlomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 82270e12544ee76ea9a3117a769a6d466a2e646b Author: Paul Blakey Date: Tue Nov 26 14:15:00 2019 +0200 net/mlx5: ft: Check prio and chain sanity for ft offload Before changing the chain from original chain to ft offload chain, make sure user doesn't actually use chains. While here, normalize the prio range to that which we support. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit e66cbc961cfe375f977b3bfae13abec4df8c8521 Author: Paul Blakey Date: Tue Nov 26 14:13:42 2019 +0200 net/mlx5: ft: Use getter function to get ft chain FT chain is defined as the next chain after tc. To prepare for next patches that will increase the number of tc chains available at runtime, use a getter function to get this value. The define is still used in static fs_core allocation, to calculate the number of chains. This static allocation will be used if the relevant capabilities won't be available to support dynamic chains. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 79cdb0aaea8b5478db34afa1d4d5ecc808689a67 Author: Paul Blakey Date: Thu Nov 14 17:02:59 2019 +0200 net/mlx5: Allow creating autogroups with reserved entries Exclude the last n entries for an autogrouped flow table. Reserving entries at the end of the FT will ensure that this FG will be the last to be evaluated. This will be used in the next patch to create a miss group enabling custom actions on FT miss. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Reviewed-by: Oz Shlomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit ff189b43568216c6211e9e7ddd9026cb8295e744 Author: Paul Blakey Date: Sun Jan 5 15:15:54 2020 +0200 net/mlx5: Add ignore level support fwd to table rules If user sets ignore flow level flag on a rule, that rule can point to a flow table of any level, including those with levels equal or less than the level of the flow table it is added on. This with unamanged tables will be used to create a FDB chain/prio hierarchy much larger than currently supported level range. Signed-off-by: Paul Blakey Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 5281a0c909194c477656e89401ac11dd7b29ad2d Author: Paul Blakey Date: Tue Jul 23 11:43:57 2019 +0300 net/mlx5: fs_core: Introduce unmanaged flow tables Currently, Most of the steering tree is statically declared ahead of time, with steering prios instances allocated for each fdb chain to assign max number of levels for each of them. This allows fs_core to manage the connections and levels of the flow tables hierarcy to prevent loops, but restricts us with the number of supported chains and priorities. Introduce unmananged flow tables, allowing the user to manage the flow table connections. A unamanged table is detached from the fs_core flow table hierarcy, and is only connected back to the hierarchy by explicit FTEs forward actions. This will be used together with firmware that supports ignoring the flow table levels to increase the number of supported chains and prios. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Reviewed-by: Oz Shlomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 12e9e0d0d97cc4f2aa9a858ac8a5741f321b5287 Merge: 6bc803803526 61dc7b0141c5 Author: Saeed Mahameed Date: Thu Jan 16 15:46:42 2020 -0800 Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux This merge syncs with mlx5-next latest HW bits and layout updates for next features, in addition one patch that improves mlx5_create_auto_grouped_flow_table() API across all mlx5 users. * 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux: net/mlx5: Refactor mlx5_create_auto_grouped_flow_table net/mlx5e: Add discard counters per priority net/mlx5e: Expose FEC feilds and related capability bit net/mlx5: Add mlx5_ifc definitions for connection tracking support net/mlx5: Add copy header action struct layout net/mlx5: Expose resource dump register mapping net/mlx5: Add structures and defines for MIRC register net/mlx5: Read MCAM register groups 1 and 2 net/mlx5: Add structures layout for new MCAM access reg groups net/mlx5: Expose vDPA emulation device capabilities net/mlx5: Add Virtio Emulation related device capabilities Signed-off-by: Saeed Mahameed commit dee0be5c2138cee65706a939d03a366b790c4baa Author: Manivannan Sadhasivam Date: Tue Jan 14 09:33:11 2020 +0530 arm64: dts: bitmain: Source common clock for UART controllers Remove fixed clock and source common clock for UART controllers. Link: https://lore.kernel.org/r/20200114040311.6599-3-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Olof Johansson commit e1cd7b804687ae15469ef2b6a19f9dd33046cc61 Author: Manivannan Sadhasivam Date: Tue Jan 14 09:33:10 2020 +0530 arm64: dts: bitmain: Add clock controller support for BM1880 SoC Add clock controller support for Bitmain BM1880 SoC. Link: https://lore.kernel.org/r/20200114040311.6599-2-manivannan.sadhasivam@linaro.org Signed-off-by: Manivannan Sadhasivam Signed-off-by: Olof Johansson commit a0be47376f1d12c2c9cef8a3857ccf6fabc6c3cb Merge: 5a74e85ae4ba c3dd3315ab58 Author: Olof Johansson Date: Thu Jan 16 15:47:09 2020 -0800 Merge tag 'amlogic-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt ARM: dts: Amlogic updates for v5.6 - add DDR clock controller - GPU OPP updates * tag 'amlogic-dt' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM: dts: meson8b: use the actual frequency for the GPU's 364MHz OPP ARM: dts: meson8: use the actual frequency for the GPU's 182.1MHz OPP ARM: dts: meson8b: fix the clock controller compatible string ARM: dts: meson8b: add the DDR clock controller ARM: dts: meson8: add the DDR clock controller ARM: dts: meson: provide the XTAL clock using a fixed-clock dt-bindings: clock: meson8b: add the clock inputs dt-bindings: clock: add the Amlogic Meson8 DDR clock controller binding Link: https://lore.kernel.org/r/7hwo9udi7m.fsf@baylibre.com Signed-off-by: Olof Johansson commit 5a74e85ae4baa4aac5b43b4ced0a322d9d400430 Merge: 116a4b85f6fb be63807524dd Author: Olof Johansson Date: Thu Jan 16 15:46:38 2020 -0800 Merge tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt arm64: dts: Amlogic updates for v5.6 - new boards: libretech-pc (S912 and S905D versions) - new board: Videostrong KII Pro - A1: add reset controller * tag 'amlogic-dt64' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson: add audio fifo depths arm64: dts: meson: add libretech-pc boards support dt-bindings: arm: amlogic: add libretech-pc bindings arm64: dts: meson: gxl: add i2c C pins arm64: dts: meson-sm1: add video decoder compatible arm64: dts: meson-g12-common: add video decoder node arm64: dts: meson-gxbb: add support for Videostrong KII Pro dt-bindings: arm: amlogic: add Videostrong KII Pro bindings dt-bindings: Add vendor prefix for Videostrong arm64: dts: meson: a1: add pinctrl controller support arm64: dts: meson: add reset controller for Meson-A1 SoC Link: https://lore.kernel.org/r/7hsgkidi3k.fsf@baylibre.com Signed-off-by: Olof Johansson commit 116a4b85f6fb0482721a1a4fc1eacb97572e48cd Merge: 2e04d1bd540c 5e4548922009 Author: Olof Johansson Date: Thu Jan 16 15:46:05 2020 -0800 Merge tag 'qcom-dts-for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm ARM dts updates for v5.6 * Add SAW L2 nodes to boot secondary cpus on IPQ40xx * Fix remaining IRQ_TYPE_NONE on APQ8084 * Update tsens node to new style * Add modem remoteproc node to MSM8974 * Move ADSP SMD edge into ADSP remoteproc node for MSM8974 * Add and enable wireless communication subsystem on MSM8974 and Fairphone 2 * Add MSM8974 interconnect provider nodes * Add MSM8974 OCMEM node * tag 'qcom-dts-for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: Add nodes for SMP boot in IPQ40xx ARM: dts: qcom: apq8084: Remove all instances of IRQ_TYPE_NONE ARM: dts: qcom: apq8084: Change tsens definition to new style ARM: dts: msm8974: Move ADSP smd edge to ADSP PIL ARM: dts: msm8974: Add modem remoteproc node ARM: dts: msm8974-FP2: Introduce the wcnss remoteproc node ARM: dts: msm8974: Introduce the wcnss remoteproc node ARM: dts: qcom: msm8974: add interconnect nodes ARM: dts: qcom: msm8974: add ocmem node Link: https://lore.kernel.org/r/20200113204448.GE3325@yoga Signed-off-by: Olof Johansson commit 333505a40658d7fe6aed050ec6df609b87c6927d Merge: a9e3e12f3f58 9a434cee773a Author: Olof Johansson Date: Thu Jan 16 15:45:35 2020 -0800 Merge tag 'qcom-drivers-for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers Qualcomm driver updates for v5.6 * SCM major refactoring and cleanup * Properly flag active only power domains as active only * Add SC7180 and SM8150 RPMH power domains * Return EPROBE_DEFER from QMI if packet family is not yet available * tag 'qcom-drivers-for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (27 commits) firmware: qcom_scm: Dynamically support SMCCC and legacy conventions firmware: qcom_scm: Remove thin wrappers firmware: qcom_scm: Order functions, definitions by service/command firmware: qcom_scm-32: Add device argument to atomic calls firmware: qcom_scm-32: Create common legacy atomic call firmware: qcom_scm-32: Move SMCCC register filling to qcom_scm_call firmware: qcom_scm-32: Use qcom_scm_desc in non-atomic calls firmware: qcom_scm-32: Add funcnum IDs firmware: qcom_scm-32: Use SMC arch wrappers firmware: qcom_scm-64: Improve SMC convention detection firmware: qcom_scm-64: Move SMC register filling to qcom_scm_call_smccc firmware: qcom_scm-64: Add SCM results struct firmware: qcom_scm-64: Move svc/cmd/owner into qcom_scm_desc firmware: qcom_scm-64: Make SMC macros less magical firmware: qcom_scm: Remove unused qcom_scm_get_version firmware: qcom_scm: Apply consistent naming scheme to command IDs firmware: qcom_scm: Rename macros and structures soc: qcom: rpmhpd: Set 'active_only' for active only power domains firmware: scm: Add stubs for OCMEM and restore_sec_cfg_available dt-bindings: power: rpmpd: Convert rpmpd bindings to yaml ... Link: https://lore.kernel.org/r/20200113204405.GD3325@yoga Signed-off-by: Olof Johansson commit 40d4d62708ff771df0e8c1ea8ccaba7caa3ff135 Merge: 8b91bcd75a4f dd973b89ebba Author: Olof Johansson Date: Thu Jan 16 15:45:06 2020 -0800 Merge tag 'qcom-defconfig-for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig Qualcomm ARM defconfig updates for v5.6 * Enable anx78xx HDMI bridge driver * Enable MSM8974 interconnect provider driver * tag 'qcom-defconfig-for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: qcom_defconfig: add anx78xx HDMI bridge support ARM: qcom_defconfig: add msm8974 interconnect support Link: https://lore.kernel.org/r/20200113204313.GC3325@yoga Signed-off-by: Olof Johansson commit 2e04d1bd540c849495c6f50d3c8086be824bd4e5 Merge: e59760f70b7d f489b13dae02 Author: Olof Johansson Date: Thu Jan 16 15:44:15 2020 -0800 Merge tag 'qcom-arm64-for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm ARM64 DT updates for v5.6 * Align SDM845 firmware paths with linux-firmware * Make WiFi work on Dragonboard845c * Wire up wakeup controller for SDM845 * Critical thermal interrupt support for SDM845, MSM8996 and MSM8998 * Enable UFS for SM8150 * Add remoteproc enablers and nodes for SM8150 * Add CPUfreq for SM8150 * Add RPMH power-domain node for SM8150 * Cleanup and refactor MSM8996 dts structure * Add initial Inforce Computing IFC6640 dts * Increase MSM8996 core voltage * Fix MSM8996 USB phy settings * Add missing alias for BLSP UART in MSM8998 MTP * Add remoteproc nodes for ADSP, modem and sensor core for MSM8998 * Enable WiFI for MSM8998 * Introduce the SC7180 platform and the IDP development board * Add CPUfreq, QUPs, USB, remoteproc etc for SC7180 * Enable USB OTG for Dragonboard 410c * Add vibrator motor node for PM8916 * Properly specify APCS clocks for MSM8916 * Add CPR and HFPLL for QCS404 * Enable full CPUfreq (with AVS) for QCS404 * tag 'qcom-arm64-for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (88 commits) arm64: dts: qcom: sdm845: move gpu zap nodes to per-device dts arm64: dts: qcom: sm8150: Hard code rpmhpd constants arm64: dts: apq8096-db820c: Fix VDD core voltage arm64: dts: qcom: qcs404-evb: Set vdd_apc regulator in high power mode arm64: dts: qcom: msm8998-mtp: Add alias for blsp1_uart3 arm64: dts: qcom: sc7180: Add critical interrupt and cooling maps for TSENS in SC7180 arm64: dts: qcom: msm8996: Fix venus iommu nodename error arm64: dts: qcom: sdm845: add the ufs reset arm64: dts: qcom: sm8150: Fix UFS phy register size arm64: dts: qcom: sm8150-mtp: Add UFS gpio reset arm64: dts: qcom: qcs404: Add CPR and populate OPP table arm64: dts: qcom: qcs404: Add DVFS support arm64: dts: qcom: qcs404: Add the clocks for APCS mux/divider arm64: dts: qcom: qcs404: Add HFPLL node arm64: dts: qcom: msm8916: Add the clocks for the APCS mux/divider arm64: dts: qcom: sc7180: Add rpmh power-domain node arm64: dts: pm8004: Add SPMI regulator and add phandles to lsids arm64: dts: msm8998: thermal: Add critical interrupt support arm64: dts: msm8996: thermal: Add critical interrupt support arm64: dts: qcom: db845c: Move remoteproc firmware to sdm845 ... Link: https://lore.kernel.org/r/20200113204225.GB3325@yoga Signed-off-by: Olof Johansson commit 155fc6ba488a8bdfd1d3be3d7ba98c9cec2b2429 Author: Geert Uytterhoeven Date: Mon Jan 13 11:51:56 2020 +0100 ubifs: Fix ino_t format warnings in orphan_delete() On alpha and s390x: fs/ubifs/debug.h:158:11: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘ino_t {aka unsigned int}’ [-Wformat=] ... fs/ubifs/orphan.c:132:3: note: in expansion of macro ‘dbg_gen’ dbg_gen("deleted twice ino %lu", orph->inum); ... fs/ubifs/orphan.c:140:3: note: in expansion of macro ‘dbg_gen’ dbg_gen("delete later ino %lu", orph->inum); __kernel_ino_t is "unsigned long" on most architectures, but not on alpha and s390x, where it is "unsigned int". Hence when printing an ino_t, it should always be cast to "unsigned long" first. Fix this by re-adding the recently removed casts. Fixes: 8009ce956c3d2802 ("ubifs: Don't leak orphans on memory during commit") Signed-off-by: Geert Uytterhoeven Signed-off-by: Richard Weinberger commit 61dc7b0141c51f5fa4aed97e49f9cf102ec51479 Author: Paul Blakey Date: Thu Nov 14 16:59:58 2019 +0200 net/mlx5: Refactor mlx5_create_auto_grouped_flow_table Refactor mlx5_create_auto_grouped_flow_table() to use ft_attr param which already carries the max_fte, prio and flags memebers, and is used the same in similar mlx5_create_flow_table() function. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Reviewed-by: Oz Shlomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit aa811e3cececac2f65f7fa7e17ab46c73d778b2b Author: Alan Maguire Date: Tue Jan 14 16:09:43 2020 +0000 software node: introduce CONFIG_KUNIT_DRIVER_PE_TEST Currently the property entry kunit tests are built if CONFIG_KUNIT=y. This will cause warnings when merged with the kunit tree that now supports tristate CONFIG_KUNIT. While the tests appear to compile as a module, we get a warning about missing module license. It's better to have a per-test suite CONFIG variable so that we can do selective building of kunit-based suites, and can also avoid merge issues like this. Fixes: c032ace71c29 ("software node: add basic tests for property entries") Reported-by: Stephen Rothwell Reported-by: Randy Dunlap Signed-off-by: Alan Maguire Signed-off-by: Rafael J. Wysocki commit f7d50a1534a833f4d07c5bc0c2f37eaf1e905598 Merge: 57388a2ccb6c 53eb82b0977d Author: Rafael J. Wysocki Date: Fri Jan 17 00:18:31 2020 +0100 Merge back cpuidle material for v5.6. commit f5de5b83303e61b1f3fb09bd77ce3ac2d7a475f2 Author: Zhihao Cheng Date: Sat Jan 11 17:50:36 2020 +0800 ubifs: Fix deadlock in concurrent bulk-read and writepage In ubifs, concurrent execution of writepage and bulk read on the same file may cause ABBA deadlock, for example (Reproduce method see Link): Process A(Bulk-read starts from page4) Process B(write page4 back) vfs_read wb_workfn or fsync ... ... generic_file_buffered_read write_cache_pages ubifs_readpage LOCK(page4) ubifs_bulk_read ubifs_writepage LOCK(ui->ui_mutex) ubifs_write_inode ubifs_do_bulk_read LOCK(ui->ui_mutex) find_or_create_page(alloc page4) ↑ LOCK(page4) <-- ABBA deadlock occurs! In order to ensure the serialization execution of bulk read, we can't remove the big lock 'ui->ui_mutex' in ubifs_bulk_read(). Instead, we allow ubifs_do_bulk_read() to lock page failed by replacing find_or_create_page(FGP_LOCK) with pagecache_get_page(FGP_LOCK | FGP_NOWAIT). Signed-off-by: Zhihao Cheng Suggested-by: zhangyi (F) Cc: Fixes: 4793e7c5e1c ("UBIFS: add bulk-read facility") Link: https://bugzilla.kernel.org/show_bug.cgi?id=206153 Signed-off-by: Richard Weinberger commit edec51374bce779f37fc209a228139c55d90ec8d Author: Sascha Hauer Date: Wed Dec 4 11:09:58 2019 +0100 ubifs: Fix wrong memory allocation In create_default_filesystem() when we allocate the idx node we must use the idx_node_size we calculated just one line before, not tmp, which contains completely other data. Fixes: c4de6d7e4319 ("ubifs: Refactor create_default_filesystem()") Cc: stable@vger.kernel.org # v4.20+ Reported-by: Naga Sureshkumar Relli Tested-by: Naga Sureshkumar Relli Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit fc55dacf7fea793e70c9c75a1acff47a4fb02017 Author: Hou Tao Date: Sat Nov 30 17:48:25 2019 +0800 ubi: Free the normal volumes in error paths of ubi_attach_mtd_dev() The allocated normal volumes saved in ubi->volumes are not freed in the error paths in ubi_attach_mtd_dev() and its callees (e.g. ubi_attach() and ubi_read_volume_table()). These normal volumes should be freed through kill_volumes() and vol_release(), but ubi_attach_mtd_dev() may fail before calling uif_init(), and there will be memory leaks. So adding a new helper ubi_free_all_volumes() to free the normal and the internal volumes. And in order to prevent double-free of volume, reset ubi->volumes[i] to NULL after freeing. Signed-off-by: Hou Tao Signed-off-by: Richard Weinberger commit 9d6c4742f96cc0380a3f2854d62c667b87736d71 Author: Hou Tao Date: Sat Nov 30 17:48:00 2019 +0800 ubi: Check the presence of volume before call ubi_fastmap_destroy_checkmap() Else there may be oops when fastmap is enabled and init_volumes() fails. Signed-off-by: Hou Tao Signed-off-by: Richard Weinberger commit 219b0e2cba4ec326f88a08a5c9ad51103089bdab Author: Eric Biggers Date: Mon Dec 9 14:23:25 2019 -0800 ubifs: Add support for FS_ENCRYPT_FL Make the FS_IOC_GETFLAGS ioctl on ubifs return the FS_ENCRYPT_FL flag on encrypted files, like ext4 and f2fs do. Also make this flag be ignored by FS_IOC_SETFLAGS, like ext4 and f2fs do, since it's a recognized flag but is not directly settable. Signed-off-by: Eric Biggers Signed-off-by: Richard Weinberger commit 2b57067a7778484c10892fa191997bfda29fea13 Author: Eric Biggers Date: Mon Dec 9 14:23:24 2019 -0800 ubifs: Fix FS_IOC_SETFLAGS unexpectedly clearing encrypt flag UBIFS's implementation of FS_IOC_SETFLAGS fails to preserve existing inode flags that aren't settable by FS_IOC_SETFLAGS, namely the encrypt flag. This causes the encrypt flag to be unexpectedly cleared. Fix it by preserving existing unsettable flags, like ext4 and f2fs do. Test case with kvm-xfstests shell: FSTYP=ubifs KEYCTL_PROG=keyctl . fs/ubifs/config . ~/xfstests/common/encrypt dev=$(__blkdev_to_ubi_volume /dev/vdc) ubiupdatevol -t $dev mount $dev /mnt -t ubifs k=$(_generate_session_encryption_key) mkdir /mnt/edir xfs_io -c "set_encpolicy $k" /mnt/edir echo contents > /mnt/edir/file chattr +i /mnt/edir/file chattr -i /mnt/edir/file With the bug, the following errors occur on the last command: [ 18.081559] fscrypt (ubifs, inode 67): Inconsistent encryption context (parent directory: 65) chattr: Operation not permitted while reading flags on /mnt/edir/file Fixes: d475a507457b ("ubifs: Add skeleton for fscrypto") Cc: # v4.10+ Signed-off-by: Eric Biggers Signed-off-by: Richard Weinberger commit 770aa73d8965b6fe7b08b0e5a8f4cceb4cb17f12 Author: YueHaibing Date: Wed Nov 27 06:20:02 2019 +0000 ubi: wl: Remove set but not used variable 'prev_e' Fixes gcc '-Wunused-but-set-variable' warning: drivers/mtd/ubi/wl.c: In function 'find_wl_entry': drivers/mtd/ubi/wl.c:322:27: warning: variable 'prev_e' set but not used [-Wunused-but-set-variable] It's not used any more now, so remove it. Fixes: f9c34bb52997 ("ubi: Fix producing anchor PEBs") Signed-off-by: YueHaibing Signed-off-by: Richard Weinberger commit ef5aafb6e4e9942a28cd300bdcda21ce6cbaf045 Author: Sascha Hauer Date: Wed Oct 23 11:58:12 2019 +0200 ubi: fastmap: Fix inverted logic in seen selfcheck set_seen() sets the bit corresponding to the PEB number in the bitmap, so when self_check_seen() wants to find PEBs that haven't been seen we have to print the PEBs that have their bit cleared, not the ones which have it set. Fixes: 5d71afb00840 ("ubi: Use bitmaps in Fastmap self-check code") Signed-off-by: Sascha Hauer Signed-off-by: Richard Weinberger commit 827a8cb2dd2b72848652b2a425bba3262808ff44 Author: Aharon Landau Date: Mon Dec 16 12:50:13 2019 +0200 net/mlx5e: Add discard counters per priority Add counters that count (per priority) the number of received packets that dropped due to lack of buffers on a physical port. If this counter is increasing, it implies that the adapter is congested and cannot absorb the traffic coming from the network. Signed-off-by: Aharon Landau Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit a58837f52d432f32995b1c00e803cc4db18762d3 Author: Aya Levin Date: Mon Dec 30 14:22:57 2019 +0200 net/mlx5e: Expose FEC feilds and related capability bit Introduce 50G per lane FEC modes capability bit and newly supported fields in PPLM register which allow this configuration. Signed-off-by: Aya Levin Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 822e114b50641d3b57d2eb30939e60d8b4758288 Author: Paul Blakey Date: Mon Apr 1 13:31:32 2019 +0300 net/mlx5: Add mlx5_ifc definitions for connection tracking support Add the required hardware definitions to mlx5_ifc: ignore_flow_level, registers, copy_header, and fwd_and_modify cap. Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Reviewed-by: Oz Sholomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 31d8bde1c8812c9b44065dcd98e554488c6a98d2 Author: Hamdan Igbaria Date: Thu Jan 9 13:26:53 2020 +0200 net/mlx5: Add copy header action struct layout Add definition for copy header action, copy action is used to copy header fields from source to destination. Signed-off-by: Hamdan Igbaria Signed-off-by: Alex Vesker Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 609b82727f719b41b50440c4028d48d0b2e04913 Author: Aya Levin Date: Mon Nov 4 14:51:55 2019 +0200 net/mlx5: Expose resource dump register mapping Add new register enumeration for resource dump. Add layout mapping for resource dump: access command and response. Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit bab58ba10ecfa39c46d280d2acbca6054e1e863d Author: Eran Ben Elisha Date: Mon Oct 7 10:30:32 2019 +0300 net/mlx5: Add structures and defines for MIRC register Add needed structures, layouts and defines for MIRC (Management Image Re-activation Control) register. This structure will be used for the FSM reactivation flow in the downstream patches. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 932ef155117cc5caf1108bd27664dab974ba6e89 Author: Eran Ben Elisha Date: Mon Oct 7 10:31:42 2019 +0300 net/mlx5: Read MCAM register groups 1 and 2 On load, Driver caches MCAM (Management Capabilities Mask Register) registers. in addition to the only MCAM register group (0) the driver already reads, here we add support for reading groups 1 and 2. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit f397464eb7c25bda903ec8b9cf5701e72a1f7b16 Author: Eran Ben Elisha Date: Mon Oct 7 10:29:46 2019 +0300 net/mlx5: Add structures layout for new MCAM access reg groups MCAM has 3 access_reg_groups (0-2). Defines data structures in order to read and parse access_reg_groups #1 and #2. Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 8b91bcd75a4f7467606b3302fb1baafdf336983e Merge: 6022ce5176d1 a7ab9b89af22 Author: Olof Johansson Date: Thu Jan 16 14:10:22 2020 -0800 Merge tag 'qcom-arm64-defconfig-for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig Qualcomm ARM64 defconfig updates for v5.6 * Enable NVMEM and OSM CPUfreq drivers * Enable CPR driver * Enable HFPLL driver * Enable ATH10k SNOC driver * Enable PMIC thermal driver * Enable wakeup controller driver * Enable watchdog driver * Enable PRNG driver * Enable SN65DSI86 DSI to DisplayPort bridge driver * Enable QCA Bluetooth driver * Enable Qualcomm SoCinfo driver * Enable SPI and QSPI drivers * Enable drivers providing remoteproc dependencies * tag 'qcom-arm64-defconfig-for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: enable CONFIG_ARM_QCOM_CPUFREQ_NVMEM arm64: defconfig: enable CONFIG_QCOM_CPR arm64: defconfig: Enable HFPLL arm64: defconfig: Enable ATH10K_SNOC arm64: defconfig: Enable QCOM PMIC thermal arm64: defconfig: enable PDC interrupt controller for Qualcomm SDM845 arm64: defconfig: Enable Qualcomm watchdog driver arm64: defconfig: Enable Qualcomm pseudo rng arm64: defconfig: Enable SN65DSI86 display bridge arm64: defconfig: Enable QCA Bluetooth over UART arm64: defconfig: Enable Qualcomm CPUfreq HW driver arm64: defconfig: Enable Qualcomm socinfo driver arm64: defconfig: Enable Qualcomm SPI and QSPI controller arm64: defconfig: Enable Qualcomm remoteproc dependencies Link: https://lore.kernel.org/r/20200113204130.GA3325@yoga Signed-off-by: Olof Johansson commit e9d440157e7526aab69ab186673b3ca90709ab6f Merge: 123718659721 d9b8e21eae5d Author: Olof Johansson Date: Thu Jan 16 14:09:30 2020 -0800 Merge tag 'at91-5.6-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/soc AT91 SoC for 5.5 - Document new SoC: sam9x60 - rework sam9x60 Kconfig option * tag 'at91-5.6-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: at91: Documentation: add sam9x60 product and datasheet ARM: at91: pm: use of_device_id array to find the proper shdwc node ARM: at91: pm: use SAM9X60 PMC's compatible ARM: debug-ll: select DEBUG_AT91_RM9200_DBGU for sam9x60 drivers: soc: atmel: select POWER_RESET_AT91_SAMA5D2_SHDWC for sam9x60 power: reset: Kconfig: select POWER_RESET_AT91_RESET for sam9x60 drivers: soc: atmel: move sam9x60 under its own config flag ARM: at91: pm: move SAM9X60's PM under its own SoC config flag ARM: at91: Kconfig: add config flag for SAM9X60 SoC ARM: at91: Kconfig: add sam9x60 pll config flag Link: https://lore.kernel.org/r/20200113161612.GA1358903@piout.net Signed-off-by: Olof Johansson commit 6022ce5176d1c64d8ff3a7f114d00a81f5ab449d Merge: 59abae1ad93c f013dbe4e720 Author: Olof Johansson Date: Thu Jan 16 14:09:03 2020 -0800 Merge tag 'at91-5.6-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/defconfig AT91 defconfig for 5.6 - Add sam9x60 to at91_dt_defconfig * tag 'at91-5.6-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: configs: at91: enable config flags for sam9x60 SoC ARM: configs: at91: use savedefconfig Link: https://lore.kernel.org/r/20200113161033.GA1358651@piout.net Signed-off-by: Olof Johansson commit e59760f70b7d93dfd33b2c8567ff0adb4bd57193 Merge: 2db34041dcac a7e0f3fc01df Author: Olof Johansson Date: Thu Jan 16 14:07:24 2020 -0800 Merge tag 'at91-5.6-dt-1' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt AT91 DT for 5.6 - Fix sama5d3 peripheral clock rate range - New boards: Overkiz Smartikz and Kizbox Mini, Microchip SAMA5D27 wlsom1-ek - sama5d2 sdmcc fixes * tag 'at91-5.6-dt-1' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sama5d3: define clock rate range for tcb1 ARM: dts: at91: sama5d3: fix maximum peripheral clock rates ARM: dts: at91: nattis 2: remove unnecessary include ARM: dts: at91: add smartkiz support and a common kizboxmini dtsi file dt-bindings: arm: at91: Document Kizboxmini and Smartkiz boards binding ARM: dts: at91: rearrange kizbox dts using aliases nodes ARM: dts: at91: sama5d27_som1_ek: add the microchip,sdcal-inverted on sdmmc0 ARM: dts: at91: Reenable UART TX pull-ups ARM: dts: at91: sama5d2: set the sdmmc gclk frequency ARM: dts: at91: sama5d27_som1_ek: add i2c filters properties ARM: dts: at91: sama5d27_wlsom1: add SAMA5D27 wlsom1 and wlsom1-ek dt-bindings: ARM: at91: Document SAMA5D27 WLSOM1 and Evaluation Kit ARM: dts: at91: sama5d2: mark secumod as a GPIO controller ARM: dts: at91: sama5d2: disable pwm0 by default Link: https://lore.kernel.org/r/20200113155423.GA1357189@piout.net Signed-off-by: Olof Johansson commit 35697c12d7ffd31a56d3c9604066a166b75d0169 Author: Yonghong Song Date: Thu Jan 16 09:40:04 2020 -0800 selftests/bpf: Fix test_progs send_signal flakiness with nmi mode Alexei observed that test_progs send_signal may fail if run with command line "./test_progs" and the tests will pass if just run "./test_progs -n 40". I observed similar issue with nmi subtest failure and added a delay 100 us in Commit ab8b7f0cb358 ("tools/bpf: Add self tests for bpf_send_signal_thread()") and the problem is gone for me. But the issue still exists in Alexei's testing environment. The current code uses sample_freq = 50 (50 events/second), which may not be enough. But if the sample_freq value is larger than sysctl kernel/perf_event_max_sample_rate, the perf_event_open syscall will fail. This patch changed nmi perf testing to use sample_period = 1, which means trying to sampling every event. This seems fixing the issue. Fixes: ab8b7f0cb358 ("tools/bpf: Add self tests for bpf_send_signal_thread()") Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200116174004.1522812-1-yhs@fb.com commit a67ca893ae0a228bed889ede27ed65fd46aa469c Merge: 49a101d7169c 9e0333ae38ee Author: Thomas Gleixner Date: Thu Jan 16 22:24:54 2020 +0100 Merge tag 'timers-v5.5-rc6' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clocksource/events driver updates from Daniel Lezcano - Add suspend/resume for Hyper-V clocksource (Dexuan Cui) - Fix Kconfig indentation (Krzysztof Kozlowski) - Add SoC specific bindings for RZ/G2N (r8a774b1) (Biju Das) - Add Microchip PIT64B support (Claudiu Beznea) - Convert the cadence ttc driver to a platform driver to initialize later (Rajan Vaja) - Fix a memory leak when the initialization fails on bcm2835 (Colin Ian King) - Use the combo devm_platform_ioremap_resource() function for em-sti, ti-dm and switch to platform_get_irq (Yangtao Li) - Fix Exynos naming in the driver (Krzysztof Kozlowski) - Fix an uninitialized pointer access in ti-dm timer (Tony Lindgren) - Fix a sparse warning in microchip-pit64b (Claudiu Beznea) - Code reorg without functional changes for Hyper-V clocksource (Andrea Parri) - Decrease the Hyper-V clocksource rating in order to let the stable TSC to be selected instead (Andrea Parri) commit dd89b9d9f37decab85e000384d229abdcd9944ae Author: Ondrej Mosnacek Date: Thu Jan 16 13:04:34 2020 +0100 selinux: do not allocate ancillary buffer on first load In security_load_policy(), we can defer allocating the newpolicydb ancillary array to after checking state->initialized, thereby avoiding the pointless allocation when loading policy the first time. Signed-off-by: Ondrej Mosnacek [PM: merged portions by hand] Reviewed-by: Stephen Smalley Signed-off-by: Paul Moore commit 86e9f9d60eb5e0c5d99ddf6b79f4d308d6453bd0 Author: Borislav Petkov Date: Thu Jan 16 17:28:39 2020 +0100 EDAC/mce_amd: Make fam_ops static global ... and do not kmalloc a three-pointer struct. Which simplifies mce_amd_init() a bit. No functional changes. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200116163403.GF27148@zn.tnic commit 2db34041dcacbe6de9c48888216a722caa17235d Merge: 7d6292ab1119 a845ad16212e Author: Olof Johansson Date: Thu Jan 16 12:49:34 2020 -0800 Merge tag 'v5.5-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt mt8173: - add dynamic power coefficient to the cpu clusters - add jpeg decoder node mt8183: - add node for the Global Command Engine (gce) - add reset cells to the infracfg node * tag 'v5.5-next-dts64' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm64: dts: mt8183: add reset-cells in infracfg arm64: dts: mt8173: add Mediatek JPEG Codec arm64: dts: add gce node for mt8183 arm64: dts: mt8173: Add dynamic power node. Link: https://lore.kernel.org/r/46c1a244-3f74-8069-6600-8ced02775677@gmail.com Signed-off-by: Olof Johansson commit 7d6292ab11199ef596cbe6c87180e49510c8b7c7 Merge: 87f846c773ea ac904843087b Author: Olof Johansson Date: Thu Jan 16 12:48:50 2020 -0800 Merge tag 'sunxi-dt-for-5.6-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt This is our usual set of DT patches for the Allwinner SoCs. It's fairly big this time, but the highlights are: - Enable cpufreq and CPU thermal throttling on the A64 - CLK_CPUX macro usage removed (changed from first pull request) - CSI0 support on the R40 - CSI1 support on the A10 and A20 - SPI support on the R40 - PMU support on the H3, H5, H6 and R40 - MIPI-DSI support on the A64 - PWM support on the H6 - Thermal sensor on the A64, A83t, H3, H5, H6 and R40 - More DT schemas fixes and conversions - New boards: LibreComputer ALL-H5-CC H5, LibreComputer ALL-H3-IT H5, Pine64 H64 Model B, Neutis N5H3 * tag 'sunxi-dt-for-5.6-2' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: (52 commits) arm64: dts: allwinner: a64: enable DVFS arm64: dts: allwinner: a64: add dtsi with CPU operating points arm64: dts: allwinner: a64: add cooling maps and thermal tripping points arm64: dts: allwinner: a64: add CPU clock to CPU0-3 nodes arm64: dts: allwinner: sun50i-a64: Use macros for newly exported clocks ARM: dts: sunxi: Use macros for references to CCU clocks arm64: dts: allwinner: h5: Add Libre Computer ALL-H5-CC H5 board ARM: dts: sun8i: R40: Add SPI controllers nodes and pinmuxes arm64: dts: allwinner: a64: pinebook: Fix lid wakeup ARM: dts: sun8i: r40: Add device node for CSI0 ARM: dts: sun7i: Add CSI1 controller and pinmux options ARM: dts: sun4i: Add CSI1 controller and pinmux options ARM: dts: sunxi: Add missing LVDS resets and clocks ARM: dts: sun8i: r40: Use tcon top clock index macros ARM: dts: sun8i: R40: Add PMU node ARM: dts: sun8i: R40: Upgrade GICC reg size to 8K arm64: dts: allwinner: h6: Add thermal sensor and thermal zones ARM: dts: sunxi: Add Libre Computer ALL-H3-IT H5 board arm64: dts: allwinner: a64: Add MIPI DSI pipeline arm64: dts: allwinner: a64: Add thermal sensors and thermal zones ... Link: https://lore.kernel.org/r/20200113095555.GA29848@wens.csie.org Signed-off-by: Olof Johansson commit a9e3e12f3f58083b4c0fda7bcb95d05841e982bb Merge: 0f827273178f 6e62bd36e9ad Author: Olof Johansson Date: Thu Jan 16 12:47:12 2020 -0800 Merge tag 'soc-fsl-next-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into arm/drivers NXP/FSL SoC driver updates for v5.6 QUICC Engine drivers - Improve the QE drivers to be compatible with ARM/ARM64/PPC64 architectures - Various cleanups to the QE drivers * tag 'soc-fsl-next-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux: (49 commits) soc: fsl: qe: remove set but not used variable 'mm_gc' soc: fsl: qe: remove PPC32 dependency from CONFIG_QUICC_ENGINE soc: fsl: qe: remove unused #include of asm/irq.h from ucc.c net: ethernet: freescale: make UCC_GETH explicitly depend on PPC32 net/wan/fsl_ucc_hdlc: reject muram offsets above 64K net/wan/fsl_ucc_hdlc: fix reading of __be16 registers net/wan/fsl_ucc_hdlc: avoid use of IS_ERR_VALUE() soc: fsl: qe: avoid IS_ERR_VALUE in ucc_fast.c soc: fsl: qe: drop pointless check in qe_sdma_init() soc: fsl: qe: drop use of IS_ERR_VALUE in qe_sdma_init() soc: fsl: qe: avoid IS_ERR_VALUE in ucc_slow.c soc: fsl: qe: refactor cpm_muram_alloc_common to prevent BUG on error path soc: fsl: qe: drop broken lazy call of cpm_muram_init() soc: fsl: qe: make cpm_muram_free() ignore a negative offset soc: fsl: qe: make cpm_muram_free() return void soc: fsl: qe: change return type of cpm_muram_alloc() to s32 serial: ucc_uart: access __be32 field using be32_to_cpu serial: ucc_uart: limit brg-frequency workaround to PPC32 serial: ucc_uart: use of_property_read_u32() in ucc_uart_probe() serial: ucc_uart: stub out soft_uart_init for !CONFIG_PPC32 ... Link: https://lore.kernel.org/r/1578608351-23289-1-git-send-email-leoyang.li@nxp.com Signed-off-by: Olof Johansson commit c052bf82c6b00ca27aab0859addc4b3159dfd3a4 Author: Jonas Meurer Date: Thu Jan 16 12:53:54 2020 +0100 PM: suspend: Add sysfs attribute to control the "sync on suspend" behavior The sysfs attribute `/sys/power/sync_on_suspend` controls, whether or not filesystems are synced by the kernel before system suspend. Congruously, the behaviour of build-time switch CONFIG_SUSPEND_SKIP_SYNC is slightly changed: It now defines the run-tim default for the new sysfs attribute `/sys/power/sync_on_suspend`. The run-time attribute is added because the existing corresponding build-time Kconfig flag for (`CONFIG_SUSPEND_SKIP_SYNC`) is not flexible enough. E.g. Linux distributions that provide pre-compiled kernels usually want to stick with the default (sync filesystems before suspend) but under special conditions this needs to be changed. One example for such a special condition is user-space handling of suspending block devices (e.g. using `cryptsetup luksSuspend` or `dmsetup suspend`) before system suspend. The Kernel trying to sync filesystems after the underlying block device already got suspended obviously leads to dead-locks. Be aware that you have to take care of the filesystem sync yourself before suspending the system in those scenarios. Signed-off-by: Jonas Meurer Signed-off-by: Rafael J. Wysocki commit 49a101d7169c7729c7bab6b2f896faae34bd6c3d Author: Christophe Leroy Date: Thu Jan 16 17:58:27 2020 +0000 lib/vdso: Only read hrtimer_res when needed in __cvdso_clock_getres() Only perform READ_ONCE(vd[CS_HRES_COARSE].hrtimer_res) for HRES and RAW clocks. Signed-off-by: Christophe Leroy Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/7ac2f0d21652f95e2bbdfa6bd514ae6c7caf53ab.1579196675.git.christophe.leroy@c-s.fr commit 99570c3da96a0f7aa11c6ad4981776f3adabf3b5 Author: Thomas Gleixner Date: Thu Jan 16 20:43:41 2020 +0100 MIPS: vdso: Define BUILD_VDSO32 when building a 32bit kernel The confinement of the 32bit specific VDSO functions missed to define BUILD_VDSO32 when building a 32bit MIPS kernel: arch/mips/vdso/vgettimeofday.c: In function __vdso_clock_gettime: arch/mips/vdso/vgettimeofday.c:17:9: error: implicit declaration of function __cvdso_clock_gettime32 arch/mips/vdso/vgettimeofday.c: In function __vdso_clock_getres: arch/mips/vdso/vgettimeofday.c:39:9: error: implicit declaration of function __cvdso_clock_getres_time32 Force the define for 32bit builds in the VDSO Makefile. Fixes: bf279849ad59 ("lib/vdso: Build 32 bit specific functions in the right context") Reported-by: kbuild test robot Signed-off-by: Thomas Gleixner Acked-by: Paul Burton Link: https://lore.kernel.org/r/87d0bjfaqa.fsf@nanos.tec.linutronix.de commit eaad647e5cc27f7b46a27f3b85b14c4c8a64bffa Author: Jack Morgenstein Date: Wed Jan 15 10:50:50 2020 +0200 IB/mlx4: Fix memory leak in add_gid error flow In procedure mlx4_ib_add_gid(), if the driver is unable to update the FW gid table, there is a memory leak in the driver's copy of the gid table: the gid entry's context buffer is not freed. If such an error occurs, free the entry's context buffer, and mark the entry as available (by setting its context pointer to NULL). Fixes: e26be1bfef81 ("IB/mlx4: Implement ib_device callbacks") Link: https://lore.kernel.org/r/20200115085050.73746-1-leon@kernel.org Signed-off-by: Jack Morgenstein Reviewed-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d7fab916374c8f5488ca792c57ea8b72e8631213 Author: Avihai Horon Date: Wed Jan 15 16:54:59 2020 +0200 IB/mlx5: Expose RoCE accelerator counters Introduce the following RoCE accelerator counters: * roce_adp_retrans - number of adaptive retransmission for RoCE traffic. * roce_adp_retrans_to - number of times RoCE traffic reached time out due to adaptive retransmission. * roce_slow_restart - number of times RoCE slow restart was used. * roce_slow_restart_cnps - number of times RoCE slow restart generate CNP packets. * roce_slow_restart_trans - number of times RoCE slow restart change state to slow restart. Link: https://lore.kernel.org/r/20200115145459.83280-3-leon@kernel.org Signed-off-by: Avihai Horon Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6b64a650f0b2ae3940698f401732988699eecf7a Author: Siddhesh Poyarekar Date: Mon Jan 13 22:11:58 2020 +0530 kselftest: Minimise dependency of get_size on C library interfaces It was observed[1] on arm64 that __builtin_strlen led to an infinite loop in the get_size selftest. This is because __builtin_strlen (and other builtins) may sometimes result in a call to the C library function. The C library implementation of strlen uses an IFUNC resolver to load the most efficient strlen implementation for the underlying machine and hence has a PLT indirection even for static binaries. Because this binary avoids the C library startup routines, the PLT initialization never happens and hence the program gets stuck in an infinite loop. On x86_64 the __builtin_strlen just happens to expand inline and avoid the call but that is not always guaranteed. Further, while testing on x86_64 (Fedora 31), it was observed that the test also failed with a segfault inside write() because the generated code for the write function in glibc seems to access TLS before the syscall (probably due to the cancellation point check) and fails because TLS is not initialised. To mitigate these problems, this patch reduces the interface with the C library to just the syscall function. The syscall function still sets errno on failure, which is undesirable but for now it only affects cases where syscalls fail. [1] https://bugs.linaro.org/show_bug.cgi?id=5479 Signed-off-by: Siddhesh Poyarekar Reported-by: Masami Hiramatsu Tested-by: Masami Hiramatsu Reviewed-by: Tim Bird Signed-off-by: Shuah Khan commit e1dae517a0f5a182625204ff4eb0b6aefc5bc74d Author: Miroslav Benes Date: Mon Jan 13 13:49:07 2020 +0100 selftests/livepatch: Remove unused local variable in set_ftrace_enabled() set_ftrace_enabled() contains unused local variable "sysctl". Remove it. Signed-off-by: Miroslav Benes Reviewed-by: Kamalesh Babulal Signed-off-by: Shuah Khan commit b54c82e9196ff4d8fb3ec5342e419cab6b710352 Author: Miroslav Benes Date: Mon Jan 13 13:49:06 2020 +0100 selftests/livepatch: Replace set_dynamic_debug() with setup_config() in README Commit 35c9e74cff4c ("selftests/livepatch: Make dynamic debug setup and restore generic") introduced setup_config() to set up the environment for each test. It superseded set_dynamic_debug(). README still mentions set_dynamic_debug(), so update it to setup_config() which should be used now in every test. Signed-off-by: Miroslav Benes Reviewed-by: Kamalesh Babulal Signed-off-by: Shuah Khan commit 270f104ba26f0498aff85e5b002e2f4c2249c04b Author: Jérôme Pouiller Date: Wed Jan 15 13:55:38 2020 +0000 staging: wfx: update TODO Some work has been done :) Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-66-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 240503a6e3629e0d32e1b93c648fabb5b37e9122 Author: Jérôme Pouiller Date: Wed Jan 15 13:55:37 2020 +0000 staging: wfx: simplify hif_multi_tx_confirm() Usage of the "buf_loc" variable does not simplify the function. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-65-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 2f5fd8b07745838e590b61d5b136be8b9f94cc4c Author: Jérôme Pouiller Date: Wed Jan 15 13:55:35 2020 +0000 staging: wfx: simplify wfx_tx_queue_get_num_queued() wfx_tx_queue_get_num_queued() can take advantage of BIT() instead of maintaining one variable for a counter and another for a mask. In add, wfx_tx_queue_get_num_queued() has no real reason to return a size_t instead of an int. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-64-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 5244357961a422100b73a9da423532578579324a Author: Jérôme Pouiller Date: Wed Jan 15 13:55:34 2020 +0000 staging: wfx: simplify hif_handle_tx_data() Since enum action has now only two cases, it can be dropped. Then hif_handle_tx_data() can be simplified. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-63-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 7bc71e80bdaf623712352f25fba97a80716d7644 Author: Jérôme Pouiller Date: Wed Jan 15 13:55:31 2020 +0000 staging: wfx: remove check for interface state Obviously, the value of wvif->state as no reason to be wrong. At least, if it the case, dropping the frame is probably not the bast thing to do. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-62-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 1b72dee6f8764dc9fb869a6f7de2901b647646a0 Author: Jérôme Pouiller Date: Wed Jan 15 13:55:30 2020 +0000 staging: wfx: remove unused do_probe The identifier do_probe is unused since "staging: wfx: remove workaround to send probe requests" Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-61-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 1b38e0d042c87389209596cae91271f47ad72499 Author: Jérôme Pouiller Date: Wed Jan 15 13:55:28 2020 +0000 staging: wfx: ensure that packet_id is unique In current code, packet_id is derivated from mac802.11 packet sequence number, but this number is only unique for a station. It is not sufficient. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-60-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit ded6ca11af6bb0394a3c684b4c2e39c928ca4738 Author: Jérôme Pouiller Date: Wed Jan 15 13:55:27 2020 +0000 staging: wfx: simplify wfx_ps_notify_sta() wfx_ps_notify_sta() is too complex compared to the task it do. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-59-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit a3c529a835890b0eecd324d9f0c37c67345f84e2 Author: Jérôme Pouiller Date: Wed Jan 15 13:55:25 2020 +0000 staging: wfx: simplify handling of IEEE80211_TX_CTL_SEND_AFTER_DTIM When mac80211 ask for a frame to be sent after a DTIM, driver should: 1. Update TIM with multicast bit set (using update_ie). This function can be called whenever. 2. Keep buffered all frames marked "after dtim" 3. When it receive a suspend_resume indication (see wfx_suspend_resume_mc()), send all the buffered frames. This indication is sent by the firmware 4ms before the dtim. 4. If one of the frames returns status "REQUEUE", it means that the DTIM period was ended before to be able to send the frame. 5. When all the buffered frames were sent or if DTIM period was ended, driver should update the TIM with multicast bit reset. All the mess with the asynchronous works can be dropped. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-58-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 22c03264e5a914966c93baa367d63eb77f60ebaf Author: Jérôme Pouiller Date: Wed Jan 15 13:55:24 2020 +0000 staging: wfx: simplify wfx_suspend_resume_mc() Indeed, it is not necessary to pass whole hif_ind_suspend_resume_tx to wfx_suspend_resume_mc(). In add, the structure hif_ind_suspend_resume_tx come from hardware API. It is not intended to be manipulated in upper layers of the driver. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-57-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit b5d4d98ec807a248e41ed7e8a3a649b8d88a745c Author: Jérôme Pouiller Date: Wed Jan 15 13:55:22 2020 +0000 staging: wfx: firmware never return PS status for stations At the beginning, firmware could send suspend_resume indication to notify that a station wake up or sleep down. However, mac80211 already handles power save status of stations and this behavior has been removed from the firmware. So now, when suspend_resume indication is received, it is always to notify that a DTIM is about to be sent. So, it is possible to simply wfx_suspend_resume(). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-56-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 6537adc3e3076e9dc522d827ec412812f633ec7e Author: Jérôme Pouiller Date: Wed Jan 15 13:55:21 2020 +0000 staging: wfx: sta and dtim wfx_ps_notify() is called for any changes in the TIM. However, association ID 0 is a very special case that should be handled independently. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-55-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 2e57865e79cfe82afcefff553300bb0eea07c1c2 Author: Jérôme Pouiller Date: Wed Jan 15 13:55:19 2020 +0000 staging: wfx: pspoll_mask make no sense pspoll_mask is here to send data buffered in driver. But since station is marked buffered, TIM for this station is 1 and mac80211 will call sta_notify when a ps-poll is received. So pspoll_mask is useless and sta_alseep_mask is sufficient. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-54-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit df3519a328aafbde521e6011ebb254853a98cfa5 Author: Jérôme Pouiller Date: Wed Jan 15 13:55:18 2020 +0000 staging: wfx: replace wfx_tx_get_tid() with ieee80211_get_tid() wfx_tx_get_tid() was used as a wrapper around ieee80211_get_tid(). It did sometime return WFX_MAX_TID to ask to upper layers to not include the frame in "buffered" counter. The objective of this behavior is not clear, but tests has shown that wfx_tx_get_tid() can be replaced by ieee80211_get_tid() without any regressions. BTW, it is not necessary to save the tid in tx_rpiv since it can be retrieved from the 802.11 header. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-53-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 98511a91b126901e1392e1a6cf51ef94dc094f89 Author: Jérôme Pouiller Date: Wed Jan 15 13:55:16 2020 +0000 staging: wfx: check that no tx is pending before release sta Just for sanity. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-52-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit d6aeba575f277104a95125584981d37c8f7cf762 Author: Jérôme Pouiller Date: Wed Jan 15 13:55:15 2020 +0000 staging: wfx: simplify the link-id allocation The "link-id" is a slot number provided to the chip. A link-id is allocated to every station associated with the chip (mainly when the chip is in AP mode). It is more or less the same thing than the association ID, but it is limited to 14 values. Firmware uses the link-id to track the power save status of the stations. The current code try to associate a link-id as soon as data are exchanged with station. It is far easier to rely on sta_add() and sta_remove(). Until now the value WFX_LINK_ID_NO_ASSOC, was only used when no more link-id was available. Now, we also use this value for not-yet-associated stations (that was its primary behavior). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-51-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 36cbb5d2a7db063879fc92e8496db9c0b7f84d7d Author: Jérôme Pouiller Date: Wed Jan 15 13:55:13 2020 +0000 staging: wfx: simplify wfx_set_tim_impl() Argument provided to wfx_set_tim_impl() is always wvif->aid0_bit_set and there is no reason to provide another argument. Also rename wfx_set_tim_impl() into wfx_update_tim() to reflect the new behavior. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-50-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit d00149011066bde86cd56c64b77616c40a4f83af Author: Jérôme Pouiller Date: Wed Jan 15 13:55:12 2020 +0000 staging: wfx: fix RCU usage Indeed, sta was used after call to rcu_unlock() Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-49-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 76b5c2ce468fc7fa5f4daf727bbefa6f8a2d7a02 Author: Jérôme Pouiller Date: Wed Jan 15 13:55:10 2020 +0000 staging: wfx: fix bss_loss wfx_tx_confirm_cb() retrieves the station associated with a frame using the MAC address from the 802.11 header. In the other side wfx_tx() retrieves the station using sta field from the ieee80211_tx_control argument. In wfx_cqm_bssloss_sm(), wfx_tx() was called directly without valid sta field, but with a valid MAC address in 802.11 header. So there the processing of this packet was unbalanced and may produce weird bugs. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-48-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 7d2d2bfdeb82c383f5cd8b93b1c234249c1a588c Author: Jérôme Pouiller Date: Wed Jan 15 13:55:09 2020 +0000 staging: wfx: relocate "buffered" information to sta_priv It simplify the code if field buffered is hosted in the struct sta_priv instead of in the struct wfx_link_entry. More globally, struct wfx_link_entry has no real reasons to exist and should be dropped soon. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-47-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 79d5fecc9be29b3159d9d6204082080922e8419f Author: Jérôme Pouiller Date: Wed Jan 15 13:55:08 2020 +0000 staging: wfx: remove handling of "early_data" It seems that purpose of "early_data" was to prevent sending data to mac80211 before station was completely associated. It is a useless precaution. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-46-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit def39be019b6494acd3570ce6f3f11ba1c3203a3 Author: Jérôme Pouiller Date: Wed Jan 15 13:55:06 2020 +0000 staging: wfx: fix possible overflow on jiffies comparaison MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is recommended to use function time_*() to compare jiffies. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-45-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 4e1514c940fc64e7fb922a9390742f8e28a460ae Author: Jérôme Pouiller Date: Wed Jan 15 13:55:05 2020 +0000 staging: wfx: fix case where RTS threshold is 0 If RTS threshold is 0, it currently disables RTS. It should mean "enabled for every frames". Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-44-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 9b90910f5bf4d6c76bbd55fcda5baa0ff015060b Author: Jérôme Pouiller Date: Wed Jan 15 13:55:03 2020 +0000 staging: wfx: do not update uapsd if not necessary wfx_conf_tx() is called for each queue. On every call, the function updates UAPSD mask and PM mode for all queues. It is a pity since the UAPSD configuration very rarely changes and it makes exchanges between the host and the chip more difficult to track. This patch avoid to update UAPSD and Power Mode in most usual cases. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-43-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit f98138a16f854889ef8f583c704d46d5b46161ab Author: Jérôme Pouiller Date: Wed Jan 15 13:55:02 2020 +0000 staging: wfx: with multiple vifs, force PS only if channels differs When multiple vif are in use (the only supported configuration is one station and one AP), the driver force power save flag on station. This behavior allows the station to leave the station channel and make its business on AP channel. However, this has a big impact on station performances (especially since only legacy PS is supported). When both vifs use the same channel, it is not necessary to keep this restriction. This greatly improve station performances. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-42-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 8d97a12fa4d25f72394201ec840d9231b76b101f Author: Jérôme Pouiller Date: Wed Jan 15 13:55:01 2020 +0000 staging: wfx: update power-save per interface mac80211 and the device are both able to control power-save per vif. But, the current code retrieve power-save from wfx_config(). So, it does not allow to setup power-save independently for each vif. Driver just has to rely on wfx_bss_info_changed() instead of wfx_config(). wfx_config() has nothing to do anymore, but we keep it since it is mandatory for mac80211. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-41-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 7f091d319eb54adc597cdb8db906d5835a611665 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:59 2020 +0000 staging: wfx: simplify wfx_scan_complete() wfx_scan_complete() do nothing with argument hif_ind_scan_cmpl. In add, hif_ind_scan_cmpl come from hardware API and is not expected to be used with upper layers of the driver. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-40-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit fd5d78bdf7527bb4c8739dc7d56b5b9a669d592b Author: Jérôme Pouiller Date: Wed Jan 15 13:54:58 2020 +0000 staging: wfx: simplify wfx_update_filtering() wfx_update_filtering() has no reason to instantiate a struct hif_mib_bcn_filter_enable. Drop it and simplify the code. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-39-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 0b58486e153c12845b1f55e0ac458a2cd777ffb5 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:56 2020 +0000 staging: wfx: simplify wfx_set_mcast_filter() HIF functions return only serious errors (OOM or device freeze). The current handling of errors in wfx_set_mcast_filter() does not bring anything. Finally it may disturb the developer more than it helps. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-38-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit db94907110eae5977015e3f12e71d3c07f0f3dcc Author: Jérôme Pouiller Date: Wed Jan 15 13:54:55 2020 +0000 staging: wfx: simplify hif_set_config_data_filter() The structure hif_mib_config_data_filter come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, current code for hif_set_config_data_filter() is too dumb. It should pack data with hardware representation instead of leaving all work to the caller. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-37-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit a077126a20a49117903596ceccf0f21ed16b5841 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:54 2020 +0000 staging: wfx: simplify hif_set_mac_addr_condition() The structure hif_mib_mac_addr_data_frame_condition come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, current code for hif_set_mac_addr_condition() is too dumb. It should pack data with hardware representation instead of leaving all work to the caller. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-36-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit c47b70e2c5918fab8d100915b68ada8828563a62 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:52 2020 +0000 staging: wfx: simplify hif_set_data_filtering() The structure hif_mib_set_data_filtering come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, current code for hif_set_data_filtering() is too dumb. It should pack data with hardware representation instead of leaving all work to the caller. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-35-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 3f5264e75c7bd332f38c8bc0f903771336fba44d Author: Jérôme Pouiller Date: Wed Jan 15 13:54:51 2020 +0000 staging: wfx: simplify hif_mib_set_data_filtering The field "default_filter" was not obvious. In add, explicitly declare that fields default_filter and enable are booleans. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-34-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit f5864a1076d1a5f3c7d297ab79bfabaa69af3e41 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:49 2020 +0000 staging: wfx: simplify hif_mib_uc_mc_bc_data_frame_condition The current API defines bitfields. It is not very convenient. Prefer to use bitmasks. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-33-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 46f044b965e62f07a9c1411328487bf8346dbc79 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:48 2020 +0000 staging: wfx: simplify hif_set_uc_mc_bc_condition() The structure hif_mib_uc_mc_bc_data_frame_condition come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, current code for hif_set_uc_mc_bc_condition() is too dumb. It should pack data with hardware representation instead of leaving all work to the caller. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-32-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit a8ec12d419af85c8225222ae19b26ea9c8fd6980 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:46 2020 +0000 staging: wfx: simplify hif_set_association_mode() The structure hif_mib_set_association_mode come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, current code for hif_set_association_mode() is too dumb. It should pack data with hardware representation instead of leaving all work to the caller. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-31-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 9ced9b593741d0472dd1168ca87ca7186e3257f4 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:44 2020 +0000 staging: wfx: simplify hif_join() The structure hif_req_join come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, current code for hif_join() is too dumb. It should pack data with hardware representation instead of leaving all work to the caller. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-30-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit a09343fc354d45973614e1120f15b5e03db8f972 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:43 2020 +0000 staging: wfx: simplify hif_update_ie() hif_update_ie() is only called to change the beacon template. So, specialize this function and simplify the way to call it. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-29-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit d1072b04f57e0e3a8a6d164dd03b4cc42711ea05 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:41 2020 +0000 staging: wfx: SSID should be provided to hif_start() even if hidden SSID is hidden in beacon but firmware has to know to which probe requests it has to answer. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-28-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit deb7734ea984ec6909f4dc86b4707f91301c9ddc Author: Jérôme Pouiller Date: Wed Jan 15 13:54:40 2020 +0000 staging: wfx: drop wfx_set_cts_work() wfx_bss_info_changed() is not called from atomic contexts. So, it is not necessary to raise an asynchronous work to change ERP. Thus wfx_set_cts_work() become useless. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-27-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 963aff5728a0295fe90146289c2a9251024575a4 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:38 2020 +0000 staging: wfx: drop wvif->setbssparams_done setbssparams_done was here to ensure that the firmware does not enable powersave before to get the first beacon. However, mac80211 already ensures it gets a beacon before to associate to the BSS. And even, if it won't, the firmware wake up at least on every DTIM, which is sufficient to finalize the association. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-26-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit ba366b9268263f7f86cf8e53e00bda84e238d29b Author: Jérôme Pouiller Date: Wed Jan 15 13:54:37 2020 +0000 staging: wfx: drop wvif->cqm_rssi_thold Current code keeps a copy of bss_conf->cqm_rssi_thold in wfx_vif. There is no sane reason for that. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-25-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 9d443ffc588bbee103eddecd6b1994cf7d0b0ee8 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:35 2020 +0000 staging: wfx: drop wvif->enable_beacon It seems that current code try to save calls to hif_beacon_transmit() by keeping a copy of the previous value of bss_conf->enable_beacon. However, hif_beacon_transmit() does not cost so much and mac80211 already take care to not send useless events. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-24-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 249802e8e226b869ad065bc56811410f83cbfcd6 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:34 2020 +0000 staging: wfx: drop wvif->dtim_period It is not necessary to keep a copy of dtim_period in wfx_vif. Prefer to just rely on bss_conf->dtim_period. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-23-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit b0674e0675520beeca7a52ae7e610d751996e8ed Author: Jérôme Pouiller Date: Wed Jan 15 13:54:32 2020 +0000 staging: wfx: simplify update of DTIM period Current code parse the TIM and retrieve the DTIM period. It is far easier to rely on bss_info_changed() for this job. It is no more necessary to run task asynchronously. So set_beacon_wakeup_period_work is now useless. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-22-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 50a4fb47e9ac5853e7143367b2877e348ca86ced Author: Jérôme Pouiller Date: Wed Jan 15 13:54:30 2020 +0000 staging: wfx: simplify wfx_flush() Current code of wfx_flush() force to drop packets in some contexts. However, there is no obvious reasons to do that. It looks like a workaround for a bug with the old implementation of __wfx_flush(). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-21-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 044df863c98d4d4be6306f3251a9397f22418946 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:29 2020 +0000 staging: wfx: fix __wfx_flush() when drop == false wfx_tx_queues_clear() only clear not yet sent requests. So, it always necessary to wait for tx_queue_stats.wait_link_id_empty whatever the value of "drop" argument. In add, it is not necessary to return with tx queue locked since all calls to __wfx_flush() unlock the tx queue just after the call to __wfx_tx_flush(). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-20-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 0b2b0595cec64f89814cd1e5fbcbc36e7540443d Author: Jérôme Pouiller Date: Wed Jan 15 13:54:27 2020 +0000 staging: wfx: simplify wfx_update_beaconing() Remove most of indentation of wfx_update_beaconing() by reworking the error handling. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-19-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 305f710995f72a752154c22cf1f5814e661be376 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:26 2020 +0000 staging: wfx: simplify wfx_upload_ap_templates() This function built probe response from data retrieved in beacon. Yet, this job can be done with ieee80211_proberesp_get(). So, we can simplify that code (and fix bugs like inclusion of TIM in probe responses). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-18-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit d8a92d918612fca365d5b3ed75fc9e41090366ed Author: Jérôme Pouiller Date: Wed Jan 15 13:54:24 2020 +0000 staging: wfx: rename wfx_upload_beacon() In fact, wfx_upload_beacon() uploads beacon and probe response. So, rename it in wfx_upload_ap_templates(). The call to wfx_fwd_probe_req() has nothing to do with template uploading, so relocate it. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-17-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 9bf7ad8c93cede3f58d0bfd4b869790401ca6d73 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:23 2020 +0000 staging: wfx: simplify wfx_config() Now that wfx_config() only handles IEEE80211_CONF_CHANGE_PS, it can be simplified. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-16-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit f050f3dac6686903f001862cc7b67bd2dcaeaea1 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:21 2020 +0000 staging: wfx: drop wdev->output_power mac80211 and the device are both able to control tx power per vif. But, the current code retrieve tx power from wfx_config(). So, it does not allow to setup the tx power independently for each vif. Driver just has to rely on bss_conf->txpower to get the correct information. In add, it is no more necessary to protect access to wdev->output_power with scan_lock. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-15-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 811ed3e2aba3ca6d99b13704a406e518efa832d1 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:20 2020 +0000 staging: wfx: drop struct wfx_ht_info This struct is no more used. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-14-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 08dced7f7fe921a3880fd799583a5a85c348b85d Author: Jérôme Pouiller Date: Wed Jan 15 13:54:19 2020 +0000 staging: wfx: retrieve greenfield mode from sta->ht_cap and bss_conf wvif->ht_info contains useless copies of sta->ht_cap and bss_conf->ht_operation_mode. Prefer to retrieve information from the original structs instead of rely on wvif->ht_info. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-13-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit c08ffbf7c02bddedda9e2945a9934e2651436706 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:17 2020 +0000 staging: wfx: retrieve ampdu_density from sta->ht_cap wvif->ht_info.ht_cap is a useless copy of sta->ht_cap. It makes no sense to rely on it. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-12-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit dfa45cb4bda4af22a25f7a58063d16997730a3b2 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:16 2020 +0000 staging: wfx: use specialized structs for HIF arguments Most of the commands that are sent to device should take struct in argument. In the current code, when this struct is binary compatible with a __le32, the driver use a __le32. This behavior is error prone. This patch fixes that and uses the specialized structs instead. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-11-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 09779276f1baea08985e08587319c8fed806b020 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:14 2020 +0000 staging: wfx: simplify hif_start() usage The structure hif_req_start come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, current code for hif_start() is too dumb. It should pack data with hardware representation instead of leaving all work to the caller. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-10-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit e52e68eee7d0a6731d2f8d9234ba3ab226f392dd Author: Jérôme Pouiller Date: Wed Jan 15 13:54:13 2020 +0000 staging: wfx: simplify hif_set_arp_ipv4_filter() usage The structure hif_mib_arp_ip_addr_table come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, current code for hif_set_arp_ipv4_filter() is too dumb. It should pack data using the hardware representation instead of leaving all work to the caller. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-9-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 9ed8b0d0f27cf7ba183d8e8e7c5cc47afb7a00ae Author: Jérôme Pouiller Date: Wed Jan 15 13:54:12 2020 +0000 staging: wfx: simplify hif_set_rcpi_rssi_threshold() usage The structure hif_mib_rcpi_rssi_threshold come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, current code for hif_set_rcpi_rssi_threshold() is dumb. It should pack data using the hardware representation instead of leaving all work to the caller. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-8-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 5fd64673cf6e2ca08447a77de3d2fe7e73d54915 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:10 2020 +0000 staging: wfx: simplify hif_set_output_power() usage Hardware API use 10th of dBm for output power unit. Upper layers should use same units than mac80211 and the conversion should be done by low level layer of the driver (hif_set_output_power()) In add, current code of hif_set_output_power() use a __le32 while the device API specify a specific structure for this. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-7-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit c360f1ccdcf9532a8d8cee0f0976b28b6cb4e35b Author: Jérôme Pouiller Date: Wed Jan 15 13:54:09 2020 +0000 staging: wfx: simplify hif_set_tx_rate_retry_policy() usage The structure hif_mib_set_tx_rate_retry_policy come from hardware API. It is not intended to be manipulated in upper layers of the driver. So, this patch relocate handling of this structure to hif_set_tx_rate_retry_policy() (the low level function). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 9ab564653abb9dade6ca8530a3e3a2f622dcd7f5 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:07 2020 +0000 staging: wfx: send rate policies one by one Rate policies (aka. tx_rate_retry_policy in hardware API) are sent to device asynchronously from tx requests. So, the device maintains a list of active rate policies and the tx requests only reference an existent rate policy. The device API allows to send multiple rate policies at once. However, this property is very rarely used. We prefer to send rate policies one by one and simplify the architecture. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 1e30e3c5a4c0781e10e2d6d7753e7da459b118f8 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:06 2020 +0000 staging: wfx: add missing PROBE_RESP_OFFLOAD feature Some userspace tools (hostapd) rely on probe_resp_offload fields for certain features. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 99aa34a62bce1366aa0b856ba9262e19072a1faf Author: Jérôme Pouiller Date: Wed Jan 15 13:54:05 2020 +0000 staging: wfx: make hif_scan() usage clearer hif_scan() return max number of jiffies to wait before the completion indication. However, if this value is negative, an error has occurred. Reword the code to reflect that behavior. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 8b08b6a8c31f18c3657405410e4c3f6bc4fa75f1 Author: Jérôme Pouiller Date: Wed Jan 15 13:54:03 2020 +0000 staging: wfx: revert unexpected change in debugfs output It appears that commit 8c7128c4cf4e ("staging: align to fix warnings of line over 80 characters") do slightly more than what is explained in commit log. Especially, it changes the output of the file rx_stats from debugfs. From some point of view, this file can be considered as a part of the API. Any change on it should be clearly announced. Since the change introduced does not seems to have any justification, revert it. Reported-by: Pascal Prime Cc: Jules Irenge Fixes: 8c7128c4cf4e ("staging: align to fix warnings of line over 80 characters") Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200115135338.14374-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 40ce9798794f972961b5a1c54773ae3daf42cf29 Author: Anirudh Ghayal Date: Thu Jan 16 16:11:00 2020 +0000 nvmem: add QTI SDAM driver QTI SDAM driver allows PMIC peripherals to access the shared memory that is available on QTI PMICs. Use subsys_initcall as PMIC SDAM NV memory is accessed by multiple PMIC drivers (charger, fuel gauge) to store/restore data across reboots required during their initialization. Signed-off-by: Anirudh Ghayal Signed-off-by: Shyam Kumar Thella Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200116161100.30637-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9664a6b54c57c920e345a621f42d1eb006a7fb73 Author: Shyam Kumar Thella Date: Thu Jan 16 16:10:59 2020 +0000 dt-bindings: nvmem: add binding for QTI SPMI SDAM QTI SDAM allows PMIC peripherals to access the shared memory that is available on QTI PMICs. Add documentation for it. Signed-off-by: Shyam Kumar Thella Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200116161100.30637-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4ad3ad18990d6f6ceabce04ca830cd2607473b84 Author: Anson Huang Date: Thu Jan 16 16:10:58 2020 +0000 dt-bindings: imx-ocotp: Add i.MX8MP compatible Add compatible and description for i.MX8MP. Signed-off-by: Anson Huang Acked-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200116161100.30637-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 532c29190795178bb02d2671b5e8a288c16a4649 Author: Masahiro Yamada Date: Thu Jan 16 01:44:51 2020 +0900 staging: most: remove header include path to drivers/staging There is no need to add "ccflags-y += -I $(srctree)/drivers/staging" just for including . Use the #include "..." directive with the correct relative path. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20200115164451.13203-1-masahiroy@kernel.org Signed-off-by: Greg Kroah-Hartman commit d6de0bb1850f6fcefd4f9fed2de69c0915a2c8a9 Author: Michael Guralnik Date: Wed Jan 8 20:05:40 2020 +0200 RDMA/mlx5: Set relaxed ordering when requested Enable relaxed ordering in the mkey context when requested. As relaxed ordering is not currently supported in UMR, disable UMR usage for relaxed ordering MRs. Link: https://lore.kernel.org/r/1578506740-22188-11-git-send-email-yishaih@mellanox.com Signed-off-by: Michael Guralnik Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit 811646998e3e64af19524c8e99b790a4043c5f9b Author: Michael Guralnik Date: Wed Jan 8 20:05:39 2020 +0200 RDMA/core: Add the core support field to METHOD_GET_CONTEXT Add the core support field to METHOD_GET_CONTEXT, this field should represent capabilities that are not device-specific. Return support for optional access flags for memory regions. User-space will use this capability to mask the optional access flags for unsupporting kernels. Link: https://lore.kernel.org/r/1578506740-22188-10-git-send-email-yishaih@mellanox.com Signed-off-by: Michael Guralnik Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit 2233c6609c11146ed1a26eec2e4335131077a608 Author: Michael Guralnik Date: Wed Jan 8 20:05:38 2020 +0200 RDMA/uverbs: Add new relaxed ordering memory region access flag Add a new relaxed ordering access flag for memory regions. Using memory regions with relaxed ordeing set can enhance performance. This access flag is handled in a best-effort manner, drivers should ignore if they don't support setting relaxed ordering. Link: https://lore.kernel.org/r/1578506740-22188-9-git-send-email-yishaih@mellanox.com Signed-off-by: Michael Guralnik Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit 86dd738cf20cee4ac316274743e5707c4ccb6039 Author: Michael Guralnik Date: Wed Jan 8 20:05:37 2020 +0200 RDMA/efa: Allow passing of optional access flags for MR registration As part of adding a range of optional access flags that drivers need to be able to accept, mask this range inside efa driver. This will prevent the driver from failing when an access flag from that range is passed. Link: https://lore.kernel.org/r/1578506740-22188-8-git-send-email-yishaih@mellanox.com Signed-off-by: Michael Guralnik Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit 68d384b906cfc850b65561fd846adbb8b406d9e5 Author: Michael Guralnik Date: Wed Jan 8 20:05:36 2020 +0200 RDMA/core: Add optional access flags range Define a range of access flags that are defined to be optional, both uverbs and drivers should enable getting them and use if they are applicable This will be used, for example, for the relaxed ordering access flag which unsupporting drivers can ignore. Link: https://lore.kernel.org/r/1578506740-22188-7-git-send-email-yishaih@mellanox.com Signed-off-by: Michael Guralnik Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit ca95c1411198c2d87217c19d44571052cdc94725 Author: Michael Guralnik Date: Wed Jan 8 20:05:35 2020 +0200 RDMA/uverbs: Verify MR access flags Verify that MR access flags that are passed from user are all supported ones, otherwise an error is returned. Fixes: 4fca03778351 ("IB/uverbs: Move ib_access_flags and ib_read_counters_flags to uapi") Link: https://lore.kernel.org/r/1578506740-22188-6-git-send-email-yishaih@mellanox.com Signed-off-by: Michael Guralnik Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit a1123418ba1078037d9fecb72573ff7222dfe201 Author: Jason Gunthorpe Date: Wed Jan 8 20:05:34 2020 +0200 RDMA/uverbs: Add ioctl command to get a device context Allow future extensions of the get context command through the uverbs ioctl kabi. Unlike the uverbs version this does not return an async_fd as well, that has to be done with another command. Link: https://lore.kernel.org/r/1578506740-22188-5-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit da57db25677f8566a354b0d0e4973a0fdcabcf84 Author: Jason Gunthorpe Date: Wed Jan 8 20:05:33 2020 +0200 RDMA/core: Remove ucontext_lock from the uverbs_destry_ufile_hw() path This lock only serializes ucontext creation. Instead of checking the ucontext_lock during destruction hold the existing hw_destroy_rwsem during creation, which is the standard pattern for object creation. The simplification of locking is needed for the next patch. Link: https://lore.kernel.org/r/1578506740-22188-4-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit d680e88e2013186e696665cbf2056fb32b781e41 Author: Jason Gunthorpe Date: Wed Jan 8 20:05:32 2020 +0200 RDMA/core: Add UVERBS_METHOD_ASYNC_EVENT_ALLOC Allow the async FD to be allocated separately from the context. This is necessary to introduce the ioctl to create a context, as an ioctl should only ever create a single uobject at a time. If multiple async FDs are created then the first one is used to deliver affiliated events from any ib_uevent_object, with all subsequent ones will receive only unaffiliated events. Link: https://lore.kernel.org/r/1578506740-22188-3-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit f862308579752c75f491d6d84948d1befc29514d Merge: 0fbb37dd8299 a880a6dd8537 Author: Jason Gunthorpe Date: Thu Jan 16 15:54:22 2020 -0400 Merge branch 'mlx5-next' into rdma.git for-next From the mlx5-next branch at git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Merged due to dependencies in the next patches. * branch 'mlx5-next': net/mlx5: Expose relaxed ordering bits net/mlx5: Add RoCE accelerator counters commit 6535a39ffa88d24e7b277737e6a7405181f68710 Author: Will Deacon Date: Wed Jan 15 18:43:05 2020 +0000 Documentation: Call out example SYM_FUNC_* usage as x86-specific The example given in asm-annotations.rst to describe the constraints that a function should meet in order to be annotated with a SYM_FUNC_* macro is x86-specific, and not necessarily applicable to architectures using branch-and-link style calling conventions such as arm64. Tweak the example text to call out the x86-specific text. Cc: Mark Brown Cc: Jiri Slaby Signed-off-by: Will Deacon Link: https://lore.kernel.org/r/20200115184305.1187-1-will@kernel.org Signed-off-by: Jonathan Corbet commit a880a6dd853713e02a2804dd7ecaf39c7d3d9b18 Author: Michael Guralnik Date: Wed Jan 8 20:05:31 2020 +0200 net/mlx5: Expose relaxed ordering bits Expose relaxed ordering bits in HCA capability and mkey context structs. Signed-off-by: Yishai Hadas Signed-off-by: Michael Guralnik Signed-off-by: Leon Romanovsky commit 61f005901b73786893c36d08cd1152fb89683651 Merge: a1986433a9fd 6996e8ca8ba9 Author: Jonathan Corbet Date: Thu Jan 16 12:50:48 2020 -0700 Merge branch 'nfs' into docs-next Daniel W. S. Almeida writes: This series converts a few docs in Documentation/filesystems/nfs to RST. The docs were also moved into admin-guide because they contain information that might be useful for system administrators Most changes are related to aesthetics and presentation, i.e. the content itself remains mostly untouched. The use of markup was limited in order not to negatively impact the plain-text reading experience. commit 8fd5b75d979bd8483b7e015c85834fbc82d499ac Author: Leon Romanovsky Date: Wed Jan 15 16:54:58 2020 +0200 net/mlx5: Add RoCE accelerator counters Add RoCE accelerator definitions. Signed-off-by: Leon Romanovsky commit 6996e8ca8ba9727aac967577277c25b91f11705a Author: Daniel W. S. Almeida Date: Fri Jan 10 20:24:31 2020 -0300 Documentation: nfs: fault_injection: convert to ReST Convert fault_injection.txt to ReST and move it to admin-guide. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/f7b0cf8fb1159a668f75ce82a581e7590568c2b8.1578697871.git.dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit 98600b71f2bfc066d5dc8a25abf5fef84f8fc96c Author: Daniel W. S. Almeida Date: Fri Jan 10 20:24:30 2020 -0300 Documentation: nfs: pnfs-scsi-server: convert to ReST Convert pnfs-scsi-server to ReST and move it to admin-guide. Content remains mostly unchanged. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/5c4b8af41ca0a427a3987535815bccf47a65d320.1578697871.git.dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit 26f6225fa53dc4ad26b9d9d712c0f55a92eb2c23 Author: Daniel W. S. Almeida Date: Fri Jan 10 20:24:29 2020 -0300 Documentation: nfs: convert pnfs-block-server to ReST Convert pnfs-block-server.txt to ReST and move it to admin-guide. Content remains mostly unchanged. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/c06903760e690c16d9df92f5e75f80381d6326d8.1578697871.git.dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit fbdcd0b8e56492dd85bd8d08f15a14334bb59259 Author: Daniel W. S. Almeida Date: Fri Jan 10 20:24:28 2020 -0300 Documentation: nfs: idmapper: convert to ReST Convert idmapper.txt to ReST and move it to admin-guide. Content remains mostly unchanged otherwise. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/069e40cd551ea778538f8fe9ad15ee26e45fc748.1578697871.git.dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit 0f3456ba9fb61584a891fb5264cf09e4d5fe0741 Author: Daniel W. S. Almeida Date: Fri Jan 10 20:24:27 2020 -0300 Documentation: convert nfsd-admin-interfaces to ReST Convert nfsd-admin-interfaces to ReST and move it into admin-guide. Content remains mostly untouched. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/d471305e9c96dec38f18d2ff816fca2269a88e29.1578697871.git.dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit f8b8d030597a3b0a20e9cc2e958f82164690fbdb Author: Daniel W. S. Almeida Date: Fri Jan 10 20:24:26 2020 -0300 Documentation: nfs-rdma: convert to ReST Convert nfs-rdma to ReST and move it to admin-guide. Content remais mostly untouched. Also, mark the doc as obsolete. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/9c88f184f9de2a3eb5181563e258559efc02f58a.1578697871.git.dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit 0867fb07fa320ea254f4fc90cb609a510a2f65bb Author: Daniel W. S. Almeida Date: Fri Jan 10 20:24:25 2020 -0300 Documentation: nfsroot.rst: COSMETIC: refill a paragraph Refill a paragraph to eliminate long lines. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/58c50f6ba94a0a2f212c4d2a42f64ffb40336b68.1578697871.git.dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit f9a9349846f92b2dabd26cef1f3873e346ba8c1b Author: Daniel W. S. Almeida Date: Fri Jan 10 20:24:24 2020 -0300 Documentation: nfsroot.txt: convert to ReST Convert nfsroot.txt to RST and move it to admin-guide. Content remains mostly the same. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/442d35917351f5260dd8ed7362e9b5f1264ef8ad.1578697871.git.dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit 2f123b9a359650374712e812c0c466f75e77ba0e Author: Daniel W. S. Almeida Date: Fri Jan 10 20:24:23 2020 -0300 Documentation: convert nfs.txt to ReST This patch converts nfs.txt to RST. It also moves it to admin-guide. The reason for moving it is because this document contains information useful for system administrators, as noted on the following paragraph: 'The purpose of this document is to provide information on some of the special features of the NFS client that can be configured by system administrators'. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/cb9f2da2f2f6dd432b4cf9e05f79f74f4d54b6ab.1578697871.git.dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit cb89e2465896f30d4247ac9ff47d30522e39745a Author: Paul Moore Date: Fri Jan 10 16:32:10 2020 -0500 selinux: remove redundant allocation and helper functions This patch removes the inode, file, and superblock security blob allocation functions and moves the associated code into the respective LSM hooks. This patch also removes the inode_doinit() function as it was a trivial wrapper around inode_doinit_with_dentry() and called from one location in the code. Reviewed-by: Casey Schaufler Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit cb619e80333acc59ce9eb29d56ef6e3b749bf474 Author: Colin Ian King Date: Thu Jan 16 17:09:00 2020 +0000 power: supply: bq25890_charger: fix incorrect error return when bq25890_field_read fails Currently a read failure by bq25890_field_read on F_DEV_REV is returning an error in id instead of rev. Fix this by returning the value in rev. Addresses-Coverity: ("Copy-paste error") Fixes: d20267c9a98e ("power: supply: bq25890_charger: Add support of BQ25892 and BQ25896 chips") Signed-off-by: Colin Ian King Signed-off-by: Sebastian Reichel commit df4779b5d2732eb7550fe35249e82db1b3d4fb95 Author: Huaisheng Ye Date: Mon Jan 13 23:03:31 2020 +0800 selinux: remove redundant selinux_nlmsg_perm selinux_nlmsg_perm is used for only by selinux_netlink_send. Remove the redundant function to simplify the code. Fix a typo by suggestion from Stephen. Signed-off-by: Huaisheng Ye Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit ae3d8c2e27bf95dbd2977f247123f88955a761db Author: Ondrej Mosnacek Date: Thu Jan 16 19:45:57 2020 +0100 selinux: fix wrong buffer types in policydb.c Two places used u32 where there should have been __le32. Fixes sparse warnings: CHECK [...]/security/selinux/ss/services.c [...]/security/selinux/ss/policydb.c:2669:16: warning: incorrect type in assignment (different base types) [...]/security/selinux/ss/policydb.c:2669:16: expected unsigned int [...]/security/selinux/ss/policydb.c:2669:16: got restricted __le32 [usertype] [...]/security/selinux/ss/policydb.c:2674:24: warning: incorrect type in assignment (different base types) [...]/security/selinux/ss/policydb.c:2674:24: expected unsigned int [...]/security/selinux/ss/policydb.c:2674:24: got restricted __le32 [usertype] [...]/security/selinux/ss/policydb.c:2675:24: warning: incorrect type in assignment (different base types) [...]/security/selinux/ss/policydb.c:2675:24: expected unsigned int [...]/security/selinux/ss/policydb.c:2675:24: got restricted __le32 [usertype] [...]/security/selinux/ss/policydb.c:2676:24: warning: incorrect type in assignment (different base types) [...]/security/selinux/ss/policydb.c:2676:24: expected unsigned int [...]/security/selinux/ss/policydb.c:2676:24: got restricted __le32 [usertype] [...]/security/selinux/ss/policydb.c:2681:32: warning: incorrect type in assignment (different base types) [...]/security/selinux/ss/policydb.c:2681:32: expected unsigned int [...]/security/selinux/ss/policydb.c:2681:32: got restricted __le32 [usertype] [...]/security/selinux/ss/policydb.c:2701:16: warning: incorrect type in assignment (different base types) [...]/security/selinux/ss/policydb.c:2701:16: expected unsigned int [...]/security/selinux/ss/policydb.c:2701:16: got restricted __le32 [usertype] [...]/security/selinux/ss/policydb.c:2706:24: warning: incorrect type in assignment (different base types) [...]/security/selinux/ss/policydb.c:2706:24: expected unsigned int [...]/security/selinux/ss/policydb.c:2706:24: got restricted __le32 [usertype] [...]/security/selinux/ss/policydb.c:2707:24: warning: incorrect type in assignment (different base types) [...]/security/selinux/ss/policydb.c:2707:24: expected unsigned int [...]/security/selinux/ss/policydb.c:2707:24: got restricted __le32 [usertype] Signed-off-by: Ondrej Mosnacek Reviewed-by: Stephen Smalley Signed-off-by: Paul Moore commit 31635887cb8d899584484620b597e401b2350a79 Author: Wenjing Liu Date: Mon Dec 23 16:05:05 2019 -0500 drm/amd/display: skip opp blank or unblank if test pattern enabled [why] DPG is used to generate both blank and test automation test pattern. When test automation is running the requested test pattern can be overriden by the blank or unblank call because it is using the same hardware. [how] When test pattern is requested, skip blank or unblank. Signed-off-by: Wenjing Liu Reviewed-by: Nikola Cornij Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit f7ce7d617033248428db49879b0d20595c46d4e6 Author: Aric Cyr Date: Mon Jan 6 00:25:33 2020 -0500 drm/amd/display: 3.2.68 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ffdaeb1f45ee4414e7ecc2b841bea18bec35d1c0 Author: Paul Hsieh Date: Fri Dec 27 11:35:33 2019 +0800 drm/amd/display: reallocate MST payload when link loss [Why] Try to allocate MST payload but receive HPD short pulse with link loss casue driver allocate payload twice. It cause monitor can't light up successfully. [How] When driver receive HPD short pulse with link loss, we need to deallocate payload then allocate payload. Then we will not allocate payload twice with same sink. Signed-off-by: Paul Hsieh Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 34ad0230062c39cdcba564d16d122c0fb467a7d6 Author: Jun Lei Date: Wed Dec 18 14:40:56 2019 -0500 drm/amd/display: fixup DML dependencies [why] Need to fix DML portability issues to enable SW unit testing around DML [how] Move calcs into dc include folder since multiple components reference it Remove relative paths to external dependencies Signed-off-by: Jun Lei Reviewed-by: Anthony Koo Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 38259bacd727a2a9e0c767bc6bc50ebb61501023 Author: Martin Tsai Date: Thu Dec 26 16:19:47 2019 +0800 drm/amd/display: Use mdelay to avoid context switch [why] The rapid msleep operation causes the white line garbage when DAL check flip pending status in SetVidPnSourceVisibility. To execute this msleep will induce context switch, and longer delay could cause worse garbage situation. [how] To replace msleep with mdelay. Signed-off-by: Martin Tsai Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit bae9c49bf0703ecb214e84f889e84fe447e4eda9 Author: Yongqiang Sun Date: Wed Dec 18 15:01:17 2019 -0500 drm/amd/display: Only program surface flip for video plane via dmcub Only need to do surface flip for video plane via dmcub. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 9f21f3792ffb669623cbad8b084f75aa49c98786 Author: Alvin Lee Date: Mon Dec 30 14:29:06 2019 -0500 drm/amd/display: Enable double buffer for OTG_BLANK [Why] Currently if seamless boot is enabled, we will skip double buffer enable for OTG_BLANK. However, we need the double buffer enable in order to block global sync signals when OTG becomes blanked (for PSR). Blocking global sync signals prevent pipe from requesting data. [How] Move tg_init before seamless boot check. Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8547058b17f1f4fba10f389191dd7e08bf95b791 Author: Lewis Huang Date: Tue Dec 24 09:50:21 2019 +0800 drm/amd/display: Add monitor patch for AUO dpcd issue [Why] dpcd cap mismatch in 2200 vs base [How] Add monitor patch which using based caps to overwrite 2200 Signed-off-by: Lewis Huang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4134aaa11bd9c3e65ec07a1fcd59f57d4c58c434 Author: Wenjing Liu Date: Tue Dec 17 12:38:54 2019 -0500 drm/amd/display: wait for test pattern after when all pipes are programmed [why] Currently we wait for test pattern after each pipe is programmed. For ODM combined scenario it will cause test pattern is shown on only half screen for 1 frame. This is not desirable. [how] No wait between odm pipe programming, only wait after all pipes are programmed. Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5b5abe9526073ccbf3032d27b5864520829cdd9c Author: Anthony Koo Date: Mon Dec 9 17:26:34 2019 -0500 drm/amd/display: make PSR static screen entry within 30 ms [Why] With different refresh rate panels, the PSR entry/exit time is different since it is dependent on 2 frame entry time today [How] Make static screen num frame entry time to be calculated such that entry time is within 30 ms instead of fixed num frames. Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Aric Cyr Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 9a25e13b91f1e7e11dfb3e3f617a1fbf5c5e9608 Author: Aric Cyr Date: Mon Dec 23 01:07:49 2019 -0500 drm/amd/display: 3.2.67 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 6e0ca5ca83bef235778cbf16af37f58b93650dd6 Author: Lewis Huang Date: Fri Dec 20 14:17:54 2019 +0800 drm/amd/display: remove psr state condition when psr exit case [Why] DMCU need to wait a vblank to handle psr enter command. When psr exit coming before vblank, the psr exit command will be skip because current psr state is disable. [How] remove psr state condition when psr exit case Signed-off-by: Lewis Huang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 38a20a458080b6ecb071f33908e0eb4851ee7f19 Author: Josip Pavic Date: Wed Dec 18 17:37:43 2019 -0500 drm/amd/display: implement fw-driver interface for abm 2.4 [Why] IRAM definition needed for versions of DMCU containing ABM 2.4 [How] Pass ABM 2.3 IRAM definition, which is compatible with ABM 2.4, to DMCU when ABM 2.4 FW is detected Signed-off-by: Josip Pavic Reviewed-by: Aric Cyr Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit d905c33a43dc8014e21e2445ae16ee79e562b91f Author: Chris Park Date: Fri Dec 20 15:30:05 2019 -0500 drm/amd/display: Add default switch case for DCC Signed-off-by: Chris Park Reviewed-by: Aric Cyr Reviewed-by: Jordan Lazare Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 08f6c859211cc0af1b32e7fa7ec583699a06d6c3 Author: Sung Lee Date: Thu Dec 19 11:37:49 2019 -0500 drm/amd/display: Use SMU ClockTable Values for DML Calculations [Why] DML Initialization was previously done on dcn21_resource initialization. This meant that DML soc struct was populated with hardcoded values. [How] Move DML initialization to after updating bounding box, to use clock table values from SMU. Signed-off-by: Sung Lee Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 51f2af1d839e95e2769cc70c3b01e82e2e10ba1c Author: Charlene Liu Date: Mon Dec 16 12:46:49 2019 -0500 drm/amd/display: rename _lvp to l_vp Signed-off-by: Charlene Liu Reviewed-by: Charlene Liu Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ee76592482d34c56c17dd8b75bf8e30deeb1e6af Author: George Shen Date: Tue Dec 17 14:34:33 2019 -0500 drm/amd/display: Add w/a to reset PHY before link training in verify_link_cap [Why] PHY will sometimes be in bad state on hotplugging display from USB-C dongle. [How] Add additional calls to disable and then enable PHY before link training starts during verify_link_cap. Signed-off-by: George Shen Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5adc673c775c8dd41cdfda098279a96f954c6ce9 Author: Wyatt Wood Date: Wed Dec 18 15:11:55 2019 -0500 drm/amd/display: Fix DMUB PSR command IDs [Why] The DMUB PSR command IDs do not have the correct values. [How] Fix the command IDs and cleanup the formatting. Signed-off-by: Wyatt Wood Reviewed-by: Aric Cyr Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 22aa56145f71a271ac1f0151bc90d0366b41928e Author: Yongqiang Sun Date: Tue Dec 17 16:26:48 2019 -0500 drm/amd/display: Refactor surface flip programming Rework surface programming for RN to separate preparing parameters and register programming. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c1e3417558beda21fd41ed870ca16b36a69188d5 Author: Noah Abradjian Date: Tue Dec 17 15:49:14 2019 -0500 drm/amd/display: Indirect reg read macro with shift and mask [Why] Recent double buffering changes for dcn2 use IX_REG_READ. However, this macro returns the full register value, with the need to manually shift and mask it to retrieve field data. [How] Create new IX_REG_GET macro that handles shift and mask. Use this for double buffering reads instead of IX_REG_READ. Signed-off-by: Noah Abradjian Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ec256f449c07b2498f624ec7b9ca41177c989d7c Author: Wyatt Wood Date: Wed Dec 11 14:16:57 2019 -0500 drm/amd/display: DMCUB FW Changes to support PSR [Why] Moving PSR from DMCU to DMCUB. [How] Cleanup psr spec files and add PSR hw programming files. No functionality is included in this change. Signed-off-by: Wyatt Wood Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8c0192533c39660ae229d7b80adeeb3bc63a3eba Author: Yongqiang Sun Date: Mon Dec 16 17:21:10 2019 -0500 drm/amd/display: programing surface flip by dmcub. Programming surface flip addresses via dmcub uC for optimizing the data flush. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 2c1a180ac12d76d2be3586262552619c0fc1daab Author: Noah Abradjian Date: Mon Dec 16 10:50:53 2019 -0500 drm/amd/display: Double buffer dcn2 Gamut Remap [Why] When rapidly adjusting color temperature, screen tearing was observed. This was due to overwritten values in gamut remap registers. This issue was solved for OCSC and ICSC by alternating between "A" and "B" registers to double buffer the writes. [How] Create new set_gamut_remap and program_gamut_remap for dcn20. Alternate which registers are written to by switching modes each time. Also fixes ICSC mode reg read to use proper data offset. Signed-off-by: Noah Abradjian Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4c1a1335dfe0d771908a63950bee67b9b465fd06 Author: Wyatt Wood Date: Wed Dec 11 21:42:03 2019 -0500 drm/amd/display: Driverside changes to support PSR in DMCUB [Why] Moving PSR from DMCU to DMCUB. [How] Add driverside PSR changes required to send inbox messages to fw. These changes are non-functional until the psr structure allocation is uncommented. Signed-off-by: Wyatt Wood Reviewed-by: Nicholas Kazlauskas Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit d9eb70ae610fea5ff41b9849cc541c8d5f0146db Author: Noah Abradjian Date: Fri Dec 13 09:31:20 2019 -0500 drm/amd/display: Fix double buffering in dcn2 ICSC [Why] When rapidly adjusting video brightness, screen tearing was observed. This was due to overwritten values in ICSC registers. In dcn10, this issue had been fixed by implementing double buffering via alternating ICSC modes. However, the second register set used in dcn1 doesn't exist in dcn2. [How] Create new program_input_csc for dcn20. Use ICSC_B registers instead of COMA registers as second set. Signed-off-by: Noah Abradjian Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5fb3a1a5a03837ef1036383f943434870d3ed588 Author: Aric Cyr Date: Mon Dec 16 11:08:35 2019 -0500 drm/amd/display: 3.2.66 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5fc11598166db9e5858164bb105c09f0350e7486 Author: Dmytro Laktyushkin Date: Wed Oct 30 15:25:19 2019 -0400 drm/amd/display: expand dml structs Add more fields to support upcoming dml versions Signed-off-by: Dmytro Laktyushkin Reviewed-by: Jun Lei Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 09178aaa2311cbef76c72dad4a0da165945fe75e Author: Joseph Gravenor Date: Thu Dec 12 15:40:50 2019 -0500 drm/amd/display: stop doing unnecessary detection when going to D3 [Why] Don't want to start HW discovery unless we have lost power, as doing rediscovery otherwise is both unnecessary and time consuming. Before this change it takes 40 seconds to go in to suspend, after it takes 27 seconds [How] Accelerated mode gets cleared if we lose power. Only do detection if this register is cleared Signed-off-by: Joseph Gravenor Reviewed-by: Eric Yang Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ed581a0ace44fc4f454e7765a1625a46258080c7 Author: Wenjing Liu Date: Fri Dec 13 11:54:29 2019 -0500 drm/amd/display: wait for update when setting dpg test pattern Test pattern should be applied to hardware when exiting set test pattern function. Signed-off-by: Wenjing Liu Reviewed-by: Nikola Cornij Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 95e0b96d84b44663f6b2b8bf1c81b3bfbfdb8f38 Author: Michael Strauss Date: Fri Dec 13 11:52:24 2019 -0500 drm/amd/display: Update HDMI hang w/a to apply to all TMDS signals [WHY] 48mhz turn off feature does not work on HDMI and DVI, but the feauture was only blocked on HDMI, this change will apply the same wa on DVI [HOW] Apply workaround for all TMDS signal types (HDMI, DVI single/dual link) Signed-off-by: Michael Strauss Reviewed-by: Eric Yang Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 30c9b7a1339bd194c63e0b4412037bd577248864 Author: Alvin Lee Date: Thu Dec 12 16:23:24 2019 -0500 drm/amd/display: Don't always set pstate true if dummy latency = 0 [Why] If dummy pstate latency is 0 we should report the actual pstate support, and not that pstate is always supported. [How] Don't always program pstate support true Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit a166f86e8a3c91adb303fc511acbfa9d9f2899a1 Author: abdoulaye berthe Date: Wed Dec 11 15:18:08 2019 -0500 drm/amd/display: store lttpr mode with dpcd Make sure that lttpr_caps has the mode set to repeater. Signed-off-by: abdoulaye berthe Reviewed-by: Wenjing Liu Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit e8027e08843f8934f9701cbeea43268c65ade55b Author: Noah Abradjian Date: Wed Dec 11 13:34:04 2019 -0500 drm/amd/display: Add double buffering to dcn20 OCSC [Why] When rapidly adjusting colour properties (e.g. brightness), screen tearing was observed. This was due to overwritten values in OCSC registers. In dcn10, this issue had been fixed by implementing double buffering by alternating OCSC modes. [How] Alternate which OCSC registers are used by switching modes each time. This double buffers the CSC writes. Signed-off-by: Noah Abradjian Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 1295524e6fee9a978ea2d97a0efc269252b07487 Author: Nicholas Kazlauskas Date: Wed Dec 11 21:26:40 2019 -0500 drm/amd/display: Soft reset DMUIF during DMUB reset [Why] We need to ensure that the DMUIF in MMHUBBUB is also in reset so we aren't generating requests while the DMCUB is in reset. [How] Set DMUIF_SOFT_RESET=1 on reset and DMUIF_SOFT_RESET=0 on reset release. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 59abae1ad93c925d11fa72fe2ae707cfd2969ae5 Merge: 7aeff9cbbbd8 9bfb1294571e Author: Olof Johansson Date: Thu Jan 16 10:49:43 2020 -0800 Merge tag 'imx-defconfig-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/defconfig i.MX defconfig update for 5.6: - Enable i.MX8MP clock driver in arm64 defconfig. - Enable Crypto CAAM driver support as module in arm64 defconfig. - Enable ILI210X touch driver, USB CDC ACM function, NFS_V4 support and TFP410 DVI bridge driver support in arm32 imx_v6_v7_defconfig. * tag 'imx-defconfig-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: defconfig: Enable CONFIG_CLK_IMX8MP by default arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM ARM: imx_v6_v7_defconfig: Select the TFP410 driver ARM: imx_v6_v7_defconfig: Enable NFS_V4_1 and NFS_V4_2 support ARM: configs: imx_v6_v7_defconfig: enable USB ACM ARM: imx_v6_v7_defconfig: Enable TOUCHSCREEN_ILI210X Link: https://lore.kernel.org/r/20200113034006.17430-6-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 87f846c773ea43d23be7d478201cc83a3d70fb5f Merge: 78c47feaff05 c16b4571bb27 Author: Olof Johansson Date: Thu Jan 16 10:49:26 2020 -0800 Merge tag 'imx-dt64-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm64 device tree update for 5.6: - New board support: i.MX8MQ based Thor96 board, Google i.MX8MQ Phanbell board, LX2160A based Solidrun Clearfog CX and Honeycomb boards. - Add eLCDIF controller and missing SAI nodes for i.MX8MQ SoC. - Add Crypto CAAM support for i.MX8MM and i.MX8MN. - Drop unneeded "simple-bus" from anatop node on i.MX8MM and i.MX8MN. - Drop unused/undocumented "fsl,aips-bus" and "fsl,imx8mq-aips-bus" compatibles from i.MX8M SoCs. - Add DDR controller nodes for i.MX8M devices. - Add EEPROM description for imx8mq-hummingboard-pulse and imx8mq-sr-som boards. - Enable USB1 and TypeC support for imx8mn-evk board. - Add FlexSPI and QSPI support for a few Layerscape SoCs and boards. - Add External MDIO1 node and the two RGMII PHYs connected on LX2160A. - Add missing SAI devices and set SAIs into async mode on LS1028A. - Other random device additions and enhancement for various platforms. * tag 'imx-dt64-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (35 commits) arm64: dts: imx8mn: Memory node should be in board DT arm64: dts: imx8mm: Memory node should be in board DT arm64: dts: imx8mn: add crypto node arm64: dts: imx8mq-hummingboard-pulse: add eeprom description arm64: dts: imx8mq-sr-som: add eeprom description arm64: dts: ls208xa: Update qspi node properties for LS2088ARDB arm64: dts: freescale: Add devicetree support for Thor96 board arm64: dts: imx8mq-librem5-devkit: add accelerometer and gyro sensor arm64: dts: imx8mm: Add Crypto CAAM support arm64: dts: freescale: add initial support for Google i.MX 8MQ Phanbell arm64: dts: ls1028a-rdb: enable emmc hs400 mode arm64: dts: ls1028a: Update edma compatible to fit eDMA driver arm64: dts: imx8m: drop "fsl,aips-bus" and "fsl,imx8mq-aips-bus" arm64: dts: imx8mm: Add missing mux options for UART1 and UART2 signals arm64: dts: lx2160a: add dts for CEX7 platforms arm64: dts: lx2160a: add emdio2 node arm64: dts: ls1028a: put SAIs into async mode arm64: dts: ls1028a: add missing sai nodes arm64: dts: imx8mn-evk: enable usb1 and typec support arm64: dts: imx8mn: Remove setting for IMX8MN_CLK_USB_CORE_REF ... Link: https://lore.kernel.org/r/20200113034006.17430-5-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 78c47feaff0597ac5567466d937e42d3bde52a29 Merge: 485e35e4b5e6 9a820b558170 Author: Olof Johansson Date: Thu Jan 16 10:48:56 2020 -0800 Merge tag 'imx-dt-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX device tree update for 5.6: - New board support: i.MX6SL based Tolino Shine 3 eBook reader, i.MX7ULP Embedded Artists COM Board, i.MX6Q/DL based Gateworks Ventana Boards. - A couple of series from Andrey Smirnov to enhance i.MX6 RDU2 and VF610 ZII boards. - Add revision in board compatible string for imx6sx-sdb-reva and imx7d-sdb-reva board. - A fixup on imx6sl-tolino-shine3 board to remove incorrect power supply assignment. - Set initial buck regulator modes explicitly for phycore-imx6 board, so that a wrong initial mode set by bootloader does not interfere. - Add Add LCD support for imx7d-pico board. - A couple of patches from Michael Grzeschik to enhance USB Host support on i.MX25. - A couple of patches from Michael Trimarchi to remove duplicate Ethernet PHY reset properties on imx6qdl-icore and switch to phy-handle. - A couple of changes to add extirq node support on LS1021A SoC and make use of it on the LS1021A-TSN board. - A few random device additions and improvements on various boards. * tag 'imx-dt-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (33 commits) ARM: dts: imx: Add GW5912 board support ARM: dts: imx: Add GW5913 board support ARM: dts: imx: Add GW5910 board support ARM: dts: imx: Add GW5907 board support ARM: dts: imx6ul-14x14-evk: Pass the "broken-cd" property ARM: dts: imx6sl-tolino-shine3: Remove incorrect power supply assignment ARM: dts: imx7d-pico: Add LCD support ARM: dts: imx6qdl-icore: Add fec phy-handle ARM: dts: imx6qdl-icore-1.5: Remove duplicate phy reset methods ARM: dts: imx7: Unify temp-grade and speed-grade nodes ARM: dts: imx6: phycore-som: add pmic onkey device ARM: dts: imx51-babbage: Fix the DVI output description ARM: dts: imx6qdl-apalis: mux HDMI CEC pin ARM: dts: imx6sll: add PXP module ARM: dts: colibri-imx6ull: correct wrong pinmuxing and add comments ARM: dts: vf610-zii-scu4-aib: Add node for switch watchdog ARM: dts: vf610-zii-scu4-aib: Use generic names for DT nodes ARM: dts: vf610-zii-dev-rev-b: Drop redundant I2C properties ARM: dts: phycore-imx6: set buck regulator modes explicitly ARM: dts: imx6: rdu2: Limit USBH1 to Full Speed ... Link: https://lore.kernel.org/r/20200113034006.17430-4-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 485e35e4b5e6a3f35ea88d298f5e0241c069ae85 Merge: 7f1f5ac4dcbd 747612c4aefd Author: Olof Johansson Date: Thu Jan 16 10:48:34 2020 -0800 Merge tag 'imx-bindings-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX DT bindings update for 5.6: - Add compatibles for boards: i.MX6 SoloX SDB Rev-A Board i.MX7 SabreSD Rev-A Board i.MX6SL based Tolino Shine 3 eBook reader i.MX7ULP Embedded Artists COM Board i.MX8MQ Thor96 Board i.MX8MQ based Google Coral Edge TPU i.MX6Q/DL based Gateworks Ventana Boards LX2160A based QDS and RDB Boards - Add missing imx6sll into fsl-pxp bindings. - Add i.MX8MQ LCDIF compatible into mxsfb bindings. * tag 'imx-bindings-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: arm: fsl: Add Gateworks Ventana i.MX6DL/Q compatibles dt-bindings: arm: Add devicetree binding for Thor96 Board dt-bindings: arm: Add Google Coral Edge TPU entry bindings: fsl: document compatibles of lx2160a boards media: dt-bindings: media: fsl-pxp: add missing imx6sll dt-bindings: arm: fsl: Document i.MX7ULP Embedded Artists COM board dt-bindings: mxsfb: Add compatible for iMX8MQ dt-bindings: arm: fsl: add compatible string for Tolino Shine 3 dt-bindings: arm: imx: Add the i.MX7D-SDB Rev-A board dt-bindings: arm: imx: Add the i.MX6SX-SDB Rev-A board Link: https://lore.kernel.org/r/20200113034006.17430-3-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 123718659721733a232ae37c97cf3ae08e6c3651 Merge: 511f96fb673c c74067a0f776 Author: Olof Johansson Date: Thu Jan 16 10:47:48 2020 -0800 Merge tag 'imx-soc-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/soc i.MX SoC changes for 5.6: - Add support for reading serial number from OCOTP on i.MX7ULP. - A patch from Anson to enable ARM_ERRATA_814220 for i.MX6UL & i.MX7D, and a fixup patch from Arnd to select the option only for ARMv7-A. * tag 'imx-soc-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: only select ARM_ERRATA_814220 for ARMv7-A ARM: imx: Enable ARM_ERRATA_814220 for i.MX6UL and i.MX7D ARM: imx: Add i.MX7ULP SoC serial number support ARM: imx: Fix boot crash if ocotp is not found ARM: imx_v6_v7_defconfig: Explicitly restore CONFIG_DEBUG_FS ARM: dts: imx6ul-evk: Fix peripheral regulator arm64: dts: ls1028a: fix reboot node arm64: dts: ls1028a: fix typo in TMU calibration data ARM: imx: Correct ocotp id for serial number support of i.MX6ULL/ULZ SoCs ARM: dts: e60k02: fix power button ARM: dts: imx6ul: imx6ul-14x14-evk.dtsi: Fix SPI NOR probing Link: https://lore.kernel.org/r/20200113034006.17430-2-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 0f827273178f5656edf1210dc94b8653df7580bf Merge: c7ce73eb0185 f52cdcce9197 Author: Olof Johansson Date: Thu Jan 16 10:47:27 2020 -0800 Merge tag 'imx-driver-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/drivers i.MX driver changes for 5.6: - Add i.MX8MP SoC driver support. - Allow IMX DSP Protocol driver to be built as module. - Add COMPILE_TEST for IMX_SCU_SOC driver to increase build coverage. - Print SoC type and revision in i.MX8 SoC driver, as this is useful information to have when looking through boot log. * tag 'imx-driver-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: firmware: imx: Allow IMX DSP to be selected as module soc: imx: Enable compile testing of IMX_SCU_SOC soc: imx: Add i.MX8MP SoC driver support soc: imx8: print SoC type and revision Link: https://lore.kernel.org/r/20200113034006.17430-1-shawnguo@kernel.org Signed-off-by: Olof Johansson commit 7f1f5ac4dcbd8f35b98338add2d1cc37e69dc0d5 Merge: d104b3be1bab 62bba54d9940 Author: Olof Johansson Date: Thu Jan 16 10:46:52 2020 -0800 Merge tag 'mvebu-dt64-5.6-1' of git://git.infradead.org/linux-mvebu into arm/dt mvebu dt64 for 5.6 (part 1) micro-DPU (uDPU) board changes (Armada 3270 based board): - Fix broken ethernet - Remove i2c-fast-mode property - Indicate that SFP cages support 3W modules SolidRun Clearfog GT 8K (Armada 8040 base board): - Fix switch cpu port node * tag 'mvebu-dt64-5.6-1' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: clearfog-gt-8k: fix switch cpu port node arm64: dts: uDPU: SFP cages support 3W modules arm64: dts: uDPU: remove i2c-fast-mode arm64: dts: uDPU: fix broken ethernet Link: https://lore.kernel.org/r/871rs53nu5.fsf@FE-laptop Signed-off-by: Olof Johansson commit d104b3be1bab1b74d8da5a4f826dfffd98783e6b Merge: 84c2f68ed2f8 e4018a496b72 Author: Olof Johansson Date: Thu Jan 16 10:46:16 2020 -0800 Merge tag 'mvebu-dt-5.6-1' of git://git.infradead.org/linux-mvebu into arm/dt mvebu dt for 5.6 (part 1) - Add support for SolidRun Clearfog GTR (Armada 385 based board) - Move i2c0 to the SoliRrun Microsom dtsi (Armada 38x based) - Add EEPROM node on SoliRrun Microsom (rev 2.1) - Add EEPROM node on SoliRrun ClearFog Pro * tag 'mvebu-dt-5.6-1' of git://git.infradead.org/linux-mvebu: ARM: dts: armada-388-clearfog: add eeprom ARM: dts: armada-38x-solidrun-microsom: add eeprom ARM: armada-38x-solidrun-microsom: move i2c0 to SOM DT ARM: dts: mvebu: add support for SolidRun Clearfog GTR Link: https://lore.kernel.org/r/874kx13nvh.fsf@FE-laptop Signed-off-by: Olof Johansson commit dee5d542836a911b0175f9cccc25b8f5733e2527 Author: Nicholas Kazlauskas Date: Wed Dec 11 21:14:04 2019 -0500 drm/amd/display: Read inst_fb data back during DMUB loading [Why] The inst firmware isn't necessarily fully flushed to framebuffer memory and the DMCUB can hang due to invalid inst being parsed. [How] Like the fix to flush ringbuffer commands before updating the inbox write pointer we need to read back inst memory before writing the CW0 registers. Add a helper to read 64-byte chunks to avoid a large temporary buffer. Read the remaining leftover bytes if the inst_fb isn't fully aligned. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c7ce73eb018566222542adfb21f18961d0009286 Merge: e87f61892c6e 34efc83727c8 Author: Olof Johansson Date: Thu Jan 16 10:45:42 2020 -0800 Merge tag 'mvebu-drivers-5.6-1' of git://git.infradead.org/linux-mvebu into arm/drivers mvebu drivers for 5.6 (part 1) - Various cleanup on the following drivers: - Turris Mox rWTM firmware - Moxtet bus - Armada 37xx rWTM mailbox - Marvell EBU Device Bus * tag 'mvebu-drivers-5.6-1' of git://git.infradead.org/linux-mvebu: mailbox: armada-37xx-rwtm: convert to devm_platform_ioremap_resource memory: mvebu-devbus: convert to devm_platform_ioremap_resource bus: moxtet: declare moxtet_bus_type as static firmware: turris-mox-rwtm: small white space cleanup Link: https://lore.kernel.org/r/877e1x3nxc.fsf@FE-laptop Signed-off-by: Olof Johansson commit 7aeff9cbbbd884701e2a7974bc677b72a6272ce0 Merge: 8f1be72b33ec ddb8840d2777 Author: Olof Johansson Date: Thu Jan 16 10:43:52 2020 -0800 Merge tag 'tegra-for-5.6-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/defconfig arm64: tegra: Default configuration updates for v5.6-rc1 This enables the USB GPIO connector and Tegra XUDC drivers in the default configuration. * tag 'tegra-for-5.6-arm64-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: defconfig: Enable tegra XUDC support Link: https://lore.kernel.org/r/20200111005526.2413959-1-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 84c2f68ed2f85611ff387daaec10ed41ab90872a Merge: 12c5beb98006 f41f34ddcee6 Author: Olof Johansson Date: Thu Jan 16 10:43:18 2020 -0800 Merge tag 'tegra-for-5.6-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt arm64: tegra: Device tree changes for v5.6-rc1 These patches do some cleanup to existing nodes, add the memory subsystem on Tegra186 and Tegra194 as well as the FUSE and APB MISC nodes on Tegra194. There are also a few additions to the Jetson Nano device tree to enable additional features and the force recovery button on the Jetson AGX Xavier now produces a key code that is actually valid. Finally, an alias is added for the Ethernet card on Jetson TX2 to allow firmware to find it and pass a MAC address via device tree. * tag 'tegra-for-5.6-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Allow bootloader to configure Ethernet MAC on Jetson TX2 arm64: tegra: Redefine force recovery key on Jetson AGX Xavier arm64: tegra: Enable SDIO on Jetson Nano M.2 Key E arm64: tegra: Enable PWM fan on Jetson Nano arm64: tegra: Add fuse/apbmisc node on Tegra194 arm64: tegra: Make XUSB node consistent with the rest arm64: tegra: Add the memory subsystem on Tegra194 arm64: tegra: Add external memory controller on Tegra186 arm64: tegra: Add interrupt for memory controller on Tegra186 arm64: tegra: Rename EMC on Tegra132 arm64: tegra: Let the EMC hardware use the EMC clock Link: https://lore.kernel.org/r/20200111003553.2411874-7-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 12c5beb98006033007b8973c26454c1ebf562c69 Merge: e64d0098dd03 834f1d6cf364 Author: Olof Johansson Date: Thu Jan 16 10:42:59 2020 -0800 Merge tag 'tegra-for-5.6-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt ARM: tegra: Device tree changes for v5.6-rc1 This adds memory timings for the PAZ100 and does some minor cleanup for the external memory controller device tree node on Tegra124. * tag 'tegra-for-5.6-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: dts: tegra20: paz00: Add memory timings ARM: tegra: Rename EMC on Tegra124 ARM: tegra: Let the EMC hardware use the EMC clock Link: https://lore.kernel.org/r/20200111003553.2411874-6-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 511f96fb673c2b6a8e55373beef793428a3ea50f Merge: e4b072cc2e18 9c65b8463f41 Author: Olof Johansson Date: Thu Jan 16 10:42:39 2020 -0800 Merge tag 'tegra-for-5.6-arm-core' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/soc ARM: tegra: Core changes for v5.6-rc1 Contains a couple of fixes for RAM repair on Tegra124. * tag 'tegra-for-5.6-arm-core' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: Use clk_m CPU on Tegra124 LP1 resume ARM: tegra: Modify reshift divider during LP1 ARM: tegra: Enable PLLP bypass during Tegra124 LP1 Link: https://lore.kernel.org/r/20200111003553.2411874-5-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit e87f61892c6e7f44fc07082f605249afc52e1948 Merge: 083b4db85731 02676345e9b3 Author: Olof Johansson Date: Thu Jan 16 10:42:17 2020 -0800 Merge tag 'tegra-for-5.6-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers soc: tegra: Changes for v5.6-rc1 This adds a couple of optimizations to how the chip ID and straps are read and adds support for the FUSE block on Tegra194. Included is also a small optimization for the coupled regulator driver to abort early if no voltage change has occurred. * tag 'tegra-for-5.6-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: fuse: Unmap registers once they are not needed anymore soc/tegra: fuse: Correct straps' address for older Tegra124 device trees soc/tegra: fuse: Warn if straps are not ready soc/tegra: fuse: Cache values of straps and Chip ID registers soc/tegra: regulators: Do nothing if voltage is unchanged soc/tegra: fuse: Add APB DMA dependency for Tegra20 soc/tegra: fuse: Add Tegra194 support Link: https://lore.kernel.org/r/20200111003553.2411874-4-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit b7408a06733f839c98a9903e204010204452fcd3 Author: Nicholas Kazlauskas Date: Wed Dec 11 20:53:22 2019 -0500 drm/amd/display: Flush framebuffer data before passing to DMCUB [Why] There's a data race that can occur between when we update the inbox write pointer vs when the memory for the command actually gets flushed from the map to the framebuffer. DMCUB can read stale or partially invalid data when this race occurs. [How] Before updating the write pointer we can read back all pending commands to ensure that we stall for the writes to be flushed to framebuffer. We don't need to worry about choosing HDP vs VM flush with this mechanism. Drop the dmub_srv_cmd_submit() while we're updating this to work correctly since nothing was actually using this API and the caller should be explicit about the API flow here - by doing this on execute we can give some extra time for the flush to finish while preparing other commands. We should try to avoid writing single commands because of this overhead. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 87f24027728f268fdf8669984f0afba599731717 Author: Martin Leung Date: Wed Dec 11 14:59:36 2019 -0500 drm/amd/display: Adding forgotten hubbub func [why] While doing seamless boot I made some changes to dcn2 hubbub functions, missed a link [how] link hubbub1 func to hubbub2 usage. It has already been successfully linked in dcn1 and 3. Signed-off-by: Martin Leung Reviewed-by: Alvin Lee Acked-by: Anthony Koo Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 6d822156d0b6f529aa95d55286742c908f5b4e35 Author: Nikola Cornij Date: Mon Dec 9 18:54:26 2019 -0500 drm/amd/display: Disable secondary link for certain monitors [why] If the specific monitor supports DSC, the secondary link should be disabled, and the other way around, too: if either that monitor or our ASIC doesn't support DSC, the secodary link should be enabled. [how] Add a monitor patch and disable secondary link if that monitor is detected and if ASIC supports DSC, or otherwise enable secondary link. Signed-off-by: Nikola Cornij Reviewed-by: Joshua Aberback Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 083b4db857310ad269fc49e0019dd0f8fee305d3 Merge: 0d241c3f9519 5e5eca664487 Author: Olof Johansson Date: Thu Jan 16 10:41:47 2020 -0800 Merge tag 'tegra-for-5.6-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers memory: tegra: Changes for v5.6-rc1 This adds a couple of fixes for the Tegra30 EMC frequency scaling code and adds support for EMC frequency scaling on Tegra186 and later. * tag 'tegra-for-5.6-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: memory: tegra30-emc: Correct error message for timed out auto calibration memory: tegra30-emc: Firm up hardware programming sequence memory: tegra30-emc: Firm up suspend/resume sequence memory: tegra: Correct reset value of xusb_hostr memory: tegra: Add support for the Tegra194 memory controller memory: tegra: Only include support for enabled SoCs memory: tegra: Support DVFS on Tegra186 and later memory: tegra: Add system sleep support memory: tegra: Extract memory client SID programming memory: tegra: Add per-SoC data for Tegra186 memory: tegra: Rename tegra_mc to tegra186_mc on Tegra186 memory: tegra: Implement EMC debugfs interface on Tegra30 memory: tegra: Implement EMC debugfs interface on Tegra20 memory: tegra: Refashion EMC debugfs interface on Tegra124 Link: https://lore.kernel.org/r/20200111003553.2411874-3-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 1075735ecce96b34ba9aee529dd2253da6d21ceb Author: Alvin Lee Date: Thu Dec 5 17:12:17 2019 -0500 drm/amd/display: Fix 300Hz Freesync bug Needed to reprogram vblank_start in dml properly in order to get the correct dlg params to program VTG. Signed-off-by: Alvin Lee Reviewed-by: Martin Leung Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 93a8955b109608459c35b4a774f21b3099f0051f Author: Eric Yang Date: Mon Dec 9 16:18:21 2019 -0500 drm/amd/display: fix chroma vp wa corner case [Why] Previous implementation we may have residual chroma address offset if transition from wa enable -> wa disable. [How] Clear address offset cache when viewport updates. Also update the vp size check condition to account for rotation angle Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 30221e6217ebd761e5977c98daab1de0cb70880d Author: Aric Cyr Date: Mon Dec 9 10:21:43 2019 -0500 drm/amd/display: 3.2.65 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 6f8f76444baf405bacb0591d97549a71a9aaa1ac Author: Amanda Liu Date: Fri Dec 6 15:12:30 2019 -0500 drm/amd/display: Clear state after exiting fixed active VRR state [why] Upon exiting a fixed active VRR state, the state isn't cleared. This leads to the variable VRR range to be calculated incorrectly. [how] Set fixed active state to false when updating vrr params Signed-off-by: Amanda Liu Reviewed-by: Anthony Koo Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit d1dcb05f0e45f97061d5c1f921aa038f1ae92c7b Author: Rodrigo Siqueira Date: Tue Jan 7 15:28:43 2020 -0500 drm/amd/include: Add OCSC registers Add registers for handling Post Gamma Color Blending (OCSC), which is useful for conversion from RGB->YUV for HDMI. Reviewed-by: Leo Li Acked-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 9e3e90c50dd34fe961dc662f37ee9640e04cba97 Author: Nirmoy Das Date: Tue Jan 14 10:38:42 2020 +0100 drm/scheduler: fix documentation by replacing rq_list with sched_list This also replaces old artifacts with a correct one in drm_sched_entity_init() declaration Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit e9d4cf918f70c6df87265d561aeab8d73397771b Author: Hawking Zhang Date: Thu Jan 16 12:39:50 2020 +0800 drm/amdgpu: add arcturus to gpu recovery check code path support check if dirver should try gpu recovery for arcturus Signed-off-by: Hawking Zhang Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 93af20f74e8eb4077fecdcc6e8093f13f0059bc9 Author: Hawking Zhang Date: Thu Jan 16 12:39:15 2020 +0800 drm/amdgpu: check if driver should try recovery in ras recovery path To allow the flexibilty for user to disable gpu recovery in RAS recovery path by module parameter amdgpu_gpu_recovery Signed-off-by: Hawking Zhang Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 0d241c3f9519f3858aef126d72a728f37b935dac Merge: 06d3d7272504 2f56acf818a0 Author: Olof Johansson Date: Thu Jan 16 10:40:21 2020 -0800 Merge tag 'tegra-for-5.6-bus' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers bus: tegra: Changes for v5.6-rc1 Contains a single fix to remove a Kconfig dependency that's no longer required. * tag 'tegra-for-5.6-bus' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: bus: tegra-aconnect: Remove PM_CLK dependency Link: https://lore.kernel.org/r/20200111003553.2411874-2-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit e64d0098dd035a4a375a126c3863ac4838b1471a Merge: 90df036043d4 720ad00eade9 Author: Olof Johansson Date: Thu Jan 16 10:40:03 2020 -0800 Merge tag 'tegra-for-5.6-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt dt-bindings: Changes for v5.6-rc1 This contains a conversion of the Tegra124 EMC bindings to json-schema as well as the addition of the bindings for the memory subsystem found on Tegra186 and Tegra194. * tag 'tegra-for-5.6-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: memory: Add Tegra186 memory subsystem dt-bindings: memory: Add Tegra194 memory controller header dt-bindings: memory: Add Tegra186 memory client IDs dt-bindings: memory-controller: Convert Tegra124 EMC to json-schema Link: https://lore.kernel.org/r/20200111003553.2411874-1-thierry.reding@gmail.com Signed-off-by: Olof Johansson commit 2ac0d686971aad123bb5be07183b7623e99e4e68 Author: Evan Quan Date: Wed Jan 15 17:07:21 2020 +0800 drm/amd/powerplay: a quick fix for the deadlock issue below NFO: task ocltst:2028 blocked for more than 120 seconds. Tainted: G OE 5.0.0-37-generic #40~18.04.1-Ubuntu echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. cltst D 0 2028 2026 0x00000000 all Trace: __schedule+0x2c0/0x870 schedule+0x2c/0x70 schedule_preempt_disabled+0xe/0x10 __mutex_lock.isra.9+0x26d/0x4e0 __mutex_lock_slowpath+0x13/0x20 ? __mutex_lock_slowpath+0x13/0x20 mutex_lock+0x2f/0x40 amdgpu_dpm_set_powergating_by_smu+0x64/0xe0 [amdgpu] gfx_v8_0_enable_gfx_static_mg_power_gating+0x3c/0x70 [amdgpu] gfx_v8_0_set_powergating_state+0x66/0x260 [amdgpu] amdgpu_device_ip_set_powergating_state+0x62/0xb0 [amdgpu] pp_dpm_force_performance_level+0xe7/0x100 [amdgpu] amdgpu_set_dpm_forced_performance_level+0x129/0x330 [amdgpu] Fixes: a64c9e15e624 ("drm/amd/powerplay: cleanup the interfaces for powergate setting through SMU") Signed-off-by: Evan Quan Reported-by: Rui Teng Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 0e5b7a952818e20a6cd0f90096e7c968616b1418 Author: Huang Rui Date: Fri Jan 10 11:40:36 2020 +0800 drm/amdgpu: only set cp active field for kiq queue The mec ucode will set the CP_HQD_ACTIVE bit while the queue is mapped by MAP_QUEUES packet. So we only need set cp active field for kiq queue. Signed-off-by: Huang Rui Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 52055039297622f164ed2cead43954bb3e29e1b2 Author: Yong Zhao Date: Fri Jan 10 14:15:52 2020 -0500 drm/amdkfd: Add a message when SW scheduler is used SW scheduler is previously called non HW scheduler, or non HWS. This message is useful when triaging issues from dmesg. Signed-off-by: Yong Zhao Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 27414cd42a48a4b12897d8e427dc919e4cf41378 Author: Alex Deucher Date: Tue Jan 14 11:04:27 2020 -0500 drm/amdgpu/pm: clean up return types count is size_t so don't use negative values. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 56822db194232c089601728d68ed078dccb97f8b Author: Nirmoy Das Date: Wed Jan 15 15:06:04 2020 +0100 drm/scheduler: improve job distribution with multiple queues This patch uses score based logic to select a new rq for better loadbalance between multiple rq/scheds instead of num_jobs. Below are test results after running amdgpu_test from mesa drm Before this patch: sched_name num of many times it got scheduled ========= ================================== sdma0 314 sdma1 32 comp_1.0.0 56 comp_1.0.1 0 comp_1.1.0 0 comp_1.1.1 0 comp_1.2.0 0 comp_1.2.1 0 comp_1.3.0 0 comp_1.3.1 0 After this patch: sched_name num of many times it got scheduled ========= ================================== sdma0 216 sdma1 185 comp_1.0.0 39 comp_1.0.1 9 comp_1.1.0 12 comp_1.1.1 0 comp_1.2.0 12 comp_1.2.1 0 comp_1.3.0 12 comp_1.3.1 0 Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 0c0dab86d9792576301444af211eb2b2c9131bcc Author: James Zhu Date: Mon Jan 13 17:15:36 2020 -0500 drm/amdgpu/vcn2.5: implement indirect DPG SRAM mode Implement indirect DPG SRAM mode for vcn2.5 Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 8484df9601d52b548e29763638163391e175ea9f Author: James Zhu Date: Mon Jan 13 17:12:04 2020 -0500 drm/amdgpu/vcn2.5: add dpg pause mode Add dpg pause mode support for vcn2.5 Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit d2a2c64f53718a995fd9a12171ba7ea10e80e96c Author: James Zhu Date: Wed Dec 18 14:17:56 2019 -0500 drm/amdgpu/vcn2.5: add DPG mode start and stop Add DPG mode start and stop functions for vcn2.5 v2: Correct firmware ucode index in vcn_v2_5_mc_resume_dpg_mode Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 45cec87cd6987eb17d897ceceb153cc449261289 Author: James Zhu Date: Wed Jan 15 11:38:57 2020 -0500 drm/amdgpu/vcn: move macro from vcn2.0 to share amdgpu_vcn (v2) Move macro from vcn2.0 to amdgpu_vcn to share with vcn2.5 v2: squash in macro fix Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 5db86843e8bf0e14f648195a26dad54a9c32f9bd Author: James Zhu Date: Wed Jan 15 11:36:49 2020 -0500 drm/amdgpu/vcn: support multiple instance direct SRAM read and write (v2) Add multiple instance direct SRAM read and write support for vcn2.5 v2: squash in indexing fix Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 597e6ac3a776c0bf86038a627b3392a52e8a51ab Author: James Zhu Date: Mon Jan 13 16:40:00 2020 -0500 drm/amdgpu/vcn: support multiple-instance dpg pause mode Add multiple-instance dpg pause mode support for VCN2.5 Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 1291bd70a2ee4507549bbc6379efbfb290e8f85a Author: Jack Zhang Date: Wed Jan 15 17:03:31 2020 +0800 drm/amdgpu/sriov skip the update of SMU_TABLE_ACTIVITY_MONITOR_COEFF There's no need to dump ACTIVITY_MONITOR_COEFF under VF. Therefore, Skip the update of SMU_TABLE_ACTIVITY_MONITOR_COEFF under SRIOV VF. Signed-off-by: Jack Zhang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 9e441478623fd913d4340654682b19f0c24e629d Author: Tianci.Yin Date: Thu Jan 9 15:38:39 2020 +0800 drm/amdgpu: fix modprobe failure of the secondary GPU when GDDR6 training enabled(V5) [why] In dual GPUs scenario, stolen_size is assigned to zero on the secondary GPU, since there is no pre-OS console using that memory. Then the bottom region of VRAM was allocated as GTT, unfortunately a small region of bottom VRAM was encroached by UMC firmware during GDDR6 BIST training, this cause page fault. [how] Forcing stolen_size to 3MB, then the bottom region of VRAM was allocated as stolen memory, GTT corruption avoid. Reviewed-by: Christian König Reviewed-by: Feifei Xu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 6a1094ab6882cc734af406a4815bd70b75d9b989 Author: Tianci.Yin Date: Tue Jan 14 19:19:40 2020 +0800 drm/amdgpu/gfx10: update gfx golden settings for navi14 remove registers: mmSPI_CONFIG_CNTL add registers: mmSPI_CONFIG_CNTL_1 Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 7b7041f89218d9d81de48a9dc365667f0b9e56b4 Author: Tianci.Yin Date: Tue Jan 14 19:17:19 2020 +0800 drm/amdgpu/gfx10: update gfx golden settings remove registers: mmSPI_CONFIG_CNTL add registers: mmSPI_CONFIG_CNTL_1 Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit b4df2823ec10c695ae4218965d55ac8909c8842c Author: shaoyunl Date: Fri Jan 10 13:27:23 2020 -0500 drm/amdgpu: check rlc_g firmware pointer is valid before using it In SRIOV, rlc_g firmware is loaded by host, guest driver won't load it which will cause the rlc_fw pointer is null Signed-off-by: shaoyunl Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 971fe55545de2f67463def381df57d803dddf61d Author: Christian König Date: Mon Dec 16 14:54:31 2019 +0100 drm/amdgpu: drop amdgpu_job.owner Entirely unused. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 55414ad5c983ed708d778ea7b29e80f89750ff73 Author: Nirmoy Das Date: Thu Jan 9 12:07:22 2020 +0100 drm/amdgpu: error out on entity with no run queue Disabled HW IP's entity initialized with NULL rq. We should not process any submit request from userspace for a disabled HW IP. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 8eee00f615f830c0569923ef3047cf9535f82c39 Author: Huang Rui Date: Fri Jan 10 13:54:29 2020 +0800 drm/amdkfd: use map_queues for hiq on gfx v10 as well To align with gfx v9, we use the map_queues packet to load hiq MQD. Signed-off-by: Huang Rui Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 35cd89d5a658dc26687a7a6909d35fee19a6b173 Author: Aaron Liu Date: Wed Dec 25 15:50:51 2019 +0800 drm/amdkfd: use kiq to load the mqd of hiq queue for gfx v9 (v6) There is an issue that CP will check the HIQ queue to be configured and mapped with KIQ ring, otherwise, it will be unable to read back the secure buffer while the gfxoff is enabled even with trusted IP blocks. v1 -> v2: - Fix to remove surplus set_resources packets. - Fill the whole configuration in MQD. - Change the author as Aaron because he addressed the key point of this issue. - Add kiq ring lock. v2 -> v3: - Free the lock while in error return case. - Remove the programming only needed by the queue is unmapped. v3 -> v4: - Remove doorbell programming because it's used for restarting queue. - Remove CP scheduler programming because map_queue packet will handle this. v4 -> v5: - Remove cp_hqd_active because mec ucode will enable it while use map_queues. - Revise goto out_unlock. - Correct the right doorbell offset for HIQ that kfd driver assigned in the packet. v5 -> v6: - Merge Arcturus fix into this patch because it will get oops in Arcturus platform. Reported-by: Lisa Saturday Signed-off-by: Aaron Liu Signed-off-by: Huang Rui Reviewed-and-Tested-by: Aaron Liu Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit d175e9acf658334a4a0559a30c39c368a38d9dcd Author: Alex Sierra Date: Fri Dec 20 00:00:35 2019 -0600 drm/amdgpu: flush TLB functions removal from kfd2kgd interface [Why] kfd2kgd interface will be deprecated. This removal only covers TLB invalidation for now. They have been replaced in amdgpu_amdkfd API. [How] TLB invalidate functions removed from the different amdkfd_gfx_v* versions. Signed-off-by: Alex Sierra Acked-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit ffa022696f46fb6c13e30cad59b7271a687f96b8 Author: Alex Sierra Date: Thu Dec 19 23:57:03 2019 -0600 drm/amdgpu: GPU TLB flush API moved to amdgpu_amdkfd [Why] TLB flush method has been deprecated using kfd2kgd interface. This implementation is now on the amdgpu_amdkfd API. [How] TLB flush functions now implemented in amdgpu_amdkfd. Signed-off-by: Alex Sierra Acked-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit ea930000a6dcd161346c957545f7e67b3f77ec06 Author: Alex Sierra Date: Thu Dec 19 23:40:19 2019 -0600 drm/amdgpu: export function to flush TLB via pasid This can be used directly from amdgpu and amdkfd to invalidate TLB through pasid. It supports gmc v7, v8, v9 and v10. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 4f01f1e58e073d35d49ca15460d00671c6244323 Author: Alex Sierra Date: Thu Jan 9 18:14:06 2020 -0600 drm/amdgpu: replace kcq enable/disable functions on gfx_v9 [Why] There are HW-indpendent functions that enables and disables kcq. These functions use the kiq_pm4_funcs implementation. [How] Local kcq enable and disable functions removed and replace it by the generic kcq enable under amdgpu_gfx Signed-off-by: Alex Sierra Acked-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit dcd195071f22d4770911ca46694ca398b6d5101d Author: Mikulas Patocka Date: Wed Jan 15 04:35:22 2020 -0500 dm writecache: improve performance of large linear writes on SSDs When dm-writecache is used with SSD as a cache device, it would submit a separate bio for each written block. The I/Os would be merged by the disk scheduler, but this merging degrades performance. Improve dm-writecache performance by submitting larger bios - this is possible as long as there is consecutive free space on the cache device. Benchmark (arm64 with 64k page size, using /dev/ram0 as a cache device): fio --bs=512k --iodepth=32 --size=400M --direct=1 \ --filename=/dev/mapper/cache --rw=randwrite --numjobs=1 --name=test block old new size MiB/s MiB/s --------------------- 512 181 700 1k 347 1256 2k 644 2020 4k 1183 2759 8k 1852 3333 16k 2469 3509 32k 2974 3670 64k 3404 3810 Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 58e508b6be82387d22785b8a4e54e50554a91594 Author: Alex Sierra Date: Thu Jan 9 16:16:28 2020 -0600 drm/amdgpu: implement tlbs invalidate on gfx9 gfx10 tlbs invalidate pointer function added to kiq_pm4_funcs struct. This way, tlb flush can be done through kiq member. TLBs invalidatation implemented for gfx9 and gfx10. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit f167ea6a14a24308a34c50c28aec1e1ffe666e22 Author: Alex Sierra Date: Thu Jan 9 15:36:37 2020 -0600 drm/amdgpu: kiq pm4 function implementation for gfx_v9 Functions implemented from kiq_pm4_funcs struct members for gfx_v9 version. Signed-off-by: Alex Sierra Acked-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit a269e44989f3e77fb2ebfb995b8d501924ed07e2 Author: Alex Sierra Date: Tue Dec 17 16:57:30 2019 -0600 drm/amdgpu: Avoid reclaim fs while eviction lock [Why] Avoid reclaim filesystem while eviction lock is held called from MMU notifier. [How] Setting PF_MEMALLOC_NOFS flags while eviction mutex is locked. Using memalloc_nofs_save / memalloc_nofs_restore API. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9e0333ae38eeb42249e10f95d209244a6e22ac9f Author: Andrea Parri Date: Thu Jan 9 17:06:50 2020 +0100 clocksource/drivers/hyper-v: Set TSC clocksource as default w/ InvariantTSC Change the Hyper-V clocksource ratings to 250, below the TSC clocksource rating of 300. In configurations where Hyper-V offers an InvariantTSC, the TSC is not marked "unstable", so the TSC clocksource is available and preferred. With the higher rating, it will be the default. On older hardware and Hyper-V versions, the TSC is marked "unstable", so no TSC clocksource is created and the selected Hyper-V clocksource will be the default. Signed-off-by: Andrea Parri Reviewed-by: Michael Kelley Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200109160650.16150-3-parri.andrea@gmail.com commit 0af3e137c144377fbaf5025ba784ff5ba7ad40c9 Author: Andrea Parri Date: Thu Jan 9 17:06:49 2020 +0100 clocksource/drivers/hyper-v: Untangle stimers and timesync from clocksources hyperv_timer.c exports hyperv_cs, which is used by stimers and the timesync mechanism. However, the clocksource dependency is not needed: these mechanisms only depend on the partition reference counter (which can be read via a MSR or via the TSC Reference Page). Introduce the (function) pointer hv_read_reference_counter, as an embodiment of the partition reference counter read, and export it in place of the hyperv_cs pointer. The latter can be removed. This should clarify that there's no relationship between Hyper-V stimers & timesync and the Linux clocksource abstractions. No functional or semantic change. Suggested-by: Michael Kelley Signed-off-by: Andrea Parri Reviewed-by: Michael Kelley Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200109160650.16150-2-parri.andrea@gmail.com commit b9c60a741f06eda56d12c7216accb317b74266b4 Author: Claudiu Beznea Date: Mon Jan 6 11:58:08 2020 +0200 clocksource/drivers/timer-microchip-pit64b: Fix sparse warning Fix sparse warning: "warning: Using plain integer as NULL pointer" Reported-by: kbuild test robot Signed-off-by: Claudiu Beznea Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1578304688-14882-1-git-send-email-claudiu.beznea@microchip.com commit 4ad35346da9cb99c02a4c5e99633c36f8f344be0 Author: Krzysztof Kozlowski Date: Sat Jan 4 16:20:58 2020 +0100 clocksource/drivers/exynos_mct: Rename Exynos to lowercase Fix up inconsistent usage of upper and lowercase letters in "Exynos" name. "EXYNOS" is not an abbreviation but a regular trademarked name. Therefore it should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200104152107.11407-12-krzk@kernel.org commit 4341067cfc20582195f47383cf059589b2641465 Author: Tony Lindgren Date: Mon Jan 6 12:37:00 2020 -0800 clocksource/drivers/timer-ti-dm: Fix uninitialized pointer access Clean-up commit 8c82723414d5 ("clocksource/drivers/timer-ti-dm: Switch to platform_get_irq") caused a regression where we now try to access uninitialized data for timer: drivers/clocksource/timer-ti-dm.c: In function 'omap_dm_timer_probe': drivers/clocksource/timer-ti-dm.c:798:13: warning: 'timer' may be used uninitialized in this function [-Wmaybe-uninitialized] On boot we now get: Unable to handle kernel NULL pointer dereference at virtual address 00000004 ... (omap_dm_timer_probe) from [] (platform_drv_probe+0x48/0x98) (platform_drv_probe) from [] (really_probe+0x1dc/0x348) (really_probe) from [] (driver_probe_device+0x5c/0x160) Let's fix the issue by moving platform_get_irq to happen after timer has been allocated. Fixes: bc83caddf17b ("clocksource/drivers/timer-ti-dm: Switch to platform_get_irq") Cc: Yangtao Li Signed-off-by: Tony Lindgren Acked-by: Olof Johansson Acked-by: Yangtao Li Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200106203700.21009-1-tony@atomide.com commit bc83caddf17bd592cc19887e252c4ba416484d79 Author: Yangtao Li Date: Sat Dec 21 17:30:27 2019 +0000 clocksource/drivers/timer-ti-dm: Switch to platform_get_irq platform_get_resource(pdev, IORESOURCE_IRQ) is not recommended for requesting IRQ's resources, as they can be not ready yet. Using platform_get_irq() instead is preferred for getting IRQ even if it was not retrieved earlier. Signed-off-by: Yangtao Li Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191221173027.30716-5-tiny.windzz@gmail.com commit cdab83f9d0fb13926f6633f20c3327545fd6f70f Author: Yangtao Li Date: Sat Dec 21 17:30:26 2019 +0000 clocksource/drivers/timer-ti-dm: Convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code, which wraps 'platform_get_resource' and 'devm_ioremap_resource' in a single helper. Signed-off-by: Yangtao Li Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191221173027.30716-4-tiny.windzz@gmail.com commit ba25322edd600300e55cd58eb7fbdf9cbdc5a82d Author: Yangtao Li Date: Sat Dec 21 17:30:25 2019 +0000 clocksource/drivers/em_sti: Fix variable declaration in em_sti_probe 'irq' and 'ret' are variables of the same type and there is no need to use two lines. Signed-off-by: Yangtao Li Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191221173027.30716-3-tiny.windzz@gmail.com commit 9a97b2fb070d497c683aed9fb86b7ec5245cea86 Author: Yangtao Li Date: Sat Dec 21 17:30:24 2019 +0000 clocksource/drivers/em_sti: Convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code, which wraps 'platform_get_resource' and 'devm_ioremap_resource' in a single helper. Signed-off-by: Yangtao Li Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191221173027.30716-2-tiny.windzz@gmail.com commit 2052d032c06761330bca4944bb7858b00960e868 Author: Colin Ian King Date: Thu Dec 19 21:32:46 2019 +0000 clocksource/drivers/bcm2835_timer: Fix memory leak of timer Currently when setup_irq fails the error exit path will leak the recently allocated timer structure. Originally the code would throw a panic but a later commit changed the behaviour to return via the err_iounmap path and hence we now have a memory leak. Fix this by adding a err_timer_free error path that kfree's timer. Addresses-Coverity: ("Resource Leak") Fixes: 524a7f08983d ("clocksource/drivers/bcm2835_timer: Convert init function to return error") Signed-off-by: Colin Ian King Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191219213246.34437-1-colin.king@canonical.com commit f5ac896b6a23eb46681cdbef440c1d991b04e519 Author: Rajan Vaja Date: Thu Nov 7 02:36:28 2019 -0800 clocksource/drivers/cadence-ttc: Use ttc driver as platform driver Currently TTC driver is TIMER_OF_DECLARE type driver. Because of that, TTC driver may be initialized before other clock drivers. If TTC driver is dependent on that clock driver then initialization of TTC driver will failed. So use TTC driver as platform driver instead of using TIMER_OF_DECLARE. Signed-off-by: Rajan Vaja Tested-by: Michal Simek Acked-by: Michal Simek Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1573122988-18399-1-git-send-email-rajan.vaja@xilinx.com commit 625022a5f160619ae180d54097ddd65bb3795913 Author: Claudiu Beznea Date: Fri Dec 13 13:19:21 2019 +0200 clocksource/drivers/timer-microchip-pit64b: Add Microchip PIT64B support Add driver for Microchip PIT64B timer. Timer could be used in continuous mode or oneshot mode. The hardware has 2x32 bit registers for period emulating a 64 bit timer. The LSB_PR and MSB_PR registers are used to set the period value (compare value). TLSB and TMSB keeps the current value of the counter. After a compare the TLSB and TMSB register resets. The driver uses PIT64B timer for clocksource or clockevent. First requested timer would be registered as clockevent, second one would be registered as clocksource. Individual PIT64B hardware resources were used for clocksource and clockevent to be able to support high resolution timers with this hardware implementation. Signed-off-by: Claudiu Beznea Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1576235962-30123-3-git-send-email-claudiu.beznea@microchip.com commit ddc61bbc45017726a2b450350d476b4dc5ae25ce Author: Boqun Feng Date: Tue Nov 26 10:17:20 2019 +0800 clocksource/drivers/hyper-v: Reserve PAGE_SIZE space for tsc page Currently, the reserved size for a tsc page is 4K, which is enough for communicating with hypervisor. However, in the case where we want to export the tsc page to userspace (e.g. for vDSO to read the clocksource), the tsc page should be at least PAGE_SIZE, otherwise, when PAGE_SIZE is larger than 4K, extra kernel data will be mapped into userspace, which means leaking kernel information. Therefore reserve PAGE_SIZE space for tsc_pg as a preparation for the vDSO support of ARM64 in the future. Also, while at it, replace all reference to tsc_pg with hv_get_tsc_page() since it should be the only interface to access tsc page. Signed-off-by: Boqun Feng (Microsoft) Cc: linux-hyperv@vger.kernel.org Reviewed-by: Michael Kelley Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191126021723.4710-1-boqun.feng@gmail.com commit 062934634dc3ae38baeb9961dcc80c44a00ffcf2 Author: Randy Dunlap Date: Wed Nov 27 21:10:22 2019 -0800 clocksource: Fix Kconfig miscues Fix lots of typo, spelling, punctuation, and grammar miscues in drivers/clocksource/Kconfig. Signed-off-by: Randy Dunlap Cc: Daniel Lezcano Cc: Thomas Gleixner Cc: John Stultz Cc: Stephen Boyd Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/4deb42a9-82f2-72f9-891f-972a9a399f4f@infradead.org commit db95b8e3642a61b1576e600c3d313aca0c329db3 Author: Biju Das Date: Thu Oct 3 13:03:49 2019 +0100 dt-bindings: timer: renesas, cmt: Document r8a774b1 CMT support Document SoC specific bindings for RZ/G2N (r8a774b1) SoC. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1570104229-59144-1-git-send-email-biju.das@bp.renesas.com commit 9ca9fe69eedb483c0811a4db7cb94942edfb1404 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:42:36 2019 +0800 clocksource: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20191120134236.15959-1-krzk@kernel.org commit 1349401ff1aa425e7381ed26feb63e0d6b557fc6 Author: Dexuan Cui Date: Tue Nov 19 23:12:26 2019 -0800 clocksource/drivers/hyper-v: Suspend/resume Hyper-V clocksource for hibernation This is needed for hibernation, e.g. when we resume the old kernel, we need to disable the "current" kernel's TSC page and then resume the old kernel's. Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1574233946-48377-1-git-send-email-decui@microsoft.com commit f01b16a85bfae2e6b4f32de0a1f37ac4050dc316 Author: Vivek Goyal Date: Mon Jan 6 13:11:17 2020 -0500 dax: Get rid of fs_dax_get_by_host() helper Looks like nobody is using fs_dax_get_by_host() except fs_dax_get_by_bdev() and it can easily use dax_get_by_host() instead. IIUC, fs_dax_get_by_host() was only introduced so that one could compile with CONFIG_FS_DAX=n and CONFIG_DAX=m. fs_dax_get_by_bdev() achieves the same purpose and hence it looks like fs_dax_get_by_host() is not needed anymore. Signed-off-by: Vivek Goyal Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20200106181117.GA16248@redhat.com Signed-off-by: Dan Williams commit 500d14affdf73677071c075bb9becc637b60fe39 Author: Ard Biesheuvel Date: Fri Dec 6 14:13:40 2019 -0800 arm64: kernel: avoid x18 in __cpu_soft_restart The code in __cpu_soft_restart() uses x18 as an arbitrary temp register, which will shortly be disallowed. So use x8 instead. Link: https://patchwork.kernel.org/patch/9836877/ Signed-off-by: Ard Biesheuvel [Sami: updated commit message] Signed-off-by: Sami Tolvanen Reviewed-by: Mark Rutland Reviewed-by: Kees Cook Signed-off-by: Will Deacon commit af12376814a5d8d2fa1c86eaa3adacf9dee2102e Author: Ard Biesheuvel Date: Fri Dec 6 14:13:39 2019 -0800 arm64: kvm: stop treating register x18 as caller save In preparation of reserving x18, stop treating it as caller save in the KVM guest entry/exit code. Currently, the code assumes there is no need to preserve it for the host, given that it would have been assumed clobbered anyway by the function call to __guest_enter(). Instead, preserve its value and restore it upon return. Link: https://patchwork.kernel.org/patch/9836891/ Signed-off-by: Ard Biesheuvel [Sami: updated commit message, switched from x18 to x29 for the guest context] Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Reviewed-by: Marc Zyngier Reviewed-by: Mark Rutland Signed-off-by: Will Deacon commit 7f153ccb9bb4c83a62cce8d034012698f68a3b4c Author: Ard Biesheuvel Date: Fri Dec 6 14:13:38 2019 -0800 arm64/lib: copy_page: avoid x18 register in assembler code Register x18 will no longer be used as a caller save register in the future, so stop using it in the copy_page() code. Link: https://patchwork.kernel.org/patch/9836869/ Signed-off-by: Ard Biesheuvel [Sami: changed the offset and bias to be explicit] Signed-off-by: Sami Tolvanen Reviewed-by: Mark Rutland Signed-off-by: Will Deacon commit e3ec6582d1cf1c4922200f7cddd96d5ee55235d2 Author: Sami Tolvanen Date: Fri Dec 6 14:13:37 2019 -0800 arm64: mm: avoid x18 in idmap_kpti_install_ng_mappings idmap_kpti_install_ng_mappings uses x18 as a temporary register, which will result in a conflict when x18 is reserved. Use x16 and x17 instead where needed. Signed-off-by: Sami Tolvanen Reviewed-by: Nick Desaulniers Reviewed-by: Mark Rutland Signed-off-by: Will Deacon commit c54f90c2627cc316d365e3073614731e17dbc631 Author: Sami Tolvanen Date: Thu Oct 31 12:46:52 2019 -0700 arm64: fix alternatives with LLVM's integrated assembler LLVM's integrated assembler fails with the following error when building KVM: :12:6: error: expected absolute expression .if kvm_update_va_mask == 0 ^ :21:6: error: expected absolute expression .if kvm_update_va_mask == 0 ^ :24:2: error: unrecognized instruction mnemonic NOT_AN_INSTRUCTION ^ LLVM ERROR: Error parsing inline asm These errors come from ALTERNATIVE_CB and __ALTERNATIVE_CFG, which test for the existence of the callback parameter in inline assembly using the following expression: " .if " __stringify(cb) " == 0\n" This works with GNU as, but isn't supported by LLVM. This change splits __ALTERNATIVE_CFG and ALTINSTR_ENTRY into separate macros to fix the LLVM build. Link: https://github.com/ClangBuiltLinux/linux/issues/472 Signed-off-by: Sami Tolvanen Tested-by: Nick Desaulniers Reviewed-by: Kees Cook Signed-off-by: Will Deacon commit e0d5896bd356cd577f9710a02d7a474cdf58426b Author: Sami Tolvanen Date: Thu Oct 31 12:57:05 2019 -0700 arm64: lse: fix LSE atomics with LLVM's integrated assembler Unlike gcc, clang considers each inline assembly block to be independent and therefore, when using the integrated assembler for inline assembly, any preambles that enable features must be repeated in each block. This change defines __LSE_PREAMBLE and adds it to each inline assembly block that has LSE instructions, which allows them to be compiled also with clang's assembler. Link: https://github.com/ClangBuiltLinux/linux/issues/671 Signed-off-by: Sami Tolvanen Tested-by: Andrew Murray Tested-by: Kees Cook Reviewed-by: Andrew Murray Reviewed-by: Kees Cook Reviewed-by: Nick Desaulniers Signed-off-by: Will Deacon commit 03077ad5c0252fb81008fc6ecd233db6fb6571a3 Author: Nicolas Saenz Julienne Date: Mon Dec 16 12:01:12 2019 +0100 arm64: defconfig: Enable Broadcom's STB PCIe controller For now mainly used in the Raspberry Pi 4. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Florian Fainelli commit d662117c7a91b4f4db1d5458fe782cdf54f8359a Author: Takashi Iwai Date: Thu Jan 16 17:28:25 2020 +0100 ALSA: pcm: Make snd_pcm_hw_constraints_init() and _complete() static Both snd_pcm_hw_constraints_init() and _complete() functions are called only from pcm_native.c, hence they can be static for further optimization. Link: https://lore.kernel.org/r/20200116162825.24792-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2ba0176c709c103974cf55b6d373c4ea749c6391 Author: Takashi Iwai Date: Wed Jan 15 11:00:35 2020 +0100 ALSA: hda/analog - Minor optimization for SPDIF mux connections AD HD-audio codec driver has a few code lines invoking snd_get_num_conns() and using its return value as the array index without checking. This is basically safe in all those places; at the second and later calls snd_get_num_conns() returns the value cached from the first invocation, hence the value is always consistent. However, it looks a bit confusing as if a lack of the proper check. This patch introduces a new field num_smux_conns in ad198x_spec for simplifying the code. Now we store and refer to the value more locally without invoking the extra function at each time. Reported-by: Colin King Link: https://lore.kernel.org/r/20200115100035.22511-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit dcd01394ce7cd7d25bb15c81ad2e804d8090611f Author: Yazen Ghannam Date: Fri Jan 10 01:56:51 2020 +0000 EDAC/amd64: Drop some family checks for newer systems In general, "pvt->umc != NULL" is used to check if the system is Family 17h+. However, there are a few places that are using direct family checks. Replace the remaining family checks with a check for "pvt->umc != NULL". Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200110015651.14887-6-Yazen.Ghannam@amd.com commit 2eb61c91c3e2738218e55f2eaf7e78a4435c233d Author: Yazen Ghannam Date: Fri Jan 10 01:56:50 2020 +0000 EDAC/amd64: Add family ops for Family 19h Models 00h-0Fh Add family ops to support AMD Family 19h systems. Existing Family 17h functions can be used. Also, add Family 19h to the list of families to automatically load the module. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200110015651.14887-5-Yazen.Ghannam@amd.com commit b3f79ae45904ae987a7c06a9e8d6084d7b73e67f Author: Yazen Ghannam Date: Fri Jan 10 01:56:49 2020 +0000 x86/amd_nb: Add Family 19h PCI IDs Add the new PCI Device 18h IDs for AMD Family 19h systems. Note that Family 19h systems will not have a new PCI root device ID. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200110015651.14887-4-Yazen.Ghannam@amd.com commit 9f6aef86315ac31481a288ba1b3f43b2aac93757 Author: Yazen Ghannam Date: Fri Jan 10 01:56:48 2020 +0000 EDAC/mce_amd: Always load on SMCA systems MCA error decoding on SMCA systems is not dependent on family. Return success early if the system supports the SMCA feature. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200110015651.14887-3-Yazen.Ghannam@amd.com commit 89a76171bf50bd20d44338408b8c09433c302956 Author: Yazen Ghannam Date: Fri Jan 10 01:56:47 2020 +0000 x86/MCE/AMD, EDAC/mce_amd: Add new Load Store unit McaType Add support for a new version of the Load Store unit bank type as indicated by its McaType value, which will be present in future SMCA systems. Add the new (HWID, MCATYPE) tuple. Reuse the same name, since this is logically the same to the user. Also, add the new error descriptions to edac_mce_amd. Signed-off-by: Yazen Ghannam Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200110015651.14887-2-Yazen.Ghannam@amd.com commit 8a6453a89dc10269adb1fc0cd0ceba928d557c21 Author: Darrick J. Wong Date: Mon Jan 13 16:33:46 2020 -0800 xfs: check log iovec size to make sure it's plausibly a buffer log format When log recovery is processing buffer log items, we should check that the incoming iovec actually describes a region of memory large enough to contain the log format and the dirty map. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit b7df5e92055c69666e3c82f31f193120d98f04e3 Author: Darrick J. Wong Date: Tue Jan 7 16:12:25 2020 -0800 xfs: make struct xfs_buf_log_format have a consistent size Increase XFS_BLF_DATAMAP_SIZE by 1 to fill in the implied padding at the end of struct xfs_buf_log_format. This makes the size consistent so that we can check it in xfs_ondisk.h, and will be needed once we start logging attribute values. On amd64 we get the following pahole: struct xfs_buf_log_format { short unsigned int blf_type; /* 0 2 */ short unsigned int blf_size; /* 2 2 */ short unsigned int blf_flags; /* 4 2 */ short unsigned int blf_len; /* 6 2 */ long long int blf_blkno; /* 8 8 */ unsigned int blf_map_size; /* 16 4 */ unsigned int blf_data_map[16]; /* 20 64 */ /* --- cacheline 1 boundary (64 bytes) was 20 bytes ago --- */ /* size: 88, cachelines: 2, members: 7 */ /* padding: 4 */ /* last cacheline: 24 bytes */ }; But on i386 we get the following: struct xfs_buf_log_format { short unsigned int blf_type; /* 0 2 */ short unsigned int blf_size; /* 2 2 */ short unsigned int blf_flags; /* 4 2 */ short unsigned int blf_len; /* 6 2 */ long long int blf_blkno; /* 8 8 */ unsigned int blf_map_size; /* 16 4 */ unsigned int blf_data_map[16]; /* 20 64 */ /* --- cacheline 1 boundary (64 bytes) was 20 bytes ago --- */ /* size: 84, cachelines: 2, members: 7 */ /* last cacheline: 20 bytes */ }; Notice how the amd64 compiler inserts 4 bytes of padding to the end of the structure to ensure 8-byte alignment. Prior to "xfs: fix memory corruption during remote attr value buffer invalidation" we would try to write to blf_data_map[17], which is harmless on amd64 but really bad on i386. This shouldn't cause any changes in the ondisk logging formats because the log code writes out the log vectors with the appropriate size for the log item's map_size, and log recovery treats the data_map array as a VLA. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit c3d5f0c2fb85351a1017b23692d3d6ab561b1f32 Author: Darrick J. Wong Date: Tue Jan 7 16:12:24 2020 -0800 xfs: complain if anyone tries to create a too-large buffer log item Complain if someone calls xfs_buf_item_init on a buffer that is larger than the dirty bitmap can handle, or tries to log a region that's past the end of the dirty bitmap. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit c64dd49b5112215730db8a2c3ac38c2e03b09e73 Author: Darrick J. Wong Date: Wed Jan 8 09:21:22 2020 -0800 xfs: clean up xfs_buf_item_get_format return value The only thing that can cause a nonzero return from xfs_buf_item_get_format is if the kmem_alloc fails, which it can't. Get rid of all the unnecessary error handling. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 0bb9d159bd018b271e783d3b2d3bc82fa0727321 Author: Darrick J. Wong Date: Tue Jan 14 14:31:49 2020 -0800 xfs: streamline xfs_attr3_leaf_inactive Now that we know we don't have to take a transaction to stale the incore buffers for a remote value, get rid of the unnecessary memory allocation in the leaf walker and call the rmt_stale function directly. Flatten the loop while we're at it. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit e8db2aafcedb7d88320ab83f1000f1606b26d4d7 Author: Darrick J. Wong Date: Tue Jan 7 16:11:45 2020 -0800 xfs: fix memory corruption during remote attr value buffer invalidation While running generic/103, I observed what looks like memory corruption and (with slub debugging turned on) a slub redzone warning on i386 when inactivating an inode with a 64k remote attr value. On a v5 filesystem, maximally sized remote attr values require one block more than 64k worth of space to hold both the remote attribute value header (64 bytes). On a 4k block filesystem this results in a 68k buffer; on a 64k block filesystem, this would be a 128k buffer. Note that even though we'll never use more than 65,600 bytes of this buffer, XFS_MAX_BLOCKSIZE is 64k. This is a problem because the definition of struct xfs_buf_log_format allows for XFS_MAX_BLOCKSIZE worth of dirty bitmap (64k). On i386 when we invalidate a remote attribute, xfs_trans_binval zeroes all 68k worth of the dirty map, writing right off the end of the log item and corrupting memory. We've gotten away with this on x86_64 for years because the compiler inserts a u32 padding on the end of struct xfs_buf_log_format. Fortunately for us, remote attribute values are written to disk with xfs_bwrite(), which is to say that they are not logged. Fix the problem by removing all places where we could end up creating a buffer log item for a remote attribute value and leave a note explaining why. Next, replace the open-coded buffer invalidation with a call to the helper we created in the previous patch that does better checking for bad metadata before marking the buffer stale. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 8edbb26b06023de31ad7d4c9b984d99f66577929 Author: Darrick J. Wong Date: Wed Jan 8 09:08:07 2020 -0800 xfs: refactor remote attr value buffer invalidation Hoist the code that invalidates remote extended attribute value buffers into a separate helper function. This prepares us for a memory corruption fix in the next patch. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 5777eaed566a1d63e344d3dd8f2b5e33be20643e Author: Robin Murphy Date: Wed Jan 15 16:42:39 2020 +0000 arm64: Implement optimised checksum routine Apparently there exist certain workloads which rely heavily on software checksumming, for which the generic do_csum() implementation becomes a significant bottleneck. Therefore let's give arm64 its own optimised version - for ease of maintenance this foregoes assembly or intrisics, and is thus not actually arm64-specific, but does rely heavily on C idioms that translate well to the A64 ISA and the typical load/store capabilities of most ARMv8 CPU cores. The resulting increase in checksum throughput scales nicely with buffer size, tending towards 4x for a small in-order core (Cortex-A53), and up to 6x or more for an aggressive big core (Ampere eMAG). Reported-by: Lingyan Huang Tested-by: Lingyan Huang Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit 567d746b55bc66d3800c9ae91d50f0c5deb2fd93 Author: Jeremy Sowden Date: Wed Jan 15 20:05:57 2020 +0000 netfilter: bitwise: add support for shifts. Hitherto nft_bitwise has only supported boolean operations: NOT, AND, OR and XOR. Extend it to do shifts as well. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso commit 779f725e142cd987a69296c0eb7d416ee3ba57dd Author: Jeremy Sowden Date: Wed Jan 15 20:05:56 2020 +0000 netfilter: bitwise: add NFTA_BITWISE_DATA attribute. Add a new bitwise netlink attribute that will be used by shift operations to store the size of the shift. It is not used by boolean operations. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso commit ed991d43634b11e759a800850ba9656b5b467a56 Author: Jeremy Sowden Date: Wed Jan 15 20:05:55 2020 +0000 netfilter: bitwise: only offload boolean operations. Only boolean operations supports offloading, so check the type of the operation and return an error for other types. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso commit 4d57ca2be146bdb272b57892ec59cd273f9ef3fc Author: Jeremy Sowden Date: Wed Jan 15 20:05:54 2020 +0000 netfilter: bitwise: add helper for dumping boolean operations. Split the code specific to dumping bitwise boolean operations out into a separate function. A similar function will be added later for shift operations. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso commit 71d6ded3ac496f9a6563752917921b7db0f38a34 Author: Jeremy Sowden Date: Wed Jan 15 20:05:53 2020 +0000 netfilter: bitwise: add helper for evaluating boolean operations. Split the code specific to evaluating bitwise boolean operations out into a separate function. Similar functions will be added later for shift operations. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso commit 3f8d9eb032ec76c35344a2453c4c4a0a29805e3f Author: Jeremy Sowden Date: Wed Jan 15 20:05:52 2020 +0000 netfilter: bitwise: add helper for initializing boolean operations. Split the code specific to initializing bitwise boolean operations out into a separate function. A similar function will be added later for shift operations. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso commit 9d1f979986c2e29632b6a8f7a8ef8b3c7d24a48c Author: Jeremy Sowden Date: Wed Jan 15 20:05:51 2020 +0000 netfilter: bitwise: add NFTA_BITWISE_OP netlink attribute. Add a new bitwise netlink attribute, NFTA_BITWISE_OP, which is set to a value of a new enum, nft_bitwise_ops. It describes the type of operation an expression contains. Currently, it only has one value: NFT_BITWISE_BOOL. More values will be added later to implement shifts. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso commit 577c734a81e2f59aa4490071ebe074fc05d5540b Author: Jeremy Sowden Date: Wed Jan 15 20:05:50 2020 +0000 netfilter: bitwise: replace gotos with returns. When dumping a bitwise expression, if any of the puts fails, we use goto to jump to a label. However, no clean-up is required and the only statement at the label is a return. Drop the goto's and return immediately instead. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso commit 265ec7b0e8c35ea70e694da43aa8896e2614def9 Author: Jeremy Sowden Date: Wed Jan 15 20:05:49 2020 +0000 netfilter: bitwise: remove NULL comparisons from attribute checks. In later patches, we will be adding more checks. In order to be consistent and prevent complaints from checkpatch.pl, replace the existing comparisons with NULL with logical NOT operators. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso commit fbf19ddf396b3526718a64e24ace316c64d3ed1f Author: Jeremy Sowden Date: Wed Jan 15 20:05:48 2020 +0000 netfilter: nf_tables: white-space fixes. Indentation fixes for the parameters of a few nft functions. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso commit a7965d58ddab0253ddfae58bd5c7d2de46ef0f76 Author: Pablo Neira Ayuso Date: Mon Jan 13 19:02:22 2020 +0100 netfilter: flowtable: add nf_flow_table_offload_cmd() Split nf_flow_table_offload_setup() in two functions to make it more maintainable. Signed-off-by: Pablo Neira Ayuso commit ae29045018c83495f8c5033afabbedc09f24d7c2 Author: Pablo Neira Ayuso Date: Mon Jan 13 19:02:14 2020 +0100 netfilter: flowtable: add nf_flow_offload_tuple() helper Consolidate code to configure the flow_cls_offload structure into one helper function. Signed-off-by: Pablo Neira Ayuso commit 28b3a4270c0fc064557e409111f2a678e64b6fa7 Author: Florian Westphal Date: Tue Jan 7 12:25:10 2020 +0100 netfilter: hashlimit: do not use indirect calls during gc no need, just use a simple boolean to indicate we want to reap all entries. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit f698fe40829b21088d323c8b0a7c626571528fc6 Author: Pablo Neira Ayuso Date: Mon Jan 6 12:56:47 2020 +0100 netfilter: flowtable: refresh flow if hardware offload fails If nf_flow_offload_add() fails to add the flow to hardware, then the NF_FLOW_HW_REFRESH flag bit is set and the flow remains in the flowtable software path. If flowtable hardware offload is enabled, this patch enqueues a new request to offload this flow to hardware. Signed-off-by: Pablo Neira Ayuso commit a5449cdcaac5c78d62b8bea8f79158071f23da01 Author: Pablo Neira Ayuso Date: Tue Jan 7 09:56:27 2020 +0100 netfilter: flowtable: add nf_flowtable_hw_offload() helper function This function checks for the NF_FLOWTABLE_HW_OFFLOAD flag, meaning that the flowtable hardware offload is enabled. Signed-off-by: Pablo Neira Ayuso commit 355a8b13f87a8964ebe785b065f1388a1bd00c7e Author: Pablo Neira Ayuso Date: Sun Jan 5 20:41:15 2020 +0100 netfilter: flowtable: use atomic bitwise operations for flow flags Originally, all flow flag bits were set on only from the workqueue. With the introduction of the flow teardown state and hardware offload this is no longer true. Let's be safe and use atomic bitwise operation to operation with flow flags. Fixes: 59c466dd68e7 ("netfilter: nf_flow_table: add a new flow state for tearing down offloading") Signed-off-by: Pablo Neira Ayuso commit 445db8d09659eb27bcd5920cb91d91686f0197d0 Author: Pablo Neira Ayuso Date: Sun Jan 5 22:00:57 2020 +0100 netfilter: flowtable: remove dying bit, use teardown bit instead The dying bit removes the conntrack entry if the netdev that owns this flow is going down. Instead, use the teardown mechanism to push back the flow to conntrack to let the classic software path decide what to do with it. Signed-off-by: Pablo Neira Ayuso commit 87265d842c59d93798b380afe3288a2bdc19bcd9 Author: Pablo Neira Ayuso Date: Sun Jan 5 20:48:51 2020 +0100 netfilter: flowtable: add nf_flow_offload_work_alloc() Add helper function to allocate and initialize flow offload work and use it to consolidate existing code. Signed-off-by: Pablo Neira Ayuso commit a7521a60a5f3e1f58a015fedb6e69aed40455feb Author: Pablo Neira Ayuso Date: Mon Jan 6 12:42:55 2020 +0100 netfilter: flowtable: restrict flow dissector match on meta ingress device Set on FLOW_DISSECTOR_KEY_META meta key using flow tuple ingress interface. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: Pablo Neira Ayuso commit 79b9b685dde1d1bf43cf84163c76953dc3781c85 Author: Pablo Neira Ayuso Date: Sun Jan 5 22:26:38 2020 +0100 netfilter: flowtable: fetch stats only if flow is still alive Do not fetch statistics if flow has expired since it might not in hardware anymore. After this update, remove the FLOW_OFFLOAD_HW_DYING check from nf_flow_offload_stats() since this flag is never set on. Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support") Signed-off-by: Pablo Neira Ayuso Acked-by: wenxu commit 4a7faaf4add3108522512c16c9ee08fb2ad4525e Author: Jeremy Sowden Date: Wed Jan 1 13:41:32 2020 +0000 netfilter: nft_bitwise: correct uapi header comment. The comment documenting how bitwise expressions work includes a table which summarizes the mask and xor arguments combined to express the supported boolean operations. However, the row for OR: mask xor 0 x is incorrect. dreg = (sreg & 0) ^ x is not equivalent to: dreg = sreg | x What the code actually does is: dreg = (sreg & ~x) ^ x Update the documentation to match. Signed-off-by: Jeremy Sowden Signed-off-by: Pablo Neira Ayuso commit 858e284f0ec18bff2620d9a6afe764dc683f8ba1 Author: Brian Vazquez Date: Wed Jan 15 20:59:18 2020 -0800 libbpf: Fix unneeded extra initialization in bpf_map_batch_common bpf_attr doesn't required to be declared with '= {}' as memset is used in the code. Fixes: 2ab3d86ea1859 ("libbpf: Add libbpf support to batch ops") Reported-by: Andrii Nakryiko Signed-off-by: Brian Vazquez Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200116045918.75597-1-brianvv@google.com commit c4c86abb3f9fb3d5bc113fb996298a30ec63e07b Author: Hans Westgaard Ry Date: Wed Jan 15 14:43:38 2020 +0200 net/rds: Detect need of On-Demand-Paging memory registration Add code to check if memory intended for RDMA is FS-DAX-memory. RDS will fail with error code EOPNOTSUPP if FS-DAX-memory is detected. Signed-off-by: Hans Westgaard Ry Acked-by: Santosh Shilimkar Signed-off-by: Leon Romanovsky commit 8ffc32485158528f870b62707077ab494ba31deb Author: Jason Gunthorpe Date: Wed Jan 15 14:43:37 2020 +0200 RDMA/mlx5: Fix handling of IOVA != user_va in ODP paths Till recently it was not possible for userspace to specify a different IOVA, but with the new ibv_reg_mr_iova() library call this can be done. To compute the user_va we must compute: user_va = (iova - iova_start) + user_va_start while being cautious of overflow and other math problems. The iova is not reliably stored in the mmkey when the MR is created. Only the cached creation path (the common one) set it, so it must also be set when creating uncached MRs. Fix the weird use of iova when computing the starting page index in the MR. In the normal case, when iova == umem.address: iova & (~(BIT(page_shift) - 1)) == ALIGN_DOWN(umem.address, odp->page_size) == ib_umem_start(odp) And when iova is different using it in math with a user_va is wrong. Finally, do not allow an implicit ODP to be created with a non-zero IOVA as we have no support for that. Fixes: 7bdf65d411c1 ("IB/mlx5: Handle page faults") Signed-off-by: Moni Shoua Signed-off-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky commit a73a895588520a40e52f967a7b2892baf810c708 Author: Moni Shoua Date: Wed Jan 15 14:43:36 2020 +0200 IB/mlx5: Mask out unsupported ODP capabilities for kernel QPs The ODP handler for WQEs in RQ or SRQ is not implented for kernel QPs. Therefore don't report support in these if query comes from a kernel user. Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky commit 4835709176e8ccf6561abc9f5c405293e008095f Author: Leon Romanovsky Date: Wed Jan 15 14:43:35 2020 +0200 RDMA/mlx5: Don't fake udata for kernel path Kernel paths must not set udata and provide NULL pointer, instead of faking zeroed udata struct. Signed-off-by: Leon Romanovsky commit da9ee9d8a8745e70e481446e0bfe2d773b1c364b Author: Moni Shoua Date: Wed Jan 15 14:43:34 2020 +0200 IB/mlx5: Add ODP WQE handlers for kernel QPs One of the steps in ODP page fault handler for WQEs is to read a WQE from a QP send queue or receive queue buffer at a specific index. Since the implementation of this buffer is different between kernel and user QP the implementation of the handler needs to be aware of that and handle it in a different way. ODP for kernel MRs is currently supported only for RDMA_READ and RDMA_WRITE operations so change the handler to - read a WQE from a kernel QP send queue - fail if access to receive queue or shared receive queue is required for a kernel QP Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky commit 87d8069f6b028793254ddd0a66df1d7b6d79b450 Author: Moni Shoua Date: Wed Jan 15 14:43:33 2020 +0200 IB/core: Add interface to advise_mr for kernel users Allow ULPs to call advise_mr, so they can control ODP regions in the same way as user space applications. Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky commit 33006bd4f37f7d2c3d1cf0268b4f327b5fdc2558 Author: Moni Shoua Date: Wed Jan 15 14:43:32 2020 +0200 IB/core: Introduce ib_reg_user_mr Add ib_reg_user_mr() for kernel ULPs to register user MRs. The common use case that uses this function is a userspace application that allocates memory for HCA access but the responsibility to register the memory at the HCA is on an kernel ULP. This ULP that acts as an agent for the userspace application. This function is intended to be used without a user context so vendor drivers need to be aware of calling reg_user_mr() device operation with udata equal to NULL. Among all drivers, i40iw is the only driver which relies on presence of udata, so check udata existence for that driver. Signed-off-by: Moni Shoua Reviewed-by: Guy Levi Signed-off-by: Leon Romanovsky commit c320e527e1548305f31d95ec405140b04aed25f5 Author: Moni Shoua Date: Wed Jan 15 14:43:31 2020 +0200 IB: Allow calls to ib_umem_get from kernel ULPs So far the assumption was that ib_umem_get() and ib_umem_odp_get() are called from flows that start in UVERBS and therefore has a user context. This assumption restricts flows that are initiated by ULPs and need the service that ib_umem_get() provides. This patch changes ib_umem_get() and ib_umem_odp_get() to get IB device directly by relying on the fact that both UVERBS and ULPs sets that field correctly. Reviewed-by: Guy Levi Signed-off-by: Moni Shoua Signed-off-by: Leon Romanovsky commit 3a51449b7959f68cc45abe67298e40c7eb57167b Author: Petr Mladek Date: Thu Oct 24 13:49:26 2019 +0200 watchdog/softlockup: Remove obsolete check of last reported task commit 9cf57731b63e ("watchdog/softlockup: Replace "watchdog/%u" threads with cpu_stop_work") ensures that the watchdog is reliably touched during a task switch. As a result the check for an unnoticed task switch is not longer needed. Remove the relevant code, which effectively reverts commit b1a8de1f5343 ("softlockup: make detector be aware of task switch of processes hogging cpu") Signed-off-by: Petr Mladek Signed-off-by: Thomas Gleixner Acked-by: Peter Ziljstra Link: https://lore.kernel.org/r/20191024114928.15377-2-pmladek@suse.com commit 1e5f532c273714abf4275df930b2c77aa1b63b51 Author: Sandeep Sheriker Mallikarjun Date: Wed Jan 15 12:59:47 2020 +0200 ARM: dts: at91: sam9x60: add device tree for soc and board Add device tree files for SAM9X60 SoC and SAM9X60-EK board. Signed-off-by: Sandeep Sheriker Mallikarjun Signed-off-by: Claudiu Beznea Signed-off-by: Tudor Ambarus Signed-off-by: Codrin Ciubotariu Acked-by: Nicolas Ferre Link: https://lore.kernel.org/r/1579085987-13976-6-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit be0b9aa757c74a2b10c555bd02ace71f929ab741 Author: Claudiu Beznea Date: Fri Jan 10 18:18:07 2020 +0200 dt-bindings: arm: add sam9x60-ek board Add documentation for SAM9X60-EK board. Signed-off-by: Claudiu Beznea Acked-by: Rob Herring Link: https://lore.kernel.org/r/1578673089-3484-16-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit 82d1b8158c9a77c2c9b04c4af22fd62f3686cd9d Author: Steven Rostedt (VMware) Date: Thu Jan 16 08:20:18 2020 -0500 tracing: Allow trace_printk() to nest in other tracing code trace_printk() is used to debug the kernel which includes the tracing infrastructure. But because it writes to the ring buffer, and so does much of the tracing infrastructure, the ring buffer's recursive detection will drop writes to the ring buffer that is in the same context as the current write is happening (it allows interrupts to write when normal context is writing, but wont let normal context write while normal context is writing). This can cause confusion and think that the code is where the trace_printk() exists is not hit. To solve this, up the recursive nesting of the ring buffer when trace_printk() is called before it writes to the buffer itself. Note, this does make it dangerous to use trace_printk() in the ring buffer code itself, because this basically disables the recursion protection of trace_printk() buffer writes. But as trace_printk() is only used for debugging, and if this does occur, the developer will see the cause real quick (recursive blowing up of the stack). Thus the developer can deal with that. But having trace_printk() silently ignored is a much bigger problem, and disabling recursive protection is a small price to pay to fix it. Signed-off-by: Steven Rostedt (VMware) commit f88f42f853a80d9b087f0c2035d6fbab504ea54c Author: Vladimir Murzin Date: Tue Jan 7 10:28:03 2020 +0000 arm64: context: Free up kernel ASIDs if KPTI is not in use We can extend user ASID space if it turns out that system does not require KPTI. We start with kernel ASIDs reserved because CPU caps are not finalized yet and free them up lazily on the next rollover if we confirm than KPTI is not in use. Reviewed-by: Catalin Marinas Signed-off-by: Vladimir Murzin Signed-off-by: Will Deacon commit 5098cae1f79cc0580dc2741ce250307a60451eca Author: Srinivas Kandagatla Date: Tue Jan 14 09:48:06 2020 +0000 dt-bindings: soundwire: fix example As wsa881x schema mentions #sound-dai-cells as required property, so update soundwire-controller.yaml example so that dt_bindings_check does not fail as below: Documentation/devicetree/bindings/soundwire/soundwire-controller.example.dt.yaml: speaker@0,1: '#sound-dai-cells' is a required property Documentation/devicetree/bindings/soundwire/soundwire-controller.example.dt.yaml: speaker@0,2: '#sound-dai-cells' is a required property Reported-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200114094806.15846-1-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit 550f9052040277a6b10ed8c125178beeb99ed407 Author: Pierre-Louis Bossart Date: Tue Jan 14 17:31:24 2020 -0600 soundwire: cadence: fix kernel-doc parameter descriptions Fix previous update, bad git merge likely. oops. Fixes: 39737a313085fa ("soundwire: cadence: update kernel-doc parameter descriptions") Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200114233124.13888-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 451ed9682babad0592c882ca303a4634cc1bb045 Merge: a19efb5265c3 92f622bc276a Author: Vinod Koul Date: Thu Jan 16 17:32:43 2020 +0530 Merge branch 'topic/sdw_intel' into next commit 92f622bc276a0b9281df3d145ebaffb904f0d290 Author: Bard Liao Date: Fri Jan 10 16:00:16 2020 -0600 soundwire: intel: report slave_ids for each link to SOF driver The existing link_mask flag is no longer sufficient to detect the hardware and identify which topology file and a machine driver to load. By reporting the slave_ids exposed in ACPI tables, the parent SOF driver will be able to compare against a set of static configurations. This patch only adds the interface change, the functionality is added in future patches. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110220016.30887-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit a04184ce777b46e92c2b3c93c6dcb2754cb005e1 Author: Michał Mirosław Date: Thu Jan 2 11:42:16 2020 +0100 mmc: sdhci-of-at91: fix memleak on clk_get failure sdhci_alloc_host() does its work not using managed infrastructure, so needs explicit free on error path. Add it where needed. Cc: Fixes: bb5f8ea4d514 ("mmc: sdhci-of-at91: introduce driver for the Atmel SDMMC") Signed-off-by: Michał Mirosław Acked-by: Ludovic Desroches Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/b2a44d5be2e06ff075f32477e466598bb0f07b36.1577961679.git.mirq-linux@rere.qmqm.pl Signed-off-by: Ulf Hansson commit 92f07e5c35b4c041a00480c30f6c361e0986e263 Merge: 1b21a701aed9 27f4e1e9425e Author: Ulf Hansson Date: Thu Jan 16 12:37:26 2020 +0100 Merge branch 'fixes' into next commit cd0a32371db73d0b50536a7ca4f036abddff0d1d Author: Mika Westerberg Date: Thu Jan 16 14:09:02 2020 +0300 pinctrl: tigerlake: Tiger Lake uses _HID enumeration Turns out that Tiger Lake GPIO will be enumerated using _HID method where there is only a single ACPI device and multiple BARs so rework the driver to support that scheme instead. Fixes: c9ccf71fc807 ("pinctrl: intel: Add Intel Tiger Lake pin controller support") Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 899b7e3374b253888b048dd06338e043e4b7637c Author: Mika Westerberg Date: Thu Jan 16 13:09:51 2020 +0200 pinctrl: sunrisepoint: Add Coffee Lake-S ACPI ID Intel Coffee Lake-S PCH has the same GPIO hardware than Sunrisepoint-H PCH but the ACPI ID is different. Add this new ACPI ID to the list of supported devices. Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit d129479f1fff5c88adbf8dff7649664916d28f81 Author: Jisheng Zhang Date: Wed Dec 18 05:31:25 2019 +0000 watchdog: Remove soft_lockup_hrtimer_cnt and related code After commit 9cf57731b63e ("watchdog/softlockup: Replace "watchdog/%u" threads with cpu_stop_work"), the percpu soft_lockup_hrtimer_cnt is not used any more, so remove it and related code. Signed-off-by: Jisheng Zhang Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191218131720.4146aea2@xhacker.debian commit 1b21a701aed9dc14b6c5b3c25dde668804b038d2 Author: Yangbo Lu Date: Wed Jan 8 12:07:13 2020 +0800 mmc: sdhci-of-esdhc: fix clock setting for different controller versions This patch is to fix clock setting code for different controller versions. Two of HW changes after vendor version 2.2 are removing PEREN/HCKEN/IPGEN bits in system control register, and adding SD clock stable bit in present state register. This patch cleans up related code too. Signed-off-by: Yangbo Lu Link: https://lore.kernel.org/r/20200108040713.38888-2-yangbo.lu@nxp.com Signed-off-by: Ulf Hansson commit 2aa3d826adb578b26629a79b775a552cfe3fedf7 Author: Yangbo Lu Date: Wed Jan 8 12:07:12 2020 +0800 mmc: sdhci-of-esdhc: fix esdhc_reset() for different controller versions This patch is to fix operating in esdhc_reset() for different controller versions, and to add bus-width restoring after data reset for eSDHC (verdor version <= 2.2). Also add annotation for understanding. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200108040713.38888-1-yangbo.lu@nxp.com Signed-off-by: Ulf Hansson commit 5b742232d707dd7f3da493b0ac54fe44ddfb4cb8 Author: Yangbo Lu Date: Thu Dec 12 15:52:19 2019 +0800 mmc: sdhci-of-esdhc: update tuning erratum A-008171 There is an official update for eSDHC tuning erratum A-008171. This patch is to implement the changes, - Affect all revisions of SoC. - Changes for tuning window checking. - Hardware hits a new condition that tuning succeeds although the eSDHC might not have tuned properly for type2 SoCs (soc_tuning_erratum_type2[] array in driver). So check tuning window after tuning succeeds. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20191212075219.48625-2-yangbo.lu@nxp.com Signed-off-by: Ulf Hansson commit f3c2082508c0704673ba7dfcd424f2ac225cfbfd Author: Yangbo Lu Date: Thu Dec 12 15:52:18 2019 +0800 mmc: sdhci-of-esdhc: convert to use esdhc_tuning_window_ptr() Convert to use a new function esdhc_tuning_window_ptr() to get tuning window start point and end point. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20191212075219.48625-1-yangbo.lu@nxp.com Signed-off-by: Ulf Hansson commit 275fa0ea2cf7a84450f9c0ec0d9e7ec168ed2e2d Author: Steven Price Date: Mon Dec 16 11:56:31 2019 +0000 arm64: Workaround for Cortex-A55 erratum 1530923 Cortex-A55 erratum 1530923 allows TLB entries to be allocated as a result of a speculative AT instruction. This may happen in the middle of a guest world switch while the relevant VMSA configuration is in an inconsistent state, leading to erroneous content being allocated into TLBs. The same workaround as is used for Cortex-A76 erratum 1165522 (WORKAROUND_SPECULATIVE_AT_VHE) can be used here. Note that this mandates the use of VHE on affected parts. Acked-by: Marc Zyngier Signed-off-by: Steven Price Signed-off-by: Will Deacon commit db0d46a58d34c7cd9d5ece98daf4b8afe3d770f8 Author: Steven Price Date: Mon Dec 16 11:56:30 2019 +0000 arm64: Rename WORKAROUND_1319367 to SPECULATIVE_AT_NVHE To match SPECULATIVE_AT_VHE let's also have a generic name for the NVHE variant. Acked-by: Marc Zyngier Reviewed-by: Suzuki K Poulose Signed-off-by: Steven Price Signed-off-by: Will Deacon commit e85d68faed4e79fd0b481c72de8245d4290369db Author: Steven Price Date: Mon Dec 16 11:56:29 2019 +0000 arm64: Rename WORKAROUND_1165522 to SPECULATIVE_AT_VHE Cortex-A55 is affected by a similar erratum, so rename the existing workaround for errarum 1165522 so it can be used for both errata. Acked-by: Marc Zyngier Reviewed-by: Suzuki K Poulose Signed-off-by: Steven Price Signed-off-by: Will Deacon commit 9c6722d85e92233082da2b3623685bba54d6093e Author: Kevin Hao Date: Thu Jan 16 17:50:03 2020 +0800 gpio: Fix the no return statement warning In commit 242587616710 ("gpiolib: Add support for the irqdomain which doesn't use irq_fwspec as arg") we have changed the return type of gpiochip_populate_parent_fwspec_twocell/fourcell() from void to void *, but forgot to add a return statement for these two dummy functions. Add "return NULL" to fix the build warnings. Reported-by: kbuild test robot Signed-off-by: Kevin Hao Link: https://lore.kernel.org/r/20200116095003.30324-1-haokexin@gmail.com Signed-off-by: Linus Walleij commit 490a421bc575d1bf391a6ad5b582dcfbd0037724 Author: Chanwoo Choi Date: Thu Dec 26 14:23:49 2019 +0900 PM / devfreq: Add debugfs support with devfreq_summary file Add debugfs interface to provide debugging information of devfreq device. It contains 'devfreq_summary' entry to show the summary of registered devfreq devices as following and the additional debugfs file will be added. - /sys/kernel/debug/devfreq/devfreq_summary [Detailed description of each field of 'devfreq_summary' debugfs file] - dev_name : Device name of h/w - dev : Device name made by devfreq core - parent_dev : If devfreq device uses the passive governor, show parent devfreq device name. Otherwise, show 'null'. - governor : Devfreq governor name - polling_ms : If devfreq device uses the simple_ondemand governor, polling_ms is necessary for the period. (unit: millisecond) - cur_freq_Hz : Current frequency (unit: Hz) - min_freq_Hz : Minimum frequency (unit: Hz) - max_freq_Hz : Maximum frequency (unit: Hz) [For example on Exynos5422-based Odroid-XU3 board] $ cat /sys/kernel/debug/devfreq/devfreq_summary dev_name dev parent_dev governor polling_ms cur_freq_Hz min_freq_Hz max_freq_Hz ------------------------------ ---------- ---------- --------------- ---------- ------------ ------------ ------------ 10c20000.memory-controller devfreq0 null simple_ondemand 0 165000000 165000000 825000000 soc:bus_wcore devfreq1 null simple_ondemand 50 532000000 88700000 532000000 soc:bus_noc devfreq2 devfreq1 passive 0 111000000 66600000 111000000 soc:bus_fsys_apb devfreq3 devfreq1 passive 0 222000000 111000000 222000000 soc:bus_fsys devfreq4 devfreq1 passive 0 200000000 75000000 200000000 soc:bus_fsys2 devfreq5 devfreq1 passive 0 200000000 75000000 200000000 soc:bus_mfc devfreq6 devfreq1 passive 0 333000000 83250000 333000000 soc:bus_gen devfreq7 devfreq1 passive 0 266000000 88700000 266000000 soc:bus_peri devfreq8 devfreq1 passive 0 66600000 66600000 66600000 soc:bus_g2d devfreq9 devfreq1 passive 0 333000000 83250000 333000000 soc:bus_g2d_acp devfreq10 devfreq1 passive 0 266000000 66500000 266000000 soc:bus_jpeg devfreq11 devfreq1 passive 0 300000000 75000000 300000000 soc:bus_jpeg_apb devfreq12 devfreq1 passive 0 166500000 83250000 166500000 soc:bus_disp1_fimd devfreq13 devfreq1 passive 0 200000000 120000000 200000000 soc:bus_disp1 devfreq14 devfreq1 passive 0 300000000 120000000 300000000 soc:bus_gscl_scaler devfreq15 devfreq1 passive 0 300000000 150000000 300000000 soc:bus_mscl devfreq16 devfreq1 passive 0 666000000 84000000 666000000 [lkp: Reported the build error] Reported-by: kbuild test robot Signed-off-by: Chanwoo Choi commit c249177944b650816069f6c49b769baaa94339dc Author: Alexander Tsoy Date: Wed Jan 15 18:13:58 2020 +0300 ALSA: usb-audio: add implicit fb quirk for MOTU M Series This fixes crackling sound during playback. Further note: MOTU is known for reusing Product IDs for different devices or different generations of the device (e.g. MicroBook I/II/IIc shares a single Product ID). This patch was only tested with M4 audio interface, but the same Product ID is also used by M2. Hope it will work for M2 as well. Signed-off-by: Alexander Tsoy Link: https://lore.kernel.org/r/20200115151358.56672-1-alexander@tsoy.me Signed-off-by: Takashi Iwai commit 5379e4dd3220e23f68ce70b76b3a52a9a68cee05 Author: Thomas Hellstrom Date: Fri Nov 22 09:34:35 2019 +0100 mm, drm/ttm: Fix vm page protection handling TTM graphics buffer objects may, transparently to user-space, move between IO and system memory. When that happens, all PTEs pointing to the old location are zapped before the move and then faulted in again if needed. When that happens, the page protection caching mode- and encryption bits may change and be different from those of struct vm_area_struct::vm_page_prot. We were using an ugly hack to set the page protection correctly. Fix that and instead export and use vmf_insert_mixed_prot() or use vmf_insert_pfn_prot(). Also get the default page protection from struct vm_area_struct::vm_page_prot rather than using vm_get_page_prot(). This way we catch modifications done by the vm system for drivers that want write-notification. Cc: Andrew Morton Cc: Michal Hocko Cc: "Matthew Wilcox (Oracle)" Cc: "Kirill A. Shutemov" Cc: Ralph Campbell Cc: "Jérôme Glisse" Cc: "Christian König" Signed-off-by: Thomas Hellstrom Reviewed-by: Christian König Acked-by: Andrew Morton commit 574c5b3d0e4c0803d3094fd27f83e161345ebe2f Author: Thomas Hellstrom Date: Fri Nov 22 09:25:12 2019 +0100 mm: Add a vmf_insert_mixed_prot() function The TTM module today uses a hack to be able to set a different page protection than struct vm_area_struct::vm_page_prot. To be able to do this properly, add the needed vm functionality as vmf_insert_mixed_prot(). Cc: Andrew Morton Cc: Michal Hocko Cc: "Matthew Wilcox (Oracle)" Cc: "Kirill A. Shutemov" Cc: Ralph Campbell Cc: "Jérôme Glisse" Cc: "Christian König" Signed-off-by: Thomas Hellstrom Acked-by: Christian König Acked-by: Michal Hocko Acked-by: Andrew Morton commit 6bc8038035267d12df2bf78a8e1a5f07069fabb8 Author: YueHaibing Date: Thu Jan 16 02:26:57 2020 +0000 sfc: remove duplicated include from efx.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 117717e57440d2b5e07da40c621aa4f0ba423b80 Author: Marcel Holtmann Date: Wed Jan 15 21:35:32 2020 +0100 Bluetooth: Increment management interface revision Increment the mgmt revision due to the recently added commands. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit ab3d436bf3e9d05f58ceaa85ff7475bfcd6e45af Author: Geert Uytterhoeven Date: Sun Jan 12 17:58:58 2020 +0100 crypto: essiv - fix AEAD capitalization and preposition use in help text "AEAD" is capitalized everywhere else. Use "an" when followed by a written or spoken vowel. Fixes: be1eb7f78aa8fbe3 ("crypto: essiv - create wrapper template for ESSIV generation") Signed-off-by: Geert Uytterhoeven Signed-off-by: Herbert Xu commit 63fabc87a01d31ae98da5d9a8efeda04621d45aa Author: Zaibo Xu Date: Sat Jan 11 16:58:18 2020 +0800 crypto: hisilicon - add branch prediction macro This branch prediction macro on the hot path can improve small performance(about 2%) according to the test. Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit 92f0726d9c42b4fb503cb4e5c433743cc44312af Author: Zaibo Xu Date: Sat Jan 11 16:58:17 2020 +0800 crypto: hisilicon - adjust hpre_crt_para_get Reorder the input parameters of hpre_crt_para_get to make it cleaner. Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit 02ab994635eb4914e1c419b29594b19195669b78 Author: Zaibo Xu Date: Sat Jan 11 16:58:16 2020 +0800 crypto: hisilicon - Fixed some tiny bugs of HPRE 1.Use memzero_explicit to clear key; 2.Fix some little endian writings; 3.Fix some other bugs and stuff of code style; Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit dfee9955abc7ec9364413d16316181322cf44f2f Author: Zaibo Xu Date: Sat Jan 11 16:58:15 2020 +0800 crypto: hisilicon - Bugfixed tfm leak 1.Fixed the bug of software tfm leakage. 2.Update HW error log message. Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit 2f072d75d1ab32e9c7c43a54398f4360a0a42d5e Author: Zaibo Xu Date: Sat Jan 11 10:41:56 2020 +0800 crypto: hisilicon - Add aead support on SEC2 authenc(hmac(sha1),cbc(aes)), authenc(hmac(sha256),cbc(aes)), and authenc(hmac(sha512),cbc(aes)) support are added for SEC v2. Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit 473a0f9662d495b585fa5ebe5fe72ec54b6cb82c Author: Zaibo Xu Date: Sat Jan 11 10:41:55 2020 +0800 crypto: hisilicon - redefine skcipher initiation 1.Define base initiation of QP for context which can be reused. 2.Define cipher initiation for other algorithms. Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit b9c8d897a0c67c0c990b2e62865bd4c135a283a5 Author: Zaibo Xu Date: Sat Jan 11 10:41:54 2020 +0800 crypto: hisilicon - Add branch prediction macro After adding branch prediction for skcipher hot path, a little bit income of performance is gotten. Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit 310ea0ac720707c2954a56a5163d4f601bf70635 Author: Zaibo Xu Date: Sat Jan 11 10:41:53 2020 +0800 crypto: hisilicon - Add callback error check Add error type parameter for call back checking inside. Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit d6de2a594377e001f8b0a4dde2a2b38ee3eca4bd Author: Zaibo Xu Date: Sat Jan 11 10:41:52 2020 +0800 crypto: hisilicon - Adjust some inner logic 1.Adjust call back function. 2.Adjust parameter checking function. Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit 7c7d902aa4059bd4637f8ba59f0bd49e57b4825d Author: Zaibo Xu Date: Sat Jan 11 10:41:51 2020 +0800 crypto: hisilicon - Update QP resources of SEC V2 1.Put resource including request and resource list into QP context structure to avoid allocate memory repeatedly. 2.Add max context queue number to void kcalloc large memory for QP context. 3.Remove the resource allocation operation. 4.Redefine resource allocation APIs to be shared by other algorithms. 5.Move resource allocation and free inner functions out of operations 'struct sec_req_op', and they are called directly. Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit a181647c06c21828c012df221d4adc1fd4125f16 Author: Zaibo Xu Date: Sat Jan 11 10:41:50 2020 +0800 crypto: hisilicon - Update some names on SEC V2 1.Adjust dma map function to be reused by AEAD algorithms; 2.Update some names of internal functions and variables to support AEAD algorithms; 3.Rename 'sec_skcipher_exit' as 'sec_skcipher_uninit'; 4.Rename 'sec_get/put_queue_id' as 'sec_alloc/free_queue_id'; Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit a718cfce062ea7d216a4d0fe50d28981b8426842 Author: Zaibo Xu Date: Sat Jan 11 10:41:49 2020 +0800 crypto: hisilicon - fix print/comment of SEC V2 Fixed some print, coding style and comments of HiSilicon SEC V2. Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit ca0d158dc9e5dc0902c1d507d82178d97f6f5709 Author: Zaibo Xu Date: Sat Jan 11 10:41:48 2020 +0800 crypto: hisilicon - Update debugfs usage of SEC V2 Applied some advices of Marco Elver on atomic usage of Debugfs, which is carried out by basing on Arnd Bergmann's fixing patch. Reported-by: Arnd Bergmann Reported-by: Marco Elver Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit 279c075dc1d25f888f1a7423ecd1fdcdc54eba6a Author: Rijo Thomas Date: Thu Jan 9 18:23:22 2020 +0530 tee: amdtee: remove redundant NULL check for pool Remove NULL check for pool variable, since in the current code path it is guaranteed to be non-NULL. Reported-by: Dan Carpenter Signed-off-by: Rijo Thomas Signed-off-by: Herbert Xu commit f9568eae924717c37f8f1a42a22eaa1754a96053 Author: Rijo Thomas Date: Thu Jan 9 18:23:21 2020 +0530 tee: amdtee: rename err label to err_device_unregister Rename err label to err_device_unregister for better readability. Suggested-by: Dan Carpenter Signed-off-by: Rijo Thomas Signed-off-by: Herbert Xu commit 2929015535fa355f604564ae5e542fd3c9179410 Author: Rijo Thomas Date: Thu Jan 9 18:23:20 2020 +0530 tee: amdtee: skip tee_device_unregister if tee_device_alloc fails Currently, if tee_device_alloc() fails, then tee_device_unregister() is a no-op. Therefore, skip the function call to tee_device_unregister() by introducing a new goto label 'err_free_pool'. Reported-by: Dan Carpenter Signed-off-by: Rijo Thomas Signed-off-by: Herbert Xu commit f4c58c3758f95eec5ea9cf1424d68350f00f9eb9 Author: Rijo Thomas Date: Thu Jan 9 18:23:19 2020 +0530 tee: amdtee: print error message if tee not present If there is no TEE with which the driver can communicate, then print an error message and return. Suggested-by: Dan Carpenter Signed-off-by: Rijo Thomas Signed-off-by: Herbert Xu commit 5ae63958a6dea78467c95f1669a4f0affa59935b Author: Rijo Thomas Date: Thu Jan 9 18:23:18 2020 +0530 tee: amdtee: remove unused variable initialization Remove unused variable initialization from driver code. If enabled as a compiler option, compiler may throw warning for unused assignments. Reported-by: Dan Carpenter Fixes: 757cc3e9ff1d ("tee: add AMD-TEE driver") Signed-off-by: Rijo Thomas Signed-off-by: Herbert Xu commit 1372a51b88fa0d5a8ed2803e4975c98da3f08463 Author: Daniel Axtens Date: Wed Jan 8 16:06:46 2020 +1100 crypto: vmx - reject xts inputs that are too short When the kernel XTS implementation was extended to deal with ciphertext stealing in commit 8083b1bf8163 ("crypto: xts - add support for ciphertext stealing"), a check was added to reject inputs that were too short. However, in the vmx enablement - commit 239668419349 ("crypto: vmx/xts - use fallback for ciphertext stealing"), that check wasn't added to the vmx implementation. This disparity leads to errors like the following: alg: skcipher: p8_aes_xts encryption unexpectedly succeeded on test vector "random: len=0 klen=64"; expected_error=-22, cfg="random: inplace may_sleep use_finup src_divs=[66.99%@+10, 33.1%@alignmask+1155]" Return -EINVAL if asked to operate with a cryptlen smaller than the AES block size. This brings vmx in line with the generic implementation. Reported-by: Erhard Furtner Link: https://bugzilla.kernel.org/show_bug.cgi?id=206049 Fixes: 239668419349 ("crypto: vmx/xts - use fallback for ciphertext stealing") Cc: Ard Biesheuvel Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Michael Ellerman [dja: commit message] Signed-off-by: Daniel Axtens Signed-off-by: Herbert Xu commit a8bdf2c42ee4d1ee42af1f3601f85de94e70a421 Author: Herbert Xu Date: Wed Jan 8 12:37:35 2020 +0800 crypto: curve25519 - Fix selftest build error If CRYPTO_CURVE25519 is y, CRYPTO_LIB_CURVE25519_GENERIC will be y, but CRYPTO_LIB_CURVE25519 may be set to m, this causes build errors: lib/crypto/curve25519-selftest.o: In function `curve25519': curve25519-selftest.c:(.text.unlikely+0xc): undefined reference to `curve25519_arch' lib/crypto/curve25519-selftest.o: In function `curve25519_selftest': curve25519-selftest.c:(.init.text+0x17e): undefined reference to `curve25519_base_arch' This is because the curve25519 self-test code is being controlled by the GENERIC option rather than the overall CURVE25519 option, as is the case with blake2s. To recap, the GENERIC and ARCH options for CURVE25519 are internal only and selected by users such as the Crypto API, or the externally visible CURVE25519 option which in turn is selected by wireguard. The self-test is specific to the the external CURVE25519 option and should not be enabled by the Crypto API. This patch fixes this by splitting the GENERIC module from the CURVE25519 module with the latter now containing just the self-test. Reported-by: Hulk Robot Fixes: aa127963f1ca ("crypto: lib/curve25519 - re-add selftests") Signed-off-by: Herbert Xu Reviewed-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit 2a2fbf20ad80f66cfd8e5018a7c4bfc4238c3228 Author: Horia Geantă Date: Mon Jan 6 22:01:53 2020 +0200 crypto: caam - add support for i.MX8M Nano Add support for the crypto engine used in i.mx8mn (i.MX 8M "Nano"), which is very similar to the one used in i.mx8mq, i.mx8mm. Since the clocks are identical for all members of i.MX 8M family, simplify the SoC <--> clock array mapping table. Signed-off-by: Horia Geantă Tested-by: Iuliana Prodan Reviewed-by: Iuliana Prodan Signed-off-by: Herbert Xu commit 4b0ec91af8a4ab11b0d68ede92ed810d131b815e Author: Corentin Labbe Date: Mon Jan 6 20:32:08 2020 +0100 crypto: sun8i-ce - remove dead code Some code were left in the final driver but without any use. Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 93d24ac4b26770f8e5118a731cd9314f3808bd10 Author: Corentin Labbe Date: Mon Jan 6 20:30:53 2020 +0100 crypto: sun8i-ce - fix removal of module Removing the driver cause an oops due to the fact we clean an extra channel. Let's give the right index to the cleaning function. Fixes: 06f751b61329 ("crypto: allwinner - Add sun8i-ce Crypto Engine") Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 24775ac2fe68132d3e0e7cd3a0521ccb1a5d7243 Author: Corentin Labbe Date: Mon Jan 6 20:29:50 2020 +0100 crypto: amlogic - fix removal of module Removing the driver cause an oops due to the fact we clean an extra channel. Let's give the right index to the cleaning function. Fixes: 48fe583fe541 ("crypto: amlogic - Add crypto accelerator for amlogic GXL") Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 7b3d853ead8187288bf99df38ed71ee02773a65f Author: Corentin Labbe Date: Mon Jan 6 20:28:52 2020 +0100 crypto: sun8i-ss - fix removal of module Removing the driver cause an oops due to the fact we clean an extra channel. Let's give the right index to the cleaning function. Fixes: f08fcced6d00 ("crypto: allwinner - Add sun8i-ss cryptographic offloader") Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 31899908a0d248b030b4464425b86c717e0007d4 Author: Jason A. Donenfeld Date: Sun Jan 5 22:40:49 2020 -0500 crypto: {arm,arm64,mips}/poly1305 - remove redundant non-reduction from emit This appears to be some kind of copy and paste error, and is actually dead code. Pre: f = 0 ⇒ (f >> 32) = 0 f = (f >> 32) + le32_to_cpu(digest[0]); Post: 0 ≤ f < 2³² put_unaligned_le32(f, dst); Pre: 0 ≤ f < 2³² ⇒ (f >> 32) = 0 f = (f >> 32) + le32_to_cpu(digest[1]); Post: 0 ≤ f < 2³² put_unaligned_le32(f, dst + 4); Pre: 0 ≤ f < 2³² ⇒ (f >> 32) = 0 f = (f >> 32) + le32_to_cpu(digest[2]); Post: 0 ≤ f < 2³² put_unaligned_le32(f, dst + 8); Pre: 0 ≤ f < 2³² ⇒ (f >> 32) = 0 f = (f >> 32) + le32_to_cpu(digest[3]); Post: 0 ≤ f < 2³² put_unaligned_le32(f, dst + 12); Therefore this sequence is redundant. And Andy's code appears to handle misalignment acceptably. Signed-off-by: Jason A. Donenfeld Tested-by: Ard Biesheuvel Reviewed-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit d7d7b853566254648df59f7ea27ea05952a6cfa8 Author: Jason A. Donenfeld Date: Sun Jan 5 22:40:48 2020 -0500 crypto: x86/poly1305 - wire up faster implementations for kernel These x86_64 vectorized implementations support AVX, AVX-2, and AVX512F. The AVX-512F implementation is disabled on Skylake, due to throttling, but it is quite fast on >= Cannonlake. On the left is cycle counts on a Core i7 6700HQ using the AVX-2 codepath, comparing this implementation ("new") to the implementation in the current crypto api ("old"). On the right are benchmarks on a Xeon Gold 5120 using the AVX-512 codepath. The new implementation is faster on all benchmarks. AVX-2 AVX-512 --------- ----------- size old new size old new ---- ---- ---- ---- ---- ---- 0 70 68 0 74 70 16 92 90 16 96 92 32 134 104 32 136 106 48 172 120 48 184 124 64 218 136 64 218 138 80 254 158 80 260 160 96 298 174 96 300 176 112 342 192 112 342 194 128 388 212 128 384 212 144 428 228 144 420 226 160 466 246 160 464 248 176 510 264 176 504 264 192 550 282 192 544 282 208 594 302 208 582 300 224 628 316 224 624 318 240 676 334 240 662 338 256 716 354 256 708 358 272 764 374 272 748 372 288 802 352 288 788 358 304 420 366 304 422 370 320 428 360 320 432 364 336 484 378 336 486 380 352 426 384 352 434 390 368 478 400 368 480 408 384 488 394 384 490 398 400 542 408 400 542 412 416 486 416 416 492 426 432 534 430 432 538 436 448 544 422 448 546 432 464 600 438 464 600 448 480 540 448 480 548 456 496 594 464 496 594 476 512 602 456 512 606 470 528 656 476 528 656 480 544 600 480 544 606 498 560 650 494 560 652 512 576 664 490 576 662 508 592 714 508 592 716 522 608 656 514 608 664 538 624 708 532 624 710 552 640 716 524 640 720 516 656 770 536 656 772 526 672 716 548 672 722 544 688 770 562 688 768 556 704 774 552 704 778 556 720 826 568 720 832 568 736 768 574 736 780 584 752 822 592 752 826 600 768 830 584 768 836 560 784 884 602 784 888 572 800 828 610 800 838 588 816 884 628 816 884 604 832 888 618 832 894 598 848 942 632 848 946 612 864 884 644 864 896 628 880 936 660 880 942 644 896 948 652 896 952 608 912 1000 664 912 1004 616 928 942 676 928 954 634 944 994 690 944 1000 646 960 1002 680 960 1008 646 976 1054 694 976 1062 658 992 1002 706 992 1012 674 1008 1052 720 1008 1058 690 This commit wires in the prior implementation from Andy, and makes the following changes to be suitable for kernel land. - Some cosmetic and structural changes, like renaming labels to .Lname, constants, and other Linux conventions, as well as making the code easy for us to maintain moving forward. - CPU feature checking is done in C by the glue code. - We avoid jumping into the middle of functions, to appease objtool, and instead parameterize shared code. - We maintain frame pointers so that stack traces make sense. - We remove the dependency on the perl xlate code, which transforms the output into things that assemblers we don't care about use. Importantly, none of our changes affect the arithmetic or core code, but just involve the differing environment of kernel space. Signed-off-by: Jason A. Donenfeld Signed-off-by: Samuel Neves Co-developed-by: Samuel Neves Signed-off-by: Herbert Xu commit 0896ca2a0cb6127e8a129f1f2a680d49b6b0f65c Author: Jason A. Donenfeld Date: Sun Jan 5 22:40:47 2020 -0500 crypto: x86/poly1305 - import unmodified cryptogams implementation These x86_64 vectorized implementations come from Andy Polyakov's CRYPTOGAMS implementation, and are included here in raw form without modification, so that subsequent commits that fix these up for the kernel can see how it has changed. Signed-off-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit 1c08a104360f3e18f4ee6346c21cc3923efb952e Author: Jason A. Donenfeld Date: Sun Jan 5 22:40:46 2020 -0500 crypto: poly1305 - add new 32 and 64-bit generic versions These two C implementations from Zinc -- a 32x32 one and a 64x64 one, depending on the platform -- come from Andrew Moon's public domain poly1305-donna portable code, modified for usage in the kernel. The precomputation in the 32-bit version and the use of 64x64 multiplies in the 64-bit version make these perform better than the code it replaces. Moon's code is also very widespread and has received many eyeballs of scrutiny. There's a bit of interference between the x86 implementation, which relies on internal details of the old scalar implementation. In the next commit, the x86 implementation will be replaced with a faster one that doesn't rely on this, so none of this matters much. But for now, to keep this passing the tests, we inline the bits of the old implementation that the x86 implementation relied on. Also, since we now support a slightly larger key space, via the union, some offsets had to be fixed up. Nonce calculation was folded in with the emit function, to take advantage of 64x64 arithmetic. However, Adiantum appeared to rely on no nonce handling in emit, so this path was conditionalized. We also introduced a new struct, poly1305_core_key, to represent the precise amount of space that particular implementation uses. Testing with kbench9000, depending on the CPU, the update function for the 32x32 version has been improved by 4%-7%, and for the 64x64 by 19%-30%. The 32x32 gains are small, but I think there's great value in having a parallel implementation to the 64x64 one so that the two can be compared side-by-side as nice stand-alone units. Signed-off-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit e3419426f2ca9416590650790bc20b3884348864 Merge: b279997f6c60 cb1eeb75cf3d Author: Herbert Xu Date: Thu Jan 16 15:17:08 2020 +0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Merge crypto tree to pick up hisilicon patch. commit 7b53b868a1812a9a6ab5e69249394bd37f29ce2c Author: Christoph Hellwig Date: Wed Jan 15 09:11:17 2020 -0800 xfs: fix IOCB_NOWAIT handling in xfs_file_dio_aio_read Direct I/O reads can also be used with RWF_NOWAIT & co. Fix the inode locking in xfs_file_dio_aio_read to take IOCB_NOWAIT into account. Signed-off-by: Christoph Hellwig Reviewed-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit ae563183b647b3bdb47e8a78a5de879adf733735 Author: Rocky Liao Date: Thu Jan 16 11:22:54 2020 +0800 Bluetooth: hci_qca: Enable power off/on support during hci down/up for QCA Rome This patch registers hdev->shutdown() callback and also sets HCI_QUIRK_NON_PERSISTENT_SETUP for QCA Rome. It will power-off the BT chip during hci down and power-on/initialize the chip again during hci up. As wcn399x already enabled this, this patch also removed the callback register and QUIRK setting in qca_setup() for wcn399x and uniformly do this in the probe() routine. Signed-off-by: Rocky Liao Signed-off-by: Marcel Holtmann commit ed0bc98f8cbe4f8254759d333a47aedc816ff8c5 Author: Nicholas Piggin Date: Thu Jul 11 12:24:03 2019 +1000 powerpc/64s: Reimplement power4_idle code in C This implements the tricky tracing and soft irq handling bits in C, leaving the low level bit to asm. A functional difference is that this redirects the interrupt exit to a return stub to execute blr, rather than the lr address itself. This is probably barely measurable on real hardware, but it keeps the link stack balanced. Tested with QEMU. Signed-off-by: Nicholas Piggin [mpe: Move power4_fixup_nap back into exceptions-64s.S] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190711022404.18132-1-npiggin@gmail.com commit 30e813cf46ccaeea6508607632e49b4a1d743d2a Author: Julia Lawall Date: Sun Dec 29 16:42:55 2019 +0100 misc: cxl: use mmgrab Mmgrab was introduced in commit f1f1007644ff ("mm: add new mmgrab() helper") and most of the kernel was updated to use it. Update a remaining file. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) @@ expression e; @@ - atomic_inc(&e->mm_count); + mmgrab(e); Signed-off-by: Julia Lawall Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1577634178-22530-2-git-send-email-Julia.Lawall@inria.fr commit c55d7b5e64265fdca45c85b639013e770bde2d0e Author: Russell Currey Date: Tue Dec 24 17:41:26 2019 +1100 powerpc: Remove STRICT_KERNEL_RWX incompatibility with RELOCATABLE I have tested this with the Radix MMU and everything seems to work, and the previous patch for Hash seems to fix everything too. STRICT_KERNEL_RWX should still be disabled by default for now. Please test STRICT_KERNEL_RWX + RELOCATABLE! Signed-off-by: Russell Currey Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191224064126.183670-2-ruscur@russell.cc commit 970d54f99ceac5bbf27929cb5ebfe18338ba1543 Author: Russell Currey Date: Tue Dec 24 17:41:25 2019 +1100 powerpc/book3s64/hash: Disable 16M linear mapping size if not aligned With STRICT_KERNEL_RWX on in a relocatable kernel under the hash MMU, if the position the kernel is loaded at is not 16M aligned things go horribly wrong. Specifically hash__mark_initmem_nx() will call hash__change_memory_range() which then aligns down the start address, and due to the text not being 16M aligned causes some of the kernel text to be marked non-executable. We can avoid this when selecting the linear mapping size, so do so and print a warning. I tested this for various alignments and as long as the position is 64K aligned it's fine (the base requirement for powerpc). Signed-off-by: Russell Currey [mpe: Add details of the failure mode] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191224064126.183670-1-ruscur@russell.cc commit 824b72db5086b84d944cea595a62ef1158f63af1 Author: Anand Lodnoor Date: Tue Jan 14 16:51:22 2020 +0530 scsi: megaraid_sas: Update driver version to 07.713.01.00-rc1 Link: https://lore.kernel.org/r/1579000882-20246-12-git-send-email-anand.lodnoor@broadcom.com Signed-off-by: Anand Lodnoor Signed-off-by: Martin K. Petersen commit 4d1634b8d12ecb844f0d1af0b79c703cf9911484 Author: Anand Lodnoor Date: Tue Jan 14 16:51:21 2020 +0530 scsi: megaraid_sas: Use Block layer API to check SCSI device in-flight IO requests Remove usage of device_busy counter from driver. Instead of device_busy counter now driver uses 'nr_active' counter of request_queue to get the number of inflight request for a LUN. Link: https://lore.kernel.org/r/1579000882-20246-11-git-send-email-anand.lodnoor@broadcom.com Link : https://patchwork.kernel.org/patch/11249297/ Signed-off-by: Chandrakanth Patil Signed-off-by: Anand Lodnoor Signed-off-by: Martin K. Petersen commit 56ee0c585602d32058d19da0d3b664be5bc374ba Author: Anand Lodnoor Date: Tue Jan 14 16:51:20 2020 +0530 scsi: megaraid_sas: Limit the number of retries for the IOCTLs causing firmware fault IOCTLs causing firmware fault may end up in failed controller resets and finally killing the adapter. This patch fixes this problem as stated below: In OCR sequence, driver will attempt refiring pended IOCTLs upto two times. If first two attempts fail, then in third attempt driver will return pended IOCTLs with EBUSY status to application. These changes are done to ensure if any of pended IOCTLs is causing firmware fault and resulting into OCR failure, then in last attempt of OCR driver will refrain firing it to firmware and saving adapter from being killed due to faulty IOCTL. Link: https://lore.kernel.org/r/1579000882-20246-10-git-send-email-anand.lodnoor@broadcom.com Signed-off-by: Sumit Saxena Signed-off-by: Shivasharan S Signed-off-by: Chandrakanth Patil Signed-off-by: Anand Lodnoor Signed-off-by: Martin K. Petersen commit 6d7537270e3283b92f9b327da9d58a4de40fe8d0 Author: Anand Lodnoor Date: Tue Jan 14 16:51:19 2020 +0530 scsi: megaraid_sas: Do not initiate OCR if controller is not in ready state Driver initiates OCR if a DCMD command times out. But there is a deadlock if the driver attempts to invoke another OCR before the mutex lock (reset_mutex) is released from the previous session of OCR. This patch takes care of the above scenario using new flag MEGASAS_FUSION_OCR_NOT_POSSIBLE to indicate if OCR is possible. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1579000882-20246-9-git-send-email-anand.lodnoor@broadcom.com Signed-off-by: Shivasharan S Signed-off-by: Anand Lodnoor Signed-off-by: Martin K. Petersen commit 201a810cc188af87d5798a383dc5115509e752ae Author: Anand Lodnoor Date: Tue Jan 14 16:51:18 2020 +0530 scsi: megaraid_sas: Re-Define enum DCMD_RETURN_STATUS DCMD_INIT is introduced to indicate the initial DCMD status, which was earlier set to MFI status. DCMD_BUSY indicates the resource is busy or locked. Link: https://lore.kernel.org/r/1579000882-20246-8-git-send-email-anand.lodnoor@broadcom.com Signed-off-by: Shivasharan S Signed-off-by: Anand Lodnoor Signed-off-by: Martin K. Petersen commit eeb63c23ffe1704990202af279400bf2b448ad89 Author: Anand Lodnoor Date: Tue Jan 14 16:51:17 2020 +0530 scsi: megaraid_sas: Do not set HBA Operational if FW is not in operational state After issuing a adapter reset, driver blindly used to set adprecovery flag to OPERATIONAL state. Add a check to see if the FW is operational before setting the flag and marking reset adapter successful. Link: https://lore.kernel.org/r/1579000882-20246-7-git-send-email-anand.lodnoor@broadcom.com Signed-off-by: Shivasharan S Signed-off-by: Anand Lodnoor Signed-off-by: Martin K. Petersen commit 9330a0fd827a02234ebdb536810d6adbbb6a2aaa Author: Anand Lodnoor Date: Tue Jan 14 16:51:16 2020 +0530 scsi: megaraid_sas: Do not kill HBA if JBOD Seqence map or RAID map is disabled At the time of firmware initialization, if JBOD map or RAID map is not available, driver can function without these features in a limited functionality mode. Link: https://lore.kernel.org/r/1579000882-20246-6-git-send-email-anand.lodnoor@broadcom.com Signed-off-by: Shivasharan S Signed-off-by: Anand Lodnoor Signed-off-by: Martin K. Petersen commit eb974f34bb9daa4b7309800beb596ee173f74eda Author: Anand Lodnoor Date: Tue Jan 14 16:51:15 2020 +0530 scsi: megaraid_sas: Do not kill host bus adapter, if adapter is already dead Link: https://lore.kernel.org/r/1579000882-20246-5-git-send-email-anand.lodnoor@broadcom.com Signed-off-by: Shivasharan S Signed-off-by: Anand Lodnoor Signed-off-by: Martin K. Petersen commit 6e73550670ed1c07779706bb6cf61b99c871fc42 Author: Anand Lodnoor Date: Tue Jan 14 16:51:14 2020 +0530 scsi: megaraid_sas: Update optimal queue depth for SAS and NVMe devices Ideally, optimal queue depth will be provided by firmware. The driver defines will be used as a fallback mechanism in case the FW assisted QD is not supported. The driver defined values provide optimal queue depth for most of the drives and the workloads, as is learned from the firmware assisted QD results. Link: https://lore.kernel.org/r/1579000882-20246-4-git-send-email-anand.lodnoor@broadcom.com Signed-off-by: Chandrakanth Patil Signed-off-by: Anand Lodnoor Signed-off-by: Martin K. Petersen commit a7faf81d7858b504279713d6cb98053f0ff00082 Author: Anand Lodnoor Date: Tue Jan 14 16:51:13 2020 +0530 scsi: megaraid_sas: Set no_write_same only for Virtual Disk Disable WRITE_SAME (no_write_same) for Virtual Disks only. For System PDs and EPDs (Enhanced PDs), WRITE_SAME need not be disabled by default. Link: https://lore.kernel.org/r/1579000882-20246-3-git-send-email-anand.lodnoor@broadcom.com Signed-off-by: Anand Lodnoor Signed-off-by: Martin K. Petersen commit 499e7246d6daa7c2655958e81febfbd76af1bc75 Author: Anand Lodnoor Date: Tue Jan 14 16:51:12 2020 +0530 scsi: megaraid_sas: Reset adapter if FW is not in READY state after device resume After device resume we expect the firmware to be in READY state. Transition to READY might fail due to unhandled exceptions, such as an internal error or a hardware failure. Retry initiating chip reset and wait for the controller to come to ready state. Link: https://lore.kernel.org/r/1579000882-20246-2-git-send-email-anand.lodnoor@broadcom.com Signed-off-by: Chandrakanth Patil Signed-off-by: Anand Lodnoor Signed-off-by: Martin K. Petersen commit ba304e5b4498157bd8c53ba14bb9a89a68996238 Author: Thomas Bogendoerfer Date: Tue Jan 14 17:09:36 2020 +0100 scsi: qla1280: Fix dma firmware download, if dma address is 64bit Do firmware download with 64bit LOAD_RAM command, if driver is using 64bit addressing. Link: https://lore.kernel.org/r/20200114160936.1517-1-tbogendoerfer@suse.de Signed-off-by: Thomas Bogendoerfer Signed-off-by: Martin K. Petersen commit f3c893e3dbb5d94f94072f7b1f2a8aece6240e7e Author: Gabriel Krisman Bertazi Date: Mon Jan 6 13:58:17 2020 -0500 scsi: iscsi: Fail session and connection on transport registration failure If the transport cannot be registered, the session/connection creation needs to be failed early to let the initiator know. Otherwise, the system will have an outstanding connection that cannot be used nor removed by open-iscsi. The result is similar to the error below, triggered by injecting a failure in the transport's registration path. openiscsi reports success: root@debian-vm:~# iscsiadm -m node -T iqn:lun1 -p 127.0.0.1 -l Logging in to [iface: default, target: iqn:lun1, portal: 127.0.0.1,3260] Login to [iface: default, target: iqn:lun1, portal:127.0.0.1,3260] successful. But cannot remove the session afterwards, since the kernel is in an inconsistent state. root@debian-vm:~# iscsiadm -m node -T iqn:lun1 -p 127.0.0.1 -u iscsiadm: No matching sessions found Link: https://lore.kernel.org/r/20200106185817.640331-4-krisman@collabora.com Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Martin K. Petersen commit cd7ea70bb00aac8f7ab1b0635edc669e12f53891 Author: Gabriel Krisman Bertazi Date: Mon Jan 6 13:58:16 2020 -0500 scsi: drivers: base: Propagate errors through the transport component The transport registration may fail. Make sure the errors are propagated to the callers. Link: https://lore.kernel.org/r/20200106185817.640331-3-krisman@collabora.com Reviewed-by: Greg Kroah-Hartman Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Martin K. Petersen commit 7c1ef338705fb5c53e6f574ae5eb19fdfacb3d26 Author: Gabriel Krisman Bertazi Date: Mon Jan 6 13:58:15 2020 -0500 scsi: drivers: base: Support atomic version of attribute_container_device_trigger attribute_container_device_trigger invokes callbacks that may fail for one or more classdevs, for instance, the transport_add_class_device callback, called during transport creation, does memory allocation. This information, though, is not propagated to upper layers, and any driver using the attribute_container_device_trigger API will not know whether any, some, or all callbacks succeeded. This patch implements a safe version of this dispatcher, to either succeed all the callbacks or revert to the original state. Link: https://lore.kernel.org/r/20200106185817.640331-2-krisman@collabora.com Reviewed-by: Greg Kroah-Hartman Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Martin K. Petersen commit 54155ed4199c7aa3fd20866648024ab63c96d579 Author: Nick Black Date: Thu Dec 26 15:31:48 2019 -0500 scsi: iscsi: Don't destroy session if there are outstanding connections A faulty userspace that calls destroy_session() before destroying the connections can trigger the failure. This patch prevents the issue by refusing to destroy the session if there are outstanding connections. ------------[ cut here ]------------ kernel BUG at mm/slub.c:306! invalid opcode: 0000 [#1] SMP PTI CPU: 1 PID: 1224 Comm: iscsid Not tainted 5.4.0-rc2.iscsi+ #7 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:__slab_free+0x181/0x350 [...] [ 1209.686056] RSP: 0018:ffffa93d4074fae0 EFLAGS: 00010246 [ 1209.686694] RAX: ffff934efa5ad800 RBX: 000000008010000a RCX: ffff934efa5ad800 [ 1209.687651] RDX: ffff934efa5ad800 RSI: ffffeb4041e96b00 RDI: ffff934efd402c40 [ 1209.688582] RBP: ffffa93d4074fb80 R08: 0000000000000001 R09: ffffffffbb5dfa26 [ 1209.689425] R10: ffff934efa5ad800 R11: 0000000000000001 R12: ffffeb4041e96b00 [ 1209.690285] R13: ffff934efa5ad800 R14: ffff934efd402c40 R15: 0000000000000000 [ 1209.691213] FS: 00007f7945dfb540(0000) GS:ffff934efda80000(0000) knlGS:0000000000000000 [ 1209.692316] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1209.693013] CR2: 000055877fd3da80 CR3: 0000000077384000 CR4: 00000000000006e0 [ 1209.693897] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1209.694773] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1209.695631] Call Trace: [ 1209.695957] ? __wake_up_common_lock+0x8a/0xc0 [ 1209.696712] iscsi_pool_free+0x26/0x40 [ 1209.697263] iscsi_session_teardown+0x2f/0xf0 [ 1209.698117] iscsi_sw_tcp_session_destroy+0x45/0x60 [ 1209.698831] iscsi_if_rx+0xd88/0x14e0 [ 1209.699370] netlink_unicast+0x16f/0x200 [ 1209.699932] netlink_sendmsg+0x21a/0x3e0 [ 1209.700446] sock_sendmsg+0x4f/0x60 [ 1209.700902] ___sys_sendmsg+0x2ae/0x320 [ 1209.701451] ? cp_new_stat+0x150/0x180 [ 1209.701922] __sys_sendmsg+0x59/0xa0 [ 1209.702357] do_syscall_64+0x52/0x160 [ 1209.702812] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 1209.703419] RIP: 0033:0x7f7946433914 [...] [ 1209.706084] RSP: 002b:00007fffb99f2378 EFLAGS: 00000246 ORIG_RAX: 000000000000002e [ 1209.706994] RAX: ffffffffffffffda RBX: 000055bc869eac20 RCX: 00007f7946433914 [ 1209.708082] RDX: 0000000000000000 RSI: 00007fffb99f2390 RDI: 0000000000000005 [ 1209.709120] RBP: 00007fffb99f2390 R08: 000055bc84fe9320 R09: 00007fffb99f1f07 [ 1209.710110] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000038 [ 1209.711085] R13: 000055bc8502306e R14: 0000000000000000 R15: 0000000000000000 Modules linked in: ---[ end trace a2d933ede7f730d8 ]--- Link: https://lore.kernel.org/r/20191226203148.2172200-1-krisman@collabora.com Signed-off-by: Nick Black Co-developed-by: Salman Qazi Signed-off-by: Salman Qazi Co-developed-by: Junho Ryu Signed-off-by: Junho Ryu Co-developed-by: Khazhismel Kumykov Signed-off-by: Khazhismel Kumykov Co-developed-by: Gabriel Krisman Bertazi Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Lee Duncan Signed-off-by: Martin K. Petersen commit ea92c32bd336efba89c5b09cf609e6e26e963796 Author: Stanley Chu Date: Sat Jan 11 15:11:47 2020 +0800 scsi: ufs-mediatek: add apply_dev_quirks variant operation Add vendor-specific variant callback "apply_dev_quirks" to MediaTek UFS driver. Cc: Alim Akhtar Cc: Asutosh Das Cc: Avri Altman Cc: Bart Van Assche Cc: Bean Huo Cc: Can Guo Cc: Matthias Brugger Link: https://lore.kernel.org/r/1578726707-6596-3-git-send-email-stanley.chu@mediatek.com Reviewed-by: Avri Altman Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit c40ad6b7fcd35bc4d36db820c7737e1aa18d5d41 Author: Stanley Chu Date: Sat Jan 11 15:11:46 2020 +0800 scsi: ufs: pass device information to apply_dev_quirks Pass UFS device information to vendor-specific variant callback "apply_dev_quirks" because some platform vendors need to know such information to apply special handling or quirks in specific devices. At the same time, modify existing vendor implementations according to the new interface for those vendor drivers which will be built-in or built as a module alone with UFS core driver. [mkp: clarified commit desc] Cc: Alim Akhtar Cc: Asutosh Das Cc: Avri Altman Cc: Bart Van Assche Cc: Bean Huo Cc: Can Guo Cc: Matthias Brugger Link: https://lore.kernel.org/r/1578726707-6596-2-git-send-email-stanley.chu@mediatek.com Reviewed-by: Avri Altman Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 43622697117c39357a3fecf849416df181ce4621 Author: Colin Ian King Date: Wed Jan 8 19:38:00 2020 +0000 scsi: BusLogic: use %lX for unsigned long rather than %X Currently the incorrect %X print format specifier is being used for several unsigned longs. Fix these by using %lX instead. Also join up some literal strings that are split. Link: https://lore.kernel.org/r/20200108193800.96706-1-colin.king@canonical.com Addresses-Coverity: ("Invalid type in argument to printf format specifier") Signed-off-by: Colin Ian King Acked-by: Khalid Aziz Signed-off-by: Martin K. Petersen commit fd1fb4d5562a8772643f81f41d939fad8c9dfedb Author: Stanley Chu Date: Sat Jan 4 22:26:08 2020 +0800 scsi: ufs: remove "errors" word in ufshcd_print_err_hist() Remove "errors" word in output string by ufshcd_print_err_hist() since not all printed targets are "errors". Sometimes they are just "events". In addition, all events which can be treated as "errors" already have "err" or "fail" words in their names. Cc: Alim Akhtar Cc: Asutosh Das Cc: Avri Altman Cc: Bart Van Assche Cc: Bean Huo Cc: Can Guo Cc: Matthias Brugger Link: https://lore.kernel.org/r/1578147968-30938-4-git-send-email-stanley.chu@mediatek.com Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit a5fe372d92396bbcae2e2688e542d8d77e34662b Author: Stanley Chu Date: Sat Jan 4 22:26:07 2020 +0800 scsi: ufs: add device reset history for vendor implementations Device reset history shall be also added for vendor's device reset variant operation implementation. Cc: Alim Akhtar Cc: Asutosh Das Cc: Avri Altman Cc: Bart Van Assche Cc: Bean Huo Cc: Can Guo Cc: Matthias Brugger Link: https://lore.kernel.org/r/1578147968-30938-3-git-send-email-stanley.chu@mediatek.com Reviewed-by: Bean Huo Reviewed-by: Asutosh Das Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 645728a6448fece4817acdb7efba7c19e5c3e311 Author: Stanley Chu Date: Sat Jan 4 22:26:06 2020 +0800 scsi: ufs: fix empty check of error history Currently checking if an error history element is empty or not is by its "value". In most cases, value is error code. However this checking is not correct because some errors or events do not specify any values in error history so values remain as 0, and this will lead to incorrect empty checking. Fix it by checking "timestamp" instead of "value" because timestamp will be always assigned for all history elements Cc: Alim Akhtar Cc: Asutosh Das Cc: Avri Altman Cc: Bart Van Assche Cc: Bean Huo Cc: Can Guo Cc: Matthias Brugger Link: https://lore.kernel.org/r/1578147968-30938-2-git-send-email-stanley.chu@mediatek.com Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit b65053cd94f46619b4aae746b98f2d8d9274540e Author: Andrii Nakryiko Date: Wed Jan 15 16:55:49 2020 -0800 selftests/bpf: Add whitelist/blacklist of test names to test_progs Add ability to specify a list of test name substrings for selecting which tests to run. So now -t is accepting a comma-separated list of strings, similarly to how -n accepts a comma-separated list of test numbers. Additionally, add ability to blacklist tests by name. Blacklist takes precedence over whitelist. Blacklisting is important for cases where it's known that some tests can't pass (e.g., due to perf hardware events that are not available within VM). This is going to be used for libbpf testing in Travis CI in its Github repo. Example runs with just whitelist and whitelist + blacklist: $ sudo ./test_progs -tattach,core/existence #1 attach_probe:OK #6 cgroup_attach_autodetach:OK #7 cgroup_attach_multi:OK #8 cgroup_attach_override:OK #9 core_extern:OK #10/44 existence:OK #10/45 existence___minimal:OK #10/46 existence__err_int_sz:OK #10/47 existence__err_int_type:OK #10/48 existence__err_int_kind:OK #10/49 existence__err_arr_kind:OK #10/50 existence__err_arr_value_type:OK #10/51 existence__err_struct_type:OK #10 core_reloc:OK #19 flow_dissector_reattach:OK #60 tp_attach_query:OK Summary: 8/8 PASSED, 0 SKIPPED, 0 FAILED $ sudo ./test_progs -tattach,core/existence -bcgroup,flow/arr #1 attach_probe:OK #9 core_extern:OK #10/44 existence:OK #10/45 existence___minimal:OK #10/46 existence__err_int_sz:OK #10/47 existence__err_int_type:OK #10/48 existence__err_int_kind:OK #10/51 existence__err_struct_type:OK #10 core_reloc:OK #60 tp_attach_query:OK Summary: 4/6 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Cc: Julia Kartseva Link: https://lore.kernel.org/bpf/20200116005549.3644118-1-andriin@fb.com commit bd71c453db91ecb464405411f2821d040f2a0d44 Author: Vineet Gupta Date: Wed Jan 15 16:08:12 2020 -0800 ARC: wireup clone3 syscall Signed-off-by: Vineet Gupta commit d5c8dc0d4c880fbde5293cc186b1ab23466254c4 Author: Nicolas Saenz Julienne Date: Mon Dec 16 12:01:08 2019 +0100 ARM: dts: bcm2711: Enable PCIe controller This enables bcm2711's PCIe bus, which is hardwired to a VIA Technologies XHCI USB 3.0 controller. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Florian Fainelli commit c5a1e5375d19bd4001c59dc5d482ac5b1ba51cbf Author: Nicolas Saenz Julienne Date: Fri Jan 10 18:29:35 2020 +0100 ARM: dts: bcm283x: Unify CMA configuration With the introduction of the Raspberry Pi 4 we were forced to explicitly configure CMA's location, since arm64 defaults it into the ZONE_DMA32 memory area, which is not good enough to perform DMA operations on that device. To bypass this limitation a dedicated CMA DT node was created, explicitly indicating the acceptable memory range and size. That said, compatibility between boards is a must on the Raspberry Pi ecosystem so this creates a common CMA DT node so as for DT overlays to be able to update CMA's properties regardless of the board being used. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Phil Elwell Signed-off-by: Florian Fainelli commit 7bcfea9615f60506e6573e35bb7596f776640509 Merge: 990bca1fc8ad 4e1ea33292ff Author: Alexei Starovoitov Date: Wed Jan 15 15:23:28 2020 -0800 Merge branch 'bpftool-improvements' Martin Lau says: ==================== When a map is storing a kernel's struct, its map_info->btf_vmlinux_value_type_id is set. The first map type supporting it is BPF_MAP_TYPE_STRUCT_OPS. This series adds support to dump this kind of map with BTF. The first two patches are bug fixes which are only applicable to bpf-next. Please see individual patches for details. v3: - Remove unnecessary #include "libbpf_internal.h" from patch 5 v2: - Expose bpf_find_kernel_btf() as a LIBBPF_API in patch 3 (Andrii) - Cache btf_vmlinux in bpftool/map.c (Andrii) ==================== Signed-off-by: Alexei Starovoitov commit 4e1ea33292ff2ea0a82f52b2600abb4aba752094 Author: Martin KaFai Lau Date: Wed Jan 15 15:00:44 2020 -0800 bpftool: Support dumping a map with btf_vmlinux_value_type_id This patch makes bpftool support dumping a map's value properly when the map's value type is a type of the running kernel's btf. (i.e. map_info.btf_vmlinux_value_type_id is set instead of map_info.btf_value_type_id). The first usecase is for the BPF_MAP_TYPE_STRUCT_OPS. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200115230044.1103008-1-kafai@fb.com commit 84c72ceee91c166e19b506d618dbe9df6eacce97 Author: Martin KaFai Lau Date: Wed Jan 15 15:00:37 2020 -0800 bpftool: Add struct_ops map name This patch adds BPF_MAP_TYPE_STRUCT_OPS to "struct_ops" name mapping so that "bpftool map show" can print the "struct_ops" map type properly. [root@arch-fb-vm1 bpf]# ~/devshare/fb-kernel/linux/tools/bpf/bpftool/bpftool map show id 8 8: struct_ops name dctcp flags 0x0 key 4B value 256B max_entries 1 memlock 4096B btf_id 7 Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200115230037.1102674-1-kafai@fb.com commit fb2426ad00b136c88d57457504d1e843159a367a Author: Martin KaFai Lau Date: Wed Jan 15 15:00:31 2020 -0800 libbpf: Expose bpf_find_kernel_btf as a LIBBPF_API This patch exposes bpf_find_kernel_btf() as a LIBBPF_API. It will be used in 'bpftool map dump' in a following patch to dump a map with btf_vmlinux_value_type_id set. bpf_find_kernel_btf() is renamed to libbpf_find_kernel_btf() and moved to btf.c. As is included, some of the max/min type casting needs to be fixed. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200115230031.1102305-1-kafai@fb.com commit 188a486619e6c9d7b8531ba6c4215b31304d293f Author: Martin KaFai Lau Date: Wed Jan 15 15:00:25 2020 -0800 bpftool: Fix missing BTF output for json during map dump The btf availability check is only done for plain text output. It causes the whole BTF output went missing when json_output is used. This patch simplifies the logic a little by avoiding passing "int btf" to map_dump(). For plain text output, the btf_wtr is only created when the map has BTF (i.e. info->btf_id != 0). The nullness of "json_writer_t *wtr" in map_dump() alone can decide if dumping BTF output is needed. As long as wtr is not NULL, map_dump() will print out the BTF-described data whenever a map has BTF available (i.e. info->btf_id != 0) regardless of json or plain-text output. In do_dump(), the "int btf" is also renamed to "int do_plain_btf". Fixes: 99f9863a0c45 ("bpftool: Match maps by name") Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Cc: Paul Chaignon Link: https://lore.kernel.org/bpf/20200115230025.1101828-1-kafai@fb.com commit d7de72674af53c3839eff091899f18c221dd30d2 Author: Martin KaFai Lau Date: Wed Jan 15 15:00:19 2020 -0800 bpftool: Fix a leak of btf object When testing a map has btf or not, maps_have_btf() tests it by actually getting a btf_fd from sys_bpf(BPF_BTF_GET_FD_BY_ID). However, it forgot to btf__free() it. In maps_have_btf() stage, there is no need to test it by really calling sys_bpf(BPF_BTF_GET_FD_BY_ID). Testing non zero info.btf_id is good enough. Also, the err_close case is unnecessary, and also causes double close() because the calling func do_dump() will close() all fds again. Fixes: 99f9863a0c45 ("bpftool: Match maps by name") Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Cc: Paul Chaignon Link: https://lore.kernel.org/bpf/20200115230019.1101352-1-kafai@fb.com commit 476878e4b2beaa60a8cce21bb5dcea86e640d3a3 Author: Marek Marczykowski-Górecki Date: Wed Jan 15 02:46:29 2020 +0100 xen-pciback: optionally allow interrupt enable flag writes QEMU running in a stubdom needs to be able to set INTX_DISABLE, and the MSI(-X) enable flags in the PCI config space. This adds an attribute 'allow_interrupt_control' which when set for a PCI device allows writes to this flag(s). The toolstack will need to set this for stubdoms. When enabled, guest (stubdomain) will be allowed to set relevant enable flags, but only one at a time - i.e. it refuses to enable more than one of INTx, MSI, MSI-X at a time. This functionality is needed only for config space access done by device model (stubdomain) serving a HVM with the actual PCI device. It is not necessary and unsafe to enable direct access to those bits for PV domain with the device attached. For PV domains, there are separate protocol messages (XEN_PCI_OP_{enable,disable}_{msi,msix}) for this purpose. Those ops in addition to setting enable bits, also configure MSI(-X) in dom0 kernel - which is undesirable for PCI passthrough to HVM guests. This should not introduce any new security issues since a malicious guest (or stubdom) can already generate MSIs through other ways, see [1] page 8. Additionally, when qemu runs in dom0, it already have direct access to those bits. This is the second iteration of this feature. First was proposed as a direct Xen interface through a new hypercall, but ultimately it was rejected by the maintainer, because of mixing pciback and hypercalls for PCI config space access isn't a good design. Full discussion at [2]. [1]: https://invisiblethingslab.com/resources/2011/Software%20Attacks%20on%20Intel%20VT-d.pdf [2]: https://xen.markmail.org/thread/smpgpws4umdzizze [part of the commit message and sysfs handling] Signed-off-by: Simon Gaiser [the rest] Signed-off-by: Marek Marczykowski-Górecki Reviewed-by: Roger Pau Monné [boris: A few small changes suggested by Roger, some formatting changes] Signed-off-by: Boris Ostrovsky commit 1ccf6c13d9c7282466f46189e9a1a2ed7f19816a Author: Jacob Keller Date: Tue Jan 14 12:09:18 2020 -0800 devlink: fix typos in qed documentation Review of the recently added documentation file for the qed driver noticed a couple of typos. Fix them now. Noticed-by: Michal Kalderon Fixes: 0f261c3ca09e ("devlink: add a driver-specific file for the qed driver") Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit 43d28c612f4c02a3fdea3d906170faece8ada9e1 Author: Ulrich Weber Date: Tue Jan 14 15:19:43 2020 +0100 pptp: support sockets bound to an interface use sk_bound_dev_if for route lookup as already done in most of the other ip_route_output_ports() calls. Since most PPPoA providers use 10.0.0.138 as default gateway IP this will allow connections to multiple PPTP providers with the same IP address over different interfaces. Signed-off-by: Ulrich Weber Signed-off-by: David S. Miller commit 990bca1fc8ad48f7f8b0786b739a9408017b7a74 Merge: 83e4b88be1ff f0fac2cec286 Author: Alexei Starovoitov Date: Wed Jan 15 14:00:36 2020 -0800 Merge branch 'bpf-batch-ops' Brian Vazquez says: ==================== This patch series introduce batch ops that can be added to bpf maps to lookup/lookup_and_delete/update/delete more than 1 element at the time, this is specially useful when syscall overhead is a problem and in case of hmap it will provide a reliable way of traversing them. The implementation inclues a generic approach that could potentially be used by any bpf map and adds it to arraymap, it also includes the specific implementation of hashmaps which are traversed using buckets instead of keys. The bpf syscall subcommands introduced are: BPF_MAP_LOOKUP_BATCH BPF_MAP_LOOKUP_AND_DELETE_BATCH BPF_MAP_UPDATE_BATCH BPF_MAP_DELETE_BATCH The UAPI attribute is: struct { /* struct used by BPF_MAP_*_BATCH commands */ __aligned_u64 in_batch; /* start batch, * NULL to start from beginning */ __aligned_u64 out_batch; /* output: next start batch */ __aligned_u64 keys; __aligned_u64 values; __u32 count; /* input/output: * input: # of key/value * elements * output: # of filled elements */ __u32 map_fd; __u64 elem_flags; __u64 flags; } batch; in_batch and out_batch are only used for lookup and lookup_and_delete since those are the only two operations that attempt to traverse the map. update/delete batch ops should provide the keys/values that user wants to modify. Here are the previous discussions on the batch processing: - https://lore.kernel.org/bpf/20190724165803.87470-1-brianvv@google.com/ - https://lore.kernel.org/bpf/20190829064502.2750303-1-yhs@fb.com/ - https://lore.kernel.org/bpf/20190906225434.3635421-1-yhs@fb.com/ Changelog sinve v4: - Remove unnecessary checks from libbpf API (Andrii Nakryiko) - Move DECLARE_LIBBPF_OPTS with all var declarations (Andrii Nakryiko) - Change bucket internal buffer size to 5 entries (Yonghong Song) - Fix some minor bugs in hashtab batch ops implementation (Yonghong Song) Changelog sinve v3: - Do not use copy_to_user inside atomic region (Yonghong Song) - Use _opts approach on libbpf APIs (Andrii Nakryiko) - Drop generic_map_lookup_and_delete_batch support - Free malloc-ed memory in tests (Yonghong Song) - Reverse christmas tree (Yonghong Song) - Add acked labels Changelog sinve v2: - Add generic batch support for lpm_trie and test it (Yonghong Song) - Use define MAP_LOOKUP_RETRIES for retries (John Fastabend) - Return errors directly and remove labels (Yonghong Song) - Insert new API functions into libbpf alphabetically (Yonghong Song) - Change hlist_nulls_for_each_entry_rcu to hlist_nulls_for_each_entry_safe in htab batch ops (Yonghong Song) Changelog since v1: - Fix SOB ordering and remove Co-authored-by tag (Alexei Starovoitov) Changelog since RFC: - Change batch to in_batch and out_batch to support more flexible opaque values to iterate the bpf maps. - Remove update/delete specific batch ops for htab and use the generic implementations instead. ==================== Acked-by: Yonghong Song Signed-off-by: Alexei Starovoitov commit 8fec380ac0d4e57aaf0d475482b840a1f3e3e0f3 Merge: 4e2fa6b90275 b2e55ca89245 Author: David S. Miller Date: Wed Jan 15 23:04:04 2020 +0100 Merge tag 'batadv-next-for-davem-20200114' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This feature/cleanup patchset includes the following patches: - bump version strings, by Simon Wunderlich - fix typo and kerneldocs, by Sven Eckelmann - use WiFi txbitrate for B.A.T.M.A.N. V as fallback, by René Treffer - silence some endian sparse warnings by adding annotations, by Sven Eckelmann - Update copyright years to 2020, by Sven Eckelmann - Disable deprecated sysfs configuration by default, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit f0fac2cec2861abc6fc0c094fb2584d9a33f868d Author: Brian Vazquez Date: Wed Jan 15 10:43:08 2020 -0800 selftests/bpf: Add batch ops testing to array bpf map Tested bpf_map_lookup_batch() and bpf_map_update_batch() functionality. $ ./test_maps ... test_array_map_batch_ops:PASS ... Signed-off-by: Brian Vazquez Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200115184308.162644-10-brianvv@google.com commit 30ff3c59137d00e083f68437665e00895cc271c7 Author: Yonghong Song Date: Wed Jan 15 10:43:07 2020 -0800 selftests/bpf: Add batch ops testing for htab and htab_percpu map Tested bpf_map_lookup_batch(), bpf_map_lookup_and_delete_batch(), bpf_map_update_batch(), and bpf_map_delete_batch() functionality. $ ./test_maps ... test_htab_map_batch_ops:PASS test_htab_percpu_map_batch_ops:PASS ... Signed-off-by: Yonghong Song Signed-off-by: Brian Vazquez Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200115184308.162644-9-brianvv@google.com commit 2ab3d86ea1859d1a4b830ce3551cba725620593a Author: Yonghong Song Date: Wed Jan 15 10:43:06 2020 -0800 libbpf: Add libbpf support to batch ops Added four libbpf API functions to support map batch operations: . int bpf_map_delete_batch( ... ) . int bpf_map_lookup_batch( ... ) . int bpf_map_lookup_and_delete_batch( ... ) . int bpf_map_update_batch( ... ) Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200115184308.162644-8-brianvv@google.com commit a1e3a3b8ba2c381a043d0c4273837895c1d3cf9c Author: Yonghong Song Date: Wed Jan 15 10:43:05 2020 -0800 tools/bpf: Sync uapi header bpf.h sync uapi header include/uapi/linux/bpf.h to tools/include/uapi/linux/bpf.h Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200115184308.162644-7-brianvv@google.com commit 057996380a42bb64ccc04383cfa9c0ace4ea11f0 Author: Yonghong Song Date: Wed Jan 15 10:43:04 2020 -0800 bpf: Add batch ops to all htab bpf map htab can't use generic batch support due some problematic behaviours inherent to the data structre, i.e. while iterating the bpf map a concurrent program might delete the next entry that batch was about to use, in that case there's no easy solution to retrieve the next entry, the issue has been discussed multiple times (see [1] and [2]). The only way hmap can be traversed without the problem previously exposed is by making sure that the map is traversing entire buckets. This commit implements those strict requirements for hmap, the implementation follows the same interaction that generic support with some exceptions: - If keys/values buffer are not big enough to traverse a bucket, ENOSPC will be returned. - out_batch contains the value of the next bucket in the iteration, not the next key, but this is transparent for the user since the user should never use out_batch for other than bpf batch syscalls. This commits implements BPF_MAP_LOOKUP_BATCH and adds support for new command BPF_MAP_LOOKUP_AND_DELETE_BATCH. Note that for update/delete batch ops it is possible to use the generic implementations. [1] https://lore.kernel.org/bpf/20190724165803.87470-1-brianvv@google.com/ [2] https://lore.kernel.org/bpf/20190906225434.3635421-1-yhs@fb.com/ Signed-off-by: Yonghong Song Signed-off-by: Brian Vazquez Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200115184308.162644-6-brianvv@google.com commit c60f2d2861778de6370a4f4ca6ab1d7d4a32efae Author: Brian Vazquez Date: Wed Jan 15 10:43:03 2020 -0800 bpf: Add lookup and update batch ops to arraymap This adds the generic batch ops functionality to bpf arraymap, note that since deletion is not a valid operation for arraymap, only batch and lookup are added. Signed-off-by: Brian Vazquez Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200115184308.162644-5-brianvv@google.com commit aa2e93b8e58e18442edfb2427446732415bc215e Author: Brian Vazquez Date: Wed Jan 15 10:43:02 2020 -0800 bpf: Add generic support for update and delete batch ops This commit adds generic support for update and delete batch ops that can be used for almost all the bpf maps. These commands share the same UAPI attr that lookup and lookup_and_delete batch ops use and the syscall commands are: BPF_MAP_UPDATE_BATCH BPF_MAP_DELETE_BATCH The main difference between update/delete and lookup batch ops is that for update/delete keys/values must be specified for userspace and because of that, neither in_batch nor out_batch are used. Suggested-by: Stanislav Fomichev Signed-off-by: Brian Vazquez Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200115184308.162644-4-brianvv@google.com commit cb4d03ab499d4c040f4ab6fd4389d2b49f42b5a5 Author: Brian Vazquez Date: Wed Jan 15 10:43:01 2020 -0800 bpf: Add generic support for lookup batch op This commit introduces generic support for the bpf_map_lookup_batch. This implementation can be used by almost all the bpf maps since its core implementation is relying on the existing map_get_next_key and map_lookup_elem. The bpf syscall subcommand introduced is: BPF_MAP_LOOKUP_BATCH The UAPI attribute is: struct { /* struct used by BPF_MAP_*_BATCH commands */ __aligned_u64 in_batch; /* start batch, * NULL to start from beginning */ __aligned_u64 out_batch; /* output: next start batch */ __aligned_u64 keys; __aligned_u64 values; __u32 count; /* input/output: * input: # of key/value * elements * output: # of filled elements */ __u32 map_fd; __u64 elem_flags; __u64 flags; } batch; in_batch/out_batch are opaque values use to communicate between user/kernel space, in_batch/out_batch must be of key_size length. To start iterating from the beginning in_batch must be null, count is the # of key/value elements to retrieve. Note that the 'keys' buffer must be a buffer of key_size * count size and the 'values' buffer must be value_size * count, where value_size must be aligned to 8 bytes by userspace if it's dealing with percpu maps. 'count' will contain the number of keys/values successfully retrieved. Note that 'count' is an input/output variable and it can contain a lower value after a call. If there's no more entries to retrieve, ENOENT will be returned. If error is ENOENT, count might be > 0 in case it copied some values but there were no more entries to retrieve. Note that if the return code is an error and not -EFAULT, count indicates the number of elements successfully processed. Suggested-by: Stanislav Fomichev Signed-off-by: Brian Vazquez Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200115184308.162644-3-brianvv@google.com commit 15c14a3dca421f086c187155afba3222b879472d Author: Brian Vazquez Date: Wed Jan 15 10:43:00 2020 -0800 bpf: Add bpf_map_{value_size, update_value, map_copy_value} functions This commit moves reusable code from map_lookup_elem and map_update_elem to avoid code duplication in kernel/bpf/syscall.c. Signed-off-by: Brian Vazquez Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200115184308.162644-2-brianvv@google.com commit 820d366736c949ffe698d3b3fe1266a91da1766d Author: Jaegeuk Kim Date: Fri Dec 13 18:32:16 2019 -0800 f2fs: free sysfs kobject Detected kmemleak. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2c4e0c528ec29afee16581873fb8ddcd7bea62a5 Author: Jaegeuk Kim Date: Tue Dec 3 17:31:00 2019 -0800 f2fs: declare nested quota_sem and remove unnecessary sems 1. f2fs_quota_sync -> down_read(&sbi->quota_sem) -> dquot_writeback_dquots -> f2fs_dquot_commit -> down_read(&sbi->quota_sem) 2. f2fs_quota_sync -> down_read(&sbi->quota_sem) -> f2fs_write_data_pages -> f2fs_write_single_data_page -> down_write(&F2FS_I(inode)->i_sem) f2fs_mkdir -> f2fs_do_add_link -> down_write(&F2FS_I(inode)->i_sem) -> f2fs_init_inode_metadata -> f2fs_new_node_page -> dquot_alloc_inode -> f2fs_dquot_mark_dquot_dirty -> down_read(&sbi->quota_sem) Signed-off-by: Jaegeuk Kim commit 762e4db5450a666bcf5144ffeb0b2e582ba67ff8 Author: Jaegeuk Kim Date: Wed Dec 11 15:10:47 2019 -0800 f2fs: don't put new_page twice in f2fs_rename In f2fs_rename(), new_page is gone after f2fs_set_link(), but it tries to put again when whiteout is failed and jumped to put_out_dir. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5b1dbb082f196278f82b6a15a13848efacb9ff11 Author: Jaegeuk Kim Date: Fri Dec 6 16:59:58 2019 -0800 f2fs: set I_LINKABLE early to avoid wrong access by vfs This patch moves setting I_LINKABLE early in rename2(whiteout) to avoid the below warning. [ 3189.163385] WARNING: CPU: 3 PID: 59523 at fs/inode.c:358 inc_nlink+0x32/0x40 [ 3189.246979] Call Trace: [ 3189.248707] f2fs_init_inode_metadata+0x2d6/0x440 [f2fs] [ 3189.251399] f2fs_add_inline_entry+0x162/0x8c0 [f2fs] [ 3189.254010] f2fs_add_dentry+0x69/0xe0 [f2fs] [ 3189.256353] f2fs_do_add_link+0xc5/0x100 [f2fs] [ 3189.258774] f2fs_rename2+0xabf/0x1010 [f2fs] [ 3189.261079] vfs_rename+0x3f8/0xaa0 [ 3189.263056] ? tomoyo_path_rename+0x44/0x60 [ 3189.265283] ? do_renameat2+0x49b/0x550 [ 3189.267324] do_renameat2+0x49b/0x550 [ 3189.269316] __x64_sys_renameat2+0x20/0x30 [ 3189.271441] do_syscall_64+0x5a/0x230 [ 3189.273410] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 3189.275848] RIP: 0033:0x7f270b4d9a49 Signed-off-by: Jaegeuk Kim commit 542989b6749b69e9de59a9d41a9ee9af7dbb1986 Author: Eric Biggers Date: Mon Dec 9 12:00:55 2019 -0800 f2fs: don't keep META_MAPPING pages used for moving verity file blocks META_MAPPING is used to move blocks for both encrypted and verity files. So the META_MAPPING invalidation condition in do_checkpoint() should consider verity too, not just encrypt. Signed-off-by: Eric Biggers Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f543805fcd60f3f9a491cfa2f2dc9284d2569c28 Author: Chao Yu Date: Wed Dec 4 09:52:58 2019 +0800 f2fs: introduce private bioset In low memory scenario, we can allocate multiple bios without submitting any of them. - f2fs_write_checkpoint() - block_operations() - f2fs_sync_node_pages() step 1) flush cold nodes, allocate new bio from mempool - bio_alloc() - mempool_alloc() step 2) flush hot nodes, allocate a bio from mempool - bio_alloc() - mempool_alloc() step 3) flush warm nodes, be stuck in below call path - bio_alloc() - mempool_alloc() - loop to wait mempool element release, as we only reserved memory for two bio allocation, however above allocated two bios may never be submitted. So we need avoid using default bioset, in this patch we introduce a private bioset, in where we enlarg mempool element count to total number of log header, so that we can make sure we have enough backuped memory pool in scenario of allocating/holding multiple bios. Signed-off-by: Gao Xiang Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0e6d01643c207fdcd77b9b40c29cbe1c63f03c15 Author: Sahitya Tummala Date: Thu Dec 5 08:52:39 2019 +0530 f2fs: cleanup duplicate stats for atomic files Remove duplicate sbi->aw_cnt stats counter that tracks the number of atomic files currently opened (it also shows incorrect value sometimes). Use more relit lable sbi->atomic_files to show in the stats. Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d508c94e45fcd3421e64f556abb1cf145ccc0e8f Author: Shin'ichiro Kawasaki Date: Mon Dec 9 19:44:45 2019 +0900 f2fs: Check write pointer consistency of non-open zones To catch f2fs bugs in write pointer handling code for zoned block devices, check write pointers of non-open zones that current segments do not point to. Do this check at mount time, after the fsync data recovery and current segments' write pointer consistency fix. Or when fsync data recovery is disabled by mount option, do the check when there is no fsync data. Check two items comparing write pointers with valid block maps in SIT. The first item is check for zones with no valid blocks. When there is no valid blocks in a zone, the write pointer should be at the start of the zone. If not, next write operation to the zone will cause unaligned write error. If write pointer is not at the zone start, reset the write pointer to place at the zone start. The second item is check between the write pointer position and the last valid block in the zone. It is unexpected that the last valid block position is beyond the write pointer. In such a case, report as a bug. Fix is not required for such zone, because the zone is not selected for next write operation until the zone get discarded. Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c426d99127b1ab797f4cc355b18d77288978b2f2 Author: Shin'ichiro Kawasaki Date: Mon Dec 9 19:44:44 2019 +0900 f2fs: Check write pointer consistency of open zones On sudden f2fs shutdown, write pointers of zoned block devices can go further but f2fs meta data keeps current segments at positions before the write operations. After remounting the f2fs, this inconsistency causes write operations not at write pointers and "Unaligned write command" error is reported. To avoid the error, compare current segments with write pointers of open zones the current segments point to, during mount operation. If the write pointer position is not aligned with the current segment position, assign a new zone to the current segment. Also check the newly assigned zone has write pointer at zone start. If not, reset write pointer of the zone. Perform the consistency check during fsync recovery. Not to lose the fsync data, do the check after fsync data gets restored and before checkpoint commit which flushes data at current segment positions. Not to cause conflict with kworker's dirfy data/node flush, do the fix within SBI_POR_DOING protection. Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit bb2500ab0270aa0d1d39614f08f4f9a2dc0df8c1 Author: Rocky Liao Date: Wed Jan 15 16:55:51 2020 +0800 Bluetooth: hci_qca: Retry btsoc initialize when it fails This patch adds the retry of btsoc initialization when it fails. There are reports that the btsoc initialization may fail on some platforms but the repro ratio is very low. The symptoms is the firmware downloading failed due to the UART write timed out. The failure may be caused by UART, platform HW or the btsoc itself but it's very difficlut to root cause, given the repro ratio is very low. Add a retry for the btsoc initialization can work around most of the failures and make Bluetooth finally works. Signed-off-by: Rocky Liao Reviewed-by: Matthias Kaehlcke Signed-off-by: Marcel Holtmann commit 5559904ccc0867a0ce796761681e40defe4a5f44 Author: Rocky Liao Date: Wed Jan 15 16:55:50 2020 +0800 Bluetooth: hci_qca: Add QCA Rome power off support to the qca_power_shutdown() Current qca_power_shutdown() only supports wcn399x, this patch adds Rome power off support to it. For Rome it just needs to pull down the bt_en GPIO to power off it. This patch also replaces all the power off operation in qca_close() with the unified qca_power_shutdown() call. Signed-off-by: Rocky Liao Reviewed-by: Matthias Kaehlcke Signed-off-by: Marcel Holtmann commit f25a96c8eb46b86744540ade61c2dbc844c23dbd Author: Guillaume La Roque Date: Wed Jan 15 11:12:43 2020 +0100 Bluetooth: hci_bcm: enable IRQ capability from devicetree Add support for getting IRQ directly from DT instead of relying on converting a GPIO to IRQ. This is needed for platforms with GPIO controllers that that do not support gpiod_to_irq(). Reviewed-by: Kevin Hilman Signed-off-by: Guillaume La Roque Signed-off-by: Marcel Holtmann commit 2fe465e69dc13f7b6bf8248d08bd16844c1ce545 Author: Guillaume La Roque Date: Wed Jan 15 11:12:42 2020 +0100 dt-bindings: net: bluetooth: add interrupts properties add interrupts and interrupt-names as optional properties to support host-wakeup by interrupt properties instead of host-wakeup-gpios. Signed-off-by: Guillaume La Roque Reviewed-by: Rob Herring Signed-off-by: Marcel Holtmann commit 7e8aeffb112aa1d1600ce0ee44e444b63e3d41f9 Author: Luiz Augusto von Dentz Date: Wed Jan 15 13:02:21 2020 -0800 Bluetooth: btsdio: Check for valid packet type Check for valid packet type before calling hci_recv_frame which is inline with what other drivers are doing. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit 1cc3c10c5aea84d4b0400423449c316eed3f27df Author: Luiz Augusto von Dentz Date: Wed Jan 15 13:02:20 2020 -0800 Bluetooth: hci_h5: Add support for ISO packets This enables H5 driver to properly handle ISO packets. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit ef564119ba832f55337935038dc0a91baa7417d1 Author: Luiz Augusto von Dentz Date: Wed Jan 15 13:02:19 2020 -0800 Bluetooth: hci_h4: Add support for ISO packets This enables H4 driver to properly handle ISO packets. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit 1b1d29e5149990e44634b2e681de71effd463591 Author: Luiz Augusto von Dentz Date: Wed Jan 15 13:02:18 2020 -0800 Bluetooth: Make use of __check_timeout on hci_sched_le This reuse __check_timeout on hci_sched_le following the same logic used hci_sched_acl. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit f9a619db7c137b7c2dec0414d8deb8ec762ae8f9 Author: Luiz Augusto von Dentz Date: Wed Jan 15 13:02:17 2020 -0800 Bluetooth: monitor: Add support for ISO packets This enables passing ISO packets to the monitor socket. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit f92a8cb569e39e28515e3f9c0ccaa16f874644b7 Author: Luiz Augusto von Dentz Date: Wed Jan 15 13:02:16 2020 -0800 Bluetooth: hci_vhci: Add support for ISO packets This make virtual controllers to pass ISO packets around. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit 4de0fc599eb936d37542f819e931ba3fd8e435ca Author: Luiz Augusto von Dentz Date: Wed Jan 15 13:02:11 2020 -0800 Bluetooth: Add definitions for CIS connections These adds the HCI definitions for handling CIS connections along with ISO data packets. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit 600a87490ff9823d065fc15e86c709e707033ecc Author: Alain Michaud Date: Tue Jan 7 00:43:17 2020 +0000 Bluetooth: Implementation of MGMT_OP_SET_BLOCKED_KEYS. MGMT command is added to receive the list of blocked keys from user-space. The list is used to: 1) Block keys from being distributed by the device during the ke distribution phase of SMP. 2) Filter out any keys that were previously saved so they are no longer used. Signed-off-by: Alain Michaud Signed-off-by: Marcel Holtmann commit 83e4b88be1ff9671f2a2fb040a09c45cc3fb40e6 Author: Eelco Chaudron Date: Wed Jan 15 13:15:39 2020 +0000 selftests/bpf: Add a test for attaching a bpf fentry/fexit trace to an XDP program Add a test that will attach a FENTRY and FEXIT program to the XDP test program. It will also verify data from the XDP context on FENTRY and verifies the return code on exit. Signed-off-by: Eelco Chaudron Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157909410480.47481.11202505690938004673.stgit@xdp-tutorial commit bcfb7ae3f50be4d51346a8cf69097cf59b29d05b Author: Samuel Holland Date: Tue Jan 14 21:40:48 2020 -0600 power: supply: axp20x_usb_power: Only poll while offline Investigation on the AXP803 shows that VBUS_PLUGIN/VBUS_REMOVAL IRQs are triggered on the rising/falling edge of AXP20X_PWR_STATUS_VBUS_USED. The reason IRQs do not arrive while N_VBUSEN/DRIVEVBUS is high is because AXP20X_PWR_STATUS_VBUS_USED also never goes high. This also means that if VBUS is online, a VBUS_REMOVAL IRQ is received immediately on setting N_VBUSEN/DRIVEVBUS high (and VBUS_PLUGIN shortly after it is set back low). This was also verified to be the case when manually offlining VBUS through AXP20X_VBUS_PATH_SELECT. As long as VBUS is online, a present->absent transition necessarily implies an online->offline transition. Since will cause an IRQ, there is no need to poll while VBUS is online. To ensure the driver's view of VBUS online status remains accurate, unconditionally poll once when receiving an IRQ and when resuming. If VBUS is still online at that time, polling will cease until the next VBUS_REMOVAL IRQ. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland Signed-off-by: Sebastian Reichel commit 09aaaec5f658a7cf04c6318ac794eafdb23fa240 Author: Samuel Holland Date: Tue Jan 14 21:40:47 2020 -0600 power: supply: axp20x_usb_power: Add wakeup control The USB power supply input can be used as a wakeup source. Hook up the VBUS_PLUGIN IRQ to trigger wakeup based on userspace configuration. To do this, we must remember the list of IRQs for the life of the device. To know how much space to allocate for the flexible array member, we switch from using a NULL sentinel to using an array length. Because we now depend on the specific order of the IRQs (we assume VBUS_PLUGIN is first and always present), failing to acquire an IRQ during probe must be a fatal error. To avoid spuriously waking up the system when the USB power supply is not configured as a wakeup source, we must explicitly disable all non- wake IRQs during system suspend. This is because the SoC's NMI input is shared among all IRQs on the AXP PMIC. Due to the use of regmap-irq, the individual IRQs within the PMIC are nested threaded interrupts, and are therefore not automatically disabled during system suspend. The upshot is that if any other device within the MFD (such as the power key) is an enabled wakeup source, all enabled IRQs within the PMIC will cause wakeup. We still need to call enable_irq_wake() when we *do* want wakeup, in case those other wakeup sources on the PMIC are all disabled. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland Signed-off-by: Sebastian Reichel commit ecbc8dd78ed9fab5bc02d8cf2e839a3a0f2cdc5f Author: Samuel Holland Date: Tue Jan 14 21:40:46 2020 -0600 power: supply: axp20x_usb_power: Allow offlining AXP803/AXP813 have a flag that enables/disables the USB power supply input. Allow control of this flag via the ONLINE property on those variants. It may be necessary to offline the USB power supply input when using the USB port in OTG mode, or to allow userspace to disable charging. When the USB VBUS input is disabled via the PATH_SEL bit, the VBUS_USED bit in PWR_INPUT_STATUS is cleared, so there is no change needed when getting the property. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland Signed-off-by: Sebastian Reichel commit 0fbb37dd82998b5c83355997b3bdba2806968ac7 Author: Sergey Gorenko Date: Wed Jan 15 13:30:55 2020 +0000 IB/srp: Never use immediate data if it is disabled by a user Some SRP targets that do not support specification SRP-2, put the garbage to the reserved bits of the SRP login response. The problem was not detected for a long time because the SRP initiator ignored those bits. But now one of them is used as SRP_LOGIN_RSP_IMMED_SUPP. And it causes a critical error on the target when the initiator sends immediate data. The ib_srp module has a use_imm_date parameter to enable or disable immediate data manually. But it does not help in the above case, because use_imm_date is ignored at handling the SRP login response. The problem is definitely caused by a bug on the target side, but the initiator's behavior also does not look correct. The initiator should not use immediate data if use_imm_date is disabled by a user. This commit adds an additional checking of use_imm_date at the handling of SRP login response to avoid unexpected use of immediate data. Fixes: 882981f4a411 ("RDMA/srp: Add support for immediate data") Link: https://lore.kernel.org/r/20200115133055.30232-1-sergeygo@mellanox.com Signed-off-by: Sergey Gorenko Reviewed-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 363824f92a9259b025f05ab038eb47224377f9e9 Author: Rao Shoaib Date: Mon Jan 13 16:41:20 2020 -0800 RDMA/rxe: Compute the maximum sges and inline size based on the WQE size The SGE buffer size and max_inline data should be derived from the size of the WQE. Each value individually sets the WQE size, so compute the actual sizes based on the actual WQE size and configure the QP with the maximums. Also fix the missing return of the actual maximum capability to the caller. Link: https://lore.kernel.org/r/1578962480-17814-3-git-send-email-rao.shoaib@oracle.com Signed-off-by: Rao Shoaib Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 56900d4541a9e2e9263a2db9246e216edad5f928 Author: Samuel Holland Date: Tue Jan 14 21:40:45 2020 -0600 power: supply: axp20x_usb_power: Use a match structure Instead of ad-hoc variant ID checks throughout the code, let's start moving the variant-specific details to a match structure. This allows for future flexibility, and it better matches the other axp20x power supply drivers. This commit removes most variant checks from axp20x_usb_power_probe(). Other parts of the driver still do ID matching; they are left unchanged for now. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland Signed-off-by: Sebastian Reichel commit 577233a3f5637aff40e376572d5ed24ff80204d0 Author: Chen Wandun Date: Fri Dec 20 17:41:44 2019 +0800 power: suppy: ucs1002: Make the symbol 'ucs1002_regulator_enable' static Fix the following sparse warning: drivers/power/supply/ucs1002_power.c:492:5: warning: symbol 'ucs1002_regulator_enable' was not declared. Should it be static? Fixes: a3d70dacc727 ("power: suppy: ucs1002: disable power when max current is 0") Signed-off-by: Chen Wandun Signed-off-by: Sebastian Reichel commit 5167c506d62dd9ffab73eba23c79b0a8845c9fe1 Author: Chunyan Zhang Date: Fri Jan 10 16:39:02 2020 +0800 tick/common: Touch watchdog in tick_unfreeze() on all CPUs Suspend to IDLE invokes tick_unfreeze() on resume. tick_unfreeze() on the first resuming CPU resumes timekeeping, which also has the side effect of resetting the softlockup watchdog on this CPU. But on the secondary CPUs the watchdog is not reset in the resume / unfreeze() path, which can result in false softlockup warnings on those CPUs depending on the time spent in suspend. Prevent this by clearing the softlock watchdog in the unfreeze path also on the secondary resuming CPUs. [ tglx: Massaged changelog ] Signed-off-by: Chunyan Zhang Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200110083902.27276-1-chunyan.zhang@unisoc.com commit 4e8d683f11767dc6cd8eaac6b599928f343b4cdb Author: Rao Shoaib Date: Mon Jan 13 16:41:19 2020 -0800 Introduce maximum WQE size to check limits Introduce maximum WQE size to impose limits on max SGE's and inline data Link: https://lore.kernel.org/r/1578962480-17814-2-git-send-email-rao.shoaib@oracle.com Signed-off-by: Rao Shoaib Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 10b17004a74c384c6f410af355b0d6d7a168f613 Author: Shubhrajyoti Datta Date: Thu Jan 9 17:08:00 2020 +0530 i2c: xiic: Fix the clocking across bind unbind The recommendation is that the set_active should be done with pm runtime disabled. Also fix the remove path for clocking. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Wolfram Sang commit c9d059681b846f5d0a280950ea4dc58495b9b7a9 Author: Venkatesh Yadav Abbarapu Date: Thu Jan 9 17:07:59 2020 +0530 i2c: xiic: defer the probe if clock is not found It's not always the case that clock is already available when i2c driver get probed at the first time, e.g. the clock is provided by clock wizard which may be probed after i2c driver. So let's defer the probe when devm_clk_get() call fails and give it chance to try later. Signed-off-by: Venkatesh Yadav Abbarapu Signed-off-by: Michal Simek Signed-off-by: Shubhrajyoti Datta Signed-off-by: Wolfram Sang commit b4c119dbc300c7a6ee2da70d5c7ba14747b35142 Author: Shubhrajyoti Datta Date: Thu Jan 9 17:07:58 2020 +0530 i2c: xiic: Add timeout to the rx fifo wait loop Add timeout to the rx fifo empty wait loop. Also check for the return value for xiic_reinit and pass it to xiic_start_xfer. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Wolfram Sang commit 40b2ec1251c370bc5557568e259d4058c651d405 Author: Krzysztof Kozlowski Date: Wed Jan 15 21:02:50 2020 +0100 i2c: highlander: Use proper printk format for size_t size_t should be printed with its own format to be 64-bit friendly and fix warning when compiling on 64-bit platform (e.g. with COMPILE_TEST): drivers/i2c/busses/i2c-highlander.c: In function ‘highlander_i2c_smbus_xfer’: drivers/i2c/busses/i2c-highlander.c:325:22: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit 17b3fe8b04ec92161638378744d4d915fd8cfa2e Author: Krzysztof Kozlowski Date: Wed Jan 15 21:02:49 2020 +0100 i2c: pnx: Use proper printk format for resource_size_t resource_size_t should be printed with its own size-independent format to fix warnings when compiling on 64-bit platform (e.g. with COMPILE_TEST): drivers/i2c/busses/i2c-pnx.c: In function ‘i2c_pnx_probe’: drivers/i2c/busses/i2c-pnx.c:737:47: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘resource_size_t {aka long long unsigned int}’ [-Wformat=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit 066e6e805d4af26d24776f4628683ddcef6297f7 Author: Krzysztof Kozlowski Date: Wed Jan 15 21:02:48 2020 +0100 i2c: pmcmsp: Use proper printk format for resource_size_t resource_size_t should be printed with its own size-independent format to fix warnings when compiling on 64-bit platform (e.g. with COMPILE_TEST): drivers/i2c/busses/i2c-pmcmsp.c: In function ‘pmcmsptwi_probe’: drivers/i2c/busses/i2c-pmcmsp.c:276:25: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘resource_size_t {aka long long unsigned int}’ [-Wformat=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit 9173cac3b64e6785dd604f5075e6035b045a0026 Author: Andrii Nakryiko Date: Wed Jan 15 11:08:56 2020 -0800 libbpf: Support .text sub-calls relocations The LLVM patch https://reviews.llvm.org/D72197 makes LLVM emit function call relocations within the same section. This includes a default .text section, which contains any BPF sub-programs. This wasn't the case before and so libbpf was able to get a way with slightly simpler handling of subprogram call relocations. This patch adds support for .text section relocations. It needs to ensure correct order of relocations, so does two passes: - first, relocate .text instructions, if there are any relocations in it; - then process all the other programs and copy over patched .text instructions for all sub-program calls. v1->v2: - break early once .text program is processed. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Cc: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200115190856.2391325-1-andriin@fb.com commit 5640a771d7971412049d1934d2d030edfdd1c28e Merge: d3a56931f9c8 ab8b7f0cb358 Author: Alexei Starovoitov Date: Wed Jan 15 11:44:51 2020 -0800 Merge branch 'bpf_send_signal_thread' Yonghong Song says: ==================== Commit 8b401f9ed244 ("bpf: implement bpf_send_signal() helper") added helper bpf_send_signal() which permits bpf program to send a signal to the current process. The signal may send to any thread of the process. This patch implemented a new helper bpf_send_signal_thread() to send a signal to the thread corresponding to the kernel current task. This helper can simplify user space code if the thread context of bpf sending signal is needed in user space. Please see Patch #1 for details of use case and kernel implementation. Patch #2 added some bpf self tests for the new helper. Changelogs: v2 -> v3: - More simplification for skeleton codes by removing not-needed mmap code and redundantly created tracepoint link. v1 -> v2: - More description for the difference between bpf_send_signal() and bpf_send_signal_thread() in the uapi header bpf.h. - Use skeleton and mmap for send_signal test. ==================== Acked-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit ab8b7f0cb3585ecb40e3305850f28658a1b8940e Author: Yonghong Song Date: Tue Jan 14 19:50:03 2020 -0800 tools/bpf: Add self tests for bpf_send_signal_thread() The test_progs send_signal() is amended to test bpf_send_signal_thread() as well. $ ./test_progs -n 40 #40/1 send_signal_tracepoint:OK #40/2 send_signal_perf:OK #40/3 send_signal_nmi:OK #40/4 send_signal_tracepoint_thread:OK #40/5 send_signal_perf_thread:OK #40/6 send_signal_nmi_thread:OK #40 send_signal:OK Summary: 1/6 PASSED, 0 SKIPPED, 0 FAILED Also took this opportunity to rewrite the send_signal test using skeleton framework and array mmap to make code simpler and more readable. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200115035003.602425-1-yhs@fb.com commit 8482941f09067da42f9c3362e15bfb3f3c19d610 Author: Yonghong Song Date: Tue Jan 14 19:50:02 2020 -0800 bpf: Add bpf_send_signal_thread() helper Commit 8b401f9ed244 ("bpf: implement bpf_send_signal() helper") added helper bpf_send_signal() which permits bpf program to send a signal to the current process. The signal may be delivered to any threads in the process. We found a use case where sending the signal to the current thread is more preferable. - A bpf program will collect the stack trace and then send signal to the user application. - The user application will add some thread specific information to the just collected stack trace for later analysis. If bpf_send_signal() is used, user application will need to check whether the thread receiving the signal matches the thread collecting the stack by checking thread id. If not, it will need to send signal to another thread through pthread_kill(). This patch proposed a new helper bpf_send_signal_thread(), which sends the signal to the thread corresponding to the current kernel task. This way, user space is guaranteed that bpf_program execution context and user space signal handling context are the same thread. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200115035002.602336-1-yhs@fb.com commit d3a56931f9c8644a52e7a6735954c84ea895e8c3 Author: Magnus Karlsson Date: Tue Jan 14 10:49:25 2020 +0100 xsk: Support allocations of large umems When registering a umem area that is sufficiently large (>1G on an x86), kmalloc cannot be used to allocate one of the internal data structures, as the size requested gets too large. Use kvmalloc instead that falls back on vmalloc if the allocation is too large for kmalloc. Also add accounting for this structure as it is triggered by a user space action (the XDP_UMEM_REG setsockopt) and it is by far the largest structure of kernel allocated memory in xsk. Reported-by: Ryan Goodfellow Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Acked-by: Jonathan Lemon Link: https://lore.kernel.org/bpf/1578995365-7050-1-git-send-email-magnus.karlsson@intel.com commit e8d51e962936bf4527f41db318d53a80006f2bf7 Author: Wolfram Sang Date: Tue Jan 7 18:47:46 2020 +0100 docs: i2c: use the new API in 'writing-clients' i2c_new_device is deprecated, use i2c_new_client_device. Also, align a paragraph while here. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit e634a50c9cd1896b09f33dcbe4b5de5f29e4bbb7 Author: Wolfram Sang Date: Tue Jan 7 18:47:45 2020 +0100 docs: i2c: use the new API in 'instantiating-devices.rst' i2c_new_device is deprecated, use i2c_new_client_device. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit 5f0155b44e1e053e4fd420c48af020524cea299e Author: Wolfram Sang Date: Tue Jan 7 18:47:44 2020 +0100 i2c: i2c-core-of: convert to use i2c_new_client_device() Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit 87e07437df936b5ebdccd5a847fd1801f36bef02 Author: Wolfram Sang Date: Tue Jan 7 18:47:43 2020 +0100 i2c: i2c-core-base: convert to use i2c_new_client_device() Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit 90a3be9b194505165ecbbd9fe600818f5618dfbe Author: Wolfram Sang Date: Tue Jan 7 18:47:42 2020 +0100 i2c: i2c-core-acpi: convert to use i2c_new_client_device() Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang Acked-by: Mika Westerberg Signed-off-by: Wolfram Sang commit bf255befe7adc14ba42bf71fbee4e84f54249e07 Author: Wolfram Sang Date: Tue Jan 7 18:47:41 2020 +0100 i2c: xiic: convert to use i2c_new_client_device() Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang Acked-by: Michal Simek Signed-off-by: Wolfram Sang commit 36056290ee0cec6b7b239dd68b9b874488226ada Author: Wolfram Sang Date: Tue Jan 7 18:47:40 2020 +0100 i2c: taos-evm: convert to use i2c_new_client_device() Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang Reviewed-by: Jean Delvare Tested-by: Jean Delvare Signed-off-by: Wolfram Sang commit f12c529005dc64babe23c1fc2fb404ab8daa6ba2 Author: Wolfram Sang Date: Tue Jan 7 18:47:39 2020 +0100 i2c: powermac: convert to use i2c_new_client_device() Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit 7de69dbf0d7f2a6abc02dc190fc260c0d11626b4 Author: Wolfram Sang Date: Tue Jan 7 18:47:38 2020 +0100 i2c: ocores: convert to use i2c_new_client_device() Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang Reviewed-by: Andrew Lunn Reviewed-by: Peter Korsgaard Signed-off-by: Wolfram Sang commit 7fd0379f8696378128c73c29f7b69a9d3ee18fdc Author: Wolfram Sang Date: Tue Jan 7 18:47:37 2020 +0100 i2c: nvidia-gpu: convert to use i2c_new_client_device() Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit 41d06630b494b7ff27c07f4475571996fba6bb6d Author: Wolfram Sang Date: Tue Jan 7 18:47:36 2020 +0100 i2c: i801: convert to use i2c_new_client_device() Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 6b5794abdcddfd3d1584aff1a13f440d5999ac84 Author: Wolfram Sang Date: Tue Jan 7 18:47:35 2020 +0100 i2c: cht-wc: convert to use i2c_new_client_device() Move away from the deprecated API and return the shiny new ERRPTR where useful. Signed-off-by: Wolfram Sang Tested-by: Hans de Goede Reviewed-by: Hans de Goede Signed-off-by: Wolfram Sang commit 0428c6ef8a3c167b852804756357425902766120 Author: Gal Pressman Date: Tue Jan 14 10:57:05 2020 +0200 RDMA/efa: Remove unused ucontext parameter from efa_qp_user_mmap_entries_remove The ucontext parameter is unused, remove it. Link: https://lore.kernel.org/r/20200114085706.82229-6-galpress@amazon.com Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit f5f5ddbe73dc4d781d367bc5e2c8e79fc418d233 Author: Gal Pressman Date: Tue Jan 14 10:57:04 2020 +0200 RDMA/efa: Remove {} brackets from single statement if The {} brackets are not needed according to the Linux coding style. Link: https://lore.kernel.org/r/20200114085706.82229-5-galpress@amazon.com Reviewed-by: Daniel Kranzdorf Reviewed-by: Firas JahJah Signed-off-by: Gal Pressman Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 57f63f371b5e9169c83964db8a9060776ec87a79 Author: Gal Pressman Date: Tue Jan 14 10:57:03 2020 +0200 RDMA/efa: Device definitions documentation updates Various clarifications and updates to the documentation of the device definitions. No functional changes in this patch. Link: https://lore.kernel.org/r/20200114085706.82229-4-galpress@amazon.com Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 7db82697b8bf05ae56d02bf8da998bcd1122531d Author: Jiaran Zhang Date: Wed Jan 15 09:42:26 2020 +0800 RDMA/hns: Add support for extended atomic in userspace To support extended atomic operations including cmp & swap and fetch & add of 8 bytes, 16 bytes, 32 bytes, 64 bytes in userspace, some field in qpc should be configured. Link: https://lore.kernel.org/r/1579052546-11746-1-git-send-email-liweihang@huawei.com Signed-off-by: Jiaran Zhang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit a3afa29942b84b4e2548beacccc3a68b8d77e3dc Author: Dan Carpenter Date: Wed Jan 15 20:46:04 2020 +0300 ALSA: usb-audio: unlock on error in probe We need to unlock before we returning on this error path. Fixes: 73ac9f5e5b43 ("ALSA: usb-audio: Add boot quirk for MOTU M Series") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200115174604.rhanfgy4j3uc65cx@kili.mountain Signed-off-by: Takashi Iwai commit 5f91ef219f6b57a1b67bb86a6e21dd1eda41b1db Author: Vadim Pasternak Date: Mon Jan 13 15:08:40 2020 +0000 dt-bindings: Add TI and Infineon VR Controllers as trivial devices Add Texas Instruments Dual channel DCAP+ multiphase controllers: TPS53679, TPS53688, and Infineon Multi-phase Digital VR controllers XDPE12284, XDPE12254 as trivial devices. Signed-off-by: Vadim Pasternak Acked-by: Guenter Roeck Signed-off-by: Rob Herring commit 1eb69bfded57eadb171610d9d047795823ddcfe8 Author: JC Kuo Date: Mon Jan 13 14:00:46 2020 +0800 dt-binding: usb: add "super-speed-plus" This commit adds "super-speed-plus" to valid argument list of "maximum-speed" property. Signed-off-by: JC Kuo Signed-off-by: Rob Herring commit 941a0e3bad8ef645e9a6dae2e1abccda8e8d3033 Author: Niklas Söderlund Date: Wed Jan 8 22:52:09 2020 +0100 dt-bindings: rcar-csi2: Convert bindings to json-schema Convert Renesas R-Car MIPI CSI-2 receiver bindings documentation to json-schema. Signed-off-by: Niklas Söderlund Signed-off-by: Rob Herring commit 1590b1eb93703405e43f07bedb69e52ad4d70034 Author: Jiaxun Yang Date: Sun Jan 12 16:14:07 2020 +0800 dt-bindings: Document loongson vendor-prefix Loongson is a MIPS-compatible processor vendor. Signed-off-by: Jiaxun Yang Acked-by: Rob Herring Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: chenhc@lemote.com Cc: paul.burton@mips.com Cc: tglx@linutronix.de Cc: jason@lakedaemon.net Cc: maz@kernel.org Cc: linux-kernel@vger.kernel.org Cc: robh+dt@kernel.org Cc: mark.rutland@arm.co Cc: devicetree@vger.kernel.org commit 1f33d9bcb995f3e5e688dec66f3ae15ec76dc71e Author: 周琰杰 (Zhou Yanjie) Date: Wed Jan 15 01:03:48 2020 +0800 MIPS: CU1000-Neo: Refresh defconfig to support HWMON and WiFi. Refresh CU1000-Neo's defconfig to support ADS7830 based HWMON and AP6212A WiFi module. Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: robh+dt@kernel.org Cc: paul.burton@mips.com Cc: jhogan@kernel.org Cc: mark.rutland@arm.com Cc: syq@debian.org Cc: ralf@linux-mips.org Cc: rick.tyliu@ingenic.com Cc: jason@lakedaemon.net Cc: keescook@chromium.org Cc: geert+renesas@glider.be Cc: krzk@kernel.org Cc: paul@crapouillou.net Cc: prasannatsmkumar@gmail.com Cc: sernia.zhou@foxmail.com Cc: zhenwenjin@gmail.com Cc: ebiederm@xmission.com commit 0ba96b344a7fbc6750459ba3b619053850867a2c Author: 周琰杰 (Zhou Yanjie) Date: Wed Jan 15 01:03:47 2020 +0800 MIPS: Ingenic: Add missing nodes for X1000 and CU1000-Neo. Add I2C0/I2C1/I2C2 nodes for X1000 and add I2C0, ADS7830, MSC1, AP6212A, wlan_pwrseq nodes for CU1000-Neo. Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: robh+dt@kernel.org Cc: paul.burton@mips.com Cc: jhogan@kernel.org Cc: mark.rutland@arm.com Cc: syq@debian.org Cc: ralf@linux-mips.org Cc: rick.tyliu@ingenic.com Cc: jason@lakedaemon.net Cc: keescook@chromium.org Cc: geert+renesas@glider.be Cc: krzk@kernel.org Cc: paul@crapouillou.net Cc: prasannatsmkumar@gmail.com Cc: sernia.zhou@foxmail.com Cc: zhenwenjin@gmail.com Cc: ebiederm@xmission.com commit ad1df95419cc46b4a832cbb537716e3da9a98881 Author: Guoyun Sun Date: Wed Jan 15 11:35:00 2020 +0800 mips/vdso: Support mremap() for vDSO vDSO VMA address is saved in mm_context for the purpose of using restorer from vDSO page to return to userspace after signal handling. In Checkpoint Restore in Userspace (CRIU) project we place vDSO VMA on restore back to the place where it was on the dump. Make vDSO code track the VMA address by supplying .mremap() fops the same way it's done for x86 and arm by: commit b059a453b1cf ("x86/vdso: Add mremap hook to vm_special_mapping") commit 739586951b8a ("arm64/vdso: Support mremap() for vDSO"). Signed-off-by: Guoyun Sun Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Allison Randal Cc: Thomas Gleixner Cc: Greg Kroah-Hartman Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 80a785701660ba3a36b0f72e1674b82ca7ca3ce0 Author: Lijun Ou Date: Sat Jan 11 18:32:41 2020 +0800 RDMA/hns: Get pf capabilities from firmware Get pf capabilities from firmware according to different hardwares, if it fails, all capabilities will be set with a default value. Link: https://lore.kernel.org/r/1578738761-3176-4-git-send-email-liweihang@huawei.com Signed-off-by: Lijun Ou Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit ba6bb7e974212ef9c114ad94708fb88a82e240ea Author: Lijun Ou Date: Sat Jan 11 18:32:40 2020 +0800 RDMA/hns: Add interfaces to get pf capabilities from firmware pf capabilities are set by default for hip08 previously which should depends on different types of hardware. So add new interfaces to get them from firmware. Link: https://lore.kernel.org/r/1578738761-3176-3-git-send-email-liweihang@huawei.com Signed-off-by: Lijun Ou Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit a91e093cad37c60dc16ca382ed6f869c4c99fb77 Author: Weihang Li Date: Sat Jan 11 18:32:39 2020 +0800 RDMA/hns: Remove some redundant variables related to capabilities In struct hns_roce_caps, max_srq_sg and max_srqwqes is unused, and max_srqs has the same effect with num_srqs. So remove them from this structrue. Link: https://lore.kernel.org/r/1578738761-3176-2-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 3277e8aa2504d97e022ecb9777d784ac1a439d36 Author: Grygorii Strashko Date: Wed Jan 15 10:07:27 2020 -0800 soc: ti: k3: add navss ringacc driver The Ring Accelerator (RINGACC or RA) provides hardware acceleration to enable straightforward passing of work between a producer and a consumer. There is one RINGACC module per NAVSS on TI AM65x SoCs. The RINGACC converts constant-address read and write accesses to equivalent read or write accesses to a circular data structure in memory. The RINGACC eliminates the need for each DMA controller which needs to access ring elements from having to know the current state of the ring (base address, current offset). The DMA controller performs a read or write access to a specific address range (which maps to the source interface on the RINGACC) and the RINGACC replaces the address for the transaction with a new address which corresponds to the head or tail element of the ring (head for reads, tail for writes). Since the RINGACC maintains the state, multiple DMA controllers or channels are allowed to coherently share the same rings as applicable. The RINGACC is able to place data which is destined towards software into cached memory directly. Supported ring modes: - Ring Mode - Messaging Mode - Credentials Mode - Queue Manager Mode TI-SCI integration: Texas Instrument's System Control Interface (TI-SCI) Message Protocol now has control over Ringacc module resources management (RM) and Rings configuration. The corresponding support of TI-SCI Ringacc module RM protocol introduced as option through DT parameters: - ti,sci: phandle on TI-SCI firmware controller DT node - ti,sci-dev-id: TI-SCI device identifier as per TI-SCI firmware spec if both parameters present - Ringacc driver will configure/free/reset Rings using TI-SCI Message Ringacc RM Protocol. The Ringacc driver manages Rings allocation by itself now and requests TI-SCI firmware to allocate and configure specific Rings only. It's done this way because, Linux driver implements two stage Rings allocation and configuration (allocate ring and configure ring) while TI-SCI Message Protocol supports only one combined operation (allocate+configure). Signed-off-by: Grygorii Strashko Signed-off-by: Peter Ujfalusi Reviewed-by: Tero Kristo Tested-by: Keerthy Signed-off-by: Santosh Shilimkar commit 59be028f811bb9caf3079a5873602c6e333d8ddf Author: Grygorii Strashko Date: Wed Jan 15 10:07:18 2020 -0800 bindings: soc: ti: add documentation for k3 ringacc The Ring Accelerator (RINGACC or RA) provides hardware acceleration to enable straightforward passing of work between a producer and a consumer. There is one RINGACC module per NAVSS on TI AM65x and j721e. This patch introduces RINGACC device tree bindings. Signed-off-by: Grygorii Strashko Signed-off-by: Peter Ujfalusi Reviewed-by: Rob Herring Tested-by: Keerthy Signed-off-by: Santosh Shilimkar commit 49945ef0f90b5becef67db68338e8ce34ef70975 Author: Krzysztof Kozlowski Date: Tue Jan 14 10:06:05 2020 +0100 i2c: stu300: Use proper printk format for iomem pointer iomem pointers should be printed with pointer format to hide the actual value and fix warnings when compiling on 64-bit platform (e.g. with COMPILE_TEST): drivers/i2c/busses/i2c-stu300.c: In function ‘stu300_wait_while_busy’: drivers/i2c/busses/i2c-stu300.c:446:76: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Signed-off-by: Wolfram Sang commit b3ec946975737b949137fbb1a2db9e7cc5b9ae82 Author: Dmitry Osipenko Date: Tue Jan 14 04:34:42 2020 +0300 i2c: tegra: Check DMA completion status in addition to left time It is more robust to check completion status in addition to the left time in a case of DMA transfer because transfer's completion happens in two phases [one is ISR, other is tasklet] and thus it is possible that DMA is completed while I2C completion awaiting times out because of the deferred notification done by the DMA driver. The DMA completion status becomes 100% actual after DMA synchronization. This fixes spurious DMA timeouts when system is under load. Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 28d98666dbc033e8834edcba75dc1984efde0279 Author: Dmitry Osipenko Date: Tue Jan 14 04:34:41 2020 +0300 i2c: tegra: Always terminate DMA transfer It is possible that I2C could error out in the middle of DMA transfer and in this case DMA channel needs to be reset, otherwise a follow up transfer will fail because DMA channel stays blocked. Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 4211ffc3ad15a091966cd7be7889fbe4562cd215 Author: Dmitry Osipenko Date: Tue Jan 14 04:34:40 2020 +0300 i2c: tegra: Use relaxed versions of readl/writel There is nothing to synchronize in regards to memory accesses for PIO transfers and for DMA transfers the DMA API takes care of the syncing. Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit ae6028a65582118d8e8f5fa3c72524b44a878d1d Author: Dmitry Osipenko Date: Tue Jan 14 04:34:39 2020 +0300 i2c: tegra: Rename I2C_PIO_MODE_MAX_LEN to I2C_PIO_MODE_PREFERRED_LEN DMA is preferred for a larger transfers, while PIO is preferred for a smaller transfers to avoid unnecessary DMA overhead. There is no strict size limitations for the PIO-mode transfers, so let's rename the constant for clarity. Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit ede2299f7101a79fe8610ca0000734c9887ad4b2 Author: Dmitry Osipenko Date: Tue Jan 14 04:34:38 2020 +0300 i2c: tegra: Support atomic transfers System shutdown may happen with interrupts being disabled and in this case kernel may hang if atomic transfer isn't supported by driver. There were several occurrences where I found my Nexus 7 completely discharged despite of being turned off and then one day I spotted this in the log: reboot: Power down ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at drivers/i2c/i2c-core.h:40 i2c_transfer+0x95/0x9c No atomic I2C transfer handler for 'i2c-1' Modules linked in: tegra30_devfreq CPU: 0 PID: 1 Comm: systemd-shutdow Not tainted 5.4.0-next-20191202-00120-gf7ecd80fb803-dirty #3195 Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x11/0x14) [] (show_stack) from [] (dump_stack+0x85/0x94) [] (dump_stack) from [] (__warn+0xc1/0xc4) [] (__warn) from [] (warn_slowpath_fmt+0x61/0x78) [] (warn_slowpath_fmt) from [] (i2c_transfer+0x95/0x9c) [] (i2c_transfer) from [] (regmap_i2c_read+0x4d/0x6c) [] (regmap_i2c_read) from [] (_regmap_raw_read+0x99/0x1cc) [] (_regmap_raw_read) from [] (_regmap_bus_read+0x23/0x38) [] (_regmap_bus_read) from [] (_regmap_read+0x3d/0xfc) [] (_regmap_read) from [] (_regmap_update_bits+0x87/0xc4) [] (_regmap_update_bits) from [] (regmap_update_bits_base+0x39/0x50) [] (regmap_update_bits_base) from [] (max77620_pm_power_off+0x29/0x2c) [] (max77620_pm_power_off) from [] (__do_sys_reboot+0xe9/0x170) [] (__do_sys_reboot) from [] (ret_fast_syscall+0x1/0x28) Exception stack(0xde907fa8 to 0xde907ff0) 7fa0: 00000000 00000000 fee1dead 28121969 4321fedc 00000000 7fc0: 00000000 00000000 00000000 00000058 00000000 00000000 00000000 00000000 7fe0: 0045adf0 bed9abb8 004444a0 b6c666d0 ---[ end trace bdd18f87595b1a5e ]--- The atomic transferring is implemented by enforcing PIO mode for the transfer and by polling interrupt status until transfer is completed or failed. Now system shuts down properly every time. Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit b5d5605ca3cebb9b16c4f251635ef171ad18b80d Author: Dmitry Osipenko Date: Tue Jan 14 04:34:37 2020 +0300 i2c: tegra: Prevent interrupt triggering after transfer timeout Potentially it is possible that interrupt may fire after transfer timeout. That may not end up well for the next transfer because interrupt handling may race with hardware resetting. This is very unlikely to happen in practice, but anyway let's prevent the potential problem by enabling interrupt only at the moments when it is actually necessary to get some interrupt event. Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit d02e5ee09bd98b8cec9c2e26b486ed4d6d1b7e2a Merge: 9f7a03642e0e 24a49678f5e2 Author: Wolfram Sang Date: Wed Jan 15 18:31:37 2020 +0100 Merge branch 'i2c/for-current' into i2c/for-5.6 commit 9f7a03642e0e25dc0561be124bddae2b8ed787ab Author: Wolfram Sang Date: Mon Jan 13 22:06:43 2020 +0100 i2c: parport: move include file into main source After removal of the parport-light driver, this include is used by the parport driver exclusively and can be included in the main source. Move module parameter declarations to its variable declaration while here. Signed-off-by: Wolfram Sang Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 511f7d54842fd12eff5687f51c0ee4f812066399 Author: Wolfram Sang Date: Mon Jan 13 22:06:42 2020 +0100 i2c: parport: simplify Kconfig description The driver is not 'new' anymore, so remove details from the driver it surpassed. Signed-off-by: Wolfram Sang Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 710b65335c19eea696741eb2d5e45a39aa23d0bb Author: Wolfram Sang Date: Mon Jan 13 22:06:41 2020 +0100 i2c: parport-light: remove driver The justification of a light version of the parport driver was less overhead for embedded systems. Well, today, even if an embedded system still has a parport, it surely can handle the fully-fledged parport driver. Remove it to reduce the maintenance burden. Signed-off-by: Wolfram Sang Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 7a30ebb9f2a253eae908cc3e1ba7daaa3bfe2bba Author: Kelvin Cao Date: Tue Jan 14 20:56:48 2020 -0700 PCI/switchtec: Add Gen4 device IDs Now that Gen4 is properly supported, advertise support in the module's device ID table and add the same IDs to the list of switchtec quirks. [logang@deltatee.com: add commit message and quirk IDs] Link: https://lore.kernel.org/r/20200115035648.2578-8-logang@deltatee.com Signed-off-by: Kelvin Cao Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit ce7c88600bf8ec0d12cf8e147907f96cd58eeb2e Author: Kelvin Cao Date: Mon Jan 6 12:03:35 2020 -0700 PCI/switchtec: Add Gen4 MRPC GAS access permission check Gen4 hardware provides new MRPC commands to read and write directly from any address in the PCI BAR (which Microsemi refers to as GAS). Since accessing BARs can be dangerous and break the driver, we don't want unprivileged users to have this ability. Therefore, require CAP_SYS_ADMIN for the local and remote GAS access MRPC commands. Privileged processes will already have access to the BAR through the sysfs resource file so this doesn't give userspace any capabilities it didn't already have. [logang@deltatee.com: rework commit message] Link: https://lore.kernel.org/r/20200106190337.2428-11-logang@deltatee.com Signed-off-by: Kelvin Cao Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit 4efa1d2e36976d7b26f2e67f4c838330fbc91299 Author: Kelvin Cao Date: Tue Jan 14 20:56:47 2020 -0700 PCI/switchtec: Add Gen4 flash information interface support Add the new flash_info registers struct and the implementation of ioctl_flash_part_info() for the new Gen4 hardware. [logang@deltatee.com: rewrote commit message] Link: https://lore.kernel.org/r/20200115035648.2578-7-logang@deltatee.com Signed-off-by: Kelvin Cao Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit a3321ca394082f403b447646d81c18ff6b39f4a6 Author: Logan Gunthorpe Date: Tue Jan 14 20:56:46 2020 -0700 PCI/switchtec: Add Gen4 system info register support Add the Gen4-specific system info registers and ensure their usage is guarded by a check on the device's generation. Link: https://lore.kernel.org/r/20200115035648.2578-6-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit 993d208daaebebc3f3ec211e862a413a90e8d69b Author: Logan Gunthorpe Date: Tue Jan 14 20:56:45 2020 -0700 PCI/switchtec: Separate Gen3 register structures into unions Since the sys_info and flash_info registers differ significantly in Gen4 hardware, separate out the Gen3 registers into their own structure with a union in the main structure. No functional changes intended. Link: https://lore.kernel.org/r/20200115035648.2578-5-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit 6a3d1b542cfafe6241d4de11800d639c9bf69f29 Author: Logan Gunthorpe Date: Tue Jan 14 20:56:44 2020 -0700 PCI/switchtec: Factor out Gen3 ioctl_flash_part_info() Refactor ioctl_flash_part_info() into a Gen3-specific function because the registers for flash partition information have changed significantly in Gen4 and will require a completely different implementation. No functional changes intended. Co-developed-by: Kelvin Cao Link: https://lore.kernel.org/r/20200115035648.2578-4-logang@deltatee.com Signed-off-by: Kelvin Cao Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit b13313a01a6a607bd92268822d498d5c7356ca71 Author: Logan Gunthorpe Date: Tue Jan 14 20:56:43 2020 -0700 PCI/switchtec: Add 'generation' variable Add a generation variable passed through the device ID table and test for Gen3-specific registers. This will allow us to add Gen4 and other devices that extend the programming model. Link: https://lore.kernel.org/r/20200115035648.2578-3-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit fcccd282b633ab9fc7d53ff8ccf82ab5c30a0985 Author: Logan Gunthorpe Date: Tue Jan 14 20:56:42 2020 -0700 PCI/switchtec: Rename generation-specific constants Gen4 hardware will have different values for the SWITCHTEC_X_RUNNING and SWITCHTEC_IOCTL_NUM_PARTITIONS, so rename them with GEN3 in their name. No functional changes intended. Link: https://lore.kernel.org/r/20200115035648.2578-2-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit 2085747d533b9be5f5a51efbc3e86be0164571a2 Author: Wesley Sheng Date: Mon Jan 6 12:03:30 2020 -0700 PCI/switchtec: Move check event ID from mask_event() to switchtec_event_isr() The event ID check doesn't depend on anything in the mask_all_events() to mask_event() path. Do it in switchtec_event_isr() to avoid the CSR read in mask_event(). Link: https://lore.kernel.org/r/20200106190337.2428-6-logang@deltatee.com Signed-off-by: Wesley Sheng Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit 7501a02a9dfca3b4aa5caa74d86b7215b2697f54 Author: Wesley Sheng Date: Mon Jan 6 12:03:29 2020 -0700 PCI/switchtec: Remove redundant valid PFF number count Remove the redundant valid PFF number count from ioctl_event_summary(), since init_pff() has already counted the valid PFFs. Link: https://lore.kernel.org/r/20200106190337.2428-5-logang@deltatee.com Signed-off-by: Wesley Sheng Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit a6b0ef9a7d03bb78d37c420753741ef8a082160b Author: Logan Gunthorpe Date: Mon Jan 6 12:03:28 2020 -0700 PCI/switchtec: Add support for Intercomm Notify and Upstream Error Containment Add support for the Inter Fabric Manager Communication (Intercomm) Notify event in PAX variants of Switchtec hardware and the Upstream Error Containment port in the MR1 release of Gen3 firmware. Link: https://lore.kernel.org/r/20200106190337.2428-4-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit a569f5f37203451d5378cb7de45f643bcb93d5e9 Author: Will Deacon Date: Wed Jan 15 14:06:37 2020 +0000 arm64: Use register field helper in kaslr_requires_kpti() Rather than open-code the extraction of the E0PD field from the MMFR2 register, we can use the cpuid_feature_extract_unsigned_field() helper instead. Acked-by: Suzuki K Poulose Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon commit ebac96ede61a1a46bdef12df3c1f9c20b00f2d88 Author: Will Deacon Date: Wed Jan 15 13:59:58 2020 +0000 arm64: Simplify early check for broken TX1 when KASLR is enabled Now that the decision to use non-global mappings is stored in a variable, the check to avoid enabling them for the terminally broken ThunderX1 platform can be simplified so that it is only keyed off the MIDR value. Acked-by: Suzuki K Poulose Reviewed-by: Catalin Marinas Signed-off-by: Will Deacon commit ca78eee7b4ac13b63f5e872f7c3a5ca66b2df8da Author: Vincenzo Frascino Date: Tue Jan 14 08:03:05 2020 -0800 xfs: Add __packed to xfs_dir2_sf_entry_t definition xfs_check_ondisk_structs() verifies that the sizes of the data types used by xfs are correct via the XFS_CHECK_STRUCT_SIZE() macro. Since the structures padding can vary depending on the ABI (e.g. on ARM OABI structures are padded to multiple of 32 bits), it may happen that xfs_dir2_sf_entry_t size check breaks the compilation with the assertion below: In file included from linux/include/linux/string.h:6, from linux/include/linux/uuid.h:12, from linux/fs/xfs/xfs_linux.h:10, from linux/fs/xfs/xfs.h:22, from linux/fs/xfs/xfs_super.c:7: In function ‘xfs_check_ondisk_structs’, inlined from ‘init_xfs_fs’ at linux/fs/xfs/xfs_super.c:2025:2: linux/include/linux/compiler.h:350:38: error: call to ‘__compiletime_assert_107’ declared with attribute error: XFS: sizeof(xfs_dir2_sf_entry_t) is wrong, expected 3 _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__) Restore the correct behavior adding __packed to the structure definition. Cc: Darrick J. Wong Suggested-by: Christoph Hellwig Signed-off-by: Vincenzo Frascino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 8bf9284d99dcb1c8fbdfabde1979350cf41fa5f5 Author: Vladimir Murzin Date: Wed Jan 15 14:18:25 2020 +0000 arm64: Turn "broken gas inst" into real config option Use the new 'as-instr' Kconfig macro to define CONFIG_BROKEN_GAS_INST directly, making it available everywhere. Signed-off-by: Vladimir Murzin [will: Drop redundant 'y if' logic] Signed-off-by: Will Deacon commit 5a4549fd790500d7db94b7d2af6d60cee42110c3 Author: Jean-Philippe Brucker Date: Wed Jan 15 13:52:38 2020 +0100 PCI/ATS: Add PASID stubs The SMMUv3 driver, which may be built without CONFIG_PCI, will soon gain PASID support. Partially revert commit c6e9aefbf9db ("PCI/ATS: Remove unused PRI and PASID stubs") to re-introduce the PASID stubs, and avoid adding more #ifdefs to the SMMU driver. Acked-by: Bjorn Helgaas Reviewed-by: Eric Auger Reviewed-by: Jonathan Cameron Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon commit 92c1d360dcda0ebd49253c0899bfeeb117be91fe Author: Will Deacon Date: Wed Jan 15 15:35:16 2020 +0000 iommu/arm-smmu-v3: Return -EBUSY when trying to re-add a device Although we WARN in arm_smmu_add_device() if the device being added has been added already without a subsequent call to arm_smmu_remove_device(), we still continue half-heartedly, initialising the stream-table for any new StreamIDs that may have magically appeared and re-establishing device links that should still be there from last time. Given that calling ->add_device() twice without removing the device in the meantime is indicative of an error in the caller, just return -EBUSY after warning. Cc: Robin Murphy Cc: Jean Philippe-Brucker Signed-off-by: Will Deacon commit a2be6218e649fb6e444e468dae5d177eea64d328 Author: Jean-Philippe Brucker Date: Wed Jan 15 13:52:37 2020 +0100 iommu/arm-smmu-v3: Improve add_device() error handling Let add_device() clean up after itself. The iommu_bus_init() function does call remove_device() on error, but other sites (e.g. of_iommu) do not. Don't free level-2 stream tables because we'd have to track if we allocated each of them or if they are used by other endpoints. It's not worth the hassle since they are managed resources. Reviewed-by: Eric Auger Reviewed-by: Jonathan Cameron Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon commit d71e01716b3606a6648df7e5646ae12c75babde4 Author: Will Deacon Date: Wed Jan 15 15:21:47 2020 +0000 iommu/arm-smmu-v3: Use WRITE_ONCE() when changing validity of an STE If, for some bizarre reason, the compiler decided to split up the write of STE DWORD 0, we could end up making a partial structure valid. Although this probably won't happen, follow the example of the context-descriptor code and use WRITE_ONCE() to ensure atomicity of the write. Reported-by: Jean-Philippe Brucker Signed-off-by: Will Deacon commit 9c9aa8fdf306cd7329e0a68bbcbe2f71b397dac1 Author: Masahiro Yamada Date: Mon Jan 13 16:30:17 2020 +0900 kbuild: remove 'Building modules, stage 2.' log This log is displayed every time modules are built, but it is not so important. Signed-off-by: Masahiro Yamada commit 73af06f589fe5656b07baa92e390d2d48464b18a Author: Jean-Philippe Brucker Date: Wed Jan 15 13:52:36 2020 +0100 iommu/arm-smmu-v3: Add second level of context descriptor table The SMMU can support up to 20 bits of SSID. Add a second level of page tables to accommodate this. Devices that support more than 1024 SSIDs now have a table of 1024 L1 entries (8kB), pointing to tables of 1024 context descriptors (64kB), allocated on demand. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon commit 492ddc79e07ed16a4ec4b6f57787273b2e4c26c1 Author: Jean-Philippe Brucker Date: Wed Jan 15 13:52:35 2020 +0100 iommu/arm-smmu-v3: Prepare for handling arm_smmu_write_ctx_desc() failure Second-level context descriptor tables will be allocated lazily in arm_smmu_write_ctx_desc(). Help with handling allocation failure by moving the CD write into arm_smmu_domain_finalise_s1(). Reviewed-by: Eric Auger Reviewed-by: Jonathan Cameron Signed-off-by: Jean-Philippe Brucker [will: Add comment per discussion on list] Signed-off-by: Will Deacon commit 2505ec6f85ad864b76127f9662c6f3f315dff14f Author: Jean-Philippe Brucker Date: Wed Jan 15 13:52:34 2020 +0100 iommu/arm-smmu-v3: Propagate ssid_bits Now that we support substream IDs, initialize s1cdmax with the number of SSID bits supported by a master and the SMMU. Context descriptor tables are allocated once for the first master attached to a domain. Therefore attaching multiple devices with different SSID sizes is tricky, and we currently don't support it. As a future improvement it would be nice to at least support attaching a SSID-capable device to a domain that isn't using SSID, by reallocating the SSID table. This would allow supporting a SSID-capable device that is in the same IOMMU group as a bridge, for example. Varying SSID size is less of a concern, since the PCIe specification "highly recommends" that devices supporting PASID implement all 20 bits of it. Tested-by: Zhangfei Gao Reviewed-by: Eric Auger Reviewed-by: Jonathan Cameron Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon commit 87f42391f6a57c252453aff2005fe2ec74f6873b Author: Jean-Philippe Brucker Date: Wed Jan 15 13:52:33 2020 +0100 iommu/arm-smmu-v3: Add support for Substream IDs At the moment, the SMMUv3 driver implements only one stage-1 or stage-2 page directory per device. However SMMUv3 allows more than one address space for some devices, by providing multiple stage-1 page directories. In addition to the Stream ID (SID), that identifies a device, we can now have Substream IDs (SSID) identifying an address space. In PCIe, SID is called Requester ID (RID) and SSID is called Process Address-Space ID (PASID). A complete stage-1 walk goes through the context descriptor table: Stream tables Ctx. Desc. tables Page tables +--------+ ,------->+-------+ ,------->+-------+ : : | : : | : : +--------+ | +-------+ | +-------+ SID->| STE |---' SSID->| CD |---' IOVA->| PTE |--> IPA +--------+ +-------+ +-------+ : : : : : : +--------+ +-------+ +-------+ Rewrite arm_smmu_write_ctx_desc() to modify context descriptor table entries. To keep things simple we only implement one level of context descriptor tables here, but as with stream and page tables, an SSID can be split to index multiple levels of tables. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon commit 3bc0bb36fa30e95ca829e9cf480e1ef7f7638333 Author: Michal Koutný Date: Thu Jan 9 16:05:59 2020 +0100 cgroup: Prevent double killing of css when enabling threaded cgroup The test_cgcore_no_internal_process_constraint_on_threads selftest when running with subsystem controlling noise triggers two warnings: > [ 597.443115] WARNING: CPU: 1 PID: 28167 at kernel/cgroup/cgroup.c:3131 cgroup_apply_control_enable+0xe0/0x3f0 > [ 597.443413] WARNING: CPU: 1 PID: 28167 at kernel/cgroup/cgroup.c:3177 cgroup_apply_control_disable+0xa6/0x160 Both stem from a call to cgroup_type_write. The first warning was also triggered by syzkaller. When we're switching cgroup to threaded mode shortly after a subsystem was disabled on it, we can see the respective subsystem css dying there. The warning in cgroup_apply_control_enable is harmless in this case since we're not adding new subsys anyway. The warning in cgroup_apply_control_disable indicates an attempt to kill css of recently disabled subsystem repeatedly. The commit prevents these situations by making cgroup_type_write wait for all dying csses to go away before re-applying subtree controls. When at it, the locations of WARN_ON_ONCE calls are moved so that warning is triggered only when we are about to misuse the dying css. Reported-by: syzbot+5493b2a54d31d6aea629@syzkaller.appspotmail.com Reported-by: Christian Brauner Signed-off-by: Michal Koutný Signed-off-by: Tejun Heo commit e8ab20d9bcb3e98b3e205396a56799b276951b64 Author: Daniel Jordan Date: Mon Jan 13 17:52:40 2020 -0500 workqueue: remove workqueue_work event class The trace event class workqueue_work now has only one consumer, so get rid of it. No functional change. Signed-off-by: Daniel Jordan Cc: Tejun Heo Cc: Lai Jiangshan Cc: linux-kernel@vger.kernel.org Signed-off-by: Tejun Heo commit 1c5da0ec7f20dfb56030fb93f7f52f48e12deb52 Author: Daniel Jordan Date: Mon Jan 13 17:52:39 2020 -0500 workqueue: add worker function to workqueue_execute_end tracepoint It's surprising that workqueue_execute_end includes only the work when its counterpart workqueue_execute_start has both the work and the worker function. You can't set a tracing filter or trigger based on the function, and postprocessing scripts interested in specific functions are harder to write since they have to remember the work from _start and match it up with the same field in _end. Add the function name, taking care to use the copy stashed in the worker since the work is no longer safe to touch. Signed-off-by: Daniel Jordan Cc: Tejun Heo Cc: Lai Jiangshan Cc: linux-kernel@vger.kernel.org Signed-off-by: Tejun Heo commit a557aff0c72b62e5ca859eab376f932d24e36cea Author: Jean-Philippe Brucker Date: Wed Jan 15 13:52:32 2020 +0100 iommu/arm-smmu-v3: Add context descriptor tables allocators Support for SSID will require allocating context descriptor tables. Move the context descriptor allocation to separate functions. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon commit 7bc4f3fae9537d17be7d029afcb08e3dfd0f2801 Author: Jean-Philippe Brucker Date: Wed Jan 15 13:52:31 2020 +0100 iommu/arm-smmu-v3: Prepare arm_smmu_s1_cfg for SSID support When adding SSID support to the SMMUv3 driver, we'll need to manipulate leaf pasid tables and context descriptors. Extract the context descriptor structure and align with the way stream tables are handled. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon commit da22565d1d733e87e3e57127caab1bab250dcb70 Author: Jean-Philippe Brucker Date: Wed Jan 15 13:52:30 2020 +0100 ACPI/IORT: Parse SSID property of named component node Named component nodes in the IORT tables describe the number of Substream ID bits (aka. PASID) supported by the device. Propagate this value to the fwspec structure in order to enable PASID for platform devices. Acked-by: Hanjun Guo Reviewed-by: Eric Auger Reviewed-by: Jonathan Cameron Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon commit 89535821c04256964e266bf585cf224f65e08983 Author: Jean-Philippe Brucker Date: Wed Jan 15 13:52:29 2020 +0100 iommu/arm-smmu-v3: Parse PASID devicetree property of platform devices For platform devices that support SubstreamID (SSID), firmware provides the number of supported SSID bits. Restrict it to what the SMMU supports and cache it into master->ssid_bits, which will also be used for PCI PASID. Reviewed-by: Eric Auger Reviewed-by: Jonathan Cameron Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon commit 2e981b9468e670b76bd1048fa939ad1f9653bd79 Author: Jean-Philippe Brucker Date: Wed Jan 15 13:52:28 2020 +0100 dt-bindings: document PASID property for IOMMU masters On Arm systems, some platform devices behind an SMMU may support the PASID feature, which offers multiple address space. Let the firmware tell us when a device supports PASID. Reviewed-by: Eric Auger Reviewed-by: Jonathan Cameron Reviewed-by: Rob Herring Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon commit 9bb9069cfba5ac9b867bebbd4c2b1fa9fa20936f Author: Jean-Philippe Brucker Date: Wed Jan 15 13:52:27 2020 +0100 iommu/arm-smmu-v3: Drop __GFP_ZERO flag from DMA allocation Since commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*"), dma_alloc_* always initializes memory to zero, so there is no need to use dma_zalloc_* or pass the __GFP_ZERO flag anymore. The flag was introduced by commit 04fa26c71be5 ("iommu/arm-smmu: Convert DMA buffer allocations to the managed API"), since the managed API didn't provide a dmam_zalloc_coherent() function. Reviewed-by: Eric Auger Reviewed-by: Jonathan Cameron Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon commit 75ea91cd3eab8214eb8cd7f61ac23f41884d29ec Author: Chen Zhou Date: Fri Jan 10 15:23:20 2020 +0800 cgroup: fix function name in comment Function name cgroup_rstat_cpu_pop_upated() in comment should be cgroup_rstat_cpu_pop_updated(). Signed-off-by: Chen Zhou Signed-off-by: Tejun Heo commit fe1e8dbec11fcad3ae7a34e95fe483d4a2b018fc Author: Su Yanjun Date: Wed Dec 25 11:37:57 2019 +0800 NFSv3: FIx bug when using chacl and chmod to change acl We find a bug when running test under nfsv3  as below. 1) chacl u::r--,g::rwx,o:rw- file1 2) chmod u+w file1 3) chacl -l file1 We expect u::rw-, but it shows u::r--, more likely it returns the cached acl in inode. We dig the code find that the code path is different. chacl->..->__nfs3_proc_setacls->nfs_zap_acl_cache Then nfs_zap_acl_cache clears the NFS_INO_INVALID_ACL in NFS_I(inode)->cache_validity. chmod->..->nfs3_proc_setattr Because NFS_INO_INVALID_ACL has been cleared by chacl path, nfs_zap_acl_cache wont be called. nfs_setattr_update_inode will set NFS_INO_INVALID_ACL so let it before nfs_zap_acl_cache call. Signed-off-by: Su Yanjun Signed-off-by: Anna Schumaker commit d826e5b827641ae1bebb33d23a774f4e9bb8e94f Author: Olga Kornievskaia Date: Wed Dec 18 16:50:42 2019 -0500 NFSv4.x recover from pre-mature loss of openstateid Ever since the commit 0e0cb35b417f, it's possible to lose an open stateid while retrying a CLOSE due to ERR_OLD_STATEID. Once that happens, operations that require openstateid fail with EAGAIN which is propagated to the application then tests like generic/446 and generic/168 fail with "Resource temporarily unavailable". Instead of returning this error, initiate state recovery when possible to recover the open stateid and then try calling nfs4_select_rw_stateid() again. Fixes: 0e0cb35b417f ("NFSv4: Handle NFS4ERR_OLD_STATEID in CLOSE/OPEN_DOWNGRADE") Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker commit 62a1573fcf844a559a79bec2eafc4309f2be5c5b Author: Olga Kornievskaia Date: Thu Jan 2 17:09:54 2020 -0500 NFSv4 fix acl retrieval over krb5i/krb5p mounts For the krb5i and krb5p mount, it was problematic to truncate the received ACL to the provided buffer because an integrity check could not be preformed. Instead, provide enough pages to accommodate the largest buffer bounded by the largest RPC receive buffer size. Note: I don't think it's possible for the ACL to be truncated now. Thus NFS4_ACL_TRUNC flag and related code could be possibly removed but since I'm unsure, I'm leaving it. v2: needs +1 page. Signed-off-by: Olga Kornievskaia Signed-off-by: Anna Schumaker commit c74dfe97c104bda5144bfa8193d8e5ea67d5da7f Author: Trond Myklebust Date: Mon Jan 6 15:39:37 2020 -0500 NFS: Add mount option 'softreval' Add a mount option 'softreval' that allows attribute revalidation 'getattr' calls to time out, and causes them to fall back to using the cached attributes. The use case for this option is for ensuring that we can still (slowly) traverse paths and use cached information even when the server is down. Once the server comes back up again, the getattr calls start succeeding, and the caches will revalidate as usual. The 'softreval' mount option is automatically enabled if you have specified 'softerr'. It can be turned off using the options 'nosoftreval', or 'hard'. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 5c965db86e6b0e90a3112228820598e824920278 Author: Trond Myklebust Date: Mon Jan 6 15:39:36 2020 -0500 NFS: Trust cached access if we've already revalidated the inode once If we've already revalidated the inode once then don't distrust the access cache unless the NFS_INO_INVALID_ACCESS flag is actually set. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 4daaeba938228f7c97e80817ccda1e091c7d3fb6 Author: Trond Myklebust Date: Mon Jan 6 15:25:14 2020 -0500 NFS: Fix nfs_direct_write_reschedule_io() The 'hdr->good_bytes' is defined as the number of bytes we expect to read or write starting at offset hdr->io_start. In the case of a partial read/write we may end up adjusting hdr->args.offset and hdr->args.count to skip I/O for data that was already read/written, and so we must ensure the calculation takes that into account. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 8c9cb71491e7fd3ebee90d9799c9ca5b769bd0f4 Author: Trond Myklebust Date: Mon Jan 6 15:25:13 2020 -0500 NFS: When resending after a short write, reset the reply count to zero If we're resending a write due to a short read or write, ensure we reset the reply count to zero. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit e8194b7dd39ec5423c32a43542f8348a9bd6956f Author: Trond Myklebust Date: Mon Jan 6 15:25:12 2020 -0500 NFS: Improve tracing of permission calls On exit from nfs_do_access(), record the mask representing the requested permissions, as well as the server-supplied set of access rights for this user. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 088f3e68d899eb0b1fc184b0a2f947a5c91031fb Author: Trond Myklebust Date: Mon Jan 6 15:25:11 2020 -0500 pNFS/flexfiles: Add tracing for layout errors Trace layout errors for pNFS/flexfiles on read/write/commit operations. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 7bdd297ea6e695f27be67cb99b1fea1ff83e38e4 Author: Trond Myklebust Date: Mon Jan 6 15:25:10 2020 -0500 NFS: Clean up generic file commit tracepoint Clean up the generic file commit tracepoints to use a 64-bit value for the verifier, and to display the pNFS filehandle, if it exists. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 5bb2a7cb9fe58d2b1efedd6058d442c7871c45ec Author: Trond Myklebust Date: Mon Jan 6 15:25:09 2020 -0500 NFS: Clean up generic writeback tracepoints Clean up the generic writeback tracepoints so they do pass the full structures as arguments. Also ensure we report the number of bytes actually written. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 2343172d34c6296f79b404a0eb291e15ab19e5ca Author: Trond Myklebust Date: Mon Jan 6 15:25:08 2020 -0500 NFS: Clean up generic file read tracepoints Clean up the generic file read tracepoints so they do pass the full structures as arguments. Also ensure we report the number of bytes actually read. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 0722dc9fea58e8199577963bb7601ff9f3e00b0a Author: Trond Myklebust Date: Mon Jan 6 15:25:07 2020 -0500 pNFS/flexfiles: Record resend attempts on I/O failure If the attempt to do pNFS fails, then record what action we take to recover (resend, reset to pnfs or reset to mds). Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 118b6292195cfb86a9f43cb65610fc6d980c65f4 Author: Trond Myklebust Date: Mon Jan 6 15:25:06 2020 -0500 NFS: Fix fix of show_nfs_errors Casting a negative value to an unsigned long is not the same as converting it to its absolute value. Fixes: 96650e2effa2 ("NFS: Fix show_nfs_errors macros again") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 25925b00a972e4ec12702483686b48b609e24703 Author: Trond Myklebust Date: Mon Jan 6 15:25:05 2020 -0500 NFSv4: Improve read/write/commit tracing Ensure we always return the number of bytes read/written. Also display the pnfs filehandle if it is in use. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 221203ce6406273cf00e5c6397257d986c003ee6 Author: Trond Myklebust Date: Mon Jan 6 15:25:04 2020 -0500 NFS/pnfs: Fix pnfs_generic_prepare_to_resend_writes() Instead of making assumptions about the commit verifier contents, change the commit code to ensure we always check that the verifier was set by the XDR code. Fixes: f54bcf2ecee9 ("pnfs: Prepare for flexfiles by pulling out common code") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 2197e9b06c228b65a2cef98ef34d6bf42fa1af3d Author: Trond Myklebust Date: Mon Jan 6 15:25:03 2020 -0500 NFS: Fix up fsync() when the server rebooted Don't clear the NFS_CONTEXT_RESEND_WRITES flag until after calling nfs_commit_inode(). Otherwise, if nfs_commit_inode() returns an error, we end up with dirty pages in the page cache, but no tag to tell us that those pages need resending. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit b32d285539e061dc3961e86f825d4ded5ba6de14 Author: Trond Myklebust Date: Mon Jan 6 15:25:02 2020 -0500 SUNRPC: Remove broken gss_mech_list_pseudoflavors() Remove gss_mech_list_pseudoflavors() and its callers. This is part of an unused API, and could leak an RCU reference if it were ever called. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit b8946d7bfb9417ec171693d4478a831420aead5f Author: Trond Myklebust Date: Mon Jan 6 15:25:01 2020 -0500 NFS: Revalidate the file mapping on all fatal writeback errors If a write or commit failed, and the mapping sees a fatal error, we need to revalidate the contents of that mapping. Fixes: 06c9fdf3b9f1 ("NFS: On fatal writeback errors, we need to call nfs_inode_remove_request()") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit 0df68ced55443243951d02cc497be31fadf28173 Author: Trond Myklebust Date: Mon Jan 6 15:25:00 2020 -0500 NFS: Revalidate the file size on a fatal write error If we suffer a fatal error upon writing a file, which causes us to need to revalidate the entire mapping, then we should also revalidate the file size. Fixes: d2ceb7e57086 ("NFS: Don't use page_file_mapping after removing the page") Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker commit e515dd9d76d22446b67f1568e3fc39ec84635360 Author: Chuck Lever Date: Fri Jan 3 11:57:09 2020 -0500 xprtrdma: DMA map rr_rdma_buf as each rpcrdma_rep is created Clean up: This simplifies the logic in rpcrdma_post_recvs. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit b7ff0185e92a68e77da7edff38e124dfb25b079c Author: Chuck Lever Date: Fri Jan 3 11:57:04 2020 -0500 xprtrdma: Destroy reps from previous connection instance To safely get rid of all rpcrdma_reps from a particular connection instance, xprtrdma has to wait until each of those reps is finished being used. A rep may be backing the rq_rcv_buf of an RPC that has just completed, for example. Since it is safe to invoke rpcrdma_rep_destroy() only in the Receive completion handler, simply mark reps remaining in the rb_all_reps list after the transport is drained. These will then be deleted as rpcrdma_post_recvs pulls them off the rep free list. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 85810388a9ddcc8e82738a3df6d3d7b32a79e0ea Author: Chuck Lever Date: Fri Jan 3 11:56:58 2020 -0500 xprtrdma: Destroy rpcrdma_rep when Receive is flushed This reduces the hardware and memory footprint of an unconnected transport. At some point in the future, transport reconnect will allow resolving the destination IP address through a different device. The current change enables reps for the new connection to be allocated on whichever NUMA node the new device affines to after a reconnect. Note that this does not destroy _all_ the transport's reps... there will be a few that are still part of a running RPC completion. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit b78de1dca00376aaba7a58bb5fe21c1606524abe Author: Chuck Lever Date: Fri Jan 3 11:56:53 2020 -0500 xprtrdma: Allocate and map transport header buffers at connect time Currently the underlying RDMA device is chosen at transport set-up time. But it will soon be at connect time instead. The maximum size of a transport header is based on device capabilities. Thus transport header buffers have to be allocated _after_ the underlying device has been chosen (via address and route resolution); ie, in the connect worker. Thus, move the allocation of transport header buffers to the connect worker, after the point at which the underlying RDMA device has been chosen. This also means the RDMA device is available to do a DMA mapping of these buffers at connect time, instead of in the hot I/O path. Make that optimization as well. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 25868e610aed20e06f6ff10a562a04e8aaea5a5e Author: Chuck Lever Date: Fri Jan 3 11:56:48 2020 -0500 xprtrdma: Refactor frwr_is_supported Refactor: Perform the "is supported" check in rpcrdma_ep_create() instead of in rpcrdma_ia_open(). frwr_open() is where most of the logic to query device attributes is already located. The current code displays a redundant error message when the device does not support FRWR. As an additional clean-up, this patch removes the extra message. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 18d065a5d4f16eeefb690c298671c3f9131121fe Author: Chuck Lever Date: Fri Jan 3 11:56:43 2020 -0500 xprtrdma: Eliminate per-transport "max pages" To support device hotplug and migrating a connection between devices of different capabilities, we have to guarantee that all in-kernel devices can support the same max NFS payload size (1 megabyte). This means that possibly one or two in-tree devices are no longer supported for NFS/RDMA because they cannot support 1MB rsize/wsize. The only one I confirmed was cxgb3, but it has already been removed from the kernel. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 7581d90109cad7d7322fd90cea023c706912f4bd Author: Chuck Lever Date: Fri Jan 3 11:56:37 2020 -0500 xprtrdma: Refactor initialization of ep->rep_max_requests Clean up: there is no need to keep two copies of the same value. Also, in subsequent patches, rpcrdma_ep_create() will be called in the connect worker rather than at set-up time. Minor fix: Initialize the transport's sendctx to the value based on the capabilities of the underlying device, not the maximum setting. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit cb586decbb88fcd068116af2d4e1e3e2e86978d6 Author: Chuck Lever Date: Fri Jan 3 11:56:32 2020 -0500 xprtrdma: Make sendctx queue lifetime the same as connection lifetime The size of the sendctx queue depends on the value stored in ia->ri_max_send_sges. This value is determined by querying the underlying device. Eventually, rpcrdma_ia_open() and rpcrdma_ep_create() will be called in the connect worker rather than at transport set-up time. The underlying device will not have been chosen device set-up time. The sendctx queue will thus have to be created after the underlying device has been chosen via address and route resolution; in other words, in the connect worker. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 2e87036814290887a188652a893ab968bad9fad7 Author: Chuck Lever Date: Fri Jan 3 11:56:27 2020 -0500 xprtrdma: Eliminate ri_max_send_sges Clean-up. The max_send_sge value also happens to be stored in ep->rep_attr. Let's keep just a single copy. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit e0b27d98bfed9cd9a22f96996bab24858646883d Author: Colin Ian King Date: Mon Jan 6 13:17:34 2020 +0000 NFS: Add missing null check for failed allocation Currently the allocation of buf is not being null checked and a null pointer dereference can occur when the memory allocation fails. Fix this by adding a check and returning -ENOMEM. Addresses-Coverity: ("Dereference null return") Fixes: 6d972518b821 ("NFS: Add fs_context support.") Signed-off-by: Colin Ian King Signed-off-by: Anna Schumaker commit 474c4f306eefbb21b67ebd1de802d005c7d7ecdc Author: Geert Uytterhoeven Date: Mon Dec 30 16:32:38 2019 +0100 nfs: NFS_SWAP should depend on SWAP If CONFIG_SWAP=n, it does not make much sense to offer the user the option to enable support for swapping over NFS, as that will still fail at run time: # swapon /swap swapon: /swap: swapon failed: Function not implemented Fix this by adding a dependency on CONFIG_SWAP. Fixes: a564b8f0398636ba ("nfs: enable swap on NFS") Signed-off-by: Geert Uytterhoeven Signed-off-by: Anna Schumaker commit c2bd2c0a55dd36c16b25a8fd93aa1053b576b72c Author: Julia Lawall Date: Wed Jan 1 08:43:30 2020 +0100 SUNRPC: constify copied structure The empty_iov structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Anna Schumaker commit bd89bc67f64fa23846645ce8b1c3cb51efebab32 Author: Murphy Zhou Date: Thu Jan 2 16:04:26 2020 +0800 fs/nfs, swapon: check holes in swapfile swapon over NFS does not go through generic_swapfile_activate code path when setting up extents. This makes holes in NFS swapfiles possible which is not expected for swapon. Signed-off-by: Murphy Zhou Signed-off-by: Anna Schumaker commit b8457606d95f219052cbcf07bd54c24c4290cd49 Author: Chuck Lever Date: Mon Dec 23 10:28:44 2019 -0500 SUNRPC: call_connect_status should handle -EPROTO The xprtrdma connect logic can return -EPROTO if the underlying device or network path does not support RDMA. This can happen after a device removal/insertion. - When SOFTCONN is set, EPROTO is a permanent error. - When SOFTCONN is not set, EPROTO is treated as a temporary error. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 2bb50aabb6f32c11dc9b542b4bb214b14e031e6c Author: Chuck Lever Date: Mon Dec 23 10:28:38 2019 -0500 NFS4: Report callback authentication errors This seems to be a somewhat common issue with Kerberos NFSv4.0 set-ups. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 861e1671bc2eed063aa624cdb2be8cfff16331c9 Author: Chuck Lever Date: Mon Dec 23 10:28:33 2019 -0500 NFS: Introduce trace events triggered by page writeback errors Try to capture the reason for the writeback path tagging an error on a page. Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit abf8af78a61523c15d366228b4a598141208a264 Author: Chuck Lever Date: Mon Dec 23 10:28:28 2019 -0500 SUNRPC: Capture signalled RPC tasks Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 6ed2144a80ebd9e40fa15a369f5528bafbc9b50d Author: zhengbin Date: Thu Dec 19 14:14:18 2019 +0800 NFS: move dprintk after nfs_alloc_fattr in nfs3_proc_lookup In nfs3_proc_lookup, if nfs_alloc_fattr fails, will only print "NFS call lookup". This may be confusing, move dprintk after nfs_alloc_fattr. Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Anna Schumaker commit 8b98a532481d6f2075b460dbc157f0502f1803a8 Author: zhengbin Date: Thu Dec 19 18:34:47 2019 +0800 NFS4: Remove unneeded semicolon Fixes coccicheck warning: fs/nfs/nfs4state.c:1138:2-3: Unneeded semicolon fs/nfs/nfs4proc.c:6862:2-3: Unneeded semicolon fs/nfs/nfs4proc.c:8629:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Anna Schumaker commit a3167dacbad3a42dffb78cca8684fafcd94575f9 Author: Arnd Bergmann Date: Mon Nov 11 21:16:27 2019 +0100 nfs: encode nfsv4 timestamps as 64-bit On 32-bit architectures, xdr_encode_nfstime4() needlessly truncates timestamps to a 32-bit value in the range between year 1902 and 2038. Change it to use 'struct timespec64' to allow the entire range of values supported by the server. Signed-off-by: Arnd Bergmann Signed-off-by: Anna Schumaker commit e5189e9a51172de650b263f0f8bc87a02d728c58 Author: Arnd Bergmann Date: Mon Nov 11 21:16:26 2019 +0100 nfs: remove timespec from xdr_encode_nfstime For NFSv2 and NFSv3, timestamps are stored using 32-bit entities and overflow in y2038. For historic reasons we truncate the 64-bit timestamps by converting from a timespec64 to a timespec first. Remove this unnecessary conversion step and do the truncation in the final functions that take a timestamp. This is transparent to users, but avoids one of the last uses of 'timespec' and lets us remove it later. Signed-off-by: Arnd Bergmann Signed-off-by: Anna Schumaker commit bc35b6b0cf4a83da5015ae8f1aa072a05586ee84 Author: Arnd Bergmann Date: Mon Nov 11 21:16:25 2019 +0100 nfs: fscache: use timespec64 in inode auxdata nfs currently behaves differently on 32-bit and 64-bit kernels regarding the on-disk format of nfs_fscache_inode_auxdata. That format should really be the same on any kernel, and we should avoid the 'timespec' type in order to remove that from the kernel later on. Using plain 'timespec64' would not be good here, since that includes implied padding and would possibly leak kernel stack data to the on-disk format on 32-bit architectures. struct __kernel_timespec would work as a replacement, but open-coding the two struct members in nfs_fscache_inode_auxdata makes it more obvious what's going on here, and keeps the current format for 64-bit architectures. Cc: David Howells Signed-off-by: Arnd Bergmann Signed-off-by: Anna Schumaker commit ae08483cdd666045b60ceb502dcbf30038334d58 Author: Arnd Bergmann Date: Mon Nov 11 21:16:23 2019 +0100 nfs: use timespec64 in nfs_fattr Push down the use of timespec64 into NFS nfs_fattr, to avoid needless conversions, and get closer to having 64-bit time_t support on 32-bit NFSv4 and removing some old interfaces from the kernel. Signed-off-by: Arnd Bergmann Signed-off-by: Anna Schumaker commit 52879b464a6a85ff4070786e8a5c876233ac6f67 Author: Arnd Bergmann Date: Mon Nov 11 21:16:21 2019 +0100 sunrpc: convert to time64_t for expiry Using signed 32-bit types for UTC time leads to the y2038 overflow, which is what happens in the sunrpc code at the moment. This changes the sunrpc code over to use time64_t where possible. The one exception is the gss_import_v{1,2}_context() function for kerberos5, which uses 32-bit timestamps in the protocol. Here, we can at least treat the numbers as 'unsigned', which extends the range from 2038 to 2106. Signed-off-by: Arnd Bergmann Signed-off-by: Anna Schumaker commit 88fe89a47153facd8cb2d06d5c8727f7224c43c2 Author: Masahiro Yamada Date: Fri Jan 10 14:02:24 2020 +0900 kbuild: remove *.tmp file when filechk fails Bartosz Golaszewski reports that when "make {menu,n,g,x}config" fails due to missing packages, a temporary file is left over, which is not ignored by git. For example, if GTK+ is not installed: $ make gconfig * * Unable to find the GTK+ installation. Please make sure that * the GTK+ 2.0 development package is correctly installed. * You need gtk+-2.0 gmodule-2.0 libglade-2.0 * scripts/kconfig/Makefile:208: recipe for target 'scripts/kconfig/gconf-cfg' failed make[1]: *** [scripts/kconfig/gconf-cfg] Error 1 Makefile:567: recipe for target 'gconfig' failed make: *** [gconfig] Error 2 $ git status HEAD detached at v5.4 Untracked files: (use "git add ..." to include in what will be committed) scripts/kconfig/gconf-cfg.tmp nothing added to commit but untracked files present (use "git add" to track) This is because the check scripts are run with filechk, which misses to clean up the temporary file on failure. When the line { $(filechk_$(1)); } > $@.tmp; ... fails, it exits immediately due to the 'set -e'. Use trap to make sure to delete the temporary file on exit. For extra safety, I replaced $@.tmp with $(dot-target).tmp to make it a hidden file. Reported-by: Bartosz Golaszewski Signed-off-by: Masahiro Yamada commit 94f7345b712405b79647a6a4bf8ccbd0d78fa69d Author: Masahiro Yamada Date: Mon Jan 6 17:36:28 2020 +0900 kbuild: remove PYTHON2 variable Python 2 has retired. There is no user of this variable. Signed-off-by: Masahiro Yamada commit 5370d4acc590e5992ca4a1b9f606714fad69e88a Author: Masahiro Yamada Date: Sun Jan 5 00:36:51 2020 +0900 modpost: assume STT_SPARC_REGISTER is defined Commit 8d5290149ee1 ("[SPARC]: Deal with glibc changing macro names in modpost.c") was more than 14 years ago. STT_SPARC_REGISTER is hopefully defined in elf.h of recent C libraries. Signed-off-by: Masahiro Yamada Acked-by: David S. Miller commit 7168965ec7b10b8a2c7dea1f82f1ebadf44d64ba Author: Masahiro Yamada Date: Sun Jan 5 00:02:38 2020 +0900 gen_initramfs.sh: remove intermediate cpio_list on errors This script sets the -e option, so it exits on any error, in which case it exits without cleaning up the intermediate cpio_list. Make sure to delete it on exit. Signed-off-by: Masahiro Yamada commit 65e00e04e5aea34b256814cfa21b32e3b94a2402 Author: Masahiro Yamada Date: Sun Jan 5 00:02:37 2020 +0900 initramfs: refactor the initramfs build rules Currently, usr/gen_initramfs.sh takes care of all the use-cases: [1] generates a cpio file unless CONFIG_INITRAMFS_SOURCE points to a single cpio archive [2] If CONFIG_INITRAMFS_SOURCE is the path to a cpio archive, use it as-is. [3] Compress the cpio file according to CONFIG_INITRAMFS_COMPRESSION_* unless it is passed a compressed archive. To simplify the script, move [2] and [3] to usr/Makefile. If CONFIG_INITRAMFS_SOURCE is the path to a cpio archive, there is no need to run this shell script. For the cpio archive compression, you can re-use the rules from scripts/Makefile.lib . Signed-off-by: Masahiro Yamada commit 469e87e89fd61de804bd29f6dd0380a399b567a7 Author: Masahiro Yamada Date: Sun Jan 5 00:02:36 2020 +0900 gen_initramfs.sh: always output cpio even without -o option Currently, this script outputs a cpio file when -o option is given, but otherwise a text file in the format recognized by gen_init_cpio. This behavior is unclear. Make it always output a cpio file. Signed-off-by: Masahiro Yamada commit 4538f41305c3f2c35463c996663dbf6307030ad7 Author: Masahiro Yamada Date: Sun Jan 5 00:02:35 2020 +0900 initramfs: add default_cpio_list, and delete -d option support When CONFIG_INITRAMFS_SOURCE is empty, the Makefile passes the -d option to gen_initramfs.sh to create the default initramfs, which contains /dev, /dev/console, and /root. This commit simplifies the default behavior; remove the -d option, and add the default cpio list. Signed-off-by: Masahiro Yamada commit 9668097599aa5fb87351bc2263e06a1c24718d40 Author: Masahiro Yamada Date: Sun Jan 5 00:02:34 2020 +0900 initramfs: generate dependency list and cpio at the same time Currently, this script is run twice, for the dependency list, and then for the cpio archive. The first one is re-run every time although its build log is suppressed so nobody notices it. Make it work more efficiently by generating the cpio and the dependency list at the same time. Signed-off-by: Masahiro Yamada commit 3e176683634cfc53dfc04366510d2989804554df Author: Masahiro Yamada Date: Sun Jan 5 00:02:33 2020 +0900 initramfs: specify $(src)/gen_initramfs.sh as a prerequisite in Makefile Specify the dependency directly in the Makefile. Signed-off-by: Masahiro Yamada Reviewed-by: Greg Thelen commit ce8866f0913ff157edc098f06bad07763ad317e7 Author: Scott Mayhew Date: Tue Dec 10 07:31:15 2019 -0500 NFS: Attach supplementary error information to fs_context. Split out from commit "NFS: Add fs_context support." Add wrappers nfs_errorf(), nfs_invalf(), and nfs_warnf() which log error information to the fs_context. Convert some printk's to use these new wrappers instead. Signed-off-by: Scott Mayhew Signed-off-by: Anna Schumaker commit 62a55d088cd87d480a6fd67b0d63b14ccae80838 Author: Scott Mayhew Date: Tue Dec 10 07:31:14 2019 -0500 NFS: Additional refactoring for fs_context conversion Split out from commit "NFS: Add fs_context support." This patch adds additional refactoring for the conversion of NFS to use fs_context, namely: (*) Merge nfs_mount_info and nfs_clone_mount into nfs_fs_context. nfs_clone_mount has had several fields removed, and nfs_mount_info has been removed altogether. (*) Various functions now take an fs_context as an argument instead of nfs_mount_info, nfs_fs_context, etc. Signed-off-by: Scott Mayhew Signed-off-by: Anna Schumaker commit f2aedb713c284429987dc66c7aaf38decfc8da2a Author: David Howells Date: Tue Dec 10 07:31:13 2019 -0500 NFS: Add fs_context support. Add filesystem context support to NFS, parsing the options in advance and attaching the information to struct nfs_fs_context. The highlights are: (*) Merge nfs_mount_info and nfs_clone_mount into nfs_fs_context. This structure represents NFS's superblock config. (*) Make use of the VFS's parsing support to split comma-separated lists (*) Pin the NFS protocol module in the nfs_fs_context. (*) Attach supplementary error information to fs_context. This has the downside that these strings must be static and can't be formatted. (*) Remove the auxiliary file_system_type structs since the information necessary can be conveyed in the nfs_fs_context struct instead. (*) Root mounts are made by duplicating the config for the requested mount so as to have the same parameters. Submounts pick up their parameters from the parent superblock. [AV -- retrans is u32, not string] [SM -- Renamed cfg to ctx in a few functions in an earlier patch] [SM -- Moved fs_context mount option parsing to an earlier patch] [SM -- Moved fs_context error logging to a later patch] [SM -- Fixed printks in nfs4_try_get_tree() and nfs4_get_referral_tree()] [SM -- Added is_remount_fc() helper] [SM -- Deferred some refactoring to a later patch] [SM -- Fixed referral mounts, which were broken in the original patch] [SM -- Fixed leak of nfs_fattr when fs_context is freed] Signed-off-by: David Howells Signed-off-by: Al Viro Signed-off-by: Scott Mayhew Signed-off-by: Anna Schumaker commit e38bb238ed8ce280a217629294ba51dc217c5a2c Author: Scott Mayhew Date: Tue Dec 10 07:31:12 2019 -0500 NFS: Convert mount option parsing to use functionality from fs_parser.h Split out from commit "NFS: Add fs_context support." Convert existing mount option definitions to fs_parameter_enum's and fs_parameter_spec's. Parse mount options using fs_parse() and lookup_constant(). Notes: 1) Fixed a typo in the udp6 definition in nfs_xprt_protocol_tokens from the original commit. 2) fs_parse() expects an fs_context as the first arg so that any errors can be logged to the fs_context. We're passing NULL for the fs_context (this will change in commit "NFS: Add fs_context support.") which is okay as it will cause logfc() to do a printk() instead. 3) fs_parse() expects an fs_paramter as the third arg. We're building an fs_parameter manually in nfs_fs_context_parse_option(), which will go away in commit "NFS: Add fs_context support.". Signed-off-by: Scott Mayhew Signed-off-by: Anna Schumaker commit 38465f5d1af932494d66b52d26bb3a02b837cdf8 Author: Scott Mayhew Date: Tue Dec 10 07:31:11 2019 -0500 NFS: rename nfs_fs_context pointer arg in a few functions Split out from commit "NFS: Add fs_context support." Rename cfg to ctx in nfs_init_server(), nfs_verify_authflavors(), and nfs_request_mount(). No functional changes. Signed-off-by: Scott Mayhew Signed-off-by: Anna Schumaker commit e558100fda7e8c7888f523920214bcb35ed9382b Author: David Howells Date: Tue Dec 10 07:31:10 2019 -0500 NFS: Do some tidying of the parsing code Do some tidying of the parsing code, including: (*) Returning 0/error rather than true/false. (*) Putting the nfs_fs_context pointer first in some arg lists. (*) Unwrap some lines that will now fit on one line. (*) Provide unioned sockaddr/sockaddr_storage fields to avoid casts. (*) nfs_parse_devname() can paste its return values directly into the nfs_fs_context struct as that's where the caller puts them. Signed-off-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit 48be8a66cf98accca033c42d214698dd64ac4f79 Author: David Howells Date: Tue Dec 10 07:31:09 2019 -0500 NFS: Add a small buffer in nfs_fs_context to avoid string dup Add a small buffer in nfs_fs_context to avoid string duplication when parsing numbers. Also make the parsing function wrapper place the parsed integer directly in the appropriate nfs_fs_context struct member. Signed-off-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit cbd071b5daa070976ada8601188fcefc986747d6 Author: David Howells Date: Tue Dec 10 07:31:08 2019 -0500 NFS: Deindent nfs_fs_context_parse_option() Deindent nfs_fs_context_parse_option(). Signed-off-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit f8ee01e3e2c8845e812497f0d4925c18cafaad87 Author: David Howells Date: Tue Dec 10 07:31:07 2019 -0500 NFS: Split nfs_parse_mount_options() Split nfs_parse_mount_options() to move the prologue, list-splitting and epilogue into one function and the per-option processing into another. Signed-off-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit 5eb005caf5383dd328199f0f2114cd7dad731d3d Author: David Howells Date: Tue Dec 10 07:31:06 2019 -0500 NFS: Rename struct nfs_parsed_mount_data to struct nfs_fs_context Rename struct nfs_parsed_mount_data to struct nfs_fs_context and rename pointers to it to "ctx". At some point this will be pointed to by an fs_context struct's fs_private pointer. Signed-off-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit e0a626b1247496971dfbed35d104f77e286c70bb Author: David Howells Date: Tue Dec 10 07:31:05 2019 -0500 NFS: Constify mount argument match tables The mount argument match tables should never be altered so constify them. Signed-off-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit 9954bf92c0cddd50a2a470be302e1c1ffdf21d42 Author: David Howells Date: Tue Dec 10 07:31:04 2019 -0500 NFS: Move mount parameterisation bits into their own file Split various bits relating to mount parameterisation out from fs/nfs/super.c into their own file to form the basis of filesystem context handling for NFS. No other changes are made to the code beyond removing 'static' qualifiers. Signed-off-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit adf2314fe667565258f304a04990d334defabeaf Author: Al Viro Date: Tue Dec 10 07:31:03 2019 -0500 nfs: get rid of ->set_security() it's always either nfs_set_sb_security() or nfs_clone_sb_security(), the choice being controlled by mount_info->cloned != NULL. No need to add methods, especially when both instances live right next to the caller and are never accessed anywhere else. Reviewed-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit ba8b6148067f51528dedf65b533d5094e25e6205 Author: Al Viro Date: Tue Dec 10 07:31:02 2019 -0500 nfs_clone_sb_security(): simplify the check for server bogosity We used to check ->i_op for being nfs_dir_inode_operations. With separate inode_operations for v3 and v4 that became bogus, but rather than going for protocol-dependent comparison we could've just checked ->i_fop instead; _that_ is the same for all protocol versions. Reviewed-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit ab88dca311a3722a66f7dee3c352e634ad1e6a25 Author: Al Viro Date: Tue Dec 10 07:31:01 2019 -0500 nfs: get rid of mount_info ->fill_super() The only possible values are nfs_fill_super and nfs_clone_super. The latter is used only when crossing into a submount and it is almost identical to the former; the only differences are * ->s_time_gran unconditionally set to 1 (even for v2 mounts). Regression dating back to 2012, actually. * ->s_blocksize/->s_blocksize_bits set to that of parent. Rather than messing with the method, stash ->s_blocksize_bits in mount_info in submount case and after the (now unconditional) call of nfs_fill_super() override ->s_blocksize/->s_blocksize_bits if that has been set. Reviewed-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit 0c38f2131df9865aa9fb24b7ad30a9657588e0e1 Author: Al Viro Date: Tue Dec 10 07:31:00 2019 -0500 nfs: don't pass nfs_subversion to ->create_server() pick it from mount_info Reviewed-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit 1bc3a2cbf239fc6c5984a074cc0d7b6de182407d Author: Al Viro Date: Tue Dec 10 07:30:59 2019 -0500 nfs: unexport nfs_fs_mount_common() Make it static, even. And remove a stale extern of (long-gone) nfs_xdev_mount_common() from internal.h, while we are at it. Reviewed-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit 82eaed2beef5ce31ecfeb70a33616e6331a51ef2 Author: Al Viro Date: Tue Dec 10 07:30:58 2019 -0500 nfs: merge xdev and remote file_system_type they are identical now... Reviewed-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit a55d3297be587c6baa0242ae0fbb92489e576005 Author: Al Viro Date: Tue Dec 10 07:30:57 2019 -0500 nfs: don't bother passing nfs_subversion to ->try_mount() and nfs_fs_mount_common() Reviewed-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit 6a3f7a399ebf52164e40773f4fbcb31a4c1ec02a Author: Al Viro Date: Tue Dec 10 07:30:56 2019 -0500 nfs: stash nfs_subversion reference into nfs_mount_info That will allow to get rid of passing those references around in quite a few places. Moreover, that will allow to merge xdev and remote file_system_type. Reviewed-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit 250d69f6a465e36a6ab8602030267de2586e028f Author: Al Viro Date: Tue Dec 10 07:30:55 2019 -0500 nfs: lift setting mount_info from nfs_xdev_mount() Do it in nfs_do_submount() instead. As a side benefit, nfs_clone_data doesn't need ->fh and ->fattr anymore. Reviewed-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit 4e357761bd44bbba3c3af226c2cc216beff0935c Author: Al Viro Date: Tue Dec 10 07:30:54 2019 -0500 nfs4: fold nfs_do_root_mount/nfs_follow_remote_path Reviewed-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit 6654f8e24668c18bfd30a0430d3d94e8c168d8a1 Author: Al Viro Date: Tue Dec 10 07:30:53 2019 -0500 nfs: don't bother setting/restoring export_path around do_nfs_root_mount() nothing in it will be looking at that thing anyway Reviewed-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit 15a9c4eff67298af0b6c5976ede86afa1bcf780a Author: Al Viro Date: Tue Dec 10 07:30:52 2019 -0500 nfs: fold nfs4_remote_fs_type and nfs4_remote_referral_fs_type They are identical now. Reviewed-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit 7643c12e955740ac08abcd159f4205cf0c3eef4e Author: Al Viro Date: Tue Dec 10 07:30:51 2019 -0500 nfs: lift setting mount_info from nfs4_remote{,_referral}_mount Do that (fhandle allocation, setting struct server up) in nfs4_referral_mount() and nfs4_try_mount() resp. and pass the server and pointer to mount_info into nfs_do_root_mount() so that nfs4_remote_referral_mount()/nfs_remote_mount() could be merged. Since we are moving stuff from ->mount() instances to the points prior to vfs_kern_mount() that would trigger those, we need to make sure that do_nfs_root_mount() will do the corresponding cleanup itself if it doesn't trigger those ->mount() instances. Reviewed-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit d0b779d47c92fa17a31cde312d05155941e26651 Author: Al Viro Date: Tue Dec 10 07:30:50 2019 -0500 nfs: stash server into struct nfs_mount_info Reviewed-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit 444a52960c0f109daf78e50e2a07d1f0786e2052 Author: Al Viro Date: Tue Dec 10 07:30:49 2019 -0500 saner calling conventions for nfs_fs_mount_common() Allow it to take ERR_PTR() for server and return ERR_CAST() of it in such case. All callers used to open-code that... Reviewed-by: David Howells Signed-off-by: Al Viro Signed-off-by: Anna Schumaker commit e9f35f634e099894f4d6c3b039cd3de5281ee637 Author: Jessica Yu Date: Wed Jan 15 15:49:31 2020 +0100 modsign: print module name along with error message It is useful to know which module failed signature verification, so print the module name along with the error message. Signed-off-by: Jessica Yu commit 2b0fb353c029de78f9fb9462290af3f2432749b9 Author: Andreas Gruenbacher Date: Wed Jan 15 06:26:00 2020 +0100 gfs2: Avoid access time thrashing in gfs2_inode_lookup In gfs2_inode_lookup, we initialize inode->i_atime to the lowest possibly value after gfs2_inode_refresh may already have been called. This should be the other way around, but we didn't notice because usually the inode type is known from the directory entry and so gfs2_inode_lookup won't call gfs2_inode_refresh. In addition, only initialize ip->i_no_formal_ino from no_formal_ino when actually needed. Signed-off-by: Andreas Gruenbacher commit df4e3eee310fb66e5f17aa651183b94d0d152650 Merge: 06bf8ea4f8ae 0468e667a5be Author: Mark Brown Date: Wed Jan 15 14:12:12 2020 +0000 Merge branch 'topic/equal' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into asoc-5.6 commit 09e3c22a86f6889db0e93fb29d9255081a126f64 Author: Mark Brown Date: Mon Dec 9 18:12:17 2019 +0000 arm64: Use a variable to store non-global mappings decision Refactor the code which checks to see if we need to use non-global mappings to use a variable instead of checking with the CPU capabilities each time, doing the initial check for KPTI early in boot before we start allocating memory so we still avoid transitioning to non-global mappings in common cases. Since this variable always matches our decision about non-global mappings this means we can also combine arm64_kernel_use_ng_mappings() and arm64_unmap_kernel_at_el0() into a single function, the variable simply stores the result and the decision code is elsewhere. We could just have the users check the variable directly but having a function makes it clear that these uses are read-only. The result is that we simplify the code a bit and reduces the amount of code executed at runtime. Signed-off-by: Mark Brown Reviewed-by: Suzuki K Poulose Signed-off-by: Will Deacon commit 92ac6fd162b42628ebe50cc2f08d6a77759e7911 Author: Mark Brown Date: Mon Dec 9 18:12:16 2019 +0000 arm64: Don't use KPTI where we have E0PD Since E0PD is intended to fulfil the same role as KPTI we don't need to use KPTI on CPUs where E0PD is available, we can rely on E0PD instead. Change the check that forces KPTI on when KASLR is enabled to check for E0PD before doing so, CPUs with E0PD are not expected to be affected by meltdown so should not need to enable KPTI for other reasons. Since E0PD is a system capability we will still enable KPTI if any of the CPUs in the system lacks E0PD, this will rewrite any global mappings that were established in systems where some but not all CPUs support E0PD. We may transiently have a mix of global and non-global mappings while booting since we use the local CPU when deciding if KPTI will be required prior to completing CPU enumeration but any global mappings will be converted to non-global ones when KPTI is applied. KPTI can still be forced on from the command line if required. Signed-off-by: Mark Brown Reviewed-by: Suzuki K Poulose Signed-off-by: Will Deacon commit c2d92353b28f8542c6b3150900b38c94b1d61480 Author: Mark Brown Date: Mon Dec 9 18:12:15 2019 +0000 arm64: Factor out checks for KASLR in KPTI code into separate function In preparation for integrating E0PD support with KASLR factor out the checks for interaction between KASLR and KPTI done in boot context into a new function kaslr_requires_kpti(), in the process clarifying the distinction between what we do in boot context and what we do at runtime. Signed-off-by: Mark Brown Reviewed-by: Suzuki K Poulose Signed-off-by: Will Deacon commit 3c7b90cb145a0ed547126c1811af40c38f0cdc7c Author: Alexandre Belloni Date: Sun Dec 29 21:44:18 2019 +0100 rtc: at91rm9200: use FIELD_PREP/FIELD_GET Use FIELD_PREP and FIELD_GET instead of hardcoding already defined values. Link: https://lore.kernel.org/r/20191229204421.337612-6-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 565205d5adc196dcb34789c36e705d3220f02892 Author: Alexandre Belloni Date: Sun Dec 29 21:44:17 2019 +0100 rtc: at91rm9200: avoid time readout in at91_rtc_setalarm The current rtc time is read out in at91_rtc_setalarm but it it immediately overwritten by the alarm time. Remove the readout. Link: https://lore.kernel.org/r/20191229204421.337612-5-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit a1243b099e257f8d977b19e503c3a0d0e70fbb84 Author: Alexandre Belloni Date: Sun Dec 29 21:44:16 2019 +0100 rtc: at91rm9200: move register definitions to C file The header was simply moved from the arm mach folder to drivers/rtc but there is not point in having it separated from the driver. Also remove unused bit definitions and use BIT and GENMASK. Link: https://lore.kernel.org/r/20191229204421.337612-4-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 3e6c69a058deaa50d33c3dac36cde80b4ce590e8 Author: Mark Brown Date: Mon Dec 9 18:12:14 2019 +0000 arm64: Add initial support for E0PD Kernel Page Table Isolation (KPTI) is used to mitigate some speculation based security issues by ensuring that the kernel is not mapped when userspace is running but this approach is expensive and is incompatible with SPE. E0PD, introduced in the ARMv8.5 extensions, provides an alternative to this which ensures that accesses from userspace to the kernel's half of the memory map to always fault with constant time, preventing timing attacks without requiring constant unmapping and remapping or preventing legitimate accesses. Currently this feature will only be enabled if all CPUs in the system support E0PD, if some CPUs do not support the feature at boot time then the feature will not be enabled and in the unlikely event that a late CPU is the first CPU to lack the feature then we will reject that CPU. This initial patch does not yet integrate with KPTI, this will be dealt with in followup patches. Ideally we could ensure that by default we don't use KPTI on CPUs where E0PD is present. Signed-off-by: Mark Brown Reviewed-by: Suzuki K Poulose [will: Fixed typo in Kconfig text] Signed-off-by: Will Deacon commit 4d3df16840a2bba5a345326426380e1381d976d2 Author: Logan Gunthorpe Date: Fri Jan 3 14:20:21 2020 -0700 dmaengine: plx-dma: Implement descriptor submission On prep, a spin lock is taken and the next entry in the circular buffer is filled. On submit, the valid bit is set in the hardware descriptor and the lock is released. The DMA engine is started (if it's not already running) when the client calls dma_async_issue_pending(). Signed-off-by: Logan Gunthorpe Link: https://lore.kernel.org/r/20200103212021.2881-4-logang@deltatee.com Signed-off-by: Vinod Koul commit c2dbcaa8c672d7ecc96c7a62fd6a34c9d3821bdb Author: Logan Gunthorpe Date: Fri Jan 3 14:20:20 2020 -0700 dmaengine: plx-dma: Implement hardware initialization and cleanup Allocate DMA coherent memory for the ring of DMA descriptors and program the appropriate hardware registers. A tasklet is created which is triggered on an interrupt to process all the finished requests. Additionally, any remaining descriptors are aborted when the hardware is removed or the resources freed. Use an RCU pointer to synchronize PCI device unbind. Signed-off-by: Logan Gunthorpe Link: https://lore.kernel.org/r/20200103212021.2881-3-logang@deltatee.com Signed-off-by: Vinod Koul commit 905ca51e63be794331e09ff74ccddd44393d3378 Author: Logan Gunthorpe Date: Fri Jan 3 14:20:19 2020 -0700 dmaengine: plx-dma: Introduce PLX DMA engine PCI driver skeleton Some PLX Switches can expose DMA engines via extra PCI functions on the upstream port. Each function will have one DMA channel. This patch is just the core PCI driver skeleton and dma engine registration. Signed-off-by: Logan Gunthorpe Link: https://lore.kernel.org/r/20200103212021.2881-2-logang@deltatee.com Signed-off-by: Vinod Koul commit 0468e667a5bead9c1b7ded92861b5a98d8d78745 Author: Stephen Rothwell Date: Wed Jan 15 12:02:58 2020 +1100 regulator fix for "regulator: core: Add regulator_is_equal() helper" Signed-off-by: Stephen Rothwell Link: https://lore.kernel.org/r/20200115120258.0e535fcb@canb.auug.org.au Acked-by: Marek Vasut Signed-off-by: Mark Brown commit 4baa550ecc86693106493bd92382e0edb8caf64d Author: Bin Liu Date: Wed Jan 15 07:25:47 2020 -0600 usb: musb: remove dummy driver musb_am335x.c Since commit 0782e8572ce4 ("ARM: dts: Probe am335x musb with ti-sysc"), the dummy driver musb_am335x.c is no longer needed, let's drop it. Acked-by: Tony Lindgren Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-26-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 1ea1859f8498275aeee35acde77fcb566cd8b999 Author: Linus Walleij Date: Wed Jan 15 07:25:46 2020 -0600 usb: musb: davinci: Convert to use GPIO descriptor The DaVinci MUSB glue contains an optional GPIO line to control VBUS power, convert this to use a GPIO descriptor and augment the EVM board file to provide this descriptor. I can't get this driver to compile properly and it depends on broken but when I didn get it to compile brokenly, it did at least not complain about THIS code being broken so I don't think I broke the driver any more than what it already is. I did away with the ifdefs that do not work with multiplatform anyway so the day someone decides to resurrect the code, the path to get it working should be easier as well since DaVinci is now multiplatform. Cc: Sekhar Nori Cc: Bartosz Golaszewski Cc: Tony Lindgren Signed-off-by: Linus Walleij [b-liu@ti.com: fixed one instance still ref to global variable vbus_state] Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-25-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 0990366bab3c6afb93b276106e1e24d4bc69db7b Author: Min Guo Date: Wed Jan 15 07:25:45 2020 -0600 usb: musb: Add support for MediaTek musb controller This adds support for MediaTek musb controller in host, peripheral and otg mode. There are some quirk of MediaTek musb controller, such as: -W1C interrupt status registers -Private data toggle registers -No dedicated DMA interrupt line Signed-off-by: Min Guo Signed-off-by: Yonglong Wu Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-24-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 9c93d7fd464e7aad59c2afc261f80e6e0fbe2ca9 Author: Min Guo Date: Wed Jan 15 07:25:44 2020 -0600 usb: musb: Add musb_clearb/w() interface Delete the const attribute of addr parameter in readb/w/l hooks, these changes are for implementing clearing W1C registers. Replace musb_readb/w with musb_clearb/w to clear the interrupt status. While at here, change some unsigned type to u32 to fix checkpatch.pl warnings. Signed-off-by: Min Guo [b-liu@ti.com: fix checkpatch.pl warnings.] Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-23-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit edce61776c7e212d8b3d61e69afe7672efbacb04 Author: Min Guo Date: Wed Jan 15 07:25:43 2020 -0600 usb: musb: Add noirq type of dma create interface Add noirq type of dma create interface for platform which do not have dedicated DMA interrupt line, move musbhsdma macro definition to musb_dma.h Signed-off-by: Min Guo Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-22-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit fe3bbd6b383fbc62128fd1fe850105080cb4c9da Author: Min Guo Date: Wed Jan 15 07:25:42 2020 -0600 usb: musb: Add get/set toggle hooks Add get/set toggle hooks in struct musb_io and struct musb_platform_ops for special platform; remove function musb_save_toggle, use the set/get callback to handle toggle. Signed-off-by: Min Guo Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-21-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 8d817d79349d953c8b05559e4cfd448785550e78 Author: Min Guo Date: Wed Jan 15 07:25:41 2020 -0600 dt-bindings: usb: musb: Add support for MediaTek musb controller This adds support for MediaTek musb controller in host, peripheral and otg mode. Signed-off-by: Min Guo Reviewed-by: Rob Herring Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-20-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit b7962fb45f8fe0678b2d2eaa48382ea32fcf9400 Author: Peter Ujfalusi Date: Wed Jan 15 07:25:40 2020 -0600 usb: musb/ux500: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. Signed-off-by: Peter Ujfalusi Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-19-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 3709ff5dc35203c5e93424941fa660e770a1e728 Author: Ben Dooks (Codethink) Date: Wed Jan 15 07:25:39 2020 -0600 USB: musb: fix __iomem in trace functions The trace functions should have __iomem on the addr pointers. Add __iomem to avoid the following warnings from sparse: drivers/usb/musb/musb_core.c:253:55: warning: incorrect type in argument 2 (different address spaces) drivers/usb/musb/musb_core.c:253:55: expected void const *addr drivers/usb/musb/musb_core.c:253:55: got void const [noderef] *addr drivers/usb/musb/musb_core.c:259:56: warning: incorrect type in argument 2 (different address spaces) drivers/usb/musb/musb_core.c:259:56: expected void const *addr drivers/usb/musb/musb_core.c:259:56: got void [noderef] *addr drivers/usb/musb/musb_core.c:267:55: warning: incorrect type in argument 2 (different address spaces) drivers/usb/musb/musb_core.c:267:55: expected void const *addr drivers/usb/musb/musb_core.c:267:55: got void const [noderef] *addr drivers/usb/musb/musb_core.c:273:56: warning: incorrect type in argument 2 (different address spaces) drivers/usb/musb/musb_core.c:273:56: expected void const *addr drivers/usb/musb/musb_core.c:273:56: got void [noderef] *addr drivers/usb/musb/musb_core.c:383:55: warning: incorrect type in argument 2 (different address spaces) drivers/usb/musb/musb_core.c:383:55: expected void const *addr drivers/usb/musb/musb_core.c:383:55: got void const [noderef] *addr drivers/usb/musb/musb_core.c:390:56: warning: incorrect type in argument 2 (different address spaces) drivers/usb/musb/musb_core.c:390:56: expected void const *addr drivers/usb/musb/musb_core.c:390:56: got void [noderef] *addr Signed-off-by: Ben Dooks (Codethink) Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-18-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 3fc32907b8ab688c26d7b213e866412379f73db7 Author: Paul Cercueil Date: Wed Jan 15 07:25:38 2020 -0600 usb: musb: jz4740: Whitespace and indentation fixes Fix lines with too much or not enough indentation, and lines which were indented with spaces instead of tabs. Signed-off-by: Paul Cercueil Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-17-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 94203e1a1a254743b9c8ac2755be86ac02496966 Author: Paul Cercueil Date: Wed Jan 15 07:25:37 2020 -0600 usb: musb: jz4740: Comments fix Add a /* sentinel */ comment to the sentinel entry of the devicetree ID table, and fix a multi-line comment not having its opening token on a separate line. Signed-off-by: Paul Cercueil Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-16-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 90fad5d7621e8edc9f8bb096c387a09cb563284c Author: Paul Cercueil Date: Wed Jan 15 07:25:36 2020 -0600 usb: musb: jz4740: Rename platform_device field in priv struct Name the platform_device pointer 'pdev' instead of 'musb'. Since the driver also deal with pointers to 'struct musb', it can be very confusing to have a pointer named after this struct but with a different type. Signed-off-by: Paul Cercueil Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-15-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 31cecb6bb6982e2976d3f95bd0d44855ec52cc29 Author: Paul Cercueil Date: Wed Jan 15 07:25:35 2020 -0600 usb: musb: jz4740: Constify jz4740_musb_pdata struct By moving around the jz4740_musb_pdata structure, we can have the .platform_ops field initialized, so that we don't have to initialize it manually in the probe function. Therefore, the struct can be const now. Signed-off-by: Paul Cercueil Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-14-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 4b70331b6fa13e4ae6ba634c336a616a7e2bf9d0 Author: Paul Cercueil Date: Wed Jan 15 07:25:34 2020 -0600 usb: musb: jz4740: Add local dev variable to clean up probe Clean up the probe function by using a local 'struct device *dev' variable, instead of referencing &pdev->dev everytime. Signed-off-by: Paul Cercueil Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-13-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 7e2ee1ab023cda87aa5f738076d83671484204d3 Author: Paul Cercueil Date: Wed Jan 15 07:25:33 2020 -0600 usb: musb: jz4740: Suppress useless field in priv structure The 'dev' field was never read anywhere. Signed-off-by: Paul Cercueil Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-12-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 98827105d8c32fffd22d963c493fc3f61388e939 Author: Tony Lindgren Date: Wed Jan 15 07:25:32 2020 -0600 usb: musb: Get rid of omap2430_musb_set_vbus() Now that we've removed direct calls from interrupt handler to omap2430_musb_set_vbus(), let's make things less confusing and configure VBUS directly in omap_musb_set_mailbox(). We have omap_musb_set_mailbox() called from the PHYs, and that's all we need. Note that we can now also drop the check for MUSB_INTERFACE_UTMI, we've been already calling otg_set_vbus(musb->xceiv->otg, 0) unconditionally via omap2430_musb_set_vbus() and we should only need to call it once. And we want to disable VBUS unconditionally on disconnect even without musb->gadget_driver, so let's drop that check too. Acked-by: Pavel Machek Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-11-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 8b359cbc3cdeb6145ca096334509df2a49ebaa0e Author: Tony Lindgren Date: Wed Jan 15 07:25:31 2020 -0600 usb: musb: omap2430: Idle musb on init We want to configure musb state in omap2430_musb_enable() instead of omap2430_musb_init(). Otherwise musb may not idle properly until USB cable has been connected at least once. And we already have omap_musb_set_mailbox() configure mode with omap_control_usb_set_mode() so we can remove those calls from omap2430_musb_enable(). Cc: Jacopo Mondi Cc: Marcel Partap Cc: Merlijn Wajer Cc: Michael Scott Cc: NeKit Cc: Pavel Machek Cc: Sebastian Reichel Acked-by: Pavel Machek Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-10-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit b769ae4f26e5892df70bf4d3005fe0db35c8ba7b Author: Tony Lindgren Date: Wed Jan 15 07:25:30 2020 -0600 usb: musb: omap2430: Clean up enable and remove devctl tinkering There should be no need to tinker with devctl in enable in the SoC glue code. We have musb_start() to take care of handling it already. Acked-by: Pavel Machek Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-9-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 93dc256871297071a24f7f9ce0abfddfff15094d Author: Tony Lindgren Date: Wed Jan 15 07:25:29 2020 -0600 usb: musb: Add musb_set_host and peripheral and use them for omap2430 At least some revisions of musb core need to set devctl session bit in peripheral mode to force musb to host mode. And we have places clearing the devctl session bit. Let's add a generic function to do this, and use it for omap2430. This should get us a bit closer to completely removing devctl register tinkering in the SoC glue code. Before making use of this code for the other glue layers, things need to be tested carefully as there may be a approximately a 200 ms delay needed between powering up musb and calling musb_set_host() to avoid. Otherwise the system hangs at least with omap2430 glue layer. Acked-by: Pavel Machek Signed-off-by: Tony Lindgren [b-liu@ti.com: fixed "line over 80 characters" warning] Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-8-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 15f1122f92c02f654037d8fb98164b785207b7af Author: Tony Lindgren Date: Wed Jan 15 07:25:28 2020 -0600 usb: musb: omap2430: Handle multiple ID ground interrupts We currently get "unhandled DISCONNECT transition" warnings from musb core on device disconnect as things are wrongly set to OTG_STATE_A_IDLE in host mode when enumerating devices. We can also get "Failed to write reg index" errors after enumerating. This is happening at least with cpcap phy where we get multiple ID ground interrupts. Looks like it's VBUS keeps timing out and needs to be kicked when the phy sends multiple ID ground interrupts during host mode. Cc: Jacopo Mondi Cc: Marcel Partap Cc: Merlijn Wajer Cc: Michael Scott Cc: NeKit Cc: Pavel Machek Cc: Sebastian Reichel Acked-by: Pavel Machek Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-7-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit ce3ab6503ebaba976405858616d7f6094e364973 Author: Tony Lindgren Date: Wed Jan 15 07:25:27 2020 -0600 usb: musb: omap2430: Wait on enable to avoid babble We can get babble interrupt if we attempt to switch to USB host mode too soon after enabling musb. Let's fix the issue by waiting a bit in runtime_resume. Cc: Jacopo Mondi Cc: Marcel Partap Cc: Merlijn Wajer Cc: Michael Scott Cc: NeKit Cc: Pavel Machek Cc: Sebastian Reichel Acked-by: Pavel Machek Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-6-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 91b6dec32e5c25fbdbb564d1e5af23764ec17ef1 Author: Tony Lindgren Date: Wed Jan 15 07:25:26 2020 -0600 usb: musb: omap2430: Get rid of musb .set_vbus for omap2430 glue We currently have musb_set_vbus() called from two different paths. Mostly it gets called from the USB PHY via omap_musb_set_mailbox(), but in some cases it can get also called from musb_stage0_irq() rather via .set_vbus: (musb_set_host [musb_hdrc]) (omap2430_musb_set_vbus [omap2430]) (musb_stage0_irq [musb_hdrc]) (musb_interrupt [musb_hdrc]) (omap2430_musb_interrupt [omap2430]) This is racy and will not work with introducing generic helper functions for musb_set_host() and musb_set_peripheral(). We want to get rid of the busy loops in favor of usleep_range(). Let's just get rid of .set_vbus for omap2430 glue layer and let the PHY code handle VBUS with musb_set_vbus(). Note that in the follow-up patch we can completely remove omap2430_musb_set_vbus(), but let's do it in a separate patch as this change may actually turn out to be needed as a fix. Reported-by: Pavel Machek Acked-by: Pavel Machek Signed-off-by: Tony Lindgren Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-5-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 1b569569a955c53b00a04d86cd84e60efe4c14be Author: Paul Cercueil Date: Wed Jan 15 07:25:25 2020 -0600 usb: musb: jz4740: Drop dependency on NOP_USB_XCEIV The driver does not depend directly on the NOP transceiver. It can compile and work just fine without it. Signed-off-by: Paul Cercueil Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-4-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 908f6fc3a14050961210f9754855f9e0eccb6d46 Author: Mans Rullgard Date: Wed Jan 15 07:25:24 2020 -0600 usb: musb: sunxi: propagate devicetree node to glue pdev In order for devicetree nodes to be correctly associated with attached devices, the controller node needs to be propagated to the glue device. Signed-off-by: Mans Rullgard Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-3-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit 9f101a73b085efbd1f6708f51a57f56fdd46a11b Author: Saurav Girepunje Date: Wed Jan 15 07:25:23 2020 -0600 usb: musb: core: Update the function description Update the function description of musb_stage0_irq() to remove unused parameter. Signed-off-by: Saurav Girepunje [b-liu@ti.com: revised commit log] Signed-off-by: Bin Liu Link: https://lore.kernel.org/r/20200115132547.364-2-b-liu@ti.com Signed-off-by: Greg Kroah-Hartman commit d8bc3bf8deede6d9c32f97b6a256264609ce2baa Author: Lukas Wunner Date: Wed Nov 20 11:15:15 2019 +0100 usb: dwc2: Drop unlock/lock upon queueing a work item The original dwc_otg driver used a DWC_WORKQ_SCHEDULE() wrapper to queue work items. Because that wrapper acquired the driver's global spinlock, an unlock/lock dance was necessary whenever a work item was queued up while the global spinlock was already held. The dwc2 driver dropped DWC_WORKQ_SCHEDULE() in favor of a direct call to queue_work(), but retained the (now gratuitous) unlock/lock dance in dwc2_handle_conn_id_status_change_intr(). Drop it. Signed-off-by: Lukas Wunner Acked-by: Minas Harutyunyan Acked-by: Felipe Balbi Link: https://lore.kernel.org/r/77c07f00a6a9d94323c4a060a3c72817b0703b97.1574244795.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman commit 59c324683400b41caa6d85b091e812ee3d5415c3 Author: Srinivas Kandagatla Date: Tue Jan 7 13:08:44 2020 +0000 gpio: wcd934x: Add support to wcd934x gpio controller This patch adds support to wcd934x gpio block found in WCD9340/WC9341 Audio codecs. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200107130844.20763-3-srinivas.kandagatla@linaro.org Signed-off-by: Linus Walleij commit e5e42ad224a040f93bf112e96f82b3a0ed97ffab Author: YueHaibing Date: Wed Jan 8 20:11:17 2020 +0800 gpiolib: remove set but not used variable 'config' drivers/gpio/gpiolib.c: In function gpio_set_config: drivers/gpio/gpiolib.c:3053:16: warning: variable config set but not used [-Wunused-but-set-variable] commit d90f36851d65 ("gpiolib: have a single place of calling set_config()") left behind this unused variable. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200108121117.45060-1-yuehaibing@huawei.com Reviewed-by: Bartosz Golaszewski Signed-off-by: Linus Walleij commit b20414252068263c736d008e536658f9ce13d74a Author: Thomas Hellstrom Date: Wed Dec 4 11:42:15 2019 +0100 drm/vmwgfx: Use VM_PFNMAP instead of VM_MIXEDMAP when possible For shared, and read-only private mappings of graphics memory, use VM_PFNMAP instead of VM_MIXEDMAP. This means less accounting overhead when inserting and removing page-table entries. TTM doesn't do this by default, since there was a performance problem with book-keeping of write-combined mappings. Since vmwgfx solely uses cached mappings, that's not a problem and now that the TTM vm has largely been turned into helpers, we can use VM_PFNMAP on a per-driver basis Signed-off-by: Thomas Hellstrom Reviewed-by: Roland Scheidegger commit 8af19d66b956401bab1ef24049eec9421be93862 Author: Michael Petlan Date: Tue Jan 14 11:42:36 2020 +0100 perf header: Use last modification time for timestamp Using .st_ctime clobbers the timestamp information in perf report header whenever any operation is done with the file. Even tar-ing and untar-ing the perf.data file (which preserves the file last modification timestamp) doesn't prevent that: [Michael@Diego tmp]$ ls -l perf.data -> -rw-------. 1 Michael Michael 169888 Dec 2 15:23 perf.data [Michael@Diego tmp]$ perf report --header-only # ======== -> # captured on : Mon Dec 2 15:23:42 2019 [...] [Michael@Diego tmp]$ tar c perf.data | xz > perf.data.tar.xz [Michael@Diego tmp]$ mkdir aaa [Michael@Diego tmp]$ cd aaa [Michael@Diego aaa]$ xzcat ../perf.data.tar.xz | tar x [Michael@Diego aaa]$ ls -l -a total 172 drwxrwxr-x. 2 Michael Michael 23 Jan 14 11:26 . drwxrwxr-x. 6 Michael Michael 4096 Jan 14 11:26 .. -> -rw-------. 1 Michael Michael 169888 Dec 2 15:23 perf.data [Michael@Diego aaa]$ perf report --header-only # ======== -> # captured on : Tue Jan 14 11:26:16 2020 [...] When using .st_mtime instead, correct information is printed: [Michael@Diego aaa]$ ~/acme/tools/perf/perf report --header-only # ======== -> # captured on : Mon Dec 2 15:23:42 2019 [...] Signed-off-by: Michael Petlan Acked-by: Jiri Olsa LPU-Reference: 20200114104236.31555-1-mpetlan@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit 395af861377d14616c221831430f58e5786b92f1 Author: Catalin Marinas Date: Wed Jan 15 11:30:08 2020 +0000 arm64: Move the LSE gas support detection to Kconfig As the Kconfig syntax gained support for $(as-instr) tests, move the LSE gas support detection from Makefile to the main arm64 Kconfig and remove the additional CONFIG_AS_LSE definition and check. Cc: Will Deacon Reviewed-by: Vladimir Murzin Tested-by: Vladimir Murzin Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon commit 42d519e3d0c071161d0a1c36e95a3743b113c590 Author: Catalin Marinas Date: Wed Jan 15 11:30:07 2020 +0000 kbuild: Add support for 'as-instr' to be used in Kconfig files Similar to 'cc-option' or 'ld-option', it is occasionally necessary to check whether the assembler supports certain ISA extensions. In the arm64 code we currently do this in Makefile with an additional define: lseinstr := $(call as-instr,.arch_extension lse,-DCONFIG_AS_LSE=1) Add the 'as-instr' option so that it can be used in Kconfig directly: def_bool $(as-instr,.arch_extension lse) Acked-by: Masahiro Yamada Reviewed-by: Vladimir Murzin Tested-by: Vladimir Murzin Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon commit 9ee68b314e9aa63ed11b98beb8a68810b8234dcf Author: Leonard Crestez Date: Tue Jan 14 22:25:46 2020 +0200 perf/imx_ddr: Fix cpu hotplug state cleanup This driver allocates a dynamic cpu hotplug state but never releases it. If reloaded in a loop it will quickly trigger a WARN message: "No more dynamic states available for CPU hotplug" Fix by calling cpuhp_remove_multi_state on remove like several other perf pmu drivers. Also fix the cleanup logic on probe error paths: add the missing cpuhp_remove_multi_state call and properly check the return value from cpuhp_state_add_instant_nocalls. Fixes: 9a66d36cc7ac ("drivers/perf: imx_ddr: Add DDR performance counter support to perf") Acked-by: Joakim Zhang Signed-off-by: Leonard Crestez Signed-off-by: Will Deacon commit 4e2fa6b902751da6e15ad1bc748a65498ed28c94 Merge: f6310b610760 f545923b4a6b Author: David S. Miller Date: Wed Jan 15 13:48:18 2020 +0100 Merge branch 'bridge-add-vlan-notifications-and-rtm-support' Nikolay Aleksandrov says: ==================== net: bridge: add vlan notifications and rtm support This patch-set is a prerequisite for adding per-vlan options support because we need to be able to send vlan-only notifications and do larger vlan netlink dumps. Per-vlan options are needed as we move the control more to vlans and would like to add per-vlan state (needed for per-vlan STP and EVPN), per-vlan multicast options and control, and I'm sure there would be many more per-vlan options coming. Now we create/delete/dump vlans with the device AF_SPEC attribute which is fine since we support vlan ranges or use a compact bridge_vlan_info structure, but that cannot really be extended to support per-vlan options well. The biggest issue is dumping them - we tried using the af_spec with a new vlan option attribute but that led to insufficient message size quickly, also another minor problem with that is we have to dump all vlans always when notifying which, with options present, can be huge if they have different options set, so we decided to add new rtm message types specifically for vlans and register handlers for them and a new bridge vlan notification nl group for vlan-only notifications. The new RTM NEW/DEL/GETVLAN types introduced match the current af spec bridge functionality and in fact use the same helpers. The new nl format is: [BRIDGE_VLANDB_ENTRY] [BRIDGE_VLANDB_ENTRY_INFO] - bridge_vlan_info (either 1 vlan or range start) [BRIDGE_VLANDB_ENTRY_RANGE] - range end This allows to encapsulate a range in a single attribute and also to create vlans and immediately set options on all of them with a single attribute. The GETVLAN dump can span multiple messages and dump all the necessary information. The vlan-only notifications are sent on NEW/DELVLAN events or when vlan options change (currently only flags), we try hard to compress the vlans into ranges in the notifications as well. When the per-vlan options are added we'll add helpers to check for option equality between neighbor vlans and will keep compressing them when possible. Note patch 02 is not really required, it's just a nice addition to have human-readable error messages from the different vlan checks. iproute2 changes and selftests will be sent with the next set which adds the first per-vlan option - per-vlan state similar to the port state. v2: changed patch 03 and patch 04 to use nlmsg_parse() in order to strictly validate the msg and make sure there are no remaining bytes ==================== Signed-off-by: David S. Miller commit f545923b4a6bd7abedac50ea3fce76c713be1b74 Author: Nikolay Aleksandrov Date: Tue Jan 14 19:56:14 2020 +0200 net: bridge: vlan: notify on vlan add/delete/change flags Now that we can notify, send a notification on add/del or change of flags. Notifications are also compressed when possible to reduce their number and relieve user-space of extra processing, due to that we have to manually notify after each add/del in order to avoid double notifications. We try hard to notify only about the vlans which actually changed, thus a single command can result in multiple notifications about disjoint ranges if there were vlans which didn't change inside. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit cf5bddb95cbe5340e486e84d46cf2f0bb324078c Author: Nikolay Aleksandrov Date: Tue Jan 14 19:56:13 2020 +0200 net: bridge: vlan: add rtnetlink group and notify support Add a new rtnetlink group for bridge vlan notifications - RTNLGRP_BRVLAN and add support for sending vlan notifications (both single and ranges). No functional changes intended, the notification support will be used by later patches. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 0ab558795184f87b532363e262357160d25f5d64 Author: Nikolay Aleksandrov Date: Tue Jan 14 19:56:12 2020 +0200 net: bridge: vlan: add rtm range support Add a new vlandb nl attribute - BRIDGE_VLANDB_ENTRY_RANGE which causes RTM_NEWVLAN/DELVAN to act on a range. Dumps now automatically compress similar vlans into ranges. This will be also used when per-vlan options are introduced and vlans' options match, they will be put into a single range which is encapsulated in one netlink attribute. We need to run similar checks as br_process_vlan_info() does because these ranges will be used for options setting and they'll be able to skip br_process_vlan_info(). Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit adb3ce9bcb0f565b21e0ce0c75223c6854670b80 Author: Nikolay Aleksandrov Date: Tue Jan 14 19:56:11 2020 +0200 net: bridge: vlan: add del rtm message support Adding RTM_DELVLAN support similar to RTM_NEWVLAN is simple, just need to map DELVLAN to DELLINK and register the handler. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit f26b296585dca043d78f13ef67cb17fb200d5e57 Author: Nikolay Aleksandrov Date: Tue Jan 14 19:56:10 2020 +0200 net: bridge: vlan: add new rtm message support Add initial RTM_NEWVLAN support which can only create vlans, operating similar to the current br_afspec(). We will use it later to also change per-vlan options. Old-style (flag-based) vlan ranges are not allowed when using RTM messages, we will introduce vlan ranges later via a new nested attribute which would allow us to have all the information about a range encapsulated into a single nl attribute. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 8dcea187088bce5d2f1149294ad109f022653547 Author: Nikolay Aleksandrov Date: Tue Jan 14 19:56:09 2020 +0200 net: bridge: vlan: add rtm definitions and dump support This patch adds vlan rtm definitions: - NEWVLAN: to be used for creating vlans, setting options and notifications - DELVLAN: to be used for deleting vlans - GETVLAN: used for dumping vlan information Dumping vlans which can span multiple messages is added now with basic information (vid and flags). We use nlmsg_parse() to validate the header length in order to be able to extend the message with filtering attributes later. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 8f4cc940a149b9fe013a191d6d8dc87aee9a204f Author: Nikolay Aleksandrov Date: Tue Jan 14 19:56:08 2020 +0200 net: bridge: netlink: add extack error messages when processing vlans Add extack messages on vlan processing errors. We need to move the flags missing check after the "last" check since we may have "last" set but lack a range end flag in the next entry. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 5a46facbbcd454985992b5109185329aebf82a02 Author: Nikolay Aleksandrov Date: Tue Jan 14 19:56:07 2020 +0200 net: bridge: vlan: add helpers to check for vlan id/range validity Add helpers to check if a vlan id or range are valid. The range helper must be called when range start or end are detected. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 783e998653b430a159f83552fa263f57bf8e2055 Author: Rayagonda Kokatanur Date: Fri Jan 10 09:25:24 2020 +0530 pinctrl: iproc: Use platform_get_irq_optional() to avoid error message Use platform_get_irq_optional() instead of platform_get_irq() to avoid below error message during probe: [ 0.589121] iproc-gpio 66424800.gpio: IRQ index 0 not found Signed-off-by: Rayagonda Kokatanur Link: https://lore.kernel.org/r/20200110035524.23511-1-rayagonda.kokatanur@broadcom.com Reviewed-by: Chris Packham Signed-off-by: Linus Walleij commit e81ccba69549630838f8e40cd3369607db8613c9 Author: Sachin agarwal Date: Sun Jan 12 20:03:12 2020 +0530 gpio: vx855: fixed a typo we had written "betwee" rather than "between". Signed-off-by: Sachin agarwal Link: https://lore.kernel.org/r/20200112143312.66048-1-sachinagarwal@sachins-MacBook-2.local Signed-off-by: Linus Walleij commit 7788f549ed8cfbecd75c10e1a1988812adba49d8 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Tue Jan 14 17:19:12 2020 +0000 serial_core: Remove unused member in uart_port It should remove the align-padding before @name. [yes, there's a "hole" in the structure now, but that's fine, no one cares. If they do care, the whole thing should be restructured using pahole to find a better ordering. Removing this field is good as some drivers have been known to abuse it for other things when they shouldn't have been doing that. -- gregkh] Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20200114171912.261787-4-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit bb02e2cb715a3f3552dbe765ea4a07799e4dff43 Author: Sean Christopherson Date: Tue Jan 14 12:25:45 2020 -0800 x86/cpu: Print "VMX disabled" error message iff KVM is enabled Don't print an error message about VMX being disabled by BIOS if KVM, the sole user of VMX, is disabled. E.g. if KVM is disabled and the MSR is unlocked, the kernel will intentionally disable VMX when locking feature control and then complain that "BIOS" disabled VMX. Fixes: ef4d3bf19855 ("x86/cpu: Clear VMX feature flag if VMX is not fully enabled") Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200114202545.20296-1-sean.j.christopherson@intel.com commit 793769120b109e3cec536bb8f5b6f9ef959c315f Author: Christian Gromm Date: Tue Jan 14 16:57:52 2020 +0100 staging: most: core: remove noisy log messages In order to not generate unnecessary noise in the kernel log,this patch removes debug log messages. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1579017478-3339-4-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 78ce8b26e3cfef58475a7caa6c83392ff276674f Author: Christian Gromm Date: Tue Jan 14 16:57:51 2020 +0100 staging: most: core: use dev_* function for logging This patch replaces all calls to pr_* functions and uses the dev_* functions instead. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1579017478-3339-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit ca78e042f286af6d8171481e4ec6800f3843b89f Author: Christian Gromm Date: Tue Jan 14 16:57:50 2020 +0100 staging: most: core: fix date in file comment This patch updates the date range in the comment section. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1579017478-3339-2-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 7a176c1079427194084eb169c554f0782ce6f0b4 Author: Paulo Miguel Almeida Date: Wed Jan 15 23:12:08 2020 +1300 staging: rtl8192u: replace printk with natdev_ statements in ieee80211 Checkpatch reports 'WARNING: printk() should include KERN_ facility level'. Fix this by specifying a relevant KERN_ value for each line in which it was missing. Once they are fixed, checkpatch reports 'WARNING: Prefer [subsystem eg: netdev]_dbg([subsystem]dev, ... then dev_dbg(dev, ... then pr_debug(... to printk(KERN_DEBUG ...'. Fix this by replacing relevant printk_ statements with their netdev_ equivalent. Signed-off-by: Paulo Miguel Almeida Link: https://lore.kernel.org/r/20200115101208.GA683742@localhost.localdomain Signed-off-by: Greg Kroah-Hartman commit 32f78c901d14bd63c38ed49d3db7d697b84e4a1c Author: Colin Ian King Date: Tue Jan 14 17:11:45 2020 +0000 staging: vt6655: remove redundant assignment to variable ret The variable ret is being initialized with a value that is never read and is being re-assigned later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200114171145.375356-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 01fbbd42d1f48b505714434c406f6ebbd6c9a60e Author: Colin Ian King Date: Tue Jan 14 17:27:20 2020 +0000 staging: wilc1000: remove redundant assignment to variable result The variable result is being initialized with a value that is never read and is being re-assigned later on. The assignment is redundant and hence can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200114172720.376286-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 4cc41cbce536876678b35e03c4a8a7bb72c78fa9 Author: Colin Ian King Date: Tue Jan 14 18:16:04 2020 +0000 staging: wlan-ng: ensure error return is actually returned Currently when the call to prism2sta_ifst fails a netdev_err error is reported, error return variable result is set to -1 but the function always returns 0 for success. Fix this by returning the error value in variable result rather than 0. Addresses-Coverity: ("Unused value") Fixes: 00b3ed168508 ("Staging: add wlan-ng prism2 usb driver") Signed-off-by: Colin Ian King Cc: stable Link: https://lore.kernel.org/r/20200114181604.390235-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 0956dcb853dcbfb16e3d98162255e4a73f875cbe Author: Jim Quinlan Date: Mon Dec 16 12:01:07 2019 +0100 dt-bindings: PCI: Add bindings for brcmstb's PCIe device The DT bindings description of the brcmstb PCIe device is described. This node can only be used for now on the Raspberry Pi 4. Signed-off-by: Jim Quinlan Co-developed-by: Nicolas Saenz Julienne Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Reviewed-by: Andrew Murray commit ca3fdc989c3cacf5b61a2334ca77ac29b0f5bc51 Author: Alexandre Belloni Date: Sun Dec 29 21:44:15 2019 +0100 rtc: at91rm9200: add sama5d4 and sama5d2 compatibles Both the sama5d4 and sama5d2 RTCs have more features than the previous RTCs, add a compatible string for them. Link: https://lore.kernel.org/r/20191229204421.337612-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 8e3747beff8c4533bf4f1a61b53e061266ef57db Author: Anshuman Khandual Date: Tue Dec 17 20:17:32 2019 +0530 arm64: Introduce ID_ISAR6 CPU register This adds basic building blocks required for ID_ISAR6 CPU register which identifies support for various instruction implementation on AArch32 state. Cc: Catalin Marinas Cc: Will Deacon Cc: Marc Zyngier Cc: James Morse Cc: Suzuki K Poulose Cc: Mark Rutland Cc: linux-kernel@vger.kernel.org Cc: kvmarm@lists.cs.columbia.edu Acked-by: Marc Zyngier Signed-off-by: Anshuman Khandual [will: Ensure SPECRES is treated the same as on A64] Signed-off-by: Will Deacon commit d4209d8b717311d114b5d47ba7f8249fd44e97c2 Author: Steven Price Date: Mon Dec 16 11:33:37 2019 +0000 arm64: cpufeature: Export matrix and other features to userspace Export the features introduced as part of ARMv8.6 exposed in the ID_AA64ISAR1_EL1 and ID_AA64ZFR0_EL1 registers. This introduces the Matrix features (ARMv8.2-I8MM, ARMv8.2-F64MM and ARMv8.2-F32MM) along with BFloat16 (Armv8.2-BF16), speculation invalidation (SPECRES) and Data Gathering Hint (ARMv8.0-DGH). Signed-off-by: Julien Grall [Added other features in those registers] Signed-off-by: Steven Price [will: Don't advertise SPECRES to userspace] Signed-off-by: Will Deacon commit 4f12de0a582e3a180fccc403021b335d2eef2c5f Author: Alexandre Belloni Date: Sun Dec 29 21:44:14 2019 +0100 dt-bindings: rtc: at91rm9200: convert bindings to json-schema Convert Real Time Clock for Atmel/Microchip SoCs bindings documentation to json-schema. Cc: Rob Herring Link: https://lore.kernel.org/r/20191229204421.337612-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit b7052876d7e89cedebe748763c2c7010ffe6cfe3 Author: Alexandre Belloni Date: Sun Dec 29 21:44:13 2019 +0100 rtc: at91rm9200: remove procfs information The RTC procfs interface is deprecated and hasn't been used by userspace for years. Link: https://lore.kernel.org/r/20191229204421.337612-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit d5bbdd5179df014fbffda71a3e8ecb796870f3aa Author: Claudiu Beznea Date: Wed Jan 15 12:59:43 2020 +0200 dt-bindings: atmel, at91rm9200-rtc: add microchip, sam9x60-rtc Add microchip,sam9x60-rtc to DT bindings documentation. Signed-off-by: Claudiu Beznea Acked-by: Rob Herring Link: https://lore.kernel.org/r/1579085987-13976-2-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit 61780dd7a45e72d697e35b675ca71e75b6ab08ce Author: Thomas Hellstrom Date: Tue Jan 14 11:38:19 2020 +0100 drm/vmwgfx: Bump driver minor version Bump driver minor version to signal availability of the host messaging ioctl. Signed-off-by: Thomas Hellstrom Reviewed-by: Charmaine Lee Reviewed-by: Roland Scheidegger commit 04c589f35bc57d2f2495fc065ad2ac0ee271ce93 Author: yu kuai Date: Fri Jan 3 20:17:10 2020 +0800 PNP: isapnp: remove set but not used variable 'checksum' Fixes gcc '-Wunused-but-set-variable' warning: drivers/pnp/isapnp/core.c: In function ‘isapnp_build_device_list’: drivers/pnp/isapnp/core.c:777:27: warning: variable ‘checksum’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai Signed-off-by: Rafael J. Wysocki commit cb92a3235956442c5ff211291865e219dc4cf4a0 Author: Roland Scheidegger Date: Thu Nov 21 17:44:56 2019 +0100 drm/vmwgfx: add ioctl for messaging from/to guest userspace to/from host Up to now, guest userspace does logging directly to host using essentially the same rather complex port assembly stuff as the kernel. We'd rather use the same mechanism than duplicate it (it may also change in the future), hence add a new ioctl for relaying guest/host messaging (logging is just one application of it). Signed-off-by: Roland Scheidegger Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit 40efb09a7f53125719e49864da008495e39aaa1e Author: Navid Emamdoost Date: Tue Sep 24 23:37:58 2019 -0500 drm/vmwgfx: prevent memory leak in vmw_cmdbuf_res_add In vmw_cmdbuf_res_add if drm_ht_insert_item fails the allocated memory for cres should be released. Fixes: 18e4a4669c50 ("drm/vmwgfx: Fix compat shader namespace") Signed-off-by: Navid Emamdoost Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit 0d4c19f93812c7b71c3a15f27fc4c5b2d990b2e6 Author: Emil Velikov Date: Fri Nov 1 13:03:11 2019 +0000 drm/vmwgfx: drop DRM_AUTH for render ioctls With earlier commit 9c84aeba67cc ("drm/vmwgfx: Kill unneeded legacy security features") we removed the no longer applicable validation, as we now have isolation of primary clients from different master realms. As of last commit, we're explicitly checking for authentication in the only render ioctls which care about one. With those in place, the DRM_AUTH token serves no real purpose. Let's drop it. Cc: VMware Graphics Cc: Thomas Hellstrom Signed-off-by: Emil Velikov Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit 4872e6aa217fbb475ffa0ad7bda0d9acff543f2c Author: Emil Velikov Date: Fri Nov 1 13:03:10 2019 +0000 drm/vmwgfx: check master authentication in surface_ref ioctls With later commit we'll rework DRM authentication handling. Namely DRM_AUTH will not be a requirement for DRM_RENDER_ALLOW ioctls. Since vmwgfx does isolation for primary clients in different master realms, the DRM_AUTH can be dropped. The only place where authentication matters, is surface_reference ioctls whenever a legacy (non-prime) handle is used. For those ioctls we call vmw_surface_handle_reference(), where we explicitly check if the client is both a) master and b) unauthenticated - bailing out as result. Otherwise the usual isolation path kicks in and we're all good. v2: Reword commit message, since the isolation work has landed. Cc: VMware Graphics Cc: Thomas Hellstrom Signed-off-by: Emil Velikov Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit 8815a94f27d2f30fe1216ce10c7da0f6ae69ca0f Author: Emil Velikov Date: Fri Nov 1 13:03:09 2019 +0000 drm/vmwgfx: move the require_exist handling together Move the render_client hunk for require_exist alongside the rest. Keeping all the reasons why an existing object is needed, in a single place makes it easier to follow. Cc: VMware Graphics Cc: Thomas Hellstrom Signed-off-by: Emil Velikov Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit a26ca967c240c628085142d6569fff69539b44e6 Author: Lukas Bulwahn Date: Sun Dec 8 11:53:28 2019 +0100 drm/vmwgfx: Replace deprecated PTR_RET Commit 508108ea2747 ("drm/vmwgfx: Don't refcount command-buffer managed resource lookups during command buffer validation") slips in use of deprecated PTR_RET. Use PTR_ERR_OR_ZERO instead. As the PTR_ERR_OR_ZERO is a bit longer than PTR_RET, we introduce local variable ret for proper indentation and line-length limits. Signed-off-by: Lukas Bulwahn Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit 36891da8de9822a62d79b64f99e73442efbf3f1d Author: Thomas Zimmermann Date: Tue Dec 10 13:43:22 2019 +0100 drm/vmwgfx: Call vmw_driver_{load,unload}() before registering device The load/unload callbacks in struct drm_driver are deprecated. Remove them and call functions explicitly. Signed-off-by: Thomas Zimmermann Reviewed-by: Thomas Hellstrom Signed-off-by: Thomas Hellstrom commit af4eaf10978e5b14660020f39e619059489cc694 Author: Thomas Hellstrom Date: Thu Nov 14 13:03:18 2019 +0000 drm/vmwgfx: Don't use the HB port if memory encryption is active With memory encryption active, the hypervisor typically can't read the guest memory using the HB port, since it is encrypted using a key known only to the guest. In that case fall back to processing 4 bytes at a time using the ordinary backdoor port. The other option would be to use unencrypted bounce buffers for the hypervisor to read out from or write into, but given the limited message sizes it appears more efficient to just fall back to the ordinary backdoor port. Signed-off-by: Thomas Hellstrom Reviewed-by: Roland Scheidegger commit 726a44531a8f90fb3dc01e1e9b578e767bf0738b Author: Bartosz Golaszewski Date: Tue Jan 14 16:02:53 2020 +0100 gpio: mockup: sort headers alphabetically For consistency and easier maintenance: sort the headers alphabetically. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200114150253.28716-3-brgl@bgdev.pl Signed-off-by: Linus Walleij commit f2f679832d0c40b575b16d2da3ac8263ae9471ed Author: Bartosz Golaszewski Date: Tue Jan 14 16:02:52 2020 +0100 gpio: mockup: update the license tag The current GPL v2.0 or later SPDX tag is 'GPL-2.0-or-later' as defined at https://spdx.org/licenses/. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200114150253.28716-2-brgl@bgdev.pl Signed-off-by: Linus Walleij commit 9a2b5b301d2a61f5dbd32cf0d908fd328436083d Author: Shaokun Zhang Date: Tue Jan 14 21:37:42 2020 +0800 gpio: Remove the unused flags drivers/gpio/gpio-grgpio.c: In function ‘grgpio_remove’: drivers/gpio/gpio-grgpio.c:438:16: warning: unused variable ‘flags’ [-Wunused-variable] unsigned long flags; ^ Fixes: 25d071b3f6db ("gpio: gpio-grgpio: fix possible sleep-in-atomic-context bugs in grgpio_remove()") Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1579009062-7154-1-git-send-email-zhangshaokun@hisilicon.com Reviewed-by: Bartosz Golaszewski Signed-off-by: Linus Walleij commit c34f6dc8c9e6bbe9fba1d53acd6d9a3889599da3 Author: Stephen Boyd Date: Tue Jan 14 15:11:03 2020 -0800 gpiolib: Set lockdep class for hierarchical irq domains I see the following lockdep splat in the qcom pinctrl driver when attempting to suspend the device. ============================================ WARNING: possible recursive locking detected 5.4.2 #2 Tainted: G S -------------------------------------------- cat/6536 is trying to acquire lock: ffffff814787ccc0 (&irq_desc_lock_class){-.-.}, at: __irq_get_desc_lock+0x64/0x94 but task is already holding lock: ffffff81436740c0 (&irq_desc_lock_class){-.-.}, at: __irq_get_desc_lock+0x64/0x94 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&irq_desc_lock_class); lock(&irq_desc_lock_class); *** DEADLOCK *** May be due to missing lock nesting notation 7 locks held by cat/6536: #0: ffffff8140e0c420 (sb_writers#7){.+.+}, at: vfs_write+0xc8/0x19c #1: ffffff8121eec480 (&of->mutex){+.+.}, at: kernfs_fop_write+0x128/0x1f4 #2: ffffff8147cad668 (kn->count#263){.+.+}, at: kernfs_fop_write+0x130/0x1f4 #3: ffffffd011446000 (system_transition_mutex){+.+.}, at: pm_suspend+0x108/0x354 #4: ffffff814302b970 (&dev->mutex){....}, at: __device_suspend+0x16c/0x420 #5: ffffff81436740c0 (&irq_desc_lock_class){-.-.}, at: __irq_get_desc_lock+0x64/0x94 #6: ffffff81479b8c10 (&pctrl->lock){....}, at: msm_gpio_irq_set_wake+0x48/0x7c stack backtrace: CPU: 4 PID: 6536 Comm: cat Tainted: G S 5.4.2 #2 Call trace: dump_backtrace+0x0/0x174 show_stack+0x20/0x2c dump_stack+0xdc/0x144 __lock_acquire+0x52c/0x2268 lock_acquire+0x1dc/0x220 _raw_spin_lock_irqsave+0x64/0x80 __irq_get_desc_lock+0x64/0x94 irq_set_irq_wake+0x40/0x144 msm_gpio_irq_set_wake+0x5c/0x7c set_irq_wake_real+0x40/0x5c irq_set_irq_wake+0x70/0x144 cros_ec_rtc_suspend+0x38/0x4c platform_pm_suspend+0x34/0x60 dpm_run_callback+0x64/0xcc __device_suspend+0x314/0x420 dpm_suspend+0xf8/0x298 dpm_suspend_start+0x84/0xb4 suspend_devices_and_enter+0xbc/0x628 pm_suspend+0x214/0x354 state_store+0xb0/0x108 kobj_attr_store+0x14/0x24 sysfs_kf_write+0x4c/0x64 kernfs_fop_write+0x158/0x1f4 __vfs_write+0x54/0x18c vfs_write+0xdc/0x19c ksys_write+0x7c/0xe4 __arm64_sys_write+0x20/0x2c el0_svc_common+0xa8/0x160 el0_svc_compat_handler+0x2c/0x38 el0_svc_compat+0x8/0x10 This is because the msm_gpio_irq_set_wake() function calls irq_set_irq_wake() as a backup in case the irq comes in during the path to idle. Given that we're calling irqchip functions from within an irqchip we need to set the lockdep class to be different for this child controller vs. the default one that the parent irqchip gets. This used to be done before this driver was converted to hierarchical irq domains in commit e35a6ae0eb3a ("pinctrl/msm: Setup GPIO chip in hierarchy") via the gpiochip_irq_map() function. With hierarchical irq domains this function has been replaced by gpiochip_hierarchy_irq_domain_alloc(). Therefore, set the lockdep class like was done previously in the irq domain path so we can avoid this lockdep warning. Fixes: fdd61a013a24 ("gpio: Add support for hierarchical IRQ domains") Cc: Thierry Reding Cc: Brian Masney Cc: Lina Iyer Cc: Marc Zyngier Cc: Maulik Shah Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20200114231103.85641-1-swboyd@chromium.org Signed-off-by: Linus Walleij commit 7a9f4460f74d705014aaab1900be688d20c75909 Author: Kevin Hao Date: Tue Jan 14 16:28:21 2020 +0800 gpio: thunderx: Switch to GPIOLIB_IRQCHIP The main parts of this patch are from commit a7fc89f9d5fc ("gpio: thunderx: Switch to GPIOLIB_IRQCHIP") and patch [1]. And also adjust thunderx_gpio_child_to_parent_hwirq() and add thunderx_gpio_populate_parent_alloc_info() to make sure that the correct hwirq are passed to the parent msi irqdomain. [1] https://patchwork.ozlabs.org/patch/1210180/ Signed-off-by: Kevin Hao Link: https://lore.kernel.org/r/20200114082821.14015-5-haokexin@gmail.com Signed-off-by: Linus Walleij commit 880b7cf22e8ca08abd969b0f1c65a79121e025c5 Author: Kevin Hao Date: Tue Jan 14 16:28:20 2020 +0800 gpiolib: Add the support for the msi parent domain If the gpio's parent irqdomain is a msi irqdomain, we should ignore the EEXIST error returned by the msi irqdomain because all the msi interrupts have already been allocated. Signed-off-by: Kevin Hao Link: https://lore.kernel.org/r/20200114082821.14015-4-haokexin@gmail.com Signed-off-by: Linus Walleij commit 242587616710576808dc8d7cdf18cfe0d7bf9831 Author: Kevin Hao Date: Tue Jan 14 16:28:19 2020 +0800 gpiolib: Add support for the irqdomain which doesn't use irq_fwspec as arg Some gpio's parent irqdomain may not use the struct irq_fwspec as argument, such as msi irqdomain. So rename the callback populate_parent_fwspec() to populate_parent_alloc_arg() and make it allocate and populate the specific struct which is needed by the parent irqdomain. Signed-off-by: Kevin Hao Link: https://lore.kernel.org/r/20200114082821.14015-3-haokexin@gmail.com Signed-off-by: Linus Walleij commit 6b6d188aae79a630957aefd88ff5c42af6553ee3 Author: Stephen Boyd Date: Thu Jan 9 07:59:07 2020 -0800 alarmtimer: Unregister wakeup source when module get fails The alarmtimer_rtc_add_device() function creates a wakeup source and then tries to grab a module reference. If that fails the function returns early with an error code, but fails to remove the wakeup source. Cleanup this exit path so there is no dangling wakeup source, which is named 'alarmtime' left allocated which will conflict with another RTC device that may be registered later. Fixes: 51218298a25e ("alarmtimer: Ensure RTC module is not unloaded") Signed-off-by: Stephen Boyd Signed-off-by: Thomas Gleixner Reviewed-by: Douglas Anderson Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200109155910.907-2-swboyd@chromium.org commit a790269d5c2cc97a73fb3abec7e5e4305b93777a Merge: 4784adc69a80 225a2ec19aac Author: Linus Walleij Date: Wed Jan 15 11:12:47 2020 +0100 Merge tag 'samsung-pinctrl-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/samsung into devel Samsung pinctrl drivers changes for v5.6 Enable compile test for build coverage (and fix exposed missing dependency). Clarify Kconfig option help text. commit ddb4e53fc72ec907f99199749cb4c71af4794607 Author: Linus Walleij Date: Wed Jan 8 01:17:12 2020 +0100 gpio: Add use guidance documentation The text in this new document is a response to recurring questions about the GPIO in-kernel API vs the userspace ABI. When do you use one or the other? It can be a bit intuitive, but I tried to sum it all up. Reviewed-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200108001712.47500-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij commit a3299182216397a0b943d2549d1997f4eba2bdd2 Author: Rafael J. Wysocki Date: Wed Jan 15 10:54:58 2020 +0100 Documentation: admin-guide: PM: Add intel_idle document Add an admin-guide document for the intel_idle driver to describe how it works: how it enumerates idle states, what happens during the initialization of it, how it can be controlled via the kernel command line and so on. Signed-off-by: Rafael J. Wysocki Reviewed-by: Randy Dunlap commit d710562e01c48d59be3f60d58b7a85958b39aeda Author: Bryan O'Donoghue Date: Thu Jan 9 13:17:22 2020 +0000 usb: gadget: f_ecm: Use atomic_t to track in-flight request Currently ecm->notify_req is used to flag when a request is in-flight. ecm->notify_req is set to NULL and when a request completes it is subsequently reset. This is fundamentally buggy in that the unbind logic of the ECM driver will unconditionally free ecm->notify_req leading to a NULL pointer dereference. Fixes: da741b8c56d6 ("usb ethernet gadget: split CDC Ethernet function") Cc: stable Signed-off-by: Bryan O'Donoghue Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 5b24c28cfe136597dc3913e1c00b119307a20c7e Author: Bryan O'Donoghue Date: Thu Jan 9 13:17:21 2020 +0000 usb: gadget: f_ncm: Use atomic_t to track in-flight request Currently ncm->notify_req is used to flag when a request is in-flight. ncm->notify_req is set to NULL and when a request completes it is subsequently reset. This is fundamentally buggy in that the unbind logic of the NCM driver will unconditionally free ncm->notify_req leading to a NULL pointer dereference. Fixes: 40d133d7f542 ("usb: gadget: f_ncm: convert to new function interface with backward compatibility") Cc: stable Signed-off-by: Bryan O'Donoghue Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit cf2f8b63f7f1f6763e4fcdf89145312224ee736b Author: Thinh Nguyen Date: Wed Dec 18 18:14:56 2019 -0800 usb: dwc3: gadget: Remove END_TRANSFER delay We had a 100us delay to synchronize the END_TRANSFER command completion before giving back requests to the function drivers. Now, the controller driver can handle cancelled TRBs with the requests' cancelled_list and it can also wait until the END_TRANSFER completion before starting new transfers. Synchronization can simply base on the controller's command completion interrupt. The 100us delay is no longer needed. Remove this arbitrary delay. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit da10bcdd6f70dc9977f2cf18f4783cf78520623a Author: Thinh Nguyen Date: Wed Dec 18 18:14:50 2019 -0800 usb: dwc3: gadget: Delay starting transfer If the END_TRANSFER command hasn't completed yet, then don't send the START_TRANSFER command. The controller may not be able to start if that's the case. Some controller revisions depend on this. See commit 76a638f8ac0d ("usb: dwc3: gadget: wait for End Transfer to complete"). Let's only send START_TRANSFER command after the END_TRANSFER command had completed. Fixes: 3aec99154db3 ("usb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING") Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit c58d8bfc77a2c7f6ff6339b58c9fca7ae6f57e70 Author: Thinh Nguyen Date: Wed Dec 18 18:14:44 2019 -0800 usb: dwc3: gadget: Check END_TRANSFER completion While the END_TRANSFER command is sent but not completed, any request dequeue during this time will cause the driver to issue the END_TRANSFER command. The driver needs to submit the command only once to stop the controller from processing further. The controller may take more time to process the same command multiple times unnecessarily. Let's add a flag DWC3_EP_END_TRANSFER_PENDING to check for this condition. Fixes: 3aec99154db3 ("usb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING") Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 6b02af3465ee11b63a938b13bddbf7ecd92860f3 Author: John Keeping Date: Fri Jan 10 11:28:14 2020 +0000 usb: gadget: f_uac2: fix packet size calculation The packet size for USB audio must always be a multiple of the frame size, otherwise we are transmitting a partial frame which omits some channels (and these end up at the wrong offset in the next packet). Furthermore, it breaks the residue handling such that we end up trying to send a packet exceeding the maximum packet size for the endpoint. Signed-off-by: John Keeping Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 1e056efab9931366d1e1685736dfc978eca3bf06 Author: Peter Chen Date: Thu Jan 9 17:35:58 2020 +0800 usb: cdns3: add NXP imx8qm glue layer There is a Cadence USB3 core for imx8qm and imx8qxp SoCs, the cdns core is the child for this glue layer device. Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 09ed259fac621634d51cd986aa8d65f035662658 Author: Bin Liu Date: Wed Dec 11 10:10:03 2019 -0600 usb: dwc3: turn off VBUS when leaving host mode VBUS should be turned off when leaving the host mode. Set GCTL_PRTCAP to device mode in teardown to de-assert DRVVBUS pin to turn off VBUS power. Fixes: 5f94adfeed97 ("usb: dwc3: core: refactor mode initialization to its own function") Cc: stable@vger.kernel.org Signed-off-by: Bin Liu Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 54c4c69f0baa433233a0c33b4ed26bf0659bc5a5 Author: Jayshri Pawar Date: Fri Dec 13 06:25:42 2019 +0100 usb: cdns3: Add streams support to cadence USB3 DRD driver This patch includes streams implementation changes. The current changes has been validated on FPGA platform. Enabled streams related interrupts only for streams capable endpoints. Processed PRIME and IOT interrupts related to streams capable endpoints. Based on PRIME interrupt prime_flag is set and transfer is armed otherwise just adding request to the deferred request queue. For streams capable endpoints preparing TD with correct stream ID. TDL calculation: Updated tdl calculation based on controller versions. 1. For controller version DEV_VER_V2 :We have enabled USB_CONF2_EN_TDL_TRB bit in usb_conf2 register in DMULT configuration. This enables TDL calculation based on TRB, hence setting TDL in TRB. 2. For controller Version < DEV_VER_V2 : Writing TDL and STDL in ep_cmd register 3. For controller version > DEV_VER_V2 : Writing TDL in ep_tdl register. Writing ERDY with correct Stream ID to ep_cmd register. Added stream id related information to trace logs. Signed-off-by: Rahul Kumar Signed-off-by: Pawel Laszczak Signed-off-by: Jayshri Pawar Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 9c1ed62ae0690dfe5d5e31d8f70e70a95cb48e52 Author: Jia-Ju Bai Date: Wed Dec 18 11:43:49 2019 +0800 usb: gadget: udc: fix possible sleep-in-atomic-context bugs in gr_probe() The driver may sleep while holding a spinlock. The function call path (from bottom to top) in Linux 4.19 is: drivers/usb/gadget/udc/core.c, 1175: kzalloc(GFP_KERNEL) in usb_add_gadget_udc_release drivers/usb/gadget/udc/core.c, 1272: usb_add_gadget_udc_release in usb_add_gadget_udc drivers/usb/gadget/udc/gr_udc.c, 2186: usb_add_gadget_udc in gr_probe drivers/usb/gadget/udc/gr_udc.c, 2183: spin_lock in gr_probe drivers/usb/gadget/udc/core.c, 1195: mutex_lock in usb_add_gadget_udc_release drivers/usb/gadget/udc/core.c, 1272: usb_add_gadget_udc_release in usb_add_gadget_udc drivers/usb/gadget/udc/gr_udc.c, 2186: usb_add_gadget_udc in gr_probe drivers/usb/gadget/udc/gr_udc.c, 2183: spin_lock in gr_probe drivers/usb/gadget/udc/gr_udc.c, 212: debugfs_create_file in gr_probe drivers/usb/gadget/udc/gr_udc.c, 2197: gr_dfs_create in gr_probe drivers/usb/gadget/udc/gr_udc.c, 2183: spin_lock in gr_probe drivers/usb/gadget/udc/gr_udc.c, 2114: devm_request_threaded_irq in gr_request_irq drivers/usb/gadget/udc/gr_udc.c, 2202: gr_request_irq in gr_probe drivers/usb/gadget/udc/gr_udc.c, 2183: spin_lock in gr_probe kzalloc(GFP_KERNEL), mutex_lock(), debugfs_create_file() and devm_request_threaded_irq() can sleep at runtime. To fix these possible bugs, usb_add_gadget_udc(), gr_dfs_create() and gr_request_irq() are called without handling the spinlock. These bugs are found by a static analysis tool STCheck written by myself. Signed-off-by: Jia-Ju Bai Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit d2450c6937018d40d4111fe830fa48d4ddceb8d0 Author: Peter Chen Date: Thu Dec 12 16:35:03 2019 +0800 usb: gadget: f_fs: set req->num_sgs as 0 for non-sg transfer The UDC core uses req->num_sgs to judge if scatter buffer list is used. Eg: usb_gadget_map_request_by_dev. For f_fs sync io mode, the request is re-used for each request, so if the 1st request->length > PAGE_SIZE, and the 2nd request->length is <= PAGE_SIZE, the f_fs uses the 1st req->num_sgs for the 2nd request, it causes the UDC core get the wrong req->num_sgs value (The 2nd request doesn't use sg). For f_fs async io mode, it is not harm to initialize req->num_sgs as 0 either, in case, the UDC driver doesn't zeroed request structure. Cc: Jun Li Cc: stable Fixes: 772a7a724f69 ("usb: gadget: f_fs: Allow scatter-gather buffers") Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit a02497033e8e04c30501abb78c92d862982b9912 Author: Thinh Nguyen Date: Wed Jan 8 18:38:10 2020 -0800 usb: gadget: configfs: Add max_speed setting Some functions support speeds other than SuperSpeed. Add max_speed attribute to configfs gadget allowing user to specify the maximum speed the composite driver supports. The valid input speed names are super-speed-plus, super-speed, high-speed, full-speed, and low-speed. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 1d039a80613dd8b8d95e181f918db5004bd5cc48 Author: Dejin Zheng Date: Sat Jan 4 21:27:40 2020 +0800 usb: gadget: udc: core: Warn about failed to find udc If we do not warn here, the user may not know failed to find udc device by a gadget driver with the same name because it silently fails. Let's print a warning in that case so developers find these problems faster. Signed-off-by: Dejin Zheng Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 463f67aec2837f981b0a0ce8617721ff59685c00 Author: Roger Quadros Date: Mon Dec 23 08:47:35 2019 +0200 usb: gadget: legacy: set max_speed to super-speed These interfaces do support super-speed so let's not limit maximum speed to high-speed. Cc: Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 7037e101b648f8534119733e0aba215097ecd4d4 Author: John Keeping Date: Thu Dec 19 11:34:32 2019 +0000 usb: dwc2: fix debugfs FIFO count The number of FIFOs may be lower than the number of endpoints. Use the correct total when printing FIFO details in debugfs. Acked-by: Minas Harutyunyan Signed-off-by: John Keeping Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 644139f8b64d818f6345351455f14471510879a5 Author: John Keeping Date: Thu Dec 19 11:34:31 2019 +0000 usb: dwc2: Fix IN FIFO allocation On chips with fewer FIFOs than endpoints (for example RK3288 which has 9 endpoints, but only 6 which are cabable of input), the DPTXFSIZN registers above the FIFO count may return invalid values. With logging added on startup, I see: dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=1 sz=256 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=2 sz=128 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=3 sz=128 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=4 sz=64 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=5 sz=64 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=6 sz=32 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=7 sz=0 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=8 sz=0 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=9 sz=0 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=10 sz=0 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=11 sz=0 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=12 sz=0 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=13 sz=0 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=14 sz=0 dwc2 ff580000.usb: dwc2_hsotg_init_fifo: ep=15 sz=0 but: # cat /sys/kernel/debug/ff580000.usb/fifo Non-periodic FIFOs: RXFIFO: Size 275 NPTXFIFO: Size 16, Start 0x00000113 Periodic TXFIFOs: DPTXFIFO 1: Size 256, Start 0x00000123 DPTXFIFO 2: Size 128, Start 0x00000223 DPTXFIFO 3: Size 128, Start 0x000002a3 DPTXFIFO 4: Size 64, Start 0x00000323 DPTXFIFO 5: Size 64, Start 0x00000363 DPTXFIFO 6: Size 32, Start 0x000003a3 DPTXFIFO 7: Size 0, Start 0x000003e3 DPTXFIFO 8: Size 0, Start 0x000003a3 DPTXFIFO 9: Size 256, Start 0x00000123 so it seems that FIFO 9 is mirroring FIFO 1. Fix the allocation by using the FIFO count instead of the endpoint count when selecting a FIFO for an endpoint. Acked-by: Minas Harutyunyan Signed-off-by: John Keeping Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit b267ddf6a5abecad100e7139617ffb12415f9156 Author: Linus Walleij Date: Tue Dec 31 18:42:35 2019 +0100 usb: phy-generic: Delete unused platform data The last user of the phy generic platform data was deleted in commit 1e041b6f313aaa966612a7e415cfc09c90d6b829 ("usb: dwc3: exynos: Remove dead code"). So get rid of the platform data, which rids us of another consumer of the legacy GPIO API at the same time. Make sure we only inlcude which is all we use. Alter the usb_phy_gen_create_phy() function prototype to not pass any platform data as this is just hardcoded to NULL at all locations calling it in the kernel. Move the devm_gpiod_get* calls out of the if (of_node) parenthesis, as these calls are generic and do not depend on device tree, they are used by any hardware description. Cc: Marek Szyprowski Cc: Felipe Balbi Signed-off-by: Linus Walleij Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 7b8137676457d99181fb2952f0b996b8569e6420 Author: Alexandru M Stan Date: Wed Oct 23 14:06:31 2019 -0700 usb: dwc2: Fix NULL qh in dwc2_queue_transaction When a usb device disconnects in a certain way, dwc2_queue_transaction still gets called after dwc2_hcd_cleanup_channels. dwc2_hcd_cleanup_channels does "channel->qh = NULL;" but dwc2_queue_transaction still wants to dereference qh. This adds a check for a null qh. Acked-by: Minas Harutyunyan Signed-off-by: Alexandru M Stan [dianders: rebased to mainline] Signed-off-by: Douglas Anderson Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 6070636c4918c3c06e54edecdb323c8b57116768 Author: Minas Harutyunyan Date: Thu Oct 24 13:44:15 2019 +0400 usb: dwc2: Fix Stalling a Non-Isochronous OUT EP Stalling a Non-Isochronous OUT Endpoint flow changed according programming guide. In dwc2_hsotg_ep_sethalt() function for OUT EP should not be set STALL bit. Instead should set SGOUTNAK in DCTL register. Set STALL bit should be set only after GOUTNAKEFF interrupt asserted. Signed-off-by: Minas Harutyunyan Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 2e708fa3b8987a6a76853cd4deaee990095a7b20 Author: Thinh Nguyen Date: Wed Oct 23 19:15:55 2019 -0700 usb: dwc3: gadget: Clear DCTL.ULSTCHNGREQ before set Send a no-action link state change request before the actual request so DWC3 can send the same request whenever we call dwc3_gadget_set_link_state(). Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 1b6009ea88ec3657792c6d15e33990abf2b907b0 Author: Thinh Nguyen Date: Wed Oct 23 19:15:49 2019 -0700 usb: dwc3: gadget: Set link state to RX_Detect on disconnect When DWC3 receives disconnect event, it needs to set the link state to RX_Detect. DWC_usb3 3.30a programming guide 4.1.7 Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 5b738211fb59e114727381d07c647a77c0010996 Author: Thinh Nguyen Date: Wed Oct 23 19:15:43 2019 -0700 usb: dwc3: gadget: Don't send unintended link state change DCTL.ULSTCHNGREQ is a write-only field. When doing a read-modify-write to DCTL, the driver must make sure that there's no unintended link state change request from whatever is read from DCTL.ULSTCHNGREQ. Set link state change to no-action when the driver writes to DCTL. Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 71e7274066c646bb3d9da39d2f4db0a6404c0a2d Merge: dd22dfa62c9c f2221a504940 Author: Dave Airlie Date: Wed Jan 15 16:57:53 2020 +1000 Merge tag 'drm-intel-next-2020-01-14' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Final drm/i915 features for v5.6: - DP MST fixes (José) - Fix intel_bw_state memory leak (Pankaj Bharadiya) - Switch context id allocation to xarray (Tvrtko) - ICL/EHL/TGL workarounds (Matt Roper, Tvrtko) - Debugfs for LMEM details (Lukasz Fiedorowicz) - Prefer platform acronyms over codenames in symbols (Lucas) - Tiled and port sync mode fixes for fbdev and DP (Manasi) - DSI panel and backlight enable GPIO fixes (Hans de Goede) - Relax audio min CDCLK requirements on non-GLK (Kai Vehmanen) - Plane alignment and dimension check fixes (Imre) - Fix state checks for PSR (José) - Remove ICL+ clock gating programming (José) - Static checker fixes around bool usage (Ma Feng) - Bring back tests for self-contained headers in i915 (Masahiro Yamada) - Fix DP MST disable sequence (Ville) - Start converting i915 to the new drm device based logging macros (Wambui Karuga) - Add DSI VBT I2C sequence execution (Vivek Kasireddy) - Start using function pointers and ops structs in uc code (Michal) - Fix PMU names to not use colons or dashes (Tvrtko) - TGL media decompression support (DK, Imre) - Split i915_gem_gtt.[ch] to more manageable chunks (Matthew Auld) - Create dumb buffers in LMEM where available (Ram) - Extend mmap support for LMEM (Abdiel) - Selftest updates (Chris) - Hack bump up CDCLK on TGL to avoid underruns (Stan) - Use intel_encoder and intel_connector more instead of drm counterparts (Ville) - Build error fixes (Zhang Xiaoxu) - Fixes related to GPU and engine initialization/resume (Chris) - Support for prefaulting discontiguous objects (Abdiel) - Support discontiguous LMEM object maps (Chris) - Various GEM and GT improvements and fixes (Chris) - Merge pinctrl dependencies branch for the DSI GPIO updates (Jani) - Backmerge drm-next for new logging macros (Jani) Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87sgkil0v9.fsf@intel.com commit dd22dfa62c9cb2669ed4b181e359645108c69578 Merge: 6fc376f026a0 afa3b96b058d Author: Dave Airlie Date: Wed Jan 15 16:45:58 2020 +1000 Merge branch 'linux-5.6' of git://github.com/skeggsb/linux into drm-next - Rewrite of the ACR (formerly "secure boot") code, both to support Turing, support multiple FW revisions, and to make life easier when having to debug HW/FW bring-up in the future - Support for TU10x graphics engine, TU11x not available yet as FW isn't ready - Proper page 'kind' mappings for Turing - 10-bit LUT support - GP10B (Tegra) fixes - Misc other fixes Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/ Date: Wed Jan 15 16:35:56 2020 +1000 Merge tag 'mediatek-drm-next-5.6' of https://github.com/ckhu-mediatek/linux.git-tags into drm-next Mediatek DRM Next for Linux 5.6 This fix non-smooth cursor problem, add cmdq support, add ctm property support and some refinement. Signed-off-by: Dave Airlie From: CK Hu Link: https://patchwork.freedesktop.org/patch/msgid/1578972526.14594.8.camel@mtksdaap41 commit fd7226fbb25724bbafb236c520f5c02a8a37deec Merge: 688486a49cf5 033ccdb7f6b1 Author: Dave Airlie Date: Wed Jan 15 16:21:22 2020 +1000 Merge tag 'drm/tegra/for-5.6-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Changes for v5.6-rc1 This contains a small set of mostly fixes and some minor improvements. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20200111004835.2412858-1-thierry.reding@gmail.com commit f6310b61076028dfa5c11d9d68c7ad4adcb7742e Merge: 0fadc0a2b1c4 212a37c225ae Author: David S. Miller Date: Tue Jan 14 18:53:36 2020 -0800 Merge branch 'net-Add-route-offload-indication' Ido Schimmel says: ==================== net: Add route offload indication This patch set adds offload indication to IPv4 and IPv6 routes. So far offload indication was only available for the nexthop via 'RTNH_F_OFFLOAD', which is problematic as a nexthop is usually shared between multiple routes. Based on feedback from Roopa and David on the RFC [1], the indication is split to 'offload' and 'trap'. This is done because not all the routes present in hardware actually offload traffic from the kernel. For example, host routes merely trap packets to the kernel. The two flags are dumped to user space via the 'rtm_flags' field in the ancillary header of the rtnetlink message. In addition, the patch set uses the new flags in order to test the FIB offload API by adding a dummy FIB offload implementation to netdevsim. The new tests are added to a shared library and can be therefore shared between different drivers. Patches #1-#3 add offload indication to IPv4 routes. Patches #4 adds offload indication to IPv6 routes. Patches #5-#6 add support for the offload indication in mlxsw. Patch #7 adds dummy FIB offload implementation in netdevsim. Patches #8-#10 add selftests. v2 (feedback from David Ahern): * Patch #2: Name last argument of fib_dump_info() * Patch #2: Move 'struct fib_rt_info' to include/net/ip_fib.h so that it could later be passed to fib_alias_hw_flags_set() * Patch #3: Make use of 'struct fib_rt_info' in fib_alias_hw_flags_set() * Patch #6: Convert to new fib_alias_hw_flags_set() interface * Patch #7: Convert to new fib_alias_hw_flags_set() interface [1] https://patchwork.ozlabs.org/cover/1170530/ ==================== Signed-off-by: David S. Miller commit 212a37c225aed5d7dbe20cb1c1881bf7d35cbc54 Author: Ido Schimmel Date: Tue Jan 14 13:23:18 2020 +0200 selftests: mlxsw: Add test for FIB offload API The test reuses the common FIB offload tests in order to make sure that mlxsw correctly implements FIB offload. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit ffdc5149c5e2328bb8f0e136efd4935829fe89b3 Author: Ido Schimmel Date: Tue Jan 14 13:23:17 2020 +0200 selftests: netdevsim: Add test for FIB offload API Test various aspects of the FIB offload API on top of the netdevsim implementation. Both good and bad flows are tested. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit c662455b64a1f0dacb2127f402bd5401b88d42d1 Author: Ido Schimmel Date: Tue Jan 14 13:23:16 2020 +0200 selftests: forwarding: Add helpers and tests for FIB offload Implement a set of common helpers and tests for FIB offload that can be used by multiple drivers to check their FIB offload implementations. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 48bb9eb47b2708bd3ded16684ddd258e53bd402c Author: Ido Schimmel Date: Tue Jan 14 13:23:15 2020 +0200 netdevsim: fib: Add dummy implementation for FIB offload Implement dummy IPv4 and IPv6 FIB "offload" in the driver by storing currently "programmed" routes in a hash table. Each route in the hash table is marked with "trap" indication. The indication is cleared when the route is replaced or when the netdevsim instance is deleted. This will later allow us to test the route offload API on top of netdevsim. v2: * Convert to new fib_alias_hw_flags_set() interface Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit ee5a0448e72b0857260e04f68126b2bfa27c154e Author: Ido Schimmel Date: Tue Jan 14 13:23:14 2020 +0200 mlxsw: spectrum_router: Set hardware flags for routes Previous patches added support for two hardware flags for IPv4 and IPv6 routes: 'RTM_F_OFFLOAD' and 'RTM_F_TRAP'. Both indicate the presence of the route in hardware. The first indicates that traffic is actually offloaded from the kernel, whereas the second indicates that packets hitting such routes are trapped to the kernel for processing (e.g., host routes). Use these two flags in mlxsw. The flags are modified in two places. Firstly, whenever a route is updated in the device's table. This includes the addition, deletion or update of a route. For example, when a host route is promoted to perform NVE decapsulation, its action in the device is updated, the 'RTM_F_OFFLOAD' flag set and the 'RTM_F_TRAP' flag cleared. Secondly, when a route is replaced and overwritten by another route, its flags are cleared. v2: * Convert to new fib_alias_hw_flags_set() interface Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 8c5a5b9b9185e5f3f14c81b2d1cef7e6f837c280 Author: Ido Schimmel Date: Tue Jan 14 13:23:13 2020 +0200 mlxsw: spectrum_router: Separate nexthop offload indication from route The driver currently uses the 'RTNH_F_OFFLOAD' flag for both routes and nexthops, which is cumbersome and unnecessary now that we have separate flag for the route itself. Separate the offload indication for nexthops from routes and call it whenever the offload state within the nexthop group changes. Note that IPv6 (unlike IPv4) does not share the same nexthop group between different routes, whereas mlxsw does. Therefore, whenever the offload indication within an IPv6 nexthop group changes, all the linked routes need to be updated. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit bb3c4ab93e44784c1e958bdbba7824bba40f23cd Author: Ido Schimmel Date: Tue Jan 14 13:23:12 2020 +0200 ipv6: Add "offload" and "trap" indications to routes In a similar fashion to previous patch, add "offload" and "trap" indication to IPv6 routes. This is done by using two unused bits in 'struct fib6_info' to hold these indications. Capable drivers are expected to set these when processing the various in-kernel route notifications. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Acked-by: Roopa Prabhu Signed-off-by: David S. Miller commit 90b93f1b31f86dcde2fa3c57f1ae33d28d87a1f8 Author: Ido Schimmel Date: Tue Jan 14 13:23:11 2020 +0200 ipv4: Add "offload" and "trap" indications to routes When performing L3 offload, routes and nexthops are usually programmed into two different tables in the underlying device. Therefore, the fact that a nexthop resides in hardware does not necessarily mean that all the associated routes also reside in hardware and vice-versa. While the kernel can signal to user space the presence of a nexthop in hardware (via 'RTNH_F_OFFLOAD'), it does not have a corresponding flag for routes. In addition, the fact that a route resides in hardware does not necessarily mean that the traffic is offloaded. For example, unreachable routes (i.e., 'RTN_UNREACHABLE') are programmed to trap packets to the CPU so that the kernel will be able to generate the appropriate ICMP error packet. This patch adds an "offload" and "trap" indications to IPv4 routes, so that users will have better visibility into the offload process. 'struct fib_alias' is extended with two new fields that indicate if the route resides in hardware or not and if it is offloading traffic from the kernel or trapping packets to it. Note that the new fields are added in the 6 bytes hole and therefore the struct still fits in a single cache line [1]. Capable drivers are expected to invoke fib_alias_hw_flags_set() with the route's key in order to set the flags. The indications are dumped to user space via a new flags (i.e., 'RTM_F_OFFLOAD' and 'RTM_F_TRAP') in the 'rtm_flags' field in the ancillary header. v2: * Make use of 'struct fib_rt_info' in fib_alias_hw_flags_set() [1] struct fib_alias { struct hlist_node fa_list; /* 0 16 */ struct fib_info * fa_info; /* 16 8 */ u8 fa_tos; /* 24 1 */ u8 fa_type; /* 25 1 */ u8 fa_state; /* 26 1 */ u8 fa_slen; /* 27 1 */ u32 tb_id; /* 28 4 */ s16 fa_default; /* 32 2 */ u8 offload:1; /* 34: 0 1 */ u8 trap:1; /* 34: 1 1 */ u8 unused:6; /* 34: 2 1 */ /* XXX 5 bytes hole, try to pack */ struct callback_head rcu __attribute__((__aligned__(8))); /* 40 16 */ /* size: 56, cachelines: 1, members: 12 */ /* sum members: 50, holes: 1, sum holes: 5 */ /* sum bitfield members: 8 bits (1 bytes) */ /* forced alignments: 1, forced holes: 1, sum forced holes: 5 */ /* last cacheline: 56 bytes */ } __attribute__((__aligned__(8))); Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 1e301fd04eaaa5b1e3c202450d86864e6714d783 Author: Ido Schimmel Date: Tue Jan 14 13:23:10 2020 +0200 ipv4: Encapsulate function arguments in a struct fib_dump_info() is used to prepare RTM_{NEW,DEL}ROUTE netlink messages using the passed arguments. Currently, the function takes 11 arguments, 6 of which are attributes of the route being dumped (e.g., prefix, TOS). The next patch will need the function to also dump to user space an indication if the route is present in hardware or not. Instead of passing yet another argument, change the function to take a struct containing the different route attributes. v2: * Name last argument of fib_dump_info() * Move 'struct fib_rt_info' to include/net/ip_fib.h so that it could later be passed to fib_alias_hw_flags_set() Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 6324d0fa03bf118e9682b6f3da437deaadb61924 Author: Ido Schimmel Date: Tue Jan 14 13:23:09 2020 +0200 ipv4: Replace route in list before notifying Subsequent patches will add an offload / trap indication to routes which will signal if the route is present in hardware or not. After programming the route to the hardware, drivers will have to ask the IPv4 code to set the flags by passing the route's key. In the case of route replace, the new route is notified before it is actually inserted into the FIB alias list. This can prevent simple drivers (e.g., netdevsim) that program the route to the hardware in the same context it is notified in from being able to set the flag. Solve this by first inserting the new route to the list and rollback the operation in case the route was vetoed. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 0fadc0a2b1c472c50a6d05b76c5f73c769bce81e Author: Lorenzo Bianconi Date: Tue Jan 14 10:24:19 2020 +0100 net: socionext: get rid of huge dma sync in netsec_alloc_rx_data Socionext driver can run on dma coherent and non-coherent devices. Get rid of huge dma_sync_single_for_device in netsec_alloc_rx_data since now the driver can let page_pool API to managed needed DMA sync Reviewed-by: Ilias Apalodimas Signed-off-by: Lorenzo Bianconi Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 0c73ffc7dcdc8de8110c4d7d2fae4750d750d650 Merge: 7786a1af2a6b e04df98adf7d Author: David S. Miller Date: Tue Jan 14 18:36:59 2020 -0800 Merge branch 'QRTR-flow-control-improvements' Bjorn Andersson says: ==================== QRTR flow control improvements In order to prevent overconsumption of resources on the remote side QRTR implements a flow control mechanism. Move the handling of the incoming confirm_rx to the receiving process to ensure incoming flow is controlled. Then implement outgoing flow control, using the recommended algorithm of counting outstanding non-confirmed messages and blocking when hitting a limit. The last three patches refactors the node assignment and port lookup, in order to remove the worker in the receive path. ==================== Signed-off-by: David S. Miller commit e04df98adf7d7d946aa927822ccec24680501662 Author: Bjorn Andersson Date: Mon Jan 13 23:57:03 2020 -0800 net: qrtr: Remove receive worker Rather than enqueuing messages and scheduling a worker to deliver them to the individual sockets we can now, thanks to the previous work, move this directly into the endpoint callback. This saves us a context switch per incoming message and removes the possibility of an opportunistic suspend to happen between the message is coming from the endpoint until it ends up in the socket's receive buffer. Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller commit f16a4b26f31f95dddb12cf3c2390906a735203ae Author: Bjorn Andersson Date: Mon Jan 13 23:57:02 2020 -0800 net: qrtr: Make qrtr_port_lookup() use RCU The important part of qrtr_port_lookup() wrt synchronization is that the function returns a reference counted struct qrtr_sock, or fail. As such we need only to ensure that an decrement of the object's refcount happens inbetween the finding of the object in the idr and qrtr_port_lookup()'s own increment of the object. By using RCU and putting a synchronization point after we remove the mapping from the idr, but before it can be released we achieve this - with the benefit of not having to hold the mutex in qrtr_port_lookup(). Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller commit 0a7e0d0ef05440db03c3199e84d228db943b237f Author: Bjorn Andersson Date: Mon Jan 13 23:57:01 2020 -0800 net: qrtr: Migrate node lookup tree to spinlock Move operations on the qrtr_nodes radix tree under a separate spinlock and make the qrtr_nodes tree GFP_ATOMIC, to allow operation from atomic context in a subsequent patch. Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller commit 5fdeb0d372ab33b4175043a2a4a1730239a217f1 Author: Bjorn Andersson Date: Mon Jan 13 23:57:00 2020 -0800 net: qrtr: Implement outgoing flow control In order to prevent overconsumption of resources on the remote side QRTR implements a flow control mechanism. The mechanism works by the sender keeping track of the number of outstanding unconfirmed messages that has been transmitted to a particular node/port pair. Upon count reaching a low watermark (L) the confirm_rx bit is set in the outgoing message and when the count reaching a high watermark (H) transmission will be blocked upon the reception of a resume_tx message from the remote, that resets the counter to 0. This guarantees that there will be at most 2H - L messages in flight. Values chosen for L and H are 5 and 10 respectively. Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller commit cb6530b99fafea6c0636c4640bd21301d12cdbc9 Author: Bjorn Andersson Date: Mon Jan 13 23:56:59 2020 -0800 net: qrtr: Move resume-tx transmission to recvmsg The confirm-rx bit is used to implement a per port flow control, in order to make sure that no messages are dropped due to resource exhaustion. Move the resume-tx transmission to recvmsg to only confirm messages as they are consumed by the application. Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller commit 7786a1af2a6bceb07860ec720e74714004438834 Author: Niu Xilei Date: Tue Jan 14 11:12:29 2020 +0800 pktgen: Allow configuration of IPv6 source address range Pktgen can use only one IPv6 source address from output device or src6 command setting. In pressure test we need create lots of sessions more than 65535. So add src6_min and src6_max command to set the range. Signed-off-by: Niu Xilei Changes since v3: - function set_src_in6_addr use static instead of static inline - precompute min_in6_l,min_in6_h,max_in6_h,max_in6_l in setup time Changes since v2: - reword subject line Changes since v1: - only create IPv6 source address over least significant 64 bit range Signed-off-by: David S. Miller commit be240ff5e402df49c4ddbcb0595ef96009239f6a Author: Anatol Pomazau Date: Mon Jan 13 17:41:27 2020 -0500 dm mpath: Add timeout mechanism for queue_if_no_path Add a configurable timeout mechanism to disable queue_if_no_path without assistance from userspace multipathd. This reimplements multipathd's no_path_retry mechanism in kernel space. This is motivated by the desire to prevent processes from hanging indefinitely waiting for IO in cases where multipathd might be unable to respond (after a failure or for whatever reason). Despite replicating userspace multipathd's policy configuration in kernel space, it is important to prevent IOs from hanging forever, waiting for userspace that may be incapable of behaving correctly. Use of the provided "queue_if_no_path_timeout_secs" dm-multipath module parameter is optional. This timeout mechanism is disabled by default (by being set to 0). Signed-off-by: Anatol Pomazau Co-developed-by: Gabriel Krisman Bertazi Signed-off-by: Gabriel Krisman Bertazi Signed-off-by: Mike Snitzer commit f06c03d1ded22cf1c059650c4ba02496e93a0c06 Author: Mikulas Patocka Date: Mon Jan 13 15:41:53 2020 -0500 dm thin: change data device's flush_bio to be member of struct pool With commit fe64369163c5 ("dm thin: don't allow changing data device during thin-pool load") it is now possible to re-parent the data device's flush_bio from the pool_c to pool structure. Doing so offers improved lifetime guarantees for the flush_bio so that the call to dm_pool_register_pre_commit_callback can now be done safely from pool_ctr(). Depends-on: fe64369163c5 ("dm thin: don't allow changing data device during thin-pool load") Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 873937e75f9a8ea231a502c3d29d9cb6ad91b3ef Author: Mikulas Patocka Date: Mon Jan 13 15:04:37 2020 -0500 dm thin: don't allow changing data device during thin-pool reload The existing code allows changing the data device when the thin-pool target is reloaded. This capability is not required and only complicates device lifetime guarantees. This can cause crashes like the one reported here: https://bugzilla.redhat.com/show_bug.cgi?id=1788596 where the kernel tries to issue a flush bio located in a structure that was already freed. Take the first step to simplifying the thin-pool's data device lifetime by disallowing changing it. Like the thin-pool's metadata device, the data device is now set in pool_create() and it cannot be changed for a given thin-pool. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit a4a8d286586d4b28c8517a51db8d86954aadc74b Author: Mike Snitzer Date: Mon Jan 13 12:29:04 2020 -0500 dm thin: fix use-after-free in metadata_pre_commit_callback dm-thin uses struct pool to hold the state of the pool. There may be multiple pool_c's pointing to a given pool, each pool_c represents a loaded target. pool_c's may be created and destroyed arbitrarily and the pool contains a reference count of pool_c's pointing to it. Since commit 694cfe7f31db3 ("dm thin: Flush data device before committing metadata") a pointer to pool_c is passed to dm_pool_register_pre_commit_callback and this function stores it in pmd->pre_commit_context. If this pool_c is freed, but pool is not (because there is another pool_c referencing it), we end up in a situation where pmd->pre_commit_context structure points to freed pool_c. It causes a crash in metadata_pre_commit_callback. Fix this by moving the dm_pool_register_pre_commit_callback() from pool_ctr() to pool_preresume(). This way the in-core thin-pool metadata is only ever armed with callback data whose lifetime matches the active thin-pool target. In should be noted that this fix preserves the ability to load a thin-pool table that uses a different data block device (that contains the same data) -- though it is unclear if that capability is still useful and/or needed. Fixes: 694cfe7f31db3 ("dm thin: Flush data device before committing metadata") Cc: stable@vger.kernel.org Reported-by: Zdenek Kabelac Reported-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 44d8ebf436399a40fcd10dd31b29d37823d62fcc Author: Mike Snitzer Date: Mon Jan 13 11:18:51 2020 -0500 dm thin metadata: use pool locking at end of dm_pool_metadata_close Ensure that the pool is locked during calls to __commit_transaction and __destroy_persistent_data_objects. Just being consistent with locking, but reality is dm_pool_metadata_close is called once pool is being destroyed so access to pool shouldn't be contended. Also, use pmd_write_lock_in_core rather than __pmd_write_lock in dm_pool_commit_metadata and rename __pmd_write_lock to pmd_write_lock_in_core -- there was no need for the alias. In addition, verify that the pool is locked in __commit_transaction(). Fixes: 873f258becca ("dm thin metadata: do not write metadata if no changes occurred") Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit aa9509209c5ac2f0b35d01a922bf9ae072d0c2fc Author: Mikulas Patocka Date: Wed Jan 8 10:46:05 2020 -0500 dm writecache: fix incorrect flush sequence when doing SSD mode commit When committing state, the function writecache_flush does the following: 1. write metadata (writecache_commit_flushed) 2. flush disk cache (writecache_commit_flushed) 3. wait for data writes to complete (writecache_wait_for_ios) 4. increase superblock seq_count 5. write the superblock 6. flush disk cache It may happen that at step 3, when we wait for some write to finish, the disk may report the write as finished, but the write only hit the disk cache and it is not yet stored in persistent storage. At step 5 we write the superblock - it may happen that the superblock is written before the write that we waited for in step 3. If the machine crashes, it may result in incorrect data being returned after reboot. In order to fix the bug, we must swap steps 2 and 3 in the above sequence, so that we first wait for writes to complete and then flush the disk cache. Fixes: 48debafe4f2f ("dm: add writecache target") Cc: stable@vger.kernel.org # 4.18+ Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 4ea9471fbd1addb25a4d269991dc724e200ca5b5 Author: Milan Broz Date: Mon Jan 6 10:11:47 2020 +0100 dm crypt: fix benbi IV constructor crash if used in authenticated mode If benbi IV is used in AEAD construction, for example: cryptsetup luksFormat --cipher twofish-xts-benbi --key-size 512 --integrity=hmac-sha256 the constructor uses wrong skcipher function and crashes: BUG: kernel NULL pointer dereference, address: 00000014 ... EIP: crypt_iv_benbi_ctr+0x15/0x70 [dm_crypt] Call Trace: ? crypt_subkey_size+0x20/0x20 [dm_crypt] crypt_ctr+0x567/0xfc0 [dm_crypt] dm_table_add_target+0x15f/0x340 [dm_mod] Fix this by properly using crypt_aead_blocksize() in this case. Fixes: ef43aa38063a6 ("dm crypt: add cryptographic data integrity protection (authenticated encryption)") Cc: stable@vger.kernel.org # v4.12+ Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=941051 Reported-by: Jerad Simpson Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer commit bbb1658461ac85ef7e0563bb11283f94ea5eb651 Author: Milan Broz Date: Fri Jan 3 09:20:22 2020 +0100 dm crypt: Implement Elephant diffuser for Bitlocker compatibility Add experimental support for BitLocker encryption with CBC mode and additional Elephant diffuser. The mode was used in older Windows systems and it is provided mainly for compatibility reasons. The userspace support to activate these devices is being added to cryptsetup utility. Read-write activation of such a device is very simple, for example: echo | cryptsetup bitlkOpen bitlk_image.img test The Elephant diffuser uses two rotations in opposite direction for data (Diffuser A and B) and also XOR operation with Sector key over the sector data; Sector key is derived from additional key data. The original public documentation is available here: http://download.microsoft.com/download/0/2/3/0238acaf-d3bf-4a6d-b3d6-0a0be4bbb36e/bitlockercipher200608.pdf The dm-crypt implementation is embedded to "elephant" IV (similar to tcw IV construction). Because we cannot modify original bio data for write (before encryption), an additional internal flag to pre-process data is added. Signed-off-by: Milan Broz Reviewed-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 4feaef830de7ffdd8352e1fe14ad3bf13c9688f8 Author: Joe Thornber Date: Tue Jan 7 11:58:42 2020 +0000 dm space map common: fix to ensure new block isn't already in use The space-maps track the reference counts for disk blocks allocated by both the thin-provisioning and cache targets. There are variants for tracking metadata blocks and data blocks. Transactionality is implemented by never touching blocks from the previous transaction, so we can rollback in the event of a crash. When allocating a new block we need to ensure the block is free (has reference count of 0) in both the current and previous transaction. Prior to this fix we were doing this by searching for a free block in the previous transaction, and relying on a 'begin' counter to track where the last allocation in the current transaction was. This 'begin' field was not being updated in all code paths (eg, increment of a data block reference count due to breaking sharing of a neighbour block in the same btree leaf). This fix keeps the 'begin' field, but now it's just a hint to speed up the search. Instead the current transaction is searched for a free block, and then the old transaction is double checked to ensure it's free. Much simpler. This fixes reports of sm_disk_new_block()'s BUG_ON() triggering when DM thin-provisioning's snapshots are heavily used. Reported-by: Eric Wheeler Cc: stable@vger.kernel.org Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer commit afa3b96b058d87c2c44d1c83dadb2ba6998d03ce Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/gr/tu10x: initial support Signed-off-by: Ben Skeggs commit 3fa8fe1572bc708596318280a22669dfc9eaf805 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/acr/tu10x: initial support Signed-off-by: Ben Skeggs commit edec7149cbfae95c35282c19cda20b7bc53873af Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/core: remove previous versioned fw loader Signed-off-by: Ben Skeggs commit 9d350c5e5156792ba7c87b3b1e897656dc2a88e5 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/secboot: remove Signed-off-by: Ben Skeggs commit 22dcda45a3d1dfe6eeb4ab0a3b9aaa2333cb649d Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/acr: implement new subdev to replace "secure boot" ACR is responsible for managing the firmware for LS (Low Secure) falcons, this was previously handled in the driver by SECBOOT. This rewrite started from some test code that attempted to replicate the procedure RM uses in order to debug early Turing ACR firmwares that were provided by NVIDIA for development. Compared with SECBOOT, the code is structured into more individual steps, with the aim of making the process easier to follow/debug, whilst making it possible to support newer firmware versions that may have a different binary format or API interface. The HS (High Secure) binary(s) are now booted earlier in device init, to match the behaviour of RM, whereas SECBOOT would delay this until we try to boot the first LS falcon. There's also additional debugging features available, with the intention of making it easier to solve issues during FW/HW bring-up in the future. Signed-off-by: Ben Skeggs commit ebe52a58acca308142ba2811e50a1b3bf047240d Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/fb/gp102-: unlock VPR as part of FB init We perform memory allocations long before we hit the code in SECBOOT that would unlock the VPR, which could potentially result in memory allocation within the locked region. Run the scrubber binary right after VRAM init to ensure we don't. Signed-off-by: Ben Skeggs commit ff213b634865b60fa8d445a070ac74951245bb3d Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/core/memory: add macros to read/write blocks from objects Signed-off-by: Ben Skeggs commit 7a4dde711b38dd10df71bd71151cb1f59dfbfdac Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/secboot: move code to boot LS falcons to subdevs Signed-off-by: Ben Skeggs commit 91a4e83a2d3e99af33a666508e86b96f4210fae6 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/msgq: rename msgq-related nvkm_msgqueue_queue to nvkm_falcon_msgq Signed-off-by: Ben Skeggs commit e1cc579898aed48fe6a6ac1bf5a7491784c5d690 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/msgq: pass explicit message queue pointer to recv() Signed-off-by: Ben Skeggs commit d114a1393fa01c4034d895072905578319a903f9 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/msgq: move handling of init message to subdevs When the PMU/SEC2 LS FWs have booted, they'll send a message to the host with various information, including the configuration of message/command queues that are available. Move the handling for this to the relevant subdevs. Signed-off-by: Ben Skeggs commit 2d063981d710391cdea4e8c6483d94b519b1cde2 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/msgq: drop nvkm_msgqueue argument to functions Signed-off-by: Ben Skeggs commit 77b1ab61fd1c08c7364ee6e184887202995a71e4 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/msgq: switch to falcon queue printk macros Signed-off-by: Ben Skeggs commit e9602a1bd7e996aca5c231bc07cad41fff9b290b Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/msgq: simplify msg_queue_pop() error handling We always want at least requested size, make anything less a more direct error condition. Signed-off-by: Ben Skeggs commit f09a3ee36bdc097d197e5188b6d0fd5354ddfa1a Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/msgq: remove error handling for msg_queue_open(), it can't fail Signed-off-by: Ben Skeggs commit 86ce2a71539c47241dc8f471d8724f5bd1e41ae6 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/cmdq: move command generation to subdevs This moves the code to generate commands for the ACR unit of the PMU/SEC2 LS firmwares to those subdevs. Signed-off-by: Ben Skeggs commit 25fd061cc7dd3b8cc37f4874565c14fe18f40c8b Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/cmdq: rename cmdq-related nvkm_msqqueue_queue to nvkm_falcon_cmdq Signed-off-by: Ben Skeggs commit 149745252c65b0abc13e5ac4aa8c9e5f78d54783 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/cmdq: implement a more explicit send() interface Takes the command queue pointer directly instead of requiring a function to lookup based on an queue type, as well as an explicit timeout value. Signed-off-by: Ben Skeggs commit 2b287aebb451aceed1f0cb9bbdd319c77010f350 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/cmdq: drop nvkm_msgqueue argument to functions Signed-off-by: Ben Skeggs commit baafecbf9a5bb687d499212b19848fc1963f1b1a Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/cmdq: switch to falcon queue printk macros Signed-off-by: Ben Skeggs commit c2c9b243189fd4f92cb2ed52a1ab76277d9807a5 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/cmdq: cmd_queue_close always commits, simplify it Signed-off-by: Ben Skeggs commit 2baaffff977593cb1faee8e11d47bc72b1a26e40 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/cmdq: cmd_queue_push can't fail, remove error handling for it Signed-off-by: Ben Skeggs commit 2e8a65973b9afeebbff5e8a8e51e7cdd14f745a7 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/cmdq: split the condition for queue readiness vs pmu acr readiness This is to allow for proper separation of the LS interface code from the queue handling code. Signed-off-by: Ben Skeggs commit a15d8f580ccbe387dbc8c1d11a71fa737edd7e7f Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/qmgr: rename remaining nvkm_msgqueue bits to nvkm_falcon_qmgr Signed-off-by: Ben Skeggs commit 8e90a98dfb804f4a86a9bc40706e9f00e870a2ba Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/qmgr: support syncronous command submission from common code Functions implementing FW commands had to implement this themselves, let's move that to common code and plumb the return code from callbacks through. Signed-off-by: Ben Skeggs commit c80157a25e712daf69cbba8cafa0463c0895f56c Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/qmgr: allow arbtrary priv + return code for callbacks Code to interface with LS firmwares is being moved to the subdevs where it belongs, rather than living in the common falcon code. Arbitrary private data passed to callbacks is to allow for something other than struct nvkm_msgqueue to be passed into the callback (like the pointer to the subdev itself, for example), and the return code will be used where we'd like to detect failure from synchronous messages. Signed-off-by: Ben Skeggs commit 0ae59432ba6d647297f2e1bed97139147ce140ac Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/qmgr: move sequence tracking from nvkm_msgqueue to nvkm_falcon_qmgr Signed-off-by: Ben Skeggs commit 22431189d6690071db01079606feb1daa2784afe Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/msgq: explicitly create message queue from subdevs Code to interface with LS firmwares is being moved to the subdevs where it belongs, rather than living in the common falcon code. This is an incremental step towards that goal. Signed-off-by: Ben Skeggs commit acc466ab46574f0d9de65606f0796cff07c9a7d5 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/cmdq: explicitly create command queue(s) from subdevs Code to interface with LS firmwares is being moved to the subdevs where it belongs, rather than living in the common falcon code. This is an incremental step towards that goal. Signed-off-by: Ben Skeggs commit 8763955ba73807c6f5d38364074c1802d8415172 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn/qmgr: explicitly create queue manager from subdevs Code to interface with LS firmwares is being moved to the subdevs where it belongs, rather than living in the common falcon code. This is an incremental step towards that goal. Signed-off-by: Ben Skeggs commit 7e1659cc3b33e8765ea155b4b46d8e658d5277d2 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn: split msgqueue into multiple pieces To make things clearer while modifying the interfaces, split msgqueue into Queue Manager, Command Queue, and Message Queue. There should be no code changes here, these will be done incrementally. Signed-off-by: Ben Skeggs commit 3d0482ec28ebc506b9a720be9ff146e9bf343042 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn: add printk macros Signed-off-by: Ben Skeggs commit af696a61a22118dd12250c9dbc0ffcee8eb0d2a9 Author: Ben Skeggs Date: Wed Jan 15 06:34:22 2020 +1000 drm/nouveau/flcn: reset sec2/gsp falcons harder Signed-off-by: Ben Skeggs commit b826f48a1c127396df2b5e4889994fed6ef3c4a7 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/flcn: specify queue register offsets from subdev Also fixes the values for Turing, even though we don't use it yet. Signed-off-by: Ben Skeggs commit e938c4e723a0dc5976f3e2c022c6ac30c9f14026 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/flcn: specify debug/production register offset from subdev Signed-off-by: Ben Skeggs commit bc3cfd18acaf026d156a29f9a01aabdd70cb9d11 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/flcn: specify EMEM address from subdev Signed-off-by: Ben Skeggs commit ca3190e3c7e3f9cdd08fce158f852ced4f1afe80 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/flcn: move bind_context WAR out of common code Signed-off-by: Ben Skeggs commit fb0a5bbe31572948a7afb80ba9f1f2236296b7dd Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/flcn: specify FBIF offset from subdev Signed-off-by: Ben Skeggs commit 10e43bfd2f8dd8dfff4d40615b529327745bb0b2 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/nvenc: add a stub implementation for the GPUs where it should be supported Mostly so we don't lose info hidden in falcon. Signed-off-by: Ben Skeggs commit a5482b9ff194226ea1b549234285c80a44c69aa6 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/nvdec/gm107-: add missing engine instances Signed-off-by: Ben Skeggs commit 68f02444946be707ee3beefabf5e4d5e6374f13a Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/nvdec/gm107: rename from gp102 implementation NVDEC is available from GM107, and we currently only have a stub implementation anyway, let's make it explicit. Signed-off-by: Ben Skeggs commit 3a900a5d9ce325fb83ad6759c20a318a84b2068c Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/nvdec: initialise SW state for falcon from constructor This will allow us to register the falcon with ACR, and further customise its behaviour by providing the nvkm_falcon_func structure directly. Signed-off-by: Ben Skeggs commit 98a34d99501042b7e055cdc4b6f65926ecfcf10c Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/nvdec: select implementation based on available fw This will allow for further customisation of the subdev depending on what firmware is available. Signed-off-by: Ben Skeggs commit c9af47bcbde4d3eef3e68c69a29c580e0301a416 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/sec2: move interrupt handler to hw-specific module Signed-off-by: Ben Skeggs commit 555a0002d3c6d0792df4df33a8a2d7140bc61812 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/sec2: use falcon funcs Signed-off-by: Ben Skeggs commit edd757d17891b5330a5dbc1ce0bb710a5017e530 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/sec2: initialise SW state for falcon from constructor This will allow us to register the falcon with ACR, and further customise its behaviour by providing the nvkm_falcon_func structure directly. Signed-off-by: Ben Skeggs commit 7adc40c593c621fb8059e6c651b4fa299c086860 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/sec2: select implementation based on available firmware This will allow for further customisation of the subdev depending on what firmware is available. Signed-off-by: Ben Skeggs commit e14e5e6c33746247d442ddd4d79e3b83878a39b4 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/sec2/gp108: split from gp102 implementation ACR LS FW loading is moving out of SECBOOT and into their specific subdevs, and the available GP108/GV100 FWs differ from the other GP10x boards. Signed-off-by: Ben Skeggs commit 4f556362a3f6efbfa22ada34178c91a795f9548a Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/gr/gf100-: initialise SW state for falcon from constructor This will allow us to register the falcon with ACR, and further customise its behaviour by providing the nvkm_falcon_func structure directly. Signed-off-by: Ben Skeggs commit ef16dc278ec22ddbf8da54bd06a6e662719c1420 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/gr/gf100-: select implementation based on available FW This will allow for further customisation of the subdev depending on what firmware is available. Signed-off-by: Ben Skeggs commit a096ff19811e21e5c9215e72637bdd2c05d13471 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/gr/gp108: split from gp107 ACR LS FW loading is moving out of SECBOOT and into their specific subdevs, and the available GP107/GP108 FWs have interface differences. Signed-off-by: Ben Skeggs commit 00e1b5dcf76648e7e0de9f56358fee86263df1ca Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/gr/gf100-: move fecs/gpccs ucode into their substructures Signed-off-by: Ben Skeggs commit 0033f15b44bc29ec6fe5b58de18d801c3de74c88 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/gr/gf100-: drop fuc_ prefix on sw init Signed-off-by: Ben Skeggs commit a2bfb50e72aeb139801109e3b4eb73ac53bde314 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/gr/gk20a,gm200-: use nvkm_firmware_load_blob for sw init Signed-off-by: Ben Skeggs commit 6f0add0ad6e965e8ae1382b43501e67b30988d26 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/gr/gf100-: use nvkm_blob structure for fecs/gpccs fw It serves the exact same purpose. Signed-off-by: Ben Skeggs commit 2952a2b42e17ea0f72ee52de061975dddb9c62ec Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/pmu: initialise SW state for falcon from constructor This will allow us to register the falcon with ACR, and further customise its behaviour by providing the nvkm_falcon_func structure directly. Signed-off-by: Ben Skeggs commit 989863d7cbe58180cf0e69fd5ed72279c7fac901 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/pmu: select implementation based on available firmware This will allow for further customisation of the subdev depending on what firmware is available. Signed-off-by: Ben Skeggs commit e905736c6d7328ce2d34640741f4b7e75c64a737 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/pmu/gp10b: split from gm20b implementation ACR LS FW loading is moving out of SECBOOT and into their specific subdevs, and the available GM20B/GP10B FWs have interface differences. Signed-off-by: Ben Skeggs commit 334815ef310a7ad2ba34039ba1f933d5edc80b56 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/gsp: initialise SW state for falcon from constructor This will allow us to register the falcon with ACR, and further customise its behaviour by providing the nvkm_falcon_func structure directly. Signed-off-by: Ben Skeggs commit 78b10b74030025f6a216a9b10afbe35ab05d32d1 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/gsp: select implementation based on available firmware This will allow for further customisation of the subdev depending on what firmware is available. Signed-off-by: Ben Skeggs commit c63fe2e704e2c1fa9a4614f31a567925d00503f1 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/acr: add loaders for currently available LS firmware images Signed-off-by: Ben Skeggs commit 67e7c6cf8f521463ca8c6f37098dcaf9e391b080 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/acr: add stub implementation for all GPUs currently supported by SECBOOT PMU, SEC2 and GR will be modified to register their falcons with ACR before the main commit switching everything over. Signed-off-by: Ben Skeggs commit 31bef57f6ce37a7382d89ab117b9e33bf92a0e8b Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/core: define ACR subdev This will replace the current SECBOOT subdev for handling firmware on secure falcons. Signed-off-by: Ben Skeggs commit f25709f9aeb3c5183167b57df278cdecce3c9740 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/core: add representation of generic binary objects Signed-off-by: Ben Skeggs commit 47c8f8e1a225b227805045c997ffdda8c78e57b6 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/core: add a macro to better handle multiple firmware versions Will be used in upcoming commits to allow subdevs to better customise themselves based on which (if any) firmware is available. Signed-off-by: Ben Skeggs commit 5ff41544fc810df95ae585959334cc56c2270ccb Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/core: output fw size in debug messages Signed-off-by: Ben Skeggs commit a128bbfacc065bca59426afae9cad91b9d77f6aa Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/flcn: export existing funcs These will be used in upcoming commits which will provide more customisation. Signed-off-by: Ben Skeggs commit de048192130db2c02e3f16d49ed4cc1f20e6ba90 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/flcn: fetch PRI address from TOP if not provided by constructor Shortcut to avoid each subdev having to do this itself. Signed-off-by: Ben Skeggs commit 5a4b98cde434da25ff25171974036a492c023bce Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/flcn: move fetching of configuration until first use We want to be able to register falcons with ACR during the constructor for the subdev it belongs to, however, we may not have access to the falcon's registers prior to DEVINIT. Delay touching registers until the first time the falcon is acquired. This may temporarily break secboot on non-production boards due to not being able to determine whether the falcon is in debug or production mode, the new ACR subdev will not have this issue, and it's not a use-case that's terribly important for bisectability. Signed-off-by: Ben Skeggs commit 633cc9beeb6f9b5fa2f17a2a9d0e2790cb6c3de7 Author: Ben Skeggs Date: Wed Jan 15 06:34:21 2020 +1000 drm/nouveau/fault/gv100-: fix memory leak on module unload Signed-off-by: Ben Skeggs commit 409d659fe11d778a8f505f909815bc867a27ecbf Author: Ben Skeggs Date: Tue Jan 14 11:31:01 2020 +1000 drm/nouveau/disp/dp: fix typo when determining failsafe link configuration Signed-off-by: Ben Skeggs commit 2e4534a22794746b11a794b2229b8d58797eccce Author: YueHaibing Date: Fri Jan 10 15:28:37 2020 +0800 drm/nouveau/drm/ttm: Remove set but not used variable 'mem' drivers/gpu/drm/nouveau/nouveau_ttm.c: In function nouveau_vram_manager_new: drivers/gpu/drm/nouveau/nouveau_ttm.c:66:22: warning: variable mem set but not used [-Wunused-but-set-variable] drivers/gpu/drm/nouveau/nouveau_ttm.c: In function nouveau_gart_manager_new: drivers/gpu/drm/nouveau/nouveau_ttm.c:106:22: warning: variable mem set but not used [-Wunused-but-set-variable] They are not used any more, so remove it. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Ben Skeggs commit 1eb013473bff5f95b6fe1ca4dd7deda47257b9c2 Author: YueHaibing Date: Fri Jan 10 14:32:01 2020 +0800 drm/nouveau: Fix copy-paste error in nouveau_fence_wait_uevent_handler Like other cases, it should use rcu protected 'chan' rather than 'fence->channel' in nouveau_fence_wait_uevent_handler. Fixes: 0ec5f02f0e2c ("drm/nouveau: prevent stale fence->channel pointers, and protect with rcu") Signed-off-by: YueHaibing Signed-off-by: Ben Skeggs commit 3c47e381d6514ed8043ef0e3ed69ce287d05b3a4 Author: Ben Skeggs Date: Thu Aug 1 11:59:12 2019 +1000 drm/nouveau/gr/gv100-: modify gr init to match newer version of RM Will be used as a basis for implementing changes needed for Turing. Signed-off-by: Ben Skeggs commit 7adc77aa0e11f25b0e762859219c70852cd8d56f Author: Ben Skeggs Date: Thu Jan 9 11:46:15 2020 +1000 drm/nouveau/gr/gk20a,gm200-: add terminators to method lists read from fw Method init is typically ordered by class in the FW image as ThreeD, TwoD, Compute. Due to a bug in parsing the FW into our internal format, we've been accidentally sending Twod + Compute methods to the ThreeD class, as well as Compute methods to the TwoD class - oops. Signed-off-by: Ben Skeggs commit fef1c0ef7074477974c893535b90c7ac97012b95 Author: Ben Skeggs Date: Thu Oct 31 15:49:48 2019 +1000 drm/nouveau/gr/gf100-: remove dtor Signed-off-by: Ben Skeggs commit 0514a6b7d9c838244d5b0970523dff4b87993a64 Author: Ben Skeggs Date: Thu Jan 9 15:46:29 2020 +1000 drm/nouveau/fault/tu102: define nvkm_fault_func.pin Signed-off-by: Ben Skeggs commit 4886c740c9bcc33da82f33367f19f7da23028190 Author: Ben Skeggs Date: Tue Jan 7 16:19:05 2020 +1000 drm/nouveau/core: fix missing newline in fw loader error message Signed-off-by: Ben Skeggs commit 3613a9bea95a1470dd42e4ed1cc7d86ebe0a2dc0 Author: Dan Carpenter Date: Wed Jan 8 08:46:01 2020 +0300 drm/nouveau/secboot/gm20b: initialize pointer in gm20b_secboot_new() We accidentally set "psb" which is a no-op instead of "*psb" so it generates a static checker warning. We should probably set it before the first error return so that it's always initialized. Fixes: 923f1bd27bf1 ("drm/nouveau/secboot/gm20b: add secure boot support") Signed-off-by: Dan Carpenter Signed-off-by: Ben Skeggs commit 176ada03e3c2cc0e0d725ea4626dfebec681578f Author: James Jones Date: Mon Dec 16 16:58:05 2019 -0800 drm/nouveau/mmu: Add correct turing page kinds Turing introduced a new simplified page kind scheme, reducing the number of possible page kinds from 256 to 16. It also is the first NVIDIA GPU in which the highest possible page kind value is not reserved as an "invalid" page kind. To address this, the invalid page kind is made an explicit property of the MMU HAL, and a new table of page kinds is added to the tu102 MMU HAL. One hardware change not addressed here is that 0x00 is technically no longer a supported page kind, and pitch surfaces are instead intended to share the block-linear generic page kind 0x06. However, because that will be a rather invasive change to nouveau and 0x00 still works fine in practice on Turing hardware, addressing this new behavior is deferred. Signed-off-by: James Jones Signed-off-by: Ben Skeggs commit 72ecb0a6ce89dd7f9d0f8171a45b0ed814b0f9a8 Author: James Jones Date: Mon Dec 16 16:56:12 2019 -0800 drm/nouveau: Fix ttm move init with multiple GPUs The pointer used to walk the table of move ops and pick the right one for the current GPU was declared static, meaning its state was carried over between invocations of the function, and also made the function non-rentrant and thread-unsafe. Since the table is ordered such that newer GPU methods are listed first, the result of this was that initializing newer GPUs after older GPUs would result in no suitable ttm move acceleration operations being found, and ttm would fall back to CPU blits on the older GPUs. This change declares the walking pointer separately from the table and makes it non-static to fix the logic. Signed-off-by: James Jones Signed-off-by: Ben Skeggs commit b4229fc67d9b9d8910ad32c508fd94518bd01194 Author: Wambui Karuga Date: Tue Dec 31 23:57:34 2019 +0300 drm/nouveau: use NULL for pointer assignment. Replace the use of 0 in the pointer assignment with NULL to address the following sparse warning: drivers/gpu/drm/nouveau/nouveau_hwmon.c:744:29: warning: Using plain integer as NULL pointer Signed-off-by: Wambui Karuga Reviewed-by: Daniel Vetter Signed-off-by: Ben Skeggs commit cd04e4ffd5c4d05d2a3eb0827fe481274dc4a8ef Author: Wambui Karuga Date: Tue Dec 31 23:56:07 2019 +0300 drm/nouveau/kms/nv04: remove set but unused variable. The local variable `pclks` is defined and set but not used and can therefore be removed. Issue found by coccinelle. Signed-off-by: Wambui Karuga Signed-off-by: Ben Skeggs commit 2cf3c8bc47d4f6718acc0b863ff3aa7c9d80d60c Author: Wambui Karuga Date: Thu Jan 2 15:25:48 2020 +0300 drm/nouveau/fb/gf100-: declare constants as unsigned long long. Explicitly declare constants as unsigned long long to address the following sparse warnings: warning: constant is so big it is long v2: convert to unsigned long long for compatibility with 32-bit architectures. Signed-off-by: Wambui Karuga Suggested by: lia Mirkin Signed-off-by: Ben Skeggs commit 2574c809d7c0f07f11fdefd9894e51e126ee1d66 Author: YueHaibing Date: Mon Dec 30 10:46:28 2019 +0800 drm/nouveau/kms/nv04-nv4x: Use match_string() helper to simplify the code match_string() returns the array index of a matching string. Use it instead of the open-coded implementation. Signed-off-by: YueHaibing Signed-off-by: Ben Skeggs commit d7ca5ddf585e20e879e3ebe3e5be0a0477b700b8 Author: Thierry Reding Date: Mon Dec 9 13:00:05 2019 +0100 drm/nouveau/ce/gp10b: Use correct copy engine gp10b uses the new engine enumeration mechanism introduced in the Pascal architecture. As a result, the copy engine, which used to be at index 2 for prior Tegra GPU instantiations, has now moved to index 0. Fix up the index and also use the gp100 variant of the copy engine class because on gp10b the PASCAL_DMA_COPY_B class is not supported. Signed-off-by: Thierry Reding Signed-off-by: Ben Skeggs commit 0d0d498265e7cb3329d2a7185b1d7cfb3be95d65 Author: Thierry Reding Date: Mon Dec 9 13:00:04 2019 +0100 drm/nouveau/ltc/gp10b: Add custom L2 cache implementation There are extra registers that need to be programmed to make the level 2 cache work on GP10B, such as the stream ID register that is used when an SMMU is used to translate memory addresses. Signed-off-by: Thierry Reding Signed-off-by: Ben Skeggs commit 6992ceb8c0f6f8e2f4374a1ab4dd84cd76cc4b64 Author: Thierry Reding Date: Mon Dec 9 13:00:03 2019 +0100 drm/nouveau/secboot/gm20b,gp10b: Read WPR configuration from GPU registers The GPUs found on Tegra SoCs have registers that can be used to read the WPR configuration. Use these registers instead of reaching into the memory controller's register space to read the same information. Signed-off-by: Thierry Reding Signed-off-by: Ben Skeggs commit fc12262b96833ce131063c7081cd7fb3c4a048f3 Author: Thierry Reding Date: Mon Dec 9 13:00:02 2019 +0100 drm/nouveau/tegra: Set clock rate if not set If the GPU clock has not had a rate set, initialize it to the maximum clock rate to make sure it does run. Signed-off-by: Thierry Reding Signed-off-by: Ben Skeggs commit b0b651aedb101785f91f8d13a4c1e6363f3fa178 Author: Thierry Reding Date: Mon Dec 9 13:00:01 2019 +0100 drm/nouveau/tegra: Avoid pulsing reset twice When the GPU powergate is controlled by a generic power domain provider, the reset will automatically be asserted and deasserted as part of the power-ungating procedure. On some Jetson TX2 boards, doing an additional assert and deassert of the GPU outside of the power-ungate procedure can cause the GPU to go into a bad state where the memory interface can no longer access system memory. Signed-off-by: Thierry Reding Signed-off-by: Ben Skeggs commit f1331ea8ee0a7fe9a832a403587528adddd03561 Author: Thierry Reding Date: Mon Dec 9 13:00:00 2019 +0100 drm/nouveau: Do not try to disable PCI device on Tegra When Nouveau is instantiated on top of a platform device, the dev->pdev field will be NULL and calling pci_disable_device() will crash. Move the PCI disabling code to the PCI specific driver removal code. Signed-off-by: Thierry Reding Signed-off-by: Ben Skeggs commit 0ac7facb7071836154687a228eaead3fc82297c1 Author: Thierry Reding Date: Mon Dec 9 12:59:59 2019 +0100 drm/nouveau/fault: Add support for GP10B There is no BAR2 on GP10B and there is no need to map through BAR2 because all memory is shared between the GPU and the CPU. Add a custom implementation of the fault sub-device that uses nvkm_memory_addr() instead of nvkm_memory_bar2() to return the address of a pinned fault buffer. Signed-off-by: Thierry Reding Signed-off-by: Ben Skeggs commit f42e4b337b327b1336c978c4b5174990a25f68a0 Author: Colin Ian King Date: Fri Nov 29 16:28:28 2019 +0000 drm/nouveau/nouveau: fix incorrect sizeof on args.src an args.dst The sizeof is currently on args.src and args.dst and should be on *args.src and *args.dst. Fortunately these sizes just so happen to be the same size so it worked, however, this should be fixed and it also cleans up static analysis warnings Addresses-Coverity: ("sizeof not portable") Fixes: f268307ec7c7 ("nouveau: simplify nouveau_dmem_migrate_vma") Signed-off-by: Colin Ian King Signed-off-by: Ben Skeggs commit 481404957a14f9c46576913ba12985e6798b7d32 Author: Lyude Paul Date: Fri Sep 13 18:03:53 2019 -0400 drm/nouveau/kms/nv50-: Report possible_crtcs incorrectly on mstos, for now This commit is seperate from the previous one to make it easier to revert in the future. Basically, while working on making MSTOs per-head as opposed to per-head-per-connector I discovered these lovely issues: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/277 https://gitlab.gnome.org/GNOME/mutter/issues/759 Note as well that Intel already has a temporary workaround for this in their kernel driver. So, unfortunately we need to follow suit to avoid causing a regression in userspace. Once these issues get fixed, this commit should be reverted. Signed-off-by: Lyude Paul Cc: Ville Syrjälä Signed-off-by: Ben Skeggs commit 5ff0cb1ce2536321045b5bc33ab8fb2467750f33 Author: Lyude Paul Date: Fri Sep 13 18:03:52 2019 -0400 drm/nouveau/kms/nv50-: Use less encoders by making mstos per-head Currently, for every single MST capable DRM connector we create a set of fake encoders, one for each possible head. Unfortunately this ends up being a huge waste of encoders. While this currently isn't causing us any problems, it's extremely close to doing so. The ThinkPad P71 is a good example of this. Originally when trying to figure out why nouveau was failing to load on this laptop, I discovered it was because nouveau was creating too many encoders. This ended up being because we were mistakenly creating MST encoders for the eDP port, however we are still extremely close to hitting the encoder limit on this machine as it exposes 1 eDP port and 5 DP ports, resulting in 31 encoders. So while this fix didn't end up being necessary to fix the P71, we still need to implement this so that we avoid hitting the encoder limit for valid display configurations in the event that some machine with more connectors then this becomes available. Plus, we don't want to let good code go to waste :) So, use less encoders by only creating one MSTO per head. Then, attach each new MSTC to each MSTO which corresponds to a head that it's parent DP port is capable of using. This brings the number of encoders we register on the ThinkPad P71 from 31, down to just 15. Yay! Signed-off-by: Lyude Paul Signed-off-by: Ben Skeggs commit 122c1639185fbb0e8fd33a9e23444de64df44684 Author: Lyude Paul Date: Fri Sep 13 18:37:20 2019 -0400 drm/nouveau/kms/nv50-: Remove nv50_mstc_best_encoder() When drm_connector_helper_funcs->atomic_best_encoder is defined, ->best_encoder is ignored by the atomic modesetting helpers. That being said, this hook is completely broken anyway - it always returns the first msto for a given mstc, despite the fact it might already be in use. So, just get rid of it. We'll need this in a moment anyway, when we make mstos per-head as opposed to per-connector. Changes since v1: * Fix typo in documentation - imirkin Signed-off-by: Lyude Paul Signed-off-by: Ben Skeggs commit 131992709dc4c6140cec3b352f820cb873f7dd50 Author: Ilia Mirkin Date: Fri Sep 6 00:13:59 2019 -0400 drm/nouveau/kms/gf119-: allow both 256- and 1024-sized LUTs to be used The hardware supports either size. Also add checks to ensure that only these two sizes may be used for supplying a LUT. Signed-off-by: Ilia Mirkin Signed-off-by: Ben Skeggs commit 11a8630917b681ff2f5320938b8d76b354c89d34 Author: Ben Skeggs Date: Tue Aug 20 13:32:00 2019 +1000 drm/nouveau/gr/gk208-gm10x: regenerate built-in firmware Commit 5fde30a2684041f9820aa9dc4fbd0009a45076a9 in envytools modified some of the Falcon V5 encodings, regenerate the relevant FW with this. Also modify build rules to include SPDX header in generated files. Tested on GM107, with no issues noted. Signed-off-by: Ben Skeggs commit e8c192011c920517e5578d51c7aff0ecadd25de3 Author: Reto Schneider Date: Tue Jan 14 09:48:06 2020 +0100 MIPS: ralink: dts: gardena_smart_gateway_mt7688: Limit UART1 The radio module asserts CTS when its RX buffer has 10 bytes left. Putting just 8 instead of 16 bytes into the UART1 TX buffer on the Linux side ensures to not overflow the RX buffer on the radio module side. Signed-off-by: Reto Schneider Signed-off-by: Stefan Roese Cc: Paul Burton Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org commit a5d193cb88cf6c5bfc771db6f34eebca51fd767a Author: Reto Schneider Date: Tue Jan 14 09:48:05 2020 +0100 MIPS: ralink: dts: gardena_smart_gateway_mt7688: Enable WMAC This patch enables the WMAC controller on the GARDENA smart Gateway and configures the board specific factory EEPROM setting for this driver. Signed-off-by: Reto Schneider Signed-off-by: Stefan Roese Cc: Paul Burton Cc: John Crispin Cc: Felix Fietkau Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org commit ff68d0da5a1633dd6fe2cc903e4c6177a7b64ef5 Author: Reto Schneider Date: Tue Jan 14 09:48:04 2020 +0100 MIPS: ralink: dts: mt7628a.dtsi: Add WMAC DT node This patch adds the WMAC controller description to the MT7628A dtsi file. Signed-off-by: Reto Schneider Signed-off-by: Stefan Roese Cc: Paul Burton Cc: John Crispin Cc: Felix Fietkau Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org commit 53eb82b0977da8fbba472bd2275fa2ad27f50621 Author: Krzysztof Kozlowski Date: Sun Dec 29 19:09:12 2019 +0100 cpuidle: arm: Enable compile testing for some of drivers Some of cpuidle drivers for ARMv7 can be compile tested on this architecture because they do not depend on mach-specific bits. Enable compile testing for big.LITTLE, Kirkwood, Zynq, AT91, Exynos and mvebu cpuidle drivers. Signed-off-by: Krzysztof Kozlowski Acked-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit d39284f21de799c8f23b19a048855ac208d59633 Author: Claudiu Beznea Date: Fri Dec 20 17:31:18 2019 +0200 power: reset: at91-poweroff: use proper master clock register offset SAM9X60's PMC uses different offset for master clock register. Add a member of type struct pmc_reg_config in struct reg_config, fill it correspondingly for SAMA5D2 and SAM9X60 and use it in poweroff() function. Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre Signed-off-by: Sebastian Reichel commit a4f06df13db829d3e8615f9bf476f0ea0e25c9a7 Author: Claudiu Beznea Date: Fri Dec 20 17:31:17 2019 +0200 power: reset: at91-poweroff: introduce struct shdwc_reg_config This driver uses AT91_PMC_MCKR in poweroff() function. But the SAM9X60's PMC versions maps AT91_PMC_MCKR functionality at different offset compared to the SAMA5D2's one. This patch prepares the field so that different AT91_PMC_MCKR's offsets to be introduced in struct reg_config so that proper offset to be used for AT91_PMC_MCKR based on compatible string. Signed-off-by: Claudiu Beznea Acked-by: Nicolas Ferre Signed-off-by: Sebastian Reichel commit 46aa27e742082ca4b1a30886876c24d26c2fac49 Author: Yauhen Kharuzhy Date: Thu Jan 2 01:46:26 2020 +0300 power: supply: bq25890_charger: Add DT and I2C ids for all supported chips Add bq25892, bq25895 and bq25896 to list of supported device IDs for DeviceTree and I2C. Signed-off-by: Yauhen Kharuzhy Signed-off-by: Sebastian Reichel commit 13f0a589eff21936e50ebc8875c8be9eed9dfc68 Author: Yauhen Kharuzhy Date: Thu Jan 2 01:46:27 2020 +0300 dt-bindings: Add new chips to bq25890 binding documentation Add bq25892, bq25895 and bq25896 to list of supported device IDs in the bq25890 DT binding document. Signed-off-by: Yauhen Kharuzhy Acked-by: Rob Herring Signed-off-by: Sebastian Reichel commit d20267c9a98e082b718873bffbdfb44b126c995b Author: Yauhen Kharuzhy Date: Thu Jan 2 01:46:25 2020 +0300 power: supply: bq25890_charger: Add support of BQ25892 and BQ25896 chips Support BQ25892 and BQ25896 chips by this driver. They shared one chip ID 0, so distinquish them by device revisions (2 for 25896 and 1 for 25892). Signed-off-by: Yauhen Kharuzhy Signed-off-by: Sebastian Reichel commit 333853be564526ecd74e9cbdf3e28650a47ad85d Author: Dan Murphy Date: Wed Jan 8 14:23:11 2020 -0600 power: supply: core: Update sysfs-class-power ABI document Add the "Over Current" string to /sys/class/power_supply//health description. Fixes: e3e83cc601e57 ("power: supply: core: Add POWER_SUPPLY_HEALTH_OVERCURRENT constant") Signed-off-by: Dan Murphy Signed-off-by: Sebastian Reichel commit da3a3da4e6c68459618a1043dcb12b450312a4e2 Author: Eric Biggers Date: Tue Dec 31 11:54:08 2019 -0600 fs-verity: use u64_to_user_ptr() already provides a macro u64_to_user_ptr(). Use it instead of open-coding the two casts. No change in behavior. Link: https://lore.kernel.org/r/20191231175408.20524-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 439bea104c3d212def0216aa8c0820872266c5b3 Author: Eric Biggers Date: Tue Dec 31 11:55:45 2019 -0600 fs-verity: use mempool for hash requests When initializing an fs-verity hash algorithm, also initialize a mempool that contains a single preallocated hash request object. Then replace the direct calls to ahash_request_alloc() and ahash_request_free() with allocating and freeing from this mempool. This eliminates the possibility of the allocation failing, which is desirable for the I/O path. This doesn't cause deadlocks because there's no case where multiple hash requests are needed at a time to make forward progress. Link: https://lore.kernel.org/r/20191231175545.20709-1-ebiggers@kernel.org Reviewed-by: Theodore Ts'o Signed-off-by: Eric Biggers commit cfc585a401764f0d352602d614c19866bb84738a Author: Steven Rostedt (VMware) Date: Tue Jan 14 16:27:51 2020 -0500 ring-buffer: Fix kernel doc for rb_update_event() rb_update_event has changed without the kernel-doc update. Signed-off-by: Steven Rostedt (VMware) commit fd39073dba8632575b920edefba2577e1b84262a Author: Eric Biggers Date: Mon Jan 6 12:55:33 2020 -0800 fs-verity: implement readahead of Merkle tree pages When fs-verity verifies data pages, currently it reads each Merkle tree page synchronously using read_mapping_page(). Therefore, when the Merkle tree pages aren't already cached, fs-verity causes an extra 4 KiB I/O request for every 512 KiB of data (assuming that the Merkle tree uses SHA-256 and 4 KiB blocks). This results in more I/O requests and performance loss than is strictly necessary. Therefore, implement readahead of the Merkle tree pages. For simplicity, we take advantage of the fact that the kernel already does readahead of the file's *data*, just like it does for any other file. Due to this, we don't really need a separate readahead state (struct file_ra_state) just for the Merkle tree, but rather we just need to piggy-back on the existing data readahead requests. We also only really need to bother with the first level of the Merkle tree, since the usual fan-out factor is 128, so normally over 99% of Merkle tree I/O requests are for the first level. Therefore, make fsverity_verify_bio() enable readahead of the first Merkle tree level, for up to 1/4 the number of pages in the bio, when it sees that the REQ_RAHEAD flag is set on the bio. The readahead size is then passed down to ->read_merkle_tree_page() for the filesystem to (optionally) implement if it sees that the requested page is uncached. While we're at it, also make build_merkle_tree_level() set the Merkle tree readahead size, since it's easy to do there. However, for now don't set the readahead size in fsverity_verify_page(), since currently it's only used to verify holes on ext4 and f2fs, and it would need parameters added to know how much to read ahead. This patch significantly improves fs-verity sequential read performance. Some quick benchmarks with 'cat'-ing a 250MB file after dropping caches: On an ARM64 phone (using sha256-ce): Before: 217 MB/s After: 263 MB/s (compare to sha256sum of non-verity file: 357 MB/s) In an x86_64 VM (using sha256-avx2): Before: 173 MB/s After: 215 MB/s (compare to sha256sum of non-verity file: 223 MB/s) Link: https://lore.kernel.org/r/20200106205533.137005-1-ebiggers@kernel.org Reviewed-by: Theodore Ts'o Signed-off-by: Eric Biggers commit c22415d333fbab0475762e98e1bbffb9b17a8b68 Author: Eric Biggers Date: Mon Jan 6 12:54:10 2020 -0800 fs-verity: implement readahead for FS_IOC_ENABLE_VERITY When it builds the first level of the Merkle tree, FS_IOC_ENABLE_VERITY sequentially reads each page of the file using read_mapping_page(). This works fine if the file's data is already in pagecache, which should normally be the case, since this ioctl is normally used immediately after writing out the file. But in any other case this implementation performs very poorly, since only one page is read at a time. Fix this by implementing readahead using the functions from mm/readahead.c. This improves performance in the uncached case by about 20x, as seen in the following benchmarks done on a 250MB file (on x86_64 with SHA-NI): FS_IOC_ENABLE_VERITY uncached (before) 3.299s FS_IOC_ENABLE_VERITY uncached (after) 0.160s FS_IOC_ENABLE_VERITY cached 0.147s sha256sum uncached 0.191s sha256sum cached 0.145s Note: we could instead switch to kernel_read(). But that would mean we'd no longer be hashing the data directly from the pagecache, which is a nice optimization of its own. And using kernel_read() would require allocating another temporary buffer, hashing the data and tree pages separately, and explicitly zero-padding the last page -- so it wouldn't really be any simpler than direct pagecache access, at least for now. Link: https://lore.kernel.org/r/20200106205410.136707-1-ebiggers@kernel.org Reviewed-by: Theodore Ts'o Signed-off-by: Eric Biggers commit 59e7cffe5cca6f15c21d394492fa4739172de1c5 Author: Fabian Frederick Date: Thu Jun 5 20:22:05 2014 +0200 ring-bufer: kernel-doc warning fixes Also fixes a couple of typos Link: http://lkml.kernel.org/r/1401992525-10417-1-git-send-email-fabf@skynet.be Cc: Andrew Morton Signed-off-by: Fabian Frederick [ Found this deep in the abyss of my INBOX ] Signed-off-by: Steven Rostedt (VMware) commit 2d8f7f119b0b2ce5e7ff0e8024b0763bf42b99c9 Author: Eric Biggers Date: Tue Dec 31 12:10:26 2019 -0600 fscrypt: document gfp_flags for bounce page allocation Document that fscrypt_encrypt_pagecache_blocks() allocates the bounce page from a mempool, and document what this means for the @gfp_flags argument. Link: https://lore.kernel.org/r/20191231181026.47400-1-ebiggers@kernel.org Reviewed-by: Theodore Ts'o Signed-off-by: Eric Biggers commit 796f12d742653028a1520cce3a76035c86e2ebf9 Author: Eric Biggers Date: Thu Dec 26 10:08:13 2019 -0600 fscrypt: optimize fscrypt_zeroout_range() Currently fscrypt_zeroout_range() issues and waits on a bio for each block it writes, which makes it very slow. Optimize it to write up to 16 pages at a time instead. Also add a function comment, and improve reliability by allowing the allocations of the bio and the first ciphertext page to wait on the corresponding mempools. Link: https://lore.kernel.org/r/20191226160813.53182-1-ebiggers@kernel.org Reviewed-by: Theodore Ts'o Signed-off-by: Eric Biggers commit 5a158981aafa7f29709034b17bd007b15cb29983 Author: Nishad Kamdar Date: Wed Jan 1 18:44:23 2020 +0530 siox: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related to Eckelmann SIOX driver. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Acked-by: Uwe Kleine-König Acked-by: Thorsten Scherer Link: https://lore.kernel.org/r/20200101131418.GA3110@nishad Signed-off-by: Greg Kroah-Hartman commit 27d13da8782aa2c59a3c71c1c31e65c9af72b7fb Author: Tony Lindgren Date: Mon Dec 16 16:40:48 2019 -0800 w1: omap-hdq: Simplify driver with PM runtime autosuspend We've had generic code handling module sysconfig and OCP reset registers for omap variants for many years now and all the drivers really needs to do is just call runtime PM functions. Looks like the omap-hdq driver got only partially updated over the years to use runtime PM, and still has lots of custom PM code left. We can replace all the custom code for sysconfig, OCP reset, and PM with just a few lines of runtime PM autosuspend code. In order to set the device mode properly when pm_runtime_get_sync() is called during probe, we need to also move parsing of "ti,mode" to happen earlier before we call pm_runtime_enable(). Since we now disable interrupts lazily in omap_hdq_runtime_suspend(), we must remove the call to hdq_disable_interrupt() in omap_w1_read_byte(). And we must clear irqstatus calling wait_event_timeout() on it, so let's add hdq_reset_irqstatus() for that. Note that the earlier driver specific usage count limit of four seems completely artificial and should not be an issue in normal use. Cc: Adam Ford Cc: Andrew F. Davis Cc: Andreas Kemnade Cc: H. Nikolaus Schaller Cc: Vignesh R Tested-by: Andreas Kemnade # gta04 Tested-by: Adam Ford #logicpd-torpedo-37xx-devkit Signed-off-by: Tony Lindgren Link: https://lore.kernel.org/r/20191217004048.46298-1-tony@atomide.com Signed-off-by: Greg Kroah-Hartman commit 03ddd2eb338e224902e96a9db0beeeef6ccc047f Author: zhengbin Date: Mon Dec 16 11:02:58 2019 +0800 firmware: stratix10-svc: Remove unneeded semicolon Fixes coccicheck warning: drivers/firmware/stratix10-svc.c:271:2-3: Unneeded semicolon drivers/firmware/stratix10-svc.c:515:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1576465378-11109-1-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit e4924ee263b015cc2e397ca871d870925e2673b4 Author: Arthur Heymans Date: Mon Nov 18 11:19:31 2019 +0100 firmware: google: Probe for a GSMI handler in firmware Currently this driver is loaded if the DMI string matches coreboot and has a proper smi_command in the ACPI FADT table, but a GSMI handler in SMM is an optional feature in coreboot. So probe for a SMM GSMI handler before initializing the driver. If the smihandler leaves the calling argument in %eax in the SMM save state untouched that generally means the is no handler for GSMI. Signed-off-by: Arthur Heymans Signed-off-by: Patrick Rudolph Link: https://lore.kernel.org/r/20191118101934.22526-4-patrick.rudolph@9elements.com Signed-off-by: Greg Kroah-Hartman commit c6e7af0515daca800d84b9cfa1bf19e53c4f5bc3 Author: Arthur Heymans Date: Mon Nov 18 11:19:30 2019 +0100 firmware: google: Unregister driver_info on failure and exit in gsmi Fix a bug where the kernel module couldn't be loaded after unloading, as the platform driver wasn't released on exit. Signed-off-by: Arthur Heymans Signed-off-by: Patrick Rudolph Link: https://lore.kernel.org/r/20191118101934.22526-3-patrick.rudolph@9elements.com Signed-off-by: Greg Kroah-Hartman commit cae0970ee9c4527f189aac378c50e2f0ed020418 Author: Patrick Rudolph Date: Mon Nov 18 11:19:29 2019 +0100 firmware: google: Release devices before unregistering the bus Fix a bug where the kernel module can't be loaded after it has been unloaded as the devices are still present and conflicting with the to be created coreboot devices. Signed-off-by: Patrick Rudolph Link: https://lore.kernel.org/r/20191118101934.22526-2-patrick.rudolph@9elements.com Signed-off-by: Greg Kroah-Hartman commit 89d93c6dab87f9f416b5ae931f7ad07b77aaca66 Author: Chuhong Yuan Date: Thu Jan 9 10:31:48 2020 +0000 slimbus: qcom: add missed clk_disable_unprepare in remove The remove misses to disable and unprepare rclk and hclk. Add calls to clk_disable_unprepare to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200109103148.5612-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6da1dfb73adffd9641ee373d342f917bddc0ee63 Author: Nishad Kamdar Date: Thu Jan 9 10:31:47 2020 +0000 slimbus: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related to SLIMbus driver. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200109103148.5612-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7b73a9c8e26ce5769c41d4b787767c10fe7269db Author: Peter Ujfalusi Date: Thu Jan 9 10:31:46 2020 +0000 slimbus: qcom-ngd-ctrl: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200109103148.5612-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 884a90bdf42bf15b1d07b88b72d93c955eb19ad9 Author: Srinivas Kandagatla Date: Thu Jan 9 10:31:45 2020 +0000 dt-bindings: SLIMBus: add slim devices optional properties This patch adds an optional SLIMBus Interface device phandle property that could be used by some of the SLIMBus devices. Interface device is mostly used with devices that are dealing with streaming. Signed-off-by: Srinivas Kandagatla Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200109103148.5612-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7483e7a939c074d887450ef1c4d9ccc5909405f8 Author: Arnd Bergmann Date: Tue Jan 7 21:05:43 2020 +0100 vme: bridges: reduce stack usage With CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3, the stack usage in vme_fake grows above the warning limit: drivers/vme/bridges/vme_fake.c: In function 'fake_master_read': drivers/vme/bridges/vme_fake.c:610:1: error: the frame size of 1160 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] drivers/vme/bridges/vme_fake.c: In function 'fake_master_write': drivers/vme/bridges/vme_fake.c:797:1: error: the frame size of 1160 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] The problem is that in some configurations, each call to fake_vmereadX() puts another variable on the stack. Reduce the amount of inlining to get back to the previous state, with no function using more than 200 bytes each. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200107200610.3482901-1-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit a4d35e77357c72acd52d6b1e7093b750b384b7cc Author: Tian Tao Date: Tue Jan 14 10:57:39 2020 +0800 nfc: No need to set .owner platform_driver_register the i2c_add_driver will set the .owner to THIS_MODULE Signed-off-by: Tian Tao Signed-off-by: David S. Miller commit 2b133adfcf8eac354f2a801dc408dc48246e7718 Merge: ec22ab00750d 9f3ef3d7026f Author: David S. Miller Date: Tue Jan 14 11:48:41 2020 -0800 Merge branch 'skb_list_walk_safe-refactoring' Jason A. Donenfeld says: ==================== skb_list_walk_safe refactoring for net/*'s skb_gso_segment usage This patchset adjusts all return values of skb_gso_segment in net/* to use the new skb_list_walk_safe helper. First we fix a minor bug in the helper macro that didn't come up in the last patchset's uses. Then we adjust several cases throughout net/. The xfrm changes were a bit hairy, but doable. Reading and thinking about the code in mac80211 indicates a memory leak, which the commit addresses. All the other cases were pretty trivial. ==================== Signed-off-by: David S. Miller commit 9f3ef3d7026fe0aef5c2d649e21b8c71c17d8fc2 Author: Jason A. Donenfeld Date: Mon Jan 13 18:42:33 2020 -0500 net: mac80211: use skb_list_walk_safe helper for gso segments This is a conversion case for the new function, keeping the flow of the existing code as intact as possible. We also switch over to using skb_mark_not_on_list instead of a null write to skb->next. Finally, this code appeared to have a memory leak in the case where header building fails before the last gso segment. In that case, the remaining segments are not freed. So this commit also adds the proper kfree_skb_list call for the remainder of the skbs. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 2670ee77c99c76f46c061caf65daa2e2bfb5dcc5 Author: Jason A. Donenfeld Date: Mon Jan 13 18:42:32 2020 -0500 net: netfilter: use skb_list_walk_safe helper for gso segments This is a straight-forward conversion case for the new function, keeping the flow of the existing code as intact as possible. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 88bebdf5b26fe9fdeb36f2152978a3bb478b0d4d Author: Jason A. Donenfeld Date: Mon Jan 13 18:42:31 2020 -0500 net: ipv4: use skb_list_walk_safe helper for gso segments This is a straight-forward conversion case for the new function, keeping the flow of the existing code as intact as possible. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit b950d8a5b300ceeb2e530291cddc6b3e547291f0 Author: Jason A. Donenfeld Date: Mon Jan 13 18:42:30 2020 -0500 net: sched: use skb_list_walk_safe helper for gso segments This is a straight-forward conversion case for the new function, keeping the flow of the existing code as intact as possible. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 2cec4448db38758832c2edad439f99584bb8fa0d Author: Jason A. Donenfeld Date: Mon Jan 13 18:42:29 2020 -0500 net: openvswitch: use skb_list_walk_safe helper for gso segments This is a straight-forward conversion case for the new function, keeping the flow of the existing code as intact as possible. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit c3b18e0d925439043b5887c9a6129ff2ffaf58b0 Author: Jason A. Donenfeld Date: Mon Jan 13 18:42:28 2020 -0500 net: xfrm: use skb_list_walk_safe helper for gso segments This is converts xfrm segment iteration to use the new function, keeping the flow of the existing code as intact as possible. One case is very straight-forward, whereas the other case has some more subtle code that likes to peak at ->next and relink skbs. By keeping the variables the same as before, we can upgrade this code with minimal surgery required. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 1a186c14cedbf3364634f2dfa9302ed31b8fab19 Author: Jason A. Donenfeld Date: Mon Jan 13 18:42:27 2020 -0500 net: udp: use skb_list_walk_safe helper for gso segments This is a straight-forward conversion case for the new function, iterating over the return value from udp_rcv_segment, which actually is a wrapper around skb_gso_segment. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 5eee7bd7e245914e4e050c413dfe864e31805207 Author: Jason A. Donenfeld Date: Mon Jan 13 18:42:26 2020 -0500 net: skbuff: disambiguate argument and member for skb_list_walk_safe helper This worked before, because we made all callers name their next pointer "next". But in trying to be more "drop-in" ready, the silliness here is revealed. This commit fixes the problem by making the macro argument and the member use different names. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 0a29275b6300f39f78a87f2038bbfe5bdbaeca47 Author: Li RongQing Date: Fri Jan 10 09:04:37 2020 +0800 bpf: Return -EBADRQC for invalid map type in __bpf_tx_xdp_map A negative value should be returned if map->map_type is invalid although that is impossible now, but if we run into such situation in future, then xdpbuff could be leaked. Daniel Borkmann suggested: -EBADRQC should be returned to stay consistent with generic XDP for the tracepoint output and not to be confused with -EOPNOTSUPP from other locations like dev_map_enqueue() when ndo_xdp_xmit is missing and such. Suggested-by: Daniel Borkmann Signed-off-by: Li RongQing Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/1578618277-18085-1-git-send-email-lirongqing@baidu.com commit ec22ab00750d462dae19272610623abe9534b674 Merge: 169af34684b2 781449a4ae3b Author: David S. Miller Date: Tue Jan 14 11:31:41 2020 -0800 Merge branch 'macsec-hw-offload' Antoine Tenart says: ==================== net: macsec: initial support for hardware offloading This series intends to add support for offloading MACsec transformations to hardware enabled devices. The series adds the necessary infrastructure for offloading MACsec configurations to hardware drivers, in patches 1 to 5; then introduces MACsec offloading support in the Microsemi MSCC PHY driver, in patches 6 to 10. The series can also be found at: https://github.com/atenart/linux/tree/net-next/macsec IProute2 modifications can be found at: https://github.com/atenart/iproute2/tree/macsec MACsec hardware offloading infrastructure ----------------------------------------- Linux has a software implementation of the MACsec standard. There are hardware engines supporting MACsec operations, such as the Intel ixgbe NIC and some Microsemi PHYs (the one we use in this series). This means the MACsec offloading infrastructure should support networking PHY and MAC drivers. Note that MAC driver preliminary support is part of this series, but should not be merged before we actually have a provider for this. We do intend in this series to re-use the logic, netlink API and data structures of the existing MACsec software implementation. This allows not to duplicate definitions and structure storing the same information; as well as using the same userspace tools to configure both software or hardware offloaded MACsec flows (with `ip macsec`). When adding a new MACsec virtual interface the existing logic is kept: offloading is disabled by default. A user driven configuration choice is needed to switch to offloading mode (a patch in iproute2 is needed for this). A single MACsec interface can be offloaded for now, and some limitations are there: no flow can be moved from one implementation to the other so the decision needs to be done before configuring the interface. MACsec offloading ops are called in 2 steps: a preparation one, and a commit one. The first step is allowed to fail and should be used to check if a provided configuration is compatible with a given MACsec capable hardware. The second step is not allowed to fail and should only be used to enable a given MACsec configuration. A limitation as of now is the counters and statistics are not reported back from the hardware to the software MACsec implementation. This isn't an issue when using offloaded MACsec transformations, but it should be added in the future so that the MACsec state can be reported to the user (which would also improve the debug). Microsemi PHY MACsec support ---------------------------- In order to add support for the MACsec offloading feature in the Microsemi MSCC PHY driver, the __phy_read_page and __phy_write_page helpers had to be exported. This is because the initialization of the PHY is done while holding the MDIO bus lock, and we need to change the page to configure the MACsec block. The support itself is then added in three patches. The first one adds support for configuring the MACsec block within the PHY, so that it is up, running and available for future configuration, but is not doing any modification on the traffic passing through the PHY. The second patch implements the phy_device MACsec ops in the Microsemi MSCC PHY driver, and introduce helpers to configure MACsec transformations and flows to match specific packets. The last one adds support for PN rollover. Thanks! Antoine Since v5: - Fixed a compilation issue due to an inclusion from an UAPI header. - Added an EXPORT_SYMBOL_GPL for the PN rollover helper, to fix module compilation issues. - Added a dependency for the MSCC driver on MACSEC || MACSEC=n. - Removed the patches including the MAC offloading support as they are not to be applied for now. Since v4: - Reworked the MACsec read and write functions in the MSCC PHY driver to remove the conditional locking. Since v3: - Fixed a check when enabling offloading that was too restrictive. - Fixed the propagation of the changelink event to the underlying device drivers. Since v2: - Allow selection the offloading from userspace, defaulting to the software implementation when adding a new MACsec interface. The offloading mode is now also reported through netlink. - Added support for letting MKA packets in and out when using MACsec (there are rules to let them bypass the MACsec h/w engine within the PHY). - Added support for PN rollover (following what's currently done in the software implementation: the flow is disabled). - Split patches to remove MAC offloading support for now, as there are no current provider for this (patches are still included). - Improved a few parts of the MACsec support within the MSCC PHY driver (e.g. default rules now block non-MACsec traffic, depending on the configuration). - Many cosmetic fixes & small improvements. Since v1: - Reworked the MACsec offloading API, moving from a single helper called for all MACsec configuration operations, to a per-operation function that is provided by the underlying hardware drivers. - Those functions now contain a verb to describe the configuration action they're offloading. - Improved the error handling in the MACsec genl helpers to revert the configuration to its previous state when the offloading call failed. - Reworked the file inclusions. ==================== Signed-off-by: David S. Miller commit 781449a4ae3b381950ee9aec4d8a54e35f66ab9b Author: Antoine Tenart Date: Mon Jan 13 23:31:48 2020 +0100 net: phy: mscc: PN rollover support This patch adds support for handling MACsec PN rollover in the mscc PHY driver. When a flow rolls over, an interrupt is fired. This patch adds the logic to check all flows and identify the one rolling over in the handle_interrupt PHY helper, then disables the flow and report the event to the MACsec core. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 5c937de78b39e47ce9924fc4b863c5b727edc328 Author: Antoine Tenart Date: Mon Jan 13 23:31:47 2020 +0100 net: macsec: PN wrap callback Allow to call macsec_pn_wrapped from hardware drivers to notify when a PN rolls over. Some drivers might used an interrupt to implement this. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 28c5107aa904ef9db6b023039d20b6b4c4181675 Author: Antoine Tenart Date: Mon Jan 13 23:31:46 2020 +0100 net: phy: mscc: macsec support This patch adds MACsec offloading support to some Microsemi PHYs, to configure flows and transformations so that matched packets can be processed by the MACsec engine, either at egress, or at ingress. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 1bbe0ecc2a1a008bcfeb7fd2d8f95c8e9a1867c6 Author: Antoine Tenart Date: Mon Jan 13 23:31:45 2020 +0100 net: phy: mscc: macsec initialization This patch adds support for initializing the MACsec engine found within some Microsemi PHYs. The engine is initialized in a passthrough mode and does not modify any incoming or outgoing packet. But thanks to this it now can be configured to perform MACsec transformations on packets, which will be supported by a future patch. The MACsec read and write functions are wrapped into two versions: one called during the init phase, and the other one later on. This is because the init functions in the Microsemi PHY driver are called while the MDIO bus lock is taken. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit dcb780fb279514f268826f2e9f4df3bc75610703 Author: Antoine Tenart Date: Mon Jan 13 23:31:44 2020 +0100 net: macsec: add nla support for changing the offloading selection MACsec offloading to underlying hardware devices is disabled by default (the software implementation is used). This patch adds support for changing this setting through the MACsec netlink interface. Many checks are done when enabling offloading on a given MACsec interface as there are limitations (it must be supported by the hardware, only a single interface can be offloaded on a given physical device at a time, rules can't be moved for now). Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 3cf3227a21d1fb020fe26128e60321bd2151e922 Author: Antoine Tenart Date: Mon Jan 13 23:31:43 2020 +0100 net: macsec: hardware offloading infrastructure This patch introduces the MACsec hardware offloading infrastructure. The main idea here is to re-use the logic and data structures of the software MACsec implementation. This allows not to duplicate definitions and structure storing the same kind of information. It also allows to use a unified genlink interface for both MACsec implementations (so that the same userspace tool, `ip macsec`, is used with the same arguments). The MACsec offloading support cannot be disabled if an interface supports it at the moment. The MACsec configuration is passed to device drivers supporting it through macsec_ops which are called from the MACsec genl helpers. Those functions call the macsec ops of PHY and Ethernet drivers in two steps: a preparation one, and a commit one. The first step is allowed to fail and should be used to check if a provided configuration is compatible with the features provided by a MACsec engine, while the second step is not allowed to fail and should only be used to enable a given MACsec configuration. Two extra calls are made: when a virtual MACsec interface is created and when it is deleted, so that the hardware driver can stay in sync. The Rx and TX handlers are modified to take in account the special case were the MACsec transformation happens in the hardware, whether in a PHY or in a MAC, as the packets seen by the networking stack on both the physical and MACsec virtual interface are exactly the same. This leads to some limitations: the hardware and software implementations can't be used on the same physical interface, as the policies would be impossible to fulfill (such as strict validation of the frames). Also only a single virtual MACsec interface can be offloaded to a physical port supporting hardware offloading as it would be impossible to guess onto which interface a given packet should go (for ingress traffic). Another limitation as of now is that the counters and statistics are not reported back from the hardware to the software MACsec implementation. This isn't an issue when using offloaded MACsec transformations, but it should be added in the future so that the MACsec state can be reported to the user (which would also improve the debug). Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 2e18135845b359f26c37df38ba56565496517c10 Author: Antoine Tenart Date: Mon Jan 13 23:31:42 2020 +0100 net: phy: add MACsec ops in phy_device This patch adds a reference to MACsec ops in the phy_device, to allow PHYs to support offloading MACsec operations. The phydev lock will be held while calling those helpers. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 0830e20b62ad156f7df5ff5b9c4cea280ebe8fef Author: Antoine Tenart Date: Mon Jan 13 23:31:41 2020 +0100 net: macsec: introduce MACsec ops This patch introduces MACsec ops for drivers to support offloading MACsec operations. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 76564261a7db80c5f5c624e0122a28787f266bdf Author: Antoine Tenart Date: Mon Jan 13 23:31:40 2020 +0100 net: macsec: introduce the macsec_context structure This patch introduces the macsec_context structure. It will be used in the kernel to exchange information between the common MACsec implementation (macsec.c) and the MACsec hardware offloading implementations. This structure contains pointers to MACsec specific structures which contain the actual MACsec configuration, and to the underlying device (phydev for now). Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit c0e4eadfb8daf2e9557c7450f9b237c08b404419 Author: Antoine Tenart Date: Mon Jan 13 23:31:39 2020 +0100 net: macsec: move some definitions in a dedicated header This patch moves some structure, type and identifier definitions into a MACsec specific header. This patch does not modify how the MACsec code is running and only move things around. This is a preparation for the future MACsec hardware offloading support, which will re-use those definitions outside macsec.c. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 169af34684b2bdf1b1b807d109038a6dc0159e03 Merge: 621400366bdb 8d7e5dee972f Author: David S. Miller Date: Tue Jan 14 11:28:41 2020 -0800 Merge branch 'netns-Optimise-netns-ID-lookups' Guillaume Nault says: ==================== netns: Optimise netns ID lookups Netns ID lookups can be easily protected by RCU, rather than by holding a spinlock. Patch 1 prepares the code, patch 2 does the RCU conversion, and finally patch 3 stops disabling BHs on updates (patch 2 makes that unnecessary). ==================== Signed-off-by: David S. Miller commit 8d7e5dee972f1cde2ba96c621f1541fa36e7d4f4 Author: Guillaume Nault Date: Mon Jan 13 22:39:23 2020 +0100 netns: don't disable BHs when locking "nsid_lock" When peernet2id() had to lock "nsid_lock" before iterating through the nsid table, we had to disable BHs, because VXLAN can call peernet2id() from the xmit path: vxlan_xmit() -> vxlan_fdb_miss() -> vxlan_fdb_notify() -> __vxlan_fdb_notify() -> vxlan_fdb_info() -> peernet2id(). Now that peernet2id() uses RCU protection, "nsid_lock" isn't used in BH context anymore. Therefore, we can safely use plain spin_lock()/spin_unlock() and let BHs run when holding "nsid_lock". Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller commit 2dce224f469f060b9998a5a869151ef83c08ce77 Author: Guillaume Nault Date: Mon Jan 13 22:39:22 2020 +0100 netns: protect netns ID lookups with RCU __peernet2id() can be protected by RCU as it only calls idr_for_each(), which is RCU-safe, and never modifies the nsid table. rtnl_net_dumpid() can also do lockless lookups. It does two nested idr_for_each() calls on nsid tables (one direct call and one indirect call because of rtnl_net_dumpid_one() calling __peernet2id()). The netnsid tables are never updated. Therefore it is safe to not take the nsid_lock and run within an RCU-critical section instead. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller commit 4905294162bda43bef65b411cf791005c7e15b28 Author: Guillaume Nault Date: Mon Jan 13 22:39:20 2020 +0100 netns: Remove __peernet2id_alloc() __peernet2id_alloc() was used for both plain lookups and for netns ID allocations (depending the value of '*alloc'). Let's separate lookups from allocations instead. That is, integrate the lookup code into __peernet2id() and make peernet2id_alloc() responsible for allocating new netns IDs when necessary. This makes it clear that __peernet2id() doesn't modify the idr and prepares the code for lockless lookups. Also, mark the 'net' argument of __peernet2id() as 'const', since we're modifying this line. Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller commit 621400366bdba122b37bfa5f5a64ebfd07919a4a Author: Geert Uytterhoeven Date: Mon Jan 13 14:05:29 2020 +0100 mdio_bus: Simplify reset handling and extend to non-DT systems Convert mdiobus_register_reset() from open-coded DT-only optional reset handling to reset_control_get_optional_exclusive(). This not only simplifies the code, but also adds support for lookup-based resets on non-DT systems. Signed-off-by: Geert Uytterhoeven Reviewed-by: Andrew Lunn Reviewed-by: Philipp Zabel Signed-off-by: David S. Miller commit e27f178793de16ca1b421f2c3f4bc3497b2ce723 Author: Florian Fainelli Date: Sun Jan 12 09:35:38 2020 -0800 net: phy: Added IRQ print to phylink_bringup_phy() The information about the PHY attached to the PHYLINK instance is useful but is missing the IRQ prints that phy_attached_info() adds. phy_attached_info() is a bit long and it would not be possible to use phylink_info() anyway. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit a6c4f77cb3b11f81077b53c4a38f21b92d41f21e Author: Beniamin Bia Date: Tue Jan 14 15:24:01 2020 +0200 dt-bindings: iio: adc: ad7606: Fix wrong maxItems value This patch set the correct value for oversampling maxItems. In the original example, appears 3 items for oversampling while the maxItems is set to 1, this patch fixes those issues. Fixes: 416f882c3b40 ("dt-bindings: iio: adc: Migrate AD7606 documentation to yaml") Signed-off-by: Beniamin Bia Signed-off-by: Rob Herring commit 3b4130418f62b0e7a4685cc2c03bb41c6cb8922d Author: Martin KaFai Lau Date: Mon Jan 13 23:26:47 2020 -0800 bpf: Fix seq_show for BPF_MAP_TYPE_STRUCT_OPS Instead of using bpf_struct_ops_map_lookup_elem() which is not implemented, bpf_struct_ops_map_seq_show_elem() should also use bpf_struct_ops_map_sys_lookup_elem() which does an inplace update to the value. The change allocates a value to pass to bpf_struct_ops_map_sys_lookup_elem(). [root@arch-fb-vm1 bpf]# cat /sys/fs/bpf/dctcp {{{1}},BPF_STRUCT_OPS_STATE_INUSE,{{00000000df93eebc,00000000df93eebc},0,2, ... Fixes: 85d33df357b6 ("bpf: Introduce BPF_MAP_TYPE_STRUCT_OPS") Reported-by: Dan Carpenter Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200114072647.3188298-1-kafai@fb.com commit 52bbd2dcb42c21f183a2f59ad843a8d38fb68250 Author: Michael Walle Date: Mon Jan 13 23:32:48 2020 +0100 mtd: spi-nor: remove unused enum spi_nor_ops The ops aren't used in any SPI NOR controller. Therefore, remove them altogether. Signed-off-by: Michael Walle Signed-off-by: Tudor Ambarus commit 6dd42aa17fdd59f383998c6c3e0ecc89414f4a04 Merge: ac065870d928 3a0d3092a4ed Author: Alexei Starovoitov Date: Mon Jan 13 17:48:13 2020 -0800 Merge branch 'runqslower' Andrii Nakryiko says: ==================== Based on recent BPF CO-RE, tp_btf, and BPF skeleton changes, re-implement BCC-based runqslower tool as a portable pre-compiled BPF CO-RE-based tool. Make sure it's built as part of selftests to ensure it doesn't bit rot. As part of this patch set, augment `format c` output of `bpftool btf dump` sub-command with applying `preserve_access_index` attribute to all structs and unions. This makes all such structs and unions automatically relocatable under BPF CO-RE, which improves user experience of writing TRACING programs with direct kernel memory read access. Also, further clean up selftest/bpf Makefile output and make it conforming to libbpf and bpftool succinct output format. v1->v2: - build in-tree bpftool for runqslower (Yonghong); - drop `format core` and augment `format c` instead (Alexei); - move runqslower under tools/bpf (Daniel). ==================== Signed-off-by: Alexei Starovoitov commit 3a0d3092a4edbbcd62360c44a931c8feaf4b4ff1 Author: Andrii Nakryiko Date: Sun Jan 12 23:31:43 2020 -0800 selftests/bpf: Build runqslower from selftests Ensure runqslower tool is built as part of selftests to prevent it from bit rotting. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200113073143.1779940-7-andriin@fb.com commit db0d39aa7f92cc566b70913f40dbaacc8152a308 Merge: b873c122fef0 dbce0b65046d Author: Rob Herring Date: Tue Jan 14 11:16:02 2020 -0600 Merge branch 'dt/linus' into dt/next commit 52f73c383b2418f2d31b798e765ae7d596c35021 Author: Suzuki K Poulose Date: Mon Jan 13 23:30:23 2020 +0000 arm64: nofpsmid: Handle TIF_FOREIGN_FPSTATE flag cleanly We detect the absence of FP/SIMD after an incapable CPU is brought up, and by then we have kernel threads running already with TIF_FOREIGN_FPSTATE set which could be set for early userspace applications (e.g, modprobe triggered from initramfs) and init. This could cause the applications to loop forever in do_nofity_resume() as we never clear the TIF flag, once we now know that we don't support FP. Fix this by making sure that we clear the TIF_FOREIGN_FPSTATE flag for tasks which may have them set, as we would have done in the normal case, but avoiding touching the hardware state (since we don't support any). Also to make sure we handle the cases seemlessly we categorise the helper functions to two : 1) Helpers for common core code, which calls into take appropriate actions without knowing the current FPSIMD state of the CPU/task. e.g fpsimd_restore_current_state(), fpsimd_flush_task_state(), fpsimd_save_and_flush_cpu_state(). We bail out early for these functions, taking any appropriate actions (e.g, clearing the TIF flag) where necessary to hide the handling from core code. 2) Helpers used when the presence of FP/SIMD is apparent. i.e, save/restore the FP/SIMD register state, modify the CPU/task FP/SIMD state. e.g, fpsimd_save(), task_fpsimd_load() - save/restore task FP/SIMD registers fpsimd_bind_task_to_cpu() \ - Update the "state" metadata for CPU/task. fpsimd_bind_state_to_cpu() / fpsimd_update_current_state() - Update the fp/simd state for the current task from memory. These must not be called in the absence of FP/SIMD. Put in a WARNING to make sure they are not invoked in the absence of FP/SIMD. KVM also uses the TIF_FOREIGN_FPSTATE flag to manage the FP/SIMD state on the CPU. However, without FP/SIMD support we trap all accesses and inject undefined instruction. Thus we should never "load" guest state. Add a sanity check to make sure this is valid. Fixes: 82e0191a1aa11abf ("arm64: Support systems without FP/ASIMD") Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Ard Biesheuvel Reviewed-by: Catalin Marinas Acked-by: Marc Zyngier Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon commit 6d502b6ba1b267b35a70708aa0f61bbd05cf065b Author: Suzuki K Poulose Date: Mon Jan 13 23:30:22 2020 +0000 arm64: signal: nofpsimd: Handle fp/simd context for signal frames Make sure we try to save/restore the vfp/fpsimd context for signal handling only when the fp/simd support is available. Otherwise, skip the frames. Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Ard Biesheuvel Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon commit c9d66999f064947e6b577ceacc1eb2fbca6a8d3c Author: Suzuki K Poulose Date: Mon Jan 13 23:30:21 2020 +0000 arm64: ptrace: nofpsimd: Fail FP/SIMD regset operations When fp/simd is not supported on the system, fail the operations of FP/SIMD regsets. Fixes: 82e0191a1aa11abf ("arm64: Support systems without FP/ASIMD") Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Ard Biesheuvel Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon commit 7559950aef1ab8792c50797c6c5c7c5150a02460 Author: Suzuki K Poulose Date: Mon Jan 13 23:30:20 2020 +0000 arm64: cpufeature: Set the FP/SIMD compat HWCAP bits properly We set the compat_elf_hwcap bits unconditionally on arm64 to include the VFP and NEON support. However, the FP/SIMD unit is optional on Arm v8 and thus could be missing. We already handle this properly in the kernel, but still advertise to the COMPAT applications that the VFP is available. Fix this to make sure we only advertise when we really have them. Fixes: 82e0191a1aa11abf ("arm64: Support systems without FP/ASIMD") Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Ard Biesheuvel Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon commit 449443c03d8cfdacf7313e17779a2594ebf87e6d Author: Suzuki K Poulose Date: Mon Jan 13 23:30:19 2020 +0000 arm64: cpufeature: Fix the type of no FP/SIMD capability The NO_FPSIMD capability is defined with scope SYSTEM, which implies that the "absence" of FP/SIMD on at least one CPU is detected only after all the SMP CPUs are brought up. However, we use the status of this capability for every context switch. So, let us change the scope to LOCAL_CPU to allow the detection of this capability as and when the first CPU without FP is brought up. Also, the current type allows hotplugged CPU to be brought up without FP/SIMD when all the current CPUs have FP/SIMD and we have the userspace up. Fix both of these issues by changing the capability to BOOT_RESTRICTED_LOCAL_CPU_FEATURE. Fixes: 82e0191a1aa11abf ("arm64: Support systems without FP/ASIMD") Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Ard Biesheuvel Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon commit 0cd82feb017e282b29e725801b7c90da69316734 Author: Suzuki K Poulose Date: Mon Jan 13 23:30:18 2020 +0000 arm64: fpsimd: Make sure SVE setup is complete before SIMD is used In-kernel users of NEON rely on may_use_simd() to check if the SIMD can be used. However, we must initialize the SVE before SIMD can be used. Add a sanity check to make sure that we have completed the SVE setup before anyone uses the SIMD. Cc: Ard Biesheuvel Cc: Mark Rutland Cc: Will Deacon Reviewed-by: Ard Biesheuvel Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon commit b51c6ac220f77eb246e940442d970b4065c197b0 Author: Suzuki K Poulose Date: Mon Jan 13 23:30:17 2020 +0000 arm64: Introduce system_capabilities_finalized() marker We finalize the system wide capabilities after the SMP CPUs are booted by the kernel. This is used as a marker for deciding various checks in the kernel. e.g, sanity check the hotplugged CPUs for missing mandatory features. However there is no explicit helper available for this in the kernel. There is sys_caps_initialised, which is not exposed. The other closest one we have is the jump_label arm64_const_caps_ready which denotes that the capabilities are set and the capability checks could use the individual jump_labels for fast path. This is performed before setting the ELF Hwcaps, which must be checked against the new CPUs. We also perform some of the other initialization e.g, SVE setup, which is important for the use of FP/SIMD where SVE is supported. Normally userspace doesn't get to run before we finish this. However the in-kernel users may potentially start using the neon mode. So, we need to reject uses of neon mode before we are set. Instead of defining a new marker for the completion of SVE setup, we could simply reuse the arm64_const_caps_ready and enable it once we have finished all the setup. Also we could expose this to the various users as "system_capabilities_finalized()" to make it more meaningful than "const_caps_ready". Cc: Ard Biesheuvel Cc: Will Deacon Cc: Mark Rutland Reviewed-by: Ard Biesheuvel Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon commit 7980dff398f86a618f502378fa27cf7e77449afa Author: Jose Abreu Date: Tue Jan 14 17:09:24 2020 +0100 ARC: [plat-axs10x]: Add missing multicast filter number to GMAC node Add a missing property to GMAC node so that multicast filtering works correctly. Fixes: 556cc1c5f528 ("ARC: [axs101] Add support for AXS101 SDP (software development platform)") Acked-by: Alexey Brodkin Signed-off-by: Jose Abreu Signed-off-by: Vineet Gupta commit c1c8013ec34d7163431d18367808ea40b2e305f8 Author: Andres Freund Date: Wed Jan 8 20:30:30 2020 -0800 perf c2c: Fix return type for histogram sorting comparision functions Commit 722ddfde366f ("perf tools: Fix time sorting") changed - correctly so - hist_entry__sort to return int64. Unfortunately several of the builtin-c2c.c comparison routines only happened to work due the cast caused by the wrong return type. This causes meaningless ordering of both the cacheline list, and the cacheline details page. E.g a simple: perf c2c record -a sleep 3 perf c2c report will result in cacheline table like ================================================= Shared Data Cache Line Table ================================================= # # ------- Cacheline ---------- Total Tot - LLC Load Hitm - - Store Reference - - Load Dram - LLC Total - Core Load Hit - - LLC Load Hit - # Index Address Node PA cnt records Hitm Total Lcl Rmt Total L1Hit L1Miss Lcl Rmt Ld Miss Loads FB L1 L2 Llc Rmt # ..... .............. .... ...... ....... ...... ..... ..... ... .... ..... ...... ...... .... ...... ..... ..... ..... ... .... ....... 0 0x7f0d27ffba00 N/A 0 52 0.12% 13 6 7 12 12 0 0 7 14 40 4 16 0 0 0 1 0x7f0d27ff61c0 N/A 0 6353 14.04% 1475 801 674 779 779 0 0 718 1392 5574 1299 1967 0 115 0 2 0x7f0d26d3ec80 N/A 0 71 0.15% 16 4 12 13 13 0 0 12 24 58 1 20 0 9 0 3 0x7f0d26d3ec00 N/A 0 98 0.22% 23 17 6 19 19 0 0 6 12 79 0 40 0 10 0 i.e. with the list not being ordered by Total Hitm. Fixes: 722ddfde366f ("perf tools: Fix time sorting") Signed-off-by: Andres Freund Tested-by: Michael Petlan Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Cc: stable@vger.kernel.org # v3.16+ Link: http://lore.kernel.org/lkml/20200109043030.233746-1-andres@anarazel.de Signed-off-by: Arnaldo Carvalho de Melo commit 06bf8ea4f8ae34f91e60d27c8065f55d7a88c682 Author: Marek Vasut Date: Thu Dec 19 22:32:19 2019 +0100 ASoC: sgtl5000: add multi endpoint support Support multiple endpoints on SGTL5000 codec port when used in of_graph context. This patch allows to share the codec port between two CPU DAIs. Example: Custom STM32MP157C board uses SGTL5000 audio codec. This codec is connected to two serial audio interfaces, which are configured either as rx or tx. From AsoC point of view the topolgy is the following: // 2 CPU DAIs (SAI2A/B), 1 Codec (SGTL5000) Playback: CPU-A-DAI(slave) -> (master)CODEC-DAI/port0 Record: CPU-B-DAI(slave) <- (master)CODEC-DAI/port0 In the DT two endpoints have to be associated to the codec port: sgtl5000_port: port { sgtl5000_tx_endpoint: endpoint@0 { remote-endpoint = <&sai2a_endpoint>; }; sgtl5000_rx_endpoint: endpoint@1 { remote-endpoint = <&sai2b_endpoint>; }; }; However, when the audio graph card parses the codec nodes, it expects to find DAI interface indexes matching the endpoints indexes. The current patch forces the use of DAI id 0 for both endpoints, which allows to share the codec DAI between the two CPU DAIs for playback and capture streams respectively. Signed-off-by: Marek Vasut Cc: Mark Brown Link: https://lore.kernel.org/r/20191219213219.366073-1-marex@denx.de Signed-off-by: Mark Brown commit 2f3d8035b0f7a8e781b60e0884551dd8a1173a75 Author: Christophe Leroy Date: Tue Jan 14 16:02:40 2020 +0000 spi: fsl: simplify error path in of_fsl_spi_probe() No need to 'goto err;' for just doing a return. return directly from where the error happens. Signed-off-by: Christophe Leroy Link: https://lore.kernel.org/r/2a4a7e11b37cfa0558d68f0d35e90d6da858b059.1579017697.git.christophe.leroy@c-s.fr Signed-off-by: Mark Brown commit c05f10f28ef697aae8f1d82012d660af3cfc8cf9 Author: Shengjiu Wang Date: Wed Dec 4 20:00:19 2019 +0800 ASoC: fsl_asrc: Add support for imx8qm & imx8qxp There are two asrc module in imx8qm & imx8qxp, each module has different clock configuration, and the DMA type is EDMA. So in this patch, we define the new clocks, refine the clock map, and include struct fsl_asrc_soc_data for different soc usage. The EDMA channel is fixed with each dma request, one dma request corresponding to one dma channel. So we need to request dma channel with dma request of asrc module. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/f33dfe3157b5ab200e09ccbf9ab73d31fac6664b.1575452454.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 8441f87eadf6d6bba542e7a5bf3888595248d888 Author: Shengjiu Wang Date: Wed Dec 4 20:00:18 2019 +0800 ASoC: dt-bindings: fsl_asrc: add compatible string for imx8qm & imx8qxp Add compatible string "fsl,imx8qm-asrc" for imx8qm platform, "fsl,imx8qxp-asrc" for imx8qxp platform. There are two asrc modules in imx8qm & imx8qxp, the clock mapping is different for each other, so add new property "fsl,asrc-clk-map" to distinguish them. Signed-off-by: Shengjiu Wang Acked-by: Rob Herring Link: https://lore.kernel.org/r/b9352edb014c1ee8530c0fd8829c2b044b3da649.1575452454.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit bc3a8b295e5bca9d1ec2622a6ba38289f9fd3d8a Author: Philippe Schenker Date: Wed Dec 4 14:13:33 2019 +0000 spi: fsl-lpspi: fix only one cs-gpio working Why it does not work at the moment: - num_chipselect sets the number of cs-gpios that are in the DT. This comes from drivers/spi/spi.c - num_chipselect gets set with devm_spi_register_controller, that is called in drivers/spi/spi.c - devm_spi_register_controller got called after num_chipselect has been used. How this commit fixes the issue: - devm_spi_register_controller gets called before num_chipselect is being used. Fixes: c7a402599504 ("spi: lpspi: use the core way to implement cs-gpio function") Signed-off-by: Philippe Schenker Link: https://lore.kernel.org/r/20191204141312.1411251-1-philippe.schenker@toradex.com Signed-off-by: Mark Brown commit 932befe39ddea29cf47f4f1dc080d3dba668f0ca Author: Darrick J. Wong Date: Thu Jan 2 13:20:13 2020 -0800 xfs: fix s_maxbytes computation on 32-bit kernels I observed a hang in generic/308 while running fstests on a i686 kernel. The hang occurred when trying to purge the pagecache on a large sparse file that had a page created past MAX_LFS_FILESIZE, which caused an integer overflow in the pagecache xarray and resulted in an infinite loop. I then noticed that Linus changed the definition of MAX_LFS_FILESIZE in commit 0cc3b0ec23ce ("Clarify (and fix) MAX_LFS_FILESIZE macros") so that it is now one page short of the maximum page index on 32-bit kernels. Because the XFS function to compute max offset open-codes the 2005-era MAX_LFS_FILESIZE computation and neither the vfs nor mm perform any sanity checking of s_maxbytes, the code in generic/308 can create a page above the pagecache's limit and kaboom. Fix all this by setting s_maxbytes to MAX_LFS_FILESIZE directly and aborting the mount with a warning if our assumptions ever break. I have no answer for why this seems to have been broken for years and nobody noticed. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 4bbb04abb4ee2e1f7d65e52557ba1c4038ea43ed Author: Darrick J. Wong Date: Thu Jan 2 13:20:13 2020 -0800 xfs: truncate should remove all blocks, not just to the end of the page cache xfs_itruncate_extents_flags() is supposed to unmap every block in a file from EOF onwards. Oddly, it uses s_maxbytes as the upper limit to the bunmapi range, even though s_maxbytes reflects the highest offset the pagecache can support, not the highest offset that XFS supports. The result of this confusion is that if you create a 20T file on a 64-bit machine, mount the filesystem on a 32-bit machine, and remove the file, we leak everything above 16T. Fix this by capping the bunmapi request at the maximum possible block offset, not s_maxbytes. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit a5084865524dee1fe8ea1fee17c60b4369ad4f5e Author: Darrick J. Wong Date: Thu Jan 2 13:25:00 2020 -0800 xfs: introduce XFS_MAX_FILEOFF Introduce a new #define for the maximum supported file block offset. We'll use this in the next patch to make it more obvious that we're doing some operation for all possible inode fork mappings after a given offset. We can't use ULLONG_MAX here because bunmapi uses that to detect when it's done. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 5292e24a6acf5694e0a32c31e3321964176bc17e Author: Jason Gunthorpe Date: Tue Jan 14 11:29:52 2020 -0400 mm/mmu_notifiers: Use 'interval_sub' as the variable for mmu_interval_notifier The 'interval_sub' is placed on the 'notifier_subscriptions' interval tree. This eliminates the poor name 'mni' for this variable. Signed-off-by: Jason Gunthorpe commit 1991722a70ffb1f0199a5690a31a5c7822007b1f Author: Jason Gunthorpe Date: Tue Jan 14 11:11:17 2020 -0400 mm/mmu_notifiers: Use 'subscription' as the variable name for mmu_notifier The 'subscription' is placed on the 'notifier_subscriptions' list. This eliminates the poor name 'mn' for this variable. Signed-off-by: Jason Gunthorpe commit 984cfe4e252681d516df056b982e3c47b66fba92 Author: Jason Gunthorpe Date: Wed Dec 18 13:40:35 2019 -0400 mm/mmu_notifier: Rename struct mmu_notifier_mm to mmu_notifier_subscriptions The name mmu_notifier_mm implies that the thing is a mm_struct pointer, and is difficult to abbreviate. The struct is actually holding the interval tree and hlist containing the notifiers subscribed to a mm. Use 'subscriptions' as the variable name for this struct instead of the really terrible and misleading 'mmn_mm'. Signed-off-by: Jason Gunthorpe commit e19ecbf105b236a6334fab64d8fd5437b12ee019 Author: Marek Vasut Date: Fri Dec 20 17:44:50 2019 +0100 ASoC: sgtl5000: Fix VDDA and VDDIO comparison Comparing the voltage of VDDA and VDDIO to determine whether or not to enable VDDC manual override is insufficient. This is a problem in case the VDDA is supplied from different regulator than VDDIO, while both report the same voltage to the regulator framework. In that case where VDDA and VDDIO is supplied by different regulators, the VDDC manual override must not be applied. Fixes: b6319b061ba2 ("ASoC: sgtl5000: Fix charge pump source assignment") Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Igor Opaniuk Cc: Marcel Ziswiler Cc: Mark Brown Cc: Oleksandr Suvorov Link: https://lore.kernel.org/r/20191220164450.1395038-2-marex@denx.de Signed-off-by: Mark Brown commit aa6dcba83177cf5a96a4ab3b206613d42f8e117b Merge: 2159a6810e96 b059b7e0ec32 Author: Mark Brown Date: Tue Jan 14 15:52:48 2020 +0000 Merge tag 'regulator-eq' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into asoc-5.6 regulator: add regulator_equal() commit b059b7e0ec3208ff1e17cff6387d75a9fbab4e02 Author: Marek Vasut Date: Fri Dec 20 17:44:49 2019 +0100 regulator: core: Add regulator_is_equal() helper Add regulator_is_equal() helper to compare whether two regulators are the same. This is useful for checking whether two separate regulators in a driver are actually the same supply. Signed-off-by: Marek Vasut Cc: Fabio Estevam Cc: Igor Opaniuk Cc: Liam Girdwood Cc: Marcel Ziswiler Cc: Mark Brown Cc: Oleksandr Suvorov Link: https://lore.kernel.org/r/20191220164450.1395038-1-marex@denx.de Signed-off-by: Mark Brown commit 2159a6810e96c38a469c39df8e109edb7232d3c9 Author: Paul Cercueil Date: Tue Dec 24 01:27:08 2019 +0100 ASoC: codecs: Add jz4770-codec driver Add jz4770-codec driver to support the internal CODEC found in the JZ4770 SoC from Ingenic. Signed-off-by: Paul Cercueil Signed-off-by: Maarten ter Huurne Link: https://lore.kernel.org/r/20191224002708.1207884-2-paul@crapouillou.net Signed-off-by: Mark Brown commit 30bcb1f264bfdd49561cc7a974b67c4d712b3668 Author: Paul Cercueil Date: Tue Dec 24 01:27:07 2019 +0100 dt-bindings: sound: Convert jz47*-codec doc to YAML Convert ingenic,jz4740-codec.txt and ingenic,jz4725b-codec.txt to one single ingenic,codec.yaml file, since they share the same binding. Add the ingenic,jz4770-codec compatible string in the process. Signed-off-by: Paul Cercueil Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191224002708.1207884-1-paul@crapouillou.net Signed-off-by: Mark Brown commit e26c4e900b1a75b1e0c9e19e1f807666a8ad2fa1 Author: Dmitry Torokhov Date: Thu Jan 2 17:17:54 2020 -0800 ASoC: Intel: bytcr_rt5651: switch to using devm_fwnode_gpiod_get() devm_fwnode_get_index_gpiod_from_child() is going away as the name is too unwieldy, let's switch to using the new devm_fwnode_gpiod_get(). Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20200103011754.GA260926@dtor-ws Signed-off-by: Mark Brown commit 49e0b6f4e95aa3ade8f512c50d1ccc113fe917b4 Author: Cengiz Can Date: Mon Jan 13 20:44:39 2020 +0300 perf beauty sockaddr: Fix augmented syscall format warning The sockaddr related examples given in `tools/perf/examples/bpf/augmented_syscalls.c` almost always use `long`s to represent most of their fields. However, `size_t syscall_arg__scnprintf_sockaddr(..)` has a `scnprintf` call that uses `"%#x"` as format string. This throws a warning (whenever the syscall argument is `unsigned long`). Added `l` identifier to indicate that the `arg->value` is an unsigned long. Not sure about the complications of this with x86 though. Signed-off-by: Cengiz Can Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200113174438.102975-1-cengiz@kernel.wtf Signed-off-by: Arnaldo Carvalho de Melo commit 93e843f95f095aeb533ab67ac4718f848d38dfa0 Author: Jiri Olsa Date: Mon Jan 13 11:43:58 2020 +0100 perf/ui/gtk: Fix gtk2 build Ravi Bangoria reported an issue when doing the gtk2 feature detection on Fedora 31, where some types got deprecated: /usr/include/gtk-2.0/gtk/gtktypeutils.h:236:1: error: ‘GTypeDebugFlags’ is deprecated [-Werror=deprecated-declarations] 236 | void gtk_type_init (GTypeDebugFlags debug_flags); Fix this for perf by allowing the compile to pass with deprecated symbols via the -Wno-deprecated-declarations compiler directive. Reported-by: Ravi Bangoria Signed-off-by: Jiri Olsa Tested-by: Ravi Bangoria Cc: Alexander Shishkin Cc: Jelle van der Waa Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200113104358.123511-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c1b34230a37d6c167bee0fc2c7204871cf5e875f Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:28 2020 -0600 ASoC: Intel: bytcr_rt5651: remove unused variable Fix GCC warning with W=1 sound/soc/intel//boards/bytcr_rt5651.c:659:40: warning: ‘byt_rt5651_dai_params’ defined but not used [-Wunused-const-variable=] Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 38c059399519f88a93d8873fc500ccb3e73348ac Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:27 2020 -0600 ASoC: Intel: bytcr_rt5640: remove unused variable Fix GCC warning with W=1 sound/soc/intel//boards/bytcr_rt5640.c:936:40: warning: ‘byt_rt5640_dai_params’ defined but not used [-Wunused-const-variable=] Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-18-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1b2c868083195f9ae374707bab83739f09a5b261 Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:26 2020 -0600 ASoC: Intel: bytcht_es8316: removed unused variable fix GCC warning with W=1 sound/soc/intel//boards/bytcht_es8316.c:237:40: warning: ‘byt_cht_es8316_dai_params’ defined but not used [-Wunused-const-variable=] Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0c7288f49135c27211c3a39e16788db41b22bf93 Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:25 2020 -0600 ASoC: Intel: skl_rt286: rename shadowed variable Fix cppcheck warning: [sound/soc/intel/boards/skl_rt286.c:171] -> [sound/soc/intel/boards/skl_rt286.c:214]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/skl_rt286.c:171] -> [sound/soc/intel/boards/skl_rt286.c:250]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ddce36afd59f7adb92dbbd3aa0eaab4bdcc6b530 Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:24 2020 -0600 ASoC: Intel: skl_nau88l25_ssm4567: rename shadowed variable Fix cppcheck warning [sound/soc/intel/boards/skl_nau88l25_ssm4567.c:277] -> [sound/soc/intel/boards/skl_nau88l25_ssm4567.c:320]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/skl_nau88l25_ssm4567.c:277] -> [sound/soc/intel/boards/skl_nau88l25_ssm4567.c:337]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 119cc7841403d1f1889ce17358ed98de023bf387 Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:23 2020 -0600 ASoC: Intel: skl_nau88l25_max98357a: rename shadowed variable Fix cppcheck warning: [sound/soc/intel/boards/skl_nau88l25_max98357a.c:257] -> [sound/soc/intel/boards/skl_nau88l25_max98357a.c:142]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/skl_nau88l25_max98357a.c:257] -> [sound/soc/intel/boards/skl_nau88l25_max98357a.c:318]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 38e58021a950a108215107e22148dfe04a30728a Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:22 2020 -0600 ASOC: Intel: kbl_rt5663_rt5514_max98927: remove useless initialization Fix cppcheck warning: [sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c:764]: (style) Variable 'ret' is assigned a value that is never used. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1157613863e0ec8ef9b5f8840b88e78ae13db5d7 Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:21 2020 -0600 ASoC: Intel: kbl_rt5663_rt5514_max98927: rename shadowed variable Fix cppcheck warning: [sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c:293] -> [sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c:336]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 13a5d5edcf0607ec1584b2c05b1bf3e6600f6533 Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:20 2020 -0600 ASoC: Intel: kbl_rt5663_max98927: rename shadowed variable Fix cppcheck warning: [sound/soc/intel/boards/kbl_rt5663_max98927.c:358] -> [sound/soc/intel/boards/kbl_rt5663_max98927.c:401]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/kbl_rt5663_max98927.c:358] -> [sound/soc/intel/boards/kbl_rt5663_max98927.c:457]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 74e7c6b0030c36a9e9e3c8da4d3b08160b5dda4d Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:19 2020 -0600 ASoC: Intel: kbl_rt5660: rename shadowed variable Fix cppcheck warning: [sound/soc/intel/boards/kbl_rt5660.c:282] -> [sound/soc/intel/boards/kbl_rt5660.c:141]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 379336e30ff728c1c06e818ff4427dfe053f2102 Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:18 2020 -0600 ASoC: Intel: kbl_da7219_max98927: remove unnecessary initialization Fix cppcheck warning [sound/soc/intel/boards/kbl_da7219_max98927.c:179]: (style) Variable 'ret' is assigned a value that is never used. [sound/soc/intel/boards/kbl_da7219_max98927.c:1098]: (style) Variable 'i' is assigned a value that is never used. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1a29c760663624b0160c0143819c70db99343904 Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:17 2020 -0600 ASoC: Intel: kbl_da7219_max98927: rename shadowed variable Fix cppcheck warning: [sound/soc/intel/boards/kbl_da7219_max98927.c:432] -> [sound/soc/intel/boards/kbl_da7219_max98927.c:282]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/kbl_da7219_max98927.c:432] -> [sound/soc/intel/boards/kbl_da7219_max98927.c:494]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2b66c70fbe64c8fd47abd62e601f2405c7810f04 Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:16 2020 -0600 ASoC: Intel: kbl_da7219_max98927: test return value on route add Fix cppcheck warning: [sound/soc/intel/boards/kbl_da7219_max98927.c:340] -> [sound/soc/intel/boards/kbl_da7219_max98927.c:348]: (style) Variable 'ret' is reassigned a value before the old one has been used. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2e539cf72a349bb593718f7f500c96dcfc23d911 Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:15 2020 -0600 ASoC: Intel: kbl_da7219_max98357a: rename shadowed variable Fix cppcheck warning: [sound/soc/intel/boards/kbl_da7219_max98357a.c:257] -> [sound/soc/intel/boards/kbl_da7219_max98357a.c:144]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/kbl_da7219_max98357a.c:257] -> [sound/soc/intel/boards/kbl_da7219_max98357a.c:308]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 988b414775fe34278b1ca898f0b3a607eb49986b Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:14 2020 -0600 ASoC: Intel: glk_rt5682_max98357a: removed unused variables Fix GCC warning with W=1 sound/soc/intel/boards/glk_rt5682_max98357a.c:256:48: warning: ‘constraints_channels’ defined but not used [-Wunused-const-variable=] Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 83fa677581daddd301b4f0337a0643fef7746689 Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:13 2020 -0600 ASoC: Intel: glk_rt5682_max98357a: rename shadowed variable [sound/soc/intel/boards/glk_rt5682_max98357a.c:252] -> [sound/soc/intel/boards/glk_rt5682_max98357a.c:121]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/glk_rt5682_max98357a.c:252] -> [sound/soc/intel/boards/glk_rt5682_max98357a.c:275]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c1b765362bf8c2dc8bde93613f25d97a772709fa Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:12 2020 -0600 ASoC: Intel: bxt_rt298: rename shadowed variable Fix cppcheck warning: [sound/soc/intel/boards/bxt_rt298.c:291] -> [sound/soc/intel/boards/bxt_rt298.c:209]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/bxt_rt298.c:291] -> [sound/soc/intel/boards/bxt_rt298.c:258]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 01bfee0d1d945a24061b12b8a9268365fceef518 Author: Pierre-Louis Bossart Date: Mon Jan 13 15:04:11 2020 -0600 ASoC: Intel: bxt_da7219_max98357a: rename shadowed variable Fix cppcheck warning: [sound/soc/intel/boards/bxt_da7219_max98357a.c:265] -> [sound/soc/intel/boards/bxt_da7219_max98357a.c:164]: (style) Local variable 'channels' shadows outer variable [sound/soc/intel/boards/bxt_da7219_max98357a.c:265] -> [sound/soc/intel/boards/bxt_da7219_max98357a.c:316]: (style) Local variable 'channels' shadows outer variable Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113210428.27457-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d873997192ddcacb5333575502be2f91ea4b47b8 Author: Pierre-Louis Bossart Date: Mon Jan 13 14:56:20 2020 -0600 ASoC: SOF: Intel: hda-dai: fix compilation warning in pcm_prepare Fix GCC warning with W=1, previous cleanup did not remove unnecessary variable. sound/soc/sof/intel/hda-dai.c: In function ‘hda_link_pcm_prepare’: sound/soc/sof/intel/hda-dai.c:265:31: warning: variable ‘hda_stream’ set but not used [-Wunused-but-set-variable] 265 | struct sof_intel_hda_stream *hda_stream; | ^~~~~~~~~~ Fixes: a3ebccb52efdf ("ASoC: SOF: Intel: hda: reset link DMA state in prepare") Cc: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113205620.27285-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e7cc5cfbea4c9bd2c452cb81d0829e9259dd84d8 Author: Jean Pihet Date: Tue Jan 14 13:41:25 2020 +0100 spi: spi-ti-qspi: optimize byte-transfers Optimize the 8-bit based transfers, as used by the SPI flash devices, by reading the data registers by 32 and 128 bits when possible and copy the contents to the receive buffer. The speed improvement is 4.9x using quad read. Signed-off-by: Jean Pihet Cc: Ryan Barnett Cc: Conrad Ratschan Cc: Arnout Vandecappelle Link: https://lore.kernel.org/r/20200114124125.361429-3-jean.pihet@newoldbits.com Signed-off-by: Mark Brown commit e97f491450805fe6cbfd482b97b5427b21dec575 Author: Jean Pihet Date: Tue Jan 14 13:41:24 2020 +0100 spi: spi-ti-qspi: support large flash devices The TI QSPI IP has limitations: - the MMIO region is 64MB in size - in non-MMIO mode, the transfer can handle 4096 words max. Add support for bigger devices. Use MMIO and DMA transfers below the 64MB boundary, use software generated transfers above. Signed-off-by: Jean Pihet Cc: Ryan Barnett Cc: Conrad Ratschan Cc: Arnout Vandecappelle Link: https://lore.kernel.org/r/20200114124125.361429-2-jean.pihet@newoldbits.com Signed-off-by: Mark Brown commit 5b379b2bf87710834ed90d367acb58e652e624af Author: Axel Lin Date: Tue Jan 14 20:44:49 2020 +0800 regulator: mpq7920: Convert to use .probe_new Use the new .probe_new instead. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20200114124449.28408-2-axel.lin@ingics.com Signed-off-by: Mark Brown commit 489d6954acabe71d22ba0033fe85822742364915 Author: Axel Lin Date: Tue Jan 14 20:44:48 2020 +0800 regulator: mpq7920: Remove unneeded fields from struct mpq7920_regulator_info Both *dev and *rdev are only used in .probe, so use local variable instead. Also remove mpq7920_regulator_register() because it is so trivial and there is only one caller. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20200114124449.28408-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 604e2139a1026793b8c2172bd92c7e9d039a5cf0 Author: Jiri Olsa Date: Mon Jan 13 11:43:57 2020 +0100 perf ui gtk: Add missing zalloc object When we moved zalloc.o to the library we missed gtk library which needs it compiled in, otherwise the missing __zfree symbol will cause the library to fail to load. Adding the zalloc object to the gtk library build. Fixes: 7f7c536f23e6 ("tools lib: Adopt zalloc()/zfree() from tools/perf") Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Jelle van der Waa Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200113104358.123511-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fed4383c4586a895dc8cd62e3a71814f16ba0e2d Author: Pierre-Louis Bossart Date: Mon Jan 13 16:36:25 2020 -0600 ASoC: rt715: remove warnings make W=1 reports defined-but-not-used and kernel-doc formatting issues. No functionality change. Fixes: d1ede0641b05e4 ("ASoC: rt715: add RT715 codec driver") Cc: Jack Yu Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113223625.15995-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2c72943dc359c9592747c3fd82cda30e7c89714c Author: Kuninori Morimoto Date: Tue Jan 14 10:14:42 2020 +0900 ASoC: rt715: use dev_to_sdw_dev() instead of to_sdw_slave_device() This patch fixup this error CC sound/soc/codecs/rt715-sdw.o linux/sound/soc/codecs/rt715-sdw.c: In function 'rt715_dev_resume': linux/sound/soc/codecs/rt715-sdw.c:568:28: error: implicit declaration\ of function 'to_sdw_slave_device'; did you mean 'sdw_slave_modalias'?\ [-Werror=implicit-function-declaration] struct sdw_slave *slave = to_sdw_slave_device(dev); ^~~~~~~~~~~~~~~~~~~ sdw_slave_modalias linux/sound/soc/codecs/rt715-sdw.c:568:28: warning: initialization of\ 'struct sdw_slave *' from 'int' makes pointer from integer without a\ cast [-Wint-conversion] cc1: some warnings being treated as errors Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h80yhm9p.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 5615b7a2784331d115e5774e80c1fb0c1ce80644 Author: YueHaibing Date: Tue Jan 14 01:13:19 2020 +0000 ASoC: rt700: remove unused including Remove including that don't need it. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200114011319.173401-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit a9ffe2a9833835b157a53dcc4d725f71426f55ff Author: Alex Deucher Date: Fri Jan 10 15:58:52 2020 -0500 drm/amdgpu/debugfs: properly handle runtime pm If driver debugfs files are accessed, power up the GPU when necessary. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit b9a9294b91efd4388db415d657626c1431316379 Author: Alex Deucher Date: Fri Jan 10 15:31:27 2020 -0500 drm/amdgpu/pm: properly handle runtime pm If power management sysfs or debugfs files are accessed, power up the GPU when necessary. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit f81110b8520a4ed1062b044b1704b4fe31593ebe Author: Flora Cui Date: Thu Jan 9 10:21:39 2020 +0800 drm/amdgpu: add header file for macro SZ_1M Fixes: 4dee6e4ca50a ("drm/amdgpu: use linux size macro to simplify ONE_Kib & One_Mib") Signed-off-by: Flora Cui Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit b239b59bf4345da904b3d96006d8d994c5b7b996 Author: Chen Zhou Date: Fri Jan 10 15:16:16 2020 +0800 drm/amd/display: remove unnecessary conversion to bool The conversion to bool is not needed, remove it. Reviewed-by: Harry Wentland Signed-off-by: Chen Zhou Signed-off-by: Alex Deucher commit 5d593d682ffa533615f81a0680d4aa18dbeb97f7 Author: Mario Kleiner Date: Thu Jan 9 16:20:27 2020 +0100 drm/amd/display: Reorder detect_edp_sink_caps before link settings read. read_current_link_settings_on_detect() on eDP 1.4+ may use the edp_supported_link_rates table which is set up by detect_edp_sink_caps(), so that function needs to be called first. Reviewed-by: Harry Wentland Signed-off-by: Mario Kleiner Cc: Martin Leung Signed-off-by: Alex Deucher commit a2e4b418c6714e2dfe3d0026fdc6905186f55001 Author: Alex Deucher Date: Thu Jan 9 18:27:16 2020 -0500 drm/amdgpu/psp: declare navi1x ta firmware So that it gets included in the initrd. At the moment this is optional firmware that contains support for HDCP. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 22d39fe729fdd21acf9c29c5892a71ede4b7c619 Author: Joseph Greathouse Date: Thu Jan 9 17:41:43 2020 -0600 drm/amdgpu: Match TC hash settings to DF settings (v2) On Arcturus, data fabric hashing is set by the VBIOS, and affects which addresses map to which memory channels. The gfx core's caches also need to know this mapping, but the hash settings for these these caches is set by the driver. This change queries the DF to understand how the VBIOS configured DF, then matches the TC hash configuration bits to do the same thing. v2: squash in warning fix Signed-off-by: Joseph Greathouse Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ae99fc35ceea9ae9c496987d113187464b33b2b8 Author: Joseph Greathouse Date: Thu Jan 9 17:07:12 2020 -0600 drm/amdgpu: add defines for DF and TCP Hashing On Arcturus, we need TC channel hashing, which is set by the driver, to match DF hashing, which is set by VBIOS. To match these, we plan to query the DF information and then properly set the TC configuration bits to match them. This patch adds the required fields to register definitions in preparation for a future patch which will use them. Signed-off-by: Joseph Greathouse Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit bdf84a80e0ce5f60f4f41a27b4cf74bcfabcea56 Author: Joseph Greathouse Date: Tue Jan 14 10:05:21 2020 -0500 drm/amdgpu: Create generic DF struct in adev The only data fabric information the adev struct currently contains is a function pointer table. In the near future, we will be adding some cached DF information into adev. As such, this patch creates a new amdgpu_df struct for adev. Right now, it only containst the old function pointer table, but new stuff will be added soon. Signed-off-by: Joseph Greathouse Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 61e50646f0bbfb24002c4935e1ed9bf04ae4266e Author: Michael Strauss Date: Mon Nov 4 13:39:20 2019 -0500 drm/amd/display: add Pollock IDs, fix Pollock & Dali clk mgr construct [WHY] Only a single voltage level should be available to Pollock (min level) Pollock & Dali get misidentified as Renoir, use wrong clk mgr constructor [HOW] Add provided Pollock IDs to ASIC Rev. ID list. Create new Pollock ASIC RID check, fix RV2 & Dali ASIC checks. Check RID and set max voltage level to 0 if Pollock is detected. Work around broken ASICREV_IS_RENOIR, IS_RAVEN2, etc. checks by performing Dali/Pollock checks before they can be misidentified as RN. Signed-off-by: Michael Strauss Signed-off-by: Bhawanpreet Lakha Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit eee2eabafe1da1da05927fafbc6d49ec6cf5ca44 Author: John Clements Date: Fri Jan 10 17:38:31 2020 +0800 drm/amdgpu: preserve RSMU UMC index mode state between UMC RAS err register access restore previous RSMU UMC index mode state Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 9c8c81fe7d2c6ef732b50d456a627fdf4383c1d5 Author: John Clements Date: Wed Jan 8 16:36:14 2020 +0800 drm/amdgpu: disable XGMI TA unload for arcturus in event of GPU reset, XGMI TA unload causes unrecoverable GPU hang Acked-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit d8459d1b7f689daaaa32ceef74d387f354a461ce Author: Aaron Liu Date: Thu Jan 9 19:37:10 2020 +0800 drm/amdgpu: update goldensetting for renoir Update mmSDMA0_UTCL1_WATERMK golden setting for renoir. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 6ca476bab8fd3d1db82626a5aab1bf8ebae996c9 Author: Aaron Liu Date: Thu Jan 9 19:26:40 2020 +0800 drm/amd/powerplay: update SMU12_DRIVER_IF_VERSION to 11 This patch updates SMU12_DRIVER_IF_VERSION to 11. Signed-off-by: Aaron Liu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 1499bcc7a216770c9946f1ec1aa331604338f7e2 Author: Alex Deucher Date: Wed Jan 8 22:14:24 2020 -0500 drm/amdgpu/gmc10: free stolen memory in late_init We don't need to store the pre-OS console memory after the driver has loaded so free it. Reviewed-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher commit bbde7162f7085884476a4a17b9792748e3c69b64 Author: Alex Deucher Date: Wed Jan 8 22:10:00 2020 -0500 drm/amdgpu/gmc10: remove dead code Leftover from bring up. We look up the actual pre-OS memory usage value later in the same function. Reviewed-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Alex Deucher commit fe3db43742390044990999076d41f5cbffa9b814 Author: Alex Deucher Date: Wed Jan 8 17:47:23 2020 -0500 drm/amdgpu/display: set gpu vm flag for renoir It won't get used unless the driver allows the gtt domain for display buffers which is controlled elsewhere. Reviewed-by: Harry Wentland Acked-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit 403c1ef0d2cce0be8ab5cf29d9e3d97d587e8582 Author: Alex Deucher Date: Wed Jan 8 17:46:02 2020 -0500 drm/amdgpu: enable S/G display on PCO and RV2 (v2) It should work on all Raven variants, but some users have reported issues with original Raven with IOMMU enabled. So far there have been no issues observed with PCO or RV2. v2: split out the dm init and domain changes into separate patches. Acked-by: Harry Wentland Acked-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit 60fb100b3d1676490a9e5afef9fbd3f514f7d63d Author: Alex Deucher Date: Wed Jan 8 17:43:55 2020 -0500 drm/amdgpu/display: set gpu vm flag for all asics which support it It won't get used unless the driver allows the gtt domain for display buffers which is controlled elsewhere. Acked-by: Huang Rui Acked-by: Christian König Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit d44394a9e18f37a17a70b2d2d81594c66151f523 Author: Alex Deucher Date: Wed Jan 8 17:33:51 2020 -0500 drm/amdgpu/gfx9: remove unused sdma headers All of the sdma stuff these were used for moves to the sdma code, so remove them. Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 351d5ac55c72ee6f6ad018e2a756b5fe09fceed3 Author: Tom St Denis Date: Thu Jan 9 10:37:56 2020 -0500 drm/amd/amdgpu: add missing umc_6_1_2_sh_mask.h header file (v2) (v2): Fix preprocessor tag Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 49da2ccd2d6e449b1a5cefd2b3f90e4d9a5c1adb Author: Hawking Zhang Date: Thu Jan 9 19:38:25 2020 +0800 drm/amdgpu: check sdma ras funcs pointer before accessing sdma ras funcs are not supported by ASIC prior to vega20 Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 5d4667ec33a0d2978afb999eedc81ac54d76fe5c Author: Guchun Chen Date: Wed Jan 8 13:52:00 2020 +0800 drm/amdgpu: calculate MCUMC_ADDRT0 per asic's UMC offset Hardcoded offset is not friendly. And another benifit of this patch is to keep read and write access to this register be consistent with other similar UMC regsiters in this file. Signed-off-by: Guchun Chen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 817396dc9f6ab2481b94071de2e586aae876e89c Author: Guchun Chen Date: Wed Jan 8 13:50:10 2020 +0800 drm/amdgpu: add MCUMC_ADDRT0 offset to ip header file Both are needed on vega20 and arcturus chip. Signed-off-by: Guchun Chen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 40c9e7b5783c99bb65ab0f81ccedba783f8ffb3b Author: Alex Deucher Date: Thu Jan 9 15:41:10 2020 -0500 drm/amdgpu/powerplay: fix warning in smu_v11_0.c Cast to make min() happy. The values are well within range. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit b1ffd1e309c7b75b193ac934296f68ef8ce6f5c0 Author: Kenneth Feng Date: Thu Jan 9 15:01:41 2020 +0800 drm/amd/powerplay: sw ctf for arcturus change the sw ctf setting to smu_v11_0_set_thermal_range() since software_shutdown_temp shares the same definition and name in all the smu11 project. Signed-off-by: Kenneth Feng Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit df5e984c8bd414561c320d6cbbb66d53abf4c7e2 Author: Tiecheng Zhou Date: Wed Jan 8 13:44:29 2020 +0800 drm/amdgpu/sriov: workaround on rev_id for Navi12 under sriov guest vm gets 0xffffffff when reading RCC_DEV0_EPF0_STRAP0, as a consequence, the rev_id and external_rev_id are wrong. workaround it by hardcoding the rev_id to 0, which is the default value. v2. add comment in the code Signed-off-by: Tiecheng Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2d5ef0b42c0bca33aaaff2f1b98855e4e3225a0f Author: Zhan Liu Date: Mon Dec 23 15:37:24 2019 -0500 drm/amd/display: Don't disable DP PHY when link loss happens [Why] There is a use case that link loss happens accidentally, and we need to recover that link loss as soon as possible. Under this circumstance, we will perform link training, and try to recover the link that's just lost. However, if link PHY is disabled before link training happens, then DP display will never come back again. Also, please note that dropping this disable_phy function call won't break USB-C hotplug functionality. (This line of code was firstly introduced associated with a patch to fix USB-C hotplug issue) [How] Don't disable DP transmitter and its encoder before link training happens, even if link loss is detected. Signed-off-by: Zhan Liu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 5e62db9df684673f4ce7187c3c02e6a995c5cde9 Author: Hawking Zhang Date: Wed Jan 8 23:28:05 2020 +0800 drm/amdgpu: read sdma edc counter to clear the counters SDMA edc counter registers were added in gfx edc counters array. When querying gfx error counter in that array, there is no way to differentiate sdma instance number for different asic and then results to NULL pointer access when trying to read sdma register base address for instances greater than 2 on Vega20. In addition, this also results to wrong gfx error counters since it actually added sdma edc counters. Therefore, sdma edc counter registers should be separated from gfx edc counter regsiter array and only get initialized when driver tries to enable sdma ras. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1dd5ead2940903b2cf36f6725f1d6670abd6f14b Author: Hawking Zhang Date: Wed Jan 8 21:33:49 2020 +0800 drm/amdgpu: add ras_late_init and ras_fini for sdma v4 move ras_late_init and ras_fini to sdma_ras_funcs table Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3e81ee9a78e5df7df46329e0dcfa751b59573bb7 Author: Hawking Zhang Date: Thu Jan 9 00:48:46 2020 +0800 drm/amdgpu: support error reporting for sdma ip block invoke sdma query_ras_error_count to get sdma single bit error count Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 93070deb58c964185acace9fcfdc916a6cea6644 Author: Hawking Zhang Date: Thu Jan 9 00:45:18 2020 +0800 drm/amdgpu: add query_ras_error_count function for sdma v4 query_ras_error_count function will be invoked to query single bit error count detected in sdma ip block Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e7ddb878484dcef0abfe318f9f64bfe013d42c04 Author: Leo Liu Date: Tue Jan 7 15:47:26 2020 -0500 drm/amdgpu: enable VCN2.5 IP block for Arcturus With default PSP FW loading Signed-off-by: Leo Liu Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit 2d6605911d1246764ade5e9eee1f9c1cfb4955b5 Author: Leo Liu Date: Tue Jan 7 15:45:01 2020 -0500 drm/amdgpu/vcn2.5: fix PSP FW loading for the second instance ucodes for instances are from different location Signed-off-by: Leo Liu Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit 5021e9a83160dab64ccc0460e820340d71fafe14 Author: Nirmoy Das Date: Wed Jan 8 10:32:55 2020 +0100 drm/amdgpu: catch amdgpu_irq_add_id failure Do not ignore amdgpu_irq_add_id return value while registering VMC page fault interrupt. Signed-off-by: Nirmoy Das Acked-by: Christian König Signed-off-by: Alex Deucher commit 9530273ec90cc0614f6ac56d0c024e2f39886419 Author: Evan Quan Date: Tue Jan 7 16:57:39 2020 +0800 drm/amd/powerplay: cover the powerplay implementation details V3 This can save users much troubles. As they do not actually need to care whether swSMU or traditional powerplay routine should be used. V2: apply the fixes to vi.c and cik.c also V3: squash in oops fix Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 8297ca5e8c70ddb58cf03cd0411929ab87a44860 Author: Ole Wiedemann Date: Fri Dec 13 14:10:32 2019 +0100 staging: android: ashmem: Replace strcpy with strscpy Replaced strcpy call with safer strscpy call with given length. This elimates the need to manually null-terminate the given string, since strscpy will null terminate the destination anyway.: Signed-off-by: Ole Wiedemann Co-developed-by: Sebastian Scherbel Signed-off-by: Sebastian Scherbel Acked-by: Christian Brauner Acked-by: Joel Fernandes (Google) Acked-by: Todd Kjos Link: https://lore.kernel.org/r/20191213131032.22579-1-ole.wiedemann@fau.de Signed-off-by: Greg Kroah-Hartman commit a434b94c5a6c56ea7078d43d932284005e08ed62 Author: Yong Zhao Date: Fri Dec 13 11:31:48 2019 -0500 drm/amdkfd: Improve function get_sdma_rlc_reg_offset() (v2) The SOC15_REG_OFFSET() macro needs to dereference adev->reg_offset[IP] pointer, which is sometimes NULL when there are fewer than 8 sdma engines. Avoid that by not initializing the array regardless. v2: squash in warning fixes Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1fc636c9b3b251d065dbf04eb2293fb6de9fdcf9 Author: Mikita Lipski Date: Mon Jan 13 08:15:19 2020 -0500 drm/amdgpu/display: Use u64 divide macro for round up division [why] Fix compilation warnings on i386 architecture: undefined reference to `__udivdi3' [how] Switch DIV_ROUND_UP to DIV64_U64_ROUND_UP Reported-by: Randy Dunlap Reviewed-by: Harry Wentland Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit a37f4958f7b63d2b3cd17a76151fdfc29ce1da5f Author: Eric Snowberg Date: Sat Dec 7 11:16:03 2019 -0500 debugfs: Return -EPERM when locked down When lockdown is enabled, debugfs_is_locked_down returns 1. It will then trigger the following: WARNING: CPU: 48 PID: 3747 CPU: 48 PID: 3743 Comm: bash Not tainted 5.4.0-1946.x86_64 #1 Hardware name: Oracle Corporation ORACLE SERVER X7-2/ASM, MB, X7-2, BIOS 41060400 05/20/2019 RIP: 0010:do_dentry_open+0x343/0x3a0 Code: 00 40 08 00 45 31 ff 48 c7 43 28 40 5b e7 89 e9 02 ff ff ff 48 8b 53 28 4c 8b 72 70 4d 85 f6 0f 84 10 fe ff ff e9 f5 fd ff ff <0f> 0b 41 bf ea ff ff ff e9 3b ff ff ff 41 bf e6 ff ff ff e9 b4 fe RSP: 0018:ffffb8740dde7ca0 EFLAGS: 00010202 RAX: ffffffff89e88a40 RBX: ffff928c8e6b6f00 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff928dbfd97778 RDI: ffff9285cff685c0 RBP: ffffb8740dde7cc8 R08: 0000000000000821 R09: 0000000000000030 R10: 0000000000000057 R11: ffffb8740dde7a98 R12: ffff926ec781c900 R13: ffff928c8e6b6f10 R14: ffffffff8936e190 R15: 0000000000000001 FS: 00007f45f6777740(0000) GS:ffff928dbfd80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fff95e0d5d8 CR3: 0000001ece562006 CR4: 00000000007606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: vfs_open+0x2d/0x30 path_openat+0x2d4/0x1680 ? tty_mode_ioctl+0x298/0x4c0 do_filp_open+0x93/0x100 ? strncpy_from_user+0x57/0x1b0 ? __alloc_fd+0x46/0x150 do_sys_open+0x182/0x230 __x64_sys_openat+0x20/0x30 do_syscall_64+0x60/0x1b0 entry_SYSCALL_64_after_hwframe+0x170/0x1d5 RIP: 0033:0x7f45f5e5ce02 Code: 25 00 00 41 00 3d 00 00 41 00 74 4c 48 8d 05 25 59 2d 00 8b 00 85 c0 75 6d 89 f2 b8 01 01 00 00 48 89 fe bf 9c ff ff ff 0f 05 <48> 3d 00 f0 ff ff 0f 87 a2 00 00 00 48 8b 4c 24 28 64 48 33 0c 25 RSP: 002b:00007fff95e0d2e0 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 0000561178c069b0 RCX: 00007f45f5e5ce02 RDX: 0000000000000241 RSI: 0000561178c08800 RDI: 00000000ffffff9c RBP: 00007fff95e0d3e0 R08: 0000000000000020 R09: 0000000000000005 R10: 00000000000001b6 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000003 R14: 0000000000000001 R15: 0000561178c08800 Change the return type to int and return -EPERM when lockdown is enabled to remove the warning above. Also rename debugfs_is_locked_down to debugfs_locked_down to make it sound less like it returns a boolean. Fixes: 5496197f9b08 ("debugfs: Restrict debugfs when the kernel is locked down") Signed-off-by: Eric Snowberg Reviewed-by: Matthew Wilcox (Oracle) Cc: stable Acked-by: James Morris Link: https://lore.kernel.org/r/20191207161603.35907-1-eric.snowberg@oracle.com Signed-off-by: Greg Kroah-Hartman commit 7c35e699c88bd60734277b26962783c60e04b494 Author: Geert Uytterhoeven Date: Fri Dec 6 14:22:19 2019 +0100 driver core: Print device when resources present in really_probe() If a device already has devres items attached before probing, a warning backtrace is printed. However, this backtrace does not reveal the offending device, leaving the user uninformed. Furthermore, using WARN_ON() causes systems with panic-on-warn to reboot. Fix this by replacing the WARN_ON() by a dev_crit() message. Abort probing the device, to prevent doing more damage to the device's resources. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191206132219.28908-1-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit 264d25275a46fce5da501874fa48a2ae5ec571c8 Author: Guenter Roeck Date: Wed Nov 27 12:24:53 2019 -0800 driver core: Fix test_async_driver_probe if NUMA is disabled Since commit 57ea974fb871 ("driver core: Rewrite test_async_driver_probe to cover serialization and NUMA affinity"), running the test with NUMA disabled results in warning messages similar to the following. test_async_driver test_async_driver.12: NUMA node mismatch -1 != 0 If CONFIG_NUMA=n, dev_to_node(dev) returns -1, and numa_node_id() returns 0. Both are widely used, so it appears risky to change return values. Augment the check with IS_ENABLED(CONFIG_NUMA) instead to fix the problem. Cc: Alexander Duyck Fixes: 57ea974fb871 ("driver core: Rewrite test_async_driver_probe to cover serialization and NUMA affinity") Signed-off-by: Guenter Roeck Cc: stable Acked-by: Alexander Duyck Link: https://lore.kernel.org/r/20191127202453.28087-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit 39cc539f90d035a293240c9443af50be55ee81b8 Author: Simon Schwartz Date: Tue Dec 10 17:41:37 2019 -0500 driver core: platform: Prevent resouce overflow from causing infinite loops num_resources in the platform_device struct is declared as a u32. The for loops that iterate over num_resources use an int as the counter, which can cause infinite loops on architectures with smaller ints. Change the loop counters to u32. Signed-off-by: Simon Schwartz Link: https://lore.kernel.org/r/2201ce63a2a171ffd2ed14e867875316efcf71db.camel@theschwartz.xyz Signed-off-by: Greg Kroah-Hartman commit 5bf33f04eb5c3e6c55988046c88a5986430c7b4a Author: Mateusz Nosek Date: Mon Dec 30 20:16:28 2019 +0100 fs/kernfs/dir.c: Clean code by removing always true condition Previously there was an additional check if variable pos is not null. However, this check happens after entering while loop and only then, which can happen only if pos is not null. Therefore the additional check is redundant and can be removed. Signed-off-by: Mateusz Nosek Acked-by: Tejun Heo Link: https://lore.kernel.org/r/20191230191628.21099-1-mateusznosek0@gmail.com Signed-off-by: Greg Kroah-Hartman commit ef9ffc1e5f1ac73ecd2fb3b70db2a3b2472ff2f7 Author: Lubomir Rintel Date: Mon Nov 18 12:54:31 2019 +0100 component: do not dereference opaque pointer in debugfs The match data does not have to be a struct device pointer, and indeed very often is not. Attempt to treat it as such easily results in a crash. For the components that are not registered, we don't know which device is missing. Once it it is there, we can use the struct component to get the device and whether it's bound or not. Fixes: 59e73854b5fd ('component: add debugfs support') Signed-off-by: Lubomir Rintel Cc: stable Cc: Arnaud Pouliquen Link: https://lore.kernel.org/r/20191118115431.63626-1-lkundrak@v3.sk Signed-off-by: Greg Kroah-Hartman commit e2f373320779eb0cece04a11621e9cf518e1c7b1 Author: Masahiro Yamada Date: Wed Dec 18 23:43:07 2019 +0900 drivers/component: remove modular code drivers/base/Makefile always adds component.o to obj-y, like this: obj-y := component.o core.o bus.o dd.o syscore.o \ Hence it is never compiled as a module. Remove useless modular code. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20191218144307.19243-1-masahiroy@kernel.org Signed-off-by: Greg Kroah-Hartman commit 821e2c705fb9d4b7f54fd17e7a13614ee515a181 Author: Khouloud Touil Date: Tue Jan 7 10:29:21 2020 +0100 dt-bindings: at25: add reference for the wp-gpios property As the at25 uses the NVMEM subsystem, and the property is now being handled, adding reference for it in the device tree binding document, which allows to specify the GPIO line to which the write-protect pin is connected. Signed-off-by: Khouloud Touil Reviewed-by: Rob Herring Acked-by: Greg Kroah-Hartman Signed-off-by: Bartosz Golaszewski commit fc8c0a99223367b071c83711259d754b6bb7a379 Author: Jiri Olsa Date: Sun Jan 12 20:22:59 2020 +0100 perf tools: Use %define api.pure full instead of %pure-parser bison deprecated the "%pure-parser" directive in favor of "%define api.pure full". The api.pure got introduced in bison 2.3 (Oct 2007), so it seems safe to use it without any version check. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Clark Williams Cc: Jiri Olsa Cc: Namhyung Kim Cc: Ravi Bangoria Cc: Thomas Gleixner Link: http://lore.kernel.org/lkml/20200112192259.GA35080@krava Signed-off-by: Arnaldo Carvalho de Melo commit cb71f7d43ece3d5a4f400f510c61b2ec7c9ce9a1 Author: Jiri Olsa Date: Fri Jan 10 16:15:37 2020 +0100 libperf: Setup initial evlist::all_cpus value Jann Horn reported crash in perf ftrace because evlist::all_cpus isn't initialized if there's evlist without events, which is the case for perf ftrace. Adding initial initialization of evlist::all_cpus from given cpus, regardless of events in the evlist. Fixes: 7736627b865d ("perf stat: Use affinity for closing file descriptors") Reported-by: Jann Horn Signed-off-by: Jiri Olsa Acked-by: Andi Kleen Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200110151537.153012-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c3314a74f86dc00827e0945c8e5039fc3aebaa3c Author: Jin Yao Date: Wed Jan 8 03:17:45 2020 +0800 perf report: Fix no libunwind compiled warning break s390 issue Commit 800d3f561659 ("perf report: Add warning when libunwind not compiled in") breaks the s390 platform. S390 uses libdw-dwarf-unwind for call chain unwinding and had no support for libunwind. So the warning "Please install libunwind development packages during the perf build." caused the confusion even if the call-graph is displayed correctly. This patch adds checking for HAVE_DWARF_SUPPORT, which is set when libdw-dwarf-unwind is compiled in. Fixes: 800d3f561659 ("perf report: Add warning when libunwind not compiled in") Signed-off-by: Jin Yao Reviewed-by: Thomas Richter Tested-by: Thomas Richter Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200107191745.18415-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 3b0b16bf8cb92ae67968c1abb7b335032b899b33 Author: Andi Kleen Date: Tue Jan 7 13:04:44 2020 -0800 perf tools: Support --prefix/--prefix-strip The objdump utility has useful --prefix / --prefix-strip options to allow changing source code file names hardcoded into executables' debug info. Add options to 'perf report', 'perf top' and 'perf annotate', which are then passed to objdump. $ mkdir foo $ echo 'main() { for (;;); }' > foo/foo.c $ gcc -g foo/foo.c foo/foo.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | main() { for (;;); } | ^~~~ $ perf record ./a.out ^C[ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.230 MB perf.data (5721 samples) ] $ mv foo bar $ perf annotate $ perf annotate --prefix=/home/ak/lsrc/git/bar --prefix-strip=5 Signed-off-by: Andi Kleen Tested-by: Jiri Olsa LPU-Reference: 20200107210444.214071-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit aa9d1f8334dfe220aff58c6bb4daf1fdae81add6 Author: Andi Kleen Date: Fri Jan 3 10:36:43 2020 -0800 perf report: Clarify in help that --children is default Refer to --no-children, which is what most people probably want. Signed-off-by: Andi Kleen Cc: Jiri Olsa LPU-Reference: 20200103183643.149150-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo commit d8007772a5541b4711d1286b788ad4295b2c7eaa Author: Maciej S. Szmigiero Date: Sat Dec 28 18:13:13 2019 +0100 tools build: Fix test-clang.cpp with Clang 8+ LLVM rL344140 (included in Clang 8+) moved VFS from Clang to LLVM, so paths to its include files have changed. This broke the Clang test in tools/build - let's fix it. Signed-off-by: Maciej S. Szmigiero Cc: Alexander Shishkin Cc: Denis Pronin Cc: Dennis Schridde Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Naohiro Aota Cc: Peter Zijlstra Cc: clang-built-linux@googlegroups.com Link: http://lore.kernel.org/lkml/20191228171314.946469-1-mail@maciej.szmigiero.name Signed-off-by: Arnaldo Carvalho de Melo commit 411c0ec0b8131457cf52812de29f11dcbf491ce6 Author: Maciej S. Szmigiero Date: Sat Dec 28 18:13:14 2019 +0100 perf clang: Fix build with Clang 9 LLVM D59377 (included in Clang 9) refactored Clang VFS construction a bit, which broke perf clang build. Let's fix it. Signed-off-by: Maciej S. Szmigiero Reviewed-by: Dennis Schridde Cc: Alexander Shishkin Cc: clang-built-linux@googlegroups.com Cc: Denis Pronin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Naohiro Aota Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191228171314.946469-2-mail@maciej.szmigiero.name Signed-off-by: Arnaldo Carvalho de Melo commit 0095ab42056c2b4267b957da96f9517cb0c155ea Author: Lukas Wunner Date: Thu Jan 9 13:59:21 2020 +0100 vt: Correct comment documenting do_take_over_console() Commit 3e795de7631b ("[PATCH] VT binding: Add binding/unbinding support for the VT console") introduced a code comment claiming that "do_take_over_console is basically a register followed by unbind". However the function actually performs a register followed by *bind*. Signed-off-by: Lukas Wunner Cc: Antonino A. Daplas Link: https://lore.kernel.org/r/a500f005ba7013ca8165a6d42f59b2183d56114f.1578574427.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman commit c96e62c9816df8f12a79cec9ca7d5e18fe572341 Author: Lukas Wunner Date: Thu Jan 9 13:56:26 2020 +0100 vt: Delete comment referencing non-existent unbind_con_driver() Commit c1f5e38a5d35 ("vt: delete unneeded function unbind_con_driver") removed unbind_con_driver() but retained a comment referencing the function. Delete it. Signed-off-by: Lukas Wunner Cc: Wang YanQing Link: https://lore.kernel.org/r/4d77a67d77a1c699e9a6cc3e73044c31c02d60b5.1578574427.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman commit 704a940d551c9946bce3fdd661e00a6370c40522 Author: Colin Ian King Date: Fri Dec 20 22:05:26 2019 +0000 thunderbolt: fix memory leak of object sw In the case where the call tb_switch_exceeds_max_depth is true the error reurn path leaks memory in sw. Fix this by setting the return error code to -EADDRNOTAVAIL and returning via the error exit path err_free_sw_ports to free sw. sw has been kzalloc'd so the free of the NULL sw->ports is fine. Addresses-Coverity: ("Resource leak") Fixes: b04079837b20 ("thunderbolt: Add initial support for USB4") Signed-off-by: Colin Ian King Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20191220220526.11307-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit e2f9d739b2877ddd43bb3132f837c80ed5430e39 Author: Xu Wang Date: Tue Jan 7 10:00:35 2020 +0000 mic: Remove unneeded NULL check debugfs_remove_recursive will do NULL check, so remove the redundant null check. Signed-off-by: Xu Wang Reviewed-by: Ashutosh Dixit Link: https://lore.kernel.org/r/1578391235-603-1-git-send-email-vulab@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit caf82f727e69b647f09d57a1fc56e69d22a5f483 Author: Arnd Bergmann Date: Tue Jan 7 21:29:40 2020 +0100 visorbus: fix uninitialized variable access The setup_crash_devices_work_queue function only partially initializes the message it sends to chipset_init, leading to undefined behavior: drivers/visorbus/visorchipset.c: In function 'setup_crash_devices_work_queue': drivers/visorbus/visorchipset.c:333:6: error: '((unsigned char*)&msg.hdr.flags)[0]' is used uninitialized in this function [-Werror=uninitialized] if (inmsg->hdr.flags.response_expected) Set up the entire structure, zero-initializing the 'response_expected' flag. This was apparently found by the patch that added the -O3 build option in Kconfig. Fixes: 12e364b9f08a ("staging: visorchipset driver to provide registration and other services") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200107202950.782951-1-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit fec6388946ee05508543f0e3e5d34f436384548f Author: Arvind Sankar Date: Wed Dec 18 16:45:06 2019 -0500 arch/xtensa/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-25-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 2f1e1d8ba44458bdc673ac01d04ba7300d9f9534 Author: Arvind Sankar Date: Wed Dec 18 16:45:05 2019 -0500 arch/x86/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-24-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 5ef438c854d326b662b79d8f84f1beb977529c38 Author: Arvind Sankar Date: Wed Dec 18 16:45:04 2019 -0500 arch/unicore32/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-23-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 2f01bfc1ecfba5381e788d59df10f05c542b494e Author: Arvind Sankar Date: Wed Dec 18 16:45:03 2019 -0500 arch/sparc/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-22-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 40b19e316294e8fd466c0328be607a042e7ec95b Author: Arvind Sankar Date: Wed Dec 18 16:45:02 2019 -0500 arch/sh/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-21-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit c5ff734cf65e5bf667569076f143389c2b1fba24 Author: Arvind Sankar Date: Wed Dec 18 16:45:01 2019 -0500 arch/s390/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-20-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 2680e04c187495e779abdfdd8ff8e1805fcc1d63 Author: Arvind Sankar Date: Wed Dec 18 16:45:00 2019 -0500 arch/riscv/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-19-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 4c82266d158d755d75b0e9dd75baac6e9a8d622f Author: Arvind Sankar Date: Wed Dec 18 16:44:59 2019 -0500 arch/powerpc/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-18-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 82292aaede74f072a4eff76c49d9f16cb66a64a4 Author: Arvind Sankar Date: Wed Dec 18 16:44:58 2019 -0500 arch/parisc/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-17-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit bd3b0677cb47e79c7db2f1439b20888e84ec317d Author: Arvind Sankar Date: Wed Dec 18 16:44:57 2019 -0500 arch/openrisc/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-16-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 701250223c67bfdc0252961d6536f51bc28c2f81 Author: Arvind Sankar Date: Wed Dec 18 16:44:56 2019 -0500 arch/nios2/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-15-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 4b15a5b2053aa01e6be7389c73a9807726c0a939 Author: Arvind Sankar Date: Wed Dec 18 16:44:55 2019 -0500 arch/nds32/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-14-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 3229af4f3ef4db439471d21df562532365005bd5 Author: Arvind Sankar Date: Wed Dec 18 16:44:54 2019 -0500 arch/mips/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-13-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 4946d6cc01d82f41ef8502007958db4eee24952c Author: Arvind Sankar Date: Wed Dec 18 16:44:53 2019 -0500 arch/microblaze/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-12-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 143c2ce261250adf86a3c1f4f5acaf5ba35ea07d Author: Arvind Sankar Date: Wed Dec 18 16:44:52 2019 -0500 arch/m68k/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-11-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 6b448f12a221d172dbe0a4793f8bed302079c874 Author: Arvind Sankar Date: Wed Dec 18 16:44:51 2019 -0500 arch/ia64/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-10-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit fb3e7a622003f1e7c4440650c21f938bf9beb976 Author: Arvind Sankar Date: Wed Dec 18 16:44:50 2019 -0500 arch/csky/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-9-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 46cbe2f39976197a11da2abf27883530f3d0ddc2 Author: Arvind Sankar Date: Wed Dec 18 16:44:48 2019 -0500 arch/arm64/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-7-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 3e70ac06913ba5a3c613affb7c8df9fd6b4b24f9 Author: Arvind Sankar Date: Wed Dec 18 16:44:47 2019 -0500 arch/arm/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-6-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 61f23e657cd6cb42ae8d25351cd995afa562afdc Author: Arvind Sankar Date: Wed Dec 18 16:44:46 2019 -0500 arch/arc/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-5-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 9ef497dcbc2be18845a1b3151efdca72697eeaad Author: Arvind Sankar Date: Wed Dec 18 16:44:45 2019 -0500 arch/alpha/setup: Drop dummy_con initialization con_init in tty/vt.c will now set conswitchp to dummy_con if it's unset. Drop it from arch setup code. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-4-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 805ece2a58085c33c0c087be049b77e94c12080a Author: Arvind Sankar Date: Wed Dec 18 16:44:44 2019 -0500 vt: Initialize conswitchp to dummy_con if unset If the arch setup code hasn't initialized conswitchp yet, set it to dummy_con in con_init. This will allow us to drop the dummy_con initialization that's done in almost every architecture. Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-3-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit e018bc28b031348ff763b89b48b3b96f1f0e466b Author: Arvind Sankar Date: Wed Dec 18 16:44:43 2019 -0500 console/dummycon: Remove bogus depends on from DUMMY_CONSOLE Since commit [1] consolidated console configuration in drivers/video/console, DUMMY_CONSOLE has always been enabled, since the dependency is always satisfied. There is no point in trying to allow it to be configured out, since (a) it's tiny, and (b) if VT_CONSOLE is enabled, we must have a working console driver by the time con_init(vt.c) runs, and only dummycon is guaranteed to work (vgacon may be configured in, but that doesn't mean we have a VGA device). So just remove the fake dependency. [1] https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit?id=31d2a7d36d6989c714b792ec00358ada24c039e7 Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20191218214506.49252-2-nivedita@alum.mit.edu Signed-off-by: Greg Kroah-Hartman commit 34bc4f468a9fab1e8c85f05117a0d46adec2c200 Author: Oscar Ravadilla Date: Wed Jan 8 13:16:48 2020 +1300 uio: uio_pdrv_genirq: Do not log an error when deferring probe routine. When deferring the probe routine just return without displaying an error. Signed-off-by: Oscar Ravadilla Link: https://lore.kernel.org/r/20200108001648.2949-1-oscar.ravadilla@alliedtelesis.co.nz Signed-off-by: Greg Kroah-Hartman commit b74351287d4bd90636c3f48bc188c2f53824c2d4 Author: Jia-Ju Bai Date: Wed Dec 18 17:44:05 2019 +0800 uio: fix a sleep-in-atomic-context bug in uio_dmem_genirq_irqcontrol() The driver may sleep while holding a spinlock. The function call path (from bottom to top) in Linux 4.19 is: kernel/irq/manage.c, 523: synchronize_irq in disable_irq drivers/uio/uio_dmem_genirq.c, 140: disable_irq in uio_dmem_genirq_irqcontrol drivers/uio/uio_dmem_genirq.c, 134: _raw_spin_lock_irqsave in uio_dmem_genirq_irqcontrol synchronize_irq() can sleep at runtime. To fix this bug, disable_irq() is called without holding the spinlock. This bug is found by a static analysis tool STCheck written by myself. Signed-off-by: Jia-Ju Bai Link: https://lore.kernel.org/r/20191218094405.6009-1-baijiaju1990@gmail.com Signed-off-by: Greg Kroah-Hartman commit fa4e7fc1386078edcfddd8848cb0374f4af74fe7 Author: Luc Van Oostenryck Date: Mon Dec 9 22:36:55 2019 +0100 misc: xilinx_sdfec: fix xsdfec_poll()'s return type xsdfec_poll() is defined as returning 'unsigned int' but the .poll method is declared as returning '__poll_t', a bitwise type. Fix this by using the proper return type and using the EPOLL constants instead of the POLL ones, as required for __poll_t. CC: Derek Kiernan CC: Dragan Cvetic Signed-off-by: Luc Van Oostenryck Acked-by: Dragan Cvetic Link: https://lore.kernel.org/r/20191209213655.57985-1-luc.vanoostenryck@gmail.com Signed-off-by: Greg Kroah-Hartman commit a6b07e89fd8530b943217ccd4909d1bf65acc45d Author: Luc Van Oostenryck Date: Mon Dec 9 22:37:19 2019 +0100 misc: xilinx_sdfec: add missing __user annotation The second arg of xsdfec_set_order() is a 'void __user *' and this pointer is then used in get_user() which expect a __user pointer. But get_user() can't be used with a void pointer, it a pointer to the effective type. This is done here by casting the argument to a pointer to the effective type but the __user is missing in the cast. Fix this by adding the missing __user in the cast. CC: Derek Kiernan CC: Dragan Cvetic Signed-off-by: Luc Van Oostenryck Acked-by: Dragan Cvetic Link: https://lore.kernel.org/r/20191209213719.58037-1-luc.vanoostenryck@gmail.com Signed-off-by: Greg Kroah-Hartman commit b0bd9ae346f06e1725c3aa29cfb37c81231ffd82 Author: Colin Ian King Date: Mon Jan 13 12:31:49 2020 +0000 drivers/misc: ti-st: remove redundant assignment to variables i and flags The variables i and flags are being initialized with values that are never read. The initializations are redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200113123149.187555-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit f896ee51b93e192fa38a62d8cef8c5e9bd4adf68 Author: Colin Ian King Date: Tue Jan 7 17:52:34 2020 +0000 misc: tsl2550: remove redundant initialization to variable r The variable r is being initialized with a value that is never read and it is being updated later with a new value. Remove the redundant initialization and move the declaration into a deeper code block. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200107175234.121298-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit b5a0d4bf2ee80e47629df0d7d8f4a7952ca39941 Author: Colin Ian King Date: Sun Dec 22 22:22:24 2019 +0000 misc: pti: remove redundant assignments to retval The variable retval is assigned with a value that is never read and it is re-assigned a new value later on. The assignment is redundant and can be removed. Clean up multiple occurrances of this pattern. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191222222224.732340-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 444972b2b268c3272d39105bdc8d1266177f5d42 Author: Rhys Perry Date: Sun Dec 29 17:18:24 2019 +0000 misc: alcor_pci: Add AU6625 to list of supported PCI_IDs I have added the AU6625 PCI_ID to the list of supported IDs: alcor_pci.c // Added au6625s ID to the array of supported devices alcor_pci.h // Added entry to define the PCI ID Made it fit in with the already submitted code: alcor_pci.c // Added config entry to that matches the one for au6601 >From general usage there seems to be no problems. Signed-off-by: Rhys Perry Link: https://lore.kernel.org/r/20191229171824.10308-1-rhysperry111@gmail.com Signed-off-by: Greg Kroah-Hartman commit e10e02464396e1a322338d43c5a931ebda1544ea Author: Julia Lawall Date: Sun Dec 29 16:42:55 2019 +0100 misc: cxl: use mmgrab Mmgrab was introduced in commit f1f1007644ff ("mm: add new mmgrab() helper") and most of the kernel was updated to use it. Update a remaining file. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) @@ expression e; @@ - atomic_inc(&e->mm_count); + mmgrab(e); Signed-off-by: Julia Lawall Acked-by: Andrew Donnellan Link: https://lore.kernel.org/r/1577634178-22530-2-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Greg Kroah-Hartman commit 191941692a3d1b6a9614502b279be062926b70f5 Author: zhenwei pi Date: Thu Jan 2 10:35:13 2020 +0800 misc: pvpanic: add crash loaded event Some users prefer kdump tools to generate guest kernel dumpfile, at the same time, need a out-of-band kernel panic event. Currently if booting guest kernel with 'crash_kexec_post_notifiers', QEMU will receive PVPANIC_PANICKED event and stop VM. If booting guest kernel without 'crash_kexec_post_notifiers', guest will not call notifier chain. Add PVPANIC_CRASH_LOADED bit for pvpanic event, it means that guest kernel actually hit a kernel panic, but the guest kernel wants to handle by itself. Signed-off-by: zhenwei pi Link: https://lore.kernel.org/r/20200102023513.318836-3-pizhenwei@bytedance.com Signed-off-by: Greg Kroah-Hartman commit e0b9a42735f2672ca2764cfbea6e55a81098d5ba Author: zhenwei pi Date: Thu Jan 2 10:35:12 2020 +0800 misc: pvpanic: move bit definition to uapi header file Some processes outside of the kernel(Ex, QEMU) should know what the value really is for, so move the bit definition to a uapi file. Suggested-by: Greg KH Signed-off-by: zhenwei pi Link: https://lore.kernel.org/r/20200102023513.318836-2-pizhenwei@bytedance.com Signed-off-by: Greg Kroah-Hartman commit 523752d8da38bed6ac8ecf674c96ebcbe7536122 Author: Claudiu Beznea Date: Fri Jan 10 18:18:03 2020 +0200 dt-bindings: atmel-gpbr: add microchip,sam9x60-gpbr Add microchip,sam9x60-gpbr to DT bindings documentation. Signed-off-by: Claudiu Beznea Acked-by: Rob Herring Link: https://lore.kernel.org/r/1578673089-3484-12-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit e517d6d949a23a8738bcf4a62c81d7c0b44c5a4a Author: Claudiu Beznea Date: Fri Jan 10 18:18:02 2020 +0200 dt-bindings: atmel-smc: add microchip,sam9x60-smc Add microchip,sam9x60-smc to DT bindings documentation. Signed-off-by: Claudiu Beznea Acked-by: Rob Herring Link: https://lore.kernel.org/r/1578673089-3484-11-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit ac9168dfbafd930cdc1a3496b2808843a3f5fcd7 Author: Claudiu Beznea Date: Fri Jan 10 18:18:01 2020 +0200 dt-bindings: atmel-sysreg: add microchip,sam9x60-ddramc Add microchip,sam9x60-ddramc to DT bindings documentation. Signed-off-by: Claudiu Beznea Acked-by: Rob Herring Link: https://lore.kernel.org/r/1578673089-3484-10-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit 7402b7fa4860b1a65394be4c9c5d119884215484 Author: Claudiu Beznea Date: Fri Jan 10 18:18:00 2020 +0200 dt-bindings: atmel-nand: add microchip,sam9x60-pmecc Add microchip,sam9x60-pmecc to DT bindings documentation. Signed-off-by: Claudiu Beznea Reviewed-by: Miquel Raynal Acked-by: Rob Herring Link: https://lore.kernel.org/r/1578673089-3484-9-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit 00b9a43be06696292bc3806445ef693e0ce8dad7 Author: Claudiu Beznea Date: Fri Jan 10 18:17:59 2020 +0200 dt-bindings: atmel-matrix: add microchip,sam9x60-matrix Add microchip,sam9x60-matrix to DT bindings documentation. Signed-off-by: Claudiu Beznea Acked-by: Rob Herring Link: https://lore.kernel.org/r/1578673089-3484-8-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit 7c7acbc34d64969b950fb721edc792913ed556bc Author: Claudiu Beznea Date: Fri Jan 10 18:17:58 2020 +0200 dt-bindings: at91-sama5d2_adc: add microchip,sam9x60-adc Add microchip,sam9x60-adc to DT bindings documentation. Signed-off-by: Claudiu Beznea Acked-by: Jonathan Cameron Acked-by: Rob Herring Link: https://lore.kernel.org/r/1578673089-3484-7-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit 08c2da3da2b01b35438994310371dbfff6a4d008 Author: Claudiu Beznea Date: Fri Jan 10 18:17:57 2020 +0200 dt-bindings: atmel-isi: add microchip,sam9x60-isi Add microchip,sam9x60-isi to DT bindings documentation. Signed-off-by: Claudiu Beznea Acked-by: Rob Herring Acked-by: Hans Verkuil Link: https://lore.kernel.org/r/1578673089-3484-6-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit 4d6168314d4c504c240087ac22d1acc01dad3299 Author: Rui Feng Date: Wed Nov 20 09:40:06 2019 +0800 misc: rtsx: Fix impossible condition A u8 can only go up to 255, condition n > 396 is impossible, so change u8 to u16. Signed-off-by: Rui Feng Link: https://lore.kernel.org/r/1574214006-13540-1-git-send-email-rui_feng@realsil.com.cn Signed-off-by: Greg Kroah-Hartman commit efb5bea6b88dafdda00aff7c30b2193933114cf2 Author: Chuhong Yuan Date: Mon Nov 18 16:09:31 2019 +0800 misc: isl29020: add missed pm_runtime_disable The driver forgets to call pm_runtime_disable in remove. Add the missed call to fix it. Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191118080931.30749-1-hslester96@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8edf4cd193067ac5e03fd9580f1affbb6a3f729b Author: Hongbo Yao Date: Thu Dec 5 19:16:55 2019 +0800 misc: genwqe: fix compile warnings Using the following command will get compile warnings: make W=1 drivers/misc/genwqe/card_ddcb.o ARCH=x86_64 drivers/misc/genwqe/card_ddcb.c: In function setup_ddcb_queue: drivers/misc/genwqe/card_ddcb.c:1024:6: warning: variable rc set but not used [-Wunused-but-set-variable] drivers/misc/genwqe/card_ddcb.c: In function genwqe_card_thread: drivers/misc/genwqe/card_ddcb.c:1190:23: warning: variable rc set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: Hongbo Yao Link: https://lore.kernel.org/r/20191205111655.170382-1-yaohongbo@huawei.com Signed-off-by: Greg Kroah-Hartman commit cff081ea9d0962defd733daf6778f62b1dac3daa Author: Ioana Ciornei Date: Wed Dec 4 16:29:50 2019 +0200 bus: fsl-mc: properly empty-initialize structure Use the proper form of the empty initializer when working with structures that contain an array. Otherwise, older gcc versions (eg gcc 4.9) will complain about this. Fixes: 1ac210d128ef ("bus: fsl-mc: add the fsl_mc_get_endpoint function") Reported-by: kbuild test robot Signed-off-by: Ioana Ciornei Acked-by: Laurentiu Tudor Link: https://lore.kernel.org/r/20191204142950.30206-1-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit c576eddf1ce820568da973d8a383073443355fe7 Author: Tianlin Li Date: Tue Dec 17 13:45:28 2019 -0600 drivers/misc: sram-exec: have the callers of set_memory_*() check the return value Right now several architectures allow their set_memory_*() family of functions to fail, but callers may not be checking the return values. If set_memory_*() returns with an error, call-site assumptions may be infact wrong to assume that it would either succeed or not succeed at all. Ideally, the failure of set_memory_*() should be passed up the call stack, and callers should examine the failure and deal with it. Need to fix the callers and add the __must_check attribute. They also may not provide any level of atomicity, in the sense that the memory protections may be left incomplete on failure. This issue likely has a few steps on effects architectures: 1) Have all callers of set_memory_*() helpers check the return value. 2) Add __must_check to all set_memory_*() helpers so that new uses do not ignore the return value. 3) Add atomicity to the calls so that the memory protections aren't left in a partial state. This series is part of step 1. Make sram driver check the return value of set_memory_*(). Signed-off-by: Tianlin Li Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20191217194528.16461-1-tli@digitalocean.com Signed-off-by: Greg Kroah-Hartman commit cdb9c044f92b78557e5e535819a932caeff81668 Author: Michael Straube Date: Tue Jan 14 14:44:22 2020 +0100 staging: rtl8188eu: cleanup whitespace in rtl8188e_dm.c Replace tabs with spaces and/or remove spaces to use typical kernel horizontal whitespace. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200114134422.13598-5-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8c26f783d786423a4683ef4c19bef411b13c4d39 Author: Michael Straube Date: Tue Jan 14 14:44:21 2020 +0100 staging: rtl8188eu: remove unnecessary parentheses in rtl8188e_dm.c Remove unnecessary parentheses reported by checkpatch. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200114134422.13598-4-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit c085fed4cbb522a8859c10a3d04e293793cf7935 Author: Michael Straube Date: Tue Jan 14 14:44:20 2020 +0100 staging: rtl8188eu: cleanup long lines in rtl8188e_dm.c Cleanup lines over 80 characters in rtl8188e_dm.c by adding appropriate line breaks. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200114134422.13598-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit cdc7fa32325ce6f834c46bd7e710418655af58c6 Author: Michael Straube Date: Tue Jan 14 14:44:19 2020 +0100 staging: rtl8188eu: convert rtw_hal_antdiv_before_linked() to bool Function rtw_hal_antdiv_before_linked() returns boolean values, so change the return type from u8 to bool. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200114134422.13598-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit c0a6bf0f1ae33eddd36e8201ef132c1abc4c19bf Author: Michael Straube Date: Tue Jan 14 14:44:18 2020 +0100 staging: rtl8188eu: refactor rtw_hal_antdiv_before_linked() Refactor rtw_hal_antdiv_before_linked() to clear checkpatch warnings. WARNING: line over 80 characters WARNING: else is not generally useful after a break or return Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200114134422.13598-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 98ab51df76bf4a317a0116d6c940fa08c6f12322 Author: Michael Straube Date: Fri Jan 10 22:04:56 2020 +0100 staging: rtl8723bs: remove ODM_GetRightChnlPlaceforIQK() Function ODM_GetRightChnlPlaceforIQK() returns non-zero values only for channels > 14. According to the TODO code valid only for 5 GHz should be removed. - find and remove remaining code valid only for 5 GHz. Most of the obvious ones have been removed, but things like channel > 14 still exist. Remove ODM_GetRightChnlPlaceforIQK() and replace the uses of the return value with zero. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200110210456.13178-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit d85cad420a21e28016248ef9939d20c1264246eb Author: Pragat Pandya Date: Sat Jan 11 19:52:33 2020 +0530 staging: exfat: Fix alignment warnings Fix checkpatch warning "Alignment should match open parenthesis". Signed-off-by: Pragat Pandya Link: https://lore.kernel.org/r/20200111142233.11354-1-pragat.pandya@gmail.com Signed-off-by: Greg Kroah-Hartman commit f3c69559b56da786a722aaa3cfe8b317de9f9d61 Author: Michael Straube Date: Mon Jan 13 22:29:39 2020 +0100 staging: rtl8188eu: remove unused parameters from rtw_check_network_type Parameters 'ratelen' and 'channel' of function rtw_check_network_type are unused, remove them. Reduces object file size by 62 bytes. text data bss dec hex filename 398525 12896 4688 416109 6596d drivers/staging/rtl8188eu/r8188eu.o 398463 12896 4688 416047 6592f drivers/staging/rtl8188eu/r8188eu.o Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200113212939.9738-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5e6d8401ade984296ae9629cb06458c2784e1882 Author: Rocky Liao Date: Mon Jan 13 12:30:20 2020 +0800 Bluetooth: hci_qca: Add qca_power_on() API to support both wcn399x and Rome power up This patch adds a unified API qca_power_on() to support both wcn399x and Rome power on. For wcn399x it calls the qca_wcn3990_init() to init the regulators, and for Rome it pulls up the bt_en GPIO to power up the btsoc. It also moves all the power up operation from hdev->open() to hdev->setup(). Signed-off-by: Rocky Liao Reviewed-by: Matthias Kaehlcke Signed-off-by: Marcel Holtmann commit 446e76873b5e4e70bdee5db2f2a894d5b4a7d081 Author: Nathan Chancellor Date: Tue Dec 17 19:39:13 2019 -0700 tty: synclink_gt: Adjust indentation in several functions Clang warns: ../drivers/tty/synclink_gt.c:1337:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] if (C_CRTSCTS(tty)) { ^ ../drivers/tty/synclink_gt.c:1335:2: note: previous statement is here if (I_IXOFF(tty)) ^ ../drivers/tty/synclink_gt.c:2563:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] if (I_BRKINT(info->port.tty) || I_PARMRK(info->port.tty)) ^ ../drivers/tty/synclink_gt.c:2561:2: note: previous statement is here if (I_INPCK(info->port.tty)) ^ ../drivers/tty/synclink_gt.c:3221:3: warning: misleading indentation; statement is not part of the previous 'else' [-Wmisleading-indentation] set_signals(info); ^ ../drivers/tty/synclink_gt.c:3219:2: note: previous statement is here else ^ 3 warnings generated. The indentation on these lines is not at all consistent, tabs and spaces are mixed together. Convert to just using tabs to be consistent with the Linux kernel coding style and eliminate these warnings from clang. Link: https://github.com/ClangBuiltLinux/linux/issues/822 Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20191218023912.13827-1-natechancellor@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1feedf61e7265128244f6993f23421f33dd93dbc Author: Nathan Chancellor Date: Tue Dec 17 19:47:20 2019 -0700 tty: synclinkmp: Adjust indentation in several functions Clang warns: ../drivers/tty/synclinkmp.c:1456:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] if (C_CRTSCTS(tty)) { ^ ../drivers/tty/synclinkmp.c:1453:2: note: previous statement is here if (I_IXOFF(tty)) ^ ../drivers/tty/synclinkmp.c:2473:8: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] info->port.tty->hw_stopped = 0; ^ ../drivers/tty/synclinkmp.c:2471:7: note: previous statement is here if ( debug_level >= DEBUG_LEVEL_ISR ) ^ ../drivers/tty/synclinkmp.c:2482:8: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] info->port.tty->hw_stopped = 1; ^ ../drivers/tty/synclinkmp.c:2480:7: note: previous statement is here if ( debug_level >= DEBUG_LEVEL_ISR ) ^ ../drivers/tty/synclinkmp.c:2809:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] if (I_BRKINT(info->port.tty) || I_PARMRK(info->port.tty)) ^ ../drivers/tty/synclinkmp.c:2807:2: note: previous statement is here if (I_INPCK(info->port.tty)) ^ ../drivers/tty/synclinkmp.c:3246:3: warning: misleading indentation; statement is not part of the previous 'else' [-Wmisleading-indentation] set_signals(info); ^ ../drivers/tty/synclinkmp.c:3244:2: note: previous statement is here else ^ 5 warnings generated. The indentation on these lines is not at all consistent, tabs and spaces are mixed together. Convert to just using tabs to be consistent with the Linux kernel coding style and eliminate these warnings from clang. Link: https://github.com/ClangBuiltLinux/linux/issues/823 Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20191218024720.3528-1-natechancellor@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9a655c77ff8fc65699a3f98e237db563b37c439b Author: Zhenzhong Duan Date: Mon Jan 13 11:48:42 2020 +0800 ttyprintk: fix a potential deadlock in interrupt context issue tpk_write()/tpk_close() could be interrupted when holding a mutex, then in timer handler tpk_write() may be called again trying to acquire same mutex, lead to deadlock. Google syzbot reported this issue with CONFIG_DEBUG_ATOMIC_SLEEP enabled: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:938 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 0, name: swapper/1 1 lock held by swapper/1/0: ... Call Trace: dump_stack+0x197/0x210 ___might_sleep.cold+0x1fb/0x23e __might_sleep+0x95/0x190 __mutex_lock+0xc5/0x13c0 mutex_lock_nested+0x16/0x20 tpk_write+0x5d/0x340 resync_tnc+0x1b6/0x320 call_timer_fn+0x1ac/0x780 run_timer_softirq+0x6c3/0x1790 __do_softirq+0x262/0x98c irq_exit+0x19b/0x1e0 smp_apic_timer_interrupt+0x1a3/0x610 apic_timer_interrupt+0xf/0x20 See link https://syzkaller.appspot.com/bug?extid=2eeef62ee31f9460ad65 for more details. Fix it by using spinlock in process context instead of mutex and having interrupt disabled in critical section. Reported-by: syzbot+2eeef62ee31f9460ad65@syzkaller.appspotmail.com Signed-off-by: Zhenzhong Duan Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20200113034842.435-1-zhenzhong.duan@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7771b893f093bd272b0d28fe6d69fc996d4efb9e Author: Laurentiu Tudor Date: Tue Jan 14 11:00:25 2020 +0000 MAINTAINERS: Add myself as maintainer of ehv_bytechan tty driver Michael Ellerman made a call for volunteers from NXP to maintain this driver and I offered myself. Signed-off-by: Laurentiu Tudor Acked-by: Timur Tabi Link: https://lore.kernel.org/r/20200114110012.17351-1-laurentiu.tudor@nxp.com Signed-off-by: Greg Kroah-Hartman commit 1d3c2ea44b1163269062c891d073f4764686028a Author: Maarten Brock Date: Mon Nov 25 18:45:31 2019 +0530 serial: xilinx_uartps: set_mctrl sets RTS and DTR set_mctrl now sets RTS and DTR. Signed-off-by: Maarten Brock Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/1574687731-21563-3-git-send-email-shubhrajyoti.datta@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6d8bf787a6ad04442307088e1a5352ee448cab45 Author: Maarten Brock Date: Mon Nov 25 18:45:30 2019 +0530 serial: xilinx_uartps: set_termios sets flowcontrol Let set_termios enable/disable automatic flow control. set_mctrl should not touch automatic flow control. Signed-off-by: Maarten Brock Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/1574687731-21563-2-git-send-email-shubhrajyoti.datta@gmail.com Signed-off-by: Greg Kroah-Hartman commit 422c6d3b09afb187b5aeedc3a99d759703023be0 Author: Maarten Brock Date: Mon Nov 25 18:45:29 2019 +0530 serial: xilinx_uartps: Let get_mctrl return status Some of the applications like microcom do not work if modem is disabled. To fix them we always return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR instead of 0 when using cts_override. Make get_mctrl return actual status when not using cts_override. Signed-off-by: Maarten Brock Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/1574687731-21563-1-git-send-email-shubhrajyoti.datta@gmail.com Signed-off-by: Greg Kroah-Hartman commit 67e977f32461f70c2b838d43107ff128f595485c Author: Zheng Bin Date: Mon Jan 13 10:16:17 2020 +0800 tty/serial: 8250_exar: use true,false for bool variable Fixes coccicheck warning: drivers/tty/serial/8250/8250_exar.c:189:6-17: WARNING: Assignment of 0/1 to bool variable drivers/tty/serial/8250/8250_exar.c:197:3-14: WARNING: Assignment of 0/1 to bool variable drivers/tty/serial/8250/8250_exar.c:199:3-14: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Zheng Bin Link: https://lore.kernel.org/r/1578881777-65475-5-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 36ce7cff4f93612928a485a0391696d263c1126e Author: Zheng Bin Date: Mon Jan 13 10:16:16 2020 +0800 tty/serial: atmel: use true,false for bool variable Fixes coccicheck warning: drivers/tty/serial/atmel_serial.c:1062:1-23: WARNING: Assignment of 0/1 to bool variable drivers/tty/serial/atmel_serial.c:1261:1-23: WARNING: Assignment of 0/1 to bool variable drivers/tty/serial/atmel_serial.c:1688:3-25: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Zheng Bin Link: https://lore.kernel.org/r/1578881777-65475-4-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit a4282b8670c57f6fe9a900b32b6eaaaa219dff08 Author: Zheng Bin Date: Mon Jan 13 10:16:15 2020 +0800 tty/serial: kgdb_nmi: use true,false for bool variable Fixes coccicheck warning: drivers/tty/serial/kgdb_nmi.c:121:6-13: WARNING: Assignment of 0/1 to bool variable drivers/tty/serial/kgdb_nmi.c:133:2-9: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Zheng Bin Link: https://lore.kernel.org/r/1578881777-65475-3-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit bf22182cb7518450b518950d311b98711eb0d9bc Author: Zheng Bin Date: Mon Jan 13 10:16:14 2020 +0800 tty: synclink_gt: use true,false for bool variable Fixes coccicheck warning: drivers/tty/synclink_gt.c:2101:3-19: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Zheng Bin Link: https://lore.kernel.org/r/1578881777-65475-2-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 76460fbd845b2b55d6fdb651b9dac4ef8122038b Author: Loic Poulain Date: Fri Jan 10 09:58:04 2020 +0100 tty: serial: msm_serial: RX SW/FIFO mode fallback During db410c stress test and when the system is low on memory, the UART/console becomes unresponsive and never recover back. This has been narrowed down to the msm_start_rx_dma which does not manage error cases correctly (e.g. dma mapping failure), indeed, when an error happens, dma transfer is simply discarded and so never completed, leading to unconfigured RX path. This patch fixes this issue by switching to SW/FIFO mode in case of DMA issue. This mainly consists in resetting the receiver to apply RX BAM/DMA disabling change and re-enabling the RX level and stale interrupts (previously disabled for DMA transfers). The DMA will be re-enabled once memory is available since the SW/FIFO read function (msm_handle_rx_dm) retries to start dma on completion. Signed-off-by: Loic Poulain Link: https://lore.kernel.org/r/1578646684-17379-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Greg Kroah-Hartman commit dc56ecb81a0aa46a7e127e916df5c8fdb8364f0b Author: Josh Triplett Date: Fri Jan 10 18:25:13 2020 -0800 serial: 8250: Support disabling mdelay-filled probes of 16550A variants The 8250 driver can probe for many variants of the venerable 16550A serial port. Some of those probes involve long (20ms) mdelay calls, which delay system boot. Modern systems and virtual machines don't have those variants. Provide a Kconfig option to disable probes for 16550A variants. Disabling this speeds up the boot of a virtual machine with a serial console by more than 20ms (a substantial fraction of the ~100ms needed to boot a carefully configured VM). Before: [ +0.021919] 00:04: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A After: [ +0.000097] 00:04: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A Signed-off-by: Josh Triplett Link: https://lore.kernel.org/r/20200111022513.GA166267@localhost Signed-off-by: Greg Kroah-Hartman commit 5c116fdf561f0e0e549f10c97c3ddb843b3334a0 Author: Dmitry Osipenko Date: Sun Jan 12 21:09:19 2020 +0300 tty: serial: tegra: Optimize DMA buffer synchronization Synchronize only the dirty part of DMA buffer in order to avoid unnecessary overhead of syncing of the clean part, which is the case of every serial DMA transfer in practice. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200112180919.5194-3-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit d5e3fadb70125c6c41f692cf1c0e626c12e11de1 Author: Dmitry Osipenko Date: Sun Jan 12 21:09:18 2020 +0300 tty: serial: tegra: Activate RX DMA transfer by request This allows DMA engine to go into runtime-suspended mode whenever there is no data to receive, instead of keeping DMA active all the time while TTY is opened (i.e. permanently active in practice, like in the case of UART Bluetooth). Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200112180919.5194-2-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit f72c5835509109715a8d8f0d98fddef089b3a4d8 Author: Axel Lin Date: Tue Jan 14 14:58:47 2020 +0800 regulator: vqmmc-ipq4019: Trivial clean up A few trivial clean up: * Make ipq4019_regulator_voltage_ops and vmmc_regulator const * Make ipq4019_vmmcq_regmap_config static * Use regulator_map_voltage_ascend Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20200114065847.31667-2-axel.lin@ingics.com Signed-off-by: Mark Brown commit d47e4f978f2a2c0ffce543e58d30a00d1f850727 Author: Axel Lin Date: Tue Jan 14 14:58:46 2020 +0800 regulator: vqmmc-ipq4019: Remove ipq4019_regulator_remove This driver is using devm_regulator_register() so no need to call regulator_unregister() in ipq4019_regulator_remove(). Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20200114065847.31667-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 7efe3470f99ee5d542dc1faea57e24131146fad9 Author: Mark Brown Date: Tue Jan 14 12:35:18 2020 +0000 regulator: bindings: Drop document bindings for mpq7920 This reverts commit f5fa59a61eca "regulator: bindings: add document bindings for mpq7920" as Rob has a number of problems with the use of DT schema. Signed-off-by: Mark Brown commit fd2bc8aa19b9f27920546af1d83147c2ab2eefb3 Author: Mark Brown Date: Tue Jan 14 12:02:14 2020 +0000 dt-bindings: Drop entry for Monolithic Power System, MPS This reverts commit 9399e5dc6b679994 adding the entry, Rob has rescinded his ack. Signed-off-by: Mark Brown commit f2221a50494037af98206713155c8d4f2e7bccaa Author: Jani Nikula Date: Tue Jan 14 13:39:38 2020 +0200 drm/i915: Update DRIVER_DATE to 20200114 Signed-off-by: Jani Nikula commit a750c7474a5333a76e7278d353c460d26012deb6 Author: Andrei Vagin Date: Tue Nov 12 01:27:23 2019 +0000 selftests/timens: Check for right timens offsets after fork and exec Output on success: 1..1 ok 1 exec # Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0 Output on failure: 1..1 not ok 1 36016 16 Bail out! Output with lack of permissions: 1..1 not ok 1 # SKIP need to run as root Output without support of time namespaces: 1..1 not ok 1 # SKIP Time namespaces are not supported Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-35-dima@arista.com commit 1854b97e4fa6a476d5cdc3dc30c42e1528699f87 Author: Andrei Vagin Date: Tue Nov 12 01:27:22 2019 +0000 selftests/timens: Add a simple perf test for clock_gettime() Output on success: 1..4 ok 1 host: clock: monotonic cycles: 148323947 ok 2 host: clock: boottime cycles: 148577503 ok 3 ns: clock: monotonic cycles: 137659217 ok 4 ns: clock: boottime cycles: 137959154 # Pass 4 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0 Output with lack of permissions: 1..4 ok 1 host: clock: monotonic cycles: 145671139 ok 2 host: clock: boottime cycles: 146958357 not ok 3 # SKIP need to run as root Output without support of time namespaces: 1..4 ok 1 host: clock: monotonic cycles: 145671139 ok 2 host: clock: boottime cycles: 146958357 not ok 3 # SKIP Time namespaces are not supported Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-34-dima@arista.com commit d5b0117ddd4949e9ed882b6ef91316719826e8a8 Author: Andrei Vagin Date: Tue Nov 12 01:27:21 2019 +0000 selftests/timens: Add timer offsets test Check that timer_create() takes into account clock offsets. Output on success: 1..3 ok 1 clockid=7 ok 2 clockid=1 ok 3 clockid=9 # Pass 3 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0 Output with lack of permissions: 1..3 not ok 1 # SKIP need to run as root Output without support of time namespaces: 1..3 not ok 1 # SKIP Time namespaces are not supported Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-33-dima@arista.com commit 9d1f5a8c9dadad29f72e40a409239d7b71cf3037 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Tue Nov 12 01:27:20 2019 +0000 selftests/timens: Add procfs selftest Check that /proc/uptime is correct inside a new time namespace. Output on success: 1..1 ok 1 Passed for /proc/uptime # Pass 1 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0 Output with lack of permissions: 1..1 not ok 1 # SKIP need to run as root Output without support of time namespaces: 1..1 not ok 1 # SKIP Time namespaces are not supported Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-32-dima@arista.com commit 46e003433f8946283c3bfec1be854ca87b5ba402 Author: Andrei Vagin Date: Tue Nov 12 01:27:19 2019 +0000 selftests/timens: Add a test for clock_nanosleep() Check that clock_nanosleep() takes into account clock offsets. Output on success: 1..4 ok 1 clockid: 1 abs:0 ok 2 clockid: 1 abs:1 ok 3 clockid: 9 abs:0 ok 4 clockid: 9 abs:1 Output with lack of permissions: 1..4 not ok 1 # SKIP need to run as root Output without support of time namespaces: 1..4 not ok 1 # SKIP Time namespaces are not supported Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-31-dima@arista.com commit 11873de3ce4d2fe289d51932c03b3668cf519186 Author: Andrei Vagin Date: Tue Nov 12 01:27:18 2019 +0000 selftests/timens: Add a test for timerfd Check that timerfd_create() takes into account clock offsets. Output on success: 1..3 ok 1 clockid=7 ok 2 clockid=1 ok 3 clockid=9 # Pass 3 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0 Output on failure: 1..3 not ok 1 clockid: 7 elapsed: 0 not ok 2 clockid: 1 elapsed: 0 not ok 3 clockid: 9 elapsed: 0 Bail out! Output with lack of permissions: 1..3 not ok 1 # SKIP need to run as root Output without support of time namespaces: 1..3 not ok 1 # SKIP Time namespaces are not supported Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-30-dima@arista.com commit 61c57676035df29a0a61991f4389e884ba0b68d7 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Tue Nov 12 01:27:17 2019 +0000 selftests/timens: Add Time Namespace test for supported clocks A test to check that all supported clocks work on host and inside a new time namespace. Use both ways to get time: through VDSO and by entering the kernel with implicit syscall. Introduce a new timens directory in selftests framework for the next timens tests. Output on success: 1..10 ok 1 Passed for CLOCK_BOOTTIME (syscall) ok 2 Passed for CLOCK_BOOTTIME (vdso) ok 3 Passed for CLOCK_BOOTTIME_ALARM (syscall) ok 4 Passed for CLOCK_BOOTTIME_ALARM (vdso) ok 5 Passed for CLOCK_MONOTONIC (syscall) ok 6 Passed for CLOCK_MONOTONIC (vdso) ok 7 Passed for CLOCK_MONOTONIC_COARSE (syscall) ok 8 Passed for CLOCK_MONOTONIC_COARSE (vdso) ok 9 Passed for CLOCK_MONOTONIC_RAW (syscall) ok 10 Passed for CLOCK_MONOTONIC_RAW (vdso) # Pass 10 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0 Output with lack of permissions: 1..10 not ok 1 # SKIP need to run as root Output without support of time namespaces: 1..10 not ok 1 # SKIP Time namespaces are not supported Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-29-dima@arista.com commit 04a8682a71becdb639ec9c0d82b315a2baef7a5d Author: Andrei Vagin Date: Tue Nov 12 01:27:16 2019 +0000 fs/proc: Introduce /proc/pid/timens_offsets API to set time namespace offsets for children processes, i.e.: echo "$clockid $offset_sec $offset_nsec" > /proc/self/timens_offsets Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-28-dima@arista.com commit 70ddf65184ec1e8989322f35193e4fde7377f0cc Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Tue Nov 12 01:27:15 2019 +0000 x86/vdso: Zap vvar pages when switching to a time namespace The VVAR page layout depends on whether a task belongs to the root or non-root time namespace. Whenever a task changes its namespace, the VVAR page tables are cleared and then they will be re-faulted with a corresponding layout. Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-27-dima@arista.com commit e6b28ec65b6d433624a2c290073bc356c4fce914 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Tue Nov 12 01:27:14 2019 +0000 x86/vdso: On timens page fault prefault also VVAR page As timens page has offsets to data on VVAR page VVAR is going to be accessed shortly. Set it up with timens in one page fault as optimization. Suggested-by: Thomas Gleixner Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-26-dima@arista.com commit af34ebeb866fafc0a9a09dda51c52ccec007ace0 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Tue Nov 12 01:27:13 2019 +0000 x86/vdso: Handle faults on timens page If a task belongs to a time namespace then the VVAR page which contains the system wide VDSO data is replaced with a namespace specific page which has the same layout as the VVAR page. Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-25-dima@arista.com commit afaa7b5ac7c87479fb5a626f87d2157af30d6401 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Tue Nov 12 01:27:12 2019 +0000 time: Allocate per-timens vvar page VDSO support for Time namespace needs to set up a page with the same layout as VVAR. That timens page will be placed on position of VVAR page inside namespace. That page contains time namespace clock offsets and it has vdso_data->seq set to 1 to enforce the slow path and vdso_data->clock_mode set to VCLOCK_TIMENS to enforce the time namespace handling path. Allocate the timens page during namespace creation. Setup the offsets when the first task enters the ns and freeze them to guarantee the pace of monotonic/boottime clocks and to avoid breakage of applications. The design decision is to have a global offset_lock which is used during namespace offsets setup and to freeze offsets when the first task joins the new time namespace. That is better in terms of memory usage compared to having a per namespace mutex that's used only during the setup period. Suggested-by: Andy Lutomirski Based-on-work-by: Thomas Gleixner Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-24-dima@arista.com commit 550a77a74c87ecfdadc2214fef4b25ff125f65ab Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Tue Nov 12 01:27:11 2019 +0000 x86/vdso: Add time napespace page To support time namespaces in the VDSO with a minimal impact on regular non time namespace affected tasks, the namespace handling needs to be hidden in a slow path. The most obvious place is vdso_seq_begin(). If a task belongs to a time namespace then the VVAR page which contains the system wide VDSO data is replaced with a namespace specific page which has the same layout as the VVAR page. That page has vdso_data->seq set to 1 to enforce the slow path and vdso_data->clock_mode set to VCLOCK_TIMENS to enforce the time namespace handling path. The extra check in the case that vdso_data->seq is odd, e.g. a concurrent update of the VDSO data is in progress, is not really affecting regular tasks which are not part of a time namespace as the task is spin waiting for the update to finish and vdso_data->seq to become even again. If a time namespace task hits that code path, it invokes the corresponding time getter function which retrieves the real VVAR page, reads host time and then adds the offset for the requested clock which is stored in the special VVAR page. Allocate the time namespace page among VVAR pages and place vdso_data on it. Provide __arch_get_timens_vdso_data() helper for VDSO code to get the code-relative position of VVARs on that special page. Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-23-dima@arista.com commit 64b302ab66c5965702693e79690823ca120288b9 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Tue Nov 12 01:27:10 2019 +0000 x86/vdso: Provide vdso_data offset on vvar_page VDSO support for time namespaces needs to set up a page with the same layout as VVAR. That timens page will be placed on position of VVAR page inside namespace. That page has vdso_data->seq set to 1 to enforce the slow path and vdso_data->clock_mode set to VCLOCK_TIMENS to enforce the time namespace handling path. To prepare the time namespace page the kernel needs to know the vdso_data offset. Provide arch_get_vdso_data() helper for locating vdso_data on VVAR page. Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-22-dima@arista.com commit 660fd04f9317172ae90f414c68b18a26ae88a829 Author: Thomas Gleixner Date: Tue Nov 12 01:27:09 2019 +0000 lib/vdso: Prepare for time namespace support To support time namespaces in the vdso with a minimal impact on regular non time namespace affected tasks, the namespace handling needs to be hidden in a slow path. The most obvious place is vdso_seq_begin(). If a task belongs to a time namespace then the VVAR page which contains the system wide vdso data is replaced with a namespace specific page which has the same layout as the VVAR page. That page has vdso_data->seq set to 1 to enforce the slow path and vdso_data->clock_mode set to VCLOCK_TIMENS to enforce the time namespace handling path. The extra check in the case that vdso_data->seq is odd, e.g. a concurrent update of the vdso data is in progress, is not really affecting regular tasks which are not part of a time namespace as the task is spin waiting for the update to finish and vdso_data->seq to become even again. If a time namespace task hits that code path, it invokes the corresponding time getter function which retrieves the real VVAR page, reads host time and then adds the offset for the requested clock which is stored in the special VVAR page. If VDSO time namespace support is disabled the whole magic is compiled out. Initial testing shows that the disabled case is almost identical to the host case which does not take the slow timens path. With the special timens page installed the performance hit is constant time and in the range of 5-7%. For the vdso functions which are not using the sequence count an unconditional check for vdso_data->clock_mode is added which switches to the real vdso when the clock_mode is VCLOCK_TIMENS. [avagin: Make do_hres_timens() work with raw clocks too: choose vdso_data pointer by CS_RAW offset.] Suggested-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-21-dima@arista.com commit 6f74acfde20af1eb2178d0bd846bfd8f50b3be32 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Tue Nov 12 01:27:08 2019 +0000 x86/vdso: Restrict splitting VVAR VMA Forbid splitting VVAR VMA resulting in a stricter ABI and reducing the amount of corner-cases to consider while working further on VDSO time namespace support. As the offset from timens to VVAR page is computed compile-time, the pages in VVAR should stay together and not being partically mremap()'ed. Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-20-dima@arista.com commit 0efc8bb0bb5fdfd529a23073ee15478b5d5e3839 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Tue Nov 12 01:27:07 2019 +0000 fs/proc: Respect boottime inside time namespace for /proc/uptime Make sure that /proc/uptime is adjusted to the tasks time namespace. Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-19-dima@arista.com commit 1f9b37bfbb607a09d838c248843e63a2cafe1080 Author: Andrei Vagin Date: Tue Nov 12 01:27:06 2019 +0000 posix-timers: Make clock_nanosleep() time namespace aware clock_nanosleep() accepts absolute values of expiration time, if the TIMER_ABSTIME flag is set. This value is in the tasks time namespace, which has to be converted to the host time namespace. Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-18-dima@arista.com commit ea2d1f7fce0f18b67f915c00c6a7a6860116bc92 Author: Andrei Vagin Date: Tue Nov 12 01:27:05 2019 +0000 hrtimers: Prepare hrtimer_nanosleep() for time namespaces clock_nanosleep() accepts absolute values of expiration time when TIMER_ABSTIME flag is set. This absolute value is inside the task's time namespace, and has to be converted to the host's time. There is timens_ktime_to_host() helper for converting time, but it accepts ktime argument. As a preparation, make hrtimer_nanosleep() accept a clock value in ktime instead of timespec64. Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-17-dima@arista.com commit 0b9b9a3b162e85e620e3598f1badc45b8a177492 Author: Andrei Vagin Date: Tue Nov 12 01:27:04 2019 +0000 alarmtimer: Make nanosleep() time namespace aware clock_nanosleep() accepts absolute values of expiration time when the TIMER_ABSTIME flag is set. This absolute value is inside the task's time namespace and has to be converted to the host's time. Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-16-dima@arista.com commit 7da8b3a44bb426a43670b3a97ed61085018a9d43 Author: Andrei Vagin Date: Tue Nov 12 01:27:03 2019 +0000 posix-timers: Make timer_settime() time namespace aware Wire timer_settime() syscall into time namespace virtualization. sys_timer_settime() calls the ktime->timer_set() callback. Right now, common_timer_set() is the only implementation for the callback. The user-supplied expiry value is converted from timespec64 to ktime and then timens_ktime_to_host() can be used to convert namespace's time to the host time. Inside a time namespace kernel's time differs by a fixed offset from a user-supplied time, but only absolute values (TIMER_ABSTIME) must be converted. Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-15-dima@arista.com commit 6cd889d43c40b13f81a44c41896781ce70244769 Author: Andrei Vagin Date: Tue Nov 12 01:27:02 2019 +0000 timerfd: Make timerfd_settime() time namespace aware timerfd_settime() accepts an absolute value of the expiration time if TFD_TIMER_ABSTIME is specified. This value is in the task's time namespace and has to be converted to the host's time namespace. Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-14-dima@arista.com commit 89dd8eecfe961fab4924dcd14f80cf2ab2820044 Author: Andrei Vagin Date: Tue Nov 12 01:27:01 2019 +0000 time: Add do_timens_ktime_to_host() helper The helper subtracts namespace's clock offset from the given time and ensures that the result is within [0, KTIME_MAX]. Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-13-dima@arista.com commit 5a590f35add93c2bdf3ed83eee73111021679562 Author: Andrei Vagin Date: Tue Nov 12 01:27:00 2019 +0000 posix-clocks: Wire up clock_gettime() with timens offsets Adjust monotonic and boottime clocks with per-timens offsets. As the result a process inside time namespace will see timers and clocks corrected to offsets that were set when the namespace was created Note that applications usually go through vDSO to get time, which is not yet adjusted. Further changes will complete time namespace virtualisation with vDSO support. Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-12-dima@arista.com commit 198fa445d5c4c1a1c6c1d39f962559f8d008e79d Author: Andrei Vagin Date: Tue Nov 12 01:26:59 2019 +0000 posix-timers: Use clock_get_ktime() in common_timer_get() Now, when the clock_get_ktime() callback exists, the suboptimal timespec64-based conversion can be removed from common_timer_get(). Suggested-by: Thomas Gleixner Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-11-dima@arista.com commit 9c71a2e8a757bc6aee256bc97c6fb711144b0a0f Author: Andrei Vagin Date: Tue Nov 12 01:26:58 2019 +0000 posix-clocks: Introduce clock_get_ktime() callback The callsite in common_timer_get() has already a comment: /* * The timespec64 based conversion is suboptimal, but it's not * worth to implement yet another callback. */ kc->clock_get(timr->it_clock, &ts64); now = timespec64_to_ktime(ts64); The upcoming support for time namespaces requires to have access to: - The time in a task's time namespace for sys_clock_gettime() - The time in the root name space for common_timer_get() That adds a valid reason to finally implement a separate callback which returns the time in ktime_t format. Suggested-by: Thomas Gleixner Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-10-dima@arista.com commit 2f58bf909abf9670fa4e848b433dc12ba4c2a44e Author: Andrei Vagin Date: Tue Nov 12 01:26:57 2019 +0000 alarmtimer: Provide get_timespec() callback The upcoming support for time namespaces requires to have access to: - The time in a task's time namespace for sys_clock_gettime() - The time in the root name space for common_timer_get() Wire up alarm bases with get_timespec(). Suggested-by: Thomas Gleixner Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-9-dima@arista.com commit 41b3b8dffc1f84e581addfbc09bec0289db3315e Author: Andrei Vagin Date: Tue Nov 12 01:26:56 2019 +0000 alarmtimer: Rename gettime() callback to get_ktime() The upcoming support for time namespaces requires to have access to: - The time in a tasks time namespace for sys_clock_gettime() - The time in the root name space for common_timer_get() struct alarm_base needs to follow the same naming convention, so rename .gettime() callback into get_ktime() as a preparation for introducing get_timespec(). Suggested-by: Thomas Gleixner Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-8-dima@arista.com commit eaf80194d0fe48be393587541c48a799a9a06a70 Author: Andrei Vagin Date: Tue Nov 12 01:26:55 2019 +0000 posix-clocks: Rename .clock_get_timespec() callbacks accordingly The upcoming support for time namespaces requires to have access to: - The time in a task's time namespace for sys_clock_gettime() - The time in the root name space for common_timer_get() That adds a valid reason to finally implement a separate callback which returns the time in ktime_t format in (struct k_clock). As a preparation ground for introducing clock_get_ktime(), the original callback clock_get() was renamed into clock_get_timespec(). Reflect the renaming into the callback implementations. Suggested-by: Thomas Gleixner Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-7-dima@arista.com commit 819a95fe3adfc7b558bfd96dd5ac589c4f543fd4 Author: Andrei Vagin Date: Tue Nov 12 01:26:54 2019 +0000 posix-clocks: Rename the clock_get() callback to clock_get_timespec() The upcoming support for time namespaces requires to have access to: - The time in a task's time namespace for sys_clock_gettime() - The time in the root name space for common_timer_get() That adds a valid reason to finally implement a separate callback which returns the time in ktime_t format, rather than in (struct timespec). Rename the clock_get() callback to clock_get_timespec() as a preparation for introducing clock_get_ktime(). Suggested-by: Thomas Gleixner Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-6-dima@arista.com commit af993f58d69ee9c1f421dfc87c3ed231c113989c Author: Andrei Vagin Date: Tue Nov 12 01:26:53 2019 +0000 time: Add timens_offsets to be used for tasks in time namespace Introduce offsets for time namespace. They will contain an adjustment needed to convert clocks to/from host's. A new namespace is created with the same offsets as the time namespace of the current process. Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-5-dima@arista.com commit 769071ac9f20b6a447410c7eaa55d1a5233ef40c Author: Andrei Vagin Date: Tue Nov 12 01:26:52 2019 +0000 ns: Introduce Time Namespace Time Namespace isolates clock values. The kernel provides access to several clocks CLOCK_REALTIME, CLOCK_MONOTONIC, CLOCK_BOOTTIME, etc. CLOCK_REALTIME System-wide clock that measures real (i.e., wall-clock) time. CLOCK_MONOTONIC Clock that cannot be set and represents monotonic time since some unspecified starting point. CLOCK_BOOTTIME Identical to CLOCK_MONOTONIC, except it also includes any time that the system is suspended. For many users, the time namespace means the ability to changes date and time in a container (CLOCK_REALTIME). Providing per namespace notions of CLOCK_REALTIME would be complex with a massive overhead, but has a dubious value. But in the context of checkpoint/restore functionality, monotonic and boottime clocks become interesting. Both clocks are monotonic with unspecified starting points. These clocks are widely used to measure time slices and set timers. After restoring or migrating processes, it has to be guaranteed that they never go backward. In an ideal case, the behavior of these clocks should be the same as for a case when a whole system is suspended. All this means that it is required to set CLOCK_MONOTONIC and CLOCK_BOOTTIME clocks, which can be achieved by adding per-namespace offsets for clocks. A time namespace is similar to a pid namespace in the way how it is created: unshare(CLONE_NEWTIME) system call creates a new time namespace, but doesn't set it to the current process. Then all children of the process will be born in the new time namespace, or a process can use the setns() system call to join a namespace. This scheme allows setting clock offsets for a namespace, before any processes appear in it. All available clone flags have been used, so CLONE_NEWTIME uses the highest bit of CSIGNAL. It means that it can be used only with the unshare() and the clone3() system calls. [ tglx: Adjusted paragraph about clone3() to reality and massaged the changelog a bit. ] Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://criu.org/Time_namespace Link: https://lists.openvz.org/pipermail/criu/2018-June/041504.html Link: https://lore.kernel.org/r/20191112012724.250792-4-dima@arista.com commit c966533f8c6c45f93c52599f8460e7695f0b7eaa Author: Andrei Vagin Date: Tue Nov 12 01:26:51 2019 +0000 lib/vdso: Mark do_hres() and do_coarse() as __always_inline Performance numbers for Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (more clock_gettime() cycles - the better): clock | before | after | diff ---------------------------------------------------------- monotonic | 153222105 | 166775025 | 8.8% monotonic-coarse | 671557054 | 691513017 | 3.0% monotonic-raw | 147116067 | 161057395 | 9.5% boottime | 153446224 | 166962668 | 9.1% The improvement for arm64 for monotonic and boottime is around 3.5%. clock | before | after | diff ================================================== monotonic 17326692 17951770 3.6% monotonic-coarse 43624027 44215292 1.3% monotonic-raw 17541809 17554932 0.1% boottime 17334982 17954361 3.5% [ tglx: Avoid the goto ] Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191112012724.250792-3-dima@arista.com commit 0898a16a362d436464b34fa644d0d46efc81df92 Author: Andrei Vagin Date: Tue Nov 12 01:26:50 2019 +0000 lib/vdso: Add unlikely() hint into vdso_read_begin() Place the branch with no concurrent write before the contended case. Performance numbers for Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz (more clock_gettime() cycles - the better): | before | after ----------------------------------- | 150252214 | 153242367 | 150301112 | 153324800 | 150392773 | 153125401 | 150373957 | 153399355 | 150303157 | 153489417 | 150365237 | 153494270 ----------------------------------- avg | 150331408 | 153345935 diff % | 2 | 0 ----------------------------------- stdev % | 0.3 | 0.1 Co-developed-by: Dmitry Safonov Signed-off-by: Andrei Vagin Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Tested-by: Vincenzo Frascino Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20191112012724.250792-2-dima@arista.com commit cdb7c5a9c897ab2e5c56df647dd84c84e150e925 Author: Christophe Leroy Date: Mon Dec 23 14:31:09 2019 +0000 lib/vdso: Avoid duplication in __cvdso_clock_getres() VDSO_HRES and VDSO_RAW clocks are handled the same way. Avoid the code duplication. Signed-off-by: Christophe Leroy Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Link: https://lore.kernel.org/r/fdf1a968a8f7edd61456f1689ac44082ebb19c15.1577111367.git.christophe.leroy@c-s.fr commit 8463cf80529d0fd80b84cd5ab8b9b952b01c7eb9 Author: Christophe Leroy Date: Mon Dec 23 14:31:07 2019 +0000 lib/vdso: Let do_coarse() return 0 to simplify the callsite do_coarse() is similar to do_hres() except that it never fails. Change its type to int instead of void and let it always return success (0) to simplify the call site. Signed-off-by: Christophe Leroy Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/21e8afa38c02ca8672c2690307383507fe63b454.1577111367.git.christophe.leroy@c-s.fr commit 0b5c12332db5b71c6db0c102b3e6acc7c7c6a54d Author: Vincenzo Frascino Date: Fri Aug 30 14:59:02 2019 +0100 x86/vdso: Remove unused VDSO_HAS_32BIT_FALLBACK VDSO_HAS_32BIT_FALLBACK has been removed from the core since the architectures that support the generic vDSO library have been converted to support the 32 bit fallbacks. Remove unused VDSO_HAS_32BIT_FALLBACK from x86 vdso. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20190830135902.20861-9-vincenzo.frascino@arm.com commit de0209f53aba44d9b57d0739a076dfb2db767584 Author: Vincenzo Frascino Date: Fri Aug 30 14:59:01 2019 +0100 mips: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK VDSO_HAS_32BIT_FALLBACK has been removed from the core since the architectures that support the generic vDSO library have been converted to support the 32 bit fallbacks. Remove unused VDSO_HAS_32BIT_FALLBACK from mips vdso. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Acked-by: Paul Burton Link: https://lore.kernel.org/r/20190830135902.20861-8-vincenzo.frascino@arm.com commit 972188f3a2dac07a6f000a4418776f446259fc87 Author: Vincenzo Frascino Date: Fri Aug 30 14:59:00 2019 +0100 arm64: compat: vdso: Remove unused VDSO_HAS_32BIT_FALLBACK VDSO_HAS_32BIT_FALLBACK has been removed from the core since the architectures that support the generic vDSO library have been converted to support the 32 bit fallbacks. Remove unused VDSO_HAS_32BIT_FALLBACK from arm64 compat vdso. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20190830135902.20861-7-vincenzo.frascino@arm.com commit a279235ddbe975670afe2267162028ec0a312293 Author: Vincenzo Frascino Date: Fri Aug 30 14:58:59 2019 +0100 lib/vdso: Remove checks on return value for 32 bit vDSO Since all the architectures that support the generic vDSO library have been converted to support the 32 bit fallbacks it is not required anymore to check the return value of __cvdso_clock_get*time32_common() before updating the old_timespec fields. Remove the related checks from the generic vdso library. References: c60a32ea4f45 ("lib/vdso/32: Provide legacy syscall fallbacks") Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20190830135902.20861-6-vincenzo.frascino@arm.com commit b767081c07a400ff1c6f95b87639a9405886e7a6 Author: Vincenzo Frascino Date: Fri Aug 30 14:58:58 2019 +0100 lib/vdso: Remove VDSO_HAS_32BIT_FALLBACK VDSO_HAS_32BIT_FALLBACK was introduced to address a regression which caused seccomp to deny access to the applications to clock_gettime64() and clock_getres64() because they are not enabled in the existing filters. The purpose of VDSO_HAS_32BIT_FALLBACK was to simplify the conditional implementation of __cvdso_clock_get*time32() variants. Now that all the architectures that support the generic vDSO library have been converted to support the 32 bit fallbacks the conditional can be removed. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20190830135902.20861-5-vincenzo.frascino@arm.com References: c60a32ea4f45 ("lib/vdso/32: Provide legacy syscall fallbacks") commit bf279849ad59538a1518c667c0795ec1fe9dbd66 Author: Vincenzo Frascino Date: Fri Aug 30 14:58:56 2019 +0100 lib/vdso: Build 32 bit specific functions in the right context clock_gettime32 and clock_getres_time32 should be compiled only with a 32 bit vdso library. Exclude these symbols when BUILD_VDSO32 is not defined. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Link: https://lore.kernel.org/r/20190830135902.20861-3-vincenzo.frascino@arm.com commit 715f23b6104aa297feea20d4f200ca81941e23de Author: Thomas Gleixner Date: Tue Jan 14 09:41:09 2020 +0100 ARM: vdso: Set BUILD_VDSO32 and provide 32bit fallbacks Setting BUILD_VDSO32 is required to expose the legacy 32bit interfaces in the generic VDSO code which are going to be hidden behind an #ifdef BUILD_VDSO32. The 32bit fallbacks are necessary to remove the existing VDSO_HAS_32BIT_FALLBACK hackery. Signed-off-by: Thomas Gleixner Tested-by: Vincenzo Frascino Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/87tv4zq9dc.fsf@nanos.tec.linutronix.de commit 3b5584afeef05319ade0fbf5f634a64fd3e5772b Author: Vincenzo Frascino Date: Fri Aug 30 14:58:55 2019 +0100 arm64: compat: vdso: Expose BUILD_VDSO32 clock_gettime32 and clock_getres_time32 should be compiled only with the 32 bit vdso library. Expose BUILD_VDSO32 when arm64 compat is compiled, to provide an indication to the generic library to include these symbols. Signed-off-by: Vincenzo Frascino Signed-off-by: Thomas Gleixner Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20190830135902.20861-2-vincenzo.frascino@arm.com commit 75f453f28ca8a3aa492b8f361ac498842a2f43ae Author: Claudiu Beznea Date: Fri Jan 10 18:17:55 2020 +0200 dt-bindings: atmel-can: add microchip,sam9x60-can Add microchip,sam9x60-can to DT bindings documentation. Signed-off-by: Claudiu Beznea Acked-by: Rob Herring Link: https://lore.kernel.org/r/1578673089-3484-4-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit 97f807f36af0c6316a0f44e2558b083a7d1ae72d Author: Claudiu Beznea Date: Fri Jan 10 18:17:54 2020 +0200 dt-bindings: at_xdmac: add microchip,sam9x60-dma Add microchip,sam9x60-dma to DT bindings documentation. Signed-off-by: Claudiu Beznea Acked-by: Rob Herring Link: https://lore.kernel.org/r/1578673089-3484-3-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit 11ae60b6d30e7ebb023fdcf1ef9a27c6086ae146 Author: Claudiu Beznea Date: Fri Jan 10 18:17:53 2020 +0200 dt-bindings: at_xdmac: remove wildcard Remove wildcard and use the available compatible. Signed-off-by: Claudiu Beznea Acked-by: Rob Herring Link: https://lore.kernel.org/r/1578673089-3484-2-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit 6aabc1facdb24e837cfea755ba46a6be22a8860f Author: Geert Uytterhoeven Date: Mon Jan 13 11:30:40 2020 +0100 m68k: Implement copy_thread_tls() This is required for clone3(), which passes the TLS value through a struct rather than a register. As do_fork() is only available if CONFIG_HAVE_COPY_THREAD_TLS is set, m68k_clone() must be changed to call _do_fork() directly. Signed-off-by: Geert Uytterhoeven Acked-by: Christian Brauner Acked-by: Greg Ungerer Link: https://lore.kernel.org/r/20200113103040.23661-1-geert@linux-m68k.org commit 75663c093d0bbbf51e3a3149f91f3148a7be3c5c Author: Pierre-Louis Bossart Date: Mon Jan 13 15:14:05 2020 -0600 ALSA: hda: patch_hdmi: remove warnings with empty body make W=1 reports the following warnings, fix as suggested sound/pci/hda/patch_hdmi.c: In function ‘hdmi_non_intrinsic_event’: sound/pci/hda/patch_hdmi.c:824:3: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] 824 | ; | ^ sound/pci/hda/patch_hdmi.c:826:3: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] 826 | ; | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113211405.28070-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 4f5c26534d395bf68de38c3d4b6170ab28d49a05 Author: Pierre-Louis Bossart Date: Mon Jan 13 15:14:04 2020 -0600 ALSA: hda: correct kernel-doc parameter descriptions make W=1 throws warnings, provide missing documentation Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113211405.28070-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 6e57188f20ecf33185b671cff1af305d8f3bb2fe Author: Keyon Jie Date: Mon Jan 13 14:56:38 2020 -0600 ALSA: hda: Update kernel-doc function parameter descriptions Make W=1 throws a lot of warnings, with multiple misalignments between function params and their descriptions. Signed-off-by: Keyon Jie Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113205638.27338-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit a19efb5265c3043f5598192a3493bc3c47a393c6 Author: Bard Liao Date: Mon Jan 13 17:11:29 2020 -0600 soundwire: intel: fix factor of two in MCLK handling Somehow Intel folks were confused, the property is 2x what the mclk frequency actually is (checked the actual bus frequency with a scope) Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113231129.19049-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit fd6a3ac8e87cedd83d6aad4bbc2682a903fb5d01 Author: Pierre-Louis Bossart Date: Mon Jan 13 16:56:37 2020 -0600 soundwire: bus: fix device number leak on errors If the programming of the dev_number fails due to an IO error, a new device_number will be assigned, resulting in a leak. Make sure we only assign a device_number once per Slave device. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113225637.17313-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 78f6fdd6161f6b5a8fc13b8b0def923437a61a7f Author: Pierre-Louis Bossart Date: Mon Jan 13 15:10:25 2020 -0600 soundwire: cadence: remove useless variable incrementation Fix cppcheck warning: drivers/soundwire/cadence_master.c:992:9: style: Variable 'offset' is assigned a value that is never used. [unreadVariable] offset += stream->num_out; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113211025.27973-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 39737a313085fac13ea9e3cbc8b3dda193415933 Author: Pierre-Louis Bossart Date: Mon Jan 13 15:10:24 2020 -0600 soundwire: cadence: update kernel-doc parameter descriptions make W=1 reports inconsistencies with parameter descriptions, fix Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200113211025.27973-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 02efb49aa805cee643a643ab61a1118c2fd08b80 Author: Srinivas Kandagatla Date: Mon Jan 13 13:21:53 2020 +0000 soundwire: qcom: add support for SoundWire controller Qualcomm SoundWire Master controller is present in most Qualcomm SoCs either integrated as part of WCD audio codecs via slimbus or as part of SOC I/O. This patchset adds support to a very basic controller which has been tested with WCD934x SoundWire controller connected to WSA881x smart speaker amplifiers. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200113132153.27239-3-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit bbd8e6672f05af28032312a1a2ed260040c17fbf Author: Srinivas Kandagatla Date: Mon Jan 13 13:21:52 2020 +0000 dt-bindings: soundwire: add bindings for Qcom controller This patch adds bindings for Qualcomm soundwire controller. Qualcomm SoundWire Master controller is present in most Qualcomm SoCs either integrated as part of WCD audio codecs via slimbus or as part of SOC I/O. Signed-off-by: Srinivas Kandagatla Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200113132153.27239-2-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit 6106190158d6b6a064c907a2ba3e063d06f89eaa Author: Pierre-Louis Bossart Date: Fri Jan 10 15:57:31 2020 -0600 soundwire: bus: check first if Slaves become UNATTACHED Before checking for the presence of Device0, we first need to clean-up the internal state of Slaves that are no longer attached. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110215731.30747-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 7181b1d41d0d9d759d3f3c444e3ccffbf7964c92 Author: Pierre-Louis Bossart Date: Fri Jan 10 15:57:30 2020 -0600 soundwire: cadence_master: handle multiple status reports per Slave When a Slave reports multiple status in the sticky bits, find the latest configuration from the mirror of the PING frame status and update the status directly. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110215731.30747-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit ae478d6e19376d3d87a695af5b5a15914abede71 Author: Rander Wang Date: Fri Jan 10 15:57:29 2020 -0600 soundwire: cadence_master: remove config update for interrupt setting Config only needs to be updated when setting MCP_Config, MCP_Control and MCP_CmdCtrl to make these register setting effective. When updating config in master, master will communicate with slave to update status. Communication will be failed when masters and slaves are in clock stop state, and this unnecessary config update makes interrupt setting failed. Tested on Comet Lake with soundwire enabled Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110215731.30747-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 53ee957269571dd51f88ef3f57c9899c659744cc Author: Pierre-Louis Bossart Date: Fri Jan 10 15:57:28 2020 -0600 soundwire: cadence_master: log more useful information during timeouts Add the type of command, device number, register offset and length to reverse engineer what caused the issue. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110215731.30747-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 5ebb0945419e5845137102c20b99714ea574a3d8 Author: Rander Wang Date: Fri Jan 10 15:57:27 2020 -0600 soundwire: cadence_master: clear interrupt status before enabling interrupt make sure all interrupts status are cleared before enabling interrupt so that there is no unexpected interrupt triggered. Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110215731.30747-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit a2cff9ee4b0200b675ad2dbe00081ff118b6b8a9 Author: Pierre-Louis Bossart Date: Fri Jan 10 15:57:26 2020 -0600 soundwire: cadence_master: filter out bad interrupts If somehow we read the interrupt status while the IP is not powered the result is probably undefined or 0xffffffff. We do know that some of the bits are reserved and read as zero, so use as a filter to discard invalid configurations. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110215731.30747-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit b66d1ac82918cb5860e684153706058b3330df00 Author: Maxime Ripard Date: Fri Jan 3 16:28:24 2020 +0100 dt-bindings: usb: Convert Allwinner A80 USB PHY controller to a schema The Allwinner A80 SoCs have a USB PHY controller that is used by Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit b109c13a533b8cc2dab92d8668f5c112cc5ae4fc Author: Ramuthevar Vadivel Murugan Date: Tue Jan 7 14:06:06 2020 +0800 phy: intel-lgm-emmc: Fix warning by adding missing MODULE_LICENSE commit 95f1061f715e ("phy: intel-lgm-emmc: Add support for eMMC PHY") introduces the below warning WARNING: modpost: missing MODULE_LICENSE() in drivers/phy/intel/phy-intel-emmc.o Fix it by adding missing MODULE_LICENSE. Signed-off-by: Ramuthevar Vadivel Murugan Reported-by: Stephen Rothwell Signed-off-by: Kishon Vijay Abraham I commit c9f9eba06629cd813c21df3327a1013ad092e988 Author: Roger Quadros Date: Mon Jan 6 15:06:22 2020 +0200 phy: ti: j721e-wiz: Manage typec-gpio-dir Based on this GPIO state we need to configure LN10 bit to swap lane0 and lane1 if required (flipped connector). Type-C companions typically need some time after the cable is plugged before and before they reflect the correct status of Type-C plug orientation on the DIR line. Type-C Spec specifies CC attachment debounce time (tCCDebounce) of 100 ms (min) to 200 ms (max). Use the DT property to figure out if we need to add delay or not before sampling the Type-C DIR line. Signed-off-by: Roger Quadros Signed-off-by: Sekhar Nori Reviewed-by: Jyri Sarha Signed-off-by: Kishon Vijay Abraham I commit 6385cbe9c567cb85ba40b6af09ad2f506e71158d Author: Roger Quadros Date: Mon Jan 6 15:06:21 2020 +0200 dt-bindings: phy: ti,phy-j721e-wiz: Add Type-C dir GPIO This is an optional GPIO, if specified will be used to swap lane 0 and lane 1 based on GPIO status. This is required to achieve plug flip support for USB Type-C. Type-C companions typically need some time after the cable is plugged before and before they reflect the correct status of Type-C plug orientation on the DIR line. Type-C Spec specifies CC attachment debounce time (tCCDebounce) of 100 ms (min) to 200 ms (max). Allow the DT node to specify the time (in ms) that we need to wait before sampling the DIR line. Signed-off-by: Roger Quadros Cc: Rob Herring Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit 7904e15b4d31a5515a882c3a87dfc898c4749fed Author: Roger Quadros Date: Mon Jan 6 15:06:20 2020 +0200 phy: cadence: Sierra: add phy_reset hook Some platforms e.g. J721e need lane swap register to be programmed before reset is deasserted. This patch ensures that we propagate the phy_reset back to the reset controller driver. Signed-off-by: Roger Quadros Signed-off-by: Sekhar Nori Reviewed-by: Jyri Sarha Signed-off-by: Kishon Vijay Abraham I commit 80f96fb186a3134a886d696c0a1ecc1962f36c89 Author: Colin Ian King Date: Wed Jan 8 11:59:36 2020 +0530 phy: cadence: Sierra: remove redundant initialization of pointer regmap The pointer regmap is being initialized with a value that is never read and it is being updated later with a new value from phy->regmap_common_cdb. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Kishon Vijay Abraham I commit 42d068472ddf532f3ca2bcdd06d1ca6b53f57e5e Author: Yuti Amonkar Date: Mon Jan 6 13:22:40 2020 +0100 phy: Add DisplayPort configuration options Allow DisplayPort PHYs to be configured through the generic functions through a custom structure added to the generic union. The configuration structure is used for reconfiguration of DisplayPort PHYs during link training operation. The parameters added here are the ones defined in the DisplayPort spec v1.4 which include link rate, number of lanes, voltage swing and pre-emphasis. Add the DisplayPort phy mode to the generic phy_mode enum. Signed-off-by: Yuti Amonkar Reviewed-by: Maxime Ripard Reviewed-by: Jyri Sarha Signed-off-by: Kishon Vijay Abraham I commit e7b4aaf051d581a30bea1f55d775a627b0ad3106 Author: Krzysztof Kozlowski Date: Fri Jan 3 17:47:10 2020 +0100 phy: Enable compile testing for some of drivers Some of the phy drivers can be compile tested to increase build coverage. Signed-off-by: Krzysztof Kozlowski Acked-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit 4cb6eea22621e14e29c91d18d5c66f0b01470071 Author: Krzysztof Kozlowski Date: Fri Jan 3 17:47:09 2020 +0100 phy: mediatek: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stanley Chu Acked-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit 9227942383307f97fa6992416f73af4a23ef972c Author: Ramuthevar Vadivel Murugan Date: Tue Dec 17 09:56:58 2019 +0800 phy: intel-lgm-emmc: Add support for eMMC PHY Add support for eMMC PHY on Intel's Lightning Mountain SoC. Signed-off-by: Ramuthevar Vadivel Murugan Reviewed-by: Andy Shevchenko Signed-off-by: Kishon Vijay Abraham I commit 5bc999108025a82a2862b2e7e0af00e34643d270 Author: Ramuthevar Vadivel Murugan Date: Tue Dec 17 09:56:57 2019 +0800 dt-bindings: phy: intel-emmc-phy: Add YAML schema for LGM eMMC PHY Add a YAML schema to use the host controller driver with the eMMC PHY on Intel's Lightning Mountain SoC. Signed-off-by: Ramuthevar Vadivel Murugan Reviewed-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit 091876cc355d6739e393efa4b3d07f451a6a035c Author: Kishon Vijay Abraham I Date: Mon Dec 16 15:27:12 2019 +0530 phy: ti: j721e-wiz: Add support for WIZ module present in TI J721E SoC Add support for WIZ module present in TI's J721E SoC. WIZ is a SERDES wrapper used to configure some of the input signals to the SERDES. It is used with both Sierra(16G) and Torrent(10G) SERDES. This driver configures three clock selects (pll0, pll1, dig), two divider clocks and supports resets for each of the lanes. [jsarha@ti.com: Add support for Torrent(10G) SERDES wrapper] Signed-off-by: Jyri Sarha Signed-off-by: Kishon Vijay Abraham I commit ad044f01c2cc482f9fc5670a1c448638650b0aac Author: Kishon Vijay Abraham I Date: Thu Jan 2 15:26:31 2020 +0530 dt-bindings: phy: Document WIZ (SERDES wrapper) bindings Add DT binding documentation for WIZ (SERDES wrapper). WIZ is *NOT* a PHY but a wrapper used to configure some of the input signals to the SERDES. It is used with both Sierra(16G) and Torrent(10G) serdes. Signed-off-by: Kishon Vijay Abraham I [jsarha@ti.com: Add separate compatible for Sierra(16G) and Torrent(10G) SERDES] Signed-off-by: Jyri Sarha Reviewed-by: Rob Herring commit 76ccf5288c62e998a434dd33fa58e1e8e2673660 Merge: ab9837b5ed51 28c1cf73c923 Author: Jakub Kicinski Date: Mon Jan 13 18:32:31 2020 -0800 Merge branch 'stmmac-ETF-support' Jose Abreu says: ==================== net: stmmac: ETF support This series adds the support for ETF scheduler in stmmac. 1) Starts adding the support by implementing Enhanced Descriptors in stmmac main core. This is needed for ETF feature in XGMAC and QoS cores. 2) Integrates the ETF logic into stmmac TC core. 3) and 4) adds the HW specific support for ETF in XGMAC and QoS cores. The IP feature is called TBS (Time Based Scheduling). 5) Enables ETF in GMAC5 IPK PCI entry for all Queues except Queue 0. 6) Adds the new TBS feature and even more information into the debugFS HW features file. ==================== Signed-off-by: Jakub Kicinski commit 28c1cf73c923065d1265ea32b9c1bfc8d63370e9 Author: Jose Abreu Date: Mon Jan 13 17:24:16 2020 +0100 net: stmmac: selftests: Add a test for TBS feature Add a new test for TBS feature which is used in ETF scheduler. In this test, we send a packet with a launch time specified as now + 500ms and check if the packet was transmitted on that time frame. Changes from v2: - Use the TBS bitfield - Remove debug message Signed-off-by: Jose Abreu Signed-off-by: Jakub Kicinski commit 05373e31baed87c3daafdc6d30dc679f057b5cd0 Author: Jose Abreu Date: Mon Jan 13 17:24:15 2020 +0100 net: stmmac: selftests: Switch to dev_direct_xmit() In the upcoming commit for TBS selftest we will need to send a packet on a specific Queue. As stmmac fallsback to netdev_pick_tx() on the select Queue callback, we need to switch all selftests logic to dev_direct_xmit() so that we can send the given SKB on a specific Queue. Signed-off-by: Jose Abreu Signed-off-by: Jakub Kicinski commit 44e6547570654a447edcfff33023cf61f5fdcd01 Author: Jose Abreu Date: Mon Jan 13 17:24:14 2020 +0100 net: stmmac: Add missing information in DebugFS capabilities file Adds more information regarding HW Capabilities in the corresponding DebugFS file. Changes from v2: - Remove the TX/RX queues in use (Jakub) Signed-off-by: Jose Abreu Signed-off-by: Jakub Kicinski commit 7eadf57290ecd2b8e01a48dfaf55126ad60e6a3b Author: Jose Abreu Date: Mon Jan 13 17:24:13 2020 +0100 net: stmmac: pci: Enable TBS on GMAC5 IPK PCI entry Enable TBS support on GMAC5 PCI entry for all Queues except Queue 0. Signed-off-by: Jose Abreu Signed-off-by: Jakub Kicinski commit 58ae92814008a324fc5698fa76fcd7497207fe0f Author: Jose Abreu Date: Mon Jan 13 17:24:12 2020 +0100 net: stmmac: gmac4+: Add TBS support Adds all the necessary HW hooks to support TBS feature in QoS cores. Changes from v1: - Remove unneeded LT shift as the IP already does this. Signed-off-by: Jose Abreu Signed-off-by: Jakub Kicinski commit 6a549b9f0dcd9a73991077da64eb3603b3e5f681 Author: Jose Abreu Date: Mon Jan 13 17:24:11 2020 +0100 net: stmmac: xgmac: Add TBS support Adds all the necessary HW hooks to support TBS feature in XGMAC cores. Changes from v1: - Remove unneeded LT shift as the IP already does this. Signed-off-by: Jose Abreu Signed-off-by: Jakub Kicinski commit 430b383c737ca07e83e0fe2a8d1ecdff6f4974bd Author: Jose Abreu Date: Mon Jan 13 17:24:10 2020 +0100 net: stmmac: tc: Add support for ETF Scheduler using TBS Adds the support for ETF scheduler using TBS feature which is available in XGMAC and QoS IPs. Changes from v2: - Fix checkpatch issues (Jakub) - Use the TBS bitfield Signed-off-by: Jose Abreu Signed-off-by: Jakub Kicinski commit 579a25a854d482bc9d0f9ab0e07ba32fb66bd9e3 Author: Jose Abreu Date: Mon Jan 13 17:24:09 2020 +0100 net: stmmac: Initial support for TBS Adds the initial hooks for TBS support. This needs a 32 byte descriptor in order for it to work with current HW. Adds all the logic for Enhanced Descriptors in main core but no HW related logic for now. Changes from v2: - Use bitfield for TBS status / support (Jakub) - Remove unneeded cache alignment (Jakub) - Fix checkpatch issues Signed-off-by: Jose Abreu Signed-off-by: Jakub Kicinski commit ab9837b5ed51f128f898a93d873ba7198abc1140 Author: Chen Zhou Date: Mon Jan 13 21:15:16 2020 +0800 amd-xgbe: remove unnecessary conversion to bool The conversion to bool is not needed, remove it. Signed-off-by: Chen Zhou Signed-off-by: Jakub Kicinski commit 0eac8ce95bb386838121189b2aa2216cd070f143 Author: Jesper Dangaard Brouer Date: Mon Jan 13 11:22:16 2020 +0100 ptr_ring: add include of linux/mm.h Commit 0bf7800f1799 ("ptr_ring: try vmalloc() when kmalloc() fails") started to use kvmalloc_array and kvfree, which are defined in mm.h, the previous functions kcalloc and kfree, which are defined in slab.h. Add the missing include of linux/mm.h. This went unnoticed as other include files happened to include mm.h. Fixes: 0bf7800f1799 ("ptr_ring: try vmalloc() when kmalloc() fails") Signed-off-by: Jesper Dangaard Brouer Acked-by: Michael S. Tsirkin Signed-off-by: Jakub Kicinski commit 1657adccaa37e1895356658212a1847f617ebf8f Author: Lorenzo Bianconi Date: Mon Jan 13 10:28:12 2020 +0100 net: mvneta: change page pool nid to NUMA_NO_NODE With 'commit 44768decb7c0 ("page_pool: handle page recycle for NUMA_NO_NODE condition")' we can safely change nid to NUMA_NO_NODE and accommodate future NUMA aware hardware using mvneta network interface Signed-off-by: Lorenzo Bianconi Acked-by: Jesper Dangaard Brouer Signed-off-by: Jakub Kicinski commit 9c01546d26d28cf57341d8380ba900bf68e26b18 Author: Andrii Nakryiko Date: Sun Jan 12 23:31:42 2020 -0800 tools/bpf: Add runqslower tool to tools/bpf Convert one of BCC tools (runqslower [0]) to BPF CO-RE + libbpf. It matches its BCC-based counterpart 1-to-1, supporting all the same parameters and functionality. runqslower tool utilizes BPF skeleton, auto-generated from BPF object file, as well as memory-mapped interface to global (read-only, in this case) data. Its Makefile also ensures auto-generation of "relocatable" vmlinux.h, which is necessary for BTF-typed raw tracepoints with direct memory access. [0] https://github.com/iovisor/bcc/blob/11bf5d02c895df9646c117c713082eb192825293/tools/runqslower.py Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200113073143.1779940-6-andriin@fb.com commit 1cf5b23988ea0086a252a5c8b005b075f1e9b030 Author: Andrii Nakryiko Date: Sun Jan 12 23:31:41 2020 -0800 bpftool: Apply preserve_access_index attribute to all types in BTF dump This patch makes structs and unions, emitted through BTF dump, automatically CO-RE-relocatable (unless disabled with `#define BPF_NO_PRESERVE_ACCESS_INDEX`, specified before including generated header file). This effectivaly turns usual bpf_probe_read() call into equivalent of bpf_core_read(), by automatically applying builtin_preserve_access_index to any field accesses of types in generated C types header. This is especially useful for tp_btf/fentry/fexit BPF program types. They allow direct memory access, so BPF C code just uses straightfoward a->b->c access pattern to read data from kernel. But without kernel structs marked as CO-RE relocatable through preserve_access_index attribute, one has to enclose all the data reads into a special __builtin_preserve_access_index code block, like so: __builtin_preserve_access_index(({ x = p->pid; /* where p is struct task_struct *, for example */ })); This is very inconvenient and obscures the logic quite a bit. By marking all auto-generated types with preserve_access_index attribute the above code is reduced to just a clean and natural `x = p->pid;`. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200113073143.1779940-5-andriin@fb.com commit 2cc51d34d93c9cf76128da6535a2a0a38c9faddb Author: Andrii Nakryiko Date: Sun Jan 12 23:31:40 2020 -0800 selftests/bpf: Conform selftests/bpf Makefile output to libbpf and bpftool Bring selftest/bpf's Makefile output to the same format used by libbpf and bpftool: 2 spaces of padding on the left + 8-character left-aligned build step identifier. Also, hide feature detection output by default. Can be enabled back by setting V=1. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200113073143.1779940-4-andriin@fb.com commit 292e1d73b125d7a3fd7ff382557e003ece3c0d65 Author: Andrii Nakryiko Date: Sun Jan 12 23:31:39 2020 -0800 libbpf: Clean up bpf_helper_defs.h generation output bpf_helpers_doc.py script, used to generate bpf_helper_defs.h, unconditionally emits one informational message to stderr. Remove it and preserve stderr to contain only relevant errors. Also make sure script invocations command is muted by default in libbpf's Makefile. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200113073143.1779940-3-andriin@fb.com commit 533420a4151e28e6a38a830cb876afddb5587d7d Author: Andrii Nakryiko Date: Sun Jan 12 23:31:38 2020 -0800 tools: Sync uapi/linux/if_link.h Sync uapi/linux/if_link.h into tools to avoid out of sync warnings during libbpf build. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200113073143.1779940-2-andriin@fb.com commit f26661e1276537f5adda440a37e2a2c694147781 Author: Masahiro Yamada Date: Sun Jan 5 00:02:32 2020 +0900 initramfs: make initramfs compression choice non-optional Currently, the choice of the initramfs compression mode is too complex because users are allowed to not specify the compression mode at all. I think it makes more sense to require users to choose the compression mode explicitly, and delete the fallback defaults of INITRAMFS_COMPRESSION. Signed-off-by: Masahiro Yamada commit ddd09bcc899fd374fe5567d9c35894a304f9e492 Author: Masahiro Yamada Date: Sun Jan 5 00:02:31 2020 +0900 initramfs: make compression options not depend on INITRAMFS_SOURCE Even if INITRAMFS_SOURCE is empty, usr/gen_initramfs.sh generates a tiny default initramfs, which is embedded in vmlinux. So, defining INITRAMFS_COMPRESSION* options should be valid irrespective of INITRAMFS_SOURCE. Signed-off-by: Masahiro Yamada commit be1859bdc660213b11c417ebfaf9161938526d44 Author: Masahiro Yamada Date: Sun Jan 5 00:02:30 2020 +0900 initramfs: remove redundant dependency on BLK_DEV_INITRD init/Kconfig includes usr/Kconfig inside the "if BLK_DEV_INITRD" ... "endif" block: if BLK_DEV_INITRD source "usr/Kconfig" endif Hence, all the defines in usr/Kconfig depend on BLK_DEV_INITRD. Remove the redundant "depends on BLK_DEV_INITRD". Signed-off-by: Masahiro Yamada Reviewed-by: Greg Thelen commit 80e715a06c2d0a24dbb818bb1dba2ef0f20d7068 Author: Masahiro Yamada Date: Sun Jan 5 00:02:29 2020 +0900 initramfs: rename gen_initramfs_list.sh to gen_initramfs.sh The comments in usr/Makefile wrongly refer to the script name (twice). Line 37: # The dependency list is generated by gen_initramfs.sh -l Line 54: # 4) Arguments to gen_initramfs.sh changes There does not exist such a script. I was going to fix the comments, but after some consideration, I thought "gen_initramfs.sh" would be more suitable than "gen_initramfs_list.sh" because it generates an initramfs image in the common usage. The script generates a list that can be fed to gen_init_cpio only when it is directly run without -o or -l option. Signed-off-by: Masahiro Yamada commit a4c968e70f68d81276def017fcb1468e3930aa1d Author: Masahiro Yamada Date: Sun Jan 5 00:02:28 2020 +0900 gen_initramfs_list.sh: fix the tool name in the comment There is no tool named "gen_initramfs". The correct name is "gen_init_cpio". Signed-off-by: Masahiro Yamada Reviewed-by: Greg Thelen commit 9a04dc52982eb8f2ccd604b48f057217a39f243c Author: Masahiro Yamada Date: Sun Jan 5 00:02:27 2020 +0900 gen_initramfs_list.sh: remove unused variable 'default_list' This is assigned, but not referenced. Signed-off-by: Masahiro Yamada Reviewed-by: Greg Thelen commit a2183c0437987409bbf87582621d096561bf321c Author: Masahiro Yamada Date: Sun Jan 5 00:02:26 2020 +0900 initramfs: replace klibcdirs in Makefile with FORCE 'klibcdirs' was added by commit d39a206bc35d ("kbuild: rebuild initramfs if content of initramfs changes"). If this is just a matter of forcing execution of the recipe line, we can replace it with FORCE. The following code is currently useless: $(deps_initramfs): klibcdirs The original intent could be a hook for the klibc integration into the kernel tree, but klibc is a separate project, which can be built independently. Clean it up. Signed-off-by: Masahiro Yamada Reviewed-by: Greg Thelen commit 9945722afdc3443eab826b2da1122509a13a50a5 Author: Michał Mirosław Date: Sat Jan 4 10:55:56 2020 +0100 builddeb: make headers package thinner Remove a bunch of files not used during external module builds: - foreign architecture headers - subtree Makefiles - Kconfig files - perl scripts On amd64 system this looses a third of the resulting .deb size. Signed-off-by: Michał Mirosław Signed-off-by: Masahiro Yamada commit fbee6ba2dca30d302efe6bddb3a886f5e964a257 Author: Pingfan Liu Date: Fri Jan 10 12:54:02 2020 +0800 powerpc/pseries: Advance pfn if section is not present in lmb_is_removable() In lmb_is_removable(), if a section is not present, it should continue to test the rest of the sections in the block. But the current code fails to do so. Fixes: 51925fb3c5c9 ("powerpc/pseries: Implement memory hotplug remove in the kernel") Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Pingfan Liu Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1578632042-12415-1-git-send-email-kernelfans@gmail.com commit c2a20711fc181e7f22ee5c16c28cb9578af84729 Author: Sukadev Bhattiprolu Date: Mon Jan 6 13:50:02 2020 -0600 powerpc/xmon: don't access ASDR in VMs ASDR is HV-privileged and must only be accessed in HV-mode. Fixes a Program Check (0x700) when xmon in a VM dumps SPRs. Fixes: d1e1b351f50f ("powerpc/xmon: Add ISA v3.0 SPRs to SPR dump") Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: Sukadev Bhattiprolu Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200107021633.GB29843@us.ibm.com commit 7454049eb7e426a3bc9cc7b3fd5857c2d6ceeaee Merge: 8e42d239cb02 d0d2d8ba0494 Author: Jens Axboe Date: Mon Jan 13 17:27:12 2020 -0700 Merge branch 'md-next' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.6/drivers Pull MD changes from Song. * 'md-next' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid1: introduce wait_for_serialization md/raid1: use bucket based mechanism for IO serialization md: introduce a new struct for IO serialization md: don't destroy serial_info_pool if serialize_policy is true raid1: serialize the overlap write md: reorgnize mddev_create/destroy_serial_pool md: add serialize_policy sysfs node for raid1 md: prepare for enable raid1 io serialization md: fix a typo s/creat/create md: rename wb stuffs raid5: remove worker_cnt_per_group argument from alloc_thread_groups md/raid6: fix algorithm choice under larger PAGE_SIZE raid6/test: fix a compilation warning raid6/test: fix a compilation error md-bitmap: small cleanups commit eb368de6de32925c65a97c1e929a31cae2155aee Author: Dan Carpenter Date: Wed Sep 25 14:01:28 2019 +0300 power: supply: sbs-battery: Fix a signedness bug in sbs_get_battery_capacity() The "mode" variable is an enum and in this context GCC treats it as an unsigned int so the error handling is never triggered. Fixes: 51d075660457 ("bq20z75: Add support for charge properties") Signed-off-by: Dan Carpenter Signed-off-by: Sebastian Reichel commit a60ec78d306c6548d4adbc7918b587a723c555cc Author: Sven Van Asbroeck Date: Thu Sep 19 11:11:37 2019 -0400 power: supply: ltc2941-battery-gauge: fix use-after-free This driver's remove path calls cancel_delayed_work(). However, that function does not wait until the work function finishes. This could mean that the work function is still 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 that the work is properly cancelled, no longer running, and unable to re-schedule itself. This issue was detected with the help of Coccinelle. Cc: stable Signed-off-by: Sven Van Asbroeck Signed-off-by: Sebastian Reichel commit e29242ad813c71e8e6a22c4f13f420a2297ac716 Author: Marek Szyprowski Date: Fri Jan 10 11:05:40 2020 +0100 power: supply: max17040: Correct IRQ wake handling Don't disable IRQ wake feature without prior enabling it. This fixes following warning observed on Exynos3250-based Rinato board: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1288 at kernel/irq/manage.c:724 irq_set_irq_wake+0xfc/0x134 Unbalanced IRQ 83 wake disable Modules linked in: CPU: 0 PID: 1288 Comm: rtcwake Not tainted 5.5.0-rc5-next-20200110-00031-g6289fffbb3f5 #7266 Hardware name: Samsung Exynos (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xa4/0xd0) [] (dump_stack) from [] (__warn+0xf4/0x10c) [] (__warn) from [] (warn_slowpath_fmt+0x74/0xb8) [] (warn_slowpath_fmt) from [] (irq_set_irq_wake+0xfc/0x134) [] (irq_set_irq_wake) from [] (max17040_suspend+0x50/0x58) [] (max17040_suspend) from [] (dpm_run_callback+0xb4/0x400) [] (dpm_run_callback) from [] (__device_suspend+0x140/0x814) [] (__device_suspend) from [] (dpm_suspend+0x16c/0x564) [] (dpm_suspend) from [] (dpm_suspend_start+0x90/0x98) [] (dpm_suspend_start) from [] (suspend_devices_and_enter+0xec/0xc0c) [] (suspend_devices_and_enter) from [] (pm_suspend+0x318/0x3e8) [] (pm_suspend) from [] (state_store+0x68/0xc8) [] (state_store) from [] (kernfs_fop_write+0x10c/0x220) [] (kernfs_fop_write) from [] (__vfs_write+0x2c/0x1c4) [] (__vfs_write) from [] (vfs_write+0xa4/0x180) [] (vfs_write) from [] (ksys_write+0x58/0xcc) [] (ksys_write) from [] (ret_fast_syscall+0x0/0x28) Exception stack(0xd6e83fa8 to 0xd6e83ff0) ... irq event stamp: 18028 hardirqs last enabled at (18027): [] cancel_delayed_work+0x84/0xf8 hardirqs last disabled at (18028): [] _raw_spin_lock_irqsave+0x1c/0x58 softirqs last enabled at (17876): [] __do_softirq+0x4f0/0x5e4 softirqs last disabled at (17869): [] irq_exit+0x16c/0x170 ---[ end trace 0728005730004e60 ]--- Fixes: 2e17ed94de68 ("power: supply: max17040: Add IRQ handler for low SOC alert") Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 5f9935f514d66ddba868e587d9e976a567232547 Author: Douglas Anderson Date: Mon Jan 13 14:04:46 2020 -0800 drm/msm: Fix error about comments within a comment block My compiler yells: .../drivers/gpu/drm/msm/adreno/adreno_gpu.c:69:27: error: '/*' within block comment [-Werror,-Wcomment] Let's fix. Fixes: 6a0dea02c2c4 ("drm/msm: support firmware-name for zap fw (v2)") Link: https://patchwork.freedesktop.org/patch/348519/ Signed-off-by: Douglas Anderson Signed-off-by: Rob Clark commit f95526333abf6f486cda63abb38d0c1f99d9535a Author: Samuel Holland Date: Sun Jan 12 21:53:06 2020 -0600 power: supply: axp20x_usb_power: Remove unused device_node This member of struct axp20x_usb_power is not used anywhere. Remove it. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland Signed-off-by: Sebastian Reichel commit ca4c77bb43151e6569e7aae689a69b65a48c85f0 Author: Samuel Holland Date: Sun Jan 12 21:53:05 2020 -0600 power: supply: axp20x_ac_power: Add wakeup control The AC power supply input can be used as a wakeup source. Hook up the ACIN_PLUGIN IRQ to trigger wakeup based on userspace configuration. To do this, we must remember the list of IRQs for the life of the device. To know how much space to allocate for the flexible array member, we switch from using a NULL sentinel to using an array length. Because we now depend on the specific order of the IRQs (we assume ACIN_PLUGIN is first and always present), failing to acquire an IRQ during probe must be a fatal error. To avoid spuriously waking up the system when the AC power supply is not configured as a wakeup source, we must explicitly disable all non- wake IRQs during system suspend. This is because the SoC's NMI input is shared among all IRQs on the AXP PMIC. Due to the use of regmap-irq, the individual IRQs within the PMIC are nested threaded interrupts, and are therefore not automatically disabled during system suspend. The upshot is that if any other device within the MFD (such as the power key) is an enabled wakeup source, all enabled IRQs within the PMIC will cause wakeup. We still need to call enable_irq_wake() when we *do* want wakeup, in case those other wakeup sources on the PMIC are all disabled. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland Signed-off-by: Sebastian Reichel commit ddfec18b42c44c4792071d67ae139e5b1f211410 Author: Samuel Holland Date: Sun Jan 12 21:53:04 2020 -0600 power: supply: axp20x_ac_power: Allow offlining AXP803/AXP813 have a flag that enables/disables the AC power supply input. Allow control of this flag via the ONLINE property on those variants. Reviewed-by: Chen-Yu Tsai Signed-off-by: Samuel Holland Signed-off-by: Sebastian Reichel commit 1c51aad8475d670ad58ae60adc9d32342381df8d Author: Samuel Holland Date: Sun Jan 12 21:53:03 2020 -0600 power: supply: axp20x_ac_power: Fix reporting online status AXP803/AXP813 have a flag that enables/disables the AC power supply input. This flag does not affect the status bits in PWR_INPUT_STATUS. Its effect can be verified by checking the battery charge/discharge state (bit 2 of PWR_INPUT_STATUS), or by examining the current draw on the AC input. Take this flag into account when getting the ONLINE property of the AC input, on PMICs where this flag is present. Fixes: 7693b5643fd2 ("power: supply: add AC power supply driver for AXP813") Cc: stable@vger.kernel.org Signed-off-by: Samuel Holland Reviewed-by: Chen-Yu Tsai Signed-off-by: Sebastian Reichel commit b873c122fef06905f58399a07121a09bfcf4289d Author: Linus Walleij Date: Fri Jan 10 09:14:11 2020 +0100 dt-bindings: Convert Faraday FTIDE010 to DT schema This uses the new pata-common.yaml schema to convert the Faraday FTIDE010 to DT schema. Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Signed-off-by: Rob Herring commit c87967c57b128067f3a83a47e3402b4c344a26e3 Author: Linus Walleij Date: Fri Jan 10 09:14:10 2020 +0100 dt-bindings: Create DT bindings for PATA controllers I need to create subnodes for drives connected to PATA host controllers, and this needs to be supported generally, so create a common YAML binding for "ide" that will support subnodes with ports. This has been designed as a subset of ata/ahci-platform.txt with the bare essentials and should be possible to extend or superset to cover the common bindings. Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Signed-off-by: Rob Herring commit 2b966a9d07375d966b738ecb3f8924e215e6273b Author: Linus Walleij Date: Sun Jan 12 12:17:51 2020 +0100 dt-bindings: Create DT bindings for SATA controllers I need to create subnodes for drives connected to SATA host controllers, and this needs to be supported generally, so create a common YAML binding for "sata" that will support subnodes with ports. This has been designed as a subset of ata/ahci-platform.txt with the bare essentials and should be possible to extend or superset to cover the common bindings. Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: Sergei Shtylyov Signed-off-by: Linus Walleij [robh: fixup sata-port unit-address pattern] Signed-off-by: Rob Herring commit 6b7133b6692513853ea813034f31568bdce7a85d Author: Chris Wilson Date: Mon Jan 13 10:44:39 2020 +0000 drm/i915/gt: Always reset the timeslice after a context switch Currently, we reset the timer after a pre-eemption event. This has the side-effect that the timeslice runs into the second context after the first is completed after a normal promotion event, causing the second context to be swapped out early and switched for a third context. To be more fair, we want to reset the clock after promotion as well. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200113214546.1990139-1-chris@chris-wilson.co.uk commit fe402bd0904979ca4417c0d499b471484e588a9e Author: Martin Blumenstingl Date: Wed Jan 8 00:29:01 2020 +0100 i2c: meson: implement the master_xfer_atomic callback Boards with some of the 32-bit SoCs (mostly Meson8 and Meson8m2) use a Ricoh RN5T618 PMU which acts as system power controller. The driver for the system power controller may need to the I2C bus just before shutting down or rebooting the system. At this stage the interrupts may be disabled already. Implement the master_xfer_atomic callback so the driver for the RN5T618 PMU can communicate properly with the PMU when shutting down or rebooting the board. The CTRL register has a status bit which can be polled to determine when processing has completed. According to the public S805 datasheet the value 0 means "idle" and 1 means "running". Signed-off-by: Martin Blumenstingl Reviewed-by: Neil Armstrong [wsa: converted some whitespace alignment] Signed-off-by: Wolfram Sang commit a4e6f40c77afe6e6a0076c4bcf7cbf68406a7d9f Author: Alexandru Ardelean Date: Tue Dec 10 16:07:55 2019 +0200 iio: imu: adis: use new `delay` structure for SPI transfer delays In a recent change to the SPI subsystem [1], a new `delay` struct was added to replace the `delay_usecs`. This change replaces the current `delay_usecs` with `delay` for this driver. The `spi_transfer_delay_exec()` function [in the SPI framework] makes sure that both `delay_usecs` & `delay` are used (in this order to preserve backwards compatibility). [1] commit bebcfd272df6485 ("spi: introduce `delay` field for `spi_transfer` + spi_transfer_delay_exec()") Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit f81ec5bf0cab29693980abbc983d0971e0efb0ea Author: Olivier Moysan Date: Wed Nov 27 14:10:08 2019 +0100 iio: adc: stm32-dfsdm: adapt sampling rate to oversampling ratio Update sampling rate when oversampling ratio is changed through the IIO ABI. Signed-off-by: Olivier Moysan Acked-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron commit dc26935fb60e8da8d59655dd2ec0de47b20d7d8f Author: Olivier Moysan Date: Wed Nov 27 14:07:29 2019 +0100 iio: adc: stm32-dfsdm: fix single conversion Apply data formatting to single conversion, as this is already done in continuous and trigger modes. Fixes: 102afde62937 ("iio: adc: stm32-dfsdm: manage data resolution in trigger mode") Signed-off-by: Olivier Moysan Cc: Acked-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron commit ecb27c5e430785018199dd42e566711022d32523 Author: Andy Shevchenko Date: Mon Dec 16 19:38:53 2019 +0200 iio: st_sensors: 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 Signed-off-by: Jonathan Cameron commit efc78983d21aeaf692006d42b92a006cdce3ed4d Author: Andy Shevchenko Date: Mon Dec 16 19:38:52 2019 +0200 iio: st_sensors: Drop redundant parameter from st_sensors_of_name_probe() Since we have access to the struct device_driver and thus to the ID table, there is no need to supply special parameters to st_sensors_of_name_probe(). Besides that we have a common API to get driver match data, there is no need to do matching separately for OF and ACPI. Taking into consideration above, simplify the ST sensors code. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit e825070f697abddf3b9b0a675ed0ff1884114818 Author: Andy Shevchenko Date: Tue Dec 17 19:10:38 2019 +0200 iio: st_gyro: Correct data for LSM9DS0 gyro The commit 41c128cb25ce ("iio: st_gyro: Add lsm9ds0-gyro support") assumes that gyro in LSM9DS0 is the same as others with 0xd4 WAI ID, but datasheet tells slight different story, i.e. the first scale factor for the chip is 245 dps, and not 250 dps. Correct this by introducing a separate settings for LSM9DS0. Fixes: 41c128cb25ce ("iio: st_gyro: Add lsm9ds0-gyro support") Depends-on: 45a4e4220bf4 ("iio: gyro: st_gyro: fix L3GD20H support") Cc: Leonard Crestez Cc: Lorenzo Bianconi Cc: Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 47b802d5d80c2fef3ccd9772d518bd602c83cea1 Author: Chen Yu Date: Mon Jan 13 14:07:24 2020 +0800 PCI/PM: Print config space of devices before suspend When resuming from hibernation (S4, also known as "suspend to disk") on a VM, we have seen invalid config space, e.g., serial 0000:00:16.3: restoring config space at offset 0x14 (was 0x9104e000, writing 0xffffffff) To help debug problems like this, log the config space being saved before suspend, similar to the log in pci_restore_config_dword() when resuming. Link: https://lore.kernel.org/r/20200113060724.19571-1-yu.c.chen@intel.com [bhelgaas: commit log] Signed-off-by: Chen Yu Signed-off-by: Bjorn Helgaas Cc: Len Brown commit a2dd9bd9334efb8dc0bdc0109abff3a7b57effb1 Author: Lorenzo Bianconi Date: Thu Jan 2 09:36:29 2020 +0100 iio: imu: st_lsm6dsx: check return value from st_lsm6dsx_sensor_set_enable Add missing return value check in st_lsm6dsx_read_oneshot disabling the sensor. The issue is reported by coverity with the following error: Unchecked return value: If the function returns an error value, the error value may be mistaken for a normal value. Addresses-Coverity-ID: 1446733 ("Unchecked return value") Fixes: b5969abfa8b8 ("iio: imu: st_lsm6dsx: add motion events") Fixes: 290a6ce11d93 ("iio: imu: add support to lsm6dsx driver") Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 4784adc69a80188d842624ab1519e056a67cc0bd Author: Linus Walleij Date: Mon Jan 13 22:26:29 2020 +0100 pinctrl: dt-bindings: Fix some errors in the lgm and pinmux schema This fixes some problems that caused build errors in the lgm-io schema file: - No "bindings" infix in the schema id - Move the allOf inclusion for pinconf and pinmux nodes into the patternProperties for the -pins node - We want "groups" not "group" to be compulsory for a pinmux node blended with a pin config node. - Fix the generic pinmux-schema to list "groups" rather than "group" for a pinmux node, this might have led to some confusion. This is a first user of the generic schema so a bit of a bumpy road. Cc: Rob Herring Cc: Rahul Tanwar Signed-off-by: Linus Walleij commit 3b42a4c83a31d8f1d8a7cb7eb2f4ee809d42c69d Author: Masami Hiramatsu Date: Fri Dec 20 11:31:43 2019 +0900 tracing: trigger: Replace unneeded RCU-list traversals With CONFIG_PROVE_RCU_LIST, I had many suspicious RCU warnings when I ran ftracetest trigger testcases. ----- # dmesg -c > /dev/null # ./ftracetest test.d/trigger ... # dmesg | grep "RCU-list traversed" | cut -f 2 -d ] | cut -f 2 -d " " kernel/trace/trace_events_hist.c:6070 kernel/trace/trace_events_hist.c:1760 kernel/trace/trace_events_hist.c:5911 kernel/trace/trace_events_trigger.c:504 kernel/trace/trace_events_hist.c:1810 kernel/trace/trace_events_hist.c:3158 kernel/trace/trace_events_hist.c:3105 kernel/trace/trace_events_hist.c:5518 kernel/trace/trace_events_hist.c:5998 kernel/trace/trace_events_hist.c:6019 kernel/trace/trace_events_hist.c:6044 kernel/trace/trace_events_trigger.c:1500 kernel/trace/trace_events_trigger.c:1540 kernel/trace/trace_events_trigger.c:539 kernel/trace/trace_events_trigger.c:584 ----- I investigated those warnings and found that the RCU-list traversals in event trigger and hist didn't need to use RCU version because those were called only under event_mutex. I also checked other RCU-list traversals related to event trigger list, and found that most of them were called from event_hist_trigger_func() or hist_unregister_trigger() or register/unregister functions except for a few cases. Replace these unneeded RCU-list traversals with normal list traversal macro and lockdep_assert_held() to check the event_mutex is held. Link: http://lkml.kernel.org/r/157680910305.11685.15110237954275915782.stgit@devnote2 Reviewed-by: Tom Zanussi Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 5422d87d2cc38a5849175e3294967e7df3420b64 Author: Zhang Xiaoxu Date: Mon Jan 13 16:19:42 2020 +0800 drm/i915: Fix too few arguments to function i915_capture_error_state If 'CONFIG_DRM_I915_CAPTURE_ERROR' not configured, there is an error when compile the kernel: drivers/gpu/drm/i915/gt/intel_reset.c: In function intel_gt_handle_error: drivers/gpu/drm/i915/gt/intel_reset.c:1233:3: error: too few arguments to function i915_capture_error_state i915_capture_error_state(gt->i915); ^~~~~~~~~~~~~~~~~~~~~~~~ In file included from ./drivers/gpu/drm/i915/i915_drv.h:97:0, from ./drivers/gpu/drm/i915/display/intel_display_types.h:46, from drivers/gpu/drm/i915/gt/intel_reset.c:10: ./drivers/gpu/drm/i915/i915_gpu_error.h:267:20: note: declared here static inline void i915_capture_error_state(struct drm_i915_private *dev_priv, Fixes: 742379c0c400 ("drm/i915: Start chopping up the GPU error capture") Reported-by: Hulk Robot Signed-off-by: Zhang Xiaoxu Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200113081942.15982-1-zhangxiaoxu5@huawei.com commit 59be9b9c4f3bee1aa312a28a1f1f368536c82525 Author: Zhang Xiaoxu Date: Mon Jan 13 18:40:09 2020 +0800 drm/i915: Fix multiple definition of 'i915_vma_capture_finish' If 'CONFIG_DRM_I915_CAPTURE_ERROR' not configured, there are some errors like: drivers/gpu/drm/i915/i915_irq.o: In function `i915_vma_capture_finish': ./drivers/gpu/drm/i915/i915_gpu_error.h:312: multiple definition of `i915_vma_capture_finish' drivers/gpu/drm/i915/i915_drv.o: ./drivers/gpu/drm/i915/i915_gpu_error.h:312: first defined here So, add 'static inline' on the defineation of the 'i915_vma_capture_finish' Fixes: d713e3ab93fdc("drm/i915: Correct typo in i915_vma_compress_finish stub") Reported-by: Hulk Robot Signed-off-by: Zhang Xiaoxu Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200113104009.13274-1-zhangxiaoxu5@huawei.com commit 873dfd7881d1d8840bf69c8c164f5323db7417fa Author: Sargun Dhillon Date: Tue Jan 7 09:59:27 2020 -0800 test: Add test for pidfd getfd The following tests: * Fetch FD, and then compare via kcmp * Make sure getfd can be blocked by blocking ptrace_may_access * Making sure fetching bad FDs fails * Make sure trying to set flags to non-zero results in an EINVAL Signed-off-by: Sargun Dhillon Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20200107175927.4558-5-sargun@sargun.me Signed-off-by: Christian Brauner commit 9a2cef09c801de54feecd912303ace5c27237f12 Author: Sargun Dhillon Date: Tue Jan 7 09:59:26 2020 -0800 arch: wire up pidfd_getfd syscall This wires up the pidfd_getfd syscall for all architectures. Signed-off-by: Sargun Dhillon Acked-by: Christian Brauner Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200107175927.4558-4-sargun@sargun.me Signed-off-by: Christian Brauner commit 8649c322f75c96e7ced2fec201e123b2b073bf09 Author: Sargun Dhillon Date: Tue Jan 7 09:59:25 2020 -0800 pid: Implement pidfd_getfd syscall This syscall allows for the retrieval of file descriptors from other processes, based on their pidfd. This is possible using ptrace, and injection of parasitic code to inject code which leverages SCM_RIGHTS to move file descriptors between a tracee and a tracer. Unfortunately, ptrace comes with a high cost of requiring the process to be stopped, and breaks debuggers. This does not require stopping the process under manipulation. One reason to use this is to allow sandboxers to take actions on file descriptors on the behalf of another process. For example, this can be combined with seccomp-bpf's user notification to do on-demand fd extraction and take privileged actions. One such privileged action is binding a socket to a privileged port. /* prototype */ /* flags is currently reserved and should be set to 0 */ int sys_pidfd_getfd(int pidfd, int fd, unsigned int flags); /* testing */ Ran self-test suite on x86_64 Signed-off-by: Sargun Dhillon Acked-by: Christian Brauner Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200107175927.4558-3-sargun@sargun.me Signed-off-by: Christian Brauner commit 5e876fb43dbf24c941a323139752bcb2f0a80da0 Author: Sargun Dhillon Date: Tue Jan 7 09:59:24 2020 -0800 vfs, fdtable: Add fget_task helper This introduces a function which can be used to fetch a file, given an arbitrary task. As long as the user holds a reference (refcnt) to the task_struct it is safe to call, and will either return NULL on failure, or a pointer to the file, with a refcnt. This patch is based on Oleg Nesterov's (cf. [1]) patch from September 2018. [1]: Link: https://lore.kernel.org/r/20180915160423.GA31461@redhat.com Signed-off-by: Sargun Dhillon Suggested-by: Oleg Nesterov Acked-by: Christian Brauner Reviewed-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200107175927.4558-2-sargun@sargun.me Signed-off-by: Christian Brauner commit 57d6c2eb735a0e08d7e0bbd985ec3ebc5fcaf214 Author: Rob Clark Date: Tue Jan 7 16:28:41 2020 -0800 dt-bindings: drm/msm/gpu: Document firmware-name The firmware-name property in the zap node can be used to specify a device specific zap firmware. Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson commit 3522b4b281e99db9010d8ce76459d980d67f394d Author: Rob Clark Date: Sun Jan 12 11:39:25 2020 -0800 drm/msm: allow zapfw to not be specified in gpulist For newer devices we want to require the path to come from the firmware-name property in the zap-shader dt node. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson commit 6a0dea02c2c4fabacaef639b215b1cbbbea662a6 Author: Rob Clark Date: Tue Jan 7 16:24:16 2020 -0800 drm/msm: support firmware-name for zap fw (v2) Since zap firmware can be device specific, allow for a firmware-name property in the zap node to specify which firmware to load, similarly to the scheme used for dsp/wifi/etc. v2: only need a single error msg when we can't load from firmware-name specified path, and fix comment [Bjorn A.] Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Reviewed-by: Bjorn Andersson commit b0d126e1d64e76f165dc9ce6a4b02497c48053fb Author: Srinivas Kandagatla Date: Tue Jan 7 13:08:43 2020 +0000 dt-bindings: gpio: wcd934x: Add bindings for gpio Qualcomm Technologies Inc WCD9340/WCD9341 Audio Codec has integrated gpio controller to control 5 gpios on the chip. This patch adds required device tree bindings for it. Signed-off-by: Srinivas Kandagatla Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20200107130844.20763-2-srinivas.kandagatla@linaro.org Signed-off-by: Linus Walleij commit 5c55cfd6a553d008fcd54e4a4e3fed1340ee5090 Author: Jason Gunthorpe Date: Wed Jan 8 19:22:06 2020 +0200 RDMA/core: Use READ_ONCE for ib_ufile.async_file The writer for async_file holds the ucontext_lock, while the readers are left unlocked. Most readers rely on an implicit locking, either by having a uobject (which cannot be created before a context) or by holding the ib_ufile kref. However ib_uverbs_free_hw_resources() has no implicit lock and has a possible race. Make this all clear and sane by using READ_ONCE consistently. Link: https://lore.kernel.org/r/1578504126-9400-15-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit 3e032c0e92aa0c4c0b46c5e2d6d41706c8fce488 Author: Jason Gunthorpe Date: Wed Jan 8 19:22:05 2020 +0200 RDMA/core: Make ib_uverbs_async_event_file into a uobject This makes async events aligned with completion events as both are full uobjects of FD type and use the same uobject lifecycle. A bunch of duplicate code is consolidated and the general flow between the two FDs is now very similar. Link: https://lore.kernel.org/r/1578504126-9400-14-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit 39e83af817610e80a9582df94d44173bcb6f85e4 Author: Jason Gunthorpe Date: Wed Jan 8 19:22:04 2020 +0200 RDMA/core: Remove the ufile arg from rdma_alloc_begin_uobject Now that all callers provide a non-NULL attrs the ufile is redundant. Adjust things so that the context handling is done inside alloc_uobj, and the ib_uverbs_get_ucontext_file() is avoided if we already have the context. Link: https://lore.kernel.org/r/1578504126-9400-13-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit 817d65765069d1e7dee97473a6465947db1bea80 Author: Jason Gunthorpe Date: Wed Jan 8 19:22:02 2020 +0200 RDMA/core: Simplify type usage for ib_uverbs_async_handler() This function works on an ib_uverbs_async_file. Accept that as a parameter instead of the struct ib_uverbs_file. Consoldiate all the callers working from an ib_uevent_object to a single function and locate the async_file directly from the struct ib_uobject instead of using context_ptr. Link: https://lore.kernel.org/r/1578504126-9400-11-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit e04dd13159b0ddc0ff7f5e110bf99af3c65fabd3 Author: Jason Gunthorpe Date: Wed Jan 8 19:22:01 2020 +0200 RDMA/core: Do not erase the type of ib_wq.uobject This is a struct ib_uwq_object pointer, instead of using container_of() all over the place just store it with its actual type. Link: https://lore.kernel.org/r/1578504126-9400-10-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit 9fbe334c6a67c3c09f187e4b9b0e6eaf0ad31429 Author: Jason Gunthorpe Date: Wed Jan 8 19:22:00 2020 +0200 RDMA/core: Do not erase the type of ib_srq.uobject This is a struct ib_usrq_object pointer, instead of using container_of() all over the place just store it with its actual type. Link: https://lore.kernel.org/r/1578504126-9400-9-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit 620d3f8176cbb3a9c0c7962a05fb15310a9998d4 Author: Jason Gunthorpe Date: Wed Jan 8 19:21:59 2020 +0200 RDMA/core: Do not erase the type of ib_qp.uobject This is a struct ib_uqp_object pointer, instead of using container_of() all over the place just store it with its actual type. Link: https://lore.kernel.org/r/1578504126-9400-8-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit 5bd48c18c8cea0154800b40ec75201fa71684312 Author: Jason Gunthorpe Date: Wed Jan 8 19:21:58 2020 +0200 RDMA/core: Do not erase the type of ib_cq.uobject This is a struct ib_ucq_object pointer, instead of using container_of() all over the place just store it with its actual type. Link: https://lore.kernel.org/r/1578504126-9400-7-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit 4ec1dcfcdf3756555adb5122c2443ea27741296a Author: Jason Gunthorpe Date: Wed Jan 8 19:21:57 2020 +0200 RDMA/core: Make ib_ucq_object use ib_uevent_object Any uobject that sends events into the async_event_file should be using ib_uevent_object so it can use the standard uevent based helper functions. CQ pushes events into both the async_event and the comp_channel in an open coded way. Move the async events related stuff to ib_uevent_object. Link: https://lore.kernel.org/r/1578504126-9400-6-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit 849e149063bd10eb6211c14617491a0bc9516c2f Author: Jason Gunthorpe Date: Wed Jan 8 19:21:56 2020 +0200 RDMA/core: Do not allow alloc_commit to fail This is a left over from an earlier version that creates a lot of complexity for error unwind, particularly for FD uobjects. The only reason this was done is so that anon_inode_get_file() could be called with the final fops and a fully setup uobject. Both need to be setup since unwinding anon_inode_get_file() via fput will call the driver's release(). Now that the driver does not provide release, we no longer need to worry about this complicated sequence, simply create the struct file at the start and allow the core code's release function to deal with the abort case. This allows all the confusing error paths around commit to be removed. Link: https://lore.kernel.org/r/1578504126-9400-5-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit 93887e66ff3c1a62c36a7f0eca9445063399b39d Author: Jason Gunthorpe Date: Wed Jan 8 19:21:55 2020 +0200 RDMA/mlx5: Simplify devx async commands With the new FD structure the async commands do not need to hold any references while running. The existing mlx5_cmd_exec_cb() and mlx5_cmd_cleanup_async_ctx() provide enough synchronization to ensure that all outstanding commands are completed before the uobject can be destructed. Remove the now confusing get_file() and the type erasure of the devx_async_cmd_event_file. Link: https://lore.kernel.org/r/1578504126-9400-4-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit f7c8416ccea52b41e29227b3a5066540f51ee471 Author: Jason Gunthorpe Date: Wed Jan 8 19:21:54 2020 +0200 RDMA/core: Simplify destruction of FD uobjects FD uobjects have a weird split between the struct file and uobject world. Simplify this to make them pure uobjects and use a generic release method for all struct file operations. This fixes the control flow so that mlx5_cmd_cleanup_async_ctx() is always called before erasing the linked list contents to make the concurrancy simpler to understand. For this to work the uobject destruction must fence anything that it is cleaning up - the design must not rely on struct file lifetime. Only deliver_event() relies on the struct file to when adding new events to the queue, add a is_destroyed check under lock to block it. Link: https://lore.kernel.org/r/1578504126-9400-3-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit 6898d1c661d79f4707d8ba82991b2195822780ca Author: Jason Gunthorpe Date: Wed Jan 8 19:21:53 2020 +0200 RDMA/mlx5: Use RCU and direct refcounts to keep memory alive dispatch_event_fd() runs from a notifier with minimal locking, and relies on RCU and a file refcount to keep the uobject and eventfd alive. As the next patch wants to remove the file_operations release function from the drivers, re-organize things so that the devx_event_notifier() path uses the existing RCU to manage the lifetime of the uobject and eventfd. Move the refcount puts to a call_rcu so that the objects are guaranteed to exist and remove the indirect file refcount. Link: https://lore.kernel.org/r/1578504126-9400-2-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Signed-off-by: Jason Gunthorpe commit 8bdf9dd984c18375d1090ddeb1792511f619c5c1 Author: Jason Gunthorpe Date: Mon Jan 13 14:33:10 2020 +0000 RDMA/uverbs: Remove needs_kfree_rcu from uverbs_obj_type_class After device disassociation the uapi_objects are destroyed and freed, however it is still possible that core code can be holding a kref on the uobject. When it finally goes to uverbs_uobject_free() via the kref_put() it can trigger a use-after-free on the uapi_object. Since needs_kfree_rcu is a micro optimization that only benefits file uobjects, just get rid of it. There is no harm in using kfree_rcu even if it isn't required, and the number of involved objects is small. Link: https://lore.kernel.org/r/20200113143306.GA28717@ziepe.ca Signed-off-by: Michael Guralnik Signed-off-by: Jason Gunthorpe commit f489b13dae02a0217b9702913074526d3669bdc8 Author: Rob Clark Date: Sun Jan 12 11:54:00 2020 -0800 arm64: dts: qcom: sdm845: move gpu zap nodes to per-device dts We want to specify per-device firmware-name, so move the zap node into the .dts file for individual boards/devices. This lets us get rid of the /delete-node/ for cheza, which does not use zap. Reviewed-by: Bjorn Andersson Signed-off-by: Rob Clark Link: https://lore.kernel.org/r/20200112195405.1132288-5-robdclark@gmail.com Signed-off-by: Bjorn Andersson commit d0d2d8ba0494655a01b97542c083e51b29cf8637 Author: Guoqing Jiang Date: Mon Dec 23 10:49:02 2019 +0100 md/raid1: introduce wait_for_serialization Previously, we call check_and_add_serial when serialization is enabled for write IO, but it could allocate and free memory back and forth. Now, let's just get an element from memory pool with the new function, then insert node to rb tree if no collision happens. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit 025471f9f50fede6527c70336484becbcb2aff28 Author: Guoqing Jiang Date: Mon Dec 23 10:49:01 2019 +0100 md/raid1: use bucket based mechanism for IO serialization Since raid1 had already used bucket based mechanism to reduce the conflict between write IO and resync IO, it is possible to speed up performance for io serialization with refer to the same mechanism. To align with the barrier bucket mechanism, we created arrays (with the same number of BARRIER_BUCKETS_NR) for spinlock, rb tree and waitqueue. Then we can reduce lock competition with multiple spinlocks, boost search performance with multiple rb trees and also reduce thundering herd problem with multiple waitqueues. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit 69b00b5bb23552d43e8bbed73ef6624604bb94a2 Author: Guoqing Jiang Date: Mon Dec 23 10:49:00 2019 +0100 md: introduce a new struct for IO serialization Obviously, IO serialization could cause the degradation of performance a lot. In order to reduce the degradation, so a rb interval tree is added in raid1 to speed up the check of collision. So, a rb root is needed in md_rdev, then abstract all the serialize related members to a new struct (serial_in_rdev), embed it into md_rdev. Of course, we need to free the struct if it is not needed anymore, so rdev/rdevs_uninit_serial are added accordingly. And they should be called when destroty memory pool or can't alloc memory. And we need to consider to call mddev_destroy_serial_pool in case serialize_policy/write-behind is disabled, bitmap is destroyed or in __md_stop_writes. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit 4d26d32fe4dafd29e168addb7c11949a36e7e5f8 Author: Guoqing Jiang Date: Mon Dec 23 10:48:59 2019 +0100 md: don't destroy serial_info_pool if serialize_policy is true The serial_info_pool is needed if array sets serialize_policy to true, so don't destroy it. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit 69df9cfc70421fb7949e8f7a19bfc36600b5522b Author: Guoqing Jiang Date: Mon Dec 23 10:48:58 2019 +0100 raid1: serialize the overlap write Before dispatch write bio, raid1 array which enables serialize_policy need to check if overlap exists between this bio and previous on-flying bios. If there is overlap, then it has to wait until the collision is disappeared. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit de31ee949739aba9ce7dbb8b10e72c6fce0e76c7 Author: Guoqing Jiang Date: Mon Dec 23 10:48:57 2019 +0100 md: reorgnize mddev_create/destroy_serial_pool So far, IO serialization is used for two scenarios: 1. raid1 which enables write-behind mode, and there is rdev in the array which is multi-queue device and flaged with writemostly. 2. IO serialization is enabled or disabled by change serialize_policy. So introduce rdev_need_serial to check the first scenario. And for 1, IO serialization is enabled automatically while 2 is controlled manually. And it is possible that both scenarios are true, so for create serial pool, rdev/rdevs_init_serial should be separate from check if the pool existed or not. Then for destroy pool, we need to check if the pool is needed by other rdevs due to the first scenario. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit 3938f5fb82aedbf39792ffee448c61c819e6ab38 Author: Guoqing Jiang Date: Mon Dec 23 10:48:56 2019 +0100 md: add serialize_policy sysfs node for raid1 With the new sysfs node, we can use it to control if raid1 array wants io serialization or not. So mddev_create_serial_pool and mddev_destroy_serial_pool are called in serialize_policy_store to enable or disable the serialization. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit 11d3a9f65018c9fb3d4f2032aec76af2ba98431c Author: Guoqing Jiang Date: Mon Dec 23 10:48:55 2019 +0100 md: prepare for enable raid1 io serialization 1. The related resources (spin_lock, list and waitqueue) are needed for address raid1 reorder overlap issue too, in this case, rdev is set to NULL for mddev_create/destroy_serial_pool which implies all rdevs need to handle these resources. And also add "is_suspend" to mddev_destroy_serial_pool since it will be called under suspended situation, which also makes both create and destroy pool have same arguments. 2. Introduce rdevs_init_serial which is called if raid1 io serialization is enabled since all rdevs need to init related stuffs. 3. rdev_init_serial and clear_bit(CollisionCheck, &rdev->flags) should be called between suspend and resume. No need to export mddev_create_serial_pool since it is only called in md-mod module. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit 3e173ab55b990d2b4ceb90bf55a88a96eb88598e Author: Guoqing Jiang Date: Mon Dec 23 10:48:54 2019 +0100 md: fix a typo s/creat/create It actually means create here, so fix the typo. Reported-by: Song Liu Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit 404659cf1e2570dad3cd117fa3bd71f06ecfd142 Author: Guoqing Jiang Date: Mon Dec 23 10:48:53 2019 +0100 md: rename wb stuffs Previously, wb_info_pool and wb_list stuffs are introduced to address potential data inconsistence issue for write behind device. Now rename them to serial related name, since the same mechanism will be used to address reorder overlap write issue for raid1. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit d2c9ad41249ac862d3a3a4d5d56e6b1cd79d8a17 Author: Guoqing Jiang Date: Fri Dec 20 15:46:29 2019 +0100 raid5: remove worker_cnt_per_group argument from alloc_thread_groups We can use "cnt" directly to update conf->worker_cnt_per_group if alloc_thread_groups returns 0. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit f591df3cc6d60cadf8ceff5d44af73ea6ba0a39a Author: Zhengyuan Liu Date: Fri Dec 20 10:21:28 2019 +0800 md/raid6: fix algorithm choice under larger PAGE_SIZE There are several algorithms available for raid6 to generate xor and syndrome parity, including basic int1, int2 ... int32 and SIMD optimized implementation like sse and neon. To test and choose the best algorithms at the initial stage, we need provide enough disk data to feed the algorithms. However, the disk number we provided depends on page size and gfmul table, seeing bellow: const int disks = (65536/PAGE_SIZE) + 2; So when come to 64K PAGE_SIZE, there is only one data disk plus 2 parity disk, as a result the chosed algorithm is not reliable. For example, on my arm64 machine with 64K page enabled, it will choose intx32 as the best one, although the NEON implementation is better. This patch tries to fix the problem by defining a constant raid6 disk number to supporting arbitrary page size. Suggested-by: H. Peter Anvin Signed-off-by: Zhengyuan Liu Signed-off-by: Song Liu commit 5e5ac01c2b8802921fee680518a986011cb59820 Author: Zhengyuan Liu Date: Fri Dec 20 10:21:27 2019 +0800 raid6/test: fix a compilation warning The compilation warning is redefination showed as following: In file included from tables.c:2: ../../../include/linux/export.h:180: warning: "EXPORT_SYMBOL" redefined #define EXPORT_SYMBOL(sym) __EXPORT_SYMBOL(sym, "") In file included from tables.c:1: ../../../include/linux/raid/pq.h:61: note: this is the location of the previous definition #define EXPORT_SYMBOL(sym) Fixes: 69a94abb82ee ("export.h, genksyms: do not make genksyms calculate CRC of trimmed symbols") Signed-off-by: Zhengyuan Liu Signed-off-by: Song Liu commit 6b8651aac1dca6140dd7fb4c9fec2736ed3f6223 Author: Zhengyuan Liu Date: Fri Dec 20 10:21:26 2019 +0800 raid6/test: fix a compilation error The compilation error is redeclaration showed as following: In file included from ../../../include/linux/limits.h:6, from /usr/include/x86_64-linux-gnu/bits/local_lim.h:38, from /usr/include/x86_64-linux-gnu/bits/posix1_lim.h:161, from /usr/include/limits.h:183, from /usr/lib/gcc/x86_64-linux-gnu/8/include-fixed/limits.h:194, from /usr/lib/gcc/x86_64-linux-gnu/8/include-fixed/syslimits.h:7, from /usr/lib/gcc/x86_64-linux-gnu/8/include-fixed/limits.h:34, from ../../../include/linux/raid/pq.h:30, from algos.c:14: ../../../include/linux/types.h:114:15: error: conflicting types for ‘int64_t’ typedef s64 int64_t; ^~~~~~~ In file included from /usr/include/stdint.h:34, from /usr/lib/gcc/x86_64-linux-gnu/8/include/stdint.h:9, from /usr/include/inttypes.h:27, from ../../../include/linux/raid/pq.h:29, from algos.c:14: /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: note: previous \ declaration of ‘int64_t’ was here typedef __int64_t int64_t; Fixes: 54d50897d544 ("linux/kernel.h: split *_MAX and *_MIN macros into ") Signed-off-by: Zhengyuan Liu Signed-off-by: Song Liu commit 55180498dfd5f3c7e2d2c0e470f7cede1acee248 Author: Zhiqiang Liu Date: Sat Dec 7 11:00:08 2019 +0800 md-bitmap: small cleanups In md_bitmap_unplug, bitmap->storage.filemap is double checked. In md_bitmap_daemon_work, bitmap->storage.filemap should be checked before reference. Signed-off-by: Zhiqiang Liu Signed-off-by: Song Liu commit 9db8dc6d0785225c42a37be7b44d1b07b31b8957 Author: Logan Gunthorpe Date: Wed Jan 8 14:32:08 2020 -0700 PCI: Don't disable bridge BARs when assigning bus resources Some PCI bridges implement BARs in addition to bridge windows. For example, here's a PLX switch: 04:00.0 PCI bridge: PLX Technology, Inc. PEX 8724 24-Lane, 6-Port PCI Express Gen 3 (8 GT/s) Switch, 19 x 19mm FCBGA (rev ca) (prog-if 00 [Normal decode]) Flags: bus master, fast devsel, latency 0, IRQ 30, NUMA node 0 Memory at 90a00000 (32-bit, non-prefetchable) [size=256K] Bus: primary=04, secondary=05, subordinate=0a, sec-latency=0 I/O behind bridge: 00002000-00003fff Memory behind bridge: 90000000-909fffff Prefetchable memory behind bridge: 0000380000800000-0000380000bfffff Previously, when the kernel assigned resource addresses (with the pci=realloc command line parameter, for example) it could clear the struct resource corresponding to the BAR. When this happened, lspci would report this BAR as "ignored": Region 0: Memory at (32-bit, non-prefetchable) [size=256K] This is because the kernel reports a zero start address and zero flags in the corresponding sysfs resource file and in /proc/bus/pci/devices. Investigation with 'lspci -x', however, shows the BIOS-assigned address will still be programmed in the device's BAR registers. It's clearly a bug that the kernel lost track of the BAR value, but in most cases, this still won't result in a visible issue because nothing uses the memory, so nothing is affected. However, when an IOMMU is in use, it will not reserve this space in the IOVA because the kernel no longer thinks the range is valid. (See dmar_init_reserved_ranges() for the Intel implementation of this.) Without the proper reserved range, a DMA mapping may allocate an IOVA that matches a bridge BAR, which results in DMA accesses going to the BAR instead of the intended RAM. The problem was in pci_assign_unassigned_root_bus_resources(). When any resource from a bridge device fails to get assigned, the code set the resource's flags to zero. This makes sense for bridge windows, as they will be re-enabled later, but for regular BARs, it makes the kernel permanently lose track of the fact that they decode address space. Change pci_assign_unassigned_root_bus_resources() and pci_assign_unassigned_bridge_resources() so they only clear "res->flags" for bridge *windows*, not bridge BARs. Fixes: da7822e5ad71 ("PCI: update bridge resources to get more big ranges when allocating space (again)") Link: https://lore.kernel.org/r/20200108213208.4612-1-logang@deltatee.com [bhelgaas: commit log, check for pci_is_bridge()] Reported-by: Kit Chow Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit d07706276b4c592c3b24f9c646157172455955da Author: Bjorn Andersson Date: Mon Jan 13 11:03:41 2020 -0800 arm64: dts: qcom: sm8150: Hard code rpmhpd constants I missed the fact that these constants was not yet available, so hard code their values in the dts to make the branch compile on its own. Signed-off-by: Bjorn Andersson commit 0d559d05a2ad632af0fc3d12288da6212193fa09 Author: Vadim Pasternak Date: Mon Jan 13 16:28:39 2020 +0000 platform/x86: mlx-platform: Add support for next generation systems Add support for new Mellanox system types of basic class VMOD0010, containing new Mellanox systems equipped with new switch device Spectrum 3 (32x400GbE/64x200G/128x100G Ethernet switch). These are the Top of the Rack 1U/2U/4U systems, equipped with Mellanox Comex card and with the switch board with Mellanox Spectrum-3 device. This class of devices can be equipped with two PS units for 1U/2U or with four PS units for 4U systems. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 0e41bf06eefe969ee5092f4ec55ae1b0ff9c1ea0 Author: Vadim Pasternak Date: Mon Jan 13 16:28:38 2020 +0000 platform/mellanox: mlxreg-hotplug: Add support for new capability register Add support for capability register, which is used for detection of the actual number of interrupt capable components within the particular group, supported by the specific system. Such components could be for example the number of power units and interrupts related to these units. The motivation is to avoid adding a new code in the future in order to distinct between the systems type supported different number of the components like power supplies, FANs, ASICs, line cards. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 4845460421d433dc41b53ea903f1ab55900184bf Author: Vadim Pasternak Date: Mon Jan 13 16:28:37 2020 +0000 platform/x86: mlx-platform: Add support for new capability register Add support for capability register, which contains information about the number of PS units equipped on the system and about minimum I2C frequency supported by the all system's I2C devices. Utilization of this register allows to avoid necessity of providing new system description, in case it differs in number of PS units or in minimal I2C frequency. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit bdd6e155e0d641c3607bb59169d6caa10235bb40 Author: Vadim Pasternak Date: Mon Jan 13 16:28:36 2020 +0000 platform/x86: mlx-platform: Add support for new system type Add support for new Mellanox system types of basic class VMOD0009, containing Mellanox systems equipped with the switch devices Spectrum 1 (32x100GbE Ethernet switch) and Switch-IB/Switch-IB2 (36x100Gbe InfiniBand switch). These are the Top of the Rack system, equipped with Mellanox Comex card. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit fcd50dbf306a0814a92625a6e41df3fb5a77a594 Author: Vadim Pasternak Date: Mon Jan 13 16:28:35 2020 +0000 platform/x86: mlx-platform: Set system mux configuration based on system type Separate assignment for systems mux configuration based on system type, instead of setting the same configuration for the all. The motivation is to allow introduction of new systems types with the different mux topology. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 435d7e10c462dcda5434e8024a52212bf0dadf75 Author: Vadim Pasternak Date: Mon Jan 13 16:28:34 2020 +0000 Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces Add documentation for the new attributes for: - Exposing reset causes types asserted by: platform reset, SoC reset, AC power failure, software power off request. - Setting and removing system VPD (EEPROM) hardware write protection. - Voltage regulator devices configuration update status and firmware version. - Setting PCIe ASIC reset to disable or enable state during PCIe root complex reset. - System static topology identification, like system's static I2C topology, number and type of FPGA devices within the system and so on. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 1b5937cb631e7fce54ab8d6517ed6c659598df48 Author: Vadim Pasternak Date: Mon Jan 13 16:28:33 2020 +0000 platform/x86: mlx-platform: Add more definitions for system attributes Add new attributes for "next-generation" type systems: - Reset cause indication, when system reset has been caused by the platform reset request through CPLD, by AC power failure, by software power off request through CPLD. by signal asserted by SOC through ACPI register. It introduces more reset causes, which can be monitored after the reboots. - Setting and removing system VPD (EEPROM) hardware write protection. It allows to access VPD during production cycle and prevents VPD corruption on system in field. - Voltage regulator devices configuration update status and version. It allows to monitor configuration update status and current active version for such sort of devices. - PCIe ASIC reset disable - when set ASIC will go down upon PCIe root complex reset, otherwise ASIC will stay up during PCIe root complex reset. - System configuration Ids to provide system static topology identification, like system's static I2C topology, number and type of FPGA devices within the system and so on. Add the existing attribute for "iio" bank selection for system type "msn21xx". All the above attributes are exposed through "sysfs" by "mlxreg-io" driver. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 5358c1114d1d22777c72bdcceee204b586c6e8e1 Author: Vadim Pasternak Date: Mon Jan 13 16:28:32 2020 +0000 Documentation/ABI: Style changes Remove blank lines between "What" and "Date" keywords. Start each section with "What" keyword. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 74e56f5fde62c637e484d45ac1835ddf476ccee1 Author: Vadim Pasternak Date: Mon Jan 13 16:28:31 2020 +0000 Documentation/ABI: Add missed attribute for mlxreg-io sysfs interfaces Add missed "cpld4_version" attribute. Fixes: 52675da1d087 ("Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces") Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit eea97b258fca302f0d68c8313f4f63407be57179 Author: Vadim Pasternak Date: Mon Jan 13 16:28:30 2020 +0000 Documentation/ABI: Fix documentation inconsistency for mlxreg-io sysfs interfaces Fix attribute name from "jtag_enable", which described twice to "cpld3_version", which is expected to be instead of second appearance of "jtag_enable". Fixes: 2752e34442b5 ("Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces") Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 8029660db6968656db73ddcc30168bea86be9836 Author: Vadim Pasternak Date: Mon Jan 13 16:28:29 2020 +0000 platform/x86: mlx-platform: Cosmetic changes Remove redundant semicolons at the end of few functions. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit d81d18fd347ca911943106f5af053f9c0f602f81 Author: Srinivas Pandruvada Date: Mon Jan 13 10:00:15 2020 -0800 MAINTAINERS: Update for the intel uncore frequency control Add an entry for drivers/platform/x86/intel-uncore-frequency.c. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 49a474c7ba51ce999803c269adbad778495589af Author: Srinivas Pandruvada Date: Mon Jan 13 10:00:14 2020 -0800 platform/x86: Add support for Uncore frequency control Some server users set limits on the uncore frequency using MSR 620H, while running latency sensitive workloads. Here uncore frequency controls RING/LLC(last-level cache) clocks. But MSR control is not always possible from the user space, so this driver provides a sysfs interface to set max and min frequency limits. This MSR 620H is a die scoped in multi-die system or package scoped in non multi-die systems. When this driver is loaded, a new directory is created under /sys/devices/system/cpu. For example on a two package Skylake server: $cd /sys/devices/system/cpu/intel_uncore_frequency $ls package_00_die_00 package_01_die_00 $ls package_00_die_00 max_freq_khz min_freq_khz initial_max_freq_khz initial_min_freq_khz $grep . * max_freq_khz:2400000 min_freq_khz:1200000 initial_max_freq_khz:2400000 initial_min_freq_khz:1200000 Here, initial_max_freq_khz and initial_min_freq_khz are read only attributes to show power up or initial values of max and min frequencies respectively. Other attributes are read-write, so that users can modify. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 3d9f44ef75533093250810623ec67e97e2800bbf Author: Geert Uytterhoeven Date: Sun Jan 12 17:52:29 2020 +0100 tc: Make tc_match_device() static Unlike its PCI counterpart, tc_match_device() was never used outside the TURBOchannel bus code. Signed-off-by: Geert Uytterhoeven Signed-off-by: Paul Burton Cc: Maciej W . Rozycki Cc: Ralf Baechle Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 70eec920d4f22551a3bddd88dff0f6797db5b30b Author: Geert Uytterhoeven Date: Sun Jan 12 17:51:10 2020 +0100 MIPS: ip22-gio: Make gio_match_device() static Unlike its PCI counterpart, gio_match_device() was never used outside the GIO bus code. Signed-off-by: Geert Uytterhoeven Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 8f63aaf5c493c6502a058585cdfa3c71cdf8c44a Author: Sean Christopherson Date: Fri Dec 20 20:45:13 2019 -0800 KVM: VMX: Allow KVM_INTEL when building for Centaur and/or Zhaoxin CPUs Change the dependency for KVM_INTEL, i.e. KVM w/ VMX, from Intel CPUs to any CPU that supports the IA32_FEAT_CTL MSR and thus VMX functionality. This effectively allows building KVM_INTEL for Centaur and Zhaoxin CPUs. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-20-sean.j.christopherson@intel.com commit 616c59b52342b0370ab822ce88fa0ff7f3671e4a Author: Sean Christopherson Date: Fri Dec 20 20:45:12 2019 -0800 perf/x86: Provide stubs of KVM helpers for non-Intel CPUs Provide stubs for perf_guest_get_msrs() and intel_pt_handle_vmx() when building without support for Intel CPUs, i.e. CPU_SUP_INTEL=n. Lack of stubs is not currently a problem as the only user, KVM_INTEL, takes a dependency on CPU_SUP_INTEL=y. Provide the stubs for all CPUs so that KVM_INTEL can be built for any CPU with compatible hardware support, e.g. Centuar and Zhaoxin CPUs. Note, the existing stub for perf_guest_get_msrs() is essentially dead code as KVM selects CONFIG_PERF_EVENTS, i.e. the only user guarantees the full implementation is built. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-19-sean.j.christopherson@intel.com commit b39033f504a7eda15dcb2465679b8d46651b3645 Author: Sean Christopherson Date: Fri Dec 20 20:45:11 2019 -0800 KVM: VMX: Use VMX_FEATURE_* flags to define VMCS control bits Define the VMCS execution control flags (consumed by KVM) using their associated VMX_FEATURE_* to provide a strong hint that new VMX features are expected to be added to VMX_FEATURE and considered for reporting via /proc/cpuinfo. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-18-sean.j.christopherson@intel.com commit ff10e22e65f2b4d5d09805dd9e7194b93e303eb1 Author: Sean Christopherson Date: Fri Dec 20 20:45:10 2019 -0800 KVM: VMX: Check for full VMX support when verifying CPU compatibility Explicitly check the current CPU's IA32_FEAT_CTL and VMX feature flags when verifying compatibility across physical CPUs. This effectively adds a check on IA32_FEAT_CTL to ensure that VMX is fully enabled on all CPUs. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-17-sean.j.christopherson@intel.com commit 47781947947a8f5e5e1205714fda64563d2b8f05 Author: Masami Hiramatsu Date: Sat Jan 11 01:07:40 2020 +0900 Documentation: tracing: Add boot-time tracing document Add a documentation about boot-time tracing options in boot config. Link: http://lkml.kernel.org/r/157867246028.17873.8047384554383977870.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit fe1efe9252f938f0cc624e4ac817c27bcaef6ed0 Author: Masami Hiramatsu Date: Sat Jan 11 01:07:28 2020 +0900 tracing/boot: Add function tracer filter options Add below function-tracer filter options to boot-time tracing. - ftrace.[instance.INSTANCE.]ftrace.filters This will take an array of tracing function filter rules - ftrace.[instance.INSTANCE.]ftrace.notraces This will take an array of NON-tracing function filter rules Link: http://lkml.kernel.org/r/157867244841.17873.10933616628243103561.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 9d15dbbde1048e490f3773e67d7ef7604bab1409 Author: Masami Hiramatsu Date: Sat Jan 11 01:07:16 2020 +0900 tracing/boot: Add cpu_mask option support Add ftrace.cpumask option support to boot-time tracing. This sets cpumask for each instance. - ftrace.[instance.INSTANCE.]cpumask = CPUMASK; Set the trace cpumask. Note that the CPUMASK should be a string which /tracing_cpumask can accepts. Link: http://lkml.kernel.org/r/157867243625.17873.13613922641273149372.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 4f712a4d04a4e49167118b41d8ea96df70a98985 Author: Masami Hiramatsu Date: Sat Jan 11 01:07:04 2020 +0900 tracing/boot: Add instance node support Add instance node support to boot-time tracing. User can set some options and event nodes under instance node. - ftrace.instance.INSTANCE[...] Add new INSTANCE instance. Some options and event nodes are acceptable for instance node. Link: http://lkml.kernel.org/r/157867242413.17873.9814204526141500278.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 3fbe2d6e1fce255d918b622fb2af22e98364a154 Author: Masami Hiramatsu Date: Sat Jan 11 01:06:52 2020 +0900 tracing/boot: Add synthetic event support Add synthetic event node support to boot time tracing. The synthetic event is a kind of event node, but the group name is "synthetic". - ftrace.event.synthetic.EVENT.fields = FIELD[, FIELD2...] Defines new synthetic event with FIELDs. Each field should be "type varname". The synthetic node requires "fields" string arraies, which defines the fields as same as tracing/synth_events interface. Link: http://lkml.kernel.org/r/157867241236.17873.12411615143321557709.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 4d655281eb1bb59fad021c0f68afd033f8d0320d Author: Masami Hiramatsu Date: Sat Jan 11 01:06:41 2020 +0900 tracing/boot Add kprobe event support Add kprobe event support on event node to boot-time tracing. If the group name of event is "kprobes", the boot-time tracing defines new probe event according to "probes" values. - ftrace.event.kprobes.EVENT.probes = PROBE[, PROBE2...] Defines new kprobe event based on PROBEs. It is able to define multiple probes on one event, but those must have same type of arguments. For example, ftrace.events.kprobes.myevent { probes = "vfs_read $arg1 $arg2"; enable; } This will add kprobes:myevent on vfs_read with the 1st and the 2nd arguments. Link: http://lkml.kernel.org/r/157867240104.17873.9712052065426433111.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 81a59555ff1593642824414267e1859024bd0162 Author: Masami Hiramatsu Date: Sat Jan 11 01:06:29 2020 +0900 tracing/boot: Add per-event settings Add per-event settings for boottime tracing. User can set filter, actions and enable on each event on boot. The event entries are under ftrace.event.GROUP.EVENT node (note that the option key includes event's group name and event name.) This supports below configs. - ftrace.event.GROUP.EVENT.enable Enables GROUP:EVENT tracing. - ftrace.event.GROUP.EVENT.filter = FILTER Set FILTER rule to the GROUP:EVENT. - ftrace.event.GROUP.EVENT.actions = ACTION[, ACTION2...] Set ACTIONs to the GROUP:EVENT. For example, ftrace.event.sched.sched_process_exec { filter = "pid < 128" enable } this will enable tracing "sched:sched_process_exec" event with "pid < 128" filter. Link: http://lkml.kernel.org/r/157867238942.17873.11177628789184546198.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 9c5b9d3d65e485826fb935453f01171b1a337aa8 Author: Masami Hiramatsu Date: Sat Jan 11 01:06:17 2020 +0900 tracing/boot: Add boot-time tracing Setup tracing options via extra boot config in addition to kernel command line. This adds following commands support. These are applied to the global trace instance. - ftrace.options = OPT1[,OPT2...] Enable given ftrace options. - ftrace.trace_clock = CLOCK Set given CLOCK to ftrace's trace_clock. - ftrace.buffer_size = SIZE Configure ftrace buffer size to SIZE. You can use "KB" or "MB" for that SIZE. - ftrace.events = EVENT[, EVENT2...] Enable given events on boot. You can use a wild card in EVENT. - ftrace.tracer = TRACER Set TRACER to current tracer on boot. (e.g. function) Note that this is NOT replacing the kernel parameters, because this boot config based setting is later than that. If you want to trace earlier boot events, you still need kernel parameters. Link: http://lkml.kernel.org/r/157867237723.17873.17494943526320587488.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 48ac9488a597eb6116472b6cc0bd875e245e252c Author: Masami Hiramatsu Date: Sat Jan 11 01:06:05 2020 +0900 tracing: Add NULL trace-array check in print_synth_event() Add NULL trace-array check in print_synth_event(), because if we enable tp_printk option, iter->tr can be NULL. Link: http://lkml.kernel.org/r/157867236536.17873.12529350542460184019.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit b05e89ae7cf3bcabc52399cb833ecc9aaa51ae04 Author: Masami Hiramatsu Date: Sat Jan 11 01:05:53 2020 +0900 tracing: Accept different type for synthetic event fields Make the synthetic event accepts a different type field to record. However, the size and signed flag must be same. Link: http://lkml.kernel.org/r/157867235358.17873.61732996461602171.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit d8d4c6d0e79c418f8c63f3c82429b1462f196155 Author: Masami Hiramatsu Date: Sat Jan 11 01:05:42 2020 +0900 tracing: kprobes: Register to dynevent earlier stage Register kprobe event to dynevent in subsys_initcall level. This will allow kernel to register new kprobe events in fs_initcall level via trace_run_command. Link: http://lkml.kernel.org/r/157867234213.17873.18039000024374948737.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 8cfcf15503f607e9597de19afeaa621897ae397e Author: Masami Hiramatsu Date: Sat Jan 11 01:05:31 2020 +0900 tracing: kprobes: Output kprobe event to printk buffer Since kprobe-events use event_trigger_unlock_commit_regs() directly, that events doesn't show up in printk buffer if "tp_printk" is set. Use trace_event_buffer_commit() in kprobe events so that it can invoke output_printk() as same as other trace events. Link: http://lkml.kernel.org/r/157867233085.17873.5210928676787339604.stgit@devnote2 Signed-off-by: Masami Hiramatsu [ Adjusted data var declaration placement in __kretprobe_trace_func() ] Signed-off-by: Steven Rostedt (VMware) commit d8d0c245a7fdd176e2cf6317b3fddda650059d06 Author: Masami Hiramatsu Date: Sat Jan 11 01:05:18 2020 +0900 tracing: Apply soft-disabled and filter to tracepoints printk Apply soft-disabled and the filter rule of the trace events to the printk output of tracepoints (a.k.a. tp_printk kernel parameter) as same as trace buffer output. Link: http://lkml.kernel.org/r/157867231876.17873.15825819592284704068.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 7b9b816f4b9a3513602454b52c77f371388a2485 Author: Masami Hiramatsu Date: Sat Jan 11 01:05:06 2020 +0900 Documentation: bootconfig: Add a doc for extended boot config Add a documentation for extended boot config under admin-guide, since it is including the syntax of boot config. Link: http://lkml.kernel.org/r/157867230658.17873.9309879174829924324.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 1319916209ce8f55a4f4f848e74500633e24bb99 Author: Masami Hiramatsu Date: Sat Jan 11 01:04:55 2020 +0900 bootconfig: init: Allow admin to use bootconfig for init command line Since the current kernel command line is too short to describe long and many options for init (e.g. systemd command line options), this allows admin to use boot config for init command line. All init command line under "init." keywords will be passed to init. For example, init.systemd { unified_cgroup_hierarchy = 1 debug_shell default_timeout_start_sec = 60 } Link: http://lkml.kernel.org/r/157867229521.17873.654222294326542349.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 51887d03aca101a24ab049179d1ab430464a24e6 Author: Masami Hiramatsu Date: Sat Jan 11 01:04:43 2020 +0900 bootconfig: init: Allow admin to use bootconfig for kernel command line Since the current kernel command line is too short to describe many options which supported by kernel, allow user to use boot config to setup (add) the command line options. All kernel parameters under "kernel." keywords will be used for setting up extra kernel command line. For example, kernel { audit = on audit_backlog_limit = 256 } Note that you can not specify some early parameters (like console etc.) by this method, since it is loaded after early parameters parsed. Link: http://lkml.kernel.org/r/157867228333.17873.11962796367032622466.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 0068c92a92707789b8711e40d584a2433481a29d Author: Masami Hiramatsu Date: Sat Jan 11 01:04:31 2020 +0900 init/main.c: Alloc initcall_command_line in do_initcall() and free it Since initcall_command_line is used as a temporary buffer, it could be freed after usage. Allocate it in do_initcall() and free it after used. Link: http://lkml.kernel.org/r/157867227145.17873.17513760552008505454.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit c1a3c36017d4c4a4c61aa5f86704b7e80b92d3f7 Author: Masami Hiramatsu Date: Sat Jan 11 01:04:19 2020 +0900 proc: bootconfig: Add /proc/bootconfig to show boot config list Add /proc/bootconfig which shows the list of key-value pairs in boot config. Since after boot, all boot configs and tree are removed, this interface just keep a copy of key-value pairs in text. Link: http://lkml.kernel.org/r/157867225967.17873.12155805787236073787.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 081c65360bd817672d0753fdf68ab34802d7a81d Author: Masami Hiramatsu Date: Sat Jan 11 01:04:07 2020 +0900 tools: bootconfig: Add bootconfig test script Add a bootconfig test script to ensure the tool and boot config parser are working correctly. Link: http://lkml.kernel.org/r/157867224728.17873.18114241801246589416.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 950313ebf79c65702f4c15d29328147766d1f1fd Author: Masami Hiramatsu Date: Sat Jan 11 01:03:56 2020 +0900 tools: bootconfig: Add bootconfig command Add "bootconfig" command which operates the bootconfig config-data on initrd image. User can add/delete/verify the boot config on initrd image using this command. e.g. Add a boot config to initrd image # bootconfig -a myboot.conf /boot/initrd.img Remove it. # bootconfig -d /boot/initrd.img Or verify (and show) it. # bootconfig /boot/initrd.img Link: http://lkml.kernel.org/r/157867223582.17873.14342161849213219982.stgit@devnote2 Signed-off-by: Masami Hiramatsu [ Removed extra blank line at end of bootconfig.c ] Signed-off-by: Steven Rostedt (VMware) commit 7684b8582c24537dbe079a7d40e1d7e57ca56939 Author: Masami Hiramatsu Date: Sat Jan 11 01:03:44 2020 +0900 bootconfig: Load boot config from the tail of initrd Load the extended boot config data from the tail of initrd image. If there is an SKC data there, it has [(u32)size][(u32)checksum] header (in really, this is a footer) at the end of initrd. If the checksum (simple sum of bytes) is match, this starts parsing it from there. Link: http://lkml.kernel.org/r/157867222435.17873.9936667353335606867.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 76db5a27a827c2c89e5120a3d486472da847863b Author: Masami Hiramatsu Date: Sat Jan 11 01:03:32 2020 +0900 bootconfig: Add Extra Boot Config support Extra Boot Config (XBC) allows admin to pass a tree-structured boot configuration file when boot up the kernel. This extends the kernel command line in an efficient way. Boot config will contain some key-value commands, e.g. key.word = value1 another.key.word = value2 It can fold same keys with braces, also you can write array data. For example, key { word1 { setting1 = data setting2 } word2.array = "val1", "val2" } User can access these key-value pair and tree structure via SKC APIs. Link: http://lkml.kernel.org/r/157867221257.17873.1775090991929862549.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 13292494379f92f532de71b31a54018336adc589 Author: Steven Rostedt (VMware) Date: Fri Dec 13 13:58:57 2019 -0500 tracing: Make struct ring_buffer less ambiguous As there's two struct ring_buffers in the kernel, it causes some confusion. The other one being the perf ring buffer. It was agreed upon that as neither of the ring buffers are generic enough to be used globally, they should be renamed as: perf's ring_buffer -> perf_buffer ftrace's ring_buffer -> trace_buffer This implements the changes to the ring buffer that ftrace uses. Link: https://lore.kernel.org/r/20191213140531.116b3200@gandalf.local.home Signed-off-by: Steven Rostedt (VMware) commit 1c5eb4481e0151d579f738175497f998840f7bbc Author: Steven Rostedt (VMware) Date: Thu Jan 9 18:53:48 2020 -0500 tracing: Rename trace_buffer to array_buffer As we are working to remove the generic "ring_buffer" name that is used by both tracing and perf, the ring_buffer name for tracing will be renamed to trace_buffer, and perf's ring buffer will be renamed to perf_buffer. As there already exists a trace_buffer that is used by the trace_arrays, it needs to be first renamed to array_buffer. Link: https://lore.kernel.org/r/20191213153553.GE20583@krava Signed-off-by: Steven Rostedt (VMware) commit 56de4e8f9146680bcd048a29888f7438d5e58c55 Author: Steven Rostedt (VMware) Date: Fri Dec 13 13:21:30 2019 -0500 perf: Make struct ring_buffer less ambiguous eBPF requires needing to know the size of the perf ring buffer structure. But it unfortunately has the same name as the generic ring buffer used by tracing and oprofile. To make it less ambiguous, rename the perf ring buffer structure to "perf_buffer". As other parts of the ring buffer code has "perf_" as the prefix, it only makes sense to give the ring buffer the "perf_" prefix as well. Link: https://lore.kernel.org/r/20191213153553.GE20583@krava Acked-by: Peter Zijlstra Suggested-by: Alexei Starovoitov Signed-off-by: Steven Rostedt (VMware) commit a4d0b2fdbcf75ef6654713c83c316ea3a661ddc3 Author: Sean Christopherson Date: Fri Dec 20 20:45:09 2019 -0800 KVM: VMX: Use VMX feature flag to query BIOS enabling Replace KVM's manual checks on IA32_FEAT_CTL with a query on the boot CPU's MSR_IA32_FEAT_CTL and VMX feature flags. The MSR_IA32_FEAT_CTL indicates that IA32_FEAT_CTL has been configured and that dependent features are accurately reflected in cpufeatures, e.g. the VMX flag is now cleared during boot if VMX isn't fully enabled via IA32_FEAT_CTL, including the case where the MSR isn't supported. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-16-sean.j.christopherson@intel.com commit 79003e61b1fbfd3b76c4c8d288ddce4eaef32800 Author: Ville Syrjälä Date: Wed Dec 4 20:05:44 2019 +0200 drm/i915: Use the passed in encoder Just use the passed in encoder instead of digging it out via the legacy drm_connector->encoder pointer (which we'll want to stop using). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191204180549.1267-5-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C commit 6bcc319fc6192cb03f3db41f0e266b796b0e424f Author: André Hentschel Date: Thu Jan 2 22:43:04 2020 +0100 ARM: dts: Add omap3-echo This is the first generation Amazon Echo from 2016. Audio support is not yet implemented. Signed-off-by: André Hentschel Signed-off-by: Tony Lindgren commit 161546850dc0ba96c5c4617d6b55a16aff416bd7 Author: André Hentschel Date: Thu Jan 2 22:43:03 2020 +0100 ARM: dts: Add dtsi files for AM3703, AM3715 and DM3725 DM3730 is considered as omap36xx.dtsi, while the rest has: DM3730 | DM3725 | AM3715 | AM3703 IVA X | X | | SGX X | | X | Where X is "supported" Signed-off-by: André Hentschel Signed-off-by: Tony Lindgren commit b7d02c3a124d9be9cdd4982505d1ac00de4c70f2 Author: Ville Syrjälä Date: Wed Dec 4 20:05:43 2019 +0200 drm/i915: Pass intel_encoder to enc_to_*() Lots of enc_to_foo(&encoder->base) around. Simplify by passing in the intel_encoder instead. @find@ identifier F =~ "^enc_to_.*"; identifier E; @@ F(struct drm_encoder *E) { ... } @@ identifier find.F; identifier find.E; @@ F( - struct drm_encoder *E + struct intel_encoder *encoder ) { <... - E + &encoder->base ...> } @@ identifier find.F; expression E; @@ - F(E) + F(to_intel_encoder(E)) @@ expression E; @@ - to_intel_encoder(&E->base) + E Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191204180549.1267-4-ville.syrjala@linux.intel.com Reviewed-by: Juha-Pekka Heikkila commit 8ab871f8bdfcca627802b6992e556fba5722a268 Author: Andrew F. Davis Date: Thu Jan 2 16:19:43 2020 -0500 ARM: OMAP2+: sleep43xx: Call secure suspend/resume handlers During suspend CPU context may be lost in both non-secure and secure CPU states. The kernel can handle saving and restoring the non-secure context but must call into the secure side to allow it to save any context it may lose. Add these calls here. Note that on systems with OP-TEE available the suspend call is issued to OP-TEE using the ARM SMCCC, but the resume call is always issued to the ROM. This is because on waking from suspend the ROM is restored as the secure monitor. It is this resume call that instructs the ROM to restore OP-TEE, all subsequent calls will be handled by OP-TEE and should use the ARM SMCCC. Signed-off-by: Andrew F. Davis Acked-by: Dave Gerlach Reviewed-by: Lokesh Vutla Signed-off-by: Tony Lindgren commit 48840e16c299d886a1fc333375f0564c34cab127 Author: Andrew F. Davis Date: Thu Jan 2 16:19:42 2020 -0500 ARM: OMAP2+: Use ARM SMC Calling Convention when OP-TEE is available On High-Security(HS) OMAP2+ class devices a couple actions must be performed from the ARM TrustZone during boot. These traditionally can be performed by calling into the secure ROM code resident in this secure world using legacy SMC calls. Optionally OP-TEE can replace this secure world functionality by replacing the ROM after boot. ARM recommends a standard calling convention is used for this interaction (SMC Calling Convention). We check for the presence of OP-TEE and use this type of call to perform the needed actions, falling back to the legacy OMAP ROM call if OP-TEE is not available. Signed-off-by: Andrew F. Davis Reviewed-by: Lokesh Vutla Signed-off-by: Tony Lindgren commit dbebc8bfe9dcb760b72ec7e2bb9de30a174ff8dc Author: Andrew F. Davis Date: Thu Jan 2 16:19:41 2020 -0500 ARM: OMAP2+: Introduce check for OP-TEE in omap_secure_init() This check and associated flag can be used to signal the presence of OP-TEE on the platform. This can be used to determine which SMC calls to make to perform secure operations. Signed-off-by: Andrew F. Davis Reviewed-by: Lokesh Vutla Signed-off-by: Tony Lindgren commit 21bd3467a58ea51ccc0b1d9bcb86dadf1640a002 Author: Sean Christopherson Date: Fri Dec 20 20:45:08 2019 -0800 KVM: VMX: Drop initialization of IA32_FEAT_CTL MSR Remove KVM's code to initialize IA32_FEAT_CTL MSR when KVM is loaded now that the MSR is initialized during boot on all CPUs that support VMX, i.e. on all CPUs that can possibly load kvm_intel. Note, don't WARN if IA32_FEAT_CTL is unlocked, even though the MSR is unconditionally locked by init_ia32_feat_ctl(). KVM isn't tied directly to a CPU vendor detection, whereas init_ia32_feat_ctl() is invoked if and only if the CPU vendor is recognized and known to support VMX. As a result, vmx_disabled_by_bios() may be reached without going through init_ia32_feat_ctl() and thus without locking IA32_FEAT_CTL. This quirk will be eliminated in a future patch. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Reviewed-by: Jim Mattson Link: https://lkml.kernel.org/r/20191221044513.21680-15-sean.j.christopherson@intel.com commit db711893eac81442fb5cde3801e183d3abfe5693 Author: Andrew F. Davis Date: Thu Jan 2 16:19:40 2020 -0500 ARM: OMAP2+: Add omap_secure_init callback hook for secure initialization This can be used for detecting secure features or making early device init sequence changes based on device security type. Signed-off-by: Andrew F. Davis Reviewed-by: Lokesh Vutla Signed-off-by: Tony Lindgren commit 85c17291e2eb4903bf73e5d3f588f41dbcc6f115 Author: Sean Christopherson Date: Fri Dec 20 20:45:07 2019 -0800 x86/cpufeatures: Add flag to track whether MSR IA32_FEAT_CTL is configured Add a new feature flag, X86_FEATURE_MSR_IA32_FEAT_CTL, to track whether IA32_FEAT_CTL has been initialized. This will allow KVM, and any future subsystems that depend on IA32_FEAT_CTL, to rely purely on cpufeatures to query platform support, e.g. allows a future patch to remove KVM's manual IA32_FEAT_CTL MSR checks. Various features (on platforms that support IA32_FEAT_CTL) are dependent on IA32_FEAT_CTL being configured and locked, e.g. VMX and LMCE. The MSR is always configured during boot, but only if the CPU vendor is recognized by the kernel. Because CPUID doesn't incorporate the current IA32_FEAT_CTL value in its reporting of relevant features, it's possible for a feature to be reported as supported in cpufeatures but not truly enabled, e.g. if the CPU supports VMX but the kernel doesn't recognize the CPU. As a result, without the flag, KVM would see VMX as supported even if IA32_FEAT_CTL hasn't been initialized, and so would need to manually read the MSR and check the various enabling bits to avoid taking an unexpected #GP on VMXON. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-14-sean.j.christopherson@intel.com commit 167a4894c113ebe6a1f8b24fa6f9fca849c77f8a Author: Sean Christopherson Date: Fri Dec 20 20:45:06 2019 -0800 x86/cpu: Set synthetic VMX cpufeatures during init_ia32_feat_ctl() Set the synthetic VMX cpufeatures, which need to be kept to preserve /proc/cpuinfo's ABI, in the common IA32_FEAT_CTL initialization code. Remove the vendor code that manually sets the synthetic flags. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-13-sean.j.christopherson@intel.com commit a25e29bd0fe9be33491b3816d2d7b1137d5eeaec Merge: 9fc85a7124b5 994772632f00 Author: Tony Lindgren Date: Mon Jan 13 09:42:55 2020 -0800 Merge branch 'omap-for-v5.6/sdma' into omap-for-v5.6/ti-sysc-drop-pdata commit 994772632f006e97addd20277a820058bb0fd481 Author: Colin Ian King Date: Thu Jan 9 13:19:53 2020 +0000 dmaengine: ti: omap-dma: don't allow a null od->plat pointer to be dereferenced Currently when the call to dev_get_platdata returns null the driver issues a warning and then later dereferences the null pointer. Avoid this issue by returning -ENODEV error rather when the platform data is null and change the warning to an appropriate error message. Addresses-Coverity: ("Dereference after null check") Fixes: 211010aeb097 ("dmaengine: ti: omap-dma: Pass sdma auxdata to driver and use it") Signed-off-by: Colin Ian King Acked-by: Peter Ujfalusi Acked-by: Vinod Koul Signed-off-by: Tony Lindgren commit 14442a159cf488c05bd5639c9fd5665385b9ab39 Author: Sean Christopherson Date: Fri Dec 20 20:45:05 2019 -0800 x86/cpu: Print VMX flags in /proc/cpuinfo using VMX_FEATURES_* Add support for generating VMX feature names in capflags.c and use the resulting x86_vmx_flags to print the VMX flags in /proc/cpuinfo. Don't print VMX flags if no bits are set in word 0, which holds Pin Controls. Pin Control's INTR and NMI exiting are fundamental pillars of VMX, if they are not supported then the CPU is broken, it does not actually support VMX, or the kernel wasn't built with support for the target CPU. Print the features in a dedicated "vmx flags" line to avoid polluting the common "flags" and to avoid having to prefix all flags with "vmx_", which results in horrendously long names. Keep synthetic VMX flags in cpufeatures to preserve /proc/cpuinfo's ABI for those flags. This means that "flags" and "vmx flags" will have duplicate entries for tpr_shadow (virtual_tpr), vnmi, ept, flexpriority, vpid and ept_ad, but caps the pollution of "flags" at those six VMX features. The vendor-specific code that populates the synthetic flags will be consolidated in a future patch to further minimize the lasting damage. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-12-sean.j.christopherson@intel.com commit 43a6d19cace6e179fd129806874e96e81291485b Author: Ville Syrjälä Date: Wed Dec 4 20:05:42 2019 +0200 drm/i915: Pass intel_connector to intel_attached_*() Life is usually easier when we pass around intel_ types instead of drm_ types. In this case it might not be, but I think being consistent is a good thing anyway. Also some of this might get cleaned up a bit more later as we keep propagating the intel_ types further. @find@ identifier F =~ "^intel_attached_.*"; identifier C; @@ F(struct drm_connector *C) { ... } @@ identifier find.F; identifier find.C; @@ F( - struct drm_connector *C + struct intel_connector *connector ) { <... - C + &connector->base ...> } @@ identifier find.F; expression C; @@ - F(C) + F(to_intel_connector(C)) @@ expression C; @@ - to_intel_connector(&C->base) + C Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191204180549.1267-3-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola commit b47ce1fed42eeb9ac8c07fcda6c795884826723d Author: Sean Christopherson Date: Fri Dec 20 20:45:04 2019 -0800 x86/cpu: Detect VMX features on Intel, Centaur and Zhaoxin CPUs Add an entry in struct cpuinfo_x86 to track VMX capabilities and fill the capabilities during IA32_FEAT_CTL MSR initialization. Make the VMX capabilities dependent on IA32_FEAT_CTL and X86_FEATURE_NAMES so as to avoid unnecessary overhead on CPUs that can't possibly support VMX, or when /proc/cpuinfo is not available. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-11-sean.j.christopherson@intel.com commit 159348784ff0654291f4c7607fc55e73da8e87e8 Author: Sean Christopherson Date: Fri Dec 20 20:45:03 2019 -0800 x86/vmx: Introduce VMX_FEATURES_* Add a VMX-specific variant of X86_FEATURE_* flags, which will eventually supplant the synthetic VMX flags defined in cpufeatures word 8. Use the Intel-defined layouts for the major VMX execution controls so that their word entries can be directly populated from their respective MSRs, and so that the VMX_FEATURE_* flags can be used to define the existing bit definitions in asm/vmx.h, i.e. force developers to define a VMX_FEATURE flag when adding support for a new hardware feature. The majority of Intel's (and compatible CPU's) VMX capabilities are enumerated via MSRs and not CPUID, i.e. querying /proc/cpuinfo doesn't naturally provide any insight into the virtualization capabilities of VMX enabled CPUs. Commit e38e05a85828d ("x86: extended "flags" to show virtualization HW feature in /proc/cpuinfo") attempted to address the issue by synthesizing select VMX features into a Linux-defined word in cpufeatures. Lack of reporting of VMX capabilities via /proc/cpuinfo is problematic because there is no sane way for a user to query the capabilities of their platform, e.g. when trying to find a platform to test a feature or debug an issue that has a hardware dependency. Lack of reporting is especially problematic when the user isn't familiar with VMX, e.g. the format of the MSRs is non-standard, existence of some MSRs is reported by bits in other MSRs, several "features" from KVM's point of view are enumerated as 3+ distinct features by hardware, etc... The synthetic cpufeatures approach has several flaws: - The set of synthesized VMX flags has become extremely stale with respect to the full set of VMX features, e.g. only one new flag (EPT A/D) has been added in the the decade since the introduction of the synthetic VMX features. Failure to keep the VMX flags up to date is likely due to the lack of a mechanism that forces developers to consider whether or not a new feature is worth reporting. - The synthetic flags may incorrectly be misinterpreted as affecting kernel behavior, i.e. KVM, the kernel's sole consumer of VMX, completely ignores the synthetic flags. - New CPU vendors that support VMX have duplicated the hideous code that propagates VMX features from MSRs to cpufeatures. Bringing the synthetic VMX flags up to date would exacerbate the copy+paste trainwreck. Define separate VMX_FEATURE flags to set the stage for enumerating VMX capabilities outside of the cpu_has() framework, and for adding functional usage of VMX_FEATURE_* to help ensure the features reported via /proc/cpuinfo is up to date with respect to kernel recognition of VMX capabilities. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-10-sean.j.christopherson@intel.com commit ef4d3bf19855641fc8a1f621eaf06e2a2bb872bb Author: Sean Christopherson Date: Fri Dec 20 20:45:02 2019 -0800 x86/cpu: Clear VMX feature flag if VMX is not fully enabled Now that IA32_FEAT_CTL is always configured and locked for CPUs that are known to support VMX[*], clear the VMX capability flag if the MSR is unsupported or BIOS disabled VMX, i.e. locked IA32_FEAT_CTL and didn't set the appropriate VMX enable bit. [*] Because init_ia32_feat_ctl() is called from vendors ->c_init(), it's still possible for IA32_FEAT_CTL to be left unlocked when VMX is supported by the CPU. This is not fatal, and will be addressed in a future patch. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-9-sean.j.christopherson@intel.com commit 7d37953ba81121c8725f99356f7ee9762d4c3ed9 Author: Sean Christopherson Date: Fri Dec 20 20:45:01 2019 -0800 x86/zhaoxin: Use common IA32_FEAT_CTL MSR initialization Use the recently added IA32_FEAT_CTL MSR initialization sequence to opportunistically enable VMX support when running on a Zhaoxin CPU. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-8-sean.j.christopherson@intel.com commit 501444905fcb4166589fda99497c273ac5efc65e Author: Sean Christopherson Date: Fri Dec 20 20:45:00 2019 -0800 x86/centaur: Use common IA32_FEAT_CTL MSR initialization Use the recently added IA32_FEAT_CTL MSR initialization sequence to opportunistically enable VMX support when running on a Centaur CPU. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-7-sean.j.christopherson@intel.com commit 5d576a66242d56594f96b51fb0c677ff9f06decf Author: Vineet Gupta Date: Mon Jan 6 14:31:49 2020 -0800 ARC: update feature support for jump-labels ARC jum-label support was added in 5.5rc1 but we missed updating the feature list Signed-off-by: Vineet Gupta commit 6d527cebfa04ba4792be9e79e0d7cab22ab6c377 Author: Sean Christopherson Date: Fri Dec 20 20:44:59 2019 -0800 x86/mce: WARN once if IA32_FEAT_CTL MSR is left unlocked WARN if the IA32_FEAT_CTL MSR is somehow left unlocked now that CPU initialization unconditionally locks the MSR. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-6-sean.j.christopherson@intel.com commit 1db2a6e1e29ff994443a9eef7cf3d26104c777a7 Author: Sean Christopherson Date: Fri Dec 20 20:44:58 2019 -0800 x86/intel: Initialize IA32_FEAT_CTL MSR at boot Opportunistically initialize IA32_FEAT_CTL to enable VMX when the MSR is left unlocked by BIOS. Configuring feature control at boot time paves the way for similar enabling of other features, e.g. Software Guard Extensions (SGX). Temporarily leave equivalent KVM code in place in order to avoid introducing a regression on Centaur and Zhaoxin CPUs, e.g. removing KVM's code would leave the MSR unlocked on those CPUs and would break existing functionality if people are loading kvm_intel on Centaur and/or Zhaoxin. Defer enablement of the boot-time configuration on Centaur and Zhaoxin to future patches to aid bisection. Note, Local Machine Check Exceptions (LMCE) are also supported by the kernel and enabled via feature control, but the kernel currently uses LMCE if and only if the feature is explicitly enabled by BIOS. Keep the current behavior to avoid introducing bugs, future patches can opt in to opportunistic enabling if it's deemed desirable to do so. Always lock IA32_FEAT_CTL if it exists, even if the CPU doesn't support VMX, so that other existing and future kernel code that queries the MSR can assume it's locked. Start from a clean slate when constructing the value to write to IA32_FEAT_CTL, i.e. ignore whatever value BIOS left in the MSR so as not to enable random features or fault on the WRMSR. Suggested-by: Borislav Petkov Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-5-sean.j.christopherson@intel.com commit f6505c88bff01e41b21a1f125edd1ace5330f164 Author: Sean Christopherson Date: Fri Dec 20 20:44:57 2019 -0800 tools/x86: Sync msr-index.h from kernel sources Sync msr-index.h to pull in recent renames of the IA32_FEATURE_CONTROL MSR definitions. Update KVM's VMX selftest and turbostat accordingly. Keep the full name in turbostat's output to avoid breaking someone's workflow, e.g. if a script is looking for the full name. While using the renamed defines is by no means necessary, do the sync now to avoid leaving a landmine that will get stepped on the next time msr-index.h needs to be refreshed for some other reason. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-4-sean.j.christopherson@intel.com commit d36925be53821306ffcaf642967335cd1fb12410 Author: Masahiro Yamada Date: Mon Dec 16 07:39:37 2019 +0900 PCI: uniphier: remove module code from built-in driver builtin_platform_driver() and MODULE_* are always odd combination. This file is not compiled as a module by anyone because CONFIG_PCIE_UNIPHIER is a bool option. Let's remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code. Signed-off-by: Masahiro Yamada Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray commit a5543d3456dd131f072c5c278f1708aeaeaff0da Author: Sean Christopherson Date: Fri Dec 20 20:44:56 2019 -0800 selftests, kvm: Replace manual MSR defs with common msr-index.h The kernel's version of msr-index.h was pulled wholesale into tools by commit 444e2ff34df8 ("tools arch x86: Grab a copy of the file containing the MSR numbers"), Use the common msr-index.h instead of manually redefining everything in a KVM-only header. Note, a few MSR-related definitions remain in processor.h because they are not covered by msr-index.h, including the awesomely named APIC_BASE_MSR, which refers to starting index of the x2APIC MSRs, not the actual MSR_IA32_APICBASE, which *is* defined by msr-index.h. Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-3-sean.j.christopherson@intel.com commit 32ad73db7fc5fe7eebafdab3b528f99ab8498e3f Author: Sean Christopherson Date: Fri Dec 20 20:44:55 2019 -0800 x86/msr-index: Clean up bit defines for IA32_FEATURE_CONTROL MSR As pointed out by Boris, the defines for bits in IA32_FEATURE_CONTROL are quite a mouthful, especially the VMX bits which must differentiate between enabling VMX inside and outside SMX (TXT) operation. Rename the MSR and its bit defines to abbreviate FEATURE_CONTROL as FEAT_CTL to make them a little friendlier on the eyes. Arguably, the MSR itself should keep the full IA32_FEATURE_CONTROL name to match Intel's SDM, but a future patch will add a dedicated Kconfig, file and functions for the MSR. Using the full name for those assets is rather unwieldy, so bite the bullet and use IA32_FEAT_CTL so that its nomenclature is consistent throughout the kernel. Opportunistically, fix a few other annoyances with the defines: - Relocate the bit defines so that they immediately follow the MSR define, e.g. aren't mistaken as belonging to MISC_FEATURE_CONTROL. - Add whitespace around the block of feature control defines to make it clear they're all related. - Use BIT() instead of manually encoding the bit shift. - Use "VMX" instead of "VMXON" to match the SDM. - Append "_ENABLED" to the LMCE (Local Machine Check Exception) bit to be consistent with the kernel's verbiage used for all other feature control bits. Note, the SDM refers to the LMCE bit as LMCE_ON, likely to differentiate it from IA32_MCG_EXT_CTL.LMCE_EN. Ignore the (literal) one-off usage of _ON, the SDM is simply "wrong". Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191221044513.21680-2-sean.j.christopherson@intel.com commit a87a6653a28c0d511b3fdf3d62302bed5f325e03 Author: Shuming Fan Date: Fri Jan 10 09:46:06 2020 +0800 ASoC: rt1308-sdw: add rt1308 SdW amplifier driver This is the initial amplifier driver for rt1308-sdw. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20200110014606.17333-1-shumingf@realtek.com Tested-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 8fea78029f5e6ed734ae1957bef23cfda1af4354 Author: Chen Zhou Date: Mon Jan 13 21:32:42 2020 +0800 ASoC: atmel: fix build error with CONFIG_SND_ATMEL_SOC_DMA=m If CONFIG_SND_ATMEL_SOC_DMA=m, build error: sound/soc/atmel/atmel_ssc_dai.o: In function `atmel_ssc_set_audio': (.text+0x7cd): undefined reference to `atmel_pcm_dma_platform_register' Function atmel_pcm_dma_platform_register is defined under CONFIG SND_ATMEL_SOC_DMA, so select SND_ATMEL_SOC_DMA in CONFIG SND_ATMEL_SOC_SSC, same to CONFIG_SND_ATMEL_SOC_PDC. Reported-by: Hulk Robot Signed-off-by: Chen Zhou Link: https://lore.kernel.org/r/20200113133242.144550-1-chenzhou10@huawei.com Signed-off-by: Mark Brown commit b8d40d7712f10475effc4552eda96b9d44822cfb Author: Matthias Kaehlcke Date: Wed Jan 8 13:40:32 2020 -0800 spi: spi-qcom-qspi: Use device managed memory for clk_bulk_data Currrently the memory for the clk_bulk_data of the QSPI controller is allocated with spi_alloc_master(). The bulk data pointer is passed to devm_clk_bulk_get() which saves it in clk_bulk_devres->clks. When the device is removed later devm_clk_bulk_release() is called and uses the bulk data referenced by the pointer to release the clocks. For this driver this results in accessing memory that has already been freed, since the memory allocated with spi_alloc_master() is released by spi_controller_release(), which is called before the managed resources are released. Use device managed memory for the clock bulk data to fix the issue described above. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20200108133948.1.I35ceb4db3ad8cfab78f7cd51494aeff4891339f5@changeid Signed-off-by: Mark Brown commit b389ceae4a8fa4c91dd3543516cdfd49ece7e4ba Author: Axel Lin Date: Wed Jan 8 09:42:55 2020 +0800 regulator: bd718x7: Simplify the code by removing struct bd718xx_pmic_inits Nowdays ROHM_CHIP_TYPE_AMOUNT includes not only BD71837/BD71847 but also BD70528/BD71828 which are not supported by this driver. So it seems not necessay to have pmic_regulators[ROHM_CHIP_TYPE_AMOUNT] as mapping table. Simplify the code by removing struct bd718xx_pmic_inits and pmic_regulators[ROHM_CHIP_TYPE_AMOUNT]. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20200108014256.11282-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit ebf652b408200504194be32ad0a3f5bb49d6000a Author: Robert Marko Date: Sun Jan 12 12:30:01 2020 +0100 regulator: add IPQ4019 SDHCI VQMMC LDO driver This introduces the IPQ4019 VQMMC LDO driver needed for the SD/EMMC driver I/O level operation. This will enable introducing SD/EMMC support for the built-in controller. Signed-off-by: Mantas Pucka Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20200112113003.11110-1-robert.marko@sartura.hr Signed-off-by: Mark Brown commit 77e29598ca3fc20314f1acec35ada9706b3ea16b Author: Axel Lin Date: Thu Jan 9 23:58:08 2020 +0800 regulator: Convert i2c drivers to use .probe_new Use the new .probe_new for i2c drivers. These drivers do not use const struct i2c_device_id * argument, so convert them to utilise the simplified i2c driver registration. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20200109155808.22003-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 7eec67869893bc34bd3a3126e5124a4ef017e0cd Author: Dan Carpenter Date: Mon Jan 13 15:59:33 2020 +0300 regulator: mpq7920: Check the correct variable in mpq7920_regulator_register() There is a typo in the error checking. We should be checking "->rdev[i]" instead of just "->rdev". Fixes: 6501c1f54a17 ("regulator: mpq7920: add mpq7920 regulator driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200113125805.xri6jqoxy2ldzqyg@kili.mountain Signed-off-by: Mark Brown commit 5732c0fc53eb45565c485a886d027c0b1f86d4c5 Author: Pierre-Louis Bossart Date: Fri Jan 10 16:25:30 2020 -0600 ASoC: SOF: Intel: reference SoundWire machine lists Use static tables to automatically select the relevant configurations. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110222530.30303-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d985d208bf8f079979f284864a6d08900597ee04 Author: Pierre-Louis Bossart Date: Fri Jan 10 16:25:29 2020 -0600 ASoC: Intel: common: add match tables for TGL w/ SoundWire RT711 is in SoundWire mode on link0. RT1308 is either on SSP2 or on SoundWire link1 (depending on hardware reworks). Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110222530.30303-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit db0b9efb989f01aa7145d30bcdbfb6b07e238875 Author: Rander Wang Date: Fri Jan 10 16:25:28 2020 -0600 ASoC: Intel: common: add match tables for CNL/CFL/CML w/ SoundWire The two configurations are with the Realtek 3-in-1 board requiring all 4 links to be enabled, or basic configuration with the on-board RT700 using link1. For now we only have definitions for CML. CNL and CFL are just placeholders. Signed-off-by: Rander Wang Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110222530.30303-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4313dd3efe5751238f85dd7069bee3a8bbcdbe2f Author: Bard Liao Date: Fri Jan 10 16:25:27 2020 -0600 ASoC: Intel: common: add match tables for ICL w/ SoundWire The two configurations are with the Realtek 3-in-1 board requiring all 4 links to be enabled, or basic configuration with the on-board RT700 using link0. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110222530.30303-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit cf61a42066eae88b4bb0e5528ec9f5f8e50c5343 Author: Pierre-Louis Bossart Date: Fri Jan 10 16:25:26 2020 -0600 ASoC: Intel: common: soc-acpi: declare new tables for SoundWire We cannot really lump SoundWire-based configurations into the same tables since the mechanisms to identify boards is based on link configurations and _ADR instead of _HID for I2S, so define new tables Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110222530.30303-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit efb6f3159e874f09992b7318cea12e8e27e8389b Author: Pierre-Louis Bossart Date: Fri Jan 10 16:25:25 2020 -0600 ASoC: soc-acpi: add _ADR-based link descriptors For SoundWire support, we added a 'link_mask' to describe the PCB hardware layout. This helped form a signature that can be used as a first-order way of detecting the hardware and selecting the machine driver. The concept of link_mask is however not enough. Some BIOS enable all links, even when there are no devices physically connected. We can also see variations with multiple devices attached on one link, or different types of devices connected on the same link. To accurately represent the hardware, we need to build static tables where each link exposes a list of expected devices represented by the 64-bit _ADR field (which uniquely identifies each device). The new 'links' field is optional when the link_mask is sufficient to represent a platform in a unique way. The existing mechanism to support I2C devices is left as is, it'd be too invasive to change the existing support for _HID and the notion of link is not relevant either. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard liao Link: https://lore.kernel.org/r/20200110222530.30303-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit cfe8191b1bbf2b41581b63eb97e56cd6bc3c34a1 Author: Kai Vehmanen Date: Fri Jan 10 17:57:49 2020 -0600 ASoC: SOF: fix PCM playback through ALSA OSS emulation Any app using ALSA OSS emulation on top of SOF will fail to error from OSS SNDCTL_DSP_SETFMT ioctl. Reported initially as an issue with xournalpp (application using PortAudio with an OSS backend), but applies more generally to other apps using OSS as well. Problem is caused by SOF PCM not supporting repeated calls to hw_params(), without matching calls to pcm_free(). This is however exactly what the ALSA OSS PCM code is doing when it is handling the OSS ioctls. The problem will lead to leaking of DSP resources and eventual failure of DSP PCM_PARAMS IPC. BugLink: https://github.com/thesofproject/linux/issues/1510 Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110235751.3404-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit a40acc6bfcebb59fdf6a71c4740c46880ed5c0b4 Author: Pierre-Louis Bossart Date: Fri Jan 10 17:57:47 2020 -0600 ASoC: Intel: bdw-rt5650: change cpu_dai and platform components for SOF The legacy driver uses dummy cpu_dai and platform, SOF requires actual values to bind. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110235751.3404-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 64df6afa0dab5eda95cc4cc2269e3d4e83b6b6ce Author: Pan Xiuli Date: Fri Jan 10 17:57:46 2020 -0600 ASoC: Intel: broadwell: change cpu_dai and platform components for SOF The legacy driver uses dummy cpu_dai and platform, SOF requires actual values to bind. Signed-off-by: Pan Xiuli Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110235751.3404-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4865bde187b29e42b3f572d9610dfca9a57c30b9 Author: Pierre-Louis Bossart Date: Fri Jan 10 17:57:45 2020 -0600 ASoC: Intel: bdw-rt5677: change cpu_dai and platform components for SOF The legacy driver uses dummy cpu_dai and platform, SOF requires actual values to bind. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110235751.3404-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 630db1549356f64424b8f532c028e7894df8e40b Author: Pierre-Louis Bossart Date: Fri Jan 10 17:57:44 2020 -0600 ASoC: Intel: bdw-rt5677: fix Kconfig dependencies The existing machine driver depends on SPI Master capabilities, but the Kconfig does not model this dependency and the SPI controller needs to be selected as well. Without this patch the machine driver probe would fail with the spi-RT5677AA:00 component never registered by the ACPI/LPSS subsystem. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110235751.3404-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 62d28dcb65fd5ca12994207f17187545923d4f3d Author: YueHaibing Date: Mon Jan 13 01:31:23 2020 +0000 ASoC: rt711: remove unused including Remove including that don't need it. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200113013123.47561-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit d1ede0641b05e43542a6af330f6ca41014a02a5f Author: Jack Yu Date: Fri Jan 10 10:18:21 2020 +0800 ASoC: rt715: add RT715 codec driver Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/20200110021821.17843-1-jack.yu@realtek.com Signed-off-by: Mark Brown commit ec0f6a4c4a987aa20b2e77e0db2ae555276e45e6 Author: Paul Burton Date: Thu Jan 9 11:14:22 2020 -0800 ASoC: txx9: Remove unused rtd variable Commit a857e073ffc6 ("ASoC: txx9: txx9aclc: remove snd_pcm_ops") removed the last use of the rtd variable but didn't remove its definition, leading to the following warning/error for MIPS rbtx49xx_defconfig builds: sound/soc/txx9/txx9aclc.c: In function 'txx9aclc_pcm_hw_params': sound/soc/txx9/txx9aclc.c:54:30: error: unused variable 'rtd' [-Werror=unused-variable] struct snd_soc_pcm_runtime *rtd = snd_pcm_substream_chip(substream); ^~~ Resolve this by removing the unused variable. Signed-off-by: Paul Burton Fixes: a857e073ffc6 ("ASoC: txx9: txx9aclc: remove snd_pcm_ops") Cc: Kuninori Morimoto Cc: Mark Brown Cc: Liam Girdwood Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Link: https://lore.kernel.org/r/20200109191422.334516-1-paulburton@kernel.org Signed-off-by: Mark Brown commit 428cd5232482866d6775a7c6a03dcef78fb0d10e Author: Zhang Xiaoxu Date: Mon Jan 13 19:24:11 2020 +0800 sfc/ethtool_common: Make some function to static Fix sparse warning: drivers/net/ethernet/sfc/ethtool_common.c warning: symbol 'efx_fill_test' was not declared. Should it be static? warning: symbol 'efx_fill_loopback_test' was not declared. Should it be static? warning: symbol 'efx_describe_per_queue_stats' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Zhang Xiaoxu Reviewed-by: Martin Habets Signed-off-by: Jakub Kicinski commit a0601a1f1dee47d7167d4f46280f8ab46967ef87 Author: Krzysztof Kozlowski Date: Sat Jan 4 16:21:03 2020 +0100 PCI: exynos: Rename Exynos to lowercase Fix up inconsistent usage of upper and lowercase letters in "Exynos" name. "EXYNOS" is not an abbreviation but a regular trademarked name. Therefore it should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Lorenzo Pieralisi commit dc433797c6f639e46824585bbf943578f13d54bf Author: Xiaochen Shen Date: Thu Jan 9 00:13:46 2020 +0800 x86/resctrl: Do not reconfigure exiting tasks When writing a pid to file "tasks", a callback function move_myself() is queued to this task to be called when the task returns from kernel mode or exits. The purpose of move_myself() is to activate the newly assigned closid and/or rmid associated with this task. This activation is done by calling resctrl_sched_in() from move_myself(), the same function that is called when switching to this task. If this work is successfully queued but then the task enters PF_EXITING status (e.g., receiving signal SIGKILL, SIGTERM) prior to the execution of the callback move_myself(), move_myself() still calls resctrl_sched_in() since the task status is not currently considered. When a task is exiting, the data structure of the task itself will be freed soon. Calling resctrl_sched_in() to write the register that controls the task's resources is unnecessary and it implies extra performance overhead. Add check on task status in move_myself() and return immediately if the task is PF_EXITING. [ bp: Massage. ] Signed-off-by: Xiaochen Shen Signed-off-by: Borislav Petkov Reviewed-by: Reinette Chatre Link: https://lkml.kernel.org/r/1578500026-21152-1-git-send-email-xiaochen.shen@intel.com commit 1a462be52f4505a2719631fb5aa7bfdbd37bfd8d Author: Takashi Iwai Date: Thu Jan 9 10:01:04 2020 +0100 ALSA: hda: Manage concurrent reg access more properly In the commit 8e85def5723e ("ALSA: hda: enable regmap internal locking"), we re-enabled the regmap lock due to the reported regression that showed the possible concurrent accesses. It was a temporary workaround, and there are still a few opened races even after the revert. In this patch, we cover those still opened windows with a proper mutex lock and disable the regmap internal lock again. First off, the patch introduces a new snd_hdac_device.regmap_lock mutex that is applied for each snd_hdac_regmap_*() call, including read, write and update helpers. The mutex is applied carefully so that it won't block the self-power-up procedure in the helper function. Also, this assures the protection for the accesses without regmap, too. The snd_hdac_regmap_update_raw() is refactored to use the standard regmap_update_bits_check() function instead of the open-code. The non-regmap case is still open-coded but it's an easy part. The all read and write operations are in the single mutex protection, so it's now race-free. In addition, a couple of new helper functions are added: snd_hdac_regmap_update_raw_once() and snd_hdac_regmap_sync(). Both are called from HD-audio legacy driver. The former is to initialize the given verb bits but only once when it's not initialized yet. Due to this condition, the function invokes regcache_cache_only(), and it's now performed inside the regmap_lock (formerly it was racy) too. The latter function is for simply invoking regcache_sync() inside the regmap_lock, which is called from the codec resume call path. Along with that, the HD-audio codec driver code is slightly modified / simplified to adapt those new functions. And finally, snd_hdac_regmap_read_raw(), *_write_raw(), etc are rewritten with the helper macro. It's just for simplification because the code logic is identical among all those functions. Tested-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200109090104.26073-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8f2828d737241be558b9d31c6c0465595a014341 Author: Christophe JAILLET Date: Thu Dec 26 15:54:35 2019 +0100 HID: logitech-hidpp: avoid duplicate error handling code in 'hidpp_probe()' 'hid_hw_stop()' is already in the error handling path when branching to the 'hid_hw_open_fail' label. There is no point in calling it twice, so remove one. Signed-off-by: Christophe JAILLET Signed-off-by: Jiri Kosina commit 5e06d19694a463a012c2589e29078196eb209448 Author: Peter Ujfalusi Date: Fri Aug 30 13:23:08 2019 +0300 ARM: davinci: dm644x-evm: Add Fixed regulators needed for tlv320aic33 The codec driver needs correct regulators in order to probe. Both VCC_3.3V and VCC_1.8V is always on fixed regulators on the board. Signed-off-by: Peter Ujfalusi Signed-off-by: Sekhar Nori commit 9c76e8f65d2e73834fe1c83ed4394f3b4d485548 Author: Peter Ujfalusi Date: Fri Aug 30 13:22:52 2019 +0300 ARM: davinci: dm365-evm: Add Fixed regulators needed for tlv320aic3101 The codec driver needs correct regulators in order to probe. Both VCC_3V3 and VCC_1V8 is always on fixed regulators on the board. Signed-off-by: Peter Ujfalusi Signed-off-by: Sekhar Nori commit d5848c4414a72107b2cfe71fb479d0cb832e0b1d Author: Stanislav Lisovskiy Date: Fri Jan 10 00:05:47 2020 +0200 drm/i915: Bump up CDCLK to eliminate underruns on TGL There seems to be some undocumented bandwidth bottleneck/dependency which scales with CDCLK, causing FIFO underruns when CDCLK is too low, even when it's correct from BSpec point of view. Currently for TGL platforms we calculate min_cdclk initially based on pixel_rate divided by 2, accounting for also plane requirements, however in some cases the lowest possible CDCLK doesn't work and causing the underruns. We've found experimentally that raising cdclk to at least pixel_rate (rather than pixel_rate/2) eliminates these underruns, so let's use this as a temporary workaround until the hardware team can suggest a more precise remedy. Explicitly stating here that this seems to be currently rather a Hack, than final solution. v2: Use clamp operation instead of min(Matt Roper) v3: - Fixed commit message(Matt Roper) - Now using pixel_rate instead of max_cdclk(Jani Nikula) - Switched to max from clamp(Ville Syrjälä) Hopefully this hybrid satisfies everyone :) Reviewed-by: Matt Roper Signed-off-by: Stanislav Lisovskiy Closes: https://gitlab.freedesktop.org/drm/intel/issues/402 Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200109220547.23817-1-stanislav.lisovskiy@intel.com commit 57debb815459d2ef3e25aacfe355307d14b73a91 Author: Pali Rohár Date: Sun Jan 12 15:49:59 2020 +0100 udf: Disallow R/W mode for disk with Metadata partition Currently we do not support writing to UDF disks with Metadata partition. There is already check that disks with declared minimal write revision to UDF 2.50 or higher are mounted only in R/O mode but this does not cover situation when minimal write revision is set incorrectly (e.g. to 2.01). Link: https://lore.kernel.org/r/20200112144959.28104-1-pali.rohar@gmail.com Signed-off-by: Pali Rohár Signed-off-by: Jan Kara commit 49be68c4931d9f0f171e5f01a574fc40205db2b5 Author: Pali Rohár Date: Sun Jan 12 23:13:53 2020 +0100 udf: Fix meaning of ENTITYID_FLAGS_* macros to be really bitwise-or flags Currently ENTITYID_FLAGS_* macros definitions are written as hex numbers but their meaning is not bitwise-or flags. But rather bit position. This is unusual and could be misleading. So change meaning of ENTITYID_FLAGS_* macros definitions to be really bitwise-or flags. Link: https://lore.kernel.org/r/20200112221353.29711-1-pali.rohar@gmail.com Signed-off-by: Pali Rohár Signed-off-by: Jan Kara commit 73d6890fe8ff40e357039b626537ac82d8782aeb Author: Mark Brown Date: Fri Jan 10 15:50:04 2020 +0000 arm64: kernel: Correct annotation of end of el0_sync Commit 582f95835a8fc812c ("arm64: entry: convert el0_sync to C") caused the ENDPROC() annotating the end of el0_sync to be placed after the code for el0_sync_compat. This replaced the previous annotation where it was located after all the cases that are now converted to C, including after the currently unannotated el0_irq_compat and el0_error_compat. Move the annotation to the end of the function and add separate annotations for the _compat ones. Fixes: 582f95835a8fc812c (arm64: entry: convert el0_sync to C) Signed-off-by: Mark Brown Signed-off-by: Will Deacon commit d229290689ae0f6eae068ef142de4fd61ab4ba50 Author: Michał Mirosław Date: Sat Jan 4 17:27:57 2020 +0100 PM-runtime: add tracepoints for usage_count changes Add tracepoints to remaining places where device's power.usage_count is changed. This helps debugging where and why autosuspend is prevented. Signed-off-by: Michał Mirosław Signed-off-by: Rafael J. Wysocki commit a6184f8e0bb1ba8b444836926cd6967ea176fd31 Merge: 477b83831000 b3a987b0264d Author: Greg Kroah-Hartman Date: Mon Jan 13 12:13:05 2020 +0100 Merge 5.5-rc6 into tty-next We need the serial/tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 845f081002eebd7a1216fc0a5ef2c862dc6d093e Merge: 585c91f40d20 b3a987b0264d Author: Greg Kroah-Hartman Date: Mon Jan 13 12:11:40 2020 +0100 Merge 5.5-rc6 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit be91c44288bea4d48d64604e9073801383776623 Author: Bob Moore Date: Fri Jan 10 11:31:50 2020 -0800 ACPICA: Update version to 20200110 ACPICA commit f78d50aacc2a1c6dfa59052a696a54cec16e6aab Version 20200110. Link: https://github.com/acpica/acpica/commit/f78d50aa Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 800ba7c5eaaa734e4bd66bf0441fc200bbcdca54 Author: Bob Moore Date: Fri Jan 10 11:31:49 2020 -0800 ACPICA: All acpica: Update copyrights to 2020 Including tool signons. ACPICA commit 8b9c69d0984067051ffbe8526f871448ead6a26b Link: https://github.com/acpica/acpica/commit/8b9c69d0 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit cea79e7e2f24125b895bbfcdf98c8cfd1fb684d1 Author: Bhaskar Upadhaya Date: Wed Jan 8 09:17:38 2020 -0800 apei/ghes: Do not delay GHES polling Currently, the ghes_poll_func() timer callback is registered with the TIMER_DEFERRABLE flag. Thus, it is run when the CPU eventually wakes up together with a subsequent non-deferrable timer and not at the precisely configured polling interval. For polling mode, the polling interval configured by firmware should not be exceeded according to the ACPI spec 6.3, Table 18-394. The definition of the polling interval is: "Indicates the poll interval in milliseconds OSPM should use to periodically check the error source for the presence of an error condition." If this interval is extended due to the timer callback deferring, error records can get lost. Which we are observing on our ThunderX2 platforms. Therefore, remove the TIMER_DEFERRABLE flag so that the timer callback executes at the precise interval. Signed-off-by: Bhaskar Upadhaya [ bp: Subject & changelog ] Acked-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki commit 731e6b9753baa39074060221a76de97058c0ac2e Author: Harry Pan Date: Mon Jan 13 18:22:40 2020 +0800 cpufreq: intel_pstate: fix spelling mistake: "Whethet" -> "Whether" Fix a spelling typo in the comment, no function change. Signed-off-by: Harry Pan Signed-off-by: Rafael J. Wysocki commit aebf3b521b34ca49f6e81c667f92364334ca27cf Author: Tvrtko Ursulin Date: Fri Jan 10 11:32:53 2020 +0000 drm/i915/pmu: Do not use colons or dashes in PMU names We use PCI device path in the registered PMU name in order to distinguish between multiple GPUs. But since tools/perf reserves a special meaning to dash and colon characters we need to transliterate them to something else. We choose an underscore. v2: * Use strreplace. (Chris) * Dashes are not good either. (Chris) Signed-off-by: Tvrtko Ursulin Reported-by: Dmitry Rogozhkin Fixes: 05488673a4d4 ("drm/i915/pmu: Support multiple GPUs") Cc: Chris Wilson Cc: Michal Wajdeczko Cc: Andi Kleen Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200110113253.12535-1-tvrtko.ursulin@linux.intel.com commit 701a1676f313dbae578f31da4e06c5487c8aa7bb Author: Mika Westerberg Date: Thu Jan 9 15:14:02 2020 +0300 mtd: spi-nor: intel-spi: Add support for Intel Comet Lake-V SPI serial flash Intel Comet Lake-V has the same SPI serial flash controller as Kaby Lake. Add Comet Lake-V PCI ID to the driver list of supported devices. Signed-off-by: Mika Westerberg Signed-off-by: Tudor Ambarus commit 26e66a0cf258d413bd64095b0fea6e34f9e46587 Author: Jian-Hong Pan Date: Mon Dec 30 16:30:45 2019 +0800 platform/x86: asus-wmi: Fix keyboard brightness cannot be set to 0 Some of ASUS laptops like UX431FL keyboard backlight cannot be set to brightness 0. According to ASUS' information, the brightness should be 0x80 ~ 0x83. This patch fixes it by following the logic. Fixes: e9809c0b9670 ("asus-wmi: add keyboard backlight support") Signed-off-by: Jian-Hong Pan Reviewed-by: Daniel Drake Signed-off-by: Andy Shevchenko commit 73ac9f5e5b43a5dbadb61f27dae7a971f7ec0d22 Author: Alexander Tsoy Date: Sun Jan 12 13:23:58 2020 +0300 ALSA: usb-audio: Add boot quirk for MOTU M Series Add delay to make sure that audio urbs are not sent too early. Otherwise the device hangs. Windows driver makes ~2s delay, so use about the same time delay value. snd_usb_apply_boot_quirk() is called 3 times for my MOTU M4, which is an overkill. Thus a quirk that is called only once is implemented. Also send two vendor-specific control messages before and after the delay. This behaviour is blindly copied from the Windows driver. Signed-off-by: Alexander Tsoy Link: https://lore.kernel.org/r/20200112102358.18085-1-alexander@tsoy.me Signed-off-by: Takashi Iwai commit 791a485f2da392df00341ed4c0c14780fd320d92 Author: Takashi Sakamoto Date: Mon Jan 13 17:46:30 2020 +0900 ALSA: dice: add support for Alesis MasterControl Alesis MasterControl was shipped 2009 and already discontinued. This model consists of: * TSB41AB2 for physical layer of IEEE 1394 * WaveFront Dice II STD for link layer and protocol implementation * FreeScale DSPB56374AE Although the firmware of this model can respond against read transaction to address space for TCAT extension protocol, the content is not valid for protocol extension. This results in sound card without any PCM/MIDI interfaces. $ ./firewire-request /dev/fw1 read 0xffffe0200000 0x48 result: 000: 00 00 00 20 00 00 04 94 00 00 04 b4 00 00 00 b4 result: 010: 00 00 05 68 00 00 00 24 00 00 05 8c 00 00 00 48 result: 020: 00 00 00 20 00 00 00 08 00 00 00 20 00 00 00 20 result: 030: 00 00 00 10 00 00 00 08 00 00 00 08 00 00 00 04 result: 040: 00 00 00 00 00 00 00 00 This commit adds support the model by adding hard-coded stream formats. $ python3 ~/git/linux-firewire-utils/src/crpp < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ----------------------------------------------------------------- 400 04041ad7 bus_info_length 4, crc_length 4, crc 6871 404 31333934 bus_name "1394" 408 e0ff8112 irmc 1, cmc 1, isc 1, bmc 0, pmc 0, cyc_clk_acc 255, max_rec 8 (512), max_rom 1, gen 1, spd 2 (S400) 40c 00059504 company_id 000595 | Alesis Corporation 410 008003f5 device_id 04008003f5 | EUI-64 00059504008003f5 root directory ----------------------------------------------------------------- 414 0006a620 directory_length 6, crc 42528 418 03000595 vendor: Alesis Corporation 41c 8100000a --> descriptor leaf at 444 420 17000002 model 424 8100000d --> descriptor leaf at 458 428 0c0087c0 node capabilities per IEEE 1394 42c d1000001 --> unit directory at 430 unit directory at 430 ----------------------------------------------------------------- 430 00041b9f directory_length 4, crc 7071 434 12000595 specifier id: Alesis Corporation 438 13000001 version: audio 43c 17000002 model 440 8100000d --> descriptor leaf at 474 descriptor leaf at 444 ----------------------------------------------------------------- 444 000494c2 leaf_length 4, crc 38082 448 00000000 textual descriptor 44c 00000000 minimal ASCII 450 416c6573 "Ales" 454 69730000 "is" descriptor leaf at 458 ----------------------------------------------------------------- 458 0006c2ec leaf_length 6, crc 49900 45c 00000000 textual descriptor 460 00000000 minimal ASCII 464 4d617374 "Mast" 468 6572436f "erCo" 46c 6e74726f "ntro" 470 6c000000 "l" descriptor leaf at 474 ----------------------------------------------------------------- 474 0006c2ec leaf_length 6, crc 49900 478 00000000 textual descriptor 47c 00000000 minimal ASCII 480 4d617374 "Mast" 484 6572436f "erCo" 488 6e74726f "ntro" 48c 6c000000 "l" Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20200113084630.14305-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit a9f47fcb5e25c088b91ed768061b2ab3602f7868 Author: Takashi Sakamoto Date: Mon Jan 13 17:46:29 2020 +0900 ALSA: dice: loosen stream format check for MIDI conformant data channel ALSA dice driver expects devices to multiplex MIDI messages into first port of isochronous communication. Actually devices perform for it. However, check of stream format is invalid for second port of isochronous communication. As a result, when the device supports two ports for isochronous communication and the stream format is hard-coded, ALSA dice driver fails to start packet streaming. This commit loosens stream format check for MIDI conformant data channel. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20200113084630.14305-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 41dbc792794acf520892afe40b7df4cc58a8f5f5 Author: Takashi Sakamoto Date: Mon Jan 13 16:34:18 2020 +0900 ALSA: oxfw: fix for Stanton SCS.1d Stanton SCS.1d uses Oxford Semiconductor FW 971 ASIC (FW971) for communication. Although the unit is bound to ALSA oxfw driver, the instance of sound card can not be added due to its quirk of plug information. This bug was added when snd-scs1x is merged into snd-oxfw at commit 9e2004f9cedf ("ALSA: oxfw: obsolete scs1x module"). This commit fixes the driver for the quirk. In cases that the unit returns NOT IMPLEMENTED for some AV/C commands, the sound card is added without any PCM/MIDI interfaces for packet streaming. For SCS.1d, model dependent operation adds MIDI interface and applications can use it to operate according to HSS1394 protocol from reverse-engineering work by Sean M. Pappalardo. Plug Control Register (PCR) has information that the unit has a pair of plugs for isochronous communication: (oMPR) $ ./firewire-request /dev/fw1 read 0xfffff0000900 result: 80ff0001 (iMPR) $ ./firewire-request /dev/fw1 read 0xfffff0000980 result: 80ff0001 AV/C PLUG INFO also returns information that the unit has a pair of plugs for isochronous communication. (AV/C PLUG INFO command) $ ./firewire-request /dev/fw1 fcp 0x01ff0200ffffffff response: 000: 0c ff 02 00 01 01 02 02 However, AV/C PLUG SIGNAL INFO command is rejected for both plugs. (AV/C OUTPUT PLUG SIGNAL INFO command) $ ./firewire-request /dev/fw1 fcp 0x01ff1800ffffffff response: 000: 0a ff 18 00 ff ff ff ff (AV/C INPUT PLUG SIGNAL INFO command) $ ./firewire-request /dev/fw1 fcp 0x01ff1900ffffffff response: 000: 0a ff 19 00 ff ff ff ff Furthermore, AV/C EXTENDED STREAM FORMAT INFO is not implemented. (AV/C EXTENDED STREAM FORMAT INFO list subfunction for input plug) $ ./firewire-request /dev/fw1 fcp 0x01ffbfc000000000ffff00ff response: 000: 08 ff bf c0 00 00 00 00 ff ff 00 ff (AV/C EXTENDED STREAM FORMAT INFO list subfunction for output plug) $ ./firewire-request /dev/fw1 fcp 0x01ffbfc001000000ffff00ff response: 000: 08 ff bf c0 01 00 00 00 ff ff 00 ff (AV/C EXTENDED STREAM FORMAT INFO single subfunction for input plug) $ ./firewire-request /dev/fw1 fcp 0x01ffbfc100000000ffffffff response: 000: 08 ff bf c1 00 00 00 00 ff ff ff ff (AV/C EXTENDED STREAM FORMAT INFO single subfunction for output plug) $ ./firewire-request /dev/fw1 fcp 0x01ffbfc101000000ffffffff response: 000: 08 ff bf c1 01 00 00 00 ff ff ff ff Reference: https://mailman.alsa-project.org/pipermail/alsa-devel/2012-May/052264.html Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20200113073418.24622-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 06a42a74a0e704458754bdc5f29cf62cc1ce4b53 Author: Takashi Sakamoto Date: Mon Jan 13 16:34:17 2020 +0900 ALSA: oxfw: don't add MIDI/PCM interface when packet streaming is unavailable Stanton SCS.1d doesn't support packet streaming even if it has plugs for isochronous communication. This commit is a preparation for this case. The 'has_input' member is added to specific structure, and MIDI/PCM interfaces are not added when the member is false. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20200113073418.24622-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 03be63b2953c1b33ac77b7c21345495acc47e84b Author: Takashi Sakamoto Date: Mon Jan 13 16:34:16 2020 +0900 ALSA: oxfw: use ENXIO for not-supported cases When AV/C command returns 'NOT IMPLEMENTED' status in its response, ALSA oxfw driver uses ENOSYS as error code. However, it's expected just to be used for missing system call number. This commit replaces it with ENXIO. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20200113073418.24622-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit cf206bca178cd5b5a436494b2e0cea75295944f4 Author: Johan Jonker Date: Fri Jan 10 14:44:20 2020 +0100 ARM: dts: rockchip: add reg property to brcmf sub node for rk3188-bqedison2qc An experimental test with the command below gives this error: rk3188-bqedison2qc.dt.yaml: dwmmc@10218000: wifi@1: 'reg' is a required property So fix this by adding a reg property to the brcmf sub node. Also add #address-cells and #size-cells to prevent more warnings. make ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200110134420.11280-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 2c7a8bd6060c4e2d85e00170f5c695a3db73610f Merge: c936069fb59c 80e8b1e59f03 Author: Rafael J. Wysocki Date: Mon Jan 13 10:33:29 2020 +0100 Merge back cpufreq fixes for v5.6. commit 110f027193319583ef1c418f081ac248120e1efc Author: Heiko Stuebner Date: Mon Dec 9 15:53:01 2019 +0100 arm64: dts: rockchip: hook up the px30-evb dsi display Create the necessary display nodes to activate the Xingpeng XPP055C272 dsi display that can be found on the px30-evb. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20191209145301.5307-2-heiko@sntech.de commit ead067beb56f3b4f74a39b50e6568d0cf4cce60a Merge: 3aa3c5882e4f 2298cf8d36bc Author: Rafael J. Wysocki Date: Mon Jan 13 10:32:19 2020 +0100 Merge back power capping changes for v5.6. commit a845ad16212e3202589687713aae2d743e6b875c Author: yong.liang Date: Thu Dec 26 17:39:30 2019 +0800 arm64: dts: mt8183: add reset-cells in infracfg Include mt8183-reset.h and add reset-cells in infracfg in dtsi file Signed-off-by: yong.liang Signed-off-by: Matthias Brugger commit cf3c5397835f1bbfb69941b50b970210479cd6f9 Author: Markus Reichl Date: Thu Jan 9 16:42:10 2020 +0100 arm64: dts: rockchip: Enable sdio0 and uart0 on rk3399-roc-pc-mezzanine The mezzanine board carries an E key type M.2 slot. This is connected to USB, SDIO and UART0. Enable sdio and uart0 for use with wlan and/or bt M.2 cards. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/20200109154211.1530-1-m.reichl@fivetechno.de Signed-off-by: Heiko Stuebner commit 96ff264bccb22175bbe2185a1eb5204ca3c5f03f Author: Johan Jonker Date: Fri Jan 10 15:21:28 2020 +0100 arm64: dts: rockchip: add reg property to brcmf sub-nodes An experimental test with the command below gives this error: rk3399-firefly.dt.yaml: dwmmc@fe310000: wifi@1: 'reg' is a required property rk3399-orangepi.dt.yaml: dwmmc@fe310000: wifi@1: 'reg' is a required property rk3399-khadas-edge.dt.yaml: dwmmc@fe310000: wifi@1: 'reg' is a required property rk3399-khadas-edge-captain.dt.yaml: dwmmc@fe310000: wifi@1: 'reg' is a required property rk3399-khadas-edge-v.dt.yaml: dwmmc@fe310000: wifi@1: 'reg' is a required property So fix this by adding a reg property to the brcmf sub node. Also add #address-cells and #size-cells to prevent more warnings. make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200110142128.13522-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 2be6a280144e521248a4bdefb691a0a97e604294 Author: Johan Jonker Date: Fri Jan 10 17:12:00 2020 +0100 arm64: dts: rockchip: fix dwmmc clock name for rk3308 An experimental test with the command below gives this error: rk3308-evb.dt.yaml: dwmmc@ff480000: clock-names:2: 'ciu-drive' was expected 'ciu-drv' is not a valid dwmmc clock name, so fix this by changing it to 'ciu-drive'. make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200110161200.22755-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 7f2147350291569acd1df5a26dcdfc573916016f Author: Johan Jonker Date: Fri Jan 10 17:12:00 2020 +0100 arm64: dts: rockchip: fix dwmmc clock name for px30 An experimental test with the command below gives this error: px30-evb.dt.yaml: dwmmc@ff390000: clock-names:2: 'ciu-drive' was expected 'ciu-drv' is not a valid dwmmc clock name, so fix this by changing it to 'ciu-drive'. make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200110161200.22755-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 7a8bc2b0462eaca0072d1f7f4ddc749fcb8a773c Author: Jan H. Schönherr Date: Fri Jan 3 16:07:19 2020 +0100 x86/mce: Fix use of uninitialized MCE message string The function mce_severity() is not required to update its msg argument. In fact, mce_severity_amd() does not, which makes mce_no_way_out() return uninitialized data, which may be used later for printing. Assuming that implementations of mce_severity() either always or never update the msg argument (which is currently the case), it is sufficient to initialize the temporary variable in mce_no_way_out(). While at it, avoid printing a useless "Unknown". Signed-off-by: Jan H. Schönherr Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200103150722.20313-4-jschoenh@amazon.de commit 90454e49593845e4f1cd162601249450b30898f3 Author: Jan H. Schönherr Date: Fri Jan 3 16:07:18 2020 +0100 x86/mce: Fix mce=nobootlog Since commit 8b38937b7ab5 ("x86/mce: Do not enter deferred errors into the generic pool twice") the mce=nobootlog option has become mostly ineffective (after being only slightly ineffective before), as the code is taking actions on MCEs left over from boot when they have a usable address. Move the check for MCP_DONTLOG a bit outward to make it effective again. Also, since commit 011d82611172 ("RAS: Add a Corrected Errors Collector") the two branches of the remaining "if" at the bottom of machine_check_poll() do same. Unify them. Signed-off-by: Jan H. Schönherr Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200103150722.20313-3-jschoenh@amazon.de commit 8438b84ab42d9a67df33633258e0865c5761d2d4 Author: Jan H. Schönherr Date: Fri Jan 3 16:07:17 2020 +0100 x86/mce: Take action on UCNA/Deferred errors again Commit fa92c5869426 ("x86, mce: Support memory error recovery for both UCNA and Deferred error in machine_check_poll") added handling of UCNA and Deferred errors by adding them to the ring for SRAO errors. Later, commit fd4cf79fcc4b ("x86/mce: Remove the MCE ring for Action Optional errors") switched storage from the SRAO ring to the unified pool that is still in use today. In order to only act on the intended errors, a filter for MCE_AO_SEVERITY is used -- effectively removing handling of UCNA/Deferred errors again. Extend the severity filter to include UCNA/Deferred errors again. Also, generalize the naming of the notifier from SRAO to UC to capture the extended scope. Note, that this change may cause a message like the following to appear, as the same address may be reported as SRAO and as UCNA: Memory failure: 0x5fe3284: already hardware poisoned Technically, this is a return to previous behavior. Signed-off-by: Jan H. Schönherr Signed-off-by: Borislav Petkov Acked-by: Tony Luck Link: https://lkml.kernel.org/r/20200103150722.20313-2-jschoenh@amazon.de commit 3952cf8ff2f7751ee2f9d6cc6140df4667853250 Author: Vitor Soares Date: Tue Sep 3 12:35:54 2019 +0200 i3c: master: dw: reattach device on first available location of address table For today the reattach function only update the device address on the controller. Update the location to the first available too, will optimize the enumeration process avoiding additional checks to keep the available positions on address table consecutive. Signed-off-by: Vitor Soares Reviewed-by: Boris Brezillon Signed-off-by: Boris Brezillon commit ac904843087bed19e702c507ab0250abf56d2625 Author: Vasily Khoruzhick Date: Tue Jan 7 20:20:18 2020 -0800 arm64: dts: allwinner: a64: enable DVFS Add CPU regulator and operating points for all the A64-based boards that are currently supported to enable DVFS. Signed-off-by: Vasily Khoruzhick Signed-off-by: Maxime Ripard commit 51b3eaba8ad742ab72131ef436208312f0b70605 Author: Vasily Khoruzhick Date: Tue Jan 7 20:20:17 2020 -0800 arm64: dts: allwinner: a64: add dtsi with CPU operating points Add operating points for A64. These are taken from FEX file from BSP for A64. Signed-off-by: Vasily Khoruzhick Signed-off-by: Maxime Ripard commit e1c3804a177418fe14d95f0c4ccba5ae66f73d82 Author: Vasily Khoruzhick Date: Tue Jan 7 20:20:16 2020 -0800 arm64: dts: allwinner: a64: add cooling maps and thermal tripping points Add cooling maps and thermal tripping points to prevent CPU overheating when running at the highest frequency. Tripping points are taken from A33 dts since A64 user manual doesn't mention when we should start throttling. Signed-off-by: Vasily Khoruzhick Signed-off-by: Maxime Ripard commit f267eff70c0c4f51765fcb2498444d7bc0048725 Author: Vasily Khoruzhick Date: Tue Jan 7 20:20:15 2020 -0800 arm64: dts: allwinner: a64: add CPU clock to CPU0-3 nodes Add CPU clock to the CPU nodes since it is a prerequisite for enabling DVFS. Signed-off-by: Vasily Khoruzhick Signed-off-by: Maxime Ripard [wens@csie.org: Replace CLK_CPUX macro with raw number] Signed-off-by: Chen-Yu Tsai commit 3c67166dc58d02c5166193138f0740e3c322ec35 Author: Yangtao Li Date: Sat Dec 28 18:54:06 2019 +0000 i3c: master: cdns: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Boris Brezillon commit fae04237e8b1a5efb675b9b442348d002c10389c Author: Yangtao Li Date: Sat Dec 28 18:54:05 2019 +0000 i3c: master: dw: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Acked-by: Vitor Soares Signed-off-by: Boris Brezillon commit 6b49d4fbcbc2ad98c234da2b344865508eed7bf4 Author: Bartosz Golaszewski Date: Fri Jan 10 18:16:43 2020 +0100 ARM: davinci: remove legacy timer support All platforms have now been switched to the new clocksource driver. Remove the old code and various no longer needed bits and pieces. Signed-off-by: Bartosz Golaszewski Reviewed-by: David Lechner Signed-off-by: Sekhar Nori commit 20eb43540bd05fce8655747bec3af950eccc7eb0 Author: Bartosz Golaszewski Date: Fri Jan 10 18:16:42 2020 +0100 ARM: davinci: dm365: switch to using the clocksource driver We now have a proper clocksource driver for davinci. Switch the dm365 platform to using it. Signed-off-by: Bartosz Golaszewski Reviewed-by: David Lechner Signed-off-by: Sekhar Nori commit cea931c25104e6bddc42eb067f58193f355dbdd7 Author: Bartosz Golaszewski Date: Fri Jan 10 18:16:41 2020 +0100 clocksource: davinci: only enable clockevents once tim34 is initialized The DM365 platform has a strange quirk (only present when using ancient u-boot - mainline u-boot v2013.01 and later works fine) where if we enable the second half of the timer in periodic mode before we do its initialization - the time won't start flowing and we can't boot. When using more recent u-boot, we can enable the timer, then reinitialize it and all works fine. To work around this issue only enable clockevents once tim34 is initialized i.e. move clockevents_config_and_register() below tim34 initialization. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sekhar Nori commit 688486a49cf500a193dfe15be9eb5aa468887769 Merge: d5d88cd6ee6b 485b747ea6ec Author: Dave Airlie Date: Mon Jan 13 17:14:34 2020 +1000 Merge tag 'amd-drm-next-5.6-2020-01-10-dp-mst-dsc' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-next-5.6-2020-01-10-dp-mst-dsc: drm: - Add MST helper for PBN calculation of DSC modes - Parse FEC caps on MST ports - Add MST DPCD R/W functions - Add MST helpers for virtual DPCD aux - Add MST HUB quirk - Add MST DSC enablement helpers amdgpu: - Enable MST DSC - Add fair share algo for DSC bandwidth calcs - Fix for 32 bit builds Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200110214328.308549-1-alexander.deucher@amd.com commit 2523816da8290474fc7285179c6d9e0a2e411e75 Merge: 16bb7abc4a6b b3a987b0264d Author: Greg Kroah-Hartman Date: Mon Jan 13 07:53:38 2020 +0100 Merge 5.5-rc6 into char-misc-next We need the char-misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit d40310f65771b3a1eb9af34af433136887a64251 Merge: e895bc1ebb31 b3a987b0264d Author: Greg Kroah-Hartman Date: Mon Jan 13 07:52:17 2020 +0100 Merge 5.5-rc6 into staging-next We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit d5d88cd6ee6b668520c461b960077b5dbd440bc2 Merge: 79f88da22b4b 0f899fd466b6 Author: Dave Airlie Date: Mon Jan 13 16:49:01 2020 +1000 Merge tag 'amd-drm-next-5.6-2020-01-09' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-next-5.6-2020-01-09: amdgpu: - Enable DCN support on POWER - Enable GFXOFF for Raven1 refresh - Clean up MM engine idle handlers - HDMI 2.0 audio fixes - Fixes for some 10 bpc EDP panels - Watermark fixes for renoir - SR-IOV fixes - Runtime pm robustness fixes - Arcturus VCN fixes - RAS fixes - BACO fixes for Arcturus - Stable pstate fixes for swSMU - HDCP fixes - PSP cleanup - HDMI fixes - Misc cleanups amdkfd: - Spread interrupt work across cores to reduce latency - Topology fixes for APUs - GPU reset improvements UAPI: - Enable DRIVER_SYNCOBJ_TIMELINE for vulkan - Return better error values for kfd process ioctl Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200109230338.8022-1-alexander.deucher@amd.com commit 79f88da22b4b2d8c56c784de65e24c4b80f59c0c Merge: a566696cf9f2 44c58c520ffc Author: Dave Airlie Date: Mon Jan 13 11:53:01 2020 +1000 Merge tag 'drm-misc-next-2020-01-10' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.6: UAPI Changes: Cross-subsystem Changes: - Convert simple panel bindings to a template. Core Changes: - Revert drm-bridge-state changes, it causes a dependency error between drm and drm_kms_helper. - Fix when disabling crc's. - Assorted Kconfig fixes. Driver Changes: - Add ddc symlinks to more drivers. - Fix chained bridge handling in exynos and vc4. - More clock rate fixes in sun4i. - Add support for AUO B116XAK01, GiantPlus GPM940B0, Sony ACX424AKP, BOE NV140FHM-N49, Satoz SAT050AT40H12R2 and Sharp LS020B1DD01D panels. - Assorted small bugfixes. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/1e8d4944-68d7-0df3-f39b-31f6fba22a2a@linux.intel.com commit b7365587f513540c962a734c12cf422ca9a111a5 Author: Chanwoo Choi Date: Mon Jan 13 13:09:13 2020 +0900 extcon: Remove unneeded extern keyword from extcon.h 'extern' keyword is unneeded in extcon.h because public header file of extcon defines the function prototype. Signed-off-by: Chanwoo Choi commit e07c5f2e4e911d933c8daa3c6f6be063ee0e5c2d Author: Geert Uytterhoeven Date: Sun Jan 12 17:33:54 2020 +0100 net: amd: a2065: Use print_hex_dump_debug() helper Use the print_hex_dump_debug() helper, instead of open-coding the same operations. Signed-off-by: Geert Uytterhoeven Signed-off-by: Jakub Kicinski commit 2412643a9b02702aab68595e0fa0797ae5ce6176 Author: Geert Uytterhoeven Date: Sun Jan 12 17:32:11 2020 +0100 net: amd: a2065: Kill Sun LANCE relics Remove unused fields, copied from the Sun LANCE driver eons ago. Signed-off-by: Geert Uytterhoeven Signed-off-by: Jakub Kicinski commit 3f59b6c3e600f9665dcf5b8e566cd7b778f03045 Author: Yishai Hadas Date: Thu Dec 12 13:09:28 2019 +0200 IB/mlx5: Add mmap support for VAR Add mmap support for VAR, it uses the 'offset' command mode with involvement of IB core APIs to find the previously allocated mmap entry. Link: https://lore.kernel.org/r/20191212110928.334995-6-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7be76bef320b1f1d1b8dc87d3d5a03f3a2421a43 Author: Yishai Hadas Date: Thu Dec 12 13:09:27 2019 +0200 IB/mlx5: Introduce VAR object and its alloc/destroy methods Introduce VAR object and its alloc/destroy KABI methods. The internal implementation uses the IB core API to manage mmap/munamp calls. Link: https://lore.kernel.org/r/20191212110928.334995-5-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f164be8c03663034416d019c355fbbd2dbd189d7 Author: Yishai Hadas Date: Thu Dec 12 13:09:26 2019 +0200 IB/mlx5: Extend caps stage to handle VAR capabilities Extend caps stage to handle VAR capabilities. Link: https://lore.kernel.org/r/20191212110928.334995-4-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit aef5570e23dec7b0f7728687c04e7f888766c39e Merge: 1e123d96b85f ca1992c62cad Author: Jason Gunthorpe Date: Sun Jan 12 19:46:19 2020 -0400 Merge branch 'mlx5_vdpa' into rdma.git for-next From the mlx5-next branch at git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Merged due to dependencies in the next patches. * branch 'mlx5_vdpa': net/mlx5: Expose vDPA emulation device capabilities net/mlx5: Add Virtio Emulation related device capabilities commit cbd19d09498e8d48224c8391c3271734d8b00146 Merge: a442c2c3850d e45d0fad4a5f Author: Jakub Kicinski Date: Sun Jan 12 13:05:14 2020 -0800 Merge branch 'IXP4xx-networking-cleanups' Linus Walleij says: ==================== IXP4xx networking cleanups This is a patch series which jams together Arnds and mine cleanups for the IXP4xx networking. I also have patches for device tree support but that requires more elaborate work, this series is some of mine and some of Arnds patches that is a good foundation for his multiplatform work and my device tree work. These are for application to the networking tree so that can be taken in one separate sweep. I have tested the patches for a bit using zeroday builds and some boots on misc IXP4xx devices and haven't run into any major problems. We might find some new stuff as a result from the new compiler coverage. I had to depromote enabling compiler coverage at one point in the v2 set because it depended on other patches making the code more generic. The change in v3 was simply dropping one offending patch hardcoding base addresses into the driver. The change in v4 drops a stable@ tag that was unnecessary. This v5 is a rebase of the v4 patch set on top of net-next. ==================== Signed-off-by: Jakub Kicinski commit e45d0fad4a5f8c2d69084dbda98635adcd3f8478 Author: Linus Walleij Date: Sun Jan 12 13:04:50 2020 +0100 net: ethernet: ixp4xx: Use parent dev for DMA pool Use the netdevice struct device .parent field when calling dma_pool_create(): the .dma_coherent_mask and .dma_mask pertains to the bus device on the hardware (platform) bus in this case, not the struct device inside the network device. This makes the pool allocation work. Signed-off-by: Linus Walleij Signed-off-by: Jakub Kicinski commit f458ac479777c627c9b92ab640afec3bfa150660 Author: Linus Walleij Date: Sun Jan 12 13:04:49 2020 +0100 ARM/net: ixp4xx: Pass ethernet physical base as resource In order to probe this ethernet interface from the device tree all physical MMIO regions must be passed as resources. Begin this rewrite by first passing the port base address as a resource for all platforms using this driver, remap it in the driver and avoid using any reference of the statically mapped virtual address in the driver. Signed-off-by: Linus Walleij Signed-off-by: Jakub Kicinski commit 3cb5b0ee72b8b9ff0827b1edb40b6c4b00d5ab2e Author: Linus Walleij Date: Sun Jan 12 13:04:48 2020 +0100 net: ehernet: ixp4xx: Use netdev_* messages Simplify and correct a bunch of messages using printk directly to use the netdev_* macros. I have not changed all of them, just the low-hanging fruit. Signed-off-by: Linus Walleij Signed-off-by: Jakub Kicinski commit d813d7e57026ac7638273d00c9915f2ea83a8fce Author: Linus Walleij Date: Sun Jan 12 13:04:47 2020 +0100 net: ethernet: ixp4xx: Use distinct local variable Use "ndev" for the struct net_device and "dev" for the struct device in probe() and remove(). Add the local "dev" pointer for later use in refactoring. Take this opportunity to fix inverse christmas tree coding style. Signed-off-by: Linus Walleij Signed-off-by: Jakub Kicinski commit c83db9ef5640548631707e8b4a7bcddc115fdbae Author: Linus Walleij Date: Sun Jan 12 13:04:46 2020 +0100 net: ethernet: ixp4xx: Standard module init The IXP4xx driver was initializing the MDIO bus before even probing, in the callbacks supposed to be used for setting up the module itself, and with the side effect of trying to register the MDIO bus as soon as this module was loaded or compiled into the kernel whether the device was discovered or not. This does not work with multiplatform environments. To get rid of this: set up the MDIO bus from the probe() callback and remove it in the remove() callback. Rename the probe() and remove() calls to reflect the most common conventions. Since there is a bit of checking for the ethernet feature to be present in the MDIO registering function, making the whole module not even be registered if we can't find an MDIO bus, we need something similar: register the MDIO bus when the corresponding ethernet is probed, and return -EPROBE_DEFER on the other interfaces until this happens. If no MDIO bus is present on any of the registered interfaces we will eventually bail out. None of the platforms I've seen has e.g. MDIO on EthB and only uses EthC, there is always a Ethernet hardware on the NPE (B, C) that has the MDIO bus, we just might have to wait for it. Signed-off-by: Linus Walleij Signed-off-by: Jakub Kicinski commit a41a5b26d29fb0123cd3290dca453857cd8c0c66 Author: Arnd Bergmann Date: Sun Jan 12 13:04:45 2020 +0100 ixp4xx_eth: move platform_data definition The platform data is needed to compile the driver as standalone, so move it to a global location along with similar files. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij Signed-off-by: Jakub Kicinski commit 2785543fbf0498eb749adee3d129ba8ac139c729 Author: Arnd Bergmann Date: Sun Jan 12 13:04:44 2020 +0100 ptp: ixp46x: move adjacent to ethernet driver The ixp46x ptp driver has a somewhat unusual setup, where the ptp driver and the ethernet driver are in different directories but access the same registers that are defined a platform specific header file. Moving everything into drivers/net/ makes it look more like most other ptp drivers and allows compile-testing this driver on other targets. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij Signed-off-by: Jakub Kicinski commit c74f16b6034401b17bb1cf549871186a8ece5f92 Author: Arnd Bergmann Date: Sun Jan 12 13:04:43 2020 +0100 wan: ixp4xx_hss: prepare compile testing The ixp4xx_hss driver needs the platform data definition and the system clock rate to be compiled. Move both into a new platform_data header file. This is a prerequisite for compile testing, but turning on compile testing requires further patches to isolate the SoC headers. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij Signed-off-by: Jakub Kicinski commit 504c28c853ec5c626900b914b5833daf0581a344 Author: Arnd Bergmann Date: Sun Jan 12 13:04:42 2020 +0100 wan: ixp4xx_hss: fix compile-testing on 64-bit Change the driver to use portable integer types to avoid warnings during compile testing: drivers/net/wan/ixp4xx_hss.c:863:21: error: cast to 'u32 *' (aka 'unsigned int *') from smaller integer type 'int' [-Werror,-Wint-to-pointer-cast] memcpy_swab32(mem, (u32 *)((int)skb->data & ~3), bytes / 4); ^ drivers/net/wan/ixp4xx_hss.c:979:12: error: incompatible pointer types passing 'u32 *' (aka 'unsigned int *') to parameter of type 'dma_addr_t *' (aka 'unsigned long long *') [-Werror,-Wincompatible-pointer-types] &port->desc_tab_phys))) ^~~~~~~~~~~~~~~~~~~~ include/linux/dmapool.h:27:20: note: passing argument to parameter 'handle' here dma_addr_t *handle); ^ Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij Signed-off-by: Jakub Kicinski commit a442c2c3850dc308ab972f3d10d1077e2c8fd035 Author: Jonathan Lemon Date: Thu Jan 9 11:23:17 2020 -0800 mlx4: Bump up MAX_MSIX from 64 to 128 On modern hardware with a large number of cpus and using XDP, the current MSIX limit is insufficient. Bump the limit in order to allow more queues. Signed-off-by: Jonathan Lemon Reviewed-by: Jack Wang Reviewed-by: Tariq Toukan Signed-off-by: Jakub Kicinski commit d4bbcade0ef597cb87b296ae18d70105e60e6032 Author: Fritz Koenig Date: Fri Jan 10 13:35:51 2020 -0800 drm/msm/dpu: Allow UBWC on NV12 NV12 is a valid format for UBWC Signed-off-by: Fritz Koenig Signed-off-by: Rob Clark commit b55f91a00630b8a73c05efcaace90b653e30397b Author: John Stultz Date: Tue Jan 7 20:28:52 2020 +0000 drm: msm: Quiet down plane errors in atomic_check With the db845c running AOSP, I see the following error on every frame on the home screen: [drm:dpu_plane_atomic_check:915] [dpu error]plane33 invalid src 2880x1620+0+470 line:2560 This is due to the error paths in atomic_check using DPU_ERROR_PLANE(), and the drm_hwcomposer using atomic_check to decide how to composite the frame (thus it expects to see atomic_check to fail). In order to avoid spamming the logs, this patch converts the DPU_ERROR_PLANE() calls to DPU_DEBUG_PLANE() calls in atomic_check. Cc: Todd Kjos Cc: Alistair Delva Cc: Amit Pundir Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Signed-off-by: John Stultz Signed-off-by: Rob Clark commit c08406033fe83a4cb307f2a2e949c59bb86b4f49 Author: Lubomir Rintel Date: Sat Dec 21 08:09:56 2019 +0100 iscsi_ibft: Don't limits Targets and NICs to two According to iSCSI Boot Firmware Table Version 1.03 [1], the length of the control table is ">= 18", where the optional expansion structure pointer follow the mandatory ones. This allows for more than two NICs and Targets. [1] ftp://ftp.software.ibm.com/systems/support/bladecenter/iscsi_boot_firmware_table_v1.03.pdf Let's enforce the minimum length of the control structure instead instead of limiting it to the smallest allowed size. Signed-off-by: Lubomir Rintel Signed-off-by: Konrad Rzeszutek Wilk commit bfc7931c40908a3e5575c527754ef4be2e24c83b Author: Geert Uytterhoeven Date: Mon Dec 23 10:58:35 2019 +0100 m68k: defconfig: Update defconfigs for v5.5-rc3 - Enable modular build of new crypto algorithms: - CONFIG_CRYPTO_BLAKE2S=m, - CONFIG_CRYPTO_CURVE25519=m, - CONFIG_CRYPTO_LIB_BLAKE2S=m, - CONFIG_CRYPTO_LIB_CHACHA20POLY1305=m, - CONFIG_CRYPTO_LIB_CURVE25519=m. - Remove CONFIG_CRYPTO_XXHASH=m (auto-selected by CONFIG_BTRFS_FS since commit 3951e7f050ac6a38 ("btrfs: add xxhash64 to checksumming algorithms"), - Move CONFIG_EARLY_PRINTK. Signed-off-by: Geert Uytterhoeven commit e8bb2a2a1d51511e6b3f7e08125d52ec73c11139 Author: Kars de Jong Date: Sun Nov 24 20:52:25 2019 +0100 m68k: Wire up clone3() syscall Wire up the clone3() syscall for m68k. The special entry point is done in assembler as was done for clone() as well. This is needed because all registers need to be saved. The C wrapper then calls the generic sys_clone3() with the correct arguments. Tested on A1200 using the simple test program from: https://lore.kernel.org/lkml/20190716130631.tohj4ub54md25dys@brauner.io/ Signed-off-by: Kars de Jong Link: https://lore.kernel.org/r/20191124195225.31230-1-jongk@linux-m68k.org Signed-off-by: Geert Uytterhoeven commit 4766897a9d3bd6af171cdc5ff140e8d132d62d40 Author: Matt Ranostay Date: Fri Jan 3 17:29:08 2020 -0800 iio: chemical: atlas-sensor: add helper function atlas_buffer_num_channels() Add helper function to detect the number of channels to output in trigger handler. This is based on IIO_TIMESTAMP channel being the delimiter between input and output channels. Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron commit f335fa7034d5444de53f22824afce52924d95253 Author: Kent Gustavsson Date: Sat Jan 4 19:19:29 2020 +0100 iio: humidity: dht11 remove TODO since it doesn't make sense DHT11 isn't addressable and will trigger temperature measurement on any data sent on the bus. Signed-off-by: Kent Gustavsson Signed-off-by: Jonathan Cameron commit 77038bd01ce66ae65bcb66266c9747b670b5facd Author: Nuno Sá Date: Tue Jan 7 13:17:05 2020 +0200 iio: adis: Remove startup_delay All timeouts are now handled by a dedicated timeout struct. This variable is no longer needed. Signed-off-by: Nuno Sá Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 380b107bbf9449ddea0637cefe65a6cbf7b6ca84 Author: Nuno Sá Date: Tue Jan 7 13:17:04 2020 +0200 iio: adis: Introduce timeouts structure The adis library only allows to define a `startup_delay` which for some devices is enough. However, other devices define different timeouts with significantly different timings which could lead to devices to not wait enough time or to wait a lot more than necessary (which is not efficient). This patch introduces a new timeout struct that must be passed into `adis_init()`. There are mainly, for now, three timeouts used. This is also an introductory patch with the goal of refactoring `adis_initial_startup()`. New driver's (eg: adis16480, adis16460) are replicating code for the device initial setup. With some changes (being this the first one) we can pass this to `adis_initial_startup()`. Signed-off-by: Nuno Sá Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 687d39d4512aa5f644450d0662f40aeeac1e84a7 Author: Peter Ujfalusi Date: Tue Jan 7 13:37:29 2020 +0200 iio: adc: at91-sama5d2_adc: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. The dma_request_chan() is the standard API to request slave channel, clients should be moved away from the legacy API to allow us to retire them. Signed-off-by: Peter Ujfalusi Signed-off-by: Jonathan Cameron commit 735404b846dffcb320264f62b76e6f70012214dd Author: Peter Ujfalusi Date: Wed Jan 8 10:08:01 2020 +0200 iio: adc: stm32-adc: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Acked-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron commit a9ab624edd9186fbad734cfe5d606a6da3ca34db Author: Peter Ujfalusi Date: Tue Jan 7 13:45:32 2020 +0200 iio: adc: stm32-dfsdm: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Acked-by: Olivier Moysan Acked-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron commit ff40e0d41af19e36b43693fcb9241b4a6795bb44 Author: Pierre-Louis Bossart Date: Sat Jan 11 15:47:36 2020 -0600 ALSA: usb: update old-style static const declaration GCC reports the following warning with W=1 sound/usb/mixer_quirks.c: In function ‘snd_microii_controls_create’: sound/usb/mixer_quirks.c:1694:2: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration] 1694 | const static usb_mixer_elem_resume_func_t resume_funcs[] = { | ^~~~~ Move static to the beginning of declaration Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200111214736.3002-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 8a71821f12a010d7100f9cc1f7b218aff0313c4a Author: Pierre-Louis Bossart Date: Sat Jan 11 15:47:35 2020 -0600 ALSA: hda: patch_realtek: fix empty macro usage in if block GCC reports the following warning with W=1 sound/pci/hda/patch_realtek.c: In function ‘alc269_suspend’: sound/pci/hda/patch_realtek.c:3616:29: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] 3616 | alc5505_dsp_suspend(codec); | ^ sound/pci/hda/patch_realtek.c: In function ‘alc269_resume’: sound/pci/hda/patch_realtek.c:3651:28: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] 3651 | alc5505_dsp_resume(codec); | ^ This is a classic macro problem and can indeed lead to bad program flows. Fix by using the usual "do { } while (0)" pattern Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200111214736.3002-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit f9993480214f1345497875ed363a52b7ef7e33db Author: Pierre-Louis Bossart Date: Sat Jan 11 14:33:25 2020 -0600 ALSA: timer: fix nsec/sec initialization confusion GCC reports a warning with W=1: sound/core/timer.c: In function ‘snd_timer_user_read’: sound/core/timer.c:2219:19: warning: initialized field overwritten [-Woverride-init] 2219 | .tstamp_sec = tread->tstamp_nsec, | ^~~~~ sound/core/timer.c:2219:19: note: (near initialization for ‘(anonymous).tstamp_sec’) Assigning nsec values to sec fields is problematic in general, even more so when the initial goal was to survive the 2030 timer armageddon. Fix by using the proper field in the initialization Cc: Baolin Wang Cc: Arnd Bergmann Fixes: 07094ae6f9527 ("ALSA: Avoid using timespec for struct snd_timer_tread") Signed-off-by: Pierre-Louis Bossart Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200111203325.20498-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 548f0b9a5f4cffa0cecf62eb12aa8db682e4eee6 Author: David S. Miller Date: Sun Jan 12 00:07:42 2020 -0800 sparc: Add .exit.data section. This fixes build errors of all sorts. Also, emit .exit.text unconditionally. Signed-off-by: David S. Miller commit 9a820b55817011f53771e6bfebae5fe059f0a534 Author: Robert Jones Date: Wed Jan 8 07:44:24 2020 -0800 ARM: dts: imx: Add GW5912 board support The Gateworks GW5912 is an IMX6 SoC based single board computer with: - IMX6Q or IMX6DL - 32bit DDR3 DRAM - GbE RJ45 front-panel - 4x miniPCIe socket with PCI Gen2, USB2 - 1x miniPCIe socket with PCI Gen2, USB2, mSATA - 1x miniPCIe socket with PCI Gen2, USB2, mezzanine - 10V to 60V DC input barrel jack - 3axis accelerometer (lis2de12) - GPS (ublox ZOE-M8Q) - bi-color front-panel LED - 256MB NAND boot device - nanoSIM/microSD socket (with UHS-I support) - user pushbutton - Gateworks System Controller (hwmon, pushbutton controller, EEPROM) - CAN Bus transceiver (mcp2562) - RS232 transceiver (1x UART with flow-control or 2x UART (build option) - off-board SPI connector (1x chip-select) Signed-off-by: Robert Jones Reviewed-by: Tim Harvey Signed-off-by: Shawn Guo commit 169e12f99cf9d5fce752564f32fd8df96461de43 Author: Robert Jones Date: Wed Jan 8 07:44:23 2020 -0800 ARM: dts: imx: Add GW5913 board support The Gateworks GW5913 is an IMX6 SoC based single board computer with: - IMX6Q or IMX6DL - 32bit DDR3 DRAM - FEC GbE RJ45 front-panel - 1x miniPCIe socket with PCI Gen2, USB2 - 1x miniPCIe socket with PCI Gen2, USB2, nanoSIM - 6V to 60V DC input connector - GPS (ublox ZOE-M8Q) - bi-color front-panel LED - 256MB NAND boot device - nanoSIM socket - user pushbutton - Gateworks System Controller (hwmon, pushbutton controller, EEPROM) Signed-off-by: Robert Jones Reviewed-by: Tim Harvey Signed-off-by: Shawn Guo commit a1fb69366bb16753f0fba6a891fbef5cdd97cfbe Author: Tim Harvey Date: Wed Jan 8 07:44:22 2020 -0800 ARM: dts: imx: Add GW5910 board support The Gateworks GW5910 is an IMX6 SoC based single board computer with: - IMX6Q or IMX6DL - 32bit DDR3 DRAM - FEC GbE RJ45 front-panel - 1x miniPCIe socket with PCI Gen2, USB2 - 1x miniPCIe socket with PCI Gen2, USB2, nanoSIM - 5V to 60V DC input barrel jack - 3axis accelerometer (lis2de12) - GPS (ublox ZOE-M8Q) - bi-color front-panel LED - 256MB NAND boot device - microSD socket (with UHS-I support) - user pushbutton - Gateworks System Controller (hwmon, pushbutton controller, EEPROM) - Dual-Band Wireless MCU (CC1352, UART/I2S interrconnect to IMX6) - WiFi/Bluetooth/BLE module (Sterling-LSW, SDIO/UART interconnect to IMX6) - RS232 transceiver (1x UART with flow-control or 2x UART (build option) - off-board SPI connector (1x chip-select) Signed-off-by: Tim Harvey Signed-off-by: Robert Jones Signed-off-by: Shawn Guo commit 125120298dc05bb55a8874f07aa3f4bb6056bfb3 Author: Robert Jones Date: Wed Jan 8 07:44:21 2020 -0800 ARM: dts: imx: Add GW5907 board support The Gateworks GW5907 is an IMX6 SoC based single board computer with: - IMX6Q or IMX6DL - 32bit DDR3 DRAM - FEC GbE Phy - bi-color front-panel LED - 256MB NAND boot device - Gateworks System Controller (hwmon, pushbutton controller, EEPROM) - Digital IO expander (pca9555) - Joystick 12bit adc (ads1015) Signed-off-by: Robert Jones Reviewed-by: Tim Harvey Signed-off-by: Shawn Guo commit 747612c4aefd94da34e8c89662cc8c82840e61c5 Author: Robert Jones Date: Wed Jan 8 07:44:20 2020 -0800 dt-bindings: arm: fsl: Add Gateworks Ventana i.MX6DL/Q compatibles Add the compatible enum entries for Gateworks Ventana boards. Signed-off-by: Robert Jones Signed-off-by: Shawn Guo commit 9bfb1294571e831577cc0ec865cc34737c6cc5d9 Author: Anson Huang Date: Wed Jan 8 09:53:37 2020 +0800 arm64: defconfig: Enable CONFIG_CLK_IMX8MP by default Select CONFIG_CLK_IMX8MP by default to support i.MX8MP clock driver. Signed-off-by: Anson Huang Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit 9c140d9926761b0f5d329ff6c09a1540f3d5e1d3 Author: Anson Huang Date: Wed Jan 8 09:53:36 2020 +0800 clk: imx: Add support for i.MX8MP clock driver Add clock driver support for i.MX8MP which is a new SoC of i.MX8M family. Signed-off-by: Anson Huang Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit 1088691447391e2d3aec05dc547d1cd6c67459c4 Author: Anson Huang Date: Wed Jan 8 09:53:35 2020 +0800 dt-bindings: imx: Add clock binding doc for i.MX8MP Add the clock binding doc for i.MX8MP. Signed-off-by: Anson Huang Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit 83dea32c5cb301720af7c41306c9c1f175da4d8a Author: Anson Huang Date: Wed Jan 8 09:53:34 2020 +0800 clk: imx: gate4: Switch imx_clk_gate4_flags() to clk_hw based API Switch the imx_clk_gate4_flags() function to clk_hw based API, rename accordingly and add a macro for clk based legacy. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Anson Huang Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit 90df036043d4a13fdf6e7eced90c13072ec109dd Merge: 76c1f41577fb dc48a3a795ca Author: Olof Johansson Date: Fri Jan 10 22:25:56 2020 -0800 Merge tag 'samsung-dt-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.6 1. Couple ARM and wcore bus regulators on Exynos542x so higher frequencies could be used with dynamic voltage and frequency scaling. Enable this higher frequencies. 2. Correct the polarity of USB3503 hub GPIOs. 3. Adjust the bus frequencies (scaled with devfreq framework) on Exynos5422 Odroid boards to match values possible to obtain from root PLLs. 4. Add display to Tiny4412 board. 5. Cleanups and minor improvements. * tag 'samsung-dt-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Enable FIMD node and add proper panel node to Tiny4412 ARM: dts: samsung: Rename Samsung and Exynos to lowercase ARM: dts: exynos: Adjust bus related OPPs to the values correct for Exynos5422 Odroids ARM: dts: exynos: Move Exynos5420 bus related OPPs to the Odroid boards DTS ARM: dts: exynos: Correct USB3503 GPIOs polarity ARM: dts: exynos: Add missing CPU frequencies for Exynos5422/5800 ARM: dts: exynos: Add initial data for coupled regulators for Exynos5422/5800 ARM: dts: exynos: Remove syscon compatible from chipid node on Exynos5 Link: https://lore.kernel.org/r/20200110172334.4767-3-krzk@kernel.org Signed-off-by: Olof Johansson commit 5c9166f038257d6130865b267cb45d87f126b3dd Merge: 6821af8b7885 c7554dcd6dbf Author: David S. Miller Date: Sat Jan 11 14:52:56 2020 -0800 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: add some misc update about reset issue This series includes some misc update relating to reset issue. [patch 1/7] & [patch 2/7] splits hclge_reset()/hclgevf_reset() into two parts: preparing and rebuilding. Since the procedure of FLR should be separated out from the reset task([patch 3/7 & patch 3/7]), then the FLR's processing can reuse these codes. pci_error_handlers.reset_prepare() is void type function, so [patch 6/7] & [patch 7/7] factor some codes related to PF function reset to make the preparing done before .reset_prepare() return. BTW, [patch 5/7] enlarges the waiting time of reset for matching the hardware's. ==================== Signed-off-by: David S. Miller commit c7554dcd6dbff3d1b295062649df4bce410bf50e Author: Huazhong Tan Date: Sat Jan 11 16:33:53 2020 +0800 net: hns3: refactor the notification scheme of PF reset hclge_reset_prepare_down() is only used to inform VF that PF is going to do function reset, then using hclge_func_reset_sync_vf() in hclge_reset_prepare_wait() to query whether VF is ready before asserting PF function reset. To make the code more readable, this patch uses a new function hclge_function_reset_notify_vf() to do this job. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit c3106cac2a80381e860adbd416e166f778b8806a Author: Huazhong Tan Date: Sat Jan 11 16:33:52 2020 +0800 net: hns3: modify hclge_func_reset_sync_vf()'s return type to void When synchronizes with VFs fail before PF function reset, PF driver should go on its function reset, otherwise it can not run normally anymore. So, hclge_func_reset_sync_vf() should not affect the processing of PF reset, this patch modifies its return type to void. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 5bb784e973cf35f9883b10bb7b1588616c7ed6b1 Author: Huazhong Tan Date: Sat Jan 11 16:33:51 2020 +0800 net: hns3: enlarge HCLGE_RESET_WAIT_CNT When the load of firmware is high, its reset task may takes more time(which will be as long as 35 seconds). So this patch modifies HCLGE_RESET_WAIT_CNT to match the firmware's. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit f28368bb4542dbc3c5b6e818211a68cbca6f4d75 Author: Huazhong Tan Date: Sat Jan 11 16:33:50 2020 +0800 net: hns3: refactor the procedure of VF FLR Currently, the actual work of VF FLR is handled in the reset task, which is asynchronous. So in some case, if the preparing and rebuilding are not done, then the VF FLR will trigger some problems, for example, makes hardware go into chaos. So this patch separates the process of VF FLR from reset task, and adds a semaphore to serialize this reset and others. When FLR's preparing fails, if there has other higher level reset pending or failing times less than the HCLGE_FLR_RETRY_CNT, this preparing should be retried, otherwise it will get into a wrong state. BTW, while the hardware reports misc interrupt during pcie_flr(), the driver can not receive this interrupt anymore, so disable it when hclgevf_flr_prepare() return, and re-enable it when enter hclgevf_flr_done(). Avoid declaring internal function hclgevf_enable_vector(), this patch also moves its definition forward, and removes unused enum hnae3_flr_state. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 8627bdedc435865b015cedeb26e3791dec5b3a41 Author: Huazhong Tan Date: Sat Jan 11 16:33:49 2020 +0800 net: hns3: refactor the precedure of PF FLR Currently, the actual work of PF FLR is handled in the reset task, which is asynchronous. So in some case, if the preparing and rebuilding are not done, then the PF FLR will trigger some problems, for example, makes hardware go into chaos. So this patch separates the process of PF FLR from reset task, and adds a semaphore to serialize this reset and others. When FLR's preparing fails, if there has other higher level reset pending or failing times less than the HCLGE_FLR_RETRY_CNT, this preparing should be retried, otherwise PF and its VF may get into wrong state. BTW, while the hardware reports misc interrupt during pcie_flr(), the driver can not receive this interrupt anymore, so disable it when hclge_flr_prepare() return, and re-enable it when enter hclge_flr_done(). Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 1cc9bc6e586782921f2bc31fd9f121e8fe2de100 Author: Huazhong Tan Date: Sat Jan 11 16:33:48 2020 +0800 net: hns3: split hclgevf_reset() into preparing and rebuilding part hclgevf_reset() is a little bloated, and the process of VF FLR will be separated from the reset task later. So this patch splits hclgevf_reset() into hclgevf_reset_prepare() and hclge_reset_rebuild(), then FLR can also reuse these two functions. Also moves HNAE3_UP_CLIENT into hclgevf_reset_stack(). Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit d4fa06562ae2bb0379a4c6503aca6806a1aeb15e Author: Huazhong Tan Date: Sat Jan 11 16:33:47 2020 +0800 net: hns3: split hclge_reset() into preparing and rebuilding part hclge_reset() is a little bloated, and the process of PF FLR will be separated from the reset task later. So this patch splits hclge_reset() into hclge_reset_prepare() and hclge_reset_rebuild(), then FLR can also reuse these two functions. BTW, since hclge_clear_reset_cause() and hclge_reset_prepare_up() will not affect the device, so in hclge_reset_rebuild(), these functions are called without rtnl_lock. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 248ed51048c40d36728e70914e38bffd7821da57 Author: Changbin Du Date: Sat Jan 11 20:54:27 2020 +0800 x86/nmi: Remove irq_work from the long duration NMI handler First, printk() is NMI-context safe now since the safe printk() has been implemented and it already has an irq_work to make NMI-context safe. Second, this NMI irq_work actually does not work if a NMI handler causes panic by watchdog timeout. It has no chance to run in such case, while the safe printk() will flush its per-cpu buffers before panicking. While at it, repurpose the irq_work callback into a function which concentrates the NMI duration checking and makes the code easier to follow. [ bp: Massage. ] Signed-off-by: Changbin Du Signed-off-by: Borislav Petkov Acked-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200111125427.15662-1-changbin.du@gmail.com commit 4d2024370d877f9ac8b98694bcff666da6a5d333 Author: Gao Xiang Date: Tue Jan 7 10:25:46 2020 +0800 erofs: fix out-of-bound read for shifted uncompressed block rq->out[1] should be valid before accessing. Otherwise, in very rare cases, out-of-bound dirty onstack rq->out[1] can equal to *in and lead to unintended memmove behavior. Link: https://lore.kernel.org/r/20200107022546.19432-1-gaoxiang25@huawei.com Fixes: 7fc45dbc938a ("staging: erofs: introduce generic decompression backend") Cc: # 5.3+ Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit d713e3ab93fdc2468cfd1dcada16162f2d4cbe3d Author: Chris Wilson Date: Sat Jan 11 08:30:07 2020 +0000 drm/i915: Correct typo in i915_vma_compress_finish stub A copy and paste error in setting up the !CONFIG_DRM_I915_CAPTURE_ERROR stubs left a conflicting duplicate declaration. Reported-by: kbuild test robot Signed-off-by: Chris Wilson Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20200111083007.1619228-1-chris@chris-wilson.co.uk commit 1868c7579f3522423b2f31f39e9ce752a4d457ab Author: Michal Wajdeczko Date: Fri Jan 10 22:27:23 2020 +0000 drm/i915/uc: Add sanitize to to intel_uc_ops uC sanitization is only meaningful if we are running with uC present or enabled. Make this function part of the uc_ops. Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200110222723.14724-5-michal.wajdeczko@intel.com commit cc93f7b040c35e21bf6c477a37e042641c19e5ab Author: Michal Wajdeczko Date: Fri Jan 10 22:27:22 2020 +0000 drm/i915/uc: Add init/fini to to intel_uc_ops uC preparation and cleanup steps are only meaningful if we are running with uC enabled. Make these functions part of the uc_ops. Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200110222723.14724-4-michal.wajdeczko@intel.com commit 39ddb8632035d318c905f41a6c574341504f91f6 Author: Michal Wajdeczko Date: Fri Jan 10 22:27:21 2020 +0000 drm/i915/uc: Add init_fw/fini_fw to to intel_uc_ops Firmware fetching and cleanup steps are only meaningful if we are running with uC enabled. Make these functions part of the uc_ops. Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200110222723.14724-3-michal.wajdeczko@intel.com commit 6fbeda0bfd210f9bd6fef9b73e5d45b2612fbdcb Author: Michal Wajdeczko Date: Fri Jan 10 22:27:20 2020 +0000 drm/i915/uc: Add ops to intel_uc Instead of spreading multiple conditionals across the uC code to find out current mode of uC operation, start using predefined set of function pointers that reflect that mode. Begin with pair of init_hw/fini_hw functions that are responsible for uC hardware initialization and cleanup. v2: drop ops_none, use macro to generate ops helpers v3: reuse __uc_check_hw to avoid redundant comment v4: forward declare ops struct vs functions Signed-off-by: Michal Wajdeczko Cc: Joonas Lahtinen Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200110222723.14724-2-michal.wajdeczko@intel.com commit 3cdca6d62b8e948ca9c148deec7424b664d50cd9 Merge: 1a0986c1bc14 7fba6aea4472 Author: Takashi Iwai Date: Sat Jan 11 09:03:32 2020 +0100 Merge branch 'for-linus' into for-next Sync 5.5-devel branch once again for applying the HD-audio fixes. Signed-off-by: Takashi Iwai commit 6821af8b7885870ed0dcb299e4b3cd38695538bc Author: YueHaibing Date: Fri Jan 10 06:09:08 2020 +0000 sfc: remove set but not used variable 'nic_data' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/sfc/mcdi_functions.c: In function 'efx_mcdi_ev_init': drivers/net/ethernet/sfc/mcdi_functions.c:79:28: warning: variable 'nic_data' set but not used [-Wunused-but-set-variable] commit 4438b587fe4b ("sfc: move MCDI event queue management code") introduces this unused variable. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit de4ff8341f59d9893b9c1bd3b26d2f6c9d9a2dd2 Author: YueHaibing Date: Fri Jan 10 01:35:17 2020 +0000 sfc: remove duplicated include from ef10.c Remove duplicated include. Signed-off-by: YueHaibing Acked-by: Edward Cree Signed-off-by: David S. Miller commit 3071c51783b39d6a676d02a9256c3b3f87804285 Author: Jonathan Lemon Date: Thu Jan 9 11:35:42 2020 -0800 bnxt: Detach page from page pool before sending up the stack When running in XDP mode, pages come from the page pool, and should be freed back to the same pool or specifically detached. Currently, when the driver re-initializes, the page pool destruction is delayed forever since it thinks there are oustanding pages. Fixes: 322b87ca55f2 ("bnxt_en: add page_pool support") Signed-off-by: Jonathan Lemon Reviewed-by: Andy Gospodarek Signed-off-by: David S. Miller commit 06d3d72725045eefc31fcf2cae20a92e63cd8d3a Merge: 3abda7cabe85 0536309373e3 Author: Olof Johansson Date: Fri Jan 10 22:27:09 2020 -0800 Merge tag 'samsung-drivers-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/drivers Samsung soc drivers changes for v5.6 1. Convert to managed (devm_x()) versions, 2. Cleanups (Samsung and Exynos names). * tag 'samsung-drivers-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: memory: samsung: Rename Exynos to lowercase soc: samsung: Rename Samsung and Exynos to lowercase memory: samsung: exynos5422-dmc: Convert to devm_platform_ioremap_resource soc: samsung: exynos-pmu: Convert to devm_platform_ioremap_resource Link: https://lore.kernel.org/r/20200110172334.4767-2-krzk@kernel.org Signed-off-by: Olof Johansson commit e4b072cc2e18f6fff1740bf723b594467a4820a5 Merge: 3a4252daee7e 45984f0c70cc Author: Olof Johansson Date: Fri Jan 10 22:26:49 2020 -0800 Merge tag 'samsung-soc-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc Samsung mach/soc changes for v5.6 Cleanups (Samsung and Exynos names, Kconfig help text correction). * tag 'samsung-soc-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: samsung: Rename Samsung and Exynos to lowercase ARM: exynos: Correct the help text for platform Kconfig option Link: https://lore.kernel.org/r/20200110172334.4767-4-krzk@kernel.org Signed-off-by: Olof Johansson commit 3abda7cabe85e5631b21fbc0a75f9a393f598f9f Merge: ef832e4cb9b1 e2d5e8332c96 Author: Olof Johansson Date: Fri Jan 10 22:20:36 2020 -0800 Merge tag 'reset-for-5.6' of git://git.pengutronix.de/pza/linux into arm/drivers Reset controller updates for v5.6 This tag adds support for the Nuvoton NPCM, Intel Gatway SoC, and Broadcom BCM7216 RESCAL reset controllers, adds missing SCSSI reset controls for newer Uniphier SoCs, aligns the program flow in the devm_reset_controller_register, __devm_reset_control_get, and devm_reset_control_array_get functions for better consistency, and allows to build the Qcom AOSS reset driver as a module. This is based on v5.5-rc3 because the core patch depends on commit db23808615e2 ("reset: Do not register resource data for missing resets"). * tag 'reset-for-5.6' of git://git.pengutronix.de/pza/linux: reset: qcom-aoss: Allow CONFIG_RESET_QCOM_AOSS to be a tristate reset: Add Broadcom STB RESCAL reset controller dt-bindings: reset: Document BCM7216 RESCAL reset controller reset: intel: Add system reset controller driver dt-bindings: reset: Add YAML schemas for the Intel Reset controller reset: uniphier: Add SCSSI reset control for each channel reset: Align logic and flow in managed helpers reset: npcm: add NPCM reset controller driver dt-bindings: reset: Add binding constants for NPCM7xx reset controller dt-bindings: reset: add NPCM reset controller documentation Link: https://lore.kernel.org/r/dbbb2ca7490a0146d9ba632fd4d9f38063e03e9f.camel@pengutronix.de Signed-off-by: Olof Johansson commit 76c1f41577fb8919e858b27649c6ceb85ba019f0 Author: Chunyan Zhang Date: Fri Jan 10 14:37:54 2020 +0800 dt-bindings: arm: move sprd board file to vendor directory We've created a vendor directory for sprd, so move the board bindings to there. Link: https://lore.kernel.org/r/20200110063755.19804-2-zhang.lyra@gmail.com Signed-off-by: Chunyan Zhang Acked-by: Rob Herring Signed-off-by: Olof Johansson commit 99e45e29b69db901830d2a259d155fa6d7aa1afe Merge: 3886edbbb5ff 1fc61ed04d30 Author: Olof Johansson Date: Fri Jan 10 22:19:00 2020 -0800 Merge tag 'v5.6-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt New boards are the Radxa Rock Pi N10 using the VMARC SOM and Dalang carrier board, separate versions for the two rockpro64 hardware revisions which switched a pin between revisions. The rockpro64 also got bluetooth support now. The px30 got a lot of attention with dsi, gpu and thermal support. Similarly the rk3399-roc-pc board also got attention with mtd flash, sdr104 mode, hdmi sound, gpu and a lot of other smaller improvements. Other than that there is a new gpu-cooling device for rk3399 a cpu idle-state for rk3328 and more small improvements across a number of boards. * tag 'v5.6-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: (37 commits) arm64: dts: rockchip: Enable mp8859 regulator on rk3399-roc-pc arm64: dts: rockchip: rk3399-hugsun-x99: remove supports-sd and supports-emmc options arm64: dts: rockchip: rk3399-firefly: remove num-slots from &sdio0 node arm64: dts: rockchip: Add PX30 LVDS arm64: dts: rockchip: add dsi controller for px30 arm64: dts: rockchip: Add PX30 DSI DPHY arm64: dts: rockchip: Add RK3328 idle state arm64: dts: rockchip: remove identical &uart0 node from rk3368-lion-haikou arm64: dts: rockchip: Add Radxa Rock Pi N10 initial support ARM: dts: rockchip: Add Radxa Dalang Carrier board arm64: dts: rockchip: Add VMARC RK3399Pro SOM initial support dt-bindings: arm: rockchip: Add Rock Pi N10 binding arm64: dts: rockchip: hook up bluetooth at uart0 on rockpro64 arm64: dts: rockchip: enable wifi module at sdio0 on rockpro64 arm64: dts: rockchip: split rk3399-rockpro64 for v2 and v2.1 boards arm64: dts: rockchip: enable the gpu on px30-evb arm64: dts: rockchip: add the gpu for px30 dt-bindings: gpu: mali-bifrost: Add Rockchip PX30 arm64: dts: rockchip: Add GPU cooling device for RK3399 arm64: dts: rockchip: Add regulators for PCIe for Radxa Rock Pi 4 board ... Link: https://lore.kernel.org/r/5115625.yBEeHQkg2z@phil Signed-off-by: Olof Johansson commit 3886edbbb5ff37be2a5bbb0c91309a874fcb3dcb Merge: afa7f6eb4dca a950c4c63cde Author: Olof Johansson Date: Fri Jan 10 22:18:33 2020 -0800 Merge tag 'v5.6-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt Pin-name corrections for Veyron-Fievel, bluetooth for a number of veyron boards and additional operating points for rk3288-tinker. * tag 'v5.6-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: Use ABI name for recovery mode pin on veyron fievel/tiger ARM: dts: rockchip: Use ABI name for write protect pin on veyron fievel/tiger ARM: dts: rockchip: Add missing cpu operating points for rk3288-tinker ARM: dts: rockchip: Add brcm bluetooth for rk3288-veyron Link: https://lore.kernel.org/r/8215452.dU6eVM2tAM@phil Signed-off-by: Olof Johansson commit 8f1be72b33ec517a51d0a701f29f7d1063894d9b Merge: 2ba739aa79c6 f8683c2abdf5 Author: Olof Johansson Date: Fri Jan 10 22:18:11 2020 -0800 Merge tag 'amlogic-defconfig' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/defconfig arm64: defconfig updates for v5.6 - enable FUSB302 as module * tag 'amlogic-defconfig' of https://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: defconfig: enable FUSB302 as module Link: https://lore.kernel.org/r/7hftgoeaad.fsf@baylibre.com Signed-off-by: Olof Johansson commit afa7f6eb4dca0470bf60d8f29868123238a77d76 Author: Amelie Delaunay Date: Thu Jan 9 13:55:31 2020 +0100 ARM: multi_v7_defconfig: enable STM32 PWR regulator This enables the driver for STM32 PWR regulators found on stm32mp1. Link: https://lore.kernel.org/r/20200109125531.13610-1-alexandre.torgue@st.com Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue Signed-off-by: Olof Johansson commit 37365e152a72f346b8ebe1c6526b3a602360b8be Merge: 031a612b16c2 f8849332aeda Author: Olof Johansson Date: Fri Jan 10 22:17:22 2020 -0800 Merge tag 'stm32-dt-for-v5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/dt STM32 DT updates for v5.6, round 1 Highlights: ---------- MPU part: -Add PWM support on DK2 board. -Add counter support to STM32 timers. -Add support of SDMMC 2&3 instances based on "arm,pl18x". SDMMC2 is connected to eMMC on ED1 board. SDMMC3 is connected to the GPIO extension connector on EV1 & DKx boards. -Add ADC support on ED1 board. -Update devicetree files split to better fit to STM32MP15 SOC & boards diversity. -Fix issues seen during YAML validation. -Enable Ethernet (MAC) TX clock gating during low-power mode. -Enable USB OTG HS support on DKx boards. -Enable USB Host EHCI on DKx boards. MCU part: -Fix issues seen during YAML validation. * tag 'stm32-dt-for-v5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: (37 commits) ARM: dts: stm32: Add power-supply for RGB panel on stm32429i-eval ARM: dts: stm32: Add power-supply for DSI panel on stm32f469-disco ARM: dts: stm32: change nvmem node name on stm32mp1 ARM: dts: stm32: change nvmem node name on stm32f429 ARM: dts: stm32: update mlahb node according to the bindings on stm32mp15 ARM: dts: stm32: fix dma controller node name on stm32mp157c ARM: dts: stm32: fix dma controller node name on stm32f743 ARM: dts: stm32: fix dma controller node name on stm32f746 ARM: dts: stm32: add phy-names to usbotg_hs on stm32mp157c-ev1 ARM: dts: stm32: enable USB OTG HS on stm32mp15 DKx boards ARM: dts: stm32: enable USB Host (USBH) EHCI controller on stm32mp15 DKx ARM: dts: stm32: enable USBPHYC on stm32mp15 DKx boards ARM: dts: stm32: remove useless clock-names from RTC node on stm32f746 ARM: dts: stm32: remove useless clock-names from RTC node on stm32f429 ARM: dts: stm32: Enable MAC TX clock gating during TX low-power mode on stm32mp15 ARM: dts: stm32: adjust slew rate for Ethernet on stm32mp15 ARM: dts: stm32: remove syscfg clock on stm32mp15 ethernet ARM: dts: stm32: remove "@" and "_" from stm32f7 pinmux groups ARM: dts: stm32: remove "@" and "_" from stm32f4 pinmux groups ARM: dts: stm32: Adapt STM32MP157C ED1 board to STM32 DT diversity ... Link: https://lore.kernel.org/r/39df1dee-3c9f-cd35-bc55-a71223e07100@st.com Signed-off-by: Olof Johansson commit 031a612b16c214528554d269e9907767770a9304 Merge: 6a346cf9738a 6fa154e46c72 Author: Olof Johansson Date: Fri Jan 10 22:16:17 2020 -0800 Merge tag 'hisi-arm64-dt-for-5.6' of git://github.com/hisilicon/linux-hisi into arm/dt ARM64: DT: Hisilicon SoCs DT updates for 5.6 - Add remote control map name of the IR device for the hi3798cv200 poplar board - Correct the PCIe bus range setting for the hi3798cv200 * tag 'hisi-arm64-dt-for-5.6' of git://github.com/hisilicon/linux-hisi: arm64: dts: hi3798cv200: correct PCIe 'bus-range' setting arm64: dts: hi3798cv200-poplar: add linux,rc-map-name for IR Link: https://lore.kernel.org/r/5E169EDE.8020809@hisilicon.com Signed-off-by: Olof Johansson commit 3a4252daee7e6d760e8a53f7e8b27b4cf528c329 Merge: d5279a57c408 c586f47f55d8 Author: Olof Johansson Date: Fri Jan 10 22:15:53 2020 -0800 Merge tag 'arm-soc/for-5.6/soc' of https://github.com/Broadcom/stblinux into arm/soc This pull request contains Broadcom ARM-based SoCs Kconfig/machine changes for 5.6, please pull the following: - Justin adds an entry for BCM7216's debug UART to support DEBUG_LL - Florian adds a select ARM_AMBA to support the ARM PL011 UART/console which is required on BCM7211 * tag 'arm-soc/for-5.6/soc' of https://github.com/Broadcom/stblinux: ARM: bcm: Select ARM_AMBA for ARCH_BRCMSTB ARM: brcmstb: Add debug UART entry for 7216 Link: https://lore.kernel.org/r/20200108191114.15987-3-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit ef832e4cb9b14963635b230e967674779c81dfec Merge: 40a9012a3b24 add427c49e92 Author: Olof Johansson Date: Fri Jan 10 22:15:25 2020 -0800 Merge tag 'arm-soc/for-5.6/drivers' of https://github.com/Broadcom/stblinux into arm/drivers This pull request contains Broadcom ARM/ARM64/MIPS-based SoCs drivers changes for 5.6, please pull the following: - Florian provides a set of updates to the Bus Interface Unit control to tune it appropriately for the most recent chips: 7255, 7260, 7216, 7211 * tag 'arm-soc/for-5.6/drivers' of https://github.com/Broadcom/stblinux: soc: bcm: brcmstb: biuctrl: Update programming for 7211 soc: bcm: brcmstb: biuctrl: Update layout for A72 on 7211 soc: bcm: brcmstb: biuctrl: Tune interface for 7255 and 7216 soc: bcm: brcmstb: biuctrl: Tune 7260 BIU interface Link: https://lore.kernel.org/r/20200108191114.15987-2-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 6a346cf9738ac7d0235870bfc1223d5cc8f6b7d1 Merge: e052860d1181 0100f76d9634 Author: Olof Johansson Date: Fri Jan 10 22:15:04 2020 -0800 Merge tag 'arm-soc/for-5.6/devicetree' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM-based SoCs Device Tree changes for 5.6, please pull the following: - Stephan adds support for the HWRNG on 2711 (Raspberry Pi 4) which is different than the previous Pi chips - Florian switches the BCM956265HR board to use the hardware I2C controllers for interfacing with the SFPs * tag 'arm-soc/for-5.6/devicetree' of https://github.com/Broadcom/stblinux: ARM: dts: bcm2711: Enable HWRNG support ARM: dts: bcm2835: Move rng definition to common location ARM: dts: NSP: Use hardware I2C for BCM958625HR Link: https://lore.kernel.org/r/20200108191114.15987-1-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 451c790053b98cdf341cf4c0419fd6cdec25aa2a Merge: efa193ba9a57 9cd3e2c64f88 Author: David S. Miller Date: Fri Jan 10 17:07:00 2020 -0800 Merge branch 'devlink-documentation-refactor' Jacob Keller says: ==================== devlink documentation refactor This series updates the devlink documentation, with a few primary goals * move all of the devlink documentation into a dedicated subfolder * convert that documentation to the reStructuredText format * merge driver-specific documentations into a single file per driver * add missing documentation, including per-driver and devlink generally For each driver, I took the time to review the code and add further documentation on the various features it currently supports. Additionally, I added new documentation files for some of the features such as devlink-dpipe, devlink-resource, and devlink-regions. Note for the region snapshot triggering, I kept that as a separate patch as that is based on work that has not yet been merged to net-next, and may change. I also improved the existing documentation for devlink-info and devlink-param by adding a bit more of an introduction when converting it to the rst format. ==================== Signed-off-by: David S. Miller commit 9cd3e2c64f889a48b0d14bda22e867722b55497e Author: Jacob Keller Date: Thu Jan 9 14:46:25 2020 -0800 devlink: document region snapshot triggering from userspace Now that devlink regions can be triggered via DEVLINK_CMD_REGION_TRIGGER, document this in the devlink-region.rst file. Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit b7ec1eca71efe21d08fb1d05caa8ab06b22fe2f7 Author: Jacob Keller Date: Thu Jan 9 14:46:24 2020 -0800 devlink: introduce devlink-dpipe.rst documentation file Primarily based on the DPIPE netdev conference paper, introduce a new file to document the dpipe interface. This likely needs further improvement, but is at least a good overall start. Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit a1af8e9a8029969632ff9f6b5ddc326c59d8c06d Author: Jacob Keller Date: Thu Jan 9 14:46:23 2020 -0800 devlink: add a devlink-resource.rst documentation file Take the little bit of documentation for resources from various commit messages and combine it into a new devlink-resource.rst file. This could probably be expanded on even further by someone with more knowledge of how the devlink resources work. Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit 04e4272cb3ae2bbb7a5d672918092366f48c9f52 Author: Jacob Keller Date: Thu Jan 9 14:46:22 2020 -0800 devlink: rename and expand devlink-trap-netdevsim.rst Rename the trap-specific netdevimsim.rst file, and expand it to include documentation of all the devlink features currently implemented by the netdevsim driver code. Signed-off-by: Jacob Keller Cc: Jakub Kicinski Signed-off-by: David S. Miller commit cf4cb322d75253e38a41ec77d493a56c7a6648ab Author: Jacob Keller Date: Thu Jan 9 14:46:21 2020 -0800 devlink: add documentation for ionic device driver The IONIC device driver allocates a devlink and reports versions. Add documentation for this driver. Signed-off-by: Jacob Keller Cc: Shannon Nelson Acked-by: Shannon Nelson Signed-off-by: David S. Miller commit 0b0f945f54584621f4f91da701909f8e78c9eb69 Author: Jacob Keller Date: Thu Jan 9 14:46:20 2020 -0800 devlink: add a file documenting devlink regions Also document the regions created by the mlx4 driver. This is currently the only in-tree driver that creates devlink region snapshots. Signed-off-by: Jacob Keller Cc: Tariq Toukan Signed-off-by: David S. Miller commit 0f261c3ca09e112ac629588c926ec22091b17c42 Author: Jacob Keller Date: Thu Jan 9 14:46:19 2020 -0800 devlink: add a driver-specific file for the qed driver The qed driver recently added devlink support with a single devlink parameter. Add a driver-specific file to document the devlink features that the qed driver supports. Signed-off-by: Jacob Keller Cc: Ariel Elior Cc: GR-everest-linux-l2@marvell.com Signed-off-by: David S. Miller commit ee7a711f32a786819f2240290b88c8f5fc0cca96 Author: Jacob Keller Date: Thu Jan 9 14:46:18 2020 -0800 devlink: add parameter documentation for the mlx4 driver The mlx5 and mlxsw drivers have driver-specific documentation for the devlink features they support. No such file was added for mlx4. Add a file to document the mlx4 devlink support. Initially it contains only the devlink parameters. Signed-off-by: Jacob Keller Cc: Tariq Toukan Signed-off-by: David S. Miller commit d4255d75856fc14faaa2760b687bc998af1cd8e9 Author: Jacob Keller Date: Thu Jan 9 14:46:17 2020 -0800 devlink: document info versions for each driver Add the set of info versions reported by each device driver, including a description of what the version represents, and what modes (fixed, running, stored) it reports. Signed-off-by: Jacob Keller Cc: Tariq Toukan Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: Michael Chan Cc: Jiri Pirko Cc: Jakub Kicinski Signed-off-by: David S. Miller commit 6c39e015f87fb46f68532d063d4fd337d094fdeb Author: Jacob Keller Date: Thu Jan 9 14:46:16 2020 -0800 devlink: convert driver-specific files to reStructuredText Several drivers document what parameters they support in a devlink-params-*.txt file. This file is supposed to contain both the list of generic parameters implemented by the driver, as well as a list of driver-specific parameters and their descriptions. It would also be good if the driver documentation included other driver-specific implementations, such as info versions, devlink regions, and so forth. Convert all of these documentation files to reStructuredText, and rename them to just the driver name. Future changes will include other driver-specific implementations. Each file will contain a table for the generic parameters implemented, as well as a separate table for the driver-specific parameters. Future sections such as for devlink info versions will be added to these files. This avoids creating additional devlink-- files for each devlink feature, reducing clutter in the documentation folder. Signed-off-by: Jacob Keller Cc: Tariq Toukan Cc: Saeed Mahameed Cc: Leon Romanovsky Cc: Michael Chan Cc: Andrew Lunn Cc: Vivien Didelot Cc: Jiri Pirko Cc: Ido Schimmel Cc: Jakub Kicinski Cc: Grygorii Strashko Signed-off-by: David S. Miller commit 5948f85bbcb3874746702ad8e9ca1bf787005d47 Author: Jacob Keller Date: Thu Jan 9 14:46:15 2020 -0800 devlink: mention reloading in devlink-params.rst Mention that drivers must support devlink-reload in order for driverinit parameters to function properly Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit d56a0c47a9555c35933c4f7a1f94e55bc809de41 Author: Jacob Keller Date: Thu Jan 9 14:46:14 2020 -0800 devlink: add documentation for generic devlink parameters A few generic devlink parameters have been added, but never documented. Fix that now. Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit 8559dc33a31df343315a3deffda066886a097da5 Author: Jacob Keller Date: Thu Jan 9 14:46:13 2020 -0800 devlink: convert devlink-params.txt to reStructuredText Convert the generic parameters descriptions into the reStructuredText format. Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit 2dfaaae521d0af16da287b0c22683fd2a31ace81 Author: Jacob Keller Date: Thu Jan 9 14:46:12 2020 -0800 devlink: rename devlink-info-versions.rst and add a header Rename the devlink-info-versions.rst file to a plain devlink-info.rst file. Add additional paragraphs explaining what devlink-info is for, and the expectation that drivers use the generic names where plausible. Note that drivers which use non-standard info version names ought to document these in a driver-specific info-versions.rst file. Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit f7555fd19903cb64ad9887875a47094bdb0ab0c2 Author: Jacob Keller Date: Thu Jan 9 14:46:11 2020 -0800 devlink: convert devlink-health.txt to rst format Update the devlink-health documentation to use the newer ReStructuredText format. Note that it's unclear what OOB stood for, and it has been left as-is without a proper first-use expansion of the acronym. Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit f4bdd7103652fab5ac8b0ed75fa5cbc515b50b8b Author: Jacob Keller Date: Thu Jan 9 14:46:10 2020 -0800 devlink: move devlink documentation to subfolder Combine the documentation for devlink into a subfolder, and provide an index.rst file that can be used to generally describe devlink. Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit 468672b24fbc1c018e192dcc90e887bc9a9b2595 Author: Jacob Keller Date: Thu Jan 9 14:46:09 2020 -0800 devlink: add macro for "fw.psid" The "fw.psid" devlink info version is documented in devlink-info.rst, and used by one driver. However, there is no associated macro for this firmware version like there is for others. Add one now. Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit efa193ba9a57248517e2c25353d6eac74927d5fc Merge: 916d08f64009 814c2bfd4f5f Author: David S. Miller Date: Fri Jan 10 16:41:35 2020 -0800 Merge branch 'r8169-factor-out-chip-specific-PHY-configuration-to-a-separate-source-file' Heiner Kallweit says: ==================== r8169: factor out chip-specific PHY configuration to a separate source file Basically every chip version needs its own PHY configuration. To improve maintainability of the driver move all these PHY configurations to a separate source file. To allow this we first have to change all PHY configurations to use phylib functions wherever possible. ==================== Signed-off-by: David S. Miller commit 814c2bfd4f5f8cc84fead00b86b49a8cfc8f8e08 Author: Heiner Kallweit Date: Thu Jan 9 20:34:55 2020 +0100 r8169: factor out PHY configuration to r8169_phy_config.c Move chip-specific PHY configurations to separate source file r8169_phy_config.c. This improves maintainability of the driver. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 2992bdfa4ad272251f664cb1e5cbd93e5ea25f04 Author: Heiner Kallweit Date: Thu Jan 9 20:34:05 2020 +0100 r8169: add r8169.h In preparation of factoring out PHY configuration to a separate source file move commonly used definitions to new header file r8169.h. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 1c5be5e91d780bd2aaa2bdb1fe02265bb2a6ab36 Author: Heiner Kallweit Date: Thu Jan 9 20:33:13 2020 +0100 r8169: rename rtl_apply_firmware Rename rtl_apply_firmware() to r8169_apply_firmware() before exporting it to avoid namespace clashes with other drivers for Realtek hardware. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 00b522d1ebaffa66f17203f2b610a0aa4d16a900 Author: Heiner Kallweit Date: Thu Jan 9 20:32:36 2020 +0100 r8169: add phydev argument to rtl8168d_apply_firmware_cond Pass the phy_device as parameter to rtl8168d_apply_firmware_cond(), this avoids having to access rtl8169_private internals. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 3ab077d2f4057a0b827d6533d6bbdd11cf31a284 Author: Heiner Kallweit Date: Thu Jan 9 20:31:47 2020 +0100 r8169: use phy_read/write instead of rtl_readphy/writephy Replace rtl_writephy and rtl_readphy with the respective phylib functions. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit c4d76995f520d2ce55f38d6f844d55daf411dd9c Author: Heiner Kallweit Date: Thu Jan 9 20:31:10 2020 +0100 r8169: replace rtl_w0w1_phy Replace rtl_w0w1_phy with phylib functions. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 11b3bedeb043db88bfea2ce41bd3453b25ee9d45 Author: Heiner Kallweit Date: Thu Jan 9 20:30:37 2020 +0100 r8169: replace rtl_patchphy Replace rtl_patchphy with phylib functions. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 6d7a631e27ad526ea2e47082d5d84167d0fdc984 Author: Heiner Kallweit Date: Thu Jan 9 20:30:00 2020 +0100 r8169: move disabling MAC EEE for RTL8402/RTL8106e Move configuring EEE on MAC side out of the PHY configuration. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 8d46f6207a8948d179b107afb4dcd03c4b96c37f Author: Heiner Kallweit Date: Thu Jan 9 20:29:21 2020 +0100 r8169: move setting ERI register 0x1d0 for RTL8106 Writing this ERI register is a MAC setting, so move it to rtl_hw_start_8106(). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 8aa9a5d3f6af583ef6ba1f8ac66142c59ef5223a Author: Heiner Kallweit Date: Thu Jan 9 20:28:45 2020 +0100 r8169: switch to phylib functions in rtl_writephy_batch Switch rtl_writephy_batch() to phylib functions, as a result we can avoid passing a rtl8169_private parameter. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 4c867e36b89e820d6ddd901cc75b943a1e511be4 Author: Heiner Kallweit Date: Thu Jan 9 20:28:08 2020 +0100 r8169: change argument type of RTL8168g-specific PHY config functions These functions use only the phy_device member of rtl8169_private, so we can pass the phy_device as parameter directly. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 8cecc8f0ae2e9b12f34f08a2e18d436aa7f779bd Author: Heiner Kallweit Date: Thu Jan 9 20:27:33 2020 +0100 r8169: change argument type of EEE PHY functions These functions use only the phy_device member of rtl8169_private, so we can pass the phy_device as parameter directly. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit fc712387b10cd3a06b5bc9e3d0379fbd3eb9e2c5 Author: Heiner Kallweit Date: Thu Jan 9 20:26:59 2020 +0100 r8169: move RTL8169scd Gigabyte PHY quirk In preparation of factoring out rtl8169scd_hw_phy_config() move this quirk to rtl8169_init_phy(). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit b5aed0b3c292a259a6b32fe3ab828a9854b9facb Author: Heiner Kallweit Date: Thu Jan 9 20:26:19 2020 +0100 r8169: remove not needed debug print in rtl8169_init_phy Remove a useless debug statement. This also allows to remove the net_device parameter from rtl8169_init_phy(). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit becd837eebc529e0b95f5994c52f93df3baed039 Author: Heiner Kallweit Date: Thu Jan 9 20:25:31 2020 +0100 r8169: prepare for exporting rtl_hw_phy_config In preperation of factoring out the PHY configuration to a separate source file this patch: - avoids accessing rtl8169_private internals by passing the phy_device and mac_version as separate parameters - renames rtl_hw_phy_config to r8169_hw_phy_config to avoid namespace clashes with other drivers for Realtek hardware Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 3b0bfd33ffb21dff369afaa8b1e4a6f25407ff38 Merge: ffd7263e63fe dfb9a8857f4d Author: Benson Leung Date: Fri Jan 10 15:06:16 2020 -0800 Merge branch 'chrome-platform-5.5-fixes' into for-kernelci Merge dfb9a8857f4d platform/chrome: wilco_ec: Fix keyboard backlight probing from chrome-platform-5.5-fixes into chrome-platform-5.6 destined branch. Signed-off-by: Benson Leung commit 1bdd3e05a0a3b4a97ea88bc46fef8fb265c8b94c Merge: 643dd7416649 c79f46a28239 Author: Dmitry Torokhov Date: Fri Jan 10 14:56:04 2020 -0800 Merge tag 'v5.5-rc5' into next Sync up with mainline to get SPI "delay" API changes. commit 643dd7416649bea2e8c61d8fdeeefb409a0ca5eb Author: Marco Felsch Date: Thu Jan 9 17:05:00 2020 -0800 Input: edt-ft5x06 - use pm core to enable/disable the wake irq We do not have to handle the wake-irq within the driver because the pm core can handle this for us. The only use case for the suspend/resume callbacks was to handle the wake-irq so we can remove the callbacks. Signed-off-by: Marco Felsch Signed-off-by: Dmitry Torokhov commit 53435cd88e6ac0491ddbfa03111667229f7b8693 Author: Marco Felsch Date: Thu Jan 9 17:04:36 2020 -0800 Input: edt-ft5x06 - make wakeup-source switchable Since day one the touch controller acts as wakeup-source. This seems to be wrong since the device supports deep-sleep mechanism [1] which requires a reset to leave it. Also some designs won't use the touchscreen as wakeup-source. According discussion [2] we decided to break backward compatibility and go the common way by using the 'wakeup-source' device-property. [1] https://www.newhavendisplay.com/appnotes/datasheets/touchpanel/FT5x26.pdf [2] https://patchwork.kernel.org/patch/11149037/ Signed-off-by: Marco Felsch Tested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov commit 21cdb025fc6930f240af48a491e8c763be7900f2 Author: Marco Felsch Date: Thu Jan 9 17:04:13 2020 -0800 Input: edt-ft5x06 - document wakeup-source capability The current driver behaviour was to enable the wakeup-source everytime. After discussion [1] we decided to change that behaviour so the device will act as wakeup-source only if the "wakeup-source" dt-property is present. The patch adds the binding documentation to enable the wakeup-source capability. [1] https://patchwork.kernel.org/patch/11149037/ Signed-off-by: Marco Felsch Tested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Reviewed-by: Rob Herring Signed-off-by: Dmitry Torokhov commit 8726e4c9a30988766513fb26ec85d282aa44bb53 Author: Marco Felsch Date: Thu Jan 9 17:03:32 2020 -0800 Input: edt-ft5x06 - alphabetical include reorder It seems that the include order is historical increased and no one takes care of it. Fix this to align it with the common rule to be in a alphabetical order. Signed-off-by: Marco Felsch Tested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov commit e112324cc0422c046f1cf54c56f333d34fa20885 Author: Philipp Zabel Date: Thu Jan 9 17:03:21 2020 -0800 Input: edt-ft5x06 - work around first register access error The EP0700MLP1 returns bogus data on the first register read access (reading the threshold parameter from register 0x00): edt_ft5x06 2-0038: crc error: 0xfc expected, got 0x40 It ignores writes until then. This patch adds a dummy read after which the number of sensors and parameter read/writes work correctly. Signed-off-by: Philipp Zabel Signed-off-by: Marco Felsch Tested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov commit d9b8e21eae5d032a217c382520a72e5a51a08440 Author: Nicolas Ferre Date: Fri Jan 10 10:01:03 2020 +0100 ARM: at91: Documentation: add sam9x60 product and datasheet Add the new SAM9X60 ARM926-based SoC from Microchip and its associated datasheet. Signed-off-by: Nicolas Ferre Link: https://lore.kernel.org/r/20200110090103.7728-1-nicolas.ferre@microchip.com Signed-off-by: Alexandre Belloni commit ec6e618c8c018c1361d77789a100a5f6f6317178 Author: Claudiu Beznea Date: Wed Dec 11 13:04:08 2019 +0200 ARM: at91: pm: use of_device_id array to find the proper shdwc node Use of_device_id array to find the proper shdwc compatibile node. SAM9X60's shdwc changes were not integrated when commit eaedc0d379da ("ARM: at91: pm: add ULP1 support for SAM9X60") was integrated. Fixes: eaedc0d379da ("ARM: at91: pm: add ULP1 support for SAM9X60") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1576062248-18514-3-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit 6b9dfd986a81a999a27b6ed9dbe91203089c62dd Author: Claudiu Beznea Date: Wed Dec 11 13:04:07 2019 +0200 ARM: at91: pm: use SAM9X60 PMC's compatible SAM9X60 PMC's has a different PMC. It was not integrated at the moment commit 01c7031cfa73 ("ARM: at91: pm: initial PM support for SAM9X60") was published. Fixes: 01c7031cfa73 ("ARM: at91: pm: initial PM support for SAM9X60") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1576062248-18514-2-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit f013dbe4e7205b44ce057ef6aab8853d1c63513d Author: Claudiu Beznea Date: Fri Nov 29 15:51:45 2019 +0200 ARM: configs: at91: enable config flags for sam9x60 SoC Enable config flags for SAM9X60 SoC. This includes SoC flag (CONFIG_SOC_SAM9X60) and IP/board specific flags as follows: - atmel maxtouch - flexcom - XDMA - I2S Multi-channel - mikroelectronica proto board - SAMA5D2's ADC - atmel QSPI - classd Signed-off-by: Claudiu Beznea Signed-off-by: Tudor Ambarus Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/1575035505-6310-10-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit cea215f68dd48aad4644640fa40f4275d7da83ef Author: Claudiu Beznea Date: Fri Nov 29 15:51:44 2019 +0200 ARM: configs: at91: use savedefconfig Use savedefconfig. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1575035505-6310-9-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit 72d052e28d1d2363f9107be63ef3a3afdea6143c Author: Tiezhu Yang Date: Fri Jan 10 09:30:42 2020 +0800 MIPS: Loongson: Fix potential NULL dereference in loongson3_platform_init() If kzalloc fails, it should return -ENOMEM, otherwise may trigger a NULL pointer dereference. Fixes: 3adeb2566b9b ("MIPS: Loongson: Improve LEFI firmware interface") Signed-off-by: Tiezhu Yang Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: Huacai Chen Cc: Jiaxun Yang Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit ac065870d92824ee0bc275ab71fd8901dbde5055 Author: Andrii Nakryiko Date: Fri Jan 10 13:16:34 2020 -0800 selftests/bpf: Add BPF_PROG, BPF_KPROBE, and BPF_KRETPROBE macros Streamline BPF_TRACE_x macro by moving out return type and section attribute definition out of macro itself. That makes those function look in source code similar to other BPF programs. Additionally, simplify its usage by determining number of arguments automatically (so just single BPF_TRACE vs a family of BPF_TRACE_1, BPF_TRACE_2, etc). Also, allow more natural function argument syntax without commas inbetween argument type and name. Given this helper is useful not only for tracing tp_btf/fenty/fexit programs, but could be used for LSM programs and others following the same pattern, rename BPF_TRACE macro into more generic BPF_PROG. Existing BPF_TRACE_x usages in selftests are converted to new BPF_PROG macro. Following the same pattern, define BPF_KPROBE and BPF_KRETPROBE macros for nicer usage of kprobe/kretprobe arguments, respectively. BPF_KRETPROBE, adopts same convention used by fexit programs, that last defined argument is probed function's return result. v4->v5: - fix test_overhead test (__set_task_comm is void) (Alexei); v3->v4: - rebased and fixed one more BPF_TRACE_x occurence (Alexei); v2->v3: - rename to shorter and as generic BPF_PROG (Alexei); v1->v2: - verified GCC handles pragmas as expected; - added descriptions to macros; - converted new STRUCT_OPS selftest to BPF_HANDLER (worked as expected); - added original context as 'ctx' parameter, for cases where it has to be passed into BPF helpers. This might cause an accidental naming collision, unfortunately, but at least it's easy to work around. Fortunately, this situation produces quite legible compilation error: progs/bpf_dctcp.c:46:6: error: redefinition of 'ctx' with a different type: 'int' vs 'unsigned long long *' int ctx = 123; ^ progs/bpf_dctcp.c:42:6: note: previous definition is here void BPF_HANDLER(dctcp_init, struct sock *sk) ^ ./bpf_trace_helpers.h:58:32: note: expanded from macro 'BPF_HANDLER' ____##name(unsigned long long *ctx, ##args) Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200110211634.1614739-1-andriin@fb.com commit afa47fdfa29ffd3324e7b89551d1a6e54ccc042b Author: Madhuparna Bhowmik Date: Mon Dec 9 13:20:43 2019 +0530 rculist.h: Add list_tail_rcu() This patch adds the macro list_tail_rcu() and documents it. Signed-off-by: Madhuparna Bhowmik [ paulmck: Reword a bit. ] Signed-off-by: Paul E. McKenney commit 459b5287066f53c4b91569c070780a540de90b85 Author: Madhuparna Bhowmik Date: Fri Dec 6 00:23:52 2019 +0530 rculist_nulls: Change docbook comment headers This patch changes the docbook comment "head for your list" to "head of the list". Signed-off-by: Madhuparna Bhowmik Signed-off-by: Paul E. McKenney commit 7f5d51e26a471f771b8dae1b9ef417f5fd5e9c85 Author: Madhuparna Bhowmik Date: Thu Dec 5 11:46:49 2019 +0530 rculist_nulls: Add docbook comments This patch adds docbook comment headers for hlist_nulls_first_rcu() and hlist_nulls_next_rcu() in rculist_nulls.h. Signed-off-by: Madhuparna Bhowmik Signed-off-by: Paul E. McKenney commit 02b99b38f3d96c77cf0a368d99952aa372dfe58a Author: Paul E. McKenney Date: Sat Nov 9 10:45:47 2019 -0800 rcu: Add a hlist_nulls_unhashed_lockless() function This commit adds an hlist_nulls_unhashed_lockless() to allow lockless checking for whether or note an hlist_nulls_node is hashed or not. While in the area, this commit also adds a docbook comment to the existing hlist_nulls_unhashed() function. Signed-off-by: Paul E. McKenney commit 46deb7449d99f37bebf5cbd7f95c136c6fafeaa5 Author: Paul E. McKenney Date: Sat Nov 9 10:35:13 2019 -0800 rcu: Add and update docbook header comments in list.h [ paulmck: Fix typo found by kbuild test robot. ] Signed-off-by: Paul E. McKenney commit 860c8802ace14c646864795e057349c9fb2d60ad Author: Paul E. McKenney Date: Sat Nov 9 09:42:13 2019 -0800 rcu: Use WRITE_ONCE() for assignments to ->pprev for hlist_nulls Eric Dumazet supplied a KCSAN report of a bug that forces use of hlist_unhashed_lockless() from sk_unhashed(): ------------------------------------------------------------------------ BUG: KCSAN: data-race in inet_unhash / inet_unhash write to 0xffff8880a69a0170 of 8 bytes by interrupt on cpu 1: __hlist_nulls_del include/linux/list_nulls.h:88 [inline] hlist_nulls_del_init_rcu include/linux/rculist_nulls.h:36 [inline] __sk_nulls_del_node_init_rcu include/net/sock.h:676 [inline] inet_unhash+0x38f/0x4a0 net/ipv4/inet_hashtables.c:612 tcp_set_state+0xfa/0x3e0 net/ipv4/tcp.c:2249 tcp_done+0x93/0x1e0 net/ipv4/tcp.c:3854 tcp_write_err+0x7e/0xc0 net/ipv4/tcp_timer.c:56 tcp_retransmit_timer+0x9b8/0x16d0 net/ipv4/tcp_timer.c:479 tcp_write_timer_handler+0x42d/0x510 net/ipv4/tcp_timer.c:599 tcp_write_timer+0xd1/0xf0 net/ipv4/tcp_timer.c:619 call_timer_fn+0x5f/0x2f0 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0xc0c/0xcd0 kernel/time/timer.c:1786 __do_softirq+0x115/0x33f kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0xbb/0xe0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0xe6/0x280 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 native_safe_halt+0xe/0x10 arch/x86/kernel/paravirt.c:71 arch_cpu_idle+0x1f/0x30 arch/x86/kernel/process.c:571 default_idle_call+0x1e/0x40 kernel/sched/idle.c:94 cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x1af/0x280 kernel/sched/idle.c:263 cpu_startup_entry+0x1b/0x20 kernel/sched/idle.c:355 start_secondary+0x208/0x260 arch/x86/kernel/smpboot.c:264 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:241 read to 0xffff8880a69a0170 of 8 bytes by interrupt on cpu 0: sk_unhashed include/net/sock.h:607 [inline] inet_unhash+0x3d/0x4a0 net/ipv4/inet_hashtables.c:592 tcp_set_state+0xfa/0x3e0 net/ipv4/tcp.c:2249 tcp_done+0x93/0x1e0 net/ipv4/tcp.c:3854 tcp_write_err+0x7e/0xc0 net/ipv4/tcp_timer.c:56 tcp_retransmit_timer+0x9b8/0x16d0 net/ipv4/tcp_timer.c:479 tcp_write_timer_handler+0x42d/0x510 net/ipv4/tcp_timer.c:599 tcp_write_timer+0xd1/0xf0 net/ipv4/tcp_timer.c:619 call_timer_fn+0x5f/0x2f0 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0xc0c/0xcd0 kernel/time/timer.c:1786 __do_softirq+0x115/0x33f kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0xbb/0xe0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0xe6/0x280 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830 native_safe_halt+0xe/0x10 arch/x86/kernel/paravirt.c:71 arch_cpu_idle+0x1f/0x30 arch/x86/kernel/process.c:571 default_idle_call+0x1e/0x40 kernel/sched/idle.c:94 cpuidle_idle_call kernel/sched/idle.c:154 [inline] do_idle+0x1af/0x280 kernel/sched/idle.c:263 cpu_startup_entry+0x1b/0x20 kernel/sched/idle.c:355 rest_init+0xec/0xf6 init/main.c:452 arch_call_rest_init+0x17/0x37 start_kernel+0x838/0x85e init/main.c:786 x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:490 x86_64_start_kernel+0x72/0x76 arch/x86/kernel/head64.c:471 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:241 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.0-rc6+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ------------------------------------------------------------------------ This commit therefore replaces C-language assignments with WRITE_ONCE() in include/linux/list_nulls.h and include/linux/rculist_nulls.h. Reported-by: Eric Dumazet # For KCSAN Signed-off-by: Paul E. McKenney commit 46d1a0f03d6611659420c3ddde28da3f3f134a3f Author: Kees Cook Date: Thu Jan 9 21:02:06 2020 -0800 selftests/lkdtm: Add tests for LKDTM targets This adds a basic framework for running all the "safe" LKDTM tests. This will allow easy introspection into any selftest logs to examine the results of most LKDTM tests. Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit 35c57fc3f8eac81b38664a0fe160e267b908d8b8 Author: Alan Maguire Date: Fri Jan 10 11:49:25 2020 +0000 kunit: building kunit as a module breaks allmodconfig kunit tests that do not support module build should depend on KUNIT=y rather than just KUNIT in Kconfig, otherwise they will trigger compilation errors for "make allmodconfig" builds. Fixes: 9fe124bf1b77 ("kunit: allow kunit to be loaded as a module") Reported-by: Stephen Rothwell Signed-off-by: Alan Maguire Signed-off-by: Shuah Khan commit 485b747ea6ecf491bf07c69a4ea36c0ccf3c8435 Author: Mikita Lipski Date: Fri Jan 10 14:31:52 2020 -0500 drm/amd/display: Fix compilation warnings on i386 [why] Compilation error "undefined reference to `__udivdi3'" was thrown on i386 architecture. [how] Use div_u64 for unsigned long division instead of a divide operator. Reported-by: Randy Dunlap Reviewed-by: Alex Deucher Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit 28910cee898c2a43fcdd8c26e1378ae8084a93a0 Author: Shubhrajyoti Datta Date: Fri Jan 10 12:01:13 2020 +0530 fpga: xilinx-pr-decoupler: Remove clk_get error message for probe defer In probe, the driver checks for devm_clk_get return and print error message in the failing case. However for -EPROBE_DEFER this message is confusing so avoid it. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Moritz Fischer commit c0e60347d44d5e06869a253de326373e976be1c7 Author: Chris Wilson Date: Fri Jan 10 14:44:18 2020 +0000 drm/i915/gt: Hold rpm wakeref before taking ggtt->vm.mutex We need to hold the runtime-pm wakeref to update the global PTEs (as they exist behind a PCI BAR). However, some systems invoke ACPI during runtime resume and so require allocations, which is verboten inside the vm->mutex. Ergo, we must not use intel_runtime_pm_get() inside the mutex, but lift the call outside. Closes: https://gitlab.freedesktop.org/drm/intel/issues/958 Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Cc: Matthew Auld Cc: Mika Kuoppala Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200110144418.1415639-1-chris@chris-wilson.co.uk commit cfff75d8973ae4a90b3df3ae7fbba1ce9af9c8f0 Author: Ondrej Mosnacek Date: Wed Jan 8 15:09:58 2020 +0100 selinux: reorder hooks to make runtime disable less broken Commit b1d9e6b0646d ("LSM: Switch to lists of hooks") switched the LSM infrastructure to use per-hook lists, which meant that removing the hooks for a given module was no longer atomic. Even though the commit clearly documents that modules implementing runtime revmoval of hooks (only SELinux attempts this madness) need to take special precautions to avoid race conditions, SELinux has never addressed this. By inserting an artificial delay between the loop iterations of security_delete_hooks() (I used 100 ms), booting to a state where SELinux is enabled, but policy is not yet loaded, and running these commands: while true; do ping -c 1 ; done & echo -n 1 >/sys/fs/selinux/disable kill %1 wait ...I was able to trigger NULL pointer dereferences in various places. I also have a report of someone getting panics on a stock RHEL-8 kernel after setting SELINUX=disabled in /etc/selinux/config and rebooting (without adding "selinux=0" to kernel command-line). Reordering the SELinux hooks such that those that allocate structures are removed last seems to prevent these panics. It is very much possible that this doesn't make the runtime disable completely race-free, but at least it makes the operation much less fragile. Cc: stable@vger.kernel.org Fixes: b1d9e6b0646d ("LSM: Switch to lists of hooks") Signed-off-by: Ondrej Mosnacek Reviewed-by: Stephen Smalley Signed-off-by: Paul Moore commit 65cddd50980be8c9c27ad7518a0dc812eccb25d5 Author: Ondrej Mosnacek Date: Tue Jan 7 14:31:53 2020 +0100 selinux: treat atomic flags more carefully The disabled/enforcing/initialized flags are all accessed concurrently by threads so use the appropriate accessors that ensure atomicity and document that it is expected. Use smp_load/acquire...() helpers (with memory barriers) for the initialized flag, since it gates access to the rest of the state structures. Note that the disabled flag is currently not used for anything other than avoiding double disable, but it will be used for bailing out of hooks once security_delete_hooks() is removed. Signed-off-by: Ondrej Mosnacek Acked-by: Stephen Smalley Reviewed-by: Kees Cook Reviewed-by: James Morris Signed-off-by: Paul Moore commit 2e34d63d820d9071f2390707044e5d5be59cd26c Merge: 2707745533d6 ffd08731b2d6 Author: Thomas Gleixner Date: Fri Jan 10 21:11:54 2020 +0100 Merge branch 'timers/urgent' into timers/core Pick up upstream VDSO fix before adding more VDSO changes. commit 23c25c73253075f41466438ed1b42ece9004ba20 Author: Yangtao Li Date: Sat Dec 14 17:54:45 2019 +0000 soc: lantiq: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Paul Burton Cc: khilman@baylibre.com Cc: leoyang.li@nxp.com Cc: khalasa@piap.pl Cc: john@phrozen.org Cc: matthias.bgg@gmail.com Cc: agross@kernel.org Cc: bjorn.andersson@linaro.org Cc: kgene@kernel.org Cc: krzk@kernel.org Cc: mripard@kernel.org Cc: wens@csie.org Cc: ssantosh@kernel.org Cc: jun.nie@linaro.org Cc: shawnguo@kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-mips@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-arm-msm@vger.kernel.org Cc: linux-samsung-soc@vger.kernel.org commit cc43928ba4010e3e799b1136ed260612682dbc98 Author: Kees Cook Date: Wed Dec 18 09:16:12 2019 -0800 MIPS: BPF: Use sizeof_field() instead of FIELD_SIZEOF() The FIELD_SIZEOF() macro was redundant, and is being removed from the kernel. Since commit c593642c8be0 ("treewide: Use sizeof_field() macro") this is one of the last users of the old macro, so replace it. Signed-off-by: Kees Cook Signed-off-by: Paul Burton Cc: linux-kernel@vger.kernel.org Cc: linux-mips@vger.kernel.org commit ecb983790fe893e73e6d29bcb6d8df71e593a550 Author: Julia Lawall Date: Wed Jan 1 18:49:48 2020 +0100 MIPS: use resource_size Use resource_size rather than a verbose computation on the end and start fields. The semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) @@ struct resource ptr; @@ - (ptr.end - ptr.start + 1) + resource_size(&ptr) Signed-off-by: Julia Lawall Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: kernel-janitors@vger.kernel.org Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 916d08f640092397f403924f9b061d7d883a8217 Merge: 7112f8b075b4 e735def01867 Author: David S. Miller Date: Fri Jan 10 11:29:44 2020 -0800 Merge branch 'stmmac-Frame-Preemption-fixes' Jose Abreu says: ==================== net: stmmac: Frame Preemption fixes Two single fixes for the -next tree for recently introduced Frame Preemption feature. 1) and 2) fixes the disabling of Frame Preemption that was not being correctly handled because of a missing return. ==================== Signed-off-by: David S. Miller commit e735def0186770d9a2904bee6ee82a4e6dd99578 Author: Jose Abreu Date: Fri Jan 10 16:13:35 2020 +0100 net: stmmac: gmac5+: Fix missing return If FPE is supposed to be disabled we need to return after disabling it. Fixes: 7c7282746883 ("net: stmmac: gmac5+: Add support for Frame Preemption") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 8eea7c7f3f2fcc8d580df331890090a023ef3f6b Author: Jose Abreu Date: Fri Jan 10 16:13:34 2020 +0100 net: stmmac: xgmac: Fix missing return If FPE is supposed to be disabled we need to return after disabling it. Fixes: f0e56c8d8f7d ("net: stmmac: xgmac3+: Add support for Frame Preemption") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 7112f8b075b4565fb81bcd472433f9f1eea3dcb8 Merge: 9f120e7659b0 f7226e0f9b64 Author: David S. Miller Date: Fri Jan 10 11:24:37 2020 -0800 Merge branch 'sfc-even-more-code-refactoring' Alex Maftei says: ==================== sfc: even more code refactoring Splitting even more of the driver code into different files, which will later be used in another driver for a new product. This is a continuation to my previous patch series, and the one before it. There will be a stand-alone patch as well after this - after which the refactoring will be concluded, for now. ==================== Signed-off-by: David S. Miller commit f7226e0f9b64b0454d1a5a32f2553aa677fc5400 Author: Alex Maftei (amaftei) Date: Fri Jan 10 13:28:45 2020 +0000 sfc: move RPS code Includes a couple of filtering functions and also renames a constant. Style fixes included. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 314823108c9dc3a54d041d9b7251934859c853f1 Author: Alex Maftei (amaftei) Date: Fri Jan 10 13:28:23 2020 +0000 sfc: move yet more functions Functions are not related. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 960f16275bdf87d7bef59e5d446d0a2913b5f24a Author: Alex Maftei (amaftei) Date: Fri Jan 10 13:28:07 2020 +0000 sfc: move RSS code Style fixes included. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 88f7df35ceac7bdd4db33ceefcb1fe0b90112cda Author: Alex Maftei (amaftei) Date: Fri Jan 10 13:27:50 2020 +0000 sfc: move a couple more functions Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 3653954da498fc80c5da3642ae3f8d8168d7f820 Author: Alex Maftei (amaftei) Date: Fri Jan 10 13:27:32 2020 +0000 sfc: move some ethtool code Various ethtool entry points are moved. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 190c736a8088b6dbf62b78192e6a2401eb58177b Author: Alex Maftei (amaftei) Date: Fri Jan 10 13:27:17 2020 +0000 sfc: move various functions Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 3d95b884392f0a050fb9ca3c535981a1a5334616 Author: Alex Maftei (amaftei) Date: Fri Jan 10 13:27:03 2020 +0000 sfc: move more rx code Page recycling code and GRO packet receipt code were moved. One function contains code extracted from another. Code style fixes included. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit b8cd94992f1758d1574f5871335fdaaf726c0944 Author: Alex Maftei (amaftei) Date: Fri Jan 10 13:26:46 2020 +0000 sfc: move more tx code The code that handles transmission finalization will also be common. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 86de7ced410f647812c16be26a261be0a591188b Author: Alex Maftei (amaftei) Date: Fri Jan 10 13:26:34 2020 +0000 sfc: refactor selftest work init code Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 1d1a3bcffe360a56fd8cc287ed74d4c3066daf42 Author: Andrii Nakryiko Date: Fri Jan 10 10:19:16 2020 -0800 libbpf: Poison kernel-only integer types It's been a recurring issue with types like u32 slipping into libbpf source code accidentally. This is not detected during builds inside kernel source tree, but becomes a compilation error in libbpf's Github repo. Libbpf is supposed to use only __{s,u}{8,16,32,64} typedefs, so poison {s,u}{8,16,32,64} explicitly in every .c file. Doing that in a bit more centralized way, e.g., inside libbpf_internal.h breaks selftests, which are both using kernel u32 and libbpf_internal.h. This patch also fixes a new u32 occurence in libbpf.c, added recently. Fixes: 590a00888250 ("bpf: libbpf: Add STRUCT_OPS support") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200110181916.271446-1-andriin@fb.com commit 8cbf89db294166cc13d90a89422605e0c9f8bbc2 Author: Vivek Kasireddy Date: Fri Jan 10 10:11:23 2020 -0800 drm/i915/dsi: Parse the I2C element from the VBT MIPI sequence block (v3) Parsing the i2c element is mainly done to transfer the payload from the MIPI sequence block to the relevant slave device. In some cases, the commands that are part of the payload can be used to turn on the backlight. This patch is actually a refactored version of this old patch: https://lists.freedesktop.org/archives/intel-gfx/2014-December/056897.html In addition to the refactoring, the original patch is augmented by looking up the i2c bus from ACPI NS instead of relying on the bus number provided in the VBT. This patch was tested on Aava Mobile's Inari 10 tablet. It enabled turning on the backlight by transferring the payload to the device. v2: - Add DRM_DEV_ERROR for invalid adapter and failed transfer and also drop the DRM_DEBUG that existed originally. (Hans) - Add two gotos instead of one to clean things up properly. v3: - Identify the device on which this patch was tested in the commit message (Ville) Cc: Hans de Goede Cc: Nabendu Maiti Cc: Matt Roper Cc: Bob Paauwe Cc: Ville Syrjälä Reviewed-by: Hans de Goede Signed-off-by: Vivek Kasireddy Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200110181123.14536-1-vivek.kasireddy@intel.com commit ca1992c62cadb6c8e1e1b47e197b550f3cd89b76 Author: Yishai Hadas Date: Thu Dec 12 13:09:25 2019 +0200 net/mlx5: Expose vDPA emulation device capabilities Expose vDPA emulation device capabilities from the core layer. It includes reading the capabilities from the firmware and exposing helper functions to access the data. Signed-off-by: Yishai Hadas Reviewed-by: Shahaf Shuler Signed-off-by: Leon Romanovsky commit 90fbca5952436e7817910b33eb4464ddd77a8964 Author: Yishai Hadas Date: Thu Dec 12 13:09:24 2019 +0200 net/mlx5: Add Virtio Emulation related device capabilities Add Virtio Emulation related fields to the device capabilities. It includes a general bit to indicate whether Virtio Emulation is supported and the capabilities structure itself. Signed-off-by: Yishai Hadas Reviewed-by: Shahaf Shuler Signed-off-by: Leon Romanovsky commit a1986433a9fd7a0410c9267805e19bcbdcffa2fc Author: Daniel W. S. Almeida Date: Sun Dec 22 22:00:30 2019 -0300 Documentation: filesystems: convert vfat.txt to RST Converts vfat.txt to the reStructuredText format, improving presentation without changing the underlying content. Signed-off-by: Daniel W. S. Almeida ----------------------------------------------------------- Changes in v3: Removed unnecessary markup. Removed section "BUG REPORTS" as recommended by the maintainer. Changes in v2: Refactored long lines as pointed out by Jonathan Copied the maintainer Updated the reference in the MAINTAINERS file for vfat I did not move this into admin-guide, waiting on what the maintainer has to say about this and also about old sections in the text, if any. Link: https://lore.kernel.org/r/20191223010030.434902-1-dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit 4444f8541dad16fefd9b8807ad1451e806ef1d94 Author: Matthew Garrett Date: Fri Jan 3 12:39:50 2020 +0100 efi: Allow disabling PCI busmastering on bridges during boot Add an option to disable the busmaster bit in the control register on all PCI bridges before calling ExitBootServices() and passing control to the runtime kernel. System firmware may configure the IOMMU to prevent malicious PCI devices from being able to attack the OS via DMA. However, since firmware can't guarantee that the OS is IOMMU-aware, it will tear down IOMMU configuration when ExitBootServices() is called. This leaves a window between where a hostile device could still cause damage before Linux configures the IOMMU again. If CONFIG_EFI_DISABLE_PCI_DMA is enabled or "efi=disable_early_pci_dma" is passed on the command line, the EFI stub will clear the busmaster bit on all PCI bridges before ExitBootServices() is called. This will prevent any malicious PCI devices from being able to perform DMA until the kernel reenables busmastering after configuring the IOMMU. This option may cause failures with some poorly behaved hardware and should not be enabled without testing. The kernel commandline options "efi=disable_early_pci_dma" or "efi=no_disable_early_pci_dma" may be used to override the default. Note that PCI devices downstream from PCI bridges are disconnected from their drivers first, using the UEFI driver model API, so that DMA can be disabled safely at the bridge level. [ardb: disconnect PCI I/O handles first, as suggested by Arvind] Co-developed-by: Matthew Garrett Signed-off-by: Matthew Garrett Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arvind Sankar Cc: Matthew Garrett Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20200103113953.9571-18-ardb@kernel.org Signed-off-by: Ingo Molnar commit ea7d87f98fa9675076fb5ad208d889b217e83889 Author: Arvind Sankar Date: Fri Jan 3 12:39:49 2020 +0100 efi/x86: Allow translating 64-bit arguments for mixed mode calls Introduce the ability to define macros to perform argument translation for the calls that need it, and define them for the boot services that we currently use. When calling 32-bit firmware methods in mixed mode, all output parameters that are 32-bit according to the firmware, but 64-bit in the kernel (ie OUT UINTN * or OUT VOID **) must be initialized in the kernel, or the upper 32 bits may contain garbage. Define macros that zero out the upper 32 bits of the output before invoking the firmware method. When a 32-bit EFI call takes 64-bit arguments, the mixed-mode call must push the two 32-bit halves as separate arguments onto the stack. This can be achieved by splitting the argument into its two halves when calling the assembler thunk. Define a macro to do this for the free_pages boot service. Signed-off-by: Arvind Sankar Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Matthew Garrett Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20200103113953.9571-17-ardb@kernel.org Signed-off-by: Ingo Molnar commit 14b864f4b5c402fe1ca394042beeea6fdf54f8f5 Author: Arvind Sankar Date: Fri Jan 3 12:39:48 2020 +0100 efi/x86: Check number of arguments to variadic functions On x86 we need to thunk through assembler stubs to call the EFI services for mixed mode, and for runtime services in 64-bit mode. The assembler stubs have limits on how many arguments it handles. Introduce a few macros to check that we do not try to pass too many arguments to the stubs. Signed-off-by: Arvind Sankar Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Matthew Garrett Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20200103113953.9571-16-ardb@kernel.org Signed-off-by: Ingo Molnar commit 4684abe375927e745974bfddd85e171a3eb887a5 Author: Ard Biesheuvel Date: Fri Jan 3 12:39:47 2020 +0100 efi/x86: Remove unreachable code in kexec_enter_virtual_mode() Remove some code that is guaranteed to be unreachable, given that we have already bailed by this time if EFI_OLD_MEMMAP is set. Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arvind Sankar Cc: Matthew Garrett Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20200103113953.9571-15-ardb@kernel.org Signed-off-by: Ingo Molnar commit e2d68a955e49d61fd0384f23e92058dc9b79be5e Author: Ard Biesheuvel Date: Fri Jan 3 12:39:46 2020 +0100 efi/x86: Don't panic or BUG() on non-critical error conditions The logic in __efi_enter_virtual_mode() does a number of steps in sequence, all of which may fail in one way or the other. In most cases, we simply print an error and disable EFI runtime services support, but in some cases, we BUG() or panic() and bring down the system when encountering conditions that we could easily handle in the same way. While at it, replace a pointless page-to-virt-phys conversion with one that goes straight from struct page to physical. Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arvind Sankar Cc: Matthew Garrett Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20200103113953.9571-14-ardb@kernel.org Signed-off-by: Ingo Molnar commit 5b279a262f5413889529802b82e153e87ee6bef8 Author: Ard Biesheuvel Date: Fri Jan 3 12:39:45 2020 +0100 efi/x86: Clean up efi_systab_init() routine for legibility Clean up the efi_systab_init() routine which maps the EFI system table and copies the relevant pieces of data out of it. The current routine is very difficult to read, so let's clean that up. Also, switch to a R/O mapping of the system table since that is all we need. Finally, use a plain u64 variable to record the physical address of the system table instead of pointlessly stashing it in a struct efi that is never used for anything else. Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arvind Sankar Cc: Matthew Garrett Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20200103113953.9571-13-ardb@kernel.org Signed-off-by: Ingo Molnar commit 33b85447fa61946b94fea93dd4bc24772af14d54 Author: Ard Biesheuvel Date: Fri Jan 3 12:39:44 2020 +0100 efi/x86: Drop two near identical versions of efi_runtime_init() The routines efi_runtime_init32() and efi_runtime_init64() are almost indistinguishable, and the only relevant difference is the offset in the runtime struct from where to obtain the physical address of the SetVirtualAddressMap() routine. However, this address is only used once, when installing the virtual address map that the OS will use to invoke EFI runtime services, and at the time of the call, we will necessarily be running with a 1:1 mapping, and so there is no need to do the map/unmap dance here to retrieve the address. In fact, in the preceding changes to these users, we stopped using the address recorded here entirely. So let's just get rid of all this code since it no longer serves a purpose. While at it, tweak the logic so that we handle unsupported and disable EFI runtime services in the same way, and unmap the EFI memory map in both cases. Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arvind Sankar Cc: Matthew Garrett Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20200103113953.9571-12-ardb@kernel.org Signed-off-by: Ingo Molnar commit ea5e1919b44f09fce72d919fbb87f9611fc700a6 Author: Ard Biesheuvel Date: Fri Jan 3 12:39:43 2020 +0100 efi/x86: Simplify mixed mode call wrapper Calling 32-bit EFI runtime services from a 64-bit OS involves switching back to the flat mapping with a stack carved out of memory that is 32-bit addressable. There is no need to actually execute the 64-bit part of this routine from the flat mapping as well, as long as the entry and return address fit in 32 bits. There is also no need to preserve part of the calling context in global variables: we can simply push the old stack pointer value to the new stack, and keep the return address from the code32 section in EBX. While at it, move the conditional check whether to invoke the mixed mode version of SetVirtualAddressMap() into the 64-bit implementation of the wrapper routine. Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arvind Sankar Cc: Matthew Garrett Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20200103113953.9571-11-ardb@kernel.org Signed-off-by: Ingo Molnar commit e5f930fe8dafd2055220c95958926af16ee20713 Author: Ard Biesheuvel Date: Fri Jan 3 12:39:42 2020 +0100 efi/x86: Simplify 64-bit EFI firmware call wrapper The efi_call() wrapper used to invoke EFI runtime services serves a number of purposes: - realign the stack to 16 bytes - preserve FP and CR0 register state - translate from SysV to MS calling convention. Preserving CR0.TS is no longer necessary in Linux, and preserving the FP register state is also redundant in most cases, since efi_call() is almost always used from within the scope of a pair of kernel_fpu_begin()/ kernel_fpu_end() calls, with the exception of the early call to SetVirtualAddressMap() and the SGI UV support code. So let's add a pair of kernel_fpu_begin()/_end() calls there as well, and remove the unnecessary code from the assembly implementation of efi_call(), and only keep the pieces that deal with the stack alignment and the ABI translation. Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arvind Sankar Cc: Matthew Garrett Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20200103113953.9571-10-ardb@kernel.org Signed-off-by: Ingo Molnar commit a46d674068b69b3897fc0d659e25f74b7ab52647 Author: Ard Biesheuvel Date: Fri Jan 3 12:39:41 2020 +0100 efi/x86: Simplify i386 efi_call_phys() firmware call wrapper The variadic efi_call_phys() wrapper that exists on i386 was originally created to call into any EFI firmware runtime service, but in practice, we only use it once, to call SetVirtualAddressMap() during early boot. The flexibility provided by the variadic nature also makes it type unsafe, and makes the assembler code more complicated than needed, since it has to deal with an unknown number of arguments living on the stack. So clean this up, by renaming the helper to efi_call_svam(), and dropping the unneeded complexity. Let's also drop the reference to the efi_phys struct and grab the address from the EFI system table directly. Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arvind Sankar Cc: Matthew Garrett Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20200103113953.9571-9-ardb@kernel.org Signed-off-by: Ingo Molnar commit 6982947045734480b8b57521e8068073fe36bd14 Author: Ard Biesheuvel Date: Fri Jan 3 12:39:40 2020 +0100 efi/x86: Split SetVirtualAddresMap() wrappers into 32 and 64 bit versions Split the phys_efi_set_virtual_address_map() routine into 32 and 64 bit versions, so we can simplify them individually in subsequent patches. There is very little overlap between the logic anyway, and this has already been factored out in prolog/epilog routines which are completely different between 32 bit and 64 bit. So let's take it one step further, and get rid of the overlap completely. Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arvind Sankar Cc: Matthew Garrett Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20200103113953.9571-8-ardb@kernel.org Signed-off-by: Ingo Molnar commit 98dd0e3a0ceebd594942777e4aca9791177e3f2b Author: Ard Biesheuvel Date: Fri Jan 3 12:39:39 2020 +0100 efi/x86: Split off some old memmap handling into separate routines In a subsequent patch, we will fold the prolog/epilog routines that are part of the support code to call SetVirtualAddressMap() with a 1:1 mapping into the callers. However, the 64-bit version mostly consists of ugly mapping code that is only used when efi=old_map is in effect, which is extremely rare. So let's move this code out of the way so it does not clutter the common code. Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arvind Sankar Cc: Matthew Garrett Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20200103113953.9571-7-ardb@kernel.org Signed-off-by: Ingo Molnar commit 89ed486532c4d155565cc4b7984a918ee3c58f80 Author: Ard Biesheuvel Date: Fri Jan 3 12:39:38 2020 +0100 efi/x86: Avoid redundant cast of EFI firmware service pointer All EFI firmware call prototypes have been annotated as __efiapi, permitting us to attach attributes regarding the calling convention by overriding __efiapi to an architecture specific value. On 32-bit x86, EFI firmware calls use the plain calling convention where all arguments are passed via the stack, and cleaned up by the caller. Let's add this to the __efiapi definition so we no longer need to cast the function pointers before invoking them. Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arvind Sankar Cc: Matthew Garrett Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20200103113953.9571-6-ardb@kernel.org Signed-off-by: Ingo Molnar commit ffc2760bcf2dba0dbef74013ed73eea8310cc52c Author: Ard Biesheuvel Date: Fri Jan 3 12:39:37 2020 +0100 efi/x86: Map the entire EFI vendor string before copying it Fix a couple of issues with the way we map and copy the vendor string: - we map only 2 bytes, which usually works since you get at least a page, but if the vendor string happens to cross a page boundary, a crash will result - only call early_memunmap() if early_memremap() succeeded, or we will call it with a NULL address which it doesn't like, - while at it, switch to early_memremap_ro(), and array indexing rather than pointer dereferencing to read the CHAR16 characters. Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arvind Sankar Cc: Matthew Garrett Cc: linux-efi@vger.kernel.org Fixes: 5b83683f32b1 ("x86: EFI runtime service support") Link: https://lkml.kernel.org/r/20200103113953.9571-5-ardb@kernel.org Signed-off-by: Ingo Molnar commit 6cfcd6f001b42fdbe6948cd113a5024945a8f50f Author: Ard Biesheuvel Date: Fri Jan 3 12:39:36 2020 +0100 efi/x86: Re-disable RT services for 32-bit kernels running on 64-bit EFI Commit a8147dba75b1 ("efi/x86: Rename efi_is_native() to efi_is_mixed()") renamed and refactored efi_is_native() into efi_is_mixed(), but failed to take into account that these are not diametrical opposites. Mixed mode is a construct that permits 64-bit kernels to boot on 32-bit firmware, but there is another non-native combination which is supported, i.e., 32-bit kernels booting on 64-bit firmware, but only for boot and not for runtime services. Also, mixed mode can be disabled in Kconfig, in which case the 64-bit kernel can still be booted from 32-bit firmware, but without access to runtime services. Due to this oversight, efi_runtime_supported() now incorrectly returns true for such configurations, resulting in crashes at boot. So fix this by making efi_runtime_supported() aware of this. As a side effect, some efi_thunk_xxx() stubs have become obsolete, so remove them as well. Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arvind Sankar Cc: Matthew Garrett Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20200103113953.9571-4-ardb@kernel.org Signed-off-by: Ingo Molnar commit bc7c9d62052b32b1f1fe5a141165a0f4d82103ac Author: Ard Biesheuvel Date: Fri Jan 3 12:39:35 2020 +0100 efi/libstub/x86: Force 'hidden' visibility for extern declarations Commit c3710de5065d ("efi/libstub/x86: Drop __efi_early() export and efi_config struct") introduced a reference from C code in eboot.c to the startup_32 symbol defined in the .S startup code. This results in a GOT based reference to startup_32, and since GOT entries carry absolute addresses, they need to be fixed up before they can be used. On modern toolchains (binutils 2.26 or later), this reference is relaxed into a R_386_GOTOFF relocation (or the analogous X86_64 one) which never uses the absolute address in the entry, and so we get away with not fixing up the GOT table before calling the EFI entry point. However, GCC 4.6 combined with a binutils of the era (2.24) will produce a true GOT indirected reference, resulting in a wrong value to be returned for the address of startup_32() if the boot code is not running at the address it was linked at. Fortunately, we can easily override this behavior, and force GCC to emit the GOTOFF relocations explicitly, by setting the visibility pragma 'hidden'. Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Ard Biesheuvel Cc: Arvind Sankar Cc: Matthew Garrett Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20200103113953.9571-3-ardb@kernel.org Signed-off-by: Ingo Molnar commit 12dc9e154dbe18db337c9f7e4b1d40128e675f0f Author: Ard Biesheuvel Date: Fri Jan 3 12:39:34 2020 +0100 efi/libstub: Fix boot argument handling in mixed mode entry code The mixed mode refactor actually broke mixed mode by failing to pass the bootparam structure to startup_32(). This went unnoticed because it apparently has a high tolerance for being passed random junk, and still boots fine in some cases. So let's fix this by populating %esi as required when entering via efi32_stub_entry, and while at it, preserve the arguments themselves instead of their address in memory (via the stack pointer) since that memory could be clobbered before we get to it. Signed-off-by: Ard Biesheuvel Cc: Andy Lutomirski Cc: Arvind Sankar Cc: Matthew Garrett Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20200103113953.9571-2-ardb@kernel.org Signed-off-by: Ingo Molnar commit e43630edc376e3243bf73010ddf21690e81a9e38 Author: Daniel W. S. Almeida Date: Mon Dec 23 00:31:21 2019 -0300 Documentation: boot.rst: fix warnings Fix WARNING: Inline emphasis start-string without end-string. This warning was due to wrong syntax being used. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/20191223033121.1584930-1-dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit 57ad87ddce79b6d54f8e442d0ecf4b5bbe8c5a9e Merge: 02df08320127 186525bd6b83 Author: Ingo Molnar Date: Fri Jan 10 18:53:14 2020 +0100 Merge branch 'x86/mm' into efi/core, to pick up dependencies Signed-off-by: Ingo Molnar commit 1209f45f7dc4eeddfbe5786ceefe40a0e4b7195f Author: Frank A. Cancio Bello Date: Tue Dec 24 19:06:57 2019 -0500 docs: ftrace: Fix small notation mistake The use of iff ("if and only if") notation is not accurate in this case. Suggested-by: Steven Rostedt (VMware) Signed-off-by: Frank A. Cancio Bello Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Joel Fernandes (Google) Link: https://lore.kernel.org/r/22f9a98a972c3155c7b478247a087a5efafde774.1577231751.git.frank@generalsoftwareinc.com Signed-off-by: Jonathan Corbet commit 5b8914a67e60cbc51137c3fb2ce8dcbfe9d096ab Author: Frank A. Cancio Bello Date: Tue Dec 24 19:06:27 2019 -0500 docs: ftrace: Fix typos Fix minor typos in the doc. Suggested-by: Randy Dunlap Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Joel Fernandes (Google) Signed-off-by: Frank A. Cancio Bello Link: https://lore.kernel.org/r/9ef705d0208a4ca0852fed69bc0838a589a4df85.1577231751.git.frank@generalsoftwareinc.com Signed-off-by: Jonathan Corbet commit 02df083201272c0c2e061b18d9c20635974abf6d Merge: 0679715e7143 bef1d88263ff Author: Ingo Molnar Date: Fri Jan 10 18:52:11 2020 +0100 Merge branch 'linus' into efi/core, to pick up fixes Signed-off-by: Ingo Molnar commit a65d634e63644d05a22f32e5f2e56dde4f7ee77b Author: Frank A. Cancio Bello Date: Tue Dec 24 19:06:05 2019 -0500 docs: ftrace: Clarify the RAM impact of buffer_size_kb The current text could mislead the user into believing that the number of pages allocated by each CPU ring buffer is calculated by the round up of the division: buffer_size_kb / PAGE_SIZE. Clarifies that a few extra pages may be allocated to accommodate buffer management meta-data. Suggested-by: Steven Rostedt (VMware) Suggested-by: Joel Fernandes (Google) Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Joel Fernandes (Google) Signed-off-by: Frank A. Cancio Bello Link: https://lore.kernel.org/r/6f33be5f3d60e5ffc061d8d2b329d3d3ccf22a8c.1577231751.git.frank@generalsoftwareinc.com Signed-off-by: Jonathan Corbet commit 53f3feeb7bd2d78039b3dc9ab158bad2a5dbe012 Merge: 1f676247f36a 6c4798d3f08b Author: Ingo Molnar Date: Fri Jan 10 18:49:34 2020 +0100 Merge tag 'perf-core-for-mingo-5.6-20200106' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf record: Alexey Budankov: - Adapt affinity for machines with #CPUs > 1K to overcome current 1024 CPUs mask size limitation of cpu_set_t type. perf report/top TUI: Arnaldo Carvalho de Melo: - Make ENTER consistently present the pop up menu with and without call chains, to eliminate confusion. The menu continues available at all times use 'm' and '+' can be used to toggle just one call chain level, 'e' for all the call chains for a top level histogram entry and 'E' to expand all call chains in all top level entries. Extra info about these options was added to the pop up menu entries. Pressing 'k' serves as special hotkey to go straight to the main vmlinux entries, to avoid having to press enter and then select "Zoom into the kernel DSO". perf sched timehist: David Ahern: - Add support for filtering on CPU. perf tests: Arnaldo Carvalho de Melo: - Show expected versus obtained values in bp_signal test. libperf: Jiri Olsa: - Move to tools/lib/perf. - Add man pages. libapi: Andrey Zhizhikin: - Fix gcc9 stringop-truncation compilation error. tools lib: Vitaly Chikunov: - Fix builds when glibc contains strlcpy(), which is the case for ALT Linux. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Ingo Molnar commit ddb8840d2777bfca7c9ebc8c24ea20f9a37145ba Author: Nagarjuna Kristam Date: Fri Oct 18 15:08:16 2019 +0530 arm64: defconfig: Enable tegra XUDC support Enable Nvidia XUSB device mode controller driver and USB GPIO Based Connection Detection Driver as module. Signed-off-by: Nagarjuna Kristam Signed-off-by: Thierry Reding commit 21a92676e1fe292acb077b13106b08c22ed36b14 Author: Marcel Ziswiler Date: Tue Jan 7 09:14:02 2020 +0100 PCI: tegra: Fix afi_pex2_ctrl reg offset for Tegra30 Fix AFI_PEX2_CTRL reg offset for Tegra30 by moving it from the Tegra20 SoC struct where it erroneously got added. This fixes the AFI_PEX2_CTRL reg offset being uninitialised subsequently failing to bring up the third PCIe port. Fixes: adb2653b3d2e ("PCI: tegra: Add AFI_PEX2_CTRL reg offset as part of SoC struct") Signed-off-by: Marcel Ziswiler Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Acked-by: Thierry Reding commit 885199148442f56b880995d703d2ed03b6481a3c Author: David Engraf Date: Mon Dec 16 12:18:25 2019 +0100 PCI: tegra: Fix return value check of pm_runtime_get_sync() pm_runtime_get_sync() returns the device's usage counter. This might be >0 if the device is already powered up or CONFIG_PM is disabled. Abort probe function on real error only. Fixes: da76ba50963b ("PCI: tegra: Add power management support") Link: https://lore.kernel.org/r/20191216111825.28136-1-david.engraf@sysgo.com Signed-off-by: David Engraf Signed-off-by: Bjorn Helgaas Signed-off-by: Lorenzo Pieralisi Acked-by: Andrew Murray Cc: stable@vger.kernel.org # v4.17+ commit b78b7d59bdbe6028ab362c2551dc684872f2052a Author: Stephen Smalley Date: Wed Jan 8 12:23:56 2020 -0500 selinux: make default_noexec read-only after init SELinux checks whether VM_EXEC is set in the VM_DATA_DEFAULT_FLAGS during initialization and saves the result in default_noexec for use in its mmap and mprotect hook function implementations to decide whether to apply EXECMEM, EXECHEAP, EXECSTACK, and EXECMOD checks. Mark default_noexec as ro_after_init to prevent later clearing it and thereby disabling these checks. It is only set legitimately from init code. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit 2d0c3fbe43fa0e6fcb7a6c755c5f4cd702c0d2f4 Author: Yurii Monakov Date: Fri Oct 4 18:48:11 2019 +0300 PCI: keystone: Fix outbound region mapping The Keystone outbound Address Translation Unit (ATU) maps PCI MMIO space in 8 MB windows. When programming the ATU windows, we previously incremented the starting address by 8, not 8 MB, so all the windows were mapped to the first 8 MB. Therefore, only 8 MB of MMIO space was accessible. Update the loop so it increments the starting address by 8 MB, not 8, so more MMIO space is accessible. Fixes: e75043ad9792 ("PCI: keystone: Cleanup outbound window configuration") Link: https://lore.kernel.org/r/20191004154811.GA31397@monakov-y.office.kontur-niirs.ru Signed-off-by: Yurii Monakov [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas Signed-off-by: Lorenzo Pieralisi Acked-by: Andrew Murray Acked-by: Kishon Vijay Abraham I Cc: stable@vger.kernel.org # v4.20+ commit a7e0f3fc01df4b1b7077df777c37feae8c9e8b6d Author: Alexandre Belloni Date: Fri Jan 10 18:20:07 2020 +0100 ARM: dts: at91: sama5d3: define clock rate range for tcb1 The clock rate range for the TCB1 clock is missing. define it in the device tree. Reported-by: Karl Rudbæk Olsen Fixes: d2e8190b7916 ("ARM: at91/dt: define sama5d3 clocks") Link: https://lore.kernel.org/r/20200110172007.1253659-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit ee0aa926ddb0bd8ba59e33e3803b3b5804e3f5da Author: Alexandre Belloni Date: Fri Jan 10 18:20:06 2020 +0100 ARM: dts: at91: sama5d3: fix maximum peripheral clock rates Currently the maximum rate for peripheral clock is calculated based on a typical 133MHz MCK. The maximum frequency is defined in the datasheet as a ratio to MCK. Some sama5d3 platforms are using a 166MHz MCK. Update the device trees to match the maximum rate based on 166MHz. Reported-by: Karl Rudbæk Olsen Fixes: d2e8190b7916 ("ARM: at91/dt: define sama5d3 clocks") Link: https://lore.kernel.org/r/20200110172007.1253659-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 6df19872d881641e6394f93ef2938cffcbdae5bb Author: Yurii Monakov Date: Tue Dec 17 14:38:36 2019 +0300 PCI: keystone: Fix link training retries initiation ks_pcie_stop_link() function does not clear LTSSM_EN_VAL bit so link training was not triggered more than once after startup. In configurations where link can be unstable during early boot, for example, under low temperature, it will never be established. Fixes: 0c4ffcfe1fbc ("PCI: keystone: Add TI Keystone PCIe driver") Signed-off-by: Yurii Monakov Signed-off-by: Lorenzo Pieralisi Acked-by: Andrew Murray Cc: stable@vger.kernel.org commit 6f7f8ef713a24ccea341a7f0cb92ef2b6b297f01 Author: Guoqing Jiang Date: Mon Jan 6 11:37:35 2020 +0100 docs: block/biovecs: update the location of bio.c Replace fs with block since bio.c had been moved to block folder. Signed-off-by: Guoqing Jiang Link: https://lore.kernel.org/r/20200106103735.10327-1-guoqing.jiang@cloud.ionos.com Signed-off-by: Jonathan Corbet commit 0a79e952a83044b15a82d6ebaad97e5a46f31daf Author: Alexandre Belloni Date: Sun Dec 29 21:35:03 2019 +0100 ARM: dts: at91: nattis 2: remove unnecessary include sama5d3_lcd.dtsi is already included by sama5d31.dtsi, itself included by at91-linea.dtsi. Link: https://lore.kernel.org/r/20191229203503.336593-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 19a602b745a2cbae553f6d45885eb01f2b28ff48 Author: Colin Ian King Date: Fri Jan 10 10:04:27 2020 +0000 devices.txt: fix spelling mistake: "shapshot" -> "snapshot" Fix spelling mistake in text. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200110100427.236530-1-colin.king@canonical.com Signed-off-by: Jonathan Corbet commit 80f64cef4135a7cd26f894374fd0e209cbb43afd Author: John Garry Date: Mon Dec 9 22:08:08 2019 +0800 mtd: spi-nor: hisi-sfc: Try to provide some clarity on which SFC we are The driver is for the HiSilicon FMC (Flash Memory Controller), which supports SPI NOR in addition other memory technologies, like SPI NAND. Indeed, the naming in the driver is a little inappropriate, especially considering that there is already another HiSilicon SPI NOR flash controller (which I believe the FMC is derived from). Since we now want to provide software support for this other HiSilicon controller, update code comments to at least try to make it clear that this driver is for the FMC. Signed-off-by: John Garry Signed-off-by: Tudor Ambarus commit 67de34c20fa7a7aeae50c55dd2751e6df80c3e2c Author: Joseph Kust Date: Sun Nov 17 15:55:47 2019 -0600 mtd: spi-nor: Add support for sst26vf016b Adds support for sst26vf016b, a smaller variant of the sst26vf064b. Tested on a sama5d3 SOC using the atmel,at91rm9200-spi controller. The dual read could not be tested. SPI_NOR_QUAD_READ is not added because it requires that the IOC bit from the Configuration Register to be set to 1, which is not the case: its default value at power-up is zero and we don't set it to one in spi-nor either. Signed-off-by: Joseph Kust Signed-off-by: Brandon Maier [tudor.ambarus@microchip.com: Drop quad read flag, amend commit description] Signed-off-by: Tudor Ambarus commit fe49c7e4f85a9b2c3628e2f21e973ea6e26d2be7 Author: Ravi Kumar Siddojigari Date: Thu Jan 9 16:40:47 2020 +0530 selinux: move ibpkeys code under CONFIG_SECURITY_INFINIBAND. Move cache based pkey sid retrieval code which was added with commit "409dcf31" under CONFIG_SECURITY_INFINIBAND. As its going to alloc a new cache which impacts low RAM devices which was enabled by default. Suggested-by: Paul Moore Signed-off-by: Ravi Kumar Siddojigari [PM: checkpatch.pl cleanups, fixed capitalization in the description] Signed-off-by: Paul Moore commit 477b8383100023ea0769979cff67e9be3a720397 Author: Codrin.Ciubotariu@microchip.com Date: Tue Jan 7 11:17:47 2020 +0000 tty/serial: atmel: RS485 & ISO7816: wait for TXRDY before sending data At this moment, TXEMPTY is checked before sending data on RS485 and ISO7816 modes. However, TXEMPTY is risen when FIFO (if used) or the Transmit Shift Register are empty, even though TXRDY might be up and controller is able to receive data. Since the controller sends data only when TXEMPTY is ready, on RS485, when DMA is not used, the RTS pin is driven low after each byte. With this patch, the characters will be transmitted when TXRDY is up and so, RTS pin will remain high between bytes. The performance improvement on RS485 is about 8% with a baudrate of 300. Signed-off-by: Codrin Ciubotariu Acked-by: Richard Genoud Link: https://lore.kernel.org/r/20200107111656.26308-1-codrin.ciubotariu@microchip.com Signed-off-by: Greg Kroah-Hartman commit 8e20fc3917117b42de316e87f073a1ca43d94c9f Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Thu Jan 9 21:54:42 2020 +0000 serial_core: Move sysrq functions from header file It's not worth to have them in every serial driver and I'm about to add another helper function. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20200109215444.95995-2-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit ed8cc3b1fc84f110336edaafaa203f65aa26b5e0 Author: Bjorn Andersson Date: Wed Nov 6 16:16:42 2019 -0800 PCI: qcom: Add support for SDM845 PCIe controller The SDM845 has one Gen2 and one Gen3 controller, add support for these. Signed-off-by: Bjorn Andersson Signed-off-by: Lorenzo Pieralisi Reviewed-by: Vinod Koul Reviewed-by: Philipp Zabel Reviewed-by: Andrew Murray Acked-by: Stanimir Varbanov commit 5d28bee7c91eb61ae485f60adf5397e2ea0d1e4a Author: Bjorn Andersson Date: Wed Nov 6 16:16:41 2019 -0800 dt-bindings: PCI: qcom: Add support for SDM845 PCIe Add compatible and necessary clocks and resets definitions for the SDM845 PCIe controller. Signed-off-by: Bjorn Andersson Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Reviewed-by: Vinod Koul Reviewed-by: Andrew Murray commit e895bc1ebb31750f3baa74e074617d3cc5d0cee2 Author: Masahiro Yamada Date: Fri Jan 10 22:56:15 2020 +0900 staging: vc04_services: remove header include path to vc04_services Fix up some relative paths in #include "..." directives, and remove the include path to drivers/staging/vc04_services. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20200110135615.11617-1-masahiroy@kernel.org Signed-off-by: Greg Kroah-Hartman commit b82f3f6894ec68dfada736bdf87997b1e0d3b53f Author: Huaisheng Ye Date: Fri Jan 10 17:58:56 2020 +0800 selinux: remove redundant msg_msg_alloc_security selinux_msg_msg_alloc_security only calls msg_msg_alloc_security but do nothing else. And also msg_msg_alloc_security is just used by the former. Remove the redundant function to simplify the code. Signed-off-by: Huaisheng Ye Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit 7a2d070f91db83a1e08bf212e8f6a34d852efb7f Merge: f41aa387a789 360301a6c21b Author: Daniel Borkmann Date: Fri Jan 10 17:20:07 2020 +0100 Merge branch 'bpf-global-funcs' Alexei Starovoitov says: ==================== Introduce static vs global functions and function by function verification. This is another step toward dynamic re-linking (or replacement) of global functions. See patch 2 for details. v2->v3: - cleaned up a check spotted by Song. - rebased and dropped patch 2 that was trying to improve BTF based on ELF. - added one more unit test for scalar return value from global func. v1->v2: - addressed review comments from Song, Andrii, Yonghong - fixed memory leak in error path - added modified ctx check - added more tests in patch 7 ==================== Signed-off-by: Daniel Borkmann commit 360301a6c21be87fe881546bd5f22eccf7a165c5 Author: Alexei Starovoitov Date: Thu Jan 9 22:41:24 2020 -0800 selftests/bpf: Add unit tests for global functions test_global_func[12] - check 512 stack limit. test_global_func[34] - check 8 frame call chain limit. test_global_func5 - check that non-ctx pointer cannot be passed into a function that expects context. test_global_func6 - check that ctx pointer is unmodified. test_global_func7 - check that global function returns scalar. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200110064124.1760511-7-ast@kernel.org commit e528d1c0127accbc2be48f57dd67ab89b32fd815 Author: Alexei Starovoitov Date: Thu Jan 9 22:41:23 2020 -0800 selftests/bpf: Modify a test to check global functions Make two static functions in test_xdp_noinline.c global: before: processed 2790 insns after: processed 2598 insns Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200110064124.1760511-6-ast@kernel.org commit 6db2d81a46f99edb5690cf0b03bbe3b7f29dfd7b Author: Alexei Starovoitov Date: Thu Jan 9 22:41:22 2020 -0800 selftests/bpf: Add a test for a large global function test results: pyperf50 with always_inlined the same function five times: processed 46378 insns pyperf50 with global function: processed 6102 insns Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200110064124.1760511-5-ast@kernel.org commit 7608e4db6ded8e965dd213baddedba9602959e7d Author: Alexei Starovoitov Date: Thu Jan 9 22:41:21 2020 -0800 selftests/bpf: Add fexit-to-skb test for global funcs Add simple fexit prog type to skb prog type test when subprogram is a global function. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200110064124.1760511-4-ast@kernel.org commit 51c39bb1d5d105a02e29aa7960f0a395086e6342 Author: Alexei Starovoitov Date: Thu Jan 9 22:41:20 2020 -0800 bpf: Introduce function-by-function verification New llvm and old llvm with libbpf help produce BTF that distinguish global and static functions. Unlike arguments of static function the arguments of global functions cannot be removed or optimized away by llvm. The compiler has to use exactly the arguments specified in a function prototype. The argument type information allows the verifier validate each global function independently. For now only supported argument types are pointer to context and scalars. In the future pointers to structures, sizes, pointer to packet data can be supported as well. Consider the following example: static int f1(int ...) { ... } int f3(int b); int f2(int a) { f1(a) + f3(a); } int f3(int b) { ... } int main(...) { f1(...) + f2(...) + f3(...); } The verifier will start its safety checks from the first global function f2(). It will recursively descend into f1() because it's static. Then it will check that arguments match for the f3() invocation inside f2(). It will not descend into f3(). It will finish f2() that has to be successfully verified for all possible values of 'a'. Then it will proceed with f3(). That function also has to be safe for all possible values of 'b'. Then it will start subprog 0 (which is main() function). It will recursively descend into f1() and will skip full check of f2() and f3(), since they are global. The order of processing global functions doesn't affect safety, since all global functions must be proven safe based on their arguments only. Such function by function verification can drastically improve speed of the verification and reduce complexity. Note that the stack limit of 512 still applies to the call chain regardless whether functions were static or global. The nested level of 8 also still applies. The same recursion prevention checks are in place as well. The type information and static/global kind is preserved after the verification hence in the above example global function f2() and f3() can be replaced later by equivalent functions with the same types that are loaded and verified later without affecting safety of this main() program. Such replacement (re-linking) of global functions is a subject of future patches. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200110064124.1760511-3-ast@kernel.org commit 2d3eb67f64ec317bbfe340cfcc8325d40a6ff317 Author: Alexei Starovoitov Date: Thu Jan 9 22:41:19 2020 -0800 libbpf: Sanitize global functions In case the kernel doesn't support BTF_FUNC_GLOBAL sanitize BTF produced by the compiler for global functions. Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200110064124.1760511-2-ast@kernel.org commit 79f7a5cb87baa229b321246b3f33af875d8a1ef7 Author: Robin Murphy Date: Fri Jan 10 15:25:02 2020 +0000 iommu/arm-smmu: Improve SMR mask test Make the SMR mask test more robust against SMR0 being live at probe time, which might happen once we start supporting firmware reservations for framebuffers and suchlike. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit 033ccdb7f6b11701623507339646013b4ce389d3 Author: YueHaibing Date: Sat Nov 2 15:57:44 2019 +0800 gpu: host1x: Remove dev_err() on platform_get_irq() failure platform_get_irq() will call dev_err() itself on failure, so there is no need for the driver to also do this. This is detected by coccinelle. Signed-off-by: YueHaibing Signed-off-by: Thierry Reding commit f41f34ddcee679641ff7d177b37597844d82d634 Author: Peter Robinson Date: Sat Nov 2 17:29:17 2019 +0000 arm64: tegra: Allow bootloader to configure Ethernet MAC on Jetson TX2 Add an ethernet alias so that a stable MAC address is added to the device tree for the wired ethernet interface. Signed-off-by: Peter Robinson Signed-off-by: Thierry Reding commit 1595fe299eb5a664c754eaf48bc178c0d664e1cf Author: Will Deacon Date: Fri Jan 10 16:00:50 2020 +0000 Revert "arm64: kexec: make dtb_mem always enabled" Adding crash dump support to 'kexec_file' is going to extend 'struct kimage_arch' with more 'kexec_file'-specific members. The cleanup here then starts to get in the way, so revert it. This reverts commit 621516789ee6e285cb2088fe4706eedd030d38bf. Reported-by: AKASHI Takahiro Signed-off-by: Will Deacon commit 73daf0bba32604a1b414b9ef429cd25aeae5b95e Author: Shaokun Zhang Date: Thu Nov 14 08:57:03 2019 +0800 drivers/perf: hisi: Simplify hisi_read_sccl_and_ccl_id and its comment hisi_read_sccl_and_ccl_id is not readable and its comment is a little confused, so simplify the function and its comment as Mark's suggestion. Acked-by: Mark Rutland Reviewed-by: John Garry Suggested-by: Mark Rutland Signed-off-by: Shaokun Zhang Signed-off-by: Will Deacon commit cd8f843c6c9bc7b8ce36c06333e10d2abc89a1fd Author: Thierry Reding Date: Fri Nov 8 16:36:40 2019 +0100 arm64: tegra: Redefine force recovery key on Jetson AGX Xavier The current BTN_1 code associated with the force-recovery key is not a valid code for EV_KEY type input devices. This causes errors in the libinput debug-events command. There is no system level action that maps to the force-recovery key on Jetson AGX Xavier, so assign it the KEY_SLEEP action, which at least makes it do something marginally useful. Signed-off-by: Thierry Reding commit db6903010aa5b7691d8234a179f4cf71a119445a Author: Robin Murphy Date: Fri Oct 25 19:08:39 2019 +0100 iommu/io-pgtable-arm: Prepare for TTBR1 usage Now that we can correctly extract top-level indices without relying on the remaining upper bits being zero, the only remaining impediments to using a given table for TTBR1 are the address validation on map/unmap and the awkward TCR translation granule format. Add a quirk so that we can do the right thing at those points. Tested-by: Jordan Crouse Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit ac4b80e5b9d0ecf906300d79e4dc4df5526579a8 Author: Will Deacon Date: Fri Jan 10 14:51:59 2020 +0000 iommu/io-pgtable-arm: Rationalise VTCR handling Commit 05a648cd2dd7 ("iommu/io-pgtable-arm: Rationalise TCR handling") reworked the way in which the TCR register value is returned from the io-pgtable code when targetting the Arm long-descriptor format, in preparation for allowing page-tables to target TTBR1. As it turns out, the new interface is a lot nicer to use, so do the same conversion for the VTCR register even though there is only a single base register for stage-2 translation. Cc: Robin Murphy Signed-off-by: Will Deacon commit fba6e960772b7b68189168abc3259384b7a44388 Author: Will Deacon Date: Fri Jan 10 13:20:03 2020 +0000 iommu/arm-smmu: Rename public #defines under ARM_SMMU_ namespace Now that we have arm-smmu.h defining various SMMU constants, ensure that they are namespaced with the ARM_SMMU_ prefix in order to avoid conflicts with the CPU, such as the one we're currently bodging around with the TCR. Cc: Robin Murphy Signed-off-by: Will Deacon commit fb485eb18e632ff1071662122b9d9b7d40c23c73 Author: Robin Murphy Date: Fri Oct 25 19:08:38 2019 +0100 iommu/io-pgtable-arm: Rationalise TCR handling Although it's conceptually nice for the io_pgtable_cfg to provide a standard VMSA TCR value, the reality is that no VMSA-compliant IOMMU looks exactly like an Arm CPU, and they all have various other TCR controls which io-pgtable can't be expected to understand. Thus since there is an expectation that drivers will have to add to the given TCR value anyway, let's strip it down to just the essentials that are directly relevant to io-pgtable's inner workings - namely the various sizes and the walk attributes. Tested-by: Jordan Crouse Signed-off-by: Robin Murphy [will: Add missing include of bitfield.h] Signed-off-by: Will Deacon commit 6f932ad369a3c3f853ffc5d93de9a73420e862b1 Author: Will Deacon Date: Fri Jan 10 12:22:16 2020 +0000 iommu/io-pgtable-arm: Ensure ARM_64_LPAE_S2_TCR_RES1 is unsigned ARM_64_LPAE_S2_TCR_RES1 is intended to map to bit 31 of the VTCR register, which is required to be set to 1 by the architecture. Unfortunately, we accidentally treat this as a signed quantity which means we also set the upper 32 bits of the VTCR to one, and they are required to be zero. Treat ARM_64_LPAE_S2_TCR_RES1 as unsigned to avoid the unwanted sign-extension up to 64 bits. Cc: Robin Murphy Signed-off-by: Will Deacon commit 7618e479098226799207e021e8b0c2c28a23c96b Author: Robin Murphy Date: Fri Jan 10 15:21:51 2020 +0000 iommu/io-pgtable-arm: Improve attribute handling By VMSA rules, using Normal Non-Cacheable type with a shareability attribute of anything other than Outer Shareable is liable to lead into unpredictable territory: | Overlaying the shareability attribute (B3-1377, ARM DDI 0406C.c) | | A memory region with a resultant memory type attribute of Normal, and | a resultant cacheability attribute of Inner Non-cacheable, Outer | Non-cacheable, must have a resultant shareability attribute of Outer | Shareable, otherwise shareability is UNPREDICTABLE Although the SMMU architectures seem to give some slightly stronger guarantees of Non-Cacheable output types becoming implicitly Outer Shareable in most cases, we may as well be explicit and not take any chances. It's also weird that LPAE attribute handling is currently split between prot_to_pte() and init_pte() given that it can all be statically determined up-front. Thus, collect *all* the LPAE attributes into prot_to_pte() in order to logically pick the shareability based on the incoming IOMMU API prot value, and tweak the short-descriptor code to stop setting TTBR0.NOS for Non-Cacheable walks. Signed-off-by: Robin Murphy Signed-off-by: Will Deacon commit 1f32a31fe27e0d86945d9f0933d343885802bfa7 Author: Tamás Szűcs Date: Mon Dec 2 22:52:00 2019 +0100 arm64: tegra: Enable SDIO on Jetson Nano M.2 Key E Enable SDMMC3 and set it up for SDIO devices. Signed-off-by: Tamás Szűcs Signed-off-by: Thierry Reding commit 271502efbd3a9812f3d02230ff823b73141c6b39 Author: Thierry Reding Date: Tue Dec 3 17:29:57 2019 +0100 drm/tegra: output: Implement system suspend/resume Implement generic system suspend/resume functions that can be used with any output type. Currently this only implements disabling and enabling of the IRQ functionality across system suspend/resume. This prevents an interrupt from happening before the display driver has fully resumed. Signed-off-by: Thierry Reding commit 6f78a9460f275651418728e3cb3bfc42683b881c Author: Tamás Szűcs Date: Sun Dec 8 20:55:31 2019 +0100 arm64: tegra: Enable PWM fan on Jetson Nano Enable PWM fan and extend CPU thermal zones for monitoring and fan control. This will trigger the PWM fan on J15 and cool down the system if necessary. Signed-off-by: Tamás Szűcs Signed-off-by: Thierry Reding commit 30d2acb67348537dbf3180057c11f092f4603090 Author: Will Deacon Date: Fri Jan 10 11:40:33 2020 +0000 iommu/io-pgtable-arm: Support non-coherent stage-2 page tables Commit 9e6ea59f3ff3 ("iommu/io-pgtable: Support non-coherent page tables") added support for non-coherent page-table walks to the Arm IOMMU page-table backends. Unfortunately, it left the stage-2 allocator unchanged, so let's hook that up in the same way. Cc: Bjorn Andersson Cc: Robin Murphy Signed-off-by: Will Deacon commit d1e5f26f14272b5039cc198569ec4fabed14e6db Author: Robin Murphy Date: Fri Oct 25 19:08:37 2019 +0100 iommu/io-pgtable-arm: Rationalise TTBRn handling TTBR1 values have so far been redundant since no users implement any support for split address spaces. Crucially, though, one of the main reasons for wanting to do so is to be able to manage each half entirely independently, e.g. context-switching one set of mappings without disturbing the other. Thus it seems unlikely that tying two tables together in a single io_pgtable_cfg would ever be particularly desirable or useful. Streamline the configs to just a single conceptual TTBR value representing the allocated table. This paves the way for future users to support split address spaces by simply allocating a table and dealing with the detailed TTBRn logistics themselves. Tested-by: Jordan Crouse Signed-off-by: Robin Murphy [will: Drop change to ttbr value] Signed-off-by: Will Deacon commit f90965abc51d9a72cd6fa414e9480edff9ddaced Author: Arnd Bergmann Date: Tue Dec 10 21:42:58 2019 +0100 drm/tegra: sor: Mark PM functions as __maybe_unused Without CONFIG_PM, some functions cause harmless warnings: drivers/gpu/drm/tegra/sor.c:3984:12: error: 'tegra_sor_resume' defined but not used [-Werror=unused-function] static int tegra_sor_resume(struct device *dev) ^~~~~~~~~~~~~~~~ drivers/gpu/drm/tegra/sor.c:3970:12: error: 'tegra_sor_suspend' defined but not used [-Werror=unused-function] static int tegra_sor_suspend(struct device *dev) ^~~~~~~~~~~~~~~~~ Mark these as __maybe_unused so the compiler can drop them silently. Signed-off-by: Arnd Bergmann Signed-off-by: Thierry Reding commit fd67e9c6ed5af223af0daee093593abe3dbb53d4 Author: Thierry Reding Date: Mon Dec 2 15:29:03 2019 +0100 drm/tegra: Do not implement runtime PM The Tegra DRM driver heavily relies on the implementations for runtime suspend/resume to be called at specific times. Unfortunately, there are some cases where that doesn't work. One example is if the user disables runtime PM for a given subdevice. Another example is that the PM core acquires a reference to runtime PM during system sleep, effectively preventing devices from going into low power modes. This is intentional to avoid nasty race conditions, but it also causes system sleep to not function properly on all Tegra systems. Fix this by not implementing runtime PM at all. Instead, a minimal, reference-counted suspend/resume infrastructure is added to the host1x bus. This has the benefit that it can be used regardless of the system power state (or any transitions we might be in), or whether or not the user allows runtime PM. Atomic modesetting guarantees that these functions will end up being called at the right point in time, so the pitfalls for the more generic runtime PM do not apply here. Signed-off-by: Thierry Reding commit 608f43ad27ab26700677cc4d9ead3b2d9d338a21 Author: Thierry Reding Date: Mon Dec 2 10:51:58 2019 +0100 gpu: host1x: Rename "parent" to "host" Rename the host1x clients' parent to "host" because that more closely describes what it is. The parent can be confused with the parent device in terms of the device hierarchy. Subsequent patches will add a new member that refers to the parent in that hierarchy. Signed-off-by: Thierry Reding commit 1a8585bd774c4058038ad827c9e93847ff509cf3 Author: Chris Wilson Date: Fri Jan 10 12:30:59 2020 +0000 drm/i915: Drop request list from error state The list of requests from after the hang tells little about the hang itself, only how busy userspace was after the fact. As it pertains nothing to the HW state, drop it from the error state. Signed-off-by: Chris Wilson Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20200110123059.1348712-4-chris@chris-wilson.co.uk commit a0d5d0c804321b172f4b0def3723581b41632458 Author: Chris Wilson Date: Fri Jan 10 12:30:58 2020 +0000 drm/i915: Drop the shadow ring state from the error capture The shadow ring regs (ring->head, ring->tail) are meaningless in the post-mortem dump as they do not related to anything on HW. Remove them from the coredump. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200110123059.1348712-3-chris@chris-wilson.co.uk commit cbcfa8a3e16073dfcdc9da224daba3fa92e81c45 Author: Chris Wilson Date: Fri Jan 10 12:30:57 2020 +0000 drm/i915: Drop the shadow w/a batch buffer While this is technically the batch as executed by the HW (in part at least), it is confusing, and only used for a minority of gen. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20200110123059.1348712-2-chris@chris-wilson.co.uk commit 742379c0c4001fd2a6e02005c1ffa1ff611b28fa Author: Chris Wilson Date: Fri Jan 10 12:30:56 2020 +0000 drm/i915: Start chopping up the GPU error capture In the near future, we will want to start a GPU error capture from a new context, from inside the softirq region of a forced preemption. To do so requires us to break up the monolithic error capture to provide new entry points with finer control; in particular focusing on one engine/gt, and being able to compose an error state from little pieces of HW capture. Signed-off-by: Chris Wilson Cc: Andi Shyti Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20200110123059.1348712-1-chris@chris-wilson.co.uk commit 1e123d96b85fd41278efc994f8096e1df86fd427 Author: Guoqing Jiang Date: Thu Jan 9 14:40:43 2020 +0100 RDMA/core: Remove err in iw_query_port Since we can return device->ops.query_port directly, so no need to keep those lines. Link: https://lore.kernel.org/r/20200109134043.15568-1-guoqing.jiang@cloud.ionos.com Signed-off-by: Guoqing Jiang Signed-off-by: Jason Gunthorpe commit 626903e9355bdf8d401fc0ac7e7407862c642710 Author: Xi Wang Date: Thu Jan 9 20:20:12 2020 +0800 RDMA/hns: Add support for reporting wc as software mode When hardware is in resetting stage, we may can't poll back all the expected work completions as the hardware won't generate cqe anymore. This patch allows the driver to compose the expected wc instead of the hardware during resetting stage. Once the hardware finished resetting, we can poll cq from hardware again. Link: https://lore.kernel.org/r/1578572412-25756-1-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 468d020e2f02867b8ec561461a1689cd4365e493 Author: Lijun Ou Date: Thu Jan 9 20:10:52 2020 +0800 RDMA/hns: Bugfix for posting a wqe with sge Driver should first check whether the sge is valid, then fill the valid sge and the caculated total into hardware, otherwise invalid sges will cause an error. Fixes: 52e3b42a2f58 ("RDMA/hns: Filter for zero length of sge in hip08 kernel mode") Fixes: 7bdee4158b37 ("RDMA/hns: Fill sq wqe context of ud type in hip08") Link: https://lore.kernel.org/r/1578571852-13704-1-git-send-email-liweihang@huawei.com Signed-off-by: Lijun Ou Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 02676345e9b31ad8907af3755960e3cfef575f8d Author: Dmitry Osipenko Date: Wed Dec 18 21:23:04 2019 +0300 soc/tegra: fuse: Unmap registers once they are not needed anymore Both Chip ID and strapping registers are now read out during of APB MISC initialization, the registers' mapping isn't needed anymore once registers are read. Hence let's unmap registers once they are not needed anymore, for consistency. Suggested-by: Michał Mirosław Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 2d9ea1934f8ef0dfb862d103389562cc28b4fc03 Author: Dmitry Osipenko Date: Wed Dec 18 21:23:03 2019 +0300 soc/tegra: fuse: Correct straps' address for older Tegra124 device trees Trying to read out Chip ID before APBMISC registers are mapped won't succeed, in a result Tegra124 gets a wrong address for the HW straps register if machine uses an old outdated device tree. Fixes: 297c4f3dcbff ("soc/tegra: fuse: Restrict legacy code to 32-bit ARM") Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit c71f213fa5afae40cc7e5365585f5cdc51b135df Author: Dmitry Osipenko Date: Wed Dec 18 21:23:02 2019 +0300 soc/tegra: fuse: Warn if straps are not ready Now both Chip ID and HW straps are becoming available at the same time, thus we could simply check the availability of the ID in order to check the availability of the straps. We couldn't check straps for 0x0 because it could be a correct value. This change didn't uncover any problems, but anyways it is nicer to have straps verified for consistency with the Chip ID verification. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 221c057a84c4d13a2990d3f3ac59f2d6fe00d613 Author: Dmitry Osipenko Date: Wed Dec 18 21:23:01 2019 +0300 soc/tegra: fuse: Cache values of straps and Chip ID registers There is no need to re-read Chip ID and HW straps out from hardware each time, it is a bit nicer to cache the values in memory. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 2c9d4e26d1ab27ceae2ded2ffe930f8e5f5b2a89 Author: Mike Marciniszyn Date: Mon Jan 6 08:42:35 2020 -0500 IB/hfi1: Add RcvShortLengthErrCnt to hfi1stats This counter, RxShrErr, is required for error analysis and debug. Fixes: 7724105686e7 ("IB/hfi1: add driver files") Link: https://lore.kernel.org/r/20200106134235.119356.29123.stgit@awfm-01.aw.intel.com Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 5ffd048698ea5139743acd45e8ab388a683642b8 Author: Mike Marciniszyn Date: Mon Jan 6 08:42:28 2020 -0500 IB/hfi1: Add software counter for ctxt0 seq drop All other code paths increment some form of drop counter. This was missed in the original implementation. Fixes: 82c2611daaf0 ("staging/rdma/hfi1: Handle packets with invalid RHF on context 0") Link: https://lore.kernel.org/r/20200106134228.119356.96828.stgit@awfm-01.aw.intel.com Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit d791d294edd2f96e5200882f789e8cb4ed431991 Author: Grzegorz Andrejczuk Date: Mon Jan 6 08:42:22 2020 -0500 IB/hfi1: Return void in packet receiving functions Packet receiving functions returns int value, and yet the return values are not used at all. This patch converts the functions to return void. Link: https://lore.kernel.org/r/20200106134222.119356.84098.stgit@awfm-01.aw.intel.com Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Grzegorz Andrejczuk Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 13d2a8384bd9b2dc3f737b19e3d74c845590e6eb Author: Grzegorz Andrejczuk Date: Mon Jan 6 08:42:16 2020 -0500 IB/hfi1: Decouple IRQ name from type IRQ name was connected to IRQ type, this is not sufficient and it would be better to use name as argument to msix_request_irq instead of assigning it to variables when function is called. Index argument was required to generate name and now it can be removed. To generate name correctly helpers function were added and updated. Link: https://lore.kernel.org/r/20200106134216.119356.44478.stgit@awfm-01.aw.intel.com Reviewed-by: Dennis Dalessandro Reviewed-by: Mike Marciniszyn Reviewed-by: Michael J. Ruhl Signed-off-by: Grzegorz Andrejczuk Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 62661038c33b96ed949e751780a69f4d3608bad0 Author: Mike Marciniszyn Date: Mon Jan 6 08:42:10 2020 -0500 IB/hfi1: Create API for auto activate Add an auto activate routine for use by the interrupt handler. Link: https://lore.kernel.org/r/20200106134210.119356.43079.stgit@awfm-01.aw.intel.com Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit cd47b594dbef7c573c0790026a0ea48273ed2b14 Author: Mike Marciniszyn Date: Mon Jan 6 08:42:04 2020 -0500 IB/hfi1: IB/hfi1: Add an API to handle special case drop This patch pushes special case drop logic into an API to be shared by all interrupt handlers. Additionally, convert do_drop to a bool. Link: https://lore.kernel.org/r/20200106134203.119356.36962.stgit@awfm-01.aw.intel.com Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 7b8a8b72c9eaa631d2065ad50f15eb448b43c352 Author: Grzegorz Andrejczuk Date: Mon Jan 6 08:41:57 2020 -0500 IB/hfi1: Move common receive IRQ code to function Tracing interrupts, incrementing interrupt counter and ASPM are part that will be reused by HFI1 receive IRQ handlers. Create common function to have shared code in one place. Link: https://lore.kernel.org/r/20200106134157.119356.32656.stgit@awfm-01.aw.intel.com Reviewed-by: Dennis Dalessandro Reviewed-by: Mike Marciniszyn Signed-off-by: Grzegorz Andrejczuk Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 01c7fc501b8f13a1c5d126d6015ef0908527516e Author: Mike Marciniszyn Date: Mon Jan 6 08:41:51 2020 -0500 IB/hfi1: Add fast and slow handlers for receive context This patch eliminate special cases by adding a fast_handler member to the receive context and changes to the fast handler as specified in the new variable. Initialize the variable as soon as the setting for dma tail is known when the context is created. Setting fast path is called every time when any context has entered slow path. Add function to check if contexts is using fast path and do not set fast path when it is already done to improve RCD fastpath setting. Link: https://lore.kernel.org/r/20200106134150.119356.87558.stgit@awfm-01.aw.intel.com Reviewed-by: Dennis Dalessandro Reviewed-by: Michael J. Ruhl Signed-off-by: Grzegorz Andrejczuk Signed-off-by: Sadanand Warrier Signed-off-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit de730f71919b1ade900a6c8a91a9fe7011b1b53b Author: Mike Marciniszyn Date: Mon Jan 6 08:41:44 2020 -0500 IB/hfi1: Move chip specific functions to chip.c Move routines and defines associated with hdrq size validation to a chip specific routine since the limits are specific to the device. Fix incorrect value for min size 2 -> 32 CSR writes should also be in chip.c. Create a chip routine to write the hdrq specific CSRs and call as appropriate. Link: https://lore.kernel.org/r/20200106134144.119356.74312.stgit@awfm-01.aw.intel.com Reviewed-by: Dennis Dalessandro Reviewed-by: Michael J. Ruhl Signed-off-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 14e23bd6d22123f6f3b2747701fa6cd4c6d05873 Author: Jason Gunthorpe Date: Wed Jan 8 19:22:03 2020 +0200 RDMA/core: Fix locking in ib_uverbs_event_read This should not be using ib_dev to test for disassociation, during disassociation is_closed is set under lock and the waitq is triggered. Instead check is_closed and be sure to re-obtain the lock to test the value after the wait_event returns. Fixes: 036b10635739 ("IB/uverbs: Enable device removal when there are active user space applications") Link: https://lore.kernel.org/r/1578504126-9400-12-git-send-email-yishaih@mellanox.com Signed-off-by: Yishai Hadas Reviewed-by: Håkon Bugge Signed-off-by: Jason Gunthorpe commit 41a1f096e94c9559b45ccce43fba94913ebc7313 Author: Dmitry Osipenko Date: Wed Dec 18 21:44:07 2019 +0300 clk: tegra20/30: Explicitly set parent clock for Video Decoder The VDE parent won't be changed automatically to PLLC if bootloader didn't do that for us, hence let's explicitly set the parent for consistency. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit cb98598e68aa6c812d4ee4abb8f69dafecba64bc Author: Dmitry Osipenko Date: Wed Dec 18 21:44:06 2019 +0300 clk: tegra20/30: Don't pre-initialize displays parent clock Both Tegra20 and Tegra30 are initializing display's parent clock incorrectly because PLLP is running at 216/408MHz while display rate is set to 600MHz, but pre-setting the parent isn't needed at all because display driver selects proper parent anyways. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit cf83a28f281fb3cce090e1b99d31b26baef9c13b Author: Dmitry Osipenko Date: Wed Dec 18 21:44:05 2019 +0300 clk: tegra: divider: Check UART's divider enable-bit state on rate's recalculation UART clock is divided using divisor values from DLM/DLL registers when enable-bit is unset in clk register and clk's divider configuration isn't taken onto account in this case. This doesn't cause any problems, but let's add a check for the divider's enable-bit state, for consistency. Acked-by: Peter De Schrijver Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 5e5eca6644873da93f5a32904f43220380f34e88 Author: Dmitry Osipenko Date: Fri Dec 20 05:08:49 2019 +0300 memory: tegra30-emc: Correct error message for timed out auto calibration The code waits for auto calibration to be finished and not to be disabled. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 0f8bb9da5aee80d8d1b716e0fc5441575ff0ef21 Author: Dmitry Osipenko Date: Fri Dec 20 05:08:48 2019 +0300 memory: tegra30-emc: Firm up hardware programming sequence Previously there was a problem where a late handshake handling caused a memory corruption, this problem was resolved by issuing calibration command right after changing the timing, but looks like the solution wasn't entirely correct since calibration interval could be disabled as well. Now programming sequence is completed immediately after receiving handshake from CaR, without potentially long delays and in accordance to the TRM's programming guide. Secondly, the TRM's programming guide suggests to flush EMC writes by reading any *MC* register before doing CaR changes. This is also addressed now. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 8ccfc20a7d56d7e16510e6e068ffb7b43c3ac100 Author: Chris Wilson Date: Fri Jan 10 11:04:02 2020 +0000 drm/i915/gt: Mark ring->vma as active while pinned As we use the active state to keep the vma alive while we are reading its contents during GPU error capture, we need to mark the ring->vma as active during execution if we want to include the rinbuffer in the error state. Reported-by: Lionel Landwerlin Fixes: b1e3177bd1d8 ("drm/i915: Coordinate i915_active with its own mutex") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Lionel Landwerlin Acked-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20200110110402.1231745-3-chris@chris-wilson.co.uk commit 1b8bfc57267213ddf7f0b03cbd4c40aa65b530d6 Author: Chris Wilson Date: Fri Jan 10 11:04:01 2020 +0000 drm/i915/gt: Mark context->state vma as active while pinned As we use the active state to keep the vma alive while we are reading its contents during GPU error capture, we need to mark the context->state vma as active during execution if we want to include it in the error state. Reported-by: Lionel Landwerlin Fixes: b1e3177bd1d8 ("drm/i915: Coordinate i915_active with its own mutex") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Lionel Landwerlin Acked-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20200110110402.1231745-2-chris@chris-wilson.co.uk commit 80e5351df13a5c4e9ecc14a58fa60c84d356ee87 Author: Chris Wilson Date: Fri Jan 10 11:04:00 2020 +0000 drm/i915/gt: Skip trying to unbind in restore_ggtt_mappings Currently we first to try to unbind the VMA (and lazily rebind on next use) as an optimisation during restore_ggtt_mappings. Ideally, the only objects in the GGTT upon resume are the pinned kernel objects which can't be unbound and need to be restored. As the unbind interferes with the plan to mark those objects as active for error capture, forgo the optimisation. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200110110402.1231745-1-chris@chris-wilson.co.uk commit 51bb73f93410a30550641f69d14cfb7b43fd2da1 Author: Dmitry Osipenko Date: Fri Dec 20 05:08:47 2019 +0300 memory: tegra30-emc: Firm up suspend/resume sequence The current code doesn't prevent race conditions of suspend/resume vs CCF. Let's take exclusive control over the EMC clock during suspend in a way that is free from race conditions. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 45f019a684253910064699395649c7869a203777 Author: Dmitry Osipenko Date: Wed Dec 18 21:55:35 2019 +0300 soc/tegra: regulators: Do nothing if voltage is unchanged There is no need to re-apply the same voltage. This change is just a minor cleanup. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 834f1d6cf3647e804e7a80569e42ee7fbee50eb1 Author: Dmitry Osipenko Date: Wed Dec 18 21:59:57 2019 +0300 ARM: dts: tegra20: paz00: Add memory timings PAZ00 board has two variants of DDR2 SDRAM devices for External Memory: one is Hynix HY5PS1G831CLFP-Y5 and the other is Micron MT47H128M8CF-25:H. The Micron variant doesn't have official timings in the wild, hence only timings for the Hynix are added. The memory frequency-scaling was tested using the Tegra20 devfreq driver. Tested-by: Marc Dietrich Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit d8edf5280c455826a87b4e1837cd8f06bb457807 Author: Sowjanya Komatineni Date: Tue Nov 12 08:17:06 2019 -0800 clk: tegra: clk-dfll: Remove call to pm_runtime_irq_safe() pm_runtime_irq_safe() is not needed as interrupts are allowed during suspend and resume. This was added mistakenly during DFLL suspend and resume support patch. While at it, also update the description of the dev argument that is passed to the tegra_dfll_suspend() function. Signed-off-by: Sowjanya Komatineni Reviewed-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 5f5636ef1de9174db8333787086a0e105938a2c5 Author: Nicolin Chen Date: Thu Dec 19 16:29:11 2019 -0800 memory: tegra: Correct reset value of xusb_hostr According to Tegra X1 (Tegra210) TRM, the reset value of xusb_hostr field (bit [7:0]) should be 0x7a. So this patch simply corrects it. Signed-off-by: Nicolin Chen Signed-off-by: Thierry Reding commit 19d41e5e9c6863ada69e4f6d006634e60987c7ac Author: Dmitry Osipenko Date: Sun Dec 29 18:01:21 2019 +0300 soc/tegra: fuse: Add APB DMA dependency for Tegra20 Tegra20 FUSE driver depends on DMA channel presence, otherwise it fails to probe. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 99eb0a1221ac1083b8c87932c438ef016abdaa05 Author: John Garry Date: Mon Dec 9 22:08:10 2019 +0800 MAINTAINERS: Add a maintainer for the HiSilicon v3xx SFC driver Set John Garry @ Huawei as the maintainer. Signed-off-by: John Garry Link: https://lore.kernel.org/r/1575900490-74467-4-git-send-email-john.garry@huawei.com Signed-off-by: Mark Brown commit a2ca53b52e007de81752bbb443d828f5950d6d04 Author: John Garry Date: Mon Dec 9 22:08:09 2019 +0800 spi: Add HiSilicon v3xx SPI NOR flash controller driver Add the driver for the HiSilicon v3xx SPI NOR flash controller, commonly found in hi16xx chipsets. This is a different controller than that in drivers/mtd/spi-nor/hisi-sfc.c; indeed, the naming for that driver is poor, since it is really known as FMC, and can support other memory technologies. The driver module name is "hisi-sfc-v3xx", as recommended by HW designer, being an attempt to provide a distinct name - v3xx being the unique controller versioning. Only ACPI firmware is supported. DMA is not supported, and we just use polling mode for operation completion notification. The driver uses the SPI MEM OPs. Signed-off-by: John Garry Link: https://lore.kernel.org/r/1575900490-74467-3-git-send-email-john.garry@huawei.com Signed-off-by: Mark Brown commit d0208cfa5f15473988e531ea36ed10e7c62cab1f Author: Wambui Karuga Date: Tue Jan 7 18:13:33 2020 +0300 drm/i915/uncore: use new struct drm_device based macros. Convert to the use of new struct drm_device based logging macros to replace the use of the printk based macros in i915/intel_uncore.c Signed-off-by: Wambui Karuga Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/7142083e727ab400797c8a90a2196ee37a22c201.1578409433.git.wambui.karugax@gmail.com commit b908af554aaa2fdcdc94f8716059664ac8566cb4 Author: Wambui Karuga Date: Tue Jan 7 18:13:32 2020 +0300 drm/i915/sideband: convert to using new struct drm_device logging macros Replace the use of printk based debugging macros with the struct drm_device based logging macros in i915/intel_sideband.c. Signed-off-by: Wambui Karuga Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/ae253ecf3ca878fae7f1f246d75c2136fb6bd72c.1578409433.git.wambui.karugax@gmail.com commit d5cf720f218c2a0a192149164321f977e3e14a5f Author: Wambui Karuga Date: Tue Jan 7 18:13:31 2020 +0300 drm/i915/lmem: use new struct drm_device based logging macros. Replace instances of printk based logging macros with the new struct drm_device logging macros in i915/intel_region_lmem.c. Signed-off-by: Wambui Karuga Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/7f3df2575ab41a052b7beea86ecc5385edf6f6da.1578409433.git.wambui.karugax@gmail.com commit f8d18d5cb256c4dd5e3100e6278baf1d93b9a4be Author: Wambui Karuga Date: Tue Jan 7 18:13:30 2020 +0300 drm/i915/pm: use new struct drm_device logging macros. This converts various instances of the struct device and printk based logging macros with the new struct drm_device based logging macros in i915/intel_pm.c Signed-off-by: Wambui Karuga Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/8721848f7bcf8b0c3a33969d07e331bb372bd51a.1578409433.git.wambui.karugax@gmail.com commit 0f69958dabd6cd2d751af34b2ff1feaf53b73ea0 Author: Wambui Karuga Date: Tue Jan 7 18:13:29 2020 +0300 drm/i915/pch: convert to using the drm_dbg_kms() macro. Convert the use of the DRM_DEBUG_KMS() logging macro to the new struct drm_device based drm_dbg_kms() logging macro in i915/intel_pch.c. Signed-off-by: Wambui Karuga Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/b79ee0f6efbf8358cbb4f2e163fa6b5bb04db794.1578409433.git.wambui.karugax@gmail.com commit 686f63616f4aede1356c1bc9fa4e9a92a123bcd6 Author: Saravanan Sekar Date: Fri Jan 10 11:22:20 2020 +0100 regulator: mpq7920: Fix Woverflow warning on conversion Fix warning Woverflow on type conversion reported on x86. Fixes: 6501c1f54a17 (regulator: mpq7920: add mpq7920 regulator driver) Signed-off-by: Saravanan Sekar Link: https://lore.kernel.org/r/20200110102220.7163-1-sravanhome@gmail.com Signed-off-by: Mark Brown commit b83380512e955f538366c33dd79d660cdac2875c Author: Dan Carpenter Date: Fri Jan 10 08:52:52 2020 +0300 regulator: mp8859: tidy up white space in probe These two lines are indented an extra tab. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200110055252.rvelu4ysvoxsbmlg@kili.mountain Signed-off-by: Mark Brown commit b0edff42360ab4f772cc581a60a14089ef2e1718 Author: Kuninori Morimoto Date: Fri Jan 10 11:36:56 2020 +0900 ASoC: soc-pcm/soc-compress: use snd_soc_dapm_stream_stop() for SND_SOC_DAPM_STREAM_STOP dpcm_fe_dai_shutdown() / soc_compr_free_fe() didn't care pmdown_time. We already have snd_soc_dapm_stream_stop() for it. Let's use common method. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87zhewrq9j.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3f4cf797939cb3ccdb6f989da53f1899d30432dc Author: Kuninori Morimoto Date: Fri Jan 10 11:36:23 2020 +0900 ASoC: soc-dapm: add snd_soc_dapm_stream_stop() When we stop stream, if it was Playback, we might need to care about power down time. In such case, we need to use delayed work. We have same implementation for it at soc-pcm.c and soc-compress.c, but we don't want to have duplicate code. This patch adds snd_soc_dapm_stream_stop(), and share same code. Signed-off-by: Kuninori Morimoto Reviewed-By: Ranjani Sridharan Link: https://lore.kernel.org/r/871rs8t4uw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 83f94a2e293d617a98e077680ea00b2830a9ca22 Author: Kuninori Morimoto Date: Fri Jan 10 11:36:17 2020 +0900 ASoC: soc-core: add snd_soc_close_delayed_work() We need to setup rtd->close_delayed_work_func. It will be set at snd_soc_dai_compress_new() or soc_new_pcm(). But these setups close_delayed_work() which is same name / same implemantaion, but different local code. To reduce duplicate code, this patch moves it as snd_soc_close_delayed_work() and share same code. Signed-off-by: Kuninori Morimoto Reviewed-By: Ranjani Sridharan Link: https://lore.kernel.org/r/8736cot4v2.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 76c39e867cba338d8982f6372b2c4e3189f6439b Author: Kuninori Morimoto Date: Fri Jan 10 11:36:13 2020 +0900 ASoC: soc-core: do pinctrl_pm_select_xxx() as component ALSA SoC need to care pinctrl_pm_select_xxx(). It is called at soc-core and soc-pcm. soc-pcm is controlling it for activate DAI. soc-core is controlling it for whole system (= suspend/resume/probe/poweroff). If we focus to soc-core side, it need to care about BIAS level. Then, snd_soc_suspend() only is controlling it by Component base (a). Other functions are DAI base (b). (a) pinctrl_pm_select_xxx(component->dev, xxx); (b) pinctrl_pm_select_xxx(dai->dev, xxx); Because of these unbalance, the code is confusable. Here, dai->dev and component->dev are same pointer. Thus, we can replace it component base. One note here is that it cared DAI (= CPU/Codec) pin before this patch, after this patch, it cares Component (= CPU/Codec/Platform) pin. Signed-off-by: Kuninori Morimoto Reviewed-By: Ranjani Sridharan Link: https://lore.kernel.org/r/874kx4t4v6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit d7a8cb4931652256a01383bb3ea10fab316e72a1 Author: Kuninori Morimoto Date: Fri Jan 10 11:36:07 2020 +0900 ASoC: soc-core: remove duplicate pinctrl operation when suspend snd_soc_suspend() are doing below for pinctrl_pm_select_sleep_state() int snd_soc_suspend(struct device *dev) { ... for_each_card_components(card, component) { ... (1) pinctrl_pm_select_sleep_state(component->dev); } for_each_card_rtds(card, rtd) { ... (2) pinctrl_pm_select_sleep_state(cpu_dai->dev); } } (1) is called for all component (CPU/Codec/Platform), and (2) is called for CPU DAIs. Here, component->dev is same as dai->dev. This means, it is called in duplicate on CPU case. This patch removes (2). Signed-off-by: Kuninori Morimoto Reviewed-By: Ranjani Sridharan Link: https://lore.kernel.org/r/875zhkt4vc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1272063a7ee4e60ace4cf7cae621fb6f8cafaaba Author: Kuninori Morimoto Date: Fri Jan 10 11:36:02 2020 +0900 ASoC: soc-core: care .ignore_suspend for Component suspend Card dai_link has .ignore_suspend, and ALSA SoC cares it when suspend. For example, like this for_each_card_rtds(card, rtd) { if (rtd->dai_link->ignore_suspend) continue; ... } But in snd_soc_suspend(), it doesn't care about it when suspending Component. This patch cares it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/877e20t4vh.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 12b052327dc2d9d4ca5146608aad1c42741df4fb Author: Kuninori Morimoto Date: Fri Jan 10 11:35:54 2020 +0900 ASoC: soc-core: rename snd_soc_rtdcom_add() to snd_soc_rtd_add_component() We don't have snd_soc_rtdcom_list anymore. Let's rename snd_soc_rtdcom_add() to more understandable snd_soc_rtd_add_component() Reported-by: Sridharan, Ranjani Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/878smgt4vp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 7d2a5f9ae41e3d3b50cd32b9fb307fab88064daf Author: Shuming Fan Date: Fri Jan 10 09:45:52 2020 +0800 ASoC: rt700: add rt700 codec driver This is the initial codec driver for rt700. Signed-off-by: Shuming Fan Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200110014552.17252-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 613fb50059cf19aa6acbc503a00265d9151c0b09 Author: Kuninori Morimoto Date: Fri Jan 10 11:35:21 2020 +0900 ASoC: soc-core: remove snd_soc_rtdcom_list Current ALSA SoC is using struct snd_soc_rtdcom_list to connecting component to rtd by using list_head. struct snd_soc_rtdcom_list { struct snd_soc_component *component; struct list_head list; /* rtd::component_list */ }; struct snd_soc_pcm_runtime { ... struct list_head component_list; /* list of connected components */ ... }; The CPU/Codec/Platform component which will be connected to rtd (a) is indicated via dai_link at snd_soc_add_pcm_runtime() int snd_soc_add_pcm_runtime(...) { ... /* Find CPU from registered CPUs */ rtd->cpu_dai = snd_soc_find_dai(dai_link->cpus); ... (a) snd_soc_rtdcom_add(rtd, rtd->cpu_dai->component); ... /* Find CODEC from registered CODECs */ (b) for_each_link_codecs(dai_link, i, codec) { rtd->codec_dais[i] = snd_soc_find_dai(codec); ... (a) snd_soc_rtdcom_add(rtd, rtd->codec_dais[i]->component); } ... /* Find PLATFORM from registered PLATFORMs */ (b) for_each_link_platforms(dai_link, i, platform) { for_each_component(component) { ... (a) snd_soc_rtdcom_add(rtd, component); } } } It shows, it is possible to know how many components will be connected to rtd by using dai_link->num_cpus dai_link->num_codecs dai_link->num_platforms If so, we can use component pointer array instead of list_head, in such case, code can be more simple. This patch removes struct snd_soc_rtdcom_list that is only of temporary value, and convert to pointer array. Signed-off-by: Kuninori Morimoto Reviewed-By: Ranjani Sridharan Link: https://lore.kernel.org/r/87a76wt4wm.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a84188eced6109983af54f9435a26d21eac3f8cc Author: Mark Brown Date: Fri Jan 10 13:24:02 2020 +0000 ASoC: max98090: Drop incorrectly applied duplicate commit This reverts commit 4e93c1294f4b051 (ASoC: max98090: fix incorrect helper in max98090_dapm_put_enum_double()) which was misapplied. Reported-by: Marek Szyprowski Signed-off-by: Mark Brown commit 8c44f9b566a3a2371bca9dcabe450980e039cadf Author: Dmitry Torokhov Date: Sat Jan 4 12:23:14 2020 -0800 tty: st-asc: switch to using devm_gpiod_get() The node pointer in question is not a child node, but the node assigned to the port device itself, so we should not be using devm_fwnode_get_gpiod_from_child() [that is going away], but standard devm_gpiod_get(). To maintain the previous labeling we use gpiod_set_consumer_name() after we acquire the GPIO. Signed-off-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20200104202314.GA13591@dtor-ws Signed-off-by: Greg Kroah-Hartman commit cdcc41a256efe8c308766fbfa8b6d60b211aa275 Author: John Stultz Date: Tue Jan 7 01:03:11 2020 +0000 tty: serial: Kconfig: Allow SERIAL_QCOM_GENI_CONSOLE to be enabled if SERIAL_QCOM_GENI is a module In order to support having SERIAL_QCOM_GENI as a module while also still preserving serial console support, tweak the Kconfig requirements to not require =y Cc: Todd Kjos Cc: Alistair Delva Cc: Amit Pundir Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: John Stultz Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200107010311.58584-2-john.stultz@linaro.org Signed-off-by: Greg Kroah-Hartman commit 488f49acecaedc64be54f5b2be7ce8dcc568646c Author: John Stultz Date: Tue Jan 7 01:03:10 2020 +0000 tty: serial_core: Export uart_console_device so it can be used by modules In order to support serial console w/ SERIAL_QCOM_GENI=m, we need to export the uart_console_device() symbol so things will build Cc: Todd Kjos Cc: Alistair Delva Cc: Bjorn Andersson Cc: Amit Pundir Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Signed-off-by: John Stultz Link: https://lore.kernel.org/r/20200107010311.58584-1-john.stultz@linaro.org Signed-off-by: Greg Kroah-Hartman commit 16bb7abc4a6b9defffa294e4dc28383e62a1dbcf Author: Bitan Biswas Date: Thu Jan 9 10:40:17 2020 +0000 nvmem: core: fix memory abort in cleanup path nvmem_cell_info_to_nvmem_cell implementation has static allocation of name. nvmem_add_cells_from_of() call may return error and kfree name results in memory abort. Use kstrdup_const() and kfree_const calls for name alloc and free. Unable to handle kernel paging request at virtual address ffffffffffe44888 Mem abort info: ESR = 0x96000006 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 swapper pgtable: 64k pages, 48-bit VAs, pgdp=00000000815d0000 [ffffffffffe44888] pgd=0000000081d30803, pud=0000000081d30803, pmd=0000000000000000 Internal error: Oops: 96000006 [#1] PREEMPT SMP Modules linked in: CPU: 2 PID: 43 Comm: kworker/2:1 Tainted Hardware name: quill (DT) Workqueue: events deferred_probe_work_func pstate: a0000005 (NzCv daif -PAN -UAO) pc : kfree+0x38/0x278 lr : nvmem_cell_drop+0x68/0x80 sp : ffff80001284f9d0 x29: ffff80001284f9d0 x28: ffff0001f677e830 x27: ffff800011b0b000 x26: ffff0001c36e1008 x25: ffff8000112ad000 x24: ffff8000112c9000 x23: ffffffffffffffea x22: ffff800010adc7f0 x21: ffffffffffe44880 x20: ffff800011b0b068 x19: ffff80001122d380 x18: ffffffffffffffff x17: 00000000d5cb4756 x16: 0000000070b193b8 x15: ffff8000119538c8 x14: 0720072007200720 x13: 07200720076e0772 x12: 07750762072d0765 x11: 0773077507660765 x10: 072f073007300730 x9 : 0730073207380733 x8 : 0000000000000151 x7 : 07660765072f0720 x6 : ffff0001c00e0f00 x5 : 0000000000000000 x4 : ffff0001c0b43800 x3 : ffff800011b0b068 x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffffffdfffe00000 Call trace: kfree+0x38/0x278 nvmem_cell_drop+0x68/0x80 nvmem_device_remove_all_cells+0x2c/0x50 nvmem_register.part.9+0x520/0x628 devm_nvmem_register+0x48/0xa0 tegra_fuse_probe+0x140/0x1f0 platform_drv_probe+0x50/0xa0 really_probe+0x108/0x348 driver_probe_device+0x58/0x100 __device_attach_driver+0x90/0xb0 bus_for_each_drv+0x64/0xc8 __device_attach+0xd8/0x138 device_initial_probe+0x10/0x18 bus_probe_device+0x90/0x98 deferred_probe_work_func+0x74/0xb0 process_one_work+0x1e0/0x358 worker_thread+0x208/0x488 kthread+0x118/0x120 ret_from_fork+0x10/0x18 Code: d350feb5 f2dffbe0 aa1e03f6 8b151815 (f94006a0) ---[ end trace 49b1303c6b83198e ]--- Fixes: badcdff107cbf ("nvmem: Convert to using %pOFn instead of device_node.name") Signed-off-by: Bitan Biswas Cc: stable Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200109104017.6249-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 226c512699ee047b7fae0df297ea0be9e2b629c5 Author: Peng Fan Date: Thu Jan 9 10:40:16 2020 +0000 nvmem: imx: ocotp: introduce ocotp_ctrl_reg Introduce ocotp_ctrl_reg to include the low 16bits mask of CTRL register. i.MX chips will have different layout of the low 16bits of CTRL register, so use ocotp_ctrl_reg will make it clean to add new chip support. Signed-off-by: Peng Fan Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200109104017.6249-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8c4d35aff54042aa80efaabdb7b754b3d74a71d5 Author: Peng Fan Date: Thu Jan 9 10:40:15 2020 +0000 nvmem: imx: scu: correct the fuse word index i.MX8 fuse word row index represented as one 4-bytes word. Exp: - MAC0 address layout in fuse: offset 708: MAC[3] MAC[2] MAC[1] MAC[0] offset 709: XX xx MAC[5] MAC[4] The original code takes row index * 4 as the offset, this not exactly match i.MX8 fuse map documentation. So update code the reflect the truth. Signed-off-by: Peng Fan Reviewed-by: Fugang Duan Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200109104017.6249-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 40bb95dbb8acca35f8d52a833393ddbb01cfa2db Author: Peng Fan Date: Thu Jan 9 10:40:14 2020 +0000 nvmem: imx: scu: fix write SIP SIP number 0xC200000A is for reading, 0xC200000B is for writing. And the following two args for write are word index, data to write. Fixes: 885ce72a09d0 ("nvmem: imx: scu: support write") Signed-off-by: Peng Fan Signed-off-by: Srinivas Kandagatla Cc: stable Link: https://lore.kernel.org/r/20200109104017.6249-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit ab5caf34f5413daa1d58bb827fbb206094e20f0c Author: Malcolm Priestley Date: Wed Jan 8 21:41:56 2020 +0000 staging: vt6656: Move ieee80211_rx_status off stack. ieee80211_rx_status off stack to IEEE80211_SKB_RXCB (skb->cb) removing the need to copy on to it. skb->cb is always present as a clean buffer so simply fill it in. Signed-off-by: Malcolm Priestley Link: https://lore.kernel.org/r/a66caba4-0c17-41af-a58f-3cdbb3243fb0@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9dd631fa99dc0a0dfbd191173bf355ba30ea786a Author: Malcolm Priestley Date: Wed Jan 8 21:41:36 2020 +0000 staging: vt6656: Fix false Tx excessive retries reporting. The driver reporting IEEE80211_TX_STAT_ACK is not being handled correctly. The driver should only report on TSR_TMO flag is not set indicating no transmission errors and when not IEEE80211_TX_CTL_NO_ACK is being requested. Cc: stable Signed-off-by: Malcolm Priestley Link: https://lore.kernel.org/r/340f1f7f-c310-dca5-476f-abc059b9cd97@gmail.com Signed-off-by: Greg Kroah-Hartman commit d579c43c82f093e63639151625b2139166c730fd Author: Malcolm Priestley Date: Wed Jan 8 21:41:20 2020 +0000 staging: vt6656: use NULLFUCTION stack on mac80211 It appears that the drivers does not go into power save correctly the NULL data packets are not being transmitted because it not enabled in mac80211. The driver needs to capture ieee80211_is_nullfunc headers and copy the duration_id to it's own duration data header. Cc: stable Signed-off-by: Malcolm Priestley Link: https://lore.kernel.org/r/610971ae-555b-a6c3-61b3-444a0c1e35b4@gmail.com Signed-off-by: Greg Kroah-Hartman commit d971fdd3412f8342747778fb59b8803720ed82b1 Author: Malcolm Priestley Date: Wed Jan 8 21:40:58 2020 +0000 staging: vt6656: correct packet types for CTS protect, mode. It appears that the driver still transmits in CTS protect mode even though it is not enabled in mac80211. That is both packet types PK_TYPE_11GA and PK_TYPE_11GB both use CTS protect. The only difference between them GA does not use B rates. Find if only B rate in GB or GA in protect mode otherwise transmit packets as PK_TYPE_11A. Cc: stable Signed-off-by: Malcolm Priestley Link: https://lore.kernel.org/r/9c1323ff-dbb3-0eaa-43e1-9453f7390dc0@gmail.com Signed-off-by: Greg Kroah-Hartman commit 02ede9567e016622fa01f32649127352e11ed61d Author: Chuanhong Guo Date: Thu Jan 9 16:00:03 2020 +0800 staging: mt7621-dts: fix register range of memc node in mt7621.dtsi The memc node from mt7621.dtsi has incorrect register resource. Fix it according to the programming guide. Signed-off-by: Weijie Gao Signed-off-by: Chuanhong Guo Link: https://lore.kernel.org/r/20200109080120.362110-1-gch981213@gmail.com Signed-off-by: Greg Kroah-Hartman commit cd42570fa91c2831a23849c8fc59417557d0292a Author: Masahiro Yamada Date: Sun Jan 5 01:21:36 2020 +0900 staging: rtl8192u: remove unneeded compiler flags -std=gnu89 is specified by the top Makefile. Adding it in a driver Makefile is redundant. A driver should avoid specifying the optimization flag. -O2, -O3, or -Os is passed by the top Makefile based on the CONFIG_CC_OPTIMIZE_FOR_* option. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20200104162136.19170-3-masahiroy@kernel.org Signed-off-by: Greg Kroah-Hartman commit 71fe59536e8a4b649c5d78d3ac58a66c03d34f38 Author: Masahiro Yamada Date: Sun Jan 5 01:21:35 2020 +0900 staging: rtl8192u: remove header include path to ieee80211/ There is no need to add "ccflags-y += -I $(srctree)/$(src)/ieee80211" just for including "dot11d.h". Use the correct relative path for the #include "..." directive. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20200104162136.19170-2-masahiroy@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9033db57a59a7cd86abe9463f040b60aee51ccf2 Author: Masahiro Yamada Date: Sun Jan 5 01:21:34 2020 +0900 staging: rtl8192u: remove unused Makefile drivers/staging/rtl8192u/ieee80211/Makefile is not used at all. All the build rules are described in drivers/staging/rtl8192u/Makefile. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20200104162136.19170-1-masahiroy@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1e8d19d9b0dfcf11b61bac627203a290577e807a Author: Tomas Winkler Date: Thu Dec 12 10:41:03 2019 +0200 mei: hdcp: bind only with i915 on the same PCH The mei device and i915 must reside on the same PCH in order for HDCP to work. Make the component matching function enforce this requirement. hdcp | i915 mei | | +----= PCH =----+ Cc: v5.0+ Cc: Ramalingam C Signed-off-by: Tomas Winkler Reviewed-by: Alexander Usyskin Link: https://lore.kernel.org/r/20191212084103.2893-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 49ef431defcc03be0d9bf80e1b3945a1c914868c Author: Tomas Winkler Date: Tue Nov 26 14:30:02 2019 +0200 mei: bus: use simple sprintf for sysfs Replace scnprintf with simple sprintf for sysfs files. it is implicitly known that the buffer is big enough for the variables to fit in. Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20191126123002.4835-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 23534b197159dd07d3e02d4afd7fca3243d30bce Merge: 320b8b0d13b8 a14bf98c045b Author: Mark Brown Date: Fri Jan 10 11:51:21 2020 +0000 Merge branch 'for-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.6 commit 2f56acf818a08a9187ac8ec6e3d994fc13dc368d Author: Sameer Pujar Date: Thu Jun 20 21:21:59 2019 +0530 bus: tegra-aconnect: Remove PM_CLK dependency The ACONNECT bus driver does not use pm-clk interface anymore and hence the dependency can be removed from its Kconfig option. Fixes: 0d7dab926130 ("bus: tegra-aconnect: use devm_clk_*() helpers") Signed-off-by: Sameer Pujar Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit 5c0e9de06577ba7599b75f97a8bb8cc63f6cb2ad Author: Colin Ian King Date: Fri Jan 10 10:08:12 2020 +0000 PM: hibernate: fix spelling mistake "shapshot" -> "snapshot" There is a spelling mistake in a pr_info message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki commit a99d2c6ccd15570a74a39992efa82fd169026b4c Author: Bartosz Golaszewski Date: Fri Jan 10 09:19:29 2020 +0100 nvmem: fix a 'makes pointer from integer without a cast' build warning nvmem_register() returns a pointer, not a long int. Use ERR_CAST() to cast the struct gpio_desc pointer to struct nvmem_device. Reported-by: kbuild test robot Fixes: 2a127da461a9 ("nvmem: add support for the write-protect pin") Signed-off-by: Bartosz Golaszewski Acked-by: Srinivas Kandagatla commit ffd7263e63fe80a39c1222a6d68e05095ed04d03 Author: Daniel Campello Date: Wed Jan 8 09:35:20 2020 -0700 platform/chrome: wilco_ec: Fix unregistration order The unregistration should happen in the opposite order of the registration, so change it accordingly. No real issue has been noticed, but it is good practice to keep the correct unregistration order. Signed-off-by: Daniel Campello Signed-off-by: Enric Balletbo i Serra commit 9c26abeb86ce6ab53b6397873bb3f556016c05ba Merge: 56f6737167ca d412f18c9bc7 Author: Matthias Brugger Date: Fri Jan 10 11:00:45 2020 +0100 Merge branch 'v5.5-next/cmdq-stable' into v5.5-next/soc commit 56f6737167ca733a6334d8313030f5a22761a439 Author: Mars Cheng Date: Fri Jul 12 17:43:39 2019 +0800 dt-bindings: mediatek: add MT6765 power dt-bindings This adds power dt-bindings for MT6765 Signed-off-by: Mars Cheng Signed-off-by: Owen Chen Signed-off-by: Macpaul Lin Reviewed-by: Rob Herring Signed-off-by: Matthias Brugger commit 949601a71ac57e662d0529169b036d7f19685633 Author: Matthias Brugger Date: Wed Dec 11 19:59:50 2019 +0100 soc: mediatek: cmdq: delete not used define Define CMDQ_EOC_CMD was actually never used. Delete it. Signed-off-by: Matthias Brugger Reviewed-by: Bibby Hsieh Reviewed-by: CK Hu Signed-off-by: Matthias Brugger commit b4cf24cc936b1552261d7bc5557aa1d8007e5be8 Author: Michael Straube Date: Sun Jan 5 20:49:36 2020 +0100 staging: rtl8188eu: refactor rtl88eu_dm_update_rx_idle_ant() Refactor rtl88eu_dm_update_rx_idle_ant() to reduce indentation level and clear line over 80 characters checkpatch warnings. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200105194936.5477-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0c5e99c920a7812411dba26667edeac5d21f8836 Author: Michael Straube Date: Sun Jan 5 20:49:35 2020 +0100 staging: rtl8188eu: remove else after return Remove else after return in rtl88eu_dm_antenna_diversity() to improve readability and clear a checkpatch warning. WARNING: else is not generally useful after a break or return Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200105194936.5477-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit c497ae2077c055b85c1bf04f3d182a84bd8f365b Author: Arnd Bergmann Date: Sat Jan 4 22:48:21 2020 +0100 staging: rtl8188: avoid excessive stack usage The rtl8188 copy of the os_dep support code causes a warning about a very significant stack usage in the translate_scan() function: drivers/staging/rtl8188eu/os_dep/ioctl_linux.c: In function 'translate_scan': drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:306:1: error: the frame size of 1560 bytes is larger than 1400 bytes [-Werror=frame-larger-than=] Use the same trick as in the rtl8723bs copy of the same function, and allocate it dynamically. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200104214832.558198-1-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit 47f6e54c53c5235137ffef50aeaa2c899b3a2ad8 Author: Masahiro Yamada Date: Sun Jan 5 01:37:10 2020 +0900 staging: rts5208: remove unneeded header include path A header include path without $(srctree)/ is suspicous because it does not work with O= builds. I can build drivers/staging/rts5208/ without this include path. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20200104163710.21582-1-masahiroy@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4eedc97300fd7d4d5694c175e71855bff9731024 Author: Andy Shevchenko Date: Thu Jan 9 16:15:09 2020 +0200 platform/x86: intel_atomisp2_pm: Spelling fixes Fix ambiguous spelling in the comments. While here, update two lines to fit one. Signed-off-by: Andy Shevchenko commit 81bda12aad60b0dc9f76f6f7a575d7b812533a19 Author: Andy Shevchenko Date: Thu Jan 9 16:08:25 2020 +0200 platform/x86: intel_atomisp2_pm: Refactor timeout loop The timeout loop look more naturally when done like unsigned long timeout = ...; ... do { ... if (cond) return %OK; sleep(...); } while (time_before(timeout)); ...print timeout error... return %ERROR; It also saves LOCs. Convert the driver to this format of timeout loop. Signed-off-by: Andy Shevchenko commit a28215844d8db87aadb9bcce040e7897691ff6ba Author: Leonid Maksymchuk Date: Sun Dec 15 16:27:24 2019 +0200 platform/x86: asus_wmi: Set throttle thermal policy to default ASUS TUF FX705DY/FX505DY starts in silent mode and under heavy CPU load it overheats and drops CPU frequency to 399MHz and stays at it until reboot [1]. Set throttle thermal policy to default to avoid overheating and throttlig. [1] Link: https://bugzilla.kernel.org/show_bug.cgi?id=203733 Signed-off-by: Leonid Maksymchuk Signed-off-by: Andy Shevchenko commit 2daa86e78c494d06d0aac231e4533f3dc50fa432 Author: Leonid Maksymchuk Date: Sun Dec 15 16:26:34 2019 +0200 platform/x86: asus_wmi: Support throttle thermal policy Throttle thermal policy ACPI device is used to control CPU cooling and throttling. This patch adds sysfs entry for setting current mode and Fn+F5 hotkey that switches to next. Policy modes: * 0x00 - default * 0x01 - overboost * 0x02 - silent Signed-off-by: Leonid Maksymchuk Signed-off-by: Andy Shevchenko commit df532c160c4402b09fca4bc8469a57cedf49f351 Author: Andy Shevchenko Date: Thu Jan 9 17:34:05 2020 +0200 platform/x86: touchscreen_dmi: Fix indentation in several places 1. Put on one line PROPERTY_ENTRY_STRING("firmware-name", ...) lines. In most cases this doesn't over the limit, the rest is pretty much obvious from reading point of view. 2. Put on one line DMI_MATCH() parameters, we already have over the limit lines. 3. Reduce indentation of function parameters. Signed-off-by: Andy Shevchenko commit f95eafbf1f8021dbdeda0b7479b4b41094dde491 Author: Tim Josten Date: Fri Jan 3 16:00:59 2020 +0100 platform/x86: touchscreen_dmi: Add info for the PiPO W11 tablet Add touchscreen info for the PiPO W11 tablet. Signed-off-by: Tim Josten Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 4d9ffa0b89fb5fd4aa722b68e60f460dbfbf4a7a Author: Harry Pan Date: Mon Jan 6 17:57:00 2020 +0800 platform/x86: intel_pmc_core: update Comet Lake platform driver Adding new CML CPU model ID into platform driver support list. Signed-off-by: Harry Pan Signed-off-by: Andy Shevchenko commit eb518899c49911327422c88cde60bebeebbc731e Author: Hans de Goede Date: Mon Jan 6 15:42:19 2020 +0100 platform/x86: GPD pocket fan: Allow somewhat lower/higher temperature limits Allow the user to configure the fan to turn on / speed-up at lower thresholds then before (20 degrees Celcius as minimum instead of 40) and likewise also allow the user to delay the fan speeding-up till the temperature hits 90 degrees Celcius (was 70). Cc: Jason Anderson Reported-by: Jason Anderson Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 01e28c1b2963bd3782e050ff2c4901fe1ceb5192 Author: Hans de Goede Date: Mon Jan 6 15:42:18 2020 +0100 platform/x86: GPD pocket fan: Use default values when wrong modparams are given Use our default values when wrong module-parameters are given, instead of refusing to load. Refusing to load leaves the fan at the BIOS default setting, which is "Off". The CPU's thermal throttling should protect the system from damage, but not-loading is really not the best fallback in this case. This commit fixes this by re-setting module-parameter values to their defaults if they are out of range, instead of failing the probe with -EINVAL. Cc: stable@vger.kernel.org Cc: Jason Anderson Reported-by: Jason Anderson Fixes: 594ce6db326e ("platform/x86: GPD pocket fan: Use a min-speed of 2 while charging") Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 3454eeeebd115891f34aa2e76eccf08c9b0882bb Author: Liming Sun Date: Fri Dec 20 12:04:33 2019 -0500 platform/mellanox: fix potential deadlock in the tmfifo driver This commit fixes the potential deadlock caused by the console Rx and Tx processing at the same time. Rx and Tx both take the console and tmfifo spinlock but in different order which causes potential deadlock. The fix is to use different tmfifo spinlock for Rx and Tx since they protect different resources and it's safe to split the lock. Below is the reported call trace when copying/pasting large string in the console. Rx: _raw_spin_lock_irqsave (hvc lock) __hvc_poll hvc_poll in_intr vring_interrupt mlxbf_tmfifo_rxtx_one_desc (tmfifo lock) mlxbf_tmfifo_rxtx mlxbf_tmfifo_work_rxtx Tx: _raw_spin_lock_irqsave (tmfifo lock) mlxbf_tmfifo_virtio_notify virtqueue_notify virtqueue_kick put_chars hvc_push hvc_write (hvc lock) ... do_tty_write tty_write Fixes: 1357dfd7261f ("platform/mellanox: Add TmFifo driver for Mellanox BlueField Soc") Cc: # 5.4+ Reviewed-by: David Woods Signed-off-by: Liming Sun Signed-off-by: Andy Shevchenko commit 84abc5a1c924548099a2d9cd0e8b8c1928ef5b55 Author: Nishad Kamdar Date: Thu Dec 19 20:00:01 2019 +0530 platform/x86: intel-ips: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header files related to x86 Platform Specific Drivers. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Andy Shevchenko commit 4475e699273699548f1f2054199fff20371183fa Author: Andy Shevchenko Date: Wed Dec 18 20:42:29 2019 +0200 platform/x86: intel_telemetry_debugfs: Respect error code of kstrtou32_from_user() kstrtou32_from_user() may return different error codes on certain circumstances. Respect all possible values. Signed-off-by: Andy Shevchenko commit cbe358191ffc6947ece34ebec5a99e4026b5521e Author: Andy Shevchenko Date: Wed Dec 18 20:35:44 2019 +0200 platform/x86: intel_pmc_core: Fix spelling of MHz unit Fix spelling of MHz unit in a comment. Signed-off-by: Andy Shevchenko commit e0e60abc858c1e09c34ea1f999116abf18edc598 Author: Andy Shevchenko Date: Wed Dec 18 20:37:19 2019 +0200 platform/x86: intel_pmc_core: Fix indentation in function definitions There are two problematic places where indentation is not good to a reader and maintainer. Fix them here. Signed-off-by: Andy Shevchenko commit 90113f3e4567f371e331d8845a680c5edc6c2f54 Author: Andy Shevchenko Date: Wed Dec 18 20:39:27 2019 +0200 platform/x86: intel_pmc_core: Put more stuff under #ifdef DEBUG_FS There is a function which is solely used for DebugFS interface, do not build it otherwise. Signed-off-by: Andy Shevchenko commit 9592438886756ce7d1327e9ec998b8bc0c1541bc Author: Andy Shevchenko Date: Wed Dec 18 20:42:29 2019 +0200 platform/x86: intel_pmc_core: Respect error code of kstrtou32_from_user() kstrtou32_from_user() may return different error codes on certain circumstances. Respect all possible values. While here, move it out of the lock: there is no data access that lock guards. Signed-off-by: Andy Shevchenko commit e883cafd8de012edc979935610b04204c4c2a742 Author: Andy Shevchenko Date: Mon Oct 21 12:24:43 2019 +0300 platform/x86: intel_telemetry_pltdrv: use devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify the code a bit. While here, drop initialized but unused ssram_base_addr and ssram_size members. Signed-off-by: Andy Shevchenko commit cd037ff2f98227148002084d588f03b348469fe4 Author: Masahiro Yamada Date: Tue Dec 24 17:15:00 2019 +0900 iommu/arm-smmu: Fix -Wunused-const-variable warning For ARCH=arm builds, OF is not necessarily enabled, that is, you can build this driver without CONFIG_OF. When CONFIG_OF is unset, of_match_ptr() is NULL, and arm_smmu_of_match is left orphan. Building it with W=1 emits a warning: drivers/iommu/arm-smmu.c:1904:34: warning: ‘arm_smmu_of_match’ defined but not used [-Wunused-const-variable=] static const struct of_device_id arm_smmu_of_match[] = { ^~~~~~~~~~~~~~~~~ There are two ways to fix this: - annotate arm_smmu_of_match with __maybe_unused (or surround the code with #ifdef CONFIG_OF ... #endif) - stop using of_match_ptr() This commit took the latter solution. It slightly increases the object size, but it is probably not a big deal because arm_smmu_device_dt_probe() is also compiled irrespective of CONFIG_OF. Signed-off-by: Masahiro Yamada Signed-off-by: Will Deacon commit 8efda06f83d65c015a99d99a195df533aec0fcf9 Author: Masahiro Yamada Date: Tue Dec 24 17:14:59 2019 +0900 iommu/arm-smmu-v3: Remove useless of_match_ptr() The CONFIG option controlling this driver, ARM_SMMU_V3, depends on ARM64, which select's OF. So, CONFIG_OF is always defined when building this driver. of_match_ptr(arm_smmu_of_match) is the same as arm_smmu_of_match. Signed-off-by: Masahiro Yamada Signed-off-by: Will Deacon commit 322a9bbb720cd273d2967a375d1887199b361528 Author: Masahiro Yamada Date: Thu Dec 26 18:50:56 2019 +0900 iommu/arm-smmu-v3: Fix resource_size check This is an off-by-one mistake. resource_size() returns res->end - res->start + 1. Reviewed-by: Robin Murphy Signed-off-by: Masahiro Yamada Signed-off-by: Will Deacon commit 935d43ba272e0001f8ef446a3eff15d8175cb11b Author: Shameer Kolothum Date: Wed Nov 13 16:11:38 2019 +0000 iommu/arm-smmu-v3: Populate VMID field for CMDQ_OP_TLBI_NH_VA CMDQ_OP_TLBI_NH_VA requires VMID and this was missing since commit 1c27df1c0a82 ("iommu/arm-smmu: Use correct address mask for CMD_TLBI_S2_IPA"). Add it back. Fixes: 1c27df1c0a82 ("iommu/arm-smmu: Use correct address mask for CMD_TLBI_S2_IPA") Signed-off-by: Shameer Kolothum Signed-off-by: Will Deacon commit fc10cca69ee8af49778ad76c1e5fddf83d5026c8 Author: Will Deacon Date: Thu Jan 9 14:08:41 2020 +0000 drivers/iommu: Initialise module 'owner' field in iommu_device_set_ops() Requiring each IOMMU driver to initialise the 'owner' field of their 'struct iommu_ops' is error-prone and easily forgotten. Follow the example set by PCI and USB by assigning THIS_MODULE automatically when registering the ops structure with IOMMU core. Reviewed-by: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Will Deacon commit 821f7ce79fd1ef2bf96a1b93521d8800abd24a1f Merge: 0469fc6a1a87 c1d1c4a62db5 Author: Greg Kroah-Hartman Date: Fri Jan 10 10:44:00 2020 +0100 Merge tag 'iio-for-5.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First set of new device support, features and cleanups for IIO in the 5.6 cycle New device support * ad7091r5 ADC - New driver with follow up patch adding scale and vref support. - DT bindings * ad7923 - Support for ad7908, ad7918 and ad7928 added to driver. * bma180 - Support the BMA254 accelerometer. Required fairly substantial rework to allow for small differences between this an existing parts. * bma400 accelerometer - New driver with follow up patch for regulator support. - DT bindings. * asc dlhl60d - New driver support this range of pressure and temperature sensors. - DT bindings. * ltc2496 ADC - New driver to support this ADC. - Split the existing LTC2497 driver generic component out and reuse. - DT bindings. * parallax ping - New driver supporting ultrasonic and laser tof distance sensors. - Bindings for these sensors. New features * core - New char type for read_raw returns, used for thermocouple types. - Rename read_first_n callback to read. The reasons behind the original naming are lost to the mists of time. * ad799x - Allow pm_ops to disable device completely allowing regulator power down. * bma180 - Enable basic regulator support. * dmaengine buffer - Report platform data alignment requirements via new ABI. * max31856 - Add option to set mains filter rejection frequency and document new in_temp_filter_notch_center_frequency ABI. - Add support for configuring HW averaging (oversampling ratio) - Add runtime configuration of thermocouple type and document new ABI. * maxim-thermocouple - Add read only access to thermocouple type using new ABI, includes adding more specific compatibles to reflect which variant of the chip is being used. * mpu6050 - Provide option to support the PMU9150 in package magnetometer directly rather than via auxiliary bus. * stm32_adc - Add overrun interrupt checks to detect if this happens. * st_lsm6dsx - Enable the sensor-hub support for lsm6dsm. Includes various reworks to allow this. Cleanups and minor fixes * Subsystem wide - Tidy up indentation in Kconfig and fix alphabetical order of AD7091R5. - Drop linux/gpio.h and linux/of_gpio.h from drivers that don't use them. * ad7266 - Convert to GPIO descriptors. * ad7303 - Avoid a dance with checking if the regulator is supplied by just using the optional request interface. * ad7887 - Simplify channel specification assignment to enable adding more devices. * ad7923 - Drop some unused and largely pointless defines of BOB_N==N variety. - Tidy up checkpatch warnings. - Add missing of_device_id table. * adf4350 - Convert to GPIO descriptors. * ak8975 - Convert to GPIO descriptors. * ADIS library and drivers - Expand scope of txrx_lock to cover all state and rename as state_lock - Add unlocked read / write to allow grouping of consecutive calls under single lock / unlock. - Add unlocked check_status, reset to allow grouping under single lock / unlock. - Remove remaining uses of core mlock for local state protection. mlock should never be used directly as it protects tightly defined core IIO device management state. * adis16240 - Enforce only supported SPI mode on driver load + add DT binding doc. * atlas-ph-sensor - Rename to atlas-sensor given it now covers things beyond ph sensors. * bma180 - Use local dev variable to tidy up code. - Use c99 style explicity .member assignment to make driver more readable. * bmp280 - Drop ACPI support. No evidence this was used and appropriate ID is not registered. - Allow ACPI to bind device via PRP0001 * dmaengine buffer - Use dma_request_chan instead of dma_request_slave_channel_reason as that ABI is going away. - Add module info to avoid tainting the kernel. * hts221 - Avoid magic number defines when only used to fill structure elements that are self describing. * lm3533 - Drop a stray semicolon. * max9611 - Cleanup enum handling to be more resilient to future changes. * mpu6050 - Delete MPU9150 from supported SPI devices as doesn't provide SPI. - Select I2C_MUX again after kbuild issue fixed elsewhere. * stm32-timer - Drop an unnecessary register update. * ssp_sensors - Convert to GPIO descriptors. * st_sensors - drop !CONFIG_ACPI defines as ACPI_PTR() will stop them being used anyway. - Make default platform data structures __maybe_unsued. - Fill in some missing kernel-doc function parameters. * st_lsm6dsx - white space fixes. - Mark some constants that aren't always used as __maybe_unused. - Drop of ID table guards as they just pervent use under ACPI. - Switch to device properties to allow ACPI usage. * st_uvis25 - Drop acpi.h include as no ACPI APIs used. * ti-ads1015 - Drop legacy platform data as no one seems to be using it. - Use the device property API instead of OF specific. * ti-ads7950 - typo fix in error message. * tag 'iio-for-5.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (99 commits) iio: accel: bma180: BMA254 support iio: pressure: bmp280: Allow device to be enumerated from ACPI iio: pressure: bmp280: Drop ACPI support dt-bindings: iio: adc: convert sd modulator to json-schema iio: buffer: rename 'read_first_n' callback to 'read' iio: buffer-dmaengine: Report buffer length requirements bindings: iio: pressure: Add documentation for dlh driver dt-bindings: Add asc vendor iio: pressure: Add driver for DLH pressure sensors iio: buffer-dmaengine: Add module information iio: accel: bma180: Use explicit member assignment iio: accel: bma180: Basic regulator support iio: accel: bma180: Add dev helper variable iio: imu: st_lsm6dsx: enable sensor-hub support for lsm6dsm iio: imu: st_lsm6dsx: rename st_lsm6dsx_shub_read_reg in st_lsm6dsx_shub_read_output iio: imu: st_lsm6dsx: check if shub_output reg is located in primary page iio: imu: st_lsm6dsx: check if pull_up is located in primary page iio: imu: st_lsm6dsx: check if master_enable is located in primary page iio: imu: st_lsm6dsx: export max num of slave devices in st_lsm6dsx_shub_settings iio: light: remove unneeded semicolon ... commit b637124800a157c4df3699d1137d8533394f7678 Author: Pierre-Louis Bossart Date: Wed Jan 8 11:54:33 2020 -0600 soundwire: stream: remove redundant pr_err traces Only keep pr_err to flag critical configuration errors that will typically only happen during system integration. For errors on prepare/deprepare/enable/disable, the caller can do a much better job with more information on the DAI and device that caused the issue. Suggested-by: Cezary Rojewski Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200108175438.13121-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit fdb827e4a3f84cb92e286a821114ac0ad79c8281 Author: YueHaibing Date: Tue Jan 7 09:49:56 2020 +0800 scsi: lpfc: Make lpfc_defer_acc_rsp static Fix sparse warning: drivers/scsi/lpfc/lpfc_nportdisc.c:344:1: warning: symbol 'lpfc_defer_acc_rsp' was not declared. Should it be static? Link: https://lore.kernel.org/r/20200107014956.41748-1-yuehaibing@huawei.com Reported-by: Hulk Robot Reviewed-by: James Smart Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit d04a07a8dc93dfc40b3a41c977db78ba340f209d Author: Fabien Parent Date: Fri Jan 3 15:24:45 2020 +0100 drm/mediatek: Fix indentation in Makefile Fix indentation in the Makefile by replacing spaces with tabs. Signed-off-by: Fabien Parent Signed-off-by: CK Hu commit b6b1bb980ec4e82bbef9b4c98efbb0df6740bb53 Author: Mark Yacoub Date: Wed Dec 11 10:49:01 2019 -0500 drm/mediatek: Turn off Alpha bit when plane format has no alpha This change enables XR24 format to be displayed as an overlay on top of the primary plane. Suggested-by: Sean Paul To: CK Hu To: dri-devel@lists.freedesktop.org Cc: Daniele Castagna Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Matthias Brugger Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Mark Yacoub Signed-off-by: CK Hu commit 039cf36cbff95d19673699a6ce6f019908de1ce8 Author: Mark Yacoub Date: Wed Dec 11 10:49:00 2019 -0500 drm/mediatek: Return from mtk_ovl_layer_config after mtk_ovl_layer_off If the plane pending state is disabled, call mtk_ovl_layer_off then return. This guarantees that that the state is valid for all operations when the pending state is enabled. Suggested-by: Sean Paul To: CK Hu To: dri-devel@lists.freedesktop.org Cc: Daniele Castagna Cc: Philipp Zabel Cc: David Airlie Cc: Daniel Vetter Cc: Matthias Brugger Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Mark Yacoub Reviewed-by: Sean Paul Signed-off-by: CK Hu commit 84abcf1234bbfbcc0b8749bcf9c9ca01525eea50 Author: Yongqiang Niu Date: Fri Dec 13 15:28:52 2019 +0800 drm/mediatek: Add ctm property support Add ctm property support Signed-off-by: Yongqiang Niu Signed-off-by: Hsin-Yi Wang Signed-off-by: CK Hu commit 4cebc1de506fa753301266a5a23bb21bca52ad3a Author: Yongqiang Niu Date: Fri Dec 13 15:28:51 2019 +0800 drm/mediatek: Add gamma property according to hardware capability If there is no gamma function in the crtc display path, don't add gamma property for crtc Fixes: 2f3f4dda747c ("drm/mediatek: Add gamma correction.") Signed-off-by: Yongqiang Niu Signed-off-by: Hsin-Yi Wang Signed-off-by: CK Hu commit f41aa387a7896c193b384c5fb531cd2cb9e00128 Merge: 492ab0205f50 965b9fee28d0 Author: Alexei Starovoitov Date: Thu Jan 9 21:55:08 2020 -0800 Merge branch 'selftest-makefile-cleanup' Andrii Nakryiko says: ==================== Fix issues with bpf_helper_defs.h usage in selftests/bpf. As part of that, fix the way clean up is performed for libbpf and selftests/bpf. Some for Makefile output clean ups as well. ==================== Signed-off-by: Alexei Starovoitov commit 965b9fee28d062c79a5fdaa3dfbe04c5129ee63d Author: Andrii Nakryiko Date: Thu Jan 9 21:17:16 2020 -0800 selftests/bpf: Further clean up Makefile output Further clean up Makefile output: - hide "entering directory" messages; - silvence sub-Make command echoing; - succinct MKDIR messages. Also remove few test binaries that are not produced anymore from .gitignore. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200110051716.1591485-4-andriin@fb.com commit 6910d7d3867a8e65eaecb18a9527ecc9eb2e5edf Author: Andrii Nakryiko Date: Thu Jan 9 21:17:15 2020 -0800 selftests/bpf: Ensure bpf_helper_defs.h are taken from selftests dir Reorder includes search path to ensure $(OUTPUT) and $(CURDIR) go before libbpf's directory. Also fix bpf_helpers.h to include bpf_helper_defs.h in such a way as to leverage includes search path. This allows selftests to not use libbpf's local and potentially stale bpf_helper_defs.h. It's important because selftests/bpf's Makefile only re-generates bpf_helper_defs.h in seltests' output directory, not the one in libbpf's directory. Also force regeneration of bpf_helper_defs.h when libbpf.a is updated to reduce staleness. Fixes: fa633a0f8919 ("libbpf: Fix build on read-only filesystems") Reported-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200110051716.1591485-3-andriin@fb.com commit 2031af28a42f18cc65ec3aa85b4e5cfdf5ee0fe8 Author: Andrii Nakryiko Date: Thu Jan 9 21:17:14 2020 -0800 libbpf,selftests/bpf: Fix clean targets Libbpf's clean target should clean out generated files in $(OUTPUT) directory and not make assumption that $(OUTPUT) directory is current working directory. Selftest's Makefile should delegate cleaning of libbpf-generated files to libbpf's Makefile. This ensures more robust clean up. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200110051716.1591485-2-andriin@fb.com commit 492ab0205f500ebd20b4f0c9e95a1ba007b0c542 Author: Andrii Nakryiko Date: Thu Jan 9 19:42:46 2020 -0800 libbpf: Make bpf_map order and indices stable Currently, libbpf re-sorts bpf_map structs after all the maps are added and initialized, which might change their relative order and invalidate any bpf_map pointer or index taken before that. This is inconvenient and error-prone. For instance, it can cause .kconfig map index to point to a wrong map. Furthermore, libbpf itself doesn't rely on any specific ordering of bpf_maps, so it's just an unnecessary complication right now. This patch drops sorting of maps and makes their relative positions fixed. If efficient index is ever needed, it's better to have a separate array of pointers as a search index, instead of reordering bpf_map struct in-place. This will be less error-prone and will allow multiple independent orderings, if necessary (e.g., either by section index or by name). Fixes: 166750bc1dd2 ("libbpf: Support libbpf-provided extern variables") Reported-by: Martin KaFai Lau Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200110034247.1220142-1-andriin@fb.com commit 1c46a2cf2dbd3146ae4a804d058679600cf6f0b9 Merge: c53cf10ef6d9 8ce156deca71 Author: Martin K. Petersen Date: Fri Jan 10 00:14:46 2020 -0500 Merge tag 'block-ioctl-cleanup-5.6' into 5.6/scsi-queue Pull compat_ioctl cleanup from Arnd. Here's his description: This series concludes the work I did for linux-5.5 on the compat_ioctl() cleanup, killing off fs/compat_ioctl.c and block/compat_ioctl.c by moving everything into drivers. Overall this would be a reduction both in complexity and line count, but as I'm also adding documentation the overall number of lines increases in the end. My plan was originally to keep the SCSI and block parts separate. This did not work easily because of interdependencies: I cannot do the final SCSI cleanup in a good way without first addressing the CDROM ioctls, so this is one series that I hope could be merged through either the block or the scsi git trees, or possibly both if you can pull in the same branch. The series comes in these steps: 1. clean up the sg v3 interface as suggested by Linus. I have talked about this with Doug Gilbert as well, and he would rebase his sg v4 patches on top of "compat: scsi: sg: fix v3 compat read/write interface" 2. Actually moving handlers out of block/compat_ioctl.c and block/scsi_ioctl.c into drivers, mixed in with cleanup patches 3. Document how to do this right. I keep getting asked about this, and it helps to point to some documentation file. The branch is based on another one that fixes a couple of bugs found during the creation of this series. Changes since v3: https://lore.kernel.org/lkml/20200102145552.1853992-1-arnd@arndb.de/ - Move sr_compat_ioctl fixup to correct patch (Ben Hutchings) - Add Reviewed-by tags Changes since v2: https://lore.kernel.org/lkml/20191217221708.3730997-1-arnd@arndb.de/ - Rebase to v5.5-rc4, which contains the earlier bugfixes - Fix sr_block_compat_ioctl() error handling bug found by Ben Hutchings - Fix idecd_locked_compat_ioctl() compat_ptr() bug - Don't try to handle HDIO_DRIVE_TASKFILE in drivers/ide - More documentation improvements Changes since v1: https://lore.kernel.org/lkml/20191211204306.1207817-1-arnd@arndb.de/ - move out the bugfixes into a branch for itself - clean up scsi sg driver further as suggested by Christoph Hellwig - avoid some ifdefs by moving compat_ptr() out of asm/compat.h - split out the blkdev_compat_ptr_ioctl function; bug spotted by Ben Hutchings - Improve formatting of documentation Signed-off-by: Martin K. Petersen commit 9f120e7659b022c790416a3409dfdb54b4a775d5 Merge: 6b3acfc3cc3d 8b69a803814b Author: David S. Miller Date: Thu Jan 9 18:41:42 2020 -0800 Merge branch 'mptcp-prereq' Mat Martineau says: ==================== Multipath TCP: Prerequisites v6 -> v7: Rename/move ULP clone helper to make inline-friendly (patch 5) v5 -> v6: Fix BPF accessors for sk_type and sk_protocol (patch 2), fix the width of an __unused bitfield (patch 6), and add some commit message and comment text (patches 5 & 7). v4 -> v5: Cover letter subject fix. No changes to commits. v3 -> v4: Update coalesce/collapse of incoming MPTCP skbs (patch 7) v2 -> v3: Ensure sk_type alignment in struct sock (patch 2) v1 -> v2: sk_pacing_shift left as a regular struct member (patch 2), and modified SACK space check based on recent -net fix (patch 9). The MPTCP upstreaming community has been collaborating on an upstreamable MPTCP implementation that complies with RFC 8684. A minimal set of features to comply with the specification involves a sizeable set of code changes, so David requested that we split this work in to multiple, smaller patch sets to build up MPTCP infrastructure. The minimal MPTCP feature set we are proposing for review in the v5.6 timeframe begins with these three parts: Part 1 (this patch set): MPTCP prerequisites. Introduce some MPTCP definitions, additional ULP and skb extension features, TCP option space checking, and a few exported symbols. Part 2: Single subflow implementation and self tests. Part 3: Switch from MPTCP v0 (RFC 6824) to MPTCP v1 (new RFC 8684, publication expected in the next few days). Additional patches for multiple subflow support, path management, active backup, and other features are in the pipeline for submission after making progress with the above reviews. Clone/fetch: https://github.com/multipath-tcp/mptcp_net-next.git (tag: netdev-v7-part1) Browse: https://github.com/multipath-tcp/mptcp_net-next/tree/netdev-v7-part1 Thank you for your review. You can find us at mptcp@lists.01.org and https://is.gd/mptcp_upstream ==================== Signed-off-by: David S. Miller commit 8b69a803814bb8b14155ea60df83f6d57527e69e Author: Paolo Abeni Date: Thu Jan 9 07:59:24 2020 -0800 skb: add helpers to allocate ext independently from sk_buff Currently we can allocate the extension only after the skb, this change allows the user to do the opposite, will simplify allocation failure handling from MPTCP. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit e66b2f31a068dd67172008459678821a79e4ea24 Author: Paolo Abeni Date: Thu Jan 9 07:59:23 2020 -0800 tcp: clean ext on tx recycle Otherwise we will find stray/unexpected/old extensions value on next iteration. On tcp_write_xmit() we can end-up splitting an already queued skb in two parts, via tso_fragment(). The newly created skb can be allocated via the tx cache and an upper layer will not be aware of it, so that upper layer cannot set the ext properly. Resetting the ext on recycle ensures that stale data is not propagated in to packet headers or elsewhere. An alternative would be add an additional hook in tso_fragment() or in sk_stream_alloc_skb() to init the ext for upper layers that need it. Co-developed-by: Florian Westphal Signed-off-by: Florian Westphal Signed-off-by: Paolo Abeni Reviewed-by: Eric Dumazet Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 9cfcca2389d7e07647ee69950f46ab5e6dfe03ac Author: Mat Martineau Date: Thu Jan 9 07:59:22 2020 -0800 tcp: Check for filled TCP option space before SACK Update the SACK check to work with zero option space available, a case that's possible with MPTCP but not MD5+TS. Maintained only one conditional branch for insufficient SACK space. v1 -> v2: - Moves the check inside the SACK branch by taking recent SACK fix: 9424e2e7ad93 (tcp: md5: fix potential overestimation of TCP option space) in to account, but modifies it to work in MPTCP scenarios beyond the MD5+TS corner case. Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Reviewed-by: Eric Dumazet Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 35b2c32116091ef87a15c604cac363da8322a288 Author: Mat Martineau Date: Thu Jan 9 07:59:21 2020 -0800 tcp: Export TCP functions and ops struct MPTCP will make use of tcp_send_mss() and tcp_push() when sending data to specific TCP subflows. tcp_request_sock_ipvX_ops and ipvX_specific will be referenced during TCP subflow creation. Co-developed-by: Peter Krystad Signed-off-by: Peter Krystad Reviewed-by: Eric Dumazet Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 85712484110df308215077be6ee21c4e57d7dec2 Author: Mat Martineau Date: Thu Jan 9 07:59:20 2020 -0800 tcp: coalesce/collapse must respect MPTCP extensions Coalesce and collapse of packets carrying MPTCP extensions is allowed when the newer packet has no extension or the extensions carried by both packets are equal. This allows merging of TSO packet trains and even cross-TSO packets, and does not require any additional action when moving data into existing SKBs. v3 -> v4: - allow collapsing, under mptcp_skb_can_collapse() constraint v5 -> v6: - clarify MPTCP skb extensions must always be cleared at allocation time Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 3ee17bc78e0f3fdeff9890993e8f3a9f5145163b Author: Mat Martineau Date: Thu Jan 9 07:59:19 2020 -0800 mptcp: Add MPTCP to skb extensions Add enum value for MPTCP and update config dependencies v5 -> v6: - fixed '__unused' field size Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 1323059301c8f36d933876233516245d882346a6 Author: Mat Martineau Date: Thu Jan 9 07:59:18 2020 -0800 tcp, ulp: Add clone operation to tcp_ulp_ops If ULP is used on a listening socket, icsk_ulp_ops and icsk_ulp_data are copied when the listener is cloned. Sometimes the clone is immediately deleted, which will invoke the release op on the clone and likely corrupt the listening socket's icsk_ulp_data. The clone operation is invoked immediately after the clone is copied and gives the ULP type an opportunity to set up the clone socket and its icsk_ulp_data. The MPTCP ULP clone will silently fallback to plain TCP on allocation failure, so 'clone()' does not need to return an error code. v6 -> v7: - move and rename ulp clone helper to make it inline-friendly v5 -> v6: - clarified MPTCP clone usage in commit message Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit c74a39c861aeaf6b789b7abdbb3256f54c9fb365 Author: Mat Martineau Date: Thu Jan 9 07:59:17 2020 -0800 tcp: Add MPTCP option number TCP option 30 is allocated for MPTCP by the IANA. Reviewed-by: Eric Dumazet Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit faf391c3826cd29feae02078ca2022d2f912f7cc Author: Mat Martineau Date: Thu Jan 9 07:59:16 2020 -0800 tcp: Define IPPROTO_MPTCP To open a MPTCP socket with socket(AF_INET, SOCK_STREAM, IPPROTO_MPTCP), IPPROTO_MPTCP needs a value that differs from IPPROTO_TCP. The existing IPPROTO numbers mostly map directly to IANA-specified protocol numbers. MPTCP does not have a protocol number allocated because MPTCP packets use the TCP protocol number. Use private number not used OTA. Reviewed-by: Eric Dumazet Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit bf9765145b856fa2e238a5b8a54453795ba30ad6 Author: Mat Martineau Date: Thu Jan 9 07:59:15 2020 -0800 sock: Make sk_protocol a 16-bit value Match the 16-bit width of skbuff->protocol. Fills an 8-bit hole so sizeof(struct sock) does not change. Also take care of BPF field access for sk_type/sk_protocol. Both of them are now outside the bitfield, so we can use load instructions without further shifting/masking. v5 -> v6: - update eBPF accessors, too (Intel's kbuild test robot) v2 -> v3: - keep 'sk_type' 2 bytes aligned (Eric) v1 -> v2: - preserve sk_pacing_shift as bit field (Eric) Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: bpf@vger.kernel.org Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit e9cdced78dc20c1592c1fb98ed064943007a46c5 Author: Mat Martineau Date: Thu Jan 9 07:59:14 2020 -0800 net: Make sock protocol value checks more specific SK_PROTOCOL_MAX is only used in two places, for DECNet and AX.25. The limits have more to do with the those protocol definitions than they do with the data type of sk_protocol, so remove SK_PROTOCOL_MAX and use U8_MAX directly. Reviewed-by: Eric Dumazet Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 6b3acfc3cc3d54a99cc5148960edfc38c94a93f2 Author: Li RongQing Date: Thu Jan 9 08:59:56 2020 +0800 flow_dissector: fix document for skb_flow_get_icmp_tci using correct input parameter name to fix the below warning: net/core/flow_dissector.c:242: warning: Function parameter or member 'thoff' not described in 'skb_flow_get_icmp_tci' net/core/flow_dissector.c:242: warning: Excess function parameter 'toff' description in 'skb_flow_get_icmp_tci' Signed-off-by: Li RongQing Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 5e0fcc16e5c563fd8f16738efec974f81e0a5ea0 Author: Vijay Khemka Date: Wed Jan 8 15:43:40 2020 -0800 net/ncsi: Support for multi host mellanox card Multi host Mellanox cards require MAC affinity to be set before receiving any config commands. All config commands should also have unicast address for source address in command header. Adding GMA and SMAF(Set Mac Affinity) for Mellanox card and call these in channel probe state machine if it is defined in device tree. Signed-off-by: Vijay Khemka Signed-off-by: David S. Miller commit 2cab57e0653f684dc8bd0c1495c5ee32a211af82 Author: Dejin Zheng Date: Wed Jan 8 21:56:49 2020 +0800 net: stmmac: pci: remove the duplicate code of set phy_mask All members of mdio_bus_data are cleared to 0 when it was obtained by devm_kzalloc(). so It doesn't need to set phy_mask as 0 again. Signed-off-by: Dejin Zheng Signed-off-by: David S. Miller commit c1c95a46ed1535292801b5ee05aa60e6dfbadf94 Merge: e42617b825f8 8040bf4091cd Author: Stephen Boyd Date: Thu Jan 9 16:11:57 2020 -0800 Merge tag 'clk-renesas-for-v5.6-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 SPIBSC (SPI FLASH) clock on RZ/A2 - Prepare for split of R-Car H3 ES1.x and ES2.0+ config symbols * tag 'clk-renesas-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: Prepare for split of R-Car H3 config symbol dt-bindings: clock: renesas: cpg-mssr: Fix r8a774b1 typo clk: renesas: r7s9210: Add SPIBSC clock clk: renesas: rcar-gen3: Allow changing the RPC[D2] clocks clk: renesas: Remove use of ARCH_R8A7796 clk: renesas: rcar-gen2: Change multipliers and dividers to u8 commit 6ae2bfd3df06b59aa1b15e25b9656900b15a8880 Author: Alan Maguire Date: Mon Jan 6 22:28:23 2020 +0000 kunit: update documentation to describe module-based build Documentation should describe how to build kunit and tests as modules. Co-developed-by: Knut Omang Signed-off-by: Knut Omang Signed-off-by: Alan Maguire Reviewed-by: Stephen Boyd Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 9fe124bf1b7788058ecfe5778fea1660b01e3e9c Author: Alan Maguire Date: Mon Jan 6 22:28:22 2020 +0000 kunit: allow kunit to be loaded as a module Making kunit itself buildable as a module allows for "always-on" kunit configuration; specifying CONFIG_KUNIT=m means the module is built but only used when loaded. Kunit test modules will load kunit.ko as an implicit dependency, so simply running "modprobe my-kunit-tests" will load the tests along with the kunit module and run them. Co-developed-by: Knut Omang Signed-off-by: Knut Omang Signed-off-by: Alan Maguire Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 1c024d45151b51c8f8d4749e65958b0bcf3e7c52 Author: Alan Maguire Date: Mon Jan 6 22:28:21 2020 +0000 kunit: remove timeout dependence on sysctl_hung_task_timeout_seconds In discussion of how to handle timeouts, it was noted that if sysctl_hung_task_timeout_seconds is exceeded for a kunit test, the test task will be killed and an oops generated. This should suffice as a means of debugging such timeout issues for now. Hence remove use of sysctl_hung_task_timeout_secs, which has the added benefit of avoiding the need to export that symbol from the core kernel. Co-developed-by: Knut Omang Signed-off-by: Knut Omang Signed-off-by: Alan Maguire Reviewed-by: Stephen Boyd Acked-by: Brendan Higgins Signed-off-by: Shuah Khan commit c475c77d5b56398303e726969e81208196b3aab3 Author: Alan Maguire Date: Mon Jan 6 22:28:20 2020 +0000 kunit: allow kunit tests to be loaded as a module As tests are added to kunit, it will become less feasible to execute all built tests together. By supporting modular tests we provide a simple way to do selective execution on a running system; specifying CONFIG_KUNIT=y CONFIG_KUNIT_EXAMPLE_TEST=m ...means we can simply "insmod example-test.ko" to run the tests. To achieve this we need to do the following: o export the required symbols in kunit o string-stream tests utilize non-exported symbols so for now we skip building them when CONFIG_KUNIT_TEST=m. o drivers/base/power/qos-test.c contains a few unexported interface references, namely freq_qos_read_value() and freq_constraints_init(). Both of these could be potentially defined as static inline functions in include/linux/pm_qos.h, but for now we simply avoid supporting module build for that test suite. o support a new way of declaring test suites. Because a module cannot do multiple late_initcall()s, we provide a kunit_test_suites() macro to declare multiple suites within the same module at once. o some test module names would have been too general ("test-test" and "example-test" for kunit tests, "inode-test" for ext4 tests); rename these as appropriate ("kunit-test", "kunit-example-test" and "ext4-inode-test" respectively). Also define kunit_test_suite() via kunit_test_suites() as callers in other trees may need the old definition. Co-developed-by: Knut Omang Signed-off-by: Knut Omang Signed-off-by: Alan Maguire Reviewed-by: Brendan Higgins Acked-by: Theodore Ts'o # for ext4 bits Acked-by: David Gow # For list-test Reported-by: kbuild test robot Signed-off-by: Shuah Khan commit 9bbb11c6be4623e38fdef8af0178c174acded9a6 Author: Alan Maguire Date: Mon Jan 6 22:28:19 2020 +0000 kunit: hide unexported try-catch interface in try-catch-impl.h Define function as static inline in try-catch-impl.h to allow it to be used in kunit itself and tests. Also remove unused kunit_generic_try_catch Co-developed-by: Knut Omang Signed-off-by: Knut Omang Signed-off-by: Alan Maguire Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 109fb06fdc6f6788df7dfbc235f7636a38e28fd4 Author: Alan Maguire Date: Mon Jan 6 22:28:18 2020 +0000 kunit: move string-stream.h to lib/kunit string-stream interfaces are not intended for external use; move them from include/kunit to lib/kunit accordingly. Co-developed-by: Knut Omang Signed-off-by: Knut Omang Signed-off-by: Alan Maguire Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 0ce5ebd24d25f02c73940f047b12733d84b125e8 Author: Thomas Bogendoerfer Date: Thu Jan 9 11:34:29 2020 +0100 mfd: ioc3: Add driver for SGI IOC3 chip SGI IOC3 chip has integrated ethernet, keyboard and mouse interface. It also supports connecting a SuperIO chip for serial and parallel interfaces. IOC3 is used inside various SGI systemboards and add-on cards with different equipped external interfaces. Support for ethernet and serial interfaces were implemented inside the network driver. This patchset moves out the not network related parts to a new MFD driver, which takes care of card detection, setup of platform devices and interrupt distribution for the subdevices. Serial portion: Acked-by: Greg Kroah-Hartman Acked-for-MFD-by: Lee Jones Network part: Reviewed-by: Jakub Kicinski Network part: Acked-by: Jakub Kicinski Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: James Hogan Cc: David S. Miller Cc: Jiri Slaby Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-serial@vger.kernel.org commit 10cf8300ecada10f4bd6c9be78439cce98ae6d8b Author: Thomas Bogendoerfer Date: Thu Jan 9 11:34:28 2020 +0100 MIPS: SGI-IP27: fix readb/writeb addressing Our chosen byte swapping, which is what firmware already uses, is to do readl/writel by normal lw/sw intructions (data invariance). This also means we need to mangle addresses for u8 and u16 accesses. The mangling for 16bit has been done aready, but 8bit one was missing. Correcting this causes different addresses for accesses to the SuperIO and local bus of the IOC3 chip. This is fixed by changing byte order in ioc3 and m48rtc_rtc structs. Acked-by: Alexandre Belloni Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: David S. Miller Cc: Alessandro Zummo Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-rtc@vger.kernel.org commit 2634e5a651e74efc415b2eff37116fcb8206b614 Author: Thomas Bogendoerfer Date: Thu Jan 9 11:34:27 2020 +0100 MIPS: PCI: Support mapping of INTB/C/D for pci-xtalk-bridge Implented mapping of PCI INTB/C/D, which is needed for PCI multifunction devices, PCI-PCI bridges and IOC3. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit d96ee783e33d661a58788eaaf0cd9ae040c79d5a Author: Thomas Bogendoerfer Date: Thu Jan 9 13:33:51 2020 +0100 MIPS: SGI-IP27: No need for slice_map per_cpu_init is called exactly once for every CPU. So there is no need for protection via slice_map. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit d31f9e64898be28ebe9da4b5a0030f2ec4a0912c Author: Thomas Bogendoerfer Date: Thu Jan 9 13:33:50 2020 +0100 MIPS: SGI-IP27: Store cpu speed when scanning for CPUs and use it later Remember CPU speed while scanning for available CPUs to avoid looking it up a second time when printing CPU speed. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 78691e4f17af55d786fe71a5771e5932dd50c319 Author: Thomas Bogendoerfer Date: Thu Jan 9 13:33:49 2020 +0100 MIPS: SGI-IP27: Only reserve interrupts used in Linux Reduce number of reserved interrupts by removing bits copied from IRIX and not used by Linux. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 9d0aaf98dc24db12d44642ca47c5c200183fc3a8 Author: Thomas Bogendoerfer Date: Thu Jan 9 13:33:48 2020 +0100 MIPS: SGI-IP27: Move all shared IP27 declarations to ip27-common.h Move all IP27 declarations into one file. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 524c4e1fd412d122c2e2707c0b49f959c31a1dd2 Author: Thomas Bogendoerfer Date: Thu Jan 9 13:33:47 2020 +0100 MIPS: SGI-IP27: Use specific get_region_shift IP35 has a different way to find out regions, so we move the IP27 implementation to IP27 specific file. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 2c616e9f03dbe291debc367f7c9a18cc34c3cfbe Author: Thomas Bogendoerfer Date: Thu Jan 9 13:33:46 2020 +0100 MIPS: SGI-IP27: Use structs for decoding error status registers Convert printing of error status registers to use structs, which are defines for IP27 and IP35. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit db96e058b4b3e349bd4a41f236bc27f1c9d545f0 Author: Thomas Bogendoerfer Date: Thu Jan 9 13:33:45 2020 +0100 MIPS: SGI-IP27: Use union instead of typedef The upcoming header files for SGI-IP35 shouldn't add new typedef. To be able to share ip27-hubio.c we need to access register layouts no longer via a typedef. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit aa2d74f9b389986e379d665594936e6efd6fe085 Author: Thomas Bogendoerfer Date: Thu Jan 9 13:33:44 2020 +0100 MIPS: SGI-IP27: Split kldir.h into generic SN and IP27 parts SGI-IP35 uses slightly different memory layout, so we move IP27 defines to IP27 specific files and keep the common stuff in kldir.h Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit e9d2eb9934816951a9461f1cc94ef5fd88803a64 Author: Thomas Bogendoerfer Date: Thu Jan 9 13:33:43 2020 +0100 MIPS: SGI-IP27: Move get_nasid() to a IP27 specific file get_nasid() will be different for SGI-IP35, therefore move IP27 implementation to IP27 specific file. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 58fd034db3a9bdd46052efebc45ffe9f130ea2b9 Author: Thomas Bogendoerfer Date: Thu Jan 9 13:33:42 2020 +0100 MIPS: SGI-IP27: move IP27 specific macro to IP27 specific header file Extracting node id from HUB register is specific to IP27 alias SN0. Move the macro definition to a SN0 header file. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 5388b58143eae288cb5dfbbf797beff50ff6567f Author: Thomas Bogendoerfer Date: Thu Jan 9 13:33:41 2020 +0100 MIPS: SGI-IP27: get rid of asm/sn/sn0/ip27.h The only piece needed in ip27.h is SEND_NMI. Move the define to the only place where it's used and remove ip27.h Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit b78e9d63a3b6307b6b786e6ba189d3978b60ceb5 Author: Thomas Bogendoerfer Date: Thu Jan 9 13:33:40 2020 +0100 MIPS: SGI-IP27: use asm/sn/agent.h for including HUB related stuff By including agent.h where hub related defines/structs are needed, we have only one place to select, which agent chip (HUB or BEDROCK) is used. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit d6972bb477544bea3fa0124ae88fd9a9d131a213 Author: Thomas Bogendoerfer Date: Thu Jan 9 13:33:39 2020 +0100 MIPS: SGI-IP27: use cpu physid already present while scanning for CPUs By using cpu physid already present when scanning for CPUs get_cpu_slice() is unsued and can be removed together with two other then used functions. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 2d11e6a4ff5070aa3e62e43010b2e39eea596f76 Author: Thomas Bogendoerfer Date: Thu Jan 9 13:33:38 2020 +0100 MIPS: SGI-IP27: use nodemask instead of cpumask Replication is done on a per node basis, so the use of cpumask was a misusage here. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 4d944bcd4e731ab7bfe8d01a7041ea0ebdc090f1 Author: Mike Salvatore Date: Tue Nov 5 16:43:29 2019 -0800 apparmor: add AppArmor KUnit tests for policy unpack Add KUnit tests to test AppArmor unpacking of userspace policies. AppArmor uses a serialized binary format for loading policies. To find policy format documentation see Documentation/admin-guide/LSM/apparmor.rst. In order to write the tests against the policy unpacking code, some static functions needed to be exposed for testing purposes. One of the goals of this patch is to establish a pattern for which testing these kinds of functions should be done in the future. Signed-off-by: Brendan Higgins Signed-off-by: Mike Salvatore Acked-by: John Johansen Reviewed-by: Kees Cook Signed-off-by: Shuah Khan commit 192c197cbca599321de95a4cf15c2fa0681140d3 Author: Dan Carpenter Date: Wed Jan 8 08:46:29 2020 +0300 selftests: Uninitialized variable in test_cgcore_proc_migration() The "c_threads" variable is used in the error handling code before it has been initialized Fixes: 11318989c381 ("selftests: cgroup: Add task migration tests") Signed-off-by: Dan Carpenter Acked-by: Michal Koutný Signed-off-by: Shuah Khan commit 9edb435aed968a2c792f6d847f524587697edf37 Author: Alex Deucher Date: Wed Jan 8 22:21:30 2020 -0500 drm/dp_mst: fix documentation of drm_dp_mst_add_affected_dsc_crtcs the parameter is the mst manager, not the port. Reviewed-by: Mikita Lipski Signed-off-by: Alex Deucher commit d9fe1a4c560b70547e3f47520310f6d57d4d1626 Author: Alex Deucher Date: Tue Jan 7 23:04:04 2020 -0500 drm/amdgpu/display: protect new DSC code with CONFIG_DRM_AMD_DC_DCN Otherwise we get undefined symbols. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit c908b1c4bb56c27fa6fbb48e2d3dbebdad366706 Author: David (Dingchen) Zhang Date: Fri Dec 6 17:56:37 2019 -0500 drm: add dp helper to initialize remote aux channel. [why] We need to minimally initialize the remote aux channel, e.g. the crc work struct of remote aux to dump the sink's DPRX CRCs in MST setup. [how] Add helper that only initializes the crc work struct of the remote aux, hooke crc work queue to 'drm_dp_aux_crc_work'. Then call this helper in DP MST port initialization. This, plus David Francis' patch [1], fix the issue of MST remote aux DPCD CRCs read. [1] https://patchwork.kernel.org/patch/11217941/ Cc: Leo Li Cc: Harry Wentland Signed-off-by: David (Dingchen) Zhang Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 44be939ff7ac5858f0dbd8a2a4af1fe198e14db1 Author: Mikita Lipski Date: Tue Nov 12 09:14:15 2019 -0500 drm/amd/display: Trigger modesets on MST DSC connectors Whenever a connector on an MST network is attached, detached, or undergoes a modeset, the DSC configs for each stream on that topology will be recalculated. This can change their required bandwidth, requiring a full reprogramming, as though a modeset was performed, even if that stream did not change timing. Therefore, whenever a crtc has drm_atomic_crtc_needs_modeset, for each crtc that shares a MST topology with that stream and supports DSC, add that crtc (and all affected connectors and planes) to the atomic state and set mode_changed on its state v2: Do this check only on Navi and before adding connectors and planes on modesetting crtcs v3: Call the drm_dp_mst_add_affected_dsc_crtcs() to update all affected CRTCs Reviewed-by: Lyude Paul Signed-off-by: David Francis Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit 8ec046716ca8ee79a9d2699f78511c08753c2e56 Author: Mikita Lipski Date: Sat Nov 16 13:32:15 2019 -0500 drm/dp_mst: Add helper to trigger modeset on affected DSC MST CRTCs [why] Whenever a connector on an MST network is changed or undergoes a modeset, the DSC configs for each stream on that topology will be recalculated. This can change their required bandwidth, requiring a full reprogramming, as though a modeset was performed, even if that stream did not change timing. [how] Adding helper to trigger modesets on MST DSC connectors by setting mode_changed flag on CRTCs in the same topology as affected connector v2: use drm_dp_mst_dsc_aux_for_port function to verify if the port is DSC capable v3: - added _must_check attribute - removed topology manager check - fix typos and indentations Reviewed-by: Lyude Paul Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit 29b9ba74f6384a81594e479b3f1750868c72f356 Author: Mikita Lipski Date: Tue Nov 12 14:52:14 2019 -0500 drm/amd/display: Recalculate VCPI slots for new DSC connectors [why] Since for DSC MST connector's PBN is claculated differently due to compression, we have to recalculate both PBN and VCPI slots for that connector. [how] The function iterates through all the active streams to find, which have DSC enabled, then recalculates PBN for it and calls drm_dp_helper_update_vcpi_slots_for_dsc to update connector's VCPI slots. v2: - use drm_dp_mst_atomic_enable_dsc per port to enable/disable DSC v3: - Iterate through connector states from the state passed - On each connector state get stream from dc_state, instead CRTC state Reviewed-by: Lyude Paul Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit 34d95c3d5f687e4de8266bcdceb8b4694fe7105a Author: Mikita Lipski Date: Tue Jan 7 11:25:54 2020 -0500 drm/amd/display: Check return value of drm helper If driver fails to update update VCPI allocation during compute_mst_dsc_configs_for_state - fail the function by return early. Signed-off-by: Mikita Lipski Acked-by: Alex Deucher Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit 8c20a1ed9b4ff25c67f6c1771a4e1195b5221cce Author: David Francis Date: Wed Jun 19 14:49:19 2019 -0400 drm/amd/display: MST DSC compute fair share If there is limited link bandwidth on a MST network, it must be divided fairly between the streams on that network Implement an algorithm to determine the correct DSC config for each stream The algorithm: This [ ] ( ) represents the range of bandwidths possible for a given stream. The [] area represents the range of DSC configs, and the () represents no DSC. The bandwidth used increases from left to right. First, try disabling DSC on all streams [ ] (|) [ ] (|) Check this against the bandwidth limits of the link and each branch (including each endpoint). If it passes, the job is done Second, try maximum DSC compression on all streams that support DSC [| ] ( ) [| ] ( ) If this does not pass, then enabling this combination of streams is impossible Otherwise, divide the remaining bandwidth evenly amongst the streams [ | ] ( ) [ | ] ( ) If one or more of the streams reach minimum compression, evenly divide the reamining bandwidth amongst the remaining streams [ |] ( ) [ |] ( ) [ | ] ( ) [ | ] ( ) If all streams can reach minimum compression, disable compression greedily [ |] ( ) [ |] ( ) [ ] (|) Perform this algorithm on each full update, on each MST link with at least one DSC stream on it After the configs are computed, call dcn20_add_dsc_to_stream_resource on each stream with DSC enabled. It is only after all streams are created that we can know which of them will need DSC. Do all of this at the end of amdgpu atomic check. If it fails, fail check; This combination of timings cannot be supported. v2: Use drm_dp_mst_atomic_check to validate bw for certain dsc configurations v3: Use dc_dsc_policy structure to get min and max bpp rate for DSC configuration Acked-by: Lyude Paul Reviewed-by: Wenjing Liu Signed-off-by: David Francis Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit dcade880e342407fb76bdf4529b886c3ebedc6b3 Author: Mikita Lipski Date: Sat Nov 16 15:45:37 2019 -0500 drm/amd/display: Add PBN per slot calculation for DSC [why] Need to calculate VCPI slots differently for DSC to take in account current link rate, link count and FEC. [how] Add helper to get pbn_div from dc_link Acked-by: Lyude Paul Reviewed-by: Leo Li Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit 9e5b959036ff76dda397998d1185b0ec0ae58568 Author: Mikita Lipski Date: Fri Dec 13 10:29:48 2019 -0500 drm/dp_mst: Rename drm_dp_mst_atomic_check_topology_state [why] drm_dp_mst_atomic_check_topology_state() should be renamed to reflect more specific type of check. Since it is verifying payload allocation limit it should be renamed into drm_dp_mst_atomic_check_vcpi_alloc_limit() Reviewed-by: Lyude Paul Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit cd82d82cbc0484e47918d3166f356c98f0066db8 Author: Mikita Lipski Date: Wed Nov 6 13:11:23 2019 -0500 drm/dp_mst: Add branch bandwidth validation to MST atomic check [why] Adding PBN attribute to drm_dp_vcpi_allocation structure to keep track of how much bandwidth each Port requires. Adding drm_dp_mst_atomic_check_bw_limit to verify that state's bandwidth needs doesn't exceed available bandwidth. The funtion is called in drm_dp_mst_atomic_check after drm_dp_mst_atomic_check_topology_state to fully verify that the proposed topology is supported. v2: Fixing some typos and indenting v3: Return correct error enums if no bw space available Reviewed-by: Lyude Paul Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit 8afb7e6afadb36b160143794c1d2fdfbde189750 Author: Mikita Lipski Date: Mon Oct 28 17:33:32 2019 -0400 drm/dp_mst: Add DSC enablement helpers to DRM Adding a helper function to be called by drivers outside of DRM to enable DSC on the MST ports. Function is called to recalculate VCPI allocation if DSC is enabled and raise the DSC flag to enable. In case of disabling DSC the flag is set to false and recalculation of VCPI slots is expected to be done in encoder's atomic_check. v2: squash separate functions into one and call it per port v3: Fix comment typos Reviewed-by: Lyude Paul Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit 1c6c1cb5afc77cc8afbe563937c3bd1a41172459 Author: Mikita Lipski Date: Thu Nov 14 16:24:29 2019 -0500 drm/dp_mst: Manually overwrite PBN divider for calculating timeslots [why] For DSC case we cannot use topology manager's PBN divider variable. The default divider does not take FEC into account. Therefore the driver has to calculate its own divider based on the link rate and lane count its handling, as it is hw specific. [how] Pass pbn_div as an argument, which is used if its more than zero, otherwise default topology manager's pbn_div will be used. Reviewed-by: Lyude Paul Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit f9c8742c66e4b8180db4085555ace9f0775221ae Author: David Francis Date: Wed Jun 19 14:48:16 2019 -0400 drm/amd/display: Write DSC enable to MST DPCD Rework the dm_helpers_write_dsc_enable callback to handle the MST case. Use the cached dsc_aux field. Reviewed-by: Wenjing Liu Signed-off-by: David Francis Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit ec0ca697dd0e573657d7070d1d392faba44acd4d Author: David Francis Date: Wed Jun 19 14:47:33 2019 -0400 drm/amd/display: Validate DSC caps on MST endpoints During MST mode enumeration, if a new dc_sink is created, populate it with dsc caps as appropriate. Use drm_dp_mst_dsc_aux_for_port to get the raw caps, then parse them onto dc_sink with dc_dsc_parse_dsc_dpcd. Reviewed-by: Wenjing Liu Signed-off-by: David Francis Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit b6adc57cff616da18ff8cff028d2ddf585c97334 Author: David Francis Date: Fri Aug 16 13:43:46 2019 -0400 drm/amd/display: Initialize DSC PPS variables to 0 For DSC MST, sometimes monitors would break out in full-screen static. The issue traced back to the PPS generation code, where these variables were being used uninitialized and were picking up garbage. memset to 0 to avoid this Reviewed-by: Nicholas Kazlauskas Signed-off-by: David Francis Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit 5b03f9d86880711441c5681244d352212460a595 Author: Mikita Lipski Date: Fri Sep 20 15:44:56 2019 -0400 drm/dp_mst: Add new quirk for Synaptics MST hubs Synaptics DP1.4 hubs (BRANCH_ID 0x90CC24) do not support virtual DPCD registers, but do support DSC. The DSC caps can be read from the physical aux, like in SST DSC. These hubs have many different DEVICE_IDs. Add a new quirk to detect this case. v2: Fix error when checking return of drm_dp_read_desc Reviewed-by: Wenjing Liu Reviewed-by: Lyude Paul Signed-off-by: David Francis Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit c2bc1b6eabe65d6bf26a892d803907dca9097311 Author: David Francis Date: Mon Aug 26 09:50:28 2019 -0400 drm/dp_mst: Add helpers for MST DSC and virtual DPCD aux Add drm_dp_mst_dsc_aux_for_port. To enable DSC, the DSC_ENABLED register might have to be written on the leaf port's DPCD, its parent's DPCD, or the MST manager's DPCD. This function finds the correct aux for the job. As part of this, add drm_dp_mst_is_virtual_dpcd. Virtual DPCD is a DP feature new in DP v1.4, which exposes certain DPCD registers on virtual ports. v2: Remember to unlock mutex on all paths v3: Refactor to match coding style and increase brevity v4: - Check DSC capable MST sink connected directly to the device. - Check branch's port_parent to be set Cc: Lyude Paul Reviewed-by: Wenjing Liu Signed-off-by: David Francis Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit b1dee9a716b532566570052686144bfbba62aaf6 Author: David Francis Date: Thu Jul 25 11:47:46 2019 -0400 drm/dp_mst: Fill branch->num_ports This field on drm_dp_mst_branch was never filled It is initialized to zero when the port is kzallocced. When a port is added to the list, increment num_ports, and when a port is removed from the list, decrement num_ports. v2: remember to decrement on port removal v3: don't explicitly init to 0 v4: move decrement of num_ports to unlink_port function Reviewed-by: Lyude Paul Reviewed-by: Harry Wentland Signed-off-by: David Francis Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit 2f221a5efed4cb369dc53cbbae3ba03fcf2ede49 Author: David Francis Date: Wed Jun 19 14:46:15 2019 -0400 drm/dp_mst: Add MST support to DP DPCD R/W functions Instead of having drm_dp_dpcd_read/write and drm_dp_mst_dpcd_read/write as entry points into the aux code, have drm_dp_dpcd_read/write handle both. This means that DRM drivers can make MST DPCD read/writes. v2: Fix spacing v3: Dump dpcd access on MST read/writes v4: Fix calling wrong function on DPCD write v5: delete deprecated include of drmP.h Reviewed-by: Lyude Paul Reviewed-by: Harry Wentland Signed-off-by: David Francis Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit a3c2b0ffc007e5d98f5313ed951fff092535fb6d Author: David Francis Date: Thu Jun 6 11:20:10 2019 -0400 drm/dp_mst: Parse FEC capability on MST ports As of DP1.4, ENUM_PATH_RESOURCES returns a bit indicating if FEC can be supported up to that point in the MST network. The bit is the first byte of the ENUM_PATH_RESOURCES ack reply, bottom-most bit (refer to section 2.11.9.4 of DP standard, v1.4) That value is needed for FEC and DSC support Store it on drm_dp_mst_port Reviewed-by: Lyude Paul Reviewed-by: Harry Wentland Signed-off-by: David Francis Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit dc48529fb14ee8450705c00d91f4dcc155e1c2cb Author: David Francis Date: Wed Aug 21 10:33:26 2019 -0400 drm/dp_mst: Add PBN calculation for DSC modes With DSC, bpp can be fractional in multiples of 1/16. Change drm_dp_calc_pbn_mode to reflect this, adding a new parameter bool dsc. When this parameter is true, treat the bpp parameter as having units not of bits per pixel, but 1/16 of a bit per pixel v2: Don't add separate function for this v3: In the equation divide bpp by 16 as it is expected not to leave any remainder v4: Added DSC test parameters for selftest Reviewed-by: Manasi Navare Reviewed-by: Lyude Paul Reviewed-by: Harry Wentland Signed-off-by: David Francis Signed-off-by: Mikita Lipski Signed-off-by: Alex Deucher commit 36366e367ee93ced84fddb8fae6675e12985f5a4 Author: Paul Burton Date: Thu Dec 5 10:23:18 2019 -0800 MIPS: BPF: Restore MIPS32 cBPF JIT Commit 716850ab104d ("MIPS: eBPF: Initial eBPF support for MIPS32 architecture.") enabled our eBPF JIT for MIPS32 kernels, whereas it has previously only been availailable for MIPS64. It was my understanding at the time that the BPF test suite was passing & JITing a comparable number of tests to our cBPF JIT [1], but it turns out that was not the case. The eBPF JIT has a number of problems on MIPS32: - Most notably various code paths still result in emission of MIPS64 instructions which will cause reserved instruction exceptions & kernel panics when run on MIPS32 CPUs. - The eBPF JIT doesn't account for differences between the O32 ABI used by MIPS32 kernels versus the N64 ABI used by MIPS64 kernels. Notably arguments beyond the first 4 are passed on the stack in O32, and this is entirely unhandled when JITing a BPF_CALL instruction. Stack space must be reserved for arguments even if they all fit in registers, and the callee is free to assume that stack space has been reserved for its use - with the eBPF JIT this is not the case, so calling any function can result in clobbering values on the stack & unpredictable behaviour. Function arguments in eBPF are always 64-bit values which is also entirely unhandled - the JIT still uses a single (32-bit) register per argument. As a result all function arguments are always passed incorrectly when JITing a BPF_CALL instruction, leading to kernel crashes or strange behavior. - The JIT attempts to bail our on use of ALU64 instructions or 64-bit memory access instructions. The code doing this at the start of build_one_insn() incorrectly checks whether BPF_OP() equals BPF_DW, when it should really be checking BPF_SIZE() & only doing so when BPF_CLASS() is one of BPF_{LD,LDX,ST,STX}. This results in false positives that cause more bailouts than intended, and that in turns hides some of the problems described above. - The kernel's cBPF->eBPF translation makes heavy use of 64-bit eBPF instructions that the MIPS32 eBPF JIT bails out on, leading to most cBPF programs not being JITed at all. Until these problems are resolved, revert the removal of the cBPF JIT performed by commit 716850ab104d ("MIPS: eBPF: Initial eBPF support for MIPS32 architecture."). Together with commit f8fffebdea75 ("MIPS: BPF: Disable MIPS32 eBPF JIT") this restores MIPS32 BPF JIT behavior back to the same state it was prior to the introduction of the broken eBPF JIT support. [1] https://lore.kernel.org/linux-mips/MWHPR2201MB13583388481F01A422CE7D66D4410@MWHPR2201MB1358.namprd22.prod.outlook.com/ Signed-off-by: Paul Burton Fixes: 716850ab104d ("MIPS: eBPF: Initial eBPF support for MIPS32 architecture.") Cc: Daniel Borkmann Cc: Hassan Naveed Cc: Tony Ambardar Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 0a1eb761ff30cdc089bcc94e1bd540b6956487c5 Author: Claudiu Beznea Date: Wed Jan 8 14:55:19 2020 +0200 dt-bindings: spi_atmel: add microchip,sam9x60-spi Add microchip,sam9x60-spi to DT bindings documentation. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1578488123-26127-13-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Mark Brown commit 603e92ff10a81b965ac41dc9fb3d287408e834fb Author: Lukas Wunner Date: Thu Jan 9 13:23:41 2020 +0100 spi: bcm2835: Raise maximum number of slaves to 4 The "RevPi Connect Flat" PLC offered by KUNBUS has 4 slaves attached to the BCM2835 SPI master. Raise the maximum number of slaves in the driver accordingly. Signed-off-by: Lukas Wunner Reviewed-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/01453fd062de2d49bd74a847e13a0781cbf8143d.1578572268.git.lukas@wunner.de Signed-off-by: Mark Brown commit 6501c1f54a172fb0a4a9413eb62ab672ab3d8e7c Author: Saravanan Sekar Date: Thu Jan 9 20:53:46 2020 +0100 regulator: mpq7920: add mpq7920 regulator driver Adding regulator driver for the device mpq7920. The MPQ7920 PMIC device contains four DC-DC buck converters and five regulators, is designed for automotive and accessed over I2C. Fixed sparse warning reported on this patch Reported-by: kbuild test robot Signed-off-by: Saravanan Sekar Link: https://lore.kernel.org/r/20200109195346.30270-1-sravanhome@gmail.com Signed-off-by: Mark Brown commit 50816a4c39263913d8cfd1ee32f90102679606c6 Author: Sameer Pujar Date: Thu Jan 9 10:39:50 2020 +0530 regmap: add iopoll-like atomic polling macro This patch adds a macro 'regmap_read_poll_timeout_atomic' that works similar to 'readx_poll_timeout_atomic' defined in linux/iopoll.h; This is atomic version of already available 'regmap_read_poll_timeout' macro. It should be noted that above atomic macro cannot be used by all regmaps. If the regmap is set up for atomic use (flat or no cache and MMIO) then only it can use. Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1578546590-24737-1-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit 320b8b0d13b81f3697acff5b6ddb47f88a09c118 Author: Shuming Fan Date: Fri Dec 27 13:44:45 2019 +0800 ASoC: rt711: add rt711 codec driver This is the initial codec driver for rt711. Signed-off-by: Shuming Fan Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191227054445.27223-1-shumingf@realtek.com Signed-off-by: Mark Brown commit c23ff4b3ba6547e857427524a5ba577d56249b0d Merge: a0aab9e1404a 09f6a72d0143 Author: Mark Brown Date: Thu Jan 9 21:21:51 2020 +0000 Merge tag 'sdw_interfaces_5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into asoc-5.6 SoundWire tag for ASoC This contains the recently merged soundwire interface changes for ASoC subsystem. commit a0aab9e1404ac9f8a300b4546cac3c38e04d07bf Author: Srinivas Kandagatla Date: Tue Jan 7 13:59:29 2020 +0000 ASoC: codecs: add wsa881x amplifier support This patch adds support to WSA8810/WSA8815 Class-D Smart Speaker Amplifier. This Amplifier is primarily interfaced with SoundWire. One WSA is used for mono speaker configuration and second one would give stereo setup. This patch is tested on SDM845 based DragonBoard DB845c and Lenovo YOGA C630 Laptop based on SDM850 with WSA8815 speaker amplifiers. Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200107135929.3267-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit fbcdf32f6b54266132c6697a80f49c0c494b8877 Author: Srinivas Kandagatla Date: Tue Jan 7 13:59:28 2020 +0000 dt-bindings: ASoC: Add WSA881x bindings This patch adds bindings for WSA8810/WSA8815 Class-D Smart Speaker Amplifier. This Amplifier also has a simple thermal sensor for over temperature and speaker protection. Signed-off-by: Srinivas Kandagatla Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200107135929.3267-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 8801eb48400675332ce082a754ffc687b283595e Author: Chen Zhou Date: Thu Jan 9 09:23:03 2020 +0800 drm/i915/gtt: add missing include file asm/smp.h Fix build error: drivers/gpu/drm/i915/gt/intel_ggtt.c: In function ggtt_restore_mappings: drivers/gpu/drm/i915/gt/intel_ggtt.c:1239:3: error: implicit declaration of function wbinvd_on_all_cpus; did you mean wrmsr_on_cpus? [-Werror=implicit-function-declaration] wbinvd_on_all_cpus(); ^~~~~~~~~~~~~~~~~~ wrmsr_on_cpus Reported-by: Hulk Robot Signed-off-by: Chen Zhou Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200109012303.153001-1-chenzhou10@huawei.com commit 0f899fd466b693a129b16994c1b2b4db2fcde4a4 Author: Felix Kuehling Date: Wed Dec 4 21:23:08 2019 -0500 drm/amdkfd: Improve kfd_process lookup in kfd_ioctl Use filep->private_data to store a pointer to the kfd_process data structure. Take an extra reference for that, which gets released in the kfd_release callback. Check that the process calling kfd_ioctl is the same that opened the file descriptor. Return -EBADF if it's not, so that this error can be distinguished in user mode. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Signed-off-by: Alex Deucher commit d9db07f088af01a1080d01de363141b673c7d646 Author: Sricharan R Date: Thu Jan 9 13:35:21 2020 +0530 clk: qcom: Add ipq6018 Global Clock Controller support This patch adds support for the global clock controller found on the ipq6018 based devices. Also fixed the sparse warnings reported by, Reported-by: kbuild test robot Co-developed-by: Anusha Canchi Ramachandra Rao Signed-off-by: Anusha Canchi Ramachandra Rao Co-developed-by: Abhishek Sahu Signed-off-by: Abhishek Sahu Co-developed-by: Sivaprakash Murugesan Signed-off-by: Sivaprakash Murugesan Signed-off-by: Sricharan R Link: https://lkml.kernel.org/r/1578557121-423-3-git-send-email-sricharan@codeaurora.org Signed-off-by: Stephen Boyd commit d15b1ff1bd5b5f11b6bc857290ae5fc084aabdf8 Author: Sricharan R Date: Thu Jan 9 13:35:20 2020 +0530 clk: qcom: Add DT bindings for ipq6018 gcc clock controller Add the compatible strings and the include file for ipq6018 gcc clock controller. Co-developed-by: Anusha Canchi Ramachandra Rao Signed-off-by: Anusha Canchi Ramachandra Rao Co-developed-by: Abhishek Sahu Signed-off-by: Abhishek Sahu Co-developed-by: Sivaprakash Murugesan Signed-off-by: Sivaprakash Murugesan Reviewed-by: Rob Herring Signed-off-by: Sricharan R Link: https://lkml.kernel.org/r/1578557121-423-2-git-send-email-sricharan@codeaurora.org Signed-off-by: Stephen Boyd commit eb7537d88eeb9c78171fa17167f8577735d0bf86 Merge: a2d6d7ae591c 4dab08df3b08 Author: David S. Miller Date: Thu Jan 9 12:35:53 2020 -0800 Merge branch 'mlxsw-Firmware-version-updates' Ido Schimmel says: ==================== mlxsw: Firmware version updates This patch sets contains two firmware-related updates. Patch #1 bumps the required firmware version in order to support 2x50 Gb/s split on SN3800 systems. Patch #2 changes the driver to only enforce a minimum required firmware version, which should allow us to reduce the frequency in which we need to update the driver. ==================== Signed-off-by: David S. Miller commit 4dab08df3b08ec236f9a159393741626546d1f95 Author: Ido Schimmel Date: Thu Jan 9 21:27:22 2020 +0200 mlxsw: spectrum: Only require minimum firmware version Currently, the driver ensures that the firmware version found on the device matches the branch of the required version. Remove this limitation so that the driver will accept the required version or a newer version, from any branch. This will allow us to reduce the frequency in which we need to update the required version. New firmware versions that include necessary bug fixes will be able to work with the driver, even if they are not from the required branch. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 22895f8a0ef2d6b66eaa20eae2653c45410f9e51 Author: Ido Schimmel Date: Thu Jan 9 21:27:21 2020 +0200 mlxsw: spectrum: Update firmware version to xx.2000.2714 The version adds support for 2x50 Gb/s port split option on SN3800 systems. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit dde8010be0a0ed9823cc1ddf75ef8448910821a9 Author: Changqi Du Date: Wed Jan 8 23:40:19 2020 -0500 Bluetooth: btbcm : Fix warning about missing blank lines after declarations This patches fixes two warnings of checkpatch.pl, both of the type WARNING: Missing a blank line after declarations Signed-off-by: Changqi Du Signed-off-by: Marcel Holtmann commit a2d6d7ae591c47ebc04926cb29a840adfdde49e6 Merge: b1daa4d19473 e69ec487b2c7 Author: David S. Miller Date: Thu Jan 9 12:10:26 2020 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net The ungrafting from PRIO bug fixes in net, when merged into net-next, merge cleanly but create a build failure. The resolution used here is from Petr Machata. Signed-off-by: David S. Miller commit 44c58c520ffc4b1f75241e5029c5ae6b223d0623 Author: Miquel Raynal Date: Thu Jan 9 19:40:37 2020 +0100 drm/panel: simple: Add Satoz SAT050AT40H12R2 panel support Add support for the Satoz SAT050AT40H12R2 panel. Signed-off-by: Miquel Raynal Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200109184037.9091-2-miquel.raynal@bootlin.com commit 923eb18667ab3c8e875c7915716736005bb705ff Author: Miquel Raynal Date: Thu Jan 9 19:40:36 2020 +0100 dt-bindings: display: simple: Add Satoz panel Satoz is a Chinese TFT manufacturer. Website: http://www.sat-sz.com/English/index.html Add the compatible for its SAT050AT40H12R2 5.0 inch LCD panel. Signed-off-by: Miquel Raynal Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200109184037.9091-1-miquel.raynal@bootlin.com commit ea78979d302f7de9bbd59f9dafdb070ecb05ec39 Author: Lakshmi Ramasubramanian Date: Wed Jan 8 08:05:08 2020 -0800 IMA: fix measuring asymmetric keys Kconfig As a result of the asymmetric public keys subtype Kconfig option being defined as tristate, with the existing IMA Makefile, ima_asymmetric_keys.c could be built as a kernel module. To prevent this from happening, this patch defines and uses an intermediate Kconfig boolean option named IMA_MEASURE_ASYMMETRIC_KEYS. Signed-off-by: Lakshmi Ramasubramanian Suggested-by: James.Bottomley Cc: David Howells Cc: Jarkko Sakkinen Reported-by: kbuild test robot # ima_asymmetric_keys.c is built as a kernel module. Fixes: 88e70da170e8 ("IMA: Define an IMA hook to measure keys") Fixes: cb1aa3823c92 ("KEYS: Call the IMA hook to measure keys") [zohar@linux.ibm.com: updated patch description] Signed-off-by: Mimi Zohar commit b1daa4d194731ab484fb22742506dd25ad1a5628 Merge: 43ad352dc820 b69f7a3e53ff Author: David S. Miller Date: Thu Jan 9 10:58:35 2020 -0800 Merge branch 'sfc-more-code-refactoring' Alex Maftei says: ==================== sfc: more code refactoring Splitting more of the driver code into different files, which will later be used in another driver for a new product. This is a continuation to my previous patch series. There will be another series and a stand-alone patch as well after this. This series in particular covers MCDI (management controller driver interface) code. ==================== Signed-off-by: David S. Miller commit b69f7a3e53ff4bc966e56b62af955fdfa10ffa7d Author: Alex Maftei (amaftei) Date: Thu Jan 9 15:45:45 2020 +0000 sfc: move MCDI logging device attribute A few bits were extracted from other functions. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit b5775b476ef7b28a3895335a2b8533e10ba36b16 Author: Alex Maftei (amaftei) Date: Thu Jan 9 15:45:29 2020 +0000 sfc: conditioned some functionality Before calling certain function pointers, check that they are non-NULL. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 8da92642050df4d466cacd04bbb1d6232b070022 Author: Alex Maftei (amaftei) Date: Thu Jan 9 15:45:15 2020 +0000 sfc: move MCDI receive queue management code One function's prototype was changed in the header. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 8ee4c907725cb09e1872dd4203e0a4266dd7e637 Author: Alex Maftei (amaftei) Date: Thu Jan 9 15:44:59 2020 +0000 sfc: move MCDI transmit queue management code A function was split, the others were renamed. Code style fixes included. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 4438b587fe4bcddb64ecc44f8f1f3ddce834d645 Author: Alex Maftei (amaftei) Date: Thu Jan 9 15:44:43 2020 +0000 sfc: move MCDI event queue management code A function was split, the others were renamed. Code style fixes included. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 37a5f9dceb15ff56e5240bbc2f6c63b00aab768a Author: Alex Maftei (amaftei) Date: Thu Jan 9 15:44:27 2020 +0000 sfc: move MCDI VI alloc/free code One function was renamed here, the other contains code extracted from another. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 1cf0f76adac1615f7e65bb4388ca3c1677720662 Author: Alex Maftei (amaftei) Date: Thu Jan 9 15:44:12 2020 +0000 sfc: move more MCDI port code Various functions dealing with flow control, forward error correction, polling, port number, and PHY testing. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 1a8d88a8b71b9f51ae3c6a3178ed9531f1c76ef2 Author: Alex Maftei (amaftei) Date: Thu Jan 9 15:43:59 2020 +0000 sfc: move some MCDI port utility functions They just convert between different sets of flags/registers. Some block comments were adjusted. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit a2ba4b971a69b1d96b41953ac7fa17bdcd823baa Author: Alex Maftei (amaftei) Date: Thu Jan 9 15:43:44 2020 +0000 sfc: move some port link state/caps code The moved code handles MCDI port link state and capabilities. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 7cb41b1d14e139f7f4247fc29af25e59139bc1ac Author: Darrick J. Wong Date: Tue Jan 7 16:11:30 2020 -0800 xfs: remove bogus assertion when online repair isn't enabled We don't need to assert on !REPAIR in the stub version of xrep_calc_ag_resblks that is called when online repair hasn't been compiled into the kernel because none of the repair code will ever run. Reported-by: Eryu Guan Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit d29f781c32b1d1366c8ac10be31dad1e1f39c336 Author: Allison Henderson Date: Tue Jan 7 15:26:15 2020 -0800 xfs: Remove all strlen in all xfs_attr_* functions for attr names. This helps to pre-simplify the extra handling of the null terminator in delayed operations which use memcpy rather than strlen. Later when we introduce parent pointers, attribute names will become binary, so strlen will not work at all. Removing uses of strlen now will help reduce complexities later Signed-off-by: Allison Collins Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 780d29057781d986cd87dbbe232cd02876ad430f Author: Christoph Hellwig Date: Tue Jan 7 15:25:39 2020 -0800 xfs: fix misuse of the XFS_ATTR_INCOMPLETE flag XFS_ATTR_INCOMPLETE is a flag in the on-disk attribute format, and thus in a different namespace as the ATTR_* flags in xfs_da_args.flags. Switch to using a XFS_DA_OP_INCOMPLETE flag in op_flags instead. Without this users might be able to inject this flag into operations using the attr by handle ioctl. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 8cde9f259c7d91d05b12cc68993a9643d6b4e45f Author: Christoph Hellwig Date: Tue Jan 7 15:25:38 2020 -0800 xfs: also remove cached ACLs when removing the underlying attr We should not just invalidate the ACL when setting the underlying attribute, but also when removing it. The ioctl interface gets that right, but the normal xattr inteface skipped the xfs_forget_acl due to an early return. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 84fd081f8ae92e05ace47d24e58f26f7af2994c7 Author: Christoph Hellwig Date: Tue Jan 7 15:25:38 2020 -0800 xfs: reject invalid flags combinations in XFS_IOC_ATTRMULTI_BY_HANDLE While the flags field in the ABI and the on-disk format allows for multiple namespace flags, that is a logically invalid combination that scrub complains about. Reject it at the ioctl level, as all other interface already get this right at higher levels. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 953aa9d136f53e226448dbd801a905c28f8071bf Author: Christoph Hellwig Date: Tue Jan 7 15:25:37 2020 -0800 xfs: clear kernel only flags in XFS_IOC_ATTRMULTI_BY_HANDLE Don't allow passing arbitrary flags as they change behavior including memory allocation that the call stack is not prepared for. Fixes: ddbca70cc45c ("xfs: allocate xattr buffer on demand") Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 43ad352dc8207015972bfc91f5d23ea4307f8ff1 Author: Milind Parab Date: Thu Jan 9 08:36:46 2020 +0000 net: macb: add support for C45 MDIO read/write This patch modify MDIO read/write functions to support communication with C45 PHY. Signed-off-by: Milind Parab Reviewed-by: Andrew Lunn Acked-by: Nicolas Ferre Signed-off-by: David S. Miller commit a127e690b051df030f5ad2e28b14e8c3a624c145 Author: Thierry Reding Date: Sun Dec 22 15:10:32 2019 +0100 memory: tegra: Add support for the Tegra194 memory controller The memory and external memory controllers on Tegra194 are very similar to their predecessors from Tegra186. Add the necessary SoC-specific data to support the newer versions. Signed-off-by: Thierry Reding commit 4e04b88633ae9cb38d6bc1d7fd37d2782eab726d Author: Thierry Reding Date: Sun Dec 22 15:10:31 2019 +0100 memory: tegra: Only include support for enabled SoCs The memory client tables can be fairly large and they can easily be omitted if support for the corresponding SoC is not enabled. Signed-off-by: Thierry Reding commit 52d15dd23f0b0f1d1cf87b1581cc5f1f8c22eb0c Author: Thierry Reding Date: Sun Dec 22 15:10:30 2019 +0100 memory: tegra: Support DVFS on Tegra186 and later Add a Tegra186 (and later) EMC driver that reads the EMC DVFS tables from BPMP and uses the EMC clock to change the external memory clock. This currently only provides a debugfs interface to show the available frequencies and set lower and upper limits of the allowed range. This can be used for testing the various frequencies. The goal is to eventually integrate this with the interconnect framework so that the EMC frequency can be scaled based on demand from memory clients. Signed-off-by: Thierry Reding commit 7b5372ba04ca1caabed1470d4ec23001cde2eb91 Author: Ben Dooks (Codethink) Date: Wed Dec 18 13:35:25 2019 +0000 vfio: platform: fix __iomem in vfio_platform_amdxgbe.c The ioaddr should have __iomem marker on it, so add that to fix the following sparse warnings: drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:33:44: warning: incorrect type in argument 2 (different address spaces) drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:33:44: expected void volatile [noderef] *addr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:33:44: got void * drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:34:33: warning: incorrect type in argument 1 (different address spaces) drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:34:33: expected void const volatile [noderef] *addr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:34:33: got void * drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:44:44: warning: incorrect type in argument 2 (different address spaces) drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:44:44: expected void volatile [noderef] *addr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:44:44: got void * drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:45:33: warning: incorrect type in argument 2 (different address spaces) drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:45:33: expected void volatile [noderef] *addr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:45:33: got void * drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:69:41: warning: incorrect type in argument 1 (different address spaces) drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:69:41: expected void *ioaddr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:69:41: got void [noderef] *ioaddr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:71:30: warning: incorrect type in argument 1 (different address spaces) drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:71:30: expected void *ioaddr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:71:30: got void [noderef] *ioaddr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:76:49: warning: incorrect type in argument 1 (different address spaces) drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:76:49: expected void *ioaddr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:76:49: got void [noderef] *ioaddr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:85:37: warning: incorrect type in argument 1 (different address spaces) drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:85:37: expected void *ioaddr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:85:37: got void [noderef] *ioaddr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:87:30: warning: incorrect type in argument 1 (different address spaces) drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:87:30: expected void *ioaddr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:87:30: got void [noderef] *ioaddr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:90:30: warning: incorrect type in argument 1 (different address spaces) drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:90:30: expected void *ioaddr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:90:30: got void [noderef] *ioaddr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:93:30: warning: incorrect type in argument 1 (different address spaces) drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:93:30: expected void *ioaddr drivers/vfio/platform/reset/vfio_platform_amdxgbe.c:93:30: got void [noderef] *ioaddr Signed-off-by: Ben Dooks (Codethink) Acked-by: Eric Auger Signed-off-by: Alex Williamson commit e10b4f6cd89f3ac2044c8f6b4b0ddc1a48f65e09 Author: Ben Dooks (Codethink) Date: Wed Dec 18 12:31:19 2019 +0000 vfio/mdev: make create attribute static The create attribute is not exported, so make it static to avoid the following sparse warning: drivers/vfio/mdev/mdev_sysfs.c:77:1: warning: symbol 'mdev_type_attr_create' was not declared. Should it be static? Signed-off-by: Ben Dooks (Codethink) Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit 09903c5e07ac1f84cd416ee458d16106bec3f540 Author: JC Kuo Date: Fri Jan 3 16:30:18 2020 +0800 arm64: tegra: Add fuse/apbmisc node on Tegra194 This commit adds Tegra194 fuse and apbmisc device nodes. Signed-off-by: JC Kuo Signed-off-by: Thierry Reding commit 3979a4c6263397eb03c4e8995938607f4f6ba0de Author: JC Kuo Date: Fri Jan 3 16:30:17 2020 +0800 soc/tegra: fuse: Add Tegra194 support This commit adds Tegra194 fuse/apbmisc support. Signed-off-by: JC Kuo Signed-off-by: Thierry Reding commit 06c6b06f890879fa12ed5e517f70eafb54587cc7 Author: Thierry Reding Date: Wed Dec 18 10:25:01 2019 +0100 arm64: tegra: Make XUSB node consistent with the rest The ordering of properties in the XUSB node is inconsistent with the ordering of the properties in other nodes. Resort them to make the node more consistent. Also get rid of some unnecessary whitespace. Signed-off-by: Thierry Reding commit f5a98bfe7b3726ba81b45b5597b880b62260ed98 Author: Maxime Ripard Date: Fri Jan 3 16:27:58 2020 +0100 dt-bindings: display: Convert Allwinner display pipeline to schemas The Allwinner SoCs have a display engine composed of several controllers assembled differently depending on the SoC, the number and type of output they have, and the additional features they provide. A number of those are supported in Linux, with the matching bindings. Now that we have the DT validation in place, let's split into separate file and convert the device tree bindings for those controllers to schemas. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200103152801.47254-1-maxime@cerno.tech commit be9b887f3bbafcdbbfd6eb77c89c04776c63718e Author: Thierry Reding Date: Sun Dec 22 15:10:35 2019 +0100 arm64: tegra: Add the memory subsystem on Tegra194 The memory subsystem on Tegra194 encompasses both the memory and external memory controllers. The EMC is represented as a subnode of the MC and a ranges property is used to describe the register ranges. A dma-ranges property is also added to describe that all memory clients can address up to 39 bits using the memory controller client interface (MCCIF), unless otherwise limited by the DMA engines of the hardware. A memory client can technically use 40 bits of addresses, but the memory controller on Tegra194 uses bit 39 to determine the XBAR format used to access memory. Use of this bit needs to be explicitly controlled by the operating system drivers for devices that can use this on-the-fly format conversion. Using the dma-ranges property prevents the operating system from using the bit implicitly, for example in I/O virtual address mappings. Signed-off-by: Thierry Reding commit 3f6eaef9ab37d1fc42a17ba2fcbc95b3de9ed52f Author: Thierry Reding Date: Sun Dec 22 15:10:34 2019 +0100 arm64: tegra: Add external memory controller on Tegra186 Add the external memory controller as a child device of the memory controller on Tegra186. The memory controller really represents the memory subsystem that encompasses both the memory and external memory controllers. The external memory controller uses the BPMP to obtain the list of supported EMC frequencies and set the EMC frequency. Also set up the dma-ranges property to describe that all memory clients can address up to 40 bits using the memory controller client interface (MCCIF), unless otherwise limited by the DMA engines of the hardware. Signed-off-by: Thierry Reding commit b72d52a1b60bf8e4973523582fbb5be7775ab4c2 Author: Thierry Reding Date: Sun Dec 22 15:10:33 2019 +0100 arm64: tegra: Add interrupt for memory controller on Tegra186 The memory controller can be interrupted by certain conditions. Add the interrupt to the device tree node to allow drivers to trap these conditions. Signed-off-by: Thierry Reding commit 177602b006414b02152d3ef670746beb2bfde9cd Author: Thierry Reding Date: Sun Dec 22 15:10:29 2019 +0100 memory: tegra: Add system sleep support Add system suspend/resume support for the memory controller found on Tegra186 and later. This is required so that the SID registers can be reprogrammed after their content was lost during system sleep. Signed-off-by: Thierry Reding commit 6d3ba7616347d3787f361bd7f2fcf8f01bf52c2a Author: Thierry Reding Date: Sun Dec 22 15:10:28 2019 +0100 memory: tegra: Extract memory client SID programming Move programming of the memory client to SID mapping into a separate function so that it can be reused from multiple call sites. Signed-off-by: Thierry Reding commit 7d723c03e07bd8ec84a9c639c9b037f46d8b7b09 Author: Thierry Reding Date: Sun Dec 22 15:10:27 2019 +0100 memory: tegra: Add per-SoC data for Tegra186 Instead of hard-coding the memory client table, use per-SoC data in preparation for adding support for other SoCs. Signed-off-by: Thierry Reding commit 0859fe9ff50d69614f509656ab23a908cb3d1ba3 Author: Thierry Reding Date: Sun Dec 22 15:10:26 2019 +0100 memory: tegra: Rename tegra_mc to tegra186_mc on Tegra186 This is just for consistency with the rest of the driver. Signed-off-by: Thierry Reding commit 720ad00eade9d08aabaf7b130fed1817252badf5 Author: Thierry Reding Date: Sun Dec 22 15:10:25 2019 +0100 dt-bindings: memory: Add Tegra186 memory subsystem The NVIDIA Tegra186 SoC contains a memory subsystem composed of the memory controller and the external memory controller. The memory controller provides interfaces for the memory clients to access the memory. Accesses can be either bounced through the SMMU for IOVA translation or directly to the EMC. The bulk of the programming of the external memory controller happens through interfaces exposed by the BPMP. Describe this relationship by adding a phandle reference to the BPMP to the EMC node. Signed-off-by: Thierry Reding Reviewed-by: Rob Herring commit a213f9f1c35d957731a853e4758c93a758507a25 Author: Thierry Reding Date: Sun Dec 22 15:10:24 2019 +0100 dt-bindings: memory: Add Tegra194 memory controller header This header contains definitions for the memory controller found on NVIDIA Tegra194 SoCs, such as the stream IDs used for the ARM SMMU and the IDs used to identify the various memory clients. Signed-off-by: Thierry Reding Acked-by: Rob Herring commit 96b0239bbd6153b70c14c80664ebb43cd2ddacd9 Author: Thierry Reding Date: Sun Dec 22 15:10:23 2019 +0100 dt-bindings: memory: Add Tegra186 memory client IDs Add IDs for the memory clients found on NVIDIA Tegra186 SoCs. This will be used to describe interconnect paths from devices to system memory. Signed-off-by: Thierry Reding Acked-by: Rob Herring commit 8cee32b400404b7ab5219dfcbe412c90bd0c7ada Author: Thierry Reding Date: Sun Dec 22 12:40:33 2019 +0100 memory: tegra: Implement EMC debugfs interface on Tegra30 A common debugfs interface is already available on Tegra20, Tegra124, Tegra186 and Tegra194. Implement the same interface on Tegra30 to enable testing of the EMC frequency scaling code using a unified interface. Signed-off-by: Thierry Reding commit 8209eefa3d379dd453d67cd94484040216ffc68c Author: Thierry Reding Date: Sun Dec 22 12:40:32 2019 +0100 memory: tegra: Implement EMC debugfs interface on Tegra20 A common debugfs interface is already available on Tegra124, Tegra186 and Tegra194. Implement the same interface on Tegra20 to enable testing of the EMC frequency scaling code using a unified interface. Signed-off-by: Thierry Reding commit 47cd385e08eac6f48b5e1cbac6939c100fd0f3fb Author: Thierry Reding Date: Sun Dec 22 12:39:21 2019 +0100 arm64: tegra: Rename EMC on Tegra132 Rename the EMC node to external-memory-controller according to device tree best practices. Signed-off-by: Thierry Reding commit ceffd1040ac0e3e661a6604bb018897c438fb340 Author: Thierry Reding Date: Sun Dec 22 12:39:20 2019 +0100 ARM: tegra: Rename EMC on Tegra124 Rename the EMC node to external-memory-controller according to device tree best practices. Signed-off-by: Thierry Reding commit 0bab86abe5b8c0c9491d44074d8abb012aa256e3 Author: Thierry Reding Date: Sun Dec 22 12:39:19 2019 +0100 arm64: tegra: Let the EMC hardware use the EMC clock The EMC hardware block needs access to the EMC clock in order to scale the external memory frequency. Add the clocks property so that drivers for the EMC can acquire a reference to the EMC clock. Signed-off-by: Thierry Reding commit 0cebea3ab053d195f51107fb4c7a2246af602765 Author: Thierry Reding Date: Sun Dec 22 12:39:18 2019 +0100 ARM: tegra: Let the EMC hardware use the EMC clock The EMC hardware block needs access to the EMC clock in order to scale the external memory frequency. Add the clocks property so that drivers for the EMC can acquire a reference to the EMC clock. Signed-off-by: Thierry Reding commit 6b9acd935546e84e82aee72c8b169c8d5dd6fc1b Author: Thierry Reding Date: Sun Dec 22 12:39:17 2019 +0100 memory: tegra: Refashion EMC debugfs interface on Tegra124 The current debugfs interface is only partially useful. While it allows listing supported frequencies and testing individual clock rates, it is limited in that it can't be used to restrict the range of frequencies that the driver is allowed to set. This is something we may want to use to test adaptive scaling once that's implemented. Signed-off-by: Thierry Reding commit 66cb6e9d79695f831efe96227a5b5d1064872e6a Author: Thierry Reding Date: Sun Dec 22 12:39:16 2019 +0100 dt-bindings: memory-controller: Convert Tegra124 EMC to json-schema Convert the device tree bindings for the Tegra124 EMC controller to the DT schema format using json-schema. While at it, clean up the binding a little bit by removing any mention of how RAM code and clock frequency are represented in unit-addresses (which they aren't) and by adding the EMC clock without which the EMC controller can't change the frequency at which the external memory is clocked. While this is technically an ABI break (the clock was not required before), this should be fine because there isn't much that the EMC driver can do without access to the EMC clock. Signed-off-by: Thierry Reding Reviewed-by: Rob Herring commit 11d06df7b9f29ec5898901c2c94a58f4ecf60446 Author: Mao Wenan Date: Wed Dec 4 09:08:51 2019 +0800 MIPS: Loongson2ef: drop pointless static qualifier in loongson_suspend_enter() There is no need to have the 'T *v' variable static since new value always be assigned before use it. Reported-by: Hulk Robot Signed-off-by: Mao Wenan Signed-off-by: Paul Burton Cc: Cc: Cc: Cc: Cc: Cc: Cc: Cc: commit f3c560a61b4e32961738b5917674e5d9102aeb7f Author: Thomas Bogendoerfer Date: Thu Jan 9 13:23:31 2020 +0100 MIPS: mm: Place per_cpu on different nodes, if NUMA is enabled Implement placing of per_cpu into memory, which is local to the CPU. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit a14879e149c9737e9b436006bad5637ee7dfd59b Author: Thomas Bogendoerfer Date: Thu Jan 9 13:23:30 2020 +0100 MIPS: Loongson64: Fix node_distance() Local node distance is defined as LOCAL_DISTANCE, which is 10. Use the define to give back correct local distance. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Huacai Chen Cc: Jiaxun Yang Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit a20ebc047a4a300b19df79116598c8c0bd0a9d1e Author: Thomas Bogendoerfer Date: Thu Jan 9 13:23:29 2020 +0100 MIPS: SGI-IP27: Fix node_distance node_distance must return values starting from 10 up to 255. 10 means local, 255 unreachable. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Paul Burton Cc: Ralf Baechle Cc: James Hogan Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org commit 2707745533d6d38fa7d3a2212f1fd599c3879491 Author: Paul Cercueil Date: Tue Jan 7 02:06:29 2020 +0100 time/sched_clock: Disable interrupts in sched_clock_register() Instead of issueing a warning if sched_clock_register() is called from a context where IRQs are enabled, the code now ensures that IRQs are indeed disabled. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Gleixner Acked-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200107010630.954648-1-paul@crapouillou.net commit b9bb868e2fc169b7917392eb41c84bc7436a8022 Author: 周琰杰 (Zhou Yanjie) Date: Mon Dec 9 13:10:25 2019 +0800 MIPS: X1830: Add X1830 system type. 1.Add X1830 system type for cat /proc/cpuinfo to give out X1830. 2.Change "PRID_IMP_XBURST" to "PRID_IMP_XBURST_REV1" and add a new "PRID_IMP_XBURST_REV2" for new Ingenic CPUs which has XBurst with MXU2 SIMD ISA. Notice: 1."PRID_IMP_XBURST_REV2" is corresponds to the latest XBurst processor with 128bit MXU2 SIMD instruction set, not the upcoming XBurst2 processor. This version of the processors fixes issues such as BTB and HPTLB. 2.In order to simplify and reuse the code, the "c->cputype" and the "c->writecombine" and the "__cpu_name[cpu]" in the original "PRID_IMP_XBURST" (now is "PRID_IMP_XBURST_REV1") are removed, and the corresponding settings are abtained through fall-through to "PRID_IMP_XBURST_REV2", which will cause the name that was previously mistakenly called "JZRISC" to become to the real name "XBurst". Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: yamada.masahiro@socionext.com Cc: tglx@linutronix.de Cc: chenhc@lemote.com Cc: tbogendoerfer@suse.de Cc: paul.burton@mips.com Cc: paul@crapouillou.net Cc: jhogan@kernel.org Cc: fancer.lancer@gmail.com Cc: ralf@linux-mips.org Cc: jiaxun.yang@flygoat.com commit ba82f52e2287f55ae10f4123980198b6ea8a8dc6 Author: Bartosz Golaszewski Date: Thu Jan 9 17:16:36 2020 +0100 kconfig: fix an "implicit declaration of function" warning strncasecmp() & strcasecmp() functions are declared in strings.h, not string.h. On most environments the former is implicitly included by the latter but on some setups, building menuconfig results in the following warning: HOSTCC scripts/kconfig/mconf.o scripts/kconfig/mconf.c: In function ‘search_conf’: scripts/kconfig/mconf.c:423:6: warning: implicit declaration of function ‘strncasecmp’ [-Wimplicit-function-declaration] if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0) ^~~~~~~~~~~ scripts/kconfig/mconf.c: In function ‘main’: scripts/kconfig/mconf.c:1021:8: warning: implicit declaration of function ‘strcasecmp’ [-Wimplicit-function-declaration] if (!strcasecmp(mode, "single_menu")) ^~~~~~~~~~ Fix it by explicitly including strings.h. Signed-off-by: Bartosz Golaszewski Signed-off-by: Masahiro Yamada commit 0cd2c6e5701eddd29abe34b45fc69141594a9950 Author: 周琰杰 (Zhou Yanjie) Date: Tue Dec 10 20:02:43 2019 +0800 MIPS: Ingenic: Add YSH & ATIL CU Neo board support. Add a device tree for the Ingenic X1000 based YSH & ATIL CU Neo board. Signed-off-by: 周琰杰 (Zhou Yanjie) Acked-by: Paul Cercueil [paulburton@kernel.org: Drop stale mention of previously unselectable Kconfig entry.] Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: robh+dt@kernel.org Cc: paul.burton@mips.com Cc: jhogan@kernel.org Cc: mripard@kernel.org Cc: shawnguo@kernel.org Cc: mark.rutland@arm.com Cc: alexandre.belloni@bootlin.com Cc: ralf@linux-mips.org Cc: heiko@sntech.de Cc: icenowy@aosc.io Cc: ak@linux.intel.com Cc: laurent.pinchart@ideasonboard.com Cc: krzk@kernel.org Cc: geert+renesas@glider.be Cc: prasannatsmkumar@gmail.com Cc: keescook@chromium.org Cc: ebiederm@xmission.com Cc: sernia.zhou@foxmail.com Cc: zhenwenjin@gmail.com Cc: 772753199@qq.com commit 4b396e56a0b85aac2e9942b831f8eebec374bb59 Author: 周琰杰 (Zhou Yanjie) Date: Tue Dec 10 20:02:42 2019 +0800 dt-bindings: MIPS: Add Ingenic XBurst based boards. Add Ingenic XBurst based boards, prepare for later dts. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Rob Herring Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: robh+dt@kernel.org Cc: paul.burton@mips.com Cc: jhogan@kernel.org Cc: mripard@kernel.org Cc: shawnguo@kernel.org Cc: mark.rutland@arm.com Cc: alexandre.belloni@bootlin.com Cc: ralf@linux-mips.org Cc: heiko@sntech.de Cc: icenowy@aosc.io Cc: ak@linux.intel.com Cc: laurent.pinchart@ideasonboard.com Cc: krzk@kernel.org Cc: geert+renesas@glider.be Cc: paul@crapouillou.net Cc: prasannatsmkumar@gmail.com Cc: keescook@chromium.org Cc: ebiederm@xmission.com Cc: sernia.zhou@foxmail.com Cc: zhenwenjin@gmail.com Cc: 772753199@qq.com commit 9d022be3c1926b2701814a57c951500347a16a4a Author: 周琰杰 (Zhou Yanjie) Date: Tue Dec 10 20:02:41 2019 +0800 dt-bindings: Document yna vendor-prefix. The "yna" is an acronym of the "YSH & ATIL". Signed-off-by: 周琰杰 (Zhou Yanjie) Acked-by: Rob Herring Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: robh+dt@kernel.org Cc: paul.burton@mips.com Cc: jhogan@kernel.org Cc: mripard@kernel.org Cc: shawnguo@kernel.org Cc: mark.rutland@arm.com Cc: alexandre.belloni@bootlin.com Cc: ralf@linux-mips.org Cc: heiko@sntech.de Cc: icenowy@aosc.io Cc: ak@linux.intel.com Cc: laurent.pinchart@ideasonboard.com Cc: krzk@kernel.org Cc: geert+renesas@glider.be Cc: paul@crapouillou.net Cc: prasannatsmkumar@gmail.com Cc: keescook@chromium.org Cc: ebiederm@xmission.com Cc: sernia.zhou@foxmail.com Cc: zhenwenjin@gmail.com Cc: 772753199@qq.com commit 7a16ccd300c2e677df9bc3037c2493a6e768c805 Author: 周琰杰 (Zhou Yanjie) Date: Tue Dec 10 20:02:40 2019 +0800 MIPS: Ingenic: Add Ingenic X1000 support. Support the Ingenic X1000 SoC using the code under arch/mips/jz4740. This is left unselectable in Kconfig until a X1000 based board is added in a later commit. Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Paul Burton Cc: linux-mips@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: robh+dt@kernel.org Cc: paul.burton@mips.com Cc: jhogan@kernel.org Cc: mripard@kernel.org Cc: shawnguo@kernel.org Cc: mark.rutland@arm.com Cc: alexandre.belloni@bootlin.com Cc: ralf@linux-mips.org Cc: heiko@sntech.de Cc: icenowy@aosc.io Cc: ak@linux.intel.com Cc: laurent.pinchart@ideasonboard.com Cc: krzk@kernel.org Cc: geert+renesas@glider.be Cc: paul@crapouillou.net Cc: prasannatsmkumar@gmail.com Cc: keescook@chromium.org Cc: ebiederm@xmission.com Cc: sernia.zhou@foxmail.com Cc: zhenwenjin@gmail.com Cc: 772753199@qq.com commit defed0bbca2cc24b8c2ee02d79d1451d4eb95e4a Author: yu kuai Date: Wed Dec 25 21:15:20 2019 +0800 MIPS: ralink: add missing put_device in ill_acc_of_setup If of_find_device_by_node return 0 and ill_acc_of_setup return error, pdev don't have a corresponding object release. Fix it by adding put_device. Signed-off-by: yu kuai Signed-off-by: Paul Burton Cc: Cc: Cc: Cc: Cc: Cc: Cc: commit f5bfcd953d811dbb8913de36b96b38da6bb62135 Author: Andrey Ignatov Date: Tue Jan 7 17:40:06 2020 -0800 bpf: Document BPF_F_QUERY_EFFECTIVE flag Document BPF_F_QUERY_EFFECTIVE flag, mostly to clarify how it affects attach_flags what may not be obvious and what may lead to confision. Specifically attach_flags is returned only for target_fd but if programs are inherited from an ancestor cgroup then returned attach_flags for current cgroup may be confusing. For example, two effective programs of same attach_type can be returned but w/o BPF_F_ALLOW_MULTI in attach_flags. Simple repro: # bpftool c s /sys/fs/cgroup/path/to/task ID AttachType AttachFlags Name # bpftool c s /sys/fs/cgroup/path/to/task effective ID AttachType AttachFlags Name 95043 ingress tw_ipt_ingress 95048 ingress tw_ingress Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200108014006.938363-1-rdna@fb.com commit a4a8b99ec819ca60b49dc582a4287ef03411f117 Author: Jan Kara Date: Tue Jan 7 16:36:49 2020 +0100 udf: Fix free space reporting for metadata and virtual partitions Free space on filesystems with metadata or virtual partition maps currently gets misreported. This is because these partitions are just remapped onto underlying real partitions from which keep track of free blocks. Take this remapping into account when counting free blocks as well. Reviewed-by: Pali Rohár Reported-by: Pali Rohár Signed-off-by: Jan Kara commit 9c48c48cd49981051fd210b7248936b65578ce31 Author: James Hogan Date: Thu Dec 19 14:16:58 2019 +0000 MAINTAINERS: Drop James Hogan as MIPS maintainer I haven't been active for 18 months, and Paul seems to be doing a grand job, so drop me from MIPS maintainership. Signed-off-by: James Hogan Cc: Paul Burton Cc: Ralf Baechle Cc: linux-mips@vger.kernel.org Signed-off-by: Paul Burton commit 417759f7d4cf44a5fb526fbafcc9372e3dbfc0ae Merge: 65726b5b7efa 09903869f69f Author: Alexei Starovoitov Date: Thu Jan 9 08:46:19 2020 -0800 Merge branch 'tcp-bpf-cc' Martin Lau says: ==================== This series introduces BPF STRUCT_OPS. It is an infra to allow implementing some specific kernel's function pointers in BPF. The first use case included in this series is to implement TCP congestion control algorithm in BPF (i.e. implement struct tcp_congestion_ops in BPF). There has been attempt to move the TCP CC to the user space (e.g. CCP in TCP). The common arguments are faster turn around, get away from long-tail kernel versions in production...etc, which are legit points. BPF has been the continuous effort to join both kernel and userspace upsides together (e.g. XDP to gain the performance advantage without bypassing the kernel). The recent BPF advancements (in particular BTF-aware verifier, BPF trampoline, BPF CO-RE...) made implementing kernel struct ops (e.g. tcp cc) possible in BPF. The idea is to allow implementing tcp_congestion_ops in bpf. It allows a faster turnaround for testing algorithm in the production while leveraging the existing (and continue growing) BPF feature/framework instead of building one specifically for userspace TCP CC. Please see individual patch for details. The bpftool support will be posted in follow-up patches. v4: - Expose tcp_ca_find() to tcp.h in patch 7. It is used to check the same bpf-tcp-cc does not exist to guarantee the register() will succeed. - set_memory_ro() and then set_memory_x() only after all trampolines are written to the image in patch 6. (Daniel) spinlock is replaced by mutex because set_memory_* requires sleepable context. v3: - Fix kbuild error by considering CONFIG_BPF_SYSCALL (kbuild) - Support anonymous bitfield in patch 4 (Andrii, Yonghong) - Push boundary safety check to a specific arch's trampoline function (in patch 6) (Yonghong). Reuse the WANR_ON_ONCE check in arch_prepare_bpf_trampoline() in x86. - Check module field is 0 in udata in patch 6 (Yonghong) - Check zero holes in patch 6 (Andrii) - s/_btf_vmlinux/btf/ in patch 5 and 7 (Andrii) - s/check_xxx/is_xxx/ in patch 7 (Andrii) - Use "struct_ops/" convention in patch 11 (Andrii) - Use the skel instead of bpf_object in patch 11 (Andrii) - libbpf: Decide BPF_PROG_TYPE_STRUCT_OPS at open phase by using find_sec_def() - libbpf: Avoid a debug message at open phase (Andrii) - libbpf: Add bpf_program__(is|set)_struct_ops() for consistency (Andrii) - libbpf: Add "struct_ops" to section_defs (Andrii) - libbpf: Some code shuffling in init_kern_struct_ops() (Andrii) - libbpf: A few safety checks (Andrii) v2: - Dropped cubic for now. They will be reposted once there are more clarity in "jiffies" on both bpf side (about the helper) and tcp_cubic side (some of jiffies usages are being replaced by tp->tcp_mstamp) - Remove unnecssary check on bitfield support from btf_struct_access() (Yonghong) - BTF_TYPE_EMIT macro (Yonghong, Andrii) - value_name's length check to avoid an unlikely type match during truncation case (Yonghong) - BUILD_BUG_ON to ensure no trampoline-image overrun in the future (Yonghong) - Simplify get_next_key() (Yonghong) - Added comment to explain how to check mandatory func ptr in net/ipv4/bpf_tcp_ca.c (Yonghong) - Rename "__bpf_" to "bpf_struct_ops_" for value prefix (Andrii) - Add comment to highlight the bpf_dctcp.c is not necessarily the same as tcp_dctcp.c. (Alexei, Eric) - libbpf: Renmae "struct_ops" to ".struct_ops" for elf sec (Andrii) - libbpf: Expose struct_ops as a bpf_map (Andrii) - libbpf: Support multiple struct_ops in SEC(".struct_ops") (Andrii) - libbpf: Add bpf_map__attach_struct_ops() (Andrii) ==================== Signed-off-by: Alexei Starovoitov commit 5c34ba27cbbbfa61e6491309451d7bfc91507cac Author: Ville Syrjälä Date: Wed Jan 8 16:56:16 2020 +0200 drm/i915: Pass cpu_transcoder to assert_pipe_disabled() always I missed a few assert_pipe_disabled() cases when changing it to take enum transcoder instead of enum pipe, making sparse unhappy. Convert the leftovers. Reported-by: kbuild test robot Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200108145616.7349-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 099368bb10c0e340f0b236b169e8b13235e0907c Author: Jules Irenge Date: Mon Dec 16 14:42:08 2019 +0000 genirq: Add missing __must_hold() sparse annotation Add __must_hold() annotation to address the following sparse warning: warning: context imbalance in irq_wait_for_poll - unexpected unlock Signed-off-by: Jules Irenge Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191216144208.29852-2-jbi.octave@gmail.com commit 8b3b54799b99de59d25a3947d539662f47300ced Author: Jules Irenge Date: Mon Dec 16 14:42:07 2019 +0000 genirq: Add missing __releases() sparse annotation Add __releases() annotation to address the following sparse warning: warning: context imbalance in __irq_put_desc_unlock() - unexpected unlock Signed-off-by: Jules Irenge Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191216144208.29852-1-jbi.octave@gmail.com commit 7829c92b913ffa0a92da9b542b6de176969c60af Author: Ville Syrjälä Date: Wed Jan 8 16:45:50 2020 +0200 drm/i915: Fix MST disable sequence When moving the pipe disable & co. function calls from haswell_crtc_disable() into the encoder .post_disable() hooks I neglected to account for the MST vs. DDI interactions properly. This now leads us to call these functions two times for the last MST stream (once from the MST code and a second time from the DDI code). The calls from the DDI code should only be done for SST and not MST. Add the proper check for that. This results in an MCE on ICL. My vague theory is that we turn off the transcoder clock from the MST code and then we proceed to touch something in the DDI code which still depends on that clock causing the hardware to become upset. Though I can't really explain why Stan's hack of omitting the pipe disable in the MST code would avoid the MCE since we should still be turning off the transcoder clock. But maybe there's something magic in the hw that keeps the clock on as long as the pipe is on. Or maybe the clock isn't the problem and we now touch something in the DDI disable code that really does need the pipe to be still enabled. v2: Rebase to latest drm-tip Cc: José Roberto de Souza Cc: Manasi Navare Reported-by: Stanislav Lisovskiy Closes: https://gitlab.freedesktop.org/drm/intel/issues/901 Fixes: 773b4b54351c ("drm/i915: Move stuff from haswell_crtc_disable() into encoder .post_disable()") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200108144550.29280-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 09903869f69f37fd7a465183545b5739c6274654 Author: Martin KaFai Lau Date: Wed Jan 8 16:35:17 2020 -0800 bpf: Add bpf_dctcp example This patch adds a bpf_dctcp example. It currently does not do no-ECN fallback but the same could be done through the cgrp2-bpf. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200109003517.3856825-1-kafai@fb.com commit 590a0088825016ca7ec53f1aef7e84e1211778d8 Author: Martin KaFai Lau Date: Wed Jan 8 16:35:14 2020 -0800 bpf: libbpf: Add STRUCT_OPS support This patch adds BPF STRUCT_OPS support to libbpf. The only sec_name convention is SEC(".struct_ops") to identify the struct_ops implemented in BPF, e.g. To implement a tcp_congestion_ops: SEC(".struct_ops") struct tcp_congestion_ops dctcp = { .init = (void *)dctcp_init, /* <-- a bpf_prog */ /* ... some more func prts ... */ .name = "bpf_dctcp", }; Each struct_ops is defined as a global variable under SEC(".struct_ops") as above. libbpf creates a map for each variable and the variable name is the map's name. Multiple struct_ops is supported under SEC(".struct_ops"). In the bpf_object__open phase, libbpf will look for the SEC(".struct_ops") section and find out what is the btf-type the struct_ops is implementing. Note that the btf-type here is referring to a type in the bpf_prog.o's btf. A "struct bpf_map" is added by bpf_object__add_map() as other maps do. It will then collect (through SHT_REL) where are the bpf progs that the func ptrs are referring to. No btf_vmlinux is needed in the open phase. In the bpf_object__load phase, the map-fields, which depend on the btf_vmlinux, are initialized (in bpf_map__init_kern_struct_ops()). It will also set the prog->type, prog->attach_btf_id, and prog->expected_attach_type. Thus, the prog's properties do not rely on its section name. [ Currently, the bpf_prog's btf-type ==> btf_vmlinux's btf-type matching process is as simple as: member-name match + btf-kind match + size match. If these matching conditions fail, libbpf will reject. The current targeting support is "struct tcp_congestion_ops" which most of its members are function pointers. The member ordering of the bpf_prog's btf-type can be different from the btf_vmlinux's btf-type. ] Then, all obj->maps are created as usual (in bpf_object__create_maps()). Once the maps are created and prog's properties are all set, the libbpf will proceed to load all the progs. bpf_map__attach_struct_ops() is added to register a struct_ops map to a kernel subsystem. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200109003514.3856730-1-kafai@fb.com commit 17328d618c17e0c8deab892ac227efcd55957e4d Author: Martin KaFai Lau Date: Wed Jan 8 16:35:12 2020 -0800 bpf: Synch uapi bpf.h to tools/ This patch sync uapi bpf.h to tools/ Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200109003512.3856559-1-kafai@fb.com commit 206057fe020ac5c037d5e2dd6562a9bd216ec765 Author: Martin KaFai Lau Date: Wed Jan 8 16:45:51 2020 -0800 bpf: Add BPF_FUNC_tcp_send_ack helper Add a helper to send out a tcp-ack. It will be used in the later bpf_dctcp implementation that requires to send out an ack when the CE state changed. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200109004551.3900448-1-kafai@fb.com commit 0baf26b0fcd74bbfcef53c5d5e8bad2b99c8d0d2 Author: Martin KaFai Lau Date: Wed Jan 8 16:35:08 2020 -0800 bpf: tcp: Support tcp_congestion_ops in bpf This patch makes "struct tcp_congestion_ops" to be the first user of BPF STRUCT_OPS. It allows implementing a tcp_congestion_ops in bpf. The BPF implemented tcp_congestion_ops can be used like regular kernel tcp-cc through sysctl and setsockopt. e.g. [root@arch-fb-vm1 bpf]# sysctl -a | egrep congestion net.ipv4.tcp_allowed_congestion_control = reno cubic bpf_cubic net.ipv4.tcp_available_congestion_control = reno bic cubic bpf_cubic net.ipv4.tcp_congestion_control = bpf_cubic There has been attempt to move the TCP CC to the user space (e.g. CCP in TCP). The common arguments are faster turn around, get away from long-tail kernel versions in production...etc, which are legit points. BPF has been the continuous effort to join both kernel and userspace upsides together (e.g. XDP to gain the performance advantage without bypassing the kernel). The recent BPF advancements (in particular BTF-aware verifier, BPF trampoline, BPF CO-RE...) made implementing kernel struct ops (e.g. tcp cc) possible in BPF. It allows a faster turnaround for testing algorithm in the production while leveraging the existing (and continue growing) BPF feature/framework instead of building one specifically for userspace TCP CC. This patch allows write access to a few fields in tcp-sock (in bpf_tcp_ca_btf_struct_access()). The optional "get_info" is unsupported now. It can be added later. One possible way is to output the info with a btf-id to describe the content. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200109003508.3856115-1-kafai@fb.com commit 85d33df357b634649ddbe0a20fd2d0fc5732c3cb Author: Martin KaFai Lau Date: Wed Jan 8 16:35:05 2020 -0800 bpf: Introduce BPF_MAP_TYPE_STRUCT_OPS The patch introduces BPF_MAP_TYPE_STRUCT_OPS. The map value is a kernel struct with its func ptr implemented in bpf prog. This new map is the interface to register/unregister/introspect a bpf implemented kernel struct. The kernel struct is actually embedded inside another new struct (or called the "value" struct in the code). For example, "struct tcp_congestion_ops" is embbeded in: struct bpf_struct_ops_tcp_congestion_ops { refcount_t refcnt; enum bpf_struct_ops_state state; struct tcp_congestion_ops data; /* <-- kernel subsystem struct here */ } The map value is "struct bpf_struct_ops_tcp_congestion_ops". The "bpftool map dump" will then be able to show the state ("inuse"/"tobefree") and the number of subsystem's refcnt (e.g. number of tcp_sock in the tcp_congestion_ops case). This "value" struct is created automatically by a macro. Having a separate "value" struct will also make extending "struct bpf_struct_ops_XYZ" easier (e.g. adding "void (*init)(void)" to "struct bpf_struct_ops_XYZ" to do some initialization works before registering the struct_ops to the kernel subsystem). The libbpf will take care of finding and populating the "struct bpf_struct_ops_XYZ" from "struct XYZ". Register a struct_ops to a kernel subsystem: 1. Load all needed BPF_PROG_TYPE_STRUCT_OPS prog(s) 2. Create a BPF_MAP_TYPE_STRUCT_OPS with attr->btf_vmlinux_value_type_id set to the btf id "struct bpf_struct_ops_tcp_congestion_ops" of the running kernel. Instead of reusing the attr->btf_value_type_id, btf_vmlinux_value_type_id s added such that attr->btf_fd can still be used as the "user" btf which could store other useful sysadmin/debug info that may be introduced in the furture, e.g. creation-date/compiler-details/map-creator...etc. 3. Create a "struct bpf_struct_ops_tcp_congestion_ops" object as described in the running kernel btf. Populate the value of this object. The function ptr should be populated with the prog fds. 4. Call BPF_MAP_UPDATE with the object created in (3) as the map value. The key is always "0". During BPF_MAP_UPDATE, the code that saves the kernel-func-ptr's args as an array of u64 is generated. BPF_MAP_UPDATE also allows the specific struct_ops to do some final checks in "st_ops->init_member()" (e.g. ensure all mandatory func ptrs are implemented). If everything looks good, it will register this kernel struct to the kernel subsystem. The map will not allow further update from this point. Unregister a struct_ops from the kernel subsystem: BPF_MAP_DELETE with key "0". Introspect a struct_ops: BPF_MAP_LOOKUP_ELEM with key "0". The map value returned will have the prog _id_ populated as the func ptr. The map value state (enum bpf_struct_ops_state) will transit from: INIT (map created) => INUSE (map updated, i.e. reg) => TOBEFREE (map value deleted, i.e. unreg) The kernel subsystem needs to call bpf_struct_ops_get() and bpf_struct_ops_put() to manage the "refcnt" in the "struct bpf_struct_ops_XYZ". This patch uses a separate refcnt for the purose of tracking the subsystem usage. Another approach is to reuse the map->refcnt and then "show" (i.e. during map_lookup) the subsystem's usage by doing map->refcnt - map->usercnt to filter out the map-fd/pinned-map usage. However, that will also tie down the future semantics of map->refcnt and map->usercnt. The very first subsystem's refcnt (during reg()) holds one count to map->refcnt. When the very last subsystem's refcnt is gone, it will also release the map->refcnt. All bpf_prog will be freed when the map->refcnt reaches 0 (i.e. during map_free()). Here is how the bpftool map command will look like: [root@arch-fb-vm1 bpf]# bpftool map show 6: struct_ops name dctcp flags 0x0 key 4B value 256B max_entries 1 memlock 4096B btf_id 6 [root@arch-fb-vm1 bpf]# bpftool map dump id 6 [{ "value": { "refcnt": { "refs": { "counter": 1 } }, "state": 1, "data": { "list": { "next": 0, "prev": 0 }, "key": 0, "flags": 2, "init": 24, "release": 0, "ssthresh": 25, "cong_avoid": 30, "set_state": 27, "cwnd_event": 28, "in_ack_event": 26, "undo_cwnd": 29, "pkts_acked": 0, "min_tso_segs": 0, "sndbuf_expand": 0, "cong_control": 0, "get_info": 0, "name": [98,112,102,95,100,99,116,99,112,0,0,0,0,0,0,0 ], "owner": 0 } } } ] Misc Notes: * bpf_struct_ops_map_sys_lookup_elem() is added for syscall lookup. It does an inplace update on "*value" instead returning a pointer to syscall.c. Otherwise, it needs a separate copy of "zero" value for the BPF_STRUCT_OPS_STATE_INIT to avoid races. * The bpf_struct_ops_map_delete_elem() is also called without preempt_disable() from map_delete_elem(). It is because the "->unreg()" may requires sleepable context, e.g. the "tcp_unregister_congestion_control()". * "const" is added to some of the existing "struct btf_func_model *" function arg to avoid a compiler warning caused by this patch. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200109003505.3855919-1-kafai@fb.com commit 27ae7997a66174cb8afd6a75b3989f5e0c1b9e5a Author: Martin KaFai Lau Date: Wed Jan 8 16:35:03 2020 -0800 bpf: Introduce BPF_PROG_TYPE_STRUCT_OPS This patch allows the kernel's struct ops (i.e. func ptr) to be implemented in BPF. The first use case in this series is the "struct tcp_congestion_ops" which will be introduced in a latter patch. This patch introduces a new prog type BPF_PROG_TYPE_STRUCT_OPS. The BPF_PROG_TYPE_STRUCT_OPS prog is verified against a particular func ptr of a kernel struct. The attr->attach_btf_id is the btf id of a kernel struct. The attr->expected_attach_type is the member "index" of that kernel struct. The first member of a struct starts with member index 0. That will avoid ambiguity when a kernel struct has multiple func ptrs with the same func signature. For example, a BPF_PROG_TYPE_STRUCT_OPS prog is written to implement the "init" func ptr of the "struct tcp_congestion_ops". The attr->attach_btf_id is the btf id of the "struct tcp_congestion_ops" of the _running_ kernel. The attr->expected_attach_type is 3. The ctx of BPF_PROG_TYPE_STRUCT_OPS is an array of u64 args saved by arch_prepare_bpf_trampoline that will be done in the next patch when introducing BPF_MAP_TYPE_STRUCT_OPS. "struct bpf_struct_ops" is introduced as a common interface for the kernel struct that supports BPF_PROG_TYPE_STRUCT_OPS prog. The supporting kernel struct will need to implement an instance of the "struct bpf_struct_ops". The supporting kernel struct also needs to implement a bpf_verifier_ops. During BPF_PROG_LOAD, bpf_struct_ops_find() will find the right bpf_verifier_ops by searching the attr->attach_btf_id. A new "btf_struct_access" is also added to the bpf_verifier_ops such that the supporting kernel struct can optionally provide its own specific check on accessing the func arg (e.g. provide limited write access). After btf_vmlinux is parsed, the new bpf_struct_ops_init() is called to initialize some values (e.g. the btf id of the supporting kernel struct) and it can only be done once the btf_vmlinux is available. The R0 checks at BPF_EXIT is excluded for the BPF_PROG_TYPE_STRUCT_OPS prog if the return type of the prog->aux->attach_func_proto is "void". Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200109003503.3855825-1-kafai@fb.com commit 976aba002fcb4b1baa71e4b0854f3d4ae48c1d4d Author: Martin KaFai Lau Date: Wed Jan 8 16:35:01 2020 -0800 bpf: Support bitfield read access in btf_struct_access This patch allows bitfield access as a scalar. It checks "off + size > t->size" to avoid accessing bitfield end up accessing beyond the struct. This check is done outside of the loop since it is applicable to all access. It also takes this chance to break early on the "off < moff" case. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200109003501.3855427-1-kafai@fb.com commit 218b3f65f9081f5e1bffe6de5f0f4b22c935410b Author: Martin KaFai Lau Date: Wed Jan 8 16:34:59 2020 -0800 bpf: Add enum support to btf_ctx_access() It allows bpf prog (e.g. tracing) to attach to a kernel function that takes enum argument. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200109003459.3855366-1-kafai@fb.com commit 275517ff452a535da5eef25b1c22e53fc50b0a12 Author: Martin KaFai Lau Date: Wed Jan 8 16:34:56 2020 -0800 bpf: Avoid storing modifier to info->btf_id info->btf_id expects the btf_id of a struct, so it should store the final result after skipping modifiers (if any). It also takes this chanace to add a missing newline in one of the bpf_log() messages. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200109003456.3855176-1-kafai@fb.com commit 65726b5b7efae718391752ae8bb85b9843fd83f4 Author: Martin KaFai Lau Date: Wed Jan 8 16:34:54 2020 -0800 bpf: Save PTR_TO_BTF_ID register state when spilling to stack This patch makes the verifier save the PTR_TO_BTF_ID register state when spilling to the stack. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200109003454.3854870-1-kafai@fb.com commit e43002242a47e8d7b2f9446f54de982f09e7dbd1 Author: Stanislav Fomichev Date: Wed Jan 8 11:21:32 2020 -0800 selftests/bpf: Restore original comm in test_overhead test_overhead changes task comm in order to estimate BPF trampoline overhead but never sets the comm back to the original one. We have the tests (like core_reloc.c) that have 'test_progs' as hard-coded expected comm, so let's try to preserve the original comm. Currently, everything works because the order of execution is: first core_recloc, then test_overhead; but let's make it a bit future-proof. Other related changes: use 'test_overhead' as new comm instead of 'test' to make it easy to debug and drop '\n' at the end. Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Acked-by: Petar Penkov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200108192132.189221-1-sdf@google.com commit 9d10fc26497ac57d3106ed489a86c625325cf176 Author: Benjamin Gaignard Date: Tue Nov 19 11:57:53 2019 +0100 drm/fb-cma-helpers: Fix include issue Exported functions prototypes are missing in drm_fb_cma_helper.c Include drm_fb_cma_helper to fix that issue. Signed-off-by: Benjamin Gaignard Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20191119105753.32363-1-benjamin.gaignard@st.com commit f199af00186cb7eb2d842633e47689fb7b791e60 Author: Benjamin Gaignard Date: Tue Dec 10 11:24:37 2019 +0100 drm/modes: tag unused variables to avoid warnings Some variables are set but never used. To avoid warning when compiling with W=1 and keep the algorithm like it is tag theses variables with _maybe_unused macro. Signed-off-by: Benjamin Gaignard Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20191210102437.19377-1-benjamin.gaignard@st.com commit b6a5c58240be8a9521358a4efcaadaa5e3586062 Author: Mark Brown Date: Thu Dec 19 12:25:32 2019 +0000 arm64: xen: Use modern annotations for assembly functions In an effort to clarify and simplify the annotation of assembly functions in the kernel new macros have been introduced. These replace ENTRY and ENDPROC. Update the annotations in the xen code to the new macros. Signed-off-by: Mark Brown Reviewed-by: Julien Grall Reviewed-by: Stefano Stabellini Signed-off-by: Will Deacon commit 74f75cda754eb69a77f910ceb5bc85f8e9ba56a5 Author: Arnd Bergmann Date: Thu Jan 9 09:47:30 2020 +0100 IB/core: Fix build failure without hugepages HPAGE_SHIFT is only defined on architectures that support hugepages: drivers/infiniband/core/umem_odp.c: In function 'ib_umem_odp_get': drivers/infiniband/core/umem_odp.c:245:26: error: 'HPAGE_SHIFT' undeclared (first use in this function); did you mean 'PAGE_SHIFT'? Enclose this in an #ifdef. Fixes: 9ff1b6466a29 ("IB/core: Fix ODP with IB_ACCESS_HUGETLB handling") Link: https://lore.kernel.org/r/20200109084740.2872079-1-arnd@arndb.de Signed-off-by: Arnd Bergmann Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit a511981847ce8bb8d189f218fc4daa6c137abfc0 Author: Tobias Schramm Date: Thu Jan 9 12:29:52 2020 +0100 drm/panel: Add support for BOE NV140FHM-N49 panel to panel-simple This patch adds support for the BOE NV140FHM-N49 panel to the panel-simple driver. The panel is used by the pine64 Pinebook Pro. Signed-off-by: Tobias Schramm Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200109112952.2620-2-t.schramm@manjaro.org commit 4cee2f8e03568a61c20a26d33158ae1309e10611 Author: Sam Ravnborg Date: Thu Jan 9 14:48:41 2020 +0100 dt-bindings: display: add BOE 14" panel Add bindings for the BOE NV140FHM-N49 14" 1920x1080 panel. The panel is used by the pine64 Pinebook Pro. Signed-off-by: Sam Ravnborg Reviewed-by: Tobias Schramm Cc: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20200109140742.GA12940@ravnborg.org commit 577a2f41f4c7aced4fed41b20ee77cedd8c197cf Author: Rafael J. Wysocki Date: Thu Jan 2 21:42:16 2020 +0100 cpuidle: Drop unused cpuidle_driver_ref/unref() functions The cpuidle_driver_ref() and cpuidle_driver_unref() functions are not used and the refcnt field in struct cpuidle_driver operated by them is not updated anywhere else (so it is permanently equal to 0), so drop both of them along with refcnt. Signed-off-by: Rafael J. Wysocki Acked-by: Daniel Lezcano commit 2a0a0bc7020ef7e66c9569d8229d79fa72e3d659 Author: Helen Koike Date: Wed Jan 8 19:44:54 2020 +0100 media: MAINTAINERS: add entry for Rockchip ISP1 driver Add MAINTAINERS entry for the rockchip isp1 driver. Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3b7668a1faadaae5ecae46033bec5a42a398b790 Author: Helen Koike Date: Wed Jan 8 19:44:53 2020 +0100 media: staging: rkisp1: add TODO file for staging Add TODO file with requirements to move this driver out of staging. Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 585c91f40d201bc564d4e76b83c05b3b5363fe7e Author: Shuah Khan Date: Wed Jan 8 18:24:16 2020 -0700 usbip: Fix unsafe unaligned pointer usage Fix unsafe unaligned pointer usage in usbip network interfaces. usbip tool build fails with new gcc -Werror=address-of-packed-member checks. usbip_network.c: In function ‘usbip_net_pack_usb_device’: usbip_network.c:79:32: error: taking address of packed member of ‘struct usbip_usb_device’ may result in an unaligned pointer value [-Werror=address-of-packed-member] 79 | usbip_net_pack_uint32_t(pack, &udev->busnum); Fix with minor changes to pass by value instead of by address. Signed-off-by: Shuah Khan Link: https://lore.kernel.org/r/20200109012416.2875-1-skhan@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 49f781153e5997c4f2178a8069b1883718bf2411 Author: Jacob Chen Date: Wed Jan 8 19:44:50 2020 +0100 media: staging: rkisp1: add document for rkisp1 meta buffer format This commit add document for rkisp1 meta buffer format Signed-off-by: Jacob Chen Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bae1155cf5798cc65fedeecfa82c2f48fa3ed18b Author: Jacob Chen Date: Wed Jan 8 19:44:49 2020 +0100 media: staging: rkisp1: add output device for parameters Add the output video driver that accept parameters from userspace. Signed-off-by: Jacob Chen Signed-off-by: Shunqian Zheng Signed-off-by: Yichong Zhong Signed-off-by: Jacob Chen Signed-off-by: Eddie Cai Signed-off-by: Jeffy Chen Signed-off-by: Allon Huang Signed-off-by: Tomasz Figa Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9a28dbd65a8882462079d66daf9282234d3fa1a0 Author: Jacob Chen Date: Wed Jan 8 19:44:48 2020 +0100 media: staging: rkisp1: add capture device for statistics Add the capture video driver for rockchip isp1 statistics block. Signed-off-by: Jacob Chen Signed-off-by: Shunqian Zheng Signed-off-by: Yichong Zhong Signed-off-by: Jacob Chen Signed-off-by: Eddie Cai Signed-off-by: Jeffy Chen Signed-off-by: Allon Huang Signed-off-by: Tomasz Figa Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8e2be317dcf5ce42c33d4e04ed7734c155487f31 Author: Jeffy Chen Date: Wed Jan 8 19:44:47 2020 +0100 media: staging: rkisp1: add user space ABI definitions Add the header for userspace Signed-off-by: Jeffy Chen Signed-off-by: Jacob Chen Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 56e3b29f9f6b27a063df2a31f148782073cbe5e9 Author: Helen Koike Date: Wed Jan 8 19:44:46 2020 +0100 media: staging: rkisp1: add streaming paths Add v4l2 capture device interface to rkisp1 driver, allowing users to get frames from ISP1. ISP1 has two major streaming paths, mainpah and selfpah, with different capabilities. Each one has an independent crop and resizer, thus add a capture video device and a resizer subdevice for each of the paths. Signed-off-by: Jacob Chen Signed-off-by: Shunqian Zheng Signed-off-by: Yichong Zhong Signed-off-by: Jacob Chen Signed-off-by: Eddie Cai Signed-off-by: Jeffy Chen Signed-off-by: Allon Huang Signed-off-by: Tomasz Figa Signed-off-by: Ezequiel Garcia Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d65dd85281fbf7fc66a936b0aa8979614a7ba150 Author: Helen Koike Date: Wed Jan 8 19:44:45 2020 +0100 media: staging: rkisp1: add Rockchip ISP1 base driver Add base driver for Rockchip Image Signal Processing v1 Unit, with isp subdevice and sensor biddings. [fixed compilation and run time errors regarding new v4l2 async API] Signed-off-by: Jacob Chen Signed-off-by: Shunqian Zheng Signed-off-by: Yichong Zhong Signed-off-by: Jacob Chen Signed-off-by: Eddie Cai Signed-off-by: Jeffy Chen Signed-off-by: Allon Huang Signed-off-by: Tomasz Figa Signed-off-by: Laurent Pinchart Signed-off-by: Ezequiel Garcia Signed-off-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 32abcc4491c62906e2023b7fc43cffc06064b2f0 Author: Ezequiel Garcia Date: Wed Jan 8 19:44:44 2020 +0100 media: staging: phy-rockchip-dphy-rx0: add Rockchip MIPI Synopsys DPHY RX0 driver Add driver for Rockchip MIPI Synopsys DPHY driver Signed-off-by: Tomasz Figa Signed-off-by: Ezequiel Garcia Signed-off-by: Helen Koike Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b18f7f991bb60661377c4eb93d677184fe9734ea Author: Helen Koike Date: Wed Jan 8 19:44:52 2020 +0100 media: staging: dt-bindings: add Rockchip MIPI RX D-PHY RX0 yaml bindings Add yaml DT bindings for Rockchip MIPI D-PHY RX This was tested and verified with: mv drivers/staging/media/phy-rockchip-dphy-rx0/Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml Documentation/devicetree/bindings/phy/ make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml Signed-off-by: Helen Koike Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 25cb42af9ffabffec499e9e69e2fd3797774ce5b Author: Helen Koike Date: Wed Jan 8 19:44:51 2020 +0100 media: staging: dt-bindings: add Rockchip ISP1 yaml bindings Add yaml DT bindings for Rockchip ISP1. This was tested and verified with: mv drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.yaml Documentation/devicetree/bindings/media/ make dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/media/rockchip-isp1.yaml Signed-off-by: Helen Koike Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bc57ecbd72fca37557677a30e717e95abe075ae8 Author: Dmitry Osipenko Date: Mon Jan 6 04:34:16 2020 +0300 usb: host: ehci-tegra: Remove unused fields from tegra_ehci_hcd There are few stale fields in tegra_ehci_hcd structure, let's remove them. Signed-off-by: Dmitry Osipenko Acked-by: Alan Stern Link: https://lore.kernel.org/r/20200106013416.9604-21-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 32806e7cb0238207ffa9f5306c474fd0e8a3c9de Author: Dmitry Osipenko Date: Mon Jan 6 04:34:15 2020 +0300 usb: host: ehci-tegra: Stop managing PHY's power There is no need to use usb_phy_set_suspend during of driver's probe because now PHY driver enables hardware during of PHY's initialization. Signed-off-by: Dmitry Osipenko Acked-by: Alan Stern Link: https://lore.kernel.org/r/20200106013416.9604-20-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7d999a7d096bb60e18ee19e107b360ade6419cc6 Author: Dmitry Osipenko Date: Mon Jan 6 04:34:14 2020 +0300 usb: chipidea: tegra: Add USB_TEGRA_PHY to driver's dependencies Add build dependency on USB_TEGRA_PHY since UDC driver isn't usable without the PHY. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-19-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7ac85f4a644435532229eda63c4a08d96b362057 Author: Dmitry Osipenko Date: Mon Jan 6 04:34:13 2020 +0300 usb: chipidea: tegra: Stop managing PHY's power Tegra's USB PHY driver now provides generic PHY init/shutdown callbacks and thus the custom PHY management could be removed from Tegra-specific part of the ChipIdea driver. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-18-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit f1f0c7516708370de234ef1490da1298168e32ac Author: Dmitry Osipenko Date: Mon Jan 6 04:34:12 2020 +0300 usb: phy: tegra: Keep CPU interrupts enabled There is no good reason for disabling of CPU interrupts in order to protect the utmip_pad_count modification. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-17-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 92bd2ef26c5d804a21ada9d4e2d353e3e2e215ab Author: Dmitry Osipenko Date: Mon Jan 6 04:34:11 2020 +0300 usb: phy: tegra: Move utmip_pad_count checking under lock It's unlikely that two drivers could manage PHY's state simultaneously in practice, nevertheless the utmip_pad_count checking should be under lock, for consistency. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-16-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit aecc5af3ec1d6c5fb3d6c3e73276a7e53777166a Author: Dmitry Osipenko Date: Mon Jan 6 04:34:10 2020 +0300 usb: phy: tegra: Disable VBUS regulator on tegra_usb_phy_init failure VBUS regulator should be turned off in a case of error. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-15-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 06e60e5038fa432900ffa956307459a1aabee1db Author: Dmitry Osipenko Date: Mon Jan 6 04:34:09 2020 +0300 usb: phy: tegra: Use device-tree notion of reset-GPIO's active-state It is much more intuitive if reset is treated as asserted when GPIO value is set to 1. All NVIDIA Tegra device-trees are properly specifying active state of the reset-GPIO since 2013, let's clean up that part of the code. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-14-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 01d6ea31db65257cc6d121b957516940a65e92fe Author: Dmitry Osipenko Date: Mon Jan 6 04:34:08 2020 +0300 usb: phy: tegra: Use u32 for hardware register variables There is a mix of u32/ULONG usage in the driver's code. Let's switch to u32 uniformly, for consistency. Suggested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-13-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 875417471e9c0c3bb311a007d99390d9f5339b81 Author: Dmitry Osipenko Date: Mon Jan 6 04:34:07 2020 +0300 usb: phy: tegra: Use devm_otg_ulpi_create() The resource-managed variant removes the necessity for the driver to care about freeing ULPI resources. Suggested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-12-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit dea75ee6c98474c966bb12164cdebc1daddcd86b Author: Dmitry Osipenko Date: Mon Jan 6 04:34:06 2020 +0300 usb: ulpi: Add resource-managed variant of otg_ulpi_create() Now drivers (like NVIDIA Tegra USB PHY for example) will be able to benefit from the resource-managed variant, making driver's code a bit cleaner. Suggested-by: Thierry Reding Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-11-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit ec027b33c8bb164430224ce1f5cb733036b20d3f Merge: 6251215fe56c a566696cf9f2 Author: Jani Nikula Date: Thu Jan 9 17:19:12 2020 +0200 Merge drm/drm-next into drm-intel-next-queued Sync with drm-next to get the new logging macros, among other things. Signed-off-by: Jani Nikula commit 1b257870a78b0a9ce98fdfb052c58542022ffb5b Author: Johan Hovold Date: Fri Jan 3 17:35:13 2020 +0100 media: iguanair: fix endpoint sanity check Make sure to use the current alternate setting, which need not be the first one by index, when verifying the endpoint descriptors and initialising the URBs. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: 26ff63137c45 ("[media] Add support for the IguanaWorks USB IR Transceiver") Fixes: ab1cbdf159be ("media: iguanair: add sanity checks") Cc: stable # 3.6 Cc: Oliver Neukum Signed-off-by: Johan Hovold Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 334f6aaf75648b60dcc2f9c6fa0982fc3967eea1 Author: Wolfram Sang Date: Mon Dec 16 16:51:42 2019 +0100 media: usb: dvb-usb: dw2102: convert to use i2c_new_client_device() Use the newer API returning an ERRPTR and use the new helper to bail out. Signed-off-by: Wolfram Sang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 6e040e6f8f8b9429d861808244e1c451138a56e2 Author: Wolfram Sang Date: Mon Dec 16 16:51:41 2019 +0100 media: usb: dvb-usb: dib0700_devices: convert to use i2c_new_client_device() Use the newer API returning an ERRPTR and use the new helper to bail out. Signed-off-by: Wolfram Sang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 3dd0121269b238c13ae077a056113ee009affd18 Author: Wolfram Sang Date: Mon Dec 16 16:51:40 2019 +0100 media: usb: dvb-usb-v2: zd1301: convert to use i2c_new_client_device() Use the newer API returning an ERRPTR and use the new helper to bail out. Signed-off-by: Wolfram Sang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 9785a61b74305518c5bc8a0bd2e966f44481b433 Author: Wolfram Sang Date: Mon Dec 16 16:51:39 2019 +0100 media: usb: dvb-usb-v2: rtl28xxu: convert to use i2c_new_client_device() Use the newer API returning an ERRPTR and use the new helper to bail out. Signed-off-by: Wolfram Sang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 402e77c4c7fdfbbd48f91160314c26fc39741d31 Author: Wolfram Sang Date: Mon Dec 16 16:51:38 2019 +0100 media: usb: dvb-usb-v2: anysee: convert to use i2c_new_client_device() Use the newer API returning an ERRPTR and use the new helper to bail out. Signed-off-by: Wolfram Sang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 7930196a38351f762b661fe2ae001ea8d201ca27 Author: Wolfram Sang Date: Mon Dec 16 16:51:37 2019 +0100 media: usb: dvb-usb-v2: af9035: convert to use i2c_new_client_device() Use the newer API returning an ERRPTR and use the new helper to bail out. Signed-off-by: Wolfram Sang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit a7070891f9707cd46e761e32b13795e4583796b4 Author: Wolfram Sang Date: Mon Dec 16 16:51:36 2019 +0100 media: platform: sti: c8sectpfe: c8sectpfe-dvb: convert to use i2c_new_client_device() Use the newer API returning an ERRPTR and use the new helper to bail out. Reviewed-by: Patrice Chotard Signed-off-by: Wolfram Sang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 32dc63f6915d7a3b80fbe7f2c93582ec12a7ae61 Author: Wolfram Sang Date: Mon Dec 16 16:51:35 2019 +0100 media: pci: smipcie: smipcie-main: convert to use i2c_new_client_device() Use the newer API returning an ERRPTR and use the new helper to bail out. Signed-off-by: Wolfram Sang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit d442c2e99d99be9b4462819ecf599dbd5b4bf08d Author: Wolfram Sang Date: Mon Dec 16 16:51:34 2019 +0100 media: pci: saa7164: saa7164-dvb: convert to use i2c_new_client_device() Use the newer API returning an ERRPTR and use the new helper to bail out. Signed-off-by: Wolfram Sang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 0ace5b2e6e03c6429ad6fc7afa4bfd51cc0ac925 Author: Wolfram Sang Date: Mon Dec 16 16:51:33 2019 +0100 media: pci: cx23885: cx23885-dvb: convert to use i2c_new_client_device() Use the newer API returning an ERRPTR and use the new helper to bail out. Signed-off-by: Wolfram Sang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 2f507ffa9ca59535b204f43ec793e5c96394c4f4 Author: Wolfram Sang Date: Mon Dec 16 16:51:32 2019 +0100 media: dvb-frontends: ts2020: convert to use i2c_new_client_device() Use the newer API returning an ERRPTR and use the new helper to bail out. Signed-off-by: Wolfram Sang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit aace5926d9699e1f183f2b2881748fe5b233c51c Author: Wolfram Sang Date: Mon Dec 16 16:51:31 2019 +0100 media: dvb-frontends: m88ds3103: convert to use i2c_new_client_device() Use the newer API returning an ERRPTR and use the new helper to bail out. Signed-off-by: Wolfram Sang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 8e42d239cb027143915cae13eb2ecf1360ee24de Author: Chaitanya Kulkarni Date: Tue Jan 7 13:58:17 2020 -0800 block: mark zone-mgmt bios with REQ_SYNC In the current implementation, final zone-mgmt request is issued with submit_bio_wait() which marks the bio REQ_SYNC. This is needed since immediate action is expected for zone-mgmt requests as these are blocking operations. This also bypasses the scheduler in the blk_mq_make_request() and dispatches the request directly into the hw ctx. This patch marks all the chained bios REQ_SYNC so that we can have above-mentioned behavior for non-final bios also. Reviewed-by: Damien Le Moal Reviewed-by: Bob Liu Signed-off-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe commit 4f7f5e038cd6f0fc62f3b299b49f3f5379c269b3 Author: Wolfram Sang Date: Mon Dec 16 16:51:30 2019 +0100 media: dvb-frontends: lgdt330x: convert to use i2c_new_client_device() Use the newer API returning an ERRPTR and use the new helper to bail out. Signed-off-by: Wolfram Sang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 13e54824fe5bf1e3956b56f878e2cd3c5b89c0fb Author: Wolfram Sang Date: Mon Dec 16 16:51:29 2019 +0100 media: dvb-frontends: cxd2820r_core: convert to use i2c_new_client_device() Use the newer API returning an ERRPTR and use the new helper to bail out. Signed-off-by: Wolfram Sang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit d928440cf4603b4889af3e6785d9200a626ae0ce Author: Wolfram Sang Date: Mon Dec 16 16:51:28 2019 +0100 media: dvb-core: dvbdev: convert to use i2c_new_client_device() Use the newer API returning an ERRPTR and use the new helper to bail out. Signed-off-by: Wolfram Sang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 6251215fe56c39e07de8bcb3a5ecb19a80ef423e Author: Ma Feng Date: Fri Jan 3 09:12:39 2020 +0800 drm/i915: use true,false for bool variable in intel_crt.c Fixes coccicheck warning: drivers/gpu/drm/i915/display/intel_crt.c:1066:1-28: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/i915/display/intel_crt.c:928:2-29: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/i915/display/intel_crt.c:443:2-29: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Ma Feng Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1578013959-31486-4-git-send-email-mafeng.ma@huawei.com commit dd93cecff62c06e17510d1dcd43177d0da38e6fb Author: Ma Feng Date: Fri Jan 3 09:12:38 2020 +0800 drm/i915/dp: use true,false for bool variable in intel_dp.c Fixes coccicheck warning: drivers/gpu/drm/i915/display/intel_dp.c:4950:1-33: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/i915/display/intel_dp.c:4906:1-33: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Ma Feng Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1578013959-31486-3-git-send-email-mafeng.ma@huawei.com commit 36a52d524e7e3d63437cd379cd8f13189aadadd1 Author: Ma Feng Date: Fri Jan 3 09:12:37 2020 +0800 drm/i915: use true,false for bool variable in i915_debugfs.c Fixes coccicheck warning: drivers/gpu/drm/i915/i915_debugfs.c:3078:4-36: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/i915/i915_debugfs.c:3078:4-36: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/i915/i915_debugfs.c:3080:4-36: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/i915/i915_debugfs.c:3080:4-36: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Ma Feng Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1578013959-31486-2-git-send-email-mafeng.ma@huawei.com commit 025af39b87dc4dc78de4e861ca8b88a1d5ba89f6 Author: Luca Ceresoli Date: Tue Nov 5 15:08:54 2019 +0100 genirq: Show irq name in non-oneshot error message Requesting a threaded IRQ with handler=NULL and !ONESHOT fails, but the error message does not include the IRQ line name, which makes it harder to find the offending driver. Print the IRQ line name to clarify where the error comes from. Use the same format as the other pr_err() above in the same function. Signed-off-by: Luca Ceresoli Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20191105140854.27893-1-luca@lucaceresoli.net commit 0caf62c8df8d59c5c367405e3163735478292706 Author: Dan Carpenter Date: Wed Jan 8 06:35:34 2020 +0100 media: hantro: remove a pointless NULL check This can't be NULL and we've already dereferenced it so let's remove the check. Signed-off-by: Dan Carpenter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0c8c1ae155b89be7e0cd7e74494dfc83554c56d2 Author: Colin Ian King Date: Tue Jan 7 15:02:06 2020 +0100 media: v4l2-core: fix uninitialized structure fields being returned to userspace In the case where v4l2_event_dequeue fails the structure ev is not being filled and this garbage data from the stack is being copied to the ev32 structure and being copied back to userspace on the VIDIOC_DQEVENT_TIME32 ioctl. Fix this by ensuring the ev structure is zero'd to ensure uninitialized data is not leaked back. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 1a6c0b36dd19 ("media: v4l2-core: fix VIDIOC_DQEVENT for time64 ABI") Signed-off-by: Colin Ian King Acked-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8152c2bfd780398773435bf6eb1e3841f83de209 Author: Linus Walleij Date: Thu Jan 9 08:28:15 2020 +0100 drm/panel: Add driver for Sony ACX424AKP panel The Sony ACX424AKP is a command/videomode DSI panel for mobile devices. It is used on the ST-Ericsson HREF520 reference design. We support video mode by default, but it is possible to switch the panel into command mode by using the bool property "dsi-command-mode". Cc: Stephan Gerhold Signed-off-by: Linus Walleij Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200109072815.334867-1-linus.walleij@linaro.org commit 5d50bd440bc2ff815e9837e4a270fd0c5f3c6f73 Author: Thomas Zimmermann Date: Mon Jan 6 15:10:16 2020 +0100 drm/udl: Make udl driver depend on CONFIG_USB The udl driver for DisplayLink devices depends on support for host-side USB controllers, which is enabled with CONFIG_USB. Plain USB support as given by CONFIG_USB_SUPPORT is not sufficient. This patch changes dependencies for udl to depend on CONFIG_USB, instead of CONFIG_USB_SUPPORT. Users will have to enable CONFIG_USB and select a USB host controller. With this change udl dependencies work the same way as dependencies for PCI drivers. Signed-off-by: Thomas Zimmermann Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200106141016.9562-1-tzimmermann@suse.de commit 5a25e646902f8bfd97379b0b385d93c93cb5b94e Author: Michal Simek Date: Mon Aug 26 10:18:13 2019 +0200 arm64: zynqmp: Add label property to all ina226 on zcu106 Label property is adding capability to distiguish chips from each other when iio framework is used. Signed-off-by: Michal Simek commit d7b13a3cf20eb6d7338cebef19c01eaf047c108d Author: Michal Simek Date: Mon Aug 26 09:46:36 2019 +0200 arm64: zynqmp: Enable iio-hwmon for ina226 on zcu106 ina226 hwmon driver is deprecated and it is recommended to use new iio based driver. The patch is enabling iio-hwmon driver to export functionality from IIO to hwmon interface to be able to use lm-sensors package. Signed-off-by: Michal Simek commit 353f5ece949d1bdaa63fe05f2e64ab38b790a0ca Author: Michal Simek Date: Mon Aug 26 10:20:07 2019 +0200 arm64: zynqmp: Add label property to all ina226 on zcu102 Label property is adding capability to distiguish chips from each other when iio framework is used. Signed-off-by: Michal Simek commit 86444d3ecfd5aeafdb5a356fa4f74fcfacbecad8 Author: Michal Simek Date: Fri Aug 16 10:42:42 2019 +0200 arm64: zynqmp: Enable iio-hwmon for ina226 on zcu102 ina226 hwmon driver is deprecated and it is recommended to use new iio based driver. The patch is enabling iio-hwmon driver to export functionality from IIO to hwmon interface to be able to use lm-sensors package. Signed-off-by: Michal Simek commit 9529be140ffa7b77b3c90ebbe2e73712ba812a7d Author: Michal Simek Date: Mon Aug 26 10:00:26 2019 +0200 arm64: zynqmp: Add label property to all ina226 on zcu111 Label property is adding capability to distiguish chips from each other when iio framework is used. Signed-off-by: Michal Simek commit 2fe83978336c165122a350bac212a290ffb156e8 Author: Michal Simek Date: Mon Aug 26 09:45:03 2019 +0200 arm64: zynqmp: Enable iio-hwmon for ina226 on zcu111 ina226 hwmon driver is deprecated and it is recommended to use new iio based driver. The patch is enabling iio-hwmon driver to export functionality from IIO to hwmon interface to be able to use lm-sensors package. Signed-off-by: Michal Simek commit 526a63f00f109796832062c69eeed14fa03d0fcd Author: Michal Simek Date: Mon Aug 26 09:30:34 2019 +0200 arm64: zynqmp: Enable iio-hwmon for ina226 on zcu100 ina226 hwmon driver is deprecated and it is recommended to use new iio based driver. The patch is enabling iio-hwmon driver to export functionality from IIO to hwmon interface to be able to use lm-sensors package. Signed-off-by: Michal Simek commit c8e75cd490771ebfcfda29b1be27730b114cb0e7 Author: Michal Simek Date: Thu May 31 09:50:10 2018 +0200 arm64: zynqmp: Setup default number of chipselects for zcu100 There is only one chipselect on each connector. Define it directly in board dts file. There should be an option to use more chipselects via gpios. Signed-off-by: Michal Simek commit b4582390d5841c3f6817953553fa3ebf523edb91 Author: Michal Simek Date: Mon May 28 15:19:02 2018 +0200 arm64: zynqmp: Remove broken-cd from zcu100-revC Card detect bit was broken on revA and it is working fine with revC board that's why this property can be removed. Signed-off-by: Michal Simek commit 25ef9bb6c221f80b56e97456847ed525d9e2a3a5 Author: Venkatesh Yadav Abbarapu Date: Thu Sep 5 08:30:38 2019 +0530 arm64: zynqmp: Fix the si570 clock frequency on zcu111 The si570 clock frequency should be 156.25MHz as per datasheet. Signed-off-by: Venkatesh Yadav Abbarapu Signed-off-by: Michal Simek commit 48b44b909073e6ac745849c1220f683f5ce91347 Author: Michal Simek Date: Wed Jul 18 12:10:02 2018 +0200 arm64: zynqmp: Setup clock-output-names for si570 chips If there are more instances of si570 clock-output-names property should be used for differentiation of clock output. The patch is adding this optional properties for all zynqmp boards with si570 chip. Signed-off-by: Michal Simek commit 4426df7c8dc2eb9a1438418a3cbeeff41ef5c097 Author: Michal Simek Date: Tue Mar 12 10:15:27 2019 +0100 arm64: zynqmp: Turn comment to gpio-line-names Label gpio lines properly. Signed-off-by: Michal Simek commit 8cfb5a11e1799921adf3f17ba1831ac7208ec5e9 Author: Michal Simek Date: Thu Jan 9 12:27:08 2020 +0100 arm64: zynqmp: Fix address for tca6416_u97 chip on zcu104 I2c address is not 0x21 but 0x20. Signed-off-by: Michal Simek commit 4b0ec30be98cf583f3d3616a14973537a7a28b93 Author: Michal Simek Date: Wed May 30 08:34:29 2018 +0200 arm64: zynqmp: Remove addition number in node name This change is coming from mainline review that's why this patch is sync. Signed-off-by: Michal Simek commit 13d21eba781ea2a4de6aab02abd2beb84e753f8a Author: Michal Simek Date: Thu Aug 8 12:44:22 2019 +0200 arm64: zynqmp: Use ethernet-phy as node name for ethernet phys Ethernet phys based on devicetree specification should be using ethernet-phy@ node name instead of pure phy@. Signed-off-by: Michal Simek commit d4fb2d76095900952805c07c0067452a1470b85e Author: Chris Wilson Date: Thu Jan 9 08:57:17 2020 +0000 drm/i915/gt: runtime-pm is no longer required for ce->ops->pin() Now that we have moved the runtime-pm management out of intel_context_acctive_acquire, and that itself out of ce->ops->pin(), no explicit runtime pm wakeref is required in intel_context_pin(). Signed-off-by: Chris Wilson Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200109085717.873326-3-chris@chris-wilson.co.uk commit b11b28ea0dd16c9e13d279a9bdcf5b6eb3b5108a Author: Chris Wilson Date: Thu Jan 9 08:57:16 2020 +0000 drm/i915/gt: Pull context activation into central intel_context_pin() While this is encroaching on midlayer territory, having already made the state allocation a previous step in pinning, we can now pull the common intel_context_active_acquire() into intel_context_pin() itself. This is a prelude to make the activation a separate step inside pinning, outside of the ce->pin_mutex Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Cc: Tvrtko Ursulin Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200109085717.873326-2-chris@chris-wilson.co.uk commit 89f98d634f6b7a8433b59fef1543634b20fc18f2 Author: Chris Wilson Date: Thu Jan 9 08:57:15 2020 +0000 drm/i915/gt: Push context state allocation earlier Allow for knowledgeable users to preallocate the context state, and to separate the allocation step from the pinning step during intel_context_pin() Signed-off-by: Chris Wilson Cc: Maarten Lankhorst Cc: Tvrtko Ursulin Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200109085717.873326-1-chris@chris-wilson.co.uk commit baf98b0ad304e1959222c51b9ffc5c8f85865ca0 Author: Alexandre Courbot Date: Tue Jan 7 10:44:48 2020 +0100 media: mtk-vcodec: use v4l2_m2m_buffer where appropriate Despite using M2M in both the decoder and encoder, this driver used vb2_v4l2_buffer as its base buffer structure, and placed a list_head right after the buffer declaration in order to match the layout of a v4l2_m2m_buffer. This is very dangerous as it means the driver will break should the layout of v4l2_m2m_buffer change. Fix this by directly using v4l2_m2m_buffer and updating the sites that accessed the buffer accordingly. Signed-off-by: Alexandre Courbot Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: fix checkpatch warning] Signed-off-by: Mauro Carvalho Chehab commit b0e4cfae483fe1e3db71ab2d8509490df60e52c6 Author: Aditya Pakki Date: Mon Jan 6 15:32:51 2020 +0100 media: davinci/vpfe_capture.c: Avoid BUG_ON for register failure In vpfe_register_ccdc_device(), failure to allocate dev->hw_ops fields calls BUG_ON(). This patch returns the error to callers instead of crashing. The issue was identified by a static analysis tool, written by us. Signed-off-by: Aditya Pakki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1429b568ad71943a374aa4a8d3772d5a8816ddba Author: Julia Lawall Date: Wed Jan 1 18:49:49 2020 +0100 x86/crash: Use resource_size() Use resource_size() rather than a verbose computation on the end and start fields. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) @@ struct resource ptr; @@ - (ptr.end - ptr.start + 1) + resource_size(&ptr) Signed-off-by: Julia Lawall Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/1577900990-8588-10-git-send-email-Julia.Lawall@inria.fr commit 7fcaed4ab4bc454757da266076f4b28fa93f54d1 Author: Jernej Skrabec Date: Fri Dec 13 17:15:16 2019 +0100 media: cedrus: hevc: Add luma bit depth Add luma bit depth. Signed-off-by: Jernej Skrabec Acked-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7678c5462680c1aba8d07926ab4d8ee906fb98cf Author: Jernej Skrabec Date: Fri Dec 13 17:15:15 2019 +0100 media: cedrus: Fix decoding for some HEVC videos It seems that for some HEVC videos at least one bitstream parsing trigger must be called in order to be decoded correctly. There is no explanation why this helps, but it was observed that several videos with this fix are now decoded correctly and there is no regression with others. Without this fix, those same videos totally crash HEVC decoder (other decoder engines are unaffected). After decoding those problematic videos, HEVC decoder always returns only green image (all zeros). Only complete HW reset helps. This fix is similar to that for H264. Signed-off-by: Jernej Skrabec Acked-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b47a36982dbdcd9d96fdce5169af984ef5bdd110 Author: Benjamin Thiel Date: Thu Jan 9 13:17:23 2020 +0100 x86/cpu: Add a missing prototype for arch_smt_update() .. in order to fix a -Wmissing-prototype warning. No functional change. Signed-off-by: Benjamin Thiel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200109121723.8151-1-b.thiel@posteo.de commit 8ae7d44239305362319f3ea32e4e1fd3181649cc Author: Krzysztof Kozlowski Date: Wed Jan 8 20:43:19 2020 +0100 spi: sh-msiof: Do not redefine STR while compile testing STR is a well-known stringify macro so it should be avoided in drivers to avoid warnings like this (MIPS architecture while compile testing): drivers/spi/spi-sh-msiof.c:76:0: warning: "STR" redefined #define STR 0x40 /* Status Register */ arch/mips/include/asm/mipsregs.h:30:0: note: this is the location of the previous definition #define STR(x) __STR(x) To maintain consistency between all register names add a SI prefix to all of them. This also matches register names in datasheet. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200108194319.3171-1-krzk@kernel.org Signed-off-by: Mark Brown commit 62fa3bc5c36354ae5b70eb0e74f7956d61ac5299 Author: Michal Simek Date: Wed Apr 3 12:43:57 2019 +0200 microblaze: Align comments with register usage Trivial patch. Signed-off-by: Michal Simek commit 2dc98af62c32ff6c8b9a32365346c5c407e291a8 Author: Marek Szyprowski Date: Wed Jan 8 12:50:07 2020 +0100 ASoC: max98090: fix lockdep warning Commit 62d5ae4cafb7 ("ASoC: max98090: save and restore SHDN when changing sensitive registers") extended the code for handling many controls by adding a custom put function to them. That new custom put function properly handles relations between codec's hardware registers. However they used card->dapm_mutex to properly serialize those operations. This in turn triggers a lockdep warning about possible circular dependency. Fix this by introducing a separate mutex only for serializing the SHDN hardware register related operations. This fixes the following lockdep warning observed on Exynos4412-based Odroid U3 board: ====================================================== WARNING: possible circular locking dependency detected 5.5.0-rc5-next-20200107 #166 Not tainted ------------------------------------------------------ alsactl/1104 is trying to acquire lock: ed0d50f4 (&card->dapm_mutex){+.+.}, at: max98090_shdn_save+0x1c/0x28 but task is already holding lock: edb4b49c (&card->controls_rwsem){++++}, at: snd_ctl_ioctl+0xcc/0xbb8 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&card->controls_rwsem){++++}: snd_ctl_add_replace+0x3c/0x84 dapm_create_or_share_kcontrol+0x24c/0x2e0 snd_soc_dapm_new_widgets+0x308/0x594 snd_soc_bind_card+0x80c/0xad4 devm_snd_soc_register_card+0x34/0x6c odroid_audio_probe+0x288/0x34c platform_drv_probe+0x6c/0xa4 really_probe+0x200/0x490 driver_probe_device+0x78/0x1f8 bus_for_each_drv+0x74/0xb8 __device_attach+0xd4/0x16c bus_probe_device+0x88/0x90 deferred_probe_work_func+0x3c/0xd0 process_one_work+0x22c/0x7c4 worker_thread+0x44/0x524 kthread+0x130/0x164 ret_from_fork+0x14/0x20 0x0 -> #0 (&card->dapm_mutex){+.+.}: lock_acquire+0xe8/0x270 __mutex_lock+0x9c/0xb18 mutex_lock_nested+0x1c/0x24 max98090_shdn_save+0x1c/0x28 max98090_put_enum_double+0x20/0x40 snd_ctl_ioctl+0x190/0xbb8 ksys_ioctl+0x470/0xaf8 ret_fast_syscall+0x0/0x28 0xbefaa564 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&card->controls_rwsem); lock(&card->dapm_mutex); lock(&card->controls_rwsem); lock(&card->dapm_mutex); *** DEADLOCK *** 1 lock held by alsactl/1104: #0: edb4b49c (&card->controls_rwsem){++++}, at: snd_ctl_ioctl+0xcc/0xbb8 stack backtrace: CPU: 0 PID: 1104 Comm: alsactl Not tainted 5.5.0-rc5-next-20200107 #166 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) (unwind_backtrace) from [] (show_stack+0x10/0x14) (show_stack) from [] (dump_stack+0xb4/0xe0) (dump_stack) from [] (check_noncircular+0x1ec/0x208) (check_noncircular) from [] (__lock_acquire+0x1210/0x25ec) (__lock_acquire) from [] (lock_acquire+0xe8/0x270) (lock_acquire) from [] (__mutex_lock+0x9c/0xb18) (__mutex_lock) from [] (mutex_lock_nested+0x1c/0x24) (mutex_lock_nested) from [] (max98090_shdn_save+0x1c/0x28) (max98090_shdn_save) from [] (max98090_put_enum_double+0x20/0x40) (max98090_put_enum_double) from [] (snd_ctl_ioctl+0x190/0xbb8) (snd_ctl_ioctl) from [] (ksys_ioctl+0x470/0xaf8) (ksys_ioctl) from [] (ret_fast_syscall+0x0/0x28) ... Fixes: 62d5ae4cafb7 ("ASoC: max98090: save and restore SHDN when changing sensitive registers") Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200108115007.31095-2-m.szyprowski@samsung.com Signed-off-by: Mark Brown commit 4e93c1294f4b051d574d6bc59755d2863286990e Author: Marek Szyprowski Date: Wed Jan 8 12:50:06 2020 +0100 ASoC: max98090: fix incorrect helper in max98090_dapm_put_enum_double() Commit 62d5ae4cafb7 ("ASoC: max98090: save and restore SHDN when changing sensitive registers") extended the code for handling "LTENL Mux", "LTENR Mux", "LBENL Mux" and "LBENR Mux" controls by adding a custom max98090_dapm_put_enum_double() function to them. However that function used incorrect helper to get its component object. Fix this by using the proper snd_soc_dapm_* helper. This fixes the following NULL pointer exception observed on Exynos4412-based Odroid U3 board: 8<--- cut here --- Unable to handle kernel NULL pointer dereference at virtual address 000000b0 pgd = (ptrval) [000000b0] *pgd=00000000 Internal error: Oops: 5 [#1] PREEMPT SMP ARM Modules linked in: CPU: 0 PID: 1104 Comm: alsactl Not tainted 5.5.0-rc5-next-20200107 #166 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) PC is at __mutex_lock+0x54/0xb18 LR is at ___might_sleep+0x3c/0x2e0 ... Process alsactl (pid: 1104, stack limit = 0x(ptrval)) ... [] (__mutex_lock) from [] (mutex_lock_nested+0x1c/0x24) [] (mutex_lock_nested) from [] (max98090_shdn_save+0x1c/0x28) [] (max98090_shdn_save) from [] (max98090_dapm_put_enum_double+0x20/0x40) [] (max98090_dapm_put_enum_double) from [] (snd_ctl_ioctl+0x190/0xbb8) [] (snd_ctl_ioctl) from [] (ksys_ioctl+0x470/0xaf8) [] (ksys_ioctl) from [] (ret_fast_syscall+0x0/0x28) ... ---[ end trace 0e93f0580f4b9241 ]--- Fixes: 62d5ae4cafb7 ("ASoC: max98090: save and restore SHDN when changing sensitive registers") Signed-off-by: Marek Szyprowski Reviewed-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200108115007.31095-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown commit 1d7b051891722a36ee0b228bc940dd245f161ab1 Author: Marek Szyprowski Date: Wed Jan 8 12:50:06 2020 +0100 ASoC: max98090: fix incorrect helper in max98090_dapm_put_enum_double() Commit 62d5ae4cafb7 ("ASoC: max98090: save and restore SHDN when changing sensitive registers") extended the code for handling "LTENL Mux", "LTENR Mux", "LBENL Mux" and "LBENR Mux" controls by adding a custom max98090_dapm_put_enum_double() function to them. However that function used incorrect helper to get its component object. Fix this by using the proper snd_soc_dapm_* helper. This fixes the following NULL pointer exception observed on Exynos4412-based Odroid U3 board: 8<--- cut here --- Unable to handle kernel NULL pointer dereference at virtual address 000000b0 pgd = (ptrval) [000000b0] *pgd=00000000 Internal error: Oops: 5 [#1] PREEMPT SMP ARM Modules linked in: CPU: 0 PID: 1104 Comm: alsactl Not tainted 5.5.0-rc5-next-20200107 #166 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) PC is at __mutex_lock+0x54/0xb18 LR is at ___might_sleep+0x3c/0x2e0 ... Process alsactl (pid: 1104, stack limit = 0x(ptrval)) ... [] (__mutex_lock) from [] (mutex_lock_nested+0x1c/0x24) [] (mutex_lock_nested) from [] (max98090_shdn_save+0x1c/0x28) [] (max98090_shdn_save) from [] (max98090_dapm_put_enum_double+0x20/0x40) [] (max98090_dapm_put_enum_double) from [] (snd_ctl_ioctl+0x190/0xbb8) [] (snd_ctl_ioctl) from [] (ksys_ioctl+0x470/0xaf8) [] (ksys_ioctl) from [] (ret_fast_syscall+0x0/0x28) ... ---[ end trace 0e93f0580f4b9241 ]--- Fixes: 62d5ae4cafb7 ("ASoC: max98090: save and restore SHDN when changing sensitive registers") Signed-off-by: Marek Szyprowski Reviewed-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200108115007.31095-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown commit f0df2e650e3eee5ff79c06dedb98c318ff177a95 Author: Wei Yongjun Date: Wed Jan 8 03:59:54 2020 +0000 ASoC: amd: acp3x: Fix return value check in acp3x_dai_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: c9fe7db6e884 ("ASoC: amd: Refactoring of DAI from DMA driver") Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20200108035954.51317-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown commit 959b86ae37c672f6f6551f2ce1517668c791ba44 Author: Rajan Vaja Date: Thu Nov 7 01:44:16 2019 -0800 arm64: dts: xilinx: Add the power nodes for zynqmp Add power domain nodes for zynqmp. Signed-off-by: Rajan Vaja Signed-off-by: Michal Simek commit 4406486805bffbf245473e6111e2d7984550846e Author: Rajan Vaja Date: Thu Nov 7 01:44:15 2019 -0800 arm64: dts: xilinx: Remove dtsi for fixed clock Currently CCF clocks sre used in zynqmp dts. So there is no use of dtsi for fixed clock. Remove dtsi for fixed clock. Signed-off-by: Rajan Vaja Signed-off-by: Michal Simek commit 9c8a47b484ed8d7b06b4ca0032e93c458c7b931e Author: Rajan Vaja Date: Thu Nov 7 01:44:14 2019 -0800 arm64: dts: xilinx: Add the clock nodes for zynqmp Add clock nodes for zynqmp based on CCF. Signed-off-by: Rajan Vaja Signed-off-by: Michal Simek commit feed5c7be22c25e9c777c821bcf955a13cf010ab Author: Chris Wilson Date: Thu Jan 9 08:51:42 2020 +0000 drm/i915: Pin the context as we work on it Since we now allow the intel_context_unpin() to run unserialised, we risk our operations under the intel_context_lock_pinned() being run as the context is unpinned (and thus invalidating our state). We can atomically acquire the pin, testing to see if it is pinned in the process, thus ensuring that the state remains consistent during the course of the whole operation. Fixes: 841350223816 ("drm/i915/gt: Drop mutex serialisation between context pin/unpin") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200109085142.871563-1-chris@chris-wilson.co.uk commit 921f0c47f22891c90e2eb8f8612a083669c5d1ca Author: Tvrtko Ursulin Date: Wed Jan 8 16:19:54 2020 +0000 drm/i915: Revert "drm/i915/tgl: Wa_1607138340" This reverts commit 08fff7aeddc9dd72161b4c8fc27fbab12b4b9352. For some yet unexplained reason not having this improves stability of some media workloads. Promise is that the media hang will be root caused properly and in the meantime absence of this workaround is unlikely to cause problems. Signed-off-by: Tvrtko Ursulin Cc: Sudeep Dutt Cc: Francesco Balestrieri Cc: Mika Kuoppala Cc: Tony Ye Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200108161954.29739-1-tvrtko.ursulin@linux.intel.com commit 6fd622c226e6d8387bc5340bfb2f2ca7ef28da07 Author: Dilip Kota Date: Mon Dec 9 11:20:06 2019 +0800 PCI: artpec6: Configure FTS with dwc helper function Use DesignWare helper functions to configure Fast Training Sequence. Drop the respective code in the driver. Signed-off-by: Dilip Kota Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray commit ed22aaaede44f647477a5048e62855c0ed49c9bd Author: Dilip Kota Date: Mon Dec 9 11:20:05 2019 +0800 PCI: dwc: intel: PCIe RC controller driver Add support to PCIe RC controller on Intel Gateway SoCs. PCIe controller is based of Synopsys DesignWare PCIe core. Intel PCIe driver requires Upconfigure support, Fast Training Sequence and link speed configurations. So adding the respective helper functions in the PCIe DesignWare framework. It also programs hardware autonomous speed during speed configuration so defining it in pci_regs.h. Also, mark Intel PCIe driver depends on MSI IRQ Domain as Synopsys DesignWare framework depends on the PCI_MSI_IRQ_DOMAIN. Signed-off-by: Dilip Kota Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Reviewed-by: Andy Shevchenko Acked-by: Gustavo Pimentel commit e4add247789e4ba5e08ad8256183ce2e211877d4 Author: Masami Hiramatsu Date: Tue Jan 7 23:42:24 2020 +0900 kprobes: Fix optimize_kprobe()/unoptimize_kprobe() cancellation logic optimize_kprobe() and unoptimize_kprobe() cancels if a given kprobe is on the optimizing_list or unoptimizing_list already. However, since the following commit: f66c0447cca1 ("kprobes: Set unoptimized flag after unoptimizing code") modified the update timing of the KPROBE_FLAG_OPTIMIZED, it doesn't work as expected anymore. The optimized_kprobe could be in the following states: - [optimizing]: Before inserting jump instruction op.kp->flags has KPROBE_FLAG_OPTIMIZED and op->list is not empty. - [optimized]: jump inserted op.kp->flags has KPROBE_FLAG_OPTIMIZED and op->list is empty. - [unoptimizing]: Before removing jump instruction (including unused optprobe) op.kp->flags has KPROBE_FLAG_OPTIMIZED and op->list is not empty. - [unoptimized]: jump removed op.kp->flags doesn't have KPROBE_FLAG_OPTIMIZED and op->list is empty. Current code mis-expects [unoptimizing] state doesn't have KPROBE_FLAG_OPTIMIZED, and that can cause incorrect results. To fix this, introduce optprobe_queued_unopt() to distinguish [optimizing] and [unoptimizing] states and fixes the logic in optimize_kprobe() and unoptimize_kprobe(). [ mingo: Cleaned up the changelog and the code a bit. ] Signed-off-by: Masami Hiramatsu Reviewed-by: Steven Rostedt (VMware) Cc: Alexei Starovoitov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bristot@redhat.com Fixes: f66c0447cca1 ("kprobes: Set unoptimized flag after unoptimizing code") Link: https://lkml.kernel.org/r/157840814418.7181.13478003006386303481.stgit@devnote2 Signed-off-by: Ingo Molnar commit b2b1d94cdfd4e906d3936dab2850096a4a0c2017 Author: Jan Beulich Date: Mon Dec 16 11:40:03 2019 +0100 x86/entry/64: Add instruction suffix to SYSRET ignore_sysret() contains an unsuffixed SYSRET instruction. gas correctly interprets this as SYSRETL, but leaving it up to gas to guess when there is no register operand that implies a size is bad practice, and upstream gas is likely to warn about this in the future. Use SYSRETL explicitly. This does not change the assembled output. Signed-off-by: Jan Beulich Signed-off-by: Borislav Petkov Acked-by: Andy Lutomirski Link: https://lkml.kernel.org/r/038a7c35-062b-a285-c6d2-653b56585844@suse.com commit f8849332aeda1c3a28a0d1bfcaff90e089d0ebcf Author: Benjamin Gaignard Date: Wed Jan 8 14:26:46 2020 +0100 ARM: dts: stm32: Add power-supply for RGB panel on stm32429i-eval Add a fixed regulator and use it as power supply for RBG panel. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 0ff15a86d0c5a3f004fee2e92d65b88e56a3bc58 Author: Benjamin Gaignard Date: Wed Jan 8 14:26:47 2020 +0100 ARM: dts: stm32: Add power-supply for DSI panel on stm32f469-disco Add a fixed regulator and use it as power supply for DSI panel. Fixes: 18c8866266 ("ARM: dts: stm32: Add display support on stm32f469-disco") Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 11ee8c7e44f5e66a771d0a6e07d73a66b4a696f4 Author: Benjamin Gaignard Date: Thu Dec 19 15:41:17 2019 +0100 ARM: dts: stm32: change nvmem node name on stm32mp1 Change non volatile node name from nvmem to efuse to be compliant with yaml schema. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit f723d518bff3f86320bd56496c497f96a0f7499c Author: Benjamin Gaignard Date: Thu Dec 19 15:41:16 2019 +0100 ARM: dts: stm32: change nvmem node name on stm32f429 Change non volatile node name from nvmem to efuse to be compliant with yaml schema. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit a09c71817f73a1354b55513aaa5acb90d840fa8e Author: Arnaud Pouliquen Date: Thu Dec 19 13:18:15 2019 +0100 ARM: dts: stm32: update mlahb node according to the bindings on stm32mp15 Update of the mlahb node according to to DT bindings using json-schema Signed-off-by: Arnaud Pouliquen Signed-off-by: Alexandre Torgue commit a0fc09abf454938479986744ce41877fef9590fa Author: Benjamin Gaignard Date: Wed Dec 18 15:48:44 2019 +0100 ARM: dts: stm32: fix dma controller node name on stm32mp157c Modify dma controller nodes name to fit with the standard naming. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 6a60dc23a0dae18bc439e18a8e65185c77bf66f5 Author: Benjamin Gaignard Date: Wed Dec 18 15:48:43 2019 +0100 ARM: dts: stm32: fix dma controller node name on stm32f743 Modify dma controller nodes name to fit with the standard naming. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 5659be8dcf1cef531eea8b0418b032b73e854020 Author: Benjamin Gaignard Date: Wed Dec 18 15:48:42 2019 +0100 ARM: dts: stm32: fix dma controller node name on stm32f746 Modify dma controller nodes name to fit with the standard naming. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 6bdc753de6892d0c5f68a265499f206de901a958 Author: Amelie Delaunay Date: Thu Nov 21 17:12:00 2019 +0100 ARM: dts: stm32: add phy-names to usbotg_hs on stm32mp157c-ev1 phy-names is required by usbotg_hs driver to get the phy, otherwise, it considers that there is no phys property. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue commit 426c1e8fa7bf162b51f293a08afd1329dd32260d Author: Amelie Delaunay Date: Mon Dec 9 15:23:22 2019 +0100 ARM: dts: stm32: enable USB OTG HS on stm32mp15 DKx boards This patch enables USB OTG HS on stm32mp15 dkx in Peripheral mode. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue commit 5841d00fe059d9eaa1f8fb031af32e4a6a97c957 Author: Amelie Delaunay Date: Mon Dec 9 15:17:26 2019 +0100 ARM: dts: stm32: enable USB Host (USBH) EHCI controller on stm32mp15 DKx This patch enables USB Host (USBH) EHCI controller on stm32mp15 dk boards. As a hub is used between USBH and USB connectors, no need to enable USBH OHCI controller: all low- and full-speed traffic is managed by the hub. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue commit c10213273fe0b05e8c72d21318f9375d00531edf Author: Amelie Delaunay Date: Mon Dec 9 15:15:09 2019 +0100 ARM: dts: stm32: enable USBPHYC on stm32mp15 DKx boards This patch enables USBPHYC (USB PHY Controller on stm32mp15 DKx boards. This enables the two usbphyc usb2 ports, which require 3 supplies: 3v3, 1v1 and 1v8. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue commit af0c5330916a1ffd6cc0ffd6bea50688d99bf444 Author: Linus Walleij Date: Thu Jan 9 08:53:29 2020 +0100 pinctrl: intel: Pass irqchip when adding gpiochip We need to convert all old gpio irqchips to pass the irqchip setup along when adding the gpio_chip. For more info see drivers/gpio/TODO. For chained irqchips this is a pretty straight-forward conversion. Cc: Hans de Goede Signed-off-by: Linus Walleij Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 6d416b9bb577cc3013301cfccb0d938567af489d Author: Linus Walleij Date: Thu Jan 9 08:53:28 2020 +0100 pinctrl: intel: Add GPIO <-> pin mapping ranges via callback When IRQ chip is instantiated via GPIO library flow, the few functions, in particular the ACPI event registration mechanism, on some of ACPI based platforms expect that the pin ranges are initialized to that point. Add GPIO <-> pin mapping ranges via callback in the GPIO library flow. Cc: Hans de Goede Signed-off-by: Linus Walleij Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit e2b74419e5cc7cfc58f3e785849f73f8fa0af5b3 Author: Hans de Goede Date: Wed Jan 1 15:52:43 2020 +0100 pinctrl: baytrail: Replace WARN with dev_info_once when setting direct-irq pin to output Suspending Goodix touchscreens requires changing the interrupt pin to output before sending them a power-down command. Followed by wiggling the interrupt pin to wake the device up, after which it is put back in input mode. On Cherry Trail device the interrupt pin is listed as a GpioInt ACPI resource so we can do this without problems as long as we release the IRQ before changing the pin to output mode. On Bay Trail devices with a Goodix touchscreen direct-irq mode is used in combination with listing the pin as a normal GpioIo resource. This works fine, but this triggers the WARN in byt_gpio_set_direction-s output path because direct-irq support is enabled on the pin. This commit replaces the WARN call with a dev_info_once call, fixing a bunch of WARN splats in dmesg on each suspend/resume cycle. Signed-off-by: Hans de Goede Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit a23680594da7a9e2696dbcf4f023e9273e2fa40b Author: Hans de Goede Date: Sat Dec 28 00:04:47 2019 +0100 pinctrl: baytrail: Do not clear IRQ flags on direct-irq enabled pins Suspending Goodix touchscreens requires changing the interrupt pin to output before sending them a power-down command. Followed by wiggling the interrupt pin to wake the device up, after which it is put back in input mode. On Bay Trail devices with a Goodix touchscreen direct-irq mode is used in combination with listing the pin as a normal GpioIo resource. This works fine, until the goodix driver gets rmmod-ed and then insmod-ed again. In this case byt_gpio_disable_free() calls byt_gpio_clear_triggering() which clears the IRQ flags and after that the (direct) IRQ no longer triggers. This commit fixes this by adding a check for the BYT_DIRECT_IRQ_EN flag to byt_gpio_clear_triggering(). Note that byt_gpio_clear_triggering() only gets called from byt_gpio_disable_free() for direct-irq enabled pins, as these are excluded from the irq_valid mask by byt_init_irq_valid_mask(). Signed-off-by: Hans de Goede Acked-by: Mika Westerberg Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko commit c16b4571bb27df88708c4f1ce4e6d3d9008cc75c Author: Anson Huang Date: Wed Jan 8 15:25:29 2020 +0800 arm64: dts: imx8mn: Memory node should be in board DT Memory address/size depends on board design, so memory node should be in board DT. Signed-off-by: Anson Huang Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo commit e1437b09449afefeff7f4bfda0cb5961073f7a0e Author: Anson Huang Date: Wed Jan 8 15:25:28 2020 +0800 arm64: dts: imx8mm: Memory node should be in board DT Memory address/size depends on board design, so memory node should be in board DT. Signed-off-by: Anson Huang Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo commit c74067a0f776c1d695a713a4388c3b6a094ee40a Author: Arnd Bergmann Date: Tue Jan 7 22:51:39 2020 +0100 ARM: imx: only select ARM_ERRATA_814220 for ARMv7-A i.MX7D is supported for either the v7-A or the v7-M cores, but the latter causes a warning: WARNING: unmet direct dependencies detected for ARM_ERRATA_814220 Depends on [n]: CPU_V7 [=n] Selected by [y]: - SOC_IMX7D [=y] && ARCH_MXC [=y] && (ARCH_MULTI_V7 [=n] || ARM_SINGLE_ARMV7M [=y]) Make the select statement conditional. Fixes: 4562fa4c86c9 ("ARM: imx: Enable ARM_ERRATA_814220 for i.MX6UL and i.MX7D") Signed-off-by: Arnd Bergmann Signed-off-by: Shawn Guo commit 3b49b6cde5136972dfa417112a11583a6924204a Author: Fabio Estevam Date: Mon Jan 6 21:11:17 2020 -0300 ARM: dts: imx6ul-14x14-evk: Pass the "broken-cd" property imx6ul-14x14-evk does not have a GPIO dedicated for reading the card detect pin on the eSDHC2 micro-SD port. Pass the "broken-cd" property to describe the absence of the card detect GPIO so that polling must be used. According to Documentation/devicetree/bindings/mmc/mmc-controller.yaml: broken-cd: $ref: /schemas/types.yaml#/definitions/flag description: There is no card detection available; polling must be used. Even though no error is oberved in the kernel, the lack of the 'broken-cd' property caused the micro-SD to not be detected in U-Boot, so let's improve the device tree description to make it more accurate. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit aad2417502a1d54a1432cca7674438d27a05f764 Author: Horia Geantă Date: Mon Jan 6 22:01:54 2020 +0200 arm64: dts: imx8mn: add crypto node Add node for CAAM - Cryptographic Acceleration and Assurance Module. Signed-off-by: Horia Geantă Tested-by: Iuliana Prodan Reviewed-by: Iuliana Prodan Signed-off-by: Shawn Guo commit bb3bd0740db8b9dda69b048298eeee1bd74507d3 Author: Anson Huang Date: Mon Dec 30 09:41:11 2019 +0800 ARM: dts: imx6sl-tolino-shine3: Remove incorrect power supply assignment The vdd3p0 LDO's input should be from external USB VBUS directly, NOT PMIC's power supply, the vdd3p0 LDO's target output voltage can be controlled by SW, and it requires input voltage to be high enough, with incorrect power supply assigned, if the power supply's voltage is lower than the LDO target output voltage, it will return fail and skip the LDO voltage adjustment, so remove the power supply assignment for vdd3p0 to avoid such scenario. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 9df3adca0b4a96250db5826168fc022b2923272f Author: Dmitry Osipenko Date: Mon Jan 6 04:34:05 2020 +0300 usb: phy: tegra: Use generic stub for a missing VBUS regulator Regulator core provides dummy regulator if device-tree doesn't define VBUS regulator. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-10-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit b07e5f863f4352339438ec05fda6f86c3d3a3584 Author: Dmitry Osipenko Date: Mon Jan 6 04:34:04 2020 +0300 usb: phy: tegra: Use relaxed versions of readl/writel There is nothing to synchronize in regards to memory stores, thus all readl/writel occurrences in the code could be replaced with a relaxed versions, for consistency. Acked-by: Thierry Reding Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-9-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5bb69850ad41e8ce0b820d3b9e74d573f3bf1a2c Author: Dmitry Osipenko Date: Mon Jan 6 04:34:03 2020 +0300 usb: phy: tegra: Clean up included headers Add "spinlock.h", which was included indirectly, and sort includes in alphabet order. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-8-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 545592e8eb6f20341c8260ddd32a7407f8bfa5f2 Author: Dmitry Osipenko Date: Mon Jan 6 04:34:02 2020 +0300 usb: phy: tegra: Perform general clean up of the code This patch fixes few dozens of legit checkpatch warnings, adds missed handling of potential error-cases and prettifies code where makes sense. All these clean-up changes are quite minor and do not fix any real problems. Acked-by: Thierry Reding Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-7-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5dcdafdd30b1babde143ee7086d3de79396d023b Author: Dmitry Osipenko Date: Mon Jan 6 04:34:01 2020 +0300 usb: phy: tegra: Hook up init/shutdown callbacks Generic PHY provides init/shutdown callbacks which allow USB-host drivers to abstract PHY's hardware management in a common way. This change allows to remove Tegra-specific PHY handling from the ChipIdea driver. Note that ChipIdea's driver shall be changed at the same time because it turns PHY ON without the PHY's initialization and this doesn't work now, resulting in a NULL dereference of phy->freq because it's set during of the PHY's initialization. Acked-by: Peter Chen Acked-by: Thierry Reding Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-6-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 18bd8bff69f7fbc53903dba4a1c234a30a8fcbde Author: Dmitry Osipenko Date: Mon Jan 6 04:34:00 2020 +0300 usb: phy: tegra: Keep track of power on-off state The PHY driver should keep track of the enable state, otherwise enable refcount is screwed if USB driver tries to enable PHY when it is already enabled. This will be the case for ChipIdea and Tegra EHCI drivers once PHY driver will gain support for the init/shutdown callbacks. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-5-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 28d190ac437c675763f03b17407ea16c1dd8c613 Author: Dmitry Osipenko Date: Mon Jan 6 04:33:59 2020 +0300 usb: phy: tegra: Clean up ulpi_phy_power_off Firstly, the PHY's clock needs to unprepared to keep prepare count balanced. Secondly, downstream code suggests that reset is synchronous and thus it should be asserted before disabling clock. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-4-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 62a7f62891247e83b6a17cedae8f8ae15cff2c5e Author: Dmitry Osipenko Date: Mon Jan 6 04:33:58 2020 +0300 usb: host: ehci-tegra: Correct teardown order of driver's removal I found that PHY's enable refcounting was broken and after fixing it I also found that machine started to hang after EHCI driver module removal. Turned out that the teardown order is incorrect because HCD must be unregistered *before* PHY's disabling. Note that it is also not correct to assert the shared reset during of driver's removal because PHY takes care of resetting shared pads and thus it's better to remove that part from the EHCI driver. Signed-off-by: Dmitry Osipenko Acked-by: Alan Stern Link: https://lore.kernel.org/r/20200106013416.9604-3-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0bb207acd37bd087d8eb424aacb23fb1ecdc232b Author: Dmitry Osipenko Date: Mon Jan 6 04:33:57 2020 +0300 dt-binding: usb: ci-hdrc-usb2: Document NVIDIA Tegra support NVIDIA Tegra SoCs use ChipIdea silicon IP for the USB controllers. Acked-by: Peter Chen Acked-by: Thierry Reding Acked-by: Rob Herring Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200106013416.9604-2-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit dea7b202bd9c03a2523c4c908f117d271a2b2d10 Author: Krzysztof Kozlowski Date: Sat Jan 4 16:20:55 2020 +0100 usb: exynos: Rename Samsung and Exynos to lowercase Fix up inconsistent usage of upper and lowercase letters in "Samsung" and "Exynos" names. "SAMSUNG" and "EXYNOS" are not abbreviations but regular trademarked names. Therefore they should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Although advertisement materials usually use uppercase "SAMSUNG", the lowercase version is used in all legal aspects (e.g. on Wikipedia and in privacy/legal statements on https://www.samsung.com/semiconductor/privacy-global/). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200104152107.11407-9-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1c89074bf85068d1b86f2e0f0c2110fdd9b83c9f Author: Khouloud Touil Date: Thu Jan 9 10:51:13 2020 +0100 eeprom: at24: remove the write-protect pin support NVMEM framework is an interface for the at24 EEPROMs as well as for other drivers, instead of passing the wp-gpios over the different drivers each time, it would be better to pass it over the NVMEM subsystem once and for all. Removing the support for the write-protect pin after adding it to the NVMEM subsystem. Signed-off-by: Khouloud Touil Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 0f37a607091c30c2270d9065e8808a7d6ff34646 Author: Heikki Krogerus Date: Mon Dec 30 17:26:09 2019 +0300 usb: typec: Provide definitions for the USB modes Defining the USB modes from the latest USB Power Delivery Specification - USB 2.0, USB 3.2 and USB4 - as special modal states just like the Accessory Modes. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20191230142611.24921-14-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 87e3daa005cfba19433b5429bfbca9b848925507 Author: Heikki Krogerus Date: Mon Dec 30 17:26:08 2019 +0300 usb: typec: Give the mux drivers all the details regarding the port state Passing all the details that the alternate mode drivers provide to the mux drivers during mode changes. The mux drivers will in practice need to be able to make decisions on their own. It is not enough that they get only the requested port state. With the Thunderbolt 3 alternate mode for example the mux driver will need to consider also the capabilities of the cable before configuring the mux. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20191230142611.24921-13-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0ac53493296801b01c326507af3db093b95f6fb0 Author: Heikki Krogerus Date: Mon Dec 30 17:26:07 2019 +0300 usb: typec: Add definitions for the latest specification releases Adding definitions for USB Type-C Specification Release 1.3, 1.4 and 2.0. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20191230142611.24921-12-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f6c56ca91b92088cf2f4075c1aa7c57ea89f7327 Author: Heikki Krogerus Date: Mon Dec 30 17:26:06 2019 +0300 usb: typec: Add the Product Type VDOs to struct usb_pd_identity Discover Identity command response has also 3 product type specific VDOs on top of ID Header VDO, Cert Stat VDO and Product VDO. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20191230142611.24921-11-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 6c57a664c4871549ceb85ccde9600bd5287dd319 Author: Khouloud Touil Date: Tue Jan 7 10:29:20 2020 +0100 dt-bindings: at24: make wp-gpios a reference to the property defined by nvmem NVMEM framework is an interface for the at24 EEPROMs as well as for other drivers, instead of passing the wp-gpios over the different drivers each time, it would be better to pass it over the NVMEM subsystem once and for all. Making wp-gpios a reference to the property defined by nvmem. Signed-off-by: Khouloud Touil Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Bartosz Golaszewski commit d48ece0bce2d733c1c831d64751c0acaee1e8dc9 Author: Heikki Krogerus Date: Mon Dec 30 17:26:05 2019 +0300 usb: pd: Add definition for DFP and UFP1 VDOs The latest version of the USB Power Delivery Specification R3.0 added UFP and DFP product types for the Discover Identity message. Both types can be used for example for checking the USB capability of the partner, which means the USB modes (USB 2.0, USB 3.0 and USB4) that the partner device supports. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20191230142611.24921-10-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7823905de0c6c319995d710bb67f761681dc7e4e Author: Heikki Krogerus Date: Mon Dec 30 17:26:04 2019 +0300 usb: pd: Add definitions for the Enter_USB message Version 2.0 of the USB Power Delivery Specification R3.0 defines a new message called Enter_USB, which is made with USB4 in mind. Enter_USB message is in practice the same as the Enter Mode command (used when entering alternate modes) that just needs to be used when entering USB4 mode. The message does also support entering USB 2.0 or USB 3.2 mode instead of USB4 mode, but it is only required with USB4. I.e. with USB2 and USB3 Enter_USB message is optional. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20191230142611.24921-9-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2a127da461a9d8d97782d6e82b227041393eb4d2 Author: Khouloud Touil Date: Tue Jan 7 10:29:19 2020 +0100 nvmem: add support for the write-protect pin The write-protect pin handling looks like a standard property that could benefit other users if available in the core nvmem framework. Instead of modifying all the memory drivers to check this pin, make the NVMEM subsystem check if the write-protect GPIO being passed through the nvmem_config or defined in the device tree and pull it low whenever writing to the memory. There was a suggestion for introducing the gpiodesc from pdata, but as pdata is already removed it could be replaced by adding it to nvmem_config. Reference: https://lists.96boards.org/pipermail/dev/2018-August/001056.html Signed-off-by: Khouloud Touil Reviewed-by: Linus Walleij Acked-by: Srinivas Kandagatla Signed-off-by: Bartosz Golaszewski commit b66b40ee7d0d376a725fde2b6d951a37cb3062c6 Author: Heikki Krogerus Date: Mon Dec 30 17:25:59 2019 +0300 usb: typec: More API for cable handling Thunderbolt 3, and probable USB4 too, will need to be able to get details about the cables. Adding typec_cable_get() function that the alternate mode drivers can use to gain access to gain access to the cable. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20191230142611.24921-4-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 8face9aa57c8335b2d698a70bcfaaaa46dd36b93 Author: Heikki Krogerus Date: Mon Dec 30 17:25:58 2019 +0300 usb: typec: Add parameter for the VDO to typec_altmode_enter() Enter Mode Command may contain one VDO. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20191230142611.24921-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit cf2f58fb88d9494ceff4516ad4bddc54bf56f426 Author: Heikki Krogerus Date: Mon Dec 30 17:25:57 2019 +0300 usb: typec: Block mode entry if the port has the mode disabled Originally the port drivers were expected to check does the connector have the mode enabled or disabled when the alt mode drivers attempted to enter the mode, but since typec_altmode_enter() puts the connector into USB Safe State before calling the port driver, it really has to do the check on its own, and before changing the state. Otherwise the connector may be left in USB Safe State if the port driver does not move it back to normal USB operation when the mode is disabled. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20191230142611.24921-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 14f4957313fbf575c7bbd37d45cb148e11fdbc20 Author: Khouloud Touil Date: Tue Jan 7 10:29:18 2020 +0100 dt-bindings: nvmem: new optional property wp-gpios Several memories have a write-protect pin, that when pulled high, it blocks the write operation. On some boards, this pin is connected to a GPIO and pulled high by default, which forces the user to manually change its state before writing. Instead of modifying all the memory drivers to check this pin, make the NVMEM subsystem check if the write-protect GPIO being passed through the nvmem_config or defined in the device tree and pull it low whenever writing to the memory. Add a new optional property to the device tree binding document, which allows to specify the GPIO line to which the write-protect pin is connected. Signed-off-by: Khouloud Touil Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Bartosz Golaszewski commit 1e4d149e901769fcde71be039227d184c6e4fda9 Author: Ooi, Joyce Date: Thu Jan 9 00:16:20 2020 +0800 gpio: altera: change to platform_get_irq_optional to avoid false-positive error This patch switches to platform_get_irq_optional() from platform_get_irq() as it causes a false-positive error such as 'IRQ index 0 not found' when IRQ is not used. The IRQ usage is optional in this gpio-altera driver, so the error log is undesirable. Signed-off-by: Ooi, Joyce Signed-off-by: Bartosz Golaszewski commit 5eb5afb07853d6e90d3a2b230c825e028e948f79 Author: Dmitry Torokhov Date: Fri Dec 13 09:46:23 2019 -0800 usb: dwc3: use proper initializers for property entries We should not be reaching into property entries and initialize them by hand, but rather use proper initializer macros. This way we can alter internal representation of property entries with no visible changes to their users. Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Dmitry Torokhov Acked-by: Hans de Goede Acked-by: Felipe Balbi Signed-off-by: Rafael J. Wysocki commit f52cdcce9197fef9d4a68792dd3b840ad2b77117 Author: Daniel Baluta Date: Sat Jan 4 15:39:53 2020 +0000 firmware: imx: Allow IMX DSP to be selected as module IMX DSP is only needed by SOF or any other module that wants to communicate with the DSP. When SOF is build as a module IMX DSP is forced to be built inside the kernel image. This is not optimal, so allow IMX DSP to be built as a module. Signed-off-by: Daniel Baluta Signed-off-by: Shawn Guo commit 83a4c74c019504c7334b48dd1f592878b51a65d7 Author: Krzysztof Kozlowski Date: Fri Jan 3 23:05:57 2020 +0100 soc: imx: Enable compile testing of IMX_SCU_SOC IMX_SCU_SOC can be compile tested to increase build coverage. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 819b5beb62c627e25fe4f1364fcef96f60b49639 Author: Fabio Estevam Date: Thu Jan 2 00:57:18 2020 +0100 ARM: dts: imx7d-pico: Add LCD support Add support for the VXT VL050-8048NT-C01 panel connected through the 24 bit parallel LCDIF interface. Signed-off-by: Fabio Estevam Signed-off-by: Otavio Salvador Signed-off-by: Joris Offouga Signed-off-by: Shawn Guo commit 539bbf31887ececa50532ccfc5086f0c18818601 Author: Hans Verkuil Date: Fri Dec 6 12:26:08 2019 +0100 drm/Kconfig: add missing 'depends on DRM' for DRM_DP_CEC Add a missing 'depends on DRM' for the DRM_DP_CEC config option. Without that enabling DRM_DP_CEC will force CEC_CORE to =y instead of =m if DRM=m as well. Signed-off-by: Hans Verkuil Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/489bdaae-9b05-2d70-12e1-4fda7899dfc1@xs4all.nl commit 785331b35bfa733d2c19358f88f4d09088cf7d76 Author: Baruch Siach Date: Wed Jan 1 18:49:07 2020 +0200 arm64: dts: imx8mq-hummingboard-pulse: add eeprom description Add DT node for the eeprom data storage on SolidRun Hummingboard Pulse carrier board. Signed-off-by: Baruch Siach Signed-off-by: Shawn Guo commit 67f2fd0298963a16082f98de672e1190215e034d Author: Baruch Siach Date: Wed Jan 1 18:49:06 2020 +0200 arm64: dts: imx8mq-sr-som: add eeprom description Add DT node for the eeprom data storage on SolidRun i.MX8M SOM. Signed-off-by: Baruch Siach Signed-off-by: Shawn Guo commit a5972e931576aa4e79cf7ddf3818951e4e086398 Author: Chris Wilson Date: Wed Jan 8 15:35:50 2020 +0000 drm/i915: Reduce warning for i915_vma_pin_iomap() without runtime-pm Access through the GGTT (iomap) into the vma does require the device to be awake. However, we often take the i915_vma_pin_iomap() as an early preparatory step that is long before we use the iomap. Asserting that the device is awake at pin time does not protect us, and is merely a nuisance. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200108153550.3803446-2-chris@chris-wilson.co.uk commit 93db1cb4029290125048bca712d7f6c916a6e02e Author: Chris Wilson Date: Wed Jan 8 15:35:49 2020 +0000 drm/i915: Early return for no-op i915_vma_pin_fence() If we have no fence and desire no fence on the vma, return before we try and take the vm->mutex. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200108153550.3803446-1-chris@chris-wilson.co.uk commit 6e8b0f53c328c4065c53bca4577f428ddd11b103 Author: Chris Wilson Date: Tue Jan 7 14:38:26 2020 +0000 drm/i915/gt: Drop a defunct timeline assertion intel_timeline_enter() has been decoupled from intel_timeline_pin() and both enter/exit & pin/unpin are allowed [read expected] to run concurrently with one another. The assertion that they had better not is stale. Closes: https://gitlab.freedesktop.org/drm/intel/issues/940 References: a6edbca74b30 ("drm/i915/gt: Close race between engine_park and intel_gt_retire_requests") Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200107143826.3298401-1-chris@chris-wilson.co.uk commit 18f662a738629ea6073195ae58acad0d0fa3315b Author: Anson Huang Date: Thu Dec 26 14:40:02 2019 +0800 soc: imx: Add i.MX8MP SoC driver support Add i.MX8MP SoC driver support: root@imx8mpevk:~# cat /sys/devices/soc0/family Freescale i.MX root@imx8mpevk:~# cat /sys/devices/soc0/machine FSL i.MX8MP EVK root@imx8mpevk:~# cat /sys/devices/soc0/soc_id i.MX8MP root@imx8mpevk:~# cat /sys/devices/soc0/revision 1.0 Signed-off-by: Anson Huang Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit 99c2e3793f93739e3a9f49afe4366e8d1648656c Author: Michael Trimarchi Date: Mon Dec 30 17:30:21 2019 +0530 ARM: dts: imx6qdl-icore: Add fec phy-handle LAN8720 needs a reset of every clock enable. The reset needs to be done at device level, due the flag PHY_RST_AFTER_CLK_EN. So, add phy-handle by creating mdio child node inside fec. This will eventually move the phy-reset-gpio which is defined in fec node. Signed-off-by: Michael Trimarchi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo commit b3d18de3e8231d15a0260a09e79ee4435f8d9161 Author: Michael Trimarchi Date: Mon Dec 30 17:30:20 2019 +0530 ARM: dts: imx6qdl-icore-1.5: Remove duplicate phy reset methods Engicam i.CoreM6 1.5 Quad/Dual MIPI dtsi is reusing fec node from Engicam i.CoreM6 dtsi but have sampe copy of phy-reset-gpio and phy-mode properties. So, drop this phy reset methods from imx6qdl-icore-1.5 dsti file. Cc: Jacopo Mondi Signed-off-by: Michael Trimarchi Signed-off-by: Jagan Teki Tested-by: Jacopo Mondi Signed-off-by: Shawn Guo commit ff80398d2a11c6e22c9aae47b3fd01a48d377552 Author: Fabio Estevam Date: Mon Dec 23 09:07:19 2019 -0300 ARM: dts: imx7: Unify temp-grade and speed-grade nodes The following warning is seen when building with W=1: arch/arm/boot/dts/imx7s.dtsi:551.39-553.7: Warning (unique_unit_address): /soc/aips-bus@30000000/ocotp-ctrl@30350000/temp-grade@10: duplicate unit-address (also used in node /soc/aips-bus@30000000/ocotp-ctrl@30350000/speed-grade@10) Since temp-grade and speed-grade point to the same node, replace them by a single one to avoid the duplicate unit-address warning. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 73d582606a8b1c26db9ad52ad38fe8ba3fcf1ae5 Author: Kuldeep Singh Date: Sat Dec 21 00:22:34 2019 +0530 arm64: dts: ls208xa: Update qspi node properties for LS2088ARDB LS2088ADB has one spansion flash s25fs512s of size 64M. Add qspi dts entry for the board using compatibles as "jedec,spi-nor" to probe flash successfully. Also, align properties with other board dts properties. Use dt-bindings constants in interrupts instead of using numbers. Signed-off-by: Kuldeep Singh Signed-off-by: Shawn Guo commit a52e537da7e900518e13503a957f15bf3ac901a9 Author: Marco Felsch Date: Fri Nov 29 17:48:59 2019 +0100 ARM: dts: imx6: phycore-som: add pmic onkey device Without the onkey device it isn't possible to power off the system using the X_PMIC_nONKEY signal which is routed to the SoM pin header. Signed-off-by: Marco Felsch Signed-off-by: Shawn Guo commit d611f817ecb4cce3969db10ddf10804b8457bcf8 Author: Manivannan Sadhasivam Date: Wed Oct 30 14:31:22 2019 +0530 dt-bindings: arm: Add devicetree binding for Thor96 Board Add devicetree binding for Thor96 Board from Einfochips. This board is one of the 96Boards Consumer Edition platform powered by NXP i.MX8MQ SoC. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Marco Felsch Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 68ca364d48127f6fc688d790984c11e1e7b68ab8 Author: Manivannan Sadhasivam Date: Wed Oct 30 14:31:23 2019 +0530 arm64: dts: freescale: Add devicetree support for Thor96 board Add devicetree support for Thor96 board from Einfochips. This board is one of the 96Boards Consumer Edition platform powered by the NXP i.MX8MQ SoC. Following are the features supported currently: 1. uSD 2. WiFi/BT 3. Ethernet 4. EEPROM (M24256) 5. NOR Flash (W25Q256JW) 6. 2xUSB3.0 ports and 1xUSB2.0 port at HS expansion More information about this board can be found in Arrow website: https://www.arrow.com/en/products/i.imx8-thor96/arrow-development-tools Link to 96Boards CE Specification: https://linaro.co/ce-specification Signed-off-by: Darshak Patel [Mani: cleaned up for upstream] Signed-off-by: Manivannan Sadhasivam Signed-off-by: Shawn Guo commit 240a25720925b5033a27863fb051a2c384a4dd64 Author: Paul Cercueil Date: Wed Jan 8 21:30:00 2020 -0300 dt-bindings: panel-simple: Add compatible for Sharp LS020B1DD01D Add a compatible string for the Sharp LS020B1DD01D 2" HQVGA TFT LCD panel, and remove the old sharp,ls020b1dd01d.txt documentation which is now obsolete. Signed-off-by: Paul Cercueil Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200109003000.119516-2-paul@crapouillou.net commit 2ae4829d222e9ad066b1bcbdabefc3e5d039d46c Author: Paul Cercueil Date: Wed Jan 8 21:29:59 2020 -0300 dt-bindings: panel-simple: Add compatible for GiantPlus GPM940B0 Add a compatible string for the GiantPlus GPM740B0 3" QVGA TFT LCD panel, and remove the old giantplus,gpm740b0.txt documentation which is now obsolete. Signed-off-by: Paul Cercueil Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200109003000.119516-1-paul@crapouillou.net commit b279997f6c60ab05b5548f2e22c11501be799369 Author: Krzysztof Kozlowski Date: Sat Jan 4 16:20:59 2020 +0100 crypto: exynos-rng - Rename Exynos to lowercase Fix up inconsistent usage of upper and lowercase letters in "Exynos" name. "EXYNOS" is not an abbreviation but a regular trademarked name. Therefore it should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit c0271a053612c61441a06a4416f1181e46270479 Author: Ayush Sawal Date: Fri Jan 3 10:26:51 2020 +0530 crypto: chelsio - Resetting crypto counters during the driver unregister Signed-off-by: Ayush Sawal Signed-off-by: Herbert Xu commit d4fdc2dfaa755e0bf22de6a2774cac2e5ae45cf4 Author: Eric Biggers Date: Thu Jan 2 20:04:40 2020 -0800 crypto: algapi - enforce that all instances have a ->free() method All instances need to have a ->free() method, but people could forget to set it and then not notice if the instance is never unregistered. To help detect this bug earlier, don't allow an instance without a ->free() method to be registered, and complain loudly if someone tries to do it. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit a24a1fd731274ebbca873000e2c7fbe8224ae4c8 Author: Eric Biggers Date: Thu Jan 2 20:04:39 2020 -0800 crypto: algapi - remove crypto_template::{alloc,free}() Now that all templates provide a ->create() method which creates an instance, installs a strongly-typed ->free() method directly to it, and registers it, the older ->alloc() and ->free() methods in 'struct crypto_template' are no longer used. Remove them. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit a39c66cc2f6108c8346dc882bdcf72861aaca956 Author: Eric Biggers Date: Thu Jan 2 20:04:38 2020 -0800 crypto: shash - convert shash_free_instance() to new style Convert shash_free_instance() and its users to the new way of freeing instances, where a ->free() method is installed to the instance struct itself. This replaces the weakly-typed method crypto_template::free(). This will allow removing support for the old way of freeing instances. Also give shash_free_instance() a more descriptive name to reflect that it's only for instances with a single spawn, not for any instance. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 758ec5ac5be8923b92c5214d91f6ba1236b95356 Author: Eric Biggers Date: Thu Jan 2 20:04:37 2020 -0800 crypto: cryptd - convert to new way of freeing instances Convert the "cryptd" template to the new way of freeing instances, where a ->free() method is installed to the instance struct itself. This replaces the weakly-typed method crypto_template::free(). This will allow removing support for the old way of freeing instances. Note that the 'default' case in cryptd_free() was already unreachable. So, we aren't missing anything by keeping only the ahash and aead parts. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 0f8f6d86d415f9d88dc0f7847f11d0c52dba1965 Author: Eric Biggers Date: Thu Jan 2 20:04:36 2020 -0800 crypto: geniv - convert to new way of freeing instances Convert the "seqiv" template to the new way of freeing instances where a ->free() method is installed to the instance struct itself. Also remove the unused implementation of the old way of freeing instances from the "echainiv" template, since it's already using the new way too. In doing this, also simplify the code by making the helper function aead_geniv_alloc() install the ->free() method, instead of making seqiv and echainiv do this themselves. This is analogous to how skcipher_alloc_instance_simple() works. This will allow removing support for the old way of freeing instances. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 48fb3e5785be7ef69a43c04f617a1c05000ee2d0 Author: Eric Biggers Date: Thu Jan 2 20:04:35 2020 -0800 crypto: hash - add support for new way of freeing instances Add support to shash and ahash for the new way of freeing instances (already used for skcipher, aead, and akcipher) where a ->free() method is installed to the instance struct itself. These methods are more strongly-typed than crypto_template::free(), which they replace. This will allow removing support for the old way of freeing instances. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit aed11cf57ddb24aa97ca3b55c9e26c37759c4baa Author: Eric Biggers Date: Thu Jan 2 19:59:08 2020 -0800 crypto: algapi - fold crypto_init_spawn() into crypto_grab_spawn() Now that crypto_init_spawn() is only called by crypto_grab_spawn(), simplify things by moving its functionality into crypto_grab_spawn(). In the process of doing this, also be more consistent about when the spawn and instance are updated, and remove the crypto_spawn::dropref flag since now it's always set. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 6d1b41fce0aa916efd1ce0728e1e4bd20a3642d5 Author: Eric Biggers Date: Thu Jan 2 19:59:07 2020 -0800 crypto: ahash - unexport crypto_ahash_type Now that all the templates that need ahash spawns have been converted to use crypto_grab_ahash() rather than look up the algorithm directly, crypto_ahash_type is no longer used outside of ahash.c. Make it static. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 629f1afc15ee8f34ec67bef0c33b9bccca7eeecc Author: Eric Biggers Date: Thu Jan 2 19:59:06 2020 -0800 crypto: algapi - remove obsoleted instance creation helpers Remove lots of helper functions that were previously used for instantiating crypto templates, but are now unused: - crypto_get_attr_alg() and similar functions looked up an inner algorithm directly from a template parameter. These were replaced with getting the algorithm's name, then calling crypto_grab_*(). - crypto_init_spawn2() and similar functions initialized a spawn, given an algorithm. Similarly, these were replaced with crypto_grab_*(). - crypto_alloc_instance() and similar functions allocated an instance with a single spawn, given the inner algorithm. These aren't useful anymore since crypto_grab_*() need the instance allocated first. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit d5ed3b65f7012a6592809f7f928f3e3660df8fd9 Author: Eric Biggers Date: Thu Jan 2 19:59:05 2020 -0800 crypto: cipher - make crypto_spawn_cipher() take a crypto_cipher_spawn Now that all users of single-block cipher spawns have been converted to use 'struct crypto_cipher_spawn' rather than the less specifically typed 'struct crypto_spawn', make crypto_spawn_cipher() take a pointer to a 'struct crypto_cipher_spawn' rather than a 'struct crypto_spawn'. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 1e212a6a562f781f00cba6c7ece93817857e0f32 Author: Eric Biggers Date: Thu Jan 2 19:59:04 2020 -0800 crypto: xcbc - use crypto_grab_cipher() and simplify error paths Make the xcbc template use the new function crypto_grab_cipher() to initialize its cipher spawn. This is needed to make all spawns be initialized in a consistent way. This required making xcbc_create() allocate the instance directly rather than use shash_alloc_instance(). Also simplify the error handling by taking advantage of crypto_drop_*() now accepting (as a no-op) spawns that haven't been initialized yet, and by taking advantage of crypto_grab_*() now handling ERR_PTR() names. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 3b4e73d8ca810f63af05f367c576f0b33920657b Author: Eric Biggers Date: Thu Jan 2 19:59:03 2020 -0800 crypto: vmac - use crypto_grab_cipher() and simplify error paths Make the vmac64 template use the new function crypto_grab_cipher() to initialize its cipher spawn. This is needed to make all spawns be initialized in a consistent way. This required making vmac_create() allocate the instance directly rather than use shash_alloc_instance(). Also simplify the error handling by taking advantage of crypto_drop_*() now accepting (as a no-op) spawns that haven't been initialized yet, and by taking advantage of crypto_grab_*() now handling ERR_PTR() names. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 1d0459cd83f5426d668ec3304a35f9dbeee6296b Author: Eric Biggers Date: Thu Jan 2 19:59:02 2020 -0800 crypto: cmac - use crypto_grab_cipher() and simplify error paths Make the cmac template use the new function crypto_grab_cipher() to initialize its cipher spawn. This is needed to make all spawns be initialized in a consistent way. This required making cmac_create() allocate the instance directly rather than use shash_alloc_instance(). Also simplify the error handling by taking advantage of crypto_drop_*() now accepting (as a no-op) spawns that haven't been initialized yet, and by taking advantage of crypto_grab_*() now handling ERR_PTR() names. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 166729709775263066af1747c8029e960a20910a Author: Eric Biggers Date: Thu Jan 2 19:59:01 2020 -0800 crypto: cbcmac - use crypto_grab_cipher() and simplify error paths Make the cbcmac template use the new function crypto_grab_cipher() to initialize its cipher spawn. This is needed to make all spawns be initialized in a consistent way. This required making cbcmac_create() allocate the instance directly rather than use shash_alloc_instance(). Also simplify the error handling by taking advantage of crypto_drop_*() now accepting (as a no-op) spawns that haven't been initialized yet, and by taking advantage of crypto_grab_*() now handling ERR_PTR() names. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit aacd5b4cfb87306888eb9e3612cb90afbb2ecba5 Author: Eric Biggers Date: Thu Jan 2 19:59:00 2020 -0800 crypto: skcipher - use crypto_grab_cipher() and simplify error paths Make skcipher_alloc_instance_simple() use the new function crypto_grab_cipher() to initialize its cipher spawn. This is needed to make all spawns be initialized in a consistent way. Also simplify the error handling by taking advantage of crypto_drop_*() now accepting (as a no-op) spawns that haven't been initialized yet, and by taking advantage of crypto_grab_*() now handling ERR_PTR() names. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit c282586fc341f9af741928f74a90163d26a1b347 Author: Eric Biggers Date: Thu Jan 2 19:58:59 2020 -0800 crypto: chacha20poly1305 - use crypto_grab_ahash() and simplify error paths Make the rfc7539 and rfc7539esp templates use the new function crypto_grab_ahash() to initialize their ahash spawn. This is needed to make all spawns be initialized in a consistent way. Also simplify the error handling by taking advantage of crypto_drop_*() now accepting (as a no-op) spawns that haven't been initialized yet, and by taking advantage of crypto_grab_*() now handling ERR_PTR() names. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 05b3bbb53a0570c04aba24e5849a3715e1ed4583 Author: Eric Biggers Date: Thu Jan 2 19:58:58 2020 -0800 crypto: ccm - use crypto_grab_ahash() and simplify error paths Make the ccm and ccm_base templates use the new function crypto_grab_ahash() to initialize their ahash spawn. This is needed to make all spawns be initialized in a consistent way. Also simplify the error handling by taking advantage of crypto_drop_*() now accepting (as a no-op) spawns that haven't been initialized yet. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit ab6ffd360d3ca3c98cba401f923b64683d666ab6 Author: Eric Biggers Date: Thu Jan 2 19:58:57 2020 -0800 crypto: gcm - use crypto_grab_ahash() and simplify error paths Make the gcm and gcm_base templates use the new function crypto_grab_ahash() to initialize their ahash spawn. This is needed to make all spawns be initialized in a consistent way. Also simplify the error handling by taking advantage of crypto_drop_*() now accepting (as a no-op) spawns that haven't been initialized yet. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 370738824b8e2c0ea5d8b4e4b4142fb7bab1a403 Author: Eric Biggers Date: Thu Jan 2 19:58:56 2020 -0800 crypto: authencesn - use crypto_grab_ahash() and simplify error paths Make the authencesn template use the new function crypto_grab_ahash() to initialize its ahash spawn. This is needed to make all spawns be initialized in a consistent way. Also simplify the error handling by taking advantage of crypto_drop_*() now accepting (as a no-op) spawns that haven't been initialized yet, and by taking advantage of crypto_grab_*() now handling ERR_PTR() names. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 37a861adc95ab7165a33794abda776ea1dad8475 Author: Eric Biggers Date: Thu Jan 2 19:58:55 2020 -0800 crypto: authenc - use crypto_grab_ahash() and simplify error paths Make the authenc template use the new function crypto_grab_ahash() to initialize its ahash spawn. This is needed to make all spawns be initialized in a consistent way. Also simplify the error handling by taking advantage of crypto_drop_*() now accepting (as a no-op) spawns that haven't been initialized yet, and by taking advantage of crypto_grab_*() now handling ERR_PTR() names. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 39e7a283b3089be44a0473b77f4218791ffeba3f Author: Eric Biggers Date: Thu Jan 2 19:58:54 2020 -0800 crypto: hmac - use crypto_grab_shash() and simplify error paths Make the hmac template use the new function crypto_grab_shash() to initialize its shash spawn. This is needed to make all spawns be initialized in a consistent way. This required making hmac_create() allocate the instance directly rather than use shash_alloc_instance(). Also simplify the error handling by taking advantage of crypto_drop_*() now accepting (as a no-op) spawns that haven't been initialized yet, and by taking advantage of crypto_grab_*() now handling ERR_PTR() names. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 218c5035fe33df10823378353957f994d95c079b Author: Eric Biggers Date: Thu Jan 2 19:58:53 2020 -0800 crypto: cryptd - use crypto_grab_shash() and simplify error paths Make the cryptd template (in the hash case) use the new function crypto_grab_shash() to initialize its shash spawn. This is needed to make all spawns be initialized in a consistent way. This required making cryptd_create_hash() allocate the instance directly rather than use cryptd_alloc_instance(). Also simplify the error handling by taking advantage of crypto_drop_*() now accepting (as a no-op) spawns that haven't been initialized yet, and by taking advantage of crypto_grab_*() now handling ERR_PTR() names. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit ba44840747bdd60095881830af0d75f0e5017c99 Author: Eric Biggers Date: Thu Jan 2 19:58:52 2020 -0800 crypto: adiantum - use crypto_grab_{cipher,shash} and simplify error paths Make the adiantum template use the new functions crypto_grab_cipher() and crypto_grab_shash() to initialize its cipher and shash spawns. This is needed to make all spawns be initialized in a consistent way. Also simplify the error handling by taking advantage of crypto_drop_*() now accepting (as a no-op) spawns that haven't been initialized yet, and by taking advantage of crypto_grab_*() now handling ERR_PTR() names. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 0764ac28763fdb533809090005956fcd3123fb60 Author: Eric Biggers Date: Thu Jan 2 19:58:51 2020 -0800 crypto: cipher - introduce crypto_cipher_spawn and crypto_grab_cipher() Currently, "cipher" (single-block cipher) spawns are usually initialized by using crypto_get_attr_alg() to look up the algorithm, then calling crypto_init_spawn(). In one case, crypto_grab_spawn() is used directly. The former way is different from how skcipher, aead, and akcipher spawns are initialized (they use crypto_grab_*()), and for no good reason. This difference introduces unnecessary complexity. The crypto_grab_*() functions used to have some problems, like not holding a reference to the algorithm and requiring the caller to initialize spawn->base.inst. But those problems are fixed now. Also, the cipher spawns are not strongly typed; e.g., the API requires that the user manually specify the flags CRYPTO_ALG_TYPE_CIPHER and CRYPTO_ALG_TYPE_MASK. Though the "cipher" algorithm type itself isn't yet strongly typed, we can start by making the spawns strongly typed. So, let's introduce a new 'struct crypto_cipher_spawn', and functions crypto_grab_cipher() and crypto_drop_cipher() to grab and drop them. Later patches will convert all cipher spawns to use these, then make crypto_spawn_cipher() take 'struct crypto_cipher_spawn' as well, instead of a bare 'struct crypto_spawn' as it currently does. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 84a9c938e5063709f799fd6bab17a8ea723c2eb5 Author: Eric Biggers Date: Thu Jan 2 19:58:50 2020 -0800 crypto: ahash - introduce crypto_grab_ahash() Currently, ahash spawns are initialized by using ahash_attr_alg() or crypto_find_alg() to look up the ahash algorithm, then calling crypto_init_ahash_spawn(). This is different from how skcipher, aead, and akcipher spawns are initialized (they use crypto_grab_*()), and for no good reason. This difference introduces unnecessary complexity. The crypto_grab_*() functions used to have some problems, like not holding a reference to the algorithm and requiring the caller to initialize spawn->base.inst. But those problems are fixed now. So, let's introduce crypto_grab_ahash() so that we can convert all templates to the same way of initializing their spawns. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit fdfad1fffc2aa199fb447c152a00a5e383a5b973 Author: Eric Biggers Date: Thu Jan 2 19:58:49 2020 -0800 crypto: shash - introduce crypto_grab_shash() Currently, shash spawns are initialized by using shash_attr_alg() or crypto_alg_mod_lookup() to look up the shash algorithm, then calling crypto_init_shash_spawn(). This is different from how skcipher, aead, and akcipher spawns are initialized (they use crypto_grab_*()), and for no good reason. This difference introduces unnecessary complexity. The crypto_grab_*() functions used to have some problems, like not holding a reference to the algorithm and requiring the caller to initialize spawn->base.inst. But those problems are fixed now. So, let's introduce crypto_grab_shash() so that we can convert all templates to the same way of initializing their spawns. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit de95c9574108ec304083ed574304ab3b60b4167c Author: Eric Biggers Date: Thu Jan 2 19:58:48 2020 -0800 crypto: algapi - pass instance to crypto_grab_spawn() Currently, crypto_spawn::inst is first used temporarily to pass the instance to crypto_grab_spawn(). Then crypto_init_spawn() overwrites it with crypto_spawn::next, which shares the same union. Finally, crypto_spawn::inst is set again when the instance is registered. Make this less convoluted by just passing the instance as an argument to crypto_grab_spawn() instead. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 73bed26f73a120f14cabf8d214ec5078bb42dea9 Author: Eric Biggers Date: Thu Jan 2 19:58:47 2020 -0800 crypto: akcipher - pass instance to crypto_grab_akcipher() Initializing a crypto_akcipher_spawn currently requires: 1. Set spawn->base.inst to point to the instance. 2. Call crypto_grab_akcipher(). But there's no reason for these steps to be separate, and in fact this unneeded complication has caused at least one bug, the one fixed by commit 6db43410179b ("crypto: adiantum - initialize crypto_spawn::inst") So just make crypto_grab_akcipher() take the instance as an argument. To keep the function call from getting too unwieldy due to this extra argument, also introduce a 'mask' variable into pkcs1pad_create(). Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit cd900f0cacd7601dabdd028e8cbdbf2a7041cee2 Author: Eric Biggers Date: Thu Jan 2 19:58:46 2020 -0800 crypto: aead - pass instance to crypto_grab_aead() Initializing a crypto_aead_spawn currently requires: 1. Set spawn->base.inst to point to the instance. 2. Call crypto_grab_aead(). But there's no reason for these steps to be separate, and in fact this unneeded complication has caused at least one bug, the one fixed by commit 6db43410179b ("crypto: adiantum - initialize crypto_spawn::inst") So just make crypto_grab_aead() take the instance as an argument. To keep the function calls from getting too unwieldy due to this extra argument, also introduce a 'mask' variable into the affected places which weren't already using one. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit b9f76dddb1f9f70e008b982381bbc9a67c9b8c66 Author: Eric Biggers Date: Thu Jan 2 19:58:45 2020 -0800 crypto: skcipher - pass instance to crypto_grab_skcipher() Initializing a crypto_skcipher_spawn currently requires: 1. Set spawn->base.inst to point to the instance. 2. Call crypto_grab_skcipher(). But there's no reason for these steps to be separate, and in fact this unneeded complication has caused at least one bug, the one fixed by commit 6db43410179b ("crypto: adiantum - initialize crypto_spawn::inst") So just make crypto_grab_skcipher() take the instance as an argument. To keep the function calls from getting too unwieldy due to this extra argument, also introduce a 'mask' variable into the affected places which weren't already using one. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 77f7e94d72208a1a84c88ed4de16a9bf368e9ded Author: Eric Biggers Date: Thu Jan 2 19:58:44 2020 -0800 crypto: ahash - make struct ahash_instance be the full size Define struct ahash_instance in a way analogous to struct skcipher_instance, struct aead_instance, and struct akcipher_instance, where the struct is defined to include both the algorithm structure at the beginning and the additional crypto_instance fields at the end. This is needed to allow allocating ahash instances directly using kzalloc(sizeof(*inst) + sizeof(*ictx), ...) in the same way as skcipher, aead, and akcipher instances. In turn, that's needed to make spawns be initialized in a consistent way everywhere. Also take advantage of the addition of the base instance to struct ahash_instance by simplifying the ahash_crypto_instance() and ahash_instance() functions. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 1b84e7d01da58d6a41ac244b4b5e481e336fd09b Author: Eric Biggers Date: Thu Jan 2 19:58:43 2020 -0800 crypto: shash - make struct shash_instance be the full size Define struct shash_instance in a way analogous to struct skcipher_instance, struct aead_instance, and struct akcipher_instance, where the struct is defined to include both the algorithm structure at the beginning and the additional crypto_instance fields at the end. This is needed to allow allocating shash instances directly using kzalloc(sizeof(*inst) + sizeof(*ictx), ...) in the same way as skcipher, aead, and akcipher instances. In turn, that's needed to make spawns be initialized in a consistent way everywhere. Also take advantage of the addition of the base instance to struct shash_instance by simplifying the shash_crypto_instance() and shash_instance() functions. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit ca94e9374a7d86e0594ed824b437656ca83d47b4 Author: Eric Biggers Date: Thu Jan 2 19:58:42 2020 -0800 crypto: algapi - make crypto_grab_spawn() handle an ERR_PTR() name To allow further simplifying template ->create() functions, make crypto_grab_spawn() handle an ERR_PTR() name by passing back the error. For most templates, this will allow the result of crypto_attr_alg_name() to be passed directly to crypto_grab_*(), rather than first having to assign it to a variable [where it can then potentially be misused, as it was in the rfc7539 template prior to commit 5e27f38f1f3f ("crypto: chacha20poly1305 - set cra_name correctly")] and check it for error. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit ff67062796e97cbb009ab0ca30176abb24b9a325 Author: Eric Biggers Date: Thu Jan 2 19:58:41 2020 -0800 crypto: algapi - make crypto_drop_spawn() a no-op on uninitialized spawns Make crypto_drop_spawn() do nothing when the spawn hasn't been initialized with an algorithm yet. This will allow simplifying error handling in all the template ->create() functions, since on error they will be able to just call their usual "free instance" function, rather than having to handle dropping just the spawns that have been initialized so far. This does assume the spawn starts out zero-filled, but that's always the case since instances are allocated with kzalloc(). And some other code already assumes this anyway. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit e91e785e182103d94fc1d8b3e064edfb5145cc31 Author: Gary R Hook Date: Thu Jan 2 13:57:03 2020 -0600 crypto: ccp - Update MAINTAINERS for CCP driver Remove Gary R Hook as CCP maintainer. Signed-off-by: Herbert Xu commit 30a50e44f981e41cb7f3eba75d59a701ce3cfacf Author: Christian Lamparter Date: Wed Jan 1 23:27:02 2020 +0100 crypto: crypto4xx - use GFP_KERNEL for big allocations The driver should use GFP_KERNEL for the bigger allocation during the driver's crypto4xx_probe() and not GFP_ATOMIC in my opinion. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu commit b87b2c4d9105a4cfa70c9271b847364ac045125c Author: Christian Lamparter Date: Wed Jan 1 23:27:01 2020 +0100 crypto: crypto4xx - reduce memory fragmentation With recent kernels (>5.2), the driver fails to probe, as the allocation of the driver's scatter buffer fails with -ENOMEM. This happens in crypto4xx_build_sdr(). Where the driver tries to get 512KiB (=PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD) of continuous memory. This big chunk is by design, since the driver uses this circumstance in the crypto4xx_copy_pkt_to_dst() to its advantage: "all scatter-buffers are all neatly organized in one big continuous ringbuffer; So scatterwalk_map_and_copy() can be instructed to copy a range of buffers in one go." The PowerPC arch does not have support for DMA_CMA. Hence, this patch reorganizes the order in which the memory allocations are done. Since the driver itself is responsible for some of the issues. Signed-off-by: Christian Lamparter Signed-off-by: Herbert Xu commit af5034e8e4a5838fc77e476c1a91822e449d5869 Author: Eric Biggers Date: Mon Dec 30 21:19:38 2019 -0600 crypto: remove propagation of CRYPTO_TFM_RES_* flags The CRYPTO_TFM_RES_* flags were apparently meant as a way to make the ->setkey() functions provide more information about errors. But these flags weren't actually being used or tested, and in many cases they weren't being set correctly anyway. So they've now been removed. Also, if someone ever actually needs to start better distinguishing ->setkey() errors (which is somewhat unlikely, as this has been unneeded for a long time), we'd be much better off just defining different return values, like -EINVAL if the key is invalid for the algorithm vs. -EKEYREJECTED if the key was rejected by a policy like "no weak keys". That would be much simpler, less error-prone, and easier to test. So just remove CRYPTO_TFM_RES_MASK and all the unneeded logic that propagates these flags around. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit c4c4db0d59774f6ab726edd012711490437345c2 Author: Eric Biggers Date: Mon Dec 30 21:19:37 2019 -0600 crypto: remove CRYPTO_TFM_RES_WEAK_KEY The CRYPTO_TFM_RES_WEAK_KEY flag was apparently meant as a way to make the ->setkey() functions provide more information about errors. However, no one actually checks for this flag, which makes it pointless. There are also no tests that verify that all algorithms actually set (or don't set) it correctly. This is also the last remaining CRYPTO_TFM_RES_* flag, which means that it's the only thing still needing all the boilerplate code which propagates these flags around from child => parent tfms. And if someone ever needs to distinguish this error in the future (which is somewhat unlikely, as it's been unneeded for a long time), it would be much better to just define a new return value like -EKEYREJECTED. That would be much simpler, less error-prone, and easier to test. So just remove this flag. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 674f368a952c48ede71784935a799a5205b92b6c Author: Eric Biggers Date: Mon Dec 30 21:19:36 2019 -0600 crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN The CRYPTO_TFM_RES_BAD_KEY_LEN flag was apparently meant as a way to make the ->setkey() functions provide more information about errors. However, no one actually checks for this flag, which makes it pointless. Also, many algorithms fail to set this flag when given a bad length key. Reviewing just the generic implementations, this is the case for aes-fixed-time, cbcmac, echainiv, nhpoly1305, pcrypt, rfc3686, rfc4309, rfc7539, rfc7539esp, salsa20, seqiv, and xcbc. But there are probably many more in arch/*/crypto/ and drivers/crypto/. Some algorithms can even set this flag when the key is the correct length. For example, authenc and authencesn set it when the key payload is malformed in any way (not just a bad length), the atmel-sha and ccree drivers can set it if a memory allocation fails, and the chelsio driver sets it for bad auth tag lengths, not just bad key lengths. So even if someone actually wanted to start checking this flag (which seems unlikely, since it's been unused for a long time), there would be a lot of work needed to get it working correctly. But it would probably be much better to go back to the drawing board and just define different return values, like -EINVAL if the key is invalid for the algorithm vs. -EKEYREJECTED if the key was rejected by a policy like "no weak keys". That would be much simpler, less error-prone, and easier to test. So just remove this flag. Signed-off-by: Eric Biggers Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 5c925e8b10a5f43f220755aceb9d5f14b2f4e2c5 Author: Eric Biggers Date: Mon Dec 30 21:19:35 2019 -0600 crypto: remove CRYPTO_TFM_RES_BAD_BLOCK_LEN The flag CRYPTO_TFM_RES_BAD_BLOCK_LEN is never checked for, and it's only set by one driver. And even that single driver's use is wrong because the driver is setting the flag from ->encrypt() and ->decrypt() with no locking, which is unsafe because ->encrypt() and ->decrypt() can be executed by many threads in parallel on the same tfm. Just remove this flag. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit f9d89b853ec1709345c0e2f1f51ae53188eef981 Author: Eric Biggers Date: Mon Dec 30 21:19:34 2019 -0600 crypto: remove unused tfm result flags The tfm result flags CRYPTO_TFM_RES_BAD_KEY_SCHED and CRYPTO_TFM_RES_BAD_FLAGS are never used, so remove them. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit b529f1983b2dcc46354f311feda92e07b6e9e2da Author: Eric Biggers Date: Mon Dec 30 21:19:33 2019 -0600 crypto: atmel-sha - fix error handling when setting hmac key HMAC keys can be of any length, and atmel_sha_hmac_key_set() can only fail due to -ENOMEM. But atmel_sha_hmac_setkey() incorrectly treated any error as a "bad key length" error. Fix it to correctly propagate the -ENOMEM error code and not set any tfm result flags. Fixes: 81d8750b2b59 ("crypto: atmel-sha - add support to hmac(shaX)") Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Signed-off-by: Eric Biggers Reviewed-by: Tudor Ambarus Signed-off-by: Herbert Xu commit b828f905904cd76424230c69741a4cabb0174168 Author: Eric Biggers Date: Mon Dec 30 21:19:32 2019 -0600 crypto: artpec6 - return correct error code for failed setkey() ->setkey() is supposed to retun -EINVAL for invalid key lengths, not -1. Fixes: a21eb94fc4d3 ("crypto: axis - add ARTPEC-6/7 crypto accelerator driver") Cc: Jesper Nilsson Cc: Lars Persson Signed-off-by: Eric Biggers Acked-by: Lars Persson Signed-off-by: Herbert Xu commit bd56cea012fc2d6381e8cd3209510ce09f9de8c9 Author: Eric Biggers Date: Mon Dec 30 21:19:31 2019 -0600 crypto: chelsio - fix writing tfm flags to wrong place The chelsio crypto driver is casting 'struct crypto_aead' directly to 'struct crypto_tfm', which is incorrect because the crypto_tfm isn't the first field of 'struct crypto_aead'. Consequently, the calls to crypto_tfm_set_flags() are modifying some other field in the struct. Also, the driver is setting CRYPTO_TFM_RES_BAD_KEY_LEN in ->setauthsize(), not just in ->setkey(). This is incorrect since this flag is for bad key lengths, not for bad authentication tag lengths. Fix these bugs by removing the broken crypto_tfm_set_flags() calls from ->setauthsize() and by fixing them in ->setkey(). Fixes: 324429d74127 ("chcr: Support for Chelsio's Crypto Hardware") Cc: # v4.9+ Cc: Atul Gupta Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 70ffa8fd72b8df7ddfedc0b7db042eea75182fd5 Author: Eric Biggers Date: Mon Dec 30 13:41:15 2019 -0600 crypto: skcipher - remove skcipher_walk_aead() skcipher_walk_aead() is unused and is identical to skcipher_walk_aead_encrypt(), so remove it. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 970828901390ab7fdfa023fb8b6e5753613f8ae3 Author: Linus Walleij Date: Tue Jan 7 22:24:32 2020 +0100 gpio: Update TODO Drop the completed item: hierarchical irqchip helpers. Add motivation for gpio descriptor refactoring. Extend the list of stuff to do. Minor fixups. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20200107212432.27587-1-linus.walleij@linaro.org commit 2f965be7f90083f7cfd57c49f74a7f341de335a9 Author: Bibby Hsieh Date: Tue Dec 10 13:05:26 2019 +0800 drm/mediatek: apply CMDQ control flow In some Mediatek SoC, there is no "shadow" registers for performaing an atomic video mode set or page flip at vblank/vsync. The CMDQ (Commend Queue) is used to help update all relevant display controller registers with critical time limation. Signed-off-by: YT Shen Signed-off-by: Philipp Zabel Signed-off-by: Bibby Hsieh Signed-off-by: Yongqiang Niu Signed-off-by: CK Hu commit d0afe37f5209c7b51a5646ffef578b9d9b383d90 Author: Bibby Hsieh Date: Tue Dec 10 13:05:25 2019 +0800 drm/mediatek: support CMDQ interface in ddp component The CMDQ (Command Queue) in some Mediatek SoC is used to help update all relevant display controller registers with critical time limation. This patch add cmdq interface in ddp_comp interface, let all ddp_comp interface can support cpu/cmdq function at the same time. Signed-off-by: YT Shen Signed-off-by: Philipp Zabel Signed-off-by: Bibby Hsieh Signed-off-by: Yongqiang Niu Signed-off-by: CK Hu commit 17aab656ae7032ded5cc14e477054105c429bd44 Merge: e0e4706c7e9f d412f18c9bc7 Author: CK Hu Date: Thu Jan 9 09:33:14 2020 +0800 Merge tag 'v5.5-next-cmdq-stable' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux cmdq patches needed by drm driver to use cmdq interface commit 5c544dafc0722daa41b57cbd7c245186645474d5 Author: Qiang Yu Date: Wed Jan 1 18:38:31 2020 +0800 drm/lima: use drm_sched_fault for error task handling drm_sched_job_timedout works with drm_sched_stop as a pair, so we'd better use the drm_sched_fault helper to make the error and timeout handling go the same path. This also fixes application hang when task error. Reviewed-by: Vasily Khoruzhick Tested-by: Andreas Baierl Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20200101103831.22429-1-yuq825@gmail.com commit a566696cf9f27f701cd4a6426d46f112c180059c Merge: 528d06d41b80 3cacb2086e41 Author: Dave Airlie Date: Thu Jan 9 10:46:07 2020 +1000 Merge tag 'drm-misc-next-2020-01-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.6: UAPI Changes: - Allow overriding number of bootup penguins in fbcon using fbcon=logo-count:n. Cross-subsystem Changes: - fbdev fixes for mmp, and make it work with CONFIG_COMPILE_TEST. - Use devm_platform_ioremap_resource in fbdev drivers. - Various small fbdev fixes. Core Changes: - Support scanline alignment for dumb buffers. - Add atomic_check() hook to bridge ops, to support bus format negotiation. - Add gem_create_object() to vram helpers. Driver Changes: - Rockchip: Add support for PX30. - Use generic fbdev code and dumb helpers in hisilicon/hibmc. - Add support for Leadtek LTK500HD1829 panel, and xinpeng XPP055C272. - Clock fixes for atmel-hlcdc. - Various smaller fixes to all drivers. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/8eff1e3f-ef0a-2dd9-9a14-6273b1d6f963@linux.intel.com commit 528d06d41b80a4acb2a9efd33bfc87495147f75e Author: Laurent Pinchart Date: Thu Dec 19 12:37:03 2019 +0200 drm: of: Fix linking when CONFIG_OF is not set The new helper drm_of_lvds_get_dual_link_pixel_order() introduced in commit 6529007522de has a fallback stub when CONFIG_OF is not set, but the stub is declared in drm_of.h without a static inline. This causes multiple definitions of the function to be linked when the CONFIG_OF option isn't set. Fix it by making the stub static inline. Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order") Reported-by: kbuild test robot Signed-off-by: Laurent Pinchart Reviewed-by: Fabrizio Castro Reviewed-by: Chris Wilson Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20191219103703.8547-1-laurent.pinchart+renesas@ideasonboard.com commit da458286a5e288ad18500f89ae28cbbc7512b3e1 Author: Rob Clark Date: Wed Jan 8 15:53:56 2020 -0800 drm/panel: Add support for AUO B116XAK01 panel Signed-off-by: Rob Clark Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200108235356.918189-2-robdclark@gmail.com commit eb0201e600311b07a7593f0794b3801e26dba589 Author: Rob Clark Date: Wed Jan 8 15:53:55 2020 -0800 dt-bindings: display: panel: Add AUO B116XAK01 panel bindings Signed-off-by: Rob Clark Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200108235356.918189-1-robdclark@gmail.com commit 4a4a52d49d11f5c4a0df8b9806c8c5563801f753 Author: yuehaibing Date: Wed Jan 8 22:08:22 2020 +0800 vmxnet3: Remove always false conditional statement param->rx_mini_pending is __u32 variable, it will never be less than zero. Signed-off-by: yuehaibing Signed-off-by: David S. Miller commit ea217e874aef6aa523331a9b5a8d49223460cf3e Author: Arnd Bergmann Date: Wed Jan 8 14:15:15 2020 +0100 netronome: fix ipv6 link error When the driver is built-in but ipv6 is a module, the flower support produces a link error: drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.o: In function `nfp_tunnel_keep_alive_v6': tunnel_conf.c:(.text+0x2aa8): undefined reference to `nd_tbl' Add a Kconfig dependency to avoid that configuration. Fixes: 9ea9bfa12240 ("nfp: flower: support ipv6 tunnel keep-alive messages from fw") Acked-by: Jakub Kicinski Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 112463ddbe82f8d1f98bfb7f943e1ed3c08bc56a Author: Arnd Bergmann Date: Wed Jan 8 13:48:38 2020 +0100 net: dsa: felix: fix link error When the enetc driver is disabled, the mdio support fails to get built: drivers/net/dsa/ocelot/felix_vsc9959.o: In function `vsc9959_mdio_bus_alloc': felix_vsc9959.c:(.text+0x19c): undefined reference to `enetc_hw_alloc' felix_vsc9959.c:(.text+0x1d1): undefined reference to `enetc_mdio_read' felix_vsc9959.c:(.text+0x1d8): undefined reference to `enetc_mdio_write' Change the Makefile to enter the subdirectory for this as well. Fixes: bdeced75b13f ("net: dsa: felix: Add PCS operations for PHYLINK") Fixes: 6517798dd343 ("enetc: Make MDIO accessors more generic and export to include/linux/fsl") Signed-off-by: Arnd Bergmann Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 09e6533536c9f0e8b1dd8f4658a9274f83f95da4 Author: Heiner Kallweit Date: Wed Jan 8 07:36:08 2020 +0100 r8169: add constant EnAnaPLL Use constant EnAnaPLL for bit 14 as in vendor driver. The vendor driver sets this bit for chip version 02 only, but I'm not aware of any issues, so better leave it as it is. In addition remove the useless debug message. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit ac9c41d5a053e71777e8c2191681358499eff04b Author: Dan Carpenter Date: Wed Jan 8 08:42:36 2020 +0300 ethtool: potential NULL dereference in strset_prepare_data() Smatch complains that the NULL checking isn't done consistently: net/ethtool/strset.c:253 strset_prepare_data() error: we previously assumed 'dev' could be null (see line 233) It looks like there is a missing return on this path. Fixes: 71921690f974 ("ethtool: provide string sets with STRSET_GET request") Signed-off-by: Dan Carpenter Reviewed-by: Michal Kubecek Signed-off-by: David S. Miller commit d97772dbd7727655aa894f1610e983e73678212e Author: Dan Carpenter Date: Wed Jan 8 08:41:25 2020 +0300 ethtool: fix ->reply_size() error handling The "ret < 0" comparison is never true because "ret" is still zero. Fixes: 728480f12442 ("ethtool: default handlers for GET requests") Signed-off-by: Dan Carpenter Reviewed-by: Michal Kubecek Signed-off-by: David S. Miller commit a6dd04807ce4d7b71920d996e6b84fa3733a1bfd Author: Dan Carpenter Date: Wed Jan 8 08:39:48 2020 +0300 ethtool: fix a memory leak in ethnl_default_start() If ethnl_default_parse() fails then we need to free a couple memory allocations before returning. Fixes: 728480f12442 ("ethtool: default handlers for GET requests") Signed-off-by: Dan Carpenter Reviewed-by: Michal Kubecek Signed-off-by: David S. Miller commit 78b6d073bc0101f9147845ba868d9d2e6189f990 Merge: 8d2ff1265363 8fab459e69ab Author: David S. Miller Date: Wed Jan 8 16:01:14 2020 -0800 Merge branch 'Broadcom-tags-support-for-531x5-539x-families' Florian Fainelli says: ==================== Broadcom tags support for 531x5/539x families This patch series finally allows us to enable Broadcom tags on the BCM531x5/BCM539x switch series which are very often cascaded onto another on-chip Broadcom switch. Because of that we need to be able to detect that Broadcom tags are already enabled on our DSA master which happens to be a DSA slave in that case since they are not part of the same DSA switch tree, the protocol does not support that. Due to the way DSA works, get_tag_protocol() is called prior to ds->ops->setup and we do not have all data structures set-up (in particular dsa_port::cpu_dp is not filed yet) so doing this at the time get_tag_protocol() is called and without exporting a helper function is desirable to limit our footprint into the framework. Having the core (net/dsa/dsa2.c) return and enforce DSA_TAG_PROTO_NONE was considered and done initially but this leaves the driver outside of the decision to force/fallback to a particular protocol, instead of letting it in control. Also there is no reason to suspect that all tagging protocols are problematic, e.g.: "inner" Marvell EDSA with "outer" Broadcom tag may work just fine, and vice versa. This was tested on: - Lamobo R1 which now has working Broadcom tags for its external BCM53125 switch - BCM7445 which has a BCM53125 hanging off one of its internal switch port, the BCM53125 still works with DSA_TAG_PROTO_NONE - BCM7278 which has a peculiar dual CPU port set-up (so dual IMP mode needs to be enabled) - Northstar Plus with DSA_TAG_PROTO_BRCM_PREPEND and no external switches hanging off the internal switch ==================== Signed-off-by: David S. Miller commit 8fab459e69abfd04a66d76423d18ba853fced4ab Author: Florian Fainelli Date: Tue Jan 7 21:06:06 2020 -0800 net: dsa: b53: Enable Broadcom tags for 531x5/539x families The BCM531x5 and BCM539x families require that the IMP port be enabled within the management page and that management mode (SM_SW_FWD_MODE) be turned on. Once this is done, everything works as expected, including multicast with standalone DSA devices or bridge devices. Because such switches are frequencly cascaded with other internal Broadcom switches on which we want to enable Broadcom tags, update b53_can_enable_brcm_tags() to check the kind of DSA master tagging protocol being used, if it is one of the two supported Broadcom tagging protocols, force DSA_TAG_PROTO_NONE. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 4d776482ecc689bdd68627985ac4cb5a6f325953 Author: Florian Fainelli Date: Tue Jan 7 21:06:05 2020 -0800 net: dsa: Get information about stacked DSA protocol It is possible to stack multiple DSA switches in a way that they are not part of the tree (disjoint) but the DSA master of a switch is a DSA slave of another. When that happens switch drivers may have to know this is the case so as to determine whether their tagging protocol has a remove chance of working. This is useful for specific switch drivers such as b53 where devices have been known to be stacked in the wild without the Broadcom tag protocol supporting that feature. This allows b53 to continue supporting those devices by forcing the disabling of Broadcom tags on the outermost switches if necessary. The get_tag_protocol() function is therefore updated to gain an additional enum dsa_tag_protocol argument which denotes the current tagging protocol used by the DSA master we are attached to, else DSA_TAG_PROTO_NONE for the top of the dsa_switch_tree. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 8d2ff126536320f7243bd05a69703c9b4cd7e46e Merge: 6ea0032f84a4 737d7a6c5596 Author: David S. Miller Date: Wed Jan 8 15:47:50 2020 -0800 Merge branch 'Devlink-notification-after-recovery-complete-by-bnxt_en-driver' Vikas Gupta says: ==================== Devlink notification after recovery complete by bnxt_en driver This patchset adds following feature in devlink 1) Recovery complete direct call API to be used by drivers when it successfully completes. It is required as recovery triggered by devlink may return with EINPROGRESS and eventually recovery completes in different context. 2) A notification when health status is updated by reporter. Patchset also contains required changes in bnxt_en driver to mark recovery in progress when recovery is triggered from kernel devlink. ==================== Signed-off-by: David S. Miller commit 737d7a6c55964955604b9de398dac3791bab5a64 Author: Vikas Gupta Date: Thu Jan 2 21:18:11 2020 +0530 bnxt_en: Call recovery done after reset is successfully done Return EINPROGRESS to devlink health reporter recover as we are not yet done and call devlink_health_reporter_recovery_done once reset is successfully completed from workqueue context. Signed-off-by: Vikas Gupta Signed-off-by: David S. Miller commit 97ff3bd37face9bc1bc824cc08241fc1f860ff46 Author: Vikas Gupta Date: Thu Jan 2 21:18:10 2020 +0530 devlink: add devink notification when reporter update health state add a devlink notification when reporter update the health state. Signed-off-by: Vikas Gupta Signed-off-by: David S. Miller commit 6181e5cb752e5de9f56fbcee3f0206a2c51f1478 Author: Vikas Gupta Date: Thu Jan 2 21:18:09 2020 +0530 devlink: add support for reporter recovery completion It is possible that a reporter recovery completion do not finish successfully when recovery is triggered via devlink_health_reporter_recover as recovery could be processed in different context. In such scenario an error is returned by driver when recover hook is invoked and successful recovery completion is intimated later. Expose devlink recover done API to update recovery stats. Signed-off-by: Vikas Gupta Signed-off-by: David S. Miller commit 1fc61ed04d309b0b8b3562acf701ab988eee12de Author: Markus Reichl Date: Mon Jan 6 22:16:28 2020 +0100 arm64: dts: rockchip: Enable mp8859 regulator on rk3399-roc-pc The rk3399-roc-pc uses a MP8859 DC/DC converter for 12V supply. This supplies 5V only in default state after booting. Now we can control the output voltage via I2C interface. Add a node for the driver to reach 12V. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/20200106211633.2882-6-m.reichl@fivetechno.de Signed-off-by: Heiko Stuebner commit a950c4c63cde7e5c9d849f6ced95f60ed163548d Author: Matthias Kaehlcke Date: Wed Jan 8 09:29:33 2020 -0800 ARM: dts: rockchip: Use ABI name for recovery mode pin on veyron fievel/tiger The recovery mode pin is currently named 'REC_MODE_L', which is how the signal is called in the schematics. The Chrome OS ABI requires the pin to be named 'RECOVERY_SW_L', which is also how it is called on all other veyron devices. Rename the pin to match the ABI. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20200108092908.1.I3afd3535b65460e79f3976e9ebfa392a0dd75e01@changeid Signed-off-by: Heiko Stuebner commit 6ea0032f84a49ae208ae9424dec8c41673010a0c Merge: 542d3065f2b1 66de4b179f16 Author: David S. Miller Date: Wed Jan 8 15:19:55 2020 -0800 Merge branch 'reduce-open-coded-skb-next-access-for-gso-segment-walking' Jason A. Donenfeld says: ==================== reduce open coded skb->next access for gso segment walking This patchset introduces the skb_list_walk_safe helper macro, in order to add some sanity to the myrid ways drivers have of walking through gso segments. The goal is to reduce future bugs commonly caused by open coding these sorts of things, and to in the future make it easier to swap out the underlying list representation. This first patch series addresses the easy uses of drivers iterating over the returned list of skb_gso_segments, for drivers that live in drivers/net/*. There are still other use cases to tackle later for net/*, and after these low-hanging fruits are taken care of, I imagine there are more subtle cases of gso segment walking that isn't just a direct return value from skb_gso_segments, and eventually this will have to be tackled. This series is the first in that direction. ==================== Signed-off-by: David S. Miller commit 66de4b179f163ea106f292778563b404958e4f42 Author: Jason A. Donenfeld Date: Wed Jan 8 16:59:09 2020 -0500 net: iwlwifi: use skb_list_walk_safe helper for gso segments This is a straight-forward conversion case for the new function, and while we're at it, we can remove a null write to skb->next by replacing it with skb_mark_not_on_list. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 536577f36ff7afd0a0aff4ebef62db8afe6fc904 Author: Jason A. Donenfeld Date: Wed Jan 8 16:59:08 2020 -0500 net: myri10ge: use skb_list_walk_safe helper for gso segments This is a straight-forward conversion case for the new function, and while we're at it, we can remove a null write to skb->next by replacing it with skb_mark_not_on_list. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 69b4ed5cbff54b8279f53a65da111e8d0cc01405 Author: Jason A. Donenfeld Date: Wed Jan 8 16:59:07 2020 -0500 net: sfc: use skb_list_walk_safe helper for gso segments This is a straight-forward conversion case for the new function, and while we're at it, we can remove a null write to skb->next by replacing it with skb_mark_not_on_list. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 90919f14507b7a3661e58b8d17f8444a63f5cafa Author: Jason A. Donenfeld Date: Wed Jan 8 16:59:06 2020 -0500 net: sunvnet: use skb_list_walk_safe helper for gso segments This is a straight-forward conversion case for the new function, and while we're at it, we can remove a null write to skb->next by replacing it with skb_mark_not_on_list. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 9f0722380f75a0873c9d70286df8354c6895f983 Author: Jason A. Donenfeld Date: Wed Jan 8 16:59:05 2020 -0500 net: tg3: use skb_list_walk_safe helper for gso segments This is a straight-forward conversion case for the new function, and while we're at it, we can remove a null write to skb->next by replacing it with skb_mark_not_on_list. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 1d7a7438d78f2da56b6b3855be462cf0fc809e56 Author: Jason A. Donenfeld Date: Wed Jan 8 16:59:04 2020 -0500 net: r8152: use skb_list_walk_safe helper for gso segments This is a straight-forward conversion case for the new function, and while we're at it, we can remove a null write to skb->next by replacing it with skb_mark_not_on_list. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 5643a552d31242e5adf3dbefba26c90b1bce2826 Author: Jason A. Donenfeld Date: Wed Jan 8 16:59:03 2020 -0500 net: tap: use skb_list_walk_safe helper for gso segments This is a straight-forward conversion case for the new function, and while we're at it, we can remove a null write to skb->next by replacing it with skb_mark_not_on_list. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit dcfea72e79b0aa7a057c8f6024169d86a1bbc84b Author: Jason A. Donenfeld Date: Wed Jan 8 16:59:02 2020 -0500 net: introduce skb_list_walk_safe for skb segment walking As part of the continual effort to remove direct usage of skb->next and skb->prev, this patch adds a helper for iterating through the singly-linked variant of skb lists, which are used for lists of GSO packet. The name "skb_list_..." has been chosen to match the existing function, "kfree_skb_list, which also operates on these singly-linked lists, and the "..._walk_safe" part is the same idiom as elsewhere in the kernel. This patch removes the helper from wireguard and puts it into linux/skbuff.h, while making it a bit more robust for general usage. In particular, parenthesis are added around the macro argument usage, and it now accounts for trying to iterate through an already-null skb pointer, which will simply run the iteration zero times. This latter enhancement means it can be used to replace both do { ... } while and while (...) open-coded idioms. This should take care of these three possible usages, which match all current methods of iterations. skb_list_walk_safe(segs, skb, next) { ... } skb_list_walk_safe(skb, skb, next) { ... } skb_list_walk_safe(segs, skb, segs) { ... } Gcc appears to generate efficient code for each of these. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 97f7d41ff8173d4913a1139502d0548e4c567109 Merge: 9a4c22740291 f2bc07562748 Author: Linus Walleij Date: Thu Jan 9 00:15:11 2020 +0100 Merge tag 'sh-pfc-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v5.5 - Split R-Car H3 support in two independent drivers, - Miscellaneous fixes and cleanups. commit 542d3065f2b1a60a0cfc259c9a36faa470761d78 Author: Arnd Bergmann Date: Wed Jan 8 22:44:43 2020 +0100 socket: fix unused-function warning When procfs is disabled, the fdinfo code causes a harmless warning: net/socket.c:1000:13: error: 'sock_show_fdinfo' defined but not used [-Werror=unused-function] static void sock_show_fdinfo(struct seq_file *m, struct file *f) Move the function definition up so we can use a single #ifdef around it. Fixes: b4653342b151 ("net: Allow to show socket-specific information in /proc/[pid]/fdinfo/[fd]") Suggested-by: Al Viro Acked-by: Kirill Tkhai Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit f9900c178d61661c104c1600409ced81bf3a6037 Author: YueHaibing Date: Wed Jan 8 01:58:49 2020 +0000 power: avs: qcom-cpr: remove duplicated include from qcom-cpr.c Remove duplicated include. Signed-off-by: YueHaibing Acked-by: Niklas Cassel Signed-off-by: Rafael J. Wysocki commit 6e62bd36e9ad85a22d92b1adce6a0336ea549733 Author: YueHaibing Date: Wed Jan 8 21:09:26 2020 +0800 soc: fsl: qe: remove set but not used variable 'mm_gc' drivers/soc/fsl/qe/gpio.c: In function qe_pin_request: drivers/soc/fsl/qe/gpio.c:163:26: warning: variable mm_gc set but not used [-Wunused-but-set-variable] commit 1e714e54b5ca ("powerpc: qe_lib-gpio: use gpiochip data pointer") left behind this unused variable. Reported-by: Hulk Robot Signed-off-by: Chen Zhou Signed-off-by: YueHaibing Signed-off-by: Li Yang commit 9375646b4cf03aee81bc6c305aa18cc80b682796 Author: Logan Gunthorpe Date: Mon Jan 6 12:03:27 2020 -0700 PCI/switchtec: Fix vep_vector_number ioread width vep_vector_number is actually a 16 bit register which should be read with ioread16() instead of ioread32(). Fixes: 080b47def5e5 ("MicroSemi Switchtec management interface driver") Link: https://lore.kernel.org/r/20200106190337.2428-3-logang@deltatee.com Reported-by: Doug Meyer Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit aa82130a22f77c1aa5794703730304d035a0c1f4 Author: Wesley Sheng Date: Mon Jan 6 12:03:26 2020 -0700 PCI/switchtec: Use dma_set_mask_and_coherent() Use dma_set_mask_and_coherent() instead of dma_set_coherent_mask() as the Switchtec hardware fully supports 64bit addressing and we should set both the streaming and coherent masks the same. [logang@deltatee.com: reworked commit message] Fixes: aff614c6339c ("switchtec: Set DMA coherent mask") Link: https://lore.kernel.org/r/20200106190337.2428-2-logang@deltatee.com Signed-off-by: Wesley Sheng Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit daea5b4dc16c3edc90392a512492dae504f1a37a Merge: b9ae51273655 17d3b21c7ba8 Author: David S. Miller Date: Wed Jan 8 13:28:03 2020 -0800 Merge branch 'sfc-code-refactoring' Alex Maftei says: ==================== sfc: code refactoring Splitting some of the driver code into different files, which will later be used in another driver for a new product. ==================== Reviewed-by: Edward Cree Signed-off-by: David S. Miller commit 17d3b21c7ba82cd88855a798b931bb3ac1388cba Author: Alex Maftei (amaftei) Date: Wed Jan 8 16:14:00 2020 +0000 sfc: move common tx code Once again, a tiny bit of refactoring was required to stitch the code together (i.e. adding headers). The moved code deals with managing tx queues and mappings. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 1751cc365f58ea69714be1c8ba718236354cd719 Author: Alex Maftei (amaftei) Date: Wed Jan 8 16:13:43 2020 +0000 sfc: move common rx code The moved code deals with managing rx buffers and queues. A tiny bit of refactoring was required in other files to stitch the code together. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 5f99925632b482a80998779c703a3bf89829bb5d Author: Alex Maftei (amaftei) Date: Wed Jan 8 16:13:28 2020 +0000 sfc: move event queue management code Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 37c45a4e337d2ef8f327e66ee9839c56545bdb55 Author: Alex Maftei (amaftei) Date: Wed Jan 8 16:13:10 2020 +0000 sfc: move channel interrupt management code Small code styling fixes included. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 83975485077dda755a8db7dde30c80fd9cd182e5 Author: Alex Maftei (amaftei) Date: Wed Jan 8 16:12:56 2020 +0000 sfc: move channel alloc/removal code Reallocation and copying code is included, as well as some housekeeping code. Other files have been patched up a bit to accommodate the changes. Small code styling fixes included. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit e20ba5b1d13fbe558cf1f654eaef347f17a36f7a Author: Alex Maftei (amaftei) Date: Wed Jan 8 16:12:34 2020 +0000 sfc: move channel start/stop code Also includes interrupt enabling/disabling code. Small code styling fixes included. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 768fd2664e24141ce9c93335638f98d7f269f70f Author: Alex Maftei (amaftei) Date: Wed Jan 8 16:12:18 2020 +0000 sfc: move some channel-related code Just a handful of function, but also removed many 'static' identifiers so the code builds. These will, of course, be moved. Module parameters for IRQ moderation threshold also moved. Small code styling fixes included. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit f1826756b499c2f60df4aa21107da3e37f78363a Author: Alex Maftei (amaftei) Date: Wed Jan 8 16:12:04 2020 +0000 sfc: move struct init and fini code The hardware monitor code and the reset work queue code were also moved, with supporting macros and parameters, because they are assigned to function pointers in the struct. Small code styling fixes included. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 1eaf99fe0bb836c988b40c32d48d59aea29cd717 Author: Alex Maftei (amaftei) Date: Wed Jan 8 16:11:46 2020 +0000 sfc: move some device reset code The rest of the reset code will be moved later. Small code styling fixes included. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 7ec3de426014a0fff8f2fe1a3f5a7be08e416903 Author: Alex Maftei (amaftei) Date: Wed Jan 8 16:11:29 2020 +0000 sfc: move datapath management code The code that manages the datapath (starting, stopping, including the port-related bits) will be common. Three functions have been added that contain bits from other functions. These will be moved to their final files in later patches. Small code styling fixes included. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 473f5ede416c749f25ed5eb531b2fec56d518426 Author: Alex Maftei (amaftei) Date: Wed Jan 8 16:11:13 2020 +0000 sfc: move mac configuration and status functions Two small functions with different purposes. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 82c64484024af04489bb1870bd1c6b61c603ca78 Author: Alex Maftei (amaftei) Date: Wed Jan 8 16:10:59 2020 +0000 sfc: move reset workqueue code Small functions doing work that will be common, related to reset workqueue management. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit b194045114c234f73a6c3831fbcde0f4161bddf0 Author: Alex Maftei (amaftei) Date: Wed Jan 8 16:10:45 2020 +0000 sfc: further preparation for code split Added more arguments for a couple of functions. Also moved a function to the common header. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit e1253f391042e34de66faf7d499595c00f99a076 Author: Alex Maftei (amaftei) Date: Wed Jan 8 16:10:32 2020 +0000 sfc: add new headers in preparation for code split New headers contain prototypes of functions that will be common between ef10 and upcoming driver. Removed static modifier from the affected functions. Some function prototypes were removed from existing headers. Signed-off-by: Alexandru-Mihai Maftei Signed-off-by: David S. Miller commit 62bba54d99407aedfe9b0a02e72e23c06e2b0116 Author: Baruch Siach Date: Thu Dec 19 12:28:45 2019 +0200 arm64: dts: marvell: clearfog-gt-8k: fix switch cpu port node Explicitly set the switch cpu (upstream) port phy-mode and managed properties. This fixes the Marvell 88E6141 switch serdes configuration with the recently enabled phylink layer. Fixes: a6120833272c ("arm64: dts: add support for SolidRun Clearfog GT 8K") Reported-by: Denis Odintsov Signed-off-by: Baruch Siach Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit b9ae51273655a72a12fba730843fd72fb132735a Author: Arnd Bergmann Date: Tue Jan 7 21:03:39 2020 +0100 hsr: fix dummy hsr_debugfs_rename() declaration The hsr_debugfs_rename prototype got an extra 'void' that needs to be removed again: In file included from /git/arm-soc/net/hsr/hsr_main.c:12: net/hsr/hsr_main.h:194:20: error: two or more data types in declaration specifiers static inline void void hsr_debugfs_rename(struct net_device *dev) Fixes: 4c2d5e33dcd3 ("hsr: rename debugfs file when interface name is changed") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 7c7b58d46b7636ff3cfb01cc633dda852fda70c8 Author: Vijay Khemka Date: Tue Jan 7 11:30:33 2020 -0800 net/ncsi: Send device address as source address After receiving device mac address from device, send this as a source address for further commands instead of broadcast address. This will help in multi host NIC cards. Signed-off-by: Vijay Khemka Signed-off-by: David S. Miller commit 832a9fc944e686bad760bed5d20741ee20200af0 Author: Bruno Thomsen Date: Tue Jan 7 15:11:38 2020 +0100 dt: bindings: add vendor prefix for Kamstrup A/S Kamstrup manufactures meters for electricity, heating, cooling and water. Including long-life communication infrastructure for e.g. smart grid based on Linux, more information on https://www.kamstrup.com Signed-off-by: Bruno Thomsen Signed-off-by: Rob Herring commit c00481d072506b471102e485d8b8bf324b11efdc Author: Miquel Raynal Date: Mon Jan 6 16:18:25 2020 +0100 dt-bindings: Add vendor prefix for Satoz Satoz is a Chinese TFT manufacturer. Website: http://www.sat-sz.com/English/index.html Signed-off-by: Miquel Raynal Acked-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200106151827.31511-1-miquel.raynal@bootlin.com commit 6ab2b3d9dc602230624afa8170f746c59d7fabde Author: Sam Ravnborg Date: Thu Jan 2 11:17:11 2020 +0100 dt-bindings: one binding file for all simple panels There is an increasing number of new simple panels. Common for many of these simple panels are that they have one mandatory power-supply and some of them have backlight and / or an enable gpio. The binding file to describe these panels adds overhead that really do not add value. The binding are known and there is nothing gained from a dedicated binding file nor for any dedicated example. The following patch introduces a single panel-simple.yaml and converts two ampire bindings over to the new file. The conversion - if applied will have following effects: - The maintainer for the individual file will change There is no need for many different maintainers for a simple binding. We have the same situation with the panel-simple driver in the kernel. - The license will change to (GPL-2.0-only OR BSD-2-Clause) There is usually only a single line copied from the original file, a line that is often copied from a datasheet. This license change should be acceptable considered what little is copied. If the license change is not OK we can use a dedicated binding file in these cases. This is a follow-up on Rob's big patch converting a lot of panel bindings to individual files: "dt-bindings: display: Convert a bunch of panels to DT schema" https://patchwork.ozlabs.org/patch/1197683/ The objectives with one file for the relevant simple panels are: - Make it simpler to add bindings for simple panels - Keep the number of bindings file lower and thus easier to find a relevant file to copy from when adding new panels. - Keep the binding documentation for simple panels more consistent - Make it simpler to add support for new panels v3: - Whitespace fix (checkpatch) - Indent compatible (Rob h) - Indent comments to give compatible more visibility (Rob h) v2: - spelling fixes (imirkin via irc, Rob) - updated description (Rob) - list properires in alphabetical order - added power-supply to example (Rob) - updated title - reworded changelog a little Signed-off-by: Sam Ravnborg Reviewed-by: Rob Herring Benjamin Gaignard Cc: Thierry Reding Cc: Maxime Ripard Cc: Yannick Fertre Cc: Mark Rutland Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: devicetree@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20200102101712.5085-2-sam@ravnborg.org commit f3ca745d8a0e6ace1f91bd122f5bff0323ff6bd8 Author: Benjamin Gaignard Date: Tue Jan 7 10:16:30 2020 +0100 dt-bindings: usb: Convert DWC2 bindings to json-schema Convert DWC2 bindings to DT schema format using json-schema. DWC2 is widely use but a couple of compatibles and properties (vusb_d-supply,vusb_a-supply) were missing in dwc2.txt, the patch add them. Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit 56b084ed6eaa0a6353395deffb601dbd6570a1a5 Author: YueHaibing Date: Wed Jan 8 01:54:31 2020 +0000 Bluetooth: hci_qca: Remove set but not used variable 'opcode' Fixes gcc '-Wunused-but-set-variable' warning: drivers/bluetooth/hci_qca.c: In function 'qca_controller_memdump': drivers/bluetooth/hci_qca.c:980:6: warning: variable 'opcode' set but not used [-Wunused-but-set-variable] It is never used since commit d841502c79e3 ("Bluetooth: hci_qca: Collect controller memory dump during SSR"), so remove it. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Marcel Holtmann commit 87c2a2a7d7631d0caa956b73f9f20010b5f55681 Author: Wei Yongjun Date: Wed Jan 8 03:59:31 2020 +0000 Bluetooth: hci_qca: Use vfree() instead of kfree() Use vfree() instead of kfree() to free vmalloc() allocated data. Fixes: d841502c79e3 ("Bluetooth: hci_qca: Collect controller memory dump during SSR") Signed-off-by: Wei Yongjun Reviewed-by: Balakrishna Godavarthi Signed-off-by: Marcel Holtmann commit 788d10c02f7ed1c971445da5e2addfc70f620311 Author: Colin Ian King Date: Tue Jan 7 18:00:13 2020 +0000 Bluetooth: remove redundant assignment to variable icid Variable icid is being rc is assigned with a value that is never read. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Simon Horman Signed-off-by: Marcel Holtmann commit e102774588b3ac0d221ed2d03a5153e056f1354f Author: yu kuai Date: Mon Jan 6 22:18:45 2020 +0800 net: 3com: 3c59x: remove set but not used variable 'mii_reg1' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/3com/3c59x.c: In function ‘vortex_up’: drivers/net/ethernet/3com/3c59x.c:1551:9: warning: variable ‘mii_reg1’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai Signed-off-by: David S. Miller commit eae2614d8739c1575b84433831ef8d7587f5a0dc Author: Markus Reichl Date: Mon Jan 6 22:16:26 2020 +0100 dt-bindings: add vendor Monolithic Power Systems MPS produce power regulators like the MP8859. Signed-off-by: Markus Reichl Signed-off-by: Rob Herring commit 94d3997828af15ecf1316c245c73f8a564922d19 Merge: 53ebeca24a87 7ee3f6d2486e Author: David S. Miller Date: Wed Jan 8 12:25:42 2020 -0800 Merge tag 'mlx5-updates-2020-01-07' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2020-01-07 This series adds 2 sets of changes to mlx5 driver 1) Misc updates and cleanups: 1.1) Stack usages warning cleanups and log level reduction 1.2) Increase the max number of supported rings 1.3) Support accept TC action on native NIC netdev. 2) Software steering support for multi destination steering rules: First three patches from Erez are adding the low level FW command support and SW steering infrastructure to create the mult-destination FW tables. Last four patches from Alex are introducing the needed changes and APIs in SW steering to create and manage multi-destination actions and rules. ==================== Signed-off-by: David S. Miller commit dc48a3a795ca5998a053060456a9bf807f619a42 Author: Yangtao Li Date: Tue Jan 7 19:10:20 2020 +0000 ARM: dts: exynos: Enable FIMD node and add proper panel node to Tiny4412 Enable fimd device node which is a display controller, and add panel node required by it. Signed-off-by: Yangtao Li Signed-off-by: Krzysztof Kozlowski commit c3dd3315ab58b2cfa1916df55b0d0f9fbd94266f Author: Martin Blumenstingl Date: Wed Dec 25 02:06:07 2019 +0100 ARM: dts: meson8b: use the actual frequency for the GPU's 364MHz OPP The clock setup on Meson8 cannot achieve a Mali frequency of exactly 182.15MHz. The vendor driver uses "FCLK_DIV7 / 1" for this frequency, which translates to 2550MHz / 7 / 1 = 364285714Hz. Update the GPU operating point to that specific frequency to not confuse myself when comparing the frequency from the .dts with the actual clock rate on the system. Fixes: c3ea80b6138cae ("ARM: dts: meson8b: add the Mali-450 MP2 GPU") Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit fe634a7a9a57fb736e39fb71aa9adc6448a90f94 Author: Martin Blumenstingl Date: Wed Dec 25 02:06:06 2019 +0100 ARM: dts: meson8: use the actual frequency for the GPU's 182.1MHz OPP The clock setup on Meson8 cannot achieve a Mali frequency of exactly 182.15MHz. The vendor driver uses "FCLK_DIV7 / 2" for this frequency, which translates to 2550MHz / 7 / 2 = 182142857Hz. Update the GPU operating point to that specific frequency to not confuse myself when comparing the frequency from the .dts with the actual clock rate on the system. Fixes: 7d3f6b536e72c9 ("ARM: dts: meson8: add the Mali-450 MP6 GPU") Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit da256557441700d4f3f95c6e94ef57794acd6bfc Author: Martin Blumenstingl Date: Wed Dec 25 02:06:05 2019 +0100 ARM: dts: meson8b: fix the clock controller compatible string The Meson8b clock controller is an evolution of the Meson8 clock controller. The clock controller on Meson8b contains two identical mali clock trees for glitch-free rate switching. Use the correct compatible string to make use of the glitch free mux. Fixes: b6db3936f2833c ("ARM: dts: meson: switch the clock controller to the HHI register area") Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit be63807524ddfd4c2e87ffd6cf2de8e7617d4832 Author: Jerome Brunet Date: Wed Dec 18 21:24:52 2019 +0100 arm64: dts: meson: add audio fifo depths Add the property describing the depth of the audio fifo on the axg, g12a and sm1 SoC family Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 5b99cad6966b92f757863ff9b6688051633fde9a Author: Dan Carpenter Date: Wed Jan 8 08:43:12 2020 +0300 gpu/drm: clean up white space in drm_legacy_lock_master_cleanup() We moved this code to a different file and accidentally deleted a newline. Signed-off-by: Dan Carpenter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200108054312.yzlj5wmbdktejgob@kili.mountain commit 2b10906f2d25515bba58070b8183babc89063597 Author: Brian Gerst Date: Thu Dec 19 06:58:12 2019 -0500 x86: Remove force_iret() force_iret() was originally intended to prevent the return to user mode with the SYSRET or SYSEXIT instructions, in cases where the register state could have been changed to be incompatible with those instructions. The entry code has been significantly reworked since then, and register state is validated before SYSRET or SYSEXIT are used. force_iret() no longer serves its original purpose and can be eliminated. Signed-off-by: Brian Gerst Signed-off-by: Borislav Petkov Acked-by: Oleg Nesterov Link: https://lkml.kernel.org/r/20191219115812.102620-1-brgerst@gmail.com commit 2faef64aa6b3c94c940c3a62ed22f3af4980223a Author: Michal Rostecki Date: Wed Jan 8 17:23:53 2020 +0100 bpftool: Add misc section and probe for large INSN limit Introduce a new probe section (misc) for probes not related to concrete map types, program types, functions or kernel configuration. Introduce a probe for large INSN limit as the first one in that section. Example outputs: # bpftool feature probe [...] Scanning miscellaneous eBPF features... Large program size limit is available # bpftool feature probe macros [...] /*** eBPF misc features ***/ #define HAVE_HAVE_LARGE_INSN_LIMIT # bpftool feature probe -j | jq '.["misc"]' { "have_large_insn_limit": true } Signed-off-by: Michal Rostecki Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20200108162428.25014-3-mrostecki@opensuse.org commit 5ff051200308ab6f4c64c0fe52187bf4a1234dac Author: Michal Rostecki Date: Wed Jan 8 17:23:52 2020 +0100 libbpf: Add probe for large INSN limit Introduce a new probe which checks whether kernel has large maximum program size which was increased in the following commit: c04c0d2b968a ("bpf: increase complexity limit and maximum program size") Based on the similar check in Cilium[0], authored by Daniel Borkmann. [0] https://github.com/cilium/cilium/commit/657d0f585afd26232cfa5d4e70b6f64d2ea91596 Co-authored-by: Daniel Borkmann Signed-off-by: Michal Rostecki Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20200108162428.25014-2-mrostecki@opensuse.org commit 40a9012a3b24334796403491b317a83935719809 Merge: 1bee7aaa075b e37131556801 Author: Olof Johansson Date: Wed Jan 8 10:26:26 2020 -0800 Merge tag 'cpuidle_psci-v5.5-rc4' of git://git.linaro.org/people/ulf.hansson/linux-pm into arm/drivers Initial support for hierarchical CPU arrangement, managed by PSCI and its corresponding cpuidle driver. This support is based upon using the generic PM domain, which already supports devices belonging to CPUs. Finally, these is a DTS patch that enables the hierarchical topology to be used for the Qcom 410c Dragonboard, which supports the PSCI OS-initiated mode. * tag 'cpuidle_psci-v5.5-rc4' of git://git.linaro.org/people/ulf.hansson/linux-pm: (611 commits) arm64: dts: Convert to the hierarchical CPU topology layout for MSM8916 cpuidle: psci: Add support for PM domains by using genpd PM / Domains: Introduce a genpd OF helper that removes a subdomain cpuidle: psci: Support CPU hotplug for the hierarchical model cpuidle: psci: Manage runtime PM in the idle path cpuidle: psci: Prepare to use OS initiated suspend mode via PM domains cpuidle: psci: Attach CPU devices to their PM domains cpuidle: psci: Add a helper to attach a CPU to its PM domain cpuidle: psci: Support hierarchical CPU idle states cpuidle: psci: Simplify OF parsing of CPU idle state nodes cpuidle: dt: Support hierarchical CPU idle states of: base: Add of_get_cpu_state_node() to get idle states for a CPU node firmware: psci: Export functions to manage the OSI mode dt: psci: Update DT bindings to support hierarchical PSCI states cpuidle: psci: Align psci_power_state count with idle state count Linux 5.5-rc4 locks: print unsigned ino in /proc/locks riscv: export flush_icache_all to modules riscv: reject invalid syscalls below -1 riscv: fix compile failure with EXPORT_SYMBOL() & !MMU ... Link: https://lore.kernel.org/r/20200102160820.3572-1-ulf.hansson@linaro.org Signed-off-by: Olof Johansson commit 0100f76d96346b44e7310a5cfb102124b6667643 Merge: 030cc6cb1b6c 530735df6258 Author: Florian Fainelli Date: Wed Jan 8 10:09:49 2020 -0800 Merge tag 'tags/bcm2835-dt-next-2020-01-07' into devicetree/next Signed-off-by: Florian Fainelli commit 8b185cf7ebaa1f390ba25368ce9ae387eb1a8b63 Author: Wambui Karuga Date: Thu Jan 2 12:55:15 2020 +0300 drm/omapdrm: use BUG_ON macro for error debugging. Since the if statement only checks for the value of the `id` variable, it can be replaced by the more concise BUG_ON() macro for error reporting. Issue found using coccinelle. Signed-off-by: Wambui Karuga Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200102095515.7106-1-wambui.karugax@gmail.com commit edf90818271b86dcfcc56e0380a8f7fac6eed0cc Author: Pan Zhang Date: Tue Dec 17 21:34:04 2019 +0800 mm: change_memory_common: add spaces for `*` operator Leaves one space before and after a binary operator both, it may be more elegant. Signed-off-by: Pan Zhang Signed-off-by: Will Deacon commit 4e410ef96ce6c8d2e2b69d09ab5d44dc8d5352e4 Author: Prabhakar Kushwaha Date: Sat Dec 21 08:32:38 2019 +0000 arm64: Remove __exception_text_start and __exception_text_end from asm/section.h Linux commit b6e43c0e3129 ("arm64: remove __exception annotations") has removed __exception_text_start and __exception_text_end sections. So removing reference of __exception_text_start and __exception_text_end from from asm/section.h. Cc: James Morse Reviewed-by: Anshuman Khandual Signed-off-by: Prabhakar Kushwaha Signed-off-by: Will Deacon commit 3c9c1dcde7c3a6c6203686ccd620620ae5b2a905 Author: Joe Perches Date: Tue Dec 31 01:54:57 2019 -0800 arm64: Kconfig: Remove CONFIG_ prefix from ARM64_PSEUDO_NMI section Remove the CONFIG_ prefix from the select statement for ARM_GIC_V3. Acked-by: Catalin Marinas Signed-off-by: Joe Perches Signed-off-by: Will Deacon commit 26415330a754b464b14a8e1afabeaba3381ba1eb Author: Hanjun Guo Date: Wed Dec 11 15:27:33 2019 +0800 arm64: armv8_deprecated: update the comments of armv8_deprecated_init() In commit c0d8832e78cb ("arm64: Ensure the instruction emulation is ready for userspace"), armv8_deprecated_init() was promoted to core_initcall() but the comments were left unchanged, update it now. Spotted by some random reading of the code. Signed-off-by: Hanjun Guo [will: "can guarantee" => "guarantees"] Signed-off-by: Will Deacon commit 31d868c49017140970d3a4ae45ab11d67618011c Author: Florian Fainelli Date: Mon Jan 6 14:54:12 2020 -0800 arm64: kpti: Add Broadcom Brahma-B53 core to the KPTI whitelist Broadcom Brahma-B53 CPUs do not implement ID_AA64PFR0_EL1.CSV3 but are not susceptible to Meltdown, so add all Brahma-B53 part numbers to kpti_safe_list[]. Signed-off-by: Florian Fainelli Signed-off-by: Will Deacon commit b3c75c9d762b67de278c8847529b1e3a4c143a8e Author: Anthony Steinhauser Date: Mon Dec 16 14:53:47 2019 -0800 Return ENODEV when the selected speculation misfeature is unsupported When the control of the selected speculation misbehavior is unsupported, the kernel should return ENODEV according to the documentation: https://www.kernel.org/doc/html/v4.17/userspace-api/spec_ctrl.html Current aarch64 implementation of SSB control sometimes returns EINVAL which is reserved for unimplemented prctl and for violations of reserved arguments. This change makes the aarch64 implementation consistent with the x86 implementation and with the documentation. Signed-off-by: Anthony Steinhauser Signed-off-by: Will Deacon commit 6948199a9af969342a6faf257678616aea491fcf Author: Sean Christopherson Date: Fri Dec 6 15:57:29 2019 -0800 KVM: x86/mmu: WARN if root_hpa is invalid when handling a page fault WARN if root_hpa is invalid when handling a page fault. The check on root_hpa exists for historical reasons that no longer apply to the current KVM code base. Remove an equivalent debug-only warning in direct_page_fault(), whose existence more or less confirms that root_hpa should always be valid when handling a page fault. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 0c7a98e34ddae6e45938f02d4ce7f04114ef0bdc Author: Sean Christopherson Date: Fri Dec 6 15:57:28 2019 -0800 KVM: x86/mmu: WARN on an invalid root_hpa WARN on the existing invalid root_hpa checks in __direct_map() and FNAME(fetch). The "legitimate" path that invalidated root_hpa in the middle of a page fault is long since gone, i.e. it should no longer be impossible to invalidate in the middle of a page fault[*]. The root_hpa checks were added by two related commits 989c6b34f6a94 ("KVM: MMU: handle invalid root_hpa at __direct_map") 37f6a4e237303 ("KVM: x86: handle invalid root_hpa everywhere") to fix a bug where nested_vmx_vmexit() could be called *in the middle* of a page fault. At the time, vmx_interrupt_allowed(), which was and still is used by kvm_can_do_async_pf() via ->interrupt_allowed(), directly invoked nested_vmx_vmexit() to switch from L2 to L1 to emulate a VM-Exit on a pending interrupt. Emulating the nested VM-Exit resulted in root_hpa being invalidated by kvm_mmu_reset_context() without explicitly terminating the page fault. Now that root_hpa is checked for validity by kvm_mmu_page_fault(), WARN on an invalid root_hpa to detect any flows that reset the MMU while handling a page fault. The broken vmx_interrupt_allowed() behavior has long since been fixed and resetting the MMU during a page fault should not be considered legal behavior. [*] It's actually technically possible in FNAME(page_fault)() because it calls inject_page_fault() when the guest translation is invalid, but in that case the page fault handling is immediately terminated. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit ddce6208217c1aac22eec74461afb73e2af1fb06 Author: Sean Christopherson Date: Fri Dec 6 15:57:27 2019 -0800 KVM: x86/mmu: Move root_hpa validity checks to top of page fault handler Add a check on root_hpa at the beginning of the page fault handler to consolidate several checks on root_hpa that are scattered throughout the page fault code. This is a preparatory step towards eventually removing such checks altogether, or at the very least WARNing if an invalid root is encountered. Remove only the checks that can be easily audited to confirm that root_hpa cannot be invalidated between their current location and the new check in kvm_mmu_page_fault(), and aren't currently protected by mmu_lock, i.e. keep the checks in __direct_map() and FNAME(fetch) for the time being. The root_hpa checks that are consolidate were all added by commit 37f6a4e237303 ("KVM: x86: handle invalid root_hpa everywhere") which was a follow up to a bug fix for __direct_map(), commit 989c6b34f6a94 ("KVM: MMU: handle invalid root_hpa at __direct_map") At the time, nested VMX had, in hindsight, crazy handling of nested interrupts and would trigger a nested VM-Exit in ->interrupt_allowed(), and thus unexpectedly reset the MMU in flows such as can_do_async_pf(). Now that the wonky nested VM-Exit behavior is gone, the root_hpa checks are bogus and confusing, e.g. it's not at all obvious what they actually protect against, and at first glance they appear to be broken since many of them run without holding mmu_lock. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 4cd071d13c5cc671826571d9876f76d001937a8b Author: Sean Christopherson Date: Fri Dec 6 15:57:26 2019 -0800 KVM: x86/mmu: Move calls to thp_adjust() down a level Move the calls to thp_adjust() down a level from the page fault handlers to the map/fetch helpers and remove the page count shuffling done in thp_adjust(). Despite holding a reference to the underlying page while processing a page fault, the page fault flows don't actually rely on holding a reference to the page when thp_adjust() is called. At that point, the fault handlers hold mmu_lock, which prevents mmu_notifier from completing any invalidations, and have verified no invalidations from mmu_notifier have occurred since the page reference was acquired (which is done prior to taking mmu_lock). The kvm_release_pfn_clean()/kvm_get_pfn() dance in thp_adjust() is a quirk that is necessitated because thp_adjust() modifies the pfn that is consumed by its caller. Because the page fault handlers call kvm_release_pfn_clean() on said pfn, thp_adjust() needs to transfer the reference to the correct pfn purely for correctness when the pfn is released. Calling thp_adjust() from __direct_map() and FNAME(fetch) means the pfn adjustment doesn't change the pfn as seen by the page fault handlers, i.e. the pfn released by the page fault handlers is the same pfn that was returned by gfn_to_pfn(). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 0885904d4ff7e2d926caf743537ddd411ff22bfa Author: Sean Christopherson Date: Fri Dec 6 15:57:25 2019 -0800 KVM: x86/mmu: Move transparent_hugepage_adjust() above __direct_map() Move thp_adjust() above __direct_map() in preparation of calling thp_adjust() from __direct_map() and FNAME(fetch). No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 0f90e1c10dca5149529b4af6d94d7804ac2ef37b Author: Sean Christopherson Date: Fri Dec 6 15:57:24 2019 -0800 KVM: x86/mmu: Consolidate tdp_page_fault() and nonpaging_page_fault() Consolidate the direct MMU page fault handlers into a common helper, direct_page_fault(). Except for unique max level conditions, the tdp and nonpaging fault handlers are functionally identical. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 2cb70fd441b6b40ffd9ee1782a972f149ba72158 Author: Sean Christopherson Date: Fri Dec 6 15:57:23 2019 -0800 KVM: x86/mmu: Rename lpage_disallowed to account_disallowed_nx_lpage Rename __direct_map()'s param that controls whether or not a disallowed NX large page should be accounted to match what it actually does. The nonpaging_page_fault() case unconditionally passes %false for the param even though it locally sets lpage_disallowed. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 2f57b7051fe8fa680b7c38c7e98094fa3ba3ba8b Author: Sean Christopherson Date: Fri Dec 6 15:57:22 2019 -0800 KVM: x86/mmu: Persist gfn_lpage_is_disallowed() to max_level Persist the max page level calculated via gfn_lpage_is_disallowed() to the max level "returned" by mapping_level() so that its naturally taken into account by the max level check that conditions calling transparent_hugepage_adjust(). Drop the gfn_lpage_is_disallowed() check in thp_adjust() as it's now handled by mapping_level() and its callers. Add a comment to document the behavior of host_mapping_level() and its interaction with max level and transparent huge pages. Note, transferring the gfn_lpage_is_disallowed() from thp_adjust() to mapping_level() superficially affects how changes to a memslot's disallow_lpage count will be handled due to thp_adjust() being run while holding mmu_lock. In the more common case where a different vCPU increments the count via account_shadowed(), gfn_lpage_is_disallowed() is rechecked by set_spte() to ensure a writable large page isn't created. In the less common case where the count is decremented to zero due to all shadow pages in the memslot being zapped, THP behavior now matches hugetlbfs behavior in the sense that a small page will be created when a large page could be used if the count reaches zero in the miniscule window between mapping_level() and acquiring mmu_lock. Lastly, the new THP behavior also follows hugetlbfs behavior in the absurdly unlikely scenario of a memslot being moved such that the memslot's compatibility with respect to large pages changes, but without changing the validity of the gpf->pfn walk. I.e. if a memslot is moved between mapping_level() and snapshotting mmu_seq, it's theoretically possible to consume a stale disallow_lpage count. But, since KVM zaps all shadow pages when moving a memslot and forces all vCPUs to reload a new MMU, the inserted spte will always be thrown away prior to completing the memslot move, i.e. whether or not the spte accurately reflects disallow_lpage is irrelevant. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit cbe1e6f035523b5fd29e44e18b82081b33d1f3f3 Author: Sean Christopherson Date: Fri Dec 6 15:57:21 2019 -0800 KVM: x86/mmu: Incorporate guest's page level into max level for shadow MMU Restrict the max level for a shadow page based on the guest's level instead of capping the level after the fact for host-mapped huge pages, e.g. hugetlbfs pages. Explicitly capping the max level using the guest mapping level also eliminates FNAME(page_fault)'s subtle dependency on THP only supporting 2mb pages. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 39ca1ecb784b29965fd780bed1e8a3792a086a29 Author: Sean Christopherson Date: Fri Dec 6 15:57:20 2019 -0800 KVM: x86/mmu: Refactor handling of forced 4k pages in page faults Refactor the page fault handlers and mapping_level() to track the max allowed page level instead of only tracking if a 4k page is mandatory due to one restriction or another. This paves the way for cleanly consolidating tdp_page_fault() and nonpaging_page_fault(), and for eliminating a redundant check on mmu_gfn_lpage_is_disallowed(). No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit f0f37e229c0517fa0d8bda73a2aeee28260370a2 Author: Sean Christopherson Date: Fri Dec 6 15:57:19 2019 -0800 KVM: x86/mmu: Refactor the per-slot level calculation in mapping_level() Invert the loop which adjusts the allowed page level based on what's compatible with the associated memslot to use a largest-to-smallest page size walk. This paves the way for passing around a "max level" variable instead of having redundant checks and/or multiple booleans. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit cb9b88c669396e3e5f957fe909ff901b51321013 Author: Sean Christopherson Date: Fri Dec 6 15:57:18 2019 -0800 KVM: x86/mmu: Refactor handling of cache consistency with TDP Pre-calculate the max level for a TDP page with respect to MTRR cache consistency in preparation of replacing force_pt_level with max_level, and eventually combining the bulk of nonpaging_page_fault() and tdp_page_fault() into a common helper. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 9f1a8526fbe3e82afae565fd008f2ca2035662e8 Author: Sean Christopherson Date: Fri Dec 6 15:57:17 2019 -0800 KVM: x86/mmu: Move nonpaging_page_fault() below try_async_pf() Move nonpaging_page_fault() below try_async_pf() to eliminate the forward declaration of try_async_pf() and to prepare for combining the bulk of nonpaging_page_fault() and tdp_page_fault() into a common helper. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 367fd790b17dbe2847c29099cf9902ded207901c Author: Sean Christopherson Date: Fri Dec 6 15:57:16 2019 -0800 KVM: x86/mmu: Fold nonpaging_map() into nonpaging_page_fault() Fold nonpaging_map() into its sole caller, nonpaging_page_fault(), in preparation for combining the bulk of nonpaging_page_fault() and tdp_page_fault() into a common helper. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit ba7888dde6afc32885a0960f11b898ff97d4a060 Author: Sean Christopherson Date: Fri Dec 6 15:57:15 2019 -0800 KVM: x86/mmu: Move definition of make_mmu_pages_available() up Move make_mmu_pages_available() above its first user to put it closer to related code and eliminate a forward declaration. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 736c291c9f36b07f8889c61764c28edce20e715d Author: Sean Christopherson Date: Fri Dec 6 15:57:14 2019 -0800 KVM: x86: Use gpa_t for cr2/gpa to fix TDP support on 32-bit KVM Convert a plethora of parameters and variables in the MMU and page fault flows from type gva_t to gpa_t to properly handle TDP on 32-bit KVM. Thanks to PSE and PAE paging, 32-bit kernels can access 64-bit physical addresses. When TDP is enabled, the fault address is a guest physical address and thus can be a 64-bit value, even when both KVM and its guest are using 32-bit virtual addressing, e.g. VMX's VMCS.GUEST_PHYSICAL is a 64-bit field, not a natural width field. Using a gva_t for the fault address means KVM will incorrectly drop the upper 32-bits of the GPA. Ditto for gva_to_gpa() when it is used to translate L2 GPAs to L1 GPAs. Opportunistically rename variables and parameters to better reflect the dual address modes, e.g. use "cr2_or_gpa" for fault addresses and plain "addr" instead of "vaddr" when the address may be either a GVA or an L2 GPA. Similarly, use "gpa" in the nonpaging_page_fault() flows to avoid a confusing "gpa_t gva" declaration; this also sets the stage for a future patch to combing nonpaging_page_fault() and tdp_page_fault() with minimal churn. Sprinkle in a few comments to document flows where an address is known to be a GVA and thus can be safely truncated to a 32-bit value. Add WARNs in kvm_handle_page_fault() and FNAME(gva_to_gpa_nested)() to help document such cases and detect bugs. Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 95145c25a78cc0a9d3cbc75708abde432310c5a1 Author: Sean Christopherson Date: Mon Dec 9 12:05:17 2019 -0800 KVM: x86: Add a WARN on TIF_NEED_FPU_LOAD in kvm_load_guest_fpu() WARN once in kvm_load_guest_fpu() if TIF_NEED_FPU_LOAD is observed, as that would mean that KVM is corrupting userspace's FPU by saving unknown register state into arch.user_fpu. Add a comment to explain why KVM WARNs on TIF_NEED_FPU_LOAD instead of implementing logic similar to fpu__copy(). Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit f958bd2314d117f8c29f4821401bc1925bc2e5ef Author: Sean Christopherson Date: Mon Dec 9 12:19:31 2019 -0800 KVM: x86: Fix potential put_fpu() w/o load_fpu() on MPX platform Unlike most state managed by XSAVE, MPX is initialized to zero on INIT. Because INITs are usually recognized in the context of a VCPU_RUN call, kvm_vcpu_reset() puts the guest's FPU so that the FPU state is resident in memory, zeros the MPX state, and reloads FPU state to hardware. But, in the unlikely event that an INIT is recognized during kvm_arch_vcpu_ioctl_get_mpstate() via kvm_apic_accept_events(), kvm_vcpu_reset() will call kvm_put_guest_fpu() without a preceding kvm_load_guest_fpu() and corrupt the guest's FPU state (and possibly userspace's FPU state as well). Given that MPX is being removed from the kernel[*], fix the bug with the simple-but-ugly approach of loading the guest's FPU during KVM_GET_MP_STATE. [*] See commit f240652b6032b ("x86/mpx: Remove MPX APIs"). Fixes: f775b13eedee2 ("x86,kvm: move qemu/guest FPU switching out to vcpu_run") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit bbfdafa860bb41344fad8fea06b78c74ec79e181 Author: Miaohe Lin Date: Fri Dec 6 10:53:53 2019 +0800 KVM: lib: use jump label to handle resource release in irq_bypass_register_producer() Use out_err jump label to handle resource release. It's a good practice to release resource in one place and help eliminate some duplicated code. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 8262fe85b4edc5fb3dd7b9520bf5c6b4f027fa55 Author: Miaohe Lin Date: Fri Dec 6 10:53:52 2019 +0800 KVM: lib: use jump label to handle resource release in irq_bypass_register_consumer() Use out_err jump label to handle resource release. It's a good practice to release resource in one place and help eliminate some duplicated code. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 885f7d6cb87eb15d62613c05d8012e9370fb5e27 Author: Zenghui Yu Date: Fri Dec 6 18:45:52 2019 +0800 KVM: Remove duplicated declaration of kvm_vcpu_kick There are two declarations of kvm_vcpu_kick() in kvm_host.h where one of them is redundant. Remove to keep the git grep a bit cleaner. Reviewed-by: Cornelia Huck Signed-off-by: Zenghui Yu Signed-off-by: Paolo Bonzini commit c90f4d03cce1814b4e08372359116710bbaccce3 Author: Jim Mattson Date: Fri Dec 6 15:46:37 2019 -0800 kvm: nVMX: Aesthetic cleanup of handle_vmread and handle_vmwrite Apply reverse fir tree declaration order, shorten some variable names to avoid line wrap, reformat a block comment, delete an extra blank line, and use BIT(10) instead of (1u << 10). Signed-off-by: Jim Mattson Cc: Paolo Bonzini Cc: Sean Christopherson Reviewed-by: Peter Shier Reviewed-by: Oliver Upton Reviewed-by: Jon Cargille Signed-off-by: Paolo Bonzini commit 693e02cc24090c379217138719d9d84e50036b24 Author: Jim Mattson Date: Fri Dec 6 15:46:36 2019 -0800 kvm: nVMX: VMWRITE checks unsupported field before read-only field According to the SDM, VMWRITE checks to see if the secondary source operand corresponds to an unsupported VMCS field before it checks to see if the secondary source operand corresponds to a VM-exit information field and the processor does not support writing to VM-exit information fields. Fixes: 49f705c5324aa ("KVM: nVMX: Implement VMREAD and VMWRITE") Signed-off-by: Jim Mattson Cc: Paolo Bonzini Reviewed-by: Peter Shier Reviewed-by: Oliver Upton Reviewed-by: Jon Cargille Signed-off-by: Paolo Bonzini commit dd2d6042b7f4a5440705b4ffc6c4c2dba81a43b7 Author: Jim Mattson Date: Fri Dec 6 15:46:35 2019 -0800 kvm: nVMX: VMWRITE checks VMCS-link pointer before VMCS field According to the SDM, a VMWRITE in VMX non-root operation with an invalid VMCS-link pointer results in VMfailInvalid before the validity of the VMCS field in the secondary source operand is checked. For consistency, modify both handle_vmwrite and handle_vmread, even though there was no problem with the latter. Fixes: 6d894f498f5d1 ("KVM: nVMX: vmread/vmwrite: Use shadow vmcs12 if running L2") Signed-off-by: Jim Mattson Cc: Liran Alon Cc: Paolo Bonzini Cc: Vitaly Kuznetsov Reviewed-by: Peter Shier Reviewed-by: Oliver Upton Reviewed-by: Jon Cargille Signed-off-by: Paolo Bonzini commit 5e3d394fdd9e6b49cd8b28d85adff100a5bddc66 Author: Xiaoyao Li Date: Fri Dec 6 16:45:26 2019 +0800 KVM: VMX: Fix the spelling of CPU_BASED_USE_TSC_OFFSETTING The mis-spelling is found by checkpatch.pl, so fix them. Signed-off-by: Xiaoyao Li Signed-off-by: Paolo Bonzini commit 4e2a0bc56ad197e5ccfab8395649b681067fe8cb Author: Xiaoyao Li Date: Fri Dec 6 16:45:25 2019 +0800 KVM: VMX: Rename NMI_PENDING to NMI_WINDOW Rename the NMI-window exiting related definitions to match the latest Intel SDM. No functional changes. Signed-off-by: Xiaoyao Li Signed-off-by: Paolo Bonzini commit 9dadc2f918df26e64aa04794cdb4d8667c934f47 Author: Xiaoyao Li Date: Fri Dec 6 16:45:24 2019 +0800 KVM: VMX: Rename INTERRUPT_PENDING to INTERRUPT_WINDOW Rename interrupt-windown exiting related definitions to match the latest Intel SDM. No functional changes. Signed-off-by: Xiaoyao Li Signed-off-by: Paolo Bonzini commit 0a03cbdac115fdcc06fd9d05ce3c389d0ead9a71 Author: Miaohe Lin Date: Fri Dec 6 16:20:18 2019 +0800 KVM: x86: Fix some comment typos Fix some typos in comment. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit f7ef82c22fd76c300ae71c6dd19d9b03f4ab8253 Author: Mark Brown Date: Wed Jan 8 16:57:52 2020 +0000 arm64: asm: Remove ENDPIPROC() Now all the users have been removed delete the definition of ENDPIPROC() to ensure we don't acquire any new users. Signed-off-by: Mark Brown Signed-off-by: Will Deacon commit 3751e728cef2908c15974a5ae44627fd41ef3362 Author: AKASHI Takahiro Date: Mon Dec 16 11:12:47 2019 +0900 arm64: kexec_file: add crash dump support Enabling crash dump (kdump) includes * prepare contents of ELF header of a core dump file, /proc/vmcore, using crash_prepare_elf64_headers(), and * add two device tree properties, "linux,usable-memory-range" and "linux,elfcorehdr", which represent respectively a memory range to be used by crash dump kernel and the header's location Signed-off-by: AKASHI Takahiro Cc: Catalin Marinas Cc: Will Deacon Reviewed-by: James Morse Tested-and-reviewed-by: Bhupesh Sharma Signed-off-by: Will Deacon commit c273a2bd8aa81b72e48736c3aa51f7ffeae39925 Author: AKASHI Takahiro Date: Mon Dec 9 12:03:44 2019 +0900 libfdt: include fdt_addresses.c In the implementation of kexec_file_loaded-based kdump for arm64, fdt_appendprop_addrrange() will be needed. So include fdt_addresses.c in making libfdt. Signed-off-by: AKASHI Takahiro Cc: Rob Herring Cc: Frank Rowand Signed-off-by: Will Deacon commit 497210f27b8ccc38c03c679237a4fc766fbc3aba Author: Colin Ian King Date: Mon Jan 6 11:11:24 2020 +0000 usb: typec: ucsi: fix spelling mistake "connetor" -> "connector" There is a spelling mistake in a dev_dbg message. Fix it. Signed-off-by: Colin Ian King Acked-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200106111124.28100-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 60826786fcdb328a222e41ea13e0e63b23ad9daa Author: Krzysztof Kozlowski Date: Fri Jan 3 17:40:31 2020 +0100 usb: ehci-mv: Fix missing iomem in cast Fix missing __iomem in cast to struct ehci_caps. This fixes the Sparse warning visible on x86_64 compile test: drivers/usb/host/ehci-mv.c:167:23: warning: cast removes address space '' of expression drivers/usb/host/ehci-mv.c:167:20: warning: incorrect type in assignment (different address spaces) drivers/usb/host/ehci-mv.c:167:20: expected struct ehci_caps [noderef] *caps drivers/usb/host/ehci-mv.c:167:20: got struct ehci_caps * Reported-by: kbuild test robot Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200103164031.4089-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7b7ad03f49a5c6be19ef1c3d4090651b5892e6e0 Author: Julia Lawall Date: Wed Jan 1 18:49:41 2020 +0100 USB: omap_udc: use resource_size Use resource_size rather than a verbose computation on the end and start fields. The semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) @@ struct resource ptr; @@ - (ptr.end - ptr.start + 1) + resource_size(&ptr) Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1577900990-8588-2-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Greg Kroah-Hartman commit 0e84f2fd0d261ace1bde76b3c0ed6eee02126e85 Author: Julia Lawall Date: Wed Jan 1 08:43:22 2020 +0100 usb: gadget: udc: atmel: constify copied structure The usba_gadget_template structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall Acked-by: Cristian Birsan Link: https://lore.kernel.org/r/1577864614-5543-5-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Greg Kroah-Hartman commit a2c2e67923ecb73c92028e9b128a9bd48d2e25e9 Author: Pavel Tatashin Date: Wed Dec 4 10:59:23 2019 -0500 arm64: hibernate: add trans_pgd public functions trans_pgd_create_copy() and trans_pgd_map_page() are going to be the basis for new shared code that handles page tables for cases which are between kernels: kexec, and hibernate. Note: Eventually, get_safe_page() will be moved into a function pointer passed via argument, but for now keep it as is. Signed-off-by: Pavel Tatashin Reviewed-by: James Morse [will: Keep these functions static until kexec needs them] Signed-off-by: Will Deacon commit 628d0e1cb7be79a20d2aca568411809e11ea343e Author: Geert Uytterhoeven Date: Tue Dec 31 14:46:44 2019 +0100 of: overlay: Remove blank line between assignment and check There used to be blank lines between assignment and check of the __of_changeset_revert_entries() result, to make the phandle cache management operations stand out. After the removal of those operations in commit 90dc0d1ce890419f ("of: Rework and simplify phandle cache to use a fixed size"), there is no longer a reason to have such a blank line. Remove the blank line, to rejoin visibly the status assignement and check, and to match coding style. Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring commit 3d7558bf2603159a51188842a0e221f2eaff5d72 Author: Mohana Datta Yelugoti Date: Thu Dec 26 02:29:39 2019 +0530 Documentation: spi-ir-led: fix spelling mistake "balue"->"value" There is a spelling mistake in: Documentation/bindings/leds/irled/spi-ir-led.txt. Fix it. Signed-off-by: Mohana Datta Yelugoti Signed-off-by: Rob Herring commit e556280d3691651c38022feaab6d6075adaa03bf Author: Bob Peterson Date: Tue Dec 10 12:05:55 2019 -0600 gfs2: minor cleanup: remove unneeded variable ret in gfs2_jdata_writepage This patch simply removes variable ret, which is used to store the return code of its call to __gfs2_jdata_writepage, in favor of just returning the result directly. Signed-off-by: Bob Peterson commit f0682757230bdfc58118125dc81d805a427766b8 Author: Boyan Ding Date: Wed Jan 1 12:41:20 2020 -0800 pinctrl: sunrisepoint: Add missing Interrupt Status register offset Commit 179e5a6114cc ("pinctrl: intel: Remove default Interrupt Status offset") removes default interrupt status offset of GPIO controllers, with previous commits explicitly providing the previously default offsets. However, the is_offset value in SPTH_COMMUNITY is missing, preventing related irq from being properly detected and handled. Fixes: f702e0b93cdb ("pinctrl: sunrisepoint: Provide Interrupt Status register offset") Link: https://bugzilla.kernel.org/show_bug.cgi?id=205745 Cc: stable@vger.kernel.org Signed-off-by: Boyan Ding Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 150a84fee84fbaf2a2a6c76c44ae027b5c7d151a Author: Peter Xu Date: Wed Dec 4 20:07:21 2019 +0100 KVM: X86: Convert the last users of "shorthand = 0" to use macros Change the last users of "shorthand = 0" to use APIC_DEST_NOSHORT. Reviewed-by: Vitaly Kuznetsov Signed-off-by: Peter Xu Signed-off-by: Paolo Bonzini commit 5c69d5c113f15a7a9956185b815d14d50f3efad4 Author: Peter Xu Date: Wed Dec 4 20:07:20 2019 +0100 KVM: X86: Fix callers of kvm_apic_match_dest() to use correct macros Callers of kvm_apic_match_dest() should always pass in APIC_DEST_* macros for either dest_mode and short_hand parameters. Fix up all the callers of kvm_apic_match_dest() that are not following the rule. Since at it, rename the parameter from short_hand to shorthand in kvm_apic_match_dest(), as suggested by Vitaly. Reported-by: Sean Christopherson Reported-by: Vitaly Kuznetsov Reviewed-by: Vitaly Kuznetsov Signed-off-by: Peter Xu Signed-off-by: Paolo Bonzini commit ac8ef992cd02cdb8290ca788746d283fe3092500 Author: Peter Xu Date: Wed Dec 4 20:07:19 2019 +0100 KVM: X86: Drop KVM_APIC_SHORT_MASK and KVM_APIC_DEST_MASK We have both APIC_SHORT_MASK and KVM_APIC_SHORT_MASK defined for the shorthand mask. Similarly, we have both APIC_DEST_MASK and KVM_APIC_DEST_MASK defined for the destination mode mask. Drop the KVM_APIC_* macros and replace the only user of them to use the APIC_DEST_* macros instead. At the meantime, move APIC_SHORT_MASK and APIC_DEST_MASK from lapic.c to lapic.h. Reviewed-by: Vitaly Kuznetsov Signed-off-by: Peter Xu Signed-off-by: Paolo Bonzini commit c96001c5702e66b64e0ffe533aa19d6567ce15bc Author: Peter Xu Date: Wed Dec 4 20:07:18 2019 +0100 KVM: X86: Use APIC_DEST_* macros properly in kvm_lapic_irq.dest_mode We were using either APIC_DEST_PHYSICAL|APIC_DEST_LOGICAL or 0|1 to fill in kvm_lapic_irq.dest_mode. It's fine only because in most cases when we check against dest_mode it's against APIC_DEST_PHYSICAL (which equals to 0). However, that's not consistent. We'll have problem when we want to start checking against APIC_DEST_LOGICAL, which does not equals to 1. This patch firstly introduces kvm_lapic_irq_dest_mode() helper to take any boolean of destination mode and return the APIC_DEST_* macro. Then, it replaces the 0|1 settings of irq.dest_mode with the helper. Signed-off-by: Peter Xu Signed-off-by: Paolo Bonzini commit 59508b303e4e35de9dd708ec87b1e89b1f3c1616 Author: Peter Xu Date: Wed Dec 4 20:07:17 2019 +0100 KVM: X86: Move irrelevant declarations out of ioapic.h kvm_apic_match_dest() is declared in both ioapic.h and lapic.h. Remove the declaration in ioapic.h. kvm_apic_compare_prio() is declared in ioapic.h but defined in lapic.c. Move the declaration to lapic.h. kvm_irq_delivery_to_apic() is declared in ioapic.h but defined in irq_comm.c. Move the declaration to irq.h. hyperv.c needs to use kvm_irq_delivery_to_apic(). Include irq.h in hyperv.c. Reviewed-by: Vitaly Kuznetsov Signed-off-by: Peter Xu Signed-off-by: Paolo Bonzini commit b4b2963616bbd91ebb33148522552e1135de56ae Author: Peter Xu Date: Wed Dec 4 20:07:16 2019 +0100 KVM: X86: Fix kvm_bitmap_or_dest_vcpus() to use irq shorthand The 3rd parameter of kvm_apic_match_dest() is the irq shorthand, rather than the irq delivery mode. Fixes: 7ee30bc132c6 ("KVM: x86: deliver KVM IOAPIC scan request to target vCPUs") Reviewed-by: Vitaly Kuznetsov Signed-off-by: Peter Xu Signed-off-by: Paolo Bonzini commit fe3c2b4c228443b505f2d8981c4871b96cfec6d6 Author: Miaohe Lin Date: Thu Dec 5 11:40:16 2019 +0800 KVM: explicitly set rmap_head->val to 0 in pte_list_desc_remove_entry() When we reach here, we have desc->sptes[j] = NULL with j = 0. So we can replace desc->sptes[0] with 0 to make it more clear. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit d29c03a58705417561a5d2bacec4194ef6485ece Author: Miaohe Lin Date: Thu Dec 5 11:05:05 2019 +0800 KVM: get rid of var page in kvm_set_pfn_dirty() We can get rid of unnecessary var page in kvm_set_pfn_dirty() , thus make code style similar with kvm_set_pfn_accessed(). Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 4fb7b452ce7b1490e789bf6fabd4f397cf57a26f Author: Miaohe Lin Date: Thu Dec 5 10:24:38 2019 +0800 KVM: vmx: remove unreachable statement in vmx_get_msr_feature() We have no way to reach the final statement, remove it. Signed-off-by: Miaohe Lin Signed-off-by: Paolo Bonzini commit 7adacf5eb2d2048045d9fd8fdab861fd9e7e2e96 Author: Paolo Bonzini Date: Wed Dec 4 15:50:27 2019 +0100 KVM: x86: use CPUID to locate host page table reserved bits The comment in kvm_get_shadow_phys_bits refers to MKTME, but the same is actually true of SME and SEV. Just use CPUID[0x8000_0008].EAX[7:0] unconditionally if available, it is simplest and works even if memory is not encrypted. Cc: stable@vger.kernel.org Reported-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit 7ea4088938b793d9a8d4e205b2fe54fba4cf9739 Author: Pavel Tatashin Date: Wed Dec 4 10:59:22 2019 -0500 arm64: hibernate: add PUD_SECT_RDONLY There is PMD_SECT_RDONLY that is used in pud_* function which is confusing. Signed-off-by: Pavel Tatashin Acked-by: James Morse Signed-off-by: Will Deacon commit 13373f0e658013b0412ee58ce8131de390ff1c44 Author: Pavel Tatashin Date: Wed Dec 4 10:59:21 2019 -0500 arm64: hibernate: rename dst to page in create_safe_exec_page create_safe_exec_page() allocates a safe page and maps it at a specific location, also this function returns the physical address of newly allocated page. The destination VA, and PA are specified in arguments: dst_addr, phys_dst_addr However, within the function it uses "dst" which has unsigned long type, but is actually a pointers in the current virtual space. This is confusing to read. Rename dst to more appropriate page (page that is created), and also change its time to "void *" Signed-off-by: Pavel Tatashin Reviewed-by: James Morse Signed-off-by: Will Deacon commit a89d7ff933b0157a18e4010f10301d927b894634 Author: Pavel Tatashin Date: Wed Dec 4 10:59:20 2019 -0500 arm64: hibernate: remove gotos as they are not needed Usually, gotos are used to handle cleanup after exception, but in case of create_safe_exec_page and swsusp_arch_resume there are no clean-ups. So, simply return the errors directly. Signed-off-by: Pavel Tatashin Reviewed-by: James Morse Signed-off-by: Will Deacon commit 051a7a94aaa9ca8e057aa9136073fb5e6e2cef5e Author: Pavel Tatashin Date: Wed Dec 4 10:59:19 2019 -0500 arm64: hibernate: use get_safe_page directly create_safe_exec_page() uses hibernate's allocator to create a set of page table to map a single page that will contain the relocation code. Remove the allocator related arguments, and use get_safe_page directly, as it is done in other local functions in this file to simplify function prototype. Removing this function pointer makes it easier to refactor the code later. Signed-off-by: Pavel Tatashin Reviewed-by: Matthias Brugger Signed-off-by: Will Deacon commit d234332c281533a46e77dceff3901ef63e546cce Author: Pavel Tatashin Date: Wed Dec 4 10:59:18 2019 -0500 arm64: hibernate: pass the allocated pgdp to ttbr0 ttbr0 should be set to the beginning of pgdp, however, currently in create_safe_exec_page it is set to pgdp after pgd_offset_raw(), which works by accident. Signed-off-by: Pavel Tatashin Reviewed-by: James Morse Signed-off-by: Will Deacon commit 621516789ee6e285cb2088fe4706eedd030d38bf Author: Pavel Tatashin Date: Wed Dec 4 10:59:17 2019 -0500 arm64: kexec: make dtb_mem always enabled Currently, dtb_mem is enabled only when CONFIG_KEXEC_FILE is enabled. This adds ugly ifdefs to c files. Always enabled dtb_mem, when it is not used, it is NULL. Change the dtb_mem to phys_addr_t, as it is a physical address. Signed-off-by: Pavel Tatashin Signed-off-by: Will Deacon commit 3b54b743397eb51f879f2bf24b9938b80e5a2092 Author: Pavel Tatashin Date: Wed Dec 4 10:59:16 2019 -0500 arm64: kexec: remove unnecessary debug prints The kexec_image_info() outputs all the necessary information about the upcoming kexec. The extra debug printfs in machine_kexec() are not needed. Signed-off-by: Pavel Tatashin Signed-off-by: Will Deacon commit de68e4daea9084df4c614d31e2061d5d31bf24f4 Author: Pavel Tatashin Date: Wed Dec 4 10:59:15 2019 -0500 kexec: add machine_kexec_post_load() It is the same as machine_kexec_prepare(), but is called after segments are loaded. This way, can do processing work with already loaded relocation segments. One such example is arm64: it has to have segments loaded in order to create a page table, but it cannot do it during kexec time, because at that time allocations won't be possible anymore. Signed-off-by: Pavel Tatashin Acked-by: Dave Young Signed-off-by: Will Deacon commit d42cc530b18db2dd9de621238d33670841aabc36 Author: Pavel Tatashin Date: Wed Dec 4 10:59:14 2019 -0500 kexec: quiet down kexec reboot Here is a regular kexec command sequence and output: ===== $ kexec --reuse-cmdline -i --load Image $ kexec -e [ 161.342002] kexec_core: Starting new kernel Welcome to Buildroot buildroot login: ===== Even when "quiet" kernel parameter is specified, "kexec_core: Starting new kernel" is printed. This message has KERN_EMERG level, but there is no emergency, it is a normal kexec operation, so quiet it down to appropriate KERN_NOTICE. Machines that have slow console baud rate benefit from less output. Signed-off-by: Pavel Tatashin Reviewed-by: Simon Horman Acked-by: Dave Young Signed-off-by: Will Deacon commit 542dfab53ed04a06851e54d616ff433609db279f Author: José Roberto de Souza Date: Tue Jan 7 09:09:22 2020 -0800 drm/i915/display: Fix warning about MST and DDI restrictions Capturing the restrictions of the BSpec pages bellow: SKL and CNL do not support MST in DDI E, DDI E only support 2 lanes and it is mostly used to support a 4 lanes eDP panel together with DDI A. ICL's DDI E support MST just like other ports but DDI A is still eDP and MIPI only. TGL supports MST in any DDI, including DDI A but TGL has it's own ddi_pre_enable_dp function already without any warning. [ 215.579791] ------------[ cut here ]------------ [ 215.579794] WARN_ON(is_mst && (port == PORT_A || port == PORT_E)) [ 215.579875] WARNING: CPU: 0 PID: 268 at drivers/gpu/drm/i915/display/intel_ddi.c:3576 intel_ddi_pre_enable+0x124/0xea0 [i915] [ 215.579878] Modules linked in: snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic i915 btusb btrtl btbcm btintel bluetooth prime_numbers snd_hda_intel snd_intel_dspcfg snd_hda_codec e1000e snd_hwdep snd_hda_core asix mei_hdcp cdc_ether x86_pkg_temp_thermal mei_me snd_pcm r8152 coretemp usbnet mei crct10dif_pclmul mii ptp ecdh_generic crc32_pclmul i2c_i801 ecc pps_core ghash_clmulni_intel thunderbolt [ 215.579905] CPU: 0 PID: 268 Comm: kworker/0:2 Tainted: G W 5.4.0-rc8-zeh+ #1307 [ 215.579907] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3201.A00.1905140358 05/14/2019 [ 215.579912] Workqueue: events_long drm_dp_mst_link_probe_work [ 215.579975] RIP: 0010:intel_ddi_pre_enable+0x124/0xea0 [i915] [ 215.579978] Code: ff 8b 7c 24 10 89 44 24 30 85 ff 74 1f f7 44 24 18 fb ff ff ff 75 15 48 c7 c6 98 fa 48 a0 48 c7 c7 d3 df 4a a0 e8 cf d5 d0 e0 <0f> 0b 0f b6 4c 24 2c 41 8b b5 04 06 00 00 4c 89 e7 41 0f b6 95 0c [ 215.579980] RSP: 0018:ffffc90001a5f990 EFLAGS: 00010286 [ 215.579984] RAX: 0000000000000000 RBX: ffff88848356a000 RCX: 0000000000000000 [ 215.579986] RDX: 0000000000001df1 RSI: ffff88849340c998 RDI: ffffffff821489c5 [ 215.579989] RBP: ffff88848356a000 R08: 00000000c021a419 R09: 0000000000000000 [ 215.579991] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88848356a118 [ 215.579994] R13: ffff88847f39c000 R14: ffff88847fe70000 R15: ffff88848356a000 [ 215.579996] FS: 0000000000000000(0000) GS:ffff88849f800000(0000) knlGS:0000000000000000 [ 215.579999] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 215.580001] CR2: 000055d3d5a26bc0 CR3: 0000000480ba6005 CR4: 0000000000760ef0 [ 215.580004] PKRU: 55555554 [ 215.580006] Call Trace: [ 215.580014] ? drm_dp_mst_topology_put_port+0x6f/0x130 [ 215.580072] intel_mst_pre_enable_dp+0x14b/0x170 [i915] [ 215.580129] intel_encoders_pre_enable+0x76/0x90 [i915] [ 215.580191] haswell_crtc_enable+0x84/0x880 [i915] [ 215.580266] intel_update_crtc+0x1e4/0x200 [i915] [ 215.580333] skl_commit_modeset_enables+0x287/0x420 [i915] [ 215.580405] intel_atomic_commit_tail+0x332/0x14e0 [i915] [ 215.580410] ? queue_work_on+0x41/0x70 [ 215.580489] intel_atomic_commit+0x31e/0x350 [i915] [ 215.580500] drm_client_modeset_commit_atomic+0x18b/0x220 [ 215.580523] drm_client_modeset_commit_force+0x4d/0x180 [ 215.580531] drm_fb_helper_restore_fbdev_mode_unlocked+0x46/0xa0 [ 215.580538] drm_fb_helper_set_par+0x27/0x50 [ 215.580543] drm_fb_helper_hotplug_event.part.0+0xa7/0xc0 [ 215.580549] drm_kms_helper_hotplug_event+0x21/0x30 [ 215.580553] process_one_work+0x25b/0x5b0 [ 215.580566] worker_thread+0x4b/0x3b0 [ 215.580578] kthread+0x100/0x140 [ 215.580581] ? process_one_work+0x5b0/0x5b0 [ 215.580585] ? kthread_park+0x80/0x80 [ 215.580591] ret_from_fork+0x24/0x50 [ 215.580603] irq event stamp: 1393930 [ 215.580606] hardirqs last enabled at (1393929): [] vprintk_emit+0x143/0x330 [ 215.580609] hardirqs last disabled at (1393930): [] trace_hardirqs_off_thunk+0x1a/0x20 [ 215.580613] softirqs last enabled at (1393434): [] __do_softirq+0x389/0x47f [ 215.580618] softirqs last disabled at (1393423): [] irq_exit+0xa9/0xc0 [ 215.580621] ---[ end trace afd44ea9caa6373e ]--- BSpec: 4217 BSpec: 14004 BSpec: 20584 BSpec: 50583 Cc: Matt Roper Cc: Ville Syrjälä Cc: Lucas De Marchi Signed-off-by: José Roberto de Souza Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200107170922.153612-2-jose.souza@intel.com commit 10cd283da6c6cb6740e904a5cb12c70fbc47ce8b Author: José Roberto de Souza Date: Tue Jan 7 09:09:21 2020 -0800 drm/i915/display/icl+: Do not program clockgating Talked with HW team and this is a left over, driver should not program clockgating, mg or dekel firmware is reponsible for any clockgating programing. Also removing the register and bits definition related to clockgating. v2: Added WARN_ON v3: Only calling icl_phy_set_clock_gating() on intel_ddi_pre_enable_hdmi for GEN11 v4: ICL should also not program clockgating (thanks Matt for catching this) BSpec issue: 20885 BSpec: 49292 BSpec: 21735 Cc: Lucas De Marchi Cc: Matt Roper Cc: Jani Nikula Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200107170922.153612-1-jose.souza@intel.com commit 60c6a14b489baa0b591d19093ab886bec7f7fe36 Author: José Roberto de Souza Date: Mon Jan 6 07:21:28 2020 -0800 drm/i915/display: Force the state compute phase once to enable PSR Recent improvements in the state tracking in i915 caused PSR to not be enabled when reusing firmware/BIOS modeset, this is due to all initial commits returning ealier in intel_atomic_check() as needs_modeset() is always false. To fix that here forcing the state compute phase in CRTC that is driving the eDP that supports PSR once. Enable or disable PSR do not require a fullmodeset, so user will still experience glitch free boot process plus the power savings that PSR brings. It was tried to set mode_changed in intel_initial_commit() but at this point the connectors are not registered causing a crash when computing encoder state. v2: - removed function return - change arguments to match intel_hdcp_atomic_check v3: - replaced drm includes in intel_psr.h by forward declaration(Jani) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112253 Reported-by: Cc: Gwan-gyeong Mun Cc: Jani Nikula Signed-off-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20200106152128.195171-1-jose.souza@intel.com commit f6d061d617124abbd55396a3bc37b9bf7d33233c Author: YueHaibing Date: Sat Dec 28 19:54:55 2019 +0800 kernel/module: Fix memleak in module_add_modinfo_attrs() In module_add_modinfo_attrs() if sysfs_create_file() fails on the first iteration of the loop (so i = 0), we forget to free the modinfo_attrs. Fixes: bc6f2a757d52 ("kernel/module: Fix mem leak in module_add_modinfo_attrs") Reviewed-by: Miroslav Benes Signed-off-by: YueHaibing Signed-off-by: Jessica Yu commit 17da9b8e5ab89ad815671a95db1b53d835093060 Author: Arnd Bergmann Date: Tue Jan 7 22:43:46 2020 +0100 usb: host: oxu210hp-hcd: fix gcc warning gcc -O3 warns about correct code: inlined from 'oxu_hub_control.constprop' at drivers/usb/host/oxu210hp-hcd.c:3652:3: include/linux/string.h:411:9: error: argument 1 null where non-null expected [-Werror=nonnull] return __builtin_memset(p, c, size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/usb/host/oxu210hp-hcd.c: In function 'oxu_hub_control.constprop': include/linux/string.h:411:9: note: in a call to built-in function '__builtin_memset' Expand the code slightly to let gcc better understand it and not warn any more. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200107214354.1008937-1-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit c5bae95b4e60a07dd4f06452ccae5805ed16b40d Author: Saravanan Sekar Date: Wed Jan 8 14:12:34 2020 +0100 MAINTAINERS: Add entry for mpq7920 PMIC driver Add MAINTAINERS entry for Monolithic Power Systems mpq7920 PMIC driver. Signed-off-by: Saravanan Sekar Link: https://lore.kernel.org/r/20200108131234.24128-5-sravanhome@gmail.com Signed-off-by: Mark Brown commit f5fa59a61ecac5efcb77b294a10134aab358bb5c Author: Saravanan Sekar Date: Wed Jan 8 14:12:32 2020 +0100 regulator: bindings: add document bindings for mpq7920 Add device tree binding information for mpq7920 regulator driver. Example bindings for mpq7920 are added. Signed-off-by: Saravanan Sekar Link: https://lore.kernel.org/r/20200108131234.24128-3-sravanhome@gmail.com Signed-off-by: Mark Brown commit c66f1cbad53a61f00f8b6273e737d5e560b69ec7 Author: Markus Reichl Date: Mon Jan 6 22:16:25 2020 +0100 regulator: mp8859: add config option and build entry Add entries for the mp8859 regulator driver to the build system. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/20200106211633.2882-3-m.reichl@fivetechno.de Signed-off-by: Mark Brown commit 44665f7d082977e8bb1803ec0e596f141cba7196 Author: Markus Reichl Date: Mon Jan 6 22:16:27 2020 +0100 regulator: bindings: add MPS mp8859 voltage regulator The MP8859 from Monolithic Power Systems is a single output dc/dc converter with voltage control over i2c. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/20200106211633.2882-5-m.reichl@fivetechno.de Signed-off-by: Mark Brown commit 9399e5dc6b679994872a6039849547c416bb6b05 Author: Saravanan Sekar Date: Wed Jan 8 14:12:31 2020 +0100 dt-bindings: Add an entry for Monolithic Power System, MPS Add an entry for Monolithic Power System, MPS Signed-off-by: Saravanan Sekar Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200108131234.24128-2-sravanhome@gmail.com Signed-off-by: Mark Brown commit 9521e47e9ab8401eb42e8ef5c2c9a46ac7dd8876 Author: Heikki Krogerus Date: Wed Jan 8 16:13:47 2020 +0300 usb: typec: ucsi: Actually enable all the interface notifications The notification mask was not updated properly before all the notifications were enabled in ucsi_init(). Fixes: 71a1fa0df2a3 ("usb: typec: ucsi: Store the notification mask") Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200108131347.43217-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2d686c738a2e6a90a87aefc392224a26befd1e55 Author: Randy Dunlap Date: Tue Jan 7 22:24:50 2020 -0800 usb: typec: fix non-kernel-doc comments Use "/*" for non-kernel-doc comments instead of "/**", which is intended to be used only for kernel-doc notation. Signed-off-by: Randy Dunlap Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/88821011-2128-a8dd-68b8-c5ae8f43271f@infradead.org Signed-off-by: Greg Kroah-Hartman commit 7dad8e6f04990478a6a860b19367e479b2377205 Author: Mika Westerberg Date: Wed Jan 8 15:53:17 2020 +0300 MAINTAINERS: Use linux-usb mailing list for Thunderbolt and USB4 patches Now that Thunderbolt public specification is called USB4 and is coming from USB IF it makes sense to use linux-usb as mailing list for patches touching this driver. Suggested-by: Dan Carpenter Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20200108125317.36444-3-mika.westerberg@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c7a7ac84afeaf310a0ee477fc114e1e291a37c43 Author: Mika Westerberg Date: Wed Jan 8 15:53:16 2020 +0300 thunderbolt: Fix xhci check in usb4_switch_setup() The code tried to check whether xhci variable has ROUTER_CS_6_HCI bit set but since xhci type is bool and it already holds true or false based on that very bit, fix the check to use the variable directly. Reported-by: Dan Carpenter Fixes: b04079837b20 ("thunderbolt: Add initial support for USB4") Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20200108125317.36444-2-mika.westerberg@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1a0986c1bc14a6a05da9d9cdeb61833560bacb1e Author: Takashi Iwai Date: Wed Jan 8 16:34:30 2020 +0100 ALSA: hda: Fix a typo in comments Link: https://lore.kernel.org/r/20200108153430.31456-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6c6b3f1f260b24dc0ab9cbbf369e4fa36819ab8b Author: Quanyang Wang Date: Tue Oct 22 11:23:28 2019 +0800 ARM: zynq: use physical cpuid in zynq_slcr_cpu_stop/start When kernel booting, it will create a cpuid map between the logical cpus and physical cpus. In a normal boot, the cpuid map is as below: Physical Logical 0 ==> 0 1 ==> 1 But in kdump, there is a condition that the crash happens at the physical cpu1, and the crash kernel will run at the physical cpu1 too, so the cpuid map in crash kernel is as below: Physical Logical 1 ==> 0 0 ==> 1 The functions zynq_slcr_cpu_stop/start is to stop/start the physical cpus, the parameter cpu should be the physical cpuid. So use cpu_logical_map to translate the logical cpuid to physical cpuid. Or else the logical cpu0(physical cpu1) will stop itself and the processor will hang. Signed-off-by: Quanyang Wang Tested-by: Michal Simek Signed-off-by: Michal Simek commit 55c203a308ac74256bc240f7ce14ff45dc221a15 Author: YueHaibing Date: Wed Jan 8 20:58:03 2020 +0800 ALSA: pci: echoaudio: remove set but not used variable 'chip' sound/pci/echoaudio/echoaudio.c: In function snd_echo_mixer_info: sound/pci/echoaudio/echoaudio.c:1233:20: warning: variable chip set but not used [-Wunused-but-set-variable] sound/pci/echoaudio/echoaudio.c: In function 'snd_echo_vmixer_info': sound/pci/echoaudio/echoaudio.c:1300:20: warning: variable 'chip' set but not used [-Wunused-but-set-variable] commit e67c3f0fd44c ("ALSA: pci: echoaudio: remove usage of dimen menber of elem_value structure") left behind this unused variable. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200108125803.45584-1-yuehaibing@huawei.com Signed-off-by: Takashi Iwai commit e6111647934562849ba052052ffbc673b935a9fe Author: Hans Verkuil Date: Mon Jan 6 12:04:17 2020 +0100 media: cec: remove unused functions Remove several functions that are no longer used now that the conversion of cec drivers to cec_notifier_conn_(un)register() and cec_notifier_cec_adap_(un)register() is complete. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bb6d42061a05d71dd73f620582d9e09c8fbf7f5b Author: Jia-Ju Bai Date: Thu Dec 19 11:34:01 2019 +0100 media: sti: bdisp: fix a possible sleep-in-atomic-context bug in bdisp_device_run() The driver may sleep while holding a spinlock. The function call path (from bottom to top) in Linux 4.19 is: drivers/media/platform/sti/bdisp/bdisp-hw.c, 385: msleep in bdisp_hw_reset drivers/media/platform/sti/bdisp/bdisp-v4l2.c, 341: bdisp_hw_reset in bdisp_device_run drivers/media/platform/sti/bdisp/bdisp-v4l2.c, 317: _raw_spin_lock_irqsave in bdisp_device_run To fix this bug, msleep() is replaced with udelay(). This bug is found by a static analysis tool STCheck written by myself. Signed-off-by: Jia-Ju Bai Reviewed-by: Fabien Dessenne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 11c48e41d5fcc5b4cf17aa74388be128ca5444f8 Author: Ma Feng Date: Thu Dec 19 08:39:20 2019 +0100 media: pvrusb2: Remove unneeded semicolon and add newline Fixes coccicheck warning: drivers/media/usb/pvrusb2/pvrusb2-encoder.c:288:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: Ma Feng Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f51e50db4c20d46930b33be3f208851265694f3e Author: Helen Koike Date: Tue Dec 17 21:00:22 2019 +0100 media: v4l2-rect.h: fix v4l2_rect_map_inside() top/left adjustments boundary->width and boundary->height are sizes relative to boundary->left and boundary->top coordinates, but they were not being taken into consideration to adjust r->left and r->top, leading to the following error: Consider the follow as initial values for boundary and r: struct v4l2_rect boundary = { .left = 100, .top = 100, .width = 800, .height = 600, } struct v4l2_rect r = { .left = 0, .top = 0, .width = 1920, .height = 960, } calling v4l2_rect_map_inside(&r, &boundary) was modifying r to: r = { .left = 0, .top = 0, .width = 800, .height = 600, } Which is wrongly outside the boundary rectangle, because: v4l2_rect_set_max_size(r, boundary); // r->width = 800, r->height = 600 ... if (r->left + r->width > boundary->width) // true r->left = boundary->width - r->width; // r->left = 800 - 800 if (r->top + r->height > boundary->height) // true r->top = boundary->height - r->height; // r->height = 600 - 600 Fix this by considering top/left coordinates from boundary. Fixes: ac49de8c49d7 ("[media] v4l2-rect.h: new header with struct v4l2_rect helper functions") Signed-off-by: Helen Koike Cc: # for v4.7 and up Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0f9be03452e8dd09188b751c2c6217d051745a2f Author: Wolfram Sang Date: Mon Dec 16 13:29:45 2019 +0100 media: pci: ivtv: convert to i2c_new_scanned_device Move from the deprecated i2c_new_probed_device() to the new i2c_new_scanned_device(). Make use of the new ERRPTR if suitable. Change the legacy function to simply return void because the retval was never used anywhere. Signed-off-by: Wolfram Sang Acked-by: Sean Young Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d2d39fe2a25311ce2e49277db687b9e6d3b9e94a Author: Wolfram Sang Date: Mon Dec 16 13:29:44 2019 +0100 media: pci: cx18: convert to i2c_new_scanned_device Move from the deprecated i2c_new_probed_device() to the new i2c_new_scanned_device(). Make use of the new ERRPTR if suitable. Signed-off-by: Wolfram Sang Acked-by: Sean Young Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 832d76ec68f8bf5985ce77ea9705df719eb5d1e0 Author: Wolfram Sang Date: Mon Dec 16 13:29:43 2019 +0100 media: pci: bt8xx: convert to i2c_new_scanned_device Move from the deprecated i2c_new_probed_device() to the new i2c_new_scanned_device(). Make use of the new ERRPTR if suitable. Signed-off-by: Wolfram Sang Acked-by: Sean Young Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 021472666cb66d6c0adf0c3c5f95b6e37abf69c7 Author: Wolfram Sang Date: Mon Dec 16 13:29:42 2019 +0100 media: pci: cx88: convert to i2c_new_scanned_device Here, this only means to update a comment in the driver. Signed-off-by: Wolfram Sang Acked-by: Sean Young Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1d5479d8ceb7408713aed5e6812718b45617a798 Author: Wolfram Sang Date: Mon Dec 16 13:29:41 2019 +0100 media: pci: cx23885: convert to i2c_new_scanned_device Move from the deprecated i2c_new_probed_device() to the new i2c_new_scanned_device(). Make use of the new ERRPTR if suitable. Signed-off-by: Wolfram Sang Acked-by: Sean Young Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1ec4c6efe23154b4ab44c1a34dbc0eb121eb614a Author: Aditya Pakki Date: Sun Dec 15 20:21:33 2019 +0100 media: saa7146: Avoid using BUG_ON as an assertion In video_begin and video_end, saa7146_format_by_fourcc can return NULL and is checked via BUG_ON. However, by returning the error to the callers upstream, we can avoid the crash and handle it via recovery code. Signed-off-by: Aditya Pakki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 93a24578de721006055b422c7772e0e417e1983c Author: Aditya Pakki Date: Sun Dec 15 20:08:04 2019 +0100 media: cx231xx: replace BUG_ON with recovery code In cx231xx_i2c_register, if dev->cx231xx_send_usb_command is NULL, the code crashes. However, the callers in cx231xx-core are able to handle the error without crashing. This patch fixes this issue. Signed-off-by: Aditya Pakki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3a909680950b4b43df3bb5cd33fc4a3009d75369 Author: Dmitry Osipenko Date: Sun Dec 15 19:07:52 2019 +0100 media: staging: tegra-vde: Use __maybe_unused attribute instead of ifdef Replace #ifdef with __maybe_unused attribute just to keep code cleaner a tad. Signed-off-by: Dmitry Osipenko Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b395d457e42ba9a05f755f4131dca0b40f1e4493 Author: Dmitry Osipenko Date: Sun Dec 15 19:07:51 2019 +0100 media: staging: tegra-vde: Sort headers alphabetically Keep the alphabetical order for consistency. Signed-off-by: Dmitry Osipenko Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f14838d7e180d84870763747ea5efdd69475f802 Author: Dmitry Osipenko Date: Sun Dec 15 19:07:50 2019 +0100 media: staging: tegra-vde: Select IOVA unconditionally in Kconfig There were several reports of building failures due to IOVA being selected inconsistently by different drivers. All drivers that are using IOVA API should select it unconditionally in order to avoid the compilation problems, tegra-vde is one of those drivers. Link: https://patchwork.kernel.org/patch/11057831/ Signed-off-by: Dmitry Osipenko Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ef9534c585e0ff8f88fd17d198cfb483d9f86b33 Author: Daniel Gomez Date: Fri Dec 6 10:18:21 2019 +0100 media: v4l2: Fix fourcc names for 12b and 14b packed bayer Fix documentation fourcc names for the 12-bit and 14-bit packed Bayer formats. Signed-off-by: Daniel Gomez Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bed7bdb6ae3c5d44f62a984471b1d161d06d7810 Author: Hans Verkuil Date: Mon Jan 6 09:38:17 2020 +0100 media: Revert "media: v4l2: Fix fourcc names for BAYER12P" This reverts commit 2b016c47f48f3d144816645822a09995063313a1. Wrong patch was merged, revert this first before applying the right patch. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f24e564129f3b7508eff363353099657ff774d2b Author: Krzysztof Kozlowski Date: Mon Dec 30 18:21:12 2019 +0100 pwm: Fix minor Kconfig whitespace issues Remove double whitespace after "config" keyword. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Thierry Reding commit 50b81d77be31a95ba036e6403b921dc918328956 Author: Arnd Bergmann Date: Tue Jan 7 22:46:37 2020 +0100 drm: meson: fix address type confusion Casting a pointer to dma_addr_t produces a warning: drivers/gpu/drm/meson/meson_rdma.c: In function 'meson_rdma_free': drivers/gpu/drm/meson/meson_rdma.c:59:25: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] priv->rdma.addr_phys = (dma_addr_t)NULL; In this case, it's worse because the variable name has the suffix '_phys', which often indicates a phys_addr_t rather than dma_addr_t, i.e. yet another incompatible type. Change it to use consistent naming and avoid NULL. Fixes: 63fba242c464 ("drm/meson: add RDMA module driver") Signed-off-by: Arnd Bergmann Acked-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200107214653.1173199-1-arnd@arndb.de commit 651b510a74d4e473281efc4eaf2a83963988de48 Author: Uwe Kleine-König Date: Sat Aug 24 02:10:41 2019 +0200 pwm: atmel: Implement .get_state() This function reads back the configured parameters from the hardware. As .apply() rounds down (mostly) I'm rounding up in .get_state() to achieve that applying a state just read from hardware is a no-op. Signed-off-by: Uwe Kleine-König Acked-by: Claudiu Beznea Signed-off-by: Thierry Reding commit 02afb811e0cf96958ac69c4b3372088180c829a7 Author: Uwe Kleine-König Date: Sat Aug 24 02:10:40 2019 +0200 pwm: atmel: Use register accessors for channels This makes it a bit easier when instrumenting register access to only have to add code in one place. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 998d189a817b8aae5b9e416c40dcb35b1fd79d3c Author: Uwe Kleine-König Date: Sat Aug 24 02:10:39 2019 +0200 pwm: atmel: Document known weaknesses of both hardware and software This documents the my findings while reading through the driver and the reference manual. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 2101c878f767fc6341ce0057e3b53d6129e76d99 Author: Uwe Kleine-König Date: Sat Aug 24 02:10:38 2019 +0200 pwm: atmel: Replace loop in prescale calculation by ad-hoc calculation The calculated values are the same with the modified algorithm. The only difference is that the calculation is a bit more efficient. Acked-by: Claudiu Beznea Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit ff55e7a314143e717f4d96271b541c29111502df Author: Uwe Kleine-König Date: Sat Aug 24 02:10:37 2019 +0200 pwm: atmel: Use a constant for maximum prescale value The maximal prescale value is 10 for all supported variants. So drop the member in the variant description and introduce a global constant instead. This reduces the size of the variant descriptions and the .apply() callback can be compiled a bit more effectively. Acked-by: Claudiu Beznea Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 3c269ba6d8af044ecdb69c610b24697a43ef71c3 Author: Uwe Kleine-König Date: Sat Aug 24 02:10:36 2019 +0200 pwm: atmel: Add a hint where to find hardware documentation Most Microchip (formerly Atmel) chips have publicly available manuals. A comprehensive list is already contained in the documentation folder. Reference this list in the header of the driver to allow reviewers to find the relevant manuals. Signed-off-by: Uwe Kleine-König Acked-by: Nicolas Ferre Signed-off-by: Thierry Reding commit 3c64ed74d619c25c65abb1fcafcb1aff835867d5 Author: Rasmus Villemoes Date: Fri Oct 4 15:32:06 2019 +0200 pwm: mxs: Avoid a division in mxs_pwm_apply() Since the divisor is not a compile-time constant (unless gcc somehow decided to unroll the loop PERIOD_CDIV_MAX times), this does a somewhat expensive 32/32 division. Replace that with a right shift. We still have a 64/32 division just below, but at least in that case the divisor is compile-time constant. Signed-off-by: Rasmus Villemoes Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 366486e0afaa115ec456db124fc07d824a1c1fb1 Author: Rasmus Villemoes Date: Fri Oct 4 15:32:05 2019 +0200 dt-bindings: pwm: mxs-pwm: Increase #pwm-cells We need to increase the pwm-cells for the optional flags parameter, in order to implement support for polarity setting via DT. Acked-by: Rob Herring Signed-off-by: Rasmus Villemoes Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 2cf0f6fece5b97e67c8d5e84fda3790fe213454a Author: Rasmus Villemoes Date: Fri Oct 4 15:32:04 2019 +0200 pwm: mxs: Add support for inverse polarity If I'm reading of_pwm_xlate_with_flags() right, existing device trees that set #pwm-cells = 2 will continue to work. Signed-off-by: Rasmus Villemoes Signed-off-by: Thierry Reding commit ebbfb1592c8dedb22278211b89ea9b705faad58e Author: Rasmus Villemoes Date: Fri Oct 4 15:32:03 2019 +0200 pwm: mxs: Remove legacy methods Since we now have ->apply(), these are no longer relevant. Signed-off-by: Rasmus Villemoes Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit bf29c2ff82fd37f4a5e0c6983016c15430ac6e35 Author: Rasmus Villemoes Date: Fri Oct 4 15:32:02 2019 +0200 pwm: mxs: Implement ->apply() In preparation for supporting setting the polarity, switch the driver to support the ->apply() method. Signed-off-by: Rasmus Villemoes Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 1dc8b65c944e5cfce3d830a5b97b42be185a1984 Author: Arnd Bergmann Date: Wed Jan 8 11:00:00 2020 +0100 media: v4l2-core: only zero-out ioctl-read buffers The memset() got moved out of the check for _IOC_NONE, so passing a made-up command number with a size but no direction would allow clearing data on user-provided pointers. Move video_get_user() back into the _IOC_NONE check where it belongs. Reported-by: syzbot+54fd8cca4b7226c94b8e@syzkaller.appspotmail.com Fixes: 6c625c01c7a6 ("media: v4l2-core: split out data copy from video_usercopy") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f4659254a327f5e61c24e21b91c5aea0291bc65b Author: Mark Brown Date: Mon Jan 6 19:58:18 2020 +0000 arm64: mm: Use modern annotations for assembly functions In an effort to clarify and simplify the annotation of assembly functions in the kernel new macros have been introduced. These replace ENTRY and ENDPROC and also add a new annotation for static functions which previously had no ENTRY equivalent. Update the annotations in the mm code to the new macros. Even the functions called from non-standard environments like idmap have no special requirements on their environments so can be treated like regular functions. Signed-off-by: Mark Brown Signed-off-by: Will Deacon commit 3ac0f4526dfb80625f5c2365bccd85be68db93ef Author: Mark Brown Date: Mon Jan 6 19:58:17 2020 +0000 arm64: lib: Use modern annotations for assembly functions In an effort to clarify and simplify the annotation of assembly functions in the kernel new macros have been introduced. These replace ENTRY and ENDPROC and also add a new annotation for static functions which previously had no ENTRY equivalent. Update the annotations in the library code to the new macros. Signed-off-by: Mark Brown [will: Use SYM_FUNC_START_WEAK_PI] Signed-off-by: Will Deacon commit 35e61c77ef386555f3df1bc2057098c6997ca10b Author: Mark Brown Date: Mon Jan 6 19:58:16 2020 +0000 arm64: asm: Add new-style position independent function annotations As part of an effort to make the annotations in assembly code clearer and more consistent new macros have been introduced, including replacements for ENTRY() and ENDPROC(). On arm64 we have ENDPIPROC(), a custom version of ENDPROC() which is used for code that will need to run in position independent environments like EFI, it creates an alias for the function with the prefix __pi_ and then emits the standard ENDPROC. Add new-style macros to replace this which expand to the standard SYM_FUNC_*() and SYM_FUNC_ALIAS_*(), resulting in the same object code. These are added in linkage.h for consistency with where the generic assembler code has its macros. Signed-off-by: Mark Brown [will: Rename 'WEAK' macro, use ';' instead of ASM_NL, deprecate ENDPIPROC] Signed-off-by: Will Deacon commit d412f18c9bc791d8951e903de9a68817e3098a6a Author: Bibby Hsieh Date: Thu Nov 21 09:54:09 2019 +0800 soc: mediatek: cmdq: add cmdq_dev_get_client_reg function GCE cannot know the register base address, this function can help cmdq client to get the cmdq_client_reg structure. Signed-off-by: Bibby Hsieh Reviewed-by: CK Hu Reviewed-by: Houlong Wei Signed-off-by: Matthias Brugger commit b2ff2356bf93d66e7155acea63dcd503aca6c28f Author: Bibby Hsieh Date: Thu Nov 21 09:54:08 2019 +0800 soc: mediatek: cmdq: add polling function add polling function in cmdq helper functions Signed-off-by: Bibby Hsieh Reviewed-by: CK Hu Signed-off-by: Matthias Brugger commit 5c8b718c5a32bfa3e7a263c19b81bae9130229f1 Author: Bibby Hsieh Date: Thu Nov 21 09:54:07 2019 +0800 soc: mediatek: cmdq: define the instruction struct Define an instruction structure for gce driver to append command. This structure can make the client's code more readability. Signed-off-by: Bibby Hsieh Reviewed-by: CK Hu Signed-off-by: Matthias Brugger commit 01d1b408ecb0fe277358ba006e569d87ef2a3a45 Author: Bibby Hsieh Date: Thu Nov 21 09:54:06 2019 +0800 soc: mediatek: cmdq: remove OR opertaion from err return Debugging gets harder if we OR two error return values. Return each error on it's own instead Signed-off-by: Bibby Hsieh Reviewed-by: CK Hu [mb: rephrase commit message] Signed-off-by: Matthias Brugger commit 9c65b8463f41f3a9edef97e3109752159d4c6a4b Author: Stephen Warren Date: Thu Oct 3 14:50:33 2019 -0600 ARM: tegra: Use clk_m CPU on Tegra124 LP1 resume Configure the clock controller to set an alternate clock for the CPU when it receives an IRQ during LP1 (system suspend). Specifically, use clk_m (the crystal) rather than clk_s (a 32KHz clock). Such an IRQ will be the LP1 wake event. This reduces the amount of time taken to resume from LP1. NVIDIA's downstream kernel executes this code on both Tegra30 and Tegra124, so it appears OK to make this change unconditionally. Signed-off-by: Stephen Warren Signed-off-by: Thierry Reding commit cf94a7a06a7d7d4402d7313cf622ca2823bad43c Author: Stephen Warren Date: Thu Oct 3 14:50:32 2019 -0600 ARM: tegra: Modify reshift divider during LP1 The reshift hardware module implements the RAM re-repair process. This module uses PLLP as an input clock during LP1 resume. The input divider for this clock is typically set for PLLP's normal rate. During LP1 resume, PLLP is bypassed and so runs at the crystal rate, which is much slower. Consequently, decrease the divider so that the reshift module runs at a reasonable rate during LP1 resume. NVIDIA's downstream kernel code only does this if not compiled for Tegra30, so the added code is made conditional upon the chip ID. Signed-off-by: Stephen Warren Signed-off-by: Thierry Reding commit 1a3388d506bf5b45bb283e6a4c4706cfb4897333 Author: Stephen Warren Date: Thu Oct 3 14:50:31 2019 -0600 ARM: tegra: Enable PLLP bypass during Tegra124 LP1 For a little over a year, U-Boot has configured the flow controller to perform automatic RAM re-repair on off->on power transitions of the CPU rail[1]. This is mandatory for correct operation of Tegra124. However, RAM re-repair relies on certain clocks, which the kernel must enable and leave running. PLLP is one of those clocks. This clock is shut down during LP1 in order to save power. Enable bypass (which I believe routes osc_div_clk, essentially the crystal clock, to the PLL output) so that this clock signal toggles even though the PLL is not active. This is required so that LP1 power mode (system suspend) operates correctly. The bypass configuration must then be undone when resuming from LP1, so that all peripheral clocks run at the expected rate. Without this, many peripherals won't work correctly; for example, the UART baud rate would be incorrect. NVIDIA's downstream kernel code only does this if not compiled for Tegra30, so the added code is made conditional upon the chip ID. NVIDIA's downstream code makes this change conditional upon the active CPU cluster. The upstream kernel currently doesn't support cluster switching, so this patch doesn't test the active CPU cluster ID. [1] 3cc7942a4ae5 ARM: tegra: implement RAM repair Reported-by: Jonathan Hunter Cc: stable@vger.kernel.org Signed-off-by: Stephen Warren Signed-off-by: Thierry Reding commit bf83b96f87ae2abb1e535306ea53608e8de5dfbb Author: Stephen Warren Date: Thu Oct 3 14:50:30 2019 -0600 clk: tegra: Mark fuse clock as critical For a little over a year, U-Boot on Tegra124 has configured the flow controller to perform automatic RAM re-repair on off->on power transitions of the CPU rail[1]. This is mandatory for correct operation of Tegra124. However, RAM re-repair relies on certain clocks, which the kernel must enable and leave running. The fuse clock is one of those clocks. Mark this clock as critical so that LP1 power mode (system suspend) operates correctly. [1] 3cc7942a4ae5 ARM: tegra: implement RAM repair Reported-by: Jonathan Hunter Cc: stable@vger.kernel.org Signed-off-by: Stephen Warren Signed-off-by: Thierry Reding commit fdd2c12e3761f0418596cd0e0156719a255d23c8 Author: Jernej Skrabec Date: Sun Nov 24 18:29:08 2019 +0100 pwm: sun4i: Add support for H6 PWM Now that sun4i PWM driver supports deasserting reset line and enabling bus clock, support for H6 PWM can be added. Note that while H6 PWM has two channels, only first one is wired to output pin. Second channel is used as a clock source to companion AC200 chip which is bundled into same package. Signed-off-by: Jernej Skrabec Acked-by: Uwe Kleine-König Signed-off-by: Clément Péron Signed-off-by: Thierry Reding commit 9f28e95b5286fce63a3d0d90dc7ca43eca8dda58 Author: Jernej Skrabec Date: Sun Nov 24 18:29:07 2019 +0100 pwm: sun4i: Add support to output source clock directly PWM core has an option to bypass whole logic and output unchanged source clock as PWM output. This is achieved by enabling bypass bit. Note that when bypass is enabled, no other setting has any meaning, not even enable bit. This mode of operation is needed to achieve high enough frequency to serve as clock source for AC200 chip which is integrated into same package as H6 SoC. Signed-off-by: Jernej Skrabec Signed-off-by: Clément Péron Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit fa4d81784681a26bcf7d2a43c6ac5cf991ef28f5 Author: Clément Péron Date: Sun Nov 24 18:29:06 2019 +0100 pwm: sun4i: Always calculate params when applying new parameters Bypass mode will require to be re-calculated when the pwm state is changed. Remove the condition so pwm_sun4i_calculate is always called. Reviewed-by: Uwe Kleine-König Signed-off-by: Clément Péron Signed-off-by: Thierry Reding commit 5b090b430d750961305030232314b6acdb0102aa Author: Jernej Skrabec Date: Sun Nov 24 18:29:05 2019 +0100 pwm: sun4i: Add an optional probe for bus clock H6 PWM core needs bus clock to be enabled in order to work. Add an optional probe for it. Signed-off-by: Jernej Skrabec Signed-off-by: Clément Péron Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit b8d74644f34a82a6dcd5f45d5bd57e64f1db0d4d Author: Clément Péron Date: Sun Nov 24 18:29:04 2019 +0100 pwm: sun4i: Prefer "mod" clock to unnamed New device tree bindings called the source clock of the module "mod" when several clocks are defined. Try to get a clock called "mod" if nothing is found try to get an unnamed clock. Reviewed-by: Uwe Kleine-König Signed-off-by: Clément Péron Signed-off-by: Thierry Reding commit a7fe985633f927401037d2905df2c9701dff09a1 Author: Jernej Skrabec Date: Sun Nov 24 18:29:03 2019 +0100 pwm: sun4i: Add an optional probe for reset line H6 PWM core needs deasserted reset line in order to work. Add an optional probe for it. Signed-off-by: Jernej Skrabec Reviewed-by: Uwe Kleine-König Signed-off-by: Clément Péron Signed-off-by: Thierry Reding commit 6fa154e46c723b1eaa24ad16fbe92c2a3bf98dbc Author: Shawn Guo Date: Tue Jan 7 20:29:08 2020 +0800 arm64: dts: hi3798cv200: correct PCIe 'bus-range' setting The PCIe 'bus-range' setting is incorrect and causing the following message during boot. pci_bus 0000:01: busn_res: can not insert [bus 01-ff] under [bus 00-0f] (conflicts with (null) [bus 00-0f]) Correct it to get rid of the message. Signed-off-by: Shawn Guo Signed-off-by: Wei Xu commit e4b9b6454d94481483c435b94517249b79e82b63 Author: Shawn Guo Date: Thu Dec 26 13:02:22 2019 +0100 media: rc: ir-hix5hd2: add hi3796cv300-ir support The IR device on Hi3796CV300 SoC is mostly same as hix5hd2, except the following two things. - IR_CLK offset is 0x60 instead of 0x48. - It needs to set an extra bit in IR_ENABLE register to enable IR. The following changes are made to deal with them. - Define a SoC specific data to accommodate IR_CLK offset and the flag telling requirement of extra enable bit. - Create function hix5hd2_ir_enable() to handle IR enabling. The original hix5hd2_ir_enable() is all about managing IR clock, so gets renamed to hix5hd2_ir_clk_enable(). - Device table hix5hd2_ir_table[] gets moved forward, as it's being used by hix5hd2_ir_probe() now. Signed-off-by: Shawn Guo Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 61cd2d5ca0232163170e406447d9517606c83e4c Author: Shawn Guo Date: Thu Dec 26 13:02:21 2019 +0100 media: dt-bindings: media: add "hisilicon,hi3796cv300-ir" compatible It documents "hisilicon,hi3796cv300-ir" compatible for Hi3796CV300 IR device. Signed-off-by: Shawn Guo Acked-by: Rob Herring Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 000e6751825d756d7eb3fb4028a41add595204d9 Author: Johann Friedrichs Date: Thu Nov 21 16:19:05 2019 +0100 media: dvb-core: Fix receiving invalid EIT-sections Resetting buf without resetting pusi_seen at a channel-switch can lead to copying the rest of a section to the start of buf, but treating it as a complete section, when the next pusi arrives. EIT-sections starting without valid header were randomly received during an EIT-scan on a transponder. Signed-off-by: Johann Friedrichs Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit c12495132d41004aa63c3a6d79ca0c7d1b13604d Author: Daniel W. S. Almeida Date: Tue Nov 12 20:54:45 2019 +0100 media: au8522: improve formatting This patch fixes the following scripts/checkpatch.pl errors: ERROR: space required before the open parenthesis '(' + switch(input) { Suggested-by: Shuah Khan Signed-off-by: Daniel W. S. Almeida Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit f19dfd26fb3e4aa96e7e39f335ffcef42c055f8f Author: Daniel W. S. Almeida Date: Tue Nov 26 17:40:51 2019 +0100 media: Documentation: media: dtv-frontend.rst: fix a few minor typos Fix a few minor typos throughout the document without changing the meaning of the sentences. Signed-off-by: Daniel W. S. Almeida Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 98b38bb4b7e3339149e52aa297c36edfd35cd8d9 Author: Daniel W. S. Almeida Date: Tue Nov 12 20:52:48 2019 +0100 media: as102: improve formatting This patch fixes the following scripts/checkpatch.pl error: ERROR: open brace '{' following function definitions go on the next line +static int as102_fe_get_tune_settings(struct dvb_frontend *fe, + struct dvb_frontend_tune_settings *settings) { Suggested-by: Shuah Khan Signed-off-by: Daniel W. S. Almeida Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 02a5830f8d64267fc691eff0ddcd3d52eb6718dc Author: Daniel W. S. Almeida Date: Tue Dec 31 20:11:23 2019 +0100 media: dvb_dummy_fe: change printk to pr_warn Replaces printk with pr_err to fix warnings from checkpatch.pl Signed-off-by: Daniel W. S. Almeida Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 60c2b6060bb7bdba3ad92b32d6ae45e344986ccc Author: Daniel W. S. Almeida Date: Tue Dec 31 20:11:22 2019 +0100 media: dvb_dummy_fe: Add blank line after declaration Fix checkpatch.pl error by adding a blank line Signed-off-by: Daniel W. S. Almeida Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 6a168c6cb6883d13f738b7e1558042ed654268dc Author: Daniel W. S. Almeida Date: Tue Dec 31 20:11:21 2019 +0100 media: dvb_dummy_fe: Fix ERROR: POINTER_LOCATION, AVOID_EXTERN and long lines Change foo* bar to foo *bar to avoid ERROR: POINTER_LOCATION in checkpatch ERROR: "foo* bar" should be "foo *bar" +static int dvb_dummy_fe_read_signal_strength(struct dvb_frontend* fe, u16* strength) ERROR: "foo* bar" should be "foo *bar" +static int dvb_dummy_fe_read_signal_strength(struct dvb_frontend* fe, u16* strength) ERROR: "foo* bar" should be "foo *bar" +static int dvb_dummy_fe_read_snr(struct dvb_frontend* fe, u16* snr) ERROR: "foo* bar" should be "foo *bar" +static int dvb_dummy_fe_read_snr(struct dvb_frontend* fe, u16* snr) ERROR: "foo* bar" should be "foo *bar" +static int dvb_dummy_fe_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) ERROR: "foo* bar" should be "foo *bar" +static int dvb_dummy_fe_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks) ERROR: "foo* bar" should be "foo *bar" +static int dvb_dummy_fe_sleep(struct dvb_frontend* fe) ERROR: "foo* bar" should be "foo *bar" +static int dvb_dummy_fe_init(struct dvb_frontend* fe) ERROR: "foo* bar" should be "foo *bar" +static void dvb_dummy_fe_release(struct dvb_frontend* fe) ERROR: "foo* bar" should be "foo *bar" + struct dvb_dummy_fe_state* state = fe->demodulator_priv; ERROR: "foo* bar" should be "foo *bar" +struct dvb_frontend* dvb_dummy_fe_ofdm_attach(void) ERROR: "foo* bar" should be "foo *bar" + struct dvb_dummy_fe_state* state = NULL; ERROR: "foo* bar" should be "foo *bar" + struct dvb_dummy_fe_state* state = NULL; ERROR: "foo* bar" should be "foo *bar" + struct dvb_dummy_fe_state* state = NULL; remove 'extern' keyword from declaration Fix CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files by removing it. Fix long lines Break long lines into smaller ones to improve readability. WARNING: line over 80 characters + memcpy(&state->frontend.ops, &dvb_dummy_fe_ofdm_ops, sizeof(struct dvb_frontend_ops)); WARNING: line over 80 characters + memcpy(&state->frontend.ops, &dvb_dummy_fe_qpsk_ops, sizeof(struct dvb_frontend_ops)); WARNING: line over 80 characters + memcpy(&state->frontend.ops, &dvb_dummy_fe_qam_ops, sizeof(struct dvb_frontend_ops)); WARNING: line over 80 characters + FE_CAN_FEC_4_5 | FE_CAN_FEC_5_6 | FE_CAN_FEC_6_7 | WARNING: line over 80 characters + FE_CAN_FEC_7_8 | FE_CAN_FEC_8_9 | FE_CAN_FEC_AUTO | WARNING: line over 80 characters + FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO | WARNING: line over 80 characters + .symbol_rate_min = (57840000 / 2) / 6 Suggested-by: Shuah Khan Signed-off-by: Daniel W. S. Almeida Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 9fcfae8a17bf66a609f0aa23cfbd283fbda74ca7 Author: Sean Young Date: Wed Jan 1 10:19:20 2020 +0100 media: dib0090: incorrect format specifier detected by clang drivers/media/dvb-frontends/dib0090.c:1751:67: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat] dprintk("BB Offset Cal, BBreg=%hd,Offset=%hd,Value Set=%hd\n", state->dc->addr, state->adc_diff, state->step); ~~~ ^~~~~~~~~~~~~~~ %hhu drivers/media/dvb-frontends/dib0090.c:30:22: note: expanded from macro 'dprintk' __func__, ##arg); \ ^~~ drivers/media/dvb-frontends/dib0090.c:1751:101: warning: format specifies type 'short' but the argument has type 's8' (aka 'signed char') [-Wformat] dprintk("BB Offset Cal, BBreg=%hd,Offset=%hd,Value Set=%hd\n", state->dc->addr, state->adc_diff, state->step); ~~~ ^~~~~~~~~~~ %hhd drivers/media/dvb-frontends/dib0090.c:30:22: note: expanded from macro 'dprintk' __func__, ##arg); \ ^~~ Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit f54def5b5ff7cc080e74ab4309c704ac745ec86f Author: Sean Young Date: Wed Jan 1 10:06:19 2020 +0100 media: dib0070: incorrect format specifiers detected by clang drivers/media/dvb-frontends/dib0070.c:192:52: warning: format specifies type 'short' but the argument has type 's8' (aka 'signed char') [-Wformat] dprintk("CAPTRIM=%hd; ADC = %hd (ADC) & %dmV\n", state->captrim, adc, (u32) adc*(u32)1800/(u32)1024); ~~~ ^~~~~~~~~~~~~~ %hhd drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk' __func__, ##arg); \ ^~~ drivers/media/dvb-frontends/dib0070.c:203:59: warning: format specifies type 'short' but the argument has type 's8' (aka 'signed char') [-Wformat] dprintk("CAPTRIM=%hd is closer to target (%hd/%hd)\n", state->captrim, adc, state->adc_diff); ~~~ ^~~~~~~~~~~~~~ %hhd drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk' __func__, ##arg); \ ^~~ drivers/media/dvb-frontends/dib0070.c:367:46: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat] dprintk("Tuning for Band: %hd (%d kHz)\n", band, freq); ~~~ ^~~~ %hhu drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk' __func__, ##arg); \ ^~~ drivers/media/dvb-frontends/dib0070.c:445:39: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat] dprintk("REFDIV: %hd, FREF: %d\n", REFDIV, FREF); ~~~ ^~~~~~ %hhu drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk' __func__, ##arg); \ ^~~ drivers/media/dvb-frontends/dib0070.c:447:57: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat] dprintk("Num: %hd, Den: %hd, SD: %hd\n", (u16) Rest, Den, (state->lo4 >> 12) & 0x1); ~~~ ^~~ %hhu drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk' __func__, ##arg); \ ^~~ drivers/media/dvb-frontends/dib0070.c:447:62: warning: format specifies type 'short' but the argument has type 'int' [-Wformat] dprintk("Num: %hd, Den: %hd, SD: %hd\n", (u16) Rest, Den, (state->lo4 >> 12) & 0x1); ~~~ ^~~~~~~~~~~~~~~~~~~~~~~~ %d drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk' __func__, ##arg); \ ^~~ drivers/media/dvb-frontends/dib0070.c:448:33: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat] dprintk("HFDIV code: %hd\n", state->current_tune_table_index->hfdiv); ~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %hhu drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk' __func__, ##arg); \ ^~~ drivers/media/dvb-frontends/dib0070.c:449:27: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat] dprintk("VCO = %hd\n", state->current_tune_table_index->vco_band); ~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %hhu drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk' __func__, ##arg); \ ^~~ drivers/media/dvb-frontends/dib0070.c:450:40: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat] dprintk("VCOF: ((%hd*%d) << 1))\n", state->current_tune_table_index->vco_multi, freq); ~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %hhu drivers/media/dvb-frontends/dib0070.c:30:22: note: expanded from macro 'dprintk' __func__, ##arg); \ ^~~ Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 4ec14f24c7102c7c14bc6aa2dbccd6a0b5504acd Author: Sean Young Date: Wed Jan 1 09:59:58 2020 +0100 media: dib7000p: incorrect format specifier detected by clang drivers/media/dvb-frontends/dib7000p.c:918:37: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat] dprintk("SPLIT %p: %hd\n", demod, agc_split); ~~~ ^~~~~~~~~ %hhu Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit cfff58188e4dbc2a09ade46c72e7535666a03a80 Author: Sean Young Date: Wed Jan 1 09:58:56 2020 +0100 media: dib7000m: incorrect format specifier detected by clang drivers/media/dvb-frontends/dib7000m.c:811:38: warning: format specifies type 'short' but the argument has type 'u8' (aka 'unsigned char') [-Wformat] dprintk("SPLIT %p: %hd\n", demod, agc_split); ~~~ ^~~~~~~~~ %hhu Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit f444a5ff95dce07cf4353cbb85fc3e785019d430 Author: Tony Luck Date: Mon Dec 16 13:42:54 2019 -0800 x86/cpufeatures: Add support for fast short REP; MOVSB >From the Intel Optimization Reference Manual: 3.7.6.1 Fast Short REP MOVSB Beginning with processors based on Ice Lake Client microarchitecture, REP MOVSB performance of short operations is enhanced. The enhancement applies to string lengths between 1 and 128 bytes long. Support for fast-short REP MOVSB is enumerated by the CPUID feature flag: CPUID [EAX=7H, ECX=0H).EDX.FAST_SHORT_REP_MOVSB[bit 4] = 1. There is no change in the REP STOS performance. Add an X86_FEATURE_FSRM flag for this. memmove() avoids REP MOVSB for short (< 32 byte) copies. Check FSRM and use REP MOVSB for short copies on systems that support it. [ bp: Massage and add comment. ] Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20191216214254.26492-1-tony.luck@intel.com commit 8821e92879a397b7ad318cc7e8ba784f588f872a Merge: 51e40a0dbe53 c79f46a28239 Author: Mauro Carvalho Chehab Date: Wed Jan 8 11:13:25 2020 +0100 Merge tag 'v5.5-rc5' into patchwork Linux 5.5-rc5 * tag 'v5.5-rc5': (1006 commits) Linux 5.5-rc5 Documentation: riscv: add patch acceptance guidelines riscv: prefix IRQ_ macro names with an RV_ namespace clocksource: riscv: add notrace to riscv_sched_clock apparmor: fix aa_xattrs_match() may sleep while holding a RCU lock hexagon: define ioremap_uc ocfs2: fix the crash due to call ocfs2_get_dlm_debug once less ocfs2: call journal flush to mark journal as empty after journal recovery when mount mm/hugetlb: defer freeing of huge pages if in non-task context mm/gup: fix memory leak in __gup_benchmark_ioctl mm/oom: fix pgtables units mismatch in Killed process message fs/posix_acl.c: fix kernel-doc warnings hexagon: work around compiler crash hexagon: parenthesize registers in asm predicates fs/namespace.c: make to_mnt_ns() static fs/nsfs.c: include headers for missing declarations fs/direct-io.c: include fs/internal.h for missing prototype mm: move_pages: return valid node id in status if the page is already on the target node memcg: account security cred as well to kmemcg kcov: fix struct layout for kcov_remote_arg ... commit 614644676394951e73194ea96b3f026c1adf5443 Author: Pali Rohár Date: Tue Jan 7 22:29:04 2020 +0100 udf: Update header files to UDF 2.60 This change synchronizes header files ecma_167.h and osta_udf.h with udftools 2.2 project which already has definitions for UDF 2.60 revision. Link: https://lore.kernel.org/r/20200107212904.30471-3-pali.rohar@gmail.com Signed-off-by: Pali Rohár Signed-off-by: Jan Kara commit 871b9b14c673d862b2f24478ed3583a40906ea66 Author: Pali Rohár Date: Tue Jan 7 22:29:03 2020 +0100 udf: Move OSTA Identifier Suffix macros from ecma_167.h to osta_udf.h Rename structure name and its members to match naming convention and fix endianity type for UDFRevision member. Also remove duplicate definition of UDF_ID_COMPLIANT which is already in osta_udf.h. Link: https://lore.kernel.org/r/20200107212904.30471-2-pali.rohar@gmail.com Signed-off-by: Pali Rohár Signed-off-by: Jan Kara commit 800552ceecc749aa4e87c95291be232c80bd1e56 Author: Pali Rohár Date: Tue Jan 7 22:29:02 2020 +0100 udf: Fix spelling in EXT_NEXT_EXTENT_ALLOCDESCS Change EXT_NEXT_EXTENT_ALLOCDECS to proper spelling EXT_NEXT_EXTENT_ALLOCDESCS. Link: https://lore.kernel.org/r/20200107212904.30471-1-pali.rohar@gmail.com Signed-off-by: Pali Rohár Signed-off-by: Jan Kara commit e4018a496b721e0401b8cf2d583bb0d897f9ce5d Author: Baruch Siach Date: Thu Jan 2 10:23:28 2020 +0200 ARM: dts: armada-388-clearfog: add eeprom SolidRun Clearfog Pro rev 2.1 and Clearfog Base rev 1.3 added EEPROM. Add DT node for EEPROM description in the .dtsi shared by Clearfog Pro and Base. Signed-off-by: Baruch Siach Signed-off-by: Gregory CLEMENT commit e645d14e243e4308133bc399823141b9c25bd91a Author: Baruch Siach Date: Thu Jan 2 10:23:27 2020 +0200 ARM: dts: armada-38x-solidrun-microsom: add eeprom SolidRun Armada 38x SOM rev 2.1 added EEPROM. Add DT node for EEPROM description. Cc: Dennis Gilmore Signed-off-by: Baruch Siach Signed-off-by: Gregory CLEMENT commit 5c04ad85627f64d278826fe41aae76896b406e37 Author: Baruch Siach Date: Thu Jan 2 10:23:26 2020 +0200 ARM: armada-38x-solidrun-microsom: move i2c0 to SOM DT Move the i2c0 controller properties to the SOM .dtsi. This is preparation for adding an i2c device at the SOM level. Cc: Dennis Gilmore Signed-off-by: Baruch Siach Signed-off-by: Gregory CLEMENT commit aecc313490ae6a921f5c6123eefd85b2bd604819 Author: Baruch Siach Date: Sun Jan 5 17:38:37 2020 +0200 ARM: dts: mvebu: add support for SolidRun Clearfog GTR SolidRun Clearfog GTR L8 and S4 SBCs are based on Armada 385. They features 8 (L8) or 4 (S4) switched Ethernet ports, 1 1Gb Ethernet port, 1 directly connected SFP port, 1 SFP port behind the switch (not currently described in DT), 3 mini-PCIe slots, eMMC, SPI flash, USB3 port. https://developer.solid-run.com/products/clearfog-gtr-a385/ Reviewed-by: Andrew Lunn Signed-off-by: Baruch Siach Signed-off-by: Gregory CLEMENT commit 34efc83727c85430a763f7119daba56ccdc80608 Author: Yangtao Li Date: Sat Dec 28 18:35:38 2019 +0000 mailbox: armada-37xx-rwtm: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Gregory CLEMENT commit f3ba1c86c2cd9c37c4a394ae72032181eef5434a Author: Yangtao Li Date: Sun Dec 22 18:50:28 2019 +0000 memory: mvebu-devbus: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Gregory CLEMENT commit 54dd5fcb7cc0a9c6dc5af0e28d4dbef651b8d165 Author: Marek Behún Date: Wed Dec 11 15:47:11 2019 +0100 bus: moxtet: declare moxtet_bus_type as static This symbol is not meant to be used from elsewhere. Cc: Ben Dooks Cc: Christoph Hellwig Cc: Gregory CLEMENT Signed-off-by: Marek Behún Signed-off-by: Gregory CLEMENT commit e8acad4d839589c88ee27669bf56ab2ae7340007 Author: Dan Carpenter Date: Wed Dec 11 15:47:10 2019 +0100 firmware: turris-mox-rwtm: small white space cleanup This patch deletes a stray tab. Cc: Gregory CLEMENT Cc: Colin King Signed-off-by: Dan Carpenter Signed-off-by: Marek Behún Signed-off-by: Gregory CLEMENT commit e2d5e8332c9684ea254c84002bc1e13a42db9e54 Author: John Stultz Date: Wed Jan 8 00:19:13 2020 +0000 reset: qcom-aoss: Allow CONFIG_RESET_QCOM_AOSS to be a tristate Allow CONFIG_RESET_QCOM_AOSS to be set as as =m to allow for the driver to be loaded from a modules. Also replaces the builtin_platform_driver() line with module_platform_driver() and adds a MODULE_DEVICE_TABLE() entry. Cc: Todd Kjos Cc: Alistair Delva Cc: Amit Pundir Signed-off-by: John Stultz Reviewed-by: Bjorn Andersson Signed-off-by: Philipp Zabel commit 72f775611daf3ce20358388facbaf11f22899fa2 Author: Chen Zhou Date: Fri Dec 27 19:48:11 2019 +0800 drm/gma500: remove set but not used variables 'hist_reg' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/gma500/psb_irq.c: In function psb_irq_turn_off_dpst: drivers/gpu/drm/gma500/psb_irq.c:473:6: warning: variable hist_reg set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: Chen Zhou Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20191227114811.14907-1-chenzhou10@huawei.com commit f2bc07562748c23609743ded0630ec965f9e4fec Author: Geert Uytterhoeven Date: Mon Dec 30 09:31:56 2019 +0100 pinctrl: sh-pfc: Split R-Car H3 support in two independent drivers Despite using the same compatible values ("r8a7795"-based) because of historical reasons, R-Car H3 ES1.x (R8A77950) and R-Car H3 ES2.0+ (R8A77951) are really different SoCs, with different part numbers, and with different Pin Function Controller blocks. Reflect this in the pinctrl configuration, by replacing the existing CONFIG_PINCTRL_PFC_R8A7795 symbol by two new config symbols: CONFIG_PINCTRL_PFC_R8A77950 and CONFIG_PINCTRL_PFC_R8A77951. The latter are selected automatically, depending on the soon-to-be-introduced corresponding SoC-specific config options, and on the current common config option, to relax dependencies. Rename the individual pin control driver source files from pfc-r8a7795-es1.c to pfc-r8a77950.c, and from pfc-r8a7795.c to pfc-r8a77951.c, and make them truly independent. As both SoCs share the same compatible value, special care must be taken to match them to the correct pin control driver, if support for it is included in the running kernel. This will allow making support for early R-Car H3 revisions optional, the largest share of which is taken by the pin control driver. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Reviewed-by: Niklas Söderlund Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191230083156.19191-1-geert+renesas@glider.be commit 8040bf4091cdd13b6d0f9ab00e621ae6eb29174d Author: Geert Uytterhoeven Date: Mon Dec 30 09:09:02 2019 +0100 clk: renesas: Prepare for split of R-Car H3 config symbol Despite using the same compatible values ("r8a7795"-based) because of historical reasons, R-Car H3 ES1.x (R8A77950) and R-Car H3 ES2.0+ (R8A77951) are really different SoCs, with different part numbers. Hence the SoC configuration symbol will be split in two separate config symbols. As the Clock Pulse Generator / Module Standby and Software Reset blocks in both SoCs are very similar, they will keep on sharing a driver. Extend the dependency of CONFIG_CLK_R8A7795, to prepare for the split. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20191230080902.2832-1-geert+renesas@glider.be commit 6fe082b0fbe5a8ce9b16998fc4cb885a9b52f976 Author: Maxime Ripard Date: Tue Jan 7 17:59:57 2020 +0100 drm/sun4i: drc: Make sure we enforce the clock rate The DRC needs to run at 300MHz to be functional. This was done so far using assigned-clocks in the device tree, but that is easy to forget, and doesn't provide any other guarantee than the rate is going to be roughly the one requested at probe time. Therefore it's pretty fragile, so let's just use the exclusive clock API to enforce it. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200107165957.672435-2-maxime@cerno.tech commit 451debe55715acafdcacba6a879e6ccb8eca23ce Author: Maxime Ripard Date: Tue Jan 7 17:59:56 2020 +0100 drm/sun4i: backend: Make sure we enforce the clock rate The backend needs to run at 300MHz to be functional. This was done so far using assigned-clocks in the device tree, but that is easy to forget, and doesn't provide any other guarantee than the rate is going to be roughly the one requested at probe time. Therefore it's pretty fragile, so let's just use the exclusive clock API to enforce it. Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200107165957.672435-1-maxime@cerno.tech commit f66ff55a9bd06855f9c6b8f29d8760f77bfe43c2 Author: Boris Brezillon Date: Fri Dec 27 15:41:24 2019 +0100 drm/exynos: dsi: Fix bridge chain handling Commit 05193dc38197 ("drm/bridge: Make the bridge chain a double-linked list") patched the bridge chain logic to use a double-linked list instead of a single-linked list. This change induced changes to the Exynos driver which was manually resetting the encoder->bridge element to NULL to control the enable/disable sequence of the bridge chain. During this conversion, 2 bugs were introduced: 1/ list_splice() was used to move chain elements to our own internal chain, but list_splice() does not reset the source list to an empty state, leading to unexpected bridge hook calls when drm_bridge_chain_xxx() helpers were called by the core. Replacing the list_splice() call by list_splice_init() fixes this problem. 2/ drm_bridge_chain_xxx() helpers operate on the bridge->encoder->bridge_chain list, which is now empty. When the helper uses list_for_each_entry_reverse() we end up with no operation done which is not what we want. But that's even worse when the helper uses list_for_each_entry_from(), because in that case we end up in an infinite loop searching for the list head element which is no longer encoder->bridge_chain but exynos_dsi->bridge_chain. To address that problem we stop using the bridge chain helpers and call the hooks directly. Reported-by: Marek Szyprowski Fixes: 05193dc38197 ("drm/bridge: Make the bridge chain a double-linked list") Signed-off-by: Boris Brezillon Tested-by: Marek Szyprowski Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20191227144124.210294-3-boris.brezillon@collabora.com commit 033bfe7538a1523f36dd434eaff7c754a555c458 Author: Boris Brezillon Date: Fri Dec 27 15:41:23 2019 +0100 drm/vc4: dsi: Fix bridge chain handling Commit 05193dc38197 ("drm/bridge: Make the bridge chain a double-linked list") patched the bridge chain logic to use a double-linked list instead of a single-linked list. This change induced changes to the VC4 driver which was manually resetting the encoder->bridge element to NULL to control the enable/disable sequence of the bridge chain. During this conversion, 2 bugs were introduced: 1/ list_splice() was used to move chain elements to our own internal chain, but list_splice() does not reset the source list to an empty state, leading to unexpected bridge hook calls when drm_bridge_chain_xxx() helpers were called by the core. Replacing those list_splice() calls by list_splice_init() ones fixes this problem. 2/ drm_bridge_chain_xxx() helpers operate on the bridge->encoder->bridge_chain list, which is now empty. When the helper uses list_for_each_entry_reverse() we end up with no operation done which is not what we want. But that's even worse when the helper uses list_for_each_entry_from(), because in that case we end up in an infinite loop searching for the list head element which is no longer encoder->bridge_chain but vc4_dsi->bridge_chain. To address that problem we stop using the bridge chain helpers and call the hooks directly. Reported-by: Marek Szyprowski Cc: Eric Anholt Fixes: 05193dc38197 ("drm/bridge: Make the bridge chain a double-linked list") Signed-off-by: Boris Brezillon Reviewed-by: Andrzej Hajda Acked-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20191227144124.210294-2-boris.brezillon@collabora.com commit 748e3456b240061fcbcea663d28040bf426c9594 Author: Kishon Vijay Abraham I Date: Mon Dec 16 15:27:10 2019 +0530 phy: cadence: Sierra: Use correct dev pointer in cdns_sierra_phy_remove() commit 44d30d622821d3b ("phy: cadence: Add driver for Sierra PHY"), incorrectly used parent device pointer to get driver data. Fix it here. Signed-off-by: Kishon Vijay Abraham I commit 6825cfc94825c3170feef946e926f1551a8a25c9 Author: Kishon Vijay Abraham I Date: Mon Dec 16 15:27:09 2019 +0530 phy: cadence: Sierra: Set cmn_refclk_dig_div/cmn_refclk1_dig_div frequency to 25MHz Set cmn_refclk_dig_div/cmn_refclk1_dig_div frequency to 25MHz as specified in "Common Module Clock Configurations" of the Cadence Sierra 16FFC Multi-Protocol PHY PMA Specification. It is set to 25MHz since the only user of Cadence Sierra SERDES, TI J721E SoC provides input clock frequency of 100MHz. For other frequencies, cmn_refclk_dig_div/cmn_refclk1_dig_div should be configured based on the "Common Module Clock Configurations". Signed-off-by: Kishon Vijay Abraham I commit a43f72ae136a816a3cceab8957dd3aa301263281 Author: Kishon Vijay Abraham I Date: Mon Dec 16 15:27:08 2019 +0530 phy: cadence: Sierra: Change MAX_LANES of Sierra to 16 Sierra SERDES IP supports upto 16 lanes (though not all of it will be enabled in a platform). Allow Sierra driver to support a maximum of upto 16 lanes. Signed-off-by: Kishon Vijay Abraham I commit adc4bd6f6545bedc5547c76c2bf52257a8fffa97 Author: Kishon Vijay Abraham I Date: Mon Dec 16 15:27:07 2019 +0530 phy: cadence: Sierra: Check for PLL lock during PHY power on Check for PLL lock during PHY power on. Signed-off-by: Kishon Vijay Abraham I commit b872936f5757412ec11039ffe895e1b9249d6b68 Author: Kishon Vijay Abraham I Date: Mon Dec 16 15:27:06 2019 +0530 phy: cadence: Sierra: Get reset control "array" for each link A link may have multiple lanes each with a separate reset. Get reset control "array" in order to reset all the lanes associated with the link. Signed-off-by: Kishon Vijay Abraham I commit 871002d788817eb4cd0cd03101d284c3db06ed74 Author: Anil Varughese Date: Mon Dec 16 15:27:05 2019 +0530 phy: cadence: Sierra: Configure both lane cdb and common cdb registers for external SSC The existing configuration done in Cadence Sierra driver is only for reference and is not used in any platforms. Remove them and configure both lane cdb and common cdb registers to be used with external SSC configuration. This is validated in TI J721E platform. Signed-off-by: Anil Varughese Signed-off-by: Kishon Vijay Abraham I commit aead5fd6026d4006e494167b07a44254af8b43a9 Author: Kishon Vijay Abraham I Date: Mon Dec 16 15:27:04 2019 +0530 phy: cadence: Sierra: Modify register macro names to be in sync with Sierra user guide No functional change. Modify register offset macro names to be in sync with Sierra user guide. Signed-off-by: Kishon Vijay Abraham I commit cedcc2e2ea39c4b47c417461a64eec27dedd335b Author: Kishon Vijay Abraham I Date: Mon Dec 16 15:27:03 2019 +0530 phy: cadence: Sierra: Make cdns_sierra_phy_init() as phy_ops Instead of invoking cdns_sierra_phy_init() from probe, add it in phy_ops so that it's initialized when the PHY consumer invokes phy_init() Signed-off-by: Kishon Vijay Abraham I commit 367da978713b4efa1c1689935c5c5d839e778c67 Author: Kishon Vijay Abraham I Date: Mon Dec 16 15:27:02 2019 +0530 phy: cadence: Sierra: Add support for SERDES_16G used in J721E SoC SERDES_16G in TI's J721E SoC uses Cadence Sierra PHY. Add support to use Cadence Sierra driver in J721E SoC. Signed-off-by: Kishon Vijay Abraham I commit 380f57083c12936d6189fcda9e954ffcb821ec74 Author: Kishon Vijay Abraham I Date: Mon Dec 16 15:27:01 2019 +0530 phy: cadence: Sierra: Use "regmap" for read and write to Sierra registers Use "regmap" for read and write to Sierra registers. This is in perparation for adding SERDES_16G support present in TI's J721E SoC. Signed-off-by: Kishon Vijay Abraham I commit 372428db44cf8666ff07fa349d305c1be35cb7d4 Author: Kishon Vijay Abraham I Date: Mon Dec 16 15:27:00 2019 +0530 phy: cadence: Sierra: Make "phy_clk" and "sierra_apb" optional resources Certain platforms like TI J721E using Cadence Sierra Serdes doesn't provide explicit phy_clk and reset (APB reset) control. Make them optional here. Signed-off-by: Kishon Vijay Abraham I commit 56d34730c1a220d5015b672088e95f99e8b83b1f Author: Kishon Vijay Abraham I Date: Mon Dec 16 15:26:59 2019 +0530 dt-bindings: phy: Sierra: Add bindings for Sierra in TI's J721E Add DT binding documentation for Sierra PHY IP used in TI's J721E SoC. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Rob Herring commit b0c0b66c0b432d3f3a1ae5849298ba9c7f1810c5 Author: Al Cooper Date: Fri Jan 3 13:18:11 2020 -0500 phy: usb: Add support for wake and USB low power mode for 7211 S2/S5 Add support for 7211 USB wake. Disable all possible 7211 USB logic for S2/S5 if USB wake is not enabled. On the 7211, the XHCI wake signal was not connected properly and only goes to the USB1_USB1_CTRL_TP_DIAG1 diagonstic register. The workaround is to have VPU code running that polls for the proper bit in the DIAG register and to wake the system when the bit is asserted. Signed-off-by: Al Cooper Reviewed-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit 5dfe1cec580829faa49842672a25481b104c26ef Author: Al Cooper Date: Fri Jan 3 13:18:10 2020 -0500 phy: usb: USB driver is crashing during S3 resume on 7216 This is a result of the USB 2.0 clocks not being disabled/enabled during suspend/resume on XHCI only systems. Signed-off-by: Al Cooper Reviewed-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit bed63b636fedf47dbab899a5193ec5ec4539f6fc Author: Al Cooper Date: Fri Jan 3 13:18:09 2020 -0500 phy: usb: bdc: Fix occasional failure with BDC on 7211 The BDC "Read Transaction Size" needs to be changed from 1024 bytes to 256 bytes to prevent occasional transaction failures. Signed-off-by: Al Cooper Reviewed-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit fc430aea02068150d053ef24bc424db3dd1357d4 Author: Al Cooper Date: Fri Jan 3 13:18:08 2020 -0500 phy: usb: PHY's MDIO registers not accessible without device installed When there is no device connected and FSM is enabled, the XHCI puts the PHY into suspend mode. When the PHY is put into suspend mode the USB LDO powers down the PHY. This causes the MDIO to be inaccessible and its registers reset to default. The fix is to disable FSM. Signed-off-by: Al Cooper Reviewed-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit 89927fe0061aaa69b39e95ed793d2c61903b7895 Author: Al Cooper Date: Fri Jan 3 13:18:07 2020 -0500 phy: usb: fix driver to defer on clk_get defer Handle defer on clk_get because the new SCMI clock driver comes up after this driver. Signed-off-by: Al Cooper Reviewed-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit 9d5f51dcdb646c2ed21649d379fbb703994f1ec9 Author: Al Cooper Date: Fri Jan 3 13:18:06 2020 -0500 phy: usb: Add support for new Synopsys USB controller on the 7211b0 The 7211b0 has added the STB XHCI Synopsys controller and it will be used instead of the RPi based DWC USB controller. The new Synopsys XHCI controller core is the same one that is used on the 7216, but because of the way the STB USB PHY is used on both the A0 and B0, some of the PHY control is different. Signed-off-by: Al Cooper Reviewed-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit 4e5b9c9a73b32d28759225a40d30848393a8f1fd Author: Al Cooper Date: Fri Jan 3 13:18:05 2020 -0500 phy: usb: Add support for new Synopsys USB controller on the 7216 The 7216 has the new USB XHCI controller from Synopsys. While this new controller and the PHY are similar to the STB versions, the major differences are: - Many of the registers and fields in the CTRL block have been removed or changed. - A new set of Synopsys control registers, BCHP_USB_XHCI_GBL, were added. - MDIO functionality has been replaced with direct access registers in the BCHP_USB_XHCI_GBL block. - Power up PHY defaults that had to be changed by MDIO in previous chips will now power up with the correct defaults. A new init module was created for this new Synopsys USB controller. A new compatible string was added and the driver will dispatch into one of two init modules based on it. A "reg-names" field was added so the driver can more easily get optional registers. A DT bindings document was also added for this driver. Signed-off-by: Al Cooper Reviewed-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit b11df0c9efbbe2b52c5133ca15030f01b43ec6ef Author: Al Cooper Date: Fri Jan 3 13:18:04 2020 -0500 dt-bindings: Add Broadcom STB USB PHY binding document Add support for bcm7216 and bcm7211 Signed-off-by: Al Cooper Reviewed-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit 94583a41047eb9489f576344b8ba9370cf4cbfb7 Author: Al Cooper Date: Fri Jan 3 13:18:03 2020 -0500 phy: usb: Restructure in preparation for adding 7216 USB support The driver is being restructured in preparation for adding support for the new Synopsys USB conroller on the 7216. Since all the bugs and work-arounds in previous STB chips are supposed to be fixed, most of the code in phy-brcm-usb-init.c is not needed. Instead of adding more complexity to the already complicated phy-brcm-usb-init.c module, the driver will be restructured to use a vector table to dispatch into different C modules for the different controllers. There was also some general cleanup done including some ipp setup code that was incorrect. Signed-off-by: Al Cooper Reviewed-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit f1c0db40a3ade1f1a39e5794d728f2953d817322 Author: Al Cooper Date: Fri Jan 3 13:18:02 2020 -0500 phy: usb: Add "wake on" functionality Add the ability to handle USB wake events from USB devices when in S2 mode. Typically there is some additional configuration needed to tell the USB device to generate the wake event when suspended but this varies with the different USB device classes. For example, on USB Ethernet dongles, ethtool should be used to enable the magic packet wake functionality in the dongle. NOTE: This requires that the "power/wakeup" sysfs entry for the USB device generating the wakeup be set to "enabled". This functionality requires a special hardware sideband path that will trigger the AON_PM_L2 interrupt needed to wake the system from S2 even though the USB host controllers are in IDDQ (low power state) and most USB related clocks are shut off. For the sideband signaling to work we need to leave the usbx_freerun clock running, but this clock consumes very little power by design. There's a bug in the XHCI wake hardware so only EHCI/OHCI wake is currently supported. Signed-off-by: Al Cooper Reviewed-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit 6597af4e4835ec0709638d48f73c11b5c624790f Author: Al Cooper Date: Fri Jan 3 13:18:01 2020 -0500 phy: usb: Put USB phys into IDDQ on suspend to save power in S2 mode Currently the Phy driver will put the USB phys into the max power saving mode (IDDQ) when there is no corresponding XHCI, EHCI or OHCI client (through rmmod, unbind or if the driver is not builtin). This change will also put the Phys into IDDQ mode on suspend so that S2 will get the additional power savings. Signed-off-by: Al Cooper Reviewed-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit ece5ffd9e15e9c8471e58b581a098032a679d34e Author: Al Cooper Date: Fri Jan 3 13:18:00 2020 -0500 phy: usb: Get all drivers that use USB clks using correct enable/disable The BRCM USB Phy, ohci, ehci and xhci drivers all use the USB clocks but not all drivers use the clk_prepare_enable/clk_disable_unprepare versions to enable/disable the clocks. This change gets all drivers using the prepare version. Signed-off-by: Al Cooper Reviewed-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit dc9aa43c43668481089c48135707ec3f8f5b2e19 Author: Al Cooper Date: Fri Jan 3 13:17:59 2020 -0500 phy: usb: EHCI DMA may lose a burst of DMA data for 7255xA0 family When the EHCI controller received a 512 byte USB packet that had to be broken into 2 256 byte bursts across the SCB bus AND there was a following 512 byte USB packet, the second burst of data from the first packet was sometimes being lost. If the burst size was changed to 128 bytes via the EBR_SCB_SIZE field in the USB_CTRL_EBRIDGE register we'd see the 4th 128 byte burst of the first packet being lost. This problem became much worse if other threads were running that accessed memory, like a memcpy test. Setting the EBR_SCB_SIZE to 512, which prevents breaking the EHCI USB packet (max size of 512 bytes) into bursts, fixed the problem. Signed-off-by: Al Cooper Reviewed-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit d0312fdbf3e1dc34bc370b17fee290921cf9b814 Author: Vinod Koul Date: Mon Dec 23 20:00:46 2019 +0530 phy: qcom-qmp: Add SW reset register For V4 QMP UFS Phy, we need to assert reset bits, configure the phy and then deassert it, so add the QPHY_SW_RESET register which does this. Signed-off-by: Vinod Koul Reviewed-by: Manu Gautam Reviewed-by: Can Guo Signed-off-by: Kishon Vijay Abraham I commit 7d59e8e8fdd0d690c7b6956d591125321a508c5f Author: Vinod Koul Date: Mon Dec 23 20:00:45 2019 +0530 phy: qcom-qmp: remove no_pcs_sw_reset for sm8150 SM8150 QMPY phy for UFS and onwards the PHY_SW_RESET is present in PHY's PCS register so we should not mark no_pcs_sw_reset for sm8150 and onwards Signed-off-by: Vinod Koul Reviewed-by: Manu Gautam Reviewed-by: Can Guo Signed-off-by: Kishon Vijay Abraham I commit 01240af0138b9fa76a17e12b31a33fbce30c5786 Author: Vinod Koul Date: Mon Dec 23 20:00:44 2019 +0530 phy: qcom-qmp: remove duplicate powerdown write We already write to QPHY_POWER_DOWN_CONTROL in qcom_qmp_phy_com_init() before invoking qcom_qmp_phy_configure() so remove the duplicate write. Signed-off-by: Vinod Koul Reviewed-by: Manu Gautam Signed-off-by: Kishon Vijay Abraham I commit 730430dceeb55957169c5a33df88720db0673a9b Author: Vinod Koul Date: Mon Dec 23 20:00:43 2019 +0530 phy: qcom-qmp: Use register defines We already define register offsets so use them in register layout. Signed-off-by: Vinod Koul Reviewed-by: Manu Gautam Reviewed-by: Can Guo Signed-off-by: Kishon Vijay Abraham I commit 978442532e57b84985f236761d557f1d99c67449 Author: Florian Fainelli Date: Tue Dec 10 12:08:52 2019 -0800 phy: brcm-sata: Implement 7216 initialization sequence 7216 is a 16nm process chip with a slightly different version of the PHY SerdDeS/AFE that requires a specific tuning sequence. Key on the compatible string to perform that initialization. Signed-off-by: Florian Fainelli Signed-off-by: Kishon Vijay Abraham I commit d0c05c68d669e8fccd50ab64c79154def5221588 Author: Florian Fainelli Date: Tue Dec 10 12:08:51 2019 -0800 dt-bindings: phy: Document BCM7216 SATA PHY compatible string Define "brcm,bcm7216-sata-phy" as a new compatible string for the Broadcom SATA3 PHY. Signed-off-by: Florian Fainelli Acked-by: Rob Herring Signed-off-by: Kishon Vijay Abraham I commit f0684c1a836770afba7a7097e61935edd69693bf Author: Heiko Stuebner Date: Fri Nov 8 01:06:40 2019 +0100 phy/rockchip: inno-dsidphy: generalize parameter handling During review it came to light that exposing the pll clock outside is not the right approach and struct phy_configure_opts_mipi_dphy exists just for that reason to transfer parameters to the phy. So drop the exposed clock and rely on the phy configure options to bring in the correct rate. That way we can also just drop the open coded timing struct and default values function. Fixes: b7535a3bc0ba ("phy/rockchip: Add support for Innosilicon MIPI/LVDS/TTL PHY") Signed-off-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I commit cb18b9a92b0baaa3188d67d1371079c1eacb3454 Author: Heiko Stuebner Date: Mon Dec 16 13:24:47 2019 +0100 dt-bindings: phy: drop #clock-cells from rockchip,px30-dsi-dphy Further review of the dsi components for the px30 revealed that the phy shouldn't expose the pll as clock but instead handle settings via phy parameters. As the phy binding is new and not used anywhere yet, just drop them so they don't get used. Fixes: 3817c7961179 ("dt-bindings: phy: add yaml binding for rockchip,px30-dsi-dphy") Signed-off-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I commit 6f69e2a330932756b0baf772b54a82b0e33748db Author: Ma Feng Date: Thu Dec 19 11:24:38 2019 +0800 phy: lantiq: vrx200-pcie: Remove unneeded semicolon Fixes coccicheck warning: drivers/phy/lantiq/phy-lantiq-vrx200-pcie.c:389:2-3: Unneeded semicolon Fixes: e52a632195bf ("phy: lantiq: vrx200-pcie: add a driver for the Lantiq VRX200 PCIe PHY") Reported-by: Hulk Robot Signed-off-by: Ma Feng Signed-off-by: Kishon Vijay Abraham I commit a89806c998ee123bb9c0f18526e55afd12c0c0ab Author: Nathan Chancellor Date: Tue Dec 17 18:36:37 2019 -0700 phy: qualcomm: Adjust indentation in read_poll_timeout Clang warns: ../drivers/phy/qualcomm/phy-qcom-apq8064-sata.c:83:4: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] usleep_range(DELAY_INTERVAL_US, DELAY_INTERVAL_US + 50); ^ ../drivers/phy/qualcomm/phy-qcom-apq8064-sata.c:80:3: note: previous statement is here if (readl_relaxed(addr) & mask) ^ 1 warning generated. This warning occurs because there is a space after the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns. Fixes: 1de990d8a169 ("phy: qcom: Add driver for QCOM APQ8064 SATA PHY") Link: https://github.com/ClangBuiltLinux/linux/issues/816 Signed-off-by: Nathan Chancellor Reviewed-by: Bjorn Andersson Signed-off-by: Kishon Vijay Abraham I commit 2ec1431ffac9f891a11ac955a9ee914e0547215e Author: kbuild test robot Date: Sat Jan 4 21:43:31 2020 +0100 video: fbdev: mmp: fix platform_get_irq.cocci warnings Remove dev_err() messages after platform_get_irq*() failures. Line 450 is redundant because platform_get_irq() already prints an error. Generated by: scripts/coccinelle/api/platform_get_irq.cocci Fixes: dd90e9ae55a1 ("video: fbdev: mmp: add COMPILE_TEST support") Signed-off-by: kbuild test robot Signed-off-by: Julia Lawall Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/alpine.DEB.2.21.2001042140310.6944@hadrien commit 987351e1ea7772cf2f0795e917fb33b2e282e1c1 Author: Alexandre Torgue Date: Mon Nov 4 15:37:13 2019 +0100 phy: core: Add consumer device link support In order to enforce suspend/resume ordering, this commit creates link between phy consumers and phy devices. This link avoids to suspend phy before phy consumers. Signed-off-by: Alexandre Torgue [jonathanh@nvidia.com: Fix an abort when of_phy_get() returns error] Signed-off-by: Jonathan Hunter Signed-off-by: Kishon Vijay Abraham I commit ff258817137a9004e2fbee2b36df58a4fc7d0f7e Author: Stephen Boyd Date: Fri Aug 30 08:09:23 2019 -0700 clk: divider: Add support for specifying parents via DT/pointers After commit fc0c209c147f ("clk: Allow parents to be specified without string names") we can use DT or direct clk_hw pointers to specify parents. Create a generic function that shouldn't be used very often to encode the multitude of ways of registering a divider clk with different parent information. Then add a bunch of wrapper macros that only pass down what needs to be passed down to the generic function to support this with less arguments. Cc: Manivannan Sadhasivam Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20190830150923.259497-13-sboyd@kernel.org [sboyd@kernel.org: Export __clk_hw_register_divider] commit 3b2549a3740efb8af0150415737067d87e466c5b Author: Dan Carpenter Date: Wed Jan 8 08:37:06 2020 +0300 ALSA: control: potential uninitialized return value Smatch complains that "ret" might be uninitialized. Fixes: fbd3eb7f66c5 ("ALSA: control: Add verification for kctl accesses") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200108053706.h3hcnvmnf62wkjac@kili.mountain Signed-off-by: Takashi Iwai commit 9a434cee773ae15309ac225f27551b5492618e4a Author: Elliot Berman Date: Tue Jan 7 13:04:26 2020 -0800 firmware: qcom_scm: Dynamically support SMCCC and legacy conventions Dynamically support SMCCCC and legacy conventions by detecting which convention to use at runtime. qcom_scm_call_atomic and qcom_scm_call can then be moved in qcom_scm.c and use underlying convention backend as appropriate. Thus, rename qcom_scm-64,-32 to reflect that they are backends for -smc and -legacy, respectively. Also add support for making SCM calls earlier than when SCM driver probes to support use cases such as qcom_scm_set_cold_boot_addr. Support is added by lazily initializing the convention and guarding the query with a spin lock. The limitation of these early SCM calls is that they cannot use DMA, as in the case of >4 arguments for SMC convention and any non-atomic call for legacy convention. Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-18-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit 57d3b816718c1cf832e2929a754da3564c6127cc Author: Elliot Berman Date: Tue Jan 7 13:04:25 2020 -0800 firmware: qcom_scm: Remove thin wrappers qcom_scm-32 and qcom_scm-64 implementations are nearly identical, so make qcom_scm_call and qcom_scm_call_atomic unique to each and the SCM descriptor creation common to each. There are the following catches: - __qcom_scm_is_call_available is still in each -32,-64 implementation as the argument is unique to each convention - For some functions, only one implementation was provided in -32 or -64. The actual implementation was moved into qcom_scm.c - io_writel and io_readl in -64 were non-atomic calls and in -32 they were. Atomic is the better option, so use it. Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-17-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit 65f0c90b7d468545590992c61a19f9dc0aac61ef Author: Elliot Berman Date: Tue Jan 7 13:04:24 2020 -0800 firmware: qcom_scm: Order functions, definitions by service/command Definitions throughout qcom_scm are loosely grouped and loosely ordered. Sort all the functions/definitions by service ID/command ID to improve sanity when needing to add new functionality to this driver. Acked-by: Bjorn Andersson Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-16-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit 59b6cf3046d2026e51cb61b8685a14965d991927 Author: Elliot Berman Date: Tue Jan 7 13:04:23 2020 -0800 firmware: qcom_scm-32: Add device argument to atomic calls Add unused "device" parameter to reduce merge friction between SMCCC and legacy based conventions in an upcoming patch. Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-15-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit 84528486ad7b28d26137b69a674cbfa53e01b592 Author: Elliot Berman Date: Tue Jan 7 13:04:22 2020 -0800 firmware: qcom_scm-32: Create common legacy atomic call Per [1], legacy calling convention supports up to 5 arguments and 3 return values. Create one function to support this combination, and remove the original "atomic1" and "atomic2" variants for 1 and 2 arguments. This more closely aligns scm_legacy implementation with scm_smc implementation. [1]: https://source.codeaurora.org/quic/la/kernel/msm-4.9/tree/drivers/soc/qcom/scm.c?h=kernel.lnx.4.9.r28-rel#n1024 Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-14-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit 590e92809a58a5de93079e4948b75e6a4832187c Author: Elliot Berman Date: Tue Jan 7 13:04:21 2020 -0800 firmware: qcom_scm-32: Move SMCCC register filling to qcom_scm_call Move SMCCC register filling to qcom_scm_call so that __scm_legacy_do only needs to concern itself with retry mechanism. qcom_scm_call then is responsible for translating qcom_scm_desc into the complete set of register arguments and passing onto qcom_scm_call_do. Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-13-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit efd2b15c21a04367594685093af3ef2567923bbc Author: Elliot Berman Date: Tue Jan 7 13:04:20 2020 -0800 firmware: qcom_scm-32: Use qcom_scm_desc in non-atomic calls Use qcom_scm_desc in non-atomic calls to remove legacy convention details from every SCM wrapper function. Implementations were copied from qcom_scm-64 and are functionally equivalent when using the qcom_scm_desc and qcom_scm_res structs. Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-12-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit fd62c30b6b423c48b8c8420ceec9afd7aa8e3258 Author: Elliot Berman Date: Tue Jan 7 13:04:19 2020 -0800 firmware: qcom_scm-32: Add funcnum IDs Add SCM_LEGACY_FNID macro to qcom_scm-32. Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-11-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit 0224898152bdca2dee603d3f0b592026ff871d63 Author: Elliot Berman Date: Tue Jan 7 13:04:18 2020 -0800 firmware: qcom_scm-32: Use SMC arch wrappers Use SMC arch wrappers instead of inline assembly. Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-10-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit 5dad8deee29b7a64854e8bceb90337fa4db610de Author: Elliot Berman Date: Tue Jan 7 13:04:17 2020 -0800 firmware: qcom_scm-64: Improve SMC convention detection Improve the calling convention detection to use __qcom_scm_is_call_available() and not blindly assume 32-bit mode if the checks fails. BUG() if neither 32-bit or 64-bit mode works. Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-9-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit 3f951ea627dae878e353c51dfeb10baaccb10101 Author: Elliot Berman Date: Tue Jan 7 13:04:16 2020 -0800 firmware: qcom_scm-64: Move SMC register filling to qcom_scm_call_smccc qcom_scm_call_smccc should be responsible for converting qcom_scm_desc into arguments for smc call. Consolidate the dispersed logic to convert qcom_scm_desc into smc arguments inside qcom_scm_call_smccc. Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-8-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit 1f7166fdae55b52803d1f381e017ecbd45142a2d Author: Elliot Berman Date: Tue Jan 7 13:04:15 2020 -0800 firmware: qcom_scm-64: Add SCM results struct Remove knowledge of arm_smccc_res struct from client wrappers so that client wrappers only work QCOM SCM data structures. SCM calls may have up to 3 arguments, so qcom_scm_call_smccc is responsible now for filling those 3 arguments accordingly. This is necessary to support merging legacy and SMC conventions in an upcoming patch. Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-7-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit b30a2a72b84e2355b4db12393407ca48be89e267 Author: Elliot Berman Date: Tue Jan 7 13:04:14 2020 -0800 firmware: qcom_scm-64: Move svc/cmd/owner into qcom_scm_desc Service, command, and owner IDs are all part of qcom_scm_desc struct and have no special reason to be a function argument (or hard-coded in the case of owner [1]). Moving them to be part of qcom_scm_desc struct improves readability. [1]: Example of SCM function using owner vale other than hard-coded SIP value: https://source.codeaurora.org/quic/la/kernel/msm-4.9/tree/drivers/soc/qcom/smcinvoke.c?h=kernel.lnx.4.9.r28-rel#n35 Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-6-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit 4a9f1e13b7ed89e66ca9f7c46e48e305402e0732 Author: Elliot Berman Date: Tue Jan 7 13:04:13 2020 -0800 firmware: qcom_scm-64: Make SMC macros less magical Improve understandability of SMC macros by reversing the logic as they are all functions of how many arguments can be shoved in registers and how many SCM arguments are supported. There aren't 4 register arguments because are 7 arguments that go into a buffer - there are up to 7 arguments that are overflowed into a buffer because only 4 registers are allocated for arguments. Reviewed-by: Stephen Boyd Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-5-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit 9a1108d2b001cda1af17160c78afedfff92e2202 Author: Elliot Berman Date: Tue Jan 7 13:04:12 2020 -0800 firmware: qcom_scm: Remove unused qcom_scm_get_version Remove unused qcom_scm_get_version. Reviewed-by: Bjorn Andersson Reviewed-by: Vinod Koul Reviewed-by: Stephen Boyd Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-4-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit 5443cc5f12b1178ccdc414843aea7f0d2e14d03c Author: Elliot Berman Date: Tue Jan 7 13:04:11 2020 -0800 firmware: qcom_scm: Apply consistent naming scheme to command IDs Create a consistent naming scheme for command IDs. The scheme is QCOM_SCM_##svc_##cmd. Remove unused macros QCOM_SCM_FLAG_HLOS, QCOM_SCM_FLAG_COLDBOOT_MC, QCOM_SCM_FLAG_WARMBOOT_MC, QCOM_SCM_CMD_CORE_HOTPLUGGED, and QCOM_SCM_BOOT_ADDR_MC. Reviewed-by: Bjorn Andersson Reviewed-by: Vinod Koul Reviewed-by: Stephen Boyd Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-3-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit e0aa153965041c6e795666b995055b35c00d5609 Author: Elliot Berman Date: Tue Jan 7 13:04:10 2020 -0800 firmware: qcom_scm: Rename macros and structures Rename legacy-specific structures and macros with legacy prefix; rename smc-specific structures and macros with smc prefix. This should make it clearer which structures are generic to "SCM" and which are specfically for implementing the convention. Tested-by: Brian Masney # arm32 Tested-by: Stephan Gerhold Signed-off-by: Elliot Berman Link: https://lore.kernel.org/r/1578431066-19600-2-git-send-email-eberman@codeaurora.org Signed-off-by: Bjorn Andersson commit 40adf686128856c4add948fb002d43e2c507d1aa Author: Parav Pandit Date: Thu Dec 12 13:30:24 2019 +0200 IB/core: Rename event_handler_lock to qp_open_list_lock This lock is used to protect the qp->open_list linked list. As a side effect it seems to also globally serialize the qp event_handler, but it isn't clear if that is a deliberate design. Link: https://lore.kernel.org/r/20191212113024.336702-5-leon@kernel.org Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 17e1064632512db419cb9bb4555aec1763969b7d Author: Parav Pandit Date: Thu Dec 12 13:30:23 2019 +0200 IB/core: Cut down single member ib_cache structure Given that ib_cache structure has only single member now, merge the cache lock directly in the ib_device. Link: https://lore.kernel.org/r/20191212113024.336702-4-leon@kernel.org Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 6b57cea9221b0247ad5111b348522625e489a8e4 Author: Parav Pandit Date: Thu Dec 12 13:30:22 2019 +0200 IB/core: Let IB core distribute cache update events Currently when the low level driver notifies Pkey, GID, and port change events they are notified to the registered handlers in the order they are registered. IB core and other ULPs such as IPoIB are interested in GID, LID, Pkey change events. Since all GID queries done by ULPs are serviced by IB core, and the IB core deferes cache updates to a work queue, it is possible for other clients to see stale cache data when they handle their own events. For example, the below call tree shows how ipoib will call rdma_query_gid() concurrently with the update to the cache sitting in the WQ. mlx5_ib_handle_event() ib_dispatch_event() ib_cache_event() queue_work() -> slow cache update [..] ipoib_event() queue_work() [..] work handler ipoib_ib_dev_flush_light() __ipoib_ib_dev_flush() ipoib_dev_addr_changed_valid() rdma_query_gid() <- Returns old GID, cache not updated. Move all the event dispatch to a work queue so that the cache update is always done before any clients are notified. Fixes: f35faa4ba956 ("IB/core: Simplify ib_query_gid to always refer to cache") Link: https://lore.kernel.org/r/20191212113024.336702-3-leon@kernel.org Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 4cca96a8d9da0ed8217cfdf2aec0c3c8b88e8911 Author: Parav Pandit Date: Thu Dec 12 13:30:21 2019 +0200 IB/mlx5: Do reverse sequence during device removal When IB device profile initialization completes, device is marked as active. However, IB device is not marked inactive, during device removal flow. It should be the mirror of the add flow. Hence, mark it inactive during remove sequence. Link: https://lore.kernel.org/r/20191212113024.336702-2-leon@kernel.org Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 09912635230374bdca2aca620d183f1834b3140c Author: Boris Brezillon Date: Tue Jan 7 19:58:07 2020 +0100 Revert "drm/bridge: Add a drm_bridge_state object" This reverts commit 6ed7e9625fa6 ("drm/bridge: Add a drm_bridge_state object") which introduced a circular dependency between drm.ko and drm_kms_helper.ko. Looks like the helper/core split is not appropriate and fixing that is not simple. Signed-off-by: Boris Brezillon Acked-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200107185807.606999-6-boris.brezillon@collabora.com commit b470743bedbacc7552763c0d973abe958aa0ff87 Author: Boris Brezillon Date: Tue Jan 7 19:58:06 2020 +0100 Revert "drm/bridge: Patch atomic hooks to take a drm_bridge_state" This reverts commit f7619a58ef92 ("drm/bridge: Patch atomic hooks to take a drm_bridge_state"). Commit 6ed7e9625fa6 ("drm/bridge: Add a drm_bridge_state object") introduced a circular dependency between drm.ko and drm_kms_helper.ko which uncovered a misdesign in how the whole thing was implemented. Let's revert all patches depending on the bridge_state infrastructure for now. Signed-off-by: Boris Brezillon Acked-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200107185807.606999-5-boris.brezillon@collabora.com commit 8de679abc8ae81463d3fec495a21a6ca0a65bade Author: Boris Brezillon Date: Tue Jan 7 19:58:05 2020 +0100 Revert "drm/bridge: Add an ->atomic_check() hook" This reverts commit b86d895524ab ("drm/bridge: Add an ->atomic_check() hook"). Commit 6ed7e9625fa6 ("drm/bridge: Add a drm_bridge_state object") introduced a circular dependency between drm.ko and drm_kms_helper.ko which uncovered a misdesign in how the whole thing was implemented. Let's revert all patches depending on the bridge_state infrastructure for now. Signed-off-by: Boris Brezillon Acked-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200107185807.606999-4-boris.brezillon@collabora.com commit 3dfbf2d3d05eccb0d4ffb4f30467519e601a5db6 Author: Boris Brezillon Date: Tue Jan 7 19:58:04 2020 +0100 Revert "drm/bridge: Add the necessary bits to support bus format negotiation" This reverts commit e351e4d5eaec ("drm/bridge: Add the necessary bits to support bus format negotiation"). Commit 6ed7e9625fa6 ("drm/bridge: Add a drm_bridge_state object") introduced a circular dependency between drm.ko and drm_kms_helper.ko which uncovered a misdesign in how the whole thing was implemented. Let's revert all patches depending on the bridge_state infrastructure for now. Signed-off-by: Boris Brezillon Acked-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200107185807.606999-3-boris.brezillon@collabora.com commit 6ae1a4bbe1138e883c34ea78ef29986d9f420bd7 Author: Boris Brezillon Date: Tue Jan 7 19:58:03 2020 +0100 Revert "drm/bridge: Fix a NULL pointer dereference in drm_atomic_bridge_chain_check()" This reverts commit b18398c16e17 ("drm/bridge: Fix a NULL pointer dereference in drm_atomic_bridge_chain_check()"). Commit 6ed7e9625fa6 ("drm/bridge: Add a drm_bridge_state object") introduced a circular dependency between drm.ko and drm_kms_helper.ko which uncovered a misdesign in how the whole thing was implemented. Let's revert all patches depending on the bridge_state infrastructure for now. Signed-off-by: Boris Brezillon Acked-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200107185807.606999-2-boris.brezillon@collabora.com commit 7a2a2231ef22cb158ea05e60ba6a6d329327a963 Author: Loic Poulain Date: Tue Jan 7 13:55:55 2020 +0100 arm64: dts: apq8096-db820c: Fix VDD core voltage APQ8096 has its VDD APC (Power for quad Kryo applications microprocessors) powered by PM8996 PMIC S9, S10, S11 tri-phase regulators (gang). The bootloader may have configured these regulators with non sustainable default values, leading to sporadic hangs under CPU stress tests (cpufreq-bench). Ideally we should enable voltage scaling along with frequency scaling, but for now just set the regulator gang value to a sane voltage, capable of supporting highest frequencies (turbo). Signed-off-by: Loic Poulain Link: https://lore.kernel.org/r/1578401755-26211-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Bjorn Andersson commit 5d0d4d42bed0090d3139e7c5ca1587d76d48add6 Author: Douglas Anderson Date: Thu Feb 14 09:36:33 2019 -0800 soc: qcom: rpmhpd: Set 'active_only' for active only power domains The 'active_only' attribute was accidentally never set to true for any power domains meaning that all the code handling this attribute was dead. NOTE that the RPM power domain code (as opposed to the RPMh one) gets this right. Acked-by: Rajendra Nayak Reviewed-by: Stephen Boyd Fixes: 279b7e8a62cc ("soc: qcom: rpmhpd: Add RPMh power domain driver") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20190214173633.211000-1-dianders@chromium.org Signed-off-by: Bjorn Andersson commit eac8ce86cb90ba96cb4bcbf2549d7a8b6938aa30 Author: Niklas Cassel Date: Mon Oct 14 14:09:20 2019 +0200 arm64: dts: qcom: qcs404-evb: Set vdd_apc regulator in high power mode vdd_apc is the regulator that supplies the main CPU cluster. At sudden CPU load changes, we have noticed invalid page faults on addresses with all bits shifted, as well as on addresses with individual bits flipped. By putting the vdd_apc regulator in high power mode, the voltage drops during sudden load changes will be less severe, and we have not been able to reproduce the invalid page faults with the regulator in this mode. Fixes: 8faea8edbb35 ("arm64: dts: qcom: qcs404-evb: add spmi regulators") Cc: stable@vger.kernel.org Suggested-by: Bjorn Andersson Signed-off-by: Niklas Cassel Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20191014120920.12691-1-niklas.cassel@linaro.org Signed-off-by: Bjorn Andersson commit c9ec155b5962233aff3df65210bd6a4788dee21c Author: Bjorn Andersson Date: Mon Nov 18 17:18:23 2019 -0800 arm64: dts: qcom: msm8998-mtp: Add alias for blsp1_uart3 The msm_serial driver has a predefined set of uart ports defined, which is allocated either by reading aliases or if no match is found a simple counter, starting at index 0. But there's no logic in place to prevent these two allocation mechanism from colliding. As a result either none or all of the active msm_serial instances must be listed as aliases. Define blsp1_uart3 as "serial1" to mitigate this problem. Fixes: 4cffb9f2c700 ("arm64: dts: qcom: msm8998-mtp: Enable bluetooth") Signed-off-by: Bjorn Andersson Reviewed-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20191119011823.379100-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 144d8f9781e60d89dfd614210d2cedbefbba8885 Author: Geert Uytterhoeven Date: Thu Jan 2 14:38:22 2020 +0100 spi: rspi: Add support for GPIO chip selects Add support for GPIO chip selects using GPIO descriptors. As the RSPI controller always drives a native chip select when performing a transfer, at least one native chip select must be left unused. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200102133822.29346-7-geert+renesas@glider.be Signed-off-by: Mark Brown commit 9815ed8714d26560d09b41f906b96a97f9bc3e3f Author: Geert Uytterhoeven Date: Thu Jan 2 14:38:21 2020 +0100 spi: rspi: Add support for multiple native chip selects RSPI variants on some SuperH or R-Mobile SoCs support multiple native chip selects. Add support for this by configuring the SSL Assert Signal Setting. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200102133822.29346-6-geert+renesas@glider.be Signed-off-by: Mark Brown commit 8f2344fa7f54382eeaf4b65d70c74b0b44df7a6b Author: Geert Uytterhoeven Date: Thu Jan 2 14:38:20 2020 +0100 spi: rspi: Remove set_config_register() macro The set_config_register() macro is used in a single place. Make the code easier to read by just removing it. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200102133822.29346-5-geert+renesas@glider.be Signed-off-by: Mark Brown commit 1bec84ddd85ae7a2b1df5fef3a5c7e5c44cbe36e Author: Geert Uytterhoeven Date: Thu Jan 2 14:38:19 2020 +0100 spi: rspi: Use dev_warn_once() instead of open-coding Use the helper introduced by commit e135303bd5bebcd2 ("device: Add dev__once variants") instead of open-coding the same operation. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200102133822.29346-4-geert+renesas@glider.be Signed-off-by: Mark Brown commit aa32f76e0a409adcd40ef11ed1ed668df8b034f6 Author: Geert Uytterhoeven Date: Thu Jan 2 14:38:18 2020 +0100 spi: sh-msiof: Convert to generic unused native cs handling. Currently the MSIOF SPI driver uses custom code to handle the unused native chip select with GPIO chip selects. Convert the driver to use the new generic handling in the SPI core. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200102133822.29346-3-geert+renesas@glider.be Signed-off-by: Mark Brown commit 7d93aecdb58d47e8ed90b4a44c0fc9ffb8de941c Author: Geert Uytterhoeven Date: Thu Jan 2 14:38:17 2020 +0100 spi: Add generic support for unused native cs with cs-gpios Some SPI master controllers always drive a native chip select when performing a transfer. Hence when using both native and GPIO chip selects, at least one native chip select must be left unused, to be driven when performing transfers with slave devices using GPIO chip selects. Currently, to find an unused native chip select, SPI controller drivers need to parse and process cs-gpios theirselves. This is not only duplicated in each driver that needs it, but also duplicates part of the work done later at SPI controller registration time. Note that this cannot be done after spi_register_controller() returns, as at that time, slave devices may have been probed already. Hence add generic support to the SPI subsystem for finding an unused native chip select. Optionally, this unused native chip select, and all other in-use native chip selects, can be validated against the maximum number of native chip selects available on the controller hardware. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200102133822.29346-2-geert+renesas@glider.be Signed-off-by: Mark Brown commit e9aa3b851428282d5e5151a49d4bf0bfdcd72bfe Author: Rayagonda Kokatanur Date: Tue Jan 7 09:39:12 2020 +0530 spi: bcm-qspi: Use platform_get_irq_byname_optional() to avoid error message Use platform_get_irq_byname_optional() instead of platform_get_irq_byname() to avoid below error message during probe: [3.265115] bcm_iproc 68c70200.spi: IRQ spi_lr_fullness_reached not found [3.272121] bcm_iproc 68c70200.spi: IRQ spi_lr_session_aborted not found [3.284965] bcm_iproc 68c70200.spi: IRQ spi_lr_impatient not found [3.291344] bcm_iproc 68c70200.spi: IRQ spi_lr_session_done not found [3.297992] bcm_iproc 68c70200.spi: IRQ mspi_done not found [3.303742] bcm_iproc 68c70200.spi: IRQ mspi_halted not found Signed-off-by: Rayagonda Kokatanur Link: https://lore.kernel.org/r/20200107040912.16426-1-rayagonda.kokatanur@broadcom.com Signed-off-by: Mark Brown commit d7cb6975f11ee4615c37a73144ca58a5ccf65894 Author: Chris Wilson Date: Tue Jan 7 17:28:42 2020 +0000 drm/i915/gt: Always force restore freshly pinned contexts It is highly unlikely, but still conceivable, that we submit a context with the same GGTT address as last active on the HW. In this case, with a matching LRCA, the HW would not restore the new context image causing a potential violation of our context isolation. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200107172842.3315449-1-chris@chris-wilson.co.uk commit 4444a1c10069e2f371fa497ba22feafafed5aada Author: Markus Reichl Date: Mon Jan 6 22:16:24 2020 +0100 regulator: mp8859: add driver The MP8859 from Monolithic Power Systems is a single output DC/DC converter. The voltage can be controlled via I2C. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/20200106211633.2882-2-m.reichl@fivetechno.de Signed-off-by: Mark Brown commit 599b10193c77e4b8a68192b3b277a01e8b467043 Author: Arnd Bergmann Date: Tue Jan 7 22:48:35 2020 +0100 ASoC: gtm601: fix build warning The driver produces warnings without CONFIG_OF, and makes no sense without it either: sound/soc/codecs/gtm601.c:50:34: error: 'bm818_dai' defined but not used [-Werror=unused-variable] static struct snd_soc_dai_driver bm818_dai = { ^~~~~~~~~ sound/soc/codecs/gtm601.c:32:34: error: 'gtm601_dai' defined but not used [-Werror=unused-variable] static struct snd_soc_dai_driver gtm601_dai = { ^~~~~~~~~~ Remove the #ifdef check to avoid the warning. Fixes: 057a317a8d94 ("ASoC: gtm601: add Broadmobi bm818 sound profile") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200107214846.1284981-1-arnd@arndb.de Signed-off-by: Mark Brown commit 490a625b01775857a9d00c623164e8aa0be762a2 Author: Pierre-Louis Bossart Date: Tue Jan 7 10:08:40 2020 -0600 ASoC: SOF: loader: add dynamic debug trace We currently have no trace referring to the firmware path, add a trace to help debug cases where the wrong file might be used. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200107160840.1524-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 46207ca24545540231ac8b4cf856baf1ca19e2fa Author: Pierre-Louis Bossart Date: Tue Jan 7 10:08:39 2020 -0600 ASoC: SOF: pci: change the default firmware path when the community key is used Since ApolloLake, Intel platforms require signed firmware. On all Windows platforms the default is to require the Intel production key be used. But some platforms allow for a community key to be used, which allows developers to compile/build their own firmware. In the linux-firmware tree, the default intel/sof path is used for firmwares signed for the production key, and files signed with the community key are located in intel/sof/community. Since we don't have an API to query which key is used on what platforms, we have to rely on DMI-based quirks. Developers can bypass this mechanism by setting a kernel 'fw_path' module parameter. Additional dynamic debug traces are provided to help debug cases where the wrong file might be used. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200107160840.1524-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 09a6d00a42ce0e63e2a15be3d070974bcc656ec7 Author: Yangtao Li Date: Tue Jan 7 16:56:11 2020 -0500 random: remove some dead code of poolinfo Since it is not being used, so delete it. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20190607182517.28266-5-tiny.windzz@gmail.com Signed-off-by: Theodore Ts'o commit 727d499a6f4f29b6abdb635032f5e53e5905aedb Author: Yangtao Li Date: Tue Jan 7 16:55:34 2020 -0500 random: fix typo in add_timer_randomness() s/entimate/estimate Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20190607182517.28266-4-tiny.windzz@gmail.com Signed-off-by: Theodore Ts'o commit 12cd53aff5ea0359b1dac91fcd9ddc7b9e646588 Author: Yangtao Li Date: Fri Jun 7 14:25:15 2019 -0400 random: Add and use pr_fmt() Prefix all printk/pr_ messages with "random: " to make the logging a bit more consistent. Miscellanea: o Convert a printks to pr_notice o Whitespace to align to open parentheses o Remove embedded "random: " from pr_* as pr_fmt adds it Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20190607182517.28266-3-tiny.windzz@gmail.com Signed-off-by: Theodore Ts'o commit 25418f9d4996c5fff8ad2bae88865643cd304dd0 Author: Johan Jonker Date: Tue Dec 31 18:50:54 2019 +0100 arm64: dts: rockchip: rk3399-hugsun-x99: remove supports-sd and supports-emmc options The entries "supports-sd" and "supports-emmc" are not a valid Linux option in relation with SD card or eMMC, so remove them. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20191231175054.4929-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 24bea4dfa367dc278da6549e0f98aa7412950003 Author: Johan Jonker Date: Tue Dec 31 20:11:54 2019 +0100 arm64: dts: rockchip: rk3399-firefly: remove num-slots from &sdio0 node The option "num-slots" was deprecated long time ago, so remove it. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20191231191154.5587-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 1f5e928340061bc9729c82591ec4379909e708d6 Author: Matthias Kaehlcke Date: Mon Jan 6 13:52:13 2020 -0800 ARM: dts: rockchip: Use ABI name for write protect pin on veyron fievel/tiger The flash write protect pin is currently named 'FW_WP_AP', which is how the signal is called in the schematics. The Chrome OS ABI requires the pin to be named 'AP_FLASH_WP_L', which is also how it is called on all other veyron devices. Rename the pin to match the ABI. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20200106135142.1.I3f99ac8399a564c88ff48ae6290cc691b47c16ae@changeid Signed-off-by: Heiko Stuebner commit 53ebeca24a8749f539f1957c5de07fdb031b09ed Author: Colin Ian King Date: Tue Jan 7 15:24:15 2020 +0000 net/rose: remove redundant assignment to variable failed The variable failed is being assigned a value that is never read, the following goto statement jumps to the end of the function and variable failed is not referenced at all. Remove the redundant assignment. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Dan Carpenter Signed-off-by: David S. Miller commit 1ece2fbe9b427d379455f18a874bcd3ab86a2419 Author: Vincent Cheng Date: Tue Jan 7 09:47:57 2020 -0500 ptp: clockmatrix: Rework clockmatrix version information. Simplify and fix the version information displayed by the driver. The new info better relects what is needed to support the hardware. Prev: Version: 4.8.0, Pipeline 22169 0x4001, Rev 0, Bond 5, CSR 311, IRQ 2 New: Version: 4.8.0, Id: 0x4001 Hw Rev: 5 OTP Config Select: 15 - Remove pipeline, CSR and IRQ because version x.y.z already incorporates this information. - Remove bond number because it is not used. - Remove rev number because register was not implemented, always 0 - Add HW Rev ID register to replace rev number - Add OTP config select to show the user configuration chosen by the configurable GPIO pins on start-up Signed-off-by: Vincent Cheng Signed-off-by: David S. Miller commit 4addbcb387c9519b320a9411cad68f0c01e9ed4b Author: YueHaibing Date: Tue Jan 7 22:14:54 2020 +0800 enetc: Fix inconsistent IS_ERR and PTR_ERR The proper pointer to be passed as argument is hw Detected using Coccinelle. Fixes: 6517798dd343 ("enetc: Make MDIO accessors more generic and export to include/linux/fsl") Signed-off-by: YueHaibing Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 0d6e5bfc9c5bc852d240cb35b0d850cdb660c4c9 Author: Dan Carpenter Date: Tue Jan 7 16:11:43 2020 +0300 enetc: Fix an off by one in enetc_setup_tc_txtime() The priv->tx_ring[] has 16 elements but only priv->num_tx_rings are set up, the rest are NULL. This ">" comparison should be ">=" to avoid a potential crash. Fixes: 0d08c9ec7d6e ("enetc: add support time specific departure base on the qos etf") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit cbefe2c95770a8b04bbe26a684f546c61d2ee8e6 Merge: c68d724826cd b053b28e93da Author: David S. Miller Date: Tue Jan 7 13:38:56 2020 -0800 Merge branch 'Documentation-stmmac-documentation-improvements' Jose Abreu says: ==================== Documentation: stmmac documentation improvements Converts stmmac documentation to RST format. 1) Adds missing entry of stmmac documentation to MAINTAINERS. 2) Converts stmmac documentation to RST format and adds some new info. 3) Adds the new RST file to the list of files. ==================== Signed-off-by: David S. Miller commit b053b28e93da37e6646aabd36a8ee19121fc53b0 Author: Jose Abreu Date: Tue Jan 7 11:37:20 2020 +0100 Documentation: networking: Add stmmac to device drivers list Add the stmmac RST file to the index. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 2ffebffbe7dc8fc966174eedee8fa76cb6143820 Author: Jose Abreu Date: Tue Jan 7 11:37:19 2020 +0100 Documentation: networking: Convert stmmac documentation to RST format Convert the documentation of the driver to RST format and delete the old txt and old information that no longer applies. Also, add some new information. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 1501125460faae8128519e90b84ed69fd15668fb Author: Jose Abreu Date: Tue Jan 7 11:37:18 2020 +0100 MAINTAINERS: Add stmmac Ethernet driver documentation entry Add the missing entry for the file that documents the stmicro Ethernet driver stmmac. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit c68d724826cd049f6408fa52bb0130641457aba1 Author: Chen Zhou Date: Tue Jan 7 17:33:46 2020 +0800 drivers: net: cisco_hdlc: use __func__ in debug message Use __func__ to print the function name instead of hard coded string. BTW, replace printk(KERN_DEBUG, ...) with netdev_dbg. Signed-off-by: Chen Zhou Signed-off-by: David S. Miller commit 12faac30d157970fdbfa171bbeb1fb88350303b1 Author: Yangtao Li Date: Fri Jun 7 14:25:14 2019 -0400 random: convert to ENTROPY_BITS for better code readability Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20190607182517.28266-2-tiny.windzz@gmail.com Signed-off-by: Theodore Ts'o commit 10332dc22089732854c28a9e6dc6bc5cad2eea69 Merge: 58cf542a1a9b 195234b8856e Author: David S. Miller Date: Tue Jan 7 13:30:36 2020 -0800 Merge branch 'net-ch9200-code-cleanup' Chen Zhou says: ==================== net: ch9200: code cleanup patch 1 introduce __func__ in debug message. patch 2 remove unnecessary return. ==================== Signed-off-by: David S. Miller commit 195234b8856e590624d2a15ff0258366fc81cfe2 Author: Chen Zhou Date: Tue Jan 7 17:28:56 2020 +0800 net: ch9200: remove unnecessary return The return is not needed, remove it. Signed-off-by: Chen Zhou Signed-off-by: David S. Miller commit e64dec834ed2aaa2e32d823cba2dd65ac53f9dc3 Author: Chen Zhou Date: Tue Jan 7 17:28:55 2020 +0800 net: ch9200: use __func__ in debug message Use __func__ to print the function name instead of hard coded string. Signed-off-by: Chen Zhou Signed-off-by: David S. Miller commit 870e05b1b18814911cb2703a977f447cb974f0f9 Author: Yangtao Li Date: Tue Jan 7 16:10:28 2020 -0500 random: remove unnecessary unlikely() WARN_ON() already contains an unlikely(), so it's not necessary to use unlikely. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20190607182517.28266-1-tiny.windzz@gmail.com Signed-off-by: Theodore Ts'o commit c95ea0c69ffda19381c116db2be23c7e654dac98 Author: Andy Lutomirski Date: Mon Dec 23 00:20:51 2019 -0800 random: remove kernel.random.read_wakeup_threshold It has no effect any more, so remove it. We can revert this if there is some user code that expects to be able to set this sysctl. Signed-off-by: Andy Lutomirski Link: https://lore.kernel.org/r/a74ed2cf0b5a5451428a246a9239f5bc4e29358f.1577088521.git.luto@kernel.org Signed-off-by: Theodore Ts'o commit 84df7cdfbb215a34657b39f4257dab739efa2df9 Author: Andy Lutomirski Date: Mon Dec 23 00:20:50 2019 -0800 random: delete code to pull data into pools There is no pool that pulls, so it was just dead code. Signed-off-by: Andy Lutomirski Link: https://lore.kernel.org/r/4a05fe0c7a5c831389ef4aea51d24528ac8682c7.1577088521.git.luto@kernel.org Signed-off-by: Theodore Ts'o commit 90ea1c6436d26e62496616fb5891e00819ff4849 Author: Andy Lutomirski Date: Mon Dec 23 00:20:49 2019 -0800 random: remove the blocking pool There is no longer any interface to read data from the blocking pool, so remove it. This enables quite a bit of code deletion, much of which will be done in subsequent patches. Signed-off-by: Andy Lutomirski Link: https://lore.kernel.org/r/511225a224bf0a291149d3c0b8b45393cd03ab96.1577088521.git.luto@kernel.org Signed-off-by: Theodore Ts'o commit 30c08efec8884fb106b8e57094baa51bb4c44e32 Author: Andy Lutomirski Date: Mon Dec 23 00:20:48 2019 -0800 random: make /dev/random be almost like /dev/urandom This patch changes the read semantics of /dev/random to be the same as /dev/urandom except that reads will block until the CRNG is ready. None of the cleanups that this enables have been done yet. As a result, this gives a warning about an unused function. Signed-off-by: Andy Lutomirski Link: https://lore.kernel.org/r/5e6ac8831c6cf2e56a7a4b39616d1732b2bdd06c.1577088521.git.luto@kernel.org Signed-off-by: Theodore Ts'o commit 48446f198f9adcb499b30332488dfd5bc3f176f6 Author: Andy Lutomirski Date: Mon Dec 23 00:20:47 2019 -0800 random: ignore GRND_RANDOM in getentropy(2) The separate blocking pool is going away. Start by ignoring GRND_RANDOM in getentropy(2). This should not materially break any API. Any code that worked without this change should work at least as well with this change. Signed-off-by: Andy Lutomirski Link: https://lore.kernel.org/r/705c5a091b63cc5da70c99304bb97e0109be0a26.1577088521.git.luto@kernel.org Signed-off-by: Theodore Ts'o commit 75551dbf112c992bc6c99a972990b3f272247e23 Author: Andy Lutomirski Date: Mon Dec 23 00:20:46 2019 -0800 random: add GRND_INSECURE to return best-effort non-cryptographic bytes Signed-off-by: Andy Lutomirski Link: https://lore.kernel.org/r/d5473b56cf1fa900ca4bd2b3fc1e5b8874399919.1577088521.git.luto@kernel.org Signed-off-by: Theodore Ts'o commit c6f1deb158789abba02a7eba600747843eeb3a57 Author: Andy Lutomirski Date: Mon Dec 23 00:20:45 2019 -0800 random: Add a urandom_read_nowait() for random APIs that don't warn /dev/random and getrandom() never warn. Split the meat of urandom_read() into urandom_read_nowarn() and leave the warning code in urandom_read(). This has no effect on kernel behavior, but it makes subsequent patches more straightforward. It also makes the fact that getrandom() never warns more obvious. Signed-off-by: Andy Lutomirski Link: https://lore.kernel.org/r/c87ab200588de746431d9f916501ef11e5242b13.1577088521.git.luto@kernel.org Signed-off-by: Theodore Ts'o commit 4c8d062186d9923c09488716b2fb1b829b5b8006 Author: Andy Lutomirski Date: Mon Dec 23 00:20:44 2019 -0800 random: Don't wake crng_init_wait when crng_init == 1 crng_init_wait is only used to wayt for crng_init to be set to 2, so there's no point to waking it when crng_init is set to 1. Remove the unnecessary wake_up_interruptible() call. Signed-off-by: Andy Lutomirski Link: https://lore.kernel.org/r/6fbc0bfcbfc1fa2c76fd574f5b6f552b11be7fde.1577088521.git.luto@kernel.org Signed-off-by: Theodore Ts'o commit 1b710b1b10eff9d46666064ea25f079f70bc67a8 Author: Sergey Senozhatsky Date: Wed Nov 13 16:16:25 2019 -0500 char/random: silence a lockdep splat with printk() Sergey didn't like the locking order, uart_port->lock -> tty_port->lock uart_write (uart_port->lock) __uart_start pl011_start_tx pl011_tx_chars uart_write_wakeup tty_port_tty_wakeup tty_port_default tty_port_tty_get (tty_port->lock) but those code is so old, and I have no clue how to de-couple it after checking other locks in the splat. There is an onging effort to make all printk() as deferred, so until that happens, workaround it for now as a short-term fix. LTP: starting iogen01 (export LTPROOT; rwtest -N iogen01 -i 120s -s read,write -Da -Dv -n 2 500b:$TMPDIR/doio.f1.$$ 1000b:$TMPDIR/doio.f2.$$) WARNING: possible circular locking dependency detected ------------------------------------------------------ doio/49441 is trying to acquire lock: ffff008b7cff7290 (&(&zone->lock)->rlock){..-.}, at: rmqueue+0x138/0x2050 but task is already holding lock: 60ff000822352818 (&pool->lock/1){-.-.}, at: start_flush_work+0xd8/0x3f0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&pool->lock/1){-.-.}: lock_acquire+0x320/0x360 _raw_spin_lock+0x64/0x80 __queue_work+0x4b4/0xa10 queue_work_on+0xac/0x11c tty_schedule_flip+0x84/0xbc tty_flip_buffer_push+0x1c/0x28 pty_write+0x98/0xd0 n_tty_write+0x450/0x60c tty_write+0x338/0x474 __vfs_write+0x88/0x214 vfs_write+0x12c/0x1a4 redirected_tty_write+0x90/0xdc do_loop_readv_writev+0x140/0x180 do_iter_write+0xe0/0x10c vfs_writev+0x134/0x1cc do_writev+0xbc/0x130 __arm64_sys_writev+0x58/0x8c el0_svc_handler+0x170/0x240 el0_sync_handler+0x150/0x250 el0_sync+0x164/0x180 -> #3 (&(&port->lock)->rlock){-.-.}: lock_acquire+0x320/0x360 _raw_spin_lock_irqsave+0x7c/0x9c tty_port_tty_get+0x24/0x60 tty_port_default_wakeup+0x1c/0x3c tty_port_tty_wakeup+0x34/0x40 uart_write_wakeup+0x28/0x44 pl011_tx_chars+0x1b8/0x270 pl011_start_tx+0x24/0x70 __uart_start+0x5c/0x68 uart_write+0x164/0x1c8 do_output_char+0x33c/0x348 n_tty_write+0x4bc/0x60c tty_write+0x338/0x474 redirected_tty_write+0xc0/0xdc do_loop_readv_writev+0x140/0x180 do_iter_write+0xe0/0x10c vfs_writev+0x134/0x1cc do_writev+0xbc/0x130 __arm64_sys_writev+0x58/0x8c el0_svc_handler+0x170/0x240 el0_sync_handler+0x150/0x250 el0_sync+0x164/0x180 -> #2 (&port_lock_key){-.-.}: lock_acquire+0x320/0x360 _raw_spin_lock+0x64/0x80 pl011_console_write+0xec/0x2cc console_unlock+0x794/0x96c vprintk_emit+0x260/0x31c vprintk_default+0x54/0x7c vprintk_func+0x218/0x254 printk+0x7c/0xa4 register_console+0x734/0x7b0 uart_add_one_port+0x734/0x834 pl011_register_port+0x6c/0xac sbsa_uart_probe+0x234/0x2ec platform_drv_probe+0xd4/0x124 really_probe+0x250/0x71c driver_probe_device+0xb4/0x200 __device_attach_driver+0xd8/0x188 bus_for_each_drv+0xbc/0x110 __device_attach+0x120/0x220 device_initial_probe+0x20/0x2c bus_probe_device+0x54/0x100 device_add+0xae8/0xc2c platform_device_add+0x278/0x3b8 platform_device_register_full+0x238/0x2ac acpi_create_platform_device+0x2dc/0x3a8 acpi_bus_attach+0x390/0x3cc acpi_bus_attach+0x108/0x3cc acpi_bus_attach+0x108/0x3cc acpi_bus_attach+0x108/0x3cc acpi_bus_scan+0x7c/0xb0 acpi_scan_init+0xe4/0x304 acpi_init+0x100/0x114 do_one_initcall+0x348/0x6a0 do_initcall_level+0x190/0x1fc do_basic_setup+0x34/0x4c kernel_init_freeable+0x19c/0x260 kernel_init+0x18/0x338 ret_from_fork+0x10/0x18 -> #1 (console_owner){-...}: lock_acquire+0x320/0x360 console_lock_spinning_enable+0x6c/0x7c console_unlock+0x4f8/0x96c vprintk_emit+0x260/0x31c vprintk_default+0x54/0x7c vprintk_func+0x218/0x254 printk+0x7c/0xa4 get_random_u64+0x1c4/0x1dc shuffle_pick_tail+0x40/0xac __free_one_page+0x424/0x710 free_one_page+0x70/0x120 __free_pages_ok+0x61c/0xa94 __free_pages_core+0x1bc/0x294 memblock_free_pages+0x38/0x48 __free_pages_memory+0xcc/0xfc __free_memory_core+0x70/0x78 free_low_memory_core_early+0x148/0x18c memblock_free_all+0x18/0x54 mem_init+0xb4/0x17c mm_init+0x14/0x38 start_kernel+0x19c/0x530 -> #0 (&(&zone->lock)->rlock){..-.}: validate_chain+0xf6c/0x2e2c __lock_acquire+0x868/0xc2c lock_acquire+0x320/0x360 _raw_spin_lock+0x64/0x80 rmqueue+0x138/0x2050 get_page_from_freelist+0x474/0x688 __alloc_pages_nodemask+0x3b4/0x18dc alloc_pages_current+0xd0/0xe0 alloc_slab_page+0x2b4/0x5e0 new_slab+0xc8/0x6bc ___slab_alloc+0x3b8/0x640 kmem_cache_alloc+0x4b4/0x588 __debug_object_init+0x778/0x8b4 debug_object_init_on_stack+0x40/0x50 start_flush_work+0x16c/0x3f0 __flush_work+0xb8/0x124 flush_work+0x20/0x30 xlog_cil_force_lsn+0x88/0x204 [xfs] xfs_log_force_lsn+0x128/0x1b8 [xfs] xfs_file_fsync+0x3c4/0x488 [xfs] vfs_fsync_range+0xb0/0xd0 generic_write_sync+0x80/0xa0 [xfs] xfs_file_buffered_aio_write+0x66c/0x6e4 [xfs] xfs_file_write_iter+0x1a0/0x218 [xfs] __vfs_write+0x1cc/0x214 vfs_write+0x12c/0x1a4 ksys_write+0xb0/0x120 __arm64_sys_write+0x54/0x88 el0_svc_handler+0x170/0x240 el0_sync_handler+0x150/0x250 el0_sync+0x164/0x180 other info that might help us debug this: Chain exists of: &(&zone->lock)->rlock --> &(&port->lock)->rlock --> &pool->lock/1 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&pool->lock/1); lock(&(&port->lock)->rlock); lock(&pool->lock/1); lock(&(&zone->lock)->rlock); *** DEADLOCK *** 4 locks held by doio/49441: #0: a0ff00886fc27408 (sb_writers#8){.+.+}, at: vfs_write+0x118/0x1a4 #1: 8fff00080810dfe0 (&xfs_nondir_ilock_class){++++}, at: xfs_ilock+0x2a8/0x300 [xfs] #2: ffff9000129f2390 (rcu_read_lock){....}, at: rcu_lock_acquire+0x8/0x38 #3: 60ff000822352818 (&pool->lock/1){-.-.}, at: start_flush_work+0xd8/0x3f0 stack backtrace: CPU: 48 PID: 49441 Comm: doio Tainted: G W Hardware name: HPE Apollo 70 /C01_APACHE_MB , BIOS L50_5.13_1.11 06/18/2019 Call trace: dump_backtrace+0x0/0x248 show_stack+0x20/0x2c dump_stack+0xe8/0x150 print_circular_bug+0x368/0x380 check_noncircular+0x28c/0x294 validate_chain+0xf6c/0x2e2c __lock_acquire+0x868/0xc2c lock_acquire+0x320/0x360 _raw_spin_lock+0x64/0x80 rmqueue+0x138/0x2050 get_page_from_freelist+0x474/0x688 __alloc_pages_nodemask+0x3b4/0x18dc alloc_pages_current+0xd0/0xe0 alloc_slab_page+0x2b4/0x5e0 new_slab+0xc8/0x6bc ___slab_alloc+0x3b8/0x640 kmem_cache_alloc+0x4b4/0x588 __debug_object_init+0x778/0x8b4 debug_object_init_on_stack+0x40/0x50 start_flush_work+0x16c/0x3f0 __flush_work+0xb8/0x124 flush_work+0x20/0x30 xlog_cil_force_lsn+0x88/0x204 [xfs] xfs_log_force_lsn+0x128/0x1b8 [xfs] xfs_file_fsync+0x3c4/0x488 [xfs] vfs_fsync_range+0xb0/0xd0 generic_write_sync+0x80/0xa0 [xfs] xfs_file_buffered_aio_write+0x66c/0x6e4 [xfs] xfs_file_write_iter+0x1a0/0x218 [xfs] __vfs_write+0x1cc/0x214 vfs_write+0x12c/0x1a4 ksys_write+0xb0/0x120 __arm64_sys_write+0x54/0x88 el0_svc_handler+0x170/0x240 el0_sync_handler+0x150/0x250 el0_sync+0x164/0x180 Reviewed-by: Sergey Senozhatsky Signed-off-by: Qian Cai Link: https://lore.kernel.org/r/1573679785-21068-1-git-send-email-cai@lca.pw Signed-off-by: Theodore Ts'o commit 58cf542a1a9b866de19fd64b3920d0da496352c0 Merge: 5528e0d7f151 6be1a5ce1b39 Author: David S. Miller Date: Tue Jan 7 13:05:06 2020 -0800 Merge branch 'ionic-driver-updates' Shannon Nelson says: ==================== ionic: driver updates These are a few little updates for the ionic network driver. v2: dropped IBM msi patch added fix for a compiler warning ==================== Signed-off-by: David S. Miller commit 6be1a5ce1b39b43294a8eda9ba5254792decb15e Author: Shannon Nelson Date: Mon Jan 6 19:43:49 2020 -0800 ionic: clear compiler warning on hb use before set Build checks have pointed out that 'hb' can theoretically be used before set, so let's initialize it and get rid of the compiler complaint. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit c37d6e3f25cf95cdefaa51eaad699382f34cdd0c Author: Shannon Nelson Date: Mon Jan 6 19:43:48 2020 -0800 ionic: restrict received packets to mtu size Make sure the NIC drops packets that are larger than the specified MTU. The front end of the NIC will accept packets larger than MTU and will copy all the data it can to fill up the driver's posted buffers - if the buffers are not long enough the packet will then get dropped. With the Rx SG buffers allocagted as full pages, we are currently setting up more space than MTU size available and end up receiving some packets that are larger than MTU, up to the size of buffers posted. To be sure the NIC doesn't waste our time with oversized packets we need to lie a little in the SG descriptor about how long is the last SG element. At dealloc time, we know the allocation was a page, so the deallocation doesn't care about what length we put in the descriptor. Signed-off-by: Shannon Nelson Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 24cfa8c76278d48fe521a363b74e36861b4462d6 Author: Shannon Nelson Date: Mon Jan 6 19:43:47 2020 -0800 ionic: add Rx dropped packet counter Add a counter for packets dropped by the driver, typically for bad size or a receive error seen by the device. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 3daca28f15f5e70ae54859abd66dcdb6be31ba91 Author: Shannon Nelson Date: Mon Jan 6 19:43:46 2020 -0800 ionic: drop use of subdevice tags The subdevice concept is not being used in the driver, so drop the references to it. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 60262b10a96bb186049f1eca4849ccbb2e81f253 Author: Lijun Ou Date: Mon Jan 6 20:21:16 2020 +0800 RDMA/hns: Fix coding style issues Fix some coding style issuses without changing logic of codes, most of the modification is unreasonable line breaks and alignments. Link: https://lore.kernel.org/r/1578313276-29080-8-git-send-email-liweihang@huawei.com Signed-off-by: Lijun Ou Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 292f3e496be0cac933dfa86e9d0bea5d96224c14 Author: Dingchen Zhang Date: Fri Jul 26 13:37:43 2019 -0400 drm: Set crc->opened to false before setting crc source to NULL. to terminate the while-loop in drm_dp_aux_crc_work when drm_dp_start/stop_crc are called in the hook to set crc source. v3: set crc->opened to false without checking (Nick) v2: Move spin_lock around entire crc->opened use (Daniel) Cc: Daniel Vetter Cc: Harry Wentland Cc: Nick Kazlauskas Signed-off-by: Dingchen Zhang Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190726173743.11641-1-dingchen.zhang@amd.com commit 72a848f5c46bab4c921edc9cbffd1ab273b2be17 Author: Dingchen Zhang Date: Mon Jun 10 09:47:51 2019 -0400 drm: remove the newline for CRC source name. userspace may transfer a newline, and this terminating newline is replaced by a '\0' to avoid followup issues. 'len-1' is the index to replace the newline of CRC source name. v3: typo fix (Sam) v2: update patch subject, body and format. (Sam) Cc: Leo Li Cc: Harry Wentland Cc: Sam Ravnborg Signed-off-by: Dingchen Zhang Reviewed-by: Sam Ravnborg Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20190610134751.14356-1-dingchen.zhang@amd.com commit d800c93bacc7a9c381b5fa9c333fb821ba9df9df Author: Wenpeng Liang Date: Mon Jan 6 20:21:15 2020 +0800 RDMA/hns: Replace custom macros HNS_ROCE_ALIGN_UP HNS_ROCE_ALIGN_UP can be replaced by round_up() which is defined in kernel.h. Link: https://lore.kernel.org/r/1578313276-29080-7-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 0c53426c7c1a4ad1b2fc647a7085b5d3e7b49025 Author: Yixing Liu Date: Mon Jan 6 20:21:14 2020 +0800 RDMA/hns: Remove redundant print information There are already necessary prints in outer function, prints in hns_roce_function_clear() may confuse users. So these prints is removed. Link: https://lore.kernel.org/r/1578313276-29080-6-git-send-email-liweihang@huawei.com Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 032b0574161fdd381220de7cfd26ad3cb284cbc0 Author: Lijun Ou Date: Mon Jan 6 20:21:13 2020 +0800 RDMA/hns: Delete unnessary parameters in hns_roce_v2_qp_modify() Current state and new state of qp won't be configured when modifying qp, so these two redundant parameters should be removed. Link: https://lore.kernel.org/r/1578313276-29080-5-git-send-email-liweihang@huawei.com Signed-off-by: Lijun Ou Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 5e049a5d6c83b8a4aea70f02d4fd81f592a2cb49 Author: Lijun Ou Date: Mon Jan 6 20:21:12 2020 +0800 RDMA/hns: Update the value of qp type The values used to represent service type of RC and UD should be interchanged according to design of hardware. And it's better to define these types in enumeration than macros. Link: https://lore.kernel.org/r/1578313276-29080-4-git-send-email-liweihang@huawei.com Signed-off-by: Lijun Ou Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 58e4fc11c1a56756a3fb45a10d5cb09bb68b3030 Author: Lijun Ou Date: Mon Jan 6 20:21:11 2020 +0800 RDMA/hns: Remove unused function hns_roce_init_eq_table() hns_roce_init_eq_table() is an unused function that only retains its declaration in driver. Link: https://lore.kernel.org/r/1578313276-29080-3-git-send-email-liweihang@huawei.com Signed-off-by: Lijun Ou Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit eca44507c3e908b7362696a4d6a11d90371334c6 Author: Wenpeng Liang Date: Mon Jan 6 20:21:10 2020 +0800 RDMA/hns: Avoid printing address of mtt page Address of a page shouldn't be printed in case of security issues. Link: https://lore.kernel.org/r/1578313276-29080-2-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 622db5b6439ab4d28a44d2d49d58050e59cac781 Author: Chuck Lever Date: Wed Dec 18 15:18:20 2019 -0500 RDMA/core: Add trace points to follow MR allocation Track the lifetime of ib_mr objects. Here's sample output from a test run with NFS/RDMA: <...>-361 [009] 79238.772782: mr_alloc: pd.id=3 mr.id=11 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79238.772812: mr_alloc: pd.id=3 mr.id=12 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79238.772839: mr_alloc: pd.id=3 mr.id=13 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79238.772866: mr_alloc: pd.id=3 mr.id=14 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79238.772893: mr_alloc: pd.id=3 mr.id=15 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79238.772921: mr_alloc: pd.id=3 mr.id=16 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79238.772947: mr_alloc: pd.id=3 mr.id=17 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79238.772974: mr_alloc: pd.id=3 mr.id=18 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79238.773001: mr_alloc: pd.id=3 mr.id=19 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79238.773028: mr_alloc: pd.id=3 mr.id=20 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79238.773055: mr_alloc: pd.id=3 mr.id=21 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79240.270942: mr_alloc: pd.id=3 mr.id=22 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79240.270975: mr_alloc: pd.id=3 mr.id=23 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79240.271007: mr_alloc: pd.id=3 mr.id=24 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79240.271036: mr_alloc: pd.id=3 mr.id=25 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79240.271067: mr_alloc: pd.id=3 mr.id=26 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79240.271095: mr_alloc: pd.id=3 mr.id=27 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79240.271121: mr_alloc: pd.id=3 mr.id=28 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79240.271153: mr_alloc: pd.id=3 mr.id=29 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79240.271181: mr_alloc: pd.id=3 mr.id=30 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79240.271208: mr_alloc: pd.id=3 mr.id=31 type=MEM_REG max_num_sg=30 rc=0 <...>-361 [009] 79240.271236: mr_alloc: pd.id=3 mr.id=32 type=MEM_REG max_num_sg=30 rc=0 <...>-4351 [001] 79242.299400: mr_dereg: mr.id=32 <...>-4351 [001] 79242.299467: mr_dereg: mr.id=31 <...>-4351 [001] 79242.299554: mr_dereg: mr.id=30 <...>-4351 [001] 79242.299615: mr_dereg: mr.id=29 <...>-4351 [001] 79242.299684: mr_dereg: mr.id=28 <...>-4351 [001] 79242.299748: mr_dereg: mr.id=27 <...>-4351 [001] 79242.299812: mr_dereg: mr.id=26 <...>-4351 [001] 79242.299874: mr_dereg: mr.id=25 <...>-4351 [001] 79242.299944: mr_dereg: mr.id=24 <...>-4351 [001] 79242.300009: mr_dereg: mr.id=23 <...>-4351 [001] 79242.300190: mr_dereg: mr.id=22 <...>-4351 [001] 79242.300263: mr_dereg: mr.id=21 <...>-4351 [001] 79242.300326: mr_dereg: mr.id=20 <...>-4351 [001] 79242.300388: mr_dereg: mr.id=19 <...>-4351 [001] 79242.300450: mr_dereg: mr.id=18 <...>-4351 [001] 79242.300516: mr_dereg: mr.id=17 <...>-4351 [001] 79242.300629: mr_dereg: mr.id=16 <...>-4351 [001] 79242.300718: mr_dereg: mr.id=15 <...>-4351 [001] 79242.300784: mr_dereg: mr.id=14 <...>-4351 [001] 79242.300879: mr_dereg: mr.id=13 <...>-4351 [001] 79242.300945: mr_dereg: mr.id=12 <...>-4351 [001] 79242.301012: mr_dereg: mr.id=11 Some features of the output: - The lifetime and owner PD of each MR is clearly visible. - The type of MR is captured, as is the SGE array size. - Failing MR allocation can be recorded. Link: https://lore.kernel.org/r/20191218201820.30584.34636.stgit@manet.1015granger.net Signed-off-by: Chuck Lever Signed-off-by: Jason Gunthorpe commit 3e5901cbfcc15da54f6ad148add754e7a2b2a558 Author: Chuck Lever Date: Wed Dec 18 15:18:15 2019 -0500 RDMA/core: Trace points for diagnosing completion queue issues Sample trace events: kworker/u29:0-300 [007] 120.042217: cq_alloc: cq.id=4 nr_cqe=161 comp_vector=2 poll_ctx=WORKQUEUE -0 [002] 120.056292: cq_schedule: cq.id=4 kworker/2:1H-482 [002] 120.056402: cq_process: cq.id=4 wake-up took 109 [us] from interrupt kworker/2:1H-482 [002] 120.056407: cq_poll: cq.id=4 requested 16, returned 1 -0 [002] 120.067503: cq_schedule: cq.id=4 kworker/2:1H-482 [002] 120.067537: cq_process: cq.id=4 wake-up took 34 [us] from interrupt kworker/2:1H-482 [002] 120.067541: cq_poll: cq.id=4 requested 16, returned 1 -0 [002] 120.067657: cq_schedule: cq.id=4 kworker/2:1H-482 [002] 120.067672: cq_process: cq.id=4 wake-up took 15 [us] from interrupt kworker/2:1H-482 [002] 120.067674: cq_poll: cq.id=4 requested 16, returned 1 ... systemd-1 [002] 122.392653: cq_schedule: cq.id=4 kworker/2:1H-482 [002] 122.392688: cq_process: cq.id=4 wake-up took 35 [us] from interrupt kworker/2:1H-482 [002] 122.392693: cq_poll: cq.id=4 requested 16, returned 16 kworker/2:1H-482 [002] 122.392836: cq_poll: cq.id=4 requested 16, returned 16 kworker/2:1H-482 [002] 122.392970: cq_poll: cq.id=4 requested 16, returned 16 kworker/2:1H-482 [002] 122.393083: cq_poll: cq.id=4 requested 16, returned 16 kworker/2:1H-482 [002] 122.393195: cq_poll: cq.id=4 requested 16, returned 3 Several features to note in this output: - The WCE count and context type are reported at allocation time - The CPU and kworker for each CQ is evident - The CQ's restracker ID is tagged on each trace event - CQ poll scheduling latency is measured - Details about how often single completions occur versus multiple completions are evident - The cost of the ULP's completion handler is recorded Link: https://lore.kernel.org/r/20191218201815.30584.3481.stgit@manet.1015granger.net Signed-off-by: Chuck Lever Reviewed-by: Parav Pandit Signed-off-by: Jason Gunthorpe commit ed999f820a6c579298b53270656a0a26c8a6cb87 Author: Chuck Lever Date: Wed Dec 18 15:18:10 2019 -0500 RDMA/cma: Add trace points in RDMA Connection Manager Record state transitions as each connection is established. The IP address of both peers and the Type of Service is reported. These trace points are not in performance hot paths. Also, record each cm_event_handler call to ULPs. This eliminates the need for each ULP to add its own similar trace point in its CM event handler function. These new trace points appear in a new trace subsystem called "rdma_cma". Sample events: <...>-220 [004] 121.430733: cm_id_create: cm.id=0 <...>-472 [003] 121.430991: cm_event_handler: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 ADDR_RESOLVED (0/0) <...>-472 [003] 121.430995: cm_event_done: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 result=0 <...>-472 [003] 121.431172: cm_event_handler: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 ROUTE_RESOLVED (2/0) <...>-472 [003] 121.431174: cm_event_done: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 result=0 <...>-220 [004] 121.433480: cm_qp_create: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 pd.id=2 qp_type=RC send_wr=4091 recv_wr=256 qp_num=521 rc=0 <...>-220 [004] 121.433577: cm_send_req: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 qp_num=521 kworker/1:2-973 [001] 121.436190: cm_send_mra: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 kworker/1:2-973 [001] 121.436340: cm_send_rtu: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 kworker/1:2-973 [001] 121.436359: cm_event_handler: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 ESTABLISHED (9/0) kworker/1:2-973 [001] 121.436365: cm_event_done: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 result=0 <...>-1975 [005] 123.161954: cm_disconnect: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 <...>-1975 [005] 123.161974: cm_sent_dreq: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 <...>-220 [004] 123.162102: cm_disconnect: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 kworker/0:1-13 [000] 123.162391: cm_event_handler: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 DISCONNECTED (10/0) kworker/0:1-13 [000] 123.162393: cm_event_done: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 result=0 <...>-220 [004] 123.164456: cm_qp_destroy: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 qp_num=521 <...>-220 [004] 123.165290: cm_id_destroy: cm.id=0 src=192.168.2.51:35090 dst=192.168.2.55:20049 tos=0 Some features to note: - restracker ID of the rdma_cm_id is tagged on each trace event - The source and destination IP addresses and TOS are reported - CM event upcalls are shown with decoded event and status - CM state transitions are reported - rdma_cm_id lifetime events are captured - The latency of ULP CM event handlers is reported - Lifetime events of associated QPs are reported - Device removal and insertion is reported This patch is based on previous work by: Saeed Mahameed Mukesh Kacker Ajaykumar Hotchandani Aron Silverton Avinash Repaka Somasundaram Krishnasamy Link: https://lore.kernel.org/r/20191218201810.30584.3052.stgit@manet.1015granger.net Signed-off-by: Chuck Lever Signed-off-by: Jason Gunthorpe commit 7a49de995ebbd8711d52d6a3806faa8c5db0eac1 Author: Julia Lawall Date: Sun Dec 29 16:42:57 2019 +0100 vfio/spapr_tce: use mmgrab Mmgrab was introduced in commit f1f1007644ff ("mm: add new mmgrab() helper") and most of the kernel was updated to use it. Update a remaining file. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) @@ expression e; @@ - atomic_inc(&e->mm_count); + mmgrab(e); Signed-off-by: Julia Lawall Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit bb3d3cf928d4cc450aa817a9c71f4324ec68fd63 Author: Julia Lawall Date: Sun Dec 29 16:42:56 2019 +0100 vfio: vfio_pci_nvlink2: use mmgrab Mmgrab was introduced in commit f1f1007644ff ("mm: add new mmgrab() helper") and most of the kernel was updated to use it. Update a remaining file. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) @@ expression e; @@ - atomic_inc(&e->mm_count); + mmgrab(e); Signed-off-by: Julia Lawall Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit 0536309373e3e0e4c558f45dad272fcfb8b48fa9 Author: Krzysztof Kozlowski Date: Sat Jan 4 16:20:56 2020 +0100 memory: samsung: Rename Exynos to lowercase Fix up inconsistent usage of upper and lowercase letters in "Exynos" name. "EXYNOS" is not an abbreviation but a regular trademarked name. Therefore it should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Signed-off-by: Krzysztof Kozlowski commit 945005409bfb55398d70c56178972d3750529dd6 Author: Krzysztof Kozlowski Date: Sat Jan 4 16:20:52 2020 +0100 soc: samsung: Rename Samsung and Exynos to lowercase Fix up inconsistent usage of upper and lowercase letters in "Samsung" and "Exynos" names. "SAMSUNG" and "EXYNOS" are not abbreviations but regular trademarked names. Therefore they should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Although advertisement materials usually use uppercase "SAMSUNG", the lowercase version is used in all legal aspects (e.g. on Wikipedia and in privacy/legal statements on https://www.samsung.com/semiconductor/privacy-global/). Signed-off-by: Krzysztof Kozlowski commit ce258cfe41237cd23e8314bc5adcc06ae734de88 Author: Krzysztof Kozlowski Date: Sat Jan 4 16:20:50 2020 +0100 ARM: dts: samsung: Rename Samsung and Exynos to lowercase Fix up inconsistent usage of upper and lowercase letters in "Samsung" and "Exynos" names. "SAMSUNG" and "EXYNOS" are not abbreviations but regular trademarked names. Therefore they should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Although advertisement materials usually use uppercase "SAMSUNG", the lowercase version is used in all legal aspects (e.g. on Wikipedia and in privacy/legal statements on https://www.samsung.com/semiconductor/privacy-global/). Signed-off-by: Krzysztof Kozlowski commit 45984f0c70ccc03e09f97ee5d0749396547b6594 Author: Krzysztof Kozlowski Date: Sat Jan 4 16:20:51 2020 +0100 ARM: samsung: Rename Samsung and Exynos to lowercase Fix up inconsistent usage of upper and lowercase letters in "Samsung" and "Exynos" names. "SAMSUNG" and "EXYNOS" are not abbreviations but regular trademarked names. Therefore they should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Although advertisement materials usually use uppercase "SAMSUNG", the lowercase version is used in all legal aspects (e.g. on Wikipedia and in privacy/legal statements on https://www.samsung.com/semiconductor/privacy-global/). Signed-off-by: Krzysztof Kozlowski commit ad097ab061b00bcf2e0666b74828323c20c87b3a Author: Krzysztof Kozlowski Date: Fri Jan 3 17:52:08 2020 +0100 ARM: exynos: Correct the help text for platform Kconfig option ARCH_EXYNOS option is used for entire ARMv7 Exynos family, including also Exynos3 SoCs. Signed-off-by: Krzysztof Kozlowski commit 2c86e55d2ab55b036d901384eae43fdae4487459 Author: Matthew Auld Date: Tue Jan 7 13:40:09 2020 +0000 drm/i915/gtt: split up i915_gem_gtt Attempt to split i915_gem_gtt.[ch] into more manageable chunks. Suggested-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200107134009.3255354-1-chris@chris-wilson.co.uk commit c35a024f8eecc34c37ba73fa095e39dabfe5ee75 Author: Andrzej Pietrasiewicz Date: Thu Jan 2 14:23:00 2020 +0100 drm: zte: Provide ddc symlink in vga connector sysfs directory Use the ddc pointer provided by the generic connector. Signed-off-by: Andrzej Pietrasiewicz Acked-by: Sam Ravnborg Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200102132300.24309-5-andrzej.p@collabora.com commit a339fa5de0f3d328c3bbc489b8999f98cc3b318e Author: Andrzej Pietrasiewicz Date: Thu Jan 2 14:22:59 2020 +0100 drm: zte: Provide ddc symlink in hdmi connector sysfs directory Use the ddc pointer provided by the generic connector. Signed-off-by: Andrzej Pietrasiewicz Acked-by: Sam Ravnborg Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200102132300.24309-4-andrzej.p@collabora.com commit 04a880fb06b90708b692c11a4fd2b3761514b811 Author: Andrzej Pietrasiewicz Date: Thu Jan 2 14:22:58 2020 +0100 drm/vc4: Provide ddc symlink in connector sysfs directory Use the ddc pointer provided by the generic connector. Signed-off-by: Andrzej Pietrasiewicz Acked-by: Sam Ravnborg Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200102132300.24309-3-andrzej.p@collabora.com commit e052860d11810f085c1fff88057241243baef08f Merge: 785ca50f8e61 9fc85a7124b5 Author: Olof Johansson Date: Tue Jan 7 11:25:28 2020 -0800 Merge tag 'omap-for-v5.6/ti-sysc-drop-pdata-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Drop more legacy platform data for omaps for v5.6 merge window We can now probe devices with ti-sysc interconnect driver and dts data, and can continue dropping the related platform data and custom ti,hwmods dts property for various devices. And related to that, we finally can remove the legacy sdma support in favor of using the dmaengine driver only. I was planning to send the sdma changes separately, but that would have produced a pile of pointless merge conflicts, so I decided it's best to resolve it locally. After all, the sdma series also ends up removing the related platform data. Note that this series is based on omap-for-v5.6/ti-sysc-dt-signed branch as it depends for dts data being in place. * tag 'omap-for-v5.6/ti-sysc-drop-pdata-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (56 commits) ARM: OMAP2+: Drop legacy platform data for sdma ARM: OMAP2+: Drop legacy init for sdma dmaengine: ti: omap-dma: Use cpu notifier to block idle for omap2 dmaengine: ti: omap-dma: Allocate channels directly dmaengine: ti: omap-dma: Pass sdma auxdata to driver and use it dmaengine: ti: omap-dma: Configure global priority register directly ARM: OMAP5: hwmod-data: remove OMAP5 IOMMU hwmod data ARM: OMAP4: hwmod-data: remove OMAP4 IOMMU hwmod data ARM: OMAP2+: Drop legacy platform data for omap4 fdif ARM: OMAP2+: Drop legacy platform data for omap4 slimbus ARM: OMAP2+: Drop legacy platform data for omap5 kbd ARM: OMAP2+: Drop legacy platform data for omap4 kbd ARM: OMAP2+: Drop legacy platform data for dra7 smartreflex ARM: OMAP2+: Drop legacy platform data for omap4 smartreflex ARM: OMAP2+: Drop legacy platform data for omap4 hsi ARM: OMAP2+: Drop legacy platform data for am4 vpfe ARM: OMAP2+: Drop legacy platform data for dra7 ocp2scp ARM: OMAP2+: Drop legacy platform data for omap5 ocp2scp ARM: OMAP2+: Drop legacy platform data for omap4 ocp2scp ARM: OMAP2+: Drop legacy platform data for am4 ocp2scp ... Link: https://lore.kernel.org/r/pull-1578420398-290837@atomide.com-4 Signed-off-by: Olof Johansson commit bb9d681b2508bb46e83307e61e299254eaea1233 Author: Andrzej Pietrasiewicz Date: Thu Jan 2 14:22:57 2020 +0100 drm/tegra: Provide ddc symlink in output connector sysfs directory Use the ddc pointer provided by the generic connector. Signed-off-by: Andrzej Pietrasiewicz Acked-by: Sam Ravnborg Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200102132300.24309-2-andrzej.p@collabora.com commit 785ca50f8e616b27417436fac517687a81fff5b0 Merge: 8a6c3e88bb7a 4601832f4050 Author: Olof Johansson Date: Tue Jan 7 11:22:43 2020 -0800 Merge branch 'omap/soc' into arm/dt Bringing in to resolve soc -> add/add conflicts locally * omap/soc: ARM: OMAP2+: use separate IOMMU pdata to fix DRA7 IPU1 boot ARM: OMAP2+: omap-iommu.c conversion to ti-sysc ARM: OMAP2+: Add workaround for DRA7 DSP MStandby errata i879 ARM: OMAP4+: remove pdata quirks for omap4+ iommus ARM: OMAP2+: pdata-quirks: add PRM data for reset support ARM: OMAP2+: am43xx: Add lcdc clockdomain Signed-off-by: Olof Johansson commit 8a6c3e88bb7aae4ef2bd88057531c34aa5d5574a Merge: 3f9c6a6d9056 d71b48236c83 Author: Olof Johansson Date: Tue Jan 7 11:16:51 2020 -0800 Merge tag 'omap-for-v5.6/ti-sysc-dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt dts changes for omaps for ti-sysc driver for v5.6 merge window Devicetree changes for omaps to configure more devices to probe with ti-sysc interconnect target module: - Configure am4 qspi - Configure aes, des and sham accelerators for am3, 4 and dra7 - Configure iommus for omap4, 5 and dra7 - Add a generic compatible for sdma, and configure omap2 and 3 sdma * tag 'omap-for-v5.6/ti-sysc-dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (24 commits) ARM: dts: omap5: convert IOMMUs to use ti-sysc ARM: dts: omap4: convert IOMMUs to use ti-sysc ARM: dts: dra74x: convert IOMMUs to use ti-sysc ARM: dts: dra7: convert IOMMUs to use ti-sysc ARM: dts: Configure interconnect target module for dra7 des ARM: dts: Configure interconnect target module for am4 des ARM: dts: Configure interconnect target module for dra7 aes ARM: dts: Configure interconnect target module for am4 aes ARM: dts: Configure interconnect target module for am3 aes ARM: dts: Configure interconnect target module for dra7 sham ARM: dts: Configure interconnect target module for am4 sham ARM: dts: Configure interconnect target module for am3 sham ARM: dts: Configure interconnect target module for am4 qspi ARM: dts: Configure interconnect target module for omap3 sdma ARM: dts: Configure interconnect target module for omap2 sdma ARM: dts: Add generic compatible for omap sdma instances bus: ti-sysc: Fix iterating over clocks ARM: OMAP2+: Fix ti_sysc_find_one_clockdomain to check for to_clk_hw_omap bus: ti-sysc: Fix missing reset delay handling ARM: dts: am437x-gp/epos-evm: fix panel compatible ... Link: https://lore.kernel.org/r/pull-1578420398-290837@atomide.com-3 Signed-off-by: Olof Johansson commit 3f9c6a6d9056c1e2b5a5fb3815b4afefca8325c1 Merge: 32d319c02d80 bfe0237dd6c4 Author: Olof Johansson Date: Tue Jan 7 11:16:23 2020 -0800 Merge tag 'omap-for-v5.6/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Devicetree changes for omaps for v5.6 merge window Devicetree changes for omaps for v5.6 to configure more devices and update boards to use generic lcd panels: - Configure HDMI for dra76-evm and am57xx-idk - Correct node name for am3517 mdio - Convert am335x-evm, am335x-evmsk, and am335x-icev2 to use generic panels * tag 'omap-for-v5.6/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am335x-icev2: Add support for OSD9616P0899-10 at i2c0 ARM: dts: am335x-evmsk: Use drm simple-panel instead of tilcdc-panel ARM: dts: am335x-evm: Use drm simple-panel instead of tilcdc-panel ARM: dts: omap3: name mdio node properly ARM: dts: am57xx-idk-common: add HDMI to the common dtsi ARM: dts: dra76-evm: add HDMI output Link: https://lore.kernel.org/r/pull-1578420398-290837@atomide.com-2 Signed-off-by: Olof Johansson commit d5279a57c4083d760aba071cef84e241ee631aa9 Merge: d1eef1c61974 4601832f4050 Author: Olof Johansson Date: Tue Jan 7 11:16:02 2020 -0800 Merge tag 'omap-for-v5.6/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc SoC changes for omaps for v5.6 merge window SoC related changes for omaps that mostly relate to making iommus to start probing with ti-sysc interconnect target module driver: - Add missing lcdc clockdomain for am43xx - Pass auxdata for reset control driver - Remove old pdata quirks for iommus - Add workaround for dra7 dsp mstandby errata - Convert iommu platform code to probe with ti-sysc - Use sperate iommu auxdata for ipu1 * tag 'omap-for-v5.6/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: use separate IOMMU pdata to fix DRA7 IPU1 boot ARM: OMAP2+: omap-iommu.c conversion to ti-sysc ARM: OMAP2+: Add workaround for DRA7 DSP MStandby errata i879 ARM: OMAP4+: remove pdata quirks for omap4+ iommus ARM: OMAP2+: pdata-quirks: add PRM data for reset support ARM: OMAP2+: am43xx: Add lcdc clockdomain Link: https://lore.kernel.org/r/pull-1578420398-290837@atomide.com Signed-off-by: Olof Johansson commit 530735df62582d5d1f41faf0e0d1ca7d21dca571 Author: Stephen Brennan Date: Tue Nov 19 19:16:22 2019 -0800 ARM: dts: bcm2711: Enable HWRNG support This enables hardware random number generator support for the BCM2711 on the Raspberry Pi 4 board. Signed-off-by: Stephen Brennan Acked-by: Stefan Wahren [nsaenzjulienne@suse.de: remove unnecessary status="okay"] Signed-off-by: Nicolas Saenz Julienne commit c4414cac85b623bd43f78174c5acac28a0795f13 Author: Stephen Brennan Date: Tue Nov 19 19:16:21 2019 -0800 ARM: dts: bcm2835: Move rng definition to common location BCM2711 inherits from BCM283X, but has an incompatible HWRNG. Move this node to bcm2835-common.dtsi, so that BCM2711 can define its own. Signed-off-by: Stephen Brennan Acked-by: Stefan Wahren Signed-off-by: Nicolas Saenz Julienne commit 7ee3f6d2486e25d96d2309da4d53fe10a58e2b63 Author: Alex Vesker Date: Sun Dec 15 21:50:32 2019 +0200 net/mlx5: DR, Create multiple destination action from dr_create_fte Until now it was possible to pass a packet to a single destination such as vport or flow table. With the new support if multiple vports or multiple tables are provided as destinations, fs_dr will create a multiple destination table action, this action should replace other destination actions provided to mlx5dr_create_rule. Each vport destination can be provided with a reformat actions which will be done before forwarding the packet to the vport. Signed-off-by: Alex Vesker Signed-off-by: Saeed Mahameed commit b8853c969f406bfb682740b7646ee8b4623ee955 Author: Alex Vesker Date: Sun Dec 15 21:27:54 2019 +0200 net/mlx5: DR, Add support for multiple destination table action A multiple destination table action allows HW packet duplication to multiple destinations, this is useful for multicast or mirroring traffic for debug. Duplicating is done using a FW flow table with multiple destinations. The new action creation function, mlx5dr_action_create_mult_dest_tbl will allow creating a single table to iterate over several dr actions. Signed-off-by: Alex Vesker Signed-off-by: Saeed Mahameed commit aec292ee6f290920fc77907dfe1b94baa600484d Author: Alex Vesker Date: Sun Dec 15 21:15:15 2019 +0200 net/mlx5: DR, Align dest FT action creation to API Function prefix was changed to be similar to other action APIs. In order to support other FW tables the mlx5_flow_table struct was replaced with table id and type. Signed-off-by: Alex Vesker Reviewed-by: Erez Shitrit Signed-off-by: Saeed Mahameed commit 988fd6b32d07400bd66259603ac9e08c33c02a05 Author: Erez Shitrit Date: Thu Jan 2 16:55:45 2020 +0200 net/mlx5: DR, Pass table flags at creation to lower layer We need to have the flow-table flags when creation sw-steering tables, this parameter exists in the layer between fs_core to sw_steering, this patch gives it to the creation function. Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed commit 34583beea4b741589793ce3ad5436b0a7c6d0cdb Author: Erez Shitrit Date: Tue Dec 24 22:54:15 2019 +0200 net/mlx5: DR, Create multi-destination table for SW-steering use Currently SW steering doesn't have the means to access HW iterators to support multi-destination (FTEs) flow table entries. In order to support multi-destination FTEs for port-mirroring, SW steering will create a dedicated multi-destination FW managed flow table and FTEs via direct FW commands that we introduced in the previous patch. Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed commit 6de03d2dcb0ec53e5862ae5844563bbbccde74bb Author: Erez Shitrit Date: Thu Jan 2 15:54:35 2020 +0200 net/mlx5: DR, Create FTE entry in the FW from SW-steering Implement the FW command to setup a FTE (Flow Table Entry) into the FW managed flow tables. Signed-off-by: Erez Shitrit Signed-off-by: Saeed Mahameed commit cc78dbd7686acf0a9729a187fdfcb8d2d3a80671 Author: Alex Vesker Date: Tue Dec 24 22:52:03 2019 +0200 net/mlx5: DR, Use attributes struct for FW flow table creation Instead of using multiple variables use a simple struct. The number of passed argument was too high after adding the encap decap support bits arguments used for multiple destination reformat. Signed-off-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 3ed879965cc4ea13fe0908468b653c4ff2cb1309 Author: Parav Pandit Date: Fri Dec 6 15:13:41 2019 -0600 net/mlx5: Use async EQ setup cleanup helpers for multiple EQs Use helper routines to setup and teardown multiple EQs and reuse the code in setup, cleanup and error unwinding flows. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 7396ae3d1cfe05be42e5f6b1883c9ed594cc42ba Author: Parav Pandit Date: Thu Dec 5 16:06:20 2019 -0600 net/mlx5: Reduce No CQ found log level from warn to debug In below sequence, a EQE entry arrives for a CQ which is on the path of being destroyed. cpu-0 cpu-1 ------ ----- mlx5_core_destroy_cq() mlx5_eq_comp_int() mlx5_eq_del_cq() [..] radix_tree_delete() [..] [..] mlx5_eq_cq_get() /* Didn't find CQ is * a valid case. */ /* destroy CQ in hw */ mlx5_cmd_exec() This is still a valid scenario and correct delete CQ sequence, as mirror of the CQ create sequence. Hence, suppress the non harmful debug message from warn to debug level. Keep the debug log message rate limited because user application can trigger it repeatedly. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 57c7fce14b1ad512a42abe33cb721a2ea3520d4b Author: Fan Li Date: Mon Dec 16 14:46:15 2019 +0200 net/mlx5: Increase the max number of channels to 128 Currently the max number of channels is limited to 64, which is half of the indirection table size to allow some flexibility. But on servers with more than 64 cores, users may want to utilize more queues. This patch increases the advertised max number of channels to 128 by changing the ratio between channels and indirection table slots to 1:1. At the same time, the driver still enable no more than 64 channels at loading. Users can change it by ethtool afterwards. Signed-off-by: Fan Li Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 15fc92ec3ad4cfb34218e6b6c38c1355938fe49e Author: Tonghao Zhang Date: Tue Dec 10 22:49:42 2019 +0800 net/mlx5e: Support accept action on nic table In one case, we may forward packets from one vport to others, but only one packets flow will be accepted, which destination ip was assign to VF. +-----+ +-----+ +-----+ | VFn | | VF1 | | VF0 | accept +--+--+ +--+--+ hairpin +--^--+ | | <--------------- | | | | +--+-----------v-+ +--+-------------+ | eswitch PF1 | | eswitch PF0 | +----------------+ +----------------+ tc filter add dev $PF0 protocol all parent ffff: prio 1 handle 1 \ flower skip_sw action mirred egress redirect dev $VF0_REP tc filter add dev $VF0 protocol ip parent ffff: prio 1 handle 1 \ flower skip_sw dst_ip $VF0_IP action pass tc filter add dev $VF0 protocol all parent ffff: prio 2 handle 2 \ flower skip_sw action mirred egress redirect dev $VF1 Signed-off-by: Tonghao Zhang Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 42ae1a5c76691928ed217c7e40269db27f5225e9 Author: Arnd Bergmann Date: Sat Jan 4 22:51:44 2020 +0100 mlx5: work around high stack usage with gcc In some configurations, gcc tries too hard to optimize this code: drivers/net/ethernet/mellanox/mlx5/core/en_stats.c: In function 'mlx5e_grp_sw_update_stats': drivers/net/ethernet/mellanox/mlx5/core/en_stats.c:302:1: error: the frame size of 1336 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] As was stated in the bug report, the reason is that gcc runs into a corner case in the register allocator that is rather hard to fix in a good way. As there is an easy way to work around it, just add a comment and the barrier that stops gcc from trying to overoptimize the function. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92657 Cc: Adhemerval Zanella Signed-off-by: Arnd Bergmann Signed-off-by: Saeed Mahameed commit 8007880a2ca97c34e7ccd1fcf12daf854b792544 Author: Zhu Yanjun Date: Sat Dec 14 10:51:17 2019 +0200 net/mlx5: limit the function in local scope The function mlx5_buf_alloc_node is only used by the function in the local scope. So it is appropriate to limit this function in the local scope. Signed-off-by: Zhu Yanjun Signed-off-by: Saeed Mahameed commit 5a57c05b56b6eb2b4e3eb2a9f205e39e849325a1 Author: Eric Sandeen Date: Thu Jan 2 13:31:54 2020 -0800 xfs: remove shadow variable in xfs_btree_lshift Sparse warns about a shadow variable in this function after the Fixed: commit added another int i; with larger scope. It's safe to remove the one with the smaller scope to fix this shadow, although the shadow itself is harmless. Fixes: 2c813ad66a72 ("xfs: support btrees with overlapping intervals for keys") Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit d41415eb5edae2a750940aa24924993b81947040 Author: Stephen Smalley Date: Tue Jan 7 11:35:04 2020 -0500 Documentation,selinux: fix references to old selinuxfs mount point selinuxfs was originally mounted on /selinux, and various docs and kconfig help texts referred to nodes under it. In Linux 3.0, /sys/fs/selinux was introduced as the preferred mount point for selinuxfs. Fix all the old references to /selinux/ to /sys/fs/selinux/. While we are there, update the description of the selinux boot parameter to reflect the fact that the default value is always 1 since commit be6ec88f41ba94 ("selinux: Remove SECURITY_SELINUX_BOOTPARAM_VALUE") and drop discussion of runtime disable since it is deprecated. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit 2e9eeaa1175112ac494ba3c2ea4b71b1febeb6ab Author: Bob Peterson Date: Fri Dec 13 08:10:51 2019 -0600 gfs2: eliminate ssize parameter from gfs2_struct2blk Every caller of function gfs2_struct2blk specified sizeof(u64). This patch eliminates the unnecessary parameter and replaces the size calculation with a new superblock variable that is computed to be the maximum number of block pointers we can fit inside a log descriptor, as is done for pointers per dinode and indirect block. Signed-off-by: Bob Peterson Reviewed-by: Andrew Price Signed-off-by: Andreas Gruenbacher commit ea117312ea9f4113c4a8f4571a9ba189248721c4 Author: Thomas Anderson Date: Mon Dec 2 13:47:13 2019 -0800 drm/amd/display: Reduce HDMI pixel encoding if max clock is exceeded For high-res (8K) or HFR (4K120) displays, using uncompressed pixel formats like YCbCr444 would exceed the bandwidth of HDMI 2.0, so the "interesting" modes would be disabled, leaving only low-res or low framerate modes. This change lowers the pixel encoding to 4:2:2 or 4:2:0 if the max TMDS clock is exceeded. Verified that 8K30 and 4K120 are now available and working with a Samsung Q900R over an HDMI 2.0b link from a Radeon 5700. Reviewed-by: Harry Wentland Signed-off-by: Thomas Anderson Signed-off-by: Alex Deucher commit d12babaf15404eb102a84f8f9e6b7112c94c8221 Author: Xiaodong Yan Date: Fri Dec 6 18:43:53 2019 +0800 drm/amd/display: add event type check before restart the authentication [Why] Some combined docks will always trigger CP_IRQ but there's nothing the driver needs to take care of, but the CP_IRQ breaks the original hdcp state and triggers the driver to restart the authentication. [How] Add the event type check before restart the authentication or resend the stream management Signed-off-by: Xiaodong Yan Reviewed-by: Wenjing Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit daa9692db988afad0c124acf77a7cc08cccd844b Author: Michael Strauss Date: Mon Sep 23 08:47:47 2019 -0400 drm/amd/display: Add delay after h' watchdog timeout event [WHY] Some monitors trigger HDCP2.x timeout after reinitializing (e.g. toggling HDR) by taking longer than expected to return h' (h prime) Previously the 200ms watchdog timer retry count would hit MAX_NUM_OF_ATTEMPTS (4), causing fallback to HDCP1.x [HOW] Adding a 1s delay after an h' watchdog timeout provides enough time for affected monitors to return h' in time without hitting MAX_NUM_OF_ATTEMPTS Signed-off-by: Michael Strauss Reviewed-by: Wenjing Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 454425e8f919d9373b7db431552c0860c156e2cd Author: Jing Zhou Date: Thu Nov 14 16:39:52 2019 +0800 drm/amd/display: rx_validation failed resume from sleep [why] Most DP/HDMI monitors need more time to response rx_validation request. [how] Add generic 1000ms delay. Signed-off-by: Jing Zhou Reviewed-by: Wenjing Liu Acked-by: Harry Wentland Signed-off-by: Alex Deucher commit 838a4ea38441963b035078052acd99ab4af74c42 Author: Bhawanpreet Lakha Date: Tue Dec 3 15:55:13 2019 -0500 drm/amd/display: Return correct Error code for validate h_prime [Why] We are returning incorrect error code for validate h prime [How] Return the right Error code Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 52c7423cfdc0e74d4e553231e5f249566b6b6cb3 Author: Bhawanpreet Lakha Date: Tue Dec 3 15:47:53 2019 -0500 drm/amd/display: Fix hdcp1 create session [Why] PSP needs session ID to destroy a session, In the case where we fail create session we don't have a session ID [How] Set the session ID before returning Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 4f47cd0c01851065a85d684c619e1dba8fa9c167 Author: Bhawanpreet Lakha Date: Thu Dec 12 11:44:18 2019 -0500 drm/amd/display: fix psp return condition for hdcp module We are returning SUCCESS when hdcp_status != Success. Fix it. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 0a531c5a39a71279e0a98097562bf14b5a43529e Author: xianrong.zhou Date: Mon Jan 6 20:34:24 2020 -0800 dm verity: don't prefetch hash blocks for already-verified data Try to skip prefetching hash blocks that won't be needed due to the "check_at_most_once" option being enabled and the corresponding data blocks already having been verified. Since prefetching operates on a range of data blocks, do this by just trimming the two ends of the range. This doesn't skip every unneeded hash block, since data blocks in the middle of the range could also be unneeded, and hash blocks are still prefetched in large clusters as controlled by dm_verity_prefetch_cluster. But it can still help a lot. In a test on Android Q launching 91 apps every 15s repeated 21 times, prefetching was only done for 447177/4776629 = 9.36% of data blocks. Tested-by: ruxian.feng Co-developed-by: yuanjiong.gao Signed-off-by: yuanjiong.gao Signed-off-by: xianrong.zhou [EB: simplified the 'while' loops and improved the commit message] Signed-off-by: Eric Biggers Signed-off-by: Mike Snitzer commit 9402e959014a18b4ebf7558733076875808dd66c Author: Mikulas Patocka Date: Thu Jan 2 08:23:32 2020 -0500 dm crypt: fix GFP flags passed to skcipher_request_alloc() GFP_KERNEL is not supposed to be or'd with GFP_NOFS (the result is equivalent to GFP_KERNEL). Also, we use GFP_NOIO instead of GFP_NOFS because we don't want any I/O being submitted in the direct reclaim path. Fixes: 39d13a1ac41d ("dm crypt: reuse eboiv skcipher for IV generation") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 4306904053902c7e7827815722f82015dc274ba3 Author: Jeffle Xu Date: Mon Dec 30 10:54:32 2019 +0800 dm thin metadata: Fix trivial math error in on-disk format documentation Signed-off-by: Jeffle Xu Signed-off-by: Mike Snitzer commit 63ee92d1c2531008c9e5d73db2f2a1349961b10a Author: zhengbin Date: Tue Dec 24 14:38:03 2019 +0800 dm thin metadata: use true/false for bool variable Fixes coccicheck warning: drivers/md/dm-thin-metadata.c:814:3-14: WARNING: Assignment of 0/1 to bool variable drivers/md/dm-thin-metadata.c:1109:1-12: WARNING: Assignment of 0/1 to bool variable drivers/md/dm-thin-metadata.c:1621:1-12: WARNING: Assignment of 0/1 to bool variable drivers/md/dm-thin-metadata.c:1652:1-12: WARNING: Assignment of 0/1 to bool variable drivers/md/dm-thin-metadata.c:1706:1-12: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Mike Snitzer commit 1d1dda8ca8ca0586df87d898e59cd69110d3d74b Author: zhengbin Date: Tue Dec 24 14:38:02 2019 +0800 dm snapshot: use true/false for bool variable Fixes coccicheck warning: drivers/md/dm-snap.c:1064:3-18: WARNING: Assignment of 0/1 to bool variable drivers/md/dm-snap.c:1152:1-16: WARNING: Assignment of 0/1 to bool variable drivers/md/dm-snap.c:1317:1-16: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Mike Snitzer commit 67b92d979b70212d7b2272f6b86a4d9229ab1eac Author: zhengbin Date: Tue Dec 24 14:38:01 2019 +0800 dm bio prison v2: use true/false for bool variable Fixes coccicheck warning: drivers/md/dm-bio-prison-v2.c:327:2-22: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Mike Snitzer commit 4ecc5081909ae70e4d988b643d54687cc53ba6eb Author: zhengbin Date: Tue Dec 24 14:38:00 2019 +0800 dm mpath: use true/false for bool variable Fixes coccicheck warning: drivers/md/dm-mpath.c:1447:2-13: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Mike Snitzer commit b0d7ecd7633a6004c465a8dba205a66646324b7f Author: Wambui Karuga Date: Fri Jan 3 22:18:52 2020 +0300 drm/amd: use list_for_each_entry for list iteration. list_for_each() can be replaced by the more concise list_for_each_entry() here for iteration over the lists. This change was reported by coccinelle. Signed-off-by: Wambui Karuga Signed-off-by: Alex Deucher commit 3c20d544ef2aeb79aacf7e80d18c9909381e99a8 Author: Wambui Karuga Date: Fri Jan 3 16:20:35 2020 +0300 drm/radeon: remove unnecessary braces around conditionals. As single statement conditionals do not need to be wrapped around braces, the unnecessary braces can be removed. Signed-off-by: Wambui Karuga Signed-off-by: Alex Deucher commit fbd62354f08c33a87aace0a3ad2e21137cc331b8 Author: Wambui Karuga Date: Fri Jan 3 16:19:12 2020 +0300 drm/radeon: remove boolean checks in if statements. Remove unnecessary variable comparisions to true/false in if statements and check the value of the variable directly. Signed-off-by: Wambui Karuga Signed-off-by: Alex Deucher commit 2cacd20e91ecdc1a685fec2a796e8418f52db9c8 Author: Alex Deucher Date: Mon Jan 6 15:24:47 2020 -0500 Revert "drm/amdgpu: Set no-retry as default." This reverts commit 51bfac71cade386966791a8db87a5912781d249f. This causes stability issues on some raven boards. Revert for now until a proper fix is completed. Bug: https://gitlab.freedesktop.org/drm/amd/issues/934 Bug: https://bugzilla.kernel.org/show_bug.cgi?id=206017 Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 48ccd5ffe5d5be07640be80155404d64e01327c7 Author: Alex Deucher Date: Mon Jan 6 14:55:54 2020 -0500 drm/amdgpu/gfx: simplify old firmware warning Put it on one line to avoid whitespace issues when printing in the log. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 5677c52090862d39d44920480274aff2e7289faa Author: Alex Deucher Date: Mon Jan 6 13:21:56 2020 -0500 drm/amdgpu/gmc10: use common invalidation engine helper Rather than open coding it. This also changes the free masks to better reflect the usage by other components. Acked-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher commit bdbe90f04d24ba9f9bc8b5fa8aa0269473f92509 Author: Alex Deucher Date: Mon Jan 6 13:14:27 2020 -0500 drm/amdgpu/gmc: move invaliation bitmap setup to common code So it can be shared with newer GMC versions. Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c8aa6ae30c6a5ae12f49f880479feb66a0577347 Author: John Clements Date: Tue Jan 7 17:00:00 2020 +0800 drm/amdgpu: updated UMC error address record with correct channel index defined macros for repetitive for loops Reviewed-by: Guchun Chen Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 0ee51f1d940e0715d2b82f97f4aa1bd333242f39 Author: John Clements Date: Tue Jan 7 14:16:05 2020 +0800 drm/amdgpu: resolved bug in UMC RAS CE query switch CE counter register access' to use SMN disable UMC indexing mode Reviewed-by: Tao Zhou Signed-off-by: John Clements Signed-off-by: Alex Deucher commit a64c9e15e6247e89ad16021b8d5d6d53c34d7ee7 Author: Evan Quan Date: Fri Jan 3 17:03:21 2020 +0800 drm/amd/powerplay: cleanup the interfaces for powergate setting through SMU Provided an unified entry point. And fixed the confusing that the API usage is conflict with what the naming implies. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e0aa4a92f76b8b1a361f6ae6b0a51854e3113416 Author: Evan Quan Date: Fri Jan 3 14:24:56 2020 +0800 drm/amd/powerplay: issue proper hdp flush for table transferring Guard the content consistence between the view of GPU and CPU during the table transferring. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 29a45960647b243af5f2aa73fd7a822ef3db33eb Author: Evan Quan Date: Fri Jan 3 14:18:22 2020 +0800 drm/amd/powerplay: refine code to support no-dpm case With "dpm=0", there will be no DPM enabled. The code needs to be refined to support this. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ce0d0ec3390c5cf997e4ca43bd2047fa41e77bf1 Author: Evan Quan Date: Tue Dec 31 10:39:34 2019 +0800 drm/amd/powerplay: unified VRAM address for driver table interaction with SMU V2 By this, we can avoid to pass in the VRAM address on every table transferring. That puts extra unnecessary traffics on SMU on some cases(e.g. polling the amdgpu_pm_info sysfs interface). V2: document what the driver table is for and how it works Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 9fa1ed5bf628a871be52bb2d84ade8b108db8902 Author: Evan Quan Date: Tue Dec 31 10:33:19 2019 +0800 drm/amd/powerplay: cache the watermark settings on system memory So that we do not need to allocate a piece of VRAM for it. This is a preparation for coming change which unifies the VRAM address for all driver tables interaction with SMU. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit d5ec4b45682e21f0d954e532a70531dc19723265 Author: Kevin Wang Date: Thu Dec 26 15:02:37 2019 +0800 drm/amdgpu/smu: custom pstate profiling clock frequence for navi series asics add navi10 & navi14 pstate profiling clock value support. Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 25344d7e98ed019b5691dd7d86fb3a0f94b00e24 Author: Zhigang Luo Date: Fri Dec 13 14:41:32 2019 -0500 drm/amd/amdgpu: L1 Policy(5/5) - removed IH_CHICKEN from VF Signed-off-by: Zhigang Luo Signed-off-by: Jane Jian Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit 2ee9403e81f459425ae5b6fcf9bbe0ebd0f775b7 Author: Zhigang Luo Date: Tue Dec 10 10:16:31 2019 -0500 drm/amd/amdgpu: L1 Policy(3/5) - removed ECC interrupt from VF Signed-off-by: Zhigang Luo Signed-off-by: Jane Jian Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit 08546895bc4e4c43414dd365c5cf6fe180f1c340 Author: Zhigang Luo Date: Mon Dec 2 09:50:19 2019 -0500 drm/amd/amdgpu: L1 Policy(2/5) - removed GC GRBM violations from gfxhub Signed-off-by: Zhigang Luo Signed-off-by: Jane Jian Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit 20bf2f6fefec1002a5429a7e04cfb3c7cfca76cf Author: Zhigang Luo Date: Thu Nov 14 16:53:58 2019 -0500 drm/amd/amdgpu: L1 Policy(1/5) - removed VM settings for mmhub and gfxhub from VF Signed-off-by: Zhigang Luo Signed-off-by: Jane Jian Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit 61130c74329695301a1fa80b78fb25873f0221ed Author: John Clements Date: Fri Jan 3 17:27:48 2020 +0800 drm/amdgpu: removed GFX RAS support check in UMC ECC callback enable GPU recovery in event of uncorrectable UMC error Signed-off-by: John Clements Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 097dc53ee93ac4e130e6e263d2654d2c54eec77f Author: John Clements Date: Fri Jan 3 17:27:04 2020 +0800 drm/amdgpu: added function to wait for PSP BL availability reduced duplicate code increased wait time for PSP BL readiness Signed-off-by: John Clements Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 4dee6e4ca50a6c8490b408906bb403dd6aebd721 Author: Kevin Wang Date: Thu Jan 2 13:59:17 2020 +0800 drm/amdgpu: use linux size macro to simplify ONE_Kib & One_Mib replace internal size macro with linux size macro Signed-off-by: Kevin Wang Reviewed-by: Tianci Yin Signed-off-by: Alex Deucher commit bd68fb94b3d4601b45a7e4558b9de0eebdb85ec1 Author: John Clements Date: Fri Jan 3 11:55:42 2020 +0800 drm/amdgpu: resolve bug in UMC 6 error counter query iterate over all error counter registers in SMN space removed support error counter access via MMIO Reviewed-by: Guchun Chen Signed-off-by: John Clements Signed-off-by: Alex Deucher commit a210d69872cc752e26952253c9b2a40b45b9344a Author: Evan Quan Date: Thu Jan 2 09:41:54 2020 +0800 drm/amd/powerplay: add smu11_driver_if_arcturus.h new OOB members This is to fit the latest SMC firmware and it's backward compatible. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 895bd048fb0846c912cb896ff58f4341537d0ff1 Author: Jack Zhang Date: Fri Dec 27 14:44:03 2019 +0800 amd/amdgpu/sriov tdr enablement with pp_onevf_mode Under sriov and pp_onevf mode, 1.take resume instead of hw_init for smc recover to avoid potential memory leak. 2.add return condition inside smc resume function for sriov_pp_onevf_mode and pm_enabled param. Signed-off-by: Jack Zhang Acked-by: Evan Quan Signed-off-by: Alex Deucher commit c2a801af318397bc5195a20c556a648b2476863d Author: Jack Zhang Date: Tue Dec 10 10:51:01 2019 +0800 amd/amdgpu/sriov enable onevf mode for ARCTURUS VF Before, initialization of smu ip block would be skipped for sriov ASICs. But if there's only one VF being used, guest driver should be able to dump some HW info such as clks, temperature,etc. To solve this, now after onevf mode is enabled, host driver will notify guest. If it's onevf mode, guest will do smu hw_init and skip some steps in normal smu hw_init flow because host driver has already done it for smu. With this fix, guest app can talk with smu and dump hw information from smu. v2: refine the logic for pm_enabled.Skip hw_init by not changing pm_enabled. v3: refine is_support_sw_smu and fix some indentation issue. Signed-off-by: Jack Zhang Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 6a876844e489febae38b7a67e92a29ddc2eb0e6b Author: Evan Quan Date: Mon Dec 30 17:08:29 2019 +0800 drm/amd/powerplay: retrieve the enabled feature mask from cache This is why those feature mask members designed for. And this can reduce the SMU workload. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit e42877b8ba876cf43a0f1261963d66ef11e3b779 Author: Evan Quan Date: Mon Dec 30 11:27:32 2019 +0800 drm/amd/powerplay: avoid deadlock on Vega20 swSMU routine The lock required was already hold by its parent API. Signed-off-by: Evan Quan Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 955c7120075089b1a84f32fc87c3b18485d57e8d Author: John Clements Date: Thu Jan 2 11:32:15 2020 +0800 drm/amdgpu: update UMC 6.1 RAS error counter register access path use proper method for SMN register access Reviewed-by: Tao Zhou Signed-off-by: John Clements Signed-off-by: Alex Deucher commit e4b613e0b27232cf6d31c385493159cabbc78884 Author: Kevin Wang Date: Thu Dec 26 14:41:22 2019 +0800 drm/amdgpu/smu: add helper function smu_get_dpm_level_range() for smu driver this function can help smu driver to query dpm level clock range from smu firmware. Signed-off-by: Kevin Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b36a62321d2e5cad1236167a1e0aba71296fa6a9 Author: yu kuai Date: Thu Dec 26 20:07:50 2019 +0800 drm/radeon: remove three set but not used variable Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/radeon/radeon_atombios.c: In function ‘radeon_get_atom_connector_info_from_object_table’: drivers/gpu/drm/radeon/radeon_atombios.c:651:26: warning: variable ‘grph_obj_num’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/radeon/radeon_atombios.c:651:13: warning: variable ‘grph_obj_id’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/radeon/radeon_atombios.c:573:37: warning: variable ‘con_obj_type’ set but not used [-Wunused-but-set-variable] They are never used, and so can be removed. Signed-off-by: yu kuai Acked-by: Huang Rui Signed-off-by: Alex Deucher commit e78adc5a1d34eda80f157e9af477284989a62bdb Author: Likun Gao Date: Wed Dec 25 17:42:35 2019 +0800 drm/amdgpu/powerplay: fix NULL pointer issue when SMU disabled Fix smu related NULL pointer issue which occurs when SMU is disabled. Signed-off-by: Likun Gao Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit d2f925ff9a239a49339d785f721c8cd89b743539 Author: Kevin Wang Date: Mon Dec 23 18:17:36 2019 +0800 drm/amdgpu/smu: use unified variable smu->is_apu to check apu asic platform use unified variable smu->is_apu to check apu asic in smu driver. related patch: drm/amd/powerplay: bypass dpm_context null pointer check guard for some smu series Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 34e48caee40d95c598ee6d43a4a1055ef1fa4c5b Author: John Clements Date: Thu Dec 26 11:27:46 2019 +0800 drm/amdgpu: amalgamated PSP TA invoke functions reduce duplicate code Reviewed-by: Guchun Chen Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 1f455f258013729bfcb1a3ab48b12fb79d49babc Author: John Clements Date: Thu Dec 26 11:19:36 2019 +0800 drm/amdgpu: amalgamate PSP TA load/unload functions reduce duplicate code Reviewed-by: Guchun Chen Signed-off-by: John Clements Signed-off-by: Alex Deucher commit e6e193c00dce56af982bdab61cbc3f70e06e077e Author: John Clements Date: Thu Dec 26 11:13:53 2019 +0800 drm/amdgpu: by default output PSP ret status in event of cmd failure update log level from DRM_DEBUG_DRIVER to DRM_WARN Reviewed-by: Guchun Chen Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 0753e56e9a01fc5350a703dcae55c14efdfb3e49 Author: Evan Quan Date: Mon Dec 23 16:13:48 2019 +0800 drm/amdgpu: correct RLC firmwares loading sequence Per confirmation with RLC firmware team, the RLC should be unhalted after all RLC related firmwares uploaded. However, in fact the RLC is unhalted immediately after RLCG firmware uploaded. And that may causes unexpected PSP hang on loading the succeeding RLC save restore list related firmwares. So, we correct the firmware loading sequence to load RLC save restore list related firmwares before RLCG ucode. That will help to get around this issue. Signed-off-by: Evan Quan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b8ab58f350b6554ce0e994e900a0dfb74ffa989f Author: Evan Quan Date: Tue Dec 24 17:22:18 2019 +0800 drm/amd/powerplay: add check for baco support on Arcturus This is used to determine whether runtime pm can be supported or not. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 60bd99fd15807da5a8e7036a1e8c6e8b9e210da8 Author: zhengbin Date: Tue Dec 24 11:27:43 2019 +0800 drm/amd/display: use true, false for bool variable in display_rq_dlg_calc_21.c Fixes coccicheck warning: drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:85:6-13: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:88:2-9: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:225:6-14: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:226:6-14: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:251:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:252:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:256:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:257:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:267:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:269:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:682:6-14: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:1013:1-9: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit d94af04b08744f99e92d00843084e79c21cd49c5 Author: zhengbin Date: Tue Dec 24 11:27:42 2019 +0800 drm/amd/display: use true, false for bool variable in display_rq_dlg_calc_20v2.c Fixes coccicheck warning: drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:110:6-13: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:113:2-9: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:243:6-14: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:244:6-14: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:267:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:268:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:272:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:273:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:283:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:285:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:673:6-14: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:962:1-9: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit b7402f1f6b40a16f197cbbac3c3a65c1904851f3 Author: zhengbin Date: Tue Dec 24 11:27:41 2019 +0800 drm/amd/display: use true, false for bool variable in display_rq_dlg_calc_20.c Fixes coccicheck warning: drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:110:6-13: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:113:2-9: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:243:6-14: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:244:6-14: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:267:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:268:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:272:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:273:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:283:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:285:3-11: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:673:6-14: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:961:1-9: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 45423809d595a05c43ff268da2f4b8e3750749a2 Author: zhengbin Date: Tue Dec 24 11:27:40 2019 +0800 drm/amd/display: use true, false for bool variable in dce_calcs.c Fixes coccicheck warning: drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:157:46-64: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:159:2-20: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:161:46-64: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:163:2-20: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:289:1-12: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:290:1-12: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:341:3-14: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:343:4-15: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit edb1a67767fd1acd2179f4c4a740db610a31f5ae Author: zhengbin Date: Tue Dec 24 11:27:39 2019 +0800 drm/amd/display: use true, false for bool variable in display_mode_vba_21.c Fixes coccicheck warning: drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c:4124:3-28: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c:4128:5-30: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c:5207:3-37: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 0bb803699a7b632874d8b655f2225c6bd0d53116 Author: zhengbin Date: Tue Dec 24 11:27:38 2019 +0800 drm/amd/display: use true, false for bool variable in dcn20_hwseq.c Fixes coccicheck warning: drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c:186:6-14: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c:189:2-10: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 0ee600a7ec3572ac2ed3f43887dc79113eb44f17 Author: zhengbin Date: Tue Dec 24 11:27:37 2019 +0800 drm/amd/display: use true, false for bool variable in dcn10_hw_sequencer.c Fixes coccicheck warning: drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c:482:6-14: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c:485:2-10: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 41ff5e81ffa0e8c40046a4c69563e4408978c690 Author: zhengbin Date: Tue Dec 24 11:27:36 2019 +0800 drm/amd/display: use true, false for bool variable in dc_link_ddc.c Fixes coccicheck warning: drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c:593:6-9: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit e1ab862d89265ea43b3274503798f4437d10e2c2 Author: zhengbin Date: Tue Dec 24 10:08:14 2019 +0800 drm/amd/powerplay: use true, false for bool variable in vega20_hwmgr.c Fixes coccicheck warning: drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c:875:1-31: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 337443d0e29054c95879a6a3149b29cc8fbd04df Author: Alex Deucher Date: Fri Dec 20 16:34:42 2019 -0500 drm/amdgpu/smu: make the set_performance_level logic easier to follow Have every asic provide a callback for this rather than a mix of generic and asic specific code. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit c00ca07f64d39e242e3b86bb55cfb763b2f31ad5 Author: Alex Deucher Date: Fri Dec 20 18:57:16 2019 -0500 Revert "drm/amdgpu: simplify ATPX detection" This reverts commit f5fda6d89afe6e9cedaa1c3303903c905262f6e8. You can't use BASE_CLASS in pci_get_class. Bug: https://gitlab.freedesktop.org/drm/amd/issues/995 Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 8831fa6e89971828b0f245aed3a2661dd3f225e2 Author: Guchun Chen Date: Tue Dec 24 14:28:30 2019 +0800 drm/amdgpu: simplify function return logic Former return logic is redundant. Signed-off-by: Guchun Chen Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 18d7ab9899d34e6a7f8cb4d17368b7db398323e4 Author: Evan Quan Date: Tue Dec 17 15:25:56 2019 +0800 drm/amd/powerplay: support custom power profile setting Support custom power profile mode settings on Arcturus. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c103c5a333ec6ebee01af815c5812e4a8f55f32c Author: Xiaojie Yuan Date: Mon Dec 23 11:01:10 2019 +0800 drm/amd/display: fix kernel_fpu_begin/_end() warnings kernel_fpu_begin/_end() are already called inside dcn20_resource_construct, and calling kernel_fpu_begin/_end() recursively triggers WARN_ON() when CONFIG_X86_DEBUG_FPU is enabled. [ 107.060434] WARNING: CPU: 6 PID: 1370 at arch/x86/kernel/fpu/core.c:90 kernel_fpu_begin+0xbd/0xe0 [ 107.268197] Call Trace: [ 107.270751] dcn20_patch_bounding_box+0x17/0x100 [amdgpu] [ 107.276204] init_soc_bounding_box+0x1b3/0x5f0 [amdgpu] [ 107.281536] ? _cond_resched+0x19/0x30 [ 107.285307] dcn20_resource_construct+0x3a9/0xa90 [amdgpu] [ 107.290957] ? dcn20_resource_construct+0x3a9/0xa90 [amdgpu] [ 107.296621] ? __alloc_pages_nodemask+0x16a/0x330 [ 107.301476] ? _cond_resched+0x19/0x30 [ 107.305284] ? kmem_cache_alloc_trace+0x197/0x230 [ 107.310063] ? _cond_resched+0x19/0x30 [ 107.313783] ? kmem_cache_alloc_trace+0x197/0x230 [ 107.318691] dcn20_create_resource_pool+0x42/0x70 [amdgpu] [ 107.324315] dc_create_resource_pool+0x12d/0x170 [amdgpu] [ 107.329851] dc_create+0x1b8/0x6a0 [amdgpu] [ 107.334013] ? kmem_cache_alloc_trace+0x1e2/0x230 [ 107.338832] amdgpu_dm_init+0x13e/0x1c0 [amdgpu] Signed-off-by: Xiaojie Yuan Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit c2a77fde10ec2cac33a23c8ac53d181bc2fe0cee Author: Felix Kuehling Date: Fri Dec 20 02:46:55 2019 -0500 drm/amdkfd: Avoid hanging hardware in stop_cpsch Don't use the HWS if it's known to be hanging. In a reset also don't try to destroy the HIQ because that may hang on SRIOV if the KIQ is unresponsive. Signed-off-by: Felix Kuehling Tested-by: Emily Deng Reviewed-by: shaoyunl Signed-off-by: Alex Deucher commit 09c34e8d7a631cf541c82f46ee73433c28b6ce0e Author: Felix Kuehling Date: Fri Dec 20 02:07:54 2019 -0500 drm/amdkfd: Improve HWS hang detection and handling Move HWS hang detection into unmap_queues_cpsch to catch hangs in all cases. If this happens during a reset, don't schedule another reset because the reset already in progress is expected to take care of it. Signed-off-by: Felix Kuehling Tested-by: Emily Deng Reviewed-by: shaoyunl Signed-off-by: Alex Deucher commit 63e088acfc330c7031c4c07e8503337d1f36639a Author: Felix Kuehling Date: Fri Dec 20 02:01:24 2019 -0500 drm/amdkfd: Remove unused variable dqm->pipeline_mem wasn't used anywhere. Signed-off-by: Felix Kuehling Reviewed-by: shaoyunl Signed-off-by: Alex Deucher commit 2bdac179e217a0c0b548a8c60524977586621b19 Author: Felix Kuehling Date: Thu Dec 19 22:36:55 2019 -0500 drm/amdkfd: Fix permissions of hang_hws Reading from /sys/kernel/debug/kfd/hang_hws would cause a kernel oops because we didn't implement a read callback. Set the permission to write-only to prevent that. Signed-off-by: Felix Kuehling Reviewed-by: shaoyunl Signed-off-by: Alex Deucher commit b6025eeaa10eef8d6d6c413b0668d6ebe7375b2a Author: Chunming Zhou Date: Tue May 28 10:46:04 2019 +0800 drm/amdgpu: add DRIVER_SYNCOBJ_TIMELINE to amdgpu Can expose it now that the khronos has exposed the vlk extension. Signed-off-by: Chunming Zhou Reviewed-by: Flora Cui Reviewed-by: Christian König Signed-off-by: Alex Deucher commit b39962950339912978484cdac50069258545d753 Author: Dmitry Fomichev Date: Mon Dec 23 17:05:46 2019 -0800 dm zoned: support zone sizes smaller than 128MiB dm-zoned is observed to log failed kernel assertions and not work correctly when operating against a device with a zone size smaller than 128MiB (e.g. 32768 bits per 4K block). The reason is that the bitmap size per zone is calculated as zero with such a small zone size. Fix this problem and also make the code related to zone bitmap management be able to handle per zone bitmaps smaller than a single block. A dm-zoned-tools patch is required to properly format dm-zoned devices with zone sizes smaller than 128MiB. Fixes: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Fomichev Reviewed-by: Damien Le Moal Signed-off-by: Mike Snitzer commit 43f3952a51f8198d365acb7f51fe42d578fe5d0a Author: Heinz Mauelshagen Date: Thu Dec 19 17:58:46 2019 +0100 dm raid: table line rebuild status fixes raid_status() wasn't emitting rebuild flags on the table line properly because the rdev number was not yet set properly; index raid component devices array directly to solve. Also fix wrong argument count on emitted table line caused by 1 too many rebuild/write_mostly argument and consider any journal_(dev|mode) pairs. Link: https://bugzilla.redhat.com/1782045 Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit 88e7cafdcae8bc6354804c685379784c55e276ca Author: Bryan Gurney Date: Thu Dec 5 17:08:37 2019 -0500 dm dust: change ret to r in dust_map_write In the dust_map_write() function, change the return code variable "ret" to "r", to match the convention of the other device-mapper targets. Signed-off-by: Bryan Gurney Signed-off-by: Mike Snitzer commit 11f1eabee0ba0aafe023ad92d1e3c29d0a96683e Author: Enric Balletbo i Serra Date: Tue Dec 3 15:50:18 2019 +0100 cros_ec: treewide: Remove 'include/linux/mfd/cros_ec.h' This header file now only includes the cros_ec_dev struct, however, is the 'include/linux/platform_data/cros_ec_proto.h' who contains the definition of all the Chrome OS EC related structs. There is no reason to have a separate include for this struct so move to the place where other structs are defined. That way, we can remove the include itself, but also simplify the common pattern #include #include for a single include #include The changes to remove the cros_ec.h include were generated with the following shell script: git grep -l "" | xargs sed -i '//d' Signed-off-by: Enric Balletbo i Serra Acked-by: Lee Jones Acked-by: Alexandre Belloni Acked-by: Jonathan Cameron Acked-by: Sebastian Reichel Acked-by: Hans Verkuil commit e3ff68812384dd7f219b331535ede94b0974d5a7 Author: Harigovindan P Date: Tue Jan 7 11:10:08 2020 +0530 drm/msm: update LANE_CTRL register value from default value LANE_CTRL register in latest version of DSI controller (v2.2) has additional functionality introduced to enable/disable HS signalling with default value set to enabled. To accommodate this change, LANE_CTRL register should be read and bit wise ORed to enable non continuous clock mode. Without this change, if register is written directly, HS signalling will be disabled resulting in black screen. Changes in v1: -Update LANE_CTRL register value Changes in v2: -Changing commit message accordingly. Signed-off-by: Harigovindan P Signed-off-by: Rob Clark commit 6125bd327e16a451efb5a00bc4224e164d19f77e Author: Harigovindan P Date: Mon Jan 6 10:43:49 2020 +0530 drm/msm: add DSI support for sc7180 Add support for v2.4.1 DSI block in the sc7180 SoC. Changes in v1: -Modify commit text to indicate DSI version and SOC detail(Jeffrey Hugo). -Splitting visionox panel driver code out into a different patch(set), since panel drivers are merged into drm-next via a different tree(Rob Clark). Changes in v2: -Update commit text accordingly(Matthias Kaehlcke). Signed-off-by: Harigovindan P [cleanup subject / commit message] Signed-off-by: Rob Clark commit 7807a76b00d3d656c666a6042e15cff0c890eb92 Author: Chris Wilson Date: Tue Jan 7 14:31:18 2020 +0000 drm/i915/gt: Take responsibility for engine->release as the last step In order to avoid a double cleanup on error, take ownership of engine->release past the point of no [error] return. Reported-by: Mika Kuoppala Fixes: e26b6d434147 ("drm/i915/gt: Pull GT initialisation under intel_gt_init()") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Tested-by: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200107143118.3288995-1-chris@chris-wilson.co.uk commit 89b223bfb8a89731bea4c84982b5d2ad7ba460e3 Author: Paul Moore Date: Wed Dec 18 21:45:08 2019 -0500 selinux: deprecate disabling SELinux and runtime Deprecate the CONFIG_SECURITY_SELINUX_DISABLE functionality. The code was originally developed to make it easier for Linux distributions to support architectures where adding parameters to the kernel command line was difficult. Unfortunately, supporting runtime disable meant we had to make some security trade-offs when it came to the LSM hooks, as documented in the Kconfig help text: NOTE: selecting this option will disable the '__ro_after_init' kernel hardening feature for security hooks. Please consider using the selinux=0 boot parameter instead of enabling this option. Fortunately it looks as if that the original motivation for the runtime disable functionality is gone, and Fedora/RHEL appears to be the only major distribution enabling this capability at build time so we are now taking steps to remove it entirely from the kernel. The first step is to mark the functionality as deprecated and print an error when it is used (what this patch is doing). As Fedora/RHEL makes progress in transitioning the distribution away from runtime disable, we will introduce follow-up patches over several kernel releases which will block for increasing periods of time when the runtime disable is used. Finally we will remove the option entirely once we believe all users have moved to the kernel cmdline approach. Acked-by: Casey Schaufler Acked-by: Ondrej Mosnacek Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit 05a8e45136ca7f8785363698a8bf3748cc5ec8b8 Author: José Roberto de Souza Date: Mon Jan 6 06:28:23 2020 -0800 drm/i915/display: Use external dependency loop for port sync This loop was added directly to intel_atomic_check() to be used by all other features that have external pipe dependencies, so using it and removing intel_atomic_check_synced_crtcs(). After this changes is_trans_port_sync_master() it not used anywhere, so removing it. Cc: Ville Syrjälä Cc: Matt Roper Cc: Manasi Navare Signed-off-by: José Roberto de Souza Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20200106142823.145260-1-jose.souza@intel.com commit 953cac3ec55fbf53f66e95e9c9bbd261da68fff1 Author: Dan Carpenter Date: Tue Jan 7 16:03:22 2020 +0300 drm/i915: fix an error code in intel_modeset_all_tiles() There is a cut and paste bug so we return the wrong error code. Fixes: a603f5bd1691 ("drm/i915/dp: Make sure all tiled connectors get added to the state with full modeset") Signed-off-by: Dan Carpenter Reviewed-by: José Roberto de Souza Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200107130322.gdk5b6jurifr26c2@kili.mountain commit 62bf5465b26d1f502430b9c654be7d16bf2e242d Author: YueHaibing Date: Tue Jan 7 21:50:14 2020 +0800 drm/i915: Add missing include file Fix build error: ./drivers/gpu/drm/i915/selftests/i915_random.h: In function i915_prandom_u32_max_state: ./drivers/gpu/drm/i915/selftests/i915_random.h:48:23: error: implicit declaration of function mul_u32_u32; did you mean mul_u64_u32_div? [-Werror=implicit-function-declaration] return upper_32_bits(mul_u32_u32(prandom_u32_state(state), ep_ro)); Reported-by: Hulk Robot Fixes: 7ce5b6850b47 ("drm/i915/selftests: Use mul_u32_u32() for 32b x 32b -> 64b result") Signed-off-by: YueHaibing Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200107135014.36472-1-yuehaibing@huawei.com commit b18398c16e176513502f962b642f89225039ef1f Author: Boris Brezillon Date: Tue Jan 7 12:30:31 2020 +0100 drm/bridge: Fix a NULL pointer dereference in drm_atomic_bridge_chain_check() drm_atomic_bridge_chain_check() callers can pass a NULL bridge. Let's bail out before dereferencing the bridge pointer when that happens. Reported-by: Chris Wilson Fixes: b86d895524ab ("drm/bridge: Add an ->atomic_check() hook") Signed-off-by: Boris Brezillon Reviewed-by: Laurent Pinchart Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200107113031.435604-1-boris.brezillon@collabora.com commit bde9e6b9ba755e35768261a5ea15541a4c4b4de8 Author: Adrian Huang Date: Mon Dec 30 13:56:54 2019 +0800 iommu/amd: Fix typos for PPR macros The bit 13 and bit 14 of the IOMMU control register are PPRLogEn and PPRIntEn. They are related to PPR (Peripheral Page Request) instead of 'PPF'. Fix them accrodingly. Signed-off-by: Adrian Huang Signed-off-by: Joerg Roedel commit 858defad2ae2b0ec9a0350d1414da2c2c933a054 Author: Adrian Huang Date: Tue Dec 24 22:46:47 2019 +0800 iommu/amd: Remove local variables The usage of the local variables 'range' and 'misc' was removed from commit 226e889b20a9 ("iommu/amd: Remove first/last_device handling") and commit 23c742db2171 ("iommu/amd: Split out PCI related parts of IOMMU initialization"). So, remove them accrodingly. Signed-off-by: Adrian Huang Signed-off-by: Joerg Roedel commit 260718b3a35d23fe89d27cc7b5e8bd30f4bba1aa Author: Guido Günther Date: Mon Jan 6 16:48:53 2020 +0100 leds: lm3692x: Disable chip on brightness 0 Otherwise there's a noticeable glow even with brightness 0. Also turning off the regulator can save additional power. Signed-off-by: Guido Günther Signed-off-by: Pavel Machek commit 4a8d2bee2080d32511b70d8558036894f42617fd Author: Guido Günther Date: Mon Jan 6 16:48:52 2020 +0100 leds: lm3692x: Split out lm3692x_leds_disable Move the relevant parts out of lm3692x_remove() and call it from there. No functional change. Signed-off-by: Guido Günther Acked-by: Pavel Machek Signed-off-by: Pavel Machek commit 5e9d7b6f433628b3e178bbf1ca62fe1965afe361 Author: Guido Günther Date: Mon Jan 6 16:48:51 2020 +0100 leds: lm3692x: Move lm3692x_init and rename to lm3692x_leds_enable This moves lm3692x_init so it can be used from lm3692x_brightness_set. Rename to lm3692_leds_enable to pair up with lm3692x_leds_disable. No functional change. Signed-off-by: Guido Günther Acked-by: Pavel Machek Signed-off-by: Pavel Machek commit df7083b57331da0222380392d8d0d8b39972bef9 Author: Guido Günther Date: Mon Jan 6 16:48:50 2020 +0100 leds: lm3692x: Make sure we don't exceed the maximum LED current The current is given by the formular from page 12 of https://www.ti.com/lit/ds/symlink/lm36922.pdf. We use this to limit the led's max_brightness using the led-max-microamp DT property. The formula for the lm36923 is identical according to the data sheet. Signed-off-by: Guido Günther Acked-by: Pavel Machek Signed-off-by: Pavel Machek commit e2726daea583d81e447b71e09b79e67f618d6152 Author: Lu Baolu Date: Thu Jan 2 08:18:22 2020 +0800 iommu/vt-d: debugfs: Add support to show page table internals Export page table internals of the domain attached to each device. Example of such dump on a Skylake machine: $ sudo cat /sys/kernel/debug/iommu/intel/domain_translation_struct [ ... ] Device 0000:00:14.0 with pasid 0 @0x15f3d9000 IOVA_PFN PML5E PML4E 0x000000008ced0 | 0x0000000000000000 0x000000015f3da003 0x000000008ced1 | 0x0000000000000000 0x000000015f3da003 0x000000008ced2 | 0x0000000000000000 0x000000015f3da003 0x000000008ced3 | 0x0000000000000000 0x000000015f3da003 0x000000008ced4 | 0x0000000000000000 0x000000015f3da003 0x000000008ced5 | 0x0000000000000000 0x000000015f3da003 0x000000008ced6 | 0x0000000000000000 0x000000015f3da003 0x000000008ced7 | 0x0000000000000000 0x000000015f3da003 0x000000008ced8 | 0x0000000000000000 0x000000015f3da003 0x000000008ced9 | 0x0000000000000000 0x000000015f3da003 PDPE PDE PTE 0x000000015f3db003 0x000000015f3dc003 0x000000008ced0003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced1003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced2003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced3003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced4003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced5003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced6003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced7003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced8003 0x000000015f3db003 0x000000015f3dc003 0x000000008ced9003 [ ... ] Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit b802d070a52a1565b47daaa808872cfbd4a17b01 Author: Lu Baolu Date: Thu Jan 2 08:18:21 2020 +0800 iommu/vt-d: Use iova over first level After we make all map/unmap paths support first level page table. Let's turn it on if hardware supports scalable mode. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 64229e8f37cf0fc460e611dacc9f14561ddfd018 Author: Lu Baolu Date: Thu Jan 2 08:18:20 2020 +0800 iommu/vt-d: Update first level super page capability First-level translation may map input addresses to 4-KByte pages, 2-MByte pages, or 1-GByte pages. Support for 4-KByte pages and 2-Mbyte pages are mandatory for first-level translation. Hardware support for 1-GByte page is reported through the FL1GP field in the Capability Register. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit cb8b892dcecf279004967daab7791deb921cbcbe Author: Lu Baolu Date: Thu Jan 2 08:18:19 2020 +0800 iommu/vt-d: Make first level IOVA canonical First-level translation restricts the input-address to a canonical address (i.e., address bits 63:N have the same value as address bit [N-1], where N is 48-bits with 4-level paging and 57-bits with 5-level paging). (section 3.6 in the spec) This makes first level IOVA canonical by using IOVA with bit [N-1] always cleared. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 33cd6e642d6a76c1d338ce25cba5fd79a5029011 Author: Lu Baolu Date: Thu Jan 2 08:18:18 2020 +0800 iommu/vt-d: Flush PASID-based iotlb for iova over first level When software has changed first-level tables, it should invalidate the affected IOTLB and the paging-structure-caches using the PASID- based-IOTLB Invalidate Descriptor defined in spec 6.5.2.4. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit ddf09b6d43ece8e4d5591e4957e89c4fe7714792 Author: Lu Baolu Date: Thu Jan 2 08:18:17 2020 +0800 iommu/vt-d: Setup pasid entries for iova over first level Intel VT-d in scalable mode supports two types of page tables for IOVA translation: first level and second level. The IOMMU driver can choose one from both for IOVA translation according to the use case. This sets up the pasid entry if a domain is selected to use the first-level page table for iova translation. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 87208f22a4d942ce880e7bf092158eecd6ffa293 Author: Lu Baolu Date: Thu Jan 2 08:18:16 2020 +0800 iommu/vt-d: Add PASID_FLAG_FL5LP for first-level pasid setup Current intel_pasid_setup_first_level() use 5-level paging for first level translation if CPUs use 5-level paging mode too. This makes sense for SVA usages since the page table is shared between CPUs and IOMMUs. But it makes no sense if we only want to use first level for IOVA translation. Add PASID_FLAG_FL5LP bit in the flags which indicates whether the 5-level paging mode should be used. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 2cd1311a26673d45ffa8b7c8f46a8c7023601491 Author: Lu Baolu Date: Thu Jan 2 08:18:15 2020 +0800 iommu/vt-d: Add set domain DOMAIN_ATTR_NESTING attr This adds the Intel VT-d specific callback of setting DOMAIN_ATTR_NESTING domain attribution. It is necessary to let the VT-d driver know that the domain represents a virtual machine which requires the IOMMU hardware to support nested translation mode. Return success if the IOMMU hardware suports nested mode, otherwise failure. Signed-off-by: Yi Sun Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit a1948f2e0a9d7ba6b9af883c673986752d9da52d Author: Lu Baolu Date: Thu Jan 2 08:18:14 2020 +0800 iommu/vt-d: Identify domains using first level page table This checks whether a domain should use the first level page table for map/unmap and marks it in the domain structure. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 8e3391cfdcd40eb4034014f8e6f8e9cbeb5335e7 Author: Lu Baolu Date: Thu Jan 2 08:18:13 2020 +0800 iommu/vt-d: Loose requirement for flush queue initializaton Currently if flush queue initialization fails, we return error or enforce the system-wide strict mode. These are unnecessary because we always check the existence of a flush queue before queuing any iova's for lazy flushing. Printing a informational message is enough. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 10f8008f0f884c3f8b6c8ea8f0f84540beda86be Author: Lu Baolu Date: Thu Jan 2 08:18:12 2020 +0800 iommu/vt-d: Avoid iova flush queue in strict mode If Intel IOMMU strict mode is enabled by users, it's unnecessary to create the iova flush queue. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 984d03adc9bdfb1bea408f9cc41a67214ccdffd3 Author: Lu Baolu Date: Thu Jan 2 08:18:11 2020 +0800 iommu/vt-d: trace: Extend map_sg trace event Current map_sg stores trace message in a coarse manner. This extends it so that more detailed messages could be traced. The map_sg trace message looks like: map_sg: dev=0000:00:17.0 [1/9] dev_addr=0xf8f90000 phys_addr=0x158051000 size=4096 map_sg: dev=0000:00:17.0 [2/9] dev_addr=0xf8f91000 phys_addr=0x15a858000 size=4096 map_sg: dev=0000:00:17.0 [3/9] dev_addr=0xf8f92000 phys_addr=0x15aa13000 size=4096 map_sg: dev=0000:00:17.0 [4/9] dev_addr=0xf8f93000 phys_addr=0x1570f1000 size=8192 map_sg: dev=0000:00:17.0 [5/9] dev_addr=0xf8f95000 phys_addr=0x15c6d0000 size=4096 map_sg: dev=0000:00:17.0 [6/9] dev_addr=0xf8f96000 phys_addr=0x157194000 size=4096 map_sg: dev=0000:00:17.0 [7/9] dev_addr=0xf8f97000 phys_addr=0x169552000 size=4096 map_sg: dev=0000:00:17.0 [8/9] dev_addr=0xf8f98000 phys_addr=0x169dde000 size=4096 map_sg: dev=0000:00:17.0 [9/9] dev_addr=0xf8f99000 phys_addr=0x148351000 size=4096 Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 034d473109e90784868297870f456c9687f84058 Author: Jacob Pan Date: Thu Jan 2 08:18:10 2020 +0800 iommu/vt-d: Misc macro clean up for SVM Use combined macros for_each_svm_dev() to simplify SVM device iteration and error checking. Suggested-by: Andy Shevchenko Signed-off-by: Jacob Pan Reviewed-by: Eric Auger Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 5f75585e19cc7018bf2016aa771632081ee2f313 Author: Jacob Pan Date: Thu Jan 2 08:18:09 2020 +0800 iommu/vt-d: Avoid sending invalid page response Page responses should only be sent when last page in group (LPIG) or private data is present in the page request. This patch avoids sending invalid descriptors. Fixes: 5d308fc1ecf53 ("iommu/vt-d: Add 256-bit invalidation descriptor support") Signed-off-by: Jacob Pan Reviewed-by: Eric Auger Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 59a623374dc38f7724457c59753c3f02fac6aed6 Author: Jacob Pan Date: Thu Jan 2 08:18:08 2020 +0800 iommu/vt-d: Replace Intel specific PASID allocator with IOASID Make use of generic IOASID code to manage PASID allocation, free, and lookup. Replace Intel specific code. Signed-off-by: Jacob Pan Reviewed-by: Eric Auger Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 39d630e332144028f56abba83d94291978e72df1 Author: Jacob Pan Date: Thu Jan 2 08:18:07 2020 +0800 iommu/vt-d: Fix off-by-one in PASID allocation PASID allocator uses IDR which is exclusive for the end of the allocation range. There is no need to decrement pasid_max. Fixes: af39507305fb ("iommu/vt-d: Apply global PASID in SVA") Reported-by: Eric Auger Signed-off-by: Jacob Pan Reviewed-by: Eric Auger Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit d62efd4fa62be50fa1ff4433a83b14c51d320a27 Author: Jacob Pan Date: Thu Jan 2 08:18:06 2020 +0800 iommu/vt-d: Avoid duplicated code for PASID setup After each setup for PASID entry, related translation caches must be flushed. We can combine duplicated code into one function which is less error prone. Signed-off-by: Jacob Pan Reviewed-by: Eric Auger Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 6eba09a4b5d583ad18a2a1fd1b82aee8cc3ac542 Author: Jacob Pan Date: Thu Jan 2 08:18:05 2020 +0800 iommu/vt-d: Reject SVM bind for failed capability check Add a check during SVM bind to ensure CPU and IOMMU hardware capabilities are met. Signed-off-by: Jacob Pan Reviewed-by: Eric Auger Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 79db7e1b4cf2a006f556099c13de3b12970fc6e3 Author: Jacob Pan Date: Thu Jan 2 08:18:04 2020 +0800 iommu/vt-d: Match CPU and IOMMU paging mode When setting up first level page tables for sharing with CPU, we need to ensure IOMMU can support no less than the levels supported by the CPU. It is not adequate, as in the current code, to set up 5-level paging in PASID entry First Level Paging Mode(FLPM) solely based on CPU. Currently, intel_pasid_setup_first_level() is only used by native SVM code which already checks paging mode matches. However, future use of this helper function may not be limited to native SVM. https://lkml.org/lkml/2019/11/18/1037 Fixes: 437f35e1cd4c8 ("iommu/vt-d: Add first level page table interface") Signed-off-by: Jacob Pan Reviewed-by: Eric Auger Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit ff3dc6521f78132eaaf62a842c3ece9060dcde26 Author: Jacob Pan Date: Thu Jan 2 08:18:03 2020 +0800 iommu/vt-d: Fix CPU and IOMMU SVM feature matching checks Shared Virtual Memory(SVM) is based on a collective set of hardware features detected at runtime. There are requirements for matching CPU and IOMMU capabilities. The current code checks CPU and IOMMU feature set for SVM support but the result is never stored nor used. Therefore, SVM can still be used even when these checks failed. The consequences can be: 1. CPU uses 5-level paging mode for virtual address of 57 bits, but IOMMU can only support 4-level paging mode with 48 bits address for DMA. 2. 1GB page size is used by CPU but IOMMU does not support it. VT-d unrecoverable faults may be generated. The best solution to fix these problems is to prevent them in the first place. This patch consolidates code for checking PASID, CPU vs. IOMMU paging mode compatibility, as well as provides specific error messages for each failed checks. On sane hardware configurations, these error message shall never appear in kernel log. Signed-off-by: Jacob Pan Reviewed-by: Eric Auger Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 046182525db611964da0db113dde9d3a2969085c Author: Lu Baolu Date: Thu Jan 2 08:18:02 2020 +0800 iommu/vt-d: Add Kconfig option to enable/disable scalable mode This adds Kconfig option INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON to make it easier for distributions to enable or disable the Intel IOMMU scalable mode by default during kernel build. Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel commit 9a4c22740291103623c700d7a330c29ac8843dd5 Author: Ben Dooks (Codethink) Date: Wed Dec 18 10:16:02 2019 +0000 pinctrl: artpec6: fix __iomem on reg in set The artpec6_pconf_set should have marked reg as __iomem, which ends up making sparse complain about address space conversions. Add the __iomem to silence the following warnings: drivers/pinctrl/pinctrl-artpec6.c:814:13: warning: incorrect type in assignment (different address spaces) drivers/pinctrl/pinctrl-artpec6.c:814:13: expected unsigned int *reg drivers/pinctrl/pinctrl-artpec6.c:814:13: got void [noderef] * drivers/pinctrl/pinctrl-artpec6.c:825:34: warning: incorrect type in argument 1 (different address spaces) drivers/pinctrl/pinctrl-artpec6.c:825:34: expected void const volatile [noderef] *addr drivers/pinctrl/pinctrl-artpec6.c:825:34: got unsigned int *reg drivers/pinctrl/pinctrl-artpec6.c:827:25: warning: incorrect type in argument 2 (different address spaces) drivers/pinctrl/pinctrl-artpec6.c:827:25: expected void volatile [noderef] *addr drivers/pinctrl/pinctrl-artpec6.c:827:25: got unsigned int *reg drivers/pinctrl/pinctrl-artpec6.c:837:34: warning: incorrect type in argument 1 (different address spaces) drivers/pinctrl/pinctrl-artpec6.c:837:34: expected void const volatile [noderef] *addr drivers/pinctrl/pinctrl-artpec6.c:837:34: got unsigned int *reg drivers/pinctrl/pinctrl-artpec6.c:840:25: warning: incorrect type in argument 2 (different address spaces) drivers/pinctrl/pinctrl-artpec6.c:840:25: expected void volatile [noderef] *addr drivers/pinctrl/pinctrl-artpec6.c:840:25: got unsigned int *reg drivers/pinctrl/pinctrl-artpec6.c:850:34: warning: incorrect type in argument 1 (different address spaces) drivers/pinctrl/pinctrl-artpec6.c:850:34: expected void const volatile [noderef] *addr drivers/pinctrl/pinctrl-artpec6.c:850:34: got unsigned int *reg drivers/pinctrl/pinctrl-artpec6.c:853:25: warning: incorrect type in argument 2 (different address spaces) drivers/pinctrl/pinctrl-artpec6.c:853:25: expected void volatile [noderef] *addr drivers/pinctrl/pinctrl-artpec6.c:853:25: got unsigned int *reg drivers/pinctrl/pinctrl-artpec6.c:864:34: warning: incorrect type in argument 1 (different address spaces) drivers/pinctrl/pinctrl-artpec6.c:864:34: expected void const volatile [noderef] *addr drivers/pinctrl/pinctrl-artpec6.c:864:34: got unsigned int *reg drivers/pinctrl/pinctrl-artpec6.c:867:25: warning: incorrect type in argument 2 (different address spaces) drivers/pinctrl/pinctrl-artpec6.c:867:25: expected void volatile [noderef] *addr drivers/pinctrl/pinctrl-artpec6.c:867:25: got unsigned int *reg Signed-off-by: Ben Dooks (Codethink) Link: https://lore.kernel.org/r/20191218101602.2442868-1-ben.dooks@codethink.co.uk [Changed unsigned int -> void for the reg pointer] Signed-off-by: Linus Walleij commit 94f7a2cb42bf7a2f8400ae461d899c8e5566bfdf Author: Paul Cercueil Date: Tue Jan 7 00:27:11 2020 +0100 pinctrl: ingenic: Use devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() instead of platform_get_resource + devm_ioremap_resource. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200106232711.559727-6-paul@crapouillou.net Signed-off-by: Linus Walleij commit f831f93af676587c938459f7f0833707f3b623c1 Author: Paul Cercueil Date: Tue Jan 7 00:27:10 2020 +0100 pinctrl: ingenic: Factorize irq_set_type function Simplify the code of the driver's irq_set_type() function by doing some factorization. The behaviour is unchanged. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200106232711.559727-5-paul@crapouillou.net Signed-off-by: Linus Walleij commit 5ffdbb7ec9facf6d9854c67960f7ba3a4de86f58 Author: Paul Cercueil Date: Tue Jan 7 00:27:09 2020 +0100 pinctrl: ingenic: Remove duplicated ingenic_chip_info structures Until there is the need to handle the JZ4760B and X1000E differently there is no reason to use a separate ingenic_chip_info since the data it contains is the same than for the JZ4760 and X1000 respectively. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200106232711.559727-4-paul@crapouillou.net Signed-off-by: Linus Walleij commit baf15647387e82c18933fcf6c9c2dd77e18e950f Author: Paul Cercueil Date: Tue Jan 7 00:27:08 2020 +0100 pinctrl: ingenic: Put ingenic_chip_info pointer in match data Instead of passing a numeric ID as match data, and retrieve a pointer to the ingenic_chip_info structure in an ugly succession of if/else in the probe function, get the pointer to the ingenic_chip_info structure directly from the match data, and store the numeric ID inside the ingenic_chip_info structure. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200106232711.559727-3-paul@crapouillou.net Signed-off-by: Linus Walleij commit 5ec008bfac7da212fa0d3dea6d30c372bd7034f2 Author: Paul Cercueil Date: Tue Jan 7 00:27:07 2020 +0100 pinctrl: ingenic: Remove platform ID table We enforce devicetree support in the Kconfig and all Ingenic boards without exception probe their drivers from devicetree. The code path to probe the driver from arch code can then be considered as dead code and removed. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200106232711.559727-2-paul@crapouillou.net Signed-off-by: Linus Walleij commit 5ab0c8e90191622750e29e5dc413f65ab290519a Author: Martin Blumenstingl Date: Thu Dec 26 20:14:25 2019 +0100 pinctrl: meson: meson8b: add the GPIOH pinmux settings for ETH_RXD{2,3} GPIOH_5 and GPIOH_6 can have two Ethernet related functions: - GPIOH_5 can be ETH_TXD1 or ETH_RXD3 - GPIOH_6 can be ETH_TXD0 or ETH_RXD2 Add the bits for eth_rxd3_h and eth_rxd2_h so the ETH_RXD function can be disabled when using the ETH_TXD function of GPIOH_{5,6}. No problem was observed so far, but in theory this could lead to two different signals being routed to the same pad (which could break Ethernet). These settings were found in the public "Amlogic Ethernet controller user guide": http://openlinux.amlogic.com/@api/deki/files/75/=Amlogic_Ethenet_controller_user_Guide.pdf Signed-off-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20191226191425.3797490-1-martin.blumenstingl@googlemail.com Reviewed-by: Neil Armstrong Signed-off-by: Linus Walleij commit 4611e73f3670cef28027d12c272da80ae06cc86e Author: Julia Lawall Date: Wed Jan 1 08:43:34 2020 +0100 pinctrl: nuvoton: npcm7xx: constify copied structure The npcmgpio_irqchip structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1577864614-5543-17-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Linus Walleij commit 8b1704bde133d216e16027ddb1f24ee8322fcfec Author: Julia Lawall Date: Wed Jan 1 08:43:32 2020 +0100 pinctrl: qcom: ssbi-gpio: constify copied structure The pm8xxx_pinctrl_desc structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1577864614-5543-15-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Linus Walleij commit a2800cdb4337f9404b7bc74c41a8e890035ce48a Author: Julia Lawall Date: Wed Jan 1 08:43:26 2020 +0100 pinctrl: ssbi-mpp: constify copied structure The pm8xxx_pinctrl_desc structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1577864614-5543-9-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Linus Walleij commit 2cb81261a967ee93825efc9af591d346eca51112 Merge: 227caae52bcf 2a2cabd8bc17 Author: Linus Walleij Date: Tue Jan 7 13:53:39 2020 +0100 Merge tag 'gpio-updates-for-v5.6-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel gpio updates for v5.6 - improvements in the gpio-pca953x driver - use platform_irq_count() in gpio-mvebu and gpio-bcm-kona - remove unneeded MODULE_VERSION() usage in the gpio directory - irq-related improvements in gpio-tegra driver - several improvements for the core subsystem code: fix confusing indentation, fix int type casting, unduplicate code in several places commit bbc55341b9c67645d1a5471506370caf7dd4a203 Author: Sebastian Andrzej Siewior Date: Fri Dec 20 20:59:06 2019 +0100 x86/fpu: Deactivate FPU state after failure during state load In __fpu__restore_sig(), fpu_fpregs_owner_ctx needs to be reset if the FPU state was not fully restored. Otherwise the following may happen (on the same CPU): Task A Task B fpu_fpregs_owner_ctx *active* A.fpu __fpu__restore_sig() ctx switch load B.fpu *active* B.fpu fpregs_lock() copy_user_to_fpregs_zeroing() copy_kernel_to_xregs() *modify* copy_user_to_xregs() *fails* fpregs_unlock() ctx switch skip loading B.fpu, *active* B.fpu In the success case, fpu_fpregs_owner_ctx is set to the current task. In the failure case, the FPU state might have been modified by loading the init state. In this case, fpu_fpregs_owner_ctx needs to be reset in order to ensure that the FPU state of the following task is loaded from saved state (and not skipped because it was the previous state). Reset fpu_fpregs_owner_ctx after a failure during restore occurred, to ensure that the FPU state for the next task is always loaded. The problem was debugged-by Yu-cheng Yu . [ bp: Massage commit message. ] Fixes: 5f409e20b7945 ("x86/fpu: Defer FPU state load until return to userspace") Reported-by: Yu-cheng Yu Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Dave Hansen Cc: Fenghua Yu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jann Horn Cc: Peter Zijlstra Cc: "Ravi V. Shankar" Cc: Rik van Riel Cc: Thomas Gleixner Cc: Tony Luck Cc: x86-ml Link: https://lkml.kernel.org/r/20191220195906.plk6kpmsrikvbcfn@linutronix.de commit 227caae52bcf245a5f6f73c3e26c3ef656735c5e Author: Song Hui Date: Fri Nov 22 14:18:39 2019 +0800 gpio: mpc8xxx: ls1088a/ls1028a edge detection mode bug fixs. On these boards, the irq_set_type must point one valid function pointer that can correctly set both edge and falling edge. Signed-off-by: Song Hui Link: https://lore.kernel.org/r/20191122061839.24904-1-hui.song_1@nxp.com Signed-off-by: Linus Walleij commit e36eaf94be8f7bc4e686246eed3cf92d845e2ef8 Author: Jia-Ju Bai Date: Wed Dec 18 21:26:05 2019 +0800 gpio: gpio-grgpio: fix possible sleep-in-atomic-context bugs in grgpio_irq_map/unmap() The driver may sleep while holding a spinlock. The function call path (from bottom to top) in Linux 4.19 is: drivers/gpio/gpio-grgpio.c, 261: request_irq in grgpio_irq_map drivers/gpio/gpio-grgpio.c, 255: _raw_spin_lock_irqsave in grgpio_irq_map drivers/gpio/gpio-grgpio.c, 318: free_irq in grgpio_irq_unmap drivers/gpio/gpio-grgpio.c, 299: _raw_spin_lock_irqsave in grgpio_irq_unmap request_irq() and free_irq() can sleep at runtime. To fix these bugs, request_irq() and free_irq() are called without holding the spinlock. These bugs are found by a static analysis tool STCheck written by myself. Signed-off-by: Jia-Ju Bai Link: https://lore.kernel.org/r/20191218132605.10594-1-baijiaju1990@gmail.com Signed-off-by: Linus Walleij commit 25d071b3f6dbe4c4b9c9d0df76fbe9292310e799 Author: Jia-Ju Bai Date: Thu Dec 19 21:14:59 2019 +0800 gpio: gpio-grgpio: fix possible sleep-in-atomic-context bugs in grgpio_remove() drivers/gpio/gpiolib-sysfs.c, 796: mutex_lock in gpiochip_sysfs_unregister drivers/gpio/gpiolib.c, 1455: gpiochip_sysfs_unregister in gpiochip_remove drivers/gpio/gpio-grgpio.c, 460: gpiochip_remove in grgpio_remove drivers/gpio/gpio-grgpio.c, 449: _raw_spin_lock_irqsave in grgpio_remove kernel/irq/irqdomain.c, 243: mutex_lock in irq_domain_remove drivers/gpio/gpio-grgpio.c, 463: irq_domain_remove in grgpio_remove drivers/gpio/gpio-grgpio.c, 449: _raw_spin_lock_irqsave in grgpio_remove mutex_lock() can sleep at runtime. To fix these bugs, the lock is dropped in grgpio_remove(), because there is no need for locking in remove() callbacks. These bugs are found by a static analysis tool STCheck written by myself. Signed-off-by: Jia-Ju Bai Link: https://lore.kernel.org/r/20191219131459.18640-1-baijiaju1990@gmail.com Signed-off-by: Linus Walleij commit 048ae7e8b5dbee053b208fd93d68bc2125fed03c Author: Lukas Bulwahn Date: Sat Dec 14 12:49:13 2019 +0100 fmc: remove left-over ipmi-fru.h after fmc deletion Commit 6a80b30086b8 ("fmc: Delete the FMC subsystem") from Linus Walleij deleted the obsolete FMC subsystem, but missed the MAINTAINERS entry and include/linux/ipmi-fru.h mentioned in the MAINTAINERS entry. Later, commit d5d4aa1ec198 ("MAINTAINERS: Remove FMC subsystem") from Denis Efremov cleaned up the MAINTAINERS entry, but actually also missed that include/linux/ipmi-fru.h should also be deleted while deleting its reference in MAINTAINERS. So, deleting include/linux/ipmi-fru.h slipped through the previous clean-ups. As there is no further use for include/linux/ipmi-fru.h, finally delete include/linux/ipmi-fru.h for good now. Fixes: d5d4aa1ec198 ("MAINTAINERS: Remove FMC subsystem") Fixes: 6a80b30086b8 ("fmc: Delete the FMC subsystem") Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20191214114913.8610-1-lukas.bulwahn@gmail.com Acked-by: Federico Vaga Signed-off-by: Linus Walleij commit 7a7b99bf801efd09b3202bf5b6216d70cb1363f1 Author: Luigi Semenzato Date: Thu Jan 2 15:19:40 2020 -0800 PM: hibernate: Add more logging on hibernation failure Hibernation fails when the kernel cannot allocate enough memory to copy all pages of RAM in use. Ensure that the failure reason is clearly logged, and clearly attributable to the hibernation module. Signed-off-by: Luigi Semenzato [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki commit 809ed78a832df8b4ef81fee03570566c8f088f3a Author: Wen Yang Date: Fri Jan 3 23:54:58 2020 +0800 PM: hibernate: improve arithmetic division in preallocate_highmem_fraction() do_div() does a 64-by-32 division. Use div64_u64() instead of do_div() if the divisor is u64, to avoid truncation to 32-bit. This change also cleans up code a tad. Signed-off-by: Wen Yang [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki commit eed0f953b90e86e765197a1dad06bb48aedc27fe Author: Andreas Gruenbacher Date: Sun Dec 8 13:12:49 2019 +0000 gfs2: Another gfs2_find_jhead fix On filesystems with a block size smaller than the page size, gfs2_find_jhead can split a page across two bios (for example, when blocks are not allocated consecutively). When that happens, the first bio that completes will unlock the page in its bi_end_io handler even though the page hasn't been read completely yet. Fix that by using a chained bio for the rest of the page. While at it, clean up the sector calculation logic in gfs2_log_alloc_bio. In gfs2_find_jhead, simplify the disk block and offset calculation logic and fix a variable name. Fixes: f4686c26ecc3 ("gfs2: read journal in large chunks") Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Andreas Gruenbacher commit 2dfbf9d2873a0f76a6c6ad727711a4391d7936b7 Author: Dhinakaran Pandiyan Date: Tue Dec 17 15:23:29 2019 +0200 drm/i915/tgl: Gen-12 display can decompress surfaces compressed by the media engine Detect the modifier corresponding to media compression to enable display decompression for YUV and xRGB packed formats. A new modifier is added so that the driver can distinguish between media and render compressed buffers. Unlike render decompression, plane 6 and plane 7 do not support media decompression. v2: Fix checkpatch warnings on code style (Lucas) From DK: Separate modifier array for planes that cannot decompress media (Ville) v3: Support planar formats v4: Switch plane order v5: - Use format block descriptors to get CCS subsampling calculation right everywhere. - Extend the plane state normal view array to accommodate 4 color planes. - Use helpers to convert between main and CCS planes. v6: Add missing packed YUV formats to the MC format list. (Yang) v7: Align UV planes to tile-row size. Cc: Nanley G Chery Cc: Ville Syrjälä Cc: Matt Roper Cc: Yang A Shi Cc: Radhakrishna Sripada Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Lucas De Marchi Signed-off-by: Imre Deak Reviewed-by: Radhakrishna Sripada Link: https://patchwork.freedesktop.org/patch/msgid/20191231233756.18753-8-imre.deak@intel.com commit a7007efa673cf07dc374ad6cf85ae8e65ee1337f Author: Dhinakaran Pandiyan Date: Mon Oct 28 13:40:38 2019 -0700 drm/fb: Extend format_info member arrays to handle four planes addfb() uAPI has supported four planes for a while now, make format_info compatible with that. Cc: Ville Syrjälä Cc: Matt Roper Cc: Mika Kahola Cc: dri-devel@lists.freedesktop.org Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Imre Deak Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20191231233756.18753-7-imre.deak@intel.com commit 0d3d29d0f8f17a5ed22f424ca1ff4c047f7ef1cb Author: Dhinakaran Pandiyan Date: Mon Oct 28 13:40:37 2019 -0700 drm/framebuffer: Format modifier for Intel Gen-12 media compression Gen-12 display can decompress surfaces compressed by the media engine, add a new modifier as the driver needs to know the surface was compressed by the media or render engine. v2: Update code comment describing the color plane order for YUV semiplanar formats. Cc: Nanley G Chery Cc: Matt Roper Cc: Ville Syrjälä Cc: Mika Kahola Cc: dri-devel@lists.freedesktop.org Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Lucas De Marchi Signed-off-by: Imre Deak Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20191231233756.18753-6-imre.deak@intel.com commit 577687bfaae465f2c5770892af79da2d83a0e686 Author: Imre Deak Date: Thu Dec 26 01:27:41 2019 +0200 drm/i915: Make sure plane dims are correct for UV CCS planes As intel_fb_plane_get_subsampling() returns the subsampling factor wrt. its main plane, for a CCS plane we need to apply both the main and the CCS plane's subsampling factor on the FB's dimensions to get the CCS plane's dimensions. Cc: Dhinakaran Pandiyan Cc: Mika Kahola Cc: Radhakrishna Sripada Cc: Ville Syrjälä Cc: Matt Roper Signed-off-by: Imre Deak Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20191231233756.18753-5-imre.deak@intel.com commit 5cf15dfca91c1174e6ca659e29dcbe9bd137a552 Author: Imre Deak Date: Fri Dec 27 20:03:02 2019 +0200 drm/i915: Add debug message for FB plane[0].offset!=0 error Print a debug message if the FB plane[0] offset is not 0 as expected, to help understainding an add FB IOCTL fail. Cc: Chris Wilson Cc: Ville Syrjälä Cc: Mika Kahola Signed-off-by: Imre Deak Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20191231233756.18753-4-imre.deak@intel.com commit d156135e6a546e4aada969282a21065a15c5f643 Author: Imre Deak Date: Wed Dec 25 21:03:36 2019 +0200 drm/i915/tgl: Make sure a semiplanar UV plane is tile row size aligned Currently the GGTT offset of a UV plane in a semiplanar YUV FB is tile size (4kB) aligned. I noticed, that enforcing only this alignment leads oddly to random memory corruptions on TGL while scanning out Y-tiled FBs. This issue can be easily reproduced with a UV plane offset that is not aligned to the plane's tile row size. Some experiments showed the correct alignment to be tile row size indeed. This also makes sense, since the de-tiling fence created for the object - with its own stride and so "left" and "right" edge - applies to all the planes in the FB, so each tile row of all planes should be tile row aligned. In fact BSpec requires this alignment since SKL. On SKL we may enforce this due to the AUX plane x,y coords check, but on ICL and TGL we don't. For now enforce this only on TGL; I can follow up with any necessary change for ICL after more tests. BSpec requires a stricter alignment for linear UV planes too (kind of a tile row alignment), but it's unclear whether that's really needed (couldn't be explained with the de-tiling fence as above) and enforcing that could break existing user space; so avoid that too for now until more tests. v2: - Clarify the commit log wrt. the address space the alignment applies to. (Chris) Cc: Chris Wilson Cc: Ville Syrjälä Signed-off-by: Imre Deak Acked-by: Chris Wilson Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20191231233756.18753-3-imre.deak@intel.com commit 7361bdb26c2ca6714a7a5a3d9dfe3b9db8acf985 Author: Imre Deak Date: Wed Dec 25 19:55:42 2019 +0200 drm/i915: Add support for non-power-of-2 FB plane alignment At least one framebuffer plane on TGL - the UV plane of YUV semiplanar FBs - requires a non-power-of-2 alignment, so add support for this. This new alignment restriction applies only to an offset within an FB, so the GEM buffer itself containing the FB must still be power-of-2 aligned. Add a check for this (in practice plane 0, since the plane 0 offset must be 0). v2: - Fix WARN check for alignment=0. v3: - Return error for alignment programming bugs. (Chris) Cc: Chris Wilson Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191231233756.18753-2-imre.deak@intel.com commit eeb09917c138ccd6d9a1c8410891ca2fa5feb5ea Author: Bai Yingjie Date: Mon Jan 6 12:29:54 2020 +0800 powerpc/mpc85xx: also write addr_h to spin table for 64bit boot entry CPU like P4080 has 36bit physical address, its DDR physical start address can be configured above 4G by LAW registers. For such systems in which their physical memory start address was configured higher than 4G, we need also to write addr_h into the spin table of the target secondary CPU, so that addr_h and addr_l together represent a 64bit physical address. Otherwise the secondary core can not get correct entry to start from. Signed-off-by: Bai Yingjie Acked-by: Scott Wood Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200106042957.26494-2-yingjie_bai@126.com commit 6ad4afc97bc6c5cca9786030492ddfab871ce79e Author: Bai Yingjie Date: Mon Jan 6 12:29:53 2020 +0800 powerpc32/booke: consistently return phys_addr_t in __pa() When CONFIG_RELOCATABLE=y is set, VIRT_PHYS_OFFSET is a 64bit variable, thus __pa() returns as 64bit value. But when CONFIG_RELOCATABLE=n, __pa() returns 32bit value. When CONFIG_PHYS_64BIT is set, __pa() should consistently return as 64bit value irrelevant to CONFIG_RELOCATABLE. So we'd make __pa() consistently return phys_addr_t, which is 64bit when CONFIG_PHYS_64BIT is set. Signed-off-by: Bai Yingjie Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200106042957.26494-1-yingjie_bai@126.com commit 552aa086944a9aeabd599892007c2c7faedb894e Author: Julia Lawall Date: Wed Jan 1 18:49:50 2020 +0100 powerpc/powernv: use resource_size Use resource_size rather than a verbose computation on the end and start fields. The semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) @@ struct resource ptr; @@ - (ptr.end - ptr.start + 1) + resource_size(&ptr) Signed-off-by: Julia Lawall Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1577900990-8588-11-git-send-email-Julia.Lawall@inria.fr commit bfbe37f0ce994e7a9945653d7624fadc5c500a9f Author: Julia Lawall Date: Wed Jan 1 18:49:45 2020 +0100 powerpc/83xx: use resource_size Use resource_size rather than a verbose computation on the end and start fields. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) @@ struct resource ptr; @@ - (ptr.end - ptr.start + 1) + resource_size(&ptr) Signed-off-by: Julia Lawall Acked-by: Scott Wood Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1577900990-8588-6-git-send-email-Julia.Lawall@inria.fr commit 2a2cabd8bc1715ceceb9d9566055f4a0a8ff749a Author: Bartosz Golaszewski Date: Tue Dec 24 13:07:02 2019 +0100 gpiolib: use gpiochip_get_desc() in gpio_ioctl() Unduplicate the offset check by simply calling gpiochip_get_desc() and checking its return value. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij commit 45e2360480b939173af70a2221ab63ffdaa1d325 Author: Bartosz Golaszewski Date: Tue Dec 24 13:07:01 2019 +0100 gpiolib: use gpiochip_get_desc() in lineevent_create() Unduplicate the ngpio check by simply calling gpiochip_get_desc() and checking its return value. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij commit 0f41dabe45df9fe68d3207c5b7af905db7c00ce4 Author: Bartosz Golaszewski Date: Tue Dec 24 13:07:00 2019 +0100 gpiolib: use gpiochip_get_desc() in linehandle_create() Unduplicate the ngpio check by simply calling gpiochip_get_desc() and checking its return value. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij commit 06863620edfeadbe9e0ea5eb01dd94ce07f37549 Author: Bartosz Golaszewski Date: Tue Dec 24 13:06:59 2019 +0100 gpiolib: convert the type of hwnum to unsigned int in gpiochip_get_desc() gpiochip_get_desc() takes a u16 hwnum, but it turns out most users don't respect that and usually pass an unsigned int. Since implicit casting to a smaller type is dangerous - let's change the type of hwnum to unsigned int in gpiochip_get_desc() and in gpiochip_request_own_desc() where the size of hwnum is not respected either and who's a user of the former. This is safe as we then check the hwnum against the number of lines before proceeding in gpiochip_get_desc(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij commit d90f36851d6595136b461773846b76e0c45e3e0c Author: Bartosz Golaszewski Date: Tue Dec 24 13:06:58 2019 +0100 gpiolib: have a single place of calling set_config() Instead of calling the gpiochip's set_config() callback directly and checking its existence every time - just add a new routine that performs this check internally. Call it in gpio_set_config() and gpiod_set_transitory(). Also call it in gpiod_set_debounce() and drop the check for chip->set() as it's irrelevant to this config option. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij commit a9001764c6fad9baf24172a4f585f7dcd6214c04 Author: Bartosz Golaszewski Date: Tue Dec 24 13:06:57 2019 +0100 gpiolib: use 'unsigned int' instead of 'unsigned' in gpio_set_config() Checkpatch complains about using 'unsigned' instead of 'unsigned int'. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij commit 5aa0c467519ccd862678a15885026660c271b5b0 Author: Colin Ian King Date: Mon Jan 6 12:05:58 2020 +0000 power: avs: fix uninitialized error return on failed cpr_read_fuse_uV() call Currently when the call cpr_read_fuse_uV returns an error the value in the uninitialized variable ret is returned. Fix this by instread returning the error value in the variable uV. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: bf6910abf548 ("power: avs: Add support for CPR (Core Power Reduction)") Signed-off-by: Colin Ian King Reviewed-by: Bjorn Andersson Signed-off-by: Rafael J. Wysocki commit 3cacb2086e41bbdf4a43e494d47d05db356992b9 Author: Thomas Zimmermann Date: Tue Nov 26 11:19:50 2019 +0100 drm/mgag200: Add module parameter to pin all buffers at offset 0 For hardware that does not interpret the startadd field correctly, add the module parameter 'hw_bug_no_startadd', which enables the workaround. v3: * style and typo fixes v2: * ask user for feedback if the option is active Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Cc: John Donnelly Link: https://patchwork.freedesktop.org/patch/msgid/20191126101950.11989-1-tzimmermann@suse.de commit 0fb5f69e19643569b6d42ce437a830e95555f1e5 Author: Thomas Zimmermann Date: Mon Jan 6 13:57:45 2020 +0100 drm/vram-helper: Support struct drm_driver.gem_create_object Drivers that what to allocate VRAM GEM objects with additional fields can now do this by implementing struct drm_driver.gem_create_object. v3: * separately check allocation failure in if/else branches before upcast to gbo v2: * only cast to gbo within if branch; set gbo directly in else branch Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200106125745.13797-9-tzimmermann@suse.de commit a4d46a8e268fcd0cc4235a23d1baabfc588f66f4 Author: Thomas Zimmermann Date: Mon Jan 6 13:57:44 2020 +0100 drm/vram-helper: Remove BO device from public interface TTM is an implementation detail of the VRAM helpers and therefore shouldn't be exposed to the callers. There's only one correct value for the BO device anyway, which is the one stored in the DRM device. So remove struct ttm_bo_device from the VRAM-helper interface and use the device's VRAM manager unconditionally. The GEM initializer function fails if the VRAM manager has not been initialized. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200106125745.13797-8-tzimmermann@suse.de commit ebe9428b3f60fd15f6b309cf0c65a995f1732c4f Author: Thomas Zimmermann Date: Mon Jan 6 13:57:43 2020 +0100 drm/vram-helper: Remove interruptible flag from public interface The flag 'interruptible', which is passed to various functions, is always set to be false. Remove it and hard-code the value. Signed-off-by: Thomas Zimmermann Suggested-by: Daniel Vetter Reviewed-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200106125745.13797-7-tzimmermann@suse.de commit 0528904926aab19bffb2068879aa44db166c6d5f Author: Jason Ekstrand Date: Thu Jan 2 14:27:54 2020 -0600 ACPI: button: Add DMI quirk for Razer Blade Stealth 13 late 2019 lid switch Running evemu-record on the lid switch event shows that the lid reports the first "close" but then never reports an "open". This causes systemd to continuously re-suspend the laptop every 30s. Resetting the _LID to "open" fixes the issue. Signed-off-by: Jason Ekstrand Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 643956e61ced913a2bbdcf2c95f3d03026b39d1c Author: Tian Tao Date: Mon Dec 30 19:56:28 2019 +0800 ACPI: PPTT: Consistently use unsigned int as parameter type The fourth parameter 'level' of function 'acpi_find_cache_level()' is a signed interger, but its caller 'acpi_find_cache_node()' passes that parameter an unsigned interger. Make the paramter type inconsistency go away. Signed-off-by: Tian Tao Signed-off-by: Xiongfeng Wang [ rjw: Subject/changelog ] Signed-off-by: Rafael J. Wysocki commit 5084ff33cac0988c1b979814501dcc2e1ecbf9c0 Author: Julia Lawall Date: Wed Jan 1 08:43:27 2020 +0100 powerpc/mpic: constify copied structure The mpic_ipi_chip and mpic_irq_ht_chip structures are only copied into other structures, so make them const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1577864614-5543-10-git-send-email-Julia.Lawall@inria.fr commit eabd5e7d8bf5994ad2e3aff22b84596b5b5485e8 Author: Qian Cai Date: Mon Jan 6 11:37:35 2020 -0500 drivers/base/test: fix global-out-of-bounds error Commit c032ace71c29 ("software node: add basic tests for property entries") introduced a global-out-of-bounds error because it forgot to add a terminator of "nodes "for software_node_register_nodes() to process. # Subtest: property-entry 1..7 ok 1 - pe_test_uints ok 2 - pe_test_uint_arrays ok 3 - pe_test_strings ok 4 - pe_test_bool ok 5 - pe_test_move_inline_u8 ok 6 - pe_test_move_inline_str ================================================================== BUG: KASAN: global-out-of-bounds in software_node_register_nodes+0x41/0x80 Read of size 8 at addr ffffffff989ef250 by task kunit_try_catch/316 CPU: 17 PID: 316 Comm: kunit_try_catch Not tainted 5.5.0-rc4-next-20200106+ #1 Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 03/09/2018 Call Trace: dump_stack+0xa0/0xea print_address_description.constprop.5.cold.7+0x64/0x384 __kasan_report.cold.8+0x7a/0xc0 kasan_report+0x12/0x20 __asan_load8+0x71/0xa0 software_node_register_nodes+0x41/0x80 pe_test_reference+0x1eb/0x1200 kunit_try_run_case+0x6b/0xd1 kunit_generic_run_threadfn_adapter+0x29/0x50 kthread+0x1e6/0x210 ret_from_fork+0x27/0x50 The buggy address belongs to the variable: nodes.21544+0x30/0x920 Memory state around the buggy address: ffffffff989ef100: fa fa fa fa 00 04 fa fa fa fa fa fa 00 00 00 00 ffffffff989ef180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffffff989ef200: fa fa fa fa 00 00 00 00 00 00 fa fa fa fa fa fa ^ ffffffff989ef280: 00 06 fa fa fa fa fa fa 00 00 04 fa fa fa fa fa ffffffff989ef300: 00 00 fa fa fa fa fa fa 00 05 fa fa fa fa fa fa ================================================================== Disabling lock debugging due to kernel taint ok 7 - pe_test_reference ok 8 - property-entry Fixes: c032ace71c29 ("software node: add basic tests for property entries") Signed-off-by: Qian Cai Reviewed-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki commit 64c76b31774db5a0c0ce8df13aef618912136e32 Author: Martin Blumenstingl Date: Thu Dec 26 20:12:24 2019 +0100 clk: clarify that clk_set_rate() does updates from top to bottom clk_set_rate() currently starts updating the rate for a clock at the top-most affected clock and then walks down the tree to update the bottom-most affected clock last. This behavior is important for protected clocks where we can switch between multiple parents to achieve the same output. An example for this is the mali clock tree on Amlogic SoCs: mali_0_mux (must not change when enabled) mali_0_div (must not change when enabled) mali_0 (gate) mali_1_mux (must not change when enabled) mali_1_div (must not change when enabled) mali_1 (gate) The final output can either use mali_0_gate or mali_1. To change the final output we must switch to the "inactive" tree. Assuming mali_0 is active, then we need to prepare mali_1 with the new desired rate and finally switch the output to the mali_1 tree. This process will then protect the mali_1 tree and at the same time unprotect the mali_0 tree. The next call to clk_set_rate() will then switch from the mali_1 tree back to mali_0. Acked-by: Stephen Boyd Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet commit 8daeaea99caabe24a0929fac17977ebfb882fa86 Author: Martin Blumenstingl Date: Thu Dec 26 20:12:23 2019 +0100 clk: meson: meson8b: make the CCF use the glitch-free mali mux The "mali_0" or "mali_1" clock trees should not be updated while the clock is running. Enforce this by setting CLK_SET_RATE_GATE on the "mali_0" and "mali_1" gates. This makes the CCF switch to the "mali_1" tree when "mali_0" is currently active and vice versa, which is exactly what the vendor driver does when updating the frequency of the mali clock. This fixes a potential hang when changing the GPU frequency at runtime. Fixes: 74e1f2521f16ff ("clk: meson: meson8b: add the GPU clock tree") Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet commit 10f9167664362bac6f44813687cf52fec9d15845 Author: Claudiu Beznea Date: Wed Dec 18 14:28:27 2019 +0200 mfd: atmel-hlcdc: Return in case of error For HLCDC timing engine configurations bit ATMEL_HLCDC_SIP of ATMEL_HLCDC_SR needs to be polled before applying new config. In case of timeout there is no indicator about this, so, return in case of timeout and also print a message about this. Signed-off-by: Claudiu Beznea Signed-off-by: Lee Jones commit 4b1ca3a4041093930c516f3e7bfe443fb5202107 Author: Claudiu Beznea Date: Wed Dec 18 14:28:26 2019 +0200 mfd: atmel-hlcdc: Add struct device member to struct atmel_hlcdc_regmap Add struct device member to struct atmel_hlcdc_regmap to be able to use dev_*() specific logging functions. Signed-off-by: Claudiu Beznea Signed-off-by: Lee Jones commit d5d3594db9f0de02c9073f1b7c7bcd7f805be02a Author: Ma Feng Date: Thu Dec 19 10:51:05 2019 +0800 pinctrl: armada-37xx: Remove unneeded semicolon Fixes coccicheck warning: drivers/pinctrl/mvebu/pinctrl-armada-37xx.c:736:2-3: Unneeded semicolon drivers/pinctrl/mvebu/pinctrl-armada-37xx.c:803:2-3: Unneeded semicolon Fixes: commit 5715092a458c ("pinctrl: armada-37xx: Add gpio support") commit 2f227605394b ("pinctrl: armada-37xx: Add irqchip support") Signed-off-by: Ma Feng Link: https://lore.kernel.org/r/1576723865-111331-1-git-send-email-mafeng.ma@huawei.com Signed-off-by: Linus Walleij commit a9a79514c2ba75de8c55e2fcd8a3bbf185caeb41 Author: Ben Dooks (Codethink) Date: Wed Dec 18 10:28:04 2019 +0000 pinctrl: qcom: make 'm_voc_groups' static The m_voc_groups is not declared outside of the driver, so make it static to avoid the following sparse wanrning: drivers/pinctrl/qcom/pinctrl-msm8976.c:592:12: warning: symbol 'm_voc_groups' was not declared. Should it be static? Signed-off-by: Ben Dooks (Codethink) Link: https://lore.kernel.org/r/20191218102804.2487374-1-ben.dooks@codethink.co.uk Reviewed-by: Bjorn Andersson Signed-off-by: Linus Walleij commit dbaf10027ae92a66f0dfad33e1e3453daa16373f Author: Nishad Kamdar Date: Wed Dec 25 17:50:58 2019 +0530 vfio-ccw: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related to S/390 common i/o drivers. It assigns explicit block comment to the SPDX License Identifier. Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Fixes: 3cd90214b70f ("vfio: ccw: add tracepoints for interesting error paths") Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Message-Id: <20191225122054.GA4598@nishad> Signed-off-by: Cornelia Huck commit e351e4d5eaec713b2d4780c79f68702e88f2a212 Author: Boris Brezillon Date: Mon Jan 6 15:34:09 2020 +0100 drm/bridge: Add the necessary bits to support bus format negotiation drm_bridge_state is extended to describe the input and output bus configurations. These bus configurations are exposed through the drm_bus_cfg struct which encodes the configuration of a physical bus between two components in an output pipeline, usually between two bridges, an encoder and a bridge, or a bridge and a connector. The bus configuration is stored in drm_bridge_state separately for the input and output buses, as seen from the point of view of each bridge. The bus configuration of a bridge output is usually identical to the configuration of the next bridge's input, but may differ if the signals are modified between the two bridges, for instance by an inverter on the board. The input and output configurations of a bridge may differ if the bridge modifies the signals internally, for instance by performing format conversion, or*modifying signals polarities. Bus format negotiation is automated by the core, drivers just have to implement the ->atomic_get_{output,input}_bus_fmts() hooks if they want to take part to this negotiation. Negotiation happens in reverse order, starting from the last element of the chain (the one directly connected to the display) up to the first element of the chain (the one connected to the encoder). During this negotiation all supported formats are tested until we find one that works, meaning that the formats array should be in decreasing preference order (assuming the driver has a preference order). Note that the bus format negotiation works even if some elements in the chain don't implement the ->atomic_get_{output,input}_bus_fmts() hooks. In that case, the core advertises only MEDIA_BUS_FMT_FIXED and lets the previous bridge element decide what to do (most of the time, bridge drivers will pick a default bus format or extract this piece of information from somewhere else, like a FW property). Signed-off-by: Boris Brezillon Signed-off-by: Neil Armstrong Reviewed by: Jernej Skrabec Tested-by: Jonas Karlman [narmstrong: fixed doc in include/drm/drm_bridge.h:69 fmt->format] Link: https://patchwork.freedesktop.org/patch/msgid/20200106143409.32321-5-narmstrong@baylibre.com commit b86d895524ab7281da8ca788e3666ab622fc8620 Author: Boris Brezillon Date: Mon Jan 6 15:34:08 2020 +0100 drm/bridge: Add an ->atomic_check() hook So that bridge drivers have a way to check/reject an atomic operation. The drm_atomic_bridge_chain_check() (which is just a wrapper around the ->atomic_check() hook) is called in place of drm_bridge_chain_mode_fixup() (when ->atomic_check() is not implemented, the core falls back on ->mode_fixup(), so the behavior should stay the same for existing bridge drivers). Signed-off-by: Boris Brezillon Reviewed-by: Neil Armstrong Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong Reviewed by: Jernej Skrabec Tested-by: Jonas Karlman Link: https://patchwork.freedesktop.org/patch/msgid/20200106143409.32321-4-narmstrong@baylibre.com commit f7619a58ef9299c42a604ede063bb6e5b88098fb Author: Boris Brezillon Date: Mon Jan 6 15:34:07 2020 +0100 drm/bridge: Patch atomic hooks to take a drm_bridge_state This way the drm_bridge_funcs interface is consistent with the rest of the subsystem. The only driver implementing those hooks (analogix DP) is patched too. Signed-off-by: Boris Brezillon Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong Reviewed by: Jernej Skrabec Tested-by: Jonas Karlman [narmstrong: renamed state as old_bridge_state in rcar_lvds_atomic_disable] Link: https://patchwork.freedesktop.org/patch/msgid/20200106143409.32321-3-narmstrong@baylibre.com commit 6ed7e9625fa6a6ee8230945820544767ed5799c4 Author: Boris Brezillon Date: Mon Jan 6 15:34:06 2020 +0100 drm/bridge: Add a drm_bridge_state object One of the last remaining objects to not have its atomic state. This is being motivated by our attempt to support runtime bus-format negotiation between elements of the bridge chain. This patch just paves the road for such a feature by adding a new drm_bridge_state object inheriting from drm_private_obj so we can re-use some of the existing state initialization/tracking logic. Signed-off-by: Boris Brezillon Reviewed-by: Neil Armstrong Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong Reviewed by: Jernej Skrabec Tested-by: Jonas Karlman Link: https://patchwork.freedesktop.org/patch/msgid/20200106143409.32321-2-narmstrong@baylibre.com commit f314f20b70356d9bb2bf1c854fae49922b626f6b Author: Peng Fan Date: Wed Dec 18 12:43:56 2019 +0000 pinctrl: sunxi: sun50i-h5 use platform_irq_count platform_irq_count() is the more generic way (independent of device trees) to determine the count of available interrupts. So use this instead. As platform_irq_count() might return an error code (which of_irq_count doesn't) some additional handling is necessary. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1576672860-14420-2-git-send-email-peng.fan@nxp.com Signed-off-by: Linus Walleij commit 8ead819f1befae08182c772b6fdf8ac201b34566 Author: chenqiwu Date: Tue Jan 7 15:53:19 2020 +0800 cpufreq: s3c: fix unbalances of cpufreq policy refcount The cpufreq_reboot_notifier_evt() call cpufreq_cpu_get() to get the cpufreq policy of cpu0, meanwhile, it also increments the kobject reference count to mark it busy. However, a corresponding call of cpufreq_cpu_put() is ignored to decrement the kobject reference count back, which may lead to a potential stuck risk that the cpuhp thread deadly waits for dropping of kobject refcount when cpufreq policy free. With this patch, the cpuhp thread can be easily exercised by attempting to force an unbind of the CPUfreq driver. Signed-off-by: chenqiwu Signed-off-by: Viresh Kumar commit 83fe39ad0a489200d731c78bfdd40e199e5a9cd2 Author: Anson Huang Date: Thu Dec 26 14:52:47 2019 +0800 cpufreq: imx-cpufreq-dt: Add i.MX8MP support Add i.MX8MP cpufreq DT support for speed grading and market segment check. Reviewed-by: Abel Vesa Signed-off-by: Anson Huang [ Viresh: Minor formatting fixes ] Signed-off-by: Viresh Kumar commit 24f371f77e101c0ed05cdbe22d95ad7683f9de88 Author: Anson Huang Date: Thu Dec 26 14:52:46 2019 +0800 cpufreq: Use imx-cpufreq-dt for i.MX8MP's speed grading Add i.MX8MP to blacklist, so that imx-cpufreq-dt driver can handle speed grading bits just like other i.MX8M SoCs. Signed-off-by: Anson Huang Signed-off-by: Viresh Kumar commit 308beafc37fec92507d76e9115274ed1c230aa0d Author: Yangtao Li Date: Sun Dec 15 14:05:22 2019 +0000 cpufreq: tegra186: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Viresh Kumar commit af9c8e9184f5f3952db9f4e8078e1e9de3c99c32 Author: Yangtao Li Date: Sun Dec 15 14:05:21 2019 +0000 cpufreq: kirkwood: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Viresh Kumar commit 30c8fa3ec61a46da80698e1f8ab95df4d42bf374 Author: Georgi Djakov Date: Fri Jun 7 16:57:37 2019 +0300 interconnect: qcom: Add MSM8916 interconnect provider driver Add driver for the Qualcomm interconnect buses found in MSM8916 based platforms. The topology consists of three NoCs that are controlled by a remote processor that collects the aggregated bandwidth for each master-slave pairs. Reviewed-by: Evan Green Signed-off-by: Georgi Djakov commit ebb37bd06460fff8d6f54f7731f593b7b52143ca Author: Georgi Djakov Date: Thu Aug 15 13:06:12 2019 +0300 dt-bindings: interconnect: Add Qualcomm MSM8916 DT bindings The Qualcomm MSM8916 platform has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand. Reviewed-by: Rob Herring Signed-off-by: Georgi Djakov commit 7d7899c5297be8cd6095bcddecbbedccb34dd161 Author: Georgi Djakov Date: Mon Jan 6 19:27:46 2020 +0200 interconnect: Check for valid path in icc_set_bw() Use IS_ERR() to ensure that the path passed to icc_set_bw() is valid. Reviewed-by: Evan Green Reviewed-by: Bjorn Andersson Signed-off-by: Georgi Djakov commit 22a7fa8848c5e881d87ef2f7f3c2ea77b286e6f9 Author: Shile Zhang Date: Mon Dec 16 11:07:29 2019 +0800 x86/unwind/orc: Fix !CONFIG_MODULES build warning To fix follwowing warning due to ORC sort moved to build time: arch/x86/kernel/unwind_orc.c:210:12: warning: ‘orc_sort_cmp’ defined but not used [-Wunused-function] arch/x86/kernel/unwind_orc.c:190:13: warning: ‘orc_sort_swap’ defined but not used [-Wunused-function] Signed-off-by: Shile Zhang Reported-by: Stephen Rothwell Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Josh Poimboeuf Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/c9c81536-2afc-c8aa-c5f8-c7618ecd4f54@linux.alibaba.com Signed-off-by: Ingo Molnar commit 50cc02e599ef1e049473358604dc07d32b751e2c Author: Frederic Weisbecker Date: Fri Dec 27 17:36:12 2019 +0100 x86/context-tracking: Remove exception_enter/exit() from KVM_PV_REASON_PAGE_NOT_PRESENT async page fault This is a leftover. Page faults, just like most other exceptions, are protected inside user_exit() / user_enter() calls in x86 entry code when we fault from userspace. So this pair of calls is now superfluous. Signed-off-by: Frederic Weisbecker Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Jim Mattson Cc: Joerg Roedel Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Radim Krčmář Cc: Sean Christopherson Cc: Thomas Gleixner Cc: Vitaly Kuznetsov Cc: Wanpeng Li Link: https://lkml.kernel.org/r/20191227163612.10039-3-frederic@kernel.org Signed-off-by: Ingo Molnar commit ee6352b2c47a24234398e06381edd93a8e965976 Author: Frederic Weisbecker Date: Fri Dec 27 17:36:11 2019 +0100 x86/context-tracking: Remove exception_enter/exit() from do_page_fault() do_page_fault(), like other exceptions, is already covered by user_enter() and user_exit() when the exception triggers in userspace. As explained in: 8c84014f3bbb11 ("x86/entry: Remove exception_enter() from most trap handlers") exception_enter/exit() only remained to handle possible page fault from kernel mode while context tracking is in CONTEXT_USER mode, ie: on kernel entry before we manage to call user_exit(). The only known offender was do_fast_syscall_32() fetching EBP register from where vDSO stashed it. Meanwhile this got fixed in: 9999c8c01f34c9 ("x86/entry: Call enter_from_user_mode() with IRQs off") that moved enter_from_user_mode() before the call to get_user(). So we can safely remove it now. Signed-off-by: Frederic Weisbecker Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Jim Mattson Cc: Joerg Roedel Cc: Linus Torvalds Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Radim Krčmář Cc: Sean Christopherson Cc: Thomas Gleixner Cc: Vitaly Kuznetsov Cc: Wanpeng Li Link: https://lkml.kernel.org/r/20191227163612.10039-2-frederic@kernel.org Signed-off-by: Ingo Molnar commit 194efb6e2667cc226fa92a6a4ab5d2298b5b85d9 Author: Stephen Boyd Date: Fri Aug 30 08:09:22 2019 -0700 clk: gate: Add support for specifying parents via DT/pointers After commit fc0c209c147f ("clk: Allow parents to be specified without string names") we can use DT or direct clk_hw pointers to specify parents. Create a generic function that shouldn't be used very often to encode the multitude of ways of registering a gate clk with different parent information. Then add a bunch of wrapper macros that only pass down what needs to be passed down to the generic function to support this with less arguments. Cc: Manivannan Sadhasivam Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20190830150923.259497-12-sboyd@kernel.org commit 9611b3aacc1c1af7cb96d35ca5f1e55fdd44f697 Author: Stephen Boyd Date: Fri Aug 30 08:09:21 2019 -0700 clk: mux: Add support for specifying parents via DT/pointers After commit fc0c209c147f ("clk: Allow parents to be specified without string names") we can use DT or direct clk_hw pointers to specify parents. Create a generic function that shouldn't be used very often to encode the multitude of ways of registering a mux clk with different parent information. Then add a bunch of wrapper macros that only pass down what needs to be passed down to the generic function to support this with less arguments. Note: the msm drm driver passes an anonymous array through the macro which seems to confuse my compiler. Adding a parenthesis around the whole thing at the call site seems to fix it but it must be wrong. Maybe it's better to split this patch and pick out the array bits there? Cc: Rob Clark Cc: Sean Paul Cc: Manivannan Sadhasivam Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20190830150923.259497-11-sboyd@kernel.org commit 728e3096741a50cb04f3a4d713001a7fd48acc17 Author: Stephen Boyd Date: Fri Aug 30 08:09:20 2019 -0700 clk: asm9260: Use parent accuracy in fixed rate clk This fixed rate clk is registered with the accuracy of the parent. Use CLK_FIXED_RATE_PARENT_ACCURACY for that instead of getting the parent clk and finding out the accuracy that way. Cc: Manivannan Sadhasivam Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20190830150923.259497-10-sboyd@kernel.org commit 1f1bb96d3a1ac8c02878a437927a00840cc62e70 Author: Stephen Boyd Date: Fri Aug 30 08:09:19 2019 -0700 clk: fixed-rate: Document that accuracy isn't a rate This kernel-doc talks about a rate for the accuracy. That's wrong. Cc: Manivannan Sadhasivam Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20190830150923.259497-9-sboyd@kernel.org commit 58f0c4ba565d91bb76e8ac2a809e99bfe75b4935 Author: Stephen Boyd Date: Fri Aug 30 08:09:18 2019 -0700 clk: fixed-rate: Add clk flags for parent accuracy Some clk providers want to use the accuracy of the parent clk and use the fixed rate basic type clk to do that. This requires getting the parent clk and extracting the accuracy before registering the fixed rate clk. Let's add a flag for this and update the clk_ops to support this. Cc: Manivannan Sadhasivam Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20190830150923.259497-8-sboyd@kernel.org commit 2552c123e8a7c5c7ba17db1dead36f16b15c1cc3 Author: Rajeshwari Date: Mon Jan 6 18:59:28 2020 +0530 arm64: dts: qcom: sc7180: Add critical interrupt and cooling maps for TSENS in SC7180 Added critical interrupt support in TSENS node and cooling maps in Thermal-zones node. Reviewed-by: Amit Kucheria Signed-off-by: Rajeshwari Link: https://lore.kernel.org/r/1578317369-16045-2-git-send-email-rkambl@codeaurora.org Signed-off-by: Bjorn Andersson commit 105663f73e71b5e79ecf472c0499c9acde654b28 Author: André Almeida Date: Mon Jan 6 15:08:18 2020 -0300 blk-mq: Document functions for sending request Add or improve documentation for function regarding creating and sending IO requests to the hardware. Signed-off-by: André Almeida Signed-off-by: Jens Axboe commit a754bd5f1874978f55814b4498f66e4a0fd5b256 Author: Herbert Xu Date: Mon Dec 23 16:13:51 2019 +0800 block: Allow t10-pi to be modular Currently t10-pi can only be built into the block layer which via crc-t10dif pulls in a whole chunk of the Crypto API. In fact all users of t10-pi work as modules and there is no reason for it to always be built-in. This patch adds a new hidden option for t10-pi that is selected automatically based on BLK_DEV_INTEGRITY and whether the users of t10-pi are built-in or not. Signed-off-by: Herbert Xu Signed-off-by: Jens Axboe commit 5528e0d7f1511e7cb2d84677051c1af5bbf22f96 Merge: 1b935183aeff a299df3524ea Author: David S. Miller Date: Mon Jan 6 18:44:48 2020 -0800 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2020-01-06 This series contains updates to igc to add basic support for timestamping. Vinicius adds basic support for timestamping and enables ptp4l/phc2sys to work with i225 devices. Initially, adds the ability to read and adjust the PHC clock. Patches 2 & 3 enable and retrieve hardware timestamps. Patch 4 implements the ethtool ioctl that ptp4l uses to check what timestamping methods are supported. Lastly, added support to do timestamping using the "Start of Packet" signal from the PHY, which is now supported in i225 devices. While i225 does support multiple PTP domains, with multiple timestamping registers, we currently only support one PTP domain and use only one of the timestamping registers for implementation purposes. ==================== Signed-off-by: David S. Miller commit 1b935183aeff11256b20a490b5ed37116b054fe2 Merge: 50d31037e430 8ddf0b5693f6 Author: David S. Miller Date: Mon Jan 6 18:30:15 2020 -0800 Merge branch 'Unique-mv88e6xxx-IRQ-names' Andrew Lunn says: ==================== Unique mv88e6xxx IRQ names There are a few boards which have multiple mv88e6xxx switches. With such boards, it can be hard to determine which interrupts belong to which switches. Make the interrupt names unique by including the device name in the interrupt name. For the SERDES interrupt, also include the port number. As a result of these patches ZII devel C looks like: 50: 0 gpio-vf610 27 Level mv88e6xxx-0.1:00 54: 0 mv88e6xxx-g1 3 Edge mv88e6xxx-0.1:00-g1-atu-prob 56: 0 mv88e6xxx-g1 5 Edge mv88e6xxx-0.1:00-g1-vtu-prob 58: 0 mv88e6xxx-g1 7 Edge mv88e6xxx-0.1:00-g2 61: 0 mv88e6xxx-g2 1 Edge !mdio-mux!mdio@1!switch@0!mdio:01 62: 0 mv88e6xxx-g2 2 Edge !mdio-mux!mdio@1!switch@0!mdio:02 63: 0 mv88e6xxx-g2 3 Edge !mdio-mux!mdio@1!switch@0!mdio:03 64: 0 mv88e6xxx-g2 4 Edge !mdio-mux!mdio@1!switch@0!mdio:04 70: 0 mv88e6xxx-g2 10 Edge mv88e6xxx-0.1:00-serdes-10 75: 0 mv88e6xxx-g2 15 Edge mv88e6xxx-0.1:00-watchdog 76: 5 gpio-vf610 26 Level mv88e6xxx-0.2:00 80: 0 mv88e6xxx-g1 3 Edge mv88e6xxx-0.2:00-g1-atu-prob 82: 0 mv88e6xxx-g1 5 Edge mv88e6xxx-0.2:00-g1-vtu-prob 84: 4 mv88e6xxx-g1 7 Edge mv88e6xxx-0.2:00-g2 87: 2 mv88e6xxx-g2 1 Edge !mdio-mux!mdio@2!switch@0!mdio:01 88: 0 mv88e6xxx-g2 2 Edge !mdio-mux!mdio@2!switch@0!mdio:02 89: 0 mv88e6xxx-g2 3 Edge !mdio-mux!mdio@2!switch@0!mdio:03 90: 0 mv88e6xxx-g2 4 Edge !mdio-mux!mdio@2!switch@0!mdio:04 95: 3 mv88e6xxx-g2 9 Edge mv88e6xxx-0.2:00-serdes-9 96: 0 mv88e6xxx-g2 10 Edge mv88e6xxx-0.2:00-serdes-10 101: 0 mv88e6xxx-g2 15 Edge mv88e6xxx-0.2:00-watchdog Interrupt names like !mdio-mux!mdio@2!switch@0!mdio:01 are created by phylib for the integrated PHYs. The mv88e6xxx driver does not determine these names. ==================== Tested-by: Chris Healy Signed-off-by: David S. Miller commit 8ddf0b5693f64a0f71ee4b20332ab4cdc390fc76 Author: Andrew Lunn Date: Mon Jan 6 17:13:52 2020 +0100 net: dsa: mv88e6xxx: Unique ATU and VTU IRQ names Dynamically generate a unique interrupt name for the VTU and ATU, based on the device name. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 06acd1148bb35a0c4144fec0a97685974dc89e61 Author: Andrew Lunn Date: Mon Jan 6 17:13:51 2020 +0100 net: dsa: mv88e6xxx: Unique g2 IRQ name Dynamically generate a unique g2 interrupt name, based on the device name. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 8b4db28914b5b49e296884739d9710aedb2c368e Author: Andrew Lunn Date: Mon Jan 6 17:13:50 2020 +0100 net: dsa: mv88e6xxx: Unique watchdog IRQ name Dynamically generate a unique watchdog interrupt name, based on the device name. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit e6f2f6b824a3f9af4a719545f691c303d510b26e Author: Andrew Lunn Date: Mon Jan 6 17:13:49 2020 +0100 net: dsa: mv88e6xxx: Unique SERDES interrupt names Dynamically generate a unique SERDES interrupt name, based on the device name and the port the SERDES is for. For example: 95: 3 mv88e6xxx-g2 9 Edge mv88e6xxx-0.2:00-serdes-9 96: 0 mv88e6xxx-g2 10 Edge mv88e6xxx-0.2:00-serdes-10 The 0.2:00 indicates the switch and -9 indicates port 9. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 3095383a8ab4cff7d5a891a5293d064b0b4e4874 Author: Andrew Lunn Date: Mon Jan 6 17:13:48 2020 +0100 net: dsa: mv88e6xxx: Unique IRQ name Dynamically generate a unique switch interrupt name, based on the device name. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 7a4b51947475a7f67e2bd06c4a4c768e2e64a975 Author: Hridya Valsaraju Date: Mon Jan 6 10:13:29 2020 -0800 selinux: allow per-file labelling for binderfs This patch allows genfscon per-file labeling for binderfs. This is required to have separate permissions to allow access to binder, hwbinder and vndbinder devices which are relocating to binderfs. Acked-by: Jeff Vander Stoep Acked-by: Mark Salyzyn Signed-off-by: Hridya Valsaraju Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit e3915ad94bfa0e2c1818837af618e9adec74eb1b Author: Vladimir Zapolskiy Date: Thu Jan 2 14:01:18 2020 +0200 erofs: remove void tagging/untagging of workgroup pointers Because workgroup pointers inserted to a radix tree are always tagged with a single value of 0, it is possible to remove tagging and untagging of the pointers completely. Signed-off-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/20200102120118.14979-4-vladimir@tuxera.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit e5e9a432036a40756db171e7b22ee63e69c41ef1 Author: Vladimir Zapolskiy Date: Thu Jan 2 14:01:17 2020 +0200 erofs: remove unused tag argument while registering a workgroup All workgroups are registered with tag value set to 0, to simplify erofs_register_workgroup() interface the tag argument can be removed, if its only value is sent down to the function body. Signed-off-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/20200102120118.14979-3-vladimir@tuxera.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 997626d8383871862d0774c50a351aa98dacc0eb Author: Vladimir Zapolskiy Date: Thu Jan 2 14:01:16 2020 +0200 erofs: remove unused tag argument while finding a workgroup It is feasible to simplify erofs_find_workgroup() interface by removing an unused function argument. While formally the argument is used in the function itself, its assigned value is ignored on the caller side. Signed-off-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/20200102120118.14979-2-vladimir@tuxera.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit a55861c800ae0593b7d343470918f6f84063e3b8 Author: Vladimir Zapolskiy Date: Thu Jan 2 14:02:32 2020 +0200 erofs: correct indentation of an assigned structure inside a function Trivial change, the expected indentation ruled by the coding style hasn't been met. Signed-off-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/20200102120232.15074-1-vladimir@tuxera.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 7e78c875143b639dca887e335f7d045480ec28d8 Author: liuyang34 Date: Tue Jan 7 09:39:18 2020 +0800 selinuxfs: use scnprintf to get real length for inode The return value of snprintf maybe over the size of TMPBUFLEN, use scnprintf instead in sel_read_class and sel_read_perm. Signed-off-by: liuyang34 [PM: cleaned up the description] Signed-off-by: Paul Moore commit baac82fe06db16f36bf216dd0c8ca0eaa1e28b97 Author: Rob Herring Date: Wed Nov 20 17:41:13 2019 -0600 dt-bindings: arm: Convert arm,idle-state binding to DT schema Convert the Arm idle-state binding to a DT schema. Cc: Lorenzo Pieralisi Signed-off-by: Rob Herring commit 4b4e41f35cc700e328e693f0c18b24424ab47ff0 Author: Ben Dooks (Codethink) Date: Wed Dec 18 10:20:13 2019 +0000 pinctrl: actions: remove duplicate dsi entry The dsi entry is defined identically twice, so remove the second one to remove the sparse warning: drivers/pinctrl/actions/pinctrl-s700.c:1581:10: warning: Initializer entry defined twice drivers/pinctrl/actions/pinctrl-s700.c:1586:10: also defined here Signed-off-by: Ben Dooks (Codethink) Link: https://lore.kernel.org/r/20191218102013.2465038-1-ben.dooks@codethink.co.uk Signed-off-by: Linus Walleij commit 0434cd276e7265d6db2bc389a021b795ec16fa69 Author: Rahul Tanwar Date: Wed Dec 18 14:20:24 2019 +0800 dt-bindings: pinctrl: intel: Update to use generic bindings Kernel 5.5 adds generic pin mux & cfg node schema. Update pinctrl bindings for LGM to use these newly added schemas. Also, rename filename to match the compatible string. Signed-off-by: Rahul Tanwar Link: https://lore.kernel.org/r/20191218062024.25475-1-rahul.tanwar@linux.intel.com Signed-off-by: Linus Walleij commit a299df3524eabc1def8e93bf005b07ea396ff2bd Author: Vinicius Costa Gomes Date: Mon Dec 2 15:19:53 2019 -0800 igc: Use Start of Packet signal from PHY for timestamping For better accuracy, i225 is able to do timestamping using the Start of Packet signal from the PHY. Signed-off-by: Vinicius Costa Gomes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 4805746420a96011af78437552f5231deef6f295 Author: Ben Dooks (Codethink) Date: Wed Dec 18 11:04:56 2019 +0000 pinctrl: tegra: fix missing __iomem in suspend/resume The functions should have __iomem on the register pointer so add that to silence the following sparse warnings: drivers/pinctrl/tegra/pinctrl-tegra.c:657:22: warning: incorrect type in assignment (different address spaces) drivers/pinctrl/tegra/pinctrl-tegra.c:657:22: expected unsigned int [usertype] *regs drivers/pinctrl/tegra/pinctrl-tegra.c:657:22: got void [noderef] * drivers/pinctrl/tegra/pinctrl-tegra.c:659:42: warning: incorrect type in argument 1 (different address spaces) drivers/pinctrl/tegra/pinctrl-tegra.c:659:42: expected void const volatile [noderef] *addr drivers/pinctrl/tegra/pinctrl-tegra.c:659:42: got unsigned int [usertype] * drivers/pinctrl/tegra/pinctrl-tegra.c:675:22: warning: incorrect type in assignment (different address spaces) drivers/pinctrl/tegra/pinctrl-tegra.c:675:22: expected unsigned int [usertype] *regs drivers/pinctrl/tegra/pinctrl-tegra.c:675:22: got void [noderef] * drivers/pinctrl/tegra/pinctrl-tegra.c:677:25: warning: incorrect type in argument 2 (different address spaces) drivers/pinctrl/tegra/pinctrl-tegra.c:677:25: expected void volatile [noderef] *addr drivers/pinctrl/tegra/pinctrl-tegra.c:677:25: got unsigned int [usertype] * Signed-off-by: Ben Dooks (Codethink) Link: https://lore.kernel.org/r/20191218110456.2533088-1-ben.dooks@codethink.co.uk Reviewed-by: Dmitry Osipenko Acked-by: Thierry Reding Signed-off-by: Linus Walleij commit 60dbede0c4f3d7b1a1f56d1f91bbca3c5a73f7f5 Author: Vinicius Costa Gomes Date: Mon Dec 2 15:19:52 2019 -0800 igc: Add support for ethtool GET_TS_INFO command This command allows igc to report what types of timestamping are supported. ptp4l uses this to detect if the hardware supports timestamping. Signed-off-by: Vinicius Costa Gomes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit d7da2a1e4e0840faced2891e1c5b668f9eea18f8 Author: 周琰杰 (Zhou Yanjie) Date: Mon Dec 16 00:21:04 2019 +0800 pinctrl: Ingenic: Add pinctrl driver for X1830. Add support for probing the pinctrl-ingenic driver on the X1830 Soc from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/1576426864-35348-7-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit 8bc49f4489bb1a4552a10f51bc642286509a9694 Author: 周琰杰 (Zhou Yanjie) Date: Mon Dec 16 00:21:03 2019 +0800 dt-bindings: pinctrl: Add bindings for Ingenic X1830. Add the pinctrl bindings for the X1830 Soc from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Acked-by: Rob Herring Link: https://lore.kernel.org/r/1576426864-35348-6-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit f742e5ebdd6332d887851cabb55c1b70535be331 Author: 周琰杰 (Zhou Yanjie) Date: Mon Dec 16 00:21:02 2019 +0800 pinctrl: Ingenic: Introduce reg_offset and use it instead hard code. Introduce "reg_offset", use it instead hard code "0x100", it will also be used for subsequent X1830 pinctrl driver. Signed-off-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/1576426864-35348-5-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit 3b31e9b0eaaad3240110037a5572c891d11f8f83 Author: 周琰杰 (Zhou Yanjie) Date: Mon Dec 16 00:21:01 2019 +0800 pinctrl: Ingenic: Add missing parts for X1000 and X1500. 1.Add pinctrl drivers for the SPI flash controller (SFC) of X1000 and X1500. 2.Add pinctrl driver for the synchronous serial interface (SSI) of X1000. Signed-off-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/1576426864-35348-4-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit b4a9372ad7598c85bd87c510fd6d4844e17ec93d Author: 周琰杰 (Zhou Yanjie) Date: Mon Dec 16 00:21:00 2019 +0800 pinctrl: Ingenic: Fix bugs in X1000 and X1500. 1.Fix the pullup parameter of X1000. 2.X1000 and X1500 have only one set of uart1 hwflow pin mapping, so modify "uart1_hwflow_d" to "uart1_hwflow". 3.X1000 has only one set of mmc1 pin mapping, so modify "mmc1-1bit-e/mmc1-4bit-e" to "mmc1-1bit/mmc1-4bit". 4.X1000 has only one regular externel memory controller that does not support nand flash, so change "nemc_" to "emc_". 5.X1500 has only one set of mmc, so modify "mmc0_" to "mmc_". Signed-off-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/1576426864-35348-3-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit 2c344ae24501558b14341247abef41e0b420c090 Author: Vinicius Costa Gomes Date: Mon Dec 2 15:19:51 2019 -0800 igc: Add support for TX timestamping This adds support for timestamping packets being transmitted. Based on the code from i210. The basic differences is that i225 has 4 registers to store the transmit timestamps (i210 has one). Right now, we only support retrieving from one register, support for using the other registers will be added later. Signed-off-by: Vinicius Costa Gomes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit b71818cbda252fc0ceb09939518376141f3b63ce Author: Chen-Yu Tsai Date: Mon Jan 6 17:00:30 2020 +0800 arm64: dts: allwinner: sun50i-a64: Use macros for newly exported clocks A few clocks from the CCU were exported later, and references to them in the device tree were using raw numbers. Now that the DT binding header changes are in as well, switch to the macros for more clarity. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 765866edb16a3c2117c681977e3c64f9f62f2099 Author: Chen-Yu Tsai Date: Mon Jan 6 16:59:33 2020 +0800 ARM: dts: sunxi: Use macros for references to CCU clocks A few clocks from the CCU were exported later, and references to them in the device tree were using raw numbers. Now that the DT binding header changes are in as well, switch to the macros for more clarity. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 60d0426d7603e72329345060c52cc20154f32a4b Author: Chen-Yu Tsai Date: Mon Jan 6 16:58:20 2020 +0800 arm64: dts: allwinner: h5: Add Libre Computer ALL-H5-CC H5 board The Libre Computer ALL-H5-CC board is an upgraded version of the ALL-H3-CC. Changes include: - Gigabit Ethernet via external RTL8211E Ethernet PHY - 16 MiB SPI NOR flash memory - PoE tap header - Line out jack removed Only H5 variant test samples were made available, and the vendor is not certain whether other SoC variants would be made or not. Furthermore the board is a minor upgrade compared to the ALL-H3-CC. Thus the device tree simply includes the one for the ALL-H3-CC, and adds the changes on top. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 554581b7913942cd9b55b016c1369cdb448e8125 Author: Andre Przywara Date: Mon Jan 6 00:38:49 2020 +0000 ARM: dts: sun8i: R40: Add SPI controllers nodes and pinmuxes The Allwinner R40 SoC contains four SPI controllers, using the newer sun6i design (but at the legacy addresses). The controller seems to be fully compatible to the A64 one, so no driver changes are necessary. The first three controllers can be used on two sets of pins, but SPI3 is only routed to one set on Port A. Only the pin groups for SPI0 on PortC and SPI1 on PortI are added here, because those seem to be the only one exposed on the Bananapi boards. Tested by connecting a SPI flash to a Bananapi M2 Berry SPI0 and SPI1 header pins. Signed-off-by: Andre Przywara Signed-off-by: Maxime Ripard commit 81b055205e8ba2d400c8fa5845ba540a4a880a3a Author: Vinicius Costa Gomes Date: Mon Dec 2 15:19:50 2019 -0800 igc: Add support for RX timestamping This adds support for timestamping received packets. It is based on the i210, as many features of i225 work the same way. The main difference from i210 is that i225 has support for choosing the timer register to use when timestamping packets. Right now, we only support using timer 0. The other difference is that i225 stores two timestamps in the receive descriptor, right now, we only retrieve one. Signed-off-by: Vinicius Costa Gomes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 953068058454fa6572efccf4fa550a219ed8c69e Author: Krzysztof Kozlowski Date: Sat Jan 4 16:20:48 2020 +0100 dt-bindings: Rename Exynos to lowercase Fix up inconsistent usage of upper and lowercase letters in "Exynos" name. "EXYNOS" is not an abbreviation but a regular trademarked name. Therefore it should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Rob Herring commit 50d31037e430791a517d74631a28dc5e218242d2 Merge: 17aa23ee7234 4ac0ac847f05 Author: David S. Miller Date: Mon Jan 6 13:54:55 2020 -0800 Merge branch 'ethtool-allow-nesting-of-begin-and-complete-callbacks' Michal Kubecek says: ==================== ethtool: allow nesting of begin() and complete() callbacks The ethtool ioctl interface used to guarantee that ethtool_ops callbacks were always called in a block between calls to ->begin() and ->complete() (if these are defined) and that this whole block was executed with RTNL lock held: rtnl_lock(); ops->begin(); /* other ethtool_ops calls */ ops->complete(); rtnl_unlock(); This prevented any nesting or crossing of the begin-complete blocks. However, this is no longer guaranteed even for ioctl interface as at least ethtool_phys_id() releases RTNL lock while waiting for a timer. With the introduction of netlink ethtool interface, the begin-complete pairs are naturally nested e.g. when a request triggers a netlink notification. Fortunately, only minority of networking drivers implements begin() and complete() callbacks and most of those that do, fall into three groups: - wrappers for pm_runtime_get_sync() and pm_runtime_put() - wrappers for clk_prepare_enable() and clk_disable_unprepare() - begin() checks netif_running() (fails if false), no complete() First two have their own refcounting, third is safe w.r.t. nesting of the blocks. Only three in-tree networking drivers need an update to deal with nesting of begin() and complete() calls: via-velocity and epic100 perform resume and suspend on their own and wil6210 completely serializes the calls using its own mutex (which would lead to a deadlock if a request request triggered a netlink notification). The series addresses these problems. changes between v1 and v2: - fix inverted condition in epic100 ethtool_begin() (thanks to Andrew Lunn) ==================== Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 4ac0ac847f05bc49efb6ea9e8770f1dfec31f540 Author: Michal Kubecek Date: Mon Jan 6 07:39:41 2020 +0100 epic100: allow nesting of ethtool_ops begin() and complete() Unlike most networking drivers using begin() and complete() ethtool_ops callbacks to resume a device which is down and suspend it again when done, epic100 does not use standard refcounted infrastructure but sets device sleep state directly. With the introduction of netlink ethtool interface, we may have nested begin-complete blocks so that inner complete() would put the device back to sleep for the rest of the outer block. To avoid rewriting an old and not very actively developed driver, just add a nesting counter and only perform resume and suspend on the outermost level. Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller commit 71f711a4f1dd1f6ebc26870ef17ae79581f37ae7 Author: Michal Kubecek Date: Mon Jan 6 07:39:36 2020 +0100 via-velocity: allow nesting of ethtool_ops begin() and complete() Unlike most networking drivers using begin() and complete() ethtool_ops callbacks to resume a device which is down and suspend it again when done, via-velocity does not use standard refcounted infrastructure but sets device sleep state directly. With the introduction of netlink ethtool interface, we may have nested begin-complete blocks so that inner complete() would put the device back to sleep for the rest of the outer block. To avoid rewriting an old and not very actively developed driver, just add a nesting counter and only perform resume and suspend on the outermost level. Signed-off-by: Michal Kubecek Signed-off-by: David S. Miller commit a69faa09102bd2138bac5eea9d27dcf196118832 Author: Michal Kubecek Date: Mon Jan 6 07:39:31 2020 +0100 wil6210: get rid of begin() and complete() ethtool_ops The wil6210 driver locks a mutex in begin() ethtool_ops callback and unlocks it in complete() so that all ethtool requests are serialized. This is not going to work correctly with netlink interface; e.g. when ioctl triggers a netlink notification, netlink code would call begin() again while the mutex taken by ioctl code is still held by the same task. Let's get rid of the begin() and complete() callbacks and move the mutex locking into the remaining ethtool_ops handlers except get_drvinfo which only copies strings that are not changing so that there is no need for serialization. Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 17aa23ee72342efdc3b214f582399dd22478887f Author: David Ahern Date: Sun Jan 5 20:02:05 2020 -0800 fcnal-test: Fix vrf argument in local tcp tests The recent MD5 tests added duplicate configuration in the default VRF. This change exposed a bug in existing tests designed to verify no connection when client and server are not in the same domain. The server should be running bound to the vrf device with the client run in the default VRF (the -2 option is meant for validating connection data). Fix the option for both tests. While technically this is a bug in previous releases, the tests are properly failing since the default VRF does not have any routing configuration so there really is no need to backport to prior releases. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit b289ba5e07105548b8219695e5443d807a825eb8 Author: Christophe JAILLET Date: Sun Jan 5 18:36:07 2020 +0100 gtp: simplify error handling code in 'gtp_encap_enable()' 'gtp_encap_disable_sock(sk)' handles the case where sk is NULL, so there is no need to test it before calling the function. This saves a few line of code. Signed-off-by: Christophe JAILLET Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit f233789dfcd4b1e08fac86645c31932f88b291bb Merge: 02b0442c199f ef11ffa21b75 Author: David S. Miller Date: Mon Jan 6 13:38:37 2020 -0800 Merge branch 'mlxsw-Disable-checks-in-hardware-pipeline' Ido Schimmel says: ==================== mlxsw: Disable checks in hardware pipeline Amit says: The hardware pipeline contains some checks that, by default, are configured to drop packets. Since the software data path does not drop packets due to these reasons and since we are interested in offloading the software data path to hardware, then these checks should be disabled in the hardware pipeline as well. This patch set changes mlxsw to disable four of these checks and adds corresponding selftests. The tests pass both when the software data path is exercised (using veth pair) and when the hardware data path is exercised (using mlxsw ports in loopback). ==================== Signed-off-by: David S. Miller commit ef11ffa21b75c97780f345615e46e5e985406513 Author: Amit Cohen Date: Sun Jan 5 18:20:57 2020 +0200 selftests: forwarding: router: Add test case for destination IP link-local Add test case to check that packets are not dropped when they need to be routed and their destination is link-local, i.e., 169.254.0.0/16. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ca360db4b82537d0cbc7a54018b2096c757c4828 Author: Amit Cohen Date: Sun Jan 5 18:20:56 2020 +0200 mlxsw: spectrum: Disable DIP_LINK_LOCAL check in hardware pipeline The check drops packets if they need to be routed and their destination IP is link-local, i.e., belongs to 169.254.0.0/16 address range. Disable the check since the kernel forwards such packets and does not drop them. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 6e734f863c872a67f1b21129e762263958d17744 Author: Amit Cohen Date: Sun Jan 5 18:20:55 2020 +0200 selftests: forwarding: router: Add test case for source IP equals destination IP Add test case to check that packets are not dropped when they need to be routed and their source IP equals to their destination IP. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit e317b0f77eb67b2ef1663a35c2ff58e58736f71f Author: Amit Cohen Date: Sun Jan 5 18:20:54 2020 +0200 mlxsw: spectrum: Disable SIP_DIP check in hardware pipeline The check drops packets if they need to be routed and their source IP equals to their destination IP. Disable the check since the kernel forwards such packets and does not drop them. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 59b3a4f3481e89c4936b4baffea9a26a6846b70c Author: Amit Cohen Date: Sun Jan 5 18:20:53 2020 +0200 selftests: forwarding: router: Add test case for multicast destination MAC mismatch Add test case to check that packets are not dropped when they need to be routed and their multicast MAC mismatched to their multicast destination IP. i.e., destination IP is multicast and * for IPV4: DMAC != {01-00-5E-0 (25 bits), DIP[22:0]} * for IPV6: DMAC != {33-33-0 (16 bits), DIP[31:0]} Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 359ec56679efde731c09b2f1f9c93f65dd8e29df Author: Amit Cohen Date: Sun Jan 5 18:20:52 2020 +0200 mlxsw: spectrum: Disable MC_DMAC check in hardware pipeline The check drops packets if they need to be routed and their multicast MAC mismatched to their multicast destination IP. For IPV4: DMAC is mismatched if it is different from {01-00-5E-0 (25 bits), DIP[22:0]} For IPV6: DMAC is mismatched if it is different from {33-33-0 (16 bits), DIP[31:0]} Disable the check since the kernel forwards such packets and does not drop them. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 383dbf70d99e31c4dacf0eca8411581b6ec0635d Author: Amit Cohen Date: Sun Jan 5 18:20:51 2020 +0200 selftests: forwarding: router: Add test case for source IP in class E Add test case to check that packets are not dropped when they need to be routed and their source IP in class E, (i.e., 240.0.0.0 – 255.255.255.254). Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 62b0fb099ce2559293913d5bacf0c3aef08324e1 Author: Amit Cohen Date: Sun Jan 5 18:20:50 2020 +0200 mlxsw: spectrum: Disable SIP_CLASS_E check in hardware pipeline The check drops packets if they need to be routed and their source IP is from class E, i.e., belongs to 240.0.0.0/4 address range, but different from 255.255.255.255. Disable the check since the kernel forwards such packets and does not drop them. Signed-off-by: Amit Cohen Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 5f2958052c5820d0795616fcc299097390cf92a8 Author: Vinicius Costa Gomes Date: Mon Dec 2 15:19:49 2019 -0800 igc: Add basic skeleton for PTP This allows the creation of the /dev/ptpX device for i225, and reading and writing the time. Signed-off-by: Vinicius Costa Gomes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 02b0442c199f53c38b4b35e52a1349f5b2321d5e Merge: df2c2ba831a0 7f39febf2e08 Author: David S. Miller Date: Mon Jan 6 13:26:26 2020 -0800 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: misc updates for -net-next This series includes some misc updates for the HNS3 ethernet driver. [patch 1] adds trace events support. [patch 2] re-organizes TQP's vector handling. [patch 3] renames the name of TQP vector. [patch 4] rewrites a log in the hclge_map_ring_to_vector(). [patch 5] modifies the name of misc IRQ vector. [patch 6] handles the unexpected speed 0 return from HW. [patch 7] replaces an unsuitable variable type. [patch 8] modifies an unsuitable reset level for HW error. ==================== Signed-off-by: David S. Miller commit 7f39febf2e08a227e9696d2ebac2637d9ed98efc Author: Huazhong Tan Date: Sat Jan 4 10:49:31 2020 +0800 net: hns3: modify an unsuitable reset level for hardware error According to hardware user manual, when hardware reports error 'roc_pkt_without_key_port', the driver should assert function reset to do the recovery. So this patch uses HNAE3_FUNC_RESET to replace HNAE3_GLOBAL_RESET. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 7061867b59e0e5231b64655356c67ec31f44bc01 Author: Huazhong Tan Date: Sat Jan 4 10:49:30 2020 +0800 net: hns3: replace an unsuitable variable type in hclge_inform_reset_assert_to_vf() In hclge_inform_reset_assert_to_vf(), variable reset_type(enum type) will be copied into msg_data whose size is 2 bytes. Currently, hip08 is a little-endian machine, so the lower two bytes of reset_type will be copied to msg_data. But when running on a big-endian machine, msg_data will have a wrong value(the higher two bytes of reset_type). So this patch modifies the type of reset_type to u16, and adds a build check in case enum hnae3_reset_type has value larger than U16_MAX. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 2af8cb6126f36ffad848d1b0af714c09eb801b9d Author: Guojia Liao Date: Sat Jan 4 10:49:29 2020 +0800 net: hns3: add protection when get SFP speed as 0 In some case, the MAC speed get from hardware maybe 0, it should not be set to mac->speed. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit f97c4d823fb7d210afa53c6980dd8b8d0deee916 Author: Yonglong Liu Date: Sat Jan 4 10:49:28 2020 +0800 net: hns3: modify the IRQ name of misc vectors The misc IRQ of all the devices have the same name, so it's hard to find the right misc IRQ of the device. This patch modifies the misc IRQ names as "hclge/hclgevf"-misc- "pci name". And now the IRQ name is not related to net device name anymore, so change the HNAE3_INT_NAME_LEN to 32 bytes, and that is enough. Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 7ab2b53e4657ee0289878b09f9748a35b0e6010b Author: Yonglong Liu Date: Sat Jan 4 10:49:27 2020 +0800 net: hns3: modify an unsuitable log in hclge_map_ring_to_vector() When the returned vector_id less than 0, the message should print out the vector who is getting vector index fail. So this patch replaces vector_id with vector, and re-format the message. Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 5bffde62a18098a4268e56c5dea175e208fa0cf4 Author: Yonglong Liu Date: Sat Jan 4 10:49:26 2020 +0800 net: hns3: modify the IRQ name of TQP vector When rename the net devices, the IRQ number can not be fetched by the net device name, because the driver request the IRQ resources only when the vector resource changed, and the rename operation did not change the vector resources, so the IRQ name keeps the previous net device name. So this patch modifies the name of the TQP IRQ as "pci driver name"-"pci name"-"TxRx"-"index". Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 08a100689d4baf296d6898c687ea8d005da8d234 Author: Yonglong Liu Date: Sat Jan 4 10:49:25 2020 +0800 net: hns3: re-organize vector handle To prevent loss user's IRQ affinity configuration when DOWN, this patch moves out release/request operation of the vector handle from net DOWN/UP, just do it when vector resource changes. Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 698a89541c223b247a3b08cd0b16c97344445d96 Author: Yunsheng Lin Date: Sat Jan 4 10:49:24 2020 +0800 net: hns3: add trace event support for HNS3 driver This adds trace support for HNS3 driver. It also declares some events which could be used to trace the events when a TX/RX BD is processed, and other events which are related to the processing of sk_buff, such as TSO, GRO. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit bfda044533b213985bc62bd7ca96f2b984d21b80 Author: Xinwei Kong Date: Fri Jan 3 10:52:10 2020 +0800 spi: dw: use "smp_mb()" to avoid sending spi data error Because of out-of-order execution about some CPU architecture, In this debug stage we find Completing spi interrupt enable -> prodrucing TXEI interrupt -> running "interrupt_transfer" function will prior to set "dw->rx and dws->rx_end" data, so this patch add memory barrier to enable dw->rx and dw->rx_end to be visible and solve to send SPI data error. eg: it will fix to this following low possibility error in testing environment which using SPI control to connect TPM Modules kernel: tpm tpm0: Operation Timed out kernel: tpm tpm0: tpm_relinquish_locality: : error -1 Signed-off-by: fengsheng Signed-off-by: Xinwei Kong Link: https://lore.kernel.org/r/1578019930-55858-1-git-send-email-kong.kongxinwei@hisilicon.com Signed-off-by: Mark Brown commit fc2b10d13602d3e9c8a5f671898b8c77c205a36a Author: Krzysztof Kozlowski Date: Fri Jan 3 18:11:31 2020 +0100 regulator: samsung: Rename Samsung to lowercase Fix up inconsistent usage of upper and lowercase letters in "Samsung" name. "SAMSUNG" is not an abbreviation but a regular trademarked name. Therefore it should be written with lowercase letters starting with capital letter. Although advertisement materials usually use uppercase "SAMSUNG", the lowercase version is used in all legal aspects (e.g. on Wikipedia and in privacy/legal statements on https://www.samsung.com/semiconductor/privacy-global/). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200103171131.9900-20-krzk@kernel.org Signed-off-by: Mark Brown commit 14e01b5f335881c435d075797b8b7c64437f9bff Author: Michał Mirosław Date: Sat Jan 4 11:49:25 2020 +0100 regmap-i2c: constify regmap_bus structures regmap_bus structures are not changed anywhere. Mark them const. Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/85e4141348db00ecf1f2bc5c2ff6ba3de75e8ff4.1578134920.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit d4b74e218a8d0d6cf58e546627ab9d4d4f2645ab Author: Sam McNally Date: Fri Jan 3 12:50:19 2020 +1100 ASoC: Intel: sof_rt5682: Ignore the speaker amp when there isn't one. Some members of the Google_Hatch family include a rt5682 jack codec, but no speaker amplifier. This uses the same driver (sof_rt5682) as a combination of rt5682 jack codec and max98357a speaker amplifier. Within the sof_rt5682 driver, these cases are not currently distinguishable, relying on a DMI quirk to decide the configuration. This causes an incorrect configuration when only the rt5682 is present on a Google_Hatch device. For CML, the jack codec is used as the primary key when matching, with a possible speaker amplifier described in quirk_data. The two cases of interest are the second and third 10EC5682 entries in snd_soc_acpi_intel_cml_machines[]. The second entry matches the combination of rt5682 and max98357a, resulting in the quirk_data field in the snd_soc_acpi_mach being non-null, pointing at max98357a_spk_codecs, the snd_soc_acpi_codecs for the matched speaker amplifier. The third entry matches just the rt5682, resulting in a null quirk_data. The sof_rt5682 driver's DMI data matching identifies that a speaker amplifier is present for all Google_Hatch family devices. Detect cases where there is no speaker amplifier by checking for a null quirk_data in the snd_soc_acpi_mach and remove the speaker amplifier bit in that case. Signed-off-by: Sam McNally Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200103124921.v3.1.Ib87c4a7fbb3fc818ea12198e291b87dc2d5bc8c2@changeid Signed-off-by: Mark Brown commit 5f70bde26a48769012006e22f16cb768f9681020 Author: Cristian Marussi Date: Tue Dec 10 11:44:59 2019 +0000 selftests: fix build behaviour on targets' failures Currently, when some of the KSFT subsystems fails to build, the toplevel KSFT Makefile just keeps carrying on with the build process. This behaviour is expected and desirable especially in the context of a CI system running KSelfTest, since it is not always easy to guarantee that the most recent and esoteric dependencies are respected across all KSFT TARGETS in a timely manner. Unfortunately, as of now, this holds true only if the very last of the built subsystems could have been successfully compiled: if the last of those subsystem instead failed to build, such failure is taken as the whole outcome of the Makefile target and the complete build/install process halts even though many other preceding subsytems were in fact already built successfully. Fix the KSFT Makefile behaviour related to all/install targets in order to fail as a whole only when the all/install targets have failed for all of the requested TARGETS, while succeeding when at least one of TARGETS has been successfully built. Signed-off-by: Cristian Marussi Signed-off-by: Shuah Khan commit adc92dd4550ee038a9794eae1c05d88721a3a737 Author: Daniel W. S. Almeida Date: Thu Dec 26 22:00:33 2019 -0300 debugfs: Fix warnings when building documentation Fix the following warnings: fs/debugfs/inode.c:423: WARNING: Inline literal start-string without end-string. fs/debugfs/inode.c:502: WARNING: Inline literal start-string without end-string. fs/debugfs/inode.c:534: WARNING: Inline literal start-string without end-string. fs/debugfs/inode.c:627: WARNING: Inline literal start-string without end-string. fs/debugfs/file.c:496: WARNING: Inline literal start-string without end-string. fs/debugfs/file.c:502: WARNING: Inline literal start-string without end-string. fs/debugfs/file.c:581: WARNING: Inline literal start-string without end-string. fs/debugfs/file.c:587: WARNING: Inline literal start-string without end-string. fs/debugfs/file.c:846: WARNING: Inline literal start-string without end-string. fs/debugfs/file.c:852: WARNING: Inline literal start-string without end-string. fs/debugfs/file.c:899: WARNING: Inline literal start-string without end-string. fs/debugfs/file.c:905: WARNING: Inline literal start-string without end-string. fs/debugfs/file.c:1091: WARNING: Inline literal start-string without end-string. fs/debugfs/file.c:1097: WARNING: Inline literal start-string without end-string By replacing %ERR_PTR with ERR_PTR. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/20191227010035.854913-1-dwlsalmeida@gmail.com Signed-off-by: Greg Kroah-Hartman commit b4b844930f27bf7019c0bbd8cc575dde32e00ecc Author: Peng Fan Date: Fri Dec 20 06:13:39 2019 +0000 tty: serial: fsl_lpuart: drop earlycon entry for i.MX8QXP i.MX8QXP lpuart is compatible with i.MX7ULP, so no need an extra entry for i.MX8QXP. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1576822230-23125-4-git-send-email-peng.fan@nxp.com Signed-off-by: Greg Kroah-Hartman commit 3966f0846c036bcee2740df619ed421deb78f941 Author: Peng Fan Date: Fri Dec 20 06:13:36 2019 +0000 tty: serial: fsl_lpuart: support UPIO_MEM32 for lpuart32 "earlycon" no need to specify the value string since it uses stdout-path parameters. However when earlycon and normal console are not using the same uart port, we need specify value string to earlycon, this is what we need to do when support dual linux using jailhouse hypervisor. The 2nd linux will use the uart of the 1st linux as earlycon. earlycon=lpuart32,mmio32,0x5a060010,115200 not work for i.MX8QXP. It is because lpuart32_early_console_setup not support little endian. Since the original code is to support UPIO_MEM32BE, so if not UPIO_MEM32, we still take it as UPIO_MEM32BE Acked-by: Fugang Duan Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1576822230-23125-3-git-send-email-peng.fan@nxp.com Signed-off-by: Greg Kroah-Hartman commit a659652f6169240a5818cb244b280c5a362ef5a4 Author: Peng Fan Date: Fri Dec 20 06:13:33 2019 +0000 tty: serial: fsl_lpuart: drop EARLYCON_DECLARE EARLYCON_DECLARE is just a wrapper of OF_EARLYCON_DECLARE, since we already have OF_EARLYCON_DECLARE for lpuart and lpuart32, so no need EARLYCON_DECLARE. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1576822230-23125-2-git-send-email-peng.fan@nxp.com Signed-off-by: Greg Kroah-Hartman commit 69bd1a4f19a41c6ba680e8440165634f6278895f Author: Akash Asthana Date: Mon Jan 6 20:15:05 2020 +0530 tty: serial: qcom_geni_serial: Move loopback support to TIOCM_LOOP Remove code from the driver that create and maintain loopback sysfs node. Instead use the ioctl TIOCMSET with TIOCM_LOOP argument to set HW to loopback mode. Signed-off-by: Akash Asthana Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1578321905-25843-3-git-send-email-akashast@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit f3974413cf0209b215ce03aa7cb450a5b2e4d758 Author: Akash Asthana Date: Mon Jan 6 20:15:04 2020 +0530 tty: serial: qcom_geni_serial: Wakeup IRQ cleanup This patch is the continuation of below mentioned commits which adds wakeup feature over the UART RX line. 1)commit 3e4aaea7a039 ("tty: serial: qcom_geni_serial: IRQ cleanup")[v2] 2)commit 8b7103f31950 ("tty: serial: qcom_geni_serial: Wakeup over UART RX")[v2] The following cleanup is done based on upstream comment received on subsequent versions of the above-mentioned commits to simplifying the code. - Use devm_kasprintf API in place of scnprintf. - Use dev_pm_set_dedicated_wake_irq API that will take care of requesting and attaching wakeup irqs for devices. Also, it sets wakeirq status to WAKE_IRQ_DEDICATED_ALLOCATED as a result enabling/disabling of wake irq will be managed by suspend/resume framework. We can remove the code for enabling and disabling of wake irq from the this driver. - Use platform_get_irq_optional API to get optional wakeup IRQ for device. - Move ISR registration later in probe after uart port gets register with serial core. Patch link: - https://patchwork.kernel.org/patch/11189717/ (v3) - https://patchwork.kernel.org/patch/11227435/ (v4) - https://patchwork.kernel.org/patch/11241669/ (v5) - https://patchwork.kernel.org/patch/11258045/ (v6) Signed-off-by: Akash Asthana Reviewed-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1578321905-25843-2-git-send-email-akashast@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit b2097131992d937ba255c5cb6856975f132724c5 Author: Krzysztof Kozlowski Date: Sat Jan 4 16:21:04 2020 +0100 serial: samsung: Rename Exynos to lowercase Fix up inconsistent usage of upper and lowercase letters in "Exynos" name. "EXYNOS" is not an abbreviation but a regular trademarked name. Therefore it should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200104152107.11407-18-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5ed94dcdb88be7b8386ded347fa597e7f27c6292 Author: Colin Ian King Date: Fri Dec 20 00:10:00 2019 +0000 serial: ucc_uart: remove redundant assignment to pointer bdp The variable bdp 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 Acked-by: Timur Tabi Link: https://lore.kernel.org/r/20191220001000.39859-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit a00dfd4ddd4871eb87a5216970a338bf381abfbe Author: Magnus Damm Date: Fri Dec 20 02:35:25 2019 +0900 tools: usb: usbip: Get rid of driver name printout in README Driver name is no longer printed out so update the README examples to avoid confusion. Signed-off-by: Magnus Damm Acked-by: Shuah Khan Link: https://lore.kernel.org/r/157677692518.684.15385402529285904844.sendpatchset@octo Signed-off-by: Greg Kroah-Hartman commit 32d319c02d80ba737fc4d5702f5c38790377d5ca Merge: 4081b335592a e2ce979bf176 Author: Olof Johansson Date: Mon Jan 6 11:15:03 2020 -0800 Merge branch 'mmp/hsic' into arm/dt * mmp/hsic: ARM: dts: mmp3: Fix typos commit e2ce979bf176af4b8eb7aea866919d618c08f752 Author: Olof Johansson Date: Mon Jan 6 11:14:10 2020 -0800 ARM: dts: mmp3: Fix typos Fixes build failures due to syntax errors. Fixes: 3240d5b872f2 ("ARM: dts: mmp3: Add HSIC controllers") Signed-off-by: Olof Johansson commit 277a13b5f81ad1818c57b321e76ffa0530a46330 Author: Stanimir Varbanov Date: Mon Jan 6 12:23:05 2020 +0200 arm64: dts: qcom: msm8996: Fix venus iommu nodename error Fix the following error/warn seen with make dtbs_check arm,smmu-venus@d40000: $nodename:0: 'arm,smmu-venus@d40000' does not match '^iommu@[0-9a-f]*' arm,smmu-venus@d40000: clock-names:0: 'bus' was expected arm,smmu-venus@d40000: clock-names:1: 'iface' was expected by rename nodename to "iommu". Signed-off-by: Stanimir Varbanov Link: https://lore.kernel.org/r/20200106102305.27059-1-stanimir.varbanov@linaro.org [bjorn: Added padding of address to 8 digits] Signed-off-by: Bjorn Andersson commit 02da7c3d79528c8c6553e74c37562874fe898a21 Author: Claudiu Beznea Date: Wed Dec 18 14:28:29 2019 +0200 Revert "drm: atmel-hlcdc: enable sys_clk during initalization." This reverts commit d2c755e66617620b729041c625a6396c81d1231c ("drm: atmel-hlcdc: enable sys_clk during initalization."). With commit "drm: atmel-hlcdc: enable clock before configuring timing engine" there is no need for this patch. Code is also simpler. Cc: Sandeep Sheriker Mallikarjun Signed-off-by: Claudiu Beznea Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1576672109-22707-7-git-send-email-claudiu.beznea@microchip.com commit 51a19d150b520f6cb42143f3bdffacd3c33d7ac5 Author: Peter Rosin Date: Wed Dec 18 14:28:28 2019 +0200 drm: atmel-hlcdc: prefer a lower pixel-clock than requested The intention was to only select a higher pixel-clock rate than the requested, if a slight overclocking would result in a rate significantly closer to the requested rate than if the conservative lower pixel-clock rate is selected. The fixed patch has the logic the other way around and actually prefers the higher frequency. Fix that. Signed-off-by: Peter Rosin Signed-off-by: Claudiu Beznea Signed-off-by: Sam Ravnborg Fixes: 9946a3a9dbed ("drm/atmel-hlcdc: allow selecting a higher pixel-clock than requested") Reported-by: Claudiu Beznea Tested-by: Claudiu Beznea Cc: Boris Brezillon Cc: # v4.20+ Link: https://patchwork.freedesktop.org/patch/msgid/1576672109-22707-6-git-send-email-claudiu.beznea@microchip.com commit 2c1fb9d86f6820abbfaa38a6836157c76ccb4e7b Author: Claudiu Beznea Date: Wed Dec 18 14:28:25 2019 +0200 drm: atmel-hlcdc: enable clock before configuring timing engine Changing pixel clock source without having this clock source enabled will block the timing engine and the next operations after (in this case setting ATMEL_HLCDC_CFG(5) settings in atmel_hlcdc_crtc_mode_set_nofb() will fail). It is recomended (although in datasheet this is not present) to actually enabled pixel clock source before doing any changes on timing enginge (only SAM9X60 datasheet specifies that the peripheral clock and pixel clock must be enabled before using LCD controller). Fixes: 1a396789f65a ("drm: add Atmel HLCDC Display Controller support") Signed-off-by: Claudiu Beznea Signed-off-by: Sam Ravnborg Cc: Boris Brezillon Cc: # v4.0+ Link: https://patchwork.freedesktop.org/patch/msgid/1576672109-22707-3-git-send-email-claudiu.beznea@microchip.com commit 07acf4bafe81dd37eff3fbcfbbdbc48084bc202b Author: Claudiu Beznea Date: Wed Dec 18 14:28:24 2019 +0200 drm: atmel-hlcdc: use double rate for pixel clock only if supported Doubled system clock should be used as pixel cock source only if this is supported. This is emphasized by the value of atmel_hlcdc_crtc::dc::desc::fixed_clksrc. Fixes: a6eca2abdd42 ("drm: atmel-hlcdc: add config option for clock selection") Signed-off-by: Claudiu Beznea Signed-off-by: Sam Ravnborg Cc: Boris Brezillon Cc: # v5.3+ Link: https://patchwork.freedesktop.org/patch/msgid/1576672109-22707-2-git-send-email-claudiu.beznea@microchip.com commit bf046007641a7ef76d4ed976ac67bf24d05ac51a Author: Sam Ravnborg Date: Mon Jan 6 19:17:31 2020 +0100 dt-bindings: fix warnings in xinpeng,xpp055c272.yaml The reg property in the example caused following warnings: xinpeng,xpp055c272.example.dts:20.17-27: Warning (reg_format): /example-0/dsi@ff450000/panel@0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) xinpeng,xpp055c272.example.dt.yaml: Warning (pci_device_bus_num): Failed prerequisite 'reg_format' xinpeng,xpp055c272.example.dt.yaml: Warning (i2c_bus_reg): Failed prerequisite 'reg_format' xinpeng,xpp055c272.example.dt.yaml: Warning (spi_bus_reg): Failed prerequisite 'reg_format' xinpeng,xpp055c272.example.dts:18.21-24.15: Warning (avoid_default_addr_size): /example-0/dsi@ff450000/panel@0: Relying on default #address-cells value xinpeng,xpp055c272.example.dts:18.21-24.15: Warning (avoid_default_addr_size): /example-0/dsi@ff450000/panel@0: Relying on default #size-cells value Added #address-cells and #size-cells to silence the warning. Signed-off-by: Sam Ravnborg Reviewed-by: Heiko Stuebner Cc: Maxime Ripard Cc: Rob Herring Cc: devicetree@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20200106181731.GA24294@ravnborg.org commit 158e2ee61f22b878d61de92bea5aad3d2df1c146 Author: Yu-cheng Yu Date: Thu Dec 12 13:08:54 2019 -0800 x86/fpu/xstate: Make xfeature_is_supervisor()/xfeature_is_user() return bool Have both xfeature_is_supervisor()/xfeature_is_user() return bool because they are used only in boolean context. Suggested-by: Borislav Petkov Signed-off-by: Yu-cheng Yu Signed-off-by: Borislav Petkov Acked-by: Sebastian Andrzej Siewior Cc: Andy Lutomirski Cc: Dave Hansen Cc: Fenghua Yu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Peter Zijlstra Cc: "Ravi V. Shankar" Cc: Rik van Riel Cc: Thomas Gleixner Cc: Tony Luck Cc: x86-ml Link: https://lkml.kernel.org/r/20191212210855.19260-3-yu-cheng.yu@intel.com commit 4081b335592a46d506e9ab5725ba8d7cd8cea1d9 Merge: 3b6930e82439 0bc5f749bcb6 Author: Olof Johansson Date: Mon Jan 6 09:33:53 2020 -0800 Merge branch 'mmp/hsic' into arm/dt * mmp/hsic: ARM: dts: mmp3-dell-ariel: Enable the HSIC ARM: dts: mmp3: Add HSIC controllers dt-bindings: phy: Add binding for marvell,mmp3-hsic-phy clk: mmp2: Add HSIC clocks dt-bindings: marvell,mmp2: Add clock ids for the HSIC clocks + Linux 5.5-rc2 commit 0bc5f749bcb671547c8b126870bc60d06dcaccdf Author: Lubomir Rintel Date: Fri Dec 20 07:53:14 2019 +0100 ARM: dts: mmp3-dell-ariel: Enable the HSIC There's a SMSC USB2640 (USB hub & SD controller) connected to it, but the SD card slot footprint is unpopulated. Also connected to the hub is a SMSC LAN7500 gigabit ethernet adapter. Link: https://lore.kernel.org/r/20191220065314.237624-6-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Olof Johansson commit 3240d5b872f24cc65f503246371a18551d730066 Author: Lubomir Rintel Date: Fri Dec 20 07:53:13 2019 +0100 ARM: dts: mmp3: Add HSIC controllers There are two on MMP3, along with the PHYs. The PHYs are made compatible with the NOP transceiver, since there's no driver for the time being and they're likely configured by the firmware. Link: https://lore.kernel.org/r/20191220065314.237624-5-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Reported-by: kbuild test robot Signed-off-by: Olof Johansson commit f6f149604eefdcb515d80624f058b812d074dac0 Author: Lubomir Rintel Date: Fri Dec 20 07:53:12 2019 +0100 dt-bindings: phy: Add binding for marvell,mmp3-hsic-phy This is the PHY chip for USB HSIC on MMP3 platform. Link: https://lore.kernel.org/r/20191220065314.237624-4-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Olof Johansson commit be61795bbd3c8fc12661533a7de2549c79dbae02 Author: Lubomir Rintel Date: Fri Dec 20 07:53:11 2019 +0100 clk: mmp2: Add HSIC clocks There are two USB HSIC controllers on MMP2 and MMP3. Link: https://lore.kernel.org/r/20191220065314.237624-3-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Acked-by: Stephen Boyd Signed-off-by: Olof Johansson commit 247aa9e4d22db43f73469e3492e45d9587ac99f7 Author: Lubomir Rintel Date: Fri Dec 20 07:53:10 2019 +0100 dt-bindings: marvell,mmp2: Add clock ids for the HSIC clocks There are two USB HSIC controllers on MMP2 and MMP3. Link: https://lore.kernel.org/r/20191220065314.237624-2-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Acked-by: Stephen Boyd Signed-off-by: Olof Johansson commit 3b6930e82439895319bbd4fd5bf2d5b2a29f7915 Merge: 8b004f12624b 837b7deb364c Author: Olof Johansson Date: Mon Jan 6 09:29:29 2020 -0800 Merge tag 'renesas-dt-bindings-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas DT binding updates for v5.6 - Document TMU and CAN(FD) support for R-Car RZ/G2N. * tag 'renesas-dt-bindings-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: dt-bindings: can: rcar_canfd: document r8a774b1 support dt-bindings: can: rcar_can: document r8a774b1 support dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings Link: https://lore.kernel.org/r/20200106104857.8361-6-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 1bee7aaa075b4bac5cfc534f01602e17ec7caee9 Merge: bcbf0531021f b925adfceb52 Author: Olof Johansson Date: Mon Jan 6 09:29:13 2020 -0800 Merge tag 'renesas-drivers-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/drivers Renesas driver updates for v5.6 - Remove now unused ARCH_R8A7796 config symbol, - Fix a sparse warning, - Add split R-Car H3 ES1.x and ES2.0+ config symbols. * tag 'renesas-drivers-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: Add ARCH_R8A7795[01] for existing R-Car H3 soc: renesas: rcar-rst: Fix __iomem on configure call soc: renesas: Remove ARCH_R8A7796 Link: https://lore.kernel.org/r/20200106104857.8361-5-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 8b004f12624b1d8121b8d3517b7eed946ee9426c Merge: ec6710852076 7ba33c335a5b Author: Olof Johansson Date: Mon Jan 6 09:28:56 2020 -0800 Merge tag 'renesas-arm64-dt-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM64 DT updates for v5.6 - Remove now unused ARCH_R8A7796 config symbol, - Rename R-Car H3 and M3-W SoC, and ULCB board DTS files to increase naming consistency, - Miscellaneous fixes for issues detected by "make dtbs_check", - Enhance support for R-Car M3-W+, - Display support for the EK874 board, - Prepare for split of R-Car H3 ES1.x and ES2.0+ config symbols, - Minor fixes and improvements. * tag 'renesas-arm64-dt-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: Prepare for split of ARCH_R8A7795 into ARCH_R8A7795[01] arm64: dts: renesas: Sort DTBs in Makefile arm64: dts: renesas: Drop redundant SoC prefixes from ULCB DTS file names arm64: dts: renesas: Rename r8a7795{-es1,}* to r8a7795[01]* arm64: dts: renesas: Add EK874 board with idk-2121wr display support arm64: dts: renesas: r8a77961: Add SDHI nodes arm64: dts: renesas: r8a77961: Add I2C nodes arm64: dts: renesas: r8a77961: Add SYS-DMAC nodes arm64: dts: renesas: r8a77961: Add RAVB node arm64: dts: renesas: r8a77961: Add GPIO nodes arm64: dts: renesas: r8a77961: Add RWDT node arm64: dts: renesas: r8a77990: ebisu: Remove clkout-lr-synchronous from sound arm64: dts: renesas: r8a77970: Group tuples in thermal reg property arm64: dts: renesas: Group tuples in pci ranges and dma-ranges properties arm64: dts: renesas: Group tuples in interrupt properties arm64: dts: renesas: Group tuples in regulator-gpio states properties arm64: dts: renesas: Rename r8a7796* to r8a77960* arm64: dts: renesas: Remove use of ARCH_R8A7796 Link: https://lore.kernel.org/r/20200106104857.8361-4-geert+renesas@glider.be Signed-off-by: Olof Johansson commit ec6710852076e8116fcc8e1f1a77f9b7e50d0260 Merge: 0b0d7158916a fe4a76fafdb4 Author: Olof Johansson Date: Mon Jan 6 09:28:00 2020 -0800 Merge tag 'renesas-arm-dt-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM DT updates for v5.6 - Touch screen support for the iwg20d board, - ARM global timer support on Cortex-A9 MPCore SoCs, - Miscellaneous fixes for issues detected by "make dtbs_check". * tag 'renesas-arm-dt-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: dts: sh73a0: Add missing clock-frequency for fixed clocks ARM: dts: r8a7778: Add missing clock-frequency for fixed clocks ARM: dts: rcar-gen2: Add missing mmio-sram bus properties ARM: dts: rcar-gen2: Fix PCI high address in interrupt-map-mask ARM: dts: renesas: Group tuples in pci ranges and dma-ranges properties ARM: dts: renesas: Group tuples in interrupt properties ARM: dts: renesas: Group tuples in regulator-gpio states properties ARM: dts: r8a7779: Add device node for ARM global timer ARM: dts: sh73a0: Add device node for ARM global timer ARM: dts: sh73a0: Rename twd clock to periph clock ARM: dts: iwg20d-q7-common: Add LCD support Link: https://lore.kernel.org/r/20200106104857.8361-3-geert+renesas@glider.be Signed-off-by: Olof Johansson commit 2ba739aa79c6b8f207b7de0e829ada46dfae55f4 Merge: 19fd44d08335 a630a6121bef Author: Olof Johansson Date: Mon Jan 6 09:27:40 2020 -0800 Merge tag 'renesas-arm-defconfig-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/defconfig Renesas ARM defconfig updates for v5.6 - Enable support for the display panel on the iwg20d board. * tag 'renesas-arm-defconfig-for-v5.6-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: shmobile: defconfig: Enable support for panels from EDT ARM: shmobile: defconfig: Restore debugfs support Link: https://lore.kernel.org/r/20200106104857.8361-2-geert+renesas@glider.be Signed-off-by: Olof Johansson commit bcbf0531021f6ed4178e01c5f4b2fa0c908a0ff0 Merge: 965af1cfbb81 f349710e413a Author: Olof Johansson Date: Mon Jan 6 09:26:27 2020 -0800 Merge tag 'tee-optee-pldrv-for-5.6' of git://git.linaro.org:/people/jens.wiklander/linux-tee into arm/drivers Model OP-TEE as a platform device/driver * tag 'tee-optee-pldrv-for-5.6' of git://git.linaro.org:/people/jens.wiklander/linux-tee: optee: model OP-TEE as a platform device/driver Link: https://lore.kernel.org/r/20200103090025.GA11243@jax Signed-off-by: Olof Johansson commit 19fd44d0833535b03e31ff21d78da9b776ca3341 Author: Linus Walleij Date: Wed Jan 1 15:35:20 2020 +0100 ARM: defconfig: gemini: Update defconfig This updates the gemini defconfig with Kconfig shuffling and some of the features activated in new upstream drivers and newly supported devices: - Move some symbols around due to Kconfig alterations, this affects CONFIG_PREEMPT, CONFIG_PCI, CONFIG_CMA, CONFIG_BINFMT_MISC, CONFIG_PARTITION_ADVANCED. - Add RedBoot partition parsing, as all the Gemini devices use some RedBoot derivative and store their flash partition tables in this format. - Enable bridge and VLAN filtering: a majority of the Gemini devices have some kind of DSA chip for ethernet bridging/routing. - Enable CONFIG_NET_DSA_REALTEK_SMI as this DSA router chip is found in the Gemini-based products. This makes explicit selection of CONFIG_REALTEK_PHY unnecessary so that goes away. - Enable CONFIG_TUN since Gemini userspace often make use of the TUN interface for network services. - Enable MARVELL_PHY as Marvell PHY connectors are often found in Gemini systems. - Enable basic 802.11 libraries as many Gemini systems have wireless PCI cards. Link: https://lore.kernel.org/r/20200101143520.14218-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson commit 965af1cfbb81b2c0220760797c9d7c42d8859b11 Merge: d1eef1c61974 729d3530a504 Author: Olof Johansson Date: Mon Jan 6 09:23:04 2020 -0800 Merge tag 'scmi-updates-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/drivers ARM SCMI updates for v5.6 1. Addition of multiple device support per protocol to enable use of some procotols by multiple kernel subsystems simultaneously and corresponding updates to the existing scmi drivers 2. Addition of trace events around the scmi transfer code to measure any delays and capture anomalies that can also be used during investigation of some platform firmware related issues * tag 'scmi-updates-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: drivers: firmware: scmi: Extend SCMI transport layer by trace events include: trace: Add SCMI header with trace events reset: reset-scmi: Match scmi device by both name and protocol id hwmon: (scmi-hwmon) Match scmi device by both name and protocol id cpufreq: scmi: Match scmi device by both name and protocol id clk: scmi: Match scmi device by both name and protocol id firmware: arm_scmi: Skip protocol initialisation for additional devices firmware: arm_scmi: Stash version in protocol init functions firmware: arm_scmi: Match scmi device by both name and protocol id firmware: arm_scmi: Add versions and identifier attributes using dev_groups firmware: arm_scmi: Add names to scmi devices created firmware: arm_scmi: Skip scmi mbox channel setup for addtional devices firmware: arm_scmi: Add support for multiple device per protocol Link: https://lore.kernel.org/r/20191230182956.GA29349@bogus Signed-off-by: Olof Johansson commit 0b0d7158916ac73738b9e9e585730a8addaa4bc1 Merge: f1da5ea67059 224bf0fe7292 Author: Olof Johansson Date: Mon Jan 6 09:22:26 2020 -0800 Merge tag 'ux500-armsoc-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into arm/dt Support the Samsung GT-I8190/Golden phone: - Proper include file for the AB8505 PMIC variant. - Add a DTS file for the GT-I8190/Golden - Extend the IMU, touch screen, WiFi and Bluetooth as separate patches. * tag 'ux500-armsoc-v5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: ARM: dts: ux500: samsung-golden: Add Bluetooth ARM: dts: ux500: samsung-golden: Add WiFi ARM: dts: ux500: samsung-golden: Add touch screen ARM: dts: ux500: samsung-golden: Add IMU (accelerometer + gyroscope) ARM: dts: ux500: Add device tree for Samsung Galaxy S III mini (GT-I8190) dt-bindings: arm: ux500: Document samsung,golden compatible ARM: dts: ux500: Add device tree include for AB8505 ARM: dts: ux500: Remove unused ste-href-ab8505.dtsi Link: https://lore.kernel.org/r/CACRpkdaN2Lv_rBEYNiyAarA81yea6Eky8w_htqZqdRng8S-DcA@mail.gmail.com Signed-off-by: Olof Johansson commit f1da5ea67059cc0a202e09e4f20bfcd7b5accd0b Author: Chunyan Zhang Date: Mon Dec 23 17:29:48 2019 +0800 arm64: dts: Add Unisoc's SC9863A SoC support Add basic DT to support Unisoc's SC9863A, with this patch, the board sp9863a-1h10 can run into console. Link: https://lore.kernel.org/r/20191223092948.24824-4-zhang.lyra@gmail.com Signed-off-by: Chunyan Zhang Signed-off-by: Olof Johansson commit a9609686042b887baa636c77646b7614074c180a Author: Thomas Hebb Date: Tue Dec 17 08:15:45 2019 -0800 kconfig: fix nesting of symbol help text When we generate the help text of a symbol (e.g. when a user presses '?' in menuconfig), we do two things: 1. We iterate through every prompt that belongs to that symbol, printing its text and its location in the menu tree. 2. We print symbol-wide information that's not linked to a particular prompt, such as what it selects/is selected by and what it implies/is implied by. Each prompt we print for 1 starts with a line that's not indented indicating where the prompt is defined, then continues with indented lines that describe properties of that particular definition. Once we get to 2, however, we print all the global data indented as well! Visually, this makes it look like the symbol-wide data is associated with the last prompt we happened to print rather than the symbol as a whole. Fix this by removing the indentation for symbol-wide information. Before: Symbol: CPU_FREQ [=n] Type : bool Defined at drivers/cpufreq/Kconfig:4 Prompt: CPU Frequency scaling Location: -> CPU Power Management -> CPU Frequency scaling Selects: SRCU [=n] Selected by [n]: - ARCH_SA1100 [=n] && After: Symbol: CPU_FREQ [=n] Type : bool Defined at drivers/cpufreq/Kconfig:4 Prompt: CPU Frequency scaling Location: -> CPU Power Management -> CPU Frequency scaling Selects: SRCU [=n] Selected by [n]: - ARCH_SA1100 [=n] && Signed-off-by: Thomas Hebb Signed-off-by: Masahiro Yamada commit 3460d0bc256a50b71dbdae8227c600761c502022 Author: Thomas Hebb Date: Tue Dec 17 08:15:44 2019 -0800 kconfig: distinguish between dependencies and visibility in help text Kconfig makes a distinction between dependencies (defined by "depends on" expressions and enclosing "if" blocks) and visibility (which includes all dependencies, but also includes inline "if" expressions of individual properties as well as, for prompts, "visible if" expressions of enclosing menus). Before commit bcdedcc1afd6 ("menuconfig: print more info for symbol without prompts"), the "Depends on" lines of a symbol's help text indicated the visibility of the prompt property they appeared under. After bcdedcc1afd, there was always only a single "Depends on" line, which indicated the visibility of the first P_SYMBOL property of the symbol. Since P_SYMBOLs never have inline if expressions, this was in effect the same as the dependencies of the menu item that the P_SYMBOL was attached to. Neither of these situations accurately conveyed the dependencies of a symbol--the first because it was actually the visibility, and the second because it only showed the dependencies from a single definition. With this series, we are back to printing separate dependencies for each definition, but we print the actual dependencies (rather than the visibility) in the "Depends on" line. However, it can still be useful to know the visibility of a prompt, so this patch adds a "Visible if" line that shows the visibility only if the visibility is different from the dependencies (which it isn't for most prompts in Linux). Before: Symbol: THUMB2_KERNEL [=n] Type : bool Defined at arch/arm/Kconfig:1417 Prompt: Compile the kernel in Thumb-2 mode Depends on: (CPU_V7 [=y] || CPU_V7M [=n]) && !CPU_V6 [=n] && !CPU_V6K [=n] Location: -> Kernel Features Selects: ARM_UNWIND [=n] After: Symbol: THUMB2_KERNEL [=n] Type : bool Defined at arch/arm/Kconfig:1417 Prompt: Compile the kernel in Thumb-2 mode Depends on: (CPU_V7 [=y] || CPU_V7M [=n]) && !CPU_V6 [=n] && !CPU_V6K [=n] Visible if: (CPU_V7 [=y] || CPU_V7M [=n]) && !CPU_V6 [=n] && !CPU_V6K [=n] && !CPU_THUMBONLY [=n] Location: -> Kernel Features Selects: ARM_UNWIND [=n] Signed-off-by: Thomas Hebb Signed-off-by: Masahiro Yamada commit edda15f2197425c1aca8d1dd24a9bb3144686c7b Author: Thomas Hebb Date: Tue Dec 17 08:15:43 2019 -0800 kconfig: list all definitions of a symbol in help text In Kconfig, each symbol (representing a config option) can be defined in multiple places. Each definition may or may not have a prompt, which allows the option to be set via an interface like menuconfig. Each definition has a set of dependencies, which determine whether its prompt is visible and whether other pieces of the definition, like a default value, take effect. Historically, a symbol's help text (i.e. what's shown when a user presses '?' in menuconfig) contained some symbol-wide information not tied to any particular definition (e.g. what other symbols it selects) as well as the location (file name and line number) and dependencies of each prompt. Notably, the help text did not show the location or dependencies of definitions without prompts. Because this made it hard to reason about symbols that had no prompts, commit bcdedcc1afd6 ("menuconfig: print more info for symbol without prompts") changed the help text so that, instead of containing the location and dependencies of each prompt, it contained the location and dependencies of the symbol's first definition, regardless of whether or not that definition had a prompt. For symbols with only one definition, that change makes sense. However, it breaks down for symbols with multiple definitions: each definition has its own set of dependencies (the `dep` field of `struct menu`), and those dependencies are ORed together to get the symbol's dependency list (the `dir_dep` field of `struct symbol`). By printing only the dependencies of the first definition, the help text misleads users into believing that an option is more narrowly-applicable than it actually is. For an extreme example of this, we can look at the SYS_TEXT_BASE symbol in the Das U-Boot project (version 2019.10), which also uses Kconfig. (I unfortunately could not find an illustrative example in Linux.) This config option specifies the load address of the built binary and, as such, is applicable to basically every configuration possible. And yet, without this patch, its help text is as follows: Symbol: SYS_TEXT_BASE [=] Type : hex Prompt: U-Boot base address Location: -> ARM architecture Prompt: Text Base Location: -> Boot images Defined at arch/arm/mach-aspeed/Kconfig:9 Depends on: ARM [=n] && ARCH_ASPEED [=n] The help text indicates that the option is applicable only for a specific unselected architecture (aspeed), because that architecture's promptless definition (which just sets a default value), happens to be the first one seen. No definition or dependency information is printed for either of the two prompts listed. Because source locations and dependencies are fundamentally properties of definitions and not of symbols, we should treat them as such. This patch brings back the pre-bcdedcc1afd6 behavior for definitions with prompts but also separately prints the location and dependencies of those without prompts, solving the original problem in a different way. With this change, our SYS_TEXT_BASE example becomes Symbol: SYS_TEXT_BASE [=] Type : hex Defined at arch/arm/mach-stm32mp/Kconfig:83 Prompt: U-Boot base address Depends on: ARM [=n] && ARCH_STM32MP [=n] Location: -> ARM architecture Defined at Kconfig:532 Prompt: Text Base Depends on: !NIOS2 [=n] && !XTENSA [=n] && !EFI_APP [=n] Location: -> Boot images Defined at arch/arm/mach-aspeed/Kconfig:9 Depends on: ARM [=n] && ARCH_ASPEED [=n] Defined at arch/arm/mach-socfpga/Kconfig:25 Depends on: ARM [=n] && ARCH_SOCFPGA [=n] Defined at board/sifive/fu540/Kconfig:15 Depends on: RISCV [=n] && TARGET_SIFIVE_FU540 [=n] which is a much more accurate representation. Note that there is one notable difference between what gets printed for prompts after this change and what got printed before bcdedcc1afd6: the "Depends on" line now accurately represents the prompt's dependencies instead of conflating those with the prompt's visibility (which can include extra conditions). See the patch later in this series titled "kconfig: distinguish between dependencies and visibility in help text" for more details and better handling of that nuance. Signed-off-by: Thomas Hebb Signed-off-by: Masahiro Yamada commit 89b9060987d988333de59dd218c9666bd7ee95a5 Author: Tetsuo Handa Date: Tue Dec 17 18:42:06 2019 +0900 kconfig: Add yes2modconfig and mod2yesconfig targets. Since kernel configs provided by syzbot are close to "make allyesconfig", it takes long time to rebuild. This is especially waste of time when we need to rebuild for many times (e.g. doing manual printk() inspection, bisect operations). We can save time if we can exclude modules which are irrelevant to each problem. But "make localmodconfig" cannot exclude modules which are built into vmlinux because /sbin/lsmod output is used as the source of modules. Therefore, this patch adds "make yes2modconfig" which converts from =y to =m if possible. After confirming that the interested problem is still reproducible, we can try "make localmodconfig" (and/or manually tune based on "Modules linked in:" line) in order to exclude modules which are irrelevant to the interested problem. While we are at it, this patch also adds "make mod2yesconfig" which converts from =m to =y in case someone wants to convert from =m to =y after "make localmodconfig". Signed-off-by: Tetsuo Handa Cc: Dmitry Vyukov Signed-off-by: Masahiro Yamada commit c8138a57bbd1a13a2e23d34d3f8f338dd5b526ca Author: Masahiro Yamada Date: Tue Dec 17 13:18:19 2019 +0900 kconfig: use $(PERL) in Makefile The top Makefile defines and exports the variable 'PERL'. Use it in case somebody wants to specify a particular version of perl from the command line. Signed-off-by: Masahiro Yamada commit 1d1352373ebcc627172132f261ea46df0cec767e Author: Masahiro Yamada Date: Tue Dec 17 13:18:18 2019 +0900 kconfig: fix too deep indentation in Makefile The indentation for if ... else ... fi is too deep. Fix it. Signed-off-by: Masahiro Yamada commit 68f0d62746bc7d20c10a565a562baaf968d86415 Author: Masahiro Yamada Date: Tue Dec 17 13:16:37 2019 +0900 kconfig: localmodconfig: fix indentation for closing brace This is the closing brace for the foreach loop. Fix the misleading indentation. Signed-off-by: Masahiro Yamada commit 5edcef8454a4efb10a5cebdfbf284bcaf8b85451 Author: Masahiro Yamada Date: Tue Dec 17 13:16:36 2019 +0900 kconfig: localmodconfig: remove unused $config This is unused since commit cdfc47950a53 ("kconfig: search for a config to base the local(mod|yes)config on"). Having unused $config is confusing because $config is used as a local variable in various sub-routines. Signed-off-by: Masahiro Yamada commit adf7c5bd0674b04588246e444efef9987b2f1a6b Author: Masahiro Yamada Date: Tue Dec 17 13:14:23 2019 +0900 kconfig: squash prop_alloc() into menu_add_prop() prop_alloc() is only called from menu_add_prop(). Squash it. Signed-off-by: Masahiro Yamada commit 6397d96ba5a52c57ee1831a4ddc3aab01bb02048 Author: Masahiro Yamada Date: Tue Dec 17 13:14:22 2019 +0900 kconfig: remove sym from struct property struct property can reference to the symbol that it is associated with by prop->menu->sym. Fix up the one usage of prop->sym, and remove sym from struct property. Signed-off-by: Masahiro Yamada commit 2ffeef615b5e6ac452f55fd6277dc44a667c7c8c Author: Masahiro Yamada Date: Tue Dec 17 13:14:21 2019 +0900 kconfig: remove 'prompt' argument from menu_add_prop() This function no longer uses the 'prompt' argument. Signed-off-by: Masahiro Yamada commit 024352ff8d696e95a8601970f98a66d836e30549 Author: Masahiro Yamada Date: Tue Dec 17 13:14:20 2019 +0900 kconfig: move prompt handling to menu_add_prompt() from menu_add_prop() menu_add_prompt() is the only function that calls menu_add_prop() with non-NULL prompt. So, the code inside the if-conditional block of menu_add_prop() can be moved to menu_add_prompt(). Signed-off-by: Masahiro Yamada commit 1be6e791383a92e168662089dc956828dd33f0ff Author: Masahiro Yamada Date: Tue Dec 17 13:14:19 2019 +0900 kconfig: remove 'prompt' symbol Now that 'prompt' is only reduced from T_WORD_QUOTE without any action, use T_WORD_QUOTE directly. Signed-off-by: Masahiro Yamada commit 801b27db4638da1a7681865f2c6aab5270c5a29b Author: Masahiro Yamada Date: Tue Dec 17 13:14:18 2019 +0900 kconfig: drop T_WORD from the RHS of 'prompt' symbol Commit 8636a1f9677d ("treewide: surround Kconfig file paths with double quotes") killed use-cases to reduce an unquoted string into the 'prompt' symbol. Kconfig still allows to use an unquoted string in the context of menu, source, or prompt. So, you can omit quoting if the prompt is a single word: bool foo ..., but I do not think this is so useful. Let's require quoting: bool "foo" All the Kconfig files in the kernel are written in this way. Remove the T_WORD from the right-hand side of the symbol 'prompt'. Signed-off-by: Masahiro Yamada commit de026ca9152c3b3d8c85b8884a29040975ac1424 Author: Masahiro Yamada Date: Tue Dec 17 13:14:17 2019 +0900 kconfig: use parent->dep as the parentdep of 'menu' In menu_finalize(), the dependency of a menu entry is propagated downwards. For the 'menu', parent->dep and parent->prompt->visible.expr have the same expression. Both accumulate the 'depends on' of itself and upper menu entries. Signed-off-by: Masahiro Yamada commit f64048a20b0ce1bb1fd5c3f80e82556db73fe08b Author: Masahiro Yamada Date: Tue Dec 17 13:14:16 2019 +0900 kconfig: remove the rootmenu check in menu_add_prop() This reverts commit ba6ff60d5eb4 ("kconfig: don't emit warning upon rootmenu's prompt redefinition"). At that time, rootmenu.prompt was always set first, then it was set again if a "mainmenu" statement was specified in the Kconfig file. This is no longer the case since commit 0724a7c32a54 ("kconfig: Don't leak main menus during parsing"). Remove the unneeded check. Signed-off-by: Masahiro Yamada commit 8b41fc4454e36fbfdbb23f940d023d4dece2de29 Author: Masahiro Yamada Date: Thu Dec 19 17:33:29 2019 +0900 kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf Commit bc081dd6e9f6 ("kbuild: generate modules.builtin") added infrastructure to generate modules.builtin, the list of all builtin modules. Basically, it works like this: - Kconfig generates include/config/tristate.conf, the list of tristate CONFIG options with a value in a capital letter. - scripts/Makefile.modbuiltin makes Kbuild descend into directories to collect the information of builtin modules. I am not a big fan of it because Kbuild ends up with traversing the source tree twice. I am not sure how perfectly it should work, but this approach cannot avoid false positives; even if the relevant CONFIG option is tristate, some Makefiles forces obj-m to obj-y. Some examples are: arch/powerpc/platforms/powermac/Makefile: obj-$(CONFIG_NVRAM:m=y) += nvram.o net/ipv6/Makefile: obj-$(subst m,y,$(CONFIG_IPV6)) += inet6_hashtables.o net/netlabel/Makefile: obj-$(subst m,y,$(CONFIG_IPV6)) += netlabel_calipso.o Nobody has complained about (or noticed) it, so it is probably fine to have false positives in modules.builtin. This commit simplifies the implementation. Let's exploit the fact that every module has MODULE_LICENSE(). (modpost shows a warning if MODULE_LICENSE is missing. If so, 0-day bot would already have blocked such a module.) I added MODULE_FILE to . When the code is being compiled as builtin, it will be filled with the file path of the module, and collected into modules.builtin.info. Then, scripts/link-vmlinux.sh extracts the list of builtin modules out of it. This new approach fixes the false-positives above, but adds another type of false-positives; non-modular code may have MODULE_LICENSE() by mistake. This is not a big deal, it is just the code is always orphan. We can clean it up if we like. You can see cleanup examples by: $ git log --grep='make.* explicitly non-modular' To sum up, this commits deletes lots of code, but still produces almost equivalent results. Please note it does not increase the vmlinux size at all. As you can see in include/asm-generic/vmlinux.lds.h, the .modinfo section is discarded in the link stage. Signed-off-by: Masahiro Yamada commit 1664a377908ed6096680e9d7cfd28facef2194f2 Author: Masahiro Yamada Date: Thu Dec 19 17:33:28 2019 +0900 kbuild: pass KBUILD_MODFILE when compiling builtin objects When compiling, Kbuild passes KBUILD_BASENAME (basename of the object) and KBUILD_MODNAME (basename of the module). This commit adds another one, KBUILD_MODFILE, which is the path of the module. (or, the path of the module it would end up in if it were compiled as a module.) The next commit will use this to generate modules.builtin without tristate.conf. Signed-off-by: Masahiro Yamada commit 7e826c44f5de3be00369d534dc38db485f6f26d5 Author: Masahiro Yamada Date: Thu Dec 19 17:33:27 2019 +0900 kbuild: add stringify helper to quote a string passed to C files Make $(squote)$(quote)...$(quote)$(squote) a helper macro. I will reuse it in the next commit. Signed-off-by: Masahiro Yamada commit a7499267976ce014fbc6f7defe9080367f94d6cc Author: Masahiro Yamada Date: Thu Dec 19 01:05:14 2019 +0900 kbuild: use pattern rule for building built-in.a in sub-directories The built-in.a in a sub-directory is created by descending into that directory. It does not depend on the other sub-directories. Loosen the dependency. Signed-off-by: Masahiro Yamada commit 56d5893615727bce4a8769c6b22340e20f9a3c33 Author: Masahiro Yamada Date: Thu Dec 19 01:04:28 2019 +0900 kbuild: do not create orphan built-in.a or obj-y objects Both 'obj-y += foo/' and 'obj-m += foo/' request Kbuild to visit the sub-directory foo/, but the difference is that only the former combines foo/built-in.a into the built-in.a of the current directory because everything in sub-directories visited by obj-m is supposed to be modular. So, it makes sense to create built-in.a only if that sub-directory is reachable by the chain of obj-y. Otherwise, built-in.a will not be linked into vmlinux anyway. For the same reason, it is pointless to compile obj-y objects in the directory visited by obj-m. Signed-off-by: Masahiro Yamada commit 0186b1267b421f9169ead7dec6723294677443c8 Author: Masahiro Yamada Date: Thu Dec 19 00:34:22 2019 +0900 kbuild: rename header-test- to no-header-test in usr/include/Makefile Since commit d2a99dbdade4 ("kbuild: update compile-test header list for v5.5-rc1"), this does not depend on any CONFIG option. no-header-test is clearer. Signed-off-by: Masahiro Yamada commit 551197864ad5d8ed01137b7008448bd18b9731d5 Author: Masahiro Yamada Date: Thu Dec 19 00:34:21 2019 +0900 kbuild: detect missing include guard for exported headers Adding an include guard to every header file is good practice in case it is included multiple times. Exported headers are compile-tested for the comprehensive sanity checks. Let's include the same header twice. If an include guard is missing, the header will fail to build due to redefinition of something. Signed-off-by: Masahiro Yamada Reviewed-by: Sam Ravnborg commit 2c5127a7fa0369801e623e8c6e58193f86d31d73 Author: Georgi Djakov Date: Fri Dec 20 18:38:46 2019 +0200 interconnect: Print the tag in the debugfs summary Now we can have a tag associated with the path. Add this information to the interconnect_summary file, as the current information in debugfs is incomplete. Reviewed-by: Bjorn Andersson Signed-off-by: Georgi Djakov commit 338b4e10f939a71194d8ecef7ece205a942cec05 Author: Alexey Kardashevskiy Date: Mon Dec 23 12:09:27 2019 +1100 vfio/spapr/nvlink2: Skip unpinning pages on error exit The nvlink2 subdriver for IBM Witherspoon machines preregisters GPU memory in the IOMMI API so KVM TCE code can map this memory for DMA as well. This is done by mm_iommu_newdev() called from vfio_pci_nvgpu_regops::mmap. In an unlikely event of failure the data->mem remains NULL and since mm_iommu_put() (which unregisters the region and unpins memory if that was regular memory) does not expect mem=NULL, it should not be called. This adds a check to only call mm_iommu_put() for a valid data->mem. Fixes: 7f92891778df ("vfio_pci: Add NVIDIA GV100GL [Tesla V100 SXM2] subdriver") Signed-off-by: Alexey Kardashevskiy Signed-off-by: Alex Williamson commit 243145bc4336684c69f95de0a303b31f2e5bf264 Author: Andreas Gruenbacher Date: Mon Jan 6 08:58:23 2020 -0800 fs: Fix page_mkwrite off-by-one errors The check in block_page_mkwrite that is meant to determine whether an offset is within the inode size is off by one. This bug has been copied into iomap_page_mkwrite and several filesystems (ubifs, ext4, f2fs, ceph). Fix that by introducing a new page_mkwrite_check_truncate helper that checks for truncate and computes the bytes in the page up to EOF. Use the helper in iomap. NOTE from Darrick: The original patch fixed a number of filesystems, but then there were merge conflicts with the f2fs for-next tree; a subsequent re-submission of the patch had different btrfs changes with no explanation; and Christoph complained that each per-fs fix should be a separate patch. In my view that's too much risk to take on, so I decided to drop all the hunks except for iomap, since I've actually QA'd XFS. Signed-off-by: Andreas Gruenbacher Reviewed-by: Darrick J. Wong [darrick: drop everything but the iomap parts] Signed-off-by: Darrick J. Wong commit b8a0880a37e2f43aa3bcd147182e95a4ebd82279 Author: Arnd Bergmann Date: Thu Jan 2 13:27:45 2020 -0800 xfs: quota: move to time64_t interfaces As a preparation for removing the 32-bit time_t type and all associated interfaces, change xfs to use time64_t and ktime_get_real_seconds() for the quota housekeeping. This avoids one difference between 32-bit and 64-bit kernels, raising the theoretical limit for the quota grace period to year 2106 on 32-bit instead of year 2038. Note that common user space tools using the XFS quotactl interface instead of the generic one still use the y2038 dates. To fix quotas properly, both the on-disk format and user space still need to be changed. Signed-off-by: Arnd Bergmann Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 3b62f000c86ac7139f79912136b85eacf233b173 Author: Arnd Bergmann Date: Thu Jan 2 13:27:44 2020 -0800 xfs: rename compat_time_t to old_time32_t The compat_time_t type has been removed everywhere else, as most users rely on old_time32_t for both native and compat mode handling of 32-bit time_t. Remove the last one in xfs. Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Arnd Bergmann Signed-off-by: Darrick J. Wong commit ab91f72e018ad55805ef056a0af92a30ea45259e Author: Bjorn Andersson Date: Mon Jan 6 00:05:45 2020 -0800 clk: qcom: gcc-msm8996: Fix parent for CLKREF clocks The CLKREF clocks are all fed by the clock signal on the CXO2 pad on the SoC. Update the definition of these clocks to allow this to be wired up to the appropriate clock source. Retain "xo" as the global named parent to make the change a nop in the event that DT doesn't carry the necessary clocks definition. Signed-off-by: Bjorn Andersson Link: https://lkml.kernel.org/r/20200106080546.3192125-2-bjorn.andersson@linaro.org Signed-off-by: Stephen Boyd commit bcd63d222b604d6f72c615939d96496cd3a2ef6c Author: Taniya Das Date: Mon Jan 6 15:48:43 2020 +0530 clk: qcom: rpmh: Add IPA clock for SC7180 The Qualcomm IP Accelerator (IPA) clock resource that is managed by the BCM is required by the IPA driver in order to scale its core clock. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/1578305923-29125-3-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 924e2d0155608328c589f23b2f9942a4ed65438a Author: Taniya Das Date: Mon Jan 6 15:48:42 2020 +0530 clk: qcom: rpmh: skip undefined clocks when registering When iterating over a platform's available clocks in clk_rpmh_probe(), check for undefined (null) entries in the clocks array. Not all clock indexes necessarily have clocks defined. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/1578305923-29125-2-git-send-email-tdas@codeaurora.org [sboyd@kernel.org: Leave 'name' declaration at beginning of loop] Signed-off-by: Stephen Boyd commit 1ee48a61aa57dbdbc3cd2808d8b28df40d938e44 Author: Kai Vehmanen Date: Tue Dec 31 16:00:07 2019 +0200 drm/i915: Limit audio CDCLK>=2*BCLK constraint back to GLK only Revert changes done in commit f6ec9483091f ("drm/i915: extend audio CDCLK>=2*BCLK constraint to more platforms"). Audio drivers communicate with i915 over HDA bus multiple times during system boot-up and each of these transactions result in matching get_power/put_power calls to i915, and depending on the platform, a modeset change causing visible flicker. GLK is the only platform with minimum CDCLK significantly lower than BCLK, and thus for GLK setting a higher CDCLK is mandatory. For other platforms, minimum CDCLK is close but below 2*BCLK (e.g. on ICL, CDCLK=176.4kHz with BCLK=96kHz). Spec-wise the constraint should be set, but in practise no communication errors have been reported and the downside if set is the flicker observed at boot-time. Revert to old behaviour until better mechanism to manage probe-time clocks is available. The full CDCLK>=2*BCLK constraint is still enforced at pipe enable time in intel_crtc_compute_min_cdclk(). Bugzilla: https://gitlab.freedesktop.org/drm/intel/issues/913 Fixes: f6ec9483091f ("drm/i915: extend audio CDCLK>=2*BCLK constraint to more platforms") Signed-off-by: Kai Vehmanen Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191231140007.31728-1-kai.vehmanen@linux.intel.com commit 8c9e607376968865456b33d9a2efdee2c7e1030d Author: Yu-cheng Yu Date: Thu Dec 12 13:08:53 2019 -0800 x86/fpu/xstate: Fix small issues In response to earlier comments, fix small issues before introducing XSAVES supervisor states: - Fix comments of xfeature_is_supervisor(). - Replace ((u64)1 << 63) with XCOMP_BV_COMPACTED_FORMAT. No functional changes. Signed-off-by: Yu-cheng Yu Signed-off-by: Borislav Petkov Reviewed-by: Dave Hansen Reviewed-by: Tony Luck Acked-by: Sebastian Andrzej Siewior Cc: Andy Lutomirski Cc: Dave Hansen Cc: Fenghua Yu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Peter Zijlstra Cc: "Ravi V. Shankar" Cc: Rik van Riel Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191212210855.19260-2-yu-cheng.yu@intel.com commit 810c7736207b4d9600519419518f9d9fa6e0a375 Author: yu kuai Date: Thu Dec 26 20:14:15 2019 +0800 drm/bridge: cdns: remove set but not used variable 'nlanes' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/bridge/cdns-dsi.c: In function ‘cdns_dsi_mode2cfg’: drivers/gpu/drm/bridge/cdns-dsi.c:515:11: warning: variable ‘nlanes’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20191226121415.39483-1-yukuai3@huawei.com commit 303e2a3cb10695c8f2fd468dc6cbd3e9b74e9084 Author: yu kuai Date: Thu Dec 26 20:12:07 2019 +0800 drm/bridge: cdns: remove set but not used variable 'bpp' Fixes gcc '-Wunused-but-set-variable' warning: drivers/gpu/drm/bridge/cdns-dsi.c: In function ‘cdns_dsi_bridge_enable’: drivers/gpu/drm/bridge/cdns-dsi.c:788:6: warning: variable ‘bpp’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20191226121207.2099-1-yukuai3@huawei.com commit 3eaf891224e1dd5da2fa1c9487fdab0dbac3ff8d Author: zhengbin Date: Mon Dec 16 11:58:21 2019 +0800 drm: meson: Remove unneeded semicolon Fixes coccicheck warning: drivers/gpu/drm/meson/meson_crtc.c:360:3-4: Unneeded semicolon drivers/gpu/drm/meson/meson_plane.c:181:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1576468701-69717-1-git-send-email-zhengbin13@huawei.com commit f75fc37b5e70b75f21550410f88e2379648120e2 Author: Chris Wilson Date: Mon Jan 6 12:39:21 2020 +0000 drm/i915/gt: Mark up virtual engine uabi_instance Be sure to initialise the uabi_instance on the virtual engine to the special invalid value, just in case we ever peek at it from the uAPI. Reported-by: Tvrtko Ursulin Fixes: 750e76b4f9f6 ("drm/i915/gt: Move the [class][inst] lookup for engines onto the GT") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: # v5.4+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200106123921.2543886-1-chris@chris-wilson.co.uk commit 6c4798d3f08b81c2c52936b10e0fa872590c96ae Author: Vitaly Chikunov Date: Tue Dec 24 20:20:29 2019 +0300 tools lib: Fix builds when glibc contains strlcpy() Disable a couple of compilation warnings (which are treated as errors) on strlcpy() definition and declaration, allowing users to compile perf and kernel (objtool) when: 1. glibc have strlcpy() (such as in ALT Linux since 2004) objtool and perf build fails with this (in gcc): In file included from exec-cmd.c:3: tools/include/linux/string.h:20:15: error: redundant redeclaration of ‘strlcpy’ [-Werror=redundant-decls] 20 | extern size_t strlcpy(char *dest, const char *src, size_t size); 2. clang ignores `-Wredundant-decls', but produces another warning when building perf: CC util/string.o ../lib/string.c:99:8: error: attribute declaration must precede definition [-Werror,-Wignored-attributes] size_t __weak strlcpy(char *dest, const char *src, size_t size) ../../tools/include/linux/compiler.h:66:34: note: expanded from macro '__weak' # define __weak __attribute__((weak)) /usr/include/bits/string_fortified.h:151:8: note: previous definition is here __NTH (strlcpy (char *__restrict __dest, const char *__restrict __src, Committer notes: The #pragma GCC diagnostic directive was introduced in gcc 4.6, so check for that as well. Fixes: ce99091 ("perf tools: Move strlcpy() from perf to tools/lib/string.c") Fixes: 0215d59 ("tools lib: Reinstate strlcpy() header guard with __UCLIBC__") Resolves: https://bugzilla.kernel.org/show_bug.cgi?id=118481 Signed-off-by: Vitaly Chikunov Reviewed-by: Dmitry Levin Cc: Dmitry Levin Cc: Josh Poimboeuf Cc: kbuild test robot Cc: Peter Zijlstra Cc: stable@vger.kernel.org Cc: Vineet Gupta Link: http://lore.kernel.org/lkml/20191224172029.19690-1-vt@altlinux.org Signed-off-by: Arnaldo Carvalho de Melo commit e6d6abfc447a65e949c1e883e66e1450903d2fbd Author: Arnaldo Carvalho de Melo Date: Tue Dec 17 10:39:04 2019 -0300 perf report/top: Make 'e' visible in the help and make it toggle showing callchains The 'e' and 'c' hotkeys were present for a long time, but not documented in the help window, change 'e' to be a toggle so that it gets consistent with other toggles like '+' and document it in the help window. Keep 'c' as is for people used to it but don't document, as it is easier to just use 'e' to show/hide all the callchains for a top level histogram entry. Reviewed-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Linus Torvalds Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-pmyi5x34stlqmyu81rci94x9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ea537f22f6e5b3e2026fc58419cc937d833b1a61 Author: Arnaldo Carvalho de Melo Date: Mon Dec 16 18:21:16 2019 -0300 perf report/top: Do not offer annotation for symbols without samples This can happen in the --children mode, i.e. the default mode when callchains are present, where one of the main entries may be a callchain entry with no samples. So far we were not providing any information about why an annotation couldn't be provided even offering the Annotation option in the popup menu. Work is needed to allow for no-samples "annotation', i.e. to show the disassembly anyway and allow for navigation, etc. Reviewed-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Linus Torvalds Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-0hhzj2de15o88cguy7h66zre@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4c8b9c0f4281c8517542c26425aade3a31988575 Author: Arnaldo Carvalho de Melo Date: Mon Dec 16 13:27:47 2019 -0300 perf report/top: Allow pressing hotkeys in the options popup menu When the users presses ENTER in the main 'perf report/top' screen a popup menu is presented, in it some hotkeys are suggested as alternatives to using the menu, or for additional features. At that point the user may try those hotkeys, so allow for that by recording the key used and exiting, the caller then can check for that possibility and process the hotkey. I.e. try pressing ENTER, and then 'k' to exit and zoom into the kernel map, using ESC then zooms out, etc. Reviewed-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Linus Torvalds Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-ujfq3fw44kf6qrtfajl5dcsp@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d07126560cab572539621702137eeeeb2a4edf30 Author: Arnaldo Carvalho de Melo Date: Mon Dec 16 12:23:34 2019 -0300 tools ui popup: Allow returning hotkeys With this patch if an optional pointer is passed to ui__popup_menu() then when any key that is not being handled (ENTER, ESC, etc) is typed, it'll record that key in the pointer and return, allowing for hotkey processing on the caller. If NULL is passed, no change in logic, unhandled keys continue to be ignored. Reviewed-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Linus Torvalds Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-6ojn19mqzgmrdm8kdoigic0m@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d10ec006dcd7b20b2eb7e9ef32fc6f83b0112893 Author: Arnaldo Carvalho de Melo Date: Thu Dec 12 15:31:40 2019 -0300 perf hists browser: Allow passing an initial hotkey Sometimes we're in an outer code, like the main hists browser popup menu and the user follows a suggestion about using some hotkey, and that hotkey is really handled by hists_browser__run(), so allow for calling it with that hotkey, making it handle it instead of waiting for the user to press one. Reviewed-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Linus Torvalds Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-xv2l7i6o4urn37nv1h40ryfs@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 209f4e70a2f10bc6819eb20c5bc3988be31972c6 Author: Arnaldo Carvalho de Melo Date: Thu Dec 12 13:06:36 2019 -0300 perf report/top: Add 'k' hotkey to zoom directly into the kernel map As a convenience, equivalent to pressing Enter in a line with a kernel symbol and then selecting "Zoom" into the kernel DSO. Reviewed-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Linus Torvalds Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-vbnlnrpyfvz9deqoobtc3dz7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 632003f400d341592b6af8d96bd83b74a0329fe3 Author: Arnaldo Carvalho de Melo Date: Thu Dec 12 11:55:54 2019 -0300 perf hists browser: Generalize the do_zoom_dso() function We'll use it to provide a top level hotkey to zoom into the kernel dso directly. Reviewed-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Linus Torvalds Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-ae9cjel6v05wjnz9r6z77b6x@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bdc633fec50be7e6856b9dee89af9bb7c5e9a04f Author: Arnaldo Carvalho de Melo Date: Thu Dec 12 11:48:23 2019 -0300 perf report/top: Improve toggle callchain menu option Taking into account the current status of the callchain, i.e. if folded, show "Expand", otherwise "Collapse", also show the name of the entry that will be affected and mention the hotkeys for expanding/collapsing all callchains below the main entry, the one that appears with/without callchains. Reviewed-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Linus Torvalds Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-03arm6poo8463k5tfcfp7gkk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d5a599d9890f51cb2cabfa21f8c38bb6f51f4bb2 Author: Arnaldo Carvalho de Melo Date: Thu Dec 12 10:58:21 2019 -0300 perf report/top: Add menu entry for toggling callchain expansion Since previously pressing ENTER toggled expansion/collapse of callchain entries and now brings up the same menu used when callchains are not present, add an entry so that users can quickly figure out the change in behaviour. Its worth mentioning that we also always had 'e'/'c' to expand/collapse all entries in a hist entry and 'E'/'C' for all hist entries. Suggested-by: Linus Torvalds Reviewed-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-f9o03jo29fypvd8ly3j49d36@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9218a9132f83d2c08cd23c1fd8e8e9b63b47cb5f Author: Arnaldo Carvalho de Melo Date: Thu Dec 12 10:02:33 2019 -0300 perf report/top: Make ENTER consistently bring up menu When callchains are present the ENTER key switches from bringing up the menu that offers Annotation, Zoom by DSO, etc to expanding/collapsing one callchain level, causing confusion, fix it by making it consistently bring up the menu and use '+' to expand/collapse one callchain level. Next patch will also add an entry to the menu to allow expanding/collapsing, so that people used to ENTER expanding one callchain level can quickly find it and use it instead. Reported-by: Linus Torvalds Reviewed-by: Jiri Olsa Cc: Adrian Hunter Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-bjz35omktig8cwn6lbj1ifns@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3f7774033e6820d25beee5cf7aefa11d4968b951 Author: Arnaldo Carvalho de Melo Date: Mon Dec 16 13:22:33 2019 -0300 perf hists browser: Restore ESC as "Zoom out" of DSO/thread/etc We need to set actions->ms.map since 599a2f38a989 ("perf hists browser: Check sort keys before hot key actions"), as in that patch we bail out if map is NULL. Reviewed-by: Jiri Olsa Cc: Adrian Hunter Cc: Namhyung Kim Fixes: 599a2f38a989 ("perf hists browser: Check sort keys before hot key actions") Link: https://lkml.kernel.org/n/tip-wp1ssoewy6zihwwexqpohv0j@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6794200fa3c9c3e6759dae099145f23e4310f4f7 Author: Andrey Zhizhikin Date: Wed Dec 11 08:01:09 2019 +0000 tools lib api fs: Fix gcc9 stringop-truncation compilation error GCC9 introduced string hardening mechanisms, which exhibits the error during fs api compilation: error: '__builtin_strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation] This comes when the length of copy passed to strncpy is is equal to destination size, which could potentially lead to buffer overflow. There is a need to mitigate this potential issue by limiting the size of destination by 1 and explicitly terminate the destination with NULL. Signed-off-by: Andrey Zhizhikin Reviewed-by: Petr Mladek Acked-by: Jiri Olsa Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Kefeng Wang Cc: Martin KaFai Lau Cc: Petr Mladek Cc: Sergey Senozhatsky Cc: Song Liu Cc: Yonghong Song Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20191211080109.18765-1-andrey.zhizhikin@leica-geosystems.com Signed-off-by: Arnaldo Carvalho de Melo commit 81de3bf37a8bf58ecdbef608d16ddb0f4bbb71ca Author: Jiri Olsa Date: Fri Dec 6 22:06:12 2019 +0100 libperf: Add man pages Change the man page generation to asciidoc, because it's easier to use and has been more commonly used in related projects. Remove the current rst pages. Add 3 man pages to have a base for more additions: libperf.3 - overall description libperf-counting.7 - counting basics explained on simple example libperf-sampling.7 - sampling basics explained on simple example The plan is to add more man pages to cover the basic API. The build generates html and man pages: $ cd tools/lib/perf/Documentation $ make ASCIIDOC libperf.xml XMLTO libperf.3 ASCIIDOC libperf-counting.xml XMLTO libperf-counting.7 ASCIIDOC libperf-sampling.xml XMLTO libperf-sampling.7 ASCIIDOC libperf.html ASCIIDOC libperf-counting.html ASCIIDOC libperf-sampling.html Add the following install targets: install-man - man pages install-html - html version of man pages install-examples - examples mentioned in the man pages Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191206210612.8676-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3ce311afb5583cf3d3b7f54ab088949da28aea05 Author: Jiri Olsa Date: Fri Dec 6 22:06:11 2019 +0100 libperf: Move to tools/lib/perf Move libperf from its current location under tools/perf to a separate directory under tools/lib/. Also change various paths (mainly includes) to reflect the libperf move to a separate directory and add a new directory under MANIFEST. Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191206210612.8676-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6ae9c10b7cd50ac9080880204f8d9ff6381b2869 Author: Arnaldo Carvalho de Melo Date: Thu Dec 5 16:09:59 2019 -0300 perf tests bp_signal: Show expected versus obtained values To help understand failures. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: https://lkml.kernel.org/n/tip-c951j3gvrgnrsyg7ki7pwkiz@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c30d630d1bcfad8d2f70ff0cbb2a86d5a43bc152 Author: David Ahern Date: Wed Dec 4 10:39:25 2019 -0700 perf sched timehist: Add support for filtering on CPU Allow user to limit output to one or more CPUs. Really helpful on systems with a large number of cpus. Committer testing: # perf sched record -a sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 1.765 MB perf.data (1412 samples) ] [root@quaco ~]# perf sched timehist | head Samples do not have callchains. time cpu task name wait time sch delay run time [tid/pid] (msec) (msec) (msec) --------------- ------ ------------------------------ --------- --------- --------- 66307.802686 [0000] perf[13086] 0.000 0.000 0.000 66307.802700 [0000] migration/0[12] 0.000 0.001 0.014 66307.802766 [0001] perf[13086] 0.000 0.000 0.000 66307.802774 [0001] migration/1[15] 0.000 0.001 0.007 66307.802841 [0002] perf[13086] 0.000 0.000 0.000 66307.802849 [0002] migration/2[20] 0.000 0.001 0.008 66307.802913 [0003] perf[13086] 0.000 0.000 0.000 # # perf sched timehist --cpu 2 | head Samples do not have callchains. time cpu task name wait time sch delay run time [tid/pid] (msec) (msec) (msec) --------------- ------ ------------------------------ --------- --------- --------- 66307.802841 [0002] perf[13086] 0.000 0.000 0.000 66307.802849 [0002] migration/2[20] 0.000 0.001 0.008 66307.964485 [0002] 0.000 0.000 161.635 66307.964811 [0002] CPU 0/KVM[3589/3561] 0.000 0.056 0.325 66307.965477 [0002] 0.325 0.000 0.666 66307.965553 [0002] CPU 0/KVM[3589/3561] 0.666 0.024 0.076 66307.966456 [0002] 0.076 0.000 0.903 # Signed-off-by: David Ahern Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20191204173925.66976-1-dsahern@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8384a2600c7ddfc875f64e160d8b423aca4e203a Author: Alexey Budankov Date: Tue Dec 3 14:45:27 2019 +0300 perf record: Adapt affinity to machines with #CPUs > 1K Use struct mmap_cpu_mask type for the tool's thread and mmap data buffers to overcome current 1024 CPUs mask size limitation of cpu_set_t type. Currently glibc's cpu_set_t type has an internal mask size limit of 1024 CPUs. Moving to the 'struct mmap_cpu_mask' type allows overcoming that limit. The tools bitmap API is used to manipulate objects of 'struct mmap_cpu_mask' type. Committer notes: To print the 'nbits' struct member we must use %zd, since it is a size_t, this fixes the build in some toolchains/arches. Reported-by: Andi Kleen Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/96d7e2ff-ce8b-c1e0-d52c-aa59ea96f0ea@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 9c080c0279a80057cad3dfc05d09fb283ddf72f4 Author: Alexey Budankov Date: Tue Dec 3 14:44:18 2019 +0300 perf mmap: Declare type for cpu mask of arbitrary length Declare a dedicated struct map_cpu_mask type for cpu masks of arbitrary length. The mask is available thru bits pointer and the mask length is kept in nbits field. MMAP_CPU_MASK_BYTES() macro returns mask storage size in bytes. The mmap_cpu_mask__scnprintf() function can be used to log text representation of the mask. Committer notes: To print the 'nbits' struct member we must use %zd, since it is a size_t, this fixes the build in some toolchains/arches. Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/0fd2454f-477f-d15a-f4ee-79bcbd2585ff@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 8812ad412f851216d6c39488a7e563ccc5c604cc Author: Alexey Budankov Date: Tue Dec 3 14:43:33 2019 +0300 tools bitmap: Implement bitmap_equal() operation at bitmap API Extend tools bitmap API with bitmap_equal() implementation. The implementation has been derived from the kernel. Extend tools bitmap API with bitmap_free() implementation for symmetry with bitmap_alloc() function. Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/43757993-0b28-d8af-a6c7-ede12e3a6877@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 21575a7a8d4c2593ca8d77b3793b35ab3464d99f Author: 周琰杰 (Zhou Yanjie) Date: Tue Dec 17 16:14:10 2019 +0800 I2C: JZ4780: Add support for the X1000. Add support for probing i2c driver on the X1000 Soc from Ingenic. call the corresponding fifo parameter according to the device model obtained from the devicetree. Signed-off-by: 周琰杰 (Zhou Yanjie) Acked-by: Paul Cercueil Signed-off-by: Wolfram Sang commit f4b5af78cb7e87983898b4de5a7e4c2b68ac653b Author: 周琰杰 (Zhou Yanjie) Date: Tue Dec 17 16:14:09 2019 +0800 dt-bindings: I2C: Add X1000 bindings. Add the I2C bindings for the X1000 Soc from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Acked-by: Rob Herring Signed-off-by: Wolfram Sang commit bc0757a51c5a3ef4e76ba6d22310a6e49bc4d0e0 Author: Christoph Müllner Date: Thu Dec 12 01:12:50 2019 +0100 i2c: tiny-usb: Correct I2C fault codes. This patch changes the I2C fault codes according to the specified values in Documentation/i2c/fault-codes. Signed-off-by: Christoph Müllner Signed-off-by: Wolfram Sang commit d969ebe922aa13d1ec99659b6d2332e4811c4d61 Author: Julia Lawall Date: Wed Jan 1 08:43:33 2020 +0100 drm: bridge: dw-hdmi: constify copied structure The dw_hdmi_hw structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Fixes: 7ed6c665e19d ("drm: bridge/dw_hdmi-ahb-audio: add audio driver") Signed-off-by: Julia Lawall Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1577864614-5543-16-git-send-email-Julia.Lawall@inria.fr commit ab17e6caa72c2eb67d8a756ab8778d1d87057726 Author: Chris Wilson Date: Mon Jan 6 11:42:34 2020 +0000 drm/i915/gt: Use memset_p to clear the ports Put memset_p to use to clear the array of pointers used for tracking the ELSP. Signed-off-by: Chris Wilson Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200106114234.2529613-6-chris@chris-wilson.co.uk commit 8413502238168561acf1e2137eaea6af4004e506 Author: Chris Wilson Date: Mon Jan 6 11:42:33 2020 +0000 drm/i915/gt: Drop mutex serialisation between context pin/unpin The last remaining reason for serialising the pin/unpin of the intel_context is to ensure that our preallocated wakerefs are not consumed too early (i.e. the unpin of the previous phase does not emit the idle barriers for this phase before we even submit). All of the other operations within the context pin/unpin are supposed to be atomic... Therefore, we can reduce the serialisation to being just on the i915_active.preallocated_barriers itself and drop the nested pin_mutex from intel_context_unpin(). Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Maarten Lankhorst Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200106114234.2529613-5-chris@chris-wilson.co.uk commit 3fbbbef4f56a94c1b71b342b8157990430375f97 Author: Chris Wilson Date: Mon Jan 6 11:42:32 2020 +0000 drm/i915/gt: Convert the final GEM_TRACE to GT_TRACE and co Convert the few remaining GEM_TRACE() used for debugging over to the appropriate GT_TRACE or RQ_TRACE. References: 639f2f24895f ("drm/i915: Introduce new macros for tracing") Signed-off-by: Chris Wilson Cc: Venkata Sandeep Dhanalakota Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200106114234.2529613-4-chris@chris-wilson.co.uk commit e1c31fb5dde3af91df34d98ca041c746504309d6 Author: Chris Wilson Date: Mon Jan 6 11:42:31 2020 +0000 drm/i915: Merge i915_request.flags with i915_request.fence.flags As we already have a flags field buried within i915_request, reuse it! Signed-off-by: Chris Wilson Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200106114234.2529613-3-chris@chris-wilson.co.uk commit 6d728d92d8cca7dcc2d04e468181933453ea1486 Author: Chris Wilson Date: Mon Jan 6 11:42:30 2020 +0000 drm/i915/selftests: Impose a timeout for request submission Avoid spinning indefinitely waiting for the request to be submitted, and instead apply a timeout. A secondary benefit is that the error message will show which suspect is blocked. Signed-off-by: Chris Wilson Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200106114234.2529613-2-chris@chris-wilson.co.uk commit a5799832c317d1505bb00a234ffd39db900f1613 Author: Chris Wilson Date: Mon Jan 6 11:42:29 2020 +0000 drm/i915/selftests: Fixup sparse __user annotation on local var The local var does not need the __user as it exists on the kernel stack and not a pointer into the __user address space. drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:989:9: warning: dereference of noderef expression drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:990:13: warning: dereference of noderef expression Signed-off-by: Chris Wilson Reviewed-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200106114234.2529613-1-chris@chris-wilson.co.uk commit 42f36457f98dbf329748231ae24499f99117fcb1 Author: Eugen Hristev Date: Mon Dec 9 10:20:05 2019 +0000 i2c: at91: remote default value initialization Platform data structs are initialized by default with zero values. Thus it becomes redundant to initialize them manually to zero (false). Remove extra false initialization for field members in structs. Reported-by: Wolfram Sang Signed-off-by: Eugen Hristev Reviewed-by: Ludovic Desroches Signed-off-by: Wolfram Sang commit a44c03b5879ca0da079ccb03b378d79299e2afd5 Author: Eugen Hristev Date: Mon Dec 9 10:19:59 2019 +0000 dt-bindings: i2c: at91: cosmetic formatting of compatible list Format the list of compatibles with one compatible per line. Suggested-by: Peter Rosin Signed-off-by: Eugen Hristev Acked-by: Ludovic Desroches Acked-by: Rob Herring Signed-off-by: Wolfram Sang commit 19220f35b3708dc069135046061fbe7366d5cb6e Author: Rocky Liao Date: Mon Jan 6 14:07:44 2020 +0800 Bluetooth: btusb: Add support for 04ca:3021 QCA_ROME device USB "VendorID:04ca ProductID:3021" is a new QCA ROME USB Bluetooth device, this patch will support firmware downloading for it. T: Bus=02 Lev=02 Prnt=02 Port=05 Cnt=01 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 2.01 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=04ca ProdID=3021 Rev= 0.01 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=03(O) 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=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=03(O) 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=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=03(O) 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=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=03(O) 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=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms Signed-off-by: Rocky Liao Signed-off-by: Marcel Holtmann commit de2318f69366cdbb285253d5f40b129b09b3515b Author: Thomas Zimmermann Date: Tue Dec 3 09:38:19 2019 +0100 drm/hisilicon/hibmc: Export VRAM MM information to debugfs This change makes information about VRAM consumption available on debugfs. See /sys/kernel/debug/dri/0/vram-mm for an overview of how VRAM is being used. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191203083819.6643-6-tzimmermann@suse.de commit 9dddcd279ab4ebcf27b81f8f967a58bc3717d1e4 Author: Thomas Zimmermann Date: Tue Dec 3 09:38:18 2019 +0100 drm/hisilicon/hibmc: Implement hibmc_dumb_create() with generic helpers The hibmc driver aligns scanlines to 16 bytes. By using the new pitch_align argument of drm_gem_vram_fill_create_dumb(), convert hibmc over. v2: * move changes to VRAM helpers into separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191203083819.6643-5-tzimmermann@suse.de commit 987073278624738573a845c85c4b0db6faaf7be0 Author: Thomas Zimmermann Date: Tue Dec 3 09:38:17 2019 +0100 drm/vram: Support scanline alignment for dumb buffers Adding the pitch alignment as an argument to drm_gem_vram_fill_create_dumb() allows to align scanlines to certain offsets. A value of 0 disables scanline pitches. v3: * only do power-of-2 test if pitch_align given; fails otherwise * mgag200: call drm_gem_vram_fill_create_dumb() with pitch_align v2: * split of patch from related hibmc changes * test if scanline pitch is power of 2 Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191203083819.6643-4-tzimmermann@suse.de commit 3e10d2ffd245f996c36f87b0a8027a719e6135c3 Author: Thomas Zimmermann Date: Tue Dec 3 09:38:16 2019 +0100 drm/hisilicon/hibmc: Replace struct hibmc_framebuffer with generic code The hibmc driver's struct hibmc_framebuffer stores a DRM framebuffer with an associated GEM object. This functionality is also provided by generic code. Switch hibmc over. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191203083819.6643-3-tzimmermann@suse.de commit a88248506a2bcfeaef6837a53cde19fe11970e6c Author: Thomas Zimmermann Date: Tue Dec 3 09:38:15 2019 +0100 drm/hisilicon/hibmc: Switch to generic fbdev emulation There's nothing special about hibmc's fbdev emulation that is not provided by the generic implementation. Switch over and remove the driver's code. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191203083819.6643-2-tzimmermann@suse.de commit dbb6f7787961d840cb6fa0a0e8e7bf77287d00f3 Author: Miquel Raynal Date: Tue Dec 24 15:39:00 2019 +0100 arm64: dts: rockchip: Add PX30 LVDS Describe LVDS IP. Add the CRTC and LVDS relevant endpoints so they can be linked together. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20191224143900.23567-12-miquel.raynal@bootlin.com Signed-off-by: Heiko Stuebner commit cc5912ab43a19b87777ead01235bc2c06c04cb44 Author: Heiko Stuebner Date: Mon Jan 6 12:20:04 2020 +0100 arm64: dts: rockchip: add dsi controller for px30 This adds the dw-mipi-dsi controller and hooks it into the display-subsystem on px30. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20200106112005.795834-1-heiko@sntech.de commit 7e90ccec8c3cb34bca633dea9c38e99d79daa3a9 Author: Miquel Raynal Date: Tue Dec 24 15:38:59 2019 +0100 arm64: dts: rockchip: Add PX30 DSI DPHY Add the PHY which outputs MIPI DSI and LVDS. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20191224143900.23567-11-miquel.raynal@bootlin.com [added dsi power-domain, following vendor-kernel] Signed-off-by: Heiko Stuebner commit 0eee61521da76e2f827f8f3025d77641461553bd Author: Nickey Yang Date: Wed Dec 11 21:34:17 2019 +0100 drm: rockchip: rk3066_hdmi: set edid fifo address Fix edid reading error when edid's block > 2. Signed-off-by: Nickey Yang Signed-off-by: Johan Jonker Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20191211203417.19448-1-jbx6244@gmail.com commit cca1705c3d895fcb67892fc8710005afd6d38541 Author: Miquel Raynal Date: Tue Dec 24 15:38:58 2019 +0100 drm/rockchip: lvds: Add PX30 support Introduce PX30 LVDS support. This means adding the relevant helper functions, a specific probe and also the initialization of a specific PHY. Signed-off-by: Miquel Raynal Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20191224143900.23567-10-miquel.raynal@bootlin.com commit b925adfceb529389124193b57be5b7014e481834 Author: Geert Uytterhoeven Date: Tue Dec 17 19:38:41 2019 +0100 soc: renesas: Add ARCH_R8A7795[01] for existing R-Car H3 Despite using the same compatible values ("r8a7795"-based) because of historical reasons, R-Car H3 ES1.x (R8A77950) and R-Car H3 ES2.0+ (R8A77951) are really different SoCs, with different part numbers. Reflect this in the SoC configuration, by adding CONFIG_ARCH_R8A77950 and CONFIG_ARCH_R8A77951 as new config symbols. These are intended to replace CONFIG_ARCH_R8A7795, and will allow making support for early SoC revisions optional. Note that for now, CONFIG_ARCH_R8A7795 is retained, and just selects CONFIG_ARCH_R8A77950 and CONFIG_ARCH_R8A77951. This relaxes dependencies of other subsystems on the SoC configuration symbol, and provides a smooth transition path for config files through "make oldconfig". Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191217183841.432-6-geert+renesas@glider.be commit 0764f2d08d4660e6f1311180f400804b74d885fa Author: Ben Dooks (Codethink) Date: Wed Dec 18 13:52:30 2019 +0000 soc: renesas: rcar-rst: Fix __iomem on configure call The configure call back takes a register pointer, so should have been marked with __iomem. Add this to silence the following sparse warnings: drivers/soc/renesas/rcar-rst.c:33:22: warning: incorrect type in initializer (incompatible argument 1 (different address spaces)) drivers/soc/renesas/rcar-rst.c:33:22: expected int ( *configure )( ... ) drivers/soc/renesas/rcar-rst.c:33:22: got int ( * )( ... ) drivers/soc/renesas/rcar-rst.c:97:40: warning: incorrect type in argument 1 (different address spaces) drivers/soc/renesas/rcar-rst.c:97:40: expected void *base drivers/soc/renesas/rcar-rst.c:97:40: got void [noderef] *[assigned] base Signed-off-by: Ben Dooks (Codethink) Link: https://lore.kernel.org/r/20191218135230.2610161-1-ben.dooks@codethink.co.uk Signed-off-by: Geert Uytterhoeven commit 2ddac5ae1eaeb5da8e18749887e620d8566a80c9 Author: Enrico Weigelt, metux IT consult Date: Sat Jan 4 20:43:34 2020 +0100 gpio: gpiolib: fix confusing indention There's a confusing indention in gpiochip_add_data_with_key(), which could be misinterpreted on a quick walkthrough. Fixing this in order to improve code readability a bit. Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Bartosz Golaszewski commit 22164fbe274c2dd96d2887fe121896d321000a61 Merge: 3d0dad869aeb f5c547efa16c Author: Maarten Lankhorst Date: Mon Jan 6 10:35:33 2020 +0100 Merge drm/drm-next into drm-misc-next Requested, and we need v5.5-rc1 backported as our current branch is still based on v5.4. Signed-off-by: Maarten Lankhorst commit 203b7ee14d3a38f1b8c44dd86ce0313d8fc4107d Author: Krzysztof Kozlowski Date: Fri Jan 3 17:47:10 2020 +0100 phy: Enable compile testing for some of drivers Some of the phy drivers can be compile tested to increase build coverage. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200103164710.4829-2-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit d9e9866803f7b6c3fdd35d345e97fb0b2908bbbc Author: Nathan Chancellor Date: Tue Dec 17 20:19:31 2019 -0700 ext2: Adjust indentation in ext2_fill_super Clang warns: ../fs/ext2/super.c:1076:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] sbi->s_groups_count = ((le32_to_cpu(es->s_blocks_count) - ^ ../fs/ext2/super.c:1074:2: note: previous statement is here if (EXT2_BLOCKS_PER_GROUP(sb) == 0) ^ 1 warning generated. This warning occurs because there is a space before the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns. Fixes: 41f04d852e35 ("[PATCH] ext2: fix mounts at 16T") Link: https://github.com/ClangBuiltLinux/linux/issues/827 Link: https://lore.kernel.org/r/20191218031930.31393-1-natechancellor@gmail.com Signed-off-by: Nathan Chancellor Signed-off-by: Jan Kara commit 4cf176e52397853e4a4dd37e917c5eafb47ba8d1 Author: Jim Quinlan Date: Fri Jan 3 11:04:29 2020 -0800 reset: Add Broadcom STB RESCAL reset controller On BCM7216 there is a special purpose reset controller named RESCAL (reset calibration) which is necessary for SATA and PCIe0/1 to operate correctly. This commit adds support for such a reset controller to be available. Signed-off-by: Jim Quinlan Signed-off-by: Florian Fainelli Signed-off-by: Philipp Zabel commit f6e1405f7a1698234e5143a806453d60f893c651 Author: Jim Quinlan Date: Fri Jan 3 11:04:28 2020 -0800 dt-bindings: reset: Document BCM7216 RESCAL reset controller BCM7216 has a special purpose RESCAL reset controller for its SATA and PCIe0/1 instances. This is a simple reset controller with #reset-cells set to 0. Signed-off-by: Jim Quinlan [florian: Convert to YAML binding] Signed-off-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: Philipp Zabel commit ad39fc5b5fe53dee79ed479483c79e193b172d7b Author: Samuel Holland Date: Sat Jan 4 20:11:37 2020 -0600 arm64: dts: allwinner: a64: pinebook: Fix lid wakeup By default, gpio-keys configures the pin to trigger wakeup IRQs on either edge. The lid switch should only trigger wakeup when opening the lid, not when closing it. Signed-off-by: Samuel Holland Signed-off-by: Maxime Ripard commit 8614a5e9720633e0c4be70b35fce8faa4b2d485a Author: Chen-Yu Tsai Date: Mon Jan 6 16:42:37 2020 +0800 ARM: dts: sun8i: r40: Add device node for CSI0 The CSI0 and CSI1 blocks are the same as found on the A20. However only CSI0 is supported upstream right now. Add a device node for CSI0 using the A20 compatible as a fallback, and the standard pinctrl options. Also add the MBUS interconnect. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 2c247940640581bcaf9b5cd1ffa914c0ce72f427 Author: Chen-Yu Tsai Date: Mon Jan 6 16:42:35 2020 +0800 ARM: dts: sun7i: Add CSI1 controller and pinmux options The CSI controller driver now supports the second CSI controller, CSI1. Add a device node for it. Pinmuxing options for the MCLK output, the standard 8-bit interface, and a secondary 24-bit interface are included. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 7faf7fbf25005475e788b47170f4337bba9a9c71 Author: Chen-Yu Tsai Date: Mon Jan 6 16:42:34 2020 +0800 ARM: dts: sun4i: Add CSI1 controller and pinmux options The CSI controller driver now supports the second CSI controller, CSI1. Add a device node for it. Pinmuxing options for the MCLK output, the standard 8-bit interface, and a secondary 24-bit interface are included. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 4bdc0d676a643140bdf17dbf7eafedee3d496a3c Author: Christoph Hellwig Date: Mon Jan 6 09:43:50 2020 +0100 remove ioremap_nocache and devm_ioremap_nocache ioremap has provided non-cached semantics by default since the Linux 2.6 days, so remove the additional ioremap_nocache interface. Signed-off-by: Christoph Hellwig Acked-by: Arnd Bergmann commit d23cc635889cacdbb84de7ca099c2ee0a522fd0c Author: Christoph Hellwig Date: Fri Dec 6 09:46:22 2019 +0100 MIPS: define ioremap_nocache to ioremap They are both defined the same way, but this makes it easier to validate the scripted ioremap_nocache removal following soon. Signed-off-by: Christoph Hellwig Acked-by: Paul Burton commit a6a0bc7ca993e30e832314f5a8bd62a802f35ce9 Author: Krzysztof Kozlowski Date: Fri Jan 3 23:08:25 2020 +0100 firmware: scm: Add stubs for OCMEM and restore_sec_cfg_available Add few more stubs (for OCMEM-related functions and qcom_scm_restore_sec_cfg_available()) in case of !CONFIG_QCOM_SCM. These are actually not necessary for builds but provide them for completeness. Reviewed-by: Brian Masney Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200103220825.28710-1-krzk@kernel.org Signed-off-by: Bjorn Andersson commit a8aa481a5d1e91c817ea7f1ea7ae725fe742e755 Author: Vinod Koul Date: Mon Jan 6 12:38:26 2020 +0530 arm64: dts: qcom: sdm845: add the ufs reset Add the core UFS reset for sdm845 Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20200106070826.147064-4-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit c79ec8911e5e81b9caf5c65a2160692afa6b7e30 Author: Vinod Koul Date: Mon Jan 6 12:38:25 2020 +0530 arm64: dts: qcom: sm8150: Fix UFS phy register size UFS phy register space size is 0x1c0. so update it Reported-by: Can Guo Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20200106070826.147064-3-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 7c785435bac7ea6a3e441dc2c24ca911fee999c1 Author: Vinod Koul Date: Mon Jan 6 12:38:24 2020 +0530 arm64: dts: qcom: sm8150-mtp: Add UFS gpio reset Add the reset-gpio for UFS for sm8150-mtp. Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20200106070826.147064-2-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit df2c2ba831a04083ad7485684896eeb090ca3c7d Merge: de1b23b9b4c1 bdeced75b13f Author: David S. Miller Date: Sun Jan 5 23:22:33 2020 -0800 Merge branch 'Convert-Felix-DSA-switch-to-PHYLINK' Vladimir Oltean says: ==================== Convert Felix DSA switch to PHYLINK Unlike most other conversions, this one is not by far a trivial one, and should be seen as "Layerscape PCS meets PHYLINK". Actually, the PCS doesn't need a lot of hand-holding and most of our other devices 'just work' (this one included) without any sort of operating system awareness, just an initialization procedure done typically in the bootloader. Our issues start when the PCS stops from "just working", and that is where PHYLINK comes in handy. The PCS is not specific to the Vitesse / Microsemi / Microchip switching core at all. Variations of this SerDes/PCS design can also be found on DPAA1 and DPAA2 hardware. The main idea of the abstraction provided is that the PCS looks so much like a PHY device, that we model it as an actual PHY device and run the generic PHY functions on it, where appropriate. The 4xSGMII, QSGMII and QSXGMII modes are fairly straightforward. The SerDes protocol which the driver calls 2500Base-X mode (a misnomer) is more interesting. There is a description of how it works and what can be done with it in patch 9/9 (in a comment above vsc9959_pcs_init_2500basex). In short, it is a fixed speed protocol with no auto-negotiation whatsoever. From my research of the SGMII-2500 patent [1], it has nothing to do with SGMII-2500. That one: * does not define any change to the AN base page compared to plain 10/100/1000 SGMII. This implies that the 2500 speed is not negotiable, but the other speeds are. In our case, when the SerDes is configured for this protocol it's configured for good, there's no going back to SGMII. * runs at a higher base frequency than regular SGMII. So SGMII-2500 operating at 1000 Mbps wouldn't interoperate with plain SGMII at 1000 Mbps. Strange, but ok.. * Emulates lower link speeds than 2500 by duplicating the codewords twice, then thrice, then twice again etc (2.5/25/250 times on average). The Layerscape PCS doesn't do that (it is fixed at 2500 Mbaud). But on the other hand it isn't completely compatible with Base-X either, since it doesn't do 802.3z / clause 37 auto negotiation (flow control, local/remote fault etc). It is compatible with 2500Base-X without in-band AN, and that is exactly how we decided to expose it (this is actually similar to what others do). For SGMII and USXGMII, the driver is using the PHYLINK 'managed = "in-band-status"' DTS binding to figure out whether in-band AN is expected to be enabled in the PCS or not. It is expected that the attached PHY follows suite, but there is a gap here: the PHY driver does not react to this setting, so only one of "AN on" and "AN off" works on any particular PHY, even though that PHY might support bypassing the SGMII AN process, as is the case on the VSC8514 PHY present on the LS1028A-RDB board. A separate series will be sent to propose a way to deal with that. I dropped the Ocelot PHYLINK conversion because: * I don't have VSC7514 hardware anyway * The hardware is so different in this regard that there's almost nothing to share anyway. Changes in v5: - Added the register write to DEV_CLOCK_CFG back in felix_phylink_mac_config in patch 9/9. Changes in v4: - This is mostly a resend of v3, with the only notable change that I've dropped the PHY core patches for in_band_autoneg and I'll propose them independently. v1 series: https://www.spinics.net/lists/netdev/msg613869.html RFC v2 series: https://www.spinics.net/lists/netdev/msg620128.html v3 series: https://www.spinics.net/lists/netdev/msg622060.html v4 series: https://www.spinics.net/lists/netdev/msg622606.html [0]: https://www.spinics.net/lists/netdev/msg613869.html [1]: https://patents.google.com/patent/US7356047B1/en ==================== Signed-off-by: David S. Miller commit bdeced75b13f8a0fc8e32b70e517a8dbb7d51738 Author: Vladimir Oltean Date: Mon Jan 6 03:34:17 2020 +0200 net: dsa: felix: Add PCS operations for PHYLINK Layerscape SoCs traditionally expose the SerDes configuration/status for Ethernet protocols (PCS for SGMII/USXGMII/10GBase-R etc etc) in a register format that is compatible with clause 22 or clause 45 (depending on SerDes protocol). Each MAC has its own internal MDIO bus on which there is one or more of these PCS's, responding to commands at a configurable PHY address. The per-port internal MDIO bus (which is just for PCSs) is totally separate and has nothing to do with the dedicated external MDIO controller (which is just for PHYs), but the register map for the MDIO controller is the same. The VSC9959 (Felix) switch instantiated in the LS1028A is integrated in hardware with the ENETC PCS of its DSA master, and reuses its MDIO controller driver, so Felix has been made to depend on it in Kconfig. +------------------------------------------------------------------------+ | +--------+ GMII (typically disabled via RCW) | | ENETC PCI | ENETC |--------------------------+ | | Root Complex | port 3 |-----------------------+ | | | Integrated +--------+ | | | | Endpoint | | | | +--------+ 2.5G GMII | | | | | ENETC |--------------+ | | | | | port 2 |-----------+ | | | | | +--------+ | | | | | | +--------+ +--------+ | | | Felix | | Felix | | | | port 4 | | port 5 | | | +--------+ +--------+ | | | | +--------+ +--------+ +--------+ +--------+ +--------+ +--------+ | | | ENETC | | ENETC | | Felix | | Felix | | Felix | | Felix | | | | port 0 | | port 1 | | port 0 | | port 1 | | port 2 | | port 3 | | +------------------------------------------------------------------------+ | |||| SerDes | |||| |||| |||| |||| | | +--------+block | +--------------------------------------------+ | | | ENETC | | | ENETC port 2 internal MDIO bus | | | | port 0 | | | PCS PCS PCS PCS | | | | PCS | | | 0 1 2 3 | | +-----------------|------------------------------------------------------+ v v v v v v SGMII/ RGMII QSGMII/QSXGMII/4xSGMII/4x1000Base-X/4x2500Base-X USXGMII/ (bypasses 1000Base-X/ SerDes) 2500Base-X In the LS1028A SoC described above, the VSC9959 Felix switch is PF5 of the ENETC root complex, and has 2 BARs: - BAR 4: the switch's effective registers - BAR 0: the MDIO controller register map lended from ENETC port 2 (PF2), for accessing its associated PCS's. This explanation is necessary because the patch does some renaming "pci_bar" -> "switch_pci_bar" for clarity, which would otherwise appear a bit obtuse. The fact that the internal MDIO bus is "borrowed" is relevant because the register map is found in PF5 (the switch) but it triggers an access fault if PF2 (the ENETC DSA master) is not enabled. This is not treated in any way (and I don't think it can be treated). All of this is so SoC-specific, that it was contained as much as possible in the platform-integration file felix_vsc9959.c. We need to parse and pre-validate the device tree because of 2 reasons: - The PHY mode (SerDes protocol) cannot change at runtime due to SoC design. - There is a circular dependency in that we need to know what clause the PCS speaks in order to find it on the internal MDIO bus. But the clause of the PCS depends on what phy-mode it is configured for. The goal of this patch is to make steps towards removing the bootloader dependency for SGMII PCS pre-configuration, as well as to add support for monitoring the in-band SGMII AN between the PCS and the system-side link partner (PHY or other MAC). In practice the bootloader dependency is not completely removed. U-Boot pre-programs the PHY address at which each PCS can be found on the internal MDIO bus (MDEV_PORT). This is needed because the PCS of each port has the same out-of-reset PHY address of zero. The SerDes register for changing MDEV_PORT is pretty deep in the SoC (outside the addresses of the ENETC PCI BARs) and therefore inaccessible to us from here. Felix VSC9959 and Ocelot VSC7514 are integrated very differently in their respective SoCs, and for that reason Felix does not use the Ocelot core library for PHYLINK. On one hand we don't want to impose the fixed phy-mode limitation to Ocelot, and on the other hand Felix doesn't need to force the MAC link speed the way Ocelot does, since the MAC is connected to the PCS through a fixed GMII, and the PCS is the one who does the rate adaptation at lower link speeds, which the MAC does not even need to know about. In fact changing the GMII speed for Felix irrecoverably breaks transmission through that port until a reset. The pair with ENETC port 3 and Felix port 5 is optional and doesn't support tagging. When we enable it, swp5 is a regular slave port, albeit an internal one. The trouble is that it doesn't work, and that is because the DSA PHYLIB adaptation layer doesn't treat fixed-link slave ports. So that is yet another reason for wanting to convert Felix to the native PHYLINK API. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 964ee5c82b770c2d8a5ccefeee3384c1061ce3ae Author: Vladimir Oltean Date: Mon Jan 6 03:34:16 2020 +0200 net: mscc: ocelot: export ANA, DEV and QSYS registers to include/soc/mscc Since the Felix DSA driver is implementing its own PHYLINK instance due to SoC differences, it needs access to the few registers that are common, mainly for flow control. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit ee50d07c9fc8155b5a3c6c29eae1459a12cf2fb4 Author: Vladimir Oltean Date: Mon Jan 6 03:34:15 2020 +0200 net: mscc: ocelot: make phy_mode a member of the common struct ocelot_port The Ocelot switchdev driver and the Felix DSA one need it for different reasons. Felix (or at least the VSC9959 instantiation in NXP LS1028A) is integrated with the traditional NXP Layerscape PCS design which does not support runtime configuration of SerDes protocol. So it needs to pre-validate the phy-mode from the device tree and prevent PHYLINK from attempting to change it. For this, it needs to cache it in a private variable. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit d79d30327f7095e660801271f6740c0aeae0741b Author: Vladimir Oltean Date: Mon Jan 6 03:34:14 2020 +0200 enetc: Set MDIO_CFG_HOLD to the recommended value of 2 This increases the MDIO hold time to 5 enet_clk cycles from the previous value of 0. This is actually the out-of-reset value, that the driver was previously overwriting with 0. Zero worked for the external MDIO, but breaks communication with the internal MDIO buses on which the PCS of ENETC SI's and Felix switch are found. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 6517798dd3432a0002109809bf74e4fcf9bb0c7d Author: Claudiu Manoil Date: Mon Jan 6 03:34:13 2020 +0200 enetc: Make MDIO accessors more generic and export to include/linux/fsl Within the LS1028A SoC, the register map for the ENETC MDIO controller is instantiated a few times: for the central (external) MDIO controller, for the internal bus of each standalone ENETC port, and for the internal bus of the Felix switch. Refactoring is needed to support multiple MDIO buses from multiple drivers. The enetc_hw structure is made an opaque type and a smaller enetc_mdio_priv is created. 'mdio_base' - MDIO registers base address - is being parameterized, to be able to work with different MDIO register bases. The ENETC MDIO bus operations are exported from the fsl-enetc-mdio kernel object, the same that registers the central MDIO controller (the dedicated PF). The ENETC main driver has been changed to select it, and use its exported helpers to further register its private MDIO bus. The DSA Felix driver will do the same. Signed-off-by: Claudiu Manoil Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 787cac3f5a650fd3184a41c5a27a2fe9ded833aa Author: Vladimir Oltean Date: Mon Jan 6 03:34:12 2020 +0200 net: dsa: Pass pcs_poll flag from driver to PHYLINK The DSA drivers that implement .phylink_mac_link_state should normally register an interrupt for the PCS, from which they should call phylink_mac_change(). However not all switches implement this, and those who don't should set this flag in dsa_switch in the .setup callback, so that PHYLINK will poll for a few ms until the in-band AN link timer expires and the PCS state settles. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 1511ed0a0167f523a84b4e727372a5d2ce1b6c2f Author: Vladimir Oltean Date: Mon Jan 6 03:34:11 2020 +0200 net: phylink: add support for polling MAC PCS Some MAC PCS blocks are unable to provide interrupts when their status changes. As we already have support in phylink for polling status, use this to provide a hook for MACs to enable polling mode. The patch idea was picked up from Russell King's suggestion on the macb phylink patch thread here [0] but the implementation was changed. Instead of introducing a new phylink_start_poll() function, which would make the implementation cumbersome for common PHYLINK implementations for multiple types of devices, like DSA, just add a boolean property to the phylink_config structure, which is just as backwards-compatible. https://lkml.org/lkml/2019/12/16/603 Suggested-by: Russell King Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 3a68ba6fbab786a50f380894c832bf36ba7335f3 Author: Vladimir Oltean Date: Mon Jan 6 03:34:10 2020 +0200 net: phylink: make QSGMII a valid PHY mode for in-band AN QSGMII is a SerDes protocol clocked at 5 Gbaud (4 times higher than SGMII which is clocked at 1.25 Gbaud), with the same 8b/10b encoding and some extra symbols for synchronization. Logically it offers 4 SGMII interfaces multiplexed onto the same physical lanes. Each MAC PCS has its own in-band AN process with the system side of the QSGMII PHY, which is identical to the regular SGMII AN process. So allow QSGMII as a valid in-band AN mode, since it is no different from software perspective from regular SGMII. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 6c930994503d9b5bd34b1329427dd7d3d6d37cd4 Author: Vladimir Oltean Date: Mon Jan 6 03:34:09 2020 +0200 mii: Add helpers for parsing SGMII auto-negotiation Typically a MAC PCS auto-configures itself after it receives the negotiated copper-side link settings from the PHY, but some MAC devices are more special and need manual interpretation of the SGMII AN result. In other cases, the PCS exposes the entire tx_config_reg base page as it is transmitted on the wire during auto-negotiation, so it makes sense to be able to decode the equivalent lp_advertised bit mask from the raw u16 (of course, "lp" considering the PCS to be the local PHY). Therefore, add the bit definitions for the SGMII registers 4 and 5 (local device ability, link partner ability), as well as a link_mode conversion helper that can be used to feed the AN results into phy_resolve_aneg_linkmode. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 3a9d970f17e05a7b26f782beb8f7f2118d1741ea Author: Sebastian Andrzej Siewior Date: Thu Dec 19 16:16:02 2019 +0100 powerpc/85xx: Get twr_p102x to compile again With CONFIG_QUICC_ENGINE enabled and CONFIG_UCC_GETH + CONFIG_SERIAL_QE disabled we have an unused variable (np). The code won't compile with -Werror. Move the np variable to the block where it is actually used. Signed-off-by: Sebastian Andrzej Siewior Acked-by: Scott Wood Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191219151602.1908411-1-bigeasy@linutronix.de commit 978bff4e521dab0a72ee4f2627f9245f7d3d6f64 Author: Alexey Kardashevskiy Date: Mon Dec 16 15:19:24 2019 +1100 powerpc/pseries/svm: Allow IOMMU to work in SVM H_PUT_TCE_INDIRECT uses a shared page to send up to 512 TCE to a hypervisor in a single hypercall. This does not work for secure VMs as the page needs to be shared or the VM should use H_PUT_TCE instead. This disables H_PUT_TCE_INDIRECT by clearing the FW_FEATURE_PUT_TCE_IND feature bit so SVMs will map TCEs using H_PUT_TCE. This is not a part of init_svm() as it is called too late after FW patching is done and may result in a warning like this: [ 3.727716] Firmware features changed after feature patching! [ 3.727965] WARNING: CPU: 0 PID: 1 at (...)arch/powerpc/lib/feature-fixups.c:466 check_features+0xa4/0xc0 Signed-off-by: Alexey Kardashevskiy Reviewed-by: Thiago Jung Bauermann Tested-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191216041924.42318-5-aik@ozlabs.ru commit 17a0364cb07c173f64cefe973a93b8dbd9c61795 Author: Alexey Kardashevskiy Date: Mon Dec 16 15:19:23 2019 +1100 powerpc/pseries/iommu: Separate FW_FEATURE_MULTITCE to put/stuff features H_PUT_TCE_INDIRECT allows packing up to 512 TCE updates into a single hypercall; H_STUFF_TCE can clear lots in a single hypercall too. However, unlike H_STUFF_TCE (which writes the same TCE to all entries), H_PUT_TCE_INDIRECT uses a 4K page with new TCEs. In a secure VM environment this means sharing a secure VM page with a hypervisor which we would rather avoid. This splits the FW_FEATURE_MULTITCE feature into FW_FEATURE_PUT_TCE_IND and FW_FEATURE_STUFF_TCE. "hcall-multi-tce" in the "/rtas/ibm,hypertas-functions" device tree property sets both; the "multitce=off" kernel command line parameter disables both. This should not cause behavioural change. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Thiago Jung Bauermann Tested-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191216041924.42318-4-aik@ozlabs.ru commit 7559d3d295f3365ea7ac0c0274c05e633fe4f594 Author: Alexey Kardashevskiy Date: Mon Dec 16 15:19:22 2019 +1100 powerpc/pseries: Allow not having ibm, hypertas-functions::hcall-multi-tce for DDW By default a pseries guest supports a H_PUT_TCE hypercall which maps a single IOMMU page in a DMA window. Additionally the hypervisor may support H_PUT_TCE_INDIRECT/H_STUFF_TCE which update multiple TCEs at once; this is advertised via the device tree /rtas/ibm,hypertas-functions property which Linux converts to FW_FEATURE_MULTITCE. FW_FEATURE_MULTITCE is checked when dma_iommu_ops is used; however the code managing the huge DMA window (DDW) ignores it and calls H_PUT_TCE_INDIRECT even if it is explicitly disabled via the "multitce=off" kernel command line parameter. This adds FW_FEATURE_MULTITCE checking to the DDW code path. This changes tce_build_pSeriesLP to take liobn and page size as the huge window does not have iommu_table descriptor which usually the place to store these numbers. Fixes: 4e8b0cf46b25 ("powerpc/pseries: Add support for dynamic dma windows") Signed-off-by: Alexey Kardashevskiy Reviewed-by: Thiago Jung Bauermann Tested-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191216041924.42318-3-aik@ozlabs.ru commit d862b44133b7a1d7de25288e09eabf4df415e971 Author: Ram Pai Date: Mon Dec 16 15:19:21 2019 +1100 Revert "powerpc/pseries/iommu: Don't use dma_iommu_ops on secure guests" This reverts commit edea902c1c1efb855f77e041f9daf1abe7a9768a. At the time the change allowed direct DMA ops for secure VMs; however since then we switched on using SWIOTLB backed with IOMMU (direct mapping) and to make this work, we need dma_iommu_ops which handles all cases including TCE mapping I/O pages in the presence of an IOMMU. Fixes: edea902c1c1e ("powerpc/pseries/iommu: Don't use dma_iommu_ops on secure guests") Signed-off-by: Ram Pai [aik: added "revert" and "fixes:"] Signed-off-by: Alexey Kardashevskiy Reviewed-by: Thiago Jung Bauermann Tested-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191216041924.42318-2-aik@ozlabs.ru commit 4a8e274e2d8cc5628d3027be0900e8835a2dfa7b Author: Michael Ellerman Date: Thu Dec 19 23:26:38 2019 +1100 powerpc/pseries: Remove redundant select of PPC_DOORBELL Commit d4e58e5928f8 ("powerpc/powernv: Enable POWER8 doorbell IPIs") added a select of PPC_DOORBELL to PPC_PSERIES, but it already had a select of PPC_DOORBELL. One is enough. Reported-by: Jason A. Donenfeld Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191219125840.32592-1-mpe@ellerman.id.au commit fb185a4052b18c97ebc98f6a8db30a60abca35e0 Author: Peter Ujfalusi Date: Tue Dec 17 09:37:30 2019 +0200 powerpc/512x: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191217073730.21249-1-peter.ujfalusi@ti.com commit 1c7f4fe86f17f296bafab1d418c040533324bf4f Author: Oliver O'Halloran Date: Mon Oct 28 19:54:24 2019 +1100 powerpc/pci: Remove pcibios_setup_bus_devices() With the previous patch applied pcibios_setup_device() will always be run when pcibios_bus_add_device() is called. There are several code paths where pcibios_setup_bus_device() is still called (the PowerPC specific PCI hotplug support is one) so with just the previous patch applied the setup can be run multiple times on a device, once before the device is added to the bus and once after. There's no need to run the setup in the early case any more so just remove it entirely. Signed-off-by: Oliver O'Halloran Tested-by: Alexey Kardashevskiy Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191028085424.12006-3-oohall@gmail.com commit 30d87ef8b38d471ab5c0f1226926ebd856da8647 Author: Shawn Anastasio Date: Mon Oct 28 19:54:23 2019 +1100 powerpc/pci: Fix pcibios_setup_device() ordering Move PCI device setup from pcibios_add_device() and pcibios_fixup_bus() to pcibios_bus_add_device(). This ensures that platform-specific DMA and IOMMU setup occurs after the device has been registered in sysfs, which is a requirement for IOMMU group assignment to work This fixes IOMMU group assignment for hotplugged devices on pseries, where the existing behavior results in IOMMU assignment before registration. Thanks to Lukas Wunner for the suggestion. Signed-off-by: Shawn Anastasio Tested-by: Alexey Kardashevskiy Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191028085424.12006-2-oohall@gmail.com commit 3b5b9997b331e77ce967eba2c4bc80dc3134a7fe Author: Oliver O'Halloran Date: Mon Oct 28 19:54:22 2019 +1100 powerpc/powernv/iov: Ensure the pdn for VFs always contains a valid PE number On pseries there is a bug with adding hotplugged devices to an IOMMU group. For a number of dumb reasons fixing that bug first requires re-working how VFs are configured on PowerNV. For background, on PowerNV we use the pcibios_sriov_enable() hook to do two things: 1. Create a pci_dn structure for each of the VFs, and 2. Configure the PHB's internal BARs so the MMIO range for each VF maps to a unique PE. Roughly speaking a PE is the hardware counterpart to a Linux IOMMU group since all the devices in a PE share the same IOMMU table. A PE also defines the set of devices that should be isolated in response to a PCI error (i.e. bad DMA, UR/CA, AER events, etc). When isolated all MMIO and DMA traffic to and from devicein the PE is blocked by the root complex until the PE is recovered by the OS. The requirement to block MMIO causes a giant headache because the P8 PHB generally uses a fixed mapping between MMIO addresses and PEs. As a result we need to delay configuring the IOMMU groups for device until after MMIO resources are assigned. For physical devices (i.e. non-VFs) the PE assignment is done in pcibios_setup_bridge() which is called immediately after the MMIO resources for downstream devices (and the bridge's windows) are assigned. For VFs the setup is more complicated because: a) pcibios_setup_bridge() is not called again when VFs are activated, and b) The pci_dev for VFs are created by generic code which runs after pcibios_sriov_enable() is called. The work around for this is a two step process: 1. A fixup in pcibios_add_device() is used to initialised the cached pe_number in pci_dn, then 2. A bus notifier then adds the device to the IOMMU group for the PE specified in pci_dn->pe_number. A side effect fixing the pseries bug mentioned in the first paragraph is moving the fixup out of pcibios_add_device() and into pcibios_bus_add_device(), which is called much later. This results in step 2. failing because pci_dn->pe_number won't be initialised when the bus notifier is run. We can fix this by removing the need for the fixup. The PE for a VF is known before the VF is even scanned so we can initialise pci_dn->pe_number pcibios_sriov_enable() instead. Unfortunately, moving the initialisation causes two problems: 1. We trip the WARN_ON() in the current fixup code, and 2. The EEH core clears pdn->pe_number when recovering a VF and relies on the fixup to correctly re-set it. The only justification for either of these is a comment in eeh_rmv_device() suggesting that pdn->pe_number *must* be set to IODA_INVALID_PE in order for the VF to be scanned. However, this comment appears to have no basis in reality. Both bugs can be fixed by just deleting the code. Tested-by: Alexey Kardashevskiy Reviewed-by: Alexey Kardashevskiy Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191028085424.12006-1-oohall@gmail.com commit 0eb59382dff23910e7104c397b617fb0fede538e Author: Aneesh Kumar K.V Date: Mon Dec 2 12:08:55 2019 +0530 powerpc/papr_scm: Update debug message Resource struct p->res is assigned later. Avoid using %pR before the resource struct is assigned. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191202063855.154321-1-aneesh.kumar@linux.ibm.com commit 5eb7cfb3a2b178f3d443301cda0825bb9f475657 Author: Michael Ellerman Date: Mon May 20 20:20:51 2019 +1000 selftests/powerpc: Add a test of bad (out-of-range) accesses Userspace isn't allowed to access certain address ranges, make sure we actually test that to at least some degree. This would have caught the recent bug where the SLB fault handler was incorrectly called on an out-of-range access when using the Radix MMU. It also would have caught the bug we had in get_region_id() where we were inserting SLB entries for bad addresses. Signed-off-by: Michael Ellerman Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190520102051.12103-1-mpe@ellerman.id.au commit 1a3ec143a90a4674e01099c3ba47c3268536a462 Author: Anju T Sudhakar Date: Mon Oct 28 21:08:16 2019 +1100 powerpc/imc: Add documentation for IMC and trace-mode Documentation for IMC (In-Memory Collection Counters) infrastructure and trace-mode of IMC. Signed-off-by: Anju T Sudhakar [mpe: Convert to rst, minor rewording, make PMI example more concise] Signed-off-by: Michael Ellerman Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191028100816.6270-1-mpe@ellerman.id.au commit c3aae14e5d468d18dbb5d7c0c8c7e2968cc14aad Author: Nathan Chancellor Date: Mon Dec 9 13:03:38 2019 -0700 powerpc/44x: Adjust indentation in ibm4xx_denali_fixup_memsize Clang warns: ../arch/powerpc/boot/4xx.c:231:3: warning: misleading indentation; statement is not part of the previous 'else' [-Wmisleading-indentation] val = SDRAM0_READ(DDR0_42); ^ ../arch/powerpc/boot/4xx.c:227:2: note: previous statement is here else ^ This is because there is a space at the beginning of this line; remove it so that the indentation is consistent according to the Linux kernel coding style and clang no longer warns. Fixes: d23f5099297c ("[POWERPC] 4xx: Adds decoding of 440SPE memory size to boot wrapper library") Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Michael Ellerman Link: https://github.com/ClangBuiltLinux/linux/issues/780 Link: https://lore.kernel.org/r/20191209200338.12546-1-natechancellor@gmail.com commit 5290ae2b8e5fecc465e2fe92350ff02aa2e5acae Author: Jordan Niethe Date: Wed Dec 11 13:35:52 2019 +1100 powerpc/64: Use {SAVE,REST}_NVGPRS macros In entry_64.S there are places that open code saving and restoring the non-volatile registers. There are already macros for doing this so use them. Signed-off-by: Jordan Niethe Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191211023552.16480-1-jniethe5@gmail.com commit 37215da5553eb00616291a82decb958bb2d98fc1 Author: Geert Uytterhoeven Date: Wed Aug 28 15:23:06 2019 +0200 clk: Add support for setting clk_rate via debugfs For testing, it is useful to be able to specify a clock rate manually. As this is a dangerous feature, it is not enabled by default. Users need to modify the source directly and #define CLOCK_ALLOW_WRITE_DEBUGFS. This follows the spirit of commit 09c6ecd394105c48 ("regmap: Add support for writing to regmap registers via debugfs"). Signed-off-by: Geert Uytterhoeven Link: https://lkml.kernel.org/r/20190828132306.19012-1-geert+renesas@glider.be Suggested-by: Stephen Boyd Signed-off-by: Stephen Boyd commit 66d9f5214c9ba1c151478f99520b6817302d50dc Author: Eugen Hristev Date: Tue Dec 10 11:25:19 2019 +0000 clk: at91: sam9x60: fix programmable clock prescaler The prescaler works as parent rate divided by (PRES + 1) (is_pres_direct == 1) It does not work in the way of parent rate shifted to the right by (PRES + 1), which means division by 2^(PRES + 1) (is_pres_direct == 0) Thus is_pres_direct must be enabled for this SoC, to make the right computation. This field was added in commit 45b06682113b ("clk: at91: fix programmable clock for sama5d2") SAM9X60 has the same field as SAMA5D2 in the PCK Fixes: 01e2113de9a5 ("clk: at91: add sam9x60 pmc driver") Signed-off-by: Eugen Hristev Link: https://lkml.kernel.org/r/1575977088-16781-1-git-send-email-eugen.hristev@microchip.com Signed-off-by: Stephen Boyd commit db2f44820a981d353c41d36b27dccd3bb90b5e62 Author: Eugen Hristev Date: Mon Nov 11 13:28:57 2019 +0000 clk: at91: sam9x60-pll: adapt PMC_PLL_ACR default value Product datasheet recommends different values for UPLL and PLLA analog control register. Adapt accordingly. Signed-off-by: Eugen Hristev Link: https://lkml.kernel.org/r/1573478913-19737-1-git-send-email-eugen.hristev@microchip.com Acked-by: Nicolas Ferre Signed-off-by: Stephen Boyd commit 3d5191a140ba39bf30c7468e38c84c9c4c25eba0 Author: Shawn Guo Date: Thu Dec 26 16:38:44 2019 +0800 arm64: dts: hi3798cv200-poplar: add linux,rc-map-name for IR It adds remote control map name for IR device, so that key event can be reported. Signed-off-by: Shawn Guo Signed-off-by: Wei Xu commit 91d7f3f8f1346ac5899c7e25a0dbd409212cdf53 Author: Krzysztof Kozlowski Date: Sat Jan 4 16:21:00 2020 +0100 PM / devfreq: exynos: Rename Exynos to lowercase Fix up inconsistent usage of upper and lowercase letters in "Exynos" name. "EXYNOS" is not an abbreviation but a regular trademarked name. Therefore it should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi commit 3e0801b62a30f5c83df0b7c75afce50061401e30 Author: Guido Günther Date: Sat Jan 4 11:54:21 2020 +0100 dt: bindings: lm3692x: Add led-max-microamp property This can be used to limit the current per LED strip. Signed-off-by: Guido Günther Acked-by: Pavel Machek Reviewed-by: Rob Herring Signed-off-by: Pavel Machek commit cffd61a5c7755546154539dcd7f36590e91e002f Author: Guido Günther Date: Sat Jan 4 11:54:18 2020 +0100 leds: lm3692x: Allow to configure over voltage protection Overvoltage protection is currently using the default of 29V. Make it configurable via DT. Signed-off-by: Guido Günther Acked-by: Pavel Machek Signed-off-by: Pavel Machek commit ebf59a4558c2c1629dff276da6fc9b0e77800fa6 Author: Guido Günther Date: Sat Jan 4 11:54:17 2020 +0100 dt: bindings: lm3692x: Add ti,ovp-microvolt property This allows to set the overvoltage protection to 17V, 21V, 25V or 29V. Signed-off-by: Guido Günther Acked-by: Pavel Machek Signed-off-by: Pavel Machek Reviewed-by: Rob Herring commit 7a349e8c535d7327bf80710323c725df47149b8d Author: Jean-Jacques Hiblot Date: Sun Jan 5 23:31:14 2020 +0100 leds: populate the device's of_node If initialization data is available and its fwnode is actually a of_node, store this information in the led device's structure. This will allow the device to use or provide OF-based API such (devm_xxx). Signed-off-by: Jean-Jacques Hiblot Signed-off-by: Pavel Machek commit e389240ad99292d52a4f8ff30f16830dc9c63779 Author: Jean-Jacques Hiblot Date: Thu Oct 3 10:28:10 2019 +0200 leds: Add managed API to get a LED from a device driver If the LED is acquired by a consumer device with devm_led_get(), it is automatically released when the device is detached. Signed-off-by: Jean-Jacques Hiblot Acked-by: Pavel Machek Signed-off-by: Pavel Machek commit 699a8c7c4bd376aee4808e6272188319e900c8af Author: Tomi Valkeinen Date: Thu Oct 3 10:28:09 2019 +0200 leds: Add of_led_get() and led_put() This patch adds basic support for a kernel driver to get a LED device. This will be used by the led-backlight driver. Only OF version is implemented for now, and the behavior is similar to PWM's of_pwm_get() and pwm_put(). Signed-off-by: Tomi Valkeinen Signed-off-by: Jean-Jacques Hiblot Acked-by: Pavel Machek Signed-off-by: Pavel Machek commit 31e065c4e8bac71be29a9d4d65ea62f5c9ec17b3 Author: Pavel Date: Sun Jan 5 23:36:58 2020 +0100 leds: lm3532: add pointer to documentation and fix typo Add pointer to datasheet and fix typo in printk message. Signed-off-by: Pavel Machek commit de1b23b9b4c1504f124ebbf079131b1713756199 Merge: 8bd17dc6da3d 2821d50fc0c4 Author: David S. Miller Date: Sun Jan 5 15:13:13 2020 -0800 Merge branch 'dsa-deferred-xmit' Vladimir Oltean says: ==================== Improvements to the DSA deferred xmit After the feedback received on v1: https://www.spinics.net/lists/netdev/msg622617.html I've decided to move the deferred xmit implementation completely within the sja1105 driver. The executive summary for this series is the same as it was for v1 (better for everybody): - For those who don't use it, thanks to one less assignment in the hotpath (and now also thanks to less code in the DSA core) - For those who do, by making its scheduling more amenable and moving it outside the generic workqueue (since it still deals with packet hotpath, after all) There are some simplification (1/3) and cosmetic (3/3) patches in the areas next to the code touched by the main patch (2/3). ==================== Signed-off-by: David S. Miller commit 2821d50fc0c45e45bc10781d4dd332e21e7fb980 Author: Vladimir Oltean Date: Sat Jan 4 02:37:11 2020 +0200 net: dsa: tag_sja1105: Slightly improve the Xmas tree in sja1105_xmit This is a cosmetic patch that makes the dp, tx_vid, queue_mapping and pcp local variable definitions a bit closer in length, so they don't look like an eyesore as much. The 'ds' variable is not used otherwise, except for ds->dp. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit a68578c20a9667463ee3000402b21644ea62d753 Author: Vladimir Oltean Date: Sat Jan 4 02:37:10 2020 +0200 net: dsa: Make deferred_xmit private to sja1105 There are 3 things that are wrong with the DSA deferred xmit mechanism: 1. Its introduction has made the DSA hotpath ever so slightly more inefficient for everybody, since DSA_SKB_CB(skb)->deferred_xmit needs to be initialized to false for every transmitted frame, in order to figure out whether the driver requested deferral or not (a very rare occasion, rare even for the only driver that does use this mechanism: sja1105). That was necessary to avoid kfree_skb from freeing the skb. 2. Because L2 PTP is a link-local protocol like STP, it requires management routes and deferred xmit with this switch. But as opposed to STP, the deferred work mechanism needs to schedule the packet rather quickly for the TX timstamp to be collected in time and sent to user space. But there is no provision for controlling the scheduling priority of this deferred xmit workqueue. Too bad this is a rather specific requirement for a feature that nobody else uses (more below). 3. Perhaps most importantly, it makes the DSA core adhere a bit too much to the NXP company-wide policy "Innovate Where It Doesn't Matter". The sja1105 is probably the only DSA switch that requires some frames sent from the CPU to be routed to the slave port via an out-of-band configuration (register write) rather than in-band (DSA tag). And there are indeed very good reasons to not want to do that: if that out-of-band register is at the other end of a slow bus such as SPI, then you limit that Ethernet flow's throughput to effectively the throughput of the SPI bus. So hardware vendors should definitely not be encouraged to design this way. We do _not_ want more widespread use of this mechanism. Luckily we have a solution for each of the 3 issues: For 1, we can just remove that variable in the skb->cb and counteract the effect of kfree_skb with skb_get, much to the same effect. The advantage, of course, being that anybody who doesn't use deferred xmit doesn't need to do any extra operation in the hotpath. For 2, we can create a kernel thread for each port's deferred xmit work. If the user switch ports are named swp0, swp1, swp2, the kernel threads will be named swp0_xmit, swp1_xmit, swp2_xmit (there appears to be a 15 character length limit on kernel thread names). With this, the user can change the scheduling priority with chrt $(pidof swp2_xmit). For 3, we can actually move the entire implementation to the sja1105 driver. So this patch deletes the generic implementation from the DSA core and adds a new one, more adequate to the requirements of PTP TX timestamping, in sja1105_main.c. Suggested-by: Florian Fainelli Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 0a51826c6e05c5b6cc423b376b81c311e9e485b0 Author: Vladimir Oltean Date: Sat Jan 4 02:37:09 2020 +0200 net: dsa: sja1105: Always send through management routes in slot 0 I finally found out how the 4 management route slots are supposed to be used, but.. it's not worth it. The description from the comment I've just deleted in this commit is still true: when more than 1 management slot is active at the same time, the switch will match frames incoming [from the CPU port] on the lowest numbered management slot that matches the frame's DMAC. My issue was that one was not supposed to statically assign each port a slot. Yes, there are 4 slots and also 4 non-CPU ports, but that is a mere coincidence. Instead, the switch can be used like this: every management frame gets a slot at the right of the most recently assigned slot: Send mgmt frame 1 through S0: S0 x x x Send mgmt frame 2 through S1: S0 S1 x x Send mgmt frame 3 through S2: S0 S1 S2 x Send mgmt frame 4 through S3: S0 S1 S2 S3 The difference compared to the old usage is that the transmission of frames 1-4 doesn't need to wait until the completion of the management route. It is safe to use a slot to the right of the most recently used one, because by protocol nobody will program a slot to your left and "steal" your route towards the correct egress port. So there is a potential throughput benefit here. But mgmt frame 5 has no more free slot to use, so it has to wait until _all_ of S0, S1, S2, S3 are full, in order to use S0 again. And that's actually exactly the problem: I was looking for something that would bring more predictable transmission latency, but this is exactly the opposite: 3 out of 4 frames would be transmitted quicker, but the 4th would draw the short straw and have a worse worst-case latency than before. Useless. Things are made even worse by PTP TX timestamping, which is something I won't go deeply into here. Suffice to say that the fact there is a driver-level lock on the SPI bus offsets any potential throughput gains that parallelism might bring. So there's no going back to the multi-slot scheme, remove the "mgmt_slot" variable from sja1105_port and the dummy static assignment made at probe time. While passing by, also remove the assignment to casc_port altogether. Don't pretend that we support cascaded setups. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 8bd17dc6da3d74980fd86912e18388ebf6a0083b Merge: aea6a1eba576 e0f909bc3a24 Author: David S. Miller Date: Sun Jan 5 15:05:35 2020 -0800 Merge branch 'Fix-10G-PHY-interface-types' Russell King says: ==================== Fix 10G PHY interface types Recent discussion has revealed that our current usage of the 10GKR phy_interface_t is not correct. This is based on a misunderstanding caused in part by the various specifications being difficult to obtain. Now that a better understanding has been reached, we ought to correct this. This series introduce PHY_INTERFACE_MODE_10GBASER to replace the existing usage of 10GKR mode, and document their differences in the phylib documentation. Then switch PHY, SFP/phylink, the Marvell PP2 network driver, and its associated comphy driver over to use the correct interface mode. None of the existing platform usage was actually using 10GBASE-KR. In order to maintain compatibility with existing DT files, arrange for the Marvell PP2 driver to rewrite the phy interface mode; this allows other drivers to adopt correct behaviour w.r.t whether the 10G connection conforms to the backplane 10GBASE-KR protocol vs normal 10GBASE-R protocol. After applying these locally to net-next I've validated that the only places which mention the old PHY_INTERFACE_MODE_10GKR definition are: Documentation/networking/phy.rst:``PHY_INTERFACE_MODE_10GKR`` drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c: if (phy_mode == PHY_INTERFACE_MODE_10GKR) drivers/net/phy/aquantia_main.c: phydev->interface = PHY_INTERFACE_MODE_10GKR; drivers/net/phy/aquantia_main.c: phydev->interface != PHY_INTERFACE_MODE_10GKR && include/linux/phy.h: PHY_INTERFACE_MODE_10GKR, include/linux/phy.h: case PHY_INTERFACE_MODE_10GKR: which is as expected. The only users of "10gbase-kr" in DT are: arch/arm64/boot/dts/marvell/armada-7040-db.dts: phy-mode = "10gbase-kr"; arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dts: phy-mode = "10gbase-kr"; arch/arm64/boot/dts/marvell/armada-8040-db.dts: phy-mode = "10gbase-kr"; arch/arm64/boot/dts/marvell/armada-8040-db.dts: phy-mode = "10gbase-kr"; arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts: phy-mode = "10gbase-kr"; arch/arm64/boot/dts/marvell/armada-8040-mcbin-singleshot.dts: phy-mode = "10gbase-kr"; arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts: phy-mode = "10gbase-kr";arch/arm64/boot/dts/marvell/armada-8040-mcbin.dts: phy-mode = "10gbase-kr";arch/arm64/boot/dts/marvell/cn9130-db.dts: phy-mode = "10gbase-kr"; arch/arm64/boot/dts/marvell/cn9131-db.dts: phy-mode = "10gbase-kr"; arch/arm64/boot/dts/marvell/cn9132-db.dts: phy-mode = "10gbase-kr"; which all use the mvpp2 driver, and these will be updated in a separate patch to be submitted in the following kernel cycle. v2: add comment to mvpp2 driver. ==================== Signed-off-by: David S. Miller commit e0f909bc3a242296da9ccff78277f26d4883a79d Author: Russell King Date: Fri Jan 3 20:43:23 2020 +0000 net: switch to using PHY_INTERFACE_MODE_10GBASER rather than 10GKR Switch network drivers, phy drivers, and SFP/phylink over to use the more correct 10GBASE-R, rather than 10GBASE-KR. 10GBASE-KR is backplane ethernet, which is 10GBASE-R with autonegotiation on top, which our current usage on the affected platforms does not have. The only remaining user of PHY_INTERFACE_MODE_10GKR is the Aquantia PHY, which has a separate mode for 10GBASE-KR. For Marvell mvpp2, we detect 10GBASE-KR, and rewrite it to 10GBASE-R for compatibility with existing DT - this is the only network driver at present that makes use of PHY_INTERFACE_MODE_10GKR. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit c114574ebfdf42f826776f717c8056a00fa94881 Author: Russell King Date: Fri Jan 3 20:43:17 2020 +0000 net: phy: add PHY_INTERFACE_MODE_10GBASER Recent discussion has revealed that the use of PHY_INTERFACE_MODE_10GKR is incorrect. Add a 10GBASE-R definition, document both the -R and -KR versions, and the fact that 10GKR was used incorrectly. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit aea6a1eba5769999ecb8d7a049f397b5f8ff5d28 Merge: 14a65084f931 fbb39807e9ae Author: David S. Miller Date: Sun Jan 5 14:51:02 2020 -0800 Merge branch 'ionic-add-sriov-support' Shannon Nelson says: ==================== ionic: add sriov support Set up the basic support for enabling SR-IOV devices in the ionic driver. Since most of the management work happens in the NIC firmware, the driver becomes mostly a pass-through for the network stack commands that want to control and configure the VFs. v4: changed "vf too big" checks to use pci_num_vf() changed from vf[] array of pointers of individually allocated vf structs to single allocated vfs[] array of vf structs added clean up of vfs[] on probe fail added setup for vf stats dma v3: added check in probe for pre-existing VFs split out the alloc and dealloc of vf structs to better deal with pre-existing VFs (left enabled on remove) restored the checks for vf too big because of a potential case where VFs are already enabled but driver failed to alloc the vf structs v2: use pci_num_vf() and kcalloc() remove checks for vf too big add locking for the VF operations disable VFs in ionic_remove() if they are still running ==================== Signed-off-by: David S. Miller commit fbb39807e9ae0f60e2f6a0a628aadab73554fbbe Author: Shannon Nelson Date: Fri Jan 3 09:55:08 2020 -0800 ionic: support sr-iov operations Add the netdev ops for managing VFs. Since most of the management work happens in the NIC firmware, the driver becomes mostly a pass-through for the network stack commands that want to control and configure the VFs. We also tweak ionic_station_set() a little to allow for the VFs that start off with a zero'd mac address. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 3d462ce2a11784e278d4f425bf5c4cadeab2af3a Author: Shannon Nelson Date: Fri Jan 3 09:55:07 2020 -0800 ionic: ionic_if bits for sr-iov support Adds new AdminQ calls and their related structs for supporting PF controls on VFs: CMD_OPCODE_VF_GETATTR CMD_OPCODE_VF_SETATTR Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 14a65084f9310ba6a4017c365f9c9820b099dde5 Author: Krzysztof Kozlowski Date: Fri Jan 3 18:11:30 2020 +0100 net: ethernet: sxgbe: Rename Samsung to lowercase Fix up inconsistent usage of upper and lowercase letters in "Samsung" name. "SAMSUNG" is not an abbreviation but a regular trademarked name. Therefore it should be written with lowercase letters starting with capital letter. Although advertisement materials usually use uppercase "SAMSUNG", the lowercase version is used in all legal aspects (e.g. on Wikipedia and in privacy/legal statements on https://www.samsung.com/semiconductor/privacy-global/). Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit 675a3176121612ca7a4db2b0296f4f96415369ef Merge: aa1d54c65d11 5ffcc85814f2 Author: David S. Miller Date: Sun Jan 5 14:27:01 2020 -0800 Merge branch 'net-phy-switch-to-using-fwnode_gpiod_get_index' Dmitry Torokhov says: ==================== net: phy: switch to using fwnode_gpiod_get_index This series switches phy drivers form using fwnode_get_named_gpiod() and gpiod_get_from_of_node() that are scheduled to be removed in favor of fwnode_gpiod_get_index() that behaves more like standard gpiod_get_index() and will potentially handle secondary software nodes in cases we need to augment platform firmware. Now that the dependencies have been merged into networking tree the patches can be applied there as well. v3: - rebased on top of net-next v2: - rebased on top of Linus' W devel branch - added David's ACKs ==================== Signed-off-by: David S. Miller commit 5ffcc85814f27e04c1c0180bf7a3b7b76bb776c8 Author: Dmitry Torokhov Date: Thu Jan 2 17:03:20 2020 -0800 net: phy: fixed_phy: switch to using fwnode_gpiod_get_index gpiod_get_from_of_node() is being retired in favor of [devm_]fwnode_gpiod_get_index(), that behaves similar to [devm_]gpiod_get_index(), but can work with arbitrary firmware node. It will also be able to support secondary software nodes. Let's switch this driver over. Acked-by: David S. Miller Signed-off-by: Dmitry Torokhov Signed-off-by: David S. Miller commit d266f19f3ae7fbcaf92229639b78d2110ae44f33 Author: Dmitry Torokhov Date: Thu Jan 2 17:03:19 2020 -0800 net: phy: fixed_phy: fix use-after-free when checking link GPIO If we fail to locate GPIO for any reason other than deferral or not-found-GPIO, we try to print device tree node info, however if might be freed already as we called of_node_put() on it. Acked-by: David S. Miller Signed-off-by: Dmitry Torokhov Signed-off-by: David S. Miller commit b605c9abc4d2e79eed1332be14a79960a1e9f503 Author: Dmitry Torokhov Date: Thu Jan 2 17:03:18 2020 -0800 net: phylink: switch to using fwnode_gpiod_get_index() Instead of fwnode_get_named_gpiod() that I plan to hide away, let's use the new fwnode_gpiod_get_index() that mimics gpiod_get_index(), but works with arbitrary firmware node. Reviewed-by: Andy Shevchenko Acked-by: David S. Miller Signed-off-by: Dmitry Torokhov Signed-off-by: David S. Miller commit aa1d54c65d11ab32e72f8122709e9dff4049ce93 Author: Florian Fainelli Date: Thu Jan 2 15:34:45 2020 -0800 net: dsa: vsc73xx: Remove dependency on CONFIG_OF There is no build time dependency on CONFIG_OF, but we do need to make sure we gate the initialization of the gpio_chip::of_node member with a proper check on CONFIG_OF_GPIO. This enables the driver to build on platforms that do not have CONFIG_OF enabled. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 704a0afb4963a486f604fba1064f9025e2865fc9 Merge: 3b477d6cdc4a 736775d06bac Author: David S. Miller Date: Sun Jan 5 14:08:32 2020 -0800 Merge branch 'WireGuard-bug-fixes-and-cleanups' Jason A. Donenfeld says: ==================== WireGuard bug fixes and cleanups I've been working through some personal notes and also the whole git repo history of the out-of-tree module, looking for places where tradeoffs were made (and subsequently forgotten about) for old kernels. The first two patches in this series clean up those. The first one does so in the self-tests and self-test harness, where we're now able to expand test coverage by a bit, and we're now cooking away tests on every commit to both the wireguard-linux repo and to net-next. The second one removes a workaround for a skbuff.h bug that was fixed long ago. Finally, the last patch in the series fixes in a bug unearthed by newer Qualcomm chipsets running the rmnet_perf driver, which does UDP GRO. ==================== Signed-off-by: David S. Miller commit 736775d06bac60d7a353e405398b48b2bd8b1e54 Author: Jason A. Donenfeld Date: Thu Jan 2 17:47:51 2020 +0100 wireguard: socket: mark skbs as not on list when receiving via gro Certain drivers will pass gro skbs to udp, at which point the udp driver simply iterates through them and passes them off to encap_rcv, which is where we pick up. At the moment, we're not attempting to coalesce these into bundles, but we also don't want to wind up having cascaded lists of skbs treated separately. The right behavior here, then, is to just mark each incoming one as not on a list. This can be seen in practice, for example, with Qualcomm's rmnet_perf driver. Signed-off-by: Jason A. Donenfeld Tested-by: Yaroslav Furman Signed-off-by: David S. Miller commit 04d2ea92a18417619182cbb79063f154892b0150 Author: Jason A. Donenfeld Date: Thu Jan 2 17:47:50 2020 +0100 wireguard: queueing: do not account for pfmemalloc when clearing skb header Before 8b7008620b84 ("net: Don't copy pfmemalloc flag in __copy_skb_ header()"), the pfmemalloc flag used to be between headers_start and headers_end, which is a region we clear when preparing the packet for encryption/decryption. This is a parameter we certainly want to preserve, which is why 8b7008620b84 moved it out of there. The code here was written in a world before 8b7008620b84, though, where we had to manually account for it. This commit brings things up to speed. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 9a69a4c8802adf642bc4a13d471b5a86b44ed434 Author: Jason A. Donenfeld Date: Thu Jan 2 17:47:49 2020 +0100 wireguard: selftests: remove ancient kernel compatibility code Quite a bit of the test suite was designed to work with ancient kernels. Thankfully we no longer have to deal with this. This commit updates things that we can finally update and removes things that we can finally remove, to avoid the build-up of the last several years as a result of having to support ancient kernels. We can finally rely on suppress_ prefixlength being available. On the build side of things, the no-PIE hack is no longer required, and we can bump some of the tools, repair our m68k and i686-kvm support, and get better coverage of the static branches used in the crypto lib and in udp_tunnel. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 3b477d6cdc4a44f617540ace2466a3fc58dc72d5 Merge: 4460985fac06 63c92c9d2e53 Author: David S. Miller Date: Sun Jan 5 14:03:54 2020 -0800 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2020-01-04 This series contains updates to the igc driver only. Sasha does some housekeeping on the igc driver to remove forward declarations that are not needed after re-arranging several functions. ==================== Signed-off-by: David S. Miller commit add427c49e92c78519d0ff1728ea66d9e52f1fc9 Author: Florian Fainelli Date: Sun Apr 7 14:40:50 2019 -0700 soc: bcm: brcmstb: biuctrl: Update programming for 7211 Add a matching entry for 7211 which can be programmed with the same BIUCTRL settings as other Brahma-B53 based SoCs. While at it, rename the function to include a72 in the name to reflect this applies to both types of 64-bit capable CPUs that we support (Brahma-B53 and Cortex-A72). Signed-off-by: Florian Fainelli commit ea1e84d1bd3c0845f814f06d08005bb9cd6da700 Author: Florian Fainelli Date: Mon Apr 1 20:03:32 2019 -0700 soc: bcm: brcmstb: biuctrl: Update layout for A72 on 7211 The BIUCTRL layout is a little different on 7211 which is equipped with a Cortex-A72, account for those register offset differences. We will match 7211 specifically in a subsequent commit. Signed-off-by: Florian Fainelli commit b2f91a39cfba5af101e95c2348b7932539e293b7 Author: Florian Fainelli Date: Tue Dec 10 15:05:26 2019 -0800 soc: bcm: brcmstb: biuctrl: Tune interface for 7255 and 7216 7255 and 7216 are some of the latest chips that were produced and support the full register range configuration for the BIU, add the two entries to get the expected programming. Signed-off-by: Florian Fainelli commit 3098f5eb906b9e66b0a0b79b75d612261a6a7108 Author: Florian Fainelli Date: Tue Dec 10 14:57:58 2019 -0800 soc: bcm: brcmstb: biuctrl: Tune 7260 BIU interface 7260A0 and B0 are both supported, and 7260A0 has a small difference in that it does not support the write-back control register, which is why we have a different array of registers. Update the comment above b53_cpubiuctrl_no_wb_regs to denote that difference. Signed-off-by: Florian Fainelli commit 2d34f09e79c9e96e9b748b320b9b0fa3d5e6b553 Author: Stephen Boyd Date: Fri Aug 30 08:09:17 2019 -0700 clk: fixed-rate: Add support for specifying parents via DT/pointers After commit fc0c209c147f ("clk: Allow parents to be specified without string names") we can use DT or direct clk_hw pointers to specify parents. Create a generic function that shouldn't be used very often to encode the multitude of ways of registering a fixed rate clk with different parent information. Then add a bunch of wrapper macros that only pass down what needs to be passed down to the generic function to support this with less arguments. Cc: Manivannan Sadhasivam Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20190830150923.259497-7-sboyd@kernel.org commit 32205b75414e530dc6c95ac39f70ef8e194327e0 Author: Stephen Boyd Date: Fri Aug 30 08:09:16 2019 -0700 clk: fixed-rate: Document accuracy member This member isn't documented, leading to kernel-doc warnings. Document it. Cc: Manivannan Sadhasivam Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20190830150923.259497-6-sboyd@kernel.org commit 38d1e38093b7d85ed0fa3a28c13c3266db505b3b Author: Stephen Boyd Date: Fri Aug 30 08:09:15 2019 -0700 clk: fixed-rate: Move to_clk_fixed_rate() to C file The only user of this macro is the fixed rate basic type. Move it there to avoid polluting provider drivers. Cc: Manivannan Sadhasivam Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20190830150923.259497-5-sboyd@kernel.org commit 576859dfc54897e405cd7c6ad683792737dcebfd Author: Stephen Boyd Date: Fri Aug 30 08:09:14 2019 -0700 clk: fixed-rate: Remove clk_register_fixed_rate_with_accuracy() There aren't any users of this API anymore. Remove it. Cc: Manivannan Sadhasivam Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20190830150923.259497-4-sboyd@kernel.org commit 34e018336f98f18ec855b378f83646fea8540717 Author: Stephen Boyd Date: Fri Aug 30 08:09:13 2019 -0700 clk: fixed-rate: Convert to clk_hw based APIs This code still uses struct clk to register clks from the probe path. Migrate this to the clk_hw based APIs to modernize the code. Also, this isn't a module and it can't be one because the driver is always builtin so drop the module table. Cc: Manivannan Sadhasivam Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20190830150923.259497-3-sboyd@kernel.org commit 9a9b5a4af066f1245d7848a5d5d5c8147c18aa28 Author: Stephen Boyd Date: Fri Aug 30 08:09:12 2019 -0700 clk: gpio: Use DT way of specifying parents Nobody has used the gpio clk registration functions nor the gpio clk_ops exposed by the basic gpio clk type. Let's remove all those APIs and move the gpio clk support into the C file. Since nothing is using the exported APIs, simplify the driver to be a platform driver that uses clk_parent_data to pick 0th or 1st cell of the node's clocks property. Cc: Simon Horman Cc: Magnus Damm Cc: Geert Uytterhoeven Cc: Enric Balletbo i Serra Cc: Tony Lindgren Cc: Manivannan Sadhasivam Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20190830150923.259497-2-sboyd@kernel.org commit f1dd4795b1523fbca7ab4344dd5a8bb439cc770d Author: Takashi Iwai Date: Sun Jan 5 15:48:23 2020 +0100 ALSA: sh: Fix compile warning wrt const A long-standing compile warning was seen during build test: sound/sh/aica.c: In function 'load_aica_firmware': sound/sh/aica.c:521:25: warning: passing argument 2 of 'spu_memload' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] Fixes: 198de43d758c ("[ALSA] Add ALSA support for the SEGA Dreamcast PCM device") Link: https://lore.kernel.org/r/20200105144823.29547-69-tiwai@suse.de Signed-off-by: Takashi Iwai commit cabc04680778adf57e1c0d64af2c46971a895d99 Author: Takashi Iwai Date: Sun Jan 5 15:48:22 2020 +0100 ALSA: spi: More constification Apply const prefix to the static table for registers. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-68-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6ab9eabe19c07a8b6fca7c588b5a03a3e6e9cd49 Author: Takashi Iwai Date: Sun Jan 5 15:48:21 2020 +0100 ALSA: pdaudiocf: More constification Apply const prefix to the static table for verbs. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-67-tiwai@suse.de Signed-off-by: Takashi Iwai commit a05c0737d3c7a0eab47711e29185655eb357d718 Author: Takashi Iwai Date: Sun Jan 5 15:48:20 2020 +0100 ALSA: via82xx: More constification Apply const prefix to the static table for the chip models. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-66-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8045d0fc95753b00c6f0cb0f3a50a919a0b95038 Author: Takashi Iwai Date: Sun Jan 5 15:48:19 2020 +0100 ALSA: fm801: More constification Apply const prefix to the static register table. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-65-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7103e4a70cb9413b3b6a485c03d463bb0232c15a Author: Takashi Iwai Date: Sun Jan 5 15:48:18 2020 +0100 ALSA: ens137x: More constification Apply const prefix to the quirk entry, forgotten in the previous fix. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-64-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9bca09079352db5c5cd68a37a3d441d45fac9b54 Author: Takashi Iwai Date: Sun Jan 5 15:48:17 2020 +0100 ALSA: echoaudio: More constification Apply const prefix to the static channel list table. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-63-tiwai@suse.de Signed-off-by: Takashi Iwai commit e157f0cd056af9f2715dd91d55688a7c0fea4608 Author: Takashi Iwai Date: Sun Jan 5 15:48:16 2020 +0100 ALSA: cs4281: More constification Apply const prefix to the static register table. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-62-tiwai@suse.de Signed-off-by: Takashi Iwai commit 83fdb6fbccfcf771bce8d3d69a737f23843f2507 Author: Takashi Iwai Date: Sun Jan 5 15:48:15 2020 +0100 ALSA: azt3328: More constification Apply const prefix to the static initial register table. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-61-tiwai@suse.de Signed-off-by: Takashi Iwai commit 24ce8056a935cc1a42e73f7bba1d25893a3f9851 Author: Takashi Iwai Date: Sun Jan 5 15:48:14 2020 +0100 ALSA: ak4531: More constification Apply const prefix to the initial register map. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-60-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6c8454888fe68bf2e3690c489d8764bac47c24c5 Author: Takashi Iwai Date: Sun Jan 5 15:48:13 2020 +0100 ALSA: serial-u16550: More constification Apply const prefix to the string array. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-59-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1d99500a1d782f506f215b757d681e0e071981a5 Author: Takashi Iwai Date: Sun Jan 5 15:48:12 2020 +0100 ALSA: opl4: More constification Apply const prefix to the static volume table. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-58-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7840d8a103389ae37b4f11fb3574ea69b2863ba3 Author: Takashi Iwai Date: Sun Jan 5 15:48:11 2020 +0100 ALSA: arm: More constification Apply const prefix to the static channel list table. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-57-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2f200ce2919b231038f80dde4e7e7147c611242b Author: Takashi Iwai Date: Sun Jan 5 15:48:10 2020 +0100 ALSA: lx6464es: More constifications Apply const prefix to the static tables for the DSP command and the peak map. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-56-tiwai@suse.de Signed-off-by: Takashi Iwai commit 26170691ffbb05f161d1ba21465497b4ba2502cd Author: Takashi Iwai Date: Sun Jan 5 15:48:09 2020 +0100 ALSA: aw2: More constifications Apply const prefix to the static parameter tables. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-55-tiwai@suse.de Signed-off-by: Takashi Iwai commit 616986985d4c609f90acee5d3417dbb2cb67109d Author: Takashi Iwai Date: Sun Jan 5 15:48:08 2020 +0100 ALSA: mts64: More constifications Apply const prefix to the static mapping tables. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-54-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8fc179162df5b307d8d1f8f4b6b7bb507742cd55 Author: Takashi Iwai Date: Sun Jan 5 15:48:07 2020 +0100 ALSA: sc6000: More constification Apply const prefix to the static resource tables. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-53-tiwai@suse.de Signed-off-by: Takashi Iwai commit 429bca4d76b406302de4d06d6f4e20e2a36afb08 Author: Takashi Iwai Date: Sun Jan 5 15:48:06 2020 +0100 ALSA: wss: More constifications Apply const prefix to the static tables for parameters. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-52-tiwai@suse.de Signed-off-by: Takashi Iwai commit 80e0a7c095462e24f48908e6effd7a44099249f9 Author: Takashi Iwai Date: Sun Jan 5 15:48:05 2020 +0100 ALSA: opti9xx: More constifications Apply const prefix to the static resource tables, the mc size tables and the string arrays. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-51-tiwai@suse.de Signed-off-by: Takashi Iwai commit 15a1af95d65729d35071445b9459c1e22f776347 Author: Takashi Iwai Date: Sun Jan 5 15:48:04 2020 +0100 ALSA: gus: More constifications Apply const prefix to each possible place: the static resource tables, the volume table, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-50-tiwai@suse.de Signed-off-by: Takashi Iwai commit fce6709730255f3b81e98ea3b78859b079521077 Author: Takashi Iwai Date: Sun Jan 5 15:48:03 2020 +0100 ALSA: es18xx: More constifications Apply const prefix to the static map tables and the static resource tables. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-49-tiwai@suse.de Signed-off-by: Takashi Iwai commit 748f51812182788703c3bf664282a41e70ae3386 Author: Takashi Iwai Date: Sun Jan 5 15:48:02 2020 +0100 ALSA: es1688: More constifications Apply const prefix to the static resource tables and init tables. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-48-tiwai@suse.de Signed-off-by: Takashi Iwai commit 350f613f37e63ca0162e6ea42df4c1f9c5cc49db Author: Takashi Iwai Date: Sun Jan 5 15:48:01 2020 +0100 ALSA: cmi8330: More constifications Apply const prefix to the static tables for the register, controls and callbacks. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-47-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2a076d0af49875d2806ff300b632ebc6a43720ee Author: Takashi Iwai Date: Sun Jan 5 15:48:00 2020 +0100 ALSA: sb: More constifications Apply const prefix to each possible place: the static tables for the resources, controls, registers, values and parameters. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-46-tiwai@suse.de Signed-off-by: Takashi Iwai commit 58b5b363702de28e95541efeeb04626a0f2b43c4 Author: Takashi Iwai Date: Sun Jan 5 15:47:59 2020 +0100 ALSA: cs423x: More constification Apply const prefix to the static mapping table. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-45-tiwai@suse.de Signed-off-by: Takashi Iwai commit f3c0916946706f6aa8e9041f41378d9c26ba57d6 Author: Takashi Iwai Date: Sun Jan 5 15:47:58 2020 +0100 ALSA: cmi8328: More constifications Apply const prefix to the static resource tables. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-44-tiwai@suse.de Signed-off-by: Takashi Iwai commit e3de2a406ef525302e8a0805a753af13db26c844 Author: Takashi Iwai Date: Sun Jan 5 15:47:57 2020 +0100 ALSA: opl3: More constifications Apply const prefix to the static tables for drum, volume and notes. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-43-tiwai@suse.de Signed-off-by: Takashi Iwai commit edb87ed5f9f180fecca64f803eb1f595291d519d Author: Takashi Iwai Date: Sun Jan 5 15:47:56 2020 +0100 ALSA: rawmidi: More constification Apply const prefix to the static flag info table. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-42-tiwai@suse.de Signed-off-by: Takashi Iwai commit b40fe4bbc76bf6be655f9ba975dc91c6a72fe79e Author: Takashi Iwai Date: Sun Jan 5 15:47:55 2020 +0100 ALSA: oss: More constifications Apply const prefix to the static tables for strings and formats. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-41-tiwai@suse.de Signed-off-by: Takashi Iwai commit f98903fce976f261b5cfc28a1c86163a7c5b01b9 Author: Takashi Iwai Date: Sun Jan 5 15:47:54 2020 +0100 ALSA: jack: More constification Apply const prefix to the static jack switch table. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-40-tiwai@suse.de Signed-off-by: Takashi Iwai commit 51d7847a2d81ac6779b62fabd722b49b3b664de9 Author: Takashi Iwai Date: Sun Jan 5 15:47:53 2020 +0100 ALSA: info: More constifications Apply const prefix to the string array and its callers. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-39-tiwai@suse.de Signed-off-by: Takashi Iwai commit 121f46be2c6cd8b90c9c7a28b7ae2dc084425478 Author: Takashi Iwai Date: Sun Jan 5 15:47:52 2020 +0100 ALSA: sparc: More constifications Apply const prefix to the static tables for rates, bits and strings. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-38-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5f3aca1065e1b5a7f26ba2c991d4ebac6a69c9e8 Author: Takashi Iwai Date: Sun Jan 5 15:47:51 2020 +0100 ALSA: cmipci: More constifications Apply const prefix to the static tables for rates, ports and registers. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-37-tiwai@suse.de Signed-off-by: Takashi Iwai commit 096da809f6e87c2ec96e6d2eab6f8f2fbf3c2b65 Author: Takashi Iwai Date: Sun Jan 5 15:47:50 2020 +0100 ALSA: es1968: More constifications Apply const prefix to the quirk white/black lists. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-36-tiwai@suse.de Signed-off-by: Takashi Iwai commit 96d5ebf25e131b4e824754ec622b89260341302c Author: Takashi Iwai Date: Sun Jan 5 15:47:49 2020 +0100 ALSA: es1938: More constifications Apply const prefix to the static register table and its callers. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-35-tiwai@suse.de Signed-off-by: Takashi Iwai commit 066c044b054a4445ee9e0219c77cda6d2f964570 Author: Takashi Iwai Date: Sun Jan 5 15:47:48 2020 +0100 ALSA: atiixp: More constifications Apply const prefix to the static register tables. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-34-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9ca7a0c97923a88d9bbb645ea6e3e1ffe2bd5661 Author: Takashi Iwai Date: Sun Jan 5 15:47:47 2020 +0100 ALSA: asihpi: More constifications Apply const prefix to each possible place: the static tables for formats, parameters, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-33-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6e0e75d94e7a84fe65ce75dee93857292426a44d Author: Takashi Iwai Date: Sun Jan 5 15:47:46 2020 +0100 ALSA: ctxfi: More constifications Apply const prefix to each possible place: the DAIO tables and the register offset table. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-32-tiwai@suse.de Signed-off-by: Takashi Iwai commit 97974309721eb996a5092cb13901af126886450e Author: Takashi Iwai Date: Sun Jan 5 15:47:45 2020 +0100 ALSA: ca0106: More constifications Apply const prefix to each possible place: the static tables for registers and verbs, and the string arrays. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-31-tiwai@suse.de Signed-off-by: Takashi Iwai commit ba09f5d84e3e39ffb6768e5473073cfb96ba32e3 Author: Takashi Iwai Date: Sun Jan 5 15:47:44 2020 +0100 ALSA: cs46xx: More constifications Apply const prefix to each possible place: the static tables for registers and op codes, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-30-tiwai@suse.de Signed-off-by: Takashi Iwai commit a7f7edcfa47c720b31e503e8817687229757f8dc Author: Takashi Iwai Date: Sun Jan 5 15:47:43 2020 +0100 ALSA: korg1212: More constifications Apply const prefix to each possible place: the string array, the static tables for clock selectors, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-29-tiwai@suse.de Signed-off-by: Takashi Iwai commit ccfacf2b2ee49962452b8d7bd104047d681f0555 Author: Takashi Iwai Date: Sun Jan 5 15:47:42 2020 +0100 ALSA: nm256: More constifications Apply const prefix to the static tables coefs and init registers. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-28-tiwai@suse.de Signed-off-by: Takashi Iwai commit 71075c421060cd3cc00f77770cc01254f8ff2c27 Author: Takashi Iwai Date: Sun Jan 5 15:47:41 2020 +0100 ALSA: bcd2000: More constifications Apply const prefix to the static tables for command and verbs. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-27-tiwai@suse.de Signed-off-by: Takashi Iwai commit 10aab1a24d52176f591412ce9827832aa04d3267 Author: Takashi Iwai Date: Sun Jan 5 15:47:40 2020 +0100 ALSA: ymfpci: More constifications Apply const prefix to each possible place: the static tables for sample rates, parameters and registers. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-26-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3cfe54b96ca1a8483b376fd24a6fb1b63a2f02c9 Author: Takashi Iwai Date: Sun Jan 5 15:47:39 2020 +0100 ALSA: mixart: More constifications Apply const prefix to each possible place: the string arrays and the static tables for volumes. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-25-tiwai@suse.de Signed-off-by: Takashi Iwai commit 98fd539841319a46ba3773d908bfde13416d57eb Author: Takashi Iwai Date: Sun Jan 5 15:47:38 2020 +0100 ALSA: pcxhr: More constifications Apply const prefix to each possible place: the board parameters and DSP command table, and the string arrays. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-24-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7ec03ff7c761371b363e184f6b0722225f548102 Author: Takashi Iwai Date: Sun Jan 5 15:47:37 2020 +0100 ALSA: usx2y: More constifications Apply const prefix to each possible place: the string array and the parameter tables and callers. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-23-tiwai@suse.de Signed-off-by: Takashi Iwai commit 55a6921bf1ea0cfd01aa798c084b6932842fe10e Author: Takashi Iwai Date: Sun Jan 5 15:47:36 2020 +0100 ALSA: emux: More constifications Apply const prefix to each possible place: the MIDI data definitions, the static tables for volume parameters, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-22-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1e393ef4e3dbcea814ccadc08f10026e40267669 Author: Takashi Iwai Date: Sun Jan 5 15:47:35 2020 +0100 ALSA: rme9652: More constifications Apply const prefix to the channel map tables. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-21-tiwai@suse.de Signed-off-by: Takashi Iwai commit e315cc3f93c93e4969d28145b9e30761ad4e58a6 Author: Takashi Iwai Date: Sun Jan 5 15:47:34 2020 +0100 ALSA: hdspm: More constifications Apply const prefix to each possible place: the string arrays, the channel map tables and callers. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-20-tiwai@suse.de Signed-off-by: Takashi Iwai commit d92596402d517cfc281d1c1189fb1cbca3412f62 Author: Takashi Iwai Date: Sun Jan 5 15:47:33 2020 +0100 ALSA: hdsp: More constifications Apply const prefix to each channel map table and its callers. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-19-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6e9ef32fab28835110b5981295e6895bcac3614b Author: Takashi Iwai Date: Sun Jan 5 15:47:32 2020 +0100 ALSA: ppc: More constifications Apply const prefix to each possible place: the static tables for rate, volume, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-18-tiwai@suse.de Signed-off-by: Takashi Iwai commit f16a4e960ab3475d71df6f0d968c5393f3eca2aa Author: Takashi Iwai Date: Sun Jan 5 15:47:31 2020 +0100 ALSA: ice1712: More constifications Apply const prefix to each possible place: the EEPROM tables, the static string arrays, the init verb tables, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-17-tiwai@suse.de Signed-off-by: Takashi Iwai commit bf6f3d74c9594c3a684620d3d7418a73ee659288 Author: Takashi Iwai Date: Sun Jan 5 15:47:30 2020 +0100 ALSA: riptide: More constifications Apply const prefix to each lbus path table definition and its callers. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-16-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6fddce26f84c8229db1f6689b6046aa3dff5c887 Author: Takashi Iwai Date: Sun Jan 5 15:47:29 2020 +0100 ALSA: emu10k1: More constifications Apply const prefix to the remaining possible places: the static tables for init verbs and registers, the string arrays, the conversion tables, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-15-tiwai@suse.de Signed-off-by: Takashi Iwai commit eafcdbdb4f4019cfd0ad1d0ff59225f73c95d185 Author: Takashi Iwai Date: Sun Jan 5 15:47:28 2020 +0100 ALSA: au88x0: More constifications Apply const prefix to each possible place: the static register tables, the coef tables, the string arrays, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-14-tiwai@suse.de Signed-off-by: Takashi Iwai commit 56d7058e124d5dfaf6579833a2e630ef90b149ca Author: Takashi Iwai Date: Sun Jan 5 15:47:27 2020 +0100 ALSA: caiaq: More constifications Apply const prefix to each possible place: the rate table, the controller tables, and the key tables. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-13-tiwai@suse.de Signed-off-by: Takashi Iwai commit a01df925d1bbc97d6f7fe07b157aadb565315337 Author: Takashi Iwai Date: Sun Jan 5 15:47:26 2020 +0100 ALSA: usb-audio: More constifications Apply const prefix to the remaining places: the static table for the unit information, the mixer maps, the validator tables, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-12-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1675bfc0fb040e421d15d1944dc578b76543c19f Author: Takashi Iwai Date: Sun Jan 5 15:47:25 2020 +0100 ALSA: ac97: More constifications Apply const prefix to each possible place: the static tables for registers and bits, the quirk tables, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-11-tiwai@suse.de Signed-off-by: Takashi Iwai commit bf82326fce53321c3f9088874dc12dcbd6d0ca06 Author: Takashi Iwai Date: Sun Jan 5 15:47:24 2020 +0100 ALSA: hda: More constifications Apply const prefix to the remaining possible places: the string tables, the rate tables, the verb tables, the index tables, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-10-tiwai@suse.de Signed-off-by: Takashi Iwai commit f729f88a04089d2a0f2783182027347e0446b900 Author: Takashi Iwai Date: Sun Jan 5 15:47:23 2020 +0100 ALSA: intel8x0: More constifications Apply const prefix to more places: the static tables for PCM definitions, the register tables, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-9-tiwai@suse.de Signed-off-by: Takashi Iwai commit c09482455ca586539802282380f59f54a1febf16 Author: Takashi Iwai Date: Sun Jan 5 15:47:22 2020 +0100 ALSA: vx: More constifications Apply const prefix to every possible place: the static tables for DSP commands, the string tables, and register/offset tables. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-8-tiwai@suse.de Signed-off-by: Takashi Iwai commit 731922a5939e653ce501b7d72bfe8fbe79717abf Author: Takashi Iwai Date: Sun Jan 5 15:47:21 2020 +0100 ALSA: seq: More constifications Apply const prefix to the remaining sequencer code: the static tables for MIDI macros, RPN/NRPN, and some strings. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-7-tiwai@suse.de Signed-off-by: Takashi Iwai commit d03af9b8ea7e8655869834f2eed1f1d583cc5672 Author: Takashi Iwai Date: Sun Jan 5 15:47:20 2020 +0100 ALSA: pcm: More constifications Apply const prefix to more possible places: the string tables for PCM format and co, the table for the PCM type helpers, etc. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit d64e7f7c9e70c587ce9fcc2eacd0cd7c29bcf91c Author: Takashi Iwai Date: Sun Jan 5 15:47:19 2020 +0100 ALSA: dummy: More constifications Apply const prefix to every possible place: mostly for declaring the dummy hardware models. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6b0f95c49d890440c01a759c767dfe40e2acdbf2 Author: Takashi Iwai Date: Sun Jan 5 15:47:18 2020 +0100 ALSA: hda/realtek - More constifications Apply const prefix to each coef table array. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit fa35aa46077794de446ddd4bcaf809c2fd041ce2 Author: Takashi Iwai Date: Sun Jan 5 15:47:17 2020 +0100 ALSA: aoa: More constifications Apply const prefix at every place where appropriate: the static register tables, the volume tables and the callback tables. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit f5f87abfb745aa6eb5c5f9bdf8b5a64600692506 Author: Takashi Iwai Date: Sun Jan 5 15:47:16 2020 +0100 ALSA: Allow const arrays for legacy resource management helpers Declare the arrays passed to the helper functions for legacy resources (mostly for ISA drivers) as const, so that each caller can make its static data as const for minor optimizations, too. Link: https://lore.kernel.org/r/20200105144823.29547-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3d0dad869aeb5d8e81985c73a6c73428258f8083 Author: Miquel Raynal Date: Tue Dec 24 15:38:57 2019 +0100 drm/rockchip: lvds: move hardware-specific functions together Reorganize a bit the functions order to clarify the driver and separate hardware independent and specific functions a bit. This change only moves functions around, there is no functional change. Signed-off-by: Miquel Raynal [adapted to recent drm_panel_get_modes() param change ] Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20191224143900.23567-9-miquel.raynal@bootlin.com commit 2258d53a6696eec6a294af5627c45c8aafe001a8 Author: Miquel Raynal Date: Tue Dec 24 15:38:56 2019 +0100 drm/rockchip: lvds: improve error handling in helper functions Return errors instead of returning void from internal helpers. When these helpers are called, check the returned value and print an error message in this case and not blindly continue. Signed-off-by: Miquel Raynal Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20191224143900.23567-8-miquel.raynal@bootlin.com commit 9b5cbdbb93d6578bc27fd55ad51186e1411ce9f1 Author: Miquel Raynal Date: Tue Dec 24 15:38:55 2019 +0100 drm/rockchip: lvds: Create an RK3288 specific probe function The probe function is highly adapted to the RK3288 specificities, move all specific bits into an "rk3288_probe" function, also part of the platform data. The goal is to ease the addition of new flavors of Rockchip LVDS IPs. Signed-off-by: Miquel Raynal Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20191224143900.23567-7-miquel.raynal@bootlin.com commit 36839e5788da973ac574e9fe16c41166df918565 Author: Miquel Raynal Date: Tue Dec 24 15:38:54 2019 +0100 drm/rockchip: lvds: Change platform data to hold helper_funcs pointer Prepare the introduction of PX30 support by using drm_encoder_helper_funcs as platform data instead of multiple register names which are specific to rk3288 and not generic to all Rockchip IPs. This way adding support for a new flavor of a similar IP will be a matter of adding the relevant helper funcs. Signed-off-by: Miquel Raynal Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20191224143900.23567-6-miquel.raynal@bootlin.com commit 04bc39adf9f1b0499a34eaeef4419890eb2e282a Author: Miquel Raynal Date: Tue Dec 24 15:38:53 2019 +0100 drm/rockchip: lvds: Harmonize function names Prepare the introduction of PX30 support by clarifying the function prefixes. We continue to prefix with 'rockchip_lvds_' generic functions that are not specific to a single hardware. Functions implying hardware modifications are now prefixed with 'rk3288_lvds_'. Signed-off-by: Miquel Raynal Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20191224143900.23567-5-miquel.raynal@bootlin.com commit eb503ee2c9bfb0392a204d9705ca70d683a08cdd Author: Miquel Raynal Date: Tue Dec 24 15:38:52 2019 +0100 drm/rockchip: lvds: Fix indentation of a #define Fix a #define indentation before adding more lines. Fixes: 34cc0aa25456 ("drm/rockchip: Add support for Rockchip Soc LVDS") Signed-off-by: Miquel Raynal Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20191224143900.23567-4-miquel.raynal@bootlin.com commit 1e0b0a0cf31a1c2d7770bed904c66c4e71e01311 Author: Miquel Raynal Date: Tue Dec 24 15:38:51 2019 +0100 dt-bindings: display: rockchip-lvds: Document PX30 PHY PX30 SoCs use a single PHY shared by two display pipelines: MIPI DSI and LVDS. In the case of the LVDS IP, document the possibility to fill a PHY handle. Signed-off-by: Miquel Raynal Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20191224143900.23567-3-miquel.raynal@bootlin.com commit d1dc01860a2a2e9a542485b732ece729402c2bd5 Author: Miquel Raynal Date: Tue Dec 24 15:38:50 2019 +0100 dt-bindings: display: rockchip-lvds: Declare PX30 compatible Document the PX30 LVDS compatible. Signed-off-by: Miquel Raynal Acked-by: Rob Herring Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20191224143900.23567-2-miquel.raynal@bootlin.com commit 8be03a7177c36bfc05bbe9f4949cdeba57f1c2ab Author: Takashi Iwai Date: Sun Jan 5 09:19:00 2020 +0100 ALSA: usb-audio: Use lower hex numbers for IDs For consistency reason, make all hex numbers with lower alphabets for USB ID entries. It improves grep-ability and reduces careless mistakes. Link: https://lore.kernel.org/r/20200105081900.21870-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5d8398aa595dc3055dde003b6464963b71e4d8e2 Merge: 5fab5829674c 51d4efab7865 Author: Takashi Iwai Date: Sun Jan 5 09:19:24 2020 +0100 Merge branch 'for-linus' into for-next Merge 5.5-rc devel branch back for applying the conflicting USB-audio fix. Signed-off-by: Takashi Iwai commit 5fab5829674c279839a7408ab30c71c6dfe726b9 Author: Takashi Iwai Date: Sun Jan 5 09:11:19 2020 +0100 ALSA: hda/realtek - Apply mic mute LED quirk for Dell E7xx laptops, too Dell E7xx laptops have also mic mute LED that is driven by the dell-laptop platform driver. Bind it with the capture control as already done for other models. A caveat is that the fixup hook for the mic mute LED has to be applied at last, otherwise it results in the invalid override of the callback. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205529 Link: https://lore.kernel.org/r/20200105081119.21396-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit a7ab9b89af22a8ce68db648759d974a214bc25bd Author: Niklas Cassel Date: Fri Nov 29 22:39:15 2019 +0100 arm64: defconfig: enable CONFIG_ARM_QCOM_CPUFREQ_NVMEM Enable CONFIG_ARM_QCOM_CPUFREQ_NVMEM. Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20191129213917.1301110-6-niklas.cassel@linaro.org Signed-off-by: Bjorn Andersson commit 2e08c109d8dc0d5f68868f7f48756b5bc1e7b3b0 Author: Niklas Cassel Date: Fri Nov 29 22:39:14 2019 +0100 arm64: defconfig: enable CONFIG_QCOM_CPR Enable CONFIG_QCOM_CPR. Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20191129213917.1301110-5-niklas.cassel@linaro.org Signed-off-by: Bjorn Andersson commit 04aadcaadd399156cf57b3e8fac49f212213886c Author: Niklas Cassel Date: Fri Nov 29 22:39:13 2019 +0100 arm64: dts: qcom: qcs404: Add CPR and populate OPP table Add CPR and populate OPP table. Co-developed-by: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20191129213917.1301110-4-niklas.cassel@linaro.org Signed-off-by: Bjorn Andersson commit f666fba17b328e3efd1a23cd28ff89dd9e88a84f Author: Jorge Ramirez-Ortiz Date: Mon Nov 25 15:25:10 2019 +0100 arm64: defconfig: Enable HFPLL The high frequency pll is required on compatible Qualcomm SoCs to support the CPU frequency scaling feature. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20191125142511.681149-6-niklas.cassel@linaro.org Signed-off-by: Bjorn Andersson commit cbccc6bcdf923b88a8175f1e45c04b98a647d8d8 Author: Jorge Ramirez-Ortiz Date: Mon Nov 25 15:25:09 2019 +0100 arm64: dts: qcom: qcs404: Add DVFS support Support dynamic voltage and frequency scaling on qcs404. CPUFreq will soon be superseded by Core Power Reduction (CPR, a form of Adaptive Voltage Scaling found on some Qualcomm SoCs like the qcs404). Due to the CPR upstreaming already being in progress - and some commits already merged - the following commit will need to be reverted to enable CPUFreq support Author: Jorge Ramirez-Ortiz Date: Thu Jul 25 12:41:36 2019 +0200 cpufreq: Add qcs404 to cpufreq-dt-platdev blacklist Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20191125142511.681149-5-niklas.cassel@linaro.org Signed-off-by: Bjorn Andersson commit 01163a2001ea629324590f250c08ee3b16b48c1b Author: Jorge Ramirez-Ortiz Date: Mon Nov 25 15:25:08 2019 +0100 arm64: dts: qcom: qcs404: Add the clocks for APCS mux/divider Specify the clocks that feed the APCS mux/divider instead of using default hardcoded values in the source code. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20191125142511.681149-4-niklas.cassel@linaro.org Signed-off-by: Bjorn Andersson commit 40b3d9404384d0012f23f80a1e3d8c699cadc5e6 Author: Jorge Ramirez-Ortiz Date: Mon Nov 25 15:25:07 2019 +0100 arm64: dts: qcom: qcs404: Add HFPLL node The high frequency pll functionality is required to enable CPU frequency scaling operation. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20191125142511.681149-3-niklas.cassel@linaro.org Signed-off-by: Bjorn Andersson commit 118764988c8e62ffb6e7086db3531ffee2bd5f2d Author: Jorge Ramirez-Ortiz Date: Mon Nov 25 15:25:06 2019 +0100 arm64: dts: qcom: msm8916: Add the clocks for the APCS mux/divider Specify the clocks that feed the APCS mux/divider instead of using default hardcoded values in the source code. The driver still supports the previous bindings; however with this update it we allow the msm8916 to access the parent clock names required by the driver operation using the device tree node. Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20191125142511.681149-2-niklas.cassel@linaro.org Signed-off-by: Bjorn Andersson commit a16f862f6059985ed20d1b4ba1ae743e537125ab Author: Sibi Sankar Date: Fri Dec 20 12:18:23 2019 +0530 arm64: dts: qcom: sc7180: Add rpmh power-domain node Add the DT node for the rpmhpd power controller on SC7180 SoCs. Reviewed-by: Rajendra Nayak Reviewed-by: Stephen Boyd Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20191220064823.6115-3-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 461e58f034e5fbbcb9884b4fa6001831e5bd485c Author: Sibi Sankar Date: Fri Dec 20 12:18:22 2019 +0530 dt-bindings: power: rpmpd: Convert rpmpd bindings to yaml Convert RPM/RPMH power-domain bindings to yaml. Reviewed-by: Rajendra Nayak Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20191220064823.6115-2-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 333d2d19df09bfa7363ad051e8557031abafee21 Author: Krzysztof Kozlowski Date: Thu Nov 21 04:18:55 2019 +0100 clk: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lkml.kernel.org/r/1574306335-29026-1-git-send-email-krzk@kernel.org [sboyd@kernel.org: Fixup mediatek to have two spaces for help indent] Signed-off-by: Stephen Boyd commit 248fdcc77a35dfe66f2f8771017e71385527ceff Author: Linus Walleij Date: Tue Dec 17 22:05:04 2019 +0100 clk: ux500: Fix up the SGA clock for some variants Some of the special PRCMU firmware variants were not properly detected in the Ux500 clock driver, resulting in the wrong clock for the SGA. Cc: Ulf Hansson Cc: Stephan Gerhold Signed-off-by: Linus Walleij Link: https://lkml.kernel.org/r/20191217210504.27888-1-linus.walleij@linaro.org Acked-by: Ulf Hansson Reviewed-by: Stephan Gerhold Signed-off-by: Stephen Boyd commit 253dc75a0bb8f6207b3ac5f4897871b7b47a554e Author: Taniya Das Date: Fri Dec 27 12:08:34 2019 +0530 clk: qcom: Add video clock controller driver for SC7180 Add support for the video clock controller found on SC7180 based devices. This would allow video drivers to probe and control their clocks. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/1577428714-17766-7-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 4cc62ebd0cd8a061331b4e013193621605f2e63b Author: Taniya Das Date: Fri Dec 27 12:08:33 2019 +0530 dt-bindings: clock: Introduce SC7180 QCOM Video clock bindings Add device tree bindings for video clock controller for Qualcomm Technology Inc's SC7180 SoCs. Signed-off-by: Taniya Das Reviewed-by: Rob Herring Link: https://lkml.kernel.org/r/1577428714-17766-6-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 35d26e9292e2e18e38a290e86ceba1842f94c522 Author: Taniya Das Date: Fri Dec 27 12:08:32 2019 +0530 dt-bindings: clock: Add YAML schemas for the QCOM VIDEOCC clock bindings The VIDEOCC clock provider have a bunch of generic properties that are needed in a device tree. Add a YAML schemas for those. Signed-off-by: Taniya Das Reviewed-by: Rob Herring Link: https://lkml.kernel.org/r/1577428714-17766-5-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 745ff069a49c52d323c98672fc92c312aee62dd9 Author: Taniya Das Date: Fri Dec 27 12:08:31 2019 +0530 clk: qcom: Add graphics clock controller driver for SC7180 Add support for the graphics clock controller found on SC7180 based devices. This would allow graphics drivers to probe and control their clocks. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/1577428714-17766-4-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 468e727d18cb3e8b8d817d8bb12cb897ae948bd2 Author: Taniya Das Date: Fri Dec 27 12:08:30 2019 +0530 dt-bindings: clock: Introduce SC7180 QCOM Graphics clock bindings Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's SC7180 SoCs. Signed-off-by: Taniya Das Reviewed-by: Rob Herring Link: https://lkml.kernel.org/r/1577428714-17766-3-git-send-email-tdas@codeaurora.org [sboyd@kernel.org: Indicate sc7180 in commit subject] Signed-off-by: Stephen Boyd commit 5c6f3a36b913b24a0628a1cd6afd83eb8e73769c Author: Taniya Das Date: Fri Dec 27 12:08:29 2019 +0530 dt-bindings: clock: Add YAML schemas for the QCOM GPUCC clock bindings The GPUCC clock provider have a bunch of generic properties that are needed in a device tree. Add a YAML schemas for those. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/1577428714-17766-2-git-send-email-tdas@codeaurora.org Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 2d2699926143624ef0fce3bbb5a0f089d674d12c Author: Stephen Boyd Date: Thu Dec 26 14:09:27 2019 -0800 clk: Warn about critical clks that fail to enable If we don't warn here users of the CLK_IS_CRITICAL flag may not know that their clk isn't actually enabled because it silently fails to enable. Let's print a warning in that case so developers find these problems faster. Suggested-by: Jerome Brunet Cc: Guenter Roeck Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20200102005503.71923-1-sboyd@kernel.org Reviewed-by: Jerome Brunet Reviewed-by: Guenter Roeck commit fbefb7cc8e5121d3db753a1c6a23b7f15f234b22 Author: Niklas Cassel Date: Fri Jan 3 12:14:29 2020 +0100 clk: qcom: apcs-msm8916: use clk_parent_data to specify the parent Allow accessing the parent clock names required for the driver operation by using the device tree 'clock-names' property, while falling back to the previous method of using names in the global name space. This permits extending the driver to other platforms without having to modify its source code. Co-developed-by: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Niklas Cassel Link: https://lkml.kernel.org/r/20200103111429.1347-1-nks@flawful.org Tested-by: Bjorn Andersson Reviewed-by: Bjorn Andersson Signed-off-by: Stephen Boyd commit 1ec09a2ec67a0baa46a3ccac041dbcdbc6db2cb9 Author: Kunihiko Hayashi Date: Fri Dec 27 10:42:05 2019 +0900 clk: uniphier: Add SCSSI clock gate for each channel SCSSI has clock gates for each channel in the SoCs newer than Pro4, so this adds missing clock gates for channel 1, 2 and 3. And more, this moves MCSSI clock ID after SCSSI. Fixes: ff388ee36516 ("clk: uniphier: add clock frequency support for SPI") Signed-off-by: Kunihiko Hayashi Acked-by: Masahiro Yamada Link: https://lkml.kernel.org/r/1577410925-22021-1-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Stephen Boyd commit e7ce74bc0e97794d69330547aea4bbb0ff0be2bc Merge: dd3d06622138 9011f92622e5 Author: Stephen Boyd Date: Sat Jan 4 23:08:57 2020 -0800 Merge branch 'clk-register-dt-node-better' into clk-qcom * clk-register-dt-node-better: clk: Use parent node pointer during registration if necessary commit 9011f92622e5ef2d075f45e5fa818776d4feb8c0 Author: Stephen Boyd Date: Mon Dec 30 10:29:35 2019 -0800 clk: Use parent node pointer during registration if necessary Sometimes clk drivers are attached to devices which are children of a parent device that is connected to a node in DT. This happens when devices are MFD-ish and the parent device driver mostly registers child devices to match against drivers placed in their respective subsystem directories like drivers/clk, drivers/regulator, etc. When the clk driver calls clk_register() with a device pointer, that struct device pointer won't have a device_node associated with it because it was created purely in software as a way to partition logic to a subsystem. This causes problems for the way we find parent clks for the clks registered by these child devices because we look at the registering device's device_node pointer to lookup 'clocks' and 'clock-names' properties. Let's use the parent device's device_node pointer if the registering device doesn't have a device_node but the parent does. This simplifies clk registration code by avoiding the need to assign some device_node to the device registering the clk. Cc: Bjorn Andersson Reported-by: Niklas Cassel Signed-off-by: Stephen Boyd Link: https://lkml.kernel.org/r/20191230190455.141339-1-sboyd@kernel.org [sboyd@kernel.org: Fixup kernel-doc notation] Reviewed-by: Niklas Cassel Reviewed-by: Bjorn Andersson Tested-by: Bjorn Andersson commit 63c92c9d2e536c91ace17dec7534883f40421753 Author: Sasha Neftin Date: Tue Nov 19 13:45:40 2019 +0200 igc: Remove no need declaration of the igc_sw_init We want to avoid forward-declarations of function if possible. Rearrange the igc_sw_init function implementation. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 55cd7386c5b759ba4a736dee85cbad825013fd20 Author: Sasha Neftin Date: Tue Nov 19 13:45:32 2019 +0200 igc: Remove no need declaration of the igc_write_itr We want to avoid forward-declarations of function if possible. Rearrange the igc_write_itr function implementation. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit f817fa0555c8885060801b645885bcaf44c76b35 Author: Sasha Neftin Date: Tue Nov 19 13:45:23 2019 +0200 igc: Remove no need declaration of the igc_assign_vector We want to avoid forward-declarations of function if possible. Rearrange the igc_assign_vector function implementation. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit f7bcca5d9a8cf087b3f202ad45907b02437faf77 Author: Sasha Neftin Date: Tue Nov 19 13:45:16 2019 +0200 igc: Remove no need declaration of the igc_free_q_vector We want to avoid forward-declarations of function if possible. Rearrange the igc_free_q_vector function implementation. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit a8c4873b566bcbf024988334bcbfd0a31667064f Author: Sasha Neftin Date: Tue Nov 19 13:45:07 2019 +0200 igc: Remove no need declaration of the igc_free_q_vectors We want to avoid forward-declarations of function if possible. Rearrange the igc_free_q_vectors function implementation. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 35f9a78ac93361c2992719f9e00d60c158a32874 Author: Sasha Neftin Date: Tue Nov 19 13:44:58 2019 +0200 igc: Remove no need declaration of the igc_irq_disable We want to avoid forward-declarations of function if possible. Rearrange the igc_irq_disable function implementation. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit fccf939e2709bf82fd58df73061a63e5016eecbe Author: Sasha Neftin Date: Tue Nov 19 13:44:47 2019 +0200 igc: Remove no need declaration of the igc_irq_enable We want to avoid forward-declarations of function if possible. Rearrange the igc_irq_enable function implementation. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit a146ea022f1d02df0116fae9d5d334b75f022a24 Author: Sasha Neftin Date: Tue Nov 19 13:44:38 2019 +0200 igc: Remove no need declaration of the igc_configure_msix We want to avoid forward-declarations of function if possible. Rearrange the igc_configure_msix function implementation. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 86a4de661b7bb27f208c6c327870bcdbbe9cb152 Author: Sasha Neftin Date: Tue Nov 19 13:44:29 2019 +0200 igc: Remove no need declaration of the igc_set_rx_mode We want to avoid forward-declarations of function if possible. Rearrange the igc_set_rx_mode function implementation. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 0411d368bc8a43f33f2e012b19304cc9df8f03ba Author: Sasha Neftin Date: Tue Nov 19 13:44:19 2019 +0200 igc: Remove no need declaration of the igc_set_interrupt_capability We want to avoid forward-declarations of function if possible. Rearrange the igc_set_interrupt_capability function implementation. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit aac8f68c5687c3b3a592ae05f66a78837430330e Author: Sasha Neftin Date: Tue Nov 19 13:44:11 2019 +0200 igc: Remove no need declaration of the igc_alloc_mapped_page We want to avoid forward-declarations of function if possible. Rearrange the igc_alloc_mapped_page function implementation. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 1a7c0f2efd5559408c01c22474127d95274637a8 Author: Sasha Neftin Date: Tue Nov 19 13:44:01 2019 +0200 igc: Remove no need declaration of the igc_configure We want to avoid forward-declarations of function if possible. Rearrange the igc_configure function implementation. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 3988d8bfd71395b838ed0a887f7b8c2392fe6082 Author: Sasha Neftin Date: Tue Nov 19 13:43:51 2019 +0200 igc: Remove no need declaration of the igc_set_default_mac_filter We want to avoid forward-declarations of function if possible. Rearrange the igc_set_default_mac_filter function implementation. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 1ab69fb357099d7bd869cf9332f0cb137640c6a4 Author: Sasha Neftin Date: Tue Nov 19 13:43:41 2019 +0200 igc: Remove no need declaration of the igc_power_down_link We want to avoid forward-declarations of function if possible. Rearrange the igc_power_down_link function implementation. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 14504ac5048e1773da16e741b2e659c8b7257592 Author: Sasha Neftin Date: Tue Nov 19 13:43:32 2019 +0200 igc: Remove no need declaration of the igc_clean_tx_ring We want to avoid forward-declarations of function if possible. Rearrange the igc_clean_tx_ring function implementation. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 05e8a5f51eb5863d8c316c68091500511770bff7 Author: Ramalingam C Date: Sat Jan 4 19:10:43 2020 +0000 drm/i915: Create dumb buffer from LMEM When LMEM is supported, dumb buffer preferred to be created from LMEM. v2: Parameters are reshuffled. [Chris] v3: s/region_id/mem_type v4: use the i915_gem_object_create_region [chris] Signed-off-by: Ramalingam C cc: Matthew Auld Reviewed-by: Matthew Auld Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200104191043.2207314-2-chris@chris-wilson.co.uk commit 50129bca6671e329db7671cb0bfe749d341c9acb Author: Ramalingam C Date: Sat Jan 4 19:10:42 2020 +0000 drm/i915: lookup for mem_region of a mem_type Lookup function to retrieve the pointer to a memory region of a mem_type. v2: for_each_memory_region is used. Signed-off-by: Ramalingam C cc: Matthew Auld Reviewed-by: Matthew Auld Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200104191043.2207314-1-chris@chris-wilson.co.uk commit 4460985fac06f8e0e5bd4b86dcef49ada451583c Merge: 3c85efb8f15f 5d9e618cbb54 Author: David S. Miller Date: Sat Jan 4 17:02:19 2020 -0800 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 100GbE Intel Wired LAN Driver Updates 2020-01-03 This series contains updates to the ice driver only. Brett adds support for UDP segmentation offload (USO) based on the work Alex Duyck did for other Intel drivers. Refactored how the VF sets spoof checking to resolve a couple of issues found in ice_set_vf_spoofchk(). Adds the ability to track of the dflt_vsI (default VSI), since we cannot have more than one default VSI. Add a macro for commonly used "for loop" used repeatedly in the code. Cleaned up and made the VF link flows all similar. Refactor the flows of adding and deleting MAC addresses in order to simplify the logic for error conditions and setting/clearing the VF's default MAC address field. Michal moves the setting of the default ITR value from ice_cfg_itr() to the function we allocate queue vectors. Adds support for saving and restoring the ITR value for each queue. Adds a check for all invalid or unused parameters to log the information and return an error. Vignesh cleans up the driver where we were trying to write to read-only registers for the receive flex descriptors. Tony changes a netdev_info() to netdev_dbg() when the MTU value is changed. Bruce suppresses a coverity reported error that was not really an error by adding a code comment. Mitch adds a check for a NULL receive descriptor to resolve a coverity reported issue. Krzysztof prevents a potential general protection fault by adding a boundary check to see if the queue id is greater than the size of a UMEM array. Adds additional code comments to assist coverity in its scans to prevent false positives. Jake adds support for E822 devices to the driver. ==================== Signed-off-by: David S. Miller commit 6d7a1c83dc09bae02a5a87ffc64038f7695ac3c2 Author: Johan Jonker Date: Sat Dec 28 10:30:59 2019 +0100 dt-bindings: mmc: clarify disable-wp text "disable-wp" has been removed from all Rockchip eMMC and SDIO dts nodes, but people still continue to submit new patches with "disable-wp" added to other nodes then for the SD card slot, what it was designed for in the first place. So clarify the "disable-wp" text by adding that this option should not be used in combination with eMMC or SDIO. Signed-off-by: Johan Jonker Signed-off-by: Rob Herring commit c17fc0c924aabbb6c9637770173659e11e0afbda Author: Johan Jonker Date: Sat Dec 28 10:30:58 2019 +0100 dt-bindings: mmc: remove identical phrase in disable-wp text There are two identical phrases in the disable-wp text, so remove one of them. Signed-off-by: Johan Jonker Signed-off-by: Rob Herring commit 0658186283ba04867307ad5b83420370ce767fc5 Author: Chris Wilson Date: Fri Jan 3 20:41:37 2020 +0000 drm/i915/selftests: Compare user mmap against GPU Check that the user writes into their mmap are visible on the GPU. Signed-off-by: Chris Wilson Cc: Abdiel Janulgue Cc: Matthew Auld Acked-by: Abdiel Janulgue Link: https://patchwork.freedesktop.org/patch/msgid/20200103204137.2131004-3-chris@chris-wilson.co.uk commit 9771d5f729661470dd98740cddfb4a10673b3f8b Author: Abdiel Janulgue Date: Fri Jan 3 20:41:36 2020 +0000 drm/i915/selftests: Extend fault handler selftests to all memory regions Instead of testing individually our new fault handlers, iterate over all memory regions and test all from one interface. Signed-off-by: Abdiel Janulgue Cc: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200103204137.2131004-2-chris@chris-wilson.co.uk commit 4e598fad226be0d044d318b6c49cec2ec2b72be3 Author: Abdiel Janulgue Date: Fri Jan 3 20:41:35 2020 +0000 drm/i915/gem: Extend mmap support for lmem Local memory objects are similar to our usual scatterlist, but instead of using the struct page stored therein, we need to use the sg->dma_address. Signed-off-by: Abdiel Janulgue Cc: Chris Wilson Cc: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200103204137.2131004-1-chris@chris-wilson.co.uk commit cf6eb52fa3d0ff0414f3dfcfbd40bd57f3bbd679 Author: Pavel Date: Wed Aug 7 12:43:52 2019 +0200 leds: lm3532: use extended registration so that LED can be used for backlight Signed-off-by: Pavel Machek commit 6b16f05aa39f9fae43c18d4fd1ddad7988ab6d90 Author: Rob Clark Date: Sun Jun 30 07:18:31 2019 -0700 drm/msm/dsi: split clk rate setting and enable Decouple enable and rate setting. Prep work to handle bootloader enabled display. Signed-off-by: Rob Clark Reviewed-by: Jeffrey Hugo commit e98910bee6097b7c0f7beb76ab1d70ee52931d40 Author: Heiko Stuebner Date: Tue Dec 24 12:26:41 2019 +0100 drm/panel: add panel driver for Leadtek LTK500HD1829 The LTK500HD1829 is 5.5" DSI display. v5: - Fix some trivial checkpatch warnings while applying (sam) changes in v4: - drop error message if backlight not found, no other panel does that and if needed it should live in drm_panel_of_backlight changes in v3: - drop one more overlooked panel->drm access Signed-off-by: Heiko Stuebner Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191224112641.30647-3-heiko@sntech.de commit eeb15a55d22bacc49814bfccf43e2397e6e5f476 Author: Heiko Stuebner Date: Tue Dec 24 12:26:40 2019 +0100 dt-bindings: display: panel: Add binding document for Leadtek LTK500HD1829 The LTK500HD1829 is a 5.0" 720x1280 DSI display. v3: - fixed example by adding address,size-cells (sam) changes in v2: - fix id (Maxime) - drop port (Maxime) Signed-off-by: Heiko Stuebner Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191224112641.30647-2-heiko@sntech.de commit e8d47c471b990db1459f386276089c4893ad28d4 Author: Heiko Stuebner Date: Tue Dec 24 12:26:39 2019 +0100 dt-bindings: Add vendor prefix for Leadtek Technology Shenzhen Leadtek Technology Co., Ltd. produces for example display and touch panels. Signed-off-by: Heiko Stuebner Acked-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191224112641.30647-1-heiko@sntech.de commit d1479d028af2e7e7b7a7ebb393a7e88763cd4587 Author: Heiko Stuebner Date: Tue Dec 24 12:29:07 2019 +0100 drm/panel: add panel driver for Xinpeng XPP055C272 panels Base on the somewhat similar Rocktech driver but adapted for panel-specific init of the XPP055C272. changes in v5: - drop error message when backlight not found, no other panel does that and if needed it should live in drm_panel_of_backlight changes in v4: none changes in v3: - remove wrong negative sync flags from display-mode to fix a display artifact of the output getting move a tiny bit to the right changes in v2: - move to drm-panel-internal backlight handling (Sam) - adapt to changes that happened to drm_panel structs+functions (Sam) - sort includes (Sam) - drop unnecessary DRV_NAME constant (Sam) - do mipi_dsi_dcs_exit_sleep_mode and mipi_dsi_dcs_set_display_on in panel prepare (not init_sequence) to keep symmetric (Sam) Signed-off-by: Heiko Stuebner Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191224112907.30758-3-heiko@sntech.de commit 01d53e327dabff04859f76e2917fd95ef1844d3e Author: Heiko Stuebner Date: Tue Dec 24 12:29:06 2019 +0100 dt-bindings: display: panel: Add binding document for Xinpeng XPP055C272 The XPP055C272 is a 5.5" 720x1280 DSI display. changes in v4: - fix id (Maxime) - drop port (Maxime) changes in v2: - add size info into binding title (Sam) - add more required properties (Sam) Signed-off-by: Heiko Stuebner Reviewed-by: Sam Ravnborg Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191224112907.30758-2-heiko@sntech.de commit 3862c824de3aa73be5a5ba716f6df8085cc67473 Author: Heiko Stuebner Date: Tue Dec 24 12:29:05 2019 +0100 dt-bindings: Add vendor prefix for Xinpeng Technology Shenzhen Xinpeng Technology Co., Ltd produces for example display panels. Signed-off-by: Heiko Stuebner Acked-by: Sam Ravnborg Acked-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191224112907.30758-1-heiko@sntech.de commit 5da116f164ce265e397b8f59af5c39e4a61d61a5 Author: Takashi Iwai Date: Sat Jan 4 12:00:57 2020 +0100 ALSA: sh: Fix unused variable warnings Remove unused variables that are left over after the conversion of new PCM ops: sound/sh/sh_dac_audio.c:166:26: warning: unused variable 'runtime' sound/sh/sh_dac_audio.c:186:26: warning: unused variable 'runtime' sound/sh/sh_dac_audio.c:205:26: warning: unused variable 'runtime' Fixes: 1cc2f8ba0b3e ("ALSA: sh: Convert to the new PCM ops") Link: https://lore.kernel.org/r/20200104110057.13875-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 0b295a1eb81f37dc7d4f4f2ee9ef375fb36ab5d8 Author: Luca Coelho Date: Thu Oct 10 18:29:26 2019 +0300 iwlwifi: add device name to device_info We have a lot of mostly duplicated data structures that are repeated only because the device name string is different. To avoid this, move the string from the cfg to the trans structure and add it independently from the rest of the configuration to the PCI mapping tables. Signed-off-by: Luca Coelho commit 2a612a60ab440e6480c77b73403dfee061f74e4b Author: Luca Coelho Date: Thu Oct 10 16:30:11 2019 +0300 iwlwifi: implement a new device configuration table Add a new device table that contains information that can be checked at runtime in order to decide which configuration to use. This allows us to map the full cfg independently from the tran-specific configuration. This is the first step in creating the new table. Subsequent patches will add the possibility of checking different values at runtime in order to make the decision. Signed-off-by: Luca Coelho commit b3bd6416fc77b5056d2dda7a4d5814ec81af7ecd Author: Luca Coelho Date: Thu Oct 10 15:57:35 2019 +0300 iwlwifi: assume the driver_data is a trans_cfg, but allow full cfg With the new concept of separating the trans-specific (trans_cfg) data from the rest of the cfg, we will start mapping only the trans_cfg part to the PCI device ID/subsystem device ID. So we can assume that the data passed to the probe function contains the trans_cfg, but since the full cfg still contains the trans_cfg at the beginning, we can allow a full cfg to be passed as well. This makes it easier to convert the existing tables one by one. Signed-off-by: Luca Coelho commit 87f3073c16326dc6916e277df8961abb6ff17a5f Author: Johannes Berg Date: Thu Oct 31 11:04:43 2019 +0100 iwlwifi: prph: remove some unused register definitions There are some unused register definitions, remove them. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 20f5aef55838241e797ba685235d91a3449e9f91 Author: Johannes Berg Date: Tue Oct 29 15:45:40 2019 +0100 iwlwifi: mvm: print out extended secboot status before dump Print out the secure boot status, extended by the PCs of LMACs and the UMAC. This needs to be before dumping, as dumping will corrupt the PC (if the NMI is handled), so move that down. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 55b514b479ff8a6e2473e7ef2349d49380c5fa61 Author: Johannes Berg Date: Thu Oct 31 10:28:32 2019 +0100 iwlwifi: incorporate firmware filename into version We have many different firmware images with the same version, and it's sometimes cumbersome to figure out which image was really used, especially as the marketing strings that we do print out can be the same for (slightly) different hardware using different firmware images. Incorporate the firmware filename into the fw_version so it's printed out all the time. Unfortunately, this will make the string be longer than the 32 characters for ethtool, but we almost never really use ethtool, so strip the "iwlwifi-" prefix (if not overridden), and the remaining data that may then be stripped at the end is not usually useful anyway. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit e701da0c2320148a378ed1d191b6c4f7e8e82c4c Author: Luca Coelho Date: Wed Oct 30 09:40:12 2019 +0200 iwlwifi: yoyo: check for the domain on all TLV types during init Now that we don't have dynamically changing domains anymore, we can simply skip all the TLVs with domains that are not enabled. To do so, remove the checks from the functions that handle the TLVs when a timepoint is reached to the top allocation function. Signed-off-by: Luca Coelho commit e6ec237d3068dd023f5a20fd6c11527e57961019 Author: Oren Givon Date: Tue Oct 22 14:14:24 2019 +0300 iwlwifi: add new iwlax411 struct for type SoSnj Add new struct for SoSnj and add uhb support for ax411 structs. Signed-off-by: Oren Givon Signed-off-by: Luca Coelho commit 5cbc310810090cf5a295835113d3b9e5dbbe587f Author: Luca Coelho Date: Mon Oct 28 12:57:00 2019 +0200 iwlwifi: yoyo: remove the iwl_dbg_tlv_gen_active_trigs() function We only call this function from a single place and it's very very small and self-contained anyway, so remove the function and move the code into the caller. Signed-off-by: Luca Coelho commit 058c411d19b21b8e5581cdeddae2392d5f421daa Author: Luca Coelho Date: Mon Oct 28 12:39:10 2019 +0200 iwlwifi: yoyo: remove unnecessary active triggers status flag Now that we can't change the domain at runtime anymore, we don't have to protect the active trigger status. Remove it. Additionally, we don't need to flush the dumps at this point anymore, since this only runs during initialization and there shouldn't be any dumps running. Signed-off-by: Luca Coelho commit 10137f07571287aaa602f492d11db062f2dd3a29 Author: Luca Coelho Date: Mon Oct 28 11:18:05 2019 +0200 iwlwifi: yoyo: don't allow changing the domain via debugfs We don't want to allow changing the domain via debugfs so that we can apply the domain to all TLV types more easily (doing some at runtime is difficult due to buffer allocations etc.). Change the fw_dbg_domain debugfs file to be read-only and remove the write function. Signed-off-by: Luca Coelho commit 3e8bac0cf131353ddf69f35c89b650c4f5a34a2f Author: Andrei Otcheretianski Date: Sun Oct 27 14:01:43 2019 +0200 iwlwifi: mvm: Update BEACON_TEMPLATE_CMD firmware API The new API version adds support for FILS discovery frames. It adds a new flag and a field for short SSID configuration. The new API is backward compatible, so we can just switch to it. Signed-off-by: Andrei Otcheretianski Signed-off-by: Luca Coelho commit 4b6e228e297b73451f3a4b12fb7d0b24d9d32e6f Author: Luiz Augusto von Dentz Date: Thu Jan 2 15:00:57 2020 -0800 Bluetooth: Auto tune if input MTU is set to 0 This enables the code to set the input MTU using the underline link packet types when set to 0, previously this would likely be rejected by the remote peer since it would be bellow the minimal of 48 for BR/EDR or 23 for LE, that way it shall be safe to use 0 without causing any side effects. This is convenient for the likes of A2DP transport, see: https://habr.com/en/post/456182/ Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit 06dfaf1dc27fe9735a6961d99965600bfd28c693 Author: Maxime Ripard Date: Fri Jan 3 16:28:01 2020 +0100 ARM: dts: sunxi: Add missing LVDS resets and clocks Some old SoCs, while supporting LVDS, don't list the LVDS clocks and reset lines. Let's add them when relevant. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 1efd927d660e6ab02a9cd32fbbe3c7dc47980132 Author: Luiz Augusto von Dentz Date: Thu Jan 2 15:00:55 2020 -0800 Bluetooth: Add support for LE PHY Update Complete event This handles LE PHY Update Complete event and store both tx_phy and rx_phy into hci_conn. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit d841502c79e3fda2ba0e8d64f9eb00e9dd884af0 Author: Balakrishna Godavarthi Date: Thu Jan 2 20:19:11 2020 +0530 Bluetooth: hci_qca: Collect controller memory dump during SSR We will collect the ramdump of BT controller when hardware error event received before rebooting the HCI layer. Before restarting a subsystem or a process running on a subsystem, it is often required to request either a subsystem or a process to perform proper cache dump and software failure reason into a memory buffer which application processor can retrieve afterwards. SW developers can often provide initial investigation by looking into that debugging information. Signed-off-by: Balakrishna Godavarthi Signed-off-by: Venkata Lakshmi Narayana Gubba Signed-off-by: Marcel Holtmann commit e601daed271e9eb1b923972a0a1af65f8c7bb77b Author: Stefan Wahren Date: Wed Jan 1 15:01:34 2020 +0100 Bluetooth: hci_bcm: Drive RTS only for BCM43438 The commit 3347a80965b3 ("Bluetooth: hci_bcm: Fix RTS handling during startup") is causing at least a regression for AP6256 on Orange Pi 3. So do the RTS line handing during startup only on the necessary platform. Fixes: 3347a80965b3 ("Bluetooth: hci_bcm: Fix RTS handling during startup") Reported-by: Ondřej Jirman Signed-off-by: Stefan Wahren Signed-off-by: Marcel Holtmann commit 5bd64c645fc660734f172be4bba449952ed84ce2 Author: Abhishek Pandit-Subedi Date: Thu Dec 26 11:03:40 2019 -0800 Bluetooth: btbcm: Add missing static inline in header This fixes a double definition error when CONFIG_BT_BCM is not set. Fixes: 528379902337 ("Bluetooth: btbcm: Support pcm configuration") Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 9f3565b89c43d2a0082bccbc3918f2ebae739533 Author: Rocky Liao Date: Fri Dec 13 16:50:45 2019 +0800 Bluetooth: hci_qca: Replace of_device_get_match_data with device_get_match_data Replace of_device_get_match_data with device_get_match_data to make driver work across platforms. Signed-off-by: Rocky Liao Signed-off-by: Marcel Holtmann commit 8b17fb9628dd91cf48b8d40fba4b4f7499bf2ee7 Author: Dmitry Osipenko Date: Sun Dec 15 21:52:53 2019 +0300 dt-bindings: net: broadcom-bluetooth: Document BCM4329 support The BCM4329 is a 802.11 a/b/g/n WiFi + Bluetooth 2.1 chip which is found in Azurewave AW-NH611 WiFi+BT module. Signed-off-by: Dmitry Osipenko Signed-off-by: Marcel Holtmann commit 88d1cc96c4660f59d32a45810f49943e84c4bd54 Author: Dmitry Osipenko Date: Sun Dec 15 21:52:52 2019 +0300 Bluetooth: hci_bcm: Add device-tree compatible for BCM4329 Driver supports BCM4329, but there is no device-tree compatible for that chip. Let's add it in order to allow boards to specify Bluetooth in theirs device-trees, in particular this is useful for NVIDIA Tegra20 boards. Signed-off-by: Dmitry Osipenko Signed-off-by: Marcel Holtmann commit 657cc646475b721f5c5bab82e7fd43302c7c8358 Author: Marcel Holtmann Date: Wed Dec 11 11:34:36 2019 +0100 Bluetooth: Remove usage of BT_ERR_RATELIMITED macro The macro is really not needed and can be replaced with either usage of bt_err_ratelimited or bt_dev_err_ratelimited. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 36278a5d4d354e5d5610aa728831db9e03cc3d8d Author: Alain Michaud Date: Wed Dec 11 01:54:43 2019 +0000 Bluetooth: Adding a bt_dev_warn_ratelimited macro. The macro will be used to display rate limited warning messages in the log. Signed-off-by: Alain Michaud Signed-off-by: Marcel Holtmann commit 9c232d324bfa1bb6204f6c2c5e1bea12c51cc6bd Author: Maxime Ripard Date: Fri Jan 3 16:28:00 2020 +0100 clk: sunxi: a23/a33: Export the MIPI PLL The MIPI PLL is used for LVDS. Make sure it's exported in the dt bindings headers. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit a655ede064a3afc39a4d6e0a1056eca3dba477d6 Author: Maxime Ripard Date: Fri Jan 3 16:27:59 2020 +0100 clk: sunxi: a31: Export the MIPI PLL The MIPI PLL is used for LVDS. Make sure it's exported in the dt bindings headers. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit fbd3eb7f66c5b4f37a959bc2deaeb1d7b5ddf0d4 Author: Takashi Iwai Date: Sat Jan 4 09:35:56 2020 +0100 ALSA: control: Add verification for kctl accesses The current implementation of ALSA control API fully relies on the callbacks of each driver, and there is no verification of the values passed via API. This patch is an attempt to improve the situation slightly by adding the validation code for the values stored via info and get callbacks. The patch adds a new kconfig, CONFIG_SND_CTL_VALIDATION. It depends on CONFIG_SND_DEBUG and off as default since the validation would require a slight overhead including the additional call of info callback at each get callback invocation. When this config is enabled, the values stored by each info callback invocation are verified, namely: - Whether the info type is valid - Whether the number of enum items is non-zero - Whether the given info count is within the allowed boundary Similarly, the values stored at each get callback are verified as well: - Whether the values are within the given range - Whether the values are aligned with the given step - Whether any further changes are seen in the data array over the given info count The last point helps identifying a possibly invalid data type access, typically a case where the info callback declares the type being SNDRV_CTL_ELEM_TYPE_ENUMERATED while the get/put callbacks store the values in value.integer.value[] array. When a validation fails, the ALSA core logs an error message including the device and the control ID, and the API call also returns an error. So, with the new validation turned on, the driver behavior difference may be visible on user-space, too -- it's intentional, though, so that we can catch an error more clearly. The patch also introduces a new ctl access type, SNDRV_CTL_ELEM_ACCESS_SKIP_CHECK. A driver may pass this flag with other access bits to indicate that the ctl element won't be verified. It's useful when a driver code is specially written to access the data greater than info->count size by some reason. For example, this flag is actually set now in HD-audio HDMI codec driver which needs to clear the data array in the case of the disconnected monitor. Also, the PCM channel-map helper code is slightly modified to avoid the false-positive hit by this validation code, too. Link: https://lore.kernel.org/r/20200104083556.27789-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit a9b5c6717837840adc5d58ab75f232905a3af9f7 Author: Vasily Khoruzhick Date: Fri Jan 3 22:35:04 2020 -0800 clk: sunxi-ng: a64: export CLK_CPUX clock for DVFS Export CLK_CPUX so we can reference it in CPU node. Signed-off-by: Vasily Khoruzhick Signed-off-by: Maxime Ripard commit ec97faff743b398e21f74a54c81333f3390093aa Author: Icenowy Zheng Date: Fri Jan 3 22:35:03 2020 -0800 clk: sunxi-ng: add mux and pll notifiers for A64 CPU clock The A64 PLL_CPU clock has the same instability if some factor changed without the PLL gated like other SoCs with sun6i-style CCU, e.g. A33, H3. Add the mux and pll notifiers for A64 CPU clock to workaround the problem. Fixes: c6a0637460c2 ("clk: sunxi-ng: Add A64 clocks") Signed-off-by: Icenowy Zheng Signed-off-by: Vasily Khoruzhick Signed-off-by: Maxime Ripard commit 51e40a0dbe53cebe1f4b85bb47e250dc5a89b254 Author: Chen-Yu Tsai Date: Fri Jan 3 07:45:33 2020 +0100 media: sun4i-csi: Add support for A10 CSI1 camera sensor interface The A10/A20 Allwinner SoCs have two camera sensor interface blocks, named CSI0 and CSI1. The two have the same register layouts with slightly different features: - CSI0 has an image signal processor (ISP); CSI1 doesn't - CSI0 can support up to four separate channels under CCIR656; CSI1 can only support one - CSI0 can support up to 16-bit wide bus with YUV422; CSI1 can support up to 24-bit wide bus with YUV444 For now the driver doesn't support wide busses, nor CCIR656. So the only relevant difference is whether a clock needs to be taken and enabled for the ISP. Add structs to record the differences, tie them to the compatible strings, and deal with the ISP clock. Support for the new CSI1 hardware block is added as well. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 249b286171fa9c358e8d5c825b48c4ebea97c498 Author: Chen-Yu Tsai Date: Sun Dec 15 17:59:15 2019 +0100 media: sun4i-csi: Deal with DRAM offset On Allwinner SoCs, some high memory bandwidth devices do DMA directly over the memory bus (called MBUS), instead of the system bus. These devices include the CSI camera sensor interface, video (codec) engine, display subsystem, etc.. The memory bus has a different addressing scheme without the DRAM starting offset. Deal with this using the "interconnects" property from the device tree, or if that is not available, set dev->dma_pfn_offset to PHYS_PFN_OFFSET. Fixes: 577bbf23b758 ("media: sunxi: Add A10 CSI driver") Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1948dcf0f928b8bcdca57ca3fba8545ba380fc29 Author: Chen-Yu Tsai Date: Sun Dec 15 17:59:14 2019 +0100 media: sun4i-csi: Fix [HV]sync polarity handling The Allwinner camera sensor interface has a different definition of [HV]sync. While the timing diagram uses the names HSYNC and VSYNC, the note following the diagram and register names use HREF and VREF. Combined they imply the hardware uses either [HV]REF or inverted [HV]SYNC. There are also registers to set horizontal skip lengths in pixels and vertical skip lengths in lines, also known as back porches. Fix the polarity handling by using the opposite polarity flag for the checks. Also rename `[hv]sync_pol` to `[hv]ref_pol` to better match the hardware register description. Fixes: 577bbf23b758 ("media: sunxi: Add A10 CSI driver") Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit cf9e6d5dbdd56ef2aa72f28c806711c4293c8848 Author: Chen-Yu Tsai Date: Sun Dec 15 17:59:13 2019 +0100 media: sun4i-csi: Fix data sampling polarity handling The CLK_POL field specifies whether data is sampled on the falling or rising edge of PCLK, not whether the data lines are active high or low. Evidence of this can be found in the timing diagram labeled "horizontal size setting and pixel clock timing". Fix the setting by checking the correct flag, V4L2_MBUS_PCLK_SAMPLE_RISING. While at it, reorder the three polarity flag checks so HSYNC and VSYNC are grouped together. Fixes: 577bbf23b758 ("media: sunxi: Add A10 CSI driver") Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7866d6903ce88b1b359202f4be0422aa6a70a4a2 Author: Chen-Yu Tsai Date: Sun Dec 15 17:59:12 2019 +0100 media: dt-bindings: media: sun4i-csi: Add compatible for CSI0 on R40 The CSI0 block in the Allwinner R40 SoC looks to be the same as the one in the A20. The register maps line up, and they support the same features. The R40 appears to support BT.1120 based on the feature overview, but it is not mentioned anywhere else. Also like the A20, the ISP is not mentioned, but the CSI special clock needs to be enabled for the hardware to function. The manual does state that the CSI special clock is the TOP clock for all CSI hardware, but currently no hardware exists for us to test if CSI1 also depends on it or not. Add a compatible string for the CSI0 block in the R40, with the A20 compatible string as a fallback. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Acked-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1de243b0766679e75f558943250614ccd3f60121 Author: Chen-Yu Tsai Date: Sun Dec 15 17:59:11 2019 +0100 media: dt-bindings: media: sun4i-csi: Add compatible for CSI1 on A10/A20 The CSI1 block has the same structure and layout as the CSI0 block. Differences include: - Only one channel in BT.656 instead of four in CSI0 - 10-bit raw data input vs 8-bit in CSI0 - 24-bit RGB888/YUV444 input vs 16-bit RGB565/YUV422 in CSI0 - No ISP hardware The hardware found in the A20 is the same as in the A10. Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e878742c83ec26ef256ebb6b36a4d44644548f25 Author: Bingbu Cao Date: Mon Dec 30 10:26:25 2019 +0100 media: staging/intel-ipu3: make imgu use fixed running mode Currently, the imgu running mode need user to set by v4l2 ctrl. However, imgu only support 2 pipes and 2 operation modes - video and still. This patch make the first imgu subdev running as video and second one running as still, it will make the user understand easily, it can also cover current camera use cases requirement. The running mode is set during subdev registering, no race-condition after change, so it is safe to change the mode data type to integer. Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 92590966fe5b6cc1930b1ad36d4f84e9bc88b982 Author: Bingbu Cao Date: Mon Dec 30 04:09:04 2019 +0100 media: staging/intel-ipu3: set the main output as mandatory From firmware perspective, the main output for each pipe is mandatory and must be enabled. This patch set the link between imgu subdev and main output as IMMUTABLE by default. Signed-off-by: Bingbu Cao Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1451d5ae351d938a0ab1677498c893f17b9ee21d Author: Eugen Hristev Date: Thu Nov 21 08:55:24 2019 +0100 media: i2c: mt9v032: fix enum mbus codes and frame sizes This driver supports both the mt9v032 (color) and the mt9v022 (mono) sensors. Depending on which sensor is used, the format from the sensor is different. The format.code inside the dev struct holds this information. The enum mbus and enum frame sizes need to take into account both type of sensors, not just the color one. To solve this, use the format.code in these functions instead of the hardcoded bayer color format (which is only used for mt9v032). [Sakari Ailus: rewrapped commit message] Suggested-by: Wenyou Yang Signed-off-by: Eugen Hristev Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 033c60a6e295b60989104c074c2a8a3d2d1fe3df Author: Jules Irenge Date: Thu Nov 7 11:36:08 2019 +0100 media: staging: ipu3: replace 0 with false Replace 0 with false to clear warning of assignment of 0/1 to bool variable. Issue detected by coccinelle tool. Signed-off-by: Jules Irenge Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2e3df204f9af42a47823ee955c08950373417420 Author: Adam Ford Date: Tue Oct 29 13:42:11 2019 +0100 media: ov5640: Fix check for PLL1 exceeding max allowed rate The variable _rate is by ov5640_compute_sys_clk() which returns zero if the PLL exceeds 1GHz. Unfortunately, the check to see if the max PLL1 output is checking 'rate' and not '_rate' and 'rate' does not ever appear to be 0. This patch changes the check against the returned value of '_rate' to determine if the PLL1 output exceeds 1GHz. Fixes: aa2882481cad ("media: ov5640: Adjust the clock based on the expected rate") Signed-off-by: Adam Ford Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5554c80e18780db8457e222e998ef56030f687bf Author: Adam Ford Date: Fri Oct 25 21:07:23 2019 +0200 media: ov5640: Put max framerate into table and simplify check Currently the various modes are placed into a table, but when ov5640_find_mode is called, it has to double check whether or not the requested framerate is tolerated by the mode. The determination is based on checking hact, vact, and frame rate. Only 640x480 is allowed at 60fps and QSXGA is limited to 15fps, but as the number of permitted frame rates change, this will begin to add more and more complexity to the check. This patch simplifies the check by adding the max framerate allowed for each mode into the table of modes. It then compares the requested framerate to the max permitted in the mode's table. This reduces the number of comparisions to one down from three at run-time. Signed-off-by: Adam Ford Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 79bfa4e737f53ebb8fa0b1fe912889a034f6d92c Author: Rijo Thomas Date: Fri Dec 27 10:54:03 2019 +0530 Documentation: tee: add AMD-TEE driver details Update tee.txt with AMD-TEE driver details. The driver is written to communicate with AMD's TEE. Acked-by: Jens Wiklander Co-developed-by: Devaraj Rangasamy Signed-off-by: Devaraj Rangasamy Signed-off-by: Rijo Thomas Reviewed-by: Gary R Hook Signed-off-by: Herbert Xu commit bade7e1fbd34f46462e6eb1db5474832a4144ac2 Author: Rijo Thomas Date: Fri Dec 27 10:54:02 2019 +0530 tee: amdtee: check TEE status during driver initialization The AMD-TEE driver should check if TEE is available before registering itself with TEE subsystem. This ensures that there is a TEE which the driver can talk to before proceeding with tee device node allocation. Cc: Ard Biesheuvel Cc: Tom Lendacky Acked-by: Jens Wiklander Co-developed-by: Devaraj Rangasamy Signed-off-by: Devaraj Rangasamy Signed-off-by: Rijo Thomas Reviewed-by: Gary R Hook Signed-off-by: Herbert Xu commit 757cc3e9ff1d72d014096399d6e2bf03974d9da1 Author: Rijo Thomas Date: Fri Dec 27 10:54:01 2019 +0530 tee: add AMD-TEE driver Adds AMD-TEE driver. * targets AMD APUs which has AMD Secure Processor with software-based Trusted Execution Environment (TEE) support * registers with TEE subsystem * defines tee_driver_ops function callbacks * kernel allocated memory is used as shared memory between normal world and secure world. * acts as REE (Rich Execution Environment) communication agent, which uses the services of AMD Secure Processor driver to submit commands for processing in TEE environment Cc: Ard Biesheuvel Cc: Tom Lendacky Acked-by: Jens Wiklander Co-developed-by: Devaraj Rangasamy Signed-off-by: Devaraj Rangasamy Signed-off-by: Rijo Thomas Reviewed-by: Gary R Hook Signed-off-by: Herbert Xu commit 1a74fa3894e7ee23a36f677789dd1e3048b82a72 Author: Rijo Thomas Date: Fri Dec 27 10:54:00 2019 +0530 tee: allow compilation of tee subsystem for AMD CPUs Allow compilation of tee subsystem for AMD's CPUs which have a dedicated AMD Secure Processor for Trusted Execution Environment (TEE). Acked-by: Jens Wiklander Co-developed-by: Devaraj Rangasamy Signed-off-by: Devaraj Rangasamy Signed-off-by: Rijo Thomas Reviewed-by: Gary R Hook Signed-off-by: Herbert Xu commit ad9efa05a0ea2fd9960d4e163fad56279cde45b2 Author: Leon Romanovsky Date: Thu Dec 12 11:38:27 2019 +0200 RDMA/cm: Delete unused CM ARP functions Clean the code by deleting ARP functions, which are not called anyway. Link: https://lore.kernel.org/r/20191212093830.316934-46-leon@kernel.org Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 017d8eada807c6b80905445c0defa5d3b1d108bf Author: Leon Romanovsky Date: Thu Dec 12 11:38:24 2019 +0200 RDMA/cm: Delete unused CM LAP functions Clean the code by deleting LAP functions, which are not called anyway. Link: https://lore.kernel.org/r/20191212093830.316934-43-leon@kernel.org Signed-off-by: Leon Romanovsky Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5d9e618cbb54f5cbaef7f6f44ceb919978f0e5bc Author: Jacob Keller Date: Tue Dec 17 02:55:43 2019 -0800 ice: Add device ids for E822 devices Add support for E822 devices Signed-off-by: Jacob Keller Signed-off-by: Bruce Allan Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 91125399345a3e28876f707b32d068c308b1e590 Author: Krzysztof Kazimierczak Date: Thu Dec 12 03:13:07 2019 -0800 ice: Suppress Coverity warnings for xdp_rxq_info_reg Coverity reports some of the calls to xdp_rxq_info_reg() as potential issues, because the driver does not check its return value. However, those calls are wrapped with "if (!xdp_rxq_info_is_reg(&ring->xdp_rxq))" and this check alone is enough to be sure that the function will never fail. All possible states of xdp_rxq_info are: - NEW, - REGISTERED, - UNREGISTERED, - UNUSED. The driver won't mark a queue as UNUSED under no circumstance, so the return value can be ignored safely. Add comments for Coverity right above calls to xdp_rxq_info_reg() to suppress the warnings. Signed-off-by: Krzysztof Kazimierczak Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 65bb559b6c11dfe3311d1b77ba5a4b8b34a3ec75 Author: Krzysztof Kazimierczak Date: Thu Dec 12 03:13:06 2019 -0800 ice: Add a boundary check in ice_xsk_umem() In ice_xsk_umem(), variable qid which is later used as an array index, is not validated for a possible boundary exceedance. Because of that, a calling function might receive an invalid address, which causes general protection fault when dereferenced. To address this, add a boundary check to see if qid is greater than the size of a UMEM array. Also, don't let user change vsi->num_xsk_umems just by trying to setup a second UMEM if its value is already set up (i.e. UMEM region has already been allocated for this VSI). While at it, make sure that ring->zca.free pointer is always zeroed out if there is no UMEM on a specified ring. Signed-off-by: Krzysztof Kazimierczak Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 1f45ebe0d8fbe6178670b663005f38ef8535db5d Author: Mitch Williams Date: Thu Dec 12 03:13:05 2019 -0800 ice: add extra check for null Rx descriptor In the case where the hardware gives us a null Rx descriptor, it is theoretically possible that we could call one of our skb-construction functions with no data pointer, which would cause a panic. In real life, this will never happen - we only get null RX descriptors as the final descriptor in a chain of otherwise-valid descriptors. When this happens, the skb will be extant and we'll just call ice_add_rx_frag(), which can deal with empty data buffers. Unfortunately, Coverity does not have intimate knowledge of our hardware, so we must add a check here. Signed-off-by: Mitch Williams Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ac614b13fe71ec561b4a540c9f3ef095da5a7114 Author: Bruce Allan Date: Thu Dec 12 03:13:04 2019 -0800 ice: suppress checked_return error Coverity reports an error that is not really an error; suppress it. Signed-off-by: Bruce Allan Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit bda5b7db823c0f49babc260f027d7fa169476423 Author: Tony Nguyen Date: Thu Dec 12 03:13:03 2019 -0800 ice: Demote MTU change print to debug Following the changes of commit 12299132b3d3 ("net: ethernet: intel: Demote MTU change prints to debug"), change the MTU change message to netdev_dbg() Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit ed4c068d46f69f6f248c6e5a22f69cc84bdb5bb6 Author: Brett Creeley Date: Thu Dec 12 03:13:02 2019 -0800 ice: Enable ip link show on the PF to display VF unicast MAC(s) Currently when there are SR-IOV VF(s) and the user does "ip link show " the VF unicast MAC addresses all show 00:00:00:00:00:00 if the unicast MAC was set via VIRTCHNL (i.e. not administratively set by the host PF). This is misleading to the host administrator. Fix this by setting the VF's dflt_lan_addr.addr when the VF's unicast MAC address is configured via VIRTCHNL. There are a couple cases where we don't allow the dflt_lan_addr.addr field to be written. First, If the VF's pf_set_mac field is true and the VF is not trusted, then we don't allow the dflt_lan_addr.addr to be modified. Second, if the dflt_lan_addr.addr has already been set (i.e. via VIRTCHNL). Also a small refactor was done to separate the flow for add and delete MAC addresses in order to simplify the logic for error conditions and set/clear the VF's dflt_lan_addr.addr field. Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 26a91525cca8e50854706a9e71ce38795ba1fbcb Author: Brett Creeley Date: Thu Dec 12 03:13:01 2019 -0800 ice: Fix VF link state when it's IFLA_VF_LINK_STATE_AUTO Currently the flow for ice_set_vf_link_state() is not configuring link the same as all other VF link configuration flows. Fix this by only setting the necessary VF members in ice_set_vf_link_state() and then call ice_vc_notify_link_state() to actually configure link for the VF. This made ice_set_pfe_link_forced() unnecessary, so it was deleted. Also, this commonizes the link flows for the VF to all call ice_vc_notify_link_state(). Signed-off-by: Brett Creeley Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit f57a683dedbbe80af69708ae862f7ac88a441e5c Author: Vignesh Sridhar Date: Thu Dec 12 03:13:00 2019 -0800 ice: Remove Rx flex descriptor programming Remove Rx flex descriptor metadata and flag programming; per specification these registers cannot be written to as they are read only. Signed-off-by: Vignesh Sridhar Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 11c25c2f2eafcb414a9cd782fb1ea207c03be84d Author: Michal Swiatkowski Date: Thu Dec 12 03:12:59 2019 -0800 ice: Return error on not supported ethtool -C parameters Check for all unused parameters, if ethtool sent one of them, print info about that and return error. Signed-off-by: Michal Swiatkowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 61dc79ced7aaff5420a4d2f7f63925c607fa9395 Author: Michal Swiatkowski Date: Thu Dec 12 03:12:58 2019 -0800 ice: Restore interrupt throttle settings after VSI rebuild After each rebuild driver deallocates q_vectors, so the interrupt throttle rate (ITR) settings get lost. Create a function to save and restore ITR for each queue. If a user increases the number of queues, restore all the previous queue settings for each existing queue, and the additional queues will get the default setting. Signed-off-by: Michal Swiatkowski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 118e0e10025866f92fc9f6403926cfed033e4078 Author: Michal Swiatkowski Date: Thu Dec 12 03:12:57 2019 -0800 ice: Set default value for ITR in alloc function When the user sets itr_setting to zero from ethtool -C, the driver changes this value to default in ice_cfg_itr (for example after changing ring param). Remove code that sets default value in ice_cfg_itr and move it to place where the driver allocates q_vectors. Signed-off-by: Michal Swiatkowski Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 005881bcf99d11f1e409e286f57fc10ee41af224 Author: Brett Creeley Date: Thu Dec 12 03:12:56 2019 -0800 ice: Add ice_for_each_vf() macro Currently we do "for (i = 0; i < pf->num_alloc_vfs; i++)" all over the place. Many other places use macros to contain this repeated for loop, So create the macro ice_for_each_vf(pf, i) that does the same thing. There were a couple places we were using one loop variable and a VF iterator, which were changed to using a local variable within the ice_for_each_vf() macro. Also in ice_alloc_vfs() we were setting pf->num_alloc_vfs after doing "for (i = 0; i < num_alloc_vfs; i++)". Instead assign pf->num_alloc_vfs right after allocating memory for the pf->vf array. Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit fc0f39bcb50cd4a414ee5d5fef5208a7d04c4c32 Author: Brett Creeley Date: Thu Dec 12 03:12:55 2019 -0800 ice: Add code to keep track of current dflt_vsi We can't have more than one default VSI so prevent another VSI from overwriting the current dflt_vsi. This was achieved by adding the following functions: ice_is_dflt_vsi_in_use() - Used to check if the default VSI is already being used. ice_is_vsi_dflt_vsi() - Used to check if VSI passed in is in fact the default VSI. ice_set_dflt_vsi() - Used to set the default VSI via a switch rule ice_clear_dflt_vsi() - Used to clear the default VSI via a switch rule. Also, there was no need to introduce any locking because all mailbox events and synchronization of switch filters for the PF happen in the service task. Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit cd6d6b83316a9cd2cb97df2bb0bbe617e832d0df Author: Brett Creeley Date: Thu Dec 12 03:12:54 2019 -0800 ice: Fix VF spoofchk There are many things wrong with the function ice_set_vf_spoofchk(). 1. The VSI being modified is the PF VSI, not the VF VSI. 2. We are enabling Rx VLAN pruning instead of Tx VLAN anti-spoof. 3. The spoofchk setting for each VF is not initialized correctly or re-initialized correctly on reset. To fix [1] we need to make sure we are modifying the VF VSI. This is done by using the vf->lan_vsi_idx to index into the PF's VSI array. To fix [2] replace setting Rx VLAN pruning in ice_set_vf_spoofchk() with setting Tx VLAN anti-spoof. To Fix [3] we need to make sure the initial VSI settings match what is done in ice_set_vf_spoofchk() for spoofchk=on. Also make sure this also works for VF reset. This was done by modifying ice_vsi_init() to account for the current spoofchk state of the VF VSI. Because of these changes, Tx VLAN anti-spoof needs to be removed from ice_cfg_vlan_pruning(). This is okay for the VF because this is now controlled from the admin enabling/disabling spoofchk. For the PF, Tx VLAN anti-spoof should not be set. This change requires us to call ice_set_vf_spoofchk() when configuring promiscuous mode for the VF which requires ice_set_vf_spoofchk() to move in order to prevent a forward declaration prototype. Also, add VLAN 0 by default when allocating a VF since the PF is unaware if the guest OS is running the 8021q module. Without this, MDD events will trigger on untagged traffic because spoofcheck is enabled by default. Due to this change, ignore add/delete messages for VLAN 0 from VIRTCHNL since this is added/deleted during VF initialization/teardown respectively and should not be modified. Signed-off-by: Brett Creeley Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit a54e3b8cffd6d2f12c7fcf14f6d13ab997c0f160 Author: Brett Creeley Date: Thu Dec 12 03:12:53 2019 -0800 ice: Support UDP segmentation offload Based on the work done by Alex Duyck on other Intel drivers, add code to support UDP segmentation offload (USO) for the ice driver. Signed-off-by: Brett Creeley Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 04db1580b5e48a79e24aa51ecae0cd4b2296ec23 Author: Xiyu Yang Date: Mon Dec 30 10:24:28 2019 +0800 RDMA/i40iw: fix a potential NULL pointer dereference A NULL pointer can be returned by in_dev_get(). Thus add a corresponding check so that a NULL pointer dereference will be avoided at this place. Fixes: 8e06af711bf2 ("i40iw: add main, hdr, status") Link: https://lore.kernel.org/r/1577672668-46499-1-git-send-email-xiyuyang19@fudan.edu.cn Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan Reviewed-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 6ca18d8927d468c763571f78c9a7387a69ffa020 Author: Jiewei Ke Date: Fri Dec 27 19:36:13 2019 +0800 RDMA/rxe: Fix error type of mmap_offset The type of mmap_offset should be u64 instead of int to match the type of mminfo.offset. If otherwise, after we create several thousands of CQs, it will run into overflow issues. Link: https://lore.kernel.org/r/20191227113613.5020-1-kejiewei.cn@gmail.com Signed-off-by: Jiewei Ke Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 2ab367a70a077818905c92c4cfc7c2bd6bc76a14 Author: zhengbin Date: Tue Dec 24 16:40:12 2019 +0800 RDMA/mlx5: use true,false for bool variable Fixes coccicheck warning: drivers/infiniband/hw/mlx5/mr.c:150:2-26: WARNING: Assignment of 0/1 to bool variable drivers/infiniband/hw/mlx5/mr.c:1455:2-26: WARNING: Assignment of 0/1 to bool variable drivers/infiniband/hw/mlx5/qp.c:1874:6-20: WARNING: Assignment of 0/1 to bool variable Link: https://lore.kernel.org/r/1577176812-2238-6-git-send-email-zhengbin13@huawei.com Reported-by: Hulk Robot Signed-off-by: zhengbin Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit cf368beb8117e9d818f7b444943637fdc18d79f1 Author: zhengbin Date: Tue Dec 24 16:40:11 2019 +0800 RDMA/mlx4: use true,false for bool variable Fixes coccicheck warning: drivers/infiniband/hw/mlx4/qp.c:852:2-14: WARNING: Assignment of 0/1 to bool variable drivers/infiniband/hw/mlx4/qp.c:3087:3-10: WARNING: Assignment of 0/1 to bool variable Link: https://lore.kernel.org/r/1577176812-2238-5-git-send-email-zhengbin13@huawei.com Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c934833e772396e20e40715e01144a92faf11735 Author: zhengbin Date: Tue Dec 24 16:40:10 2019 +0800 IB/iser: use true,false for bool variable Fixes coccicheck warning: drivers/infiniband/ulp/iser/iser_memory.c:530:2-21: WARNING: Assignment of 0/1 to bool variable drivers/infiniband/ulp/iser/iser_verbs.c:1096:2-21: WARNING: Assignment of 0/1 to bool variable Link: https://lore.kernel.org/r/1577176812-2238-4-git-send-email-zhengbin13@huawei.com Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Jason Gunthorpe commit d09dbe74e963ffca7bfb0a8c0f98494a864654b6 Author: zhengbin Date: Tue Dec 24 16:40:09 2019 +0800 IB/hfi1: use true,false for bool variable Fixes coccicheck warning: drivers/infiniband/hw/hfi1/rc.c:2602:1-8: WARNING: Assignment of 0/1 to bool variable Link: https://lore.kernel.org/r/1577176812-2238-3-git-send-email-zhengbin13@huawei.com Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5369b4828975fcd2d499791b3d25a4e7c0b96baa Author: zhengbin Date: Tue Dec 24 16:40:08 2019 +0800 RDMA/siw: use true,false for bool variable Fixes coccicheck warning: drivers/infiniband/sw/siw/siw_cm.c:32:18-41: WARNING: Assignment of 0/1 to bool variable Link: https://lore.kernel.org/r/1577176812-2238-2-git-send-email-zhengbin13@huawei.com Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Jason Gunthorpe commit 9ff1b6466a291a33389c4a9c7f3f9b64d62df40a Author: Yishai Hadas Date: Sun Dec 22 14:46:49 2019 +0200 IB/core: Fix ODP with IB_ACCESS_HUGETLB handling As VMAs for a given range might not be available as part of the registration phase in ODP. ib_init_umem_odp() considered the expected page shift value that was previously set and initializes its internals accordingly. If memory isn't backed by physical contiguous pages aligned to a hugepage boundary an error will be set as part of the page fault flow and come back to the user as some failed RDMA operation. Fixes: 0008b84ea9af ("IB/umem: Add support to huge ODP") Link: https://lore.kernel.org/r/20191222124649.52300-4-leon@kernel.org Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit d07de8bd1709a80a282963ad7b2535148678a9e4 Author: Yishai Hadas Date: Sun Dec 22 14:46:48 2019 +0200 IB/core: Fix ODP get user pages flow The nr_pages argument of get_user_pages_remote() should always be in terms of the system page size, not the MR page size. Use PAGE_SIZE instead of umem_odp->page_shift. Fixes: 403cd12e2cf7 ("IB/umem: Add contiguous ODP support") Link: https://lore.kernel.org/r/20191222124649.52300-3-leon@kernel.org Signed-off-by: Yishai Hadas Reviewed-by: Artemy Kovalyov Reviewed-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit cbe4b8f0a5766a40563876932cba6c9bf28eb98a Author: Artemy Kovalyov Date: Sun Dec 22 14:46:47 2019 +0200 IB/mlx5: Unify ODP MR code paths to allow extra flexibility Building MR translation table in the ODP case requires additional flexibility, namely random access to DMA addresses. Make both direct and indirect ODP MR use same code path, separated from the non-ODP MR code path. With the restructuring the correct page_shift is now used around __mlx5_ib_populate_pas(). Fixes: d2183c6f1958 ("RDMA/umem: Move page_shift from ib_umem to ib_odp_umem") Link: https://lore.kernel.org/r/20191222124649.52300-2-leon@kernel.org Signed-off-by: Artemy Kovalyov Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 268b4cdfff0cd7300c34703973dc5ba83bdbca7e Author: AngeloGioacchino Del Regno Date: Thu Oct 31 12:16:42 2019 +0100 arm64: dts: pm8004: Add SPMI regulator and add phandles to lsids Add the SPMI regulator node in the PM8004 LSID5 (as there is where it resides basically 99% of the times) and set the nodes to be disabled by default, as not all boards have both or one of the lsids specified in this generic pm8004 DT. While at it, also add nice phandles to the lsids specified in this DT to allow configuration in specific board dts in a more human readable fashion. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20191031111645.34777-3-kholk11@gmail.com Signed-off-by: Bjorn Andersson commit 4ad6429d2713924afe10cd960535600b241560a3 Author: Mike Marciniszyn Date: Thu Dec 19 16:19:34 2019 -0500 IB/rdmavt: Correct comments in rdmavt_qp.h header Comments need to be with the definition of rvt_restart_sge(). Other comments were duplicated in sw/rdmavt/rc.c and were removed. Fixes: 385156c5f2a6 ("IB/hfi: Move RC functions into a header file") Link: https://lore.kernel.org/r/20191219211934.58387.88014.stgit@awfm-01.aw.intel.com Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 44ec5aa3c6158122412b3018fdea1474edf0898e Author: Michael J. Ruhl Date: Thu Dec 19 16:19:28 2019 -0500 IB/hfi1: List all receive contexts from debugfs The current debugfs output for receive contexts (rcds), stops after the kernel receive contexts have been displayed. This is not enough information to fully diagnose packet drops. Display all of the receive contexts. Augment the output with some more context information. Limit the ring buffer header output to 5 entries to avoid overextending the sequential file output. Fixes: bf808b5039c ("IB/hfi1: Add kernel receive context info to debugfs") Link: https://lore.kernel.org/r/20191219211928.58387.20737.stgit@awfm-01.aw.intel.com Reviewed-by: Mike Marciniszyn Signed-off-by: Michael J. Ruhl Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 2fb3b5ae1ca77109209bd886094224faa37a43e8 Author: Mike Marciniszyn Date: Thu Dec 19 16:19:22 2019 -0500 IB/hfi1: Add accessor API routines to access context members This patch adds a set of accessor routines to access context members. Link: https://lore.kernel.org/r/20191219211922.58387.26548.stgit@awfm-01.aw.intel.com Reviewed-by: Michael J. Ruhl Signed-off-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 3593f69c55c53de6e2de8799e4892b8c795f3713 Author: Eugene Crosser Date: Thu Dec 19 15:48:47 2019 +0200 RDMA/mlx4: Redo TX checksum offload in line with docs Ingress checksum offload was not working for IPv6 frames because the conditional expression that checks validation status passed from the hardware was not matching the algorithm described in the documentation. This patch defines L4_CSUM flag (which falls inside the badfcs_enc field in the existing definition of the CQE layout) and replaces the conditional expression with the one defined in the "ConnectX(r) Family Programmer's Manual" document. Link: https://lore.kernel.org/r/20191219134847.413582-1-leon@kernel.org Signed-off-by: Eugene Crosser Reviewed-by: Jack Wang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 3c85efb8f15ffa5bd165881b9fd1f9e5dd1d705f Author: yu kuai Date: Fri Jan 3 20:04:37 2020 +0800 bna: remove set but not used variable 'pgoff' drivers/net/ethernet/brocade/bna/bfa_ioc.c: In function ‘bfa_ioc_fwver_clear’: drivers/net/ethernet/brocade/bna/bfa_ioc.c:1127:13: warning: variable ‘pgoff’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai Signed-off-by: David S. Miller commit 4d6e8a033f7c6665c7ca5c5cdcf66019baa4b7a2 Author: Danit Goldberg Date: Thu Dec 19 15:47:50 2019 +0200 RDMA/cm: Use RCU synchronization mechanism to protect cm_id_private xa_load() The RCU mechanism is optimized for read-mostly scenarios and therefore more suitable to protect the cm_id_private to decrease "cm.lock" congestion. This patch replaces the existing spinlock locking mechanism and kfree with RCU mechanism in places where spinlock(cm.lock) protected xa_load returning the cm_id_priv In addition, delete the cm_get_id() function as there is no longer a distinction if the caller already holds the cm_lock. Remove an open coded version of cm_get_id(). Link: https://lore.kernel.org/r/20191219134750.413429-1-leon@kernel.org Signed-off-by: Danit Goldberg Signed-off-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit 06f6646191fd458c5a649e052a20a9aecb3ac54c Author: Ilias Apalodimas Date: Fri Jan 3 13:40:32 2020 +0200 net: netsec: Change page pool nid to NUMA_NO_NODE The current driver only exists on a non NUMA aware machine. With 44768decb7c0 ("page_pool: handle page recycle for NUMA_NO_NODE condition") applied we can safely change that to NUMA_NO_NODE and accommodate future NUMA aware hardware using netsec network interface Signed-off-by: Ilias Apalodimas Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit d2e9d229cfbd73baf33a817a0212233cea7df59a Author: Xu Wang Date: Fri Jan 3 09:28:16 2020 +0000 l2tp: Remove redundant BUG_ON() check in l2tp_pernet Passing NULL to l2tp_pernet causes a crash via BUG_ON. Dereferencing net in net_generic() also has the same effect. This patch removes the redundant BUG_ON check on the same parameter. Signed-off-by: Xu Wang Signed-off-by: David S. Miller commit 1f623431100138ffaaae36e122f2727c13de640a Author: Xu Wang Date: Fri Jan 3 09:20:40 2020 +0000 net: Remove redundant BUG_ON() check in phonet_pernet Passing NULL to phonet_pernet causes a crash via BUG_ON. Dereferencing net in net_generic() also has the same effect. This patch removes the redundant BUG_ON check on the same parameter. Signed-off-by: Xu Wang Signed-off-by: David S. Miller commit b39c78b2aa09cae05f3a48c11f67b3add0d604de Author: Li RongQing Date: Fri Jan 3 11:51:00 2020 +0800 net: remove the check argument from __skb_gro_checksum_convert The argument is always ignored, so remove it. Signed-off-by: Li RongQing Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 4a883ccfba3adefc7123ec1a6da3c7301a56ce97 Author: YueHaibing Date: Fri Jan 3 03:48:56 2020 +0000 ethtool: remove set but not used variable 'lsettings' Fixes gcc '-Wunused-but-set-variable' warning: net/ethtool/linkmodes.c: In function 'ethnl_set_linkmodes': net/ethtool/linkmodes.c:326:32: warning: variable 'lsettings' set but not used [-Wunused-but-set-variable] struct ethtool_link_settings *lsettings; ^ It is never used, so remove it. Reported-by: Hulk Robot Signed-off-by: YueHaibing Reviewed-by: Michal Kubecek Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 9f48db0d4a08624bb9ba847ea40c8abad753b396 Author: Aditya Pakki Date: Tue Dec 17 13:44:37 2019 -0600 RDMA/srpt: Remove unnecessary assertion in srpt_queue_response Since ch has already been de-referenced by the time we get to the BUG_ON, it is useless. The back trace alone is enough to tell what is going on, delete the redundant BUG_ON. Link: https://lore.kernel.org/r/20191217194437.25568-1-pakki001@umn.edu Signed-off-by: Aditya Pakki Reviewed-by: Bart Van Assche Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit a242c36951ecd24bc16086940dbe6b522205c461 Author: Håkon Bugge Date: Mon Dec 16 13:04:36 2019 +0100 RDMA/netlink: Do not always generate an ACK for some netlink operations In rdma_nl_rcv_skb(), the local variable err is assigned the return value of the supplied callback function, which could be one of ib_nl_handle_resolve_resp(), ib_nl_handle_set_timeout(), or ib_nl_handle_ip_res_resp(). These three functions all return skb->len on success. rdma_nl_rcv_skb() is merely a copy of netlink_rcv_skb(). The callback functions used by the latter have the convention: "Returns 0 on success or a negative error code". In particular, the statement (equal for both functions): if (nlh->nlmsg_flags & NLM_F_ACK || err) implies that rdma_nl_rcv_skb() always will ack a message, independent of the NLM_F_ACK being set in nlmsg_flags or not. The fix could be to change the above statement, but it is better to keep the two *_rcv_skb() functions equal in this respect and instead change the three callback functions in the rdma subsystem to the correct convention. Fixes: 2ca546b92a02 ("IB/sa: Route SA pathrecord query through netlink") Fixes: ae43f8286730 ("IB/core: Add IP to GID netlink offload") Link: https://lore.kernel.org/r/20191216120436.3204814-1-haakon.bugge@oracle.com Suggested-by: Mark Haywood Signed-off-by: Håkon Bugge Tested-by: Mark Haywood Reviewed-by: Leon Romanovsky Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit b5671afe5e39ed71e94eae788bacdcceec69db09 Author: Prabhath Sajeepa Date: Thu Dec 12 17:11:29 2019 -0700 IB/mlx5: Fix outstanding_pi index for GSI qps Commit b0ffeb537f3a ("IB/mlx5: Fix iteration overrun in GSI qps") changed the way outstanding WRs are tracked for the GSI QP. But the fix did not cover the case when a call to ib_post_send() fails and updates index to track outstanding. Since the prior commmit outstanding_pi should not be bounded otherwise the loop generate_completions() will fail. Fixes: b0ffeb537f3a ("IB/mlx5: Fix iteration overrun in GSI qps") Link: https://lore.kernel.org/r/1576195889-23527-1-git-send-email-psajeepa@purestorage.com Signed-off-by: Prabhath Sajeepa Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 58fb0b5625ac976d907427ab639cdbf1aaefdac5 Author: Bernard Metzler Date: Tue Dec 10 17:17:29 2019 +0100 RDMA/siw: Simplify QP representation Change siw_qp to contain ib_qp. Use rdma_is_kernel_res() on contained ib_qp to distinguish kernel level from user level applications resources. Apply same mechanism for kernel/user level application detection to completion queues. Link: https://lore.kernel.org/r/20191210161729.31598-1-bmt@zurich.ibm.com Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe commit 4768820243d71d49f1044b3f911ac3d52bdb79af Author: Yixian Liu Date: Tue Dec 10 20:45:02 2019 +0800 RDMA/hns: Simplify the calculation and usage of wqe idx for post verbs Currently, the wqe idx is calculated repeatly everywhere it is used. This patch defines wqe_idx and calculated it only once, then just use it as needed. Fixes: 2d40788825ac ("RDMA/hns: Add support for processing send wr and receive wr") Link: https://lore.kernel.org/r/1575981902-5274-1-git-send-email-liweihang@hisilicon.com Signed-off-by: Yixian Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 53bb802315b32bfb2a5a464dfc1f24b5610cad6d Author: Selvin Xavier Date: Mon Nov 25 00:39:34 2019 -0800 RDMA/bnxt_re: Report more number of completion vectors Report the the data path MSIx vectors allocated by driver as number of completion vectors. One interrupt vector is used for Control path. So reporting one less than the total number of MSIx vectors allocated by the driver. Link: https://lore.kernel.org/r/1574671174-5064-7-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 3f666c56c6b8cc40a5e9002aac484b8f5b83c402 Author: Vivek Goyal Date: Fri Jan 3 13:33:07 2020 -0500 dax: Pass dax_dev instead of bdev to dax_writeback_mapping_range() As of now dax_writeback_mapping_range() takes "struct block_device" as a parameter and dax_dev is searched from bdev name. This also involves taking a fresh reference on dax_dev and putting that reference at the end of function. We are developing a new filesystem virtio-fs and using dax to access host page cache directly. But there is no block device. IOW, we want to make use of dax but want to get rid of this assumption that there is always a block device associated with dax_dev. So pass in "struct dax_device" as parameter instead of bdev. ext2/ext4/xfs are current users and they already have a reference on dax_device. So there is no need to take reference and drop reference to dax_device on each call of this function. Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Vivek Goyal Link: https://lore.kernel.org/r/20200103183307.GB13350@redhat.com Signed-off-by: Dan Williams commit 93a3d05f9d68015f425c8f019c3ba1f489a0c0cd Author: Michal Kalderon Date: Thu Nov 21 13:29:57 2019 +0200 RDMA/qedr: Add kernel capability flags for dpm enabled mode HW/FW support two types of latency enhancement features. Until now user-space implemented only edpm (enhanced dpm). We add kernel capability flags to differentiate between current FW in kernel that supports both ldpm and edpm. Since edpm is not yet supported for iWARP we add different flags for iWARP + RoCE. We also fix bad practice of defining sizes in rdma-core and pass initialization to kernel, for forward compatibility. The capability flags are added for backward-forward compatibility between kernel and rdma-core for qedr. Before this change there was a field called dpm_enabled which could hold either 0 or 1 value, this indicated whether RoCE edpm was enabled or not. We modified this field to be dpm_flags, and bit 1 still holds the same meaning of RoCE edpm being enabled or not. Link: https://lore.kernel.org/r/20191121112957.25162-1-michal.kalderon@marvell.com Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit e44b4bf2648ef05ff1cde9f354079bce58a5ebde Author: zhengbin Date: Wed Dec 25 11:19:36 2019 +0800 nfsd: use true,false for bool variable in nfssvc.c Fixes coccicheck warning: fs/nfsd/nfssvc.c:394:2-14: WARNING: Assignment of 0/1 to bool variable fs/nfsd/nfssvc.c:407:2-14: WARNING: Assignment of 0/1 to bool variable fs/nfsd/nfssvc.c:422:2-14: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: J. Bruce Fields commit 500c248171408b80a6c87d278085ad1c8be762c2 Author: zhengbin Date: Wed Dec 25 11:19:35 2019 +0800 nfsd: use true,false for bool variable in nfs4proc.c Fixes coccicheck warning: fs/nfsd/nfs4proc.c:235:1-18: WARNING: Assignment of 0/1 to bool variable fs/nfsd/nfs4proc.c:368:1-17: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: J. Bruce Fields commit 384a7ccaa37dff7c84123547dcfd98e2dd4144ba Author: zhengbin Date: Wed Dec 25 11:19:34 2019 +0800 nfsd: use true,false for bool variable in vfs.c Fixes coccicheck warning: fs/nfsd/vfs.c:1389:5-13: WARNING: Assignment of 0/1 to bool variable fs/nfsd/vfs.c:1398:5-13: WARNING: Assignment of 0/1 to bool variable fs/nfsd/vfs.c:1415:2-10: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: J. Bruce Fields commit 22ad4e05585cb50c486b05bdaa4b4a4686074ff7 Author: Sakari Ailus Date: Fri Oct 11 11:45:22 2019 +0200 media: smiapp: Put the device again if starting streaming fails If there was an error in starting streaming, put the runtime usage count of the device. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 96e3a6b92f23a97ca9bf3359ada1b5c773b32b7e Author: Sakari Ailus Date: Mon Sep 30 10:18:45 2019 +0200 media: smiapp: Avoid maintaining power state information Instead of keeping track of the power state ourselves, let runtime PM handle it. This also splits handling controls between side effect management and writing the new configuration to the sensor's registers. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit dd12ed17ce9e5523d30d2d6b8eac0bf52500b64f Author: Sakari Ailus Date: Fri Oct 18 16:50:05 2019 +0200 media: omap3isp: Don't restart CCDC if we're about to stop The omap3isp driver set the new buffer and enabled the CCDC in a situation a new buffer was available but streaming was about to be stopped on the CCDC. This lead to frequent system crashes in case there were buffers queued when streming was being stopped. Fix this by first checking whether there's an intent to stop streaming and if there isn't, then set the new buffer and re-enable CCDC. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7e2f75fd32385eadcd8c5b991508a90a5658ab9c Author: Sakari Ailus Date: Thu Oct 17 13:01:37 2019 +0200 media: omap3isp: Ignore failure of stopping streaming on external subdev The isp was marked to have failed to stop if stopping streaming on an external subdev failed. The return value from the external subdev should be ignored instead as it is not part of the ISP and thus the ISP does not need to be reset for that reason. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c0e0d3138896f33c6d9322b07e105ea6e572ef3e Author: Tomasz Maciej Nowak Date: Sun Dec 29 15:53:55 2019 +0100 media: dvb: add support for TerraTec TC2 Stick (193534) Seems to be a clone of Logilink VG0022A. Supports DVB-C, DVB-T and DVB-T2. Only terrestrial reception was tested on Polish and Czech multiplexes. Signed-off-by: Tomasz Maciej Nowak Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit a04930b7bf5986f3e1291d77c452cbed2aa2b3e4 Author: Bodo Eggert <7eggert@gmx.de> Date: Thu Dec 26 22:28:45 2019 +0100 media: serial_ir: change "ignoring spike" to debug level At least on my system with a self-made IR receiver, my kernel log is filled with: serial_ir serial_ir.0: ignoring spike: 1 1 1419988034627194ns 1419956080709377ns These messages happen at random and do not prevent the receiver from working. Also I cannot change the features of the IC, therefore they are not useful. Probably they are not useful at all. However they fill the console, they accumulate and fill the dmesg log, by doing this, they prevent me from seeing important message. Signed-off-by: Bodo Eggert <7eggert@gmx.de> Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 31f715dd48de0acb3f57f7a83e1679c9dc50179d Author: James Hogan Date: Thu Dec 19 15:52:57 2019 +0100 media: MAINTAINERS: Orphan img-ir driver I haven't been active for 18 months, and don't have the hardware set up to test the img-ir driver, so mark it as orphaned and remove myself as maintainer. I used to test this driver using a Minimorph board with Meta based TZ1090 SoC, but the Meta arch port is long gone from the kernel. The only remaining platform in-tree using this driver is the Imagination Pistachio SoC, and the only Pistachio based board with DTS in-tree (MIPS Creator Ci40) doesn't bring the IR out. However I presume the IP persists under the guardianship of Sondrel, and its possible current & future SoCs/boards may continue to use this IP. Signed-off-by: James Hogan Cc: James Hartley Cc: Paul Burton Cc: linux-mips@vger.kernel.org Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 3fbe158406af6a062960c0713a4d97f31fcbbea6 Author: David J. Fiddes Date: Tue Nov 12 13:40:59 2019 +0100 media: rtl28xxu: Add support for PROlectrix DV107669 DVB-T dongle This adds support for the PROlectrix DV107669 DVT-T dongle which uses an RTL2832 and FC0012 tuner. Tests: - Verified correct operation of DVB-T reception with VLC across several UK multiplexes Signed-off-by: David J. Fiddes Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 8b9aac1a990b2fa590026b46b4e4ec45ebe8dfea Author: Daniel W. S. Almeida Date: Sun Dec 1 17:15:41 2019 +0100 media: dvb_dummy_fe: Add blank line after declaration Fix checkpatch.pl error by adding a blank line Signed-off-by: Daniel W. S. Almeida Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 17a529d09975ef85ae3d67ba28a01f10fafd54b5 Author: Daniel W. S. Almeida Date: Thu Nov 7 02:36:33 2019 +0100 media: dvb_dummy_fe: place EXPORT_SYMBOL below corresponding function dvb_dummy_fe.c had all its EXPORT_SYMBOL macros located at the end of the file. Now these are located directly below the symbol they are exporting for increased readability. Suggested-by: Shuah Khan Signed-off-by: Daniel W. S. Almeida Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 080d89f522e2baddb4fbbd1af4b67b5f92537ef8 Author: Sean Young Date: Thu Nov 21 11:10:47 2019 +0100 media: rc: ensure lirc is initialized before registering input device Once rc_open is called on the input device, lirc events can be delivered. Ensure lirc is ready to do so else we might get this: Registered IR keymap rc-hauppauge rc rc0: Hauppauge WinTV PVR-350 as /devices/pci0000:00/0000:00:1e.0/0000:04:00.0/i2c-0/0-0018/rc/rc0 input: Hauppauge WinTV PVR-350 as /devices/pci0000:00/0000:00:1e.0/0000:04:00.0/i2c-0/0-0018/rc/rc0/input9 BUG: kernel NULL pointer dereference, address: 0000000000000038 PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 1 PID: 17 Comm: kworker/1:0 Not tainted 5.3.11-300.fc31.x86_64 #1 Hardware name: /DG43NB, BIOS NBG4310H.86A.0096.2009.0903.1845 09/03/2009 Workqueue: events ir_work [ir_kbd_i2c] RIP: 0010:ir_lirc_scancode_event+0x3d/0xb0 Code: a6 b4 07 00 00 49 81 c6 b8 07 00 00 55 53 e8 ba a7 9d ff 4c 89 e7 49 89 45 00 e8 5e 7a 25 00 49 8b 1e 48 89 c5 4c 39 f3 74 58 <8b> 43 38 8b 53 40 89 c1 2b 4b 3c 39 ca 72 41 21 d0 49 8b 7d 00 49 RSP: 0018:ffffaae2000b3d88 EFLAGS: 00010017 RAX: 0000000000000002 RBX: 0000000000000000 RCX: 0000000000000019 RDX: 0000000000000001 RSI: 006e801b1f26ce6a RDI: ffff9e39797c37b4 RBP: 0000000000000002 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000001 R12: ffff9e39797c37b4 R13: ffffaae2000b3db8 R14: ffff9e39797c37b8 R15: ffff9e39797c33d8 FS: 0000000000000000(0000) GS:ffff9e397b680000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000038 CR3: 0000000035844000 CR4: 00000000000006e0 Call Trace: ir_do_keydown+0x8e/0x2b0 rc_keydown+0x52/0xc0 ir_work+0xb8/0x130 [ir_kbd_i2c] process_one_work+0x19d/0x340 worker_thread+0x50/0x3b0 kthread+0xfb/0x130 ? process_one_work+0x340/0x340 ? kthread_park+0x80/0x80 ret_from_fork+0x35/0x40 Modules linked in: rc_hauppauge tuner msp3400 saa7127 saa7115 ivtv(+) tveeprom cx2341x v4l2_common videodev mc i2c_algo_bit ir_kbd_i2c ip_tables firewire_ohci e1000e serio_raw firewire_core ata_generic crc_itu_t pata_acpi pata_jmicron fuse CR2: 0000000000000038 ---[ end trace c67c2697a99fa74b ]--- RIP: 0010:ir_lirc_scancode_event+0x3d/0xb0 Code: a6 b4 07 00 00 49 81 c6 b8 07 00 00 55 53 e8 ba a7 9d ff 4c 89 e7 49 89 45 00 e8 5e 7a 25 00 49 8b 1e 48 89 c5 4c 39 f3 74 58 <8b> 43 38 8b 53 40 89 c1 2b 4b 3c 39 ca 72 41 21 d0 49 8b 7d 00 49 RSP: 0018:ffffaae2000b3d88 EFLAGS: 00010017 RAX: 0000000000000002 RBX: 0000000000000000 RCX: 0000000000000019 RDX: 0000000000000001 RSI: 006e801b1f26ce6a RDI: ffff9e39797c37b4 RBP: 0000000000000002 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000001 R12: ffff9e39797c37b4 R13: ffffaae2000b3db8 R14: ffff9e39797c37b8 R15: ffff9e39797c33d8 FS: 0000000000000000(0000) GS:ffff9e397b680000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000038 CR3: 0000000035844000 CR4: 00000000000006e0 rc rc0: lirc_dev: driver ir_kbd_i2c registered at minor = 0, scancode receiver, no transmitter tuner-simple 0-0061: creating new instance tuner-simple 0-0061: type set to 2 (Philips NTSC (FI1236,FM1236 and compatibles)) ivtv0: Registered device video0 for encoder MPG (4096 kB) ivtv0: Registered device video32 for encoder YUV (2048 kB) ivtv0: Registered device vbi0 for encoder VBI (1024 kB) ivtv0: Registered device video24 for encoder PCM (320 kB) ivtv0: Registered device radio0 for encoder radio ivtv0: Registered device video16 for decoder MPG (1024 kB) ivtv0: Registered device vbi8 for decoder VBI (64 kB) ivtv0: Registered device vbi16 for decoder VOUT ivtv0: Registered device video48 for decoder YUV (1024 kB) Cc: stable@vger.kernel.org Tested-by: Nick French Reported-by: Nick French Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit c376d66515f89dd833b344c419e313db9ad169b5 Author: Sean Young Date: Mon Nov 11 12:40:52 2019 +0100 media: cxusb: use dev_dbg() rather than hand-rolled debug This solves the following compiler warnings: drivers/media/usb/dvb-usb/cxusb.c: In function ‘cxusb_gpio_tuner’: drivers/media/usb/dvb-usb/cxusb.c:128:35: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] 128 | deb_info("gpio_write failed.\n"); | ^ drivers/media/usb/dvb-usb/cxusb.c: In function ‘cxusb_bluebird_gpio_rw’: drivers/media/usb/dvb-usb/cxusb.c:145:44: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] 145 | deb_info("bluebird_gpio_write failed.\n"); | ^ drivers/media/usb/dvb-usb/cxusb.c: In function ‘cxusb_i2c_xfer’: drivers/media/usb/dvb-usb/cxusb.c:251:42: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] 251 | deb_i2c("i2c read may have failed\n"); | ^ drivers/media/usb/dvb-usb/cxusb.c:274:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] 274 | deb_i2c("i2c write may have failed\n"); | ^ Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 26cff637121d8bb866ebd6515c430ac890e6ec80 Author: Sean Young Date: Sun Nov 10 11:25:13 2019 +0100 media: vp7045: do not read uninitialized values if usb transfer fails It is not a fatal error if reading the mac address or the remote control decoder state fails. Reported-by: syzbot+ec869945d3dde5f33b43@syzkaller.appspotmail.com Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 51d0c99b391f0cac61ad7b827c26f549ee55672c Author: Sean Young Date: Sun Nov 10 11:15:37 2019 +0100 media: af9005: uninitialized variable printked If usb_bulk_msg() fails, actual_length can be uninitialized. Reported-by: syzbot+9d42b7773d2fecd983ab@syzkaller.appspotmail.com Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit eecc70d22ae51225de1ef629c1159f7116476b2e Author: Sean Young Date: Sun Nov 10 11:04:40 2019 +0100 media: digitv: don't continue if remote control state can't be read This results in an uninitialized variable read. Reported-by: syzbot+6bf9606ee955b646c0e1@syzkaller.appspotmail.com Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 342027c5de4494d14657b64ead536a5671768672 Author: Arnd Bergmann Date: Mon Dec 16 15:15:06 2019 +0100 media: v4l2-core: fix compat v4l2_buffer handling for time64 ABI Add support for the four new variants of ioctl commands for 64-bit time_t in v4l2_buffer. The existing v4l2_buffer32 structure for the traditional format gets changed to match the new v4l2_buffer format, and the old layout is now called v4l2_buffer32_time32. Neither of these matches the native 64-bit architecture format of v4l2_buffer, so both require special handling in compat code. Duplicating the existing handlers for the new types is a safe conversion for now, but unfortunately this may turn into a maintenance burden later. A larger-scale rework of the compat code might be a better alternative, but is out of scope of the y2038 work. Note: x32 support for v4l2_buffer32 has always been broken and remains so after this change, fixing it would have required even more duplication, and apparently nobody has cared so far. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: remove spurious newline] Signed-off-by: Mauro Carvalho Chehab commit 9983b2daf1ca4602c32e38a4ef98a6a2b1156b90 Author: Arnd Bergmann Date: Mon Dec 16 15:15:05 2019 +0100 media: v4l2-core: fix compat VIDIOC_DQEVENT for time64 ABI The native code supports the variant of struct v4l2_event for 64-bit time_t, so add the compat version as well. Here, a new incompatibility arises: while almost all 32-bit architectures now use the same layout as 64-bit architectures and the commands can simply be passed through, on x86 the internal alignment of v4l2_event is different because of the 64-bit member in v4l2_event_ctrl. To handle all architectures, this now requires defining four different versions of the structure to cover all possible combinations. The compat handling for VIDIOC_DQEVENT32 and VIDIOC_DQEVENT32_TIME32 is now inside of an #ifdef so it does not get used on architectures other than x86. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 577c89b0ce726e44c08c396d14f84a00070a57b7 Author: Arnd Bergmann Date: Mon Dec 16 15:15:04 2019 +0100 media: v4l2-core: fix v4l2_buffer handling for time64 ABI The v4l2_buffer structure contains a 'struct timeval' member that is defined by the user space C library, creating an ABI incompatibility when that gets updated to a 64-bit time_t. As in v4l2_event, handle this with a special case in video_put_user() and video_get_user() to replace the memcpy there. Since the structure also contains a pointer, there are now two native versions (on 32-bit systems) as well as two compat versions (on 64-bit systems), which unfortunately complicates the compat handler quite a bit. Duplicating the existing handlers for the new types is a safe conversion for now, but unfortunately this may turn into a maintenance burden later. A larger-scale rework of the compat code might be a better alternative, but is out of scope of the y2038 work. Sparc64 needs a special case because of their special suseconds_t definition. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1a6c0b36dd19c51cdd76895d009c5deba2286ebb Author: Arnd Bergmann Date: Mon Dec 16 15:15:03 2019 +0100 media: v4l2-core: fix VIDIOC_DQEVENT for time64 ABI The v4l2_event structure contains a 'struct timespec' member that is defined by the user space C library, creating an ABI incompatibility when that gets updated to a 64-bit time_t. While passing a 32-bit time_t here would be sufficient for CLOCK_MONOTONIC timestamps, simply redefining the structure to use the kernel's __kernel_old_timespec would not work for any library that uses a copy of the linux/videodev2.h header file rather than including the copy from the latest kernel headers. This means the kernel has to be changed to handle both versions of the structure layout on a 32-bit architecture. The easiest way to do this is during the copy from/to user space. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c8ef1a6076bfb986052ff8fd8f5eb3b3a3f1048e Author: Arnd Bergmann Date: Mon Dec 16 15:15:02 2019 +0100 media: v4l2-core: split out data copy from video_usercopy The copy-in/out portions of video_usercopy() are about to get more complex, so turn then into separate functions as a cleanup first. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4a873f3fa5d6ca52e446d306dd7194dd86a09422 Author: Arnd Bergmann Date: Mon Dec 16 15:15:01 2019 +0100 media: v4l2-core: compat: ignore native command codes The do_video_ioctl() compat handler converts the compat command codes into the native ones before processing further, but this causes problems for 32-bit user applications that pass a command code that matches a 64-bit native number, which will then be handled the same way. Specifically, this breaks VIDIOC_DQEVENT_TIME from user space applications with 64-bit time_t, as the structure layout is the same as the native 64-bit layout on many architectures (x86 being the notable exception). Change the handler to use the converted command code only for passing into the native ioctl handler, not for deciding on the conversion, in order to make the compat behavior match the native behavior. Actual support for the 64-bit time_t version of VIDIOC_DQEVENT_TIME and other commands still needs to be added in a separate patch. Cc: stable@vger.kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 77cdffcb0bfb87fe3645894335cb8cb94917e6ac Author: Arnd Bergmann Date: Mon Dec 16 15:15:00 2019 +0100 media: v4l2: abstract timeval handling in v4l2_buffer As a preparation for adding 64-bit time_t support in the uapi, change the drivers to no longer care about the format of the timestamp field in struct v4l2_buffer. The v4l2_timeval_to_ns() function is no longer needed in the kernel after this, but there is userspace code relying on it to be part of the uapi header. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: replace spaces by tabs] Signed-off-by: Mauro Carvalho Chehab commit 71e37d2e4b3b9b5ab143ee52f9ebb43e01068594 Author: Arnd Bergmann Date: Mon Dec 16 15:14:59 2019 +0100 media: documentation: fix video_event description The type for the timestamp in video_event was changed to 'long' a long time ago, change the documentation to match. Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e65e228eb0963be32180db3039f0a1467b426aae Author: Biwen Li Date: Wed Dec 25 18:36:23 2019 +0800 i2c: mux: pca954x: support property idle-state This supports property idle-state,if present, overrides i2c-mux-idle-disconnect. My use cases: - Use the property idle-state to fix an errata on LS2085ARDB and LS2088ARDB. - Errata id: E-00013(board LS2085ARDB and LS2088ARDB revision on Rev.B, Rev.C and Rev.D). - About E-00013: - Description: I2C1 and I2C3 buses are missing pull-up. - Impact: When the PCA954x device is tri-stated, the I2C bus will float. This makes the I2C bus and its associated downstream devices inaccessible. - Hardware fix: Populate resistors R189 and R190 for I2C1 and resistors R228 and R229 for I2C3. - Software fix: Remove the tri-state option from the PCA954x driver(PCA954x always on enable status, specify a channel zero in dts to fix the errata E-00013). Tested-by: Ioana Ciornei Signed-off-by: Biwen Li Signed-off-by: Peter Rosin commit 0d1569a763faef9df0f08c19c31c6aea84a302ff Author: Biwen Li Date: Wed Dec 25 18:36:22 2019 +0800 dt-bindings: i2c: support property idle-state This supports property idle-state Reviewed-by: Rob Herring Signed-off-by: Biwen Li Signed-off-by: Peter Rosin commit 348001433fad54033af24af837451d7a6563bf33 Author: Peter Rosin Date: Wed Mar 6 23:15:35 2019 +0000 i2c: mux: pca9541: use the BIT macro Because it looks nice! Reviewed-by: Guenter Roeck Reviewed-by: Vladimir Zapolskiy Signed-off-by: Peter Rosin commit b2fcaac98bbec6036d17a0a120a19b64e65f6534 Author: Chris Wilson Date: Fri Jan 3 10:45:16 2020 +0000 drm/i915/selftests: Make headers self-contained Include the types used by the headers to they can be compiled standalone. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200103104516.1757103-2-chris@chris-wilson.co.uk commit f3bc632acbb33ac3d725a0248c99db3697b3bba1 Author: Chris Wilson Date: Fri Jan 3 10:45:15 2020 +0000 drm/i915/selftests: Move igt_atomic_section[] out of the header Move the definition of the igt_atomic_section[] into a C file, leaving the declaration in the header so as not to upset headertest! Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200103104516.1757103-1-chris@chris-wilson.co.uk commit 80805774fc354f9ae7755a8e649a01dedfd0dcf8 Author: Andrew F. Davis Date: Wed Oct 16 14:04:24 2019 -0400 omapfb/dss: remove unneeded conversions to bool Found with scripts/coccinelle/misc/boolconv.cocci. Signed-off-by: Andrew F. Davis Cc: Jiri Kosina Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20191016180424.23907-1-afd@ti.com commit 7610bca71ea85d6a641533a20302d80d3e63cfac Author: Markus Elfring Date: Thu Sep 19 16:51:38 2019 +0200 video: pxafb: Use devm_platform_ioremap_resource() in pxafb_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Cc: Daniel Mack Cc: Mauro Carvalho Chehab Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: YueHaibing Cc: Bartosz Golaszewski Cc: Himanshu Jha Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/a1b804b1-43c2-327a-d6d1-df49aebec680@web.de commit bc2e7382890b36c8139d728509c1420073aef5a3 Author: Markus Elfring Date: Thu Sep 19 16:26:56 2019 +0200 video: ocfb: Use devm_platform_ioremap_resource() in ocfb_probe() Simplify this function implementation by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Cc: Bartosz Golaszewski Cc: Himanshu Jha Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/61b75aa6-ff92-e0ed-53f2-50a95d93d1f6@web.de commit 4a7001f0f4e2362d8040b94764ec321ff57e1a46 Author: Gustavo A. R. Silva Date: Wed Sep 11 06:36:04 2019 -0500 video: fbdev: fsl-diu-fb: mark expected switch fall-throughs Mark switch cases where we are expecting to fall through. Fix the following warnings (Building: mpc512x_defconfig powerpc): drivers/video/fbdev/fsl-diu-fb.c: In function ‘fsl_diu_ioctl’: ./include/linux/device.h:1750:2: warning: this statement may fall through [-Wimplicit-fallthrough=] _dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/video/fbdev/fsl-diu-fb.c:1287:3: note: in expansion of macro ‘dev_warn’ dev_warn(info->dev, ^~~~~~~~ drivers/video/fbdev/fsl-diu-fb.c:1290:2: note: here case MFB_SET_PIXFMT: ^~~~ In file included from ./include/linux/acpi.h:15:0, from ./include/linux/i2c.h:13, from ./include/uapi/linux/fb.h:6, from ./include/linux/fb.h:6, from drivers/video/fbdev/fsl-diu-fb.c:20: ./include/linux/device.h:1750:2: warning: this statement may fall through [-Wimplicit-fallthrough=] _dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/video/fbdev/fsl-diu-fb.c:1296:3: note: in expansion of macro ‘dev_warn’ dev_warn(info->dev, ^~~~~~~~ drivers/video/fbdev/fsl-diu-fb.c:1299:2: note: here case MFB_GET_PIXFMT: ^~~~ Reported-by: kbuild test robot Signed-off-by: Gustavo A. R. Silva Cc: Timur Tabi Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20190911113604.GA31512@embeddedor commit 776b0aa9a645804cbae0e9adf7e3556c25707da9 Author: Colin Ian King Date: Fri Sep 6 19:11:14 2019 +0100 fbdev: matrox: make array wtst_xlat static const, makes object smaller Don't populate the array wtst_xlat on the stack but instead make it static const. Makes the object code smaller by 89 bytes. Before: text data bss dec hex filename 14347 840 0 15187 3b53 fbdev/matrox/matroxfb_misc.o After: text data bss dec hex filename 14162 936 0 15098 3afa fbdev/matrox/matroxfb_misc.o (gcc version 9.2.1, amd64) Signed-off-by: Colin Ian King [b.zolnierkie: use u8 while at it (suggested by Ville Syrjälä)] Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20190906181114.31414-1-colin.king@canonical.com commit 3149299e105b678bd30df63f07bb4ab54ed0c373 Author: YueHaibing Date: Wed Sep 4 19:57:54 2019 +0800 fbdev/sa1100fb: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Cc: Maarten Lankhorst Cc: Daniel Vetter Cc: Viresh Kumar Cc: "Rafael J. Wysocki" Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20190904115754.21612-1-yuehaibing@huawei.com commit 8d5598f13fe7e2e1822825548c7dfcc6c0bb07f4 Author: YueHaibing Date: Wed Sep 4 19:55:23 2019 +0800 fbdev: s3c-fb: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Acked-by: Jingoo Han Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20190904115523.25068-1-yuehaibing@huawei.com commit 1d47d0bb72895e754ffbdc410314ddb9c790c6fa Author: YueHaibing Date: Wed Sep 4 19:54:06 2019 +0800 fbdev: omapfb: use devm_platform_ioremap_resource() to simplify code Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot Signed-off-by: YueHaibing Cc: Thomas Gleixner Cc: Alexios Zavras Cc: Greg Kroah-Hartman Cc: Allison Randal Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20190904115406.23880-1-yuehaibing@huawei.com commit eaa051a0ca349a725a277ee9cec42ea751e4d57d Author: Souptick Joarder Date: Mon Sep 2 18:19:04 2019 +0530 video/fbdev/68328fb: Remove dead code This is dead code since 3.15. If their is no plan to use it further, these can be removed forever. Signed-off-by: Souptick Joarder Cc: Sabyasachi Gupta Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/1567428544-8620-1-git-send-email-jrdr.linux@gmail.com commit 3c911fe799d1c338d94b78e7182ad452c37af897 Author: Christophe JAILLET Date: Sat Aug 31 12:00:24 2019 +0200 pxa168fb: Fix the function used to release some memory in an error handling path In the probe function, some resources are allocated using 'dma_alloc_wc()', they should be released with 'dma_free_wc()', not 'dma_free_coherent()'. We already use 'dma_free_wc()' in the remove function, but not in the error handling path of the probe function. Also, remove a useless 'PAGE_ALIGN()'. 'info->fix.smem_len' is already PAGE_ALIGNed. Fixes: 638772c7553f ("fb: add support of LCD display controller on pxa168/910 (base layer)") Signed-off-by: Christophe JAILLET Reviewed-by: Lubomir Rintel CC: YueHaibing Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20190831100024.3248-1-christophe.jaillet@wanadoo.fr commit ab1c4c5e9d111a867964f4a67d9ab4a564d16b90 Author: Peter Rosin Date: Tue Aug 27 11:09:26 2019 +0000 fbdev: fbmem: avoid exporting fb_center_logo The variable is only ever used from fbcon.c which is linked into the same module. Therefore, the export is not needed. Signed-off-by: Peter Rosin Reviewed-by: Geert Uytterhoeven Cc: Jonathan Corbet Cc: Matthew Wilcox Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20190827110854.12574-4-peda@axentia.se commit 691f50ab2742556aea467a946e10393da2e8d9ef Author: Peter Rosin Date: Tue Aug 27 11:09:21 2019 +0000 fbdev: fbmem: allow overriding the number of bootup logos Probably most useful if you want no logo at all, or if you only want one logo regardless of how many CPU cores you have. Signed-off-by: Peter Rosin Reviewed-by: Geert Uytterhoeven Cc: Jonathan Corbet Cc: Matthew Wilcox Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20190827110854.12574-3-peda@axentia.se commit fd933c00ebe220060e66fb136a7050a242456566 Author: Peter Rosin Date: Tue Aug 27 11:09:16 2019 +0000 fbdev: fix numbering of fbcon options Three shall be the number thou shalt count, and the number of the counting shall be three. Four shalt thou not count... One! Two! Five! Fixes: efb985f6b265 ("[PATCH] fbcon: Console Rotation - Add framebuffer console documentation") Signed-off-by: Peter Rosin Reviewed-by: Geert Uytterhoeven Cc: Jonathan Corbet Cc: Matthew Wilcox Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20190827110854.12574-2-peda@axentia.se commit e41f6b17aba58f4504491ebddc6ae4ce14f33ef3 Author: Bartlomiej Zolnierkiewicz Date: Thu Jun 27 16:08:43 2019 +0200 video: fbdev: mmp: fix sparse warnings about using incorrect types Use ->screen_buffer instead of ->screen_base in mmpfb driver. [ Please see commit 17a7b0b4d974 ("fb.h: Provide alternate screen_base pointer") for details. ] Also fix all other sparse warnings about using incorrect types in mmp display subsystem. Reviewed-by: Andrzej Hajda Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/ee796b43-f200-d41a-b18c-ae3d6bcaaa67@samsung.com commit dd90e9ae55a1e7efd3ac036afe9f7ae7bb64d39d Author: Bartlomiej Zolnierkiewicz Date: Thu Jun 27 16:07:43 2019 +0200 video: fbdev: mmp: add COMPILE_TEST support Add COMPILE_TEST support to mmp display subsystem for better compile testing coverage. Reviewed-by: Andrzej Hajda Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/d21a19ea-8c18-80df-ae79-76de7c5ee67c@samsung.com commit 5d2197466a094cba586d3a169778432ac4febcb8 Author: Bartlomiej Zolnierkiewicz Date: Thu Jun 27 16:07:03 2019 +0200 video: fbdev: mmp: remove duplicated MMP_DISP dependency This dependency is already present in higher level Kconfig file (drivers/video/fbdev/mmp/Kconfig). Reviewed-by: Andrzej Hajda Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/eb28587c-4f8f-f044-1b8b-317a8d7967aa@samsung.com commit 6056e50033d9f840bc1e35cac794b13144710a25 Author: Chris Wilson Date: Thu Jan 2 20:42:15 2020 +0000 drm/i915/gem: Support discontiguous lmem object maps Create a vmap for discontinguous lmem objects to support i915_gem_object_pin_map(). v2: Offset io address by region.start for fake-lmem Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200102204215.1519103-1-chris@chris-wilson.co.uk commit 1d0e2c9359fec6212af8c5fb29d5d56269f96968 Author: Chris Wilson Date: Thu Jan 2 13:17:07 2020 +0000 drm/i915/gt: Always poison the kernel_context image before unparking Keep scrubbing the kernel_context image with poison before we reset it in order to demonstrate that we will be resilient in the case where it is accidentally overwritten on idle. Suggested-by: Imre Deak Signed-off-by: Chris Wilson Cc: Imre Deak Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200102131707.1463945-5-chris@chris-wilson.co.uk commit fb218f2027048e199a76cccb9a131b2afd48ccbe Author: Chris Wilson Date: Thu Jan 2 13:17:06 2020 +0000 drm/i915/gt: Discard stale context state from across idling Before we idle, on parking, we switch to the kernel context such that we have a scratch context loaded while the GPU idle, protecting any precious user state. Be paranoid and assume that the idle state may have been trashed, and reset the kernel_context image after idling. Signed-off-by: Chris Wilson Cc: Imre Deak Reviewed-by: Matthew Auld Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200102131707.1463945-4-chris@chris-wilson.co.uk commit 49a24e71b2479064f24cea75e69020a6d480b1e5 Author: Chris Wilson Date: Thu Jan 2 13:17:05 2020 +0000 drm/i915/gt: Ignore stale context state upon resume We leave the kernel_context on the HW as we suspend (and while idle). There is no guarantee that is complete in memory, so we try to inhibit restoration from the kernel_context. Reinforce the inhibition by scrubbing the context. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200102131707.1463945-3-chris@chris-wilson.co.uk commit d1813ca2bbf1e68ad0280a6b76abeb2115c4740f Author: Chris Wilson Date: Thu Jan 2 13:17:04 2020 +0000 drm/i915/gt: Clear LRC image inline When creating the initial LRC image, we also want to clear the MI_NOOPs and register values. Rather than use a blanket memset beforehand, apply the clears inline, close the context image and force inhibition of the uninitialised reminder. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200102131707.1463945-2-chris@chris-wilson.co.uk commit 6a505e644c44d3f817cd3ceaafdc501181a5e70b Author: Chris Wilson Date: Thu Jan 2 13:17:03 2020 +0000 drm/i915/gt: Include a bunch more rcs image state Empirically the minimal context image we use for rcs is insufficient to state the engine. This is demonstrated if we poison the context image such that any uninitialised state is invalid, and so if the engine samples beyond our defined region, will fail to start. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200102131707.1463945-1-chris@chris-wilson.co.uk commit 0469fc6a1a8715b5c09117a26700da0d67061fb5 Author: Colin Ian King Date: Sat Dec 21 00:15:43 2019 +0000 staging: wfx: check for memory allocation failures from wfx_alloc_hif Currently calls to wfx_alloc_hif are not checking for a null return when a memory allocation fails and this leads to null pointer dereferencing issues. Fix this by adding null pointer checks and returning passing down -ENOMEM errors where necessary. The error checking in the current driver is a bit sparse, so this may need some extra attention later if required. Fixes: f95a29d40782 ("staging: wfx: add HIF commands helpers") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20191221001543.15255-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 25e8a3837d27526b2dcc4ad4e0aed9288a80036d Author: Hans de Goede Date: Mon Dec 16 21:51:22 2019 +0100 drm/i915/dsi: Control panel and backlight enable GPIOs on BYT On Bay Trail devices the MIPI power on/off sequences for DSI LCD panels do not control the LCD panel- and backlight-enable GPIOs. So far, when the VBT indicates we should use the SoC for backlight control, we have been relying on these GPIOs being configured as output and driven high by the Video BIOS (GOP) when it initializes the panel. This does not work when the device is booted with a HDMI monitor connected as then the GOP will initialize the HDMI instead of the panel, leaving the panel black, even though the i915 driver tries to output an image to it. Likewise on some device-models when the GOP does not initialize the DSI panel it also leaves the mux of the PWM0 pin in generic GPIO mode instead of muxing it to the PWM controller. This commit makes the DSI code control the SoC GPIOs for panel- and backlight-enable on BYT, when the VBT indicates the SoC should be used for backlight control. It also ensures that the PWM0 pin is muxed to the PWM controller in this case. This fixes the LCD panel not lighting up on various devices when booted with a HDMI monitor connected. This has been tested to fix this on the following devices: Peaq C1010 Point of View MOBII TAB-P800W Point of View MOBII TAB-P1005W Terra Pad 1061 Yours Y8W81 Reviewed-by: Linus Walleij Reviewed-by: Ville Syrjälä Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20191216205122.1850923-6-hdegoede@redhat.com commit 067d1cf717b8a1d8429f858fbc9b5db71b880e5c Author: Hans de Goede Date: Mon Dec 16 21:51:21 2019 +0100 drm/i915/dsi: Move Crystal Cove PMIC panel GPIO lookup from mfd to the i915 driver Move the Crystal Cove PMIC panel GPIO lookup-table from drivers/mfd/intel_soc_pmic_core.c to the i915 driver. The moved looked-up table is adding a GPIO lookup to the i915 PCI device and the GPIO subsys allows only one lookup table per device, The intel_soc_pmic_core.c code only adds lookup-table entries for the PMIC panel GPIO (as it deals only with the PMIC), but we also need to be able to access some GPIOs on the SoC itself, which requires entries for these GPIOs in the lookup-table. Since the lookup-table is attached to the i915 PCI device it really should be part of the i915 driver, this will also allow us to extend it with GPIOs from other sources when necessary. Acked-by: Linus Walleij Reviewed-by: Andy Shevchenko Reviewed-by: Ville Syrjälä Signed-off-by: Hans de Goede Acked-by: Lee Jones Link: https://patchwork.freedesktop.org/patch/msgid/20191216205122.1850923-5-hdegoede@redhat.com commit 6c0a878ebaa43fc9d8d84ac4eacce9f6a9b974ac Author: Hans de Goede Date: Mon Dec 16 21:51:20 2019 +0100 drm/i915/dsi: Init panel-enable GPIO to low when the LCD is initially off (v2) When the LCD has not been turned on by the firmware/GOP, because e.g. the device was booted with an external monitor connected over HDMI, we should not turn on the panel-enable GPIO when we request it. Turning on the panel-enable GPIO when we request it, means we turn it on too early in the init-sequence, which causes some panels to not correctly light up. This commits adds a panel_is_on parameter to intel_dsi_vbt_gpio_init() and makes intel_dsi_vbt_gpio_init() set the initial GPIO value accordingly. This fixes the panel not lighting up on a Thundersoft TST168 tablet when booted with an external monitor connected over HDMI. Changes in v2: - Call intel_dsi_get_hw_state() to check if the panel is on instead of relying on the current_mode pointer Reviewed-by: Linus Walleij Signed-off-by: Hans de Goede Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191216205122.1850923-4-hdegoede@redhat.com commit ea0fe6725141788ec0bb5a1bcb68d136cb5c6970 Author: Hans de Goede Date: Mon Dec 16 21:51:19 2019 +0100 drm/i915/dsi: Move poking of panel-enable GPIO to intel_dsi_vbt.c On some older devices (BYT, CHT) which may use v2 VBT MIPI-sequences, we need to manually control the panel enable GPIO as v2 sequences do not do this. So far we have been carrying the code to do this on BYT/CHT devices with a Crystal Cove PMIC in vlv_dsi.c, but as this really is a shortcoming of the VBT MIPI-sequences, intel_dsi_vbt.c is a better place for this, so move it there. This is a preparation patch for adding panel-enable and backlight-enable GPIO support for BYT devices where instead of the PMIC the SoC is used for backlight control. Reviewed-by: Linus Walleij Reviewed-by: Ville Syrjälä Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20191216205122.1850923-3-hdegoede@redhat.com commit 5f33771fb0ac484d6e8cc34cb1e27c37442cd0db Author: Namjae Jeon Date: Fri Jan 3 09:13:45 2020 +0800 staging: exfat: add STAGING prefix to config names Add STAGING prefix to config names to avoid collsion with fs/exfat config. Signed-off-by: Namjae Jeon Link: https://lore.kernel.org/r/20200103011345.25245-1-namjae.jeon@samsung.com Signed-off-by: Greg Kroah-Hartman commit 97806d3602efdf78f32beb7c34493518ba150b97 Author: Amir Mahdi Ghorbanian Date: Mon Dec 30 10:55:20 2019 -0500 staging: vt6656: remove unnecessary parenthesis Remove unnecessary parenthesis to abide by kernel coding-style. Signed-off-by: Amir Mahdi Ghorbanian Link: https://lore.kernel.org/r/20191230155520.GA27072@user-ThinkPad-X230 Signed-off-by: Greg Kroah-Hartman commit d1e10852aa63d840dd4d373cd6ab421d3de022d5 Author: Michael Straube Date: Fri Dec 20 18:44:13 2019 +0100 staging: rtl8188eu: use break to exit while loop The variable bContinual in Efuse_PgPacketRead() is only used to break out of a while loop. Remove the variable and use break instead. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191220174413.13913-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit d7a336d67ab5443a0ef14b8335d139e855e8a682 Author: Aditya Pakki Date: Thu Dec 19 11:21:11 2019 -0600 staging: kpc2000: remove unnecessary assertions in kpc_dma_transfer In kpc_dma_transfer(), the assertion that priv is NULL and priv->ldev is NULL, are never satisfied. The two callers of the function, dereference the fields before the function is called. This patch removes the two BUG_ON calls. Signed-off-by: Aditya Pakki Link: https://lore.kernel.org/r/20191219172118.17456-1-pakki001@umn.edu Signed-off-by: Greg Kroah-Hartman commit c9aef213e38cde27d4689a5cbe25a7c1b1db9fad Author: Dilip Kota Date: Fri Jan 3 18:00:18 2020 +0800 reset: intel: Add system reset controller driver Add driver for the reset controller present on Intel Gateway SoCs for performing reset management of the devices present on the SoC. Driver also registers a reset handler to peform the entire device reset. Signed-off-by: Dilip Kota Signed-off-by: Philipp Zabel commit b7ab0cb00d086b690e81589bfb9deccb686a3bda Author: Dilip Kota Date: Fri Jan 3 18:00:17 2020 +0800 dt-bindings: reset: Add YAML schemas for the Intel Reset controller Add YAML schemas for the reset controller on Intel Gateway SoC. Signed-off-by: Dilip Kota Reviewed-by: Rob Herring Signed-off-by: Philipp Zabel commit 0a934343a4bf8aad1df7582a49c34038bc56f72d Author: Jagan Teki Date: Tue Dec 31 18:35:22 2019 +0530 ARM: dts: sun8i: r40: Use tcon top clock index macros tcon_tv0, tcon_tv1 nodes have a clock names of tcon-ch0, tcon-ch1 which are referring tcon_top clocks via index numbers like 0, 1 with CLK_TCON_TV0 and CLK_TCON_TV1 respectively. Use the macro in place of index numbers, for more code readability. Signed-off-by: Jagan Teki Reviewed-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 396c95e8b1385e3dac16d46227f570598b31f0f7 Author: Andre Przywara Date: Thu Jan 2 01:26:56 2020 +0000 ARM: dts: sun8i: R40: Add PMU node The ARM Cortex-A7 cores used in the Allwinner R40 SoC have their usual Performance Monitoring Unit (PMU), which allows perf to use hardware events. The SoC integrator just needs to connect each per-core interrupt line to the GIC. The R40 manual does not really mention those IRQ lines, but experimentation in U-Boot shows that interrupts 152-155 are connected to the four cores (similar to the A20). Tested on a Bananapi M2 Berry, with perf and taskset to confirm the association between cores and interrupts. Signed-off-by: Andre Przywara Signed-off-by: Maxime Ripard commit 7569ac447569b663ff1fc31484162e540fa000ab Author: Andre Przywara Date: Thu Jan 2 01:26:55 2020 +0000 ARM: dts: sun8i: R40: Upgrade GICC reg size to 8K The GIC used in the R40 SoC is an ARM GIC-400 with virtualization support, so let's advertise the full 8K region of the GICC MMIO frame to enable KVM's usage of the GIC (as we do already for all other SoCs). Tested by running KVM on a Bananapi M2 Berry. Signed-off-by: Andre Przywara Signed-off-by: Maxime Ripard commit caf3c0437aaf2e63624c4aaf94c0dd38d1f897e3 Author: Michał Mirosław Date: Fri Jan 3 10:23:48 2020 +0100 ALSA: hda - constify and cleanup static NodeID tables Make hda_nid_t tables static const, as they are not intended to be modified by callees. Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/5150c94101c9534f4c8e987324f6912c16d459f6.1578043216.git.mirq-linux@rere.qmqm.pl Signed-off-by: Takashi Iwai commit b406cadbc84d200f9e9b9492c8de6041fe4b0392 Author: Chen-Yu Tsai Date: Fri Jan 3 15:18:48 2020 +0800 clk: sunxi-ng: r40: Export MBUS clock The MBUS clock needs to be referenced in the MBUS device node. Export it. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 77b9040195dea3fcddf19e136c9e99a501351778 Author: Arnd Bergmann Date: Wed Nov 27 21:25:36 2019 +0100 compat_ioctl: simplify the implementation Now that both native and compat ioctl syscalls are in the same file, a couple of simplifications can be made, bringing the implementation closer together: - do_vfs_ioctl(), ioctl_preallocate(), and compat_ioctl_preallocate() can become static, allowing the compiler to optimize better - slightly update the coding style for consistency between the functions. - rather than listing each command in two switch statements for the compat case, just call a single function that has all the common commands. As a side-effect, FS_IOC_RESVSP/FS_IOC_RESVSP64 are now available to x86 compat tasks, along with FS_IOC_RESVSP_32/FS_IOC_RESVSP64_32. This is harmless for i386 emulation, and can be considered a bugfix for x32 emulation, which never supported these in the past. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit 8ce156deca71808de5884d6cf951688cbf4f4a67 Author: Arnd Bergmann Date: Tue Dec 3 10:57:23 2019 +0100 Documentation: document ioctl interfaces better Documentation/process/botching-up-ioctls.rst was orignally written as a blog post for DRM driver writers, so it it misses some points while going into a lot of detail on others. Try to provide a replacement that addresses typical issues across a wider range of subsystems, and follows the style of the core-api documentation better. Many improvements to the document are suggested by Ben Hutchings , Jonathan Corbet and Geert Uytterhoeven . Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit 2af563d071d63ac820354e4b275478a481845071 Author: Arnd Bergmann Date: Fri Jun 7 10:06:42 2019 +0200 compat_ioctl: move sys_compat_ioctl() to ioctl.c The rest of the fs/compat_ioctl.c file is no longer useful now, so move the actual syscall as planned. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit 9b81648cb5e3ae7296825f0c8d2f98e50631ee84 Author: Arnd Bergmann Date: Fri Nov 29 11:48:31 2019 +0100 compat_ioctl: simplify up block/ioctl.c Having separate implementations of blkdev_ioctl() often leads to these getting out of sync, despite the comment at the top. Since most of the ioctl commands are compatible, and we try very hard not to add any new incompatible ones, move all the common bits into a shared function and leave only the ones that are historically different in separate functions for native/compat mode. To deal with the compat_ptr() conversion, pass both the integer argument and the pointer argument into the new blkdev_common_ioctl() and make sure to always use the correct one of these. blkdev_ioctl() is now only kept as a separate exported interfact for drivers/char/raw.c, which lacks a compat_ioctl variant. We should probably either move raw.c to staging if there are no more users, or export blkdev_compat_ioctl() as well. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit 5fb889f587fa2ae486e067d8a00df955ae6492b3 Author: Arnd Bergmann Date: Thu Nov 28 11:28:41 2019 +0100 compat_ioctl: block: simplify compat_blkpg_ioctl() There is no need to go through a compat_alloc_user_space() copy any more, just wrap the function in a small helper that works the same way for native and compat mode. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit bdc1ddad3e5f385698df150a0cfaaac62b491e7e Author: Arnd Bergmann Date: Fri Nov 29 11:45:30 2019 +0100 compat_ioctl: block: move blkdev_compat_ioctl() into ioctl.c Having both in the same file allows a number of simplifications to the compat path, and makes it more likely that changes to the native path get applied to the compat version as well. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit 1df23c6fe5b0654ece219985a0c32e40b100bd9a Author: Arnd Bergmann Date: Thu Nov 28 17:14:59 2019 +0100 compat_ioctl: move HDIO ioctl handling into drivers/ide Most of the HDIO ioctls are only used by the obsolete drivers/ide subsystem, these can be handled by changing ide_cmd_ioctl() to be aware of compat mode and doing the correct transformations in place and using it as both native and compat handlers for all drivers. The SCSI drivers implementing the same commands are already doing this in the drivers, so the compat_blkdev_driver_ioctl() function is no longer needed now. The BLKSECTSET and HDIO_GETGEO_BIG ioctls are not implemented in any driver any more and no longer need any conversion. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit 75c0b0e118b929cb8bad8ce1ab4c8be8a76c45e2 Author: Arnd Bergmann Date: Sat Nov 30 20:28:12 2019 +0100 compat_ioctl: scsi: handle HDIO commands from drivers The ata_sas_scsi_ioctl() function implements a number of HDIO_* commands for SCSI devices, it is used by all libata drivers as well as a few drivers that support SAS attached SATA drives. The only command that is not safe for compat ioctls here is HDIO_GET_32BIT. Change the implementation to check for in_compat_syscall() in order to do both cases correctly, and change all callers to use it as both native and compat callback pointers, including the indirect callers through sas_ioctl and ata_scsi_ioctl. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit 64cbfa96551a1511b9babef06afa06a1c6c4e8f5 Author: Arnd Bergmann Date: Thu Nov 28 15:55:17 2019 +0100 compat_ioctl: move cdrom commands into cdrom.c There is no need for the special cases for the cdrom ioctls any more now, so make sure that each cdrom driver has a .compat_ioctl() callback and calls cdrom_compat_ioctl() directly there. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit d320a9551e394cb2d842fd32d28e9805c2a18fbb Author: Arnd Bergmann Date: Fri Mar 15 17:39:44 2019 +0100 compat_ioctl: scsi: move ioctl handling into drivers Each driver calling scsi_ioctl() gets an equivalent compat_ioctl() handler that implements the same commands by calling scsi_compat_ioctl(). The scsi_cmd_ioctl() and scsi_cmd_blk_ioctl() functions are compatible at this point, so any driver that calls those can do so for both native and compat mode, with the argument passed through compat_ptr(). With this, we can remove the entries from fs/compat_ioctl.c. The new code is larger, but should be easier to maintain and keep updated with newly added commands. Reviewed-by: Ben Hutchings Acked-by: Stefan Hajnoczi Signed-off-by: Arnd Bergmann commit c103d6ee69f93e123dd05e7d307b099b83c0d82c Author: Arnd Bergmann Date: Fri Mar 15 17:26:56 2019 +0100 compat_ioctl: ide: floppy: add handler Rather than relying on fs/compat_ioctl.c, this adds support for a compat_ioctl() callback in the ide-floppy driver directly, which lets it translate the scsi commands. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit fe0da4e5e8c661663297315da0fa47532ca5f362 Author: Arnd Bergmann Date: Fri Mar 15 17:13:06 2019 +0100 compat_ioctl: bsg: add handler bsg_ioctl() calls into scsi_cmd_ioctl() for a couple of generic commands and relies on fs/compat_ioctl.c to handle it correctly in compat mode. Adding a private compat_ioctl() handler avoids that round-trip and lets us get rid of the generic emulation once this is done. Note that bsg implements an SG_IO command that is different from the other drivers and does not need emulation. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit 7eafd1373b6a389b9859660e0d9c6d23a3c8aee5 Author: Arnd Bergmann Date: Fri Mar 15 16:45:16 2019 +0100 compat_ioctl: add scsi_compat_ioctl In order to move the compat handling for SCSI ioctl commands out of fs/compat_ioctl.c into the individual drivers, we need a helper function first to match the native ioctl handler called by sd, sr, st, etc. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit 9452b1a3ed8792e0e8909512ea1d21aefe6cf53f Author: Arnd Bergmann Date: Thu Nov 28 15:48:10 2019 +0100 compat_ioctl: block: handle cdrom compat ioctl in non-cdrom drivers Various block drivers implement the CDROMMULTISESSION, CDROM_GET_CAPABILITY, and CDROMEJECT ioctl commands, relying on the block layer to handle compat_ioctl mode for them. Move this into the drivers directly as a preparation for simplifying the block layer later. When only integer arguments or no arguments are passed, the same handler can be used for .ioctl and .compat_ioctl, and when only pointer arguments are passed, the newly added blkdev_compat_ptr_ioctl can be used. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit ab8bc5417d8cf62a5fc515737b391689573e7fb3 Author: Arnd Bergmann Date: Mon Dec 9 16:33:16 2019 +0100 compat_ioctl: cdrom: handle CDROM_LAST_WRITTEN This is the only ioctl command that does not have a proper compat handler. Making the normal implementation do the right thing is actually very simply, so just do that by using an in_compat_syscall() check to avoid the special case in the pkcdvd driver. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit 8f8f562038c188046d683e2b650f7731739869dd Author: Arnd Bergmann Date: Thu Nov 28 14:20:53 2019 +0100 compat_ioctl: move CDROMREADADIO to cdrom.c Again, there is only one file that needs this, so move the conversion handler into the native implementation. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit f3ee6e63a9df460963bc51a40891cd9b067404f3 Author: Arnd Bergmann Date: Thu Nov 28 13:44:48 2019 +0100 compat_ioctl: move CDROM_SEND_PACKET handling into scsi There is only one implementation of this ioctl, so move the handling out of the common block layer code into the place where it's actually needed. It also gets called indirectly through pktcdvd, which needs to be aware of this change. As I noticed, the old implementation of the compat handler failed to convert the structure on the way out, so the updated fields never got written back to user space. This is either not important, or it has never worked and should be fixed now. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit ab0cf1e425eaa25a1ead68edc69d8644dfae7745 Author: Arnd Bergmann Date: Sat Nov 30 20:09:07 2019 +0100 compat_ioctl: ubd, aoe: use blkdev_compat_ptr_ioctl These drivers implement the HDIO_GET_IDENTITY and CDROMVOLREAD ioctl commands, which are compatible between 32-bit and 64-bit user space and traditionally handled by compat_blkdev_driver_ioctl(). As a prerequisite to removing that function, make both drivers use blkdev_compat_ptr_ioctl() as their .compat_ioctl callback. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit ee6a129dffe10ae30b45b5a744e7c0a056291d13 Author: Arnd Bergmann Date: Thu Nov 28 15:48:10 2019 +0100 compat_ioctl: block: add blkdev_compat_ptr_ioctl A lot of block drivers need only a trivial .compat_ioctl callback. Add a helper function that can be set as the callback pointer to only convert the argument using the compat_ptr() conversion and otherwise assume all input and output data is compatible, or handled using in_compat_syscall() checks. This mirrors the compat_ptr_ioctl() helper function used in character devices. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit 78ed001d9e7106171e0ee761cd854137dd731302 Author: Arnd Bergmann Date: Wed Dec 4 09:35:00 2019 +0100 compat: scsi: sg: fix v3 compat read/write interface In the v5.4 merge window, a cleanup patch from Al Viro conflicted with my rework of the compat handling for sg.c read(). Linus Torvalds did a correct merge but pointed out that the resulting code is still unsatisfactory. I later noticed that the sg_new_read() function still gets the compat mode wrong, when the 'count' argument is large enough to pass a compat_sg_io_hdr object, but not a nativ sg_io_hdr. To address both of these, move the definition of compat_sg_io_hdr into a scsi/sg.h to make it visible to sg.c and rewrite the logic for reading req_pack_id as well as the size check to a simpler version that gets the expected results. Fixes: c35a5cfb4150 ("scsi: sg: sg_read(): simplify reading ->pack_id of userland sg_io_hdr_t") Fixes: 98aaaec4a150 ("compat_ioctl: reimplement SG_IO handling") Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit 202bf8d7583f2b6e28de2e9edf6fcd7e3667a173 Author: Arnd Bergmann Date: Thu Dec 12 18:15:25 2019 +0100 compat: provide compat_ptr() on all architectures In order to avoid needless #ifdef CONFIG_COMPAT checks, move the compat_ptr() definition to linux/compat.h where it can be seen by any file regardless of the architecture. Only s390 needs a special definition, this can use the self-#define trick we have elsewhere. Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit 556d687a4ccd54ab50a721ddde42c820545effd9 Author: Arnd Bergmann Date: Mon Dec 9 16:16:20 2019 +0100 compat: ARM64: always include asm-generic/compat.h In order to use compat_* type defininitions in device drivers outside of CONFIG_COMPAT, move the inclusion of asm-generic/compat.h ahead of the #ifdef. All other architectures already do this. Acked-by: Will Deacon Reviewed-by: Ben Hutchings Signed-off-by: Arnd Bergmann commit f349710e413ad29132373e170c87dd35f2b62069 Author: Ard Biesheuvel Date: Mon Dec 9 15:59:28 2019 +0100 optee: model OP-TEE as a platform device/driver To simplify adding ACPI support to the OP-TEE driver, model it as a platform driver. This will permit us to use the generic device property layer for parsing additional properties, regardless of whether DT or ACPI is being used. Note that this change will result in the OP-TEE driver to be loaded automatically on systems that advertise the presence of OP-TEE via the device tree. Acked-by: Sumit Garg Signed-off-by: Ard Biesheuvel Signed-off-by: Jens Wiklander commit 88e540a8764ec0f5fb4a1185fbeb7827fefd3601 Author: Takashi Iwai Date: Fri Jan 3 09:17:14 2020 +0100 ALSA: pci: Constify snd_pci_quirk tables The snd_pci_quirk tables are referred as read-only, hence they can be declared as const gracefully. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-59-tiwai@suse.de Signed-off-by: Takashi Iwai commit a5dc05e466b054722817e09e9e2867b2c373f570 Author: Takashi Iwai Date: Fri Jan 3 09:17:13 2020 +0100 ALSA: hda: Constify snd_pci_quirk tables The snd_pci_quirk tables are referred as read-only, hence they can be declared as const gracefully. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-58-tiwai@suse.de Signed-off-by: Takashi Iwai commit fb537cd0089db62190405e5ec43ce4740e65f330 Author: Takashi Iwai Date: Fri Jan 3 09:17:12 2020 +0100 ALSA: fm801: Constify snd_fm801_tea575x_gpios The snd_fm801_tea575x_gpios table is referred as read-only, hence it can be declared as const gracefully. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-57-tiwai@suse.de Signed-off-by: Takashi Iwai commit cd6e03122be08fd6d2af0445d5f2527563d6bf49 Author: Takashi Iwai Date: Fri Jan 3 09:17:11 2020 +0100 ALSA: es1968: Constify snd_es1968_tea575x_gpios The snd_es1968_tea575x_gpios table is referred as read-only, hence it can be declared as const gracefully. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-56-tiwai@suse.de Signed-off-by: Takashi Iwai commit c274d967cee5859c91c200905f038cac84ebd464 Author: Takashi Iwai Date: Fri Jan 3 09:17:10 2020 +0100 ALSA: emu10k1: Constify snd_emu_chip_details The snd_emu_chip_details definitions are referred as read-only, hence they can be declared as const gracefully. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-55-tiwai@suse.de Signed-off-by: Takashi Iwai commit baa9df207a8f9e0377ef26a262e29b9342e45738 Author: Takashi Iwai Date: Fri Jan 3 09:17:09 2020 +0100 ALSA: bt87x: Constify snd_bt87x_boards The snd_bt87x_boards array is referred as read-only, hence it can be declared as const gracefully. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-54-tiwai@suse.de Signed-off-by: Takashi Iwai commit 87065d3d946bf116a639f3bd88ebbd3f3938cffb Author: Takashi Iwai Date: Fri Jan 3 09:17:08 2020 +0100 ALSA: seq: oss: Constify snd_seq_oss_callback definitions The snd_seq_oss_callback items are just copied to another struct as-is, hence they can be declared as const. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-53-tiwai@suse.de Signed-off-by: Takashi Iwai commit 49624472a90b0f50f20389e0896e2eb53ea71b5e Author: Takashi Iwai Date: Fri Jan 3 09:17:07 2020 +0100 ALSA: usx2y: Constify struct snd_usb_audio_quirk entries The quirk entries used in us122l and usx2y drivers can be declared as const as they are read-only. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-52-tiwai@suse.de Signed-off-by: Takashi Iwai commit 37cc306b723f94d2be73578069ed1e88e1a30cdb Author: Takashi Iwai Date: Fri Jan 3 09:17:06 2020 +0100 ALSA: line6: Constify snd_ratden definitions The snd_ratden definitions used in line6 drivers are all read-only, so they can be marked as const. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-51-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4f8ce9821ecd3aca758a52f7dbb6146b8bdcb71c Author: Takashi Iwai Date: Fri Jan 3 09:17:05 2020 +0100 ALSA: ice1712: Constify wm-specific tables The tables defined in wm8766.c and wm8776.c are referred as read-only, hence they can be declared as const gracefully. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-50-tiwai@suse.de Signed-off-by: Takashi Iwai commit aeb0215c76990efcc0c3d6b11e130d176c040ff9 Author: Takashi Iwai Date: Fri Jan 3 09:17:04 2020 +0100 ALSA: ice17xx: Constify snd_ice1712_card_info The snd_ice1712_card_info objects are referred only as read-only. Let's make them const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-49-tiwai@suse.de Signed-off-by: Takashi Iwai commit dc6ffaf82899d459cc486dff88e57133e03d9e28 Author: Takashi Iwai Date: Fri Jan 3 09:17:03 2020 +0100 ALSA: ca0106: Constify snd_ca0106_details The snd_ca0106_details table entries are referred only as read-only. Let's make them const. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-48-tiwai@suse.de Signed-off-by: Takashi Iwai commit 311840d96fd6f41ce1614bc57068f35169d6a52c Author: Takashi Iwai Date: Fri Jan 3 09:17:02 2020 +0100 ALSA: ca0106: Constify snd_ca0106_category_str items snd_ca0106_con_category array is read-only and can be marked as const. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-47-tiwai@suse.de Signed-off-by: Takashi Iwai commit c0476b980d6cb23d845e4c39f415507915344f22 Author: Takashi Iwai Date: Fri Jan 3 09:17:01 2020 +0100 ALSA: ac97: Constify snd_ac97_res_table definition One snd_ac97_res_table definition remains forgotten without const. Let's add it for a bit of optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-46-tiwai@suse.de Signed-off-by: Takashi Iwai commit fe27463ad867864da1786e209f5d23e10ef17d3b Author: Takashi Iwai Date: Fri Jan 3 09:17:00 2020 +0100 ALSA: opl3: Constify snd_opl3_drum_voice definitions The snd_opl3_drum_voice items are all read-only, hence they can be declared as const. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-45-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1da7f0c570d7356f232aee6528ccf8b2dcd96dcf Author: Takashi Iwai Date: Fri Jan 3 09:16:59 2020 +0100 ALSA: dummy: Constify snd_pcm_ops definitions The snd_pcm_ops items defined in snd-dummy driver can be gracefully declared as const. Let's mark them for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-44-tiwai@suse.de Signed-off-by: Takashi Iwai commit 46708e626d0d768587cf676e55b21e0beb966be6 Author: Takashi Iwai Date: Fri Jan 3 09:16:58 2020 +0100 ALSA: parisc: Constify snd_kcontrol_new items Most of snd_kcontrol_new definitions are read-only and passed as-is. Let's declare them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-43-tiwai@suse.de Signed-off-by: Takashi Iwai commit 195727e8b6a896d898b048e44fdf7ea52d36bd7e Author: Takashi Iwai Date: Fri Jan 3 09:16:57 2020 +0100 ALSA: usb: Constify snd_kcontrol_new items Most of snd_kcontrol_new definitions are read-only and passed as-is. Let's declare them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-42-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1aeb1c7f281ea7b372d5801fda119df73b1be98c Author: Takashi Iwai Date: Fri Jan 3 09:16:56 2020 +0100 ALSA: spi: Constify snd_kcontrol_new items Most of snd_kcontrol_new definitions are read-only and passed as-is. Let's declare them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-41-tiwai@suse.de Signed-off-by: Takashi Iwai commit f8a32d94f31fc9e28732b73602adc072e620e466 Author: Takashi Iwai Date: Fri Jan 3 09:16:55 2020 +0100 ALSA: sparc: Constify snd_kcontrol_new items Most of snd_kcontrol_new definitions are read-only and passed as-is. Let's declare them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-40-tiwai@suse.de Signed-off-by: Takashi Iwai commit c031b0cc77a1bef980eb360e317a6bbd54211326 Author: Takashi Iwai Date: Fri Jan 3 09:16:54 2020 +0100 ALSA: ppc: Constify snd_kcontrol_new items Most of snd_kcontrol_new definitions are read-only and passed as-is. Let's declare them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-39-tiwai@suse.de Signed-off-by: Takashi Iwai commit b4e5e70775546480035e156b40040e5d0d4264d1 Author: Takashi Iwai Date: Fri Jan 3 09:16:53 2020 +0100 ALSA: pci: Constify snd_kcontrol_new items Most of snd_kcontrol_new definitions are read-only and passed as-is. Let's declare them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-38-tiwai@suse.de Signed-off-by: Takashi Iwai commit 35ace5e8410e41df8719ee9fee49312655efa26a Author: Takashi Iwai Date: Fri Jan 3 09:16:52 2020 +0100 ALSA: hda: Constify snd_kcontrol_new items Most of snd_kcontrol_new definitions are read-only and passed as-is. Let's declare them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-37-tiwai@suse.de Signed-off-by: Takashi Iwai commit fdd1f6fd328ff2e3723fe2a5c94378ef6f217edc Author: Takashi Iwai Date: Fri Jan 3 09:16:51 2020 +0100 ALSA: isa: Constify snd_kcontrol_new items Most of snd_kcontrol_new definitions are read-only and passed as-is. Let's declare them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-36-tiwai@suse.de Signed-off-by: Takashi Iwai commit 0da2c47a951c27f1be34cb9221d77b0ed2db6cee Author: Takashi Iwai Date: Fri Jan 3 09:16:50 2020 +0100 ALSA: i2c: Constify snd_kcontrol_new items Most of snd_kcontrol_new definitions are read-only and passed as-is. Let's declare them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-35-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2eccd408037449ac6c1ceba1d74bd10c67dc13d7 Author: Takashi Iwai Date: Fri Jan 3 09:16:49 2020 +0100 ALSA: drivers: Constify snd_kcontrol_new items Most of snd_kcontrol_new definitions are read-only and passed as-is. Let's declare them as const for further optimization. Constify snd_kcontrol_new items There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-34-tiwai@suse.de Signed-off-by: Takashi Iwai commit dde5199c988b16426cf9a4e0df4b7ae06790471e Author: Takashi Iwai Date: Fri Jan 3 09:16:48 2020 +0100 ALSA: aoa: Constify snd_kcontrol_new items Most of snd_kcontrol_new definitions are read-only and passed as-is. Let's declare them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-33-tiwai@suse.de Signed-off-by: Takashi Iwai commit 454f5ec1d2b774b89f3ea759a9a791f320e6f389 Author: Takashi Iwai Date: Fri Jan 3 09:16:47 2020 +0100 ALSA: mixer: oss: Constify snd_mixer_oss_assign_table definition The snd_mixer_oss_assign_table is read-only, and can it be declared as const. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-32-tiwai@suse.de Signed-off-by: Takashi Iwai commit f8ae2d2919481817d2e942617c203fc792687c66 Author: Takashi Iwai Date: Fri Jan 3 09:16:46 2020 +0100 ALSA: vx: Constify snd_vx_hardware and snd_vx_ops definitions Both snd_vx_hardware and snd_vx_ops are only referred without modification, hence they can be constified gracefully for further optimizations. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-31-tiwai@suse.de Signed-off-by: Takashi Iwai commit aad7ebb544072bcb9335fa4eb0fbd1b85a6c495b Author: Takashi Iwai Date: Fri Jan 3 09:16:45 2020 +0100 ALSA: seq: Constify struct snd_midi_op Change the argument of snd_midi_process_event() to receive a const snd_midi_op pointer and its callers respectively. This allows further optimizations. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-30-tiwai@suse.de Signed-off-by: Takashi Iwai commit d25ff26840bd0af3283d8e478669abc104bb873a Author: Takashi Iwai Date: Fri Jan 3 09:16:44 2020 +0100 ALSA: info: Make snd_info_entry_ops as const The reference to snd_info_entry_ops is rather read-only, so declare it as a const pointer. This allows a bit more optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-29-tiwai@suse.de Signed-off-by: Takashi Iwai commit 51055da51d1e92bb089c9b9e0ecb1be69396f808 Author: Takashi Iwai Date: Fri Jan 3 09:16:43 2020 +0100 ALSA: pci: Constify snd_ac97_bus_ops definitions Now snd_ac97_bus() takes the const ops pointer, so we can define the snd_ac97_bus_ops locally as const as well for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-28-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6e6598db079d443c76b808faae542dd4edd52b02 Author: Takashi Iwai Date: Fri Jan 3 09:16:42 2020 +0100 ALSA: drivers: Constify snd_ac97_bus_ops definitions Now snd_ac97_bus() takes the const ops pointer, so we can define the snd_ac97_bus_ops locally as const as well for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-27-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3a3fac8b3b99614d2e4df6b244a313eb5b2716a3 Author: Takashi Iwai Date: Fri Jan 3 09:16:41 2020 +0100 ALSA: atmel: Constify snd_ac97_bus_ops definitions Now snd_ac97_bus() takes the const ops pointer, so we can define the snd_ac97_bus_ops locally as const as well for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-26-tiwai@suse.de Signed-off-by: Takashi Iwai commit 74d2bae3434aef8e63d395559b25988275f81885 Author: Takashi Iwai Date: Fri Jan 3 09:16:40 2020 +0100 ALSA: arm: Constify snd_ac97_bus_ops definitions Now snd_ac97_bus() takes the const ops pointer, so we can define the snd_ac97_bus_ops locally as const as well for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-25-tiwai@suse.de Signed-off-by: Takashi Iwai commit 33c83aaf29f54f948467240dd9a2a7242126e146 Author: Takashi Iwai Date: Fri Jan 3 09:16:39 2020 +0100 ALSA: ac97: Constify snd_ac97_bus_ops definitions Now snd_ac97_bus() takes the const ops pointer, so we can define the snd_ac97_bus_ops locally as const as well for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-24-tiwai@suse.de Signed-off-by: Takashi Iwai commit 19260818a9747768b09c1c1f10b4125b4d00595e Author: Takashi Iwai Date: Fri Jan 3 09:16:38 2020 +0100 ALSA: ac97: Treat snd_ac97_bus_ops as const This is a preliminary patch to allow const for snd_ac97_bus_ops definitions in each driver's code. The ops reference is read-only, hence it can be declared as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-23-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5ff16a3d48ef58be8fd93035ae9272d4cc990c49 Author: Takashi Iwai Date: Fri Jan 3 09:16:37 2020 +0100 ALSA: Constify snd_timer_hardware definitions Most of snd_timer_hardware definitions do simply copying to another struct as-is. Mark them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-22-tiwai@suse.de Signed-off-by: Takashi Iwai commit df76996a2c5369769b23a017b6303f7ecacb277b Author: Takashi Iwai Date: Fri Jan 3 09:16:36 2020 +0100 ALSA: timer: Constify snd_timer_hardware definitions Most of snd_timer_hardware definitions do simply copying to another struct as-is. Mark them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-21-tiwai@suse.de Signed-off-by: Takashi Iwai commit e382d7fcfc3ff21c8ba97a29bd451a289f57b757 Author: Takashi Iwai Date: Fri Jan 3 09:16:35 2020 +0100 ALSA: docs: Constify snd_device_ops definitions Update the documentation for adding the const prefix to snd_device_ops definitions as well. Link: https://lore.kernel.org/r/20200103081714.9560-20-tiwai@suse.de Signed-off-by: Takashi Iwai commit c3b53df3d00848936b286c41fae09cf9a5192ce0 Author: Takashi Iwai Date: Fri Jan 3 09:16:34 2020 +0100 ALSA: spi: Constify snd_device_ops definitions Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-19-tiwai@suse.de Signed-off-by: Takashi Iwai commit 52b136d24842b3e7dfd6ed10d349841a90c754ac Author: Takashi Iwai Date: Fri Jan 3 09:16:33 2020 +0100 ALSA: sh: Constify snd_device_ops definitions Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-18-tiwai@suse.de Signed-off-by: Takashi Iwai commit b75851d43d73c68f302d7c11dc3ae23598c57990 Author: Takashi Iwai Date: Fri Jan 3 09:16:32 2020 +0100 ALSA: sparc: Constify snd_device_ops definitions Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-17-tiwai@suse.de Signed-off-by: Takashi Iwai commit 46dd47c106f11587cf5887710765868e5bb53ce6 Author: Takashi Iwai Date: Fri Jan 3 09:16:31 2020 +0100 ALSA: ppc: Constify snd_device_ops definitions Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-16-tiwai@suse.de Signed-off-by: Takashi Iwai commit 0326564d725f441617139ea5e862bf82a527dd08 Author: Takashi Iwai Date: Fri Jan 3 09:16:30 2020 +0100 ALSA: pcmcia: Constify snd_device_ops definitions Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-15-tiwai@suse.de Signed-off-by: Takashi Iwai commit 65341589599a17465c25ae760e9b317b3596eb8c Author: Takashi Iwai Date: Fri Jan 3 09:16:29 2020 +0100 ALSA: parisc: Constify snd_device_ops definitions Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-14-tiwai@suse.de Signed-off-by: Takashi Iwai commit 35a76585c6386115c065ebdda906f9a65a1b75ce Author: Takashi Iwai Date: Fri Jan 3 09:16:28 2020 +0100 ALSA: mips: Constify snd_device_ops definitions Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-13-tiwai@suse.de Signed-off-by: Takashi Iwai commit e6f2a617ac53bc0753b885ffb94379ff48b2e2df Author: Takashi Iwai Date: Fri Jan 3 09:16:27 2020 +0100 ALSA: aoa: Constify snd_device_ops definitions Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-12-tiwai@suse.de Signed-off-by: Takashi Iwai commit c0a142e21bbaeddc9e0ed00045e0ac6c841f1769 Author: Takashi Iwai Date: Fri Jan 3 09:16:26 2020 +0100 ALSA: usb: Constify snd_device_ops definitions Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-11-tiwai@suse.de Signed-off-by: Takashi Iwai commit efb0ad25d370344e61bb4fca8c3b9c3c6047922e Author: Takashi Iwai Date: Fri Jan 3 09:16:25 2020 +0100 ALSA: pci: Constify snd_device_ops definitions Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-10-tiwai@suse.de Signed-off-by: Takashi Iwai commit 41f394a8d80766a0d8d2cc8879c3a295be951f6c Author: Takashi Iwai Date: Fri Jan 3 09:16:24 2020 +0100 ALSA: hda: Constify snd_device_ops definitions Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-9-tiwai@suse.de Signed-off-by: Takashi Iwai commit 99f664df4fead60e31d96cc2b5044c9b2fee0767 Author: Takashi Iwai Date: Fri Jan 3 09:16:23 2020 +0100 ALSA: isa: Constify snd_device_ops definitions Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-8-tiwai@suse.de Signed-off-by: Takashi Iwai commit d23015c12144736bbea6dbd0fdd8dcae3d1e47c5 Author: Takashi Iwai Date: Fri Jan 3 09:16:22 2020 +0100 ALSA: i2c: Constify snd_device_ops definitions Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-7-tiwai@suse.de Signed-off-by: Takashi Iwai commit 34273b234c0712c963f02845919125686f503d3e Author: Takashi Iwai Date: Fri Jan 3 09:16:21 2020 +0100 ALSA: drivers: Constify snd_device_ops definitions Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit f15ee210cdb87f82147df237d2fcfc4527523d62 Author: Takashi Iwai Date: Fri Jan 3 09:16:20 2020 +0100 ALSA: core: Constify snd_device_ops definitions Now we may declare const for snd_device_ops definitions, so let's do it for optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8b575824304dd18a90616cbcf0f81ca1ed1fb5d2 Author: Takashi Iwai Date: Fri Jan 3 09:16:19 2020 +0100 ALSA: core: Treat snd_device_ops as const This is a preliminary patch to allow const for snd_device_ops definitions in each driver's code. The ops reference is read-only, hence it can be declared as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2ead9d087fe2eafecf801dd2ab83bdb66dc08ced Author: Takashi Iwai Date: Fri Jan 3 09:16:18 2020 +0100 ALSA: usb: Constify snd_pcm_hardware definitions Most of snd_pcm_hardware definitions are just copied to another object as-is, hence we can define them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit c1c3981fa16688e02f629a4805c9188679b132e9 Author: Takashi Iwai Date: Fri Jan 3 09:16:17 2020 +0100 ALSA: pci: Constify snd_pcm_hardware definitions Most of snd_pcm_hardware definitions are just copied to another object as-is, hence we can define them as const for further optimization. There should be no functional changes by this patch. Link: https://lore.kernel.org/r/20200103081714.9560-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1d39387ce8594988a079a1f2617ea137702c7b2f Author: Ding Xiang Date: Tue Sep 10 17:26:56 2019 +0800 fpga: remove redundant dev_err message devm_ioremap_resource already contains error message, so remove the redundant dev_err message Signed-off-by: Ding Xiang Signed-off-by: Moritz Fischer commit 9bc65970bb037d3197083b205d27855ffd0f14f2 Author: yu kuai Date: Thu Dec 26 20:15:33 2019 +0800 fpga: dfl: afu: remove set but not used variable 'afu' Fixes gcc '-Wunused-but-set-variable' warning: drivers/fpga/dfl-afu-main.c: In function ‘afu_dev_destroy’: drivers/fpga/dfl-afu-main.c:816:18: warning: variable ‘afu’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Acked-by: Wu Hao Signed-off-by: yu kuai Signed-off-by: Moritz Fischer commit 8082c51ac34d05258ac80de47eab1a5d727bb5d2 Author: yu kuai Date: Thu Dec 26 20:16:38 2019 +0800 fpga: dfl: fme: remove set but not used variable 'fme' Fixes gcc '-Wunused-but-set-variable' warning: drivers/fpga/dfl-fme-main.c: In function ‘fme_dev_destroy’: drivers/fpga/dfl-fme-main.c:678:18: warning: variable ‘fme’ set but not used [-Wunused-but-set-variable] It is never used and so can be removed. Acked-by: Wu Hao Signed-off-by: yu kuai Signed-off-by: Moritz Fischer commit c53cf10ef6d9faeee9baa1fab824139c6f10a134 Author: Sreekanth Reddy Date: Thu Dec 26 06:13:33 2019 -0500 scsi: mpt3sas: Update drive version to 33.100.00.00 Update mpt3sas driver version from 32.100.00.00 to 33.100.00.00 Link: https://lore.kernel.org/r/20191226111333.26131-11-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit c50ed99cd56ee725d9e14dffec8e8f1641b8ca30 Author: Sreekanth Reddy Date: Thu Dec 26 06:13:32 2019 -0500 scsi: mpt3sas: Remove usage of device_busy counter Remove usage of device_busy counter from driver. Instead of device_busy counter now driver uses 'nr_active' counter of request_queue to get the number of inflight request for a LUN. Link: https://lore.kernel.org/r/20191226111333.26131-10-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit c6bdb6a10892d1130638a5e28d1523a813e45d5e Author: Sreekanth Reddy Date: Thu Dec 26 06:13:31 2019 -0500 scsi: mpt3sas: Print function name in which cmd timed out Print the function name in which MPT command got timed out. This will facilitate debugging in which path corresponding MPT command got timeout in first failure instance of log itself. Link: https://lore.kernel.org/r/20191226111333.26131-9-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 5b061980e362820894d7d884370b37005bed23ec Author: Sreekanth Reddy Date: Thu Dec 26 06:13:30 2019 -0500 scsi: mpt3sas: Optimize mpt3sas driver logging This improves mpt3sas driver default debug information collection and allows for a higher percentage of issues being able to be resolved with a first-time data capture. However, this improvement to balance the amount of debug data captured with the performance of driver. Enabled below print messages with out affecting the IO performance, 1. When task abort TM is received then print IO commands's timeout value and how much time this command has been outstanding. 2. Whenever hard reset occurs then print from where this hard reset has been issued. 3. Failure message should be displayed for failure scenarios without any logging level. 4. Added a print after driver successfully register or unregistered a target drive with the SML. This print will be useful for debugging the issue where the drive addition or deletion is hanging at SML. 5. During driver load time print request, reply, sense and config page pool's information such as its address, length and size. Also printed sg_tablesize information. Link: https://lore.kernel.org/r/20191226111333.26131-8-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit c59777189433621392f6f5c82ecfc62f00a1232d Author: Sreekanth Reddy Date: Thu Dec 26 06:13:29 2019 -0500 scsi: mpt3sas: print in which path firmware fault occurred When Firmware fault occurs then print in which path firmware fault has occurred. This will be useful while debugging the firmware fault issues. Link: https://lore.kernel.org/r/20191226111333.26131-7-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit fce0aa08792b3ae725395fa25d44507dee0b603b Author: Sreekanth Reddy Date: Thu Dec 26 06:13:28 2019 -0500 scsi: mpt3sas: Handle CoreDump state from watchdog thread Watchdog thread polls for IOC state every 1 second. If it detects that IOC state is in CoreDump state then it immediately stops the IOs and also clears the outstanding commands issued to the HBA firmware and then it will poll for IOC state to be out of CoreDump state and once it detects that IOC state is changed from CoreDump state to Fault state (or) CoreDumpTOSec number of seconds are elapsed then it will issue host reset operation and moves the IOC state to Operational state and resumes the IOs. Whenever any TM is received from SML then if driver detects the IOC state is in CoreDump state then it will wait for CoreDump state to be cleared and will host reset operation. Link: https://lore.kernel.org/r/20191226111333.26131-6-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit e8c2307e6a690db9aaff84153b2857c5c4dfd969 Author: Sreekanth Reddy Date: Thu Dec 26 06:13:27 2019 -0500 scsi: mpt3sas: Add support IOCs new state named COREDUMP New feature is added in HBA firmware where it copies the collected firmware logs in flash region named 'CoreDump' whenever HBA firmware faults occur. For copying the logs to CoreDump flash region firmware needs some time and hence it has introduced a new IOC state named "CoreDump" State. Whenever driver detects the CoreDump state then it means that some firmware fault has occurred and firmware is copying the logs to the coredump flash region. During this time driver should not perform any operation with the HBA, driver should wait for HBA firmware to move the IOC state from 'CoreDump' state to 'Fault' state once it's done with copying the logs to coredump region. Once driver detects the Fault state then it will issue the diag reset/host reset operation to move the IOC state from Fault to Operational state. Here the valid IOC state transactions w.r.t to this CoreDump state feature, Operational -> Fault: The IOC transitions to the Fault state when an operational error occurs AND CoreDump is not supported (or disabled) by the firmware(FW). Operational -> CoreDump: The IOC transitions to the CoreDump state when an operational error occurs AND CoreDump is supported & enabled by the FW. CoreDump -> Fault: A transition from CoreDump state to Fault state happens when the FW completes the CoreDump collection. CoreDump -> Reset: A transition out of the CoreDump state happens when the host sets the Reset Adapter bit in the System Diagnostic Register (Hard Reset). This reset action indicates that CoreDump took longer than the host time out. Firmware informs the driver about the maximum time that driver has to wait for firmware to transition the IOC state from 'CoreDump' to 'FAULT' state through 'CoreDumpTOSec' field of ManufacturingPage11 page. if this 'CoreDumpTOSec' field value is zero then driver will wait for max 15 seconds. Driver informs the HBA firmware that it supports this new IOC state named 'CoreDump' state by enabling COREDUMP_ENABLE flag in ConfigurationFlags field of ioc init request message. Current patch handles the CoreDump state only during HBA initialization and release scenarios where watchdog thread (which polls the IOC state in every one second) is disabled. Next subsequent patch handle the CoreDump state when watchdog thread is enabled. During HBA initialization or release execution time if driver detects the CoreDump state then driver will wait for maximum CoreDumpTOSec value seconds for FW to copy the logs. After that it will issue the diag reset operation to move the IOC state to Operational state. Link: https://lore.kernel.org/r/20191226111333.26131-5-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 36c6c7f75b0998f5a4b5c79cbb94ee1ab4ee35c0 Author: Sreekanth Reddy Date: Thu Dec 26 06:13:26 2019 -0500 scsi: mpt3sas: renamed _base_after_reset_handler function Renamed _base_after_reset_handler function to _base_clear_outstanding_commands so that it can be used in multiple scenarios with suitable name which matches with the operation it does. Also renamed its child functions. No functional changes. Link: https://lore.kernel.org/r/20191226111333.26131-4-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit d3f623ae8e0323ca434ee9029100312a8be37773 Author: Sreekanth Reddy Date: Thu Dec 26 06:13:25 2019 -0500 scsi: mpt3sas: Add support for NVMe shutdown Introduce function _scsih_nvme_shutdown() to issue IO Unit Control message to IOC firmware with operation code 'shutdown'. This causes IOC firmware to issue NVMe shutdown commands to all NVMe drives attached to it. NVMe Shutdown: NVMe devices need to have a specific shutdown sequence performed before power is removed. For this, the IOC firmware needs to be notified when the system is being shutdown. So during the system shutdown time, driver issues an IO Unit Control request with operation code MPI26_CTRL_OP_SHUTDOWN to inform firmware that a shutdown is initiated. This shutdown command is issued only if NVMe devices are attached to the controller. During each NVMe device addition, driver reads pcie device page2 to get shutdown latency (e.g. drive's RTD3 Entry Latency) and updates the max latency value among the added NVMe drives in ioc->max_shutdown_latency. This is used as the timeout value for IO Unit Control command at the time of shutdown. When a NVMe drive is removed and its shutdown latency matches which ioc->max_shutdown_latency then ioc->max_shutdown_latency is updated to next max value (by iterating over the list of available devices). If the shutdown latency is 0, then default timeout is set to six seconds. Link: https://lore.kernel.org/r/20191226111333.26131-3-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 1ade26b616cc2da0b7277a97e3799c99bae0655b Author: Sreekanth Reddy Date: Thu Dec 26 06:13:24 2019 -0500 scsi: mpt3sas: Update MPI Headers to v02.00.57 Update MPI Headers to version 02.00.57. Link: https://lore.kernel.org/r/20191226111333.26131-2-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 5d74e18edd7bdb1fcc35bd115af720ebfb8c5cf0 Author: Stanley Chu Date: Mon Dec 30 13:32:30 2019 +0800 scsi: ufs-mediatek: configure and enable clk-gating Enable clk-gating with customized delayed timer value in MediaTek Chipsets. Cc: Alim Akhtar Cc: Avri Altman Cc: Bart Van Assche Cc: Bean Huo Cc: Can Guo Cc: Florian Fainelli Cc: Matthias Brugger Link: https://lore.kernel.org/r/1577683950-1702-7-git-send-email-stanley.chu@mediatek.com Reviewed-by: Alim Akhtar Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 8588c6b032176feb5fcef8f56a1140feded5d6c4 Author: Stanley Chu Date: Mon Dec 30 13:32:29 2019 +0800 scsi: ufs-mediatek: configure customized auto-hibern8 timer Configure customized auto-hibern8 timer in MediaTek Chipsets. Cc: Alim Akhtar Cc: Avri Altman Cc: Bart Van Assche Cc: Bean Huo Cc: Can Guo Cc: Florian Fainelli Cc: Matthias Brugger Link: https://lore.kernel.org/r/1577683950-1702-6-git-send-email-stanley.chu@mediatek.com Reviewed-by: Alim Akhtar Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit ba7af5ec5126dca17cdc8cfdb6740cdfb4bad70c Author: Stanley Chu Date: Mon Dec 30 13:32:28 2019 +0800 scsi: ufs: export ufshcd_auto_hibern8_update for vendor usage Export ufshcd_auto_hibern8_update to allow vendors to use common interface to customize auto-hibernate timer. Cc: Alim Akhtar Cc: Avri Altman Cc: Bart Van Assche Cc: Bean Huo Cc: Can Guo Cc: Florian Fainelli Cc: Matthias Brugger Link: https://lore.kernel.org/r/1577683950-1702-5-git-send-email-stanley.chu@mediatek.com Reviewed-by: Asutosh Das Reviewed-by: Alim Akhtar Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 97347214bce8d740ce4d64e22783b50384cd2e6f Author: Stanley Chu Date: Mon Dec 30 13:32:27 2019 +0800 scsi: ufs-mediatek: introduce reference clock control Introduce reference clock control in MediaTek Chipset in order to disable it if it is not necessary by UFS device to save system power. Currently reference clock can be disabled during system suspend, runtime suspend and clock-gating after link enters hibernate state. Cc: Alim Akhtar Cc: Avri Altman Cc: Bart Van Assche Cc: Bean Huo Cc: Can Guo Cc: Florian Fainelli Cc: Matthias Brugger Link: https://lore.kernel.org/r/1577683950-1702-4-git-send-email-stanley.chu@mediatek.com Reviewed-by: Alim Akhtar Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit b0d077ed389cb75b95396886517664c2500b0c10 Author: Stanley Chu Date: Mon Dec 30 13:32:26 2019 +0800 scsi: ufs-mediatek: add device reset implementation Add device reset vops implementation in MediaTek UFS driver. Cc: Alim Akhtar Cc: Avri Altman Cc: Bart Van Assche Cc: Bean Huo Cc: Can Guo Cc: Florian Fainelli Cc: Matthias Brugger Link: https://lore.kernel.org/r/1577683950-1702-3-git-send-email-stanley.chu@mediatek.com Reviewed-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit fef093ff7e9654eec77e79b8170485241f01d027 Author: Stanley Chu Date: Mon Dec 30 13:32:25 2019 +0800 scsi: soc: mediatek: add header for SiP service interface Add a common header for the SiP service interface in MediaTek Chipsets. Cc: Alim Akhtar Cc: Avri Altman Cc: Bart Van Assche Cc: Bean Huo Cc: Can Guo Cc: Florian Fainelli Cc: Matthias Brugger Link: https://lore.kernel.org/r/1577683950-1702-2-git-send-email-stanley.chu@mediatek.com Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 6ee090ea04834d70c1fcd9f0e22fe8f91a3d0512 Author: Nishad Kamdar Date: Sat Dec 28 11:26:46 2019 +0530 scsi: ufs: sysfs: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related to UFS Host Controller. It assigns explicit block comment to the SPDX License Identifier. Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Link: https://lore.kernel.org/r/5ca6287665fe52d8f40062e0eab8561d2b7a5b40.1577511720.git.nishadkamdar@gmail.com Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Martin K. Petersen commit fae35c14c4b6f312903ecc19597c26abdb7a14fc Author: Nishad Kamdar Date: Sat Dec 28 11:25:38 2019 +0530 scsi: mylex: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header files related to Mylex DAC960/DAC1100 PCI RAID Controllers. It assigns explicit block comment to the SPDX License Identifier. Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Link: https://lore.kernel.org/r/88332ad390f985bdebb9f2adaf2d499b0a639753.1577511720.git.nishadkamdar@gmail.com Suggested-by: Joe Perches Reviewed-by: Hannes Reinecke Signed-off-by: Nishad Kamdar Signed-off-by: Martin K. Petersen commit 0dd0dec1677e0838f1c7a0f85f9053eab5b28d40 Author: Bart Van Assche Date: Tue Dec 24 14:02:48 2019 -0800 scsi: ufs: Remove the SCSI timeout handler The UFS SCSI timeout handler was needed to compensate that ufshcd_queuecommand() could return SCSI_MLQUEUE_HOST_BUSY for a long time. Commit a276c19e3e98 ("scsi: ufs: Avoid busy-waiting by eliminating tag conflicts") fixed this so the timeout handler is no longer necessary. See also commit f550c65b543b ("scsi: ufs: implement scsi host timeout handler"). Cc: Bean Huo Cc: Can Guo Cc: Avri Altman Cc: Stanley Chu Cc: Tomas Winkler Link: https://lore.kernel.org/r/20191224220248.30138-7-bvanassche@acm.org Reviewed-by: Can Guo Reviewed-by: Alim Akhtar Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit eacf36f5bebde5089dddb3d5bfcbeab530b01f8a Author: Bart Van Assche Date: Tue Dec 24 14:02:46 2019 -0800 scsi: ufs: Fix a race condition in the tracing code Starting execution of a command before tracing a command may cause the completion handler to free data while it is being traced. Fix this race by tracing a command before it is submitted. Cc: Bean Huo Cc: Can Guo Cc: Avri Altman Cc: Stanley Chu Cc: Tomas Winkler Link: https://lore.kernel.org/r/20191224220248.30138-5-bvanassche@acm.org Reviewed-by: Alim Akhtar Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 1b21b8f008c156686079c4c2b207c4a28a0a769d Author: Bart Van Assche Date: Tue Dec 24 14:02:45 2019 -0800 scsi: ufs: Make ufshcd_prepare_utp_scsi_cmd_upiu() easier to read Since the lrbp->cmd expression occurs multiple times, introduce a new local variable to hold that pointer. This patch does not change any functionality. Cc: Bean Huo Cc: Can Guo Cc: Avri Altman Cc: Stanley Chu Cc: Tomas Winkler Link: https://lore.kernel.org/r/20191224220248.30138-4-bvanassche@acm.org Reviewed-by: Stanley Chu Reviewed-by: Can Guo Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit e4d2add7fd5bc64ee3e388eabe6b9e081cb42e11 Author: Bart Van Assche Date: Tue Dec 24 14:02:44 2019 -0800 scsi: ufs: Make ufshcd_add_command_trace() easier to read Since the lrbp->cmd expression occurs multiple times, introduce a new local variable to hold that pointer. This patch does not change any functionality. Cc: Bean Huo Cc: Can Guo Cc: Avri Altman Cc: Stanley Chu Cc: Tomas Winkler Link: https://lore.kernel.org/r/20191224220248.30138-3-bvanassche@acm.org Reviewed-by: Stanley Chu Reviewed-by: Can Guo Reviewed-by: Alim Akhtar Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 68c9fcfd4a0eb0cf65e390ee834ba1ef777b835e Author: Bart Van Assche Date: Tue Dec 24 14:02:43 2019 -0800 scsi: ufs: Fix indentation in ufshcd_query_attr_retry() Remove a space that occurs after a tab. Cc: Bean Huo Cc: Can Guo Cc: Avri Altman Cc: Stanley Chu Cc: Tomas Winkler Link: https://lore.kernel.org/r/20191224220248.30138-2-bvanassche@acm.org Reviewed-by: Stanley Chu Reviewed-by: Can Guo Reviewed-by: Alim Akhar Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 7c486d91f3d1913a9a6487301ad0ce290bbed9dd Author: Stanley Chu Date: Tue Dec 24 21:01:06 2019 +0800 scsi: ufs: use ufshcd_vops_dbg_register_dump for vendor specific dumps We already have ufshcd_vops_dbg_register_dump() thus all "hba->vops->dbg_register_dump" references can be replaced by it. Link: https://lore.kernel.org/r/1577192466-20762-3-git-send-email-stanley.chu@mediatek.com Reviewed-by: Bart Van Assche Reviewed-by: Can Guo Reviewed-by: Alim Akhtar Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 03e1d28edda119185ac24391ca46468ec32fe050 Author: Stanley Chu Date: Tue Dec 24 21:01:05 2019 +0800 scsi: ufs: unify scsi_block_requests usage Currently UFS driver has ufshcd_scsi_block_requests() with reference counter mechanism to avoid possible racing of blocking and unblocking requests flow. Unify all users in UFS driver to use the same function. Link: https://lore.kernel.org/r/1577192466-20762-2-git-send-email-stanley.chu@mediatek.com Reviewed-by: Can Guo Reviewed-by: Bart Van Assche Reviewed-by: Alim Akhtar Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit dbfc5626d9303ef611e70a531379e68754ab0feb Author: Damien Le Moal Date: Fri Dec 20 16:58:23 2019 +0900 scsi: sd_zbc: Rename sd_zbc_check_zones() Now that the block layer implement zone checks on revalidate, sd_zbc_check_zones() is reduced getting the zone size and verifying the device capacity for device with RC_BASIS=0. Be clear about this by renaming sd_zbc_check_zones() to sd_zbc_check_capacity() and updating the function description and comments. Link: https://lore.kernel.org/r/20191220075823.400072-3-damien.lemoal@wdc.com Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit 19aaa4072327f467ab82db7d1f0055675e2a4cd4 Author: Damien Le Moal Date: Fri Dec 20 16:58:22 2019 +0900 scsi: sd_zbc: Simplify sd_zbc_check_zones() Now that the block layer generic zone revalidation code in blk_revalidate_disk_zones() checks for power of 2 zone size, there is no need to do it in sd_zbc_check_zones(). Remove this check. Link: https://lore.kernel.org/r/20191220075823.400072-2-damien.lemoal@wdc.com Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit a9c4ae108610716140bdec56ae0bebbe1c5cbe49 Author: Bart Van Assche Date: Wed Dec 18 16:50:50 2019 -0800 scsi: qla2xxx: Use get_unaligned_*() instead of open-coding these functions This patch improves readability and does not change any functionality. Cc: Himanshu Madhani Cc: Quinn Tran Cc: Martin Wilck Cc: Daniel Wagner Cc: Roman Bolshakov Link: https://lore.kernel.org/r/20191219005050.40193-1-bvanassche@acm.org Reviewed-by: Daniel Wagner Reviewed-by: Roman Bolshakov Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 3f5f7335e5e234e340b48ecb24c2aba98a61f934 Author: Bart Van Assche Date: Wed Dec 18 16:49:05 2019 -0800 scsi: qla2xxx: Fix the endianness of the qla82xx_get_fw_size() return type Since qla82xx_get_fw_size() returns a number in CPU-endian format, change its return type from __le32 into u32. This patch does not change any functionality. Fixes: 9c2b297572bf ("[SCSI] qla2xxx: Support for loading Unified ROM Image (URI) format firmware file.") Cc: Himanshu Madhani Cc: Quinn Tran Cc: Martin Wilck Cc: Daniel Wagner Cc: Roman Bolshakov Link: https://lore.kernel.org/r/20191219004905.39586-1-bvanassche@acm.org Reviewed-by: Daniel Wagner Reviewed-by: Roman Bolshakov Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit a27747a207887420106aca284c0e98ba5e547d78 Author: Bart Van Assche Date: Wed Dec 18 16:47:06 2019 -0800 scsi: qla2xxx: Improve readability of the code that handles qla_flt_header Declare qla_hw_data.flt as a qla_flt_header pointer instead of as a void pointer. Add a zero-length array at the end of struct qla_flt_header to make it clear that qla_flt_header and qla_flt_region are contiguous. This patch removes several casts but does not change any functionality. Cc: Himanshu Madhani Cc: Quinn Tran Cc: Martin Wilck Cc: Daniel Wagner Cc: Roman Bolshakov Link: https://lore.kernel.org/r/20191219004706.39039-1-bvanassche@acm.org Reviewed-by: Daniel Wagner Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit f5c547efa16c0ea5abff0596e829f502be11902e Merge: 3ae3271443b3 1ce0d5162b98 Author: Dave Airlie Date: Fri Jan 3 11:43:31 2020 +1000 Merge tag 'drm-misc-next-2020-01-02' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.6: UAPI Changes: - Commandline parser: Add support for panel orientation, and per-mode options. - Fix IOCTL naming for dma-buf heaps. Cross-subsystem Changes: - Rename DMA_HEAP_IOC_ALLOC to DMA_HEAP_IOCTL_ALLOC before it becomes abi. - Change DMA-BUF system-heap's name to system. - Fix leak in error handling in dma_heap_ioctl(), and make a symbol static. - Fix udma-buf cpu access. - Fix ti devicetree bindings. Core Changes: - Add CTA-861-G modes with VIC >= 193. - Change error handling and remove bug_on in *drm_dev_init. - Export drm_panel_of_backlight() correctly once more. - Add support for lvds decoders. - Convert drm/client and drm/(gem-,)fb-helper to drm-device based logging and update logging todo. Driver Changes: - Add support for dsi/px30 to rockchip. - Add fb damage support to virtio. - Use dma_resv locking wrappers in vc4, msm, etnaviv. - Make functions in virtio static, and perform some simplifications. - Add suspend support to sun4i. - Add A64 mipi dsi support to sun4i. - Add runtime pm suspend to komeda. - Associated driver fixes. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/efc11139-1653-86bc-1b0f-0aefde219850@linux.intel.com commit 72bbeda0222bcd382ee33b3aff71346074410c21 Author: Pierre-Louis Bossart Date: Thu Jan 2 13:59:52 2020 -0600 ASoC: soc-topology: fix endianness issues Sparse complains about a series of easy warnings, fix. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200102195952.9465-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 22a0d31a595c7cd0d37b97e1bc09c79ae1408311 Author: Pierre-Louis Bossart Date: Thu Jan 2 13:59:51 2020 -0600 ASoC: Intel: boards: hda_dsp_common: use NULL pointer assignment, not 0 Fix Sparse warning: hda_dsp_common.c:66:37: warning: Using plain integer as NULL pointer Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200102195952.9465-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d0e8bcafc8aff5553beffe55046795f9bab9fe7b Author: Mao Wenan Date: Thu Jan 2 22:02:27 2020 +0800 tcp: use REXMIT_NEW instead of magic number REXMIT_NEW is a macro for "FRTO-style transmit of unsent/new packets", this patch makes it more readable. Signed-off-by: Mao Wenan Acked-by: Neal Cardwell Signed-off-by: David S. Miller commit cdd280b1b9b15217b404276b3e703e2764cad8c3 Author: Chris Wilson Date: Thu Jan 2 23:16:04 2020 +0000 drm/i915/gt: Flush ongoing retires during wait_for_idle Synchronise with any background retires and parking we may have spawned, so that all requests are accounted for. Closes: https://gitlab.freedesktop.org/drm/intel/issues/878 Signed-off-by: Chris Wilson Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20200102231604.1669010-1-chris@chris-wilson.co.uk commit 0d08c9ec7d6eb9b4c8639396b1cc6f692cbb7955 Author: Po Liu Date: Thu Jan 2 04:59:24 2020 +0000 enetc: add support time specific departure base on the qos etf ENETC implement time specific departure capability, which enables the user to specify when a frame can be transmitted. When this capability is enabled, the device will delay the transmission of the frame so that it can be transmitted at the precisely specified time. The delay departure time up to 0.5 seconds in the future. If the departure time in the transmit BD has not yet been reached, based on the current time, the packet will not be transmitted. This driver was loaded by Qos driver ETF. User could load it by tc commands. Here are the example commands: tc qdisc add dev eth0 root handle 1: mqprio \ num_tc 8 map 0 1 2 3 4 5 6 7 hw 1 tc qdisc replace dev eth0 parent 1:8 etf \ clockid CLOCK_TAI delta 30000 offload These example try to set queue mapping first and then set queue 7 with 30us ahead dequeue time. Then user send test frame should set SO_TXTIME feature for socket. There are also some limitations for this feature in hardware: - Transmit checksum offloads and time specific departure operation are mutually exclusive. - Time Aware Shaper feature (Qbv) offload and time specific departure operation are mutually exclusive. Signed-off-by: Po Liu Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit a02158d62faa19d3cad8caf481253998a6c47934 Author: Julia Lawall Date: Wed Jan 1 18:49:44 2020 +0100 fsl/fman: use resource_size Use resource_size rather than a verbose computation on the end and start fields. The semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) @@ struct resource ptr; @@ - (ptr.end + 1 - ptr.start) + resource_size(&ptr) @@ struct resource *ptr; @@ - (ptr->end + 1 - ptr->start) + resource_size(ptr) Signed-off-by: Julia Lawall Signed-off-by: David S. Miller commit 6485f9ae3b96edeb2513528a6ad4fd77ee7bafc2 Author: Julia Lawall Date: Wed Jan 1 08:43:31 2020 +0100 ptp: ptp_clockmatrix: constify copied structure The idtcm_caps structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall Acked-by: Richard Cochran Signed-off-by: David S. Miller commit edf4579123e234ada9fe12fbc8436923fcceb963 Author: Ben Hutchings Date: Tue Dec 31 16:59:08 2019 +0000 sfc: Remove unnecessary dependencies on I2C Only the SFC4000 code, now moved to sfc-falcon, needed I2C. Signed-off-by: Ben Hutchings Acked-by: Edward Cree Signed-off-by: David S. Miller commit e37b624d25139f8b9d4bdafb3ac5131f56d0e7bb Author: Wambui Karuga Date: Mon Dec 30 22:41:02 2019 +0300 drm/msm: use BUG_ON macro for debugging. As the if statement only checks for the value of the offset_name variable, it can be replaced by the more conscise BUG_ON macro for error reporting. Signed-off-by: Wambui Karuga Reviewed-by: Sean Paul Signed-off-by: Rob Clark commit 89048dd010f00de0fd5129fb5bba2a20ca9ab70b Author: Fabio Estevam Date: Tue Dec 10 20:11:45 2019 -0300 drm/msm/adreno: Do not print error on "qcom, gpu-pwrlevels" absence Booting the adreno driver on a imx53 board leads to the following error message: adreno 30000000.gpu: [drm:adreno_gpu_init] *ERROR* Could not find the GPU powerlevels As the "qcom,gpu-pwrlevels" property is optional and never present on i.MX5, turn the message into debug level instead. Signed-off-by: Fabio Estevam Reviewed-by: Jeffrey Hugo Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit 99c85c3203d4d738957c00ddaf974eee8ea330c4 Author: zhengbin Date: Sat Dec 14 17:31:50 2019 +0800 drm/msm/dpu: Remove unneeded semicolon in dpu_encoder.c Fixes coccicheck warning: drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:2260:3-4: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit 4aef7e06457a4080721d643bfcc1769f0f51471a Author: zhengbin Date: Sat Dec 14 17:31:49 2019 +0800 drm/msm/dpu: Remove unneeded semicolon in dpu_plane.c Fixes coccicheck warning: drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:741:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit 5d6cfd167d3542f4a5882cd082810b62ab114409 Author: zhengbin Date: Sat Dec 14 17:31:48 2019 +0800 drm/msm/mdp5: Remove unneeded semicolon Fixes coccicheck warning: drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c:905:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit 4da32c226fa48318a4b2605b0f7c28448260bd87 Author: zhengbin Date: Sat Dec 14 17:31:47 2019 +0800 drm/msm/hdmi: Remove unneeded semicolon Fixes coccicheck warning: drivers/gpu/drm/msm/hdmi/hdmi_connector.c:104:3-4: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit 251e3cb1418ff3f5061ee31335e346e852b16573 Author: Nathan Chancellor Date: Mon Dec 9 13:32:30 2019 -0700 drm: msm: mdp4: Adjust indentation in mdp4_dsi_encoder_enable Clang warns: ../drivers/gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c:124:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] mdp4_crtc_set_config(encoder->crtc, ^ ../drivers/gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c:121:2: note: previous statement is here if (mdp4_dsi_encoder->enabled) ^ This warning occurs because there is a space after the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns. Fixes: 776638e73a19 ("drm/msm/dsi: Add a mdp4 encoder for DSI") Link: https://github.com/ClangBuiltLinux/linux/issues/792 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Rob Clark commit 5e7d4a8407d37a0bbd8e49be988340dc33459c2e Author: Drew Davenport Date: Fri Dec 6 16:13:48 2019 -0700 drm/msm/dpu: Remove unnecessary NULL checks The dpu_encoder_phys * argument passed to these functions will never be NULL so don't check. Signed-off-by: Drew Davenport Signed-off-by: Rob Clark commit 2b156481dcbc468bf74ba4a8d7efc499165100bf Author: Drew Davenport Date: Fri Dec 6 16:13:47 2019 -0700 drm/msm/dpu: Remove unreachable code The return statement follows another return statement, so will never be reached. Signed-off-by: Drew Davenport Signed-off-by: Rob Clark commit b6fadcade6270400af8986918ede72d8bb30e338 Author: Drew Davenport Date: Fri Dec 6 16:13:46 2019 -0700 drm/msm/dpu: Remove unnecessary NULL check dpu_encoder_virt.phys_encs[0:num_phys_encs-1] will not be NULL so don't check. Also fix multiline strings that caused checkpatch warning. Signed-off-by: Drew Davenport Signed-off-by: Rob Clark commit 85a8f8eec8f0481a9d5e84ef85b99e7d399b801b Author: Drew Davenport Date: Fri Dec 6 16:13:45 2019 -0700 drm/msm/dpu: Remove unnecessary NULL checks dpu_crtc_mixer.hw_lm will never be NULL, so don't check. Signed-off-by: Drew Davenport Signed-off-by: Rob Clark commit 1caaf257fa145e3d24f05aff6fe06df5c5358591 Author: Drew Davenport Date: Fri Dec 6 16:13:44 2019 -0700 drm/msm/dpu: Remove unnecessary NULL checks dpu_crtc_mixer.lm_ctl will never be NULL, so don't bother checking Signed-off-by: Drew Davenport Signed-off-by: Rob Clark commit 99beed68c3c72e74c064bb30fb6fd9346f454f50 Author: Drew Davenport Date: Fri Dec 6 16:13:43 2019 -0700 drm/msm/dpu: Remove unnecessary NULL checks dpu_hw_ctl* is checked for NULL when passed as an argument to several functions. It will never be NULL, so remove the checks. Signed-off-by: Drew Davenport Signed-off-by: Rob Clark commit a5ab31767c7782fee743e18fb8e02fcf12f9fa33 Author: Sharat Masetty Date: Tue Dec 3 15:16:16 2019 +0000 drm: msm: a6xx: Dump GBIF registers, debugbus in gpu state Add the relevant GBIF registers and the debug bus to the a6xx gpu state. This comes in pretty handy when debugging GPU bus related issues. Signed-off-by: Sharat Masetty Signed-off-by: Rob Clark commit e812744c5f953cb8bbce2d8cfbcb2e8e7df7535d Author: Sharat Masetty Date: Tue Dec 3 15:16:14 2019 +0000 drm: msm: a6xx: Add support for A618 This patch adds support for enabling Graphics Bus Interface(GBIF) used in multiple A6xx series chipets. Also makes changes to the PDC/RSC sequencing specifically required for A618. This is needed for proper interfacing with RPMH. Signed-off-by: Sharat Masetty Signed-off-by: Rob Clark commit 358ffda520db32e8719db4424edd72c25298decb Author: Sharat Masetty Date: Tue Dec 3 15:16:09 2019 +0000 drm: msm: Add 618 gpu to the adreno gpu list This patch adds Adreno 618 entry and its associated properties to the gpulist entries. Signed-off-by: Sharat Masetty Signed-off-by: Rob Clark commit e5400750fafdaeee136e9fc3d1dde83d9251ee63 Author: Stephan Gerhold Date: Fri Nov 8 22:28:40 2019 +0100 drm/msm/dsi: Delay drm_panel_enable() until dsi_mgr_bridge_enable() At the moment, the MSM DSI driver calls drm_panel_enable() rather early from the DSI bridge pre_enable() function. At this point, the encoder (e.g. MDP5) is not enabled, so we have not started transmitting video data. However, the drm_panel_funcs documentation states that enable() should be called on the panel *after* video data is being transmitted: The .prepare() function is typically called before the display controller starts to transmit video data. [...] After the display controller has started transmitting video data, it's safe to call the .enable() function. This will typically enable the backlight to make the image on screen visible. Calling drm_panel_enable() too early causes problems for some panels: The TFT LCD panel used in the Samsung Galaxy Tab A 9.7 (2015) (APQ8016) uses the MIPI_DCS_SET_DISPLAY_BRIGHTNESS command to control backlight/brightness of the screen. The enable sequence is therefore: drm_panel_enable() drm_panel_funcs.enable(): backlight_enable() backlight_ops.update_status(): mipi_dsi_dcs_set_display_brightness(dsi, bl->props.brightness); The panel seems to silently ignore the MIPI_DCS_SET_DISPLAY_BRIGHTNESS command if it is sent too early. This prevents setting the initial brightness, causing the display to be enabled with minimum brightness instead. Adding various delays in the panel initialization code does not result in any difference. On the other hand, moving drm_panel_enable() to dsi_mgr_bridge_enable() fixes the problem, indicating that the panel requires the video stream to be active before the brightness command is accepted. Therefore: Move drm_panel_enable() to dsi_mgr_bridge_enable() to delay calling it until video data is being transmitted. Move drm_panel_disable() to dsi_mgr_bridge_disable() for similar reasons. (This is not strictly required for the panel affected above...) Tested-by: Jasper Korten Signed-off-by: Stephan Gerhold Tested-by: Jeffrey Hugo Reviewed-by: Jeffrey Hugo Signed-off-by: Rob Clark commit fea2d7d98e02adacde5a37ef1cfdacec5645b88d Author: Shubhashree Dhar Date: Wed Nov 27 15:46:07 2019 +0530 msm:disp:dpu1: Fix core clk rate in display driver Fix max core clk rate during dt parsing in display driver. Signed-off-by: Shubhashree Dhar Signed-off-by: Rob Clark commit 7a8d8a464276cd4d7053a919ab448cdc79922eab Merge: 98c8147648fa 5cad8bce26e0 Author: David S. Miller Date: Thu Jan 2 15:51:22 2020 -0800 Merge branch 'tcp-Add-support-for-L3-domains-to-MD5-auth' David Ahern says: ==================== tcp: Add support for L3 domains to MD5 auth With VRF, the scope of network addresses is limited to the L3 domain the device is associated. MD5 keys are based on addresses, so proper VRF support requires an L3 domain to be considered for the lookups. Leverage the new TCP_MD5SIG_EXT option to add support for a device index to MD5 keys. The __tcpm_pad entry in tcp_md5sig is renamed to tcpm_ifindex and a new flag, TCP_MD5SIG_FLAG_IFINDEX, in tcpm_flags determines if the entry is examined. This follows what was done for MD5 and prefixes with commits 8917a777be3b ("tcp: md5: add TCP_MD5SIG_EXT socket option to set a key address prefix") 6797318e623d ("tcp: md5: add an address prefix for key lookup") Handling both a device AND L3 domain is much more complicated for the response paths. This set focuses only on L3 support - requiring the device index to be an l3mdev (ie, VRF). Support for slave devices can be added later if desired, much like the progression of support for sockets bound to a VRF and then bound to a device in a VRF. Kernel code is setup to explicitly call out that current lookup is for an L3 index, while the uapi just references a device index allowing its meaning to include other devices in the future. ==================== Signed-off-by: David S. Miller commit 5cad8bce26e01238f82d391acc7f70dd83f84a91 Author: David Ahern Date: Mon Dec 30 14:14:33 2019 -0800 fcnal-test: Add TCP MD5 tests for VRF Add tests for new TCP MD5 API for L3 domains (VRF). A new namespace is added to create a duplicate configuration between the VRF and default VRF to verify overlapping config is handled properly. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit f0bee1ebb5594e9a9d2b85e365d10038ef16dce9 Author: David Ahern Date: Mon Dec 30 14:14:32 2019 -0800 fcnal-test: Add TCP MD5 tests Add tests for existing TCP MD5 APIs - both single address config and the new extended API for prefixes. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit eb09cf03b9bde3a08015b46119d0f594b250001f Author: David Ahern Date: Mon Dec 30 14:14:31 2019 -0800 nettest: Add support for TCP_MD5 extensions Update nettest to implement TCP_MD5SIG_EXT for a prefix and a device. Add a new option, -m, to specify a prefix and length to use with MD5 auth. The device option comes from the existing -d option. If either are set and MD5 auth is requested, TCP_MD5SIG_EXT is used instead of TCP_MD5SIG. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 1bfb45d860d8360322656131eac51772fec6fc8c Author: David Ahern Date: Mon Dec 30 14:14:30 2019 -0800 nettest: Return 1 on MD5 failure for server mode On failure to set MD5 password, do_server should return 1 so that the program exits with 1 rather than 255. This used for negative testing when adding MD5 with device option. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 6b102db50cdde3ba2f78631ed21222edf3a5fb51 Author: David Ahern Date: Mon Dec 30 14:14:29 2019 -0800 net: Add device index to tcp_md5sig Add support for userspace to specify a device index to limit the scope of an entry via the TCP_MD5SIG_EXT setsockopt. The existing __tcpm_pad is renamed to tcpm_ifindex and the new field is only checked if the new TCP_MD5SIG_FLAG_IFINDEX is set in tcpm_flags. For now, the device index must point to an L3 master device (e.g., VRF). The API and error handling are setup to allow the constraint to be relaxed in the future to any device index. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit dea53bb80e07b9e1641b865493908c20cb8df2ac Author: David Ahern Date: Mon Dec 30 14:14:28 2019 -0800 tcp: Add l3index to tcp_md5sig_key and md5 functions Add l3index to tcp_md5sig_key to represent the L3 domain of a key, and add l3index to tcp_md5_do_add and tcp_md5_do_del to fill in the key. With the key now based on an l3index, add the new parameter to the lookup functions and consider the l3index when looking for a match. The l3index comes from the skb when processing ingress packets leveraging the helpers created for socket lookups, tcp_v4_sdif and inet_iif (and the v6 variants). When the sdif index is set it means the packet ingressed a device that is part of an L3 domain and inet_iif points to the VRF device. For egress, the L3 domain is determined from the socket binding and sk_bound_dev_if. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 534322ca3daf56a27c9712ae9b1fef4daede5516 Author: David Ahern Date: Mon Dec 30 14:14:27 2019 -0800 ipv4/tcp: Pass dif and sdif to tcp_v4_inbound_md5_hash The original ingress device index is saved to the cb space of the skb and the cb is moved during tcp processing. Since tcp_v4_inbound_md5_hash can be called before and after the cb move, pass dif and sdif to it so the caller can save both prior to the cb move. Both are used by a later patch. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit d14c77e0b24f6d1394d9bd4c4ba629808b656baf Author: David Ahern Date: Mon Dec 30 14:14:26 2019 -0800 ipv6/tcp: Pass dif and sdif to tcp_v6_inbound_md5_hash The original ingress device index is saved to the cb space of the skb and the cb is moved during tcp processing. Since tcp_v6_inbound_md5_hash can be called before and after the cb move, pass dif and sdif to it so the caller can save both prior to the cb move. Both are used by a later patch. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit cea9760950a50fa13b6535fbaa6fa91223394431 Author: David Ahern Date: Mon Dec 30 14:14:25 2019 -0800 ipv4/tcp: Use local variable for tcp_md5_addr Extract the typecast to (union tcp_md5_addr *) to a local variable rather than the current long, inline declaration with function calls. No functional change intended. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit b75ab05a34792fc203262a2f4a272f2a47257369 Author: Shubhashree Dhar Date: Wed Nov 27 15:44:12 2019 +0530 msm:disp:dpu1: add scaler support on SC7180 display Add scaler support for display driver. This patch has dependency on the below series https://patchwork.kernel.org/patch/11260267/ Co-developed-by: Raviteja Tamatam Signed-off-by: Raviteja Tamatam Signed-off-by: Shubhashree Dhar Signed-off-by: Rob Clark commit 42a558b71c9ead911a1486ca118c927e46e9d889 Author: Kalyan Thota Date: Mon Nov 25 17:29:29 2019 +0530 msm:disp:dpu1: add mixer selection for display topology mixer selection in the display topology is based on multiple factors 1) mixers available in the hw 2) interfaces to be enabled 3) merge capability change will pickup mixer as per the topology need. Signed-off-by: Kalyan Thota Signed-off-by: Rob Clark commit 73bfb790ac786ca55fa2786a06f59402a72b4163 Author: Kalyan Thota Date: Mon Nov 25 17:29:28 2019 +0530 msm:disp:dpu1: setup display datapath for SC7180 target Add changes to setup display datapath on SC7180 target. Changes in v1: - Add changes to support ctl_active on SC7180 target. - While selecting the number of mixers in the topology consider the interface width. Changes in v2: - Spawn topology mixer selection into separate patch (Rob Clark). - Add co-developed-by tags in the commit msg (Stephen Boyd). Changes in v3: - Fix kernel checkpatch errors in v2. This patch has dependency on the below series https://patchwork.kernel.org/patch/11253747/ Co-developed-by: Shubhashree Dhar Signed-off-by: Shubhashree Dhar Co-developed-by: Raviteja Tamatam Signed-off-by: Raviteja Tamatam Signed-off-by: Kalyan Thota Signed-off-by: Rob Clark commit 7bdc0c4b812602fb5678dcc477fe03679721e892 Author: Kalyan Thota Date: Mon Nov 25 17:29:27 2019 +0530 msm:disp:dpu1: add support for display for SC7180 target Add display hw catalog changes for SC7180 target. Changes in v1: - Configure register offsets and capabilities for the display hw blocks. Changes in v2: - mdss_irq data type has changed in the dependent patch, accommodate the necessary changes. - Add co-developed-by tags in the commit msg (Stephen Boyd). Changes in v3: - fix kernel checkpatch errors in v2 Changes in v4: - move documentation into seperate patch (Rob Herring). This patch has dependency on the below series https://patchwork.kernel.org/patch/11253647/ Co-developed-by: Shubhashree Dhar Signed-off-by: Shubhashree Dhar Co-developed-by: Raviteja Tamatam Signed-off-by: Raviteja Tamatam Signed-off-by: Kalyan Thota [rebase on hw catalog const'ification, and add more const's] Signed-off-by: Rob Clark commit 98c8147648fa1cdb803fe51fa0a6ff439ed4769f Author: Niu Xilei Date: Mon Dec 30 17:52:22 2019 +0800 vxlan: Fix alignment and code style of vxlan.c Fixed Coding function and style issues Signed-off-by: Niu Xilei Signed-off-by: David S. Miller commit f5e5d27248ffbb8bc86706efa4717eb41c114718 Merge: c9a2069b1dba c5341bcc337c Author: David S. Miller Date: Thu Jan 2 15:40:14 2020 -0800 Merge branch 'mlxsw-Allow-setting-default-port-priority' Ido Schimmel says: ==================== mlxsw: Allow setting default port priority Petr says: When LLDP APP TLV selector 1 (EtherType) is used with PID of 0, the corresponding entry specifies "default application priority [...] when application priority is not otherwise specified." mlxsw currently supports this type of APP entry, but uses it only as a fallback for unspecified DSCP rules. However non-IP traffic is prioritized according to port-default priority, not according to the DSCP-to-prio tables, and thus it's currently not possible to prioritize such traffic correctly. This patchset extends the use of the abovementioned APP entry to also set default port priority (in patches #1 and #2) and then (in patch #3) adds a selftest. ==================== Signed-off-by: David S. Miller commit c5341bcc337ca762faa58790c2065c76cd05f2e6 Author: Petr Machata Date: Sun Dec 29 13:48:29 2019 +0200 selftests: mlxsw: Add a self-test for port-default priority Send non-IP traffic to a port and observe that it gets prioritized according to the lldptool app=$prio,1,0 rules. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 379a00dd21618f4354d41b1ac148188e005dbc05 Author: Petr Machata Date: Sun Dec 29 13:48:28 2019 +0200 mlxsw: spectrum_dcb: Allow setting default port priority When APP TLV selector 1 (EtherType) is used with PID of 0, the corresponding entry specifies "default application priority [...] when application priority is not otherwise specified." mlxsw currently supports this type of APP entry, but uses it only as a fallback for unspecified DSCP rules. However non-IP traffic is prioritized according to port-default priority, not according to the DSCP-to-prio tables, and thus it's currently not possible to prioritize such traffic correctly. Extend the use of the abovementioned APP entry to also set default port priority. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d8446884f8d0b2b9f124b98cdf2d9b8c5fe128ba Author: Petr Machata Date: Sun Dec 29 13:48:27 2019 +0200 mlxsw: reg: Add QoS Port DSCP to Priority Mapping Register Add QPDP. This register controls the port default Switch Priority and Color. The default Switch Priority and Color are used for frames where the trust state uses default values. Currently there are two cases where this applies: a port is in trust-PCP state, but a packet arrives untagged; and a port is in trust-DSCP state, but a non-IP packet arrives. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit c9a2069b1dbadf7cb85da0fd9df62d25e3642f03 Merge: fe23d63422c8 f13fc10785bc Author: David S. Miller Date: Thu Jan 2 15:37:53 2020 -0800 Merge branch 'page_pool-NUMA-node-handling-fixes' Jesper Dangaard Brouer says: ==================== page_pool: NUMA node handling fixes The recently added NUMA changes (merged for v5.5) to page_pool, it both contains a bug in handling NUMA_NO_NODE condition, and added code to the fast-path. This patchset fixes the bug and moves code out of fast-path. The first patch contains a fix that should be considered for 5.5. The second patch reduce code size and overhead in case CONFIG_NUMA is disabled. Currently the NUMA_NO_NODE setting bug only affects driver 'ti_cpsw' (drivers/net/ethernet/ti/), but after this patchset, we plan to move other drivers (netsec and mvneta) to use NUMA_NO_NODE setting. ==================== Signed-off-by: David S. Miller commit f13fc10785bc04f83fe0d7730beb8ff4be563a20 Author: Jesper Dangaard Brouer Date: Fri Dec 27 18:13:24 2019 +0100 page_pool: help compiler remove code in case CONFIG_NUMA=n When kernel is compiled without NUMA support, then page_pool NUMA config setting (pool->p.nid) doesn't make any practical sense. The compiler cannot see that it can remove the code paths. This patch avoids reading pool->p.nid setting in case of !CONFIG_NUMA, in allocation and numa check code, which helps compiler to see the optimisation potential. It leaves update code intact to keep API the same. $ ./scripts/bloat-o-meter net/core/page_pool.o-numa-enabled \ net/core/page_pool.o-numa-disabled add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-113 (-113) Function old new delta page_pool_create 401 398 -3 __page_pool_alloc_pages_slow 439 426 -13 page_pool_refill_alloc_cache 425 328 -97 Total: Before=3611, After=3498, chg -3.13% Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 44768decb7c0a6c7c01995dbacc864f3921b6dac Author: Jesper Dangaard Brouer Date: Fri Dec 27 18:13:18 2019 +0100 page_pool: handle page recycle for NUMA_NO_NODE condition The check in pool_page_reusable (page_to_nid(page) == pool->p.nid) is not valid if page_pool was configured with pool->p.nid = NUMA_NO_NODE. The goal of the NUMA changes in commit d5394610b1ba ("page_pool: Don't recycle non-reusable pages"), were to have RX-pages that belongs to the same NUMA node as the CPU processing RX-packet during softirq/NAPI. As illustrated by the performance measurements. This patch moves the NAPI checks out of fast-path, and at the same time solves the NUMA_NO_NODE issue. First realize that alloc_pages_node() with pool->p.nid = NUMA_NO_NODE will lookup current CPU nid (Numa ID) via numa_mem_id(), which is used as the the preferred nid. It is only in rare situations, where e.g. NUMA zone runs dry, that page gets doesn't get allocated from preferred nid. The page_pool API allows drivers to control the nid themselves via controlling pool->p.nid. This patch moves the NAPI check to when alloc cache is refilled, via dequeuing/consuming pages from the ptr_ring. Thus, we can allow placing pages from remote NUMA into the ptr_ring, as the dequeue/consume step will check the NUMA node. All current drivers using page_pool will alloc/refill RX-ring from same CPU running softirq/NAPI process. Drivers that control the nid explicitly, also use page_pool_update_nid when changing nid runtime. To speed up transision to new nid the alloc cache is now flushed on nid changes. This force pages to come from ptr_ring, which does the appropate nid check. For the NUMA_NO_NODE case, when a NIC IRQ is moved to another NUMA node, we accept that transitioning the alloc cache doesn't happen immediately. The preferred nid change runtime via consulting numa_mem_id() based on the CPU processing RX-packets. Notice, to avoid stressing the page buddy allocator and avoid doing too much work under softirq with preempt disabled, the NUMA check at ptr_ring dequeue will break the refill cycle, when detecting a NUMA mismatch. This will cause a slower transition, but its done on purpose. Fixes: d5394610b1ba ("page_pool: Don't recycle non-reusable pages") Reported-by: Li RongQing Reported-by: Yunsheng Lin Signed-off-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit 854f94226a91010e81e09d79ba7ea253e64e6091 Author: Kalyan Thota Date: Mon Nov 25 17:29:26 2019 +0530 dt-bindings: msm:disp: add sc7180 DPU variant Add a compatible string to support sc7180 dpu version. Signed-off-by: Kalyan Thota Acked-by: Rob Herring Signed-off-by: Rob Clark commit 0846cca39484f6a9204edfca0987ae2725a88da7 Author: Shubhashree Dhar Date: Wed Nov 20 17:02:31 2019 +0530 msm: disp: dpu1: add support to access hw irqs regs depending on revision Current code assumes that all the irqs registers offsets can be accessed in all the hw revisions; this is not the case for some targets that should not access some of the irq registers. This change adds the support to selectively remove the irqs that are not supported in some of the hw revisions. Changes in v1: - Add support to selectively remove the hw irqs that are not not supported. Changes in v2: - Remove unrelated changes. Changes in v3: - Remove change-id (Stephen Boyd). - Add colon in variable description to match kernel-doc (Stephen Boyd). - Change macro-y way of variable description (Jordon Crouse). - Remove unnecessary if checks (Jordon Crouse). - Remove extra blank line (Jordon Crouse). Changes in v4: - Remove checkpatch errors. Signed-off-by: Shubhashree Dhar Signed-off-by: Rob Clark commit cb929b8f5faa2a94c2f28e656e243e3ec173b480 Author: Fritz Koenig Date: Wed Nov 6 15:25:53 2019 -0800 drm/msm/dpu: Add UBWC support for RGB8888 formats Hardware only natively supports BGR8888 UBWC. UBWC support for RGB8888 can be had by pretending that the buffer is BGR. Signed-off-by: Fritz Koenig Reviewed-by: Rob Clark Acked-by: Daniel Vetter Signed-off-by: Rob Clark commit abda0d925f9c063d88ee3838296542d854f7b837 Author: Stephen Boyd Date: Tue Nov 19 10:48:53 2019 -0800 drm/msm/dpu: Mark various data tables as const These structures look like a bunch of data tables that aren't going to change after boot. Let's move them to the const RO section of memory so that they can't be modified at runtime on modern machines. Signed-off-by: Stephen Boyd Signed-off-by: Rob Clark commit 21f5a6c08b171b8ffd12d921facfe4597c0aa934 Author: Brian Masney Date: Thu Nov 21 20:26:45 2019 -0500 drm/msm/a4xx: set interconnect bandwidth vote Set the two interconnect paths for the GPU to maximum speed for now to work towards getting the GPU working upstream. We can revisit a later time to optimize this for battery life. Signed-off-by: Brian Masney Reviewed-by: Bjorn Andersson Signed-off-by: Rob Clark commit d163ba0b65f2e46d6010625fa6603c93951a010f Author: Brian Masney Date: Thu Nov 21 20:26:44 2019 -0500 drm/msm/a3xx: set interconnect bandwidth vote Set the two interconnect paths for the GPU to maximum speed for now to work towards getting the GPU working upstream. We can revisit a later time to optimize this for battery life. Signed-off-by: Brian Masney Reviewed-by: Bjorn Andersson Signed-off-by: Rob Clark commit 00bb9243d346cf749919035f2473d30fe9496153 Author: Brian Masney Date: Thu Nov 21 20:26:43 2019 -0500 drm/msm/gpu: add support for ocmem interconnect path Some A3xx and all A4xx Adreno GPUs do not have GMEM inside the GPU core and must use the On Chip MEMory (OCMEM) in order to be functional. There's a separate interconnect path that needs to be setup to OCMEM. Add support for this second path to the GPU core. In the downstream MSM 3.4 sources, the two interconnect paths for the GPU are between: - MSM_BUS_MASTER_GRAPHICS_3D and MSM_BUS_SLAVE_EBI_CH0 - MSM_BUS_MASTER_V_OCMEM_GFX3D and MSM_BUS_SLAVE_OCMEM Signed-off-by: Brian Masney Reviewed-by: Bjorn Andersson Signed-off-by: Rob Clark commit b435f8b4f6a08f5bbf001cfd4bed22070e3774fd Author: Brian Masney Date: Thu Nov 21 20:26:42 2019 -0500 dt-bindings: drm/msm/gpu: document second interconnect Some A3xx and all A4xx Adreno GPUs do not have GMEM inside the GPU core and must use the On Chip MEMory (OCMEM) in order to be functional. There's a separate interconnect path that needs to be setup to OCMEM. Let's document this second interconnect path that's available. Since there's now two available interconnects, let's add the interconnect-names property. Signed-off-by: Brian Masney Acked-by: Rob Herring Reviewed-by: Bjorn Andersson Signed-off-by: Rob Clark commit 15ab987c423df561e0949d77fb5043921ae59956 Author: Rob Clark Date: Sun Nov 24 14:23:38 2019 -0800 drm/msm/adreno: fix zap vs no-zap handling We can have two cases, when it comes to "zap" fw. Either the fw requires zap fw to take the GPU out of secure mode at boot, or it does not and we can write RBBM_SECVID_TRUST_CNTL directly. Previously we decided based on whether zap fw load succeeded, but this is not a great plan because: 1) we could have zap fw in the filesystem on a device where it is not required 2) we could have the inverse case Instead, shift to deciding based on whether we have a 'zap-shader' node in dt. In practice, there is only one device (currently) with upstream dt that does not use zap (cheza), and it already has a /delete-node/ for the zap-shader node. Fixes: abccb9fe3267 ("drm/msm/a6xx: Add zap shader load") Signed-off-by: Rob Clark commit bd3fe8119dea46b850b78283b426afaa3cff6a1f Author: Rob Clark Date: Mon Nov 18 15:39:11 2019 -0800 drm/msm/a6xx: restore previous freq on resume Previously, if the freq were overriden (ie. via sysfs), it would get reset to max on resume. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse commit 7ec9741b19c30390596c1a9e7c65cdc7b4d9fd45 Author: Rob Clark Date: Fri Nov 8 11:38:46 2019 -0800 drm/msm/dpu: ignore NULL clocks This isn't an error. Also the clk APIs handle the NULL case, so we can just delete the check. Signed-off-by: Rob Clark Tested-by: Matthias Kaehlcke Reviewed-by: Linus Walleij Acked-by: Stephen Boyd commit 867b682459208dc3e18d3ab69f35da0064943889 Author: Pavel Machek Date: Thu Jan 2 22:31:44 2020 +0100 leds: lm3642: remove warnings for bad strtol, cleanup gotos Bad string from userspace is not worth printing warning on; gotos that just directly return are not good, plus a comment fix. Cc: jacek.anaszewski@gmail.com, linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, dmurphy@ti.com Signed-off-by: Pavel Machek commit 445da487f19cd4b2ee6035c043493c8adf4bf905 Author: Pavel Machek Date: Thu Jan 2 22:29:35 2020 +0100 leds: rb532: cleanup whitespace Trivial cleanup removing empty line at wrong place. Signed-off-by: Pavel Machek commit 2f8c665243d7a27cac34fd66156ff13656d20689 Author: Pavel Machek Date: Sun Mar 10 19:54:40 2019 +0100 ledtrig-pattern: fix email address quoting in MODULE_AUTHOR() Apparently it is quite easy to forget ">" in quoting of email address. This fixes it. Signed-off-by: Pavel Machek commit 9dae9e5381e02846e523507876966fd80fbb2e97 Author: Chris Wilson Date: Wed Jan 1 22:07:35 2020 +0000 drm/i915/gem: Single page objects are naturally contiguous Small objects that only occupy a single page are naturally contiguous, so mark them as such and allow them the special abilities that come with it. A more thorough treatment would extend i915_gem_object_pin_map() to support discontiguous lmem objects, following the example of ioremap_prot() and use get_vm_area() + remap_io_sg(). Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200101220736.1073007-1-chris@chris-wilson.co.uk commit 69afc4b623088665677be09ea59627aaf080bff7 Author: Bartosz Golaszewski Date: Thu Jan 2 17:56:32 2020 +0100 eeprom: at24: sort headers alphabetically For consistency and easier maintenance: sort the headers alphabetically. Signed-off-by: Bartosz Golaszewski commit 567ec716efab543c55a0d1abf2303f193ea9d544 Author: Bartosz Golaszewski Date: Thu Dec 19 11:55:58 2019 +0100 eeprom: at24: update the license tag The current GPL v2.0 or later SPDX tag is 'GPL-2.0-or-later' as defined at https://spdx.org/licenses/. Signed-off-by: Bartosz Golaszewski commit e37131556801dd76880914f0930fe0cbd1fd3223 Author: Ulf Hansson Date: Thu Oct 10 12:01:48 2019 +0200 arm64: dts: Convert to the hierarchical CPU topology layout for MSM8916 To enable the OS to better support PSCI OS initiated CPU suspend mode, let's convert from the flattened layout to the hierarchical layout. In the hierarchical layout, let's create a power domain provider per CPU and describe the idle states for each CPU inside the power domain provider node. To group the CPUs into a cluster, let's add another power domain provider and make it act as the master domain. Note that, the CPU's idle states remains compatible with "arm,idle-state", while the cluster's idle state becomes compatible with "domain-idle-state". Co-developed-by: Lina Iyer Signed-off-by: Lina Iyer Signed-off-by: Ulf Hansson Reviewed-by: Sudeep Holla commit a65a397f245137f6ffcd5e6490cd2504c30f8e73 Author: Ulf Hansson Date: Thu Oct 10 12:01:48 2019 +0200 cpuidle: psci: Add support for PM domains by using genpd When the hierarchical CPU topology layout is used in DT and the PSCI OSI mode is supported by the PSCI FW, let's initialize a corresponding PM domain topology by using genpd. This enables a CPU and a group of CPUs, when attached to the topology, to be power-managed accordingly. To trigger the attempt to initialize the genpd data structures let's use a subsys_initcall, which should be early enough to allow CPUs, but also other devices to be attached. The initialization consists of parsing the PSCI OF node for the topology and the "domain idle states" DT bindings. In case the idle states are compatible with "domain-idle-state", the initialized genpd becomes responsible of selecting an idle state for the PM domain, via assigning it a genpd governor. Note that, a successful initialization of the genpd data structures, is followed by a call to psci_set_osi_mode(), as to try to enable the OSI mode in the PSCI FW. In case this fails, we fall back into a degraded mode rather than bailing out and returning error codes. Co-developed-by: Lina Iyer Signed-off-by: Lina Iyer Signed-off-by: Ulf Hansson Reviewed-by: Sudeep Holla Acked-by: Rafael J. Wysocki commit dedd14925ec6f82a2840c009bc175e2b528ace8e Author: Ulf Hansson Date: Mon Dec 30 13:59:30 2019 +0100 PM / Domains: Introduce a genpd OF helper that removes a subdomain We already have the of_genpd_add_subdomain() helper, but no corresponding of_genpd_remove_subdomain(), so let's add it. Subsequent changes starts to make use of it. Signed-off-by: Ulf Hansson Acked-by: Rafael J. Wysocki commit 9c6ceecb6541954dfc410aa8883f872469326c73 Author: Ulf Hansson Date: Thu Oct 10 12:01:48 2019 +0200 cpuidle: psci: Support CPU hotplug for the hierarchical model When the hierarchical CPU topology is used and when a CPU is put offline, that CPU prevents its PM domain from being powered off, which is because genpd observes the corresponding attached device as being active from a runtime PM point of view. Furthermore, any potential master PM domains are also prevented from being powered off. To address this limitation, let's add add a new CPU hotplug state (CPUHP_AP_CPU_PM_STARTING) and register up/down callbacks for it, which allows us to deal with runtime PM accordingly. Signed-off-by: Ulf Hansson Reviewed-by: Sudeep Holla Acked-by: Rafael J. Wysocki commit ce85aef570df406fc8cb360e7351024570ef7d4f Author: Ulf Hansson Date: Thu Oct 10 12:01:48 2019 +0200 cpuidle: psci: Manage runtime PM in the idle path In case we have succeeded to attach a CPU to its PM domain, let's deploy runtime PM support for the corresponding attached device, to allow the CPU to be powered-managed accordingly. The triggering point for when runtime PM reference counting should be done, has been selected to the deepest idle state for the CPU. However, from the hierarchical point view, there may be good reasons to do runtime PM reference counting even on shallower idle states, but at this point this isn't supported, mainly due to limitations set by the generic PM domain. Signed-off-by: Ulf Hansson Reviewed-by: Sudeep Holla Acked-by: Rafael J. Wysocki commit a0cf319460745a6102555ecf99994374704dcb4c Author: Ulf Hansson Date: Thu Oct 10 12:01:48 2019 +0200 cpuidle: psci: Prepare to use OS initiated suspend mode via PM domains The per CPU variable psci_power_state, contains an array of fixed values, which reflects the corresponding arm,psci-suspend-param parsed from DT, for each of the available CPU idle states. This isn't sufficient when using the hierarchical CPU topology in DT, in combination with having PSCI OS initiated (OSI) mode enabled. More precisely, in OSI mode, Linux is responsible of telling the PSCI FW what idle state the cluster (a group of CPUs) should enter, while in PSCI Platform Coordinated (PC) mode, each CPU independently votes for an idle state of the cluster. For this reason, introduce a per CPU variable called domain_state and implement two helper functions to read/write its value. Then let the domain_state take precedence over the regular selected state, when entering and idle state. To avoid executing the above OSI specific code in the ->enter() callback, while operating in the default PSCI Platform Coordinated mode, let's also add a new enter-function and use it for OSI. Co-developed-by: Lina Iyer Signed-off-by: Lina Iyer Signed-off-by: Ulf Hansson Reviewed-by: Sudeep Holla Acked-by: Rafael J. Wysocki commit 8554951a4dd3d3a1a0efeba8eb5543eee7533be4 Author: Ulf Hansson Date: Thu Oct 10 12:01:48 2019 +0200 cpuidle: psci: Attach CPU devices to their PM domains In order to enable a CPU to be power managed through its PM domain, let's try to attach it by calling psci_dt_attach_cpu() during the cpuidle initialization. psci_dt_attach_cpu() returns a pointer to the attached struct device, which later should be used for runtime PM, hence we need to store it somewhere. Rather than adding yet another per CPU variable, let's create a per CPU struct to collect the relevant per CPU variables. Signed-off-by: Ulf Hansson Reviewed-by: Sudeep Holla Acked-by: Rafael J. Wysocki commit a5e0454cf3920f1e5ec1fae71783e576ea9b1318 Author: Ulf Hansson Date: Mon Oct 28 16:32:23 2019 +0100 cpuidle: psci: Add a helper to attach a CPU to its PM domain Introduce a PSCI DT helper function, psci_dt_attach_cpu(), which takes a CPU number as an in-parameter and tries to attach the CPU's struct device to its corresponding PM domain. Let's makes use of dev_pm_domain_attach_by_name(), as it allows us to specify "psci" as the "name" of the PM domain to attach to. Additionally, let's also prepare the attached device to be power managed via runtime PM. Note that, the implementation of the new helper function is in a new separate c-file, which may seems a bit too much at this point. However, subsequent changes that implements the remaining part of the PM domain support for cpuidle-psci, helps to justify this split. Signed-off-by: Ulf Hansson Reviewed-by: Sudeep Holla Acked-by: Rafael J. Wysocki commit f08cfbfa4fb1b5cf15d9f3d3f8ef2280236f4a12 Author: Ulf Hansson Date: Thu Oct 10 12:01:48 2019 +0200 cpuidle: psci: Support hierarchical CPU idle states Currently CPU's idle states are represented using the flattened model. Let's add support for the hierarchical layout, via converting to use of_get_cpu_state_node(). Signed-off-by: Ulf Hansson Reviewed-by: Sudeep Holla Acked-by: Rafael J. Wysocki commit 1595e4b09b2e7f7fc83369ecc3066505b6c7359b Author: Ulf Hansson Date: Thu Oct 10 12:01:48 2019 +0200 cpuidle: psci: Simplify OF parsing of CPU idle state nodes Iterating through the idle state nodes in DT, to find out the number of states that needs to be allocated is unnecessary, as it has already been done from dt_init_idle_driver(). Therefore, drop the iteration and use the number we already have at hand. Signed-off-by: Ulf Hansson Reviewed-by: Sudeep Holla Acked-by: Rafael J. Wysocki commit 778f173eb4528a6b48ff6a8600515899de75333c Author: Lina Iyer Date: Thu Oct 10 12:01:48 2019 +0200 cpuidle: dt: Support hierarchical CPU idle states Currently CPU's idle states are represented using the flattened model. Let's add support for the hierarchical layout, via converting to use of_get_cpu_state_node(). Suggested-by: Sudeep Holla Signed-off-by: Lina Iyer Reviewed-by: Daniel Lezcano Co-developed-by: Ulf Hansson Signed-off-by: Ulf Hansson Reviewed-by: Sudeep Holla Acked-by: Rafael J. Wysocki commit b9f8c26afc405a4a616e765e949bdd551151e41d Author: Ulf Hansson Date: Thu Oct 10 12:01:48 2019 +0200 of: base: Add of_get_cpu_state_node() to get idle states for a CPU node The CPU's idle state nodes are currently parsed at the common cpuidle DT library, but also when initializing data for specific CPU idle operations, as in the PSCI cpuidle driver case and qcom-spm cpuidle case. To avoid open-coding, let's introduce of_get_cpu_state_node(), which takes the device node for the CPU and the index to the requested idle state node, as in-parameters. In case a corresponding idle state node is found, it returns the node with the refcount incremented for it, else it returns NULL. Moreover, for PSCI there are two options to describe the CPU's idle states [1], either via a flattened description or a hierarchical layout. Hence, let's take both options into account. [1] Documentation/devicetree/bindings/arm/psci.yaml Suggested-by: Sudeep Holla Co-developed-by: Lina Iyer Signed-off-by: Lina Iyer Reviewed-by: Rob Herring Reviewed-by: Daniel Lezcano Signed-off-by: Ulf Hansson Reviewed-by: Sudeep Holla commit 49fdcd7577efe9efe863cdbb154f32a96970c1bc Author: Ulf Hansson Date: Thu Oct 10 12:01:48 2019 +0200 firmware: psci: Export functions to manage the OSI mode To allow subsequent changes to implement support for OSI mode through the cpuidle-psci driver, export the existing psci_has_osi_support(). Export also a new function, psci_set_osi_mode(), that allows its caller to enable the OS-initiated CPU-suspend mode in the PSCI FW. To deal with backwards compatibility for a kernel started through a kexec call, default to set the CPU-suspend mode to the Platform Coordinated mode during boot. Signed-off-by: Ulf Hansson Reviewed-by: Sudeep Holla commit a3f048b5424e68f0f7218c51e84d7b84ab0143cb Author: Ulf Hansson Date: Thu Oct 10 12:01:48 2019 +0200 dt: psci: Update DT bindings to support hierarchical PSCI states Update PSCI DT bindings to allow to represent idle states for CPUs and the CPU topology, by using a hierarchical layout. Primarily this is done by re-using the existing DT bindings for PM domains [1] and for PM domain idle states [2]. Let's also add an example into the document for the PSCI DT bindings, to clearly show the new hierarchical based layout. The currently supported flattened layout, is already described in the ARM idle states bindings [3], so let's leave that as is. [1] Documentation/devicetree/bindings/power/power_domain.txt [2] Documentation/devicetree/bindings/power/domain-idle-state.txt [3] Documentation/devicetree/bindings/arm/idle-states.txt Co-developed-by: Lina Iyer Signed-off-by: Lina Iyer Reviewed-by: Sudeep Holla Signed-off-by: Ulf Hansson commit 4386aa866d99e31243a53a75041dba7901b9ec61 Author: Sudeep Holla Date: Thu Oct 24 16:18:34 2019 +0100 cpuidle: psci: Align psci_power_state count with idle state count Instead of allocating 'n-1' states in psci_power_state to manage 'n' idle states which include "ARM WFI" state, it would be simpler to have 1:1 mapping between psci_power_state and cpuidle driver states. ARM WFI state(i.e. idx == 0) is handled specially in the generic macro CPU_PM_CPU_IDLE_ENTER_PARAM and hence state[-1] is not possible. However for sake of code readability, it is better to have 1:1 mapping and not use [idx - 1] to access psci_power_state corresponding to driver cpuidle state for idx. psci_power_state[0] is default initialised to 0 and is never accessed while entering WFI state. Reported-by: Ulf Hansson Signed-off-by: Sudeep Holla Reviewed-by: Ulf Hansson Acked-by: Rafael J. Wysocki commit def97da136515cb289a14729292c193e0a93bc64 Author: John Ogness Date: Thu Dec 19 12:59:22 2019 +0106 printk: fix exclusive_console replaying Commit f92b070f2dc8 ("printk: Do not miss new messages when replaying the log") introduced a new variable @exclusive_console_stop_seq to store when an exclusive console should stop printing. It should be set to the @console_seq value at registration. However, @console_seq is previously set to @syslog_seq so that the exclusive console knows where to begin. This results in the exclusive console immediately reactivating all the other consoles and thus repeating the messages for those consoles. Set @console_seq after @exclusive_console_stop_seq has stored the current @console_seq value. Fixes: f92b070f2dc8 ("printk: Do not miss new messages when replaying the log") Link: http://lkml.kernel.org/r/20191219115322.31160-1-john.ogness@linutronix.de Cc: Steven Rostedt Cc: linux-kernel@vger.kernel.org Signed-off-by: John Ogness Acked-by: Sergey Senozhatsky Signed-off-by: Petr Mladek commit 2ce18249af5a28031b3f909cfafccc88ea966c9d Author: Geert Uytterhoeven Date: Mon Dec 30 14:06:04 2019 +0100 drm/mipi_dbi: Fix off-by-one bugs in mipi_dbi_blank() When configuring the frame memory window, the last column and row numbers are written to the column resp. page address registers. These numbers are thus one less than the actual window width resp. height. While this is handled correctly in mipi_dbi_fb_dirty() since commit 03ceb1c8dfd1e293 ("drm/tinydrm: Fix setting of the column/page end addresses."), it is not in mipi_dbi_blank(). The latter still forgets to subtract one when calculating the most significant bytes of the column and row numbers, thus programming wrong values when the display width or height is a multiple of 256. Fixes: 02dd95fe31693626 ("drm/tinydrm: Add MIPI DBI support") Signed-off-by: Geert Uytterhoeven Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20191230130604.31006-1-geert+renesas@glider.be commit f4aec227e985e31d2fdc5608daf48e3de19157b7 Author: Kunihiko Hayashi Date: Fri Nov 29 13:19:19 2019 +0900 reset: uniphier: Add SCSSI reset control for each channel SCSSI has reset controls for each channel in the SoCs newer than Pro4, so this adds missing reset controls for channel 1, 2 and 3. And more, this moves MCSSI reset ID after SCSSI. Fixes: 6b39fd590aeb ("reset: uniphier: add reset control support for SPI") Signed-off-by: Kunihiko Hayashi Acked-by: Masahiro Yamada Signed-off-by: Philipp Zabel commit a9457ed2ebd77221d0576197507e213792615117 Author: Geert Uytterhoeven Date: Wed Nov 20 15:59:27 2019 +0100 reset: Align logic and flow in managed helpers __devm_reset_control_get() and devm_reset_control_array_get() are very similar, but they do not look similar, due to inverted logic. Make them more similar, following the "bail out early" paradigm. Adjust the logic and flow in devm_reset_controller_register() to match the two other functions. Signed-off-by: Geert Uytterhoeven Signed-off-by: Philipp Zabel commit 9c81b2ccf82da6e995b63e945afa882cfaa03ca9 Author: Tomer Maimon Date: Wed Nov 6 16:53:31 2019 +0200 reset: npcm: add NPCM reset controller driver Add Nuvoton NPCM BMC reset controller driver. Signed-off-by: Tomer Maimon Signed-off-by: Philipp Zabel commit a5df0d4e9d7d774bdd43b893fb4b1d0a743a053a Author: Tomer Maimon Date: Wed Nov 6 16:53:30 2019 +0200 dt-bindings: reset: Add binding constants for NPCM7xx reset controller Add device tree binding constants for Nuvoton BMC NPCM7xx reset controller. Signed-off-by: Tomer Maimon Reviewed-by: Rob Herring Signed-off-by: Philipp Zabel commit c6ed90b54f0869bddcd3f4c200edfcec3d1b9ae8 Author: Tomer Maimon Date: Wed Nov 6 16:53:29 2019 +0200 dt-bindings: reset: add NPCM reset controller documentation Added device tree binding documentation for Nuvoton BMC NPCM reset controller. Signed-off-by: Tomer Maimon Reviewed-by: Rob Herring Signed-off-by: Philipp Zabel commit c6d4a099a240a8742173f8e02db0ba08ffd37ef1 Author: Masahiro Yamada Date: Thu Dec 19 17:56:52 2019 +0200 drm/i915: reimplement header test feature I implemented a small build rule in drivers/gpu/drm/i915/Makefile without relying on the special header-test-y syntax that was removed in commit fcbb8461fd23 ("kbuild: remove header compile test"). I excluded some headers from the test coverage. I hope somebody intrested can take a closer look at them. Dummy subdir Makefiles can be removed altogether as single target build use case is now covered by commit 394053f4a4b3 ("kbuild: make single targets work more correctly"). v2 by Jani: - add selftests/i915_perf_selftests.h to no-header-test - add .gitignore for *.hdrtest Cc: Chris Wilson Cc: Masahiro Yamada Signed-off-by: Masahiro Yamada Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191219155652.2666-3-jani.nikula@intel.com commit fae7bfcc78146057ac2730719de8d5e41de19540 Author: Anthony Steinhauser Date: Thu Dec 26 12:45:12 2019 -0800 x86/nospec: Remove unused RSB_FILL_LOOPS It was never really used, see 117cc7a908c8 ("x86/retpoline: Fill return stack buffer on vmexit") [ bp: Massage. ] Signed-off-by: Anthony Steinhauser Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191226204512.24524-1-asteinhauser@google.com commit 1c467212ab62a0abd18b73eb1f7436a9fa4eed4e Merge: f17b898009d8 c72bed23b9e4 Author: Jani Nikula Date: Thu Jan 2 10:37:44 2020 +0200 Merge branch 'ib-pinctrl-unreg-mappings' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl into drm-intel-next-queued Merge pincntrl to unblock further i915 changes on top by Hans. Signed-off-by: Jani Nikula From: Linus Walleij Link: http://lore.kernel.org/r/CACRpkdaXFSJVkWJGzsVcvbUA9gpgP0Vbkwf1H-HWw8s35R9XYQ@mail.gmail.com commit a8772fad0172aeae339144598b809fd8d4823331 Author: Tetsuo Handa Date: Thu Jan 2 12:53:49 2020 +0900 tomoyo: Use atomic_t for statistics counter syzbot is reporting that there is a race at tomoyo_stat_update() [1]. Although it is acceptable to fail to track exact number of times policy was updated, convert to atomic_t because this is not a hot path. [1] https://syzkaller.appspot.com/bug?id=a4d7b973972eeed410596e6604580e0133b0fc04 Reported-by: syzbot Signed-off-by: Tetsuo Handa commit 49f261e273078a5dc0272296a833dc72571efd92 Author: Julia Lawall Date: Wed Jan 1 18:49:46 2020 +0100 ASoC: SOF: imx8: use resource_size Use resource_size rather than a verbose computation on the end and start fields. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) @@ struct resource ptr; @@ - (ptr.end - ptr.start + 1) + resource_size(&ptr) Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1577900990-8588-7-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown commit 0da390ba86d841b1f9770c0a67bdebb4d8dc8be5 Author: Julia Lawall Date: Wed Jan 1 08:43:28 2020 +0100 ASoC: qdsp6: q6asm-dai: constify copied structure The q6asm_dai_hardware_capture structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1577864614-5543-11-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown commit 1ce0d5162b98bf6120db1b259d0f0706e69f15fd Author: Wambui Karuga Date: Mon Dec 30 22:56:09 2019 +0300 drm/panel: declare variable as __be16 Declare the temp variable as __be16 to address the following sparse warning: drivers/gpu/drm/panel/panel-lg-lg4573.c:45:20: warning: incorrect type in initializer (different base types) drivers/gpu/drm/panel/panel-lg-lg4573.c:45:20: expected unsigned short [unsigned] [usertype] temp drivers/gpu/drm/panel/panel-lg-lg4573.c:45:20: got restricted __be16 [usertype] Signed-off-by: Wambui Karuga Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191230195609.12386-1-wambui.karugax@gmail.com commit f17b898009d8c979340ff9b68bee1232f00d1d42 Author: Chris Wilson Date: Wed Jan 1 14:10:07 2020 +0000 drm/i915/gem: Drop local vma->vm_file reference We use the global device inode, shared amongst all files, and not the user's device filp to provide the backing storage for the mmap. The vma->vm_file provides a redundant reference that breaks existing expected behaviour that closing the user's device fd will release the resources bound to it, if a mmap persists. (Even without the vma->vm_file, the mmap will persist past the user's fd as the storage is bound to the device, i.e. our reference is on the object not file.) Fixes: cc662126b413 ("drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET") Closes: https://gitlab.freedesktop.org/drm/intel/issues/919 Signed-off-by: Chris Wilson Acked-by: Abdiel Janulgue Link: https://patchwork.freedesktop.org/patch/msgid/20200101141007.755429-1-chris@chris-wilson.co.uk commit c56fc8c9ad7a8693a9c07a39fd3081576f908fea Author: Julia Lawall Date: Wed Jan 1 08:43:20 2020 +0100 ALSA: hda: constify copied structure The azx_pcm_hw structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1577864614-5543-3-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Takashi Iwai commit cb5b83580c6101ce3c7de4640ecc7f1ca6e006bf Author: Julia Lawall Date: Wed Jan 1 08:43:19 2020 +0100 ALSA: ad1816a: constify copied structure The snd_ad1816a_timer_table structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1577864614-5543-2-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Takashi Iwai commit fe23d63422c83cd7c8154dc7faef6af97be4b948 Merge: 31d518f35e1a 684ea87cc312 Author: David S. Miller Date: Tue Dec 31 21:43:31 2019 -0800 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2019-12-31 This series contains updates to e1000e, igb and igc only. Robert Beckett provide an igb change to assist in keeping packets from being dropped due to receive descriptor ring being full when receive flow control is enabled. Create a separate function to setup SRRCTL to ease in reuse and ensure that setting of the drop enable bit only if receive flow control is not enabled. Sasha adds support for scatter gather support in igc. Improve the direct memory address mapping flow by optimizing/simplifying and more clear. Update igc to use pci_release_mem_regions() instead of pci_release_selected_regions(). Clean up function header comments to align with the actual code. Adds support for 64 bit DMA access, to help handle socket buffer fragments in high memory. Adds legacy power management support in igc by implementing suspend, resume, runtime_suspend/resume, and runtime_idle callbacks. Clean up references to Serdes interface in igc since that interface is not supported for i225 devices. Alex replaces the pr_info calls with netdev_info in all cases related to netdev link state, as suggested by Joe Perches. ==================== Signed-off-by: David S. Miller commit 1cd21a7c5679015352e8a6f46813aced51d71bb8 Author: Matt Roper Date: Tue Dec 31 11:07:13 2019 -0800 drm/i915: Add Wa_1407352427:icl,ehl The workaround database now indicates we need to disable psdunit clock gating as well. v3: - Rebase on top of other workarounds that have landed. - Restrict cc:stable tag to 5.2+ since that's when ICL was first officially supported. Bspec: 32354 Bspec: 33450 Bspec: 33451 Suggested-by: Lionel Landwerlin Cc: stable@vger.kernel.org # v5.2+ Cc: Lionel Landwerlin Cc: Lucas De Marchi Cc: Matt Atwood Signed-off-by: Matt Roper Acked-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20191231190713.1549533-1-matthew.d.roper@intel.com commit 32f408ac3e5d95781f52328a09e5409b01255841 Author: Chris Wilson Date: Tue Dec 31 12:27:08 2019 +0000 drm/i915/gt: Restore coarse power gating The coarse power gating was disabled as part of commit 2248a28384fe ("drm/i915/gen8+: Add RC6 CTX corruption WA") as a prelude to recover from the context corruption; the power gating itself has no direct impact on the RC6 context corruption. However, that recovery scheme was never implemented due to difficult corner cases, and so we no longer need to keep the power gating disabled. Fixes: 2248a28384fe ("drm/i915/gen8+: Add RC6 CTX corruption WA") Closes: https://gitlab.freedesktop.org/drm/intel/issues/846 Signed-off-by: Chris Wilson Cc: Imre Deak Cc: Mika Kuoppala Cc: Eero Tamminen Cc: Jon Bloomfield Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20191231122708.4025916-1-chris@chris-wilson.co.uk commit b2e55ca89245fccd459a2d56850822a69a6f91da Author: Sven Eckelmann Date: Wed Jan 1 00:51:33 2020 +0100 batman-adv: Disable CONFIG_BATMAN_ADV_SYSFS by default The sysfs support in batman-adv is deprecated since a while and will be removed completely next year. All tools which were known to the batman-adv development team are supporting the batman-adv netlink interface since a while. Thus disabling CONFIG_BATMAN_ADV_SYSFS by default should not cause problems on most systems. It is still possible to enable it in case it is still required in a specific setup. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 68e039f966cb577c91649a02591646ac3919f8c9 Author: Sven Eckelmann Date: Wed Jan 1 00:00:01 2020 +0100 batman-adv: Update copyright years for 2020 Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 684ea87cc312c98386c667d1046c61eb92ea8379 Author: Sasha Neftin Date: Mon Dec 2 09:56:26 2019 +0200 igc: Remove serdes comments from a description of methods Serdes interface is not applicable for i225 devices. Remove this from comments and make comments more clearly. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit c557a4b3f73837bf074e643e163a37f848c9781c Author: Alexander Duyck Date: Thu Oct 31 09:58:51 2019 -0700 e1000e: Use netdev_info instead of pr_info for link messages Replace the pr_info calls with netdev_info in all cases related to the netdevice link state. As a result of this patch the link messages will change as shown below. Before: e1000e: ens3 NIC Link is Down e1000e: ens3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx After: e1000e 0000:00:03.0 ens3: NIC Link is Down e1000e 0000:00:03.0 ens3: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx Suggested-by: Joe Perches Signed-off-by: Alexander Duyck Acked-by: Neil Horman Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 9513d2a5dc7f3f2c037bfd2ea35264cc783b954e Author: Sasha Neftin Date: Thu Nov 14 09:54:46 2019 +0200 igc: Add legacy power management support Add suspend, resume, runtime_suspend, runtime_resume and runtime_idle callbacks implementation. Reported-by: kbuild test robot Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 31d518f35e1a80268a24a855be9477eb458540ad Merge: 9e860947d8d7 738d2902773e Author: David S. Miller Date: Tue Dec 31 13:37:13 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Simple overlapping changes in bpf land wrt. bpf_helper_defs.h handling. Signed-off-by: David S. Miller commit 1764b992be0f1c4295d2d9572ec46d568bd3fc14 Author: Abdiel Janulgue Date: Tue Dec 31 20:03:56 2019 +0000 drm/i915: Introduce remap_io_sg() to prefault discontiguous objects Provide a way to set the PTE within apply_page_range for discontiguous objects in addition to the existing method of just incrementing the pfn for a page range. Fixes: cc662126b413 ("drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET") Signed-off-by: Abdiel Janulgue Cc: Chris Wilson Cc: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191231200356.409475-1-chris@chris-wilson.co.uk commit 4439dc427d83c67aaa8447091c479c482ff85af9 Author: Sasha Neftin Date: Wed Nov 13 11:27:29 2019 +0200 igc: Add 64 bit DMA access support On relevant platforms ndo_start_xmit can handle socket buffer fragments in high memory Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 86efeccd5a7adcfbe12c0ba558615e53a33b67fc Author: Sasha Neftin Date: Tue Nov 12 17:13:32 2019 +0200 igc: Fix parameter descriptions for a several functions igc_watchdog, igc_set_interrupt_capability, igc_init_interrupt_scheme, __igc_open and __igc_close parameter descriptions has not reflected functions meaning. Add meaningful description. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 085c858950419f5a7eea351c2e5cb999b4caad2d Author: Sasha Neftin Date: Mon Nov 11 09:04:12 2019 +0200 igc: Fix the parameter description for igc_alloc_rx_buffers The function description for igc_alloc_rx_buffers has not reflected the function meaning. Add meaningful description. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 57cd472c2baa1d1dc7f037d2c6d6d7d29be29d5d Author: Sasha Neftin Date: Sun Nov 10 17:57:44 2019 +0200 igc: Remove excess parameter description from igc_is_non_eop The function description for igc_is_non_eop includes an extra @skb parameter description. This parameter doesn't exist on the function, so remove it. Suggested-by: Jacob Keller Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit faf4dd52e9e34a36254a6ad43369064b6928d504 Author: Sasha Neftin Date: Sun Nov 10 16:05:20 2019 +0200 igc: Prefer to use the pci_release_mem_regions method Use the pci_release_mem_regions method instead of the pci_release_selected_regions method Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 21da01fd3bb1124b46e6b15657de36dffcc58af9 Author: Sasha Neftin Date: Tue Nov 5 11:44:13 2019 +0200 igc: Improve the DMA mapping flow Improve the probe flow and set both the DMA mask and the coherent to the same thing. Make the flow optimized and cleared. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit b7b462454a5c2aed1d8aecd165d1dae9017bd5fd Author: Sasha Neftin Date: Thu Oct 31 08:06:07 2019 +0200 igc: Add scatter gather support Scatter gather is used to do DMA data transfers of data that is written to noncontiguous areas of memory. This patch enables scatter gather support. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 6506f52dcbf8c2afca47bd7a48c18459e1f04f86 Author: Robert Beckett Date: Tue Oct 22 16:31:41 2019 +0100 igb: dont drop packets if rx flow control is enabled If Rx flow control has been enabled (via autoneg or forced), packets should not be dropped due to Rx descriptor ring exhaustion. Instead pause frames should be used to apply back pressure. This only applies if VFs are not in use. Move SRRCTL setup to its own function for easy reuse and only set drop enable bit if Rx flow control is not enabled. Since v1: always enable dropping of packets if VFs in use. Signed-off-by: Robert Beckett Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit cc39da0e4c5d084b96d44c56aba3d712a83f7567 Author: Matt Roper Date: Tue Dec 24 15:15:21 2019 -0800 drm/i915/tgl: Assume future platforms will inherit TGL's SFC capability Our usual i915 convention is to assume that future platforms will follow the same behavior as the latest platform of today. The VDBOX/SFC capabilities described here don't seem like something that should be specific to TGL, so let's future-proof by making the test apply to all gen12+ platforms. Cc: Lucas De Marchi Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191224231521.3430660-1-matthew.d.roper@intel.com Reviewed-by: Lucas De Marchi commit 24c66274e764de7d5851a35175e6e7ffbce24420 Author: Chris Wilson Date: Tue Dec 31 12:08:57 2019 +0000 drm/i915/gt: Tweak flushes around ivb ppgtt A small tweak to flush then invalidate appears to improve the reliability of ppGTT switches on Ivybridge -- but does not improve hsw/vlv bcs reliability. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191231120857.4014900-1-chris@chris-wilson.co.uk commit f4a0b08b39ae9c81c827c06550579f4580bd82ac Author: Eric Biggers Date: Mon Dec 9 12:45:09 2019 -0800 fscrypt: remove redundant bi_status check submit_bio_wait() already returns bi_status translated to an errno. So the additional check of bi_status is redundant and can be removed. Link: https://lore.kernel.org/r/20191209204509.228942-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit ede7a09fc8815011d67942e5b4a3cb1882b7bcd9 Author: Herbert Xu Date: Fri Dec 27 10:47:00 2019 +0800 fscrypt: Allow modular crypto algorithms The commit 643fa9612bf1 ("fscrypt: remove filesystem specific build config option") removed modular support for fs/crypto. This causes the Crypto API to be built-in whenever fscrypt is enabled. This makes it very difficult for me to test modular builds of the Crypto API without disabling fscrypt which is a pain. As fscrypt is still evolving and it's developing new ties with the fs layer, it's hard to build it as a module for now. However, the actual algorithms are not required until a filesystem is mounted. Therefore we can allow them to be built as modules. Signed-off-by: Herbert Xu Link: https://lore.kernel.org/r/20191227024700.7vrzuux32uyfdgum@gondor.apana.org.au Signed-off-by: Eric Biggers commit e933adde6f97c4b51d39250c1dad0e89bd3fb1c7 Author: Eric Biggers Date: Thu Dec 19 10:56:24 2019 -0800 fscrypt: include in UAPI header defines ioctl numbers using the macros like _IOWR() which are defined in , so should be included as a prerequisite, like it is in many other kernel headers. In practice this doesn't really matter since anyone referencing these ioctl numbers will almost certainly include too in order to actually call ioctl(). But we might as well fix this. Link: https://lore.kernel.org/r/20191219185624.21251-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 3b1ada55b905f306411f481df52b586cc8a407b8 Author: Eric Biggers Date: Mon Dec 9 13:23:48 2019 -0800 fscrypt: don't check for ENOKEY from fscrypt_get_encryption_info() fscrypt_get_encryption_info() returns 0 if the encryption key is unavailable; it never returns ENOKEY. So remove checks for ENOKEY. Link: https://lore.kernel.org/r/20191209212348.243331-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit b7e8d3d27edde7a05e195e0015bc6873f6263a30 Author: Eric Biggers Date: Mon Dec 9 13:18:29 2019 -0800 fscrypt: remove fscrypt_is_direct_key_policy() fscrypt_is_direct_key_policy() is no longer used, so remove it. Link: https://lore.kernel.org/r/20191209211829.239800-5-ebiggers@kernel.org Signed-off-by: Eric Biggers commit ef5b18b00bada6091fb531fb0c29cf0f7e1a3b85 Author: Eric Biggers Date: Mon Dec 9 13:18:28 2019 -0800 fscrypt: move fscrypt_valid_enc_modes() to policy.c fscrypt_valid_enc_modes() is only used by policy.c, so move it to there. Also adjust the order of the checks to be more natural, matching the numerical order of the constants and also keeping AES-256 (the recommended default) first in the list. No change in behavior. Link: https://lore.kernel.org/r/20191209211829.239800-4-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 85af90e57ce9697d36d479124e0bfffb145e39a4 Author: Eric Biggers Date: Mon Dec 9 13:18:27 2019 -0800 fscrypt: check for appropriate use of DIRECT_KEY flag earlier FSCRYPT_POLICY_FLAG_DIRECT_KEY is currently only allowed with Adiantum encryption. But FS_IOC_SET_ENCRYPTION_POLICY allowed it in combination with other encryption modes, and an error wasn't reported until later when the encrypted directory was actually used. Fix it to report the error earlier by validating the correct use of the DIRECT_KEY flag in fscrypt_supported_policy(), similar to how we validate the IV_INO_LBLK_64 flag. Link: https://lore.kernel.org/r/20191209211829.239800-3-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 393a24a7956ce27d110b06bbd1674408ab8f6132 Author: Eric Biggers Date: Mon Dec 9 13:18:26 2019 -0800 fscrypt: split up fscrypt_supported_policy() by policy version Make fscrypt_supported_policy() call new functions fscrypt_supported_v1_policy() and fscrypt_supported_v2_policy(), to reduce the indentation level and make the code easier to read. Also adjust the function comment to mention that whether the encryption policy is supported can also depend on the inode. No change in behavior. Link: https://lore.kernel.org/r/20191209211829.239800-2-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 56dce717950925f9d734b9e5621cbd41cbeb3e33 Author: Eric Biggers Date: Mon Dec 9 12:50:21 2019 -0800 fscrypt: introduce fscrypt_needs_contents_encryption() Add a function fscrypt_needs_contents_encryption() which takes an inode and returns true if it's an encrypted regular file and the kernel was built with fscrypt support. This will allow replacing duplicated checks of IS_ENCRYPTED() && S_ISREG() on the I/O paths in ext4 and f2fs, while also optimizing out unneeded code when !CONFIG_FS_ENCRYPTION. Link: https://lore.kernel.org/r/20191209205021.231767-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 2ebdef6d8c766ab7da532002091ad486f9db88ed Author: Eric Biggers Date: Mon Dec 9 12:43:59 2019 -0800 fscrypt: move fscrypt_d_revalidate() to fname.c fscrypt_d_revalidate() and fscrypt_d_ops really belong in fname.c, since they're specific to filenames encryption. crypto.c is for contents encryption and general fs/crypto/ initialization and utilities. Link: https://lore.kernel.org/r/20191209204359.228544-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 8a4ab0b866d8aba85b9899edebf14b87b25f817f Author: Eric Biggers Date: Sun Dec 15 13:39:47 2019 -0800 fscrypt: constify inode parameter to filename encryption functions Constify the struct inode parameter to fscrypt_fname_disk_to_usr() and the other filename encryption functions so that users don't have to pass in a non-const inode when they are dealing with a const one, as in [1]. [1] https://lkml.kernel.org/linux-ext4/20191203051049.44573-6-drosen@google.com/ Cc: Daniel Rosenberg Link: https://lore.kernel.org/r/20191215213947.9521-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 2a5831b1d29754c216ad3b06a018c29e74d4ad10 Author: Eric Biggers Date: Mon Dec 9 12:40:54 2019 -0800 fscrypt: constify struct fscrypt_hkdf parameter to fscrypt_hkdf_expand() Constify the struct fscrypt_hkdf parameter to fscrypt_hkdf_expand(). This makes it clearer that struct fscrypt_hkdf contains the key only, not any per-request state. Link: https://lore.kernel.org/r/20191209204054.227736-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit c64cfb989f008eed2622e822e90f2fcabd49d605 Author: Eric Biggers Date: Mon Dec 9 12:39:18 2019 -0800 fscrypt: verify that the crypto_skcipher has the correct ivsize As a sanity check, verify that the allocated crypto_skcipher actually has the ivsize that fscrypt is assuming it has. This will always be the case unless there's a bug. But if there ever is such a bug (e.g. like there was in earlier versions of the ESSIV conversion patch [1]) it's preferable for it to be immediately obvious, and not rely on the ciphertext verification tests failing due to uninitialized IV bytes. [1] https://lkml.kernel.org/linux-crypto/20190702215517.GA69157@gmail.com/ Link: https://lore.kernel.org/r/20191209203918.225691-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 6e1adb88d230b08ad9a223ecaea1e6b238a9078f Author: Eric Biggers Date: Mon Dec 9 12:38:10 2019 -0800 fscrypt: use crypto_skcipher_driver_name() Crypto API users shouldn't really be accessing struct skcipher_alg directly. already has a function crypto_skcipher_driver_name(), so use that instead. No change in behavior. Link: https://lore.kernel.org/r/20191209203810.225302-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 93edd392cad7485097c2e9068c764ae30083bb05 Author: Eric Biggers Date: Tue Nov 19 14:24:47 2019 -0800 fscrypt: support passing a keyring key to FS_IOC_ADD_ENCRYPTION_KEY Extend the FS_IOC_ADD_ENCRYPTION_KEY ioctl to allow the raw key to be specified by a Linux keyring key, rather than specified directly. This is useful because fscrypt keys belong to a particular filesystem instance, so they are destroyed when that filesystem is unmounted. Usually this is desired. But in some cases, userspace may need to unmount and re-mount the filesystem while keeping the keys, e.g. during a system update. This requires keeping the keys somewhere else too. The keys could be kept in memory in a userspace daemon. But depending on the security architecture and assumptions, it can be preferable to keep them only in kernel memory, where they are unreadable by userspace. We also can't solve this by going back to the original fscrypt API (where for each file, the master key was looked up in the process's keyring hierarchy) because that caused lots of problems of its own. Therefore, add the ability for FS_IOC_ADD_ENCRYPTION_KEY to accept a Linux keyring key. This solves the problem by allowing userspace to (if needed) save the keys securely in a Linux keyring for re-provisioning, while still using the new fscrypt key management ioctls. This is analogous to how dm-crypt accepts a Linux keyring key, but the key is then stored internally in the dm-crypt data structures rather than being looked up again each time the dm-crypt device is accessed. Use a custom key type "fscrypt-provisioning" rather than one of the existing key types such as "logon". This is strongly desired because it enforces that these keys are only usable for a particular purpose: for fscrypt as input to a particular KDF. Otherwise, the keys could also be passed to any kernel API that accepts a "logon" key with any service prefix, e.g. dm-crypt, UBIFS, or (recently proposed) AF_ALG. This would risk leaking information about the raw key despite it ostensibly being unreadable. Of course, this mistake has already been made for multiple kernel APIs; but since this is a new API, let's do it right. This patch has been tested using an xfstest which I wrote to test it. Link: https://lore.kernel.org/r/20191119222447.226853-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 36209766cede1fe9d39f3d3418d93bbf71ad21c4 Author: Borislav Petkov Date: Tue Dec 31 17:15:35 2019 +0100 x86/traps: Cleanup do_general_protection() Hoist the user_mode() case up because it is less code and can be dealt with up-front like the other special cases UMIP and vm86. This saves an indentation level for the kernel-mode #GP case and allows to "unfold" the code more so that it is more readable. No functional changes. Signed-off-by: Borislav Petkov Cc: Jann Horn Cc: x86@kernel.org commit 2f004eea0fc8f86b45dfc2007add2d4986de8d02 Author: Jann Horn Date: Thu Dec 19 00:11:50 2019 +0100 x86/kasan: Print original address on #GP Make #GP exceptions caused by out-of-bounds KASAN shadow accesses easier to understand by computing the address of the original access and printing that. More details are in the comments in the patch. This turns an error like this: kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault, probably for non-canonical address 0xe017577ddf75b7dd: 0000 [#1] PREEMPT SMP KASAN PTI into this: general protection fault, probably for non-canonical address 0xe017577ddf75b7dd: 0000 [#1] PREEMPT SMP KASAN PTI KASAN: maybe wild-memory-access in range [0x00badbeefbadbee8-0x00badbeefbadbeef] The hook is placed in architecture-independent code, but is currently only wired up to the X86 exception handler because I'm not sufficiently familiar with the address space layout and exception handling mechanisms on other architectures. Signed-off-by: Jann Horn Signed-off-by: Borislav Petkov Reviewed-by: Dmitry Vyukov Cc: Alexander Potapenko Cc: Andrew Morton Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: kasan-dev@googlegroups.com Cc: linux-mm Cc: Peter Zijlstra Cc: Sean Christopherson Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191218231150.12139-4-jannh@google.com commit aa49f20462c90df4150f33d245cbcfe0d9c80350 Author: Jann Horn Date: Thu Dec 19 00:11:49 2019 +0100 x86/dumpstack: Introduce die_addr() for die() with #GP fault address Split __die() into __die_header() and __die_body(). This allows inserting extra information below the header line that initiates the bug report. Introduce a new function die_addr() that behaves like die(), but is for faults only and uses __die_header() and __die_body() so that a future commit can print extra information after the header line. [ bp: Comment the KASAN-specific usage of gp_addr. ] Signed-off-by: Jann Horn Signed-off-by: Borislav Petkov Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Dmitry Vyukov Cc: "Eric W. Biederman" Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: kasan-dev@googlegroups.com Cc: Masami Hiramatsu Cc: "Peter Zijlstra (Intel)" Cc: Sean Christopherson Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191218231150.12139-3-jannh@google.com commit 4f279f9fbca54464173240f7e73b145a136dfa1e Author: Robin Murphy Date: Sun Dec 29 20:16:17 2019 +0000 arm64: dts: rockchip: Add RK3328 idle state Downstream RK3328 DTBs describe a CPU idle state matching that present on other SoCs like RK3399. This works with upstream Trusted Firmware-A too, so let's add it here. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/a8c83e705d387446ea8121516d410e38b2d9c57b.1577640736.git.robin.murphy@arm.com Signed-off-by: Heiko Stuebner commit ba790c16a8b0a26b0a4ebfd26bf059ff3a0f9ff8 Author: Johan Jonker Date: Sat Dec 28 08:47:57 2019 +0100 arm64: dts: rockchip: remove identical &uart0 node from rk3368-lion-haikou There are two identical &uart0 nodes in this dts file, so remove one of them. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20191228074757.2075-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 59c1dcbed5b51cab543be8f47b6d7d9cf107ec94 Author: Jann Horn Date: Thu Dec 19 00:11:48 2019 +0100 x86/traps: Print address on #GP A frequent cause of #GP exceptions are memory accesses to non-canonical addresses. Unlike #PF, #GP doesn't report a fault address in CR2, so the kernel doesn't currently print the fault address for a #GP. Luckily, the necessary infrastructure for decoding x86 instructions and computing the memory address being accessed is already present. Hook it up to the #GP handler so that the address operand of the faulting instruction can be figured out and printed. Distinguish two cases: a) (Part of) the memory range being accessed lies in the non-canonical address range; in this case, it is likely that the decoded address is actually the one that caused the #GP. b) The entire memory range of the decoded operand lies in canonical address space; the #GP may or may not be related in some way to the computed address. Print it, but with hedging language in the message. While it is already possible to compute the faulting address manually by disassembling the opcode dump and evaluating the instruction against the register dump, this should make it slightly easier to identify crashes at a glance. Note that the operand length which comes from the instruction decoder and is used to determine whether the access straddles into non-canonical address space, is currently somewhat unreliable; but it should be good enough, considering that Linux on x86-64 never maps the page directly before the start of the non-canonical range anyway, and therefore the case where a memory range begins in that page and potentially straddles into the non-canonical range should be fairly uncommon. In the case the address is still computed wrongly, it only influences whether the error message claims that the access is canonical. [ bp: Remove ambiguous "we", massage, reflow comments and spacing. ] Signed-off-by: Jann Horn Signed-off-by: Borislav Petkov Reviewed-by: Sean Christopherson Tested-by: Sean Christopherson Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Dmitry Vyukov Cc: "Eric W. Biederman" Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: kasan-dev@googlegroups.com Cc: Masami Hiramatsu Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191218231150.12139-2-jannh@google.com commit fe4a76fafdb4d072e0842d55cccfa141a1912457 Author: Geert Uytterhoeven Date: Fri Dec 13 17:27:36 2019 +0100 ARM: dts: sh73a0: Add missing clock-frequency for fixed clocks "clock-frequency" is a required property for devices nodes compatible with "fixed-clock", leading to warnings when running $ make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/clock/fixed-clock.yaml arch/arm/boot/dts/sh73a0-kzm9g.dt.yaml: extcki: 'clock-frequency' is a required property Fix this by adding the missing "clock-frequency" properties to the various clocks, to be overridden by the board DTS files when populated. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191213162736.2160-1-geert+renesas@glider.be commit 0aed218f794892d5ba64794e4f609e625d737e10 Author: Geert Uytterhoeven Date: Fri Dec 13 17:27:12 2019 +0100 ARM: dts: r8a7778: Add missing clock-frequency for fixed clocks "clock-frequency" is a required property for devices nodes compatible with "fixed-clock", leading to warnings when running $ make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/clock/fixed-clock.yaml arch/arm/boot/dts/r8a7778-bockw.dt.yaml: audio_clk_a: 'clock-frequency' is a required property arch/arm/boot/dts/r8a7778-bockw.dt.yaml: audio_clk_b: 'clock-frequency' is a required property arch/arm/boot/dts/r8a7778-bockw.dt.yaml: audio_clk_c: 'clock-frequency' is a required property Fix this by adding the missing "clock-frequency" properties to the audio clocks, to be overridden by board DTS files when populated. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191213162712.2056-1-geert+renesas@glider.be commit 3bb426d042f36119e10978e28c311a1f9d6ee913 Author: Geert Uytterhoeven Date: Fri Dec 13 17:26:04 2019 +0100 ARM: dts: rcar-gen2: Add missing mmio-sram bus properties "#address-cells", "#size-cells", and "ranges" are required properties for devices nodes compatible with "mmio-sram", leading to warnings when running "make dtbs_check": $ make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/sram/sram.yaml arch/arm/boot/dts/r8a7791-koelsch.dt.yaml: sram@e63a0000: '#address-cells' is a required property arch/arm/boot/dts/r8a7791-koelsch.dt.yaml: sram@e63a0000: '#size-cells' is a required property arch/arm/boot/dts/r8a7791-koelsch.dt.yaml: sram@e63a0000: 'ranges' is a required property ... Fix this by adding the missing properties to the mmio-sram device nodes in the DTS files for all affected R-Car Gen2 and RZ/G1 SoCs. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191213162604.1890-1-geert+renesas@glider.be commit 505128865a0e47a824c3f0f4344169fbd0fcc6d7 Author: Geert Uytterhoeven Date: Fri Dec 13 17:24:59 2019 +0100 ARM: dts: rcar-gen2: Fix PCI high address in interrupt-map-mask "make dtbs_check" emits warnings like: pci@ee090000: interrupt-map-mask:0:0: 65280 is greater than the maximum of 63488 pci@ee0b0000: interrupt-map-mask:0:0: 65280 is greater than the maximum of 63488 pci@ee0d0000: interrupt-map-mask:0:0: 65280 is greater than the maximum of 63488 According to dt-schemas/schemas/pci/pci-bus.yaml, the PCI high address cell value in the "interrupt-map-mask" property must lie in the range 0..0xf800. Fix this by correcting the values from 0xff00 to 0xf800 in all affected R-Car Gen2 and RZ/G1 DTS files. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191213162459.1731-1-geert+renesas@glider.be commit 7ba33c335a5b9ef6097ae22cfafbd6e93aa8c5da Author: Geert Uytterhoeven Date: Tue Dec 17 19:38:40 2019 +0100 arm64: dts: renesas: Prepare for split of ARCH_R8A7795 into ARCH_R8A7795[01] As R-Car H3 ES1.x (R8A77950) and R-Car H3 ES2.0+ (R8A77951) are really different SoCs, CONFIG_ARCH_R8A7795 will be split in CONFIG_ARCH_R8A77950 and CONFIG_ARCH_R8A77951. Relax dependencies by handling both the old and the new symbols. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191217183841.432-5-geert+renesas@glider.be commit 567d4ffb6dc545b210bd64988a8087662605615c Author: Geert Uytterhoeven Date: Tue Dec 17 19:38:39 2019 +0100 arm64: dts: renesas: Sort DTBs in Makefile Sort the entries for the various DTBs in the Makefile by SoC and board type. Keep Salvator-X(S) together, and do the same for ULCB with and without Kingfisher extension. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191217183841.432-4-geert+renesas@glider.be commit 919d31abe701c46afb1005ed46c09388390c5685 Author: Geert Uytterhoeven Date: Tue Dec 17 19:38:38 2019 +0100 arm64: dts: renesas: Drop redundant SoC prefixes from ULCB DTS file names Unlike the V3MSK and V3HSK boards, the various "ULCB" boards are really the same boards, with different SiPs fitted, just like the Salvator-X(S) boards. Furthermore, the "H3", "M3", and "M3N" prefixes of the "ULCB" parts in the DTS file names are redundant, as they are implied by the SoC part numbers, which are also part of the file names. Hence drop the redundant prefixes, to make the DTS file names consistent with the file names for the various "Salvator-X(S)" boards. Suggested-by: Eugeniu Rosca Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191217183841.432-3-geert+renesas@glider.be commit 052e99db7c00864c67150a37cf2a615f58c09a32 Author: Geert Uytterhoeven Date: Tue Dec 17 19:38:37 2019 +0100 arm64: dts: renesas: Rename r8a7795{-es1,}* to r8a7795[01]* Despite using the same compatible values ("r8a7795"-based) because of historical reasons, R-Car H3 ES1.x (R8A77950) and R-Car H3 ES2.0+ (R8A77951) are really different SoCs, with different part numbers. Reflect this in the DTS files by changing their base names from "r8a7795-es1" and "r8a7795" to "r8a77950" resp. "r8a77951". Drop all "ES" references next to part numbers, as they are implied by the part numbers, and thus redundant. Note that DT binding headers, definitions, and compatible values are not renamed, to preserve backward compatibility. Signed-off-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191217183841.432-2-geert+renesas@glider.be commit b4fba344a293076947fcf3d60dda51f955e19c77 Author: Geert Uytterhoeven Date: Wed Dec 18 20:48:12 2019 +0100 sh: sh7269: Remove bogus SSU GPIO function definitions SH7269 has no Synchronous Serial Communication Unit (SSU). Remove the bogus enum IDs, which caused holes in pinmux_func_gpios[]. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191218194812.12741-7-geert+renesas@glider.be commit db9c07272c8245a2d7345336cfbe652af6182203 Author: Geert Uytterhoeven Date: Wed Dec 18 20:48:11 2019 +0100 sh: sh7264: Remove bogus SSU GPIO function definitions SH7264 has no Synchronous Serial Communication Unit (SSU). Remove the bogus enum IDs, which caused holes in pinmux_func_gpios[]. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191218194812.12741-6-geert+renesas@glider.be commit 02aeb2f21530c98fc3ca51028eda742a3fafbd9f Author: Geert Uytterhoeven Date: Wed Dec 18 20:48:10 2019 +0100 pinctrl: sh-pfc: sh7269: Fix CAN function GPIOs pinmux_func_gpios[] contains a hole due to the missing function GPIO definition for the "CTX0&CTX1" signal, which is the logical "AND" of the first two CAN outputs. A closer look reveals other issues: - Some functionality is available on alternative pins, but the PINMUX_DATA() entries is using the wrong marks, - Several configurations are missing. Fix this by: - Renaming CTX0CTX1CTX2_MARK, CRX0CRX1_PJ22_MARK, and CRX0CRX1CRX2_PJ20_MARK to CTX0_CTX1_CTX2_MARK, CRX0_CRX1_PJ22_MARK, resp. CRX0_CRX1_CRX2_PJ20_MARK for consistency with the corresponding enum IDs, - Adding all missing enum IDs and marks, - Use the right (*_PJ2x) variants for alternative pins, - Adding all missing configurations to pinmux_data[], - Adding all missing function GPIO definitions to pinmux_func_gpios[]. See SH7268 Group, SH7269 Group User’s Manual: Hardware, Rev. 2.00: [1] Table 1.4 List of Pins [2] Figure 23.29 Connection Example when Using Channels 0 and 1 as One Channel (64 Mailboxes × 1 Channel) and Channel 2 as One Channel (32 Mailboxes × 1 Channel), [3] Figure 23.30 Connection Example when Using Channels 0, 1, and 2 as One Channel (96 Mailboxes × 1 Channel), [4] Table 48.3 Multiplexed Pins (Port B), [5] Table 48.4 Multiplexed Pins (Port C), [6] Table 48.10 Multiplexed Pins (Port J), [7] Section 48.2.4 Port B Control Registers 0 to 5 (PBCR0 to PBCR5). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191218194812.12741-5-geert+renesas@glider.be commit 55b1cb1f03ad5eea39897d0c74035e02deddcff2 Author: Geert Uytterhoeven Date: Wed Dec 18 20:48:09 2019 +0100 pinctrl: sh-pfc: sh7264: Fix CAN function GPIOs pinmux_func_gpios[] contains a hole due to the missing function GPIO definition for the "CTX0&CTX1" signal, which is the logical "AND" of the two CAN outputs. Fix this by: - Renaming CRX0_CRX1_MARK to CTX0_CTX1_MARK, as PJ2MD[2:0]=010 configures the combined "CTX0&CTX1" output signal, - Renaming CRX0X1_MARK to CRX0_CRX1_MARK, as PJ3MD[1:0]=10 configures the shared "CRX0/CRX1" input signal, which is fed to both CAN inputs, - Adding the missing function GPIO definition for "CTX0&CTX1" to pinmux_func_gpios[], - Moving all CAN enums next to each other. See SH7262 Group, SH7264 Group User's Manual: Hardware, Rev. 4.00: [1] Figure 1.2 (3) (Pin Assignment for the SH7264 Group (1-Mbyte Version), [2] Figure 1.2 (4) Pin Assignment for the SH7264 Group (640-Kbyte Version, [3] Table 1.4 List of Pins, [4] Figure 20.29 Connection Example when Using This Module as 1-Channel Module (64 Mailboxes x 1 Channel), [5] Table 32.10 Multiplexed Pins (Port J), [6] Section 32.2.30 (3) Port J Control Register 0 (PJCR0). Note that the last 2 disagree about PJ2MD[2:0], which is probably the root cause of this bug. But considering [4], "CTx0&CTx1" in [5] must be correct, and "CRx0&CRx1" in [6] must be wrong. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191218194812.12741-4-geert+renesas@glider.be commit 2a069a92811fb35b57aaa1bfbe406afcc723f490 Author: Geert Uytterhoeven Date: Wed Dec 18 20:48:08 2019 +0100 pinctrl: sh-pfc: sh7264: Fix Port K I/O Register 0 definition The register definition block for the Port K I/O Register is accidentally using the defines for Port J. Replace them by the proper Port K defines. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191218194812.12741-3-geert+renesas@glider.be commit 805f635703b2562b5ddd822c62fc9124087e5dd5 Author: Geert Uytterhoeven Date: Wed Dec 18 20:48:07 2019 +0100 pinctrl: sh-pfc: r8a7778: Fix duplicate SDSELF_B and SD1_CLK_B The FN_SDSELF_B and FN_SD1_CLK_B enum IDs are used twice, which means one set of users must be wrong. Replace them by the correct enum IDs. Fixes: 87f8c988636db0d4 ("sh-pfc: Add r8a7778 pinmux support") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191218194812.12741-2-geert+renesas@glider.be commit 4e52af1ccaa2d979894d4d059037ff9ec4d26a83 Author: Krzysztof Kozlowski Date: Tue Dec 31 08:46:32 2019 +0100 usb: host: Do not compile test deprecated USB_OCTEON_EHCI The USB_OCTEON_EHCI is deprecated and only selects proper driver so there is no need to compile test it. Since it selects USB_EHCI_BIG_ENDIAN_MMIO it causes compilation failures on certain big endian architectures (e.g. m68k): In file included from drivers/usb/host/ehci-mxc.c:19:0: drivers/usb/host/ehci.h: In function ‘ehci_readl’: drivers/usb/host/ehci.h:743:3: error: implicit declaration of function ‘readl_be’ [-Werror=implicit-function-declaration] Reported-by: kbuild test robot Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/1577778392-570-1-git-send-email-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9e860947d8d7a1504476ac49abfce90a4ce600f3 Author: Vijay Khemka Date: Fri Dec 27 14:43:49 2019 -0800 net/ncsi: Fix gma flag setting after response gma_flag was set at the time of GMA command request but it should only be set after getting successful response. Movinng this flag setting in GMA response handler. This flag is used mainly for not repeating GMA command once received MAC address. Signed-off-by: Vijay Khemka Reviewed-by: Samuel Mendoza-Jonas Signed-off-by: David S. Miller commit f398efc14a9277b55defff71f59a46fdf13c713f Author: Kevin Kou Date: Fri Dec 27 13:11:16 2019 +0000 sctp: add enabled check for path tracepoint loop. sctp_outq_sack is the main function handles SACK, it is called very frequently. As the commit "move trace_sctp_probe_path into sctp_outq_sack" added below code to this function, sctp tracepoint is disabled most of time, but the loop of transport list will be always called even though the tracepoint is disabled, this is unnecessary. + /* SCTP path tracepoint for congestion control debugging. */ + list_for_each_entry(transport, transport_list, transports) { + trace_sctp_probe_path(transport, asoc); + } This patch is to add tracepoint enabled check at outside of the loop of transport list, and avoid traversing the loop when trace is disabled, it is a small optimization. Signed-off-by: Kevin Kou Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 9010ef57592c01a20cc3547b64121b67f5949704 Merge: db99d5126fb9 19d1f0ed74b7 Author: David S. Miller Date: Mon Dec 30 20:31:41 2019 -0800 Merge branch 'Improvements-to-SJA1105-DSA-RX-timestamping' Vladimir Oltean says: ==================== Improvements to SJA1105 DSA RX timestamping This series makes the sja1105 DSA driver use a dedicated kernel thread for RX timestamping, a process which is time-sensitive and otherwise a bit fragile. This allows users to customize their system (probabil an embedded PTP switch) fully and allocate the CPU bandwidth for the driver to expedite the RX timestamps as quickly as possible. While doing this conversion, add a function to the PTP core for cancelling this kernel thread (function which I found rather strange to be missing). ==================== Signed-off-by: David S. Miller commit 19d1f0ed74b75279f46549de80fa2adf80ef9995 Author: Vladimir Oltean Date: Fri Dec 27 15:02:30 2019 +0200 net: dsa: sja1105: Empty the RX timestamping queue on PTP settings change When disabling PTP timestamping, don't reset the switch with the new static config until all existing PTP frames have been timestamped on the RX path or dropped. There's nothing we can do with these afterwards. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 1e762bd278d2a70bc74b9cbee7f1e93bd4704fe2 Author: Vladimir Oltean Date: Fri Dec 27 15:02:29 2019 +0200 net: dsa: sja1105: Use PTP core's dedicated kernel thread for RX timestamping And move the queue of skb's waiting for RX timestamps into the ptp_data structure, since it isn't needed if PTP is not compiled. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 544fed47af4d2174ac0b550e9c8da15c2dfdb117 Author: Vladimir Oltean Date: Fri Dec 27 15:02:28 2019 +0200 ptp: introduce ptp_cancel_worker_sync In order to effectively use the PTP kernel thread for tasks such as timestamping packets, allow the user control over stopping it, which is needed e.g. when the timestamping queues must be drained. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit db99d5126fb9067c3123b40a33c9936235f059fa Author: Christophe JAILLET Date: Thu Dec 26 16:02:24 2019 +0100 sfc: avoid duplicate error handling code in 'efx_ef10_sriov_set_vf_mac()' 'eth_zero_addr()' is already called in the error handling path. This is harmless, but there is no point in calling it twice, so remove one. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 3d8cbeda38f1cc51733715f0a02b338b4f75fad0 Author: Ravulapati Vishnu vardhan rao Date: Sat Dec 28 19:11:00 2019 +0530 ASoC: amd MMAP_INTERLEAVED Support ACP-I2S device support MMAP_INTERLEAVED. Added support for the same. Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/1577540460-21438-7-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit 535fd141ef346a3851f6aabc3eacb0d46518eca3 Author: Ravulapati Vishnu vardhan rao Date: Sat Dec 28 19:10:59 2019 +0530 ASoC: amd: Added ACP3x system resume and runtime pm When system wide suspend happens, ACP will be powered off and when system resumes,for audio usecase to continue,all the runtime configuration data needs to be programmed again. Added resume pm call back to ACP pm ops and also added runtime PM operations for ACP3x PCM platform device. Device will enter into D3 state when there is no activity on audio I2S lines. Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/1577540460-21438-6-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit cea5f40d4e7ae711622ba7ee3caa60c315f101c0 Author: Ravulapati Vishnu vardhan rao Date: Sat Dec 28 19:10:58 2019 +0530 ASoC: amd: Handle ACP3x I2S-SP Interrupts. Enabled support for I2S-SP interrupt handling. Previous to this implementation, driver supports only interrupts on BT instance. Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/1577540460-21438-5-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit a43ea44ddda94bc6c4dbe257fcbdeecde8cb06f1 Author: Ravulapati Vishnu vardhan rao Date: Sat Dec 28 19:10:57 2019 +0530 ASoC: amd: add ACP3x TDM mode support ACP3x I2S (CPU DAI) can act in normal I2S and TDM modes. Added support for TDM mode. Desired mode can be selected from ASoC machine driver. Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/1577540460-21438-4-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit 703a6e22888be41531461ad99ff6c25cd54a5ddf Author: Ravulapati Vishnu vardhan rao Date: Sat Dec 28 19:10:56 2019 +0530 ASoC: amd: Enabling I2S instance in DMA and DAI This patch adds I2S SP support in ACP PCM DMA and DAI. Added I2S support in DMA and DAI probe,its hw_params handling its open and close functionalities. This enables to open and close on the SP instance for playback and capture. Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/1577540460-21438-3-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit c9fe7db6e884d0ab8c55d4ed4660fb19400acf2e Author: Ravulapati Vishnu vardhan rao Date: Sat Dec 28 19:10:55 2019 +0530 ASoC: amd: Refactoring of DAI from DMA driver ASoC: PCM DMA driver should only have dma ops. So Removed all DAI related functionality.Refactoring the PCM DMA diver code.Added new file containing only DAI ops Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/1577540460-21438-2-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit 3863857dd5ca3e60685c6b49a7873fda727ff233 Author: Charles Keepax Date: Mon Dec 30 14:35:17 2019 +0000 ASoC: madera: Enable clocks for input pins when used for the FLL When one of the MCLK pins is used to supply the FLL enable that clock source. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20191230143517.21005-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 1094af1199007976370b8f04b4d6668ad9707954 Author: Charles Keepax Date: Mon Dec 30 14:35:16 2019 +0000 ASoC: madera: Enable clocks for input pins when used as a direct clock When one of the MCLK pins is used to supply an internal clock directly enable the source clock for that pin. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20191230143517.21005-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 9ea7a991cc27e9af1099b7a628c0ab210dc70a69 Author: Christophe JAILLET Date: Thu Dec 26 17:29:07 2019 +0100 ASoC: cs47l92: Simplify error handling code in 'cs47l92_probe()' If 'madera_init_bus_error_irq()' fails, 'wm_adsp2_remove(&cs47l92->core.adsp[0])' will be called twice. Once in the 'if' block, and once in the error handling path. This is harmless, but one of this call can be axed. Signed-off-by: Christophe JAILLET Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20191226162907.9490-1-christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit f278b99ca6b2d91a5744588d81bae297179b0d1f Author: Eric Dumazet Date: Mon Dec 30 06:06:19 2019 -0800 tcp_cubic: refactor code to perform a divide only when needed Neal Cardwell suggested to not change ca->delay_min and apply the ack delay cushion only when Hystart ACK train is still under consideration. This should avoid a 64bit divide unless needed. Tested: 40Gbit(mlx4) testbed (with sch_fq as packet scheduler) $ echo -n 'file tcp_cubic.c +p' >/sys/kernel/debug/dynamic_debug/control $ nstat -n;for f in {1..10}; do ./super_netperf 1 -H lpaa24 -l -4000000; done;nstat|egrep "Hystart" 14815 16280 15293 15563 11574 15145 14789 18548 16972 12520 TcpExtTCPHystartTrainDetect 10 0.0 TcpExtTCPHystartTrainCwnd 1396 0.0 $ dmesg | tail -10 [ 4873.951350] hystart_ack_train (116 > 93) delay_min 24 (+ ack_delay 69) cwnd 80 [ 4875.155379] hystart_ack_train (55 > 50) delay_min 21 (+ ack_delay 29) cwnd 160 [ 4876.333921] hystart_ack_train (69 > 62) delay_min 23 (+ ack_delay 39) cwnd 130 [ 4877.519037] hystart_ack_train (69 > 60) delay_min 22 (+ ack_delay 38) cwnd 130 [ 4878.701559] hystart_ack_train (87 > 63) delay_min 24 (+ ack_delay 39) cwnd 160 [ 4879.844597] hystart_ack_train (93 > 50) delay_min 21 (+ ack_delay 29) cwnd 216 [ 4880.956650] hystart_ack_train (74 > 67) delay_min 20 (+ ack_delay 47) cwnd 108 [ 4882.098500] hystart_ack_train (61 > 57) delay_min 23 (+ ack_delay 34) cwnd 130 [ 4883.262056] hystart_ack_train (72 > 67) delay_min 21 (+ ack_delay 46) cwnd 130 [ 4884.418760] hystart_ack_train (74 > 67) delay_min 29 (+ ack_delay 38) cwnd 152 10Gbit(bnx2x) testbed (with sch_fq as packet scheduler) $ echo -n 'file tcp_cubic.c +p' >/sys/kernel/debug/dynamic_debug/control $ nstat -n;for f in {1..10}; do ./super_netperf 1 -H lpk52 -l -4000000; done;nstat|egrep "Hystart" 7050 7065 7100 6900 7202 7263 7189 6869 7463 7034 TcpExtTCPHystartTrainDetect 10 0.0 TcpExtTCPHystartTrainCwnd 3199 0.0 $ dmesg | tail -10 [ 176.920012] hystart_ack_train (161 > 141) delay_min 83 (+ ack_delay 58) cwnd 264 [ 179.144645] hystart_ack_train (164 > 159) delay_min 120 (+ ack_delay 39) cwnd 444 [ 181.354527] hystart_ack_train (214 > 168) delay_min 125 (+ ack_delay 43) cwnd 436 [ 183.539565] hystart_ack_train (170 > 147) delay_min 96 (+ ack_delay 51) cwnd 326 [ 185.727309] hystart_ack_train (177 > 160) delay_min 61 (+ ack_delay 99) cwnd 128 [ 187.947142] hystart_ack_train (184 > 167) delay_min 123 (+ ack_delay 44) cwnd 367 [ 190.166680] hystart_ack_train (230 > 153) delay_min 116 (+ ack_delay 37) cwnd 444 [ 192.327285] hystart_ack_train (210 > 206) delay_min 86 (+ ack_delay 120) cwnd 152 [ 194.511392] hystart_ack_train (173 > 151) delay_min 94 (+ ack_delay 57) cwnd 239 [ 196.736023] hystart_ack_train (149 > 146) delay_min 105 (+ ack_delay 41) cwnd 399 Fixes: 42f3a8aaae66 ("tcp_cubic: tweak Hystart detection for short RTT flows") Signed-off-by: Eric Dumazet Reported-by: Neal Cardwell Link: https://www.spinics.net/lists/netdev/msg621886.html Link: https://www.spinics.net/lists/netdev/msg621797.html Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit ba4028105e98aa79de616cff4aa80d329c0cebbf Merge: 1a1fda57b400 c14ceb0ec727 Author: David S. Miller Date: Mon Dec 30 14:22:11 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for net-next: 1) Remove #ifdef pollution around nf_ingress(), from Lukas Wunner. 2) Document ingress hook in netdevice, also from Lukas. 3) Remove htons() in tunnel metadata port netlink attributes, from Xin Long. 4) Missing erspan netlink attribute validation also from Xin Long. 5) Missing erspan version in tunnel, from Xin Long. 6) Missing attribute nest in NFTA_TUNNEL_KEY_OPTS_{VXLAN,ERSPAN} Patch from Xin Long. 7) Missing nla_nest_cancel() in tunnel netlink dump path, from Xin Long. 8) Remove two exported conntrack symbols with no clients, from Florian Westphal. 9) Add nft_meta_get_eval_time() helper to nft_meta, from Florian. 10) Add nft_meta_pkttype helper for loopback, also from Florian. 11) Add nft_meta_socket uid helper, from Florian Westphal. 12) Add nft_meta_cgroup helper, from Florian. 13) Add nft_meta_ifkind helper, from Florian. 14) Group all interface related meta selector, from Florian. 15) Add nft_prandom_u32() helper, from Florian. 16) Add nft_meta_rtclassid helper, from Florian. 17) Add support for matching on the slave device index, from Florian. This batch, among other things, contains updates for the netfilter tunnel netlink interface: This extension is still incomplete and lacking proper userspace support which is actually my fault, I did not find the time to go back and finish this. This update is breaking tunnel UAPI in some aspects to fix it but do it better sooner than never. ==================== Signed-off-by: David S. Miller commit d06ed0c20960f124642ce77cd80056a35ffebe55 Author: Takashi Iwai Date: Mon Dec 30 22:27:42 2019 +0100 ALSA: uapi: Add linux/types.h include back (but carefully) A few uapi/sound/*.h headers have been corrected for recovering from the compile errors with the existing user-space code (alsa-lib) by the recent commits. OTOH, these introduced another regression, as now linux/types.h inclusion became mandatory for the uapi header checks. As a compromise, this patch re-adds linux/types.h inclusions again, but conditionally not to break other non-standard user-space stuff again. Fixes: 2e4688676392 ("ALSA: emu10k1: Make uapi/emu10k1.h compilable again") Fixes: d63e63d42107 ("ALSA: hdsp: Make uapi/hdsp.h compilable again") Fixes: 4fa406caf950 ("ALSA: hdspm: Drop linux/types.h inclusion in uapi header") Reported-by: kbuild test robot Link: https://lore.kernel.org/r/20191230212742.28925-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2b64e616d5527063f528321c391a9bc825715b93 Author: Chris Wilson Date: Mon Dec 30 16:58:21 2019 +0000 drm/i915/gt: Leave RING_BB_STATE to default value Do not reset RING_BB_STATE, leaving it to the default state value. This prevents bdw/bsw from getting confused when executing batches from the GGTT. Signed-off-by: Chris Wilson Acked-by: Matthew Auld Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191230165821.3840449-2-chris@chris-wilson.co.uk commit 4b0dd4a29a8f323e74cc91f7fba41cdf12d0430c Author: Chris Wilson Date: Mon Dec 30 16:58:20 2019 +0000 drm/i915/selftests: Flush the context worker When cleaning up the mock device, remember to flush the context worker to free the residual GEM contexts before shutting down the device. Closes: https://gitlab.freedesktop.org/drm/intel/issues/802 Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191230165821.3840449-1-chris@chris-wilson.co.uk commit 51d22e855ea3459d4b272e46aff95de0e59e65a7 Author: Linus Walleij Date: Wed Dec 11 15:52:26 2019 +0100 usb: usb3503: Convert to use GPIO descriptors This converts the USB3503 to pick GPIO descriptors from the device tree instead of iteratively picking out GPIO number references and then referencing these from the global GPIO numberspace. The USB3503 is only used from device tree among the in-tree platforms. If board files would still desire to use it they can provide machine descriptor tables. Make sure to preserve semantics such as the reset delay introduced by Stefan. Cc: Chunfeng Yun Cc: Marek Szyprowski Cc: Stefan Agner Cc: Krzysztof Kozlowski Signed-off-by: Linus Walleij [mszyprow: invert the logic behind reset GPIO line] Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20191211145226.25074-1-m.szyprowski@samsung.com Signed-off-by: Greg Kroah-Hartman commit c2f59e8180c9311108872dba582b1b0146acb054 Author: Marek Szyprowski Date: Wed Dec 11 15:52:08 2019 +0100 ARM: dts: qcom: Correct USB3503 GPIOs polarity Current USB3503 driver ignores GPIO polarity and always operates as if the GPIO lines were flagged as ACTIVE_HIGH. Fix the polarity for the existing USB3503 chip applications to match the chip specification and common convention for naming the pins. The only pin, which has to be ACTIVE_LOW is the reset pin. The remaining are ACTIVE_HIGH. This change allows later to fix the USB3503 driver to properly use generic GPIO bindings and read polarity from DT. Signed-off-by: Marek Szyprowski Reviewed-by: Linus Walleij Acked-by: Bjorn Andersson Link: https://lore.kernel.org/r/20191211145208.24976-1-m.szyprowski@samsung.com Signed-off-by: Greg Kroah-Hartman commit 3b31ec1848ec41d9501db3de61805e3ae173f485 Author: Linus Walleij Date: Tue Dec 17 15:12:41 2019 +0100 usb: renesas_usbhs: Switch to GPIO descriptor The Renesas USBHS driver includes a bit of surplus headers and uses the old GPIO API so let's switch it to use the GPIO descriptor. I noticed that the enable_gpio inside renesas_usbhs_driver_param isn't really referenced anywhere, and it is also the wrong type (u32) so let's just delete it and use a local variable instead. Cc: Eugeniu Rosca Cc: Veeraiyan Chidambaram Cc: Yoshihiro Shimoda Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191217141241.57639-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman commit 91687c1926bcd6b80d669375d57331b7bf80bf99 Author: Krzysztof Kozlowski Date: Mon Dec 30 18:22:15 2019 +0100 usb: phy: Enable compile testing for some of drivers Some of the USB phy drivers can be compile tested to increase build coverage. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191230172215.17370-2-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 88eaaecc44461f9fb147bf7ee6ccc6d4e9fc23e0 Author: Krzysztof Kozlowski Date: Mon Dec 30 18:22:14 2019 +0100 usb: host: Enable compile testing for some of drivers Some of the USB host drivers can be compile tested to increase build coverage. Add 'if' conditional to 'default y' so they will not get enabled by default on all other architectures. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191230172215.17370-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7be4412721aee25e35583a20a896085dc6b99c3e Author: Jann Horn Date: Thu Dec 19 00:11:47 2019 +0100 x86/insn-eval: Add support for 64-bit kernel mode To support evaluating 64-bit kernel mode instructions: * Replace existing checks for user_64bit_mode() with a new helper that checks whether code is being executed in either 64-bit kernel mode or 64-bit user mode. * Select the GS base depending on whether the instruction is being evaluated in kernel mode. Signed-off-by: Jann Horn Signed-off-by: Borislav Petkov Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Andrey Ryabinin Cc: Andy Lutomirski Cc: Dmitry Vyukov Cc: "Gustavo A. R. Silva" Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: kasan-dev@googlegroups.com Cc: Oleg Nesterov Cc: Sean Christopherson Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191218231150.12139-1-jannh@google.com commit 170a6726d0e266f2c8f306e3d61715c32f4ee41e Author: Ajay Gupta Date: Mon Dec 30 16:34:31 2019 +0300 usb: typec: ucsi: add support for separate DP altmode devices CCGx controller used on NVIDIA GPU card has two separate display altmode for two DP pin assignments. UCSI specification doesn't prohibits using separate display altmode. Current UCSI Type-C framework expects only one display altmode for all DP pin assignment. This patch squashes two separate display altmode into single altmode to support controllers with separate display altmode. We first read all the alternate modes of connector and then run through it to know if there are separate display altmodes. If so, it prepares a new port altmode set after squashing two or more separate altmodes into one. Signed-off-by: Ajay Gupta Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20191230133431.63445-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 71a1fa0df2a3728b8ccb97394be420d1f03df40e Author: Heikki Krogerus Date: Mon Dec 30 16:34:30 2019 +0300 usb: typec: ucsi: Store the notification mask The driver needs to ignore any Connector Change Events before the Connector Change Indication notifications have actually been enabled. This adds a check to ucsi_connector_change() function to make sure the function does not try to process the event unless the Connector Change notifications have been enabled. It is quite common that the firmware representing the "PPM" (Platform Policy Manager) starts generating Connector Change notifications even when only the Command Completion notifications are enabled. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20191230133431.63445-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5311f88e07ce83ea529a6a84716cbe32e8db2b6a Author: Tomasz Figa Date: Thu Dec 19 18:39:54 2019 +0900 usb: mtk-xhci: Do not explicitly set the DMA mask The mtk-xhci platform glue sets the DMA mask to 32 bits on its own, which was needed before commit fda182d80a0b ("usb: xhci: configure 32-bit DMA if the controller does not support 64-bit DMA"), but now it has no effect, because xhci_gen_setup() sets it up for us according to hardware capabilities. Remove the useless code. Signed-off-by: Tomasz Figa Link: https://lore.kernel.org/r/20191219093954.163417-1-tfiga@chromium.org Signed-off-by: Greg Kroah-Hartman commit c4a68b4da65ad388bbe3c3791f60655c4dd81173 Author: Stephan Gerhold Date: Wed Dec 18 21:34:50 2019 +0100 usb: phy: ab8500-usb: Keep PHY turned on in UART mode AB8505 supports an "UART carkit mode" which makes UART accessible through the USB connector. Upon detection of the UART cable, this mode has to be manually enabled by: 1. Turning on the PHY in peripheral mode 2. Reconfiguring PHY/pins to route UART signals to USB pins At the moment, we do not handle the UART link statuses at all, which means that UART stops working as soon as phy-ab8500-usb is loaded (since we disable the PHY after initialization). Keeping UART working if the cable is inserted before turning on the device is quite simple: In this case, early boot firmware has already set up the necessary PHY/pin configuration. The presence of the UART cable is reported by a special value in the USB link status register. We can check for that value in ab8505_usb_link_status_update() and set the PHY back to peripheral mode to restore UART. (Note: This will result in some minor garbage since we still temporarily disable the PHY during initialization...) Fully implementing this feature is more complicated: For some reason, AB8505 does not update UART link status after bootup. Regular USB cables work fine, but the link status register does not change its state if an UART cable is inserted/removed. It seems likely that the hardware is not actually capable of detecting UART cables autonomously. In addition to the USB link status register, implementations in the vendor kernel also manually measure the ID resistance to detect additional cable types. For UART cables, the USB link status register might simply reflect the PHY configuration instead of the actual link status. Implementing that functionality requires significant additions, so for now just implement the simple case. This allows using UART when inserting the cable before turning on the device. Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20191218203450.71037-1-stephan@gerhold.net Signed-off-by: Greg Kroah-Hartman commit 8e1a20096bfbc1fc05f68abcb8cf20fc07dca8a1 Author: Xu Wang Date: Fri Dec 20 07:19:38 2019 +0000 usb: cdns3: gadget: Remove unneeded variable ret Remove unneeded variable ret used to store return value,just return 0. Signed-off-by: Xu Wang Acked-by: Roger Quadros Link: https://lore.kernel.org/r/1576826378-4387-1-git-send-email-vulab@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit 7b104f890adea9b7ec554a491ac4d89a0a57ce96 Author: Lubomir Rintel Date: Sat Dec 21 07:50:06 2019 +0100 USB: EHCI: ehci-mv: add HSIC support Some special dance is needed to initialize the HSIC port. Signed-off-by: Lubomir Rintel Acked-by: Alan Stern Link: https://lore.kernel.org/r/20191221065008.266445-2-lkundrak@v3.sk Signed-off-by: Greg Kroah-Hartman commit 92f983520cb82c407a091bbeabb505fc97419d3a Author: Lubomir Rintel Date: Sat Dec 21 07:50:08 2019 +0100 USB: EHCI: ehci-mv: drop pxa_ehci_type and some device IDs This is merely a cleanup. None of these is used anywhere. Signed-off-by: Lubomir Rintel Acked-by: Alan Stern Link: https://lore.kernel.org/r/20191221065008.266445-4-lkundrak@v3.sk Signed-off-by: Greg Kroah-Hartman commit cf94ca4993e59a52be5639d37517fa26ca8d7322 Author: Lubomir Rintel Date: Sat Dec 21 07:50:07 2019 +0100 USB: EHCI: ehci-mv: make the PHY optional We may be using a NOP transceiver and those are treated specially by the USB core and return -ENODEV with devm_phy_get(). Signed-off-by: Lubomir Rintel Acked-by: Alan Stern Link: https://lore.kernel.org/r/20191221065008.266445-3-lkundrak@v3.sk Signed-off-by: Greg Kroah-Hartman commit 3697aa15563f3bb06c27af135dd7be77af4fe71a Author: Alex Shi Date: Fri Dec 20 11:04:45 2019 +0800 docs/zh_CN: translate kernel enforcement statement kernel enforcement statement is a important statement to show a kind of attitude in kernel community. This patch translate it into Chinese and add it into toctree. Signed-off-by: Alex Shi Cc: Fengguang Wu Cc: Li Zefan Cc: Harry Wei Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1576811085-30544-3-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Jonathan Corbet commit fdfb5dfa747fb58976d18af9fb20bec8981f6564 Author: Alex Shi Date: Fri Dec 20 11:04:44 2019 +0800 docs/zh_CN: translate kernel driver statement into Chinese kernel driver statement is a great statement in kernel community. This patch translate the statement into Chinese and add it into toctree. Signed-off-by: Alex Shi Cc: Harry Wei Cc: lizefan@huawei.com Cc: Fengguang Wu Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1576811085-30544-2-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Jonathan Corbet commit dec6224bb9d6fde8058b02ac441fbfbf5c224aa0 Author: Alex Shi Date: Fri Dec 20 11:04:43 2019 +0800 docs/zh_CN: add Chinese version of embargoed hardware issues Embargoed hardware issues is a necessary process guide, but leak of Chinese version, since there is more Chinese hardware vendors in market. We'd better have a Chinese version of this guide. This patch translate the guide, add it into toctree. and also add a link stub for the original doc. Signed-off-by: Alex Shi Cc: Fengguang Wu Cc: lizefan@huawei.com Cc: Jonathan Corbet Cc: Harry Wei Cc: Greg Kroah-Hartman Cc: Sasha Levin Cc: Dave Hansen Cc: Thomas Gleixner Cc: Ben Hutchings Cc: Tom Lendacky Cc: Tony Luck Cc: Kees Cook Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1576811085-30544-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Jonathan Corbet commit 6c23821c19305d9f9e3166492483425845b84f3a Author: Masanari Iida Date: Thu Dec 26 01:55:34 2019 +0900 docs: w1: Fix a typo in omap-hdq.rst Fix a spelling typo in omap-hdq.rst Signed-off-by: Masanari Iida Link: https://lore.kernel.org/r/20191225165534.9395-1-standby24x7@gmail.com Signed-off-by: Jonathan Corbet commit 7c737c64b0ff08c7427007c239922df7aef2748e Author: Masanari Iida Date: Fri Dec 27 01:21:38 2019 +0900 Doc: x86: Fix a typo in mm.rst Fix a spelling typo in mm.rst. Signed-off-by: Masanari Iida Link: https://lore.kernel.org/r/20191226162138.17601-1-standby24x7@gmail.com Signed-off-by: Jonathan Corbet commit 9fc85a7124b5ff9ec24ad391f9994f89ae611313 Merge: 6e678a76b345 37b156ecf71a Author: Tony Lindgren Date: Mon Dec 30 10:17:51 2019 -0800 Merge branch 'omap-for-v5.6/sdma' into omap-for-v5.6/ti-sysc-drop-pdata commit 10800fec619d56acd04b1de86b6c3473bb04c2a8 Author: YueHaibing Date: Mon Dec 30 16:47:31 2019 +0800 PM / devfreq: imx8m-ddrc: Fix inconsistent IS_ERR and PTR_ERR Fix inconsistent IS_ERR and PTR_ERR in imx8m_ddrc_probe(). Detected using Coccinelle. Signed-off-by: YueHaibing Signed-off-by: Chanwoo Choi commit d71b48236c83a8a732ccaf23dbf3b719d5c62e88 Merge: a6c8056d2f34 bfab07ee52a2 Author: Tony Lindgren Date: Mon Dec 30 10:01:16 2019 -0800 Merge tag 'sdma-dts' into omap-for-v5.6/ti-sysc-dt commit 37b156ecf71ab74f8e991562f8d13825aaf07512 Author: Tony Lindgren Date: Tue Dec 10 08:10:31 2019 -0800 ARM: OMAP2+: Drop legacy platform data for sdma 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: Aaro Koskinen Cc: Arnd Bergmann Cc: Peter Ujfalusi Cc: Russell King Cc: Vinod Koul Acked-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit 82f12e64a019c1ce240c35a67d8e9ee8f70ad29b Author: Tony Lindgren Date: Mon Dec 16 14:41:53 2019 -0800 ARM: OMAP2+: Drop legacy init for sdma We can now drop legacy init for sdma as we pass the quirks in auxdata to the dmaengine driver. Cc: Aaro Koskinen Cc: Arnd Bergmann Cc: Peter Ujfalusi Cc: Russell King Cc: Vinod Koul Acked-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit f4cfa36dab6734466cd5639e0a1d7d753297cba4 Author: Tony Lindgren Date: Mon Dec 16 14:41:53 2019 -0800 dmaengine: ti: omap-dma: Use cpu notifier to block idle for omap2 For omap2, we need to block idle if SDMA is busy. Let's do this with a cpu notifier and remove the custom call. Cc: Aaro Koskinen Cc: Arnd Bergmann Cc: Peter Ujfalusi Cc: Russell King Cc: Vinod Koul Acked-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Acked-by: Vinod Koul Signed-off-by: Tony Lindgren commit 61ecb53952f0ab670ada5e1d71511543963a0948 Author: Tony Lindgren Date: Mon Dec 16 14:41:53 2019 -0800 dmaengine: ti: omap-dma: Allocate channels directly With the legacy IRQ handling gone, we can now start allocating channels directly in the dmaengine driver for device tree based SoCs. Cc: Aaro Koskinen Cc: Arnd Bergmann Cc: Peter Ujfalusi Cc: Russell King Cc: Vinod Koul Acked-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Acked-by: Vinod Koul Signed-off-by: Tony Lindgren commit 211010aeb097d7932809c3bb2144163900a91738 Author: Tony Lindgren Date: Mon Dec 16 14:41:53 2019 -0800 dmaengine: ti: omap-dma: Pass sdma auxdata to driver and use it We can now start passing sdma auxdata to the dmaengine driver to start removing the platform based sdma init. Cc: Aaro Koskinen Cc: Arnd Bergmann Cc: Peter Ujfalusi Cc: Russell King Cc: Vinod Koul Acked-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Acked-by: Vinod Koul Signed-off-by: Tony Lindgren commit 9938ee9cf9217944f488cc95f2631f10d06cb0b4 Author: Tony Lindgren Date: Mon Dec 16 14:41:53 2019 -0800 dmaengine: ti: omap-dma: Configure global priority register directly We can move the global priority register configuration to the dmaengine driver and configure it based on the of_device_id match data. Cc: Aaro Koskinen Cc: Arnd Bergmann Cc: Peter Ujfalusi Cc: Russell King Cc: Vinod Koul Acked-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Acked-by: Vinod Koul Signed-off-by: Tony Lindgren commit 5383953f1c4f2f1a84d01341971b2bfb193730cf Author: Yangtao Li Date: Sun Dec 22 18:50:32 2019 +0000 memory: samsung: exynos5422-dmc: Convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Acked-by: Lukasz Luba Signed-off-by: Krzysztof Kozlowski commit c1d1c4a62db5c4745b9e15cfee0daf0f774f73fc Author: Linus Walleij Date: Wed Dec 11 22:38:19 2019 +0100 iio: accel: bma180: BMA254 support This adds support for the BMA254 variant of this accelerometer. The only difference for the simple IIO driver is that values are 12 bit and the temperature offset differs by 1 degree. Whilst wildcards in naming are normally frowned upon: The cases where I have labeled variables "25x" is where the models are identical, so as to make things easier for people that want to add support for BMA253 and BMA255. Cc: Peter Meerwald Cc: Oleksandr Kravchenko Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit ecfcd2da335816516dc27434a65899a77886d80a Author: Chris Wilson Date: Sun Dec 29 18:31:50 2019 +0000 drm/i915/gt: Do not restore invalid RS state Only restore valid resource streamer state from the context image, i.e. avoid restoring if we know the image is invalid. Closes: https://gitlab.freedesktop.org/drm/intel/issues/446 Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191229183153.3719869-4-chris@chris-wilson.co.uk Cc: stable@vger.kernel.org commit 7730c3be06e255082077594f60aae77f9914c5ad Author: Zenghui Yu Date: Mon Dec 30 21:14:28 2019 +0800 Documentation: PCI: Fix pci_alloc_irq_vectors() function name typo Documentation/PCI/msi-howto.rst referred to pci_irq_alloc_vectors() when it should refer to pci_alloc_irq_vectors(). Fix the typo. Link: https://lore.kernel.org/r/20191230131428.1200-1-yuzenghui@huawei.com Signed-off-by: Zenghui Yu Signed-off-by: Bjorn Helgaas Reviewed-by: Andrew Murray commit 45b152f752ea81935ff1f68d28b1914b8cfbe759 Author: Chris Wilson Date: Sun Dec 29 18:31:49 2019 +0000 drm/i915/gt: Avoid using the GPU before initialisation Mark the GT as wedged so that we are not tempted to use it prior to initialisation. Signed-off-by: Chris Wilson Cc: Andi Shyti Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191229183153.3719869-3-chris@chris-wilson.co.uk commit 7b02b23e5dd0ddd01cc7845d67eae281d52523a1 Author: Chris Wilson Date: Sun Dec 29 18:31:48 2019 +0000 drm/i915/gt: Avoid using tag 0 for the very first submission Assume that the HW starts off with tag 0 "active" and so avoid using tag 0 for our own first ELSP submission. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191229183153.3719869-2-chris@chris-wilson.co.uk commit 987281ab02af9200e02f1d0cefc51d22dc0f5a62 Author: Chris Wilson Date: Sun Dec 29 18:31:47 2019 +0000 drm/i915/gt: Ensure that all new contexts clear STOP_RING Set up the RING_MI_MODE in new contexts to clear the STOP_RING bit, just in case they find it still set after a reset (as they are the first contexts to be run). Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191229183153.3719869-1-chris@chris-wilson.co.uk commit d77552d93ceb2b5a9bc0f7bfd3b158bf9bbbcf47 Merge: e5399ab2c149 c72bed23b9e4 Author: Linus Walleij Date: Mon Dec 30 14:27:53 2019 +0100 Merge branch 'ib-pinctrl-unreg-mappings' into devel commit c72bed23b9e45accdeab626cf2cb2bd08d846f3e Author: Hans de Goede Date: Mon Dec 16 21:51:18 2019 +0100 pinctrl: Allow modules to use pinctrl_[un]register_mappings Currently only the drivers/pinctrl/devicetree.c code allows registering pinctrl-mappings which may later be unregistered, all other mappings are assumed to be permanent. Non-dt platforms may also want to register pinctrl mappings from code which is build as a module, which requires being able to unregister the mapping when the module is unloaded to avoid dangling pointers. To allow unregistering the mappings the devicetree code uses 2 internal functions: pinctrl_register_map and pinctrl_unregister_map. pinctrl_register_map allows the devicetree code to tell the core to not memdup the mappings as it retains ownership of them and pinctrl_unregister_map does the unregistering, note this only works when the mappings where not memdupped. The only code relying on the memdup/shallow-copy done by pinctrl_register_mappings is arch/arm/mach-u300/core.c this commit replaces the __initdata with const, so that the shallow-copy is no longer necessary. After that we can get rid of the internal pinctrl_unregister_map function and just use pinctrl_register_mappings directly everywhere. This commit also renames pinctrl_unregister_map to pinctrl_unregister_mappings so that its naming matches its pinctrl_register_mappings counter-part and exports it. Together these 2 changes will allow non-dt platform code to register pinctrl-mappings from modules without breaking things on module unload (as they can now unregister the mapping on unload). Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20191216205122.1850923-2-hdegoede@redhat.com Signed-off-by: Linus Walleij commit 729d3530a50417a88f3f485ba2dc88ff8adfeacb Author: Lukasz Luba Date: Tue Dec 17 13:43:45 2019 +0000 drivers: firmware: scmi: Extend SCMI transport layer by trace events The SCMI transport layer communicates via mailboxes and shared memory with firmware running on a microcontroller. It is platform specific how long it takes to pass a SCMI message. The most sensitive requests are coming from CPUFreq subsystem, which might be used by the scheduler. Thus, there is a need to measure these delays and capture anomalies. This change introduces trace events wrapped around transfer code. According to Jim's suggestion a unique transfer_id is to distinguish similar entries which might have the same message id, protocol id and sequence. This is a case then there are some timeouts in transfers. Suggested-by: Jim Quinlan Signed-off-by: Lukasz Luba Signed-off-by: Sudeep Holla commit 257d0e20ec4f94e33ac463b918fb82bb1b2dcbe0 Author: Lukasz Luba Date: Tue Dec 17 13:43:44 2019 +0000 include: trace: Add SCMI header with trace events Adding trace events would help to measure the speed of the communication channel. It can be also potentially used helpful during investigation of some issues platforms which use different transport layer. Update also MAINTAINERS file with information that the new trace events are maintained. Suggested-by: Jim Quinlan Signed-off-by: Lukasz Luba Signed-off-by: Sudeep Holla commit a9e395a4ab795e6f96961ba6d0620f91b2dce9a0 Author: Chris Wilson Date: Sat Dec 21 14:49:17 2019 +0000 drn/i915: Break up long i915_buddy_free_list() with a cond_resched() In the selftests, we may feed very long lists of blocks to be freed on culmination of the tests. This coupled with kasan and other malloc-tracing can make the kmem_cache_free() operation time consuming, and doing many of those trigger soft lockup warnings. Break the list up with a cond_resched(). Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191221144917.1040662-1-chris@chris-wilson.co.uk commit a3d9382bd439e7be1858abc3d5f014dd55913448 Author: Manasi Navare Date: Fri Dec 27 19:12:04 2019 -0800 drm/i915/dp: Disable Port sync mode correctly on teardown While clearing the Ports ync mode enable and master select bits we need to clear the register completely instead of using disable masks v3: * Remove reg variable (Matt) v2: * Just write 0 to the reg (Ville) * Rebase Bugzilla: https://gitlab.freedesktop.org/drm/intel/issues/5 Cc: Ville Syrjälä Cc: Jani Nikula Fixes: 51528afe7c5e ("drm/i915/display/icl: Disable transcoder port sync as part of crtc_disable() sequence") Signed-off-by: Manasi Navare Reviewed-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191228031204.10189-3-manasi.d.navare@intel.com commit aee40639cdc315c0bd7618f84577eeb2ff0ef9b1 Author: Manasi Navare Date: Fri Dec 27 19:12:03 2019 -0800 drm/i915/dp: Make port sync mode assignments only if all tiles present Add an extra check before making master slave assignments for tiled displays to make sure we make these assignments only if all tiled connectors are present. If not then initialize the state to defaults so it does a normal non tiled modeset without transcoder port sync. v4: deafulat port sync values in prepare_cleared_state (Ville) v3: * Default master trans to INVALID to avoid pipe mismatch v2: * Rename icl_add_sync_mode_crtcs * Move this function just before .compute_config hook * Check if DP before master slave assignments (Ville) Bugzilla: https://gitlab.freedesktop.org/drm/intel/issues/5 Cc: Ville Syrjälä Signed-off-by: Manasi Navare Acked-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191228031204.10189-2-manasi.d.navare@intel.com commit a603f5bd1691f975d036718ff176e10332d2bc64 Author: Manasi Navare Date: Fri Dec 27 19:12:02 2019 -0800 drm/i915/dp: Make sure all tiled connectors get added to the state with full modeset In case of tiled displays, all the tiles are linke dto each other for transcoder port sync. So in intel_atomic_check() we need to make sure that we add all the tiles to the modeset and if one of the tiles needs a full modeset then mark all other tiles for a full modeset. We also need to force modeset for all synced crtcs after fastset check. v6: * Add comments about why we do not call drm_atomic_helper_check_modeset (Matt) * Add FIXME for a corner case where tile info might vanish (Matt) v5: * Rebase v4: * Fix logic for modeset_synced_crtcs (Ville) v3: * Add tile checks only for Gen >11 v2: * Change crtc_state scope, remove tile_grp_id (Ville) * Use intel_connector_needs_modeset() (Ville) * Add modeset_synced_crtcs (Ville) * Make sure synced crtcs are forced full modeset after fastset check (Ville) Suggested-by: Ville Syrjälä Cc: Ville Syrjälä Cc: José Roberto de Souza Cc: Matt Roper Bugzilla: https://gitlab.freedesktop.org/drm/intel/issues/5 Signed-off-by: Manasi Navare Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191228031204.10189-1-manasi.d.navare@intel.com commit cf1d0180f5713f4bc113a8a56aa964e9d1fe3cf4 Author: Manasi Navare Date: Wed Dec 11 13:24:33 2019 -0800 drm/fbdev: Fallback to non tiled mode if all tiles not present In case of tiled displays, if we hotplug just one connector, fbcon currently just selects the preferred mode and if it is tiled mode then that becomes a problem if rest of the tiles are not present. So in the fbdev driver on hotplug when we probe the client modeset, if we dont find all the connectors for all tiles, then on a connector with one tile, just fallback to the first available non tiled mode to display over a single connector. On the hotplug of the consecutive tiled connectors, if the tiled mode no longer exists because of fbcon size limitation, then return no modes for consecutive tiles but retain the non tiled mode on the 0th tile. Use the same logic in case of connected boot case as well. This has been tested with Dell UP328K tiled monitor. v3: * Check Num tiled conns that are connected (Manasi) v2: * Set the modes on consecutive hotplugged tiles to no mode if tiled mode is pruned (Dave) v1: * Just handle the 1st connector hotplug case * v1 Reviewed-by: Dave Airlie Bugzilla: https://gitlab.freedesktop.org/drm/intel/issues/5 Suggested-by: Ville Syrjälä Suggested-by: Dave Airlie Cc: Ville Syrjälä Cc: Dave Airlie Signed-off-by: Manasi Navare Reviewed-by: Dave Airlie (v2) Link: https://patchwork.freedesktop.org/patch/msgid/20191211212433.18185-2-manasi.d.navare@intel.com commit 8c4ebd0d38c36a337606889f7c39ab5a372463a6 Author: Manasi Navare Date: Wed Dec 11 13:24:32 2019 -0800 drm: Handle connector tile support only for modes that match tile size DRM Fb driver expects multiple CRTCs if it sees connector->has_tile is set, but we need to handle tile support and look for multiple CRTCs only for the modes that match the tile size. The other modes should be able to be displayed without tile support or uisng single CRTC. This patch adds the check to match the tile size with requested mode to handle the tile support. Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: Jani Nikula Cc: Dave Airlie Signed-off-by: Manasi Navare Reviewed-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20191211212433.18185-1-manasi.d.navare@intel.com commit 28135762b83ab5767fecafb997f2dc760b7d2739 Author: Yangtao Li Date: Tue Dec 24 14:49:54 2019 +0000 PM / devfreq: exynos-bus: Add error log when fail to get devfreq-event Adding an error log makes it easier to trace the function's error path. Because the error code may be rewritten on return, print error code here. Signed-off-by: Yangtao Li Signed-off-by: Chanwoo Choi commit 6c315d8fe3c931e1f2e7c34c8d81d6016db8f978 Author: Yangtao Li Date: Sun Dec 22 17:41:32 2019 +0000 PM / devfreq: exynos-bus: Disable devfreq-event device when fails The exynos_bus_profile_init process may fail, but the devfreq event device remains enabled. Call devfreq_event_disable_edev on the error return path. Signed-off-by: Yangtao Li Signed-off-by: Chanwoo Choi commit 39a6e4739c19d5334e552d71ceca544ed84f4b87 Author: Yangtao Li Date: Sun Dec 22 17:41:31 2019 +0000 PM / devfreq: rk3399_dmc: Disable devfreq-event device when fails The probe process may fail, but the devfreq event device remains enabled. Call devfreq_event_disable_edev on the error return path. Signed-off-by: Yangtao Li Signed-off-by: Chanwoo Choi commit 15e4e74ea899515bf4eaf6d400d0c04f5433f15a Author: Leonard Crestez Date: Thu Dec 19 17:42:47 2019 +0200 PM / devfreq: imx8m-ddrc: Remove unused defines The IMX_SIP_DDR_DVFS_WAIT_CHANGE and IMX_SIP_DDR_FREQ_SET_HIGH defines are not used so they can be removed. Fixes: 518e99e2a22e ("PM / devfreq: Add dynamic scaling for imx8m ddr controller") Reported-by: Shawn Guo Signed-off-by: Leonard Crestez Signed-off-by: Chanwoo Choi commit a440892142118e68d05940fde66afd0278ce3d45 Author: Artur Świgoń Date: Mon Dec 16 11:47:48 2019 +0100 PM / devfreq: exynos-bus: Reduce goto statements and remove unused headers Improve code readability by changing the goto statements as well as eliminating a few more goto statements (related to return paths). Moreover, remove unused header file and adds a missing . Signed-off-by: Artur Świgoń [cw00.choi: Edit patch title and description] Signed-off-by: Chanwoo Choi commit eff5d31f7407fa9d31fb840106f1593399457298 Author: Chanwoo Choi Date: Thu Dec 12 11:20:30 2019 +0900 PM / devfreq: rk3399_dmc: Add COMPILE_TEST and HAVE_ARM_SMCCC dependency To build test, add COMPILE_TEST depedency to both ARM_RK3399_DMC_DEVFREQ and DEVFREQ_EVENT_ROCKCHIP_DFI configuration. And ARM_RK3399_DMC_DEVFREQ used the SMCCC interface so that add HAVE_ARM_SMCCC dependency to prevent the build break. Reported-by: kbuild test robot Signed-off-by: Chanwoo Choi commit f0c792192753abdcb4cd18677ad28acaea23a77a Author: Yangtao Li Date: Sun Dec 15 13:53:15 2019 +0000 PM / devfreq: rockchip-dfi: Convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Chanwoo Choi commit 29d867e97f7d781972ed542acfca3c2c0b512603 Author: Yangtao Li Date: Sat Dec 14 18:11:30 2019 +0000 PM / devfreq: rk3399_dmc: Add missing of_node_put() of_node_put() needs to be called when the device node which is got from of_parse_phandle has finished using. Signed-off-by: Yangtao Li Signed-off-by: Chanwoo Choi commit fb90fa80452b1bfd96a8decd455b294b1d672fb7 Author: Yangtao Li Date: Sat Dec 14 18:11:29 2019 +0000 PM / devfreq: rockchip-dfi: Add missing of_node_put() of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Signed-off-by: Yangtao Li Signed-off-by: Chanwoo Choi commit 54cb5740526a2f30d57f146d8a17364c59287187 Author: Randy Dunlap Date: Sat Dec 14 08:03:11 2019 -0800 PM / devfreq: Fix multiple kernel-doc warnings Fix kernel-doc warnings in devfreq files. Also fix a typo. Signed-off-by: Randy Dunlap Signed-off-by: Chanwoo Choi commit a05bb963435f14267e406182f8fb93b5d307baff Author: Artur Świgoń Date: Mon Dec 9 11:49:00 2019 +0100 PM / devfreq: exynos-bus: Extract exynos_bus_profile_init_passive() This patch adds a new exynos_bus_profile_init_passive() extracted from exynos_bus_probe() for devfreq device using passive governor. Signed-off-by: Artur Świgoń [cw00.choi: Edit description to indicate that function is for devfreq device using passive governor] Signed-off-by: Chanwoo Choi commit a47a97ece54e8de03ed6c1eb3bd80c69b555769c Author: Artur Świgoń Date: Mon Dec 9 11:48:59 2019 +0100 PM / devfreq: exynos-bus: Extract exynos_bus_profile_init() This patch adds a new exynos_bus_profile_init() extracted from exynos_bus_probe() for devfreq device using simple_ondemand governor like parent devfreq device. Signed-off-by: Artur Świgoń [cw00.choi: Edit description to indicate that new function is for parent devfreq device] Signed-off-by: Chanwoo Choi commit f9002b169a6ec84612ddec18e460fe82ef811c18 Author: Kamil Konieczny Date: Fri Dec 6 11:11:29 2019 +0100 PM / devfreq: Move declaration of DEVICE_ATTR_RW(min_freq) Declaration of DEVICE_ATTR_RW(min_freq) is placed after function max_freq_store. Move it to the correct place after min_freq_show. Signed-off-by: Kamil Konieczny Signed-off-by: Chanwoo Choi commit 1ebd0bc0e8adbfa548335d016ead922cc85fcecd Author: Kamil Konieczny Date: Fri Dec 6 13:46:39 2019 +0900 PM / devfreq: Move statistics to separate struct devfreq_stats Count time and transitions between devfreq frequencies in separate struct devfreq_stats for improved code readability and maintenance. Signed-off-by: Kamil Konieczny Reviewed-by: Matthias Kaehlcke [cw00.choi: Fix the merge conflict in trasn_stat_store and use 'devfreq->stats.*' style for consistent coding style and restore the clean-up code of 'devfreq->profile->*'] Signed-off-by: Chanwoo Choi commit 14a34396819960865ff737c665c6e46b64d0e04a Author: Kamil Konieczny Date: Thu Dec 5 15:55:26 2019 +0100 PM / devfreq: Add clearing transitions stats Add clearing transition table and time in states devfreq statistics by writing 0 (zero) to trans_stat file in devfreq sysfs. An example use is like following: echo 0 > /sys/class/devfreq/devfreqX/trans_stat Signed-off-by: Kamil Konieczny [cw00.choi: Edit return value if entering the wrong value for reset and use arrary3_size() to get the size of 3-dimensional array] Signed-off-by: Chanwoo Choi commit b76b3479dab948bea0a98b6d263eb56d8f358528 Author: Kamil Konieczny Date: Thu Dec 5 15:55:25 2019 +0100 PM / devfreq: Change time stats to 64-bit Change time stats counting to bigger type by using 64-bit jiffies. This will make devfreq stats code look similar to cpufreq stats and prevents overflow (for HZ = 1000 after 49.7 days). Signed-off-by: Kamil Konieczny Acked-by: Chanwoo Choi Signed-off-by: Chanwoo Choi commit 2fee1a7cc6b1ce6634bb0f025be2c94a58dfa34d Author: Chanwoo Choi Date: Tue Nov 5 18:18:03 2019 +0900 PM / devfreq: Add new name attribute for sysfs The commit 4585fbcb5331 ("PM / devfreq: Modify the device name as devfreq(X) for sysfs") changed the node name to devfreq(x). After this commit, it is not possible to get the device name through /sys/class/devfreq/devfreq(X)/*. Add new name attribute in order to get device name. Cc: stable@vger.kernel.org Fixes: 4585fbcb5331 ("PM / devfreq: Modify the device name as devfreq(X) for sysfs") Signed-off-by: Chanwoo Choi commit 5af744ebae856a50e8b5e208a5acf28713a4ce98 Author: Leonard Crestez Date: Fri Nov 22 23:45:03 2019 +0200 PM / devfreq: Add dynamic scaling for imx8m ddr controller Add driver for dynamic scaling the DDR Controller on imx8m chips. Actual frequency switching is implemented inside TF-A, this driver wraps the SMC calls and synchronizes the clk tree. The DRAM clocks on imx8m have the following structure (abridged): +----------+ |\ +------+ | dram_pll |-------|M| dram_core | | +----------+ |U|---------->| D | /--|X| | D | dram_alt_root | |/ | R | | | C | +---------+ | | |FIX DIV/4| | | +---------+ | | composite: | | | +----------+ | | | | dram_alt |----/ | | +----------+ | | | dram_apb |-------------------->| | +----------+ +------+ The dram_pll is used for higher rates and dram_alt is used for lower rates. The dram_alt and dram_apb clocks are "imx composite" and their parent can also be modified. This driver will prepare/enable the new parents ahead of switching (so that the expected roots are enabled) and afterwards it will call clk_set_parent to ensure the parents in clock framework are up-to-date. The driver relies on dram_pll dram_alt and dram_apb being marked with CLK_GET_RATE_NOCACHE for rate updates. Signed-off-by: Leonard Crestez Acked-by: Chanwoo Choi [cw00.choi: Edit the COMPILE_TEST module dependency in Kconfig] Signed-off-by: Chanwoo Choi commit c49a5d0968690a08378fd14371678c3479f269aa Author: Leonard Crestez Date: Fri Nov 22 23:45:02 2019 +0200 dt-bindings: memory: Add bindings for imx8m ddr controller Add devicetree bindings for the i.MX DDR Controller on imx8m series chips. It supports dynamic frequency switching between multiple data rates and this is exposed to Linux via the devfreq subsystem. Signed-off-by: Leonard Crestez Acked-by: Chanwoo Choi Reviewed-by: Rob Herring Signed-off-by: Chanwoo Choi commit d96c60b48a0b51e4711f9cf88b8da520b521b432 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:42:16 2019 +0800 PM / devfreq: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi commit d4556f5e99d5f603913bac01adaff8670cb2d08b Author: Arnd Bergmann Date: Tue Oct 22 16:26:48 2019 +0200 PM / devfreq: exynos-ppmu: Fix excessive stack usage Putting a 'struct devfreq_event_dev' object on the stack is generally a bad idea and here it leads to a warnig about potential stack overflow: drivers/devfreq/event/exynos-ppmu.c:643:12: error: stack frame size of 1040 bytes in function 'exynos_ppmu_probe' [-Werror,-Wframe-larger-than=] There is no real need for the device structure, only the string inside it, so add an internal helper function that simply takes the string as its argument and remove the device structure. Fixes: 1dd62c66d345 ("PM / devfreq: events: extend events by type of counted data") Signed-off-by: Arnd Bergmann [cw00.choi: Fix the issue from 'desc->name' to 'desc[j].name'] Signed-off-by: Chanwoo Choi commit 80e8b1e59f0399b94a6088bcb9477bd798cc5eba Author: Hanjun Guo Date: Tue Dec 24 09:56:30 2019 +0800 cpufreq: CPPC: put ACPI table after using it Put the ACPI table to release the table mapping after using it successfully. Signed-off-by: Hanjun Guo [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki commit c740237937c039c06e9cda32b9a37dde8b0d1e63 Author: Hanjun Guo Date: Tue Dec 24 09:56:29 2019 +0800 cpufreq : CPPC: Break out if HiSilicon CPPC workaround is matched Bail out if we match the OEM information, to save some possible extra iteration. Also update the code to fix minor coding style issue. Signed-off-by: Hanjun Guo [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki commit 207ca274cd4c46a418ecb250d555d712e387fce8 Author: Niklas Cassel Date: Mon Dec 23 15:19:34 2019 +0100 power: avs: qcom-cpr: make cpr_get_opp_hz_for_req() static drivers/power/avs/qcom-cpr.c:1081:15: warning: no previous prototype for ‘cpr_get_opp_hz_for_req’ Detected when running make with W=1. Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Signed-off-by: Rafael J. Wysocki commit 9b8c249ee9edd2666661c1c76bbebc3ec663e30c Author: Niklas Cassel Date: Mon Dec 23 15:19:33 2019 +0100 power: avs: qcom-cpr: remove set but unused variable drivers/power/avs/qcom-cpr.c:896:35: warning: variable ‘prev’ set but not used Detected when running make with W=1. Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Signed-off-by: Rafael J. Wysocki commit 9e39d28fcb23bcfd6e32267866c0f805f16c9c2d Author: Niklas Cassel Date: Mon Dec 23 15:19:32 2019 +0100 power: avs: qcom-cpr: make sure that regmap is available drivers/power/avs/qcom-cpr.c:402:4: error: implicit declaration of function ‘regmap_multi_reg_write’ Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Signed-off-by: Rafael J. Wysocki commit cad12cdeea783e8b7fc4425848028d3606a4cba8 Author: Niklas Cassel Date: Mon Dec 23 15:19:31 2019 +0100 power: avs: qcom-cpr: fix unsigned expression compared with zero drivers/power/avs/qcom-cpr.c:1539:5-21: warning: unsigned expression compared with zero: drv->num_corners < 0 Reported-by: kbuild test robot Reported-by: Julia Lawall Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Signed-off-by: Rafael J. Wysocki commit e808926b4dd1e1f1d3c842c1f6f2aae7c72543ae Author: Niklas Cassel Date: Mon Dec 23 15:19:30 2019 +0100 power: avs: qcom-cpr: fix invalid printk specifier in debug print drivers/power/avs/qcom-cpr.c:838:15: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘ssize_t’ Reported-by: kbuild test robot Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Signed-off-by: Rafael J. Wysocki commit ae9685992cd542b7881ff1d64a4bfd7ba509c3bb Author: Andy Shevchenko Date: Mon Dec 9 20:28:05 2019 +0200 iio: pressure: bmp280: Allow device to be enumerated from ACPI There is no need to limit the driver use by OF/platform code. In this case we simple remove redundant OF parts from the code. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit ab2ecec63320f8de5e0b15be6b427312e2e59f24 Author: Andy Shevchenko Date: Mon Dec 9 20:28:04 2019 +0200 iio: pressure: bmp280: Drop ACPI support There is no evidence of officially registered ACPI IDs for these devices. Thus, revert ACPI support from the driver. All authors of the respective changes are being informed here: d5c94568cc1d ("iio: add bmp280 pressure and temperature driver") 6dba72eca7fb ("iio: pressure: bmp280: add support for BMP180") 14beaa8f5ab1 ("iio: pressure: bmp280: add humidity support") Above seems a cargo cult without paying attention to how ACPI IDs are being allocated. Cc: Vlad Dogaru Cc: Akinobu Mita Cc: Matt Ranostay Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 57b8879c0c1af5ac4cfc9dd1260d40b13dd6027d Author: Olivier Moysan Date: Fri Dec 6 11:00:58 2019 +0100 dt-bindings: iio: adc: convert sd modulator to json-schema Convert the sigma delta modulator bindings to DT schema format using json-schema. Signed-off-by: Olivier Moysan Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit f6d4033d2a14b454680585d4ab974d163fcd7a47 Author: Lars-Peter Clausen Date: Wed Dec 11 12:43:00 2019 +0200 iio: buffer: rename 'read_first_n' callback to 'read' It is implied that 'read' will read the first n bytes and not e.g. bytes only from offsets within the buffer that are a prime number. This change is non-functional, mostly just a rename. A secondary intent with this patch is to make room later to add a write callback. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 4538c185680996d7328beac629dbdb7dd3f8f34e Author: Lars-Peter Clausen Date: Wed Dec 11 13:56:15 2019 +0200 iio: buffer-dmaengine: Report buffer length requirements The dmaengine buffer has some length alignment requirements that can differ from platform to platform. If the length alignment requirements are not met unexpected behavior like dropping of samples can occur. Currently these requirements are not reported and applications need to know the requirements of the platform by some out-of-band means. Add a new buffer attribute that reports the length alignment requirements called `length_align_bytes`. The reported length alignment is in bytes that means the buffer length alignment in sample sets depends on the number of enabled channels and the bytes per channel. Applications using this attribute to determine the buffer size requirements need to consider this. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 2a4fb4def9577cde9d541693a0304e9aab86904b Author: Tomislav Denis Date: Wed Dec 11 10:59:46 2019 +0100 bindings: iio: pressure: Add documentation for dlh driver Add a device tree binding documentation for DLH series pressure sensors. Signed-off-by: Tomislav Denis Signed-off-by: Jonathan Cameron commit 2d983e084b415748d4eb7c6a571635dd609387e1 Author: Tomislav Denis Date: Wed Dec 11 10:59:45 2019 +0100 dt-bindings: Add asc vendor All Sensors Corporation is a manufacturer of MEMS piezoresitive ultra low pressure sensors and pressure transducers. Signed-off-by: Tomislav Denis Acked-by: Rob Herring Signed-off-by: Jonathan Cameron commit ac78c6aa4a5dcb1a28eb212fd39d362371b36b06 Author: Tomislav Denis Date: Wed Dec 11 10:59:44 2019 +0100 iio: pressure: Add driver for DLH pressure sensors All Sensors DLH is series of low voltage digital pressure sensors. Additionally to pressure value sensors deliver a temperature value. Sensors can be accessed over I2C and SPI, this driver supports only I2C access. Signed-off-by: Tomislav Denis Signed-off-by: Jonathan Cameron commit 0c040d1ddce1d5a4d8de215117e8f0792cc62364 Author: Lars-Peter Clausen Date: Wed Dec 11 12:41:47 2019 +0200 iio: buffer-dmaengine: Add module information Make sure that the industrialio-buffer-dmaengine has proper license information so it can be build as a module and loaded without tainting the kernel. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 9436abc40139503a7cea22a96437697d048f31c0 Author: Linus Walleij Date: Wed Dec 11 22:38:18 2019 +0100 iio: accel: bma180: Use explicit member assignment This uses the C99 explicit .member assignment for the variant data in struct bma180_part_info. This makes it easier to understand and add new variants. Cc: Peter Meerwald Cc: Oleksandr Kravchenko Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit c35aae7443023c08d406c9077c9e842b48cdb22f Author: Linus Walleij Date: Wed Dec 11 22:38:17 2019 +0100 iio: accel: bma180: Basic regulator support This brings up the VDD and VDDIO regulators using the regulator framework. Platforms that do not use regulators will provide stubs or dummy regulators. Cc: Peter Meerwald Cc: Oleksandr Kravchenko Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit 964172561ea65f92394ef823405c31f17c57cc90 Author: Linus Walleij Date: Wed Dec 11 22:38:16 2019 +0100 iio: accel: bma180: Add dev helper variable Having a shorthand "dev" instead of &client->dev everywhere makes the code easier to read (more compact). Cc: Peter Meerwald Cc: Oleksandr Kravchenko Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit e485e2a2cfd6404d21066be6378ed42f8ce81060 Author: Lorenzo Bianconi Date: Sat Dec 14 17:52:59 2019 +0100 iio: imu: st_lsm6dsx: enable sensor-hub support for lsm6dsm Enabled i2c master controller support for LSM6DSM sensor. Enable ext_sensor0 for lsm6dsm. This series has been tested using LIS2MDL as slave device connected to the i2c controller of the LSM6DSM Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 111b0875774b9622161e2ed6dd176e21c8665da0 Author: Lorenzo Bianconi Date: Sat Dec 14 17:52:58 2019 +0100 iio: imu: st_lsm6dsx: rename st_lsm6dsx_shub_read_reg in st_lsm6dsx_shub_read_output Rename st_lsm6dsx_shub_read_reg routine in st_lsm6dsx_shub_read_output since it is used to read from sensorhub channel0 output register Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 5b8343e067f8c0ce6e480659956d011e876d3635 Author: Lorenzo Bianconi Date: Sat Dec 14 17:52:57 2019 +0100 iio: imu: st_lsm6dsx: check if shub_output reg is located in primary page Check if the sensor hub output register is located in the primary or in the secondary memory page. This is a preliminary patch to support i2c master controller on lsm6dsm devices Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 3a4319574584ef5a71e11780cc83337282818882 Author: Lorenzo Bianconi Date: Sat Dec 14 17:52:56 2019 +0100 iio: imu: st_lsm6dsx: check if pull_up is located in primary page Check if the pull up register is located in the primary or in the secondary memory page. This is a preliminary patch to support i2c master controller on lsm6dsm devices Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 007f2ebbac2ac7f0f6d80ca5afd3f51c5a083838 Author: Lorenzo Bianconi Date: Sat Dec 14 17:52:55 2019 +0100 iio: imu: st_lsm6dsx: check if master_enable is located in primary page Check if the master enable register is located in the primary or in the secondary memory page. This is a preliminary patch to support i2c master controller on lsm6dsm devices Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit ee978bb86d055131364baa617fbdb0a9bb52612a Author: Lorenzo Bianconi Date: Sat Dec 14 17:52:54 2019 +0100 iio: imu: st_lsm6dsx: export max num of slave devices in st_lsm6dsx_shub_settings Export max number of slave devices supported by the i2c master controller in st_lsm6dsx_shub_settings data structure. This is a preliminary patch to support i2c master controller on lsm6dsm sensors Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 4dae3d6147b362b1c4a35d3ef3177358d084d464 Author: Chen Zhou Date: Mon Dec 16 18:51:01 2019 +0800 iio: light: remove unneeded semicolon Fixes coccicheck warning: ./drivers/iio/light/lm3533-als.c:745:2-3: Unneeded semicolon Signed-off-by: Chen Zhou Signed-off-by: Jonathan Cameron commit 0d15190f53b4e21aa3d15f1ace4c0807a269a763 Author: Matt Ranostay Date: Sun Dec 15 16:00:45 2019 -0800 iio: chemical: atlas-ph-sensor: rename atlas-ph-sensor to atlas-sensor Since the orginal scope of the driver was to only support the pH product from Atlas it has evolved to other sensors. Rename the file, driver name, and regmap to atlas-sensor which reflects this, although keep CONFIG_ATLAS_PH_SENSOR to not cause regressions with current configurations. Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron commit de54fff151335d0c24f53ff843c67a1364f70f42 Author: Andy Shevchenko Date: Mon Dec 16 19:38:51 2019 +0200 iio: st_sensors: Describe function parameters in kernel-doc Kernel documentation script complains that some of the function parameters are not described: .../common/st_sensors/st_sensors_trigger.c:29: warning: Function parameter or member 'indio_dev' not described in 'st_sensors_new_samples_available' .../common/st_sensors/st_sensors_trigger.c:29: warning: Function parameter or member 'sdata' not described in 'st_sensors_new_samples_available' Describe function parameters where it's appropriate. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit be4ac8321ff2c0085573500ce819e80cfa38d770 Author: Andy Shevchenko Date: Mon Dec 16 19:38:50 2019 +0200 iio: pressure: st_press: Mark default_press_pdata with __maybe_unused Since we put static variable to a header file it's copied to each module that includes the header. But not all of them are actually used it. Mark default_press_pdata with __maybe_unused to calm a compiler down: In file included from drivers/iio/pressure/st_pressure_spi.c:18: drivers/iio/pressure/st_pressure.h:40:46: warning: ‘default_press_pdata’ defined but not used [-Wunused-const-variable=] 40 | static const struct st_sensors_platform_data default_press_pdata = { | ^~~~~~~~~~~~~~~~~~~ ... Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 2e8bd34a16f833c6e4d2fd725bac2cdb8faf61fc Author: Andy Shevchenko Date: Mon Dec 16 19:38:49 2019 +0200 iio: accel: st_accel: Mark default_accel_pdata with __maybe_unused Since we put static variable to a header file it's copied to each module that includes the header. But not all of them are actually used it. Mark default_accel_pdata with __maybe_unused to calm a compiler down: In file included from drivers/iio/accel/st_accel_i2c.c:19: drivers/iio/accel/st_accel.h:67:46: warning: ‘default_accel_pdata’ defined but not used [-Wunused-const-variable=] 67 | static const struct st_sensors_platform_data default_accel_pdata = { | ^~~~~~~~~~~~~~~~~~~ ... Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit f22b1d7588b1cc115d15462bb0f118be971369fb Author: Andy Shevchenko Date: Mon Dec 16 19:38:48 2019 +0200 iio: gyro: st_gyro: Mark gyro_pdata with __maybe_unused Since we put static variable to a header file it's copied to each module that includes the header. But not all of them are actually used it. Mark gyro_pdata with __maybe_unused to calm a compiler down: In file included from drivers/iio/gyro/st_gyro_i2c.c:18: drivers/iio/gyro/st_gyro.h:31:46: warning: ‘gyro_pdata’ defined but not used [-Wunused-const-variable=] 31 | static const struct st_sensors_platform_data gyro_pdata = { | ^~~~~~~~~~ ... Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 40ca77d57f0163d3bd2ae826613a69039be0d052 Author: Andy Shevchenko Date: Mon Dec 16 19:38:47 2019 +0200 iio: pressure: st_press: Drop unnecessary #else branch for ACPI ACPI_PTR() takes care of the argument in case of !CONFIG_ACPI. Remove unnecessary #else branch. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 4c3e7367bd7477f0335ab7f40505f9e03bf193a3 Author: Andy Shevchenko Date: Mon Dec 16 19:38:46 2019 +0200 iio: accel: st_accel: Drop unnecessary #else branch for ACPI ACPI_PTR() takes care of the argument in case of !CONFIG_ACPI. Remove unnecessary #else branch. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit d9fa3fd4bc48881684d9d1a1c709187a01fc9a21 Author: Andy Shevchenko Date: Mon Dec 16 19:38:45 2019 +0200 iio: light: st_uvis25: Drop unneeded header inclusion There is no evidence that the driver supports or needs ACPI APIs. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 03d4c566c51def8151dee1e87dae6479722890d2 Author: Andy Shevchenko Date: Mon Dec 16 20:19:25 2019 +0200 iio: st_lsm6dsx: 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 Signed-off-by: Jonathan Cameron commit e3da43077046d3b44da0f66b2f202e25ba9ca694 Author: Andy Shevchenko Date: Mon Dec 16 20:19:24 2019 +0200 iio: st_lsm6dsx: Drop unneeded OF code There is no need to have OF guard against ID table. Drop it for good. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 07bf07e2cc7d8658de138b8a217cb0a936d26e7e Author: Andy Shevchenko Date: Mon Dec 16 20:19:23 2019 +0200 iio: st_lsm6dsx: Mark predefined constants with __maybe_unused Since we put static variable to a header file it's copied to each module that includes the header. But not all of them are actually used it. Mark predefined constants with __maybe_unused to calm a compiler down: In file included from drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c:17: .../st_lsm6dsx/st_lsm6dsx.h:399:28: warning: ‘st_lsm6dsx_available_scan_masks’ defined but not used [-Wunused-const-variable=] 399 | static const unsigned long st_lsm6dsx_available_scan_masks[] = {0x7, 0x0}; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .../st_lsm6dsx/st_lsm6dsx.h:392:36: warning: ‘st_lsm6dsx_event’ defined but not used [-Wunused-const-variable=] 392 | static const struct iio_event_spec st_lsm6dsx_event = { | ^~~~~~~~~~~~~~~~ ... Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 851644a60d200c9a294de5a5594004bcf13d34c7 Author: Daniel Junho Date: Tue Dec 17 08:11:58 2019 -0300 iio: adc: ad7923: Add support for the ad7908/ad7918/ad7928 The ad7928 is software compatible with the ad7923. The ad7908 and ad7918 are the 8 and 10-bit versions of the ad7928. Signed-off-by: Daniel Junho Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 233e7de42fcc3ba6abdc09a58a1be5577a09aba9 Author: Daniel Junho Date: Tue Dec 17 08:11:57 2019 -0300 iio: adc: ad7923: Add of_device_id table Accomplish device tree compatibility to driver AD7923 by adding of_device_id table and making a subsequent call to MODULE_DEVICE_TABLE. Signed-off-by: Daniel Junho Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit c87de1ba35e4e4225f3e10b09d22c6490e6cd848 Author: Daniel Junho Date: Tue Dec 17 08:11:56 2019 -0300 iio: adc: ad7923: Fix checkpatch warning Fix checkpatch warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' +static int ad7923_scan_direct(struct ad7923_state *st, unsigned ch) Signed-off-by: Daniel Junho Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 2df57429d8bee8d26c860d78039c9aaf2b9daffe Author: Daniel Junho Date: Tue Dec 17 08:11:55 2019 -0300 iio: adc: ad7923: Remove the unused defines Removes the unused define AD7923_CHANNEL_x from the code. Signed-off-by: Daniel Junho Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 3cf7ded15e404655d4bcdcac76e0fe2247946d05 Author: Dan Robertson Date: Fri Dec 20 16:00:51 2019 +0000 iio: accel: bma400: basic regulator support Add support for the VDD and VDDIO regulators using the regulator framework. Signed-off-by: Dan Robertson Reviewed-by: Linus Walleij Signed-off-by: Jonathan Cameron commit 465c811f1f201a7554a95cf003bc06a239606e9b Author: Dan Robertson Date: Fri Dec 20 16:00:50 2019 +0000 iio: accel: Add driver for the BMA400 Add a IIO driver for the Bosch BMA400 3-axes ultra-low power accelerometer. The driver supports reading from the acceleration and temperature registers. The driver also supports reading and configuring the output data rate, oversampling ratio, and scale. Signed-off-by: Dan Robertson Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Jonathan Cameron commit 5264c5f4c4690658922fcaddc1cdd925fb0069fd Author: Dan Robertson Date: Fri Dec 20 16:00:49 2019 +0000 dt-bindings: iio: accel: bma400: add bindings Add devicetree binding for the Bosch BMA400 3-axes ultra-low power accelerometer sensor. Signed-off-by: Dan Robertson Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit bff47c2302cc249bcd550b17067f8dddbd4b6f77 Author: Valdis Kletnieks Date: Thu Dec 5 21:36:07 2019 -0500 x86/vdso: Provide missing include file When building with C=1, sparse issues a warning: CHECK arch/x86/entry/vdso/vdso32-setup.c arch/x86/entry/vdso/vdso32-setup.c:28:28: warning: symbol 'vdso32_enabled' was not declared. Should it be static? Provide the missing header file. Signed-off-by: Valdis Kletnieks Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Andy Lutomirski Cc: Ingo Molnar Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/36224.1575599767@turing-police commit f0b888af539e3be63d488adf122a1c54ff7137ca Author: Amit Kucheria Date: Tue Dec 3 10:53:30 2019 +0530 arm64: dts: msm8998: thermal: Add critical interrupt support Register critical interrupts for each of the two tsens controllers Signed-off-by: Amit Kucheria Link: https://lore.kernel.org/r/3ef309a98ca6445c1982ec3ff1a70db39b18f415.1575349416.git.amit.kucheria@linaro.org Signed-off-by: Bjorn Andersson commit 1246f78297f22a2ac069c75c7c819b8137269e23 Author: Amit Kucheria Date: Tue Dec 3 10:53:29 2019 +0530 arm64: dts: msm8996: thermal: Add critical interrupt support Register critical interrupts for each of the two tsens controllers Signed-off-by: Amit Kucheria Link: https://lore.kernel.org/r/53d8f7b922ec889ed11380896c2a367ae0998db2.1575349416.git.amit.kucheria@linaro.org Signed-off-by: Bjorn Andersson commit 5e4548922009870a38bcf1d887317676d4e08f54 Author: Damir Franusic Date: Thu Nov 21 16:29:02 2019 +0100 ARM: dts: qcom: Add nodes for SMP boot in IPQ40xx Add missing nodes and properties to enable SMP support on IPQ40xx devices. Booting without "saw_l2" node: [ 0.001400] CPU: Testing write buffer coherency: ok [ 0.001856] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.060163] Setting up static identity map for 0x80300000 - 0x80300060 [ 0.080140] rcu: Hierarchical SRCU implementation. [ 0.120258] smp: Bringing up secondary CPUs ... [ 0.200540] CPU1: failed to boot: -19 [ 0.280689] CPU2: failed to boot: -19 [ 0.360874] CPU3: failed to boot: -19 [ 0.360966] smp: Brought up 1 node, 1 CPU [ 0.360979] SMP: Total of 1 processors activated (96.00 BogoMIPS). [ 0.360988] CPU: All CPU(s) started in SVC mode. Then, booting with "saw_l2" node present (this patch applied): [ 0.001450] CPU: Testing write buffer coherency: ok [ 0.001904] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.060161] Setting up static identity map for 0x80300000 - 0x80300060 [ 0.080137] rcu: Hierarchical SRCU implementation. [ 0.120252] smp: Bringing up secondary CPUs ... [ 0.200958] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.281091] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002 [ 0.361264] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003 [ 0.361430] smp: Brought up 1 node, 4 CPUs [ 0.361460] SMP: Total of 4 processors activated (384.00 BogoMIPS). [ 0.361469] CPU: All CPU(s) started in SVC mode. Signed-off-by: Damir Franusic Cc: Luka Perkov Cc: Robert Marko Cc: Andy Gross Cc: Rob Herring Cc: linux-arm-msm@vger.kernel.org Link: https://lore.kernel.org/r/20191121152902.21394-1-damir.franusic@gmail.com Signed-off-by: Bjorn Andersson commit a9e8fce61a787f8d4340c8b728dd4c13be0430ba Author: Krzysztof Kozlowski Date: Wed Nov 20 21:39:25 2019 +0800 soc: qcom: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191120133925.13712-1-krzk@kernel.org Signed-off-by: Bjorn Andersson commit d4824486b676ef87071081bdb77a6de2a5a341c7 Author: Yangtao Li Date: Sat Dec 28 19:15:41 2019 +0000 hwspinlock: stm32: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20191228191541.26999-1-tiny.windzz@gmail.com Signed-off-by: Bjorn Andersson commit ced44b9da52d455ecd3ee0798d148833c150cbbc Author: Victhor Foster Date: Sun Dec 22 21:27:16 2019 -0300 ARM: dts: qcom: apq8084: Remove all instances of IRQ_TYPE_NONE This patch removes all instances of IRQ_TYPE_NONE, which fixes warning messages during boot. It also changes interrupt types to their corresponding macros, as defined in arm-gic.h. Signed-off by: Victhor Foster Link: https://lore.kernel.org/r/1238987932.9511963.1577060836760.JavaMail.zimbra@ufpe.br Signed-off-by: Bjorn Andersson commit d5897d602b3bd6df7ab4339ba9b21eb7bc2eb694 Author: Victhor Foster Date: Sun Dec 22 20:37:03 2019 -0300 ARM: dts: qcom: apq8084: Change tsens definition to new style This patch changes the tsens peripheral definition to the new style, which fixes a kernel panic caused by a change in the tsens driver, introduced by commit 37624b58542fb9f2d9a70e6ea006ef8a5f66c30b. There was a patch submitted recently to this list that should fix this problem with old device trees and the new driver, so it may be redundant at this point, in terms of fixing the kernel panic, but this should align the APQ8084 device tree with the others. Signed-off by: Victhor Foster Link: https://lore.kernel.org/r/108381142.9510389.1577057823350.JavaMail.zimbra@ufpe.br Signed-off-by: Bjorn Andersson commit e5399ab2c14963457db221f5a59d12a98f998792 Merge: 534ad35798af 46cf053efec6 Author: Linus Walleij Date: Sun Dec 29 00:30:37 2019 +0100 Merge tag 'v5.5-rc3' into devel Linux 5.5-rc3 commit 88f7df94a12d0de720f6c9219d838f9fbb254e34 Author: Lucas De Marchi Date: Tue Dec 24 00:40:12 2019 -0800 drm/i915: prefer 3-letter acronym for tigerlake We are currently using a mix of platform name and acronym to name the functions. Let's prefer the acronym as it should be clear what platform it's about and it's shorter, so it doesn't go over 80 columns in a few cases. This converts tigerlake to tgl where appropriate. Signed-off-by: Lucas De Marchi Acked-by: Jani Nikula Acked-by: Ville Syrjälä Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191224084012.24241-10-lucas.demarchi@intel.com commit 74bb98baa0e45a0a0157e1370b4614d569447e87 Author: Lucas De Marchi Date: Tue Dec 24 00:40:11 2019 -0800 drm/i915: prefer 3-letter acronym for ivybridge We are currently using a mix of platform name and acronym to name the functions. Let's prefer the acronym as it should be clear what platform it's about and it's shorter, so it doesn't go over 80 columns in a few cases. This converts ivybridge to ivb where appropriate. Signed-off-by: Lucas De Marchi Acked-by: Jani Nikula Acked-by: Ville Syrjälä Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191224084012.24241-9-lucas.demarchi@intel.com commit 72588ffd3831be8d7306b4e8e340665bb651e248 Author: Lucas De Marchi Date: Tue Dec 24 00:40:10 2019 -0800 drm/i915: prefer 3-letter acronym for broadwell We are currently using a mix of platform name and acronym to name the functions. Let's prefer the acronym as it should be clear what platform it's about and it's shorter, so it doesn't go over 80 columns in a few cases. This converts broadwell to bdw where appropriate. Signed-off-by: Lucas De Marchi Acked-by: Jani Nikula Acked-by: Ville Syrjälä Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191224084012.24241-8-lucas.demarchi@intel.com commit 9eae5e27be4a3948c1b92c0d3c7ce5fc60a08461 Author: Lucas De Marchi Date: Tue Dec 24 00:40:09 2019 -0800 drm/i915: prefer 3-letter acronym for ironlake We are currently using a mix of platform name and acronym to name the functions. Let's prefer the acronym as it should be clear what platform it's about and it's shorter, so it doesn't go over 80 columns in a few cases. This converts ironlake to ilk where appropriate. Signed-off-by: Lucas De Marchi Acked-by: Jani Nikula Acked-by: Ville Syrjälä Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191224084012.24241-7-lucas.demarchi@intel.com commit 95be348413767ac2514c004686341f0ba81ddf20 Author: Lucas De Marchi Date: Tue Dec 24 00:40:08 2019 -0800 drm/i915: prefer 3-letter acronym for icelake We are currently using a mix of platform name and acronym to name the functions. Let's prefer the acronym as it should be clear what platform it's about and it's shorter, so it doesn't go over 80 columns in a few cases. This converts icelake to icl where appropriate. Signed-off-by: Lucas De Marchi Acked-by: Jani Nikula Acked-by: Ville Syrjälä Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191224084012.24241-6-lucas.demarchi@intel.com commit 8e619820e37bcb1349f02d9961ff9d054c123202 Author: Lucas De Marchi Date: Tue Dec 24 00:40:07 2019 -0800 drm/i915: prefer 3-letter acronym for cannonlake We are currently using a mix of platform name and acronym to name the functions. Let's prefer the acronym as it should be clear what platform it's about and it's shorter, so it doesn't go over 80 columns in a few cases. This converts cannonlake to cnl where appropriate. Signed-off-by: Lucas De Marchi Acked-by: Jani Nikula Acked-by: Ville Syrjälä Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191224084012.24241-5-lucas.demarchi@intel.com commit f6df4d46bf1e72fe3b1cd25448a4adfd298da636 Author: Lucas De Marchi Date: Tue Dec 24 00:40:06 2019 -0800 drm/i915: prefer 3-letter acronym for skylake We are currently using a mix of platform name and acronym to name the functions. Let's prefer the acronym as it should be clear what platform it's about and it's shorter, so it doesn't go over 80 columns in a few cases. This converts skylake to skl where appropriate. Signed-off-by: Lucas De Marchi Acked-by: Jani Nikula Acked-by: Ville Syrjälä Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191224084012.24241-4-lucas.demarchi@intel.com commit 1e98f88cea0ff5c52c098daf3cae0e85832ec375 Author: Lucas De Marchi Date: Tue Dec 24 00:40:05 2019 -0800 drm/i915: prefer 3-letter acronym for haswell We are currently using a mix of platform name and acronym to name the functions. Let's prefer the acronym as it should be clear what platform it's about and it's shorter, so it doesn't go over 80 columns in a few cases. This converts haswell to hsw where appropriate. Signed-off-by: Lucas De Marchi Acked-by: Jani Nikula Acked-by: Ville Syrjälä Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191224084012.24241-3-lucas.demarchi@intel.com commit 1d21822052a1cffd6f6961720c00453f2fda56ab Author: Lucas De Marchi Date: Tue Dec 24 00:40:04 2019 -0800 drm/i915: prefer 3-letter acronym for pineview We are currently using a mix of platform name and acronym to name the functions. Let's prefer the acronym as it should be clear what platform it's about and it's shorter, so it doesn't go over 80 columns in a few cases. This converts pineview to pnv where appropriate. v2: Add missing conversions in intel_pm.c (Matt Roper). While at it, fix missing blank lines between structs that would otherwise trigger checkpatch errors (Lucas) Signed-off-by: Lucas De Marchi Acked-by: Jani Nikula Acked-by: Ville Syrjälä Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191224084012.24241-2-lucas.demarchi@intel.com commit 31409fff1a392fabebf59e3c58f606c7a1a2d24e Author: Lucas De Marchi Date: Tue Dec 24 00:40:03 2019 -0800 drm/i915: simplify prefixes on device_info Drop the intel prefix since all these structs are static and prefer using the 3-letter prefix for each platform. v2: also remove gen from the device info (Ville) Signed-off-by: Lucas De Marchi Acked-by: Jani Nikula Acked-by: Ville Syrjälä Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191224084012.24241-1-lucas.demarchi@intel.com commit 1a1fda57b400160c79287479dc05d8b8b3f7113d Merge: 270fe2ceda66 f685e609a301 Author: David S. Miller Date: Sat Dec 28 11:43:41 2019 -0800 Merge branch 'DSA-TX-tstamp' Vladimir Oltean says: ==================== The DSA TX timestamping situation This series is the moral v2 of "[PATCH net] net: dsa: sja1105: Fix double delivery of TX timestamps to socket error queue" [0] which did not manage to convince public opinion (actually it didn't convince me neither). This fixes PTP timestamping on one particular board, where the DSA switch is sja1105 and the master is gianfar. Unfortunately there is no way to make the fix more general without committing logical inaccuracies: the SKBTX_IN_PROGRESS flag does serve a purpose, even if the sja1105 driver is not using it now: it prevents delivering a SW timestamp to the app socket when the HW timestamp will be provided. So not setting this flag (the approach from v1) might create avoidable complications in the future (not to mention that there isn't any satisfactory explanation on why that would be the correct solution). So the goal of this change set is to create a more strict framework for DSA master devices when attached to PTP switches, and to fix the first master driver that is overstepping its duties and is delivering unsolicited TX timestamps. [0]: https://www.spinics.net/lists/netdev/msg619699.html ==================== Signed-off-by: David S. Miller commit f685e609a301f171b62ee52a69acc3a74c2c04aa Author: Vladimir Oltean Date: Sat Dec 28 15:30:46 2019 +0200 net: dsa: Deny PTP on master if switch supports it It is possible to kill PTP on a DSA switch completely and absolutely, until a reboot, with a simple command: tcpdump -i eth2 -j adapter_unsynced where eth2 is the switch's DSA master. Why? Well, in short, the PTP API in place today is a bit rudimentary and relies on applications to retrieve the TX timestamps by polling the error queue and looking at the cmsg structure. But there is no timestamp identification of any sorts (except whether it's HW or SW), you don't know how many more timestamps are there to come, which one is this one, from whom it is, etc. In other words, the SO_TIMESTAMPING API is fundamentally limited in that you can get a single HW timestamp from the stack. And the "-j adapter_unsynced" flag of tcpdump enables hardware timestamping. So let's imagine what happens when the DSA master decides it wants to deliver TX timestamps to the skb's socket too: - The timestamp that the user space sees is taken by the DSA master. Whereas the RX timestamp will eventually be overwritten by the DSA switch. So the RX and TX timestamps will be in different time bases (aka garbage). - The user space applications have no way to deal with the second (real) TX timestamp finally delivered by the DSA switch, or even to know to wait for it. Take ptp4l from the linuxptp project, for example. This is its behavior after running tcpdump, before the patch: ptp4l[172]: [6469.594] Unexpected data on socket err queue: ptp4l[172]: [6469.693] rms 8 max 16 freq -21257 +/- 11 delay 748 +/- 0 ptp4l[172]: [6469.711] Unexpected data on socket err queue: ptp4l[172]: 0020 00 00 00 1f 7b ff fe 63 02 48 00 03 aa 05 00 fd ptp4l[172]: 0030 00 00 00 00 00 00 00 00 00 00 ptp4l[172]: [6469.721] Unexpected data on socket err queue: ptp4l[172]: 0000 01 80 c2 00 00 0e 00 1f 7b 63 02 48 88 f7 10 02 ptp4l[172]: 0010 00 2c 00 00 02 00 00 00 00 00 00 00 00 00 00 00 ptp4l[172]: 0020 00 00 00 1f 7b ff fe 63 02 48 00 01 c6 b1 00 fd ptp4l[172]: 0030 00 00 00 00 00 00 00 00 00 00 ptp4l[172]: [6469.838] Unexpected data on socket err queue: ptp4l[172]: 0000 01 80 c2 00 00 0e 00 1f 7b 63 02 48 88 f7 10 02 ptp4l[172]: 0010 00 2c 00 00 02 00 00 00 00 00 00 00 00 00 00 00 ptp4l[172]: 0020 00 00 00 1f 7b ff fe 63 02 48 00 03 aa 06 00 fd ptp4l[172]: 0030 00 00 00 00 00 00 00 00 00 00 ptp4l[172]: [6469.848] Unexpected data on socket err queue: ptp4l[172]: 0000 01 80 c2 00 00 0e 00 1f 7b 63 02 48 88 f7 13 02 ptp4l[172]: 0010 00 36 00 00 02 00 00 00 00 00 00 00 00 00 00 00 ptp4l[172]: 0020 00 00 00 1f 7b ff fe 63 02 48 00 04 1a 45 05 7f ptp4l[172]: 0030 00 00 5e 05 41 32 27 c2 1a 68 00 04 9f ff fe 05 ptp4l[172]: 0040 de 06 00 01 ptp4l[172]: [6469.855] Unexpected data on socket err queue: ptp4l[172]: 0000 01 80 c2 00 00 0e 00 1f 7b 63 02 48 88 f7 10 02 ptp4l[172]: 0010 00 2c 00 00 02 00 00 00 00 00 00 00 00 00 00 00 ptp4l[172]: 0020 00 00 00 1f 7b ff fe 63 02 48 00 01 c6 b2 00 fd ptp4l[172]: 0030 00 00 00 00 00 00 00 00 00 00 ptp4l[172]: [6469.974] Unexpected data on socket err queue: ptp4l[172]: 0000 01 80 c2 00 00 0e 00 1f 7b 63 02 48 88 f7 10 02 ptp4l[172]: 0010 00 2c 00 00 02 00 00 00 00 00 00 00 00 00 00 00 ptp4l[172]: 0020 00 00 00 1f 7b ff fe 63 02 48 00 03 aa 07 00 fd ptp4l[172]: 0030 00 00 00 00 00 00 00 00 00 00 The ptp4l program itself is heavily patched to show this (more details here [0]). Otherwise, by default it just hangs. On the other hand, with the DSA patch to disallow HW timestamping applied: tcpdump -i eth2 -j adapter_unsynced tcpdump: SIOCSHWTSTAMP failed: Device or resource busy So it is a fact of life that PTP timestamping on the DSA master is incompatible with timestamping on the switch MAC, at least with the current API. And if the switch supports PTP, taking the timestamps from the switch MAC is highly preferable anyway, due to the fact that those don't contain the queuing latencies of the switch. So just disallow PTP on the DSA master if there is any PTP-capable switch attached. [0]: https://sourceforge.net/p/linuxptp/mailman/message/36880648/ Fixes: 0336369d3a4d ("net: dsa: forward hardware timestamping ioctls to switch driver") Signed-off-by: Vladimir Oltean Acked-by: Richard Cochran Signed-off-by: David S. Miller commit c26a2c2ddc0115eb088873f5c309cf46b982f522 Author: Vladimir Oltean Date: Sat Dec 28 15:30:45 2019 +0200 gianfar: Fix TX timestamping with a stacked DSA driver The driver wrongly assumes that it is the only entity that can set the SKBTX_IN_PROGRESS bit of the current skb. Therefore, in the gfar_clean_tx_ring function, where the TX timestamp is collected if necessary, the aforementioned bit is used to discriminate whether or not the TX timestamp should be delivered to the socket's error queue. But a stacked driver such as a DSA switch can also set the SKBTX_IN_PROGRESS bit, which is actually exactly what it should do in order to denote that the hardware timestamping process is undergoing. Therefore, gianfar would misinterpret the "in progress" bit as being its own, and deliver a second skb clone in the socket's error queue, completely throwing off a PTP process which is not expecting to receive it, _even though_ TX timestamping is not enabled for gianfar. There have been discussions [0] as to whether non-MAC drivers need or not to set SKBTX_IN_PROGRESS at all (whose purpose is to avoid sending 2 timestamps, a sw and a hw one, to applications which only expect one). But as of this patch, there are at least 2 PTP drivers that would break in conjunction with gianfar: the sja1105 DSA switch and the felix switch, by way of its ocelot core driver. So regardless of that conclusion, fix the gianfar driver to not do stuff based on flags set by others and not intended for it. [0]: https://www.spinics.net/lists/netdev/msg619699.html Fixes: f0ee7acfcdd4 ("gianfar: Add hardware TX timestamping support") Signed-off-by: Vladimir Oltean Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 270fe2ceda66b6964d4c6f261d7f562a02c1c786 Author: Chen Zhou Date: Sat Dec 28 11:09:47 2019 +0800 net/wan/fsl_ucc_hdlc: remove set but not used variables 'ut_info' and 'ret' Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wan/fsl_ucc_hdlc.c: In function ucc_hdlc_irq_handler: drivers/net/wan/fsl_ucc_hdlc.c:643:23: warning: variable ut_info set but not used [-Wunused-but-set-variable] drivers/net/wan/fsl_ucc_hdlc.c: In function uhdlc_suspend: drivers/net/wan/fsl_ucc_hdlc.c:880:23: warning: variable ut_info set but not used [-Wunused-but-set-variable] drivers/net/wan/fsl_ucc_hdlc.c: In function uhdlc_resume: drivers/net/wan/fsl_ucc_hdlc.c:925:6: warning: variable ret set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: Chen Zhou Signed-off-by: David S. Miller commit 38f1cb68582cee59c819864affeb70752eda3f04 Author: Lukasz Fiedorowicz Date: Fri Dec 27 19:07:48 2019 +0530 drm/i915/lmem: debugfs for LMEM details Debugfs i915_gem_object is extended to enable the IGTs to detect the LMEM's availability and the total size of LMEM. v2: READ_ONCE is used [Chris] v3: %pa is used for printing the resource [Chris] v4: All regions' details added to debugfs [Chris] v5: Macro for_each_mem_region added name is initialized at region init [Chris] Signed-off-by: Lukasz Fiedorowicz Signed-off-by: Matthew Auld Signed-off-by: Stuart Summers Signed-off-by: Ramalingam C Cc: Joonas Lahtinen Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191227133748.4330-1-ramalingam.c@intel.com commit 7d8d3c377cc9731c3924f807c7769177ca3f0865 Author: Chris Boyle Date: Fri Dec 27 10:40:53 2019 +0100 ALSA: usb-audio: fix Corsair Virtuoso mixer label collision The Corsair Virtuoso RGB Wireless is a USB headset with a mic and a sidetone feature. Label its mixer appropriately instead of all "Headset", so that applications such as Pulseaudio don't just move the sidetone control when they intend the main Headset control. Signed-off-by: Chris Boyle Link: https://lore.kernel.org/r/20191227094053.GA12167@nova.chris.boyle.name Signed-off-by: Takashi Iwai commit 640b50fa8c349135cb97d7430b8f8f0f87e56047 Author: Chris Wilson Date: Sat Dec 28 11:12:55 2019 +0000 drm/i915: Restore very early GPU reset In commit d03b224f4252 ("drm/i915/gt: Apply sanitiization just before resume") the GT sanitization was pulled into the resume path as we need to know the backend in order to do a full reset prior to resume. However, it is still imperative that we scrub existing GPU state before clobbering in our early setup, so restore a minimal GPU reset at the start of our init sequence. Fixes: d03b224f4252 ("drm/i915/gt: Apply sanitiization just before resume") Signed-off-by: Chris Wilson Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191228111255.3086901-1-chris@chris-wilson.co.uk commit 1b3b289fd8daddf22eac89b8d185706bb7e822e9 Merge: 356b23c073dd 3d2b847fb99c Author: David S. Miller Date: Fri Dec 27 16:40:02 2019 -0800 Merge branch 'ethtool-netlink-part-one' Michal Kubecek says: ==================== ethtool netlink interface, part 1 This is first part of netlink based alternative userspace interface for ethtool. It aims to address some long known issues with the ioctl interface, mainly lack of extensibility, raciness, limited error reporting and absence of notifications. The goal is to allow userspace ethtool utility to provide all features it currently does but without using the ioctl interface. However, some features provided by ethtool ioctl API will be available through other netlink interfaces (rtnetlink, devlink) if it's more appropriate. The interface uses generic netlink family "ethtool" and provides multicast group "monitor" which is used for notifications. Documentation for the interface is in Documentation/networking/ethtool-netlink.rst file. The netlink interface is optional, it is built when CONFIG_ETHTOOL_NETLINK (bool) option is enabled. There are three types of request messages distinguished by suffix "_GET" (query for information), "_SET" (modify parameters) and "_ACT" (perform an action). Kernel reply messages have name with additional suffix "_REPLY" (e.g. ETHTOOL_MSG_SETTINGS_GET_REPLY). Most "_SET" and "_ACT" message types do not have matching reply type as only some of them need additional reply data beyond numeric error code and extack. Kernel also broadcasts notification messages ("_NTF" suffix) on changes. Basic concepts: - make extensions easier not only by allowing new attributes but also by imposing as few artificial limits as possible, e.g. by using arbitrary size bit sets for most bitmap attributes or by not using fixed size strings - use extack for error reporting and warnings - send netlink notifications on changes (even if they were done using the ioctl interface) and actions - avoid the racy read/modify/write cycle between kernel and userspace by sending only attributes which userspace wants to change; there is still a read/modify/write cycle between generic kernel code and ethtool_ops handler in NIC driver but it is only in kernel and under RTNL lock - reduce the number of name lists that need to be kept in sync between kernel and userspace (e.g. recognized link modes) - where feasible, allow dump requests to query specific information for all network devices - as parsing and generating netlink messages is more complicated than simply copying data structures between userspace API and ethtool_ops handlers (which most ioctl commands do), split the code into multiple files in net/ethtool directory; move net/core/ethtool.c also to this directory and rename it to ioctl.c Changes between v8 and v9: - fix ethnl_update_u8() - fix description of ETHTOOL_A_LINKSTATE_LINK in rst file - add explanation of verbose vs. compact bitset usage to documentation - link ethtool-netlink.rst into toctree Main changes between v7 and v8: - preliminary patches sent as a separate series (already in net-next) - split notification related changes out of _SET patches - drop request specific flags from common header - use FLAG/flag rather than GFLAG/gflag for global flags (as there are only global flags now) - allow device names up to ALTIFNAMSIZ characters - rename ETHTOOL_A_BITSET_LIST to ETHTOOL_A_BITSET_NOMASK - rename ETHTOOL_A_BIT{,S}_* to ETHTOOL_A_BITSET_BIT{,S}_* - use standard bitset helpers for link modes (rather than in-place conversion) - use "default" rather than "standard" for unified _GET handlers - fixed 64-bit big endian bitset code Main changes between v6 and v7: - split complex messages into small single purpose ones (drop info and request masks and one level of nesting) - separate request information and reply data into two structures - refactor bitset handling (no simultaneous u32/ulong handling but avoid kmalloc() except for long bitmaps on 64-bit big endian architectures) - use only fixed size strings internally (will be replaced by char * eventually but that will require rewriting also existing ioctl code) - rework ethnl_update_* helpers to return error code - rename request flag constants (to ETHTOOL_[GR]FLAG_ prefix) - convert documentation to rst Main changes between v5 and v6: - use ETHTOOL_MSG_ prefix for message types - replace ETHA_ prefix for netlink attributes by ETHTOOL_A_ - replace ETH_x_IM_y for infomask bits by ETHTOOL_IM_x_y - split GET reply types from SET requests and notifications - split kernel and userspace message types into different enums - remove INFO_GET requests from submitted part - drop EVENT notifications (use rtnetlink and on-demand string set load) - reorganize patches to reduce the number of intermitent warnings - unify request/reply header and its processing - another nest around strings in a string set for consistency - more consistent identifier naming - coding style cleanup - get rid of some of the helpers - set bad attribute in extack where applicable - various bug fixes - improve documentation and code comments, more kerneldoc comments - more verbose commit messages Changes between v4 and v5: - do not panic on failed initialization, only WARN() Main changes between RFC v3 and v4: - use more kerneldoc style comments - strict attribute policy checking - use macros for tables of link mode names and parameters - provide permanent hardware address in rtnetlink - coding style cleanup - split too long patches, reorder - wrap more ETHA_SETTINGS_* attributes in nests - add also some SET_* implementation into submitted part Main changes between RFC v2 and RFC v3: - do not allow building as a module (no netdev notifiers needed) - drop some obsolete fields - add permanent hw address, timestamping and private flags support - rework bitset handling to get rid of variable length arrays - notify monitor on device renames - restructure GET_SETTINGS/SET_SETTINGS messages - split too long patches and submit only first part of the series Main changes between RFC v1 and RFC v2: - support dumps for all "get" requests - provide notifications for changes related to supported request types - support getting string sets (both global and per device) - support getting/setting device features - get rid of family specific header, everything passed as attributes - split netlink code into multiple files in net/ethtool/ directory ==================== Signed-off-by: David S. Miller commit 3d2b847fb99cf2b28aa046e486636e555bc6ed1c Author: Michal Kubecek Date: Fri Dec 27 15:56:23 2019 +0100 ethtool: provide link state with LINKSTATE_GET request Implement LINKSTATE_GET netlink request to get link state information. At the moment, only link up flag as provided by ETHTOOL_GLINK ioctl command is returned. LINKSTATE_GET request can be used with NLM_F_DUMP (without device identification) to request the information for all devices in current network namespace providing the data. Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 1b1b1847c8505df2e1dd8804838526bed22a8bd4 Author: Michal Kubecek Date: Fri Dec 27 15:56:18 2019 +0100 ethtool: add LINKMODES_NTF notification Send ETHTOOL_MSG_LINKMODES_NTF notification message whenever device link settings or advertised modes are modified using ETHTOOL_MSG_LINKMODES_SET netlink message or ETHTOOL_SLINKSETTINGS or ETHTOOL_SSET ioctl commands. The notification message has the same format as reply to LINKMODES_GET request. ETHTOOL_MSG_LINKMODES_SET netlink request only triggers the notification if there is a change but the ioctl command handlers do not check if there is an actual change and trigger the notification whenever the commands are executed. As all work is done by ethnl_default_notify() handler and callback functions introduced to handle LINKMODES_GET requests, all that remains is adding entries for ETHTOOL_MSG_LINKMODES_NTF into ethnl_notify_handlers and ethnl_default_notify_ops lookup tables and calls to ethtool_notify() where needed. Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit bfbcfe2032e70bd8598d680d39ac177d507e39ac Author: Michal Kubecek Date: Fri Dec 27 15:56:13 2019 +0100 ethtool: set link modes related data with LINKMODES_SET request Implement LINKMODES_SET netlink request to set advertised linkmodes and related attributes as ETHTOOL_SLINKSETTINGS and ETHTOOL_SSET commands do. The request allows setting autonegotiation flag, speed, duplex and advertised link modes. Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit f625aa9be8c10f2e4dc677837e240730a25feda7 Author: Michal Kubecek Date: Fri Dec 27 15:56:08 2019 +0100 ethtool: provide link mode information with LINKMODES_GET request Implement LINKMODES_GET netlink request to get link modes related information provided by ETHTOOL_GLINKSETTINGS and ETHTOOL_GSET ioctl commands. This request provides supported, advertised and peer advertised link modes, autonegotiation flag, speed and duplex. LINKMODES_GET request can be used with NLM_F_DUMP (without device identification) to request the information for all devices in current network namespace providing the data. Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 73286734c1b0d009fd317c2a74e173cb22233dad Author: Michal Kubecek Date: Fri Dec 27 15:56:03 2019 +0100 ethtool: add LINKINFO_NTF notification Send ETHTOOL_MSG_LINKINFO_NTF notification message whenever device link settings are modified using ETHTOOL_MSG_LINKINFO_SET netlink message or ETHTOOL_SLINKSETTINGS or ETHTOOL_SSET ioctl commands. The notification message has the same format as reply to LINKINFO_GET request. ETHTOOL_MSG_LINKINFO_SET netlink request only triggers the notification if there is a change but the ioctl command handlers do not check if there is an actual change and trigger the notification whenever the commands are executed. As all work is done by ethnl_default_notify() handler and callback functions introduced to handle LINKINFO_GET requests, all that remains is adding entries for ETHTOOL_MSG_LINKINFO_NTF into ethnl_notify_handlers and ethnl_default_notify_ops lookup tables and calls to ethtool_notify() where needed. Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 5cf2a548bcbd3da3e79adb0b64ef96dbb9988d78 Author: Michal Kubecek Date: Fri Dec 27 15:55:58 2019 +0100 ethtool: add default notification handler The ethtool netlink notifications have the same format as related GET replies so that if generic GET handling framework is used to process GET requests, its callbacks and instance of struct get_request_ops can be also used to compose corresponding notification message. Provide function ethnl_std_notify() to be used as notification handler in ethnl_notify_handlers table. Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit a53f3d41e4d3df46aba254ba51e7fbe45470fece Author: Michal Kubecek Date: Fri Dec 27 15:55:53 2019 +0100 ethtool: set link settings with LINKINFO_SET request Implement LINKINFO_SET netlink request to set link settings queried by LINKINFO_GET message. Only physical port, phy MDIO address and MDI(-X) control can be set, attempt to modify MDI(-X) status and transceiver is rejected. Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 459e0b81b37043545d90629fdfb243444151e77d Author: Michal Kubecek Date: Fri Dec 27 15:55:48 2019 +0100 ethtool: provide link settings with LINKINFO_GET request Implement LINKINFO_GET netlink request to get basic link settings provided by ETHTOOL_GLINKSETTINGS and ETHTOOL_GSET ioctl commands. This request provides settings not directly related to autonegotiation and link mode selection: physical port, phy MDIO address, MDI(-X) status, MDI(-X) control and transceiver. LINKINFO_GET request can be used with NLM_F_DUMP (without device identification) to request the information for all devices in current network namespace providing the data. Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 71921690f9745fef60a2bad425f30adf8cdc9da0 Author: Michal Kubecek Date: Fri Dec 27 15:55:43 2019 +0100 ethtool: provide string sets with STRSET_GET request Requests a contents of one or more string sets, i.e. indexed arrays of strings; this information is provided by ETHTOOL_GSSET_INFO and ETHTOOL_GSTRINGS commands of ioctl interface. Unlike ioctl interface, all information can be retrieved with one request and mulitple string sets can be requested at once. There are three types of requests: - no NLM_F_DUMP, no device: get "global" stringsets - no NLM_F_DUMP, with device: get string sets related to the device - NLM_F_DUMP, no device: get device related string sets for all devices Client can request either all string sets of given type (global or device related) or only specific sets. With ETHTOOL_A_STRSET_COUNTS flag set, only set sizes (numbers of strings) are returned. Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 728480f1244200fe294073afeb612c583a2080d2 Author: Michal Kubecek Date: Fri Dec 27 15:55:38 2019 +0100 ethtool: default handlers for GET requests Significant part of GET request processing is common for most request types but unfortunately it cannot be easily separated from type specific code as we need to alternate between common actions (parsing common request header, allocating message and filling netlink/genetlink headers etc.) and specific actions (querying the device, composing the reply). The processing also happens in three different situations: "do" request, "dump" request and notification, each doing things in slightly different way. The request specific code is implemented in four or five callbacks defined in an instance of struct get_request_ops: parse_request() - parse incoming message prepare_data() - retrieve data from driver or NIC reply_size() - estimate reply message size fill_reply() - compose reply message cleanup_data() - (optional) clean up additional data Other members of struct get_request_ops describe the data structure holding information from client request and data used to compose the message. The default handlers ethnl_default_doit(), ethnl_default_dumpit(), ethnl_default_start() and ethnl_default_done() can be then used in genl_ops handler. Notification handler will be introduced in a later patch. Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 6b08d6c146f4c5ed451c45339c10feb06d619db2 Author: Michal Kubecek Date: Fri Dec 27 15:55:33 2019 +0100 ethtool: support for netlink notifications Add infrastructure for ethtool netlink notifications. There is only one multicast group "monitor" which is used to notify userspace about changes and actions performed. Notification messages (types using suffix _NTF) share the format with replies to GET requests. Notifications are supposed to be broadcasted on every configuration change, whether it is done using the netlink interface or ioctl one. Netlink SET requests only trigger a notification if some data is actually changed. To trigger an ethtool notification, both ethtool netlink and external code use ethtool_notify() helper. This helper requires RTNL to be held and may sleep. Handlers sending messages for specific notification message types are registered in ethnl_notify_handlers array. As notifications can be triggered from other code, ethnl_ok flag is used to prevent an attempt to send notification before genetlink family is registered. Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 10b518d4e6dd5390e40f7d8de0f08753c1195a7e Author: Michal Kubecek Date: Fri Dec 27 15:55:28 2019 +0100 ethtool: netlink bitset handling The ethtool netlink code uses common framework for passing arbitrary length bit sets to allow future extensions. A bitset can be a list (only one bitmap) or can consist of value and mask pair (used e.g. when client want to modify only some bits). A bitset can use one of two formats: verbose (bit by bit) or compact. Verbose format consists of bitset size (number of bits), list flag and an array of bit nests, telling which bits are part of the list or which bits are in the mask and which of them are to be set. In requests, bits can be identified by index (position) or by name. In replies, kernel provides both index and name. Verbose format is suitable for "one shot" applications like standard ethtool command as it avoids the need to either keep bit names (e.g. link modes) in sync with kernel or having to add an extra roundtrip for string set request (e.g. for private flags). Compact format uses one (list) or two (value/mask) arrays of 32-bit words to store the bitmap(s). It is more suitable for long running applications (ethtool in monitor mode or network management daemons) which can retrieve the names once and then pass only compact bitmaps to save space. Userspace requests can use either format; ETHTOOL_FLAG_COMPACT_BITSETS flag in request header tells kernel which format to use in reply. Notifications always use compact format. As some code uses arrays of unsigned long for internal representation and some arrays of u32 (or even a single u32), two sets of parse/compose helpers are introduced. To avoid code duplication, helpers for unsigned long arrays are implemented as wrappers around helpers for u32 arrays. There are two reasons for this choice: (1) u32 arrays are more frequent in ethtool code and (2) unsigned long array can be always interpreted as an u32 array on little endian 64-bit and all 32-bit architectures while we would need special handling for odd number of u32 words in the opposite direction. Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 041b1c5d4a53e97fc9e029ae32469552ca12cb9b Author: Michal Kubecek Date: Fri Dec 27 15:55:23 2019 +0100 ethtool: helper functions for netlink interface Add common request/reply header definition and helpers to parse request header and fill reply header. Provide ethnl_update_* helpers to update structure members from request attributes (to be used for *_SET requests). Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 2b4a8990b7df55875745a80a609a1ceaaf51f322 Author: Michal Kubecek Date: Fri Dec 27 15:55:18 2019 +0100 ethtool: introduce ethtool netlink interface Basic genetlink and init infrastructure for the netlink interface, register genetlink family "ethtool". Add CONFIG_ETHTOOL_NETLINK Kconfig option to make the build optional. Add initial overall interface description into Documentation/networking/ethtool-netlink.rst, further patches will add more detailed information. Signed-off-by: Michal Kubecek Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 356b23c073dd063427102329b296061855b912d9 Author: Kevin Kou Date: Wed Dec 25 08:27:25 2019 +0000 sctp: do trace_sctp_probe after SACK validation and check The function sctp_sf_eat_sack_6_2 now performs the Verification Tag validation, Chunk length validation, Bogu check, and also the detection of out-of-order SACK based on the RFC2960 Section 6.2 at the beginning, and finally performs the further processing of SACK. The trace_sctp_probe now triggered before the above necessary validation and check. this patch is to do the trace_sctp_probe after the chunk sanity tests, but keep doing trace if the SACK received is out of order, for the out-of-order SACK is valuable to congestion control debugging. v1->v2: - keep doing SCTP trace if the SACK is out of order as Marcelo's suggestion. v2->v3: - regenerate the patch as v2 generated on top of v1, and add 'net-next' tag to the new one as Marcelo's comments. Signed-off-by: Kevin Kou Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller commit 0df952873636a6df4b7469a4eb4da1e477031e3a Author: Nikita Yushchenko Date: Wed Dec 25 08:22:38 2019 +0300 mv88e6xxx: Add serdes Rx statistics If packet checker is enabled in the serdes, then Rx counter registers start working, and no side effects have been detected. This patch enables packet checker automatically when powering serdes on, and exposes Rx counter registers via ethtool statistics interface. Code partially basded by older attempt by Andrew Lunn. Signed-off-by: Nikita Yushchenko Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit cad451dd2427d6ddd38a411e688def499daa798d Author: YueHaibing Date: Tue Dec 24 20:51:28 2019 +0800 net: ena: remove set but not used variable 'rx_ring' drivers/net/ethernet/amazon/ena/ena_netdev.c: In function ena_xdp_xmit_buff: drivers/net/ethernet/amazon/ena/ena_netdev.c:316:19: warning: variable rx_ring set but not used [-Wunused-but-set-variable] commit 548c4940b9f1 ("net: ena: Implement XDP_TX action") left behind this unused variable. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit c8f957df6e338406128cadb2ee30e38f9a816ed6 Author: Mao Wenan Date: Tue Dec 24 19:58:12 2019 +0800 net: dsa: qca: ar9331: drop pointless static qualifier in ar9331_sw_mbus_init There is no need to set variable 'mbus' static since new value always be assigned before use it. Signed-off-by: Mao Wenan Reviewed-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 8a3f44a0bb76c4e69dea3ad398ada41ae4ffc3ea Author: Xu Wang Date: Tue Dec 24 09:37:04 2019 +0000 ppp: Remove redundant BUG_ON() check in ppp_pernet Passing NULL to ppp_pernet causes a crash via BUG_ON. Dereferencing net in net_generic() also has the same effect. This patch removes the redundant BUG_ON check on the same parameter. Signed-off-by: Xu Wang Signed-off-by: David S. Miller commit 36a78867f80c4040fbfc5865f0ecd5ec55d688a7 Merge: 2bbc078f812d ede656e84658 Author: David S. Miller Date: Fri Dec 27 16:29:15 2019 -0800 Merge branch 'tcp_cubic-various-fixes' Eric Dumazet says: ==================== tcp_cubic: various fixes This patch series converts tcp_cubic to usec clock resolution for Hystart logic. This makes Hystart more relevant for data-center flows. Prior to this series, Hystart was not kicking, or was kicking without good reason, since the 1ms clock was too coarse. Last patch also fixes an issue with Hystart vs TCP pacing. v2: removed a last-minute debug chunk from last patch ==================== Signed-off-by: David S. Miller commit ede656e8465839530c3287c7f54adf75dc2b9563 Author: Eric Dumazet Date: Mon Dec 23 12:27:54 2019 -0800 tcp_cubic: make Hystart aware of pacing For years we disabled Hystart ACK train detection at Google because it was fooled by TCP pacing. ACK train detection uses a simple heuristic, detecting if we receive ACK past half the RTT, to exit slow start before hitting the bottleneck and experience massive drops. But pacing by design might delay packets up to RTT/2, so we need to tweak the Hystart logic to be aware of this extra delay. Tested: Added a 100 usec delay at receiver. Before: nstat -n;for f in {1..10}; do ./super_netperf 1 -H lpaa24 -l -4000000; done;nstat|egrep "Hystart" 9117 7057 9553 8300 7030 6849 9533 10126 6876 8473 TcpExtTCPHystartTrainDetect 10 0.0 TcpExtTCPHystartTrainCwnd 1230 0.0 After : nstat -n;for f in {1..10}; do ./super_netperf 1 -H lpaa24 -l -4000000; done;nstat|egrep "Hystart" 9845 10103 10866 11096 11936 11487 11773 12188 11066 11894 TcpExtTCPHystartTrainDetect 10 0.0 TcpExtTCPHystartTrainCwnd 6462 0.0 Disabling Hystart ACK Train detection gives similar numbers echo 2 >/sys/module/tcp_cubic/parameters/hystart_detect nstat -n;for f in {1..10}; do ./super_netperf 1 -H lpaa24 -l -4000000; done;nstat|egrep "Hystart" 11173 10954 12455 10627 11578 11583 11222 10880 10665 11366 Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Signed-off-by: David S. Miller commit 42f3a8aaae66d31d87850fb4b02979a0fc5dc541 Author: Eric Dumazet Date: Mon Dec 23 12:27:53 2019 -0800 tcp_cubic: tweak Hystart detection for short RTT flows After switching ca->delay_min to usec resolution, we exit slow start prematurely for very low RTT flows, setting snd_ssthresh to 20. The reason is that delay_min is fed with RTT of small packet trains. Then as cwnd is increased, TCP sends bigger TSO packets. LRO/GRO aggregation and/or interrupt mitigation strategies on receiver tend to inflate RTT samples. Fix this by adding to delay_min the expected delay of two TSO packets, given current pacing rate. Tested: Sender uses pfifo_fast qdisc Before : $ nstat -n;for f in {1..10}; do ./super_netperf 1 -H lpaa24 -l -4000000; done;nstat|egrep "Hystart" 11348 11707 11562 11428 11773 11534 9878 11693 10597 10968 TcpExtTCPHystartTrainDetect 10 0.0 TcpExtTCPHystartTrainCwnd 200 0.0 After : $ nstat -n;for f in {1..10}; do ./super_netperf 1 -H lpaa24 -l -4000000; done;nstat|egrep "Hystart" 14877 14517 15797 18466 17376 14833 17558 17933 16039 18059 TcpExtTCPHystartTrainDetect 10 0.0 TcpExtTCPHystartTrainCwnd 1670 0.0 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit cff04e2da308c522f654237b45dd64248fe8d1fa Author: Eric Dumazet Date: Mon Dec 23 12:27:52 2019 -0800 tcp_cubic: switch bictcp_clock() to usec resolution Current 1ms clock feeds ca->round_start, ca->delay_min, ca->last_ack. This is quite problematic for data-center flows, where delay_min is way below 1 ms. This means Hystart Train detection triggers every time jiffies value is updated, since "((s32)(now - ca->round_start) > ca->delay_min >> 4)" expression becomes true. This kind of random behavior can be solved by reusing the existing usec timestamp that TCP keeps in tp->tcp_mstamp Note that a followup patch will tweak things a bit, because during slow start, GRO aggregation on receivers naturally increases the RTT as TSO packets gradually come to ~64KB size. To recap, right after this patch CUBIC Hystart train detection is more aggressive, since short RTT flows might exit slow start at cwnd = 20, instead of being possibly unbounded. Following patch will address this problem. Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Signed-off-by: David S. Miller commit 35821fc2b41c51161e503bade3630603668dd3af Author: Eric Dumazet Date: Mon Dec 23 12:27:51 2019 -0800 tcp_cubic: remove one conditional from hystart_update() If we initialize ca->curr_rtt to ~0U, we do not need to test for zero value in hystart_update() We only read ca->curr_rtt if at least HYSTART_MIN_SAMPLES have been processed, and thus ca->curr_rtt will have a sane value. Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Signed-off-by: David S. Miller commit 473900a504e510cf9175876de8892ad1e3e7efab Author: Eric Dumazet Date: Mon Dec 23 12:27:50 2019 -0800 tcp_cubic: optimize hystart_update() We do not care which bit in ca->found is set. We avoid accessing hystart and hystart_detect unless really needed, possibly avoiding one cache line miss. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit f971a2074447726ec9a3feee3648a2e157f08248 Author: Vladimir Oltean Date: Fri Dec 27 03:24:44 2019 +0200 spi: Catch improper use of PTP system timestamping API We can catch whether the SPI controller has declared it can take care of software timestamping transfers, but didn't. So do it. Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20191227012444.1204-1-olteanv@gmail.com Signed-off-by: Mark Brown commit 2bbc078f812d45b8decb55935dab21199bd21489 Merge: 9e41fbf3dd38 7c8dce4b1661 Author: David S. Miller Date: Fri Dec 27 14:20:10 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2019-12-27 The following pull-request contains BPF updates for your *net-next* tree. We've added 127 non-merge commits during the last 17 day(s) which contain a total of 110 files changed, 6901 insertions(+), 2721 deletions(-). There are three merge conflicts. Conflicts and resolution looks as follows: 1) Merge conflict in net/bpf/test_run.c: There was a tree-wide cleanup c593642c8be0 ("treewide: Use sizeof_field() macro") which gets in the way with b590cb5f802d ("bpf: Switch to offsetofend in BPF_PROG_TEST_RUN"): <<<<<<< HEAD if (!range_is_zero(__skb, offsetof(struct __sk_buff, priority) + sizeof_field(struct __sk_buff, priority), ======= if (!range_is_zero(__skb, offsetofend(struct __sk_buff, priority), >>>>>>> 7c8dce4b166113743adad131b5a24c4acc12f92c There are a few occasions that look similar to this. Always take the chunk with offsetofend(). Note that there is one where the fields differ in here: <<<<<<< HEAD if (!range_is_zero(__skb, offsetof(struct __sk_buff, tstamp) + sizeof_field(struct __sk_buff, tstamp), ======= if (!range_is_zero(__skb, offsetofend(struct __sk_buff, gso_segs), >>>>>>> 7c8dce4b166113743adad131b5a24c4acc12f92c Just take the one with offsetofend() /and/ gso_segs. Latter is correct due to 850a88cc4096 ("bpf: Expose __sk_buff wire_len/gso_segs to BPF_PROG_TEST_RUN"). 2) Merge conflict in arch/riscv/net/bpf_jit_comp.c: (I'm keeping Bjorn in Cc here for a double-check in case I got it wrong.) <<<<<<< HEAD if (is_13b_check(off, insn)) return -1; emit(rv_blt(tcc, RV_REG_ZERO, off >> 1), ctx); ======= emit_branch(BPF_JSLT, RV_REG_T1, RV_REG_ZERO, off, ctx); >>>>>>> 7c8dce4b166113743adad131b5a24c4acc12f92c Result should look like: emit_branch(BPF_JSLT, tcc, RV_REG_ZERO, off, ctx); 3) Merge conflict in arch/riscv/include/asm/pgtable.h: <<<<<<< HEAD ======= #define VMALLOC_SIZE (KERN_VIRT_SIZE >> 1) #define VMALLOC_END (PAGE_OFFSET - 1) #define VMALLOC_START (PAGE_OFFSET - VMALLOC_SIZE) #define BPF_JIT_REGION_SIZE (SZ_128M) #define BPF_JIT_REGION_START (PAGE_OFFSET - BPF_JIT_REGION_SIZE) #define BPF_JIT_REGION_END (VMALLOC_END) /* * Roughly size the vmemmap space to be large enough to fit enough * struct pages to map half the virtual address space. Then * position vmemmap directly below the VMALLOC region. */ #define VMEMMAP_SHIFT \ (CONFIG_VA_BITS - PAGE_SHIFT - 1 + STRUCT_PAGE_MAX_SHIFT) #define VMEMMAP_SIZE BIT(VMEMMAP_SHIFT) #define VMEMMAP_END (VMALLOC_START - 1) #define VMEMMAP_START (VMALLOC_START - VMEMMAP_SIZE) #define vmemmap ((struct page *)VMEMMAP_START) >>>>>>> 7c8dce4b166113743adad131b5a24c4acc12f92c Only take the BPF_* defines from there and move them higher up in the same file. Remove the rest from the chunk. The VMALLOC_* etc defines got moved via 01f52e16b868 ("riscv: define vmemmap before pfn_to_page calls"). Result: [...] #define __S101 PAGE_READ_EXEC #define __S110 PAGE_SHARED_EXEC #define __S111 PAGE_SHARED_EXEC #define VMALLOC_SIZE (KERN_VIRT_SIZE >> 1) #define VMALLOC_END (PAGE_OFFSET - 1) #define VMALLOC_START (PAGE_OFFSET - VMALLOC_SIZE) #define BPF_JIT_REGION_SIZE (SZ_128M) #define BPF_JIT_REGION_START (PAGE_OFFSET - BPF_JIT_REGION_SIZE) #define BPF_JIT_REGION_END (VMALLOC_END) /* * Roughly size the vmemmap space to be large enough to fit enough * struct pages to map half the virtual address space. Then * position vmemmap directly below the VMALLOC region. */ #define VMEMMAP_SHIFT \ (CONFIG_VA_BITS - PAGE_SHIFT - 1 + STRUCT_PAGE_MAX_SHIFT) #define VMEMMAP_SIZE BIT(VMEMMAP_SHIFT) #define VMEMMAP_END (VMALLOC_START - 1) #define VMEMMAP_START (VMALLOC_START - VMEMMAP_SIZE) [...] Let me know if there are any other issues. Anyway, the main changes are: 1) Extend bpftool to produce a struct (aka "skeleton") tailored and specific to a provided BPF object file. This provides an alternative, simplified API compared to standard libbpf interaction. Also, add libbpf extern variable resolution for .kconfig section to import Kconfig data, from Andrii Nakryiko. 2) Add BPF dispatcher for XDP which is a mechanism to avoid indirect calls by generating a branch funnel as discussed back in bpfconf'19 at LSF/MM. Also, add various BPF riscv JIT improvements, from Björn Töpel. 3) Extend bpftool to allow matching BPF programs and maps by name, from Paul Chaignon. 4) Support for replacing cgroup BPF programs attached with BPF_F_ALLOW_MULTI flag for allowing updates without service interruption, from Andrey Ignatov. 5) Cleanup and simplification of ring access functions for AF_XDP with a bonus of 0-5% performance improvement, from Magnus Karlsson. 6) Enable BPF JITs for x86-64 and arm64 by default. Also, final version of audit support for BPF, from Daniel Borkmann and latter with Jiri Olsa. 7) Move and extend test_select_reuseport into BPF program tests under BPF selftests, from Jakub Sitnicki. 8) Various BPF sample improvements for xdpsock for customizing parameters to set up and benchmark AF_XDP, from Jay Jayatheerthan. 9) Improve libbpf to provide a ulimit hint on permission denied errors. Also change XDP sample programs to attach in driver mode by default, from Toke Høiland-Jørgensen. 10) Extend BPF test infrastructure to allow changing skb mark from tc BPF programs, from Nikita V. Shirokov. 11) Optimize prologue code sequence in BPF arm32 JIT, from Russell King. 12) Fix xdp_redirect_cpu BPF sample to manually attach to tracepoints after libbpf conversion, from Jesper Dangaard Brouer. 13) Minor misc improvements from various others. ==================== Signed-off-by: David S. Miller commit 4ca153827f65a6779392fff668c46f9cc54d414b Author: Matt Roper Date: Mon Dec 23 17:20:26 2019 -0800 drm/i915/tgl: Extend Wa_1408615072 to tgl Although the workaround number and description are the same, the vsunit clock gate disable bit has moved to a new register and location on gen12. Bspec: 52890 Bspec: 52758 Cc: stable@kernel.vger.org Cc: Lucas De Marchi Cc: Radhakrishna Sripada Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191224012026.3157766-4-matthew.d.roper@intel.com Reviewed-by: Lucas De Marchi commit b9cf9dac3dac4c1d2a47d34f30ec53c0423cecf8 Author: Matt Roper Date: Mon Dec 23 17:20:25 2019 -0800 drm/i915: Add Wa_1408615072 and Wa_1407596294 to icl,ehl Workaround database indicates we should disable clock gating of both the vsunit and hsunit. Bspec: 33450 Bspec: 33451 Cc: stable@kernel.vger.org Cc: Lucas De Marchi Cc: Matt Atwood Cc: Radhakrishna Sripada Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191224012026.3157766-3-matthew.d.roper@intel.com Reviewed-by: Lucas De Marchi commit 1e1a139d62d1c11e3083c8638d31a9744bec3918 Author: Matt Roper Date: Mon Dec 23 17:20:24 2019 -0800 drm/i915: Extend WaDisableDARBFClkGating to icl,ehl,tgl WaDisableDARBFClkGating, now known as Wa_14010480278, has been added to the workaround tables for ICL, EHL, and TGL so we need to extend our platform test accordingly. Bspec: 33450 Bspec: 33451 Bspec: 52890 Cc: stable@kernel.vger.org Cc: Lucas De Marchi Cc: Matt Atwood Cc: Radhakrishna Sripada Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191224012026.3157766-2-matthew.d.roper@intel.com Reviewed-by: Lucas De Marchi commit 6ea578a519fe456b04a71e9ff26eba52dd0203b4 Author: Chris Wilson Date: Fri Dec 27 10:30:50 2019 +0000 drm/i915/selftests: Err out on coherency if initialisation failed If gt initialisation failed, we are left with no engines to use for coherency testing. Currently we bug out, which makes the actual error, so fail more gracefully instead. Closes: https://gitlab.freedesktop.org/drm/intel/issues/896 Signed-off-by: Chris Wilson Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191227103050.2715402-1-chris@chris-wilson.co.uk commit d7cfb661b206c0f9e66c9cdb3634f416c4283449 Author: Ondrej Jirman Date: Thu Dec 19 09:28:22 2019 -0800 arm64: dts: allwinner: h6: Add thermal sensor and thermal zones There are two sensors, one for CPU, one for GPU. Signed-off-by: Ondrej Jirman Signed-off-by: Vasily Khoruzhick Signed-off-by: Maxime Ripard commit 59e056cda4beb5412e3653e6360c2eb0fa770baa Author: Eneas U de Queiroz Date: Fri Dec 20 16:02:18 2019 -0300 crypto: qce - allow building only hashes/ciphers Allow the user to choose whether to build support for all algorithms (default), hashes-only, or skciphers-only. The QCE engine does not appear to scale as well as the CPU to handle multiple crypto requests. While the ipq40xx chips have 4-core CPUs, the QCE handles only 2 requests in parallel. Ipsec throughput seems to improve when disabling either family of algorithms, sharing the load with the CPU. Enabling skciphers-only appears to work best. Signed-off-by: Eneas U de Queiroz Signed-off-by: Herbert Xu commit 8ceda883205db6dfedb82e39f67feae3b50c95a1 Author: Eneas U de Queiroz Date: Fri Dec 20 16:02:17 2019 -0300 crypto: qce - initialize fallback only for AES Adjust cra_flags to add CRYPTO_NEED_FALLBACK only for AES ciphers, where AES-192 is not handled by the qce hardware, and don't allocate & free the fallback skcipher for other algorithms. Signed-off-by: Eneas U de Queiroz Signed-off-by: Herbert Xu commit 3e806a12d10af2581aa26c37b58439286eab9782 Author: Eneas U de Queiroz Date: Fri Dec 20 16:02:16 2019 -0300 crypto: qce - update the skcipher IV Update the IV after the completion of each cipher operation. Signed-off-by: Eneas U de Queiroz Signed-off-by: Herbert Xu commit 3ee50c896d712dc2fc8f34c2cd1918d035e74045 Author: Eneas U de Queiroz Date: Fri Dec 20 16:02:15 2019 -0300 crypto: qce - save a sg table slot for result buf When ctr-aes-qce is used for gcm-mode, an extra sg entry for the authentication tag is present, causing trouble when the qce driver prepares the dst-results sg table for dma. It computes the number of entries needed with sg_nents_for_len, leaving out the tag entry. Then it creates a sg table with that number plus one, used to store a result buffer. When copying the sg table, there's no limit to the number of entries copied, so the extra slot is filled with the authentication tag sg. When the driver tries to add the result sg, the list is full, and it returns EINVAL. By limiting the number of sg entries copied to the dest table, the slot for the result buffer is guaranteed to be unused. Signed-off-by: Eneas U de Queiroz Signed-off-by: Herbert Xu commit 7de4c2bd196f111e39cc60f6197654aff23ba2b4 Author: Eneas U de Queiroz Date: Fri Dec 20 16:02:14 2019 -0300 crypto: qce - fix xts-aes-qce key sizes XTS-mode uses two keys, so the keysizes should be doubled in skcipher_def, and halved when checking if it is AES-128/192/256. Signed-off-by: Eneas U de Queiroz Signed-off-by: Herbert Xu commit bb5c863b3d3cbd10e80b2ebf409934a091058f54 Author: Eneas U de Queiroz Date: Fri Dec 20 16:02:13 2019 -0300 crypto: qce - fix ctr-aes-qce block, chunk sizes Set blocksize of ctr-aes-qce to 1, so it can operate as a stream cipher, adding the definition for chucksize instead, where the underlying block size belongs. Signed-off-by: Eneas U de Queiroz Signed-off-by: Herbert Xu commit b3c16bfc6a79ae517ec3c44be615aed0ffa52c53 Author: Herbert Xu Date: Fri Dec 20 13:29:40 2019 +0800 crypto: skcipher - Add skcipher_ialg_simple helper This patch introduces the skcipher_ialg_simple helper which fetches the crypto_alg structure from a simple skcipher instance's spawn. This allows us to remove the third argument from the function skcipher_alloc_instance_simple. In doing so the reference count to the algorithm is now maintained by the Crypto API and the caller no longer needs to drop the alg refcount. Signed-off-by: Herbert Xu commit 93e23eb2ed6c11b4f483c8111ac155ec2b1f3042 Author: Vinay Kumar Yadav Date: Thu Dec 19 16:21:48 2019 +0530 crypto: chtls - Fixed memory leak Freed work request skbs when connection terminates. enqueue_wr()/ dequeue_wr() is shared between softirq and application contexts, should be protected by socket lock. Moved dequeue_wr() to appropriate file. Signed-off-by: Vinay Kumar Yadav Signed-off-by: Herbert Xu commit 596d0a289554a6946173ec898928e6390bb0943a Author: Vinay Kumar Yadav Date: Thu Dec 19 16:21:47 2019 +0530 crypto: chtls - Add support for AES256-GCM based ciphers Added support to set 256 bit key to the hardware from setsockopt for AES256-GCM based ciphers. Signed-off-by: Vinay Kumar Yadav Signed-off-by: Herbert Xu commit 112e7b7b6a2e33fbc5624991694d4a630f99e04e Author: Adam Ford Date: Wed Dec 18 07:06:14 2019 -0600 crypto: caam - Add support for i.MX8M Mini The i.MX8M Mini uses the same crypto engine as the i.MX8MQ, but the driver is restricting the check to just the i.MX8MQ. This patch expands the check for either i.MX8MQ or i.MX8MM. Signed-off-by: Adam Ford Tested-by: Iuliana Prodan Reviewed-by: Iuliana Prodan Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 5f567fffaae995dce3498e175e47d5a779fb0270 Author: Herbert Xu Date: Wed Dec 18 15:53:01 2019 +0800 crypto: api - Retain alg refcount in crypto_grab_spawn This patch changes crypto_grab_spawn to retain the reference count on the algorithm. This is because the caller needs to access the algorithm parameters and without the reference count the algorithm can be freed at any time. The reference count will be subsequently dropped by the crypto API once the instance has been registered. The helper crypto_drop_spawn will also conditionally drop the reference count depending on whether it has been registered. Note that the code is actually added to crypto_init_spawn. However, unless the caller activates this by setting spawn->dropref beforehand then nothing happens. The only caller that sets dropref is currently crypto_grab_spawn. Once all legacy users of crypto_init_spawn disappear, then we can kill the dropref flag. Internally each instance will maintain a list of its spawns prior to registration. This memory used by this list is shared with other fields that are only used after registration. In order for this to work a new flag spawn->registered is added to indicate whether spawn->inst can be used. Fixes: d6ef2f198d4c ("crypto: api - Add crypto_grab_spawn primitive") Signed-off-by: Herbert Xu commit 3932aa1ce38148cd54b6ec2fd1ce070e2160b628 Author: Ben Dooks (Codethink) Date: Tue Dec 17 11:30:24 2019 +0000 crypto: sun4i-ss - make unexported sun4i_ss_pm_ops static The sun4i_ss_pm_ops is not referenced outside the driver except via a pointer, so make it static to avoid the following warning: drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c:276:25: warning: symbol 'sun4i_ss_pm_ops' was not declared. Should it be static? Signed-off-by: Ben Dooks (Codethink) Signed-off-by: Herbert Xu commit 20aaed22fec757114f9f6ca28e473e32ccb4b5c1 Author: Peter Ujfalusi Date: Tue Dec 17 09:35:06 2019 +0200 crypto: stm32/hash - Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Signed-off-by: Herbert Xu commit 8004865c2e7bc9574d5ddfc99fe2a90eca840b17 Author: Peter Ujfalusi Date: Tue Dec 17 09:33:05 2019 +0200 crypto: img-hash - Use dma_request_chan instead dma_request_slave_channel dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Signed-off-by: Herbert Xu commit aa127963f1cab2b93c74c9b128a84610203fb674 Author: Jason A. Donenfeld Date: Mon Dec 16 19:53:26 2019 +0100 crypto: lib/curve25519 - re-add selftests Somehow these were dropped when Zinc was being integrated, which is problematic, because testing the library interface for Curve25519 is important.. This commit simply adds them back and wires them in in the same way that the blake2s selftests are wired in. Signed-off-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit c782937e92826af464e65111e9f7a7a774b6c276 Author: Chen Zhou Date: Mon Dec 16 18:58:48 2019 +0800 crypto: api - remove unneeded semicolon Fixes coccicheck warning: ./include/linux/crypto.h:573:2-3: Unneeded semicolon Signed-off-by: Chen Zhou Signed-off-by: Herbert Xu commit eb5b9154bfb3617254776b4ef80a31ac4530c19b Author: Chen Zhou Date: Mon Dec 16 18:57:04 2019 +0800 crypto: allwinner - remove unneeded semicolon Fixes coccicheck warning: ./drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c:558:52-53: Unneeded semicolon Signed-off-by: Chen Zhou Signed-off-by: Herbert Xu commit 3df663a147fe077a6ee8444ec626738946e65547 Author: Rafael J. Wysocki Date: Fri Dec 27 11:04:21 2019 +0100 ACPI: EC: Reference count query handlers under lock There is a race condition in acpi_ec_get_query_handler() theoretically allowing query handlers to go away before refernce counting them. In order to avoid it, call kref_get() on query handlers under ec->mutex. Also simplify the code a bit while at it. Signed-off-by: Rafael J. Wysocki commit e6d4f08a677654385869ba0c39d7c9ceec47e5c5 Author: Rafael J. Wysocki Date: Fri Dec 13 09:56:38 2019 +0100 intel_idle: Use ACPI _CST on server systems In many cases, especially on server systems, it is desirable to avoid enabling C-states that have been disabled in the platform firmware (BIOS) setup, except for C1E. As a rule, the C-states disabled this way are not listed by ACPI _CST, so if that is used by intel_idle along with the specific table of C-states that it has for the given processor, the C-states disabled through the platform firmware will not be enabled by default by intel_idle. Accordingly, set the use_acpi flag (introduced previously) in all server processor profiles defined in intel_idle (so as to make it use ACPI _CST to decide which C-states to enable by default) and set the CPUIDLE_FLAG_ALWAYS_ENABLE flag (also introduced previously) for C1E in all C-states tables in intel_idle that contain C1 too (so that C1E is enabled regardless of whether or not it is listed by ACPI _CST). Signed-off-by: Rafael J. Wysocki commit 4ec32d9e8e5b6d6eb491eeee3938665d8a2388fa Author: Rafael J. Wysocki Date: Fri Dec 13 09:56:29 2019 +0100 intel_idle: Add module parameter to prevent ACPI _CST from being used Add a new module parameter called "no_acpi" to the intel_idle driver to allow the driver to be prevented from using ACPI _CST via kernel command line. Signed-off-by: Rafael J. Wysocki commit bff8e60a86f4960133f90ad9add9adeb082b8154 Author: Rafael J. Wysocki Date: Fri Dec 13 09:56:21 2019 +0100 intel_idle: Allow ACPI _CST to be used for selected known processors Update the intel_idle driver to get the C-states information from ACPI _CST in some cases in which the processor is known to the driver, as long as that information is available and the new use_acpi flag is set in the profile of the processor in question. In the cases when there is a specific table of C-states for the given processor in the driver, that table is used as the primary source of information on the available C-states, but if ACPI _CST is present, the C-states that are not listed by it will not be enabled by default (they still can be enabled later by user space via sysfs, though). The new CPUIDLE_FLAG_ALWAYS_ENABLE flag can be used for marking C-states that should be enabled by default even if they are not listed by ACPI _CST. Signed-off-by: Rafael J. Wysocki commit 75a80267410e38ab76c4ceb39753f96d72113781 Author: Rafael J. Wysocki Date: Fri Dec 13 09:56:13 2019 +0100 cpuidle: Allow idle states to be disabled by default In certain situations it may be useful to prevent some idle states from being used by default while allowing user space to enable them later on. For this purpose, introduce a new state flag, CPUIDLE_FLAG_OFF, to mark idle states that should be disabled by default, make the core set CPUIDLE_STATE_DISABLED_BY_USER for those states at the initialization time and add a new state attribute in sysfs, "default_status", to inform user space of the initial status of the given idle state ("disabled" if CPUIDLE_FLAG_OFF is set for it, "enabled" otherwise). Signed-off-by: Rafael J. Wysocki commit 18734958e9bfbc055805d110a38dc76307eba742 Author: Rafael J. Wysocki Date: Fri Dec 13 09:56:01 2019 +0100 intel_idle: Use ACPI _CST for processor models without C-state tables Modify the intel_idle driver to get the C-states information from ACPI _CST if the processor model is not recognized by it. The processor is still required to support MWAIT and the information from ACPI _CST will only be used if all of the C-states listed by _CST are of the ACPI_CSTATE_FFH type (which means that they are expected to be entered via MWAIT). Moreover, the driver assumes that the _CST information is the same for all CPUs in the system, so it is sufficient to evaluate _CST for one of them and extract the common list of C-states from there. Also _CST is evaluated once at the system initialization time and the driver does not respond to _CST change notifications (that can be changed in the future). The main functional difference between intel_idle with this change and the ACPI processor driver is that the former sets the target residency to be equal to the exit latency (provided by _CST) for C1-type C-states and to 3 times the exit latency value for the other C-state types, whereas the latter obtains the target residency by multiplying the exit latency by the same number (2 by default) for all C-state types. Therefore it is expected that in general using the former instead of the latter on the same system will lead to improved energy-efficiency. Signed-off-by: Rafael J. Wysocki commit 9f3d6daf61e5156139cd05643f7f1c2a9b7b49b0 Author: Rafael J. Wysocki Date: Fri Dec 13 09:55:52 2019 +0100 intel_idle: Refactor intel_idle_cpuidle_driver_init() Move the C-state verification and checks from intel_idle_cpuidle_driver_init() to a separate function, intel_idle_verify_cstate(), and make the former call it after checking the CPUIDLE_FLAG_UNUSABLE state flag. Also combine the drv->states[] updates with the incrementation of drv->state_count. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit 77fb4e0a559a960eb36d0b2c50c781c5492577eb Author: Rafael J. Wysocki Date: Fri Dec 13 09:55:42 2019 +0100 ACPI: processor: Export acpi_processor_evaluate_cst() The intel_idle driver will be modified to use ACPI _CST subsequently and it will need to call acpi_processor_evaluate_cst(), so move that function to acpi_processor.c so that it is always present (which is required by intel_idle) and export it to modules to allow the ACPI processor driver (which is modular) to call it. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit 239ed06d0eefc4ee351af69bd64742ada56c4bdb Author: Rafael J. Wysocki Date: Mon Dec 16 12:07:01 2019 +0100 ACPI: processor: Make ACPI_PROCESSOR_CSTATE depend on ACPI_PROCESSOR To avoid build errors when CONFIG_ACPI_PROCESSOR_CSTATE is set and CONFIG_ACPI_PROCESSOR is not (that may appear in randconfig builds), make the former depend on the latter. Acked-by: Len Brown Signed-off-by: Rafael J. Wysocki commit 7c8dce4b166113743adad131b5a24c4acc12f92c Author: Andrii Nakryiko Date: Thu Dec 26 13:02:53 2019 -0800 bpftool: Make skeleton C code compilable with C++ compiler When auto-generated BPF skeleton C code is included from C++ application, it triggers compilation error due to void * being implicitly casted to whatever target pointer type. This is supported by C, but not C++. To solve this problem, add explicit casts, where necessary. To ensure issues like this are captured going forward, add skeleton usage in test_cpp test. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191226210253.3132060-1-andriin@fb.com commit efb4650885187425f1da96460e5d2a84650f861a Author: james qian wang (Arm Technology China) Date: Thu Dec 12 07:48:13 2019 +0000 drm/komeda: Add runtime_pm support - Add pm_runtime_get/put to crtc_enable/disable along with the real display usage - Add runtime_get/put to register_show, since register_show() will access register, need to wakeup HW. - For the case that PM is not enabled or configured, manually wakeup HW Signed-off-by: james qian wang (Arm Technology China) Reviewed-by: Mihail Atanassov Link: https://patchwork.freedesktop.org/patch/msgid/20191212074756.14678-1-james.qian.wang@arm.com commit 3ae3271443b337c1cd421a9b73d51c5c2de52977 Merge: 5f773e551a3b 3446c63a0f2a Author: Dave Airlie Date: Fri Dec 27 15:25:04 2019 +1000 Merge tag 'drm-intel-next-2019-12-23' of git://anongit.freedesktop.org/drm/drm-intel into drm-next i915 features for v5.6: - Separate hardware and uapi state (Maarten) - Expose a number of sprite and plane formats (Ville) - DDC symlink in HDMI connector sysfs directory (Andrzej Pietrasiewicz) - Improve obj->mm.lock nesting lock annotation (Daniel) (Includes lockdep changes) - Selftest improvements across the board (Chris) - ICL/TGL VDSC support on DSI (Jani, Vandita) - TGL DSB fixes (Animesh, Lucas, Tvrtko) - VBT parsing improvements and fixes (Lucas, Matt, José, Jani, Dan Carpenter) - Fix LPSS vs. PMIC PWM backlight use on BYT/CHT (Hans) (Includes ACPI+MFD changes) - Display state, crtc, plane code refactoring (Ville) - Set opregion chpd value to indicate the driver handles hotplug (Hans de Goede) - DSI updates and fixes, TGL pipe D support, port mapping (José, Jani, Vandita) - Make HDCP 2.2 support cover CFL (Juston Li) - Fix CML PCI IDs and ULT (Shawn Lee) - CMP-V PCH fix (Imre) - TGL: Add another TGL PCH ID (James) - EHL/JSL: Add new PCI IDs (James) - Rename pipe update tracepoints (Ville) - Fix FBC on GLK+ (Ville) - GuC fixes and improvements (Daniele, Don Hiatt, Stuart Summers, Matthew Brost) - Display debugfs improvements (Ville) - Hotplug/irq fixes (Matt) - PSR fixes and improvements (José) - DRM_I915_GEM_MMAP_OFFSET ioctl (Abdiel) - Static analysis fixes (Colin Ian King) - Register sysctl path globally (Venkata Sandeep Dhanalakota) - Introduce new macros for tracing (Venkata Sandeep Dhanalakota) - Migrate gt towards intel_uncore_read/write (Andi) - Add rps frequency translation helpers (Andi) - Fix TGL transcoder clock off sequence (José) - Fix TGL port A audio (Kai Vehmanen) - TGL render decompression (DK) - GEM/GT improvements and fixes across the board (Chris) - Couple of backmerges (Jani) Signed-off-by: Dave Airlie # gpg: Signature made Tue 24 Dec 2019 03:20:48 AM AEST # gpg: using RSA key D398079D26ABEE6F # gpg: Good signature from "Jani Nikula " # 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: 1565 A65B 77B0 632E 1124 E59C D398 079D 26AB EE6F # Conflicts: # drivers/gpu/drm/i915/display/intel_fbc.c # drivers/gpu/drm/i915/gt/intel_lrc.c # drivers/gpu/drm/i915/i915_gem.c From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87lfr3rkry.fsf@intel.com commit 82b1cc447a2c7c5121ce34f15f9840110ee3499f Author: Bjorn Andersson Date: Wed Nov 13 12:39:51 2019 -0800 arm64: dts: qcom: db845c: Move remoteproc firmware to sdm845 The redistributable firmware should work on any engineering device, so lets push this to qcom/sdm845, rather than qcom/db845c. Also specify the path for the modem firmware. Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20191113203951.3704428-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit c586f47f55d8239466824f917582c7d7d9e546ed Author: Florian Fainelli Date: Fri Dec 20 10:21:15 2019 -0800 ARM: bcm: Select ARM_AMBA for ARCH_BRCMSTB BCM7211 uses a PL011 UART and is supported using ARCH_BRCMSTB, make sure that we can enable that driver by selecting ARM_AMBA. Signed-off-by: Florian Fainelli commit 8f902dbd6ed2397ac16ab7f7f67e66f5ff1f8bba Author: james qian wang (Arm Technology China) Date: Thu Dec 12 07:27:55 2019 +0000 drm/komeda: Add event handling for EMPTY/FULL EMPTY/FULL are HW input/output FIFO condition identifer, which are useful information for addressing the problem, so expose them. Signed-off-by: james qian wang (Arm Technology China) Reviewed-by: Mihail Atanassov Link: https://patchwork.freedesktop.org/patch/msgid/20191212072737.30116-1-james.qian.wang@arm.com commit f03ee2042b2dc46e3452e87324d90f147de4a944 Author: Linus Walleij Date: Thu Dec 5 10:24:11 2019 +0100 spi: oc-tiny: Use GPIO descriptors Switch the OC Tiny driver over to handling CS GPIOs using GPIO descriptors in the core. This driver is entirely relying on GPIOs to be used for chipselect, so let the core pick these out using either device tree or machine descriptors. There are no in-tree users of this driver so no board files need to be patched, out-of-tree boardfiles can use machine descriptor tables, c.f. commit 1dfbf334f123. Cc: Thomas Chou Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191205092411.64341-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit 5def0136c609062091b03a91ac1d987f4afc5363 Author: Ravulapati Vishnu vardhan rao Date: Thu Dec 5 19:07:26 2019 +0530 ASoC: amd: Create multiple I2S platform device endpoint Creates Platform Device endpoints for multiple I2S instances: SP and BT endpoints device. Pass PCI resources like MMIO, irq to the platform devices. Signed-off-by: Ravulapati Vishnu vardhan rao Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/1575553053-18344-2-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit 6cbdec2d3ca64932a068de4022c346b43894bfa5 Author: Bjorn Andersson Date: Sun Oct 20 22:13:22 2019 -0700 arm64: dts: qcom: msm8996: Introduce IFC6640 Introduce a base dts for the Inforce 6640 Single Board Computer. This initial commit boots to console on the uart and provides UFS and SD card storage support. Acked-by: Vinod Koul Signed-off-by: Bjorn Andersson commit 83d9ed4342a3763f9bb42c75e13bc008ed8c99d1 Author: Bjorn Andersson Date: Sun Oct 20 22:13:21 2019 -0700 arm64: dts: qcom: db820c: Use regulator names from schematics Update the regulator names in db820c.dtsi to use the names from the schematics, instead of the made up genric names. Acked-by: Vinod Koul Signed-off-by: Bjorn Andersson commit 50aa72ccb30babc2c547bd6c1572bf899ffa4418 Author: Bjorn Andersson Date: Sun Oct 20 22:13:20 2019 -0700 arm64: dts: qcom: msm8996: Sort all nodes in msm8996.dtsi Sort all the nodes by unit address, then name. Acked-by: Vinod Koul Signed-off-by: Bjorn Andersson commit 86f6d6225e5e546ffeaae6db597f4aabe50d26c1 Author: Bjorn Andersson Date: Sun Oct 20 22:13:19 2019 -0700 arm64: dts: qcom: msm8996: Pad addresses Pad all addresses in msm8996.dtsi to 8 digits, in order to make it easier to ensure ordering when adding new nodes. Acked-by: Vinod Koul Signed-off-by: Bjorn Andersson commit 88264f1f6bf56249470576f54e53f924459be402 Author: Bjorn Andersson Date: Sun Oct 20 22:13:18 2019 -0700 arm64: dts: qcom: db820c: Remove pin specific files Rather than scattering pinctrl definitions in various files, merge the nodes into db820c.dtsi to make it easier to navigate. Acked-by: Vinod Koul Signed-off-by: Bjorn Andersson commit d5f4ac865a4e63e8d95106377d0d7aa6bf70238b Author: Bjorn Andersson Date: Sun Oct 20 22:13:17 2019 -0700 arm64: dts: qcom: db820c: Sort all nodes Sort all nodes in db820c.dtsi based on address, then name. Acked-by: Vinod Koul Signed-off-by: Bjorn Andersson commit 7b494cc41ebb909cf4d122ace056a1cd00018456 Author: Bjorn Andersson Date: Sun Oct 20 22:13:16 2019 -0700 arm64: dts: qcom: db820c: Group root nodes Prior refactoring have left a few root nodes scattered throughout db820c.dtsi, group these at the top of the file. Acked-by: Vinod Koul Signed-off-by: Bjorn Andersson commit c61a5658e882e40495207a3058ded3721e9f8856 Author: Bjorn Andersson Date: Sun Oct 20 22:13:15 2019 -0700 arm64: dts: qcom: msm8996: Move regulators to db820c As the definition of available PMICs and the names of their outputs are board specifc move this to db820c.dtsi Acked-by: Vinod Koul Signed-off-by: Bjorn Andersson commit 80884431430995254257848d1a05266a2b791c58 Author: Bjorn Andersson Date: Sun Oct 20 22:13:14 2019 -0700 arm64: dts: qcom: msm8996: Move regulator consumers to db820c Supplies for the various components in the SoC depends on board layout, so move the supply definitions to db820c.dtsi instead of carrying them in the platform dtsi. Acked-by: Vinod Koul Signed-off-by: Bjorn Andersson commit 75b77d6492eb5e582e17618b71f62140faf2de29 Author: Bjorn Andersson Date: Sun Oct 20 22:13:13 2019 -0700 arm64: dts: qcom: msm8996: Use node references in db820c Instead of mimicing the structure of the platform, reference nodes by their label in apq8096-db820c.dtsi. Add labels in msm8996.dtsi where necessary. Acked-by: Vinod Koul Signed-off-by: Bjorn Andersson commit f978d45b4aaba6c8e9ad2406147be67f8f733c42 Author: Bjorn Andersson Date: Sun Oct 20 22:13:12 2019 -0700 arm64: dts: qcom: db820c: Move non-soc entries out of /soc The USB id pins and wlan regulator are not platform devices, so move them out of /soc Acked-by: Vinod Koul Signed-off-by: Bjorn Andersson commit 9e41fbf3dd38327d440a8f3ba0c234519dbb5280 Merge: 0914d2bb11cc 8ca8559ff3ce Author: David S. Miller Date: Thu Dec 26 15:23:50 2019 -0800 Merge branch 's390-qeth-next' Julian Wiedmann says: ==================== s390/qeth: updates 2019-12-23 please apply the following patch series for qeth to your net-next tree. This reworks the RX code to use napi_gro_frags() when building non-linear skbs, along with some consolidation and cleanups. Happy holidays - and many thanks for all the effort & support over the past year, to both Jakub and you. It's much appreciated. ==================== Signed-off-by: David S. Miller commit 8ca8559ff3cefd78e12b9658f21cc8bcc02407ec Author: Julian Wiedmann Date: Mon Dec 23 15:22:27 2019 +0100 s390/qeth: remove QETH_RX_PULL_LEN Since commit f677fcb9aeb6 ("s390/qeth: ensure linear access to packet headers"), the CQ-specific skbs are allocated with a slightly bigger linear part than necessary. Shrink it down to the maximum that's needed by qeth_extract_skb(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit dcdcf8670dad7547cff59ef9ddd7312fc706464a Author: Julian Wiedmann Date: Mon Dec 23 15:22:26 2019 +0100 s390/qeth: use napi_gro_frags() for SG skbs For non-linear packets, get the skb for attaching the page fragments from napi_get_frags() so that it can be recycled during GRO. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit c04b116a2866b3e3a6b909a576769ccde3d622ac Author: Julian Wiedmann Date: Mon Dec 23 15:22:25 2019 +0100 s390/qeth: consolidate RX code To reduce the path length and levels of indirection, move the RX processing from the sub-drivers into the core. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 0914d2bb11cc182039084ac3b961dc359b647468 Author: Mao Wenan Date: Mon Dec 23 18:42:57 2019 +0800 af_packet: refactoring code for prb_calc_retire_blk_tmo If __ethtool_get_link_ksettings() is failed and with non-zero value, prb_calc_retire_blk_tmo() should return DEFAULT_PRB_RETIRE_TOV firstly. This patch is to refactory code and make it more readable. Signed-off-by: Mao Wenan Signed-off-by: David S. Miller commit 9476654bd5e8ad42abe8ee9f9e90069ff8e60c17 Author: Paul Durrant Date: Mon Dec 23 09:59:23 2019 +0000 xen-netback: support dynamic unbind/bind By re-attaching RX, TX, and CTL rings during connect() rather than assuming they are freshly allocated (i.e. assuming the counters are zero), and avoiding forcing state to Closed in netback_remove() it is possible for vif instances to be unbound and re-bound from and to (respectively) a running guest. Dynamic unbind/bind is a highly useful feature for a backend module as it allows it to be unloaded and re-loaded (i.e. updated) without requiring domUs to be halted. This has been tested by running iperf as a server in the test VM and then running a client against it in a continuous loop, whilst also running: while true; do echo vif-$DOMID-$VIF >unbind; echo down; rmmod xen-netback; echo unloaded; modprobe xen-netback; cd $(pwd); brctl addif xenbr0 vif$DOMID.$VIF; ip link set vif$DOMID.$VIF up; echo up; sleep 5; done in dom0 from /sys/bus/xen-backend/drivers/vif to continuously unbind, unload, re-load, re-bind and re-plumb the backend. Clearly a performance drop was seen but no TCP connection resets were observed during this test and moreover a parallel SSH connection into the guest remained perfectly usable throughout. Signed-off-by: Paul Durrant Reviewed-by: Wei Liu Signed-off-by: David S. Miller commit 0cec114e36606412908a35695a5db944cec2e3db Author: Rob Herring Date: Thu Dec 26 15:36:47 2019 -0700 scripts/dtc: Update to upstream version v1.5.1-22-gc40aeb60b47a This adds the following commits from upstream: c40aeb60b47a travis.yml: Run tests on the non-x86 builders, too 9f86aff444f4 Add .cirrus.yml for FreeBSD build 34c82275bae6 Avoid gnu_printf attribute when using Clang 743000931bc9 tests: default to 'cc' if CC not set adcd676491cc Add test-case for trailing zero d9c55f855b65 Remove trailing zero from the overlay path 7a22132c79ec pylibfdt: Adjust for deprecated test methods dbe80d577ee2 tests: add extension to sed -i for GNU/BSD sed compatibility af57d440d887 libfdt: Correct prototype for fdt_ro_probe_() 6ce585ac153b Use correct inttypes.h format specifier 715028622547 support byacc in addition to bison fdf3f6d897ab pylibfdt: Correct the type for fdt_property_stub() 430419c28100 tests: fix some python warnings 588a29ff2e4e util: use gnu_printf format attribute bc876708ab1d fstree: replace lstat with stat 4c3c4ccb9916 dumptrees: pass outputdir as first argument aa522da9fff6 tests: allow out-of-tree test run 0d0d0fa51b1f fdtoverlay: Return non-zero exit code if overlays can't be applied 4605eb047b38 Add .editorconfig 18d7b2f4ee45 yamltree: Ensure consistent bracketing of properties with phandles 67f790c1adcc libfdt.h: add explicit cast from void* to uint8_t* in fdt(32|64)_st b111122ea5eb pylibfdt: use python3 shebang 60e0db3d65a1 Ignore phandle properties in /aliases 95ce19c14064 README: update for Python 3 5345db19f615 livetree: simplify condition in get_node_by_path b8d6eca78210 libfdt: Allow #size-cells of 0 184f51099471 Makefile: Add EXTRA_CFLAGS variable 812b1956a076 libfdt: Tweak data handling to satisfy Coverity 5c715a44776a fdtoverlay: Ignore symbols in overlays which don't apply to the target tree b99353474850 fdtoverlay: Allow adding labels to __overlay__ nodes in overlays d6de81b81b68 pylibfdt: Add support for fdt_get_alias() 1c17714dbb3a pylibfdt: Correct the FdtSw example ad57e4574a37 tests: Add a failed test case for 'fdtoverlay' with long target path bbe3b36f542b fdtoverlay: Rework output allocation 6c2e61f08396 fdtoverlay: Improve error messages 297f5abb362e fdtoverlay: Check for truncated overlay blobs Cc: Frank Rowand Cc: clang-built-linux@googlegroups.com Signed-off-by: Rob Herring commit 8d347992989465fc7135ef1a84ca4c710a705c1a Merge: 1f4f16fa19f4 1b3047b5208a Author: David S. Miller Date: Thu Dec 26 13:22:17 2019 -0800 Merge branch 'RTL8211F-RGMII-RX-TX-delay-configuration-improvements' Martin Blumenstingl says: ==================== RTL8211F: RGMII RX/TX delay configuration improvements In discussion with Andrew [0] we figured out that it would be best to make the RX delay of the RTL8211F PHY configurable (just like the TX delay is already configurable). While here I took the opportunity to add some logging to the TX delay configuration as well. There is no public documentation for the RX and TX delay registers. I received this information a while ago (and created this RfC patch back then: [1]). Realtek gave me permission to take the information from the datasheet extracts and phase them in my own words and publish that (I am not allowed to publish the datasheet extracts). I have tested these patches on two boards: - Amlogic Meson8b Odroid-C1 - Amlogic GXM Khadas VIM2 Both still behave as before these changes (iperf3 speeds are the same in both directions: RX and TX), which is expected because they are currently using phy-mode = "rgmii" with the RX delay not being generated by the PHY. [0] https://patchwork.ozlabs.org/patch/1215313/ [1] https://patchwork.ozlabs.org/patch/843946/ ==================== Signed-off-by: David S. Miller commit 1b3047b5208a80e7213bc4621f6fa4e5feb8dee4 Author: Martin Blumenstingl Date: Thu Dec 26 19:51:48 2019 +0100 net: phy: realtek: add support for configuring the RX delay on RTL8211F On RTL8211F the RX and TX delays (2ns) can be configured in two ways: - pin strapping (RXD1 for the TX delay and RXD0 for the RX delay, LOW means "off" and HIGH means "on") which is read during PHY reset - using software to configure the TX and RX delay registers So far only the configuration using pin strapping has been supported. Add support for enabling or disabling the RGMII RX delay based on the phy-mode to be able to get the RX delay into a known state. This is important because the RX delay has to be coordinated between the PHY, MAC and the PCB design (trace length). With an invalid RX delay applied (for example if both PHY and MAC add a 2ns RX delay) Ethernet may not work at all. Also add debug logging when configuring the RX delay (just like the TX delay) because this is a common source of problems. Signed-off-by: Martin Blumenstingl Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 3aec743d69822d22d4a5b60deb9518ed8be6fa67 Author: Martin Blumenstingl Date: Thu Dec 26 19:51:47 2019 +0100 net: phy: realtek: add logging for the RGMII TX delay configuration RGMII requires a delay of 2ns between the data and the clock signal. There are at least three ways this can happen. One possibility is by having the PHY generate this delay. This is a common source for problems (for example with slow TX speeds or packet loss when sending data). The TX delay configuration of the RTL8211F PHY can be set either by pin-strappping the RXD1 pin (HIGH means enabled, LOW means disabled) or through configuring a paged register. The setting from the RXD1 pin is also reflected in the register. Add debug logging to the TX delay configuration on RTL8211F so it's easier to spot these issues (for example if the TX delay is enabled for both, the RTL8211F PHY and the MAC). This is especially helpful because there is no public datasheet for the RTL8211F PHY available with all the RX/TX delay specifics. Signed-off-by: Martin Blumenstingl Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 1f4f16fa19f47b71b8cada182e5f64249018affa Merge: c1e469902640 7c4a7ec8558d Author: David S. Miller Date: Thu Dec 26 13:13:22 2019 -0800 Merge branch 'mlxsw-spectrum_router-Cleanups' Ido Schimmel says: ==================== mlxsw: spectrum_router: Cleanups This patch set removes from mlxsw code that is no longer necessary after the simplification of the IPv4 and IPv6 route offload API. The patches eliminate unnecessary code by taking advantage of the fact that mlxsw no longer needs to maintain a list of identical routes, following recent changes in route offload API. ==================== Signed-off-by: David S. Miller commit 7c4a7ec8558dfc770c27931b43f01aede613faac Author: Ido Schimmel Date: Thu Dec 26 18:41:17 2019 +0200 mlxsw: spectrum_router: Remove FIB entry list from FIB node As explained in previous patches, the driver no longer needs to maintain a list of identical FIB entries (i.e, same {tb_id, prefix, prefix length}) and therefore each FIB node can only store one FIB entry. Remove the FIB entry list and simplify the code. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit b04720aee9a61b0b2f03a81d575fdcfb84c43c34 Author: Ido Schimmel Date: Thu Dec 26 18:41:16 2019 +0200 mlxsw: spectrum_router: Consolidate identical functions After the last patch mlxsw_sp_fib{4,6}_node_entry_link() and mlxsw_sp_fib{4,6}_node_entry_unlink() are identical and can therefore be consolidated into the same common function. Perform the consolidation. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 0705297e511a334e99edf7da0d9a79f4d6b1c028 Author: Ido Schimmel Date: Thu Dec 26 18:41:15 2019 +0200 mlxsw: spectrum_router: Make route creation and destruction symmetric Host routes that perform decapsulation of IP in IP tunnels have a special adjacency entry linked to them. This entry stores information such as the expected underlay source IP. When the route is deleted this entry needs to be freed. The allocation of the adjacency entry happens in mlxsw_sp_fib4_entry_type_set(), but it is freed in mlxsw_sp_fib4_node_entry_unlink(). Create a new function - mlxsw_sp_fib4_entry_type_unset() - and free the adjacency entry there. This will allow us to consolidate mlxsw_sp_fib{4,6}_node_entry_unlink() in the next patch. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 0d2fb5aa93a634316aa5b061170e9732a84d1217 Author: Ido Schimmel Date: Thu Dec 26 18:41:14 2019 +0200 mlxsw: spectrum_router: Eliminate dead code Since the driver no longer maintains a list of identical routes there is no route to promote when a route is deleted. Remove that code that took care of it. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 231c8d2bbc4feac4c5db6afbda2484f24661736b Author: Ido Schimmel Date: Thu Dec 26 18:41:13 2019 +0200 mlxsw: spectrum_router: Remove unnecessary checks Now that the networking stack takes care of only notifying the routes of interest, we do not need to maintain a list of identical routes. Remove the check that tests if the route is the first route in the FIB node. Signed-off-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit c1e469902640ed0a82d0b8df5951199c17a49e3c Author: Andy Roulin Date: Thu Dec 26 05:41:57 2019 -0800 bonding: rename AD_STATE_* to LACP_STATE_* As the LACP actor/partner state is now part of the uapi, rename the 3ad state defines with LACP prefix. The LACP prefix is preferred over BOND_3AD as the LACP standard moved to 802.1AX. Fixes: 826f66b30c2e3 ("bonding: move 802.3ad port state flags to uapi") Signed-off-by: Andy Roulin Signed-off-by: David S. Miller commit f643ee295c1c63bc117fb052d4da681354d6f732 Author: Kevin Kou Date: Thu Dec 26 12:29:17 2019 +0000 sctp: move trace_sctp_probe_path into sctp_outq_sack The original patch bringed in the "SCTP ACK tracking trace event" feature was committed at Dec.20, 2017, it replaced jprobe usage with trace events, and bringed in two trace events, one is TRACE_EVENT(sctp_probe), another one is TRACE_EVENT(sctp_probe_path). The original patch intended to trigger the trace_sctp_probe_path in TRACE_EVENT(sctp_probe) as below code, +TRACE_EVENT(sctp_probe, + + TP_PROTO(const struct sctp_endpoint *ep, + const struct sctp_association *asoc, + struct sctp_chunk *chunk), + + TP_ARGS(ep, asoc, chunk), + + TP_STRUCT__entry( + __field(__u64, asoc) + __field(__u32, mark) + __field(__u16, bind_port) + __field(__u16, peer_port) + __field(__u32, pathmtu) + __field(__u32, rwnd) + __field(__u16, unack_data) + ), + + TP_fast_assign( + struct sk_buff *skb = chunk->skb; + + __entry->asoc = (unsigned long)asoc; + __entry->mark = skb->mark; + __entry->bind_port = ep->base.bind_addr.port; + __entry->peer_port = asoc->peer.port; + __entry->pathmtu = asoc->pathmtu; + __entry->rwnd = asoc->peer.rwnd; + __entry->unack_data = asoc->unack_data; + + if (trace_sctp_probe_path_enabled()) { + struct sctp_transport *sp; + + list_for_each_entry(sp, &asoc->peer.transport_addr_list, + transports) { + trace_sctp_probe_path(sp, asoc); + } + } + ), But I found it did not work when I did testing, and trace_sctp_probe_path had no output, I finally found that there is trace buffer lock operation(trace_event_buffer_reserve) in include/trace/trace_events.h: static notrace void \ trace_event_raw_event_##call(void *__data, proto) \ { \ struct trace_event_file *trace_file = __data; \ struct trace_event_data_offsets_##call __maybe_unused __data_offsets;\ struct trace_event_buffer fbuffer; \ struct trace_event_raw_##call *entry; \ int __data_size; \ \ if (trace_trigger_soft_disabled(trace_file)) \ return; \ \ __data_size = trace_event_get_offsets_##call(&__data_offsets, args); \ \ entry = trace_event_buffer_reserve(&fbuffer, trace_file, \ sizeof(*entry) + __data_size); \ \ if (!entry) \ return; \ \ tstruct \ \ { assign; } \ \ trace_event_buffer_commit(&fbuffer); \ } The reason caused no output of trace_sctp_probe_path is that trace_sctp_probe_path written in TP_fast_assign part of TRACE_EVENT(sctp_probe), and it will be placed( { assign; } ) after the trace_event_buffer_reserve() when compiler expands Macro, entry = trace_event_buffer_reserve(&fbuffer, trace_file, \ sizeof(*entry) + __data_size); \ \ if (!entry) \ return; \ \ tstruct \ \ { assign; } \ so trace_sctp_probe_path finally can not acquire trace_event_buffer and return no output, that is to say the nest of tracepoint entry function is not allowed. The function call flow is: trace_sctp_probe() -> trace_event_raw_event_sctp_probe() -> lock buffer -> trace_sctp_probe_path() -> trace_event_raw_event_sctp_probe_path() --nested -> buffer has been locked and return no output. This patch is to remove trace_sctp_probe_path from the TP_fast_assign part of TRACE_EVENT(sctp_probe) to avoid the nest of entry function, and trigger sctp_probe_path_trace in sctp_outq_sack. After this patch, you can enable both events individually, # cd /sys/kernel/debug/tracing # echo 1 > events/sctp/sctp_probe/enable # echo 1 > events/sctp/sctp_probe_path/enable Or, you can enable all the events under sctp. # echo 1 > events/sctp/enable Signed-off-by: Kevin Kou Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit b761a7b47ba129df3df042ee0a66b88acb086303 Author: Chris Wilson Date: Thu Dec 26 19:12:37 2019 +0000 drm/i915/gt: Ignore incomplete engines after init failure Do not expose incomplete engines to the user after we fail to setup the GT. Fixes: e6ba76480299 ("drm/i915: Remove i915->kernel_context") Signed-off-by: Chris Wilson Cc: Andi Shyti Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191226191237.2654510-1-chris@chris-wilson.co.uk commit 8cd115bdda17751ee2adab614a80df72228b3809 Author: Jan Kara Date: Wed Dec 18 18:44:33 2019 +0100 ext4: Optimize ext4 DIO overwrites Currently we start transaction for mapping every extent for writing using direct IO. This is unnecessary when we know we are overwriting already allocated blocks and the overhead of starting a transaction can be significant especially for multithreaded workloads doing small writes. Use iomap operations that avoid starting a transaction for direct IO overwrites. This improves throughput of 4k random writes - fio jobfile: [global] rw=randrw norandommap=1 invalidate=0 bs=4k numjobs=16 time_based=1 ramp_time=30 runtime=120 group_reporting=1 ioengine=psync direct=1 size=16G filename=file1.0.0:file1.0.1:file1.0.2:file1.0.3:file1.0.4:file1.0.5:file1.0.6:file1.0.7:file1.0.8:file1.0.9:file1.0.10:file1.0.11:file1.0.12:file1.0.13:file1.0.14:file1.0.15:file1.0.16:file1.0.17:file1.0.18:file1.0.19:file1.0.20:file1.0.21:file1.0.22:file1.0.23:file1.0.24:file1.0.25:file1.0.26:file1.0.27:file1.0.28:file1.0.29:file1.0.30:file1.0.31 file_service_type=random nrfiles=32 from 3018MB/s to 4059MB/s in my test VM running test against simulated pmem device (note that before iomap conversion, this workload was able to achieve 3708MB/s because old direct IO path avoided transaction start for overwrites as well). For dax, the win is even larger improving throughput from 3042MB/s to 4311MB/s. Reported-by: Dan Williams Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20191218174433.19380-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit c14ceb0ec727187f71a487a592ffa91767fed66e Author: Florian Westphal Date: Wed Dec 18 12:05:21 2019 +0100 netfilter: nft_meta: add support for slave device ifindex matching Allow to match on vrf slave ifindex or name. In case there was no slave interface involved, store 0 in the destination register just like existing iif/oif matching. sdif(name) is restricted to the ipv4/ipv6 input and forward hooks, as it depends on ip(6) stack parsing/storing info in skb->cb[]. Cc: Martin Willi Cc: David Ahern Cc: Shrijeet Mukherjee Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 01a0fc82252d82eda50d4e1252b826a3ef7afb3d Author: Florian Westphal Date: Wed Dec 18 12:05:20 2019 +0100 netfilter: nft_meta: place rtclassid handling in a helper skb_dst is an inline helper with a WARN_ON(), so this is a bit more code than it looks like. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 6b2faee0ca91b63bd5a3b2087d4f25c76b983961 Author: Florian Westphal Date: Wed Dec 18 12:05:19 2019 +0100 netfilter: nft_meta: place prandom handling in a helper Move this out of the main eval loop, the numgen expression provides a better alternative to meta random. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 8724e819cc9a8fab4c18e791cb0bd602fb294971 Author: Florian Westphal Date: Wed Dec 18 12:05:18 2019 +0100 netfilter: nft_meta: move all interface related keys to helper Reduces repetiveness and reduces size of meta eval function. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit a4150a1faa3604beef25ed2374d537f86059ad52 Author: Florian Westphal Date: Wed Dec 18 12:05:17 2019 +0100 netfilter: nft_meta: move interface kind handling to helper checkpatch complains about == NULL checks in original code, so use !in instead. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit b1327fbc29915ef5bf0eec5abc2e2e67983cb037 Author: Florian Westphal Date: Wed Dec 18 12:05:16 2019 +0100 netfilter: nft_meta: move cgroup handling to helper Reduce size of main eval function. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 726b44f044e8e67cbe2209c1a5704aca981be3b2 Author: Florian Westphal Date: Wed Dec 18 12:05:15 2019 +0100 netfilter: nft_meta: move sk uid/git handling to helper Not a hot path. Also, both have copy&paste case statements, so use a common helper for both. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 4a54594abdbee230a0471aa137b3d5405c897661 Author: Florian Westphal Date: Wed Dec 18 12:05:14 2019 +0100 netfilter: nft_meta: move pkttype handling to helper When pkttype is loopback, nft_meta performs guesswork to detect broad/multicast packets. Place this in a helper, this is hardly a hot path. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit db8f6f5c8de6dae924a68858ad6a4217f735be13 Author: Florian Westphal Date: Wed Dec 18 12:05:13 2019 +0100 netfilter: nft_meta: move time handling to helper reduce size of the (large) meta evaluation function. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 4549b49f82ab40c214778f316b6898aa4132723a Author: Theodore Ts'o Date: Mon Dec 23 18:44:49 2019 -0500 ext4: export information about first/last errors via /sys/fs/ext4/ Make {first,last}_error_{ino,block,line,func,errcode} available via sysfs. Also add a missing newline for {first,last}_error_time. Signed-off-by: Theodore Ts'o commit 46f870d690fecc792a66730dcbbf0aa109f5f9ab Author: Theodore Ts'o Date: Thu Nov 21 13:09:43 2019 -0500 ext4: simulate various I/O and checksum errors when reading metadata This allows us to test various error handling code paths Link: https://lore.kernel.org/r/20191209012317.59398-1-tytso@mit.edu Signed-off-by: Theodore Ts'o commit 878520ac45f9f698432d4276db3d9144b83931b6 Author: Theodore Ts'o Date: Tue Nov 19 21:54:15 2019 -0500 ext4: save the error code which triggered an ext4_error() in the superblock This allows the cause of an ext4_error() report to be categorized based on whether it was triggered due to an I/O error, or an memory allocation error, or other possible causes. Most errors are caused by a detected file system inconsistency, so the default code stored in the superblock will be EXT4_ERR_EFSCORRUPTED. Link: https://lore.kernel.org/r/20191204032335.7683-1-tytso@mit.edu Signed-off-by: Theodore Ts'o commit a103a3989993859091a26936b9337a8e09330fc3 Author: Takashi Iwai Date: Thu Dec 26 11:03:53 2019 +0100 ALSA: control: Fix incompatible protocol error The recent change to bump the ALSA control API protocol version from 2.0.7 to 2.1.0 caused a regression on user-space; while the user-space expects both the major and the minor versions to be identical with the supported numbers, we changed the minor number from 0 to 1. For recovering from the incompatibility, this patch changes the protocol version again to 2.0.8, which is compatible, but yet higher than the original number 2.0.7, indicating that the protocol change. Fixes: bd3eb4e87eb3 ("ALSA: ctl: bump protocol version up to v2.1.0") Reported-by: Paul Menzel Tested-by: Paul Menzel Link: https://lore.kernel.org/r/s5h1rsr769i.wl-tiwai@suse.de Signed-off-by: Takashi Iwai commit a562c687d115fe5a90be1e27745cc771c1e6cbd9 Merge: cf2834a5ed57 bc6385dab125 Author: Theodore Ts'o Date: Thu Dec 26 09:57:24 2019 -0500 Merge branch 'rk/inode_lock' into dev These are ilock patches which helps improve the current inode lock scalabiliy problem in ext4 DIO mixed read/write workload case. The problem was first reported by Joseph [1]. This should help improve mixed read/write workload cases for databases which use directIO. These patches are based upon upstream discussion with Jan Kara & Joseph [2]. The problem really is that in case of DIO overwrites, we start with a exclusive lock and then downgrade it later to shared lock. This causes a scalability problem in case of mixed DIO read/write workload case. i.e. if we have any ongoing DIO reads and then comes a DIO writes, (since writes starts with excl. inode lock) then it has to wait until the shared lock is released (which only happens when DIO read is completed). Same is true for vice versa as well. The same can be easily observed with perf-tools trace analysis [3]. For more details, including performance numbers, please see [4]. [1] https://lore.kernel.org/linux-ext4/1566871552-60946-4-git-send-email-joseph.qi@linux.alibaba.com/ [2] https://lore.kernel.org/linux-ext4/20190910215720.GA7561@quack2.suse.cz/ [3] https://raw.githubusercontent.com/riteshharjani/LinuxStudy/master/ext4/perf.report [4] https://lore.kernel.org/r/20191212055557.11151-1-riteshh@linux.ibm.com commit d03b224f425295ba17e5a6f29713da310e9a0d72 Author: Chris Wilson Date: Thu Dec 26 11:18:34 2019 +0000 drm/i915/gt: Apply sanitiization just before resume Bring sanitization completely underneath the umbrella of intel_gt, and perform it exclusively after suspend and before the next resume. Signed-off-by: Chris Wilson Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191226111834.2545953-1-chris@chris-wilson.co.uk commit 1b27080ab24506263d9b789e2f5e998cf618b92c Author: Chen-Yu Tsai Date: Tue Dec 24 14:15:55 2019 +0800 ARM: dts: sunxi: Add Libre Computer ALL-H3-IT H5 board The Libre Computer ALL-H3-IT board is a small single board computer that is roughly the same size as the Raspberry Pi Zero, or around 20% smaller than a credit card. The board features: - H2, H3, or H5 SoC from Allwinner - 2 DDR3 DRAM chips - Realtek RTL8821CU based WiFi module - 128 Mbit SPI-NOR flash - micro-SD card slot - micro HDMI video output - FPC connector for camera sensor module - generic Raspberri-Pi style 40 pin GPIO header - additional pin headers for extra USB host ports, ananlog audio and IR receiver Only H5 variant test samples were made available, but the vendor does have plans to include at least an H3 variant. Thus the device tree is split much like the ALL-H3-CC, with a common dtsi file for the board design, and separate dts files including the common board file and the SoC dtsi file. The other variants will be added as they are made available. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 16c8ff571a16f47592ae161f92737b2fd50a0e70 Author: Jagan Teki Date: Sun Dec 22 18:52:28 2019 +0530 arm64: dts: allwinner: a64: Add MIPI DSI pipeline Add MIPI DSI pipeline for Allwinner A64. - dsi node, with A64 compatible since it doesn't support DSI_SCLK gating unlike A33 - dphy node, with A64 compatible with A33 fallback since DPHY on A64 and A33 is similar - finally, attach the dsi_in to tcon0 for complete MIPI DSI Signed-off-by: Jagan Teki Tested-by: Merlijn Wajer Signed-off-by: Maxime Ripard commit 52028bfcb2330189c5e4ab943b3530b2117b8525 Author: Jagan Teki Date: Sun Dec 22 18:52:27 2019 +0530 drm/sun4i: dsi: Add Allwinner A64 MIPI DSI support The MIPI DSI controller in Allwinner A64 is similar to A33. But unlike A33, A64 doesn't have DSI_SCLK gating so add compatible for Allwinner A64 with uninitialized has_mod_clk driver. Signed-off-by: Jagan Teki Tested-by: Merlijn Wajer Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20191222132229.30276-6-jagan@amarulasolutions.com commit 66dbdc7c61627a3d3b50017a1d202dc637a10f53 Author: Jagan Teki Date: Sun Dec 22 18:52:26 2019 +0530 drm/sun4i: dsi: Handle bus clock via regmap_mmio_attach_clk regmap has special API to enable the controller bus clock while initializing register space, and current driver is using devm_regmap_init_mmio_clk which require to specify bus clk_id argument as "bus" But, the usage of clocks are varies between different Allwinner DSI controllers. Clocking in A33 would need bus and mod clocks where as A64 would need only bus clock. Since A64 support only single bus clock, it is optional to specify the clock-names on the controller device tree node. So using NULL on clk_id would get the attached clock. To support clk_id as "bus" and "NULL" during clock enablement between controllers, this patch add generic code to handle the bus clock using regmap_mmio_attach_clk with associated regmap APIs. Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20191222132229.30276-5-jagan@amarulasolutions.com commit 1162f844030ac1ac7321b5e8f6c9badc7a11428f Author: Hechao Li Date: Mon Dec 23 17:17:42 2019 -0800 bpf: Print error message for bpftool cgroup show Currently, when bpftool cgroup show has an error, no error message is printed. This is confusing because the user may think the result is empty. Before the change: $ bpftool cgroup show /sys/fs/cgroup ID AttachType AttachFlags Name $ echo $? 255 After the change: $ ./bpftool cgroup show /sys/fs/cgroup Error: can't query bpf programs attached to /sys/fs/cgroup: Operation not permitted v2: Rename check_query_cgroup_progs to cgroup_has_attached_progs Signed-off-by: Hechao Li Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191224011742.3714301-1-hechaol@fb.com commit 26a839b3c286060ff3a6d7b14194ae845ec5aa96 Author: Jagan Teki Date: Sun Dec 22 18:52:25 2019 +0530 drm/sun4i: dsi: Get the mod clock for A31 As per the user manual, look like mod clock is not mandatory for all Allwinner MIPI DSI controllers, it is connected to CLK_DSI_SCLK for A31 and not available in A64. So, add compatible check for A31 and get mod clock accordingly. Tested-by: Merlijn Wajer Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20191222132229.30276-4-jagan@amarulasolutions.com commit db08ca5a64d208645301600e79f34e441e5da986 Author: Jagan Teki Date: Sun Dec 22 18:52:24 2019 +0530 dt-bindings: sun6i-dsi: Add A64 DPHY compatible (w/ A31 fallback) The MIPI DSI PHY controller on Allwinner A64 is similar on the one on A31. Add A64 compatible and append A31 compatible as fallback. Reviewed-by: Rob Herring Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20191222132229.30276-3-jagan@amarulasolutions.com commit fe5040f2843a638d847282520e5eeaa61a4769e2 Author: Jagan Teki Date: Sun Dec 22 18:52:23 2019 +0530 dt-bindings: sun6i-dsi: Document A64 MIPI-DSI controller The MIPI DSI controller in Allwinner A64 is similar to A33. But unlike A33, A64 doesn't have DSI_SCLK gating so it is valid to have separate compatible for A64 on the same driver. DSI_SCLK uses mod clock-names on dt-bindings, so the same is not required for A64. On that note - A64 require minimum of 1 clock like the bus clock - A33 require minimum of 2 clocks like both bus, mod clocks So, update dt-bindings so-that it can document both A33, A64 bindings requirements. Reviewed-by: Rob Herring Signed-off-by: Jagan Teki Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20191222132229.30276-2-jagan@amarulasolutions.com commit 8ab9da573dad95536d8a92f19d7967e8142cd827 Author: Andrii Nakryiko Date: Mon Dec 23 10:03:05 2019 -0800 libbpf: Support CO-RE relocations for LDX/ST/STX instructions Clang patch [0] enables emitting relocatable generic ALU/ALU64 instructions (i.e, shifts and arithmetic operations), as well as generic load/store instructions. The former ones are already supported by libbpf as is. This patch adds further support for load/store instructions. Relocatable field offset is encoded in BPF instruction's 16-bit offset section and are adjusted by libbpf based on target kernel BTF. These Clang changes and corresponding libbpf changes allow for more succinct generated BPF code by encoding relocatable field reads as a single ST/LDX/STX instruction. It also enables relocatable access to BPF context. Previously, if context struct (e.g., __sk_buff) was accessed with CO-RE relocations (e.g., due to preserve_access_index attribute), it would be rejected by BPF verifier due to modified context pointer dereference. With Clang patch, such context accesses are both relocatable and have a fixed offset from the point of view of BPF verifier. [0] https://reviews.llvm.org/D71790 Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20191223180305.86417-1-andriin@fb.com commit 59f5e9b9a802a177727017218dcf026dc390c37d Author: Vasily Khoruzhick Date: Thu Dec 19 09:28:23 2019 -0800 arm64: dts: allwinner: a64: Add thermal sensors and thermal zones A64 has 3 thermal sensors: 1 for CPU, 2 for GPU. Signed-off-by: Vasily Khoruzhick Signed-off-by: Maxime Ripard commit 9ad42557109a9db9ca16964352c3c045a775b018 Author: Ondrej Jirman Date: Thu Dec 19 09:28:21 2019 -0800 arm64: dts: allwinner: h5: Add thermal sensor and thermal zones There are two sensors, one for CPU, one for GPU. Signed-off-by: Ondrej Jirman Signed-off-by: Vasily Khoruzhick Signed-off-by: Maxime Ripard commit b37da9c8e62ef8ea14c19d40837dcd5beb8470e6 Author: Ondrej Jirman Date: Thu Dec 19 09:28:20 2019 -0800 ARM: dts: sun8i-h3: Add thermal sensor and thermal zones There is just one sensor for the CPU. Signed-off-by: Ondrej Jirman Signed-off-by: Vasily Khoruzhick Signed-off-by: Maxime Ripard commit 1b084d2e4eaee9523c81824821b635fc90c0c6d8 Author: Ondrej Jirman Date: Thu Dec 19 09:28:19 2019 -0800 ARM: dts: sun8i-a83t: Add thermal sensor and thermal zones There are three sensors, two for each CPU cluster, one for GPU. Signed-off-by: Ondrej Jirman Signed-off-by: Vasily Khoruzhick Signed-off-by: Maxime Ripard commit 624b4b48d9d870c2858c016d8709715495409654 Author: Ondrej Jirman Date: Tue Oct 29 12:28:46 2019 +0100 drm: sun4i: Add support for suspending the display driver Shut down the display engine during suspend. Signed-off-by: Ondrej Jirman Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20191029112846.3604925-1-megous@megous.com commit 02939cd167095f16328a1bd5cab5a90b550606df Author: Sascha Hauer Date: Mon Dec 16 11:53:28 2019 +0100 dmaengine: imx-sdma: Fix memory leak The current descriptor is not on any list of the virtual DMA channel. Once sdma_terminate_all() is called when a descriptor is currently in flight then this one is forgotten to be freed. We have to call vchan_terminate_vdesc() on this descriptor to re-add it to the lists. Now that we also free the currently running descriptor we can (and actually have to) remove the current descriptor from its list also for the cyclic case. Signed-off-by: Sascha Hauer Reviewed-by: Robin Gong Tested-by: Robin Gong Link: https://lore.kernel.org/r/20191216105328.15198-10-s.hauer@pengutronix.de Signed-off-by: Vinod Koul commit a1ff6a07f5a3951fcac84f064a76d1ad79c10e40 Author: Sascha Hauer Date: Mon Dec 16 11:53:27 2019 +0100 dmaengine: imx-sdma: find desc first in sdma_tx_status In sdma_tx_status() we must first find the current sdma_desc. In cyclic mode we assume that this can always be found with vchan_find_desc(). This is true because do not remove the current descriptor from the desc_issued list: /* * Do not delete the node in desc_issued list in cyclic mode, otherwise * the desc allocated will never be freed in vchan_dma_desc_free_list */ if (!(sdmac->flags & IMX_DMA_SG_LOOP)) list_del(&vd->node); We will change this in the next step, so check if the current descriptor is the desired one also for the cyclic case. Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20191216105328.15198-9-s.hauer@pengutronix.de Signed-off-by: Vinod Koul commit a80f2787f1ff0fd068fdcb8fd949a992029b6f25 Author: Sascha Hauer Date: Mon Dec 16 11:53:26 2019 +0100 dmaengine: imx-sdma: rename function Rename sdma_disable_channel_async() after the hook it implements, like done for all other functions in the SDMA driver. Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20191216105328.15198-8-s.hauer@pengutronix.de Signed-off-by: Vinod Koul commit b167f94d2928f3516176c8107cb698a6d9bb9911 Author: Sascha Hauer Date: Mon Dec 16 11:53:25 2019 +0100 dmaengine: virt-dma: use vchan_vdesc_fini() to free descriptors vchan_dma_desc_free_list() basically open codes vchan_vdesc_fini() in its loop body. Call it directly rather than duplicating the code. Signed-off-by: Sascha Hauer Reviewed-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191216105328.15198-7-s.hauer@pengutronix.de Signed-off-by: Vinod Koul commit 9f91e6bfa8666270565fb76d883db2ba2e441585 Author: Sascha Hauer Date: Mon Dec 16 11:53:24 2019 +0100 dmaengine: virt-dma: Add missing locking around list operations All list operations are protected by &vc->lock. As vchan_vdesc_fini() is called unlocked add the missing locking around the list operations. Signed-off-by: Sascha Hauer Reviewed-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191216105328.15198-6-s.hauer@pengutronix.de Signed-off-by: Vinod Koul commit f882101122aa110ef8e64be04472e5a47030300e Author: Sascha Hauer Date: Mon Dec 16 11:53:23 2019 +0100 dmaengine: virt-dma: Do not call desc_free() under a spin_lock vchan_vdesc_fini() shouldn't be called under a spin_lock. This is done in two places, once in vchan_terminate_vdesc() and once in vchan_synchronize(). Instead of freeing the vdesc right away, collect the aborted vdescs on a separate list and free them along with the other vdescs. The terminated descs are also freed in vchan_synchronize as done before this patch. Signed-off-by: Sascha Hauer Reviewed-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191216105328.15198-5-s.hauer@pengutronix.de Signed-off-by: Vinod Koul commit df660a2b6dfcf26001af6cd2441268c29416dd64 Author: Sascha Hauer Date: Mon Dec 16 11:53:22 2019 +0100 dmaengine: virt-dma: remove debug message vchan_dma_desc_free_list() basically open codes vchan_vdesc_fini() in the loop body. One difference is an additional debug message. As this isn't overly useful remove it. Signed-off-by: Sascha Hauer Reviewed-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191216105328.15198-4-s.hauer@pengutronix.de Signed-off-by: Vinod Koul commit 51fe9cd2bd92d95fc200385187d346e293ceefc9 Author: Sascha Hauer Date: Mon Dec 16 11:53:21 2019 +0100 dmaengine: virt-dma: Add missing locking Originally freeing descriptors was split into a locked and an unlocked part. The locked part in vchan_get_all_descriptors() collected all descriptors on a separate list_head. This was done to allow iterating over that new list in vchan_dma_desc_free_list() without a lock held. This became broken in 13bb26ae8850 ("dmaengine: virt-dma: don't always free descriptor upon completion"). With this commit vchan_dma_desc_free_list() no longer exclusively operates on the separate list, but starts to put descriptors which can be reused back on &vc->desc_allocated. This list operation should have been locked, but wasn't. In the mean time drivers started to call vchan_dma_desc_free_list() with their lock held so that we now have the situation that vchan_dma_desc_free_list() is called locked from some drivers and unlocked from others. To clean this up we have to do two things: 1. Add missing locking in vchan_dma_desc_free_list() 2. Make sure drivers call vchan_dma_desc_free_list() unlocked This needs to be done atomically, so in this patch the locking is added and all drivers are fixed. Signed-off-by: Sascha Hauer Reviewed-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Reviewed-by: Green Wan Tested-by: Green Wan Link: https://lore.kernel.org/r/20191216105328.15198-3-s.hauer@pengutronix.de Signed-off-by: Vinod Koul commit 5c8aacbbb3b706a024eefc376b1d542d59de5749 Author: Sascha Hauer Date: Mon Dec 16 11:53:20 2019 +0100 dmaengine: bcm2835: do not call vchan_vdesc_fini() with lock held vchan_vdesc_fini() can't be called locked. Instead, call vchan_terminate_vdesc() which delays the freeing of the descriptor to vchan_synchronize(). Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20191216105328.15198-2-s.hauer@pengutronix.de Signed-off-by: Vinod Koul commit 08baca4280d8abcf139fa8fec5b3de6f346efbae Author: Vinod Koul Date: Tue Dec 24 10:26:14 2019 +0530 dmaengine: print more meaningful error message error log for dma_channel_table_init() failure pointed a mere "initialization failure", which is not very helpful message, so print additional details like function name and error code. Signed-off-by: Vinod Koul commit 83c77940db12112646a2f74d1d21505788812d7f Author: Vinod Koul Date: Tue Dec 24 10:22:15 2019 +0530 dmaengine: move module_/dma_device_put() after route free We call dma_device_put() and module_put() after invoking .device_free_chan_resources callback, but we should also take care of router devices and invoke this after .route_free callback. So move it after .route_free Reviewed-by: Logan Gunthorpe Signed-off-by: Vinod Koul commit aea3dee86c414caa43a87d6cfc2e03e87c1e76c9 Merge: 9f6cff995e98 bad1eaa6ac31 Author: David S. Miller Date: Wed Dec 25 19:51:34 2019 -0800 Merge branch 'Peer-to-Peer-One-Step-time-stamping' Richard Cochran says: ==================== Peer to Peer One-Step time stamping This series adds support for PTP (IEEE 1588) P2P one-step time stamping along with a driver for a hardware device that supports this. If the hardware supports p2p one-step, it subtracts the ingress time stamp value from the Pdelay_Request correction field. The user space software stack then simply copies the correction field into the Pdelay_Response, and on transmission the hardware adds the egress time stamp into the correction field. This new functionality extends CONFIG_NETWORK_PHY_TIMESTAMPING to cover MII snooping devices, but it still depends on phylib, just as that option does. Expanding beyond phylib is not within the scope of the this series. User space support is available in the current linuxptp master branch. - Patch 1 adds phy_device methods for existing time stamping fields. - Patches 2-5 convert the stack and drivers to the new methods. - Patch 6 moves code around the dp83640 driver. - Patches 7-10 add support for MII time stamping in non-PHY devices. - Patch 11 adds the new P2P 1-step option. - Patch 12 adds a driver implementing the new option. Thanks, Richard Changed in v9: ~~~~~~~~~~~~~~ - Fix two more drivers' switch/case blocks WRT the new HWTSTAMP ioctl. - Picked up two more review tags from Andrew. Changed in v8: ~~~~~~~~~~~~~~ - Avoided adding forward functional declarations in the dp83640 driver. - Picked up Florian's new review tags and another one from Andrew. Changed in v7: ~~~~~~~~~~~~~~ - Converted pr_debug|err to dev_ variants in new driver. - Fixed device tree documentation per Rob's v6 review. - Picked up Andrew's and Rob's review tags. - Silenced sparse warnings in new driver. Changed in v6: ~~~~~~~~~~~~~~ - Added methods for accessing the phy_device time stamping fields. - Adjust the device tree documentation per Rob's v5 review. - Fixed the build failures due to missing exports. Changed in v5: ~~~~~~~~~~~~~~ - Fixed build failure in macvlan. - Fixed latent bug with its gcc warning in the driver. Changed in v4: ~~~~~~~~~~~~~~ - Correct error paths and PTR_ERR return values in the framework. - Expanded KernelDoc comments WRT PHY locking. - Pick up Andrew's review tag. Changed in v3: ~~~~~~~~~~~~~~ - Simplify the device tree binding and document the time stamping phandle by itself. Changed in v2: ~~~~~~~~~~~~~~ - Per the v1 review, changed the modeling of MII time stamping devices. They are no longer a kind of mdio device. ==================== Signed-off-by: David S. Miller commit bad1eaa6ac312ffd7aa46dd5a4d9843b824aa023 Author: Richard Cochran Date: Wed Dec 25 18:16:20 2019 -0800 ptp: Add a driver for InES time stamping IP core. The InES at the ZHAW offers a PTP time stamping IP core. The FPGA logic recognizes and time stamps PTP frames on the MII bus. This patch adds a driver for the core along with a device tree binding to allow hooking the driver to MII buses. Signed-off-by: Richard Cochran Signed-off-by: David S. Miller commit b6fd7b96366769651ab23988607ce9c5c9042cdb Author: Richard Cochran Date: Wed Dec 25 18:16:19 2019 -0800 net: Introduce peer to peer one step PTP time stamping. The 1588 standard defines one step operation for both Sync and PDelay_Resp messages. Up until now, hardware with P2P one step has been rare, and kernel support was lacking. This patch adds support of the mode in anticipation of new hardware developments. Signed-off-by: Richard Cochran Signed-off-by: David S. Miller commit 1dca22b1842136f57e9bd60fefd1715c22ff1874 Author: Richard Cochran Date: Wed Dec 25 18:16:18 2019 -0800 net: mdio: of: Register discovered MII time stampers. When parsing a PHY node, register its time stamper, if any, and attach the instance to the PHY device. Signed-off-by: Richard Cochran Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Signed-off-by: David S. Miller commit 25d12e1dde28fafd2ac37afadd24252fa19b80cd Author: Richard Cochran Date: Wed Dec 25 18:16:17 2019 -0800 dt-bindings: ptp: Introduce MII time stamping devices. This patch add a new binding that allows non-PHY MII time stamping devices to find their buses. The new documentation covers both the generic binding and one upcoming user. Signed-off-by: Richard Cochran Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 767ff483731502a0fc34f34a3a0851aca175eb71 Author: Richard Cochran Date: Wed Dec 25 18:16:16 2019 -0800 net: Add a layer for non-PHY MII time stamping drivers. While PHY time stamping drivers can simply attach their interface directly to the PHY instance, stand alone drivers require support in order to manage their services. Non-PHY MII time stamping drivers have a control interface over another bus like I2C, SPI, UART, or via a memory mapped peripheral. The controller device will be associated with one or more time stamping channels, each of which sits snoops in on a MII bus. This patch provides a glue layer that will enable time stamping channels to find their controlling device. Signed-off-by: Richard Cochran Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 4715f65ffa0520af0680dbfbedbe349f175adaf4 Author: Richard Cochran Date: Wed Dec 25 18:16:15 2019 -0800 net: Introduce a new MII time stamping interface. Currently the stack supports time stamping in PHY devices. However, there are newer, non-PHY devices that can snoop an MII bus and provide time stamps. In order to support such devices, this patch introduces a new interface to be used by both PHY and non-PHY devices. In addition, the one and only user of the old PHY time stamping API is converted to the new interface. Signed-off-by: Richard Cochran Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 12d0efb9e6d90e6ff5c94e46d1ea273a41e36454 Author: Richard Cochran Date: Wed Dec 25 18:16:14 2019 -0800 net: phy: dp83640: Move the probe and remove methods around. An upcoming patch will change how the PHY time stamping functions are registered with the networking stack, and adapting this driver would entail adding forward declarations for four time stamping methods. However, forward declarations are considered to be stylistic defects. This patch avoids the issue by moving the probe and remove methods immediately above the phy_driver interface structure. Signed-off-by: Richard Cochran Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit bfd57b5900212acd5a14b9bea9ef49a5606d31a6 Author: Richard Cochran Date: Wed Dec 25 18:16:13 2019 -0800 net: netcp_ethss: Use the PHY time stamping interface. The netcp_ethss driver tests fields of the phy_device in order to determine whether to defer to the PHY's time stamping functionality. This patch replaces the open coded logic with an invocation of the proper methods. Signed-off-by: Richard Cochran Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 7774ee23689d3c56ecb5eff6cd1bf6060bdd3d8e Author: Richard Cochran Date: Wed Dec 25 18:16:12 2019 -0800 net: ethtool: Use the PHY time stamping interface. The ethtool layer tests fields of the phy_device in order to determine whether to invoke the PHY's tsinfo ethtool callback. This patch replaces the open coded logic with an invocation of the proper methods. Signed-off-by: Richard Cochran Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit dfe6d68fc4049c799b2194d88523679a694ead75 Author: Richard Cochran Date: Wed Dec 25 18:16:11 2019 -0800 net: vlan: Use the PHY time stamping interface. The vlan layer tests fields of the phy_device in order to determine whether to invoke the PHY's tsinfo ethtool callback. This patch replaces the open coded logic with an invocation of the proper methods. Signed-off-by: Richard Cochran Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit d25de984aaee5265ff0c2c4eb49e474096d29827 Author: Richard Cochran Date: Wed Dec 25 18:16:10 2019 -0800 net: macvlan: Use the PHY time stamping interface. The macvlan layer tests fields of the phy_device in order to determine whether to invoke the PHY's tsinfo ethtool callback. This patch replaces the open coded logic with an invocation of the proper methods. Signed-off-by: Richard Cochran Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 0e5dafc8a6e540c0145b61545c557c43be70af10 Author: Richard Cochran Date: Wed Dec 25 18:16:09 2019 -0800 net: phy: Introduce helper functions for time stamping support. Some parts of the networking stack and at least one driver test fields within the 'struct phy_device' in order to query time stamping capabilities and to invoke time stamping methods. This patch adds a functional interface around the time stamping fields. This will allow insulating the callers from future changes to the details of the time stamping implemenation. Signed-off-by: Richard Cochran Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit c345ec6a50e9f5d2800da2179adc8f6ea1dfe042 Author: Florian Fainelli Date: Tue Dec 10 10:53:51 2019 -0800 ata: ahci_brcm: Support BCM7216 reset controller name BCM7216 uses a different reset controller name which is "rescal" instead of "ahci", match the compatible string to account for that minor difference, the reset is otherwise identical to how other generations of SATA controllers work. Reviewed-by: Hans de Goede Signed-off-by: Florian Fainelli Signed-off-by: Jens Axboe commit 52fa562db5ecd2c4ae91a1106844877b02af7031 Author: Florian Fainelli Date: Tue Dec 10 10:53:50 2019 -0800 dt-bindings: ata: Document BCM7216 AHCI controller compatible The BCM7216 AHCI controller makes use of a specific reset controller line/name, document the compatible string and the optional reset properties. Reviewed-by: Rob Herring Reviewed-by: Hans de Goede Signed-off-by: Florian Fainelli Signed-off-by: Jens Axboe commit 7de9b1688c1d4a4c9267e65338ae8d6d0d025625 Author: Florian Fainelli Date: Tue Dec 10 10:53:49 2019 -0800 ata: ahci_brcm: Add a shutdown callback Make sure that we quiesce the controller and shut down the clocks in a shutdown callback. Reviewed-by: Hans de Goede Signed-off-by: Florian Fainelli Signed-off-by: Jens Axboe commit 3c696ac4173678b62e74e26644d9f3d662973bfa Author: Florian Fainelli Date: Tue Dec 10 10:53:48 2019 -0800 ata: ahci_brcm: Manage reset line during suspend/resume We were not managing the reset line during suspend/resume, but this needs to be done to ensure that the controller can exit low power modes correctly, especially with deep sleep suspend mode that may reset parts of the logic. Reviewed-by: Hans de Goede Signed-off-by: Florian Fainelli Signed-off-by: Jens Axboe commit c2d78a9b73d4b66d38e51245ea0e06c446cf2c46 Author: Chris Wilson Date: Wed Dec 25 23:07:03 2019 +0000 drm/i915/gt: Stop poking at engine->serial at a high level In record defaults, if we emit a request we expect a context switck on parking. We need take no further action, so don't even mess with the low level engine->serial where it is not warranted. Signed-off-by: Chris Wilson Cc: Andi Shyti Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191225230703.2498794-1-chris@chris-wilson.co.uk commit 224bf0fe729237c4da241e5966abfc1bfb4353a3 Author: Stephan Gerhold Date: Thu Dec 19 21:20:51 2019 +0100 ARM: dts: ux500: samsung-golden: Add Bluetooth samsung-golden uses a BCM4334 WiFi+BT combo chip. The BT part is connected via UART and supported by the hci_bcm driver in mainline. Add the necessary device tree changes to make it load correctly. It requires (seemingly) device-specific firmware that can be extracted from the stock Android system used on samsung-golden: - /system/bin/bcm4334.hcd -> /lib/firmware/brcm/BCM4334B0.hcd On my device, scanning for other Bluetooth devices works just fine, but for some reason it keeps disconnecting immediately when attempting to connect to an other device. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191219202052.19039-9-stephan@gerhold.net Signed-off-by: Linus Walleij commit fbb7c4a13c96c1e76d92b007a6852cecb27f7b0f Author: Stephan Gerhold Date: Thu Dec 19 21:20:50 2019 +0100 ARM: dts: ux500: samsung-golden: Add WiFi samsung-golden uses a BCM4334 WiFi+BT combo chip, connected to SDIO. It is supported by the brcmfmac driver in mainline, so we only need to set up the device tree to make it work correctly. Note: brcmfmac requires (proprietary) firmware + a device-specific NVRAM file. Both can be extracted from the stock Android system used on samsung-golden: - /system/etc/wifi/bcmdhd_sta.bin_b2 -> /lib/firmware/brcm/brcmfmac4334-sdio.bin - /system/etc/wifi/nvram_net.txt_GPIO4 -> /lib/firmware/brcm/brcmfmac4334-sdio.samsung,golden.txt brcmfmac4334-sdio.bin from linux-firmware also seems to work, but results in occasional errors for some reason. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191219202052.19039-8-stephan@gerhold.net Signed-off-by: Linus Walleij commit 234a0387f73cd109e03aee8c2d6f26a54b69d403 Author: Stephan Gerhold Date: Thu Dec 19 21:20:49 2019 +0100 ARM: dts: ux500: samsung-golden: Add touch screen samsung-golden has an Atmel mXT224S touch controller connected to I2C. It is supported by the existing driver for atmel,maxtouch, so all we need to do to make it work is to define the necessary device tree nodes. The atmel_mxt_ts driver does not support controlling regulators yet, so add regulator-always-on for now to turn on the necessary regulators. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191219202052.19039-7-stephan@gerhold.net Signed-off-by: Linus Walleij commit 032c18c566ead5bfda62acf1a5af5ce79e2cd8e0 Author: Stephan Gerhold Date: Thu Dec 19 21:20:48 2019 +0100 ARM: dts: ux500: samsung-golden: Add IMU (accelerometer + gyroscope) samsung-golden has a InvenSense MPU-6051M IMU that provides an accelerometer and gyroscope. It seems to be functionally compatible with MPU-6050 so we can easily enable it by adding the necessary device tree nodes. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191219202052.19039-6-stephan@gerhold.net Signed-off-by: Linus Walleij commit b952efeb7ad4cc81f2da55bde6fdd27716fceb13 Author: Stephan Gerhold Date: Thu Dec 19 21:20:47 2019 +0100 ARM: dts: ux500: Add device tree for Samsung Galaxy S III mini (GT-I8190) The Samsung Galaxy S III mini (GT-I8190) is a smartphone with Ux500 SoC released in 2012. Thanks to the great mainline support for Ux500, it can actually run mainline Linux quite well. Add a new device tree for it with support for: - Internal Storage (eMMC) - External Storage (Micro SD card) - UART - GPIO Buttons - Vibrator Note that the device tree cannot be booted directly with the original (Samsung) bootloader. It keeps the L2 cache turned on, which causes the kernel to hang shortly after decompression. As a workaround I have created a port of (mainline) U-Boot, which locks the L2 cache before booting Linux. At the moment it does not replace the Samsung bootloader, instead we let the original bootloader load U-Boot as an another (intermediate) bootloader. Another advantage of this is that U-Boot has proper device tree support, so we do not need to hardcode the kernel command line in the device tree. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191219202052.19039-5-stephan@gerhold.net Signed-off-by: Linus Walleij commit 92ac62e1c3efc87d40ffec3e3626d28a408c508d Author: Stephan Gerhold Date: Thu Dec 19 21:20:46 2019 +0100 dt-bindings: arm: ux500: Document samsung,golden compatible The Samsung Galaxy S III mini ("samsung-golden") can now boot mainline Linux; document the samsung,golden compatible that is used in its device tree. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191219202052.19039-4-stephan@gerhold.net Signed-off-by: Linus Walleij commit 6299f3002bc1641d0b2533b5ccc6e02833d6caac Author: Stephan Gerhold Date: Thu Dec 19 21:20:45 2019 +0100 ARM: dts: ux500: Add device tree include for AB8505 AB8505 is a slightly newer version of AB8500. Overall it is quite similar, but there are some differences like the number of GPIOs and regulators. Therefore we need a separate device tree definition for devices making use of AB8505. The AB8500-specific nodes were moved out of ste-dbx5x0.dtsi in commit a46f7c6762d8 ("ARM: dts: ux500: Move ab8500 nodes to ste-ab8500.dtsi"). Add a new "ste-ab8505.dtsi" device tree include in a similar way. Keep the battery/charging related sub-devices disabled by default since they require additional configuration to work correctly. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191219202052.19039-3-stephan@gerhold.net Signed-off-by: Linus Walleij commit 9956b94eea28d8f70c7d304d3accc4fc64eb81f5 Author: Stephan Gerhold Date: Thu Dec 19 21:20:44 2019 +0100 ARM: dts: ux500: Remove unused ste-href-ab8505.dtsi The pin configuration for HREF boards with AB8505 was added in commit 77ad9dfc2c7e ("ARM: ux500: move last AB8505 set-up to DT"). As the commit message notes, it was unused back then and it has remained so even today, especially considering AB8505 did not have proper device tree support until recently. We are now preparing to add support for some Samsung smartphones that are using AB8505. However, they use different pin configs because using ste-href-ab8505.dtsi is known to break UART. There were not many HREFs with AB8505, so at this point it seems unlikely that we will ever make use of this include. Remove it. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191219202052.19039-2-stephan@gerhold.net Signed-off-by: Linus Walleij commit 28d1dddc59f6b7fc085093e7c1e978b33f0caf4c Author: Kunihiko Hayashi Date: Tue Dec 24 09:58:27 2019 +0900 spi: uniphier: Add DMA transfer mode support This adds DMA transfer mode support for UniPhier SPI controller. Since this controller requires simulteaneous transmission and reception, this indicates SPI_CONTROLLER_MUST_RX and SPI_CONTROLLER_MUST_TX. Because the supported dma controller has alignment restiction, there is also a restriction that 'maxburst' parameters in dma_slave_config corresponds to one word width. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/1577149107-30670-6-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Mark Brown commit 5caf64c633a3564f70e734868254281b25932fc0 Author: Srinivas Kandagatla Date: Thu Dec 19 10:31:53 2019 +0000 ASoC: qcom: sdm845: add support to DB845c and Lenovo Yoga This patch adds support to Lenovo Yoga c630 compatible strings and related setup to the sound machine driver. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191219103153.14875-12-srinivas.kandagatla@linaro.org Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 834d899794f4ec3bbf9836c85e8f76b7de6e8a59 Author: Srinivas Kandagatla Date: Thu Dec 19 10:31:52 2019 +0000 ASoC: qcom: dt-bindings: Add compatible for DB845c and Lenovo Yoga This patch adds compatible strings for DB845c and Lenovo Yoga C630 soundcard. Based on this compatible strings common machine driver will be in better position to setup board specific configuration. Signed-off-by: Srinivas Kandagatla Acked-by: Rob Herring Link: https://lore.kernel.org/r/20191219103153.14875-11-srinivas.kandagatla@linaro.org Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit da3e83f8bb866a91945ef5c47bdb25de189a381e Author: Srinivas Kandagatla Date: Thu Dec 19 10:31:49 2019 +0000 ASoC: wcd934x: add audio routings This patch adds audio routing for both playback and capture. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191219103153.14875-8-srinivas.kandagatla@linaro.org Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit a70d9245759a48e57bb1dc9f63213dcf3017db32 Author: Srinivas Kandagatla Date: Thu Dec 19 10:31:48 2019 +0000 ASoC: wcd934x: add capture dapm widgets This patch adds required dapm widgets for capture path. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191219103153.14875-7-srinivas.kandagatla@linaro.org Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit dd9eb19b567303e4b92747dcfb5deedb182af111 Author: Srinivas Kandagatla Date: Thu Dec 19 10:31:47 2019 +0000 ASoC: wcd934x: add playback dapm widgets This patch adds required dapm widgets for playback. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191219103153.14875-6-srinivas.kandagatla@linaro.org Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 1cde8b82233275a72db34a8c1efa4cf6cc8c894f Author: Srinivas Kandagatla Date: Thu Dec 19 10:31:46 2019 +0000 ASoC: wcd934x: add basic controls This patch adds basic controls found in wcd934x codec. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191219103153.14875-5-srinivas.kandagatla@linaro.org Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit a61f3b4f476eceb25274161e5a53a8d18e42610b Author: Srinivas Kandagatla Date: Thu Dec 19 10:31:45 2019 +0000 ASoC: wcd934x: add support to wcd9340/wcd9341 codec Qualcomm WCD9340/WCD9341 Codec is a standalone Hi-Fi audio codec IC, It supports both I2S/I2C and SLIMbus audio interfaces. On slimbus interface it supports two data lanes; 16 Tx ports and 8 Rx ports. It has Five DACs and seven dedicated interpolators, Seven (six audio ADCs, and one VBAT ADC), Multibutton headset control (MBHC), Active noise cancellation, Sidetone paths, MAD (mic activity detection) and codec processing engine. It supports Class-H differential earpiece out and stereo single ended headphones out. This codec also has integrated SoundWire controller. This patchset adds very basic support for playback and capture via the interpolators and ADC respectively. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20191219103153.14875-4-srinivas.kandagatla@linaro.org Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit a6b748713205242d1483a78662bf147b1aa7d90b Author: Srinivas Kandagatla Date: Thu Dec 19 10:31:43 2019 +0000 ASoC: dt-bindings: add dt bindings for WCD9340/WCD9341 audio codec This patch adds bindings for wcd9340/wcd9341 audio codec which can support both SLIMbus and I2S/I2C interface. Signed-off-by: Srinivas Kandagatla Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191219103153.14875-2-srinivas.kandagatla@linaro.org Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit 790514ed7715334949125de39989720dc0985f15 Merge: 0d9c75481a8e 9cd34efbd301 Author: Mark Brown Date: Wed Dec 25 18:18:54 2019 +0000 Merge branch 'for-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-5.6 commit 0d9c75481a8e0129f82e0b09a5e36eb1cc76c2b8 Author: zhengbin Date: Tue Dec 24 11:52:06 2019 +0800 spi: tegra114: use true,false for bool variable Fixes coccicheck warning: drivers/spi/spi-tegra114.c:272:2-17: WARNING: Assignment of 0/1 to bool variable drivers/spi/spi-tegra114.c:275:2-17: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1577159526-33689-4-git-send-email-zhengbin13@huawei.com Signed-off-by: Mark Brown commit e6a8b2cc514ccacb9e1885dcc7be0a3251ab4843 Author: zhengbin Date: Tue Dec 24 11:52:05 2019 +0800 spi: imx: use true,false for bool variable Fixes coccicheck warning: drivers/spi/spi-imx.c:1233:2-17: WARNING: Assignment of 0/1 to bool variable drivers/spi/spi-imx.c:1235:2-17: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1577159526-33689-3-git-send-email-zhengbin13@huawei.com Signed-off-by: Mark Brown commit a68735d7975dde1392f408417c6b5f24c6bf9358 Author: zhengbin Date: Tue Dec 24 11:52:04 2019 +0800 spi: fsl-lpspi: use true,false for bool variable Fixes coccicheck warning: drivers/spi/spi-fsl-lpspi.c:472:2-19: WARNING: Assignment of 0/1 to bool variable drivers/spi/spi-fsl-lpspi.c:474:2-19: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1577159526-33689-2-git-send-email-zhengbin13@huawei.com Signed-off-by: Mark Brown commit a82cf72f94af1135f2edde0a244499af390f333a Merge: bb9ee1eacb2d dcf08d0f8f09 Author: Mark Brown Date: Wed Dec 25 17:51:43 2019 +0000 Merge branch 'for-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.6 commit 41d329e287fb4888591491be4b4198f14b211cf6 Author: Chris Wilson Date: Mon Dec 23 20:44:10 2019 +0000 drm/i915: Add spaces before compound GEM_TRACE Add a space between the prefixed format and the users format so that the join are not mistakenly combined into one long word. Fixes: 639f2f24895f ("drm/i915: Introduce new macros for tracing") Signed-off-by: Chris Wilson Cc: Venkata Sandeep Dhanalakota Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20191223204411.2355304-1-chris@chris-wilson.co.uk commit 0679715e714345d273c0e1eb78078535ffc4b2a1 Author: Ard Biesheuvel Date: Tue Dec 24 16:10:25 2019 +0100 efi/libstub/x86: Avoid globals to store context during mixed mode calls Instead of storing the return address in a global variable when calling a 32-bit EFI service from the 64-bit stub, avoid the indirection via efi_exit32, and take the return address from the stack. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-26-ardb@kernel.org Signed-off-by: Ingo Molnar commit 7d4e323d02c9a37d68c067f5a951307f3af14694 Author: Ard Biesheuvel Date: Tue Dec 24 16:10:24 2019 +0100 efi/libstub: Tidy up types and names of global cmdline variables Drop leading underscores and use bool not int for true/false variables set on the command line. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-25-ardb@kernel.org Signed-off-by: Ingo Molnar commit 966291f6344d7eb6fc3204381a426bafa20a3d18 Author: Ard Biesheuvel Date: Tue Dec 24 16:10:23 2019 +0100 efi/libstub: Rename efi_call_early/_runtime macros to be more intuitive The macros efi_call_early and efi_call_runtime are used to call EFI boot services and runtime services, respectively. However, the naming is confusing, given that the early vs runtime distinction may suggest that these are used for calling the same set of services either early or late (== at runtime), while in reality, the sets of services they can be used with are completely disjoint, and efi_call_runtime is also only usable in 'early' code. So do a global sweep to replace all occurrences with efi_bs_call or efi_rt_call, respectively, where BS and RT match the idiom used by the UEFI spec to refer to boot time or runtime services. While at it, use 'func' as the macro parameter name for the function pointers, which is less likely to collide and cause weird build errors. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-24-ardb@kernel.org Signed-off-by: Ingo Molnar commit 99ea8b1db2d23ac856bf3ee0673628df088a21ea Author: Ard Biesheuvel Date: Tue Dec 24 16:10:22 2019 +0100 efi/libstub: Drop 'table' argument from efi_table_attr() macro None of the definitions of the efi_table_attr() still refer to their 'table' argument so let's get rid of it entirely. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-23-ardb@kernel.org Signed-off-by: Ingo Molnar commit 47c0fd39b7b81f51cc8f767c34a57d12289bdc60 Author: Ard Biesheuvel Date: Tue Dec 24 16:10:21 2019 +0100 efi/libstub: Drop protocol argument from efi_call_proto() macro After refactoring the mixed mode support code, efi_call_proto() no longer uses its protocol argument in any of its implementation, so let's remove it altogether. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-22-ardb@kernel.org Signed-off-by: Ingo Molnar commit 23e60394046a831d3245f83c0f5d46dee7d83326 Author: Ard Biesheuvel Date: Tue Dec 24 16:10:20 2019 +0100 efi/libstub/x86: Work around page freeing issue in mixed mode Mixed mode translates calls from the 64-bit kernel into the 32-bit firmware by wrapping them in a call to a thunking routine that pushes a 32-bit word onto the stack for each argument passed to the function, regardless of the argument type. This works surprisingly well for most services and protocols, with the exception of ones that take explicit 64-bit arguments. efi_free() invokes the FreePages() EFI boot service, which takes a efi_physical_addr_t as its address argument, and this is one of those 64-bit types. This means that the 32-bit firmware will interpret the (addr, size) pair as a single 64-bit quantity, and since it is guaranteed to have the high word set (as size > 0), it will always fail due to the fact that EFI memory allocations are always < 4 GB on 32-bit firmware. So let's fix this by giving the thunking code a little hand, and pass two values for the address, and a third one for the size. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-21-ardb@kernel.org Signed-off-by: Ingo Molnar commit cd33a5c1d53e43bef1683c70dc3b68b6d9e8eca6 Author: Ard Biesheuvel Date: Tue Dec 24 16:10:19 2019 +0100 efi/libstub: Remove 'sys_table_arg' from all function prototypes We have a helper efi_system_table() that gives us the address of the EFI system table in memory, so there is no longer point in passing it around from each function to the next. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-20-ardb@kernel.org Signed-off-by: Ingo Molnar commit 8173ec7905b5b07c989b06a105d171c169dde93b Author: Ard Biesheuvel Date: Tue Dec 24 16:10:18 2019 +0100 efi/libstub: Drop sys_table_arg from printk routines As a first step towards getting rid of the need to pass around a function parameter 'sys_table_arg' pointing to the EFI system table, remove the references to it in the printing code, which is represents the majority of the use cases. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-19-ardb@kernel.org Signed-off-by: Ingo Molnar commit c3710de5065d63f8b16d160a118cc50ae09050b4 Author: Ard Biesheuvel Date: Tue Dec 24 16:10:17 2019 +0100 efi/libstub/x86: Drop __efi_early() export and efi_config struct The various pointers we stash in the efi_config struct which we retrieve using __efi_early() are simply copies of the ones in the EFI system table, which we have started accessing directly in the previous patch. So drop all the __efi_early() related plumbing, as well as all the assembly code dealing with efi_config, which allows us to move the PE/COFF entry point to C code as well. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-18-ardb@kernel.org Signed-off-by: Ingo Molnar commit dc29da14ed94a005ed2a590ec86aa8a572fea4a9 Author: Ard Biesheuvel Date: Tue Dec 24 16:10:16 2019 +0100 efi/libstub: Unify the efi_char16_printk implementations Use a single implementation for efi_char16_printk() across all architectures. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-17-ardb@kernel.org Signed-off-by: Ingo Molnar commit 2fcdad2a80a6d6fd0f77205108232d1adc709a84 Author: Ard Biesheuvel Date: Tue Dec 24 16:10:15 2019 +0100 efi/libstub: Get rid of 'sys_table_arg' macro parameter The efi_call macros on ARM have a dependency on a variable 'sys_table_arg' existing in the scope of the macro instantiation. Since this variable always points to the same data structure, let's create a global getter for it and use that instead. Note that the use of a global variable with external linkage is avoided, given the problems we had in the past with early processing of the GOT tables. While at it, drop the redundant casts in the efi_table_attr and efi_call_proto macros. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-16-ardb@kernel.org Signed-off-by: Ingo Molnar commit 14e900c7e4033d6ee3398b9f133e1716cc072401 Author: Ard Biesheuvel Date: Tue Dec 24 16:10:14 2019 +0100 efi/libstub: Avoid protocol wrapper for file I/O routines The EFI file I/O routines built on top of the file I/O firmware services are incompatible with mixed mode, so there is no need to obfuscate them by using protocol wrappers whose only purpose is to hide the mixed mode handling. So let's switch to plain indirect calls instead. This also means we can drop the mixed_mode aliases from the various types involved. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-15-ardb@kernel.org Signed-off-by: Ingo Molnar commit afc4cc71cf78a8d691023da8ebcc31c3394a1674 Author: Ard Biesheuvel Date: Tue Dec 24 16:10:13 2019 +0100 efi/libstub/x86: Avoid thunking for native firmware calls We use special wrapper routines to invoke firmware services in the native case as well as the mixed mode case. For mixed mode, the need is obvious, but for the native cases, we can simply rely on the compiler to generate the indirect call, given that GCC now has support for the MS calling convention (and has had it for quite some time now). Note that on i386, the decompressor and the EFI stub are not built with -mregparm=3 like the rest of the i386 kernel, so we can safely allow the compiler to emit the indirect calls here as well. So drop all the wrappers and indirection, and switch to either native calls, or direct calls into the thunk routine for mixed mode. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-14-ardb@kernel.org Signed-off-by: Ingo Molnar commit 8f24f8c2fc82f701866419dcb594e2cc1d3f46ba Author: Ard Biesheuvel Date: Tue Dec 24 16:10:12 2019 +0100 efi/libstub: Annotate firmware routines as __efiapi Annotate all the firmware routines (boot services, runtime services and protocol methods) called in the boot context as __efiapi, and make it expand to __attribute__((ms_abi)) on 64-bit x86. This allows us to use the compiler to generate the calls into firmware that use the MS calling convention instead of the SysV one. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-13-ardb@kernel.org Signed-off-by: Ingo Molnar commit 960a8d01834eabc4549928c60f8ce0300ad08519 Author: Ard Biesheuvel Date: Tue Dec 24 16:10:11 2019 +0100 efi/libstub: Use stricter typing for firmware function pointers We will soon remove another level of pointer casting, so let's make sure all type handling involving firmware calls at boot time is correct. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-12-ardb@kernel.org Signed-off-by: Ingo Molnar commit e8bd5ddf60eedd6d584fa1e98d0cfe45abe95043 Author: Ard Biesheuvel Date: Tue Dec 24 16:10:10 2019 +0100 efi/libstub: Drop explicit 32/64-bit protocol definitions Now that we have incorporated the mixed mode protocol definitions into the native ones using unions, we no longer need the separate 32/64 bit struct definitions, with the exception of the EFI system table definition and the boot services, runtime services and configuration table definitions. So drop the unused ones. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-11-ardb@kernel.org Signed-off-by: Ingo Molnar commit f958efe97596837f9504fc38d75ef8e284bc0ebd Author: Ard Biesheuvel Date: Tue Dec 24 16:10:09 2019 +0100 efi/libstub: Distinguish between native/mixed not 32/64 bit Currently, we support mixed mode by casting all boot time firmware calls to 64-bit explicitly on native 64-bit systems, and to 32-bit on 32-bit systems or 64-bit systems running with 32-bit firmware. Due to this explicit awareness of the bitness in the code, we do a lot of casting even on generic code that is shared with other architectures, where mixed mode does not even exist. This casting leads to loss of coverage of type checking by the compiler, which we should try to avoid. So instead of distinguishing between 32-bit vs 64-bit, distinguish between native vs mixed, and limit all the nasty casting and pointer mangling to the code that actually deals with mixed mode. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-10-ardb@kernel.org Signed-off-by: Ingo Molnar commit 1786e83011644e18732ed006413339d5323766e9 Author: Ard Biesheuvel Date: Tue Dec 24 16:10:08 2019 +0100 efi/libstub: Extend native protocol definitions with mixed_mode aliases In preparation of moving to a native vs. mixed mode split rather than a 32 vs. 64 bit split when it comes to invoking EFI firmware services, update all the native protocol definitions and redefine them as unions containing an anonymous struct for the native view and a struct called 'mixed_mode' describing the 32-bit view of the protocol when called from 64-bit code. While at it, flesh out some PCI I/O member definitions that we will be needing shortly. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-9-ardb@kernel.org Signed-off-by: Ingo Molnar commit 2732ea0d5c0a67ec86bfbde2bd68b6152e23ec4e Author: Ard Biesheuvel Date: Tue Dec 24 16:10:07 2019 +0100 efi/libstub: Use a helper to iterate over a EFI handle array Iterating over a EFI handle array is a bit finicky, since we have to take mixed mode into account, where handles are only 32-bit while the native efi_handle_t type is 64-bit. So introduce a helper, and replace the various occurrences of this pattern. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-8-ardb@kernel.org Signed-off-by: Ingo Molnar commit a8147dba75b188bff87d4ad072db84a0b70d716d Author: Ard Biesheuvel Date: Tue Dec 24 16:10:06 2019 +0100 efi/x86: Rename efi_is_native() to efi_is_mixed() The ARM architecture does not permit combining 32-bit and 64-bit code at the same privilege level, and so EFI mixed mode is strictly a x86 concept. In preparation of turning the 32/64 bit distinction in shared stub code to a native vs mixed one, refactor x86's current use of the helper function efi_is_native() into efi_is_mixed(). Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-7-ardb@kernel.org Signed-off-by: Ingo Molnar commit 58ec655a75731c83f403e9c04ffd66aa6b3cd4d5 Author: Ard Biesheuvel Date: Tue Dec 24 16:10:05 2019 +0100 efi/libstub: Remove unused __efi_call_early() macro The macro __efi_call_early() is defined by various architectures but never used. Let's get rid of it. Signed-off-by: Ard Biesheuvel Cc: Arvind Sankar Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-6-ardb@kernel.org Signed-off-by: Ingo Molnar commit 8de8788d21826457ac3bfd1629d0e280f67c7b5f Author: Arvind Sankar Date: Tue Dec 24 16:10:04 2019 +0100 efi/gop: Unify 32/64-bit functions Use efi_table_attr macro to deal with 32/64-bit firmware using the same source code. Signed-off-by: Arvind Sankar Signed-off-by: Ard Biesheuvel Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-5-ardb@kernel.org Signed-off-by: Ingo Molnar commit 44c84b4ada73b8ff156181fcf6e320459b8daefd Author: Arvind Sankar Date: Tue Dec 24 16:10:03 2019 +0100 efi/gop: Convert GOP structures to typedef and clean up some types Use typedef for the GOP structures, in anticipation of unifying 32/64-bit code. Also use more appropriate types in the non-bitness specific structures for the framebuffer address and pointers. Signed-off-by: Arvind Sankar Signed-off-by: Ard Biesheuvel Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-4-ardb@kernel.org Signed-off-by: Ingo Molnar commit 6c895c2fca8a8d4e740b5498b48f81111569502a Author: Arvind Sankar Date: Tue Dec 24 16:10:02 2019 +0100 efi/gop: Remove unused typedef We have stopped using gop->query_mode(), so remove the unused typedef for the function prototype. Signed-off-by: Arvind Sankar Signed-off-by: Ard Biesheuvel Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-3-ardb@kernel.org Signed-off-by: Ingo Molnar commit 8d62af1778125bd674cc66e8432305cc6aac5d89 Author: Arvind Sankar Date: Tue Dec 24 16:10:01 2019 +0100 efi/gop: Remove bogus packed attribute from GOP structures EFI structures are not packed, they follow natural alignment. The packed attribute doesn't have any effect on the structure layout due to the types and order of the members, and we only ever get these structures as output from the EFI firmware so alignment issues have not come up. Signed-off-by: Arvind Sankar Signed-off-by: Ard Biesheuvel Cc: Borislav Petkov Cc: James Morse Cc: Matt Fleming Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-2-ardb@kernel.org Signed-off-by: Ingo Molnar commit 1f676247f36a4bdea134de5e8bc5041db9678c4e Author: Peter Zijlstra Date: Wed Dec 11 01:25:57 2019 +0100 x86/alternatives: Implement a better poke_int3_handler() completion scheme Commit: 285a54efe386 ("x86/alternatives: Sync bp_patching update for avoiding NULL pointer exception") added an additional text_poke_sync() IPI to text_poke_bp_batch() to handle the rare case where another CPU is still inside an INT3 handler while we clear the global state. Instead of spraying IPIs around, count the active INT3 handlers and wait for them to go away before proceeding to clear/reuse the data. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Masami Hiramatsu Reviewed-by: Daniel Bristot de Oliveira Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar commit 46f5cfc13d54962097cb0cc5f97593e2a98a6aed Merge: 46cf053efec6 2040cf9f5903 Author: Ingo Molnar Date: Wed Dec 25 10:43:08 2019 +0100 Merge branch 'core/kprobes' into perf/core, to pick up a completed branch Signed-off-by: Ingo Molnar commit 804d402fb6f6487b825aae8cf42fda6426c62867 Author: Qais Yousef Date: Wed Oct 9 11:46:11 2019 +0100 sched/rt: Make RT capacity-aware Capacity Awareness refers to the fact that on heterogeneous systems (like Arm big.LITTLE), the capacity of the CPUs is not uniform, hence when placing tasks we need to be aware of this difference of CPU capacities. In such scenarios we want to ensure that the selected CPU has enough capacity to meet the requirement of the running task. Enough capacity means here that capacity_orig_of(cpu) >= task.requirement. The definition of task.requirement is dependent on the scheduling class. For CFS, utilization is used to select a CPU that has >= capacity value than the cfs_task.util. capacity_orig_of(cpu) >= cfs_task.util DL isn't capacity aware at the moment but can make use of the bandwidth reservation to implement that in a similar manner CFS uses utilization. The following patchset implements that: https://lore.kernel.org/lkml/20190506044836.2914-1-luca.abeni@santannapisa.it/ capacity_orig_of(cpu)/SCHED_CAPACITY >= dl_deadline/dl_runtime For RT we don't have a per task utilization signal and we lack any information in general about what performance requirement the RT task needs. But with the introduction of uclamp, RT tasks can now control that by setting uclamp_min to guarantee a minimum performance point. ATM the uclamp value are only used for frequency selection; but on heterogeneous systems this is not enough and we need to ensure that the capacity of the CPU is >= uclamp_min. Which is what implemented here. capacity_orig_of(cpu) >= rt_task.uclamp_min Note that by default uclamp.min is 1024, which means that RT tasks will always be biased towards the big CPUs, which make for a better more predictable behavior for the default case. Must stress that the bias acts as a hint rather than a definite placement strategy. For example, if all big cores are busy executing other RT tasks we can't guarantee that a new RT task will be placed there. On non-heterogeneous systems the original behavior of RT should be retained. Similarly if uclamp is not selected in the config. [ mingo: Minor edits to comments. ] Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Reviewed-by: Steven Rostedt (VMware) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191009104611.15363-1-qais.yousef@arm.com Signed-off-by: Ingo Molnar commit 1d42509e475cdc8542aa5b3e03a7e845244f4f57 Author: Valentin Schneider Date: Wed Dec 11 11:38:51 2019 +0000 sched/fair: Make EAS wakeup placement consider uclamp restrictions task_fits_capacity() has just been made uclamp-aware, and find_energy_efficient_cpu() needs to go through the same treatment. Things are somewhat different here however - using the task max clamp isn't sufficient. Consider the following setup: The target runqueue, rq: rq.cpu_capacity_orig = 512 rq.cfs.avg.util_avg = 200 rq.uclamp.max = 768 // the max p.uclamp.max of all enqueued p's is 768 The waking task, p (not yet enqueued on rq): p.util_est = 600 p.uclamp.max = 100 Now, consider the following code which doesn't use the rq clamps: util = uclamp_task_util(p); // Does the task fit in the spare CPU capacity? cpu = cpu_of(rq); fits_capacity(util, cpu_capacity(cpu) - cpu_util(cpu)) This would lead to: util = 100; fits_capacity(100, 512 - 200) fits_capacity() would return true. However, enqueuing p on that CPU *will* cause it to become overutilized since rq clamp values are max-aggregated, so we'd remain with rq.uclamp.max = 768 which comes from the other tasks already enqueued on rq. Thus, we could select a high enough frequency to reach beyond 0.8 * 512 utilization (== overutilized) after enqueuing p on rq. What find_energy_efficient_cpu() needs here is uclamp_rq_util_with() which lets us peek at the future utilization landscape, including rq-wide uclamp values. Make find_energy_efficient_cpu() use uclamp_rq_util_with() for its fits_capacity() check. This is in line with what compute_energy() ends up using for estimating utilization. Tested-By: Dietmar Eggemann Suggested-by: Quentin Perret Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Reviewed-by: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191211113851.24241-6-valentin.schneider@arm.com Signed-off-by: Ingo Molnar commit a7008c07a568278ed2763436404752a98004c7ff Author: Valentin Schneider Date: Wed Dec 11 11:38:50 2019 +0000 sched/fair: Make task_fits_capacity() consider uclamp restrictions task_fits_capacity() drives CPU selection at wakeup time, and is also used to detect misfit tasks. Right now it does so by comparing task_util_est() with a CPU's capacity, but doesn't take into account uclamp restrictions. There's a few interesting uses that can come out of doing this. For instance, a low uclamp.max value could prevent certain tasks from being flagged as misfit tasks, so they could merrily remain on low-capacity CPUs. Similarly, a high uclamp.min value would steer tasks towards high capacity CPUs at wakeup (and, should that fail, later steered via misfit balancing), so such "boosted" tasks would favor CPUs of higher capacity. Introduce uclamp_task_util() and make task_fits_capacity() use it. Tested-By: Dietmar Eggemann Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Quentin Perret Reviewed-by: Vincent Guittot Reviewed-by: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191211113851.24241-5-valentin.schneider@arm.com Signed-off-by: Ingo Molnar commit d2b58a286e89824900d501db0be1d4f6aed474fc Author: Valentin Schneider Date: Wed Dec 11 11:38:49 2019 +0000 sched/uclamp: Rename uclamp_util_with() into uclamp_rq_util_with() The current helper returns (CPU) rq utilization with uclamp restrictions taken into account. A uclamp task utilization helper would be quite helpful, but this requires some renaming. Prepare the code for the introduction of a uclamp_task_util() by renaming the existing uclamp_util_with() to uclamp_rq_util_with(). Tested-By: Dietmar Eggemann Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Quentin Perret Reviewed-by: Vincent Guittot Reviewed-by: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191211113851.24241-4-valentin.schneider@arm.com Signed-off-by: Ingo Molnar commit 686516b55e98edf18c2a02d36aaaa6f4c0f6c39c Author: Valentin Schneider Date: Wed Dec 11 11:38:48 2019 +0000 sched/uclamp: Make uclamp util helpers use and return UL values Vincent pointed out recently that the canonical type for utilization values is 'unsigned long'. Internally uclamp uses 'unsigned int' values for cache optimization, but this doesn't have to be exported to its users. Make the uclamp helpers that deal with utilization use and return unsigned long values. Tested-By: Dietmar Eggemann Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Quentin Perret Reviewed-by: Vincent Guittot Reviewed-by: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191211113851.24241-3-valentin.schneider@arm.com Signed-off-by: Ingo Molnar commit 59fe675248ffc37d4167e9ec6920a2f3d5ec67bb Author: Valentin Schneider Date: Wed Dec 11 11:38:47 2019 +0000 sched/uclamp: Remove uclamp_util() The sole user of uclamp_util(), schedutil_cpu_util(), was made to use uclamp_util_with() instead in commit: af24bde8df20 ("sched/uclamp: Add uclamp support to energy_compute()") From then on, uclamp_util() has remained unused. Being a simple wrapper around uclamp_util_with(), we can get rid of it and win back a few lines. Tested-By: Dietmar Eggemann Suggested-by: Dietmar Eggemann Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191211113851.24241-2-valentin.schneider@arm.com Signed-off-by: Ingo Molnar commit 17346452b25b98acfb395d2a82ec2e4ad0cb7a01 Author: Viresh Kumar Date: Thu Nov 14 16:19:27 2019 +0530 sched/fair: Make sched-idle CPU selection consistent throughout There are instances where we keep searching for an idle CPU despite already having a sched-idle CPU (in find_idlest_group_cpu(), select_idle_smt() and select_idle_cpu() and then there are places where we don't necessarily do that and return a sched-idle CPU as soon as we find one (in select_idle_sibling()). This looks a bit inconsistent and it may be worth having the same policy everywhere. On the other hand, choosing a sched-idle CPU over a idle one shall be beneficial from performance and power point of view as well, as we don't need to get the CPU online from a deep idle state which wastes quite a lot of time and energy and delays the scheduling of the newly woken up task. This patch tries to simplify code around sched-idle CPU selection and make it consistent throughout. Testing is done with the help of rt-app on hikey board (ARM64 octa-core, 2 clusters, 0-3 and 4-7). The cpufreq governor was set to performance to avoid any side affects from CPU frequency. Following are the tests performed: Test 1: 1-cfs-task: A single SCHED_NORMAL task is pinned to CPU5 which runs for 2333 us out of 7777 us (so gives time for the cluster to go in deep idle state). Test 2: 1-cfs-1-idle-task: A single SCHED_NORMAL task is pinned on CPU5 and single SCHED_IDLE task is pinned on CPU6 (to make sure cluster 1 doesn't go in deep idle state). Test 3: 1-cfs-8-idle-task: A single SCHED_NORMAL task is pinned on CPU5 and eight SCHED_IDLE tasks are created which run forever (not pinned anywhere, so they run on all CPUs). Checked with kernelshark that as soon as NORMAL task sleeps, the SCHED_IDLE task starts running on CPU5. And here are the results on mean latency (in us), using the "st" tool. $ st 1-cfs-task/rt-app-cfs_thread-0.log N min max sum mean stddev 642 90 592 197180 307.134 109.906 $ st 1-cfs-1-idle-task/rt-app-cfs_thread-0.log N min max sum mean stddev 642 67 311 113850 177.336 41.4251 $ st 1-cfs-8-idle-task/rt-app-cfs_thread-0.log N min max sum mean stddev 643 29 173 41364 64.3297 13.2344 The mean latency when we need to: - wakeup from deep idle state is 307 us. - wakeup from shallow idle state is 177 us. - preempt a SCHED_IDLE task is 64 us. Signed-off-by: Viresh Kumar Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/b90cbcce608cef4e02a7bbfe178335f76d201bab.1573728344.git.viresh.kumar@linaro.org Signed-off-by: Ingo Molnar commit 53a23364b6b0c679a8ecfc48e74d652f18e3631f Author: Qian Cai Date: Thu Dec 19 09:03:14 2019 -0500 sched/core: Remove unused variable from set_user_nice() This commit left behind an unused variable: 5443a0be6121 ("sched: Use fair:prio_changed() instead of ad-hoc implementation") left behind an unused variable. kernel/sched/core.c: In function 'set_user_nice': kernel/sched/core.c:4507:16: warning: variable 'delta' set but not used int old_prio, delta; ^~~~~ Signed-off-by: Qian Cai Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 5443a0be6121 ("sched: Use fair:prio_changed() instead of ad-hoc implementation") Link: https://lkml.kernel.org/r/20191219140314.1252-1-cai@lca.pw Signed-off-by: Ingo Molnar commit 1e5f8a308551b9816588e12bb795aeadebe37c4a Merge: a5e37de90e67 46cf053efec6 Author: Ingo Molnar Date: Wed Dec 25 10:41:37 2019 +0100 Merge tag 'v5.5-rc3' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit 9f6cff995e98258b6b81cc864532f633e5b3a081 Merge: af7797785d61 caafb2509fac Author: David S. Miller Date: Tue Dec 24 22:37:30 2019 -0800 Merge branch 'Simplify-IPv6-route-offload-API' Ido Schimmel says: ==================== Simplify IPv6 route offload API Motivation ========== This is the IPv6 counterpart of "Simplify IPv4 route offload API" [1]. The aim of this patch set is to simplify the IPv6 route offload API by making the stack a bit smarter about the notifications it is generating. This allows driver authors to focus on programming the underlying device instead of having to duplicate the IPv6 route insertion logic in their driver, which is error-prone. Details ======= Today, whenever an IPv6 route is added or deleted a notification is sent in the FIB notification chain and it is up to offload drivers to decide if the route should be programmed to the hardware or not. This is not an easy task as in hardware routes are keyed by {prefix, prefix length, table id}, whereas the kernel can store multiple such routes that only differ in metric / nexthop info. This series makes sure that only routes that are actually used in the data path are notified to offload drivers. This greatly simplifies the work these drivers need to do, as they are now only concerned with programming the hardware and do not need to replicate the IPv6 route insertion logic and store multiple identical routes. The route that is notified is the first route in the IPv6 FIB node, which represents a single prefix and length in a given table. In case the route is deleted and there is another route with the same key, a replace notification is emitted. Otherwise, a delete notification is emitted. Unlike IPv4, in IPv6 it is possible to append individual nexthops to an existing multipath route. Therefore, in addition to the replace and delete notifications present in IPv4, an append notification is also used. Testing ======= To ensure there is no degradation in route insertion rates, I averaged the insertion rate of 512k routes (/64 and /128) over 50 runs. Did not observe any degradation. Functional tests are available here [2]. They rely on route trap indication, which is added in a subsequent patch set. In addition, I have been running syzkaller for the past couple of weeks with debug options enabled. Did not observe any problems. Patch set overview ================== Patches #1-#7 gradually introduce the new FIB notifications Patch #8 converts mlxsw to use the new notifications Patch #9 remove the old notifications [1] https://patchwork.ozlabs.org/cover/1209738/ [2] https://github.com/idosch/linux/tree/fib-notifier ==================== Signed-off-by: David S. Miller commit caafb2509fac1432849650826953dd88b7cbe374 Author: Ido Schimmel Date: Mon Dec 23 15:28:20 2019 +0200 ipv6: Remove old route notifications and convert listeners Now that mlxsw is converted to use the new FIB notifications it is possible to delete the old ones and use the new replace / append / delete notifications. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller commit dacad7b34b59fb06a242ef2cf64205f04f7c5339 Author: Ido Schimmel Date: Mon Dec 23 15:28:19 2019 +0200 mlxsw: spectrum_router: Start using new IPv6 route notifications With the new notifications mlxsw does not need to handle identical routes itself, as this is taken care of by the core IPv6 code. Instead, mlxsw only needs to take care of inserting and removing routes from the device. Convert mlxsw to use the new IPv6 route notifications and simplify the code. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 0284696b97b2fad1b220871559dff410cc3187e0 Author: Ido Schimmel Date: Mon Dec 23 15:28:18 2019 +0200 ipv6: Handle multipath route deletion notification When an entire multipath route is deleted, only emit a notification if it is the first route in the node. Emit a replace notification in case the last sibling is followed by another route. Otherwise, emit a delete notification. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller commit d2f0c9b11410f9c6a07c126f8a215b0b81cdcf6c Author: Ido Schimmel Date: Mon Dec 23 15:28:17 2019 +0200 ipv6: Handle route deletion notification For the purpose of route offload, when a single route is deleted, it is only of interest if it is the first route in the node or if it is sibling to such a route. In the first case, distinguish between several possibilities: 1. Route is the last route in the node. Emit a delete notification 2. Route is followed by a non-multipath route. Emit a replace notification for the non-multipath route. 3. Route is followed by a multipath route. Emit a replace notification for the multipath route. In the second case, only emit a delete notification to ensure the route is no longer used as a valid nexthop. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 9c6ecd3cf62d0eb57539f966d7ad617ad3a59f4b Author: Ido Schimmel Date: Mon Dec 23 15:28:16 2019 +0200 ipv6: Only Replay routes of interest to new listeners When a new listener is registered to the FIB notification chain it receives a dump of all the available routes in the system. Instead, make sure to only replay the IPv6 routes that are actually used in the data path and are of any interest to the new listener. This is done by iterating over all the routing tables in the given namespace, but from each traversed node only the first route ('leaf') is notified. Multipath routes are notified in a single notification instead of one for each nexthop. Add fib6_rt_dump_tmp() to do that. Later on in the patch set it will be renamed to fib6_rt_dump() instead of the existing one. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 0ee0f47c26b2f909ec95d7d8fed8119e288c4dd3 Author: Ido Schimmel Date: Mon Dec 23 15:28:15 2019 +0200 ipv6: Notify multipath route if should be offloaded In a similar fashion to previous patches, only notify the new multipath route if it is the first route in the node or if it was appended to such route. The type of the notification (replace vs. append) is determined based on the number of routes added ('nhn') and the number of sibling routes. If the two do not match, then an append notification should be sent. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 51bf7f387fdfe5ec8c33734b3124ccec83c8d0c3 Author: Ido Schimmel Date: Mon Dec 23 15:28:14 2019 +0200 ipv6: Notify route if replacing currently offloaded one Similar to the corresponding IPv4 patch, only notify the new route if it is replacing the currently offloaded one. Meaning, the one pointed to by 'fn->leaf'. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller commit c10c4279c778df03f404a4d6906d7d4b840eb95f Author: Ido Schimmel Date: Mon Dec 23 15:28:13 2019 +0200 ipv6: Notify newly added route if should be offloaded fib6_add_rt2node() takes care of adding a single route ('struct fib6_info') to a FIB node. The route in question should only be notified in case it is added as the first route in the node (lowest metric) or if it is added as a sibling route to the first route in the node. The first criterion can be tested by checking if the route is pointed to by 'fn->leaf'. The second criterion can be tested by checking the new 'notify_sibling_rt' variable that is set when the route is added as a sibling to the first route in the node. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 6b722237b656d045c0b9bab9966a5e46604258ba Author: Ido Schimmel Date: Mon Dec 23 15:28:12 2019 +0200 net: fib_notifier: Add temporary events to the FIB notification chain Subsequent patches are going to simplify the IPv6 route offload API, which will only use three events - replace, delete and append. Introduce a temporary version of replace and delete in order to make the conversion easier to review. Note that append does not need a temporary version, as it is currently not used. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: David Ahern Signed-off-by: David S. Miller commit af7797785d61e1053d23764b5d3fbdf2ab926f31 Author: Heiner Kallweit Date: Sat Dec 21 14:15:21 2019 +0100 r8169: move enabling EEE to rtl8169_init_phy Simplify the code by moving the call to rtl_enable_eee() from the individual PHY configs to rtl8169_init_phy(). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 8722709b049473f9bd3ba9b817d52d9ab0a8e20b Author: Heiner Kallweit Date: Sat Dec 21 14:11:08 2019 +0100 r8169: remove MAC workaround in rtl8168e_2_hw_phy_config Due to recent changes we don't need the call to rtl_rar_exgmac_set() and longer at this place. It's called from rtl_rar_set() which is called in rtl_init_mac_address() and rtl8169_resume(). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 3127f7c9b7da3f64a7b970bfbfa307f48adbb72e Author: Heiner Kallweit Date: Sat Dec 21 14:03:38 2019 +0100 r8169: factor out rtl8168h_2_get_adc_bias_ioffset Simplify and factor out this magic from rtl8168h_2_hw_phy_config() and name it based on the vendor driver. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit ab5d4bb2b819bd09a1eb1a9a0069e22c1ae4aeb0 Merge: ac80010fc94e f66b53fdbb22 Author: David S. Miller Date: Tue Dec 24 22:24:45 2019 -0800 Merge branch 'ovs-mpls-actions' Martin Varghese says: ==================== New openvswitch MPLS actions for layer 2 tunnelling The existing PUSH MPLS action inserts MPLS header between ethernet header and the IP header. Though this behaviour is fine for L3 VPN where an IP packet is encapsulated inside a MPLS tunnel, it does not suffice the L2 VPN (l2 tunnelling) requirements. In L2 VPN the MPLS header should encapsulate the ethernet packet. The new mpls action ADD_MPLS inserts MPLS header at the start of the packet or at the start of the l3 header depending on the value of l3 tunnel flag in the ADD_MPLS arguments. POP_MPLS action is extended to support ethertype 0x6558 OVS userspace changes - --------------------- Encap & Decap ovs actions are extended to support MPLS packet type. The encap & decap adds and removes MPLS header at the start of packet as depicted below. Actions - encap(mpls(ether_type=0x8847)),encap(ethernet) Incoming packet -> | ETH | IP | Payload | 1 Actions - encap(mpls(ether_type=0x8847)) [Kernel action - add_mpls:0x8847] Outgoing packet -> | MPLS | ETH | Payload| 2 Actions - encap(ethernet) [ Kernel action - push_eth ] Outgoing packet -> | ETH | MPLS | ETH | Payload| Decapsulation: Incoming packet -> | ETH | MPLS | ETH | IP | Payload | Actions - decap(),decap(packet_type(ns=0,type=0) 1 Actions - decap() [Kernel action - pop_eth) Outgoing packet -> | MPLS | ETH | IP | Payload| 2 Actions - decap(packet_type(ns=0,type=0) [Kernel action - pop_mpls:0x6558] Outgoing packet -> | ETH | IP | Payload ==================== Signed-off-by: David S. Miller commit f66b53fdbb22ced1a323b22b9de84a61aacd8d18 Author: Martin Varghese Date: Sat Dec 21 08:50:46 2019 +0530 openvswitch: New MPLS actions for layer 2 tunnelling The existing PUSH MPLS action inserts MPLS header between ethernet header and the IP header. Though this behaviour is fine for L3 VPN where an IP packet is encapsulated inside a MPLS tunnel, it does not suffice the L2 VPN (l2 tunnelling) requirements. In L2 VPN the MPLS header should encapsulate the ethernet packet. The new mpls action ADD_MPLS inserts MPLS header at the start of the packet or at the start of the l3 header depending on the value of l3 tunnel flag in the ADD_MPLS arguments. POP_MPLS action is extended to support ethertype 0x6558. Signed-off-by: Martin Varghese Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit 76f99f987f2b7f95d43857b6e0362bd8dec9890c Author: Martin Varghese Date: Sat Dec 21 08:50:23 2019 +0530 net: Rephrased comments section of skb_mpls_pop() Rephrased comments section of skb_mpls_pop() to align it with comments section of skb_mpls_push(). Signed-off-by: Martin Varghese Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit e7dbfed1adb0e9123f582293e79760dc52b00d74 Author: Martin Varghese Date: Sat Dec 21 08:50:01 2019 +0530 net: skb_mpls_push() modified to allow MPLS header push at start of packet. The existing skb_mpls_push() implementation always inserts mpls header after the mac header. L2 VPN use cases requires MPLS header to be inserted before the ethernet header as the ethernet packet gets tunnelled inside MPLS header in those cases. Signed-off-by: Martin Varghese Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit 11299c5cd8868479e9acfc525ba3c2e882c7ba0c Author: Kunihiko Hayashi Date: Tue Dec 24 09:58:25 2019 +0900 spi: uniphier: Add handle_err callback function This adds master->handle_err() callback function to stop transfer due to error. The function also resets FIFOs and disables interrupt. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/1577149107-30670-4-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Mark Brown commit 9859db51387df8a7e8564a211158ff8bf263b0a8 Author: Kunihiko Hayashi Date: Tue Dec 24 09:58:24 2019 +0900 spi: uniphier: Change argument of irq functions to private structure This changes each argument of functions uniphier_irq_{enable,disable}() to uniphier_spi_priv because these functions are used not only for spi_device but also for the entire controller. Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/1577149107-30670-3-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Mark Brown commit bb9ee1eacb2dfcdf419f14c739b866c3eba4dc1f Author: Angus Ainslie (Purism) Date: Mon Dec 23 07:47:12 2019 -0800 dt-bindings: sound: gtm601: add the broadmobi interface The Broadmobi BM818 uses a different sample rate and channels from the option modem. Signed-off-by: Angus Ainslie (Purism) Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191223154712.18581-3-angus@akkea.ca Signed-off-by: Mark Brown commit 057a317a8d94136b76a3cc6f7be53ee2b85dc115 Author: Angus Ainslie (Purism) Date: Mon Dec 23 07:47:11 2019 -0800 ASoC: gtm601: add Broadmobi bm818 sound profile The Broadmobi bm818 uses stereo sound at 48Khz sample rate Signed-off-by: Angus Ainslie (Purism) Link: https://lore.kernel.org/r/20191223154712.18581-2-angus@akkea.ca Signed-off-by: Mark Brown commit c5614fb8e3d13be7bba79f71b798468a3a6224f7 Author: YueHaibing Date: Tue Dec 24 22:02:37 2019 +0800 ASoC: Intel: kbl_da7219_max98357a: remove unused variable 'constraints_16000' and 'ch_mono' sound/soc/intel/boards/kbl_da7219_max98357a.c:343:48: warning: constraints_16000 defined but not used [-Wunused-const-variable=] sound/soc/intel/boards/kbl_da7219_max98357a.c:348:27: warning: ch_mono defined but not used [-Wunused-const-variable=] They are never used, so can be removed. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191224140237.36732-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit 4bb16cd82773ee2e73d6201e6e7271f75312144c Author: Sathyanarayana Nujella Date: Fri Dec 20 11:10:37 2019 -0600 ASoC: hdac_hda: Update hdac hda dai table to include intel-hdmi-hifi4 TGL supports more than three HDMI Dai's. So, update hdac_hda_dais table to include 4th DAI. Without this patch, we saw the below error in TGL DUT: sof_rt5682 tgl_max98357a_rt5682: ASoC: CODEC DAI intel-hdmi-hifi4 not Signed-off-by: Sathyanarayana Nujella Signed-off-by: Jairaj Arava Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191220171037.10689-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e68d6696575e1af3f92125e842f2853708f34589 Author: Sathyanarayana Nujella Date: Fri Dec 20 11:10:36 2019 -0600 ASoC: SOF: Intel: hda: Add iDisp4 DAI TGL supports more than three iDisp DAI's. Add support for iDisp4 CPU DAI. Without this patch, we saw the below error on our TGL DUT: sof_rt5682 tgl_max98357a_rt5682: ASoC: CPU DAI iDisp4 Pin not registered Signed-off-by: Sathyanarayana Nujella Signed-off-by: Jairaj Arava Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191220171037.10689-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6ffdc742156887f8959733866adab5d486b751a5 Author: Benjamin Gaignard Date: Thu Dec 19 15:41:15 2019 +0100 dt-bindings: nvmem: Convert STM32 ROMEM to json-schema Convert the STM32 ROMEM binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit c5a05bd6455a358d9063f6e7a8c3fdcc60a61b32 Author: Benjamin Gaignard Date: Wed Dec 18 15:26:13 2019 +0100 dt-bindings: usb: amlogic, meson-g12a-usb-ctrl: fix clock names dwc2 bindings require clock-names to be "otg". Fix the example in amlogic,meson-g12a-usb-ctrl to follow this requirement. Signed-off-by: Benjamin Gaignard Acked-by: Neil Armstrong Signed-off-by: Rob Herring commit 93adc6aef57f169c010071d732940b0f9f1fb5a7 Author: Maxime Ripard Date: Thu Dec 19 10:07:12 2019 +0100 dt-bindings: resets: Convert Allwinner legacy resets to schemas The Allwinner SoCs have a legacy set of bindings (and a framework to support it in Linux) for their reset controllers. Now that we have the DT validation in place, let's split into separate file and convert the device tree bindings for those resets to schemas, and mark them all as deprecated. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit af287ed02ffd3bb356f3f63ab9eacc60a65247fb Author: Maxime Ripard Date: Thu Dec 19 10:07:11 2019 +0100 dt-bindings: mfd: Convert Allwinner legacy PRCM bindings to schemas The Allwinner SoCs have a legacy set of bindings (and a drivers to support it in Linux) to support the PRCM unit found in most recent SoCs. Now that we have the DT validation in place, let's split into separate file and convert the device tree bindings for those controllers to schemas, and mark them all as deprecated. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit f95cad74acdb9de3b61a95ae8203c5e78b7d3615 Author: Maxime Ripard Date: Thu Dec 19 10:07:10 2019 +0100 dt-bindings: clocks: Convert Allwinner legacy clocks to schemas The Allwinner SoCs have a legacy set of bindings (and a framework to support it in Linux) for their clock controllers. Now that we have the DT validation in place, let's split into separate file and convert the device tree bindings for those clocks to schemas, and mark them all as deprecated. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit b30d8cf5e1717b3498056833d24971d9977bf3ab Author: Maxime Ripard Date: Thu Dec 19 09:46:23 2019 +0100 dt-bindings: opp: Convert Allwinner H6 OPP to a schema The Allwinner H6 SoCs use binning in order to provide binning to cpufreq which is supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit 90dc0d1ce890419f977e460b8258d25187dde64f Author: Rob Herring Date: Fri Dec 6 16:27:41 2019 -0600 of: Rework and simplify phandle cache to use a fixed size The phandle cache was added to speed up of_find_node_by_phandle() by avoiding walking the whole DT to find a matching phandle. The implementation has several shortcomings: - The cache is designed to work on a linear set of phandle values. This is true for dtc generated DTs, but not for other cases such as Power. - The cache isn't enabled until of_core_init() and a typical system may see hundreds of calls to of_find_node_by_phandle() before that point. - The cache is freed and re-allocated when the number of phandles changes. - It takes a raw spinlock around a memory allocation which breaks on RT. Change the implementation to a fixed size and use hash_32() as the cache index. This greatly simplifies the implementation. It avoids the need for any re-alloc of the cache and taking a reference on nodes in the cache. We only have a single source of removing cache entries which is of_detach_node(). Using hash_32() removes any assumption on phandle values improving the hit rate for non-linear phandle values. The effect on linear values using hash_32() is about a 10% collision. The chances of thrashing on colliding values seems to be low. To compare performance, I used a RK3399 board which is a pretty typical system. I found that just measuring boot time as done previously is noisy and may be impacted by other things. Also bringing up secondary cores causes some issues with measuring, so I booted with 'nr_cpus=1'. With no caching, calls to of_find_node_by_phandle() take about 20124 us for 1248 calls. There's an additional 288 calls before time keeping is up. Using the average time per hit/miss with the cache, we can calculate these calls to take 690 us (277 hit / 11 miss) with a 128 entry cache and 13319 us with no cache or an uninitialized cache. Comparing the 3 implementations the time spent in of_find_node_by_phandle() is: no cache: 20124 us (+ 13319 us) 128 entry cache: 5134 us (+ 690 us) current cache: 819 us (+ 13319 us) We could move the allocation of the cache earlier to improve the current cache, but that just further complicates the situation as it needs to be after slab is up, so we can't do it when unflattening (which uses memblock). Reported-by: Sebastian Andrzej Siewior Cc: Michael Ellerman Cc: Segher Boessenkool Cc: Frank Rowand Acked-by: Sebastian Andrzej Siewior Reviewed-by: Frank Rowand Tested-by: Frank Rowand Signed-off-by: Rob Herring commit afd36d28e4126342d7151d5f7e4a875ad2ace9f9 Author: Miquel Raynal Date: Fri Dec 13 19:00:18 2019 +0100 dt-bindings: phy: Fix the PX30 DSI PHY compatible in the example Use the upstream compatible instead of the BSP one in the example section of the DT bindings for this IP. Fixes: 3817c7961179 ("dt-bindings: phy: add yaml binding for rockchip,px30-dsi-dphy") Signed-off-by: Miquel Raynal Reviewed-by: Heiko Stuebner Signed-off-by: Rob Herring commit f1268534027a792f3d97a0cfff8041d314ef2fca Author: YueHaibing Date: Tue Dec 24 20:45:52 2019 +0800 selinux: remove set but not used variable 'sidtab' security/selinux/ss/services.c: In function security_port_sid: security/selinux/ss/services.c:2346:17: warning: variable sidtab set but not used [-Wunused-but-set-variable] security/selinux/ss/services.c: In function security_ib_endport_sid: security/selinux/ss/services.c:2435:17: warning: variable sidtab set but not used [-Wunused-but-set-variable] security/selinux/ss/services.c: In function security_netif_sid: security/selinux/ss/services.c:2480:17: warning: variable sidtab set but not used [-Wunused-but-set-variable] security/selinux/ss/services.c: In function security_fs_use: security/selinux/ss/services.c:2831:17: warning: variable sidtab set but not used [-Wunused-but-set-variable] Since commit 66f8e2f03c02 ("selinux: sidtab reverse lookup hash table") 'sidtab' is not used any more, so remove it. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Paul Moore commit c100777cc00ce9a0e53f94e2f530abd35a54751b Author: Tvrtko Ursulin Date: Tue Dec 24 09:59:20 2019 +0000 drm/i915: Switch context id allocation directly to xarray IDR internally uses xarray so we can use it directly which simplifies our code by removing the need to do external locking. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191224095920.2386297-1-chris@chris-wilson.co.uk commit d61fe22c2ae42d9fd76c34ef4224064cca4b04b0 Author: Takashi Sakamoto Date: Mon Dec 23 18:33:47 2019 +0900 ALSA: ctl: allow TLV read operation for callback type of element in locked case A design of ALSA control core allows applications to execute three operations for TLV feature; read, write and command. Furthermore, it allows driver developers to process the operations by two ways; allocated array or callback function. In the former, read operation is just allowed, thus developers uses the latter when device driver supports variety of models or the target model is expected to dynamically change information stored in TLV container. The core also allows applications to lock any element so that the other applications can't perform write operation to the element for element value and TLV information. When the element is locked, write and command operation for TLV information are prohibited as well as element value. Any read operation should be allowed in the case. At present, when an element has callback function for TLV information, TLV read operation returns EPERM if the element is locked. On the other hand, the read operation is success when an element has allocated array for TLV information. In both cases, read operation is success for element value expectedly. This commit fixes the bug. This change can be backported to v4.14 kernel or later. Signed-off-by: Takashi Sakamoto Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20191223093347.15279-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 34ce3c5e691206d388fcc61f3da2ce8fe8a1907a Author: Sudeep Holla Date: Wed Nov 6 17:58:03 2019 +0000 reset: reset-scmi: Match scmi device by both name and protocol id The scmi bus now has support to match the driver with devices not only based on their protocol id but also based on their device name if one is available. This was added to cater the need to support multiple devices and drivers for the same protocol. Let us add the name "reset" to scmi_device_id table in the driver so that in matches only with device with the same name and protocol id SCMI_PROTOCOL_RESET. Acked-by: Philipp Zabel Signed-off-by: Sudeep Holla commit b017b2791c9cd6b2e6ec28265e7da3069f25c34f Author: Sudeep Holla Date: Wed Nov 6 17:57:30 2019 +0000 hwmon: (scmi-hwmon) Match scmi device by both name and protocol id The scmi bus now has support to match the driver with devices not only based on their protocol id but also based on their device name if one is available. This was added to cater the need to support multiple devices and drivers for the same protocol. Let us add the name "hwmon" to scmi_device_id table in the driver so that in matches only with device with the same name and protocol id SCMI_PROTOCOL_SENSOR. This is just for sake of completion and must not be used to add IIO support in parallel. Instead, if IIO support is added ever in future, we need to drop this hwmon driver entirely and use the iio->hwmon bridge to access the sensors as hwmon devices if needed. Cc: linux-hwmon@vger.kernel.org Acked-by: Guenter Roeck Signed-off-by: Sudeep Holla commit 12b7662618efd08486c00fbfd98222e16c248c04 Author: Sudeep Holla Date: Wed Nov 6 17:56:25 2019 +0000 cpufreq: scmi: Match scmi device by both name and protocol id The scmi bus now has support to match the driver with devices not only based on their protocol id but also based on their device name if one is available. This was added to cater the need to support multiple devices and drivers for the same protocol. Let us add the name "cpufreq" to scmi_device_id table in the driver so that in matches only with device with the same name and protocol id SCMI_PROTOCOL_PERF. This will help to add "devfreq" device/driver. Cc: "Rafael J. Wysocki" Acked-by: Viresh Kumar Signed-off-by: Sudeep Holla commit 43998dfe24c19c2b29db64ae2b99e51e6c018aba Author: Sudeep Holla Date: Wed Nov 6 17:55:47 2019 +0000 clk: scmi: Match scmi device by both name and protocol id The scmi bus now has support to match the driver with devices not only based on their protocol id but also based on their device name if one is available. This was added to cater the need to support multiple devices and drivers for the same protocol. Let us add the name "clocks" to scmi_device_id table in the driver so that in matches only with device with the same name and protocol id SCMI_PROTOCOL_CLOCK. Cc: linux-clk@vger.kernel.org Cc: Michael Turquette Acked-by: Stephen Boyd Signed-off-by: Sudeep Holla commit 2deb267b26b5441e0e77f999ea084bf02c5c0ef1 Author: Sudeep Holla Date: Thu Nov 7 11:39:45 2019 +0000 firmware: arm_scmi: Skip protocol initialisation for additional devices The scmi bus now supports adding multiple devices per protocol, and since scmi_protocol_init is called for each scmi device created, we must avoid allocating protocol private data and initialising the protocol itself if it is already initialised. In order to achieve the same, we can simple replace the idr pointer from protocol initialisation function to a dummy function. Suggested-by: Cristian Marussi Reviewed-by: Cristian Marussi Signed-off-by: Sudeep Holla commit b55b06b79445574fa031158fe2ae2946cde0d1b7 Author: Sudeep Holla Date: Fri Nov 22 14:48:40 2019 +0000 firmware: arm_scmi: Stash version in protocol init functions In order to avoid querying the individual protocol versions multiple time with more that one device created for each protocol, we can simple store the copy in the protocol specific private data and use them whenever required. Reviewed-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 50872a94637b1e7c92b43280adb71dd8e30fd246 Author: Sudeep Holla Date: Wed Nov 6 17:55:03 2019 +0000 firmware: arm_scmi: Match scmi device by both name and protocol id The scmi bus now has support to match the driver with devices not only based on their protocol id but also based on their device name if one is available. This was added to cater the need to support multiple devices and drivers for the same protocol. Let us add the name "genpd" to scmi_device_id table in the driver so that in matches only with device with the same name and protocol id SCMI_PROTOCOL_POWER. Reviewed-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 4605e224db2ec4ce8f0eb4e91feba7eaf5677ba9 Author: Sudeep Holla Date: Tue Oct 22 10:09:01 2019 +0100 firmware: arm_scmi: Add versions and identifier attributes using dev_groups Platform drivers now have the option to have the platform core create and remove any needed sysfs attribute files. Using the same, let's add the scmi firmware and protocol version attributes as well as vendor and sub-vendor identifiers to sysfs. It helps to identify the firmware details from the sysfs entries similar to ARM SCPI implementation. Reviewed-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 9c5c463f2adf140a126c7ab52bd10012c70fdd53 Author: Sudeep Holla Date: Wed Nov 6 15:17:26 2019 +0000 firmware: arm_scmi: Add names to scmi devices created Now that scmi bus provides option to create named scmi device, let us create the default devices with names. This will help to add names for matching to respective drivers and eventually to add multiple devices and drivers per protocol. Reviewed-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 11040889afe3c0b084de0de1782534d529493e9b Author: Sudeep Holla Date: Wed Nov 6 11:32:05 2019 +0000 firmware: arm_scmi: Skip scmi mbox channel setup for addtional devices Now that the scmi bus supports adding multiple devices per protocol, and since scmi_create_protocol_device calls scmi_mbox_chan_setup, we must avoid allocating and initialising the mbox channel if it is already initialised. Reviewed-by: Cristian Marussi Signed-off-by: Sudeep Holla commit ee7a9c9f67c59008b330deff2762bd8cf1407eec Author: Sudeep Holla Date: Fri Dec 21 18:08:08 2018 +0000 firmware: arm_scmi: Add support for multiple device per protocol Currently only one scmi device is created for each protocol enumerated. However, there is requirement to make use of some procotols by multiple kernel subsystems/frameworks. One such example is SCMI PERFORMANCE protocol which can be used by both cpufreq and devfreq drivers. Similarly, SENSOR protocol may be used by hwmon and iio subsystems, and POWER protocol may be used by genpd and regulator drivers. In order to achieve that, let us extend the scmi bus to match based not only protocol id but also the scmi device name if one is available. Reviewed-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 30084b143de7a320ab8fc609a8ad3a396232d002 Author: Chris Wilson Date: Mon Dec 23 21:10:08 2019 +0000 drm/i915/gt: Flush other retirees inside intel_gt_retire_requests() Our goal in wait_for_idle (intel_gt_retire_requests) is to the current workload *and* their idle barriers. This requires us to notice the late arrival of those, which is done by inspecting the list of active timelines. However, if a concurrent retirer is running that new timeline may not be added until after we drop the lock -- so flush concurrent retirers before we take the lock and inspect the list. Closes: https://gitlab.freedesktop.org/drm/intel/issues/878 Signed-off-by: Chris Wilson Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191223211008.2371613-1-chris@chris-wilson.co.uk commit b42d3b159ad8073602e466244f49f29f327e6798 Author: Pankaj Bharadiya Date: Mon Dec 9 20:09:02 2019 +0530 drm/i915/display: cleanup intel_bw_state on i915 module removal intel_bw_state allocated memory is not getting freed even after module removal. kmemleak reported backtrace: [<0000000079019739>] kmemdup+0x17/0x40 [<00000000d58c1b9d>] intel_bw_duplicate_state+0x1b/0x40 [i915] [<000000007423ed0c>] drm_atomic_get_private_obj_state+0xca/0x140 [<00000000100e3533>] intel_bw_atomic_check+0x133/0x350 [i915] [<00000000126d0e0c>] intel_atomic_check+0x1ab7/0x20d0 [i915] [<00000000d5dfc004>] drm_atomic_check_only+0x563/0x810 [<00000000c9379611>] drm_atomic_commit+0xe/0x50 [<00000000ec82b765>] drm_atomic_helper_disable_all+0x133/0x160 [<000000003c44760c>] drm_atomic_helper_shutdown+0x65/0xc0 [<00000000414e3e5c>] i915_driver_remove+0xcb/0x130 [i915] [<00000000f8544c2a>] i915_pci_remove+0x19/0x40 [i915] [<000000002dcbd148>] pci_device_remove+0x36/0xb0 [<000000003c8c6b0a>] device_release_driver_internal+0xe0/0x1c0 [<00000000580e9566>] unbind_store+0xc3/0x120 [<00000000869d0df5>] kernfs_fop_write+0x104/0x190 [<000000004dc1a355>] vfs_write+0xb9/0x1d0 Call the drm_atomic_private_obj_fini(), which inturn calls the intel_bw_destroy_state() to make sure the intel_bw_state memory is freed properly. Reviewed-by: Lucas De Marchi Signed-off-by: Pankaj Bharadiya Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20191209143921.9240-1-pankaj.laxminarayan.bharadiya@intel.com commit 59ef4da4e4084d323dd4c3aa4b2fc64ce9e25625 Author: YueHaibing Date: Fri Nov 29 03:35:34 2019 +0000 clk: bm1800: Remove set but not used variable 'fref' Fixes gcc '-Wunused-but-set-variable' warning: drivers/clk/clk-bm1880.c: In function 'bm1880_pll_rate_calc': drivers/clk/clk-bm1880.c:477:13: warning: variable 'fref' set but not used [-Wunused-but-set-variable] It is never used, so remove it. Reported-by: Hulk Robot Signed-off-by: YueHaibing Link: https://lkml.kernel.org/r/20191129033534.188257-1-yuehaibing@huawei.com Signed-off-by: Stephen Boyd commit dd3d06622138e913fa2a0b9a21c0aae231eb45b7 Author: Taniya Das Date: Fri Nov 15 15:34:05 2019 +0530 clk: qcom: Add display clock controller driver for SC7180 Add support for the display clock controller found on SC7180 based devices. This would allow display drivers to probe and control their clocks. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/1573812245-23827-4-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 75616da71291ad37b7a46c9703c0b4206ef346ec Author: Taniya Das Date: Fri Nov 15 15:34:04 2019 +0530 dt-bindings: clock: Introduce QCOM sc7180 display clock bindings Add device tree bindings for display clock controller for Qualcomm Technology Inc's SC7180 SoCs. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/1573812245-23827-3-git-send-email-tdas@codeaurora.org Reviewed-by: Rob Herring [sboyd@kernel.org: Add sc7180 to subject] Signed-off-by: Stephen Boyd commit 5d28e44ba6302a1bf8bd66d9ae4be9e377188ff7 Author: Taniya Das Date: Fri Nov 15 15:34:03 2019 +0530 dt-bindings: clock: Add YAML schemas for the QCOM DISPCC clock bindings The DISPCC clock provider have a bunch of generic properties that are needed in a device tree. Add a YAML schemas for those. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/1573812245-23827-2-git-send-email-tdas@codeaurora.org Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 691865bad627f38e068bcf3de92e46fca8ec295f Author: Taniya Das Date: Fri Nov 15 15:34:58 2019 +0530 clk: qcom: clk-alpha-pll: Add support for Fabia PLL calibration In the cases where the PLL is not calibrated the PLL could fail to lock. Add support for prepare ops which would take care of the same. Fabia PLL user/test control registers might required to be configured, so add support for configuring them. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/1573812304-24074-3-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 1dc3698354dd620a121c1ff8e165c88abaf9300c Author: Taniya Das Date: Fri Nov 15 15:34:57 2019 +0530 clk: qcom: alpha-pll: Remove useless read from set rate PLL_MODE read in fabia set rate is not required, thus remove the same. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/1573812304-24074-2-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit bf453a0a18b224f1379658245c892fd9e1907580 Author: Logan Gunthorpe Date: Mon Dec 16 12:01:20 2019 -0700 dmaengine: ioat: Support in-use unbind Don't allocate memory using the devm infrastructure and instead call kfree with the new dmaengine device_release call back. This ensures the structures are available until the last reference is dropped. We also need to ensure we call ioat_shutdown() in ioat_remove() so that all the channels are quiesced and further transaction fails. Signed-off-by: Logan Gunthorpe Acked-by: Dave Jiang Link: https://lore.kernel.org/r/20191216190120.21374-6-logang@deltatee.com Signed-off-by: Vinod Koul commit 8ad342a863590b24ce77681b7e081363fb3333f7 Author: Logan Gunthorpe Date: Mon Dec 16 12:01:19 2019 -0700 dmaengine: Add reference counting to dma_device struct Adding a reference count helps drivers to properly implement the unbind while in use case. References are taken and put every time a channel is allocated or freed. Once the final reference is put, the device is removed from the dma_device_list and a release callback function is called to signal the driver to free the memory. Signed-off-by: Logan Gunthorpe Link: https://lore.kernel.org/r/20191216190120.21374-5-logang@deltatee.com Signed-off-by: Vinod Koul commit 11a0fd2b3baa5e4a97197b9cd990b5d05e69d669 Author: Logan Gunthorpe Date: Mon Dec 16 12:01:18 2019 -0700 dmaengine: Move dma_channel_rebalance() infrastructure up in code So it can be called by a release function which is needed higher up in the code. No functional changes intended. Signed-off-by: Logan Gunthorpe Link: https://lore.kernel.org/r/20191216190120.21374-4-logang@deltatee.com Signed-off-by: Vinod Koul commit 686607106f1fe163f7d017561f3622f39a291de8 Author: Logan Gunthorpe Date: Mon Dec 16 12:01:17 2019 -0700 dmaengine: Call module_put() after device_free_chan_resources() The module reference is taken to ensure the callbacks still exist when they are called. If the channel holds the last reference to the module, the module can disappear before device_free_chan_resources() is called and would cause a call into free'd memory. Signed-off-by: Logan Gunthorpe Link: https://lore.kernel.org/r/20191216190120.21374-3-logang@deltatee.com Signed-off-by: Vinod Koul commit dae7a589c18a4d979d5f14b09374e871b995ceb1 Author: Logan Gunthorpe Date: Mon Dec 16 12:01:16 2019 -0700 dmaengine: Store module owner in dma_device struct dma_chan_to_owner() dereferences the driver from the struct device to obtain the owner and call module_[get|put](). However, if the backing device is unbound before the dma_device is unregistered, the driver will be cleared and this will cause a NULL pointer dereference. Instead, store a pointer to the owner module in the dma_device struct so the module reference can be properly put when the channel is put, even if the backing device was destroyed first. This change helps to support a safer unbind of DMA engines. If the dma_device is unregistered in the driver's remove function, there's no guarantee that there are no existing clients and a users action may trigger the WARN_ONCE in dma_async_device_unregister() which is unlikely to leave the system in a consistent state. Instead, a better approach is to allow the backing driver to go away and fail any subsequent requests to it. Signed-off-by: Logan Gunthorpe Link: https://lore.kernel.org/r/20191216190120.21374-2-logang@deltatee.com Signed-off-by: Vinod Koul commit f873744c29036cc734ec8ecbedd1a451ce61cef2 Author: Jerome Brunet Date: Tue Sep 24 14:39:54 2019 +0200 clk: add terminate callback to clk_ops Add a terminate callback to the clk_ops to release the resources claimed in .init() Signed-off-by: Jerome Brunet Link: https://lkml.kernel.org/r/20190924123954.31561-4-jbrunet@baylibre.com Signed-off-by: Stephen Boyd commit 89d079dc17e8a32397de827cc85c1f4911b90424 Author: Jerome Brunet Date: Tue Sep 24 14:39:53 2019 +0200 clk: let init callback return an error code If the init callback is allowed to request resources, it needs a return value to report the outcome of such a request. Signed-off-by: Jerome Brunet Link: https://lkml.kernel.org/r/20190924123954.31561-3-jbrunet@baylibre.com Reviewed-by: Andrew Lunn Acked-by: Heiko Stuebner Signed-off-by: Stephen Boyd commit f6fa75ca912be6021335de63a32aa4d295f3c524 Author: Jerome Brunet Date: Tue Sep 24 14:39:52 2019 +0200 clk: actually call the clock init before any other callback of the clock __clk_init_parent() will call the .get_parent() callback of the clock so .init() must run before. Fixes: 541debae0adf ("clk: call the clock init() callback before any other ops callback") Signed-off-by: Jerome Brunet Link: https://lkml.kernel.org/r/20190924123954.31561-2-jbrunet@baylibre.com Signed-off-by: Stephen Boyd commit db2c7c0a04b11753f5741d00b784b5380ddeee72 Author: Jeffrey Hugo Date: Tue Dec 17 08:49:13 2019 -0800 clk: qcom: Add missing msm8998 gcc_bimc_gfx_clk gcc_bimc_gfx_clk is a required clock for booting the GPU and GPU SMMU. Fixes: 4807c71cc688 (arm64: dts: Add msm8998 SoC and MTP board support) Signed-off-by: Jeffrey Hugo Link: https://lkml.kernel.org/r/20191217164913.4783-1-jeffrey.l.hugo@gmail.com Signed-off-by: Stephen Boyd commit 15b590a81fcdd44ddcb4810f2a6334df8b6ca512 Author: Paul Moore Date: Mon Dec 23 16:38:36 2019 -0500 selinux: ensure the policy has been loaded before reading the sidtab stats Check to make sure we have loaded a policy before we query the sidtab's hash stats. Failure to do so could result in a kernel panic/oops due to a dereferenced NULL pointer. Fixes: 66f8e2f03c02 ("selinux: sidtab reverse lookup hash table") Reported-by: kernel test robot Signed-off-by: Paul Moore commit e95cd6b2acd559754d1ad377c5b056bc0cb7ca1d Author: zhengbin Date: Mon Dec 23 21:46:21 2019 +0800 drm/amdgpu: use true, false for bool variable in amdgpu_psp.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:674:2-26: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:794:1-25: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:897:2-36: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:1016:1-35: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:1087:2-34: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:1177:1-33: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit c5b2bd5d394bb71c017603f5d9894131953712c1 Author: zhengbin Date: Mon Dec 23 21:46:20 2019 +0800 drm/amdgpu: use true, false for bool variable in amdgpu_debugfs.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:132:2-10: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:140:2-10: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:142:13-21: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 2a9b90ae470488f7f1ad37d2c8d7cee8a0fb0c63 Author: zhengbin Date: Mon Dec 23 21:46:19 2019 +0800 drm/amdgpu: use true, false for bool variable in amdgpu_device.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3961:1-19: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3981:1-19: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 6df3dab619f39b2abfb12b805017eff5169f1e6e Author: zhengbin Date: Mon Dec 23 21:46:18 2019 +0800 drm/amdgpu: use true, false for bool variable in mxgpu_nv.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c:255:2-20: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c:267:2-20: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit eb28038cc6230f58d2f7949eff44ed2621f25b17 Author: zhengbin Date: Mon Dec 23 21:46:17 2019 +0800 drm/amdgpu: use true, false for bool variable in mxgpu_ai.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c:253:2-20: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c:265:2-20: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit ab2c1ea481c8a677808c925f6011fd77f46d6931 Author: zhengbin Date: Mon Dec 23 17:25:52 2019 +0800 drm/radeon: use true,false for bool variable in ni.c Fixes coccicheck warning: drivers/gpu/drm/radeon/ni.c:2020:2-15: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/radeon/ni.c:2088:2-15: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 45b2de2804a8a661f1fce425ac61fa019e825eed Author: zhengbin Date: Mon Dec 23 17:25:51 2019 +0800 drm/radeon: use true,false for bool variable in cik.c Fixes coccicheck warning: drivers/gpu/drm/radeon/cik.c:8140:2-15: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/radeon/cik.c:8212:2-15: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 1f6e717c219ad3a584c5e13ba31e89240862679d Author: zhengbin Date: Mon Dec 23 17:25:50 2019 +0800 drm/radeon: use true,false for bool variable in rv770.c Fixes coccicheck warning: drivers/gpu/drm/radeon/rv770.c:1706:2-15: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit f30abb96b5b02f9b12894bea2b60a2b47d280639 Author: zhengbin Date: Mon Dec 23 17:25:49 2019 +0800 drm/radeon: use true, false for bool variable in evergreen.c Fixes coccicheck warning: drivers/gpu/drm/radeon/evergreen.c:4948:2-15: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 6b276628c6d1bb94d0eba321db1896573d49f524 Author: zhengbin Date: Mon Dec 23 17:25:48 2019 +0800 drm/radeon: use true,false for bool variable in r600.c Fixes coccicheck warning: drivers/gpu/drm/radeon/r600.c:3056:2-15: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 43302df9fd9de22073ed7b2b233fa7982063c4f6 Author: zhengbin Date: Mon Dec 23 17:25:47 2019 +0800 drm/radeon: use true,false for bool variable in si.c Fixes coccicheck warning: drivers/gpu/drm/radeon/si.c:6475:2-15: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/radeon/si.c:6542:2-15: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 7bf2f6078a2efac7c5d706fa4e38f5fc5e09f576 Author: zhengbin Date: Mon Dec 23 17:25:46 2019 +0800 drm/radeon: use true,false for bool variable in r100.c Fixes coccicheck warning: drivers/gpu/drm/radeon/r100.c:1826:3-31: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/radeon/r100.c:1828:3-31: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/radeon/r100.c:2390:2-22: WARNING: Assignment of 0/1 to bool variable drivers/gpu/drm/radeon/r100.c:2395:2-22: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 468288863e94cf7115317005bc34752c79a4bc74 Author: Alex Deucher Date: Fri Dec 20 15:03:03 2019 -0500 drm/amdgpu/smu: add peak profile support for navi12 Add defined peak sclk for navi12 peak profile mode. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit d24d26540bab53e093ec5e290071883e0f1d152c Author: Alex Deucher Date: Fri Dec 20 14:53:35 2019 -0500 drm/amdgpu/smu/navi: Adjust default behavior for peak sclk profile Fetch the sclk from the pptable if there is no specified sclk for the board. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 46cf2fecf5971b4019c6565c2a895a77f574eb9b Author: Guchun Chen Date: Mon Dec 23 11:40:13 2019 +0800 drm/amdgpu: add missed return value set for error case Return value should be set when going to error handle tag for error case, this can avoid potential invalid array access by upper caller. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 55d62fe10f5ec4f4ea4c5d842a8ceb6a57db1246 Author: Frank.Min Date: Thu Dec 19 17:29:54 2019 +0800 drm/amdgpu: remove FB location config for sriov FB location is already programmed by HV driver for arcutus so remove this part Signed-off-by: Frank.Min Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit fdf57ba690842afd69b32bb1546b0cf17a9849dd Author: Frank.Min Date: Wed Dec 18 19:01:43 2019 +0800 drm/amdgpu: enable xgmi init for sriov use case 1. enable xgmi ta initialization for sriov 2. enable xgmi initialization for sriov Signed-off-by: Frank.Min Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 33a9a5ab1edd82d2393b0640bd284e2c02eb2301 Author: Tianci.Yin Date: Tue Dec 17 14:34:45 2019 +0800 drm/amdgpu: remove memory training p2c buffer reservation(V2) IP discovery TMR(occupied the top VRAM with size DISCOVERY_TMR_SIZE) has been reserved, and the p2c buffer is in the range of this TMR, so the p2c buffer reservation is unnecessary. Reviewed-by: Alex Deucher Reviewed-by: Kevin Wang Reviewed-by: Xiaojie Yuan Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 8d40002fee9eae7e3cedd286149d323afc4b3442 Author: Tianci.Yin Date: Mon Dec 16 15:17:01 2019 +0800 drm/amdgpu: update the method to get fb_loc of memory training(V4) The method of getting fb_loc changed from parsing VBIOS to taking certain offset from top of VRAM Reviewed-by: Alex Deucher Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 7eca40066f856884c673ff47790aa1282a8f9dde Author: Ma Feng Date: Fri Dec 20 17:36:08 2019 +0800 drm/amdgpu: Remove unneeded variable 'ret' in navi10_ih.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/navi10_ih.c:113:5-8: Unneeded variable: "ret". Return "0" on line 182 Reported-by: Hulk Robot Signed-off-by: Ma Feng Signed-off-by: Alex Deucher commit e3c00faa7a3d304807a15394254794f1892c0af8 Author: Ma Feng Date: Mon Dec 23 14:58:27 2019 -0500 drm/amdgpu: Remove unneeded variable 'ret' in amdgpu_device.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1036:5-8: Unneeded variable: "ret". Return "0" on line 1079 Reported-by: Hulk Robot Signed-off-by: Ma Feng Signed-off-by: Alex Deucher commit 57cb635bb4d8ed669fe936f8f03d967178a2f245 Author: James Zhu Date: Mon Dec 16 15:49:11 2019 -0500 drm/amdgpu/gfx: Add mmSDMA2-7_EDC_COUNTER to support Arcturus Add mmSDMA2-7_EDC_COUNTER to support Arcturus Signed-off-by: James Zhu Reviewed-by: Yong Zhao Signed-off-by: Alex Deucher commit 107ab06136658bbbe9b420bb04c656d0b9309476 Author: James Zhu Date: Mon Dec 16 15:46:27 2019 -0500 drm/amdgpu/gfx: Add mmCOMPUTE_STATIC_THREAD_MGMT_SE4-7 to support Arcturus Add mmCOMPUTE_STATIC_THREAD_MGMT_SE4-7 to support Arcturus Signed-off-by: James Zhu Reviewed-by: Yong Zhao Signed-off-by: Alex Deucher commit d8c61373e05c9de02525fdbfa08a9f0ffe57579a Author: James Zhu Date: Mon Dec 16 15:42:43 2019 -0500 drm/amdgpu/gfx: Replace ARRAY_SIZE with size variable Replace ARRAY_SIZE with size variables to support different ASICs. Signed-off-by: James Zhu Reviewed-by: Yong Zhao Signed-off-by: Alex Deucher commit 6eed6cc142345d0e7da4d54d0a58c28074ec29a3 Author: James Zhu Date: Mon Dec 16 15:31:07 2019 -0500 drm/amdgpu: Add mmCOMPUTE_STATIC_THREAD_MGMT_SE4-7 to support Arcturus Arcturus has 8 SEs. Add mmCOMPUTE_STATIC_THREAD_MGMT_SE4-7 for EDC GPR _workarounds, Signed-off-by: James Zhu Reviewed-by: Yong Zhao Signed-off-by: Alex Deucher commit 1e2c6d5582ee41b6e541c9f601497c2f02d497b7 Author: John Clements Date: Fri Dec 20 16:21:32 2019 +0800 drm/amdgpu: Added ASIC specific check in gmc v9.0 ECC interrupt programming sequence Devices newer then VEGA10/12 shall have these programming sequences performed by PSP BL Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 56ca8628acae52be9e43568dcffc49d14b60d924 Author: Frank.Min Date: Wed Dec 18 18:37:11 2019 +0800 drm/amdgpu: enlarge agp_start address into 48bit max range of the agp aperture is 48 bits, so enlarge agp_start address into 48bit with all bits set Signed-off-by: Frank.Min Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 8adf5d21844d47829c67c0c796e916ddab3659f3 Author: Jane Jian Date: Wed Dec 18 18:53:46 2019 +0800 drm/amdgpu: disable VCN2.5 ib test for Arcturus sriov currently using TMR loading VCN fw MMSCH would fail to init after FLR, just disable ib test for temporarily daily testing, continuing debug with mm team. Signed-off-by: Jane Jian Acked-by: Leo Liu Signed-off-by: Alex Deucher commit 0a96afc7c56cbac075426a6a5f82a88cadb648f7 Author: Le Ma Date: Thu Dec 19 19:26:02 2019 +0800 drm/amdgpu: fix ctx init failure for asics without gfx ring This workaround does not affect other asics because amdgpu only need expose one gfx sched to user for now. Signed-off-by: Le Ma Reviewed-by: Nirmoy Das Signed-off-by: Alex Deucher commit a7843c03794553ffe974760e8ba0a6bffbc94d41 Author: Jonathan Kim Date: Mon Dec 16 12:31:57 2019 -0500 drm/amdgpu: attempt xgmi perfmon re-arm on failed arm The DF routines to arm xGMI performance will attempt to re-arm both on performance monitoring start and read on initial failure to arm. Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 5e9eec0707aeeda9dd04643c0f13431353337f99 Author: Jonathan Kim Date: Thu Dec 12 11:46:05 2019 -0500 drm/amdgpu: add perfmons accessible during df c-states During DF C-State, Perfmon counters outside of range 1D700-1D7FF will encounter SLVERR affecting xGMI performance monitoring. PerfmonCtr[7:4] is being added to avoid SLVERR during read since it falls within this range. PerfmonCtl[7:4] is being added in order to arm PerfmonCtr[7:4]. Since PerfmonCtl[7:4] exists outside of range 1D700-1D7FF, DF routines will be enabled to opportunistically re-arm PerfmonCtl[7:4] on retry after SLVERR. Signed-off-by: Jonathan Kim Acked-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit ce73516d42c9ab011fad498168b892d28e181db4 Author: Luben Tuikov Date: Thu Oct 24 19:30:13 2019 -0400 drm/amdgpu: simplify padding calculations (v2) Simplify padding calculations. v2: Comment update and spacing. Signed-off-by: Luben Tuikov Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 44963bf9d4c28815b6bcfb03061e37831ab1ce42 Author: Chris Wilson Date: Mon Dec 23 15:08:33 2019 +0000 drm/i915/gt: Tidy up checking active timelines during retirement Use the status of the timeline request list as we retire it to determine if the timeline is still active. Signed-off-by: Chris Wilson Cc: Andi Shyti Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191223150833.2329366-1-chris@chris-wilson.co.uk commit 8c4bba5ae24e1e76d82323592e5b850ab8db80f2 Author: José Roberto de Souza Date: Sun Dec 22 17:06:54 2019 -0800 drm/i915/display: Add comment to a function that probably can be removed This function is only called from port sync and it is identical to what will be executed again in intel_update_crtc() over port sync pipes. If it is really necessary at least it deserves a better name and a comment, leaving it to people working on port sync. Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: Manasi Navare Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191223010654.67037-7-jose.souza@intel.com commit 080d47bfae80bffd7dd130fd721e91d29c9c0d0a Author: José Roberto de Souza Date: Sun Dec 22 17:06:53 2019 -0800 drm/i915/mst: Force modeset on MST slaves when master needs a modeset MST master can not be disabled while it have attached MST slaves, so it is necessary force a modeset in all of its slaves. v3: - moved handling to intel_atomic_check() this way is guarantee that all pipes will have its state computed v4: - added a function to return if MST master neeeds modeset to simply code in intel_atomic_check() v5: - fixed and moved code to check if MST master needs a modeset v6: - previons version of this patch was split into two patches Cc: Ville Syrjälä Cc: Lucas De Marchi Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191223010654.67037-6-jose.souza@intel.com commit 5cb5b370c1be2fab6f75aec1b2bce7d6fcdaed6a Author: José Roberto de Souza Date: Sun Dec 22 17:06:52 2019 -0800 drm/i915/display: Prepare for fastset external dependencies check MST and port sync have master and slaves pipes and it brings dependencies between pipes to allow fastset. For example if only MST master needs a modeset all of its slaves also needs to do a modeset. This patch adds the base for external dependencies check, the MST and port sync bits will be added in another patches. v3: - moved handling to intel_atomic_check() this way is guarantee that all pipes will have its state computed v4: - added a function to return if MST master neeeds modeset to simply code in intel_atomic_check() v5: - fixed and moved code to check if MST master needs a modeset v6: - previons version of this patch was split into two patches Cc: Ville Syrjälä Cc: Lucas De Marchi Cc: Maarten Lankhorst Cc: Manasi Navare Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191223010654.67037-5-jose.souza@intel.com commit c59053dc58fa3b81ade8e4b411c0e127669c9167 Author: José Roberto de Souza Date: Sun Dec 22 17:06:51 2019 -0800 drm/i915/dp: Fix MST disable sequence The disable sequence after wait for transcoder off was not correctly implemented. The MST disable sequence is basically the same for HSW, SKL, ICL and TGL, with just minor changes for TGL. With this last patch we finally fixed the hotplugs triggered by MST sinks during the disable/enable sequence, those were causing source to try to do a link training while it was not ready causing CPU pipe FIFO underrrus on TGL. v2: Only unsetting TGL_TRANS_DDI_PORT_MASK for TGL on the post disable sequence v4: Rebased, moved MST sequences to intel_mst_post_disable_dp() BSpec: 4231 BSpec: 4163 BSpec: 22243 BSpec: 49190 Cc: Ville Syrjälä Cc: Lucas De Marchi Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191223010654.67037-4-jose.souza@intel.com commit 659f14158f1f0d6d8b3246aa67898fd66b0d5cda Author: José Roberto de Souza Date: Sun Dec 22 17:06:50 2019 -0800 drm/i915/display: Always enables MST master pipe first Due to DDB overlaps the pipe enabling sequence is not always crescent. As the previous patch selects the smallest pipe/transcoder in the MST stream to be master and it needs to be enabled first, this changes were needed to guarantee that. So first lets enable all pipes that do not need a fullmodeset as those don't have any external dependency and those are the ones that can overlap with each other. Then on the second loop it will enable all the pipes that needs a modeset and don't depends on other pipes like MST master pipe/transcoder. Then finally all the pipes that needs a modeset and have dependency on other pipes, that at this point are alread enabled. v3: rebased v4: - added check for modeset_pipes too to decide if is necessary for a wait a vblank - added DDB allocation overlap check for pipes that needs a modeset Cc: Ville Syrjälä Cc: Maarten Lankhorst Cc: Matt Roper Cc: Manasi Navare Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191223010654.67037-3-jose.souza@intel.com commit 6671c367a9beae742855317d278cf9922bf556fe Author: José Roberto de Souza Date: Sun Dec 22 17:06:49 2019 -0800 drm/i915/tgl: Select master transcoder for MST stream On TGL the blending of all the streams have moved from DDI to transcoder, so now every transcoder working over the same MST port must send its stream to a master transcoder and master will send to DDI respecting the time slots. So here adding all the CRTCs that shares the same MST stream if needed and computing their state again, it will pick the lowest pipe/transcoder among the ones in the same stream to be master. Most of the time skl_commit_modeset_enables() enables pipes in a crescent order but due DDB overlapping it might not happen, this scenarios will be handled in the next patch. v2: - Using recently added intel_crtc_state_reset() to set mst_master_transcoder to invalid transcoder for all non gen12 & MST code paths - Setting lowest pipe/transcoder as master, previously it was the first one but setting a predictable one will help in future MST e port sync integration - Moving to intel type as much as we can v3: - Now intel_dp_mst_master_trans_compute() returns the MST master transcoder - Replaced stdbool.h by linux/types.h - Skip the connector being checked in intel_dp_mst_atomic_master_trans_check() - Using pipe instead of transcoder to compute MST master v4: - renamed connector_state to conn_state v5: - Improved the parameters of intel_dp_mst_master_trans_compute() to simply code - Added call drm_atomic_add_affected_planes() in intel_dp_mst_atomic_master_trans_check() as helper could not do it for us - Removed "if (ret)" left over from v3 changes v6: - handled ret == I915_MAX_PIPES case in compute BSpec: 50493 BSpec: 49190 Cc: Ville Syrjälä Cc: Lucas De Marchi Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191223010654.67037-2-jose.souza@intel.com commit ee36c7c0c83767c6e541a4c77bd10a7f788a5db0 Author: José Roberto de Souza Date: Sun Dec 22 17:06:48 2019 -0800 drm/i915/display: Share intel_connector_needs_modeset() intel_connector_needs_modeset() will be used outside of intel_display.c in a future patch so it would only be necessary to remove the state and add the prototype to the header file. But while at it, I simplified the arguments and moved it to a better place intel_atomic.c. No behavior changes intended here. v3: - removed digital from exported version of intel_connector_needs_modeset - rollback connector to drm type v4: - Renamed new_connector_state to new_conn_state - Going back to drm_connector_state in intel_encoders_update_prepare/complete as we also have intel_tv_connector_state Reviewed-by: Ville Syrjälä Cc: Ville Syrjälä Cc: Lucas De Marchi Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191223010654.67037-1-jose.souza@intel.com commit 707745e8d4e75b638b990d67950ab292b3b8ea2a Author: David Bauer Date: Mon Dec 16 01:36:46 2019 +0100 mtd: spi-nor: Add support for mx25r3235f Add MTD support for the Macronix MX25R3235F SPI NOR chip from Macronix. The chip has 4MB of total capacity, divided into a total of 64 sectors, each 64KB sized. The chip also supports 4KB large sectors. Additionally, it supports dual and quad read modes. Functionality was verified on an HPE/Aruba AP-303 board. Signed-off-by: David Bauer Signed-off-by: Tudor Ambarus commit 307dd80885af7183696ab6d81d73afc7a5148df6 Author: Mika Westerberg Date: Tue Dec 10 12:11:11 2019 +0300 mtd: spi-nor: intel-spi: Add support for Intel Jasper Lake SPI serial flash Intel Jasper Lake has the same SPI serial flash controller as Ice Lake. Add Jasper Lake PCI ID to the driver list of supported devices. Signed-off-by: Mika Westerberg Signed-off-by: Tudor Ambarus commit 094d3b977b7bf1f6fad8418634102ef33938a84c Author: Vignesh Raghavendra Date: Thu Dec 5 12:29:35 2019 +0530 mtd: spi-nor: Add USE_FSR flag for n25q* entries Add USE_FSR flag to all variants of n25q entries that support Flag Status Register. Signed-off-by: Vignesh Raghavendra Tested-by: John Garry #for n25q128a13 Signed-off-by: Tudor Ambarus commit 7f412111e276bbc4cbf6064aa6a0c6df6b19a385 Author: Vignesh Raghavendra Date: Thu Dec 5 12:29:34 2019 +0530 mtd: spi-nor: Add entries for mt25q variants Add entries for mt25q*256a and mt25q*512a flashes. These are similar to existing n25q variants but support stateless 4 byte addressing opcodes Signed-off-by: Vignesh Raghavendra Signed-off-by: Tudor Ambarus commit bd8a6e31b87b39a03ab11820776363640440dbe0 Author: Vignesh Raghavendra Date: Thu Dec 5 12:29:33 2019 +0530 mtd: spi-nor: Split mt25qu512a (n25q512a) entry into two mt25q family is different from n25q family of devices, even though manf ID and device IDs are same. mt25q flash has bit 6 set in 5th byte of READ ID response which can be used to distinguish it from n25q variant. mt25q flashes support stateless 4 Byte addressing opcodes where as n25q flashes don't. Therefore, have two separate entries for mt25qu512a and n25q512a. Fixes: 9607af6f857f ("mtd: spi-nor: Rename "n25q512a" to "mt25qu512a (n25q512a)"") Signed-off-by: Vignesh Raghavendra Signed-off-by: Tudor Ambarus commit 3446c63a0f2a691fdc6fffaddc6e0c1285efc80c Author: Jani Nikula Date: Mon Dec 23 19:08:14 2019 +0200 drm/i915: Update DRIVER_DATE to 20191223 Signed-off-by: Jani Nikula commit a56be671734ec5ab7fcfc9ac681d01698fc8bdf5 Author: Jerome Brunet Date: Wed Dec 4 14:27:13 2019 +0100 mtd: spi-nor: add Gigadevice gd25lq128d support Tested on the Amlogic aml-libretech-pc platform which does not support dual or quad modes Signed-off-by: Jerome Brunet [tudor.ambarus@microchip.com: order entry alphabetically] Signed-off-by: Tudor Ambarus commit d1f4acb89c74926970a7733c7ac88d7561681bc7 Author: Jungseung Lee Date: Mon Dec 2 15:35:07 2019 +0900 mtd: spi-nor: Fix wrong TB selection of GD25Q256 For GD25Q256, wrong SR bit for top/bottom selection is being used. Fix it to use appropriate bit. Signed-off-by: Jungseung Lee Signed-off-by: Tudor Ambarus commit 6b8526d3abc02c08a2f888e8c20b7ac9e5776dfe Author: Corey Minyard Date: Mon Dec 23 10:42:19 2019 -0600 ipmi:ssif: Handle a possible NULL pointer reference In error cases a NULL can be passed to memcpy. The length will always be zero, so it doesn't really matter, but go ahead and check for NULL, anyway, to be more precise and avoid static analysis errors. Reported-by: kbuild test robot Signed-off-by: Corey Minyard commit adf1092fa838e870813f2ac152973af311d8ae02 Author: Jungseung Lee Date: Mon Dec 2 15:35:06 2019 +0900 mtd: spi-nor: Support TB selection using SR bit 6 There are some flashes to use bit 6 of status register for Top/Bottom (TB). Use top/bottom bit variable instead of fixed value and support this case. Set the Top/Bottom (TB) mask based on SPI_NOR_TB_SR_BIT6 flash_info flag. We can't use a bigger granularity, for example to set TB_BIT6 per manufacturer using a SNOR_F flag. The manufacturers don't have a common rule in regards to the TB bit: Winbond : Use the 6th bit from 32MB capacity W25Q20EW, W25Q50BW, W25Q128V - TB(5) W25Q256JV, W25M512JV - TB(6) GigaDevice : Use the 6th bit from 32MB capacity GD25Q16C, GD25Q32C, GD25LQ32D, GD25Q64C, GD25Q128 - TB(5) GD25Q256 - TB(6) Micron/STM : Keep to use 5th bit M25PX64, N25Q128A, N25Q512A, MT25QL512ABB, MT25QL02GCBB - TB(5) Spansion : Use the 6th bit from 16MB capacity S25FL116K, S25FL132K, S25FL165K - TB(5) S25FL128L, S25FL256L - TB(6) We can't make a correlation between TB and BP3 either, i.e. assume that if BP3 is defined then TB will be at BIT(6). Micron breaks this rule. Signed-off-by: Jungseung Lee [tudor.ambarus@microchip.com: describe the reason for setting a new flash_info flag.] Signed-off-by: Tudor Ambarus commit 52487e21689b40c8ce967ba97518b3dfaaa2d7b2 Author: Jungseung Lee Date: Mon Dec 2 15:35:05 2019 +0900 mtd: spi-nor: Rename SR_TB to indicate the bit used Each vendor uses different bits for SR_TB of flash. To avoid ambiguity, rename SR_TB to indicate the bit used. Signed-off-by: Jungseung Lee Signed-off-by: Tudor Ambarus commit 01916e0443b9b46e34ad88696aadd1aab7ec142e Author: Jungseung Lee Date: Thu Nov 28 17:58:50 2019 +0900 mtd: spi-nor: fix typo of "JESB216" in comment Fix typo s/JESB216/JESD216/ Signed-off-by: Jungseung Lee Signed-off-by: Tudor Ambarus commit 10050a02f7d508fa88f70fcfceefbacd13488ca7 Author: Robert Marko Date: Mon Dec 23 17:05:49 2019 +0200 mtd: spi-nor: Add 4B_OPCODES flag to w25q256 The w25q256 supports 4-byte opcodes so lets add the flag. Tested on OpenWrt under 4.19.82 kernel on 8devices Habanero. Signed-off-by: Robert Marko Signed-off-by: Tudor Ambarus commit bd3eb4e87eb399a9fe15ef1b59db78faf9c20359 Author: Takashi Sakamoto Date: Mon Dec 23 11:39:21 2019 +0900 ALSA: ctl: bump protocol version up to v2.1.0 In a development period for v5.6 kernel, some changes are introduced to structures in ALSA control interface: - 'tstamp' member is removed from 'struct snd_ctl_elem_value - 'TSTAMP' flag is removed from a set of access flags for 'struct snd_ctl_elem_info' - 'dimen' member is removed from 'struct snd_ctl_elem_info Although these changes were introduced with enough consideration for backward compatibility, they include slightly lose of it. This commit bumps protocol version of ALSA control interface up to v2.1.0. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191223023921.8151-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit ff16351e3f302a2913bd17da6ed8f195ab2139fd Author: Takashi Sakamoto Date: Mon Dec 23 11:39:20 2019 +0900 ALSA: ctl: remove dimen member from elem_info structure The 'dimen' member of 'struct snd_ctl_elem_info' is designed to deliver information to use an array of value as multi-dimensional values. This feature is used just by echoaudio PCI driver, and fortunately it's not used by the other applications than 'echomixer' in alsa-tools. In a previous commit, usage of 'dimen' member is removed from echoaudio PCI driver. Nowadays no driver/application use the feature. This commit removes the member from structure. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191223023921.8151-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit e67c3f0fd44c9bbd7a484b7cf6e9bcb4c0a0a858 Author: Takashi Sakamoto Date: Mon Dec 23 11:39:19 2019 +0900 ALSA: pci: echoaudio: remove usage of dimen menber of elem_value structure In a couple of years ago, 'echomixer' userspace application was revised not to use 'dimen' member of 'struct snd_ctl_elem_info'. This commit removes usage of 'dimen' member from echoaudio PCI driver so that no implementation uses the member. Reference: 275353bb684e ("ALSA: echoaudio: purge contradictions between dimension matrix members and total number of members") Reference: 51db452df07b ("Revert "ALSA: echoaudio: purge contradictions between dimension matrix members and total number of members") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191223023921.8151-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 54228356667920658cd33a63e12b7bff3e13c880 Author: Takashi Sakamoto Date: Mon Dec 23 11:39:18 2019 +0900 ALSA: ctl: remove unused macro for timestamping of elem_value In a former commit, 'tstamp' member was removed from 'struct snd_ctl_elem_value' in a middle way toward solution of Y2038 issue. In a protocol of ALSA control interface, this member is designed to deliver timestamp information in the value structure when the target element supports SNDRV_CTL_ELEM_ACCESS_TIMESTAMP flag. Actually, the feature is neither used by kernel space nor user space, especiall alsa-lib has no API for the feature. Therefore it's reasonable to remove both of them. Practically, the timestamp information corresponds to no information about type of clock ID. It can bring confusions to applications. Reference: a4e7dd35b9da ("ALSA: Avoid using timespec for struct snd_ctl_elem_value") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191223023921.8151-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 2ca6b6dc8512abd697c251c3e492fb12f3cb1856 Author: Joerg Roedel Date: Mon Dec 23 14:09:46 2019 +0100 iommu/amd: Remove unused variable The iommu variable in set_device_exclusion_range() us unused now and causes a compiler warning. Remove it. Fixes: 387caf0b759a ("iommu/amd: Treat per-device exclusion ranges as r/w unity-mapped regions") Signed-off-by: Joerg Roedel commit 6a8679c048eb104dbcc6aa43a0baa7450de46503 Author: Chris Wilson Date: Sun Dec 22 23:35:58 2019 +0000 drm/i915: Mark the GEM context link as RCU protected The only protection for intel_context.gem_cotext is granted by RCU, so annotate it as a rcu protected pointer and carefully dereference it in the few occasions we need to use it. Fixes: 9f3ccd40acf4 ("drm/i915: Drop GEM context as a direct link from i915_request") Signed-off-by: Chris Wilson Cc: Andi Shyti Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191222233558.2201901-1-chris@chris-wilson.co.uk commit c11738cf9d2931c2dbdc44b984ba03519cdeb7fb Author: Thierry Reding Date: Wed Dec 18 14:42:05 2019 +0100 iommu: virtio: Use generic_iommu_put_resv_regions() Use the new standard function instead of open-coding it. Cc: Jean-Philippe Brucker Cc: virtualization@lists.linux-foundation.org Reviewed-by: Jean-Philippe Brucker Signed-off-by: Thierry Reding Signed-off-by: Joerg Roedel commit 0ecdebb7dad586f15c3a5a98bb0cf431ca2fc1da Author: Thierry Reding Date: Wed Dec 18 14:42:04 2019 +0100 iommu: intel: Use generic_iommu_put_resv_regions() Use the new standard function instead of open-coding it. Cc: David Woodhouse Signed-off-by: Thierry Reding Signed-off-by: Joerg Roedel commit 55c2564a6852d27d34938ec748a5f3903b335a0b Author: Thierry Reding Date: Wed Dec 18 14:42:03 2019 +0100 iommu: amd: Use generic_iommu_put_resv_regions() Use the new standard function instead of open-coding it. Signed-off-by: Thierry Reding Signed-off-by: Joerg Roedel commit a66c5dc549d1e1a33f9c4592390112bb8749c95b Author: Thierry Reding Date: Wed Dec 18 14:42:02 2019 +0100 iommu: arm: Use generic_iommu_put_resv_regions() Use the new standard function instead of open-coding it. Cc: Will Deacon Cc: Robin Murphy Acked-by: Will Deacon Signed-off-by: Thierry Reding Signed-off-by: Joerg Roedel commit f9f6971ebb75f5bc302d77e3380dd6363cc1a0f6 Author: Thierry Reding Date: Wed Dec 18 14:42:01 2019 +0100 iommu: Implement generic_iommu_put_resv_regions() Implement a generic function for removing reserved regions. This can be used by drivers that don't do anything fancy with these regions other than allocating memory for them. Signed-off-by: Thierry Reding Signed-off-by: Joerg Roedel commit 944c9175397476199d4dd1028d87ddc582c35ee8 Author: Qian Cai Date: Fri Nov 22 14:16:54 2019 -0500 iommu/iova: Silence warnings under memory pressure When running heavy memory pressure workloads, this 5+ old system is throwing endless warnings below because disk IO is too slow to recover from swapping. Since the volume from alloc_iova_fast() could be large, once it calls printk(), it will trigger disk IO (writing to the log files) and pending softirqs which could cause an infinite loop and make no progress for days by the ongoimng memory reclaim. This is the counter part for Intel where the AMD part has already been merged. See the commit 3d708895325b ("iommu/amd: Silence warnings under memory pressure"). Since the allocation failure will be reported in intel_alloc_iova(), so just call dev_err_once() there because even the "ratelimited" is too much, and silence the one in alloc_iova_mem() to avoid the expensive warn_alloc(). hpsa 0000:03:00.0: DMAR: Allocating 1-page iova failed hpsa 0000:03:00.0: DMAR: Allocating 1-page iova failed hpsa 0000:03:00.0: DMAR: Allocating 1-page iova failed hpsa 0000:03:00.0: DMAR: Allocating 1-page iova failed hpsa 0000:03:00.0: DMAR: Allocating 1-page iova failed hpsa 0000:03:00.0: DMAR: Allocating 1-page iova failed hpsa 0000:03:00.0: DMAR: Allocating 1-page iova failed hpsa 0000:03:00.0: DMAR: Allocating 1-page iova failed slab_out_of_memory: 66 callbacks suppressed SLUB: Unable to allocate memory on node -1, gfp=0xa20(GFP_ATOMIC) cache: iommu_iova, object size: 40, buffer size: 448, default order: 0, min order: 0 node 0: slabs: 1822, objs: 16398, free: 0 node 1: slabs: 2051, objs: 18459, free: 31 SLUB: Unable to allocate memory on node -1, gfp=0xa20(GFP_ATOMIC) cache: iommu_iova, object size: 40, buffer size: 448, default order: 0, min order: 0 node 0: slabs: 1822, objs: 16398, free: 0 node 1: slabs: 2051, objs: 18459, free: 31 SLUB: Unable to allocate memory on node -1, gfp=0xa20(GFP_ATOMIC) cache: iommu_iova, object size: 40, buffer size: 448, default order: 0, min order: 0 SLUB: Unable to allocate memory on node -1, gfp=0xa20(GFP_ATOMIC) SLUB: Unable to allocate memory on node -1, gfp=0xa20(GFP_ATOMIC) SLUB: Unable to allocate memory on node -1, gfp=0xa20(GFP_ATOMIC) SLUB: Unable to allocate memory on node -1, gfp=0xa20(GFP_ATOMIC) SLUB: Unable to allocate memory on node -1, gfp=0xa20(GFP_ATOMIC) cache: skbuff_head_cache, object size: 208, buffer size: 640, default order: 0, min order: 0 cache: skbuff_head_cache, object size: 208, buffer size: 640, default order: 0, min order: 0 cache: skbuff_head_cache, object size: 208, buffer size: 640, default order: 0, min order: 0 cache: skbuff_head_cache, object size: 208, buffer size: 640, default order: 0, min order: 0 node 0: slabs: 697, objs: 4182, free: 0 node 0: slabs: 697, objs: 4182, free: 0 node 0: slabs: 697, objs: 4182, free: 0 node 0: slabs: 697, objs: 4182, free: 0 node 1: slabs: 381, objs: 2286, free: 27 node 1: slabs: 381, objs: 2286, free: 27 node 1: slabs: 381, objs: 2286, free: 27 node 1: slabs: 381, objs: 2286, free: 27 node 0: slabs: 1822, objs: 16398, free: 0 cache: skbuff_head_cache, object size: 208, buffer size: 640, default order: 0, min order: 0 node 1: slabs: 2051, objs: 18459, free: 31 node 0: slabs: 697, objs: 4182, free: 0 SLUB: Unable to allocate memory on node -1, gfp=0xa20(GFP_ATOMIC) node 1: slabs: 381, objs: 2286, free: 27 cache: skbuff_head_cache, object size: 208, buffer size: 640, default order: 0, min order: 0 node 0: slabs: 697, objs: 4182, free: 0 node 1: slabs: 381, objs: 2286, free: 27 hpsa 0000:03:00.0: DMAR: Allocating 1-page iova failed warn_alloc: 96 callbacks suppressed kworker/11:1H: page allocation failure: order:0, mode:0xa20(GFP_ATOMIC), nodemask=(null),cpuset=/,mems_allowed=0-1 CPU: 11 PID: 1642 Comm: kworker/11:1H Tainted: G B Hardware name: HP ProLiant XL420 Gen9/ProLiant XL420 Gen9, BIOS U19 12/27/2015 Workqueue: kblockd blk_mq_run_work_fn Call Trace: dump_stack+0xa0/0xea warn_alloc.cold.94+0x8a/0x12d __alloc_pages_slowpath+0x1750/0x1870 __alloc_pages_nodemask+0x58a/0x710 alloc_pages_current+0x9c/0x110 alloc_slab_page+0xc9/0x760 allocate_slab+0x48f/0x5d0 new_slab+0x46/0x70 ___slab_alloc+0x4ab/0x7b0 __slab_alloc+0x43/0x70 kmem_cache_alloc+0x2dd/0x450 SLUB: Unable to allocate memory on node -1, gfp=0xa20(GFP_ATOMIC) alloc_iova+0x33/0x210 cache: skbuff_head_cache, object size: 208, buffer size: 640, default order: 0, min order: 0 node 0: slabs: 697, objs: 4182, free: 0 alloc_iova_fast+0x62/0x3d1 node 1: slabs: 381, objs: 2286, free: 27 intel_alloc_iova+0xce/0xe0 intel_map_sg+0xed/0x410 scsi_dma_map+0xd7/0x160 scsi_queue_rq+0xbf7/0x1310 blk_mq_dispatch_rq_list+0x4d9/0xbc0 blk_mq_sched_dispatch_requests+0x24a/0x300 __blk_mq_run_hw_queue+0x156/0x230 blk_mq_run_work_fn+0x3b/0x40 process_one_work+0x579/0xb90 worker_thread+0x63/0x5b0 kthread+0x1e6/0x210 ret_from_fork+0x3a/0x50 Mem-Info: active_anon:2422723 inactive_anon:361971 isolated_anon:34403 active_file:2285 inactive_file:1838 isolated_file:0 unevictable:0 dirty:1 writeback:5 unstable:0 slab_reclaimable:13972 slab_unreclaimable:453879 mapped:2380 shmem:154 pagetables:6948 bounce:0 free:19133 free_pcp:7363 free_cma:0 Signed-off-by: Qian Cai Signed-off-by: Joerg Roedel commit d0432345b4b57680eb441aa014fbb91d710b86ee Author: Krzysztof Kozlowski Date: Thu Nov 21 04:19:30 2019 +0100 iommu: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Joerg Roedel commit 966b753cf3969553ca50bacd2b8c4ddade5ecc9e Author: Suravee Suthikulpanit Date: Wed Nov 20 07:55:49 2019 -0600 iommu/amd: Only support x2APIC with IVHD type 11h/40h Current implementation for IOMMU x2APIC support makes use of the MMIO access to MSI capability block registers, which requires checking EFR[MsiCapMmioSup]. However, only IVHD type 11h/40h contain the information, and not in the IVHD type 10h IOMMU feature reporting field. Since the BIOS in newer systems, which supports x2APIC, would normally contain IVHD type 11h/40h, remove the IOMMU_FEAT_XTSUP_SHIFT check for IVHD type 10h, and only support x2APIC with IVHD type 11h/40h. Fixes: 66929812955b ('iommu/amd: Add support for X2APIC IOMMU interrupts') Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel commit 813071438e83d338ba5cfe98b3b26c890dc0a6c0 Author: Suravee Suthikulpanit Date: Wed Nov 20 07:55:48 2019 -0600 iommu/amd: Check feature support bit before accessing MSI capability registers The IOMMU MMIO access to MSI capability registers is available only if the EFR[MsiCapMmioSup] is set. Current implementation assumes this bit is set if the EFR[XtSup] is set, which might not be the case. Fix by checking the EFR[MsiCapMmioSup] before accessing the MSI address low/high and MSI data registers via the MMIO. Fixes: 66929812955b ('iommu/amd: Add support for X2APIC IOMMU interrupts') Signed-off-by: Suravee Suthikulpanit Signed-off-by: Joerg Roedel commit 387caf0b759ac437a65ad5d59665558025f350fc Author: Adrian Huang Date: Thu Nov 14 14:14:47 2019 +0800 iommu/amd: Treat per-device exclusion ranges as r/w unity-mapped regions Some buggy BIOSes might define multiple exclusion ranges of the IVMD entries which are associated with the same IOMMU hardware. This leads to the overwritten exclusion range (exclusion_start and exclusion_length members) in set_device_exclusion_range(). Here is a real case: When attaching two Broadcom RAID controllers to a server, the first one reports the failure during booting (the disks connecting to the RAID controller cannot be detected). This patch prevents the issue by treating per-device exclusion ranges as r/w unity-mapped regions. Discussion: * https://lists.linuxfoundation.org/pipermail/iommu/2019-November/040140.html Suggested-by: Joerg Roedel Signed-off-by: Adrian Huang Signed-off-by: Joerg Roedel commit 1ea27ee2f76e67f98b9942988f1336a70d351317 Author: Will Deacon Date: Thu Dec 19 12:03:52 2019 +0000 iommu/arm-smmu: Update my email address in MODULE_AUTHOR() I no longer work for Arm, so update the stale reference to my old email address. Signed-off-by: Will Deacon Tested-by: John Garry # smmu v3 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Joerg Roedel commit cd221bd24ff5567bbcc11ec0c303141a7c2b71bf Author: Will Deacon Date: Thu Dec 19 12:03:51 2019 +0000 iommu/arm-smmu: Allow building as a module By conditionally dropping support for the legacy binding and exporting the newly introduced 'arm_smmu_impl_init()' function we can allow the ARM SMMU driver to be built as a module. Signed-off-by: Will Deacon Tested-by: John Garry # smmu v3 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Joerg Roedel commit 7359572e1a5d4280ad87b969b0d30be43ef4989a Author: Will Deacon Date: Thu Dec 19 12:03:50 2019 +0000 iommu/arm-smmu: Unregister IOMMU and bus ops on device removal When removing the SMMU driver, we need to clear any state that we registered during probe. This includes our bus ops, sysfs entries and the IOMMU device registered for early firmware probing of masters. Signed-off-by: Will Deacon Tested-by: John Garry # smmu v3 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Joerg Roedel commit 2852ad05e3e9c97bfd14f1f480ee45128424c143 Author: Will Deacon Date: Thu Dec 19 12:03:49 2019 +0000 iommu/arm-smmu-v3: Allow building as a module By removing the redundant call to 'pci_request_acs()' we can allow the ARM SMMUv3 driver to be built as a module. Signed-off-by: Will Deacon Tested-by: John Garry # smmu v3 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Joerg Roedel commit d3daf66621b9dd5749d4661ace74afb84d3d465e Author: Ard Biesheuvel Date: Thu Dec 19 12:03:48 2019 +0000 iommu/arm-smmu: Support SMMU module probing from the IORT Add support for SMMU drivers built as modules to the ACPI/IORT device probing path, by deferring the probe of the master if the SMMU driver is known to exist but has not been loaded yet. Given that the IORT code registers a platform device for each SMMU that it discovers, we can easily trigger the udev based autoloading of the SMMU drivers by making the platform device identifier part of the module alias. Reviewed-by: Robin Murphy Acked-by: Lorenzo Pieralisi Tested-by: John Garry # only manual smmu ko loading Signed-off-by: Ard Biesheuvel Signed-off-by: Will Deacon Tested-by: John Garry # smmu v3 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Joerg Roedel commit ab246774713e9042d7c79c61168c73796b2a3961 Author: Will Deacon Date: Thu Dec 19 12:03:47 2019 +0000 iommu/arm-smmu-v3: Unregister IOMMU and bus ops on device removal When removing the SMMUv3 driver, we need to clear any state that we registered during probe. This includes our bus ops, sysfs entries and the IOMMU device registered for early firmware probing of masters. Signed-off-by: Will Deacon Tested-by: John Garry # smmu v3 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Joerg Roedel commit 34debdca68efd5625a2fcea7df1a215591a01f80 Author: Will Deacon Date: Thu Dec 19 12:03:46 2019 +0000 iommu/arm-smmu: Prevent forced unbinding of Arm SMMU drivers Forcefully unbinding the Arm SMMU drivers is a pretty dangerous operation, since it will likely lead to catastrophic failure for any DMA devices mastering through the SMMU being unbound. When the driver then attempts to "handle" the fatal faults, it's very easy to trip over dead data structures, leading to use-after-free. On John's machine, he reports that the machine was "unusable" due to loss of the storage controller following a forced unbind of the SMMUv3 driver: | # cd ./bus/platform/drivers/arm-smmu-v3 | # echo arm-smmu-v3.0.auto > unbind | hisi_sas_v2_hw HISI0162:01: CQE_AXI_W_ERR (0x800) found! | platform arm-smmu-v3.0.auto: CMD_SYNC timeout at 0x00000146 | [hwprod 0x00000146, hwcons 0x00000000] Prevent this forced unbinding of the drivers by setting "suppress_bind_attrs" to true. Link: https://lore.kernel.org/lkml/06dfd385-1af0-3106-4cc5-6a5b8e864759@huawei.com Reported-by: John Garry Signed-off-by: Will Deacon Tested-by: John Garry # smmu v3 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Joerg Roedel commit b06c076ea96258f31eabd2987a14193883b3641e Author: Will Deacon Date: Thu Dec 19 12:03:45 2019 +0000 Revert "iommu/arm-smmu: Make arm-smmu explicitly non-modular" This reverts commit addb672f200f4e99368270da205320b83efe01a0. Let's get the SMMU driver building as a module, which means putting back some dead code that we used to carry. Signed-off-by: Will Deacon Tested-by: John Garry # smmu v3 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Joerg Roedel commit 6e8fa7404c13ca0497f3ad40e0f37bf08bf6795c Author: Will Deacon Date: Thu Dec 19 12:03:44 2019 +0000 Revert "iommu/arm-smmu: Make arm-smmu-v3 explicitly non-modular" This reverts commit c07b6426df922d21a13a959cf785d46e9c531941. Let's get the SMMUv3 driver building as a module, which means putting back some dead code that we used to carry. Signed-off-by: Will Deacon Tested-by: John Garry # smmu v3 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Joerg Roedel commit 4312cf7f16c8d43e154bf2a6eea6d1e9347c922c Author: Will Deacon Date: Thu Dec 19 12:03:43 2019 +0000 drivers/iommu: Allow IOMMU bus ops to be unregistered 'bus_set_iommu()' allows IOMMU drivers to register their ops for a given bus type. Unfortunately, it then doesn't allow them to be removed, which is necessary for modular drivers to shutdown cleanly so that they can be reloaded later on. Allow 'bus_set_iommu()' to take a NULL 'ops' argument, which clear the ops pointer for the selected bus_type. Signed-off-by: Will Deacon Tested-by: John Garry # smmu v3 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Joerg Roedel commit 386dce2788eef626aaaa6a3ca32809ea7904581b Author: Will Deacon Date: Thu Dec 19 12:03:42 2019 +0000 iommu/of: Take a ref to the IOMMU driver during ->of_xlate() Ensure that we hold a reference to the IOMMU driver module while calling the '->of_xlate()' callback during early device probing. Signed-off-by: Will Deacon Tested-by: John Garry # smmu v3 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Joerg Roedel commit 25f003de987aed630db265ceae9cd978537a3f80 Author: Will Deacon Date: Thu Dec 19 12:03:41 2019 +0000 drivers/iommu: Take a ref to the IOMMU driver prior to ->add_device() To avoid accidental removal of an active IOMMU driver module, take a reference to the driver module in 'iommu_probe_device()' immediately prior to invoking the '->add_device()' callback and hold it until the after the device has been removed by '->remove_device()'. Suggested-by: Joerg Roedel Signed-off-by: Will Deacon Tested-by: John Garry # smmu v3 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Joerg Roedel commit 1a373a78b8e2fae1d61dd9c5ed22472045d83d24 Author: Will Deacon Date: Thu Dec 19 12:03:40 2019 +0000 PCI: Export pci_ats_disabled() as a GPL symbol to modules Building drivers for ATS-aware IOMMUs as modules requires access to pci_ats_disabled(). Export it as a GPL symbol to get things working. Acked-by: Bjorn Helgaas Signed-off-by: Will Deacon Tested-by: John Garry # smmu v3 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Joerg Roedel commit bb950bca5d522119f8b9ce3f6cbac4841c6d6517 Author: Greg Kroah-Hartman Date: Thu Dec 19 12:03:39 2019 +0000 PCI/ATS: Restore EXPORT_SYMBOL_GPL() for pci_{enable,disable}_ats() Commit d355bb209783 ("PCI/ATS: Remove unnecessary EXPORT_SYMBOL_GPL()") unexported a bunch of symbols from the PCI core since the only external users were non-modular IOMMU drivers. Although most of those symbols can remain private for now, 'pci_{enable,disable_ats()' is required for the ARM SMMUv3 driver to build as a module, otherwise we get a build failure as follows: | ERROR: "pci_enable_ats" [drivers/iommu/arm-smmu-v3.ko] undefined! | ERROR: "pci_disable_ats" [drivers/iommu/arm-smmu-v3.ko] undefined! Re-export these two functions so that the ARM SMMUv3 driver can be build as a module. Cc: Bjorn Helgaas Cc: Joerg Roedel Signed-off-by: Greg Kroah-Hartman [will: rewrote commit message] Signed-off-by: Will Deacon Tested-by: John Garry # smmu v3 Reviewed-by: Greg Kroah-Hartman Acked-by: Bjorn Helgaas Signed-off-by: Joerg Roedel commit 6bf6c24720d33ac239f7207b8b3a8d7bd9d2d691 Author: Will Deacon Date: Thu Dec 19 12:03:38 2019 +0000 iommu/of: Request ACS from the PCI core when configuring IOMMU linkage To avoid having to export 'pci_request_acs()' to modular IOMMU drivers, move the call into the 'of_dma_configure()' path in a similar manner to the way in which ACS is configured when probing via ACPI/IORT. Signed-off-by: Will Deacon Tested-by: John Garry # smmu v3 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Joerg Roedel commit a7ba5c3d008dd78d881a1658eae5a2275ebd5087 Author: Will Deacon Date: Thu Dec 19 12:03:37 2019 +0000 drivers/iommu: Export core IOMMU API symbols to permit modular drivers Building IOMMU drivers as modules requires that the core IOMMU API symbols are exported as GPL symbols. Signed-off-by: Will Deacon Tested-by: John Garry # smmu v3 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Joerg Roedel commit 76f9764cc3d538435262dea885bf69fac2415402 Author: Chris Wilson Date: Sun Dec 22 21:02:55 2019 +0000 drm/i915: Introduce a vma.kref Start introducing a kref on i915_vma in order to protect the vma unbind (i915_gem_object_unbind) from a parallel destruction (i915_vma_parked). Later, we will use the refcount to manage all access and turn i915_vma into a first class container. Signed-off-by: Chris Wilson Cc: Imre Deak Acked-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20191222210256.2066451-2-chris@chris-wilson.co.uk commit f5af1659d809e264d619e5f483fd8f47bced3b6a Author: Chris Wilson Date: Sun Dec 22 21:02:54 2019 +0000 drm/i915: Add a simple is-bound check before unbinding Only acquire the various atomic references required to unbind the vma if we do need to unbind the vma. Signed-off-by: Chris Wilson Acked-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20191222210256.2066451-1-chris@chris-wilson.co.uk commit 398d999f96bf8e02573b0c7e32896c7812393bc0 Merge: a5a985542066 46cf053efec6 Author: Greg Kroah-Hartman Date: Mon Dec 23 07:00:09 2019 -0500 Merge 5.5-rc3 into staging-next We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 749e4121d6ee7fd4495779730fbc6ae800d0317c Merge: 293f89959483 46cf053efec6 Author: Greg Kroah-Hartman Date: Mon Dec 23 06:59:19 2019 -0500 Merge 5.5-rc3 into tty-next We need the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 8757dc970f550dc399f899be0e7a2c00b7e82e8f Author: Omar Sandoval Date: Fri Dec 20 08:22:49 2019 -0800 x86/crash: Define arch_crash_save_vmcoreinfo() if CONFIG_CRASH_CORE=y On x86 kernels configured with CONFIG_PROC_KCORE=y and CONFIG_KEXEC_CORE=n, the vmcoreinfo note in /proc/kcore is incomplete. Specifically, it is missing arch-specific information like the KASLR offset and whether 5-level page tables are enabled. This breaks applications like drgn [1] and crash [2], which need this information for live debugging via /proc/kcore. This happens because: 1. CONFIG_PROC_KCORE selects CONFIG_CRASH_CORE. 2. kernel/crash_core.c (compiled if CONFIG_CRASH_CORE=y) calls arch_crash_save_vmcoreinfo() to get the arch-specific parts of vmcoreinfo. If it is not defined, then it uses a no-op fallback. 3. x86 defines arch_crash_save_vmcoreinfo() in arch/x86/kernel/machine_kexec_*.c, which is only compiled if CONFIG_KEXEC_CORE=y. Therefore, an x86 kernel with CONFIG_CRASH_CORE=y and CONFIG_KEXEC_CORE=n uses the no-op fallback and gets incomplete vmcoreinfo data. This isn't relevant to kdump, which requires CONFIG_KEXEC_CORE. It only affects applications which read vmcoreinfo at runtime, like the ones mentioned above. Fix it by moving arch_crash_save_vmcoreinfo() into two new arch/x86/kernel/crash_core_*.c files, which are gated behind CONFIG_CRASH_CORE. 1: https://github.com/osandov/drgn/blob/73dd7def1217e24cc83d8ca95c995decbd9ba24c/libdrgn/program.c#L385 2: https://github.com/crash-utility/crash/commit/60a42d709280cdf38ab06327a5b4fa9d9208ef86 Signed-off-by: Omar Sandoval Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Greg Kroah-Hartman Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Kairui Song Cc: Lianbo Jiang Cc: Masahiro Yamada Cc: "Peter Zijlstra (Intel)" Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/0589961254102cca23e3618b96541b89f2b249e2.1576858905.git.osandov@fb.com commit eb1488360c7d66955ff6e0b07049a22f553efaf3 Merge: ea81896dc98f 46cf053efec6 Author: Greg Kroah-Hartman Date: Mon Dec 23 06:58:02 2019 -0500 Merge 5.5-rc3 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 4941f35b48f7f329bdf2ccad17d6fdb2190f8d34 Author: Imre Deak Date: Sat Dec 21 14:05:43 2019 +0200 drm/i915: Make sure CCS YUV semiplanar format checks work For CCS formats, the current DRM core check for YUV semiplanar formats doesn't work; use an i915 specific function for that. v2: Fix checkpatch warnings. Cc: Dhinakaran Pandiyan Cc: Ville Syrjälä Cc: Mika Kahola Signed-off-by: Imre Deak Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20191221120543.22816-11-imre.deak@intel.com commit 320625aac3c427118c8675404e01914ff51924cd Author: Imre Deak Date: Sat Dec 21 14:05:42 2019 +0200 drm/i915: Make sure Y slave planes get all the required state Y planes program the offset and stride of the AUX plane, so make sure we copy the required info for this into their plane state. Cc: Maarten Lankhorst Cc: Ville Syrjälä Cc: Dhinakaran Pandiyan Cc: Mika Kahola Signed-off-by: Imre Deak Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20191221120543.22816-10-imre.deak@intel.com commit 931cd348bb8dc9374b9561846be149bfae7571b6 Author: Dhinakaran Pandiyan Date: Sat Dec 21 14:05:41 2019 +0200 drm/i915: Skip rotated offset adjustment for unsupported modifiers During framebuffer creation, we pre-compute offsets for 90/270 plane rotation. However, only Y and Yf modifiers support 90/270 rotation. So, skip the calculations for other modifiers. To keep the gem buffer size check still working for tiled planes, factor out the logic needed for rotation setup and skip only this part for tiled planes other than Y/Yf. v2: Add a bounds check WARN for the rotation info array. v3: Keep the gem buffer size check working for tiled planes. Cc: Matt Roper Cc: Ville Syrjälä Cc: Mika Kahola Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Imre Deak Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20191221120543.22816-9-imre.deak@intel.com commit 71df86f0fbf5046a68a2adaaba98feee2f6e22d1 Author: Imre Deak Date: Sat Dec 21 14:05:40 2019 +0200 drm/i915/tgl: Make sure FBs have a correct CCS plane stride The CCS plane stride must be fixed on TGL, as it's not configurable for the display. Instead the HW has a hardwired logic to determine it from the main plane stride. Make sure userspace passes in the correct stride. Cc: Dhinakaran Pandiyan Cc: Ville Syrjälä Cc: Mika Kahola Signed-off-by: Imre Deak Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20191221120543.22816-8-imre.deak@intel.com commit b3e57bccd68a166f1a0e40e482b5645af15525b4 Author: Dhinakaran Pandiyan Date: Sat Dec 21 14:05:39 2019 +0200 drm/i915/tgl: Gen-12 render decompression Gen-12 display decompression operates on Y-tiled compressed main surface. The CCS is linear and has 4 bits of metadata for each main surface cache line pair, a size ratio of 1:256. Gen-12 display decompression is incompatible with buffers compressed by earlier GPUs, so make use of a new modifier to identify gen-12 compression. Another notable change is that render decompression is supported on all planes except cursor and on all pipes. Start by adding render decompression support for [A,X]BGR888 pixel formats. v2: Fix checkpatch warnings (Lucas) v3: Rebase, disable color clear, styling changes and modify intel_tile_width_bytes and intel_tile_height to handle linear CCS v4: - Use format block descriptors and the i915 specific func to get the subsampling for each color plane. - Use helpers to convert between CCS and main planes. v5: - Fix subsampling returned by intel_fb_plane_get_subsampling() for the CCS plane of the first plane. v6: - Rebased on v2 of patch 4. v7: - Fix plane dimensions during FB check. Cc: Ville Syrjälä Cc: Matt Roper Cc: Nanley G Chery Cc: Jason Ekstrand Cc: Radhakrishna Sripada Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Lucas De Marchi Signed-off-by: Imre Deak Reviewed-by: Radhakrishna Sripada (v6) Link: https://patchwork.freedesktop.org/patch/msgid/20191221120543.22816-7-imre.deak@intel.com commit 55656505dc55481d862b7ff81aba69a002e39159 Author: Dhinakaran Pandiyan Date: Sat Dec 21 14:05:38 2019 +0200 drm/framebuffer: Format modifier for Intel Gen-12 render compression Gen-12 has a new compression format, add a new modifier to indicate that. Cc: Ville Syrjälä Cc: Matt Roper Cc: Nanley G Chery Cc: Jason Ekstrand Cc: Mika Kahola Cc: dri-devel@lists.freedesktop.org Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Lucas De Marchi Signed-off-by: Imre Deak Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20191221120543.22816-6-imre.deak@intel.com commit e7af9094579474912ac7ea2d2f2434c4df2fd5e6 Author: Imre Deak Date: Sat Dec 21 14:05:37 2019 +0200 drm/i915: Add helpers to select correct ccs/aux planes Using helpers instead of open coding this to select a CCS plane for a main plane makes the code cleaner and less error-prone when the location of CCS plane can be different based on the format (packed vs. YUV semiplanar). The same applies to selecting an AUX plane which can be a UV plane (for an uncompressed YUV semiplanar format), or a CCS plane. Cc: Dhinakaran Pandiyan Cc: Ville Syrjälä Cc: Mika Kahola Cc: Matt Roper Signed-off-by: Imre Deak Reviewed-by: Mika Kahola Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191221120543.22816-5-imre.deak@intel.com commit 13f2cb9a280054c9c95c694a8837fd0828b03853 Author: Dhinakaran Pandiyan Date: Sat Dec 21 14:05:36 2019 +0200 drm/i915: Extract framebufer CCS offset checks into a function intel_fill_fb_info() has grown quite large and wrapping the offset checks into a separate function makes the loop a bit easier to follow. v2: Skip the check for non-CCS planes. (Mika) Cc: Ville Syrjälä Cc: Matt Roper Cc: Mika Kahola Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Imre Deak Reviewed-by: Mika Kahola Link: https://patchwork.freedesktop.org/patch/msgid/20191221120543.22816-4-imre.deak@intel.com commit 86f236bbbd880edb6e7224d121134378a8ef770e Author: Dhinakaran Pandiyan Date: Sat Dec 21 14:05:35 2019 +0200 drm/i915: Move CCS stride alignment W/A inside intel_fb_stride_alignment Easier to read if all the alignment changes are in one place and contained within a function. Cc: Ville Syrjälä Cc: Matt Roper Cc: Mika Kahola Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Imre Deak Reviewed-by: Mika Kahola Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191221120543.22816-3-imre.deak@intel.com commit 021a411684c808aa4e5c9fa7103c704d5f381a8b Author: Dhinakaran Pandiyan Date: Sat Dec 21 14:05:34 2019 +0200 drm/i915: Use intel_tile_height() instead of re-implementing intel_tile_dims() computes tile height using size and width, when there is already a function to do just that - intel_tile_height() Cc: Ville Syrjälä Cc: Matt Roper Cc: Mika Kahola Signed-off-by: Dhinakaran Pandiyan Signed-off-by: Imre Deak Reviewed-by: Mika Kahola Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191221120543.22816-2-imre.deak@intel.com commit 3531c4023cb5ba6adb38f6904201dc2bca8bb686 Author: Jani Nikula Date: Thu Dec 19 17:56:51 2019 +0200 drm/i915/selftests: make mock_drm.h self-contained Needs i915_drv.h because i915 gets dereferenced. Cc: Chris Wilson Cc: Masahiro Yamada Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191219155652.2666-2-jani.nikula@intel.com commit a6458951750fb43b8fdd3a06aaedff12f9df5e1a Author: Jani Nikula Date: Thu Dec 19 17:56:50 2019 +0200 drm/i915/selftests: make mock_context.h self-contained Fix the forward declaration. Cc: Chris Wilson Cc: Masahiro Yamada Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191219155652.2666-1-jani.nikula@intel.com commit d53f9b68b359cb53076e32030e0cfc2a6fcfcbaf Author: Nobuhiro Iwamatsu Date: Wed Dec 18 17:25:53 2019 +0900 rtc: pcf8563: Use BIT Replace (1 << ...) with BIT(). CC: Alessandro Zummo CC: Alexandre Belloni Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20191218082553.3309554-1-iwamatsu@nigauri.org Signed-off-by: Alexandre Belloni commit 7dc679ef2558a0306647a4f72eb4c25c634f787c Author: Nobuhiro Iwamatsu Date: Wed Dec 18 17:28:36 2019 +0900 rtc: moxart: Convert to SPDX identifier Use SPDX-License-Identifier instead of a verbose license text. CC: Alessandro Zummo CC: Alexandre Belloni CC: Jonas Jensen Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20191218082836.3309808-1-iwamatsu@nigauri.org Signed-off-by: Alexandre Belloni commit d6e62e7f106fba64041f02d24110ccebea9b7d2b Author: Nobuhiro Iwamatsu Date: Wed Dec 18 17:19:17 2019 +0900 rtc: ds1343: Remove unused struct spi_device in struct ds1343_priv struct spi_device in struct ds1343_priv is not used, remove it. CC: Alessandro Zummo CC: Alexandre Belloni CC: Raghavendra Chandra Ganiga CC: Ankur Srivastava Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20191218081917.3308211-1-iwamatsu@nigauri.org Signed-off-by: Alexandre Belloni commit 47a3c048373b8ba441075122e04f3617da0a611a Author: Nobuhiro Iwamatsu Date: Wed Dec 18 17:16:24 2019 +0900 rtc: rx8025: Remove struct i2c_client from struct rx8025_data struct i2c_client can be referenced from the device structure, so this doesn't need to have it in struct rx8025_data. Remove struct i2c_client from struct rx8025_data. CC: Alessandro Zummo CC: Alexandre Belloni CC: Wolfgang Grandegger Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20191218081624.3307752-1-iwamatsu@nigauri.org Signed-off-by: Alexandre Belloni commit e2ed7507ae89b92b67025f221448b543e2333b21 Author: Paul Kocialkowski Date: Thu Dec 12 16:31:11 2019 +0100 rtc: hym8563: Read the valid flag directly instead of caching it The RTC has a valid bit in the seconds register that indicates whether power was lost since the pevious time set. This bit is currently read once at probe time, cached and updated with set_time. Howeever, caching the bit may prevent detecting power loss at runtime (which can happen if the RTC's supply is distinct from the the platform's). Writing the seconds register when setting time will clear the bit, so there should be no downside in reading the bit directly instead of caching it. Signed-off-by: Paul Kocialkowski Link: https://lore.kernel.org/r/20191212153111.966923-2-paul.kocialkowski@bootlin.com Signed-off-by: Alexandre Belloni commit f236a2a2ebabad0848ad0995af7ad1dc7029e895 Author: Paul Kocialkowski Date: Thu Dec 12 16:31:10 2019 +0100 rtc: hym8563: Return -EINVAL if the time is known to be invalid The current code returns -EPERM when the voltage loss bit is set. Since the bit indicates that the time value is not valid, return -EINVAL instead, which is the appropriate error code for this situation. Fixes: dcaf03849352 ("rtc: add hym8563 rtc-driver") Signed-off-by: Paul Kocialkowski Link: https://lore.kernel.org/r/20191212153111.966923-1-paul.kocialkowski@bootlin.com Signed-off-by: Alexandre Belloni commit aeedfe7f89bc9b2248bfd509ffcd0c2bcb2614c3 Author: Nobuhiro Iwamatsu Date: Tue Dec 17 21:12:31 2019 +0900 rtc: rx8010: Fix return code for rx8010_probe In the current code, the return value of devm_request_threaded_irq may be returned. This fixes it. CC: Alessandro Zummo CC: Alexandre Belloni CC: Akshay Bhat Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20191217121231.2698817-2-iwamatsu@nigauri.org Signed-off-by: Alexandre Belloni commit de0505660f6b3cb3f5438be32397b63f5da87454 Author: zhengbin Date: Mon Dec 16 11:19:13 2019 +0800 rtc: omap: Remove unneeded semicolon Fixes coccicheck warning: drivers/rtc/rtc-omap.c:619:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1576466353-45384-1-git-send-email-zhengbin13@huawei.com Signed-off-by: Alexandre Belloni commit 62cbe63f58e774473214a02579d1745d7a85f0c1 Author: Chuhong Yuan Date: Sat Dec 14 15:45:28 2019 +0800 rtc: asm9260: add the missed check for devm_clk_get The driver misses a check for devm_clk_get(). Add the check to fix it. Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191214074528.16806-1-hslester96@gmail.com Signed-off-by: Alexandre Belloni commit bd0d937928d4696c9480d972cb09ec154bc2f6b0 Author: Alexandre Belloni Date: Mon Dec 23 11:01:08 2019 +0100 rtc: rv3029: remove useless error messages Remove redundant messages or messages that would not add any value because the information is already conveyed properly using errno. Link: https://lore.kernel.org/r/20191223100108.1083078-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit fc219291ea973e59bc29025565c25725958f89ce Author: Alexandre Belloni Date: Mon Dec 23 11:14:30 2019 +0100 rtc: rv3029: annotate init and exit functions rv30{2,4}9_register_driver and rv30{2,4}9_unregister_driver are only called from the init and exit functions of the module. Annotate them properly. Link: https://lore.kernel.org/r/20191223101430.1091572-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 8e99106c920ab64549a8a47bf994d3f5dfedc6b4 Author: Alexandre Belloni Date: Fri Dec 13 00:02:39 2019 +0100 rtc: rv3029: drop deprecated compatbiles The compatibles have been marked obsolete for more that 2 years, drop them now. Note that this doesn't currently prevent the driver from probing because the i2c core will still match using the i2c_device_id table. Link: https://lore.kernel.org/r/20191212230239.65784-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit ec923fcccf9b7d123f36f181b9088e1501b5a211 Author: Alexandre Belloni Date: Sat Dec 14 23:10:22 2019 +0100 rtc: rv3029: add nvram support Export the 8 byte RAM using nvmem. Link: https://lore.kernel.org/r/20191214221022.622482-17-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit f7fd23735f926f0161d03c5d1013626ff92c70a0 Author: Jani Nikula Date: Thu Dec 19 15:38:45 2019 +0200 drm/i915: fix comment for POWER_DOMAIN_TRANSCODER_VDSC_PW2 The power domain covers VDSC for DSI transcoder on ICL, and it's pedantically about pipe, not transcoder, on TGL. Reported-by: Vandita Kulkarni Cc: Vandita Kulkarni Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191219133845.9333-1-jani.nikula@intel.com commit 6dece0e99faa2aef6c21406dcd95e53d1a6f99d5 Author: Luca Coelho Date: Thu Oct 10 11:59:30 2019 +0300 iwlwifi: remove CSR registers abstraction We needed this abstraction for some CSR registers for IWL_DEVICE_22560, but that has been removed, so we don't need the abstraction anymore. Remove it. Signed-off-by: Luca Coelho commit b81b7bd02eda86ae3cb40eb594f5ccd6ca790d8b Author: Luca Coelho Date: Thu Oct 10 10:13:49 2019 +0300 iwlwifi: remove some outdated iwl22000 configurations A few configuration structures were either not referenced anymore or assigned to devices IDs that were not in use anymore. Remove them. Signed-off-by: Luca Coelho commit 0e00270863daaf803b32c0ff64b73dabdefd612a Author: Johannes Berg Date: Tue Oct 8 16:03:15 2019 +0200 iwlwifi: pcie: validate queue ID before array deref/bit ops Validate that the queue ID is in range before trying to use it as an index or for test_bit() - the previous bug showed that this has in fact happened, and it was lucky that we caught it there, had the bit been set then we'd have actually used the value despite being far out of range. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit cfdc20efebdc1dc918338818b10f1d95b58b2ca5 Author: Johannes Berg Date: Wed Oct 2 12:11:54 2019 +0200 iwlwifi: pcie: use partial pages if applicable If we have only 2k RBs like on the latest (AX210) hardware, then even on x86 where PAGE_SIZE is 4k we currently waste half of the memory. If this is the case, return partial pages from the allocator and track the offset in each RBD (to be able to find the data in them and remap them later.) This might also address other platforms with larger PAGE_SIZE by putting more RBs into a single large page. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit 80084e3591390367f56161a48b6818b3a3fd64df Author: Johannes Berg Date: Wed Oct 2 11:33:46 2019 +0200 iwlwifi: pcie: map only used part of RX buffers We don't need to map *everything* of the RX buffers, we won't use that much, map only the part we're going to use. This save some IOMMU space (if applicable and it can deal with that) and also prepares a bit for mapping partial pages for 2K buffers later. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit c042f0c77f3df39ac4d530f5720ed64ff2f38375 Author: Johannes Berg Date: Fri Sep 27 10:36:02 2019 +0200 iwlwifi: allocate more receive buffers for HE devices For HE-capable devices, we need to allocate more receive buffers as there could be 256 frames aggregated into a single A-MPDU, and then they might contain A-MSDUs as well. Until 22000 family, the devices are able to put multiple frames into a single RB and the default RB size is 4k, but starting from AX210 family this is no longer true. On the other hand, those newer devices only use 2k receive buffers (by default). Modify the code and configuration to allocate an appropriate number of RBs depending on the device capabilities: * 4096 for AX210 HE devices, which use 2k buffers by default, * 2048 for 22000 family devices which use 4k buffers by default, * 512 for existing 9000 family devices, which doesn't really change anything since that's the default before this patch, * 512 also for AX210/22000 family devices that don't do HE. Theoretically, for devices lower than AX210, we wouldn't have to allocate that many RBs if the RB size was manually increased, but to support that the code got more complex, and it didn't really seem necessary as that's a use case for monitor mode only, where hopefully the wasted memory isn't really much of a concern. Note that AX210 devices actually support bigger than 12-bit VID, which is required here as we want to allocate 4096 buffers plus some for quick recycling, so adjust the code for that as well. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit b1a6db1320e94bc8e924918fc236b5df97c1cca7 Author: Avraham Stern Date: Wed Oct 2 13:44:27 2019 +0300 iwlwifi: mvm: add support for responder config command version 7 The new API requires the driver to config the supported frame format (legacy, HT, VHT etc.). Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho commit b59ec4cac5160370d908c60934e799bc6da7d784 Author: Avraham Stern Date: Wed Oct 2 12:20:32 2019 +0300 iwlwifi: mvm: add support for location range request version 8 The new API requires the driver to set the frame format (legacy, HT, VHT etc.) to be used for the measurement. The new API also supports 11az and secured measurement, but these are not supported by the driver for now. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho commit 537c00e3a73cc638c82594fbf969f7435eb864bd Author: Martin Kepplinger Date: Mon Dec 23 09:12:52 2019 +0100 arm64: dts: imx8mq-librem5-devkit: add accelerometer and gyro sensor Now that there is driver support, describe the accel and gyro sensor parts of the LSM9DS1 IMU. Signed-off-by: Martin Kepplinger Reviewed-by: Guido Günther Signed-off-by: Shawn Guo commit 90f0d7026f84e56d85303d827dfbfc7a8da1dfa8 Author: Adam Ford Date: Wed Dec 18 07:06:16 2019 -0600 arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM Both the i.MX8MQ and i.MX8M Mini support the CAAM driver, but it is currently not enabled by default. This patch enables this as a module. Signed-off-by: Adam Ford Reviewed-by: Horia Geantă Signed-off-by: Shawn Guo commit bff5b97237322138c22b565c2b351d0cd88bb3cf Author: Adam Ford Date: Wed Dec 18 07:06:15 2019 -0600 arm64: dts: imx8mm: Add Crypto CAAM support The i.MX8M Mini supports the same crypto engine as what is in the i.MX8MQ, but it is not currently present in the device tree. This patch places it into the device tree. Signed-off-by: Adam Ford Reviewed-by: Horia Geantă Signed-off-by: Shawn Guo commit 20f5a659554a6e684da0806939bddf8f6537e936 Author: 周琰杰 (Zhou Yanjie) Date: Tue Dec 17 21:59:00 2019 +0800 dmaengine: JZ4780: Add support for the X1830. Add support for probing the dma-jz4780 driver on the X1830 Soc. Signed-off-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/1576591140-125668-4-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Vinod Koul commit b98900548b8db965990691716c117b738eaa9d5a Author: 周琰杰 (Zhou Yanjie) Date: Tue Dec 17 21:58:59 2019 +0800 dt-bindings: dmaengine: Add X1830 bindings. Add the dmaengine bindings for the X1830 Soc from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/1576591140-125668-3-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Vinod Koul commit 6eca4d1f58ff2f3275700a9010e353ebbb87646f Author: Marco Antonio Franchi Date: Tue Dec 17 13:36:17 2019 +0000 arm64: dts: freescale: add initial support for Google i.MX 8MQ Phanbell This patch adds the device tree to support Google Coral Edge TPU, historicaly named as fsl-imx8mq-phanbell, a computer on module which can be used for AI/ML propose. It introduces a minimal enablement support for this module and was totally based on the NXP i.MX 8MQ EVK board and i.MX 8MQ Phanbell Google Source Code for Coral Edge TPU Mendel release: https://coral.googlesource.com/linux-imx/ Tested components: - PMIC; - USB-C OTG; - USB-C PWR; - micro-USB; - USB. Signed-off-by: Marco Franchi Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit a59666337f3b7c5c8721ce2d03c622bbe211aae5 Author: Marco Antonio Franchi Date: Tue Dec 17 13:36:14 2019 +0000 dt-bindings: arm: Add Google Coral Edge TPU entry Add Google Coral Edge TPU, named as imx8mq-phanbell, to the imx8mq supported devices. Signed-off-by: Marco Franchi Reviewed-by: Fabio Estevam Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 06e38f132f74b238b1ebd3607d6473a54ea61f66 Author: Fabio Estevam Date: Fri Dec 13 10:58:38 2019 -0300 ARM: imx_v6_v7_defconfig: Select the TFP410 driver Some boards like imx51-babbage, imx53-cx9020 and imx6q-utilite-pro have a TFP410 DVI bridge chip. Select its driver by default. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit ec1c36382ba132f88142ac7c059c449769266cd2 Author: Fabio Estevam Date: Fri Dec 13 10:58:37 2019 -0300 ARM: dts: imx51-babbage: Fix the DVI output description imx51-babbage has a TFP410 chip that receives 24-bit RGB parallel input and convert it to DVI. Fix the device tree description to reflect the real hardware. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit e1af00487dee3fad680f3a7ed24bb8698d923593 Author: Stefan Agner Date: Fri Dec 13 14:49:37 2019 +0100 ARM: dts: imx6qdl-apalis: mux HDMI CEC pin Mux the HDMI CEC pin to make HDMI CEC working. With this change HDMI CEC seems to work fine on a Apalis iMX6 on Ixora using cec-ctl. Signed-off-by: Stefan Agner Signed-off-by: Shawn Guo commit 00187f4911790dbc3745c94731edc53841d87335 Author: Yinbo Zhu Date: Fri Dec 13 10:18:38 2019 +0800 arm64: dts: ls1028a-rdb: enable emmc hs400 mode This patch is to enable emmc hs400 mode for ls1028ardb. Signed-off-by: Yinbo Zhu Acked-by: Yangbo Lu Signed-off-by: Shawn Guo commit bc6385dab125d20870f0eb9ca9e589f43abb3f56 Author: Ritesh Harjani Date: Thu Dec 12 11:25:57 2019 +0530 ext4: Move to shared i_rwsem even without dioread_nolock mount opt We were using shared locking only in case of dioread_nolock mount option in case of DIO overwrites. This mount condition is not needed anymore with current code, since:- 1. No race between buffered writes & DIO overwrites. Since buffIO writes takes exclusive lock & DIO overwrites will take shared locking. Also DIO path will make sure to flush and wait for any dirty page cache data. 2. No race between buffered reads & DIO overwrites, since there is no block allocation that is possible with DIO overwrites. So no stale data exposure should happen. Same is the case between DIO reads & DIO overwrites. 3. Also other paths like truncate is protected, since we wait there for any DIO in flight to be over. Reviewed-by: Jan Kara Tested-by: Joseph Qi Signed-off-by: Ritesh Harjani Link: https://lore.kernel.org/r/20191212055557.11151-4-riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o commit aa9714d0e39788d0688474c9d5f6a9a36159599f Author: Ritesh Harjani Date: Thu Dec 12 11:25:56 2019 +0530 ext4: Start with shared i_rwsem in case of DIO instead of exclusive Earlier there was no shared lock in DIO read path. But this patch (16c54688592ce: ext4: Allow parallel DIO reads) simplified some of the locking mechanism while still allowing for parallel DIO reads by adding shared lock in inode DIO read path. But this created problem with mixed read/write workload. It is due to the fact that in DIO path, we first start with exclusive lock and only when we determine that it is a ovewrite IO, we downgrade the lock. This causes the problem, since we still have shared locking in DIO reads. So, this patch tries to fix this issue by starting with shared lock and then switching to exclusive lock only when required based on ext4_dio_write_checks(). Other than that, it also simplifies below cases:- 1. Simplified ext4_unaligned_aio API to ext4_unaligned_io. Previous API was abused in the sense that it was not really checking for AIO anywhere also it used to check for extending writes. So this API was renamed and simplified to ext4_unaligned_io() which actully only checks if the IO is really unaligned. Now, in case of unaligned direct IO, iomap_dio_rw needs to do zeroing of partial block and that will require serialization against other direct IOs in the same block. So we take a exclusive inode lock for any unaligned DIO. In case of AIO we also need to wait for any outstanding IOs to complete so that conversion from unwritten to written is completed before anyone try to map the overlapping block. Hence we take exclusive inode lock and also wait for inode_dio_wait() for unaligned DIO case. Please note since we are anyway taking an exclusive lock in unaligned IO, inode_dio_wait() becomes a no-op in case of non-AIO DIO. 2. Added ext4_extending_io(). This checks if the IO is extending the file. 3. Added ext4_dio_write_checks(). In this we start with shared inode lock and only switch to exclusive lock if required. So in most cases with aligned, non-extending, dioread_nolock & overwrites, it tries to write with a shared lock. If not, then we restart the operation in ext4_dio_write_checks(), after acquiring exclusive lock. Reviewed-by: Jan Kara Tested-by: Joseph Qi Signed-off-by: Ritesh Harjani Link: https://lore.kernel.org/r/20191212055557.11151-3-riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o commit f629afe3369e9885fd6e9cc7a4f514b6a65cf9e9 Author: Ritesh Harjani Date: Thu Dec 12 11:25:55 2019 +0530 ext4: fix ext4_dax_read/write inode locking sequence for IOCB_NOWAIT Apparently our current rwsem code doesn't like doing the trylock, then lock for real scheme. So change our dax read/write methods to just do the trylock for the RWF_NOWAIT case. This seems to fix AIM7 regression in some scalable filesystems upto ~25% in some cases. Claimed in commit 942491c9e6d6 ("xfs: fix AIM7 regression") Reviewed-by: Jan Kara Reviewed-by: Matthew Bobrowski Tested-by: Joseph Qi Signed-off-by: Ritesh Harjani Link: https://lore.kernel.org/r/20191212055557.11151-2-riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o commit cf2834a5ed57562d6a1a8170724704149f0ae0a4 Author: Theodore Ts'o Date: Sat Dec 14 16:42:52 2019 -0500 ext4: treat buffers contining write errors as valid in ext4_sb_bread() In commit 7963e5ac9012 ("ext4: treat buffers with write errors as containing valid data") we missed changing ext4_sb_bread() to use ext4_buffer_uptodate(). So fix this oversight. Signed-off-by: Theodore Ts'o commit 869bf854291bfcd88287145bdedc27ab629d6f96 Author: Peng Ma Date: Thu Dec 12 03:38:15 2019 +0000 arm64: dts: ls1028a: Update edma compatible to fit eDMA driver The eDMA of LS1028A soc has a little bit different from others, So we should distinguish them in driver by compatible. Signed-off-by: Peng Ma Signed-off-by: Shawn Guo commit aebf07e63e417924b72a5680bac118052ca8d436 Author: Peng Fan Date: Thu Dec 12 03:19:25 2019 +0000 arm64: dts: imx8m: drop "fsl,aips-bus" and "fsl,imx8mq-aips-bus" There is no binding doc for these compatible string "fsl,imx8mq-aips-bus" and "fsl,aips-bus", "simple-bus" is enough for aips usage, so drop the upper two. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit b9ef22e1592f4e263ac6978892eb53863e0863ed Author: Peng Fan Date: Thu Dec 12 02:59:27 2019 +0000 clk: imx: imx8mq: Switch to clk_hw based API Switch the entire clk-imx8mq driver to clk_hw based API. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 9c71f9ea35d74a7c19379f6b31df3b247c22d159 Author: Peng Fan Date: Thu Dec 12 02:59:22 2019 +0000 clk: imx: imx8mm: Switch to clk_hw based API Switch the entire clk-imx8mm driver to clk_hw based API. This allows us to move closer to a clear split between consumer and provider clk APIs. Reviewed-by: Abel Vesa Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit daeb1454551460e5b88c2241983459c9fe45fbf2 Author: Peng Fan Date: Thu Dec 12 02:59:17 2019 +0000 clk: imx: imx8mn: Switch to clk_hw based API Switch the entire clk-imx8mn driver to clk_hw based API. This allows us to move closer to a clear split between consumer and provider clk APIs. Reviewed-by: Abel Vesa Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 44fa4710873f31f8718d86d5c8e1a2194d640ce6 Author: Peng Fan Date: Thu Dec 12 02:59:10 2019 +0000 clk: imx: Remove __init for imx_obtain_fixed_clk_hw() API Some of i.MX SoCs' clock driver will use platform driver model, and they need to call imx_obtain_fixed_clk_hw() API, so imx_obtain_fixed_clk_hw() API should NOT be in .init section. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 02cb0228e98c01e0e78c71ae4763317bd6fb9455 Author: Peng Fan Date: Thu Dec 12 02:59:04 2019 +0000 clk: imx: gate3: Switch to clk_hw based API Switch the imx_clk_hw_gate3_flags function to clk_hw based API, rename accordingly and add a macro for clk based legacy. This allows us to move closer to a clear split between consumer and provider clk APIs. Reviewed-by: Abel Vesa Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 3d43f1582c455433276d88828cdb9054bbecf2fe Author: Peng Fan Date: Thu Dec 12 02:59:00 2019 +0000 clk: imx: add hw API imx_clk_hw_mux2_flags Introduce hw based API imx_clk_hw_mux2_flags, then we could convert i.MX8MN clk driver to use hw based APIs. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 61f35728ba5e047b1802a0dc98da7a7262a95a32 Author: Peng Fan Date: Thu Dec 12 02:58:54 2019 +0000 clk: imx: add imx_unregister_hw_clocks There is a non hw API based imx_unregister_clocks to unregister clocks when of_clk_add_provider failed. Add a hw API based imx_unregister_hw_clocks when of_clk_add_hw_provider failed. Reviewed-by: Abel Vesa Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit a4b431f8038a67222fde888a48bcbd704d2daca0 Author: Peng Fan Date: Thu Dec 12 02:58:48 2019 +0000 clk: imx: clk-composite-8m: Switch to clk_hw based API Switch the imx8m_clk_hw_composite_flags function to clk_hw based API, rename accordingly and add a macro for clk based legacy. This allows us to move closer to a clear split between consumer and provider clk APIs. Reviewed-by: Abel Vesa Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 10c34b50f240d0e6507567e86b7bb1a79abd9ff0 Author: Peng Fan Date: Thu Dec 12 02:58:42 2019 +0000 clk: imx: clk-pll14xx: Switch to clk_hw based API Switch the imx_clk_pll14xx function to clk_hw based API, rename accordingly and add a macro for clk based legacy. This allows us to move closer to a clear split between consumer and provider clk APIs. Reviewed-by: Abel Vesa Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 2728c4a124a10e96891e93748471f8e2398c266f Author: Frieder Schrempf Date: Tue Dec 10 14:15:17 2019 +0000 arm64: dts: imx8mm: Add missing mux options for UART1 and UART2 signals According to the reference manual and the "Pins Tool" from NXP, the signals for UART1 and UART2 can be muxed to the SAI2 and SAI3 pads respectively. Let's add the missing options. Signed-off-by: Frieder Schrempf Acked-by: Rob Herring Signed-off-by: Shawn Guo commit b6828ffe30721c5874914a5df9828914779ee9b0 Author: Sascha Hauer Date: Tue Dec 10 12:27:37 2019 +0100 ARM: imx_v6_v7_defconfig: Enable NFS_V4_1 and NFS_V4_2 support Enable NFS_V4_1 and NFS_V4_2 to support NFS servers providing that protocol. Signed-off-by: Sascha Hauer Signed-off-by: Shawn Guo commit 0e8322dc5e5309cd5d70d1c19ad01f709366831d Author: Rabeeh Khoury Date: Mon Dec 16 12:41:25 2019 +0000 arm64: dts: lx2160a: add dts for CEX7 platforms The device tree enables the following features - 1. dpmac17 RGMII MAC connected to Atheros AR8035 phy 2. 2x MDIO busses 3. 2x USB 3.0 controllers 4. 4x SATA ports 5. MT35X 512Mb SPI flash 6. Temperature sensor on i2c0 channel 3 7. AMC6821 temperature and PWM fan controller (not fitted) The module supports AMC6821 PWM controller which is not currently assembled on currently available Com Express 7 hardware. This commit adds support for the Clearfog CX and Honeycomb variants, which are indentical in this patch, but once QSFP support is finished, only the Clearfog CX will have a QSFP description. Signed-off-by: Rabeeh Khoury [Add Makefile patch, split into clearfog-cx and honeycomb variants, reworded commit -- rmk] Signed-off-by: Russell King Signed-off-by: Shawn Guo commit 5705b9dcda57570b09d6d4e8c309f84238270077 Author: Russell King Date: Mon Dec 16 12:41:19 2019 +0000 arm64: dts: lx2160a: add emdio2 node Add a description for the emdio2 controller to the lx2160a dtsi file, so we can use it in the SolidRun Clearfog CX platform. Signed-off-by: Russell King Signed-off-by: Shawn Guo commit 5f131c4848834a86343918ba502fce2d07b757ae Author: Shawn Guo Date: Mon Dec 23 10:48:58 2019 +0800 bindings: fsl: document compatibles of lx2160a boards The lx2160a board compatibles "fsl,lx2160a-qds" and "fsl,lx2160a-rdb" have been in use. Let's document them. Signed-off-by: Shawn Guo commit 75d91c0dcd596e88537ec44f3df250c8e8368448 Author: Andreas Kemnade Date: Mon Dec 2 21:47:48 2019 +0100 ARM: dts: imx6sll: add PXP module While the EPDC is optional, both consumer and industrial editions have the PXP module, so adding it to the corresponding .dtsi Information taken from freescale kernel, compared with the reference manual and tested by a separate program. Since it does not depend on external wiring, the status = "disabled" is left out here. Signed-off-by: Andreas Kemnade Signed-off-by: Shawn Guo commit 031c8cd8bd24e716162aadeacda83f7c506144f8 Author: Andreas Kemnade Date: Mon Dec 2 21:47:47 2019 +0100 media: dt-bindings: media: fsl-pxp: add missing imx6sll i.MX6SLL also has a pxp, so mention it among others in the bindings doc. Signed-off-by: Andreas Kemnade Acked-by: Rob Herring Signed-off-by: Shawn Guo commit ac80010fc94eb0680d9a432b639583bd7ac29066 Merge: cfeec3fb5451 c60174717544 Author: David S. Miller Date: Sun Dec 22 15:15:05 2019 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Mere overlapping changes in the conflicts here. Signed-off-by: David S. Miller commit 9dd4b065446aebf61b84ba05fb4d78c39e33113b Author: Andi Shyti Date: Sun Dec 22 14:40:46 2019 +0000 drm/i915/gt: Move pm debug files into a gt aware debugfs The GT system is becoming more and more a stand-alone system in i915 and it's fair to assign it its own debugfs directory. rc6, rps and llc debugfs files are gt related, move them into the gt debugfs directory. Signed-off-by: Andi Shyti Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191222144046.1674865-3-chris@chris-wilson.co.uk commit 7d70a1233d11ce9286e1a04c4f1bcd263e3e405e Author: Chris Wilson Date: Sun Dec 22 14:40:45 2019 +0000 drm/i915/gt: Merge engine init/setup loops Now that we don't need to create GEM contexts in the middle of engine construction, we can pull the engine init/setup loops together. Signed-off-by: Chris Wilson Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191222144046.1674865-2-chris@chris-wilson.co.uk commit cfe6b30fc37cc8a6ac9241e450c91ad7a7d6874c Author: Chris Wilson Date: Sun Dec 22 14:40:44 2019 +0000 drm/i915/gt: Pull intel_gt_init_hw() into intel_gt_resume() Since intel_gt_resume() is always immediately proceeded by init_hw, pull the call into intel_gt_resume, where we have the rpm and fw already held. Signed-off-by: Chris Wilson Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191222144046.1674865-1-chris@chris-wilson.co.uk commit e26b6d4341476f6944f57bb78fffcdf332c5948b Author: Chris Wilson Date: Sun Dec 22 12:07:52 2019 +0000 drm/i915/gt: Pull GT initialisation under intel_gt_init() Begin pulling the GT setup underneath a single GT umbrella; let intel_gt take ownership of its engines! As hinted, the complication is the lifetime of the probed engine versus the active lifetime of the GT backends. We need to detect the engine layout early and keep it until the end so that we can sanitize state on takeover and release. Signed-off-by: Chris Wilson Cc: Andi Shyti Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191222120752.1368352-1-chris@chris-wilson.co.uk commit 42240c90e3b03deb52c224609e1b2b132ff40f8b Author: Thierry Reding Date: Fri Dec 6 14:53:36 2019 +0100 drm/atomic: Spell CRTC consistently CRTC is an abbreviation and should be all caps in prose. Update all kerneldoc comments to use a consistent spelling. v2: remove hunk unrelated to the CRTC spelling fixes Reviewed-by: Thomas Zimmermann Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20191206135336.2084564-2-thierry.reding@gmail.com commit dbe2d2bf79d2675e647d6a22fcb213e30a9b9706 Author: Thierry Reding Date: Fri Dec 6 14:53:35 2019 +0100 drm: Fix a couple of typos, punctation and whitespace issues These are just a couple of things that I came across as I was reading through the code and comments. v2: added one more hunk that ended up in the wrong patch Reviewed-by: Thomas Zimmermann Signed-off-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20191206135336.2084564-1-thierry.reding@gmail.com commit 78be2c303acae8e3581328fab4b22ce8f1cc4cf9 Author: Chris Wilson Date: Sat Dec 21 20:01:09 2019 +0000 drm/i915: Move i915_gem_init_contexts() earlier As the GEM global context setup is now independent of the GT state (although GT does currently still depend upon the global i915->kernel_context), we can move its init earlier, leaving the gt init ready to be extracted. Signed-off-by: Chris Wilson Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191221200109.1202310-1-chris@chris-wilson.co.uk commit d83d8d7b8aba23399a76ea648f7add417fa27f05 Author: Bjorn Andersson Date: Mon Oct 28 10:18:37 2019 -0700 arm64: defconfig: Enable ATH10K_SNOC The ath10k snoc is found on the Qualcomm QCS404 and SDM845, so enable the driver for this. Tested-by: Jeffrey Hugo Reviewed-by: Jeffrey Hugo Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20191028171837.3907550-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 2e198c395a084ff3015d71896e35de049c40e3a4 Author: Bjorn Andersson Date: Wed Nov 13 15:22:45 2019 -0800 arm64: dts: qcom: db845c: Enable ath10k 8bit host-cap quirk The WiFi firmware used on db845c implements the 8bit host-capability message, so enable the quirk for this. Reviewed-by: Jeffrey Hugo Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20191113232245.4039932-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 276bb28c298443a97d933f5ce92ddf5b531ddbf0 Author: Douglas Anderson Date: Mon Dec 16 22:20:25 2019 -0800 arm64: dts: qcom: sdm845: Rename gic-its node to msi-controller This is just like commit ac00546a6780 ("arm64: dts: qcom: sc7180: Rename gic-its node to msi-controller") but for sdm845. This fixes all arm64/qcom device trees that I could find. Reviewed-by: Rajendra Nayak Reviewed-by: Stephen Boyd Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20191216222021.1.I684f124a05a1c3f0b113c8d06d5f9da5d69b801e@changeid Signed-off-by: Bjorn Andersson commit 6bcf76316a146347ba4b72d0c34de631725d3b39 Author: Sven Van Asbroeck Date: Mon Dec 16 09:32:59 2019 -0500 dt-bindings: mfd: update TI tps6105x chip bindings The driver has been extended to optionally get its operational mode, regulator init data and LED naming from the devicetree. Acked-by: Jacek Anaszewski Reviewed-by: Rob Herring Signed-off-by: Sven Van Asbroeck Signed-off-by: Pavel Machek commit b3b42b4a383c11daf34b6e4e997bd0d0bb83f02b Author: Sven Van Asbroeck Date: Mon Dec 16 09:32:58 2019 -0500 leds: tps6105x: add driver for MFD chip LED mode This driver adds support for the LED operational mode of the tps6105x MFD device. Acked-by: Jacek Anaszewski Signed-off-by: Sven Van Asbroeck Signed-off-by: Pavel Machek commit b0ff986084007ca91a9d0738825e593b41d3b979 Author: Bartosz Golaszewski Date: Tue Dec 10 11:08:32 2019 +0100 led: max77650: add of_match table We need the of_match table if we want to use the compatible string in the pmic's child node and get the led driver loaded automatically. Signed-off-by: Bartosz Golaszewski Signed-off-by: Pavel Machek commit 4c3718f9d6a6f6557b6e5564af8bd90130123fb8 Author: Linus Walleij Date: Mon Dec 9 01:42:42 2019 +0100 leds: bd2802: Convert to use GPIO descriptors The Rohm BD2802 have no in-kernel users so we can drop the GPIO number from the platform data and require users to provide the GPIO line using machine descriptors. As the descriptors come with inherent polarity inversion semantics, we invert the calls to set the GPIO line such that 0 means "unasserted" and 1 means "asserted". Put a note in the driver that machine descriptor tables will need to specify that the line is active low. Cc: Kim Kyuwon Signed-off-by: Linus Walleij Signed-off-by: Pavel Machek commit 697529091ac7a0a90ca349b914bb30641c13c753 Author: Zahari Petkov Date: Mon Nov 18 23:02:55 2019 +0200 leds: pca963x: Fix open-drain initialization Before commit bb29b9cccd95 ("leds: pca963x: Add bindings to invert polarity") Mode register 2 was initialized directly with either 0x01 or 0x05 for open-drain or totem pole (push-pull) configuration. Afterwards, MODE2 initialization started using bitwise operations on top of the default MODE2 register value (0x05). Using bitwise OR for setting OUTDRV with 0x01 and 0x05 does not produce correct results. When open-drain is used, instead of setting OUTDRV to 0, the driver keeps it as 1: Open-drain: 0x05 | 0x01 -> 0x05 (0b101 - incorrect) Totem pole: 0x05 | 0x05 -> 0x05 (0b101 - correct but still wrong) Now OUTDRV setting uses correct bitwise operations for initialization: Open-drain: 0x05 & ~0x04 -> 0x01 (0b001 - correct) Totem pole: 0x05 | 0x04 -> 0x05 (0b101 - correct) Additional MODE2 register definitions are introduced now as well. Fixes: bb29b9cccd95 ("leds: pca963x: Add bindings to invert polarity") Signed-off-by: Zahari Petkov Signed-off-by: Pavel Machek commit 9f4b952d0bfb7efffb7e85797efa5322e7e69dc5 Author: Sakari Ailus Date: Wed Dec 4 09:56:42 2019 +0200 leds-as3645a: Drop fwnode reference on ignored node If a node is ignored, do not get a reference to it. Fix the bug by moving fwnode_handle_get() where a reference to an fwnode is saved for clarity. Reported-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Pavel Machek commit 8e8d699b051f9ef86e31fb24569ccf3d869b54c4 Author: Jacek Anaszewski Date: Thu Dec 5 22:25:01 2019 +0100 leds: gpio: Fix uninitialized gpio label for fwnode based probe When switching to using generic LED name composition mechanism via devm_led_classdev_register_ext() API the part of code initializing struct gpio_led's template name property was removed alongside. It was however overlooked that the property was also passed to devm_fwnode_get_gpiod_from_child() in place of "label" parameter, which when set to NULL, results in gpio label being initialized to '?'. It could be observed in debugfs and failed to properly identify gpio association with LED consumer. Fix this shortcoming by updating the GPIO label after the LED is registered and its final name is known. Fixes: d7235f5feaa0 ("leds: gpio: Use generic support for composing LED names") Cc: Russell King Reviewed-by: Linus Walleij Signed-off-by: Jacek Anaszewski [fixed comment] Signed-off-by: Pavel Machek commit 4856254d48d3d4435f4919dc505c9749e33eec7d Author: Chris Wilson Date: Sat Dec 21 18:02:04 2019 +0000 drm/i915/gt: Repeat wait_for_idle for retirement workers Since we may retire timelines from secondary workers, intel_gt_retire_requests() is not always a reliable indicator that all pending retirements are complete. If we do detect secondary workers are in progress, recommend intel_gt_wait_for_idle() to repeat the retirement check. Signed-off-by: Chris Wilson Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191221180204.1201217-1-chris@chris-wilson.co.uk commit b3e3d4c618c5b97ca8aa12779df770782be83fb2 Author: John Garry Date: Thu Dec 19 20:35:57 2019 +0800 scsi: libsas: Tidy SAS address print format Currently we use a mixture of %016llx, %llx, and %16llx when printing a SAS address. Since the most significant nibble of the SAS address is always 5 - as per standard - this formatting is not so important; but some fake SAS addresses for SATA devices may not be. And we have mangled/invalid address to consider also. And it's better to be consistent in the code, so use a fixed format. The SAS address is a fixed size at 64b, so we want to 0 byte extend to 16 nibbles, so use %016llx globally. Also make some prints to be explicitly hex, and tidy some whitespace issue. Link: https://lore.kernel.org/r/1576758957-227350-1-git-send-email-john.garry@huawei.com Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 6d67e8473386e6133fd5d7ce0be887a7972672d6 Author: James Smart Date: Wed Dec 18 15:58:08 2019 -0800 scsi: lpfc: Update lpfc version to 12.6.0.3 Update lpfc version to 12.6.0.3 Link: https://lore.kernel.org/r/20191218235808.31922-11-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit c438d0628aa5cf9af57c7cd65794551622ea800d Author: James Smart Date: Wed Dec 18 15:58:07 2019 -0800 scsi: lpfc: Fix improper flag check for IO type Current driver code looks at iocb types and uses a "==" comparison on the flags to determine type. If another flag were set, it would disrupt the comparison. Fix by converting to a bitwise & operation. Link: https://lore.kernel.org/r/20191218235808.31922-10-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 999fbbceb8312a764b318cf19510273291ec3575 Author: James Smart Date: Wed Dec 18 15:58:06 2019 -0800 scsi: lpfc: Fix MDS Latency Diagnostics Err-drop rates When running Cisco-MDS diagnostics which perform driver-level frame loop back, the switch is reporting errors. Diagnostic has a limit on latency that is not being met by the driver. The requirement of Latency frames is that they should be responded back by the host with a maximum delay of few hundreds of microseconds. If the switch doesn't get response frames within this time frame, it fails the test. Test is failing as the lpfc-wq workqueue was overwhelmed by the packet rate and in some cases, the work element yielded to other kernel elements. To resolve, reduce the outstanding load allowed by the adapter. This ensures the driver spends a reasonable amount of time doing loopback and can do so such that latency values can be met. Load is managed by reducing the number of receive buffers posted such that the link can be backpressured to reduce load. Link: https://lore.kernel.org/r/20191218235808.31922-9-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 0b4391946da872e825efa3edfa932e44ae6e9cf9 Author: James Smart Date: Wed Dec 18 15:58:05 2019 -0800 scsi: lpfc: Fix unmap of dpp bars affecting next driver load When unattaching, the driver did not unmap the DPP bar. This caused the next load of the driver, which attempts to enable wc, to not work correctly and wc to be disabled due to an address mapping overlap. Fix by unmapping on unattach. Link: https://lore.kernel.org/r/20191218235808.31922-8-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit a052ce848d4358c0094efc2c8f9aec0a31358e42 Author: James Smart Date: Wed Dec 18 15:58:04 2019 -0800 scsi: lpfc: Fix disablement of FC-AL on lpe35000 models The order of the flags/checks for adapters where FC-AL is supported erroneously excluded lpe35000 adapter models. Also noted that the G7 flags for Loop and Persistent topology are incorrect. They should follow the rules as G6. Rework the logic to enable LPe35000 FC-AL support. Collapse G7 support logic to the same rules as G6. Link: https://lore.kernel.org/r/20191218235808.31922-7-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 9a20cc10fa0504693d2dadb90b2ae185755abc09 Author: James Smart Date: Wed Dec 18 15:58:03 2019 -0800 scsi: lpfc: Fix ras_log via debugfs /sys/kernel/debug/lpfc/fn0/ras_log always shows the same ras_log even if there are link bounce events triggered via issue_lip Dynamic FW logging had logic that prematurely breaks from the buffer filling loop. Fix the check for buffer overrun by looking before copying and restricting copy length to the remaining buffer. When copying, ensure space for NULL character is left in the buffer. While in the routine - ensure the buffer is cleared before adding elements. Link: https://lore.kernel.org/r/20191218235808.31922-6-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit e3ba04c9bad1d1c7f15df43da25e878045150777 Author: James Smart Date: Wed Dec 18 15:58:02 2019 -0800 scsi: lpfc: Fix Fabric hostname registration if system hostname changes There are reports of multiple ports on the same system displaying different hostnames in fabric FDMI displays. Currently, the driver registers the hostname at initialization and obtains the hostname via init_utsname()->nodename queried at the time the FC link comes up. Unfortunately, if the machine hostname is updated after initialization, such as via DHCP or admin command, the value registered initially will be incorrect. Fix by having the driver save the hostname that was registered with FDMI. The driver then runs a heartbeat action that will check the hostname. If the name changes, reregister the FMDI data. The hostname is used in RSNN_NN, FDMI RPA and FDMI RHBA. Link: https://lore.kernel.org/r/20191218235808.31922-5-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit f3d0a8acc5a88435186d242376db05788a891516 Author: James Smart Date: Wed Dec 18 15:58:01 2019 -0800 scsi: lpfc: Fix missing check for CSF in Write Object Mbox Rsp When the WriteObject mailbox response has change_status set to is 0x2 (Firmware Reset) or 0x04 (Port Migration Reset), the CSF field should also be checked to see if a fw reset is sufficient to enable all new features in the updated firmware image. If not, a fw reset would start the new firmware, but with a feature level equal to existing firmware. To enable the new features, a chip reset/pci slot reset would be required. Check the CSF bit when change_status is 0x2 or 0x4 to know whether to perform a pci bus reset or fw reset. Link: https://lore.kernel.org/r/20191218235808.31922-4-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit df9166bfa7750bade5737ffc91fbd432e0354442 Author: James Smart Date: Wed Dec 18 15:58:00 2019 -0800 scsi: lpfc: Fix: Rework setting of fdmi symbolic node name registration This patch reworks the fdmi symbolic node name data for the following two issues: - Correcting extraneous periods following the DV and HN fdmi data fields. - Avoiding buffer overflow issues when formatting the data. The fix to the fist issue is to just remove the characters. The fix to the second issue has all data being staged in temporary storage before being moved to the real buffer. Link: https://lore.kernel.org/r/20191218235808.31922-3-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit be0709e449ac9d9753a5c17e5b770d6e5e930e4a Author: James Smart Date: Wed Dec 18 15:57:59 2019 -0800 scsi: lpfc: Fix incomplete NVME discovery when target NVMe device re-discovery does not complete. Dev_loss_tmo messages seen on initiator after recovery from a link disturbance. The failing case is the following: When the driver (as a NVME target) receives a PLOGI, the driver initiates an "unreg rpi" mailbox command. While the mailbox command is in progress, the driver requests that an ACC be sent to the initiator. The target's ACC is received by the initiator and the initiator then transmits a PLOGI. The driver receives the PLOGI prior to receiving the completion for the PLOGI response WQE that sent the ACC. (Different delivery sources from the hw so the race is very possible). Given the PLOGI is prior to the ACC completion (signifying PLOGI exchange complete), the driver LS_RJT's the PRLI. The "unreg rpi" mailbox then completes. Since PRLI has been received, the driver transmits a PLOGI to restart discovery, which the initiator then ACC's. If the driver processes the (re)PLOGI ACC prior to the completing the handling for the earlier ACC it sent the intiators original PLOGI, there is no state change for completion of the (re)PLOGI. The ndlp remains in "PLOGI Sent" and the initiator continues sending PRLI's which are rejected by the target until timeout or retry is reached. Fix by: When in target mode, defer sending an ACC for the received PLOGI until unreg RPI completes. Link: https://lore.kernel.org/r/20191218235808.31922-2-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 5a2673267a4900104f44a6335e344a4e3024f146 Author: Himanshu Madhani Date: Tue Dec 17 14:06:17 2019 -0800 scsi: qla2xxx: Update driver version to 10.01.00.22-k Link: https://lore.kernel.org/r/20191217220617.28084-15-hmadhani@marvell.com Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 641e0efddcbde52461e017136acd3ce7f2ef0c14 Author: Quinn Tran Date: Tue Dec 17 14:06:16 2019 -0800 scsi: qla2xxx: Fix mtcp dump collection failure MTCP dump failed due to MB Reg 10 was picking garbage data from stack memory. Fixes: 81178772b636a ("[SCSI] qla2xxx: Implemetation of mctp.") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20191217220617.28084-14-hmadhani@marvell.com Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit e1217dc3edce62895595cf484af33b9e0379b7f3 Author: Quinn Tran Date: Tue Dec 17 14:06:15 2019 -0800 scsi: qla2xxx: Fix stuck session in GNL Fix race condition between GNL completion processing and GNL request. Late submission of GNL request was not seen by the GNL completion thread. This patch will re-submit the GNL request for late submission fcport. Link: https://lore.kernel.org/r/20191217220617.28084-13-hmadhani@marvell.com Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 118f01e7d92e47a71baab8a32d420d98f9bbfe78 Author: Quinn Tran Date: Tue Dec 17 14:06:14 2019 -0800 scsi: qla2xxx: Fix RIDA Format-2 This patch fixes offset for Format-2 data structure for Report ID Acquisition. This caused driver to set remote_nport_id to 0x0000 in N2N configuration. In a scenario where initiator's WWPN is higher than target's WWPN, driver will assign 0x00 as target nport-id, which results into login failure. Link: https://lore.kernel.org/r/20191217220617.28084-12-hmadhani@marvell.com Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit f994c6d168c66ae74890b254fdc4af055dfa9419 Author: Quinn Tran Date: Tue Dec 17 14:06:13 2019 -0800 scsi: qla2xxx: Consolidate fabric scan Consolidate scan for fabric loop and fabric topologies into a single scan. Link: https://lore.kernel.org/r/20191217220617.28084-11-hmadhani@marvell.com Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 17e64648aa476092eb959e6e431c7ec8f7bfd4e7 Author: Shyam Sundar Date: Tue Dec 17 14:06:12 2019 -0800 scsi: qla2xxx: Correct fcport flags handling This patch fixes some instances of FCF_ASYNC_{SENT|ACTIVE} flag setting and clearning were missing. Link: https://lore.kernel.org/r/20191217220617.28084-10-hmadhani@marvell.com Signed-off-by: Shyam Sundar Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 8aaac2d7da873aebeba92c666f82c00bbd74aaf9 Author: Quinn Tran Date: Tue Dec 17 14:06:11 2019 -0800 scsi: qla2xxx: Fix stuck login session using prli_pend_timer Session is stuck if driver sees FW has received a PRLI. Driver allows FW to finish with processing of PRLI by checking back with FW at a later time to see if the PRLI has finished. Instead, driver failed to push forward after re-checking PRLI completion. Fixes: ce0ba496dccf ("scsi: qla2xxx: Fix stuck login session") Cc: stable@vger.kernel.org # 5.3 Link: https://lore.kernel.org/r/20191217220617.28084-9-hmadhani@marvell.com Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit e6ba76480299a0d77c51d846f7467b1673aad25b Author: Chris Wilson Date: Sat Dec 21 16:03:24 2019 +0000 drm/i915: Remove i915->kernel_context Allocate only an internal intel_context for the kernel_context, forgoing a global GEM context for internal use as we only require a separate address space (for our own protection). Now having weaned GT from requiring ce->gem_context, we can stop referencing it entirely. This also means we no longer have to create random and unnecessary GEM contexts for internal use. GEM contexts are now entirely for tracking GEM clients, and intel_context the execution environment on the GPU. Signed-off-by: Chris Wilson Cc: Andi Shyti Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191221160324.1073045-1-chris@chris-wilson.co.uk commit 030b995ad9ece9fa2d218af4429c1c78c2342096 Author: Jaihind Yadav Date: Tue Dec 17 17:25:47 2019 +0530 selinux: ensure we cleanup the internal AVC counters on error in avc_update() In AVC update we don't call avc_node_kill() when avc_xperms_populate() fails, resulting in the avc->avc_cache.active_nodes counter having a false value. In last patch this changes was missed , so correcting it. Fixes: fa1aa143ac4a ("selinux: extended permissions for ioctls") Signed-off-by: Jaihind Yadav Signed-off-by: Ravi Kumar Siddojigari [PM: merge fuzz, minor description cleanup] Signed-off-by: Paul Moore commit 29478208c0249777ad9ace6fc4929b8b6eb940db Author: Jagan Teki Date: Mon Dec 16 23:17:11 2019 +0530 arm64: dts: rockchip: Add Radxa Rock Pi N10 initial support Rock Pi N10 is a Rockchip RK3399Pro based SBC, which has - VMARC RK3399Pro SOM (as per SMARC standard) from Vamrs. - Compatible carrier board from Radxa. VAMRC RK3399Pro SOM need to mount on top of radxa dalang carrier board for making Rock Pi N10 SBC. So, add initial support for Rock Pi N10 by including rk3399, rk3399pro vamrc-som and raxda dalang carrier board dtsi files. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20191216174711.17856-5-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit b97965803d266535db18db63459a3180072ff2ed Author: Jagan Teki Date: Mon Dec 16 23:17:10 2019 +0530 ARM: dts: rockchip: Add Radxa Dalang Carrier board Carrier board often referred as baseboard. For making complete SBC or any other industrial boards, these carrier boards will be used with associated SOMs. Radxa has Dalang carrier board which supports on-board peripherals, ports like USB-2.0, USB-3.0, HDMI, MIPI DSI/CSI, eDP, Ethernet, WiFi, PCIe, USB-C, 40-Pin GPIO header and etc. Right now Dalang carrier board is used with two SBC-variants: Rock Pi N10 => VMARC RK3399Por SOM + Dalang carrier board Rock Pi N8 => VMARC RK3288 SOM + Dalang carrier board(+codec) So add this carrier board dtsi as a separate file in ARM directory, so-that the same can reuse it in both rk3288, rk3399pro variants of Rockchip SOMs. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20191216174711.17856-4-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 488533533194be6af25d7c4e37059c2770684dbc Author: Jagan Teki Date: Mon Dec 16 23:17:09 2019 +0530 arm64: dts: rockchip: Add VMARC RK3399Pro SOM initial support VMARC RK3399Pro SOM is a standard SMARC SOM design with Rockchip RK3399Pro SoC, which is designed by Vamrs. Specification: - Rockchip RK3399Pro - PMIC: RK809-3 - SD slot, 16GiB eMMC - 2xUSB-2.0, 1xUSB3.0 - USB-C for power supply - Ethernet, PCIe - HDMI, MIPI-DSI/CSI, eDP Add initial support for VMARC RK3399Pro SOM, this would use with associated carrier board. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20191216174711.17856-3-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit dc753369d12985c152f06331ce2e5e74f3337c59 Author: Jagan Teki Date: Mon Dec 16 23:17:08 2019 +0530 dt-bindings: arm: rockchip: Add Rock Pi N10 binding Rock Pi N10 is a Rockchip RK3399Pro based SBC, which has - VMARC RK3399Pro SOM (as per SMARC standard) from Vamrs. - Compatible carrier board from Radxa. VMARC RK3399Pro SOM need to mount on top of dalang carrier board for making Rock PI N10 SBC. Add dt-bindings for it. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191216174711.17856-2-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit e09dabe49c686a1b86733bcfc58db8be39297675 Author: Soeren Moch Date: Wed Dec 18 23:35:23 2019 +0100 arm64: dts: rockchip: hook up bluetooth at uart0 on rockpro64 With enabled wifi support (required for firmware loading) for the Ampak AP6359SA based wifi/bt combo module we now also can enable the bluetooth part. Suggested-by: Heiko Stuebner Signed-off-by: Soeren Moch Link: https://lore.kernel.org/r/20191218223523.30154-3-smoch@web.de Signed-off-by: Heiko Stuebner commit 7c5b6bfb14cabc19dd5c37d57ab2024162a7f93d Author: Soeren Moch Date: Wed Dec 18 23:35:22 2019 +0100 arm64: dts: rockchip: enable wifi module at sdio0 on rockpro64 RockPro64 supports an Ampak AP6359SA based wifi/bt combo module. The BCM4359/9 wifi controller in this module is connected to sdio0, enable this interface. Use the in-band sdio irq instead of the out-of-band wifi_host_wake_l signal since the latter is not working reliably on this board (probably due to it's PCIe WAKE# connection). Signed-off-by: Soeren Moch Link: https://lore.kernel.org/r/20191218223523.30154-2-smoch@web.de Signed-off-by: Heiko Stuebner commit ed7dd73cd8ca143ddd80654c67e5d2e66e3df42f Author: Chris Wilson Date: Sat Dec 21 00:11:36 2019 +0000 drm/i915/selftests: Setup engine->retire for mock_engine Enable and cleanup the engine->retire for the mock engine. Fixes: dc93c9b69315 ("drm/i915/gt: Schedule request retirement when signaler idles") Signed-off-by: Chris Wilson Acked-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191221001136.720154-1-chris@chris-wilson.co.uk commit cfeec3fb5451c2edd0569c0c245868612a417e5f Merge: 994baea28957 ae0a723c4cfd Author: David S. Miller Date: Fri Dec 20 21:55:00 2019 -0800 Merge tag 'wireless-drivers-next-2019-12-20' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.6 First set of patches for v5.6. The biggest thing here is of course the new driver ath11k but also new features for other drivers as well a myriad of bug fixes. Major changes: ath11k * a new driver for Qualcomm Wi-Fi 6 (IEEE 802.11ax) devices ath10k * significant improvements on receive throughput and firmware download with SDIO bus * report signal strength for each chain also on SDIO * set max mtu to 1500 on SDIO devices brcmfmac * add support for BCM4359 SDIO chipset wil6210 * support set_multicast_to_unicast cfg80211 operation * support set_cqm_rssi_config cfg80211 operation wcn36xx * disable HW_CONNECTION_MONITOR as firmware is buggy ==================== Signed-off-by: David S. Miller commit 994baea28957010a3a1611363fe0fdeaec4bd121 Merge: e1b5e598e5a5 d9b81c963a4c Author: David S. Miller Date: Fri Dec 20 21:20:39 2019 -0800 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: misc updates for -net-next This series includes some misc updates for the HNS3 ethernet driver. [patch 1] adds FE bit check before calling hns3_add_frag(). [patch 2] removes an unnecessary lock. [patch 3] adds a little optimization for CMDQ uninitialization. [patch 4] refactors the dump of FD tcams. [patch 5] implements ndo_features_check ops. [patch 6] adds some VF VLAN information for command "ip link show". [patch 7] adds a debug print. [patch 8] modifies the timing of print misc interrupt status when handling hardware error event. ==================== Signed-off-by: David S. Miller commit d9b81c963a4c4a0a6dd5d57c9d74d9dced77020d Author: Huazhong Tan Date: Thu Dec 19 14:57:47 2019 +0800 net: hns3: only print misc interrupt status when handling fails Printing misc interrupt status of hardware error event in the IRQ handler is unnecessary, since hclge_handle_hw_msix_error() will print out the detail information for this hardware error when handling success. So, this patch removes the print in IRQ handler, and prints it when hclge_handle_hw_msix_error() fails. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit ff7dfcdd684b6277ed02c1025746a94cb1bfc397 Author: Huazhong Tan Date: Thu Dec 19 14:57:46 2019 +0800 net: hns3: add a log for getting chain failure in hns3_nic_uninit_vector_data() Since the mapping can be overwritten, when fail to get the chain between vector and ring, we should go on to deal with the remaining options. For debugging, this patch adds log info for this failure. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 89b40c7fe2a8b30ef6d46d45ae8455adcd9c1b47 Author: Huazhong Tan Date: Thu Dec 19 14:57:45 2019 +0800 net: hns3: add some VF VLAN information for command "ip link show" This patch adds some VF VLAN information for command "ip link show". Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 2a7556bb2b7308c6e0fe646c1ddbbf9522bf1120 Author: Yunsheng Lin Date: Thu Dec 19 14:57:44 2019 +0800 net: hns3: implement ndo_features_check ops for hns3 driver The function netif_skb_features() will disable the TSO feature by using dflt_features_check() if the driver does not implement ndo_features_check ops, which may cause performance degradation problem when hns3 hardware can do multiple tagged TSO. Also, the HNS3 hardware only supports checksum on the SKB with a max header len of 480 bytes, so remove the checksum and TSO related features when the header len is over 480 bytes. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 44b6b88336a08be87a02d69f6a4754c86cda97f1 Author: Yufeng Mo Date: Thu Dec 19 14:57:43 2019 +0800 net: hns3: get FD rules location before dump in debugfs Currently, the dump FD tcam mode in debugfs is to query all FD tcams, including empty rules, which is unnecessary. This patch modify to find the position of useful rules before dump FD tcam, so that it does not need to query empty rules. This patch also modifies some help information in debugfs. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit a3374d7d335c24225f7d65bc0abb632d81dacdf6 Author: Huazhong Tan Date: Thu Dec 19 14:57:42 2019 +0800 net: hns3: optimization for CMDQ uninitialization When uninitializing CMDQ, HCLGE_STATE_CMD_DISABLE will be set up firstly, then the driver does not send command anymore. So, hclge_free_cmd_desc can be called without holding ring->lock. hclge_destroy_cmd_queue() and hclge_destroy_queue() are unnecessary now, so removes them, the VF driver has implemented currently. BTW, the VF driver should set up HCLGEVF_STATE_CMD_DISABLE as well in the hclgevf_cmd_uninit(), just likes what the PF driver does. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 31c92ccecaab75af4a746af6e071314bd3d8ded3 Author: Huazhong Tan Date: Thu Dec 19 14:57:41 2019 +0800 net: hns3: remove useless mutex vport_cfg_mutex in the struct hclge_dev Mutex vport_cfg_mutex has been used to protect uc_mac_list, mc_mac_list and vlan_list from being modified by unloading or reset task at the same time. But now unloading will set up HCLGE_STATE_REMOVING flag and call cancel_work_sync to break down this race condition, so this mutex is unnecessary. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit b2598318eb455c306e703ab30e18b88a1dc7df97 Author: Yunsheng Lin Date: Thu Dec 19 14:57:40 2019 +0800 net: hns3: check FE bit before calling hns3_add_frag() A BD with FE bit means that it is the last BD of a packet, currently the FE bit is checked before calling hns3_add_frag(), which is unnecessary because the FE bit may have been checked in some case. This patch checks the FE bit before calling hns3_add_frag() after processing the first BD of a SKB and adjust the location of memcpy() to reduce duplication. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit e1b5e598e5a51b453328879682b178b4acc15105 Author: John Rutherford Date: Thu Dec 19 16:03:57 2019 +1100 tipc: make legacy address flag readable over netlink To enable iproute2/tipc to generate backwards compatible printouts and validate command parameters for nodes using a node address, it needs to be able to read the legacy address flag from the kernel. The legacy address flag records the way in which the node identity was originally specified. The legacy address flag is requested by the netlink message TIPC_NL_ADDR_LEGACY_GET. If the flag is set the attribute TIPC_NLA_NET_ADDR_LEGACY is set in the return message. Signed-off-by: John Rutherford Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 17338900ccfd490242f460d8190dd9610b496601 Merge: a706a0422322 d6269a93ffc3 Author: David S. Miller Date: Fri Dec 20 21:09:21 2019 -0800 Merge branch 'VSOCK-add-vsock_test-test-suite' Stefano Garzarella says: ==================== VSOCK: add vsock_test test suite The vsock_diag.ko module already has a test suite but the core AF_VSOCK functionality has no tests. This patch series adds several test cases that exercise AF_VSOCK SOCK_STREAM socket semantics (send/recv, connect/accept, half-closed connections, simultaneous connections). The v1 of this series was originally sent by Stefan. v3: - Patch 6: * check the byte received in the recv_byte() * use send(2)/recv(2) instead of write(2)/read(2) to test also flags (e.g. MSG_PEEK) - Patch 8: * removed unnecessary control_expectln("CLOSED") [Stefan]. - removed patches 9,10,11 added in the v2 - new Patch 9 add parameters to list and skip tests (e.g. useful for vmci that doesn't support half-closed socket in the host) - new Patch 10 prints a list of options in the help - new Patch 11 tests MSG_PEEK flags of recv(2) v2: https://patchwork.ozlabs.org/cover/1140538/ v1: https://patchwork.ozlabs.org/cover/847998/ ==================== Signed-off-by: David S. Miller commit d6269a93ffc37effac85903122023a251dfa4aca Author: Stefano Garzarella Date: Wed Dec 18 19:07:08 2019 +0100 vsock_test: add SOCK_STREAM MSG_PEEK test Test if the MSG_PEEK flags of recv(2) works as expected. Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 8d00b93fece1cc3547a53abd6ef3358d23ff4d25 Author: Stefano Garzarella Date: Wed Dec 18 19:07:07 2019 +0100 testing/vsock: print list of options and description Since we now have several options, in the help we print the list of all supported options and a brief description of them. Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 5a2b2425634dd8d340d3889f2317a752a1a87618 Author: Stefano Garzarella Date: Wed Dec 18 19:07:06 2019 +0100 testing/vsock: add parameters to list and skip tests Some tests can fail with transports that have a slightly different behavior, so let's add the possibility to specify which tests to skip. Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 770ce0078cbf97262e86c9cc210684ce3b4266f5 Author: Stefano Garzarella Date: Wed Dec 18 19:07:05 2019 +0100 vsock_test: wait for the remote to close the connection Before check if a send returns -EPIPE, we need to make sure the connection is closed. To do that, we use epoll API to wait EPOLLRDHUP or EPOLLHUP events on the socket. Reported-by: Jorgen Hansen Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit cdbcc18de10a7d72b821fe40fbc2d0ec61e39448 Author: Stefan Hajnoczi Date: Wed Dec 18 19:07:04 2019 +0100 VSOCK: add AF_VSOCK test cases The vsock_test.c program runs a test suite of AF_VSOCK test cases. Signed-off-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 092f32ae628ed4874caf349cc0cfa0626cc3c5b0 Author: Stefan Hajnoczi Date: Wed Dec 18 19:07:03 2019 +0100 VSOCK: add send_byte()/recv_byte() test utilities Test cases will want to transfer data. This patch adds utility functions to do this. Signed-off-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 2f65b44e199c6521be8dbc7458250c74a86ce2aa Author: Stefan Hajnoczi Date: Wed Dec 18 19:07:02 2019 +0100 VSOCK: add full barrier between test cases See code comment for details. Signed-off-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 9bb8a29d28e01bf7dcdb67f71edbca9d3826d004 Author: Stefan Hajnoczi Date: Wed Dec 18 19:07:01 2019 +0100 VSOCK: extract connect/accept functions from vsock_diag_test.c Many test cases will need to connect to the server or accept incoming connections. This patch extracts these operations into utility functions that can be reused. Signed-off-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit df7e0e0d237e5a4ee262befb11b599058a178966 Author: Stefan Hajnoczi Date: Wed Dec 18 19:07:00 2019 +0100 VSOCK: extract utility functions from vsock_diag_test.c Move useful functions into a separate file in preparation for more vsock test programs. Signed-off-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit ce1c7f84e276e8610ffa582517202ff76374cbc7 Author: Stefan Hajnoczi Date: Wed Dec 18 19:06:59 2019 +0100 VSOCK: add SPDX identifiers to vsock tests Signed-off-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 43985468df6757bc079ca0be44edf4da997891e0 Author: Stefan Hajnoczi Date: Wed Dec 18 19:06:58 2019 +0100 VSOCK: fix header include in vsock_diag_test The vsock_diag_test program directly included ../../../include/uapi/ headers from the source tree. Tests are supposed to use the usr/include/linux/ headers that have been prepared with make headers_install instead. Suggested-by: David S. Miller Signed-off-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit a706a0422322e6235d689f53274009a743c8d719 Merge: 5080832627b6 ec6698c272de Author: David S. Miller Date: Fri Dec 20 17:05:47 2019 -0800 Merge branch 'add-dsa-switch-support-for-ar9331' Oleksij Rempel says: ==================== add dsa switch support for ar9331 changes v6: - remove ag71xx changes from this patch set. It needs more work. - ar9331: fix register definition and add ASCII art switch documentation. changes v6: - rebase against net-next changes v5: - remote support for port5. The effort of using this port is questionable. Currently, it is better to not use it at all, then adding buggy support. - remove port enable call back. There is nothing what we actually need to enable. - rebase it against v5.5-rc1 changes v4: - ag71xx: ag71xx_mac_validate fix always false comparison (&& -> ||) - tag_ar9331: use skb_pull_rcsum() instead of skb_pull(). - tag_ar9331: drop skb_set_mac_header() changes v3: - ag71xx: ag71xx_mac_config: ignore MLO_AN_INBAND mode. It is not supported by HW and SW. - ag71xx: ag71xx_mac_validate: return all supported bits on PHY_INTERFACE_MODE_NA changes v2: - move Atheros AR9331 TAG format to separate patch - use netdev_warn_once in the tag driver to reduce potential message spam - typo fixes - reorder tag driver alphabetically - configure switch to maximal frame size - use mdiobus_read/write - fail if mdio sub node is not found - add comment for post reset state - remove deprecated comment about device id - remove phy-handle option for node with fixed-link - ag71xx: set 1G support only for GMII mode This patch series provides dsa switch support for Atheros ar9331 WiSoC. As side effect ag71xx needed to be ported to phylink to make the switch driver (as well phylink based) work properly. ==================== Signed-off-by: David S. Miller commit ec6698c272debe16c8825c88a5b3c3f68a12ef4a Author: Oleksij Rempel Date: Wed Dec 18 09:02:15 2019 +0100 net: dsa: add support for Atheros AR9331 built-in switch Provide basic support for Atheros AR9331 built-in switch. So far it works as port multiplexer without any hardware offloading support. Reviewed-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit 48fda74f0a9377ce2145ac5f06b6db0274880826 Author: Oleksij Rempel Date: Wed Dec 18 09:02:14 2019 +0100 net: dsa: add support for Atheros AR9331 TAG format Add support for tag format used in Atheros AR9331 built-in switch. Reviewed-by: Vivien Didelot Reviewed-by: Andrew Lunn Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit 4eb7ae7a301d3586c3351e81d5c3cfe2304a1a6a Author: Oleksij Rempel Date: Wed Dec 18 09:02:13 2019 +0100 MIPS: ath79: ar9331: add ar9331-switch node Add switch node supported by dsa ar9331 driver. Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit dba261f35d16a8e4b70962d0f8391290510a8201 Author: Oleksij Rempel Date: Wed Dec 18 09:02:12 2019 +0100 dt-bindings: net: dsa: qca, ar9331 switch documentation Atheros AR9331 has built-in 5 port switch. The switch can be configured to use all 5 or 4 ports. One of built-in PHYs can be used by first built-in ethernet controller or to be used directly by the switch over second ethernet controller. Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit f9e6bfdbaf0cf304d72c70a05d81acac01a04f48 Author: Jesper Dangaard Brouer Date: Fri Dec 20 17:19:36 2019 +0100 samples/bpf: Xdp_redirect_cpu fix missing tracepoint attach When sample xdp_redirect_cpu was converted to use libbpf, the tracepoints used by this sample were not getting attached automatically like with bpf_load.c. The BPF-maps was still getting loaded, thus nobody notice that the tracepoints were not updating these maps. This fix doesn't use the new skeleton code, as this bug was introduced in v5.1 and stable might want to backport this. E.g. Red Hat QA uses this sample as part of their testing. Fixes: bbaf6029c49c ("samples/bpf: Convert XDP samples to libbpf usage") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/157685877642.26195.2798780195186786841.stgit@firesoul commit 6cd6e64e3603bd5d1677365cf935c2d8e9f496e0 Merge: 478bee0df0ec 46e3268eaaca Author: Alexei Starovoitov Date: Fri Dec 20 16:10:39 2019 -0800 Merge branch 'xdpsock' Jay Jayatheerthan says: ==================== This series of patches enhances xdpsock application with command line parameters to set transmit packet size and fill pattern among other options. The application has also been enhanced to use Linux Ethernet/IP/UDP header structs and calculate IP and UDP checksums. I have measured the performance of the xdpsock application before and after this patch set and have not been able to detect any difference. Packet Size: ------------ There is a new option '-s' or '--tx-pkt-size' to specify the transmit packet size. It ranges from 47 to 4096 bytes. Default packet size is 64 bytes which is same as before. Fill Pattern: ------------- The transmit UDP payload fill pattern is specified using '-P' or '--tx-pkt-pattern'option. It is an unsigned 32 bit field and defaulted to 0x12345678. Packet Count: ------------- The number of packets to send is specified using '-C' or '--tx-pkt-count' option. If it is not specified, the application sends packets forever. Batch Size: ----------- The batch size for transmit, receive and l2fwd features of the application is specified using '-b' or '--batch-size' options. Default value when this option is not provided is 64 (same as before). Duration: --------- The application supports '-d' or '--duration' option to specify number of seconds to run. This is used in tx, rx and l2fwd features. If this option is not provided, the application runs for ever. ==================== Tested-by: Björn Töpel Acked-by: Björn Töpel Signed-off-by: Alexei Starovoitov commit 46e3268eaaca9f8a0f145872b96fe6d54a232890 Author: Jay Jayatheerthan Date: Fri Dec 20 14:25:30 2019 +0530 samples/bpf: xdpsock: Add option to specify transmit fill pattern The UDP payload fill pattern can be specified using '-P' or '--tx-pkt-pattern' option. It is an unsigned 32 bit field and defaulted to 0x12345678. The IP and UDP checksum is calculated by the code as per the content of the packet before transmission. Signed-off-by: Jay Jayatheerthan Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191220085530.4980-7-jay.jayatheerthan@intel.com commit 4a3c23ae3acc6185a9d418830f22672a52ff986a Author: Jay Jayatheerthan Date: Fri Dec 20 14:25:29 2019 +0530 samples/bpf: xdpsock: Add option to specify tx packet size New option '-s' or '--tx-pkt-size' has been added to specify the transmit packet size. The packet size ranges from 47 to 4096 bytes. When this option is not provided, it defaults to 64 byte packet. The code uses struct ethhdr, struct iphdr and struct udphdr to form the transmit packet. The MAC address, IP address and UDP ports are set to default values. The code calculates IP and UDP checksums before sending the packet. Checksum calculation code in Linux kernel is used for this purpose. The Ethernet FCS is not filled by the code. Signed-off-by: Jay Jayatheerthan Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191220085530.4980-6-jay.jayatheerthan@intel.com commit ece6e9694751a4f0b99372724a0705a0217132b3 Author: Jay Jayatheerthan Date: Fri Dec 20 14:25:28 2019 +0530 samples/bpf: xdpsock: Add option to specify number of packets to send Use '-C' or '--tx-pkt-count' to specify number of packets to send. If it is not specified, the application sends packets forever. If packet count is not a multiple of batch size, last batch sent is less than the batch size. Signed-off-by: Jay Jayatheerthan Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191220085530.4980-5-jay.jayatheerthan@intel.com commit cd9e72b6f21044b36a096833003811c2b2038455 Author: Jay Jayatheerthan Date: Fri Dec 20 14:25:27 2019 +0530 samples/bpf: xdpsock: Add option to specify batch size New option to specify batch size for tx, rx and l2fwd has been added. This allows fine tuning to maximize performance. It is specified using '-b' or '--batch_size' options. When not specified default is 64. Signed-off-by: Jay Jayatheerthan Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191220085530.4980-4-jay.jayatheerthan@intel.com commit 695255882bdf63da240db33d0f2aa9ccca1cbe67 Author: Jay Jayatheerthan Date: Fri Dec 20 14:25:26 2019 +0530 samples/bpf: xdpsock: Use common code to handle signal and main exit Add code to do cleanup for signals and application completion in a unified fashion. The signal handler sets benckmark_done flag terminating the threads. The cleanup is called before returning from main() function. Signed-off-by: Jay Jayatheerthan Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191220085530.4980-3-jay.jayatheerthan@intel.com commit d3f11b018f6ce278e683008e9c225fe87afc532d Author: Jay Jayatheerthan Date: Fri Dec 20 14:25:25 2019 +0530 samples/bpf: xdpsock: Add duration option to specify how long to run The application now supports '-d' or '--duration' option to specify number of seconds to run. This is used in tx, rx and l2fwd features. If this option is not provided, the application runs forever. Signed-off-by: Jay Jayatheerthan Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191220085530.4980-2-jay.jayatheerthan@intel.com commit 478bee0df0ec9067c12e7d058d78721a7e7a1b29 Author: Andrey Ignatov Date: Thu Dec 19 16:05:11 2019 -0800 selftests/bpf: Preserve errno in test_progs CHECK macros It's follow-up for discussion [1] CHECK and CHECK_FAIL macros in test_progs.h can affect errno in some circumstances, e.g. if some code accidentally closes stdout. It makes checking errno in patterns like this unreliable: if (CHECK(!bpf_prog_attach_xattr(...), "tag", "msg")) goto err; CHECK_FAIL(errno != ENOENT); , since by CHECK_FAIL time errno could be affected not only by bpf_prog_attach_xattr but by CHECK as well. Fix it by saving and restoring errno in the macros. There is no "Fixes" tag since no problems were discovered yet and it's rather precaution. test_progs was run with this change and no difference was identified. [1] https://lore.kernel.org/bpf/20191219210907.GD16266@rdna-mbp.dhcp.thefacebook.com/ Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191220000511.1684853-1-rdna@fb.com commit ce3cec27933c069d2015a81e59b93eb656fe7ee4 Merge: 99cacdc6f661 1d9cb1f38186 Author: Alexei Starovoitov Date: Fri Dec 20 16:00:10 2019 -0800 Merge branch 'xsk-cleanup' Magnus Karlsson says: ==================== This patch set cleans up the ring access functions of AF_XDP in hope that it will now be easier to understand and maintain. I used to get a headache every time I looked at this code in order to really understand it, but now I do think it is a lot less painful. The code has been simplified a lot and as a bonus we get better performance in nearly all cases. On my new 2.1 GHz Cascade Lake machine with a standard default config plus AF_XDP support and CONFIG_PREEMPT on I get the following results in percent performance increases with this patch set compared to without it: Zero-copy (-N): rxdrop txpush l2fwd 1 core: -2% 0% 3% 2 cores: 4% 0% 3% Zero-copy with poll() (-N -p): rxdrop txpush l2fwd 1 core: 3% 0% 1% 2 cores: 21% 0% 9% Skb mode (-S): Shows a 0% to 5% performance improvement over the same benchmarks as above. Here 1 core means that we are running the driver processing and the application on the same core, while 2 cores means that they execute on separate cores. The applications are from the xdpsock sample app. On my older 2.0 Ghz Broadwell machine that I used for the v1, I get the following results: Zero-copy (-N): rxdrop txpush l2fwd 1 core: 4% 5% 4% 2 cores: 1% 0% 2% Zero-copy with poll() (-N -p): rxdrop txpush l2fwd 1 core: 1% 3% 3% 2 cores: 22% 0% 5% Skb mode (-S): Shows a 0% to 1% performance improvement over the same benchmarks as above. When a results says 21 or 22% better, as in the case of poll mode with 2 cores and rxdrop, my first reaction is that it must be a bug. Everything else shows between 0% and 5% performance improvement. What is giving rise to 22%? A quick bisect indicates that it is patches 2, 3, 4, 5, and 6 that are giving rise to most of this improvement. So not one patch in particular, but something around 4% improvement from each one of them. Note that exactly this benchmark has previously had an extraordinary slow down compared to when running without poll syscalls. For all the other poll tests above, the slowdown has always been around 4% for using poll syscalls. But with the bad performing test in question, it was above 25%. Interestingly, after this clean up, the slow down is 4%, just like all the other poll tests. Please take an extra peek at this so I have not messed up something. The 0% for several txpush results are due to the test bottlenecking on a non-CPU HW resource. If I eliminated that bottleneck on my system, I would expect to see an increase there too. Changes v1 -> v2: * Corrected textual errors in the commit logs (Sergei and Martin) * Fixed the functions that detect empty and full rings so that they now operate on the global ring state (Maxim) This patch has been applied against commit a352a82496d1 ("Merge branch 'libbpf-extern-followups'") Structure of the patch set: Patch 1: Eliminate the lazy update threshold used when preallocating entries in the completion ring Patch 2: Simplify the detection of empty and full rings Patch 3: Consolidate the two local producer pointers into one Patch 4: Standardize the naming of the producer ring access functions Patch 5: Eliminate the Rx batch size used for the fill ring Patch 6: Simplify the functions xskq_nb_avail and xskq_nb_free Patch 7: Simplify and standardize the naming of the consumer ring access functions Patch 8: Change the names of the validation functions to improve readability and also the return value of these functions Patch 9: Change the name of xsk_umem_discard_addr() to xsk_umem_release_addr() to better reflect the new names. Requires a name change in the drivers that support AF_XDP zero-copy. Patch 10: Remove unnecessary READ_ONCE of data in the ring Patch 11: Add overall function naming comment and reorder the functions for easier reference Patch 12: Use the struct_size helper function when allocating rings ==================== Reviewed-by: Björn Töpel Tested-by: Björn Töpel Acked-by: Björn Töpel Signed-off-by: Alexei Starovoitov commit 1d9cb1f381860b529edec57cf7a08133f40366eb Author: Magnus Karlsson Date: Thu Dec 19 13:39:31 2019 +0100 xsk: Use struct_size() helper Improve readability and maintainability by using the struct_size() helper when allocating the AF_XDP rings. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1576759171-28550-13-git-send-email-magnus.karlsson@intel.com commit 15d8c9162ced1789d25261859a7b37db8426e409 Author: Magnus Karlsson Date: Thu Dec 19 13:39:30 2019 +0100 xsk: Add function naming comments and reorder functions Add comments on how the ring access functions are named and how they are supposed to be used for producers and consumers. The functions are also reordered so that the consumer functions are in the beginning and the producer functions in the end, for easier reference. Put this in a separate patch as the diff might look a little odd, but no functionality has changed in this patch. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1576759171-28550-12-git-send-email-magnus.karlsson@intel.com commit c34787fcc90f0732ff00754057f11780007002e4 Author: Magnus Karlsson Date: Thu Dec 19 13:39:29 2019 +0100 xsk: Remove unnecessary READ_ONCE of data There are two unnecessary READ_ONCE of descriptor data. These are not needed since the data is written by the producer before it signals that the data is available by incrementing the producer pointer. As the access to this producer pointer is serialized and the consumer always reads the descriptor after it has read and synchronized with the producer counter, the write of the descriptor will have fully completed and it does not matter if the consumer has any read tearing. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1576759171-28550-11-git-send-email-magnus.karlsson@intel.com commit f8509aa078de0842ec1817e8026e58620cd05d3b Author: Magnus Karlsson Date: Thu Dec 19 13:39:28 2019 +0100 xsk: ixgbe: i40e: ice: mlx5: Xsk_umem_discard_addr to xsk_umem_release_addr Change the name of xsk_umem_discard_addr to xsk_umem_release_addr to better reflect the new naming of the AF_XDP queue manipulation functions. As this functions is used by drivers implementing support for AF_XDP zero-copy, it requires a name change to these drivers. The function xsk_umem_release_addr_rq has also changed name in the same fashion. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1576759171-28550-10-git-send-email-magnus.karlsson@intel.com commit 03896ef1f0cb23d2742ddf486c531c700a2da7d6 Author: Magnus Karlsson Date: Thu Dec 19 13:39:27 2019 +0100 xsk: Change names of validation functions Change the names of the validation functions to better reflect what they are doing. The uppermost ones are reading entries from the rings and only the bottom ones validate entries. So xskq_cons_read_ is a better prefix name. Also change the xskq_cons_read_ functions to return a bool as the the descriptor or address is already returned by reference in the parameters. Everyone is using the return value as a bool anyway. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1576759171-28550-9-git-send-email-magnus.karlsson@intel.com commit c5ed924b54c892ee637d2e6889ef83341835a560 Author: Magnus Karlsson Date: Thu Dec 19 13:39:26 2019 +0100 xsk: Simplify the consumer ring access functions Simplify and refactor consumer ring functions. The consumer first "peeks" to find descriptors or addresses that are available to read from the ring, then reads them and finally "releases" these descriptors once it is done. The two local variables cons_tail and cons_head are turned into one single variable called cached_cons. cached_tail referred to the cached value of the global consumer pointer and will be stored in cached_cons. For cached_head, we just use cached_prod instead as it was not used for a consumer queue before. It also better reflects what it really is now: a cached copy of the producer pointer. The names of the functions are also renamed in the same manner as the producer functions. The new functions are called xskq_cons_ followed by what it does. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1576759171-28550-8-git-send-email-magnus.karlsson@intel.com commit df0ae6f78a45e5696427779fc3379c5d75f5d4a5 Author: Magnus Karlsson Date: Thu Dec 19 13:39:25 2019 +0100 xsk: Simplify xskq_nb_avail and xskq_nb_free At this point, there are no users of the functions xskq_nb_avail and xskq_nb_free that take any other number of entries argument than 1, so let us get rid of the second argument that takes the number of entries. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1576759171-28550-7-git-send-email-magnus.karlsson@intel.com commit 4b638f13bab4dbfe8569c84e374e8201a427115c Author: Magnus Karlsson Date: Thu Dec 19 13:39:24 2019 +0100 xsk: Eliminate the RX batch size In the xsk consumer ring code there is a variable called RX_BATCH_SIZE that dictates the minimum number of entries that we try to grab from the fill and Tx rings. In fact, the code always try to grab the maximum amount of entries from these rings. The only thing this variable does is to throw an error if there is less than 16 (as it is defined) entries on the ring. There is no reason to do this and it will just lead to weird behavior from user space's point of view. So eliminate this variable. With this change, we will be able to simplify the xskq_nb_free and xskq_nb_avail code in the next commit. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1576759171-28550-6-git-send-email-magnus.karlsson@intel.com commit 59e35e552529b858f35b30bc5a803ea532ca17f1 Author: Magnus Karlsson Date: Thu Dec 19 13:39:23 2019 +0100 xsk: Standardize naming of producer ring access functions Adopt the naming of the producer ring access functions to have a similar naming convention as the functions in libbpf, but adapted to the kernel. You first reserve a number of entries that you later submit to the global state of the ring. This is much clearer, IMO, than the one that was in the kernel part. Once renamed, we also discover that two functions are actually the same, so remove one of them. Some of the primitive ring submission operations are also the same so break these out into __xskq_prod_submit that the upper level ring access functions can use. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1576759171-28550-5-git-send-email-magnus.karlsson@intel.com commit d7012f05e3ca5aba92770c370895092d4882e8c2 Author: Magnus Karlsson Date: Thu Dec 19 13:39:22 2019 +0100 xsk: Consolidate to one single cached producer pointer Currently, the xsk ring code has two cached producer pointers: prod_head and prod_tail. This patch consolidates these two into a single one called cached_prod to make the code simpler and easier to maintain. This will be in line with the user space part of the the code found in libbpf, that only uses a single cached pointer. The Rx path only uses the two top level functions xskq_produce_batch_desc and xskq_produce_flush_desc and they both use prod_head and never prod_tail. So just move them over to cached_prod. The Tx XDP_DRV path uses xskq_produce_addr_lazy and xskq_produce_flush_addr_n and unnecessarily operates on both prod_tail and prod_head, so move them over to just use cached_prod by skipping the intermediate step of updating prod_tail. The Tx path in XDP_SKB mode uses xskq_reserve_addr and xskq_produce_addr. They currently use both cached pointers, but we can operate on the global producer pointer in xskq_produce_addr since it has to be updated anyway, thus eliminating the use of both cached pointers. We can also remove the xskq_nb_free in xskq_produce_addr since it is already called in xskq_reserve_addr. No need to do it twice. When there is only one cached producer pointer, we can also simplify xskq_nb_free by removing one argument. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1576759171-28550-4-git-send-email-magnus.karlsson@intel.com commit 11cc2d21499cabe7e7964389634ed1de3ee91d33 Author: Magnus Karlsson Date: Thu Dec 19 13:39:21 2019 +0100 xsk: Simplify detection of empty and full rings In order to set the correct return flags for poll, the xsk code has to check if the Rx queue is empty and if the Tx queue is full. This code was unnecessarily large and complex as it used the functions that are used to update the local state from the global state (xskq_nb_free and xskq_nb_avail). Since we are not doing this nor updating any data dependent on this state, we can simplify the functions. Another benefit from this is that we can also simplify the xskq_nb_free and xskq_nb_avail functions in a later commit. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1576759171-28550-3-git-send-email-magnus.karlsson@intel.com commit 484b165306e18fd9a0d960e6ed2d6eff31665522 Author: Magnus Karlsson Date: Thu Dec 19 13:39:20 2019 +0100 xsk: Eliminate the lazy update threshold The lazy update threshold was introduced to keep the producer and consumer some distance apart in the completion ring. This was important in the beginning of the development of AF_XDP as the ring format as that point in time was very sensitive to the producer and consumer being on the same cache line. This is not the case anymore as the current ring format does not degrade in any noticeable way when this happens. Moreover, this threshold makes it impossible to run the system with rings that have less than 128 entries. So let us remove this threshold and just get one entry from the ring as in all other functions. This will enable us to remove this function in a later commit. Note that xskq_produce_addr_lazy followed by xskq_produce_flush_addr_n are still not the same function as xskq_produce_addr() as it operates on another cached pointer. Signed-off-by: Magnus Karlsson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/1576759171-28550-2-git-send-email-magnus.karlsson@intel.com commit 216383e920e85f3c1d9772030a69c4dab7455f47 Author: Ville Syrjälä Date: Thu Dec 19 13:14:30 2019 +0200 drm/i915: Introduce intel_crtc_state_alloc() We have several places where we want to allocate a pristine crtc state. Some of those currently call intel_crtc_state_reset() to properly initialize all the non-zero defaults in the state, but some places do not. Let's add intel_crtc_state_alloc() to do both the alloc and the reset, and call that everywhere we need a fresh crtc state. v2: s/kzalloc/kmalloc/ since we memset() anyway (José) Cc: José Roberto de Souza Cc: Manasi Navare Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191219111430.17527-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 58361eaa11d561f338e45558c4cfce03366817c8 Author: Jacopo Mondi Date: Wed Dec 11 18:13:00 2019 +0100 dt-bindings: media: renesas,ceu: Convert to yaml Convert the Renesas CEU bindings description to yaml schema and remove the existing textual bindings document. Signed-off-by: Jacopo Mondi Signed-off-by: Rob Herring commit 606f53b0880255bc476c797c4d92736ff4acf685 Author: Benjamin Gaignard Date: Thu Nov 21 09:43:16 2019 +0100 dt-bindings: watchdog: Convert stm32 watchdog bindings to json-schema Convert the STM32 watchdog binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit 064f42b28a6d6cfddc983cb433d52c3d3b006442 Author: Justin Chen Date: Tue Dec 10 14:48:56 2019 -0800 ARM: brcmstb: Add debug UART entry for 7216 7216 has the same memory map as 7278 and the same physical address for the UART, alias the definition accordingly. Signed-off-by: Justin Chen [florian: expand commit message] Signed-off-by: Florian Fainelli commit 6439b5276b9fda037698ad2e26ad18c9528154b4 Author: Sibi Sankar Date: Thu Dec 19 11:15:06 2019 +0530 remoteproc: mss: q6v5-mss: Add modem support on SC7180 Add the out of reset sequence support for modem sub-system on SC7180 SoCs. It requires access to an additional halt nav register to put the modem back into reset. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20191219054506.20565-3-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 65518e9cf5992f88eb43a3183dd82a6e55ae7f11 Author: Sibi Sankar Date: Thu Dec 19 11:15:05 2019 +0530 dt-bindings: remoteproc: qcom: Add Q6V5 Modem PIL binding for SC7180 Add a new modem compatible string for Qualcomm SC7180 SoCs and introduce the "qcom,halt-nav-regs" bindings needed by the modem sub-system running on SC7180 SoCs. Reviewed-by: Rob Herring Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20191219054506.20565-2-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 8875b1d242c4a6ecf2f3902e0863ac500b877b30 Author: Baolin Wang Date: Wed Dec 4 18:10:41 2019 +0800 MAINTAINERS: Add myself as reviewer for the hwspinlock subsystem I spend some time to do some optimization for the hwspinlock subsystem in the nearest past, and I am willing to be a reviewer. Signed-off-by: Baolin Wang Link: https://lore.kernel.org/r/0a6d0c22100da5196f00dfe0eb431e5e6d6d8c65.1575454108.git.baolin.wang7@gmail.com Signed-off-by: Bjorn Andersson commit a9ee66deeca59e257c1226572571472b3211bf89 Author: Sibi Sankar Date: Wed Dec 18 18:52:17 2019 +0530 arm64: dts: qcom: msm8998: Add ADSP, MPSS and SLPI nodes This patch adds ADSP, MPSS and SLPI nodes for MSM8998 SoCs. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20191218132217.28141-6-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit fda8fba6687d33600327b0f0269066b747bb3998 Author: Sibi Sankar Date: Wed Dec 18 18:52:16 2019 +0530 arm64: dts: qcom: msm8998: Update reserved memory map Update existing and add missing regions to the reserved memory map, as described in version 7.1 Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20191218132217.28141-5-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 7c77e31733f3dbf88904be3b5e974effae32355f Author: Sibi Sankar Date: Wed Dec 18 18:52:15 2019 +0530 remoteproc: qcom: pas: Add MSM8998 ADSP and SLPI support Add support for booting the Audio and Sensor DSPs found in Qualcomm's MSM8998 SoCs. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20191218132217.28141-4-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 4a58009c1768f58d36e8f6b62f47ea1a30542c45 Author: Sibi Sankar Date: Wed Dec 18 18:52:14 2019 +0530 dt-bindings: remoteproc: qcom: Add ADSP and SLPI support for MSM8998 SoC Add ADSP and SLPI compatibles for MSM8998 SoC. Reviewed-by: Rob Herring Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20191218132217.28141-3-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 6ba519aa13758dd55248f3a6f939536656df2661 Author: Sibi Sankar Date: Wed Dec 18 18:52:13 2019 +0530 remoteproc: q6v5-mss: Remove mem clk from the active pool Currently the mem clk is voted upon from both the active and proxy pool on MSM8998 SoCs where only a proxy vote should suffice. Fix this by removing mem clk from the active pool. Fixes: 1665cbd5731fa ("remoteproc: qcom_q6v5_mss: Add support for MSM8998") Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20191218132217.28141-2-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 554f269f0f384d34f7e8052242df3b97be325924 Author: Gayatri Kammela Date: Thu Dec 12 10:38:47 2019 -0800 platform/x86: intel_pmc_core: Add Intel Elkhart Lake support Add Intel Elkhart Lake to the list of the platforms that driver supports for the PMC device. Just like Ice Lake and Tiger Lake, Elkhart Lake can also reuse all the Cannon Lake PCH IPs. Also, it uses the same PCH IPs of Tiger Lake, no additional effort is needed to enable but to simply reuse them. Cc: Peter Zijlstra Cc: Srinivas Pandruvada Cc: Andy Shevchenko Cc: Kan Liang Cc: David E. Box Cc: Rajneesh Bhardwaj Cc: Tony Luck Reviewed-by: Tony Luck Signed-off-by: Gayatri Kammela Signed-off-by: Andy Shevchenko commit 49a437941c3f9e12254c0f4e97201900cb756b3a Author: Gayatri Kammela Date: Thu Dec 12 10:38:46 2019 -0800 platform/x86: intel_pmc_core: Add Intel Tiger Lake support Add Intel Tiger Lake to the list of the platforms that driver supports for the PMC device. Just like Ice Lake, Tiger Lake can also reuse all the Cannon Lake PCH IPs. Since Tiger Lake has almost the same number of PCH IPs as Ice Lake, reuse Ice Lake's PPFEAR_NUM_ENTRIES instead of defining a new macro. Cc: Peter Zijlstra Cc: Srinivas Pandruvada Cc: Andy Shevchenko Cc: Kan Liang Cc: David E. Box Cc: Rajneesh Bhardwaj Cc: Tony Luck Reviewed-by: Tony Luck Signed-off-by: Gayatri Kammela Signed-off-by: Andy Shevchenko commit 6268c0b278b57657a1b9919b02625a2b2ae2120b Author: Gayatri Kammela Date: Thu Dec 12 10:38:45 2019 -0800 platform/x86: intel_pmc_core: Make debugfs entry for pch_ip_power_gating_status conditional Check if the platform supports and only then add a debugfs entry for PCH IP power gating status. Cc: Peter Zijlstra Cc: Srinivas Pandruvada Cc: Andy Shevchenko Cc: Kan Liang Cc: David E. Box Cc: Rajneesh Bhardwaj Cc: Tony Luck Reviewed-by: Tony Luck Signed-off-by: Gayatri Kammela Signed-off-by: Andy Shevchenko commit e3985478183019bf41b40c44049333bf74b26fc3 Author: Gayatri Kammela Date: Thu Dec 12 10:38:44 2019 -0800 platform/x86: intel_pmc_core: Create platform dependent bitmap structs The current implementation of intel_pmc_core driver allows to reuse, but does not reflect the exact number and names of IPs for a newer platform which does not necessarily support all the IPs in the entries. The names and number of these IPs might differ from its previous platforms. The number of PCH IPs per platform is calculated based on PPFEAR_NUM_ENTRIES defined, where each entry represents a bucket (8 bits). The platform can support 'n' entries, but not necessarily all 'n * 8' IPs. Create platform dependent bitmap structures to specify the exact number, names of IPs while reusing the existing IPs. The changes in this patch are preparatory to accommodate future SoCs that might reuse the CNL/ICL PCH IPs, and to reflect the exact number of IPs with its names. Cc: Peter Zijlstra Cc: Srinivas Pandruvada Cc: Andy Shevchenko Cc: Kan Liang Cc: David E. Box Cc: Rajneesh Bhardwaj Cc: Tony Luck Reviewed-by: Tony Luck Signed-off-by: Gayatri Kammela Signed-off-by: Andy Shevchenko commit 476bac56c1ebe11f591ffd39ed915ac28da67fe7 Author: Andy Shevchenko Date: Wed Dec 18 14:53:31 2019 +0200 platform/x86: intel_pmc_core: Remove unnecessary assignments There is no need to assign NULL or 0 in the static structures explicitly. Signed-off-by: Andy Shevchenko commit b1cb33dae41474117acdbc249048c27028cb1ee0 Author: Gayatri Kammela Date: Thu Dec 12 10:38:43 2019 -0800 platform/x86: intel_pmc_core: Clean up: Remove comma after the termination line It is common practice to place a comma after the last entry in an initialized array to avoid the need to add one in future patches that extend the array. But when the last element is a termination marker, the comma could be harmful. Any new entries must be added before the terminator (and the comma would prevent the compiler from issuing a warning about an entry after the terminator). Cc: Peter Zijlstra Cc: Srinivas Pandruvada Cc: Andy Shevchenko Cc: Kan Liang Cc: David E. Box Cc: Rajneesh Bhardwaj Cc: Tony Luck Suggested-by: Andy Shevchenko Reviewed-by: Tony Luck Signed-off-by: Gayatri Kammela Signed-off-by: Andy Shevchenko commit 414002bc32790a012885b4054ef2e61f0bf41d09 Author: Kamel Bouhara Date: Fri Dec 20 11:38:35 2019 +0100 ARM: dts: at91: add smartkiz support and a common kizboxmini dtsi file Split the existing Kizbox Mini boards into three board configuration, the base board, the mother board and the RailDIN board. Add a new dts file for the SmartKiz board support. Signed-off-by: Kévin RAYMOND Signed-off-by: Mickael GARDET Signed-off-by: Kamel Bouhara Link: https://lore.kernel.org/r/20191220103835.160154-2-kamel.bouhara@bootlin.com Signed-off-by: Alexandre Belloni commit d9b6867e8a17e3629e910e84f9c4bbe67d1cff3d Author: Kamel Bouhara Date: Fri Dec 20 11:38:34 2019 +0100 dt-bindings: arm: at91: Document Kizboxmini and Smartkiz boards binding Document devicetree's bindings for the Overkiz's Kizbox Mini and Smartkiz boards, based on a SAM9G25 Atmel SoC. Signed-off-by: Kamel Bouhara Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191220103835.160154-1-kamel.bouhara@bootlin.com Signed-off-by: Alexandre Belloni commit ae56c940f188c1dde440c8456229adaad733908e Author: Fabrizio Castro Date: Tue Dec 17 13:46:01 2019 +0000 arm64: dts: renesas: Add EK874 board with idk-2121wr display support The EK874 is advertised as compatible with panel IDK-2121WR from Advantech, however the panel isn't sold alongside the board. A new dts, adding everything that's required to get the panel to to work with the EK874, is the most convenient way to support the EK874 when it's connected to the IDK-2121WR. Signed-off-by: Fabrizio Castro Acked-by: Laurent Pinchart Link: https://lore.kernel.org/r/1576590361-28244-7-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 111cc9ace2b5047a34642f7eb8b1dbdba10cda56 Author: Geert Uytterhoeven Date: Mon Dec 16 13:47:40 2019 +0100 arm64: dts: renesas: r8a77961: Add SDHI nodes Add device nodes for the SDHI Interfaces on the Renesas R-Car M3-W+ (r8a77961) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca Link: https://lore.kernel.org/r/20191216124740.16647-7-geert+renesas@glider.be commit 19d40e551353dfb6b74f07335b608d049237ff47 Author: Geert Uytterhoeven Date: Mon Dec 16 13:47:39 2019 +0100 arm64: dts: renesas: r8a77961: Add I2C nodes Add device nodes for the I2C and IIC Controllers on the Renesas R-Car M3-W+ (r8a77961) SoC, including DMA properties linking them to the DMA controllers. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca Link: https://lore.kernel.org/r/20191216124740.16647-6-geert+renesas@glider.be commit 8372579d5bb5e59b3cd6ecea354310a74399e473 Author: Geert Uytterhoeven Date: Mon Dec 16 13:47:38 2019 +0100 arm64: dts: renesas: r8a77961: Add SYS-DMAC nodes Add device nodes for the System DMA Controllers (SYS-DMAC) on the Renesas R-Car M3-W+ (r8a77961) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Link: https://lore.kernel.org/r/20191216124740.16647-5-geert+renesas@glider.be commit 9ccf74a93d3c04bbf8790c852300d95c8dfe0c86 Author: Geert Uytterhoeven Date: Mon Dec 16 13:47:37 2019 +0100 arm64: dts: renesas: r8a77961: Add RAVB node Add a device node for the Ethernet AVB (RAVB) interface on the Renesas R-Car M3-W+ (r8a77961) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca Link: https://lore.kernel.org/r/20191216124740.16647-4-geert+renesas@glider.be commit c6ef2b34984583a810eff1b9d105d24b54d92ec1 Author: Geert Uytterhoeven Date: Mon Dec 16 13:47:36 2019 +0100 arm64: dts: renesas: r8a77961: Add GPIO nodes Add device nodes for the GPIO controllers on the Renesas R-Car M3-W+ (r8a77961) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca Link: https://lore.kernel.org/r/20191216124740.16647-3-geert+renesas@glider.be commit 36065b0715dfeabf04353649242ba13280308b03 Author: Geert Uytterhoeven Date: Mon Dec 16 13:47:35 2019 +0100 arm64: dts: renesas: r8a77961: Add RWDT node Add a device node for the RCLK Watchdog Timer (RWDT) on the Renesas R-Car M3-W+ (r8a77961) SoC. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Tested-by: Eugeniu Rosca Link: https://lore.kernel.org/r/20191216124740.16647-2-geert+renesas@glider.be commit bf2b74ce9b33a2edd6ba1930ce60a71830790910 Author: Kuninori Morimoto Date: Mon Dec 16 11:08:22 2019 +0900 arm64: dts: renesas: r8a77990: ebisu: Remove clkout-lr-synchronous from sound rcar_sound doesn't support clkout-lr-synchronous in upstream. It was supported under out-of-tree rcar_sound. upstream rcar_sound is supporting - clkout-lr-synchronous + clkout-lr-asynchronous Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87mubt3tux.wl-kuninori.morimoto.gx@renesas.com Fixes: 56629fcba94c698d ("arm64: dts: renesas: ebisu: Enable Audio") Signed-off-by: Geert Uytterhoeven commit bfea224d9250e56ed5475bf72190783a7e1d8e43 Author: Takashi Iwai Date: Fri Dec 20 17:15:55 2019 +0100 ALSA: uapi: Drop unneeded typedefs We kept some typedefs in uapi/sound/*.h so that the programs in alsa-tools can be built. Now that alsa-lib takes these and applies the workarounds in its own, we don't need these typedefs any longer in the kernel uapi side. Let's drop them. Link: https://lore.kernel.org/r/20191220161555.20232-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 993f2c9abe028bb2ce0541c436eebcd008185dd8 Author: Geert Uytterhoeven Date: Fri Dec 13 17:41:15 2019 +0100 arm64: dts: renesas: r8a77970: Group tuples in thermal reg property To improve human readability and enable automatic validation, the tuples in "reg" properties should be grouped. Fix this by grouping the tuples in the thermal node's "reg" property using angle brackets. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191213164115.3697-9-geert+renesas@glider.be Reviewed-by: Ulrich Hecht commit 9504a9f27a8c2c3a78f566c5cde75b53657b386a Author: Geert Uytterhoeven Date: Fri Dec 13 17:41:14 2019 +0100 arm64: dts: renesas: Group tuples in pci ranges and dma-ranges properties To improve human readability and enable automatic validation, the tuples in the "ranges" and "dma-ranges" properties of PCI device nodes should be grouped. Fix this by grouping the tuples of the "ranges" and "dma-ranges" properties using angle brackets. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191213164115.3697-8-geert+renesas@glider.be Reviewed-by: Ulrich Hecht commit 0aab5b914b41601ee7e4ba9bd81344665db1fbca Author: Geert Uytterhoeven Date: Fri Dec 13 17:41:13 2019 +0100 arm64: dts: renesas: Group tuples in interrupt properties To improve human readability and enable automatic validation, the tuples in the various properties containing interrupt specifiers should be grouped. While "make dtbs_check" does not impose this yet for the "interrupts" property, it does for the "interrupt-map" property. Fix this by grouping the tuples of the "interrupts" and "interrupt-map" properties using angle brackets. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191213164115.3697-7-geert+renesas@glider.be Reviewed-by: Ulrich Hecht commit 36f062124df3d53932ebbd1e3d49ab2c0b09d2cd Author: Geert Uytterhoeven Date: Fri Dec 13 17:41:12 2019 +0100 arm64: dts: renesas: Group tuples in regulator-gpio states properties To improve human readability and enable automatic validation, the tuples in the "states" properties of device nodes compatible with "regulator-gpio" should be grouped, as reported by "make dtbs_check": $ make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/regulator/gpio-regulator.yaml arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dt.yaml: regulator-vccq-sdhi0: states:0: Additional items are not allowed (1800000, 0 were unexpected) arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dt.yaml: regulator-vccq-sdhi0: states:0: [3300000, 1, 1800000, 0] is too long arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dt.yaml: regulator-vccq-sdhi3: states:0: Additional items are not allowed (1800000, 0 were unexpected) arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dt.yaml: regulator-vccq-sdhi3: states:0: [3300000, 1, 1800000, 0] is too long ... Fix this by grouping the tuples using angle brackets. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191213164115.3697-6-geert+renesas@glider.be Reviewed-by: Ulrich Hecht commit 645c08f17f477915f6d900b767e789852f150054 Author: Takashi Iwai Date: Fri Dec 20 16:34:15 2019 +0100 ALSA: uapi: Drop asound.h inclusion from asoc.h The asound.h isn't always available while asoc.h itself is distributed in alsa-lib package. So we need to avoid the unnecessary inclusion of asound.h from there. Link: https://lore.kernel.org/r/20191220153415.2740-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7fd7d6c5045113350fcf78e865ced8a80dbde9fb Author: Takashi Iwai Date: Fri Dec 20 16:34:14 2019 +0100 ALSA: uapi: Fix typos and header inclusion in asound.h The recent changes in uapi/asoundlib.h caused some build errors in alsa-lib side because of a typo and the new included files. Basically asound.h is supposed to be usable also on non-Linux systems, so we've tried to avoid the Linux-specific include files. This patch is an attempt to recover from those changes. Fixes: 3ddee7f88aaf ("ALSA: Avoid using timespec for struct snd_pcm_status") Fixes: 80fe7430c708 ("ALSA: add new 32-bit layout for snd_pcm_mmap_status/control") Link: https://lore.kernel.org/r/20191220153415.2740-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4fa406caf950fd46ae06bccf9a4c72171401d203 Author: Takashi Iwai Date: Fri Dec 20 16:34:13 2019 +0100 ALSA: hdspm: Drop linux/types.h inclusion in uapi header The hdspm.h uapi header has been used also from non-Linux or platforms that don't have linux/*.h. It was OK in the past because alsa-lib contained the modified version of this header file, but now it tries to the verbatim copy, so it broke the build. This fixes it again. Link: https://lore.kernel.org/r/20191220153415.2740-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit d63e63d4210713ddc7eb1b2d2afc4a8d42ccf91e Author: Takashi Iwai Date: Fri Dec 20 16:34:12 2019 +0100 ALSA: hdsp: Make uapi/hdsp.h compilable again Recently alsa-lib updated its content of sound/hdsp.h just by copying the latest Linus kernel uapi/*.h, and this broke the build of alsa-tools programs. We used to modify the headers so that they can be built without asoundlib.h and linux kernel headers, and the verbatim copy doesn't work as is. This patch removes again the linux/types.h inclusion and drop __user prefix that broke the build and adjusts the corresponding code. Link: https://lore.kernel.org/r/20191220153415.2740-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2e4688676392767e16c1adeca4cc2c083e2db13f Author: Takashi Iwai Date: Fri Dec 20 16:34:11 2019 +0100 ALSA: emu10k1: Make uapi/emu10k1.h compilable again Recently we updated the content in alsa-lib uapi header files by just copying from the latest Linus kernel uapi/*.h, and noticed that it broke the build of some alsa-tools programs. The reason is that we used to have a modified version in the past, so that the program can be built without referring to the unexported stuff like snd_ctl_elem_id or __user prefix. This patch attempts to restore that, i.e. dropping the stuff that can't be referred in the user-space. For adapting the changes in uapi/emu10k1.h, the emu10k1 driver code is also slightly modified. Most of changes are pointer cast. Link: https://lore.kernel.org/r/20191220153415.2740-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit f54e670dee2dbd216b0d8b462c7e72dc5707bf87 Author: Geert Uytterhoeven Date: Fri Dec 13 17:41:11 2019 +0100 ARM: dts: renesas: Group tuples in pci ranges and dma-ranges properties To improve human readability and enable automatic validation, the tuples in the "ranges" and "dma-ranges" properties of PCI devices nodes should be grouped. Not doing so causes "make dtbs_check" to emit warnings like: pcie@fe000000: dma-ranges: [[1107296256, 0, 1073741824, 0, 1073741824, 0, 2147483648, 1124073472, 2, 0, 2, 0, 1, 0]] is not valid under any of the given schemas (Possible causes of the failure): pcie@fe000000: dma-ranges: [[1107296256, 0, 1073741824, 0, 1073741824, 0, 2147483648, 1124073472, 2, 0, 2, 0, 1, 0]] is not of type 'boolean' pcie@fe000000: dma-ranges:0: [1107296256, 0, 1073741824, 0, 1073741824, 0, 2147483648, 1124073472, 2, 0, 2, 0, 1, 0] is too long Fix this by grouping the tuples of the "ranges" and "dma-ranges" properties using angle brackets. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191213164115.3697-5-geert+renesas@glider.be Reviewed-by: Ulrich Hecht commit c2e952ef5abb8054140e85eb4f54972a197d4673 Author: Geert Uytterhoeven Date: Fri Dec 13 17:41:10 2019 +0100 ARM: dts: renesas: Group tuples in interrupt properties To improve human readability and enable automatic validation, the tuples in the various properties containing interrupt specifiers should be grouped. While "make dtbs_check" does not impose this yet for the "interrupts" property, it does for the "interrupt-map" property, leading to warnings like: pci@ee090000: interrupt-map:0: [0, 0, 0, 1, 5, 0, 108, 4, 2048, 0, 0, 1, 5, 0, 108, 4, 4096, 0, 0, 2, 5, 0, 108, 4] is too long pci@ee0d0000: interrupt-map:0: [0, 0, 0, 1, 5, 0, 113, 4, 2048, 0, 0, 1, 5, 0, 113, 4, 4096, 0, 0, 2, 5, 0, 113, 4] is too long Fix this by grouping the tuples of the "interrupts" and "interrupt-map" properties using angle brackets. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191213164115.3697-4-geert+renesas@glider.be Reviewed-by: Ulrich Hecht commit 8a481af10e6ab64411b5e5c3de3dc453c4e203a2 Author: Geert Uytterhoeven Date: Fri Dec 13 17:41:08 2019 +0100 ARM: dts: renesas: Group tuples in regulator-gpio states properties To improve human readability and enable automatic validation, the tuples in the "states" properties of device nodes compatible with "regulator-gpio" should be grouped, as reported by "make dtbs_check": $ make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/regulator/gpio-regulator.yaml arch/arm/boot/dts/r8a7791-koelsch.dt.yaml: regulator-vccq-sdhi0: states:0: Additional items are not allowed (1800000, 0 were unexpected) arch/arm/boot/dts/r8a7791-koelsch.dt.yaml: regulator-vccq-sdhi0: states:0: [3300000, 1, 1800000, 0] is too long arch/arm/boot/dts/r8a7791-koelsch.dt.yaml: regulator-vccq-sdhi1: states:0: Additional items are not allowed (1800000, 0 were unexpected) arch/arm/boot/dts/r8a7791-koelsch.dt.yaml: regulator-vccq-sdhi1: states:0: [3300000, 1, 1800000, 0] is too long arch/arm/boot/dts/r8a7791-koelsch.dt.yaml: regulator-vccq-sdhi2: states:0: Additional items are not allowed (1800000, 0 were unexpected) arch/arm/boot/dts/r8a7791-koelsch.dt.yaml: regulator-vccq-sdhi2: states:0: [3300000, 1, 1800000, 0] is too long ... Fix this by grouping the tuples using angle brackets. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191213164115.3697-2-geert+renesas@glider.be Reviewed-by: Ulrich Hecht commit 8443ffd1bbd5be74e9b12db234746d12e8ea93e2 Author: Geert Uytterhoeven Date: Wed Dec 11 14:52:21 2019 +0100 ARM: dts: r8a7779: Add device node for ARM global timer Add a device node for the global timer, which is part of the Cortex-A9 MPCore. The global timer can serve as an accurate (4 ns) clock source for scheduling and delay loops. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191211135222.26770-4-geert+renesas@glider.be commit df1a0aac0a533e6f3ff843c64a9a0d3b7f37c89c Author: Geert Uytterhoeven Date: Wed Dec 11 14:52:20 2019 +0100 ARM: dts: sh73a0: Add device node for ARM global timer Add a device node for the global timer, which is part of the Cortex-A9 MPCore. The global timer can serve as an accurate (3 ns) clock source for scheduling and delay loops. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191211135222.26770-3-geert+renesas@glider.be commit 61b58e3f6e518c511e54d56d362d505928df4e86 Author: Geert Uytterhoeven Date: Wed Dec 11 14:52:19 2019 +0100 ARM: dts: sh73a0: Rename twd clock to periph clock The "TWD" clock is actually the Cortex-A9 MPCore "PERIPHCLK" clock, which not only clocks the private timers and watchdogs (TWD), but also the interrupt controller and global timer. Hence rename it from "twd" to "periph". Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191211135222.26770-2-geert+renesas@glider.be commit 837b7deb364c3cf927f922d88b6131c8a4f81d0e Author: Fabrizio Castro Date: Thu Oct 10 15:25:59 2019 +0100 dt-bindings: can: rcar_canfd: document r8a774b1 support Document the support for rcar_canfd on R8A774B1 SoC devices. Signed-off-by: Fabrizio Castro Acked-by: Rob Herring Link: https://lore.kernel.org/r/1570717560-7431-3-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b32bfbc98a747e82d30cc8fd6e4b173a48c01530 Author: Fabrizio Castro Date: Thu Oct 10 15:25:58 2019 +0100 dt-bindings: can: rcar_can: document r8a774b1 support Document RZ/G2N (r8a774b1) SoC specific bindings. Signed-off-by: Fabrizio Castro Acked-by: Rob Herring Link: https://lore.kernel.org/r/1570717560-7431-2-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 6d5375a31295143ef4bab7cfc352747e93dedc99 Author: Chris Brandt Date: Thu Dec 12 08:53:01 2019 -0500 pinctrl: rza1: Reduce printed messages Since this message is printed for each port, it creates a lot of output during boot and would serve better only during debugging. Signed-off-by: Chris Brandt Acked-by: Jacopo Mondi Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20191212135301.17915-1-chris.brandt@renesas.com Signed-off-by: Geert Uytterhoeven commit a34cd9dfd03fa9ec380405969f1d638bc63b8d63 Author: Geert Uytterhoeven Date: Wed Nov 13 11:16:53 2019 +0100 pinctrl: sh-pfc: r8a77965: Fix DU_DOTCLKIN3 drive/bias control R-Car Gen3 Hardware Manual Errata for Rev. 2.00 of October 24, 2019 changed the configuration bits for drive and bias control for the DU_DOTCLKIN3 pin on R-Car M3-N, to match the same pin on R-Car H3. Update the driver to reflect this. After this, the handling of drive and bias control for the various DU_DOTCLKINx pins is consistent across all of the R-Car H3, M3-W, M3-W+, and M3-N SoCs. Fixes: 86c045c2e4201e94 ("pinctrl: sh-pfc: r8a77965: Replace DU_DOTCLKIN2 by DU_DOTCLKIN3") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191113101653.28428-1-geert+renesas@glider.be commit 169e808eda2d747118fa3feb99881e346968c760 Author: Biju Das Date: Wed Dec 18 12:59:44 2019 +0000 dt-bindings: clock: renesas: cpg-mssr: Fix r8a774b1 typo This patch fixes the typo %s/r8a774a1/r8a774b1/. Fixes: 10003938a0c64 ("dt-bindings: clock: renesas: cpg-mssr: Document r8a774b1 binding") Signed-off-by: Biju Das Link: https://lore.kernel.org/r/1576673984-37752-1-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c9d9d903474c548578237c1fde1e6673d729abe8 Author: Chris Brandt Date: Fri Dec 6 08:41:59 2019 -0500 clk: renesas: r7s9210: Add SPIBSC clock Add SPIBSC clock for RZ/A2. Signed-off-by: Chris Brandt Link: https://lore.kernel.org/r/20191206134202.18784-4-chris.brandt@renesas.com Signed-off-by: Geert Uytterhoeven commit 0d67c0340a60829c5c1b7d09629d23bbd67696f3 Author: Sergei Shtylyov Date: Fri Sep 27 21:09:21 2019 +0300 clk: renesas: rcar-gen3: Allow changing the RPC[D2] clocks I was unable to get clk_set_rate() setting a lower RPC-IF clock frequency and that issue boiled down to me not passing CLK_SET_RATE_PARENT flag to clk_register_composite() when registering the RPC[D2] clocks... Fixes: db4a0073cc82 ("clk: renesas: rcar-gen3: Add RPC clocks") Signed-off-by: Sergei Shtylyov Link: https://lore.kernel.org/r/be27a344-d8bf-9e0c-8950-2d1b48498496@cogentembedded.com Signed-off-by: Geert Uytterhoeven commit 130ac214294bcb5efc93229c7d10144c4992e90a Author: Pascal Paillet Date: Thu Dec 5 17:13:59 2019 +0100 regulator: Convert stm32-pwr regulator to json-schema Convert the stm32-pwr regulator binding to DT schema format using json-schema. Signed-off-by: Pascal Paillet Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191205161359.20755-1-p.paillet@st.com Signed-off-by: Mark Brown commit a14a0b5fc17901cdbc2e9d412e7ed4fbd75e284c Author: Matti Vaittinen Date: Thu Dec 19 13:34:44 2019 +0200 regulator: bd71828: remove get_voltage operation Simplify LDO6 voltage getting on BD71828 by removing the get_voltage call-back and providing the fixed voltage in regulator_desc instead Signed-off-by: Matti Vaittinen Suggested-by: Mark Brown Link: https://lore.kernel.org/r/20191219113444.GA28299@localhost.localdomain Signed-off-by: Mark Brown commit d24a70636b8b2b41bf983e89bbaaaf301bb80de4 Author: Mark Brown Date: Thu Dec 19 12:51:40 2019 +0000 ASoC: max98090: Remove empty suspend function The suspend function is empty so can be removed. Signed-off-by: Mark Brown Reviewed-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20191219125140.47689-1-broonie@kernel.org Signed-off-by: Mark Brown commit f412af187ae1a0171f779b4666557c60130e1976 Author: Yannick Fertré Date: Wed Nov 27 11:23:38 2019 +0100 drm/stm: ltdc: move pinctrl to encoder mode set The pin control must be set to default as soon as possible to establish a good video link between tv & bridge hdmi (encoder mode set is call before encoder enable). Signed-off-by: Yannick Fertre Acked-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/1574850218-13257-1-git-send-email-yannick.fertre@st.com commit 5b5b9d35e05a01afacda745a0877105d33f7a768 Author: Tova Mussai Date: Thu Oct 3 20:17:07 2019 +0300 iwlwifi: scan: remove support for fw scan api v11 The fw already support scan api v12, v11 is not needed anymore. Signed-off-by: Tova Mussai Signed-off-by: Luca Coelho commit efaaa97c0e7f14c48ee406a37ba25ff3915c6e50 Author: Luca Coelho Date: Tue Oct 1 14:42:28 2019 +0300 iwlwifi: dbg_ini: don't skip a TX FIFO when dumping Before we start looping over the internal TX FIFOs increase the fifo number, but that's incorrect and causes a FIFO to be skipped. This is probably due to a copy and paste from the previous loop. Signed-off-by: Luca Coelho commit 1019f9efcb9fa0cea4b361604b438fef3ea3e394 Author: Johannes Berg Date: Mon Sep 30 14:45:54 2019 +0200 iwlwifi: mvm: update powersave correctly for D3 This fixes a long-standing bug - we haven't been able to check the firmware image that was loaded for D3/not-D3 since the introduction of the unified image... Fix this by keeping a status flag for D3 instead of checking for the firmware image that's loaded. This reduces occurrences of checks for IWL_UCODE_WOWLAN to just the code that actually loads the image or deals with it in other ways. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho commit a5e93b42f462fc87f884f12f5176b10dca5a3bf1 Author: Chris Wilson Date: Fri Dec 13 15:13:31 2019 +0000 drm/i915/execlists: Select arb on/off around batches based on preemption Decide whether or not we need to disable arbitration within user batches based on our intel_engine_has_preemption() flag. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191213151331.1788371-1-chris@chris-wilson.co.uk commit 24dbe0aaa0030231d4d35886d3552121d208df69 Author: Chuhong Yuan Date: Wed Dec 4 19:47:59 2019 +0800 phy: ti-pipe3: make clk operations symmetric in probe and remove The driver calls clk_prepare_enable in probe but the corresponding clk_disable_unprepare() is in ti_pipe3_disable_clocks(). Move clk_disable_unprepare() to remove to make them symmetric. Signed-off-by: Chuhong Yuan Acked-by: Roger Quadros Signed-off-by: Kishon Vijay Abraham I commit a3a0641599cd48865d67b098d6d88b5ba66ef860 Author: Nishad Kamdar Date: Wed Nov 27 19:32:33 2019 +0530 phy: qcom-qmp: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header files related to PHY drivers for Qualcomm platforms. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Signed-off-by: Kishon Vijay Abraham I commit 795e55999b2fefca006002f0632a88773cce376d Author: Krzysztof Kozlowski Date: Thu Nov 21 04:19:47 2019 +0100 phy: hisilicon: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Kishon Vijay Abraham I commit 0f100b70487ab8b1323eed1f99cfc10eb18a688e Author: Chris Wilson Date: Fri Dec 20 10:12:30 2019 +0000 drm/i915: Push the use-semaphore marker onto the intel_context Instead of rummaging through the intel_context to peek at the GEM context in the middle of request submission to decide whether to use semaphores, store that information on the intel_context itself. Signed-off-by: Chris Wilson Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191220101230.256839-2-chris@chris-wilson.co.uk commit 9f3ccd40acf4a348aab4eda140cdb4d2f1f773b4 Author: Chris Wilson Date: Fri Dec 20 10:12:29 2019 +0000 drm/i915: Drop GEM context as a direct link from i915_request Keep the intel_context as being the primary state for i915_request, with the GEM context a backpointer from the low level state for the rarer cases we need client information. Our goal is to remove such references to clients from the backend, and leave the HW submission agnostic to client interfaces and self-contained. Signed-off-by: Chris Wilson Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191220101230.256839-1-chris@chris-wilson.co.uk commit 9ccaf106c2cf1591cdcc5434ef08d3edfbe06944 Author: Dmitry Osipenko Date: Sun Dec 15 21:30:47 2019 +0300 gpio: tegra: Use NOIRQ phase for suspend/resume All GPIO interrupts are disabled during of the NOIRQ suspend/resume phase, thus there is no need to manually disable the interrupts. This patch doesn't fix any problem, this is just a minor clean-up. Signed-off-by: Dmitry Osipenko Reviewed-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Bartosz Golaszewski commit f56d979cc58e9a361e0bf1b764fdadc85ee2d7c8 Author: Dmitry Osipenko Date: Sun Dec 15 21:30:46 2019 +0300 gpio: tegra: Properly handle irq_set_irq_wake() error Technically upstream interrupt controller may fail changing of GPIO's bank wake-state and in this case the GPIO's wake-state shouldn't be changed. Signed-off-by: Dmitry Osipenko Reviewed-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Bartosz Golaszewski commit fc782e47e601843163034a68c29ea1abe2578570 Author: Dmitry Osipenko Date: Sun Dec 15 21:30:45 2019 +0300 gpio: tegra: Use generic readl_relaxed/writel_relaxed accessors There is no point in using old-style raw accessors, the generic accessors do the same thing and also take into account CPU endianness. Tegra SoCs do not support big-endian mode in the upstream kernel, but let's switch away from the outdated things anyway, just to keep code up-to-date. Signed-off-by: Dmitry Osipenko Reviewed-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Bartosz Golaszewski commit bf6910abf54871b0e976e52f56fb3b3dd1b90e48 Author: Niklas Cassel Date: Fri Nov 29 22:39:12 2019 +0100 power: avs: Add support for CPR (Core Power Reduction) CPR (Core Power Reduction) is a technology that reduces core power on a CPU or other device. It reads voltage settings in efuse from product test process as initial settings. Each OPP corresponds to a "corner" that has a range of valid voltages for a particular frequency. While the device is running at a particular frequency, CPR monitors dynamic factors such as temperature, etc. and adjusts the voltage for that frequency accordingly to save power and meet silicon characteristic requirements. This driver is based on an RFC by Stephen Boyd[1], which in turn is based on work by others on codeaurora.org[2]. [1] https://lkml.org/lkml/2015/9/18/833 [2] https://source.codeaurora.org/quic/la/kernel/msm-4.14/tree/drivers/regulator/cpr-regulator.c?h=msm-4.14 Co-developed-by: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 3185fe1d8a4557ec84d9617274a694af0cf4c7da Author: Niklas Cassel Date: Fri Nov 29 22:39:11 2019 +0100 dt-bindings: power: avs: Add support for CPR (Core Power Reduction) Add DT bindings to describe the CPR HW found on certain Qualcomm SoCs. Co-developed-by: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Niklas Cassel Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 2298cf8d36bcef203b32dcb4291ce26a1049d939 Author: Zhang Rui Date: Mon Dec 16 16:33:45 2019 +0800 powercap/intel_rapl: add support for JasperLake Add intel_rapl support for Jasper Lake. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit b2d32af0bff402b4c1fce28311759dd1f6af058a Author: Zhang Rui Date: Mon Dec 16 16:33:44 2019 +0800 x86/cpu: Add Jasper Lake to Intel family Japser Lake is an Atom family processor. It uses Tremont cores and is targeted at mobile platforms. Reviewed-by: Tony Luck Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 85c3ebd4a0510c0700e4f3e205bbb46757a53feb Author: Yangtao Li Date: Sun Dec 15 13:02:06 2019 +0000 cpuidle: kirkwood: convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Andrew Lunn Acked-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 22c48a439d6ac1dbe2db1092b64052592a47b017 Author: Yangtao Li Date: Sun Dec 15 13:02:05 2019 +0000 cpuidle: clps711x: convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Acked-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit e976eb4b91e906f20ec25b20c152d53c472fc3fd Author: zhuguangqing Date: Mon Dec 9 17:35:23 2019 +0800 PM: wakeup: Show statistics for deleted wakeup sources again After commit 00ee22c28915 (PM / wakeup: Use seq_open() to show wakeup stats), print_wakeup_source_stats(m, &deleted_ws) is not called from wakeup_sources_stats_seq_show() any more. Because deleted_ws is one of the wakeup sources, it should be shown too, so add it to the end of all other wakeup sources. Signed-off-by: zhuguangqing [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki commit 2a2ef473cc9111b0d21ce18f49cb34d93d6991ad Author: Alexandre Belloni Date: Tue Dec 10 18:05:40 2019 +0100 PM: sleep: Switch to rtc_time64_to_tm()/rtc_tm_to_time64() Call the 64bit versions of rtc_tm time conversion to avoid the y2038 issue. Signed-off-by: Alexandre Belloni Signed-off-by: Rafael J. Wysocki commit fbdd256fe701a680f6eab3fa93dbab1942ab6a9f Author: Rafael J. Wysocki Date: Fri Dec 20 09:51:10 2019 +0100 ACPICA: Update the list of maintainers The Erik's last name and email address have changed recently, so update MAINTAINERS and .mailmap to reflect that change. Signed-off-by: Rafael J. Wysocki commit 0b7c99d9a229c895fe4e6470af51612f3f4d2664 Author: Rafael J. Wysocki Date: Fri Dec 20 09:47:50 2019 +0100 mailmap: Add entry for The old email address I contributed to the kernel from in the past has not been functional for a few years, so add a .mailmap entry for it. Signed-off-by: Rafael J. Wysocki commit e0e4706c7e9f358dc22a8f97d8e6f0f5d9a46168 Author: Bibby Hsieh Date: Tue Dec 10 13:05:24 2019 +0800 drm/mediatek: remove unused external function layer_on and layer_off both are unused external function, remove them from mtk_ddp_comp_funcs structure. Signed-off-by: Bibby Hsieh Signed-off-by: CK Hu commit 9b59b8c6f8462cd330fc7fb735c4d864357b3689 Author: Bibby Hsieh Date: Tue Dec 10 13:05:23 2019 +0800 drm/mediatek: disable all the planes in atomic_disable Under shadow register case, we do not disable all the plane before disable all the hardwares. Fix it. Fixes: 9dc84e98a31f ("drm/mediatek: add shadow register support") Signed-off-by: Bibby Hsieh Signed-off-by: CK Hu commit 920fffcc891276a855cb3ce1e7361d2e9cb72581 Author: Bibby Hsieh Date: Tue Dec 10 13:05:22 2019 +0800 drm/mediatek: update cursors by using async atomic update Support to async updates of cursors by using the new atomic interface for that. Signed-off-by: Bibby Hsieh Signed-off-by: CK Hu commit 411f5c1eacfebb1f6e40b653d29447cdfe7282aa Author: Bibby Hsieh Date: Tue Dec 10 13:05:21 2019 +0800 drm/mediatek: handle events when enabling/disabling crtc The driver currently handles vblank events only when updating planes on an already enabled CRTC. The atomic update API however allows requesting an event when enabling or disabling a CRTC. This currently leads to event objects being leaked in the kernel and to events not being sent out. Fix it. Signed-off-by: Bibby Hsieh Signed-off-by: CK Hu commit 60b874f6427936fb87f034a46970c7ca3a172181 Author: Bibby Hsieh Date: Tue Dec 10 13:05:20 2019 +0800 drm/mediatek: use DRM core's atomic commit helper The DRM core atomic helper now supports asynchronous commits natively. The custom drm implementation isn't needed anymore, remove it. Signed-off-by: Bibby Hsieh Signed-off-by: CK Hu commit 138b80cbd7051ceebae563f9375fe66302a6615b Author: Yongqiang Niu Date: Wed Nov 27 18:04:19 2019 +0800 drm/mediatek: Fix can't get component for external display plane. The original logic is ok for primary display, but will not find out component for external display. For example, plane->index is 6 for external display, but there are only 2 layer nr in external display, and this condition will never happen: if (plane->index < (count + mtk_ddp_comp_layer_nr(comp))) Fix this by using the offset of the plane to mtk_crtc->planes as index, instead of plane->index. Fixes: d6b53f68356f ("drm/mediatek: Add helper to get component for a plane") Signed-off-by: Yongqiang Niu Signed-off-by: Pi-Hsun Shih Signed-off-by: CK Hu commit 5bbb71cda6da51d5dd1ca6efd7e0626ad3e2f669 Author: Pi-Hsun Shih Date: Mon Nov 18 14:18:05 2019 +0800 drm/mediatek: Check return value of mtk_drm_ddp_comp_for_plane. The mtk_drm_ddp_comp_for_plane can return NULL, but the usage doesn't check for it. Add check for it. Fixes: d6b53f68356f ("drm/mediatek: Add helper to get component for a plane") Signed-off-by: Pi-Hsun Shih Signed-off-by: CK Hu commit b39f712dbe8596e08e0da904c8a89f194764a2c2 Author: Maxime Ripard Date: Thu Dec 19 10:15:39 2019 +0100 ARM: dts: sun9i: Remove useless reset and clock names The MMC configuration clock controller in the A80 definition has a clock-names and reset-names property, even though the binding for that controller doesn't declare it. Remove it. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 7309386df5500230abe066d338761106a93ae7af Author: Maxime Ripard Date: Thu Dec 19 10:15:38 2019 +0100 ARM: dts: sun8i: nanopi-duo2: Fix GPIO regulator state array Even though it translates to the same thing down to the binary level, we should have an array of 2 number cells to describe each voltage state, which in turns create a validation warning. Let's fix this. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit ef4afc620fa0a67e5500fb374b2f38123a523e9f Author: Maxime Ripard Date: Thu Dec 19 10:15:37 2019 +0100 ARM: dts: sunxi: Add missing dmas properties to TCON The TCON binding mandates a dmas phandle to the DMAengine channel used for that controller. However, since it's not used in the driver, some device trees have been missing it. Let's add it. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit c36ffe4db690f2dc308a25ef3e8b7f985fa75183 Author: Maxime Ripard Date: Thu Dec 19 10:15:36 2019 +0100 ARM: dts: sun8i: v3s: Remove redundant assigned-clocks The V3s mixer node has an assigned clocks property, while the driver also enforces it. Since assigned-clocks is pretty fragile anyway, let's just remove it. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 96940819e5b31f42df1a332d6c213c19ba5c5fbf Author: Maxime Ripard Date: Thu Dec 19 10:15:35 2019 +0100 ARM: dts: sun9i: Make sure the USB PHY resources are in the same order While this is functional, it's a best practice to always have the clocks and reset lines in order, in case we ever need to have compatibility code. Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit c6d633a927499f35a06455a960ad6b5a59c87c2c Author: Eric Biggers Date: Sun Dec 15 15:51:19 2019 -0800 crypto: algapi - make unregistration functions return void Some of the algorithm unregistration functions return -ENOENT when asked to unregister a non-registered algorithm, while others always return 0 or always return void. But no users check the return value, except for two of the bulk unregistration functions which print a message on error but still always return 0 to their caller, and crypto_del_alg() which calls crypto_unregister_instance() which always returns 0. Since unregistering a non-registered algorithm is always a kernel bug but there isn't anything callers should do to handle this situation at runtime, let's simplify things by making all the unregistration functions return void, and moving the error message into crypto_unregister_alg() and upgrading it to a WARN(). Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 0e89640b640d7f726bcbf6903c78257a28e56f3c Author: Mark Brown Date: Fri Dec 13 15:49:10 2019 +0000 crypto: arm64 - Use modern annotations for assembly functions In an effort to clarify and simplify the annotation of assembly functions in the kernel new macros have been introduced. These replace ENTRY and ENDPROC and also add a new annotation for static functions which previously had no ENTRY equivalent. Update the annotations in the crypto code to the new macros. There are a small number of files imported from OpenSSL where the assembly is generated using perl programs, these are not currently annotated at all and have not been modified. Signed-off-by: Mark Brown Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 3907ccfaec5d9965e306729936fc732c94d2c1e7 Author: Tudor Ambarus Date: Fri Dec 13 14:45:44 2019 +0000 crypto: atmel-aes - Fix CTR counter overflow when multiple fragments The CTR transfer works in fragments of data of maximum 1 MByte because of the 16 bit CTR counter embedded in the IP. Fix the CTR counter overflow handling for messages larger than 1 MByte. Reported-by: Dan Carpenter Fixes: 781a08d9740a ("crypto: atmel-aes - Fix counter overflow in CTR mode") Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 27896aff15d66c241a87402bea81dc03c9fb80bd Author: Ayush Sawal Date: Fri Dec 13 17:08:52 2019 +0530 crypto: chelsio - calculating tx_channel_id as per the max number of channels chcr driver was not using the number of channels from lld and assuming that there are always two channels available. With following patch chcr will use number of channel as passed by cxgb4. Signed-off-by: Ayush Sawal Signed-off-by: Herbert Xu commit 27f4adf724e16c0cb49dd015a089d8bdcb18353b Author: Tudor Ambarus Date: Fri Dec 13 09:54:56 2019 +0000 crypto: atmel-{aes,tdes} - Update the IV only when the op succeeds Do not update the IV in case of errors. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit e9ce6aee1d4d0ae61bf9e1666d790394c4f4d1a8 Author: Tudor Ambarus Date: Fri Dec 13 09:54:54 2019 +0000 crypto: atmel-{sha,tdes} - Print warn message even when deferring Even when deferring, we would like to know what caused it. Update dev_warn to dev_err because if the DMA init fails, the probe is stopped. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 827a98df67f1b75f00b01d1931c110f8f7a5f167 Author: Tudor Ambarus Date: Fri Dec 13 09:54:49 2019 +0000 crypto: atmel-{aes,sha,tdes} - Stop passing unused argument in _dma_init() pdata is not used. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 644c247e8e35f36d6850bcc1da56a4cb79780825 Author: Tudor Ambarus Date: Fri Dec 13 09:54:46 2019 +0000 crypto: atmel-{aes,sha,tdes} - Drop duplicate init of dma_slave_config.direction The 'direction' member of the dma_slave_config will be going away as it duplicates the direction given in the prepare call. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 0e69378940eafe386464679a84856d1b63e1bac2 Author: Tudor Ambarus Date: Fri Dec 13 09:54:42 2019 +0000 crypto: atmel-{aes,sha} - Fix incorrect use of dmaengine_terminate_all() device_terminate_all() is used to abort all the pending and ongoing transfers on the channel, it should be used just in the error path. Also, dmaengine_terminate_all() is deprecated and one should use dmaengine_terminate_async() or dmaengine_terminate_sync(). The method is not used in atomic context, use dmaengine_terminate_sync(). A secondary aspect of this patch is that it luckily avoids a deadlock between atmel_aes and at_hdmac.c. While in tasklet with the lock held, the dma controller invokes the client callback (dmaengine_terminate_all), which tries to get the same lock. The at_hdmac fix would be to drop the lock before invoking the client callback, a fix on at_hdmac will follow. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 7d07de2c18abd95f72efb28f78a4825e0fc1aa6a Author: Brendan Higgins Date: Wed Dec 11 11:27:40 2019 -0800 crypto: amlogic - add unspecified HAS_IOMEM dependency Currently CONFIG_CRYPTO_DEV_AMLOGIC_GXL=y implicitly depends on CONFIG_HAS_IOMEM=y; consequently, on architectures without IOMEM we get the following build error: ld: drivers/crypto/amlogic/amlogic-gxl-core.o: in function `meson_crypto_probe': drivers/crypto/amlogic/amlogic-gxl-core.c:240: undefined reference to `devm_platform_ioremap_resource' Fix the build error by adding the unspecified dependency. Reported-by: Brendan Higgins Signed-off-by: Brendan Higgins Acked-by: Corentin Labbe Signed-off-by: Herbert Xu commit 6dc0e310623fdcb27a1486eb436f0118c45e95a5 Author: Brendan Higgins Date: Wed Dec 11 11:27:39 2019 -0800 crypto: inside-secure - add unspecified HAS_IOMEM dependency Currently CONFIG_CRYPTO_DEV_SAFEXCEL=y implicitly depends on CONFIG_HAS_IOMEM=y; consequently, on architectures without IOMEM we get the following build error: ld: drivers/crypto/inside-secure/safexcel.o: in function `safexcel_probe': drivers/crypto/inside-secure/safexcel.c:1692: undefined reference to `devm_platform_ioremap_resource' Fix the build error by adding the unspecified dependency. Reported-by: Brendan Higgins Signed-off-by: Brendan Higgins Signed-off-by: Herbert Xu commit 177e358c9609e7810b53c3355ea4f56f26d1416f Author: Pascal van Leeuwen Date: Wed Dec 11 17:32:37 2019 +0100 crypto: inside-secure - Fix hang case on EIP97 with basic DES/3DES ops This patch fixes another hang case on the EIP97 caused by sending invalidation tokens to the hardware when doing basic (3)DES ECB/CBC operations. Invalidation tokens are an EIP197 feature and needed nor supported by the EIP97. So they should not be sent for that device. Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit cb97aa9473627720810a0a016621c36f15392802 Author: Pascal van Leeuwen Date: Wed Dec 11 17:32:36 2019 +0100 crypto: inside-secure - Fix hang case on EIP97 with zero length input data The EIP97 hardware cannot handle zero length input data and will (usually) hang when presented with this anyway. This patch converts any zero length input to a 1 byte dummy input to prevent this hanging. Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit 098e51e517bc2e5865c520f3eee8bf83dd320e61 Author: Pascal van Leeuwen Date: Wed Dec 11 17:32:35 2019 +0100 crypto: inside-secure - Fix Unable to fit even 1 command desc error w/ EIP97 Due to the additions of support for modes like AES-CCM and AES-GCM, which require large command tokens, the size of the descriptor has grown such that it now does not fit into the descriptor cache of a standard EIP97 anymore. This means that the driver no longer works on the Marvell Armada 3700LP chip (as used on e.g. Espressobin) that it has always supported. Additionally, performance on EIP197's like Marvell A8K may also degrade due to being able to fit less descriptors in the on-chip cache. Putting these tokens into the descriptor was really a hack and not how the design was supposed to be used - resource allocation did not account for it. So what this patch does, is move the command token out of the descriptor. To avoid having to allocate buffers on the fly for these command tokens, they are stuffed in a "shadow ring", which is a circular buffer of fixed size blocks that runs in lock-step with the descriptor ring. i.e. there is one token block per descriptor. The descriptor ring itself is then pre- populated with the pointers to these token blocks so these do not need to be filled in when building the descriptors later. Signed-off-by: Pascal van Leeuwen Signed-off-by: Herbert Xu commit a30637625822e42f67a6a537147b978551288daf Author: Daniel Jordan Date: Wed Dec 11 11:21:20 2019 -0500 padata: update documentation file path in MAINTAINERS It's changed since the recent RST conversion. Fixes: bfcdcef8c8e3 ("padata: update documentation") Signed-off-by: Daniel Jordan Cc: Herbert Xu Cc: Steffen Klassert Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu commit 2bbb3375d967155bccc86a5887d4a6e29c56b683 Author: Herbert Xu Date: Wed Dec 11 10:50:11 2019 +0800 crypto: api - fix unexpectedly getting generic implementation When CONFIG_CRYPTO_MANAGER_EXTRA_TESTS=y, the first lookup of an algorithm that needs to be instantiated using a template will always get the generic implementation, even when an accelerated one is available. This happens because the extra self-tests for the accelerated implementation allocate the generic implementation for comparison purposes, and then crypto_alg_tested() for the generic implementation "fulfills" the original request (i.e. sets crypto_larval::adult). This patch fixes this by only fulfilling the original request if we are currently the best outstanding larval as judged by the priority. If we're not the best then we will ask all waiters on that larval request to retry the lookup. Note that this patch introduces a behaviour change when the module providing the new algorithm is unregistered during the process. Previously we would have failed with ENOENT, after the patch we will instead redo the lookup. Fixes: 9a8a6b3f0950 ("crypto: testmgr - fuzz hashes against...") Fixes: d435e10e67be ("crypto: testmgr - fuzz skciphers against...") Fixes: 40153b10d91c ("crypto: testmgr - fuzz AEADs against...") Reported-by: Eric Biggers Signed-off-by: Herbert Xu Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit 76e227719a14064f47ab0109c55368c4b5baeaca Author: Andrei Botila Date: Mon Dec 9 18:59:56 2019 +0200 crypto: caam/qi2 - remove double buffering for ahash Previously double buffering was used for storing previous and next "less-than-block-size" bytes. Double buffering can be removed by moving the copy of next "less-than-block-size" bytes after current request is executed by HW. Signed-off-by: Andrei Botila Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 46b49abc5d0ada1e2ba8f872ad98fa742555bdb1 Author: Andrei Botila Date: Mon Dec 9 18:59:55 2019 +0200 crypto: caam - remove double buffering for ahash Previously double buffering was used for storing previous and next "less-than-block-size" bytes. Double buffering can be removed by moving the copy of next "less-than-block-size" bytes after current request is executed by HW. Signed-off-by: Andrei Botila Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 7f8c36fe9be46862c4f3c5302f769378028a34fa Author: Chuhong Yuan Date: Tue Dec 10 00:21:44 2019 +0800 crypto: picoxcell - adjust the position of tasklet_init and fix missed tasklet_kill Since tasklet is needed to be initialized before registering IRQ handler, adjust the position of tasklet_init to fix the wrong order. Besides, to fix the missed tasklet_kill, this patch adds a helper function and uses devm_add_action to kill the tasklet automatically. Fixes: ce92136843cb ("crypto: picoxcell - add support for the picoxcell crypto engines") Signed-off-by: Chuhong Yuan Signed-off-by: Herbert Xu commit f2c5d27bb8899b7f527e2e7005d691c432563145 Author: Greg Kroah-Hartman Date: Mon Dec 9 16:21:51 2019 +0100 crypto: hisilicon - still no need to check return value of debugfs_create functions Just like in 4a97bfc79619 ("crypto: hisilicon - no need to check return value of debugfs_create functions"), there still is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Zhou Wang Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Herbert Xu commit 632b0b5301f67ce54b840d55950707003a489151 Author: Rijo Thomas Date: Wed Dec 4 11:49:03 2019 +0530 crypto: ccp - provide in-kernel API to submit TEE commands Extend the functionality of AMD Secure Processor (SP) driver by providing an in-kernel API to submit commands to TEE ring buffer for processing by Trusted OS running on AMD Secure Processor. Following TEE commands are supported by Trusted OS: * TEE_CMD_ID_LOAD_TA : Load Trusted Application (TA) binary into TEE environment * TEE_CMD_ID_UNLOAD_TA : Unload TA binary from TEE environment * TEE_CMD_ID_OPEN_SESSION : Open session with loaded TA * TEE_CMD_ID_CLOSE_SESSION : Close session with loaded TA * TEE_CMD_ID_INVOKE_CMD : Invoke a command with loaded TA * TEE_CMD_ID_MAP_SHARED_MEM : Map shared memory * TEE_CMD_ID_UNMAP_SHARED_MEM : Unmap shared memory Linux AMD-TEE driver will use this API to submit command buffers for processing in Trusted Execution Environment. The AMD-TEE driver shall be introduced in a separate patch. Cc: Jens Wiklander Cc: Tom Lendacky Cc: Ard Biesheuvel Co-developed-by: Devaraj Rangasamy Signed-off-by: Devaraj Rangasamy Signed-off-by: Rijo Thomas Acked-by: Gary R Hook Signed-off-by: Herbert Xu commit 33960acccfbd7f24d443cb3d0312ac28abe62bae Author: Rijo Thomas Date: Wed Dec 4 11:49:02 2019 +0530 crypto: ccp - add TEE support for Raven Ridge Adds a PCI device entry for Raven Ridge. Raven Ridge is an APU with a dedicated AMD Secure Processor having Trusted Execution Environment (TEE) support. The TEE provides a secure environment for running Trusted Applications (TAs) which implement security-sensitive parts of a feature. This patch configures AMD Secure Processor's TEE interface by initializing a ring buffer (shared memory between Rich OS and Trusted OS) which can hold multiple command buffer entries. The TEE interface is facilitated by a set of CPU to PSP mailbox registers. The next patch will address how commands are submitted to the ring buffer. Cc: Jens Wiklander Cc: Tom Lendacky Cc: Ard Biesheuvel Co-developed-by: Devaraj Rangasamy Signed-off-by: Devaraj Rangasamy Signed-off-by: Rijo Thomas Acked-by: Gary R Hook Signed-off-by: Herbert Xu commit f100ab62b68922c343a8efc84e83d2275c1ade47 Author: Rijo Thomas Date: Wed Dec 4 11:49:01 2019 +0530 crypto: ccp - check whether PSP supports SEV or TEE before initialization Read PSP feature register to check for TEE (Trusted Execution Environment) support. If neither SEV nor TEE is supported by PSP, then skip PSP initialization. Cc: Tom Lendacky Cc: Jens Wiklander Cc: Ard Biesheuvel Co-developed-by: Devaraj Rangasamy Signed-off-by: Devaraj Rangasamy Signed-off-by: Rijo Thomas Acked-by: Gary R Hook Signed-off-by: Herbert Xu commit 6eb0cc72bcbe9cc5b9ccd41d7226929767e41311 Author: Rijo Thomas Date: Wed Dec 4 11:49:00 2019 +0530 crypto: ccp - move SEV vdata to a dedicated data structure PSP can support both SEV and TEE interface. Therefore, move SEV specific registers to a dedicated data structure. TEE interface specific registers will be added in a later patch. Cc: Ard Biesheuvel Cc: Tom Lendacky Cc: Jens Wiklander Co-developed-by: Devaraj Rangasamy Signed-off-by: Devaraj Rangasamy Signed-off-by: Rijo Thomas Acked-by: Gary R Hook Signed-off-by: Herbert Xu commit b93566f1bb54e02a1ff1e3b4782073be1886744e Author: Rijo Thomas Date: Wed Dec 4 11:48:59 2019 +0530 crypto: ccp - create a generic psp-dev file The PSP (Platform Security Processor) provides support for key management commands in Secure Encrypted Virtualization (SEV) mode, along with software-based Trusted Execution Environment (TEE) to enable third-party Trusted Applications. Therefore, introduce psp-dev.c and psp-dev.h files, which can invoke SEV (or TEE) initialization based on platform feature support. TEE interface support will be introduced in a later patch. Cc: Ard Biesheuvel Cc: Tom Lendacky Cc: Jens Wiklander Co-developed-by: Devaraj Rangasamy Signed-off-by: Devaraj Rangasamy Signed-off-by: Rijo Thomas Acked-by: Gary R Hook Signed-off-by: Herbert Xu commit 9b67d08dbc1751ab15d972a63a4d9132e7e7442f Author: Rijo Thomas Date: Wed Dec 4 11:48:58 2019 +0530 crypto: ccp - rename psp-dev files to sev-dev This is a preliminary patch for creating a generic PSP device driver file, which will have support for both SEV and TEE (Trusted Execution Environment) interface. This patch does not introduce any new functionality, but simply renames psp-dev.c and psp-dev.h files to sev-dev.c and sev-dev.h files respectively. Cc: Ard Biesheuvel Cc: Tom Lendacky Cc: Jens Wiklander Co-developed-by: Devaraj Rangasamy Signed-off-by: Devaraj Rangasamy Signed-off-by: Rijo Thomas Acked-by: Gary R Hook Signed-off-by: Herbert Xu commit 99cacdc6f661f50f44a0ef006a1a3db20c0577f6 Merge: c92bbaa0fda5 06ac0186bd24 Author: Alexei Starovoitov Date: Thu Dec 19 21:22:26 2019 -0800 Merge branch 'replace-cg_bpf-prog' Andrey Ignatov says: ==================== v3->v4: - use OPTS_VALID and OPTS_GET to handle bpf_prog_attach_opts. v2->v3: - rely on DECLARE_LIBBPF_OPTS from libbpf_common.h; - separate "required" and "optional" arguments in bpf_prog_attach_xattr; - convert test_cgroup_attach to prog_tests; - move the new selftest to prog_tests/cgroup_attach_multi. v1->v2: - move DECLARE_LIBBPF_OPTS from libbpf.h to bpf.h (patch 4); - switch new libbpf API to OPTS framework; - switch selftest to libbpf OPTS framework. This patch set adds support for replacing cgroup-bpf programs attached with BPF_F_ALLOW_MULTI flag so that any program in a list can be updated to a new version without service interruption and order of programs can be preserved. Please see patch 3 for details on the use-case and API changes. Other patches: Patch 1 is preliminary refactoring of __cgroup_bpf_attach to simplify it. Patch 2 is minor cleanup of hierarchy_allows_attach. Patch 4 extends libbpf API to support new set of attach attributes. Patch 5 converts test_cgroup_attach to prog_tests. Patch 6 adds selftest coverage for the new API. ==================== Signed-off-by: Alexei Starovoitov commit 06ac0186bd242d44f5703ce64ee0077b317c86bb Author: Andrey Ignatov Date: Wed Dec 18 23:44:38 2019 -0800 selftests/bpf: Test BPF_F_REPLACE in cgroup_attach_multi Test replacing a cgroup-bpf program attached with BPF_F_ALLOW_MULTI and possible failure modes: invalid combination of flags, invalid replace_bpf_fd, replacing a non-attachd to specified cgroup program. Example of program replacing: # gdb -q --args ./test_progs --name=cgroup_attach_multi ... Breakpoint 1, test_cgroup_attach_multi () at cgroup_attach_multi.c:227 (gdb) [1]+ Stopped gdb -q --args ./test_progs --name=cgroup_attach_multi # bpftool c s /mnt/cgroup2/cgroup-test-work-dir/cg1 ID AttachType AttachFlags Name 2133 egress multi 2134 egress multi # fg gdb -q --args ./test_progs --name=cgroup_attach_multi (gdb) c Continuing. Breakpoint 2, test_cgroup_attach_multi () at cgroup_attach_multi.c:233 (gdb) [1]+ Stopped gdb -q --args ./test_progs --name=cgroup_attach_multi # bpftool c s /mnt/cgroup2/cgroup-test-work-dir/cg1 ID AttachType AttachFlags Name 2139 egress multi 2134 egress multi Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/7b9b83e8d5fb82e15b034341bd40b6fb2431eeba.1576741281.git.rdna@fb.com commit 257c88559f360ef40d251942f1f9f0c55f5f91ca Author: Andrey Ignatov Date: Wed Dec 18 23:44:37 2019 -0800 selftests/bpf: Convert test_cgroup_attach to prog_tests Convert test_cgroup_attach to prog_tests. This change does a lot of things but in many cases it's pretty expensive to separate them, so they go in one commit. Nevertheless the logic is ketp as is and changes made are just moving things around, simplifying them (w/o changing the meaning of the tests) and making prog_tests compatible: * split the 3 tests in the file into 3 separate files in prog_tests/; * rename the test functions to test_; * remove unused includes, constants, variables and functions from every test; * replace `if`-s with or `if (CHECK())` where additional context should be logged and with `if (CHECK_FAIL())` where line number is enough; * switch from `log_err()` to logging via `CHECK()`; * replace `assert`-s with `CHECK_FAIL()` to avoid crashing the whole test_progs if one assertion fails; * replace cgroup_helpers with test__join_cgroup() in cgroup_attach_override only, other tests need more fine-grained control for cgroup creation/deletion so cgroup_helpers are still used there; * simplify cgroup_attach_autodetach by switching to easiest possible program since this test doesn't really need such a complicated program as cgroup_attach_multi does; * remove test_cgroup_attach.c itself. Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/0ff19cc64d2dc5cf404349f07131119480e10e32.1576741281.git.rdna@fb.com commit cdbee3839cd91a4577425c43cf064b9523926159 Author: Andrey Ignatov Date: Wed Dec 18 23:44:36 2019 -0800 libbpf: Introduce bpf_prog_attach_xattr Introduce a new bpf_prog_attach_xattr function that, in addition to program fd, target fd and attach type, accepts an extendable struct bpf_prog_attach_opts. bpf_prog_attach_opts relies on DECLARE_LIBBPF_OPTS macro to maintain backward and forward compatibility and has the following "optional" attach attributes: * existing attach_flags, since it's not required when attaching in NONE mode. Even though it's quite often used in MULTI and OVERRIDE mode it seems to be a good idea to reduce number of arguments to bpf_prog_attach_xattr; * newly introduced attribute of BPF_PROG_ATTACH command: replace_prog_fd that is fd of previously attached cgroup-bpf program to replace if BPF_F_REPLACE flag is used. The new function is named to be consistent with other xattr-functions (bpf_prog_test_run_xattr, bpf_create_map_xattr, bpf_load_program_xattr). The struct bpf_prog_attach_opts is supposed to be used with DECLARE_LIBBPF_OPTS macro. Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/bd6e0732303eb14e4b79cb128268d9e9ad6db208.1576741281.git.rdna@fb.com commit 7dd68b3279f1792103d12e69933db3128c6d416e Author: Andrey Ignatov Date: Wed Dec 18 23:44:35 2019 -0800 bpf: Support replacing cgroup-bpf program in MULTI mode The common use-case in production is to have multiple cgroup-bpf programs per attach type that cover multiple use-cases. Such programs are attached with BPF_F_ALLOW_MULTI and can be maintained by different people. Order of programs usually matters, for example imagine two egress programs: the first one drops packets and the second one counts packets. If they're swapped the result of counting program will be different. It brings operational challenges with updating cgroup-bpf program(s) attached with BPF_F_ALLOW_MULTI since there is no way to replace a program: * One way to update is to detach all programs first and then attach the new version(s) again in the right order. This introduces an interruption in the work a program is doing and may not be acceptable (e.g. if it's egress firewall); * Another way is attach the new version of a program first and only then detach the old version. This introduces the time interval when two versions of same program are working, what may not be acceptable if a program is not idempotent. It also imposes additional burden on program developers to make sure that two versions of their program can co-exist. Solve the problem by introducing a "replace" mode in BPF_PROG_ATTACH command for cgroup-bpf programs being attached with BPF_F_ALLOW_MULTI flag. This mode is enabled by newly introduced BPF_F_REPLACE attach flag and bpf_attr.replace_bpf_fd attribute to pass fd of the old program to replace That way user can replace any program among those attached with BPF_F_ALLOW_MULTI flag without the problems described above. Details of the new API: * If BPF_F_REPLACE is set but replace_bpf_fd doesn't have valid descriptor of BPF program, BPF_PROG_ATTACH will return corresponding error (EINVAL or EBADF). * If replace_bpf_fd has valid descriptor of BPF program but such a program is not attached to specified cgroup, BPF_PROG_ATTACH will return ENOENT. BPF_F_REPLACE is introduced to make the user intent clear, since replace_bpf_fd alone can't be used for this (its default value, 0, is a valid fd). BPF_F_REPLACE also makes it possible to extend the API in the future (e.g. add BPF_F_BEFORE and BPF_F_AFTER if needed). Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Acked-by: Andrii Narkyiko Link: https://lore.kernel.org/bpf/30cd850044a0057bdfcaaf154b7d2f39850ba813.1576741281.git.rdna@fb.com commit 9fab329d6a04c0a52a84d207b5e0d83aeb660aa0 Author: Andrey Ignatov Date: Wed Dec 18 23:44:34 2019 -0800 bpf: Remove unused new_flags in hierarchy_allows_attach() new_flags is unused, remove it. Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/2c49b30ab750f93cfef04a1e40b097d70c3a39a1.1576741281.git.rdna@fb.com commit 1020c1f24a946e7d5d8a67db741b20efcd2cefc5 Author: Andrey Ignatov Date: Wed Dec 18 23:44:33 2019 -0800 bpf: Simplify __cgroup_bpf_attach __cgroup_bpf_attach has a lot of identical code to handle two scenarios: BPF_F_ALLOW_MULTI is set and unset. Simplify it by splitting the two main steps: * First, the decision is made whether a new bpf_prog_list entry should be allocated or existing entry should be reused for the new program. This decision is saved in replace_pl pointer; * Next, replace_pl pointer is used to handle both possible states of BPF_F_ALLOW_MULTI flag (set / unset) instead of doing similar work for them separately. This splitting, in turn, allows to make further simplifications: * The check for attaching same program twice in BPF_F_ALLOW_MULTI mode can be done before allocating cgroup storage, so that if user tries to attach same program twice no alloc/free happens as it was before; * pl_was_allocated becomes redundant so it's removed. Signed-off-by: Andrey Ignatov Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/c6193db6fe630797110b0d3ff06c125d093b834c.1576741281.git.rdna@fb.com commit c92bbaa0fda587c6f2397dc7d31f7f3b7b49fa77 Merge: 5bf2fc1f9c88 1170beaa3fa3 Author: Alexei Starovoitov Date: Thu Dec 19 21:09:44 2019 -0800 Merge branch 'simplify-do_redirect' Björn Töpel says: ==================== This series aims to simplify the XDP maps and xdp_do_redirect_map()/xdp_do_flush_map(), and to crank out some more performance from XDP_REDIRECT scenarios. The first part of the series simplifies all XDP_REDIRECT capable maps, so that __XXX_flush_map() does not require the map parameter, by moving the flush list from the map to global scope. This results in that the map_to_flush member can be removed from struct bpf_redirect_info, and its corresponding logic. Simpler code, and more performance due to that checks/code per-packet is moved to flush. Pre-series performance: $ sudo taskset -c 22 ./xdpsock -i enp134s0f0 -q 20 -n 1 -r -z sock0@enp134s0f0:20 rxdrop xdp-drv pps pkts 1.00 rx 20,797,350 230,942,399 tx 0 0 $ sudo ./xdp_redirect_cpu --dev enp134s0f0 --cpu 22 xdp_cpu_map0 Running XDP/eBPF prog_name:xdp_cpu_map5_lb_hash_ip_pairs XDP-cpumap CPU:to pps drop-pps extra-info XDP-RX 20 7723038 0 0 XDP-RX total 7723038 0 cpumap_kthread total 0 0 0 redirect_err total 0 0 xdp_exception total 0 0 Post-series performance: $ sudo taskset -c 22 ./xdpsock -i enp134s0f0 -q 20 -n 1 -r -z sock0@enp134s0f0:20 rxdrop xdp-drv pps pkts 1.00 rx 21,524,979 86,835,327 tx 0 0 $ sudo ./xdp_redirect_cpu --dev enp134s0f0 --cpu 22 xdp_cpu_map0 Running XDP/eBPF prog_name:xdp_cpu_map5_lb_hash_ip_pairs XDP-cpumap CPU:to pps drop-pps extra-info XDP-RX 20 7840124 0 0 XDP-RX total 7840124 0 cpumap_kthread total 0 0 0 redirect_err total 0 0 xdp_exception total 0 0 Results: +3.5% and +1.5% for the ubenchmarks. v1->v2 [1]: * Removed 'unused-variable' compiler warning (Jakub) [1] https://lore.kernel.org/bpf/20191218105400.2895-1-bjorn.topel@gmail.com/ ==================== Signed-off-by: Alexei Starovoitov commit 1170beaa3fa3c3381fd820e9d05b84d168fe1dab Author: Björn Töpel Date: Thu Dec 19 07:10:06 2019 +0100 xdp: Simplify __bpf_tx_xdp_map() The explicit error checking is not needed. Simply return the error instead. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20191219061006.21980-9-bjorn.topel@gmail.com commit 332f22a60e4c3492d4953cd6f7aaa4e8bd0bba97 Author: Björn Töpel Date: Thu Dec 19 07:10:05 2019 +0100 xdp: Remove map_to_flush and map swap detection Now that all XDP maps that can be used with bpf_redirect_map() tracks entries to be flushed in a global fashion, there is not need to track that the map has changed and flush from xdp_do_generic_map() anymore. All entries will be flushed in xdp_do_flush_map(). This means that the map_to_flush can be removed, and the corresponding checks. Moving the flush logic to one place, xdp_do_flush_map(), give a bulking behavior and performance boost. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20191219061006.21980-8-bjorn.topel@gmail.com commit cdfafe98cabefeedbbc65af5c191c59745c03298 Author: Björn Töpel Date: Thu Dec 19 07:10:04 2019 +0100 xdp: Make cpumap flush_list common for all map instances The cpumap flush list is used to track entries that need to flushed from via the xdp_do_flush_map() function. This list used to be per-map, but there is really no reason for that. Instead make the flush list global for all devmaps, which simplifies __cpu_map_flush() and cpu_map_alloc(). Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20191219061006.21980-7-bjorn.topel@gmail.com commit 96360004b8628541f5d05a845ea213267db0b1a2 Author: Björn Töpel Date: Thu Dec 19 07:10:03 2019 +0100 xdp: Make devmap flush_list common for all map instances The devmap flush list is used to track entries that need to flushed from via the xdp_do_flush_map() function. This list used to be per-map, but there is really no reason for that. Instead make the flush list global for all devmaps, which simplifies __dev_map_flush() and dev_map_init_map(). Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20191219061006.21980-6-bjorn.topel@gmail.com commit e312b9e706ed6d94f6cc9088fcd9fbd81de4525c Author: Björn Töpel Date: Thu Dec 19 07:10:02 2019 +0100 xsk: Make xskmap flush_list common for all map instances The xskmap flush list is used to track entries that need to flushed from via the xdp_do_flush_map() function. This list used to be per-map, but there is really no reason for that. Instead make the flush list global for all xskmaps, which simplifies __xsk_map_flush() and xsk_map_alloc(). Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20191219061006.21980-5-bjorn.topel@gmail.com commit fb5aacdf3603ccbafe1da74eecd132eb4a31e53f Author: Björn Töpel Date: Thu Dec 19 07:10:01 2019 +0100 xdp: Fix graze->grace type-o in cpumap comments Simple spelling fix. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20191219061006.21980-4-bjorn.topel@gmail.com commit 4bc188c7f23a5a308d7f15dda1b6a286d74e8954 Author: Björn Töpel Date: Thu Dec 19 07:10:00 2019 +0100 xdp: Simplify cpumap cleanup After the RCU flavor consolidation [1], call_rcu() and synchronize_rcu() waits for preempt-disable regions (NAPI) in addition to the read-side critical sections. As a result of this, the cleanup code in cpumap can be simplified * There is no longer a need to flush in __cpu_map_entry_free, since we know that this has been done when the call_rcu() callback is triggered. * When freeing the map, there is no need to explicitly wait for a flush. It's guaranteed to be done after the synchronize_rcu() call in cpu_map_free(). [1] https://lwn.net/Articles/777036/ Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20191219061006.21980-3-bjorn.topel@gmail.com commit 0536b85239b8440735cdd910aae0eb076ebbb439 Author: Björn Töpel Date: Thu Dec 19 07:09:59 2019 +0100 xdp: Simplify devmap cleanup After the RCU flavor consolidation [1], call_rcu() and synchronize_rcu() waits for preempt-disable regions (NAPI) in addition to the read-side critical sections. As a result of this, the cleanup code in devmap can be simplified * There is no longer a need to flush in __dev_map_entry_free, since we know that this has been done when the call_rcu() callback is triggered. * When freeing the map, there is no need to explicitly wait for a flush. It's guaranteed to be done after the synchronize_rcu() call in dev_map_free(). The rcu_barrier() is still needed, so that the map is not freed prior the elements. [1] https://lwn.net/Articles/777036/ Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20191219061006.21980-2-bjorn.topel@gmail.com commit 3dae220595baa7a9fb582b851b54c10ad6a0cbae Author: Quinn Tran Date: Tue Dec 17 14:06:10 2019 -0800 scsi: qla2xxx: Use common routine to free fcport struct This patch does not change any any functionality. Link: https://lore.kernel.org/r/20191217220617.28084-8-hmadhani@marvell.com Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 425215647fc53ba183026e03206fa86fe5a4f542 Author: Joe Carnuccio Date: Tue Dec 17 14:06:09 2019 -0800 scsi: qla2xxx: Add D-Port Diagnostic reason explanation logs This patch adds more details when D-Port diag async event is generated by the firmware. Link: https://lore.kernel.org/r/20191217220617.28084-7-hmadhani@marvell.com Signed-off-by: Joe Carnuccio Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 89eb2e7e794da2691e5aca02ed102bb287e3575a Author: Himanshu Madhani Date: Tue Dec 17 14:06:08 2019 -0800 scsi: qla2xxx: Fix update_fcport for current_topology logout_on_delete flag should not be set if the topology is Loop. This patch fixes unintentional logout during loop topology. Link: https://lore.kernel.org/r/20191217220617.28084-6-hmadhani@marvell.com Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 96a0eb7164d125100ac692c7efeb6e70a7585042 Author: Shyam Sundar Date: Tue Dec 17 14:06:07 2019 -0800 scsi: qla2xxx: Cleanup unused async_logout_done This patch removes unused qla2x00_async_logout_done from the code. Link: https://lore.kernel.org/r/20191217220617.28084-5-hmadhani@marvell.com Signed-off-by: Shyam Sundar Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 27258a5771446f9c7edc929ecb76fe2c12c29d97 Author: Shyam Sundar Date: Tue Dec 17 14:06:06 2019 -0800 scsi: qla2xxx: Add a shadow variable to hold disc_state history of fcport This patch adds a shadow variable to hold disc_state history for the fcport and prints state transition when the logging is enabled. Link: https://lore.kernel.org/r/20191217220617.28084-4-hmadhani@marvell.com Signed-off-by: Shyam Sundar Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit f57a0107359605b29f4ea9afb8ee2e03473b1448 Author: Quinn Tran Date: Tue Dec 17 14:06:05 2019 -0800 scsi: qla2xxx: Fix fabric scan hang On timeout, SRB pointer was cleared from outstanding command array and dropped. It was not allowed to go through the done process and cleanup. This patch will abort the SRB where FW will return it with an error status and resume the normal cleanup. Link: https://lore.kernel.org/r/20191217220617.28084-3-hmadhani@marvell.com Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit 3c75ad1d87c7d277c6174051b98757fe981d592d Author: Himanshu Madhani Date: Tue Dec 17 14:06:04 2019 -0800 scsi: qla2xxx: Remove defer flag to indicate immeadiate port loss During cable pull test case, if the port is disconnected for time larger than devloss timeout, driver does not mark path offline. In such case, instead of notifying SCSI-ML of loop down, driver goes into endless loop of device relogin because defer flag is set. With newer handling of device relogin in driver discovery, defer flag is now redundant. This patch removes defer flag and cleans up code handling port lost indication to SCSI-ML. Link: https://lore.kernel.org/r/20191217220617.28084-2-hmadhani@marvell.com Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Martin K. Petersen commit d8dd7d768131010cb6e064036bf525db68ce78b8 Author: Thomas Hellstrom Date: Tue Dec 3 20:30:52 2019 +0100 scsi: vmw_pvscsi: Silence dma mapping errors These errors typically occur with swiotlb when the swiotlb buffer is full. But they are transient and would typically unnecessarily worry a user. Instead of errors, print debug messages. Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Link: https://lore.kernel.org/r/20191203193052.7583-2-thomas_os@shipmail.org Acked-by: Jim Gill Signed-off-by: Thomas Hellstrom Signed-off-by: Martin K. Petersen commit f4652752a428f65936a7da5884095ef43a3cac18 Author: Thomas Hellstrom Date: Tue Dec 3 20:30:51 2019 +0100 scsi: vmw_pvscsi: Fix swiotlb operation With swiotlb, the first byte of the sense buffer may in some cases be uninitialized since we use DMA_FROM_DEVICE, and the device incorrectly doesn't clear it. In those cases, clear it after DMA unmapping. Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Link: https://lore.kernel.org/r/20191203193052.7583-1-thomas_os@shipmail.org Suggested-by: Vishal Bhakta Acked-by: Jim Gill Signed-off-by: Thomas Hellstrom Signed-off-by: Martin K. Petersen commit a808a04c861782e31fc30e342a619c144aaee14a Author: Nathan Chancellor Date: Tue Dec 17 18:47:26 2019 -0700 scsi: csiostor: Adjust indentation in csio_device_reset Clang warns: ../drivers/scsi/csiostor/csio_scsi.c:1386:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] csio_lnodes_exit(hw, 1); ^ ../drivers/scsi/csiostor/csio_scsi.c:1382:2: note: previous statement is here if (*buf != '1') ^ 1 warning generated. This warning occurs because there is a space after the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns. Fixes: a3667aaed569 ("[SCSI] csiostor: Chelsio FCoE offload driver") Link: https://github.com/ClangBuiltLinux/linux/issues/818 Link: https://lore.kernel.org/r/20191218014726.8455-1-natechancellor@gmail.com Signed-off-by: Nathan Chancellor Signed-off-by: Martin K. Petersen commit 4dbc96ad65c45cdd4e895ed7ae4c151b780790c5 Author: Nathan Chancellor Date: Tue Dec 17 18:42:20 2019 -0700 scsi: aic7xxx: Adjust indentation in ahc_find_syncrate Clang warns: ../drivers/scsi/aic7xxx/aic7xxx_core.c:2317:5: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] if ((syncrate->sxfr_u2 & ST_SXFR) != 0) ^ ../drivers/scsi/aic7xxx/aic7xxx_core.c:2310:4: note: previous statement is here if (syncrate == &ahc_syncrates[maxsync]) ^ 1 warning generated. This warning occurs because there is a space amongst the tabs on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns. This has been a problem since the beginning of git history hence no fixes tag. Link: https://github.com/ClangBuiltLinux/linux/issues/817 Link: https://lore.kernel.org/r/20191218014220.52746-1-natechancellor@gmail.com Signed-off-by: Nathan Chancellor Signed-off-by: Martin K. Petersen commit aa8679736a82386551eb9f3ea0e6ebe2c0e99104 Author: Nathan Chancellor Date: Tue Dec 17 18:52:52 2019 -0700 scsi: qla4xxx: Adjust indentation in qla4xxx_mem_free Clang warns: ../drivers/scsi/qla4xxx/ql4_os.c:4148:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] if (ha->fw_dump) ^ ../drivers/scsi/qla4xxx/ql4_os.c:4144:2: note: previous statement is here if (ha->queues) ^ 1 warning generated. This warning occurs because there is a space after the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns. Fixes: 068237c87c64 ("[SCSI] qla4xxx: Capture minidump for ISP82XX on firmware failure") Link: https://github.com/ClangBuiltLinux/linux/issues/819 Link: https://lore.kernel.org/r/20191218015252.20890-1-natechancellor@gmail.com Acked-by: Manish Rangankar Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Martin K. Petersen commit 52b894393cecdc303990e834778d39b85d0553fc Author: Aditya Pakki Date: Tue Dec 17 15:22:13 2019 -0600 scsi: libfc: remove unnecessary assertion on ep variable In ft_recv_write_data(), the pointer ep is dereferenced first and then asserts for NULL. The patch removes the unnecessary assertion. Link: https://lore.kernel.org/r/20191217212214.30722-1-pakki001@umn.edu Reviewed-by: Hannes Reinecke Signed-off-by: Aditya Pakki Signed-off-by: Martin K. Petersen commit 0c3dbdeb72842ffd09cd23a28b4cf100e2ea4109 Author: Chen Zhou Date: Tue Dec 17 21:43:09 2019 +0800 scsi: initio: make initio_state_7() static Fix sparse warning: drivers/scsi/initio.c:1643:5: warning: symbol 'initio_state_7' was not declared. Should it be static? Link: https://lore.kernel.org/r/20191217134309.41649-1-chenzhou10@huawei.com Reported-by: Hulk Robot Signed-off-by: Chen Zhou Signed-off-by: Martin K. Petersen commit 4aca8fe7716669e39f7857b2e1fc5dfd4475b7e5 Author: Chen Zhou Date: Fri Dec 13 14:40:42 2019 +0800 scsi: ibmvscsi_tgt: remove set but not used variables 'iue' and 'sd' Fixes gcc '-Wunused-but-set-variable' warning: drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c: In function ibmvscsis_send_messages: drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:1888:19: warning: variable iue set but not used [-Wunused-but-set-variable] drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c: In function ibmvscsis_queue_data_in: drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:3806:8: warning: variable sd set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20191213064042.161840-1-chenzhou10@huawei.com Reported-by: Hulk Robot Signed-off-by: Chen Zhou Signed-off-by: Martin K. Petersen commit 08fcc87bd0df7be62752b041592db414ba2a4f04 Author: Chen Zhou Date: Thu Dec 12 10:35:56 2019 +0800 scsi: sym53c8xx: fix typos in comments Fix the typo "GPOI" -> "GPIO" in comment. Link: https://lore.kernel.org/r/20191212023556.72618-1-chenzhou10@huawei.com Signed-off-by: Chen Zhou Signed-off-by: Martin K. Petersen commit 43d23b94e5e863909b397c8b962f268ea2656ee4 Author: Bart Van Assche Date: Mon Dec 9 09:42:05 2019 -0800 scsi: core: Fix a compiler warning triggered by the SCSI logging code This patch fixes the following compiler warning: In file included from drivers/scsi/scsi_error.c:46: drivers/scsi/scsi_error.c: In function 'scsi_eh_target_reset': drivers/scsi/scsi_logging.h:65:81: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] 65 | LOGGING(SCSI_LOG_ERROR_SHIFT, SCSI_LOG_ERROR_BITS, LEVEL,CMD); | ^ drivers/scsi/scsi_error.c:1562:4: note: in expansion of macro 'SCSI_LOG_ERROR_RECOVERY' 1562 | SCSI_LOG_ERROR_RECOVERY(3, | ^~~~~~~~~~~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20191209174205.190025-1-bvanassche@acm.org Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 0786669c31c91549bd910a9f90553491fc3f256a Author: Sheeba B Date: Mon Dec 16 11:17:12 2019 +0100 scsi: ufs: Power off hook for Cadence UFS driver Attach power off hook to Cadence UFS driver. Link: https://lore.kernel.org/r/1576491432-631-1-git-send-email-sheebab@cadence.com Reviewed-by: Avri Altman Reviewed-by: Alim Akhtar Signed-off-by: Sheeba B Signed-off-by: Martin K. Petersen commit 8b0bbf002a1eb9074ab770e21cd454137c76c106 Author: Stanley Chu Date: Sat Dec 7 20:22:01 2019 +0800 scsi: ufs: disable interrupt during clock-gating Similar to suspend, ufshcd interrupt can be disabled since there won't be any host controller transaction expected till clocks ungated. Link: https://lore.kernel.org/r/1575721321-8071-3-git-send-email-stanley.chu@mediatek.com Reviewed-by: Asutosh Das Reviewed-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit dcb6cec508277807f57422dc07084e3a78890946 Author: Stanley Chu Date: Sat Dec 7 20:22:00 2019 +0800 scsi: ufs: disable irq before disabling clocks During suspend flow, interrupt shall be disabled before disabling clocks to avoid potential system hang due to accessing host registers after host clocks are disabled. For example, if an interrupt comes with IRQF_IRQPOLL flag configured with the misrouted interrupt recovery feature enabled, ufshcd ISR may be triggered even if nothing shall be done for UFS. In this case, system hang may happen if UFS interrupt status register is accessed with host clocks disabled. Link: https://lore.kernel.org/r/1575721321-8071-2-git-send-email-stanley.chu@mediatek.com Reviewed-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit dc30c9e6d67f9edb02d543e1f213f3250bfa3a78 Author: Dan Carpenter Date: Fri Dec 13 13:49:35 2019 +0300 scsi: ufs: Simplify a condition We know that "check_for_bkops" is non-zero on this side of the || because it was checked on the other side. Link: https://lore.kernel.org/r/20191213104935.wgpq2epaz6zh5zus@kili.mountain Reviewed-by: Bart Van Assche Reviewed-by: Avri Altman Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit bb14dd1564c90d333f51e69dd6fc880b8233ce11 Author: Dan Carpenter Date: Fri Dec 13 13:48:28 2019 +0300 scsi: ufs: Unlock on a couple error paths We introduced a few new error paths, but we can't return directly, we first have to unlock "hba->clk_scaling_lock" first. Fixes: a276c19e3e98 ("scsi: ufs: Avoid busy-waiting by eliminating tag conflicts") Link: https://lore.kernel.org/r/20191213104828.7i64cpoof26rc4fw@kili.mountain Reviewed-by: Bart Van Assche Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit e89fbc7feb0013b4ec8145c726c44ded56065216 Author: Sheeba B Date: Fri Dec 6 05:25:03 2019 +0100 scsi: ufs: Update L4 attributes on manual hibern8 exit in Cadence UFS. Backup L4 attributes duirng manual hibern8 entry and restore the L4 attributes on manual hibern8 exit as per JESD220C. Link: https://lore.kernel.org/r/1575606303-10917-1-git-send-email-sheebab@cadence.com Reviewed-by: Alim Akhtar Tested-by: Vignesh Raghavendra Signed-off-by: Sheeba B Signed-off-by: Martin K. Petersen commit fc0a9de2f40dc7efe9daf411efc1436811403402 Author: Bean Huo Date: Thu Dec 5 23:09:12 2019 +0100 scsi: ufs: delete unused structure filed tr Delete unused structure field tr in structure utp_upiu_req, since no person uses it for task management. Fixes: df032bf27a41 ("scsi: ufs: Add a bsg endpoint that supports UPIUs") Link: https://lore.kernel.org/r/20191205220912.5696-1-huobean@gmail.com Reviewed-by: Avri Altman Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 5231d38c16f0896171b45133d4ea6f6bc6610c82 Author: Can Guo Date: Thu Dec 5 02:14:46 2019 +0000 scsi: ufs: Do not free irq in suspend Since ufshcd irq resource is allocated with the device resource management aware IRQ request implementation, we don't really need to free up irq during suspend, disabling it during suspend and reenabling it during resume should be good enough. Link: https://lore.kernel.org/r/0101016ed3d69793-22918f99-23bf-495d-8a36-a9c108d1cbce-000000@us-west-2.amazonses.com Reviewed-by: Stanley Chu Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 0834253734cbb40c312c06e5beb9b94ac7cf5e80 Author: Can Guo Date: Thu Dec 5 02:14:42 2019 +0000 scsi: ufs: Do not clear the DL layer timers During power mode change, PACP_PWR_Req frame sends PAPowerModeUserData parameters (and they are considered valid by device if Flags[4] - UserDataValid bit is set in the same frame). Currently we don't set these PAPowerModeUserData parameters and hardware always sets UserDataValid bit which would clear all the DL layer timeout values of the peer device after the power mode change. This change sets the PAPowerModeUserData[0..5] to UniPro specification recommended default values, in addition we are also setting the relevant DME_LOCAL_* timer attributes as required by UFS HCI specification. Link: https://lore.kernel.org/r/0101016ed3d688a4-cfaeb1c9-238b-46c4-9c89-d48c410ba325-000000@us-west-2.amazonses.com Reviewed-by: Avri Altman Reviewed-by: Bean Huo Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 17c7d35f141ef6158076adf3338f115f64fcf760 Author: Can Guo Date: Thu Dec 5 02:14:33 2019 +0000 scsi: ufs: Release clock if DMA map fails In queuecommand path, if DMA map fails, it bails out with clock held. In this case, release the clock to keep its usage paired. [mkp: applied by hand] Link: https://lore.kernel.org/r/0101016ed3d66395-1b7e7fce-b74d-42ca-a88a-4db78b795d3b-000000@us-west-2.amazonses.com Reviewed-by: Bean Huo Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit a3a763917216992b8b1b2cc1b4fadb27c660fe70 Author: Can Guo Date: Thu Dec 5 02:14:30 2019 +0000 scsi: ufs: Use DBD setting in mode sense UFS standard requires DBD field to be set to 1 in MODE SENSE(10). Some card vendors are more strict and check the DBD field, hence respond with CHECK_CONDITION (Sense key set to ILLEGAL_REQUEST and ASC set to INVALID FIELD IN CDB). When host sends MODE SENSE for page caching, as a result of the CHECK_CONDITION response, host assumes that the device doesn't support the cache feature and doesn't send SYNCHRONIZE_CACHE commands to flush the device cache. This can result in data corruption in case of sudden power down when there is data stored in the device cache. This patch fixes the DBD field setting as required in UFS standard. Link: https://lore.kernel.org/r/0101016ed3d657e4-32a6dd52-1505-4312-97ff-2bd3bee59eb7-000000@us-west-2.amazonses.com Reviewed-by: Bean Huo Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 0ec96913344de9efdb388720247ea9f207bdc3aa Author: Can Guo Date: Thu Dec 5 02:14:25 2019 +0000 scsi: core: Adjust DBD setting in MODE SENSE for caching mode page per LLD UFS JEDEC standards require DBD field to be set to 1 in mode sense command. This patch allows LLD to define the setting of DBD, if required. Link: https://lore.kernel.org/r/0101016ed3d643f9-ffd45d6c-c593-4a13-a18f-a32da3d3bb97-000000@us-west-2.amazonses.com Reviewed-by: Avri Altman Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 2df74b6985b51e77756e2e8faa16c45ca3ba53c5 Author: Can Guo Date: Mon Nov 25 22:53:33 2019 -0800 scsi: ufs: Complete pending requests in host reset and restore path In UFS host reset and restore path, before probe, we stop and start the host controller once. After host controller is stopped, the pending requests, if any, are cleared from the doorbell, but no completion IRQ would be raised due to the hba is stopped. These pending requests shall be completed along with the first NOP_OUT command (as it is the first command which can raise a transfer completion IRQ) sent during probe. Since the OCSs of these pending requests are not SUCCESS (because they are not yet literally finished), their UPIUs shall be dumped. When there are multiple pending requests, the UPIU dump can be overwhelming and may lead to stability issues because it is in atomic context. Therefore, before probe, complete these pending requests right after host controller is stopped and silence the UPIU dump from them. Link: https://lore.kernel.org/r/1574751214-8321-5-git-send-email-cang@qti.qualcomm.com Reviewed-by: Alim Akhtar Reviewed-by: Bean Huo Tested-by: Bean Huo Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 74a527a2ab1c5c09f7bf37cfb00a93b6d75fbda7 Author: Can Guo Date: Mon Nov 25 22:53:32 2019 -0800 scsi: ufs: Avoid messing up the compl_time_stamp of lrbs To be on the safe side, do not touch lrb after clearing its slot in the lrb_in_use bitmap to avoid messing up the next task which would possibly occupy this lrb. [mkp: applied by hand] Link: https://lore.kernel.org/r/1574751214-8321-4-git-send-email-cang@qti.qualcomm.com Reviewed by: Avri Altman Reviewed-by: Bean Huo Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit a7ef6f029a7658f2d9b9a78b3b1d8f4cb981bbdf Author: Can Guo Date: Mon Nov 25 22:53:31 2019 -0800 scsi: ufs: Update VCCQ2 and VCCQ min/max voltage hard codes Per UFS 3.0 JEDEC standard, the VCCQ2 min voltage is 1.7v and the VCCQ voltage range is 1.14v ~ 1.26v. Update their hard codes accordingly to make sure they work in a safe range compliant for ver 1.0/1.1/2.0/2.1/3.0 UFS devices. Link: https://lore.kernel.org/r/1574751214-8321-3-git-send-email-cang@qti.qualcomm.com Reviewed-by: Bean Huo Reviewed-by: Avri Altman Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 24366c2afbb0539fb14eff330d4e3a5db5c0a3ef Author: Asutosh Das Date: Mon Nov 25 22:53:30 2019 -0800 scsi: ufs: Recheck bkops level if bkops is disabled bkops level should be rechecked upon receiving an exception. Currently the level is being cached and never updated. Update bkops each time the level is checked. Also do not use the cached bkops level value if it is disabled and then enabled. Fixes: afdfff59a0e0 (scsi: ufs: handle non spec compliant bkops behaviour by device) Link: https://lore.kernel.org/r/1574751214-8321-2-git-send-email-cang@qti.qualcomm.com Reviewed-by: Bean Huo Reviewed-by: Alim Akhtar Tested-by: Alim Akhtar Signed-off-by: Asutosh Das Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 69a6c269c097d780a2db320ecd47f7a62fafd92e Author: Bart Van Assche Date: Mon Dec 9 10:13:09 2019 -0800 scsi: ufs: Use blk_{get,put}_request() to allocate and free TMFs Manage TMF tags with blk_{get,put}_request() instead of ufshcd_get_tm_free_slot() / ufshcd_put_tm_slot(). Store a per-request completion pointer in request.end_io_data instead of using a waitqueue to report TMF completion. Cc: Can Guo Cc: Stanley Chu Cc: Avri Altman Cc: Tomas Winkler Link: https://lore.kernel.org/r/20191209181309.196233-3-bvanassche@acm.org Tested-by: Bean Huo Reviewed-by: Avri Altman Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 7252a3603015f1fd04363956f4b72a537c9f9c42 Author: Bart Van Assche Date: Mon Dec 9 10:13:08 2019 -0800 scsi: ufs: Avoid busy-waiting by eliminating tag conflicts Instead of tracking which tags are in use in the ufs_hba.lrb_in_use bitmask, rely on the block layer tag allocation mechanism. This patch removes the following busy-waiting loop if ufshcd_issue_devman_upiu_cmd() and the block layer accidentally allocate the same tag for a SCSI request: * ufshcd_queuecommand() returns SCSI_MLQUEUE_HOST_BUSY. * The SCSI core requeues the SCSI command. Cc: Can Guo Cc: Stanley Chu Cc: Avri Altman Cc: Tomas Winkler Link: https://lore.kernel.org/r/20191209181309.196233-2-bvanassche@acm.org Tested-by: Bean Huo Reviewed-by: Avri Altman Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit bd40726153c646ed28f830e22a27f5e831b77017 Author: Kars de Jong Date: Tue Nov 19 21:20:21 2019 +0100 scsi: esp_scsi: Add support for FSC chip The FSC (NCR53CF9x-2 / SYM53CF9x-2) has a different family code than QLogic or Emulex parts. This caused it to be detected as a FAS100A. Unforunately, this meant the configuration of the CONFIG3 register was incorrect. This causes data transfer issues with FAST-SCSI targets. The FSC also has the CONFIG4 register. It can be used to enable a feature called Active Negation which should always be enabled according to the data manual. Link: https://lore.kernel.org/r/20191119202021.28720-3-jongk@linux-m68k.org Reviewed-by: Finn Thain Signed-off-by: Kars de Jong Signed-off-by: Martin K. Petersen commit 2086faae3c55a652cfbd369e18ecdb703aacc493 Author: Kars de Jong Date: Tue Nov 19 21:20:20 2019 +0100 scsi: esp_scsi: Correct ordering of PCSCSI definition in esp_rev enum The order of the definitions in the esp_rev enum is important. The values are used in comparisons for chip features. Add a comment to the enum explaining this. Also, the actual values for the enum fields are irrelevant, so remove the explicit values (suggested by Geert Uytterhoeven). This makes adding a new field in the middle of the enum easier. Finally, move the PCSCSI definition to the right place in the enum. In its previous location, at the end of the enum, the wrong values are written to the CONFIG3 register when used with FAST-SCSI targets. Link: https://lore.kernel.org/r/20191119202021.28720-2-jongk@linux-m68k.org Signed-off-by: Kars de Jong Signed-off-by: Martin K. Petersen commit 364d5814b9dd40f6219e7673466c2e18becd62ca Author: Arnd Bergmann Date: Mon Nov 4 16:51:55 2019 +0100 nfsd: remove nfs4_reset_lease() declarations The function was removed a long time ago, but the declaration and a dummy implementation are still there, referencing the deprecated time_t type. Remove both. Fixes: f958a1320ff7 ("nfsd4: remove unnecessary lease-setting function") Signed-off-by: Arnd Bergmann Signed-off-by: J. Bruce Fields commit 9104ae494e67305c11f5793b82cc768e0f09cea9 Author: Arnd Bergmann Date: Mon Nov 4 16:45:30 2019 +0100 nfsd: use ktime_get_real_seconds() in nfs4_verifier gen_confirm() generates a unique identifier based on the current time. This overflows in year 2038, but that is harmless since it generally does not lead to duplicates, as long as the time has been initialized by a real-time clock or NTP. Using ktime_get_boottime_seconds() or ktime_get_seconds() would avoid the overflow, but it would be more likely to result in non-unique numbers. Signed-off-by: Arnd Bergmann Signed-off-by: J. Bruce Fields commit 20b7d86f29d39e8ae19bb29c24ffee70dc385ddf Author: Arnd Bergmann Date: Mon Nov 4 16:31:52 2019 +0100 nfsd: use boottime for lease expiry calculation A couple of time_t variables are only used to track the state of the lease time and its expiration. The code correctly uses the 'time_after()' macro to make this work on 32-bit architectures even beyond year 2038, but the get_seconds() function and the time_t type itself are deprecated as they behave inconsistently between 32-bit and 64-bit architectures and often lead to code that is not y2038 safe. As a minor issue, using get_seconds() leads to problems with concurrent settimeofday() or clock_settime() calls, in the worst case timeout never triggering after the time has been set backwards. Change nfsd to use time64_t and ktime_get_boottime_seconds() here. This is clearly excessive, as boottime by itself means we never go beyond 32 bits, but it does mean we handle this correctly and consistently without having to worry about corner cases and should be no more expensive than the previous implementation on 64-bit architectures. The max_cb_time() function gets changed in order to avoid an expensive 64-bit division operation, but as the lease time is at most one hour, there is no change in behavior. Also do the same for server-to-server copy expiration time. Signed-off-by: Arnd Bergmann [bfields@redhat.com: fix up copy expiration] Signed-off-by: J. Bruce Fields commit f5ab220d162c20c105e7e38852fffe5767679bec Author: Sibi Sankar Date: Wed Dec 18 20:03:32 2019 +0530 arm64: dts: qcom: sc7180: Add remoteproc enablers Add scm, smem, smp2p, aoss-qmp, aoss-cc and pdc-global device nodes to SC7180 SoCs. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20191218143332.29107-1-sibis@codeaurora.org [bjorn: Updated subject] Signed-off-by: Bjorn Andersson commit 5080832627b65e3772a35d1dced68c64e2b24442 Author: Nathan Chancellor Date: Tue Dec 17 18:21:52 2019 -0700 NFC: pn544: Adjust indentation in pn544_hci_check_presence Clang warns ../drivers/nfc/pn544/pn544.c:696:4: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] return nfc_hci_send_cmd(hdev, NFC_HCI_RF_READER_A_GATE, ^ ../drivers/nfc/pn544/pn544.c:692:3: note: previous statement is here if (target->nfcid1_len != 4 && target->nfcid1_len != 7 && ^ 1 warning generated. This warning occurs because there is a space after the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns. Fixes: da052850b911 ("NFC: Add pn544 presence check for different targets") Link: https://github.com/ClangBuiltLinux/linux/issues/814 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit 373e8c278da2128b74c5ebaa0a5c2c440514ec50 Merge: d63b542c625c f1af17c0b7a5 Author: David S. Miller Date: Thu Dec 19 18:11:10 2019 -0800 Merge branch 'bcmgenet-Turn-on-offloads-by-default' Doug Berger says: ==================== net: bcmgenet: Turn on offloads by default This commit stack is based on Florian's commit 4e8aedfe78c7 ("net: systemport: Turn on offloads by default") and enables the offloads for the bcmgenet driver by default. The first commit adds support for the HIGHDMA feature to the driver. The second converts the Tx checksum implementation to use the generic hardware logic rather than the deprecated IP centric methods. The third modifies the Rx checksum implementation to use the hardware offload to compute the complete checksum rather than filtering out bad packets detected by the hardware's IP centric implementation. This may increase processing load by passing bad packets to the network stack, but it provides for more flexible handling of packets by the network stack without requiring software computation of the checksum. The remaining commits mirror the extensions Florian made to the sysport driver to retain symmetry with that driver and to make the benefits of the hardware offloads more ubiquitous. ==================== Signed-off-by: David S. Miller commit f1af17c0b7a51357699bba7c8cba1276c9486907 Author: Doug Berger Date: Tue Dec 17 16:51:15 2019 -0800 net: bcmgenet: Add software counters to track reallocations When inserting the TSB, keep track of how many times we had to do it and if there was a failure in doing so, this helps profile the driver for possibly incorrect headroom settings. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit e3fa85883d1566d788960c0f31866a26c898c070 Author: Doug Berger Date: Tue Dec 17 16:51:14 2019 -0800 net: bcmgenet: Be drop monitor friendly while re-allocating headroom During bcmgenet_put_tx_csum() make sure we differentiate a SKB headroom re-allocation failure from the normal swap and replace path. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit ae895c49905cd99aca24d23361b72ed559b30f4f Author: Doug Berger Date: Tue Dec 17 16:51:13 2019 -0800 net: bcmgenet: Turn on offloads by default We can turn on the RX/TX checksum offloads and the scatter/gather features by default and make sure that those are properly reflected back to e.g: stacked devices such as VLAN. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 206f54b66cbf6f71e9e86f50f60ffdf7f565c3b7 Author: Doug Berger Date: Tue Dec 17 16:51:12 2019 -0800 net: bcmgenet: Utilize bcmgenet_set_features() during resume/open During driver resume and open, the HW may have lost its context/state, utilize bcmgenet_set_features() to make sure we do restore the correct set of features that were previously configured. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit f63db4efdd50a2b67b97336fde67661af8af112b Author: Doug Berger Date: Tue Dec 17 16:51:11 2019 -0800 net: bcmgenet: Refactor bcmgenet_set_features() In preparation for unconditionally enabling TX and RX checksum offloads, refactor bcmgenet_set_features() a bit such that __netdev_update_features() during register_netdev() can make sure that features are correctly programmed during network device registration. Since we can now be called during register_netdev() with clocks gated, we need to temporarily turn them on/off in order to have a successful register programming. We also move the CRC forward setting read into bcmgenet_set_features() since priv->crc_fwd_en matters while turning on RX checksum offload, that way we are guaranteed they are in sync in case we ever add support for NETIF_F_RXFCS at some point in the future. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 810155397890ecdea23868ef0ed10cb80134997f Author: Doug Berger Date: Tue Dec 17 16:51:10 2019 -0800 net: bcmgenet: use CHECKSUM_COMPLETE for NETIF_F_RXCSUM This commit updates the Rx checksum offload behavior of the driver to use the more generic CHECKSUM_COMPLETE method that supports all protocols over the CHECKSUM_UNNECESSARY method that only applies to some protocols known by the hardware. This behavior is perceived to be superior. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit dd8e911b7f2af2315184a8e551ca77ff226a4ec5 Author: Doug Berger Date: Tue Dec 17 16:51:09 2019 -0800 net: bcmgenet: enable NETIF_F_HW_CSUM feature The GENET hardware should be capable of generating IP checksums using the NETIF_F_HW_CSUM feature, so switch to using that feature instead of the depricated NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 99d55638d4b053c549c924959747c58392b2dbea Author: Doug Berger Date: Tue Dec 17 16:51:08 2019 -0800 net: bcmgenet: enable NETIF_F_HIGHDMA flag This commit configures the DMA masks for the GENET driver and sets the NETIF_F_HIGHDMA flag to report support of the feature. Signed-off-by: Doug Berger Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit d63b542c625c4af8f78f227b2749b87ca6acdb37 Author: Florian Fainelli Date: Tue Dec 17 16:29:50 2019 -0800 net: systemport: Set correct DMA mask SYSTEMPORT is capabable of doing up to 40-bit of physical addresses, set an appropriate DMA mask to permit that. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 5f04a6d8dfe804844c2f29c0a7f407d06202912c Merge: 8fb0d2ced978 6a35ddc5445a Author: David S. Miller Date: Thu Dec 19 17:46:51 2019 -0800 Merge branch 'nfp-tls-implement-the-stream-sync-RX-resync' Jakub Kicinski says: ==================== nfp: tls: implement the stream sync RX resync This small series adds support for using the device in stream scan RX resync mode which improves the RX resync success rate. Without stream scan it's pretty much impossible to successfully resync a continuous stream. ==================== Signed-off-by: David S. Miller commit 6a35ddc5445a8291ced6247a67977e110275acde Author: Jakub Kicinski Date: Tue Dec 17 14:12:02 2019 -0800 nfp: tls: implement the stream sync RX resync The simple RX resync strategy controlled by the kernel does not guarantee as good results as if the device helps by detecting the potential record boundaries and keeping track of them. We've called this strategy stream scan in the tls-offload doc. Implement this strategy for the NFP. The device sends a request for record boundary confirmation, which is then recorded in per-TLS socket state and responded to once record is reached. Because the device keeps track of records passing after the request was sent the response is not as latency sensitive as when kernel just tries to tell the device the information about the next record. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 8d5a49e9e31ba1ddd34a54b2351d068a90c78707 Author: Jakub Kicinski Date: Tue Dec 17 14:12:01 2019 -0800 net/tls: add helper for testing if socket is RX offloaded There is currently no way for driver to reliably check that the socket it has looked up is in fact RX offloaded. Add a helper. This allows drivers to catch misbehaving firmware. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 572c7245182a200e3ac69bb86a0e60cc34c34dc9 Author: Jakub Kicinski Date: Tue Dec 17 14:12:00 2019 -0800 nfp: pass packet pointer to nfp_net_parse_meta() Make nfp_net_parse_meta() take a packet pointer and return a drop/no drop decision. Right now it returns the end of metadata and caller compares it to the packet pointer. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 8fb0d2ced9786f9267713e2aef6dc58b3ef93d62 Merge: a886ca6fcfff 783461604f7e Author: David S. Miller Date: Thu Dec 19 17:37:13 2019 -0800 Merge branch 'nfp-ipv6-tunnel' John Hurley says: ==================== Add ipv6 tunnel support to NFP The following patches add support for IPv6 tunnel offload to the NFP driver. Patches 1-2 do some code tidy up and prepare existing code for reuse in IPv6 tunnels. Patches 3-4 handle IPv6 tunnel decap (match) rules. Patches 5-8 handle encap (action) rules. Patch 9 adds IPv6 support to the merge and pre-tunnel rule functions. v1->v2: - fix compiler warning when building without CONFIG_IPV6 set - Jakub Kicinski (patch 7) ==================== Signed-off-by: David S. Miller commit 783461604f7e3c7b4df9c653bf3db165cb9e3326 Author: John Hurley Date: Tue Dec 17 21:57:24 2019 +0000 nfp: flower: update flow merge code to support IPv6 tunnels Both pre-tunnel match rules and flow merge functions parse compiled match/action fields for validation. Update these validation functions to include IPv6 match and action fields. Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 9ea9bfa12240650feba7648dbb7f334dac8ba757 Author: John Hurley Date: Tue Dec 17 21:57:23 2019 +0000 nfp: flower: support ipv6 tunnel keep-alive messages from fw FW sends an update of IPv6 tunnels that are active in a given period. Use this information to update the kernel table so that neighbour entries do not time out when active on the NIC. Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 6c463a059f626bc2115b17bee97f014f59dd844a Author: John Hurley Date: Tue Dec 17 21:57:22 2019 +0000 nfp: flower: handle notifiers for ipv6 route changes A notifier is used to track route changes in the kernel. If a change is made to a route that is offloaded to fw then an update is sent to the NIC. The driver tracks all routes that are offloaded to determine if a kernel change is of interest. Extend the notifier to track IPv6 route changes and create a new list that stores offloaded IPv6 routes. Modify the IPv4 route helper functions to accept varying address lengths. This way, the same core functions can be used to handle IPv4 and IPv6. Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 50b1c86ab0a07509fd65c92acacf281fb72a285b Author: John Hurley Date: Tue Dec 17 21:57:21 2019 +0000 nfp: flower: handle ipv6 tunnel no neigh request When fw does not know the next hop for an IPv6 tunnel, it sends a request to the driver. Handle this request by doing a route lookup on the IPv6 address and offloading the next hop to the fw neighbour table. Similar functions already exist to handle IPv4 no neighbour requests. To avoid confusion, append these functions with the _ipv4 tag. There is no change in functionality with this. Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 1922c9a4e273fd0934f82d9d80c69d53658a1c9d Author: John Hurley Date: Tue Dec 17 21:57:20 2019 +0000 nfp: flower: modify pre-tunnel and set tunnel action for ipv6 The IPv4 set tunnel action allows the setting of tunnel metadata such as the TTL and ToS values. The pre-tunnel action includes the destination IP address and is used to calculate the next hop from from the neighbour table. Much of the IPv4 tunnel actions can be reused for IPv6 tunnels. Change the names of associated functions and structs to remove the IPv4 identifier and make minor modifcations to support IPv6 tunnel actions. Ensure the pre-tunnel action contains the IPv6 address along with an identifying flag when an IPv6 tunnel action is required. Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit cfa189934231a2c7922ad9e15561b5b01ea5e82e Author: John Hurley Date: Tue Dec 17 21:57:19 2019 +0000 nfp: flower: offload list of IPv6 tunnel endpoint addresses Fw requires a list of IPv6 addresses that are used as tunnel endpoints to enable correct decap of tunneled packets. Store a list of IPv6 endpoints used in rules with a ref counter to track how many times it is in use. Offload the entire list any time a new IPv6 address is added or when an address is removed (ref count is 0). Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 78a722af4ad9cb2d82f230f697220af5aa6723c1 Author: John Hurley Date: Tue Dec 17 21:57:18 2019 +0000 nfp: flower: compile match for IPv6 tunnels IPv6 tunnel matches are now supported by firmware. Modify the NFP driver to compile these match rules. IPv6 matches are handled similar to IPv4 tunnels with the difference the address length. The type of tunnel is indicated by the same bitmap that is used in IPv4 with an extra bit signifying that the IPv6 variation should be used. Only compile IPv6 tunnel matches when the fw features symbol indicated that they are compatible with the currently loaded fw. Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 77a5f73a8b337c22ccadefbed30d2a36425388d1 Author: John Hurley Date: Tue Dec 17 21:57:17 2019 +0000 nfp: flower: move udp tunnel key match compilation to helper function IPv4 UDP and GRE tunnel match rule compile helpers share functions for compiling fields such as IP addresses. However, they handle fields such tunnel IDs differently. Create new helper functions for compiling GRE and UDP tunnel key data. This is in preparation for supporting IPv6 tunnels where these new functions can be reused. This patch does not change functionality. Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 31c491e56ad1ad769e09f6971d267834bfc9bc39 Author: John Hurley Date: Tue Dec 17 21:57:16 2019 +0000 nfp: flower: pass flow rule pointer directly to match functions In kernel 5.1, the flow offload API was introduced along with a helper function to extract the flow_rule from the TC offload struct. Each of the match helper functions are passed the offload struct and extract the flow rule to a local variable. Simplify the code while also removing the extra compat and local variable calls by extracting the rule once in the main match handler, and passing a reference to the rule direct to each helper. This patch does not change driver functionality. Signed-off-by: John Hurley Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit a886ca6fcfffd337482352f383c1002c72786b17 Author: Aditya Pakki Date: Tue Dec 17 15:06:19 2019 -0600 hdlcdrv: replace unnecessary assertion in hdlcdrv_register In hdlcdrv_register, failure to register the driver causes a crash. The three callers of hdlcdrv_register all pass valid pointers and do not fail. The patch eliminates the unnecessary BUG_ON assertion. Signed-off-by: Aditya Pakki Signed-off-by: David S. Miller commit d5e1935381a156be1e79b4229172bee7ff550ded Author: Chris Wilson Date: Thu Dec 19 23:29:32 2019 +0000 drm/i915/gt: Teach veng to defer the context allocation Since we added the context_alloc callback to intel_context_ops, we can safely install a custom hook for the deferred virtual context allocation. This means that all new contexts behave the same upon creation, simplifying later code. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191219232932.189197-1-chris@chris-wilson.co.uk commit 6791c102602b428b729890f6a38a319dfe225aba Author: Russell King Date: Tue Dec 17 15:47:36 2019 +0000 net: mvpp2: cycle comphy to power it down Presently, at boot time, the comphys are enabled. For firmware compatibility reasons, the comphy driver does not power down the comphys at boot. Consequently, the ethernet comphys are left active until the network interfaces are brought through an up/down cycle. If the port is never used, the port wastes power needlessly. Arrange for the ethernet comphys to be cycled by the mvpp2 driver as if the interface went through an up/down cycle during driver probe, thereby powering them down. This saves: 270mW per 10G SFP+ port on the Macchiatobin Single Shot (eth0/eth1) 370mW per 10G PHY port on the Macchiatobin Double Shot (eth0/eth1) 160mW on the SFP port on either Macchiatobin flavour (eth3) Signed-off-by: Russell King Acked-by: Antoine Tenart Signed-off-by: David S. Miller commit 0dea4d039a7fdd97790a71da37c1ce67a5b52769 Author: Russell King Date: Tue Dec 17 13:50:29 2019 +0000 net: sfp: report error on failure to read sfp soft status Report a rate-limited error if we fail to read the SFP soft status, and preserve the current status in that case. This avoids I2C bus errors from triggering a link flap. Signed-off-by: Russell King Signed-off-by: David S. Miller commit fea8930bd55e6d88e43ce44cd058aee3b85de274 Author: Sibi Sankar Date: Thu Dec 19 17:36:33 2019 +0530 arm64: dts: qcom: sm8150: Add cpufreq HW device node Add cpufreq HW device node to scale 4-Silver/3-Gold/1-Gold+ cores on SM8150 SoCs. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20191219120633.20723-1-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 9692d9ffa874079c578372fc2a29a34dc8855319 Author: Sai Prakash Ranjan Date: Fri Dec 13 10:23:20 2019 +0530 arm64: dts: qcom: qcs404: Update the compatible for watchdog timer Update the compatible for QCS404 watchdog timer with proper SoC specific compatible. Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/757995875cc12d3f5a8f5fd5659b04653950970a.1576211720.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 7d1ff0d9faf66f630c104a6ca6b8a3c6091ba3a3 Author: Chris Wilson Date: Thu Dec 19 22:13:44 2019 +0000 drm/i915/gt: Add breadcrumb retire to physical engine Avoid adding the retire workers to the virtual engine so that we don't end up in the unenviable situation of trying to free the virtual engine while its worker remains active. Fixes: dc93c9b69315 ("drm/i915/gt: Schedule request retirement when signaler idles") Closes: https://gitlab.freedesktop.org/drm/intel/issues/867 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Joonas Lahtinen Acked-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191219221344.161523-1-chris@chris-wilson.co.uk commit 9594497f2c78993cb66b696122f7c65528ace985 Author: Arnd Bergmann Date: Mon Nov 4 14:43:17 2019 +0100 nfsd: fix jiffies/time_t mixup in LRU list The nfsd4_blocked_lock->nbl_time timestamp is recorded in jiffies, but then compared to a CLOCK_REALTIME timestamp later on, which makes no sense. For consistency with the other timestamps, change this to use a time_t. This is a change in behavior, which may cause regressions, but the current code is not sensible. On a system with CONFIG_HZ=1000, the 'time_after((unsigned long)nbl->nbl_time, (unsigned long)cutoff))' check is false for roughly the first 18 days of uptime and then true for the next 49 days. Fixes: 7919d0a27f1e ("nfsd: add a LRU list for blocked locks") Signed-off-by: Arnd Bergmann Signed-off-by: J. Bruce Fields commit 2561c92b12f4f4e386d453556685f75775c0938b Author: Arnd Bergmann Date: Sun Nov 3 22:32:20 2019 +0100 nfsd: fix delay timer on 32-bit architectures The nfsd4_cb_layout_done() function takes a 'time_t' value, multiplied by NSEC_PER_SEC*2 to get a nanosecond value. This works fine on 64-bit architectures, but on 32-bit, any value over 1 second results in a signed integer overflow with unexpected results. Cast one input to a 64-bit type in order to produce the same result that we have on 64-bit architectures, regarless of the type of nfsd4_lease. Fixes: 6b9b21073d3b ("nfsd: give up on CB_LAYOUTRECALLs after two lease periods") Signed-off-by: Arnd Bergmann Signed-off-by: J. Bruce Fields commit b6356d420296e4fd5045ab3b404bfeb9f659ce08 Author: Arnd Bergmann Date: Sun Nov 3 18:06:52 2019 +0100 nfsd: use time64_t in nfsd_proc_setattr() check Change to time64_t and ktime_get_real_seconds() to make the logic work correctly on 32-bit architectures beyond 2038. Signed-off-by: Arnd Bergmann Signed-off-by: J. Bruce Fields commit 2a1aa48929af78bfe8c4d4fe4b1ed8996af47cee Author: Arnd Bergmann Date: Sun Nov 3 17:50:18 2019 +0100 nfsd: pass a 64-bit guardtime to nfsd_setattr() Guardtime handling in nfs3 differs between 32-bit and 64-bit architectures, and uses the deprecated time_t type. Change it to using time64_t, which behaves the same way on 64-bit and 32-bit architectures, treating the number as an unsigned 32-bit entity with a range of year 1970 to 2106 consistently, and avoiding the y2038 overflow. Signed-off-by: Arnd Bergmann Signed-off-by: J. Bruce Fields commit 9cc7680149b238223bbb8bcf3272f6bd47f1fbfb Author: Arnd Bergmann Date: Thu Oct 31 15:53:13 2019 +0100 nfsd: make 'boot_time' 64-bit wide The local boot time variable gets truncated to time_t at the moment, which can lead to slightly odd behavior on 32-bit architectures. Use ktime_get_real_seconds() instead of get_seconds() to always get a 64-bit result, and keep it that way wherever possible. It still gets truncated in a few places: - When assigning to cl_clientid.cl_boot, this is already documented and is only used as a unique identifier. - In clients_still_reclaiming(), the truncation is to 'unsigned long' in order to use the 'time_before() helper. Signed-off-by: Arnd Bergmann Signed-off-by: J. Bruce Fields commit e4598e38ee7e708d751081799f27d3f11a3e687d Author: Arnd Bergmann Date: Thu Oct 31 15:14:03 2019 +0100 nfsd: use timespec64 in encode_time_delta The values in encode_time_delta are always small and don't overflow the range of 'struct timespec', so changing it has no effect. Change it to timespec64 as a prerequisite for removing the timespec definition later. Signed-off-by: Arnd Bergmann Signed-off-by: J. Bruce Fields commit 92c5e46911c0c1b20fa2294298aaf008c3afe975 Author: Arnd Bergmann Date: Thu Oct 31 14:55:32 2019 +0100 nfsd: handle nfs3 timestamps as unsigned The decode_time3 function behaves differently on 32-bit and 64-bit architectures: on the former, a 32-bit timestamp gets converted into an signed number and then into a timestamp between 1902 and 2038, while on the latter it is interpreted as unsigned in the range 1970-2106. Change all the remaining 'timespec' in nfsd to 'timespec64' to make the behavior the same, and use the current interpretation of the dominant 64-bit architectures. Signed-off-by: Arnd Bergmann Signed-off-by: J. Bruce Fields commit e29f470396a7447764e73289fd63a4591a0b443b Author: Arnd Bergmann Date: Thu Oct 31 14:52:43 2019 +0100 nfsd: print 64-bit timestamps in client_info_show The nii_time field gets truncated to 'time_t' on 32-bit architectures before printing. Remove the use of 'struct timespec' to product the correct output beyond 2038. Signed-off-by: Arnd Bergmann Signed-off-by: J. Bruce Fields commit b3f255ef6bffc18a28c3b6295357f2a3380c033f Author: Arnd Bergmann Date: Fri Oct 20 11:25:34 2017 +0200 nfsd: use ktime_get_seconds() for timestamps The delegation logic in nfsd uses the somewhat inefficient seconds_since_boot() function to record time intervals. Signed-off-by: Arnd Bergmann Signed-off-by: J. Bruce Fields commit fc1b20659597015a30e8ea032f168e97848c1d39 Author: Aditya Pakki Date: Tue Dec 17 16:50:47 2019 -0600 nfsd: remove unnecessary assertion in nfsd4_encode_replay The replay variable is set in the only caller of nfsd4_encode_replay. The assertion is unnecessary and the patch removes this check. Signed-off-by: Aditya Pakki Signed-off-by: J. Bruce Fields commit 57f64034966fb945fc958f95f0c51e47af590344 Author: Trond Myklebust Date: Wed Dec 18 14:57:23 2019 -0500 nfsd: Clone should commit src file metadata too vfs_clone_file_range() can modify the metadata on the source file too, so we need to commit that to stable storage as well. Reported-by: Dave Chinner Signed-off-by: Trond Myklebust Acked-by: Dave Chinner Signed-off-by: J. Bruce Fields commit fc5fc5d7cc9e0c7d2ca5c751cf5450c6bb635e57 Author: zhengbin Date: Thu Dec 19 17:29:20 2019 +0800 nfsd4: Remove unneeded semicolon Fixes coccicheck warning: fs/nfsd/nfs4state.c:3376:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: J. Bruce Fields commit ae6252d8dfeb21f5067a09a8f4a6dd30851d70c1 Author: Bob Moore Date: Tue Dec 17 11:35:23 2019 -0800 ACPICA: Update version to 20191213 ACPICA commit 0b61217c5c706b39070bb6b4b154435e9ef36c3e Version 20191213. Link: https://github.com/acpica/acpica/commit/0b61217c Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 6d232b29cfce65961db4a668c2c6c6987cd24d45 Author: Maximilian Luz Date: Tue Dec 17 11:35:22 2019 -0800 ACPICA: Dispatcher: always generate buffer objects for ASL create_field() operator ACPICA commit 79a466b64e6af36cc83102f05915e56cb7dd89ab According to table 19-419 of the ACPI 6.3 specification, buffer_fields created using the ASL create_field() Operator have been treated as integers if the buffer_field is small enough to fit inside of an ASL integer (32-bits or 64-bits depending on the definition block revision). If they are larger, buffer fields are treated as ASL Buffer objects. However, this is not true for other AML interpreter implementations. It has been discovered that other AML interpreters always treat buffer fields created by create_field() as a buffer regardless of the length of the buffer field. More specifically, the Microsoft AML interpreter always treats buffer fields created by the create_field() operator as buffer. ACPICA currently does this only when the field size is larger than the maximum integer width. This causes problems with AML code shipped in Microsoft Surface devices. More details: The control methods in these devices determine the success of an ASL control method execution by examining the type resulting from storing a buffer field created by a create_field() operator. On success, a Buffer object is expected, on failure an Integer containing an error code. This buffer object is created with a dynamic size via the create_field() operator. Due to the difference in behavior, Buffer values of small size are however converted to Integers and thus interpreted by the control method as having failed, whereas in reality it succeeded. Below is an example of a control method called TEST that illustrates this behavior. Method (CBUF) // Create a Buffer field { /* * Depending on the value of RAND, ACPICA interpreter will treat * BF00 as an integer or buffer. */ create_field (BUFF, 0, RAND, BF00) return (BF00) } Method (TEST) { /* * Storing the value returned by CBUF to local0 will result in * implicit type conversion outlined in the ACPI specification. * * ACPICA will treat local0 like an ASL integer if RAND is less * than or equal to 64 or 32 (depending on the definition_block * revision). If RAND is greater, it will be treated like an ASL * buffer. Other implementations treat local0 like an ASL buffer * regardless of the value of RAND. */ local0 = CBUF() /* * object_type of 0x03 represents an ASL Buffer */ if (object_type (Local0) != 0x03) { // Error on ACPICA if RAND is small enough } else { /* * Success on APICA if RAND is large enough * Other implementations always take this path because local0 * is always treated as a buffer. */ } } This change prohibits the previously mentioned integer conversion to match other AML interpreter implementations (Microsoft) that do not conform to the ACPI specification. Link: https://github.com/acpica/acpica/commit/79a466b6 Signed-off-by: Maximilian Luz Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 69e86e59ad2a2518704a31c35530e6e99963c358 Author: Erik Kaneda Date: Tue Dec 17 11:35:21 2019 -0800 ACPICA: acpisrc: add unix line ending support for non-windows build ACPICA commit 48ef9f7456f0a73d1d6023ea8e79442cdcff757f Link: https://github.com/acpica/acpica/commit/48ef9f74 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 5ddbd77181dfca61b16d2e2222382ea65637f1b9 Author: Erik Kaneda Date: Tue Dec 17 11:35:20 2019 -0800 ACPICA: Disassembler: create buffer fields in ACPI_PARSE_LOAD_PASS1 ACPICA commit 29cc8dbc5463a93625bed87d7550a8bed8913bf4 create_buffer_field is a deferred op that is typically processed in load pass 2. However, disassembly of control method contents walk the parse tree with ACPI_PARSE_LOAD_PASS1 and AML_CREATE operators are processed in a later walk. This is a problem when there is a control method that has the same name as the AML_CREATE object. In this case, any use of the name segment will be detected as a method call rather than a reference to a buffer field. If this is detected as a method call, it can result in a mal-formed parse tree if the control methods have parameters. This change in processing AML_CREATE ops earlier solves this issue by inserting the named object in the ACPI namespace so that references to this name would be detected as a name string rather than a method call. Link: https://github.com/acpica/acpica/commit/29cc8dbc Reported-by: Elia Geretto Tested-by: Elia Geretto Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 22e38ca73585ccf14b1ab388823f51b75fbafb17 Author: Colin Ian King Date: Tue Dec 17 11:35:19 2019 -0800 ACPICA: debugger: fix spelling mistake "adress" -> "address" ACPICA commit 7aa72c5fdf75c5b80adf758980e06bcafb7f8670 There is a spelling mistake in an error message. Fix it. Link: https://github.com/acpica/acpica/commit/7aa72c5f Signed-off-by: Colin Ian King Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit d21a91629f4b8e794fc4c0e0c17c85cedf1d806c Author: Hans de Goede Date: Tue Dec 17 20:08:11 2019 +0100 ACPI: video: Do not export a non working backlight interface on MSI MS-7721 boards Despite our heuristics to not wrongly export a non working ACPI backlight interface on desktop machines, we still end up exporting one on desktops using a motherboard from the MSI MS-7721 series. I've looked at improving the heuristics, but in this case a quirk seems to be the only way to solve this. While at it also add a comment to separate the video_detect_force_none entries in the video_detect_dmi_table from other type of entries, as we already do for the other entry types. Cc: All applicable BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1783786 Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 0435bcd9e185803402a2566e78c1067c615bc579 Author: Peter Ujfalusi Date: Tue Dec 17 12:48:56 2019 +0200 docs: firmware-guide: ACPI: Replace dma_request_slave_channel() with dma_request_chan() dma_request_chan() is the preferred API to request slave channels. Signed-off-by: Peter Ujfalusi [ rjw: Subject ] Signed-off-by: Rafael J. Wysocki commit 9b1b5535dfc98a9d783199d4bcd8580e15daa23c Author: Gayatri Kammela Date: Mon Dec 16 10:31:52 2019 -0800 thermal: int340x_thermal: Add Tiger Lake ACPI device IDs Tiger Lake has new unique ACPI device IDs for thermal devices that need to be added to the Intel thermal driver to suport it. Reviewed-by: Pandruvada, Srinivas Signed-off-by: Gayatri Kammela Acked-by: Zhang Rui [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki commit bdd11b6540358f25c1eb1e21c1b92bd6276f5e53 Author: Gayatri Kammela Date: Mon Dec 16 10:31:51 2019 -0800 platform/x86: intel-hid: Add Tiger Lake ACPI device ID Tiger Lake has a new unique ACPI device ID for the Intel HID event filter device that needs to be added to the intel-hid driver to support it. Acked-by: Andy Shevchenko Signed-off-by: Gayatri Kammela [ rjw: Subject and changelog ] Signed-off-by: Rafael J. Wysocki commit c248dfe7e0caa86e1cdfceddcf96649746dd171a Author: Gayatri Kammela Date: Mon Dec 16 10:31:49 2019 -0800 ACPI: fan: Add Tiger Lake ACPI device ID Tiger Lake has a new unique ACPI device ID for the ACPI fan that needs to be added to the fan driver and to the blacklist in acpi_dev_pm_attach() to support it. Signed-off-by: Gayatri Kammela [ rjw: Subject & changelog, fold in another patch ] Signed-off-by: Rafael J. Wysocki commit 55cfe6a5c58223c51ee095693958738ee0d4c942 Author: Gayatri Kammela Date: Mon Dec 16 10:31:48 2019 -0800 ACPI: DPTF: Add Tiger Lake ACPI device IDs Tiger Lake has new unique ACPI device IDs that need to be added to the DPTF drivers to support it. Signed-off-by: Gayatri Kammela [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki commit fd7bba685e7d9ebc45de2a7e9bd974fdd615abdf Author: Ben Dooks (Codethink) Date: Thu Dec 19 11:13:34 2019 -0800 Input: apbps2 - add __iomem to register struct Add __iomem to the apbps2_priv.regs field to make the numerous warnings about differing address spaces go away. Fixes warnings such as: drivers/input/serio/apbps2.c:65:26: warning: incorrect type in argument 1 (different address spaces) drivers/input/serio/apbps2.c:65:26: expected void const volatile [noderef] *addr drivers/input/serio/apbps2.c:65:26: got unsigned int [noderef] * drivers/input/serio/apbps2.c:65:26: warning: incorrect type in argument 1 (different address spaces) drivers/input/serio/apbps2.c:65:26: expected void const volatile [noderef] *addr drivers/input/serio/apbps2.c:65:26: got unsigned int [noderef] * drivers/input/serio/apbps2.c:65:26: warning: incorrect type in argument 1 (different address spaces) drivers/input/serio/apbps2.c:65:26: expected void const volatile [noderef] *addr drivers/input/serio/apbps2.c:65:26: got unsigned int [noderef] * drivers/input/serio/apbps2.c:65:26: warning: incorrect type in argument 1 (different address spaces) drivers/input/serio/apbps2.c:65:26: expected void const volatile [noderef] *addr [rest snipped] Signed-off-by: Ben Dooks (Codethink) Link: https://lore.kernel.org/r/20191217122507.2157454-1-ben.dooks@codethink.co.uk Signed-off-by: Dmitry Torokhov commit cbe821a20f3d46b419caa6fccf9e9812fff0e392 Author: Ben Dooks (Codethink) Date: Thu Dec 19 11:13:13 2019 -0800 Input: axp20x-pek - make device attributes static The two device attrbitues are not declared outside this file so make them static to avoid the following warnings: drivers/input/misc/axp20x-pek.c:194:1: warning: symbol 'dev_attr_startup' was not declared. Should it be static? drivers/input/misc/axp20x-pek.c:195:1: warning: symbol 'dev_attr_shutdown' was not declared. Should it be static? Signed-off-by: Ben Dooks (Codethink) Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20191217152541.2167080-1-ben.dooks@codethink.co.uk Signed-off-by: Dmitry Torokhov commit d19e470b6605c900db21fc7b34c66b6891a79983 Author: Srinivas Pandruvada Date: Fri Dec 13 15:48:40 2019 -0800 ACPI: fan: Expose fan performance state information When _FPS indicates variable speed fan support, the thermal cooling device for fan shows max performance state count as "max_state" (greater than or equal to 1). But the thermal cooling device doesn't expose the properties of each performance state. This is not enough for smart fan control user space software, which also considers speed, power and noise level. This change exposes the properties of the fan performance states in the sysfs directory of the ACPI device representing the fan, that is /sys/bus/acpi/devices/devices/INT3404:00 or /sys/bus/platform/devices/PNP0C0B:00. For example: $ ls /sys/bus/acpi/devices/INT3404\:00 description path state0 state11 state4 state7 status hid physical_node state1 state2 state5 state8 subsystem modalias power state10 state3 state6 state9 uevent uid wakeup where each state* attribute lists the properties of a fan performance state in the following format: control_percent:trip_point:speed_rpm:noise_level_mdb:power_mw $ cat /sys/bus/acpi/devices/INT3404\:00/state10 95:0:11600:47500:4500 as documented in Documentation/admin-guide/acpi/fan_performance_states.rst While at it, return the correct error code from acpi_fan_probe() when acpi_fan_get_fps() or acpi_fan_get_fif() fails. Suggested-by: Rafael J. Wysocki Signed-off-by: Srinivas Pandruvada [ rjw: Subject, changelog, documentation ] Signed-off-by: Rafael J. Wysocki commit 5bf2fc1f9c88397b125d5ec5f65b1ed9300ba59d Author: Aditya Pakki Date: Thu Dec 19 11:57:35 2019 -0600 bpf: Remove unnecessary assertion on fp_old The two callers of bpf_prog_realloc - bpf_patch_insn_single and bpf_migrate_filter dereference the struct fp_old, before passing it to the function. Thus assertion to check fp_old is unnecessary and can be removed. Signed-off-by: Aditya Pakki Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191219175735.19231-1-pakki001@umn.edu commit 93ccfa9a4eca482216c5caf88be77e5ffa0d744a Author: Daniel Vetter Date: Thu Dec 19 17:17:22 2019 +0100 drm/todo: Updating logging todo Jani has merged a new set of logging functions, which we hope to be the One True solution now, pinky promises: commit fb6c7ab8718eb2543695d77ad8302ff81e8e1e32 Author: Jani Nikula Date: Tue Dec 10 14:30:43 2019 +0200 drm/print: introduce new struct drm_device based logging macros Update the todo entry to match the new preference. v2: Fix spelling issue Sam noticed. Cc: Jani Nikula Cc: Sean Paul Cc: Wambui Karuga Acked-by: Jani Nikula Acked-by: Sam Ravnborg Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191219161722.2779994-1-daniel.vetter@ffwll.ch commit d8e419da048e45a8258b9721e85232dbb25ac618 Merge: a1ec57c02020 b5abac2d2d17 Author: David S. Miller Date: Thu Dec 19 12:52:34 2019 -0800 Merge branch 'phylib-consolidation' Russell King says: ==================== phylib consolidation Over the last few releases, there has been a push to clean up and consolidate the phylib code. Some cases have been missed, and this series catches those cases. 1. Remove redundant .aneg_done initialisers; calling genphy_aneg_done() for clause 22 PHYs is the default when .aneg_done is not set. 2. Some PHY drivers manually set phydev->pause and phydev->asym_pause, but we have a helper for this - phy_resolve_aneg_pause(), introduced in 2d880b8709c0 ("net: phy: extract pause mode"). Use this in the lxt, marvell and uPD60620 drivers. Incidentally, this brings up the question whether marvell fiber mode is correctly interpreting and advertising the pause parameters. 3. Add a genphy_check_and_restart_aneg() helper, which complements the clause 45 version of this. This will be useful for PHY drivers that open code this logic (e.g. marvell.c) 4. Add a genphy_read_status_fixed() helper to read the fixed-mode status from a clause 22 PHY. lxt and marvell both contain copies of this code, so convert them over. 5. Arrange marvell driver to use genphy_read_lpa() for copper mode. This needs some rearrangement of the code in marvell_read_status_page_an(), but preserves using the PHY specific status register to derive the current negotiation results. 6. Simplify the marvell driver so we can use the genphy_read_status_fixed() helper directly rather than marvell_read_status_page_fixed(). 7. Use positive logic in the marvell driver to determine the link state, and get rid of the REGISTER_LINK_STATUS definition; we already have a definition for this. 8. The marvell driver reads the PHY specific status register multiple times when determining the status: once in marvell_update_link() and again in marvell_read_status_page_an(). This is a waste; rearrange to read the status register once, and pass its value into marvell_read_status_page_an(). We preserve using genphy_update_link() for the copper side. 9. The marvell driver was using private clause 37 definitions, but we have clause 37 definitions in uapi/linux/mii.h. Use the generic definitions. 10. Switch the marvell driver to use phy_modify_changed() to modify the fiber advertisement. 11. Switch the marvell driver to use genphy_check_and_restart_aneg() introduced above rather than open-coding this functionality. ==================== Signed-off-by: David S. Miller commit b5abac2d2d17ce1b30c267dd72fb91c8bc21bee1 Author: Russell King Date: Tue Dec 17 13:39:52 2019 +0000 net: phy: marvell: use genphy_check_and_restart_aneg() Use the helper to check and restart autonegotiation for the marvell fiber page negotiation setting. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 9f4bae704f93c9b83196781de3df8a4bf1855a4b Author: Russell King Date: Tue Dec 17 13:39:47 2019 +0000 net: phy: marvell: use phy_modify_changed() Use phy_modify_changed() to change the fiber advertisement register rather than open coding this functionality. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 20ecf424d0dbb820a337e994c8feec18c1fa77c9 Author: Russell King Date: Tue Dec 17 13:39:42 2019 +0000 net: phy: marvell: use existing clause 37 definitions Use existing clause 37 advertising/link partner definitions rather than private ones for the advertisement registers. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit d2004e27eb352a5961cae7cc50563dbdc5386ba7 Author: Russell King Date: Tue Dec 17 13:39:36 2019 +0000 net: phy: marvell: consolidate phy status reading marvell_read_status_page_an() always reads the PHY status register, but marvell_update_link() has already done this. Rather than wastefully reading the register twice in quick succession, read it once in marvell_read_status_page() and use the result for both. This makes marvell_update_link() rather pointless, so move it into marvell_read_status_page(). Signed-off-by: Russell King Signed-off-by: David S. Miller commit 760fa78f3509d3d414804c4017de3d0dba995081 Author: Russell King Date: Tue Dec 17 13:39:31 2019 +0000 net: phy: marvell: use positive logic for link state Rather than using negative logic: if (there is no link) set link = 0 else set link = 1 use the more natural positive logic: if (there is link) set link = 1 else set link = 0 Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 98f92831c561e43e8d4dafa7165e996af4dc8ac3 Author: Russell King Date: Tue Dec 17 13:39:26 2019 +0000 net: phy: marvell: initialise link partner state earlier Move the initialisation of the link partner state earlier, inside marvell_read_status_page(), so we don't have the same initialisation scattered amongst the other files. This is in a similar place to the genphy implementation, so would result in the same behaviour if a PHY read error occurs. This allows us to get rid of marvell_read_status_page_fixed(), which became a pointless wrapper around genphy_read_status_fixed(). Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit fcf1f59afc67dc8c214a1b085527ed1fc513c3a2 Author: Russell King Date: Tue Dec 17 13:39:21 2019 +0000 net: phy: marvell: rearrange to use genphy_read_lpa() Rearrange the Marvell PHY driver to use genphy_read_lpa() rather than open-coding this functionality. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 0efc286a923874f0c243e5766cce54e9429ed949 Author: Russell King Date: Tue Dec 17 13:39:16 2019 +0000 net: phy: provide and use genphy_read_status_fixed() There are two drivers and generic code which contain exactly the same code to read the status of a PHY operating without autonegotiation enabled. Rather than duplicate this code, provide a helper to read this information. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 2a10ab043ac5a658225ee77852db7942de9ac4c5 Author: Russell King Date: Tue Dec 17 13:39:11 2019 +0000 net: phy: add genphy_check_and_restart_aneg() Add a helper for restarting autonegotiation(), similar to the clause 45 variant. Use it in __genphy_config_aneg() Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit af006240c6cfea9f52fc197ac26e6cade4a8623d Author: Russell King Date: Tue Dec 17 13:39:06 2019 +0000 net: phy: use phy_resolve_aneg_pause() Several drivers code their own version of this, working from the LPA register, after setting the ethtool link partner advertisement bitmask. Use the generic function instead. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit c48f16b42a3bf71eeb9c6141369b001097f961e6 Author: Russell King Date: Tue Dec 17 13:39:00 2019 +0000 net: phy: remove redundant .aneg_done initialisers Remove initialisers that set .aneg_done to genphy_aneg_done - this is the default for clause 22 PHYs, so the initialiser is redundant. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit f7f1538c3f7c03eca66a85a6e847108e18ef88bf Author: Ville Syrjälä Date: Fri Dec 13 15:34:53 2019 +0200 drm/i915: Rename pipe update tracepoints All the other display related tracepoints use intel_ instead if i915_ as the prefix. Do the same for the pipe update tracepoints so I don't always have to spend time looking for them. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191213133453.22152-6-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 36fef958e2da969595871da07dd913a2e5be2816 Author: Ville Syrjälä Date: Fri Dec 13 15:34:49 2019 +0200 drm/i915/fbc: Remove second redundant intel_fbc_pre_update() call I fumbled the conflict resolution a bit when applying the fbc vblank wait w/a. Because of that we now call intel_fbc_pre_update() twice. Remove the second redundant call. Reported-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191213133453.22152-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 317b2cac79a66c7156dbe7983b825dc417acf9a8 Author: Ville Syrjälä Date: Fri Dec 13 15:34:48 2019 +0200 drm/i915/fbc: Reject PLANE_OFFSET.y%4!=0 on icl+ too icl and tgl are still affected by the modulo 4 PLANE_OFFSET.y underrun issue. Reject such configurations on all gen9+ platforms. Can be reproduced easily with the following sequence of hardware poking: while { write FBC_CTL.enable=1 wait for vblank write PLANE_OFFSET .x=0 .y=32 write PLANE_SURF wait for vblank # if PLANE_OFFSET.y is multiple of 4 the underrun won't happen write PLANE_OFFSET .x=0 .y=31 write PLANE_SURF wait for vblank # extra vblank wait is required here presumably # to get FBC into the proper state wait for vblank write FBC_CTL.enable=0 # underrun happens some time after FBC disable wait for vblank } Both 8888 and 565 pixel formats and all tilinga formats seem affected. Reproduced on KBL/GLK/ICL/TGL. BDW confirmed not affected. Closes: https://gitlab.freedesktop.org/drm/intel/issues/792 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191213133453.22152-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 1019fe2c728003f89ee11482cf8ec81dbd8f15ba Author: Marek Szyprowski Date: Thu Dec 19 11:51:30 2019 +0100 ARM: dts: exynos: Adjust bus related OPPs to the values correct for Exynos5422 Odroids Hardkernel's Odroid XU3/XU4/HC1 boards use bootloader, which configures top PLLs to the following values: MPLL: 532MHz, CPLL: 666MHz and DPLL: 600MHz. Adjust all bus related OPPs to the values that are possible to derive from the top PLL configured by the bootloader. Also add a comment for each bus describing which PLL is used for it. The most significant change is the highest rate for wcore bus. It has been increased to 532MHz as this is the value configured initially by the bootloader. Also the voltage for this OPP is changed to match the value set by the bootloader. This patch finally allows the buses to operate on the rates matching the values set for each OPP and fixes the following warnings observed on boot: exynos-bus: new bus device registered: soc:bus_wcore ( 84000 KHz ~ 400000 KHz) exynos-bus: new bus device registered: soc:bus_noc ( 67000 KHz ~ 100000 KHz) exynos-bus: new bus device registered: soc:bus_fsys_apb (100000 KHz ~ 200000 KHz) ... exynos-bus soc:bus_wcore: dev_pm_opp_set_rate: failed to find current OPP for freq 532000000 (-34) exynos-bus soc:bus_noc: dev_pm_opp_set_rate: failed to find current OPP for freq 111000000 (-34) exynos-bus soc:bus_fsys_apb: dev_pm_opp_set_rate: failed to find current OPP for freq 222000000 (-34) The problem with setting incorrect (in some cases much lower) clock rate for the defined OPP were there from the beginning, but went unnoticed because the only way to observe it was to manually check the rate of the respective clocks. The commit 4294a779bd8d ("PM / devfreq: exynos-bus: Convert to use dev_pm_opp_set_rate()") finally revealed it, because it enabled use of the generic code from the OPP framework, which issues the above mentioned warnings. Signed-off-by: Marek Szyprowski Tested-by: Chanwoo Choi Reviewed-by: Chanwoo Choi Signed-off-by: Krzysztof Kozlowski commit c6d0192afa24e315df501b1bd3f339a13ccb0692 Author: Marek Szyprowski Date: Thu Dec 19 11:51:29 2019 +0100 ARM: dts: exynos: Move Exynos5420 bus related OPPs to the Odroid boards DTS Currently the only Exynos5422-based boards that support bus frequency scaling are Hardkernel's Odroid XU3/XU4/HC1. Move the bus related OPPs to the boards DTS, because those OPPs heavily depend on the clock topology and top PLL rates, which are being configured by the board's bootloader. Signed-off-by: Marek Szyprowski Tested-by: Chanwoo Choi Reviewed-by: Chanwoo Choi Signed-off-by: Krzysztof Kozlowski commit e1f0fbda75e6447077205b472d1dd71bef417a4c Author: Colin Ian King Date: Thu Dec 19 19:09:16 2019 +0000 drm/i915: fix uninitialized pointer reads on pointers to and from Currently pointers to and from are not initialized and may contain garbage values. This will cause uninitialized pointer reads in the call to intel_frontbuffer_track and later checks to see if to and from are null. Fix this by ensuring to and from are initialized to NULL. Addresses-Coverity: ("Uninitialised pointer read)" Fixes: da42104f589d ("drm/i915: Hold reference to intel_frontbuffer as we track activity") Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191219190916.24693-1-colin.king@canonical.com commit 293f8995948330e1df9228519535593618b5ec0e Author: Greg Kroah-Hartman Date: Thu Dec 19 15:51:09 2019 +0100 tty: serial: 21285: stop using the unused[] variable from struct uart_port Much like the samsung_tty driver (now I know where they copied the idea from), the 21285 uart driver uses 2 bytes from the "unused" array of struct uart_port to keep tx/rx enabled/disabled state. Those fields are going away (they were never really needed in the first place), so fix up the 21285 driver by another horrible hack. Instead of creating a whole structure for just 2 bytes, just use two bits from the private_data pointer instead, as that pointer is never used. The two bits reflect if tx/rx is now enabled/disabled. Astute readers will note that once rx is disabled, nothing ever seems to turn it back on, making one wonder if anyone has ever done this. Reported-by: kbuild test robot Cc: Dmitry Safonov Cc: Russell King Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20191219145109.GA1962496@kroah.com Signed-off-by: Greg Kroah-Hartman commit e054d71836f047743f910f97bd13dcd49116c146 Author: Ben Dooks (Codethink) Date: Wed Dec 18 10:07:20 2019 +0000 platform/chrome: cros_ec_ishtp: Make init_lock static The init_lock is not declared or used outside of cros_ec_ishtp.c so make it static to avoid the following warning: drivers/platform/chrome/cros_ec_ishtp.c:79:1: warning: symbol 'init_lock' was not declared. Should it be static? Signed-off-by: Ben Dooks (Codethink) Signed-off-by: Enric Balletbo i Serra commit a5a98554206651b25d84a25b49eeac31dffbe358 Author: Xidong Wang Date: Wed Dec 18 13:56:38 2019 +0800 staging: nvec: check return value In nvec_kbd_probe(), the return value of devm_input_allocate_device() should be checked before it is used. Signed-off-by: Xidong Wang Link: https://lore.kernel.org/r/1576648598-12257-1-git-send-email-wangxidong_97@163.com Acked-by: Marc Dietrich Signed-off-by: Greg Kroah-Hartman commit c1ccff45e54eb54fa4e437da197e6738b002f22d Author: SeongJae Park Date: Fri Nov 29 19:28:23 2019 +0100 docs/memory-barriers.txt.kokr: Minor wordsmith As suggested by Paul, I got a review from another Korean hacker Yunjae.  From the review, I got not only 'Reviewed-by:' tags, but also found a few minor nits.  So I made a second version of the patchset but just realized that the first version has already sent to Linus.  I therefore send only the nit fixes as another patch. ----------------------------- >8 ---------------------------------------- docs/memory-barriers.txt.kokr: Minor wordsmith This commit fixes a couple of minor nits in the Korean translation of 'memory-barriers.txt'. Signed-off-by: SeongJae Park Reviewed-by: Yunjae Lee Link: https://lore.kernel.org/r/20191129182823.8710-1-sjpark@amazon.de Signed-off-by: Jonathan Corbet commit 3dbbeef42b6489ec7c10dba4d2b7805c9bbff773 Author: Federico Vaga Date: Sun Dec 1 13:19:41 2019 +0100 doc:locking: fix locktorture parameter description The description was talking about two default values: I removed the wrong one. Signed-off-by: Federico Vaga Link: https://lore.kernel.org/r/20191201121941.6971-1-federico.vaga@vaga.pv.it Signed-off-by: Jonathan Corbet commit c032ace71c29d513bf9df64ace1885fe5ff24981 Author: Dmitry Torokhov Date: Wed Dec 4 10:53:15 2019 -0800 software node: add basic tests for property entries This adds tests for creating software nodes with properties supplied by PROPERTY_ENTRY_XXX() macros and fetching and validating data from said nodes/properties. We are using KUnit framework for the tests. Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki commit 281176327d0217d3ee0f7acc93f7542cc1b1ce9d Author: Chris Wilson Date: Wed Dec 18 21:05:45 2019 +0000 drm/i915/gt: Suppress threshold updates on RPS parking When we park RPS, we set the GPU to run at minimum 'idle' frequency. However, as the GPU is idle, we also disable the worker and RPS interrupts - changing the RPS thresholds has no effect, it just incurs extra changes to restore them when we unpark. So on parking, leave the thresholds set to the current power level and so we expect them to be valid for our restart. References: https://gitlab.freedesktop.org/drm/intel/issues/848 Signed-off-by: Chris Wilson Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191218210545.3975426-2-chris@chris-wilson.co.uk commit 35cc7f32c298ba163a009598e6e7e15920a2e4e6 Author: Chris Wilson Date: Wed Dec 18 21:05:44 2019 +0000 drm/i915/gt: Use non-forcewake writes for RPS Use non-forcewaked writes to queue RPS register changes that will take effect when the write buffer is flushed, rather than wake the mmio device for immediate effect. This is so that we can avoid a slow forcewake dance upon unparking, and at our irregular updates. Signed-off-by: Chris Wilson Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191218210545.3975426-1-chris@chris-wilson.co.uk commit 921377c0b4e8e240e0b56cb13bc22f2ecc4e59df Author: Ma Feng Date: Thu Dec 19 09:46:31 2019 +0800 power: supply: abx500_chargalg: Remove unneeded semicolon Fixes coccicheck warning: drivers/power/supply/abx500_chargalg.c:1826:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: Ma Feng Signed-off-by: Sebastian Reichel commit e15c54d208f933fe004b2e5fcdd741d3ea408df1 Author: Ma Feng Date: Thu Dec 19 09:46:30 2019 +0800 power: supply: ab8500_charger: Remove unneeded semicolon Fixes coccicheck warning: drivers/power/supply/ab8500_charger.c:1082:2-3: Unneeded semicolon drivers/power/supply/ab8500_charger.c:792:2-3: Unneeded semicolon drivers/power/supply/ab8500_charger.c:2430:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: Ma Feng Signed-off-by: Sebastian Reichel commit c6ef5234efc07679921c20025a743aabfc62f2c0 Author: Ma Feng Date: Thu Dec 19 09:46:29 2019 +0800 power: supply: ab8500: Remove unneeded semicolon Fixes coccicheck warning: drivers/power/supply/ab8500_fg.c:2224:5-6: Unneeded semicolon drivers/power/supply/ab8500_fg.c:2227:4-5: Unneeded semicolon drivers/power/supply/ab8500_fg.c:2334:3-4: Unneeded semicolon drivers/power/supply/ab8500_fg.c:2342:3-4: Unneeded semicolon drivers/power/supply/ab8500_fg.c:2350:3-4: Unneeded semicolon drivers/power/supply/ab8500_fg.c:2358:3-4: Unneeded semicolon drivers/power/supply/ab8500_fg.c:2366:3-4: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: Ma Feng Signed-off-by: Sebastian Reichel commit b81e4d9b594188a8babf06442e1d6f28de78c68f Author: Chris Wilson Date: Thu Dec 19 12:43:53 2019 +0000 drm/i915/gt: Track engine round-trip times Knowing the round trip time of an engine is useful for tracking the health of the system as well as providing a metric for the baseline responsiveness of the engine. We can use the latter metric for automatically tuning our waits in selftests and when idling so we don't confuse a slower system with a dead one. Upon idling the engine, we send one last pulse to switch the context away from precious user state to the volatile kernel context. We know the engine is idle at this point, and the pulse is non-preemptible, so this provides us with a good measurement of the round trip time. It also provides us with faster engine parking for ringbuffer submission, which is a welcome bonus (e.g. softer-rc6). Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Stuart Summers Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191219105043.4169050-1-chris@chris-wilson.co.uk Link: https://patchwork.freedesktop.org/patch/msgid/20191219124353.8607-2-chris@chris-wilson.co.uk commit dc93c9b69315167f5678b94aa911dc8e7c299fe5 Author: Chris Wilson Date: Thu Dec 19 12:43:52 2019 +0000 drm/i915/gt: Schedule request retirement when signaler idles Very similar to commit 4f88f8747fa4 ("drm/i915/gt: Schedule request retirement when timeline idles"), but this time instead of coupling into the execlists CS event interrupt, we couple into the breadcrumb interrupt and queue a timeline's retirement when the last signaler is completed. This should allow us to more rapidly park ringbuffer submission, and so help reduce power consumption on older systems. v2: Fixup intel_engine_add_retire() to handle concurrent callers References: 4f88f8747fa4 ("drm/i915/gt: Schedule request retirement when timeline idles") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191219124353.8607-1-chris@chris-wilson.co.uk commit bc51a6d34c27bd1040fddaf2bdc61309f392f86a Author: Madhuparna Bhowmik Date: Wed Dec 4 16:15:54 2019 +0530 Documentation: kernel-hacking: hacking.rst: Change reference to document namespaces.rst to symbol-namespaces.rst This patch fixes the following documentation build warning: Warning: Documentation/kernel-hacking/hacking.rst references a file that doesn't exist: Documentation/kbuild/namespaces.rst According to the following patch: https://patchwork.kernel.org/patch/11178727/ (doc: move namespaces.rst from kbuild/ to core-api/) The file namespaces.rst was moved from kbuild to core-api and renamed to symbol-namespaces.rst. Therefore, this patch changes the reference to the document kbuild/namespaces.rst in hacking.rst to core-api/symbol-namespaces.rst Signed-off-by: Madhuparna Bhowmik Link: https://lore.kernel.org/r/20191204104554.9100-1-madhuparnabhowmik04@gmail.com Signed-off-by: Jonathan Corbet commit a83aaf4979e799705781ceb86a1f29d2b29736b1 Author: Madhuparna Bhowmik Date: Wed Dec 4 15:49:39 2019 +0530 Documentation: filesystems: automount-support: Change reference to document autofs.txt to autofs.rst This patch fixes following documentation build warning: Warning: Documentation/filesystems/automount-support.txt references a file that doesn't exist: Documentation/filesystems/autofs.txt Signed-off-by: Madhuparna Bhowmik Link: https://lore.kernel.org/r/20191204101939.6939-1-madhuparnabhowmik04@gmail.com Signed-off-by: Jonathan Corbet commit 1d5c17e470286b8211e8a18d0f85ae89dec4e8d8 Author: Atish Patra Date: Tue Oct 8 18:06:37 2019 -0700 RISC-V: Typo fixes in image header and documentation. There are some typos in boot image header and riscv boot documentation. Fix the typos. Signed-off-by: Atish Patra Reviewed-by: Palmer Dabbelt Link: https://lore.kernel.org/r/20191009010637.9955-1-atish.patra@wdc.com Signed-off-by: Jonathan Corbet commit ae0a723c4cfd89dad31ce238f47ccfbe81b35b84 Merge: c705f9fc6a17 ca0e477931c5 Author: Kalle Valo Date: Thu Dec 19 18:27:36 2019 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.6. Major changes: wil6210 * support set_multicast_to_unicast cfg80211 operation * support set_cqm_rssi_config cfg80211 operation wcn36xx * disable HW_CONNECTION_MONITOR as firmware is buggy commit eb43135117adc88ba3fd8b15a649c4bceff79962 Author: Randy Dunlap Date: Sun Dec 8 20:16:40 2019 -0800 Documentation: fix Sphinx warning in xilinx_sdfec.rst Fix Sphinx format warning by adding a blank line. Documentation/misc-devices/xilinx_sdfec.rst:2: WARNING: Explicit markup ends without a blank line; unexpected unindent. Signed-off-by: Randy Dunlap Acked-by: Dragan Cvetic Link: https://lore.kernel.org/r/8d644cf1-fa7b-ec62-84cf-9b41d7c30eed@infradead.org Signed-off-by: Jonathan Corbet commit 0854cbdb1829413680cc1bf072dc68254a5ffe7b Author: Randy Dunlap Date: Sun Dec 8 20:25:10 2019 -0800 Documentation: x86: fix boot.rst warning and format Fix a Sphinx documentation format warning by breaking a long line into 2 lines. Also drop the ':' usage after the Protocol version numbers since other Protocol versions don't use colons. Documentation/x86/boot.rst:72: WARNING: Malformed table. Text in column margin in table line 57. Fixes: 2c33c27fd603 ("x86/boot: Introduce kernel_info") Fixes: 00cd1c154d56 ("x86/boot: Introduce kernel_info.setup_type_max") Signed-off-by: Randy Dunlap Reviewed-by: Daniel Kiper Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Link: https://lore.kernel.org/r/c6fbf592-0aca-69d9-e903-e869221a041a@infradead.org Signed-off-by: Jonathan Corbet commit ab229d620263e2399c1bd611e64bde5250f72dae Author: Konstantin Ryabitsev Date: Mon Dec 9 14:26:11 2019 -0500 Process: provide hardware-security list details Fill in "..." stubs with proper links to the mailing lists's encryption keys and service description URLs. Similarly, fix wording to specify that multiple members of Linux Foundation's IT team have access to internal kernel.org infrastructure, and that all of them have similar confidentiality obligations as the IT team director. Signed-off-by: Konstantin Ryabitsev Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20191209192611.GA1688548@chatter.i7.local Signed-off-by: Jonathan Corbet commit d693b2883c0b9b261d2c490a9933e703359b4542 Author: Frank A. Cancio Bello Date: Wed Dec 18 14:15:53 2019 -0500 docs: ftrace: Specifies when buffers get clear Clarify a few places where the ring buffer and the "snapshot" buffer are cleared as a side effect of an operation. This will avoid users lost of tracing data because of these so far undocumented behavior. Signed-off-by: Frank A. Cancio Bello Reviewed-by: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/20191218191553.q4lwyxmquvtjzjfz@frank-laptop Signed-off-by: Jonathan Corbet commit ca0e477931c5a725bb887c764a49eb5d69ab7a67 Author: Kees Cook Date: Wed Dec 18 16:58:02 2019 -0800 ath11k: Use sizeof_field() instead of FIELD_SIZEOF() The FIELD_SIZEOF() macro was redundant, and is being removed from the kernel. Since commit c593642c8be0 ("treewide: Use sizeof_field() macro") this is one of the last users of the old macro, so replace it. Signed-off-by: Kees Cook Signed-off-by: Kalle Valo commit 77ea8b455ca1d93221bad979a59271233ecb757e Author: John Crispin Date: Thu Dec 5 07:26:45 2019 +0100 ath11k: explicitly cast wmi commands to their correct struct type Three of the WMI command handlers were not casting to the right data type. Lets make the code consistent with the other handlers. Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit 4315a74a482f86750a1e78ac536c5baeb05ff6b1 Author: Dedy Lansky Date: Wed Dec 18 20:10:24 2019 +0200 wil6210: add support for set_cqm_rssi_config set_cqm_rssi_config() is used by the kernel to configure connection quality monitor RSSI threshold. wil6210 uses WMI_SET_LINK_MONITOR_CMDID to set the RSSI threshold to FW which in turn reports RSSI threshold changes with WMI_LINK_MONITOR_EVENTID. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 5e5f069c30ccdbc09bd548858ee75d0487e74490 Author: Ahmad Masri Date: Wed Dec 18 20:10:21 2019 +0200 wil6210: support set_multicast_to_unicast cfg80211 operation Wil6210 AP has a separate ring for transmitting multicast packets, multicast packets are transmitted without an ack from the receiver side. Therefore, 802.11 spec defines some low MCS rates for multicat packets. However, there is no guarantee that these packets were really received and handled on the client side. Some applications that rely on multicast packets, may prefer to transmit these packets as a unicast to ensure reliability, and also to ensure better performance with high MCS rates. multicast to unicast is done by duplicating multicast packets to all clients and changing the DA (multicast) to the MAC address of the client. see NL80211_CMD_SET_MULTICAST_TO_UNICAST for more info. Signed-off-by: Ahmad Masri Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 18beb61d848d267371a769114d90bd1be6239eda Author: Dedy Lansky Date: Wed Dec 18 20:10:18 2019 +0200 wil6210: fix MID valid bits in Rx status message Fix incorrect definitions of MAC ID bits inside Rx status message. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit c99d5f8d61784f152fb3c2e217fa17b05bbd640a Author: Dedy Lansky Date: Wed Dec 18 20:10:16 2019 +0200 wil6210: reduce ucode_debug memory region ucode_debug memory region defined as 4K bytes. Fix this according to Talyn device memory map. Signed-off-by: Dedy Lansky Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 5c5d88a29dd4fe8154c8d262163a96d0add70917 Author: Alexei Avshalom Lazar Date: Wed Dec 18 20:10:13 2019 +0200 wil6210: add verification for cid upper bound max_assoc_sta can receive values (from the user or from the FW) that are higher than WIL6210_MAX_CID. Verify that cid doesn't exceed the upper bound of WIL6210_MAX_CID. Signed-off-by: Alexei Avshalom Lazar Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit c715b38473c842db34c408ede2d5727d2b50cf1c Author: Alexei Avshalom Lazar Date: Wed Dec 18 20:10:10 2019 +0200 wil6210: take mem_lock for writing in crash dump collection On some crash dump cases mem_lock is already taken, error returns and crash dump copy fails. In this case wait until mem_lock available instead of failing the operation. Also take the mem_lock for writing to prevent other threads from altering the state of the device while collecting crash dump. Signed-off-by: Alexei Avshalom Lazar Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit d3214d42806676e47eec2e5a5ed041ec40b9dd35 Author: Alexei Avshalom Lazar Date: Wed Dec 18 20:10:07 2019 +0200 wil6210: minimize the time that mem_lock is held mem_lock is taken for the entire wil_reset(). Optimize this by taking mem_lock just before device is being reset and release the lock after FW download. Signed-off-by: Alexei Avshalom Lazar Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 7be3c2331d506a61da78cfe426a037a3c7de7c71 Author: Ahmad Masri Date: Wed Dec 18 20:10:04 2019 +0200 wil6210: dump Rx status message on errors Dump all the Rx status message on different errors to allow more visibility of the case. Signed-off-by: Ahmad Masri Signed-off-by: Maya Erez Signed-off-by: Kalle Valo commit 0fa4f770977cf9b1776c433b5ed23d5b977c3556 Author: Guenter Roeck Date: Sun Dec 8 14:50:49 2019 -0800 dt-bindings: Add MAX31730 as trivial device Maxim MAX31730 is a 3-Channel Remote Temperature Sensor. Signed-off-by: Guenter Roeck Signed-off-by: Rob Herring commit d1c5b2541170df3816539f873ec0da388e3bf736 Author: Matthias Kaehlcke Date: Thu Dec 5 12:22:59 2019 -0800 dt-bindings: net: bluetooth: Add compatible string for WCN3991 Commit 7d250a062f75 ("Bluetooth: hci_qca: Add support for Qualcomm Bluetooth SoC WCN3991") added the compatible string 'qcom,wcn3991-bt' to the Qualcomm Bluetooth driver, however the string is not listed in the binding. Add the 'qcom,wcn3991-bt' to the supported compatible strings. Signed-off-by: Matthias Kaehlcke Reviewed-by: Simon Horman Signed-off-by: Rob Herring commit 26f1e12c714e9e7314e1a099fd8225473cb76ab8 Author: Geert Uytterhoeven Date: Thu Dec 5 14:47:51 2019 +0100 dt-bindings: watchdog: renesas-wdt: Document r8a77961 support Document support for the Watchdog Timer in the Renesas R-Car M3-W+ (R8A77961) SoC. No driver update is needed. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Signed-off-by: Rob Herring commit e63318785234c9c33e97b7793e09a82c869e3ef0 Author: Geert Uytterhoeven Date: Thu Dec 5 14:45:04 2019 +0100 dt-bindings: net: ravb: Document r8a77961 support Document support for the Ethernet AVB interface in the Renesas R-Car M3-W+ (R8A77961) SoC. Update all references to R-Car M3-W from "r8a7796" to "r8a77960", to avoid confusion between R-Car M3-W (R8A77960) and M3-W+. No driver update is needed. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Reviewed-by: Sergei Shtylyov Signed-off-by: Rob Herring commit 7745ff9842617323adbe24e71c495d5ebd9aa352 Author: Andrii Nakryiko Date: Wed Dec 18 21:21:03 2019 -0800 libbpf: Fix another __u64 printf warning Fix yet another printf warning for %llu specifier on ppc64le. This time size_t casting won't work, so cast to verbose `unsigned long long`. Fixes: 166750bc1dd2 ("libbpf: Support libbpf-provided extern variables") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191219052103.3515-1-andriin@fb.com commit b5c7d0d0f7d4a30ae96c1350df677cb849060b7c Author: Toke Høiland-Jørgensen Date: Thu Dec 19 10:02:36 2019 +0100 libbpf: Fix printing of ulimit value Naresh pointed out that libbpf builds fail on 32-bit architectures because rlimit.rlim_cur is defined as 'unsigned long long' on those architectures. Fix this by using %zu in printf and casting to size_t. Fixes: dc3a2d254782 ("libbpf: Print hint about ulimit when getting permission denied error") Reported-by: Naresh Kamboju Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191219090236.905059-1-toke@redhat.com commit 580205dd4fe800b1e95be8b6df9e2991f975a8ad Author: Alexei Starovoitov Date: Wed Dec 18 18:04:42 2019 -0800 selftests/bpf: Fix test_attach_probe Fix two issues in test_attach_probe: 1. it was not able to parse /proc/self/maps beyond the first line, since %s means parse string until white space. 2. offset has to be accounted for otherwise uprobed address is incorrect. Fixes: 1e8611bbdfc9 ("selftests/bpf: add kprobe/uprobe selftests") Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191219020442.1922617-1-ast@kernel.org commit f4feb9fa45ee604f44fcc1fb4fb806a0c611acd0 Author: Huang Rui Date: Mon Dec 16 15:02:51 2019 +0800 drm/amdkfd: expose num_cp_queues data field to topology node (v2) Thunk driver would like to know the num_cp_queues data, however this data relied on different asic specific. So it's better to get it from kfd driver. v2: don't update name size. Signed-off-by: Huang Rui Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit bb71c74db3c554a10d8df81c2dcc162b0bbb4149 Author: Huang Rui Date: Mon Dec 16 15:02:50 2019 +0800 drm/amdkfd: expose num_sdma_queues_per_engine data field to topology node (v2) Thunk driver would like to know the num_sdma_queues_per_engine data, however this data relied on different asic specific. So it's better to get it from kfd driver. v2: don't update the name size. Signed-off-by: Huang Rui Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit fe8a87d71f727b92525b7fbf9d24a7027d44df61 Author: Yintian Tao Date: Wed Dec 18 18:11:57 2019 +0800 drm/amd/powerplay: skip disable dynamic state management Under sriov, the disable operation is no allowed. Signed-off-by: Yintian Tao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit ab5999dea06945f1f7b00bc20c23ab045afa74af Author: Jane Jian Date: Mon Dec 16 17:04:01 2019 +0800 drm/amdgpu: enable VCN0 and VCN1 sriov instances support for Arcturus v1: compared to bare-metal: sriov support psp loading VCN firmware; only one encoding ring would be used in each instance. v2: keep unchange for bare-metal VCN2.5 hw_init, just add a flag with sriov and also remove multiple lines. v3: squash in warning fix Signed-off-by: Jane Jian Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 12dd14b230b3c742b80272ecb8a83cdf824625ca Author: Toke Høiland-Jørgensen Date: Thu Dec 19 13:07:14 2019 +0100 libbpf: Add missing newline in opts validation macro The error log output in the opts validation macro was missing a newline. Fixes: 2ce8450ef5a3 ("libbpf: add bpf_object__open_{file, mem} w/ extensible opts") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191219120714.928380-1-toke@redhat.com commit 7800a3d54a7112e783453e24f5d96a8f230331fa Merge: a352a82496d1 34bfc10a6e7e Author: Daniel Borkmann Date: Thu Dec 19 16:03:31 2019 +0100 Merge branch 'bpf-riscv-jit-improvements' Björn Töpel says: ==================== This series contain one non-critical fix, support for far jumps, and some optimizations for the BPF JIT. Previously, the JIT only supported 12b branch targets for conditional branches, and 21b for unconditional branches. Starting with this series, 32b branching is supported. As part of supporting far jumps, branch relaxation was introduced. The idea is to start with a pessimistic jump (e.g. auipc/jalr) and for each pass the JIT will have an opportunity to pick a better instruction (e.g. jal) and shrink the image. Instead of two passes, the JIT requires more passes. It typically converges after 3 passes. The optimizations mentioned in the subject are for calls and tail calls. In the tail call generation we can save one instruction by using the offset in jalr. Calls are optimized by doing (auipc)/jal(r) relative jumps instead of loading the entire absolute address and doing jalr. This required that the JIT image allocator was made RISC-V specific, so we can ensure that the JIT image and the kernel text are in range (32b). The last two patches of the series is not critical to the series, but are two UAPI build issues for BPF events. A closer look from the RV-folks would be much appreciated. The test_bpf.ko module, selftests/bpf/test_verifier and selftests/seccomp/seccomp_bpf pass all tests. RISC-V is still missing proper kprobe and tracepoint support, so a lot of BPF selftests cannot be run. v1->v2: [1] * Removed unused function parameter from emit_branch() * Added patch to support far branch in tail call emit [1] https://lore.kernel.org/bpf/20191209173136.29615-1-bjorn.topel@gmail.com/ ==================== Signed-off-by: Daniel Borkmann commit 34bfc10a6e7e573563a700239d302ab5944b3397 Author: Björn Töpel Date: Mon Dec 16 10:13:43 2019 +0100 riscv, perf: Add arch specific perf_arch_bpf_user_pt_regs RISC-V was missing a proper perf_arch_bpf_user_pt_regs macro for CONFIG_PERF_EVENT builds. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191216091343.23260-10-bjorn.topel@gmail.com commit eb9928bed003dd61a443d0ba51ae066429fbe735 Author: Björn Töpel Date: Mon Dec 16 10:13:42 2019 +0100 riscv, bpf: Add missing uapi header for BPF_PROG_TYPE_PERF_EVENT programs Add missing uapi header the BPF_PROG_TYPE_PERF_EVENT programs by exporting struct user_regs_struct instead of struct pt_regs which is in-kernel only. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191216091343.23260-9-bjorn.topel@gmail.com commit e368b64f8b0c8066115ad1da71f83f20f7bb43af Author: Björn Töpel Date: Mon Dec 16 10:13:41 2019 +0100 riscv, bpf: Optimize calls Instead of using emit_imm() and emit_jalr() which can expand to six instructions, start using jal or auipc+jalr. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191216091343.23260-8-bjorn.topel@gmail.com commit 7f3631e88ee6fb13beac333a0e9e605d2414d17f Author: Björn Töpel Date: Mon Dec 16 10:13:40 2019 +0100 riscv, bpf: Provide RISC-V specific JIT image alloc/free This commit makes sure that the JIT images is kept close to the kernel text, so BPF calls can use relative calling with auipc/jalr or jal instead of loading the full 64-bit address and jalr. The BPF JIT image region is 128 MB before the kernel text. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191216091343.23260-7-bjorn.topel@gmail.com commit fe8322b866d560a3b3535ed9aa49df59809decbe Author: Björn Töpel Date: Mon Dec 16 10:13:39 2019 +0100 riscv, bpf: Optimize BPF tail calls Remove one addi, and instead use the offset part of jalr. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191216091343.23260-6-bjorn.topel@gmail.com commit 33203c02f2f8ae8e19d7dbbabf55cfd0025efede Author: Björn Töpel Date: Mon Dec 16 10:13:38 2019 +0100 riscv, bpf: Add support for far jumps and exits This commit add support for far (offset > 21b) jumps and exits. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Reviewed-by: Luke Nelson Link: https://lore.kernel.org/bpf/20191216091343.23260-5-bjorn.topel@gmail.com commit 29d92edd9ee8b37bd8e9a0ba7fd549f874e0d069 Author: Björn Töpel Date: Mon Dec 16 10:13:37 2019 +0100 riscv, bpf: Add support for far branching when emitting tail call Start use the emit_branch() function in the tail call emitter in order to support far branching. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191216091343.23260-4-bjorn.topel@gmail.com commit 7d1ef13fea2b66bb466592a7855b33181c85ec5f Author: Björn Töpel Date: Mon Dec 16 10:13:36 2019 +0100 riscv, bpf: Add support for far branching This commit adds branch relaxation to the BPF JIT, and with that support for far (offset greater than 12b) branching. The branch relaxation requires more than two passes to converge. For most programs it is three passes, but for larger programs it can be more. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Reviewed-by: Luke Nelson Link: https://lore.kernel.org/bpf/20191216091343.23260-3-bjorn.topel@gmail.com commit f1003b787c00fbaa4b11619c6b23a885bfce8f07 Author: Björn Töpel Date: Mon Dec 16 10:13:35 2019 +0100 riscv, bpf: Fix broken BPF tail calls The BPF JIT incorrectly clobbered the a0 register, and did not flag usage of s5 register when BPF stack was being used. Fixes: 2353ecc6f91f ("bpf, riscv: add BPF JIT for RV64G") Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191216091343.23260-2-bjorn.topel@gmail.com commit 7da5492739db745d935a7044288a7307a0fb7f29 Author: Colin Ian King Date: Mon Dec 16 16:21:36 2019 +0000 drm/gma500: fix null dereference of pointer fb before null check Pointer fb is being dereferenced when assigning dev before it is null checked. Fix this by only dereferencing dev after the null check. Fixes: 6b7ce2c4161a ("drm/gma500: Remove struct psb_fbdev") Signed-off-by: Colin Ian King Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20191216162136.270114-1-colin.king@canonical.com commit 24f03be4aa7922ef5c6067d2809c5d90dfe275c9 Author: Jani Nikula Date: Tue Dec 10 14:30:46 2019 +0200 drm/gem-fb-helper: convert to drm device based logging Prefer drm_dbg_kms() and drm_err() over all other logging. Reviewed-by: Sam Ravnborg Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191210123050.8799-4-jani.nikula@intel.com commit f33b9730cc5a33c6dd79ac8718ce2fbd9a75a3e3 Author: Jani Nikula Date: Tue Dec 10 14:30:45 2019 +0200 drm/fb-helper: convert to drm device based logging Prefer drm_dbg_kms(), drm_info(), and drm_err() over all other logging. This is about KMS so switch to the KMS category while at it. Reviewed-by: Sam Ravnborg Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191210123050.8799-3-jani.nikula@intel.com commit 41cb6603add2028b6763140fed835615da7d4729 Author: Jani Nikula Date: Tue Dec 10 14:30:44 2019 +0200 drm/client: convert to drm device based logging Prefer drm_dbg_kms() and drm_err() over DRM_DEV_DEBUG_KMS() and DRM_DEV_ERROR(). Reviewed-by: Sam Ravnborg Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191210123050.8799-2-jani.nikula@intel.com commit cabeacd4cc132873de212fcb0e8739b95e6f2a02 Author: Jani Nikula Date: Thu Dec 12 15:47:28 2019 +0200 drm/i915/dsc: fix DSC power domains for DSI Fix several issues with DSC power domains that did not take DSI transcoders into account: - On TGL+ we need to use PW2 for DSC on pipe A, not transcoder A. There is no longer an eDP transcoder, but there are two DSI transcoders which may be connected to pipe A. - On TGL+ we need to use the pipe, not transcoder, power domains for DSC on pipes other than A. Again, there are DSI transcoders. - On ICL we need to use PW2 for DSC also for DSI transcoders, not just for the eDP transcoder. Using is_pipe_dsc() also adds the warning about ICL pipe A DSC, which does not exist. Cc: José Roberto de Souza Cc: Manasi Navare Cc: Vandita Kulkarni Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191212134728.18432-1-jani.nikula@intel.com commit 4cb48c447e8753aec2c96630a539eb6207fd6814 Author: Jani Nikula Date: Wed Dec 11 18:23:47 2019 +0200 drm/i915/dsc: clarify DSC support for pipe A on ICL The check for cpu_transcoder != TRANSCODER_A is more magic than necessary, and potentially misleading. Before TGL, DSC is supported on pipe A if, and only if, it's used with eDP or DSI transcoders. No functional changes. Cc: Manasi Navare Cc: Vandita Kulkarni Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/f00e9d55ce20b256177222588780c660aa587cc3.1576081155.git.jani.nikula@intel.com commit 0314da782d4812548aae0607b369f4f43d6bc6b4 Author: Jani Nikula Date: Wed Dec 11 18:23:46 2019 +0200 drm/i915/dsc: fix DSC register selection for ICL DSI transcoders ICL eDP and DSI transcoders have a DSC engine separate from the pipe. Abstract the register selection and fix it for ICL. Add a warning for pipe A DSC on ICL; it does not exist. Cc: Manasi Navare Cc: Vandita Kulkarni Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/01bcddcdf397b1c8eb859ed18ebe023fb64383d9.1576081155.git.jani.nikula@intel.com commit 95ed0c5b1292fb90fe100af88541a7bef6ba44ec Author: Pavel Begunkov Date: Fri Nov 29 00:11:55 2019 +0300 blk-mq: optimise blk_mq_flush_plug_list() Instead of using list_del_init() in a loop, that generates a lot of unnecessary memory read/writes, iterate from the first request of a batch and cut out a sublist with list_cut_before(). Apart from removing the list node initialisation part, this is more register-friendly, and the assembly uses the stack less intensively. list_empty() at the beginning is done with hope, that the compiler can optimise out the same check in the following list_splice_init(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 28ca0d6d39ab1d01c86762c82a585b7cedd2920c Author: Pavel Begunkov Date: Fri Nov 29 00:11:54 2019 +0300 list: introduce list_for_each_continue() As other *continue() helpers, this continues iteration from a given position. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 7d30a621028a22a9e8fbae5c5d8dc455869e4999 Author: Pavel Begunkov Date: Fri Nov 29 00:11:53 2019 +0300 blk-mq: optimise rq sort function Check "!=" in multi-layer comparisons. The same memory usage, fewer instructions, and 2 from 4 jumps are replaced with SETcc. Note, that list_sort() doesn't differ 0 and <0. Reviewed-by: Nikolay Borisov Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit c360824a9d84339bde15a9402e839b5c28564c05 Author: Andrzej Pietrasiewicz Date: Thu Nov 28 16:01:30 2019 +0100 drm/i915: Provide ddc symlink in hdmi connector sysfs directory Use the ddc pointer provided by the generic connector. Signed-off-by: Andrzej Pietrasiewicz Acked-by: Sam Ravnborg Reviewed-by: Emil Velikov Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191128150130.26266-1-andrzej.p@collabora.com commit 738987a1d6f167e155c41658211f8c98c114c371 Author: Peter Ujfalusi Date: Tue Dec 17 14:22:54 2019 +0200 mmc: bcm2835: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Reviewed-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20191217122254.7103-1-peter.ujfalusi@ti.com Signed-off-by: Ulf Hansson commit e6d82a7bc849200101178ba7e7545a15999fab5a Author: Peter Ujfalusi Date: Tue Dec 17 13:31:14 2019 +0200 mmc: usdhi6rol0: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA if needed. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191217113114.32085-1-peter.ujfalusi@ti.com Signed-off-by: Ulf Hansson commit b67b45179b34b76a3c90bcc8b05b7141e74df909 Author: Peter Ujfalusi Date: Tue Dec 17 13:30:31 2019 +0200 mmc: sh_mmcif: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA if needed. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191217113031.31847-1-peter.ujfalusi@ti.com Signed-off-by: Ulf Hansson commit e1ebb456ae4cd86553c4a28bcf2c3cc7593dc60f Author: Peter Ujfalusi Date: Tue Dec 17 13:30:04 2019 +0200 mmc: pxamci: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191217113004.31688-1-peter.ujfalusi@ti.com Signed-off-by: Ulf Hansson commit 2e2d12e110b74f689b516619b0c240c9fd57127d Author: Peter Ujfalusi Date: Tue Dec 17 13:29:34 2019 +0200 mmc: owl-mmc: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191217112934.31535-1-peter.ujfalusi@ti.com Signed-off-by: Ulf Hansson commit 972a2dd62680229f9763ae9d274bfb3e9a445ab9 Author: Peter Ujfalusi Date: Tue Dec 17 13:28:47 2019 +0200 mmc: mxs: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191217112847.31351-1-peter.ujfalusi@ti.com Signed-off-by: Ulf Hansson commit c3b2a0212b729851ee8184ac1caa4ed3b8c39f20 Author: Peter Ujfalusi Date: Tue Dec 17 13:28:03 2019 +0200 mmc: mxcmmc: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191217112803.31161-1-peter.ujfalusi@ti.com Signed-off-by: Ulf Hansson commit 716d0205fe3aed8a8180747933f15114559248c8 Author: Peter Ujfalusi Date: Tue Dec 17 13:27:37 2019 +0200 mmc: mmci: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191217112737.31024-1-peter.ujfalusi@ti.com Signed-off-by: Ulf Hansson commit c1fce225220dcfe8ba855b2373518fed9ea3e510 Author: Peter Ujfalusi Date: Tue Dec 17 13:26:56 2019 +0200 mmc: dw_mmc: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191217112656.30860-1-peter.ujfalusi@ti.com Signed-off-by: Ulf Hansson commit 9f606f11ea98c7a34c9e8c7405ec80ef3572ce69 Merge: 2253ed4b36dc f667216c5c7c Author: Ulf Hansson Date: Thu Dec 19 08:15:58 2019 +0100 Merge branch 'fixes' into next commit 40f6a663fbc969e4ed82786a8d60b5f0cb431b18 Author: Ma Feng Date: Thu Dec 19 14:19:36 2019 +0800 remoteproc: qcom: Remove unneeded semicolon Fixes coccicheck warning: drivers/remoteproc/qcom_sysmon.c:397:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: Ma Feng Link: https://lore.kernel.org/r/1576736376-114816-1-git-send-email-mafeng.ma@huawei.com Signed-off-by: Bjorn Andersson commit a651c6c64431765c7a833e37dae5b135622bdf04 Author: Xu Wang Date: Wed Dec 18 06:00:06 2019 +0000 EDAC/aspeed: Remove unneeded semicolon Remove unneeded semicolon reported by coccinelle. Signed-off-by: Xu Wang Signed-off-by: Borislav Petkov Acked-by: Andrew Jeffery Cc: James Morse Cc: Joel Stanley Cc: linux-arm-kernel@lists.infradead.org Cc: linux-aspeed@lists.ozlabs.org Cc: linux-edac Cc: Mauro Carvalho Chehab Cc: Robert Richter Cc: Stefan Schaeckeler Cc: Tony Luck Link: https://lkml.kernel.org/r/1576648806-1114-1-git-send-email-vulab@iscas.ac.cn commit 570c815698c4c1b2f750cbe9ea40111416671d8e Author: Gurchetan Singh Date: Wed Dec 18 16:57:33 2019 -0800 drm/virtio: move drm_connector_to_virtio_gpu_output to virtgpu_display That's the only file that uses it. Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20191219005733.18960-6-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit c91a1e2b5a6a72260dd2a116a6157cb9e740c35d Author: Gurchetan Singh Date: Wed Dec 18 16:57:32 2019 -0800 drm/virtio: move to_virtio_fence inside virtgpu_fence That's the only file that uses it. Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20191219005733.18960-5-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 093bd9cf5e2c775bac9031ea5974a38ee6cca09b Author: Gurchetan Singh Date: Wed Dec 18 16:57:31 2019 -0800 drm/virtio: simplify getting fake offset This is a little simpler. Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20191219005733.18960-4-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 9e07d4617b0156cd93b71fbda2b2a0f15da83e94 Author: Gurchetan Singh Date: Wed Dec 18 16:57:30 2019 -0800 drm/virtio: get rid of drm_encoder_to_virtio_gpu_output Not used anywhere. Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20191219005733.18960-3-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 9567728ae28c6a8d93068f64642a7d9246ab917d Author: Gurchetan Singh Date: Wed Dec 18 16:57:29 2019 -0800 drm/virtio: static-ify virtio_gpu_framebuffer_init Not used anywhere else. Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20191219005733.18960-2-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 974e65e384b441062004576c625ade3d54bb5d79 Author: Gurchetan Singh Date: Wed Dec 18 16:57:28 2019 -0800 drm/virtio: static-ify virtio_fence_signaled Not used anywhere else. Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20191219005733.18960-1-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 1ea7d2ca7b0875b45d593c56016884bb6f5e2c87 Author: Jorge Ramirez-Ortiz Date: Mon Nov 25 14:59:08 2019 +0100 clk: qcom: apcs-msm8916: silently error out on EPROBE_DEFER If devm_clk_get() fails due to probe deferral, we shouldn't print an error message. Just be silent in this case. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Link: https://lkml.kernel.org/r/20191125135910.679310-7-niklas.cassel@linaro.org Signed-off-by: Stephen Boyd commit 8a7729abec38368163fb62b3754e792dd29258e3 Author: Jorge Ramirez-Ortiz Date: Mon Nov 25 14:59:07 2019 +0100 clk: qcom: hfpll: use clk_parent_data to specify the parent This permits extending the driver to other platforms without having to modify its source code. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Link: https://lkml.kernel.org/r/20191125135910.679310-6-niklas.cassel@linaro.org Signed-off-by: Stephen Boyd commit b455dc3510ca7070a07bd0119f4f432a98d1bc0b Author: Jorge Ramirez-Ortiz Date: Mon Nov 25 14:59:06 2019 +0100 clk: qcom: hfpll: CLK_IGNORE_UNUSED When COMMON_CLK_DISABLED_UNUSED is set, in an effort to save power and to keep the software model of the clock in line with reality, the framework transverses the clock tree and disables those clocks that were enabled by the firmware but have not been enabled by any device driver. If CPUFREQ is enabled, early during the system boot, it might attempt to change the CPU frequency ("set_rate"). If the HFPLL is selected as a provider, it will then change the rate for this clock. As boot continues, clk_disable_unused_subtree will run. Since it wont find a valid counter (enable_count) for a clock that is actually enabled it will attempt to disable it which will cause the CPU to stop. Notice that in this driver, calls to check whether the clock is enabled are routed via the is_enabled callback which queries the hardware. The following commit, rather than marking the clock critical and forcing the clock to be always enabled, addresses the above scenario making sure the clock is not disabled but it continues to rely on the firmware to enable the clock. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Bjorn Andersson Link: https://lkml.kernel.org/r/20191125135910.679310-5-niklas.cassel@linaro.org Signed-off-by: Stephen Boyd commit 9e4066748bf7bf13b04312f9b1c42d2a6cc77f66 Author: Jorge Ramirez-Ortiz Date: Mon Nov 25 14:59:05 2019 +0100 clk: qcom: hfpll: register as clock provider Make the output of the high frequency pll a clock provider. On the QCS404 this PLL controls cpu frequency scaling. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Bjorn Andersson Acked-by: Stephen Boyd Link: https://lkml.kernel.org/r/20191125135910.679310-4-niklas.cassel@linaro.org Signed-off-by: Stephen Boyd commit 4168c1cada5f05ea450e407123ee07d0f4974438 Author: Jorge Ramirez-Ortiz Date: Mon Nov 25 14:59:04 2019 +0100 clk: qcom: gcc: limit GPLL0_AO_OUT operating frequency Limit the GPLL0_AO_OUT_MAIN operating frequency as per its hardware specifications. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Bjorn Andersson Acked-by: Stephen Boyd Link: https://lkml.kernel.org/r/20191125135910.679310-3-niklas.cassel@linaro.org Signed-off-by: Stephen Boyd commit 4316ec05da997c20f74005753d228765e369a1cb Author: Jorge Ramirez-Ortiz Date: Mon Nov 25 14:59:03 2019 +0100 dt-bindings: mailbox: qcom: Add clock-name optional property When the APCS clock is registered (platform dependent), it retrieves its parent names from hardcoded values in the driver. The following commit allows the DT node to provide such clock names to the platform data based clock driver therefore avoiding having to explicitly embed those names in the clock driver source code. Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Link: https://lkml.kernel.org/r/20191125135910.679310-2-niklas.cassel@linaro.org Signed-off-by: Stephen Boyd commit 87ec9adcca71801a44ddb311185b17df09839ab5 Author: Jeffrey Hugo Date: Tue Dec 17 08:54:09 2019 -0800 clk: qcom: smd: Add missing bimc clock It turns out booting the modem is dependent on a bimc vote from Linux on msm8998. To make the modem happy, add the bimc clock to rely on the default vote from rpmcc. Once we have interconnect support, bimc should be controlled properly. Fixes: 6131dc81211c ("clk: qcom: smd: Add support for MSM8998 rpm clocks") Signed-off-by: Jeffrey Hugo Link: https://lkml.kernel.org/r/20191217165409.4919-1-jeffrey.l.hugo@gmail.com Reviewed-by: Bjorn Andersson Signed-off-by: Stephen Boyd commit d14b15b5931c2b3eb15613d28f904c44ea4f183c Author: Jeffrey Hugo Date: Tue Dec 17 08:20:33 2019 -0700 clk: qcom: Add MSM8998 Multimedia Clock Controller (MMCC) driver Add a driver for the multimedia clock controller found on MSM8998 based devices. This should allow most multimedia device drivers to probe and control their clocks. Signed-off-by: Jeffrey Hugo Reviewed-by: Bjorn Andersson Link: https://lkml.kernel.org/r/1576596033-10189-1-git-send-email-jhugo@codeaurora.org Signed-off-by: Stephen Boyd commit e6494bf65a0f11aa378ac0fededeb14076177654 Author: Jeffrey Hugo Date: Tue Dec 17 08:20:18 2019 -0700 dt-bindings: clock: Add support for the MSM8998 mmcc Document the multimedia clock controller found on MSM8998. Signed-off-by: Jeffrey Hugo Reviewed-by: Rob Herring Link: https://lkml.kernel.org/r/1576596018-10140-1-git-send-email-jhugo@codeaurora.org Signed-off-by: Stephen Boyd commit 8218c2cb815543f21e4da5b8a8b4a2402d796767 Author: Jeffrey Hugo Date: Tue Dec 17 08:20:03 2019 -0700 dt-bindings: clock: Convert qcom,mmcc to DT schema Convert the qcom,mmcc-X clock controller binding to DT schema. Add the protected-clocks property to the schema to show that is it explicitly allowed, instead of relying on the generic, pre-schema binding. Signed-off-by: Jeffrey Hugo Reviewed-by: Rob Herring Link: https://lkml.kernel.org/r/1576596003-10093-1-git-send-email-jhugo@codeaurora.org Signed-off-by: Stephen Boyd commit d109ea0970cfca28c4ab1c0d6295551434ca2a7a Author: Jeffrey Hugo Date: Tue Dec 17 08:19:47 2019 -0700 dt-bindings: clock: Document external clocks for MSM8998 gcc The global clock controller on MSM8998 can consume a number of external clocks. Document them. For 7180 and 8150, the hardware always exists, so no clocks are truly optional. Therefore, simplify the binding by removing the min/max qualifiers to clocks. Also, fixup an example so that dt_binding_check passes. Signed-off-by: Jeffrey Hugo Reviewed-by: Rob Herring Link: https://lkml.kernel.org/r/1576595987-10043-1-git-send-email-jhugo@codeaurora.org Signed-off-by: Stephen Boyd commit bb9b9cde0fe009f8cb3862abaafa96302ab4e486 Author: Brian Masney Date: Fri Nov 15 07:39:31 2019 -0500 clk: qcom: mmcc8974: move gfx3d_clk_src from the mmcc to rpm gfx3d_clk_src for msm8974 was introduced into the MMCC by commit d8b212014e69 ("clk: qcom: Add support for MSM8974's multimedia clock controller (MMCC)") to ensure that all of the clocks for this platform are documented upstream. This clock actually belongs on the RPM. Since then, commit 685dc94b7d8f ("clk: qcom: smd-rpmcc: Add msm8974 clocks") was introduced, which contains the proper definition for gfx3d_clk_src. Let's drop the definition from the mmcc and register the clock with the rpm instead. This change was tested on a Nexus 5 (hammerhead) phone. Signed-off-by: Brian Masney Link: https://lkml.kernel.org/r/20191115123931.18919-1-masneyb@onstation.org Reviewed-by: Bjorn Andersson Signed-off-by: Stephen Boyd commit c1079b4ec186ff642641704a98c3ca86d7aa3722 Author: Taniya Das Date: Wed Jul 31 23:57:13 2019 +0530 clk: qcom: dispcc: Add support for display port clocks SDM845 dispcc supports RCG and CBCRs for display port, so add support for the same. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/20190731182713.8123-3-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit cddf1f8241d8ac8308791f4150cb37ea3e470868 Author: Taniya Das Date: Wed Jul 31 23:57:12 2019 +0530 clk: qcom: rcg2: Add support for display port clock ops New display port clock ops supported for display port clocks. Signed-off-by: Taniya Das Link: https://lkml.kernel.org/r/20190731182713.8123-2-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 5c108d4e18f80be01965792726c81b105fbd677a Author: Stephen Smalley Date: Fri Dec 13 15:28:38 2019 -0500 selinux: randomize layout of key structures Randomize the layout of key selinux data structures. Initially this is applied to the selinux_state, selinux_ss, policydb, and task_security_struct data structures. NB To test/use this mechanism, one must install the necessary build-time dependencies, e.g. gcc-plugin-devel on Fedora, and enable CONFIG_GCC_PLUGIN_RANDSTRUCT in the kernel configuration. Signed-off-by: Stephen Smalley Reviewed-by: Kees Cook [PM: double semi-colon fixed] Signed-off-by: Paul Moore commit 6c5a682e6497cb1f7a67303ce098462a36bed362 Author: Stephen Smalley Date: Tue Dec 17 09:15:10 2019 -0500 selinux: clean up selinux_enabled/disabled/enforcing_boot Rename selinux_enabled to selinux_enabled_boot to make it clear that it only reflects whether SELinux was enabled at boot. Replace the references to it in the MAC_STATUS audit log in sel_write_enforce() with hardcoded "1" values because this code is only reachable if SELinux is enabled and does not change its value, and update the corresponding MAC_STATUS audit log in sel_write_disable(). Stop clearing selinux_enabled in selinux_disable() since it is not used outside of initialization code that runs before selinux_disable() can be reached. Mark both selinux_enabled_boot and selinux_enforcing_boot as __initdata since they are only used in initialization code. Wrap the disabled field in the struct selinux_state with CONFIG_SECURITY_SELINUX_DISABLE since it is only used for runtime disable. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit d6f970f0dad6c053bf7a9be81e91cb95e4ff4af9 Author: Lucas De Marchi Date: Tue Dec 17 15:05:29 2019 -0800 drm/i915/display: fix phy name Pass the correct variable as argument. Signed-off-by: Lucas De Marchi Reviewed-by: Clinton Taylor Link: https://patchwork.freedesktop.org/patch/msgid/20191217230529.25092-3-lucas.demarchi@intel.com commit 41ba19fca303895434961084bcd0a8ad8504e970 Author: Lucas De Marchi Date: Tue Dec 17 15:05:28 2019 -0800 drm/i915/display: use clk_off name to avoid double negation Instead of "ungated" use the same name for the variable as the bitfield, making it clearer what's the intent of the checks. Signed-off-by: Lucas De Marchi Reviewed-by: Clinton Taylor Link: https://patchwork.freedesktop.org/patch/msgid/20191217230529.25092-2-lucas.demarchi@intel.com commit 5956f44028f5a0b15f6930256af3d5dbdf1f1f57 Author: Lucas De Marchi Date: Tue Dec 17 15:05:27 2019 -0800 drm/i915/display: move clk off sanitize to its own function This allows us to isolate reading and writing to the ICL_DPCLKA_CFGCR0 during the sanitize phase. Signed-off-by: Lucas De Marchi Reviewed-by: Clinton Taylor Link: https://patchwork.freedesktop.org/patch/msgid/20191217230529.25092-1-lucas.demarchi@intel.com commit a352a82496d17f210a88b4fe2de7904afdb92003 Merge: d69587062c34 630628cb7dc3 Author: Alexei Starovoitov Date: Wed Dec 18 17:33:37 2019 -0800 Merge branch 'libbpf-extern-followups' Andrii Nakryiko says: ==================== Based on latest feedback and discussions, this patch set implements the following changes: - Kconfig-provided externs have to be in .kconfig section, for which bpf_helpers.h provides convenient __kconfig macro (Daniel); - instead of allowing to override Kconfig file path, switch this to ability to extend and override system Kconfig with user-provided custom values (Alexei); - BTF is required when externs are used. ==================== Signed-off-by: Alexei Starovoitov commit 630628cb7dc39780660d8fcedc66e0298a82f9da Author: Andrii Nakryiko Date: Wed Dec 18 16:28:36 2019 -0800 libbpf: BTF is required when externs are present BTF is required to get type information about extern variables. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191219002837.3074619-4-andriin@fb.com commit 8601fd422148a8f7ff5f7eaf75b6703d5166332c Author: Andrii Nakryiko Date: Wed Dec 18 16:28:35 2019 -0800 libbpf: Allow to augment system Kconfig through extra optional config Instead of all or nothing approach of overriding Kconfig file location, allow to extend it with extra values and override chosen subset of values though optional user-provided extra config, passed as a string through open options' .kconfig option. If same config key is present in both user-supplied config and Kconfig, user-supplied one wins. This allows applications to more easily test various conditions despite host kernel's real configuration. If all of BPF object's __kconfig externs are satisfied from user-supplied config, system Kconfig won't be read at all. Simplify selftests by not needing to create temporary Kconfig files. Suggested-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191219002837.3074619-3-andriin@fb.com commit 81bfdd087bf31a87c5ff25cc7004d5308954a35c Author: Andrii Nakryiko Date: Wed Dec 18 16:28:34 2019 -0800 libbpf: Put Kconfig externs into .kconfig section Move Kconfig-provided externs into custom .kconfig section. Add __kconfig into bpf_helpers.h for user convenience. Update selftests accordingly. Suggested-by: Daniel Borkmann Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191219002837.3074619-2-andriin@fb.com commit d69587062c347314a019cf6ee27f2e4b494868e1 Author: Andrii Nakryiko Date: Wed Dec 18 14:50:39 2019 -0800 libbpf: Add bpf_link__disconnect() API to preserve underlying BPF resource There are cases in which BPF resource (program, map, etc) has to outlive userspace program that "installed" it in the system in the first place. When BPF program is attached, libbpf returns bpf_link object, which is supposed to be destroyed after no longer necessary through bpf_link__destroy() API. Currently, bpf_link destruction causes both automatic detachment and frees up any resources allocated to for bpf_link in-memory representation. This is inconvenient for the case described above because of coupling of detachment and resource freeing. This patch introduces bpf_link__disconnect() API call, which marks bpf_link as disconnected from its underlying BPF resouces. This means that when bpf_link is destroyed later, all its memory resources will be freed, but BPF resource itself won't be detached. This design allows to follow strict and resource-leak-free design by default, while giving easy and straightforward way for user code to opt for keeping BPF resource attached beyond lifetime of a bpf_link. For some BPF programs (i.e., FS-based tracepoints, kprobes, raw tracepoint, etc), user has to make sure to pin BPF program to prevent kernel to automatically detach it on process exit. This should typically be achived by pinning BPF program (or map in some cases) in BPF FS. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191218225039.2668205-1-andriin@fb.com commit e2ec6aef37e699998a9d8df8926a70305b74afd5 Author: Jean-Francois Dagenais Date: Fri Nov 1 15:07:03 2019 -0400 power: supply: sbs-battery: fix CAPACITY_MODE bit naming "Battery mode" is the name of the register, the bit manipulated by this code is "CAPACITY_MODE" (Smart Battery System Specifications). Signed-off-by: Jean-Francois Dagenais Signed-off-by: Sebastian Reichel commit 6de6c1f840c051017f2308503858ff19344c56b3 Author: Nikita V. Shirokov Date: Wed Dec 18 12:57:47 2019 -0800 bpf: Allow to change skb mark in test_run allow to pass skb's mark field into bpf_prog_test_run ctx for BPF_PROG_TYPE_SCHED_CLS prog type. that would allow to test bpf programs which are doing decision based on this field Signed-off-by: Nikita V. Shirokov Signed-off-by: Alexei Starovoitov commit 75d8a8423c877f2745cdbeaeaa06e8fa04dfdf27 Author: Jean-Francois Dagenais Date: Fri Nov 1 15:06:59 2019 -0400 power: supply: sbs-battery: use octal permissions on module param Symbolic permissions 'S_IRUSR | S_IRGRP | S_IROTH' are not preferred. Use octal permissions '0444'. Signed-off-by: Jean-Francois Dagenais Signed-off-by: Sebastian Reichel commit dacce6412e09b5dce19514e2c4e2a8aab0eb217f Author: Andrii Nakryiko Date: Wed Dec 18 14:17:07 2019 -0800 bpftool: Work-around rst2man conversion bug Work-around what appears to be a bug in rst2man convertion tool, used to create man pages out of reStructureText-formatted documents. If text line starts with dot, rst2man will put it in resulting man file verbatim. This seems to cause man tool to interpret it as a directive/command (e.g., `.bs`), and subsequently not render entire line because it's unrecognized one. Enclose '.xxx' words in extra formatting to work around. Fixes: cb21ac588546 ("bpftool: Add gen subcommand manpage") Reported-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Date: Thu Nov 21 04:19:55 2019 +0100 power: reset: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 7c43e0d6a526e7734eb854fe242886f52ccd06ac Author: Andrii Nakryiko Date: Wed Dec 18 13:43:14 2019 -0800 bpftool: Simplify format string to not use positional args Change format string referring to just single argument out of two available. Some versions of libc can reject such format string. Reported-by: Nikita Shirokov Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20191218214314.2403729-1-andriin@fb.com commit 464aca16487c618534bf2efa4afbc9ece015553a Author: Enric Balletbo i Serra Date: Fri Nov 29 22:59:16 2019 +0100 power: supply: cros_usbpd: Remove dev_err() getting the number of ports When a device has no support to get the charger number of ports, it doesn't have to result in a dev_err(), print saying "Could not get charger port count" using a dev_info() would suffice. In such case, the dev_info() message is already printed but the dev_err() is annoying, specially, on those devices that doesn't support the command. So remove the dev_err(). Signed-off-by: Enric Balletbo i Serra Reviewed-by: Guenter Roeck Signed-off-by: Sebastian Reichel commit a08990ea11dc3386cc972c817a121525f7bc7321 Author: Matheus Castello Date: Thu Dec 5 12:44:10 2019 -0300 power: supply: max17040: Send uevent in SOC and status change Notify core through power_supply_changed() in case of changes in state of charge and power supply status. This is useful for user-space to efficiently update current battery level. Signed-off-by: Matheus Castello Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit cccdd0ca1c0d985c3cf1dfe65a3b42387a6e3d22 Author: Matheus Castello Date: Thu Dec 5 12:44:09 2019 -0300 power: supply: max17040: Config alert SOC low level threshold from FDT For configuration of fuel gauge alert for a low level state of charge interrupt we add a function to config level threshold and a device tree binding property to set it in flatned device tree node. Now we can use "maxim,alert-low-soc-level" property with the values from 1% up to 32% to configure alert interrupt threshold. Signed-off-by: Matheus Castello Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 2e17ed94de68953b17ed91b64f4bd176cdf38ad4 Author: Matheus Castello Date: Thu Dec 5 12:44:06 2019 -0300 power: supply: max17040: Add IRQ handler for low SOC alert According datasheet max17040 has a pin for alert host for low SOC. This pin can be used as external interrupt, so we need to check for interrupts assigned for device and handle it. In handler we are checking and storing fuel gauge registers values and send an uevent to notificate user space, so user space can decide save work or turn off since the alert demonstrate that the battery may no have the power to keep the system turned on for much longer. Signed-off-by: Matheus Castello Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 7a8bac169a65e0fb7e5da8ef3277b4016b5d1ffe Author: Matheus Castello Date: Thu Dec 5 12:44:07 2019 -0300 dt-bindings: power: supply: max17040: Add DT bindings for max17040 fuel gauge Documentation of max17040 based fuel gauge characteristics. For configure low level state of charge threshold alert signaled from max17043/max17044 we add "maxim,alert-low-soc-level" property. Signed-off-by: Matheus Castello Reviewed-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit 058d42563a5692a4e663df0dc270f4ffd2c70274 Author: Baolin Wang Date: Mon Dec 9 11:56:25 2019 +0800 power: supply: sc27xx: Calibrate the resistance of coulomb counter There are some deviations between the real resistance and the ideal resistance of coulomb counter, which will affect the accuracy of the coulomb counter, thus calibrate the real resistance of coulomb counter to improve the accuracy. Signed-off-by: Baolin Wang Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit 7772d22e4b0681b5d0ff1bf4127c1b35e7641d07 Author: Baolin Wang Date: Mon Dec 9 11:56:24 2019 +0800 dt-bindings: power: sc27xx: Add a new property to describe the real resistance of coulomb counter chip Add a new property to describe the real resistance of coulomb counter chip, which is used to calibrate the accuracy of the coulomb counter chip. Acked-by: Rob Herring Signed-off-by: Baolin Wang Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit 6af8288834b6a9dfcbe9847b675ff24d39d30679 Author: Yuanjiang Yu Date: Mon Dec 9 11:56:23 2019 +0800 power: supply: sc27xx: Optimize the battery resistance with measuring temperature Optimize the battery internal resistance in a certain temerature to get a accurate battery internal resistance. Signed-off-by: Yuanjiang Yu Signed-off-by: Baolin Wang Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit 65dbad713d5d6a8581921804ae3f5eb4a9bf032e Author: Baolin Wang Date: Mon Dec 9 11:56:22 2019 +0800 power: supply: core: Add battery internal resistance temperature table support Since the battery internal resistance can be changed with the temperature changes, thus add a resistance temperature table support to look up the accurate battery internal resistance in a certain temperature. Signed-off-by: Baolin Wang Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit 9a056a879111f88149dad428e7cc4f85c87a62bc Author: Baolin Wang Date: Mon Dec 9 11:56:21 2019 +0800 dt-bindings: power: Introduce one property to describe the battery resistance with temperature changes Since the battery internal resistance can be changed as the temperature changes, thus add one table to describe the battery resistance percent in different temperatures to get a accurate battery internal resistance. Reviewed-by: Rob Herring Signed-off-by: Baolin Wang Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel commit 5de1780181e7c36d49266a6d35fc4e9f376b2b87 Author: Bartosz Golaszewski Date: Tue Dec 10 11:08:55 2019 +0100 power: supply: max77650: add of_match table We need the of_match table if we want to use the compatible string in the pmic's child node and get the charger driver loaded automatically. Signed-off-by: Bartosz Golaszewski Signed-off-by: Sebastian Reichel commit bc90705bbb570b2507353ba10d6b6788cfb119b1 Author: Angus Ainslie (Purism) Date: Sat Dec 14 07:27:54 2019 -0800 power: supply: max17042: add MAX17055 support The MAX17055 is very similar to the MAX17042 so extend the driver. Signed-off-by: Angus Ainslie (Purism) Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 47a34db3d5d2c04592f2b800b8ba39bcbf48e366 Author: Angus Ainslie (Purism) Date: Sat Dec 14 07:27:55 2019 -0800 device-tree: bindings: max17042_battery: add all of the compatible strings The bindings are missing documentation for some of the compatible strings. Signed-off-by: Angus Ainslie (Purism) Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Sebastian Reichel commit a3d70dacc727ada212aecb8d131a3910622763d6 Author: Lucas Stach Date: Tue Nov 19 18:00:04 2019 +0100 power: suppy: ucs1002: disable power when max current is 0 For some devices userspace needs the ability to completely cut the power to the USB devices connected to the charge controller. An easy way to achieve this is by allowing 0 as a valid max current and forcibly disable the output in that case, as well as enable it again if the regulator is in use and a non-0 max current is set. Signed-off-by: Lucas Stach Tested-by: Chris Healy Signed-off-by: Sebastian Reichel commit 3c9c2d08128a510f67c5443387af5e2176407596 Author: Krzysztof Kozlowski Date: Wed Nov 20 21:39:59 2019 +0800 power: supply: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 86b9182df8bb12610d4d6feac45a69f3ed57bfd2 Author: Paul Cercueil Date: Sat Nov 16 14:56:19 2019 +0100 power/supply: ingenic-battery: Don't change scale if there's only one The ADC in the JZ4740 can work either in high-precision mode with a 2.5V range, or in low-precision mode with a 7.5V range. The code in place in this driver will select the proper scale according to the maximum voltage of the battery. The JZ4770 however only has one mode, with a 6.6V range. If only one scale is available, there's no need to change it (and nothing to change it to), and trying to do so will fail with -EINVAL. Fixes: fb24ccfbe1e0 ("power: supply: add Ingenic JZ47xx battery driver.") Signed-off-by: Paul Cercueil Acked-by: Artur Rojek Cc: stable@vger.kernel.org Signed-off-by: Sebastian Reichel commit dd04defd11b78a73b302587575bbcda1019925d8 Author: Chuhong Yuan Date: Fri Nov 15 14:25:15 2019 +0800 power: supply: pda_power: add missed usb_unregister_notifier The driver forgets to unregister the notifier in remove. Add the call to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Sebastian Reichel commit a1ec57c020201ba29608a5a3588832d07de1a518 Author: Jose Abreu Date: Wed Dec 18 23:55:01 2019 +0100 net: stmmac: tc: Fix TAPRIO division operation For ARCHs that don't support 64 bits division we need to use the helpers. Fixes: b60189e0392f ("net: stmmac: Integrate EST with TAPRIO scheduler API") Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 5f773e551a3b977013df24d570d486645f326672 Author: Alex Deucher Date: Tue Dec 17 15:47:07 2019 -0500 drm/amdgpu/display: use msleep rather than udelay for HDCP ARM has a 2000us limit for udelay. Switch to msleep. This code executes in a worker thread so shouldn't be an atomic context. Signed-off-by: Alex Deucher Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20191217204707.2258744-2-alexander.deucher@amd.com commit 4e328922d461616c18f739ed4dfee0bb17133d75 Author: Alex Deucher Date: Tue Dec 17 15:47:06 2019 -0500 drm/amdgpu/display: include delay.h For udelay. This is needed for some platforms. Signed-off-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20191217204707.2258744-1-alexander.deucher@amd.com commit b40953c2baf0d6aed576451e655a44d444b7e9ef Author: Jane Jian Date: Mon Dec 16 16:24:13 2019 +0800 drm/amdgpu: skip VCN2.5 power gating and clock gating for sriov Arcturus v1: skip gating in serveral called functions by power gating and clock gating v2: from suggestion, skip setting gate in both set function, which is where it being called. Signed-off-by: Jane Jian Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit d83c7a07a79b55983e5b9cd7447e4304668f7733 Author: Jane Jian Date: Mon Dec 16 14:56:35 2019 +0800 drm/amdgpu: update VCN1(dual instances) fw types ID and VCN ip block type Previously there is no VCN1 type ID in psp gfx interface. Also add VCN ip block type unless the reinit after FLR for sriov would fail. Signed-off-by: Jane Jian Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 7daaebfea5e543b902fe239dcbc3a5304ac534ff Author: Jane Jian Date: Mon Dec 16 14:23:37 2019 +0800 drm/amdgpu: add VCN2.5 sriov start for Arctrus Use MMSCH V1 to finish Memory Controller programming as well as start MMSCH to do VCN2.5 initialization. Signed-off-by: Jane Jian Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 95f1b55b67a8e6dce8542f67edcd339d46f1b921 Author: Jane Jian Date: Mon Dec 16 14:14:49 2019 +0800 drm/amdgpu: add VCN2.5 MMSCH start for Arcturus Use MMSCH to do the initialization since MMSCH manages VCN2.5 instances and its world switch. Signed-off-by: Jane Jian Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit fb71a336cdc2ec45507b37c0690130a5e39f9733 Author: Guchun Chen Date: Tue Dec 17 17:01:28 2019 +0800 drm/amdgpu: move umc offset to one new header file for Arcturus Code refactor and no functional change. Fixes: 4cf781c24c3b ("drm/amdgpu: Added RAS UMC error query support for Arcturus") Signed-off-by: Guchun Chen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 6bff00170277436e189e995d8d3e1521296bed97 Merge: cbd22f172df7 82c664b69c8b Author: David S. Miller Date: Wed Dec 18 13:32:30 2019 -0800 Merge branch 'ETS-qdisc' Petr Machata says: ==================== Add a new Qdisc, ETS The IEEE standard 802.1Qaz (and 802.1Q-2014) specifies four principal transmission selection algorithms: strict priority, credit-based shaper, ETS (bandwidth sharing), and vendor-specific. All these have their corresponding knobs in DCB. But DCB does not have interfaces to configure RED and ECN, unlike Qdiscs. In the Qdisc land, strict priority is implemented by PRIO. Credit-based transmission selection algorithm can then be modeled by having e.g. TBF or CBS Qdisc below some of the PRIO bands. ETS would then be modeled by placing a DRR Qdisc under the last PRIO band. The problem with this approach is that DRR on its own, as well as the combination of PRIO and DRR, are tricky to configure and tricky to offload to 802.1Qaz-compliant hardware. This is due to several reasons: - As any classful Qdisc, DRR supports adding classifiers to decide in which class to enqueue packets. Unlike PRIO, there's however no fallback in the form of priomap. A way to achieve classification based on packet priority is e.g. like this: # tc filter add dev swp1 root handle 1: \ basic match 'meta(priority eq 0)' flowid 1:10 Expressing the priomap in this manner however forces drivers to deep dive into the classifier block to parse the individual rules. A possible solution would be to extend the classes with a "defmap" a la split / defmap mechanism of CBQ, and introduce this as a last resort classification. However, unlike priomap, this doesn't have the guarantee of covering all priorities. Traffic whose priority is not covered is dropped by DRR as unclassified. But ASICs tend to implement dropping in the ACL block, not in scheduling pipelines. The need to treat these configurations correctly (if only to decide to not offload at all) complicates a driver. It's not clear how to retrofit priomap with all its benefits to DRR without changing it beyond recognition. - The interplay between PRIO and DRR is also causing problems. 802.1Qaz has all ETS TCs as a last resort. Switch ASICs that support ETS at all are likely to handle ETS traffic this way as well. However, the Linux model is more generic, allowing the DRR block in any band. Drivers would need to be careful to handle this case correctly, otherwise the offloaded model might not match the slow-path one. In a similar vein, PRIO and DRR need to agree on the list of priorities assigned to DRR. This is doubly problematic--the user needs to take care to keep the two in sync, and the driver needs to watch for any holes in DRR coverage and treat the traffic correctly, as discussed above. Note that at the time that DRR Qdisc is added, it has no classes, and thus any priorities assigned to that PRIO band are not covered. Thus this case is surprisingly rather common, and needs to be handled gracefully by the driver. - Similarly due to DRR flexibility, when a Qdisc (such as RED) is attached below it, it is not immediately clear which TC the class represents. This is unlike PRIO with its straightforward classid scheme. When DRR is combined with PRIO, the relationship between classes and TCs gets even more murky. This is a problem for users as well: the TC mapping is rather important for (devlink) shared buffer configuration and (ethtool) counters. So instead, this patch set introduces a new Qdisc, which is based on 802.1Qaz wording. It is PRIO-like in how it is configured, meaning one needs to specify how many bands there are, how many are strict and how many are ETS, quanta for the latter, and priomap. The new Qdisc operates like the PRIO / DRR combo would when configured as per the standard. The strict classes, if any, are tried for traffic first. When there's no traffic in any of the strict queues, the ETS ones (if any) are treated in the same way as in DRR. The chosen interface makes the overall system both reasonably easy to configure, and reasonably easy to offload. The extra code to support ETS in mlxsw (which already supports PRIO) is about 150 lines, of which perhaps 20 lines is bona fide new business logic. Credit-based shaping transmission selection algorithm can be configured by adding a CBS Qdisc under one of the strict bands (e.g. TBF can be used to a similar effect as well). As a non-work-conserving Qdisc, CBS can't be hooked under the ETS bands. This is detected and handled identically to DRR Qdisc at runtime. Note that offloading CBS is not subject of this patchset. The patchset proceeds in four stages: - Patches #1-#3 are cleanups. - Patches #4 and #5 contain the new Qdisc. - Patches #6 and #7 update mlxsw to offload the new Qdisc. - Patches #8-#10 add selftests for ETS. Examples: - Add a Qdisc with 6 bands, 3 strict and 3 ETS with 45%-30%-25% weights: # tc qdisc add dev swp1 root handle 1: \ ets strict 3 quanta 4500 3000 2500 priomap 0 1 1 1 2 3 4 5 # tc qdisc sh dev swp1 qdisc ets 1: root refcnt 2 bands 6 strict 3 quanta 4500 3000 2500 priomap 0 1 1 1 2 3 4 5 5 5 5 5 5 5 5 5 - Tweak quantum of one of the classes of the previous Qdisc: # tc class ch dev swp1 classid 1:4 ets quantum 1000 # tc qdisc sh dev swp1 qdisc ets 1: root refcnt 2 bands 6 strict 3 quanta 1000 3000 2500 priomap 0 1 1 1 2 3 4 5 5 5 5 5 5 5 5 5 # tc class ch dev swp1 classid 1:3 ets quantum 1000 Error: Strict bands do not have a configurable quantum. - Purely strict Qdisc with 1:1 mapping between priorities and TCs: # tc qdisc add dev swp1 root handle 1: \ ets strict 8 priomap 7 6 5 4 3 2 1 0 # tc qdisc sh dev swp1 qdisc ets 1: root refcnt 2 bands 8 strict 8 priomap 7 6 5 4 3 2 1 0 7 7 7 7 7 7 7 7 - Use "bands" to specify number of bands explicitly. Underspecified bands are implicitly ETS and their quantum is taken from MTU. The following thus gives each band the same weight: # tc qdisc add dev swp1 root handle 1: \ ets bands 8 priomap 7 6 5 4 3 2 1 0 # tc qdisc sh dev swp1 qdisc ets 1: root refcnt 2 bands 8 quanta 1514 1514 1514 1514 1514 1514 1514 1514 priomap 7 6 5 4 3 2 1 0 7 7 7 7 7 7 7 7 v2: - This addresses points raised by David Miller. - Patch #4: - sch_ets.c: Add a comment with description of the Qdisc and the dequeuing algorithm. - Kconfig: Add a high-level description to the help blurb. v1: - No changes, first upstream submission after RFC. v3 (internal): - This addresses review from Jiri Pirko. - Patch #3: - Rename to _HR_ instead of to _HIERARCHY_. - Patch #4: - pkt_sched.h: Keep all the TCA_ETS_ constants in one enum. - pkt_sched.h: Rename TCA_ETS_BANDS to _NBANDS, _STRICT to _NSTRICT, _BAND_QUANTUM to _QUANTA_BAND and _PMAP_BAND to _PRIOMAP_BAND. - sch_ets.c: Update to reflect the above changes. Add a new policy, ets_class_policy, which is used when parsing class changes. Currently that policy is the same as the quanta policy, but that might change. - sch_ets.c: Move MTU handling from ets_quantum_parse() to the one caller that makes use of it. - sch_ets.c: ets_qdisc_priomap_parse(): WARN_ON_ONCE on invalid attribute instead of returning an extack. - Patch #6: - __mlxsw_sp_qdisc_ets_replace(): Pass the weights argument to this function in this patch already. Drop the weight computation. - mlxsw_sp_qdisc_prio_replace(): Rename "quanta" to "zeroes" and pass for the abovementioned "weights". - mlxsw_sp_qdisc_prio_graft(): Convert to a wrapper around __mlxsw_sp_qdisc_ets_graft(), instead of invoking the latter directly from mlxsw_sp_setup_tc_prio(). - Update to follow the _HIERARCHY_ -> _HR_ renaming. - Patch #7: - __mlxsw_sp_qdisc_ets_replace(): The "weights" argument passing and weight computation removal are now done in a previous patch. - mlxsw_sp_setup_tc_ets(): Drop case TC_ETS_REPLACE, which is handled earlier in the function. - Patch #3 (iproute2): - Add an example output to the commit message. - tc-ets.8: Fix output of two examples. - tc-ets.8: Describe default values of "bands", "quanta". - q_ets.c: A number of fixes in error messages. - q_ets.c: Comment formatting: /*padding*/ -> /* padding */ - q_ets.c: parse_nbands: Move duplicate checking to callers. - q_ets.c: Don't accept both "quantum" and "quanta" as equivalent. v2 (internal): - This addresses review from Ido Schimmel and comments from Alexander Kushnarov. - Patch #2: - s/coment/comment in the commit message. - Patch #4: - sch_ets: ets_class_is_strict(), ets_class_id(): Constify an argument - ets_class_find(): RXTify - Patch #3 (iproute2): - tc-ets.8: some spelling fixes - tc-ets.8: add another example - tc.8: add an ETS to "CLASSFUL QDISCS" section v1 (internal): - This addresses RFC reviews from Ido Schimmel and Roman Mashak, bugs found by Alexander Petrovskiy and myself, and other improvements. - Patch #2: - Expand the explanation with an explicit example. - Patch #4: - Kconfig: s/sch_drr/sch_ets/ - sch_ets: Reorder includes to be in alphabetical order - sch_ets: ets_quantum_parse(): Rename the return-pointer argument from pquantum to quantum, and use it directly, not going through a local temporary. - sch_ets: ets_qdisc_quanta_parse(): Convert syntax of function argument "quanta" from an array to a pointer. - sch_ets: ets_qdisc_priomap_parse(): Likewise with "priomap". - sch_ets: ets_qdisc_quanta_parse(), ets_qdisc_priomap_parse(): Invoke __nla_validate_nested directly instead of nl80211_validate_nested(). - sch_ets: ets_qdisc_quanta_parse(): WARN_ON_ONCE on invalid attribute instead of returning an extack. - sch_ets: ets_qdisc_change(): Make the last band the default one for unmentioned priomap priorities. - sch_ets: Fix a panic when an offloaded child in a bandwidth-sharing band notified its ETS parent. - sch_ets: When ungrafting, add the newly-created invisible FIFO to the Qdisc hash - Patch #5: - pkt_cls.h: Note that quantum=0 signifies a strict band. - Fix error path handling when ets_offload_dump() fails. - Patch #6: - __mlxsw_sp_qdisc_ets_replace(): Convert syntax of function arguments "quanta" and "priomap" from arrays to pointers. - Patch #7: - __mlxsw_sp_qdisc_ets_replace(): Convert syntax of function argument "weights" from an array to a pointer. - Patch #9: - mlxsw/sch_ets.sh: Add a comment explaining packet prioritization. - Adjust the whole suite to allow testing of traffic classifiers in addition to testing priomap. - Patch #10: - Add a number of new tests to test default priomap band, overlarge number of bands, zeroes in quanta, and altogether missing quanta. - Patch #1 (iproute2): - State motivation for inclusion of this patch in the patcheset in the commit message. - Patch #3 (iproute2): - tc-ets.8: it is now December - tc-ets.8: explain inactivity WRT using non-WC Qdiscs under ETS band - tc-ets.8: s/flow/band in explanation of quantum - tc-ets.8: explain what happens with priorities not covered by priomap - tc-ets.8: default priomap band is now the last one - q_ets.c: ets_parse_opt(): Remove unnecessary initialization of priomap and quanta. ==================== Signed-off-by: David S. Miller commit 82c664b69c8b3729dfcf33e9abfd952dad35fcca Author: Petr Machata Date: Wed Dec 18 14:55:24 2019 +0000 selftests: qdiscs: Add test coverage for ETS Qdisc Add TDC coverage for the new ETS Qdisc. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit ddd3fd750ffee2c562fa88ea6ed1f90a02818303 Author: Petr Machata Date: Wed Dec 18 14:55:22 2019 +0000 selftests: forwarding: sch_ets: Add test coverage for ETS Qdisc This tests the newly-added ETS Qdisc. It runs two to three streams of traffic, each with a different priority. ETS Qdisc is supposed to allocate bandwidth according to the DRR algorithm and given weights. After running the traffic for a while, counters are compared for each stream to check that the expected ratio is in fact observed. In order for the DRR process to kick in, a traffic bottleneck must exist in the first place. In slow path, such bottleneck can be implemented by wrapping the ETS Qdisc inside a TBF or other shaper. This might however make the configuration unoffloadable. Instead, on HW datapath, the bottleneck would be set up by lowering port speed and configuring shared buffer suitably. Therefore the test is structured as a core component that implements the testing, with two wrapper scripts that implement the details of slow path resp. fast path configuration. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 4cf9b8f9929285b91f5f22652ad5175a2206303b Author: Petr Machata Date: Wed Dec 18 14:55:21 2019 +0000 selftests: forwarding: Move start_/stop_traffic from mlxsw to lib.sh These two functions are used for starting several streams of traffic, and then stopping them later. They will be handy for the test coverage of ETS Qdisc. Move them from mlxsw-specific qos_lib.sh to the generic lib.sh. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 19f405b988e7bdee75e4936d27d2909c11574a7c Author: Petr Machata Date: Wed Dec 18 14:55:19 2019 +0000 mlxsw: spectrum_qdisc: Support offloading of ETS Qdisc Handle TC_SETUP_QDISC_ETS, add a new ops structure for the ETS Qdisc. Invoke the extended prio handlers implemented in the previous patch. For stats ops, invoke directly the prio callbacks, which are not sensitive to differences between PRIO and ETS. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 7917f52ae188b87de627a892b57646abfe5a82bc Author: Petr Machata Date: Wed Dec 18 14:55:17 2019 +0000 mlxsw: spectrum_qdisc: Generalize PRIO offload to support ETS Thanks to the similarity between PRIO and ETS it is possible to simply reuse most of the code for offloading PRIO Qdisc. Extract the common functionality into separate functions, making the current PRIO handlers thin API adapters. Extend the new functions to pass quanta for individual bands, which allows configuring a subset of bands as WRR. Invoke mlxsw_sp_port_ets_set() as appropriate to de/configure WRR-ness and weight of individual bands. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit d35eb52bd2ac7557b62bda52668f2e64dde2cf90 Author: Petr Machata Date: Wed Dec 18 14:55:15 2019 +0000 net: sch_ets: Make the ETS qdisc offloadable Add hooks at appropriate points to make it possible to offload the ETS Qdisc. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit dcc68b4d8084e1ac9af0d4022d6b1aff6a139a33 Author: Petr Machata Date: Wed Dec 18 14:55:13 2019 +0000 net: sch_ets: Add a new Qdisc Introduces a new Qdisc, which is based on 802.1Q-2014 wording. It is PRIO-like in how it is configured, meaning one needs to specify how many bands there are, how many are strict and how many are dwrr, quanta for the latter, and priomap. The new Qdisc operates like the PRIO / DRR combo would when configured as per the standard. The strict classes, if any, are tried for traffic first. When there's no traffic in any of the strict queues, the ETS ones (if any) are treated in the same way as in DRR. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 9cf9b925d5387b501732dcbc8fe3c77104d423f8 Author: Petr Machata Date: Wed Dec 18 14:55:11 2019 +0000 mlxsw: spectrum: Rename MLXSW_REG_QEEC_HIERARCY_* enumerators These enums want to be named MLXSW_REG_QEEC_HIERARCHY_, but due to a typo lack the second H. That is confusing and complicates searching. But actually the enumerators should be named _HR_, because that is how their enum type is called. So rename them as appropriate. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 5bc146c90e9eed409210809fae3c0efebef68ae1 Author: Petr Machata Date: Wed Dec 18 14:55:10 2019 +0000 mlxsw: spectrum_qdisc: Clarify a comment Expand the comment at mlxsw_sp_qdisc_prio_graft() to make the problem that this function is trying to handle clearer. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 9586a992fb752b14ac18fc86fe086b0e3372fff4 Author: Petr Machata Date: Wed Dec 18 14:55:08 2019 +0000 net: pkt_cls: Clarify a comment The bit about negating HW backlog left me scratching my head. Clarify the comment. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit cbd22f172df782d6b2150044d0ff2051bad2a00f Author: Kevin 'ldir' Darbyshire-Bryant Date: Wed Dec 18 14:05:13 2019 +0000 sch_cake: drop unused variable tin_quantum_prio Turns out tin_quantum_prio isn't used anymore and is a leftover from a previous implementation of diffserv tins. Since the variable isn't used in any calculations it can be eliminated. Drop variable and places where it was set. Rename remaining variable and consolidate naming of intermediate variables that set it. Signed-off-by: Kevin Darbyshire-Bryant Acked-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit e3250f2d5bbbe36ad2d4e87403408ed24ab21304 Author: Alex Deucher Date: Tue Dec 17 15:39:04 2019 -0500 drm/amdgpu/display: include delay.h For udelay. This is needed for some platforms. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 0371e2fba42158cb55f6d2c8cf4c9c0821677c0c Author: Alex Deucher Date: Tue Dec 17 09:51:40 2019 -0500 drm/amdgpu/smu: add metrics table lock for vega20 (v2) To protect access to the metrics table. v2: unlock on error Bug: https://gitlab.freedesktop.org/drm/amd/issues/900 Reviewed-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit ed09a629bbb4791e9e5a499700e07879bd34170a Author: Alex Deucher Date: Tue Dec 17 09:51:13 2019 -0500 drm/amdgpu/smu: add metrics table lock for renoir (v2) To protect access to the metrics table. v2: unlock on error Bug: https://gitlab.freedesktop.org/drm/amd/issues/900 Reviewed-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 885d386540129e5bf5eec0c10dde3dd1380ef1f8 Author: Alex Deucher Date: Tue Dec 17 09:50:42 2019 -0500 drm/amdgpu/smu: add metrics table lock for navi (v2) To protect access to the metrics table. v2: unlock on error Bug: https://gitlab.freedesktop.org/drm/amd/issues/900 Reviewed-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 59847dc82cf2b490af82bf37f35c97f8dedb49b8 Author: Alex Deucher Date: Tue Dec 17 09:49:52 2019 -0500 drm/amdgpu/smu: add metrics table lock for arcturus (v2) To protect access to the metrics table. v2: unlock on error Bug: https://gitlab.freedesktop.org/drm/amd/issues/900 Reviewed-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit fa7df7516e32807cfc5360f41de8c2cc34e00046 Author: Alex Deucher Date: Tue Dec 17 09:35:01 2019 -0500 drm/amdgpu/smu: add metrics table lock This table is used for lots of things, add it's own lock. Bug: https://gitlab.freedesktop.org/drm/amd/issues/900 Reviewed-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit d012ea925d6110f2bd4a9b398f87ef1a76c649c5 Author: Pan Zhang Date: Wed Dec 18 11:50:08 2019 +0800 gpu: drm: dead code elimination this set adds support for removal of gpu drm dead code. patch3 is similar with patch 1: `num` is a data of u8 type and ATOM_MAX_HW_I2C_READ == 255, so there is a impossible condition '(num > 255) => (0-255 > 255)'. Signed-off-by: Pan Zhang Signed-off-by: Alex Deucher commit 719423f670796bb5d2e2894176033a493f684d8b Author: Alex Deucher Date: Tue Dec 10 16:21:44 2019 -0500 drm/amdgpu: wait for all rings to drain before runtime suspending Add a safety check to runtime suspend to make sure all outstanding fences have signaled before we suspend. Doesn't fix any known issue. We already do this via the fence driver suspend function, but we just force completion rather than bailing. This bails on runtime suspend so we can try again later once the fences are signaled to avoid missing any outstanding work. Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 19796597d10405210e3364d145ff460390bf0930 Author: Alex Deucher Date: Mon Dec 16 15:05:22 2019 -0500 drm/amdgpu/smu: fix spelling s/dispaly/display/g Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit c96cf2823dfdc51d3a41addff671576c5a2f0862 Author: Andrey Grodzovsky Date: Wed Dec 11 14:25:36 2019 -0500 drm/amdgpu: Switch from system_highpri_wq to system_unbound_wq This is to avoid queueing jobs to same CPU during XGMI hive reset because there is a strict timeline for when the reset commands must reach all the GPUs in the hive. Signed-off-by: Andrey Grodzovsky Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit c6a6e2db994528a3eaf1ed938a0b7a35b87b7fa4 Author: Andrey Grodzovsky Date: Wed Dec 11 14:18:31 2019 -0500 drm/amdgpu: Redo XGMI reset synchronization. Use task barrier in XGMI hive to synchronize ASIC resets across devices in XGMI hive. v2: Return right away with a warning if no xgmi hive, update doc. Signed-off-by: Andrey Grodzovsky Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit f33a8770cdda79031a22241eaaac4eaf66e304fb Author: Andrey Grodzovsky Date: Fri Dec 6 12:43:30 2019 -0500 drm/amdgpu: Add task barrier to XGMI hive. Signed-off-by: Andrey Grodzovsky Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 368fd0aad1bec2bb30a3e5e905b2aedd8d15feb7 Author: Andrey Grodzovsky Date: Fri Dec 6 12:26:33 2019 -0500 drm: Add Reusable task barrier. It is used to synchronize N threads at a rendevouz point before execution of critical code that has to be started by all the threads at approximatly the same time. v2: Remove mention of reset use case, improve doc. Signed-off-by: Andrey Grodzovsky Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 041a62bc0603544c97ac407df67bd60398ce0668 Author: Andrey Grodzovsky Date: Fri Dec 6 13:19:15 2019 -0500 drm/amdgpu: reverts commit ce316fa55ef0f1751276b846a54fb3b835bd5e64. In preparation for doing XGMI reset synchronization using task barrier. Signed-off-by: Andrey Grodzovsky Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit f06a58db9213a08e902e5e5b2c22b75f7bb3a810 Author: Leo Liu Date: Mon Dec 16 11:01:51 2019 -0500 drm/amdgpu/vcn: remove unnecessary included headers Esp. VCN1.0 headers should not be here v2: add back the to keep consistent. Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5a7489a7e189ee2be889485f90c8cf24ea4b9a40 Author: Monk Liu Date: Tue Dec 17 18:16:44 2019 +0800 drm/amdgpu: fix KIQ ring test fail in TDR of SRIOV issues: MEC is ruined by the amdkfd_pre_reset after VF FLR done fix: amdkfd_pre_reset() would ruin MEC after hypervisor finished the VF FLR, the correct sequence is do amdkfd_pre_reset before VF FLR but there is a limitation to block this sequence: if we do pre_reset() before VF FLR, it would go KIQ way to do register access and stuck there, because KIQ probably won't work by that time (e.g. you already made GFX hang) so the best way right now is to simply remove it. Signed-off-by: Monk Liu Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit 1512d064f55bace6a8e32d65009c7ea112e76a31 Author: Monk Liu Date: Tue Dec 17 18:18:31 2019 +0800 drm/amdgpu: fix double gpu_recovery for NV of SRIOV issues: gpu_recover() is re-entered by the mailbox interrupt handler mxgpu_nv.c fix: we need to bypass the gpu_recover() invoke in mailbox interrupt as long as the timeout is not infinite (thus the TDR will be triggered automatically after time out, no need to invoke gpu_recover() through mailbox interrupt. Signed-off-by: Monk Liu Reviewed-by: Emily Deng Signed-off-by: Alex Deucher commit 198e36bacb6eefbfb81d41e5a594d86658b46af7 Author: Yintian Tao Date: Tue Dec 17 11:43:40 2019 +0800 drm/amd/powerplay: skip soc clk setting under pp one vf Under sriov pp one vf mode, there is no need to set soc clk under pp one vf because smu firmware will depend on the mclk to set the appropriate soc clk for it. Signed-off-by: Yintian Tao Reviewed-by : Monk Liu Signed-off-by: Alex Deucher commit 8c23056bdc7ae024f059460f5750536a91922b7a Author: Nirmoy Das Date: Mon Dec 9 22:52:25 2019 +0100 drm/scheduler: do not keep a copy of sched list entity should not keep copy and maintain sched list for itself. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit f880799d7fcf0a63ca2295d950cd12f5520251d9 Author: Nirmoy Das Date: Mon Dec 16 14:43:34 2019 +0100 amd/amdgpu: add sched array to IPs with multiple run-queues This sched array can be passed on to entity creation routine instead of manually creating such sched array on every context creation. v2: squash in missing break fix Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 0c88b43032131ff458818addc9b65b8bd915837d Author: Nirmoy Das Date: Fri Dec 6 16:55:49 2019 +0100 drm/amdgpu: replace vm_pte's run-queue list with drm gpu scheds list drm_sched_entity_init() takes drm gpu scheduler list instead of drm_sched_rq list. This makes conversion of drm_sched_rq list to drm gpu scheduler list unnecessary Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit b3ac17667f115e64c67ea6101fc814f47134b530 Author: Nirmoy Das Date: Thu Dec 5 11:38:00 2019 +0100 drm/scheduler: rework entity creation Entity currently keeps a copy of run_queue list and modify it in drm_sched_entity_set_priority(). Entities shouldn't modify run_queue list. Use drm_gpu_scheduler list instead of drm_sched_rq list in drm_sched_entity struct. In this way we can select a runqueue based on entity/ctx's priority for a drm scheduler. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 45a80abebce46fa4812eff16e5e7c405099d56ed Author: Alex Deucher Date: Thu Dec 12 17:43:36 2019 -0500 drm/amdgpu/pm_runtime: update usage count in fence handling Increment the usage count in emit fence, and decrement in process fence to make sure the GPU is always considered in use while there are fences outstanding. We always wait for the engines to drain in runtime suspend, but in practice that only covers short lived jobs for gfx. This should cover us for longer lived fences. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit f1e1483b279cd048ff9b06f3597c5e2b774b2136 Author: Zhan Liu Date: Mon Dec 16 14:56:50 2019 -0500 drm/amd/powerplay: Add SMU WMTABLE Validity Check for Renoir [Why] SMU watermark table (WMTABLE) validity check is missing on Renoir. This validity check is very useful for checking whether WMTABLE is updated successfully. [How] Add SMU watermark validity check. Signed-off-by: Zhan Liu Reviewed-by: Hersen Wu Signed-off-by: Alex Deucher commit 374bf7bd6ae43ea7f78b6ce254114adb9463526f Author: zhengbin Date: Sat Dec 14 17:02:24 2019 +0800 drm/amdgpu: Remove unneeded semicolon in amdgpu_ras.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:318:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 640f07932541d8ecbd744d1b04d8816206223922 Author: zhengbin Date: Sat Dec 14 17:02:23 2019 +0800 drm/amdgpu: Remove unneeded semicolon in gfx_v10_0.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:1967:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 2111a5f7153d9594327be4b3abe2dc0be7d810ab Author: zhengbin Date: Sat Dec 14 17:02:22 2019 +0800 drm/amdgpu: Remove unneeded semicolon in amdgpu_pmu.c Fixes coccicheck warning: drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:110:3-4: Unneeded semicolon drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:133:2-3: Unneeded semicolon drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:163:2-3: Unneeded semicolon drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:191:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit b918ecb061672f25c128485f3e1b958829850112 Author: zhengbin Date: Sat Dec 14 17:12:33 2019 +0800 drm/amd/display: Remove unneeded semicolon Fixes coccicheck warning: drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c:412:90-91: Unneeded semicolon Reviewed-by: Harry Wentland Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 42a9938e1e4921000fad29ea60953b41641f5fb7 Author: Alex Deucher Date: Fri Dec 13 13:25:39 2019 -0500 drm/amdgpu/sdma5: make ring tests less chatty We already did this for older generations. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit e47c9bce46a8ee38486ec85c04458b9ea7a26290 Author: Alex Deucher Date: Fri Dec 13 13:23:46 2019 -0500 drm/amdgpu/gfx10: make ring tests less chatty We already did this for older generations. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 2af0f378c4808ee565bd6be10e1e5abf890c1f3a Author: Nikola Cornij Date: Tue Dec 3 17:01:12 2019 -0500 drm/amd/display: Add debug option to override DSC target bpp increment [why] It's required for debug purposes. [how] Add a dsc_bpp_increment_div debug option that overrides DPCD BITS_PER_PIXEL_INCREMENT value. The value dsc_bpp_increment_div should be set to is the one after parsing, i.e. it could be 1, 2, 4, 8 or 16 (meaning 1pix, 1/2pix, ..., 1/16pix). Signed-off-by: Nikola Cornij Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit e97ed49690ea13f73437bc06905215159de6fab6 Author: Anthony Koo Date: Thu Dec 5 14:55:24 2019 -0500 drm/amd/display: Do not handle linkloss for eDP [Why] eDP is internal link and link loss is unexpected. It is typically going to be PSR related errors, which is handled separately. [How] Check for eDP and skip check for link loss Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 64267454273ac8203aa3f4c0a9ca71193884e862 Author: Samson Tam Date: Wed Dec 4 18:35:15 2019 -0500 drm/amd/display: fix missing cursor on some rotated SLS displays [Why] Cursor disappears for some SLS displays that are rotated 180 and 270 degrees. This occurs when there is no pipe split being done ( ex. 3 or more displays ). The cursor calculations assume pipe splitting is done so when it calculates the new cursor position in hwss.set_cursor_position(), it is out-of-bounds so it disables the cursor in hubp.set_cursor_position(). [How] In non pipe split cases, calculate cursor using viewport size ( width or height ) instead of viewport size * 2 ( the two because pipe splitting divides the rectangle into two ). Signed-off-by: Samson Tam Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 760ef473f2fccdf8ca9bc0773960e16d4ce6f3d2 Author: Sung Lee Date: Thu Dec 5 11:58:20 2019 -0500 drm/amd/display: Formula refactor for calculating DPP CLK DTO [Why] Previous formula for calculating DPP CLK DTO was hard to understand. [How] Replace with easier to understand formula that produces same results. Signed-off-by: Sung Lee Reviewed-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5479034576ec8b7166a66efe5de1d911feb43d4a Author: Sung Lee Date: Wed Dec 4 18:36:07 2019 -0500 drm/amd/display: Lower DPP DTO only when safe [Why] A corner case currently exists where DPP DTO is lowered before pipes are updated to a higher viewport. This causes underflow as the DPPCLK is too low for the current viewport. [How] Only lower DPP DTO when it is safe to lower, or if the newer clocks are higher than the current ones. Signed-off-by: Sung Lee Reviewed-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 68c0fca5e45a1fd1262e70d89857e2ede1995f6b Author: Jun Lei Date: Mon Nov 25 10:58:44 2019 -0500 drm/amd/display: support virtual DCN [why] DAL3 should support SRIOV [how] Add support for the virtual dal flag. This flag should skip most/all of DC construction since the HW isn't accessible, but still construct WindowsDM (almost) normally but with only SW display targets Signed-off-by: Jun Lei Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 830806c5654bc8ef0c5b98ce0ac381e3629a894d Author: Aric Cyr Date: Wed Dec 4 17:59:14 2019 -0500 drm/amd/display: Fix manual trigger source for DCN2 Fix manual trigger source correctly be TRIGA for DCN2 rather than MANUAL_FLOW. Signed-off-by: Aric Cyr Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ca4f844e98f75b194c5dd981232e37dadcb544f6 Author: abdoulaye berthe Date: Tue Dec 3 14:04:06 2019 -0500 drm/amd/display: Update extended timeout support for DCN20 and DCN21 [Why] DCN21 and DCN2 extended timeout support cap is not set correctly. [How] Set extended timeout support for ASIC families to their right values. Signed-off-by: abdoulaye berthe Reviewed-by: Martin Leung Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 615b9b585eb57c1d49382d16a62de768f2c6a340 Author: Sung Lee Date: Mon Dec 2 16:45:16 2019 -0500 drm/amd/display: Fix update_bw_bounding_box Calcs [Why] Previously update_bw_bounding_box for RN was commented out due to incorrect values causing BSOD on Hybrid Graphics. However, commenting out this function also may cause issues such as underflow in certain cases such as 2x4K displays. [How] Fix dram_speed_mts calculations. Update from proper index of clock_limits[] Signed-off-by: Sung Lee Reviewed-by: Yongqiang Sun Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 302f598804dc768cd2aa7ed7d6b7bfd326131819 Author: Dale Zhao Date: Mon Dec 2 10:31:55 2019 +0800 drm/amd/display: Use absolute time stamp to follow the eDP T7 spec requirement [Why]: According to eDP spec, max T7 delay should be 50 ms. Current code uses 300 retry counters may not be accurate enough for different panels. [How]: Use absolute time stamp to achive accurate delay. Signed-off-by: Dale Zhao Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit a70445918b84e6a783375cc537fc95b0dbe05fcb Author: Aric Cyr Date: Mon Dec 2 03:42:28 2019 -0500 drm/amd/display: 3.2.64 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 89d07b662f5e2d74c439f9a7cbefa41b3e76d745 Author: Samson Tam Date: Thu Nov 28 15:55:01 2019 -0500 drm/amd/display: fix 270 degree rotation for mixed-SLS mode [Why] When we rotate 270 in mixed SLS mode, the recouts occupy the right side of the display. So all the recout_skip_v values are relative to the left side of the display. This causes adjust_vp_and_init_for_seamless_clip() to incorrectly increase the data->viewport.height for that recout. The rotation looks like the bottom half is duplicated twice. [How] recout.x values are being adjusted based on stream->timing.h_border_left. Instead of using h_border_left, use dst.x to represent the border. Shift dst.x by the amount of stream->timing.h_border_left and set stream->timing.h_border_left to 0. Do all the calculations and then revert stream->timing.h_border_left and stream->dst.x back to their original values. When calculating pipe_ctx->plane_res.scl_data.h_active, make sure to use the original stream->timing.h_border_left value. Signed-off-by: Samson Tam Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 1f0674fd5c536be4462cad2bfdfc8f1648039ab5 Author: Nicholas Kazlauskas Date: Thu Nov 28 15:21:26 2019 -0500 drm/amd/display: Get cache window sizes from DMCUB firmware [Why] Firmware state and tracebuffer shouldn't be considered stable API between firmware versions. Driver shouldn't be querying anything from firmware state or tracebuffer outside of debugging. Commands are the stable API for this once we have the outbox. [How] Add metadata struct to the end of the data firmware that describes fw_state_size and some reserved area for future use. Drop the tracebuffer and firmware state headers since they can differ per version. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 1380c1bf5b9c31baf820ab545bbabf6b39bfdc0d Author: Noah Abradjian Date: Fri Nov 29 13:48:36 2019 -0500 drm/amd/display: Remove reliance on pipe indexing [Why] In certain instances, there was a reliance on pipe indexing being accurate. However, this assumption fails with harvesting of pipes 1 or 2, which can occur in production B6 parts. HW hang would occur as a result. [How] Use hubp index for mpcc, and do mpc_init for all theoretical pipes (including disabled ones). Signed-off-by: Noah Abradjian Reviewed-by: Yongqiang Sun Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 32ff3217d60d4bc2a2db7c3b83e7b004300db57a Author: Derek Lai Date: Wed Nov 27 18:04:37 2019 +0800 drm/amd/display: Specified VR patch skip to reset segment to 0 [Why] After read the 3rd Edid blocks, we will reset segment to 0, which causes this VR fail to read Edid successfully. [How] Skip to reset segment to 0 for this VR device. Signed-off-by: Derek Lai Reviewed-by: Aric Cyr Acked-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit efca090560815fdda03f5403e3f9cae2c8eca301 Author: Paul Hsieh Date: Thu Nov 28 10:44:39 2019 +0800 drm/amd/display: check link status before disable stream [Why] 1. Set second screen only then unplug external monitor 2. Enter to S4 then plug in external monitor 3. Resume from S4, eDP will not turn off when OS set second screen only Sometimes OS will not set eDP power up cause eDP dpms_off keep true then driver skipp disable stream [How] When drvier try to disable stream, add link status condition Signed-off-by: Paul Hsieh Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit db83e7ed15956423e2d256f3048ea1cfaf68ee11 Author: Hugo Hu Date: Wed Nov 27 13:52:44 2019 +0800 drm/amd/display: disable lttpr for Navi Signed-off-by: Hugo Hu Reviewed-by: Abdoulaye Berthe Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8c7aea404d55dabc71df792c850aed5536ece2fd Author: Nicholas Kazlauskas Date: Mon Nov 25 09:49:27 2019 -0500 drm/amd/display: Perform DMUB hw_init on resume [Why] The DMUB is put into reset on suspend and is not running on resume, disabling PSR/ABM features. [How] Move the allocation of the framebuffer to sw_init. Do DMUB hardware init and framebuffer filling only from hw_init. On resume the contents of the framebuffer will be invalid so those should be cleared. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Roman Li Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ec5b356c58941bb8930858155d9ce14ceb3d30a0 Author: Nikola Cornij Date: Tue Nov 26 15:18:31 2019 -0500 drm/amd/display: Map ODM memory correctly when doing ODM combine [why] Up to 4 ODM memory pieces are required per ODM combine and cannot overlap, i.e. each ODM "session" has to use its own memory pieces. The ODM-memory mapping is currently broken for generic case. The maximum number of memory pieces is ASIC-dependent, but it's always big enough to satisfy maximum number of ODM combines. Memory pieces are mapped as a bit-map, i.e. one memory piece corresponds to one bit. The OPTC doing ODM needs to select memory pieces by setting the corresponding bits, making sure there's no overlap with other OPTC instances that might be doing ODM. The current mapping works only for OPTC instance indexes smaller than 3. For instance indexes 3 and up it practically maps no ODM memory, causing black, gray or white screen in display configs that include ODM on OPTC instance 3 or up. [how] Statically map two unique ODM memory pieces for each OPTC instance and piece them together when programming ODM combine mode. Signed-off-by: Nikola Cornij Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 6a652f6d127dac1c67c413c3309258c874535dd1 Author: Charlene Liu Date: Wed Nov 20 21:23:47 2019 -0500 drm/amd/display: Add warmup escape call support Add warmup escape support, for diags, in a way that is possible to choose a new or an existing sequence. For achieving this goal, this commit adds separated MCIF buffer as VCN request. Signed-off-by: Charlene Liu Reviewed-by: Chris Park Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit d87dedb1eca506adbb2647e96615676c2915952b Author: Josip Pavic Date: Tue Nov 26 12:26:14 2019 -0500 drm/amd/display: fix regamma build optimization [Why] When the global variable pow_buffer_ptr is set to -1, by definition optimizations should not be used to build the regamma. Since translate_from_linear_space unconditionally increments this global, it inadvertently enables the optimization. [How] Increment pow_buffer_ptr only if it is not -1. Signed-off-by: Josip Pavic Reviewed-by: Krunoslav Kovac Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8d5bc3a5b8fec50ff175cf59a411723ae98b8317 Author: Aric Cyr Date: Sun Nov 24 19:11:15 2019 -0500 drm/amd/display: scaling changes should also be a full update Signed-off-by: Aric Cyr Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 1a8196b0b8e9ef6e59a9296c0fc51da094116b0c Author: Aric Cyr Date: Mon Nov 25 10:55:41 2019 -0500 drm/amd/display: 3.2.63 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 74cc5f02eb67c1a725f6a11407990836f6f5ddd2 Author: Aric Cyr Date: Sat Nov 23 17:15:51 2019 -0500 drm/amd/display: Remove integer scaling code from DC and fix cursor [Why] Scaling better handled by upper layers before pipe splitting. [How] Remove DC code for integer scaling and force cursor update if viewport or scaling changes occur to prevent underflow from invalid cursor position. Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ccce745c28d6cc7b42a50933fe4b751da0257598 Author: Martin Leung Date: Thu Nov 21 19:13:54 2019 -0500 drm/amd/display: Enable Seamless Boot Transition for Multiple Streams [why] dc previously had bugs that interfered with the ability to inherit a timing from a device with multiple streams (without flash/blanking). After this fix there is still a dependency on UEFI support. [how] fixed 3 bugs: loaded MPC state, changed bw_optimize flag to a counter instead of a boolean, and reading dpp/disp clk from HW to ensure we don't raise the clock's when we're not supposed to. Signed-off-by: Martin Leung Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4a8ca46bae8affba063aabac85a0b1401ba810a3 Author: Roman Li Date: Fri Nov 22 10:58:10 2019 -0500 drm/amd/display: Default max bpc to 16 for eDP [Why] Some 10bit eDP panels don't lightup after we cap bpc to 8. [How] Set default max_bpc to 16 for edp connector type. Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit b9f1246df179522bc28fda50b720553c845863db Author: Noah Abradjian Date: Fri Nov 22 16:07:24 2019 -0500 drm/amd/display: Collapse resource arrays when pipe is disabled [Why] Currently, pipe resources are assigned to an index that matches the pipe position. However, if pipe 1 or 2 is disabled, there will be a gap in the arrays which causes a crash when iterating based on pipe_count. [How] Fix resource construct to assign resources to minimum available array index. Signed-off-by: Noah Abradjian Reviewed-by: Yongqiang Sun Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit cf27a6d15d950ed1beb3926469c9eaa6907bbf88 Author: Eric Yang Date: Mon Nov 18 15:41:19 2019 -0500 drm/amd/display: update chroma viewport wa [Why] Need previously implemented chroma vp wa to work for rotation cases. [How] Implement rotation specific wa. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 0120e8b8451c6a0fdc564ba9b30d75fd6995bbc4 Author: Noah Abradjian Date: Fri Nov 22 11:47:52 2019 -0500 drm/amd/display: Use pipe_count for num of opps [Why] There is one opp per pipe. For certain RN parts, the fourth pipe is disabled, so there is no opp for it. res_cap->num_opp is hardcoded to 4, so if we use that to iterate over opps we will crash. [How] Use the pipe_count value instead, which is not hardcoded and so will have the correct number. Signed-off-by: Noah Abradjian Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ded6119e825aaf0bfc7f2a578b549d610da852a7 Author: Amanda Liu Date: Thu Nov 21 16:06:57 2019 -0500 drm/amd/display: Reinstate LFC optimization [why] We want to streamline the calculations made when entering LFC. Previously, the optimizations led to screen tearing and were backed out to unblock development. [how] Integrate other calculations parameters, as well as screen tearing, fixes with the original LFC calculation optimizations. Signed-off-by: Amanda Liu Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 993dca3e53c30ed1c1c4b2c135904d1402fe034f Author: Qingqing Zhuo Date: Thu Nov 21 14:06:32 2019 -0500 drm/amd/display: AVI info package change due to spec update YQ should be limited range for all cases. Signed-off-by: Qingqing Zhuo Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit a9ec3fe455f0a95f8993ccaa63d1da5c34f68ba8 Author: Camille Cho Date: Fri Nov 15 17:28:48 2019 +0800 drm/amd/display: Add definition for number of backlight data points [Why] A hardcoded number is used today [How] Add definition for number of BL data points Signed-off-by: Camille Cho Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 6026be696193db16006058d8d67fedb7c7e6832d Author: Joshua Aberback Date: Tue Nov 19 18:46:26 2019 -0500 drm/amd/display: Add interface to adjust DSC max target bpp limit [Why] For some use cases we need to be able to adjust the maximum target bpp allowed by DSC policy. [How] New interface dc_dsc_policy_set_max_target_bpp_limit Signed-off-by: Joshua Aberback Reviewed-by: Nikola Cornij Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 663bfef0da610da5920df3b030d2aae8e4513baa Author: Aidan Yang Date: Wed Nov 20 11:05:36 2019 -0500 drm/amd/display: Disable integerscaling for downscale and MPO [Why] Integer scaling is applied to MPO planes when downscaling, MPO planes use variable taps and integer scaling sets taps=1 [How] Disable integer scaling on MPO planes, Disable integer scaling for downscaling planes Signed-off-by: Aidan Yang Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c09d1d3404e7cc79cc8a18ced6a2a244d28aac52 Author: Nicholas Kazlauskas Date: Wed Nov 20 10:37:19 2019 -0500 drm/amd/display: Use physical addressing for DMCUB on both dcn20/21 [Why] CW0 and CW1 need to use physical addressing mode for dcn20 and dcn21. The current code for dcn20 is using virtual. [How] We already program the DMCUB like this on dcn21 so we should just use the same sequence for both. Copy the dcn21 sequences into the dmjub_dcn20.c file and rename them. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 01c229d977e0063fc784ea302877a08b82e9e7ee Author: Nicholas Kazlauskas Date: Wed Nov 20 09:29:17 2019 -0500 drm/amd/display: Get DMUB registers from ASIC specific structs [Why] These values can differ per ASIC and should follow the full DC style register programming model. [How] Define a common list and fill in the common list separately for dcn20 and dcn21. Unlike DC we're not using designated initializers for better compiler compatibility since this resides in the DMUB service. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 6b5d7730d226bed8e87085d870e76fb9018ff0b1 Author: Noah Abradjian Date: Mon Nov 18 13:59:57 2019 -0500 drm/amd/display: Add wait for flip not pending on pipe unlock [Why] Lack of proper timing caused intermittent underflow on unplug external DP. A previous fix was invalid and caused S0i3 regression, so had to be reverted. [How] When unlocking pipe, wait for no pipes to have flip pending before unlocking. Signed-off-by: Noah Abradjian Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit a37149425a58d4aa9db01767f3f3b547f74e7f40 Author: abdoulaye berthe Date: Tue Nov 19 11:10:54 2019 -0500 drm/amd/display: disable lttpr for RN Signed-off-by: abdoulaye berthe Reviewed-by: George Shen Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 3ab4cc65b3e626c41edcbecce94d66f619cc200f Author: Charlene Liu Date: Fri Nov 8 21:52:27 2019 -0500 drm/amd/display: HDMI 2.x audio bandwidth check Add HDMI 2.x audio bandwidth check Signed-off-by: Charlene Liu Reviewed-by: Chris Park Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5e1e89eead242822e649a1e9cd72b65aa725174b Author: Leo Liu Date: Thu Dec 12 10:52:34 2019 -0500 drm/amdgpu/vcn: remove JPEG related code from idle handler and begin use For VCN2.0 and above, VCN has been separated from JPEG Signed-off-by: Leo Liu Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit d58ed70778dbae255bba1f050c842582ed99639d Author: Leo Liu Date: Thu Dec 12 10:28:02 2019 -0500 drm/amdgpu/vcn1.0: use its own idle handler and begin use funcs Because VCN1.0 power management and DPG mode are managed together with JPEG1.0 under both HW and FW, so separated them from general VCN code. Also the multiple instances case got removed, since VCN1.0 HW just have a single instance. v2: override work func with vcn1.0's own Signed-off-by: Leo Liu Reviewed-by: James Zhu Reviewed-by: Christian König Signed-off-by: Alex Deucher commit aaff8b448d2ab8c0ccc8591c997663c54b074293 Author: changzhu Date: Thu Dec 12 13:46:06 2019 +0800 drm/amdgpu: enable gfxoff for raven1 refresh When smu version is larger than 0x41e2b, it will load raven_kicker_rlc.bin.To enable gfxoff for raven_kicker_rlc.bin,it needs to avoid adev->pm.pp_feature &= ~PP_GFXOFF_MASK when it loads raven_kicker_rlc.bin. Signed-off-by: changzhu Reviewed-by: Huang Rui Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 8973d9ec8f0e5208909cae81bdeae87ba657359d Author: Emily Deng Date: Mon Dec 16 17:19:44 2019 +0800 drm/amdgpu/sriov: Tonga sriov also need load firmware with smu Fix Tonga sriov load driver fail issue. Signed-off-by: Emily Deng Reviewd-by Yintian Tao Signed-off-by: Alex Deucher commit 619346240932ac86a0f0c42f887827ae759eda47 Author: Guchun Chen Date: Fri Dec 13 16:46:05 2019 +0800 drm/amdgpu: drop useless BACO arg in amdgpu_ras_reset_gpu BACO reset mode strategy is determined by latter func when calling amdgpu_ras_reset_gpu. So not to confuse audience, drop it. Signed-off-by: Guchun Chen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a771ded8b7ea31f01e239d582c96c9a60bbcaa56 Author: Roman Li Date: Wed Nov 27 14:47:32 2019 -0500 drm/amd/display: add missing dcn link encoder regs [Why] The earlier change: "check phy dpalt lane count config" uses link encoder registers not defined properly. That caused regression with mst-enabled display not lighting up. [How] Add missing reg definitions. Signed-off-by: Roman Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit d3c431ee0f7726f7053367b345341f5d709e8fb0 Author: Roman Li Date: Mon Dec 2 16:26:42 2019 -0500 drm/amdgpu: add dpcs20 registers add reg headers to dpcs includes Signed-off-by: Roman Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 6fdcba32711044c35c0e1b094cbd8f3f0b4472c9 Author: Roman Li Date: Mon Dec 2 10:01:38 2019 -0500 drm/amdgpu: move dpcs headers to dpcs includes - create dpcs directory for dpcs asic_reg headers - move dpcs21 reg headers from dcn to dpcs directory Signed-off-by: Roman Li Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit d7f72fe482bfb7f28c00d99be6d96c5ebad6eacf Author: Yong Zhao Date: Wed Dec 11 18:04:05 2019 -0500 drm/amdgpu: Add CU info print log The log will be useful for easily getting the CU info on various emulation models or ASICs. Signed-off-by: Yong Zhao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ad5901df889446dd99ddbb01bb39282a7dbcf581 Author: Yong Zhao Date: Mon Dec 2 23:23:41 2019 -0500 drm/amdkfd: Use Arcturus specific set_vm_context_page_table_base() Since Arcturus has it own function pointer, we can move Arcturus specific logic to there rather than leaving it entangled with other GFX9 chips. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 63408972e4715ee03e470d9616e2b6aebd6f2595 Author: Colin Ian King Date: Thu Dec 12 18:16:57 2019 +0000 drm/amd/powerplay: fix various dereferences of a pointer before it is null checked There are several occurrances of the pointer hwmgr being dereferenced before it is null checked. Fix these by performing the dereference of hwmgr after it has been null checked. Addresses-Coverity: ("Dereference before null check") Fixes: c9ffa427db34e6 ("drm/amd/powerplay: enable pp one vf mode for vega10") Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher Signed-off-by: Alex Deucher commit b3eca59d998587b1930cb846910ec9824b9c2122 Author: Philip Yang Date: Wed Jan 30 15:29:34 2019 -0500 drm/amdkfd: queue kfd interrupt work to different CPU Because queue_work schedule the work on the same CPU the interrupt handler is running, if there are many interrupts pending, it takes longer time for work queue to start, or even worse system will hang. v2: queue work to same NUMA node for better cache locality v3: handle cpumask_next wraparound case Signed-off-by: Philip Yang Reviewed-by: Eric Huang Signed-off-by: Alex Deucher commit 7a8a3430be15e4e6b3455f71853e7db765323889 Author: Timothy Pearson Date: Sat Dec 7 16:48:09 2019 -0600 amdgpu: Wrap FPU dependent functions in dc20 dc20 containes several FPU-dependent functions without proper FPU kernel mode enable/disable wrappers. Add the required wrappers for both x86 and POWER. This enables Navi DC20 support for POWER systems. v2: fix compilation Signed-off-by: Timothy Pearson Signed-off-by: Alex Deucher commit 16a9dea110a67d62401ffeac4828cabdedec7548 Author: Timothy Pearson Date: Sat Dec 7 16:47:46 2019 -0600 amdgpu: Enable initial DCN support on POWER DCN requires floating point support to operate. Add the appropriate x86/ppc64 guards and FPU / AltiVec / VSX context switches to DCN. Note that the current DC20 code doesn't contain all required FPU wrappers on x86 or POWER, so this patch is insufficient to fully enable DC20 on POWER. v2: s/X86_64/X86/g to retain previous behavior. Signed-off-by: Timothy Pearson Signed-off-by: Alex Deucher commit 6ca3928da66ea08f87ad200c6e521e421ab5d59b Author: Timothy Pearson Date: Sat Dec 7 16:47:13 2019 -0600 amdgpu: Prepare DCN floating point macros for generic arch support Introduce DC_FP_START()/DC_FP_END() macros to help enable floating point kernel mode support across various architectures. v2: move copyright update to commit which adds the changes Signed-off-by: Timothy Pearson Signed-off-by: Alex Deucher commit dcbe4e95751ad4eae9935f68e639b5789a74d70e Merge: 3a74a62d3ce7 334b49de120d Author: David S. Miller Date: Wed Dec 18 12:34:57 2019 -0800 Merge branch 's390-next' Julian Wiedmann says: ==================== s390/qeth: features 2019-12-18 please apply the following patch series to your net-next tree. Nothing major, just the usual mix of small improvements and cleanups. ==================== Signed-off-by: David S. Miller commit 334b49de120dd6deb28c31eedb7ca81351f7464e Author: Julian Wiedmann Date: Wed Dec 18 17:34:50 2019 +0100 s390/qeth: make use of napi_schedule_irqoff() qeth_qdio_start_poll() is called from the qdio layer's IRQ handler, while IRQs are masked. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 52f82bf16b6e754c2a9971420ccc8209ff52081c Author: Julian Wiedmann Date: Wed Dec 18 17:34:49 2019 +0100 s390/qeth: consolidate helpers for capability checking Convert the old code to use struct qeth_ipa_caps, and while at it remove all unused helper macros. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit adee2592b6c0e96d8b079c7c9116264293e923e6 Author: Julian Wiedmann Date: Wed Dec 18 17:34:48 2019 +0100 s390/qeth: stop yielding the ip_lock during IPv4 registration As commit df2a2a5225cc ("s390/qeth: convert IP table spinlock to mutex") converted the ip_lock to a mutex, we no longer have to yield it while the subsequent IO sleep-waits for completion. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit b6beb62a5261f4ba2e73a39889f19e5af3ce545a Author: Julian Wiedmann Date: Wed Dec 18 17:34:47 2019 +0100 s390/qeth: don't raise NETDEV_REBOOT event from L3 offline path This is a leftover from back when a recovery action didn't go through dev_close(), and was meant to shoot down all remaining af_iucv sockets on the interface. Now that the offline path always calls dev_close(), the NETDEV_GOING_DOWN event from __dev_close_many() is sufficient and this hack can be removed. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 490df97142fe38f7af9ff8d4df8e9ece41df38ec Author: Julian Wiedmann Date: Wed Dec 18 17:34:46 2019 +0100 s390/qeth: remove open-coded inet_make_mask() Use inet_make_mask() to replace some complicated bit-fiddling. Also use the right data types to replace some raw memcpy calls with proper assignments. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 2390166a6b457d3849dd4067c970f714b65bd9c3 Author: Julian Wiedmann Date: Wed Dec 18 17:34:45 2019 +0100 s390/qeth: clean up L3 sysfs code Consolidate some duplicated code for adding RXIP/VIPA addresses, and move the locking to where it's actually needed. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit e6b1b7da247b329bb9e62adc97ef28678199cf35 Author: Julian Wiedmann Date: Wed Dec 18 17:34:44 2019 +0100 s390/qeth: overhaul L3 IP address dump code The current code that dumps the RXIP/VIPA/IPATO addresses via sysfs first checks whether the buffer still provides sufficient space to hold another formatted address. But the maximum length of an formatted IPv4 address is 15 characters, not 12. So we underestimate the max required length and if the buffer was previously filled to _just_ the right level, a formatted address can end up being truncated. Revamp these code paths to use the _actually_ required length of the formatted IP address, and while at it suppress a gratuitous newline. Also use scnprintf() to format the output. In case of a truncation, this would allow us to return the number of characters that were actually written. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 7359393f3c19c9351e81345ef29f4f47229a6416 Author: Julian Wiedmann Date: Wed Dec 18 17:34:43 2019 +0100 s390/qeth: wake up all waiters from qeth_irq() card->wait_q is shared by different users, for different wake-up conditions. qeth_irq() can potentially trigger multiple of these conditions: 1) A change to channel->irq_pending, which qeth_send_control_data() is waiting for. 2) A change to card->state, which qeth_clear_channel() and qeth_halt_channel() are waiting for. As qeth_irq() does only a single wake_up(), we might miss to wake up a second eligible waiter. Luckily all waiters are guarded with a timeout, so this situation should recover on its own eventually. To make things work robustly, add an additional wake_up() for changes to channel->state. And extract a helper that updates channel->irq_pending along with the needed wake_up(). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 871602b1079234b2a9279062eaeadb3aad7bc863 Author: Julian Wiedmann Date: Wed Dec 18 17:34:42 2019 +0100 s390/qeth: only handle IRQs while device is online A qeth device that's offline should not be receiving any IRQs - all pending IOs have been terminated, and we avoid starting any new ones. So rather than immediately registering the IRQ handler when the device is probed, only register it while the device is online. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 3a74a62d3ce79c442cdc179fcf1526f81e513a58 Merge: 6dbb2e91f8bd ea77b8c813c6 Author: David S. Miller Date: Wed Dec 18 12:17:11 2019 -0800 Merge branch 'stmmac-taprio' Jose Abreu says: ==================== net: stmmac: TSN support using TAPRIO API This series adds TSN support (EST and Frame Preemption) for stmmac driver. 1) Adds the HW specific support for EST in GMAC5+ cores. 2) Adds the HW specific support for EST in XGMAC3+ cores. 3) Integrates EST HW specific support with TAPRIO scheduler API. 4) Adds the Frame Preemption suppor on stmmac TAPRIO implementation. 5) Adds the HW specific support for Frame Preemption in GMAC5+ cores. 6) Adds the HW specific support for Frame Preemption in XGMAC3+ cores. 7) Adds support for HW debug counters for Frame Preemption available in GMAC5+ cores. ==================== Signed-off-by: David S. Miller commit ea77b8c813c6e56b20bb88567b63acc147cefb57 Author: Jose Abreu Date: Wed Dec 18 11:33:11 2019 +0100 net: stmmac: mmc: Add Frame Preemption counters on GMAC5+ cores This can be useful for debug. Add these counters on GMAC5+ cores just like we did for XGMAC. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit f0e56c8d8f7d0e03e571e21c778f02d226aaeb97 Author: Jose Abreu Date: Wed Dec 18 11:33:10 2019 +0100 net: stmmac: xgmac3+: Add support for Frame Preemption Adds the HW specific support for Frame Preemption on XGMAC3+ cores. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 7c7282746883e48aff54ff6d55e6d8674a0c414a Author: Jose Abreu Date: Wed Dec 18 11:33:09 2019 +0100 net: stmmac: gmac5+: Add support for Frame Preemption Adds the HW specific support for Frame Preemption on GMAC5+ cores. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 1ac14241543c0108e9fd23aca4927a148a44c815 Author: Jose Abreu Date: Wed Dec 18 11:33:08 2019 +0100 net: stmmac: Add Frame Preemption support using TAPRIO API Adds the support for Frame Preemption using TAPRIO API. This works along with EST feature and allows to select if preemptable traffic shall be sent during specific queues opening time. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit b60189e0392fa06348911077ef281eb2b1047b6a Author: Jose Abreu Date: Wed Dec 18 11:33:07 2019 +0100 net: stmmac: Integrate EST with TAPRIO scheduler API Now that we have the EST code for XGMAC and QoS we can use it with the TAPRIO scheduler. Integrate it into the main driver and use the API to configure the EST feature. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 8572aec3d0dc43045254fd1bf581fb980bfdbc4b Author: Jose Abreu Date: Wed Dec 18 11:33:06 2019 +0100 net: stmmac: Add basic EST support for XGMAC Adds the support for EST in XGMAC cores. This feature allows to offload scheduling of queues opening time to the IP. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 504723af0d85434be5fb6f2dde0b62644a7f1ead Author: Jose Abreu Date: Wed Dec 18 11:33:05 2019 +0100 net: stmmac: Add basic EST support for GMAC5+ Adds the support for EST in GMAC5+ cores. This feature allows to offload scheduling of queues opening time to the IP. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 6dbb2e91f8bd4ad171f03f09979d2bf8e6a46306 Merge: 1f2565780e9b 3755b21b04b0 Author: David S. Miller Date: Wed Dec 18 12:14:08 2019 -0800 Merge branch 'stmmac-next' Jose Abreu says: ==================== net: stmmac: Improvements for -next Misc improvements for stmmac. 1) Adds more information regarding HW Caps in the DebugFS file. 2) Allows interrupts to be independently enabled or disabled so that we don't have to schedule both TX and RX NAPIs. 3) Stops using a magic number in coalesce timer re-arm. ==================== Signed-off-by: David S. Miller commit 3755b21b04b096347605d17008c6b6a8cf3f59e4 Author: Jose Abreu Date: Wed Dec 18 11:24:45 2019 +0100 net: stmmac: Always use TX coalesce timer value when rescheduling When we have pending packets we re-arm the TX timer with a magic value. This changes the re-arm of the timer from 10us to the user-defined coalesce value. As we support different speeds, having a magic value of 10us can be either too short or to large depending on the speed so we let user configure it. The default value of the timer is 1ms but it can be reconfigured by ethtool. Changes from v1: - Reword commit message (Jakub) Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 021bd5e369709717231338a182f00611794fb588 Author: Jose Abreu Date: Wed Dec 18 11:24:44 2019 +0100 net: stmmac: Let TX and RX interrupts be independently enabled/disabled By using this mechanism we can get rid of the not so nice method of scheduling TX NAPI when the RX was scheduled. No bandwidth reduction was seen with this change. Changes from v1: - Remove useless comment (Jakub) - Do not bind the TX clean to NAPI budget (Jakub) Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit 7d0b447a3f82f5a1a70bae20c362f332e9fa91ea Author: Jose Abreu Date: Wed Dec 18 11:24:43 2019 +0100 net: stmmac: Print more information in DebugFS DMA Capabilities file DMA Capabilites have grown but the DebugFS that shows this info has not been updated. Lets add the missing information. Signed-off-by: Jose Abreu Signed-off-by: David S. Miller commit ef32b63bf13e531479a3b1ef6eb2daaf4fcf787a Author: Benjamin Gaignard Date: Tue Dec 17 10:07:15 2019 +0100 dt-bindings: spi: Convert stm32 spi bindings to json-schema Convert the STM32 spi binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard CC: Erwan Leray CC: Fabrice Gasnier CC: Amelie Delaunay Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191217090715.13334-1-benjamin.gaignard@st.com Signed-off-by: Mark Brown commit 5b425814f13f373cf36d58cf1b418e075d45ad86 Author: Ben Zhang Date: Wed Dec 18 06:39:30 2019 -0800 ASoC: intel: Add Broadwell rt5650 machine driver Add machine driver for Broadwell + rt5650. Signed-off-by: Bard Liao Signed-off-by: Ben Zhang Signed-off-by: Mac Chiang Signed-off-by: Jon Flatley Signed-off-by: Curtis Malainey Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191218143937.122665-1-cujomalainey@chromium.org Signed-off-by: Mark Brown commit 068ac0db8637d3c188010ab8b9cc136f98fcd3df Author: Pierre-Louis Bossart Date: Tue Dec 17 14:22:31 2019 -0600 ASoC: SOF: Intel: add namespace for XTENSA Now that Xtensa stuff is only referenced in Intel stuff, define namespace and import it in Intel BYT/BDW/HDaudio modules Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191217202231.18259-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0f501c7cde4086d15c396a95c59631b05dbc0351 Author: Pierre-Louis Bossart Date: Tue Dec 17 14:22:30 2019 -0600 ASoC: SOF: move arch_ops under ops The current structures are not well designed. We include Xtensa information from the ACPI and PCI levels, but at the Kconfig/module level everything Xtensa related is included at the sof/intel level. Move the arch_ops under ops so that Xtensa is hidden in the DSP ops, with a structure that follows the Kconfig/module partition. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191217202231.18259-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5bd216c6a6b48d8ed0b3283bf7ba84fc3a566b25 Author: Pierre-Louis Bossart Date: Tue Dec 17 14:22:29 2019 -0600 ASoC: SOF: Intel: hda: add namespace for hda-codec functionality Define namespaces (one generic and one dedicated for i915) and include them in HDaudio top-level module. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191217202231.18259-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 42b5ac832b0c3bf5b0bf98ea6d99efa5fb5d5075 Author: Jerome Brunet Date: Wed Dec 18 18:24:20 2019 +0100 ASoC: meson: axg-fifo: relax period size constraints Now that the fifo depths and thresholds are properly in the axg-fifo driver, we can relax the constraints on period. As long as the period is a multiple of the fifo burst size (8 bytes) things should be OK. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20191218172420.1199117-5-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 23b89e1d62c75f2c1985449e968886e8a97860c0 Author: Jerome Brunet Date: Wed Dec 18 18:24:19 2019 +0100 ASoC: meson: axg-fifo: improve depth handling Let the fifo driver parse the fifo depth from DT. Eventually all DT should have this property. Until it is actually the case, default to 256 bytes if the property is missing. 256 bytes is the size of the smallest fifo on the supported SoCs. On the supported SoC, fifo A is usually bigger than the other ones. With depth known, we can improve the usage of the fifo and adapt the setup of request threshold. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20191218172420.1199117-4-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 864cee90d4bd870e5d5e5a0b1a6f055f4f951350 Author: Jerome Brunet Date: Wed Dec 18 18:24:17 2019 +0100 ASoC: meson: axg-fifo: fix fifo threshold setup On TODDR sm1, the fifo threshold register field is slightly different compared to the other SoCs. This leads to the fifo A being flushed to memory every 8kB. If the period is smaller than that, several periods are pushed to memory and notified at once. This is not ideal. Fix the register field update. With this, the fifos are flushed every 128B. We could still do better, like adapt the threshold depending on the period size, but at least it consistent across the different SoC/fifos Fixes: 5ac825c3d85e ("ASoC: meson: axg-toddr: add sm1 support") Reported-by: Alden DSouza Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20191218172420.1199117-2-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 72b46612d06b83851e2e4f7b538a0bbeb69c10de Author: Dragos Tarcatu Date: Tue Dec 17 18:05:18 2019 -0600 ASoC: topology: Prevent use-after-free in snd_soc_get_pcm_runtime() remove_link() is currently calling snd_soc_remove_pcm_runtime() after it has already freed the memory for the link name. But this is later read from snd_soc_get_pcm_runtime() causing a KASAN use-after-free warning. Reorder the cleanups to fix this issue. Reviewed-by: Ranjani Sridharan Signed-off-by: Dragos Tarcatu Signed-off-by: Pierre-Louis Bossart Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20191218000518.5830-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit fb522dbb4531c14193115a09905c6c31b37dbfc5 Author: Jerome Brunet Date: Wed Dec 18 18:24:18 2019 +0100 ASoC: meson: axg-fifo: add fifo depth to the bindings documentation Add a new property with the depth of the fifo in bytes. This is useful since some instance of the fifo, even on the same SoC, may have different depth. The depth is useful is set some parameters of the fifo. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20191218172420.1199117-3-jbrunet@baylibre.com Signed-off-by: Mark Brown commit d88cbd6feaf4b5de07d91f531112cf57ce821d78 Author: Guido Roncarolo Date: Tue Dec 17 18:26:16 2019 -0600 ASoC: SOF: imx: Read SAI parameters and send them to DSP Follow example from Intel SSP. Signed-off-by: Guido Roncarolo Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191218002616.7652-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9c1d4cf6ac26f890d82278326f6c7552c53ffb65 Author: Guido Roncarolo Date: Tue Dec 17 18:26:15 2019 -0600 ASoC: SOF: imx: Describe SAI parameters to be sent to DSP Introduce sof_ipc_dai_sai_params to keep information that we get from topology and we send to DSP FW. For the moment it is identical to ESAI one but it will evolve shortly independently Signed-off-by: Guido Roncarolo Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191218002616.7652-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit aa2b4a59871a0528bccb91ad94768c9dc2b7bb3d Author: Kai Vehmanen Date: Tue Dec 17 18:26:14 2019 -0600 ASoC: Intel: boards: fix incorrect HDMI Kconfig dependency Fix typo in Kconfig dependencies. The correct dependency for HDMI is SND_SOC_SOF_HDA_AUDIO_CODEC. Reported-by: Yong Zhi Fixes: e3d8f8ae5b1e ("ASoC: Intel: boards: make common HDMI driver the default for SOF") Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191218002616.7652-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 91dce767cd0b08be9f1c87bb2de8e63391a72692 Author: Kai Vehmanen Date: Tue Dec 17 18:26:13 2019 -0600 ASoC: SOF: Intel: drop HDA codec upon probe failure In case a HDA codec probe fails, do not raise error immediately, but instead remove the codec from bus->codec_mask and continue probe for other codecs. This allows for more robust behaviour in cases where one codec in the system is faulty. SOF driver load can still proceed with the codecs that can be probed successfully. Probe may still fail if suitable machine driver is not found, but in many cases the generic HDA machine driver can operate with a subset of codecs. Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191218002616.7652-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 35dc19ad86fdf6a2af30c10c281e5fe10d45c041 Author: Yong Zhi Date: Tue Dec 17 18:26:12 2019 -0600 ASoC: Intel: Add machine driver for da7219_max98373 This patch adds sof_da7219_max98373 machine driver. Tested on JasperLake platform with SOF only. Signed-off-by: Yong Zhi Signed-off-by: Bard Liao Signed-off-by: Vani Ganji Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191218002616.7652-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 59283959e82bd272a5e15e4ed5274cdd059fb532 Author: Karol Trzcinski Date: Tue Dec 17 18:26:11 2019 -0600 ASoC: SOF: log compiler name and version information Log information about used compilator and optimization level in sof firmware to host system. It will be helful to catch some compiler dependent bugs. Signed-off-by: Karol Trzcinski Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191218002616.7652-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e8b7cab8cec3386598de29bbca70d8d31aacc709 Author: Karol Trzcinski Date: Tue Dec 17 18:26:10 2019 -0600 ASoC: SOF: define struct with compiler name and version Add compiler information structure sof_ipc_cc_version. Add new enum value in sof_ipc_ext_data for new structure. This struct will be used to show more information about firmware in host system. It will be helpful during debugging. Signed-off-by: Karol Trzcinski Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191218002616.7652-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6ca5cecbd1c1758666ab79446f19e0e61ed11444 Author: Ranjani Sridharan Date: Tue Dec 17 18:26:09 2019 -0600 ASoC: SOF: Introduce state machine for FW boot Add a state machine for FW boot to track the different stages of FW boot and replace the boot_complete field with fw_state field in struct snd_sof_dev. This will be used to determine the actions to be performed during system suspend. One of the main motivations for adding this change is the fact that errors during the top-level SOF device probe cannot be propagated and therefore suspending the SOF device normally during system suspend could potentially run into errors. For example, with the current flow, if the FW boot failed for some reason and the system suspends, the SOF device suspend could fail because the CTX_SAVE IPC would be attempted even though the FW never really booted successfully causing it to time out. Another scenario that the state machine fixes is when the runtime suspend for the SOF device fails and the DSP is powered down nevertheless, the CTX_SAVE IPC during system suspend would timeout because the DSP is already powered down. Reviewed-by: Curtis Malainey Reviewed-by: Daniel Baluta Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191218002616.7652-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit cf5629e4594c2164aa629d21a749c65ad594de95 Author: Pierre-Louis Bossart Date: Tue Dec 17 14:22:28 2019 -0600 ASoC: SOF: Intel: add namespace for HDA_COMMON Define namespace and include it in PCI top-level module. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191217202231.18259-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1fa44098b683312b426bd05f1bfc0b5b1fa7860a Author: Pierre-Louis Bossart Date: Tue Dec 17 14:22:27 2019 -0600 ASoC: SOF: remove references to Haswell There are no known commercial devices using Haswell, and there is no support for Haswell in SOF so remove remaining definitions and structures. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191217202231.18259-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8caa99bb5d8007fdd206ed6ba2fe4f881b1552c7 Author: Pierre-Louis Bossart Date: Tue Dec 17 14:22:26 2019 -0600 ASoC: SOF: Intel: add namespace for BROADWELL Define namespace and include it in ACPI top-level module. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191217202231.18259-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e42b19450866fbd447e459d8935c208e3888705a Author: Pierre-Louis Bossart Date: Tue Dec 17 14:22:25 2019 -0600 ASoC: SOF: Intel: add namespaces for BAYTRAIL and MERRIFIELD Define separate namespaces and include them in ACPI and PCI top-level modules. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191217202231.18259-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f4483a0fda1df3e5b4f25de647b8777d2481f08c Author: Pierre-Louis Bossart Date: Tue Dec 17 14:22:24 2019 -0600 ASoC: SOF: Intel: add module namespace for legacy IPC The legacy IPC routines are only used by broadwell and baytrail modules, import them as needed and make sure other modules cannot load them. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191217202231.18259-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5610b90e6bb21ca31caa635bf0c17c1ee6cf1c08 Author: Pierre-Louis Bossart Date: Tue Dec 17 10:56:48 2019 -0600 ASoC: Intel: cml_rt1011_rt5682: fix codec_conf by removing legacy style Now that the legacy style is removed, we have to use the new macros for the codec configuration. This change was missed in the initial series. Reported-by: Randy Dunlap Cc: Kuninori Morimoto Fixes: ee8f537fd8b71c ("ASoC: soc-core: remove legacy style of codec_conf") Signed-off-by: Pierre-Louis Bossart Acked-by: Randy Dunlap # build-tested Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20191217165649.12091-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c705f9fc6a1736dcf6ec01f8206707c108dca824 Author: Aditya Pakki Date: Sun Dec 15 13:58:58 2019 -0600 orinoco: avoid assertion in case of NULL pointer In ezusb_init, if upriv is NULL, the code crashes. However, the caller in ezusb_probe can handle the error and print the failure message. The patch replaces the BUG_ON call to error return. Signed-off-by: Aditya Pakki Signed-off-by: Kalle Valo commit a32de68edab7b73ded850bcf76cdf6858e92a7e5 Author: Dmitry Osipenko Date: Sun Dec 15 21:42:24 2019 +0300 brcmfmac: Keep OOB wake-interrupt disabled when it shouldn't be enabled NVIDIA Tegra SoCs do not like when OOB wake is enabled and WiFi interface is in DOWN state during suspend. This results in a CPU hang on programming OOB wake-up state of the GPIO controller during of system's suspend. The solution is trivial: don't enable wake for the OOB interrupt when it should be disabled. This fixes hang on Tegra20 (Acer A500) and Tegra30 (Nexus 7) devices which are using BCM4329 and BCM4330 WiFi chips respectively. Signed-off-by: Dmitry Osipenko Signed-off-by: Kalle Valo commit 4282dc057d750c6a7dd92953564b15c26b54c22c Author: Navid Emamdoost Date: Sat Dec 14 19:51:14 2019 -0600 brcmfmac: Fix memory leak in brcmf_usbdev_qinit In the implementation of brcmf_usbdev_qinit() the allocated memory for reqs is leaking if usb_alloc_urb() fails. Release reqs in the error handling path. Fixes: 71bb244ba2fd ("brcm80211: fmac: add USB support for bcm43235/6/8 chipsets") Signed-off-by: Navid Emamdoost Signed-off-by: Kalle Valo commit 2635853ce4ab7654a77ab7080fb56de83408606b Author: Wright Feng Date: Thu Dec 12 00:52:51 2019 +0100 brcmfmac: not set mbss in vif if firmware does not support MBSS With RSDB mode, FMAC and firmware are able to create 2 or more AP, so we should not set mbss in vif structure if firmware does not support MBSS feature. Signed-off-by: Wright Feng Signed-off-by: Soeren Moch Reviewed-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit 837482e69a3f0d7cbc73922020012f83635f5ddb Author: Wright Feng Date: Thu Dec 12 00:52:50 2019 +0100 brcmfmac: add RSDB condition when setting interface combinations With firmware RSDB feature 1. The maximum support interface is four. 2. The maximum difference channel is two. 3. The maximum interfaces of {station/p2p client/AP} are two. 4. The maximum interface of p2p device is one. Signed-off-by: Wright Feng Signed-off-by: Soeren Moch Reviewed-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit a032ff0e8065668e672eb2e223e265b7808f35a3 Merge: df4654bd6e42 92adc96f8eec Author: Takashi Iwai Date: Wed Dec 18 20:05:39 2019 +0100 Merge branch 'for-linus' into for-next Taking the 5.5 devel branch back into the main devel branch. A USB-audio fix needs to be adjusted to adapt the changes that have been formerly applied for stop_sync. Signed-off-by: Takashi Iwai commit d4aef159394d5940bd7158ab789969dab82f7c76 Author: Soeren Moch Date: Thu Dec 12 00:52:49 2019 +0100 brcmfmac: add support for BCM4359 SDIO chipset BCM4359 is a 2x2 802.11 abgn+ac Dual-Band HT80 combo chip and it supports Real Simultaneous Dual Band feature. Based on a similar patch by: Wright Feng Signed-off-by: Soeren Moch Acked-by: Chi-Hsien Lin Acked-by: Ulf Hansson Signed-off-by: Kalle Valo commit c12c8913d79c49ceccb38f42714d25b783833758 Author: Soeren Moch Date: Thu Dec 12 00:52:48 2019 +0100 brcmfmac: make errors when setting roaming parameters non-fatal 4359 dongles do not support setting roaming parameters (error -52). Do not fail the 80211 configuration in this case. Signed-off-by: Soeren Moch Acked-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit 6647274ed995a172369cb04754eb5f8b85f68f6d Author: Soeren Moch Date: Thu Dec 12 00:52:47 2019 +0100 brcmfmac: fix rambase for 4359/9 Newer 4359 chip revisions need a different rambase address. This fixes firmware download on such devices which fails otherwise. Signed-off-by: Soeren Moch Acked-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit 172f6854551d48d1c9530f84513b421db944e714 Author: Chung-Hsien Hsu Date: Thu Dec 12 00:52:46 2019 +0100 brcmfmac: set F2 blocksize and watermark for 4359 Set F2 blocksize to 256 bytes and watermark to 0x40 for 4359. Also enable and configure F1 MesBusyCtrl. It fixes DMA error while having UDP bi-directional traffic. Signed-off-by: Chung-Hsien Hsu [slightly adapted for rebase on mainline linux] Signed-off-by: Soeren Moch Reviewed-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit 1b8d2e0a9e4221b99eea375c079507ce8ef655f5 Author: Wright Feng Date: Thu Dec 12 00:52:45 2019 +0100 brcmfmac: reset two D11 cores if chip has two D11 cores There are two D11 cores in RSDB chips like 4359. We have to reset two D11 cores simutaneously before firmware download, or the firmware may not be initialized correctly and cause "fw initialized failed" error. Signed-off-by: Wright Feng Signed-off-by: Soeren Moch Reviewed-by: Chi-Hsien Lin Signed-off-by: Kalle Valo commit 716c733f52ecf7f587e617c2739e7a7410301968 Author: Michael Straube Date: Wed Dec 11 16:47:55 2019 +0100 rtlwifi: rtl8192de: use generic rtl_signal_scale_mapping Function _rtl92de_signal_scale_mapping is identical to the generic version rtl_signal_scale_mapping. Remove _rtl92de_signal_scale_mapping and use the generic function. Signed-off-by: Michael Straube Signed-off-by: Kalle Valo commit fef91a2b5f5f6631dd672063b8879ed5f2501c86 Author: Michael Straube Date: Wed Dec 11 16:47:54 2019 +0100 rtlwifi: rtl8192cu: use generic rtl_signal_scale_mapping Function _rtl92c_signal_scale_mapping is identical to the generic version rtl_signal_scale_mapping. Remove _rtl92c_signal_scale_mapping and use the generic function. Signed-off-by: Michael Straube Signed-off-by: Kalle Valo commit d01b26734297b9fc5aaf110569d86254ede1db39 Author: Michael Straube Date: Wed Dec 11 16:47:53 2019 +0100 rtlwifi: rtl8192ce: use generic rtl_signal_scale_mapping Function _rtl92ce_signal_scale_mapping is identical to the generic version rtl_signal_scale_mapping. Remove _rtl92ce_signal_scale_mapping and use the generic function. Signed-off-by: Michael Straube Signed-off-by: Kalle Valo commit 5a87ae1d676ed31ec30779f6d98ea68afc5cbde7 Author: Michael Straube Date: Wed Dec 11 16:47:52 2019 +0100 rtlwifi: rtl8192de: use generic rtl_query_rxpwrpercentage Function _rtl92d_query_rxpwrpercentage is identical to the generic version rtl_query_rxpwrpercentage. Remove _rtl92d_query_rxpwrpercentage and use the generic function. Signed-off-by: Michael Straube Signed-off-by: Kalle Valo commit b8a19dd64501e4b5019eed27f98b2f8675513f6d Author: Michael Straube Date: Wed Dec 11 16:47:51 2019 +0100 rtlwifi: rtl8192cu: use generic rtl_query_rxpwrpercentage Function _rtl92c_query_rxpwrpercentage is identical to the generic version rtl_query_rxpwrpercentage. Remove _rtl92c_query_rxpwrpercentage and use the generic function. Signed-off-by: Michael Straube Signed-off-by: Kalle Valo commit f365f2f67b6a6e896864dbe92b0e5bbb34147eea Author: Michael Straube Date: Wed Dec 11 16:47:50 2019 +0100 rtlwifi: rtl8192ce: use generic rtl_query_rxpwrpercentage Function _rtl92c_query_rxpwrpercentage is identical to the generic version rtl_query_rxpwrpercentage. Remove _rtl92c_query_rxpwrpercentage and use the generic function. Signed-off-by: Michael Straube Signed-off-by: Kalle Valo commit 2d68bb2687abb747558b933e80845ff31570a49c Author: Johan Hovold Date: Tue Dec 10 12:44:26 2019 +0100 zd1211rw: fix storage endpoint lookup Make sure to use the current alternate setting when verifying the storage interface descriptors to avoid submitting an URB to an invalid endpoint. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: a1030e92c150 ("[PATCH] zd1211rw: Convert installer CDROM device into WLAN device") Cc: stable # 2.6.19 Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo commit 3139b180906af43bc09bd3373fc2338a8271d9d9 Author: Johan Hovold Date: Tue Dec 10 12:44:25 2019 +0100 rsi_91x_usb: fix interface sanity check Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: dad0d04fa7ba ("rsi: Add RS9113 wireless driver") Cc: stable # 3.15 Cc: Fariya Fatima Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo commit 39a4281c312f2d226c710bc656ce380c621a2b16 Author: Johan Hovold Date: Tue Dec 10 12:44:24 2019 +0100 rtl8xxxu: fix interface sanity check Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)") Cc: stable # 4.4 Cc: Jes Sorensen Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo commit b73e05aa543cf8db4f4927e36952360d71291d41 Author: Johan Hovold Date: Tue Dec 10 12:44:23 2019 +0100 orinoco_usb: fix interface sanity check Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: 9afac70a7305 ("orinoco: add orinoco_usb driver") Cc: stable # 2.6.35 Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo commit 3428fbcd6e6c0850b1a8b2a12082b7b2aabb3da3 Author: Johan Hovold Date: Tue Dec 10 12:44:22 2019 +0100 brcmfmac: fix interface sanity check Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: 71bb244ba2fd ("brcm80211: fmac: add USB support for bcm43235/6/8 chipsets") Cc: stable # 3.4 Cc: Arend van Spriel Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo commit af615abd15966387393471649185d15954e9cecd Author: Johan Hovold Date: Tue Dec 10 12:44:21 2019 +0100 at76c50x-usb: fix endpoint debug message Make sure to use the current alternate setting, which may not be the same as the first alternate setting, also when printing the number of endpoints at probe. Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo commit 8d9627b05b2c33e4468e65739eb7caf9c3f274d8 Author: Rafał Miłecki Date: Tue Dec 10 12:35:55 2019 +0100 brcmfmac: set interface carrier to off by default It's important as brcmfmac creates one main interface for each PHY and doesn't allow deleting it. Not setting carrier could result in other subsystems misbehaving (e.g. LEDs "netdev" trigger turning LED on). Signed-off-by: Rafał Miłecki Signed-off-by: Kalle Valo commit 1c9f329b084b7b8ea6d60d91a202e884cdcf6aae Author: Brian Norris Date: Mon Dec 9 16:39:11 2019 -0800 mwifiex: delete unused mwifiex_get_intf_num() Commit 7afb94da3cd8 ("mwifiex: update set_mac_address logic") fixed the only user of this function, partly because the author seems to have noticed that, as written, it's on the borderline between highly misleading and buggy. Anyway, no sense in keeping dead code around: let's drop it. Fixes: 7afb94da3cd8 ("mwifiex: update set_mac_address logic") Signed-off-by: Brian Norris Signed-off-by: Kalle Valo commit d0b103a52b72a45b381332d4421ac3e2eaccecb7 Author: Ganapathi Bhat Date: Fri Dec 6 13:47:48 2019 +0530 MAINTAINERS: update Ganapathi Bhat's email address I'd like to use this email-id from now on. Signed-off-by: Ganapathi Bhat Signed-off-by: Kalle Valo commit ffc7b2826a3cd48369e0676b4dc083080ef96d7c Author: Christophe JAILLET Date: Wed Dec 4 06:43:55 2019 +0100 rt2x00usb: Fix a warning message in 'rt2x00usb_watchdog_tx_dma()' 'forced' is duplicated in the message, axe one of them. Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo commit 216b44000ada87a63891a8214c347e05a4aea8fe Author: Dan Carpenter Date: Tue Dec 3 12:58:55 2019 +0300 brcmfmac: Fix use after free in brcmf_sdio_readframes() The brcmu_pkt_buf_free_skb() function frees "pkt" so it leads to a static checker warning: drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:1974 brcmf_sdio_readframes() error: dereferencing freed memory 'pkt' It looks like there was supposed to be a continue after we free "pkt". Fixes: 4754fceeb9a6 ("brcmfmac: streamline SDIO read frame routine") Signed-off-by: Dan Carpenter Acked-by: Franky Lin Signed-off-by: Kalle Valo commit 960da557f435bfe14edb160a42b8ed3a2e255e73 Author: Johan Hovold Date: Thu Nov 28 18:22:04 2019 +0100 rsi: add missing endpoint sanity checks The driver expects at least one bulk-in endpoint when in "wifi-alone" operating mode and two bulk-in endpoints otherwise, and would otherwise fail to to submit the corresponding bulk URB to the default pipe during probe with a somewhat cryptic message: rsi_91x: rsi_rx_urb_submit: Failed in urb submission rsi_91x: rsi_probe: Failed in probe...Exiting RSI-USB WLAN: probe of 2-2.4:1.0 failed with error -8 The current endpoint sanity check looks broken and would only bail out early if there was no bulk-in endpoint but at least one bulk-out endpoint. Tighten this check to always require at least one bulk-in and one bulk-out endpoint, and add the missing sanity check for a Bluetooth bulk-in endpoint when in a BT operating mode. Also make sure to log an informative error message when the expected endpoints are missing. Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo commit b9b9f9fea21830f85cf0148cd8dce001ae55ead1 Author: Johan Hovold Date: Thu Nov 28 18:22:03 2019 +0100 rsi: fix non-atomic allocation in completion handler USB completion handlers are called in atomic context and must specifically not allocate memory using GFP_KERNEL. Fixes: a1854fae1414 ("rsi: improve RX packet handling in USB interface") Cc: stable # 4.17 Cc: Prameela Rani Garnepudi Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo commit 47768297481184932844ab01a86752ba31a38861 Author: Johan Hovold Date: Thu Nov 28 18:22:02 2019 +0100 rsi: fix memory leak on failed URB submission Make sure to free the skb on failed receive-URB submission (e.g. on disconnect or currently also due to a missing endpoint). Fixes: a1854fae1414 ("rsi: improve RX packet handling in USB interface") Cc: stable # 4.17 Cc: Prameela Rani Garnepudi Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo commit 92aafe77123ab478e5f5095878856ab0424910da Author: Johan Hovold Date: Thu Nov 28 18:22:01 2019 +0100 rsi: fix use-after-free on probe errors The driver would fail to stop the command timer in most error paths, something which specifically could lead to the timer being freed while still active on I/O errors during probe. Fix this by making sure that each function starting the timer also stops it in all relevant error paths. Reported-by: syzbot+1d1597a5aa3679c65b9f@syzkaller.appspotmail.com Fixes: b78e91bcfb33 ("rsi: Add new firmware loading method") Cc: stable # 4.12 Cc: Prameela Rani Garnepudi Cc: Amitkumar Karwar Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo commit e93cd35101b61e4c79149be2cfc927c4b28dc60c Author: Johan Hovold Date: Thu Nov 28 18:22:00 2019 +0100 rsi: fix use-after-free on failed probe and unbind Make sure to stop both URBs before returning after failed probe as well as on disconnect to avoid use-after-free in the completion handler. Reported-by: syzbot+b563b7f8dbe8223a51e8@syzkaller.appspotmail.com Fixes: a4302bff28e2 ("rsi: add bluetooth rx endpoint") Fixes: dad0d04fa7ba ("rsi: Add RS9113 wireless driver") Cc: stable # 3.15 Cc: Siva Rebbagondla Cc: Prameela Rani Garnepudi Cc: Amitkumar Karwar Cc: Fariya Fatima Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo commit 2d52378a0ad0c2c3e8a2572aa883da46ddfaac4e Author: Stanislaw Gruszka Date: Thu Nov 28 10:11:24 2019 +0100 rt2x00: use RESET state bit to prevent IV changes on restart We can not set IV when we are under reset. Previously we read previous IV value from registers and zeroed IV registers when key was deleted, but this could possibly not work if DEL_KEY command was not performed. Now when we have ->reconfig_complete ops and we fully mark mac80211 reset state via DEVICE_STATE_RESET flag, we can just skip setting IV when keys are set during reset. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit 57f9807d1ea2bd1154d9f58c39670fbc49b1975e Author: Stanislaw Gruszka Date: Thu Nov 28 10:11:23 2019 +0100 rt2x00: implement reconfig_complete mac80211 has .reconfig_complete that can be used as indicator of HW restart end. This will allow to configure keys/IV differently for HW restart and normal configuration. Signed-off-by: Stanislaw Gruszka Signed-off-by: Kalle Valo commit f427939391f290cbeabe0231eb8a116429d823f0 Author: yu kuai Date: Wed Nov 27 20:44:33 2019 +0800 bcma: remove set but not used variable 'sizel' Fixes gcc '-Wunused-but-set-variable' warning: drivers/bcma/scan.c: In function ‘bcma_erom_get_addr_desc’: drivers/bcma/scan.c:222:20: warning: variable ‘sizel’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Fixes: 8369ae33b705 ("bcma: add Broadcom specific AMBA bus driver") Signed-off-by: yu kuai Signed-off-by: Kalle Valo commit cb775c88da5d48a85d99d95219f637b6fad2e0e9 Author: Phong Tran Date: Wed Nov 27 00:55:29 2019 +0700 rtlwifi: rtl_pci: Fix -Wcast-function-type correct usage prototype of callback in tasklet_init(). Report by https://github.com/KSPP/linux/issues/20 Signed-off-by: Phong Tran Reviewed-by: Kees Cook Signed-off-by: Kalle Valo commit da5e57e8a6a3e69dac2937ba63fa86355628fbb2 Author: Phong Tran Date: Wed Nov 27 00:55:28 2019 +0700 iwlegacy: Fix -Wcast-function-type correct usage prototype of callback in tasklet_init(). Report by https://github.com/KSPP/linux/issues/20 Signed-off-by: Phong Tran Reviewed-by: Kees Cook Signed-off-by: Kalle Valo commit ebd77feb27e91bb5fe35a7818b7c13ea7435fb98 Author: Phong Tran Date: Wed Nov 27 00:55:27 2019 +0700 ipw2x00: Fix -Wcast-function-type correct usage prototype of callback in tasklet_init(). Report by https://github.com/KSPP/linux/issues/20 Signed-off-by: Phong Tran Reviewed-by: Kees Cook Signed-off-by: Kalle Valo commit 475eec112e4267232d10f4afe2f939a241692b6c Author: Phong Tran Date: Wed Nov 27 00:55:26 2019 +0700 b43legacy: Fix -Wcast-function-type correct usage prototype of callback in tasklet_init(). Report by https://github.com/KSPP/linux/issues/20 Tested-by: Larry Finger Signed-off-by: Phong Tran Reviewed-by: Kees Cook Signed-off-by: Kalle Valo commit 37bc6c72f5b76f3c6ae00e3001d3187100fbeb1b Author: Austin Kim Date: Wed Nov 27 14:43:58 2019 +0900 brcmsmac: Remove always false 'channel < 0' statement As 'channel' is declared as u16, the following expression is always false. channel < 0 So we can remove unnecessary 'always false' statement. Signed-off-by: Austin Kim Signed-off-by: Kalle Valo commit bb7e6d85536b4f1bfbc15e21dab829bf1377c8f8 Author: Larry Finger Date: Mon Nov 25 16:09:34 2019 -0600 rtlwifi: Remove last definitions of local bit manipulation macros All usage of the local macros have been removed, thus the remaining definitions are deleted. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit 84bc9a58326a037a9472d8d899a22159542d706e Author: Larry Finger Date: Mon Nov 25 16:09:33 2019 -0600 rtlwifi: rtl8723be: Remove usage of private bit manipulation macros Besides the previously changed macros for the RX and TX descriptors. the local macros are used in other places. These are replaced with standard bit manipulation macros. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit 1626f192957552bd567261ad5103e7bd033e9ef0 Author: Larry Finger Date: Mon Nov 25 16:09:32 2019 -0600 rtlwifi: rtl8723ae: Remove usage of private bit manipulation macros Besides the previously changed macros for the RX and TX descriptors. the local macros are used in other places. These are replaced with standard bit manipulation macros. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit 8e345762126374412e4ce783bf979c4fad0ea725 Author: Larry Finger Date: Mon Nov 25 16:09:31 2019 -0600 rtlwifi: rtl8192ee: Remove usage of private bit manipulation macros Besides the previously changed macros for the RX and TX descriptors. the local macros are used in other places. These are replaced with standard bit manipulation macros. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit 39f40710d0b5231e1f4adca16be4da0dcf6434cb Author: Larry Finger Date: Mon Nov 25 16:09:30 2019 -0600 rtlwifi: rtl88821ae: Remove usage of private bit manipulation macros Besides the previously changed macros for the RX and TX descriptors. the local macros are used in other places. These are replaced with standard bit manipulation macros. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit f0dcd57e0b417152190e9f68e5ef981e1c316162 Author: Larry Finger Date: Mon Nov 25 16:09:29 2019 -0600 rtlwifi: Remove dependence on special bit manipulation macros for common driver The special macros are used in several places in the base driver. These are replaced by standard bit manipulation macros or code. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit 4c8692d4939d2704e9ba3894a5510d0e323b6fbd Author: Larry Finger Date: Mon Nov 25 16:09:28 2019 -0600 rtlwifi: rtl8192ce: rtl8192c_com: Remove usage of private bit manipulation macros Besides the previously changes macros for the RX and TX descriptors. the local macros are used in other places. These are replaced with standard bit manipulation macros. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit 5ea5c93d937cb5fb5891835ab134221a2881e32a Author: Larry Finger Date: Mon Nov 25 16:09:27 2019 -0600 rtlwifi: rtl8188ee: Remove usage of private bit manipulation Besides the previously changes macros for the RX and TX descriptors. the local macros are used in other places. These are replaced with standard bit manipulation macros. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit 7031fb7f1cd12720921bf2c62e1c09aea7bcb890 Author: Larry Finger Date: Mon Nov 25 16:09:26 2019 -0600 rtlwifi: rtl8192de: Remove usage of private bit manipulation macros Besides the previously changes macros in trx.h, there are some of these local macros in the driver. These are replaced with standard bit manipulations. Unused macros are deleted. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit 96c21a254053539bca12c5a750d9762ea419363d Author: Larry Finger Date: Mon Nov 25 12:32:29 2019 -0600 rtlwifi: rtl8192de: Convert inline routines to little-endian words In this step, the read/write routines for the descriptors are converted to use __le32 quantities, thus a lot of casts can be removed. Callback routines still use the 8-bit arrays, but these are changed within the specified routine. Reported-by: kbuild test robot Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit fa2b36a344f50ef6792315173567d9ce16832295 Author: Larry Finger Date: Mon Nov 25 12:32:28 2019 -0600 rtlwifi: rtl8192de: Convert macros that set descriptor As a first step in the conversion, the macros that set the RX and TX descriptors are converted to static inline routines, and the names are changed from upper to lower case. To minimize the changes in a given step, the input descriptor information is left as as a byte array (u8 *), even though it should be a little-endian word array (__le32 *). That will be changed in the next patch. Several places where checkpatch.pl complains about a space after a cast and other warnings are fixed. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit 08f6ef39bc3d40cc946dd3c3bbe50c088c498d9d Author: Larry Finger Date: Mon Nov 25 12:32:27 2019 -0600 rtlwifi: rtl8192de: Replace local bit manipulation macros This driver uses a set of local macros to manipulate the RX and TX descriptors, which are all little-endian quantities. These macros are replaced by the bitfield macros le32p_replace_bits() and le32_get_bits(). In several places, the macros operated on an entire 32-bit word. In these cases, a direct read or replacement is used. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit b8e1ada81fb71f54c5577b46e562016623f2567c Author: Larry Finger Date: Mon Nov 25 12:32:26 2019 -0600 rtlwifi: rtl8192de: Remove unused GET_XXX and SET_XXX macros As the first step in converting from macros that get/set information in the RX and TX descriptors, unused macros are being removed. Signed-off-by: Larry Finger Signed-off-by: Kalle Valo commit 7b90dfc4873b87c468cc6046538f46a531c1d785 Author: James Sewart Date: Tue Dec 10 16:25:40 2019 -0600 PCI: Add DMA alias quirk for PLX PEX NTB The PLX PEX NTB forwards DMA transactions using Requester IDs that don't exist as PCI devices. The devfn for a transaction is used as an index into a lookup table storing the origin of a transaction on the other side of the bridge. Alias all possible devfns to the NTB device so that any transaction coming in is governed by the mappings for the NTB. Signed-off-by: James Sewart Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit 09298542cd891b43778db1f65aa3613aa5a562eb Author: James Sewart Date: Tue Dec 10 16:07:30 2019 -0600 PCI: Add nr_devfns parameter to pci_add_dma_alias() Add a "nr_devfns" parameter to pci_add_dma_alias() so it can be used to create DMA aliases for a range of devfns. [bhelgaas: incorporate nr_devfns fix from James, update quirk_pex_vca_alias() and setup_aliases()] Signed-off-by: James Sewart Signed-off-by: Bjorn Helgaas commit f8bf2aeb651b3460a4b36fd7ba1ba1d31777d35c Author: James Sewart Date: Tue Dec 10 15:51:33 2019 -0600 PCI: Fix pci_add_dma_alias() bitmask size The number of possible devfns is 256, but pci_add_dma_alias() allocated a bitmap of size 255. Fix this off-by-one error. This fixes commits 338c3149a221 ("PCI: Add support for multiple DMA aliases") and c6635792737b ("PCI: Allocate dma_alias_mask with bitmap_zalloc()"), but I doubt it was possible to see a problem because it takes 4 64-bit longs (or 8 32-bit longs) to hold 255 bits, and bitmap_zalloc() doesn't save the 255-bit size anywhere. [bhelgaas: commit log, move #define to drivers/pci/pci.h, include loop limit fix from Qian Cai: https://lore.kernel.org/r/20191218170004.5297-1-cai@lca.pw] Signed-off-by: James Sewart Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit 5cc509aa83c6acd2c5cd94f99065c39d2bd0a490 Author: Navid Emamdoost Date: Fri Nov 22 13:19:48 2019 -0600 brcmfmac: Fix memory leak in brcmf_p2p_create_p2pdev() In the implementation of brcmf_p2p_create_p2pdev() the allocated memory for p2p_vif is leaked when the mac address is the same as primary interface. To fix this, go to error path to release p2p_vif via brcmf_free_vif(). Fixes: cb746e47837a ("brcmfmac: check p2pdev mac address uniqueness") Signed-off-by: Navid Emamdoost Signed-off-by: Kalle Valo commit f998f9fcf9033b1e7f76bf4c17969b74be664dce Author: Eduardo Abinader Date: Tue Dec 17 15:12:47 2019 +0100 wcn36xx: disable HW_CONNECTION_MONITOR Whenever the signal stregth decays smoothly and physical connnection is already gone and no deauth has arrived, the qcom soc is not able to indicate neither WCN36XX_HAL_MISSED_BEACON_IND nor WCN36XX_HAL_MISSED_BEACON_IND. It was noticed that such situation gets even more reproducible, when the driver fails to enter bmps mode - which is highly likely to occur. Thus, in order to provide proper disconnection of the connected STA, let mac80211 handle it, instead of wcn3xx driver. Signed-off-by: Eduardo Abinader Signed-off-by: Kalle Valo commit 0ef332951e856efa89507cdd13ba8f4fb8d4db12 Author: Johan Hovold Date: Tue Dec 10 12:44:20 2019 +0100 ath9k: fix storage endpoint lookup Make sure to use the current alternate setting when verifying the storage interface descriptors to avoid submitting an URB to an invalid endpoint. Failing to do so could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: 36bcce430657 ("ath9k_htc: Handle storage devices") Cc: stable # 2.6.39 Signed-off-by: Johan Hovold Signed-off-by: Kalle Valo commit 29c5cb641b59057bae0fe243da5b3b1a1e760227 Author: Douglas Anderson Date: Tue Dec 17 13:04:07 2019 -0800 arm64: dts: qcom: sc7180: Fix I2C/UART numbers 2, 4, 7, and 9 Commit f4a73f5e2633 ("pinctrl: qcom: sc7180: Add new qup functions") has landed which means that we absolutely need to use the proper names for the pinmuxing for I2C/UART numbers 2, 4, 7, and 9. Let's do it. For reference: - If you get only one of this commit and the pinctrl commit then none of I2C/UART 2, 4, 7, and 9 will work. - If you get neither of these commits then I2C 2, 4, 7, and 9 will work but not UART. ...but despite the above it should be fine for this commit to land in the Qualcomm tree because sc7180.dtsi only exists there (it hasn't made it to mainline). Reviewed-by: Matthias Kaehlcke Reviewed-by: Rajendra Nayak Fixes: ba3fc6496366 ("arm64: dts: sc7180: Add qupv3_0 and qupv3_1") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20191217130352.1.Id8562de45e8441cac34699047e25e7424281e9d4@changeid Signed-off-by: Bjorn Andersson commit d1389e19e68270601c75acc14a890264f66b80a1 Author: zhengbin Date: Sat Dec 14 18:22:34 2019 +0800 ath11k: Remove unneeded semicolon Fixes coccicheck warning: drivers/net/wireless/ath/ath11k/wmi.h:2570:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Kalle Valo commit 269663f18474b739fcf45389c8fea82de3332e2f Author: Dan Carpenter Date: Fri Dec 13 13:52:19 2019 +0300 ath11k: remove an unneeded NULL check The list iterator is always non-NULL so it doesn't need to be checked. I also removed the unnecessary initializer because the list iterator is always initialized. Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo commit c76fa846b0e1a1cdf6fa1e04c0c3985411cc973d Author: Dan Carpenter Date: Fri Dec 13 13:51:27 2019 +0300 ath11k: checking for NULL vs IS_ERR() The ath11k_ce_alloc_ring() function returns error pointers on error, not NULL. The rest of the driver assumes that "pipe->src_ring" is either valid or NULL so this patch introduces a temporary varaible to avoid leaving it as an error pointer. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo commit cd21c827a1555276325880ea431a6a27a9186e30 Author: Dan Carpenter Date: Fri Dec 13 13:47:54 2019 +0300 ath11k: delete a stray unlock in ath11k_dbg_htt_stats_req() The callers unlock this lock so this error path has a double unlock. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo commit 4358bcb54bb9ede559e60685b9e544e723197ca1 Author: Colin Ian King Date: Thu Dec 12 19:42:51 2019 +0000 ath11k: fix missing free of skb on error return path The error handling when the call to ath11k_hal_srng_get_entrysize fails leaks skb, fix this by returning via the err_free return path that will ensure the skb is free'd. Addresses-Coverity: ("Resource leak") Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit 08cc0f44f5ed5b5a91370f99929730dc3fe94b68 Author: Colin Ian King Date: Thu Dec 12 19:10:44 2019 +0000 ath11k: fix uninitialized variable radioup The variable radioup is not uninitalized so it may contain a garbage value and hence the detection of a radio that is not up is buggy. Fix this by initializing it to zero. Addresses-Coverity: ("Uninitalized scalar variable") Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit b5316db229d5afd7ba4cdba05b4c4b4c6307b5e7 Author: Colin Ian King Date: Thu Dec 12 18:32:28 2019 +0000 ath11k: fix memory leak on reg_info Currently a return path is leaking the previously allocate reg_info. Fix this by exiting via the return path mem_free. Since the return value ret is defaulted to 0, there is no need to re-assign ret to the 0 before the goto. Addresses-Coverity: ("Resource leak") Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit 509421acab6926a0a3edc3120d8b2a62ef2ee7a9 Author: Nathan Chancellor Date: Wed Dec 11 12:22:52 2019 -0700 ath11k: Remove unnecessary enum scan_priority Clang warns: drivers/net/wireless/ath/ath11k/wmi.c:1827:23: warning: implicit conversion from enumeration type 'enum wmi_scan_priority' to different enumeration type 'enum scan_priority' [-Wenum-conversion] arg->scan_priority = WMI_SCAN_PRIORITY_LOW; ~ ^~~~~~~~~~~~~~~~~~~~~ 1 warning generated. wmi_scan_priority and scan_priority have the same values but the wmi one has WMI prefixed to the names. Since that enum is already being used, get rid of scan_priority and switch its one use to wmi_scan_priority to fix this warning. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Link: https://github.com/ClangBuiltLinux/linux/issues/808 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Kalle Valo commit 345a4f223a7c9c6f10fb5ed7ec468ef858e9ec8a Author: Colin Ian King Date: Wed Dec 11 08:34:43 2019 +0000 ath11k: fix several spelling mistakes There are several spelling mistakes in warning and debug messages, fix them. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo commit 20c3c4fd39677fd5d909b6953a21411c7d200d2f Author: John Crispin Date: Thu Dec 5 07:26:44 2019 +0100 ath11k: add some missing __packed qualifiers A few of the WMI parameter structs were missing this. Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit aacb46223e084d4e6c14b48962c4816b0baa1f0f Author: Pradeep Kumar Chitrapu Date: Fri Dec 13 16:34:57 2019 +0100 ath11k: set the BA buffer size to 256 when HE is enabled This patch sets the correct BA buffer size when we are in HE mode. Without this change we are not able to receive 256 bitmapped BA frames. Signed-off-by: John Crispin Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo commit 485add35771b07e56833cff77e07936ba78e731c Author: Pradeep Kumar Chitrapu Date: Fri Dec 13 16:34:56 2019 +0100 ath11k: fix pdev when invoking ath11k_wmi_send_twt_enable_cmd() The code currently uses the wrong pdev id when enabling TWT. Fix this by using the correct ones. Fixes: e65a616f4e74 ("ath11k: add TWT support") Signed-off-by: John Crispin Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo commit 2ad578fdb7b544e2000cbec7bc1c2796208f3fcf Author: John Crispin Date: Fri Dec 13 16:38:39 2019 +0100 ath11k: optimize ath11k_hal_tx_status_parse Moving the function into dp_tx.c allows gcc to optimize the code better and also avoid chace invalidates and context switches. Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit d0998eb84ed3cc02c15f92b07223735ddbbe9b06 Author: John Crispin Date: Fri Dec 13 16:38:38 2019 +0100 ath11k: optimise ath11k_dp_tx_completion_handler the current code does 4 memcpys for each completion frame. 1) duplicate the desc 2 + 3) inside kfifo insertion 4) kfifo remove The code simply drops the kfifo and uses a trivial ring buffer. This requires a single memcpy for insertion. There is no removal needed as we can simply use the inserted data for processing. As the code runs inside the NAPI context it is atomic and there is no need for most of the locking. Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit 8cfa7ef8127b00de1ce0275a85220c331fe9a4d0 Author: John Crispin Date: Fri Dec 13 16:38:37 2019 +0100 ath11k: move some tx_status parsing to debugfs code Some of the fields are only used by debugfs. Move the parsing of these from the data hot path to the debugfs code. Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit 01f624f01845a1685b6070bfa6be9a13ed03b712 Author: Chris Wilson Date: Wed Dec 18 09:40:57 2019 +0000 drm/i915: Ratelimit i915_globals_park When doing our global park, we like to be a good citizen and shrink our slab caches (of which we have quite a few now), but each kmem_cache_shrink() incurs a stop_machine() and so ends up being quite expensive, causing machine-wide stalls. While ideally we would like to throw away unused pages in our slab caches whenever it appears that we are idling, doing so will require a much cheaper mechanism. In the meantime use a delayed worked to impose a rate-limit that means we have to have been idle for more than 2 seconds before we start shrinking. References: https://gitlab.freedesktop.org/drm/intel/issues/848 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191218094057.3510459-1-chris@chris-wilson.co.uk commit 6bc9d6f786a56c4b8d267d7e9e52bbcde6a0b03a Author: John Crispin Date: Fri Dec 13 16:38:34 2019 +0100 ath11k: rename ath11k_wmi_base instances from wmi_sc to wmi_ab This makes the code consistent with the recent sc to ab rename. Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit bde4d95e92d56111c0548cb81dfe1ccb8b2bbfbd Author: John Crispin Date: Fri Dec 13 16:38:33 2019 +0100 ath11k: drop memset when setting up a tx cmd desc There is no point in zero'ing out the structure if we set all values in the following line. Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit 6bfebd4bf93928958cd57df9a8ccd5862f88468c Author: John Crispin Date: Fri Dec 13 16:38:32 2019 +0100 ath11k: disable PS for STA interfaces by default upon bringup After applying this setting the TX performance issue of STA interfaces is gone and we can see TX performance go up to ~900mbit on HE80. Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit 97c63746ebb9eebe34551fdb4370d6e3fff52059 Author: John Crispin Date: Fri Dec 13 16:38:31 2019 +0100 ath11k: add wmi helper for turning STA PS on/off Add a WMI call helper to set the powersave mode of a STA interface. Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit 54400257ae523fa7fff11fe4209e7f9dcafdefa0 Author: Chris Wilson Date: Tue Dec 17 09:56:41 2019 +0000 drm/i915/gt: Remove direct invocation of breadcrumb signaling Only signal the breadcrumbs from inside the irq_work, simplifying our interface and calling conventions. The micro-optimisation here is that by always using the irq_work interface, we know we are always inside an irq-off critical section for the breadcrumb signaling and can ellide save/restore of the irq flags. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191217095642.3124521-7-chris@chris-wilson.co.uk commit 8c709f9a06938f6dd743e0b968245d900fa4759e Author: Arnd Bergmann Date: Sun Dec 15 21:35:04 2019 +0100 y2038: sh: remove timeval/timespec usage from headers This header file escaped my earlier cleanups for removing the in-kernel usage of timeval and timespec structs. Replace them with the corresponding __kernel_old_* types. Acked-by: Rich Felker Signed-off-by: Arnd Bergmann commit 251ec1c159e4874fbede0c3c586e317e177c0c9b Author: Arnd Bergmann Date: Wed Dec 11 21:07:23 2019 +0100 y2038: sparc: remove use of struct timex 'struct timex' is one of the last users of 'struct timeval' and is only referenced in one place in the kernel any more, to convert the user space timex into the kernel-internal version on sparc64, with a different tv_usec member type. As a preparation for hiding the time_t definition and everything using that in the kernel, change the implementation once more to only convert the timeval member, and then enclose the struct definition in an #ifdef. Signed-off-by: Arnd Bergmann commit 4f9fbd893fe83a1193adceca41c8f7aa6c7382a1 Author: Arnd Bergmann Date: Fri Nov 15 15:53:29 2019 +0100 y2038: rename itimerval to __kernel_old_itimerval Take the renaming of timeval and timespec one level further, also renaming itimerval to __kernel_old_itimerval, to avoid namespace conflicts with the user-space structure that may use 64-bit time_t members. Signed-off-by: Arnd Bergmann commit 751addac78b6f205ffd47c8736ca6d429dc77703 Author: Arnd Bergmann Date: Thu Oct 24 22:53:19 2019 +0200 y2038: remove obsolete jiffies conversion functions Now that the last user of timespec_to_jiffies() is gone, these can just be removed, everything else is using ktime_t or timespec64 already. Signed-off-by: Arnd Bergmann commit 6e31ded6895adfca97211118cc9b72236e8f6d53 Author: Arnd Bergmann Date: Mon Oct 28 11:41:42 2019 +0100 nfs: fscache: use timespec64 in inode auxdata nfs currently behaves differently on 32-bit and 64-bit kernels regarding the on-disk format of nfs_fscache_inode_auxdata. That format should really be the same on any kernel, and we should avoid the 'timespec' type in order to remove that from the kernel later on. Using plain 'timespec64' would not be good here, since that includes implied padding and would possibly leak kernel stack data to the on-disk format on 32-bit architectures. struct __kernel_timespec would work as a replacement, but open-coding the two struct members in nfs_fscache_inode_auxdata makes it more obvious what's going on here, and keeps the current format for 64-bit architectures. Cc: David Howells Signed-off-by: Arnd Bergmann commit 057f184b1245150b88e59997fc6f1af0e138d42e Author: Arnd Bergmann Date: Mon Oct 28 10:13:16 2019 +0100 nfs: fix timstamp debug prints Starting in v5.5, the timestamps are correctly passed down as 64-bit seconds with NFSv4 on 32-bit machines, but some debug statements still truncate them to 'long'. Fixes: e86d5a02874c ("NFS: Convert struct nfs_fattr to use struct timespec64") Signed-off-by: Arnd Bergmann commit f559935e7ce4e5d448bb6588f7fa82b0cc2cc2c0 Author: Arnd Bergmann Date: Fri Oct 20 16:34:42 2017 +0200 nfs: use time64_t internally The timestamps for the cache are all in boottime seconds, so they don't overflow 32-bit values, but the use of time_t is deprecated because it generally does overflow when used with wall-clock time. There are multiple possible ways of avoiding it: - leave time_t, which is safe here, but forces others to look into this code to determine that it is over and over. - use a more generic type, like 'int' or 'long', which is known to be sufficient here but loses the documentation of referring to timestamps - use ktime_t everywhere, and convert into seconds in the few places where we want realtime-seconds. The conversion is sometimes expensive, but not more so than the conversion we do today. - use time64_t to clarify that this code is safe. Nothing would change for 64-bit architectures, but it is slightly less efficient on 32-bit architectures. Without a clear winner of the three approaches above, this picks the last one, favouring readability over a small performance loss on 32-bit architectures. Signed-off-by: Arnd Bergmann commit 294ec5b87a8aaef664efb00ba62e4ef6ca05707c Author: Arnd Bergmann Date: Thu Jun 7 17:02:50 2018 +0200 sunrpc: convert to time64_t for expiry Using signed 32-bit types for UTC time leads to the y2038 overflow, which is what happens in the sunrpc code at the moment. This changes the sunrpc code over to use time64_t where possible. The one exception is the gss_import_v{1,2}_context() function for kerberos5, which uses 32-bit timestamps in the protocol. Here, we can at least treat the numbers as 'unsigned', which extends the range from 2038 to 2106. Signed-off-by: Arnd Bergmann commit 38c4a4cf02513a7904b9db0a668b7e50145ea696 Author: Arnd Bergmann Date: Mon Nov 6 13:28:52 2017 +0100 drm/etnaviv: avoid deprecated timespec struct timespec is being removed from the kernel because it often leads to code that is not y2038-safe. In the etnaviv driver, monotonic timestamps are used, which do not suffer from overflow, but the usage of timespec here gets in the way of removing the interface completely. Pass down the user-supplied 64-bit value here rather than converting it to an intermediate timespec to avoid the conversion. The conversion is transparent for all regular CLOCK_MONOTONIC values, but is a small change in behavior for excessively large values: the existing code would treat e.g. tv_sec=0x100000000 the same as tv_sec=0 and not block, while the new code it would block for up to 2^31 seconds. The new behavior is more logical here, but if it causes problems, the truncation can be put back. Signed-off-by: Arnd Bergmann commit 245595e83fbedda9e107eb0b37cec0ad07733778 Author: Arnd Bergmann Date: Mon Nov 11 17:20:04 2019 +0100 drm/etnaviv: reject timeouts with tv_nsec >= NSEC_PER_SEC Most kernel interfaces that take a timespec require normalized representation with tv_nsec between 0 and NSEC_PER_SEC. Passing values larger than 0x100000000ull further behaves differently on 32-bit and 64-bit kernels, and can cause the latter to spend a long time counting seconds in timespec64_sub()/set_normalized_timespec64(). Reject those large values at the user interface to enforce sane and portable behavior. Signed-off-by: Arnd Bergmann commit 6cedb8b377bba6520508399b74754b9a0ca06edf Author: Arnd Bergmann Date: Tue May 29 16:16:06 2018 +0200 drm/msm: avoid using 'timespec' The timespec structure and associated interfaces are deprecated and will be removed in the future because of the y2038 overflow. The use of ktime_to_timespec() in timeout_to_jiffies() does not suffer from that overflow, but is easy to avoid by just converting the ktime_t into jiffies directly. Reviewed-by: Jordan Crouse Signed-off-by: Arnd Bergmann commit 4ddfc3dc60a243e9d70e2de0356563c8b547fbfc Author: Arnd Bergmann Date: Wed Jun 20 09:47:26 2018 +0200 hfs/hfsplus: use 64-bit inode timestamps The interpretation of on-disk timestamps in HFS and HFS+ differs between 32-bit and 64-bit kernels at the moment. Use 64-bit timestamps consistently so apply the current 64-bit behavior everyhere. According to the official documentation for HFS+ [1], inode timestamps are supposed to cover the time range from 1904 to 2040 as originally used in classic MacOS. The traditional Linux usage is to convert the timestamps into an unsigned 32-bit number based on the Unix epoch and from there to a time_t. On 32-bit systems, that wraps the time from 2038 to 1902, so the last two years of the valid time range become garbled. On 64-bit systems, all times before 1970 get turned into timestamps between 2038 and 2106, which is more convenient but also different from the documented behavior. Looking at the Darwin sources [2], it seems that MacOS is inconsistent in yet another way: all timestamps are wrapped around to a 32-bit unsigned number when written to the disk, but when read back, all numeric values lower than 2082844800U are assumed to be invalid, so we cannot represent the times before 1970 or the times after 2040. While all implementations seem to agree on the interpretation of values between 1970 and 2038, they often differ on the exact range they support when reading back values outside of the common range: MacOS (traditional): 1904-2040 Apple Documentation: 1904-2040 MacOS X source comments: 1970-2040 MacOS X source code: 1970-2038 32-bit Linux: 1902-2038 64-bit Linux: 1970-2106 hfsfuse: 1970-2040 hfsutils (32 bit, old libc) 1902-2038 hfsutils (32 bit, new libc) 1970-2106 hfsutils (64 bit) 1904-2040 hfsplus-utils 1904-2040 hfsexplorer 1904-2040 7-zip 1904-2040 Out of the above, the range from 1970 to 2106 seems to be the most useful, as it allows using HFS and HFS+ beyond year 2038, and this matches the behavior that most users would see today on Linux, as few people run 32-bit kernels any more. Link: [1] https://developer.apple.com/library/archive/technotes/tn/tn1150.html Link: [2] https://opensource.apple.com/source/hfs/hfs-407.30.1/core/MacOSStubs.c.auto.html Link: https://lore.kernel.org/lkml/20180711224625.airwna6gzyatoowe@eaf/ Suggested-by: "Ernesto A. Fernández" Reviewed-by: Vyacheslav Dubeyko Reviewed-by: Ernesto A. Fernández Signed-off-by: Arnd Bergmann --- v3: revert back to 1970-2106 time range fix bugs found in review merge both patches into one drop cc:stable tag v2: treat pre-1970 dates as invalid following MacOS X behavior, reword and expand changelog text commit bca302651af496615829be13165552a2c160a1a1 Author: Arnd Bergmann Date: Tue Jun 12 15:31:17 2018 +0200 hostfs: pass 64-bit timestamps to/from user space The use of 'struct timespec' is deprecated in the kernel, so we want to avoid the conversions from/to the proper timespec64 structure. On the user space side, we have a 'struct timespec' that is defined by the C library and that will be incompatible with the kernel's view on 32-bit architectures once they move to a 64-bit time_t, breaking the shared binary layout of hostfs_iattr and hostfs_stat. This changes the two structures to use a new hostfs_timespec structure with fixed 64-bit seconds/nanoseconds for passing the timestamps between hostfs_kern.c and hostfs_user.c. With a new enough user space side, this will allow timestamps beyond year 2038. Signed-off-by: Arnd Bergmann commit d413fcb436f79b6305201494ec13099171ba33a6 Author: Arnd Bergmann Date: Mon Nov 27 10:09:24 2017 +0100 packet: clarify timestamp overflow The memory mapped packet socket data structure in version 1 through 3 all contain 32-bit second values for the packet time stamps, which makes them suffer from the overflow of time_t in y2038 or y2106 (depending on whether user space interprets the value as signed or unsigned). The implementation uses the deprecated getnstimeofday() function. In order to get rid of that, this changes the code to use ktime_get_real_ts64() as a replacement, documenting the nature of the overflow. As long as the user applications treat the timestamps as unsigned, or only use the difference between timestamps, they are fine, and changing the timestamps to 64-bit wouldn't require a more invasive user space API change. Note: a lot of other APIs suffer from incompatible structures when time_t gets redefined to 64-bit in 32-bit user space, but this one does not. Acked-by: Willem de Bruijn Link: https://lore.kernel.org/lkml/CAF=yD-Jomr-gWSR-EBNKnSpFL46UeG564FLfqTCMNEm-prEaXA@mail.gmail.com/T/#u Signed-off-by: Arnd Bergmann commit 352c912b0a525977a8e6fa1f87c15d9f71943642 Author: Arnd Bergmann Date: Thu Oct 24 16:47:56 2019 +0200 tsacct: add 64-bit btime field As there is only a 32-bit ac_btime field in taskstat and we should handle dates after the overflow, add a new field with the same information but 64-bit width that can hold a full time64_t. Signed-off-by: Arnd Bergmann commit 2d602bf28316e2f61a553f13d279f3d74c2e5189 Author: Arnd Bergmann Date: Thu Oct 24 16:34:25 2019 +0200 acct: stop using get_seconds() In 'struct acct', 'struct acct_v3', and 'struct taskstats' we have a 32-bit 'ac_btime' field containing an absolute time value, which will overflow in year 2106. There are two possible ways to deal with it: a) let it overflow and have user space code deal with reconstructing the data based on the current time, or b) truncate the times based on the range of the u32 type. Neither of them solves the actual problem. Pick the second one to best document what the issue is, and have someone fix it in a future version. Signed-off-by: Arnd Bergmann commit 853bc0ab341b0c99619f83f4060dedcccad77b2a Author: Arnd Bergmann Date: Tue Nov 5 09:39:51 2019 +0100 um: ubd: use 64-bit time_t where possible The ubd code suffers from a possible y2038 overflow on 32-bit architectures, both for the cow header and the os_file_modtime() function. Replace time_t with time64_t to extend the ubd_kern side as much as possible. Whether this makes a difference for the user side depends on the host libc implementation that may use either 32-bit or 64-bit time_t. For the cow file format, the header contains an unsigned 32-bit timestamp, which is good until y2106, passing this through a 'long long' gives us a consistent interpretation between 32-bit and 64-bit um kernels. Signed-off-by: Arnd Bergmann commit 37e86e0fd0403f51d6dd49abd1469361714f6ca4 Author: Arnd Bergmann Date: Fri Oct 25 22:30:39 2019 +0200 xtensa: ISS: avoid struct timeval 'struct timeval' will get removed from the kernel, change the one user in arch/xtensa to avoid referencing it, by using a fixed-length array instead. Acked-by: Max Filippov Signed-off-by: Arnd Bergmann commit 5311f707b49c2b094179704f4df6d9933cc95085 Author: Arnd Bergmann Date: Fri Oct 25 22:28:01 2019 +0200 dlm: use SO_SNDTIMEO_NEW instead of SO_SNDTIMEO_OLD Eliminate one more use of 'struct timeval' from the kernel so we can eventually remove the definition as well. The kernel supports the new format with a 64-bit time_t version of timeval here, so use that instead of the old timeval. Acked-by: Deepa Dinamani Signed-off-by: Arnd Bergmann commit 74b5cab6cc8554d759c3cd5aeba884bd8b12f22e Author: Arnd Bergmann Date: Thu Oct 24 15:31:19 2019 +0200 fat: use prandom_u32() for i_generation Similar to commit 46c9a946d766 ("shmem: use monotonic time for i_generation") we should not use the deprecated get_seconds() interface for i_generation. prandom_u32() is the replacement used in other file systems. Signed-off-by: Arnd Bergmann commit df6a42053513846475ae1fbd224dfbdbcd0c7010 Author: Tvrtko Ursulin Date: Tue Dec 17 14:20:57 2019 +0000 drm/i915/pmu: Ensure monotonic rc6 Avoid rc6 counter going backward in close to 0% RC6 scenarios like: 15.005477996 114,246,613 ns i915/rc6-residency/ 16.005876662 667,657 ns i915/rc6-residency/ 17.006131417 7,286 ns i915/rc6-residency/ 18.006615031 18,446,744,073,708,914,688 ns i915/rc6-residency/ 19.007158361 18,446,744,073,709,447,168 ns i915/rc6-residency/ 20.007806498 0 ns i915/rc6-residency/ 21.008227495 1,440,403 ns i915/rc6-residency/ There are two aspects to this fix. First is not assuming rc6 value zero means GT is asleep since that can also mean GPU is fully busy and we do not want to enter the estimation path in that case. Second is ensuring monotonicity on the estimation path itself. I suspect what is happening is with extremely rapid park/unpark cycles we get no updates on the real rc6 and therefore have to careful not to unconditionally trust use last known real rc6 when creating a new estimation. v2: * Simplify logic by not tracking the estimate but last reported value. Signed-off-by: Tvrtko Ursulin Fixes: 16ffe73c186b ("drm/i915/pmu: Use GT parked for estimating RC6 while asleep") Cc: Chris Wilson Reviewed-by: Chris Wilson # v1 Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191217142057.1000-1-tvrtko.ursulin@linux.intel.com commit 66af4a9ddac62a2614af5ce80169b6421b5c2d95 Merge: be452c4e8d14 c267782c5f0e Author: Daniel Vetter Date: Wed Dec 18 16:19:26 2019 +0100 Merge tag 'du-next-20191218' of git://linuxtv.org/pinchartl/media into drm-next R-Car Display Unit changes: - Color Management Module support - LVDS encoder dual-link support enhancements - R8A77980 support Signed-off-by: Daniel Vetter From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20191218151710.GA13830@pendragon.ideasonboard.com commit b0d0d3de246b1eda0b3050745848e78bbb15626b Author: Chris Packham Date: Wed Oct 30 09:17:26 2019 +1300 power: reset: gpio-restart: don't error on deferral Don't generate an error message when devm_gpiod_get fails with -EPROBE_DEFER. Signed-off-by: Chris Packham Signed-off-by: Sebastian Reichel commit 6db45b06611ce8ebae6952e249257bd45d980ed4 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:42 2019 +0000 staging: wfx: update TODO Update the TODO list of wfx driver with a more precise list of items. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-56-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 4337074be76d853e3677461dd19bd7c1759c55f6 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:41 2019 +0000 staging: wfx: implement cancel_hw_scan() The device provides an API to abort a scan request. Expose this feature to mac80211. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-55-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 3dc67854dfa95f7d3f132988536ace282828378a Author: Jérôme Pouiller Date: Tue Dec 17 16:15:39 2019 +0000 staging: wfx: delayed_link_loss cannot happen Original code allows to detect an BSS loss during a scan and delaying the handling of BSS loss. However, there it is no real problem to just make these two events mutually exclusive (there is just a performance penalty). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-54-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 9699c88a4427d592655977a8cbeae46864df7700 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:38 2019 +0000 staging: wfx: delayed_unjoin cannot happen Original code allows to detect an unjoin request during a scan and delaying the unjoin request. However, it is far easier to just block the unjoin request until the end of the scan request. In fact, it is already the case since scan and unjoin are protected by conf_mutex. So, currently, the handling of delayed_unjoin is just dead code. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-53-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 3827e33d371ed2f4024fd42a4409e1b7af8e0938 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:37 2019 +0000 staging: wfx: workaround bug with "iw scan" mac80211 specification does not forbid hw_scan() to call ieee80211_scan_completed(). However, from userspace point of view, not all applications support this behavior. In particular, the code of iw contains a big fat warning: /* * This code has a bug, which requires creating a separate * nl80211 socket to fix: * It is possible for a NL80211_CMD_NEW_SCAN_RESULTS or * NL80211_CMD_SCAN_ABORTED message to be sent by the kernel * before (!) we listen to it, because we only start listening * after we send our scan request. [...] * Alas, the kernel doesn't do that (yet). */ So, we have to avoid to call ieee80211_scan_completed() from hw_scan() (it's a kind of unwritten rule). This patch relocates the hw_scan() process to a work_struct to fix the problem. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-52-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit d1c015b4ef6f2ab74b19c216cfff07742b7665cf Author: Jérôme Pouiller Date: Tue Dec 17 16:15:35 2019 +0000 staging: wfx: rewrite wfx_hw_scan() Scan requests from mac80211 must be splitted in a few hardware requests (it is necessary to split channels with active scan and channels with passive scan). Current code schedules a work_struct for each hardware request and one delayed_work to handle scan timeout. It is far simpler to run send all the hardware requests synchronously and replace delayed_work with a simple wait_for_completion_timeout(). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-51-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 094ecec9be6096960cb4ae6a6256759bbba7aa0a Author: Jérôme Pouiller Date: Tue Dec 17 16:15:34 2019 +0000 staging: wfx: simplify hif_set_template_frame() usage The structure hif_mib_template_frame come from hardware API. It is not intended to be manipulated in upper layers of the driver. In add, the current code for hif_set_template_frame() is dumb. All the difficult task is left to the caller. So, there is code to factorize here. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-50-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 397f36c1c786b70fa24a27fde7c425fcf34313fa Author: Jérôme Pouiller Date: Tue Dec 17 16:15:33 2019 +0000 staging: wfx: introduce update_probe_tmpl() Simplify wfx_hw_scan() by splitting out the update of the probe request. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-49-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 945ce30aa52beec7eb01f3bcaf564ef60c46554a Author: Jérôme Pouiller Date: Tue Dec 17 16:15:32 2019 +0000 staging: wfx: simplify hif_scan() usage The structures hif_req_start_scan and hif_ssid_def come from hardware API. It is not intended to be manipulated in upper layers of the driver. So, this patch relocate handling of theses structures to hif_scan() (the low level function). This change also allows to drop struct wfx_scan_params. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-48-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 1a53df55346e1381406a6f4d161aa5acfa99a01c Author: Jérôme Pouiller Date: Tue Dec 17 16:15:30 2019 +0000 staging: wfx: drop useless wfx_scan_complete() Since wfx_scan_complete() is now only called from wfx_scan_complete_cb(), it make sense to merge the both functions. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-47-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 7ceb4753ef58185b5a90ccbd3a55373b01a38219 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:29 2019 +0000 staging: wfx: device already handle sleep mode during scan The device is not allowed to enter in sleep mode during scan. However, this is already handled by the device. So driver does not have to care about it. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-46-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 154cca646720017837c811052ac2e106fbbdc8a7 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:28 2019 +0000 staging: wfx: hif_scan() never fails If scan fails, status is returned in hif_ind_scan_cmpl. hif_scan always return a success. So, we can simplify the code. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-45-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 871341db220ab0b63153daf295946137f73e727a Author: Jérôme Pouiller Date: Tue Dec 17 16:15:27 2019 +0000 staging: wfx: simplify hif_set_edca_queue_params() usage The struct hif_req_edca_queue_params comes from hardware API. It is not intended to be manipulated in upper layers of the driver. So, this patch: 1. relocate the handling of this struct in hif_set_edca_queue_params() (the low level function) 2. replace it in wfx_vif by the mac80211 equivalent: struct ieee80211_tx_queue_params Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-44-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 654e369365fda7ed565646ccc5ac6d4f1d4dd6bb Author: Jérôme Pouiller Date: Tue Dec 17 16:15:25 2019 +0000 staging: wfx: remove unnecessary EDCA initialisation mac80211 already call wfx_conf_tx() on every VIF instanciation. So, the driver does not need to do it. Note that current code did dirty things with wvif->edca_params. This struct was initialized, but only 'queue_id' was really used. The other members are only used to store temporary values. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-43-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 7e2b32f54f61cc5ebc9c18d605ee84cef53eb60d Author: Jérôme Pouiller Date: Tue Dec 17 16:15:24 2019 +0000 staging: wfx: drop struct wfx_edca_params Intermediate structure wfx_edca_params does not help. This patch relocates its members directly in struct wfx_vif. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-42-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit adc90758f4d508fa6a462fbc3f67821387a3e2a8 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:23 2019 +0000 staging: wfx: simplify hif_set_pm() usage The struct hif_req_set_pm_mode comes from hardware API. It is not intended to be manipulated in upper layers of the driver. So, this patch relocate the handling of this struct to hif_set_pm() (the low level function). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-41-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit d74d60c3a1784b6333cdfbf919316d353c934352 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:21 2019 +0000 staging: wfx: simplify hif_set_uapsd_info() usage It is useless to keep uapsd_info in struct wfx_vif. This structure can be rebuilt just before to be sent. In add, the struct hif_mib_set_uapsd_information comes from hardware API. It is not intended to be manipulated in upper layers of the driver. So, this patch relocates the handling of this struct to hif_set_uapsd_info() (the low level function). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-40-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 010149e6fbccc48d726afb8e68cdc30c8b703c78 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:20 2019 +0000 staging: wfx: prefer a bitmask instead of an array of boolean It is easier to manipulate a int than an array of booleans. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-39-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit c91ba8c8514307c3c60dc2b1015d379b1d01c809 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:19 2019 +0000 staging: wfx: simplify wfx_conf_tx() Error management of wfx_conf_tx() can be simplified. In add, the hardware command "hif_set_edca_queue_params" never returns any error. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-38-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 8a274dfb59209d0e0bd96f3a7917aceba39b0ca4 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:17 2019 +0000 staging: wfx: fix pm_mode timeout Maximum request time (how long a request wait for the medium) is set in firmware to 512TU Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-37-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 3f97c37063bca3948cbb8a2275f34dba7e86d025 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:16 2019 +0000 staging: wfx: do not try to save call to hif_set_pm() Current code try to not exchange data with device if it is not necessary. However, it seems that the additional code does not provide any gain. So, we prefer to keep a simpler code. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-36-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 50ad848cc6d6c6290a38b62ea60abefb903396d3 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:15 2019 +0000 staging: wfx: drop unnecessary wvif->powersave_mode Power save status is already available in bss_conf. So there is no reason to keep information duplicated in wvif->powersave_mode. In add, type of wvif->powersave_mode is low level struct made to communicate with device. We would like to limit usage of this kind of struct in upper layers of the driver. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-35-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit ad41f7196bd3eafa2e879ec7f3d387a49666f677 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:13 2019 +0000 staging: wfx: remove redundant test while calling wfx_update_pm() Condition about wvif->state and wvif->bss_params.aid is already checked at beginning of wfx_update_pm(). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-34-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 8dd5bb6631949f78c8aff1747f496265a97b1375 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:12 2019 +0000 staging: wfx: drop useless argument from wfx_set_pm() Argument to wfx_set_pm() is always wvif->powersave_mode. So, we can simplify it. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-33-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 97e587bd08939f8b0e315bd1be4beccaf296179d Author: Jérôme Pouiller Date: Tue Dec 17 16:15:11 2019 +0000 staging: wfx: declare wfx_set_pm() static wfx_set_pm() is now only used by sta.c. It can be declared static. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-32-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 155665d87e08814d6e47277be2e706534497c638 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:09 2019 +0000 staging: wfx: firmware already handle powersave mode during scan When user try to launch scan while connected, it is necessary to notify the AP that we cannot receive data (using power save mode). Firmware already handles this automatically so the code in the driver is redundant and can be dropped. By edge effect, hack of scan status in wfx_set_pm() is now useless. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-31-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 536607c0c793540ee53b2242d4f676e0898f9e93 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:08 2019 +0000 staging: wfx: simplify handling of tx_lock in wfx_do_join() In the old days, wfx_do_join() could be called from different contexts. Now that wfx_do_join() is called only from one place, it is cleaner to keep lock and unlock of data inside the function. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-30-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 07c11c18ebb50c4f4b3fb5a40cbce212352b35bf Author: Jérôme Pouiller Date: Tue Dec 17 16:15:07 2019 +0000 staging: wfx: better naming for hif_mib_set_association_mode->greenfield Current name "mixed_or_greenfield_type" does not allow to know if "true" means "mixed" of "greenfield". It is possible to use a better name and drop "enum hif_tx_mode". Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-29-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit ad636ec4f01a06a59433d126c5754127b3157197 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:05 2019 +0000 staging: wfx: better naming for hif_req_join->short_preamble HIF_PREAMBLE_SHORT_LONG12 is never used. So it is possible to change "preamble_type" into a boolean and drop "enum hif_preamble". Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-28-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit c2232d94ac67dc0a76656e8e15ae38a21d326eed Author: Jérôme Pouiller Date: Tue Dec 17 16:15:04 2019 +0000 staging: wfx: improve API of hif_req_join->infrastructure_bss_mode In fact "mode" is a boolean that indicates if IBSS mode is used. This patch fixes the name and uses a more adapted memory representation. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-27-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 48f3ab9d8d4e2f3dab45a43ef48eb6adbe7ee99a Author: Jérôme Pouiller Date: Tue Dec 17 16:15:03 2019 +0000 staging: wfx: fix name of struct hif_req_start_scan_alt The original name did not make any sense. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-26-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 8a222e03997a6c660e8393231bf6811ed2066178 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:01 2019 +0000 staging: wfx: fix typo in "num_i_es" The script that has imported API header has made a mistake "num_i_es". Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-25-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit aedeb963c956ef2298aa2dee62ca2049e307e7b5 Author: Jérôme Pouiller Date: Tue Dec 17 16:15:00 2019 +0000 staging: wfx: fix typo in "num_of_ssi_ds" The script that has imported API headers has made a mistake in "num_of_ssi_ds". Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-24-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 36f7e3acaac6be7da831b9a0c31022954f79216d Author: Jérôme Pouiller Date: Tue Dec 17 16:14:59 2019 +0000 staging: wfx: ensure that received hif messages are never modified There are no real reason to modify the data received from device. So, let's mark the arguments constant. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-23-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 30cfffb776ec5aa5f3f51184ff08f83c06ecb321 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:58 2019 +0000 staging: wfx: ensure that traces never modify arguments There is no reason for a trace to change any bit of the argument. So, let's make sure that is the case by declaring the arguments constant. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-22-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit eddd8585fb46db6fa701efc963a93477591cd736 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:56 2019 +0000 staging: wfx: make conditions easier to read We prefer series of simple boolean conditions than computing bitmasks. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-21-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit faffec8883cc2138fccc7a0c60f26bf9845d6b41 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:55 2019 +0000 staging: wfx: simplify variable assignment Attribute "aborted" and argument "aborted" are both booleans. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-20-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 1380b9397706d1cc14cff48a7f3a6b8aa97ea2ba Author: Jérôme Pouiller Date: Tue Dec 17 16:14:54 2019 +0000 staging: wfx: remove useless include hif_tx.c does not use any struct skb. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-19-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit faa4763ffbce2b7e3a6fab841033d27421317943 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:52 2019 +0000 staging: wfx: use meaningful names for CFG_BYTE_ORDER_* This new naming allows to save a comment. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-18-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 9e25ec9a2c5a0561141075f17a6e4faa4180af22 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:51 2019 +0000 staging: wfx: uniformize naming rule In wfx driver, when a function is used as a struct member, its name is the name of the member prefixed with "wfx_". This patch apply this rule to wfx_spi_remove(). Also remove the useless comment above the function. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-17-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 50e5ac346fa7764fb480932a77c248ee67c407f5 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:48 2019 +0000 staging: wfx: take advantage of IS_ERR_OR_NULL() Obviously, current code can be replaced by IS_ERR_OR_NULL(). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-16-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 42edb537a3bb2b65733eb975b6ae405a9f5b43e9 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:46 2019 +0000 staging: wfx: improve error message on unexpected confirmation When driver receives an unexpected answer from the device, it shows "unsupported HIF ID". That message does not represent the real error. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-15-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 88d54d6e15df476110e38b390862b7c8defb63d0 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:44 2019 +0000 staging: wfx: avoid double warning when no more tx policy are available Currently, number of available tx retry policies is checked two times. Only one is sufficient. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-14-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit b025605cc4462b482db8e75dcb5019fa9a016b29 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:42 2019 +0000 staging: wfx: don't print useless error messages During chip probing, if error does not come from secure boot (for exemple when firmware has been found), others errors probably appears. It is not necessary to say to user that the error does not come from secure boot. So, drop the message saying "no error reported by secure boot". BTW, we take the opportunity to simplify print_boot_status(). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-13-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 46112d557d065f096b4ac41dae9a2be9399a6621 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:41 2019 +0000 staging: wfx: increase SPI bus frequency limit The chip has now proven that it can run at 50MHz on any boards without any problem. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-12-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 983b39337d07c0d80f73af94659098830ae2f864 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:40 2019 +0000 staging: wfx: fix wrong error message The driver checks that the number of retries made by the device is coherent with the rate policy. However, this check make sense only if the device has returned RETRY_EXCEEDED. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-11-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit d3d00313bf464423dfd278978d115d9a75875caf Author: Jérôme Pouiller Date: Tue Dec 17 16:14:38 2019 +0000 staging: wfx: fix hif_set_mfp() with big endian hosts struct hif_mib_protected_mgmt_policy is an array of u8. There is no reason to swap its bytes. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-10-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 8608ecdba5ce98031237add7727f8b9df457e381 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:37 2019 +0000 staging: wfx: detect race condition in WEP authentication Current code has a special case to handle association with WEP. Before to rework the tx data handling, let's try to detect any possible misuse of this code. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-9-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit d1fd97b4d843360863a7a7dcf3c7ea1b46e9f863 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:36 2019 +0000 staging: wfx: ensure that retry policy always fallbacks to MCS0 / 1Mbps When not using HT mode, minstrel always includes 1Mbps as fallback rate. But, when using HT mode, this fallback is not included. Yet, it seems that it could save some frames. So, this patch add it unconditionally. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-8-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 7e1af13225fb0f3c3c75c2b03d9806fecd9f11bb Author: Jérôme Pouiller Date: Tue Dec 17 16:14:34 2019 +0000 staging: wfx: fix rate control handling A tx_retry_policy (the equivalent of a list of ieee80211_tx_rate in hardware API) is not able to include a rate multiple time. So currently, the driver merges the identical rates from the policy provided by minstrel (and it try to do the best choice it can in the associated flags) before to sent it to firmware. Until now, when rates are merged, field "count" is set to max(count1, count2). But, it means that the sum of retries for all rates could be far less than initial number of retries. So, this patch changes the value of field "count" to count1 + count2. Thus, sum of all retries for all rates stay the same. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-7-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit eee5e4c98f307a81c2716ab804e7dc3b66b4c125 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:33 2019 +0000 staging: wfx: firmware does not support more than 32 total retries The sum of all retries for a Tx frame cannot be superior to 32. There are 4 rates at most. So this patch limits number of retries per rate to 8. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 6673f2636b41ccafbe48e12a1c393b57a95f084a Author: Jérôme Pouiller Date: Tue Dec 17 16:14:32 2019 +0000 staging: wfx: use boolean appropriately The field 'uploaded' is used as a boolean, so call it a boolean. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 700e39e2d17649587704afcde50e908ec863f27f Author: Jérôme Pouiller Date: Tue Dec 17 16:14:30 2019 +0000 staging: wfx: fix counter overflow Some weird behaviors were observed when connection is really good and packets are small. It appears that sometime, number of packets in queues can exceed 255 and generate an overflow in field usage_count. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit c594ff7c7cfade844a78484d366c5b4d4dfbf47a Author: Jérôme Pouiller Date: Tue Dec 17 16:14:29 2019 +0000 staging: wfx: fix case of lack of tx_retry_policies In some rare cases, driver may not have any available tx_retry_policies. In this case, the driver asks to mac80211 to stop sending data. However, it seems that a race is possible and a few frames can be sent to the driver. In this case, driver can't wait for free tx_retry_policies since wfx_tx() must be atomic. So, this patch fix this case by sending these frames with the special policy number 15. The firmware normally use policy 15 to send internal frames (PS-poll, beacons, etc...). So, it is not a so bad fallback. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 773b4b54351c0491d4edbfc9caf1ee0231e7c506 Author: Ville Syrjälä Date: Fri Dec 13 21:52:17 2019 +0200 drm/i915: Move stuff from haswell_crtc_disable() into encoder .post_disable() Move all of haswell_crtc_disable() into the encoder .post_disable() hooks. Now we're left with just calling the .disable() and .post_disable() hooks back to back. I chose to move the code into the .post_disable() hook instead of the .disable() hook as most of the sequence is currently implemented in the .post_disable() hook. We should collapse it all down to just one hook and then the encoders can drive the modeset sequence fully. But that may need some further refactoring as we currently call the ddi .post_disable() hook from mst code and we can't just replace that with a call to the ddi .disable() hook. Should also follow up with similar treatment for the enable sequence but let's start here where it's easier. Cc: José Roberto de Souza Cc: Manasi Navare Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191213195217.15168-5-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit f5271ee50d28451d960072737e55d826c7976fc4 Author: Ville Syrjälä Date: Fri Dec 13 21:52:16 2019 +0200 drm/i915: Pass old crtc state to intel_crtc_vblank_off() To make life easier in the future let's pass the old crtc state to intel_crtc_vblank_off() just like we already do for its counterpart intel_crtc_vblank_on(). Cc: José Roberto de Souza Cc: Manasi Navare Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191213195217.15168-4-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit cfb627c448510e07194cd97ec05fce3f7f279069 Author: Ville Syrjälä Date: Fri Dec 13 21:52:15 2019 +0200 drm/i915: Pass old crtc state to skylake_scaler_disable() To make life easier in the future let's pass the old crtc state to skylake_scaler_disable() just like we already do for for its ancestor ironlake_pfit_disable(). Cc: José Roberto de Souza Cc: Manasi Navare Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191213195217.15168-3-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 17bef9baf33913ecb27f85f81b48afeca34946bb Author: Ville Syrjälä Date: Fri Dec 13 21:52:14 2019 +0200 drm/i915: Nuke .post_pll_disable() for DDI platforms HSW+ platforms call encoder .post_disable() and .post_pll_disable() back to back. And since we don't even disable the PLL in between let's just move everything into .post_disable(). intel_dp_mst does forward the .post_disable() call to intel_ddi at the very end of its own .post_disable() hook, so this time MST I shouldn't even break MST by accident. Cc: José Roberto de Souza Cc: Manasi Navare Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191213195217.15168-2-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 6a6d79de4d194c7b8db35be74b9f29863f74f76b Author: Ville Syrjälä Date: Fri Dec 13 21:52:13 2019 +0200 drm/i915: Call hsw_fdi_link_train() directly() Remove the pointless vfunc detour for hsw_fdi_link_train() and just call it directly. Also pass the encoder in so we can nuke the silly encoder loop within. Cc: José Roberto de Souza Cc: Manasi Navare Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191213195217.15168-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 74cb2751d42efc17abdeba8ed3f2c322e41cfad5 Author: Ville Syrjälä Date: Thu Nov 7 16:24:17 2019 +0200 drm/i915: Introduce intel_plane_state_reset() For the sake of symmetry with the crtc stuff let's add a helper to reset the plane state to sane default values. For the moment this only gets caller from the plane init. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191107142417.11107-5-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 979e94c1d64ae961016f5da2118dd46c87826d9e Author: Ville Syrjälä Date: Thu Nov 7 16:24:16 2019 +0200 drm/i915: Introduce intel_crtc_state_reset() We have a few places where we want to reset a crtc state to its default values. Let's add a helper for that. We'll need the new __drm_atomic_helper_crtc_state_reset() helper for this to allow us to just reset the state itself without clobbering the crtc->state pointer. And while at it let's zero out the whole thing, except a few choice member which we'll mark as "invalid". And thanks to this we can now nuke intel_crtc_init_scalers(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191107142417.11107-4-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 6643453987c44d5d37709c3021d21d0e3bb4d5c4 Author: Ville Syrjälä Date: Thu Nov 7 16:24:15 2019 +0200 drm/i915: Introduce intel_crtc_{alloc,free}() We already have alloc/free helpers for planes, add the same for crtcs. The main benefit is we get to move all the annoying state initialization out of the main crtc_init() flow. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191107142417.11107-3-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit f44bfa7fbfbb6ab1642d12565673a70c0e99c320 Author: Ville Syrjälä Date: Thu Nov 7 16:24:14 2019 +0200 drm/i915: s/intel_crtc/crtc/ in intel_crtc_init() Let's get rid of the redundant intel_ prefix on our variables. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191107142417.11107-2-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit ab2dd990f4abfb3897d1180fa39a8b2fbaef2f0c Author: Ville Syrjälä Date: Thu Nov 7 16:24:13 2019 +0200 drm: Add __drm_atomic_helper_crtc_state_reset() & co. Annoyingly __drm_atomic_helper_crtc_reset() does two totally separate things: a) reset the state to defaults values b) assign the crtc->state pointer I just want a) without the b) so let's split out part a) into __drm_atomic_helper_crtc_state_reset(). And of course we'll do the same thing for planes and connectors. v2: Fix conn__state vs. conn_state typo (Lucas) Make code and kerneldoc match for __drm_atomic_helper_plane_state_reset() Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191107142417.11107-1-ville.syrjala@linux.intel.com Reviewed-by: Lucas De Marchi Reviewed-by: Daniel Vetter Acked-by: Daniel Vetter commit 99879121bfbb6a815e4699aabd00ae317ca1d215 Author: Jérôme Pouiller Date: Tue Dec 17 16:14:27 2019 +0000 staging: wfx: fix the cache of rate policies on interface reset Device and driver maintain a cache of rate policies (aka. tx_retry_policy in hardware API). When hif_reset() is sent to hardware, device resets its cache of rate policies. In order to keep driver in sync, it is necessary to do the same on driver. Note, when driver tries to use a rate policy that has not been defined on device, data is sent at 1Mbps. So, this patch should fix abnormal throughput observed sometime after a reset of the interface. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20191217161318.31402-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit ea81896dc98f324ff3fb9b1e74b4915a1beb3296 Author: Mika Westerberg Date: Tue Dec 17 15:33:45 2019 +0300 thunderbolt: Update documentation with the USB4 information Update user's and administrator's guide to mention USB4, how it relates to Thunderbolt and and how it is supported in Linux. While there add the missing SPDX identifier to the document. Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20191217123345.31850-10-mika.westerberg@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e6f818585713efb29d54f732f41291f75046a2c7 Author: Rajmohan Mani Date: Tue Dec 17 15:33:44 2019 +0300 thunderbolt: Add support for USB 3.x tunnels USB4 added a capability to tunnel USB 3.x protocol over the USB4 fabric. USB4 device routers may include integrated SuperSpeed HUB or a function or both. USB tunneling follows PCIe so that the tunnel is created between the parent and the child router from USB3 downstream adapter port to USB3 upstream adapter port over a single USB4 link. This adds support for USB 3.x tunneling and also capability to discover existing USB 3.x tunnels (for example created by connection manager in boot firmware). Signed-off-by: Rajmohan Mani Co-developed-by: Mika Westerberg Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20191217123345.31850-9-mika.westerberg@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit cf29b9afb121494a7aa12dae6eebf81347e0313b Author: Rajmohan Mani Date: Tue Dec 17 15:33:43 2019 +0300 thunderbolt: Add support for Time Management Unit Time Management Unit (TMU) is included in each USB4 router. It is used to synchronize time across the USB4 fabric. By default when USB4 router is plugged to the domain, its TMU is turned off. This differs from Thunderbolt (1, 2 and 3) devices whose TMU is by default configured to bi-directional HiFi mode. Since time synchronization is needed for proper Display Port tunneling this means we need to configure the TMU on USB4 compliant devices. The USB4 spec allows some flexibility on how the TMU can be configured. This makes it possible to enable link power management states (CLx) in certain topologies, where for example DP tunneling is not used. TMU can also be re-configured dynamicaly depending on types of tunnels created over the USB4 fabric. In this patch we simply configure the TMU to be in bi-directional HiFi mode. This way we can tunnel any kind of traffic without need to perform complex steps to re-configure the domain dynamically. We can add more fine-grained TMU configuration later on when we start enabling CLx states. Signed-off-by: Rajmohan Mani Co-developed-by: Mika Westerberg Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20191217123345.31850-8-mika.westerberg@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit aa43a9dcf7fcb71f34689bc63cdfb3464d2bebbb Author: Rajmohan Mani Date: Tue Dec 17 15:33:42 2019 +0300 thunderbolt: Make tb_switch_find_cap() available to other files We need to find switch capabilities in order to implement TMU support so make it available to other files as well. Signed-off-by: Rajmohan Mani Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20191217123345.31850-7-mika.westerberg@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 690ac0d20d4022bb3c7d84e0e3760eb40aa8028d Author: Mika Westerberg Date: Tue Dec 17 15:33:41 2019 +0300 thunderbolt: Update Kconfig entries to USB4 Since the driver now supports USB4 which is the standard going forward, update the Kconfig entry to mention this and rename the entry from CONFIG_THUNDERBOLT to CONFIG_USB4 instead to help people to find the correct option if they want to enable USB4. Also do the same for Thunderbolt network driver. Signed-off-by: Mika Westerberg Cc: David S. Miller Link: https://lore.kernel.org/r/20191217123345.31850-6-mika.westerberg@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b04079837b2094f09e145676eec4b9a56ae8a6aa Author: Mika Westerberg Date: Tue Dec 17 15:33:40 2019 +0300 thunderbolt: Add initial support for USB4 USB4 is the public specification based on Thunderbolt 3 protocol. There are some differences in register layouts and flows. In addition to PCIe and DP tunneling, USB4 supports tunneling of USB 3.x. USB4 is also backward compatible with Thunderbolt 3 (and older generations but the spec only talks about 3rd generation). USB4 compliant devices can be identified by checking USB4 version field in router configuration space. This patch adds initial support for USB4 compliant hosts and devices which enables following features provided by the existing functionality in the driver: - PCIe tunneling - Display Port tunneling - Host and device NVM firmware upgrade - P2P networking This brings the USB4 support to the same level that we already have for Thunderbolt 1, 2 and 3 devices. Note the spec talks about host and device "routers" but in the driver we still use term "switch" in most places. Both can be used interchangeably. Co-developed-by: Rajmohan Mani Signed-off-by: Rajmohan Mani Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20191217123345.31850-5-mika.westerberg@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit be281368f29797cf4b318ad890673ce96bb9251e Author: Pedro Vanzella Date: Sat Oct 26 19:25:06 2019 -0300 hid-logitech-hidpp: read battery voltage from newer devices Newer Logitech mice report their battery voltage through feature 0x1001 instead of the battery levels through feature 0x1000. When the device is brought up and we try to query the battery, figure out if it supports the old or the new feature. If it supports the new feature, record the feature index and read the battery voltage and its charge status. The device will respond with three bytes: the first two are its voltage, and the last one is a bitset, reporting if the battery is charging, fast or slow, in critical level or discharging. If everything went correctly, record the fact that we're capable of querying battery voltage. Note that the protocol only gives us the current voltage in mV. We store that as-is, but when queried, we report it in uV as expected by sysfs. Like we do for other ways of interacting with the battery for other devices, refresh the battery status and notify the power supply subsystem of the changes in voltage and status. Since there are no known devices which implement both the old and the new battery feature, we make sure to try the newer feature first and only fall back to the old one if that fails. Signed-off-by: Pedro Vanzella Signed-off-by: Benjamin Tissoires commit 04bd68171e01843284accbcfaa4cd2c50d1707ed Author: Adrian Freund Date: Fri Oct 25 22:59:29 2019 +0200 HID: logitech: Add MX Master 3 Mouse This patch adds support for the Logitech MX Master 3 Mouse using the Logitech Unifying Receiver and Bluetooth LE. Signed-off-by: Adrian Freund Signed-off-by: Benjamin Tissoires commit 0da0a63b7cbabe9d930015e94e890c82cab7b3d3 Author: Mazin Rezk Date: Sun Oct 27 17:44:13 2019 +0000 HID: logitech-hidpp: Support WirelessDeviceStatus connect events This patch allows hidpp_report_is_connect_event to support WirelessDeviceStatus connect events. The WirelessDeviceStatus feature index is stored in hidpp_device when probed. The connect event's fap feature_index is compared against it if the device supports it. Signed-off-by: Mazin Rezk Signed-off-by: Benjamin Tissoires commit c2a932717a5106db97f3480b040b8f74a1761889 Author: Mazin Rezk Date: Sun Oct 27 17:44:06 2019 +0000 HID: logitech-hidpp: Support translations from short to long reports This patch allows short reports to be translated into long reports. hidpp_validate_device now returns a u8 instead of a bool which represents the supported reports. The corresponding bits (i.e. HIDPP_REPORT_*_SUPPORTED) are set if an HID++ report is supported. If a short report is being sent and the device does not support it, it is instead sent as a long report. This patch also introduces support for the MX Master (b01e and b012). Signed-off-by: Mazin Rezk Signed-off-by: Benjamin Tissoires commit 210e9f56e9e12472741b949950f9efcebf350750 Author: Mika Westerberg Date: Tue Dec 17 15:33:39 2019 +0300 thunderbolt: Populate PG field in hot plug acknowledgment packet USB4 1.0 section 6.4.2.7 specifies a new field (PG) in notification packet that is sent as response of hot plug/unplug events. This field tells whether the acknowledgment is for plug or unplug event. This needs to be set accordingly in order the router to send further hot plug notifications. To make it simpler we fill the field unconditionally. Legacy devices do not look at this field so there should be no problems with them. While there rename tb_cfg_error() to tb_cfg_ack_plug() and update the log message accordingly. The function is only used to ack plug/unplug events. Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20191217123345.31850-4-mika.westerberg@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 4deb200d34a779aa336ddcd213e39eb6104eb78a Author: Mika Westerberg Date: Tue Dec 17 15:33:38 2019 +0300 thunderbolt: Call tb_eeprom_get_drom_offset() from tb_eeprom_read_n() We are going to re-use tb_drom_read() for USB4 DROM reading as well. USB4 has separate router operations for this which does not need the drom_offset. Therefore we move call to tb_eeprom_get_drom_offset() into tb_eeprom_read_n() where it is needed. While there change return -ENOSYS to -ENODEV because the former is only supposed to be used with system calls (invalid syscall nr). Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20191217123345.31850-3-mika.westerberg@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 386e5e29d81cd088a1111277a18f13d571a6cea5 Author: Mika Westerberg Date: Tue Dec 17 15:33:37 2019 +0300 thunderbolt: Make tb_find_port() available to other files We will be needing this when adding initial USB4 support so make it available to other files in the driver as well. We also rename it to tb_switch_find_port() to follow conventions used in switch.c. No functional changes. Signed-off-by: Mika Westerberg Link: https://lore.kernel.org/r/20191217123345.31850-2-mika.westerberg@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 02a93929e3e45686c0b547389c50a4dfa903daf5 Author: Zumeng Chen Date: Mon Sep 23 17:47:09 2019 +0800 ARM: dts: zynq: enablement of coresight topology This patch is to build the coresight topology structure of zynq-7000 series according to the docs of coresight and userguide of zynq-7000. Signed-off-by: Zumeng Chen Signed-off-by: Quanyang Wang Reviewed-by: Mathieu Poirier Signed-off-by: Michal Simek commit 82cfd2e62b354840af6a045e084f6e9e7c49584d Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:53 2019 +0000 serial_core: Remove SUPPORT_SYSRQ ifdeffery No one defines it anymore. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-55-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 45896c7e6ed41acbeb44dc6943dc1dbdc7d5de18 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:52 2019 +0000 tty/serial: Migrate zs to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: "Maciej W. Rozycki" Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-54-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit ebaa8c6f22c6a4498202f498353957adf4ddfb41 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:51 2019 +0000 tty/serial: Migrate xilinx_uartps to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Michal Simek Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-53-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 6e021166abd530678fba7a36b9ec105d86d3699c Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:50 2019 +0000 tty/serial: Migrate vt8500_serial to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Tony Prisk Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-52-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 0889d23e9a0a8efbc2cd686c6e730dabe08af21d Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:49 2019 +0000 tty/serial: Migrate vr41xx_siu to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-51-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 06129311c68cf381444f95d2baac956e9562fc3b Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:48 2019 +0000 tty/serial: ucc_uart: Remove ifdef SUPPORT_SYSRQ ucc_uart doesn't seem to support console over itself, so maybe it can be deleted with uart_handle_sysrq_char() from the file. Cc: Timur Tabi Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-50-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 22cf28a84889ca7f08e7a89c789b4afa566e76de Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:47 2019 +0000 tty/serial: Migrate sunzilog to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-49-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 831cb96855cf28d5c0df2abb10fa4d1a40d669a2 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:36 2019 +0000 tty/serial: Migrate samsung_tty to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-38-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 5e637d2be26385286748f494fdca30079bbe916f Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:46 2019 +0000 tty/serial: Migrate sunsu to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-48-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit cd8d71900f99c90ffd3bce65780dec5ff2b9534f Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:45 2019 +0000 tty/serial: Migrate sunsab to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-47-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit b071126bd8323c478ca1464d065bb1a254b15310 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:44 2019 +0000 tty/serial: Migrate sunhv to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-46-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 9feedaa7f37b2734536562eb1bc8e2d55e9a38ee Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:43 2019 +0000 tty/serial: Migrate stm32-usart to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: linux-arm-kernel@lists.infradead.org Cc: linux-stm32@st-md-mailman.stormreply.com Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-45-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 39e17343d06afe83e54b401cc4d2689418815654 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:42 2019 +0000 tty/serial: Migrate st-asc to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Patrice Chotard Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-44-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 34bccb1d391e5bdc407949dd047952d06e3392db Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:41 2019 +0000 tty/serial: Migrate sprd_serial to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Baolin Wang Cc: Orson Zhai Signed-off-by: Dmitry Safonov Acked-by: Chunyan Zhang Link: https://lore.kernel.org/r/20191213000657.931618-43-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit dc9a325426f1113e798a725ec031fbfbbb9a7646 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:40 2019 +0000 tty/serial: Migrate sh-sci to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-42-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 6661b21d25e4db23f717f481debdaaf10262094c Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:39 2019 +0000 tty/serial: Migrate serial_txx9 to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-41-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 212d9371fe217ba703cc639da9130a7299657c5e Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:38 2019 +0000 tty/serial: Migrate sccnxp to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-40-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit b2fc67b9f92dc6cf200e98f4ac9c02c94b5753b1 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:37 2019 +0000 tty/serial: Migrate sb1250-duart to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-39-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 386ae3b753ad3be39a3b2dd33a0aaed799f01ad0 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:35 2019 +0000 tty/serial: Migrate sa1100 to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-37-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 8f122698a64b877d7cf6918210598c02d4ec1a63 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:34 2019 +0000 tty/serial: Migrate qcom_geni_serial to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-36-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 31b3bee44ef2ec932de54d0dd6358f43ebd5c18f Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:33 2019 +0000 tty/serial: Migrate pxa to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-35-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit fd6dbe4e7949d17317b57465bb1e9ed7cd18051a Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:31 2019 +0000 tty/serial: Migrate pnx8xxx_uart to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-33-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit f5e95c4fe42ff39850a459e620f0d91dd7cf2df0 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:30 2019 +0000 tty/serial: Migrate pmac_zilog to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-32-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit eff0a31d4b08797197718d2ecfa34f5f088e085c Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:29 2019 +0000 tty/serial: pmac_zilog: Don't check port->sysrq uart_handle_sysrq_char() already handles it. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-31-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit bb3ecd968b356f7a1399a7fe1fe98f3ab61632a9 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:28 2019 +0000 tty/serial: Migrate pch_uart to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-30-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit b062e4aab70b872e2387cd7946221407e503cdd4 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:27 2019 +0000 tty/serial: Migrate omap-serial to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-29-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 2deed95820e52be956f5b49e5edb52312b9faeb5 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:26 2019 +0000 tty/serial: Migrate mxs-auart to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Fabio Estevam Cc: NXP Linux Team Cc: Pengutronix Kernel Team Cc: Shawn Guo Cc: Sascha Hauer Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-28-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit b4088e830bd9f431db655af4b581d495a79709e2 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:25 2019 +0000 tty/serial: Migrate mux to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-27-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 804ca1df0914d409eca2c31b40edcb30f69cce1a Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:24 2019 +0000 tty/serial: Migrate msm_serial to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-26-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 7cbfd6a0230d4bc5aeceb48241f63b037ecc0d81 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:23 2019 +0000 tty/serial: mpc52xx_uart: Don't zero port->sysrq uart_handle_sysrq_char() already does it. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-25-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit ba4508db5ba27482ef856775f02de0ac81a9c40a Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:22 2019 +0000 tty/serial: Migrate mpc52xx_uart to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-24-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 581a367e4851c4e649198e3298ce562563b05e15 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:21 2019 +0000 tty/serial: Migrate milbeaut_usio to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-23-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit dca3ac8d3bc9436eb5fd35b80cdcad762fbfa518 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:20 2019 +0000 tty/serial: Migrate meson_uart to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Kevin Hilman Cc: linux-arm-kernel@lists.infradead.org Cc: linux-amlogic@lists.infradead.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-22-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 79307e053f7fed68990139ed5dd898f292049eb3 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:19 2019 +0000 tty/serial: Migrate ip22zilog to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-21-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit aa3479d2e677cddb60686afec0c4c1d4ff7f7178 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:18 2019 +0000 tty/serial: Migrate imx to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Fabio Estevam Cc: NXP Linux Team Cc: Pengutronix Kernel Team Cc: Sascha Hauer Cc: Shawn Guo Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-20-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 4d9ec1c0ced6e03a9cab04986f88ac66d6ef984e Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:17 2019 +0000 tty/serial: Migrate fsl_lpuart to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-19-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 4151bbed79f98b644305ecf4a8d11eddada7fa3b Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:16 2019 +0000 tty/serial: Migrate fsl_linflexuart to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-18-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 79bb662548f3b93b0527696da271a672bb02e7b3 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:15 2019 +0000 tty/serial: Migrate efm32-uart to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: "Uwe Kleine-König" Cc: Pengutronix Kernel Team Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-17-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 881bdb443b5b5fffe918156fc3a751ecf3d1dbd3 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:14 2019 +0000 tty/serial: Migrate dz to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: "Maciej W. Rozycki" Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-16-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 410090d2f40abdfe076263bb8aea8c7815a2b873 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:13 2019 +0000 tty/serial: Migrate cpm_uart to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-15-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 76f82db9730b600f4f3d0550d24262517cdb554e Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:12 2019 +0000 tty/serial: Migrate clps711x to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Alexander Shiyan Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-14-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 078abd98d7f81f3a2ad2a0f6884ea0ab2f556cfe Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:11 2019 +0000 tty/serial: Migrate atmel_serial to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. While at it, remove forward-declaration of atmel_console - it wasn't needed even at the moment the driver was first time introduced: commit 1e6c9c2878c9 ("[ARM] 3242/2: AT91RM9200 support for 2.6 (Serial)") Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: Richard Genoud Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-13-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 933505e9b41759fb7cb8a1b648553d7c00a8bf1c Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:10 2019 +0000 tty/serial: Migrate arc_uart to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Vineet Gupta Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-12-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 3db3cca6f052f884b5e3f1d1ee520b124bb5f816 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:09 2019 +0000 tty/serial: Migrate apbuart to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-11-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 5f99fca9305bd23f0e31c5ba5dce01d61966996a Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:08 2019 +0000 tty/serial: Migrate amba-pl01* to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Russell King Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-10-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 4225eb0ae14811e6061501d4071a4a0a1790339b Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:07 2019 +0000 tty/serial: Migrate 8250_port to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-9-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit a4424b90d3666b826ac234d7f77d158b9b893570 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:06 2019 +0000 tty/serial: Migrate 8250_omap to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-8-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 24036fb75422e066a58d12c89a5ec8776f2045d1 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:05 2019 +0000 tty/serial: Migrate bcm63xx_uart to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Florian Fainelli Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-7-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit d68fefdd5b5f107403568c8a4650e858132bd83a Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:04 2019 +0000 tty/serial: Migrate 8250_fsl to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. In contrast to 8250/8250_of, legacy_serial on powerpc does fill (struct plat_serial8250_port). The reason is likely that it's done on device_initcall(), not on probe. So, 8250_core is not yet probed. Propagate value from platform_device on 8250 probe - in case powepc legacy driver it's initialized on initcall, in case 8250_of it will be initialized later on of_platform_serial_setup(). Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-6-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit c3a4e5527351c73b665596d4dd27ce482e93f50c Author: Johan Hovold Date: Wed Dec 18 14:11:54 2019 +0100 Revert "serdev: simplify Makefile" This reverts commit 54edb425346a4d5e17f7e54e8c97c0d0eac26315. The offending commit caused serdev core to always be built-in, something which breaks the build of dependent modules when serdev is being built as a module: ERROR: "__serdev_device_driver_register" [drivers/gnss/gnss-ubx.ko] undefined! ... make[2]: *** [/home/johan/work/omicron/src/linux/scripts/Makefile.modpost:94: __modpost] Error 1 Reported-by: kbuild test robot Signed-off-by: Johan Hovold Cc: Uwe Kleine-König Link: https://lore.kernel.org/r/20191218131154.13702-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6dbd54e4154dfe386b3333687de15be239576617 Author: Greg Kroah-Hartman Date: Wed Dec 18 08:04:26 2019 +0100 Revert "tty/serial: atmel: fix out of range clock divider handling" This reverts commit 751d0017334db9c4d68a8909c59f662a6ecbcec6. The wrong commit got added to the tty-next tree, the correct one is in the tty-linus branch. Reported-by: Stephen Rothwell Cc: David Engraf Signed-off-by: Greg Kroah-Hartman commit 2253ed4b36dc876d1598c4dab5587e537ec68c34 Author: Linus Walleij Date: Tue Dec 17 15:39:52 2019 +0100 mmc: mmci: Support any block sizes for ux500v2 and qcom variant For the ux500v2 variant of the PL18x block, any block sizes are supported. This is necessary to support some SDIO transfers. This also affects the QCOM MMCI variant and the ST micro variant. For Ux500 an additional quirk only allowing DMA on blocks that are a power of two is needed. This might be a bug in the DMA engine (DMA40) or the MMCI or in the interconnect, but the most likely is the MMCI, as transfers of these sizes work fine for other devices using the same DMA engine. DMA works fine also with SDIO as long as the blocksize is a power of 2. This patch has proven necessary for enabling SDIO for WLAN on PostmarketOS-based Ux500 platforms. What we managed to test in practice is Broadcom WiFi over SDIO on the Ux500 based Samsung GT-I8190 and GT-S7710. This WiFi chip, BCM4334 works fine after the patch. Before this patch: brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4334-sdio for chip BCM4334/3 mmci-pl18x 80118000.sdi1_per2: unsupported block size (60 bytes) brcmfmac: brcmf_sdiod_ramrw: membytes transfer failed brcmfmac: brcmf_sdio_download_code_file: error -22 on writing 434236 membytes at 0x00000000 brcmfmac: brcmf_sdio_download_firmware: dongle image file download failed After this patch: brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4334/3 wl0: Nov 21 2012 00:21:28 version 6.10.58.813 (B2) FWID 01-0 Bringing up networks, discovering networks with "iw dev wlan0 scan" and connecting works fine from this point. This patch is inspired by Ulf Hansson's patch http://www.spinics.net/lists/linux-mmc/msg12160.html As the DMA engines on these platforms may now get block sizes they were not used to before, make sure to also respect if the DMA engine says "no" to a transfer. Make a drive-by fix for datactrl_blocksz, misspelled. Cc: Ludovic Barre Cc: Brian Masney Cc: Stephan Gerhold Cc: Niklas Cassel Cc: Russell King Signed-off-by: Ulf Hansson Signed-off-by: Srinivas Kandagatla Signed-off-by: Linus Walleij Tested-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191217143952.2885-1-linus.walleij@linaro.org commit 67d7d920b3f0dc72651945ba6256e7777a5fe4d1 Author: Yangtao Li Date: Sun Dec 15 17:51:20 2019 +0000 mmc: au1xmmc: switch to platform_get_irq platform_get_resource(pdev, IORESOURCE_IRQ) is not recommended for requesting IRQ's resources, as they can be not ready yet. Using platform_get_irq() instead is preferred for getting IRQ even if it was not retrieved earlier. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20191215175120.3290-13-tiny.windzz@gmail.com Signed-off-by: Ulf Hansson commit bc068d38c905ddfca017fa858d38cc8a369f13f5 Author: Yangtao Li Date: Sun Dec 15 17:51:19 2019 +0000 mmc: mtk-sd: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20191215175120.3290-12-tiny.windzz@gmail.com Signed-off-by: Ulf Hansson commit 0a337eb168d6cbb85f6b4eb56d1be55e24c80452 Author: Yangtao Li Date: Sun Dec 15 17:51:18 2019 +0000 mmc: mvsdio: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20191215175120.3290-11-tiny.windzz@gmail.com Signed-off-by: Ulf Hansson commit cb064b50227d158d7c415784ab49f4d5fd1e34ca Author: Yangtao Li Date: Sun Dec 15 17:51:17 2019 +0000 mmc: sdhci-msm: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20191215175120.3290-10-tiny.windzz@gmail.com Signed-off-by: Ulf Hansson commit 75f6eacde8aeff067a5eb3faecf778dea796ee01 Author: Yangtao Li Date: Sun Dec 15 17:51:16 2019 +0000 mmc: sdhci-milbeaut: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20191215175120.3290-9-tiny.windzz@gmail.com Signed-off-by: Ulf Hansson commit 4942ae0e5fb371491e5fc03dd3fb5846e37de86e Author: Yangtao Li Date: Sun Dec 15 17:51:15 2019 +0000 mmc: sdhci_am654: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20191215175120.3290-8-tiny.windzz@gmail.com Signed-off-by: Ulf Hansson commit dbf90a178cdcfe255f6e67ecfcf720d1592efb60 Author: Yangtao Li Date: Sun Dec 15 17:51:14 2019 +0000 mmc: sdhci_f_sdh30: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20191215175120.3290-7-tiny.windzz@gmail.com Signed-off-by: Ulf Hansson commit 34ac4509f22b747fa7fbca1c5792604aef0a522b Author: Yangtao Li Date: Sun Dec 15 17:51:13 2019 +0000 mmc: sh_mmcif: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Link: https://lore.kernel.org/r/20191215175120.3290-6-tiny.windzz@gmail.com Signed-off-by: Ulf Hansson commit b47c43f68e465782444e8be88650b54c8fd10ed4 Author: Yangtao Li Date: Sun Dec 15 17:51:12 2019 +0000 mmc: sdhci-spear: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20191215175120.3290-5-tiny.windzz@gmail.com Signed-off-by: Ulf Hansson commit 09938ce84c94b7ebf90c85690eb8de7c657465f4 Author: Yangtao Li Date: Sun Dec 15 17:51:11 2019 +0000 mmc: sdhci-s3c: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20191215175120.3290-4-tiny.windzz@gmail.com Signed-off-by: Ulf Hansson commit e10e54a6c5060cb03ccea06e0d00ea1c5b8bfd03 Author: Yangtao Li Date: Sun Dec 15 17:51:10 2019 +0000 mmc: meson-mx-sdio: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Link: https://lore.kernel.org/r/20191215175120.3290-3-tiny.windzz@gmail.com Signed-off-by: Ulf Hansson commit 1cfb7c28b06b06841b50b1f76a93e039e708fb1d Author: Yangtao Li Date: Sun Dec 15 17:51:09 2019 +0000 mmc: tmio: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Link: https://lore.kernel.org/r/20191215175120.3290-2-tiny.windzz@gmail.com Signed-off-by: Ulf Hansson commit c5c52c373096e225ee3cb7ea3799b2d46415f858 Author: Yangtao Li Date: Sun Dec 15 17:51:08 2019 +0000 mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20191215175120.3290-1-tiny.windzz@gmail.com Signed-off-by: Ulf Hansson commit d0b75c9169fd818979d7122eaff9c3ff20128b7a Merge: 66a83feb59d9 75d27ea1abf7 Author: Ulf Hansson Date: Wed Dec 18 14:44:24 2019 +0100 Merge branch 'fixes' into next commit 66a83feb59d960cb4df99c54266f07dc92bf60d0 Author: Yangbo Lu Date: Mon Dec 16 17:19:11 2019 +0800 mmc: sdhci-of-esdhc: use 1/2 periperhal clock for ls1088a The eSDHC on LS1088A platform uses 1/2 peripheral clock as base clock. Signed-off-by: Yangbo Lu Link: https://lore.kernel.org/r/20191216091911.14840-1-yangbo.lu@nxp.com Signed-off-by: Ulf Hansson commit ee157abebc0c8ddb1de9c7cb2b8d8a06c69ce17d Author: Ludovic Barre Date: Wed Dec 11 14:39:34 2019 +0100 mmc: mmci: add threaded irq to abort DPSM of non-functional state The stm32_sdmmc variant has build-in support for datatimeout for R1B requests. If a corresponding IRQ is raised, this triggers the DPSM to stay busy and remains in a non-functional state. Only a reset can bring it back to a functional state. Because a reset must be issued from non-atomic context, let's defer this to be managed from a threaded IRQ handler. Besides the reset, the threaded handler also calls mmc_request_done(), to finally complete the request. Signed-off-by: Ludovic Barre Link: https://lore.kernel.org/r/20191211133934.16932-1-ludovic.Barre@st.com [Ulf: A few minor updates to the changelog/comments] Signed-off-by: Ulf Hansson commit 81ff52b705775433a955b2746d37b87bdc89a3d0 Author: Chris Wilson Date: Wed Dec 18 09:35:04 2019 +0000 drm/i915/gt: Ratelimit display power w/a For very light workloads that frequently park, acquiring the display power well (required to prevent the dmc from trashing the system) takes longer than the execution. A good example is the igt_coherency selftest, which is slowed down by an order of magnitude in the worst case with powerwell cycling. To prevent frequent cycling, while keeping our fast soft-rc6, use a timer to delay release of the display powerwell. Fixes: 311770173fac ("drm/i915/gt: Schedule request retirement when timeline idles") References: https://gitlab.freedesktop.org/drm/intel/issues/848 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191218093504.3477048-1-chris@chris-wilson.co.uk commit d0052ad90e712aaa76190e05fc1b0a8acb3b449e Author: Michał Mirosław Date: Wed Dec 11 03:40:56 2019 +0100 mmc: core: Remove mmc_gpiod_request_*(invert_gpio) Now that invert_gpio arguments are unused, let's remove them. Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/64d766d1f8af2e22bce32f4ffa453f7234207ad6.1576031637.git.mirq-linux@rere.qmqm.pl Signed-off-by: Ulf Hansson commit 0f7c815d83a20dbae8b736331eb1ffd0bc0497d7 Author: Michał Mirosław Date: Wed Dec 11 03:40:56 2019 +0100 mmc: core: Rework cd-gpio handling There are a few places around the code that invert inverted and possibly inverted CD line. That's really confusing. Squash them all into one place in mmc_gpiod_request_cd(). MMC_CAP2_CD_ACTIVE_HIGH is used analogously to WP line: in GPIO mode it is used only at probe time to switch polarity, for native mode it is left as is. Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/db189b715596d63caf8c6a088bddc71dd69a879b.1576031637.git.mirq-linux@rere.qmqm.pl Signed-off-by: Ulf Hansson commit 9073d10b098973519044f5fcdc25586810b435da Author: Michał Mirosław Date: Wed Dec 11 03:40:55 2019 +0100 mmc: core: Rework wp-gpio handling Use MMC_CAP2_RO_ACTIVE_HIGH flag as indicator if GPIO line is to be inverted compared to DT/platform-specified polarity. The flag is not used after init in GPIO mode anyway. No functional changes intended. Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/a60f563f11bbff821da2fa2949ca82922b144860.1576031637.git.mirq-linux@rere.qmqm.pl Signed-off-by: Ulf Hansson commit d3a5bcb4a17f1ad072484bb92c42519ff3aba6e1 Author: Michał Mirosław Date: Wed Dec 11 03:40:55 2019 +0100 gpio: add gpiod_toggle_active_low() Add possibility to toggle active-low flag of a gpio descriptor. This is useful for compatibility code, where defaults are inverted vs DT gpio flags or the active-low flag is taken from elsewhere. Acked-by: Linus Walleij Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/7ce0338e01ad17fa5a227176813941b41a7c35c1.1576031637.git.mirq-linux@rere.qmqm.pl Signed-off-by: Ulf Hansson commit da42104f589d979bbe402703fd836cec60befae1 Author: Chris Wilson Date: Wed Dec 18 10:40:43 2019 +0000 drm/i915: Hold reference to intel_frontbuffer as we track activity Since obj->frontbuffer is no longer protected by the struct_mutex, as we are processing the execbuf, it may be removed. Mark the intel_frontbuffer as rcu protected, and so acquire a reference to the struct as we track activity upon it. Closes: https://gitlab.freedesktop.org/drm/intel/issues/827 Fixes: 8e7cb1799b4f ("drm/i915: Extract intel_frontbuffer active tracking") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: # v5.4+ Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191218104043.3539458-1-chris@chris-wilson.co.uk commit e133f6eac3fa6591384133b2270b24376813d231 Author: Randy Dunlap Date: Tue Dec 3 16:06:47 2019 -0800 x86/Kconfig: Correct spelling and punctuation End a sentence with a period (aka full stop) in Kconfig help text. Fix minor NUMA-related Kconfig text: - Use capital letters for NUMA acronym. - Hyphenate Non-Uniform. [ bp: Merge into a single patch. ] Signed-off-by: Randy Dunlap Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: X86 ML Link: https://lkml.kernel.org/r/443ed0a8-783d-6c7c-3258-e1c44df03fd7@infradead.org commit 2c3039c14380bc7b857f7afaaed68a0b8176c3db Author: Michał Mirosław Date: Mon Dec 9 19:37:05 2019 +0100 mmc: sdhci-s3c: remove unused ext_cd_gpio field Signed-off-by: Michał Mirosław Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/3f12c2deaae9e77a5e7ab8415db7751a27bc3b98.1575916477.git.mirq-linux@rere.qmqm.pl Signed-off-by: Ulf Hansson commit f630d0114d171640f62a81b1cf3d4da01617ba89 Author: Chuhong Yuan Date: Fri Dec 6 15:54:08 2019 +0800 mmc: cavium: Add missed pci_release_regions The driver forgets to call pci_release_regions() in probe failure and remove. Add the missed calls to fix it. Signed-off-by: Chuhong Yuan Link: https://lore.kernel.org/r/20191206075408.18355-1-hslester96@gmail.com Signed-off-by: Ulf Hansson commit cad8c44a9ff0da507f1e225e0ad342d69dbbc4cd Author: Fabrizio Castro Date: Wed Nov 13 15:51:32 2019 +0000 dt-bindings: display: bridge: lvds-codec: Absorb thine, thc63lvdm83d.txt At this point in time, compatible string "thine,thc63lvdm83d" is backed by the lvds-codec driver, and the documentation contained in thine,thc63lvdm83d.txt is basically the same as the one contained in lvds-codec.yaml (generic fallback compatible string aside), therefore absorb thine,thc63lvdm83d.txt. Signed-off-by: Fabrizio Castro Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/ <1573660292-10629-14-git-send-email-fabrizio.castro@bp.renesas.com commit b7de4ba7dbe962d38768e0396f7acd11eff7628b Author: Fabrizio Castro Date: Wed Nov 13 15:51:28 2019 +0000 dt-bindings: display: bridge: lvds-codec: Document ti, ds90cf384a The DS90CF384A from TI is a transparent LVDS receiver (decoder), and therefore it is compatible with the lvds-codec driver and bindings. Document the ti,ds90cf384a compatible string with the dt-bindings. No driver change required. Signed-off-by: Fabrizio Castro Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1573660292-10629-10-git-send-email-fabrizio.castro@bp.renesas.com commit 575af8ecd1943d432ede9891e1419d001fa67c5d Author: Fabrizio Castro Date: Wed Nov 13 15:51:27 2019 +0000 dt-bindings: display: bridge: Repurpose lvds-encoder In an effort to repurpose lvds-encoder.c to also serve the function of LVDS decoders, we ended up defining a new "generic" compatible string ("lvds-decoder"), therefore adapt the dt schema to allow for the new compatible string. Signed-off-by: Fabrizio Castro Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart [narmstrong: fixed port descriptions as acked with lpinchart] Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1573660292-10629-9-git-send-email-fabrizio.castro@bp.renesas.com commit e156c6176c9d6e69e166fb20e3b4e9f85ead8d77 Author: Enrico Weigelt Date: Tue Dec 3 12:33:14 2019 +0100 Documentation/x86/boot: Fix typo s/Fileds/Fields/g Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191203113314.26810-1-info@metux.net commit 319d8e9814c4da2c6ea0a8e080b3ffa517542daf Author: Fabrizio Castro Date: Wed Nov 13 15:51:26 2019 +0000 drm/bridge: lvds-codec: Simplify panel DT node localisation The probe function needs to get ahold of the panel device tree node, and it achieves that by using a combination of of_graph_get_port_by_id, of_get_child_by_name, and of_graph_get_remote_port_parent. We can achieve the same goal by replacing those calls with a call to of_graph_get_remote_node these days. Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1573660292-10629-8-git-send-email-fabrizio.castro@bp.renesas.com commit e6f607bb2ba8aac719cf6abdf1d9dd8dae0c63e5 Author: Fabrizio Castro Date: Wed Dec 18 01:07:53 2019 +0200 drm/bridge: lvds-codec: Add "lvds-decoder" support Add support for transparent LVDS decoders by adding a new compatible string ("lvds-decoder") to the driver. This patch also adds member connector_type to struct lvds_codec, and that's because LVDS decoders have a different connector type from LVDS encoders. We fill this new member up with the data matching the compatible string. Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart [Fix pointer to int cast warning] Signed-off-by: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20191217230753.2999-1-laurent.pinchart+renesas@ideasonboard.com commit 0d60131a3b5dcb4c6980eb30cbca3c6fb62d7b6f Author: Fabrizio Castro Date: Wed Nov 13 15:51:24 2019 +0000 drm/bridge: Repurpose lvds-encoder.c lvds-encoder.c implementation is also suitable for LVDS decoders, not just LVDS encoders. Instead of creating a new driver for addressing support for transparent LVDS decoders, repurpose lvds-encoder.c for the greater good with this patch. This patch only "rebrands" the lvds-encoder.c driver, to make it suitable for hosting LVDS decoders support. The actual support for LVDS decoders will come with a later patch. Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1573660292-10629-6-git-send-email-fabrizio.castro@bp.renesas.com commit 4788f4e11d1d3dc304b119b993d3ce39a5fd22c3 Author: Fabrizio Castro Date: Wed Nov 13 15:51:23 2019 +0000 dt-bindings: display: bridge: lvds-transmitter: Document "ti, sn75lvds83" Compatible string "ti,sn75lvds83" is being used by device tree rk3188-bqedison2qc.dts, but it's not documented anywhere, therefore document it within lvds-transmitter.yaml. Signed-off-by: Fabrizio Castro Acked-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1573660292-10629-5-git-send-email-fabrizio.castro@bp.renesas.com commit 5240272d4323c20265329a6b85b799bddf9827df Author: Fabrizio Castro Date: Wed Nov 13 15:51:22 2019 +0000 dt-bindings: display: bridge: lvds-transmitter: Absorb ti, ds90c185.txt ti,ds90c185.txt documents LVDS encoders using the same driver as the one documented by lvds-transmitter.yaml. Since the properties listed in ti,ds90c185.txt are the same as the ones listed in lvds-transmitter.yaml, absorb the dt-binding into lvds-transmitter.yaml. Signed-off-by: Fabrizio Castro Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1573660292-10629-4-git-send-email-fabrizio.castro@bp.renesas.com commit 9acfa9d30ad71a64049b1f1b61c7f937e12531df Author: Fabrizio Castro Date: Wed Nov 13 15:51:21 2019 +0000 dt-bindings: display: bridge: lvds-transmitter: Document powerdown-gpios Add documentation for property powerdown-gpios. The property is optional. Signed-off-by: Fabrizio Castro Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1573660292-10629-3-git-send-email-fabrizio.castro@bp.renesas.com commit a7738c08cf269461da69f81db42279b57c68b2bb Author: Fabrizio Castro Date: Wed Nov 13 15:51:20 2019 +0000 dt-bindings: display: bridge: Convert lvds-transmitter binding to json-schema Convert the lvds-transmitter binding to DT schema format using json-schema. Signed-off-by: Fabrizio Castro Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/1573660292-10629-2-git-send-email-fabrizio.castro@bp.renesas.com commit edb1ecad77d44e21a56e9b1bba747174379b2b54 Author: Chris Wilson Date: Wed Dec 18 00:07:56 2019 +0000 drm/i915/pmu: Skip sampling engines if gt is asleep If the whole GT is asleep, we know that each engine must also be asleep and so we can quickly return without checking them all. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191218000756.3475668-1-chris@chris-wilson.co.uk commit 54d7195f8c64c83a13bd343e349b1bbf158c8aad Author: Chris Wilson Date: Mon Dec 16 16:17:16 2019 +0000 drm/i915: Unpin vma->obj on early error If we inherit an error along the fence chain, we skip the main work callback and go straight to the error. In the case of the vma bind worker, we only dropped the pinned pages from the worker. In the process, make sure we call the release earlier rather than wait until the final reference to the fence is dropped (as a reference is kept while being listened upon). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191216161717.2688274-1-chris@chris-wilson.co.uk commit cbc943eb37ca1ce2c1c05de54d9768bb7824a7aa Author: Alexandre Belloni Date: Sat Dec 14 23:10:19 2019 +0100 rtc: rv3029: let the core handle rtc range Despite the comment, the RV3029 uses a 7bit BCD register for the year, making 2079 the last supported year. Link: https://lore.kernel.org/r/20191214221022.622482-14-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 9346f870664332f01b7e375e0d35c76cebb7dc5d Author: Alexandre Belloni Date: Sat Dec 14 23:10:18 2019 +0100 rtc: rv3029: convert to devm_rtc_allocate_device This allows further improvement of the driver. Link: https://lore.kernel.org/r/20191214221022.622482-13-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit cff2e4d278265b595864f882f17f60509713c913 Author: Alexandre Belloni Date: Sat Dec 14 23:10:17 2019 +0100 rtc: rv3029: correctly handle PON and VLOW2 In case the data is invalid (PON or VLOW2 are set in STATUS, explicitly tell userspace that the time is invalid. Only remove VLOW2 when setting a new valid time. Link: https://lore.kernel.org/r/20191214221022.622482-12-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit f630f728a9b114865bcfe16c1d91dff11e89a4b9 Author: Alexandre Belloni Date: Sat Dec 14 23:10:16 2019 +0100 rtc: rv3029: add RTC_VL_READ and RTC_VL_CLEAR support The RV3029 can report three different conditions: power on, voltage dropped and data is lost and voltage is low and temperature compensation has stopped. The first two conditions amount to the same status, the RTC data is invalid. VLOW1 has to be cleared manually to resume temperature compensation, this is achieved using RTC_VL_CLEAR. Link: https://lore.kernel.org/r/20191214221022.622482-11-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 7518dd9a93b9ed1cdcf10caba269d2f3f79ca798 Author: Alexandre Belloni Date: Sat Dec 14 23:10:15 2019 +0100 rtc: rv3029: drop rv3029_read_regs and rv3029_write_regs rv3029_read_regs and rv3029_write_regs are simply calling regmap_bulk_{read,write}. Drop them and call regmap_{,bulk}_{read,write} as appropriate. Link: https://lore.kernel.org/r/20191214221022.622482-10-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 8fd3d609a5c87ccff2327c9813d35723b9a6ac10 Author: Alexandre Belloni Date: Sat Dec 14 23:10:14 2019 +0100 rtc: rv3029: simplify rv3029_set_alarm It is unecessay to test alarm->enabled before calling rv3029_alarm_irq_enable. Link: https://lore.kernel.org/r/20191214221022.622482-9-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 38ce8e30f37e8cfcf789f5b2b197f517def3c2c6 Author: Alexandre Belloni Date: Sat Dec 14 23:10:13 2019 +0100 rtc: rv3029: simplify rv3029_alarm_irq_enable Use regmap_update_bits instead of open coding it in rv3029_alarm_irq_enable. Link: https://lore.kernel.org/r/20191214221022.622482-8-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit bb72dbba83ebd519632abbe07d71a8df0466a902 Author: Alexandre Belloni Date: Sat Dec 14 23:10:12 2019 +0100 rtc: rv3029: get rid of rv3029_get_sr There is no point in having 2 indirections before calling regmap_read, especially since rv3029_get_sr also changes the return value without any good reason. Call regmap_read directly. Link: https://lore.kernel.org/r/20191214221022.622482-7-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 35c2daaf554b3e6bb4a3ff4438e801e57ae5a0a3 Author: Alexandre Belloni Date: Sat Dec 14 23:10:11 2019 +0100 rtc: rv3029: avoid reading the status register uselessly RV3029_STATUS is read in multiple location but its value is never used afterwards. Avoid this register access when not necessary. Link: https://lore.kernel.org/r/20191214221022.622482-6-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 54c5970df449103ec1181b92d41a2d14a79fe562 Author: Alexandre Belloni Date: Sat Dec 14 23:10:10 2019 +0100 rtc: rv3029: remove race condition when update STATUS There is no lock preventing concurrent access to the status register from bth the rtc subsystem and the hwmon subsystem. Use regmap_update_bits to ensure updating RV3029_STATUS is properly locked. Link: https://lore.kernel.org/r/20191214221022.622482-5-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 609e97fe31a4d1acf7bc0411277e43a4de13db44 Author: Alexandre Belloni Date: Sat Dec 14 23:10:09 2019 +0100 rtc: rv3029: remove open coded regmap_update_bits rv3029_update_bits open codes regmap_update_bits and forgets to properly lock the register range while doing so. Use regmap_update_bits instead. Link: https://lore.kernel.org/r/20191214221022.622482-4-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit c509e4344bc0e2505a635ee8ac948298c7f21127 Author: Alexandre Belloni Date: Sat Dec 14 23:10:08 2019 +0100 rtc: rv3029: let regmap validate the register ranges Instead of trying to validate the accessed registers in custom functions, let regmap handle that. This allows to defines all the holes in the register range and gives access to the regmap debugfs register dump. Link: https://lore.kernel.org/r/20191214221022.622482-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 9b45ef977440f30a0d990fc6bf60081c78c453bd Author: Alexandre Belloni Date: Sat Dec 14 23:10:07 2019 +0100 rtc: rv3029: use proper name for the driver The correct name for the rtc is rv3029. c2 is actually the package form factor rv3029c3 exists and simply has a smaller form factor. Link: https://lore.kernel.org/r/20191214221022.622482-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 8049c11399a3109099d35fd29e9b55070577ade0 Author: Alexandre Belloni Date: Sat Dec 14 23:02:59 2019 +0100 rtc: rx8010: return meaningful value for RTC_VL_READ RX8010_FLAG_VLF means the voltage dropped too low and data has been lost. Link: https://lore.kernel.org/r/20191214220259.621996-18-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 894b04320020ee9752c9fffad0fe72ed2ed81e71 Author: Alexandre Belloni Date: Sat Dec 14 23:02:58 2019 +0100 rtc: rx8010: remove RTC_VL_CLR handling Remove RTC_VL_CLR handling because it is a disservice to userspace as it removes the important information that the RTC data is invalid. This may lead userspace to set an invalid system time later on. Link: https://lore.kernel.org/r/20191214220259.621996-17-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit bcd17c5082f2feef4b585ae37a471f61f7b0c2f6 Author: Alexandre Belloni Date: Sat Dec 14 23:02:57 2019 +0100 rtc: rv8803: return meaningful value for RTC_VL_READ RV8803_FLAG_V1F means the voltage is too low to keep the temperature compensation running and the accuracy of the RTC is affected. RV8803_FLAG_V2F means the voltage dropped so low that data is now invalid. Link: https://lore.kernel.org/r/20191214220259.621996-16-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 7e890a0f0e4d777d8292539a0609d3aeef6e6da4 Author: Alexandre Belloni Date: Sat Dec 14 23:02:56 2019 +0100 rtc: rv8803: avoid clearing RV8803_FLAG_V2F in RTC_VL_CLR Stop clearing RV8803_FLAG_V2F in RTC_VL_CLR because it is a disservice to userspace as it removes the important information that the RTC data is invalid. This may lead userspace to set an invalid system time later on. Link: https://lore.kernel.org/r/20191214220259.621996-15-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 86e655f9f3e6aa2fd8066133e58a976bd861af6b Author: Alexandre Belloni Date: Sat Dec 14 23:02:55 2019 +0100 rtc: rv3028: return meaningful value for RTC_VL_READ RV3028_STATUS_PORF means the voltage dropped too low and data has been lost. Link: https://lore.kernel.org/r/20191214220259.621996-14-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 92c02daabae61df37c9743e15f239a27f4917df3 Author: Alexandre Belloni Date: Sat Dec 14 23:02:54 2019 +0100 rtc: rv3028: remove RTC_VL_CLR handling Remove RTC_VL_CLR handling because it is a disservice to userspace as it removes the important information that the RTC data is invalid. This may lead userspace to set an invalid system time later on. Link: https://lore.kernel.org/r/20191214220259.621996-13-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit f86dc5bde18e540743eaef20529d9f2b67283abd Author: Alexandre Belloni Date: Sat Dec 14 23:02:53 2019 +0100 rtc: pcf85063: return meaningful value for RTC_VL_READ PCF85063_REG_SC_OS means the voltage dropped too low and data has been lost. Link: https://lore.kernel.org/r/20191214220259.621996-12-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 0295c27f90bb6ec43ab519b63948c11d01d29604 Author: Alexandre Belloni Date: Sat Dec 14 23:02:52 2019 +0100 rtc: pcf85063: remove RTC_VL_CLR handling Remove RTC_VL_CLR handling because it is a disservice to userspace as it removes the important information that the RTC data is invalid. This may lead userspace to set an invalid system time later on. Link: https://lore.kernel.org/r/20191214220259.621996-11-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit b371b10e949a81693d5f3f327ebb86a81829045b Author: Alexandre Belloni Date: Sat Dec 14 23:02:51 2019 +0100 rtc: pcf8563: return meaningful value for RTC_VL_READ PCF8563_SC_LV means the voltage dropped too low and data has been lost. Link: https://lore.kernel.org/r/20191214220259.621996-10-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 935272aade5ac17f6e6139968799421233c92c33 Author: Alexandre Belloni Date: Sat Dec 14 23:02:50 2019 +0100 rtc: pcf8563: stop caching voltage_low voltage_low is only updated when reading the time, this means that using RTC_VL_READ will miss the VL flag if the time has not been read before using the ioctl. Always read the status from the hardware. Link: https://lore.kernel.org/r/20191214220259.621996-9-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 75d26f5c2388f0fbedceeec98a3dc95cb26ec1c8 Author: Alexandre Belloni Date: Sat Dec 14 23:02:49 2019 +0100 rtc: pcf8563: remove conditional compilation Always compile pcf8563_rtc_ioctl as we are sure that CONFIG_RTC_INTF_DEV is selected on actual kernel configurations. Link: https://lore.kernel.org/r/20191214220259.621996-8-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit d268f4bd42f51813f7335ce36a430de1b27a0bcb Author: Alexandre Belloni Date: Sat Dec 14 23:02:48 2019 +0100 rtc: pcf8563: remove RTC_VL_CLR handling Remove RTC_VL_CLR handling because it is a disservice to userspace as it removes the important information that the RTC data is invalid. This may lead userspace to set an invalid system time later on. Link: https://lore.kernel.org/r/20191214220259.621996-7-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 244cf8f0ed2778e1897b64b9043367b7263f5590 Author: Alexandre Belloni Date: Sat Dec 14 23:02:47 2019 +0100 rtc: pcf8523: return meaningful value for RTC_VL_READ REG_CONTROL3_BLF indicates the battery is low and needs to be replaced soon. Link: https://lore.kernel.org/r/20191214220259.621996-6-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit af4273116d2ccc6e7712de54169d4a9998d52f8a Author: Alexandre Belloni Date: Sat Dec 14 23:02:46 2019 +0100 rtc: pcf2127: return meaningful value for RTC_VL_READ PCF2127_BIT_CTRL3_BLF indicates the battery is low and needs to be replaced soon. Link: https://lore.kernel.org/r/20191214220259.621996-5-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 9f05342a9720a37096cbbead70909430c2e56358 Author: Alexandre Belloni Date: Sat Dec 14 23:02:45 2019 +0100 rtc: abx80x: return meaningful value for RTC_VL_READ ABX8XX_STATUS_BLF indicates the battery is low and needs to be replaced soon. Link: https://lore.kernel.org/r/20191214220259.621996-4-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 790a19f18a70bf1e30b6b4d00559e1bb8a3f7e23 Author: Alexandre Belloni Date: Sat Dec 14 23:02:44 2019 +0100 rtc: Document RTC_VL_READ and RTC_VL_CLR ioctls RTC_VL_READ and RTC_VL_CLR have been introduced in 2012 with commit 0f20b767e20a ("drivers/rtc/rtc-pcf8563.c: add RTC_VL_READ/RTC_VL_CLR ioctl feature") Document them now that they have been unified. Link: https://lore.kernel.org/r/20191214220259.621996-3-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 3431ca4837bf7f2b816e4c439db5bb66e7586746 Author: Alexandre Belloni Date: Sat Dec 14 23:02:43 2019 +0100 rtc: define RTC_VL_READ values Currently, the meaning of the value returned by RTC_VL_READ is undocumented and left to the driver implementation. In order to get more meaningful values, define a set of values to use as to make clear to userspace what is the status of the various voltages feeding the RTC. Link: https://lore.kernel.org/r/20191214220259.621996-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 1ffe09590121fbb3786d6c860acdd200f7ab095c Author: Gurchetan Singh Date: Tue Dec 17 15:02:28 2019 -0800 udmabuf: fix dma-buf cpu access I'm just going to put Chia's review comment here since it sums the issue rather nicely: "(1) Semantically, a dma-buf is in DMA domain. CPU access from the importer must be surrounded by {begin,end}_cpu_access. This gives the exporter a chance to move the buffer to the CPU domain temporarily. (2) When the exporter itself has other means to do CPU access, it is only reasonable for the exporter to move the buffer to the CPU domain before access, and to the DMA domain after access. The exporter can potentially reuse {begin,end}_cpu_access for that purpose. Because of (1), udmabuf does need to implement the {begin,end}_cpu_access hooks. But "begin" should mean dma_sync_sg_for_cpu and "end" should mean dma_sync_sg_for_device. Because of (2), if userspace wants to continuing accessing through the memfd mapping, it should call udmabuf's {begin,end}_cpu_access to avoid cache issues." Reported-by: Chia-I Wu Suggested-by: Chia-I Wu Fixes: 284562e1f348 ("udmabuf: implement begin_cpu_access/end_cpu_access hooks") Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20191217230228.453-1-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 1f2565780e9b7218cf92c7630130e82dcc0fe9c2 Author: Paul Durrant Date: Tue Dec 17 13:32:18 2019 +0000 xen-netback: remove 'hotplug-status' once it has served its purpose Removing the 'hotplug-status' node in netback_remove() is wrong; the script may not have completed. Only remove the node once the watch has fired and has been unregistered. Signed-off-by: Paul Durrant Acked-by: Wei Liu Signed-off-by: David S. Miller commit f55c3188df84248558f33b13bba4c2817dda78a7 Author: Paul Durrant Date: Tue Dec 17 13:32:17 2019 +0000 xen-netback: switch state to InitWait at the end of netback_probe()... ...as the comment above the function states. The switch to Initialising at the start of the function is somewhat bogus as the toolstack will have set that initial state anyway. To behave correctly, a backend should switch to InitWait once it has set up all xenstore values that may be required by a initialising frontend. This patch calls backend_switch_state() to make the transition at the appropriate point. NOTE: backend_switch_state() ignores errors from xenbus_switch_state() and so this patch removes an error path from netback_probe(). This means a failure to change state at this stage (in the absence of other failures) will leave the device instantiated. This is highly unlikley to happen as a failure to change state would indicate a failure to write to xenstore, and that will trigger other error paths. Also, a 'stuck' device can still be cleaned up using 'unbind' in any case. Signed-off-by: Paul Durrant Acked-by: Wei Liu Signed-off-by: David S. Miller commit 92fbeb43b6c44fb03e024c4c5b9f3d6b8ebd0cf0 Author: Paul Durrant Date: Tue Dec 17 13:32:16 2019 +0000 xen-netback: move netback_probe() and netback_remove() to the end... ...of xenbus.c This is a cosmetic function re-ordering to reduce churn in a subsequent patch. Some style fix-up was done to make checkpatch.pl happier. No functional change. Signed-off-by: Paul Durrant Acked-by: Wei Liu Signed-off-by: David S. Miller commit 5debb18f965a8f9e9d966715b8b61c164c3ea6ad Merge: 8ae674964e67 59437d78f088 Author: David S. Miller Date: Tue Dec 17 22:33:54 2019 -0800 Merge branch 'cxgb4-chtls-fix-issues-related-to-high-priority-region' Shahjada Abul Husain says: ==================== cxgb4/chtls: fix issues related to high priority region The high priority region introduced by: commit c21939998802 ("cxgb4: add support for high priority filters") had caused regression in some code paths, leading to connection failures for the ULDs. This series of patches attempt to fix the regressions. Patch 1 fixes some code paths that have been missed to consider the high priority region. Patch 2 fixes ULD connection failures due to wrong TID base that had been shifted after the high priority region. ==================== Signed-off-by: David S. Miller commit 59437d78f088e506cabdd5e0f0601c531a9830b4 Author: Shahjada Abul Husain Date: Tue Dec 17 12:12:09 2019 +0530 cxgb4/chtls: fix ULD connection failures due to wrong TID base Currently, the hardware TID index is assumed to start from index 0. However, with the following changeset, commit c21939998802 ("cxgb4: add support for high priority filters") hardware TID index can start after the high priority region, which has introduced a regression resulting in connection failures for ULDs. So, fix all related code to properly recalculate the TID start index based on whether high priority filters are enabled or not. Fixes: c21939998802 ("cxgb4: add support for high priority filters") Signed-off-by: Shahjada Abul Husain Signed-off-by: David S. Miller commit 3646ae0de90eb271ef48ec1fa75e63873ab20fc6 Author: Shahjada Abul Husain Date: Tue Dec 17 12:12:08 2019 +0530 cxgb4: fix missed high priority region calculation commit c21939998802 ("cxgb4: add support for high priority filters") has missed considering high priority region calculation in some code paths. This patch fixes them. Fixes: c21939998802 ("cxgb4: add support for high priority filters") Signed-off-by: Shahjada Abul Husain Signed-off-by: David S. Miller commit df4654bd6e42125d9b85ce3a26eaca2935290b98 Author: Nathan Chancellor Date: Tue Dec 17 20:42:57 2019 -0700 ALSA: usx2y: Adjust indentation in snd_usX2Y_hwdep_dsp_status Clang warns: ../sound/usb/usx2y/usX2Yhwdep.c:122:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] info->version = USX2Y_DRIVER_VERSION; ^ ../sound/usb/usx2y/usX2Yhwdep.c:120:2: note: previous statement is here if (us428->chip_status & USX2Y_STAT_CHIP_INIT) ^ 1 warning generated. This warning occurs because there is a space before the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns. This was introduced before the beginning of git history so no fixes tag. Link: https://github.com/ClangBuiltLinux/linux/issues/831 Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20191218034257.54535-1-natechancellor@gmail.com Signed-off-by: Takashi Iwai commit ed5a0ab41555032a944c18bd5f8eb275c740f856 Author: Peng Ma Date: Thu Dec 12 03:38:10 2019 +0000 dmaengine: fsl-edma: Add eDMA support for QorIQ LS1028A platform Our platforms(such as LS1021A, LS1012A, LS1043A, LS1046A, LS1028A) with below registers(CHCFG0 - CHCFG15) of eDMA as follows: *-----------------------------------------------------------* | Offset | OTHERS | LS1028A | |--------------|--------------------|-----------------------| | 0x0 | CHCFG0 | CHCFG3 | |--------------|--------------------|-----------------------| | 0x1 | CHCFG1 | CHCFG2 | |--------------|--------------------|-----------------------| | 0x2 | CHCFG2 | CHCFG1 | |--------------|--------------------|-----------------------| | 0x3 | CHCFG3 | CHCFG0 | |--------------|--------------------|-----------------------| | ... | ...... | ...... | |--------------|--------------------|-----------------------| | 0xC | CHCFG12 | CHCFG15 | |--------------|--------------------|-----------------------| | 0xD | CHCFG13 | CHCFG14 | |--------------|--------------------|-----------------------| | 0xE | CHCFG14 | CHCFG13 | |--------------|--------------------|-----------------------| | 0xF | CHCFG15 | CHCFG12 | *-----------------------------------------------------------* This patch is to improve edma driver to fit LS1028A platform. Signed-off-by: Peng Ma Reviewed-by: Robin Gong Link: https://lore.kernel.org/r/20191212033714.4090-1-peng.ma@nxp.com Signed-off-by: Vinod Koul commit d8c1bdb5288da433e1dc486f5e847e24a48d632b Author: Peng Ma Date: Thu Dec 12 03:38:19 2019 +0000 dt-bindings: dma: fsl-edma: add new fsl,fsl,ls1028a-edma QORIQ LS1028A soc used fsl,vf610-edma, but it has a little bit different from others, so add new compatible to distinguish them. Signed-off-by: Peng Ma Link: https://lore.kernel.org/r/20191212033714.4090-3-peng.ma@nxp.com Signed-off-by: Vinod Koul commit 28d647fd8305d4f7aa00c176a6326b340cb12947 Author: Jeffrey Hugo Date: Tue Dec 17 09:02:49 2019 -0800 arm64: dts: msm8998-clamshell: Add pm8005_s1 regulator The pm8005_s1 is VDD_GFX, and needs to be on to enable the GPU. This should be hooked up to the GPU CPR, but we don't have support for that yet, so until then, just turn on the regulator and keep it on so that we can focus on basic GPU bringup. Signed-off-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20191217170249.5280-1-jeffrey.l.hugo@gmail.com Signed-off-by: Bjorn Andersson commit 456d677c4e7b7cd45a18247d8fde4badebb22032 Author: Maulik Shah Date: Wed Oct 30 12:36:18 2019 +0530 arm64: dts: qcom: sc7180: Add wakeup parent for TLMM Specify wakeup parent irqchip for sc7180 TLMM. Reviewed-by: Lina Iyer Reviewed-by: Douglas Anderson Cc: devicetree@vger.kernel.org Signed-off-by: Maulik Shah Link: https://lore.kernel.org/r/1572419178-5750-3-git-send-email-mkshah@codeaurora.org Signed-off-by: Bjorn Andersson commit 49076351a26342e8d485844583a25104c279bb61 Author: Sibi Sankar Date: Tue Dec 17 14:55:03 2019 +0530 arm64: dts: qcom: sm8150: Add ADSP, CDSP, MPSS and SLPI remoteprocs Add ADSP, CDSP, MPSS and SLPI device tree nodes for SM8150 SoC. Tested-by: Bjorn Andersson Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20191217092503.10699-1-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 58d8dc2a98f50d4741a49e047bd7b322d7692d0b Merge: 4a3d6c6a6e4d cb21ac588546 Author: Alexei Starovoitov Date: Tue Dec 17 22:16:36 2019 -0800 Merge branch 'skel-fixes' Andrii Nakryiko says: ==================== Simplify skeleton usage by embedding source BPF object file inside skeleton itself. This allows to keep skeleton and object file in sync at all times with no chance of confusion. Also, add bpftool-gen.rst manpage, explaining concepts and ideas behind skeleton. In examples section it also includes a complete small BPF application utilizing skeleton, as a demonstration of API. Patch #2 also removes BPF_EMBED_OBJ, as there is currently no use of it. v2->v3: - (void) in no-args function (Alexei); - bpftool-gen.rst code block formatting fix (Alexei); - simplified xxx__create_skeleton to fill in obj and return error code; v1->v2: - remove whitespace from empty lines in code blocks (Yonghong). ==================== Signed-off-by: Alexei Starovoitov commit cb21ac58854605e6c15fd7da2c619823967b3140 Author: Andrii Nakryiko Date: Tue Dec 17 21:25:52 2019 -0800 bpftool: Add gen subcommand manpage Add bpftool-gen.rst describing skeleton on the high level. Also include a small, but complete, example BPF app (BPF side, userspace side, generated skeleton) in example section to demonstrate skeleton API and its usage. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20191218052552.2915188-4-andriin@fb.com commit 3bf3c79b772f4155312c000310abab700aba2200 Author: Andrii Nakryiko Date: Tue Dec 17 21:25:51 2019 -0800 libbpf: Remove BPF_EMBED_OBJ macro from libbpf.h Drop BPF_EMBED_OBJ and struct bpf_embed_data now that skeleton automatically embeds contents of its source object file. While BPF_EMBED_OBJ is useful independently of skeleton, we are currently don't have any use cases utilizing it, so let's remove them until/if we need it. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20191218052552.2915188-3-andriin@fb.com commit 5dc7a8b2114479fd945956ece9875f747a996a8e Author: Andrii Nakryiko Date: Tue Dec 17 21:25:50 2019 -0800 bpftool, selftests/bpf: Embed object file inside skeleton Embed contents of BPF object file used for BPF skeleton generation inside skeleton itself. This allows to keep BPF object file and its skeleton in sync at all times, and simpifies skeleton instantiation. Also switch existing selftests to not require BPF_EMBED_OBJ anymore. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20191218052552.2915188-2-andriin@fb.com commit d1fd03a35efc6285e43f4ef35ef04dbf2c9389c6 Author: Wei Yongjun Date: Thu Dec 12 11:46:22 2019 +0000 dmaengine: ti: edma: Fix error return code in edma_probe() Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: 2a03c1314506 ("dmaengine: ti: edma: add missed operations") Signed-off-by: Wei Yongjun Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191212114622.127322-1-weiyongjun1@huawei.com Signed-off-by: Vinod Koul commit 7cee5c742899f9d3167cf83bc7bd3d670b16e797 Author: Matthias Kaehlcke Date: Thu Dec 12 17:08:36 2019 -0800 arm64: dts: qcom: sc7180: Fix node order The SC7180 device tree nodes should be ordered by address. Re-shuffle some nodes which currently don't follow this convention. Since we are already moving it add a missing leading zero to the address in the 'reg' property of the 'interrupt-controller@b220000' node. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20191212170824.v2.1.I55198466344789267ed1eb5ec555fd890c9fc6e1@changeid Signed-off-by: Bjorn Andersson commit 8529728f25d620d82c118bd683fcd7bcf2b18ac5 Author: Jeffrey Hugo Date: Mon Oct 21 09:19:21 2019 -0700 arm64: dts: qcom: msm8998: Fixup uart3 gpio config for bluetooth It turns out that the wcn3990 can float the gpio lines during bootup, etc which will result in the uart core thinking there is incoming data. This results in the bluetooth stack getting garbage. By applying a bias to match what wcn3990 would drive, the issue is corrected. Signed-off-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20191021161921.31825-1-jeffrey.l.hugo@gmail.com [bjorn: Moved board specific pinctrl states to the end] Signed-off-by: Bjorn Andersson commit 4a3d6c6a6e4d652808729e7a2a8c3774a5a5c814 Author: Andrii Nakryiko Date: Tue Dec 17 15:42:28 2019 -0800 libbpf: Reduce log level for custom section names Libbpf is trying to recognize BPF program type based on its section name during bpf_object__open() phase. This is not strictly enforced and user code has ability to specify/override correct BPF program type after open. But if BPF program is using custom section name, libbpf will still emit warnings, which can be quite annoying to users. This patch reduces log level of information messages emitted by libbpf if section name is not canonical. User can still get a list of all supported section names as debug-level message. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191217234228.1739308-1-andriin@fb.com commit fe96df93f86c9006f9c76d53779445dffa4f3b2d Author: Maxime Ripard Date: Fri Dec 13 08:49:38 2019 +0100 dt-bindings: ata: Convert Allwinner AHCI controller to a schema The Allwinner SoCs have a AHCI controllers that is supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard [robh: 'maxItems: 1' for resets] Signed-off-by: Rob Herring commit 2609a1271d50847e7d5499d000097fc9b8802ffa Author: Maxime Ripard Date: Fri Dec 13 08:45:33 2019 +0100 dt-bindings: interconnect: Convert Allwinner MBUS controller to a schema The older Allwinner SoCs have an MBUS controller that is used by Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit f78ed3c5bd3259c3841ae0b90740462371086487 Author: Maxime Ripard Date: Fri Dec 13 08:43:55 2019 +0100 dt-bindings: media: Convert Allwinner A31 CSI to a schema The newer Allwinner SoCs have a camera controller that is supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit fc0b90f63e7f7583813c2e86b3d0757e45882347 Author: Maxime Ripard Date: Fri Dec 13 08:40:55 2019 +0100 dt-bindings: media: Convert Allwinner hardware codec to a schema The Allwinner SoCs have a hardware video codec that is supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit e4597da1d685aff534d04fb149a9b8e79563ce7f Author: Maxime Ripard Date: Mon Dec 9 10:34:41 2019 +0100 dt-bindings: sram: Convert Allwinner A10 system controller to a schema The older Allwinner SoCs have a system controller that is supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard [robh: fixup missing 'properties'] Signed-off-by: Rob Herring commit 3538129cabaa6b57744196a2e084efa022244b00 Author: Maxime Ripard Date: Mon Dec 9 10:34:40 2019 +0100 dt-bindings: sram: Add Allwinner SRAM compatibles The mmio-sram binding was added missing a few SRAM sections compatible for allwinner SoCs. Let's add them. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit df45bdd9f615eb7973f8e40a988e55bb5d3832c4 Author: Maxime Ripard Date: Mon Dec 9 10:34:39 2019 +0100 dt-bindings: sram: Allow for more specific compatibles Even though the generic mmio-sram binding has a list of the sections compatible allowed, most device trees have more specific compatibles attached to those generic ones. This creates warnings at the moment, and we don't really want to cripple the generic binding with all the vendor specific combinations that would prove to be hard to maintain. Let's allow additional compatibles for the sections, and then we can have the vendor-specific bindings to reduce the scope of what's allowed exactly. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit b19da6636c4ae90e3da360b7dd8797365e58b97b Author: Maxime Ripard Date: Mon Dec 9 10:34:38 2019 +0100 dt-bindings: sram: Allow for the childs nodes to be called sections The generic SRAM binding currently only allows for child nodes of an SRAM to be called sram too. However, these are also called sections in a number of device tree, which seems a bit more accurate. Let's change the name pattern to allow both. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit 0b2f7ad1f2f65fd9d0488f98eb680e7cbc640e3f Author: Maxime Ripard Date: Mon Dec 9 10:33:40 2019 +0100 dt-bindings: usb: Convert Allwinner USB PHY controller to a schema The Allwinner SoCs have a USB PHY controller that is supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Signed-off-by: Maxime Ripard Signed-off-by: Rob Herring commit c267782c5f0efbd20c560101738e68bb30d4fad5 Author: Kieran Bingham Date: Wed Sep 11 20:25:01 2019 +0100 drm: rcar-du: Add r8a77980 support Add direct support for the r8a77980 (V3H). The V3H shares a common, compatible configuration with the r8a77970 (V3M) so that device info structure is reused. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 59c1f061c97e70d81b046e90b259589b645bb87f Author: Fabrizio Castro Date: Tue Dec 17 13:45:59 2019 +0000 drm: rcar-du: lvds: Allow for even and odd pixels swap DT properties dual-lvds-even-pixels and dual-lvds-odd-pixels can be used to work out if the driver needs to swap even and odd pixels around. This patch makes use of the return value from function drm_of_lvds_get_dual_link_pixel_order to determine if we need to swap odd and even pixels around for things to work properly. The dual_link boolean field from struct rcar_lvds is not sufficient to describe the type of LVDS link anymore, since we now have information related to pixel order, therefore rename it to link_type and repurpose its usage to fit the new requirements. Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 65112cfa56c32030a7f04a8a4c28251b89b5cf26 Author: Fabrizio Castro Date: Tue Dec 17 13:45:58 2019 +0000 drm: rcar-du: lvds: Get dual link configuration from DT For dual-LVDS configurations, it is now possible to mark the DT port nodes for the sink with boolean properties (like dual-lvds-even-pixels and dual-lvds-odd-pixels) to let drivers know the encoders need to be configured in dual-LVDS mode. Rework the implementation of rcar_lvds_parse_dt_companion to make use of the DT markers while keeping backward compatibility. Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 990e378db4450f930aefbe8c31a50b8504fe0e8b Author: Fabrizio Castro Date: Tue Dec 17 13:45:57 2019 +0000 drm: rcar-du: lvds: Improve identification of panels Dual-LVDS panels are mistakenly identified as bridges, this commit replaces the current logic with a call to drm_of_find_panel_or_bridge to sort that out. Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 6529007522ded00b8912c079250620fa7a732166 Author: Fabrizio Castro Date: Tue Dec 17 13:45:56 2019 +0000 drm: of: Add drm_of_lvds_get_dual_link_pixel_order An LVDS dual-link connection is made of two links, with even pixels transitting on one link, and odd pixels on the other link. The device tree can be used to fully describe dual-link LVDS connections between encoders and bridges/panels. The sink of an LVDS dual-link connection is made of two ports, the corresponding OF graph port nodes can be marked with either dual-lvds-even-pixels or dual-lvds-odd-pixels, and that fully describes an LVDS dual-link connection, including pixel order. drm_of_lvds_get_dual_link_pixel_order is a new helper added by this patch, given the source port nodes it returns DRM_LVDS_DUAL_LINK_EVEN_ODD_PIXELS if the source port nodes belong to an LVDS dual-link connection, with even pixels expected to be generated from the first port, and odd pixels expected to be generated from the second port. If the new helper returns DRM_LVDS_DUAL_LINK_ODD_EVEN_PIXELS, odd pixels are expected to be generated from the first port, and even pixels from the other port. Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit 593885b085d699c9f49992c3ea50f372e0c7008d Author: Laurent Pinchart Date: Wed Oct 16 02:06:52 2019 +0300 drm: rcar-du: lvds: Get mode from state The R-Car LVDS encoder driver implements the bridge .mode_set() operation for the sole purpose of storing the mode in the LVDS private data, to be used later when enabling the encoder. Switch to the bridge .atomic_enable() and .atomic_disable() operations in order to access the global atomic state, and get the mode from the state instead. Remove both the unneeded .mode_set() operation and the display_mode and mode fields storing state data from the rcar_lvds private structure. As a side effect we get the CRTC from the state, replace the CRTC pointer retrieved through the bridge's encoder that shouldn't be used by atomic drivers. While at it, clarify a few error messages in rcar_lvds_get_lvds_mode() and turn them into warnings as they are not fatal. Signed-off-by: Laurent Pinchart Reviewed-by: Fabrizio Castro Tested-by: Fabrizio Castro commit 7b627ce80fbd05885b27f711a5f9820f2b40749a Author: Geert Uytterhoeven Date: Tue Nov 5 19:35:03 2019 +0100 drm: rcar-du: Recognize "renesas,vsps" in addition to "vsps" The Renesas-specific "vsps" property lacks a vendor prefix. Add a "renesas," prefix to comply with DT best practises. Retain backward compatibility with old DTBs by falling back to "vsps" when needed. Fixes: 6d62ef3ac30be756 ("drm: rcar-du: Expose the VSP1 compositor through KMS planes") Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit c81456d2452da72891688edb81d2f0749c2db568 Author: Geert Uytterhoeven Date: Tue Nov 5 19:35:02 2019 +0100 dt-bindings: display: renesas: du: Add vendor prefix to vsps property The Renesas-specific "vsps" property lacks a vendor prefix. Add a "renesas," prefix to comply with DT best practises. Move "renesas,vsps" below "renesas,cmms" to preserve alphabetical sort order. Fixes: 06711e6385a4ab4c ("drm: rcar-du: Document the vsps property in the DT bindings") Signed-off-by: Geert Uytterhoeven Acked-by: Rob Herring Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart commit b28a931476bcc4552936bfa47194cae2ad6a15a5 Author: Jacopo Mondi Date: Wed Oct 16 10:55:46 2019 +0200 drm: rcar-du: crtc: Register GAMMA_LUT properties Enable the GAMMA_LUT KMS property using the framework helpers to register the property and set the associated gamma table maximum size. Reviewed-by: Kieran Bingham Reviewed-by: Ulrich Hecht Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Signed-off-by: Laurent Pinchart commit 78b6bb1d24dbf094a4743bae1ee7c020e8193f25 Author: Jacopo Mondi Date: Thu Oct 17 15:44:09 2019 +0200 drm: rcar-du: crtc: Control CMM operations Implement CMM handling in the crtc begin and enable atomic callbacks, and enable CMM unit through the Display Extensional Functions register at group setup time. Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Jacopo Mondi [Fix printk format modifier for size_t variable] Signed-off-by: Laurent Pinchart commit 8de707aeb4524140d9c37a3cf607e57e753d8529 Author: Jacopo Mondi Date: Wed Oct 16 10:55:44 2019 +0200 drm: rcar-du: kms: Initialize CMM instances Implement device tree parsing to collect the available CMM instances described by the 'renesas,cmms' property. Associate CMMs with CRTCs and store a mask of active CMMs in the DU group for later enablement. Enforce the probe and suspend/resume ordering of DU and CMM by creating a stateless device link between the two. Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Signed-off-by: Laurent Pinchart commit e08e934d6c289ed0d6bc222271f69dc35fb2caa5 Author: Jacopo Mondi Date: Thu Oct 17 15:43:32 2019 +0200 drm: rcar-du: Add support for CMM Add a driver for the R-Car Display Unit Color Correction Module. In most of Gen3 SoCs, each DU output channel is provided with a CMM unit to perform image enhancement and color correction. Add support for CMM through a driver that supports configuration of the 1-dimensional LUT table. More advanced CMM features will be implemented on top of this initial one. Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham Signed-off-by: Jacopo Mondi Signed-off-by: Laurent Pinchart commit 6e2258b58f819e73aad229fd0af7d8274ef22669 Author: Jacopo Mondi Date: Wed Oct 16 10:55:42 2019 +0200 dt-bindings: display: renesas,du: Document cmms property Document the newly added 'renesas,cmms' property which accepts a list of phandle and channel index pairs that point to the CMM units available for each Display Unit output video channel. Reviewed-by: Rob Herring Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Signed-off-by: Laurent Pinchart commit 7f7b9455b35290a1032c73222261bfd784cc3702 Author: Jacopo Mondi Date: Wed Oct 16 10:55:41 2019 +0200 dt-bindings: display: renesas,cmm: Add R-Car CMM documentation Add device tree bindings documentation for the Renesas R-Car Display Unit Color Management Module. CMM is the image enhancement module available on each R-Car DU video channel on R-Car Gen2 and Gen3 SoCs (V3H and V3M excluded). Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Reviewed-by: Rob Herring Signed-off-by: Laurent Pinchart commit 0b7c446fa9f72fe14fd87154d9e183baa958c979 Author: Benjamin Gaignard Date: Tue Dec 17 10:21:58 2019 +0100 dt-bindings: dma: Convert stm32 DMAMUX bindings to json-schema Convert the STM32 DMAMUX binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit 71021f3fd3af00482d55e4c62a23cc6148f6347d Author: Benjamin Gaignard Date: Tue Dec 17 10:21:57 2019 +0100 dt-bindings: dma: Convert stm32 MDMA bindings to json-schema Convert the STM32 MDMA binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit b80103f60b0d3b69d7640c7806c641930f5665a2 Author: Benjamin Gaignard Date: Tue Dec 17 10:21:56 2019 +0100 dt-bindings: dma: Convert stm32 DMA bindings to json-schema Convert the STM32 DMA binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit 34566e4f2d681570c271bf71f8405e0c78251127 Author: Arnaud Pouliquen Date: Tue Dec 17 09:24:15 2019 +0100 dt-bindings: stm32: convert mlahb to json-schema Convert the ML-AHB bus bindings to DT schema format using json-schema Signed-off-by: Arnaud Pouliquen Signed-off-by: Rob Herring commit 887d1d69d67ad405f3d08271aa4b6a5184888606 Author: Benjamin Gaignard Date: Sat Dec 14 10:00:25 2019 +0100 dt-bindings: rtc: Convert stm32 rtc bindings to json-schema Convert the STM32 RTC binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard Signed-off-by: Rob Herring commit f20c6b278d1a0cedc691c3b0ebcf9154ad9d8a1a Author: Daniele Ceraolo Spurio Date: Mon Dec 16 17:23:15 2019 -0800 drm/i915/guc: Unify notify() functions The Gen11+ and the legacy function differ in the register and value written to interrupt the GuC. However, while on older gen the value matches a bit on the register, on Gen11+ the value is a SW defined payload that is sent to the FW. Since the FW behaves the same no matter what value we pass to it, we can just write the same thing on all gens and get rid of the function pointer by saving the register offset. Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: John Harrison Cc: Matthew Brost Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20191217012316.13271-6-daniele.ceraolospurio@intel.com commit 8c69bd74a00baff85f4ef46b9f79263a42e0d82c Author: Daniele Ceraolo Spurio Date: Mon Dec 16 17:23:14 2019 -0800 drm/i915/guc: Remove function pointers for send/receive calls Since we started using CT buffers on all gens, the function pointers can only be set to either the _nop() or the _ct() functions. Since the _nop() case applies to when the CT are disabled, we can just handle that case in the _ct() functions and call them directly. v2: keep intel_guc_send() and make the CT send/receive functions work on intel_guc_ct. (Michal) Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: John Harrison Cc: Matthew Brost Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20191217012316.13271-5-daniele.ceraolospurio@intel.com commit 7524c365c31c9435ff4891bfabf52dcfa62edb6a Author: Daniele Ceraolo Spurio Date: Mon Dec 16 17:23:13 2019 -0800 drm/i915/guc/ct: Group request-related variables in a sub-structure For better isolation of the request tracking from the rest of the CT-related data. v2: split to separate patch, move next_fence to substructure (Michal) Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: John Harrison Cc: Matthew Brost Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20191217012316.13271-4-daniele.ceraolospurio@intel.com commit 9ab28cd20c92bc121dbed64a11b75c5e68cb684b Author: Daniele Ceraolo Spurio Date: Mon Dec 16 17:23:12 2019 -0800 drm/i915/guc/ct: Stop expecting multiple CT channels The GuC supports having multiple CT buffer pairs and we designed our implementation with that in mind. However, the different channels are not processed in parallel within the GuC, so there is very little advantage in having multiple channels (independent locks?), compared to the drawbacks (one channel can starve the other if messages keep being submitted to it). Given this, it is unlikely we'll ever add a second channel and therefore we can simplify our code by removing the flexibility. v2: split substructure grouping to separate patch, improve docs (Michal) Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: John Harrison Cc: Matthew Brost Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20191217012316.13271-3-daniele.ceraolospurio@intel.com commit 7f5390c433876a6baef1ee09c5442160ae03cde0 Author: Daniele Ceraolo Spurio Date: Mon Dec 16 17:23:11 2019 -0800 drm/i915/guc/ct: Drop guards in enable/disable calls We track the status of the GuC much more closely now and we expect the enable/disable functions to be correctly called only once. If this isn't true we do want to flag it as a flow failure (via the BUG_ON in the ctch functions) and not silently ignore the call. Suggested-by: Michal Wajdeczko Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20191217012316.13271-2-daniele.ceraolospurio@intel.com commit e627ad50a2d787dcd8d1e7755a995ec31efa0e44 Author: Daniele Ceraolo Spurio Date: Mon Dec 16 17:23:10 2019 -0800 drm/i915/guc: Merge communication_stop and communication_disable The only difference from the GuC POV between guc_communication_stop and guc_communication_disable is that the former can be called after GuC has been reset. Instead of having two separate paths, we can just skip the call into GuC in the disabling path and re-use that. Note that by using the disable() path instead of the stop() one there are two additional changes in SW side for the stop path: - interrupts are now disabled before disabling the CT, which is ok because we do not want interrupts with CT disabled; - guc_get_mmio_msg() is called in the stop case as well, which is ok because if there are errors before the reset we do want to record them. Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: John Harrison Cc: Matthew Brost Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20191217012316.13271-1-daniele.ceraolospurio@intel.com commit fb9a98e160f10555936e1c7041d4efda4954d1df Author: Toke Høiland-Jørgensen Date: Tue Dec 17 12:28:10 2019 +0100 libbpf: Fix libbpf_common.h when installing libbpf through 'make install' This fixes two issues with the newly introduced libbpf_common.h file: - The header failed to include for the definition of memset() - The new file was not included in the install_headers rule in the Makefile Both of these issues cause breakage when installing libbpf with 'make install' and trying to use it in applications. Fixes: 544402d4b493 ("libbpf: Extract common user-facing helpers") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20191217112810.768078-1-toke@redhat.com commit 92f7440ecc9331aa1e274273d4a3cb5c58b69706 Author: Andrii Nakryiko Date: Mon Dec 16 22:14:25 2019 -0800 selftests/bpf: More succinct Makefile output Similarly to bpftool/libbpf output, make selftests/bpf output succinct per-item output line. Output is roughly as follows: $ make ... CLANG-LLC [test_maps] pyperf600.o CLANG-LLC [test_maps] strobemeta.o CLANG-LLC [test_maps] pyperf100.o EXTRA-OBJ [test_progs] cgroup_helpers.o EXTRA-OBJ [test_progs] trace_helpers.o BINARY test_align BINARY test_verifier_log GEN-SKEL [test_progs] fexit_bpf2bpf.skel.h GEN-SKEL [test_progs] test_global_data.skel.h GEN-SKEL [test_progs] sendmsg6_prog.skel.h ... To see the actual command invocation, verbose mode can be turned on with V=1 argument: $ make V=1 ... very verbose output ... Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20191217061425.2346359-1-andriin@fb.com commit 1985f8c7f9a42a651a9750d6fcadc74336d182df Author: Zhengyuan Liu Date: Sat Dec 14 00:27:12 2019 +0800 tools/power/acpi: fix compilation error If we compile tools/acpi target in the top source directory, we'd get a compilation error showing as bellow: # make tools/acpi DESCEND power/acpi DESCEND tools/acpidbg CC tools/acpidbg/acpidbg.o Assembler messages: Fatal error: can't create /home/lzy/kernel-upstream/power/acpi/\ tools/acpidbg/acpidbg.o: No such file or directory ../../Makefile.rules:26: recipe for target '/home/lzy/kernel-upstream/\ power/acpi/tools/acpidbg/acpidbg.o' failed make[3]: *** [/home/lzy/kernel-upstream//power/acpi/tools/acpidbg/\ acpidbg.o] Error 1 Makefile:19: recipe for target 'acpidbg' failed make[2]: *** [acpidbg] Error 2 Makefile:54: recipe for target 'acpi' failed make[1]: *** [acpi] Error 2 Makefile:1607: recipe for target 'tools/acpi' failed make: *** [tools/acpi] Error 2 Fixes: d5a4b1a540b8 ("tools/power/acpi: Remove direct kernel source include reference") Signed-off-by: Zhengyuan Liu Signed-off-by: Rafael J. Wysocki commit e168e6ecd80e6fd483448f62bef7f2137a050119 Author: Linus Walleij Date: Tue Dec 17 21:26:48 2019 +0100 ARM: defconfig: u8500: activate cpufreq This activates the device tree-based cpufreq driver that Ux500 is using and enables the schedutil and ondemand governors with schedutil as default. This works fine in the setups I have tested. Link: https://lore.kernel.org/r/20191217202648.23206-1-linus.walleij@linaro.org Cc: Stephan Gerhold Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson commit 8ae674964e67eb7deb3f0e489bfe9c102a7990b0 Author: Florian Fainelli Date: Mon Dec 16 10:32:47 2019 -0800 net: dsa: Make PHYLINK related function static again Commit 77373d49de22 ("net: dsa: Move the phylink driver calls into port.c") moved and exported a bunch of symbols, but they are not used outside of net/dsa/port.c at the moment, so no reason to export them. Reported-by: Russell King Signed-off-by: Florian Fainelli Reviewed-by: Vivien Didelot Acked-by: Russell King Acked-by: Vladimir Oltean Signed-off-by: David S. Miller commit ba16a48af797db124ac100417f9229b1650ce1fb Author: Tvrtko Ursulin Date: Tue Dec 17 17:09:33 2019 +0000 drm/i915: Fix pid leak with banned clients Get_pid_task() needs to be paired with a put_pid or we leak a pid reference every time a banned client tries to create a context. v2: * task_pid_nr helper exists! (Chris) Signed-off-by: Tvrtko Ursulin Fixes: b083a0870c79 ("drm/i915: Add per client max context ban limit") Cc: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191217170933.8108-1-tvrtko.ursulin@linux.intel.com commit b7ffa045e7000d5410bf206454e0cb8de0428ed5 Author: Jon Maloy Date: Mon Dec 16 19:21:02 2019 +0100 tipc: don't send gap blocks in ACK messages In the commit referred to below we eliminated sending of the 'gap' indicator in regular ACK messages, reserving this to explicit NACK ditto. Unfortunately we missed to also eliminate building of the 'gap block' area in ACK messages. This area is meant to report gaps in the received packet sequence following the initial gap, so that lost packets can be retransmitted earlier and received out-of-sequence packets can be released earlier. However, the interpretation of those blocks is dependent on a complete and correct sequence of gaps and acks. Hence, when the initial gap indicator is missing a single gap block will be interpreted as an acknowledgment of all preceding packets. This may lead to packets being released prematurely from the sender's transmit queue, with easily predicatble consequences. We now fix this by not building any gap block area if there is no initial gap to report. Fixes: commit 02288248b051 ("tipc: eliminate gap indicator from ACK messages") Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit df1d6ea05a75104b8e7dc642cc5d3f9c4b80d58b Merge: d8cac6207ec1 1cfaef961703 Author: Takashi Iwai Date: Tue Dec 17 23:12:39 2019 +0100 Merge tag 'y2038-alsa-v8-signed' of git://git.kernel.org:/pub/scm/linux/kernel/git/arnd/playground into for-next ALSA: Fix year 2038 issue for sound subsystem This is a series I worked on with Baolin in 2017 and 2018, but we never quite managed to finish up the last pieces. During the ALSA developer meetup at ELC-E 2018 in Edinburgh, a decision was made to go with this approach for keeping best compatibility with existing source code, and then I failed to follow up by resending the patches. Now I have patches for all remaining time_t uses in the kernel, so it's absolutely time to revisit them. I have done more review of the patches myself and found a couple of minor issues that I have fixed up, otherwise the series is still the same as before. Conceptually, the idea of these patches is: - 64-bit applications should see no changes at all, neither compile-time nor run-time. - 32-bit code compiled with a 64-bit time_t currently does not work with ALSA, and requires kernel changes and/or sound/asound.h changes - Most 32-bit code using these interfaces will work correctly on a modified kernel, with or without the uapi header changes. - 32-bit code using SNDRV_TIMER_IOCTL_TREAD requires the updated header file for 64-bit time_t support - 32-bit i386 user space with 64-bit time_t is broken for SNDRV_PCM_IOCTL_STATUS, SNDRV_RAWMIDI_IOCTL_STATUS and SNDRV_PCM_IOCTL_SYNC_PTR because of i386 alignment. This is also addressed by the updated uapi header. - PCM mmap is currently supported on native x86 kernels (both 32-bit and 64-bit) but not for compat mode. This series breaks the 32-bit native mmap support for 32-bit time_t, but instead allows it for 64-bit time_t on both native and compat kernels. This seems to be the best trade-off, as mmap support is optional already, and most 32-bit code runs in compat mode anyway. - I've tried to avoid breaking compilation of 32-bit code as much as possible. Anything that does break however is likely code that is already broken on 64-bit time_t and needs source changes to fix them. [1] https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git y2038-alsa-v8 [2] https://lore.kernel.org/lkml/CAK8P3a2Os66+iwQYf97qh05W2JP8rmWao8zmKoHiXqVHvyYAJA@mail.gmail.com/T/#m6519cb07cfda08adf1dedea6596bb98892b4d5dc Signed-off-by: Arnd Bergmann Changes since v7: (Arnd): - Fix a typo found by Ben Hutchings Changes since v6: (Arnd): - Add a patch to update the API versions - Hide a timespec reference in #ifndef __KERNEL__ to remove the last reference to time_t - Use a more readable way to do padding and describe it in the changelog - Rebase to linux-5.5-rc1, changing include/sound/soc-component.h and sound/drivers/aloop.c as needed. Changes since v5 (Arnd): - Rebased to linux-5.4-rc4 - Updated to completely remove timespec and time_t references from alsa - found and fixed a few bugs Changes since v4 (Baolin): - Add patch 5 to change trigger_tstamp member of struct snd_pcm_runtime. - Add patch 8 to change internal timespec. - Add more explanation in commit message. - Use ktime_get_real_ts64() in patch 6. - Split common code out into a separate function in patch 6. - Fix tu->tread bug in patch 6 and remove #if __BITS_PER_LONG == 64 macro. Changes since v3: - Move struct snd_pcm_status32 to pcm.h file. - Modify comments and commit message. - Add new patch2 ~ patch6. Changes since v2: - Renamed all structures to make clear. - Remove CONFIG_X86_X32 macro and introduced new compat_snd_pcm_status64_x86_32. Changes since v1: - Add one macro for struct snd_pcm_status_32 which only active in 32bits kernel. - Convert pcm_compat.c to use struct snd_pcm_status_64. - Convert pcm_native.c to use struct snd_pcm_status_64. commit 13d74c0a9708a4f1ab0164a800ce9ea3de32f47b Author: Florian Westphal Date: Fri Dec 13 01:58:15 2019 +0100 netfilter: conntrack: remove two export symbols Not used anywhere, remove them. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 7e03998429ee0a27c13b8690c11f9cf40f67f6e9 Author: Xin Long Date: Fri Dec 13 16:53:09 2019 +0800 netfilter: nft_tunnel: add the missing nla_nest_cancel() When nla_put_xxx() fails under nla_nest_start_noflag(), nla_nest_cancel() should be called, so that the skb can be trimmed properly. Signed-off-by: Xin Long Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit 73239bd9707ab2f3b7621e50468c14410cf4e2c2 Author: Xin Long Date: Fri Dec 13 16:53:08 2019 +0800 netfilter: nft_tunnel: also dump OPTS_ERSPAN/VXLAN This patch is to add the nest attr OPTS_ERSPAN/VXLAN when dumping KEY_OPTS, and it would be helpful when parsing in userpace. Also, this is needed for supporting multiple geneve opts in the future patches. Signed-off-by: Xin Long Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit 2149f36dbd44f2d6bf5357e5d096205b92cd854a Author: Xin Long Date: Fri Dec 13 16:53:07 2019 +0800 netfilter: nft_tunnel: also dump ERSPAN_VERSION This is not necessary, but it'll be easier to parse in userspace, also given that other places like act_tunnel_key, cls_flower and ip_tunnel_core are also doing so. Signed-off-by: Xin Long Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit 0705f95c332081036d85f26691e9d3cd7d901c31 Author: Xin Long Date: Fri Dec 13 16:53:06 2019 +0800 netfilter: nft_tunnel: add the missing ERSPAN_VERSION nla_policy ERSPAN_VERSION is an attribute parsed in kernel side, nla_policy type should be added for it, like other attributes. Fixes: af308b94a2a4 ("netfilter: nf_tables: add tunnel support") Signed-off-by: Xin Long Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit cf3e204a1ca5442190018a317d9ec181b4639bd6 Author: Xin Long Date: Fri Dec 13 16:53:05 2019 +0800 netfilter: nft_tunnel: no need to call htons() when dumping ports info->key.tp_src and tp_dst are __be16, when using nla_put_be16() to dump them, htons() is not needed, so remove it in this patch. Fixes: af308b94a2a4 ("netfilter: nf_tables: add tunnel support") Signed-off-by: Xin Long Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit 2f5e70c8ce47396bfa8f5c437574b569c02597bb Author: Lukas Wunner Date: Wed Nov 20 12:33:59 2019 +0100 netfilter: Document ingress hook Amend kerneldoc of struct net_device to fix a "make htmldocs" warning: include/linux/netdevice.h:2045: warning: Function parameter or member 'nf_hooks_ingress' not described in 'net_device' Reported-by: kbuild test robot Signed-off-by: Lukas Wunner Cc: Daniel Borkmann Signed-off-by: Pablo Neira Ayuso commit 871185ace40df871a93866b2a7ce441276fc4ee8 Author: Lukas Wunner Date: Wed Nov 20 12:33:59 2019 +0100 netfilter: Clean up unnecessary #ifdef If CONFIG_NETFILTER_INGRESS is not enabled, nf_ingress() becomes a no-op because it solely contains an if-clause calling nf_hook_ingress_active(), for which an empty inline stub exists in . All the symbols used in the if-clause's body are still available even if CONFIG_NETFILTER_INGRESS is not enabled. The additional "#ifdef CONFIG_NETFILTER_INGRESS" in nf_ingress() is thus unnecessary, so drop it. Signed-off-by: Lukas Wunner Cc: Daniel Borkmann Signed-off-by: Pablo Neira Ayuso commit 2b2d81a6da783ee5771a9517fd9c394ee3fdf3ba Merge: ce2b5a3af075 1d4605e0aff9 Author: David S. Miller Date: Tue Dec 17 13:55:23 2019 -0800 Merge branch 'stmmac-dwc-qos-ACPI-device-support' Ajay Gupta says: ==================== net: stmmac: dwc-qos: ACPI device support Version 3 of patches have fixes for comments from Jakub Kicinski. These two changes are needed to enable ACPI based devices to use stmmac driver. First patch is to use generic device api (device_*) instead of device tree based api (of_*). Second patch avoids clock and reset accesses for Tegra ACPI based devices. ACPI interface will be used to access clock and reset for Tegra ACPI devices in later patches. ==================== Signed-off-by: David S. Miller commit 1d4605e0aff9ffe5163b84ccefaa8c6c2387504d Author: Ajay Gupta Date: Sun Dec 15 22:14:52 2019 -0800 net: stmmac: dwc-qos: avoid clk and reset for acpi device There are no clocks, resets or gpios referenced by Tegra ACPI device so don't access clocks, resets or gpios interface with ACPI device. Clocks, resets and GPIOs for ACPI devices will be handled via ACPI interface. Signed-off-by: Ajay Gupta Signed-off-by: David S. Miller commit b59c43e03cee8537e0403be6cd4dda2cf5149455 Author: Ajay Gupta Date: Sun Dec 15 22:14:51 2019 -0800 net: stmmac: dwc-qos: use generic device api Use generic device api so that driver can work both with DT or ACPI based devices. Signed-off-by: Ajay Gupta Signed-off-by: David S. Miller commit ce2b5a3af075fe849ec115d5f3d1875147a62736 Merge: 4e133f76c111 882007ed7832 Author: David S. Miller Date: Tue Dec 17 13:48:31 2019 -0800 Merge branch 'dwmac-mediatek-add-more-support-for-RMII' Biao Huang says: ==================== net-next: stmmac: dwmac-mediatek: add more support for RMII changes in v2: PATCH 1/2 net-next: stmmac: mediatek: add more support for RMII As Andrew's comments, add the "rmii_internal" clock to the list of clocks. PATCH 2/2 net-next: dt-binding: dwmac-mediatek: add more description for RMII document the "rmii_internal" clock in dt-bindings rewrite the sample dts in dt-bindings. v1: This series is for support RMII when MT2712 SoC provides the reference clock. ==================== Signed-off-by: David S. Miller commit 882007ed783211c27e859234e78328d35ded03c7 Author: Biao Huang Date: Mon Dec 16 13:39:58 2019 +0800 net-next: dt-binding: dwmac-mediatek: add more description for RMII MT2712 SoC can provide RMII reference clock, so add corresponding description in dt-binding. Signed-off-by: Biao Huang Signed-off-by: David S. Miller commit 71a55a2315b047352b3d65e2d24724207be85ae2 Author: Biao Huang Date: Mon Dec 16 13:39:57 2019 +0800 net-next: stmmac: mediatek: add more support for RMII MT2712 SoC can provide the rmii reference clock, and the clock will output from TXC pin only, which means ref_clk pin of external PHY should connect to TXC pin in this case. Add corresponding clock and timing settings. Signed-off-by: Biao Huang Signed-off-by: David S. Miller commit 4e133f76c111cd93d56aec56604955a715bc0ea1 Merge: 6f6dded1385c ef8e0b808b90 Author: David S. Miller Date: Tue Dec 17 13:26:34 2019 -0800 Merge branch 'improve-clause-45-support-in-phylink' Russell King says: ==================== improve clause 45 support in phylink These three patches improve the clause 45 support in phylink, fixing some corner cases that have been noticed with the addition of SFP+ NBASE-T modules, but are actually a little more wisespread than I initially realised. The first issue was spotted with a NBASE-T PHY on a SFP+ module plugged into a mvneta platform. When these PHYs are not operating in USXGMII mode, but are in a single-lane Serdes mode, they will switch between one of several different PHY interface modes. If we call the MAC validate() function with the current PHY interface mode, we will restrict the supported and advertising masks to the link modes that the current PHY interface mode supports. For example, if we determine that we want to start the PHY with an interface mode of 2500BASE-X, then this setup will restrict the advertisement and supported masks to 2.5G speed link modes. What we actually want for these PHYs is to allow them to support any link modes that the PHY supports _and_ the MAC is also capable of supporting. Without knowing the details of the PHY interface modes that may be used, we can do this by using PHY_INTERFACE_MODE_NA to validate and restrict the link modes to any that the MAC supports. mvpp2 with the 88X3310 PHY avoids this problem, because the validate() implementation allows all MAC supported speeds not only for PHY_INTERFACE_MODE_NA, but also for XAUI and 10GKR modes. The first patch addresses this; current MAC drivers should continue to work as-is, but there will be a follow-on patch to fixup at least mvpp2. The second issue addresses a very similar problem that occurs when trying to use ethtool to alter the advertisement mask - we call the MAC validate() function with the current interface mode, the current support and requested advertisement masks. This immediately restricts the advertisement in the same way as the above. This patch series addresses both issues, although the patches are not in the above order. v2: fix patch 3 missing 1G link modes for SGMII and RGMII interface modes. ==================== Signed-off-by: David S. Miller commit ef8e0b808b908c49670ef00b95c7848e233ca3bd Author: Russell King Date: Fri Dec 13 18:22:12 2019 +0000 net: mvpp2: update mvpp2 validate() implementation Fix up the mvpp2 validate implementation to adopt the same behaviour as mvneta: - only allow the link modes that the specified PHY interface mode supports with the exception of 1000base-X and 2500base-X. - use the basex helper to deal with SFP modules that can be switched between 1000base-X vs 2500base-X. This gives consistent behaviour between mvneta and mvpp2. This commit depends on "net: phylink: extend clause 45 PHY validation workaround" so is not marked for backporting to stable kernels. Signed-off-by: Russell King Acked-by: Antoine Tenart Signed-off-by: David S. Miller commit df3f57ac960590f4e87ec71549efd49bbfdb25d0 Author: Russell King Date: Fri Dec 13 18:22:07 2019 +0000 net: phylink: extend clause 45 PHY validation workaround Commit e45d1f5288b8 ("net: phylink: support Clause 45 PHYs on SFP+ modules") added a workaround to support clause 45 PHYs which dynamically switch their interface mode on SFP+ modules. This was implemented by validating the PHYs supported/advertising using PHY_INTERFACE_MODE_NA, rather than the specific interface mode that we attached the PHY with. However, we already have a situation where phylink is used to connect a Marvell 88X3310 PHY which also behaves in exactly the same way, but which seemingly doesn't need this. The reason seems to be that the mvpp2 driver sets a whole bunch of link modes for PHY_INTERFACE_MODE_10GKR down to 10Mb/s, despite 10GBASE-R not actually supporting anything but 10Gb/s speeds. When testing with drivers that (correctly) take the mvneta approach, where the validate() method only returns what can be supported / advertised for the specified link mode, we find that Clause 45 PHYs do not behave as we expect: their advertisement is restricted to what the current link will support, rather than what the PHY supports through its dynamic switching. Extend this workaround to all such cases; if we have a Clause 45 PHY attaching via any means, except in USXGMII, XAUI and RXAUI which are all unable to support this dynamic switching or have other solutions to it, then we need to validate using PHY_INTERFACE_MODE_NA. This should allow mvpp2 to switch to a more conformant validate() implementation. Signed-off-by: Russell King Signed-off-by: David S. Miller commit 5d57c327584ae0f88eba61ec8faa9c621f40cffd Author: Russell King Date: Fri Dec 13 18:22:02 2019 +0000 net: phylink: improve clause 45 PHY ksettings_set implementation While testing ethtool with the Methode DM7052 module, it was noticed that attempting to set the advertising mask results in the mask being truncated to the support offered by the currently chosen PHY interface mode. When a PHY dynamically changes the PHY interface mode, limiting the advertising mask in this way is not correct - if the PHY happened to negotiate 10GBASE-T, and selected 10GBASE-R as the host interface, we don't want to restrict the advertisement to just 10GBASE-* modes. Rework setting the advertisement to take account of this; do not pass the requested advertisement through phylink_validate(), but rely on the advertisement restriction (supported mask) set when the PHY was initially setup. Signed-off-by: Russell King Signed-off-by: David S. Miller commit c8d4a56082eebabbf96ddb86238808c30124f06b Author: Linus Walleij Date: Tue Dec 17 16:09:59 2019 +0100 drm/mcde: Some fixes to handling video mode The video DSI mode had not really been tested. These fixes makes it more likely to work on real hardware: - Put the active width (x width) in the right bits and the VSA (vertical sync active) in the right bits (those were swapped). - Calculate the packet sizes in bytes as in the vendor driver, rather than in bits. Test the calculations agains a spreadsheet and confirmed by debug prints to be reasonable. - Also verified the register values with relative confidence to register dumps from the Samsung GT-I8190 boot loader graphics. We are not identical but not off by far either. - Error out if the current mode and refresh frequency doesn't work out. (In the future we may simply want to scale down the vrefresh.) - Handle negative result in front/back/sync packages and fall back to zero like in the vendor driver. - Put in lots of clarifying comments and references to the documentation where the code is hard to understand. - Set the DSI_VID_VCA_SETTING2 field DSI_VID_VCA_SETTING2_MAX_LINE_LIMIT to blkline_pck - 6 as in the vendor driver and mask the field properly. - Set the DSI_VID_VCA_SETTING1 field DSI_VID_VCA_SETTING1_MAX_BURST_LIMIT to blkeol_pck - 6 to blkeol_duration - 6 as in the vendor driver. Cc: Stephan Gerhold Fixes: 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE") Link: https://patchwork.freedesktop.org/patch/msgid/20191217150959.17215-1-linus.walleij@linaro.org Reviewed-by: Stephan Gerhold Signed-off-by: Linus Walleij commit 4a34a9dcec9405e29a0ad7f56400581fbd780691 Author: Andy Shevchenko Date: Tue Dec 17 16:07:21 2019 +0200 drm/drm_panel: Fix EXPORT of drm_panel_of_backlight() one more time The initial commit followed by the fix didn't take into consideration the case: CONFIG_DRM_PANEL=y CONFIG_BACKLIGHT_CLASS_DEVICE=m CONFIG_DRM_I915=y where symbol devm_of_find_backlight() is not reachable from DRM subsystem. Quick fix is to avoid drm_panel_of_backlight() from exporting in such case. Fixes: 907aa265fde6 ("drm/drm_panel: fix EXPORT of drm_panel_of_backlight") Reported-by: Randy Dunlap Acked-by: Randy Dunlap # build-tested Cc: Linus Walleij Cc: Sam Ravnborg Cc: Laurent Pinchart Cc: Thierry Reding Cc: Maarten Lankhorst Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Maxime Ripard Cc: dri-devel@lists.freedesktop.org Signed-off-by: Andy Shevchenko Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191217140721.42432-1-andriy.shevchenko@linux.intel.com commit 09a80f2aef06b7c86143f5c14efd3485e0d2c139 Author: Trond Myklebust Date: Tue Dec 17 12:33:33 2019 -0500 nfsd: Return the correct number of bytes written to the file We must allow for the fact that iov_iter_write() could have returned a short write (e.g. if there was an ENOSPC issue). Fixes: d890be159a71 "nfsd: Add I/O trace points in the NFSv4 write path" Signed-off-by: Trond Myklebust Signed-off-by: J. Bruce Fields commit 7d411afe8444060454a53b1f9b70ee78b3e75ef1 Author: zhong jiang Date: Wed Dec 18 00:38:22 2019 +0530 dma-heap: Make the symbol 'dma_heap_ioctl_cmds' static Fix the following sparse warning. drivers/dma-buf/dma-heap.c:109:14: warning: symbol 'dma_heap_ioctl_cmds' was not declared. Should it be static? Acked-by: Andrew F. Davis Acked-by: John Stultz Signed-off-by: zhong jiang Signed-off-by: Sumit Semwal [sumits: rebased over IOCTL rename patches] Link: https://patchwork.freedesktop.org/patch/msgid/20191217190822.1969-1-sumit.semwal@linaro.org commit c3d68019fce26fb6fa3a37fe152635064b16997a Merge: e691c23ebe8f 42a1e9450c27 Author: Olof Johansson Date: Tue Dec 17 10:03:56 2019 -0800 Merge tag 'ux500-armsoc-v5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into arm/dt First set of Ux500 DTS changes for the v5.6 kernel: - Add the GPADC IIO channels - Factor out generic pin configuration - Add the gpio_in_nopull configuration - Tighten up I2C and SPI buses - Clean up some compatibles - Extract a generic DB8500 DTSI - Add HREF520 DTS and the associated DB8520 DTSI - Split TVK R2 and R3 to separate DTSI files * tag 'ux500-armsoc-v5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: ARM: dts: ux500: Add devicetree for HREF520 ARM: dts: ux500: Split TVK DTSI files in two ARM: dts: ux500: Break out DB8500 DTSI ARM: dts: ux500: Drop pulls on I2C buses ARM: dts: ux500: Use "arm,pl031" compatible for PL031 ARM: dts: ux500: Add "simple-bus" compatible to soc node ARM: dts: ux500: Remove ux500_ prefix from ux500_serial* labels ARM: dts: ux500: Move serial aliases to ste-dbx5x0.dtsi ARM: dts: ux500: Add aliases for I2C and SPI buses ARM: dts: ux500: Disable I2C/SPI buses by default ARM: dts: ux500: nomadik-pinctrl: Add &gpio_in_nopull ARM: dts: ux500: Add pin configs for UART1 CTS/RTS pins ARM: dts: ux500: Add alternative SDI pin configs ARM: dts: ux500: Rename generic pin configs according to pin group ARM: dts: ux500: Move generic pin configs out of ste-href-family-pinctrl.dtsi dt-bindings: arm: Document compatibles for Ux500 boards ARM: dts: ux500: snowball: Remove unused PRCMU cpufreq node ARM: dts: ux500: declare GPADC IIO ADC channels Link: https://lore.kernel.org/r/CACRpkdYfqJ=VXkP3Qm5Lw63AuR=1ChxbUW+Y-nhw5gCX6sYfDw@mail.gmail.com Signed-off-by: Olof Johansson commit 4601832f40501efc3c2fd264a5a69bd1ac17d520 Author: Suman Anna Date: Thu Dec 12 15:05:41 2019 +0200 ARM: OMAP2+: use separate IOMMU pdata to fix DRA7 IPU1 boot The IPU1 MMU has been using common IOMMU pdata quirks defined and used by all IPU IOMMU devices on OMAP4 and beyond. Separate out the pdata for IPU1 MMU with the additional .set_pwrdm_constraint ops plugged in, so that the IPU1 power domain can be restricted to ON state during the boot and active period of the IPU1 remote processor. This eliminates the pre-conditions for the IPU1 boot issue as described in commit afe518400bdb ("iommu/omap: fix boot issue on remoteprocs with AMMU/Unicache"). NOTE: 1. RET is not a valid target power domain state on DRA7 platforms, and IPU power domain is normally programmed for OFF. The IPU1 still fails to boot though, and an unclearable l3_noc error is thrown currently on 4.14 kernel without this fix. This behavior is slightly different from previous 4.9 LTS kernel. 2. The fix is currently applied only to IPU1 on DRA7xx SoC, as the other affected processors on OMAP4/OMAP5/DRA7 are in domains that are not entering RET. IPU2 on DRA7 is in CORE power domain which is only programmed for ON power state. The fix can be easily scaled if these domains do hit RET in the future. 3. The issue was not seen on current DRA7 platforms if any of the DSP remote processors were booted and using one of the GPTimers 5, 6, 7 or 8 on previous 4.9 LTS kernel. This was due to the errata fix for i874 implemented in commit 1cbabcb9807e ("ARM: DRA7: clockdomain: Implement timer workaround for errata i874") which keeps the IPU1 power domain from entering RET when the timers are active. But the timer workaround did not make any difference on 4.14 kernel, and an l3_noc error was seen still without this fix. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit 4ea3711aece423a160c5b341ba531ccc81c009d1 Author: Tero Kristo Date: Thu Dec 12 15:05:40 2019 +0200 ARM: OMAP2+: omap-iommu.c conversion to ti-sysc Convert omap2 iommu platform code to use ti-sysc instead of legacy omap-device / hwmod interfaces. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 2f14101a1d760db72393910d481fbf7768c44530 Author: Suman Anna Date: Thu Dec 12 15:05:39 2019 +0200 ARM: OMAP2+: Add workaround for DRA7 DSP MStandby errata i879 Errata Title: i879: DSP MStandby requires CD_EMU in SW_WKUP Description: The DSP requires the internal emulation clock to be actively toggling in order to successfully enter a low power mode via execution of the IDLE instruction and PRCM MStandby/Idle handshake. This assumes that other prerequisites and software sequence are followed. Workaround: The emulation clock to the DSP is free-running anytime CCS is connected via JTAG debugger to the DSP subsystem or when the CD_EMU clock domain is set in SW_WKUP mode. The CD_EMU domain can be set in SW_WKUP mode via the CM_EMU_CLKSTCTRL [1:0]CLKTRCTRL field. Implementation: This patch implements this workaround by denying the HW_AUTO mode for the EMU clockdomain during the power-up of any DSP processor and re-enabling the HW_AUTO mode during the shutdown of the last DSP processor (actually done during the enabling and disabling of the respective DSP MDMA MMUs). Reference counting has to be used to manage the independent sequencing between the multiple DSP processors. This switching is done at runtime rather than a static clockdomain flags value to meet the target power domain state for the EMU power domain during suspend. Note that the DSP MStandby behavior is not consistent across all boards prior to this fix. Please see commit 45f871eec6c0 ("ARM: OMAP2+: Extend DRA7 IPU1 MMU pdata quirks to DSP MDMA MMUs") for details. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit e4c4b540e1e6c21ff8b987e92b2bd170ee006a94 Author: Tero Kristo Date: Thu Dec 12 15:05:38 2019 +0200 ARM: OMAP4+: remove pdata quirks for omap4+ iommus IOMMU driver will be using ti-sysc bus driver for power management control going forward, and the pdata quirks are not needed for anything anymore. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 8de44fb70659a5bc0c53a443e6129ea1bf00fd8b Author: Tero Kristo Date: Thu Dec 12 15:05:37 2019 +0200 ARM: OMAP2+: pdata-quirks: add PRM data for reset support The parent clockdomain for reset must be in force wakeup mode, otherwise the reset may never complete. Add pdata quirks for this purpose for PRM driver. Signed-off-by: Tero Kristo Acked-by: Tony Lindgren Signed-off-by: Tony Lindgren commit be452c4e8d1434a0095a9baa6523bb9772258d59 Merge: d2e532286d4f ad808910be68 Author: Daniel Vetter Date: Tue Dec 17 18:47:46 2019 +0100 Merge tag 'drm-next-5.6-2019-12-11' of git://people.freedesktop.org/~agd5f/linux into drm-next drm-next-5.6-2019-12-11: amdgpu: - Add MST atomic routines - Add support for DMCUB (new helper microengine for displays) - Add OEM i2c support in DC - Use vstartup for vblank events on DCN - Simplify Kconfig for DC - Renoir fixes for DC - Clean up function pointers in DC - Initial support for HDCP 2.x - Misc code cleanups - GFX10 fixes - Rework JPEG engine handling for VCN - Add clock and power gating support for JPEG - BACO support for Arcturus - Cleanup PSP ring handling - Add framework for using BACO with runtime pm to save power - Move core pci state handling out of the driver for pm ops - Allow guest power control in 1 VF case with SR-IOV - SR-IOV fixes - RAS fixes - Support for power metrics on renoir - Golden settings updates for gfx10 - Enable gfxoff on supported navi10 skus - Update MAINTAINERS amdkfd: - Clean up generational gfx code - Fixes for gfx10 - DIQ fixes - Share more code with amdgpu radeon: - PPC DMA fix - Register checker fixes for r1xx/r2xx - Misc cleanups From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191211223020.7510-1-alexander.deucher@amd.com commit 6e678a76b3451be4e099e30a4875bfc7be5ffd2f Author: Tero Kristo Date: Tue Dec 17 09:44:16 2019 -0800 ARM: OMAP5: hwmod-data: remove OMAP5 IOMMU hwmod data IOMMUs are now supported via ti-sysc, so the legacy hwmod data can be removed. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit e4ebfc2ce6cc26080f3ea2964b22a6abe2cef4ec Author: Tero Kristo Date: Tue Dec 17 09:35:31 2019 -0800 ARM: OMAP4: hwmod-data: remove OMAP4 IOMMU hwmod data IOMMUs are now supported via ti-sysc, so the legacy hwmod data can be removed. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 54a751f623f54af53cfbb154b9c3a8bdcc43c9e2 Merge: d864dbdfa6dd a6c8056d2f34 Author: Tony Lindgren Date: Tue Dec 17 09:34:14 2019 -0800 Merge branch 'omap-for-v5.6/ti-sysc-dt' into omap-for-v5.6/ti-sysc-drop-pdata commit a6c8056d2f34e8d8fec398630facb32673f23984 Author: Tero Kristo Date: Thu Dec 12 14:51:21 2019 +0200 ARM: dts: omap5: convert IOMMUs to use ti-sysc Convert omap5 IOMMUs to use ti-sysc instead of legacy omap-hwmod based implementation. Enable the IOMMUs also while doing this. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 22f8d6649d4b185c64e9d79ace5c9b2b6a05f851 Author: Tero Kristo Date: Thu Dec 12 14:51:20 2019 +0200 ARM: dts: omap4: convert IOMMUs to use ti-sysc Convert omap4 IOMMUs to use ti-sysc instead of legacy omap-hwmod based implementation. Enable the IOMMUs also while doing this. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 3e4120b9c0bfc62fe2ce6a8fdc8cdaa9acd61b19 Author: Tero Kristo Date: Thu Dec 12 14:51:19 2019 +0200 ARM: dts: dra74x: convert IOMMUs to use ti-sysc Convert dra74x IOMMUs to use ti-sysc instead of legacy omap-hwmod based implementation. Enable the IOMMUs also while doing this. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit dbd2d6f9be967bda11ec1d5f1c9d2782520b1ea0 Author: Tero Kristo Date: Thu Dec 12 14:51:18 2019 +0200 ARM: dts: dra7: convert IOMMUs to use ti-sysc Convert dra7 IOMMUs to use ti-sysc instead of legacy omap-hwmod based implementation. Enable the IOMMUs also while doing this. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren commit 85bedbf191e82aac0d7f05623bccfeccdcd91cea Author: Chris Wilson Date: Tue Dec 17 01:16:59 2019 +0000 drm/i915/gt: Eliminate the trylock for reading a timeline's hwsp As we stash a pointer to the HWSP cacheline on the request, when reading it we only need confirm that the cacheline is still valid by checking that the request and timeline are still intact. v2: Protect hwsp_cachline with RCU Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191217011659.3092130-1-chris@chris-wilson.co.uk commit f9d3b2c600075d1f79efcd5cdb1718c2f554c0f9 Author: Colin Ian King Date: Mon Dec 16 16:10:59 2019 +0000 dma-buf: fix resource leak on -ENOTTY error return path The -ENOTTY error return path does not free the allocated kdata as it returns directly. Fix this by returning via the error handling label err. Addresses-Coverity: ("Resource leak") Fixes: c02a81fba74f ("dma-buf: Add dma-buf heaps framework") Signed-off-by: Colin Ian King Acked-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20191216161059.269492-1-colin.king@canonical.com commit 8b6fc114beeb9f1a270e5b6d25c30a5143801bf8 Author: Aditya Pakki Date: Sun Dec 15 13:43:44 2019 -0600 drm: remove duplicate check on parent and avoid BUG_ON In drm_dev_init, parent is checked for NULL via assert after checked in devm_drm_dev_init(). The patch removes the duplicate check and replaces the assertion with WARN_ON. Further, it returns -EINVAL consistent with the usage in devm_drm_dev_init. Signed-off-by: Aditya Pakki Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191215194345.4679-1-pakki001@umn.edu commit 4f865a74c8f8a694eb9f6b6fdb8f5d8f475c8875 Author: Daniel Vetter Date: Fri Dec 13 18:26:07 2019 +0100 drm/mediatek: plane_state->fb iff plane_state->crtc Checking both is one too much, so wrap a WARN_ON around it to stope the copypasta. Acked-by: CK Hu Acked-by: Sam Ravnborg Signed-off-by: Daniel Vetter Cc: CK Hu Cc: Philipp Zabel Cc: Matthias Brugger Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Link: https://patchwork.freedesktop.org/patch/msgid/20191213172612.1514842-5-daniel.vetter@ffwll.ch commit e529878e4bc156ea021791a840b2f43f8fe4840d Author: Daniel Vetter Date: Fri Dec 13 18:26:04 2019 +0100 drm/malidp: plane_state->fb iff plane_state->crtc Checking both is one too much, so wrap a WARN_ON around it to stope the copypasta. Acked-by: Liviu Dudau Acked-by: Sam Ravnborg Signed-off-by: Daniel Vetter Cc: Liviu Dudau Cc: Brian Starkey Link: https://patchwork.freedesktop.org/patch/msgid/20191213172612.1514842-2-daniel.vetter@ffwll.ch commit caa2a778109cf585d220bd9e78d2c49fbc20b15c Author: Daniel Vetter Date: Sat Dec 14 01:09:27 2019 +0100 drm/etnaviv: Use dma_resv locking wrappers I'll add more fancy logic to them soon, so everyone really has to use them. Plus they already provide some nice additional debug infrastructure on top of direct ww_mutex usage for the fences tracked by dma_resv. v2: Fix the lost _interruptible (Michael) Acked-by: Michael J. Ruhl Reviewed-by: Lucas Stach Signed-off-by: Daniel Vetter Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Cc: etnaviv@lists.freedesktop.org Cc: "Ruhl, Michael J" Link: https://patchwork.freedesktop.org/patch/msgid/20191214000927.1616384-1-daniel.vetter@ffwll.ch commit 616b549b15f0e18f37641e7674b0c4658fedd424 Author: Daniel Vetter Date: Mon Nov 25 10:43:56 2019 +0100 drm/vc4: Use dma_resv locking wrappers I'll add more fancy logic to them soon, so everyone really has to use them. Plus they already provide some nice additional debug infrastructure on top of direct ww_mutex usage for the fences tracked by dma_resv. Reviewed-by: Eric Anholt Cc: Eric Anholt Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191125094356.161941-5-daniel.vetter@ffwll.ch commit 80f30930b6e9bfcb264e8b2e82b05abf3e1a8727 Author: Daniel Vetter Date: Mon Nov 25 10:43:55 2019 +0100 drm/msm: Use dma_resv locking wrappers I'll add more fancy logic to them soon, so everyone really has to use them. Plus they already provide some nice additional debug infrastructure on top of direct ww_mutex usage for the fences tracked by dma_resv. Reviewed-by: Eric Anholt Signed-off-by: Daniel Vetter Cc: Rob Clark Cc: Sean Paul Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20191125094356.161941-4-daniel.vetter@ffwll.ch commit d864dbdfa6ddaa24132c637d925463be71d83092 Author: Tony Lindgren Date: Tue Dec 10 08:10:25 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap4 fdif 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. Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 5725e6c169c6c20b9026b7a4c98a5ba20b128027 Author: Tony Lindgren Date: Tue Dec 10 08:10:26 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap4 slimbus 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. Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 8c77b65635a655b16dd4c2e56b804dce09989067 Author: Tony Lindgren Date: Tue Dec 10 08:10:26 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap5 kbd 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. Tested-by: Keerthy Signed-off-by: Tony Lindgren commit a9e2d3c61d3d029246c0c5a340af10bbd3331834 Author: Tony Lindgren Date: Tue Dec 10 08:10:26 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap4 kbd 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. Tested-by: Keerthy Signed-off-by: Tony Lindgren commit e54740b4afe8584c3ca09031ff2b003f4719e826 Author: Tony Lindgren Date: Tue Dec 10 08:10:25 2019 -0800 ARM: OMAP2+: Drop legacy platform data for dra7 smartreflex 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. Tested-by: Keerthy Signed-off-by: Tony Lindgren commit a6b1e717e9422c7ba8c879104ab0d953aefe061c Author: Tony Lindgren Date: Tue Dec 10 08:10:24 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap4 smartreflex 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. Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 72b48b999cb1fb185e04ad6c4280852f0611f10e Author: Tony Lindgren Date: Tue Dec 10 08:10:23 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap4 hsi 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: Sebastian Reichel Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 027678deaee332944063f19f9c30fef3309475ef Author: Tony Lindgren Date: Tue Dec 10 08:10:23 2019 -0800 ARM: OMAP2+: Drop legacy platform data for am4 vpfe 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: Benoit Parrot Cc: Keerthy Tested-by: Keerthy Signed-off-by: Tony Lindgren commit adb47d9d141d846bbd8029a1dde4600cf2ab4596 Author: Tony Lindgren Date: Tue Dec 10 08:10:22 2019 -0800 ARM: OMAP2+: Drop legacy platform data for dra7 ocp2scp 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: Keerthy Cc: Roger Quadros Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 08f721e833dcae228e0db0a3de54b50a1b92c2e7 Author: Tony Lindgren Date: Tue Dec 10 08:10:22 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap5 ocp2scp 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: Keerthy Cc: Roger Quadros Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 813b09b05d49376557838273ebd4979ce0658acf Author: Tony Lindgren Date: Tue Dec 10 08:10:22 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap4 ocp2scp 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: Bin Liu Cc: Keerthy Cc: Roger Quadros Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 269e6ec23aeb65a106a1f9afc46ed1fe68a6f0c3 Author: Tony Lindgren Date: Tue Dec 10 08:10:21 2019 -0800 ARM: OMAP2+: Drop legacy platform data for am4 ocp2scp 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: Keerthy Cc: Roger Quadros Tested-by: Keerthy Signed-off-by: Tony Lindgren commit adb72394e2abe9c3a2af5c4a9e18d6592e17b34b Author: Tony Lindgren Date: Tue Dec 10 08:10:21 2019 -0800 ARM: OMAP2+: Drop legacy platform data for am3 lcdc 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: Keerthy Cc: Jyri Sarha Cc: Tomi Valkeinen Tested-by: Keerthy Signed-off-by: Tony Lindgren commit a9f31495c6127fad42e477c5d4908dc563acc6e1 Author: Tony Lindgren Date: Tue Dec 10 08:10:20 2019 -0800 ARM: OMAP2+: Drop legacy platform data for dra7 elm 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: Franklin S Cooper Jr Cc: Keerthy Cc: Roger Quadros Tested-by: Keerthy Signed-off-by: Tony Lindgren commit fccccdcd85f89d5be17770bd1f747c0fc86f960b Author: Tony Lindgren Date: Tue Dec 10 08:10:20 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap4 elm 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: Franklin S Cooper Jr Cc: Keerthy Cc: Roger Quadros Tested-by: Keerthy Signed-off-by: Tony Lindgren commit ff594e2296c3e7a8f6aaa60b686acc1ae7a7c7ae Author: Tony Lindgren Date: Tue Dec 10 08:10:19 2019 -0800 ARM: OMAP2+: Drop legacy platform data for am3 and am4 elm 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: Franklin S Cooper Jr Cc: Keerthy Cc: Roger Quadros Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 97752cc26ef1018eb6c85e88ce0d76bdedf8a9ba Author: Tony Lindgren Date: Tue Dec 10 08:10:19 2019 -0800 ARM: OMAP2+: Drop legacy platform data for am4 adc_tsc 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: Andrew F. Davis Cc: Keerthy Cc: Vignesh R Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 958036e212530b3df5022d7de16ce6f4952b417a Author: Tony Lindgren Date: Tue Dec 10 08:10:18 2019 -0800 ARM: OMAP2+: Drop legacy platform data for am3 adc_tsc 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: Andrew F. Davis Cc: Keerthy Cc: Vignesh R Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 80d861cda65003ad25a8d649c7e7a9b3d1d03301 Author: Tony Lindgren Date: Tue Dec 10 08:10:18 2019 -0800 ARM: OMAP2+: Drop legacy platform data for dra7 dcan 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: Keerthy Cc: Roger Quadros Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 17b6e0280f31356cc58f6a3f483082c038ea4fb0 Author: Tony Lindgren Date: Tue Dec 10 08:10:18 2019 -0800 ARM: OMAP2+: Drop legacy platform data for am3 and am4 dcan 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: Keerthy Cc: Roger Quadros Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 78e2d1f4b703468992ac90edc7f4edbe72f5a87c Author: Tony Lindgren Date: Tue Dec 10 08:10:15 2019 -0800 ARM: OMAP2+: Drop legacy platform data for am3 and am4 spi 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: Keerthy Cc: Vignesh R Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 4554f0a1cbe65ad11cb31e16d043bacc0aae2984 Author: Tony Lindgren Date: Tue Dec 10 08:10:15 2019 -0800 ARM: OMAP2+: Drop legacy platform data for dra7 spinlock 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: Suman Anna Cc: Keerthy Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 995c1535da0a2a7224e5fc2a7834aecc7ba5448f Author: Tony Lindgren Date: Tue Dec 10 08:10:14 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap5 spinlock 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: Suman Anna Cc: Keerthy Tested-by: Keerthy Signed-off-by: Tony Lindgren commit d169232953f0996853594a89cc1a1c485b51169a Author: Tony Lindgren Date: Tue Dec 10 08:10:14 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap4 spinlock 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: Suman Anna Cc: Keerthy Tested-by: Keerthy Signed-off-by: Tony Lindgren commit c62201a3565b5eac6767dbf74776fde2d9053c61 Author: Tony Lindgren Date: Tue Dec 10 08:10:14 2019 -0800 ARM: OMAP2+: Drop legacy platform data for am3 and am4 spinlock 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: Suman Anna Cc: Keerthy Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 846a1b675c8faf2574548412aacd858c87cde717 Author: Tony Lindgren Date: Tue Dec 10 08:10:13 2019 -0800 ARM: OMAP2+: Drop legacy platform data for dra7 epwmss 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: Franklin S Cooper Jr Cc: Keerthy Cc: Vignesh R Tested-by: Keerthy Signed-off-by: Tony Lindgren commit cfbeeedaa5dc162806b0d0a51f4654af1bbbfebf Author: Tony Lindgren Date: Tue Dec 10 08:10:13 2019 -0800 ARM: OMAP2+: Drop legacy platform data for am3 and am4 epwmss 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: Franklin S Cooper Jr Cc: Keerthy Cc: Vignesh R Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 3d1d10be064ba7492675963745b89e2d167de8f1 Author: Tony Lindgren Date: Tue Dec 10 08:10:12 2019 -0800 ARM: OMAP2+: Drop legacy platform data for dra7 timers except timer1 to 4 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: Keerthy Cc: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit aec5180205596395e20732643e8f6919efb12c2d Author: Tony Lindgren Date: Tue Dec 10 08:10:12 2019 -0800 ARM: OMAP2+: Drop legacy platform data for am3 and am4 timers except timer1 and 2 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: Keerthy Cc: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 1b44c550a481b60d28861bf0f5108dc2bedc61ed Author: Tony Lindgren Date: Tue Dec 10 08:10:11 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap5 timers except timer1 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: Keerthy Cc: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit bfdfd5636a9dfb0fa66052e6bac096909af84675 Author: Tony Lindgren Date: Tue Dec 10 08:10:11 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap4 timers except timer1 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: Keerthy Cc: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 11b27908a3bd5068e5af3cba2c18a492b66e0772 Author: Tony Lindgren Date: Thu Dec 12 09:46:19 2019 -0800 ARM: OMAP2+: Drop legacy platform data for dra7 des 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: Keerthy Cc: Tero Kristo Tested-by: Tero Kristo Reviewed-by: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 69471c654ad90ca9de49e7f08e8a25b2c7250fe7 Author: Tony Lindgren Date: Thu Dec 12 09:46:19 2019 -0800 ARM: OMAP2+: Drop legacy platform data for am4 des 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: Keerthy Cc: Tero Kristo Tested-by: Tero Kristo Reviewed-by: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 1633d8d3724164fe4ea3d61d2b2eb213c4a41ac3 Author: Tony Lindgren Date: Thu Dec 12 09:46:18 2019 -0800 ARM: OMAP2+: Drop legacy platform data for dra7 aes 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: Keerthy Cc: Tero Kristo Tested-by: Tero Kristo Reviewed-by: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit c31502179d0609104e9247869b04c43c1eea9e31 Author: Tony Lindgren Date: Thu Dec 12 09:46:18 2019 -0800 ARM: OMAP2+: Drop legacy platform data for am3 and am4 aes 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: Keerthy Cc: Tero Kristo Tested-by: Tero Kristo Reviewed-by: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 68e3b63e7538faf15ca4bcc7ad5e261b3b1cbd01 Author: Tony Lindgren Date: Thu Dec 12 09:46:18 2019 -0800 ARM: OMAP2+: Drop legacy platform data for dra7 sham 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: Keerthy Cc: Tero Kristo Tested-by: Tero Kristo Reviewed-by: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 6899cf73880ea69be6a482ff0983a86b28abb90c Author: Tony Lindgren Date: Thu Dec 12 09:46:17 2019 -0800 ARM: OMAP2+: Drop legacy platform data for am3 and am4 sham 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: Keerthy Cc: Tero Kristo Tested-by: Tero Kristo Reviewed-by: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 4150fe384e4dc553e6e5dfb03e0416df23425fee Author: Tony Lindgren Date: Tue Dec 10 08:10:11 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap5 mcpdm 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: Keerthy Cc: Peter Ujfalusi Cc: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 1d2a38d42b043e30e95545fdcc92edd51364dfe4 Author: Tony Lindgren Date: Tue Dec 10 08:10:10 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap5 dmic 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: Keerthy Cc: Peter Ujfalusi Cc: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 6974285ed52a9d28cdad4538ccbc7731c2e71738 Author: Tony Lindgren Date: Tue Dec 10 08:10:10 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap4 mcpdm 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: Keerthy Cc: Peter Ujfalusi Cc: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit a0fc37ff28c00aaea2909e90c785dc5e2fa23dbb Author: Tony Lindgren Date: Tue Dec 10 08:10:09 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap4 dmic 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: Keerthy Cc: Peter Ujfalusi Cc: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 19c8915ca38f8ac4d1fe380c342ce36c6eb03e15 Author: Tony Lindgren Date: Tue Dec 10 08:10:09 2019 -0800 ARM: OMAP2+: Drop legacy platform data for omap4 aess 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: Keerthy Cc: Peter Ujfalusi Cc: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 0cd62d5e7432897d8892b3fc0f9ab17d3a57764c Author: Tony Lindgren Date: Thu Dec 12 09:46:09 2019 -0800 ARM: OMAP2+: Drop legacy platform data for am4 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: Jean Pihet Acked-by: Jean Pihet Signed-off-by: Tony Lindgren commit eabb3f5a1b4ff3994428ab6438b2422646c82033 Author: Tony Lindgren Date: Thu Dec 12 09:46:17 2019 -0800 ARM: dts: Configure interconnect target module for dra7 des 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: Keerthy Cc: Tero Kristo Tested-by: Tero Kristo Reviewed-by: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit f6d9eb0c253b8cd38ee9d0a2bda9364338528b7e Author: Tony Lindgren Date: Thu Dec 12 09:46:17 2019 -0800 ARM: dts: Configure interconnect target module for am4 des 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: Keerthy Cc: Tero Kristo Tested-by: Tero Kristo Reviewed-by: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 2ea3ce2cf6abbdc446b4742c97f6528e73b74345 Author: Tony Lindgren Date: Thu Dec 12 09:46:16 2019 -0800 ARM: dts: Configure interconnect target module for dra7 aes 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: Keerthy Cc: Tero Kristo Tested-by: Tero Kristo Reviewed-by: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit e9225f22c760c6a6a04290eb4195ade079c22625 Author: Tony Lindgren Date: Thu Dec 12 09:46:16 2019 -0800 ARM: dts: Configure interconnect target module for am4 aes 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: Keerthy Cc: Tero Kristo Tested-by: Tero Kristo Reviewed-by: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit b4679c0544fe68361b9bbe63f0b43a2e45f6fd27 Author: Tony Lindgren Date: Thu Dec 12 09:46:15 2019 -0800 ARM: dts: Configure interconnect target module for am3 aes 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: Keerthy Cc: Tero Kristo Tested-by: Tero Kristo Reviewed-by: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit e132681cef0aedf0a10858bc8cca74a0e9338025 Author: Tony Lindgren Date: Thu Dec 12 09:46:15 2019 -0800 ARM: dts: Configure interconnect target module for dra7 sham 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. Similar to am3, I could not find any documentation for the sysc register on this one, but it seems to work just fine based on "ti,sysc-omap3-sham" compatible style configuration. Cc: Keerthy Cc: Tero Kristo Tested-by: Tero Kristo Reviewed-by: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit ed8e44dfa75762218368717a6a37b3b2bbdc5efd Author: Tony Lindgren Date: Thu Dec 12 09:46:14 2019 -0800 ARM: dts: Configure interconnect target module for am4 sham 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. Similar to am3, I could not find any documentation for the sysc register on this one, but it seems to work just fine based on "ti,sysc-omap3-sham" compatible style configuration. Cc: Keerthy Cc: Tero Kristo Tested-by: Tero Kristo Reviewed-by: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit e36afc29ea98319247c3a33ff8d3590d00b5414e Author: Tony Lindgren Date: Thu Dec 12 09:46:14 2019 -0800 ARM: dts: Configure interconnect target module for am3 sham 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. I could not find any documentation for the sysc register on this one, but it seems to work just fine with "ti,sysc-omap3-sham" compatible style configuration. Cc: Keerthy Cc: Tero Kristo Tested-by: Tero Kristo Reviewed-by: Tero Kristo Tested-by: Keerthy Signed-off-by: Tony Lindgren commit f60c41257fa06d496c9653d3f77d34b7426d9274 Author: Tony Lindgren Date: Thu Dec 12 09:46:09 2019 -0800 ARM: dts: Configure interconnect target module for am4 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: Jean Pihet Acked-by: Jean Pihet Tested-by: Keerthy Signed-off-by: Tony Lindgren commit 263e38f82cbb35bf59727a2375099482dc3331da Author: Andrew F. Davis Date: Mon Dec 16 08:34:05 2019 -0500 dma-buf: heaps: Remove redundant heap identifier from system heap name The heaps are already in a directory of heaps, adding _heap to a heap name is redundant. This patch is only a name change, no logic is changed. Signed-off-by: Andrew F. Davis Acked-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20191216133405.1001-3-afd@ti.com commit b3b4346544b571c96d46be615b9db69a601ce4c8 Author: Andrew F. Davis Date: Mon Dec 16 08:34:04 2019 -0500 dma-buf: heaps: Use _IOCTL_ for userspace IOCTL identifier This is more consistent with the DMA and DRM frameworks convention. This patch is only a name change, no logic is changed. Signed-off-by: Andrew F. Davis Acked-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20191216133405.1001-2-afd@ti.com commit 4c74ecf79227228f31d05d6d4766ccb5f8607b83 Author: Tony Lindgren Date: Mon Dec 16 14:41:53 2019 -0800 dmaengine: ti: omap-dma: Add device tree match data and use it for cpu_pm With old DMA code disabled for handling DMA requests for device tree based SoCs, we can move omap3 specific context save and restore to the dmaengine driver. Let's do this by adding cpu_pm notifier handling to save and restore context, and enable it based on device tree match data. This way we can use the match data later to configure more SoC specific features later on too. Note that we only clear the channels in use while the platform code also clears reserved channels 0 and 1 on high-security SoCs. Based on testing on n900, this is not needed though and the system idles just fine. With the dmaengine driver handling context save and restore, we must now remove the old custom calls for context save and restore. Cc: Aaro Koskinen Cc: Arnd Bergmann Cc: Peter Ujfalusi Cc: Russell King Cc: Vinod Koul Acked-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Acked-by: Vinod Koul Signed-off-by: Tony Lindgren commit c6797bcde3070bb143a5ccbb5fe054f1ef6252e9 Author: Tony Lindgren Date: Mon Dec 16 14:41:53 2019 -0800 ARM: OMAP2+: Configure dma_plat_info directly and drop dma_dev_attr Let's prepare things for passing dma_plat_info to the dmaengine driver in device tree auxdata. To do that, we want to configure dma_plat_info directly. And we can also drop the related dma_dev_attr data. Cc: Aaro Koskinen Cc: Arnd Bergmann Cc: Peter Ujfalusi Cc: Russell King Cc: Vinod Koul Acked-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit f002180c3c4608dae5b184bdd8bfdbcf67e14fbe Author: Tony Lindgren Date: Mon Dec 16 14:41:53 2019 -0800 ARM: OMAP2+: Configure sdma capabilities directly Only earlier SoCs need to be checked for this, all SoCs starting with omap3630 have CCDN register. This way we get closer to removing the need to ioremap sdma registers in the platform code. Cc: Aaro Koskinen Cc: Arnd Bergmann Cc: Peter Ujfalusi Cc: Russell King Cc: Vinod Koul Acked-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit 755cbfd8cf89c09e53be796d7d5c22f2d197ef1a Author: Tony Lindgren Date: Mon Dec 16 14:41:53 2019 -0800 ARM: OMAP2+: Drop sdma interrupt handling for mach-omap2 All device tree probing omap SoCs only have device drivers that are using Linux dmaengine API with the IRQENABLE_L1 interrupts. Only omap1 is still using old legacy dma. This means we can remove the legacy sdma interrupt handling for IRQENABLE_L0, and only rely on the dmaengine driver using IRQENABLE_L1. The legacy code still allocates the channels, but that will be deal with in the following patches. Cc: Aaro Koskinen Cc: Arnd Bergmann Cc: Peter Ujfalusi Cc: Russell King Cc: Vinod Koul Acked-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit 28b5afcd06d2b24e31ca4a643ddee9eb92b5bcb1 Author: Tony Lindgren Date: Mon Dec 16 14:41:53 2019 -0800 ARM: OMAP2+: Drop unused sdma functions We still have lots of legacy code for sdma, but some of it is now unused. To simplify phasing out the old legacy sdma code, let's first remove all currently unused functions: omap_enable_dma_irq omap_set_dma_write_mode omap_set_dma_params omap_dma_link_lch omap_set_dma_callback omap_dma_set_global_params And with this, omap_dma_set_global_params now becomes static. Cc: Aaro Koskinen Cc: Arnd Bergmann Cc: Peter Ujfalusi Cc: Russell King Cc: Vinod Koul Acked-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit bfab07ee52a257b14529264bea908ba0382328ac Author: Tony Lindgren Date: Mon Dec 16 14:41:53 2019 -0800 ARM: dts: Configure interconnect target module for omap3 sdma 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 we want to use separate compatible for omap34xx and omap36xx so let's do that here too while at it. Cc: devicetree@vger.kernel.org Cc: Aaro Koskinen Cc: Arnd Bergmann Cc: Peter Ujfalusi Cc: Russell King Cc: Vinod Koul Acked-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit eb6b38b26edf51ab8eb169ade49ff0ecd4d5a39b Author: Tony Lindgren Date: Mon Dec 16 14:41:53 2019 -0800 ARM: dts: Configure interconnect target module for omap2 sdma 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 we want to use separate compatible for omap2420 and omap2430 so let's do that here too while at it. Cc: devicetree@vger.kernel.org Cc: Aaro Koskinen Cc: Arnd Bergmann Cc: Peter Ujfalusi Cc: Russell King Cc: Vinod Koul Acked-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit 15c0677162b77636899ac668f3bc2055c941b9b7 Author: Geert Uytterhoeven Date: Thu Dec 5 14:40:25 2019 +0100 dt-bindings: i2c: sh_mobile: Document r8a77961 support Document support for the IIC controller in the Renesas R-Car M3-W+ (R8A77961) SoC. No driver update is needed. Signed-off-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang commit 8b183f5b85e0be4f94fa9309da5504bb7ba3367e Author: Geert Uytterhoeven Date: Thu Dec 5 14:39:56 2019 +0100 dt-bindings: i2c: rcar: Document r8a77961 support Document support for the I2C controller in the Renesas R-Car M3-W+ (R8A77961) SoC. Update all references to R-Car M3-W from "r8a7796" to "r8a77960", to avoid confusion between R-Car M3-W (R8A77960) and M3-W+. No driver update is needed. Signed-off-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang commit 54a19fd4a6402ef47fce5c3a5374c71f52373c40 Author: Geert Uytterhoeven Date: Wed Nov 13 16:23:06 2019 +0100 i2c: core: Use DEVICE_ATTR_*() helper macros Convert the i2c core sysfs attributes from DEVICE_ATTR() to DEVICE_ATTR_*(), to reduce boilerplate. This requires renaming some functions. Although no suitable macro exists for the delete_device attribute, rename i2c_sysfs_delete_device() to delete_device_store() for consistency. Signed-off-by: Geert Uytterhoeven Reviewed-by: Luca Ceresoli Reviewed-by: Kieran Bingham Signed-off-by: Wolfram Sang commit c807da539e8276cc1bd2fb08df5ed160e329b40a Author: Luca Ceresoli Date: Wed Dec 4 13:29:36 2019 +0100 i2c: remove unneeded 'extern' from function declatations According to coding-style.rst, extern should not be specified for exported functions. Signed-off-by: Luca Ceresoli Signed-off-by: Wolfram Sang commit 10e5e6c2496354f0afec82dba459339c421badbf Author: Masahiro Yamada Date: Wed Dec 11 16:38:57 2019 +0900 usb: gadget: move choice ... endchoice to legacy/Kconfig drivers/usb/gadget/Kconfig includes drivers/usb/gadget/legacy/Kconfig inside the 'choice' block. The current Kconfig allows this, but I'd like to discourage this usage. People tend to mess up the structure without noticing that entire drivers/usb/gadget/legacy/Kconfig is placed in the choice context. In fact, legacy/Kconfig mixes up bool and tristate in the choice, and creates nested choice, etc. This commit does not change the behavior, but it will help people notice how badly this Kconfig file is written. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20191211073857.16780-1-masahiroy@kernel.org Signed-off-by: Greg Kroah-Hartman commit fcc84698291203f6588598be417b3ac58d2561d3 Author: Takashi Iwai Date: Tue Dec 10 15:18:22 2019 +0100 usb: gadget: u_audio: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210141822.18705-3-tiwai@suse.de Signed-off-by: Greg Kroah-Hartman commit d27ab1e60970a6a32a0f8b3287f3463e20d68909 Author: Takashi Iwai Date: Tue Dec 10 15:18:21 2019 +0100 usb: gadget: u_audio: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and dropped. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210141822.18705-2-tiwai@suse.de Signed-off-by: Greg Kroah-Hartman commit e14177f19739d74839eb496a27f5f5d958beaa5b Author: Chris Wilson Date: Tue Dec 17 13:47:29 2019 +0000 drm/i915/gem: Keep request alive while attaching fences Since commit e5dadff4b093 ("drm/i915: Protect request retirement with timeline->mutex"), the request retirement can happen outside of the struct_mutex serialised only by the timeline->mutex. We drop the timeline->mutex on submitting the request (i915_request_add) so after that point, it is liable to be freed. Make sure our local reference is kept alive until we have finished attaching it to the signalers. (Note that this erodes the argument that i915_request_add should consume the reference, but that is a slightly larger patch!) Fixes: e5dadff4b093 ("drm/i915: Protect request retirement with timeline->mutex") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Tvrtko Ursulin Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191217134729.3297818-1-chris@chris-wilson.co.uk commit fb6c7ab8718eb2543695d77ad8302ff81e8e1e32 Author: Jani Nikula Date: Tue Dec 10 14:30:43 2019 +0200 drm/print: introduce new struct drm_device based logging macros Add new struct drm_device based logging macros modeled after the core kernel device based logging macros. These would be preferred over the drm printk and struct device based macros in drm code, where possible. We have existing drm specific struct device based logging functions, but they are too verbose to use for two main reasons: * The names are unnecessarily long, for example DRM_DEV_DEBUG_KMS(). * The use of struct device over struct drm_device is too generic for most users, leading to an extra dereference. For example: DRM_DEV_DEBUG_KMS(drm->dev, "Hello, world\n"); vs. drm_dbg_kms(drm, "Hello, world\n"); It's a matter of taste, but the SHOUTING UPPERCASE has been argued to be less readable than lowercase. Some names are changed from old DRM names to be based on the core kernel logging functions. For example, NOTE -> notice, ERROR -> err, DEBUG -> dbg. Due to the conflation of DRM_DEBUG and DRM_DEBUG_DRIVER macro use (DRM_DEBUG is used widely in drivers though it's supposed to be a core debugging category), they are named as drm_dbg_core and drm_dbg, respectively. The drm_err and _once/_ratelimited variants no longer include the function name in order to be able to use the core device based logging macros. Arguably this is not a significant change; error messages should not be so common to be only distinguishable by the function name. Ratelimited debug logging macros are to be added later. Cc: Sam Ravnborg Acked-by: Ville Syrjälä Reviewed-by: Rodrigo Vivi Acked-by: Sean Paul Acked-by: Sam Ravnborg Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191210123050.8799-1-jani.nikula@intel.com commit a67bcec3569f12da7c99891fa68f227791630fa1 Author: Christophe JAILLET Date: Tue Dec 10 12:08:00 2019 +0200 ath10k: Fix some typo in some warning messages Fix some typo: s/to to/to/ s/even/event/ Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo commit 13591a1c3899cfe6891ae0df46637097fdde36a4 Author: Sven Eckelmann Date: Tue Dec 10 12:07:32 2019 +0200 ath11k: register HE mesh capabilities The capabilities for the HE mesh are generated from the capabilities reported by the fw. But the firmware only reports the overall capabilities and not the one which are specific for mesh. Some of them (TWT, MU UL/DL, TB PPDU, ...) require an infrastructure setup with a main STA (AP) controlling the operations. This is not the case for mesh and thus these capabilities are removed from the list of capabilities. Signed-off-by: Sven Eckelmann Signed-off-by: Kalle Valo commit 9b614afe6c8048cbab04aa269d6e2ce26335f85a Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:03 2019 +0000 tty/serial: Migrate aspeed_vuart to use has_sysrq The SUPPORT_SYSRQ ifdeffery is not nice as: - May create misunderstanding about sizeof(struct uart_port) between different objects - Prevents moving functions from serial_core.h - Reduces readability (well, it's ifdeffery - it's hard to follow) In order to remove SUPPORT_SYSRQ, has_sysrq variable has been added. Initialise it in driver's probe and remove ifdeffery. Cc: Joel Stanley Cc: linux-arm-kernel@lists.infradead.org Cc: linux-aspeed@lists.ozlabs.org Signed-off-by: Dmitry Safonov Acked-by: Andrew Jeffery Link: https://lore.kernel.org/r/20191213000657.931618-5-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 1997e9dfdc84c8f73d6fc318355cf9e313aba183 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:02 2019 +0000 serial_core: Un-ifdef sysrq SUPPORT_SYSRQ The SUPPORT_SYSRQ is messy: every .c source should define it before including "serial_core.h" if sysrq is supported or struct uart_port will differ in sizes. Also this prevents moving to serial_core.c functions: uart_handle_sysrq_char(), uart_prepare_sysrq_char(), uart_unlock_and_check_sysrq(). It doesn't save many bytes in the structure, and a better way to reduce it's size would be making rs485 and iso7816 pointers. Introduce `has_sysrq` member to be used by serial line drivers further. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-4-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 8336240ebb248b46c778f28123a7ceec9817c3d2 Author: Greg Kroah-Hartman Date: Tue Dec 17 15:02:32 2019 +0100 tty: serial: samsung_tty: do not abuse the struct uart_port unused fields The samsung_tty driver was trying to abuse the struct uart_port by using two "empty" bytes for its own use. That's not ok, and was found by removing those fields from the structure. Move the variables into the port-specific structure, which is where everything else for this port already is. There is no space wasted here as there was an empty "hole" in the structure already for these bytes. Cc: Kukjin Kim Cc: Hyunki Koo Cc: HYUN-KI KOO Cc: Shinbeom Choi Cc: Krzysztof Kozlowski Cc: Dmitry Safonov Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20191217140232.GA3489190@kroah.com Signed-off-by: Greg Kroah-Hartman commit 7e5ed9f5e012f21a1514edcf8c35b9b4cfbd96c3 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:01 2019 +0000 serial: Move sysrq members above At the current place members those follow are: : upf_t flags; : upstat_t status; : int hw_stopped; : unsigned int mctrl; : unsigned int timeout; : unsigned int type; : const struct uart_ops *ops; Together, they give (*ops) 8-byte align on 64-bit platforms. And `sysrq_ch` introduces 4-byte padding. On the other side, above: : struct device *dev; : unsigned char hub6; : unsigned char suspended; : unsigned char unused[2]; : const char *name; Adds another 4-byte padding. Moving sysrq members just before `hub6` allows to save 8 bytes per-uart_port on 64-bit platforms: On my gcc, x86_64 sizeof(struct uart_port) goes from 528 to 520. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-3-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit f06327d15a1a6f92ca947adb2f0059425885caae Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Fri Dec 13 00:06:00 2019 +0000 sysrq: Remove sysrq_handler_registered sysrq_toggle_support() can be called in parallel, in return calling input_(un)register_handler(), which fortunately is safe to call in parallel and regardless of registered/unregistered status of sysrq_handler. Remove sysrq_handler_registered as it doesn't have any function there and may confuse reader about possible race. Signed-off-by: Dmitry Safonov Link: https://lore.kernel.org/r/20191213000657.931618-2-dima@arista.com Signed-off-by: Greg Kroah-Hartman commit 4484aa800ac588a1fe2175cd53076c21067f44b4 Author: Masahiro Yamada Date: Tue Dec 17 20:06:33 2019 +0900 tty: vt: move conmakehash to drivers/tty/vt/ from scripts/ scripts/conmakehash is only used for generating drivers/tty/vt/consolemap_deftbl.c Move it to the related directory. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20191217110633.8796-1-masahiroy@kernel.org Signed-off-by: Greg Kroah-Hartman commit f1d31743a195155c319a00d73299ff1630a532c4 Author: Uwe Kleine-König Date: Tue Dec 17 08:50:40 2019 +0100 tty: drop useless variable initialisation in tty_kopen() The driver variable is assigned to unconditionally and not used before. So there is no need to explicitly initialize it at the start of tty_kopen(). Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20191217075040.8020-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 3578163030782a24e75ba48aba1cfa431dc9100a Author: Uwe Kleine-König Date: Thu Dec 12 11:16:49 2019 +0100 serdev: make use of printk extension %pe for better error messages With %pe the symbolic name is printed, so you get failure adding device. status -EIO which is more expressive than the current state failure adding device. status -5 . Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20191212101649.18126-2-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 54edb425346a4d5e17f7e54e8c97c0d0eac26315 Author: Uwe Kleine-König Date: Thu Dec 12 11:16:48 2019 +0100 serdev: simplify Makefile drivers/tty/Makefile has: obj-$(CONFIG_SERIAL_DEV_BUS) += serdev/ so in drivers/tty/serdev/Makefile CONFIG_SERIAL_DEV_BUS is always =y. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20191212101649.18126-1-u.kleine-koenig@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit d2e532286d4fa67cb162220cd7be30274561741c Merge: ed08ddd9d088 0ff916e2ef6f Author: Daniel Vetter Date: Tue Dec 17 14:27:04 2019 +0100 Merge tag 'arcpgu-updates-2019.12.16' of github.com:abrodkin/linux into drm-next Clean-up and fixes for FourCC handling in ARC PGU. Signed-off-by: Daniel Vetter From: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/CY4PR1201MB01204228B5788F0A6619FE45A1510@CY4PR1201MB0120.namprd12.prod.outlook.com commit ed08ddd9d088e05932108b267533b59ab202af0b Author: Stephen Rothwell Date: Mon Dec 16 12:23:31 2019 +1100 linux-next: build failure after merge of the drm-misc tree Hi all, After merging the drm-misc tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/gpu/drm/bridge/analogix/analogix-anx6345.c: In function 'anx6345_i2c_probe': drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:738:30: error: implicit declaration of function 'i2c_new_dummy' [-Werror=implicit-function-declaration] 738 | anx6345->i2c_clients[i] = i2c_new_dummy(client->adapter, | ^~~~~~~~~~~~~ drivers/gpu/drm/bridge/analogix/analogix-anx6345.c:738:28: warning: assignment to 'struct i2c_client *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 738 | anx6345->i2c_clients[i] = i2c_new_dummy(client->adapter, | ^ Caused by commit 6aa192698089 ("drm/bridge: Add Analogix anx6345 support") interacting with commit 2c2f00ab1641 ("i2c: remove i2c_new_dummy() API") From Linus' tree. I have applied the following fix up patch for today: From: Stephen Rothwell Date: Mon, 16 Dec 2019 12:11:19 +1100 Subject: [PATCH] drm/bridge: fix up for removal of i2c_new_dummy() Signed-off-by: Stephen Rothwell Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191216122331.43c766f1@canb.auug.org.au commit 92ee2034696cd7fcbfe8539eb93aefb0459bd931 Author: Michael Straube Date: Sat Dec 14 11:09:55 2019 +0100 staging: rtl8188eu: add spaces around operators in rtw_mlme_ext.c Add missing spaces around operators to improve readability and clear checkpatch issues. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191214100955.16670-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit dc497b4b0cd460de63413003cc64aa44cc2137e0 Author: Michael Straube Date: Sat Dec 14 11:09:54 2019 +0100 staging: rtl8188eu: cleanup comparsions to NULL in rtw_mlme_ext.c Cleanup comparsions to NULL reported by checkpatch. if (x == NULL) -> if (!x) if (x != NULL) -> if (x) Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20191214100955.16670-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6f4d22d76baa73c5bc99d669d68c862b60a04a3d Author: Christian Gromm Date: Fri Dec 13 13:04:19 2019 +0100 staging: most: use angle brackets in include path This patch replaces the double quotes in all include paths with angle brackets. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1576238662-16512-7-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 6c56e8adc0011b3bc01b6b2bab7e41d5ecb43c0f Merge: d1eef1c61974 2156873f08c7 Author: Daniel Vetter Date: Tue Dec 17 13:57:54 2019 +0100 Merge tag 'drm-misc-next-2019-12-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.6: UAPI Changes: - Add support for DMA-BUF HEAPS. Cross-subsystem Changes: - mipi dsi definition updates, pulled into drm-intel as well. - Add lockdep annotations for dma_resv vs mmap_sem and fs_reclaim. - Remove support for dma-buf kmap/kunmap. - Constify fb_ops in all fbdev drivers, including drm drivers and drm-core, and media as well. Core Changes: - Small cleanups to ttm. - Fix SCDC definition. - Assorted cleanups to core. - Add todo to remove load/unload hooks, and use generic fbdev emulation. - Assorted documentation updates. - Use blocking ww lock in ttm fault handler. - Remove drm_fb_helper_fbdev_setup/teardown. - Warning fixes with W=1 for atomic. - Use drm_debug_enabled() instead of drm_debug flag testing in various drivers. - Fallback to nontiled mode in fbdev emulation when not all tiles are present. (Later on reverted) - Various kconfig indentation fixes in core and drivers. - Fix freeing transactions in dp-mst correctly. - Sean Paul is steping down as core maintainer. :-( - Add lockdep annotations for atomic locks vs dma-resv. - Prevent use-after-free for a bad job in drm_scheduler. - Fill out all block sizes in the P01x and P210 definitions. - Avoid division by zero in drm/rect, and fix bounds. - Add drm/rect selftests. - Add aspect ratio and alternate clocks for HDMI 4k modes. - Add todo for drm_framebuffer_funcs and fb_create cleanup. - Drop DRM_AUTH for prime import/export ioctls. - Clear DP-MST payload id tables downstream when initializating. - Fix for DSC throughput definition. - Add extra FEC definitions. - Fix fake offset in drm_gem_object_funs.mmap. - Stop using encoder->bridge in core directly - Handle bridge chaining slightly better. - Add backlight support to drm/panel, and use it in many panel drivers. - Increase max number of y420 modes from 128 to 256, as preparation to add the new modes. Driver Changes: - Small fixes all over. - Fix documentation in vkms. - Fix mmap_sem vs dma_resv in nouveau. - Small cleanup in komeda. - Add page flip support in gma500 for psb/cdv. - Add ddc symlink in the connector sysfs directory for many drivers. - Add support for analogic an6345, and fix small bugs in it. - Add atomic modesetting support to ast. - Fix radeon fault handler VMA race. - Switch udl to use generic shmem helpers. - Unconditional vblank handling for mcde. - Miscellaneous fixes to mcde. - Tweak debug output from komeda using debugfs. - Add gamma and color transform support to komeda for DOU-IPS. - Add support for sony acx424AKP panel. - Various small cleanups to gma500. - Use generic fbdev emulation in udl, and replace udl_framebuffer with generic implementation. - Add support for Logic PD Type 28 panel. - Use drm_panel_* wrapper functions in exynos/tegra/msm. - Add devicetree bindings for generic DSI panels. - Don't include drm_pci.h directly in many drivers. - Add support for begin/end_cpu_access in udmabuf. - Stop using drm_get_pci_dev in gma500 and mga200. - Fixes to UDL damage handling, and use dma_buf_begin/end_cpu_access. - Add devfreq thermal support to panfrost. - Fix hotplug with daisy chained monitors by removing VCPI when disabling topology manager. - meson: Add support for OSD1 plane AFBC commit. - Stop displaying garbage when toggling ast primary plane on/off. - More cleanups and fixes to UDL. - Add D32 suport to komeda. - Remove globle copy of drm_dev in gma500. - Add support for Boe Himax8279d MIPI-DSI LCD panel. - Add support for ingenic JZ4770 panel. - Small null pointer deference fix in ingenic. - Remove support for the special tfp420 driver, as there is a generic way to do it. Signed-off-by: Daniel Vetter From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/ba73535a-9334-5302-2e1f-5208bd7390bd@linux.intel.com commit c3bb9d883f1a5b2e60675779205e7c6ded2272aa Author: Christian Gromm Date: Fri Dec 13 13:04:18 2019 +0100 staging: most: configfs: reduce array size This patch reduces the size of the arrays inside the mdev_link struct to a reasonable value. Reported-by: Joe Perches Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1576238662-16512-6-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit d72f82635e3317b5e035af40aa815c6d064c2fee Author: Christian Gromm Date: Fri Dec 13 13:04:17 2019 +0100 staging: most: configfs: use strlcpy This patch uses strlcpy to copy data provided by userspace in order to not overflow the allocated space. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1576238662-16512-5-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit b4e37a5e2c3202438f777410481a55de7137d0d4 Author: Christian Gromm Date: Fri Dec 13 13:04:16 2019 +0100 staging: most: rename enum mbo_status_flags The data structures of the most.h header file will be exposed to the kernel once the file is moved out of the staging area. This is why the name is prefixed with the string 'most'. Reported-by: Greg Kroah-Hartman Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1576238662-16512-4-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 45917e79202c7a0b67f1331c154afba77a3d4a1e Author: Christian Gromm Date: Fri Dec 13 13:04:15 2019 +0100 staging: most: rename struct core_component The stuctures defined in the most.h header file will be exposed to the kernel once the file is moved out of the staging area. That's why the name is changed into something more descriptive. Reported-by: Greg Kroah-Hartman Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1576238662-16512-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit c1d3fb8abe667cd9aa59f3a176ca4d0636d9b44b Author: Christian Gromm Date: Fri Dec 13 13:04:14 2019 +0100 staging: most: rename core.h to most.h This patch renames the core header file core.h to most.h. The intention behind this is to have a meaningful name once this file is moved to the /include/linux directory. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1576238662-16512-2-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit f4dc4abdce4cc290555604107c04854a911b9441 Author: Jim Quinlan Date: Mon Dec 16 18:08:02 2019 -0500 spi: bcm2835: no dev_err() on clk_get() -EPROBE_DEFER Use dev_dbg() on -EPROBE_DEFER and dev_err() on all other errors. Signed-off-by: Jim Quinlan Reviewed-by: Florian Fainelli Reviewed-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20191216230802.45715-2-jquinlan@broadcom.com Signed-off-by: Mark Brown commit c1795f7cee026b066485de794cff4e5bb9475a98 Author: Jean Pihet Date: Wed Dec 11 20:39:52 2019 +0100 spi: spi-ti-qspi: Remove unused macro for fclk frequency The fclk and its rate are retrieved from DT. Signed-off-by: Jean Pihet Cc: Ryan Barnett Cc: Conrad Ratschan Cc: Arnout Vandecappelle Link: https://lore.kernel.org/r/20191211193954.747745-2-jean.pihet@newoldbits.com Signed-off-by: Mark Brown commit 522498f8cb8c547f415a9a39fb54fd1f7e1a1eda Author: Matti Vaittinen Date: Wed Dec 11 11:46:11 2019 +0200 regulator: bd71828: Basic support for ROHM bd71828 PMIC regulators ROHM BD71828 is a power management IC containing 7 bucks and 7 LDOs. Bucks 1,2,6 and 7 can be assigned to a regulator group controlled by run-levels. Eg. Voltages and enable/disable statuses for specific run-levels (run0 to run3) can be set via register interface and run level changes can then be done either via I2C or GPIO. This initial commit does not support assigning bucks to be controlled via run-levels but only allows them to be individually controlled. LDO5 voltage can also be controlled by GPIO2 pin and register interfaces but this driver only supports the control via register. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/5b1c4a22c7945e97ff2a7924abfeb3239043f8eb.1576054779.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit 84a867c078136887dea64fa6e336333b657bc6a1 Author: Matti Vaittinen Date: Wed Dec 11 11:35:57 2019 +0200 dt-bindings: regulator: Document ROHM BD71282 regulator bindings Document ROHM BD71828 PMIC regulator device tree bindings. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/0985fec1cce98b1db66e5df2d9bcf2dfd9c224a7.1576054779.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit 4137f4b65df7608e52f307f4aa9792b984bad7de Author: Cezary Rojewski Date: Tue Dec 17 10:58:50 2019 +0100 ASoC: compress: Add pm_runtime support For some devices, components need to be powered-up before stream startup sequence commences. Update soc_compr_open to provide such functionality. Based on soc_pcm_open. Adjust soc_compr_free accordingly to power down components once compress stream is closed. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20191217095851.19629-7-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 1b998958b301fb7f7e33212e84dc162a711fad81 Author: Scott Schafer Date: Wed Dec 11 12:12:31 2019 -0600 staging: qlge: Fix CHECK: Alignment should match open parenthesis Fix CHECK: Alignment should match open parenthesis in qlge_dbg.c, qlge_ethtool.c, qlge_main.c, and qlge_mpi.c. Also made changes to the following lines: WARNING: quoted string split across lines FILE: drivers/staging/qlge/qlge_main.c:81 WARNING: quoted string split across lines FILE: drivers/staging/qlge/qlge_main.c:87 WARNING: quoted string split across lines FILE: drivers/staging/qlge/qlge_main.c:3528 WARNING: quoted string split across lines FILE: drivers/staging/qlge/qlge_main.c:3536 CHECK: spaces preferred around that '*' (ctx:VxV) drivers/staging/qlge/qlge_main.c:4102 I made these changes due to touching these lines in the original fix Signed-off-by: Scott Schafer Link: https://lore.kernel.org/r/27ec7ee0a3ba8c1ad946077aacfcc6e40b98c106.1576086080.git.schaferjscott@gmail.com Signed-off-by: Greg Kroah-Hartman commit 25dde2435ad659b59154335604162abfcf059dd5 Author: Scott Schafer Date: Wed Dec 11 12:12:30 2019 -0600 staging: qlge: Fix CHECK extra blank lines in many files Fix CHECK: Please don't use multiple blank lines in qlge.h, qlge_dbg.c, qlge_ethtool.c, qlge_main.c, and qlge_mpi.c Signed-off-by: Scott Schafer Link: https://lore.kernel.org/r/9387760ae35bdeb606dc03ca9dd167f5214cd3a8.1576086080.git.schaferjscott@gmail.com Signed-off-by: Greg Kroah-Hartman commit ae91a189d2459644e800ceea615a9c1937ee5ae2 Author: Takashi Iwai Date: Thu Dec 12 20:17:47 2019 +0100 ASoC: intel: skylake: Remove superfluous bus ops The bus_core_ops values set in skl driver are same as the default values, so we can drop it and pass NULL to snd_hdac_ext_bus_init() instead. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191212191747.19995-1-tiwai@suse.de Signed-off-by: Mark Brown commit a5e37de90e67ac1072a9a44bd0cec9f5e98ded08 Author: Yangtao Li Date: Sat Dec 14 19:51:07 2019 +0000 stop_machine: remove try_stop_cpus helper try_stop_cpus is not used after this: commit c190c3b16c0f ("rcu: Switch synchronize_sched_expedited() to stop_one_cpu()") So remove it. Signed-off-by: Yangtao Li Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191214195107.26480-1-tiny.windzz@gmail.com commit d040e0734fb3dedfe24c3d94f5a32b4812eca610 Author: Peng Wang Date: Fri Dec 13 11:45:40 2019 +0800 schied/fair: Skip calculating @contrib without load Because of the: if (!load) runnable = running = 0; clause in ___update_load_sum(), all the actual users of @contrib in accumulate_sum(): if (load) sa->load_sum += load * contrib; if (runnable) sa->runnable_load_sum += runnable * contrib; if (running) sa->util_sum += contrib << SCHED_CAPACITY_SHIFT; don't happen, and therefore we don't care what @contrib actually is and calculating it is pointless. If we count the times when @load equals zero and not as below: if (load) { load_is_not_zero_count++; contrib = __accumulate_pelt_segments(periods, 1024 - sa->period_contrib,delta); } else load_is_zero_count++; As we can see, load_is_zero_count is much bigger than load_is_zero_count, and the gap is gradually widening: load_is_zero_count: 6016044 times load_is_not_zero_count: 244316 times 19:50:43 up 1 min, 1 user, load average: 0.09, 0.06, 0.02 load_is_zero_count: 7956168 times load_is_not_zero_count: 261472 times 19:51:42 up 2 min, 1 user, load average: 0.03, 0.05, 0.01 load_is_zero_count: 10199896 times load_is_not_zero_count: 278364 times 19:52:51 up 3 min, 1 user, load average: 0.06, 0.05, 0.01 load_is_zero_count: 14333700 times load_is_not_zero_count: 318424 times 19:54:53 up 5 min, 1 user, load average: 0.01, 0.03, 0.00 Perhaps we can gain some performance advantage by saving these unnecessary calculation. Signed-off-by: Peng Wang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot < vincent.guittot@linaro.org> Link: https://lkml.kernel.org/r/1576208740-35609-1-git-send-email-rocking@linux.alibaba.com commit 60588bfa223ff675b95f866249f90616613fbe31 Author: Cheng Jian Date: Fri Dec 13 10:45:30 2019 +0800 sched/fair: Optimize select_idle_cpu select_idle_cpu() will scan the LLC domain for idle CPUs, it's always expensive. so the next commit : 1ad3aaf3fcd2 ("sched/core: Implement new approach to scale select_idle_cpu()") introduces a way to limit how many CPUs we scan. But it consume some CPUs out of 'nr' that are not allowed for the task and thus waste our attempts. The function always return nr_cpumask_bits, and we can't find a CPU which our task is allowed to run. Cpumask may be too big, similar to select_idle_core(), use per_cpu_ptr 'select_idle_mask' to prevent stack overflow. Fixes: 1ad3aaf3fcd2 ("sched/core: Implement new approach to scale select_idle_cpu()") Signed-off-by: Cheng Jian Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Srikar Dronamraju Reviewed-by: Vincent Guittot Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20191213024530.28052-1-cj.chengjian@huawei.com commit 45178ac0cea853fe0e405bf11e101bdebea57b15 Author: Peter Zijlstra Date: Tue Dec 10 09:34:54 2019 +0100 cpu/hotplug, stop_machine: Fix stop_machine vs hotplug order Paul reported a very sporadic, rcutorture induced, workqueue failure. When the planets align, the workqueue rescuer's self-migrate fails and then triggers a WARN for running a work on the wrong CPU. Tejun then figured that set_cpus_allowed_ptr()'s stop_one_cpu() call could be ignored! When stopper->enabled is false, stop_machine will insta complete the work, without actually doing the work. Worse, it will not WARN about this (we really should fix this). It turns out there is a small window where a freshly online'ed CPU is marked 'online' but doesn't yet have the stopper task running: BP AP bringup_cpu() __cpu_up(cpu, idle) --> start_secondary() ... cpu_startup_entry() bringup_wait_for_ap() wait_for_ap_thread() <-- cpuhp_online_idle() while (1) do_idle() ... available to run kthreads ... stop_machine_unpark() stopper->enable = true; Close this by moving the stop_machine_unpark() into cpuhp_online_idle(), such that the stopper thread is ready before we start the idle loop and schedule. Reported-by: "Paul E. McKenney" Debugged-by: Tejun Heo Signed-off-by: Peter Zijlstra (Intel) Tested-by: "Paul E. McKenney" commit cde65194502778665c1b52afc5722cf7dbfaa399 Author: Oleg Nesterov Date: Tue Dec 10 20:19:03 2019 +0100 sched/wait: fix ___wait_var_event(exclusive) init_wait_var_entry() forgets to initialize wq_entry->flags. Currently not a problem, we don't have wait_var_event_exclusive(). Signed-off-by: Oleg Nesterov Signed-off-by: Peter Zijlstra (Intel) Cc: Vincent Guittot Cc: Ingo Molnar Cc: Felipe Balbi Cc: Linus Torvalds Cc: Miklos Szeredi Cc: Juri Lelli Link: https://lkml.kernel.org/r/20191210191902.GB14449@redhat.com commit 5443a0be6121d557e12951537e10159e4c61035d Author: Frederic Weisbecker Date: Tue Dec 3 17:01:06 2019 +0100 sched: Use fair:prio_changed() instead of ad-hoc implementation set_user_nice() implements its own version of fair::prio_changed() and therefore misses a specific optimization towards nohz_full CPUs that avoid sending an resched IPI to a reniced task running alone. Use the proper callback instead. Reported-by: Peter Zijlstra Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Ingo Molnar Link: https://lkml.kernel.org/r/20191203160106.18806-3-frederic@kernel.org commit 7c2e8bbd87db661122e92d71a394dd7bb3ada4d3 Author: Frederic Weisbecker Date: Tue Dec 3 17:01:05 2019 +0100 sched: Spare resched IPI when prio changes on a single fair task The runqueue of a fair task being remotely reniced is going to get a resched IPI in order to reassess which task should be the current running on the CPU. However that evaluation is useless if the fair task is running alone, in which case we can spare that IPI, preventing nohz_full CPUs from being disturbed. Reported-by: Peter Zijlstra Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Cc: Ingo Molnar Link: https://lkml.kernel.org/r/20191203160106.18806-2-frederic@kernel.org commit 95ace52e4036482da1895b6e19f15141802cc3dd Author: Greg Kroah-Hartman Date: Tue Dec 10 10:15:09 2019 +0100 staging: octeon-usb: delete the octeon usb host controller driver This driver was merged back in 2013 and shows no progress toward every being merged into the "correct" part of the kernel. The code doesn't even build for anyone unless you have the specific hardware platform selected, so odds are it doesn't even work anymore. Remove it for now and is someone comes along that has the hardware and is willing to fix it up, it can be reverted. Cc: Aaro Koskinen Cc: David Daney Cc: Nishka Dasgupta Cc: Himadri Pandya Cc: "Frank A. Cancio Bello" Cc: Sumit Pundir Cc: Laura Lazzati Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20191210091509.3546251-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 710d7fbe21ee2ceab121f1f84a20edf68f9f9742 Author: Greg Kroah-Hartman Date: Tue Dec 10 10:15:08 2019 +0100 staging: octeon: delete driver This driver has been in the tree since 2009 with no real movement to get it out. Now it is starting to cause build issues and other problems for people who want to fix coding style problems, but can not actually build it. As nothing is happening here, just delete the module entirely. Reported-by: Guenter Roeck Acked-by: Guenter Roeck Cc: David Daney Cc: "David S. Miller" Cc: "Matthew Wilcox (Oracle)" Cc: Guenter Roeck Cc: YueHaibing Cc: Aaro Koskinen Cc: Wambui Karuga Cc: Julia Lawall Cc: Florian Westphal Cc: Geert Uytterhoeven Cc: Branden Bonaby Cc: "Petr Štetiar" Cc: Sandro Volery Cc: Paul Burton Cc: Dan Carpenter Cc: Giovanni Gherdovich Cc: Valery Ivanov Link: https://lore.kernel.org/r/20191210091509.3546251-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit b69413110207058b915c85834339c04b1557e92b Author: Hans de Goede Date: Mon Dec 16 21:29:06 2019 +0100 drm/i915: DSI: select correct PWM controller to use based on the VBT At least Bay Trail (BYT) and Cherry Trail (CHT) devices can use 1 of 2 different PWM controllers for controlling the LCD's backlight brightness. Either the one integrated into the PMIC or the one integrated into the SoC (the 1st LPSS PWM controller). So far in the LPSS code on BYT we have skipped registering the LPSS PWM controller "pwm_backlight" lookup entry when a Crystal Cove PMIC is present, assuming that in this case the PMIC PWM controller will be used. On CHT we have been relying on only 1 of the 2 PWM controllers being enabled in the DSDT at the same time; and always registered the lookup. So far this has been working, but the correct way to determine which PWM controller needs to be used is by checking a bit in the VBT table and recently I've learned about 2 different BYT devices: Point of View MOBII TAB-P800W Acer Switch 10 SW5-012 Which use a Crystal Cove PMIC, yet the LCD is connected to the SoC/LPSS PWM controller (and the VBT correctly indicates this), so here our old heuristics fail. This commit fixes using the wrong PWM controller on these devices by calling pwm_get() for the right PWM controller based on the VBT dsi.config.pwm_blc bit. Note this is part of a series which contains 2 other patches which renames the PWM lookup for the 1st SoC/LPSS PWM from "pwm_backlight" to "pwm_pmic_backlight" and the PWM lookup for the Crystal Cove PMIC PWM from "pwm_backlight" to "pwm_pmic_backlight". Acked-by: Jani Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20191216202906.1662893-4-hdegoede@redhat.com commit 2f093958397b14bd4e1ed82ccd8a1bbacc1691d0 Author: Hans de Goede Date: Mon Dec 16 21:29:05 2019 +0100 mfd: intel_soc_pmic: Rename pwm_backlight pwm-lookup to pwm_pmic_backlight At least Bay Trail (BYT) and Cherry Trail (CHT) devices can use 1 of 2 different PWM controllers for controlling the LCD's backlight brightness. Either the one integrated into the PMIC or the one integrated into the SoC (the 1st LPSS PWM controller). So far in the LPSS code on BYT we have skipped registering the LPSS PWM controller "pwm_backlight" lookup entry when a Crystal Cove PMIC is present, assuming that in this case the PMIC PWM controller will be used. On CHT we have been relying on only 1 of the 2 PWM controllers being enabled in the DSDT at the same time; and always registered the lookup. So far this has been working, but the correct way to determine which PWM controller needs to be used is by checking a bit in the VBT table and recently I've learned about 2 different BYT devices: Point of View MOBII TAB-P800W Acer Switch 10 SW5-012 Which use a Crystal Cove PMIC, yet the LCD is connected to the SoC/LPSS PWM controller (and the VBT correctly indicates this), so here our old heuristics fail. Since only the i915 driver has access to the VBT, this commit renames the "pwm_backlight" lookup entries for the Crystal Cove PMIC's PWM controller to "pwm_pmic_backlight" so that the i915 driver can do a pwm_get() for the right controller depending on the VBT bit, instead of the i915 driver relying on a "pwm_backlight" lookup getting registered which magically points to the right controller. Acked-by: Jani Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Acked-by: Lee Jones Link: https://patchwork.freedesktop.org/patch/msgid/20191216202906.1662893-3-hdegoede@redhat.com commit b2147a3a4fc6ddbff7f72984837b4137d088793b Author: Hans de Goede Date: Mon Dec 16 21:29:04 2019 +0100 ACPI / LPSS: Rename pwm_backlight pwm-lookup to pwm_soc_backlight At least Bay Trail (BYT) and Cherry Trail (CHT) devices can use 1 of 2 different PWM controllers for controlling the LCD's backlight brightness. Either the one integrated into the PMIC or the one integrated into the SoC (the 1st LPSS PWM controller). So far in the LPSS code on BYT we have skipped registering the LPSS PWM controller "pwm_backlight" lookup entry when a Crystal Cove PMIC is present, assuming that in this case the PMIC PWM controller will be used. On CHT we have been relying on only 1 of the 2 PWM controllers being enabled in the DSDT at the same time; and always registered the lookup. So far this has been working, but the correct way to determine which PWM controller needs to be used is by checking a bit in the VBT table and recently I've learned about 2 different BYT devices: Point of View MOBII TAB-P800W Acer Switch 10 SW5-012 Which use a Crystal Cove PMIC, yet the LCD is connected to the SoC/LPSS PWM controller (and the VBT correctly indicates this), so here our old heuristics fail. Since only the i915 driver has access to the VBT, this commit renames the "pwm_backlight" lookup entries for the 1st BYT/CHT LPSS PWM controller to "pwm_soc_backlight" so that the i915 driver can do a pwm_get() for the right controller depending on the VBT bit, instead of the i915 driver relying on a "pwm_backlight" lookup getting registered which magically points to the right controller. Acked-by: Jani Nikula Reviewed-by: Andy Shevchenko Acked-by: Rafael J. Wysocki Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20191216202906.1662893-2-hdegoede@redhat.com commit 796ef2eff3cc4b4e032761710ddd8aa510e5cf3b Author: Chris Wilson Date: Tue Dec 17 09:13:28 2019 +0000 drm/i915/gt: Avoid multi-LRI on Sandybridge Sandybridge is the gen that didn't handle multiple registers in a single LRI packet. Don't forget it! Fixes: 902eb748e5c3 ("drm/i915/gt: Tidy up full-ppgtt on Ivybridge") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Tested-by: Tomi Sarvela Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191217091328.3093551-1-chris@chris-wilson.co.uk commit 81736abd5578b1dbdf95eb714da45787054198ba Author: Jan H. Schönherr Date: Tue Dec 10 01:07:33 2019 +0100 x86/mce: Remove mce_inject_log() in favor of mce_log() The mutex in mce_inject_log() became unnecessary with commit 5de97c9f6d85 ("x86/mce: Factor out and deprecate the /dev/mcelog driver"), though the original reason for its presence only vanished with commit 7298f08ea887 ("x86/mcelog: Get rid of RCU remnants"). Drop the mutex. And as that makes mce_inject_log() identical to mce_log(), get rid of the former in favor of the latter. Signed-off-by: Jan H. Schönherr Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-edac Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191210000733.17979-7-jschoenh@amazon.de commit 2d806d0723589a726b48b88e0f53988849dc03d3 Author: Jan H. Schönherr Date: Tue Dec 10 01:07:32 2019 +0100 x86/mce: Pass MCE message to mce_panic() on failed kernel recovery In commit b2f9d678e28c ("x86/mce: Check for faults tagged in EXTABLE_CLASS_FAULT exception table entries") another call to mce_panic() was introduced. Pass the message of the handled MCE to that instance of mce_panic() as well, as there doesn't seem to be a reason not to. Signed-off-by: Jan H. Schönherr Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-edac Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191210000733.17979-6-jschoenh@amazon.de commit db1ae0314f47e88ae06679270adf17ffa245afd4 Author: Arnd Bergmann Date: Tue Dec 10 21:39:13 2019 +0100 x86/mce/therm_throt: Mark throttle_active_work() as __maybe_unused throttle_active_work() is only called if CONFIG_SYSFS is set, otherwise we get a harmless warning: arch/x86/kernel/cpu/mce/therm_throt.c:238:13: error: 'throttle_active_work' \ defined but not used [-Werror=unused-function] Mark the function as __maybe_unused to avoid the warning. Fixes: f6656208f04e ("x86/mce/therm_throt: Optimize notifications of thermal throttle") Signed-off-by: Arnd Bergmann Signed-off-by: Borislav Petkov Reviewed-by: Srinivas Pandruvada Cc: bberg@redhat.com Cc: ckellner@redhat.com Cc: Greg Kroah-Hartman Cc: hdegoede@redhat.com Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: linux-edac Cc: Thomas Gleixner Cc: Tony Luck Cc: x86-ml Link: https://lkml.kernel.org/r/20191210203925.3119091-1-arnd@arndb.de commit 708d10eca6f157631573265db67a379599e9b5e6 Author: Zhang Rui Date: Tue Dec 17 09:56:23 2019 +0800 powercap/intel_rapl: add support for TigerLake Mobile Add TigerLake Mobile support in intel_rapl driver. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit d8cac6207ec1abd3c85cff2625dd3898d59c4df5 Author: Takashi Iwai Date: Tue Dec 17 09:14:48 2019 +0100 ALSA: cmipci: Allow disabling MPU port via module option Patrick May reported that his sound card with CMI8378 chip causes a crash / reboot when accessing the MIDI port that isn't actually present on the board. Moreover, despite of the documentation, passing mpu_port=0 doesn't disable the MIDI port on this board. It implies that the chip is a newer revision and the MPU401 port is integrated and mapped on the PCI register. For this chip model, the driver enables the MPU port unconditionally, so far. Although fixing the unexpected reboot would be the best solution, it's not so trivial to identify the cause. So, as a plan B, this patch extends the existing mpu_port option usage to allow disabling the port by specifying the value 0, just like we applied for fm_port option in commit 2f24d159d5ac ("[ALSA] cmipci - Allow to disable integrated FM port"). As default, the MPU port is still enabled, but user can pass mpu_port=0 to disable it. Reported-and-tested-by: Patrick May Link: https://lore.kernel.org/r/20191217081448.1144-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit b33bdf8020c94438269becc6dace9ed49257c4ba Author: Arnd Bergmann Date: Mon Dec 16 20:48:56 2019 +0100 isdn: don't mark kcapi_proc_exit as __exit As everybody pointed out by now, my patch to clean up CAPI introduced a link time warning, as the two parts of the capi driver are now in one module and the exit function may need to be called in the error path of the init function: >> WARNING: drivers/isdn/capi/kernelcapi.o(.text+0xea4): Section mismatch in reference from the function kcapi_exit() to the function .exit.text:kcapi_proc_exit() The function kcapi_exit() references a function in an exit section. Often the function kcapi_proc_exit() has valid usage outside the exit section and the fix is to remove the __exit annotation of kcapi_proc_exit. Remove the incorrect __exit annotation. Reported-by: kbuild test robot Reported-by: kernelci.org bot Reported-by: Olof's autobuilder Reported-by: Stephen Rothwell Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191216194909.1983639-1-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit 6f6dded1385cfb564de85f86126f1c054c8f47b1 Merge: c5dea815834c d89ee7d5c73a Author: David S. Miller Date: Mon Dec 16 19:22:22 2019 -0800 Merge branch 'WireGuard-CI-and-housekeeping' Jason A. Donenfeld says: ==================== WireGuard CI and housekeeping This is a collection of commits gathered during the last 1.5 weeks since merging WireGuard. If you'd prefer, I can send tree pull requests instead, but I figure it might be best for now to just send things as full patch sets to netdev. The first part of this adds in the CI test harness that we've been using for quite some time with success. You can type `make` and get the selftests running in a fresh VM immediately. This has been an instrumental tool in developing WireGuard, and I think it'd benefit most from being in-tree alongside the selftests that are already there. Once this lands, I plan to get build.wireguard.com building wireguard- linux.git and net-next.git on every single commit pushed, and do so on a bunch of different architectures. As this migrates into Linus' tree eventually and then into net.git, I'll get net.git building there too on every commit. Future work with this involves generalizing it to include more networking subsystem tests beyond just WireGuard, but one step at a time. In the process of porting this to the tree, the builder uncovered a mistake in the config menu file, which the second commit fixes. The last three commits are small housekeeping things, fixing spelling mistakes, replacing call_rcu with kfree_rcu, and removing an unused include. ==================== Signed-off-by: David S. Miller commit d89ee7d5c73af15c1c6f12b016cdf469742b5726 Author: Wei Yongjun Date: Sun Dec 15 22:08:04 2019 +0100 wireguard: allowedips: use kfree_rcu() instead of call_rcu() The callback function of call_rcu() just calls a kfree(), so we can use kfree_rcu() instead of call_rcu() + callback function. Signed-off-by: Wei Yongjun Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 43967b6ff91e53bcce5ae08c16a0588a475b53a1 Author: YueHaibing Date: Sun Dec 15 22:08:03 2019 +0100 wireguard: main: remove unused include Remove from the includes for main.c, which is unused. Signed-off-by: YueHaibing [Jason: reworded commit message] Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit a2ec8b5706944d228181c8b91d815f41d6dd8e7b Author: Josh Soref Date: Sun Dec 15 22:08:02 2019 +0100 wireguard: global: fix spelling mistakes in comments This fixes two spelling errors in source code comments. Signed-off-by: Josh Soref [Jason: rewrote commit message] Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit d7c68a38bb4f9b7c1a2e4a772872c752ee5c44a6 Author: Jason A. Donenfeld Date: Sun Dec 15 22:08:01 2019 +0100 wireguard: Kconfig: select parent dependency for crypto This fixes the crypto selection submenu depenencies. Otherwise, we'd wind up issuing warnings in which certain dependencies we also select couldn't be satisfied. This condition was triggered by the addition of the test suite autobuilder in the previous commit. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 65d88d04114bca7d85faebd5fed61069cb2b632c Author: Jason A. Donenfeld Date: Sun Dec 15 22:08:00 2019 +0100 wireguard: selftests: import harness makefile for test suite WireGuard has been using this on build.wireguard.com for the last several years with considerable success. It allows for very quick and iterative development cycles, and supports several platforms. To run the test suite on your current platform in QEMU: $ make -C tools/testing/selftests/wireguard/qemu -j$(nproc) To run it with KASAN and such turned on: $ DEBUG_KERNEL=yes make -C tools/testing/selftests/wireguard/qemu -j$(nproc) To run it emulated for another platform in QEMU: $ ARCH=arm make -C tools/testing/selftests/wireguard/qemu -j$(nproc) At the moment, we support aarch64_be, aarch64, arm, armeb, i686, m68k, mips64, mips64el, mips, mipsel, powerpc64le, powerpc, and x86_64. The system supports incremental rebuilding, so it should be very fast to change a single file and then test it out and have immediate feedback. This requires for the right toolchain and qemu to be installed prior. I've had success with those from musl.cc. This is tailored for WireGuard at the moment, though later projects might generalize it for other network testing. Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 39523c56b668f71b3f23adc624a0e16315e0c47f Author: Stephen Boyd Date: Mon Dec 16 15:42:04 2019 -0800 arm64: dts: qcom: sdm845-cheza: Add cr50 spi node Add the cr50 device to the spi controller it is attached to. This enables /dev/tpm0 and some login things on Cheza. Reviewed-by: Douglas Anderson Cc: Douglas Anderson Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20191216234204.190769-1-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit e4aab38ed5d1b8316f25786e6ec6adb34449b294 Author: Ivan Mikhaylov Date: Mon Nov 18 13:46:44 2019 +0300 ARM: dts: aspeed: Add SD card for Vesnin Presence signal is inverted for vesnin boards, 'cd-inverted' added for invertion signal enablement. Vesnin BMC uses microSD, there is no WP switch, 'disable-wp' is used for this purpose. Signed-off-by: Ivan Mikhaylov Acked-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 78b08af0dd1b341a591c981a32e9558a71de761f Author: Tao Ren Date: Thu Dec 12 15:16:22 2019 -0800 ARM: dts: aspeed: yamp: Delete no-hw-checksum Ftgmac100's checksum issue has been fixed by commit 88824e3bf29a ("net: ethernet: ftgmac100: Fix DMA coherency issue with SW checksum") so this property is no longer required. Signed-off-by: Tao Ren Signed-off-by: Joel Stanley commit 4ba33177c61e505ef6571671f468bdc660143c7f Author: Tao Ren Date: Thu Dec 12 15:16:21 2019 -0800 ARM: dts: aspeed: netbmc: Delete no-hw-checksum The ftgmac100's checksum issue has been fixed by commit 88824e3bf29a ("net: ethernet: ftgmac100: Fix DMA coherency issue with SW checksum") so this property is no longer required Signed-off-by: Tao Ren Signed-off-by: Joel Stanley commit d4d171bd3e04f4c2400a19f0afd73b8c0efa9894 Author: Joel Stanley Date: Mon Dec 16 17:41:32 2019 +1100 ARM: dts: aspeed: AST2400 disables hw checksum There is no need to specify this property in the device tree as the AST2400 does not have working hardware checksum and disables it in the driver. Signed-off-by: Joel Stanley Reviewed-by: Tao Ren Reviewed-by: Alexander Filippov Signed-off-by: Joel Stanley commit dafa8fe276e87e13010138317945253fc0938c62 Author: Andrew Jeffery Date: Tue Dec 3 22:34:15 2019 +1030 ARM: dts: ibm-power9-dual: Add a unit address for OCC nodes These temporarily have a unit address until userspace is fixed up as noted in comments elsewhere in the dtsi. Fixes the following warning: arch/arm/boot/dts/ibm-power9-dual.dtsi:89.18-91.6: Warning (unit_address_vs_reg): /gpio-fsi/cfam@0,0/sbefifo@2400/occ: node has a reg or ranges property, but no unit name arch/arm/boot/dts/ibm-power9-dual.dtsi:190.18-192.6: Warning (unit_address_vs_reg): /gpio-fsi/cfam@0,0/hub@3400/cfam@1,0/sbefifo@2400/occ: node has a reg or ranges property, but no unit name Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 56d71b5501342d462c2a84d65ad87560a61c047b Author: Andrew Jeffery Date: Tue Dec 3 22:34:14 2019 +1030 ARM: dts: aspeed-g6: Cleanup watchdog unit address arch/arm/boot/dts/aspeed-g6.dtsi:204.28-208.6: Warning (simple_bus_reg): /ahb/apb/watchdog@1e7850C0: simple-bus unit address format error, expected "1e7850c0" Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley commit cf4aae1a05a241f206555cf2ed2de91011f3034c Author: Andrew Jeffery Date: Tue Dec 3 22:34:13 2019 +1030 ARM: dts: aspeed-g5: Sort LPC child nodes by unit address Lets try to maintain some sort of sanity. Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley commit e3f0cf4fb827ddcd2fc8e8ab06c431aca553bbf3 Author: Andrew Jeffery Date: Tue Dec 3 22:34:12 2019 +1030 ARM: dts: aspeed: Add reg hints to syscon children Fixes the following warnings: arch/arm/boot/dts/aspeed-g5.dtsi:209.28-226.6: Warning (avoid_unnecessary_addr_size): /ahb/apb/syscon@1e6e2000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property arch/arm/boot/dts/aspeed-g4.dtsi:156.28-172.6: Warning (avoid_unnecessary_addr_size): /ahb/apb/syscon@1e6e2000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley commit 2de782b76938de16e2284bdee83b5acc3c5e3ed3 Author: Andrew Jeffery Date: Tue Dec 3 22:34:11 2019 +1030 ARM: dts: aspeed: Cleanup lpc-ctrl and snoop regs Fix the following warning: arch/arm/boot/dts/aspeed-g5.dtsi:409.27-414.8: Warning (unique_unit_address): /ahb/apb/lpc@1e789000/lpc-host@80/lpc-ctrl@0: duplicate unit-address (also used in node /ahb/apb/lpc@1e789000/lpc-host@80/lpc-snoop@0) Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley commit 1d6d2e0d46ad747c22b5b5c06ca629203909e998 Author: Andrew Jeffery Date: Tue Dec 3 22:34:10 2019 +1030 ARM: dts: witherspoon: Cleanup gpio-keys-polled properties dtbs_check gave the following warning: Warning (avoid_unnecessary_addr_size): /gpio-keys-polled: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Cc: Joel Stanley Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley commit 53820e00aaa173db268e0288d0407806539b4c3e Author: Andrew Jeffery Date: Tue Dec 3 22:34:09 2019 +1030 ARM: dts: swift: Cleanup gpio-keys-polled properties dtbs_check gave the following warning: Warning (avoid_unnecessary_addr_size): /gpio-keys-polled: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Cc: Adriana Kobylak Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Reviewed-by: Adriana Kobylak Tested-by: Adriana Kobylak Signed-off-by: Joel Stanley commit 5da9a58963626bfc12d03cc37c0706fcac336cb7 Author: Andrew Jeffery Date: Tue Dec 3 22:34:08 2019 +1030 ARM: dts: fp5280g2: Cleanup gpio-keys-polled properties dtbs_check gave the following warning: Warning (avoid_unnecessary_addr_size): /gpio-keys-polled: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Cc: John Wang Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Reviewed-by: Adriana Kobylak Tested-by: Adriana Kobylak Signed-off-by: Joel Stanley commit 95d519ceb8a30cda725e3fced58575c066def100 Author: Andrew Jeffery Date: Tue Dec 3 22:34:07 2019 +1030 ARM: dts: vesnin: Add unit address for memory node Fixes the following warnings: arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dt.yaml: /: memory: False schema does not allow {'reg': [[1073741824, 536870912]]} arch/arm/boot/dts/aspeed-bmc-opp-vesnin.dt.yaml: memory: 'device_type' is a required property Cc: Alexander Filippov Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Tested-by: Alexander Filippov Signed-off-by: Joel Stanley commit 1f3051142b128150160fe61e14fe013053b16a9f Author: Andrew Jeffery Date: Tue Dec 3 22:34:05 2019 +1030 ARM: dts: aspeed-g5: Use recommended generic node name for SDMC The EDAC is a sub-function of the SDRAM Memory Controller. Rename the node to the appropriate generic node name. Cc: Stefan M Schaeckeler Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Reviewed-by: Stefan Schaeckeler Signed-off-by: Joel Stanley commit b41c03c1cfdec39c68ad04ab79e8583a7b2b363e Author: Andrew Jeffery Date: Tue Dec 3 22:34:04 2019 +1030 ARM: dts: aspeed-g5: Move EDAC node to APB Previously the register interface was not attached to any internal bus, which is not correct - it lives on the APB. Cc: Stefan M Schaeckeler Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Reviewed-by: Stefan Schaeckeler Signed-off-by: Joel Stanley commit c5dea815834c7d2e9fc633785455bc428b7a1956 Author: Aditya Pakki Date: Sun Dec 15 11:51:30 2019 -0600 net: caif: replace BUG_ON with recovery code In caif_xmit, there is a crash if the ptr dev is NULL. However, by returning the error to the callers, the error can be handled. The patch fixes this issue. Signed-off-by: Aditya Pakki Signed-off-by: David S. Miller commit bbd20c939c8aa3f27fa30e86691af250bf92973a Author: Aditya Pakki Date: Sun Dec 15 10:14:51 2019 -0600 fore200e: Fix incorrect checks of NULL pointer dereference In fore200e_send and fore200e_close, the pointers from the arguments are dereferenced in the variable declaration block and then checked for NULL. The patch fixes these issues by avoiding NULL pointer dereferences. Signed-off-by: Aditya Pakki Signed-off-by: David S. Miller commit 030cc6cb1b6ccc09b74a7957958559dee00ec038 Author: Florian Fainelli Date: Fri Dec 13 11:51:02 2019 -0800 ARM: dts: NSP: Use hardware I2C for BCM958625HR Now that the i2c-bcm-iproc driver has been fixed to permit reading more than 63 bytes in a single transaction with commit fd01eecdf959 ("i2c: iproc: Fix i2c master read more than 63 bytes") we no longer need to bitbang i2c over GPIOs which was necessary before to allow the PHYLINK/SFP subsystems to read SFP modules. Reviewed-by: Ray Jui Signed-off-by: Florian Fainelli commit 03d51c4fc50781bc92ba68dcc03d01ce3656e64a Merge: 366c7bb0acf1 446f739104f4 Author: David S. Miller Date: Mon Dec 16 16:14:43 2019 -0800 Merge branch 'Simplify-IPv4-route-offload-API' Ido Schimmel says: ==================== Simplify IPv4 route offload API Motivation ========== The aim of this patch set is to simplify the IPv4 route offload API by making the stack a bit smarter about the notifications it is generating. This allows driver authors to focus on programming the underlying device instead of having to duplicate the IPv4 route insertion logic in their driver, which is error-prone. This is the first patch set out of a series of four. Subsequent patch sets will simplify the IPv6 API, add offload/trap indication to routes and add tests for all the code paths (including error paths). Available here [1]. Details ======= Today, whenever an IPv4 route is added or deleted a notification is sent in the FIB notification chain and it is up to offload drivers to decide if the route should be programmed to the hardware or not. This is not an easy task as in hardware routes are keyed by {prefix, prefix length, table id}, whereas the kernel can store multiple such routes that only differ in metric / TOS / nexthop info. This series makes sure that only routes that are actually used in the data path are notified to offload drivers. This greatly simplifies the work these drivers need to do, as they are now only concerned with programming the hardware and do not need to replicate the IPv4 route insertion logic and store multiple identical routes. The route that is notified is the first FIB alias in the FIB node with the given {prefix, prefix length, table ID}. In case the route is deleted and there is another route with the same key, a replace notification is emitted. Otherwise, a delete notification is emitted. The above means that in the case of multiple routes with the same key, but different TOS, only the route with the highest TOS is notified. While the kernel can route a packet based on its TOS, this is not supported by any hardware devices I am familiar with. Moreover, this is not supported by IPv6 nor by BIRD/FRR from what I could see. Offload drivers should therefore use the presence of a non-zero TOS as an indication to trap packets matching the route and let the kernel route them instead. mlxsw has been doing it for the past two years. Testing ======= To ensure there is no degradation in route insertion rates, I averaged the insertion rate of 512k routes (/24 and /32) over 50 runs. Did not observe any degradation. Functional tests are available here [1]. They rely on route trap indication, which is only added in the last patch set. In addition, I have been running syzkaller for the past week with all four patch sets and debug options enabled. Did not observe any problems. Patch set overview ================== Patches #1-#8 gradually introduce the new FIB notifications Patch #9 converts mlxsw to use the new notifications Patch #10 converts the remaining listeners and removes the old notifications v2: * Extend fib_find_alias() with another argument instead of introducing a new function (David Ahern) RFC: https://patchwork.ozlabs.org/cover/1170530/ [1] https://github.com/idosch/linux/tree/fib-notifier ==================== Signed-off-by: David S. Miller commit 446f739104f4da6207230363848ec2c89dfd858d Author: Ido Schimmel Date: Sat Dec 14 17:53:15 2019 +0200 ipv4: Remove old route notifications and convert listeners Unlike mlxsw, the other listeners to the FIB notification chain do not require any special modifications as they never considered multiple identical routes. This patch removes the old route notifications and converts all the listeners to use the new replace / delete notifications. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit b6a1d871d37a8a1beffb5432631ca77ca3712c84 Author: Ido Schimmel Date: Sat Dec 14 17:53:14 2019 +0200 mlxsw: spectrum_router: Start using new IPv4 route notifications With the new notifications mlxsw does not need to handle identical routes itself, as this is taken care of by the core IPv4 code. Instead, mlxsw only needs to take care of inserting and removing routes from the device. Convert mlxsw to use the new IPv4 route notifications and simplify the code. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 20d1565203e68cd32d5db3e293e7323173ad7a0d Author: Ido Schimmel Date: Sat Dec 14 17:53:13 2019 +0200 ipv4: Only Replay routes of interest to new listeners When a new listener is registered to the FIB notification chain it receives a dump of all the available routes in the system. Instead, make sure to only replay the IPv4 routes that are actually used in the data path and are of any interest to the new listener. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 525bc345fcbc6f0d58977452999dd18a15dc0e9b Author: Ido Schimmel Date: Sat Dec 14 17:53:12 2019 +0200 ipv4: Handle route deletion notification during flush In a similar fashion to previous patch, when a route is deleted as part of table flushing, promote the next route in the list, if exists. Otherwise, simply emit a delete notification. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit f613b6e2ffe13e9acba0d330a058b87aa0e19a2a Author: Ido Schimmel Date: Sat Dec 14 17:53:11 2019 +0200 ipv4: Handle route deletion notification When a route is deleted we potentially need to promote the next route in the FIB alias list (e.g., with an higher metric). In case we find such a route, a replace notification is emitted. Otherwise, a delete notification for the deleted route. v2: * Convert to use fib_find_alias() instead of fib_find_first_alias() Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit a8674f753e36f566d6c1d992ab85323d784281d9 Author: Ido Schimmel Date: Sat Dec 14 17:53:10 2019 +0200 ipv4: Notify newly added route if should be offloaded When a route is added, it should only be notified in case it is the first route in the FIB alias list with the given {prefix, prefix length, table ID}. Otherwise, it is not used in the data path and should not be considered by switch drivers. v2: * Convert to use fib_find_alias() instead of fib_find_first_alias() Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit ee3936d658821d26de9039c64c90750ba240989d Author: Ido Schimmel Date: Sat Dec 14 17:53:09 2019 +0200 ipv4: Notify route if replacing currently offloaded one When replacing a route, its replacement should only be notified in case the replaced route is of any interest to listeners. In other words, if the replaced route is currently used in the data path, which means it is the first route in the FIB alias list with the given {prefix, prefix length, table ID}. v2: * Convert to use fib_find_alias() instead of fib_find_first_alias() Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit b5fc0430dcbb36294b29a25cddb3bf7e92fe2307 Author: Ido Schimmel Date: Sat Dec 14 17:53:08 2019 +0200 ipv4: Extend FIB alias find function Extend the function with another argument, 'find_first'. When set, the function returns the first FIB alias with the matching {prefix, prefix length, table ID}. The TOS and priority parameters are ignored. Current callers are converted to pass 'false' in order to maintain existing behavior. This will be used by subsequent patches in the series. v2: * New patch Signed-off-by: Ido Schimmel Suggested-by: David Ahern Signed-off-by: David S. Miller commit a6c76c17df021b141b0d306828c9fe4ba2d2717c Author: Ido Schimmel Date: Sat Dec 14 17:53:07 2019 +0200 ipv4: Notify route after insertion to the routing table Currently, a new route is notified in the FIB notification chain before it is inserted to the FIB alias list. Subsequent patches will use the placement of the new route in the ordered FIB alias list in order to determine if the route should be notified or not. As a preparatory step, change the order so that the route is first inserted into the FIB alias list and only then notified. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit ba8381236fd0fa0ab4e8383fb752c843a31dd019 Author: Ido Schimmel Date: Sat Dec 14 17:53:06 2019 +0200 net: fib_notifier: Add temporary events to the FIB notification chain Subsequent patches are going to simplify the IPv4 route offload API, which will only use two events - replace and delete. Introduce a temporary version of these two events in order to make the conversion easier to review. Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 366c7bb0acf13791bef5127cf6e217386e75696d Merge: 54e1f08bddbe d5432455b1a8 Author: David S. Miller Date: Mon Dec 16 16:12:25 2019 -0800 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: some optimizaions related to work task This series refactors the work task of the HNS3 ethernet driver. [patch 1/5] uses delayed workqueue to replace the timer for hclgevf_service task, make the code simpler. [patch 2/5] & [patch 3/5] unifies current mailbox, reset and service work into one. [patch 4/5] allocates a private work queue with WQ_MEM_RECLAIM for the HNS3 driver. [patch 5/5] adds a new flag to indicate whether reset fails, and prevent scheduling service task to handle periodic task when this flag has been set. ==================== Signed-off-by: David S. Miller commit d5432455b1a869d92d5643de0b4875bbcfbcefed Author: Guojia Liao Date: Sat Dec 14 10:06:41 2019 +0800 net: hns3: do not schedule the periodic task when reset fail service_task will be scheduled per second to do some periodic jobs. When reset fails, it means this device is not available now, so the periodic jobs do not need to be handled. This patch adds flag HCLGE_STATE_RST_FAIL/HCLGEVF_STATE_RST_FAIL to indicate that reset fails, and checks this flag before schedule periodic task. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 0ea68902256e6cc705c94d1844dd8cf0805fd3e9 Author: Yunsheng Lin Date: Sat Dec 14 10:06:40 2019 +0800 net: hns3: allocate WQ with WQ_MEM_RECLAIM flag The hns3 driver may be used in memory reclaim path when it is the low level transport of a network file system, so it needs to guarantee forward progress even under memory pressure. This patch allocates a private WQ with WQ_MEM_RECLAIM set for both hclge_main and hclgevf_main modules. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit ff200099d271cb14e4415449559da7cc6a38f4a1 Author: Yunsheng Lin Date: Sat Dec 14 10:06:39 2019 +0800 net: hns3: remove unnecessary work in hclgevf_main There are four work (mbx_service_task, service_task, rst_service_task and keep_alive_task)in the hclgevf module, mbx_service_task is for handling mailbox issue, service_task is for periodic management issue and rst_service_task is for reset related issue, keep_alive_task is used to keepalive between PF and VF, which can be done in a single work. This patch removes the mbx_service_task, rst_service_task and keep_alive_task, and moves the related handling to the service_task work in order to remove concurrency between the four work and to improve efficiency. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 1c6dfe6fc6f77f3d124e63c2c2c3f9bb73f8d92c Author: Yunsheng Lin Date: Sat Dec 14 10:06:38 2019 +0800 net: hns3: remove mailbox and reset work in hclge_main There are three work (mbx_service_task, service_task, rst_service_task) in the HNS3 driver, mbx_service_task is for handling mailbox work, service_task is for periodic management issue and rst_service_task is for reset related issue, which can be handled in a single work. This patch removes the mbx_service_task and rst_service_task work, and moves the related handling to the service_task work in order to remove concurrency between the three work and to improve efficiency. BTW, since stats_timer in struct hclge_hw_stats is not needed anymore, so removes the definition of struct hclge_hw_stats, and moves mac_stats into struct hclge_dev. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit b3c3fe8e9961c3c76f8c6c6d5e50336cb6b16b48 Author: Yunsheng Lin Date: Sat Dec 14 10:06:37 2019 +0800 net: hns3: schedule hclgevf_service by using delayed workqueue Currently, a timer is defined to schedule hclgevf_service per second. To simplify the code, this patch uses the delayed work instead of timer to schedule hclgevf_serive. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 54e1f08bddbe63a3c0ae44f65df2c8b895003ef4 Author: Sven Eckelmann Date: Fri Dec 13 21:24:28 2019 +0100 ipv6: Annotate ipv6_addr_is_* bitwise pointer casts The sparse commit 6002ded74587 ("add a flag to warn on casts to/from bitwise pointers") introduced a check for non-direct casts from/to restricted datatypes (when -Wbitwise-pointer is enabled). This triggered a warning in the 64 bit optimized ipv6_addr_is_*() functions because sparse doesn't know that the buffer already points to some data in the correct bitwise integer format. But these were correct and can therefore be marked with __force to signalize sparse an intended cast to a specific bitwise type. Signed-off-by: Sven Eckelmann Signed-off-by: David S. Miller commit 1f1c1d7c89ee538f3e36b43098e95973f8fa37db Author: Sven Eckelmann Date: Fri Dec 13 21:24:27 2019 +0100 ipv6: Annotate bitwise IPv6 dsfield pointer cast The sparse commit 6002ded74587 ("add a flag to warn on casts to/from bitwise pointers") introduced a check for non-direct casts from/to restricted datatypes (when -Wbitwise-pointer is enabled). This triggered a warning in ipv6_get_dsfield() because sparse doesn't know that the buffer already points to some data in the correct bitwise integer format. This was already fixed in ipv6_change_dsfield() by the __force attribute and can be fixed here the same way. Signed-off-by: Sven Eckelmann Signed-off-by: David S. Miller commit f325937735498afb054a0195291bbf68d0b60be5 Author: Heiner Kallweit Date: Fri Dec 13 16:53:37 2019 +0100 r8169: check that Realtek PHY driver module is loaded Some users complained about problems with r8169 and it turned out that the generic PHY driver was used instead instead of the dedicated one. In all cases reason was that r8169.ko was in initramfs, but realtek.ko not. Manually adding realtek.ko to initramfs fixed the issues. Root cause seems to be that tools like dracut and genkernel don't consider softdeps. Add a check for loaded Realtek PHY driver module and provide the user with a hint if it's not loaded. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 0247743251993b56cb24084f09821791c4207fbb Merge: 0e627190563e 17568c62cd2c Author: David S. Miller Date: Mon Dec 16 15:56:41 2019 -0800 Merge branch 'dpaa2-ptp-support-external-trigger-event' Yangbo Lu says: ==================== dpaa2-ptp: support external trigger event This patch-set is to add external trigger event support for dpaa2-ptp driver since MC firmware has supported external trigger interrupt with a new v2 dprtc_set_irq_mask() API. And extts_clean_up() function in ptp_qoriq driver needs to be exported with minor fixes for dpaa2-ptp reusing. ==================== Signed-off-by: David S. Miller commit 17568c62cd2c9a8d75eb5da44b7df093819b6ebe Author: Yangbo Lu Date: Thu Dec 12 18:08:06 2019 +0800 dpaa2-ptp: add external trigger event support This patch is to add external trigger event support for dpaa2-ptp driver with v2 dprtc_set_irq_mask() API. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 9429439f59cd3b82a3e2732ead5363578de97a84 Author: Yangbo Lu Date: Thu Dec 12 18:08:05 2019 +0800 ptp_qoriq: export extts_clean_up() function Export extts_clean_up() function so that dpaa2-ptp driver is able to reuse it. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 10bc877c762339b8501a5b397137cf2f47cde575 Author: Yangbo Lu Date: Thu Dec 12 18:08:04 2019 +0800 ptp_qoriq: check valid status before reading extts fifo For PTP timer supporting external trigger timestamp FIFO, there is a valid bit in TMR_STAT register indicating the timestamp is available. For PTP timer without FIFO, there is not TMR_STAT register. This patch is to check the valid bit for the FIFO before reading timestamp, and to avoid operating TMR_STAT register for PTP timer without the FIFO. Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit 65b5969e58de22cf9facac0dd8c772b018cc0b69 Author: Tony Lindgren Date: Mon Dec 16 14:41:53 2019 -0800 ARM: dts: Add generic compatible for omap sdma instances We need this to pass auxdata to all the sdma instances. Cc: devicetree@vger.kernel.org Cc: Aaro Koskinen Cc: Peter Ujfalusi Cc: Russell King Cc: Vinod Koul Acked-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit 61025b815e944b777e882b1764217c0da59640de Author: Sibi Sankar Date: Mon Nov 18 21:44:19 2019 +0000 arm64: dts: qcom: sm8150: Add ADSP, CDSP, MPSS and SLPI smp2p Add the SMP2P nodes for the remoteproc states for ADSP, CDSP, MPSS and SLPI remoteprocs. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/0101016e80793dfa-9d0f6e93-01db-4c95-a226-d64bb50238cb-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit b7ff96cc68eb39726b095601c149a99e4943e117 Author: Sibi Sankar Date: Mon Nov 18 21:44:07 2019 +0000 remoteproc: qcom: pas: Add auto_boot flag Add auto_boot flag and set it to false for modem. This allows for the delayed boot up of modem after the dependencies are met in userspace. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/0101016e80790f6a-98fb016c-9639-4124-b6ee-fe7639af734f-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit 15f4ae1e18adfa6318e657e1c42c1e598b5b882e Author: Sibi Sankar Date: Mon Nov 18 21:43:58 2019 +0000 remoteproc: qcom: pas: Add SM8150 ADSP, CDSP, Modem and SLPI support Add support for booting the Modem, Audio, Compute and Sensor DSPs found on Qualcomm's SM8150 SoCs. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/0101016e8078ecaa-5ec3bf83-d23a-4ebe-a9a4-a5d08c357ae3-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit 27c303a456aa8e08d4fd8457e6223acbcdb5b50d Author: Sibi Sankar Date: Mon Nov 18 21:43:54 2019 +0000 dt-bindings: remoteproc: qcom: SM8150 Add ADSP, CDSP, MPSS and SLPI support Add ADSP, CDSP, MPSS and SLPI compatibles for SM8150 SoC. Reviewed-by: Rob Herring Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/0101016e8078dad4-458c8501-93fd-4daa-8938-d01027f248cb-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit 17ee2fb4e8567d01799eb8d777c33d25b1026cf9 Author: Sibi Sankar Date: Mon Nov 18 21:43:41 2019 +0000 remoteproc: qcom: pas: Vote for active/proxy power domains On SM8150 SoCs ADSP, CDSP and MPSS need to proxy vote on multiple rpmh ARC resources and active vote on QMP AOSS Power domains. Add support to vote for multiple active and proxy power domains. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/0101016e8078a71a-9ae99638-9e15-49a5-b769-85552526ae89-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit 22f517e04dc99e750f45ff86e460af2e2fcf2eb2 Author: Sibi Sankar Date: Mon Nov 18 21:43:34 2019 +0000 dt-bindings: remoteproc: qcom: Add power-domain bindings for Q6V5 PAS Add power-domain bindings for Q6V5 PAS on MSM8974/MSM8996/QCS404/SDM845 SoCs. Reviewed-by: Rob Herring Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/0101016e80788d28-7370e0e3-7380-4cc7-9233-40b9fd76e8f3-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit 2ac91aad378ae0f8688dfcd89c7e5e20a46688ed Author: Sibi Sankar Date: Mon Nov 18 21:43:30 2019 +0000 remoteproc: qcom: pas: Disable interrupt on clock enable failure Disable handover smp2p interrupt on "xo" clock prepare enable failure. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/0101016e80787f5e-e7b2e8af-a398-4fb4-ae27-a5f251d1f9cc-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit ce885265ef297b074b0cccfae3a929760e8fa6e7 Author: Andrew Jeffery Date: Tue Dec 3 22:34:03 2019 +1030 dt-bindings: misc: Document reg for aspeed, p2a-ctrl nodes The P2A controller node sits under a syscon device, and can assume offsets from the base of the syscon based on the compatible. However, for devicetree correctness allow a reg property to be specified, which an associated driver may choose to use to discover associated resources. Cc: Patrick Venture Cc: Greg Kroah-Hartman Signed-off-by: Andrew Jeffery Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley commit 89d6d772f613690eec9540a24b6b0ce60a99540c Author: Andrew Jeffery Date: Tue Dec 3 22:34:02 2019 +1030 dt-bindings: pinctrl: aspeed: Add reg property as a hint The pinctrl node sits under a syscon device, and can assume offsets from the base of the syscon based on the compatible. However, for devicetree correctness allow a reg property to be specified, which an associated driver may choose to use to discover associated resources. Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org Signed-off-by: Andrew Jeffery Acked-by: Linus Walleij Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley commit 9ddc8ec027a39759c946c3f4944d3e0c5a007ccd Author: Chris Wilson Date: Mon Dec 16 16:53:17 2019 +0000 drm/i915: Eliminate the trylock for awaiting an earlier request We currently use an error-prone mutex_trylock to grab another timeline to find an earlier request along it. However, with a bit of a sleight-of-hand, we can reduce the mutex_trylock to a spin_lock on the immediate request and careful pointer chasing to acquire a reference on the previous request. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191216165317.2742896-1-chris@chris-wilson.co.uk commit f8b7487734ceae5f593e7b50368f98bc3eb3d068 Author: Maya Rashish Date: Fri Dec 13 10:26:30 2019 +0000 Correct function name in comment Signed-off-by: Maya Rashish Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191213102630.GA24082@SDF.ORG commit 902eb748e5c3d32ad955eef439e0911905758166 Author: Chris Wilson Date: Mon Dec 16 14:24:09 2019 +0000 drm/i915/gt: Tidy up full-ppgtt on Ivybridge With a couple more memory barriers dotted around the place we can significantly reduce the MTBF on Ivybridge. Still doesn't really help Haswell though. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191216142409.2605211-1-chris@chris-wilson.co.uk commit 0a9a5532d2962a74004e041eeb2217de930f8c27 Author: Chris Wilson Date: Mon Dec 16 12:26:03 2019 +0000 drm/i915/gem: Apply lmem size restriction to get_pages When creating a handle, it is just that, an abstract handle. The fact that we cannot currently support a handle larger than the size of the backing storage is an artifact of our whole-object-at-a-time handling in get_pages() and being an implementation limitation is best handled at that point -- similar to shmem, where we only barf when asked to populate the whole object if larger than RAM. (Pinning the whole object at a time is major hindrance that we are likely to have to overcome in the near future.) In the case of the buddy allocator, the late check is preferable as the request size may often be smaller than the required size. Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Joonas Lahtinen Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191216122603.2598155-1-chris@chris-wilson.co.uk commit 884054403393a46ae88f24b0d76581278222f5ce Author: Venkata Sandeep Dhanalakota Date: Mon Dec 16 10:53:32 2019 -0800 drm/i915: Fix typecheck macro in GT_TRACE typecheck() macro creates an huge stack size causing issues with static analysis with coverity, addressing this with creating a local pointer. Fixes: 639f2f24895f ("drm/i915: Introduce new macros for tracing") Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Daniel Vetter Cc: Chris Wilson Cc: Jani Nikula Signed-off-by: Venkata Sandeep Dhanalakota Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191216185332.83289-1-venkata.s.dhanalakota@intel.com commit 8b4f2925cb1eaa704b39d7a5452290b1d8c3bdf1 Author: zhengbin Date: Mon Dec 16 11:44:05 2019 +0800 drm/i915: Remove unneeded semicolon Fixes coccicheck warning: drivers/gpu/drm/i915/gem/i915_gem_region.c:88:2-3: Unneeded semicolon drivers/gpu/drm/i915/gvt/gtt.c:1285:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Acked-by: Zhenyu Wang Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/1576467845-60920-1-git-send-email-zhengbin13@huawei.com commit dbd8f6bae6f4a98aa517aeda6e5276ed4a20f571 Author: Andrii Nakryiko Date: Mon Dec 16 10:38:29 2019 -0800 libbpf: Add zlib as a dependency in pkg-config template List zlib as another dependency of libbpf in pkg-config template. Verified it is correctly resolved to proper -lz flag: $ make DESTDIR=/tmp/libbpf-install install $ pkg-config --libs /tmp/libbpf-install/usr/local/lib64/pkgconfig/libbpf.pc -L/usr/local/lib64 -lbpf $ pkg-config --libs --static /tmp/libbpf-install/usr/local/lib64/pkgconfig/libbpf.pc -L/usr/local/lib64 -lbpf -lelf -lz Fixes: 166750bc1dd2 ("libbpf: Support libbpf-provided extern variables") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Cc: Luca Boccassi Link: https://lore.kernel.org/bpf/20191216183830.3972964-1-andriin@fb.com commit dc3a2d254782dea8e23a55f46129105ecfe787fb Author: Toke Høiland-Jørgensen Date: Mon Dec 16 19:12:04 2019 +0100 libbpf: Print hint about ulimit when getting permission denied error Probably the single most common error newcomers to XDP are stumped by is the 'permission denied' error they get when trying to load their program and 'ulimit -l' is set too low. For examples, see [0], [1]. Since the error code is UAPI, we can't change that. Instead, this patch adds a few heuristics in libbpf and outputs an additional hint if they are met: If an EPERM is returned on map create or program load, and geteuid() shows we are root, and the current RLIMIT_MEMLOCK is not infinity, we output a hint about raising 'ulimit -l' as an additional log line. [0] https://marc.info/?l=xdp-newbies&m=157043612505624&w=2 [1] https://github.com/xdp-project/xdp-tutorial/issues/86 Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Jesper Dangaard Brouer Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20191216181204.724953-1-toke@redhat.com commit eb843ab59134af588c35a71125aa1563acbc8e7e Author: Angus Ainslie (Purism) Date: Mon Dec 2 10:22:03 2019 -0700 dt-bindings: vendor-prefixes: Add a broadmobi entry Add Shanghai Broadmobi Communication Technology Co.,Ltd. for their modem dts entries. Signed-off-by: Angus Ainslie (Purism) Signed-off-by: Rob Herring commit 20107d7328cc2caea01587ba0571c61fb62efe41 Author: Gabriel Fernandez Date: Mon Dec 2 16:03:43 2019 +0100 dt-bindings: rcc: Convert stm32mp1 rcc bindings to json-schema Convert the STM32MP1 RCC binding to DT schema format using json-schema. Signed-off-by: Gabriel Fernandez Signed-off-by: Rob Herring commit 70a97443d96682770895131632f2aa0d2ef62bae Author: Alexandre Torgue Date: Fri Nov 22 11:39:42 2019 +0100 dt-bindings: arm: stm32: Convert stm32-syscon to json-schema Convert the STM32 syscon binding to DT schema format using json-schema. Signed-off-by: Alexandre Torgue Signed-off-by: Rob Herring commit bece4258502e88faa9f03ae2040f5427a257280c Author: Stephan Gerhold Date: Wed Nov 20 19:18:56 2019 +0100 dt-bindings: vendor-prefixes: Add "calaosystems" for CALAO Systems SAS The Snowball SBC supported by arch/arm/boot/dts/ste-snowball.dts was made by CALAO Systems and uses the "calaosystems,snowball-a9500" compatible. Prepare for documenting the compatible by adding "calaosystems" to the list of vendor prefixes. Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Signed-off-by: Rob Herring commit ef43406e6714ef81864831ed5053142fc1087126 Author: Stephan Gerhold Date: Wed Nov 20 19:18:55 2019 +0100 dt-bindings: vendor-prefixes: Deprecate "ste" and "st-ericsson" Until now, device tree bindings for ST-Ericsson have been added inconsistently with one of 3 possible vendor prefixes. "stericsson" is the most commonly used vendor prefix, so deprecate "ste" and "st-ericsson". Suggested-by: Rob Herring Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Signed-off-by: Rob Herring commit 50ce01f3f62949bc80ebe7a0ec103eb7622c912d Author: Stephan Gerhold Date: Wed Nov 20 19:18:54 2019 +0100 dt-bindings: vendor-prefixes: Add yet another for ST-Ericsson Unfortunately the vendor prefix for ST-Ericsson is used very inconsistently. "ste," and "stericsson," are already documented, but some things in the kernel use "st-ericsson," which is not documented yet. st-ericsson,u8500 is documented in bindings/arm/ux500/boards.txt, and is used to match the machine code and the generic DT cpufreq driver. Add it to the list of vendor prefixes. Signed-off-by: Stephan Gerhold Reviewed-by: Linus Walleij Signed-off-by: Rob Herring commit 40a4711a704f26fbef39166147caeb66885fbfef Author: Dong Aisheng Date: Sun Nov 17 20:58:50 2019 +0800 dt-bindings: i2c: lpi2c: add imx8qm compatible string Add imx8qm compatible string. Signed-off-by: Dong Aisheng Signed-off-by: Rob Herring commit 6a86e9f57a51f700ca775cb17114b9707a321e16 Author: Dong Aisheng Date: Sun Nov 17 20:58:49 2019 +0800 dt-bindings: serial: lpuart: add imx8qm compatible string Add imx8qm compatible string. Signed-off-by: Dong Aisheng Signed-off-by: Rob Herring commit 7dce4d6f151de852925feb1dd6e42d91dab14951 Author: Dong Aisheng Date: Sun Nov 17 20:58:48 2019 +0800 dt-bindings: mmc: fsl-imx-esdhc: add imx8qm compatible string Add imx8qm compatible string. Signed-off-by: Dong Aisheng Signed-off-by: Rob Herring commit 2403ed2f44b88e99a84b6c5d9317ba58c752f7c6 Author: yu kuai Date: Mon Dec 16 19:01:21 2019 +0800 EDAC: remove set but not used variable 'ecc_loc' Fixes gcc '-Wunused-but-set-variable' warning: drivers/edac/i5100_edac.c: In function ‘i5100_read_log’: drivers/edac/i5100_edac.c:489:11: warning: variable ‘ecc_loc’ set but not used [-Wunused-but-set-variable] It is never used, and so can be removed. Signed-off-by: yu kuai Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20191216110121.46698-1-yukuai3@huawei.com commit 4ba487019d1a196051feefab57f4a393815733b4 Author: Vandita Kulkarni Date: Mon Dec 16 13:36:19 2019 +0530 drm/i915: Fix WARN_ON condition for cursor plane ddb allocation In some cases like latency[level]==0, wm[level].res_lines>31, min_ddb_alloc can be U16_MAX, exclude it from the WARN_ON. v2: Specify the cases in which we hit U16_MAX, indentation (Ville) Fixes: 10a7e07b68b9 ("drm/i915: Make sure cursor has enough ddb for the selected wm level") Suggested-by: Ville Syrjälä Signed-off-by: Vandita Kulkarni Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191216080619.10945-1-vandita.kulkarni@intel.com commit faced7e0806cf44095a2833ad53ff59c39e6748d Author: Giuseppe Scrivano Date: Mon Dec 16 20:38:31 2019 +0100 mm: hugetlb controller for cgroups v2 In the effort of supporting cgroups v2 into Kubernetes, I stumped on the lack of the hugetlb controller. When the controller is enabled, it exposes four new files for each hugetlb size on non-root cgroups: - hugetlb..current - hugetlb..max - hugetlb..events - hugetlb..events.local The differences with the legacy hierarchy are in the file names and using the value "max" instead of "-1" to disable a limit. The file .limit_in_bytes is renamed to .max. The file .usage_in_bytes is renamed to .current. .failcnt is not provided as a single file anymore, but its value can be read through the new flat-keyed files .events and .events.local, through the "max" key. Signed-off-by: Giuseppe Scrivano Signed-off-by: Tejun Heo commit 6fb0a14fac871af24829f307ba0ab082726e40b8 Author: Hans de Goede Date: Thu Dec 12 21:48:28 2019 +0100 drm/i915: opregion: set opregion chpd value to indicate the driver handles hotplug According to both the old acpi_igd_opregion_spec_0.pdf and the newer skl_opregion_rev0p5.pdf opregion specification documents, if a driver handles hotplug events itself, it should set the opregion CHPD field to 1 to indicate this and the firmware should respond to this by no longer sending ACPI 0x00 notification events on e.g. lid-state changes. Specifically skl_opregion_rev0p5.pdf states thid in the documentation of the CHPD word: "Re-enumeration trigger logic in System BIOS MUST be disabled for all the Operating Systems supporting Hot-Plug (e.g., Windows* Longhorn and above)." Note the MUST in there. We ignore these notifications, so this should not be a problem but many recent DSTDs seem to all have the same copy-pasted bug in the GNOT() AML function which is used to send these notifications. Windows likely does not hit this bug as it presumably correcty sets CHPD to 1. Here is an example of the broken GNOT() method: Method (GNOT, 2, NotSerialized) { ... CEVT = Arg0 CSTS = 0x03 If (((CHPD == Zero) && (Arg1 == Zero))) { If (((OSYS > 0x07D0) || (OSYS < 0x07D6))) { Notify (PCI0, Arg1) } Else { Notify (GFX0, Arg1) } } ... Notice that the condition for the If is always true I believe that the || like needs to be an &&, but there is nothing we can do about this and in my own DSDT archive 55 of the 93 DSDTs have this issue. When the if is true the notification gets send to the PCI root instead of only to the GFX0 device. This causes Linux to re-enumerate PCI devices whenever the LID opens / closes, leading to unexpected messages in dmesg: Suspend through lid close: [ 313.598199] intel_atomisp2_pm 0000:00:03.0: Refused to change power state, currently in D3 [ 313.664453] intel_atomisp2_pm 0000:00:03.0: Refused to change power state, currently in D3 [ 313.737982] pci_bus 0000:01: Allocating resources [ 313.738036] pcieport 0000:00:1c.0: bridge window [io 0x1000-0x0fff] to [bus 01] add_size 1000 [ 313.738051] pcieport 0000:00:1c.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 01] add_size 200000 add_align 100000 [ 313.738111] pcieport 0000:00:1c.0: BAR 15: assigned [mem 0x91000000-0x911fffff 64bit pref] [ 313.738128] pcieport 0000:00:1c.0: BAR 13: assigned [io 0x1000-0x1fff] Resume: [ 813.623894] pci 0000:00:03.0: [8086:22b8] type 00 class 0x048000 [ 813.623955] pci 0000:00:03.0: reg 0x10: [mem 0x00000000-0x003fffff] [ 813.630477] pci 0000:00:03.0: BAR 0: assigned [mem 0x91c00000-0x91ffffff] [ 854.579101] intel_atomisp2_pm 0000:00:03.0: Refused to change power state, currently in D3 And more importantly this re-enumeration races with suspend/resume causing enumeration to not be complete when assert_isp_power_gated() from drivers/gpu/drm/i915/display/intel_display_power.c runs. This causes the !pci_dev_present(isp_ids) check in assert_isp_power_gated() to fail making the condition for the WARN true, leading to: [ 813.327886] ------------[ cut here ]------------ [ 813.327898] ISP not power gated [ 813.328028] WARNING: CPU: 2 PID: 2317 at drivers/gpu/drm/i915/display/intel_display_power.c:4870 intel_display_print_error_state+0x2b98/0x3a80 [i915] ... [ 813.328599] ---[ end trace f01e81b599596774 ]--- This commit fixes the unwanted ACPI notification on the PCI root device by setting CHPD to 1, so that the broken if condition in the AML never gets checked as notifications of type 0x00 are disabled altogether. Reviewed-by: Ville Syrjälä Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20191212204828.191288-1-hdegoede@redhat.com commit 865a0d06f870ea1ffccdb2b2d0acf7e2a0deb9a3 Author: Jerome Brunet Date: Mon Dec 9 15:38:36 2019 +0100 arm64: dts: meson: add libretech-pc boards support Add support for the the amlogic libretech-pc platform, aka tartiflette. There is 2 variants of the platform, one with the s905d, the other with the s912. Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 727d01cb17c8a8e593ace9d136cb382a2c0d9e94 Author: Jerome Brunet Date: Mon Dec 9 15:38:35 2019 +0100 dt-bindings: arm: amlogic: add libretech-pc bindings Add the board bindings for the libretech PC form factor Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit f8683c2abdf5129ec75d35d438aeff50df4f7208 Author: Jerome Brunet Date: Mon Dec 9 15:38:34 2019 +0100 arm64: defconfig: enable FUSB302 as module Enable the type C fusb302 driver as module Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit 4e11697528ebb0b6abdbd23e41ce64638739e5a3 Author: Jerome Brunet Date: Mon Dec 9 15:38:33 2019 +0100 arm64: dts: meson: gxl: add i2c C pins Add the DV18 and DV19 pinmux setting for the i2c C of the gxl family Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman commit c1cc29f2a04552d140c40fbe084f3e75cebccdd9 Author: Maxime Ripard Date: Mon Dec 9 10:35:58 2019 +0100 dt-bindings: clocks: Convert Allwinner A80 DE clocks to a schema The Allwinner A80 SoC has a display clocks controller that is supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Reviewed-by: Stephen Boyd Signed-off-by: Maxime Ripard commit c82f30306cddd201e6dbe0ce67a63fd69670ada3 Author: Maxime Ripard Date: Mon Dec 9 10:35:57 2019 +0100 dt-bindings: clocks: Convert Allwinner A80 USB clocks to a schema The Allwinner A80 SoC has a USB clocks controller that is supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Reviewed-by: Stephen Boyd Signed-off-by: Maxime Ripard commit 04a55fb2ff70c8b513e52305dc87b64689446bbd Author: Maxime Ripard Date: Mon Dec 9 10:35:56 2019 +0100 dt-bindings: clocks: Convert Allwinner DE2 clocks to a schema The newer Allwinner SoCs have a DE2 clocks controller that is supported in Linux, with a matching Device Tree binding. Now that we have the DT validation in place, let's convert the device tree bindings for that controller over to a YAML schemas. Reviewed-by: Stephen Boyd Signed-off-by: Maxime Ripard commit c82ebf1bf738e2d6f62266ddfd42f539b344a558 Author: Wolfram Sang Date: Mon Dec 16 13:29:51 2019 +0100 platform/chrome: chromeos_laptop: Convert to i2c_new_scanned_device Move from the deprecated i2c_new_probed_device() to the new i2c_new_scanned_device(). Make use of the new ERRPTR if suitable. Signed-off-by: Wolfram Sang Signed-off-by: Enric Balletbo i Serra commit 9212f8ee412012252d4d7c93ea262b415ced00e7 Author: Ville Syrjälä Date: Fri Dec 13 19:43:48 2019 +0200 drm/edid: Make sure the CEA mode arrays have the correct amount of modes We depend on a specific relationship between the VIC number and the index in the CEA mode arrays. Assert that the arrays have the expected size to make sure we've not accidentally left holes in them. v2: Pimp the BUILD_BUG_ON()s v3: Fix typos (Manasi) Cc: Hans Verkuil Reviewed-by: Manasi Navare Reviewed-by: Thomas Anderson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191213174348.27261-5-ville.syrjala@linux.intel.com commit 8c1b2bd9323855c03296d38d93deb2e470d8b7a7 Author: Ville Syrjälä Date: Fri Dec 13 19:43:47 2019 +0200 drm/edid: Throw away the dummy VIC 0 cea mode Now that the cea mode handling is not 100% tied to the single array the dummy VIC 0 mode is pretty much pointles. Throw it out. v2: Rebase Cc: Tom Anderson Cc: Hans Verkuil Cc: Manasi Navare Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191213174348.27261-4-ville.syrjala@linux.intel.com Reviewed-by: Thomas Anderson commit f7655d42fceefea7e4c2d07eb04381d086b7090e Author: Ville Syrjälä Date: Fri Dec 13 19:43:46 2019 +0200 drm/edid: Add CTA-861-G modes with VIC >= 193 Add a second table to the cea modes with VIC >= 193. v2: Improve the comment for cea_modes_*[] to indicate that one should always use cea_mode_for_vic() (Tom) Cc: Hans Verkuil Reviewed-by: Manasi Navare Reviewed-by: Thomas Anderson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191213174348.27261-3-ville.syrjala@linux.intel.com commit 7befe621ff81d8063c13d6452b04e6ebc92b22fd Author: Ville Syrjälä Date: Fri Dec 13 19:43:45 2019 +0200 drm/edid: Abstract away cea_edid_modes[] We're going to need two cea mode tables (one for VICs < 128, another one for VICs >= 193). To that end replace the direct edid_cea_modes[] lookups with a function call. And we'll rename the array to edid_cea_modes_0[] to indicate how it's to be indexed. v2: Fix typos (Tom) Drop the pointless NULL checks in the loops (Tom) Assign when declaring (Tom) Improve the comment for cea_modes_*[] to indicate that one should always use cea_mode_for_vic() (Tom) Cc: Tom Anderson Cc: Hans Verkuil Cc: Manasi Navare Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191213174348.27261-2-ville.syrjala@linux.intel.com Reviewed-by: Thomas Anderson commit d50ecc46d18fa19ccf06e0c4d2ee8a050c665e3d Author: Toke Høiland-Jørgensen Date: Mon Dec 16 12:07:42 2019 +0100 samples/bpf: Attach XDP programs in driver mode by default When attaching XDP programs, userspace can set flags to request the attach mode (generic/SKB mode, driver mode or hw offloaded mode). If no such flags are requested, the kernel will attempt to attach in driver mode, and then silently fall back to SKB mode if this fails. The silent fallback is a major source of user confusion, as users will try to load a program on a device without XDP support, and instead of an error they will get the silent fallback behaviour, not notice, and then wonder why performance is not what they were expecting. In an attempt to combat this, let's switch all the samples to default to explicitly requesting driver-mode attach. As part of this, ensure that all the userspace utilities have a switch to enable SKB mode. For those that have a switch to request driver mode, keep it but turn it into a no-op. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Jesper Dangaard Brouer Acked-by: David Ahern Link: https://lore.kernel.org/bpf/20191216110742.364456-1-toke@redhat.com commit 450278977acbf494a20367c22fbb38729772d1fc Author: Toke Høiland-Jørgensen Date: Mon Dec 16 11:38:19 2019 +0100 samples/bpf: Set -fno-stack-protector when building BPF programs It seems Clang can in some cases turn on stack protection by default, which doesn't work with BPF. This was reported once before[0], but it seems the flag to explicitly turn off the stack protector wasn't added to the Makefile, so do that now. The symptom of this is compile errors like the following: error: :0:0: in function bpf_prog1 i32 (%struct.__sk_buff*): A call to built-in function '__stack_chk_fail' is not supported. [0] https://www.spinics.net/lists/netdev/msg556400.html Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191216103819.359535-1-toke@redhat.com commit 5615ed472dc04e38a1affca69059f17c1178f770 Author: Toke Høiland-Jørgensen Date: Mon Dec 16 11:24:05 2019 +0100 samples/bpf: Add missing -lz to TPROGS_LDLIBS Since libbpf now links against zlib, this needs to be included in the linker invocation for the userspace programs in samples/bpf that link statically against libbpf. Fixes: 166750bc1dd2 ("libbpf: Support libbpf-provided extern variables") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Tested-by: Björn Töpel Link: https://lore.kernel.org/bpf/20191216102405.353834-1-toke@redhat.com commit 5984dc6cb5aa6cce342a44f01f984fde09ed05b1 Author: Prashant Bhole Date: Mon Dec 16 16:16:19 2019 +0900 samples/bpf: Reintroduce missed build targets Add xdp_redirect and per_socket_stats_example in build targets. They got removed from build targets in Makefile reorganization. Fixes: 1d97c6c2511f ("samples/bpf: Base target programs rules on Makefile.target") Signed-off-by: Prashant Bhole Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191216071619.25479-1-prashantbhole.linux@gmail.com commit 159ecc002b5f55f9c58de533551a2ee552861185 Author: Paul Chaignon Date: Mon Dec 16 12:27:33 2019 +0100 bpftool: Fix compilation warning on shadowed variable The ident variable has already been declared at the top of the function and doesn't need to be re-declared. Fixes: 985ead416df39 ("bpftool: Add skeleton codegen command") Signed-off-by: Paul Chaignon Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20191216112733.GA28366@Omicron commit 1ead083ae1472e5aaee7f18ea827b13f55bd10a6 Author: Arnd Bergmann Date: Fri Dec 13 21:52:14 2019 +0100 quota: avoid time_t in v1_disk_dqblk definition The time_t type is part of the user interface and not always the same, with the move to 64-bit timestamps and the difference between architectures. Make the quota format definition independent of this type and use a basic type of the same length. Make it unsigned in the process to keep the v1 format working until year 2106 instead of 2038 on 32-bit architectures. Hopefully, everybody has already moved to a newer format long ago (v2 was introduced with linux-2.4), but it's hard to be sure. Link: https://lore.kernel.org/r/20191213205221.3787308-6-arnd@arndb.de Signed-off-by: Arnd Bergmann Signed-off-by: Jan Kara commit a79ac2d1036a824abba982c33e938b717d1b659f Author: Prashant Bhole Date: Mon Dec 16 17:27:38 2019 +0900 libbpf: Fix build by renaming variables In btf__align_of() variable name 't' is shadowed by inner block declaration of another variable with same name. Patch renames variables in order to fix it. CC sharedobjs/btf.o btf.c: In function ‘btf__align_of’: btf.c:303:21: error: declaration of ‘t’ shadows a previous local [-Werror=shadow] 303 | int i, align = 1, t; | ^ btf.c:283:25: note: shadowed declaration is here 283 | const struct btf_type *t = btf__type_by_id(btf, id); | Fixes: 3d208f4ca111 ("libbpf: Expose btf__align_of() API") Signed-off-by: Prashant Bhole Signed-off-by: Daniel Borkmann Tested-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20191216082738.28421-1-prashantbhole.linux@gmail.com commit 957a227d413b06130b7d57d1954d821edf6991c1 Author: Sean Christopherson Date: Tue Nov 26 11:59:11 2019 -0800 x86/boot: Fix a comment's incorrect file reference Fix the comment for 'struct real_mode_header' to reference the correct assembly file, realmode/rm/header.S. The comment has always incorrectly referenced realmode.S, which doesn't exist, as defining the associated asm blob. Specify the file's path relative to arch/x86 to avoid confusion with boot/header.S. Update the comment for 'struct trampoline_header' to also include the relative path to keep things consistent, and tweak the dual 64/32 reference so that it doesn't appear to be an extension of the relative path, i.e. avoid "realmode/rm/trampoline_32/64.S". Signed-off-by: Sean Christopherson Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: x86-ml Link: https://lkml.kernel.org/r/20191126195911.3429-1-sean.j.christopherson@intel.com commit 0885acd77eb4644fd88f6d9f41e433f4ee9bc37a Author: Hans Verkuil Date: Sun Dec 15 12:09:32 2019 +0100 media: vivid: support multiplanar touch devices The v4l2-compliance tests failed with the touch device when multiplanar was enabled in vivid. Since it is perfectly fine to support the multiplanar API for touch, add support for this in vivid. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 095c21d31b7bd04d91d81a4a8c703a9d25c3658a Author: Hans Verkuil Date: Sun Dec 15 12:07:33 2019 +0100 media: v4l2-ioctl.c: allow multiplanar for touch There is no reason to prohibit multiplanar support for touch devices, so just allow it. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3ff4348ff5e42d66a8ab1195ccd6a21db108686c Author: Hans Verkuil Date: Sun Dec 15 10:46:06 2019 +0100 media: vivid: set field to NONE for touch The v4l2_buffer's 'field' value was never initialized in vivid for the touch capture device, causing v4l2-compliance errors. Set it to NONE. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6cc1d4568120bc8013b52873d9a40bdc6ae7802a Author: Matti Vaittinen Date: Wed Dec 11 11:47:57 2019 +0200 docs: driver-model: Add missing managed GPIO array get functions devm_gpiod_get_array and devm_gpiod_get_array_optional were missing from the list. Add them. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/f56dce4fcb71592cbcf0fc48a841f86f52770d4c.1576054779.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Linus Walleij commit ee8f537fd8b71c555d01a89e0834413bbf5373d4 Author: Kuninori Morimoto Date: Fri Dec 13 09:55:55 2019 +0900 ASoC: soc-core: remove legacy style of codec_conf Now all driver is using snd_soc_dai_link_component for codec_conf. Let's remove legacy style Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/871rt959ic.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Mark Brown commit e3c157c934fbb99054572a81ccc9da0a97227689 Author: Kuninori Morimoto Date: Fri Dec 13 09:55:50 2019 +0900 ASoC: ti: rx51: use snd_soc_dai_link_component for codec_conf We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/8736dp59ih.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Mark Brown commit b9fc10027cf37014d159deba69f0aad926496554 Author: Kuninori Morimoto Date: Fri Dec 13 09:55:44 2019 +0900 ASoC: samsung: speyside: use snd_soc_dai_link_component for codec_conf We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/874ky559in.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Mark Brown commit 1762d3a5fd69ad3b38713f9e6144c3e32279d8bf Author: Kuninori Morimoto Date: Fri Dec 13 09:55:39 2019 +0900 ASoC: samsung: neo1973_wm8753: use snd_soc_dai_link_component for codec_conf We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/875zil59is.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Mark Brown commit bfc5b22c7181b39cb106ae5c2fb1dfb6ad53a724 Author: Kuninori Morimoto Date: Fri Dec 13 09:55:34 2019 +0900 ASoC: samsung: lowland: use snd_soc_dai_link_component for codec_conf We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/877e3159ix.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Mark Brown commit 3874b2154be7abd3e5eb1c19af7e556f6a22d2fa Author: Kuninori Morimoto Date: Fri Dec 13 09:55:30 2019 +0900 ASoC: samsung: bells: use snd_soc_dai_link_component for codec_conf We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/878snh59j1.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Mark Brown commit 4edf6f7008b22e89e969d556ab7b162015615755 Merge: 7e0b2c32ada8 8e9a99361f56 Author: Ulf Hansson Date: Mon Dec 16 13:02:35 2019 +0100 Merge branch 'mmc_pinctrl' into next Merge an immutable pinctrl branch from Linus Walleij's tree, which enables pinctrl code consolidations for mmc. Signed-off-by: Ulf Hansson commit 2d27a4cf19674ff5c05d84e1037d8793e1090065 Author: Kuninori Morimoto Date: Fri Dec 13 09:55:25 2019 +0900 ASoC: mediatek: mt8183-da7219-max98357: use snd_soc_dai_link_component for codec_conf We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a77x59j6.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Mark Brown commit fe71bf9aaf459f2b3432593eb917edb4ffe1cb0d Author: Kuninori Morimoto Date: Fri Dec 13 09:55:20 2019 +0900 ASoC: mediatek: mt8173-rt5650-rt5676: use snd_soc_dai_link_component for codec_conf We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87blsd59jb.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Mark Brown commit e90c2a3bc151f7c855c67461be42dbf16625eb67 Author: Kuninori Morimoto Date: Fri Dec 13 09:55:15 2019 +0900 ASoC: mediatek: mt8173-rt5650-rt5514: use snd_soc_dai_link_component for codec_conf We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87d0ct59jg.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Mark Brown commit 03b70ef529aeabee42174bc356635ea1ab7a1729 Author: Kuninori Morimoto Date: Fri Dec 13 09:55:09 2019 +0900 ASoC: intel: skl_nau88l25_ssm4567: use snd_soc_dai_link_component for codec_conf We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87eex959jm.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Mark Brown commit 5a3493305ac0828ad33efe6f23db26a8dae6c3c3 Author: Kuninori Morimoto Date: Fri Dec 13 09:55:04 2019 +0900 ASoC: intel: kbl_rt5663_rt5514_max98927: use snd_soc_dai_link_component for codec_conf We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87fthp59jr.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Mark Brown commit 8a3bd454ee784360fc099eccc3e70be135aee836 Author: Kuninori Morimoto Date: Fri Dec 13 09:54:59 2019 +0900 ASoC: intel: kbl_rt5663_max98927: use snd_soc_dai_link_component for codec_conf We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h82559jw.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Mark Brown commit 13568b0331c5f2839925c586f7e3e6cfe7f2ab71 Author: Kuninori Morimoto Date: Fri Dec 13 09:54:53 2019 +0900 ASoC: intel: kbl_da7219_max98927: use snd_soc_dai_link_component for codec_conf We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87imml59k2.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Mark Brown commit eea2395217374b5ad8a97e525dcdae663b49f2d9 Author: Kuninori Morimoto Date: Fri Dec 13 09:54:44 2019 +0900 ASoC: fsl: imx-audmix: use snd_soc_dai_link_component for codec_conf We can use snd_soc_dai_link_component to specify codec_conf. Let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k17159kb.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Mark Brown commit c13493a2460b7ba8f6e75fe6e1a3b732cc294f8f Author: Kuninori Morimoto Date: Fri Dec 13 09:54:36 2019 +0900 ASoC: soc-core: support snd_soc_dai_link_component for codec_conf To find codec_conf component, it is using dev_name, of_node. But, we already has this kind of finding component method by snd_soc_dai_link_component, and snd_soc_is_matching_component(). We shouldn't have duplicate implementation to do same things. This patch adds snd_soc_dai_link_component support to find codec_conf component. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lfrh59kj.wl-kuninori.morimoto.gx@renesas.com Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Mark Brown commit 8e9a99361f56ce4e2bf22b77bbc953dde4a710bb Author: Ulf Hansson Date: Fri Dec 6 18:08:21 2019 +0100 mmc: uniphier-sd: Convert to pinctrl_select_default_state() Let's drop the boilerplate code for managing the default pinctrl state and convert into using the new pinctrl_select_default_state(). Cc: Masahiro Yamada Signed-off-by: Ulf Hansson Acked-by: Masahiro Yamada Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20191206170821.29711-10-ulf.hansson@linaro.org commit a62ff540559520636e63feb3c9813b0b18920313 Author: Ulf Hansson Date: Fri Dec 6 18:08:20 2019 +0100 mmc: jz4740: Convert to pinctrl_select_default_state() Let's move away from using pinctrl_pm_select_default_state() as it's scheduled for removal and use pinctrl_select_default_state() instead. Cc: Paul Cercueil Signed-off-by: Ulf Hansson Acked-by: Paul Cercueil Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20191206170821.29711-9-ulf.hansson@linaro.org commit 6986ee3f8bd1331d8125c39094605660581f5638 Author: Ulf Hansson Date: Fri Dec 6 18:08:19 2019 +0100 mmc: atmel-mci: Convert to pinctrl_select_default_state() Let's move away from using pinctrl_pm_select_default_state() as it's scheduled for removal and use pinctrl_select_default_state() instead. Cc: Ludovic Desroches Signed-off-by: Ulf Hansson Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20191206170821.29711-8-ulf.hansson@linaro.org commit 2480b72071b2d4be5922e2e7639303bd2d64195e Author: Ulf Hansson Date: Fri Dec 6 18:08:18 2019 +0100 mmc: sdhci-esdhc-imx: Convert to pinctrl_select_default_state() Let's drop the boilerplate code for managing the default pinctrl state and convert into using the new pinctrl_select_default_state(). Cc: Adrian Hunter Signed-off-by: Ulf Hansson Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20191206170821.29711-7-ulf.hansson@linaro.org commit 9f888b558976107daf3d4e1e37332641b5ae0494 Author: Ulf Hansson Date: Fri Dec 6 18:08:17 2019 +0100 mmc: omap_hsmmc: Convert to pinctrl_select_default_state() Let's drop the boilerplate code for managing the default pinctrl state and convert into using the new pinctrl_select_default_state(). Additionally, move away from using pinctrl_pm_select_default_state() as it's scheduled for removal and use pinctrl_select_default_state() instead. Signed-off-by: Ulf Hansson Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20191206170821.29711-6-ulf.hansson@linaro.org commit c17e73c32fa75f09264e0a85ffb377dd99234924 Author: Ulf Hansson Date: Fri Dec 6 18:08:16 2019 +0100 mmc: usdhi6rol0: Convert to pinctrl_select_default_state() Let's drop the boilerplate code for managing the default pinctrl state and convert into using the new pinctrl_select_default_state(). Cc: Jesper Nilsson Cc: Lars Persson Signed-off-by: Ulf Hansson Acked-by: Jesper Nilsson Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20191206170821.29711-5-ulf.hansson@linaro.org commit 05344ffe4b0d8fec55a722cc233348f95d689580 Author: Ulf Hansson Date: Fri Dec 6 18:08:15 2019 +0100 mmc: mmci: Convert to pinctrl_select_default_state() Let's drop the boilerplate code for managing the default pinctrl state and convert into using the new pinctrl_select_default_state(). Additionally, move away from using pinctrl_pm_select_default_state() as it's scheduled for removal and use pinctrl_select_default_state() instead. Cc: Russell King Signed-off-by: Ulf Hansson Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20191206170821.29711-4-ulf.hansson@linaro.org commit f9be7f9c358d9e7c94cda994eedadbd3571e787a Author: Ulf Hansson Date: Fri Dec 6 18:08:14 2019 +0100 mmc: meson-gx: Convert to pinctrl_select_default_state() Let's drop the boilerplate code for managing the default pinctrl state and convert into using the new pinctrl_select_default_state(). Cc: Kevin Hilman Signed-off-by: Ulf Hansson Reviewed-by: Jerome Brunet Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20191206170821.29711-3-ulf.hansson@linaro.org commit 4d5c1adaf893b8aa52525d2b81995e949bcb3239 Author: Jan Kara Date: Thu Dec 12 11:35:58 2019 +0100 reiserfs: Fix spurious unlock in reiserfs_fill_super() error handling When we fail to allocate string for journal device name we jump to 'error' label which tries to unlock reiserfs write lock which is not held. Jump to 'error_unlocked' instead. Fixes: f32485be8397 ("reiserfs: delay reiserfs lock until journal initialization") Signed-off-by: Jan Kara commit 5474ca7da6f34fa95e82edc747d5faa19cbdfb5c Author: Jan Kara Date: Thu Dec 12 11:30:03 2019 +0100 reiserfs: Fix memory leak of journal device string When a filesystem is mounted with jdev mount option, we store the journal device name in an allocated string in superblock. However we fail to ever free that string. Fix it. Reported-by: syzbot+1c6756baf4b16b94d2a6@syzkaller.appspotmail.com Fixes: c3aa077648e1 ("reiserfs: Properly display mount options in /proc/mounts") CC: stable@vger.kernel.org Signed-off-by: Jan Kara commit 34e92542da964304f41f97deee6e34085ad8106b Author: Chengguang Xu Date: Fri Nov 29 09:36:36 2019 +0800 ext2: set proper errno in error case of ext2_fill_super() Set proper errno in the case of failure of initializing percpu variables. Link: https://lore.kernel.org/r/20191129013636.7624-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit cd8fb859a84c1c4f985a582b79050116d2c30c47 Author: Linus Walleij Date: Thu Dec 5 09:39:15 2019 +0100 spi: meson-spicc: Use GPIO descriptors Instead of grabbing GPIOs using the legacy interface and handling them in the setup callback, just let the core grab and use the GPIOs using descriptors. Cc: Neil Armstrong Cc: Sunny Luo Signed-off-by: Linus Walleij Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/20191205083915.27650-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit 0a454258febb73e4c60d7f5d9a02d1a8c64fdfb8 Author: Peter Ujfalusi Date: Thu Dec 12 15:55:50 2019 +0200 spi: stm32: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191212135550.4634-10-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 658606ff4cf680ca97380f6ed7295722b0e991b2 Author: Peter Ujfalusi Date: Thu Dec 12 15:55:49 2019 +0200 spi: stm32-qspi: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191212135550.4634-9-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit b5756b777472eceaa84bc180f458f8eaec65da9a Author: Peter Ujfalusi Date: Thu Dec 12 15:55:48 2019 +0200 spi: spi-fsl-dspi: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191212135550.4634-8-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 401abb764abb6e42f539528e02127457eb0c5b32 Author: Peter Ujfalusi Date: Thu Dec 12 15:55:47 2019 +0200 spi: sirf: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191212135550.4634-7-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 7ccffd41b2d4d180dcdcc03c54c446621e34bca5 Author: Peter Ujfalusi Date: Thu Dec 12 15:55:46 2019 +0200 spi: mxs: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191212135550.4634-6-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 6bfbf4d0aa0c5ebfd4442e1200b21565703e90ed Author: Peter Ujfalusi Date: Thu Dec 12 15:55:45 2019 +0200 spi: img-spfi: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191212135550.4634-5-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 6133fed0539bc5c059d3a661b61704159ba448a6 Author: Peter Ujfalusi Date: Thu Dec 12 15:55:44 2019 +0200 spi: bcm2835: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191212135550.4634-4-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 666224b43b4bd4612ce3b758c038f9bc5c5e3fcb Author: Peter Ujfalusi Date: Thu Dec 12 15:55:43 2019 +0200 spi: bcm2835: Release the DMA channel if probe fails after dma_init The DMA channel was not released if either devm_request_irq() or devm_spi_register_controller() failed. Signed-off-by: Peter Ujfalusi Reviewed-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20191212135550.4634-3-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit d947c9d26c2381cc10067e76e71bf9ddb0fedb8b Author: Peter Ujfalusi Date: Thu Dec 12 15:55:42 2019 +0200 spi: atmel: Use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191212135550.4634-2-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit c096761718de0a6ac3205d80b12292c943235c4b Author: Gerd Hoffmann Date: Thu Dec 12 13:53:46 2019 +0100 drm/virtio: use damage info for display updates. v2: remove shift by src_{x,y}, drm_atomic_helper_damage_merged() handles that for us (Chia-I Wu). Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20191212125346.8334-4-kraxel@redhat.com commit 7082e7a438db2abf13e4e1fa904875034de88b6b Author: Gerd Hoffmann Date: Thu Dec 12 13:53:45 2019 +0100 drm/virtio: batch display update commands. When the driver submits multiple commands in a row it makes sense to notify the host only after submitting the last one, so the host can process them all at once, with a single vmexit. Add functions to enable/disable notifications to allow that. Use the new functions for primary plane updates. Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20191212125346.8334-3-kraxel@redhat.com commit 3954ff10e06e4fbc548fc02ff1fcaaac3228fed5 Author: Gerd Hoffmann Date: Thu Dec 12 13:53:44 2019 +0100 drm/virtio: skip set_scanout if framebuffer didn't change v2: also check src rect (Chia-I Wu). Signed-off-by: Gerd Hoffmann Reviewed-by: Chia-I Wu Link: http://patchwork.freedesktop.org/patch/msgid/20191212125346.8334-2-kraxel@redhat.com commit 4ad7056a4014e1cbc77f7b0361398fa26d2817b1 Author: Daniel Vetter Date: Fri Dec 13 18:26:10 2019 +0100 drm/virtio: plane_state->fb iff plane_state->crtc Checking both is one too much, so wrap a WARN_ON around it to stope the copypasta. Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191213172612.1514842-8-daniel.vetter@ffwll.ch Cc: David Airlie Cc: Gerd Hoffmann Cc: virtualization@lists.linux-foundation.org Signed-off-by: Gerd Hoffmann commit f2f7df4fbfb8fcfa8fd5900ef1e438ab400ab789 Author: zhengbin Date: Mon Dec 16 11:54:19 2019 +0800 drm/bochs: Remove unneeded semicolon Fixes coccicheck warning: drivers/gpu/drm/bochs/bochs_hw.c:258:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Link: http://patchwork.freedesktop.org/patch/msgid/1576468459-67216-1-git-send-email-zhengbin13@huawei.com Signed-off-by: Gerd Hoffmann commit 7e0b2c32ada813f7f974d53f2cf9845da4d69099 Merge: 811ba67632aa 2c92dd20304f Author: Ulf Hansson Date: Mon Dec 16 12:30:17 2019 +0100 Merge branch 'fixes' into next commit 811ba67632aae618985209cb9455f1d342426e6d Author: Faiz Abbas Date: Fri Dec 6 17:13:26 2019 +0530 mmc: sdhci: Update the tuning failed messages to pr_debug level Tuning support in DDR50 speed mode was added in SD Specifications Part1 Physical Layer Specification v3.01. Its not possible to distinguish between v3.00 and v3.01 from the SCR and that is why since commit 4324f6de6d2e ("mmc: core: enable CMD19 tuning for DDR50 mode") tuning failures are ignored in DDR50 speed mode. Cards compatible with v3.00 don't respond to CMD19 in DDR50 and this error gets printed during enumeration and also if retune is triggered at any time during operation. Update the printk level to pr_debug so that these errors don't lead to false error reports. Signed-off-by: Faiz Abbas Cc: stable@vger.kernel.org # v4.4+ Link: https://lore.kernel.org/r/20191206114326.15856-1-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit de27e978dc82ea22ef0f7999dfe870a087073907 Author: Geert Uytterhoeven Date: Thu Dec 5 14:43:48 2019 +0100 dt-bindings: mmc: renesas_sdhi: Document r8a77961 support Document support for the SDHI controller in the Renesas R-Car M3-W+ (R8A77961) SoC. Update all references to R-Car M3-W from "r8a7796" to "r8a77960", to avoid confusion between R-Car M3-W (R8A77960) and M3-W+. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20191205134349.6410-2-geert+renesas@glider.be Signed-off-by: Ulf Hansson commit c1a49782cc32d720284d82742e8d9468c5ceb988 Author: Wolfram Sang Date: Tue Dec 3 21:05:13 2019 +0100 mmc: renesas_sdhi: use recent tap values for HS400 New datasheets require different and new values for HS400 with 4taps or 8taps. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191203200513.1758-6-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 12e3c55d236b18fae00daa4ff54195b15cd741c3 Author: Wolfram Sang Date: Tue Dec 3 21:05:12 2019 +0100 mmc: renesas_sdhi: remove 4taps as a TMIO flag Now that the quirks structure is accessible, we can remove the TMIO flag for HS400 using only 4 taps. This is Renesas specific anyhow. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191203200513.1758-5-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 7af08206cb20308399f6ced08c52fb926624f24e Author: Wolfram Sang Date: Tue Dec 3 21:05:11 2019 +0100 mmc: renesas_sdhi: make quirks info accessible outside probe() We will need that for a later patch. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191203200513.1758-4-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit e5088f20ed4057fd717449caadfd741dacb2cdc7 Author: Wolfram Sang Date: Tue Dec 3 21:05:10 2019 +0100 mmc: renesas_sdhi: make warning more precise The warning is not solely used for SDR104 anymore, but for all which require tuning. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191203200513.1758-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 6e3cbb050b825e9003616ded9aa39957be20e77b Author: Wolfram Sang Date: Tue Dec 3 21:05:09 2019 +0100 mmc: renesas_sdhi: keep sorting for quirk entries The two devices next to each other are super similar, but still, let's keep the alphanumeric sorting for easier additions later. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191203200513.1758-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit a0fb3fc8af01436df45cc501c41f280025c1dfe8 Author: Wolfram Sang Date: Tue Dec 3 20:48:59 2019 +0100 mmc: renesas_sdhi: remove whitelist for internal DMAC We know now that there won't be Gen3 SoCs with both, SYS-DMAC and internal DMAC. We removed the blacklisting for SYS-DMAC already, so we can remove the whitelisting for internal DMAC, too. This makes adding new SoCs easier. We keep the quirk handling, of course. Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20191203194859.917-1-wsa@the-dreams.de Signed-off-by: Ulf Hansson commit fdbbe6cf6dce1879b214fb19085bb79a916c97ac Author: Yangbo Lu Date: Thu Nov 14 19:18:14 2019 +0800 mmc: sdhci: fix up CMD12 sending The STOP command is disabled for multiple blocks r/w commands with auto CMD12, when start to send. However, if there is data error, software still needs to send CMD12 according to SD spec. This patch is to allow software CMD12 sending for this case. Signed-off-by: Yangbo Lu Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20191114111814.35199-1-yangbo.lu@nxp.com Signed-off-by: Ulf Hansson commit af3ed119329cf9690598c5a562d95dfd128e91d6 Author: Linus Walleij Date: Wed Dec 4 16:27:49 2019 +0100 mmc: spi: Toggle SPI polarity, do not hardcode it The code in mmc_spi_initsequence() tries to send a burst with high chipselect and for this reason hardcodes the device into SPI_CS_HIGH. This is not good because the SPI_CS_HIGH flag indicates logical "asserted" CS not always the physical level. In some cases the signal is inverted in the GPIO library and in that case SPI_CS_HIGH is already set, and enforcing SPI_CS_HIGH again will actually drive it low. Instead of hard-coding this, toggle the polarity so if the default is LOW it goes high to assert chipselect but if it is already high then toggle it low instead. Cc: Phil Elwell Reported-by: Mark Brown Signed-off-by: Linus Walleij Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20191204152749.12652-1-linus.walleij@linaro.org Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit 3976656d67c1e47a5deb25f2c2fdc188dd97dbd7 Author: Ludovic Desroches Date: Thu Nov 28 08:45:21 2019 +0100 mmc: sdhci-of-at91: rework clocks management to support SAM9x60 device In the SAM9x60 SoC, there are only two clocks instead of three for the SDHCI device. The base clk is no longer provided, it is generated internally from the mult clk. The values of the base clk and mul in the capabilities registers may not reflect the reality as the mult clk is a programmable clock which can take several rates. As we can't trust those values, take them from the clock tree and update the capabilities according to. As we can have the same pitfall, in some cases, with the SAMA5D2 Soc, stop relying on capabilities too. Signed-off-by: Ludovic Desroches Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20191128074522.69706-2-ludovic.desroches@microchip.com Signed-off-by: Ulf Hansson commit d684be14457fb69a5fd6af32ca2e232cb43c5efc Author: Ludovic Desroches Date: Thu Nov 28 08:45:20 2019 +0100 dt-bindings: sdhci-of-at91: new compatible string and update properties There is a new compatible string for the SAM9X60 sdhci device. It involves an update of the properties about the clocks stuff. Signed-off-by: Ludovic Desroches Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191128074522.69706-1-ludovic.desroches@microchip.com Signed-off-by: Ulf Hansson commit efcc69b261f00ab01afecb2c0ca6cb95f17e740b Author: Veerabhadrarao Badiganti Date: Wed Nov 27 11:49:59 2019 +0000 dt-bindings: mmc: sdhci-msm: Add compatible string for sc7180 Add sc7180 SoC specific compatible strings for qcom-sdhci controller. Signed-off-by: Veerabhadrarao Badiganti Acked-by: Rob Herring Link: https://lore.kernel.org/r/0101016eacb255af-3985262d-9b7e-4813-88c2-61838406e12c-000000@us-west-2.amazonses.com Signed-off-by: Ulf Hansson commit d1fe276b5115f0d581c3cfe6154633b3547e8aab Author: Hans de Goede Date: Mon Nov 18 16:51:32 2019 +0100 drm/modes: parse_cmdline: Explicitly memset the passed in drm_cmdline_mode struct Instead of only setting mode->specified on false on an early exit and leaving e.g. mode->bpp_specified and mode->refresh_specified as is, lets be consistent and just zero out the entire passed in struct at the top of drm_mode_parse_command_line_for_connector() Changes in v3: -Drop "mode->specified = false;" line instead of the "return false;" (oops) This crasher was reported-by: kernel test robot Acked-by: Maxime Ripard Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-11-hdegoede@redhat.com commit 5b926617cdef41ce0696e09834991194b1759e28 Author: Hans de Goede Date: Mon Nov 18 16:51:31 2019 +0100 drm/modes: parse_cmdline: Remove some unnecessary code (v2) fb_get_options() will return fb_mode_option if no video= argument is present on the kernel commandline, so there is no need to also do this in drm_mode_parse_command_line_for_connector() as our only caller uses fb_get_options() to get the mode_option argument. Changes in v2: -Split out the changes dealing with the initialization of the mode struct into a separate patch Acked-by: Maxime Ripard Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-10-hdegoede@redhat.com commit 4e7a4a6fbdc669c44e6079f9d5eb25673749455f Author: Hans de Goede Date: Mon Nov 18 16:51:30 2019 +0100 drm/modes: parse_cmdline: Add support for specifying panel_orientation (v2) Sometimes we want to override a connector's panel_orientation from the kernel commandline. Either for testing and for special cases, e.g. a kiosk like setup which uses a TV mounted in portrait mode. Users can already specify a "rotate" option through a video= kernel cmdline option. But that only supports 0/180 degrees (see drm_client_modeset TODO) and only works for in kernel modeset clients, not for userspace kms users. The "panel-orientation" connector property OTOH does support 90/270 degrees as it leaves dealing with the rotation up to userspace and this does work for userspace kms clients (at least those which support this property). Changes in v2: -Add missing ':' after @panel_orientation (reported by kbuild test robot) BugLink: https://gitlab.freedesktop.org/plymouth/plymouth/merge_requests/83 Acked-by: Maxime Ripard Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-9-hdegoede@redhat.com commit 7b1cce760afe38b40f0989cdf10b2190dccf9815 Author: Hans de Goede Date: Mon Nov 18 16:51:29 2019 +0100 drm/modes: parse_cmdline: Allow specifying stand-alone options Some options which can be specified on the commandline, such as margin_right=..., margin_left=..., etc. are applied not only to the specified mode, but to all modes. As such it would be nice if the user can simply say e.g. video=HDMI-1:margin_right=14,margin_left=24,margin_bottom=36,margin_top=42 This commit refactors drm_mode_parse_command_line_for_connector() to add support for this, and as a nice side effect also cleans up the function a bit. Acked-by: Maxime Ripard Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-8-hdegoede@redhat.com commit 6a2d163756545aa3180d7851d5f8322b865e72be Author: Hans de Goede Date: Mon Nov 18 16:51:28 2019 +0100 drm/modes: parse_cmdline: Set bpp/refresh_specified after successful parsing drm_connector_get_cmdline_mode() calls drm_mode_parse_command_line_for_connector() with &connector->cmdline_mode as mode argument, so anything which we store in the mode arguments gets kept even if we return false. Avoid storing a possibly false-postive bpp/refresh_specified setting in connector->cmdline_mode by moving the setting of these to after successful parsing of the bpp/refresh parts of the video= argument. Acked-by: Maxime Ripard Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-7-hdegoede@redhat.com commit 99e2716e053734b70434502867be24d20a3e2d84 Author: Hans de Goede Date: Mon Nov 18 16:51:27 2019 +0100 drm/modes: parse_cmdline: Add freestanding argument to drm_mode_parse_cmdline_options() Add a freestanding function argument to drm_mode_parse_cmdline_options() similar to how drm_mode_parse_cmdline_extra() already has this. This is a preparation patch for allowing parsing of stand-alone options without a mode before them, e.g.: video=HDMI-1:margin_right=14,... Acked-by: Maxime Ripard Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-6-hdegoede@redhat.com commit 739b200c2edcaaa7a86f37b0c11db57956433dfb Author: Hans de Goede Date: Mon Nov 18 16:51:26 2019 +0100 drm/modes: parse_cmdline: Rework drm_mode_parse_cmdline_options() Refactor drm_mode_parse_cmdline_options() so that it takes a pointer to the first option, rather then a pointer to the ',' before the first option. This is a preparation patch for allowing parsing of stand-alone options without a mode before them, e.g.: video=HDMI-1:margin_right=14,... Acked-by: Maxime Ripard Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-5-hdegoede@redhat.com commit cfb0881b8f621b656a9e23b31944a5db94cf5842 Author: Hans de Goede Date: Mon Nov 18 16:51:25 2019 +0100 drm/modes: parse_cmdline: Accept extras directly after mode combined with options Before this commit it was impossible to combine an extra mode argument specified directly after the resolution with an option, e.g. video=HDMI-1:720x480e,rotate=180 would not work, either the "e" to force enable would need to be dropped or the ",rotate=180", otherwise the mode_option would not be accepted. This commit fixes this by setting parse_extras to true in this case, so that drm_mode_parse_cmdline_res_mode() parses the extra arguments directly after the resolution. Acked-by: Maxime Ripard Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-4-hdegoede@redhat.com commit c2ed3e941901810ad3d55ce1935fa22c5007fee4 Author: Hans de Goede Date: Mon Nov 18 16:51:24 2019 +0100 drm/modes: parse_cmdline: Stop parsing extras after bpp / refresh at ', ' Before this commit it was impossible to add an extra mode argument after a bpp or refresh specifier, combined with an option, e.g. video=HDMI-1:720x480-24e,rotate=180 would not work, either the "e" to force enable would need to be dropped or the ",rotate=180", otherwise the mode_option would not be accepted. This commit fixes this by fixing the length calculation if extras_ptr is set to stop the extra parsing at the start of the options (stop at the ',' options_ptr points to). Acked-by: Maxime Ripard Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-3-hdegoede@redhat.com commit 83e14ea3a64f00897cc31974d3ae4e27e5a7405b Author: Hans de Goede Date: Mon Nov 18 16:51:23 2019 +0100 drm/modes: parse_cmdline: Make various char pointers const We are not supposed to modify the passed in string, make char pointers used in drm_mode_parse_cmdline_options() const char * where possible. Acked-by: Maxime Ripard Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-2-hdegoede@redhat.com commit 8582e244e5fe72d2e9ace186fa8f3ed3bb4122e1 Author: Hans de Goede Date: Mon Nov 18 16:51:22 2019 +0100 drm/modes: parse_cmdline: Fix possible reference past end of string Before this commit, if the last option of a video=... option is for example "rotate" without a "=" after it then delim will point to the terminating 0 of the string, and value which is sets to will point one position past the end of the string. This commit fixes this by enforcing that the contents of delim equals '=' as it should be for options which take a value, this check is done in a new drm_mode_parse_cmdline_int helper function which factors out the common integer parsing code for all the options which take an int. Acked-by: Maxime Ripard Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-1-hdegoede@redhat.com commit aa659a3fca79abd9a3ca3ddc535db631b01c9a02 Author: Rafael J. Wysocki Date: Fri Dec 13 09:55:33 2019 +0100 ACPI: processor: Clean up acpi_processor_evaluate_cst() Clean up acpi_processor_evaluate_cst() in multiple ways: * Rename current_count to last_index which matches the purpose of the variable better. * Consistently use acpi_handle_*() for printing messages and make the messages cleaner. * Drop redundant parens and braces. * Rewrite and clarify comments. * Rearrange checks and drop the redundant ones. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit 987c785319b99e32602f7f86cfae3cf9b81e402b Author: Rafael J. Wysocki Date: Fri Dec 13 09:55:24 2019 +0100 ACPI: processor: Introduce acpi_processor_evaluate_cst() In order to separate the ACPI _CST evaluation from checks specific to the ACPI processor driver, move the majority of the acpi_processor_get_power_info_cst() function body to a new function, acpi_processor_evaluate_cst(), that will extract the C-states information from _CST output, and redefine acpi_processor_get_power_info_cst() as a wrapper around it. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit bc94638886ab21f8247d3f7f39573d3feb7d8284 Author: Rafael J. Wysocki Date: Fri Dec 13 09:55:14 2019 +0100 ACPI: processor: Export function to claim _CST control The intel_idle driver will be modified to use ACPI _CST subsequently and it will need to notify the platform firmware of that if acpi_gbl_FADT.cst_control is set, so add a routine for this purpose, acpi_processor_claim_cst_control(), to acpi_processor.c (so that it is always present which is required by intel_idle) and export it to allow the ACPI processor driver (which is modular) to call it. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit a67524c8bf7509fed179259cfe86a700b95b2324 Author: Hans Verkuil Date: Wed Dec 11 17:22:31 2019 +0100 media: pulse8-cec: log when a CEC message is received Log (if debug > 0) when a CEC message is received. This is done for transmits already, so it makes sense to do the same for receives. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 58704033816210b6fd549f407a30092af5a498b0 Author: Hans Verkuil Date: Wed Dec 11 17:22:30 2019 +0100 media: pulse8-cec: schedule next ping after current ping finished Don't schedule the next ping before the current ping is sent, schedule it after. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 601282d65b96bf2cbdc715e08bcdc9ca92b239e8 Author: Hans Verkuil Date: Wed Dec 11 17:22:29 2019 +0100 media: pulse8-cec: use adap_free callback Don't free everything in the disconnect callback, instead use the adap_free callback, which is called when the last open filehandle is closed. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 906870770431cbeb64e73da2111a4636d227f1e0 Author: Hans Verkuil Date: Wed Dec 11 17:22:28 2019 +0100 media: pulse8-cec: queue received messages in an array It turns out that received CEC messages can arrive faster than can be processed by the CEC framework, resulting in lost messages. Instead of storing only one CEC message, store up to 8. Also fix a bug where the EOM bit wasn't checked for a received message of length 1, so POLL messages weren't properly reported. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 49a37dc393d774b7f7b8ba3944b75c7f8673b43a Author: Heiko Stuebner Date: Mon Dec 9 15:31:30 2019 +0100 drm/rockchip: dsi: add px30 support Add the compatible and GRF definitions for the PX30 soc. changes in v5: - rebased on top of 5.5-rc1 - merged with dsi timing change to prevent ordering conflicts Signed-off-by: Heiko Stuebner Reviewed-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20191209143130.4553-7-heiko@sntech.de commit 95da672f386c937cc22f892fadb019de3b2c2f0d Author: Heiko Stuebner Date: Mon Dec 9 15:31:29 2019 +0100 dt-bindings: display: rockchip-dsi: add px30 compatible The px30 SoC also uses a dw-mipi-dsi controller, so add the compatible value for it. changes in v5: - rebased on top of 5.5-rc1 - merged with dsi timing change to prevent ordering conflicts Signed-off-by: Heiko Stuebner Acked-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20191209143130.4553-6-heiko@sntech.de commit 94bedc45acb5d03ca7e4f556964c13befba247e7 Author: Heiko Stuebner Date: Mon Dec 9 15:31:28 2019 +0100 drm/rockchip: add ability to handle external dphys in mipi-dsi While the common case is that the dsi controller uses an internal dphy, accessed through the phy registers inside the dsi controller, there is also the possibility to use a separate dphy from a different vendor. One such case is the Rockchip px30 that uses a Innosilicon Mipi dphy, so add the support for handling such a constellation, including the pll also getting generated inside that external phy. changes in v5: - rebased on top of 5.5-rc1 - merged with dsi timing change to prevent ordering conflicts Signed-off-by: Heiko Stuebner Reviewed-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20191209143130.4553-5-heiko@sntech.de commit b36910e078428aa499b41efd3c6b36a182649343 Author: Hans Verkuil Date: Wed Dec 11 17:22:27 2019 +0100 media: pulse8-cec: move the transmit to a workqueue Instead of adap_transmit waiting until the full message is transmitted (and thus hoarding the adap->lock mutex), have it kick off a transmit workqueue. This prevents adap->lock from being locked for a very long time. Also skip FAILED_ACK reports for broadcast messages: this makes no sense, and it seems a spurious message coming from the Pulse-Eight, since some time later I see the SUCCEEDED message. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0606f9b67e8c8727c1369096b3b142dd74dc0a39 Author: Heiko Stuebner Date: Mon Dec 9 15:31:27 2019 +0100 dt-bindings: display: rockchip-dsi: document external phys Some dw-mipi-dsi instances in Rockchip SoCs use external dphys. In these cases the needs clock will also be generated externally so these don't need the ref-clock as well. changes in v5: - rebased on top of 5.5-rc1 - merged with dsi timing change to prevent ordering conflicts Signed-off-by: Heiko Stuebner Reviewed-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20191209143130.4553-4-heiko@sntech.de commit 89bddff6be745fd688bbdd53773f5eb3136051eb Author: Heiko Stuebner Date: Mon Dec 9 15:31:26 2019 +0100 drm/bridge/synopsys: dsi: move phy_ops callbacks around panel enablement If implementation-specific phy_ops need to be defined they probably should be enabled before trying to talk to the panel and disabled only after the panel was disabled. Right now they are enabled last and disabled first, so might make it impossible to talk to some panels - example for this being the px30 with an external Innosilicon dphy that needs the phy to be enabled to transfer commands to the panel. So move the calls appropriately. changed in v5: - rebased on top of 5.5-rc1 - merged with dsi timing change to prevent ordering conflicts Signed-off-by: Heiko Stuebner Reviewed-by: Neil Armstrong Tested-by: Yannick Fertre Reviewed-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20191209143130.4553-3-heiko@sntech.de commit 25ed8aeb9c396475f48c13abdaf76a2e6e6b117b Author: Heiko Stuebner Date: Mon Dec 9 15:31:25 2019 +0100 drm/bridge/synopsys: dsi: driver-specific configuration of phy timings The timing values for dw-dsi are often dependent on the used display and according to Philippe Cornu will most likely also depend on the used phy technology in the soc-specific implementation. To solve this and allow specific implementations to define them as needed add a new get_timing callback to phy_ops and call this from the dphy_timing function to retrieve the necessary values for the specific mode. Right now this handles the hs2lp + lp2hs where Rockchip SoCs need handling according to the phy speed, while STM seems to be ok with static values. changes in v5: - rebase on 5.5-rc1 - merge into px30 dsi series to prevent ordering conflicts changes in v4: - rebase to make it directly fit on top of drm-misc-next after all changes in v3: - check existence of phy_ops->get_timing in __dw_mipi_dsi_probe() - emit actual error when get_timing() call fails - add tags from Philippe and Yannick changes in v2: - add driver-specific handling, don't force all bridge users to use the same timings, as suggested by Philippe Suggested-by: Philippe Cornu Signed-off-by: Heiko Stuebner Reviewed-by: Philippe Cornu Tested-by: Yannick Fertre Reviewed-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20191209143130.4553-2-heiko@sntech.de commit b7d0567f552a46c965d9cc30d5f7afa73a88450a Author: Hans Verkuil Date: Wed Dec 11 17:22:26 2019 +0100 media: pulse8-cec: set tx_done_status for transmit_done status Instead of translating work_result to a transmit_done status in pulse8_irq_work_handler(), pass the CEC_TX_STATUS via a new tx_done_status field. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 92eee37d398cc738369b5a073b4f596e36958641 Author: Hans Verkuil Date: Wed Dec 11 17:22:25 2019 +0100 media: pulse8-cec: add 2nd debug level Use debug level 2 to show the low-level Pulse-Eight commands. Also show the message to transmit on debug level 1 and add a debug log to show where the transmit failed. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a6706447f31916c4335a398c5384ca47f4e46661 Author: Hans Verkuil Date: Wed Dec 11 17:22:24 2019 +0100 media: pulse8-cec: locking improvements Drop the write_lock, rename config_lock to plain lock since this now locks access to the adapter. Use 'lock' when transmitting a message, ensuring that nothing interferes with the transmit. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cea28e7a55e7af4263ab5e4e02ca9b080b595e1b Author: Hans Verkuil Date: Wed Dec 11 17:22:23 2019 +0100 media: pulse8-cec: reorganize function order Reorganize the order of the functions in the source, going from low-level to high-level. No functional changes were made. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0ff916e2ef6fb742e4906aac26c470314b59bae8 Author: Eugeniy Paltsev Date: Tue Nov 19 17:41:47 2019 +0300 DRM: ARC: PGU: add ARGB8888 format to supported format list As we ignore first 8 bit of 32 bit pixel value we can add ARGB8888 format as alias of XRGB8888. Signed-off-by: Eugeniy Paltsev Signed-off-by: Alexey Brodkin commit 5908a3bd175d42df5c9946e78cee2d0221787bd4 Author: Eugeniy Paltsev Date: Tue Nov 19 17:41:46 2019 +0300 DRM: ARC: PGU: replace unsupported by HW RGB888 format by XRGB888 ARC PGU doesn't support RGB888 (24 bit) format but supports XRGB888 (32 bit) format. Fix incorrect format list in a driver. Signed-off-by: Eugeniy Paltsev Signed-off-by: Alexey Brodkin commit 491b14b9ba92e006a8b9d3c973809872b01dd095 Author: Eugeniy Paltsev Date: Tue Nov 19 17:41:45 2019 +0300 DRM: ARC: PGU: cleanup supported format list code Get rid of 'simplefb_format' structure usage as we only use its 'fourcc' field. Signed-off-by: Eugeniy Paltsev Signed-off-by: Alexey Brodkin commit 4c5b36ee73359b92355394adbd722823bf66806f Author: Eugeniy Paltsev Date: Tue Nov 19 17:41:44 2019 +0300 DRM: ARC: PGU: fix framebuffer format switching Current implementation don't switch to RGB565 format if BGR888 was previously used. Fix that. Signed-off-by: Eugeniy Paltsev Signed-off-by: Alexey Brodkin commit 71705c611263cad99edf85a5ea021e098cac032b Author: Simon Geis Date: Fri Dec 13 14:53:14 2019 +0100 PCMCIA/i82092: remove #if 0 block Remove the unused function indirect_read16, which is similar to indirect_read with the exception that it reads 16 instead of 8 bit. Co-developed-by: Lukas Panzer Signed-off-by: Lukas Panzer Signed-off-by: Simon Geis Signed-off-by: Dominik Brodowski commit 52739f063f7e991326eecfffa2538e1f425d2580 Author: Simon Geis Date: Fri Dec 13 14:53:13 2019 +0100 PCMCIA/i82092: delete enter/leave macro Remove the enter/leave macros and the corresponding calls. These are obsolete since ftrace is available. Co-developed-by: Lukas Panzer Signed-off-by: Lukas Panzer Signed-off-by: Simon Geis Signed-off-by: Dominik Brodowski commit ac5af87725f7f0e14ff99b7d784e652cba9c21b7 Author: Simon Geis Date: Fri Dec 13 14:53:12 2019 +0100 PCMCIA/i82092: include instead of Include the more general linux/io.h instead of asm/io.h as checkpatch suggests. Co-developed-by: Lukas Panzer Signed-off-by: Lukas Panzer Signed-off-by: Simon Geis Signed-off-by: Dominik Brodowski commit 152b4bb57aa43f7f6f55abbb75ccbab818ef3892 Author: Simon Geis Date: Fri Dec 13 14:53:11 2019 +0100 PCMCIA/i82092: shorten the lines with over 80 characters Split the lines with more than 80 characters in order to improve readability of the code. Co-developed-by: Lukas Panzer Signed-off-by: Lukas Panzer Signed-off-by: Simon Geis Signed-off-by: Dominik Brodowski commit 908864641f635892d4df265fe92425a5166c748b Author: Simon Geis Date: Fri Dec 13 14:53:10 2019 +0100 PCMCIA/i82092: move assignment out of if condition Improve readability by moving the assignment out of if conditions. Co-developed-by: Lukas Panzer Signed-off-by: Lukas Panzer Signed-off-by: Simon Geis Signed-off-by: Dominik Brodowski commit 6aaf8ff3265041263988d81102afe51923359a81 Author: Simon Geis Date: Fri Dec 13 14:53:09 2019 +0100 PCMCIA/i82092: change code indentation Align switch and case labels in order to improve readability. For the same reason, change the indentation of an if-statement. Co-developed-by: Lukas Panzer Signed-off-by: Lukas Panzer Signed-off-by: Simon Geis Signed-off-by: Dominik Brodowski commit 4ae66dd778e3e2245648347b3366e15e68aeb685 Author: Simon Geis Date: Fri Dec 13 14:53:08 2019 +0100 PCMCIA/i82092: insert blank line after declarations Improve readability of the code by inserting a blank line after variable declarations. Co-developed-by: Lukas Panzer Signed-off-by: Lukas Panzer Signed-off-by: Simon Geis Signed-off-by: Dominik Brodowski commit ae1f62c5408a6c33363475f2d1909fec32f0dc47 Author: Simon Geis Date: Fri Dec 13 14:53:07 2019 +0100 PCMCIA/i82092: remove braces around single statement blocks Remove braces around single statement blocks in order to improve readability. Co-developed-by: Lukas Panzer Signed-off-by: Lukas Panzer Signed-off-by: Simon Geis Signed-off-by: Dominik Brodowski commit 4839879f8af1309216e5edcce787bafba31c72b3 Author: Simon Geis Date: Fri Dec 13 14:53:06 2019 +0100 PCMCIA/i82092: add/remove spaces to improve readability Improve the readability by adding whitespaces after commas and around comparative operations. Also change indentation of one comment block. While at it, remove trailing whitespaces and spaces before tabs. Co-developed-by: Lukas Panzer Signed-off-by: Lukas Panzer Signed-off-by: Simon Geis [linux@dominikbrodowski.net: fixup one additional definition] Signed-off-by: Dominik Brodowski commit c8fdcc86725cc93a021139e8de68914857ea7489 Author: Linus Walleij Date: Mon Dec 2 11:30:28 2019 +0100 backlight: bd6107: Convert to use GPIO descriptor The Rohm BD6107 driver can pass a fixed GPIO line using the old GPIO API using platform data. As there are no in-tree users of this platform data since 2013, we can convert this to use a GPIO descriptor and require any out-of-tree consumers to pass the GPIO using a machine descriptor table instead. Signed-off-by: Linus Walleij Reviewed-by: Laurent Pinchart Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit edeec4fdc78008185eff2c352d75f048959af1d6 Author: Linus Walleij Date: Mon Dec 2 11:30:05 2019 +0100 backlight: ams369fg06: Drop GPIO include The driver includes yet fails to use symbols from any the header so drop the include. Signed-off-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 0738badd9d3f37671fa5769e5e629ced918e697b Author: Chen-Yu Tsai Date: Mon Dec 16 00:59:19 2019 +0800 ARM: dts: sun8i: r40: Add I2C pinmux options The R40 has five I2C controllers. Currently only I2C0 has its pinmux option defined. Add the options for the remaining four, and set them as the default, since each controller has only one possible pinmux configuration. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard commit 53870cf03faefa1f0d77fbc366db87d5beda203c Author: Aaron Ma Date: Mon Dec 16 17:55:12 2019 +0800 ACPI: video: Use native backlight on Lenovo E41-25/45 ACPI backlight control doesn't work on 2 Lenovo E41 laptops. So force to use native backlight control on them. Signed-off-by: Aaron Ma Signed-off-by: Rafael J. Wysocki commit cbf6d033ad378c6c58ce30cc618f7329a5d8272e Author: Kacper Piwiński Date: Wed Dec 11 10:37:28 2019 +0100 ACPI: video: fix typo in comment Signed-off-by: Kacper Piwiński Signed-off-by: Rafael J. Wysocki commit ff3154d1d89a2343fd5f82e65bc0cf1d4e6659b3 Author: Hans de Goede Date: Tue Dec 10 10:57:52 2019 +0100 ACPI / battery: Deal better with neither design nor full capacity not being reported Commit b41901a2cf06 ("ACPI / battery: Do not export energy_full[_design] on devices without full_charge_capacity") added support for some (broken) devices which always report 0 for both design_capacity and full_charge_capacity. Since the device that commit was written as a fix for is not reporting any form of "full" capacity we cannot calculate the value for the POWER_SUPPLY_PROP_CAPACITY, this is worked around by using an alternative array of available properties which does not contain this property. This is necessary because userspace (upower) treats us returning -ENODEV as 0 and then typically will trigger an emergency shutdown because of that. Userspace does not do this if the capacity sysfs attribute is not present at all. There are two potential problems with that commit: 1) It assumes that both full_charge- and design-capacity are broken at the same time and only checks if full_charge- is broken. 2) It assumes that this only ever happens for devices which report energy units rather then charge units. This commit fixes both issues by only using the alternative array of available properties if both full_charge- and design-capacity are broken and by also adding an alternative array of available properties for devices using mA units. Fixes: b41901a2cf06 ("ACPI / battery: Do not export energy_full[_design] on devices without full_charge_capacity") Cc: 4.19+ # 4.19+ Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 5b74d1d16e2f5753fcbdecd6771b2d8370dda414 Author: Hans de Goede Date: Tue Dec 10 10:57:51 2019 +0100 ACPI / battery: Use design-cap for capacity calculations if full-cap is not available The ThunderSoft TS178 tablet's _BIX implementation reports design_capacity but not full_charge_capacity. Before this commit this would cause us to return -ENODEV for the capacity attribute, which userspace does not like. Specifically upower does this: if (sysfs_file_exists (native_path, "capacity")) { percentage = sysfs_get_double (native_path, "capacity"); Where the sysfs_get_double() helper returns 0 when we return -ENODEV, so the battery always reads 0% if we return -ENODEV. This commit fixes this by using the design-capacity instead of the full-charge-capacity when the full-charge-capacity is not available. Fixes: b41901a2cf06 ("ACPI / battery: Do not export energy_full[_design] on devices without full_charge_capacity") Cc: 4.19+ # 4.19+ Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit cc99f0ad52467028cb1251160f23ad4bb65baf20 Author: Hans de Goede Date: Tue Dec 10 10:57:50 2019 +0100 ACPI / battery: Deal with design or full capacity being reported as -1 Commit b41901a2cf06 ("ACPI / battery: Do not export energy_full[_design] on devices without full_charge_capacity") added support for some (broken) devices which always report 0 for both design- and full_charge-capacity. This assumes that if the capacity is not being reported it is 0. The ThunderSoft TS178 tablet's _BIX implementation falsifies this assumption. It reports ACPI_BATTERY_VALUE_UNKNOWN (-1) as full_charge_capacity, which we treat as a valid value which causes several problems. This commit fixes this by adding a new ACPI_BATTERY_CAPACITY_VALID() helper which checks that the value is not 0 and not -1; and using this whenever we need to test if either design_capacity or full_charge_capacity is valid. Fixes: b41901a2cf06 ("ACPI / battery: Do not export energy_full[_design] on devices without full_charge_capacity") Cc: 4.19+ # 4.19+ Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 26a0a10419fd8ee1b45f8a91f38ded230410b262 Author: Simon Geis Date: Fri Dec 13 14:53:04 2019 +0100 PCMCIA/i82092: use dev_ instead of printk Improve the log output by using the device-aware dev_err()/dev_info() functions. While at it, update one remaining printk(KERN_ERR ...) call to the preferred pr_err() call and delete commented out debugging lines. Co-developed-by: Lukas Panzer Signed-off-by: Lukas Panzer Signed-off-by: Simon Geis [linux@dominikbrodowski.net: disapply unneeded part of patch] Signed-off-by: Dominik Brodowski commit cabbaed7198976cb1d7317830aa2fde935d0519c Author: Clément Péron Date: Sat Dec 14 14:26:42 2019 +0100 arm64: dts: allwinner: unify header comment style Allwinner device tree files used different comment style for copyright notice. Update this to keep a coherency. Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard commit b4b8f2c961582f4ab9176e35f59b8ed6a5e108c6 Author: Clément Péron Date: Sat Dec 14 14:26:41 2019 +0100 arm64: dts: allwinner: Convert license to SPDX identifier Use a shorter SPDX identifier instead of pasting the whole license. Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard commit d2ab1a675698e52aeade455b0b674508fbb3cc21 Author: Clément Péron Date: Sat Dec 14 14:26:40 2019 +0100 arm64: dts: allwinner: Fix wrong license header Some headers specify that files are under dual-licensed GPL2.0+ and X11. But in fact, it turns out that the full licenses texts associated are GPL2.0+ and MIT. Fix license headers to reflect real licenses associated. Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard commit c97fcd8546c0c2a9e8e0512f501b1ca9aa25efdc Merge: 3bf258e159cd d8488a41800d Author: Jerome Brunet Date: Mon Dec 16 10:59:26 2019 +0100 Merge branch 'v5.5/fixes' into v5.6/drivers commit d8488a41800d9f5c80bc0d17b9cc2c91b4841464 Author: Remi Pommarel Date: Sun Dec 15 12:47:05 2019 +0100 clk: meson: pll: Fix by 0 division in __pll_params_to_rate() Some meson pll registers can be initialized with 0 as N value, introducing the following division by 0 when computing rate : UBSAN: Undefined behaviour in drivers/clk/meson/clk-pll.c:75:9 division by zero CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.0-rc3-608075-g86c9af8630e1-dirty #400 Call trace: dump_backtrace+0x0/0x1c0 show_stack+0x14/0x20 dump_stack+0xc4/0x100 ubsan_epilogue+0x14/0x68 __ubsan_handle_divrem_overflow+0x98/0xb8 __pll_params_to_rate+0xdc/0x140 meson_clk_pll_recalc_rate+0x278/0x3a0 __clk_register+0x7c8/0xbb0 devm_clk_hw_register+0x54/0xc0 meson_eeclkc_probe+0xf4/0x1a0 platform_drv_probe+0x54/0xd8 really_probe+0x16c/0x438 driver_probe_device+0xb0/0xf0 device_driver_attach+0x94/0xa0 __driver_attach+0x70/0x108 bus_for_each_dev+0xd8/0x128 driver_attach+0x30/0x40 bus_add_driver+0x1b0/0x2d8 driver_register+0xbc/0x1d0 __platform_driver_register+0x78/0x88 axg_driver_init+0x18/0x20 do_one_initcall+0xc8/0x24c kernel_init_freeable+0x2b0/0x344 kernel_init+0x10/0x128 ret_from_fork+0x10/0x18 This checks if N is null before doing the division. Fixes: 7a29a869434e ("clk: meson: Add support for Meson clock controller") Reviewed-by: Martin Blumenstingl Signed-off-by: Remi Pommarel [jbrunet@baylibre.com: update the comment in above the fix] Signed-off-by: Jerome Brunet commit 6913bc3a2e9c1548d562164db2636231a9f804f6 Author: Hans Verkuil Date: Wed Dec 11 17:22:22 2019 +0100 media: pulse8-cec: improve debugging Add and use pulse8_msgname() to show the message codes as a human readable text instead of a number. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c2753d15d2b33f980ef4dbb657373a3f327533eb Author: Katsuhiro Suzuki Date: Mon Dec 2 14:59:29 2019 +0900 arm64: dts: rockchip: split rk3399-rockpro64 for v2 and v2.1 boards This patch splits rk3399-rockpro64 dts file to 2 files for v2 and v2.1 boards. Both v2 and v2.1 boards can use almost same settings but we find a difference in I2C address of audio CODEC ES8136. Reported-by: Vasily Khoruzhick Signed-off-by: Katsuhiro Suzuki Link: https://lore.kernel.org/r/20191202055929.26540-1-katsuhiro@katsuster.net [put pine64,rockpro64-v2.* into an enum] Signed-off-by: Heiko Stuebner commit 534ad35798aff40a93acac4c6d204ff8867701aa Author: Hamish Martin Date: Mon Dec 16 10:05:03 2019 +1300 pinctrl: iproc: Set irq handler based on trig type Rather than always using handle_simple_irq() as the gpio_irq_chip handler, set a more appropriate handler based on the IRQ trigger type requested. This is important for level triggered interrupts which need to be masked during handling. Signed-off-by: Hamish Martin Link: https://lore.kernel.org/r/20191215210503.15488-2-hamish.martin@alliedtelesis.co.nz Signed-off-by: Linus Walleij commit ce2b617ce8cbb7ba7a956299061bbc784131333c Author: Jessica Yu Date: Tue Nov 12 12:35:59 2019 +0100 export.h: reduce __ksymtab_strings string duplication by using "MS" section flags Commit c3a6cf19e695 ("export: avoid code duplication in include/linux/export.h") refactors export.h quite nicely, but introduces a slight increase in memory usage due to using the empty string "" instead of NULL to indicate that an exported symbol has no namespace. As mentioned in that commit, this meant an increase of 1 byte per exported symbol without a namespace. For example, if a kernel configuration has about 10k exported symbols, this would mean that the size of __ksymtab_strings would increase by roughly 10kB. We can alleviate this situation by utilizing the SHF_MERGE and SHF_STRING section flags. SHF_MERGE|SHF_STRING indicate to the linker that the data in the section are null-terminated strings that can be merged to eliminate duplication. More specifically, from the binutils documentation - "for sections with both M and S, a string which is a suffix of a larger string is considered a duplicate. Thus "def" will be merged with "abcdef"; A reference to the first "def" will be changed to a reference to "abcdef"+3". Thus, all the empty strings would be merged as well as any strings that can be merged according to the cited method above. For example, "memset" and "__memset" would be merged to just "__memset" in __ksymtab_strings. As of v5.4-rc5, the following statistics were gathered with x86 defconfig with approximately 10.7k exported symbols. Size of __ksymtab_strings in vmlinux: ------------------------------------- v5.4-rc5: 213834 bytes v5.4-rc5 with commit c3a6cf19e695: 224455 bytes v5.4-rc5 with this patch: 205759 bytes So, we already see memory savings of ~8kB compared to vanilla -rc5 and savings of nearly 18.7kB compared to -rc5 with commit c3a6cf19e695 on top. Unfortunately, as of this writing, strings will not get deduplicated for kernel modules, as ld does not do the deduplication for SHF_MERGE|SHF_STRINGS sections for relocatable files (ld -r), which kernel modules are. A patch for ld is currently being worked on to hopefully allow for string deduplication in relocatable files in the future. Suggested-by: Rasmus Villemoes Reviewed-by: Masahiro Yamada Reviewed-by: Matthias Maennich Signed-off-by: Jessica Yu commit 0c556dea089dd133c70b72edae2f429ebe7e652f Author: Heiko Stuebner Date: Sun Dec 8 15:55:08 2019 +0100 arm64: dts: rockchip: enable the gpu on px30-evb The px30 has a Mali Bifrost gpu, so enable it on the evb board and connect it with its supplying regulator. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20191208145508.3124-3-heiko@sntech.de commit a07f34a083f211c5f2f9b073a9b499accee078a2 Author: Heiko Stuebner Date: Sun Dec 8 15:55:07 2019 +0100 arm64: dts: rockchip: add the gpu for px30 The px30 contains a Mali Bifrost gpu, so add the necessary core node for it with interrupts and powerdomains. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20191208145508.3124-2-heiko@sntech.de commit ad848dd53385b61f3c2b94d3466bf799f31035a7 Author: Heiko Stuebner Date: Sun Dec 8 15:55:06 2019 +0100 dt-bindings: gpu: mali-bifrost: Add Rockchip PX30 Define a compatible string for the Mali Bifrost GPU found in Rockchip's PX30 SoCs. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20191208145508.3124-1-heiko@sntech.de commit afb34781620274236bd9fc9246e22f6963ef5262 Author: Nathan Chancellor Date: Sun Dec 8 22:11:40 2019 +0100 media: v4l2-device.h: Explicitly compare grp{id,mask} to zero in v4l2_device macros When building with Clang + -Wtautological-constant-compare, several of the ivtv and cx18 drivers warn along the lines of: drivers/media/pci/cx18/cx18-driver.c:1005:21: warning: converting the result of '<<' to a boolean always evaluates to true [-Wtautological-constant-compare] cx18_call_hw(cx, CX18_HW_GPIO_RESET_CTRL, ^ drivers/media/pci/cx18/cx18-cards.h:18:37: note: expanded from macro 'CX18_HW_GPIO_RESET_CTRL' #define CX18_HW_GPIO_RESET_CTRL (1 << 6) ^ 1 warning generated. This warning happens because the shift operation is implicitly converted to a boolean in v4l2_device_mask_call_all before being negated. This can be solved by just comparing the mask result to 0 explicitly so that there is no boolean conversion. The ultimate goal is to enable -Wtautological-compare globally because there are several subwarnings that would be helpful to have. For visual consistency and avoidance of these warnings in the future, all of the implicitly boolean conversions in the v4l2_device macros are converted to explicit ones as well. Link: https://github.com/ClangBuiltLinux/linux/issues/752 Reviewed-by: Ezequiel Garcia Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Chancellor Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8c2d66b036c778480787e395097e0d04bc383db4 Author: Ezequiel Garcia Date: Thu Dec 5 15:24:43 2019 +0100 media: hantro: Support color conversion via post-processing The Hantro G1 decoder is able to enable a post-processor on the decoding pipeline, which can be used to perform scaling and color conversion. The post-processor is integrated to the decoder, and it's possible to use it in a way that is completely transparent to the user. This commit enables color conversion via post-processing, which means the driver now exposes YUV packed, in addition to NV12. Signed-off-by: Ezequiel Garcia Reviewed-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b1b3f0622a9d52ac19a63619911823c89a4d85a4 Author: Jerome Brunet Date: Fri Dec 13 11:33:04 2019 +0100 clk: meson: g12a: fix missing uart2 in regmap table UART2 peripheral is missing from the regmap fixup table of the g12a family clock controller. As it is, any access to this clock would Oops, which is not great. Add the clock to the table to fix the problem. Fixes: 085a4ea93d54 ("clk: meson: g12a: add peripheral clock controller") Reported-by: Dmitry Shmidt Tested-by: Dmitry Shmidt Acked-by: Neil Armstrong Tested-by: Kevin Hilman Signed-off-by: Jerome Brunet commit 3143f8a123dc6ecbe1f39e92fb1081e49a1c7bf1 Author: Ezequiel Garcia Date: Thu Dec 5 15:24:42 2019 +0100 media: hantro: Rename {prepare,finish}_run to {start,end}_prepare_run hantro_prepare_run() and hantro_finish_run() are slightly misleading, so let's rename it to something a bit more clear. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5980d40276b36b7bcd966deada0e7de9df29f247 Author: Ezequiel Garcia Date: Thu Dec 5 15:24:41 2019 +0100 media: hantro: Cleanup format negotiation helpers Format negotiation helpers, hantro_find_format() and hantro_get_default_fmt() can be simplified, making the code a little bit clearer. More importantly, this change is preparation work for the post-processor usage. Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Reviewed-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0fb36893c6c129d48965332a23fa4ea6b075ad0c Author: Ezequiel Garcia Date: Thu Dec 5 15:24:40 2019 +0100 media: vidioc-enum-fmt.rst: clarify format preference It has been decided to use the ENUM_FMT index value as a hint for driver preference. This is defined purposedly in a very liberal way, letting drivers define what "preference" means. For instance, the Hantro VPU driver indicates additional processing to output a given format, and thus implicates more CPU usage, which is enumerated after native (non-processed) formats. Signed-off-by: Ezequiel Garcia Reviewed-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 961f97ab1ef3e2dbe43fac4913372f58ca4a5f74 Author: Dragos Bogdan Date: Fri Oct 18 13:29:55 2019 +0200 media: adv7604: extend deep color mode to ADV7611 The AD7611 chip supports the same Deep Color Mode settings as the AD7604. This change extends support for this feature to the AD7611 by adding a wrapper function for the `read_hdmi_pixelclock` hook and adding the same frequency adjustment logic. Signed-off-by: Dragos Bogdan Signed-off-by: Alexandru Ardelean Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 69e39d40587b8d7538f966607299c360dc935b1f Author: Guilherme Alcarde Gallo Date: Sun Nov 10 19:33:21 2019 +0100 media: vimc: Implement get/set selection in sink Add support for the sink pad of scaler subdevice to respond VIDIOC_G_SELECTION and VIDIOC_S_SELECTION ioctls with the following targets: V4L2_SEL_TGT_COMPOSE_BOUNDS and V4L2_SEL_TGT_CROP. * Add new const struct crop_rect_default to initialize subdev scaler properly. * Make changes in sink pad format reflect to the crop rectangle. E.g. changing the frame format to a smaller size one can make the former crop rectangle selects a non existing frame area. To solve this situation the crop rectangle is clamped to the frame boundaries. * Clamp crop rectangle respecting the sink bounds during set_selection ioctl. Co-developed-by: Danilo Figueiredo Rocha Signed-off-by: Guilherme Alcarde Gallo Signed-off-by: Danilo Figueiredo Rocha Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 94010145a58f169e73e6c7e88b57017112814955 Author: Hans Verkuil Date: Tue Nov 19 11:51:16 2019 +0100 media: pixfmt-tch-td16/tu16.rst: document that this is little endian Testing with the rmi_f54 driver on the Lenovo X1 Carbon 6th gen laptop showed that the data is in little endian format. Update the documentation accordingly. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 06b5cf51607da6bec60815954487e96012d5f8ee Author: Rui Miguel Silva Date: Thu Dec 12 20:17:14 2019 +0100 media: imx7-mipi-csis: remove subdev_notifier It was defined a notifier in the csi_state structure that is never allocated. And besides that it's unregister in the remove, even though it is a no-op, just remove both. Fixes: 7807063b862b ("media: staging/imx7: add MIPI CSI-2 receiver subdev for i.MX7") Reported-by: Hans Verkuil Suggested-by: Dan Carpenter Suggested-by: Philipp Zabel Signed-off-by: Rui Miguel Silva Reviewed-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0d962c3ae13ab2f4cb1c009295da4e70abc4e3c2 Author: Wei Yongjun Date: Wed Nov 6 16:32:12 2019 +0100 media: sun8i: Remove redundant dev_err call in deinterlace_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun Acked-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 81735ecb62f882853a37a8c157407ec4aed44fd0 Author: Hirokazu Honda Date: Thu Nov 7 04:30:57 2019 +0100 media: mtk-vcodec: Remove extra area allocation in an input buffer on encoding MediaTek encoder allocates non pixel data area for an input buffer every plane. As the input buffer should be read-only, the driver should not write anything in the buffer. Therefore, the extra data should be unnecessary. Signed-off-by: Hirokazu Honda Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a36807784b74a5218977e829c16e05b2fc98f8ff Author: Niklas Söderlund Date: Fri Nov 8 03:16:08 2019 +0100 media: dt-bindings: rcar-vin: Document compatibility string for R8A77470 When adding the compatibility string for R8A77470 (RZ/G1C) to the rcar-vin driver the string was never documented in the bindings, add it now. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9f9dc4755e5497d491c24c78d34090993d623230 Author: Niklas Söderlund Date: Fri Nov 8 03:16:07 2019 +0100 media: dt-bindings: rcar-vin: Remove paragraph about aliases It might be convenient to have aliases but it's not required, drop the sentence as it's not true and not used in Gen3 DTS files. Signed-off-by: Niklas Söderlund Acked-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ad85a9bb3ec42fc2fe86d19b7c52d2bd598548b5 Author: Eugen Hristev Date: Fri Nov 29 15:10:43 2019 +0100 media: atmel: atmel-isi: initialize the try_crop for the pads in try_fmt When requesting format from sensor, some sensors call the subdev_get_try_crop which for ISI was not properly initialized, and this causes errors in determining proper image resolutions. To accommodate for this, when trying a format (in try_fmt), first attempt to obtain the framesize for this format from sensor. In case this fails, use the maximum ISI width/height as try_crop, otherwise provide the first size height/width from the sensor. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e34eb98e5f70eb7c9a26cf16f0e64c5e1ff7ce30 Author: Eugen Hristev Date: Fri Nov 29 15:10:42 2019 +0100 media: atmel: atmel-isi: properly initialize pad_cfg In try_fmt, properly initialize the pad_cfg variable to zeros. This can be used by various calls from the subdev, so it's better to have it initialized. Signed-off-by: Eugen Hristev [hverkuil-cisco@xs4all.nl: changed {0} to {}] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b567bf86eeba8d227d45a083a6cf139df05b9eb7 Author: Eugen Hristev Date: Fri Nov 29 15:10:38 2019 +0100 media: atmel: atmel-isi: add support for mono sensors, GRAY and Y16 This adds support for GREY and Y16 formats, based on Y10 mbus codes. Y16 needs to go through preview path in the ISI, with 2 pixels per word, and it fits the Y16 format. The ISI data lines need to be MSB aligned with the sensor data lines. GREY format in 8 bits per pixel is done by dropping the 2 LSB bits from the Y10 format, and packed as 4 pixels per word. Suggested-by: Wenyou Yang Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 374d968ac7440d128f93128e7f13f2ab035b0dcc Author: Eugen Hristev Date: Mon Nov 25 09:32:54 2019 +0100 media: atmel: atmel-isc-base: initialize the try_crop for the pads in try_fmt When requesting format from sensor, some sensors call the subdev_get_try_crop which for ISC was not properly initialized, and this causes errors in determining proper image resolutions. To accommodate for this, when trying a format (in try_fmt), first attempt to obtain the framesize for this format from sensor. In case this fails, use the maximum ISC width/height as try_crop, otherwise provide the first size height/width from the sensor. Signed-off-by: Eugen Hristev [hverkuil-cisco@xs4all.nl: changed {0} to {}] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit da3a55b5a948e0226c2811d001df40c8ba6b4ac1 Author: Eugen Hristev Date: Mon Nov 25 09:32:53 2019 +0100 media: atmel: atmel-isc-base: fix enum calls default format With some sensors, the mbus code must match the one that sensor supports. In this case we should initialize the mbus_code of the fse/fie before calling the subdev, and not after. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ed1307e335a4355d653721606de9c0ed206e86a9 Author: Eugen Hristev Date: Mon Nov 25 09:32:51 2019 +0100 media: atmel: atmel-isc-base: properly initialize pad_cfg In try_fmt, properly initialize the pad_cfg variable to zeros. This can be used by various calls from the subdev, so it's better to have it initialized. Signed-off-by: Eugen Hristev [hverkuil-cisco@xs4all.nl: changed {0} to {}] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ab04e7e6436ed10bb075e6d78f7e7bf841a6fbdc Author: Eugen Hristev Date: Mon Nov 25 09:32:49 2019 +0100 media: atmel: atmel-isc-base: add support for Y10 format The ISC can receive input from sensors using Y10 format directly (10 bits greyscale). In this case, the ISC must dump the data directly, either as GREY (8bit) or Y10 (10bit). Y16 is not supported because we cannot align the MSB 10 bits to the MSB inside the 16bit container. For this format, the ISC internal pipeline cannot work (only works with BAYER), so we must dump the data directly as 8bit/10bit. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 62387970a4818168cd8d86dc59624c0fbd7268a8 Author: Eugen Hristev Date: Mon Nov 25 09:32:48 2019 +0100 media: atmel: atmel-isc-base: allow 8 bit direct dump In case the format that the sensor sends is 8 bit only (like GREY for example) we need to be able to bypass ISC pipeline and directly dump 8 bits. That's why the hardcoded value of 16 bpp is not correct in all cases. This change allows the output format to decide what is the correct bpp (bits per pixel) such that the result is in the proper format. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fee586a20f48bf646118dc553993b3b0d98a5f06 Author: Neil Armstrong Date: Thu Nov 21 11:14:28 2019 +0100 media: meson: vdec: add sm1 platform Add support for the Amlogic SM1 platform for the current MPEG1 & MPEG2 support. The SM1 family, very close to the G12A SoCs, has a slighly different power management control, thus needing a separate compatible and family id. Signed-off-by: Neil Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3d8af3b40d2a3b899a07119dc90e8e6821a094b9 Author: Neil Armstrong Date: Thu Nov 21 11:14:27 2019 +0100 media: dt-bindings: media: amlogic,gx-vdec: add bindings for SM1 family Add bindings to support the Amlogic Video Decoder on the Amlogic SM1 family. SM1 has a slightly different power management handling, thus needing a separate compatible. Signed-off-by: Neil Armstrong Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8299c65339797a3b751f7f869842ed22a433fcb1 Author: Maxime Jourdan Date: Thu Dec 5 16:34:07 2019 +0100 media: meson: vdec: add g12a platform Add support for the G12A platform by: - adding the G12A codec support, here MPEG1 & MPEG2 - getting the new hevcf clock for the upcoming HEVC/VP9 decoding support Signed-off-by: Maxime Jourdan Signed-off-by: Neil Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4c002c978b7f2f2306d53de051c054504af920a9 Author: Greg Kroah-Hartman Date: Mon Dec 9 20:33:03 2019 +0100 device.h: move 'struct driver' stuff out to device/driver.h device.h has everything and the kitchen sink when it comes to struct device things, so split out the struct driver things things to a separate .h file to make things easier to maintain and manage over time. Cc: "Rafael J. Wysocki" Cc: Suzuki K Poulose Cc: Saravana Kannan Cc: Heikki Krogerus Link: https://lore.kernel.org/r/20191209193303.1694546-7-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a8ae608529ab1b71a3830895f98a107be90fed48 Author: Greg Kroah-Hartman Date: Mon Dec 9 20:33:02 2019 +0100 device.h: move 'struct class' stuff out to device/class.h device.h has everything and the kitchen sink when it comes to struct device things, so split out the struct class things things to a separate .h file to make things easier to maintain and manage over time. Cc: "Rafael J. Wysocki" Cc: Suzuki K Poulose Cc: Saravana Kannan Cc: Heikki Krogerus Link: https://lore.kernel.org/r/20191209193303.1694546-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 5aee2bf2629d7db2619110f62b15cf742c116e0b Author: Greg Kroah-Hartman Date: Mon Dec 9 20:33:01 2019 +0100 device.h: move 'struct bus' stuff out to device/bus.h device.h has everything and the kitchen sink when it comes to struct device things, so split out the struct bus things things to a separate .h file to make things easier to maintain and manage over time. Cc: "Rafael J. Wysocki" Cc: Suzuki K Poulose Cc: Saravana Kannan Cc: Heikki Krogerus Link: https://lore.kernel.org/r/20191209193303.1694546-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit af628aae8640c268938a0c9344b4ec0d102c0a0a Author: Greg Kroah-Hartman Date: Mon Dec 9 20:33:00 2019 +0100 device.h: move dev_printk()-like functions to dev_printk.h device.h has everything and the kitchen sink when it comes to struct device things, so split out the printk-specific things to a separate .h file to make things easier to maintain and manage over time. Cc: Suzuki K Poulose Cc: "Rafael J. Wysocki" Cc: Saravana Kannan Cc: Heikki Krogerus Link: https://lore.kernel.org/r/20191209193303.1694546-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 70ae805a0bb9b926d5c92321ee8018f99638a9a0 Author: Neil Armstrong Date: Thu Dec 5 16:34:06 2019 +0100 media: dt-bindings: media: amlogic,gx-vdec: add bindings for G12A family Add bindings to support the Amlogic Video Decoder on the Amlogic G12A family. For the G12A family, a supplementary clock is needed to operate the HEVC/VP9 decoder. Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cf901a1c5dd8df18d2308188d094a01e1e7c2143 Author: Greg Kroah-Hartman Date: Mon Dec 9 20:32:59 2019 +0100 device.h: move devtmpfs prototypes out of the file The devtmpfs functions do not need to be in device.h as only the driver core uses them, so move them to the private .h file for the driver core. Cc: "Rafael J. Wysocki" Cc: Suzuki K Poulose Cc: Saravana Kannan Cc: Heikki Krogerus Link: https://lore.kernel.org/r/20191209193303.1694546-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 604bd5ae91d9c6ba849e4e704b759bd29000dcb2 Author: Neil Armstrong Date: Thu Dec 5 16:34:05 2019 +0100 media: dt-bindings: media: amlogic,vdec: convert to yaml Now that we have the DT validation in place, let's convert the device tree bindings for the Amlogic Video Controller over to YAML schemas. This yaml bindings will then be extended to support new SoCs. Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 02d76a471975382ccf7f9d4b0859e00fe723265f Author: Philipp Zabel Date: Thu Dec 12 15:23:27 2019 +0100 media: coda: avoid hardware lockups with more than 13 capture buffers When decoding using the CODA internal rotator (for example NV12 capture), currently the value vb2_buf.index + CODA_MAX_FRAMEBUFFERS (19) is written into the DEC_PIC_ROT_INDEX register. At least with firmware version 3.1.1 this causes CODA hangups as soon as the register value reaches 32. Instead, always write CODA_MAX_FRAMEBUFFERS. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit afddf553ea8929c722921bfa3607e3586629442f Author: Philipp Zabel Date: Thu Dec 12 15:20:25 2019 +0100 media: coda: remove redundant platform_get_irq error message Both platform_get_irq_byname() and platform_get_irq() already print an error. Remove the redundant error message. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 96f6f62c4656d13744f0fc5b958a73396f54d91e Author: Philipp Zabel Date: Thu Dec 12 15:02:55 2019 +0100 media: coda: jpeg: add CODA960 JPEG encoder support This patch adds JPEG encoding support for CODA960, handling the JPEG hardware directly. A separate JPEG encoder video device is created due to the separate hardware unit and different supported pixel formats. While the hardware can not change subsampling on the fly, it can encode 4:2:2 subsampled images into JPEGs of the same subsampling. There are two additional tracepoints added to the coda driver that can be used together with the v4l2:v4l2_qbuf and v4l2:v4l2_dqbuf tracepoints to to follow video frames through the mem2mem device when encoding or decoding with the CODA960 JPEG codec: coda:coda_jpeg_run coda:coda_jpeg_done Signed-off-by: Philipp Zabel Tested-by: Richard Leitner [hverkuil-cisco@xs4all.nl: removed unused k and q_data_dst variables] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3bf6883a88c0e77bc9d0ff6f0c28c599d0e8fa99 Author: Philipp Zabel Date: Thu Dec 12 15:02:54 2019 +0100 media: coda: jpeg: add JPEG register definitions for CODA960 The CODA960 JPEG codec is controlled directly from the host, there is no support in the BIT processor firmware. This patch adds the necessary register definitions. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ec4f021d1cf9650582bb698d31fbedeccbb8f7c5 Author: Philipp Zabel Date: Thu Dec 12 15:02:53 2019 +0100 media: coda: jpeg: merge Huffman table bits and values The Huffman bits tables are always 16 bytes long, and they are always followed directly by the values tables, both in hardware and in JPEG files. Just merge the two tables. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit eed569c425d0ac1b4b3c287a704372721001feb6 Author: Philipp Zabel Date: Thu Dec 12 15:02:52 2019 +0100 media: coda: do not skip finish_run if aborting Always call finish_run when the hardware signals completion. This will allow JPEG contexts to clean up even if job_abort was called during the device_run. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2156873f08c7893811f34177aa923ab1ea486591 Author: Jyri Sarha Date: Mon Dec 9 16:42:14 2019 +0200 drm/tilcdc: Remove obsolete bundled tilcdc tfp410 driver Remove obsolete bundled tfp410 driver with its "ti,tilcdc,tfp410" devicetree binding. No platform has ever used this driver in the mainline kernel and if anybody connects tfp410 to tilcdc he or she should use the generic drm tfp410 bridge driver. Signed-off-by: Jyri Sarha Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/6e2db6c328467cc51e8d633ecb0ffa7c5736f2e8.1575901747.git.jsarha@ti.com commit f4a73f5e26330d1e220f2905d604de1a5a079411 Author: Rajendra Nayak Date: Wed Dec 11 05:24:37 2019 +0000 pinctrl: qcom: sc7180: Add new qup functions on sc7180 we have cases where multiple functions from the same qup instance share the same pin. This is true for qup02/04/11 and qup13. Add new function names to distinguish which qup function to use. The device tree files for this platform haven't landed in mainline yet, so there aren't any users upstream who should break with this change in function names, however, anyone using the devicetree files that were posted on the lists and using these specific function names will need to update their changes. Reported-by: Stephen Boyd Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/0101016ef36a9118-f2919277-effa-4cd5-adf8-bbc8016f31df-000000@us-west-2.amazonses.com Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Linus Walleij commit 22440461b19e773fe75b41fc6e3388d2319ff3be Author: Rajendra Nayak Date: Wed Dec 11 05:24:24 2019 +0000 dt-bindings: pinctrl: qcom: Add new qup functions for sc7180 Add new qup functions for qup02/04/11 and qup13 wherein multiple functions (for i2c and uart) share the same pin. This allows users to identify which specific qup function for the instance one needs to use for the pin. Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/0101016ef36a5c54-2907cf32-2269-4a8c-9447-b086e7c86d98-000000@us-west-2.amazonses.com Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Linus Walleij commit 6ece6d15c0b0bac5b0ff7c107d1d11d3fcb9a0c7 Author: Maulik Shah Date: Wed Oct 30 12:36:17 2019 +0530 pinctrl: qcom: sc7180: 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 Link: https://lore.kernel.org/r/1572419178-5750-2-git-send-email-mkshah@codeaurora.org Reviewed-by: Lina Iyer Acked-by: Bjorn Andersson Signed-off-by: Linus Walleij commit 94e14da890b1b68526b5f87ff1c97f374fd2471e Merge: 5367601b5269 d1eef1c61974 Author: Greg Kroah-Hartman Date: Mon Dec 16 09:08:51 2019 +0100 Merge 5.5-rc2 into driver-core-next We need the driver core fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit b3bb164aa56018ad8476dd2953b654491b7fb468 Merge: f59aba2f7579 d1eef1c61974 Author: Greg Kroah-Hartman Date: Mon Dec 16 09:06:50 2019 +0100 Merge 5.5-rc2 into staging-next We want the staging driver fixes in here, and this resolves merge issues with the isdn code that was pointed out in linux-next Signed-off-by: Greg Kroah-Hartman commit c1ca05c23e98fc616daae62d2ea8ed319a4dad44 Merge: 15711ba6ff19 55d54d1ee84e Author: Linus Walleij Date: Mon Dec 16 09:02:13 2019 +0100 Merge branch 'ib-pinctrl-default-state' into devel commit e880c3744b3189f50808c0825053a10394aff0de Merge: cad0a5c74e7a d1eef1c61974 Author: Greg Kroah-Hartman Date: Mon Dec 16 09:02:03 2019 +0100 Merge 5.5-rc2 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 1a0013c62b33158dcb67a3c11872a03be50711a3 Author: Leonard Crestez Date: Tue Nov 19 00:34:01 2019 +0200 interconnect: Add interconnect_graph file to debugfs The interconnect graphs can be difficult to understand and the current "interconnect_summary" file doesn't even display links in any way. Add a new "interconnect_graph" file to debugfs in the graphviz "dot" format which describes interconnect providers, nodes and links. The file is human-readable and can be visualized by piping through graphviz. Example: ssh $TARGET cat /sys/kernel/debug/interconnect/interconnect_graph \ | dot -Tsvg > interconnect_graph.svg Signed-off-by: Leonard Crestez Reviewed-by: Greg Kroah-Hartman Reviewed-by: Bjorn Andersson Signed-off-by: Georgi Djakov commit b92c35e1b9c9211635df9e8fb060c69311871865 Author: Georgi Djakov Date: Thu Nov 28 15:48:39 2019 +0200 interconnect: qcom: Use the standard aggregate function Now we have a common function for standard aggregation, so let's use it, instead of duplicating the code. Reviewed-by: Brian Masney Reviewed-by: Bjorn Andersson Reviewed-by: Evan Green Signed-off-by: Georgi Djakov commit 3172e4d276315afa82c12b14c8dd0db526c7aff1 Author: Georgi Djakov Date: Thu Nov 28 15:48:38 2019 +0200 interconnect: Add a common standard aggregate function Currently there is one very standard aggregation method that is used by several drivers. Let's add this as a common function, so that drivers could just point to it, instead of copy/pasting code. Suggested-by: Evan Green Reviewed-by: Brian Masney Reviewed-by: Bjorn Andersson Reviewed-by: Evan Green Signed-off-by: Georgi Djakov commit c46ab9db64979b0875fff79e1b00013343ca8286 Author: Georgi Djakov Date: Thu Nov 28 16:18:18 2019 +0200 interconnect: Add basic tracepoints The tracepoints can help with understanding the system behavior of a given interconnect path when the consumer drivers change their bandwidth demands. This might be interesting when we want to monitor the requested interconnect bandwidth for each client driver. The paths may share the same nodes and this will help to understand "who and when is requesting what". All this is useful for subsystem drivers developers and may also provide hints when optimizing the power and performance profile of the system. Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Bjorn Andersson Signed-off-by: Georgi Djakov commit 05309830e1f869f939e283576dd3684313390062 Author: Georgi Djakov Date: Thu Nov 28 16:18:17 2019 +0200 interconnect: Add a name to struct icc_path When debugging interconnect things, it turned out that saving the path name and including it in the traces is quite useful, especially for devices with multiple paths. For the path name we use the one specified in DT, or if we use platform data, the name is based on the source and destination node names. Suggested-by: Bjorn Andersson Reviewed-by: Bjorn Andersson Signed-off-by: Georgi Djakov commit dd018a9cf9108f9c7d924f6fe09aed745e78a67e Author: Georgi Djakov Date: Thu Nov 28 16:18:16 2019 +0200 interconnect: Move internal structs into a separate file Move the interconnect framework internal structs into a separate file, so that it can be included and used by ftrace code. This will allow us to expose some more useful information in the traces. Reviewed-by: Bjorn Andersson Signed-off-by: Georgi Djakov commit ad3703ac24e7d6d2c5ca2ce7abeb1fd0b0afc01e Author: Georgi Djakov Date: Mon Dec 2 18:21:33 2019 +0200 interconnect: qcom: Use the new common helper for node removal There is a new helper function for removing all nodes. Let's use it instead of duplicating the code. Reviewed-by: Bjorn Andersson Signed-off-by: Georgi Djakov commit 3cce2c6fa70c768e516bff011d77db72e2f38a15 Author: Georgi Djakov Date: Mon Dec 2 18:21:32 2019 +0200 interconnect: Add a common helper for removing all nodes The removal of all nodes from a provider seem to be a common functionality for all existing users and it would make sense to factor out this into a a common helper function. Suggested-by: Dmitry Osipenko Reviewed-by: Bjorn Andersson Signed-off-by: Georgi Djakov commit 2ddf50a75dab49eeb534dbdad92972f56a84046d Author: Xu Wang Date: Fri Dec 13 09:48:34 2019 +0000 extcon: sm5502: Remove unneeded semicolon Remove unneeded semicolon reported by coccinelle. Signed-off-by: Xu Wang [cw00.choi: Edit patch title and description] Signed-off-by: Chanwoo Choi commit 0849e1028088fb9e3f1de577106b89a513ba986e Merge: 01c6f7aaacf9 5f2eeceffb92 Author: Alexei Starovoitov Date: Sun Dec 15 16:53:51 2019 -0800 Merge branch 'support-flex-arrays' Andrii Nakryiko says: ==================== Add support for flexible array accesses in a relocatable manner in BPF CO-RE. It's a typical pattern in C, and kernel in particular, to provide a fixed-length struct with zero-sized or dimensionless array at the end. In such cases variable-sized array contents follows immediately after the end of a struct. This patch set adds support for such access pattern by allowing accesses to such arrays. Patch #1 adds libbpf support. Patch #2 adds few test cases for validation. ==================== Signed-off-by: Alexei Starovoitov commit 5f2eeceffb92a0d799b141df7af3d1ac77337dc4 Author: Andrii Nakryiko Date: Sat Dec 14 23:08:44 2019 -0800 selftests/bpf: Add flexible array relocation tests Add few tests validation CO-RE relocation handling of flexible array accesses. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191215070844.1014385-3-andriin@fb.com commit 1b484b301cec404e8a329f05edf848fc0a5875c0 Author: Andrii Nakryiko Date: Sat Dec 14 23:08:43 2019 -0800 libbpf: Support flexible arrays in CO-RE Some data stuctures in kernel are defined with either zero-sized array or flexible (dimensionless) array at the end of a struct. Actual data of such array follows in memory immediately after the end of that struct, forming its variable-sized "body" of elements. Support such access pattern in CO-RE relocation handling. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191215070844.1014385-2-andriin@fb.com commit 01c6f7aaacf982fd80d5e855f0c6187d8155ffed Merge: f7c0bbf27ec6 330a73a7b6ca Author: Alexei Starovoitov Date: Sun Dec 15 16:41:13 2019 -0800 Merge branch 'extern-var-support' Andrii Nakryiko says: ==================== It's often important for BPF program to know kernel version or some specific config values (e.g., CONFIG_HZ to convert jiffies to seconds) and change or adjust program logic based on their values. As of today, any such need has to be resolved by recompiling BPF program for specific kernel and kernel configuration. In practice this is usually achieved by using BCC and its embedded LLVM/Clang. With such set up #ifdef CONFIG_XXX and similar compile-time constructs allow to deal with kernel varieties. With CO-RE (Compile Once – Run Everywhere) approach, this is not an option, unfortunately. All such logic variations have to be done as a normal C language constructs (i.e., if/else, variables, etc), not a preprocessor directives. This patch series add support for such advanced scenarios through C extern variables. These extern variables will be recognized by libbpf and supplied through extra .extern internal map, similarly to global data. This .extern map is read-only, which allows BPF verifier to track its content precisely as constants. That gives an opportunity to have pre-compiled BPF program, which can potentially use BPF functionality (e.g., BPF helpers) or kernel features (types, fields, etc), that are available only on a subset of targeted kernels, while effectively eleminating (through verifier's dead code detection) such unsupported functionality for other kernels (typically, older versions). Patch #3 explicitly tests a scenario of using unsupported BPF helper, to validate the approach. This patch set heavily relies on BTF type information emitted by compiler for each extern variable declaration. Based on specific types, libbpf does strict checks of config data values correctness. See patch #1 for details. Outline of the patch set: - patch #1 does a small clean up of internal map names contants; - patch #2 adds all of the libbpf internal machinery for externs support, including setting up BTF information for .extern data section; - patch #3 adds support for .extern into BPF skeleton; - patch #4 adds externs selftests, as well as enhances test_skeleton.c test to validate mmap()-ed .extern datasection functionality. v3->v4: - clean up copyrights and rebase onto latest skeleton patches (Alexei); v2->v3: - truncate too long strings (Alexei); - clean ups, adding comments (Alexei); v1->v2: - use BTF type information for externs (Alexei); - add strings support; - add BPF skeleton support for .extern. ==================== Signed-off-by: Alexei Starovoitov commit 330a73a7b6ca93a415de1b7da68d7a0698fe4937 Author: Andrii Nakryiko Date: Fri Dec 13 17:47:10 2019 -0800 selftests/bpf: Add tests for libbpf-provided externs Add a set of tests validating libbpf-provided extern variables. One crucial feature that's tested is dead code elimination together with using invalid BPF helper. CONFIG_MISSING is not supposed to exist and should always be specified by libbpf as zero, which allows BPF verifier to correctly do branch pruning and not fail validation, when invalid BPF helper is called from dead if branch. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191214014710.3449601-5-andriin@fb.com commit 2ad97d473db57ab866f0756806bb94515f7f2551 Author: Andrii Nakryiko Date: Fri Dec 13 17:47:09 2019 -0800 bpftool: Generate externs datasec in BPF skeleton Add support for generation of mmap()-ed read-only view of libbpf-provided extern variables. As externs are not supposed to be provided by user code (that's what .data, .bss, and .rodata is for), don't mmap() it initially. Only after skeleton load is performed, map .extern contents as read-only memory. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191214014710.3449601-4-andriin@fb.com commit 166750bc1dd256b2184b22588fb9fe6d3fbb93ae Author: Andrii Nakryiko Date: Fri Dec 13 17:47:08 2019 -0800 libbpf: Support libbpf-provided extern variables Add support for extern variables, provided to BPF program by libbpf. Currently the following extern variables are supported: - LINUX_KERNEL_VERSION; version of a kernel in which BPF program is executing, follows KERNEL_VERSION() macro convention, can be 4- and 8-byte long; - CONFIG_xxx values; a set of values of actual kernel config. Tristate, boolean, strings, and integer values are supported. Set of possible values is determined by declared type of extern variable. Supported types of variables are: - Tristate values. Are represented as `enum libbpf_tristate`. Accepted values are **strictly** 'y', 'n', or 'm', which are represented as TRI_YES, TRI_NO, or TRI_MODULE, respectively. - Boolean values. Are represented as bool (_Bool) types. Accepted values are 'y' and 'n' only, turning into true/false values, respectively. - Single-character values. Can be used both as a substritute for bool/tristate, or as a small-range integer: - 'y'/'n'/'m' are represented as is, as characters 'y', 'n', or 'm'; - integers in a range [-128, 127] or [0, 255] (depending on signedness of char in target architecture) are recognized and represented with respective values of char type. - Strings. String values are declared as fixed-length char arrays. String of up to that length will be accepted and put in first N bytes of char array, with the rest of bytes zeroed out. If config string value is longer than space alloted, it will be truncated and warning message emitted. Char array is always zero terminated. String literals in config have to be enclosed in double quotes, just like C-style string literals. - Integers. 8-, 16-, 32-, and 64-bit integers are supported, both signed and unsigned variants. Libbpf enforces parsed config value to be in the supported range of corresponding integer type. Integers values in config can be: - decimal integers, with optional + and - signs; - hexadecimal integers, prefixed with 0x or 0X; - octal integers, starting with 0. Config file itself is searched in /boot/config-$(uname -r) location with fallback to /proc/config.gz, unless config path is specified explicitly through bpf_object_open_opts' kernel_config_path option. Both gzipped and plain text formats are supported. Libbpf adds explicit dependency on zlib because of this, but this shouldn't be a problem, given libelf already depends on zlib. All detected extern variables, are put into a separate .extern internal map. It, similarly to .rodata map, is marked as read-only from BPF program side, as well as is frozen on load. This allows BPF verifier to track extern values as constants and perform enhanced branch prediction and dead code elimination. This can be relied upon for doing kernel version/feature detection and using potentially unsupported field relocations or BPF helpers in a CO-RE-based BPF program, while still having a single version of BPF program running on old and new kernels. Selftests are validating this explicitly for unexisting BPF helper. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191214014710.3449601-3-andriin@fb.com commit ac9d1389631a4bee0df47e50d6bee8b94230759d Author: Andrii Nakryiko Date: Fri Dec 13 17:47:07 2019 -0800 libbpf: Extract internal map names into constants Instead of duplicating string literals, keep them in one place and consistent. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191214014710.3449601-2-andriin@fb.com commit f7c0bbf27ec699ec6462751f5e5450c38be4c980 Merge: aa915931ac3e d9c00c3b1639 Author: Alexei Starovoitov Date: Sun Dec 15 15:58:06 2019 -0800 Merge branch 'bpf-obj-skel' Andrii Nakryiko says: ==================== This patch set introduces an alternative and complimentary to existing libbpf API interface for working with BPF objects, maps, programs, and global data from userspace side. This approach is relying on code generation. bpftool produces a struct (a.k.a. skeleton) tailored and specific to provided BPF object file. It includes hard-coded fields and data structures for every map, program, link, and global data present. Altogether this approach significantly reduces amount of userspace boilerplate code required to open, load, attach, and work with BPF objects. It improves attach/detach story, by providing pre-allocated space for bpf_links, and ensuring they are properly detached on shutdown. It allows to do away with by name/title lookups of maps and programs, because libbpf's skeleton API, in conjunction with generated code from bpftool, is filling in hard-coded fields with actual pointers to corresponding struct bpf_map/bpf_program/bpf_link. Also, thanks to BPF array mmap() support, working with global data (variables) from userspace is now as natural as it is from BPF side: each variable is just a struct field inside skeleton struct. Furthermore, this allows to have a natural way for userspace to pre-initialize global data (including previously impossible to initialize .rodata) by just assigning values to the same per-variable fields. Libbpf will carefully take into account this initialization image, will use it to pre-populate BPF maps at creation time, and will re-mmap() BPF map's contents at exactly the same userspace memory address such that it can continue working with all the same pointers without any interruptions. If kernel doesn't support mmap(), global data will still be successfully initialized, but after map creation global data structures inside skeleton will be NULL-ed out. This allows userspace application to gracefully handle lack of mmap() support, if necessary. A bunch of selftests are also converted to using skeletons, demonstrating significant simplification of userspace part of test and reduction in amount of code necessary. v3->v4: - add OPTS_VALID check to btf_dump__emit_type_decl (Alexei); - expose skeleton as LIBBPF_API functions (Alexei); - copyright clean up, update internal map init refactor (Alexei); v2->v3: - make skeleton part of public API; - expose btf_dump__emit_type_decl and btf__align_of APIs; - move LIBBPF_API and DECLARE_LIBBPF_OPTS into libbpf_common.h for reuse; v1->v2: - checkpatch.pl and reverse Christmas tree styling (Jakub); - sanitize variable names to accomodate in-function static vars; rfc->v1: - runqslower moved out into separate patch set waiting for vmlinux.h improvements; - skeleton generation code deals with unknown internal maps more gracefully. ==================== Signed-off-by: Alexei Starovoitov commit d9c00c3b1639a3c8f46663cc042a3768d222021f Author: Andrii Nakryiko Date: Fri Dec 13 17:43:41 2019 -0800 bpftool: Add `gen skeleton` BASH completions Add BASH completions for gen sub-command. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Cc: Quentin Monnet Link: https://lore.kernel.org/bpf/20191214014341.3442258-18-andriin@fb.com commit 197448eaac1ab330fb485769bccb62346ba1f458 Author: Andrii Nakryiko Date: Fri Dec 13 17:43:40 2019 -0800 selftests/bpf: Add test validating data section to struct convertion layout Add a simple selftests validating datasection-to-struct layour dumping. Global variables are constructed in such a way as to cause both natural and artificial padding (through custom alignment requirement). Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191214014341.3442258-17-andriin@fb.com commit dde53c1b763b5038545efa5d812758ce589654e1 Author: Andrii Nakryiko Date: Fri Dec 13 17:43:39 2019 -0800 selftests/bpf: Convert few more selftest to skeletons Convert few more selftests to use generated BPF skeletons as a demonstration on how to use it. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191214014341.3442258-16-andriin@fb.com commit f3c926a4df2cddf6230c3f56b1f43e439552cdad Author: Andrii Nakryiko Date: Fri Dec 13 17:43:38 2019 -0800 selftests/bpf: Add BPF skeletons selftests and convert attach_probe.c Add BPF skeleton generation to selftest/bpf's Makefile. Convert attach_probe.c to use skeleton. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191214014341.3442258-15-andriin@fb.com commit 985ead416df39d6fe8e89580cc1db6aa273e0175 Author: Andrii Nakryiko Date: Fri Dec 13 17:43:37 2019 -0800 bpftool: Add skeleton codegen command Add `bpftool gen skeleton` command, which takes in compiled BPF .o object file and dumps a BPF skeleton struct and related code to work with that skeleton. Skeleton itself is tailored to a specific structure of provided BPF object file, containing accessors (just plain struct fields) for every map and program, as well as dedicated space for bpf_links. If BPF program is using global variables, corresponding structure definitions of compatible memory layout are emitted as well, making it possible to initialize and subsequently read/update global variables values using simple and clear C syntax for accessing fields. This skeleton majorly improves usability of opening/loading/attaching of BPF object, as well as interacting with it throughout the lifetime of loaded BPF object. Generated skeleton struct has the following structure: struct { /* used by libbpf's skeleton API */ struct bpf_object_skeleton *skeleton; /* bpf_object for libbpf APIs */ struct bpf_object *obj; struct { /* for every defined map in BPF object: */ struct bpf_map *; } maps; struct { /* for every program in BPF object: */ struct bpf_program *; } progs; struct { /* for every program in BPF object: */ struct bpf_link *; } links; /* for every present global data section: */ struct __ { /* memory layout of corresponding data section, * with every defined variable represented as a struct field * with exactly the same type, but without const/volatile * modifiers, e.g.: */ int *my_var_1; ... } *; }; This provides great usability improvements: - no need to look up maps and programs by name, instead just my_obj->maps.my_map or my_obj->progs.my_prog would give necessary bpf_map/bpf_program pointers, which user can pass to existing libbpf APIs; - pre-defined places for bpf_links, which will be automatically populated for program types that libbpf knows how to attach automatically (currently tracepoints, kprobe/kretprobe, raw tracepoint and tracing programs). On tearing down skeleton, all active bpf_links will be destroyed (meaning BPF programs will be detached, if they are attached). For cases in which libbpf doesn't know how to auto-attach BPF program, user can manually create link after loading skeleton and they will be auto-detached on skeleton destruction: my_obj->links.my_fancy_prog = bpf_program__attach_cgroup_whatever( my_obj->progs.my_fancy_prog, rodata->my_var = 123; my_obj__load(skel); /* 123 will be initialization value for my_var */ After load, if kernel supports mmap() for BPF arrays, user can still read (and write for .bss and .data) variables values, but at that point it will be directly mmap()-ed to BPF array, backing global variables. This allows to seamlessly exchange data with BPF side. From userspace program's POV, all the pointers and memory contents stay the same, but mapped kernel memory changes to point to created map. If kernel doesn't yet support mmap() for BPF arrays, it's still possible to use those data section structs to pre-initialize .bss, .data, and .rodata, but after load their pointers will be reset to NULL, allowing user code to gracefully handle this condition, if necessary. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191214014341.3442258-14-andriin@fb.com commit d66562fba1ce66975bd61b0786fb8b1810f33caa Author: Andrii Nakryiko Date: Fri Dec 13 17:43:36 2019 -0800 libbpf: Add BPF object skeleton support Add new set of APIs, allowing to open/load/attach BPF object through BPF object skeleton, generated by bpftool for a specific BPF object file. All the xxx_skeleton() APIs wrap up corresponding bpf_object_xxx() APIs, but additionally also automate map/program lookups by name, global data initialization and mmap()-ing, etc. All this greatly improves and simplifies userspace usability of working with BPF programs. See follow up patches for examples. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191214014341.3442258-13-andriin@fb.com commit 3f51935314b8c0e0f45f28bed2e7a023b2c7627c Author: Andrii Nakryiko Date: Fri Dec 13 17:43:35 2019 -0800 libbpf: Reduce log level of supported section names dump It's quite spammy. And now that bpf_object__open() is trying to determine program type from its section name, we are getting these verbose messages all the time. Reduce their log level to DEBUG. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191214014341.3442258-12-andriin@fb.com commit 13acb508ae203075134327551a6705e6e8f23d48 Author: Andrii Nakryiko Date: Fri Dec 13 17:43:34 2019 -0800 libbpf: Postpone BTF ID finding for TRACING programs to load phase Move BTF ID determination for BPF_PROG_TYPE_TRACING programs to a load phase. Performing it at open step is inconvenient, because it prevents BPF skeleton generation on older host kernel, which doesn't contain BTF_KIND_FUNCs information in vmlinux BTF. This is a common set up, though, when, e.g., selftests are compiled on older host kernel, but the test program itself is executed in qemu VM with bleeding edge kernel. Having this BTF searching performed at load time allows to successfully use bpf_object__open() for codegen and inspection of BPF object file. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191214014341.3442258-11-andriin@fb.com commit eba9c5f498a11a8558e099d14692c24f2fea27e3 Author: Andrii Nakryiko Date: Fri Dec 13 17:43:33 2019 -0800 libbpf: Refactor global data map initialization Refactor global data map initialization to use anonymous mmap()-ed memory instead of malloc()-ed one. This allows to do a transparent re-mmap()-ing of already existing memory address to point to BPF map's memory after bpf_object__load() step (done in follow up patch). This choreographed setup allows to have a nice and unsurprising way to pre-initialize read-only (and r/w as well) maps by user and after BPF map creation keep working with mmap()-ed contents of this map. All in a way that doesn't require user code to update any pointers: the illusion of working with memory contents is preserved before and after actual BPF map instantiation. Selftests and runqslower example demonstrate this feature in follow up patches. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191214014341.3442258-10-andriin@fb.com commit 01af3bf06755dc5cda7050fe5d898998e5775e63 Author: Andrii Nakryiko Date: Fri Dec 13 17:43:32 2019 -0800 libbpf: Expose BPF program's function name Add APIs to get BPF program function name, as opposed to bpf_program__title(), which returns BPF program function's section name. Function name has a benefit of being a valid C identifier and uniquely identifies a specific BPF program, while section name can be duplicated across multiple independent BPF programs. Add also bpf_object__find_program_by_name(), similar to bpf_object__find_program_by_title(), to facilitate looking up BPF programs by their C function names. Convert one of selftests to new API for look up. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191214014341.3442258-9-andriin@fb.com commit 9f81654eebe8de7e0db15534816d8f6c84b2e1e5 Author: Andrii Nakryiko Date: Fri Dec 13 17:43:31 2019 -0800 libbpf: Expose BTF-to-C type declaration emitting API Expose API that allows to emit type declaration and field/variable definition (if optional field name is specified) in valid C syntax for any provided BTF type. This is going to be used by bpftool when emitting data section layout as a struct. As part of making this API useful in a stand-alone fashion, move initialization of some of the internal btf_dump state to earlier phase. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191214014341.3442258-8-andriin@fb.com commit 3d208f4ca111a614903f49d5a77b93ddc6de294e Author: Andrii Nakryiko Date: Fri Dec 13 17:43:30 2019 -0800 libbpf: Expose btf__align_of() API Expose BTF API that calculates type alignment requirements. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191214014341.3442258-7-andriin@fb.com commit 544402d4b49332a4a9b2b8fff20f9d9f5ef86559 Author: Andrii Nakryiko Date: Fri Dec 13 17:43:29 2019 -0800 libbpf: Extract common user-facing helpers LIBBPF_API and DECLARE_LIBBPF_OPTS are needed in many public libbpf API headers. Extract them into libbpf_common.h to avoid unnecessary interdependency between btf.h, libbpf.h, and bpf.h or code duplication. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191214014341.3442258-6-andriin@fb.com commit 917f6b7b07a46e53fa73e112d23c97d1b201a877 Author: Andrii Nakryiko Date: Fri Dec 13 17:43:28 2019 -0800 libbpf: Add BPF_EMBED_OBJ macro for embedding BPF .o files Add a convenience macro BPF_EMBED_OBJ, which allows to embed other files (typically used to embed BPF .o files) into a hosting userspace programs. To C program it is exposed as struct bpf_embed_data, containing a pointer to raw data and its size in bytes. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191214014341.3442258-5-andriin@fb.com commit 612d05be250aa8804d3baba7a12445a267a580d3 Author: Andrii Nakryiko Date: Fri Dec 13 17:43:27 2019 -0800 libbpf: Move non-public APIs from libbpf.h to libbpf_internal.h Few libbpf APIs are not public but currently exposed through libbpf.h to be used by bpftool. Move them to libbpf_internal.h, where intent of being non-stable and non-public is much more obvious. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191214014341.3442258-4-andriin@fb.com commit d7a18ea7e8b612669acd0131fd075e5c735c1ce5 Author: Andrii Nakryiko Date: Fri Dec 13 17:43:26 2019 -0800 libbpf: Add generic bpf_program__attach() Generalize BPF program attaching and allow libbpf to auto-detect type (and extra parameters, where applicable) and attach supported BPF program types based on program sections. Currently this is supported for: - kprobe/kretprobe; - tracepoint; - raw tracepoint; - tracing programs (typed raw TP/fentry/fexit). More types support can be trivially added within this framework. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191214014341.3442258-3-andriin@fb.com commit 0d13bfce023ac7cef4d0a50b83750254ce31c479 Author: Andrii Nakryiko Date: Fri Dec 13 17:43:25 2019 -0800 libbpf: Don't require root for bpf_object__open() Reorganize bpf_object__open and bpf_object__load steps such that bpf_object__open doesn't need root access. This was previously done for feature probing and BTF sanitization. This doesn't have to happen on open, though, so move all those steps into the load phase. This is important, because it makes it possible for tools like bpftool, to just open BPF object file and inspect their contents: programs, maps, BTF, etc. For such operations it is prohibitive to require root access. On the other hand, there is a lot of custom libbpf logic in those steps, so its best avoided for tools to reimplement all that on their own. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191214014341.3442258-2-andriin@fb.com commit 38dbf2de46acb4e0965ba7719d2a8ee1bc80181f Author: Masahiro Yamada Date: Wed Dec 11 14:06:26 2019 +0900 ARM: dts: uniphier: add pinmux nodes for I2C ch5, ch6 The next generation SoC can connect on-board slave devices via I2C ch5 and ch6. Signed-off-by: Masahiro Yamada commit 0e627190563e8be6fc9c2cc2a8a3c14bd961754c Author: Arjun Roy Date: Sun Dec 15 11:54:51 2019 -0800 tcp: Set rcv zerocopy hint correctly if skb last frag is < PAGE_SIZE At present, if the last frag of paged data in a skb has < PAGE_SIZE data, we compute the recv_skip_hint as being equal to the size of that frag and the entire next skb. Instead, just return the runt frag size as the hint. recv_skip_hint is used by the application to skip over bytes that can not be mmaped, so returning a too big chunk is pessimistic and forces more bytes to be copied. Signed-off-by: Arjun Roy Acked-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski commit 29115cef85781057e78f0c967979edd40b16c209 Author: Ursula Braun Date: Thu Dec 12 22:35:41 2019 +0100 net/smc: shorten lgr_cnt initialization Save a line of code by making use of ATOMIC_INIT() for lgr_cnt. Suggested-by: David S. Miller Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: Jakub Kicinski commit aa915931ac3e53ccf371308e6750da510e3591dd Author: Thadeu Lima de Souza Cascardo Date: Fri Dec 13 07:11:14 2019 -0300 libbpf: Fix readelf output parsing for Fedora Fedora binutils has been patched to show "other info" for a symbol at the end of the line. This was done in order to support unmaintained scripts that would break with the extra info. [1] [1] https://src.fedoraproject.org/rpms/binutils/c/b8265c46f7ddae23a792ee8306fbaaeacba83bf8 This in turn has been done to fix the build of ruby, because of checksec. [2] Thanks Michael Ellerman for the pointer. [2] https://bugzilla.redhat.com/show_bug.cgi?id=1479302 As libbpf Makefile is not unmaintained, we can simply deal with either output format, by just removing the "other info" field, as it always comes inside brackets. Fixes: 3464afdf11f9 (libbpf: Fix readelf output parsing on powerpc with recent binutils) Reported-by: Justin Forbes Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Cc: Aurelien Jarno Link: https://lore.kernel.org/bpf/20191213101114.GA3986@calabresa commit a06ae6acc14b7f8c07ce9d9685e7b90fcba5b52f Merge: a06bf42f5a95 99f9863a0c45 Author: Alexei Starovoitov Date: Sun Dec 15 09:03:19 2019 -0800 Merge branch 'bpftool-match-by-name' Paul Chaignon says: ==================== When working with frequently modified BPF programs, both the ID and the tag may change. bpftool currently doesn't provide a "stable" way to match such programs. This patchset allows bpftool to match programs and maps by name. When given a tag that matches several programs, bpftool currently only considers the first match. The first patch changes that behavior to either process all matching programs (for the show and dump commands) or error out. The second patch implements program lookup by name, with the same behavior as for tags in case of ambiguity. The last patch implements map lookup by name. Changelogs: Changes in v2: - Fix buffer overflow after realloc. - Add example output to commit message. - Properly close JSON arrays on errors. - Fix style errors (line breaks, for loops, exit labels, type for tagname). - Move do_show code for argc == 2 to do_show_subset functions. - Rebase. ==================== Signed-off-by: Alexei Starovoitov commit 99f9863a0c45f4e87cb99593015090fdc9f44398 Author: Paul Chaignon Date: Fri Dec 13 20:10:37 2019 +0100 bpftool: Match maps by name This patch implements lookup by name for maps and changes the behavior of lookups by tag to be consistent with prog subcommands. Similarly to program subcommands, the show and dump commands will return all maps with the given name (or tag), whereas other commands will error out if several maps have the same name (resp. tag). When a map has BTF info, it is dumped in JSON with available BTF info. This patch requires that all matched maps have BTF info before switching the output format to JSON. Signed-off-by: Paul Chaignon Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/8de1c9f273860b3ea1680502928f4da2336b853e.1576263640.git.paul.chaignon@gmail.com commit a7d22ca2a483d6c69c0791954447464297315ffa Author: Paul Chaignon Date: Fri Dec 13 20:10:17 2019 +0100 bpftool: Match programs by name When working with frequently modified BPF programs, both the ID and the tag may change. bpftool currently doesn't provide a "stable" way to match such programs. This patch implements lookup by name for programs. The show and dump commands will return all programs with the given name, whereas other commands will error out if several programs have the same name. Signed-off-by: Paul Chaignon Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/b5fc1a5dcfaeb5f16fc80295cdaa606dd2d91534.1576263640.git.paul.chaignon@gmail.com commit ec2025095cf6acda3233a4301809596938b47da5 Author: Paul Chaignon Date: Fri Dec 13 20:10:04 2019 +0100 bpftool: Match several programs with same tag When several BPF programs have the same tag, bpftool matches only the first (in ID order). This patch changes that behavior such that dump and show commands return all matched programs. Commands that require a single program (e.g., pin and attach) will error out if given a tag that matches several. bpftool prog dump will also error out if file or visual are given and several programs have the given tag. In the case of the dump command, a program header is added before each dump only if the tag matches several programs; this patch doesn't change the output if a single program matches. The output when several programs match thus looks as follows. $ ./bpftool prog dump xlated tag 6deef7357e7b4530 3: cgroup_skb tag 6deef7357e7b4530 gpl 0: (bf) r6 = r1 [...] 7: (95) exit 4: cgroup_skb tag 6deef7357e7b4530 gpl 0: (bf) r6 = r1 [...] 7: (95) exit Signed-off-by: Paul Chaignon Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/fb1fe943202659a69cd21dd5b907c205af1e1e22.1576263640.git.paul.chaignon@gmail.com commit 5b883564fcdee1aa5ded4354046f03a848aa2370 Author: Rodrigo Carvalho Date: Sat Dec 7 01:53:39 2019 -0300 dt-bindings: iio: accel: add binding documentation for ADIS16240 This patch add device tree binding documentation for ADIS16240. Signed-off-by: Rodrigo Carvalho Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 969fdd86caa5be3e57d9e4b6ba4541ec5a54eae8 Author: Rodrigo Carvalho Date: Sat Dec 7 01:53:38 2019 -0300 staging: iio: accel: adis16240: enforce SPI mode on probe function According to the datasheet, this driver supports only SPI mode 3, so we should enforce it on probe function. Signed-off-by: Rodrigo Carvalho Signed-off-by: Jonathan Cameron commit e4c5c4dfaa88e49f33e8c11b52c65c630c0b12a7 Author: Uwe Kleine-König Date: Mon Dec 9 21:32:48 2019 +0100 iio: adc: new driver to support Linear technology's ltc2496 This chip is similar to the LTC2497 ADC, it just uses SPI instead of I2C and so has a slightly different protocol. Only the actual hardware access is different. The spi protocol is different enough to not be able to map the differences via a regmap. Also generalize the entry in MAINTAINER to cover the newly introduced file. Signed-off-by: Uwe Kleine-König Signed-off-by: Jonathan Cameron commit 69548b7c2c4f1ab9a135f2050d9683c7691ef701 Author: Uwe Kleine-König Date: Mon Dec 9 21:32:47 2019 +0100 iio: adc: ltc2497: split protocol independent part in a separate module This allows to share most of this driver for the ltc2496 driver added in the next commit that is an SPI variant of the ltc2497. Initially I named the generic part ltc249x, but wild card names are frowned upon, so the generic part is called ltc2497-core even though it's not obvious that this is then to be reused for the ltc2496 driver. Signed-off-by: Uwe Kleine-König Signed-off-by: Jonathan Cameron commit 59c3662b8f081832abaadfbc8a4bfb63c526aea8 Author: Uwe Kleine-König Date: Mon Dec 9 21:32:46 2019 +0100 iio: adc: ltc2496: provide device tree binding document The ADC only requires the standard stuff for spi devices and a reference voltage. Signed-off-by: Uwe Kleine-König Signed-off-by: Jonathan Cameron commit 81a0efb7af7a586b2f0dd73ac1913b1691cdff12 Author: Yangtao Li Date: Sat Dec 14 17:54:39 2019 +0000 soc: samsung: exynos-pmu: Convert to devm_platform_ioremap_resource Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Krzysztof Kozlowski commit 225a2ec19aac426ef29f0e4accfc890c87d38bdc Author: Krzysztof Kozlowski Date: Fri Dec 13 08:24:33 2019 +0100 pinctrl: samsung: Fix missing OF and GPIOLIB dependency on S3C24xx and S3C64xx All Samsung pinctrl drivers select common part - PINCTRL_SAMSUNG which uses both OF and GPIOLIB inside. However only Exynos drivers depend on these, therefore after enabling COMPILE_TEST, on x86_64 build of S3C64xx driver failed: drivers/pinctrl/samsung/pinctrl-samsung.c: In function ‘samsung_gpiolib_register’: drivers/pinctrl/samsung/pinctrl-samsung.c:969:5: error: ‘struct gpio_chip’ has no member named ‘of_node’ gc->of_node = bank->of_node; ^ Rework the dependencies so all Samsung drivers and common PINCTRL_SAMSUNG part depend on OF_GPIO (which is default yes if GPIOLIB and OF are enabled). Reported-by: Chen Zhou Signed-off-by: Krzysztof Kozlowski commit 64335c4a6720017c45e0c07313a7a819e55a084a Author: Andy Shevchenko Date: Thu Dec 5 19:46:37 2019 +0200 iio: adc: ti-ads1015: Make use of device property API Make use of device property API in this driver so that both OF based system and ACPI based system can use this driver. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 0cd9ff1535f4339710dfd577a7d91b96fd4b423b Author: Andy Shevchenko Date: Thu Dec 5 19:46:36 2019 +0200 iio: adc: ti-ads1015: 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. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 32bd4324601dc15a205f2b734e67ee5fd740ee66 Author: Christophe JAILLET Date: Wed Dec 4 07:45:35 2019 +0100 iio: adc: ti-ads7950: Fix a typo in an error message Fix a typo: s/get get/to get/ Signed-off-by: Christophe JAILLET Signed-off-by: Jonathan Cameron commit 09a78f7dfac7b3a333fecd0839403f844b1a308e Author: Lorenzo Bianconi Date: Mon Dec 2 12:23:28 2019 +0200 iio: humidity: hts221: move register definitions to sensor structs Move some register definitions to hts221_avg_list, hts221_avg_list and hts221_channels since they are used only there and simplify driver code Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit cc06e67d8fa55d000caeb4613e8873aed2c171ff Author: Fabrice Gasnier Date: Mon Dec 2 10:02:19 2019 +0100 iio: adc: stm32-adc: Add check on overrun interrupt Enable overrun interrupt on STM32 ADC. In case data register hasn't been read (by CPU or DMA), overrun condition is detected when there's new conversion data available. Stop grabbing data and log an error message. Use a threaded irq to avoid printing the error message from hard irq context. Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron commit 4cf01d6d4eea2e3841aeaa4cb977e73ab5efab10 Author: Linus Walleij Date: Mon Dec 2 09:53:50 2019 +0100 iio: ssp_sensors: Convert to use GPIO descriptors These three GPIO lines used by the Samsung sensor hub is pretty straight-forward to convert to use GPIO descriptors. Cc: Karol Wrona Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit 7c93f54e5bfb04ae90e330f8276c9311b03b1086 Author: Beniamin Bia Date: Tue Dec 3 12:17:13 2019 +0200 iio: adc: Move AD7091R5 entry in a alphabetical order in Makefile Ad7091R5 was added in a non alphabetical order after AD7124 in Makefile and KConfig. This patch fixes that and place Ad7091R5 before AD7124. Signed-off-by: Beniamin Bia Signed-off-by: Jonathan Cameron commit 9eda18273754ca9bb7204786866666137c8e7d55 Author: Linus Walleij Date: Mon Dec 2 10:18:37 2019 +0100 iio: atlas-ph-sensor: Drop GPIO include The driver includes yet fails to use symbols from any the header so drop the include. Signed-off-by: Linus Walleij Reviewed-by: Matt Ranostay Signed-off-by: Jonathan Cameron commit 5750ebab14907f05aa9904ef2f3c1bb8dcb1fd2b Author: Linus Walleij Date: Mon Dec 2 10:38:06 2019 +0100 iio: ad7266: Convert to use GPIO descriptors The AD7266 have no in-tree users making use of the platform data mechanism to pass address GPIO lines when not using a fixed address, so we can easily convert this to use GPIO descriptors instead of the platform data integers currently passed. Lowercase the labels "ad0".."ad2" as this will make a better fit for platform descriptions like device tree that prefer lowercase names such as "ad0-gpios" rather than "AD0-gpios". Board files and other static users of this device can pass the same GPIO descriptors using machine descriptor tables if need be. Cc: Alison Schofield Cc: Lars-Peter Clausen Signed-off-by: Linus Walleij Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit b747e352499e4fca6e2e824852f5d91f4e29bf0e Author: Linus Walleij Date: Mon Dec 2 09:58:48 2019 +0100 iio: ad5592r: Drop surplus GPIO header This driver uses all the modern GPIO APIs from and so just drop the unused legacy header . Signed-off-by: Linus Walleij Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 4a89d2f47ccdce69597ba2f92e0b55c9a1f1d1ea Author: Linus Walleij Date: Mon Dec 2 09:38:30 2019 +0100 iio: adf4350: Convert to use GPIO descriptor The lock detect GPIO line is better to grab using a GPIO descriptor. We drop the pdata for this: clients using board files can use machine descriptor tables to pass this GPIO from static data. Cc: Michael Hennerich Signed-off-by: Linus Walleij Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit dcfb6dbdfbe0ee209ec5e7b79ac45adce3a31e3a Author: Linus Walleij Date: Mon Dec 2 09:26:03 2019 +0100 iio: itg3200: Drop GPIO include The driver include yet does not use any of the symbols from the header, so drop the include. Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit 7544cd4c8ab72f9a18d3828a10524ce9740858a1 Author: Linus Walleij Date: Mon Dec 2 09:24:52 2019 +0100 iio: apds9960: Drop GPIO includes The driver includes and yet fails to use symbols from any of the include files, so drop these includes. Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit 340db461f9acbd3621aad8f1ffca811847aa0165 Author: Linus Walleij Date: Mon Dec 2 09:23:01 2019 +0100 iio: ad2s1200: Drop legacy include This driver is using the GPIO descriptor API but yet includes the legacy header for no reason. Drop the surplus include. Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit cbe5997907235f71e6b0ab281b40e0cd151222d4 Author: Linus Walleij Date: Mon Dec 2 09:21:23 2019 +0100 iio: si1145: Drop GPIO include The driver include yet does not use any of the symbols from the header, so drop the include. Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit b4cc7e83dff352cb7ecdf561500d815bce0e3f5b Author: Linus Walleij Date: Mon Dec 2 09:19:43 2019 +0100 iio: as3935: Drop GPIO includes The driver includes and yet fails to use symbols from any of the include files, so drop these includes. Signed-off-by: Linus Walleij Signed-off-by: Jonathan Cameron commit 757b4bcaa0d8fa74500b14b1655f6638ceafd056 Author: Lorenzo Bianconi Date: Sun Dec 1 23:38:18 2019 +0200 iio: imu: st_lsm6dsx: fix checkpatch warning Fix following checkpatch warning: CHECK: Alignment should match open parenthesis +static int st_lsm6dsx_read_event(struct iio_dev *iio_dev, + const struct iio_chan_spec *chan, Signed-off-by: Lorenzo Bianconi Signed-off-by: Jonathan Cameron commit 2c289e63944467a41c6703f46bcf2f3340713510 Author: Linus Walleij Date: Mon Dec 2 09:17:30 2019 +0100 iio: ak8975: Convert to use GPIO descriptor The end-of-conversion (EOC) GPIO line is better to grab using a GPIO descriptor. We drop the pdata for this: clients using board files can use machine descriptor tables to pass this GPIO from static data. Cc: Stephan Gerhold Signed-off-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit d93813520df0ff6e0aec7c8859c56a659417f9b7 Author: Marco Felsch Date: Fri Nov 29 17:53:14 2019 +0100 iio: adc: ad799x: add pm_ops to disable the device completely The device is always in a low-power state due to the hardware design. It wakes up upon a conversion request and goes back into the low-power state. The pm ops are added to disable the device completely and to free the regulator. Disbaling the device completely should be not that notable but freeing the regulator is important. Because if it is a shared power-rail the regulator won't be disabled during suspend-to-ram/disk and so all devices connected to that rail keeps on. Signed-off-by: Marco Felsch Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 52241a082d6c08f4993180752ed5a12b39712f03 Author: Linus Walleij Date: Wed Nov 27 21:17:38 2019 +0100 iio: imu: inv_mpu6050: Select I2C_MUX again commit f7072198f217 ("iio: imu: Fix inv_mpu6050 dependencies") undid the explicit selection of I2C_MUX previously done by the driver, because I2C_MUX implicitly depended on HAS_IOMEM. However commit 93d710a65ef0 ("i2c: mux: fix up dependencies") cleared up the situation properly and drivers that need to select I2C_MUX can now do so again. It makes a lot of sense for a driver to select the driver infrastructure it needs so restore the natural order of things. Cc: Richard Weinberger Cc: Stephan Gerhold Signed-off-by: Linus Walleij Acked-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit b0ec7a44393e0d7a60878e2f56412072dd992724 Author: Beniamin Bia Date: Mon Nov 25 15:21:37 2019 +0200 iio: adc: ad7887: Cleanup channel assignment The channels specification assignment in chip info was simplified. This patch makes supporting other devices by this driver easier. Signed-off-by: Beniamin Bia Signed-off-by: Jonathan Cameron commit d157aa0fb241646e8818f699653ed983e6581b11 Author: Borislav Petkov Date: Tue Nov 12 22:06:03 2019 +0100 x86/cpu/tsx: Define pr_fmt() ... so that all current and future pr_* statements in this file have the proper prefix. No functional changes. Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20191112221823.19677-2-bp@alien8.de commit f5058a27dac700952d5551bd7c5546f52b0468e4 Author: Russell King Date: Thu Dec 12 17:16:12 2019 +0000 net: phylink: propagate phy_attach_direct() return code of_phy_attach() hides the return value of phy_attach_direct(), forcing us to return a "generic" ENODEV error code that is indistinguishable from the lack-of-phy-property case. Switch to using of_phy_find_device() to find the PHY device, and then propagating any phy_attach_direct() error back to the caller. Link: https://lore.kernel.org/lkml/20191210113829.GT25745@shell.armlinux.org.uk Signed-off-by: Russell King Signed-off-by: Jakub Kicinski commit de1799667b002331609e8ee6b924ccfd51968d99 Author: Vivien Didelot Date: Wed Dec 11 20:07:10 2019 -0500 net: bridge: add STP xstats This adds rx_bpdu, tx_bpdu, rx_tcn, tx_tcn, transition_blk, transition_fwd xstats counters to the bridge ports copied over via netlink, providing useful information for STP. Signed-off-by: Vivien Didelot Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit ea6a547669b37453f2b1a5d85188d75b3613dfaa Author: Willem de Bruijn Date: Thu Dec 12 11:36:46 2019 -0500 selftests/net: make so_txtime more robust to timer variance The SO_TXTIME test depends on accurate timers. In some virtualized environments the test has been reported to be flaky. This is easily reproduced by disabling kvm acceleration in Qemu. Allow greater variance in a run and retry to further reduce flakiness. Observed errors are one of two kinds: either the packet arrives too early or late at recv(), or it was dropped in the qdisc itself and the recv() call times out. In the latter case, the qdisc queues a notification to the error queue of the send socket. Also explicitly report this cause. Link: https://lore.kernel.org/netdev/CA+FuTSdYOnJCsGuj43xwV1jxvYsaoa_LzHQF9qMyhrkLrivxKw@mail.gmail.com Reported-by: Naresh Kamboju Signed-off-by: Willem de Bruijn Signed-off-by: Jakub Kicinski commit 3a5f494d84187db5a86de6aeceec4ae6b58380cd Author: zhengbin Date: Sat Dec 14 18:17:24 2019 +0800 net: phy: dp83869: Remove unneeded semicolon Fixes coccicheck warning: drivers/net/phy/dp83869.c:337:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Reviewed-by: Andrew Lunn Signed-off-by: Jakub Kicinski commit 1180beb08b9155ffdb982bfef0e3df280ab11ac5 Author: Hsin-Yi Wang Date: Fri Dec 13 12:57:20 2019 +0800 arm64: dts: mt8173: add Mediatek JPEG Codec Add JPEG codec node in mt8173. Signed-off-by: Hsin-Yi Wang Signed-off-by: Matthias Brugger commit 826f66b30c2e3d4df533e4224cb8c734afa0a17c Author: Andy Roulin Date: Wed Dec 11 14:30:58 2019 -0800 bonding: move 802.3ad port state flags to uapi The bond slave actor/partner operating state is exported as bitfield to userspace, which lacks a way to interpret it, e.g., iproute2 only prints the state as a number: ad_actor_oper_port_state 15 For userspace to interpret the bitfield, the bitfield definitions should be part of the uapi. The bitfield itself is defined in the 802.3ad standard. This commit moves the 802.3ad bitfield definitions to uapi. Related iproute2 patches, soon to be posted upstream, use the new uapi headers to pretty-print bond slave state, e.g., with ip -d link show ad_actor_oper_port_state_str Signed-off-by: Andy Roulin Acked-by: Roopa Prabhu Acked-by: Jay Vosburgh Signed-off-by: Jakub Kicinski commit d4e6a62d3769ef09bfe116b261a61ef871dea4f9 Author: Paul Cercueil Date: Tue Dec 10 15:41:42 2019 +0100 gpu/drm: ingenic: Add support for the JZ4770 The LCD controller in the JZ4770 supports up to 720p. While there has been many new features added since the old JZ4740, which are not yet handled here, this driver still works fine. v2: No change Signed-off-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20191210144142.33143-6-paul@crapouillou.net # *** extracted tags *** Acked-by: Sam Ravnborg commit a7c909b7c037fa687ffa734ba2ac8526f8e298f4 Author: Paul Cercueil Date: Tue Dec 10 15:41:41 2019 +0100 gpu/drm: ingenic: Check for display size in CRTC atomic check Check that the requested display size isn't above the limits supported by the CRTC. - JZ4750 and older support up to 800x600; - JZ4755 supports up to 1024x576; - JZ4760 and JZ4770 support up to 720p; - JZ4780 supports up to 2k. v2: No change Signed-off-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20191210144142.33143-5-paul@crapouillou.net # *** extracted tags *** Acked-by: Sam Ravnborg commit 96ea0ae692fe382dc7a5d66289d8fbd4a369614d Author: Paul Cercueil Date: Tue Dec 10 15:41:40 2019 +0100 gpu/drm: ingenic: Set max FB height to 4095 While the LCD controller can effectively only support a maximum resolution of 800x600, the framebuffer's height can be much higher, since we can change the Y start offset. v2: No change Signed-off-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20191210144142.33143-4-paul@crapouillou.net # *** extracted tags *** Acked-by: Sam Ravnborg commit 52e4607dace1eeeb2e012fca291dc4e6cb449bff Author: Paul Cercueil Date: Tue Dec 10 15:41:39 2019 +0100 gpu/drm: ingenic: Use the plane's src_[x,y] to configure DMA length Instead of obtaining the width/height of the framebuffer from the CRTC state, obtain it from the current plane state. v2: No change Signed-off-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20191210144142.33143-3-paul@crapouillou.net # *** extracted tags *** Acked-by: Sam Ravnborg commit 354b051c5dcbeb35bbfd5d54161364fc7a75a58a Author: Paul Cercueil Date: Tue Dec 10 15:41:38 2019 +0100 gpu/drm: ingenic: Avoid null pointer deference in plane atomic update It is possible that there is no drm_framebuffer associated with a given plane state. v2: Handle drm_plane->state which can be NULL too Signed-off-by: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20191210144142.33143-2-paul@crapouillou.net # *** extracted tags *** Acked-by: Sam Ravnborg commit 9482ae6ea7879f29221eb9cd10807d087517b38b Author: Paul Cercueil Date: Tue Dec 10 15:41:37 2019 +0100 dt-bindings: display/ingenic: Add compatible string for JZ4770 Add a compatible string for the LCD controller found in the JZ4770 SoC. v2: No change Signed-off-by: Paul Cercueil Acked-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20191210144142.33143-1-paul@crapouillou.net # *** extracted tags *** Acked-by: Sam Ravnborg commit 651bbb9d5161ae7170bc19fec893b8bf05fc590f Author: Takashi Iwai Date: Fri Dec 13 17:30:05 2019 +0100 ALSA: hda: Comment about snd_hdac_bus_update_rirb() and spinlock The call of snd_hdac_bus_update_rirb() needs the bus->reg_lock spinlock protection for concurrency. Comment about it more explicitly. Link: https://lore.kernel.org/r/20191213163005.19116-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit c23f45d983270e5491275f28937301ccfa45d2ec Author: zhengbin Date: Sat Dec 14 17:51:31 2019 +0800 drm/sun4i: Remove unneeded semicolon in sun4i_layer.c Fixes coccicheck warning: drivers/gpu/drm/sun4i/sun4i_layer.c:253:3-4: Unneeded semicolon drivers/gpu/drm/sun4i/sun4i_layer.c:257:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/1576317091-24968-3-git-send-email-zhengbin13@huawei.com commit 078ebd863d9dcb8522ede0d842212aabcf7f6caa Author: zhengbin Date: Sat Dec 14 17:51:30 2019 +0800 drm/sun4i: Remove unneeded semicolon in sun8i_mixer.c Fixes coccicheck warning: drivers/gpu/drm/sun4i/sun8i_mixer.c:289:3-4: Unneeded semicolon drivers/gpu/drm/sun4i/sun8i_mixer.c:292:2-3: Unneeded semicolon drivers/gpu/drm/sun4i/sun8i_mixer.c:302:3-4: Unneeded semicolon drivers/gpu/drm/sun4i/sun8i_mixer.c:305:2-3: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/1576317091-24968-2-git-send-email-zhengbin13@huawei.com commit 1faa9d3a3ea7852761ff403f5a9d4a409c0bb199 Author: Takashi Sakamoto Date: Sat Dec 14 22:13:51 2019 +0900 ALSA: control: remove useless assignment in .info callback of PCM chmap element Control elements for PCM chmap return information to userspace abount the maximum number of available PCM channels as the number of values in the element. In current implementation the number is once initialized to zero, then assigned to. This is useless and this commit fixes it. Fixes: 2d3391ec0ecc ("ALSA: PCM: channel mapping API implementation") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191214131351.28950-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 72c2ce9867d9e8535f8c29eb6d842d1caad281af Author: Borislav Petkov Date: Tue Nov 12 21:58:57 2019 +0100 x86/bugs: Move enum taa_mitigations to bugs.c ... because it is used only there. No functional changes. Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20191112221823.19677-1-bp@alien8.de commit 7a90f89904afe66ff029bd784679aa293baacb72 Author: Chris Wilson Date: Fri Dec 13 22:31:40 2019 +0000 drm/i915/gem: Serialise object before changing cache-level Wait for the object to be idle before changing its cache-level and unbinding. This was dropped as supposedly superfluous from commit 8b1c78e06e61 ("drm/i915: Avoid calling i915_gem_object_unbind holding object lock"), but it turns out to prevent some cache dirt escaping. Smells like papering over a race... Closes: https://gitlab.freedesktop.org/drm/intel/issues/820 Fixes: 8b1c78e06e61 ("drm/i915: Avoid calling i915_gem_object_unbind holding object lock") Signed-off-by: Chris Wilson Cc: Andi Shyti Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191213223140.1830738-1-chris@chris-wilson.co.uk commit 27353d5785bca61bb49cfd7c78e14f1d21e66ec5 Author: yu kuai Date: Fri Dec 13 20:12:53 2019 +0800 x86/process: Remove set but not used variables prev and next Remove two unused variables: arch/x86/kernel/process.c: In function ‘__switch_to_xtra’: arch/x86/kernel/process.c:618:31: warning: variable ‘next’ set but not used [-Wunused-but-set-variable] 618 | struct thread_struct *prev, *next; | ^~~~ arch/x86/kernel/process.c:618:24: warning: variable ‘prev’ set but not used [-Wunused-but-set-variable] 618 | struct thread_struct *prev, *next; | They are never used and so can be removed. Signed-off-by: yu kuai Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: x86-ml Cc: yi.zhang@huawei.com Cc: zhengbin13@huawei.com Link: https://lkml.kernel.org/r/20191213121253.10072-1-yukuai3@huawei.com commit 1d1997db870f4058676439ef7014390ba9e24eb2 Author: Jakub Kicinski Date: Tue Dec 10 10:20:32 2019 -0800 Revert "nfp: abm: fix memory leak in nfp_abm_u32_knode_replace" This reverts commit 78beef629fd9 ("nfp: abm: fix memory leak in nfp_abm_u32_knode_replace"). The quoted commit does not fix anything and resulted in a bogus CVE-2019-19076. If match is NULL then it is known there is no matching entry in list, hence, calling nfp_abm_u32_knode_delete() is pointless. Signed-off-by: Jakub Kicinski Reviewed-by: John Hurley commit a06bf42f5a95ff462401d59d0c08cf4620213647 Author: Stanislav Fomichev Date: Fri Dec 13 14:30:28 2019 -0800 selftests/bpf: Test wire_len/gso_segs in BPF_PROG_TEST_RUN Make sure we can pass arbitrary data in wire_len/gso_segs. Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191213223028.161282-2-sdf@google.com commit 850a88cc4096fe1df407452ba2e4d28cf5b3eee9 Author: Stanislav Fomichev Date: Fri Dec 13 14:30:27 2019 -0800 bpf: Expose __sk_buff wire_len/gso_segs to BPF_PROG_TEST_RUN wire_len should not be less than real len and is capped by GSO_MAX_SIZE. gso_segs is capped by GSO_MAX_SEGS. v2: * set wire_len to skb->len when passed wire_len is 0 (Alexei Starovoitov) Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Cc: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191213223028.161282-1-sdf@google.com commit cd6a1ca38698b0c8ff8afe5074fe53aff3647973 Author: Linus Walleij Date: Fri Dec 6 10:43:01 2019 +0100 drm/gma500: Pass GPIO for Intel MID using descriptors The GMA500 driver is using the legacy GPIO API to fetch three optional display control GPIO lines from the SFI description used by the Medfield platform. Switch this over to use GPIO descriptors and delete the custom platform data. We create three new static locals in the tc35876x bridge code but it is hardly any worse than the I2C client static local already there: I tried first to move it to the DRM driver state container but there are workarounds for probe order in the code so I just stayed off it, as the result is unpredictable. People wanting to do a more throrugh and proper cleanup of the GMA500 driver can work on top of this, I can't solve much more since I don't have access to the hardware, I can only attempt to tidy up my GPIO corner. Cc: Daniel Stone Cc: Daniel Vetter Reviewed-by: Andy Shevchenko Acked-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20191206094301.76368-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij commit 9c569784a422e9eaa1c6f61e46a41011391e4d1d Author: Jani Nikula Date: Wed Dec 11 13:08:44 2019 +0200 drm/i915/dsi: fix pipe D readout for DSI transcoders Commit 4d89adc7b56f ("drm/i915/display/dsi: Add support to pipe D") added pipe D support for DSI, but failed to update the state readout. Fixes: 4d89adc7b56f ("drm/i915/display/dsi: Add support to pipe D") Cc: Lucas De Marchi Cc: José Roberto de Souza Cc: Vandita Kulkarni Signed-off-by: Jani Nikula Reviewed-by: José Roberto de Souza Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20191211110844.2996-1-jani.nikula@intel.com commit f9b3b8c6be47d0df31528fa2de6cf6265570a6d8 Author: Lucas De Marchi Date: Fri Dec 6 11:05:52 2019 -0800 drm/i915/bios: remove extra debug messages Just like in commit 523e0cc89b83 ("drm/i915/tgl: allow DVI/HDMI on port A"), the port checks when reading the VBT can easily not match what the platform really exposes. However here we only have some additional debug messages that are not adding much value: in the previous debug message we already print everything we know about the VBT. Instead of keep fixing the possible port assignments according to the platform, just nuke the additional messages. Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Acked-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191206190552.8818-1-lucas.demarchi@intel.com commit e03512edd2b8d01fe9d34b8c66cc21933e4a68f6 Author: Andi Shyti Date: Fri Dec 13 20:37:35 2019 +0200 drm/i915/rps: Add frequency translation helpers Add two helpers that for reading the actual GT's frequency. The two helpers are: - intel_rps_read_cagf: reads the frequency and returns it not normalized - intel_rps_read_actual_frequency: provides the frequency in Hz. Use the above helpers in sysfs and debugfs. Signed-off-by: Andi Shyti Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191213183736.31992-2-andi@etezian.org commit 02620d9e629d217330a1e2a55f9c1e15a1af1519 Merge: 91cbdf740a47 116eb788f57c Author: Alexei Starovoitov Date: Fri Dec 13 13:09:33 2019 -0800 Merge branch 'bpf-dispatcher' Björn Töpel says: ==================== Overview ======== This is the 6th iteration of the series that introduces the BPF dispatcher, which is a mechanism to avoid indirect calls. The BPF dispatcher is a multi-way branch code generator, targeted for BPF programs. E.g. when an XDP program is executed via the bpf_prog_run_xdp(), it is invoked via an indirect call. With retpolines enabled, the indirect call has a substantial performance impact. The dispatcher is a mechanism that transform indirect calls to direct calls, and therefore avoids the retpoline. The dispatcher is generated using the BPF JIT, and relies on text poking provided by bpf_arch_text_poke(). The dispatcher hijacks a trampoline function it via the __fentry__ nop of the trampoline. One dispatcher instance currently supports up to 48 dispatch points. This can be extended in the future. In this series, only one dispatcher instance is supported, and the only user is XDP. The dispatcher is updated when an XDP program is attached/detached to/from a netdev. An alternative to this could have been to update the dispatcher at program load point, but as there are usually more XDP programs loaded than attached, so the latter was picked. The XDP dispatcher is always enabled, if available, because it helps even when retpolines are disabled. Please refer to the "Performance" section below. The first patch refactors the image allocation from the BPF trampoline code. Patch two introduces the dispatcher, and patch three adds a dispatcher for XDP, and wires up the XDP control-/ fast-path. Patch four adds the dispatcher to BPF_TEST_RUN. Patch five adds a simple selftest, and the last adds alignment to jump targets. I have rebased the series on commit 679152d3a32e ("libbpf: Fix printf compilation warnings on ppc64le arch"). Generated code, x86-64 ====================== The dispatcher currently has a maximum of 48 entries, where one entry is a unique BPF program. Multiple users of a dispatcher instance using the same BPF program will share that entry. The program/slot lookup is performed by a binary search, O(log n). Let's have a look at the generated code. The trampoline function has the following signature: unsigned int tramp(const void *ctx, const struct bpf_insn *insnsi, unsigned int (*bpf_func)(const void *, const struct bpf_insn *)) On Intel x86-64 this means that rdx will contain the bpf_func. To, make it easier to read, I've let the BPF programs have the following range: 0xffffffffffffffff (-1) to 0xfffffffffffffff0 (-16). 0xffffffff81c00f10 is the retpoline thunk, in this case __x86_indirect_thunk_rdx. If retpolines are disabled the thunk will be a regular indirect call. The minimal dispatcher will then look like this: ffffffffc0002000: cmp rdx,0xffffffffffffffff ffffffffc0002007: je 0xffffffffffffffff ; -1 ffffffffc000200d: jmp 0xffffffff81c00f10 A 16 entry dispatcher looks like this: ffffffffc0020000: cmp rdx,0xfffffffffffffff7 ; -9 ffffffffc0020007: jg 0xffffffffc0020130 ffffffffc002000d: cmp rdx,0xfffffffffffffff3 ; -13 ffffffffc0020014: jg 0xffffffffc00200a0 ffffffffc002001a: cmp rdx,0xfffffffffffffff1 ; -15 ffffffffc0020021: jg 0xffffffffc0020060 ffffffffc0020023: cmp rdx,0xfffffffffffffff0 ; -16 ffffffffc002002a: jg 0xffffffffc0020040 ffffffffc002002c: cmp rdx,0xfffffffffffffff0 ; -16 ffffffffc0020033: je 0xfffffffffffffff0 ; -16 ffffffffc0020039: jmp 0xffffffff81c00f10 ffffffffc002003e: xchg ax,ax ffffffffc0020040: cmp rdx,0xfffffffffffffff1 ; -15 ffffffffc0020047: je 0xfffffffffffffff1 ; -15 ffffffffc002004d: jmp 0xffffffff81c00f10 ffffffffc0020052: nop DWORD PTR [rax+rax*1+0x0] ffffffffc002005a: nop WORD PTR [rax+rax*1+0x0] ffffffffc0020060: cmp rdx,0xfffffffffffffff2 ; -14 ffffffffc0020067: jg 0xffffffffc0020080 ffffffffc0020069: cmp rdx,0xfffffffffffffff2 ; -14 ffffffffc0020070: je 0xfffffffffffffff2 ; -14 ffffffffc0020076: jmp 0xffffffff81c00f10 ffffffffc002007b: nop DWORD PTR [rax+rax*1+0x0] ffffffffc0020080: cmp rdx,0xfffffffffffffff3 ; -13 ffffffffc0020087: je 0xfffffffffffffff3 ; -13 ffffffffc002008d: jmp 0xffffffff81c00f10 ffffffffc0020092: nop DWORD PTR [rax+rax*1+0x0] ffffffffc002009a: nop WORD PTR [rax+rax*1+0x0] ffffffffc00200a0: cmp rdx,0xfffffffffffffff5 ; -11 ffffffffc00200a7: jg 0xffffffffc00200f0 ffffffffc00200a9: cmp rdx,0xfffffffffffffff4 ; -12 ffffffffc00200b0: jg 0xffffffffc00200d0 ffffffffc00200b2: cmp rdx,0xfffffffffffffff4 ; -12 ffffffffc00200b9: je 0xfffffffffffffff4 ; -12 ffffffffc00200bf: jmp 0xffffffff81c00f10 ffffffffc00200c4: nop DWORD PTR [rax+rax*1+0x0] ffffffffc00200cc: nop DWORD PTR [rax+0x0] ffffffffc00200d0: cmp rdx,0xfffffffffffffff5 ; -11 ffffffffc00200d7: je 0xfffffffffffffff5 ; -11 ffffffffc00200dd: jmp 0xffffffff81c00f10 ffffffffc00200e2: nop DWORD PTR [rax+rax*1+0x0] ffffffffc00200ea: nop WORD PTR [rax+rax*1+0x0] ffffffffc00200f0: cmp rdx,0xfffffffffffffff6 ; -10 ffffffffc00200f7: jg 0xffffffffc0020110 ffffffffc00200f9: cmp rdx,0xfffffffffffffff6 ; -10 ffffffffc0020100: je 0xfffffffffffffff6 ; -10 ffffffffc0020106: jmp 0xffffffff81c00f10 ffffffffc002010b: nop DWORD PTR [rax+rax*1+0x0] ffffffffc0020110: cmp rdx,0xfffffffffffffff7 ; -9 ffffffffc0020117: je 0xfffffffffffffff7 ; -9 ffffffffc002011d: jmp 0xffffffff81c00f10 ffffffffc0020122: nop DWORD PTR [rax+rax*1+0x0] ffffffffc002012a: nop WORD PTR [rax+rax*1+0x0] ffffffffc0020130: cmp rdx,0xfffffffffffffffb ; -5 ffffffffc0020137: jg 0xffffffffc00201d0 ffffffffc002013d: cmp rdx,0xfffffffffffffff9 ; -7 ffffffffc0020144: jg 0xffffffffc0020190 ffffffffc0020146: cmp rdx,0xfffffffffffffff8 ; -8 ffffffffc002014d: jg 0xffffffffc0020170 ffffffffc002014f: cmp rdx,0xfffffffffffffff8 ; -8 ffffffffc0020156: je 0xfffffffffffffff8 ; -8 ffffffffc002015c: jmp 0xffffffff81c00f10 ffffffffc0020161: nop DWORD PTR [rax+rax*1+0x0] ffffffffc0020169: nop DWORD PTR [rax+0x0] ffffffffc0020170: cmp rdx,0xfffffffffffffff9 ; -7 ffffffffc0020177: je 0xfffffffffffffff9 ; -7 ffffffffc002017d: jmp 0xffffffff81c00f10 ffffffffc0020182: nop DWORD PTR [rax+rax*1+0x0] ffffffffc002018a: nop WORD PTR [rax+rax*1+0x0] ffffffffc0020190: cmp rdx,0xfffffffffffffffa ; -6 ffffffffc0020197: jg 0xffffffffc00201b0 ffffffffc0020199: cmp rdx,0xfffffffffffffffa ; -6 ffffffffc00201a0: je 0xfffffffffffffffa ; -6 ffffffffc00201a6: jmp 0xffffffff81c00f10 ffffffffc00201ab: nop DWORD PTR [rax+rax*1+0x0] ffffffffc00201b0: cmp rdx,0xfffffffffffffffb ; -5 ffffffffc00201b7: je 0xfffffffffffffffb ; -5 ffffffffc00201bd: jmp 0xffffffff81c00f10 ffffffffc00201c2: nop DWORD PTR [rax+rax*1+0x0] ffffffffc00201ca: nop WORD PTR [rax+rax*1+0x0] ffffffffc00201d0: cmp rdx,0xfffffffffffffffd ; -3 ffffffffc00201d7: jg 0xffffffffc0020220 ffffffffc00201d9: cmp rdx,0xfffffffffffffffc ; -4 ffffffffc00201e0: jg 0xffffffffc0020200 ffffffffc00201e2: cmp rdx,0xfffffffffffffffc ; -4 ffffffffc00201e9: je 0xfffffffffffffffc ; -4 ffffffffc00201ef: jmp 0xffffffff81c00f10 ffffffffc00201f4: nop DWORD PTR [rax+rax*1+0x0] ffffffffc00201fc: nop DWORD PTR [rax+0x0] ffffffffc0020200: cmp rdx,0xfffffffffffffffd ; -3 ffffffffc0020207: je 0xfffffffffffffffd ; -3 ffffffffc002020d: jmp 0xffffffff81c00f10 ffffffffc0020212: nop DWORD PTR [rax+rax*1+0x0] ffffffffc002021a: nop WORD PTR [rax+rax*1+0x0] ffffffffc0020220: cmp rdx,0xfffffffffffffffe ; -2 ffffffffc0020227: jg 0xffffffffc0020240 ffffffffc0020229: cmp rdx,0xfffffffffffffffe ; -2 ffffffffc0020230: je 0xfffffffffffffffe ; -2 ffffffffc0020236: jmp 0xffffffff81c00f10 ffffffffc002023b: nop DWORD PTR [rax+rax*1+0x0] ffffffffc0020240: cmp rdx,0xffffffffffffffff ; -1 ffffffffc0020247: je 0xffffffffffffffff ; -1 ffffffffc002024d: jmp 0xffffffff81c00f10 The nops are there to align jump targets to 16 B. Performance =========== The tests were performed using the xdp_rxq_info sample program with the following command-line: 1. XDP_DRV: # xdp_rxq_info --dev eth0 --action XDP_DROP 2. XDP_SKB: # xdp_rxq_info --dev eth0 -S --action XDP_DROP 3. xdp-perf, from selftests/bpf: # test_progs -v -t xdp_perf Run with mitigations=auto ------------------------- Baseline: 1. 21.7 Mpps (21736190) 2. 3.8 Mpps (3837582) 3. 15 ns Dispatcher: 1. 30.2 Mpps (30176320) 2. 4.0 Mpps (4015579) 3. 5 ns Dispatcher (full; walk all entries, and fallback): 1. 22.0 Mpps (21986704) 2. 3.8 Mpps (3831298) 3. 17 ns Run with mitigations=off ------------------------ Baseline: 1. 29.9 Mpps (29875135) 2. 4.1 Mpps (4100179) 3. 4 ns Dispatcher: 1. 30.4 Mpps (30439241) 2. 4.1 Mpps (4109350) 1. 4 ns Dispatcher (full; walk all entries, and fallback): 1. 28.9 Mpps (28903269) 2. 4.1 Mpps (4080078) 3. 5 ns xdp-perf runs, aliged vs non-aligned jump targets ------------------------------------------------- In this test dispatchers of different sizes, with and without jump target alignment, were exercised. As outlined above the function lookup is performed via binary search. This means that depending on the pointer value of the function, it can reside in the upper or lower part of the search table. The performed tests were: 1. aligned, mititations=auto, function entry < other entries 2. aligned, mititations=auto, function entry > other entries 3. non-aligned, mititations=auto, function entry < other entries 4. non-aligned, mititations=auto, function entry > other entries 5. aligned, mititations=off, function entry < other entries 6. aligned, mititations=off, function entry > other entries 7. non-aligned, mititations=off, function entry < other entries 8. non-aligned, mititations=off, function entry > other entries The micro benchmarks showed that alignment of jump target has some positive impact. A reply to this cover letter will contain complete data for all runs. Multiple xdp-perf baseline with mitigations=auto ------------------------------------------------ Performance counter stats for './test_progs -v -t xdp_perf' (1024 runs): 16.69 msec task-clock # 0.984 CPUs utilized ( +- 0.08% ) 2 context-switches # 0.123 K/sec ( +- 1.11% ) 0 cpu-migrations # 0.000 K/sec ( +- 70.68% ) 97 page-faults # 0.006 M/sec ( +- 0.05% ) 49,254,635 cycles # 2.951 GHz ( +- 0.09% ) (12.28%) 42,138,558 instructions # 0.86 insn per cycle ( +- 0.02% ) (36.15%) 7,315,291 branches # 438.300 M/sec ( +- 0.01% ) (59.43%) 1,011,201 branch-misses # 13.82% of all branches ( +- 0.01% ) (83.31%) 15,440,788 L1-dcache-loads # 925.143 M/sec ( +- 0.00% ) (99.40%) 39,067 L1-dcache-load-misses # 0.25% of all L1-dcache hits ( +- 0.04% ) 6,531 LLC-loads # 0.391 M/sec ( +- 0.05% ) 442 LLC-load-misses # 6.76% of all LL-cache hits ( +- 0.77% ) L1-icache-loads 57,964 L1-icache-load-misses ( +- 0.06% ) 15,442,496 dTLB-loads # 925.246 M/sec ( +- 0.00% ) 514 dTLB-load-misses # 0.00% of all dTLB cache hits ( +- 0.73% ) (40.57%) 130 iTLB-loads # 0.008 M/sec ( +- 2.75% ) (16.69%) iTLB-load-misses ( +- 8.71% ) (0.60%) L1-dcache-prefetches L1-dcache-prefetch-misses 0.0169558 +- 0.0000127 seconds time elapsed ( +- 0.07% ) Multiple xdp-perf dispatcher with mitigations=auto -------------------------------------------------- Note that this includes generating the dispatcher. Performance counter stats for './test_progs -v -t xdp_perf' (1024 runs): 4.80 msec task-clock # 0.953 CPUs utilized ( +- 0.06% ) 1 context-switches # 0.258 K/sec ( +- 1.57% ) 0 cpu-migrations # 0.000 K/sec 97 page-faults # 0.020 M/sec ( +- 0.05% ) 14,185,861 cycles # 2.955 GHz ( +- 0.17% ) (50.49%) 45,691,935 instructions # 3.22 insn per cycle ( +- 0.01% ) (99.19%) 8,346,008 branches # 1738.709 M/sec ( +- 0.00% ) 13,046 branch-misses # 0.16% of all branches ( +- 0.10% ) 15,443,735 L1-dcache-loads # 3217.365 M/sec ( +- 0.00% ) 39,585 L1-dcache-load-misses # 0.26% of all L1-dcache hits ( +- 0.05% ) 7,138 LLC-loads # 1.487 M/sec ( +- 0.06% ) 671 LLC-load-misses # 9.40% of all LL-cache hits ( +- 0.73% ) L1-icache-loads 56,213 L1-icache-load-misses ( +- 0.08% ) 15,443,735 dTLB-loads # 3217.365 M/sec ( +- 0.00% ) dTLB-load-misses (0.00%) iTLB-loads (0.00%) iTLB-load-misses (0.00%) L1-dcache-prefetches L1-dcache-prefetch-misses 0.00503705 +- 0.00000546 seconds time elapsed ( +- 0.11% ) Revisions ========= v4->v5: [1] * Fixed s/xdp_ctx/ctx/ type-o (Toke) * Marked dispatcher trampoline with noinline attribute (Alexei) v3->v4: [2] * Moved away from doing dispatcher lookup based on the trampoline function, to a model where the dispatcher instance is explicitly passed to the bpf_dispatcher_change_prog() (Alexei) v2->v3: [3] * Removed xdp_call, and instead make the dispatcher available to all XDP users via bpf_prog_run_xdp() and dev_xdp_install(). (Toke) * Always enable the dispatcher, if available (Alexei) * Reuse BPF trampoline image allocator (Alexei) * Make sure the dispatcher is exercised in selftests (Alexei) * Only allow one dispatcher, and wire it to XDP v1->v2: [4] * Fixed i386 build warning (kbuild robot) * Made bpf_dispatcher_lookup() static (kbuild robot) * Make sure xdp_call.h is only enabled for builtins * Add xdp_call() to ixgbe, mlx4, and mlx5 RFC->v1: [5] * Improved error handling (Edward and Andrii) * Explicit cleanup (Andrii) * Use 32B with sext cmp (Alexei) * Align jump targets to 16B (Alexei) * 4 to 16 entries (Toke) * Added stats to xdp_call_run() [1] https://lore.kernel.org/bpf/20191211123017.13212-1-bjorn.topel@gmail.com/ [2] https://lore.kernel.org/bpf/20191209135522.16576-1-bjorn.topel@gmail.com/ [3] https://lore.kernel.org/bpf/20191123071226.6501-1-bjorn.topel@gmail.com/ [4] https://lore.kernel.org/bpf/20191119160757.27714-1-bjorn.topel@gmail.com/ [5] https://lore.kernel.org/bpf/20191113204737.31623-1-bjorn.topel@gmail.com/ ==================== Signed-off-by: Alexei Starovoitov commit 116eb788f57c9c35c40b29cfaa2607020de99a84 Author: Björn Töpel Date: Fri Dec 13 18:51:12 2019 +0100 bpf, x86: Align dispatcher branch targets to 16B >From Intel 64 and IA-32 Architectures Optimization Reference Manual, 3.4.1.4 Code Alignment, Assembly/Compiler Coding Rule 11: All branch targets should be 16-byte aligned. This commits aligns branch targets according to the Intel manual. The nops used to align branch targets make the dispatcher larger, and therefore the number of supported dispatch points/programs are descreased from 64 to 48. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191213175112.30208-7-bjorn.topel@gmail.com commit e754f5a6e36b63d6732f52adcbe4c447fd66896f Author: Björn Töpel Date: Fri Dec 13 18:51:11 2019 +0100 selftests: bpf: Add xdp_perf test The xdp_perf is a dummy XDP test, only used to measure the the cost of jumping into a naive XDP program one million times. To build and run the program: $ cd tools/testing/selftests/bpf $ make $ ./test_progs -v -t xdp_perf Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191213175112.30208-6-bjorn.topel@gmail.com commit f23c4b3924d2e9382820ee677b68d42d5dd7b08b Author: Björn Töpel Date: Fri Dec 13 18:51:10 2019 +0100 bpf: Start using the BPF dispatcher in BPF_TEST_RUN In order to properly exercise the BPF dispatcher, this commit adds BPF dispatcher usage to BPF_TEST_RUN when executing XDP programs. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191213175112.30208-5-bjorn.topel@gmail.com commit 7e6897f95935973c3253fd756135b5ea58043dc8 Author: Björn Töpel Date: Fri Dec 13 18:51:09 2019 +0100 bpf, xdp: Start using the BPF dispatcher for XDP This commit adds a BPF dispatcher for XDP. The dispatcher is updated from the XDP control-path, dev_xdp_install(), and used when an XDP program is run via bpf_prog_run_xdp(). Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191213175112.30208-4-bjorn.topel@gmail.com commit 75ccbef6369e94ecac696a152a998a978d41376b Author: Björn Töpel Date: Fri Dec 13 18:51:08 2019 +0100 bpf: Introduce BPF dispatcher The BPF dispatcher is a multi-way branch code generator, mainly targeted for XDP programs. When an XDP program is executed via the bpf_prog_run_xdp(), it is invoked via an indirect call. The indirect call has a substantial performance impact, when retpolines are enabled. The dispatcher transform indirect calls to direct calls, and therefore avoids the retpoline. The dispatcher is generated using the BPF JIT, and relies on text poking provided by bpf_arch_text_poke(). The dispatcher hijacks a trampoline function it via the __fentry__ nop of the trampoline. One dispatcher instance currently supports up to 64 dispatch points. A user creates a dispatcher with its corresponding trampoline with the DEFINE_BPF_DISPATCHER macro. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191213175112.30208-3-bjorn.topel@gmail.com commit 98e8627efcada18ac043a77b9101b4b4c768090b Author: Björn Töpel Date: Fri Dec 13 18:51:07 2019 +0100 bpf: Move trampoline JIT image allocation to a function Refactor the image allocation in the BPF trampoline code into a separate function, so it can be shared with the BPF dispatcher in upcoming commits. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191213175112.30208-2-bjorn.topel@gmail.com commit 91cbdf740a476cf2c744169bf407de2e3ac1f3cf Author: Andrii Nakryiko Date: Wed Dec 11 17:36:20 2019 -0800 selftests/bpf: Fix perf_buffer test on systems w/ offline CPUs Fix up perf_buffer.c selftest to take into account offline/missing CPUs. Fixes: ee5cf82ce04a ("selftests/bpf: test perf buffer API") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191212013621.1691858-1-andriin@fb.com commit 783b8f01f5942a786998f5577bd9ff3992f22a1a Author: Andrii Nakryiko Date: Wed Dec 11 17:36:09 2019 -0800 libbpf: Don't attach perf_buffer to offline/missing CPUs It's quite common on some systems to have more CPUs enlisted as "possible", than there are (and could ever be) present/online CPUs. In such cases, perf_buffer creationg will fail due to inability to create perf event on missing CPU with error like this: libbpf: failed to open perf buffer event on cpu #16: No such device This patch fixes the logic of perf_buffer__new() to ignore CPUs that are missing or currently offline. In rare cases where user explicitly listed specific CPUs to connect to, behavior is unchanged: libbpf will try to open perf event buffer on specified CPU(s) anyways. Fixes: fb84b8224655 ("libbpf: add perf buffer API") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191212013609.1691168-1-andriin@fb.com commit 65bc4c4063ae36223375a920b7d116e54d7def34 Author: Andrii Nakryiko Date: Wed Dec 11 17:35:58 2019 -0800 selftests/bpf: Add CPU mask parsing tests Add a bunch of test validating CPU mask parsing logic and error handling. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191212013559.1690898-1-andriin@fb.com commit 6803ee25f0ead1e836808acb14396bb9a9849113 Author: Andrii Nakryiko Date: Wed Dec 11 17:35:48 2019 -0800 libbpf: Extract and generalize CPU mask parsing logic This logic is re-used for parsing a set of online CPUs. Having it as an isolated piece of code working with input string makes it conveninent to test this logic as well. While refactoring, also improve the robustness of original implementation. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191212013548.1690564-1-andriin@fb.com commit 7708bd430d88309333b0d0eb7783cddd0874dd14 Merge: 679152d3a32e 7ee0d4e97b88 Author: Alexei Starovoitov Date: Fri Dec 13 12:38:01 2019 -0800 Merge branch 'reuseport_to_test_progs' Jakub Sitnicki says: ==================== This change has been suggested by Martin Lau [0] during a review of a related patch set that extends reuseport tests [1]. Patches 1 & 2 address a warning due to unrecognized section name from libbpf when running reuseport tests. We don't want to carry this warning into test_progs. Patches 3-8 massage the reuseport tests to ease the switch to test_progs framework. The intention here is to show the work. Happy to squash these, if needed. Patches 9-10 do the actual move and conversion to test_progs. Output from a test_progs run after changes pasted below. Thanks, Jakub [0] https://lore.kernel.org/bpf/20191123110751.6729-1-jakub@cloudflare.com/T/#m607d822caeb1eb5db101172821a78cc3896ff1c3 [1] https://lore.kernel.org/bpf/20191123110751.6729-1-jakub@cloudflare.com/T/#m55881bae9fb6e34837d07a0c0a7ffbc138f8d06f ==================== Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 7ee0d4e97b889c0478af9c1a6e5af658b181423f Author: Jakub Sitnicki Date: Thu Dec 12 11:22:59 2019 +0100 selftests/bpf: Switch reuseport tests for test_progs framework The tests were originally written in abort-on-error style. With the switch to test_progs we can no longer do that. So at the risk of not cleaning up some resource on failure, we now return to the caller on error. That said, failure inside one test should not affect others because we run setup/cleanup before/after every test. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191212102259.418536-11-jakub@cloudflare.com commit 415bb4e125b68a3aaccb8381baaa4a06dd1dcb27 Author: Jakub Sitnicki Date: Thu Dec 12 11:22:58 2019 +0100 selftests/bpf: Move reuseport tests under prog_tests/ Do a pure move the show the actual work needed to adapt the tests in subsequent patch at the cost of breaking test_progs build for the moment. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191212102259.418536-10-jakub@cloudflare.com commit 250a91d48ae7616672a34b58388620a554a00180 Author: Jakub Sitnicki Date: Thu Dec 12 11:22:57 2019 +0100 selftests/bpf: Pull up printing the test name into test runner Again, prepare for switching reuseport tests to test_progs framework. test_progs framework will print the subtest name for us if we set it. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191212102259.418536-9-jakub@cloudflare.com commit 9af6c84435d0252e532c7f8bb70f1ed64a22ae2a Author: Jakub Sitnicki Date: Thu Dec 12 11:22:56 2019 +0100 selftests/bpf: Propagate errors during setup for reuseport tests Prepare for switching reuseport tests to test_progs framework, where we don't have the luxury to terminate the process on failure. Modify setup helpers to signal failure via the return value with the help of a macro similar to the one currently in use by the tests. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191212102259.418536-8-jakub@cloudflare.com commit ce7cb5f3921cdf0f65ab877764265c6c0be34c3c Author: Jakub Sitnicki Date: Thu Dec 12 11:22:55 2019 +0100 selftests/bpf: Run reuseport tests in a loop Prepare for switching reuseport tests to test_progs framework. Loop over the tests and perform setup/cleanup for each test separately, remembering that with test_progs we can select tests to run. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191212102259.418536-7-jakub@cloudflare.com commit 9936338258308aa008387dc4f9fd3f5fec6c046a Author: Jakub Sitnicki Date: Thu Dec 12 11:22:54 2019 +0100 selftests/bpf: Unroll the main loop in reuseport test Prepare for iterating over individual tests without introducing another nested loop in the main test function. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191212102259.418536-6-jakub@cloudflare.com commit a9ce4cf4e47c55ab40641b92551bc9e1de4bfa61 Author: Jakub Sitnicki Date: Thu Dec 12 11:22:53 2019 +0100 selftests/bpf: Add helpers for getting socket family & type name Having string arrays to map socket family & type to a name prevents us from unrolling the test runner loop in the subsequent patch. Introduce helpers that do the same thing. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191212102259.418536-5-jakub@cloudflare.com commit 11f80355d4d27c7c798fc9890b4056c5d98af992 Author: Jakub Sitnicki Date: Thu Dec 12 11:22:52 2019 +0100 selftests/bpf: Use sa_family_t everywhere in reuseport tests Update the only function that is not using sa_family_t in this source file. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191212102259.418536-4-jakub@cloudflare.com commit 1fbcef929d7d71321745e61e8c20b0a02bd38cf1 Author: Jakub Sitnicki Date: Thu Dec 12 11:22:51 2019 +0100 selftests/bpf: Let libbpf determine program type from section name Now that libbpf can recognize SK_REUSEPORT programs, we no longer have to pass a prog_type hint before loading the object file. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191212102259.418536-3-jakub@cloudflare.com commit 67d69ccdf389f3b7fabb00e2d81473a915b3b64d Author: Jakub Sitnicki Date: Thu Dec 12 11:22:50 2019 +0100 libbpf: Recognize SK_REUSEPORT programs from section name Allow loading BPF object files that contain SK_REUSEPORT programs without having to manually set the program type before load if the the section name is set to "sk_reuseport". Makes user-space code needed to load SK_REUSEPORT BPF program more concise. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20191212102259.418536-2-jakub@cloudflare.com commit 3030df209aa8cf831b9963829bd9f94900ee8032 Author: Daniel Drake Date: Wed Nov 27 13:38:36 2019 +0800 PCI: Increase D3 delay for AMD Ryzen5/7 XHCI controllers On Asus UX434DA (AMD Ryzen7 3700U) and Asus X512DK (AMD Ryzen5 3500U), the XHCI controller fails to resume from runtime suspend or s2idle, and USB becomes unusable from that point. xhci_hcd 0000:03:00.4: Refused to change power state, currently in D3 xhci_hcd 0000:03:00.4: enabling device (0000 -> 0002) xhci_hcd 0000:03:00.4: WARN: xHC restore state timeout xhci_hcd 0000:03:00.4: PCI post-resume error -110! xhci_hcd 0000:03:00.4: HC died; cleaning up During suspend, a transition to D3cold is attempted, however the affected platforms do not seem to cut the power to the PCI device when in this state, so the device stays in D3hot. Upon resume, the D3hot-to-D0 transition is successful only if the D3 delay is increased to 20ms. The transition failure does not appear to be detectable as a CRS condition. Add a PCI quirk to increase the delay on the affected hardware. Link: https://bugzilla.kernel.org/show_bug.cgi?id=205587 Link: http://lkml.kernel.org/r/CAD8Lp47Vh69gQjROYG69=waJgL7hs1PwnLonL9+27S_TcRhixA@mail.gmail.com Link: https://lore.kernel.org/r/20191127053836.31624-2-drake@endlessm.com Signed-off-by: Daniel Drake Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit 62fe23df067715a21c4aef44068efe7ceaa8f627 Author: Daniel Drake Date: Wed Nov 27 13:38:35 2019 +0800 PCI: Add generic quirk for increasing D3hot delay Separate the D3 delay increase functionality out of quirk_radeon_pm() into its own function so that it can be shared with other quirks, including the AMD Ryzen XHCI quirk that will be introduced in a followup commit. Tweak the function name and message to indicate more clearly that the delay relates to a D3hot-to-D0 transition. Link: https://lore.kernel.org/r/20191127053836.31624-1-drake@endlessm.com Signed-off-by: Daniel Drake Signed-off-by: Bjorn Helgaas Reviewed-by: Mika Westerberg commit f1925f3309d13d431f70e7b6b72ba59cae90fdff Author: Chris Wilson Date: Fri Dec 13 16:03:47 2019 +0000 drm/i915: Use EAGAIN for trylock failures While not good behaviour, it is, however, established behaviour that we can punt EAGAIN to userspace if we need to retry the ioctl. When trying to acquire a mutex, prefer to use EAGAIN to propagate losing the race so that if it does end up back in userspace, we try again. Fixes: c81471f5e95c ("drm/i915: Copy across scheduler behaviour flags across submit fences") Closes: https://gitlab.freedesktop.org/drm/intel/issues/800 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191213160347.1789004-1-chris@chris-wilson.co.uk commit 639f2f24895fb37dd67dfecabd2c74019ed64140 Author: Venkata Sandeep Dhanalakota Date: Fri Dec 13 07:51:52 2019 -0800 drm/i915: Introduce new macros for tracing New macros ENGINE_TRACE(), CE_TRACE(), RQ_TRACE() and GT_TRACE() are introduce to tag device name and engine name with contexts and requests tracing in i915. Cc: Sudeep Dutt Cc: Rodrigo Vivi Cc: Daniel Vetter Cc: Chris Wilson Cc: Jani Nikula Signed-off-by: Venkata Sandeep Dhanalakota Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191213155152.69182-2-venkata.s.dhanalakota@intel.com commit 3dc716fd3cfddfaabf919f5337d5ff8b199b1cb4 Author: Venkata Sandeep Dhanalakota Date: Fri Dec 13 07:51:51 2019 -0800 drm/i915/perf: Register sysctl path globally We do not require to register the sysctl paths per instance, so making registration global. v2: make sysctl path register and unregister function driver specific (Tvrtko and Lucas). Cc: Sudeep Dutt Cc: Rodrigo Vivi Cc: Daniel Vetter Cc: Chris Wilson Cc: Jani Nikula Signed-off-by: Venkata Sandeep Dhanalakota Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191213155152.69182-1-venkata.s.dhanalakota@intel.com commit b69fa3610b15497e487a6a35786de9600ee60932 Author: Matt Roper Date: Thu Dec 12 17:06:00 2019 -0800 drm/i915/icl: Cleanup combo PHY aux power well handlers Now that the combo PHY aux power well handlers are used exclusively on Icelake, we can drop a bunch of the extra tests. v2: Don't try to use intel_uncore_rmw for register updates yet; there's pending display uncore patches that need to land first. (Lucas) v3: Drop the combo phy assertion. It was backward before, but doesn't seem terribly necessary. I'm keeping the IS_ICELAKE assertion though since we often copy/paste/modify the power well tables when defining new platforms and it's too easy to cargo cult the ICL-specific handling to new platforms that shouldn't use it. (Lucas) v4: Fix build; forgot to commit all the changes. (CI) Cc: Lucas De Marchi Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191213010600.701315-1-matthew.d.roper@intel.com Reviewed-by: Lucas De Marchi commit ab3402581d0fa58e63e36875995f43ab02b4d0a0 Author: Matt Roper Date: Thu Dec 12 16:15:10 2019 -0800 drm/i915/tgl: Drop Wa#1178 The TGL workaround database no longer shows Wa #1178 (or anything similar under different workaround names/numbers) so we should be able to drop it. In fact Swati just discovered that applying this workaround is the root cause of some power well enable failures we've been seeing in CI (gitlab issue 498). Once we stop applying this WA, TGL no longer utilizes any of the special handling provided by icl_combo_phy_aux_power_well_ops so we can just drop back to using the standard hsw-style power well ops instead. v3: Drop now-unused _TGL_AUX_ANAOVRD1_C definition too. (Lucas) Closes: https://gitlab.freedesktop.org/drm/intel/issues/498 Fixes: deea06b47574 ("drm/i915/tgl: apply Display WA #1178 to fix type C dongles") Cc: Lucas De Marchi Cc: Swati Sharma Cc: Imre Deak Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20191213001511.678070-3-matthew.d.roper@intel.com commit e8ab8d669d046a8e9b07707d2f00b9ba3e25d0ae Author: Matt Roper Date: Thu Dec 12 16:15:09 2019 -0800 drm/i915/ehl: Define EHL powerwells independently of ICL Outputs C and D on EHL are combo PHY outputs and thus should not be using the same TC AUX power well handlers as ICL. And even though icl_combo_phy_aux_power_well_ops works okay for EHL/JSL combo PHYs none of its special handling is actually necessary for this platform: * EHL/JSL don't actually need to program PORT_CL_DW12 * Display WA #1178 does not apply to EHL/JSL Thus we can simply drop back to using our standard "hsw-style" power well ops for EHL AUX power wells. Bspec: 4301 Fixes: f722b8c1e2a2 ("drm/i915/ehl: All EHL ports are combo phys") Cc: Jose Souza Cc: Bob Paauwe Cc: Vivek Kasireddy Cc: Lucas De Marchi Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191213001511.678070-2-matthew.d.roper@intel.com Reviewed-by: Lucas De Marchi commit 2840f1f0e4175bd0dac292408189332cc597d163 Author: Daniel Vetter Date: Fri Dec 13 18:26:05 2019 +0100 drm/atmel: plane_state->fb iff plane_state->crtc Checking both is one too much, so wrap a WARN_ON around it to stope the copypasta. 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 Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191213172612.1514842-3-daniel.vetter@ffwll.ch commit 4b6dd3cae3cb53a2c45e5238d7c1af7c39cd4685 Author: Jerry Han Date: Thu Dec 12 19:52:08 2019 +0800 drm/panel: Add Boe Himax8279d MIPI-DSI LCD panel Support Boe Himax8279d 8.0" 1200x1920 TFT LCD panel, it is a MIPI DSI panel. V11: - Use the backlight support in drm_panel to simplify the driver (Sam) V10: - Adjust init code, make the format more concise (Emil) V9: - kill off default_off_cmds (Emil) - use mipi_dsi_dcs_set_display_{on,off} in their enable/disable callbacks. (Emil) - Adjusting the delay function (Emil) V8: - modify PARENTHESIS_ALIGNMENT format (Sam) - use gpios are required API replace optional gpio API (Emil) V7: - Modify communication address V6: - Add the information of the reviewer - Remove unnecessary delays, The udelay_range code gracefully returns without hitting the scheduler on a delay of 0. (Derek) - Merge the same data structures, like display_mode and off_cmds (Derek) - Optimize the processing of results returned by devm_gpiod_get_optional (Derek) V5: - Add the information of the reviewer (Sam) - Delete unnecessary header files #include (Sam) - The config DRM_PANEL_BOE_HIMAX8279D appears twice. Drop one of them (Sam) - ADD static, set_gpios function is not used outside this module (Sam) V4: - Frefix all function maes with boe_ (Sam) - Fsed "enable_gpio" replace "reset_gpio", Make it look clearer (Sam) - Sort include lines alphabetically (Sam) - Fixed entries in the makefile must be sorted alphabetically (Sam) - Add send_mipi_cmds function to avoid duplicating the code (Sam) - Add the necessary delay(reset_delay_t5) between reset and sending the initialization command (Rock wang) V3: - Remove unnecessary delays in sending initialization commands (Jitao Shi) V2: - Use SPDX identifier (Sam) - Use necessary header files replace drmP.h (Sam) - Delete unnecessary header files #include (Sam) - Specifies a GPIOs array to control the reset timing, instead of reading "dsi-reset-sequence" data from DTS (Sam) - Delete backlight_disable() function when already disabled (Sam) - Use devm_of_find_backlight() replace of_find_backlight_by_node() (Sam) - Move the necessary data in the DTS to the current file, like porch, display_mode and Init code etc. (Sam) - Add compatible device "boe,himax8279d10p" (Sam) V1: - Support Boe Himax8279d 8.0" 1200x1920 TFT LCD panel, it is a MIPI DSI panel. Signed-off-by: Jerry Han Reviewed-by: Sam Ravnborg Reviewed-by: Derek Basehore Reviewed-by: Emil Velikov Reported-by: kbuild test robot Cc: Jitao Shi Cc: Rock wang Signed-off-by: Sam Ravnborg [fixed boe_panel_get_modes + backlight] Link: https://patchwork.freedesktop.org/patch/msgid/20191212115208.3878-1-jerry.han.hq@gmail.com commit 2f69293aed183938136e9408920ad0bc5e61bd49 Author: Daniel Vetter Date: Wed Dec 11 13:00:01 2019 +0100 drm/gma500: globle no more! globle, goblin, moblin? It's dead code, we lucked out. Cc: Ville Syrjälä Cc: Jani Nikula Acked-by: Jani Nikula Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191211120001.1167980-1-daniel.vetter@ffwll.ch commit 302d95c6136886d959bca7c21a6c299942a199f1 Author: Neil Armstrong Date: Thu Nov 21 11:14:29 2019 +0100 arm64: dts: meson-sm1: add video decoder compatible Add the video decoder specific compatible for Amlogic SM1 SoC. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit fbceee82c19a42393aaaebe68c8a811d987f6cc8 Author: Maxime Jourdan Date: Wed Nov 20 12:14:30 2019 +0100 arm64: dts: meson-g12-common: add video decoder node Add the video decoder node for the Amlogic G12A and compatible SoC. Signed-off-by: Maxime Jourdan Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 3a67fe38e76a590d2c8ce4731cd64fbd477e5f79 Author: Andy Shevchenko Date: Mon Nov 25 17:45:45 2019 +0200 pinctrl: lynxpoint: Update summary in the driver Reflect in the driver that it is now a pin control one. While here, update copyright years and authors. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 64e14e90646cafa9940cead9f7ba336c55671bf9 Author: Andy Shevchenko Date: Mon Nov 25 19:30:57 2019 +0200 pinctrl: lynxpoint: Switch to pin control API When all preparations are done, we may switch to pin control API. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 3683509c3910cb377913dcd430447ad48f676b31 Author: Andy Shevchenko Date: Mon Nov 4 19:07:30 2019 +0200 pinctrl: lynxpoint: Add GPIO <-> pin mapping ranges via callback When IRQ chip is instantiated via GPIO library flow, the few functions, in particular the ACPI event registration mechanism, on some of ACPI based platforms expect that the pin ranges are initialized to that point. Add GPIO <-> pin mapping ranges via callback in the GPIO library flow. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 03d9eca7d40608197bb20c584a6da97b3399559b Author: Andy Shevchenko Date: Mon Nov 25 20:14:03 2019 +0200 pinctrl: lynxpoint: Implement ->pin_dbg_show() The introduced callback ->pin_dbg_show() is useful for debugging. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 7f32d37009974c52323335cf8d118384fbce3572 Author: Andy Shevchenko Date: Wed Nov 20 21:31:11 2019 +0200 pinctrl: lynxpoint: Add pin control operations Add implementation for: - pin control, group information retrieval: count, name and pins - pin muxing: - function information (count, name and groups) - mux setting - GPIO control (enable, disable, set direction) - pin configuration: - pull disable, up and down - any other option is treated as not supported. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 18213ad4187d44f2b58e96529f169c3ae4898b51 Author: Andy Shevchenko Date: Mon Nov 25 20:49:44 2019 +0200 pinctrl: lynxpoint: Reuse struct intel_pinctrl in the driver We may use now available struct intel_pinctrl in the driver. No functional change implied. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit cecddda7ca4e7e94256e3be972bd7f14960bd64c Author: Andy Shevchenko Date: Fri Oct 25 21:26:21 2019 +0300 pinctrl: lynxpoint: Add pin control data structures In order to implement pin control for Intel Lynxpoint, we need data structures in which to store and pass along pin, community and SoC data information. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 54d371cf73d9029a6adade3ec9423653d7790ef0 Author: Andy Shevchenko Date: Tue Nov 19 17:36:48 2019 +0200 pinctrl: lynxpoint: Implement intel_gpio_get_direction callback Allows querying GPIO direction from the pad config register. If the pad is not in GPIO mode, return an error. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 5931e6edfdd01c97b4cf8354e68f74df97580e49 Author: Andy Shevchenko Date: Fri Nov 22 16:50:05 2019 +0200 pinctrl: lynxpoint: Implement ->irq_ack() callback Instead of playing tricks with registers in the interrupt handler, utilize the IRQ chip core for ACKing interrupts properly. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 540bff18daf4aa3d67004e8bb02a0ea5b3818451 Author: Andy Shevchenko Date: Mon Nov 25 19:28:14 2019 +0200 pinctrl: lynxpoint: Move ownership check to IRQ chip There is nothing wrong with requesting pin that owned by ACPI. The only difference is how interrupt status will be reflected. It means that in ACPI mode we may not use pin as GPIO-backed IRQ. Taking above into consideration, move the check from GPIO to IRQ chip callback. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 095f2a67cdaf0aba6868504e963dda2e4d09a3f8 Author: Andy Shevchenko Date: Mon Nov 18 20:08:57 2019 +0200 pinctrl: lynxpoint: Move lp_irq_type() closer to IRQ related routines Consolidate IRQ routines for better maintenance. While here, rename lp_irq_type() to lp_irq_set_type() to be in align with a callback name. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit d0f2df4070b59662b7d03bbcb22dccbfbd717158 Author: Andy Shevchenko Date: Fri Oct 25 20:53:58 2019 +0300 pinctrl: lynxpoint: Move ->remove closer to ->probe() Consolidate ->remove and ->probe() callbacks for better maintenance. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 21a06495d0e757b8a52774ce62e9cfdf07838971 Author: Andy Shevchenko Date: Mon Nov 25 19:27:34 2019 +0200 pinctrl: lynxpoint: Extract lp_gpio_acpi_use() for future use We may need this function for other features in the pin control driver. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit c35f463a966221f3d6c6bc48fbea27a8d68aafc3 Author: Andy Shevchenko Date: Wed Sep 26 17:50:27 2018 +0300 pinctrl: lynxpoint: Convert unsigned to unsigned int Simple type conversion with no functional change implied. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit e1940adeb17b33bb30ce02abe257c80a492f1707 Author: Andy Shevchenko Date: Mon Nov 25 19:30:31 2019 +0200 pinctrl: lynxpoint: Switch to memory mapped IO accessors Convert driver to use memory mapped IO accessors. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 1e78ea71226b68cec24dca53c53e673de60211bf Author: Andy Shevchenko Date: Fri Oct 25 11:56:11 2019 +0300 pinctrl: lynxpoint: Keep pointer to struct device instead of its container There is no need to keep pointer to struct platform_device, which is container of struct device, because the latter is what have been used everywhere outside of ->probe() path. In any case we may derive pointer to the container when needed. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 03fb681badafa3035d2af4cb48870f69ad993dcb Author: Andy Shevchenko Date: Mon Nov 25 19:19:56 2019 +0200 pinctrl: lynxpoint: Relax GPIO request rules A pin in native mode still can be requested as GPIO, though we assume that firmware has configured it properly, which sometimes is not the case. Here we allow turning the pin as GPIO to avoid potential issues, but issue warning that something might be wrong. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 76347d7ad250b46c4dbeb0e1fe629ed3c72cf004 Author: Andy Shevchenko Date: Mon Nov 25 19:15:34 2019 +0200 pinctrl: lynxpoint: Assume 2 bits for mode selector New generations can use 2 bits for mode selector. Update the code to support it. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit a718e68ede16957e091ee8f35f7b73765e51a092 Author: Andy Shevchenko Date: Mon Nov 25 18:26:35 2019 +0200 pinctrl: lynxpoint: Use standard pattern for memory allocation The pattern foo = kmalloc(sizeof(*foo), GFP_KERNEL); has an advantage when foo type is changed. Since we are planning a such, better to be prepared by using standard pattern for memory allocation. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit caedcbd053bca446f8d66faf74adeb8eb3d2913f Author: Andy Shevchenko Date: Fri Oct 25 20:23:46 2019 +0300 pinctrl: lynxpoint: Use %pR to print IO resource Replace explicit casting by pointer to struct resource with specifier replacement to %pR to print the IO resource. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 3b4c2d8ef0bd88828336e0690459d1b2120eb9e4 Author: Andy Shevchenko Date: Mon Nov 25 18:01:19 2019 +0200 pinctrl: lynxpoint: Drop useless assignment There is no need to assign ret variable in ->probe(). Drop useless assignment. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 7c0bc7bb39ac89a454317d55262c06ec0048628b Author: Andy Shevchenko Date: Fri Oct 25 21:25:43 2019 +0300 pinctrl: lynxpoint: Correct amount of pins When we count from 0 it's possible to get into off-by-one error. That's what had happened to this driver. So, correct amount of pins and related typos in the code. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit b2e05d63c295529879aabeb8781f947e1e2dca7b Author: Andy Shevchenko Date: Mon Nov 18 20:04:54 2019 +0200 pinctrl: lynxpoint: Use raw_spinlock for locking The Intel Lynxpoint pinctrl driver implements irqchip callbacks which are called with desc->lock raw_spinlock held. In mainline this is fine because spinlock resolves to raw_spinlock. However, running the same code in -rt we will get a BUG() asserted. This is because in -rt spinlocks are preemptible so taking the driver private spinlock in irqchip callbacks causes might_sleep() to trigger. In order to keep -rt happy but at the same time make sure that register accesses get serialized, convert the driver to use raw_spinlock instead. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit eb83479e18999e34b3b800f54aa31137f7f41c33 Author: Andy Shevchenko Date: Thu Aug 22 18:40:50 2019 +0300 pinctrl: lynxpoint: Move GPIO driver to pin controller folder Move Lynxpoint GPIO driver under Intel pin control umbrella for further transformation to a real pin control driver. Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 5d33e0eb7ffa2a4f4c431af1deca49f433faba8a Author: Andy Shevchenko Date: Mon Nov 25 18:37:22 2019 +0200 pinctrl: baytrail: Reuse struct intel_pinctrl in the driver We may use now available struct intel_pinctrl in the driver. No functional change implied. Acked-by: Hans de Goede Acked-by: Mika Westerberg Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko commit 2c02af709bff42e7a85e25c7ba8af7c55f034f27 Author: Andy Shevchenko Date: Mon Nov 25 18:34:43 2019 +0200 pinctrl: baytrail: Use local variable to keep device pointer Use local variable to keep device pointer in order to increase readability of the driver. Acked-by: Hans de Goede Acked-by: Mika Westerberg Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko commit 990ec243cb77c682e12bb84c98906880536132aa Author: Andy Shevchenko Date: Mon Nov 25 17:56:41 2019 +0200 pinctrl: baytrail: Keep pointer to struct device instead of its container There is no need to keep pointer to struct platform_device, which is container of struct device, because the latter is what have been used everywhere outside of ->probe() path. In any case we may derive pointer to the container when needed. Acked-by: Hans de Goede Acked-by: Mika Westerberg Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko commit 66c812d22ecdca74015477429a271697655dbfd4 Author: Andy Shevchenko Date: Fri Oct 25 12:10:28 2019 +0300 pinctrl: intel: Share struct intel_pinctrl for wider use There are few drivers for Intel SoC GPIO which may utilize the same data structure to describe this IP. Share struct intel_pinctrl for wider user. Acked-by: Hans de Goede Acked-by: Mika Westerberg Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko commit 6a304752eb6934e4bfa236a346ae440c74e02e07 Author: Matti Vaittinen Date: Thu Dec 12 08:34:32 2019 +0200 pinctrl: intel: Use GPIO direction definitions Use new GPIO_LINE_DIRECTION_IN and GPIO_LINE_DIRECTION_OUT when returning GPIO direction to GPIO framework. Signed-off-by: Matti Vaittinen Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 90a1eb18503d916ca5b089ef79d783c6dc6a5836 Author: Matti Vaittinen Date: Thu Dec 12 08:35:19 2019 +0200 pinctrl: cherryview: Use GPIO direction definitions Use new GPIO_LINE_DIRECTION_IN and GPIO_LINE_DIRECTION_OUT when returning GPIO direction to GPIO framework. Signed-off-by: Matti Vaittinen Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit faf86c0c572ad134003a5f5895a42a4749dae5f3 Author: Matti Vaittinen Date: Thu Dec 12 08:35:52 2019 +0200 pinctrl: baytrail: Use GPIO direction definitions Use new GPIO_LINE_DIRECTION_IN and GPIO_LINE_DIRECTION_OUT when returning GPIO direction to GPIO framework. Signed-off-by: Matti Vaittinen Acked-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit e70982b3abec4fb6e2ce9489f071080ca84e4bc7 Author: Andy Shevchenko Date: Tue Nov 5 16:23:24 2019 +0200 pinctrl: baytrail: Move IRQ valid mask initialization to a dedicated callback There is a logical continuation of the commit 5fbe5b5883f8 ("gpio: Initialize the irqchip valid_mask with a callback") to split IRQ initialization to hardware and valid mask setup parts. Acked-by: Hans de Goede Acked-by: Mika Westerberg Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko commit a630a6121bef3e9598482a49eda6b1fa715385d6 Author: Fabrizio Castro Date: Wed Nov 13 15:51:30 2019 +0000 ARM: shmobile: defconfig: Enable support for panels from EDT The iwg20d comes with an LCD panel from Emerging Display Technologies Corporation (EDT), therefore enable what's required to support it. Signed-off-by: Fabrizio Castro Acked-by: Laurent Pinchart Link: https://lore.kernel.org/r/1573660292-10629-12-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 5f2cb361d798fb39adb79fab4e5235e307c70e9a Author: Takashi Iwai Date: Thu Dec 12 20:11:01 2019 +0100 ALSA: hda: Unify get_response handling Now most of the get_response handling became quite similar between HDA-core and legacy drivers, and the only differences are: - the handling of extra-long polling delay for some codecs - the debug message for the stalled communication and both are worth to share in the common code. This patch unifies the code into snd_hdac_bus_get_response(), and use this from the legacy get_response callback. It results in a good amount of code reduction in the end. Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20191212191101.19517-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 83772e1b44231e2965d9375515e664fc3bc1247c Author: Geert Uytterhoeven Date: Wed Dec 11 14:13:11 2019 +0100 arm64: dts: renesas: Rename r8a7796* to r8a77960* CONFIG_ARCH_R8A7796 was renamed to CONFIG_ARCH_R8A77960 in commit 39e57e14d7eaf818 ("soc: renesas: Add ARCH_R8A77960 for existing R-Car M3-W"), to avoid confusion between R-Car M3-W (R8A77960) and R-Car M3-W+ (R8A77961). Rename the DTS files as well, for consistency. Note that DT binding headers, definitions, and compatible values were not renamed, to preserve backward compatibility. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191211131311.23661-1-geert+renesas@glider.be Reviewed-by: Laurent Pinchart Reviewed-by: Eugeniu Rosca commit 89698ed5cc76d8de6c2b51d132c06bf4cd930314 Author: Takashi Iwai Date: Thu Dec 12 20:11:00 2019 +0100 ALSA: hda: Use waitqueue for RIRB in HDA-core helper, too This patch implements the same logic that was done for the legacy HD-audio controller driver by the commit 88452da92ba2 ("ALSA: hda: Use standard waitqueue for RIRB wakeup") to the HDA-core helper code, too. This makes snd_hdac_bus_get_response() waiting for the response with bus->rirb_wq instead of polling when bus->polling is false. It'll save both CPU time and response latency. Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20191212191101.19517-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 87924226737d33fa6651c0919243b29dff05a60e Author: Geert Uytterhoeven Date: Wed Dec 11 11:04:38 2019 +0100 arm64: dts: renesas: Remove use of ARCH_R8A7796 CONFIG_ARCH_R8A7796 was renamed to CONFIG_ARCH_R8A77960 in commit 39e57e14d7eaf818 ("soc: renesas: Add ARCH_R8A77960 for existing R-Car M3-W"), so its users can be removed. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191211100438.7094-1-geert+renesas@glider.be commit 24240845c87185fe5fde942a4122ac23e1ce9595 Author: Geert Uytterhoeven Date: Wed Dec 11 11:05:10 2019 +0100 soc: renesas: Remove ARCH_R8A7796 All users of CONFIG_ARCH_R8A7796 have been updated to use CONFIG_ARCH_R8A77960, so the former can be removed. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191211100510.7182-1-geert+renesas@glider.be commit 03975b72b4ac474f83edde145bcf152c7d2183cd Author: Geert Uytterhoeven Date: Wed Dec 11 11:02:20 2019 +0100 clk: renesas: Remove use of ARCH_R8A7796 CONFIG_ARCH_R8A7796 was renamed to CONFIG_ARCH_R8A77960 in commit 39e57e14d7eaf818 ("soc: renesas: Add ARCH_R8A77960 for existing R-Car M3-W"), so its users can be removed. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191211100220.6854-1-geert+renesas@glider.be commit 0cf24c8f29bb06551c38210b96f5ea99d908749a Author: Geert Uytterhoeven Date: Wed Dec 11 11:03:08 2019 +0100 pinctrl: sh-pfc: Remove use of ARCH_R8A7796 CONFIG_ARCH_R8A7796 was renamed to CONFIG_ARCH_R8A77960 in commit 39e57e14d7eaf818 ("soc: renesas: Add ARCH_R8A77960 for existing R-Car M3-W"), so its users can be removed. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191211100308.6958-1-geert+renesas@glider.be commit 55d54d1ee84e5980446b390154526d62bee24ca2 Author: Ulf Hansson Date: Fri Dec 6 18:08:13 2019 +0100 pinctrl: core: Add pinctrl_select_default_state() and export it It has turned out that some mmc host drivers, but perhaps also others drivers, needs to reset the pinctrl into the default state (PINCTRL_STATE_DEFAULT). However, they can't use the existing pinctrl_pm_select_default_state(), as that requires CONFIG_PM to be set. This leads to open coding, as they need to look up the default state themselves and then select it. To avoid the open coding, let's introduce pinctrl_select_default_state() and make it available independently of CONFIG_PM. As a matter of fact, this makes it more consistent with the behaviour of the driver core, as it already tries to looks up the default state during probe. Going forward, users of pinctrl_pm_select_default_state() are encouraged to move to pinctrl_select_default_state(), so the old API can be removed. Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20191206170821.29711-2-ulf.hansson@linaro.org Signed-off-by: Linus Walleij commit 86ca2bf2f9d3941c0ee6087604a3f6cc3efd12ae Author: Dan Carpenter Date: Fri Dec 13 13:50:50 2019 +0300 drm/i915/selftests: remove a condition We know that "err" is non-zero so there is no need to check. Signed-off-by: Dan Carpenter Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191213105050.y2v5nylsuxvc44jj@kili.mountain commit 163159aad74d3763b350861b879b41e8f64121fc Author: Ilie Halip Date: Tue Nov 26 16:45:44 2019 +0200 x86/boot: Discard .eh_frame sections When using GCC as compiler and LLVM's lld as linker, linking setup.elf fails: LD arch/x86/boot/setup.elf ld.lld: error: init sections too big! This happens because GCC generates .eh_frame sections for most of the files in that directory, then ld.lld places the merged section before __end_init, triggering an assert in the linker script. Fix this by discarding the .eh_frame sections, as suggested by Boris. The kernel proper linker script discards them too. [ bp: Going back in history, 64-bit kernel proper has been discarding .eh_frame since 2002: commit acca80acefe20420e69561cf55be64f16c34ea97 Author: Andi Kleen Date: Tue Oct 29 23:54:35 2002 -0800 [PATCH] x86-64 updates for 2.5.44 ... - Remove the .eh_frame on linking. This saves several hundred KB in the bzImage ] Suggested-by: Borislav Petkov Signed-off-by: Ilie Halip Signed-off-by: Borislav Petkov Reviewed-by: Nick Desaulniers Cc: clang-built-linux@googlegroups.com Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: x86-ml Link: https://lore.kernel.org/lkml/20191118175223.GM6363@zn.tnic/ Link: https://github.com/ClangBuiltLinux/linux/issues/760 Link: https://lkml.kernel.org/r/20191126144545.19354-1-ilie.halip@gmail.com commit 75d18496cf92f2bde86e0fdf103e4fb7423a3e55 Author: Jani Nikula Date: Tue Dec 3 18:38:52 2019 +0200 media: constify fb ops across all drivers Now that the fbops member of struct fb_info is const, we can start making the ops const as well. Remove the redundant fbops assignments while at it. v2: - actually add const in vivid - fix typo (Christophe de Dinechin) Cc: Hans Verkuil Cc: Andy Walls Cc: linux-media@vger.kernel.org Cc: ivtv-devel@ivtvdriver.org Reviewed-by: Daniel Vetter Reviewed-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/71794337f8611271f2c1fdb3882119a58e743a87.1575390741.git.jani.nikula@intel.com commit 1cfaef9617033f38eba9cc725809ed32bcdb3dc5 Author: Arnd Bergmann Date: Wed Nov 13 17:49:14 2019 +0100 ALSA: bump uapi version numbers Change SNDRV_PCM_VERSION, SNDRV_RAWMIDI_VERSION and SNDRV_TIMER_VERSION to indicate the addition of the time64 version of the mmap interface and these ioctl commands: SNDRV_PCM_IOCTL_SYNC SNDRV_RAWMIDI_IOCTL_STATUS SNDRV_PCM_IOCTL_STATUS SNDRV_PCM_IOCTL_STATUS_EXT SNDRV_TIMER_IOCTL_TREAD SNDRV_TIMER_IOCTL_STATUS 32-bit applications built with 64-bit time_t require both the headers and the running kernel to support at least the new API version. When built with earlier kernel headers, some of these may not work correctly, so applications are encouraged to fail compilation like #if SNDRV_PCM_VERSION < SNDRV_PROTOCOL_VERSION(2, 0, 15) extern int __fail_build_for_time_64[sizeof(long) - sizeof(time_t)]; #endif or provide their own updated copy of the header file. At runtime, the interface is unchanged for 32-bit time_t, but new kernels are required to work with user compiled with 64-bit time_t. A runtime check can be used to detect old kernel versions and warn about those. Signed-off-by: Arnd Bergmann commit 80fe7430c7085951d1246d83f638cc17e6c0be36 Author: Arnd Bergmann Date: Tue Apr 24 20:06:15 2018 +0800 ALSA: add new 32-bit layout for snd_pcm_mmap_status/control The snd_pcm_mmap_status and snd_pcm_mmap_control interfaces are one of the trickiest areas to get right when moving to 64-bit time_t in user space. The snd_pcm_mmap_status structure layout is incompatible with user space that uses a 64-bit time_t, so we need a new layout for it. Since the SNDRV_PCM_IOCTL_SYNC_PTR ioctl combines it with snd_pcm_mmap_control into snd_pcm_sync_ptr, we need to change those two as well. Both structures are also exported via an mmap() operation on certain architectures, and this suffers from incompatibility between 32-bit and 64-bit user space. As we have to change both structures anyway, this is a good opportunity to fix the mmap() problem as well, so let's standardize on the existing 64-bit layout of the structure where possible. The downside is that we lose mmap() support for existing 32-bit x86 and powerpc applications, adding that would introduce very noticeable runtime overhead and complexity. My assumption here is that not too many people will miss the removed feature, given that: - Almost all x86 and powerpc users these days are on 64-bit kernels, the majority of today's 32-bit users are on architectures that never supported mmap (ARM, MIPS, ...). - It never worked in compat mode (it was intentionally disabled there) - The application already needs to work with a fallback to SNDRV_PCM_IOCTL_SYNC_PTR, which will keep working with both the old and new structure layout. Both the ioctl() and mmap() based interfaces are changed at the same time, as they are based on the same structures. Unlike other interfaces, we change the uapi header to export both the traditional structure and a version that is portable between 32-bit and 64-bit user space code and that corresponds to the existing 64-bit layout. We further check the __USE_TIME_BITS64 macro that will be defined by future C library versions whenever we use the new time_t definition, so any existing user space source code will not see any changes until it gets rebuilt against a new C library. However, the new structures are all visible in addition to the old ones, allowing applications to explicitly request the new structures. In order to detect the difference between the old snd_pcm_mmap_status and the new __snd_pcm_mmap_status64 structure from the ioctl command number, we rely on one quirk in the structure definition: snd_pcm_mmap_status must be aligned to alignof(time_t), which leads the compiler to insert four bytes of padding in struct snd_pcm_sync_ptr after 'flags' and a corresponding change in the size of snd_pcm_sync_ptr itself. On x86-32 (and only there), the compiler doesn't use 64-bit alignment in structure, so I'm adding an explicit pad in the structure that has no effect on the existing 64-bit architectures but ensures that the layout matches for x86. The snd_pcm_uframes_t type compatibility requires another hack: we can't easily make that 64 bit wide, so I leave the type as 'unsigned long', but add padding before and after it, to ensure that the data is properly aligned to the respective 64-bit field in the in-kernel structure. For the SNDRV_PCM_MMAP_OFFSET_STATUS/CONTROL constants that are used as the virtual file offset in the mmap() function, we also have to introduce new constants that depend on hte __USE_TIME_BITS64 macro: The existing macros are renamed to SNDRV_PCM_MMAP_OFFSET_STATUS_OLD and SNDRV_PCM_MMAP_OFFSET_CONTROL_OLD, they continue to work fine on 64-bit architectures, but stop working on native 32-bit user space. The replacement _NEW constants are now used by default for user space built with __USE_TIME_BITS64, those now work on all new kernels for x86, ppc and alpha (32 and 64 bit, native and compat). It might be a good idea for a future alsa-lib to support both the _OLD and _NEW macros and use the corresponding structures directly. Unmodified alsa-lib source code will retain the current behavior, so it will no longer be able to use mmap() for the status/control structures on 32-bit systems, until either the C library gets updated to 64-bit time_t or alsa-lib gets updated to support both mmap() layouts. Co-developed-with: Baolin Wang Signed-off-by: Baolin Wang Signed-off-by: Arnd Bergmann commit 09d94175dbeac12d38b1599a02c7000a5e51b4cb Author: Arnd Bergmann Date: Tue Apr 24 20:06:14 2018 +0800 ALSA: move snd_pcm_ioctl_sync_ptr_compat into pcm_native.c This is a preparation patch, moving the compat handler for snd_pcm_ioctl_sync_ptr_compat from pcm_compat.c to pcm_native.c. No other changes are indented. Signed-off-by: Arnd Bergmann Signed-off-by: Baolin Wang Signed-off-by: Arnd Bergmann commit 07094ae6f9527279de6fd0c59e88f6d0423585b1 Author: Baolin Wang Date: Tue Apr 24 20:06:13 2018 +0800 ALSA: Avoid using timespec for struct snd_timer_tread The struct snd_timer_tread will use 'timespec' type variables to record timestamp, which is not year 2038 safe on 32bits system. Since the struct snd_timer_tread is passed through read() rather than ioctl(), and the read syscall has no command number that lets us pick between the 32-bit or 64-bit version of this structure. Thus we introduced one new command SNDRV_TIMER_IOCTL_TREAD64 and new struct snd_timer_tread64 replacing timespec with s64 type to handle 64bit time_t. That means we will set tu->tread = TREAD_FORMAT_64BIT when user space has a 64bit time_t, then we will copy to user with struct snd_timer_tread64. Otherwise we will use 32bit time_t variables when copying to user. Moreover this patch replaces timespec type with timespec64 type and related y2038 safe APIs. Signed-off-by: Baolin Wang Signed-off-by: Arnd Bergmann commit 894731a5c9d0ea801a7ea1aba2f7c7b69fef6e85 Author: Geert Uytterhoeven Date: Thu Dec 5 14:39:12 2019 +0100 dt-bindings: gpio: rcar: Document r8a77961 support Document support for the GPIO controller in the Renesas R-Car M3-W+ (R8A77961) SoC. Update all references to R-Car M3-W from "r8a7796" to "r8a77960", to avoid confusion between R-Car M3-W (R8A77960) and M3-W+. No driver update is needed. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191205133912.6048-1-geert+renesas@glider.be Signed-off-by: Linus Walleij commit 36be91112fbfd7402c62e96d53c091c8936ebd56 Author: Robin Murphy Date: Thu Nov 28 20:59:27 2019 +0000 arm64: dts: rockchip: Add GPU cooling device for RK3399 As for RK3288, now that we have a binding for the GPU we can hook up the missing cooling device for the thermal zone. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/cb905e17526d846d6d35fb86fbd3c8ba4af4cdaf.1574974673.git.robin.murphy@arm.com Signed-off-by: Heiko Stuebner commit cfd66c682e8b6a6411bca77395f1b305b97022fb Author: Matwey V. Kornilov Date: Wed Nov 20 19:12:54 2019 +0300 arm64: dts: rockchip: Add regulators for PCIe for Radxa Rock Pi 4 board Add 0.9V and 1.8V voltage regulators for Radxa Rock Pi 4 board PCIe. Signed-off-by: Matwey V. Kornilov Link: https://lore.kernel.org/r/20191120161302.5157-1-matwey@sai.msu.ru Signed-off-by: Heiko Stuebner commit 4fc5bfeb4b7d8306be6ed828df2cb5bdd14e3ed1 Author: Andy Shevchenko Date: Wed Dec 4 21:42:29 2019 +0200 gpiolib: Make use of assign_bit() API We have for some time the assign_bit() API to replace open coded if (foo) set_bit(n, bar); else clear_bit(n, bar); Use this API in GPIO library code. No functional change intended. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20191204194229.64251-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 04a0077fdb197f0ba284b9d5e5d114206484661e Author: Markus Reichl Date: Tue Dec 10 13:44:38 2019 +0100 arm64: dts: rockchip: Remove always-on properties from regulator nodes on rk3399-roc-pc. Some regulators don't need the always-on property, remove it. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/f985665c-86c0-1657-14f8-f77e2ce5a3f7@fivetechno.de Signed-off-by: Heiko Stuebner commit f14bf6a350dfd6613dbf91be5b423bc7eab690da Author: Shile Zhang Date: Wed Dec 4 08:46:33 2019 +0800 x86/unwind/orc: Remove boot-time ORC unwind tables sorting Now that the orc_unwind and orc_unwind_ip tables are sorted at build time, remove the boot time sorting pass. No change in functionality. [ mingo: Rewrote the changelog and code comments. ] Signed-off-by: Shile Zhang Acked-by: Peter Zijlstra (Intel) Cc: Josh Poimboeuf Cc: Masahiro Yamada Cc: Peter Zijlstra Cc: linux-kbuild@vger.kernel.org Link: https://lkml.kernel.org/r/20191204004633.88660-8-shile.zhang@linux.alibaba.com Signed-off-by: Ingo Molnar commit 57fa1899428538e314a7e0d52a5b617af082389a Author: Shile Zhang Date: Wed Dec 4 08:46:32 2019 +0800 scripts/sorttable: Implement build-time ORC unwind table sorting The ORC unwinder has two tables: .orc_unwind_ip and .orc_unwind, which need to be sorted for binary search. Previously this sorting was done during bootup. Sort them at build time to speed up booting. Add the ORC tables sorting in a parallel build process to speed up the build. [ mingo: Rewrote the changelog and fixed some comments. ] Suggested-by: Andy Lutomirski Suggested-by: Peter Zijlstra Reported-by: kbuild test robot Signed-off-by: Shile Zhang Acked-by: Peter Zijlstra (Intel) Cc: Josh Poimboeuf Cc: Masahiro Yamada Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Link: https://lkml.kernel.org/r/20191204004633.88660-7-shile.zhang@linux.alibaba.com Signed-off-by: Ingo Molnar commit 1091670637be8bd34a39dd1ddcc0a10a7c88d4e2 Author: Shile Zhang Date: Wed Dec 4 08:46:31 2019 +0800 scripts/sorttable: Rename 'sortextable' to 'sorttable' Use a more generic name for additional table sorting usecases, such as the upcoming ORC table sorting feature. This tool is not tied to exception table sorting anymore. No functional changes intended. [ mingo: Rewrote the changelog. ] Signed-off-by: Shile Zhang Acked-by: Peter Zijlstra (Intel) Cc: Josh Poimboeuf Cc: Masahiro Yamada Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Link: https://lkml.kernel.org/r/20191204004633.88660-6-shile.zhang@linux.alibaba.com Signed-off-by: Ingo Molnar commit 57cafdf2a04e161b9654c4ae3888a7549594c499 Author: Shile Zhang Date: Wed Dec 4 08:46:30 2019 +0800 scripts/sortextable: Refactor the do_func() function Refine the loop, naming and code structure, make the code more readable and extendable. No functional changes intended. Signed-off-by: Shile Zhang Acked-by: Peter Zijlstra (Intel) Cc: Josh Poimboeuf Cc: Masahiro Yamada Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Link: https://lkml.kernel.org/r/20191204004633.88660-5-shile.zhang@linux.alibaba.com Signed-off-by: Ingo Molnar commit abe4f92ca8948a3e04c56788354933c326909acb Author: Shile Zhang Date: Wed Dec 4 08:46:29 2019 +0800 scripts/sortextable: Remove dead code Signed-off-by: Shile Zhang Acked-by: Peter Zijlstra (Intel) Cc: Josh Poimboeuf Cc: Masahiro Yamada Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Link: https://lkml.kernel.org/r/20191204004633.88660-4-shile.zhang@linux.alibaba.com Signed-off-by: Ingo Molnar commit 6402e1416255a7bb94834925ba0255c750f54a2d Author: Shile Zhang Date: Wed Dec 4 08:46:28 2019 +0800 scripts/sortextable: Clean up the code to meet the kernel coding style better Fix various style errors and inconsistencies, no functional changes intended. Signed-off-by: Shile Zhang Acked-by: Peter Zijlstra (Intel) Cc: Josh Poimboeuf Cc: Masahiro Yamada Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Link: https://lkml.kernel.org/r/20191204004633.88660-3-shile.zhang@linux.alibaba.com Signed-off-by: Ingo Molnar commit 3c47b787b6516d2c3cbaa193fe13a83adbaaad1f Author: Shile Zhang Date: Wed Dec 4 08:46:27 2019 +0800 scripts/sortextable: Rewrite error/success handling The scripts/sortextable.c code has originally copied some code from scripts/recordmount.c, which used the same setjmp/longjmp method to manage control flow. Meanwhile recordmcount has improved its error handling via: 3f1df12019f3 ("recordmcount: Rewrite error/success handling"). So rewrite this part of sortextable as well to get rid of the setjmp/longjmp kludges, with additional refactoring, to make it more readable and easier to extend. No functional changes intended. [ mingo: Rewrote the changelog. ] Signed-off-by: Shile Zhang Acked-by: Peter Zijlstra (Intel) Cc: Josh Poimboeuf Cc: Masahiro Yamada Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Link: https://lkml.kernel.org/r/20191204004633.88660-2-shile.zhang@linux.alibaba.com Signed-off-by: Ingo Molnar commit e964d463392d70d801c15f83d02e61671f35d549 Author: Jack Chen Date: Mon Dec 2 23:35:40 2019 +0800 ARM: dts: rockchip: Add missing cpu operating points for rk3288-tinker The Tinker Board / S devices use a special chip variant called rk3288-c and use different operating points with a higher max frequency. So add the missing operating points for Tinker Board / S devices, also increase the vdd_cpu regulator-max-microvolt to 1400000 uV so that the cpu can operate at 1.8 GHz. Signed-off-by: Jack Chen Reviewed-by: Kever Yang Link: https://lore.kernel.org/r/20191202153540.26143-1-redchenjs@foxmail.com Signed-off-by: Heiko Stuebner commit c16485ad8e023b2188d19f0ace3bc2af500884e1 Author: Paul Kocialkowski Date: Tue Dec 3 15:12:43 2019 +0100 gpio: Add support for the Xylon LogiCVC GPIOs The LogiCVC display hardware block comes with GPIO capabilities that must be exposed separately from the main driver (as GPIOs) for use with regulators and panels. A syscon is used to share the same regmap across the two drivers. Add a minimalistic GPIO driver to drive these GPIOs, using a syscon regmap when available. Signed-off-by: Paul Kocialkowski Link: https://lore.kernel.org/r/20191203141243.251058-5-paul.kocialkowski@bootlin.com Signed-off-by: Linus Walleij commit 6bdbe62c748c4b8cfe3555bb9b1daecc0d1e585a Author: Paul Kocialkowski Date: Tue Dec 3 15:12:42 2019 +0100 dt-bindings: gpio: Document the Xylon LogiCVC GPIO controller The Xylon LogiCVC display controller exports some GPIOs, which are exposed as a separate entity. Signed-off-by: Paul Kocialkowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191203141243.251058-4-paul.kocialkowski@bootlin.com Signed-off-by: Linus Walleij commit e10781c118c986a3eb7c4b2edb4bdaba37bb5635 Author: Paul Kocialkowski Date: Tue Dec 3 15:12:41 2019 +0100 dt-bindings: mfd: Document the Xylon LogiCVC multi-function device The LogiCVC is a display engine which also exposes GPIO functionality. For this reason, it is described as a multi-function device that is expected to provide register access to its children nodes for gpio and display. Signed-off-by: Paul Kocialkowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191203141243.251058-3-paul.kocialkowski@bootlin.com Signed-off-by: Linus Walleij commit 885503fbea210bc8f4ac70fa530ed05fade4bc94 Author: Paul Kocialkowski Date: Tue Dec 3 15:12:40 2019 +0100 dt-bindings: Add Xylon vendor prefix Xylon is an electronics company that produces FPGA hardware block designs optimized for Xilinx FPGAs. Signed-off-by: Paul Kocialkowski Acked-by: Rob Herring Link: https://lore.kernel.org/r/20191203141243.251058-2-paul.kocialkowski@bootlin.com Signed-off-by: Linus Walleij commit 15711ba6ff197c3152c655dd9c55f5c1694e8272 Author: Johnny Huang Date: Mon Dec 2 16:44:32 2019 +1030 pinctrl: aspeed-g6: Add AST2600 pinconf support The AST2600 pinconf is a little different from previous generations of ASPEED BMC SoCs in terms of architecture. The pull-down setting is per-pin setting now, and drive-strength support 4 kind of value (e.g. 4ma, 8ma, 12ma, 16ma). Signed-off-by: Johnny Huang [AJ: Trim unused pinctrl register macros] Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20191202061432.3996-8-andrew@aj.id.au Signed-off-by: Linus Walleij commit 5f52c853847ffdc9654e5b685e1a1ae5bee83e65 Author: Johnny Huang Date: Mon Dec 2 16:44:31 2019 +1030 pinctrl: aspeed: Use masks to describe pinconf bitfields Since some of the AST2600 pinconf setting are not just single bit, modified aspeed_pin_config @bit to @mask and add @mask to aspeed_pin_config_map to support configuring multiple bits. Signed-off-by: Johnny Huang [AJ: Tweak commit message] Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20191202061432.3996-7-andrew@aj.id.au Signed-off-by: Linus Walleij commit 5b854f2842458d2bbb2a49c20d958c9f6f610465 Author: Johnny Huang Date: Mon Dec 2 16:44:30 2019 +1030 pinctrl: aspeed: Move aspeed_pin_config_map to separate source file The AST2600 pinconf differs from the 2400 and 2500, aspeed_pin_config_map should define separately, and add @confmaps and @nconfmaps to aspeed_pinctrl_data structure for that change. Signed-off-by: Johnny Huang Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20191202061432.3996-6-andrew@aj.id.au Signed-off-by: Linus Walleij commit a79bcd51ae06b134c97d1fa707b7c7385d2d61af Author: Johnny Huang Date: Mon Dec 2 16:44:29 2019 +1030 pinctrl: aspeed: Add ASPEED_SB_PINCONF() helper This helper macro is for declaring single bit (SB) mask pinconf, and is used to prepare for modifying aspeed_pin_config structure, the aspeed_pin_config structure @bit variable will be modified to @mask. This case is common in the AST2400/AST2500 which the mask is a single bit. Signed-off-by: Johnny Huang Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20191202061432.3996-5-andrew@aj.id.au Signed-off-by: Linus Walleij commit 22d6919039838226d2041cc22e279985b4230f64 Author: Johnny Huang Date: Mon Dec 2 16:44:28 2019 +1030 pinctrl: aspeed-g6: Add support for the AST2600 USB pinmux AST2600 has two USB ports, A, B: Port A supports 4 distinct modes: 1. PCIe EHCI to Hub 2. Hub to PHY 3. BMC EHCI to PHY 4. PCIe EHCI to PHY Port B support 3 modes: 1. USB1.1 HID controller 2. USB2.0 Device controller 3. BMC EHCI port2 Implement pinmux support by mapping each ports' functions onto a single pin group for each port. Signed-off-by: Johnny Huang Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20191202061432.3996-4-andrew@aj.id.au Signed-off-by: Linus Walleij commit 8b99fb9feb0149fd1dc80552b50993137d75611a Author: Johnny Huang Date: Mon Dec 2 16:44:27 2019 +1030 pinctrl: aspeed-g6: Add AST2600 I3C1 and I3C2 pinmux config These pins only expose a single function but are not fixed-function as their I3C capability can be disabled. Signed-off-by: Johnny Huang [AJ: Tweak commit message, sort pins list] Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20191202061432.3996-3-andrew@aj.id.au Signed-off-by: Linus Walleij commit 6f0ebdf45c0bb74cf004f6e195f31882bfbf058b Author: Andrew Jeffery Date: Mon Dec 2 16:44:26 2019 +1030 dt-bindings: pinctrl: aspeed-g6: Add USB functions and groups The AST2600 provides two USB ports (A and B) that expose various host, device and HID functions. Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20191202061432.3996-2-andrew@aj.id.au Signed-off-by: Linus Walleij commit da090bf60370c9ad6ede4e76adbf37ce79b84791 Author: Takashi Iwai Date: Tue Dec 10 14:58:49 2019 +0100 media: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Bluecherry Maintainers Cc: Anton Sviridenko Cc: Andrey Utkin Cc: Ismael Luceno Cc: Ezequiel Garcia Signed-off-by: Takashi Iwai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3028bc2dbf128635a2b50d217f52fa7ddfda1f7d Author: Takashi Iwai Date: Tue Dec 10 14:58:48 2019 +0100 media: ivtv: Drop superfluous ioctl PCM ops snd_ivtv_pcm_ioctl() does nothing but calling the default handler. Now PCM core accepts NULL as the default ioctl ops, so let's drop altogether. Cc: Andy Walls Signed-off-by: Takashi Iwai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 86ee7f28462a63b50273b40291c72d6c27e2975f Author: Takashi Iwai Date: Tue Dec 10 14:58:47 2019 +0100 media: cx18: Drop superfluous ioctl PCM ops snd_cx18_pcm_ioctl() does nothing but calling the default handler. Now PCM core accepts NULL as the default ioctl ops, so let's drop altogether. Cc: Andy Walls Signed-off-by: Takashi Iwai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6fe350864297d28f7e4dcf84e2738b550971c610 Author: Takashi Iwai Date: Tue Dec 10 14:58:46 2019 +0100 media: cobalt: Drop superfluous ioctl PCM ops snd_cobalt_pcm_ioctl() does nothing but calling the default handler. Now PCM core accepts NULL as the default ioctl ops, so let's drop altogether. Signed-off-by: Takashi Iwai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f8239b531f0d2e93c211ad6528e36f9294f43bbe Author: Takashi Iwai Date: Tue Dec 10 14:58:45 2019 +0100 media: tm6000: Clean up ALSA PCM API usages With the recent change in ALSA PCM core, the whole open-coded vmalloc buffer handling in this driver can be dropped by replacing with the managed buffer allocation. Also, snd_tm6000_capture_free() is dropped since the check of stream_started flag makes no sense; hw_free callback is guaranteed to be called after the stream gets stopped. Signed-off-by: Takashi Iwai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2d19a2cd804b8cc934142473b6a170259c8de058 Author: Takashi Iwai Date: Tue Dec 10 14:58:44 2019 +0100 media: go7007: Clean up ALSA PCM API usages With the recent change in ALSA PCM core, the whole open-coded vmalloc buffer handling in this driver can be dropped by replacing with the managed buffer allocation. Signed-off-by: Takashi Iwai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2abb1b2daf88eeace02f798424d96535c990352f Author: Takashi Iwai Date: Tue Dec 10 14:58:43 2019 +0100 media: em28xx: Clean up ALSA PCM API usages With the recent change in ALSA PCM core, the whole open-coded vmalloc buffer handling in this driver can be dropped by replacing with the managed buffer allocation. Also, snd_em28xx_hw_capture_free() is dropped since the check of stream_started flag makes no sense; hw_free callback is guaranteed to be called after the stream gets stopped. Signed-off-by: Takashi Iwai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 355b9a0c5856695e2335935a8c94fcb17b3b6dbb Author: Takashi Iwai Date: Tue Dec 10 14:58:42 2019 +0100 media: cs231xx: Clean up ALSA PCM API usages With the recent change in ALSA PCM core, the whole open-coded vmalloc buffer handling in this driver can be dropped by replacing with the managed buffer allocation. Also, snd_cx231xx_hw_capture_free() is dropped since the check of stream_started flag makes no sense; hw_free callback is guaranteed to be called after the stream gets stopped. Signed-off-by: Takashi Iwai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7ffeb6ceda5e7da48e7838c3d105d68b643c65ef Author: Takashi Iwai Date: Tue Dec 10 14:58:41 2019 +0100 media: ivtv: Clean up ALSA PCM API usages With the recent change in ALSA PCM core, the whole open-coded vmalloc buffer handling in this driver can be dropped by replacing with the managed buffer allocation. Cc: Andy Walls Signed-off-by: Takashi Iwai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b0cda3739759a90e8d37175eca35e75e727c9436 Author: Takashi Iwai Date: Tue Dec 10 14:58:40 2019 +0100 media: cx18: Clean up ALSA PCM API usages With the recent change in ALSA PCM core, the whole open-coded vmalloc buffer handling in this driver can be dropped by replacing with the managed buffer allocation. Cc: Andy Walls Signed-off-by: Takashi Iwai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit aeb64ff383901a7ecb637d48b44c2e6e9a4b8f11 Author: Takashi Iwai Date: Tue Dec 10 14:58:39 2019 +0100 media: cobalt: Clean up ALSA PCM API usages With the recent change in ALSA PCM core, the whole open-coded vmalloc buffer handling in this driver can be dropped by replacing with the managed buffer allocation. Signed-off-by: Takashi Iwai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8079c5d5868511fe4ce6afca02937c94ff31ed24 Author: Takashi Iwai Date: Tue Dec 10 14:58:38 2019 +0100 media: usbtv: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and dropped. Signed-off-by: Takashi Iwai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5e625dd5792ea7ea0bf462f4f13a2dc6d8183058 Author: Takashi Iwai Date: Tue Dec 10 14:58:37 2019 +0100 media: tw686x: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and dropped. Cc: Ezequiel Garcia Signed-off-by: Takashi Iwai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a98e2e229da776bbc8fa90b7311aab0ba05686bb Author: Takashi Iwai Date: Tue Dec 10 14:58:36 2019 +0100 media: solo6x10: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and dropped. Cc: Bluecherry Maintainers Cc: Anton Sviridenko Cc: Andrey Utkin Cc: Ismael Luceno Signed-off-by: Takashi Iwai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9453264ef58638ce8976121ac44c07a3ef375983 Author: Chuhong Yuan Date: Tue Dec 10 04:15:48 2019 +0100 media: go7007: fix a miss of snd_card_free go7007_snd_init() misses a snd_card_free() in an error path. Add the missed call to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c7669435119f7b548bde3d4d093888a6c537e4e0 Author: Benoit Parrot Date: Fri Dec 6 20:51:32 2019 +0100 media: ti-vpe: csc: fix single vs multiplanar format handling In csc_set_coeff() we were previously checking if the format type was V4L2_BUF_TYPE_VIDEO_OUTPUT or V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE as a mean to figure out if the format was multiplanar or not. This was not entirely accurate as the format type could also be a CAPTURE type instead. Fix this by removing the 'switch' construct and replacing them with "if (V4L2_TYPE_IS_MULTIPLANAR(type))" instead. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 887c7942ce31dcffecf53897598c766602f5e6f5 Author: Hans Verkuil Date: Thu Dec 5 16:07:39 2019 +0100 media: cec-ioc-g-mode.rst: remove trailing 'i' Remove spurious trailing 'i'. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 11e0e167d071a28288a7a0a211d48c571d19b56f Author: Colin Ian King Date: Wed Dec 4 15:11:59 2019 +0100 media: meson: add missing allocation failure check on new_buf Currently if the allocation of new_buf fails then a null pointer dereference occurs when assiging new_buf->vb. Avoid this by returning early on a memory allocation failure as there is not much more can be done at this point. Addresses-Coverity: ("Dereference null return") Fixes: 3e7f51bd9607 ("media: meson: add v4l2 m2m video decoder driver") Signed-off-by: Colin Ian King Reviewed-by: Kevin Hilman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 55f240a21eb13717da2872ebef2eb0af4007a5bd Author: Hans Verkuil Date: Wed Dec 4 12:57:10 2019 +0100 media: ivtv/cx18: remove ivtvdriver.org references That URL is no longer valid, so either remove references to it or replace it with linuxtv.org. Rather than updating the URL I've just dropped the cx18.rst driver documentation since it was really out of date. Signed-off-by: Hans Verkuil Acked-by: awalls@md.metrocast.net Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2b016c47f48f3d144816645822a09995063313a1 Author: Daniel Gomez Date: Tue Dec 3 16:12:00 2019 +0100 media: v4l2: Fix fourcc names for BAYER12P Fix documentation fourcc names for the 12-bit packed Bayer formats. Signed-off-by: Daniel Gomez Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 373606320834a998f4aa48ea66673ac8103db270 Author: Chuhong Yuan Date: Tue Dec 3 12:13:24 2019 +0100 media: pxa_camera: add missed tasklet_kill This driver forgets to kill tasklet when probe fails and remove. Add the calls to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7b575b6d8de03ca6b6ab85fa1dd53d2ce921a4a0 Author: Hans Verkuil Date: Mon Dec 2 12:46:17 2019 +0100 media: vidioc-g-dv-timings.rst: fix wrong porch It is the vfrontporch of field 1 that is one half-line longer, not the backporch. The order of the vertical signals in an interlaced system is: Field 1: vsync vbackporch active video of field 1 vfrontporch + 0.5 Field 2: il_vsync il_vbackporch - 0.5 active video of field 2 il_vfrontporch Interlaced systems that use HALF_LINE set the il_ fields as follows: il_vfrontporch = vfrontporch il_vsync = vsync il_vbackporch = vbackporch + 1 So the total vertical blanking for field 1 is: vsync + vbackporch + vfrontporch + 0.5 and for field 2: vsync + vbackporch + 1 + vfrontporch - 0.5 == vsync + vbackporch + vfrontporch + 0.5 So each field has the same number of half-lines. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3d15c7643ba78b71c5c8fae25d7d9af52442882a Author: Vandana BN Date: Tue Nov 26 15:16:50 2019 +0100 media: vivid: Add touch support Support to emulate touch devices in vivid driver. It generates touch patterns simulating single tap, double tap, triple tap, move from left to right, zoom in, zoom out, palm press simulating large area being pressed on screen, and simulating 16 different simultaneous touch points.The values generated are based on behavior of the rmi_f54 driver. Signed-off-by: Vandana BN Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8c956f3be17eaed62edb055a0fbce15e3080d953 Author: Chuhong Yuan Date: Mon Nov 18 12:40:41 2019 +0100 media: usb: go7007: s2250-board: add missed i2c_unregister_device The driver forgets to call i2c_unregister_device in remove like what is done in probe failure. Add the missed call to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dc4cac67e13515835ed8081d510aa507aacb013b Author: Forest Crossman Date: Sat Nov 16 23:38:40 2019 +0100 media: cx23885: Add support for AVerMedia CE310B The AVerMedia CE310B is a simple composite + S-Video + stereo audio capture card, and uses only the CX23888 to perform all of these functions. I've tested both video inputs and the audio interface and confirmed that they're all working. However, there are some issues: * Sometimes when I switch inputs the video signal turns black and can't be recovered until the system is rebooted. I haven't been able to determine the cause of this behavior, nor have I found a solution to fix it or any workarounds other than rebooting. * The card sometimes seems to have trouble syncing to the video signal, and some of the VBI data appears as noise at the top of the frame, but I assume that to be a result of my very noisy RF environment and the card's unshielded input traces rather than a configuration issue. Signed-off-by: Forest Crossman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 76669f2e7c5812e884f37b213b6fe8b369ca4333 Author: Chuhong Yuan Date: Wed Nov 13 07:37:59 2019 +0100 media: platform: mtk-mdp: add missed destroy_workqueue in remove The driver misses destroying wdt_wq when remove like what is done when probe fails. Add the missed calls like what is done to job_wq to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8ea1c5af489a76275bab36ad378452be18210c77 Author: Chuhong Yuan Date: Wed Nov 13 07:37:30 2019 +0100 media: bdisp: add missed destroy_workqueue in remove and probe failure The driver forgets to call destroy_workqueue when remove and probe fails. Add the missed calls to fix it. Signed-off-by: Chuhong Yuan Reviewed-by: Fabien Dessenne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 569bc8d6a6a50acb5fcf07fb10b8d2d461fdbf93 Author: Hans Verkuil Date: Tue Nov 12 10:22:28 2019 +0100 media: dvb-usb/dvb-usb-urb.c: initialize actlen to 0 This fixes a syzbot failure since actlen could be uninitialized, but it was still used. Syzbot link: https://syzkaller.appspot.com/bug?extid=6bf9606ee955b646c0e1 Reported-and-tested-by: syzbot+6bf9606ee955b646c0e1@syzkaller.appspotmail.com Signed-off-by: Hans Verkuil Acked-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit de89d0864f66c2a1b75becfdd6bf3793c07ce870 Author: Hans Verkuil Date: Tue Nov 12 10:22:24 2019 +0100 media: gspca: zero usb_buf Allocate gspca_dev->usb_buf with kzalloc instead of kmalloc to ensure it is property zeroed. This fixes various syzbot errors about uninitialized data. Syzbot links: https://syzkaller.appspot.com/bug?extid=32310fc2aea76898d074 https://syzkaller.appspot.com/bug?extid=99706d6390be1ac542a2 https://syzkaller.appspot.com/bug?extid=64437af5c781a7f0e08e Reported-and-tested-by: syzbot+32310fc2aea76898d074@syzkaller.appspotmail.com Reported-and-tested-by: syzbot+99706d6390be1ac542a2@syzkaller.appspotmail.com Reported-and-tested-by: syzbot+64437af5c781a7f0e08e@syzkaller.appspotmail.com Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit aab7b7d19d038c198d2a17748d9b2aa69a28d0dc Author: Wolfram Sang Date: Sun Nov 10 15:36:07 2019 +0100 media: v4l2-subdev: remove wrong @cond from kdocs v4l2_subdev_call() is unconditional, so don't mention in the docs a @cond parameter which does not exist. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0d962e061abcf1b9105f88fb850158b5887fbca3 Author: Gustavo A. R. Silva Date: Tue Oct 22 15:25:22 2019 +0200 media: i2c: adv748x: Fix unsafe macros Enclose multiple macro parameters in parentheses in order to make such macros safer and fix the Clang warning below: drivers/media/i2c/adv748x/adv748x-afe.c:452:12: warning: operator '?:' has lower precedence than '|'; '|' will be evaluated first [-Wbitwise-conditional-parentheses] ret = sdp_clrset(state, ADV748X_SDP_FRP, ADV748X_SDP_FRP_MASK, enable ? ctrl->val - 1 : 0); Fixes: 3e89586a64df ("media: i2c: adv748x: add adv748x driver") Reported-by: Dmitry Vyukov Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c4e8f760581b8607a1989acb8925be25d6628760 Author: Hans Verkuil Date: Sat Dec 7 23:43:23 2019 +0100 media: pulse8-cec: fix lost cec_transmit_attempt_done() call The periodic PING command could interfere with the result of a CEC transmit, causing a lost cec_transmit_attempt_done() call. Signed-off-by: Hans Verkuil Cc: # for v4.10 and up Signed-off-by: Mauro Carvalho Chehab commit d51224b73d18d207912f15ad4eb7a4b456682729 Author: Hans Verkuil Date: Wed Dec 11 12:47:57 2019 +0100 media: cec: check 'transmit_in_progress', not 'transmitting' Currently wait_event_interruptible_timeout is called in cec_thread_func() when adap->transmitting is set. But if the adapter is unconfigured while transmitting, then adap->transmitting is set to NULL. But the hardware is still actually transmitting the message, and that's indicated by adap->transmit_in_progress and we should wait until that is finished or times out before transmitting new messages. As the original commit says: adap->transmitting is the userspace view, adap->transmit_in_progress reflects the hardware state. However, if adap->transmitting is NULL and adap->transmit_in_progress is true, then wait_event_interruptible is called (no timeout), which can get stuck indefinitely if the CEC driver is flaky and never marks the transmit-in-progress as 'done'. So test against transmit_in_progress when deciding whether to use the timeout variant or not, instead of testing against adap->transmitting. Signed-off-by: Hans Verkuil Fixes: 32804fcb612b ("media: cec: keep track of outstanding transmits") Cc: # for v4.19 and up Signed-off-by: Mauro Carvalho Chehab commit 4be77174c3fafc450527a0c383bb2034d2db6a2d Author: Hans Verkuil Date: Sat Dec 7 23:48:09 2019 +0100 media: cec: avoid decrementing transmit_queue_sz if it is 0 WARN if transmit_queue_sz is 0 but do not decrement it. The CEC adapter will become unresponsive if it goes below 0 since then it thinks there are 4 billion messages in the queue. Obviously this should not happen, but a driver bug could cause this. Signed-off-by: Hans Verkuil Cc: # for v4.12 and up Signed-off-by: Mauro Carvalho Chehab commit 01d4fb115470e9f88a58975fe157a9e8b214dfe5 Author: Hans Verkuil Date: Wed Dec 4 08:52:08 2019 +0100 media: cec: CEC 2.0-only bcast messages were ignored Some messages are allowed to be a broadcast message in CEC 2.0 only, and should be ignored by CEC 1.4 devices. Unfortunately, the check was wrong, causing such messages to be marked as invalid under CEC 2.0. Signed-off-by: Hans Verkuil Cc: # for v4.10 and up Signed-off-by: Mauro Carvalho Chehab commit 8c8a854d6f43aacfaba49c116c426913bf416419 Author: Dan Carpenter Date: Thu Dec 12 12:11:30 2019 +0300 drm/i915/bios: fix off by one in parse_generic_dtd() The "num_dtd" variable is the number of elements in the generic_dtd->dtd[] array so the > needs to be >= to prevent reading one element beyond the end of the array. Fixes: 33ef6d4fd8df ("drm/i915/vbt: Handle generic DTD block") Reviewed-by: Matt Roper Signed-off-by: Dan Carpenter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191212091130.zf2g53njf5u24wk6@kili.mountain commit 1f4782ae2457cdd5b0e4fa0c897b5c5883cc0392 Merge: 355979decf07 d8968eda7fc4 Author: David S. Miller Date: Thu Dec 12 21:39:14 2019 -0800 Merge branch 'netdev-ndo_tx_timeout-cleanup' Michael S. Tsirkin says: ==================== netdev: ndo_tx_timeout cleanup Yet another forward declaration I missed. Hopfully the last one ... A bunch of drivers want to know which tx queue triggered a timeout, and virtio wants to do the same. We actually have the info to hand, let's just pass it on to drivers. Note: tested with an experimental virtio patch by Julio. That patch itself isn't ready yet though, so not included. Other drivers compiled only. ==================== Signed-off-by: David S. Miller commit d8968eda7fc433e553c3a9b482014d8493554729 Author: Michael S. Tsirkin Date: Tue Dec 10 09:26:00 2019 -0500 netronome: use the new txqueue timeout argument Signed-off-by: Michael S. Tsirkin Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 77656c277cbfe99eaad7217de29164794cacdc63 Author: Michael S. Tsirkin Date: Tue Dec 10 09:23:55 2019 -0500 mlx4: use new txqueue timeout argument Signed-off-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit 0290bd291cc0e0488e35e66bf39efcd7d9d9122b Author: Michael S. Tsirkin Date: Tue Dec 10 09:23:51 2019 -0500 netdev: pass the stuck queue to the timeout handler This allows incrementing the correct timeout statistic without any mess. Down the road, devices can learn to reset just the specific queue. The patch was generated with the following script: use strict; use warnings; our $^I = '.bak'; my @work = ( ["arch/m68k/emu/nfeth.c", "nfeth_tx_timeout"], ["arch/um/drivers/net_kern.c", "uml_net_tx_timeout"], ["arch/um/drivers/vector_kern.c", "vector_net_tx_timeout"], ["arch/xtensa/platforms/iss/network.c", "iss_net_tx_timeout"], ["drivers/char/pcmcia/synclink_cs.c", "hdlcdev_tx_timeout"], ["drivers/infiniband/ulp/ipoib/ipoib_main.c", "ipoib_timeout"], ["drivers/infiniband/ulp/ipoib/ipoib_main.c", "ipoib_timeout"], ["drivers/message/fusion/mptlan.c", "mpt_lan_tx_timeout"], ["drivers/misc/sgi-xp/xpnet.c", "xpnet_dev_tx_timeout"], ["drivers/net/appletalk/cops.c", "cops_timeout"], ["drivers/net/arcnet/arcdevice.h", "arcnet_timeout"], ["drivers/net/arcnet/arcnet.c", "arcnet_timeout"], ["drivers/net/arcnet/com20020.c", "arcnet_timeout"], ["drivers/net/ethernet/3com/3c509.c", "el3_tx_timeout"], ["drivers/net/ethernet/3com/3c515.c", "corkscrew_timeout"], ["drivers/net/ethernet/3com/3c574_cs.c", "el3_tx_timeout"], ["drivers/net/ethernet/3com/3c589_cs.c", "el3_tx_timeout"], ["drivers/net/ethernet/3com/3c59x.c", "vortex_tx_timeout"], ["drivers/net/ethernet/3com/3c59x.c", "vortex_tx_timeout"], ["drivers/net/ethernet/3com/typhoon.c", "typhoon_tx_timeout"], ["drivers/net/ethernet/8390/8390.h", "ei_tx_timeout"], ["drivers/net/ethernet/8390/8390.h", "eip_tx_timeout"], ["drivers/net/ethernet/8390/8390.c", "ei_tx_timeout"], ["drivers/net/ethernet/8390/8390p.c", "eip_tx_timeout"], ["drivers/net/ethernet/8390/ax88796.c", "ax_ei_tx_timeout"], ["drivers/net/ethernet/8390/axnet_cs.c", "axnet_tx_timeout"], ["drivers/net/ethernet/8390/etherh.c", "__ei_tx_timeout"], ["drivers/net/ethernet/8390/hydra.c", "__ei_tx_timeout"], ["drivers/net/ethernet/8390/mac8390.c", "__ei_tx_timeout"], ["drivers/net/ethernet/8390/mcf8390.c", "__ei_tx_timeout"], ["drivers/net/ethernet/8390/lib8390.c", "__ei_tx_timeout"], ["drivers/net/ethernet/8390/ne2k-pci.c", "ei_tx_timeout"], ["drivers/net/ethernet/8390/pcnet_cs.c", "ei_tx_timeout"], ["drivers/net/ethernet/8390/smc-ultra.c", "ei_tx_timeout"], ["drivers/net/ethernet/8390/wd.c", "ei_tx_timeout"], ["drivers/net/ethernet/8390/zorro8390.c", "__ei_tx_timeout"], ["drivers/net/ethernet/adaptec/starfire.c", "tx_timeout"], ["drivers/net/ethernet/agere/et131x.c", "et131x_tx_timeout"], ["drivers/net/ethernet/allwinner/sun4i-emac.c", "emac_timeout"], ["drivers/net/ethernet/alteon/acenic.c", "ace_watchdog"], ["drivers/net/ethernet/amazon/ena/ena_netdev.c", "ena_tx_timeout"], ["drivers/net/ethernet/amd/7990.h", "lance_tx_timeout"], ["drivers/net/ethernet/amd/7990.c", "lance_tx_timeout"], ["drivers/net/ethernet/amd/a2065.c", "lance_tx_timeout"], ["drivers/net/ethernet/amd/am79c961a.c", "am79c961_timeout"], ["drivers/net/ethernet/amd/amd8111e.c", "amd8111e_tx_timeout"], ["drivers/net/ethernet/amd/ariadne.c", "ariadne_tx_timeout"], ["drivers/net/ethernet/amd/atarilance.c", "lance_tx_timeout"], ["drivers/net/ethernet/amd/au1000_eth.c", "au1000_tx_timeout"], ["drivers/net/ethernet/amd/declance.c", "lance_tx_timeout"], ["drivers/net/ethernet/amd/lance.c", "lance_tx_timeout"], ["drivers/net/ethernet/amd/mvme147.c", "lance_tx_timeout"], ["drivers/net/ethernet/amd/ni65.c", "ni65_timeout"], ["drivers/net/ethernet/amd/nmclan_cs.c", "mace_tx_timeout"], ["drivers/net/ethernet/amd/pcnet32.c", "pcnet32_tx_timeout"], ["drivers/net/ethernet/amd/sunlance.c", "lance_tx_timeout"], ["drivers/net/ethernet/amd/xgbe/xgbe-drv.c", "xgbe_tx_timeout"], ["drivers/net/ethernet/apm/xgene-v2/main.c", "xge_timeout"], ["drivers/net/ethernet/apm/xgene/xgene_enet_main.c", "xgene_enet_timeout"], ["drivers/net/ethernet/apple/macmace.c", "mace_tx_timeout"], ["drivers/net/ethernet/atheros/ag71xx.c", "ag71xx_tx_timeout"], ["drivers/net/ethernet/atheros/alx/main.c", "alx_tx_timeout"], ["drivers/net/ethernet/atheros/atl1c/atl1c_main.c", "atl1c_tx_timeout"], ["drivers/net/ethernet/atheros/atl1e/atl1e_main.c", "atl1e_tx_timeout"], ["drivers/net/ethernet/atheros/atlx/atl.c", "atlx_tx_timeout"], ["drivers/net/ethernet/atheros/atlx/atl1.c", "atlx_tx_timeout"], ["drivers/net/ethernet/atheros/atlx/atl2.c", "atl2_tx_timeout"], ["drivers/net/ethernet/broadcom/b44.c", "b44_tx_timeout"], ["drivers/net/ethernet/broadcom/bcmsysport.c", "bcm_sysport_tx_timeout"], ["drivers/net/ethernet/broadcom/bnx2.c", "bnx2_tx_timeout"], ["drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.h", "bnx2x_tx_timeout"], ["drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c", "bnx2x_tx_timeout"], ["drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c", "bnx2x_tx_timeout"], ["drivers/net/ethernet/broadcom/bnxt/bnxt.c", "bnxt_tx_timeout"], ["drivers/net/ethernet/broadcom/genet/bcmgenet.c", "bcmgenet_timeout"], ["drivers/net/ethernet/broadcom/sb1250-mac.c", "sbmac_tx_timeout"], ["drivers/net/ethernet/broadcom/tg3.c", "tg3_tx_timeout"], ["drivers/net/ethernet/calxeda/xgmac.c", "xgmac_tx_timeout"], ["drivers/net/ethernet/cavium/liquidio/lio_main.c", "liquidio_tx_timeout"], ["drivers/net/ethernet/cavium/liquidio/lio_vf_main.c", "liquidio_tx_timeout"], ["drivers/net/ethernet/cavium/liquidio/lio_vf_rep.c", "lio_vf_rep_tx_timeout"], ["drivers/net/ethernet/cavium/thunder/nicvf_main.c", "nicvf_tx_timeout"], ["drivers/net/ethernet/cirrus/cs89x0.c", "net_timeout"], ["drivers/net/ethernet/cisco/enic/enic_main.c", "enic_tx_timeout"], ["drivers/net/ethernet/cisco/enic/enic_main.c", "enic_tx_timeout"], ["drivers/net/ethernet/cortina/gemini.c", "gmac_tx_timeout"], ["drivers/net/ethernet/davicom/dm9000.c", "dm9000_timeout"], ["drivers/net/ethernet/dec/tulip/de2104x.c", "de_tx_timeout"], ["drivers/net/ethernet/dec/tulip/tulip_core.c", "tulip_tx_timeout"], ["drivers/net/ethernet/dec/tulip/winbond-840.c", "tx_timeout"], ["drivers/net/ethernet/dlink/dl2k.c", "rio_tx_timeout"], ["drivers/net/ethernet/dlink/sundance.c", "tx_timeout"], ["drivers/net/ethernet/emulex/benet/be_main.c", "be_tx_timeout"], ["drivers/net/ethernet/ethoc.c", "ethoc_tx_timeout"], ["drivers/net/ethernet/faraday/ftgmac100.c", "ftgmac100_tx_timeout"], ["drivers/net/ethernet/fealnx.c", "fealnx_tx_timeout"], ["drivers/net/ethernet/freescale/dpaa/dpaa_eth.c", "dpaa_tx_timeout"], ["drivers/net/ethernet/freescale/fec_main.c", "fec_timeout"], ["drivers/net/ethernet/freescale/fec_mpc52xx.c", "mpc52xx_fec_tx_timeout"], ["drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c", "fs_timeout"], ["drivers/net/ethernet/freescale/gianfar.c", "gfar_timeout"], ["drivers/net/ethernet/freescale/ucc_geth.c", "ucc_geth_timeout"], ["drivers/net/ethernet/fujitsu/fmvj18x_cs.c", "fjn_tx_timeout"], ["drivers/net/ethernet/google/gve/gve_main.c", "gve_tx_timeout"], ["drivers/net/ethernet/hisilicon/hip04_eth.c", "hip04_timeout"], ["drivers/net/ethernet/hisilicon/hix5hd2_gmac.c", "hix5hd2_net_timeout"], ["drivers/net/ethernet/hisilicon/hns/hns_enet.c", "hns_nic_net_timeout"], ["drivers/net/ethernet/hisilicon/hns3/hns3_enet.c", "hns3_nic_net_timeout"], ["drivers/net/ethernet/huawei/hinic/hinic_main.c", "hinic_tx_timeout"], ["drivers/net/ethernet/i825xx/82596.c", "i596_tx_timeout"], ["drivers/net/ethernet/i825xx/ether1.c", "ether1_timeout"], ["drivers/net/ethernet/i825xx/lib82596.c", "i596_tx_timeout"], ["drivers/net/ethernet/i825xx/sun3_82586.c", "sun3_82586_timeout"], ["drivers/net/ethernet/ibm/ehea/ehea_main.c", "ehea_tx_watchdog"], ["drivers/net/ethernet/ibm/emac/core.c", "emac_tx_timeout"], ["drivers/net/ethernet/ibm/emac/core.c", "emac_tx_timeout"], ["drivers/net/ethernet/ibm/ibmvnic.c", "ibmvnic_tx_timeout"], ["drivers/net/ethernet/intel/e100.c", "e100_tx_timeout"], ["drivers/net/ethernet/intel/e1000/e1000_main.c", "e1000_tx_timeout"], ["drivers/net/ethernet/intel/e1000e/netdev.c", "e1000_tx_timeout"], ["drivers/net/ethernet/intel/fm10k/fm10k_netdev.c", "fm10k_tx_timeout"], ["drivers/net/ethernet/intel/i40e/i40e_main.c", "i40e_tx_timeout"], ["drivers/net/ethernet/intel/iavf/iavf_main.c", "iavf_tx_timeout"], ["drivers/net/ethernet/intel/ice/ice_main.c", "ice_tx_timeout"], ["drivers/net/ethernet/intel/ice/ice_main.c", "ice_tx_timeout"], ["drivers/net/ethernet/intel/igb/igb_main.c", "igb_tx_timeout"], ["drivers/net/ethernet/intel/igbvf/netdev.c", "igbvf_tx_timeout"], ["drivers/net/ethernet/intel/ixgb/ixgb_main.c", "ixgb_tx_timeout"], ["drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c", "adapter->netdev->netdev_ops->ndo_tx_timeout(adapter->netdev);"], ["drivers/net/ethernet/intel/ixgbe/ixgbe_main.c", "ixgbe_tx_timeout"], ["drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c", "ixgbevf_tx_timeout"], ["drivers/net/ethernet/jme.c", "jme_tx_timeout"], ["drivers/net/ethernet/korina.c", "korina_tx_timeout"], ["drivers/net/ethernet/lantiq_etop.c", "ltq_etop_tx_timeout"], ["drivers/net/ethernet/marvell/mv643xx_eth.c", "mv643xx_eth_tx_timeout"], ["drivers/net/ethernet/marvell/pxa168_eth.c", "pxa168_eth_tx_timeout"], ["drivers/net/ethernet/marvell/skge.c", "skge_tx_timeout"], ["drivers/net/ethernet/marvell/sky2.c", "sky2_tx_timeout"], ["drivers/net/ethernet/marvell/sky2.c", "sky2_tx_timeout"], ["drivers/net/ethernet/mediatek/mtk_eth_soc.c", "mtk_tx_timeout"], ["drivers/net/ethernet/mellanox/mlx4/en_netdev.c", "mlx4_en_tx_timeout"], ["drivers/net/ethernet/mellanox/mlx4/en_netdev.c", "mlx4_en_tx_timeout"], ["drivers/net/ethernet/mellanox/mlx5/core/en_main.c", "mlx5e_tx_timeout"], ["drivers/net/ethernet/micrel/ks8842.c", "ks8842_tx_timeout"], ["drivers/net/ethernet/micrel/ksz884x.c", "netdev_tx_timeout"], ["drivers/net/ethernet/microchip/enc28j60.c", "enc28j60_tx_timeout"], ["drivers/net/ethernet/microchip/encx24j600.c", "encx24j600_tx_timeout"], ["drivers/net/ethernet/natsemi/sonic.h", "sonic_tx_timeout"], ["drivers/net/ethernet/natsemi/sonic.c", "sonic_tx_timeout"], ["drivers/net/ethernet/natsemi/jazzsonic.c", "sonic_tx_timeout"], ["drivers/net/ethernet/natsemi/macsonic.c", "sonic_tx_timeout"], ["drivers/net/ethernet/natsemi/natsemi.c", "ns_tx_timeout"], ["drivers/net/ethernet/natsemi/ns83820.c", "ns83820_tx_timeout"], ["drivers/net/ethernet/natsemi/xtsonic.c", "sonic_tx_timeout"], ["drivers/net/ethernet/neterion/s2io.h", "s2io_tx_watchdog"], ["drivers/net/ethernet/neterion/s2io.c", "s2io_tx_watchdog"], ["drivers/net/ethernet/neterion/vxge/vxge-main.c", "vxge_tx_watchdog"], ["drivers/net/ethernet/netronome/nfp/nfp_net_common.c", "nfp_net_tx_timeout"], ["drivers/net/ethernet/nvidia/forcedeth.c", "nv_tx_timeout"], ["drivers/net/ethernet/nvidia/forcedeth.c", "nv_tx_timeout"], ["drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c", "pch_gbe_tx_timeout"], ["drivers/net/ethernet/packetengines/hamachi.c", "hamachi_tx_timeout"], ["drivers/net/ethernet/packetengines/yellowfin.c", "yellowfin_tx_timeout"], ["drivers/net/ethernet/pensando/ionic/ionic_lif.c", "ionic_tx_timeout"], ["drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c", "netxen_tx_timeout"], ["drivers/net/ethernet/qlogic/qla3xxx.c", "ql3xxx_tx_timeout"], ["drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c", "qlcnic_tx_timeout"], ["drivers/net/ethernet/qualcomm/emac/emac.c", "emac_tx_timeout"], ["drivers/net/ethernet/qualcomm/qca_spi.c", "qcaspi_netdev_tx_timeout"], ["drivers/net/ethernet/qualcomm/qca_uart.c", "qcauart_netdev_tx_timeout"], ["drivers/net/ethernet/rdc/r6040.c", "r6040_tx_timeout"], ["drivers/net/ethernet/realtek/8139cp.c", "cp_tx_timeout"], ["drivers/net/ethernet/realtek/8139too.c", "rtl8139_tx_timeout"], ["drivers/net/ethernet/realtek/atp.c", "tx_timeout"], ["drivers/net/ethernet/realtek/r8169_main.c", "rtl8169_tx_timeout"], ["drivers/net/ethernet/renesas/ravb_main.c", "ravb_tx_timeout"], ["drivers/net/ethernet/renesas/sh_eth.c", "sh_eth_tx_timeout"], ["drivers/net/ethernet/renesas/sh_eth.c", "sh_eth_tx_timeout"], ["drivers/net/ethernet/samsung/sxgbe/sxgbe_main.c", "sxgbe_tx_timeout"], ["drivers/net/ethernet/seeq/ether3.c", "ether3_timeout"], ["drivers/net/ethernet/seeq/sgiseeq.c", "timeout"], ["drivers/net/ethernet/sfc/efx.c", "efx_watchdog"], ["drivers/net/ethernet/sfc/falcon/efx.c", "ef4_watchdog"], ["drivers/net/ethernet/sgi/ioc3-eth.c", "ioc3_timeout"], ["drivers/net/ethernet/sgi/meth.c", "meth_tx_timeout"], ["drivers/net/ethernet/silan/sc92031.c", "sc92031_tx_timeout"], ["drivers/net/ethernet/sis/sis190.c", "sis190_tx_timeout"], ["drivers/net/ethernet/sis/sis900.c", "sis900_tx_timeout"], ["drivers/net/ethernet/smsc/epic100.c", "epic_tx_timeout"], ["drivers/net/ethernet/smsc/smc911x.c", "smc911x_timeout"], ["drivers/net/ethernet/smsc/smc9194.c", "smc_timeout"], ["drivers/net/ethernet/smsc/smc91c92_cs.c", "smc_tx_timeout"], ["drivers/net/ethernet/smsc/smc91x.c", "smc_timeout"], ["drivers/net/ethernet/stmicro/stmmac/stmmac_main.c", "stmmac_tx_timeout"], ["drivers/net/ethernet/sun/cassini.c", "cas_tx_timeout"], ["drivers/net/ethernet/sun/ldmvsw.c", "sunvnet_tx_timeout_common"], ["drivers/net/ethernet/sun/niu.c", "niu_tx_timeout"], ["drivers/net/ethernet/sun/sunbmac.c", "bigmac_tx_timeout"], ["drivers/net/ethernet/sun/sungem.c", "gem_tx_timeout"], ["drivers/net/ethernet/sun/sunhme.c", "happy_meal_tx_timeout"], ["drivers/net/ethernet/sun/sunqe.c", "qe_tx_timeout"], ["drivers/net/ethernet/sun/sunvnet.c", "sunvnet_tx_timeout_common"], ["drivers/net/ethernet/sun/sunvnet_common.c", "sunvnet_tx_timeout_common"], ["drivers/net/ethernet/sun/sunvnet_common.h", "sunvnet_tx_timeout_common"], ["drivers/net/ethernet/synopsys/dwc-xlgmac-net.c", "xlgmac_tx_timeout"], ["drivers/net/ethernet/ti/cpmac.c", "cpmac_tx_timeout"], ["drivers/net/ethernet/ti/cpsw.c", "cpsw_ndo_tx_timeout"], ["drivers/net/ethernet/ti/cpsw_priv.c", "cpsw_ndo_tx_timeout"], ["drivers/net/ethernet/ti/cpsw_priv.h", "cpsw_ndo_tx_timeout"], ["drivers/net/ethernet/ti/davinci_emac.c", "emac_dev_tx_timeout"], ["drivers/net/ethernet/ti/netcp_core.c", "netcp_ndo_tx_timeout"], ["drivers/net/ethernet/ti/tlan.c", "tlan_tx_timeout"], ["drivers/net/ethernet/toshiba/ps3_gelic_net.h", "gelic_net_tx_timeout"], ["drivers/net/ethernet/toshiba/ps3_gelic_net.c", "gelic_net_tx_timeout"], ["drivers/net/ethernet/toshiba/ps3_gelic_wireless.c", "gelic_net_tx_timeout"], ["drivers/net/ethernet/toshiba/spider_net.c", "spider_net_tx_timeout"], ["drivers/net/ethernet/toshiba/tc35815.c", "tc35815_tx_timeout"], ["drivers/net/ethernet/via/via-rhine.c", "rhine_tx_timeout"], ["drivers/net/ethernet/wiznet/w5100.c", "w5100_tx_timeout"], ["drivers/net/ethernet/wiznet/w5300.c", "w5300_tx_timeout"], ["drivers/net/ethernet/xilinx/xilinx_emaclite.c", "xemaclite_tx_timeout"], ["drivers/net/ethernet/xircom/xirc2ps_cs.c", "xirc_tx_timeout"], ["drivers/net/fjes/fjes_main.c", "fjes_tx_retry"], ["drivers/net/slip/slip.c", "sl_tx_timeout"], ["include/linux/usb/usbnet.h", "usbnet_tx_timeout"], ["drivers/net/usb/aqc111.c", "usbnet_tx_timeout"], ["drivers/net/usb/asix_devices.c", "usbnet_tx_timeout"], ["drivers/net/usb/asix_devices.c", "usbnet_tx_timeout"], ["drivers/net/usb/asix_devices.c", "usbnet_tx_timeout"], ["drivers/net/usb/ax88172a.c", "usbnet_tx_timeout"], ["drivers/net/usb/ax88179_178a.c", "usbnet_tx_timeout"], ["drivers/net/usb/catc.c", "catc_tx_timeout"], ["drivers/net/usb/cdc_mbim.c", "usbnet_tx_timeout"], ["drivers/net/usb/cdc_ncm.c", "usbnet_tx_timeout"], ["drivers/net/usb/dm9601.c", "usbnet_tx_timeout"], ["drivers/net/usb/hso.c", "hso_net_tx_timeout"], ["drivers/net/usb/int51x1.c", "usbnet_tx_timeout"], ["drivers/net/usb/ipheth.c", "ipheth_tx_timeout"], ["drivers/net/usb/kaweth.c", "kaweth_tx_timeout"], ["drivers/net/usb/lan78xx.c", "lan78xx_tx_timeout"], ["drivers/net/usb/mcs7830.c", "usbnet_tx_timeout"], ["drivers/net/usb/pegasus.c", "pegasus_tx_timeout"], ["drivers/net/usb/qmi_wwan.c", "usbnet_tx_timeout"], ["drivers/net/usb/r8152.c", "rtl8152_tx_timeout"], ["drivers/net/usb/rndis_host.c", "usbnet_tx_timeout"], ["drivers/net/usb/rtl8150.c", "rtl8150_tx_timeout"], ["drivers/net/usb/sierra_net.c", "usbnet_tx_timeout"], ["drivers/net/usb/smsc75xx.c", "usbnet_tx_timeout"], ["drivers/net/usb/smsc95xx.c", "usbnet_tx_timeout"], ["drivers/net/usb/sr9700.c", "usbnet_tx_timeout"], ["drivers/net/usb/sr9800.c", "usbnet_tx_timeout"], ["drivers/net/usb/usbnet.c", "usbnet_tx_timeout"], ["drivers/net/vmxnet3/vmxnet3_drv.c", "vmxnet3_tx_timeout"], ["drivers/net/wan/cosa.c", "cosa_net_timeout"], ["drivers/net/wan/farsync.c", "fst_tx_timeout"], ["drivers/net/wan/fsl_ucc_hdlc.c", "uhdlc_tx_timeout"], ["drivers/net/wan/lmc/lmc_main.c", "lmc_driver_timeout"], ["drivers/net/wan/x25_asy.c", "x25_asy_timeout"], ["drivers/net/wimax/i2400m/netdev.c", "i2400m_tx_timeout"], ["drivers/net/wireless/intel/ipw2x00/ipw2100.c", "ipw2100_tx_timeout"], ["drivers/net/wireless/intersil/hostap/hostap_main.c", "prism2_tx_timeout"], ["drivers/net/wireless/intersil/hostap/hostap_main.c", "prism2_tx_timeout"], ["drivers/net/wireless/intersil/hostap/hostap_main.c", "prism2_tx_timeout"], ["drivers/net/wireless/intersil/orinoco/main.c", "orinoco_tx_timeout"], ["drivers/net/wireless/intersil/orinoco/orinoco_usb.c", "orinoco_tx_timeout"], ["drivers/net/wireless/intersil/orinoco/orinoco.h", "orinoco_tx_timeout"], ["drivers/net/wireless/intersil/prism54/islpci_dev.c", "islpci_eth_tx_timeout"], ["drivers/net/wireless/intersil/prism54/islpci_eth.c", "islpci_eth_tx_timeout"], ["drivers/net/wireless/intersil/prism54/islpci_eth.h", "islpci_eth_tx_timeout"], ["drivers/net/wireless/marvell/mwifiex/main.c", "mwifiex_tx_timeout"], ["drivers/net/wireless/quantenna/qtnfmac/core.c", "qtnf_netdev_tx_timeout"], ["drivers/net/wireless/quantenna/qtnfmac/core.h", "qtnf_netdev_tx_timeout"], ["drivers/net/wireless/rndis_wlan.c", "usbnet_tx_timeout"], ["drivers/net/wireless/wl3501_cs.c", "wl3501_tx_timeout"], ["drivers/net/wireless/zydas/zd1201.c", "zd1201_tx_timeout"], ["drivers/s390/net/qeth_core.h", "qeth_tx_timeout"], ["drivers/s390/net/qeth_core_main.c", "qeth_tx_timeout"], ["drivers/s390/net/qeth_l2_main.c", "qeth_tx_timeout"], ["drivers/s390/net/qeth_l2_main.c", "qeth_tx_timeout"], ["drivers/s390/net/qeth_l3_main.c", "qeth_tx_timeout"], ["drivers/s390/net/qeth_l3_main.c", "qeth_tx_timeout"], ["drivers/staging/ks7010/ks_wlan_net.c", "ks_wlan_tx_timeout"], ["drivers/staging/qlge/qlge_main.c", "qlge_tx_timeout"], ["drivers/staging/rtl8192e/rtl8192e/rtl_core.c", "_rtl92e_tx_timeout"], ["drivers/staging/rtl8192u/r8192U_core.c", "tx_timeout"], ["drivers/staging/unisys/visornic/visornic_main.c", "visornic_xmit_timeout"], ["drivers/staging/wlan-ng/p80211netdev.c", "p80211knetdev_tx_timeout"], ["drivers/tty/n_gsm.c", "gsm_mux_net_tx_timeout"], ["drivers/tty/synclink.c", "hdlcdev_tx_timeout"], ["drivers/tty/synclink_gt.c", "hdlcdev_tx_timeout"], ["drivers/tty/synclinkmp.c", "hdlcdev_tx_timeout"], ["net/atm/lec.c", "lec_tx_timeout"], ["net/bluetooth/bnep/netdev.c", "bnep_net_timeout"] ); for my $p (@work) { my @pair = @$p; my $file = $pair[0]; my $func = $pair[1]; print STDERR $file , ": ", $func,"\n"; our @ARGV = ($file); while () { if (m/($func\s*\(struct\s+net_device\s+\*[A-Za-z_]?[A-Za-z-0-9_]*)(\))/) { print STDERR "found $1+$2 in $file\n"; } if (s/($func\s*\(struct\s+net_device\s+\*[A-Za-z_]?[A-Za-z-0-9_]*)(\))/$1, unsigned int txqueue$2/) { print STDERR "$func found in $file\n"; } print; } } where the list of files and functions is simply from: git grep ndo_tx_timeout, with manual addition of headers in the rare cases where the function is from a header, then manually changing the few places which actually call ndo_tx_timeout. Signed-off-by: Michael S. Tsirkin Acked-by: Heiner Kallweit Acked-by: Jakub Kicinski Acked-by: Shannon Nelson Reviewed-by: Martin Habets changes from v9: fixup a forward declaration changes from v9: more leftovers from v3 change changes from v8: fix up a missing direct call to timeout rebased on net-next changes from v7: fixup leftovers from v3 change changes from v6: fix typo in rtl driver changes from v5: add missing files (allow any net device argument name) changes from v4: add a missing driver header changes from v3: change queue # to unsigned Changes from v2: added headers Changes from v1: Fix errors found by kbuild: generalize the pattern a bit, to pick up a couple of instances missed by the previous version. Signed-off-by: David S. Miller commit b1ca5b49f1e51458930c2e6aa566bd5b9b3b9c55 Author: Bjorn Andersson Date: Thu Nov 14 18:53:49 2019 +0100 ARM: dts: msm8974: Move ADSP smd edge to ADSP PIL With the introduction of SSR support in the ADSP PIL we should describe the SMD edge inside the ADSP PIL node. Signed-off-by: Bjorn Andersson [luca@z3ntu.xyz: Add label for the smd edge] Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20191114175348.288976-2-luca@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 13f3b8e3dc0f393862bc9f5e4d852cb417d98817 Author: Bjorn Andersson Date: Thu Nov 14 18:53:48 2019 +0100 ARM: dts: msm8974: Add modem remoteproc node Add the remoteproc node for the modem on msm8974. Signed-off-by: Bjorn Andersson [luca@z3ntu.xyz: cleanups, add label to smd-edge node] Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20191114175348.288976-1-luca@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 355979decf07d77e9f1fa59233b1e60ae51e307a Merge: aabf23d18322 913b0bfd6c85 Author: David S. Miller Date: Thu Dec 12 17:14:01 2019 -0800 Merge branch 'Introduce-XDP-to-ena' Sameeh Jubran says: ==================== Introduce XDP to ena This patchset includes 3 patches: * XDP_DROP implementation * XDP_TX implementation * A fix for an issue which might occur due to the XDP_TX patch. I see fit to place it as a standalone patch for clarity. Difference from v2: * Fixed the usage of rx headroom (XDP_PACKET_HEADROOM) * Aligned the page_offset of the packet when passing it to the stack * Switched to using xdp_frame in xdp xmit queue * Dropped the print for unsupported commands * Cosmetic changes Difference from RFC v1 (XDP_DROP patch): * Initialized xdp.rxq pointer * Updated max_mtu on attachment of xdp and removed the check from ena_change_mtu() * Moved the xdp execution from ena_rx_skb() to ena_clean_rx_irq() * Moved xdp buff (struct xdp_buff) from rx_ring to the local stack * Started using netlink's extack mechanism to deliver error messages to the user ==================== Signed-off-by: David S. Miller commit 913b0bfd6c859aaf1735e1c8c69731e1d5359d31 Author: Sameeh Jubran Date: Tue Dec 10 15:12:14 2019 +0200 net: ena: Add first_interrupt field to napi struct The first_interrupt field is accessed in ena_intr_msix_io() upon receiving an interrupt.The rx_ring and tx_ring fields of napi can be NULL when receiving interrupt for xdp queues. This patch fixes the issue by moving the field to the ena_napi struct. Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller commit 548c4940b9f1f527f81509468dd60b61418880b6 Author: Sameeh Jubran Date: Tue Dec 10 15:12:13 2019 +0200 net: ena: Implement XDP_TX action This commit implements the XDP_TX action in the ena driver. We allocate separate tx queues for the XDP_TX. We currently allow xdp only when there is enough queues to allocate for xdp. Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller commit 838c93dc5449e5d6378bae117b0a65a122cf7361 Author: Sameeh Jubran Date: Tue Dec 10 15:12:12 2019 +0200 net: ena: implement XDP drop support This commit implements the basic functionality of drop/pass logic in the ena driver. Signed-off-by: Sameeh Jubran Signed-off-by: David S. Miller commit aabf23d18322100720cb40002cdf05397f619914 Merge: 545a6822993f 428c122f5f6b Author: David S. Miller Date: Thu Dec 12 17:07:06 2019 -0800 Merge branch 'ethtool-netlink-interface-preliminary-part' Michal Kubecek says: ==================== ethtool netlink interface, preliminary part As Jakub Kicinski suggested in ethtool netlink v7 discussion, this submission consists only of preliminary patches which raised no objections; first four patches already have Acked-by or Reviewed-by. - patch 1 exposes permanent hardware address (as shown by "ethtool -P") via rtnetlink - patch 2 is renames existing netlink helper to a better name - patch 3 and 4 reorganize existing ethtool code (no functional change) - patch 5 makes the table of link mode names available as an ethtool string set (will be needed for the netlink interface) Once we get these out of the way, v8 of the first part of the ethtool netlink interface will follow. Changes from v2 to v3: fix SPDX licence identifiers (patch 3 and 5). Changes from v1 to v2: restore build time check that all link modes have assigned a name (patch 5). ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 428c122f5f6b54f40bd51c47495104b534b5a57c Author: Michal Kubecek Date: Wed Dec 11 10:58:34 2019 +0100 ethtool: provide link mode names as a string set Unlike e.g. netdev features, the ethtool ioctl interface requires link mode table to be in sync between kernel and userspace for userspace to be able to display and set all link modes supported by kernel. The way arbitrary length bitsets are implemented in netlink interface, this will be no longer needed. To allow userspace to access all link modes running kernel supports, add table of ethernet link mode names and make it available as a string set to userspace GET_STRSET requests. Add build time check to make sure names are defined for all modes declared in enum ethtool_link_mode_bit_indices. Once the string set is available, make it also accessible via ioctl. Signed-off-by: Michal Kubecek Reviewed-by: Andrew Lunn Reviewed-by: Jiri Pirko Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit d44e13108b6da4e1c4778bd654a470208e02ef37 Author: Michal Kubecek Date: Wed Dec 11 10:58:29 2019 +0100 ethtool: move string arrays into common file Introduce file net/ethtool/common.c for code shared by ioctl and netlink ethtool interface. Move name tables of features, RSS hash functions, tunables and PHY tunables into this file. Signed-off-by: Michal Kubecek Reviewed-by: Jiri Pirko Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 9ce48e5a09ea63a7867647af68caa0605d99757d Author: Michal Kubecek Date: Wed Dec 11 10:58:24 2019 +0100 ethtool: move to its own directory The ethtool netlink interface is going to be split into multiple files so that it will be more convenient to put all of them in a separate directory net/ethtool. Start by moving current ethtool.c with ioctl interface into this directory and renaming it to ioctl.c. Signed-off-by: Michal Kubecek Acked-by: Jiri Pirko Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 32d5109a9d864aea3981f0b5ea736eee4e11b42a Author: Michal Kubecek Date: Wed Dec 11 10:58:19 2019 +0100 netlink: rename nl80211_validate_nested() to nla_validate_nested() Function nl80211_validate_nested() is not specific to nl80211, it's a counterpart to nla_validate_nested_deprecated() with strict validation. For consistency with other validation and parse functions, rename it to nla_validate_nested(). Signed-off-by: Michal Kubecek Acked-by: Jiri Pirko Reviewed-by: Johannes Berg Signed-off-by: David S. Miller commit f74877a5457d34d604dba6dbbb13c4c05bac8b93 Author: Michal Kubecek Date: Wed Dec 11 10:58:14 2019 +0100 rtnetlink: provide permanent hardware address in RTM_NEWLINK Permanent hardware address of a network device was traditionally provided via ethtool ioctl interface but as Jiri Pirko pointed out in a review of ethtool netlink interface, rtnetlink is much more suitable for it so let's add it to the RTM_NEWLINK message. Add IFLA_PERM_ADDRESS attribute to RTM_NEWLINK messages unless the permanent address is all zeros (i.e. device driver did not fill it). As permanent address is not modifiable, reject userspace requests containing IFLA_PERM_ADDRESS attribute. Note: we already provide permanent hardware address for bond slaves; unfortunately we cannot drop that attribute for backward compatibility reasons. v5 -> v6: only add the attribute if permanent address is not zero Signed-off-by: Michal Kubecek Acked-by: Jiri Pirko Acked-by: Stephen Hemminger Signed-off-by: David S. Miller commit 545a6822993f1228552097aa21a6dd9f90514e68 Merge: 6b8350a4b0d5 3c32da19a858 Author: David S. Miller Date: Thu Dec 12 17:04:55 2019 -0800 Merge branch 'unix-Show-number-of-scm-files-in-fdinfo' Kirill Tkhai says: ==================== unix: Show number of scm files in fdinfo v2: Pass correct argument to locked in patch [2/2]. Unix sockets like a block box. You never know what is pending there: there may be a file descriptor holding a mount or a block device, or there may be whole universes with namespaces, sockets with receive queues full of sockets etc. The patchset makes number of pending scm files be visible in fdinfo. This may be useful to determine, that socket should be investigated or which task should be killed to put a reference counter on a resourse. $cat /proc/[pid]/fdinfo/[unix_sk_fd] | grep scm_fds scm_fds: 1 ==================== Signed-off-by: David S. Miller commit 3c32da19a858fb1ae8a76bf899160be49f338506 Author: Kirill Tkhai Date: Mon Dec 9 13:03:46 2019 +0300 unix: Show number of pending scm files of receive queue in fdinfo Unix sockets like a block box. You never know what is stored there: there may be a file descriptor holding a mount or a block device, or there may be whole universes with namespaces, sockets with receive queues full of sockets etc. The patch adds a little debug and accounts number of files (not recursive), which is in receive queue of a unix socket. Sometimes this is useful to determine, that socket should be investigated or which task should be killed to put reference counter on a resourse. v2: Pass correct argument to lockdep Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller commit b4653342b1514cb11f25b727c689451aff02996d Author: Kirill Tkhai Date: Mon Dec 9 13:03:40 2019 +0300 net: Allow to show socket-specific information in /proc/[pid]/fdinfo/[fd] This adds .show_fdinfo to socket_file_ops, so protocols will be able to print their specific data in fdinfo. Signed-off-by: Kirill Tkhai Signed-off-by: David S. Miller commit 574f29036fce385e28617547955dd6911d375025 Author: Wei Liu Date: Wed Dec 11 17:45:11 2019 +0000 PCI: iproc: Apply quirk_paxc_bridge() for module as well as built-in Previously quirk_paxc_bridge() was applied when the iproc driver was built-in, but not when it was compiled as a module. This happened because it was under #ifdef CONFIG_PCIE_IPROC_PLATFORM: PCIE_IPROC_PLATFORM=y causes CONFIG_PCIE_IPROC_PLATFORM to be defined, but PCIE_IPROC_PLATFORM=m causes CONFIG_PCIE_IPROC_PLATFORM_MODULE to be defined. Move quirk_paxc_bridge() to pcie-iproc.c and drop the #ifdef so the quirk is always applied, whether iproc is built-in or a module. [bhelgaas: commit log, move to pcie-iproc.c, not pcie-iproc-platform.c] Link: https://lore.kernel.org/r/20191211174511.89713-1-wei.liu@kernel.org Signed-off-by: Wei Liu Signed-off-by: Bjorn Helgaas commit fd916516647fbb421ea4492bd3b65ac257377dcc Author: Douglas Anderson Date: Thu Dec 12 11:35:42 2019 -0800 arm64: dts: qcom: sc7180: Avoid "phy" for USB QMP PHY wrapper The bindings for the QMP PHY are truly strange. I believe (?) that they may have originated because with PCIe each lane is treated as a different PHY and the same PHY driver is used for a whole bunch of things (incluidng PCIe). In any case, now that we have "make dtbs_check", we find that having the outer node named "phy" triggers the "schemas/phy/phy-provider.yaml" schema, yelling about: phy@88e9000: '#phy-cells' is a required property Let's call the outer node the "phy-wrapper" and the inner node the "phy" to make dtbs_check happy. Reviewed-by: Stephen Boyd Fixes: 0b766e7fe5a2 ("arm64: dts: qcom: sc7180: Add USB related nodes") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20191212113540.6.Iec10b23bb000186b36b8bacfb6789d8233de04a7@changeid Signed-off-by: Bjorn Andersson commit 3f155dbebf90a3d5e3d09f467fe5de382a3a043b Author: Douglas Anderson Date: Thu Dec 12 11:35:40 2019 -0800 arm64: dts: qcom: pm6150: Remove macro from unit name of adc-chan This is just like commit e77cc85ee390 ("arm64: dts: qcom: sdm845: remove macro from unit name"). It fixes the error in 'make dtbs_check': arch/arm64/boot/dts/qcom/sc7180-idp.dt.yaml: adc@3100: 'adc-chan@0x06' does not match any of the regexes: ... Reviewed-by: Stephen Boyd Fixes: a727ec1232d9 ("arm64: dts: qcom: pm6150: Add PM6150/PM6150L PMIC peripherals") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20191212113540.4.I5f67a5ed7665f658c95447a837cbd0021e1dc689@changeid Signed-off-by: Bjorn Andersson commit 6e3697279eba07afa7803bdca094747e04474430 Author: Douglas Anderson Date: Thu Dec 12 11:35:39 2019 -0800 arm64: dts: qcom: sc7180: Add "#clock-cells" property to usb_1_ssphy Running "dtbs_check" yells: '#clock-cells' is a dependency of 'clock-output-names' ...and sure enough the bindings say we should have "#clock-cells". Add it. Reviewed-by: Stephen Boyd Fixes: 0b766e7fe5a2 ("arm64: dts: qcom: sc7180: Add USB related nodes") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20191212113540.3.Ia530e4065ca81f55ac8f89a400f6a0a084ff6712@changeid Signed-off-by: Bjorn Andersson commit ac00546a6780931d9ce65cb6568aa161b3e5c510 Author: Douglas Anderson Date: Thu Dec 12 11:35:38 2019 -0800 arm64: dts: qcom: sc7180: Rename gic-its node to msi-controller Running `make dtbs_check` yells: arch/arm64/boot/dts/qcom/sc7180-idp.dt.yaml: interrupt-controller@17a00000: gic-its@17a40000: False schema From "arm,gic-v3.yaml" we can grok that this is explained by the comment "msi-controller is preferred". Switch to the preferred name so that dtbs_check stops yelling. Reviewed-by: Stephen Boyd Fixes: 90db71e48070 ("arm64: dts: sc7180: Add minimal dts/dtsi files for SC7180 soc") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20191212113540.2.Ibad7d3b0bea02957e89047942c61cc6c0aa61715@changeid Signed-off-by: Bjorn Andersson commit d8c5133583db6729aaec3ca8939fb3a63b71f8bc Author: Douglas Anderson Date: Thu Dec 12 11:35:37 2019 -0800 arm64: dts: qcom: sc7180: Add SoC name to compatible Running `make dtbs_check` yells because qcom.yaml says that we should have: - items: - enum: - qcom,sc7180-idp - const: qcom,sc7180 ...but we're missing "qcom,sc7180". Add it. Reviewed-by: Stephen Boyd Fixes: 90db71e48070 ("arm64: dts: sc7180: Add minimal dts/dtsi files for SC7180 soc") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20191212113540.1.I158061c65974bf0f653ceb79b442b76a1fd64868@changeid Signed-off-by: Bjorn Andersson commit 679152d3a32e305c213f83160c328c37566ae8bc Author: Andrii Nakryiko Date: Thu Dec 12 09:19:18 2019 -0800 libbpf: Fix printf compilation warnings on ppc64le arch On ppc64le __u64 and __s64 are defined as long int and unsigned long int, respectively. This causes compiler to emit warning when %lld/%llu are used to printf 64-bit numbers. Fix this by casting to size_t/ssize_t with %zu and %zd format specifiers, respectively. v1->v2: - use size_t/ssize_t instead of custom typedefs (Martin). Fixes: 1f8e2bcb2cd5 ("libbpf: Refactor relocation handling") Fixes: abd29c931459 ("libbpf: allow specifying map definitions using BTF") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191212171918.638010-1-andriin@fb.com commit 82c881b28aa89215a760e39c5f6bcde2d6ce4918 Author: Valdis Kletnieks Date: Thu Dec 5 22:44:33 2019 -0500 x86/microcode/AMD: Make stub function static inline When building with C=1 W=1 (and when CONFIG_MICROCODE_AMD=n, as Luc Van Oostenryck correctly points out) both sparse and gcc complain: CHECK arch/x86/kernel/cpu/microcode/core.c ./arch/x86/include/asm/microcode_amd.h:56:6: warning: symbol \ 'reload_ucode_amd' was not declared. Should it be static? CC arch/x86/kernel/cpu/microcode/core.o In file included from arch/x86/kernel/cpu/microcode/core.c:36: ./arch/x86/include/asm/microcode_amd.h:56:6: warning: no previous \ prototype for 'reload_ucode_amd' [-Wmissing-prototypes] 56 | void reload_ucode_amd(void) {} | ^~~~~~~~~~~~~~~~ And they're right - that function can be a static inline like its brethren. Signed-off-by: Valdis Klētnieks Signed-off-by: Borislav Petkov Cc: Luc Van Oostenryck Cc: x86@kernel.org Link: https://lkml.kernel.org/r/52170.1575603873@turing-police commit dd973007bfefe62c81e84cb6ae0704c73b2b64c9 Author: Jaegeuk Kim Date: Tue Dec 3 19:07:53 2019 -0800 f2fs: set GFP_NOFS when moving inline dentries Otherwise, it can cause circular locking dependency reported by mm. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4f4460c08a4711dbdbd139df961e14c7a94d9590 Author: Jaegeuk Kim Date: Tue Dec 3 19:02:15 2019 -0800 f2fs: should avoid recursive filesystem ops We need to use GFP_NOFS, since we did f2fs_lock_op(). Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3f188c23d774646dcfa35e937f75f66872e62507 Author: Jaegeuk Kim Date: Tue Dec 3 18:54:29 2019 -0800 f2fs: keep quota data on write_begin failure This patch avoids some unnecessary locks for quota files when write_begin fails. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 601a9ee0f0c71efdd36b7fe7b053e2fb42187c7e Author: Ville Syrjälä Date: Tue Dec 10 16:41:02 2019 +0200 drm/i915: Streamline skl_commit_modeset_enables() skl_commit_modeset_enables() is a bit of mess. Let's streamline it by simply tracking which pipes still need to be updated. As a bonus we get rid of the state->wm_results.dirty_pipes usage. v2: Rebase due to port sync Cc: José Roberto de Souza Reviewed-by: Stanislav Lisovskiy #v1 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191210144105.3239-2-ville.syrjala@linux.intel.com commit 5206265f78e4e313bc982e289248a239cb3409e2 Author: Marek Szyprowski Date: Wed Dec 11 15:51:55 2019 +0100 ARM: dts: exynos: Correct USB3503 GPIOs polarity Current USB3503 driver ignores GPIO polarity and always operates as if the GPIO lines were flagged as ACTIVE_HIGH. Fix the polarity for the existing USB3503 chip applications to match the chip specification and common convention for naming the pins. The only pin, which has to be ACTIVE_LOW is the reset pin. The remaining are ACTIVE_HIGH. This change allows later to fix the USB3503 driver to properly use generic GPIO bindings and read polarity from DT. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 8717c6b7414ffb890672276dccc284c23078ac0e Author: Lee Shawn C Date: Tue Dec 10 23:04:15 2019 +0800 drm/i915/cml: Separate U series pci id from origianl list. U series device need different DDI buffer setup for eDP and DP. If driver did not recognize ULT id proerply. The setting for H and S series would be used. Cc: Rodrigo Vivi Cc: Jani Nikula Cc: Anusha Srivatsa Cc: Cooper Chiou Signed-off-by: Lee Shawn C Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191210150415.10705-2-shawn.c.lee@intel.com commit b6a8781a447c71894d9f87f340b6ded00ea546c7 Author: Lee Shawn C Date: Tue Dec 10 23:04:14 2019 +0800 drm/i915/cml: Remove unsupport PCI ID commit 'a7b4deeb02b9 ("drm/i915/cml: Add CML PCI IDS)' introduced new PCI ID that CML support. But some PCI IDs were removed in BSpec for CML. This patch is used to eliminate the unsed ID. Cc: Rodrigo Vivi Cc: Jani Nikula Cc: Anusha Srivatsa Cc: Cooper Chiou Signed-off-by: Lee Shawn C Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191210150415.10705-1-shawn.c.lee@intel.com commit ad3662e239fcb0ad5e04a51d59f4f39dea7a13a7 Author: Chris Wilson Date: Thu Dec 12 14:04:33 2019 +0000 drm/i915/gt: Mark up ips_mchdev pointer access drivers/gpu/drm/i915/gt/intel_rps.c:1726:24: error: incompatible types in comparison expression (different address spaces): drivers/gpu/drm/i915/gt/intel_rps.c:1726:24: struct drm_i915_private [noderef] * drivers/gpu/drm/i915/gt/intel_rps.c:1726:24: struct drm_i915_private * Signed-off-by: Chris Wilson Reviewed-by: Venkata Sandeep Dhanalakota Link: https://patchwork.freedesktop.org/patch/msgid/20191212140459.1307617-7-chris@chris-wilson.co.uk commit 1bc9865d8df3e1c6857a27c4b2b8a9ce8f027349 Author: Chris Wilson Date: Thu Dec 12 15:42:24 2019 +0000 drm/i915: Set fence_work.ops before dma_fence_init Since dma_fence_init may call ops (because of a meaningless trace_dma_fence), we need to set the worker ops prior to that call. Reported-by: Vince Weaver Fixes: 8e458fe2ee05 ("drm/i915: Generalise the clflush dma-worker") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Vince Weaver Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191212154224.1631531-1-chris@chris-wilson.co.uk commit c30fe541896440667bd9e9068aedd1d440fbbcd2 Author: Paul E. McKenney Date: Fri Oct 11 21:40:09 2019 -0700 rcu: Mark non-global functions and variables as static Each of rcu_state, rcu_rnp_online_cpus(), rcu_dynticks_curr_cpu_in_eqs(), and rcu_dynticks_snap() are used only in the kernel/rcu/tree.o translation unit, and may thus be marked static. This commit therefore makes this change. Reported-by: Ben Dooks Signed-off-by: Paul E. McKenney Reviewed-by: Joel Fernandes (Google) commit 4414abf89158d734a83c99f6504f648417bd9550 Author: Paul E. McKenney Date: Mon Sep 23 16:31:42 2019 -0700 rcu: Remove rcu_swap_protected() Now that the calls to rcu_swap_protected() have been replaced by rcu_replace_pointer(), this commit removes rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds Signed-off-by: Paul E. McKenney Cc: Bart Van Assche Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Johannes Thumshirn Cc: Shane M Seymour Cc: Martin K. Petersen commit a191c9e9f73a78e8801b5eeb3d43bbd6fd73b86f Author: Paul E. McKenney Date: Wed Dec 11 10:30:21 2019 -0800 wireless/mediatek: Replace rcu_swap_protected() with rcu_replace_pointer() This commit replaces the use of rcu_swap_protected() with the more intuitively appealing rcu_replace_pointer() as a step towards removing rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds Reported-by: "Martin K. Petersen" [ paulmck: Apply Matthias Brugger feedback. ] Signed-off-by: Paul E. McKenney Reviewed-by: "Martin K. Petersen" Acked-by: Kalle Valo Cc: Felix Fietkau Cc: Lorenzo Bianconi Cc: Ryder Lee Cc: Roy Luo Cc: "David S. Miller" Cc: Matthias Brugger Cc: Cc: Cc: Cc: commit 1a271ebbfe33a44f61e02d35a2950ab00b32850b Author: Paul E. McKenney Date: Mon Dec 9 19:13:45 2019 -0800 net/tipc: Replace rcu_swap_protected() with rcu_replace_pointer() This commit replaces the use of rcu_swap_protected() with the more intuitively appealing rcu_replace_pointer() as a step towards removing rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds Reported-by: kbuild test robot Signed-off-by: Paul E. McKenney [ paulmck: Updated based on Ying Xue and Tuong Lien Tong feedback. ] Cc: Jon Maloy Cc: Ying Xue Cc: "David S. Miller" Cc: Cc: commit da4f2b4ccc49ab1f9e7ca7f32c1a3272806f48ce Author: Dave Gerlach Date: Wed Dec 11 14:25:58 2019 -0600 ARM: OMAP2+: am43xx: Add lcdc clockdomain As described in AM437x TRM, spruhl7h, Revised January 2018, there is an LCDC clockdomain present in the PER power domain. Although it is entirely unused on AM437x, it should be defined along with the other clockdomains so it can be shut off by Linux as there are no users. Reported-by: Munan Xu Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren commit f0b57e1901178a8c84291408c5f8dc0d81ee4a86 Author: Johnny.Chuang Date: Thu Dec 12 09:32:45 2019 -0800 Input: elants_i2c - check Remark ID when attempting firmware update To avoid flashing incompatible firmware onto a device we should check whether "Remark ID" in firmware matches with the one in the controller. This function is supported by Elan's latest version of boot code, so the driver decides whether to perform the check based on the boot code version. Signed-off-by: Johnny Chuang Link: https://lore.kernel.org/r/00a901d5af3c$193e9cd0$4bbbd670$@emc.com.tw Signed-off-by: Dmitry Torokhov commit bfe0237dd6c441f0ba531755ab24579eaee99be7 Author: Jyri Sarha Date: Wed Dec 4 16:40:24 2019 +0200 ARM: dts: am335x-icev2: Add support for OSD9616P0899-10 at i2c0 Add support for OSD9616P0899-10 96x16 passive matrix display. The pre-charge period parameters are taken form a OSD9616P0899-10 document, but the display works fine with the default values too. Signed-off-by: Jyri Sarha Reviewed-by: Tomi Valkeinen Signed-off-by: Tony Lindgren commit 32ee9fdf66b746bf80bd4ec40835bf55bed4b413 Author: Jyri Sarha Date: Wed Dec 4 12:55:54 2019 +0200 ARM: dts: am335x-evmsk: Use drm simple-panel instead of tilcdc-panel Move to use the new drm panel support in tilcdc together with added "newhaven,nhd-4.3-480272ef-atxl"-panel support in drm panel-simple. Signed-off-by: Jyri Sarha Tested-by: Peter Ujfalusi Signed-off-by: Tony Lindgren commit c8d37f625fed98ce5ca58bd1a52992635bbb8419 Author: Jyri Sarha Date: Tue Dec 3 11:11:19 2019 +0200 ARM: dts: am335x-evm: Use drm simple-panel instead of tilcdc-panel Move to use the new drm panel support in tilcdc together with added "tfc,s9700rtwv43tr-01b"-panel support in drm panel-simple. Signed-off-by: Jyri Sarha Reviewed-by: Laurent Pinchart Signed-off-by: Tony Lindgren commit 65d26052d513d3a4b17a4040bcdb6de62dbb3c81 Author: Grygorii Strashko Date: Wed Nov 27 17:32:12 2019 +0200 ARM: dts: omap3: name mdio node properly Rename davinci_mdio DT node "ethernet"->"mdio" This fixes the following DT schemas check errors: am3517-craneboard.dt.yaml: ethernet@5c030000: $nodename:0: 'ethernet@5c030000' does not match '^mdio(@.*)?' Signed-off-by: Grygorii Strashko Signed-off-by: Tony Lindgren commit edb71d34de39620af2d3cd72f1ac9eface7152e2 Author: Tomi Valkeinen Date: Mon Nov 25 15:11:00 2019 +0200 ARM: dts: am57xx-idk-common: add HDMI to the common dtsi AM571x/AM572x/AM574x IDK base boards have HDMI output. Add DT nodes to am57xx-idk-common.dtsi to enable HDMI. Signed-off-by: Tomi Valkeinen Signed-off-by: Tony Lindgren commit bf21e6e1b0c72aff635fec7e4f0d6277526b8d1b Author: Tomi Valkeinen Date: Mon Nov 25 15:10:59 2019 +0200 ARM: dts: dra76-evm: add HDMI output Add DRA76 EVM HDMI output for the base board. Signed-off-by: Tomi Valkeinen Signed-off-by: Tony Lindgren commit 3f2c420596be57e74719bd09333d3b5efe90341d Author: zhengbin Date: Mon Nov 18 18:37:32 2019 +0800 bus: ti-sysc: Use PTR_ERR_OR_ZERO() to simplify code Fixes coccicheck warning: drivers/bus/ti-sysc.c:506:1-3: WARNING: PTR_ERR_OR_ZERO can be used Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Tony Lindgren commit 426d4447f92c7643a94269270bf71afa23618af1 Author: Suman Anna Date: Thu Dec 12 14:47:51 2019 +0200 bus: ti-sysc: Drop MMU quirks The OMAP IOMMU driver no longer uses the pm_runtime_irq_safe() API after commit 1432ebbd6003 ("iommu/omap: remove pm_runtime_irq_safe flag for OMAP IOMMUs"), so the SYSC_QUIRK_LEGACY_IDLE quirk is no longer needed for MMU devices. Drop the same. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit 94f6345712b37e4bb23cb265ce4c65b9d177e75a Author: Tony Lindgren Date: Thu Dec 12 08:57:58 2019 -0800 bus: ti-sysc: Implement quirk handling for CLKDM_NOAUTO For dra7 dcan and dwc3 instances we need to block clockdomain autoidle. Let's do this with CLKDM_NOAUTO quirk flag and enable it for dcan and dwc3. Cc: Keerthy Cc: Roger Quadros Cc: Tero Kristo Signed-off-by: Tony Lindgren commit 373894f83b52423e4eb05566977c9c38985b0b57 Author: Enrico Weigelt, metux IT consult Date: Thu Dec 12 14:33:06 2019 +0100 gpio: remove unneeded MODULE_VERSION() usage Remove MODULE_VERSION(), as it isn't needed at all: the only version making sense is the kernel version. Signed-off-by: Enrico Weigelt, metux IT consult Signed-off-by: Bartosz Golaszewski commit 57e960f0020ec46db277426762ba5ffe77e03e3c Author: Takashi Iwai Date: Wed Dec 11 18:20:19 2019 +0100 ASoC: SOF: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Cc: Pierre-Louis Bossart Cc: Ranjani Sridharan Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191211172019.23206-2-tiwai@suse.de Signed-off-by: Mark Brown commit bf523463d8c38cd92424ed011b90769c29ef99ce Author: Takashi Iwai Date: Wed Dec 11 18:20:18 2019 +0100 ASoC: mediatek: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped, as well as the superfluous snd_pcm_lib_preallocate_free_for_all() call. As of the result, hw_free and pcm_destruct ops became empty and got removed. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191211172019.23206-1-tiwai@suse.de Signed-off-by: Mark Brown commit 461011b1e1ab62aa8a8af78d5b7ee0f81bd1fa37 Author: Ravi Patel Date: Tue Nov 12 00:35:55 2019 -0800 drivers: firmware: xilinx: Add support for feature check Query for corresponding feature before calling EEMI API from the driver. Signed-off-by: Ravi Patel Signed-off-by: Michal Simek Signed-off-by: Rajan Vaja commit df906cf54bd54dbc87efb5129ce38e3ca9e7d329 Author: Anurag Kumar Vulisha Date: Tue Sep 10 15:17:22 2019 +0000 arm64: zynqmp: Add dr_mode property to usb node This patch adds dr_mode property to the usb node for zynqmp boards. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Michal Simek commit a6764cbda6c64b76a3f7511c099fc1a0accca5b0 Author: Laurent Pinchart Date: Fri Nov 8 19:30:32 2019 +0200 arm64: dts: zynqmp: Use decimal values for drm-clock properties The #clock-cells and clock-accuracy properties are all expressed in decimal, except for the drm-clock. Fix it, as decimal is easier to read for those properties. Signed-off-by: Laurent Pinchart Signed-off-by: Michal Simek commit a8fdb80f4d477a71a98cb069f4d5a42f41bbbe9c Author: Manish Narani Date: Thu Nov 21 14:21:14 2019 +0530 arm64: zynqmp: Add ZynqMP SDHCI compatible string Add the new compatible string for ZynqMP SD Host Controller for its use in the Arasan SDHCI driver for some of the ZynqMP specific operations. Add required properties for the same. Signed-off-by: Manish Narani Signed-off-by: Michal Simek commit f47825c694851955fa4c492dd56809621529b086 Merge: 96c9e1de9954 2b60c0ecedf8 Author: Mimi Zohar Date: Thu Dec 12 08:59:26 2019 -0500 Merge branch 'next-integrity.measure-keys' into next-integrity From "KEYS: Measure keys when they are created or updated" cover letter: Keys created or updated in the system are currently not measured. Therefore an attestation service, for instance, would not be able to attest whether or not the trusted keys keyring(s), for instance, contain only known good (trusted) keys. IMA measures system files, command line arguments passed to kexec, boot aggregate, etc. It can be used to measure keys as well. But there is no mechanism available in the kernel for IMA to know when a key is created or updated. This change aims to address measuring keys created or updated in the system. To achieve the above the following changes have been made: - Added a new IMA hook namely, ima_post_key_create_or_update, which measures the key. This IMA hook is called from key_create_or_update function. The key measurement can be controlled through IMA policy. A new IMA policy function KEY_CHECK has been added to measure keys. "keyrings=" option can be specified for KEY_CHECK to limit measuring the keys loaded onto the specified keyrings only. uid can be specified to further restrict key measurement for keys created by specific user. # measure keys loaded onto any keyring measure func=KEY_CHECK # measure keys loaded onto the IMA keyring only for root user measure func=KEY_CHECK uid=0 keyring=".ima" # measure keys on the BUILTIN and IMA keyrings into a different PCR measure func=KEY_CHECK keyring=".builtin_trusted_keys|.ima" pcr=11 commit 2b60c0ecedf8d43b35a3c8554e72e8daca93fbcf Author: Lakshmi Ramasubramanian Date: Wed Dec 11 08:47:07 2019 -0800 IMA: Read keyrings= option from the IMA policy Read "keyrings=" option, if specified in the IMA policy, and store in the list of IMA rules when the configured IMA policy is read. This patch defines a new policy token enum namely Opt_keyrings and an option flag IMA_KEYRINGS for reading "keyrings=" option from the IMA policy. Updated ima_parse_rule() to parse "keyrings=" option in the policy. Updated ima_policy_show() to display "keyrings=" option. The following example illustrates how key measurement can be verified. Sample "key" measurement rule in the IMA policy: measure func=KEY_CHECK uid=0 keyrings=.ima|.evm template=ima-buf Display "key" measurement in the IMA measurement list: cat /sys/kernel/security/ima/ascii_runtime_measurements 10 faf3...e702 ima-buf sha256:27c915b8ddb9fae7214cf0a8a7043cc3eeeaa7539bcb136f8427067b5f6c3b7b .ima 308202863082...4aee Verify "key" measurement data for a key added to ".ima" keyring: cat /sys/kernel/security/integrity/ima/ascii_runtime_measurements | grep -m 1 "\.ima" | cut -d' ' -f 6 | xxd -r -p |tee ima-cert.der | sha256sum | cut -d' ' -f 1 The output of the above command should match the template hash of the first "key" measurement entry in the IMA measurement list for the key added to ".ima" keyring. The file namely "ima-cert.der" generated by the above command should be a valid x509 certificate (in DER format) and should match the one that was used to import the key to the ".ima" keyring. The certificate file can be verified using openssl tool. Signed-off-by: Lakshmi Ramasubramanian Signed-off-by: Mimi Zohar commit e9085e0ad38a333012629d815c203155d61ebe7e Author: Lakshmi Ramasubramanian Date: Wed Dec 11 08:47:06 2019 -0800 IMA: Add support to limit measuring keys Limit measuring keys to those keys being loaded onto a given set of keyrings only and when the user id (uid) matches if uid is specified in the policy. This patch defines a new IMA policy option namely "keyrings=" that can be used to specify a set of keyrings. If this option is specified in the policy for "measure func=KEY_CHECK" then only the keys loaded onto a keyring given in the "keyrings=" option are measured. If uid is specified in the policy then the key is measured only if the current user id matches the one specified in the policy. Added a new parameter namely "keyring" (name of the keyring) to process_buffer_measurement(). The keyring name is passed to ima_get_action() to determine the required action. ima_match_rules() is updated to check keyring in the policy, if specified, for KEY_CHECK function. Signed-off-by: Lakshmi Ramasubramanian Signed-off-by: Mimi Zohar commit cb1aa3823c9280f2bb8218cdb5cb05721e0376b1 Author: Lakshmi Ramasubramanian Date: Wed Dec 11 08:47:05 2019 -0800 KEYS: Call the IMA hook to measure keys Call the IMA hook from key_create_or_update() function to measure the payload when a new key is created or an existing key is updated. This patch adds the call to the IMA hook from key_create_or_update() function to measure the key on key create or update. Signed-off-by: Lakshmi Ramasubramanian Cc: David Howells Cc: Jarkko Sakkinen Signed-off-by: Mimi Zohar commit 88e70da170e8945f6b1c1299083d1b942705beb5 Author: Lakshmi Ramasubramanian Date: Wed Dec 11 08:47:04 2019 -0800 IMA: Define an IMA hook to measure keys Measure asymmetric keys used for verifying file signatures, certificates, etc. This patch defines a new IMA hook namely ima_post_key_create_or_update() to measure the payload used to create a new asymmetric key or update an existing asymmetric key. Asymmetric key structure is defined only when CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE is defined. Since the IMA hook measures asymmetric keys, the IMA hook is defined in a new file namely ima_asymmetric_keys.c which is built only if CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE is defined. Signed-off-by: Lakshmi Ramasubramanian Signed-off-by: Mimi Zohar commit 5808611cccb28044940d04ebd303dc90f33b77b1 Author: Lakshmi Ramasubramanian Date: Wed Dec 11 08:47:03 2019 -0800 IMA: Add KEY_CHECK func to measure keys Measure keys loaded onto any keyring. This patch defines a new IMA policy func namely KEY_CHECK to measure keys. Updated ima_match_rules() to check for KEY_CHECK and ima_parse_rule() to handle KEY_CHECK. Signed-off-by: Lakshmi Ramasubramanian Signed-off-by: Mimi Zohar commit c5563bad88e07017e08cce1142903e501598c80c Author: Lakshmi Ramasubramanian Date: Wed Dec 11 08:47:02 2019 -0800 IMA: Check IMA policy flag process_buffer_measurement() may be called prior to IMA being initialized (for instance, when the IMA hook is called when a key is added to the .builtin_trusted_keys keyring), which would result in a kernel panic. This patch adds the check in process_buffer_measurement() to return immediately if IMA is not initialized yet. Signed-off-by: Lakshmi Ramasubramanian Signed-off-by: Mimi Zohar commit 96c9e1de99545ce4be1b5e7dff217a896ba96d06 Author: Patrick Callaghan Date: Mon Nov 11 14:23:48 2019 -0500 ima: avoid appraise error for hash calc interrupt The integrity_kernel_read() call in ima_calc_file_hash_tfm() can return a value of 0 before all bytes of the file are read. A value of 0 would normally indicate an EOF. This has been observed if a user process is causing a file appraisal and is terminated with a SIGTERM signal. The most common occurrence of seeing the problem is if a shutdown or systemd reload is initiated while files are being appraised. The problem is similar to commit (ima: always return negative code for error) that fixed the problem in ima_calc_file_hash_atfm(). Suggested-by: Mimi Zohar Signed-off-by: Patrick Callaghan Reviewed-by: Sascha Hauer Signed-off-by: Mimi Zohar commit 210a292874517782bed2e2220c7beb1608d3b05d Author: Yang Guo Date: Thu Dec 12 10:02:24 2019 +0800 selinux: remove unnecessary selinux cred request task_security_struct was obtained at the beginning of may_create and selinux_inode_init_security, no need to obtain again. may_create will be called very frequently when create dir and file. Cc: Paul Moore Cc: Stephen Smalley Cc: Eric Paris Signed-off-by: Yang Guo Signed-off-by: Shaokun Zhang Signed-off-by: Paul Moore commit 4562fa4c86c92a2df635fe0697c9e06379738741 Author: Anson Huang Date: Wed Dec 11 10:53:36 2019 +0800 ARM: imx: Enable ARM_ERRATA_814220 for i.MX6UL and i.MX7D ARM_ERRATA_814220 has below description: The v7 ARM states that all cache and branch predictor maintenance operations that do not specify an address execute, relative to each other, in program order. However, because of this erratum, an L2 set/way cache maintenance operation can overtake an L1 set/way cache maintenance operation. This ERRATA only affected the Cortex-A7 and present in r0p2, r0p3, r0p4, r0p5. i.MX6UL and i.MX7D have Cortex-A7 r0p5 inside, need to enable ARM_ERRATA_814220 for proper workaround. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit b3082f1bf8a604c9a0f483b5d6060d7255c2a51b Author: Anson Huang Date: Mon Nov 4 15:35:31 2019 +0800 ARM: imx: Add i.MX7ULP SoC serial number support i.MX7ULP's unique ID layout in OCOTP is different from other i.MX6/7 SoCs as below: OCOTP layout unique ID 0x4b0 bit[15:0] bit[15:0] 0x4c0 bit[15:0] bit[31:16] 0x4d0 bit[15:0] bit[47:32] 0x4e0 bit[15:0] bit[63:48] Add support for reading serial number from OCOTP on i.MX7ULP. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit b58a8813ee6d65e98ee02b3d3036c6a75ac7e694 Author: Michal Wajdeczko Date: Thu Dec 12 12:19:03 2019 +0000 drm/i915: Improve i915_inject_probe_error macro On non-debug builds we were not using i915 param and thus we may cause "unused variable" warning/error if caller was not using i915 elsewhere. Let compiler see this param. Signed-off-by: Michal Wajdeczko Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191212121903.72524-1-michal.wajdeczko@intel.com commit 3ee959b19c6faa7ee4666460961111fa42262149 Author: Philippe Schenker Date: Thu Dec 12 10:38:10 2019 +0000 ARM: dts: colibri-imx6ull: correct wrong pinmuxing and add comments Some pinmuxings are obviously wrong, originating from a copy/paste error. This patch corrects that with the following strategy: - Set all reserved bits to zero - Leave drive strength and slew rate as is - Add sensible pull and hysteresis depending on the function of the pin - Not used pins are muxed to their reset-value defined by the SoC Signed-off-by: Philippe Schenker Signed-off-by: Shawn Guo commit 9fe0d41ffd39cb4891b53015433580ff6ecb0444 Author: Greg Kroah-Hartman Date: Tue Dec 10 15:37:06 2019 +0100 tty: serial: samsung_tty: fix blank line checkpatch warning checkpatch is giving a bunch of: WARNING: Missing a blank line after declarations messages on this file, so fix up all instances of that issue. Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Hyunki Koo Cc: HYUN-KI KOO Cc: Shinbeom Choi Cc: Jiri Slaby Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20191210143706.3928480-10-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 7c175251c16e0b09a30667698663b7d311590b43 Author: Greg Kroah-Hartman Date: Tue Dec 10 15:37:05 2019 +0100 tty: serial: samsung_tty: fix up minor comment formatting Fix up some minor formatting of comment blocks to make checkpatch happier and to make things look more uniform. Cc: Kukjin Kim Cc: Hyunki Koo Cc: HYUN-KI KOO Cc: Shinbeom Choi Cc: Jiri Slaby Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191210143706.3928480-9-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 90ece856a227c4a787f0c79105810f740c65c472 Author: Greg Kroah-Hartman Date: Tue Dec 10 15:37:04 2019 +0100 tty: serial: samsung_tty: use 'unsigned int' not 'unsigned' The function uart_console_write() expects an unsigned int, so use that variable type, not 'unsigned', which is generally frowned apon in the kernel now. Cc: Kukjin Kim Cc: Hyunki Koo Cc: HYUN-KI KOO Cc: Shinbeom Choi Cc: Jiri Slaby Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191210143706.3928480-8-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a05025d0ce726efca52963044a055aef54c324bb Author: Greg Kroah-Hartman Date: Tue Dec 10 15:37:03 2019 +0100 tty: serial: samsung_tty: use standard debugging macros The dbg() macro for the driver is not needed at all, all drivers should use the common dynamic debugging infrastructure, not roll their own. So delete the custom macro and convert the driver to use dev_dbg() instead, providing a lot more information than the previous macro provided. Cc: Kukjin Kim Cc: Hyunki Koo Cc: HYUN-KI KOO Cc: Shinbeom Choi Cc: Jiri Slaby Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191210143706.3928480-7-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit f187a7fdfc92cfba2b19a21c9415668fd1ebe3e0 Author: Greg Kroah-Hartman Date: Tue Dec 10 15:37:02 2019 +0100 tty: serial: samsung_tty: drop unneded dbg() calls Now that the kernel has ftrace, any debugging calls that just do "made it to this function!" and "leaving this function!" can be removed. On the quest to move the samsung_tty driver over to use the standard kernel debugging functions, drop these unneeded calls. Cc: Kukjin Kim Cc: Hyunki Koo Cc: HYUN-KI KOO Cc: Shinbeom Choi Cc: Jiri Slaby Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191210143706.3928480-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 43df170be77cf919353f1e753fafb04f13b9cec5 Author: Greg Kroah-Hartman Date: Tue Dec 10 15:37:01 2019 +0100 tty: serial: samsung_tty: delete samsung.h There is no need for a .h file for a single .c file, so just move all of the content of samsung.h into samsung_tty.c Cc: Kukjin Kim Cc: Hyunki Koo Cc: HYUN-KI KOO Cc: Shinbeom Choi Cc: Jiri Slaby Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191210143706.3928480-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 120c8be9476c1da0b77990d1be8bcac1f8a65ecc Author: Greg Kroah-Hartman Date: Tue Dec 10 15:37:00 2019 +0100 tty: serial: samsung.h: remove reset_port callback from struct s3c24xx_uart_info The callback was never set, nor called, so remove the pointer entirely from struct s3c24xx_uart_info. Cc: Kukjin Kim Cc: Hyunki Koo Cc: HYUN-KI KOO Cc: Shinbeom Choi Cc: Jiri Slaby Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191210143706.3928480-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 58bf6f3fe4b87862ac5be819946dd66bab9ddd8a Author: Greg Kroah-Hartman Date: Tue Dec 10 15:36:59 2019 +0100 tty: serial: samsung.h: fix up minor comment issues checkpatch found some minor issues with comments in samsung.h, so fix that up. Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Hyunki Koo Cc: HYUN-KI KOO Cc: Shinbeom Choi Cc: Jiri Slaby Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20191210143706.3928480-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 06674e54cc412c47cc2b909cb06c85521999763c Author: Greg Kroah-Hartman Date: Tue Dec 10 15:36:58 2019 +0100 tty: serial: samsung_tty: fix build warning Fix a build warning on systems that do not have CONFIG_OF enabled. Cc: Kukjin Kim Cc: Hyunki Koo Cc: HYUN-KI KOO Cc: Shinbeom Choi Cc: Jiri Slaby Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191210143706.3928480-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit b87671f17c3e94e80b802904d80b6ed213ac70ae Author: Greg Kroah-Hartman Date: Tue Dec 10 15:36:57 2019 +0100 tty: serial: samsung: allow driver to be built by anyone There is no need to tie this driver to only the Exynos platform, especially for build testing. So add COMPILE_TEST as an option allowing it to be built on any platform. Cc: Kukjin Kim Cc: Hyunki Koo Cc: HYUN-KI KOO Cc: Shinbeom Choi Cc: Jiri Slaby Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20191210143706.3928480-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 751d0017334db9c4d68a8909c59f662a6ecbcec6 Author: David Engraf Date: Wed Dec 11 17:29:54 2019 +0100 tty/serial: atmel: fix out of range clock divider handling Use MCK_DIV8 when the clock divider is > 65535. Unfortunately the mode register was already written thus the clock selection is ignored. Fix by writing the mode register after calculating the baudrate. Signed-off-by: David Engraf Link: https://lore.kernel.org/r/20191211162954.8393-1-david.engraf@sysgo.com Signed-off-by: Greg Kroah-Hartman commit 2301ec36cec8cd8199b608651a806441ab70331b Author: Shubhrajyoti Datta Date: Mon Dec 9 12:00:48 2019 +0530 tty: pl011: Add suspend resume support Add the suspend and resume handlers for the versal uart platform driver. Adds the suspend for sbsa driver. Sbsa is a subset of the pl011 driver. Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/1575873048-14313-1-git-send-email-shubhrajyoti.datta@gmail.com Signed-off-by: Greg Kroah-Hartman commit 94345aee285334e9e12fc70572e3d9380791a64e Author: Xiongfeng Wang Date: Fri Dec 6 16:05:26 2019 +0800 tty: serial: amba-pl011: remove set but unused variable Fix the following warning: drivers/tty/serial/amba-pl011.c: In function check_apply_cts_event_workaround: drivers/tty/serial/amba-pl011.c:1461:15: warning: variable dummy_read set but not used [-Wunused-but-set-variable] The data read is useless and can be dropped. Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang Link: https://lore.kernel.org/r/1575619526-34482-1-git-send-email-wangxiongfeng2@huawei.com Signed-off-by: Greg Kroah-Hartman commit 98aee0c9444e5a5ce6de22cebc8071c8e140bcda Author: Chen Wandun Date: Fri Nov 22 20:04:18 2019 +0800 tty: serial: samsung: remove variable 'ufstat' set but not used Fixes gcc '-Wunused-but-set-variable' warning: drivers/tty/serial/samsung_tty.c: In function s3c24xx_serial_rx_chars_dma: drivers/tty/serial/samsung_tty.c:549:24: warning: variable ufstat set but not used [-Wunused-but-set-variable] Signed-off-by: Chen Wandun Link: https://lore.kernel.org/r/1574424258-138975-1-git-send-email-chenwandun@huawei.com Signed-off-by: Greg Kroah-Hartman commit 686c7c35abc2201535e6921f9f5610a0b3c9194a Author: Chris Wilson Date: Wed Dec 11 23:08:57 2019 +0000 drm/i915/gem: Asynchronous cmdparser Execute the cmdparser asynchronously as part of the submission pipeline. Using our dma-fences, we can schedule execution after an asynchronous piece of work, so we move the cmdparser out from under the struct_mutex inside execbuf as run it as part of the submission pipeline. The same security rules apply, we copy the user batch before validation and userspace cannot touch the validation shadow. The only caveat is that we will do request construction before we complete cmdparsing and so we cannot know the outcome of the validation step until later -- so the execbuf ioctl does not report -EINVAL directly, but we must cancel execution of the request and flag the error on the out-fence. Closes: https://gitlab.freedesktop.org/drm/intel/issues/611 Closes: https://gitlab.freedesktop.org/drm/intel/issues/412 Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191211230858.599030-2-chris@chris-wilson.co.uk commit 32d94048b988469f8bd62cdc6d934f9f58c2b7c5 Author: Chris Wilson Date: Wed Dec 11 23:08:56 2019 +0000 drm/i915/gem: Prepare gen7 cmdparser for async execution The gen7 cmdparser is primarily a promotion-based system to allow access to additional registers beyond the HW validation, and allows fallback to normal execution of the user batch buffer if valid and requires chaining. In the next patch, we will do the cmdparser validation in the pipeline asynchronously and so at the point of request construction we will not know if we want to execute the privileged and validated batch, or the original user batch. The solution employed here is to execute both batches, one with raised privileges and one as normal. This is because the gen7 MI_BATCH_BUFFER_START command cannot change privilege level within a batch and must strictly use the current privilege level (or undefined behaviour kills the GPU). So in order to execute the original batch, we need a second non-priviledged batch buffer chain from the ring, i.e. we need to emit two batches for each user batch. Inside the two batches we determine which one should actually execute, we provide a conditional trampoline to call the original batch. Implementation-wise, we create a single buffer and write the shadow and the trampoline inside it at different offsets; and bind the buffer into both the kernel GGTT for the privileged execution of the shadow and into the user ppGTT for the non-privileged execution of the trampoline and original batch. One buffer, two batches and two vma. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191211230858.599030-1-chris@chris-wilson.co.uk commit ddd8891e01ecd87c81c04f6eb169be193868b884 Author: Geert Uytterhoeven Date: Wed Nov 27 09:42:47 2019 +0100 gpiolib: Add GPIOCHIP_NAME definition The string literal "gpiochip" is used in several places. Add a definition for it, and use it everywhere, to make sure everything stays in sync. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191127084253.16356-2-geert+renesas@glider.be Reviewed-by: Ulrich Hecht Reviewed-by: Eugeniu Rosca Signed-off-by: Linus Walleij commit a7caba8ac04c042afab91f77b7a4f74b79c9bbef Author: Nishad Kamdar Date: Wed Nov 27 22:17:46 2019 +0530 pinctrl: stm32: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related to STMicroelectronics pinctrl driver. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Link: https://lore.kernel.org/r/14bb695da50f7af8499e7dfc32c2ab753d92a3e9.1574871463.git.nishadkamdar@gmail.com Signed-off-by: Linus Walleij commit 5367601b52696004f363e4f6c0b228b5bbf7d8b7 Author: Greg Kroah-Hartman Date: Mon Dec 9 20:32:58 2019 +0100 drivers/base: base.h: add proper copyright and header info base.h didn't have any copyright information in it, so update it with the correct information. Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20191209193303.1694546-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 86951164f3b3670529cf839e33ca62fe19b410f6 Author: Nishad Kamdar Date: Wed Nov 27 22:14:22 2019 +0530 pinctrl: meson-axg: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related Meson axg SoC pinctrl driver. It assigns explicit block comment for the SPDX License Identifier. Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Link: https://lore.kernel.org/r/bcb86aa22d8d8499502bbd8c54a364be24886a86.1574871463.git.nishadkamdar@gmail.com Signed-off-by: Linus Walleij commit c81d37bc9f055d28af020107e11b21867ddbd8e8 Author: Nishad Kamdar Date: Wed Nov 27 22:12:33 2019 +0530 pinctrl: mediatek: Use the correct style for SPDX License Identifier This patch corrects the SPDX License Identifier style in header file related mediatek mt2712 pinctrl driver. For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). Changes made by using a script provided by Joe Perches here: https://lkml.org/lkml/2019/2/7/46. Suggested-by: Joe Perches Signed-off-by: Nishad Kamdar Link: https://lore.kernel.org/r/2994fb2f3375790e832396cdbb0a279dc8c8839f.1574871463.git.nishadkamdar@gmail.com Signed-off-by: Linus Walleij commit 7d929989bb7c476b3ef01dc5cd111622e42e78ea Author: Chris Wilson Date: Thu Dec 12 07:27:37 2019 +0000 drm/i915/gt: Only ignore rc6 parking for PCU on byt/bsw An oversight in that we use rc6->ctl_enable to disable rc6 on gen9 and so it does not simply indicate indirect control via a PCU. Switch the rc6->ctl_enable check for a platform-based check. Fixes: 972745fd5770 ("drm/i915/gt: Disable manual rc6 for Braswell/Baytrail") Signed-off-by: Chris Wilson Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191212072737.884335-2-chris@chris-wilson.co.uk commit 341a79ee8b080ed41dccc13250fcffc2c2028ccd Author: Takashi Iwai Date: Thu Dec 12 09:05:18 2019 +0100 ALSA: hda: tegra: Fix unused variable compile warning Forgot to remove the variable declaration as well in the last commit. sound/pci/hda/hda_tegra.c: In function 'hda_tegra_runtime_suspend': sound/pci/hda/hda_tegra.c:169:19: warning: unused variable 'bus' [-Wunused-variable] Fixes: f36da9406e66 ("ALSA: hda: Support PCM sync_stop") Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20191212080518.6522-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 017e7856ede5e5757faaeaab60d8e7499b82f66a Author: Sibi Sankar Date: Mon Nov 18 17:40:23 2019 +0000 arm64: dts: sm8150: Add rpmh power-domain node Add the DT node for the rpmhpd power controller. Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson Reviewed-by: Rajendra Nayak Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/0101016e7f99eab9-35efa01f-8ed3-4a77-87e1-09c381173121-000000@us-west-2.amazonses.com [bjorn: Use constant for opp6, until include lands] Signed-off-by: Bjorn Andersson commit a30657b6387b821e31d4a7d8ad5bc32ae532cfe9 Author: Sibi Sankar Date: Mon Nov 18 17:40:19 2019 +0000 soc: qcom: rpmhpd: Add SC7180 RPMH power-domains Add support for cx/mx/gfx/lcx/lmx/mss power-domains found on SC7180 SoCs. Reviewed-by: Bjorn Andersson Reviewed-by: Rajendra Nayak Reviewed-by: Stephen Boyd Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/0101016e7f99d9ec-1a5d07da-0a61-4627-bf95-fa9ae06265ca-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit 52a4cb577bde6e69fae451c10c8b2ec69033263a Author: Sibi Sankar Date: Mon Nov 18 17:40:15 2019 +0000 dt-bindings: power: Add rpmh power-domain bindings for sc7180 Add RPMH power-domain bindings for the SC7180 family of SoCs. Reviewed-by: Stephen Boyd Reviewed-by: Rajendra Nayak Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/0101016e7f99ca4e-47d442f4-b923-4eea-b812-898e5476beab-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit 4e6a2011fdbeba69cc2b54c20400036b47120a7a Author: Sibi Sankar Date: Mon Nov 18 17:40:11 2019 +0000 soc: qcom: rpmhpd: Add SM8150 RPMH power-domains Add support for cx/mx/gfx/mss/ebi/mmcx/lmx/lcx power-domains found on SM8150 SoCs. Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson Reviewed-by: Rajendra Nayak Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/0101016e7f99b98b-4a436053-3da0-4011-a41c-de064fb44d7e-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit 18ec173d56a13d239dfabe9fe67c36edaa155847 Author: Sibi Sankar Date: Mon Nov 18 17:40:08 2019 +0000 dt-bindings: power: Add rpmh power-domain bindings for SM8150 Add RPMH power-domain bindings for the SM8150 family of SoCs. Reviewed-by: Bjorn Andersson Reviewed-by: Stephen Boyd Reviewed-by: Rajendra Nayak Reviewed-by: Rob Herring Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/0101016e7f99ad2b-2bce2fac-2f02-4b3f-ac64-09942f7251ea-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit 17cfcb68af3bc7d5e8ae08779b1853310a2949f3 Author: james qian wang (Arm Technology China) Date: Tue Dec 10 08:48:51 2019 +0000 drm/komeda: Enable new product D32 support D32 is simple version of D71, the difference is: - Only has one pipeline - Drop the periph block and merge it to GCU v2: Rebase. v3: Isolate the block counting fix to a new patch Signed-off-by: James Qian Wang (Arm Technology China) Reviewed-by: Mihail Atanassov Link: https://patchwork.freedesktop.org/patch/msgid/20191210084828.19664-3-james.qian.wang@arm.com commit b25bc78f8a0750125604e6b82650eb6e990cb09d Author: james qian wang (Arm Technology China) Date: Tue Dec 10 08:48:46 2019 +0000 drm/komeda: Update the chip identify 1. Drop komeda-CORE product id comparison and put it into the d71_identify 2. Update pipeline node DT-binding: (a). Skip the needless pipeline DT node. (b). Return fail if the essential pipeline DT node is missing. With these changes, for chips in same family no need to change the DT. v2: Rebase v3: Address Mihail's comments. Signed-off-by: james qian wang (Arm Technology China) Reviewed-by: Mihail Atanassov Link: https://patchwork.freedesktop.org/patch/msgid/20191210084828.19664-2-james.qian.wang@arm.com commit 9868a31c3134c5b96e658f0b44fb64fc69b14d49 Author: Rajendra Nayak Date: Wed Dec 11 07:13:09 2019 +0000 arm64: dts: sc7180: Add aliases for all i2c and spi devices Add aliases for all i2c and spi nodes Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/0101016ef3cded0a-f85e1f98-f3be-4f6f-805f-82f8b6a83e14-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit d8b076b891df8e63d17ed908c2d83dd7e72a51fd Author: Rajendra Nayak Date: Wed Dec 11 07:12:53 2019 +0000 arm64: dts: sc7180: Remove additional spi chip select muxes remove the additional CS muxes that were added by default for spi so every board using sc7180 does not have to override it. Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/0101016ef3cdad4a-cbfbc482-1f74-4cb7-88fc-b4b6ed7e7543-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit 4868f573a754f992a06f30f5f860bb57e3739ffb Author: Loic Poulain Date: Wed Dec 11 17:50:14 2019 +0100 arm: dts: qcom: db410c: Enable USB OTG support The Dragonboard-410c is able to act either as USB Host or Device. The role can be determined at runtime via the USB_HS_ID pin which is derived from the micro-usb port VBUS pin. In Host role, SoC USB D+/D- are routed to the onboard USB 2.0 HUB. In Device role, SoC USB D+/D- are routed to the USB 2.0 micro B port. Routing is selected via USB_SW_SEL_PM gpio. In device role USB HUB can be held in reset. chipidea driver expects two extcon device pointers, one for the EXTCON_USB event and one for the EXTCON_USB_HOST event. Since the extcon-usb-gpio device is capable of generating both these events, point two times to this extcon device. Signed-off-by: Loic Poulain Link: https://lore.kernel.org/r/1576083014-5842-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Bjorn Andersson commit 6fd70eab49caf32a0b486b4bf098bf885bda48e8 Author: james qian wang (Arm Technology China) Date: Tue Dec 10 06:10:34 2019 +0000 drm/komeda: Correct d71 register block counting Per HW, d71->num_blocks includes reserved blocks but no PERIPH block, correct the block counting accordingly. D71 happens to only have one reserved block and periph block, which hides this counting error. Signed-off-by: james qian wang (Arm Technology China) Reviewed-by: Mihail Atanassov Link: https://patchwork.freedesktop.org/patch/msgid/20191210061015.25905-1-james.qian.wang@arm.com commit 741a5ea7a69717ea1368ed98e431fbd6f5629a88 Author: Stephan Gerhold Date: Wed Dec 11 20:29:06 2019 +0100 arm64: dts: qcom: pm8916: Add vibration motor node PM8916 has one vibration motor driver that is already supported by the pm8xxx-vibrator driver. Add a node describing it to pm8916.dtsi. Keep it disabled by default since not all devices make use of it. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191211192906.56638-1-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 09f6a72d014386939d21899921dd379006471a4b Author: Pierre-Louis Bossart Date: Wed Dec 11 19:45:07 2019 -0600 soundwire: intel: add clock stop quirks Due to power rail dependencies, the SoundWire Master driver cannot make decisions on its own when entering pm runtime suspend. Add quirk mask for each link, so that the SOF parent driver can inform the SoundWire master driver of the desired behavior: a) leave clock on b) power-off instead of clock stop c) power-off if all devices cannot generate wakes d) force bus reset on clock restart Note that for now the interface with the SOF driver relies on a single mask for all links. If needed, the interface might be modified at a later point to provide more freedom. The code at the lower level does not assume any commonality between links. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191212014507.28050-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 4da0680f24c9af2de8406ded68c4ef967f448de3 Author: Pierre-Louis Bossart Date: Wed Dec 11 19:45:06 2019 -0600 soundwire: intel: add mutex for shared SHIM register access Some of the Intel SoundWire SHIM registers contain fields for different links. Without protection, the master drivers for the different links will access these shared registers, leading to invalid configurations and timeouts (specifically when changing CPA/SPA power-related registers and polling for the changes to be applied). A mutex is added to make sure all rmw access to those registers are serialized. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191212014507.28050-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 905b5a81afe15e8252e5892b8ca1ff1c1adfb79d Author: Rander Wang Date: Wed Dec 11 19:45:05 2019 -0600 soundwire: intel: add prototype for WAKEEN interrupt processing In ClockStop mode, the PCI device will be notified of a wake, which will be handled from an interrupt thread. Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191212014507.28050-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit eae0b60d64834c75a460d96b1d1e0e187381e341 Author: Bard Liao Date: Wed Dec 11 19:45:04 2019 -0600 soundwire: intel: add link_list to handle interrupts with a single thread In MSI mode, the use of separate handlers and threads for the Intel IPC, stream and SoundWire shared interrupt leads to timeouts and lost interrupts. The solution is to merge all interrupt handling across all links with a single thread function. The use of a linked list enables this thread function to walk through all contexts and figure out which link needs attention. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191212014507.28050-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 6cd1d670bee641d5d10b11d58c7c99ac1ddf8068 Author: Bard Liao Date: Wed Dec 11 19:45:03 2019 -0600 soundwire: intel: update headers for interrupts The existing use of 6 handlers is problematic in MSI mode. Update headers so that all shared interrupts can be handled with a single handler. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191212014507.28050-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 4b206d34b92224496c42226c4b6d92719056c8b6 Author: Rander Wang Date: Wed Dec 11 19:45:02 2019 -0600 soundwire: intel: update stream callbacks for hwparams/free stream operations The SoundWire DAIs for Intel platform are created in drivers/soundwire/intel.c, while the communication with the Intel DSP is all controlled in soc/sof/intel When the DAI status changes, a callback is used to bridge the gap between the two subsystems. The naming of the existing 'config_stream' callback does not map well with any of ALSA/ASoC concepts. This patch renames it as 'params_stream' to be more self-explanatory. A new 'free_stream' callback is added in case any resources allocated in the 'params_stream' stage need to be released. In the SOF implementation, this is used in the hw_free case to release the DMA channels over IPC. These two callbacks now rely on structures which expose the link_id and alh_stream_id (required by the firmware IPC), instead of a list of parameters. The 'void *' definitions are changed to use explicit types, as suggested on alsa-devel during earlier reviews. Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191212014507.28050-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit f98f690fb03c2a8d21dfa31aa1042480cf6f7f9b Author: Pierre-Louis Bossart Date: Wed Dec 11 19:45:01 2019 -0600 soundwire: intel: update interfaces between ASoC and SoundWire The current interfaces between ASoC and SoundWire are limited by the platform_device infrastructure to an init() and exit() (mapped to the platform driver.probe and .remove) To help with the platform detection, machine driver selection and management of power dependencies between DSP and SoundWire IP, the ASoC side requires: a) an ACPI scan helper, to report if any devices are exposed in the DSDT tables, and if any links are disabled by the BIOS. b) a probe helper that allocates the resources without actually starting the bus. c) a startup helper which does start the bus when all power dependencies are settled. d) an exit helper to free all resources e) an interrupt_enable/disable helper, typically invoked after the startup helper but also used in suspend routines. This patch moves all required interfaces to sdw_intel.h, mainly to allow SoundWire and ASoC parts to be merged separately once the header files are shared between trees. To avoid compilation issues, the conflicts in intel_init.c are blindly removed. This would in theory prevent the code from working, but since there are no users of the Intel Soundwire driver this has no impact. Functionality will be restored when the removal of platform devices is complete. Support for SoundWire + SOF builds will only be provided once all the required pieces are upstream. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191212014507.28050-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit b2bd75f806c49929d7ab5a860c0a69b0a17c59d2 Author: Pierre-Louis Bossart Date: Wed Dec 11 19:45:00 2019 -0600 soundwire: sdw_slave: track unattach_request to handle all init sequences The Slave device initialization can be split in 4 different cases: 1. Master-initiated hardware reset, system suspend-resume and pm_runtime based on clock-stop mode1. To avoid timeouts and a bad audio experience, the Slave device resume operations need to wait for the Slave device to be re-enumerated and its settings restored. 2. Exit from clock-stop mode0. In this case, the Slave device is required to remain enumerated and its context preserved while the clock is stopped, so no re-initialization or wait_for_completion() is necessary. 3. Slave-initiated pm_runtime D3 transition. With the parent child relationship, it is possible that a Slave device becomes 'suspended' while its parent is still 'active' with the bus clock still toggling. In this case, during the pm_runtime resume operation, there is no need to wait for any settings to be restored. 4. Slave reset (sync loss or implementation-defined). In that case the bus remains operational and the Slave device will be re-initialized when it becomes ATTACHED again. In previous patches, we suggested the use of wait_for_completion() to deal with the case #1, but case #2 and #3 do not need any wait. To account for those differences, this patch adds an unattach_request field. The field is explicitly set by the Master for the case #1, and if non-zero the Slave device shall wait on resume. In all other cases, the Slave resume operations can proceed without wait. The only request tracked so far is Master HardReset, but the request is declared as a bit mask for future extensions (if needed). The definition for this value is added in bus.h and does not need to be exposed in sdw.h Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191212014507.28050-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 7afc50e441af0afc8055920a64cff70b648e4b44 Author: Pierre-Louis Bossart Date: Wed Dec 11 19:44:59 2019 -0600 soundwire: sdw_slave: add initialization_complete definition Slave drivers may have different ways of handling their settings, with or without regmap. During the integration of codec drivers, done in partnership between Intel and Realtek, it became desirable to implement a predictable order between low-level initializations performed in .update_status() (invoked by an interrupt thread) and the settings restored in the resume steps (invoked by the PM core). This patch builds on the previous solution to wait for the Slave device to be fully enumerated. The complete() in this case is signaled not before the .update_status() is called, but after .update_status() returns. Without this patch, the settings were not properly restored, leading to timing-dependent 'no sound after resume' or 'no headset detected after resume' bug reports. Depending on how initialization is handled, a Slave device driver may wait for enumeration_complete, or for initialization_complete, both are valid synchronization points. They are initialized at the same time, they only differ on when complete() is invoked. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191212014507.28050-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit fbbff36325079fd9d2fcd30063c84f4b38a0ad9b Author: Pierre-Louis Bossart Date: Wed Dec 11 19:44:58 2019 -0600 soundwire: sdw_slave: add enumeration_complete structure When the Master starts the bus (be it during the initial boot or system resume), it usually performs a HardReset to make sure electrical levels are correct, then enables the control channel. While the PM framework guarantees that the Slave devices will only become 'active' once the Master completes the bus initialization, there is still a risk of a race condition: the Slave enumeration is handled in a separate interrupt thread triggered by hardware status changes, so the Slave device may not be ready to accept commands when the Slave driver tries to access the registers and restore settings in its resume or pm_runtime_resume callbacks. In those cases, any read/write commands from/to the Slave device will result in a timeout. This patch adds an enumeration_complete structure. When the bus is goes through a HardReset sequence and restarted, the Slave will be marked as UNATTACHED, which will result in a call to init_completion(). When the Slave reports its presence during PING frames as a non-zero Device, the Master hardware will issue an interrupt and the bus driver will invoke complete(). The order between init_completion()/complete() is predictable since this is a Master-initiated transition. The Slave driver may use wait_for_completion() in its resume callback. When regmap is used, the Slave driver will typically set its regmap in cache-only mode on suspend, then on resume block on wait_for_completion(&enumeration_complete) to guarantee it is safe to start read/write transactions. It may then exit the cache-only mode and use a regmap_sync to restore settings. All these steps are optional, their use completely depends on the Slave device capabilities and how the Slave driver is implemented. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191212014507.28050-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 528be501b7d4a64e04672a38ebfc9e19c555e770 Author: Pierre-Louis Bossart Date: Wed Dec 11 19:44:57 2019 -0600 soundwire: sdw_slave: add probe_complete structure and new fields When a Slave device becomes synchronized with the bus, it may report its presence in PING frames, as well as optionally asserting an in-band PREQ signal. The bus driver will detect a new Device0, start the enumeration process and assign it a non-zero device number. The SoundWire enumeration provides an arbitration to deal with multiple Slaves reporting ATTACHED at the same time. The bus driver will also invoke the driver .probe() callback associated with this device. The probe() depends on the Linux device core, which handles the match operations and may result in modules being loaded. Once the non-zero device number is programmed, the Slave will report its new status in PING frames and the Master hardware will typically report this status change with an interrupt. At this point, the .update_status() callback of the codec driver will be invoked (usually from an interrupt thread or workqueue scheduled from the interrupt thread). The first race condition which can happen is between the .probe(), which allocates the resources, and .update_status() where initializations are typically handled. The .probe() is only called once during the initial boot, while .update_status() will be called for every bus hardware reset and if the Slave device loses synchronization (an unlikely event but with non-zero probability). The time difference between the end of the enumeration process and a change of status reported by the hardware may be as small as one SoundWire PING frame. The scheduling of the interrupt thread, which invokes .update_status() is not deterministic, but can be small enough to create a race condition. With a 48 kHz frame rate and ideal scheduling cases, the .probe() may be pre-empted within double-digit microseconds. Since there is no guarantee that the .probe() completes by the time .update_status() is invoked as a result of an interrupt, it's not unusual for the .update_status() to rely on data structures that have not been allocated yet, leading to kernel oopses. This patch adds a probe_complete utility, which is used in the sdw_update_slave_status() routine. The codec driver does not need to do anything and can safely assume all resources are allocated in its update_status() callback. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191212014507.28050-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit b5f02bc3534ac8f2914549f387bc071cc75abb16 Author: Andrey Smirnov Date: Wed Dec 11 06:04:44 2019 -0800 ARM: dts: vf610-zii-scu4-aib: Add node for switch watchdog Add I2C child node for switch watchdog present on SCU4. Signed-off-by: Andrey Smirnov Cc: Shawn Guo Cc: Chris Healy Cc: Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo commit 444d18a7dd63534874f8ae3f5f25d1fe8cbc507d Author: Andrey Smirnov Date: Wed Dec 11 06:04:43 2019 -0800 ARM: dts: vf610-zii-scu4-aib: Use generic names for DT nodes The devicetree specification recommends using generic node names. Some ZII dts files already follow such recommendation, but some don't, so use generic node names for consistency among the ZII dts files. Signed-off-by: Andrey Smirnov Cc: Shawn Guo Cc: Chris Healy Cc: Cory Tusar Cc: Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo commit e5380cd85b3dbfb0d7ead5a471410af6604f9bf8 Author: Andrey Smirnov Date: Wed Dec 11 05:49:57 2019 -0800 ARM: dts: vf610-zii-dev-rev-b: Drop redundant I2C properties ZII VF610 Board Rev. B is supposed to have exactly the same I2C config as Rev. C, including I2C bus recovery settings. Drop redundant I2C properties that are already specified in vf610-zii-dev.dtsi Signed-off-by: Andrey Smirnov Cc: Shawn Guo Cc: Chris Healy Cc: Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo commit d9267ca1953455ac485b6ed284dddfe42040592c Author: Christoph Fritz Date: Wed Nov 13 14:40:16 2019 +0100 ARM: dts: phycore-imx6: set buck regulator modes explicitly This patch sets initial buck regulator modes explicitly to a state this hardware needs. So a wrong initial mode set by bootloader or pmic itself does not interfere anymore. Signed-off-by: Christoph Fritz Signed-off-by: Shawn Guo commit 6bb1e09c4c375db29770444f689f35f5cbe696bc Author: Andrey Smirnov Date: Mon Dec 9 08:50:18 2019 -0800 ARM: dts: imx6: rdu2: Limit USBH1 to Full Speed Cabling used to connect devices to USBH1 on RDU2 does not meet USB spec cable quality and cable length requirements to operate at High Speed, so limit the port to Full Speed only. Reported-by: Chris Healy Reviewed-by: Chris Healy Reviewed-by: Lucas Stach Signed-off-by: Andrey Smirnov Cc: Shawn Guo Cc: Fabio Estevam Cc: Lucas Stach Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo commit cd58a174e58649426fb43d7456e5f7d7eab58af1 Author: Andrey Smirnov Date: Mon Dec 9 08:50:17 2019 -0800 ARM: dts: imx6: rdu2: Disable WP for USDHC2 and USDHC3 RDU2 production units come with resistor connecting WP pin to correpsonding GPIO DNPed for both SD card slots. Drop any WP related configuration and mark both slots with "disable-wp". Reported-by: Chris Healy Reviewed-by: Chris Healy Reviewed-by: Lucas Stach Signed-off-by: Andrey Smirnov Cc: Shawn Guo Cc: Fabio Estevam Cc: Lucas Stach Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo commit f3042a86558e858606a7b850d05ce31a99f26a4b Author: Andrey Smirnov Date: Mon Dec 9 08:50:16 2019 -0800 ARM: dts: imx6: rdu2: Add node for UCS1002 USB charger chip Add node for UCS1002 USB charger chip connected to front panel USB and replace "regulator-fixed" previously used to control VBUS. Signed-off-by: Lucas Stach Signed-off-by: Andrey Smirnov Reviewed-by: Lucas Stach Cc: Shawn Guo Cc: Chris Healy Cc: Fabio Estevam Cc: Lucas Stach Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Shawn Guo commit 02f8eb40ef7b141b56eccb4faaf83becac3f1d4b Author: Peter Chen Date: Tue Dec 3 11:01:52 2019 +0800 ARM: dts: imx7s: Add power domain for imx7d HSIC Otherwise, the system will hang if USB driver try to access portsc register. Cc: André Draszik Signed-off-by: Peter Chen Signed-off-by: Shawn Guo commit 81c22041d9f19df07b9cba95e3cd02e0f41bc1e1 Author: Daniel Borkmann Date: Mon Dec 9 16:08:03 2019 +0100 bpf, x86, arm64: Enable jit by default when not built as always-on After Spectre 2 fix via 290af86629b2 ("bpf: introduce BPF_JIT_ALWAYS_ON config") most major distros use BPF_JIT_ALWAYS_ON configuration these days which compiles out the BPF interpreter entirely and always enables the JIT. Also given recent fix in e1608f3fa857 ("bpf: Avoid setting bpf insns pages read-only when prog is jited"), we additionally avoid fragmenting the direct map for the BPF insns pages sitting in the general data heap since they are not used during execution. Latter is only needed when run through the interpreter. Since both x86 and arm64 JITs have seen a lot of exposure over the years, are generally most up to date and maintained, there is more downside in !BPF_JIT_ALWAYS_ON configurations to have the interpreter enabled by default rather than the JIT. Add a ARCH_WANT_DEFAULT_BPF_JIT config which archs can use to set the bpf_jit_{enable,kallsyms} to 1. Back in the days the bpf_jit_kallsyms knob was set to 0 by default since major distros still had /proc/kallsyms addresses exposed to unprivileged user space which is not the case anymore. Hence both knobs are set via BPF_JIT_DEFAULT_ON which is set to 'y' in case of BPF_JIT_ALWAYS_ON or ARCH_WANT_DEFAULT_BPF_JIT. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Will Deacon Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/f78ad24795c2966efcc2ee19025fa3459f622185.1575903816.git.daniel@iogearbox.net commit 6b8350a4b0d58cfee39368e5cf6c67369d59b629 Merge: bea0f4a5115a bf5432b1de1f Author: David S. Miller Date: Wed Dec 11 15:01:23 2019 -0800 Merge branch 'vsock-add-local-transport-support' Stefano Garzarella says: ==================== vsock: add local transport support v2: - style fixes [Dave] - removed RCU sync and changed 'the_vsock_loopback' in a global static variable [Stefan] - use G2H transport when local transport is not loaded and remote cid is VMADDR_CID_LOCAL [Stefan] - rebased on net-next v1: https://patchwork.kernel.org/cover/11251735/ This series introduces a new transport (vsock_loopback) to handle local communication. This could be useful to test vsock core itself and to allow developers to test their applications without launching a VM. Before this series, vmci and virtio transports allowed this behavior, but only in the guest. We are moving the loopback handling in a new transport, because it might be useful to provide this feature also in the host or when no H2G/G2H transports (hyperv, virtio, vmci) are loaded. The user can use the loopback with the new VMADDR_CID_LOCAL (that replaces VMADDR_CID_RESERVED) in any condition. Otherwise, if the G2H transport is loaded, it can also use the guest local CID as previously supported by vmci and virtio transports. If G2H transport is not loaded, the user can also use VMADDR_CID_HOST for local communication. Patch 1 is a cleanup to build virtio_transport_common without virtio Patch 2 adds the new VMADDR_CID_LOCAL, replacing VMADDR_CID_RESERVED Patch 3 adds a new feature flag to register a loopback transport Patch 4 adds the new vsock_loopback transport based on the loopback implementation of virtio_transport Patch 5 implements the logic to use the local transport for loopback communication Patch 6 removes the loopback from virtio_transport ==================== Signed-off-by: David S. Miller commit bf5432b1de1fcfd1d389111c350b88dd238860ba Author: Stefano Garzarella Date: Tue Dec 10 11:43:07 2019 +0100 vsock/virtio: remove loopback handling We can remove the loopback handling from virtio_transport, because now the vsock core is able to handle local communication using the new vsock_loopback device. Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 408624af4c89989117bb2c6517bd50b7708a2fcd Author: Stefano Garzarella Date: Tue Dec 10 11:43:06 2019 +0100 vsock: use local transport when it is loaded Now that we have a transport that can handle the local communication, we can use it when it is loaded. A socket will use the local transport (loopback) when the remote CID is: - equal to VMADDR_CID_LOCAL - or equal to transport_g2h->get_local_cid(), if transport_g2h is loaded (this allows us to keep the same behavior implemented by virtio and vmci transports) - or equal to VMADDR_CID_HOST, if transport_g2h is not loaded Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 077263fba10011d7e1d17dc7691ff20c15c56081 Author: Stefano Garzarella Date: Tue Dec 10 11:43:05 2019 +0100 vsock: add vsock_loopback transport This patch adds a new vsock_loopback transport to handle local communication. This transport is based on the loopback implementation of virtio_transport, so it uses the virtio_transport_common APIs to interface with the vsock core. Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 0e12190578d081d4fe54d41635ec6e5a6eb0d01a Author: Stefano Garzarella Date: Tue Dec 10 11:43:04 2019 +0100 vsock: add local transport support in the vsock core This patch allows to register a transport able to handle local communication (loopback). Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit ef343b35d46667668a099655fca4a5b2e43a5dfe Author: Stefano Garzarella Date: Tue Dec 10 11:43:03 2019 +0100 vsock: add VMADDR_CID_LOCAL definition The VMADDR_CID_RESERVED (1) was used by VMCI, but now it is not used anymore, so we can reuse it for local communication (loopback) adding the new well-know CID: VMADDR_CID_LOCAL. Cc: Jorgen Hansen Reviewed-by: Stefan Hajnoczi Reviewed-by: Jorgen Hansen Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit c5144fcbf25015b850e97a06a24b1ddfbc5579e8 Author: Stefano Garzarella Date: Tue Dec 10 11:43:02 2019 +0100 vsock/virtio_transport_common: remove unused virtio header includes We can remove virtio header includes, because virtio_transport_common doesn't use virtio API, but provides common functions to interface virtio/vhost transports with the af_vsock core, and to handle the protocol. Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 6aacb5a3b0bccfa207ef2710f106020c1d749f1d Author: Chris Wilson Date: Wed Dec 11 11:04:37 2019 +0000 drm/i915: Align start for memcpy_from_wc The movntqda requires 16-byte alignment for the source pointer. Avoid falling back to clflush if the source pointer is misaligned by doing the doing a small uncached memcpy to fixup the alignments. v2: Turn the unaligned copy into a genuine helper Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191211110437.4082687-5-chris@chris-wilson.co.uk commit 51696691aba3d1a3e74a9ad9e615abd06532a11e Author: Chris Wilson Date: Wed Dec 11 11:04:36 2019 +0000 drm/i915/gem: Tidy up error handling for eb_parse() As the caller no longer uses the i915_vma result, stop returning it and just return the error code instead. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191211110437.4082687-4-chris@chris-wilson.co.uk commit 37d1151ce75ea2a9ca7274cb0c93f21db9ab431a Author: Chris Wilson Date: Wed Dec 11 11:04:35 2019 +0000 drm/i915: Simplify error escape from cmdparser We need to flush the destination buffer, even on error, to maintain consistent cache state. Thereby removing the jump on error past the clear, and reducing the loop-escape mechanism to a mere break. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191211110437.4082687-3-chris@chris-wilson.co.uk commit 755bf8a8c9850f418e9a585f067e431677219260 Author: Chris Wilson Date: Wed Dec 11 11:04:34 2019 +0000 drm/i915: Remove redundant parameters from intel_engine_cmd_parser Declutter the calling interface by reducing the parameters to the i915_vma and associated offsets. Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191211110437.4082687-2-chris@chris-wilson.co.uk commit 8f1ada252028853f1c405fde28a13f641d7280f6 Author: Chris Wilson Date: Wed Dec 11 11:04:33 2019 +0000 drm/i915: Fix cmdparser drm.debug The cmdparser rejection debug is not for driver development, but for the user, for which we use a plain DRM_DEBUG(). Signed-off-by: Chris Wilson Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191211110437.4082687-1-chris@chris-wilson.co.uk commit 972745fd577044ea153ec6d7899dcf9bb3c806e5 Author: Chris Wilson Date: Tue Dec 10 18:01:11 2019 +0000 drm/i915/gt: Disable manual rc6 for Braswell/Baytrail The initial investigated showed that while the PCU on Braswell/Baytrail controlled RC6 itself. setting the software RC6 request made no difference. Further testing reveals though that it causes a delay in the PCU on enabling RC6. Closes: https://gitlab.freedesktop.org/drm/intel/issues/763 Fixes: 730eaeb52426 ("drm/i915/gt: Manual rc6 entry upon parking") Testcase: igt/perf/rc6-disable Signed-off-by: Chris Wilson Cc: Andi Shyti Cc: Mika Kuoppala Cc: Imre Deak Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191210180111.3958558-1-chris@chris-wilson.co.uk commit 220a9d45c6709127cd56430caef07034f1ec5030 Author: Michal Wajdeczko Date: Wed Dec 11 12:45:49 2019 +0000 drm/i915/uc: Drop explicit ggtt param in some uc_fw functions There is no need to pass explicit ggtt since we already have a trick to get parent gt from uc_fw, we only need to use it. Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191211124549.59516-4-michal.wajdeczko@intel.com commit 3a1e3c483584762c794fb21795ed02982c8cdcf7 Author: Michal Wajdeczko Date: Wed Dec 11 12:45:48 2019 +0000 drm/i915/uc: Drop explicit gt param in some uc_fw functions There is no need to pass explicit gt since we already have a trick to get parent gt from uc_fw, we only need to use it. Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191211124549.59516-3-michal.wajdeczko@intel.com commit cb1b7ad08c22c771500bdd842b01bc12ffcfbb50 Author: Michal Wajdeczko Date: Wed Dec 11 12:45:47 2019 +0000 drm/i915/uc: Drop explicit i915 param in some uc_fw functions There is no need to pass explicit i915 since we already have a debug trick to get parent gt from uc_fw, we only need to make this trick available on non-debug builds. Signed-off-by: Michal Wajdeczko Cc: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191211124549.59516-2-michal.wajdeczko@intel.com commit 65c29dbb19b2451990c5c477fef7ada3b8218f05 Author: Chris Wilson Date: Wed Dec 11 15:02:04 2019 +0000 drm/i915: Use the i915_device name for identifying our request fences Use the dev_name(i915) to identify the requests for debugging, so we can tell different device timelines apart. Signed-off-by: Chris Wilson Cc: Venkata Sandeep Dhanalakota Reviewed-by: Venkata Sandeep Dhanalakota Link: https://patchwork.freedesktop.org/patch/msgid/20191211150204.133471-1-chris@chris-wilson.co.uk commit d9e5582c4bb219f3459e39f65410f0e5128fbe91 Author: Baolin Wang Date: Tue Apr 24 20:06:12 2018 +0800 ALSA: Avoid using timespec for struct snd_rawmidi_status The struct snd_rawmidi_status will use 'timespec' type variables to record timestamp, which is not year 2038 safe on 32bits system. Thus we introduced 'struct snd_rawmidi_status32' and 'struct snd_rawmidi_status64' to handle 32bit time_t and 64bit time_t in native mode, which replace timespec with s64 type. In compat mode, we renamed or introduced new structures to handle 32bit/64bit time_t in compatible mode. The 'struct snd_rawmidi_status32' and snd_rawmidi_ioctl_status32() are used to handle 32bit time_t in compat mode. 'struct compat_snd_rawmidi_status64' is used to handle 64bit time_t. When glibc changes time_t to 64-bit, any recompiled program will issue ioctl commands that the kernel does not understand without this patch. Signed-off-by: Baolin Wang Signed-off-by: Arnd Bergmann commit 3ddee7f88aaf2dee38f7016ac8fd48dd9fdb43e3 Author: Baolin Wang Date: Tue Apr 24 20:06:11 2018 +0800 ALSA: Avoid using timespec for struct snd_pcm_status The struct snd_pcm_status will use 'timespec' type variables to record timestamp, which is not year 2038 safe on 32bits system. Userspace will use SNDRV_PCM_IOCTL_STATUS and SNDRV_PCM_IOCTL_STATUS_EXT as commands to issue ioctl() to fill the 'snd_pcm_status' structure in userspace. The command number is always defined through _IOR/_IOW/IORW, so when userspace changes the definition of 'struct timespec' to use 64-bit types, the command number also changes. Thus in the kernel, we now need to define two versions of each such ioctl and corresponding ioctl commands to handle 32bit time_t and 64bit time_t in native mode: struct snd_pcm_status32 { ...... s32 trigger_tstamp_sec; s32 trigger_tstamp_nsec; ...... s32 audio_tstamp_sec; s32 audio_tstamp_nsec; ...... }; struct snd_pcm_status64 { ...... s32 trigger_tstamp_sec; s32 trigger_tstamp_nsec; ...... s32 audio_tstamp_sec; s32 audio_tstamp_nsec; ...... }; Moreover in compat file, we renamed or introduced new structures to handle 32bit/64bit time_t in compatible mode. The 'struct snd_pcm_status32' and snd_pcm_status_user32() are used to handle 32bit time_t in compat mode. 'struct compat_snd_pcm_status64' and snd_pcm_status_user_compat64() are used to handle 64bit time_t. The implicit padding before timespec is made explicit to avoid incompatible structure layout between 32-bit and 64-bit x86 due to the different alignment requirements, and the snd_pcm_status structure is now hidden from the kernel to avoid relying on the timespec definitio definitionn Finally we can replace SNDRV_PCM_IOCTL_STATUS and SNDRV_PCM_IOCTL_STATUS_EXT with new commands and introduce new functions to fill new 'struct snd_pcm_status64' instead of using unsafe 'struct snd_pcm_status'. Then in future, the new commands can be matched when userspace changes 'timespec' to 64bit type to make a size change of 'struct snd_pcm_status'. When glibc changes time_t to 64-bit, any recompiled program will issue ioctl commands that the kernel does not understand without this patch. Signed-off-by: Baolin Wang Signed-off-by: Arnd Bergmann commit a4e7dd35b9dac21fa7b33e8788b51c7fbc7a49f1 Author: Baolin Wang Date: Tue Apr 24 20:06:10 2018 +0800 ALSA: Avoid using timespec for struct snd_ctl_elem_value The struct snd_ctl_elem_value will use 'timespec' type variables to record timestamp, which is not year 2038 safe on 32bits system. Since there are no drivers will implemented the tstamp member of the struct snd_ctl_elem_value, and also the stucture size will not be changed if we change timespec to s64 for tstamp member of struct snd_ctl_elem_value. From Takashi's comments, "In the library, applications are not expected to access to this structure directly. The applications get opaque pointer to the structure and must use any control APIs to operate it. Actually the library produce no API to handle 'struct snd_ctl_elem_value.tstamp'. This means that we can drop this member from alsa-lib without decline of functionality." Thus we can simply remove the tstamp member to avoid using the type which is not year 2038 safe on 32bits system. Signed-off-by: Baolin Wang Signed-off-by: Arnd Bergmann commit a07804cc7472d8aa5db03ea5d75f3d8d80abb687 Author: Baolin Wang Date: Tue Apr 24 20:06:09 2018 +0800 ALSA: Avoid using timespec for struct snd_timer_status struct snd_timer_status uses 'timespec' type variables to record timestamp, which will be changed to an incompatible layout with updated user space using 64-bit time_t. To handle both the old and the new layout on 32-bit architectures, this patch introduces 'struct snd_timer_status32' and 'struct snd_timer_status64' to handle 32bit time_t and 64bit time_t in native mode and compat mode, which replaces timespec with s64 type. When glibc changes time_t to 64-bit, any recompiled program will issue ioctl commands that the kernel does not understand without this patch. In the public uapi header, snd_timer_status is now guarded by an #ifndef __KERNEL__ to avoid referencing 'struct timespec'. The timespec definition will be removed from the kernel to prevent new y2038 bugs and to avoid the conflict with an incompatible libc type of the same name. Signed-off-by: Baolin Wang Signed-off-by: Arnd Bergmann commit fcae40c99fb3d09f4407f549a7f17761abe5e1bc Author: Baolin Wang Date: Tue Apr 24 20:06:08 2018 +0800 ALSA: Replace timespec with timespec64 Since timespec is not year 2038 safe on 32bit system, and we need to convert all timespec variables to timespec64 type for sound subsystem. This patch is used to do preparation for following patches, that will convert all structures defined in uapi/sound/asound.h to use 64-bit time_t. Signed-off-by: Baolin Wang Signed-off-by: Arnd Bergmann commit bea0f4a5115aaf6f59c6d2125f52ff149874b6d2 Merge: b58e9fd48348 1cb89a14c80a Author: David S. Miller Date: Wed Dec 11 12:46:13 2019 -0800 Merge branch 'sfp-slow-to-probe-copper' Russell King says: ==================== Add support for slow-to-probe-PHY copper SFP modules This series, following on from the previous adding SFP+ copper support, adds support for a range of Copper SFP modules, made by a variety of companies, all of which have a Marvell 88E1111 PHY on them, but take far longer than the Marvell spec'd 15ms to start communicating on the I2C bus. Researching the Champion One 1000SFPT module reveals that TX_DISABLE is routed through a MAX1971 switching regulator and reset IC which adds a 175ms delay to releasing the 88E1111 reset. It is not known whether other modules use a similar setup, but there are a range of modules that are slow for the Marvell PHY to appear. This patch series adds support for these modules by repeatedly trying to probe the PHY for up to 600ms. ==================== Signed-off-by: David S. Miller commit 1cb89a14c80a87abe1f5bd47b1e7b3171b968f8c Author: Russell King Date: Mon Dec 9 14:16:11 2019 +0000 net: sfp: re-attempt probing for phy Some 1000BASE-T PHY modules take a while for the PHY to wake up. Retry the probe a number of times before deciding that the module has no PHY. Tested with: Sourcephotonics SPGBTXCNFC - PHY takes less than 50ms to respond. Champion One 1000SFPT - PHY takes about 200ms to respond. Mikrotik S-RJ01 - no PHY Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 256e43cb8c696e0754514686d92f4e27b4985ad5 Author: Russell King Date: Mon Dec 9 14:16:05 2019 +0000 net: sfp: error handling for phy probe Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 281e4eab1abeb179610de0884a4bd65bf2d4e61e Author: Russell King Date: Mon Dec 9 14:16:00 2019 +0000 net: sfp: rename sm_retries Rename sm_retries as sm_fault_retries, as this is what this member is tracking. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 65ef2d5c41d93c2fc28bfa6ac2b60232d1d0c677 Author: Russell King Date: Mon Dec 9 14:15:55 2019 +0000 net: sfp: use a definition for the fault recovery attempts Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ad808910be68dcf8da5d837d4511d00ad5d3678a Author: Alex Deucher Date: Wed Dec 11 10:09:03 2019 -0500 drm/amdgpu: fix license on Kconfig and Makefiles amdgpu is MIT licensed. Fixes: ec8f24b7faaf3d ("treewide: Add SPDX license identifier - Makefile/Kconfig") Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 93b09a9a892ba07bd99132d9bb6318e31c7f2f79 Author: Simon Ser Date: Wed Dec 11 10:21:01 2019 +0000 drm/amdgpu: log when amdgpu.dc=1 but ASIC is unsupported This makes it easier to figure out whether the kernel parameter has been taken into account. Signed-off-by: Simon Ser Cc: Harry Wentland Cc: Alex Deucher Signed-off-by: Alex Deucher commit aec434023e528bdc8a914458fc729c62eb5e6139 Author: Arnd Bergmann Date: Tue Dec 10 20:59:24 2019 +0100 drm/amd/display: include linux/slab.h where needed Calling kzalloc() and related functions requires the linux/slab.h header to be included: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c: In function 'dcn21_ipp_create': drivers/gpu/drm/amd/amdgpu/../display/dc/dcn21/dcn21_resource.c:679:3: error: implicit declaration of function 'kzalloc'; did you mean 'd_alloc'? [-Werror=implicit-function-declaration] kzalloc(sizeof(struct dcn10_ipp), GFP_KERNEL); A lot of other headers also miss a direct include in this file, but this is the only one that causes a problem for now. Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 3504bd45a99eae374ae54327bf7a6ebf1c8de15a Author: Leo Liu Date: Mon Dec 9 12:58:24 2019 -0500 drm/amdgpu: fix JPEG instance checking when ctx init Use proper structure. Fixes: 0388aee766376ed ("drm/amdgpu: use the JPEG structure for general driver support") Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit 21a174f5adb35cbc20b1a86c84ae0da21ae77219 Author: Leo Liu Date: Mon Dec 9 12:43:47 2019 -0500 drm/amdgpu: fix VCN2.x number of irq types The JPEG irq type has been moved to its own structure Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit 89ed5a52112cf46dc495a6cd4ddff81c029e1f75 Author: Tianci.Yin Date: Wed Dec 11 19:57:43 2019 +0800 drm/amdgpu/gfx10: update gfx golden settings for navi14 add registers: mmPA_SC_BINNER_TIMEOUT_COUNTER and mmPA_SC_ENHANCE_2 Reviewed-by: Feifei Xu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit eaec03f20663b30440dd8301202aba1eaf45d996 Author: Tianci.Yin Date: Wed Dec 11 19:55:49 2019 +0800 drm/amdgpu/gfx10: update gfx golden settings add registers: mmPA_SC_BINNER_TIMEOUT_COUNTER and mmPA_SC_ENHANCE_2 Reviewed-by: Feifei Xu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit d549991ce5d5194d89eafe16085603b38e7cf989 Author: Kevin Wang Date: Wed Dec 11 17:30:26 2019 +0800 drm/amdgpu: enable gfxoff feature for navi10 asic enable gfxoff feature for some navi10 asics Signed-off-by: Kevin Wang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 5f5202bf695b344b4c13de3609b7c0805f89b898 Author: Tianci.Yin Date: Wed Dec 11 10:52:14 2019 +0800 drm/amdgpu/gfx10: update gfx golden settings for navi14 add registers: mmSPI_CONFIG_CNTL Reviewed-by: Feifei Xu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit d4117354c8d3dbf754a4706a808fb9e45ce01168 Author: Tianci.Yin Date: Wed Dec 11 10:43:07 2019 +0800 drm/amdgpu/gfx10: update gfx golden settings add registers: mmSPI_CONFIG_CNTL Reviewed-by: Feifei Xu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit c9ffa427db34e6896523f0ef0c172a0bbb77c9ad Author: Yintian Tao Date: Wed Oct 30 17:16:35 2019 +0800 drm/amd/powerplay: enable pp one vf mode for vega10 Originally, due to the restriction from PSP and SMU, VF has to send message to hypervisor driver to handle powerplay change which is complicated and redundant. Currently, SMU and PSP can support VF to directly handle powerplay change by itself. Therefore, the old code about the handshake between VF and PF to handle powerplay will be removed and VF will use new the registers below to handshake with SMU. mmMP1_SMN_C2PMSG_101: register to handle SMU message mmMP1_SMN_C2PMSG_102: register to handle SMU parameter mmMP1_SMN_C2PMSG_103: register to handle SMU response v2: remove module parameter pp_one_vf v3: fix the parens v4: forbid vf to change smu feature v5: use hwmon_attributes_visible to skip sepicified hwmon atrribute v6: change skip condition at vega10_copy_table_to_smc Signed-off-by: Yintian Tao Acked-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 4cf781c24c3bc8cc50f8013143aa20b26e9217e8 Author: John Clements Date: Wed Dec 11 10:18:55 2019 +0800 drm/amdgpu: Added RAS UMC error query support for Arcturus Updated UMC 6.1 function set to support UMC 6.1.1 and 6.1.2 devices Reviewed-by: Alex Deucher Signed-off-by: John Clements Signed-off-by: Alex Deucher commit a0250689cbb5a8e32f816b3c4778920ce7c44d91 Author: Xiaomeng Hou Date: Wed Dec 4 17:01:21 2019 +0800 drm/amd/powerplay: correct the value retrieved through GPU_LOAD sensor interface the unit of variable AverageGfxActivity defined in smu12 metrics struct is centi, so the retrieved value should be divided by 100 before return. Signed-off-by: Xiaomeng Hou Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit e304adc06ebfa0ea399b181d795f2efc51dcda12 Author: Xiaomeng Hou Date: Wed Dec 4 16:16:30 2019 +0800 drm/amd/powerplay: implement the get_enabled_mask callback for smu12 implement sensor interface of feature mask for debugfs. Signed-off-by: Xiaomeng Hou Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 0b97bd6cde1d4bec07e6f5b72cba32fae2739c3b Author: Xiaomeng Hou Date: Wed Dec 4 15:17:38 2019 +0800 drm/amd/powerplay: implement interface to retrieve clock freq for renoir implement smu12 get_clk_freq interface to get clock frequency like MCLK/SCLK. Signed-off-by: Xiaomeng Hou Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 8fa6a7b0b3fdc6ec5454c7976f2ea1c18cd265bc Author: Xiaomeng Hou Date: Wed Dec 4 13:35:18 2019 +0800 drm/amd/powerplay: implement interface to retrieve gpu temperature for renoir add sensor interface of get gpu temperature for debugfs. Signed-off-by: Xiaomeng Hou Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit ae46533b17639460b812d4dffa27f453e961ae82 Author: Evan Quan Date: Fri Dec 6 11:30:45 2019 +0800 drm/amd/powerplay: clear VBIOS scratchs on baco exit V2 This is needed for coming asic init on performing gpu reset. V2: use non-asic specific programing way Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 418899d6157516fb0b7acad5e37653e60b285852 Author: changzhu Date: Tue Dec 10 10:23:09 2019 +0800 drm/amdgpu: avoid using invalidate semaphore for picasso It may cause timeout waiting for sem acquire in VM flush when using invalidate semaphore for picasso. So it needs to avoid using invalidate semaphore for piasso. Signed-off-by: changzhu Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit feffbaac36d333096ad12ee50a7235481123161f Author: Le Ma Date: Tue Nov 26 17:56:58 2019 +0800 drm/amdgpu: add condition to enable baco for ras recovery Switch to baco reset method for ras recovery if the PMFW supported. If not, keep the original reset method. v2: revise the condition Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b58e9fd483482a075bf6cad988c1ef43022417ce Merge: c21939998802 9a484621e88a Author: David S. Miller Date: Wed Dec 11 11:53:42 2019 -0800 Merge branch 'sfp-copper-modules' Russell King says: ==================== Add support for SFP+ copper modules This series adds support for Copper SFP+ modules with Clause 45 PHYs. Specifically the patches: 1. drop support for the probably never tested 100BASE-*X modules. 2. drop EEPROM ID from sfp_select_interface() 3. add more compliance code definitions from SFF-8024, renaming the existing definitions. 4. add module start/stop methods so phylink knows when a module is about to become active. The module start method is called after we have probed for a PHY on the module. 5. move start/stop of module PHY down into phylink using the new module start/stop methods. 6. add support for Clause 45 I2C accesses, tested with Methode DM7052. Other modules appear to use the same protocol, but slight differences, but I do not have those modules to test with. (if someone does, please holler!) 7. rearrange how we attach to PHYs so that we can support Clause 45 PHYs with indeterminant interface modes. (Clause 45 PHYs appear to like to change their PHY interface mode depending on the negotiated speed.) 8. add support for phylink to connect to a clause 45 PHY on a SFP module. 9. split the link_an_mode between the configured value and the currently selected mode value; some clause 45 PHYs have no capability to provide in-band negotiation. 10. split the link configuration on SFP module insertion in phylink so we can use it in other code paths. 11. delay MAC configuration for copper modules without a PHY to the module start method - after any module PHY has been probed. If the module has a PHY, then we setup the MAC when the PHY is detected. 12. the Broadcom 84881 PHY does not support in-band negotiation even though it uses SGMII and 2500BASE-X. Having the MAC operating with in-band negotiation enabled, even with AN bypass enabled, results in no link - Broadcom say that the host MAC must always be forced. 13. add support for the Broadcom 84881 PHY found on the Methode DM7052 module. 14. add support to SFP to probe for a Clause 45 PHY on copper SFP+ modules. v3: now bisectable! ==================== Signed-off-by: David S. Miller commit 9a484621e88ac8386f131596ce8d76668daf7996 Author: Russell King Date: Wed Dec 11 10:57:01 2019 +0000 net: sfp: add support for Clause 45 PHYs Some SFP+ modules have a Clause 45 PHY onboard, which is accessible via the normal I2C address. Detect 10G BASE-T PHYs which may have an accessible PHY and probe for it. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit 75f4d8d10e016f7428c268424483a927ee7a78bb Author: Russell King Date: Wed Dec 11 10:56:56 2019 +0000 net: phy: add Broadcom BCM84881 PHY driver Add a rudimentary Clause 45 driver for the BCM84881 PHY, found on Methode DM7052 SFPs. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit 7adb5b2126bc013f0964ddaefad6ad1b132e86c3 Author: Russell King Date: Wed Dec 11 10:56:50 2019 +0000 net: phylink: make Broadcom BCM84881 based SFPs work The Broadcom BCM84881 does not appear to send the SGMII control word when operating in SGMII mode, which causes network adapters to fail to link with the PHY, or decide to operate at fixed 1G speed, even if the PHY negotiated 100M. Work around this by detecting the Broadcom BCM84881 and switch to phy mode rather than inband mode. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit 52c956003a9d5bcae1f445f9dfd42b624adb6e87 Author: Russell King Date: Wed Dec 11 10:56:45 2019 +0000 net: phylink: delay MAC configuration for copper SFP modules Knowing whether we need to delay the MAC configuration because a module may have a PHY is useful to phylink to allow NBASE-T modules to work on systems supporting no more than 2.5G speeds. This commit allows us to delay such configuration until after the PHY has been probed by recording the parsed capabilities, and if the module may have a PHY, doing no more until the module_start() notification is called. At that point, we either have a PHY, or we don't. We move the PHY-based setup a little later, and use the PHYs support capabilities rather than the EEPROM parsed capabilities to determine whether we can support the PHY. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit c0de2f47202941d936f0482ccd5b010b642a0008 Author: Russell King Date: Wed Dec 11 10:56:40 2019 +0000 net: phylink: split phylink_sfp_module_insert() Split out the configuration step from phylink_sfp_module_insert() so we can re-use this later. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit 24cf0e693bb50a61e3281009a329f7553a4fbd96 Author: Russell King Date: Wed Dec 11 10:56:35 2019 +0000 net: phylink: split link_an_mode configured and current settings Split link_an_mode between the configured setting and the current operating setting. This is an important distinction to make when we need to configure PHY mode for a plugged SFP+ module that does not use in-band signalling. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit e45d1f5288b81e77eb87288ae2d0a0d00e0989d3 Author: Russell King Date: Wed Dec 11 10:56:30 2019 +0000 net: phylink: support Clause 45 PHYs on SFP+ modules Some SFP+ modules have Clause 45 PHYs embedded on them, which need a little more handling in order to ensure that they are correctly setup, as they switch the PHY link mode according to the negotiated speed. With Clause 22 PHYs, we assumed that they would operate in SGMII mode, but this assumption is now false. Adapt phylink to support Clause 45 PHYs on SFP+ modules. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit 938d44c2b502ba421a785683653e24b685f5d637 Author: Russell King Date: Wed Dec 11 10:56:25 2019 +0000 net: phylink: re-split __phylink_connect_phy() In order to support Clause 45 PHYs on SFP+ modules, which have an indeterminant phy interface mode, we need to be able to call phylink_bringup_phy() with a different interface mode to that used when binding the PHY. Reduce __phylink_connect_phy() to an attach operation, and move the call to phylink_bringup_phy() to its call sites. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit 6912b712cd75aaa1c8d90b291ec7d2504f17f263 Author: Russell King Date: Wed Dec 11 10:56:20 2019 +0000 net: mdio-i2c: add support for Clause 45 accesses Some SFP+ modules have PHYs on them just like SFP modules do, except they are Clause 45 PHYs. The I2C protocol used to access them is modified slightly in order to send the device address and 16-bit register index. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit 4882057ad434e8a6434fce20dc7b7315d40a9d4a Author: Russell King Date: Wed Dec 11 10:56:14 2019 +0000 net: sfp: move phy_start()/phy_stop() to phylink Move phy_start() and phy_stop() into the module_start and module_stop notifications in phylink, rather than having them in the SFP code. This gives phylink responsibility for controlling the PHY, rather than having SFP start and stop the PHY state machine. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit 74c551ca5a0edcc9cf66a3b73fd95b9a8615bfd0 Author: Russell King Date: Wed Dec 11 10:56:09 2019 +0000 net: sfp: add module start/stop upstream notifications When dealing with some copper modules, we can't positively know the module capabilities are until we have probed the PHY. Without the full capabilities, we may end up failing a module that we could otherwise drive with a restricted set of capabilities. An example of this would be a module with a NBASE-T PHY plugged into a host that supports phy interface modes 2500BASE-X and SGMII. The PHY supports 10GBASE-R, 5000BASE-X, 2500BASE-X, SGMII interface modes, which means a subset of the capabilities are compatible with the host. However, reading the module EEPROM leads us to believe that the module only supports ethtool link mode 10GBASE-T, which is incompatible with the host - and thus results in the module being rejected. This patch adds an extra notification which are triggered after the SFP module's PHY probe, and a corresponding notification just before the PHY is removed. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit 0fbd26a9fb6875b98fcfff523831fec47bc5e9a2 Author: Russell King Date: Wed Dec 11 10:56:04 2019 +0000 net: sfp: add more extended compliance codes SFF-8024 is used to define various constants re-used in several SFF SFP-related specifications. Split these constants from the enum, and rename them to indicate that they're defined by SFF-8024. Add and use updated SFF-8024 extended compliance code definitions for 10GBASE-T, 5GBASE-T and 2.5GBASE-T modules. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit a4516c7053b96fed98a0439a9226983b5275474b Author: Russell King Date: Wed Dec 11 10:55:59 2019 +0000 net: sfp: derive interface mode from ethtool link modes We don't need the EEPROM ID to derive the phy interface mode as we can derive it merely from the ethtool link modes. Remove the EEPROM ID argument to sfp_select_interface(). Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit fa2de660a8d001fdce6209534b60b85b87cda84f Author: Russell King Date: Wed Dec 11 10:55:54 2019 +0000 net: sfp: remove incomplete 100BASE-FX and 100BASE-LX support The 100BASE-FX and 100BASE-LX support assumes a PHY is present; this is probably an incorrect assumption. In any case, sfp_parse_support() will fail such a module. Let's stop pretending we support these modules. Reviewed-by: Andrew Lunn Signed-off-by: Russell King Signed-off-by: David S. Miller commit 6d549ff55c3717c4f5b0202a22c7404395559cec Author: Martin Blumenstingl Date: Sun Dec 8 19:05:25 2019 +0100 ARM: dts: meson8b: add the DDR clock controller Add the DDR clock controller and pass it's DDR_CLKID_DDR_PLL to the main (HHI) clock controller as "ddr_clk". The "ddr_clk" is used as one of the inputs for the audio clock muxes. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit c4ac5c37a4a5c5ce94f70542d006568bd4b7d685 Author: Martin Blumenstingl Date: Sun Dec 8 19:05:24 2019 +0100 ARM: dts: meson8: add the DDR clock controller Add the DDR clock controller and pass it's DDR_CLKID_DDR_PLL to the main (HHI) clock controller as "ddr_clk". The "ddr_clk" is used as one of the inputs for the audio clock muxes. Signed-off-by: Martin Blumenstingl Reported-by: kbuild test robot Signed-off-by: Kevin Hilman commit 630ea3108adf0446b6b4194f3f42bc0bfe245d1d Author: Martin Blumenstingl Date: Sun Dec 8 19:05:23 2019 +0100 ARM: dts: meson: provide the XTAL clock using a fixed-clock The clock controller driver has provided the XTAL clock so far. This does not match how the hardware actually works because the XTAL clock is an actual crystal which is mounted on the PCB. Add the "xtal" clock to meson.dtsi and replace all references to the clock controller's CLKID_XTAL with the new xtal clock node. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 9cf7956865b844bcb13602410cc0119f4eb46860 Merge: e42617b825f8 25d316989e2b Author: Kevin Hilman Date: Wed Dec 11 11:26:07 2019 -0800 Merge tag 'clk-meson-dt-v5.6-1' of https://github.com/BayLibre/clk-meson into v5.6/dt Update Amlogic meson8 bindings: - Update meson8's bindings to take a reference to the crytal clock from DT * tag 'clk-meson-dt-v5.6-1' of https://github.com/BayLibre/clk-meson: dt-bindings: clock: meson8b: add the clock inputs dt-bindings: clock: add the Amlogic Meson8 DDR clock controller binding commit 380665becdeeb4f455c23582b7f32e6b3cea27d2 Author: Vijay Khemka Date: Wed Dec 11 11:01:55 2019 -0800 drivers: ipmi: Modify max length of IPMB packet As per IPMB specification, maximum packet size supported is 255, modified Max length to 240 from 128 to accommodate more data. Signed-off-by: Vijay Khemka Message-Id: <20191211190155.1279610-1-vijaykhemka@fb.com> Signed-off-by: Corey Minyard commit 042f057fe2dcf38682d85d9f88df00d1a8d45dbd Author: Vijay Khemka Date: Wed Dec 11 10:56:04 2019 -0800 drivers: ipmi: Support raw i2c packet in IPMB Many IPMB devices don't support smbus protocol and this driver only supports the smbus protocol at the moment. Added support for the i2c protocol as well. There will be a variable "i2c-protocol" passed by the device tree or ACPI table which determines whether the protocol is i2c or smbus. Signed-off-by: Vijay Khemka Reviewed-by: Asmaa Mnebhi Message-Id: <20191211185604.1266063-1-vijaykhemka@fb.com> [IPMB.txt had moved to driver-api/ipmb.rst, I adjusted] Signed-off-by: Corey Minyard commit d3c306e31bc7a2cbead2697090b3e882f3fb9231 Author: Bibby Hsieh Date: Thu Nov 21 09:54:10 2019 +0800 arm64: dts: add gce node for mt8183 add gce device node for mt8183 Signed-off-by: Bibby Hsieh Signed-off-by: Matthias Brugger commit 56d9625e8cc6d2fb6f59a3829d1c258944535609 Author: Krzysztof Kozlowski Date: Mon Dec 9 17:39:37 2019 +0100 pinctrl: samsung: Clarify the option titles/names The config options toggle Samsung Exynos SoCs pinctrl drivers, not the driver data. Clarify this in the option title/name and also make it consistent with other Samsung entries. No functional change. Signed-off-by: Krzysztof Kozlowski commit 73ae2cb424950f917829a8b78359ae1e4b175f3c Author: Krzysztof Kozlowski Date: Mon Dec 9 17:39:36 2019 +0100 pinctrl: samsung: Enable compile test for build coverage The Samsung pinctrl drivers require only GPIOLIB and OF for building. The drivers should be buildable on all architectures so enable COMPILE_TEST. Signed-off-by: Krzysztof Kozlowski commit eaffc4de16c66c04ce340174280221960be18ed3 Author: Bartlomiej Zolnierkiewicz Date: Tue Dec 10 12:40:27 2019 +0100 ARM: dts: exynos: Add missing CPU frequencies for Exynos5422/5800 Add missing 2.0GHz, 1.9GHz & 1.8GHz OPPs (for A15 cores) and 1.4GHz OPP (for A7 cores). Also update common Odroid-XU3 Lite/XU3/XU4 thermal cooling maps to account for new OPPs. Since some new OPPs are not available on all Exynos5422/5800 boards modify dts files for Odroid XU3 Lite (limited to 1.8 GHz / 1.3 GHz) & Peach Pi (limited to 2.0 GHz / 1.3 GHz) accordingly. This patch uses maximum voltages for new OPPs. This is a temporary solution till proper Exynos ASV support is added. Also while at it fix the number of cooling down steps for big cores (should be 11 instead of 12 on Odroid XU3 Lite and 14 on XU3/XU4). Signed-off-by: Bartlomiej Zolnierkiewicz [mszyprow: rebased onto v5.5-rc1 and adapted to recent dts changes, fixed removal of the 1.4GHz OPP for A7s on Peach-Pi] Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 6c43b5d3964c5d2676e83765ac5a1eee7600f080 Author: Marek Szyprowski Date: Tue Dec 10 12:40:26 2019 +0100 ARM: dts: exynos: Add initial data for coupled regulators for Exynos5422/5800 Declare Exynos5422/5800 voltage ranges for OPPs for big CPUs (Cortex-A15) and wcore bus. Couple their voltage supplies as vdd_arm and vdd_int should be in 300 mV range. Signed-off-by: Marek Szyprowski [k.konieczny: add missing patch description] Signed-off-by: Kamil Konieczny Reviewed-by: Chanwoo Choi Signed-off-by: Krzysztof Kozlowski commit e90cb36c77b93b6b23ca4a860b58355e94fc70d5 Author: Sylwester Nawrocki Date: Mon Oct 28 16:20:49 2019 +0100 ARM: dts: exynos: Remove syscon compatible from chipid node on Exynos5 The "syscon" compatible string was introduced in commit ("cdcce1ee977b ARM: dts: exynos: Add "syscon" compatible string to chipid node on Exynos5") to allow sharing of the CHIPID IO region between multiple drivers. However, such sharing can be also done without an additional compatible so remove the syscon entry. Suggested-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki Signed-off-by: Krzysztof Kozlowski commit 9f9e2df2e64df197ff6548ef494f76be5b35d08a Author: Krzysztof Kozlowski Date: Thu Dec 5 21:00:06 2019 +0100 ARM: exynos_defconfig: Bring back explicitly wanted options Few options KALLSYMS_ALL, SCSI, PM_DEVFREQ and mutex/spinlock debugging were removed with savedefconfig because they were selected by other options. However these are user-visible options and they might not be selected in the future. Exactly this happened with commit 0e4a459f56c3 ("tracing: Remove unnecessary DEBUG_FS dependency") removing the dependency between DEBUG_FS and TRACING. To avoid losing these options in the future, explicitly mention them in defconfig. Reported-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 19f62c76f1c6be9896f3efb7312501a2260184b6 Author: michael.kao Date: Fri Nov 22 17:06:10 2019 +0800 arm64: dts: mt8173: Add dynamic power node. This device node is for calculating dynamic power in mW. Since mt8173 has two clusters, there are two dynamic power coefficient as well. Signed-off-by: Dawei Chien Signed-off-by: Michael.Kao Signed-off-by: Matthias Brugger commit 01fec8cce7cc68bb88b1ff55bc03da5f3e6625e3 Author: Takashi Iwai Date: Tue Dec 10 15:54:06 2019 +0100 ASoC: Drop snd_soc_pcm_lib_ioctl() Now all snd_soc_pcm_lib_ioctl() calls were dropped, and it became superfluous. Let's kill it. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-24-tiwai@suse.de Signed-off-by: Mark Brown commit c0bd504dfbe697228f9a087f209cb6931157a97c Author: Takashi Iwai Date: Tue Dec 10 15:54:02 2019 +0100 ASoC: uniphier: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Masahiro Yamada Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-20-tiwai@suse.de Signed-off-by: Mark Brown commit e91f134c83b1b3319db4c14bb5d9d23dc567b283 Author: Takashi Iwai Date: Tue Dec 10 15:53:57 2019 +0100 ASoC: sh: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-15-tiwai@suse.de Signed-off-by: Mark Brown commit 851c902fd2d09b2ed85181e74b43477b7a3882be Author: Geert Uytterhoeven Date: Wed Dec 11 14:15:53 2019 +0100 spi: rspi: Remove obsolete platform_device_id entries Since commits 05104c266ae9a167 ("ARM: shmobile: r7s72100: genmai: Remove legacy board file") and a483dcbfa21f919c ("ARM: shmobile: lager: Remove legacy board support", RZ/A1 and R-Car Gen2 SoCs are only supported in generic DT-only ARM multi-platform builds. The driver doesn't need to match platform devices by name anymore for these platforms, hence remove the corresponding platform_device_id entries. The platform_device_id entry for "rspi" is retained, as it is used by the SH7757 platform, which hasn't been converted to DT yet. Signed-off-by: Geert Uytterhoeven Acked-by: Simon Horman Link: https://lore.kernel.org/r/20191211131553.23960-1-geert+renesas@glider.be Signed-off-by: Mark Brown commit 169f9acae08685d4f2a6fd32983958d44e10905d Author: Aditya Pakki Date: Thu Dec 5 17:14:21 2019 -0600 spi: dw: Avoid BUG_ON() in case of host failure If dws is NULL in dw_spi_host_add(), we return the error to the upper callers instead of crashing. The patch replaces BUG_ON by returning -EINVAL to the caller. Signed-off-by: Aditya Pakki Link: https://lore.kernel.org/r/20191205231421.9333-1-pakki001@umn.edu Signed-off-by: Mark Brown commit d55894bc27636ebaf66c7c6eca8da5548911f8c9 Author: Takashi Iwai Date: Tue Dec 10 15:26:05 2019 +0100 ASoC: uniphier: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped, as well as the pcm_destruct callback just containing the superfluous snd_pcm_lib_preallocate_free_for_all() call. Cc: Masahiro Yamada Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-15-tiwai@suse.de Signed-off-by: Mark Brown commit 2c7c9630db45129838ed09f0ada718b0ac222377 Author: Takashi Iwai Date: Tue Dec 10 15:26:00 2019 +0100 ASoC: siu_pcm: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous (the rest were only debug prints) and got dropped. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-10-tiwai@suse.de Signed-off-by: Mark Brown commit 55df47f2300e7cdb2bb3ca1209ec0b938459fc8f Author: Takashi Iwai Date: Tue Dec 10 15:25:58 2019 +0100 ASoC: fsi: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-8-tiwai@suse.de Signed-off-by: Mark Brown commit 51240953f28e0528a975db686d4e9e5938d55829 Author: Takashi Iwai Date: Tue Dec 10 15:26:14 2019 +0100 ASoC: intel: skylake: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. The pcm_construct ops contains only the superfluous call of snd_pcm_lib_preallocate_free_for_all(), so dropped, too. Cc: Cezary Rojewski Cc: Pierre-Louis Bossart Cc: Liam Girdwood Cc: Jie Yang Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-24-tiwai@suse.de Signed-off-by: Mark Brown commit 3f93b1ed4ac1e285eafc6da8b354d3577977059a Author: Takashi Iwai Date: Tue Dec 10 15:26:13 2019 +0100 ASoC: intel: haswell: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Cc: Cezary Rojewski Cc: Pierre-Louis Bossart Cc: Liam Girdwood Cc: Jie Yang Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-23-tiwai@suse.de Signed-off-by: Mark Brown commit d9c7824aa29d064b205957033463563ac3205fcb Author: Takashi Iwai Date: Tue Dec 10 15:26:12 2019 +0100 ASoC: intel: baytrail: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Cc: Cezary Rojewski Cc: Pierre-Louis Bossart Cc: Liam Girdwood Cc: Jie Yang Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-22-tiwai@suse.de Signed-off-by: Mark Brown commit 02298145559f824b31a4bada8071e59c55b7df88 Author: Takashi Iwai Date: Tue Dec 10 15:26:11 2019 +0100 ASoC: intel: atom: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Cc: Cezary Rojewski Cc: Pierre-Louis Bossart Cc: Liam Girdwood Cc: Jie Yang Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-21-tiwai@suse.de Signed-off-by: Mark Brown commit 9a560089e964c47f9be11cfb174c47aab0db64a3 Author: Takashi Iwai Date: Tue Dec 10 15:26:10 2019 +0100 ASoC: rt5677-spi: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Cc: Oder Chiou Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-20-tiwai@suse.de Signed-off-by: Mark Brown commit cae8055e065644fd1d92d2f0c23a39b6768d168a Author: Takashi Iwai Date: Tue Dec 10 15:26:09 2019 +0100 ASoC: rt5514-spi: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Cc: Oder Chiou Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-19-tiwai@suse.de Signed-off-by: Mark Brown commit 66b3621b8b6f3e184b5dd34358de41bcd5a73bb5 Author: Takashi Iwai Date: Tue Dec 10 15:26:08 2019 +0100 ASoC: cros_ec_codec: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Cc: Cheng-Yi Chiang Cc: Benson Leung Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-18-tiwai@suse.de Signed-off-by: Mark Brown commit bfddcaffd8858973385ec11c6051bb04fa685e6c Author: Takashi Iwai Date: Tue Dec 10 15:26:07 2019 +0100 ASoC: xtensa: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Cc: Max Filippov Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-17-tiwai@suse.de Signed-off-by: Mark Brown commit 52f0ac153d12beb5af9d8a1ad3013762e919ffa6 Author: Takashi Iwai Date: Tue Dec 10 15:26:06 2019 +0100 ASoC: xilinx: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Cc: Michal Simek Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-16-tiwai@suse.de Signed-off-by: Mark Brown commit ffe119308cf6f174eb65e2a7c023c85178f5109c Author: Takashi Iwai Date: Tue Dec 10 15:26:04 2019 +0100 ASoC: txx9: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-14-tiwai@suse.de Signed-off-by: Mark Brown commit 6f7aff352e690bd167d97f8354543855cf6c34b8 Author: Takashi Iwai Date: Tue Dec 10 15:26:03 2019 +0100 ASoC: stm32: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped, as well as the superfluous snd_pcm_lib_preallocate_free_for_all() call. As of the result, hw_free and pcm_destruct ops became empty and got removed. Cc: Olivier Moysan Cc: Arnaud Pouliquen Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-13-tiwai@suse.de Signed-off-by: Mark Brown commit d708c2b36b5d23a7266ca9bfe648533a0f61bdfd Author: Takashi Iwai Date: Tue Dec 10 15:26:01 2019 +0100 ASoC: generic-dmaengine-pcm: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Cc: Lars-Peter Clausen Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-11-tiwai@suse.de Signed-off-by: Mark Brown commit e494dbcd9be743f41cf842f94ffbc7c56b6b072a Author: Takashi Iwai Date: Tue Dec 10 15:25:59 2019 +0100 ASoC: rcar: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-9-tiwai@suse.de Signed-off-by: Mark Brown commit d23a16584b4f4cc7226c75793d1797e5505a193b Author: Takashi Iwai Date: Tue Dec 10 15:25:57 2019 +0100 ASoC: dma-sh7760: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-7-tiwai@suse.de Signed-off-by: Mark Brown commit bace3caa82e1f0b5b667e35b532534b9cbdc4338 Author: Takashi Iwai Date: Tue Dec 10 15:25:56 2019 +0100 ASoC: meson: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Cc: Jerome Brunet Cc: Kevin Hilman Signed-off-by: Takashi Iwai Acked-by: Jerome Brunet Link: https://lore.kernel.org/r/20191210142614.19405-6-tiwai@suse.de Signed-off-by: Mark Brown commit fcf306efab32975e4f8bdf5e9d3e7c34fe4ce48c Author: Takashi Iwai Date: Tue Dec 10 15:25:54 2019 +0100 ASoC: dwc: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped, as well as the superfluous snd_pcm_lib_preallocate_free_for_all() call. As of the result, hw_free and pcm_destruct ops became empty and got removed. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-4-tiwai@suse.de Signed-off-by: Mark Brown commit fe9912ac58e4fa205faabcccc980eb834cc5f1aa Author: Takashi Iwai Date: Tue Dec 10 15:25:53 2019 +0100 ASoC: au1x: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-3-tiwai@suse.de Signed-off-by: Mark Brown commit a4072cdfa9fe79adcd41320355847e77de22baf0 Author: Kuninori Morimoto Date: Wed Dec 11 13:32:20 2019 +0900 ASoC: soc-core: tidyup for CONFIG_DEBUG_FS soc-core.c has 2 #ifdef CONFIG_DEBUG_FS, but we can merge these. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87d0cvbhyj.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8a6a6a38f86885982891197840e7b8eccad5ef50 Author: Kuninori Morimoto Date: Wed Dec 11 13:32:05 2019 +0900 ASoC: soc-core: tidyup for CONFIG_DMI soc-core.c has 2 #ifdef CONFIG_DMI, but we can merge these. OTOH, soc.h has dmi_longname, but it is needed if CONFIG_DMI was defined. In other words, It is not needed if CONFIG_DMI was not defined. This patch tidyup these. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87eexbbhyy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 29d9fc7acacbb985daa1b4c662c619dc959a11b0 Author: Kuninori Morimoto Date: Wed Dec 11 13:31:39 2019 +0900 ASoC: soc-core: merge soc_set_name_prefix() and soc_set_of_name_prefix() soc_set_name_prefix() is calling soc_set_of_name_prefix(). We don't need to separate these operation. This patch merges these. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87fthrbhzo.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit bae141f54be83b06652c1d47e50e4e75ed4e9c7e Author: Daniel Borkmann Date: Fri Dec 6 22:49:34 2019 +0100 bpf: Emit audit messages upon successful prog load and unload Allow for audit messages to be emitted upon BPF program load and unload for having a timeline of events. The load itself is in syscall context, so additional info about the process initiating the BPF prog creation can be logged and later directly correlated to the unload event. The only info really needed from BPF side is the globally unique prog ID where then audit user space tooling can query / dump all info needed about the specific BPF program right upon load event and enrich the record, thus these changes needed here can be kept small and non-intrusive to the core. Raw example output: # auditctl -D # auditctl -a always,exit -F arch=x86_64 -S bpf # ausearch --start recent -m 1334 ... ---- time->Wed Nov 27 16:04:13 2019 type=PROCTITLE msg=audit(1574867053.120:84664): proctitle="./bpf" type=SYSCALL msg=audit(1574867053.120:84664): arch=c000003e syscall=321 \ success=yes exit=3 a0=5 a1=7ffea484fbe0 a2=70 a3=0 items=0 ppid=7477 \ pid=12698 auid=1001 uid=1001 gid=1001 euid=1001 suid=1001 fsuid=1001 \ egid=1001 sgid=1001 fsgid=1001 tty=pts2 ses=4 comm="bpf" \ exe="/home/jolsa/auditd/audit-testsuite/tests/bpf/bpf" \ subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 key=(null) type=UNKNOWN[1334] msg=audit(1574867053.120:84664): prog-id=76 op=LOAD ---- time->Wed Nov 27 16:04:13 2019 type=UNKNOWN[1334] msg=audit(1574867053.120:84665): prog-id=76 op=UNLOAD ... Signed-off-by: Daniel Borkmann Co-developed-by: Jiri Olsa Signed-off-by: Jiri Olsa Acked-by: Paul Moore Link: https://lore.kernel.org/bpf/20191206214934.11319-1-jolsa@kernel.org commit f3417d703f18b2bfe180e28cd65f44b540546d29 Author: Colin Ian King Date: Tue Dec 10 14:23:49 2019 +0000 drm/i915: remove redundant checks for a null fb pointer A prior check and return when pointer fb is null makes subsequent null checks on fb redundant. Remove the redundant null checks. Addresses-Coverity: ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191210142349.333171-1-colin.king@canonical.com commit 7b0bcead187fb3afb45fd052316f9eb967ef1986 Author: Colin Ian King Date: Tue Dec 10 14:45:35 2019 +0000 drm/i915/display: remove duplicated assignment to pointer crtc_state Pointer crtc_state is being assigned twice, one of these is redundant and can be removed. Addresses-Coverity: ("Evaluation order violation") Signed-off-by: Colin Ian King Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191210144535.341977-1-colin.king@canonical.com commit 14856e9efb87381ab3ff71085ae8129ee4b2607e Author: Thomas Zimmermann Date: Tue Dec 10 09:49:05 2019 +0100 drm/udl: Remove udl_fb.c The remaining code in udl_fb.c is unused. Remove the file entirely. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20191210084905.5570-10-tzimmermann@suse.de commit a8109f5bc4bd6dc037bd15651c6c7f1ac00ed235 Author: Thomas Zimmermann Date: Tue Dec 10 09:49:04 2019 +0100 drm/udl: Move udl_handle_damage() into udl_modeset.c The only caller of udl_handle_damage() in the plane-update function in udl_modeset.c. Move udl_handle_damage() there. v2: * remove udl_fb.c in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20191210084905.5570-9-tzimmermann@suse.de commit eb3deeceaa5d066a5819fb45876de4d262a8f210 Author: Thomas Zimmermann Date: Tue Dec 10 09:49:03 2019 +0100 drm/udl: Remove struct udl_device.active_fb_16 The udl driver stores the currently active framebuffer to know from where to accept damage updates. With the conversion to plane-state damage handling, this is not necessary any longer. The currently active framebuffer and damaged area are always stored in the plane state. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20191210084905.5570-8-tzimmermann@suse.de commit 230b8b04d74958ebc5892510475e510b1284f14f Author: Thomas Zimmermann Date: Tue Dec 10 09:49:02 2019 +0100 drm/udl: Convert to drm_atomic_helper_dirtyfb() The infrastruture for atomic modesetting allows us to use the generic code for dirty-FB and damage handling. Switch over udl and remove the driver's implementation. The simple-pipe's update function now picks up the primary plane's damage and updates a minimal region of the screen. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20191210084905.5570-7-tzimmermann@suse.de commit d8177841aa8a5d32767a5a18413c30b40234a4e5 Author: Thomas Zimmermann Date: Tue Dec 10 09:49:01 2019 +0100 drm/udl: Set preferred color depth to 16 bpp The current default color depth of 24 bpp is not even supported by the driver. Being the native format for communicating with the adapter, 16 bpp is the correct choice. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20191210084905.5570-6-tzimmermann@suse.de commit 997d33c35618f12e311734b9fcd03a9945950c2b Author: Thomas Zimmermann Date: Tue Dec 10 09:49:00 2019 +0100 drm/udl: Inline DPMS code into CRTC enable and disable functions DPMS functionality is only used by the CRTC's enable and disable functions. Inline the code. The patch also adds symbolic constants for the blank register and constants; according to udlfb, which is a bit more detailed than DRM's udl. v3: * use symbolic constants for blank, according to udlfb driver Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20191210084905.5570-5-tzimmermann@suse.de commit ae08b88aea6b8094c8163b753b626329542146ee Author: Thomas Zimmermann Date: Tue Dec 10 09:48:59 2019 +0100 drm/udl: Switch to atomic suspend/resume helpers We can use the generic suspend/resume helpers for atomic modesetting. Switch udl over. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20191210084905.5570-4-tzimmermann@suse.de commit 9fda81e00e060e3ab9a56d77552d2d5e296f1007 Author: Thomas Zimmermann Date: Tue Dec 10 09:48:58 2019 +0100 drm/udl: Convert to struct drm_simple_display_pipe Udl has a single display pipeline with a primary plane; perfect for simple-pipe helpers. Convert it over. The old encoder and CRTC code becomes unused and obsolete. Exported formats for the primary plane are RGB565 and XRGB8888, with the latter being emulated. The 16-bit format is the default and what is used when communicating with the device. This patch enables atomic modesetting for udl devices. v3: * remove unused field crtc from struct udl_device * set crtc_state->no_vblank at beginning of enable() v2: * move suspend/resume changes into separate patch * remove non-atomic code Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20191210084905.5570-3-tzimmermann@suse.de commit e829cf0b30b4b55c9fa212cef1e116df91e0d80b Author: Thomas Zimmermann Date: Tue Dec 10 09:48:57 2019 +0100 drm/udl: Init connector before encoder and CRTC To mimic simple-pipe, we initialize the connector before the rest of the display pipeline. v2: * remove unnecessary calls to drm_connector_{register,unregister}() Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20191210084905.5570-2-tzimmermann@suse.de commit 93ec6953c1d7b3c5f62d35c76fe6670c6d9b3c8c Author: Takashi Iwai Date: Tue Dec 10 15:54:05 2019 +0100 ASoC: utils: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-23-tiwai@suse.de Signed-off-by: Mark Brown commit 6a8228d07ca022b6099b3a2b1432cdfb94bb36c4 Author: Takashi Iwai Date: Tue Dec 10 15:54:04 2019 +0100 ASoC: xtensa: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Max Filippov Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-22-tiwai@suse.de Signed-off-by: Mark Brown commit 71bfaea3d6d921f4e35e185f7dbd488110e9ce2e Author: Takashi Iwai Date: Tue Dec 10 15:54:03 2019 +0100 ASoC: xilinx: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Michal Simek Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-21-tiwai@suse.de Signed-off-by: Mark Brown commit 88b79e98cfc83290c12dd0455743ff84c556628e Author: Takashi Iwai Date: Tue Dec 10 15:54:01 2019 +0100 ASoC: txx9: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-19-tiwai@suse.de Signed-off-by: Mark Brown commit 01ac8ada97120b582580a7b3059329ddf659d033 Author: Takashi Iwai Date: Tue Dec 10 15:54:00 2019 +0100 ASoC: sprd: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Orson Zhai Cc: Baolin Wang Cc: Chunyan Zhang Signed-off-by: Takashi Iwai Reviewed-by: Baolin Wang Link: https://lore.kernel.org/r/20191210145406.21419-18-tiwai@suse.de Signed-off-by: Mark Brown commit 620ea8d26b99a5857b12a26f3673ad1fcd8abe9f Author: Takashi Iwai Date: Tue Dec 10 15:53:59 2019 +0100 ASoC: SOF: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-17-tiwai@suse.de Signed-off-by: Mark Brown commit 2680c3127c3995c7cbd920c87fbc3411685e7717 Author: Takashi Iwai Date: Tue Dec 10 15:53:58 2019 +0100 ASoC: generic-dmaengine: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Lars-Peter Clausen Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-16-tiwai@suse.de Signed-off-by: Mark Brown commit c4d14046650087f6495ab6855cf1a0090325c48a Author: Takashi Iwai Date: Tue Dec 10 15:53:56 2019 +0100 ASoC: samsung: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Krzysztof Kozlowski Cc: Sangbeom Kim Cc: Sylwester Nawrocki Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-14-tiwai@suse.de Signed-off-by: Mark Brown commit 29da4698399eceaac0bfcf1f180e21a51d5d7aed Author: Takashi Iwai Date: Tue Dec 10 15:53:55 2019 +0100 ASoC: qcom: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Patrick Lai Cc: Banajit Goswami Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-13-tiwai@suse.de Signed-off-by: Mark Brown commit 92e63b552822b51aac65348b7ae46749590a3c8e Author: Takashi Iwai Date: Tue Dec 10 15:53:54 2019 +0100 ASoC: pxa: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-12-tiwai@suse.de Signed-off-by: Mark Brown commit a984e214de0c5d592a50bc6bd04b32a335d48a55 Author: Takashi Iwai Date: Tue Dec 10 15:53:53 2019 +0100 ASoC: meson: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Jerome Brunet Cc: Kevin Hilman Signed-off-by: Takashi Iwai Acked-by: Jerome Brunet Link: https://lore.kernel.org/r/20191210145406.21419-11-tiwai@suse.de Signed-off-by: Mark Brown commit a1b175b0828de15e04b551a8406affcddc552d7d Author: Takashi Iwai Date: Tue Dec 10 15:53:52 2019 +0100 ASoC: mediatek: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Matthias Brugger Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-10-tiwai@suse.de Signed-off-by: Mark Brown commit 13fd6f07f5b1cab528271f908df531a49e0bdcde Author: Takashi Iwai Date: Tue Dec 10 15:53:51 2019 +0100 ASoC: kirkwood: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-9-tiwai@suse.de Signed-off-by: Mark Brown commit aa4708d97e74d161502c9a5bc07532b34e727370 Author: Takashi Iwai Date: Tue Dec 10 15:53:50 2019 +0100 ASoC: intel: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Cezary Rojewski Cc: Pierre-Louis Bossart Cc: Liam Girdwood Cc: Jie Yang Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-8-tiwai@suse.de Signed-off-by: Mark Brown commit 6ac44ce9dfd6ba4dfb1d5e571131d132c53f23f1 Author: Takashi Iwai Date: Tue Dec 10 15:53:49 2019 +0100 ASoC: fsl: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Timur Tabi Cc: Nicolin Chen Cc: Xiubo Li Signed-off-by: Takashi Iwai Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20191210145406.21419-7-tiwai@suse.de Signed-off-by: Mark Brown commit f6201a314fc780bda83ffc5338c7bc0326749e84 Author: Takashi Iwai Date: Tue Dec 10 15:53:48 2019 +0100 ASoC: dwc: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-6-tiwai@suse.de Signed-off-by: Mark Brown commit e7a83dfcb33d36463def773c101051d63d5593ef Author: Takashi Iwai Date: Tue Dec 10 15:53:47 2019 +0100 ASoC: bcm: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Ray Jui Cc: Scott Branden Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-5-tiwai@suse.de Signed-off-by: Mark Brown commit 4000fc0b5a7f277ed6f83b1673a833b67a4cfa71 Author: Takashi Iwai Date: Tue Dec 10 15:53:46 2019 +0100 ASoC: au1x: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-4-tiwai@suse.de Signed-off-by: Mark Brown commit 7aff4224ff6b603c432de56139b621d68e0307fb Author: Takashi Iwai Date: Tue Dec 10 15:53:45 2019 +0100 ASoC: atmel: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Cc: Codrin Ciubotariu Cc: Alexandre Belloni Cc: Ludovic Desroches Signed-off-by: Takashi Iwai Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20191210145406.21419-3-tiwai@suse.de Signed-off-by: Mark Brown commit 66a7caaf354edd35089dcaabd277b38f036b783b Author: Takashi Iwai Date: Tue Dec 10 15:53:44 2019 +0100 ASoC: amd: Drop superfluous ioctl PCM ops ASoC PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210145406.21419-2-tiwai@suse.de Signed-off-by: Mark Brown commit 7f4aee8fa79c2d753aa1b2e9ffcad24689317f75 Author: Takashi Iwai Date: Tue Dec 10 15:25:52 2019 +0100 ASoC: amd: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210142614.19405-2-tiwai@suse.de Signed-off-by: Mark Brown commit b104e8b200974f9d1a431d1ce15f0e6d547dc859 Author: Ville Syrjälä Date: Tue Nov 12 18:38:12 2019 +0200 drm/i915: Pass cpu transcoder to assert_pipe() In order to eliminate intel_pipe_to_cpu_transcoder() (and its crtc->config usage) let's pass the cpu transcoder to assert_pipe() so we don't have to do the pipe->cpu transcoder lookup on HSW+. On VLV/CHV this can get called during eDP init, which happens before crtc->config->cpu_transcoder is even populated. So currently we're always reading PIPECONF(A) there even if we're trying to check the state of some other pipe. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191112163812.22075-4-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit a722146b5f52f514aabf0d04c3dbdd39850d0a8c Author: Ville Syrjälä Date: Tue Nov 12 18:38:11 2019 +0200 drm/i915: ELiminate intel_pipe_to_cpu_transcoder() from assert_fdi_tx() Let's start to eliminate intel_pipe_to_cpu_transcoder() so that we can get rid of one more crtc->config usage (which we will want to nuke as well). In the case of assert_fdi_tx() we know that we're never dealing with the EDP transcoder so we can simply replace this with a cast. v2: Fix poor English in comment Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191112163812.22075-3-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 919dfb7830568f1d5b2cf0cfb9e0a1d4a4c7bfeb Author: Thomas Anderson Date: Tue Dec 10 14:10:48 2019 -0800 drm/edid: Increase size of VDB and CMDB bitmaps to 256 bits CEA-861-G adds modes up to 219, so increase the size of the maps in preparation for adding the new modes to drm_edid.c. Signed-off-by: Thomas Anderson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191210221048.83628-1-thomasanderson@google.com commit 2f48865db3322f8e74f51ff93b91e5c2916dd259 Author: Marcel Holtmann Date: Wed Dec 4 04:41:09 2019 +0100 HID: hidraw: add support uniq ioctl Add support for reading out the uniq information from the underlying HID device. This might be the iSerialNumber in case of USB or the BD_ADDR in case of Bluetooth. Signed-off-by: Marcel Holtmann Signed-off-by: Jiri Kosina commit b590cb5f802dc20c72f507f7fbe6737222d0afba Author: Stanislav Fomichev Date: Tue Dec 10 11:19:33 2019 -0800 bpf: Switch to offsetofend in BPF_PROG_TEST_RUN Switch existing pattern of "offsetof(..., member) + FIELD_SIZEOF(..., member)' to "offsetofend(..., member)" which does exactly what we need without all the copy-paste. Suggested-by: Andrii Nakryiko Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20191210191933.105321-1-sdf@google.com commit 09c4708d3cf42b2b2211b1aee82e7baf446a24e8 Author: Andrii Nakryiko Date: Mon Dec 9 14:40:22 2019 -0800 libbpf: Bump libpf current version to v0.0.7 New development cycles starts, bump to v0.0.7 proactively. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20191209224022.3544519-1-andriin@fb.com commit c453312857ba41129db3558f5428405bbbb8f1a4 Author: Russell King Date: Mon Dec 9 11:17:30 2019 +0000 ARM: net: bpf: Improve prologue code sequence Improve the prologue code sequence to be able to take advantage of 64-bit stores, changing the code from: push {r4, r5, r6, r7, r8, r9, fp, lr} mov fp, sp sub ip, sp, #80 ; 0x50 sub sp, sp, #600 ; 0x258 str ip, [fp, #-100] ; 0xffffff9c mov r6, #0 str r6, [fp, #-96] ; 0xffffffa0 mov r4, #0 mov r3, r4 mov r2, r0 str r4, [fp, #-104] ; 0xffffff98 str r4, [fp, #-108] ; 0xffffff94 to the tighter: push {r4, r5, r6, r7, r8, r9, fp, lr} mov fp, sp mov r3, #0 sub r2, sp, #80 ; 0x50 sub sp, sp, #600 ; 0x258 strd r2, [fp, #-100] ; 0xffffff9c mov r2, #0 strd r2, [fp, #-108] ; 0xffffff94 mov r2, r0 resulting in a saving of three instructions. Signed-off-by: Russell King Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/E1ieH2g-0004ih-Rb@rmk-PC.armlinux.org.uk commit 3bf258e159cd8e7bcc431bfd1e7dabd5ad95babc Author: Martin Blumenstingl Date: Sun Nov 17 14:59:27 2019 +0100 clk: meson: meson8b: use of_clk_hw_register to register the clocks Switch from clk_hw_register to of_clk_hw_register so we can use clk_parent_data.fw_name. This will be used to get the "xtal", "ddr_pll" and possibly others from the .dtb. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet commit 096f0a2edfa94262b4128d9ff5a32d67b9a6290d Author: Martin Blumenstingl Date: Sun Nov 17 14:59:26 2019 +0100 clk: meson: meson8b: don't register the XTAL clock when provided via OF The XTAL clock is an actual crystal on the PCB. Thus the meson8b clock driver should not register the XTAL clock - instead it should be provided via .dts and then passed to the clock controller. Skip the registration of the XTAL clock if a parent clock is provided via OF. Fall back to registering the XTAL clock if this is not the case to keep support for old .dtbs. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet commit 5668f7653d587d3274db2689da945d9465ca5d3e Author: Martin Blumenstingl Date: Sun Nov 17 14:59:25 2019 +0100 clk: meson: meson8b: change references to the XTAL clock to use [fw_]name The XTAL clock is an actual crystal which is mounted on the PCB. Thus the meson8b clock controller driver should not provide the XTAL clock. The meson8b clock controller driver must not use references to the meson8b_xtal clock anymore before we can provide the XTAL clock via OF. Replace the references to the meson8b_xtal.hw by using clk_parent_data's .fw_name and .name = "xtal" (along with index = -1). This makes the common clock framework use the clock provided via OF and if that's not available it falls back to getting the clock by it's name (which is then the clk_fixed_rate which we register in our driver). Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet commit 2accb4ee16bd166da4f22d1477ed4b6b422454e0 Author: Martin Blumenstingl Date: Sun Nov 17 14:59:24 2019 +0100 clk: meson: meson8b: use clk_hw_set_parent in the CPU clock notifier Switch from clk_set_parent() to clk_hw_set_parent() now that we have a way to configure a mux clock based on clk_hw pointers. This simplifies the meson8b_cpu_clk_notifier_cb logic. No functional changes. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet commit 64aa7008e957a0a60f1ca3227d85ad1e507252cd Author: Martin Blumenstingl Date: Sun Nov 17 15:07:31 2019 +0100 clk: meson: add a driver for the Meson8/8b/8m2 DDR clock controller The Meson8/Meson8b/Meson8m2 SoCs embed a DDR clock controller in the MMCBUS registers. There is no public documentation, but the u-boot GPL sources from the Amlogic BSP show that the DDR clock controller is identical on all three SoCs: #define CFG_DDR_CLK 792 #define CFG_PLL_M (((CFG_DDR_CLK/12)*12)/24) #define CFG_PLL_N 1 #define CFG_PLL_OD 1 // from set_ddr_clock: t_ddr_pll_cntl= (CFG_PLL_OD << 16)|(CFG_PLL_N<<9)|(CFG_PLL_M<<0) writel(timing_reg->t_ddr_pll_cntl|(1<<29),AM_DDR_PLL_CNTL); writel(readl(AM_DDR_PLL_CNTL) & (~(1<<29)),AM_DDR_PLL_CNTL); // from hx_ddr_power_down_enter: shut down DDR PLL writel(readl(AM_DDR_PLL_CNTL)|(1<<30),AM_DDR_PLL_CNTL); do { ... } while((readl(AM_DDR_PLL_CNTL)&(1<<31))==0) This translates to: - AM_DDR_PLL_CNTL[29] is the reset bit - AM_DDR_PLL_CNTL[30] is the enable bit - AM_DDR_PLL_CNTL[31] is the lock bit - AM_DDR_PLL_CNTL[8:0] is the m value (assuming the width is 9 bits based on the start of the n value) - AM_DDR_PLL_CNTL[13:9] is the n value (assuming the width is 5 bits based on the start of the od) - AM_DDR_PLL_CNTL[17:16] is the od (assuming the width is 2 bits based on other PLLs on this SoC) Add a driver for this PLL setup because it's used as one of the inputs of the audio clocks. There may be more clocks inside that clock controller - those can be added in subsequent patches. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet commit 25d316989e2b1beebaa69e6c3e76e762776c93de Author: Martin Blumenstingl Date: Sun Nov 17 14:59:23 2019 +0100 dt-bindings: clock: meson8b: add the clock inputs The clock controller on Meson8/Meson8b/Meson8m2 has three (known) inputs: - "xtal": the main 24MHz crystal - "ddr_pll": some of the audio clocks use the output of the DDR PLL as input - "clk_32k": an optional clock signal which can be connected to GPIOAO_6 (which then has to be switched to the CLK_32K_IN function) Add the inputs to the documentation so we can wire up these inputs in a follow-up patch. Reviewed-by: Rob Herring Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet commit 51b6fe7e66eee0fe353ff8157c64d16b971fac39 Author: Martin Blumenstingl Date: Sun Nov 17 15:07:30 2019 +0100 dt-bindings: clock: add the Amlogic Meson8 DDR clock controller binding Amlogic Meson8, Meson8b and Meson8m2 SoCs have a DDR clock controller in the MMCBUS registers. There is no public documentation on this, but the GPL u-boot sources from the Amlogic BSP show that: - it uses the same XTAL input as the main clock controller - it contains a PLL which seems to be implemented just like the other PLLs in this SoC - there is a power-of-two PLL post-divider Add the documentation and header file for this DDR clock controller. Reviewed-by: Rob Herring Acked-by: Stephen Boyd Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet commit 5de34ed13787c47f34b73d69b3d0bbaf2245d534 Author: Chris Wilson Date: Tue Dec 10 11:55:02 2019 +0000 drm/i915/selftests: Show the i915_active on failure Print the i915_active state on selftest failure, with a hope it helps illuminate the cause of the failure. References: https://gitlab.freedesktop.org/drm/intel/issues/765 Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191210115502.3767070-1-chris@chris-wilson.co.uk commit 93e89ac8537bad2cd560c64b70dbb87e68714e54 Author: Chris Wilson Date: Tue Dec 10 13:37:19 2019 +0000 drm/i915/gem: Wait on unbind barriers when invalidating userptr When we are told we have to drop all references to userptr, wait for any barriers required for unbinding. <4> [2055.808787] WARNING: CPU: 3 PID: 6239 at mm/mmu_notifier.c:472 __mmu_notifier_invalidate_range_start+0x1f2/0x250 <4> [2055.808792] Modules linked in: vgem mei_hdcp snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel r8169 lpc_ich realtek i915 snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core pinctrl_broxton snd_pcm pinctrl_intel mei_me intel_lpss_pci mei prime_numbers [last unloaded: vgem] <4> [2055.808834] CPU: 3 PID: 6239 Comm: gem_userptr_bli Tainted: G U 5.5.0-rc1-CI-CI_DRM_7522+ #1 <4> [2055.808839] Hardware name: /NUC6CAYB, BIOS AYAPLCEL.86A.0049.2018.0508.1356 05/08/2018 <4> [2055.808847] RIP: 0010:__mmu_notifier_invalidate_range_start+0x1f2/0x250 <4> [2055.808853] Code: c2 48 c7 c7 70 17 2e 82 44 89 45 d4 48 8b 70 28 e8 ec 01 ef ff 41 f6 46 20 01 44 8b 45 d4 75 0a 41 83 f8 f5 44 89 7d d4 74 89 <0f> 0b 44 89 45 d4 eb 81 0f 0b 49 8b 46 18 49 8b 76 10 4c 89 ff 48 <4> [2055.808858] RSP: 0018:ffffc90002937d40 EFLAGS: 00010202 <4> [2055.808865] RAX: 0000000000000061 RBX: ffff8882703a33e0 RCX: 0000000000000001 <4> [2055.808870] RDX: 0000000000000000 RSI: ffff888277da8cb8 RDI: 00000000ffffffff <4> [2055.808874] RBP: ffffc90002937d70 R08: 00000000fffffff5 R09: 0000000000000000 <4> [2055.808879] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000001 <4> [2055.808884] R13: ffffffff822e1716 R14: ffffc90002937d80 R15: 00000000fffffff5 <4> [2055.808890] FS: 00007fda75004e40(0000) GS:ffff888277d80000(0000) knlGS:0000000000000000 <4> [2055.808895] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [2055.808900] CR2: 000055ad72ec3000 CR3: 00000002697b2000 CR4: 00000000003406e0 <4> [2055.808904] Call Trace: <4> [2055.808920] unmap_vmas+0x13e/0x150 <4> [2055.808937] unmap_region+0xa3/0x100 <4> [2055.808964] __do_munmap+0x26d/0x490 <4> [2055.808980] __vm_munmap+0x66/0xc0 <4> [2055.808994] __x64_sys_munmap+0x12/0x20 <4> [2055.809001] do_syscall_64+0x4f/0x220 Closes: https://gitlab.freedesktop.org/drm/intel/issues/771 Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191210133719.3874455-1-chris@chris-wilson.co.uk commit 955a67f79a972da3edbacb2267698db15af2fe81 Author: Abel Vesa Date: Wed Dec 11 11:25:50 2019 +0200 clk: imx7up: Rename the clks to hws This is just to keep in line with the other i.MX clock drivers that are clk_hw based. Plus, it makes more sense to be called hws since its type is clk_hw not clk. Signed-off-by: Abel Vesa Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit ea6a723a21f792964ef92669d2de34a57752e4e0 Author: Abel Vesa Date: Wed Dec 11 11:25:49 2019 +0200 clk: imx: Rename the imx_clk_divider_gate to imply it's clk_hw based Renaming the imx_clk_divider_gate register function to imx_clk_hw_divider_gate to be more obvious it is clk_hw based. Signed-off-by: Abel Vesa Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 40ad61d6b4e6c6c54ff57bcdf36029913ad1dd14 Author: Abel Vesa Date: Wed Dec 11 11:25:48 2019 +0200 clk: imx: Rename the imx_clk_pfdv2 to imply it's clk_hw based Renaming the imx_clk_pfdv2 register function to imx_clk_hw_pfdv2 to be more obvious it is clk_hw based. Signed-off-by: Abel Vesa Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 74e6395191665d5148ab0746e6a2a2b08675bb3a Author: Abel Vesa Date: Wed Dec 11 11:25:47 2019 +0200 clk: imx: Rename the imx_clk_pllv4 to imply it's clk_hw based Renaming the imx_clk_pllv4 register function to imx_clk_hw_pllv4 to be more obvious it is clk_hw based. Signed-off-by: Abel Vesa Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 179c1f7c7a4fb52c399685096947487c8d7b5efe Author: Abel Vesa Date: Wed Dec 11 11:25:46 2019 +0200 clk: imx: Rename sccg and frac pll register to suggest clk_hw Renaming the imx_clk_frac_pll and imx_clk_sccg_pll register functions to imx_clk_hw_frac_pll, respectively imx_clk_hw_sccg_pll to be more obvious that they are clk_hw based. Signed-off-by: Abel Vesa Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 7c3f951a9717b37071963320f40df22dcb3de8b7 Author: Abel Vesa Date: Wed Dec 11 11:25:45 2019 +0200 clk: imx: imx7ulp composite: Rename to show is clk_hw based Renaming the imx7ulp_clk_composite register function to imx7ulp_clk_hw_composite to show it is clk_hw based. Signed-off-by: Abel Vesa Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 87052383491c46e302f27a9ec0d7cc249b2f4ef2 Author: Abel Vesa Date: Wed Dec 11 11:25:44 2019 +0200 clk: imx: pllv2: Switch to clk_hw based API Switch the imx_clk_pllv2 register function to clk_hw based API, rename accordingly and add a macro for clk based legacy. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 556f788010adfd4e06959ded48e7b0d89f9024b8 Author: Abel Vesa Date: Wed Dec 11 11:25:43 2019 +0200 clk: imx: pllv1: Switch to clk_hw based API Switch the imx_clk_pllv1 register function to clk_hw based API, rename accordingly and add a macro for clk based legacy. This allows us to move closer to a clear split between consumer and provider clk APIs. Signed-off-by: Abel Vesa Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 0394d404c3320893080aac57ab2462e62c04d2d9 Author: Abel Vesa Date: Wed Dec 11 11:25:42 2019 +0200 clk: imx: Replace all the clk based helpers with macros Replacing with macros all the clk based API helpers we reduce the code duplication. The end goal is to get rid of all these macros when there will be no more users of the clk based API, that is, when all the i.MX clock provider drivers will be switched completely to the clk_hw based API. This is another step in moving away from the non clk_hw based API usage throughout the i.MX clock drivers. The reason for doing that is to have a clear split between the clock provider and the clock consumer API. Signed-off-by: Abel Vesa Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit ba7928d9d71f15e15e7ba300426422f928440eb5 Author: Abel Vesa Date: Wed Dec 11 11:25:41 2019 +0200 clk: imx: Rename the SCCG to SSCG According to the manual the acronym stands for Spread Sprectum Clock Generator. Signed-off-by: Abel Vesa Signed-off-by: Shawn Guo commit f60f1c62c3188fcca945581e35e3440ee3fdcc95 Author: Abel Vesa Date: Wed Dec 11 11:25:40 2019 +0200 clk: imx: Add correct failure handling for clk based helpers If the clk_hw based API returns an error, trying to return the clk from hw will end up in a NULL pointer dereference. So adding the to_clk checker and using it inside every clk based macro helper we handle that case correctly. This to_clk is also temporary and will go away along with the clk based macro helpers once there is no user that need them anymore. Signed-off-by: Abel Vesa Signed-off-by: Shawn Guo commit a5b982af953bcc838cd198b0434834cc1dff14ec Author: Chuhong Yuan Date: Mon Dec 9 16:57:11 2019 +0800 dmaengine: axi-dmac: add a check for devm_regmap_init_mmio The driver misses checking the result of devm_regmap_init_mmio(). Add a check to fix it. Fixes: fc15be39a827 ("dmaengine: axi-dmac: add regmap support") Signed-off-by: Chuhong Yuan Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20191209085711.16001-1-hslester96@gmail.com Signed-off-by: Vinod Koul commit bd223ac638a321cd983a25a79e5140a5f3a07fd8 Author: Jani Nikula Date: Tue Dec 3 18:38:54 2019 +0200 auxdisplay: constify fb ops Now that the fbops member of struct fb_info is const, we can start making the ops const as well. Cc: Miguel Ojeda Sandonis Cc: Robin van der Gracht Reviewed-by: Daniel Vetter Reviewed-by: Miguel Ojeda Acked-by: Robin van der Gracht Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/31c18e3ce9d6962aabda4799b3051039ff591c92.1575390741.git.jani.nikula@intel.com commit c0168a3ee6208e72050f47473d9b63fa248ca582 Author: Chris Wilson Date: Tue Dec 10 15:36:20 2019 +0000 drm/i915/gt: Check we are the Ironlake IPS provider before deregistering Check that we own the global pointer before deregistering. Reported-by: Venkata Sandeep Dhanalakota Signed-off-by: Chris Wilson Cc: Venkata Sandeep Dhanalakota Cc: Andi Shyti Reviewed-by: Venkata Sandeep Dhanalakota Link: https://patchwork.freedesktop.org/patch/msgid/20191210153620.3929372-1-chris@chris-wilson.co.uk commit 00aff3f6d8e2c0e24f015280eedad6ac60f0594a Author: Tvrtko Ursulin Date: Mon Dec 9 12:23:14 2019 +0000 drm/i915: Improve execbuf debug Convert i915_gem_check_execbuffer to return the error code instead of a boolean so our neat EINVAL debugging trick works within this function. Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191209122314.16289-1-tvrtko.ursulin@linux.intel.com commit c81471f5e95c79c55687282ff6800f112b5d560b Author: Chris Wilson Date: Tue Dec 10 15:13:32 2019 +0000 drm/i915: Copy across scheduler behaviour flags across submit fences We want the bonded request to have the same scheduler properties as its master so that it is placed at the same depth in the queue. For example, consider we have requests A, B and B', where B & B' are a bonded pair to run in parallel on two engines. A -> B \- B' B will run after A and so may be scheduled on an idle engine and wait on A using a semaphore. B' sees B being executed and so enters the queue on the same engine as A. As B' did not inherit the semaphore-chain from B, it may have higher precedence than A and so preempts execution. However, B' then sits on a semaphore waiting for B, who is waiting for A, who is blocked by B. Ergo B' needs to inherit the scheduler properties from B (i.e. the semaphore chain) so that it is scheduled with the same priority as B and will not be executed ahead of Bs dependencies. Furthermore, to prevent the priorities changing via the expose fence on B', we need to couple in the dependencies for PI. This requires us to relax our sanity-checks that dependencies are strictly in order. v2: Synchronise (B, B') execution on all platforms, regardless of using a scheduler, any no-op syncs should be elided. Fixes: ee1136908e9b ("drm/i915/execlists: Virtual engine bonding") Closes: https://gitlab.freedesktop.org/drm/intel/issues/464 Testcase: igt/gem_exec_balancer/bonded-chain Testcase: igt/gem_exec_balancer/bonded-semaphore Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191210151332.3902215-1-chris@chris-wilson.co.uk commit d04a661a2c7169b48782aa5e9d85d4b4383d562e Author: Animesh Manna Date: Thu Dec 5 18:05:13 2019 +0530 drm/i915/dsb: Fix in mmio offset calculation of DSB instance As the current usage is restricted to first DSB instance per pipe, so existing code could not catch the issue to calculate the mmio offset of different DSB instance per pipe. Corrected the offset calculation. Fixes: a6e58d9a2e04 ("drm/i915/dsb: Check DSB engine status.") Signed-off-by: Animesh Manna Reviewed-by: Anshuman Gupta Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191205123513.22603-1-animesh.manna@intel.com commit cfdca14c44a79b9c9c491235a39b9fc1e520820b Author: Peng Fan Date: Wed Dec 4 09:24:39 2019 +0000 gpio: bcm-kona: use platform_irq_count platform_irq_count() is the more generic way (independent of device trees) to determine the count of available interrupts. So use this instead. As platform_irq_count() might return an error code (which of_irq_count doesn't) some additional handling is necessary. Signed-off-by: Peng Fan Signed-off-by: Bartosz Golaszewski commit 0c21639f5a4b1f91b8b963058f2aa8b2a9e5f61c Author: Peng Fan Date: Wed Dec 4 09:24:35 2019 +0000 gpio: mvebu: use platform_irq_count platform_irq_count() is the more generic way (independent of device trees) to determine the count of available interrupts. So use this instead. As platform_irq_count() might return an error code (which of_irq_count doesn't) some additional handling is necessary. Reviewed-by: Uwe Kleine-König Signed-off-by: Peng Fan Signed-off-by: Bartosz Golaszewski commit 725c1cb6987ad1258cc15792a55535a11308dc5a Author: Andy Shevchenko Date: Mon Dec 9 14:35:45 2019 +0200 gpio: pca953x: Remove redundant forward declaration There is no need to have a forward declaration for pca953x_dt_ids[]. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 55f8bbb5137936cb32ca3bb420e4942cf6f275b6 Author: Vignesh Raghavendra Date: Mon Dec 9 11:57:49 2019 +0530 gpio: pca953x: Don't hardcode irq trigger type Don't hardcode irq trigger to IRQF_TRIGGER_LOW while registering IRQ handler. IRQ/platform core will take care of setting appropriate trigger type. Signed-off-by: Vignesh Raghavendra Signed-off-by: Bartosz Golaszewski commit 9c015e13c875fccec2eeb903ab15266546b64b91 Author: Michael Walle Date: Fri Nov 29 22:09:37 2019 +0100 arm64: dts: ls1028a: put SAIs into async mode The LS1028A SoC has only unidirectional SAIs. Therefore, it doesn't make sense to have the RX and TX part synchronous. Even worse, the RX part wont work out of the box because by default it is configured as synchronous to the TX part. And as said before, the pinmux of the SoC can only be configured to route either the RX or the TX signals to the SAI but never both at the same time. Thus configure the asynchronous mode by default. Signed-off-by: Michael Walle Acked-by: Alison Wang Signed-off-by: Shawn Guo commit 012af55314717e6890bb7f0a4075302073dc4a4d Author: Clément Péron Date: Mon Dec 9 19:20:22 2019 +0100 arm64: dts: allwiner: Fix typo in dual licensed SPDX identifier With dual licensed SPDX identifier the "OR" should be uppercase. Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard commit f0c3b29f56f0a946df4941edfe2d98e3e766c30f Author: Stefan Mavrodiev Date: Fri Nov 29 13:39:40 2019 +0200 arm64: dts: allwinner: a64: olinuxino: Add bank supply regulators Allwinner A64 SoC has separate supplies for PC, PD, PE, PG and PL. This patch adds regulators for them to the pinctrl node. Exception is PL which is used by the RSB bus. To avoid circular dependencies, VCC-PL is omitted. On boards with eMMC, VCC-PC is supplied by ELDO1, instead of DCDC1. Signed-off-by: Stefan Mavrodiev [Maxime: Changed the r_pio comment a bit] Signed-off-by: Maxime Ripard commit 88432f5f8469ba67a2e20aeda04bd64cb88f9c6c Author: Jernej Skrabec Date: Tue Nov 19 18:53:18 2019 +0100 arm64: dts: allwinner: h6: Add PWM node Allwinner H6 PWM is similar to that in A20 except that it has additional bus clock and reset line. Note that first PWM channel is connected to output pin and second channel is used internally, as a clock source to AC200 co-packaged chip. This means that any combination of these two channels can be used and thus it doesn't make sense to add pinctrl nodes at this point. Signed-off-by: Jernej Skrabec Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard commit 6a85afe4bc88fa9cbb0c1e76efd0d2588b2b572c Author: Jernej Skrabec Date: Tue Nov 19 18:53:12 2019 +0100 dt-bindings: pwm: allwinner: Add H6 PWM description H6 PWM block is basically the same as A20 PWM, except that it also has bus clock and reset line which needs to be handled accordingly. Expand Allwinner PWM binding with H6 PWM specifics. Signed-off-by: Jernej Skrabec Reviewed-by: Rob Herring Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard commit 434f9cc1f7a038835ab23c588b2c96eaef8f49d1 Author: Michael Walle Date: Tue Dec 10 00:43:47 2019 +0100 arm64: dts: ls1028a: add missing sai nodes The LS1028A has six SAI cores. Signed-off-by: Michael Walle Acked-by: Alison Wang Signed-off-by: Shawn Guo commit 023265ed75d8792ca1d555430a8985511d3f8788 Merge: 2b68392e638d e42617b825f8 Author: Jani Nikula Date: Wed Dec 11 10:35:37 2019 +0200 Merge drm/drm-next into drm-intel-next-queued Sync up with v5.5-rc1 to get the updated lock_release() API among other things. Fix the conflict reported by Stephen Rothwell [1]. [1] http://lore.kernel.org/r/20191210093957.5120f717@canb.auug.org.au Signed-off-by: Jani Nikula commit d9e1670b8005999998b557c0e301bb68192bb1c8 Author: Herbert Xu Date: Sun Dec 8 13:42:53 2019 +0800 crypto: hmac - Use init_tfm/exit_tfm interface This patch switches hmac over to the new init_tfm/exit_tfm interface as opposed to cra_init/cra_exit. This way the shash API can make sure that descsize does not exceed the maximum. This patch also adds the API helper shash_alg_instance. Signed-off-by: Herbert Xu Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit 96895693940710db24e42c4e2a248d8f7bd7ab4b Author: Herbert Xu Date: Sun Dec 8 13:42:52 2019 +0800 crypto: padlock-sha - Use init_tfm/exit_tfm interface This patch switches padlock-sha over to the new init_tfm/exit_tfm interface as opposed to cra_init/cra_exit. This way the shash API can make sure that descsize does not exceed the maximum. Signed-off-by: Herbert Xu Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit fbce6be5aef5bad46f3af1650f7a62ec1b34318e Author: Herbert Xu Date: Sun Dec 8 13:42:51 2019 +0800 crypto: shash - Add init_tfm/exit_tfm and verify descsize The shash interface supports a dynamic descsize field because of the presence of fallbacks (it's just padlock-sha actually, perhaps we can remove it one day). As it is the API does not verify the setting of descsize at all. It is up to the individual algorithms to ensure that descsize does not exceed the specified maximum value of HASH_MAX_DESCSIZE (going above would cause stack corruption). In order to allow the API to impose this limit directly, this patch adds init_tfm/exit_tfm hooks to the shash_alg structure. We can then verify the descsize setting in the API directly. Signed-off-by: Herbert Xu Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit 02244ba44bc366c38e188a3a90afc63dffae9897 Author: Herbert Xu Date: Sat Dec 7 22:33:51 2019 +0800 crypto: api - Add more comments to crypto_remove_spawns This patch explains the logic behind crypto_remove_spawns and its underling crypto_more_spawns. Signed-off-by: Herbert Xu commit 4f87ee118d16b4b2116a477229573ed5003b0d78 Author: Herbert Xu Date: Sat Dec 7 22:15:17 2019 +0800 crypto: api - Do not zap spawn->alg Currently when a spawn is removed we will zap its alg field. This is racy because the spawn could belong to an unregistered instance which may dereference the spawn->alg field. This patch fixes this by keeping spawn->alg constant and instead adding a new spawn->dead field to indicate that a spawn is going away. Signed-off-by: Herbert Xu commit 73669cc556462f4e50376538d77ee312142e8a8a Author: Herbert Xu Date: Sat Dec 7 22:15:15 2019 +0800 crypto: api - Fix race condition in crypto_spawn_alg The function crypto_spawn_alg is racy because it drops the lock before shooting the dying algorithm. The algorithm could disappear altogether before we shoot it. This patch fixes it by moving the shooting into the locked section. Fixes: 6bfd48096ff8 ("[CRYPTO] api: Added spawns") Signed-off-by: Herbert Xu commit 4a2abbc6b8683dd8ac399d305b23409a7a7503d3 Author: Eric Biggers Date: Fri Dec 6 20:19:37 2019 -0800 crypto: doc - remove references to ARC4 arc4 is no longer considered secure, so it shouldn't be used, even as just an example. Mention serpent and chacha20 instead. Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 7db3b61b6bba4310f454588c2ca6faf2958ad79f Author: Herbert Xu Date: Fri Dec 6 13:55:17 2019 +0800 crypto: api - Check spawn->alg under lock in crypto_drop_spawn We need to check whether spawn->alg is NULL under lock as otherwise the algorithm could be removed from under us after we have checked it and found it to be non-NULL. This could cause us to remove the spawn from a non-existent list. Fixes: 7ede5a5ba55a ("crypto: api - Fix crypto_drop_spawn crash...") Cc: Signed-off-by: Herbert Xu commit 579d705cd64e44f3fcda1a6cfd5f37468a5ddf63 Author: Valdis Kletnieks Date: Thu Dec 5 20:58:36 2019 -0500 crypto: chacha - fix warning message in header file Building with W=1 causes a warning: CC [M] arch/x86/crypto/chacha_glue.o In file included from arch/x86/crypto/chacha_glue.c:10: ./include/crypto/internal/chacha.h:37:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] 37 | static int inline chacha12_setkey(struct crypto_skcipher *tfm, const u8 *key, | ^~~~~~ Straighten out the order to match the rest of the header file. Signed-off-by: Valdis Kletnieks Signed-off-by: Herbert Xu commit aebe5bd76583441e25d7acb564ec273064fa61b1 Author: Tudor Ambarus Date: Thu Dec 5 13:48:39 2019 +0000 crypto: atmel-{aes,sha,tdes} - Group common alg type init in dedicated methods Move common alg type init to dedicated methods. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 7db15aade87f9fbe38e2157cd6be0a61e2f3a314 Author: Tudor Ambarus Date: Thu Dec 5 09:54:08 2019 +0000 crypto: atmel-aes - Use gcm helper to check authsize Use core helper functions. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 4c977e37b0fafc7505f814256a699c13fd03b7b6 Author: Tudor Ambarus Date: Thu Dec 5 09:54:06 2019 +0000 crypto: atmel-sha - Void return type for atmel_sha_update_dma_stop() No error handling, change return type to void. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 9a17007b4f45df178974c815d9155e9a586fd151 Author: Tudor Ambarus Date: Thu Dec 5 09:54:04 2019 +0000 crypto: atmel-{sha,tdes} - Remove unused 'err' member of driver data 'err' member was initialized to 0 but its value never changed. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 371731ec2179d5810683406e7fc284b41b127df7 Author: Tudor Ambarus Date: Thu Dec 5 09:54:03 2019 +0000 crypto: atmel-aes - Fix saving of IV for CTR mode The req->iv of the skcipher_request is expected to contain the last used IV. Update the req->iv for CTR mode. Fixes: bd3c7b5c2aba ("crypto: atmel - add Atmel AES driver") Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 781a08d9740afa73357f1a60d45d7c93d7cca2dd Author: Tudor Ambarus Date: Thu Dec 5 09:54:01 2019 +0000 crypto: atmel-aes - Fix counter overflow in CTR mode 32 bit counter is not supported by neither of our AES IPs, all implement a 16 bit block counter. Drop the 32 bit block counter logic. Fixes: fcac83656a3e ("crypto: atmel-aes - fix the counter overflow in CTR mode") Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit c65d123742a7bf2a5bc9fa8398e1fd2376eb4c43 Author: Tudor Ambarus Date: Thu Dec 5 09:54:00 2019 +0000 crypto: atmel-{aes,tdes} - Do not save IV for ECB mode ECB mode does not use IV. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 75eca7a7f2abe5fc317ec51408501a4c7e096ce8 Author: Tudor Ambarus Date: Thu Dec 5 09:53:58 2019 +0000 crypto: atmel-tdes - Drop unnecessary passing of tfm atmel_tdes_crypt_start() obtained a pointer to tfm from dd, passed the tfm pointer to atmel_tdes_crypt_{dma,pdc}, and in the calles we obtained dd back from the tfm. Pass pointer to dd directly. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 848572f817721499c05b66553afc7ce0c08b1723 Author: Tudor Ambarus Date: Thu Dec 5 09:53:56 2019 +0000 crypto: atmel-tdes - Map driver data flags to Mode Register Simplifies the configuration of the TDES IP. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 7d0979e2dfa8b85a6169d89c3e767c7bde9b599c Author: Tudor Ambarus Date: Thu Dec 5 09:53:55 2019 +0000 crypto: atmel-tdes - Remove useless write in Control Register As claimed by the datasheet, writing 0 into the Control Register has no effect. Remove this useless register access. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit e7836518c6bc0156e04983aa12f5539062b5bd8f Author: Tudor Ambarus Date: Thu Dec 5 09:53:53 2019 +0000 crypto: atmel-{aes,sha,tdes} - Rename labels in probe() Choose label names which say what the goto does and not from where the goto was issued. This avoids adding superfluous labels like "err_aes_buff". Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit c9063a0281d98cb3b542f6a0ae20812f0597a365 Author: Tudor Ambarus Date: Thu Dec 5 09:53:51 2019 +0000 crypto: atmel-{aes,sha,tdes} - Drop superfluous error message in probe() In case the probe fails, the device/driver core takes care of printing the driver name, device name and error code. Drop superfluous error message at probe. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 0efe58f3e9c8552f996d4f07b29393b3392731cf Author: Tudor Ambarus Date: Thu Dec 5 09:53:50 2019 +0000 crypto: atmel-{sha,tdes} - Propagate error from _hw_version_init() atmel_{sha,tdes}_hw_version_init() calls atmel_{sha,tdes}_hw_init(), which may fail. Check the return code of atmel_{sha,tdes}_hw_init() and propagate the error if needed. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit fb24307af28214e1f4606e77579faf91b7876202 Author: Tudor Ambarus Date: Thu Dec 5 09:53:48 2019 +0000 crypto: atmel-tdes - Remove unused header includes Hash headers are not used. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 7c783029eab847cedcbe85ece02b9faf6a576418 Author: Tudor Ambarus Date: Thu Dec 5 09:53:46 2019 +0000 crypto: atmel-{sha,tdes} - Change algorithm priorities Increase the algorithm priorities so the hardware acceleration is now preferred to the software computation: the generic drivers use 100 as priority. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 7b49fabfc35c28deae514f07d563b0fb42c7cfea Author: Tudor Ambarus Date: Thu Dec 5 09:53:45 2019 +0000 crypto: atmel-tdes - Constify value to write to hw atmel_tdes_write_n() should not modify its value argument. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu commit 37f96694cf73ba116993a9d2d99ad6a75fa7fdb0 Author: Herbert Xu Date: Thu Dec 5 13:45:05 2019 +0800 crypto: af_alg - Use bh_lock_sock in sk_destruct As af_alg_release_parent may be called from BH context (most notably due to an async request that only completes after socket closure, or as reported here because of an RCU-delayed sk_destruct call), we must use bh_lock_sock instead of lock_sock. Reported-by: syzbot+c2f1558d49e25cc36e5e@syzkaller.appspotmail.com Reported-by: Eric Dumazet Fixes: c840ac6af3f8 ("crypto: af_alg - Disallow bind/setkey/...") Cc: Signed-off-by: Herbert Xu commit bfcdcef8c8e3469f4d6c082a1da27a6ef77e5715 Author: Daniel Jordan Date: Tue Dec 3 14:31:14 2019 -0500 padata: update documentation Remove references to unused functions, standardize language, update to reflect new functionality, migrate to rst format, and fix all kernel-doc warnings. Fixes: 815613da6a67 ("kernel/padata.c: removed unused code") Signed-off-by: Daniel Jordan Cc: Eric Biggers Cc: Herbert Xu Cc: Jonathan Corbet Cc: Steffen Klassert Cc: linux-crypto@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Jordan Signed-off-by: Herbert Xu commit 3facced7aeed131c1002b724e488d68ebe59c56f Author: Daniel Jordan Date: Tue Dec 3 14:31:13 2019 -0500 padata: remove reorder_objects reorder_objects is unused since the rework of padata's flushing, so remove it. Signed-off-by: Daniel Jordan Cc: Eric Biggers Cc: Herbert Xu Cc: Steffen Klassert Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu commit 91a71d612128f84f725022d7b7c5d5a741f6fdc7 Author: Daniel Jordan Date: Tue Dec 3 14:31:12 2019 -0500 padata: remove cpumask change notifier Since commit 63d3578892dc ("crypto: pcrypt - remove padata cpumask notifier") this feature is unused, so get rid of it. Signed-off-by: Daniel Jordan Cc: Eric Biggers Cc: Herbert Xu Cc: Jonathan Corbet Cc: Steffen Klassert Cc: linux-crypto@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu commit 38228e8848cd7dd86ccb90406af32de0cad24be3 Author: Daniel Jordan Date: Tue Dec 3 14:31:11 2019 -0500 padata: always acquire cpu_hotplug_lock before pinst->lock lockdep complains when padata's paths to update cpumasks via CPU hotplug and sysfs are both taken: # echo 0 > /sys/devices/system/cpu/cpu1/online # echo ff > /sys/kernel/pcrypt/pencrypt/parallel_cpumask ====================================================== WARNING: possible circular locking dependency detected 5.4.0-rc8-padata-cpuhp-v3+ #1 Not tainted ------------------------------------------------------ bash/205 is trying to acquire lock: ffffffff8286bcd0 (cpu_hotplug_lock.rw_sem){++++}, at: padata_set_cpumask+0x2b/0x120 but task is already holding lock: ffff8880001abfa0 (&pinst->lock){+.+.}, at: padata_set_cpumask+0x26/0x120 which lock already depends on the new lock. padata doesn't take cpu_hotplug_lock and pinst->lock in a consistent order. Which should be first? CPU hotplug calls into padata with cpu_hotplug_lock already held, so it should have priority. Fixes: 6751fb3c0e0c ("padata: Use get_online_cpus/put_online_cpus") Signed-off-by: Daniel Jordan Cc: Eric Biggers Cc: Herbert Xu Cc: Steffen Klassert Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu commit 894c9ef9780c5cf2f143415e867ee39a33ecb75d Author: Daniel Jordan Date: Tue Dec 3 14:31:10 2019 -0500 padata: validate cpumask without removed CPU during offline Configuring an instance's parallel mask without any online CPUs... echo 2 > /sys/kernel/pcrypt/pencrypt/parallel_cpumask echo 0 > /sys/devices/system/cpu/cpu1/online ...makes tcrypt mode=215 crash like this: divide error: 0000 [#1] SMP PTI CPU: 4 PID: 283 Comm: modprobe Not tainted 5.4.0-rc8-padata-doc-v2+ #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20191013_105130-anatol 04/01/2014 RIP: 0010:padata_do_parallel+0x114/0x300 Call Trace: pcrypt_aead_encrypt+0xc0/0xd0 [pcrypt] crypto_aead_encrypt+0x1f/0x30 do_mult_aead_op+0x4e/0xdf [tcrypt] test_mb_aead_speed.constprop.0.cold+0x226/0x564 [tcrypt] do_test+0x28c2/0x4d49 [tcrypt] tcrypt_mod_init+0x55/0x1000 [tcrypt] ... cpumask_weight() in padata_cpu_hash() returns 0 because the mask has no CPUs. The problem is __padata_remove_cpu() checks for valid masks too early and so doesn't mark the instance PADATA_INVALID as expected, which would have made padata_do_parallel() return error before doing the division. Fix by introducing a second padata CPU hotplug state before CPUHP_BRINGUP_CPU so that __padata_remove_cpu() sees the online mask without @cpu. No need for the second argument to padata_replace() since @cpu is now already missing from the online mask. Fixes: 33e54450683c ("padata: Handle empty padata cpumasks") Signed-off-by: Daniel Jordan Cc: Eric Biggers Cc: Herbert Xu Cc: Sebastian Andrzej Siewior Cc: Steffen Klassert Cc: Thomas Gleixner Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu commit e8cfed5e4e2b5929371955f476a52a4c3398ead3 Author: Eric Biggers Date: Mon Dec 2 13:42:30 2019 -0800 crypto: cipher - remove crt_u.cipher (struct cipher_tfm) Of the three fields in crt_u.cipher (struct cipher_tfm), ->cit_setkey() is pointless because it always points to setkey() in crypto/cipher.c. ->cit_decrypt_one() and ->cit_encrypt_one() are slightly less pointless, since if the algorithm doesn't have an alignmask, they are set directly to ->cia_encrypt() and ->cia_decrypt(). However, this "optimization" isn't worthwhile because: - The "cipher" algorithm type is the only algorithm still using crt_u, so it's bloating every struct crypto_tfm for every algorithm type. - If the algorithm has an alignmask, this "optimization" actually makes things slower, as it causes 2 indirect calls per block rather than 1. - It adds extra code complexity. - Some templates already call ->cia_encrypt()/->cia_decrypt() directly instead of going through ->cit_encrypt_one()/->cit_decrypt_one(). - The "cipher" algorithm type never gives optimal performance anyway. For that, a higher-level type such as skcipher needs to be used. Therefore, just remove the extra indirection, and make crypto_cipher_setkey(), crypto_cipher_encrypt_one(), and crypto_cipher_decrypt_one() be direct calls into crypto/cipher.c. Also remove the unused function crypto_cipher_cast(). Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit c441a909c68618ff64aa70394d0b270b0665a229 Author: Eric Biggers Date: Mon Dec 2 13:42:29 2019 -0800 crypto: compress - remove crt_u.compress (struct compress_tfm) crt_u.compress (struct compress_tfm) is pointless because its two fields, ->cot_compress() and ->cot_decompress(), always point to crypto_compress() and crypto_decompress(). Remove this pointless indirection, and just make crypto_comp_compress() and crypto_comp_decompress() be direct calls to what used to be crypto_compress() and crypto_decompress(). Also remove the unused function crypto_comp_cast(). Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 49763fc6b1af422e742e58fd04e078ab011edd96 Author: Eric Biggers Date: Sun Dec 1 13:53:30 2019 -0800 crypto: testmgr - generate inauthentic AEAD test vectors The whole point of using an AEAD over length-preserving encryption is that the data is authenticated. However currently the fuzz tests don't test any inauthentic inputs to verify that the data is actually being authenticated. And only two algorithms ("rfc4543(gcm(aes))" and "ccm(aes)") even have any inauthentic test vectors at all. Therefore, update the AEAD fuzz tests to sometimes generate inauthentic test vectors, either by generating a (ciphertext, AAD) pair without using the key, or by mutating an authentic pair that was generated. To avoid flakiness, only assume this works reliably if the auth tag is at least 8 bytes. Also account for the rfc4106, rfc4309, and rfc7539esp algorithms intentionally ignoring the last 8 AAD bytes, and for some algorithms doing extra checks that result in EINVAL rather than EBADMSG. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 2ea915054cf2dc1ccc145d7c75d3dad8dde15be3 Author: Eric Biggers Date: Sun Dec 1 13:53:29 2019 -0800 crypto: testmgr - create struct aead_extra_tests_ctx In preparation for adding inauthentic input fuzz tests, which don't require that a generic implementation of the algorithm be available, refactor test_aead_vs_generic_impl() so that instead there's a higher-level function test_aead_extra() which initializes a struct aead_extra_tests_ctx and then calls test_aead_vs_generic_impl() with a pointer to that struct. As a bonus, this reduces stack usage. Also switch from crypto_aead_alg(tfm)->maxauthsize to crypto_aead_maxauthsize(), now that the latter is available in . Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit fd8c37c72d60c7c8f5c4d0702a0b30499cf9d422 Author: Eric Biggers Date: Sun Dec 1 13:53:28 2019 -0800 crypto: testmgr - test setting misaligned keys The alignment bug in ghash_setkey() fixed by commit 5c6bc4dfa515 ("crypto: ghash - fix unaligned memory access in ghash_setkey()") wasn't reliably detected by the crypto self-tests on ARM because the tests only set the keys directly from the test vectors. To improve test coverage, update the tests to sometimes pass misaligned keys to setkey(). This applies to shash, ahash, skcipher, and aead. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit fd60f727876467a89ac42c873e20b38d9a408062 Author: Eric Biggers Date: Sun Dec 1 13:53:27 2019 -0800 crypto: testmgr - check skcipher min_keysize When checking two implementations of the same skcipher algorithm for consistency, require that the minimum key size be the same, not just the maximum key size. There's no good reason to allow different minimum key sizes. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit eb455dbd02cb1074b37872ffca30a81cb2a18eaa Author: Eric Biggers Date: Sun Dec 1 13:53:26 2019 -0800 crypto: testmgr - don't try to decrypt uninitialized buffers Currently if the comparison fuzz tests encounter an encryption error when generating an skcipher or AEAD test vector, they will still test the decryption side (passing it the uninitialized ciphertext buffer) and expect it to fail with the same error. This is sort of broken because it's not well-defined usage of the API to pass an uninitialized buffer, and furthermore in the AEAD case it's acceptable for the decryption error to be EBADMSG (meaning "inauthentic input") even if the encryption error was something else like EINVAL. Fix this for skcipher by explicitly initializing the ciphertext buffer on error, and for AEAD by skipping the decryption test on error. Reported-by: Pascal Van Leeuwen Fixes: d435e10e67be ("crypto: testmgr - fuzz skciphers against their generic implementation") Fixes: 40153b10d91c ("crypto: testmgr - fuzz AEADs against their generic implementation") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 7bada03311b62288035b0f5454cc154a44f33c56 Author: Eric Biggers Date: Sun Dec 1 13:53:25 2019 -0800 crypto: skcipher - add crypto_skcipher_min_keysize() Add a helper function crypto_skcipher_min_keysize() to mirror crypto_skcipher_max_keysize(). This will be used by the self-tests. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 095be695e564d1c64d33327b03e32bf5749b1174 Author: Eric Biggers Date: Sun Dec 1 13:53:24 2019 -0800 crypto: aead - move crypto_aead_maxauthsize() to Move crypto_aead_maxauthsize() to so that it's available to users of the API, not just AEAD implementations. This will be used by the self-tests. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 839bb2a9ca73a99e1df882d14fe8060761373376 Author: Tero Kristo Date: Tue Nov 5 16:01:11 2019 +0200 crypto: omap-crypto - copy the temporary data to output buffer properly Both source and destination are scatterlists that can contain multiple entries under the omap crypto cleanup handling. Current code only copies data from the first source scatterlist entry to the target scatterlist, potentially omitting any sg entries following the first one. Instead, implement a new routine that walks through both source and target and copies the data over once it goes. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit aca8bf0027d3ab4492d47e6b05b13911948903db Author: Tero Kristo Date: Tue Nov 5 16:01:10 2019 +0200 crypto: omap-des - handle NULL cipher request If no data is provided for DES request, just return immediately. No processing is needed in this case. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit 96846223ac73c66f55bfcb46a464450136bdbbc2 Author: Tero Kristo Date: Tue Nov 5 16:01:09 2019 +0200 crypto: omap-des - avoid unnecessary spam with bad cryptlen Remove the error print in this case, and just return the error. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit 04a4616e6a21eb5ed2c8399160be370af4f67037 Author: Tero Kristo Date: Tue Nov 5 16:01:08 2019 +0200 crypto: omap-aes-gcm - convert to use crypto engine Currently omap-aes-gcm algorithms are using local implementation for crypto request queuing logic. Instead, implement this via usage of crypto engine which is used already for rest of the omap aes algorithms. This avoids some random conflicts / crashes also which can happen if both aes and aes-gcm are attempted to be used simultaneously. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit 1cfd9f3f308fde70d14927f376cd61c2365819d0 Author: Tero Kristo Date: Tue Nov 5 16:01:07 2019 +0200 crypto: omap-sham - fix unaligned sg list handling Currently the offset for unaligned sg lists is not handled properly leading into wrong results with certain testmgr self tests. Fix the handling to account for proper offset within the current sg list. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit 5d5f3eed29379b3edc499729bb6f8651a9848fe4 Author: Tero Kristo Date: Tue Nov 5 16:01:06 2019 +0200 crypto: omap-aes-gcm - fix failure with assocdata only If we only have assocdata with an omap-aes-gcm, it currently just completes it directly without passing it over to the crypto HW. This produces wrong results. Fix by passing the request down to the crypto HW, and fix the DMA support code to accept a case where we don't expect any output data. In the case where only assocdata is provided, it just passes through the accelerator and provides authentication results, without any encrypted/decrypted buffer via DMA. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit f0956d42c14abfeda9d0be7f06999363cab3e99a Author: Ard Biesheuvel Date: Tue Nov 5 16:01:05 2019 +0200 crypto: omap-aes-gcm - use the AES library to encrypt the tag The OMAP AES-GCM implementation uses a fallback ecb(aes) skcipher to produce the keystream to encrypt the output tag. Let's use the new AES library instead - this is much simpler, and shouldn't affect performance given that it only involves a single block. Signed-off-by: Ard Biesheuvel Reviewed-by: Tero Kristo Tested-by: Tero Kristo Signed-off-by: Herbert Xu commit b877ad1a135c802d4529a72aa82faf46ef5db097 Author: Ard Biesheuvel Date: Tue Nov 5 16:01:04 2019 +0200 crypto: omap-aes-gcm - check length of assocdata in RFC4106 mode RFC4106 requires the associated data to be a certain size, so reject inputs that are wrong. This also prevents crashes or other problems due to assoclen becoming negative after subtracting 8 bytes. Signed-off-by: Ard Biesheuvel Reviewed-by: Tero Kristo Tested-by: Tero Kristo Signed-off-by: Herbert Xu commit 12adf9d63ec3af674f1e3145308a29daffb73887 Author: Ard Biesheuvel Date: Tue Nov 5 16:01:03 2019 +0200 crypto: omap-aes-gcm - add missing .setauthsize hooks GCM only permits certain tag lengths, so populate the .setauthsize hooks which ensure that only permitted sizes are accepted by the implementation. Signed-off-by: Ard Biesheuvel Reviewed-by: Tero Kristo Tested-by: Tero Kristo Signed-off-by: Herbert Xu commit 46d57443eca46999051946c27ec95df313f3619a Author: Ard Biesheuvel Date: Tue Nov 5 16:01:02 2019 +0200 crypto: omap-aes-gcm - deal with memory allocation failure The OMAP gcm(aes) driver invokes omap_crypto_align_sg() without dealing with the errors it may return, resulting in a crash if the routine fails in a __get_free_pages(GFP_ATOMIC) call. So bail and return the error rather than limping on if one occurs. Signed-off-by: Ard Biesheuvel Reviewed-by: Tero Kristo Tested-by: Tero Kristo Signed-off-by: Herbert Xu commit a9459bdcb40f6080874499a5638049c2dab821a0 Author: Ard Biesheuvel Date: Tue Nov 5 16:01:01 2019 +0200 crypto: omap-aes-ctr - set blocksize to 1 CTR is a streamcipher mode of AES, so set the blocksize accordingly. Signed-off-by: Ard Biesheuvel Reviewed-by: Tero Kristo Tested-by: Tero Kristo Signed-off-by: Herbert Xu commit dbb326fd009346061e5083c3a0d2d1a2fa348e04 Author: Ard Biesheuvel Date: Tue Nov 5 16:01:00 2019 +0200 crypto: omap-aes - reject invalid input sizes for block modes Block modes such as ECB and CBC only support input sizes that are a round multiple of the block size, so align with the generic code which returns -EINVAL when encountering inputs that violate this rule. Signed-off-by: Ard Biesheuvel Reviewed-by: Tero Kristo Tested-by: Tero Kristo Signed-off-by: Herbert Xu commit 6585cd3683c624d9cbe5cbc480f870b2d1df47db Author: Tero Kristo Date: Tue Nov 5 16:00:59 2019 +0200 crypto: omap-aes - fixup aligned data cleanup Aligned data cleanup is using wrong pointers in the cleanup calls. Most of the time these are right, but can cause mysterious problems in some cases. Fix to use the same pointers that were used with the align call. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit 60a0894c323af7de0a1b69d64f7d81d13dd9b16c Author: Tero Kristo Date: Tue Nov 5 16:00:57 2019 +0200 crypto: omap-sham - fix split update cases with cryptomgr tests The updated crypto manager finds a couple of new bugs from the omap-sham driver. Basically the split update cases fail to calculate the amount of data to be sent properly, leading into failed results and hangs with the hw accelerator. To fix these, the buffer handling needs to be fixed, but we do some cleanup for the code at the same time to cut away some unnecessary code so that it is easier to fix. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit a9befcf46913bd70d1421ea6b77e8b47a8b70483 Author: Tero Kristo Date: Tue Nov 5 16:00:56 2019 +0200 crypto: omap-aes-gcm - fix corner case with only auth data Fix a corner case where only authdata is generated, without any provided assocdata / cryptdata. Passing the empty scatterlists to OMAP AES core driver in this case would confuse it, failing to map DMAs. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit 2b352489d0d6398f6d47383b48ed3527f7d078f8 Author: Tero Kristo Date: Tue Nov 5 16:00:55 2019 +0200 crypto: omap-sham - fix buffer handling for split test cases Current buffer handling logic fails in a case where the buffer contains existing data from previous update which is divisible by block size. This results in a block size of data to be left missing from the sg list going out to the hw accelerator, ending up in stalling the crypto accelerator driver (the last request never completes fully due to missing data.) Fix this by passing the total size of the data instead of the data size of current request, and also parsing the buffer contents within the prepare request handling. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit 891dcbbb0e464da7313daf910956c3d78eb5d2d5 Author: Tero Kristo Date: Tue Nov 5 16:00:54 2019 +0200 crypto: omap-aes - add IV output handling Currently omap-aes driver does not copy end result IV out at all. This is evident with the additional checks done at the crypto test manager. Fix by copying out the IV values from HW. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit eb5818aa08526b0004da82225b6915d787a4e4e1 Author: Tero Kristo Date: Tue Nov 5 16:00:53 2019 +0200 crypto: omap-des - add IV output handling Currently omap-des driver does not copy end result IV out at all. This is evident with the additional checks done at the crypto test manager. Fix by copying out the IV values from HW. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit e7508ef2a67416e7786d7325cffe381aded1e0b3 Author: Tero Kristo Date: Tue Nov 5 16:00:52 2019 +0200 crypto: omap-aes - remove the sysfs group during driver removal The driver removal should also cleanup the created sysfs group. If not, the driver fails the subsequent probe as the files exist already. Also, drop a completely unnecessary pointer assignment from the removal function at the same time. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit b82fc91e50dfb1ed5bac0b99604218e23a89a304 Author: Tero Kristo Date: Tue Nov 5 16:00:51 2019 +0200 crypto: omap-sham - remove the sysfs group during driver removal The driver removal should also cleanup the created sysfs group. If not, the driver fails the subsequent probe as the files exist already. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit 462519fc26996a619f7c9cc5f5a34a73934219b9 Author: Tero Kristo Date: Tue Nov 5 16:00:50 2019 +0200 crypto: omap-sham - split up data to multiple sg elements with huge data When using huge data amount, allocating free pages fails as the kernel isn't able to process get_free_page requests larger than MAX_ORDER. Also, the DMA subsystem has an inherent limitation that data size larger than some 2MB can't be handled properly. In these cases, split up the data instead to smaller requests so that the kernel can allocate the data, and also so that the DMA driver can handle the separate SG elements. Signed-off-by: Tero Kristo Tested-by: Bin Liu Signed-off-by: Herbert Xu commit c28817895464797a8299b24e35ead1085b3e40fb Author: Eric Biggers Date: Fri Nov 29 11:35:22 2019 -0800 crypto: shash - allow essiv and hmac to use OPTIONAL_KEY algorithms The essiv and hmac templates refuse to use any hash algorithm that has a ->setkey() function, which includes not just algorithms that always need a key, but also algorithms that optionally take a key. Previously the only optionally-keyed hash algorithms in the crypto API were non-cryptographic algorithms like crc32, so this didn't really matter. But that's changed with BLAKE2 support being added. BLAKE2 should work with essiv and hmac, just like any other cryptographic hash. Fix this by allowing the use of both algorithms without a ->setkey() function and algorithms that have the OPTIONAL_KEY flag set. Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 89873b4411348325c5e513ea8086f0193eda5163 Author: Eric Biggers Date: Fri Nov 29 10:23:08 2019 -0800 crypto: skcipher - remove crypto_skcipher_extsize() Due to the removal of the blkcipher and ablkcipher algorithm types, crypto_skcipher_extsize() now simply calls crypto_alg_extsize(). So remove it and just use crypto_alg_extsize(). Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 7e1c10991822de1c7a2d64647da56d96f430606c Author: Eric Biggers Date: Fri Nov 29 10:23:07 2019 -0800 crypto: skcipher - remove crypto_skcipher::decrypt Due to the removal of the blkcipher and ablkcipher algorithm types, crypto_skcipher::decrypt is now redundant since it always equals crypto_skcipher_alg(tfm)->decrypt. Remove it and update crypto_skcipher_decrypt() accordingly. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 848755e315b61b0f939f6021e119373ff4a407ab Author: Eric Biggers Date: Fri Nov 29 10:23:06 2019 -0800 crypto: skcipher - remove crypto_skcipher::encrypt Due to the removal of the blkcipher and ablkcipher algorithm types, crypto_skcipher::encrypt is now redundant since it always equals crypto_skcipher_alg(tfm)->encrypt. Remove it and update crypto_skcipher_encrypt() accordingly. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 15252d942739813c8d0eac4c1ee6d4c4eb6f101e Author: Eric Biggers Date: Fri Nov 29 10:23:05 2019 -0800 crypto: skcipher - remove crypto_skcipher::setkey Due to the removal of the blkcipher and ablkcipher algorithm types, crypto_skcipher::setkey now always points to skcipher_setkey(). Simplify by removing this function pointer and instead just making skcipher_setkey() be crypto_skcipher_setkey() directly. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 9ac0d136938ad8b8dd309f833abe5304dd2f0b08 Author: Eric Biggers Date: Fri Nov 29 10:23:04 2019 -0800 crypto: skcipher - remove crypto_skcipher::keysize Due to the removal of the blkcipher and ablkcipher algorithm types, crypto_skcipher::keysize is now redundant since it always equals crypto_skcipher_alg(tfm)->max_keysize. Remove it and update crypto_skcipher_default_keysize() accordingly. Also rename crypto_skcipher_default_keysize() to crypto_skcipher_max_keysize() to clarify that it specifically returns the maximum key size, not some unspecified "default". Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 140734d3711335836cc1b9706d73953750fa4c8d Author: Eric Biggers Date: Fri Nov 29 10:23:03 2019 -0800 crypto: skcipher - remove crypto_skcipher::ivsize Due to the removal of the blkcipher and ablkcipher algorithm types, crypto_skcipher::ivsize is now redundant since it always equals crypto_skcipher_alg(tfm)->ivsize. Remove it and update crypto_skcipher_ivsize() accordingly. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 0a940d4e27658a545884351c46a70b132272a38d Author: Eric Biggers Date: Fri Nov 29 10:16:48 2019 -0800 crypto: api - remove another reference to blkcipher Update a comment to refer to crypto_alloc_skcipher() rather than crypto_alloc_blkcipher() (the latter having been removed). Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 8e8c778d9ed4fdc5a9af108c7023bfb640a673f2 Author: Eric Biggers Date: Fri Nov 29 10:15:56 2019 -0800 crypto: hisilicon - select CRYPTO_SKCIPHER, not CRYPTO_BLKCIPHER Another instance of CRYPTO_BLKCIPHER made it in just after it was renamed to CRYPTO_SKCIPHER. Fix it. Fixes: 416d82204df4 ("crypto: hisilicon - add HiSilicon SEC V2 driver") Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit e8d998264bffade3cfe0536559f712ab9058d654 Author: Herbert Xu Date: Fri Nov 29 16:40:24 2019 +0800 crypto: pcrypt - Do not clear MAY_SLEEP flag in original request We should not be modifying the original request's MAY_SLEEP flag upon completion. It makes no sense to do so anyway. Reported-by: Eric Biggers Fixes: 5068c7a883d1 ("crypto: pcrypt - Add pcrypt crypto...") Signed-off-by: Herbert Xu Tested-by: Eric Biggers Signed-off-by: Herbert Xu commit 5441c6507bc84166e9227e9370a56c57ba13794a Author: Ard Biesheuvel Date: Thu Nov 28 13:55:31 2019 +0100 crypto: arm64/ghash-neon - bump priority to 150 The SIMD based GHASH implementation for arm64 is typically much faster than the generic one, and doesn't use any lookup tables, so it is clearly preferred when available. So bump the priority to reflect that. Fixes: 5a22b198cd527447 ("crypto: arm64/ghash - register PMULL variants ...") Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 6320a15e98301b67ff9ba8512e1e3a4033007851 Author: Sami Tolvanen Date: Wed Nov 27 15:55:03 2019 -0800 crypto: arm64/sha - fix function types Instead of casting pointers to callback functions, add C wrappers to avoid type mismatch failures with Control-Flow Integrity (CFI) checking. Signed-off-by: Sami Tolvanen Reviewed-by: Ard Biesheuvel Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit 11548f5a5747813ff84bed6f2ea01100053b0d8d Author: Ard Biesheuvel Date: Wed Nov 27 13:01:36 2019 +0100 crypto: ccp - set max RSA modulus size for v3 platform devices as well AMD Seattle incorporates a non-PCI version of the v3 CCP crypto accelerator, and this version was left behind when the maximum RSA modulus size was parameterized in order to support v5 hardware which supports larger moduli than v3 hardware does. Due to this oversight, RSA acceleration no longer works at all on these systems. Fix this by setting the .rsamax property to the appropriate value for v3 platform hardware. Fixes: e28c190db66830c0 ("csrypto: ccp - Expand RSA support for a v5 ccp") Cc: Gary R Hook Signed-off-by: Ard Biesheuvel Acked-by: Gary R Hook Signed-off-by: Herbert Xu commit 4df2ef25b3b3618fd708ab484fe6239abd130fec Author: Gilad Ben-Yossef Date: Wed Nov 27 10:49:08 2019 +0200 crypto: ccree - fix backlog memory leak Fix brown paper bag bug of not releasing backlog list item buffer when backlog was consumed causing a memory leak when backlog is used. Signed-off-by: Gilad Ben-Yossef Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Herbert Xu commit 7c06603e20e999851978a7e1dcbcac026b467498 Author: Hadar Gat Date: Wed Nov 27 10:49:07 2019 +0200 crypto: ccree - fix typos in error msgs Fix some typos in error message text. Signed-off-by: Hadar Gat Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit e86eca4107ce067e6059fcc4544680ecbac4e80b Author: Hadar Gat Date: Wed Nov 27 10:49:06 2019 +0200 crypto: ccree - fix typos in comments Fix some typos in code comments. Signed-off-by: Hadar Gat Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit 060f1113250018c272b00a40c3f1877088e5d443 Author: Gilad Ben-Yossef Date: Wed Nov 27 10:49:05 2019 +0200 crypto: ccree - remove useless define The define of CC_DEV_SHA_MAX is not needed since we moved to runtime detection of capabilities. Remove it. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit 9c1e8836edbbaf3656bc07437b59c04be034ac4e Author: Kees Cook Date: Tue Nov 26 22:08:02 2019 -0800 crypto: x86 - Regularize glue function prototypes The crypto glue performed function prototype casting via macros to make indirect calls to assembly routines. Instead of performing casts at the call sites (which trips Control Flow Integrity prototype checking), switch each prototype to a common standard set of arguments which allows the removal of the existing macros. In order to keep pointer math unchanged, internal casting between u128 pointers and u8 pointers is added. Co-developed-by: João Moreira Signed-off-by: João Moreira Signed-off-by: Kees Cook Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit 7278fa25aa0ebcc0e62c39b12071069df13f7e77 Author: Iuliana Prodan Date: Wed Nov 27 00:54:26 2019 +0200 crypto: caam - do not reset pointer size from MCFGR register In commit 'a1cf573ee95 ("crypto: caam - select DMA address size at runtime")' CAAM pointer size (caam_ptr_size) is changed from sizeof(dma_addr_t) to runtime value computed from MCFGR register. Therefore, do not reset MCFGR[PS]. Fixes: a1cf573ee95 ("crypto: caam - select DMA address size at runtime") Signed-off-by: Iuliana Prodan Cc: Cc: Andrey Smirnov Cc: Alison Wang Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit bbefa1dd6a6d53537c11624752219e39959d04fb Author: Herbert Xu Date: Tue Nov 26 15:58:45 2019 +0800 crypto: pcrypt - Avoid deadlock by using per-instance padata queues If the pcrypt template is used multiple times in an algorithm, then a deadlock occurs because all pcrypt instances share the same padata_instance, which completes requests in the order submitted. That is, the inner pcrypt request waits for the outer pcrypt request while the outer request is already waiting for the inner. This patch fixes this by allocating a set of queues for each pcrypt instance instead of using two global queues. In order to maintain the existing user-space interface, the pinst structure remains global so any sysfs modifications will apply to every pcrypt instance. Note that when an update occurs we have to allocate memory for every pcrypt instance. Should one of the allocations fail we will abort the update without rolling back changes already made. The new per-instance data structure is called padata_shell and is essentially a wrapper around parallel_data. Reproducer: #include #include #include int main() { struct sockaddr_alg addr = { .salg_type = "aead", .salg_name = "pcrypt(pcrypt(rfc4106-gcm-aesni))" }; int algfd, reqfd; char buf[32] = { 0 }; algfd = socket(AF_ALG, SOCK_SEQPACKET, 0); bind(algfd, (void *)&addr, sizeof(addr)); setsockopt(algfd, SOL_ALG, ALG_SET_KEY, buf, 20); reqfd = accept(algfd, 0, 0); write(reqfd, buf, 32); read(reqfd, buf, 16); } Reported-by: syzbot+56c7151cad94eec37c521f0e47d2eee53f9361c4@syzkaller.appspotmail.com Fixes: 5068c7a883d1 ("crypto: pcrypt - Add pcrypt crypto parallelization wrapper") Signed-off-by: Herbert Xu Tested-by: Eric Biggers Signed-off-by: Herbert Xu commit 45a536e3a7e0aeba257c708e023482df3b4ec052 Author: Peter Ujfalusi Date: Thu Nov 21 12:16:02 2019 +0200 crypto: atmel-tdes - Retire dma_request_slave_channel_compat() The driver no longer boots in legacy mode, only via DT. This makes the dma_request_slave_channel_compat() redundant. If ever the filter function would be executed it will return false as the dma_slave is not really initialized. Switch to use dma_request_chan() which would allow legacy boot if ever needed again by configuring dma_slave_map for the DMA driver. At the same time skip allocating memory for dma_slave as it is not used anymore. Signed-off-by: Peter Ujfalusi Signed-off-by: Herbert Xu commit db28512f48e2b343282c4bb4f0a35a2b57d9696e Author: Peter Ujfalusi Date: Thu Nov 21 12:16:01 2019 +0200 crypto: atmel-sha - Retire dma_request_slave_channel_compat() The driver no longer boots in legacy mode, only via DT. This makes the dma_request_slave_channel_compat() redundant. If ever the filter function would be executed it will return false as the dma_slave is not really initialized. Switch to use dma_request_chan() which would allow legacy boot if ever needed again by configuring dma_slave_map for the DMA driver. At the same time skip allocating memory for dma_slave as it is not used anymore. Signed-off-by: Peter Ujfalusi Signed-off-by: Herbert Xu commit 62f72cbdcf025368361b88de9579956d5362701f Author: Peter Ujfalusi Date: Thu Nov 21 12:16:00 2019 +0200 crypto: atmel-aes - Retire dma_request_slave_channel_compat() The driver no longer boots in legacy mode, only via DT. This makes the dma_request_slave_channel_compat() redundant. If ever the filter function would be executed it will return false as the dma_slave is not really initialized. Switch to use dma_request_chan() which would allow legacy boot if ever needed again by configuring dma_slave_map for the DMA driver. At the same time skip allocating memory for dma_slave as it is not used anymore. Signed-off-by: Peter Ujfalusi Signed-off-by: Herbert Xu commit 2452cfdf477115426cbbee99e641120057ccfdba Author: Krzysztof Kozlowski Date: Thu Nov 21 04:20:48 2019 +0100 crypto: Kconfig - Fix indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 1e02e6fbdadb3a0cb56294ff37eeeb8109e1f493 Author: Corentin Labbe Date: Wed Nov 20 16:28:33 2019 +0100 crypto: sun4i-ss - add the A33 variant of SS The A33 SS has a difference with all other SS, it give SHA1 digest directly in BE. So this patch adds variant support in sun4i-ss. Fixes: 6298e948215f ("crypto: sunxi-ss - Add Allwinner Security System crypto accelerator") Signed-off-by: Corentin Labbe Acked-by: Maxime Ripard Signed-off-by: Herbert Xu commit 6b3413f30dd6bf406a2579ab2ea4d25979a81cd3 Author: Kamil Konieczny Date: Wed Nov 20 14:55:27 2019 +0100 MAINTAINERS: update my e-mail address Update my e-mail address to @samsung.com in maintainers. Add also map in .mailmap to new e-mail. Signed-off-by: Kamil Konieczny Signed-off-by: Herbert Xu commit 0f95b09a5f624964d520c8f6a2674090fb98ae25 Author: Stefan Wahren Date: Tue Nov 19 19:16:20 2019 -0800 hwrng: iproc-rng200 - Add support for BCM2711 BCM2711 features a RNG200 hardware random number generator block. So make the driver available. Signed-off-by: Stefan Wahren Signed-off-by: Stephen Brennan Reviewed-by: Matthias Brugger Reviewed-by: Florian Fainelli Signed-off-by: Herbert Xu commit efdd6099c68a0d47242d491f19edc44ad9d575ed Author: Stefan Wahren Date: Tue Nov 19 19:16:19 2019 -0800 dt-bindings: rng: add BCM2711 RNG compatible The BCM2711 has a RNG200 block, so document its compatible string. Signed-off-by: Stefan Wahren Signed-off-by: Stephen Brennan Reviewed-by: Florian Fainelli Acked-by: Rob Herring Signed-off-by: Herbert Xu commit 13380a1471aadc517994b7230371a227d1f9f152 Author: Herbert Xu Date: Wed Nov 20 06:32:50 2019 +0800 padata: Remove unused padata_remove_cpu The function padata_remove_cpu was supposed to have been removed along with padata_add_cpu but somehow it remained behind. Let's kill it now as it doesn't even have a prototype anymore. Fixes: 815613da6a67 ("kernel/padata.c: removed unused code") Signed-off-by: Herbert Xu Reviewed-by: Daniel Jordan Signed-off-by: Herbert Xu commit 07bfd9bdf568a38d9440c607b72342036011f727 Author: Herbert Xu Date: Tue Nov 19 17:41:31 2019 +0800 crypto: pcrypt - Fix user-after-free on module unload On module unload of pcrypt we must unregister the crypto algorithms first and then tear down the padata structure. As otherwise the crypto algorithms are still alive and can be used while the padata structure is being freed. Fixes: 5068c7a883d1 ("crypto: pcrypt - Add pcrypt crypto...") Cc: Signed-off-by: Herbert Xu commit 528c4d10673714a6ae7f877bb12413e31fa66ce5 Author: Zhou Wang Date: Tue Nov 19 13:42:58 2019 +0800 crypto: hisilicon - Remove useless MODULE macros As we already merge hardware sgl into hisi_qm module, remove useless MODULE macros. Fixes: 48c1cd40fae3 (crypto: hisilicon - merge sgl support to hisi_qm module) Signed-off-by: Zhou Wang Signed-off-by: Herbert Xu commit 484a897ffa3005f16cd9a31efd747bcf8155826f Author: Jonathan Cameron Date: Tue Nov 19 13:42:57 2019 +0800 crypto: hisilicon - Use the offset fields in sqe to avoid need to split scatterlists We can configure sgl offset fields in ZIP sqe to let ZIP engine read/write sgl data with skipped data. Hence no need to splite the sgl. Fixes: 62c455ca853e (crypto: hisilicon - add HiSilicon ZIP accelerator support) Signed-off-by: Jonathan Cameron Signed-off-by: Zhou Wang Signed-off-by: Herbert Xu commit 8debacd60c69beab80736d4af4feca47c2e2bd9e Author: Jonathan Cameron Date: Tue Nov 19 13:42:56 2019 +0800 crypto: hisilicon - Fix issue with wrong number of sg elements after dma map We fill the hardware scatter gather list assuming it will need the same number of elements at the original scatterlist. If an IOMMU is involved, then it may well need fewer. The return value of dma_map_sg tells us how many. Probably never caused visible problems as the hardware won't get to the elements that are incorrect before it finds enough space. Fixes: dfed0098ab91 (crypto: hisilicon - add hardware SGL support) Signed-off-by: Jonathan Cameron Signed-off-by: Zhou Wang Signed-off-by: Herbert Xu commit 07928d9bfc81640bab36f5190e8725894d93b659 Author: Herbert Xu Date: Tue Nov 19 13:17:31 2019 +0800 padata: Remove broken queue flushing The function padata_flush_queues is fundamentally broken because it cannot force padata users to complete the request that is underway. IOW padata has to passively wait for the completion of any outstanding work. As it stands flushing is used in two places. Its use in padata_stop is simply unnecessary because nothing depends on the queues to be flushed afterwards. The other use in padata_replace is more substantial as we depend on it to free the old pd structure. This patch instead uses the pd->refcnt to dynamically free the pd structure once all requests are complete. Fixes: 2b73b07ab8a4 ("padata: Flush the padata queues actively") Cc: Signed-off-by: Herbert Xu Reviewed-by: Daniel Jordan Signed-off-by: Herbert Xu commit 3f61b0527b4e3df06fc8b41dded7ce7bbd3f0023 Author: zhengbin Date: Mon Nov 18 18:53:56 2019 +0800 crypto: inside-secure - Use PTR_ERR_OR_ZERO() to simplify code Fixes coccicheck warning: drivers/crypto/inside-secure/safexcel_cipher.c:2534:1-3: WARNING: PTR_ERR_OR_ZERO can be used Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Herbert Xu commit f59aba2f75795e5b6a4f1aa31f3e20d7b71ca804 Author: Arnd Bergmann Date: Tue Dec 10 21:59:16 2019 +0100 isdn: capi: dead code removal The staging isdn drivers are gone, and CONFIG_BT_CMTP is now the only user. This means a lot of the code in the subsystem has no remaining callers and can be removed. Change the capi user space front-end to be part of kernelcapi, and the combined module to only be compiled if BT_CMTP is also enabled, then remove the interfaces that have no remaining callers. As the notifier list and the capi_drivers list have no callers outside of kcapi.c, the implementation gets much simpler. Some definitions from the include/linux/*.h headers are only needed internally and are moved to kcapi.h. Acked-by: David Miller Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191210210455.3475361-2-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit f10870b05d5edc0652701c6a92eafcab5044795f Author: Arnd Bergmann Date: Tue Dec 10 21:59:15 2019 +0100 staging: remove isdn capi drivers As described in drivers/staging/isdn/TODO, the drivers are all assumed to be unmaintained and unused now, with gigaset being the last one to stop being maintained after Paul Bolle lost access to an ISDN network. The CAPI subsystem remains for now, as it is still required by bluetooth/cmtp. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20191210210455.3475361-1-arnd@arndb.de Signed-off-by: Greg Kroah-Hartman commit 249fce6f3ab0dbd98caa9bc8ea4b50fa709e786a Author: Leonard Crestez Date: Mon Dec 9 22:56:28 2019 +0200 clk: imx8qxp-lpcg: Warn against devm_platform_ioremap_resource On imx8 the LPCG nodes map entire subsystems and overlap peripherals, this means that using devm_platform_ioremap_resource will cause many devices to fail to probe including serial ports. Well-meaning but boot-breaking patches were posted multiple times so add a comment explaining this issue. Suggested-by: Peng Fan Signed-off-by: Leonard Crestez Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 0b766e7fe5a232768375bea85d58d471818bfe59 Author: Sandeep Maheswaram Date: Fri Nov 15 10:53:41 2019 +0530 arm64: dts: qcom: sc7180: Add USB related nodes Add nodes for DWC3 USB controller, QMP and QUSB PHYs. Signed-off-by: Sandeep Maheswaram Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1573795421-13989-2-git-send-email-sanm@codeaurora.org Signed-off-by: Bjorn Andersson commit 82bdc93972bf293c3407cb7fdac163aadfbb2c12 Author: Rajeshwari Date: Thu Nov 28 15:24:07 2019 +0530 arm64: dts: qcom: sc7180: Add device node support for TSENS in SC7180 Add TSENS node and user thermal zone for TSENS sensors in SC7180. Signed-off-by: Rajeshwari Link: https://lore.kernel.org/r/1574934847-30372-2-git-send-email-rkambl@codeaurora.org Signed-off-by: Bjorn Andersson commit 876a7573709e6de5b18c6286ec561fa2ebe4262c Author: Jeffrey Hugo Date: Thu Oct 31 11:58:06 2019 -0700 arm64: dts: qcom: msm8998: Add gpucc node Add MSM8998 GPU Clock Controller DT node. Signed-off-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20191031185806.15602-1-jeffrey.l.hugo@gmail.com Signed-off-by: Bjorn Andersson commit 3e5bf28d2c3981f949e848eec8a60e0b9b61189d Author: Vinod Koul Date: Wed Nov 6 14:16:56 2019 +0530 arm64: dts: qcom: sm8150-mtp: Enable UFS nodes Enable the UFS HC and phy nodes and add regulators used by these. Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20191106084656.1749954-2-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 3834a2e92229ef26d30de28acb698b2b23d3e397 Author: Vinod Koul Date: Wed Nov 6 14:16:55 2019 +0530 arm64: dts: qcom: sm8150: Add ufs nodes Add the ufs hc node and ufs phy nodes found in SM8150 Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20191106084656.1749954-1-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit d6f55763c7189623972a895379d432ddfc570bfe Author: Vinod Koul Date: Wed Nov 6 14:16:04 2019 +0530 arm64: dts: qcom: Use gcc clock enums Now that header defining gcc clocks is upstream, use the enums instead of numbers Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20191106084604.1746544-1-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 86899d8235ea0d3d7c293404fb43a6fabff866e6 Author: Taniya Das Date: Wed Dec 4 09:08:54 2019 +0000 arm64: dts: sc7180: Add cpufreq HW node for cpu scaling cpufreq hw node required to scale CPU frequency on sc7180. Reviewed-by: Matthias Kaehlcke Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/0101016ed02b6356-5165eaaa-6c54-47ff-a008-821c91831e56-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit 2dcb404529f41368c6525497f25ad3be61e31d03 Author: Amit Kucheria Date: Mon Dec 9 16:09:42 2019 +0530 arm64: defconfig: Enable QCOM PMIC thermal QCOM_SPMI_ADC5 and SPMI_TEMP_ALARM expose thermistors on the PMIC of several QCOM platforms through the thermal framework. Enable them. Signed-off-by: Amit Kucheria Link: https://lore.kernel.org/r/5f193f2a7508d82037e8f04e73150feee1a2583e.1575887866.git.amit.kucheria@linaro.org Signed-off-by: Bjorn Andersson commit d026c96b25b7ce5df89526aad2df988d553edb4d Author: Manu Gautam Date: Mon Dec 9 16:15:01 2019 +0100 arm64: dts: qcom: msm8996: Disable USB2 PHY suspend by core QUSB2 PHY on msm8996 doesn't work well when autosuspend by dwc3 core using USB2PHYCFG register is enabled. One of the issue seen is that PHY driver reports PLL lock failure and fails phy_init() if dwc3 core has USB2 PHY suspend enabled. Fix this by using quirks to disable USB2 PHY LPM/suspend and dwc3 core already takes care of explicitly suspending PHY during suspend if quirks are specified. Signed-off-by: Manu Gautam Signed-off-by: Paolo Pisati Link: https://lore.kernel.org/r/20191209151501.26993-1-p.pisati@gmail.com Signed-off-by: Bjorn Andersson commit c831fa29999616c500490fd7b4acab2be7fde573 Author: Sai Prakash Ranjan Date: Wed Dec 11 04:30:46 2019 +0000 arm64: dts: qcom: sc7180: Add Last level cache controller node Add device tree node for LLCC aka system cache controller for SC7180 SoC. Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/0101016ef3394291-2290a8be-91c9-4d46-b5ca-acd5277eb6e2-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit fb2d815006a9aa9df818cb6fa2001d349f4d8d54 Author: Sai Prakash Ranjan Date: Wed Dec 11 04:30:41 2019 +0000 arm64: dts: qcom: sm8150: Add APSS watchdog node Add APSS (Application Processor Subsystem) watchdog DT node for SM8150 SoC. Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/0101016ef3393092-487ddf4a-2e17-40f0-8161-3e686a7b57dc-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit 4722f95646de169ecda38d99b8abe78181fda0a8 Author: Sai Prakash Ranjan Date: Wed Dec 11 04:30:36 2019 +0000 arm64: dts: qcom: sc7180: Add APSS watchdog node Add APSS (Application Processor Subsystem) watchdog DT node for SC7180 SoC. Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/0101016ef3391ce3-438cca2f-458c-47d9-a62a-381f1c6bfb15-000000@us-west-2.amazonses.com Signed-off-by: Bjorn Andersson commit 813dede18088402825c63f751a99b65f28a18155 Author: Sai Prakash Ranjan Date: Fri Nov 15 16:29:11 2019 +0530 dt-bindings: msm: Rename cache-controller to system-cache-controller DT schema checks for the node name 'cache-controller' and enforces that there has to be a cache-level associated with it. But LLCC is a system cache and does not have a cache-level property and hence the dt binding check fails. So let us rename the LLCC cache-controller to system-cache-controller which is the proper description and also makes the schema happy. Acked-by: Rob Herring Reviewed-by: Stephen Boyd Suggested-by: Stephen Boyd Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/83394ae827ce7c123228b749bcae2a2c470e88a4.1573814758.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 52af26e33e700158e6549f1465fcf9da099fabfa Author: Jeffrey Hugo Date: Wed Nov 6 15:05:11 2019 -0800 soc: qcom: qmi: Return EPROBE_DEFER if no address family If a client comes up early in the boot process (perhaps was a built-in driver), qmi_handle_init() will likely fail with a EAFNOSUPPORT since the underlying ipc router hasn't init'd and registered the address family. This should not be a fatal error since chances are, the router will come up later, so recode the error to EPROBE_DEFER so that clients will retry later. Signed-off-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20191106230511.1290-1-jeffrey.l.hugo@gmail.com Signed-off-by: Bjorn Andersson commit 39abbd30877ec5712999dc93465ffee607ab4c94 Author: Sai Prakash Ranjan Date: Fri Nov 15 16:29:12 2019 +0530 arm64: dts: sdm845: Update the device tree node for LLCC LLCC cache-controller was renamed to system-cache-controller to make schema pass the dt binding check. Update the device tree node to reflect this change. Reviewed-by: Stephen Boyd Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/a2bb92de65e90768bf1d6b8c0b7fbd43cba704d2.1573814758.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit a0f96390336af9b81c061851ae5f3e6527e33c2f Author: Douglas Anderson Date: Tue Dec 10 16:35:40 2019 -0800 arm64: dts: sc7180: Add a comment to i2c7 about external pullup Make i2c7 symmetric with the other i2c busses and comment that we have no internal pull because there is an external one. Reviewed-by: Rajendra Nayak Fixes: ba3fc6496366 ("arm64: dts: sc7180: Add qupv3_0 and qupv3_1") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20191210163530.2.I8d4cbb3d7ac5824f8e950c53038df8c27a512905@changeid Signed-off-by: Bjorn Andersson commit 15f1eae3469a6584085affa2d4d6ba6a648e03c8 Author: Douglas Anderson Date: Tue Dec 10 16:35:39 2019 -0800 arm64: dts: sc7180: Fix indentation/ordering of qspi nodes in sc7180-idp The qspi pinctrl nodes had the wrong indentation and sort ordering and the main qspi node was placed down in the pinctrl section. Fix. Reviewed-by: Rajendra Nayak Fixes: ba3fc6496366 ("arm64: dts: sc7180: Add qupv3_0 and qupv3_1") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20191210163530.1.I69a6c29e08924229d160b651769c84508a07b3c6@changeid Signed-off-by: Bjorn Andersson commit dc5eafe7787c6c4ffab6c6b8a5f78859a249880e Author: Takashi Iwai Date: Tue Dec 10 07:34:54 2019 +0100 ALSA: usb-audio: Support PCM sync_stop USB-audio driver had some implementation of its own sync-stop mechanism. This patch moved a part of it to the common PCM sync_stop ops. Link: https://lore.kernel.org/r/20191210063454.31603-56-tiwai@suse.de Signed-off-by: Takashi Iwai commit 0ca4cefad185da4b1a5ebf1f03a2ec92b7825551 Author: Takashi Iwai Date: Tue Dec 10 07:34:53 2019 +0100 ALSA: vxpocket: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the threaded interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-55-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2f44742ca1dedf28a832f98199600f945ec90726 Author: Takashi Iwai Date: Tue Dec 10 07:34:52 2019 +0100 ALSA: pdaudiocf: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the threaded interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-54-tiwai@suse.de Signed-off-by: Takashi Iwai commit 59fdf8e96c03261d5b32166a49be9d7daaf7ef73 Author: Takashi Iwai Date: Tue Dec 10 07:34:51 2019 +0100 ALSA: vx222: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the threaded interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-53-tiwai@suse.de Signed-off-by: Takashi Iwai commit 271213ef4d0d3a3b80d4cf95c5f2bebb5643e666 Author: Takashi Iwai Date: Tue Dec 10 07:34:50 2019 +0100 ALSA: pcxhr: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the threaded interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-52-tiwai@suse.de Signed-off-by: Takashi Iwai commit cefeaa5053d937f28116f8a53bd422f92d0c7475 Author: Takashi Iwai Date: Tue Dec 10 07:34:49 2019 +0100 ALSA: mixart: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the threaded interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-51-tiwai@suse.de Signed-off-by: Takashi Iwai commit 41094b243e621fb67b81a49bab53f5f7e699f429 Author: Takashi Iwai Date: Tue Dec 10 07:34:48 2019 +0100 ALSA: lx6464es: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the threaded interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-50-tiwai@suse.de Signed-off-by: Takashi Iwai commit 959d4c806d386cd28aa74d65db8f0a226defab10 Author: Takashi Iwai Date: Tue Dec 10 07:34:47 2019 +0100 ALSA: wss: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-49-tiwai@suse.de Signed-off-by: Takashi Iwai commit 48094a75cd7090aecc1b9b0dd0c5f1f70c7443cb Author: Takashi Iwai Date: Tue Dec 10 07:34:46 2019 +0100 ALSA: wavefront: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-48-tiwai@suse.de Signed-off-by: Takashi Iwai commit f9236dd027b85846f2fb7f959cc4baaf165d339f Author: Takashi Iwai Date: Tue Dec 10 07:34:45 2019 +0100 ALSA: sb: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-47-tiwai@suse.de Signed-off-by: Takashi Iwai commit 16d9fb1deef8cf0c83c86a6538f8522a89676d4c Author: Takashi Iwai Date: Tue Dec 10 07:34:44 2019 +0100 ALSA: opti9xx: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-46-tiwai@suse.de Signed-off-by: Takashi Iwai commit d3e163bfff972f810c67d766219807eee2d23c82 Author: Takashi Iwai Date: Tue Dec 10 07:34:43 2019 +0100 ALSA: opl3sa2: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-45-tiwai@suse.de Signed-off-by: Takashi Iwai commit 52f623d0a84d7c6240e53e964caaaec61b62aa9d Author: Takashi Iwai Date: Tue Dec 10 07:34:42 2019 +0100 ALSA: msnd: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-44-tiwai@suse.de Signed-off-by: Takashi Iwai commit 914da689090c094dd1ffce02b1fa13d7e9411ea0 Author: Takashi Iwai Date: Tue Dec 10 07:34:41 2019 +0100 ALSA: gus: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-43-tiwai@suse.de Signed-off-by: Takashi Iwai commit 58dad836f98cdba69bb4f0b0a9a19af8e39e9fbf Author: Takashi Iwai Date: Tue Dec 10 07:34:40 2019 +0100 ALSA: es18xx: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-42-tiwai@suse.de Signed-off-by: Takashi Iwai commit f5ac512085b5c2667f8db5f09ce8b87648e5cce4 Author: Takashi Iwai Date: Tue Dec 10 07:34:39 2019 +0100 ALSA: es1688: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-41-tiwai@suse.de Signed-off-by: Takashi Iwai commit 0dbba47eb4e9428d8563278123992243c3c62c3e Author: Takashi Iwai Date: Tue Dec 10 07:34:38 2019 +0100 ALSA: ad1816a: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-40-tiwai@suse.de Signed-off-by: Takashi Iwai commit b7a03a1e14595aa806c33000bfb4fea4eb8acdc5 Author: Takashi Iwai Date: Tue Dec 10 07:34:37 2019 +0100 ALSA: ymfpci: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-39-tiwai@suse.de Signed-off-by: Takashi Iwai commit c47583b0eb6847b0507a93b6dddc39dd1b15172f Author: Takashi Iwai Date: Tue Dec 10 07:34:36 2019 +0100 ALSA: via82xx: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call. Link: https://lore.kernel.org/r/20191210063454.31603-38-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4a9ff148bd348f7489fcc9d1a1ef3723b6f329be Author: Takashi Iwai Date: Tue Dec 10 07:34:35 2019 +0100 ALSA: trident: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-37-tiwai@suse.de Signed-off-by: Takashi Iwai commit 93042ac2bc40658e8e2cd809644e37bda05cf4fc Author: Takashi Iwai Date: Tue Dec 10 07:34:34 2019 +0100 ALSA: sonicvibes: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-36-tiwai@suse.de Signed-off-by: Takashi Iwai commit 39b77268c8cdfff171c09c22f7ee8069139d4f20 Author: Takashi Iwai Date: Tue Dec 10 07:34:33 2019 +0100 ALSA: sis7019: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-35-tiwai@suse.de Signed-off-by: Takashi Iwai commit 39cccf4511fd00c591c989edb47c8ed51aba0282 Author: Takashi Iwai Date: Tue Dec 10 07:34:32 2019 +0100 ALSA: rme9652: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-34-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5fcf46bc8333409018f29966d736034c587d7aa6 Author: Takashi Iwai Date: Tue Dec 10 07:34:31 2019 +0100 ALSA: rme96: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-33-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1dad75b9823c77aa7e1020f011c72fcc15a90144 Author: Takashi Iwai Date: Tue Dec 10 07:34:30 2019 +0100 ALSA: rme32: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-32-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3992f78f349f7f1565b43d244177f3975edb9aa1 Author: Takashi Iwai Date: Tue Dec 10 07:34:29 2019 +0100 ALSA: riptide: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-31-tiwai@suse.de Signed-off-by: Takashi Iwai commit bf17d20adea74015628a1db0c658d256697b8d83 Author: Takashi Iwai Date: Tue Dec 10 07:34:28 2019 +0100 ALSA: oxygen: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call. Link: https://lore.kernel.org/r/20191210063454.31603-30-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1478eb63654b367399f79edc0734a3bda1b0324b Author: Takashi Iwai Date: Tue Dec 10 07:34:27 2019 +0100 ALSA: nm256: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. It's cleared and reset dynamically at IRQ re-acquiring for the PM resume, too. Link: https://lore.kernel.org/r/20191210063454.31603-29-tiwai@suse.de Signed-off-by: Takashi Iwai commit a20b8bfe557c794ae3a35c1ca9cb25d3abaf7784 Author: Takashi Iwai Date: Tue Dec 10 07:34:26 2019 +0100 ALSA: maestro3: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-28-tiwai@suse.de Signed-off-by: Takashi Iwai commit aec9f0cc057ece110be244fc5d2f10ba3176a8db Author: Takashi Iwai Date: Tue Dec 10 07:34:25 2019 +0100 ALSA: lola: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call. Link: https://lore.kernel.org/r/20191210063454.31603-27-tiwai@suse.de Signed-off-by: Takashi Iwai commit 67ceac17e87780d7879fecd4dc0ac52bf99b164a Author: Takashi Iwai Date: Tue Dec 10 07:34:24 2019 +0100 ALSA: korg1212: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-26-tiwai@suse.de Signed-off-by: Takashi Iwai commit be1391c7858ffd7c5c1b4f004431cfbffb3e923c Author: Takashi Iwai Date: Tue Dec 10 07:34:23 2019 +0100 ALSA: intel8x0: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. It's cleared and reset dynamically at IRQ re-acquiring for the PM resume, too. Link: https://lore.kernel.org/r/20191210063454.31603-25-tiwai@suse.de Signed-off-by: Takashi Iwai commit b0ad3bbc1e1ba112adff0eafac59811abf7a9686 Author: Takashi Iwai Date: Tue Dec 10 07:34:22 2019 +0100 ALSA: ice1724: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call. Link: https://lore.kernel.org/r/20191210063454.31603-24-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1b97a87f44d848253d1249f0bcbe804ed677edc4 Author: Takashi Iwai Date: Tue Dec 10 07:34:21 2019 +0100 ALSA: ice1712: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call. Link: https://lore.kernel.org/r/20191210063454.31603-23-tiwai@suse.de Signed-off-by: Takashi Iwai commit f36da9406e6698a97ea643aeeab6307863094967 Author: Takashi Iwai Date: Tue Dec 10 07:34:20 2019 +0100 ALSA: hda: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. It's cleared and reset dynamically at IRQ re-acquiring for the PM resume, too. Link: https://lore.kernel.org/r/20191210063454.31603-22-tiwai@suse.de Signed-off-by: Takashi Iwai commit e41dbd20383d0dda8813ef6186b142be4de0ddb6 Author: Takashi Iwai Date: Tue Dec 10 07:34:19 2019 +0100 ALSA: fm801: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-21-tiwai@suse.de Signed-off-by: Takashi Iwai commit dbb71ab05f39162e7e65dbde36cd60be50a4bd5c Author: Takashi Iwai Date: Tue Dec 10 07:34:18 2019 +0100 ALSA: es1968: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call. Link: https://lore.kernel.org/r/20191210063454.31603-20-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6b276e6281b6df9b3a74905dab2ead9aaca3fc55 Author: Takashi Iwai Date: Tue Dec 10 07:34:17 2019 +0100 ALSA: es1938: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. It's cleared and reset dynamically at IRQ re-acquiring for the PM resume, too. Link: https://lore.kernel.org/r/20191210063454.31603-19-tiwai@suse.de Signed-off-by: Takashi Iwai commit 83720eef264bbfb6fa94b3eeb2671ffd0bd2dde7 Author: Takashi Iwai Date: Tue Dec 10 07:34:16 2019 +0100 ALSA: ens137x: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call. Link: https://lore.kernel.org/r/20191210063454.31603-18-tiwai@suse.de Signed-off-by: Takashi Iwai commit 66471aa715f0d4207c61e27e6333d6f453df554b Author: Takashi Iwai Date: Tue Dec 10 07:34:15 2019 +0100 ALSA: emu10k1: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-17-tiwai@suse.de Signed-off-by: Takashi Iwai commit d4cad99fda9bc5ba6de3a56aedb572a008d1856a Author: Takashi Iwai Date: Tue Dec 10 07:34:14 2019 +0100 ALSA: echoaudio: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. It's cleared and reset dynamically at IRQ re-acquiring for the PM resume, too. Link: https://lore.kernel.org/r/20191210063454.31603-16-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5e0890c1cb7dbcb9779fb664e8f3c579911c9283 Author: Takashi Iwai Date: Tue Dec 10 07:34:13 2019 +0100 ALSA: ctxfi: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call. Link: https://lore.kernel.org/r/20191210063454.31603-15-tiwai@suse.de Signed-off-by: Takashi Iwai commit 25ec679b90782aed4894a1c3cc36c0a4ed350a20 Author: Takashi Iwai Date: Tue Dec 10 07:34:12 2019 +0100 ALSA: cs5535audio: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call. Link: https://lore.kernel.org/r/20191210063454.31603-14-tiwai@suse.de Signed-off-by: Takashi Iwai commit 763ae53d2ae40feccc7edbeb0067b7f6978699a5 Author: Takashi Iwai Date: Tue Dec 10 07:34:11 2019 +0100 ALSA: cs46xx: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-13-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5afff8c1bbc7c5d9a092b217dd27040ccd5b347a Author: Takashi Iwai Date: Tue Dec 10 07:34:10 2019 +0100 ALSA: cs4281: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call. Link: https://lore.kernel.org/r/20191210063454.31603-12-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3663984e07a4806c891db66c1ac4fed5c36d38f2 Author: Takashi Iwai Date: Tue Dec 10 07:34:09 2019 +0100 ALSA: cmipci: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-11-tiwai@suse.de Signed-off-by: Takashi Iwai commit 339ede502a00af9c32ce1b585a6be94f2d4f96c9 Author: Takashi Iwai Date: Tue Dec 10 07:34:08 2019 +0100 ALSA: ca0106: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-10-tiwai@suse.de Signed-off-by: Takashi Iwai commit d2625a62fe7534c6acb4ca3b668d4d46a98beab8 Author: Takashi Iwai Date: Tue Dec 10 07:34:07 2019 +0100 ALSA: bt87x: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call. Link: https://lore.kernel.org/r/20191210063454.31603-9-tiwai@suse.de Signed-off-by: Takashi Iwai commit aefd1860acd553efb6d7cb00654a4963e4a73bd6 Author: Takashi Iwai Date: Tue Dec 10 07:34:06 2019 +0100 ALSA: azt3328: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call. Link: https://lore.kernel.org/r/20191210063454.31603-8-tiwai@suse.de Signed-off-by: Takashi Iwai commit f8582e001f72bbd279f2559122e12741fda90619 Author: Takashi Iwai Date: Tue Dec 10 07:34:05 2019 +0100 ALSA: aw2: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-7-tiwai@suse.de Signed-off-by: Takashi Iwai commit 662a7441316d584d8bf62004ff55d978004a97ec Author: Takashi Iwai Date: Tue Dec 10 07:34:04 2019 +0100 ALSA: au88x0: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4504487d928d5801e8cc52f70e77392cc94d45f5 Author: Takashi Iwai Date: Tue Dec 10 07:34:03 2019 +0100 ALSA: atiixp: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call. Link: https://lore.kernel.org/r/20191210063454.31603-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit ea2eab50a0e1a868a87b407f51a6b45b9062ee08 Author: Takashi Iwai Date: Tue Dec 10 07:34:02 2019 +0100 ALSA: als300: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5110bc701b4aa839f461aa5a1a6259bf91b07036 Author: Takashi Iwai Date: Tue Dec 10 07:34:01 2019 +0100 ALSA: ali5451: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation, as well as removing the superfluous synchronize_irq() call. Link: https://lore.kernel.org/r/20191210063454.31603-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 164d0738248ac0befb4ce11ca60a06a41838af47 Author: Takashi Iwai Date: Tue Dec 10 07:34:00 2019 +0100 ALSA: ad1889: Support PCM sync_stop The driver invokes snd_pcm_period_elapsed() simply from the interrupt handler. Set card->sync_irq for enabling the missing sync_stop PCM operation. Link: https://lore.kernel.org/r/20191210063454.31603-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4bb1e4e7ccc2a955e933d0cec630da40012dcd42 Author: Takashi Iwai Date: Tue Dec 10 07:11:45 2019 +0100 ALSA: xen: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-24-tiwai@suse.de Signed-off-by: Takashi Iwai commit 63d5cda7f55bb3537d30642c1cf7e5afccb6e6c7 Author: Takashi Iwai Date: Tue Dec 10 07:11:44 2019 +0100 ALSA: x86: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-23-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9c0d064a1e1906bf18a4d641145df004d16a10dd Author: Takashi Iwai Date: Tue Dec 10 07:11:43 2019 +0100 ALSA: usb: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-22-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6bddc9ef588555a9ed25c735fa8b277d966df78a Author: Takashi Iwai Date: Tue Dec 10 07:11:42 2019 +0100 ALSA: spi: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-21-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5fcd1aeee587f6582e66572d12fb0b9c4c2583fb Author: Takashi Iwai Date: Tue Dec 10 07:11:41 2019 +0100 ALSA: sparc: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-20-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9fafc5259b430e9f2d3900dc163e9d22a4b56c86 Author: Takashi Iwai Date: Tue Dec 10 07:11:40 2019 +0100 ALSA: sh: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-19-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5b6e996a6218eb91b8b44c3821b3ae109e9aca52 Author: Takashi Iwai Date: Tue Dec 10 07:11:39 2019 +0100 ALSA: ppc: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-18-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1a0fa90f9c01f83ec4c215dca67ef9e8444b19d0 Author: Takashi Iwai Date: Tue Dec 10 07:11:38 2019 +0100 ALSA: pcmcia: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-17-tiwai@suse.de Signed-off-by: Takashi Iwai commit d34e1b7b9a7fa87fc5309447e4a14bd511de4bc9 Author: Takashi Iwai Date: Tue Dec 10 07:11:37 2019 +0100 ALSA: pci: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-16-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6b07ea052a5a4c56225c65e5d2c07b1af20a09bb Author: Takashi Iwai Date: Tue Dec 10 07:11:36 2019 +0100 ALSA: trident: Drop superfluous ioctl PCM ops snd_trident_ioctl() does nothing but calling the default handler. Now PCM core accepts NULL as the default ioctl ops(*), so let's drop altogether. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-15-tiwai@suse.de Signed-off-by: Takashi Iwai commit b1b375b062b4322c26a86c9b5ed53911e658da5c Author: Takashi Iwai Date: Tue Dec 10 07:11:35 2019 +0100 ALSA: asihpi: Drop superfluous ioctl PCM ops snd_card_asihpi_playback_ioctl() and snd_card_asihpi_capture_ioctl() do nothing but calling the default handler. Now PCM core accepts NULL as the default ioctl ops(*), so let's drop altogether. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-14-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6c9239e4c705421079909ecf08de0fe397435684 Author: Takashi Iwai Date: Tue Dec 10 07:11:34 2019 +0100 ALSA: atiixp: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-13-tiwai@suse.de Signed-off-by: Takashi Iwai commit 64395f83297a314b5a9178dfddceac47ecfe602f Author: Takashi Iwai Date: Tue Dec 10 07:11:33 2019 +0100 ALSA: via82xx: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-12-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4ab6596a32b198dc2d9b5499ae63f069564c178c Author: Takashi Iwai Date: Tue Dec 10 07:11:32 2019 +0100 ALSA: intel8x0: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-11-tiwai@suse.de Signed-off-by: Takashi Iwai commit c02644684ca11b904c5105f06c988a62ef0c6dde Author: Takashi Iwai Date: Tue Dec 10 07:11:31 2019 +0100 ALSA: parisc: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-10-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9a4df8251ac0aed09d67405c7dfa59f14bde82ed Author: Takashi Iwai Date: Tue Dec 10 07:11:30 2019 +0100 ALSA: mips: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-9-tiwai@suse.de Signed-off-by: Takashi Iwai commit 86940651eaf4ae596e83ea68070e60462f387b6f Author: Takashi Iwai Date: Tue Dec 10 07:11:29 2019 +0100 ALSA: isa: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-8-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2251612e2f992092e9f010d30c8820fcf47d7f29 Author: Takashi Iwai Date: Tue Dec 10 07:11:28 2019 +0100 ALSA: es1688: Drop superfluous ioctl PCM ops snd_es1688_ioctl() does nothing but calling the default handler. Now PCM core accepts NULL as the default ioctl ops(*), so let's drop altogether. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-7-tiwai@suse.de Signed-off-by: Takashi Iwai commit d45b3aaea26c8bc43ca5bc8cba05cb399096d631 Author: Takashi Iwai Date: Tue Dec 10 07:11:27 2019 +0100 ALSA: firewire: Drop superfluous ioctl PCM ops All the PCM ioctl ops of ALSA FireWire drivers do nothing but calling the default handler. Now PCM core accepts NULL as the default ioctl ops(*), so let's drop altogether. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Acked-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191210061145.24641-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit ae531486d77061fcc227455c8bcdcc278350b0c4 Author: Takashi Iwai Date: Tue Dec 10 07:11:26 2019 +0100 ALSA: drivers: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1eb1a950f6201f308566bd58d2b9c97ec99210da Author: Takashi Iwai Date: Tue Dec 10 07:11:25 2019 +0100 ALSA: atmel: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 94c0ff8bd1e305e5c3437c83e8230c605f2e4c18 Author: Takashi Iwai Date: Tue Dec 10 07:11:24 2019 +0100 ALSA: arm: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit f2b44229268f93f3648e9c37e35bef0fc2d86eb2 Author: Takashi Iwai Date: Tue Dec 10 07:11:23 2019 +0100 ALSA: aoa: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default(*). Let's kill the redundant lines. (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops") Link: https://lore.kernel.org/r/20191210061145.24641-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit cc6c69126e38d3880b72400cfe29e52cc1a7fa2b Author: Takashi Iwai Date: Mon Dec 9 10:49:43 2019 +0100 ALSA: hdml-lpe-audio: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-72-tiwai@suse.de Signed-off-by: Takashi Iwai commit dd21bf512b648b7f5241557b59f8fd22221e2f76 Author: Takashi Iwai Date: Mon Dec 9 10:49:21 2019 +0100 ALSA: pcxhr: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-50-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6dd9486ca9b8dde3a91e4c5231b8c83df27ba753 Author: Takashi Iwai Date: Mon Dec 9 10:49:42 2019 +0100 ALSA: usb-audio: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-71-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3f0c972ad828b5b1a44563c2ceea0f140827013b Author: Takashi Iwai Date: Mon Dec 9 10:49:41 2019 +0100 ALSA: usx2y: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-70-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8aa77f9cab9aead9f684d2a19d11515f468465f1 Author: Takashi Iwai Date: Mon Dec 9 10:49:40 2019 +0100 ALSA: ua101: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-69-tiwai@suse.de Signed-off-by: Takashi Iwai commit b9626bd6238256bd6f122f42400a143c2bf06b02 Author: Takashi Iwai Date: Mon Dec 9 10:49:39 2019 +0100 ALSA: line6: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-68-tiwai@suse.de Signed-off-by: Takashi Iwai commit d0aa558cde353f400dbe910840a87953bc3e11e2 Author: Takashi Iwai Date: Mon Dec 9 10:49:38 2019 +0100 ALSA: hiface: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-67-tiwai@suse.de Signed-off-by: Takashi Iwai commit 1075b321ab4300e5ee73eeb97980b45bc2ce13b6 Author: Takashi Iwai Date: Mon Dec 9 10:49:37 2019 +0100 ALSA: caiaq: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params callback became superfluous and dropped. The hw_free callback still remains because of the substream deactivation sync call. Link: https://lore.kernel.org/r/20191209094943.14984-66-tiwai@suse.de Signed-off-by: Takashi Iwai commit a3c10ea47e6dd087e92e8ebbc7844ea48c4c17c3 Author: Takashi Iwai Date: Mon Dec 9 10:49:36 2019 +0100 ALSA: 6fire: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-65-tiwai@suse.de Signed-off-by: Takashi Iwai commit ce747f864268981e5db12c638265a0ddfd9c7f78 Author: Takashi Iwai Date: Mon Dec 9 10:49:35 2019 +0100 ALSA: spi: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-64-tiwai@suse.de Signed-off-by: Takashi Iwai commit 786e90b0d0f4ffc16237c05ac5cfc7285bf4e1bc Author: Takashi Iwai Date: Mon Dec 9 10:49:34 2019 +0100 ALSA: sparc: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and dropped. Link: https://lore.kernel.org/r/20191209094943.14984-63-tiwai@suse.de Signed-off-by: Takashi Iwai commit 50cdf3a0961fd0d0bcb71b85eeccb3a9783bf1b6 Author: Takashi Iwai Date: Mon Dec 9 10:49:33 2019 +0100 ALSA: sh: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-62-tiwai@suse.de Signed-off-by: Takashi Iwai commit 403d026c43763241e0d44086cdce3df4706c9454 Author: Takashi Iwai Date: Mon Dec 9 10:49:32 2019 +0100 ALSA: aica: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-61-tiwai@suse.de Signed-off-by: Takashi Iwai commit 377d870e5456ba202dacaf9b730fe68d369f7099 Author: Takashi Iwai Date: Mon Dec 9 10:49:31 2019 +0100 ALSA: ps3: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-60-tiwai@suse.de Signed-off-by: Takashi Iwai commit 01001fa1c79e2bb6698c289010352cae7b0a142d Author: Takashi Iwai Date: Mon Dec 9 10:49:30 2019 +0100 ALSA: pmac: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-59-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6dfa8fd598ecf732768ae77e7e08516efd6e71ab Author: Takashi Iwai Date: Mon Dec 9 10:49:29 2019 +0100 ALSA: pdaudiocf: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-58-tiwai@suse.de Signed-off-by: Takashi Iwai commit b6ed90c0dd764ac83b4d775e48669c95e93f77ce Author: Takashi Iwai Date: Mon Dec 9 10:49:28 2019 +0100 ALSA: ymfpci: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params callback became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-57-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8e2c75249d066ff365d8dc5028ce3c402c3a7230 Author: Takashi Iwai Date: Mon Dec 9 10:49:27 2019 +0100 ALSA: via82xx: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-56-tiwai@suse.de Signed-off-by: Takashi Iwai commit c79eafa095b192e251ece9e8016c8012e47fe303 Author: Takashi Iwai Date: Mon Dec 9 10:49:26 2019 +0100 ALSA: trident: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-55-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3e1ee04ba9ea9129c8d5bb8809866ea38e7794c2 Author: Takashi Iwai Date: Mon Dec 9 10:49:25 2019 +0100 ALSA: sonicvibes: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-54-tiwai@suse.de Signed-off-by: Takashi Iwai commit ff3eb3d51be9d191fe3e663d0e95ed8b28824a89 Author: Takashi Iwai Date: Mon Dec 9 10:49:24 2019 +0100 ALSA: sis7019: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-53-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7ceebdc87c63cfdbbdd38b58a16d7597e1b3c9f6 Author: Takashi Iwai Date: Mon Dec 9 10:49:23 2019 +0100 ALSA: rme32: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-52-tiwai@suse.de Signed-off-by: Takashi Iwai commit 0dd323695c7b8dc33c6dc2d23bbe99a8ecd5d627 Author: Takashi Iwai Date: Mon Dec 9 10:49:22 2019 +0100 ALSA: riptide: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-51-tiwai@suse.de Signed-off-by: Takashi Iwai commit fdaad162a4f32cedbfacdf45589f30be6beae1fc Author: Takashi Iwai Date: Mon Dec 9 10:49:20 2019 +0100 ALSA: oxygen: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-49-tiwai@suse.de Signed-off-by: Takashi Iwai commit c6312f3926d77d9f5e8aaf1fc5dc7eca6b42f131 Author: Takashi Iwai Date: Mon Dec 9 10:49:19 2019 +0100 ALSA: mixart: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-48-tiwai@suse.de Signed-off-by: Takashi Iwai commit e485e5386d3df5f76ef2f81a09361309314da558 Author: Takashi Iwai Date: Mon Dec 9 10:49:18 2019 +0100 ALSA: maestro3: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-47-tiwai@suse.de Signed-off-by: Takashi Iwai commit a747db239010bcabe48e3429556b782988a11797 Author: Takashi Iwai Date: Mon Dec 9 10:49:17 2019 +0100 ALSA: lx6464es: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-46-tiwai@suse.de Signed-off-by: Takashi Iwai commit 224a40c7511f1095d2b6cfd261cd84510b7cbe43 Author: Takashi Iwai Date: Mon Dec 9 10:49:16 2019 +0100 ALSA: lola: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-45-tiwai@suse.de Signed-off-by: Takashi Iwai commit 28d52aa55436630327d938b165b7c37febcbd36f Author: Takashi Iwai Date: Mon Dec 9 10:49:15 2019 +0100 ALSA: intel8x0: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-44-tiwai@suse.de Signed-off-by: Takashi Iwai commit 09e263cd4a1d16f12e5bca8a5575ed2a2dddbf11 Author: Takashi Iwai Date: Mon Dec 9 10:49:14 2019 +0100 ALSA: ice1724: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-43-tiwai@suse.de Signed-off-by: Takashi Iwai commit 60b8918ba5f51ff1702b502e859b94130f7331f3 Author: Takashi Iwai Date: Mon Dec 9 10:49:13 2019 +0100 ALSA: ice1712: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-42-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7a6d4a5ac89fcc775b0bc7acb8656aec6b4d82b1 Author: Takashi Iwai Date: Mon Dec 9 10:49:12 2019 +0100 ALSA: hda: Use managed buffer allocation Clean up the common driver module with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-41-tiwai@suse.de Signed-off-by: Takashi Iwai commit 247ed1020476bfdec52459f4019c75d596e27156 Author: Takashi Iwai Date: Mon Dec 9 10:49:11 2019 +0100 ALSA: fm801: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-40-tiwai@suse.de Signed-off-by: Takashi Iwai commit d244a1db6f64ad69a04f835e70c1be156c2d7cbe Author: Takashi Iwai Date: Mon Dec 9 10:49:10 2019 +0100 ALSA: es1938: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-39-tiwai@suse.de Signed-off-by: Takashi Iwai commit b22b2478125120e0110049ac53fdcef38ea0a167 Author: Takashi Iwai Date: Mon Dec 9 10:49:09 2019 +0100 ALSA: ens137x: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-38-tiwai@suse.de Signed-off-by: Takashi Iwai commit cbf7dcd949d7ff820232d67fff314fb556718870 Author: Takashi Iwai Date: Mon Dec 9 10:49:08 2019 +0100 ALSA: emu10k1: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The normal playback streams need a workaround for the aligned buffer, and cannot apply the straight snd_pcm_lib_malloc() stuff, so they remain untouched, while other streams are converted to the new managed mode. Most of hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-37-tiwai@suse.de Signed-off-by: Takashi Iwai commit 63832bd951d2c1deed3ea2dd5a74604902a1a0d1 Author: Takashi Iwai Date: Mon Dec 9 10:49:07 2019 +0100 ALSA: emu10k1x: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-36-tiwai@suse.de Signed-off-by: Takashi Iwai commit 11f63ca3995b8099aa9d6d039d729c91a9122112 Author: Takashi Iwai Date: Mon Dec 9 10:49:06 2019 +0100 ALSA: echoaudio: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-35-tiwai@suse.de Signed-off-by: Takashi Iwai commit 76178cc7d5eb6dc881c3fccab882802e5d16f790 Author: Takashi Iwai Date: Mon Dec 9 10:49:05 2019 +0100 ALSA: ctxfi: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-34-tiwai@suse.de Signed-off-by: Takashi Iwai commit c6071300ac85b0db5cce715fa5bc3727251fb65a Author: Takashi Iwai Date: Mon Dec 9 10:49:04 2019 +0100 ALSA: cs5535: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-33-tiwai@suse.de Signed-off-by: Takashi Iwai commit 44e78a1a85ad5b893dda6cbf866e9e14acf71e0d Author: Takashi Iwai Date: Mon Dec 9 10:49:03 2019 +0100 ALSA: cs4281: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-32-tiwai@suse.de Signed-off-by: Takashi Iwai commit d841e2e88f00310b2602da3095700a0226983953 Author: Takashi Iwai Date: Mon Dec 9 10:49:02 2019 +0100 ALSA: cmipci: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-31-tiwai@suse.de Signed-off-by: Takashi Iwai commit fc97aef32338c5d5d9454f49655a275af03b2911 Author: Takashi Iwai Date: Mon Dec 9 10:49:01 2019 +0100 ALSA: ca0106: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-30-tiwai@suse.de Signed-off-by: Takashi Iwai commit b87ddad2773eb9a1951dd1513bee9f8a6aef7614 Author: Takashi Iwai Date: Mon Dec 9 10:49:00 2019 +0100 ALSA: bt87x: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-29-tiwai@suse.de Signed-off-by: Takashi Iwai commit 830e7b0076814a414ab96ac555cfdd5247e6f568 Author: Takashi Iwai Date: Mon Dec 9 10:48:59 2019 +0100 ALSA: azt3328: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-28-tiwai@suse.de Signed-off-by: Takashi Iwai commit 817790cc3dfe53b48266f65a73b2153615318d55 Author: Takashi Iwai Date: Mon Dec 9 10:48:58 2019 +0100 ALSA: aw2: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-27-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8c847a423572e816629f67bea2e13717b3470409 Author: Takashi Iwai Date: Mon Dec 9 10:48:57 2019 +0100 ALSA: au88x0: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-26-tiwai@suse.de Signed-off-by: Takashi Iwai commit 801bf05747642fcc1039efaf5f00d36ed52d9dd5 Author: Takashi Iwai Date: Mon Dec 9 10:48:56 2019 +0100 ALSA: atiixp: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-25-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7ae11ecf0dfeac445024fe9af6a2c1cdaea21f64 Author: Takashi Iwai Date: Mon Dec 9 10:48:55 2019 +0100 ALSA: asihpi: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-24-tiwai@suse.de Signed-off-by: Takashi Iwai commit 96bcfde13a1cb8979c0e4fb35f99be2d072c21bd Author: Takashi Iwai Date: Mon Dec 9 10:48:54 2019 +0100 ALSA: als4000: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-23-tiwai@suse.de Signed-off-by: Takashi Iwai commit 909c7d2cccc386f087cb4dcc4207b9931ddd6601 Author: Takashi Iwai Date: Mon Dec 9 10:48:53 2019 +0100 ALSA: als300: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-22-tiwai@suse.de Signed-off-by: Takashi Iwai commit e695745437a4e2635ea18100c93a3115b7c0fd36 Author: Takashi Iwai Date: Mon Dec 9 10:48:52 2019 +0100 ALSA: ali5451: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-21-tiwai@suse.de Signed-off-by: Takashi Iwai commit 93d6487f7a81527d0d43028bc805d3b1aa9f80fb Author: Takashi Iwai Date: Mon Dec 9 10:48:51 2019 +0100 ALSA: ad1889: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-20-tiwai@suse.de Signed-off-by: Takashi Iwai commit 005f3e67a855f6d1deaea84e0ab8e40c597ad10c Author: Takashi Iwai Date: Mon Dec 9 10:48:50 2019 +0100 ALSA: parisc: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-19-tiwai@suse.de Signed-off-by: Takashi Iwai commit ee88f4ebe57523889fc437bc42f95d9ab89bdd9f Author: Takashi Iwai Date: Mon Dec 9 10:48:49 2019 +0100 ALSA: mips: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-18-tiwai@suse.de Signed-off-by: Takashi Iwai commit 15fbacfe3d32d60044e27e7d00f24bfaca943449 Author: Takashi Iwai Date: Mon Dec 9 10:48:48 2019 +0100 ALSA: wss: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-17-tiwai@suse.de Signed-off-by: Takashi Iwai commit a57214e5486254d3242b863fe82309633c4cdb06 Author: Takashi Iwai Date: Mon Dec 9 10:48:47 2019 +0100 ALSA: gus: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-16-tiwai@suse.de Signed-off-by: Takashi Iwai commit 07ed72ba4d45601313848664e97cb2fc5d71f45d Author: Takashi Iwai Date: Mon Dec 9 10:48:46 2019 +0100 ALSA: sb: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-15-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9ce57056d8ce15972b5547559e8f4e5d2013c4ec Author: Takashi Iwai Date: Mon Dec 9 10:48:45 2019 +0100 ALSA: es18xx: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-14-tiwai@suse.de Signed-off-by: Takashi Iwai commit eb40b64f289717e0e9d07bc57a241e692ff31640 Author: Takashi Iwai Date: Mon Dec 9 10:48:44 2019 +0100 ALSA: es1688: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-13-tiwai@suse.de Signed-off-by: Takashi Iwai commit 427f0ea46fb041c5397abc83906b910ec9b96825 Author: Takashi Iwai Date: Mon Dec 9 10:48:43 2019 +0100 ALSA: cmi8330: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The actual removal of superfluous code will be done in ad1848 and sb codec drivers later. Link: https://lore.kernel.org/r/20191209094943.14984-12-tiwai@suse.de Signed-off-by: Takashi Iwai commit d577b6c8cf8ccaafda419a40af05c2eadac27bf7 Author: Takashi Iwai Date: Mon Dec 9 10:48:42 2019 +0100 ALSA: ad1816a: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-11-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7641d549b13bbb1dcc6c7759c010c1ca288c90be Author: Takashi Iwai Date: Mon Dec 9 10:48:41 2019 +0100 ALSA: firewire: Use managed buffer allocation Clean up the drivers with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped. Acked-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20191209192422.23902-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8f326303b0d89a6f7efaa56e4c02d6584c6d61df Author: Takashi Iwai Date: Mon Dec 9 10:48:40 2019 +0100 ALSA: vx: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-9-tiwai@suse.de Signed-off-by: Takashi Iwai commit d635f09e919e6ea9214a7676e26ef6755b3453a0 Author: Takashi Iwai Date: Mon Dec 9 10:48:39 2019 +0100 ALSA: pcsp: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() are dropped. Link: https://lore.kernel.org/r/20191209094943.14984-8-tiwai@suse.de Signed-off-by: Takashi Iwai commit cbd0719d5115a70bd1a1a8958eef504ddb867368 Author: Takashi Iwai Date: Mon Dec 9 10:48:38 2019 +0100 ALSA: ml403: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous (they were only useless debug prints) and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-7-tiwai@suse.de Signed-off-by: Takashi Iwai commit ef1545b8f35e230e7e7aae7d01647d151fd8e87a Author: Takashi Iwai Date: Mon Dec 9 10:48:37 2019 +0100 ALSA: dummy: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_free callback became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit 39729889b1f58ae42036383fc51abd067eeb4af9 Author: Takashi Iwai Date: Mon Dec 9 10:48:36 2019 +0100 ALSA: aloop: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params callback became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 37b9b9a5078aa2efe2131d7b0084ebd4192fb1f5 Author: Takashi Iwai Date: Mon Dec 9 10:48:35 2019 +0100 ALSA: atmel: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_free_free callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8ee0c7586959551025cb5b894539003340a352ae Author: Takashi Iwai Date: Mon Dec 9 10:48:34 2019 +0100 ALSA: aaci: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The superfluous snd_pcm_lib_malloc_pages() and snd_pcm_lib_free_pages() calls are dropped, and the if block is flattened accordingly. Link: https://lore.kernel.org/r/20191209094943.14984-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9b2433a9c5b3921ea08c451e85c8783d7033825b Author: Takashi Iwai Date: Mon Dec 9 10:48:33 2019 +0100 ALSA: aoa: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params callbacks became superfluous and got dropped. Link: https://lore.kernel.org/r/20191209094943.14984-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2b68392e638dfa5cf4f7b558f62e3ea4def2e605 Author: Jani Nikula Date: Tue Dec 10 12:51:00 2019 +0200 drm/i915/dsi: add support for DSC Enable DSC for DSI, if specified in VBT. This still lacks DSC aware get config implementation, and therefore state checker will fail. Also mode valid is not there yet. v5: - add dsc get config call v4: - convert_rgb = true (Vandita) - ignore max cdclock check (Vandita) - rename pipe_config to crtc_state v3: - take compressed bpp into account v2: - Nuke conn_state->max_requested_bpc, it's not used on DSI Bspec: 49263 Cc: Vandita Kulkarni Cc: Ville Syrjälä Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/e0136299e03c582238523189f6951eeb08daed98.1575974743.git.jani.nikula@intel.com commit c2bb35e99f4b426efdd28011655bd67ca86749b5 Author: Vandita Kulkarni Date: Tue Dec 10 12:50:59 2019 +0200 drm/i915/dsi: Fix state mismatch warns for horizontal timings with DSC When DSC is enabled consider the compression ratio that was used during horizontal timing calculations. This may still lead to warns due to rounding errors in the round-trip. v2 by Jani: - rebase on top of the more generic dsc state readout Signed-off-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/c2481aaf67ea396aa4698cd2d8e23d19ec4f4ecf.1575974743.git.jani.nikula@intel.com commit 53693f02d80e0a909e76c2a25f8aac8515f959db Author: Jani Nikula Date: Tue Dec 10 12:50:58 2019 +0200 drm/i915/dsi: account for DSC in horizontal timings When DSC is enabled, we need to adjust the horizontal timings to account for the compressed (and therefore reduced) link speed. The compressed frequency ratio simplifies down to the ratio between compressed and non-compressed bpp. Bspec: 49263 Suggested-by: Vandita Kulkarni Cc: Vandita Kulkarni Cc: Ville Syrjälä Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/fecebdc2719dd0c78eaf8f4d3225bb185956d7db.1575974743.git.jani.nikula@intel.com commit 38b898810ae92b2e78b47f513fe66bdd5687ed54 Author: Jani Nikula Date: Tue Dec 10 12:50:57 2019 +0200 drm/i915/dsi: use compressed pixel format with DSC When compression is enabled, configure the DSI transcoder to use compressed format. Suggested-by: Vandita Kulkarni Cc: Vandita Kulkarni Cc: Ville Syrjälä Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/0e58022ce5425560b3b31062c41de385a736c8b1.1575974743.git.jani.nikula@intel.com commit 0486513935ef95a3ce429323cac8148d58057913 Author: Jani Nikula Date: Tue Dec 10 12:50:56 2019 +0200 drm/i915/dsi: take compression into account in afe_clk() Pass crtc_state to afe_clk() to be able to take compression into account in the computation. Once we enable compression, that is. Cc: Vandita Kulkarni Cc: Ville Syrjälä Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/a698780362b8d6955d115ef8bb6cf1f7aabbee00.1575974743.git.jani.nikula@intel.com commit adf1bd3dfbaedf7100b542b92fb085f89222a349 Author: Jani Nikula Date: Tue Dec 10 12:50:55 2019 +0200 drm/i915/dsi: use afe_clk() instead of intel_dsi_bitrate() We'll be expanding afe_clk() to take DSC into account. Switch to using it where DSC matters. Which is really everywhere that intel_dsi_bitrate() is currently used in ICL DSI code. The functional difference is that we round the result closest instead of down. Cc: Vandita Kulkarni Cc: Ville Syrjälä Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/b6c52b320daa8aaa0d79618ce714170f8f04ff67.1575974743.git.jani.nikula@intel.com commit 54ed6902cabc58ae58643b7d06cafa4ed5540e6d Author: Jani Nikula Date: Tue Dec 10 12:50:54 2019 +0200 drm/i915/dsi: abstract afe_clk calculation We'll make more use of it in the future. Cc: Vandita Kulkarni Cc: Ville Syrjälä Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/0341fdc13260625150315b0b57a4227eb766c50f.1575974743.git.jani.nikula@intel.com commit 50003bf50d32f3ff8ead40d6d68ee5e91a693e20 Author: Jani Nikula Date: Tue Dec 10 12:50:53 2019 +0200 drm/i915/dsi: set pipe_bpp on ICL configure config The ICL DSI pipe_bpp currently comes from compute_baseline_pipe_bpp(). Fix it. Cc: Vandita Kulkarni Cc: Ville Syrjälä Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/191f5c4fa5f4af29d4bf7e30bb35f45ce05b33f0.1575974743.git.jani.nikula@intel.com commit fbacb15ea814e7badb57ebc4015d6542290d0ff8 Author: Jani Nikula Date: Tue Dec 10 12:50:52 2019 +0200 drm/i915/dsc: add basic hardware state readout support Add basic hardware state readout for DSC, and check the most relevant details in the state checker. v2: - check for DSC power before reading its state - check if source supports DSC at all As a side effect, this should also get the power domains for the enabled DSC on takeover, and subsequently disable DSC if it's not needed. Cc: Manasi Navare Cc: Vandita Kulkarni Reviewed-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/3fb018cf9bd9a4c275aab389b6ec0f2a4e938bb9.1575974743.git.jani.nikula@intel.com commit deaaff49198d04c197a95bceac95efc8534f6c04 Author: Jani Nikula Date: Tue Dec 10 12:50:51 2019 +0200 drm/i915/dsc: make DSC source support helper generic Move intel_dp_source_supports_dsc() from intel_dp.c as intel_dsc_source_support() in intel_vdsc.c. The DSC source support is more about DSC than about DP, and will be needed for DP independent code. Cc: Manasi Navare Cc: Vandita Kulkarni Reviewed-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/6c9f646090913290fb00efd46a4332421bf95930.1575974743.git.jani.nikula@intel.com commit a8779927fd86c91f5400bfcbccfa018a667d8350 Author: John Stultz Date: Tue Dec 3 17:26:41 2019 +0000 kselftests: Add dma-heap test Add very trivial allocation and import test for dma-heaps, utilizing the vgem driver as a test importer. A good chunk of this code taken from: tools/testing/selftests/android/ion/ionmap_test.c Originally by Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Vincent Donnefort Cc: Sudipto Paul Cc: Andrew F. Davis Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: Hridya Valsaraju Cc: Sandeep Patil Cc: Hillf Danton Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Reviewed-by: Benjamin Gaignard Reviewed-by: Brian Starkey Acked-by: Sandeep Patil Acked-by: Laura Abbott Tested-by: Ayan Kumar Halder Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20191203172641.66642-6-john.stultz@linaro.org commit b61614ec318aae0c77ecd2816878d851dd61d9a6 Author: John Stultz Date: Tue Dec 3 17:26:40 2019 +0000 dma-buf: heaps: Add CMA heap to dmabuf heaps This adds a CMA heap, which allows userspace to allocate a dma-buf of contiguous memory out of a CMA region. This code is an evolution of the Android ION implementation, so thanks to its original author and maintainters: Benjamin Gaignard, Laura Abbott, and others! NOTE: This patch only adds the default CMA heap. We will enable selectively adding other CMA memory regions to the dmabuf heaps interface with a later patch (which requires a dt binding) Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Vincent Donnefort Cc: Sudipto Paul Cc: Andrew F. Davis Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: Hridya Valsaraju Cc: Sandeep Patil Cc: Hillf Danton Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Reviewed-by: Benjamin Gaignard Reviewed-by: Brian Starkey Acked-by: Sandeep Patil Acked-by: Laura Abbott Tested-by: Ayan Kumar Halder Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20191203172641.66642-5-john.stultz@linaro.org commit efa04fefebbd724ffda7f49e42d057a7217c45b0 Author: John Stultz Date: Tue Dec 3 17:26:39 2019 +0000 dma-buf: heaps: Add system heap to dmabuf heaps This patch adds system heap to the dma-buf heaps framework. This allows applications to get a page-allocator backed dma-buf for non-contiguous memory. This code is an evolution of the Android ION implementation, so thanks to its original authors and maintainters: Rebecca Schultz Zavin, Colin Cross, Laura Abbott, and others! Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Vincent Donnefort Cc: Sudipto Paul Cc: Andrew F. Davis Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: Hridya Valsaraju Cc: Sandeep Patil Cc: Hillf Danton Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Reviewed-by: Benjamin Gaignard Reviewed-by: Brian Starkey Acked-by: Sandeep Patil Acked-by: Laura Abbott Tested-by: Ayan Kumar Halder Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20191203172641.66642-4-john.stultz@linaro.org commit 5248eb12fea890a03b4cdc3ef546d6319d4d9b73 Author: John Stultz Date: Tue Dec 3 17:26:38 2019 +0000 dma-buf: heaps: Add heap helpers Add generic helper dmabuf ops for dma heaps, so we can reduce the amount of duplicative code for the exported dmabufs. This code is an evolution of the Android ION implementation, so thanks to its original authors and maintainters: Rebecca Schultz Zavin, Colin Cross, Laura Abbott, and others! Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Vincent Donnefort Cc: Sudipto Paul Cc: Andrew F. Davis Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: Hridya Valsaraju Cc: Sandeep Patil Cc: Hillf Danton Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Reviewed-by: Benjamin Gaignard Reviewed-by: Brian Starkey Acked-by: Sandeep Patil Acked-by: Laura Abbott Tested-by: Ayan Kumar Halder Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20191203172641.66642-3-john.stultz@linaro.org commit c02a81fba74fe3488ad6b08bfb5a1329005418f8 Author: Andrew F. Davis Date: Tue Dec 3 17:26:37 2019 +0000 dma-buf: Add dma-buf heaps framework This framework allows a unified userspace interface for dma-buf exporters, allowing userland to allocate specific types of memory for use in dma-buf sharing. Each heap is given its own device node, which a user can allocate a dma-buf fd from using the DMA_HEAP_IOC_ALLOC. This code is an evoluiton of the Android ION implementation, and a big thanks is due to its authors/maintainers over time for their effort: Rebecca Schultz Zavin, Colin Cross, Benjamin Gaignard, Laura Abbott, and many other contributors! Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Vincent Donnefort Cc: Sudipto Paul Cc: Andrew F. Davis Cc: Christoph Hellwig Cc: Chenbo Feng Cc: Alistair Strachan Cc: Hridya Valsaraju Cc: Sandeep Patil Cc: Hillf Danton Cc: Dave Airlie Cc: dri-devel@lists.freedesktop.org Reviewed-by: Brian Starkey Acked-by: Sandeep Patil Signed-off-by: Andrew F. Davis Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20191203172641.66642-2-john.stultz@linaro.org commit 2d15f3925a4b508b6ad10078bd324da1e95960a7 Author: Jani Nikula Date: Tue Dec 10 12:50:50 2019 +0200 drm/i915/dsc: add support for computing and writing PPS for DSI encoders Add DSI specific computation and transmission to display of PPS. With hopes that this approach will work for both DP and DSI encoders. Cc: Manasi Navare Cc: Vandita Kulkarni Cc: Ville Syrjälä Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/461db10b1f4d76625625a9f2b1e3d932fff42799.1575974743.git.jani.nikula@intel.com commit c42c38ec307b6fb81c5cb213a8f082e03ffbe166 Author: Jani Nikula Date: Tue Dec 10 12:50:49 2019 +0200 drm/i915/dsc: move slice height calculation to encoder Turns out this isn't compatible with DSI, where we use the value from VBT. No functional changes. Cc: Manasi Navare Cc: Vandita Kulkarni Cc: Ville Syrjälä Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/3dd689688a51daff26088eaf6feac27f8b9f5ebc.1575974743.git.jani.nikula@intel.com commit 7a7b5be96fb66febb50ef001c0e5d20d55c0c34b Author: Jani Nikula Date: Tue Dec 10 12:50:48 2019 +0200 drm/i915/dsc: move DP specific compute params to intel_dp.c Turns out future DSI specific parameters aren't workable with the approach of having the encoder specific functions in intel_vdsc.c. Make intel_dsc_compute_params() a helper that does the encoder independent parts, and have encoder code call it. Move intel_dsc_dp_compute_params() to intel_dp.c as intel_dp_dsc_compute_params(). No functional changes. v2: Rename pipe_config to crtc_state while at it. Cc: Manasi Navare Cc: Vandita Kulkarni Cc: Ville Syrjälä Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/620688ec302f7f49cc539c6c1653bfaf6092fce0.1575974743.git.jani.nikula@intel.com commit 1bf2f3bf29a97037e695cc3e8695746fd8d2cde0 Author: Jani Nikula Date: Tue Dec 10 12:50:47 2019 +0200 drm/i915/bios: add support for querying DSC details for encoder Add function for retrieving the DSC data for an encoder. Initially, this is DSI specific, as DP does not use VBT settings for DSC at all. It's also not very pretty. In the future we might have a pointer from encoder to the child device, which would make the child device list query here so much more sensible. v3: - use crtc_state instead of pipe_config - return true by default from intel_bios_get_dsc_params() - expand the comment about rc_buffer_block_size and rc_buffer_size v2: - make more robust, debug log errors better Bspec: 29885 Cc: Vandita Kulkarni Cc: Ville Syrjälä Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/b895c349d964d70e4cad26f12a629ea1898bfcc2.1575974743.git.jani.nikula@intel.com commit 6e0d46e91efd4440e00a1c5380bf9a2f933529b8 Author: Jani Nikula Date: Tue Dec 10 12:50:46 2019 +0200 drm/i915/bios: parse compression parameters block Check for child devices that specify compression, and store the device specific compression parameters in the display device data struct for later use. Warn if compression is requested but not available. Use fairly rigid checks for compression data for starters. These can be made more dynamic later. Log about DSC presence in DDI port parse, though this is not universal across platforms or port types (DSI). v2: amended debug logging Bspec: 29885 Cc: Vandita Kulkarni Cc: Ville Syrjälä Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/357d685ba047faf2285138c2f7014a8dee9a12b7.1575974743.git.jani.nikula@intel.com commit d1dad6f43334f8ea93b76953cef0703f8bf9d42e Author: Jani Nikula Date: Tue Dec 10 12:50:45 2019 +0200 drm/i915/bios: pass devdata to parse_ddi_port Allow accessing the parent structure later on. Drop const for allowing future modification as well. Cc: Vandita Kulkarni Cc: Ville Syrjälä Reviewed-by: Vandita Kulkarni Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/3318b09aaccbbe141e233ca510d581b421259a2a.1575974743.git.jani.nikula@intel.com commit 809b3c51e65b68025306b1659cea7e1ee43774d7 Author: Amit Kucheria Date: Fri Nov 1 00:07:37 2019 +0530 arm64: dts: msm8916: thermal: Add interrupt support Register upper-lower interrupt for the tsens controller. Signed-off-by: Amit Kucheria Link: https://lore.kernel.org/r/88eff964b708c8aff57b24370d2e14389ace09e9.1572526427.git.amit.kucheria@linaro.org Signed-off-by: Bjorn Andersson commit bf587f8934c8d3de6b559caaa08772f119e960cd Author: Li Jun Date: Thu Dec 5 08:06:28 2019 +0000 arm64: dts: imx8mn-evk: enable usb1 and typec support USB1 port has typec connector with power delivery support: - Dual data role: host and device. - Dual power role: source and sink, prefer power sink. Signed-off-by: Li Jun Signed-off-by: Shawn Guo commit d51cb99cf33f6a8e9688f74d6a3a1a70bf7ae766 Author: Li Jun Date: Thu Dec 5 08:06:23 2019 +0000 arm64: dts: imx8mn: Remove setting for IMX8MN_CLK_USB_CORE_REF Since IMX8MN_CLK_USB_CORE_REF is not used at all, so remove the setting for it. Signed-off-by: Li Jun Signed-off-by: Shawn Guo commit 134d43bb1ff09a696996f16ed8b28d404b770c8a Author: Li Jun Date: Thu Dec 5 08:06:17 2019 +0000 clk: imx8mn: correct the usb1_ctrl parent to be usb_bus Per latest imx8mn datasheet of CCM, the parent of usb1_ctrl_root_clk should be usb_bus. Signed-off-by: Li Jun Signed-off-by: Shawn Guo commit a3d1e7eb5abe3aa1095bc75d1a6760d3809bd672 Author: Al Viro Date: Mon Nov 18 09:43:10 2019 -0500 simple_recursive_removal(): kernel-side rm -rf for ramfs-style filesystems two requirements: no file creations in IS_DEADDIR and no cross-directory renames whatsoever. Signed-off-by: Al Viro commit f4bd225f7cf4099d228a55008da95e42ec2efbd5 Author: Ioana Ciornei Date: Wed Dec 4 18:58:28 2019 +0200 arm64: dts: lx2160a: add RGMII phy nodes Annotate the EMDIO1 node and describe the 2 AR8035 RGMII PHYs. Also, add phy-handles for dpmac17 and dpmac18 to its associated PHY. The MAC is not capable to add the needed RGMII delays, thus the "rgmii-id" phy-connection-type is used. Signed-off-by: Ioana Ciornei Signed-off-by: Shawn Guo commit 6e1b8fae892daa7ffb48570264b8e43b3f807e9a Author: Ioana Ciornei Date: Wed Dec 4 18:58:27 2019 +0200 arm64: dts: lx2160a: add emdio1 node Add the External MDIO1 device node found in the WRIOP global memory region. This is needed for management of external PHYs. Signed-off-by: Ioana Ciornei Signed-off-by: Shawn Guo commit 68a2b3fddb3152d3b775f6020ca1586e40248d64 Author: Ashish Kumar Date: Wed Dec 4 16:28:18 2019 +0530 arm64: dts: ls1088a: Add QSPI support for NXP LS1088 Add QSPI node in dtsi(ls1088a), and dts(ls1088ardb, ls1088aqds) boards. Both ls1088ardb and ls1088aqds has two 64MB flash from SPANSION(s25fs512s). QUAD I/O is tested in case of read and single I/O is tested in case of write. Signed-off-by: Kuldeep Singh Signed-off-by: Ashish Kumar Signed-off-by: Shawn Guo commit d5cee6cd8b7293dd5ed52f4bc0bebb7faffb95cd Author: Ashish Kumar Date: Wed Dec 4 16:28:17 2019 +0530 arm64: dts: ls208x: Remove non-compatible driver device from qspi node Since device properties are different, so remove fsl, ls1021a-qspi. ls1021a-qspi is to be used only for Big-endian verion of QSPI controller Signed-off-by: Kuldeep Singh Signed-off-by: Ashish Kumar Signed-off-by: Shawn Guo commit 070b761d546209ca787b8a1964e4c5b804233856 Author: Ashish Kumar Date: Wed Dec 4 16:28:16 2019 +0530 arm64: dts: ls1046a: Update QSPI node properties of ls1046ardb Update the compatibles to use jedec,spi-nor. Also update the max-frequency to 50MHz and spi-tx-bus-width to 1. Align the QSPI node with other similar boards like(ls1088ardb, ls1046afrwy) as per bindings. Signed-off-by: Kuldeep Singh Signed-off-by: Ashish Kumar Signed-off-by: Shawn Guo commit a932cb23775b5af5c666627817d4a31e33560da2 Author: Kuldeep Singh Date: Wed Dec 4 16:28:15 2019 +0530 arm64: dts: ls1046a: Add QSPI node for ls1046afrwy This board has a single 64MB mt25qu512a flash. QUAD I/O read and single I/O write is tested. Signed-off-by: Kuldeep Singh Signed-off-by: Ashish Kumar Signed-off-by: Shawn Guo commit c77fae5ba09a6b46bc24ef9cea52650a3d59b807 Author: Ashish Kumar Date: Wed Dec 4 16:28:14 2019 +0530 arm64: dts: ls1028a: Add FlexSPI support Add fspi node property for LS1028A SoC for FlexSPI driver. Property added for FlexSPI controller and for the connected slave device for the LS1028ARDB and LS1028AQDS target. RDB and QDS are having one SPI-NOR flash device, mt35xu02g connected at CS0. This flash device "mt35xu02g" is tested for octal read Signed-off-by: Xiaowei Bao Signed-off-by: Ashish Kumar Signed-off-by: Shawn Guo commit 6e6eca2ee79a23329093cdf8d1cc0bd86128981f Author: Paul E. McKenney Date: Wed Nov 13 09:12:59 2019 -0800 doc: Fix typo "deference" to "dereference" Reported-by: Jens Axboe Signed-off-by: Paul E. McKenney commit 17f0da13873ba393a72f14d41ffc8ff388e38723 Author: Madhuparna Bhowmik Date: Mon Nov 11 23:41:22 2019 +0530 doc: Updated full list of RCU API in whatisRCU.rst This patch updates the list of RCU API in whatisRCU.rst. Signed-off-by: Madhuparna Bhowmik Tested-by: Amol Grover Tested-by: Phong Tran Signed-off-by: Paul E. McKenney commit 4af498306ffd8e29ed5c1ae544d01bc8c09c3f8e Author: Amol Grover Date: Thu Nov 7 12:02:41 2019 +0530 doc: Convert to rcubarrier.txt to ReST Convert rcubarrier.txt to rcubarrier.rst and add it to index.rst. Format file according to reST - Add headings and sub-headings - Add code segments - Add cross-references to quizes and answers Signed-off-by: Amol Grover Tested-by: Phong Tran Signed-off-by: Paul E. McKenney commit b00aedf978aa5c9a3c2d734fda5e51acfbceb5d6 Author: Amol Grover Date: Sat Nov 2 13:31:07 2019 +0530 doc: Convert to rcu_dereference.txt to rcu_dereference.rst This patch converts rcu_dereference.txt to rcu_dereference.rst and adds it to index.rst Signed-off-by: Amol Grover Signed-off-by: Paul E. McKenney commit 5e1bc932818f74082e8331b59aa550101ead08e0 Author: Phong Tran Date: Wed Nov 6 20:09:50 2019 +0700 doc: Convert whatisRCU.txt to .rst This commit updates whatisRCU.txt to the new .rst format. This change includes: - Formatting bullet lists - Adding literal blocks - Links from table of contents to corresponding sections - Links to external documents - Reformat quick quizzes Signed-off-by: Phong Tran Tested-by: Madhuparna Bhowmik [ tranmanphong: Apply Amol Grover feedback. ] Reviewed-by: Amol Grover Signed-off-by: Paul E. McKenney commit 6705cae433cffc37b183ded6ca9fe5c6d8ae8a9d Author: Madhuparna Bhowmik Date: Tue Oct 29 03:12:52 2019 +0530 doc: Converted NMI-RCU.txt to NMI-RCU.rst. This patch converts NMI-RCU from txt to rst format. Also adds NMI-RCU in the index.rst file. Signed-off-by: Madhuparna Bhowmik [ paulmck: Apply feedback from Phong Tran. ] Tested-by: Phong Tran Signed-off-by: Paul E. McKenney commit 9ffdd7982417e2e227e295c4dea9cec652a71983 Author: Madhuparna Bhowmik Date: Tue Oct 29 01:54:17 2019 +0530 doc: Convert arrayRCU.txt to arrayRCU.rst This patch converts arrayRCU from .txt to .rst format, and also adds it to the index.rst file. Signed-off-by: Madhuparna Bhowmik [ paulmck: Trimmed trailing whitespace. ] Tested-by: Phong Tran Tested-by: Amol Grover Signed-off-by: Paul E. McKenney commit 6767a88f44d3198a2f0359a7049c5af198a6359f Author: Peter Chen Date: Tue Dec 3 09:57:41 2019 +0800 ARM: configs: imx_v6_v7_defconfig: enable USB ACM It is used for USB CDC ACM function. Reviewed-by: Leonard Crestez Signed-off-by: Peter Chen Signed-off-by: Shawn Guo commit 7d00c4fb4faf71fdfb2533aecdd95a73d279dade Author: Fabio Estevam Date: Mon Dec 2 10:13:18 2019 -0300 ARM: dts: imx7ulp-com: Add initial support for i.MX7UP COM board The Embedded Artists COM board is based on NXP i.MX7ULP. It has a BD70528 PMIC from Rohm with discrete DCDC powering option and improved current observability (compared to the existing NXP i.MX7ULP EVK). Add the initial support for the board. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 838f8ed9a09422358c9a5c9750c576bacaa8cc29 Author: Fabio Estevam Date: Mon Dec 2 10:13:17 2019 -0300 dt-bindings: arm: fsl: Document i.MX7ULP Embedded Artists COM board Add an entry for the Embedded Artists i.MX7ULP COM board. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 8c8d09e24d4556517a53cbe6cfd0e545fdbcde22 Author: Guido Günther Date: Mon Nov 25 15:50:06 2019 +0100 dt-bindings: mxsfb: Add compatible for iMX8MQ NXP's iMX8MQ has an LCDIF as well. Signed-off-by: Guido Günther Reviewed-by: Fabio Estevam Acked-by: Rob Herring Signed-off-by: Shawn Guo commit c21939998802b48e7afd0c0568193f6e4e4954f8 Author: Shahjada Abul Husain Date: Tue Dec 10 16:25:33 2019 +0530 cxgb4: add support for high priority filters T6 has a separate region known as high priority filter region that allows classifying packets going through ULD path. So, query firmware for HPFILTER resources and enable the high priority offload filter support when it is available. Signed-off-by: Shahjada Abul Husain Signed-off-by: David S. Miller commit 6525b5ef65fdaf8a782449fb5d585195b573c2c1 Author: Chen Wandun Date: Tue Dec 10 18:24:50 2019 +0800 enetc: remove variable 'tc_max_sized_frame' set but not used Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/freescale/enetc/enetc_qos.c: In function enetc_setup_tc_cbs: drivers/net/ethernet/freescale/enetc/enetc_qos.c:195:6: warning: variable tc_max_sized_frame set but not used [-Wunused-but-set-variable] Fixes: c431047c4efe ("enetc: add support Credit Based Shaper(CBS) for hardware offload") Signed-off-by: Chen Wandun Signed-off-by: David S. Miller commit ca866ee825911cb70e64ad5b33ac73d4ab924c1f Author: Jakub Kicinski Date: Mon Dec 9 21:04:01 2019 -0800 nfp: add support for TLV device stats Device stats are currently hard coded in the PCI BAR0 layout. Add a ability to read them from the TLV area instead. Names for the stats are maintained by the driver, and their meaning documented. This allows us to more easily add and remove device stats. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 5000b28b0b1a34144b39376318cafb8c2a0f79fd Author: Kuniyuki Iwashima Date: Tue Dec 10 02:41:48 2019 +0000 tcp: Cleanup duplicate initialization of sk->sk_state. When a TCP socket is created, sk->sk_state is initialized twice as TCP_CLOSE in sock_init_data() and tcp_init_sock(). The tcp_init_sock() is always called after the sock_init_data(), so it is not necessary to update sk->sk_state in the tcp_init_sock(). Before v2.1.8, the code of the two functions was in the inet_create(). In the patch of v2.1.8, the tcp_v4/v6_init_sock() were added and the code of initialization of sk->state was duplicated. Signed-off-by: Kuniyuki Iwashima Signed-off-by: David S. Miller commit 4caefbce06d138306ef4e9f635e5b02b62d56911 Author: Michael Walle Date: Tue Dec 10 01:15:37 2019 +0100 enetc: add software timestamping Provide a software TX timestamp and add it to the ethtool query interface. skb_tx_timestamp() is also needed if one would like to use PHY timestamping. Signed-off-by: Michael Walle Signed-off-by: David S. Miller commit bb9d8454bb0fed028558d1e66b12d50db5e43e06 Merge: 08cbc75f9602 16ad3f4022bb Author: David S. Miller Date: Tue Dec 10 17:31:15 2019 -0800 Merge branch 'tipc-introduce-variable-window-congestion-control' Jon Maloy says: ==================== tipc: introduce variable window congestion control We improve thoughput greatly by introducing a variety of the Reno congestion control algorithm at the link level. ==================== Signed-off-by: David S. Miller commit 16ad3f4022bb53c7541a0bf0410b32d0231ebef9 Author: Jon Maloy Date: Tue Dec 10 00:52:46 2019 +0100 tipc: introduce variable window congestion control We introduce a simple variable window congestion control for links. The algorithm is inspired by the Reno algorithm, covering both 'slow start', 'congestion avoidance', and 'fast recovery' modes. - We introduce hard lower and upper window limits per link, still different and configurable per bearer type. - We introduce a 'slow start theshold' variable, initially set to the maximum window size. - We let a link start at the minimum congestion window, i.e. in slow start mode, and then let is grow rapidly (+1 per rceived ACK) until it reaches the slow start threshold and enters congestion avoidance mode. - In congestion avoidance mode we increment the congestion window for each window-size number of acked packets, up to a possible maximum equal to the configured maximum window. - For each non-duplicate NACK received, we drop back to fast recovery mode, by setting the both the slow start threshold to and the congestion window to (current_congestion_window / 2). - If the timeout handler finds that the transmit queue has not moved since the previous timeout, it drops the link back to slow start and forces a probe containing the last sent sequence number to the sent to the peer, so that this can discover the stale situation. This change does in reality have effect only on unicast ethernet transport, as we have seen that there is no room whatsoever for increasing the window max size for the UDP bearer. For now, we also choose to keep the limits for the broadcast link unchanged and equal. This algorithm seems to give a 50-100% throughput improvement for messages larger than MTU. Suggested-by: Xin Long Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit d3b09995ab930df225929b4153b7187f1bb8a396 Author: Jon Maloy Date: Tue Dec 10 00:52:45 2019 +0100 tipc: eliminate more unnecessary nacks and retransmissions When we increase the link tranmsit window we often observe the following scenario: 1) A STATE message bypasses a sequence of traffic packets and arrives far ahead of those to the receiver. STATE messages contain a 'peers_nxt_snt' field to indicate which was the last packet sent from the peer. This mechanism is intended as a last resort for the receiver to detect missing packets, e.g., during very low traffic when there is no packet flow to help early loss detection. 3) The receiving link compares the 'peer_nxt_snt' field to its own 'rcv_nxt', finds that there is a gap, and immediately sends a NACK message back to the peer. 4) When this NACKs arrives at the sender, all the requested retransmissions are performed, since it is a first-time request. Just like in the scenario described in the previous commit this leads to many redundant retransmissions, with decreased throughput as a consequence. We fix this by adding two more conditions before we send a NACK in this sitution. First, the deferred queue must be empty, so we cannot assume that the potential packet loss has already been detected by other means. Second, we check the 'peers_snd_nxt' field only in probe/ probe_reply messages, thus turning this into a true mechanism of last resort as it was really meant to be. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit 02288248b051ae9a9438278148f44bdfb0a4068b Author: Jon Maloy Date: Tue Dec 10 00:52:44 2019 +0100 tipc: eliminate gap indicator from ACK messages When we increase the link send window we sometimes observe the following scenario: 1) A packet #N arrives out of order far ahead of a sequence of older packets which are still under way. The packet is added to the deferred queue. 2) The missing packets arrive in sequence, and for each 16th of them an ACK is sent back to the receiver, as it should be. 3) When building those ACK messages, it is checked if there is a gap between the link's 'rcv_nxt' and the first packet in the deferred queue. This is always the case until packet number #N-1 arrives, and a 'gap' indicator is added, effectively turning them into NACK messages. 4) When those NACKs arrive at the sender, all the requested retransmissions are done, since it is a first-time request. This sometimes leads to a huge amount of redundant retransmissions, causing a drop in max throughput. This problem gets worse when we in a later commit introduce variable window congestion control, since it drops the link back to 'fast recovery' much more often than necessary. We now fix this by not sending any 'gap' indicator in regular ACK messages. We already have a mechanism for sending explicit NACKs in place, and this is sufficient to keep up the packet flow. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit 907aa265fde6589b8059dc51649c6d1f49ade2f3 Author: Sam Ravnborg Date: Tue Dec 10 20:47:58 2019 +0100 drm/drm_panel: fix EXPORT of drm_panel_of_backlight Fix link failure for module builds of panels. The conditional compilation around drm_panel_of_backlight() was wrong for a module build. Fix it using IS_ENABLED(). Signed-off-by: Sam Ravnborg Reviewed-by: Linus Walleij Fixes: 152dbdeab1b2 ("drm/panel: add backlight support") Cc: Sam Ravnborg Cc: Laurent Pinchart Cc: Thierry Reding Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Cc: Maxime Ripard Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20191210194758.24087-1-sam@ravnborg.org commit bdf03299248916640a835a05d32841bb3d31912d Author: Jaegeuk Kim Date: Tue Dec 3 15:53:16 2019 -0800 f2fs: call f2fs_balance_fs outside of locked page Otherwise, we can hit deadlock by waiting for the locked page in move_data_block in GC. Thread A Thread B - do_page_mkwrite - f2fs_vm_page_mkwrite - lock_page - f2fs_balance_fs - mutex_lock(gc_mutex) - f2fs_gc - do_garbage_collect - ra_data_block - grab_cache_page - f2fs_balance_fs - mutex_lock(gc_mutex) Fixes: 39a8695824510 ("f2fs: refactor ->page_mkwrite() flow") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8784692d2800c91330c8f8b6158204dedee97d6d Author: Abhishek Pandit-Subedi Date: Wed Nov 27 14:39:09 2019 -0800 ARM: dts: rockchip: Add brcm bluetooth for rk3288-veyron This enables the Broadcom uart bluetooth driver on uart0 and gives it ownership of its gpios. In order to use this, you must enable the following kconfig options: - CONFIG_BT_HCIUART_BCM - CONFIG_SERIAL_DEV This is applicable to rk3288-veyron series boards that use the bcm43540 wifi+bt chips. As part of this change, also refactor the pinctrl across the various boards. All the boards using broadcom bluetooth shouldn't touch the bt_dev_wake pin. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20191127223909.253873-2-abhishekpandit@chromium.org Signed-off-by: Heiko Stuebner commit 854bb48018d5da261d438b2232fa683bdb553979 Author: Aristeu Rozanski Date: Wed Dec 4 16:23:25 2019 -0500 EDAC: skx_common: downgrade message importance on missing PCI device Both skx_edac and i10nm_edac drivers are loaded based on the matching CPU being available which leads the module to be automatically loaded in virtual machines as well. That will fail due the missing PCI devices. In both drivers the first function to make use of the PCI devices is skx_get_hi_lo() will simply print EDAC skx: Can't get tolm/tohm for each CPU core, which is noisy. This patch makes it a debug message. Signed-off-by: Aristeu Rozanski Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20191204212325.c4k47p5hrnn3vpb5@redhat.com commit bc123a515cb76c432293a6c4b4765b5ec0c813cf Author: Armen Baloyan Date: Fri Dec 6 13:52:45 2019 -0800 PCI/P2PDMA: Add Intel SkyLake-E to the whitelist Intel SkyLake-E was successfully tested for p2pdma transactions spanning over a host bridge and PCI bridge with IOMMU on. Add it to the whitelist. Link: https://lore.kernel.org/r/1575669165-31697-1-git-send-email-abaloyan@gigaio.com Signed-off-by: Armen Baloyan Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit 6acc942c5eecad34a7623e01317f3d03d1e05462 Author: Daniel Vetter Date: Wed Dec 4 11:19:33 2019 +0100 drm/doc: Drop :c:func: markup Kernel sphinx has learned how to do that in commit d74b0d31dddeac2b44c715588d53d9a1e5b1158e Author: Jonathan Corbet Date: Thu Apr 25 07:55:07 2019 -0600 Docs: An initial automarkup extension for sphinx Unfortunately it hasn't learned that yet for structures, so we're stuck with the :c:type: noise for now still. Reviewed-by: Thierry Reding Cc: Jonathan Corbet Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191204101933.861169-1-daniel.vetter@ffwll.ch commit 0380c6846a4be705b2d5c964b01ba1e5aaa3f5df Author: Daniel Vetter Date: Wed Dec 4 11:00:11 2019 +0100 drm/atomic: Update docs around locking and commit sequencing Both locking and especially sequencing of nonblocking commits have evolved a lot. The details are all there, but I noticed that the big picture and connections have fallen behind a bit. Apply polish. Motivated by some review discussions with Thierry. v2: Review from Thierry Reviewed-by: Thierry Reding Cc: Thierry Reding Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191204100011.859468-1-daniel.vetter@ffwll.ch commit d8db60cb23e49a92cf8cada3297395c7fa50fdf8 Author: Paul Moore Date: Mon Dec 9 20:39:46 2019 -0500 selinux: ensure we cleanup the internal AVC counters on error in avc_insert() Fix avc_insert() to call avc_node_kill() if we've already allocated an AVC node and the code fails to insert the node in the cache. Fixes: fa1aa143ac4a ("selinux: extended permissions for ioctls") Reported-by: rsiddoji@codeaurora.org Suggested-by: Stephen Smalley Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit b2104ac0bd951a2887a03b09e2106fcff5fad94e Author: Stephen Smalley Date: Tue Dec 10 11:55:41 2019 -0500 security: only build lsm_audit if CONFIG_SECURITY=y The lsm_audit code is only required when CONFIG_SECURITY is enabled. It does not have a build dependency on CONFIG_AUDIT since audit.h provides trivial static inlines for audit_log*() when CONFIG_AUDIT is disabled. Hence, the Makefile should only add lsm_audit to the obj lists based on CONFIG_SECURITY, not CONFIG_AUDIT. Fixes: 59438b46471a ("security,lockdown,selinux: implement SELinux lockdown") Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit b03b016fe54edd1b527d749e139b2fc9407ac414 Author: Krzysztof Kozlowski Date: Thu Nov 21 04:21:09 2019 +0100 x86/Kconfig: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Borislav Petkov Cc: "H. Peter Anvin" Cc: Boris Ostrovsky Cc: Ingo Molnar Cc: Juergen Gross Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: x86-ml Cc: xen-devel@lists.xenproject.org Link: https://lkml.kernel.org/r/1574306470-10305-1-git-send-email-krzk@kernel.org commit 6aa71bb876d2261c33f605de71654bf0b2c2e9b8 Author: Luca Weiss Date: Mon Nov 4 22:23:02 2019 +0100 ARM: dts: msm8974-FP2: Introduce the wcnss remoteproc node Enable the remoteproc node and add the necessary pinctrl states. Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20191104212302.105469-2-luca@z3ntu.xyz Signed-off-by: Bjorn Andersson commit c7c0edecfba8b63d7a68e5f5c866b99bcd3d6a29 Author: Bjorn Andersson Date: Mon Nov 4 22:23:01 2019 +0100 ARM: dts: msm8974: Introduce the wcnss remoteproc node Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20191104212302.105469-1-luca@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 98073faf9f15681e54cbfd1eb3bd8d5a9dd23ac7 Author: Brian Masney Date: Thu Oct 24 06:31:40 2019 -0400 ARM: dts: qcom: msm8974: add interconnect nodes Add interconnect nodes that's needed to support bus scaling. Signed-off-by: Brian Masney Link: https://lore.kernel.org/r/20191024103140.10077-5-masneyb@onstation.org Signed-off-by: Bjorn Andersson commit a2cc991ed634a3c7d4a55ef78de710a56cf4ee2e Author: Brian Masney Date: Thu Oct 24 06:31:39 2019 -0400 ARM: dts: qcom: msm8974: add ocmem node Add ocmem node that is needed in order to support the GPU upstream. Signed-off-by: Brian Masney Link: https://lore.kernel.org/r/20191024103140.10077-4-masneyb@onstation.org Signed-off-by: Bjorn Andersson commit dd973b89ebba7246bb395b89bfec55deee24af2a Author: Brian Masney Date: Thu Oct 24 06:31:38 2019 -0400 ARM: qcom_defconfig: add anx78xx HDMI bridge support Add the Analogix anx78xx driver so that the external display over HDMI can be used on Nexus 5 phones. Reviewed-by: Georgi Djakov Signed-off-by: Brian Masney Link: https://lore.kernel.org/r/20191024103140.10077-3-masneyb@onstation.org Signed-off-by: Bjorn Andersson commit ff9f2ad403c24874a5765a7ddc965c9517cef181 Author: Brian Masney Date: Thu Oct 24 06:31:37 2019 -0400 ARM: qcom_defconfig: add msm8974 interconnect support Add interconnect support for msm8974-based SoCs in order to support the GPU on this platform. Reviewed-by: Georgi Djakov Signed-off-by: Brian Masney Link: https://lore.kernel.org/r/20191024103140.10077-2-masneyb@onstation.org Signed-off-by: Bjorn Andersson commit aeae948f6afb95f77efd11b9f95f44d2831bd95d Author: Lina Iyer Date: Fri Nov 15 15:11:54 2019 -0700 arm64: dts: qcom: setup PDC as the wakeup parent for TLMM on SDM845 PDC always-on interrupt controller can detect certain GPIOs even when the TLMM interrupt controller is powered off. Link the PDC as TLMM's wakeup parent. Signed-off-by: Lina Iyer Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1573855915-9841-12-git-send-email-ilina@codeaurora.org Signed-off-by: Bjorn Andersson commit 72b67ebf9d242d8d18545250f340c736d900f763 Author: Lina Iyer Date: Fri Nov 15 15:11:53 2019 -0700 arm64: dts: qcom: add PDC interrupt controller for SDM845 Add PDC interrupt controller device bindings for SDM845. Signed-off-by: Lina Iyer Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1573855915-9841-11-git-send-email-ilina@codeaurora.org Signed-off-by: Bjorn Andersson commit 05caa5bf9cab9983dd7a50428c46b7e617ba20d6 Author: Jeffrey Hugo Date: Wed Nov 6 20:59:48 2019 -0800 arm64: dts: qcom: msm8998: Fix tcsr syscon size The tcsr syscon region is really 0x40000 in size. We need access to the full region so that we can access the axi resets when managing the modem subsystem. Fixes: c7833949564e ("arm64: dts: qcom: msm8998: Add smem related nodes") Signed-off-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20191107045948.4341-1-jeffrey.l.hugo@gmail.com Signed-off-by: Bjorn Andersson commit 19b7caaa93e60a2ec52c0703aa391ab9e273a79f Author: Jeffrey Hugo Date: Wed Nov 6 20:33:13 2019 -0800 arm64: dts: qcom: msm8998: Add wifi node Add the wifi node and required reserved memory to enable the wlan hardware. Enable the wifi node in both the mtp and clamshell platforms after adding the relevant regulators for each platform. Signed-off-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20191107043313.4055-3-jeffrey.l.hugo@gmail.com Signed-off-by: Bjorn Andersson commit a21c954821356d85e6d5b89ca817ea360546dda2 Author: Jeffrey Hugo Date: Wed Nov 6 20:33:12 2019 -0800 arm64: dts: qcom: msm8998: Add anoc2 smmu node While there are several peripherals on the anoc2, most are not behind the smmu. However, the SoC integrated wlan block is behind the smmu, so we'll need to control the smmu inorder to enable wifi. Signed-off-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20191107043313.4055-2-jeffrey.l.hugo@gmail.com Signed-off-by: Bjorn Andersson commit ba3fc649636602dc7c244efa8d2efb9f6186921a Author: Roja Rani Yarubandi Date: Fri Nov 8 14:58:24 2019 +0530 arm64: dts: sc7180: Add qupv3_0 and qupv3_1 Add QUP SE instances configuration for sc7180. Signed-off-by: Roja Rani Yarubandi Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20191108092824.9773-14-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 0def3f14c565da427e25dd63fa07f807b63ce2aa Author: Taniya Das Date: Fri Nov 8 14:58:23 2019 +0530 arm64: dts: qcom: SC7180: Add node for rpmhcc clock driver Add node for rpmhcc clock driver. Signed-off-by: Taniya Das Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20191108092824.9773-13-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit b62e108da52d2940d450429ba2a943171e535780 Author: Kiran Gunda Date: Fri Nov 8 14:58:22 2019 +0530 arm64: dts: qcom: sc7180-idp: Add RPMh regulators Add the rpmh regulators for the sc7180 idp platform. This platform consists of PMIC PM6150 and PM6150l Reviewed-by: Stephen Boyd Signed-off-by: Kiran Gunda Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/20191108092824.9773-12-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit a727ec1232d9f2d5afa09f0cd1331730d1be19d6 Author: Kiran Gunda Date: Fri Nov 8 14:58:21 2019 +0530 arm64: dts: qcom: pm6150: Add PM6150/PM6150L PMIC peripherals Add PM6150/PM6150L peripherals such as PON, GPIOs, ADC and other PMIC infra modules. Signed-off-by: Kiran Gunda Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20191108092824.9773-11-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 0f9dc5f09fbde970d7308afc815b3c6eaf89989f Author: Kiran Gunda Date: Fri Nov 8 14:58:20 2019 +0530 arm64: dts: qcom: sc7180: Add SPMI PMIC arbiter device Add SPMI PMIC arbiter device to communicate with PMICs attached to SPMI bus. Signed-off-by: Kiran Gunda Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20191108092824.9773-10-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 22f185ee81d2aff0050e559831cb087776306764 Author: Maulik Shah Date: Fri Nov 8 14:58:19 2019 +0530 arm64: dts: qcom: sc7180: Add pdc interrupt controller Add pdc interrupt controller for sc7180 Signed-off-by: Maulik Shah Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20191108092824.9773-9-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit fec6359c28636930c60a1dfffc52bf2afe72fb1f Author: Maulik Shah Date: Fri Nov 8 14:58:16 2019 +0530 arm64: dts: qcom: sc7180: Add rpmh-rsc node Add device bindings for the application processor's rsc. The rsc contains the TCS that are used for communicating with the hardened resource accelerators on Qualcomm Technologies, Inc. (QTI) SoCs. Signed-off-by: Maulik Shah Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20191108092824.9773-6-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit e0abc5eb526ed44db7c49417a956f8599088bfdb Author: Maulik Shah Date: Fri Nov 8 14:58:15 2019 +0530 arm64: dts: qcom: sc7180: Add cmd_db reserved area Command_db provides mapping for resource key and address managed by remote processor. Add cmd_db reserved memory area. Signed-off-by: Maulik Shah Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20191108092824.9773-5-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit d66df6248a10baa351c4585b01c22aeec8b79c66 Author: Vivek Gautam Date: Fri Nov 8 14:58:14 2019 +0530 arm64: dts: sc7180: Add device node for apps_smmu Adding device node for APPS SMMU that is connected to devices such as display, video, usb, mmc, etc. on SC7180 chipset. Signed-off-by: Vivek Gautam Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20191108092824.9773-4-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 90db71e480708a8f40f63b3d5587dc9653ee01e2 Author: Rajendra Nayak Date: Fri Nov 8 14:58:13 2019 +0530 arm64: dts: sc7180: Add minimal dts/dtsi files for SC7180 soc Add skeletal sc7180 SoC dtsi and idp board dts files. Reviewed-by: Stephen Boyd Co-developed-by: Taniya Das Signed-off-by: Taniya Das Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/20191108092824.9773-3-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit f1cbee2d8732a20b094dda5ef62ce9b8d29070cb Author: Rajendra Nayak Date: Fri Nov 8 14:58:12 2019 +0530 dt-bindings: qcom: Add SC7180 bindings Add a SoC string 'sc7180' for the qualcomm SC7180 SoC. Also add a new board type 'idp' While at it, also sort the SoC and board names in alphabetical order, and also fix the weird space and tab combinations found in the file. Signed-off-by: Rajendra Nayak Reviewed-by: Vinod Koul Reviewed-by: Rob Herring Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20191108092824.9773-2-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit e68ca6b6fdd72124f38e876a083aac6045fbb08b Author: Amit Kucheria Date: Tue Nov 12 00:51:29 2019 +0530 arm64: dts: sdm845: thermal: Add critical interrupt support Register critical interrupts for each of the two tsens controllers Signed-off-by: Amit Kucheria Link: https://lore.kernel.org/r/c536e9cdb448bbad3441f6580fa57f1f921fb580.1573499020.git.amit.kucheria@linaro.org Signed-off-by: Bjorn Andersson commit c7b20ce5b44025dc1e4a45e529b960a952420397 Author: Lina Iyer Date: Fri Nov 15 15:11:55 2019 -0700 arm64: defconfig: enable PDC interrupt controller for Qualcomm SDM845 Enable PDC interrupt controller for SDM845 devices. The interrupt controller can detect wakeup capable interrupts when the SoC is in a low power state. Signed-off-by: Lina Iyer Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1573855915-9841-13-git-send-email-ilina@codeaurora.org Signed-off-by: Bjorn Andersson commit f27dbbda5900c20e07418c6893ca6e95b634f4ff Author: Bjorn Andersson Date: Sun Oct 20 20:56:03 2019 -0700 arm64: defconfig: Enable Qualcomm watchdog driver Enable the driver for the watchdog found in the application processor subsystem on most modern Qualcomm platforms. Tested-by: Vinod Koul Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson commit 2774e558151a6e325e1f9f278722479601319f78 Author: Bjorn Andersson Date: Sat Oct 19 12:58:12 2019 -0700 arm64: defconfig: Enable Qualcomm pseudo rng Most Qualcomm platforms contain a pseudo random number generator hardware block. Enable the driver for this block and also enable the interface for exposing this to userspace. Tested-by: Vinod Koul Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson commit 4ac0379f9cb1b7c7a1b184cd28f4787d010b7253 Author: Jeffrey Hugo Date: Thu Sep 26 16:02:09 2019 -0700 arm64: defconfig: Enable SN65DSI86 display bridge This enables display on the Lenovo Yoga C630 by connecting the DSI output from the SoC to the eDP input of the panel. Signed-off-by: Jeffrey Hugo Signed-off-by: Bjorn Andersson commit df614ece276c483e33de93f9146bb21345607390 Author: Jeffrey Hugo Date: Thu Sep 26 15:56:04 2019 -0700 arm64: defconfig: Enable QCA Bluetooth over UART This enables Bluetooth on the Lenovo Yoga C630. Signed-off-by: Jeffrey Hugo Signed-off-by: Bjorn Andersson commit a0238c8432a7eae5876d57ccb9cc4456d69e9ed3 Author: Bjorn Andersson Date: Fri Oct 11 16:44:02 2019 -0700 arm64: defconfig: Enable Qualcomm CPUfreq HW driver The Qualcomm CPUfreq HW provides CPU voltage and frequency scaling on many modern Qualcomm SoCs. Enable the driver for this hardware block to enable this functionality on the SDM845 platform. Tested-by: Vinod Koul Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson commit e0ff7f9fc34d306e18164c20d2b87c3ce42db0cb Author: Bjorn Andersson Date: Fri Oct 11 16:48:28 2019 -0700 arm64: defconfig: Enable Qualcomm socinfo driver The Qualcomm socinfo driver provides SoC information to userspace using the standard soc interface as well as a number of debugfs entries. Enable this to allow certain user space tools to acquire this information, as well as getting developers access to the information in debugfs that is useful when reporting bugs. Tested-by: Vinod Koul Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson commit 603ca8dc6213a4c35e3d0d1352f7b84e176f8f6c Author: Bjorn Andersson Date: Fri Oct 11 21:18:55 2019 -0700 arm64: defconfig: Enable Qualcomm SPI and QSPI controller Enable the drivers for GENI SPI and QSPI controllers found on the Qualcomm SDM845 platform, among others. Tested-by: Vinod Koul Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson commit 6fc73e3f7f2f6f04d019477b87200acae18d9c05 Author: Bjorn Andersson Date: Tue Oct 8 17:14:42 2019 -0700 arm64: defconfig: Enable Qualcomm remoteproc dependencies Enable the the power domains, reset controllers and remote block device memory access drivers necessary to boot the Audio, Compute and Modem DSPs on Qualcomm SDM845. None of the power domains are system critical, but needs to be builtin as the driver core prohibits probe deferal past late initcall. Reviewed-by: Vinod Koul Tested-by: Alex Elder Tested-by: Vinod Koul Signed-off-by: Bjorn Andersson commit 88452da92ba2b264a3922218c2cec13aac51c502 Author: Takashi Iwai Date: Tue Dec 10 15:57:27 2019 +0100 ALSA: hda: Use standard waitqueue for RIRB wakeup The HD-audio CORB/RIRB communication was programmed in a way that was documented in the reference in decades ago, which is essentially a polling in the waiter side. It's working fine but costs CPU cycles on some platforms that support only slow communications. Also, for some platforms that had unreliable communications, we put longer wait time (2 ms), which accumulate quite long time if you execute many verbs in a shot (e.g. at the initialization or resume phase). This patch attempts to improve the situation by introducing the standard waitqueue in the RIRB waiter side instead of polling. The test results on my machine show significant improvements. The time spent for "cat /proc/asound/card*/codec#*" were changed like: * Intel SKL + Realtek codec before the patch: 0.00user 0.04system 0:00.10elapsed 40.0%CPU after the patch: 0.00user 0.01system 0:00.10elapsed 10.0%CPU * Nvidia GP107GL + Nvidia HDMI codec before the patch: 0.00user 0.00system 0:02.76elapsed 0.0%CPU after the patch: 0.00user 0.00system 0:00.01elapsed 17.0%CPU So, for Intel chips, the total time is same, while the total time is greatly reduced (from 2.76 to 0.01s) for Nvidia chips. The only negative data here is the increase of CPU time for Nvidia, but this is the unavoidable cost for faster wakeups, supposedly. Link: https://lore.kernel.org/r/20191210145727.22054-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit d269b2e0ba528fb92851bd3d95adbe842d8768b3 Merge: e42617b825f8 6e8aeda224c8 Author: Takashi Iwai Date: Tue Dec 10 18:22:09 2019 +0100 Merge branch 'for-linus' into for-next Back-merge the 5.5-devel branch for fixing FireWire bugs. The upcoming PCM API update patchset relies on these. Signed-off-by: Takashi Iwai commit 3cc1430cdbca12044571e3849cd57ac2e0d695c1 Author: Mihail Atanassov Date: Tue Dec 10 14:48:49 2019 +0000 drm/bridge: panel: export drm_panel_bridge_connector The function was unexported and was causing link failures for pl111 (and probably the other user tve200) in a module build. Fixes: d383fb5f8add ("drm: get drm_bridge_panel connector via helper") Cc: Sam Ravnborg Cc: Laurent Pinchart Cc: Linux Walleij Reviewed-by: Laurent Pinchart Signed-off-by: Mihail Atanassov Link: https://patchwork.freedesktop.org/patch/msgid/20191210144834.27491-1-mihail.atanassov@arm.com commit 3b52093dc9175f48b275a02919149a2dff3a386d Author: Linus Walleij Date: Wed Dec 4 23:57:31 2019 +0100 rtc: ds1343: Do not hardcode SPI mode flags The current use of mode flags to us SPI_MODE_3 and SPI_CS_HIGH is fragile: it overwrites anything already assigned by the SPI core. Change it thusly: - Just |= the SPI_MODE_3 so we keep other flags - Assign ^= SPI_CS_HIGH since we might be active high already, and that is usually the case with GPIOs used for chip select, even if they are in practice active low. Add a comment clarifying why ^= SPI_CS_HIGH is the right choice here. Reported-by: Mark Brown Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191204225731.20306-1-linus.walleij@linaro.org Signed-off-by: Alexandre Belloni commit 3fa01d642fa7fc8b2ee2833155048d2d107da2e8 Author: Matt Roper Date: Thu Dec 5 14:48:48 2019 -0800 drm/i915/tgl: Program BW_BUDDY registers during display init Gen12 can improve bandwidth efficiency by pairing up memory requests with similar addresses. We need to program the BW_BUDDY1 and BW_BUDDY2 registers according to the memory configuration during display initialization to take advantage of this capability. The magic numbers we program here feel like something that could definitely change on future platforms, so let's use a table-based programming scheme to make this easy to extend in the future. v2: - Add separate table for Wa_1409767108. (Stan) - Reorder structure reduce size by a word. Page mask can still be up to 28 bits (even though current values are small) so we should keep it as a u32, but just using a u8 for DRAM type instead of the actual enum type saves space. (Lucas, Ville) - Rename function to tgl_bw_buddy_init() to be more precise about what it does. (Lucas) Bspec: 49189 Bspec: 49218 Bspec: 52890 Cc: Stanislav Lisovskiy Cc: Ville Syrjala Cc: Lucas De Marchi Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191205224848.76712-1-matthew.d.roper@intel.com Reviewed-by: Stanislav Lisovskiy commit 519d63702d0e710fd02dabce1370eaa24dfb5fc8 Author: Jean-Francois Dagenais Date: Wed Nov 27 20:56:12 2019 -0500 rtc: zynqmp: re-use rtc_time64_to_tm operation This allows a subsequent commit to spin_unlock sooner. Signed-off-by: Jean-Francois Dagenais Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/20191128015613.10003-1-jeff.dagenais@gmail.com Signed-off-by: Alexandre Belloni commit 94a25071301a898d8c603db2f05a0016eb7b7d28 Author: Alexandre Belloni Date: Tue Dec 10 14:46:53 2019 +0100 mailmap: Update email address for Alexandre Belloni Free Electrons is now Bootlin. Link: https://lore.kernel.org/r/20191210134653.2995661-1-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni commit 4d17363db021311d0b5ad533bc9c438ed3177d7c Author: Andreas Hellmich Date: Fri Nov 29 10:39:41 2019 +0100 staging: rtl8723bs: Fix line length Fix some line length errors. Co-developed-by: Annika Knepper Signed-off-by: Annika Knepper Signed-off-by: Andreas Hellmich Link: https://lore.kernel.org/r/20191129093939.2782-2-dy26hofu@stud.informatik.uni-erlangen.de Signed-off-by: Greg Kroah-Hartman commit 68468503e000d70f71695f5a0050957f66e51416 Author: Andreas Hellmich Date: Fri Nov 29 10:39:39 2019 +0100 staging: rtl8723bs: Fix spelling errors Fix spelling errors. Co-developed-by: Annika Knepper Signed-off-by: Annika Knepper Signed-off-by: Andreas Hellmich Link: https://lore.kernel.org/r/20191129093939.2782-1-dy26hofu@stud.informatik.uni-erlangen.de Signed-off-by: Greg Kroah-Hartman commit de7c18bd2764a5efff7a3bac0ac0247943ef2975 Author: Takashi Iwai Date: Tue Dec 10 15:13:56 2019 +0100 staging: bcm2835-audio: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210141356.18074-5-tiwai@suse.de Signed-off-by: Greg Kroah-Hartman commit 0a2eb63de28fe3aef3a42c00a27f80689d9ce662 Author: Takashi Iwai Date: Tue Dec 10 15:13:55 2019 +0100 staging: most: Drop superfluous ioctl PCM ops PCM core deals the empty ioctl field now as default. Let's kill the redundant lines. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210141356.18074-4-tiwai@suse.de Signed-off-by: Greg Kroah-Hartman commit 3ad10e575451cda0abc5498b614cbcdc10517ec9 Author: Takashi Iwai Date: Tue Dec 10 15:13:54 2019 +0100 staging: bcm2835-audio: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. The hw_params and hw_free callbacks became superfluous and dropped. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210141356.18074-3-tiwai@suse.de Signed-off-by: Greg Kroah-Hartman commit 7e6d24d9bca792fed090d7c1069bc16e4b04413c Author: Takashi Iwai Date: Tue Dec 10 15:13:53 2019 +0100 staging: most: Use managed buffer allocation Clean up the driver with the new managed buffer allocation API. Also remove the unnecessary checks of channels in hw_params callback as this is guaranteed by the hw constraints in anyway. After these cleanups, the hw_params and hw_free callbacks became empty, hence dropped. Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20191210141356.18074-2-tiwai@suse.de Signed-off-by: Greg Kroah-Hartman commit 1805ec67b12a12c794aee7ed46bd577748ee2a2c Author: Colin Ian King Date: Tue Dec 10 14:32:05 2019 +0000 drm/i915/selftests: fix uninitialized variable sum when summing up values Currently the variable sum is not uninitialized and hence will cause an incorrect result in the summation values. Fix this by initializing sum to the first item in the summation. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 3c7a44bbbfa7 ("drm/i915/selftests: Perform some basic cycle counting of MI ops") Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191210143205.338308-1-colin.king@canonical.com commit cf33e911f500f6e628f283e101c0240c79e0b5da Author: Chuhong Yuan Date: Fri Dec 6 00:06:55 2019 +0800 rtc: stm32: add missed clk_disable_unprepare in error path of resume The resume() forgets to call clk_disable_unprepare() when failed. Add the missed call to fix it. Signed-off-by: Chuhong Yuan Reviewed-by: Amelie Delaunay Link: https://lore.kernel.org/r/20191205160655.32188-1-hslester96@gmail.com Signed-off-by: Alexandre Belloni commit e83c6587c47caa2278aa3bd603b5a85eddc4cec9 Author: Xiongfeng Wang Date: Fri Dec 6 15:37:43 2019 +0800 tty: omap-serial: remove set but unused variable Fix the following warning: drivers/tty/serial/omap-serial.c: In function serial_omap_rlsi: drivers/tty/serial/omap-serial.c:496:16: warning: variable ch set but not used [-Wunused-but-set-variable] The character read is useless according to the table 23-246 of the omap4 TRM. So we can drop it. Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang Link: https://lore.kernel.org/r/1575617863-32484-1-git-send-email-wangxiongfeng2@huawei.com Signed-off-by: Greg Kroah-Hartman commit 3339fdf5742f7182d7a17fb48e2d7463f6a79580 Author: Thomas Zimmermann Date: Mon Dec 2 12:15:57 2019 +0100 drm/ast: Store primary-plane format in struct ast_crtc_state Reading the primary plane's framebuffer from the CRTC's atomic_flush() function is fragile as the plane state or framebuffer can be NULL. Instead, we let the plane's atomic_check() store the framebuffer format in the CRTC state. The CRTC always receives the framebuffer format that is currently programmed, or NULL if no mode has been set yet. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20191202111557.15176-8-tzimmermann@suse.de commit e7d70cd4948e543739e9859d2b4ab30448067d32 Author: Thomas Zimmermann Date: Mon Dec 2 12:15:56 2019 +0100 drm/ast: Store VBIOS mode info in struct ast_crtc_state After looking up VBIOS mode information in CRTC's atomic_check(), we can reuse it in atomic_flush(). No need for a second look-up. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20191202111557.15176-7-tzimmermann@suse.de commit 2acf6ce2c25fb71a56ad35fcb9a63c19b20a4f4e Merge: 2aae447a4c10 4e64ba3fd181 Author: Mark Brown Date: Tue Dec 10 13:27:14 2019 +0000 Merge branch 'for-5.5' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.6 commit 83be6a3ceb11bd1d5c8d83835b2a42f233198b67 Author: Thomas Zimmermann Date: Mon Dec 2 12:15:55 2019 +0100 drm/ast: Introduce struct ast_crtc_state AST-specific CRTC state can be placed in the new struct ast_crtc_state. The atomic check functions of the CRTC and the primary plane will store the VBIOS mode info and the framebuffer format here. The CRTC will consume these during atomic_flush(). Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20191202111557.15176-6-tzimmermann@suse.de commit ae46a57d52c265948761cc17a754f99b0c495473 Author: Thomas Zimmermann Date: Mon Dec 2 12:15:54 2019 +0100 drm/ast: Add plane atomic_check() functions Introducing atomic_check() for priamry and cursor plane. The functions validate the plane state and will later set format information for the CRTC's atomic_flush(). Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20191202111557.15176-5-tzimmermann@suse.de commit ae37025d14ac423419d97b5be5cf61d433b48bab Author: Thomas Zimmermann Date: Mon Dec 2 12:15:53 2019 +0100 drm/ast: Clean up arguments of register functions In preparation of an update of the primary-plane code, this patch changes the arguments of several register-setting functions. No functional changes are made. The function ast_set_dac_reg() has no effect and therefore gets removed entirely. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20191202111557.15176-4-tzimmermann@suse.de commit 751438bc0f10f75633144acd6ff145f7260706d5 Author: Wei Yongjun Date: Wed Nov 13 02:17:20 2019 +0000 rtc: mt6397: drop free_irq of devm_ allocated irq The devm_request_threaded_irq function allocates irq that is released when a driver detaches. Thus, there is no reason to explicitly call free_irq in probe function. Fixes: 851b87148aa2 ("rtc: mt6397: improvements of rtc driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20191113021720.9527-1-weiyongjun1@huawei.com Signed-off-by: Alexandre Belloni commit 2fbeec03e171654c5aec509bafee5523eea77f20 Author: Thomas Zimmermann Date: Mon Dec 2 12:15:52 2019 +0100 drm/ast: Enable and disable screen in primary-plane functions Enabling and disabling the screen used to be done in the register initialization and the DPMS function. None of these places is related to the screen's output. Now the primary plane's update and disable functions handle screen display state. The primary plane can now be switched off without displaying garbage. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20191202111557.15176-3-tzimmermann@suse.de commit 71d873cc99309ff68d2488d32094774c77537e50 Author: Thomas Zimmermann Date: Mon Dec 2 12:15:51 2019 +0100 drm/ast: Move modesetting code to CRTC's atomic_flush() When enabling the CRTC after waking up from a power-saving mode, the primary plane's framebuffer might be NULL, which leads to a stack trace as shown below. [ 632.624608] BUG: kernel NULL pointer dereference, address: 0000000000000048 [ 632.624631] #PF: supervisor read access in kernel mode [ 632.624639] #PF: error_code(0x0000) - not-present page [ 632.624647] PGD 0 P4D 0 [ 632.624654] Oops: 0000 [#1] SMP PTI [ 632.624662] CPU: 0 PID: 2082 Comm: gnome-shell Tainted: G E 5.4.0-rc7-1-default+ #114 [ 632.624673] Hardware name: Sun Microsystems SUN FIRE X2270 M2/SUN FIRE X2270 M2, BIOS 2.05 07/01/2010 [ 632.624689] RIP: 0010:ast_crtc_helper_atomic_enable+0x7d/0x680 [ast] [ 632.624698] Code: 48 8b 80 e0 02 00 00 4c 8b 60 10 31 c0 f3 48 ab 48 8b 83 78 04 00 00 4c 89 ef 48 8d 70 18 e8 9a e9 55 ce 48 8b 83 78 04 00 00 <49> 8b 7c 24 48 4c 89 ea 4c 8d 44 24 28 48 8d 4c 24 20 48 8d 70 18 [ 632.624718] RSP: 0018:ffffbe9ec123fa40 EFLAGS: 00010246 [ 632.624726] RAX: ffff95a13cfd3400 RBX: ffff95a13cf32000 RCX: 0000000000000000 [ 632.624735] RDX: 0000000000000000 RSI: ffff95a13cfd34e8 RDI: ffffbe9ec123fb40 [ 632.624744] RBP: ffffbe9ec123fb80 R08: 0000000000000000 R09: 0000000000000003 [ 632.624753] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 632.624762] R13: ffffbe9ec123fa70 R14: ffff95a13beb7000 R15: ffff95a13cf32800 [ 632.624772] FS: 00007f6d2763e140(0000) GS:ffff95a134000000(0000) knlGS:0000000000000000 [ 632.624782] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 632.624790] CR2: 0000000000000048 CR3: 00000001192f8004 CR4: 00000000000206f0 [ 632.624800] Call Trace: [ 632.624811] ? __lock_acquire+0x409/0x7c0 [ 632.624830] drm_atomic_helper_commit_modeset_enables+0x1af/0x200 [ 632.624840] drm_atomic_helper_commit_tail+0x32/0x70 [ 632.624849] commit_tail+0xc7/0x110 [ 632.624857] drm_atomic_helper_commit+0x121/0x130 [ 632.624867] drm_atomic_connector_commit_dpms+0xd7/0x100 [ 632.624878] set_property_atomic+0xaf/0x110 [ 632.624890] drm_mode_obj_set_property_ioctl+0xbb/0x190 [ 632.624899] ? drm_mode_obj_find_prop_id+0x40/0x40 [ 632.624909] drm_ioctl_kernel+0x86/0xd0 [ 632.624918] drm_ioctl+0x1e4/0x36b [ 632.624925] ? drm_mode_obj_find_prop_id+0x40/0x40 [ 632.624939] do_vfs_ioctl+0x4bd/0x6e0 [ 632.624949] ksys_ioctl+0x5e/0x90 [ 632.624957] __x64_sys_ioctl+0x16/0x20 [ 632.624966] do_syscall_64+0x5a/0x220 [ 632.624976] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 632.624984] RIP: 0033:0x7f6d2b0de387 [ 632.624991] Code: 00 00 90 48 8b 05 f9 9a 0c 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 c9 9a 0c 00 f7 d8 64 89 01 48 [ 632.625011] RSP: 002b:00007fffb49def38 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 632.625021] RAX: ffffffffffffffda RBX: 00007fffb49def70 RCX: 00007f6d2b0de387 [ 632.625030] RDX: 00007fffb49def70 RSI: 00000000c01864ba RDI: 0000000000000009 [ 632.625040] RBP: 00000000c01864ba R08: 0000000000000000 R09: 00000000c0c0c0c0 [ 632.625049] R10: 0000000000000030 R11: 0000000000000246 R12: 000055bc367eb920 [ 632.625058] R13: 0000000000000009 R14: 0000000000000002 R15: 0000000000000000 [ 632.625071] Modules linked in: ebtable_filter(E) ebtables(E) ip6table_filter(E) ip6_tables(E) iptable_filter(E) ip_tables(E) x_tables(E) af_packet(E) scsi_transport_iscsi(E) dmi_sysfs(E) msr(E) xfs(E) intel_powerclamp(E) coretemp(E) k) [ 632.625185] CR2: 0000000000000048 The STR is * start gdm and wait for it to switch off the display * wake up the display by pressing a key CRTC modesetting depends on the new state of the CRTC and the primary plane's framebuffer. The bugfix moves the modesetting code into the CRTC's atomic_flush() function, where it is protected from the plane's framebuffer being NULL. The CRTC's atomic-enable function, which is the modesetting's original location, still contains DPMS state handling. It's exactly the inverse of the atomic-disable function. v3: * protect modesetting from from fb == NULL v2: * do an atomic check for plane * reject invisible primary planes Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Fixes: b48e1b6ffd28 ("drm/ast: Add CRTC helpers for atomic modesetting") Cc: Gerd Hoffmann Cc: Dave Airlie Cc: Daniel Vetter Cc: "Y.C. Chen" Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191202111557.15176-2-tzimmermann@suse.de commit 2aae447a4c100d2a7b7cae26b1df8b329e730d8b Author: Pierre-Louis Bossart Date: Mon Dec 9 18:48:53 2019 -0600 ASoC: SOF: Intel: byt: fixup topology filename for BYT-CR On Baytrail-CR, SSP0 needs to be used instead of SSP2. The substitution is assumed to be done in the topology file. When Baytrail-CR is detected, add -ssp0 suffix to the topology file name so that the topology code picks up the correct file. Tested on Asus T100TAF Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191210004854.16845-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit aec3ff99ce4a02d9bbe8b7311136edc69bdb739d Author: Kuninori Morimoto Date: Tue Dec 10 09:34:52 2019 +0900 ASoC: soc-core: soc_set_name_prefix(): get component device_node at out of loop Component device_node is not related to codec_conf loop at soc_set_name_prefix(). This patch moves it to out of loop. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/87v9qpxbkj.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4702f99148dae94b00bcb7bbba6cd9ca01651e69 Author: Kuninori Morimoto Date: Tue Dec 10 09:34:48 2019 +0900 ASoC: soc-core: soc_set_name_prefix(): tidyup loop condition Current soc_set_name_prefix() for loop is checking both codec_conf pointer and its number for (...; i < card->num_configs && card->codec_conf; ...) But, if card->num_configs exists but card->codec_conf was NULL, it is just bug. This patch cleanups for loop condition. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/87wob5xbkn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit eaffeefbd042a44ca31f60f299a27d899aa4ec26 Author: Kuninori Morimoto Date: Tue Dec 10 09:34:44 2019 +0900 ASoC: soc-core: rename soc_link_init() to soc_init_pcm_runtime() soc-core is using soc_link_init(). It sounds like dai_link function, but it is for pcm_runtime. This patch renames soc_link_init() to soc_init_pcm_runtime(). Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/87y2vlxbkr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 626c2e57a33a7565af03b2eb95989c43be651a03 Author: Kuninori Morimoto Date: Tue Dec 10 09:34:40 2019 +0900 ASoC: soc-core: add missing return value check for soc_link_init() soc_link_init() returns error code, but snd_soc_bind_card() is not cheking it. This patch adds missing return value check for it. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/87zhg1xbkv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 46496acbe1c43cd26f5515b51b5d3c46a97d785d Author: Kuninori Morimoto Date: Tue Dec 10 09:34:36 2019 +0900 ASoC: soc-core: move soc_link_init() This patch moves soc_link_init() to upper side. This is prepare for its cleanup. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/871rtdyq5g.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit bfa0dd89536026e17b074eb2c42089f3455ea1a3 Author: Kuninori Morimoto Date: Tue Dec 10 09:34:32 2019 +0900 ASoC: soc-core: rename soc_link_dai_pcm_new() to soc_dai_pcm_new() soc_link_dai_pcm_new() sounds like dai_link function, but it is not related to it. This patch rename soc_link_dai_pcm_new() to soc_dai_pcm_new(). Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/8736dtyq5j.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 9e9c70a5dd0194f6a30a04d96dd8c1f6ff44f6c4 Author: Kuninori Morimoto Date: Tue Dec 10 09:34:27 2019 +0900 ASoC: soc-core: move soc_link_dai_pcm_new() This patch moves soc_link_dai_pcm_new() to upper side. This is prepare for its cleanup. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/874ky9yq5o.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 50cd9b5317d5593d0a33f4227f56ddcc1bf66604 Author: Kuninori Morimoto Date: Tue Dec 10 09:34:23 2019 +0900 ASoC: soc-core: rename snd_soc_remove_dai_link() to snd_soc_remove_pcm_runtime() Now soc-core and soc-topology is using snd_soc_remove_dai_link(). It removes pcm_runtime (= rtd) and disconnect it from card. The purpose is removing pcm_runtime, not dai_link. This patch renames function name. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/875zipyq5s.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0c04800424c42ec3fbe87422d3e04b5c978fc177 Author: Kuninori Morimoto Date: Tue Dec 10 09:34:19 2019 +0900 ASoC: soc-core: rename snd_soc_add_dai_link() to snd_soc_add_pcm_runtime() Now soc-core and soc-topology is using snd_soc_add_dai_link(). The abstract of this function is "create pcm_runtime from dai_link information and connect it to card". Thus, "add dai_link" is wrong/confusable naming. This patch renames function name. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/877e35yq5w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit d6f31e0e6d09594717ed21c7c9238d9fbdb30ccb Author: Kuninori Morimoto Date: Tue Dec 10 09:34:14 2019 +0900 ASoC: soc-core: move snd_soc_find_dai_link() snd_soc_find_dai_link() is soc-topology specific function. We don't need to have it at soc-core. This patch moves it to soc-topology.c Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/878snlyq61.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4468189ff307f294491628a49702a04de22bffb8 Author: Kuninori Morimoto Date: Tue Dec 10 09:34:08 2019 +0900 ASoC: soc-core: find rtd via dai_link pointer at snd_soc_get_pcm_runtime() Current snd_soc_get_pcm_runtime() is finding rtd by checking dai_link name. But, it is strange and waste of CPU power, because its user want to get from rtd from dai_link, not from dai_link name. This patch find rtd via dai_link pointer instead of its name. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/87a781yq67.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 94def8ea66be2ea9f6aac61549b6b5874bca6235 Author: Kuninori Morimoto Date: Tue Dec 10 09:34:01 2019 +0900 ASoC: soc-core: move snd_soc_get_pcm_runtime() This patch moves snd_soc_get_pcm_runtime() next to snd_soc_get_dai_substream(). This is prepare for snd_soc_get_pcm_runtime() cleanup. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/87blshyq6e.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8babfb7030573f7338b141d038c2094b7bb95034 Author: Kuninori Morimoto Date: Tue Dec 10 09:33:55 2019 +0900 ASoC: soc-core: remove snd_soc_get_dai_substream() No driver is using snd_soc_get_dai_substream(), and snd_soc_get_pcm_runtime() is enough for such purpose. We can revival it if it was needed in the future. Let's remove unused function. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/87d0cxyq6k.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit b553bd238da23041bf39110e58ee80f8efe034e0 Author: Kuninori Morimoto Date: Tue Dec 10 09:33:50 2019 +0900 ASoC: soc-core: remove snd_soc_disconnect_sync() Sound card disconnecting operation was needed when "sound driver" was unbinded without unbinding "sound card". In such case, sound driver should be stopped even though it was playbacking/capturing. Otherwise clock open/close counter mismatch happen. One headache was that we can't skip unbind in error case because unbind operation doesn't check return value from each drivers. snd_soc_disconnect_sync() was added for these purpose, and Renesas sound card only is used it. But now, ALSA SoC automatically disconnect sound card when sound driver was unbinded. Thus, snd_soc_disconnect_sync() is no longer needed. This patch removes it. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/87eexdyq6p.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit cc73390008c9a47c49ad73c459b5590fd4c4c890 Author: Kuninori Morimoto Date: Tue Dec 10 09:33:40 2019 +0900 ASoC: soc-core: remove dai_link_list ASoC is using many lists. Now, used dai_link is listed to card as dai_link_list. [card]->[dai_link]->[dai_link]->... BTW, this "dai_link" is used to create "rtd". And this rtd is listed to card as rtd_list. [card]->[rtd]->[rtd]->... Here, each rtd has dai_link. This means, we can track all dai_link via rtd list. This patch removes card dai_link_list, and uses rtd_list instead of it. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/87fthtyq6z.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4f6250b82cb8f950a1b1bea62843a88bbb208187 Author: Kai Vehmanen Date: Mon Dec 9 18:48:51 2019 -0600 ASoC: SOF: Intel: add codec_mask module parameter Add a module parameter 'codec_mask' to filter out unwanted HDA codecs from driver probe. E.g. on most systems, codec_mask=4 will limit to HDMI audio and exclude any external HDA codecs. Similar to 'probe_mask' module parameter of snd-hda-intel. Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191210004854.16845-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b7c5986489b5c55ebebc430037dd4691a6bbc99c Author: Slawomir Blauciak Date: Mon Dec 9 18:48:50 2019 -0600 ASoC: SOF: ipc: channel map structures This change adds stream map and channel map structures used for channel re-routing and stream aggregation. Signed-off-by: Slawomir Blauciak Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191210004854.16845-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 433363e779ecb772c2e9ffea5c9f266115c24441 Author: Seppo Ingalsuo Date: Mon Dec 9 18:48:47 2019 -0600 ASoC: SOF: Add asynchronous sample rate converter topology support This patch adds into SOF topology the handling of ASRC DAPM type, adds the tokens to configure the ASRC, and implement component IPC into the driver. Signed-off-by: Seppo Ingalsuo Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191210004854.16845-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2bb040225d87df4a9d869dba6baddd3fa025d650 Author: Kamel Bouhara Date: Thu Dec 5 23:30:21 2019 +0100 ARM: dts: at91: rearrange kizbox dts using aliases nodes Use aliases nodes to easy kizbox dts readability. Signed-off-by: Kamel Bouhara Link: https://lore.kernel.org/r/20191205223021.1370083-1-kamel.bouhara@bootlin.com Signed-off-by: Alexandre Belloni commit eb41690c92a5a7aede60674ce1aac1751759e9f0 Author: Nicolas Ferre Date: Thu Dec 5 12:36:04 2019 +0100 ARM: dts: at91: sama5d27_som1_ek: add the microchip,sdcal-inverted on sdmmc0 Specify the SoC SDCAL pin connection that is used in the sama5d27c 128MiB SiP on the SAMA5D27 SOM1. This will put in place a software workaround that would reduce power consumption on all boards using this SoM, including the SAMA5D27 SOM1 EK. Uses property introduced in 5cd41fe89704 ("dt-bindings: sdhci-of-at91: add the microchip,sdcal-inverted property") Signed-off-by: Nicolas Ferre Link: https://lore.kernel.org/r/20191205113604.9000-1-nicolas.ferre@microchip.com Signed-off-by: Alexandre Belloni commit 9d39d86cd4af2b17b970d63307daad71f563d207 Author: Ingo van Lil Date: Tue Dec 3 15:21:47 2019 +0100 ARM: dts: at91: Reenable UART TX pull-ups Pull-ups for SAM9 UART/USART TX lines were disabled in a previous commit. However, several chips in the SAM9 family require pull-ups to prevent the TX lines from falling (and causing an endless break condition) when the transceiver is disabled. From the SAM9G20 datasheet, 32.5.1: "To prevent the TXD line from falling when the USART is disabled, the use of an internal pull up is mandatory.". This commit reenables the pull-ups for all chips having that sentence in their datasheets. Fixes: 5e04822f7db5 ("ARM: dts: at91: fixes uart pinctrl, set pullup on rx, clear pullup on tx") Signed-off-by: Ingo van Lil Cc: Peter Rosin Link: https://lore.kernel.org/r/20191203142147.875227-1-inguin@gmx.de Signed-off-by: Alexandre Belloni commit cad0a5c74e7a1760d90a41df8e6151a53a598676 Author: Thierry Reding Date: Fri Dec 6 15:06:53 2019 +0100 usb: host: xhci-tegra: Implement basic ELPG support This implements basic engine-level powergate support which allows the XUSB controller to be put into a low power mode on system sleep and get it out of that low power mode again on resume. Based on work by JC Kuo . Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20191206140653.2085561-11-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9ccae88e572b36a3ede1c2fe67cfd3f2b36e0610 Author: Thierry Reding Date: Fri Dec 6 15:06:52 2019 +0100 usb: host: xhci-tegra: Add XUSB controller context Define the offsets of the registers that need to be saved on suspend and restored on resume for the various NVIDIA Tegra generations supported by the XUSB driver. Based on work by JC Kuo . Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20191206140653.2085561-10-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5c4e8d3781bc00363183b639cf3b603bd16d3994 Author: Thierry Reding Date: Fri Dec 6 15:06:51 2019 +0100 usb: host: xhci-tegra: Add support for XUSB context save/restore The XUSB controller contains registers that need to be saved on suspend and restored on resume in addition to the XHCI specific registers. Add support for saving and restoring the XUSB specific context. Based on work by JC Kuo . Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20191206140653.2085561-9-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman commit 17926924be44b21556043a2faccc3b449110bd00 Author: Thierry Reding Date: Fri Dec 6 15:06:50 2019 +0100 usb: host: xhci-tegra: Enable runtime PM as late as possible A number of things can currently go wrong after the XUSB controller has been enabled, which means that it might need to be disabled again before it has ever been used. Avoid this by delaying runtime PM enablement until it's really required right before registers are accessed for the first time. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20191206140653.2085561-8-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman commit ecd0fbd12d0fb5ee030d97d5be44766552aba07c Author: Thierry Reding Date: Fri Dec 6 15:06:49 2019 +0100 usb: host: xhci-tegra: Reuse stored register base address The base address of the XUSB controller's registers is already stored in the HCD. Move assignment to the HCD fields to an earlier point so that they can be reused in the tegra_xusb_config() function. This avoids the need to pass the base address as an extra parameter, which in turn comes in handy in subsequent patches that need to call this function from the suspend/resume paths where these values are no longer readily available. Based on work by JC Kuo . Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20191206140653.2085561-7-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman commit 96d8f628f0b35e1c1d93340cd4d2cde1ed3b8d9f Author: Thierry Reding Date: Fri Dec 6 15:06:48 2019 +0100 usb: host: xhci-tegra: Extract firmware enable helper Extract a helper that enables message generation from the firmware. This removes clutter from tegra_xusb_probe() and will also come in useful for subsequent patches that introduce suspend/resume support. Based on work by JC Kuo . Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20191206140653.2085561-6-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman commit 482ba7a6b42fa87dc8fa7d8c6140a916d0506549 Author: Thierry Reding Date: Fri Dec 6 15:06:47 2019 +0100 usb: host: xhci-tegra: Use CNR as firmware ready indicator The Falcon CPU state is a suboptimal indicator for firmware readiness, since the Falcon can be in a running state if the firmware is handling port state changes or running other tasks. Instead, the driver should check the STS_CNR bit to determine whether or not the firmware has been successfully loaded and is ready for XHCI operation. Based on work by JC Kuo . Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20191206140653.2085561-5-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman commit ec12ac10c9a7e2f1edf15c488e54f4c813cf0f52 Author: Thierry Reding Date: Fri Dec 6 15:06:46 2019 +0100 usb: host: xhci-tegra: Avoid a fixed duration sleep Do not use a fixed duration sleep to wait for the DMA controller to become ready. Instead, poll the L2IMEMOP_RESULT register for the VLD flag to determine when the XUSB controller's DMA master is ready. Based on work by JC Kuo . Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20191206140653.2085561-4-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman commit 741d6e5d84f30266694ca23641f1d028b55f7f40 Author: Thierry Reding Date: Fri Dec 6 15:06:45 2019 +0100 usb: host: xhci-tegra: Separate firmware request and load Subsequent patches for system suspend/resume support will need to reload the firmware on resume. Since the firmware remains in system memory, the driver doesn't need to reload it from the filesystem. However, the XUSB controller will be reset across suspend/resume, so it needs to load the firmware into its microcontroller on resume. Split the firmware request and the firmware load code into two separate functions so that the driver can reuse the firmware in system memory to reload the microcontroller on resume. Based on work by JC Kuo . Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20191206140653.2085561-3-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman commit c763771504d158abefcdb965df632d09f7602e9f Author: Thierry Reding Date: Fri Dec 6 15:06:44 2019 +0100 usb: host: xhci-tegra: Fix "tega" -> "tegra" typo The tegra_xusb_mbox_regs structure was misspelled tega_xusb_mbox_regs. Fortunately this was done consistently so it didn't cause any issues. Reviewed-by: JC Kuo Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20191206140653.2085561-2-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman commit dbb7a6b48d07b5268ac9dfd6cef8d1bcbc35b303 Author: Bryan O'Donoghue Date: Thu Nov 28 13:43:58 2019 +0000 dt-bindings: connector: Improve the english of the initial description The description lacks a few indefinite articles when reading and as a result is a bit clunky to read. Introduce a few indefinite articles to appease the grammar gods. Cc: Andrzej Hajda Cc: Rob Herring Cc: Chanwoo Choi Cc: linux-usb@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20191128134358.3880498-3-bryan.odonoghue@linaro.org Signed-off-by: Greg Kroah-Hartman commit 145e6dd8a5c9db70f28326dc89df241823d681ce Author: Randy Dunlap Date: Fri Nov 22 08:49:04 2019 -0800 usb: drop comment about 2 uhci drivers Drop the ancient comment about 2 usb/uhci drivers since there are no longer 2 of them. Cc: Johan Hovold Cc: linux-usb@vger.kernel.org Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/5f93d906-4f5c-2a78-c1c7-36cf07e94bcc@infradead.org Signed-off-by: Greg Kroah-Hartman commit 03521794966c0123e45b84da5faa7382ad53cc16 Author: Geert Uytterhoeven Date: Fri Dec 6 14:28:49 2019 +0100 usb: host: ehci-sh: Remove unused platform data support ehci_sh_platdata was never used, remove it. It can be resurrected from git history when needed. This basically reverts commit 3e0c70d050c7ed6d ("usb: ehci-sh: Add PHY init function with platform data"). Signed-off-by: Geert Uytterhoeven Acked-by: Alan Stern Acked-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20191206132849.29406-1-geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit 03758d60265c773e1d06d436b99ee338f2ac55d6 Author: Viresh Kumar Date: Mon Nov 11 16:35:03 2019 +0530 opp: Replace list_kref with a local counter A kref or refcount isn't the right tool to be used here for counting number of devices that are sharing the static OPPs created for the OPP table. For example, we are reinitializing the kref again, after it reaches a value of 0 and frees the resources, if the static OPPs get added for the same OPP table structure (as the OPP table structure was never freed). That is messy and very unclear. This patch makes parsed_static_opps an unsigned integer and uses it to count the number of users of the static OPPs. The increment and decrement to parsed_static_opps is done under opp_table->lock now to make sure no races are possible if the OPP table is getting added and removed in parallel (which doesn't happen in practice, but can in theory). Signed-off-by: Viresh Kumar commit ba0033192145cbd4e70ef64552958b13d597eb9e Author: Viresh Kumar Date: Mon Nov 18 14:41:07 2019 +0530 opp: Free static OPPs on errors while adding them The static OPPs aren't getting freed properly, if errors occur while adding them. Fix that by calling _put_opp_list_kref() and putting their reference on failures. Fixes: 11e1a1648298 ("opp: Don't decrement uninitialized list_kref") Signed-off-by: Viresh Kumar commit 82c69bf58650e644c61aa2bf5100b63a1070fd2f Author: Chris Wilson Date: Mon Dec 9 02:32:15 2019 +0000 drm/i915/gt: Detect if we miss WaIdleLiteRestore In order to avoid confusing the HW, we must never submit an empty ring during lite-restore, that is we should always advance the RING_TAIL before submitting to stay ahead of the RING_HEAD. Normally this is prevented by keeping a couple of spare NOPs in the request->wa_tail so that on resubmission we can advance the tail. This relies on the request only being resubmitted once, which is the normal condition as it is seen once for ELSP[1] and then later in ELSP[0]. On preemption, the requests are unwound and the tail reset back to the normal end point (as we know the request is incomplete and therefore its RING_HEAD is even earlier). However, if this w/a should fail we would try and resubmit the request with the RING_TAIL already set to the location of this request's wa_tail potentially causing a GPU hang. We can spot when we do try and incorrectly resubmit without advancing the RING_TAIL and spare any embarrassment by forcing the context restore. In the case of preempt-to-busy, we leave the requests running on the HW while we unwind. As the ring is still live, we cannot rewind our rq->tail without forcing a reload so leave it set to rq->wa_tail and only force a reload if we resubmit after a lite-restore. (Normally, the forced reload will be a part of the preemption event.) Fixes: 22b7a426bbe1 ("drm/i915/execlists: Preempt-to-busy") Closes: https://gitlab.freedesktop.org/drm/intel/issues/673 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Cc: stable@kernel.vger.org Link: https://patchwork.freedesktop.org/patch/msgid/20191209023215.3519970-1-chris@chris-wilson.co.uk commit 887352fb5ffd593d28f77059c09dabb47c5b86e9 Merge: e42617b825f8 cc90bc684223 Author: Andreas Gruenbacher Date: Tue Dec 10 11:02:37 2019 +0100 Merge branch 'for-linus' from git://git.kernel.dk/linux-block commit 0388a110747bec0c9d9de995842bb2a03a26aae1 Author: Andre Przywara Date: Thu Nov 21 01:18:35 2019 +0000 arm: dts: allwinner: H3: Add PMU node Add the Performance Monitoring Unit (PMU) device tree node to the H3 .dtsi, which tells DT users which interrupts are triggered by PMU overflow events on each core. The numbers come from the manual and have been checked in U-Boot and with perf in Linux. Tested with perf record and taskset on an OrangePi Zero. Signed-off-by: Andre Przywara Signed-off-by: Maxime Ripard commit c35a516a46187c8eeb7a56c64505ec6f7e22a0c7 Author: Andre Przywara Date: Thu Nov 21 01:18:34 2019 +0000 arm64: dts: allwinner: H5: Add PMU node Add the Performance Monitoring Unit (PMU) device tree node to the H5 .dtsi, which tells DT users which interrupts are triggered by PMU overflow events on each core. As with the A64, the interrupt numbers from the manual were wrong (off by 4), the actual SPI IDs have been gathered in U-Boot, and were verified with perf in Linux. Tested with perf record and taskset on an OrangePi PC2. Signed-off-by: Andre Przywara Signed-off-by: Maxime Ripard commit 7aa9b9eb7d6a8fde7acbe0446444f7e3fae1fe3b Author: Andre Przywara Date: Thu Nov 21 01:18:33 2019 +0000 arm64: dts: allwinner: H6: Add PMU mode Add the Performance Monitoring Unit (PMU) device tree node to the H6 .dtsi, which tells DT users which interrupts are triggered by PMU overflow events on each core. The numbers come from the manual and have been checked in U-Boot and with perf in Linux. Tested with perf record and taskset on a Pine H64. Signed-off-by: Andre Przywara Signed-off-by: Maxime Ripard commit fe67dfcb44c6477dbde6c897c7787bf20e2281a3 Author: Jernej Skrabec Date: Sun Nov 17 13:52:50 2019 +0100 ARM: dts: sun8i: h3: Add rc map for Beelink X2 Beelink X2 box comes with a remote. Add a mapping for it. Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit 42ccc3d79b7f5685beef2e0b26e6ec01c61f5162 Author: Jernej Skrabec Date: Sun Nov 17 14:00:58 2019 +0100 arm64: dts: allwinner: h6: tanix-tx6: Add IR remote mapping Tanix TX6 box comes with a remote. Add a mapping for it. Suggested-by: Michael Lange Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit d2fccf94495e57ef443521a2a1cd0930d028b9f3 Author: Jernej Skrabec Date: Sun Nov 17 14:00:57 2019 +0100 media: dt-bindings: media: add new rc map name Add new entry for rc-tanix-tx5max in linux,rc-map-name Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit f33a911750297992ccdcdeaa6908f50c64d58783 Author: Corentin Labbe Date: Thu Nov 14 15:47:33 2019 +0000 arm64: dts: allwinner: add pineh64 model B This patch adds the model B of the PineH64. The model B is smaller than the pine64 model A and has no PCIE slot. The only devicetree difference with the pineH64 model A, is the PHY regulator and the HDMI connector node. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard commit 24e9f61c1411858587d2af254ce2c1eb7c9c9e28 Author: Corentin Labbe Date: Thu Nov 14 15:47:32 2019 +0000 arm64: dts: allwinner: sun50i-h6-pine-h64: state that the DT supports the modelA The current sun50i-h6-pine-h64 DT does not specify which model (A or B) it supports. When this file was created, only modelA was existing, but now both model exists and with the time, this DT drifted to support the model B since it is the most common one. Furtheremore, some part of the model A does not work with it like ethernet and HDMI connector (as confirmed by Jernej on IRC). So it is time to settle the issue, and the easiest way was to state that this DT is for model B. Easiest since only a small name changes is required. Doing the opposite (stating this file is for model A) will add changes (for ethernet and HDMI) and so, will break too many setup. But as asked by the maintainer this patch state this file is for model A. In the process this patch adds the missing compoments to made it work on model A. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard commit 3d7349846225de2588d2d2bb410d9de51fee7c32 Author: Georgii Staroselskii Date: Tue Nov 12 19:15:20 2019 +0300 dt-bindings: arm: sunxi: add Neutis N5H3 Adds bindings for the new Emlid Neutis N5H3 board. Signed-off-by: Georgii Staroselskii Signed-off-by: Maxime Ripard commit 66e3bc4a85b03174010b5b5943af058621b40d66 Author: Georgii Staroselskii Date: Tue Nov 12 19:15:19 2019 +0300 ARM: dts: sunxi: Add Neutis N5H3 support Emlid Neutis N5H3 is a version of Emlid Neutis SoM with H3 instead of H5 inside. 6eeb4180d4b9 ("ARM: dts: sunxi: h3-h5: Add Bananapi M2+ v1.2 device") was used as reference. Signed-off-by: Georgii Staroselskii Signed-off-by: Maxime Ripard commit e69f2736cf87094c6b2178942bd2fc19b38598d2 Author: Georgii Staroselskii Date: Tue Nov 12 19:15:18 2019 +0300 ARM: dts: allwinner: Split out non-SoC specific parts of Neutis N5 A new variant of Emlid Neutis has been inroduced. This one uses H3 instead of H5. The boards are essentially the same. This commit moves non-SoC-specific parts out so that the common parts could be reused with ease. Signed-off-by: Georgii Staroselskii Signed-off-by: Maxime Ripard commit 0988161a9828a320b8e6a780f3b4af64f7c3e257 Author: Christian Gromm Date: Mon Nov 25 16:51:31 2019 +0100 staging: most: fix improper SPDX-License comment style This patch uses '/*' in the SPDX comment. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1574697096-2942-2-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit a426b982be18eac979a26deca9ae8cb7f0082101 Author: Michael Straube Date: Sat Nov 23 16:16:35 2019 +0100 staging: rtl8188eu: remove return variable from rtw_pwr_unassociated_idle Function rtw_pwr_unassociated_idle returns boolean values. Remove the return variable ret and the exit label to simplify the function a little bit. Return true or false directly instead. Signed-off-by: Michael Straube Acked-by: Larry Finger Link: https://lore.kernel.org/r/20191123151635.155138-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4905084a07fc133605088fc1d65401c6ba4a5a76 Author: Michael Straube Date: Sat Nov 23 16:16:34 2019 +0100 staging: rtl8188eu: cleanup declarations in rtw_pwrctrl.c Replace tabs with spaces in declarations to cleanup whitespace. Signed-off-by: Michael Straube Acked-by: Larry Finger Link: https://lore.kernel.org/r/20191123151635.155138-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1544f55add5c8a5b463b7ae6346ab6df650fdffd Author: Michael Straube Date: Sat Nov 23 16:16:33 2019 +0100 staging: rtl8188eu: remove unnecessary parentheses in rtw_pwrctrl.c Remove unnecessary parentheses reported by checkpatch. Signed-off-by: Michael Straube Acked-by: Larry Finger Link: https://lore.kernel.org/r/20191123151635.155138-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 742e9285f8b4dbf27add1656eebedf3aff6e634c Author: Scott Schafer Date: Mon Dec 9 04:19:08 2019 -0600 staging: qlge: Fix CamelCase in qlge.h and qlge_dbg.c This patch addresses CamelCase warnings in qlge.h under struct mpi_coredump_global_header and mpi_coredump_segment_header. As well ass addresses CamelCase warnings in qlge_dbg.c when the structs are used. Signed-off-by: Scott Schafer Link: https://lore.kernel.org/r/20191209101908.23878-1-schaferjscott@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1f8a6edf8d2f9be4127b2ceb7c6c9cb7a82cc5b8 Author: Michael Kupfer Date: Fri Dec 6 09:54:32 2019 +0100 staging/vc04_services/bcm2835-camera: distinct numeration and names for devices Create a static atomic counter for numerating cameras. Use the Media Subsystem Kernel Internal API to create distinct device-names, so that the camera-number (given by the counter) matches the camera-name. Co-developed-by: Kay Friedrich Signed-off-by: Kay Friedrich Signed-off-by: Michael Kupfer Link: https://lore.kernel.org/r/20191206085432.19962-1-michael.kupfer@fau.de Signed-off-by: Greg Kroah-Hartman commit a1df271a8652723786923f8314c07ac1e8a35e2f Author: YueHaibing Date: Thu Nov 7 22:32:23 2019 +0800 staging: hp100: Use match_string() helper to simplify the code match_string() returns the array index of a matching string. Use it instead of the open-coded implementation. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20191107143223.44696-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 2a51470f270fb7bad89a1c2a60bfc5386c395f8f Author: Dorothea Ehrl Date: Wed Nov 27 13:30:52 2019 +0100 staging/qlge: fix block comment coding style This patch fixes: "WARNING: block comment use * on subsequent lines" "WARNING: block comments should align the * on each line" "WARNING: block comments use a trailing */ on a separate line" by checkpatch.pl. Signed-off-by: Dorothea Ehrl Co-developed-by: Vanessa Hack Signed-off-by: Vanessa Hack Link: https://lore.kernel.org/r/20191127123052.16424-5-dorothea.ehrl@fau.de Signed-off-by: Greg Kroah-Hartman commit 0da2d1051931aa15acbdb897606314c84fc81e43 Author: Dorothea Ehrl Date: Wed Nov 27 13:30:51 2019 +0100 staging/qlge: remove braces in conditional statement This patch fixes "WARNING: braces {} are not necessary for single statement blocks" and "WARNING: braces {} are not necessary for any arm of this statement" by checkpatch.pl. Signed-off-by: Dorothea Ehrl Co-developed-by: Vanessa Hack Signed-off-by: Vanessa Hack Link: https://lore.kernel.org/r/20191127123052.16424-4-dorothea.ehrl@fau.de Signed-off-by: Greg Kroah-Hartman commit 2d060684ab4c2a9078c63a00892037dd4cfa6966 Author: Dorothea Ehrl Date: Wed Nov 27 13:30:50 2019 +0100 staging/qlge: add braces to conditional statement This patch fixes "CHECK: braces {} should be used on all arms of this statement" by checkpatch.pl. Signed-off-by: Dorothea Ehrl Co-developed-by: Vanessa Hack Signed-off-by: Vanessa Hack Link: https://lore.kernel.org/r/20191127123052.16424-3-dorothea.ehrl@fau.de Signed-off-by: Greg Kroah-Hartman commit d00208b6464fd1127bf1b82b31789f1ac7d02a4a Author: Dorothea Ehrl Date: Wed Nov 27 13:30:49 2019 +0100 staging/qlge: add blank lines after declarations This patch fixes "WARNING: Missing a blank line after declarations" by checkpatch.pl. Signed-off-by: Dorothea Ehrl Co-developed-by: Vanessa Hack Signed-off-by: Vanessa Hack Link: https://lore.kernel.org/r/20191127123052.16424-2-dorothea.ehrl@fau.de Signed-off-by: Greg Kroah-Hartman commit f41e1a0a9462fcc0d4423600f6f6e6fabd2e8b16 Author: Dorothea Ehrl Date: Wed Nov 27 13:30:48 2019 +0100 staging/qlge: remove initialising of static local variable This patch fixes "ERROR: do not initialise statics to 0" by checkpatch.pl. Signed-off-by: Dorothea Ehrl Co-developed-by: Vanessa Hack Signed-off-by: Vanessa Hack Link: https://lore.kernel.org/r/20191127123052.16424-1-dorothea.ehrl@fau.de Signed-off-by: Greg Kroah-Hartman commit 9a92d02c3f0b6248b5447dc84637a8d37ba7db28 Author: Chuhong Yuan Date: Fri Dec 6 15:55:15 2019 +0800 staging: rts5208: add missed pci_release_regions The driver forgets to call pci_release_regions() in probe failure and remove. Add the missed calls to fix it. Signed-off-by: Chuhong Yuan Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20191206075515.18581-1-hslester96@gmail.com Signed-off-by: Greg Kroah-Hartman commit eb00d734bc78368106ca4de4703d368cd123f6df Author: Susarla Nikhilesh Date: Tue Dec 3 20:00:23 2019 +0530 staging: exfat: fix spelling mistake CHECK: 'propogate' may be misspelled - perhaps 'propagate'? FILE: drivers/staging/exfat/exfat_super.c:1484 CHECK: 'propogate' may be misspelled - perhaps 'propagate'? FILE: drivers/staging/exfat/exfat_super.c:1551 Signed-off-by: Susarla Nikhilesh Link: https://lore.kernel.org/r/20191203143023.2786-1-nikhilesh1294@gmail.com Signed-off-by: Greg Kroah-Hartman commit 57725b5bc5890b62a0f1d93c9767874c15b24e33 Merge: e42617b825f8 2dc016599cfa Author: Kalle Valo Date: Tue Dec 10 11:34:30 2019 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.6. Major changes: ath11k * a new driver for Qualcomm Wi-Fi 6 (IEEE 802.11ax) devices ath10k * significant improvements on receive throughput and firmware download with SDIO bus * report signal strength for each chain also on SDIO * set max mtu to 1500 on SDIO devices commit baf3f2f9d0bf747023c1d1fb197dd4e621ca3fce Author: Ajay Singh Date: Fri Nov 22 20:52:05 2019 +0000 staging: wilc1000: use GENMASK to extract wid type Refactor code by make use of 'GENMASK' to extract the WID type from buffer received from firmware. Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20191122205153.30723-4-adham.abozaeid@microchip.com Signed-off-by: Greg Kroah-Hartman commit a02a9897cd6dd8b8b45162c8edd02ae924382b4b Author: Ajay Singh Date: Fri Nov 22 20:52:04 2019 +0000 staging: wilc1000: use kernel provided struct cast to extract mac header To parse the mac header make use of *struct ieee80211_hdr* instead of extracting individual fields separately using pointer operation. Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20191122205153.30723-3-adham.abozaeid@microchip.com Signed-off-by: Greg Kroah-Hartman commit 856be41e446a6918fc665399061f4ec75b580501 Author: Ajay Singh Date: Fri Nov 22 20:52:03 2019 +0000 staging: wilc1000: remove unused compile time featurization Removed the unused compile type featurization. It's not recommended to have compile type feature. Currently removing these defines as they are not used. If any of these parameters are needed later should be added using run time feature. Signed-off-by: Ajay Singh Link: https://lore.kernel.org/r/20191122205153.30723-2-adham.abozaeid@microchip.com Signed-off-by: Greg Kroah-Hartman commit ca9a002fb38391f09b72aa6c7515fecf7d5d5358 Author: Geert Uytterhoeven Date: Fri Dec 6 14:32:54 2019 +0100 clk: renesas: rcar-gen2: Change multipliers and dividers to u8 All multipliers and dividers are small. Storing them in u8 instead of unsigned int reduces kernel size for a generic kernel by ca. 0.5 KiB. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20191206133254.23800-1-geert+renesas@glider.be commit 960786422fe90a86e81131f5dbd902cb5ebf8760 Author: Sean Christopherson Date: Tue Nov 26 08:54:17 2019 -0800 x86/ACPI/sleep: Move acpi_get_wakeup_address() into sleep.c, remove from Move the definition of acpi_get_wakeup_address() into sleep.c to break linux/acpi.h's dependency (by way of asm/acpi.h) on asm/realmode.h. Everyone and their mother includes linux/acpi.h, i.e. modifying realmode.h results in a full kernel rebuild, which makes the already inscrutable real mode boot code even more difficult to understand and is positively rage inducing when trying to make changes to x86's boot flow. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lkml.kernel.org/r/20191126165417.22423-13-sean.j.christopherson@intel.com Signed-off-by: Ingo Molnar commit 8c53b318b222eff55d2900b554094a099b1a30f6 Author: Sean Christopherson Date: Tue Nov 26 08:54:16 2019 -0800 ACPI/sleep: Convert acpi_wakeup_address into a function Convert acpi_wakeup_address from a raw variable into a function so that x86 can wrap its dereference of the real mode boot header in a function instead of broadcasting it to the world via a #define. This sets the stage for a future patch to move x86's definition of the new function, acpi_get_wakeup_address(), out of asm/acpi.h and thus break acpi.h's dependency on asm/realmode.h. No functional change intended. Signed-off-by: Sean Christopherson Link: https://lkml.kernel.org/r/20191126165417.22423-12-sean.j.christopherson@intel.com Signed-off-by: Ingo Molnar commit cb28909525acdd1a89c5b2de761eaf2f788c0057 Author: Sean Christopherson Date: Tue Nov 26 08:54:15 2019 -0800 x86/ACPI/sleep: Remove an unnecessary include of asm/realmode.h None of the declarations in x86's acpi/sleep.h are in any way dependent on the real mode boot code. Remove sleep.h's include of asm/realmode.h to limit the dependencies on realmode.h to code that actually interacts with the boot code. Signed-off-by: Sean Christopherson Acked-by: Rafael J. Wysocki Link: https://lkml.kernel.org/r/20191126165417.22423-11-sean.j.christopherson@intel.com Signed-off-by: Ingo Molnar commit 321354ba6883b5151fd283dc14fb29280e1fbd2e Author: Sean Christopherson Date: Tue Nov 26 08:54:14 2019 -0800 ASoC: Intel: Skylake: Explicitly include linux/io.h for virt_to_phys() Through a labyrinthian sequence of includes, usage of virt_to_phys() is dependent on the include of asm/io.h in x86's asm/realmode.h, which is included in x86's asm/acpi.h and thus by linux/acpi.h. Explicitly include linux/io.h to break the dependency on realmode.h so that a future patch can remove the realmode.h include from acpi.h without breaking the build. Signed-off-by: Sean Christopherson Acked-by: Mark Brown Link: https://lkml.kernel.org/r/20191126165417.22423-10-sean.j.christopherson@intel.com Signed-off-by: Ingo Molnar commit 97976e01d3586e488b6c4c84881806d5d2960e6c Author: Sean Christopherson Date: Tue Nov 26 08:54:13 2019 -0800 vmw_balloon: Explicitly include linux/io.h for virt_to_phys() Through a labyrinthian sequence of includes, usage of virt_to_phys() is dependent on the include of asm/io.h in x86's asm/realmode.h, which is included in x86's asm/acpi.h and thus by linux/acpi.h. Explicitly include linux/io.h to break the dependency on realmode.h so that a future patch can remove the realmode.h include from acpi.h without breaking the build. Signed-off-by: Sean Christopherson Link: https://lkml.kernel.org/r/20191126165417.22423-9-sean.j.christopherson@intel.com Signed-off-by: Ingo Molnar commit 41bfc11cde43222de6066a380f51b26897fba075 Author: Sean Christopherson Date: Tue Nov 26 08:54:12 2019 -0800 virt: vbox: Explicitly include linux/io.h to pick up various defs Through a labyrinthian sequence of includes, usage of page_to_phys(), virt_to_phys() and out*() is dependent on the include of asm/io.h in x86's asm/realmode.h, which is included in x86's asm/acpi.h and thus by linux/acpi.h. Explicitly include linux/io.h to break the dependency on realmode.h so that a future patch can remove the realmode.h include from acpi.h without breaking the build. Signed-off-by: Sean Christopherson Link: https://lkml.kernel.org/r/20191126165417.22423-8-sean.j.christopherson@intel.com Signed-off-by: Ingo Molnar commit c6625a314cb81149718390c6be01a9294a016966 Author: Sean Christopherson Date: Tue Nov 26 08:54:11 2019 -0800 efi/capsule-loader: Explicitly include linux/io.h for page_to_phys() Through a labyrinthian sequence of includes, usage of page_to_phys() is dependent on the include of asm/io.h in x86's asm/realmode.h, which is included in x86's asm/acpi.h and thus by linux/acpi.h. Explicitly include linux/io.h to break the dependency on realmode.h so that a future patch can remove the realmode.h include from acpi.h without breaking the build. Signed-off-by: Sean Christopherson Link: https://lkml.kernel.org/r/20191126165417.22423-7-sean.j.christopherson@intel.com Signed-off-by: Ingo Molnar commit 59e9f58749cb85df314fd189a6bf58ae34170cf0 Author: Sean Christopherson Date: Tue Nov 26 08:54:10 2019 -0800 perf/x86/intel: Explicitly include asm/io.h to use virt_to_phys() Through a labyrinthian sequence of includes, usage of virt_to_phys() is dependent on the include of asm/io.h in asm/realmode.h via asm/acpi.h. Explicitly include asm/io.h to break the dependency on realmode.h so that a future patch can remove the realmode.h include from acpi.h without breaking the build. Signed-off-by: Sean Christopherson Link: https://lkml.kernel.org/r/20191126165417.22423-6-sean.j.christopherson@intel.com Signed-off-by: Ingo Molnar commit 6315ec9286e5146760a22d5ba8ccc6f5606e1401 Author: Sean Christopherson Date: Tue Nov 26 08:54:09 2019 -0800 x86/kprobes: Explicitly include vmalloc.h for set_vm_flush_reset_perms() The inclusion of linux/vmalloc.h, which is required for its definition of set_vm_flush_reset_perms(), is somehow dependent on asm/realmode.h being included by asm/acpi.h. Explicitly include linux/vmalloc.h so that a future patch can drop the realmode.h include from asm/acpi.h without breaking the build. Signed-off-by: Sean Christopherson Acked-by: Steven Rostedt (VMware) Link: https://lkml.kernel.org/r/20191126165417.22423-5-sean.j.christopherson@intel.com Signed-off-by: Ingo Molnar commit ac0b14dc16561c530796bfe9646ac2e0369a0bd6 Author: Sean Christopherson Date: Tue Nov 26 08:54:08 2019 -0800 x86/ftrace: Explicitly include vmalloc.h for set_vm_flush_reset_perms() The inclusion of linux/vmalloc.h, which is required for its definition of set_vm_flush_reset_perms(), is somehow dependent on asm/realmode.h being included by asm/acpi.h. Explicitly include linux/vmalloc.h so that a future patch can drop the realmode.h include from asm/acpi.h without breaking the build. Signed-off-by: Sean Christopherson Acked-by: Steven Rostedt (VMware) Link: https://lkml.kernel.org/r/20191126165417.22423-4-sean.j.christopherson@intel.com Signed-off-by: Ingo Molnar commit ca947b72e1dec3a000190733f7e0be38fe73eaae Author: Sean Christopherson Date: Tue Nov 26 08:54:07 2019 -0800 x86/boot: Explicitly include realmode.h to handle RM reservations Explicitly include asm/realmode.h, which provides reserve_real_mode(), instead of picking it up by an indirect include of asm/acpi.h. acpi.h will soon stop including realmode.h so that changing realmode.h doesn't require a full kernel rebuild. Signed-off-by: Sean Christopherson Link: https://lkml.kernel.org/r/20191126165417.22423-3-sean.j.christopherson@intel.com Signed-off-by: Ingo Molnar commit e71b6f0b68de3296839a311355c5f590ac3446e5 Author: Sean Christopherson Date: Tue Nov 26 08:54:06 2019 -0800 x86/efi: Explicitly include realmode.h to handle RM trampoline quirk Explicitly include asm/realmode.h, which is needed to handle a real mode trampoline quirk in efi_free_boot_services(), instead of picking it up by way of linux/acpi.h. acpi.h will soon stop including realmode.h so that changing realmode.h doesn't require a full kernel rebuild. Signed-off-by: Sean Christopherson Link: https://lkml.kernel.org/r/20191126165417.22423-2-sean.j.christopherson@intel.com Signed-off-by: Ingo Molnar commit f803e34d4a25e1cf43f89f21e05176ed19223dc1 Author: Ingo Molnar Date: Tue Nov 26 08:00:09 2019 +0000 x86/platform/intel/quark: Explicitly include linux/io.h for virt_to_phys() Similarly to the previous patches by Sean Christopherson: "Through a labyrinthian sequence of includes, usage of virt_to_phys() is dependent on the include of asm/io.h in x86's asm/realmode.h, which is included in x86's asm/acpi.h and thus by linux/acpi.h. Explicitly include linux/io.h to break the dependency on realmode.h so that a future patch can remove the realmode.h include from acpi.h without breaking the build." Reviewed-by: Andy Shevchenko Cc: Sean Christopherson Link: https://lkml.kernel.org/r/157475520975.21853.16355518818746065226.tip-bot2@tip-bot2 Signed-off-by: Ingo Molnar commit a69b4eebe513b8fd8f73a4c4f053941e67045660 Author: Enric Balletbo i Serra Date: Fri Nov 29 11:22:54 2019 +0100 platform/chrome: cros_ec_lpc: Use platform_get_irq_optional() for optional IRQs As platform_get_irq() now prints an error when the interrupt does not exist, use platform_get_irq_optional() to get the IRQ which is optional to avoid below error message during probe: [ 5.113502] cros_ec_lpcs GOOG0004:00: IRQ index 0 not found Signed-off-by: Enric Balletbo i Serra Reviewed-by: Guenter Roeck commit 205c9326fd86659fadbfd4da66ab35eb2770a331 Author: Raul E Rangel Date: Mon Nov 25 10:45:39 2019 -0700 platform/chrome: cros_ec_proto: Add response tracing Add the ability to view response codes as well. I dropped the EVENT_CLASS since there is only one event per class. cros_ec_cmd has now been renamed to cros_ec_request_start. Example: $ echo 1 > /sys/kernel/debug/tracing/events/cros_ec/enable $ cat /sys/kernel/debug/tracing/trace 369.416372: cros_ec_request_start: version: 0, command: EC_CMD_USB_PD_POWER_INFO 369.420528: cros_ec_request_done: version: 0, command: EC_CMD_USB_PD_POWER_INFO, ec result: EC_RES_SUCCESS, retval: 16 369.420529: cros_ec_request_start: version: 0, command: EC_CMD_USB_PD_DISCOVERY 369.421383: cros_ec_request_done: version: 0, command: EC_CMD_USB_PD_DISCOVERY, ec result: EC_RES_SUCCESS, retval: 5 Signed-off-by: Raul E Rangel Signed-off-by: Enric Balletbo i Serra commit 086338df1d6c3d717eb41f975a480571bb2d2973 Author: Enric Balletbo i Serra Date: Mon Oct 21 13:33:29 2019 +0200 platform/chrome: cros_ec_trace: Match trace commands with EC commands There are some EC commands that are not included yet as trace commands, in order to get all the traces for the all supported commands match the commands accordingly. Note that a change, adding or removing an EC command, should be reflected in the cros_ec_trace.c file in order to avoid mismatches again. The list of current commands is generated using the following script: sed -n 's/^#define \(EC_CMD_[[:alnum:]_]*\)\s.*/\tTRACE_SYMBOL(\1),\\/p' \ include/linux/platform_data/cros_ec_commands.h Signed-off-by: Enric Balletbo i Serra commit 186525bd6b83efc592672e2d6185e4d7c810d2b4 Author: Ingo Molnar Date: Fri Nov 29 08:17:25 2019 +0100 mm, x86/mm: Untangle address space layout definitions from basic pgtable type definitions - Untangle the somewhat incestous way of how VMALLOC_START is used all across the kernel, but is, on x86, defined deep inside one of the lowest level page table headers. It doesn't help that vmalloc.h only includes a single asm header: #include /* pgprot_t */ So there was no existing cross-arch way to decouple address layout definitions from page.h details. I used this: #ifndef VMALLOC_START # include #endif This way every architecture that wants to simplify page.h can do so. - Also on x86 we had a couple of LDT related inline functions that used the late-stage address space layout positions - but these could be uninlined without real trouble - the end result is cleaner this way as well. Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Borislav Petkov Cc: Linus Torvalds Cc: Andrew Morton Cc: Rik van Riel Cc: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org Signed-off-by: Ingo Molnar commit 1f059dfdf5d170dccbac92193be2fee3c1763384 Author: Ingo Molnar Date: Thu Nov 28 08:19:36 2019 +0100 mm/vmalloc: Add empty headers and use them from In the x86 MM code we'd like to untangle various types of historic header dependency spaghetti, but for this we'd need to pass to the generic vmalloc code various vmalloc related defines that customarily come via the low level arch header. Signed-off-by: Ingo Molnar commit da9144c5ad8943f9003ec4a6a0200637b4ba9ebd Author: kbuild test robot Date: Sat Nov 23 23:30:23 2019 +0800 x86/mm/pat: Mark __cpa_flush_tlb() as static Signed-off-by: kbuild test robot Link: https://lkml.kernel.org/r/20191123153023.bj6m66scjeubhbjg@4978f4969bb8 Signed-off-by: Ingo Molnar commit 4efb56649132687b5093d90aa62887595e65a09d Author: Ingo Molnar Date: Wed Nov 20 17:38:39 2019 +0100 x86/mm: Tabulate the page table encoding definitions I got lost in trying to figure out which bits were enabled in one of the PTE masks, so let's make it pretty obvious at the definition site already: #define PAGE_NONE __pg( 0| 0| 0|___A| 0| 0| 0|___G) #define PAGE_SHARED __pg(__PP|__RW|_USR|___A|__NX| 0| 0| 0) #define PAGE_SHARED_EXEC __pg(__PP|__RW|_USR|___A| 0| 0| 0| 0) #define PAGE_COPY_NOEXEC __pg(__PP| 0|_USR|___A|__NX| 0| 0| 0) #define PAGE_COPY_EXEC __pg(__PP| 0|_USR|___A| 0| 0| 0| 0) #define PAGE_COPY __pg(__PP| 0|_USR|___A|__NX| 0| 0| 0) #define PAGE_READONLY __pg(__PP| 0|_USR|___A|__NX| 0| 0| 0) #define PAGE_READONLY_EXEC __pg(__PP| 0|_USR|___A| 0| 0| 0| 0) #define __PAGE_KERNEL (__PP|__RW| 0|___A|__NX|___D| 0|___G) #define __PAGE_KERNEL_EXEC (__PP|__RW| 0|___A| 0|___D| 0|___G) #define _KERNPG_TABLE_NOENC (__PP|__RW| 0|___A| 0|___D| 0| 0) #define _KERNPG_TABLE (__PP|__RW| 0|___A| 0|___D| 0| 0| _ENC) #define _PAGE_TABLE_NOENC (__PP|__RW|_USR|___A| 0|___D| 0| 0) #define _PAGE_TABLE (__PP|__RW|_USR|___A| 0|___D| 0| 0| _ENC) #define __PAGE_KERNEL_RO (__PP| 0| 0|___A|__NX|___D| 0|___G) #define __PAGE_KERNEL_RX (__PP| 0| 0|___A| 0|___D| 0|___G) #define __PAGE_KERNEL_NOCACHE (__PP|__RW| 0|___A|__NX|___D| 0|___G| __NC) #define __PAGE_KERNEL_VVAR (__PP| 0|_USR|___A|__NX|___D| 0|___G) #define __PAGE_KERNEL_LARGE (__PP|__RW| 0|___A|__NX|___D|_PSE|___G) #define __PAGE_KERNEL_LARGE_EXEC (__PP|__RW| 0|___A| 0|___D|_PSE|___G) #define __PAGE_KERNEL_WP (__PP|__RW| 0|___A|__NX|___D| 0|___G| __WP) Especially security relevant bits like 'NX' or coherence related bits like 'G' are now super easy to read based on a single grep. We do the underscore gymnastics to not pollute the kernel's symbol namespace, and the longest line still fits into 80 columns, so this should be readable for everyone. Signed-off-by: Ingo Molnar commit b75baaf3a81e71680f3d50965c9330b36993fbad Author: Ingo Molnar Date: Wed Nov 20 15:57:04 2019 +0100 x86/mm/pat: Fix typo in the Kconfig help text Signed-off-by: Ingo Molnar commit 533d49b37a2b532354d3841a142173b8321818df Author: Ingo Molnar Date: Wed Nov 20 15:45:32 2019 +0100 x86/mm/pat: Clean up externs Half of the declarations have an 'extern', half of them not, use 'extern' consistently. This makes grepping for APIs easier, such as: dagon:~/tip> git grep -E '\ commit eb243d1d28663c9b92010973a6a3ffa947f682ba Author: Ingo Molnar Date: Wed Nov 20 15:33:57 2019 +0100 x86/mm/pat: Rename => pat.h is a file whose main purpose is to provide the memtype_*() APIs. PAT is the low level hardware mechanism - but the high level abstraction is memtype. So name the header as well - this goes hand in hand with memtype.c and memtype_interval.c. Signed-off-by: Ingo Molnar commit ecdd6ee77b73d11fcf2ca6739e4d1fe590446599 Author: Ingo Molnar Date: Wed Nov 20 15:30:44 2019 +0100 x86/mm/pat: Standardize on memtype_*() prefix for APIs Half of our memtype APIs are memtype_ prefixed, the other half are _memtype suffixed: reserve_memtype() free_memtype() kernel_map_sync_memtype() io_reserve_memtype() io_free_memtype() memtype_check_insert() memtype_erase() memtype_lookup() memtype_copy_nth_element() Use prefixes consistently, like most other modern kernel APIs: reserve_memtype() => memtype_reserve() free_memtype() => memtype_free() kernel_map_sync_memtype() => memtype_kernel_map_sync() io_reserve_memtype() => memtype_reserve_io() io_free_memtype() => memtype_free_io() memtype_check_insert() => memtype_check_insert() memtype_erase() => memtype_erase() memtype_lookup() => memtype_lookup() memtype_copy_nth_element() => memtype_copy_nth_element() Signed-off-by: Ingo Molnar commit f9b57cf80c8b585614ba223732be0d8f19d558d8 Author: Ingo Molnar Date: Tue Dec 10 10:08:09 2019 +0100 x86/mm/pat: Move the memtype related files to arch/x86/mm/pat/ - pat.c offers, dominantly, the memtype APIs - so rename it to memtype.c. - pageattr.c is offering, primarily, the set_memory*() page attribute APIs, which is offered via the header: name the .c file along the same pattern. I.e. perform these renames, and move them all next to each other in arch/x86/mm/pat/: pat.c => memtype.c pat_internal.h => memtype.h pat_interval.c => memtype_interval.c pageattr.c => set_memory.c pageattr-test.c => cpa-test.c Signed-off-by: Ingo Molnar commit d891b9219d2a73640d2f2a216ecb6fb29d832013 Author: Ingo Molnar Date: Tue Nov 19 11:46:36 2019 +0100 x86/mm/pat: Clean up PAT initialization flags Right now we have these variables that impact the PAT initialization sequence: pat_disabled boot_cpu_done pat_initialized init_cm_done Some have a pat_ prefix, some not, and the naming is random, which makes their purpose rather opaque. Name them consistently and according to their role: pat_disabled pat_bp_initialized pat_bp_enabled pat_cm_initialized Also rename pat_bsp_init() => pat_bp_init(), to use the canonical abbreviation. Also add a warning for double calls of init_cache_modes(), the call chains leading to this are complex and I couldn't convince myself that we never call this function twice - so utilize the flag for a debug check. No change in functionality intended. Signed-off-by: Ingo Molnar commit baf65855baac302bbacf0ce17ed99b9c0940b930 Author: Ingo Molnar Date: Tue Dec 10 10:07:23 2019 +0100 x86/mm/pat: Harmonize 'struct memtype *' local variable and function parameter use We have quite a zoo of 'struct memtype' variable nomenclature: new entry print_entry data match out memtype Beyond the randomness, some of these are outright confusing, especially when used in larger functions. Standardize them: entry entry_new entry_old entry_print entry_match entry_out Signed-off-by: Ingo Molnar commit 47553d42c55f7b85e72ce6f3a18030102f8f93a3 Author: Ingo Molnar Date: Tue Nov 19 10:18:56 2019 +0100 x86/mm/pat: Simplify the free_memtype() control flow Simplify/streamline the quirky handling of the pat_pagerange_is_ram() logic, and get rid of the 'err' local variable. Signed-off-by: Ingo Molnar commit ef35b0fcee23d7636daa4bed62bceeaba4eed918 Author: Ingo Molnar Date: Tue Nov 19 09:38:26 2019 +0100 x86/mm/pat: Create fixed width output in /sys/kernel/debug/x86/pat_memtype_list, similar to the E820 debug printouts Before: write-back @ 0xbdfa9000-0xbdfaa000 write-back @ 0xbdfaa000-0xbdfab000 write-back @ 0xbdfab000-0xbdfac000 uncached-minus @ 0xc0000000-0xd0000000 uncached-minus @ 0xd0900000-0xd0920000 uncached-minus @ 0xd0920000-0xd0940000 uncached-minus @ 0xd0940000-0xd0960000 uncached-minus @ 0xd0960000-0xd0980000 uncached-minus @ 0xd0980000-0xd0981000 uncached-minus @ 0xd0990000-0xd0991000 uncached-minus @ 0xd09a0000-0xd09a1000 uncached-minus @ 0xd09b0000-0xd09b1000 uncached-minus @ 0xd0d00000-0xd0d01000 uncached-minus @ 0xd0d10000-0xd0d11000 uncached-minus @ 0xd0d20000-0xd0d21000 uncached-minus @ 0xd0d40000-0xd0d41000 uncached-minus @ 0xfed00000-0xfed01000 uncached-minus @ 0xfed1f000-0xfed20000 uncached-minus @ 0xfed40000-0xfed41000 After: PAT: [mem 0x00000000bdf8e000-0x00000000bdfa8000] write-back PAT: [mem 0x00000000bdfa9000-0x00000000bdfaa000] write-back PAT: [mem 0x00000000bdfaa000-0x00000000bdfab000] write-back PAT: [mem 0x00000000bdfab000-0x00000000bdfac000] write-back PAT: [mem 0x00000000c0000000-0x00000000d0000000] uncached-minus PAT: [mem 0x00000000d0900000-0x00000000d0920000] uncached-minus PAT: [mem 0x00000000d0920000-0x00000000d0940000] uncached-minus PAT: [mem 0x00000000d0940000-0x00000000d0960000] uncached-minus PAT: [mem 0x00000000d0960000-0x00000000d0980000] uncached-minus PAT: [mem 0x00000000d0980000-0x00000000d0981000] uncached-minus PAT: [mem 0x00000000d0990000-0x00000000d0991000] uncached-minus PAT: [mem 0x00000000d09a0000-0x00000000d09a1000] uncached-minus PAT: [mem 0x00000000d09b0000-0x00000000d09b1000] uncached-minus PAT: [mem 0x00000000fed1f000-0x00000000fed20000] uncached-minus PAT: [mem 0x00000000fed40000-0x00000000fed41000] uncached-minus The advantage is that it's easier to parse at a glance - and the tree is ordered by start address, which is now reflected in putting the start address in the first column. This is also now similar to how we print e820 entries: BIOS-e820: [mem 0x00000000bafda000-0x00000000bb3d3fff] usable BIOS-e820: [mem 0x00000000bb3d4000-0x00000000bdd2efff] reserved BIOS-e820: [mem 0x00000000bdd2f000-0x00000000bddccfff] ACPI NVS BIOS-e820: [mem 0x00000000bddcd000-0x00000000bdea0fff] ACPI data BIOS-e820: [mem 0x00000000bdea1000-0x00000000bdf2efff] ACPI NVS Since this is a debugfs file not used by tools there's no known ABI dependencies. Signed-off-by: Ingo Molnar commit 5557e831f68878ef202c0e5296235442cff9b41e Author: Ingo Molnar Date: Tue Nov 19 09:50:19 2019 +0100 x86/mm/pat: Disambiguate PAT-disabled boot messages Right now we have these four types of PAT-disabled boot messages: x86/PAT: PAT support disabled. x86/PAT: PAT MSR is 0, disabled. x86/PAT: MTRRs disabled, skipping PAT initialization too. x86/PAT: PAT not supported by CPU. The first message is ambiguous in that it doesn't signal that PAT is off due to a boot option. The second message doesn't really make it clear that this is the MSR value during early bootup and it's the firmware environment that disabled PAT support. The fourth message doesn't really make it clear that we disable PAT support because CONFIG_MTRR is off in the kernel. Clarify, harmonize and fix the spelling in these user-visible messages: x86/PAT: PAT support disabled via boot option. x86/PAT: PAT support disabled by the firmware. x86/PAT: PAT support disabled because CONFIG_MTRR is disabled in the kernel. x86/PAT: PAT not supported by the CPU. Also add a fifth message, in case PAT support is disabled at build time: x86/PAT: PAT support disabled because CONFIG_X86_PAT is disabled in the kernel. Previously we'd just silently return from pat_init() without giving any indication that PAT support is off. Finally, clarify/extend some of the comments related to PAT initialization. Signed-off-by: Ingo Molnar commit aee7f91369a80d2cb9bba198331479cc9bfc0ade Author: Ingo Molnar Date: Tue Dec 10 10:05:45 2019 +0100 x86/mm/pat: Update the comments in pat.c and pat_interval.c and refresh the code a bit Tidy up the code: - add comments explaining the PAT code, the role of the functions and the logic - fix various typos and grammar while at it - simplify the file-scope memtype_interval_*() namespace to interval_*() - simplify stylistic complications such as unnecessary linebreaks or convoluted control flow - use the simpler '#ifdef CONFIG_*' pattern instead of '#if defined(CONFIG_*)' pattern - remove the non-idiomatic newline between late_initcall() and its function definition Signed-off-by: Ingo Molnar commit 2040cf9f59037aa8aec749363e69ead165b67b43 Merge: f66c0447cca1 e42617b825f8 Author: Ingo Molnar Date: Tue Dec 10 10:11:00 2019 +0100 Merge tag 'v5.5-rc1' into core/kprobes, to resolve conflicts Signed-off-by: Ingo Molnar commit c96bcb635a5ed9bc072c3efcda70dfd24a771749 Author: Neil Armstrong Date: Mon Oct 21 11:15:09 2019 +0200 drm/meson: crtc: add OSD1 plane AFBC commit Finally, setup the VIU registers and start the AFBC decoder to support displaying AFBC encoded buffers on Amlogic GXM and G12A SoCs. The RDMA is used here to reset and program the AFBC decoder unit on each vsync without involving the interrupt handler that can be masked for a long period of time, producing display glitches. The vsync irq must still be left enabled otherwise the RDMA modules isn't trigerred when the interrupt line is masked. Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20191021091509.3864-10-narmstrong@baylibre.com commit 24e0d4058eff7cdf66976c66be42ac89f94d1d16 Author: Neil Armstrong Date: Mon Oct 21 11:15:08 2019 +0200 drm/meson: hold 32 lines after vsync to give time for AFBC start When using an AFBC encoded frame, the AFBC Decoder must be reset, configured and enabled at each vsync IRQ. To leave time for that, use the maximum lines hold time to give time for AFBC setup and avoid visual glitches. Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman [narmstrong: fix typo in commit log] Link: https://patchwork.freedesktop.org/patch/msgid/20191021091509.3864-9-narmstrong@baylibre.com commit 1b85270ff156d567bb4e8e235fa7069edd6c7b1f Author: Neil Armstrong Date: Mon Oct 21 11:15:07 2019 +0200 drm/meson: viu: add AFBC modules routing functions The Amlogic G12A AFBC Decoder pixel input need to be routed diferently than the Amlogic GXM AFBC decoder, this adds support for routing the VIU OSD1 pixel source to the AFBC "Mali Unpack" module. This "Mali Unpack" module is also configured with a static RGBA mapping for now until we support more pixel formats. Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20191021091509.3864-8-narmstrong@baylibre.com commit 68e2f64ee4603aeab9c3bb907d19f5cd30d1c6ff Author: Neil Armstrong Date: Mon Oct 21 11:15:06 2019 +0200 drm/meson: plane: add support for AFBC mode for OSD1 plane This adds all the OSD configuration plumbing to support the AFBC decoders path to display of the OSD1 plane. The Amlogic GXM and G12A AFBC decoders are integrated very differently. The Amlogic GXM has a direct output path to the OSD1 VIU pixel input, because the GXM AFBC decoder seem to be a custom IP developed by Amlogic. On the other side, the Amlogic G12A AFBC decoder seems to be an external IP that emit pixels on an AXI master hooked to a "Mali Unpack" block feeding the OSD1 VIU pixel input. This uses a weird "0x1000000" internal HW physical address on both sides to transfer the pixels. For Amlogic GXM, the supported pixel formats are the same as the normal linear OSD1 mode. On the other side, Amlogic added support for all AFBC v1.2 formats for the G12A AFBC integration. For simplicity, we stick to the already supported formats for now. Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20191021091509.3864-7-narmstrong@baylibre.com commit d1b5e41e13a7e9bde3e736df9b8693b0325e41bc Author: Neil Armstrong Date: Mon Oct 21 11:15:05 2019 +0200 drm/meson: Add AFBCD module driver This adds the driver for the ARM Framebuffer Compression decoders found in the Amlogic GXM and G12A SoCs. The Amlogic GXM and G12A AFBC decoder are totally different, the GXM only handling only the AFBC v1.0 modes and the G12A decoder handling the AFBC v1.2 modes. The G12A AFBC decoder is an external IP integrated in the video pipeline, and the GXM AFBC decoder seems to the an Amlogic custom decoder more tighly integrated in the video pipeline. The GXM AFBC decoder can handle only one AFBC plane for 2 available OSD planes available in HW, and the G12A AFBC decoder can handle up to 4 AFBC planes for up to 3 OSD planes available in HW. The Amlogic GXM supports 16x16 SPARSE and 16x16 SPLIT AFBC buffers up to 4k. On the other side, for G12A SPLIT is mandatory in 16x16 block mode, but for 4k modes 32x8+SPLIT AFBC buffers is manadatory for performances reasons. The RDMA is used here to reset and program the AFBC decoder unit on each vsync without involving the interrupt handler that can be masked for a long period of time, producing display glitches. For this we use the meson_rdma_writel_sync() which adds the register write tuple (VPU register offset and register value) to the RDMA buffer and write the value to the HW. When enabled, the RDMA is enabled to rewrite the same sequence at the next VSYNC event, until a new buffer is committed to the OSD plane. Then the Amlogic G12A is switched to RDMA, the Amlogic GXM Decoder doesn't need a reset/reprogram at each vsync, but needs to keep the vsync interrupt enabled to trigger the RDMA module. Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman [narmstrong: fixed typo in commit log] Link: https://patchwork.freedesktop.org/patch/msgid/20191021091509.3864-6-narmstrong@baylibre.com commit 63fba242c464ba3417d33f97bc0d47bbf46d0721 Author: Neil Armstrong Date: Mon Oct 21 11:15:04 2019 +0200 drm/meson: add RDMA module driver The VPU embeds a "Register DMA" that can write a sequence of registers on the VPU AHB bus, either manually or triggered by an internal IRQ event like VSYNC or a line input counter. The initial implementation handles a single channel (over 8), triggered by the VSYNC irq and does not handle the RDMA irq. The RDMA will be usefull to reset and program the AFBC decoder unit on each vsync without involving the interrupt handler that can be masked for a log period of time, producing display glitches. Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20191021091509.3864-5-narmstrong@baylibre.com commit ce7cb472108c37884c6084b317ceb07592906133 Author: Neil Armstrong Date: Mon Oct 21 11:15:03 2019 +0200 drm/meson: store the framebuffer width for plane commit Also store the framebuffer width in the private common struct to be used by the AFBC decoder module driver when committing the AFBC plane. Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20191021091509.3864-4-narmstrong@baylibre.com commit 7704ddc6a59077088c8b2a43550b7b5be1877385 Author: Neil Armstrong Date: Mon Oct 21 11:15:02 2019 +0200 drm/meson: add RDMA register bits defines The Amlogic VPU embeds a "Register DMA" that can write a sequence of registers on the VPU AHB bus, either manually or triggered by an internal IRQ event like VSYNC or a line input counter. This adds the register defines. Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20191021091509.3864-3-narmstrong@baylibre.com commit 26a7abd4883b71b33371e6ded32422d4e5f9c1c5 Author: Neil Armstrong Date: Mon Oct 21 11:15:01 2019 +0200 drm/meson: add AFBC decoder registers for GXM and G12A Add the registers used to program the ARM Framebuffer Compression decoders used in the Amlogic GXM and G12A SoCs families. This also adds the routing and pipeline configuration bits and registers needed to enable AFBC support. Signed-off-by: Neil Armstrong Reviewed-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20191021091509.3864-2-narmstrong@baylibre.com commit 075a1e87d1e2358d0b0301ac8f8e7f25051decf1 Author: Guenter Roeck Date: Mon Dec 2 06:18:36 2019 -0800 staging/octeon: Mark Ethernet driver as BROKEN The code doesn't compile due to incompatible pointer errors such as drivers/staging/octeon/ethernet-tx.c:649:50: error: passing argument 1 of 'cvmx_wqe_get_grp' from incompatible pointer type This is due to mixing, for example, cvmx_wqe_t with 'struct cvmx_wqe'. Unfortunately, one can not just revert the primary offending commit, as doing so results in secondary errors. This is made worse by the fact that the "removed" typedefs still exist and are used widely outside the staging directory, making the entire set of "remove typedef" changes pointless and wrong. Reflect reality and mark the driver as BROKEN. Fixes: ef1fe6b7369a ("staging: octeon: remove typedef declaration for cvmx_wqe") Fixes: 73aef0c9d2c6 ("staging: octeon: remove typedef declaration for cvmx_helper_link_info") Cc: Wambui Karuga Cc: Julia Lawall Signed-off-by: Guenter Roeck Link: https://lore.kernel.org/r/20191202141836.9363-1-linux@roeck-us.net Signed-off-by: Greg Kroah-Hartman commit 360db4ace3117ac1d9936d529f59c653e337b0f5 Author: Ingo Molnar Date: Mon Nov 18 16:03:39 2019 +0100 x86/setup: Enhance the comments Update various comments, fix outright mistakes and meaningless descriptions. Also harmonize the style across the file, both in form and in language. Cc: linux-kernel@vger.kernel.org Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar commit 12609013c43acaa5e547062ffc2fcfc4dcddde2e Author: Ingo Molnar Date: Mon Nov 18 15:49:22 2019 +0100 x86/setup: Clean up the header portion of setup.c In 20 years we accumulated 89 #include lines in setup.c, but we only need 30 of them (!) ... Get rid of the excessive ones, and while at it, sort the remaining ones alphabetically. Also get rid of the incomplete changelogs at the header of the file, and explain better what this file does. Cc: linux-kernel@vger.kernel.org Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar commit b0077e521c8af7761404ae772a328e5f0bf15094 Author: Jani Nikula Date: Tue Dec 3 18:38:53 2019 +0200 samples: vfio-mdev: constify fb ops Now that the fbops member of struct fb_info is const, we can start making the ops const as well. v2: fix typo (Christophe de Dinechin) Cc: Kirti Wankhede Cc: kvm@vger.kernel.org Reviewed-by: Daniel Vetter Acked-by: Kirti Wankhede Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/ddb10df1316ef585930cda7718643a580f4fe37b.1575390741.git.jani.nikula@intel.com commit dda510890498b9a2f4b2142192f6d516c6c1e2e5 Author: Geert Uytterhoeven Date: Fri Dec 6 14:24:35 2019 +0100 dmaengine: Remove spaces before TABs Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191206132435.29139-1-geert+renesas@glider.be Signed-off-by: Vinod Koul commit f68190c8cb753b0d150daa9d5e2b72ca0dfecf5c Author: Ulf Hansson Date: Thu Dec 5 15:37:46 2019 +0100 dmaengine: pl330: Convert to the *_late and *_early system sleep callbacks It has turned out that it's in general a good idea for dmaengines to allow DMA requests during the entire dpm_suspend() phase. Therefore, convert the pl330 driver into using SET_LATE_SYSTEM_SLEEP_PM_OPS. Signed-off-by: Ulf Hansson Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20191205143746.24873-3-ulf.hansson@linaro.org Signed-off-by: Vinod Koul commit a39cddc9e3775100100a4272feed64faac831be9 Author: Ulf Hansson Date: Thu Dec 5 15:37:45 2019 +0100 dmaengine: pl330: Drop boilerplate code for suspend/resume Let's drop the boilerplate code in the system suspend/resume callbacks and convert to use pm_runtime_force_suspend|resume(). This change also has a nice side effect, as pm_runtime_force_resume() may decide to leave the device in low power state, when that is feasible, thus avoiding to waste both time and energy during system resume. Signed-off-by: Ulf Hansson Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20191205143746.24873-2-ulf.hansson@linaro.org Signed-off-by: Vinod Koul commit c64738d6810be367c977b25c8077dd1918666951 Author: Geert Uytterhoeven Date: Thu Dec 5 14:37:36 2019 +0100 dt-bindings: dmaengine: rcar-dmac: Document r8a77961 support Document support for the system DMA controller in the Renesas R-Car M3-W+ (R8A77961) SoC. No driver update is needed. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20191205133736.5934-1-geert+renesas@glider.be Signed-off-by: Vinod Koul commit 2a03c1314506557277829562dd2ec5c11a6ea914 Author: Chuhong Yuan Date: Sun Nov 24 13:28:55 2019 +0800 dmaengine: ti: edma: add missed operations The driver forgets to call pm_runtime_disable and pm_runtime_put_sync in probe failure and remove. Add the calls and modify probe failure handling to fix it. To simplify the fix, the patch adjusts the calling order and merges checks for devm_kcalloc. Fixes: 2b6b3b742019 ("ARM/dmaengine: edma: Merge the two drivers under drivers/dma/") Signed-off-by: Chuhong Yuan Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191124052855.6472-1-hslester96@gmail.com Signed-off-by: Vinod Koul commit 08cbc75f96029d3092664213a844a5e25523aa35 Author: Nathan Chancellor Date: Mon Dec 9 15:38:59 2019 -0700 ppp: Adjust indentation into ppp_async_input Clang warns: ../drivers/net/ppp/ppp_async.c:877:6: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] ap->rpkt = skb; ^ ../drivers/net/ppp/ppp_async.c:875:5: note: previous statement is here if (!skb) ^ 1 warning generated. This warning occurs because there is a space before the tab on this line. Clean up this entire block's indentation so that it is consistent with the Linux kernel coding style and clang no longer warns. Fixes: 6722e78c9005 ("[PPP]: handle misaligned accesses") Link: https://github.com/ClangBuiltLinux/linux/issues/800 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit 5c61e223004b3b5c3f1dd25718e979bc17a3b12d Author: Nathan Chancellor Date: Mon Dec 9 14:50:27 2019 -0700 net: smc911x: Adjust indentation in smc911x_phy_configure Clang warns: ../drivers/net/ethernet/smsc/smc911x.c:939:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] if (!lp->ctl_rfduplx) ^ ../drivers/net/ethernet/smsc/smc911x.c:936:2: note: previous statement is here if (lp->ctl_rspeed != 100) ^ 1 warning generated. This warning occurs because there is a space after the tab on this line. Remove it so that the indentation is consistent with the Linux kernel coding style and clang no longer warns. Fixes: 0a0c72c9118c ("[PATCH] RE: [PATCH 1/1] net driver: Add support for SMSC LAN911x line of ethernet chips") Link: https://github.com/ClangBuiltLinux/linux/issues/796 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit fe06bf3d83ef0d92f35a24e03297172e92ce9ce3 Author: Nathan Chancellor Date: Mon Dec 9 14:16:23 2019 -0700 net: tulip: Adjust indentation in {dmfe, uli526x}_init_module Clang warns: ../drivers/net/ethernet/dec/tulip/uli526x.c:1812:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] switch (mode) { ^ ../drivers/net/ethernet/dec/tulip/uli526x.c:1809:2: note: previous statement is here if (cr6set) ^ 1 warning generated. ../drivers/net/ethernet/dec/tulip/dmfe.c:2217:3: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] switch(mode) { ^ ../drivers/net/ethernet/dec/tulip/dmfe.c:2214:2: note: previous statement is here if (cr6set) ^ 1 warning generated. This warning occurs because there is a space before the tab on these lines. Remove them so that the indentation is consistent with the Linux kernel coding style and clang no longer warns. While we are here, adjust the default block in dmfe_init_module to have a proper break between the label and assignment and add a space between the switch and opening parentheses to avoid a checkpatch warning. Fixes: e1c3e5014040 ("[PATCH] initialisation cleanup for ULI526x-net-driver") Link: https://github.com/ClangBuiltLinux/linux/issues/795 Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit 80bfc3b40a17aebd2e14708c259d3e73d3b7a014 Merge: 65e6d90168f3 e02d18161e97 Author: David S. Miller Date: Mon Dec 9 20:19:10 2019 -0800 Merge branch 'dp83867-fix-fifo-depth' Dan Murphy says: ==================== Fix Tx/Rx FIFO depth for DP83867 The DP83867 supports both the RGMII and SGMII modes. The Tx and Rx FIFO depths are configurable in these modes but may not applicable for both modes. When the device is configured for RGMII mode the Tx FIFO depth is applicable and for SGMII mode both Tx and Rx FIFO depth settings are applicable. When the driver was originally written only the RGMII device was available and there were no standard fifo-depth DT properties. The patchset converts the special ti,fifo-depth property to the standard tx-fifo-depth property while still allowing the ti,fifo-depth property to be set as to maintain backward compatibility. In addition to this change the rx-fifo-depth property support was added and only written when the device is configured for SGMII mode. ==================== Signed-off-by: David S. Miller commit e02d18161e9707d9ca6b04da8f4cf9e1c345d0b8 Author: Dan Murphy Date: Mon Dec 9 14:10:25 2019 -0600 net: phy: dp83867: Add rx-fifo-depth and tx-fifo-depth This code changes the TI specific ti,fifo-depth to the common tx-fifo-depth property. The tx depth is applicable for both RGMII and SGMII modes of operation. rx-fifo-depth was added as well but this is only applicable for SGMII mode. So in summary if RGMII mode write tx fifo depth only if SGMII mode write both rx and tx fifo depths If the property is not populated in the device tree then set the value to the default values. Signed-off-by: Dan Murphy Reported-by: Adrian Bunk Signed-off-by: David S. Miller commit 96ae38af9d2992073f553d14d3a85f3e4ad56250 Author: Dan Murphy Date: Mon Dec 9 14:10:24 2019 -0600 dt-bindings: dp83867: Convert fifo-depth to common fifo-depth and make optional Convert the ti,fifo-depth from a TI specific property to the common tx-fifo-depth property. Also add support for the rx-fifo-depth. These are optional properties for this device and if these are not available then the fifo depths are set to device default values. Signed-off-by: Dan Murphy Reported-by: Adrian Bunk CC: Rob Herring Signed-off-by: David S. Miller commit 65e6d90168f3593df0ae598502bcbf20d78ff0fb Author: Kevin(Yudong) Yang Date: Mon Dec 9 14:19:59 2019 -0500 net-tcp: Disable TCP ssthresh metrics cache by default This patch introduces a sysctl knob "net.ipv4.tcp_no_ssthresh_metrics_save" that disables TCP ssthresh metrics cache by default. Other parts of TCP metrics cache, e.g. rtt, cwnd, remain unchanged. As modern networks becoming more and more dynamic, TCP metrics cache today often causes more harm than benefits. For example, the same IP address is often shared by different subscribers behind NAT in residential networks. Even if the IP address is not shared by different users, caching the slow-start threshold of a previous short flow using loss-based congestion control (e.g. cubic) often causes the future longer flows of the same network path to exit slow-start prematurely with abysmal throughput. Caching ssthresh is very risky and can lead to terrible performance. Therefore it makes sense to make disabling ssthresh caching by default and opt-in for specific networks by the administrators. This practice also has worked well for several years of deployment with CUBIC congestion control at Google. Acked-by: Eric Dumazet Acked-by: Neal Cardwell Acked-by: Yuchung Cheng Signed-off-by: Kevin(Yudong) Yang Signed-off-by: David S. Miller commit 4e7696d90b51a1a73ce0e8174f3aff58b914619c Author: Xin Long Date: Mon Dec 9 13:45:18 2019 +0800 sctp: get netns from asoc and ep base Commit 312434617cb1 ("sctp: cache netns in sctp_ep_common") set netns in asoc and ep base since they're created, and it will never change. It's a better way to get netns from asoc and ep base, comparing to calling sock_net(). This patch is to replace them. v1->v2: - no change. Suggested-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Acked-by: Neil Horman Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 47501f87c61ad2aa234add63e1ae231521dbc3f5 Author: Jaegeuk Kim Date: Tue Nov 26 15:01:42 2019 -0800 f2fs: preallocate DIO blocks when forcing buffered_io The previous preallocation and DIO decision like below. allow_outplace_dio !allow_outplace_dio f2fs_force_buffered_io (*) No_Prealloc / Buffered_IO Prealloc / Buffered_IO !f2fs_force_buffered_io No_Prealloc / DIO Prealloc / DIO But, Javier reported Case (*) where zoned device bypassed preallocation but fell back to buffered writes in f2fs_direct_IO(), resulting in stale data being read. In order to fix the issue, actually we need to preallocate blocks whenever we fall back to buffered IO like this. No change is made in the other cases. allow_outplace_dio !allow_outplace_dio f2fs_force_buffered_io (*) Prealloc / Buffered_IO Prealloc / Buffered_IO !f2fs_force_buffered_io No_Prealloc / DIO Prealloc / DIO Reported-and-tested-by: Javier Gonzalez Signed-off-by: Damien Le Moal Tested-by: Shin'ichiro Kawasaki Reviewed-by: Chao Yu Reviewed-by: Javier González Signed-off-by: Jaegeuk Kim commit 5298d0b9b98089f5af406f7e05a41a53f9a15c11 Author: Stephen Smalley Date: Fri Nov 22 16:16:56 2019 -0500 selinux: clean up selinux_inode_permission MAY_NOT_BLOCK tests Through a somewhat convoluted series of changes, we have ended up with multiple unnecessary occurrences of (flags & MAY_NOT_BLOCK) tests in selinux_inode_permission(). Clean it up and simplify. No functional change. Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit db353fa92df86be4383a03d639e02248cf75cbc1 Author: Mohammad Rasim Date: Sat Nov 30 22:53:35 2019 +0300 arm64: dts: meson-gxbb: add support for Videostrong KII Pro This patch adds support for the Videostrong KII Pro tv box which is based on the gxbb-p201 reference design Device specifications: - SOC: Amlogic S905 - RAM: 2GB DDR3 - Storage: 16GB - Connectivity: - 10/100M Ethernet (IC Plus IP101GR) - 802.11 b/g/n/ac Wi-Fi (Ampak AP6335 BT/WIFI combo) - Bluetooth 4.0 (Ampak AP6335 BT/WIFI combo) - Video out: HDMI 2.0 up to 4K @ 60Hz, and 3.5mm AV (composite video) jack - Audio out: HDMI, AV (stereo audio) and optical S/PDIF - Tuner: AVL6862 DVB-C/T/T2 + DVB-S/S2 demod and Rafael Micro R848 tuner - Ports: - x1 micro SD card slot up to 32GB - 4x USB 2.0 host ports - Misc: - Power button and LED, IR receiver Reviewed-by: Martin Blumenstingl Signed-off-by: Mohammad Rasim Signed-off-by: Kevin Hilman commit 80f58695158eb252889938822b2951c060816aaa Author: Claudiu Beznea Date: Fri Nov 29 15:51:43 2019 +0200 ARM: debug-ll: select DEBUG_AT91_RM9200_DBGU for sam9x60 Select DEBUG_AT91_RM9200_DBGU for SAM9X60 SoC. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1575035505-6310-8-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit 1b6e21f2831e19871274fd8e5adc8802d20dae0e Author: Claudiu Beznea Date: Fri Nov 29 15:51:42 2019 +0200 drivers: soc: atmel: select POWER_RESET_AT91_SAMA5D2_SHDWC for sam9x60 Select POWER_RESET_AT91_SAMA5D2_SHDWC for SAM9X60 SoC. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1575035505-6310-7-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit 206e4d6f4ccd4563c825c73c7c55321b0807f20a Author: Mohammad Rasim Date: Sat Nov 30 22:53:34 2019 +0300 dt-bindings: arm: amlogic: add Videostrong KII Pro bindings Add the compatible for the Amlogic gxbb(s905) based kii pro Signed-off-by: Mohammad Rasim Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman commit 56f11874451856edb740b32d4a748db4f92551fd Author: Mohammad Rasim Date: Sat Nov 30 22:53:33 2019 +0300 dt-bindings: Add vendor prefix for Videostrong Videostrong Technology Co., Ltd., A manufacturer of Android Players & STB (Android with DVB Hybrid box & DVB-T2/S2/C/ISDB-T/DTMB-TH/ATSC) as well as HD media players. Acked-by: Martin Blumenstingl Signed-off-by: Mohammad Rasim Signed-off-by: Kevin Hilman commit a79fa0c12c932f8dc8631d7cad7fade1b01fa311 Author: Claudiu Beznea Date: Fri Nov 29 15:51:41 2019 +0200 power: reset: Kconfig: select POWER_RESET_AT91_RESET for sam9x60 Select POWER_RESET_AT91_RESET for SAM9X60 SoC. Signed-off-by: Claudiu Beznea Acked-by: Sebastian Reichel Link: https://lore.kernel.org/r/1575035505-6310-6-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit dccf722913945dd065ceb04cdd102c74ffe5dfec Author: Claudiu Beznea Date: Fri Nov 29 15:51:40 2019 +0200 drivers: soc: atmel: move sam9x60 under its own config flag Move SAM9X60 under its own config flag. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1575035505-6310-5-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit eb0df9b7fb022af73fb5002f3506a5b1a92df1ae Author: Claudiu Beznea Date: Fri Nov 29 15:51:39 2019 +0200 ARM: at91: pm: move SAM9X60's PM under its own SoC config flag Move SAM9X60's PM part under SoC config flag. This allows the building of SAM9X60 platform withouth depending on CONFIG_SOC_AT91SAM9 flag, allowing us to select only necessary config flags for SAM9X60. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1575035505-6310-4-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit fe7ff55d7918ce264b3edb3965a92291eb1475a4 Author: Claudiu Beznea Date: Fri Nov 29 15:51:38 2019 +0200 ARM: at91: Kconfig: add config flag for SAM9X60 SoC Add config flag for SAM9X60 SoC. Signed-off-by: Claudiu Beznea Signed-off-by: Nicolas Ferre Link: https://lore.kernel.org/r/1575035505-6310-3-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit fc8c4c059c23347d932ae3fd2ab295d1ccdb7d58 Author: Claudiu Beznea Date: Fri Nov 29 15:51:37 2019 +0200 ARM: at91: Kconfig: add sam9x60 pll config flag Add SAM9X60's pll config flag. It was first used in commit a436c2a447e5 ("clk: at91: add sam9x60 PLL driver"). Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1575035505-6310-2-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Alexandre Belloni commit bbd73c02e7d19e7227d4780f9597f95ffb84bb68 Author: Ludovic Desroches Date: Thu Nov 28 08:45:22 2019 +0100 ARM: dts: at91: sama5d2: set the sdmmc gclk frequency Set the frequency of the generated clock used by sdmmc devices in order to not rely on the configuration done by previous components. Signed-off-by: Ludovic Desroches Link: https://lore.kernel.org/r/20191128074522.69706-3-ludovic.desroches@microchip.com Signed-off-by: Alexandre Belloni commit 0188d5c025ca8fe756ba3193bd7d150139af5a88 Author: Stephen Smalley Date: Fri Nov 22 12:22:45 2019 -0500 selinux: fall back to ref-walk if audit is required commit bda0be7ad994 ("security: make inode_follow_link RCU-walk aware") passed down the rcu flag to the SELinux AVC, but failed to adjust the test in slow_avc_audit() to also return -ECHILD on LSM_AUDIT_DATA_DENTRY. Previously, we only returned -ECHILD if generating an audit record with LSM_AUDIT_DATA_INODE since this was only relevant from inode_permission. Move the handling of MAY_NOT_BLOCK to avc_audit() and its inlined equivalent in selinux_inode_permission() immediately after we determine that audit is required, and always fall back to ref-walk in this case. Fixes: bda0be7ad994 ("security: make inode_follow_link RCU-walk aware") Reported-by: Will Deacon Suggested-by: Al Viro Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit 1a37079c236d55fb31ebbf4b59945dab8ec8764c Author: Stephen Smalley Date: Fri Nov 22 12:22:44 2019 -0500 selinux: revert "stop passing MAY_NOT_BLOCK to the AVC upon follow_link" This reverts commit e46e01eebbbc ("selinux: stop passing MAY_NOT_BLOCK to the AVC upon follow_link"). The correct fix is to instead fall back to ref-walk if audit is required irrespective of the specific audit data type. This is done in the next commit. Fixes: e46e01eebbbc ("selinux: stop passing MAY_NOT_BLOCK to the AVC upon follow_link") Reported-by: Will Deacon Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit e6eeb92d23e297861589bff72f8352b0fcc9c933 Author: Qianggui Song Date: Fri Nov 15 20:03:49 2019 +0800 arm64: dts: meson: a1: add pinctrl controller support add peripheral pinctrl controller to a1 SoC Signed-off-by: Qianggui Song Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 03f2dea752d06958981605ae805de77792dd8839 Author: Xingyu Chen Date: Sun Sep 29 14:24:13 2019 +0800 arm64: dts: meson: add reset controller for Meson-A1 SoC Add the reset controller device of Meson-A1 SoC family Signed-off-by: Xingyu Chen Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman commit 59438b46471ae6cdfb761afc8c9beaf1e428a331 Author: Stephen Smalley Date: Wed Nov 27 12:04:36 2019 -0500 security,lockdown,selinux: implement SELinux lockdown Implement a SELinux hook for lockdown. If the lockdown module is also enabled, then a denial by the lockdown module will take precedence over SELinux, so SELinux can only further restrict lockdown decisions. The SELinux hook only distinguishes at the granularity of integrity versus confidentiality similar to the lockdown module, but includes the full lockdown reason as part of the audit record as a hint in diagnosing what triggered the denial. To support this auditing, move the lockdown_reasons[] string array from being private to the lockdown module to the security framework so that it can be used by the lsm audit code and so that it is always available even when the lockdown module is disabled. Note that the SELinux implementation allows the integrity and confidentiality reasons to be controlled independently from one another. Thus, in an SELinux policy, one could allow operations that specify an integrity reason while blocking operations that specify a confidentiality reason. The SELinux hook implementation is stricter than the lockdown module in validating the provided reason value. Sample AVC audit output from denials: avc: denied { integrity } for pid=3402 comm="fwupd" lockdown_reason="/dev/mem,kmem,port" scontext=system_u:system_r:fwupd_t:s0 tcontext=system_u:system_r:fwupd_t:s0 tclass=lockdown permissive=0 avc: denied { confidentiality } for pid=4628 comm="cp" lockdown_reason="/proc/kcore access" scontext=unconfined_u:unconfined_r:test_lockdown_integrity_t:s0-s0:c0.c1023 tcontext=unconfined_u:unconfined_r:test_lockdown_integrity_t:s0-s0:c0.c1023 tclass=lockdown permissive=0 Signed-off-by: Stephen Smalley Reviewed-by: James Morris [PM: some merge fuzz do the the perf hooks] Signed-off-by: Paul Moore commit 26c97a2d82c41938c3053d9ec27cdbcd8e34fb8b Author: Russell King Date: Mon Dec 9 13:40:23 2019 +0000 net: sfp: avoid tx-fault with Nokia GPON module The Nokia GPON module can hold tx-fault active while it is initialising which can take up to 60s. Avoid this causing the module to be declared faulty after the SFP MSA defined non-cooled module timeout. Signed-off-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e70ac628289766bc2c81a0db161368b69da774fd Author: Colin Ian King Date: Mon Dec 9 13:16:07 2019 +0000 qed: remove redundant assignments to rc The variable rc is assigned with a value that is never read and it is re-assigned a new value later on. The assignment is redundant and can be removed. Clean up multiple occurrances of this pattern. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 718eae277e62a26e5862eb72a830b5e0fe37b04a Author: Mao Wenan Date: Mon Dec 9 21:08:45 2019 +0800 NFC: port100: Convert cpu_to_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu(). Convert cpu_to_le16(le16_to_cpu(frame->datalen) + len) to use le16_add_cpu(), which is more concise and does the same thing. Reported-by: Hulk Robot Signed-off-by: Mao Wenan Signed-off-by: David S. Miller commit fcb1fe9c9e0031ff02aaa7532822807d27968044 Author: Evan Quan Date: Wed Dec 4 17:29:52 2019 +0800 drm/amd/powerplay: pre-check the SMU state before issuing message Abort the message issuing if the SMU was not in the right state. Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit ebcef76b6c2209ef4e86e8640b8a5ac87721b584 Author: Evan Quan Date: Tue Nov 26 15:05:07 2019 +0800 drm/amd/powerplay: drop unnecessary warning prompt As the check may be done with purpose and the warning output will be confusing. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit f794913ce82637572fb92633837cfac4f1345ad0 Author: Alex Deucher Date: Thu Dec 5 16:38:01 2019 -0500 drm/amdgpu/display: add fallthrough comment To avoid a compiler warning. Reviewed-by: Zhan Liu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 0d6f39bb77109b1837dc863e08c739039b753ce4 Author: Hawking Zhang Date: Fri Dec 6 18:09:19 2019 +0800 drm/amdgpu: fix resume failures due to psp fw loading sequence change (v3) this fix the regression caused by asd/ta loading sequence adjustment recently. asd/ta loading was move out from hw_start and should also be applied to psp_resume. otherwise those fw loading will be ignored in resume phase. v2: add the mutex unlock for asd loading failure case v3: merge the error handling to failed tag Signed-off-by: Hawking Zhang Reviewed-by: Guchun Chen Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit d515959125f24767d02e82587a11e444eeba0e7b Author: Thong Thai Date: Fri Dec 6 09:19:20 2019 -0500 Revert "drm/amdgpu: enable VCN DPG on Raven and Raven2" This reverts commit a4840d91c984f93b2acdcd44441d624bbc1af0d2. Reverting due to power efficiency issues seen on Raven 1 and 2 when DPG mode is enabled. Signed-off-by: Thong Thai Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b4ff0f8a85f3c523942e57b716e8722e7f6799cc Author: Christian König Date: Wed Dec 4 13:29:49 2019 +0100 drm/amdgpu: add VM eviction lock v3 This allows to invalidate VM entries without taking the reservation lock. v3: use -EBUSY Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 90b69cdc5f159be09d799257661e119a26ea4233 Author: Christian König Date: Fri Nov 29 12:44:07 2019 +0100 drm/amdgpu: stop adding VM updates fences to the resv obj Don't add the VM update fences to the resv object and remove the handling to stop implicitely syncing to them. Ongoing updates prevent page tables from being evicted and we manually block for all updates to complete before releasing PDs and PTS. This way we can do updates even without the resv obj locked. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit e095fc17bbd216ccac7fe06132067ae6e91f01c3 Author: Christian König Date: Fri Nov 29 11:33:54 2019 +0100 drm/amdgpu: explicitely sync to VM updates v2 Allows us to reduce the overhead while syncing to fences a bit. v2: also drop adev parameter from the functions Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 6ceeb144b1d6952a36afa6c29718beac575f2a3f Author: Christian König Date: Thu Nov 28 14:51:46 2019 +0100 drm/amdgpu: move VM eviction decision into amdgpu_vm.c When a page tables needs to be evicted the VM code should decide if that is possible or not. Signed-off-by: Christian König Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 11f39d526ca14d54c24c87c02bca7dc6f0def151 Author: Sam Ravnborg Date: Sat Dec 7 15:03:53 2019 +0100 drm/panel: tpo-tpg110: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Linus Walleij Reviewed-by: Laurent Pinchart Cc: Linus Walleij Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-26-sam@ravnborg.org commit 3555339f6227ed0be2478f2993c5da825169ace8 Author: Sam Ravnborg Date: Sat Dec 7 15:03:52 2019 +0100 drm/panel: tpo-td028ttec1: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-25-sam@ravnborg.org commit 31a59a9c04f0c85a459849ae06dbd10e1208471e Author: Sam Ravnborg Date: Sat Dec 7 15:03:51 2019 +0100 drm/panel: sitronix-st7789v: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-24-sam@ravnborg.org commit e46eb37a2d829878db8eb59a11bc3de7fc94e642 Author: Sam Ravnborg Date: Sat Dec 7 15:03:50 2019 +0100 drm/panel: sitronix-st7701: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Jagan Teki Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-23-sam@ravnborg.org commit 8cc851772126379f8e34d7f8af5704c8d215fb03 Author: Sam Ravnborg Date: Sat Dec 7 15:03:49 2019 +0100 drm/panel: sharp-ls043t1le01: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-22-sam@ravnborg.org commit 8bc0b560982b6c1a660629c3f8d8ff0ea8044596 Author: Sam Ravnborg Date: Sat Dec 7 15:03:48 2019 +0100 drm/panel: sharp-lq101r1sx01: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-21-sam@ravnborg.org commit 5a3e51619961d7655b41f1b15512ef1aebce80c8 Author: Sam Ravnborg Date: Sat Dec 7 15:03:47 2019 +0100 drm/panel: seiko-43wvf1g: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-20-sam@ravnborg.org commit d2895af5dc8f4985e3c99a36288e545fab65237d Author: Sam Ravnborg Date: Sat Dec 7 15:03:46 2019 +0100 drm/panel: ronbo-rb070d30: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-19-sam@ravnborg.org commit 83d4ed8634da5a592620a08de04af47c7769410c Author: Sam Ravnborg Date: Sat Dec 7 15:03:45 2019 +0100 drm/panel: rocktech-jh057n00900: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver. While touching the include files sort them and divide them up in blocks. Signed-off-by: Sam Ravnborg Reviewed-by: Guido Günther Reviewed-by: Laurent Pinchart Cc: "Guido Günther" Cc: Purism Kernel Team Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-18-sam@ravnborg.org commit 924735c40e66b4e09af2523520b9d9963310280e Author: Sam Ravnborg Date: Sat Dec 7 15:03:44 2019 +0100 drm/panel: raydium-rm68200: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-17-sam@ravnborg.org commit 581ee32edec62dc3f120306511927388fffb02dc Author: Sam Ravnborg Date: Sat Dec 7 15:03:43 2019 +0100 drm/panel: panasonic-vvx10f034n00: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-16-sam@ravnborg.org commit faf7e4f47cf6f28de3b82b36c9863123e570f976 Author: Sam Ravnborg Date: Sat Dec 7 15:03:42 2019 +0100 drm/panel: osd-osd101t2587-53ts: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-15-sam@ravnborg.org commit d90b3b6e839a1e799c481bbd399b189989a07624 Author: Sam Ravnborg Date: Sat Dec 7 15:03:41 2019 +0100 drm/panel: olimex-lcd-olinuxino: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Stefan Mavrodiev Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-14-sam@ravnborg.org commit 17d5183ed559e4f5b82b78cc293f5850a289fefe Author: Sam Ravnborg Date: Sat Dec 7 15:03:40 2019 +0100 drm/panel: lvds: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-13-sam@ravnborg.org commit 5fd14f287997274d98c518831a43e521b3c6ec75 Author: Sam Ravnborg Date: Sat Dec 7 15:03:39 2019 +0100 drm/panel: kingdisplay-kd097d04: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-12-sam@ravnborg.org commit 16793e00a3c17f639e0610549e62c1116a7da1f0 Author: Sam Ravnborg Date: Sat Dec 7 15:03:38 2019 +0100 drm/panel: innolux-p079zca: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-11-sam@ravnborg.org commit 2b33e19195cfa45887e3206d04b319f2a3724fc4 Author: Sam Ravnborg Date: Sat Dec 7 15:03:37 2019 +0100 drm/panel: ilitek-ili9881c: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-10-sam@ravnborg.org commit e3e4944faa0ea4603f1a63e1816c48344667152a Author: Sam Ravnborg Date: Sat Dec 7 15:03:36 2019 +0100 drm/panel: feiyang-fy07024di26a30d: use drm_panel backlight support Use the backlight support in drm_panel to simplify the driver Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Jagan Teki Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-9-sam@ravnborg.org commit aa6c43644bc57b3d297247746184d1d82ed9de82 Author: Sam Ravnborg Date: Sat Dec 7 15:03:35 2019 +0100 drm/panel: drop drm_device from drm_panel The panel drivers used drm_panel.drm for two purposes: 1) Argument to drm_mode_duplicate() 2) drm->dev was used in error messages The first usage is replaced with drm_connector.dev - drm_connector is already connected to a drm_device and we have a valid connector The second usage is replaced with drm_panel.dev - this makes drivers more consistent in their dev argument used for dev_err() and friends With these replacements there are no more uses of drm_panel.drm, so it is removed from struct drm_panel. With this change drm_panel_attach() and drm_panel_detach() no longer have any use as they are empty functions. v2: - editorial correction in changelog (Laurent) Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Reviewed-by: Linus Walleij Cc: Thierry Reding Cc: Laurent Pinchart Cc: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: Linus Walleij Cc: Jagan Teki Cc: Stefan Mavrodiev Cc: Robert Chiras Cc: "Guido Günther" Cc: Purism Kernel Team Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-8-sam@ravnborg.org commit 06c4a9c2ae606a8c9fab303613234804b9c45a64 Author: Sam Ravnborg Date: Sat Dec 7 15:03:34 2019 +0100 drm/panel: decouple connector from drm_panel To facilitate moving connector creation to display drivers, decouple the drm_connector from drm_panel. This patch adds a connector argument to drm_panel_get_modes(). All users of drm_panel_get_modes() already had the connector available, so updating users was trivial. With this patch drm_panel no longer keeps a reference to the drm_connector. Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Reviewed-by: Linus Walleij Acked-by: Jeffrey Hugo Cc: Thierry Reding Cc: Laurent Pinchart Cc: Sam Ravnborg Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Jonas Karlman Cc: Jernej Skrabec Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Stefan Agner Cc: Alison Wang Cc: Philipp Zabel Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: CK Hu Cc: Matthias Brugger Cc: Marek Vasut Cc: Tomi Valkeinen Cc: Kieran Bingham Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Benjamin Gaignard Cc: Vincent Abriou Cc: Chen-Yu Tsai Cc: Jonathan Hunter Cc: Torsten Duwe Cc: Vasily Khoruzhick Cc: Icenowy Zheng Cc: Sean Paul Cc: Linus Walleij Cc: Boris Brezillon Cc: Hariprasad Kelam Cc: Alexios Zavras Cc: Brian Masney Cc: Rob Clark Cc: Thomas Gleixner Cc: Allison Randal Cc: Shayenne Moura Cc: Abhinav Kumar Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-renesas-soc@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Cc: linux-tegra@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-7-sam@ravnborg.org commit 0ce8ddd8e06dcbcd8d31607921c31ad1c32ad56c Author: Sam Ravnborg Date: Sat Dec 7 15:03:33 2019 +0100 drm/panel: add drm_connector argument to get_modes() Today the bridge creates the drm_connector, but that is planned to be moved to the display drivers. To facilitate this, update drm_panel_funcs.get_modes() to take drm_connector as an argument. All panel drivers implementing get_modes() are updated. v2: - drop accidental change (Laurent) - update docs for get_modes (Laurent) Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Reviewed-by: Linus Walleij Cc: Thierry Reding Cc: Laurent Pinchart Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: Linus Walleij Cc: Jagan Teki Cc: Stefan Mavrodiev Cc: Robert Chiras Cc: "Guido Günther" Cc: Purism Kernel Team Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-6-sam@ravnborg.org commit d383fb5f8addd05f53080624829f68e80c268541 Author: Sam Ravnborg Date: Sat Dec 7 15:03:32 2019 +0100 drm: get drm_bridge_panel connector via helper The drm_connector created by drm_panel_bridge was accessed via drm_panel.connector. Avoid the detour around drm_panel by providing a simple get method. This avoids direct access to the connector field in drm_panel in the two users. The change is done in preparation for removal of drm_panel.connector. Update pl111 and tve200 to use the new helper. Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Reviewed-by: Linus Walleij Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: Eric Anholt Cc: Linus Walleij Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-5-sam@ravnborg.org commit 0fe1564bd61642ec348efbe9ab9c50b3068fb788 Author: Sam Ravnborg Date: Sat Dec 7 15:03:31 2019 +0100 drm/panel: simple: use drm_panel backlight support Use drm_panel infrastructure for backlight. Replace direct calls with drm_panel_*() calls to utilize the drm_panel support. Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart cc: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-4-sam@ravnborg.org commit 152dbdeab1b2571c107357a7bd59f5cd5be52e30 Author: Sam Ravnborg Date: Sat Dec 7 15:03:30 2019 +0100 drm/panel: add backlight support Panels often support backlight as specified in a device tree. Update the drm_panel infrastructure to support this to simplify the drivers. With this the panel driver just needs to add the following to the probe() function: err = drm_panel_of_backlight(panel); if (err) return err; Then drm_panel will handle all the rest. There is one caveat with the backlight support. If drm_panel_(enable|disable) are called multiple times in a row then backlight_(enable|disable) will be called multiple times. The above will happen when a panel drivers unconditionally calls drm_panel_disable() in their shutdown() function, whan the panel is already disabled and then shutdown() is called. Reading the backlight code it seems safe to call the backlight_(enable|disable) several times. v3: - Improve comments, fix grammar (Laurent) - Do not fail in drm_panel_of_backlight() if no DT support (Laurent) - Log if backlight_(enable|disable) fails (Laurent) - Improve drm_panel_of_backlight() docs - Updated changelog with backlight analysis (triggered by Laurent) v2: - Drop test of CONFIG_DRM_PANEL in header-file (Laurent) - do not enable backlight if ->enable() returns an error Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Thierry Reding Cc: Laurent Pinchart Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-3-sam@ravnborg.org commit 5dce87a91970bf7c7ef3de5e2bff08b695d858a3 Author: Sam Ravnborg Date: Sat Dec 7 15:03:29 2019 +0100 drm/drm_panel: no error when no callback The callbacks in drm_panel_funcs are optional, so do not return an error just because no callback is assigned. v2: - Document what functions in drm_panel_funcs are optional (Laurent) - Return -EOPNOTSUPP if get_modes() is not assigned (Laurent) (Sam: -EOPNOTSUPP seems to best error code in this situation) Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thierry Reding Cc: Sam Ravnborg Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191207140353.23967-2-sam@ravnborg.org commit 3c9abe886a95d91b3d1e1cc16af4322a1abe31d5 Author: Daniele Ceraolo Spurio Date: Thu Dec 5 14:02:42 2019 -0800 drm/i915/guc: kill the GuC client We now only use 1 client without any plan to add more. The client is also only holding information about the WQ and the process desc, so we can just move those in the intel_guc structure and always use stage_id 0. v2: fix comment (John) v3: fix the comment for real, fix kerneldoc Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: John Harrison Cc: Matthew Brost Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20191205220243.27403-4-daniele.ceraolospurio@intel.com commit e9362e1336feb1e942da036aba9ec2aeffe9e4d2 Author: Daniele Ceraolo Spurio Date: Thu Dec 5 14:02:41 2019 -0800 drm/i915/guc: kill doorbell code and selftests Instead of relying on the workqueue, the upcoming reworked GuC submission flow will offer the host driver indipendent control over the execution status of each context submitted to GuC. As part of this, the doorbell usage model has been reworked, with each doorbell being paired to a single lrc and a doorbell ring representing new work available for that specific context. This mechanism, however, limits the number of contexts that can be registered with GuC to the number of doorbells, which is an undesired limitation. To avoid this limitation, we requested the GuC team to also provide a H2G that will allow the host to notify the GuC of work available for a specified lrc, so we can use that mechanism instead of relying on the doorbells. We can therefore drop the doorbell code we currently have, also given the fact that in the unlikely case we'd want to switch back to using doorbells we'd have to heavily rework it. The workqueue will still have a use in the new interface to pass special commands, so that code has been retained for now. With the doorbells gone and the GuC client becoming even simpler, the existing GuC selftests don't give us any meaningful coverage so we can remove them as well. Some selftests might come with the new code, but they will look different from what we have now so if doesn't seem worth it to keep the file around in the meantime. v2: fix comments and commit message (John) Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: John Harrison Cc: Matthew Brost Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20191205220243.27403-3-daniele.ceraolospurio@intel.com commit 18c094b304046335fc9a4bce8ec3a2ac33edab8e Author: Daniele Ceraolo Spurio Date: Thu Dec 5 14:02:40 2019 -0800 drm/i915/guc: add a helper to allocate and map guc vma We already have a couple of use-cases in the code and another one will come in one of the later patches in the series. v2: use the new function for the CT object as well Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: John Harrison Cc: Matthew Brost Reviewed-by: Chris Wilson #v1 Reviewed-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20191205220243.27403-2-daniele.ceraolospurio@intel.com commit d54dc6eede681e5fa81a69c51e97be07175e6011 Author: Daniele Ceraolo Spurio Date: Thu Dec 5 14:02:39 2019 -0800 drm/i915/guc: Drop leftover preemption code Remove unused enums and ctx_save_restore_disabled() function, leftover from the legacy preemption removal. Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: John Harrison Cc: Matthew Brost Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191205220243.27403-1-daniele.ceraolospurio@intel.com commit 8c386cc817878588195dde38e919aa6ba9409d58 Author: Navid Emamdoost Date: Mon Nov 25 13:52:52 2019 -0600 PCI/IOV: Fix memory leak in pci_iov_add_virtfn() In the implementation of pci_iov_add_virtfn() the allocated virtfn is leaked if pci_setup_device() fails. The error handling is not calling pci_stop_and_remove_bus_device(). Change the goto label to failed2. Fixes: 156c55325d30 ("PCI: Check for pci_setup_device() failure in pci_iov_add_virtfn()") Link: https://lore.kernel.org/r/20191125195255.23740-1-navid.emamdoost@gmail.com Signed-off-by: Navid Emamdoost Signed-off-by: Bjorn Helgaas commit d97bd23c2d7d866e99eb3a927c742715c85a90ef Author: Ondrej Mosnacek Date: Tue Nov 26 14:57:00 2019 +0100 selinux: cache the SID -> context string translation Translating a context struct to string can be quite slow, especially if the context has a lot of category bits set. This can cause quite noticeable performance impact in situations where the translation needs to be done repeatedly. A common example is a UNIX datagram socket with the SO_PASSSEC option enabled, which is used e.g. by systemd-journald when receiving log messages via datagram socket. This scenario can be reproduced with: cat /dev/urandom | base64 | logger & timeout 30s perf record -p $(pidof systemd-journald) -a -g kill %1 perf report -g none --pretty raw | grep security_secid_to_secctx Before the caching introduced by this patch, computing the context string (security_secid_to_secctx() function) takes up ~65% of systemd-journald's CPU time (assuming a context with 1024 categories set and Fedora x86_64 release kernel configs). After this patch (assuming near-perfect cache hit ratio) this overhead is reduced to just ~2%. This patch addresses the issue by caching a certain number (compile-time configurable) of recently used context strings to speed up repeated translations of the same context, while using only a small amount of memory. The cache is integrated into the existing sidtab table by adding a field to each entry, which when not NULL contains an RCU-protected pointer to a cache entry containing the cached string. The cache entries are kept in a linked list sorted according to how recently they were used. On a cache miss when the cache is full, the least recently used entry is removed to make space for the new entry. The patch migrates security_sid_to_context_core() to use the cache (also a few other functions where it was possible without too much fuss, but these mostly use the translation for logging in case of error, which is rare). Link: https://bugzilla.redhat.com/show_bug.cgi?id=1733259 Cc: Michal Sekletar Signed-off-by: Ondrej Mosnacek Reviewed-by: Stephen Smalley Tested-by: Stephen Smalley Reviewed-by: Paul E. McKenney [PM: lots of merge fixups due to collisions with other sidtab patches] Signed-off-by: Paul Moore commit 66f8e2f03c02e812002f8e9e465681cc62edda5b Author: Jeff Vander Stoep Date: Fri Nov 22 10:33:06 2019 +0100 selinux: sidtab reverse lookup hash table This replaces the reverse table lookup and reverse cache with a hashtable which improves cache-miss reverse-lookup times from O(n) to O(1)* and maintains the same performance as a reverse cache hit. This reduces the time needed to add a new sidtab entry from ~500us to 5us on a Pixel 3 when there are ~10,000 sidtab entries. The implementation uses the kernel's generic hashtable API, It uses the context's string represtation as the hash source, and the kernels generic string hashing algorithm full_name_hash() to reduce the string to a 32 bit value. This change also maintains the improvement introduced in commit ee1a84fdfeed ("selinux: overhaul sidtab to fix bug and improve performance") which removed the need to keep the current sidtab locked during policy reload. It does however introduce periodic locking of the target sidtab while converting the hashtable. Sidtab entries are never modified or removed, so the context struct stored in the sid_to_context tree can also be used for the context_to_sid hashtable to reduce memory usage. This bug was reported by: - On the selinux bug tracker. BUG: kernel softlockup due to too many SIDs/contexts #37 https://github.com/SELinuxProject/selinux-kernel/issues/37 - Jovana Knezevic on Android's bugtracker. Bug: 140252993 "During multi-user performance testing, we create and remove users many times. selinux_android_restorecon_pkgdir goes from 1ms to over 20ms after about 200 user creations and removals. Accumulated over ~280 packages, that adds a significant time to user creation, making perf benchmarks unreliable." * Hashtable lookup is only O(1) when n < the number of buckets. Signed-off-by: Jeff Vander Stoep Reported-by: Stephen Smalley Reported-by: Jovana Knezevic Reviewed-by: Stephen Smalley Tested-by: Stephen Smalley [PM: subj tweak, removed changelog from patch description] Signed-off-by: Paul Moore commit b22eb7cefb9d31cf862542f9cef90f97c0294842 Author: Paul E. McKenney Date: Mon Nov 25 14:33:28 2019 -0800 torture: Hoist calls to lscpu to higher-level kvm.sh script On some kernels, concurrent calls to the lscpu command result in severe slowdowns. For example, on v4.16, a single lscpu invocation takes about two milliseconds, four concurrent invocations more than two seconds, and 16 concurrent invocations more than 20 seconds. Given that the only goal is to learn the number of CPUs, invoking lscpu but once suffices. This commit therefore invokes lscpu early in kvm.sh execution, setting the initial value of the TORTURE_ALLOTED_CPUS environment variable. Signed-off-by: Paul E. McKenney commit 25b4da74a955bf956428ab29e54aadf4fffab0a3 Author: Paul E. McKenney Date: Fri Nov 22 06:14:21 2019 -0800 torture: Allow "CFLIST" to specify default list of scenarios On a large system, it can be convenient to tell rcutorture to run several instances of the default scenarios. Currently, this requires explicitly listing them, for example, "--configs '2*SRCU-N 2*SRCU-P...'". Although this works, it is rather inconvenient. This commit therefore allows "CFLIST" to be specified to indicate the default list of scenarios called out in the relevant CFLIST file, for example, for RCU, tools/testing/selftests/rcutorture/configs/rcu/CFLIST. In addition, multipliers may be used to run multiple instances of all the scenarios. For example, on a 256-CPU system, "--configs '3*CFLIST'" would run three instances of each scenario concurrently with one CPU left over. Thus "--configs '3*CFLIST TINY01'" would exactly consume all 256 CPUs, which makes rcutorture's jitter feature more effective. Signed-off-by: Paul E. McKenney commit 5155be9994e557618a8312389fb4e52dfbf28a3c Author: Paul E. McKenney Date: Wed Nov 6 08:35:08 2019 -0800 rcutorture: Dynamically allocate rcu_fwds structure This commit switches from static structure to dynamic allocation for rcu_fwds as another step towards providing multiple call_rcu() forward-progress kthreads. Signed-off-by: Paul E. McKenney commit 6764100bd2927060aae91b40fce015f39fc4fd87 Author: Paul E. McKenney Date: Wed Nov 6 08:20:20 2019 -0800 rcutorture: Complete threading rcu_fwd pointers through functions This commit threads pointers to rcu_fwd structures through the remaining functions using rcu_fwds directly, namely rcu_torture_fwd_prog_cbfree(), rcutorture_oom_notify() and rcu_torture_fwd_prog_init(). Signed-off-by: Paul E. McKenney commit 7beba0c06b588c725962bcc0273a489d46e81ccf Author: Paul E. McKenney Date: Wed Nov 6 07:49:31 2019 -0800 rcutorture: Move to dynamic initialization of rcu_fwds In order to add multiple call_rcu() forward-progress kthreads, it will be necessary to dynamically allocate and initialize. This commit therefore moves the initialization from compile time to instead immediately precede thread-creation time. Signed-off-by: Paul E. McKenney commit 6b1b832546067caac8c5833abf88fa082d253b2f Author: Paul E. McKenney Date: Tue Nov 5 09:08:58 2019 -0800 rcutorture: Thread rcu_fwd pointer through forward-progress functions In order to add multiple kthreads, it will be necessary to allow the various functions to operate on a pointer to their kthread's rcu_fwd structure. This commit therefore starts the process of adding the needed "struct rcu_fwd" parameters and arguments to the various callback forward-progress functions. Note that rcutorture_oom_notify() and rcu_torture_fwd_cb_hist() will eventually need to iterate over all kthreads' rcu_fwd structures. Signed-off-by: Paul E. McKenney commit a289e608b3e740c15f623148c26cdec2d6698ce0 Author: Paul E. McKenney Date: Tue Nov 5 08:31:56 2019 -0800 rcutorture: Pull callback forward-progress data into rcu_fwd struct Now that RCU behaves reasonably well with the current single-kthread call_rcu() forward-progress testing, it is time to add more kthreads. This commit takes a first step towards that goal by wrapping what will be the per-kthread data into a new rcu_fwd structure. Signed-off-by: Paul E. McKenney commit ebfbaa8dcc84eff146928ed59a8bd4bff932318e Author: Paul E. McKenney Date: Mon Nov 4 12:02:12 2019 -0800 rcutorture: Add worst-case call_rcu() forward-progress results This commit adds the worst-case results from any call_rcu() forward-progress tests to the rcutorture test-summary output. Signed-off-by: Paul E. McKenney commit b8dfff975c370912c7ac633ca3e4a812dcd38f96 Author: Paul E. McKenney Date: Mon Oct 21 08:38:00 2019 -0700 torture: Handle systems lacking the mpstat command The rcutorture scripting uses the mpstat command to determine how much the system is being used, and adjusts make's -j argument accordingly. However, mpstat isn't installed by default, so it would be good if the scripting does something useful when mpstat isn't present. This commit therefore makes the scripts assumes that if mpstat is not present, they are free to use all the CPUs. Signed-off-by: Paul E. McKenney commit 517f17aed0ce678dfa82d7dd4e2593fc1bac799c Author: Paul E. McKenney Date: Mon Oct 14 07:05:38 2019 -0700 torture: Handle jitter for CPUs that cannot be offlined Currently, jitter.sh assumes that the underlying hypervisor will be configured with all CPUs hotpluggable, with the possible exception of CPU 0. However, there are installations where the hypervisor prohibits offlining, which breaks jitter.sh. This commit therefore lists the CPUs that cannot be offlined up front, and checks for the case where no CPU can be offlined in the loop. Signed-off-by: Paul E. McKenney commit 9aa55ec206a6841e297c9df7e737b3d57f048a82 Author: Paul E. McKenney Date: Sat Oct 12 15:29:02 2019 -0700 rcutorture: Dispense with Dracut for initrd creation The dracut scripting does not work on all platforms, and there are no known failures from the init binary based on the statically linked C program. This commit therefore removes the dracut scripting so that the statically linked C program is always used to create the init "script". Signed-off-by: Paul E. McKenney commit c493f1c9c4094afae7f3a0693ae395f3859022b4 Author: Paul E. McKenney Date: Sun Oct 6 14:33:22 2019 -0700 torture: Use gawk instead of awk for systime() function In many environments, gawk provides systime(), but awk doesn't. This commit therefore changes awk scripts using systime() to instead be gawk scripts. Signed-off-by: Paul E. McKenney commit 90326f0521a88004194f88f1b597b54347482b5c Author: Sebastian Andrzej Siewior Date: Tue Oct 15 21:18:14 2019 +0200 rcu: Use CONFIG_PREEMPTION where appropriate The config option `CONFIG_PREEMPT' is used for the preemption model "Low-Latency Desktop". The config option `CONFIG_PREEMPTION' is enabled when kernel preemption is enabled which is true for the preemption model `CONFIG_PREEMPT' and `CONFIG_PREEMPT_RT'. Use `CONFIG_PREEMPTION' if it applies to both preemption models and not just to `CONFIG_PREEMPT'. Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Davidlohr Bueso Cc: rcu@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney commit b3e627d3d5092a87fc9b9e37e341610cfecfbfdc Author: Lai Jiangshan Date: Tue Oct 15 02:55:57 2019 +0000 rcu: Make PREEMPT_RCU be a modifier to TREE_RCU Currently PREEMPT_RCU and TREE_RCU are mutually exclusive Kconfig options. But PREEMPT_RCU actually specifies a kind of TREE_RCU, namely a preemptible TREE_RCU. This commit therefore makes PREEMPT_RCU be a modifer to the TREE_RCU Kconfig option. This has the benefit of simplifying several of the #if expressions that formerly needed to check both, but now need only check one or the other. Signed-off-by: Lai Jiangshan Signed-off-by: Lai Jiangshan Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 03bd2983d7a9f898fd89f8f7215c3e56732d8ecd Author: Paul E. McKenney Date: Thu Oct 10 09:05:27 2019 -0700 rcu: Use lockdep rather than comment to enforce lock held The rcu_preempt_check_blocked_tasks() function has a comment that states that the rcu_node structure's ->lock must be held, which might be informative, but which carries little weight if not read. This commit therefore removes this comment in favor of raw_lockdep_assert_held_rcu_node(), which will complain quite visibly if the required lock is not held. Signed-off-by: Paul E. McKenney commit 6935c3983b246d5fbfebd3b891c825e65c118f2d Author: Eric Dumazet Date: Wed Oct 9 14:21:54 2019 -0700 rcu: Avoid data-race in rcu_gp_fqs_check_wake() The rcu_gp_fqs_check_wake() function uses rcu_preempt_blocked_readers_cgp() to read ->gp_tasks while other cpus might overwrite this field. We need READ_ONCE()/WRITE_ONCE() pairs to avoid compiler tricks and KCSAN splats like the following : BUG: KCSAN: data-race in rcu_gp_fqs_check_wake / rcu_preempt_deferred_qs_irqrestore write to 0xffffffff85a7f190 of 8 bytes by task 7317 on cpu 0: rcu_preempt_deferred_qs_irqrestore+0x43d/0x580 kernel/rcu/tree_plugin.h:507 rcu_read_unlock_special+0xec/0x370 kernel/rcu/tree_plugin.h:659 __rcu_read_unlock+0xcf/0xe0 kernel/rcu/tree_plugin.h:394 rcu_read_unlock include/linux/rcupdate.h:645 [inline] __ip_queue_xmit+0x3b0/0xa40 net/ipv4/ip_output.c:533 ip_queue_xmit+0x45/0x60 include/net/ip.h:236 __tcp_transmit_skb+0xdeb/0x1cd0 net/ipv4/tcp_output.c:1158 __tcp_send_ack+0x246/0x300 net/ipv4/tcp_output.c:3685 tcp_send_ack+0x34/0x40 net/ipv4/tcp_output.c:3691 tcp_cleanup_rbuf+0x130/0x360 net/ipv4/tcp.c:1575 tcp_recvmsg+0x633/0x1a30 net/ipv4/tcp.c:2179 inet_recvmsg+0xbb/0x250 net/ipv4/af_inet.c:838 sock_recvmsg_nosec net/socket.c:871 [inline] sock_recvmsg net/socket.c:889 [inline] sock_recvmsg+0x92/0xb0 net/socket.c:885 sock_read_iter+0x15f/0x1e0 net/socket.c:967 call_read_iter include/linux/fs.h:1864 [inline] new_sync_read+0x389/0x4f0 fs/read_write.c:414 read to 0xffffffff85a7f190 of 8 bytes by task 10 on cpu 1: rcu_gp_fqs_check_wake kernel/rcu/tree.c:1556 [inline] rcu_gp_fqs_check_wake+0x93/0xd0 kernel/rcu/tree.c:1546 rcu_gp_fqs_loop+0x36c/0x580 kernel/rcu/tree.c:1611 rcu_gp_kthread+0x143/0x220 kernel/rcu/tree.c:1768 kthread+0x1d4/0x200 drivers/block/aoe/aoecmd.c:1253 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:352 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 10 Comm: rcu_preempt Not tainted 5.3.0+ #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Signed-off-by: Eric Dumazet Reported-by: syzbot [ paulmck: Added another READ_ONCE() for RCU CPU stall warnings. ] Signed-off-by: Paul E. McKenney commit 610dea36d3083a977e4f156206cbe1eaa2a532f0 Author: Stefan Reiter Date: Fri Oct 4 19:49:10 2019 +0000 rcu/nocb: Fix dump_tree hierarchy print always active Commit 18cd8c93e69e ("rcu/nocb: Print gp/cb kthread hierarchy if dump_tree") added print statements to rcu_organize_nocb_kthreads for debugging, but incorrectly guarded them, causing the function to always spew out its message. This patch fixes it by guarding both pr_alert statements with dump_tree, while also changing the second pr_alert to a pr_cont, to print the hierarchy in a single line (assuming that's how it was supposed to work). Fixes: 18cd8c93e69e ("rcu/nocb: Print gp/cb kthread hierarchy if dump_tree") Signed-off-by: Stefan Reiter [ paulmck: Make single-nocbs-CPU GP kthreads look less erroneous. ] Signed-off-by: Paul E. McKenney commit c54a2744497db4b6887b9c905ef7aa0b3620c956 Author: Eric Dumazet Date: Thu Nov 7 11:37:37 2019 -0800 list: Add hlist_unhashed_lockless() We would like to use hlist_unhashed() from timer_pending(), which runs without protection of a lock. Note that other callers might also want to use this variant. Instead of forcing a READ_ONCE() for all hlist_unhashed() callers, add a new helper with an explicit _lockless suffix in the name to better document what is going on. Also add various WRITE_ONCE() in __hlist_del(), hlist_add_head() and hlist_add_before()/hlist_add_behind() to pair with the READ_ONCE(). Signed-off-by: Eric Dumazet Cc: Thomas Gleixner [ paulmck: Also add WRITE_ONCE() to rculist.h. ] Signed-off-by: Paul E. McKenney commit f452ee096d95482892b101bde4fd037fa025d3cc Author: Jonathan Neuschäfer Date: Fri Oct 4 23:54:02 2019 +0200 rculist: Describe variadic macro argument in a Sphinx-compatible way Without this patch, Sphinx shows "variable arguments" as the description of the cond argument, rather than the intended description, and prints the following warnings: ./include/linux/rculist.h:374: warning: Excess function parameter 'cond' description in 'list_for_each_entry_rcu' ./include/linux/rculist.h:651: warning: Excess function parameter 'cond' description in 'hlist_for_each_entry_rcu' Signed-off-by: Jonathan Neuschäfer Acked-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit df1e849ae4559544ff00ff5052eefe2479750539 Author: Paul E. McKenney Date: Wed Nov 27 16:36:45 2019 -0800 rcu: Enable tick for nohz_full CPUs slow to provide expedited QS An expedited grace period can be stalled by a nohz_full CPU looping in kernel context. This possibility is currently handled by some carefully crafted checks in rcu_read_unlock_special() that enlist help from ksoftirqd when permitted by the scheduler. However, it is exactly these checks that require the scheduler avoid holding any of its rq or pi locks across rcu_read_unlock() without also having held them across the entire RCU read-side critical section. It would therefore be very nice if expedited grace periods could handle nohz_full CPUs looping in kernel context without such checks. This commit therefore adds code to the expedited grace period's wait and cleanup code that forces the scheduler-clock interrupt on for CPUs that fail to quickly supply a quiescent state. "Quickly" is currently a hard-coded single-jiffy delay. Signed-off-by: Paul E. McKenney commit 4286dc07e6ae56ed33e9067850d6c04ff062195f Author: Chuhong Yuan Date: Mon Dec 9 16:57:47 2019 +0800 drm/gma500: add a missed gma_power_end in error path oaktrail_lvds_mode_set() misses a gma_power_end() in an error path. Add the call to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20191209085747.16057-1-hslester96@gmail.com commit 28f0361fdfab267a392cd6a6401446c9ea64de95 Author: Paul E. McKenney Date: Wed Nov 27 14:24:58 2019 -0800 rcu: Replace synchronize_sched_expedited_wait() "_sched" with "_rcu" After RCU flavor consolidation, synchronize_sched_expedited_wait() does both RCU-preempt and RCU-sched, whichever happens to have been built into the running kernel. This commit therefore changes this function's name to synchronize_rcu_expedited_wait() to reflect its new generic nature. Signed-off-by: Paul E. McKenney commit de8cd0a533bfb57ff4ec6c85e3bdca013a5adcb7 Author: Paul E. McKenney Date: Wed Nov 27 14:20:41 2019 -0800 rcu: Update tree_exp.h function-header comments The function-header comments in kernel/rcu/tree_exp.h have gotten a bit out of date, so this commit updates a number of them. Signed-off-by: Paul E. McKenney commit 6c7d7dbf5b7f965eda0d39fbbb8fee005b08f340 Author: Paul E. McKenney Date: Wed Nov 27 13:59:37 2019 -0800 rcu: Rename sync_rcu_preempt_exp_done() to sync_rcu_exp_done() Now that the RCU flavors have been consolidated, there is one common function for checking to see if an expedited RCU grace period has completed, namely sync_rcu_preempt_exp_done(). Because this function is no longer specific to RCU-preempt, this commit removes the "_preempt" from its name. This commit also changes sync_rcu_preempt_exp_done_unlocked() to sync_rcu_exp_done_unlocked() for the same reason. Signed-off-by: Paul E. McKenney commit 4bc6b745e5cbefed92c48071e28a5f41246d0470 Author: Neeraj Upadhyay Date: Tue Nov 19 11:50:52 2019 -0800 rcu: Allow only one expedited GP to run concurrently with wakeups The current expedited RCU grace-period code expects that a task requesting an expedited grace period cannot awaken until that grace period has reached the wakeup phase. However, it is possible for a long preemption to result in the waiting task never sleeping. For example, consider the following sequence of events: 1. Task A starts an expedited grace period by invoking synchronize_rcu_expedited(). It proceeds normally up to the wait_event() near the end of that function, and is then preempted (or interrupted or whatever). 2. The expedited grace period completes, and a kworker task starts the awaken phase, having incremented the counter and acquired the rcu_state structure's .exp_wake_mutex. This kworker task is then preempted or interrupted or whatever. 3. Task A resumes and enters wait_event(), which notes that the expedited grace period has completed, and thus doesn't sleep. 4. Task B starts an expedited grace period exactly as did Task A, complete with the preemption (or whatever delay) just before the call to wait_event(). 5. The expedited grace period completes, and another kworker task starts the awaken phase, having incremented the counter. However, it blocks when attempting to acquire the rcu_state structure's .exp_wake_mutex because step 2's kworker task has not yet released it. 6. Steps 4 and 5 repeat, resulting in overflow of the rcu_node structure's ->exp_wq[] array. In theory, this is harmless. Tasks waiting on the various ->exp_wq[] array will just be spuriously awakened, but they will just sleep again on noting that the rcu_state structure's ->expedited_sequence value has not advanced far enough. In practice, this wastes CPU time and is an accident waiting to happen. This commit therefore moves the rcu_exp_gp_seq_end() call that officially ends the expedited grace period (along with associate tracing) until after the ->exp_wake_mutex has been acquired. This prevents Task A from awakening prematurely, thus preventing more than one expedited grace period from being in flight during a previous expedited grace period's wakeup phase. Fixes: 3b5f668e715b ("rcu: Overlap wakeups with next expedited grace period") Signed-off-by: Neeraj Upadhyay [ paulmck: Added updated comment. ] Signed-off-by: Paul E. McKenney commit fd6bc19d7676a060a171d1cf3dcbf6fd797eb05f Author: Neeraj Upadhyay Date: Tue Nov 19 03:17:07 2019 +0000 rcu: Fix missed wakeup of exp_wq waiters Tasks waiting within exp_funnel_lock() for an expedited grace period to elapse can be starved due to the following sequence of events: 1. Tasks A and B both attempt to start an expedited grace period at about the same time. This grace period will have completed when the lower four bits of the rcu_state structure's ->expedited_sequence field are 0b'0100', for example, when the initial value of this counter is zero. Task A wins, and thus does the actual work of starting the grace period, including acquiring the rcu_state structure's .exp_mutex and sets the counter to 0b'0001'. 2. Because task B lost the race to start the grace period, it waits on ->expedited_sequence to reach 0b'0100' inside of exp_funnel_lock(). This task therefore blocks on the rcu_node structure's ->exp_wq[1] field, keeping in mind that the end-of-grace-period value of ->expedited_sequence (0b'0100') is shifted down two bits before indexing the ->exp_wq[] field. 3. Task C attempts to start another expedited grace period, but blocks on ->exp_mutex, which is still held by Task A. 4. The aforementioned expedited grace period completes, so that ->expedited_sequence now has the value 0b'0100'. A kworker task therefore acquires the rcu_state structure's ->exp_wake_mutex and starts awakening any tasks waiting for this grace period. 5. One of the first tasks awakened happens to be Task A. Task A therefore releases the rcu_state structure's ->exp_mutex, which allows Task C to start the next expedited grace period, which causes the lower four bits of the rcu_state structure's ->expedited_sequence field to become 0b'0101'. 6. Task C's expedited grace period completes, so that the lower four bits of the rcu_state structure's ->expedited_sequence field now become 0b'1000'. 7. The kworker task from step 4 above continues its wakeups. Unfortunately, the wake_up_all() refetches the rcu_state structure's .expedited_sequence field: wake_up_all(&rnp->exp_wq[rcu_seq_ctr(rcu_state.expedited_sequence) & 0x3]); This results in the wakeup being applied to the rcu_node structure's ->exp_wq[2] field, which is unfortunate given that Task B is instead waiting on ->exp_wq[1]. On a busy system, no harm is done (or at least no permanent harm is done). Some later expedited grace period will redo the wakeup. But on a quiet system, such as many embedded systems, it might be a good long time before there was another expedited grace period. On such embedded systems, this situation could therefore result in a system hang. This issue manifested as DPM device timeout during suspend (which usually qualifies as a quiet time) due to a SCSI device being stuck in _synchronize_rcu_expedited(), with the following stack trace: schedule() synchronize_rcu_expedited() synchronize_rcu() scsi_device_quiesce() scsi_bus_suspend() dpm_run_callback() __device_suspend() This commit therefore prevents such delays, timeouts, and hangs by making rcu_exp_wait_wake() use its "s" argument consistently instead of refetching from rcu_state.expedited_sequence. Fixes: 3b5f668e715b ("rcu: Overlap wakeups with next expedited grace period") Signed-off-by: Neeraj Upadhyay Signed-off-by: Paul E. McKenney commit aca2991a25da03ca96127b1d21e1f4aba41f81a6 Author: Paul E. McKenney Date: Wed Oct 30 06:51:57 2019 -0700 rcu: Substitute lookup for bit-twiddling in sync_rcu_exp_select_node_cpus() The code in sync_rcu_exp_select_node_cpus() calculates the current CPU's mask within its rcu_node structure's bitmasks, but this has already been computed in the ->grpmask field of that CPU's rcu_data structure. This commit therefore just uses this ->grpmask field. Signed-off-by: Paul E. McKenney commit 6cf539a87a61a4fbc43f625267dbcbcf283872ed Author: Marco Elver Date: Wed Oct 9 17:57:43 2019 +0200 rcu: Fix data-race due to atomic_t copy-by-value This fixes a data-race where `atomic_t dynticks` is copied by value. The copy is performed non-atomically, resulting in a data-race if `dynticks` is updated concurrently. This data-race was found with KCSAN: ================================================================== BUG: KCSAN: data-race in dyntick_save_progress_counter / rcu_irq_enter write to 0xffff989dbdbe98e0 of 4 bytes by task 10 on cpu 3: atomic_add_return include/asm-generic/atomic-instrumented.h:78 [inline] rcu_dynticks_snap kernel/rcu/tree.c:310 [inline] dyntick_save_progress_counter+0x43/0x1b0 kernel/rcu/tree.c:984 force_qs_rnp+0x183/0x200 kernel/rcu/tree.c:2286 rcu_gp_fqs kernel/rcu/tree.c:1601 [inline] rcu_gp_fqs_loop+0x71/0x880 kernel/rcu/tree.c:1653 rcu_gp_kthread+0x22c/0x3b0 kernel/rcu/tree.c:1799 kthread+0x1b5/0x200 kernel/kthread.c:255 read to 0xffff989dbdbe98e0 of 4 bytes by task 154 on cpu 7: rcu_nmi_enter_common kernel/rcu/tree.c:828 [inline] rcu_irq_enter+0xda/0x240 kernel/rcu/tree.c:870 irq_enter+0x5/0x50 kernel/softirq.c:347 Reported by Kernel Concurrency Sanitizer on: CPU: 7 PID: 154 Comm: kworker/7:1H Not tainted 5.3.0+ #5 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Workqueue: kblockd blk_mq_run_work_fn ================================================================== Signed-off-by: Marco Elver Cc: Paul E. McKenney Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Joel Fernandes Cc: Ingo Molnar Cc: Dmitry Vyukov Cc: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 9f08cf088676c12a5b53bd5a29cf04f00c787b5d Author: Boqun Feng Date: Tue Oct 8 13:01:40 2019 +0800 rcu: Avoid modifying mask_ofl_ipi in sync_rcu_exp_select_node_cpus() The "mask_ofl_ipi" is used to track which CPUs get IPIed, however in the IPI sending loop, "mask_ofl_ipi" along with another variable "mask_ofl_test" might also get modified to record which CPUs' quiesent states must be reported by the sync_rcu_exp_select_node_cpus() at the end of sync_rcu_exp_select_node_cpus(). This overlap of roles can be confusing, so this patch cleans things a little by using "mask_ofl_ipi" solely for determining which CPUs must be IPIed and "mask_ofl_test" for solely determining on behalf of which CPUs sync_rcu_exp_select_node_cpus() must report a quiscent state. Signed-off-by: Boqun Feng Signed-off-by: Paul E. McKenney Reviewed-by: Joel Fernandes (Google) Acked-by: Marco Elver commit 15c7c972cd26d89a26788e609c53b5a465324a6c Author: Paul E. McKenney Date: Mon Oct 7 18:53:18 2019 -0700 rcu: Use *_ONCE() to protect lockless ->expmask accesses The rcu_node structure's ->expmask field is accessed locklessly when starting a new expedited grace period and when reporting an expedited RCU CPU stall warning. This commit therefore handles the former by taking a snapshot of ->expmask while the lock is held and the latter by applying READ_ONCE() to lockless reads and WRITE_ONCE() to the corresponding updates. Link: https://lore.kernel.org/lkml/CANpmjNNmSOagbTpffHr4=Yedckx9Rm2NuGqC9UqE+AOz5f1-ZQ@mail.gmail.com Reported-by: syzbot+134336b86f728d6e55a0@syzkaller.appspotmail.com Signed-off-by: Paul E. McKenney Acked-by: Marco Elver commit cb5172d96d16df72db8b55146b0ec00bfd97f079 Author: Amol Grover Date: Mon Dec 2 00:03:48 2019 +0530 audit: Add __rcu annotation to RCU pointer Add __rcu annotation to RCU-protected global pointer auditd_conn. auditd_conn is an RCU-protected global pointer,i.e., accessed via RCU methods rcu_dereference() and rcu_assign_pointer(), hence it must be annotated with __rcu for sparse to report warnings/errors correctly. Fix multiple instances of the sparse error: error: incompatible types in comparison expression (different address spaces) Reviewed-by: Joel Fernandes (Google) Signed-off-by: Amol Grover [PM: tweak subject line] Signed-off-by: Paul Moore commit 5a35435ef4e6e4bd2aabd6706b146b298a9cffe5 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:54 2019 +0100 soc: fsl: qe: remove PPC32 dependency from CONFIG_QUICC_ENGINE There are also PPC64, ARM and ARM64 based SOCs with a QUICC Engine, and the core QE code as well as net/wan/fsl_ucc_hdlc and tty/serial/ucc_uart has now been modified to not rely on ppcisms. So extend the architectures that can select QUICC_ENGINE, and add the rather modest requirements of OF && HAS_IOMEM. The core code as well as the ucc_uart driver has been tested on an LS1021A (arm), and it has also been tested that the QE code still works on an mpc8309 (ppc). Qiang Zhao has tested that the QE-HDLC code that gets enabled with this works on ARM64. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 8d70df8b88a2c365a198003f2ae0df19d0825b91 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:53 2019 +0100 soc: fsl: qe: remove unused #include of asm/irq.h from ucc.c When allowing this driver to be built for ARM, the build fails (for CONFIG_SMP=y) since ARM's asm/irq.h header is not self-contained: In file included from drivers/soc/fsl/qe/ucc.c:18:0: >> arch/arm/include/asm/irq.h:34:50: error: unknown type name 'cpumask_t' extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask, But nothing in this file actually uses anything from asm/irq.h - removing this #include generates identical object code, both on PPC32 and on ARM (the latter with a patch added to asm/irq.h to make the build work in the first place). Reported-by: kbuild test robot Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 114724b782816c2795e19f1730bdf7cae786251e Author: Rasmus Villemoes Date: Thu Nov 28 15:55:52 2019 +0100 net: ethernet: freescale: make UCC_GETH explicitly depend on PPC32 Currently, QUICC_ENGINE depends on PPC32, so this in itself does not change anything. In order to allow removing the PPC32 dependency from QUICC_ENGINE and avoid allmodconfig build failures, add this explicit dependency. Also, the QE Ethernet has never been integrated on any non-PowerPC SoC and most likely will not be in the future. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Acked-by: David S. Miller Signed-off-by: Li Yang commit 148587a59f6b85831695e0497d9dd1af5f0495af Author: Rasmus Villemoes Date: Thu Nov 28 15:55:51 2019 +0100 net/wan/fsl_ucc_hdlc: reject muram offsets above 64K Qiang Zhao points out that these offsets get written to 16-bit registers, and there are some QE platforms with more than 64K muram. So it is possible that qe_muram_alloc() gives us an allocation that can't actually be used by the hardware, so detect and reject that. Reported-by: Qiang Zhao Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Acked-by: David S. Miller Signed-off-by: Li Yang commit 49b865b332a610f2a9d098eaad4b418f2a09ddd4 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:50 2019 +0100 net/wan/fsl_ucc_hdlc: fix reading of __be16 registers When releasing the allocated muram resource, we rely on reading back the offsets from the riptr/tiptr registers. But those registers are __be16 (and we indeed write them using iowrite16be), so we can't just read them back with a normal C dereference. This is not currently a real problem, since for now the driver is PPC32-only. But it will soon be allowed to be used on arm and arm64 as well. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Acked-by: David S. Miller Signed-off-by: Li Yang commit be2e9415f8b366abbe786b703436bfedf2012c21 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:49 2019 +0100 net/wan/fsl_ucc_hdlc: avoid use of IS_ERR_VALUE() When building this on a 64-bit platform gcc rightly warns that the error checking is broken (-ENOMEM stored in an u32 does not compare greater than (unsigned long)-MAX_ERRNO). Instead, now that qe_muram_alloc() returns s32, use that type to store the return value and use standard kernel style "ret < 0". Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Acked-by: David S. Miller Signed-off-by: Li Yang commit c93c159aefb089e79def966b99079b585c9108e2 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:48 2019 +0100 soc: fsl: qe: avoid IS_ERR_VALUE in ucc_fast.c When building this on a 64-bit platform gcc rightly warns that the error checking is broken (-ENOMEM stored in an u32 does not compare greater than (unsigned long)-MAX_ERRNO). Instead, change the ucc_fast_[tr]x_virtual_fifo_base_offset members to s32 and use an ordinary check-for-negative. Also, this avoids treating 0 as "this cannot have been returned from qe_muram_alloc() so don't free it". Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 71352b8c4016fbf24e5244877c2ebf93eb9d4c73 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:47 2019 +0100 soc: fsl: qe: drop pointless check in qe_sdma_init() The sdma member of struct qe_immap is not at offset zero, so even if qe_immr wasn't initialized yet (i.e. NULL), &qe_immr->sdma would not be NULL. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 4c3e565cc6237e0fc9b60e34420456a7b3fc74f6 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:46 2019 +0100 soc: fsl: qe: drop use of IS_ERR_VALUE in qe_sdma_init() Now that qe_muram_alloc() returns s32, adapt qe_sdma_init() and avoid another few IS_ERR_VALUE() uses. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 611780a6aa500345360bcda8a6dfdcd0666d4695 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:45 2019 +0100 soc: fsl: qe: avoid IS_ERR_VALUE in ucc_slow.c When trying to build this for a 64-bit platform, one gets warnings from using IS_ERR_VALUE on something which is not sizeof(long). Instead, change the various *_offset fields to store a signed integer, and simply check for a negative return from qe_muram_alloc(). Since qe_muram_free() now accepts and ignores a negative argument, we only need to make sure these fields are initialized with -1, and we can just unconditionally call qe_muram_free() in ucc_slow_free(). Note that the error case for us_pram_offset failed to set that field to 0 (which, as noted earlier, is anyway a bogus sentinel value). Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit ec2058ac8f507865f7a7c353473bf0f4ebce5fc0 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:44 2019 +0100 soc: fsl: qe: refactor cpm_muram_alloc_common to prevent BUG on error path If the kmalloc() fails, we try to undo the gen_pool allocation we've just done. Unfortunately, start has already been modified to subtract the GENPOOL_OFFSET bias, so we're freeing something that very likely doesn't exist in the gen_pool, meaning we hit the kernel BUG at lib/genalloc.c:399! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM ... [<803fd0e8>] (gen_pool_free) from [<80426bc8>] (cpm_muram_alloc_common+0xb0/0xc8) [<80426bc8>] (cpm_muram_alloc_common) from [<80426c28>] (cpm_muram_alloc+0x48/0x80) [<80426c28>] (cpm_muram_alloc) from [<80428214>] (ucc_slow_init+0x110/0x4f0) [<80428214>] (ucc_slow_init) from [<8044a718>] (qe_uart_request_port+0x3c/0x1d8) (this was tested by just injecting a random failure by adding "|| (get_random_int()&7) == 0" to the "if (!entry)" condition). Refactor the code so we do the kmalloc() first, meaning that's the thing that needs undoing in case gen_pool_alloc_algo() then fails. This allows a later cleanup to move the locking from the callers into the _common function, keeping the kmalloc() out of the critical region and then, hopefully (if all the muram_alloc callers allow) change it to a GFP_KERNEL allocation. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit b6231ea2b3c68101da186f0d274635a620dbf7a4 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:43 2019 +0100 soc: fsl: qe: drop broken lazy call of cpm_muram_init() cpm_muram_alloc_common() tries to support a kind of lazy initialization - if the muram_pool has not been created yet, it calls cpm_muram_init(). Now, cpm_muram_alloc_common() is always called under spin_lock_irqsave(&cpm_muram_lock, flags); and cpm_muram_init() does gen_pool_create() (which implies a GFP_KERNEL allocation) and ioremap(), not to mention the fun that ensues from cpm_muram_init() doing spin_lock_init(&cpm_muram_lock); In other words, this has never worked, so nobody can have been relying on it. cpm_muram_init() is called from a subsys_initcall (either from cpm_init() in arch/powerpc/sysdev/cpm_common.c or, via qe_reset(), from qe_init() in drivers/soc/fsl/qe/qe.c). Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 900470ce39996336a1d06da2015506106bb8ba42 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:42 2019 +0100 soc: fsl: qe: make cpm_muram_free() ignore a negative offset This allows one to simplify callers since they can store a negative value as a sentinel to indicate "this was never allocated" (or store the -ENOMEM from an allocation failure) and then call cpm_muram_free() unconditionally. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 754f40e0977cd20c37ef4837ec2904ccd89125ce Author: Rasmus Villemoes Date: Thu Nov 28 15:55:41 2019 +0100 soc: fsl: qe: make cpm_muram_free() return void Nobody uses the return value from cpm_muram_free, and functions that free resources usually return void. One could imagine a use for a "how much have I allocated" a la ksize(), but knowing how much one had access to after the fact is useless. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 800cd6fb76f0ec7711deb72a86c924db1ae42648 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:40 2019 +0100 soc: fsl: qe: change return type of cpm_muram_alloc() to s32 There are a number of problems with cpm_muram_alloc() and its callers. Most callers assign the return value to some variable and then use IS_ERR_VALUE to check for allocation failure. However, when that variable is not sizeof(long), this leads to warnings - and it is indeed broken to do e.g. u32 foo = cpm_muram_alloc(); if (IS_ERR_VALUE(foo)) on a 64-bit platform, since the condition foo >= (unsigned long)-ENOMEM is tautologically false. There are also callers that ignore the possibility of error, and then there are those that check for error by comparing the return value to 0... One could fix that by changing all callers to store the return value temporarily in an "unsigned long" and test that. However, use of IS_ERR_VALUE() is error-prone and should be restricted to things which are inherently long-sized (stuff in pt_regs etc.). Instead, let's aim for changing to the standard kernel style int foo = cpm_muram_alloc(); if (foo < 0) deal_with_it() some->where = foo; Changing the return type from unsigned long to s32 (aka signed int) doesn't change the value that gets stored into any of the callers' variables except if the caller was storing the result in a u64 _and_ the allocation failed, so in itself this patch should be a no-op. Another problem with cpm_muram_alloc() is that it can certainly validly return 0 - and except if some cpm_muram_alloc_fixed() call interferes, the very first cpm_muram_alloc() call will return just that. But that shows that both ucc_slow_free() and ucc_fast_free() are buggy, since they assume that a value of 0 means "that field was never allocated". We'll later change cpm_muram_free() to accept (and ignore) a negative offset, so callers can use a sentinel of -1 instead of 0 and just unconditionally call cpm_muram_free(). Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 09a39ec9decd99ef4dfaa21a83ce09f719495b49 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:39 2019 +0100 serial: ucc_uart: access __be32 field using be32_to_cpu The buf member of struct qe_bd is a __be32, so to make this work on little-endian hosts, use be32_to_cpu when reading it. Reviewed-by: Timur Tabi Acked-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit b0816f88b9b5a829401a1473e51c7001940d616f Author: Rasmus Villemoes Date: Thu Nov 28 15:55:38 2019 +0100 serial: ucc_uart: limit brg-frequency workaround to PPC32 According to Timur Tabi This bug in older U-Boots is definitely PowerPC-specific So before allowing this driver to be built for platforms other than PPC32, make sure that we don't accept malformed device trees on those other platforms. Suggested-by: Timur Tabi Reviewed-by: Timur Tabi Acked-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 89ad26f5f8bbcbdb54096bc8786d9b6f0acb79e6 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:37 2019 +0100 serial: ucc_uart: use of_property_read_u32() in ucc_uart_probe() For this to work correctly on little-endian hosts, don't access the device-tree properties directly in native endianness, but use the of_property_read_u32() helper. Reviewed-by: Timur Tabi Acked-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 002dedc5e933f6683b48de2f5702089c65b86bd1 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:36 2019 +0100 serial: ucc_uart: stub out soft_uart_init for !CONFIG_PPC32 The Soft UART hack is only needed for some PPC-based SOCs. To allow building this driver for non-PPC, guard soft_uart_init() and its helpers by CONFIG_PPC32, and use a no-op soft_uart_init() otherwise. Reviewed-by: Timur Tabi Acked-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 96b6b6aaac79c5cef667a80c88e87b9fe147ef9a Author: Rasmus Villemoes Date: Thu Nov 28 15:55:35 2019 +0100 serial: ucc_uart: factor out soft_uart initialization The "soft uart" mechanism is a workaround for a silicon bug which (as far as I know) only affects some PPC-based SOCs. The code that determines which microcode blob to request relies on some powerpc-specific bits (e.g. the mfspr(SPRN_SVR) and hence also the asm/reg.h header). This makes it a little awkward to allow this driver to be built for non-PPC based SOCs with a QE, even if they are not affected by that silicon bug and thus don't need any of the Soft UART logic. There's no way around guarding those bits with some ifdeffery, so to keep that isolated, factor out the do-we-need-soft-uart-and-if-so-handle-the-firmware to a separate function, which we can then easily stub out for non-PPC. Reviewed-by: Timur Tabi Acked-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 8b1cdc4033bd1659c5499c918d4e59bf8253abec Author: Rasmus Villemoes Date: Thu Nov 28 15:55:34 2019 +0100 serial: ucc_uart: replace ppc-specific IO accessors Some ARM-based SOCs (e.g. LS1021A) also have a QUICC engine. As preparation for allowing this driver to build on ARM, replace the ppc-specific in_be16() etc. by the qe_io* helpers. Done via coccinelle. Reviewed-by: Timur Tabi Acked-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 2f58c2ae9e50a91089b57d7129ef2958af552567 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:33 2019 +0100 serial: ucc_uart: explicitly include soc/fsl/cpm.h This driver uses #defines from soc/fsl/cpm.h, so instead of relying on some other header pulling that in, do that explicitly. This is preparation for allowing this driver to build on ARM. Reviewed-by: Timur Tabi Acked-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit c1c80cde7f78c058dcbf0f5c384822094751e022 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:32 2019 +0100 soc/fsl/qe/qe.h: update include path for cpm.h asm/cpm.h under arch/powerpc is now just a wrapper for including soc/fsl/cpm.h. In order to make the qe.h header usable on other architectures, use the latter path directly. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit d5b4a762b7bb4a472b2a525749d3bea8023035bc Author: Rasmus Villemoes Date: Thu Nov 28 15:55:31 2019 +0100 soc: fsl: move cpm.h from powerpc/include/asm to include/soc/fsl Some drivers, e.g. ucc_uart, need definitions from cpm.h. In order to allow building those drivers for non-ppc based SOCs, move the header to include/soc/fsl. For now, leave a trivial wrapper at the old location so drivers can be updated one by one. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit b3f4ff62f62c08928710fa6c52924dd3745da9cf Author: Rasmus Villemoes Date: Thu Nov 28 15:55:30 2019 +0100 soc: fsl: qe: qe_io.c: use of_property_read_u32() in par_io_init() This is necessary for this to work on little-endian hosts. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 6aef512387822723ecd114278d935307269e8f12 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:29 2019 +0100 soc: fsl: qe: qe_io.c: access device tree property using be32_to_cpu We need to apply be32_to_cpu to make this work correctly on little-endian hosts. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit abc6311b99f2ef0f4d17cf6109de5bc1ae1b98f6 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:28 2019 +0100 soc: fsl: qe: qe_io.c: don't open-code of_parse_phandle() Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 123ee6e90b06b1b1a12cfe1f438c8faf3b21bd28 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:27 2019 +0100 soc: fsl: qe: qe.c: use of_property_read_* helpers Instead of manually doing of_get_property/of_find_property and reading the value by assigning to a u32* or u64* and dereferencing, use the of_property_read_* functions. This make the code more readable, and more importantly, is required for this to work correctly on little-endian platforms. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 9dab15b1a0e3fabdca9e1adb13ef946332b8c0b8 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:26 2019 +0100 soc: fsl: qe: merge qe_ic.h headers into qe_ic.c The public qe_ic.h header is no longer included by anything but qe_ic.c. Merge both headers into qe_ic.c, and drop the unused constants. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 882c626d1d4650c5318000430f83476067e93b37 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:25 2019 +0100 soc: fsl: qe: simplify qe_ic_init() qe_ic_init() takes a flags parameter, but all callers (including the sole remaining one) have always passed 0. So remove that parameter and simplify the body accordingly. We still explicitly initialize the Interrupt Configuration Register (CICR) to its reset value of all-zeroes, just in case the bootloader has played funny games. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 5bd2022234527f70219b9c37beb71fbdbdfc3f5b Author: Rasmus Villemoes Date: Thu Nov 28 15:55:24 2019 +0100 soc: fsl: qe: make qe_ic_get_{low,high}_irq static These are only called from within qe_ic.c, so make them static. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 10d7930dbb51a88399d7030c20310e45069e5b5d Author: Rasmus Villemoes Date: Thu Nov 28 15:55:23 2019 +0100 soc: fsl: qe: don't use NO_IRQ in qe_ic.c This driver is currently PPC-only, and on powerpc, NO_IRQ is 0, so this doesn't change functionality. However, not every architecture defines NO_IRQ, and some define it as -1, so the detection of a failed irq_of_parse_and_map() (which returns 0 on failure) would be wrong on those. So to prepare for allowing this driver to build on other architectures, drop all references to NO_IRQ. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit d7c2878cfcfad2bccc939b755ef2386d13b49684 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:22 2019 +0100 soc: fsl: qe: remove unused qe_ic_set_* functions There are no current callers of these functions, and they use the ppc-specific virq_to_hw(). So removing them gets us one step closer to building QE support for ARM. If the functionality is ever actually needed, the code can be dug out of git and then adapted to work on all architectures, but for future reference please note that I believe qe_ic_set_priority is buggy: The "priority < 4" should be "priority <= 4", and in the else branch 24 should be replaced by 28, at least if I'm reading the data sheet right. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 523eef1d206a679b136d9c47dc5ee168471d17fa Author: Rasmus Villemoes Date: Thu Nov 28 15:55:21 2019 +0100 soc: fsl: qe: rename qe_ic_cascade_low_mpic -> qe_ic_cascade_low The qe_ic_cascade_{low,high}_mpic functions are now used as handlers both when the interrupt parent is mpic as well as ipic, so remove the _mpic suffix. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit a36742d13a1deb16b9e80cbb303b7b6b2d2e120d Author: Rasmus Villemoes Date: Thu Nov 28 15:55:20 2019 +0100 soc: fsl: qe: move qe_ic_cascade_* functions to qe_ic.c These functions are only ever called through a function pointer, and therefore it makes no sense for them to be "static inline" - gcc has no choice but to emit a copy in each translation unit that takes the address of one of these. Since they are now only referenced from qe_ic.c, just make them local to that file. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 01a2ffbdb2e5fabfccdca770c1aee11f0fdc2c8f Author: Rasmus Villemoes Date: Thu Nov 28 15:55:18 2019 +0100 powerpc/83xx: remove mpc83xx_ipic_and_qe_init_IRQ This is now exactly the same as mpc83xx_ipic_init_IRQ, so just use that directly. Acked-by: Scott Wood Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 4e0e161d3cc403823159b2c15b6f4c9f642fd1d3 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:17 2019 +0100 soc: fsl: qe: move calls of qe_ic_init out of arch/powerpc/ Having to call qe_ic_init() from platform-specific code makes it awkward to allow building the QE drivers for ARM. It's also a needless duplication of code, and slightly error-prone: Instead of the caller needing to know the details of whether the QUICC Engine High and QUICC Engine Low are actually the same interrupt (see e.g. the machine_is() in mpc85xx_mds_qeic_init), just let the init function choose the appropriate handlers after it has parsed the DT and figured it out. If the two interrupts are distinct, use separate handlers, otherwise use the handler which first checks the CHIVEC register (for the high priority interrupts), then the CIVEC. All existing callers pass 0 for flags, so continue to do that from the new single caller. Later cleanups will remove that argument from qe_ic_init and simplify the body, as well as make qe_ic_init into a proper init function for an IRQCHIP_DECLARE, eliminating the need to manually look up the fsl,qe-ic node. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 273e66721e368764659dde52ee4702567c921f49 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:16 2019 +0100 soc: fsl: qe: use qe_ic_cascade_{low, high}_mpic also on 83xx The *_ipic and *_mpic handlers are almost identical - the only difference is that the latter end with an unconditional chip->irq_eoi() call. Since IPIC does not have ->irq_eoi, we can reduce some code duplication by calling irq_eoi conditionally. This is similar to what is already done in mpc8xxx_gpio_irq_cascade(). This leaves the functions slightly misnamed, but that will be fixed in a subsequent patch. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit ea275d1f07c1f2fbaa48f0e100ee23a80ac909dc Author: Rasmus Villemoes Date: Thu Nov 28 15:55:15 2019 +0100 soc: fsl: qe: remove pointless sysfs registration in qe_ic.c There's no point in registering with sysfs when that doesn't actually allow any interaction with the device or driver (no uevents, no sysfs files that provide information or allow configuration, no nothing). Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 003204b4640b62dedb71c55b3c600bbf8e99522a Author: Rasmus Villemoes Date: Thu Nov 28 15:55:14 2019 +0100 soc: fsl: qe: drop assign-only high_active in qe_ic_init high_active is only assigned to but never used. Remove it. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 43223922f947f8247f6c3b4392dfc91f8ae212fd Author: Rasmus Villemoes Date: Thu Nov 28 15:55:13 2019 +0100 soc: fsl: qe: drop unneeded #includes These includes are not actually needed, and asm/rheap.h and sysdev/fsl_soc.h are PPC-specific, hence prevent compiling QE for other architectures. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit df049d1f491651ceca94a0318839b4069cb661a6 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:12 2019 +0100 soc: fsl: qe: qe.c: guard use of pvr_version_is() with CONFIG_PPC32 Commit e5c5c8d23fef (soc/fsl/qe: only apply QE_General4 workaround on affected SoCs) introduced use of pvr_version_is(), saying The QE_General4 workaround is only valid for the MPC832x and MPC836x SoCs. The other SoCs that embed a QUICC engine are not affected by this hardware bug and thus can use the computed divisors (this was successfully tested on the T1040). I'm reading the above as saying that the errata does not apply to the ARM-based SOCs with QUICC engine. In any case, use of pvr_version_is() must be guarded by CONFIG_PPC32 before we can remove the PPC32 dependency from CONFIG_QUICC_ENGINE, so introduce qe_general4_errata() to keep the necessary #ifdeffery localized to a trivial helper. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 580996853864728ea91a48fb13d39d9c83d19106 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:11 2019 +0100 soc: fsl: qe: replace spin_event_timeout by readx_poll_timeout_atomic In preparation for allowing QE to be built for architectures other than ppc, use the generic readx_poll_timeout_atomic() helper from iopoll.h rather than the ppc-only spin_event_timeout(). Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 77d7676a92d1541ac6245811a754c70c605a974d Author: Rasmus Villemoes Date: Thu Nov 28 15:55:10 2019 +0100 soc: fsl: qe: avoid ppc-specific io accessors In preparation for allowing to build QE support for architectures other than PPC, replace the ppc-specific io accessors by the qe_io* macros. Done via $ spatch --sp-file io.cocci --in-place drivers/soc/fsl/qe/ where io.cocci is @@ expression addr, val; @@ - out_be32(addr, val) + qe_iowrite32be(val, addr) @@ expression addr; @@ - in_be32(addr) + qe_ioread32be(addr) @@ expression addr, val; @@ - out_be16(addr, val) + qe_iowrite16be(val, addr) @@ expression addr; @@ - in_be16(addr) + qe_ioread16be(addr) @@ expression addr, val; @@ - out_8(addr, val) + qe_iowrite8(val, addr) @@ expression addr; @@ - in_8(addr) + qe_ioread8(addr) @@ expression addr, clr, set; @@ - clrsetbits_be32(addr, clr, set) + qe_clrsetbits_be32(addr, clr, set) @@ expression addr, clr, set; @@ - clrsetbits_be16(addr, clr, set) + qe_clrsetbits_be16(addr, clr, set) @@ expression addr, clr, set; @@ - clrsetbits_8(addr, clr, set) + qe_clrsetbits_8(addr, clr, set) @@ expression addr, set; @@ - setbits32(addr, set) + qe_setbits_be32(addr, set) @@ expression addr, set; @@ - setbits16(addr, set) + qe_setbits_be16(addr, set) @@ expression addr, set; @@ - setbits8(addr, set) + qe_setbits_8(addr, set) @@ expression addr, clr; @@ - clrbits32(addr, clr) + qe_clrbits_be32(addr, clr) @@ expression addr, clr; @@ - clrbits16(addr, clr) + qe_clrbits_be16(addr, clr) @@ expression addr, clr; @@ - clrbits8(addr, clr) + qe_clrbits_8(addr, clr) Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 6ac9b61786cc64ae5cbfb69413137656f72e8204 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:09 2019 +0100 soc: fsl: qe: introduce qe_io{read,write}* wrappers The QUICC engine drivers use the powerpc-specific out_be32() etc. In order to allow those drivers to build for other architectures, those must be replaced by iowrite32be(). However, on powerpc, out_be32() is a simple inline function while iowrite32be() is out-of-line. So in order not to introduce a performance regression on powerpc when making the drivers work on other architectures, introduce qe_io* helpers. Also define the qe_{clr,set,clrset}bits* helpers in terms of these new macros. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit d9d95bcad38d18536ecf344e3f4105ed3c7dc7f7 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:08 2019 +0100 soc: fsl: qe: rename qe_(clr/set/clrset)bit* helpers Make it clear that these operate on big-endian registers (i.e. use the iowrite*be primitives) before we introduce more uses of them and allow the QE drivers to be built for platforms other than ppc32. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit cf037a9b7af615f0543afae5daf2954a246ad321 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:07 2019 +0100 soc: fsl: qe: drop volatile qualifier of struct qe_ic::regs The actual io accessors (e.g. in_be32) implicitly add a volatile qualifier to their address argument. Remove volatile from the struct definition and the qe_ic_(read/write) helpers, in preparation for switching from the ppc-specific io accessors to generic ones. Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit 1972194f9633386e3551eb7e44fc605141287721 Author: Rasmus Villemoes Date: Thu Nov 28 15:55:06 2019 +0100 soc: fsl: qe: remove space-before-tab Reviewed-by: Timur Tabi Signed-off-by: Rasmus Villemoes Signed-off-by: Li Yang commit e52a033610b0f220f488faaf579a61d7ab31616a Author: Eugen Hristev Date: Thu Dec 5 07:43:59 2019 +0000 ARM: dts: at91: sama5d27_som1_ek: add i2c filters properties Add properties for i2c filters for i2c0 and i2c1 on sama5d27_som1_ek. Noise is affecting communication on i2c for example when connecting i2c camera sensors. Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/1575531818-21332-1-git-send-email-eugen.hristev@microchip.com Signed-off-by: Alexandre Belloni commit 5d4c3cfb63fe311dfa592dc20995907429f6710b Author: Eugen Hristev Date: Tue Nov 12 07:19:56 2019 +0000 ARM: dts: at91: sama5d27_wlsom1: add SAMA5D27 wlsom1 and wlsom1-ek This is the addition of a new Evaluation Kit the SAMA5D27-WLSOM1-EK. It's based on the Microchip WireLess SoM which contains the SAMA5D27 LPDDR2 2Gbits SiP. [nicolas.ferre@microchip.com]: initial implementation Signed-off-by: Nicolas Ferre [eugen.hristev@microchip.com]: ported to new kernel version, [eugen.hristev@microchip.com]: addition of peripherals (adc, pmic, qspi, uart) Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/1573543139-8533-4-git-send-email-eugen.hristev@microchip.com Signed-off-by: Alexandre Belloni commit c963e34f5ac6fab4913e3806e97bfdf089cb4cc6 Author: Eugen Hristev Date: Tue Nov 12 07:19:54 2019 +0000 dt-bindings: ARM: at91: Document SAMA5D27 WLSOM1 and Evaluation Kit Document device tree binding of SAMA5D27 WLSOM1 - Wireless module; and SAMA5D27 WLSOM1 EK - Wireless module evaluation kit, from Microchip. Signed-off-by: Eugen Hristev Link: https://lore.kernel.org/r/1573543139-8533-3-git-send-email-eugen.hristev@microchip.com Reviewed-by: Rob Herring Signed-off-by: Alexandre Belloni commit 4514a7c81234673a764c59e59a0c34c1921f093b Author: Andrei Stefanescu Date: Tue Nov 12 07:19:51 2019 +0000 ARM: dts: at91: sama5d2: mark secumod as a GPIO controller The Security Module exposes the PIOBU pins which an be used as regular GPIOs. The PIOBU pins are special because they do not lose their voltage during suspend-to-mem. This patch marks the secumod as a GPIO controller. Signed-off-by: Andrei Stefanescu [razvan.stefanescu@microchip.com Updated title] Signed-off-by: Razvan Stefanescu Link: https://lore.kernel.org/r/1573543139-8533-2-git-send-email-eugen.hristev@microchip.com Signed-off-by: Alexandre Belloni commit d8beb54edb7865f56a5ef85b95f3858cf512ba9f Author: Razvan Stefanescu Date: Tue Nov 12 07:19:48 2019 +0000 ARM: dts: at91: sama5d2: disable pwm0 by default It will be enabled as needed by each board. Signed-off-by: Razvan Stefanescu Link: https://lore.kernel.org/r/1573543139-8533-1-git-send-email-eugen.hristev@microchip.com Signed-off-by: Alexandre Belloni commit 4a63ef710cc3e79ce58b46b122118e415a44b3db Merge: e7096c131e51 7ecacafc2406 Author: David S. Miller Date: Mon Dec 9 10:49:25 2019 -0800 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: bluetooth-next 2019-12-09 Here's the first bluetooth-next pull request for 5.6: - Devicetree bindings updates for Broadcom controllers - Add support for PCM configuration for Broadcom controllers - btusb: Fixes for Realtek devices - butsb: A few other smaller fixes (mem leak & non-atomic allocation issue) Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller commit 4a07b8bcd503c842bcf0171cdbccdfdac3d985c3 Author: Linus Walleij Date: Thu Dec 5 10:13:40 2019 +0100 spi: bitbang: Make chipselect callback optional The ->chipselect() callback on the bit-banged SPI library master is optional if using GPIO descriptors: when using descriptors exclusively without any native chipselects, the core does not even call out the the native ->set_cs() and therefore ->chipselect() on a bit-banged SPI master will not even be called in this case. Make sure to respect the SPI_MASTER_GPIO_SS as used by e.g. spi-gpio.c though: this setting will make the core handle the chip select using GPIO descriptors *AND* call the local chipselect handler. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191205091340.59850-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit 8a6553ecdf976d6a34664bd491f0ea74a15aa982 Author: Linus Walleij Date: Thu Dec 5 09:34:01 2019 +0100 spi: stm32: Switch to use GPIO descriptors for CS This switches the STM32 SPI driver over to using GPIO descriptors for chip select. Instead of the callbacks for picking the GPIO lines using the legacy API we just let the core handle it all using descriptors. Cc: Fabien Dessenne Cc: Amelie Delaunay Cc: Cezary Gapinski Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191205083401.27077-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit 10e413faa72c6f728ead2c6cc140f834af7bee8d Author: zhengbin Date: Thu Nov 28 10:51:52 2019 +0800 spi/topcliff-pch: Remove unneeded semicolon Fixes coccicheck warning: drivers/spi/spi-topcliff-pch.c:866:47-48: Unneeded semicolon drivers/spi/spi-topcliff-pch.c:881:53-54: Unneeded semicolon Reported-by: Hulk Robot Signed-off-by: zhengbin Link: https://lore.kernel.org/r/1574909512-24260-1-git-send-email-zhengbin13@huawei.com Signed-off-by: Mark Brown commit 21b2c47161449c44e5a70eab646260aaeceb331c Author: Benjamin Gaignard Date: Fri Nov 22 11:45:36 2019 +0100 dt-bindings: regulator: Convert stm32 vrefbuf bindings to json-schema Convert the STM32 regulator vrefbuf binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard CC: Fabrice Gasnier Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191122104536.20283-2-benjamin.gaignard@st.com Signed-off-by: Mark Brown commit 681700c38f3e989a3da940d0120b0268c25c54d8 Author: Benjamin Gaignard Date: Fri Nov 22 11:45:35 2019 +0100 dt-bindings: regulator: Convert stm32 booster bindings to json-schema Convert the STM32 regulator booster binding to DT schema format using json-schema Signed-off-by: Benjamin Gaignard CC: Fabrice Gasnier Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20191122104536.20283-1-benjamin.gaignard@st.com Signed-off-by: Mark Brown commit b8a039d37792067c1a380dc710361905724b9b2f Author: Miquel Raynal Date: Tue Dec 3 17:47:09 2019 +0100 regulator: rk808: Lower log level on optional GPIOs being not available RK808 can leverage a couple of GPIOs to tweak the ramp rate during DVS (Dynamic Voltage Scaling). These GPIOs are entirely optional but a dev_warn() appeared when cleaning this driver to use a more up-to-date gpiod API. At least reduce the log level to 'info' as it is totally fine to not populate these GPIO on a hardware design. This change is trivial but it is worth not polluting the logs during bringup phase by having real warnings and errors sorted out correctly. Fixes: a13eaf02e2d6 ("regulator: rk808: make better use of the gpiod API") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/r/20191203164709.11127-1-miquel.raynal@bootlin.com Signed-off-by: Mark Brown commit d612b455f120d05a42c95ccd7469fa13efb8d307 Author: Ranjani Sridharan Date: Wed Dec 4 15:15:56 2019 -0600 ASoC: SOF: nocodec: Amend arguments for sof_nocodec_setup() Set the drv_name and tplg_filename for nocodec machine driver in sof_machine_check(). This means the sof_nocodec_setup() does not need the mach, plat_data or desc arguments any longer. Signed-off-by: Daniel Baluta Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191204211556.12671-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5ad1cece81db9b389526499ae2e784013c85f136 Author: Daniel Baluta Date: Wed Dec 4 15:15:55 2019 -0600 ASoC: SOF: Remove unused drv_name in sof_pdata This field is only set but never used. Let's remove it to make code cleaner. Signed-off-by: Daniel Baluta Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191204211556.12671-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f4e4113b2aec2d344276ac07f78e80460eb8ebf8 Author: Ranjani Sridharan Date: Wed Dec 4 15:15:54 2019 -0600 ASoC: SOF: remove nocodec_fw_filename Remove nocodec_fw_filename from struct sof_dev_desc as it is not longer needed. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191204211556.12671-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 285880a23d105e5d34b311b0c44061dffb07e405 Author: Daniel Baluta Date: Wed Dec 4 15:15:53 2019 -0600 ASoC: SOF: Make creation of machine device from SOF core optional Currently, SOF probes machine drivers by creating a platform device and passing the machine description as private data. This is driven by the ACPI restrictions. Ideally, ACPI tables should contain the description for the machine driver. This is not possible because ACPI tables are frozen and used on multiple OS-es (e.g Windows). In the case of Device Tree we don't have this restriction, so we choose to probe the machine drivers by creating a DT node as is the standard ALSA way. This patch makes the probing of machine drivers from SOF core optional allowing for Device Tree platforms to decouple the SOF core from machine driver probing. Along with this, it also consolidates the machine driver selection for Intel platforms by defining optional ops for selecting the machine driver based on the ACPI match for HDA and non-HDA platforms and setting the mach params. Signed-off-by: Daniel Baluta Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191204211556.12671-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 80acdd4f8ff763183dc1cd7f1cd31db9eaaecdc8 Author: Ranjani Sridharan Date: Wed Dec 4 15:15:52 2019 -0600 ASoC: SOF: intel: hda: Modify signature for hda_codec_probe_bus() The machine driver selection for HDA platforms will be consolidated and moved out of the SOF DSP probe callback. In preparation for that, modify the signature for hda_codec_probe_bus() to pass the hda_codec_use_common_hdmi as a variable while probing the HDA codecs. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191204211556.12671-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ee1e79b72e3cf5eac42ba9de827536f91d4c04e2 Author: Ranjani Sridharan Date: Wed Dec 4 15:15:51 2019 -0600 ASoC: SOF: partition audio-related parts from SOF core Move all the audio-specific code in the core, audio-specific logic in the top-level PM callbacks and the core header files into a separate file (sof-audio.*) in preparation for adding an audio client device. In the process of moving all structure definitions for widget, routes, pcm's etc, the snd_sof_dev member in all these structs is replaced with the snd_soc_component member. Also, use the component device instead of the snd_sof_dev device wherever possible in the PCM component driver, control IO functions and the topology parser as the component device will be moved over to the client device later on. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191204211556.12671-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 03eec9b4eb897dde5985579508c978e7a29052bd Author: Ranjani Sridharan Date: Wed Dec 4 15:15:50 2019 -0600 ASoC: SOF: Introduce default_fw_filename member in sof_dev_desc Currently the FW filename is obtained from the ACPI matching table when determining which machine driver to use. In preparation for making the machine driver ACPI match optional for Device Tree platforms and moving the machine driver selection out of the SOF core, this patch introduces the default_fw_filename member in struct sof_dev_desc. Once the machine driver selection is moved out of SOF core, the nocodec_fw_filename will become obsolete and will be removed. Signed-off-by: Ranjani Sridharan Signed-off-by: Daniel Baluta Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191204211556.12671-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8c583f526ee9df5c6693f54ac272b7e103b5f1d2 Author: Ranjani Sridharan Date: Wed Dec 4 15:15:49 2019 -0600 ASoC: SOF: core: move check for runtime callbacks to core For some platforms, the refcount is explicitly incremented to prevent it from entering runtime suspend. This should be be done during probe in the core instead of being done in the PCM driver. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191204211556.12671-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 3e62579436c6a7fc35de7318e6c5f495b8d0046c Author: Ranjani Sridharan Date: Wed Dec 4 15:15:48 2019 -0600 ASoC: SOF: core: modify the signature for snd_sof_create_page_table Modify the signature for snd_sof_create_page_table to take struct device pointer as an argument instead of struct snd_sof_dev as this will be used by both the SOF core device and its clients. Also, move the definition out of core.c to utils.c. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191204211556.12671-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 78fd4ffd75eed354c1c8b567dd0b384053c933da Author: Ranjani Sridharan Date: Wed Dec 4 15:15:47 2019 -0600 ASoC: SOF: topology: remove snd_sof_init_topology() Remove snd_sof_init_topology() as it is never used. Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191204211556.12671-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b5706f8ec29fb461571d25e3e813ede121fe31cd Author: Jaroslav Kysela Date: Wed Dec 4 15:15:46 2019 -0600 ASoC: Intel - do not describe I/O configuration in the long card name The long card name might be used in GUI. This information should be hidden. Add CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES configuration option. Signed-off-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Cc: Mark Brown Link: https://lore.kernel.org/r/20191204211556.12671-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0d5c8187562848b619a35f2ffc5e18ce703e9f3d Author: Jaroslav Kysela Date: Wed Dec 4 15:15:45 2019 -0600 ASoC: Intel - use control components to describe card config Use the control interface (field 'components' in the info structure) to pass the I/O configuration details. The goal is to replace the card long name with this. Signed-off-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Cc: Mark Brown Link: https://lore.kernel.org/r/20191204211556.12671-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8cd9956f61c65022209ce6d1e55ed12aea12357d Author: Jaroslav Kysela Date: Wed Dec 4 15:15:44 2019 -0600 ASoC: intel/skl/hda - export number of digital microphones via control components It is required for the auto-detection in the user space (for UCM). Signed-off-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Cc: Mark Brown Link: https://lore.kernel.org/r/20191204211556.12671-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1442842952ccfe4178602c7a8459ac2ecb9d9e1a Author: Jerome Brunet Date: Fri Dec 6 11:35:42 2019 +0100 ASoC: hdmi-codec: re-introduce mutex locking again The dai codec needs to ensure that on one dai is used at any time. This is currently protected by bit atomic operation. With this change, it done with a mutex instead. This change is not about functionality or efficiency. It is done with the hope that it help maintainability in the future. Suggested-by: Mark Brown Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20191206103542.485224-1-jbrunet@baylibre.com Signed-off-by: Mark Brown commit bc9a665581b3c6c82c9220a47f6573b49ce2df0b Author: Randy Dunlap Date: Sun Dec 8 20:37:04 2019 -0800 ASoC: fix soc-core.c kernel-doc warning Fix a kernel-doc warning in soc-core.c by adding notation for @legacy_dai_naming. ../sound/soc/soc-core.c:2509: warning: Function parameter or member 'legacy_dai_naming' not described in 'snd_soc_register_dai' Signed-off-by: Randy Dunlap Cc: Liam Girdwood Cc: Mark Brown Cc: alsa-devel@alsa-project.org Link: https://lore.kernel.org/r/2215ee04-e870-5eea-a00c-9a5caf06faae@infradead.org Signed-off-by: Mark Brown commit 7c11af9fcdc425b80f140a218d4fef9f17734bfc Author: Bard Liao Date: Wed Dec 4 15:28:59 2019 -0600 ASoC: SOF: Intel: hda: solve MSI issues by merging ipc and stream irq handlers The existing code uses two handlers for a shared edge-based MSI interrupts. In corner cases, interrupts are lost, leading to IPC timeouts. Those timeouts do not appear in legacy mode. This patch merges the two handlers and threads into a single one, and simplifies the mask/unmask operations by using a single top-level mask (Global Interrupt Enable). The handler only checks for interrupt sources using the Global Interrupt Status (GIS) field, and all the actual work happens in the thread. This also enables us to remove the use of spin locks. Stream events are prioritized over IPC ones. This patch was tested with HDaudio and SoundWire platforms, and all known IPC timeout issues are solved in MSI mode. The SoundWire-specific patches will be provided in follow-up patches, where the SoundWire interrupts are handled in the same thread as IPC and stream interrupts. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191204212859.13239-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 253f584a0699d12a90bde9d524d499a921cc7827 Author: Peter Ujfalusi Date: Wed Dec 4 21:20:05 2019 +0200 ASoC: ti: davinci-mcasp: Improve the sysclk selection When McASP is master the bclk can be generated from two main source: AUXCLK: functional clock for McASP or AHCLK: from external source or internal mux in dra7x family With this patch it is possible to select between the two source. The patch is not breaking existing machine drivers since historically the clk_id was ignored and left as 0 in all cases. When output clock is configured - which can be only the AHCLK, we select the AUXCLK as source for the internal HCLK. In this case the HCLK rate is the same as the output clock. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20191204192005.31210-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit abe3b6727b653307c27870a2d4ecbf9de4e914a5 Author: Olivier Moysan Date: Tue Dec 3 15:16:27 2019 +0100 ASoC: cs42l51: add dac mux widget in codec routes Add "DAC mux" DAPM widget in CS42l51 audio codec routes, to support DAC mux control and to remove error trace "DAC Mux has no paths" at widget creation. Note: ADC path of DAC mux is not routed in this patch. Signed-off-by: Olivier Moysan Link: https://lore.kernel.org/r/20191203141627.29471-1-olivier.moysan@st.com Signed-off-by: Mark Brown commit 49df1e3925824cf44e590daac635974270185841 Author: Geert Uytterhoeven Date: Mon Dec 2 16:58:34 2019 +0100 ASoC: rsnd: Calculate DALIGN inversion at run-time There is no need to store the inverted DALIGN values in the table, as they can easily be calculated at run-time. This also protects against the introduction of inconsistencies between normal and inverted values by a future table modification. Reorder the two subexpressions in the AND check, to perform the least expensive check first. Signed-off-by: Geert Uytterhoeven Reviewed-by: Eugeniu Rosca Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20191202155834.22582-1-geert+renesas@glider.be Signed-off-by: Mark Brown commit 3176f94c467cf89f74120c34a3ddd9aaf8941be2 Author: Nikita Yushchenko Date: Fri Nov 29 16:27:19 2019 +0300 ASoC: tlv320aic31xx: Add Volume Soft Stepping control Chip supports soft stepping of volume changes and it is enabled by default. This patch adds a control for it, so it could be either made slower (two sample periods per step instead of one), or disabled. Signed-off-by: Nikita Yushchenko Link: https://lore.kernel.org/r/20191129132719.11603-1-nikita.yoush@cogentembedded.com Signed-off-by: Mark Brown commit 62d5ae4cafb7ffeeec6ba2dd1814cafeeea7dd8f Author: Tzung-Bi Shih Date: Thu Nov 28 23:19:08 2019 +0800 ASoC: max98090: save and restore SHDN when changing sensitive registers According to the datasheet, there are some registers can only be changed when SHDN is 0. Changing these settings during SHDN = 1 can compromise device stability and performance specifications. Saves SHDN before writing to these sensitive registers and restores SHDN afterward. Here is the register list codec driver of max98090 wants to change: M98090_REG_QUICK_SYSTEM_CLOCK 0x04 M98090_REG_QUICK_SAMPLE_RATE 0x05 M98090_REG_DAI_INTERFACE 0x06 M98090_REG_DAC_PATH 0x07 M98090_REG_MIC_DIRECT_TO_ADC 0x08 M98090_REG_LINE_TO_ADC 0x09 M98090_REG_ANALOG_MIC_LOOP 0x0A M98090_REG_ANALOG_LINE_LOOP 0x0B M98090_REG_SYSTEM_CLOCK 0x1B M98090_REG_CLOCK_MODE 0x1C M98090_REG_CLOCK_RATIO_NI_MSB 0x1D M98090_REG_CLOCK_RATIO_NI_LSB 0x1E M98090_REG_CLOCK_RATIO_MI_MSB 0x1F M98090_REG_CLOCK_RATIO_MI_LSB 0x20 M98090_REG_MASTER_MODE 0x21 M98090_REG_INTERFACE_FORMAT 0x22 M98090_REG_TDM_CONTROL 0x23 M98090_REG_TDM_FORMAT 0x24 M98090_REG_IO_CONFIGURATION 0x25 M98090_REG_FILTER_CONFIG 0x26 M98090_REG_INPUT_ENABLE 0x3E M98090_REG_OUTPUT_ENABLE 0x3F M98090_REG_BIAS_CONTROL 0x42 M98090_REG_DAC_CONTROL 0x43 M98090_REG_ADC_CONTROL 0x44 M98090_REG_DRC_TIMING 0x33 M98090_REG_DRC_COMPRESSOR 0x34 M98090_REG_DRC_EXPANDER 0x35 M98090_REG_DSP_FILTER_ENABLE 0x41 M98090_REG_EQUALIZER_BASE 0x46 M98090_REG_RECORD_BIQUAD_BASE 0xAF M98090_REG_DIGITAL_MIC_ENABLE 0x13 M98090_REG_DIGITAL_MIC_CONFIG 0x14 Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20191128151908.180871-1-tzungbi@google.com Signed-off-by: Mark Brown commit 2eb2d314a80eb8bb1a6faf2a74321d4497e1687d Author: Michael Walle Date: Thu Nov 28 23:38:02 2019 +0100 ASoC: fsl_sai: add IRQF_SHARED The LS1028A SoC uses the same interrupt line for adjacent SAIs. Use IRQF_SHARED to be able to use these SAIs simultaneously. Signed-off-by: Michael Walle Reviewed-by: Fabio Estevam Acked-by: Nicolin Chen Acked-by: Daniel Baluta Link: https://lore.kernel.org/r/20191128223802.18228-1-michael@walle.cc Signed-off-by: Mark Brown commit 0bb1306f22fb8da72f3d1ba63854489cc8cfe0dd Author: Nikita Yushchenko Date: Thu Nov 28 16:54:47 2019 +0300 ASoC: tlv320aic31xx: Add HP output driver pop reduction controls HP output driver has two parameters that can be configured to reduce pop noise: power-on delay and ramp-up step time. Two new kcontrols have been added to set these parameters. Also have to alter timeout in aic31xx_dapm_power_event() because default timeout does fire when higher supported power-on delay are configured. Signed-off-by: Nikita Yushchenko Link: https://lore.kernel.org/r/20191128135447.26458-1-nikita.yoush@cogentembedded.com Signed-off-by: Mark Brown commit df799b9502edf84a6f5bf2476917ce1ebdead4a2 Author: Eason Yen Date: Fri Nov 15 18:48:46 2019 +0800 ASoC: mediatek: common: refine hw_params and hw_prepare Refine mtk_afe_fe_hw_params and mtk_afe_fe_prepare by these helpers. - mtk_memif_set_enable - mtk_memif_set_disable - mtk_memif_set_addr - mtk_memif_set_channel - mtk_memif_set_rate - mtk_memif_set_rate_substream - mtk_memif_set_format - mtk_memif_set_pbuf_size Signed-off-by: Eason Yen Link: https://lore.kernel.org/r/1573814926-15805-3-git-send-email-eason.yen@mediatek.com Signed-off-by: Mark Brown commit 9cdf85a19b3a67433fff2c8c798dc80e81d34a94 Author: Eason Yen Date: Fri Nov 15 18:48:45 2019 +0800 ASoC: mediatek: common: add some helpers to control mtk_memif 1. Add the following helper in mtk-afe-fe-dai to control to control mtk_memif - mtk_memif_set_enable - mtk_memif_set_disable - mtk_memif_set_addr - mtk_memif_set_channel - mtk_memif_set_rate - mtk_memif_set_rate_substream - mtk_memif_set_format - mtk_memif_set_pbuf_size 2.extend mtk_base_memif_data struct for new platform Signed-off-by: Eason Yen Link: https://lore.kernel.org/r/1573814926-15805-2-git-send-email-eason.yen@mediatek.com Signed-off-by: Mark Brown commit 573892b6e66114898a1e3838c74603dba6bf0fbc Author: Kai Vehmanen Date: Tue Nov 26 08:53:04 2019 -0600 ASoC: hdac_hdmi: Drop support for Icelake This reverts commit 019033c854a2 ("ASoC: Intel: hdac_hdmi: add Icelake support"). Icelake HDMI audio is supported by the HDMI codec driver, which can be used both in non-DSP (legacy HDA) and with DSP (SOF) configurations. Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191126145304.24204-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e3d8f8ae5b1ef0d470b70f65174bbf670bc74130 Author: Kai Vehmanen Date: Tue Nov 26 08:53:03 2019 -0600 ASoC: Intel: boards: make common HDMI driver the default for SOF Modify Kconfig rules for machine drivers used by SOF to pick SND_HDA_CODEC_HDMI by default if other conditions are met. For shared machine drivers used also by older SST driver, keep using HDAC_HDMI. Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191126145304.24204-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 179d5811c2fcadf3f07032bb76ed47c59b91ce1d Author: Kai Vehmanen Date: Tue Nov 26 08:53:02 2019 -0600 ASoC: SOF: Intel: make common HDMI driver default Use the common HDMI driver by default if the codec driver is selected in kernel build. Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191126145304.24204-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 903e9d372887ab046b7da2252ae8bb814c900de0 Author: Sathyanarayana Nujella Date: Tue Nov 26 08:32:05 2019 -0600 ASoC: Intel: common: Add mach table for tgl-max98357a-rt5682 Update tgl mach table to include machine with max98357a & ALC5682. Signed-off-by: Sathyanarayana Nujella Signed-off-by: Jairaj Arava Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191126143205.21987-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6605f0ca3af3b964635287ec7c9dadc812b78eb0 Author: Sathyanarayana Nujella Date: Tue Nov 26 08:32:04 2019 -0600 ASoC: intel: sof_rt5682: Add support for tgl-max98357a-rt5682 This patch adds the driver data and updates quirk info for tgl with max98357a speaker amp and ALC5682 headset codec. Signed-off-by: Sathyanarayana Nujella Signed-off-by: Jairaj Arava Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191126143205.21987-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c68e07970eca79106b0c35b88a12298569590081 Author: Sathyanarayana Nujella Date: Tue Nov 26 08:32:03 2019 -0600 ASoC: intel: sof_rt5682: Add quirk for number of HDMI DAI's TGL supports one more HDMI DAI than previous models. So add quirk support for number of HDMI DAI's. Signed-off-by: Sathyanarayana Nujella Signed-off-by: Jairaj Arava Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20191126143205.21987-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit a483e22791d6be648a0bb2fd16abbe4240e9776a Author: Krzysztof Kozlowski Date: Wed Nov 20 21:42:06 2019 +0800 EDAC/Kconfig: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with a command like: $ sed -e 's/^ /\t/' -i */Kconfig [ bp: make it a single line. ] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Borislav Petkov Cc: James Morse Cc: linux-edac Cc: Mauro Carvalho Chehab Cc: Robert Richter Cc: Tony Luck Link: https://lkml.kernel.org/r/20191120134206.15588-1-krzk@kernel.org commit e691c23ebe8f0f4a05b6da77060f89e506f63e38 Merge: 5a7df4476feb 2f804ba7aa9e Author: Olof Johansson Date: Mon Dec 9 09:22:47 2019 -0800 Merge tag 'socfpga_dts_updates_for_v5.5_part2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/dt SoCFPGA DTS updates for v5.5, part 2 - Add NAND support for both Agilex and Stratix10 boards - Agilex - Add FPGA manager and Service Layer support - Add EDAC support - Add System manager - Add System manager property to ethernet nodes * tag 'socfpga_dts_updates_for_v5.5_part2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: dts: agilex: Add SysMgr to Ethernet nodes arm64: dts: agilex: Add SysMgr compatible arm64: dts: agilex: Add EDAC Device Tree arm64: dts: add NAND board files for Stratix10 and Agilex arm64: dts: agilex: add NAND IP to base dts Link: https://lore.kernel.org/r/20191118220559.16623-1-dinguyen@kernel.org Signed-off-by: Olof Johansson commit 5a7df4476feb7163b8f51799fe856dd1a20d3dd8 Merge: e42617b825f8 1a5a85c56402 Author: Olof Johansson Date: Mon Dec 9 09:21:43 2019 -0800 Merge tag 'samsung-dt-5.5-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.5, part 2 1. Cleanup by adjusting DTS to bindings, 2. Add touch-sensitive buttons to Midas (Galaxy S III family phones), 3. Add GPU/Mali to Exynos542x and Odroid XU3/XU4 family. * tag 'samsung-dt-5.5-2' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Add Mali/GPU node on Exynos5420 and enable it on Odroid XU3/4 ARM: dts: exynos: Add support for the touch-sensitive buttons on Midas family ARM: dts: exynos: Rename children of SysRAM node to "sram" Link: https://lore.kernel.org/r/20191119142026.7190-1-krzk@kernel.org Signed-off-by: Olof Johansson commit d781e3df710745fbbaee4eb07fd5b64331a1b175 Author: J. Bruce Fields Date: Fri Dec 6 16:07:32 2019 -0500 nfsd4: avoid NULL deference on strange COPY compounds With cross-server COPY we've introduced the possibility that the current or saved filehandle might not have fh_dentry/fh_export filled in, but we missed a place that assumed it was. I think this could be triggered by a compound like: PUTFH(foreign filehandle) GETATTR SAVEFH COPY First, check_if_stalefh_allowed sets no_verify on the first (PUTFH) op. Then op_func = nfsd4_putfh runs and leaves current_fh->fh_export NULL. need_wrongsec_check returns true, since this PUTFH has OP_IS_PUTFH_LIKE set and GETATTR does not have OP_HANDLES_WRONGSEC set. We should probably also consider tightening the checks in check_if_stalefh_allowed and double-checking that we don't assume the filehandle is verified elsewhere in the compound. But I think this fixes the immediate issue. Reported-by: Dan Carpenter Fixes: 4e48f1cccab3 "NFSD: allow inter server COPY to have... " Signed-off-by: J. Bruce Fields commit 2e577f0faca4640348c398cb85d60a1eedac4b1e Author: Olga Kornievskaia Date: Wed Dec 4 15:13:54 2019 -0500 NFSD fixing possible null pointer derefering in copy offload Static checker revealed possible error path leading to possible NULL pointer dereferencing. Reported-by: Dan Carpenter Fixes: e0639dc5805a: ("NFSD introduce async copy feature") Signed-off-by: Olga Kornievskaia Signed-off-by: J. Bruce Fields commit b8290ca250fb773aeaf76995af84825e7509d0d3 Author: Olga Kornievskaia Date: Wed Dec 4 15:13:53 2019 -0500 NFSD fix nfserro errno mismatch There is mismatch between __be32 and u32 in nfserr and errno. Reported-by: kbuild test robot Fixes: d5e54eeb0e3d ("NFSD add nfs4 inter ssc to nfsd4_copy") Signed-off-by: Olga Kornievskaia Signed-off-by: J. Bruce Fields commit 3f9544ca62bc13cf1c145d1deae7bf3270730e0a Author: Olga Kornievskaia Date: Wed Dec 4 15:13:53 2019 -0500 NFSD: fix seqid in copy stateid s_stid->si_generation is a u32, copy->stateid.seqid is a __be32, so we should be byte-swapping here if necessary. This effectively undoes the byte-swap performed when reading s_stid->s_generation in nfsd4_decode_copy(). Without this second swap, the stateid we sent to the source in READ could be different from the one the client provided us in the COPY. We didn't spot this in testing since our implementation always uses a 0 in the seqid field. But other implementations might not do that. You'd think we should just skip the byte-swapping entirely, but the s_stid field can be used for either our own stateids (in the intra-server case) or foreign stateids (in the inter-server case), and the former are interpreted by us and need byte-swapping. Reported-by: kbuild test robot Fixes: d5e54eeb0e3d ("NFSD add nfs4 inter ssc to nfsd4_copy") Signed-off-by: Olga Kornievskaia Signed-off-by: J. Bruce Fields commit 10db651210b2c618eb90a7fea4d6c5132bba7982 Author: Olga Kornievskaia Date: Wed Dec 4 15:13:52 2019 -0500 NFSD fix mismatching type in nfsd4_set_netaddr Fix __be32 and u32 mismatch in return and assignment. Reported-by: kbuild test robot Fixes: dbd4c2dd8f13 ("NFSD add COPY_NOTIFY operation") Signed-off-by: Olga Kornievskaia Signed-off-by: J. Bruce Fields commit 5277a79e2dee458f0185e4ebde1cd4e128f014e9 Author: Dan Carpenter Date: Wed Dec 4 10:59:36 2019 +0300 nfsd: unlock on error in manage_cpntf_state() We are holding the "nn->s2s_cp_lock" so we can't return directly without unlocking first. Fixes: f3dee17721a0 ("NFSD check stateids against copy stateids") Signed-off-by: Dan Carpenter Signed-off-by: J. Bruce Fields commit ce0887ac96d35c7105090e166bb0807dc0a0e838 Author: Olga Kornievskaia Date: Wed Oct 9 11:50:48 2019 -0400 NFSD add nfs4 inter ssc to nfsd4_copy Given a universal address, mount the source server from the destination server. Use an internal mount. Call the NFS client nfs42_ssc_open to obtain the NFS struct file suitable for nfsd_copy_range. Ability to do "inter" server-to-server depends on the an nfsd kernel parameter "inter_copy_offload_enable". Signed-off-by: Olga Kornievskaia commit b9e8638e3d9ed8334f1f7071e081860aac37e83e Author: Olga Kornievskaia Date: Mon Oct 7 10:56:48 2019 -0400 NFSD: allow inter server COPY to have a STALE source server fh The inter server to server COPY source server filehandle is a foreign filehandle as the COPY is sent to the destination server. Signed-off-by: Olga Kornievskaia commit 51100d2b87cba12b09db79fa6577adccc0c2d14f Author: Olga Kornievskaia Date: Thu Sep 13 13:58:24 2018 -0400 NFSD generalize nfsd4_compound_state flag names Allow for sid_flag field non-stateid use. Signed-off-by: Andy Adamson commit b7342204253aaa1ce8351e0d94b43f98c8706cee Author: Olga Kornievskaia Date: Fri Sep 6 15:17:21 2019 -0400 NFSD check stateids against copy stateids Incoming stateid (used by a READ) could be a saved copy stateid. Using the provided stateid, look it up in the list of copy_notify stateids. If found, use the parent's stateid and parent's clid to look up the parent's stid to do the appropriate checks. Update the copy notify timestamp (cpntf_time) with current time this making it 'active' so that laundromat thread will not delete copy notify state. Signed-off-by: Olga Kornievskaia commit 624322f1adc58acd0b69f77a6ddc764207e97241 Author: Olga Kornievskaia Date: Fri Oct 4 16:34:26 2019 -0400 NFSD add COPY_NOTIFY operation Introducing the COPY_NOTIFY operation. Create a new unique stateid that will keep track of the copy state and the upcoming READs that will use that stateid. Each associated parent stateid has a list of copy notify stateids. A copy notify structure makes a copy of the parent stateid and a clientid and will use it to look up the parent stateid during the READ request (suggested by Trond Myklebust ). At nfs4_put_stid() time, we walk the list of the associated copy notify stateids and delete them. Laundromat thread will traverse globally stored copy notify stateid in idr and notice if any haven't been referenced in the lease period, if so, it'll remove them. Return single netaddr to advertise to the copy. Suggested-by: Trond Myklebust Signed-off-by: Olga Kornievskaia Signed-off-by: Andy Adamson commit 51911868fc62f6b1bc460ea2d8bddece6c72e467 Author: Olga Kornievskaia Date: Thu Aug 8 11:14:59 2019 -0400 NFSD COPY_NOTIFY xdr Signed-off-by: Olga Kornievskaia commit 84e1b21d5ec4cc1b005586f32c67c046ea4ffb8a Author: Olga Kornievskaia Date: Fri Sep 13 14:00:57 2019 -0400 NFSD add ca_source_server<> to COPY Decode the ca_source_server list that's sent but only use the first one. Presence of non-zero list indicates an "inter" copy. Signed-off-by: Andy Adamson Signed-off-by: Olga Kornievskaia commit af76fc6c158d5e70764c9cc277aefe7a134436fd Author: Olga Kornievskaia Date: Wed Jun 5 13:46:29 2019 -0400 NFSD fill-in netloc4 structure nfs.4 defines nfs42_netaddr structure that represents netloc4. Populate needed fields from the sockaddr structure. This will be used by flexfiles and 4.2 inter copy Signed-off-by: Olga Kornievskaia commit 67e1d5ed85a83e232a9e0b995f5778a86722b96e Author: Ville Syrjälä Date: Wed Dec 4 20:05:41 2019 +0200 drm/i915/hdcp: Nuke intel_hdcp_transcoder_config() intel_hdcp_transcoder_config() is clobbering some globally visible state in .compute_config(). That is a big no no as .compute_config() is supposed to have no visible side effects when either the commit fails or it's just a TEST_ONLY commit. Inline this stuff into intel_hdcp_enable() so that the state only gets modified when we actually commit the state to the hardware. Cc: Ramalingam C Cc: Jani Nikula Cc: Uma Shankar Fixes: 39e2df090c3c ("drm/i915/hdcp: update current transcoder into intel_hdcp") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191204180549.1267-2-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C commit 608b68b67a309e96ee6a97fdb090553b14a814d0 Author: Lukas Bulwahn Date: Sat Dec 7 19:27:03 2019 +0100 MAINTAINERS: fix style in CADENCE I3C MASTER IP entry Commit ae24f2b6f828 ("MAINTAINERS: add myself as maintainer of Cadence I3C master controller driver") slips in some formatting with spaces instead of tabs, which ./scripts/checkpatch.pl -f MAINTAINERS complains about: #7838: FILE: MAINTAINERS:7838: M: Przemysław Gaj WARNING: MAINTAINERS entries use one tab after TYPE: #7839: FILE: MAINTAINERS:7839: S: Maintained WARNING: MAINTAINERS entries use one tab after TYPE: #7840: FILE: MAINTAINERS:7840: F: Documentation/devicetree/bindings/i3c/cdns,i3c-master.txt WARNING: MAINTAINERS entries use one tab after TYPE: #7841: FILE: MAINTAINERS:7841: F: drivers/i3c/master/i3c-master-cdns.c Fixes: ae24f2b6f828 ("MAINTAINERS: add myself as maintainer of Cadence I3C master controller driver") Signed-off-by: Lukas Bulwahn Signed-off-by: Boris Brezillon commit 026d8450d499904f4712676e2149cdb758d0a601 Author: Benjamin Gaignard Date: Wed Dec 4 11:56:30 2019 +0100 i3c: master: make i3c_bus_set_mode static i3c_bus_set_mode function is only used in master.c. Make it static to avoid warning when compiling with W=1. Signed-off-by: Benjamin Gaignard Signed-off-by: Boris Brezillon commit dbd6654329fcb0f5fc11d07997ddb61683c085f2 Author: Przemyslaw Gaj Date: Mon Nov 18 16:01:14 2019 +0100 i3c: master: cdns: add data hold delay support This patch adds support for THD_DEL (Data Hold Delay) to Cadence I3C master constoller driver. As per MIPI I3C Specification 1.0, Table 75 (page 142) defines non-zero minimal tHD_PP timing on master output (Fig 65). This setting allows to meet this timing on master's soc outputs, regardless of PCB balancing. Signed-off-by: Przemyslaw Gaj Signed-off-by: Boris Brezillon commit cd592187f9de3c6305d6c1c66f7fac084cb5b846 Author: Russell King Date: Tue Nov 19 22:53:04 2019 +0000 arm64: dts: uDPU: SFP cages support 3W modules The SFP cages are designed to support up to 3W modules, such as G.hn, G.fast and MoCA modules. Although there is no way for such modules to declare to software that they consume 3W, we document in DT that this is the designed power level for these cages. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT commit fe3ec631a77ded87817f449691710a436a80caa7 Author: Russell King Date: Sat Nov 16 11:07:01 2019 +0000 arm64: dts: uDPU: remove i2c-fast-mode The I2C bus violates the timing specifications when run in fast mode on the uDPU, so switch to 100kHz mode. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT commit 1eebac0240580b531954b02c05068051df41142a Author: Russell King Date: Sat Nov 16 11:06:56 2019 +0000 arm64: dts: uDPU: fix broken ethernet The uDPU uses both ethernet controllers, which ties up COMPHY 0 for eth1 and COMPHY 1 for eth0, with no USB3 comphy. The addition of COMPHY support made the kernel override the setup by the boot loader breaking this platform by assuming that COMPHY 0 was always used for USB3. Delete the USB3 COMPHY definition at platform level, and add phy specifications for the ethernet channels. Fixes: bd3d25b07342 ("arm64: dts: marvell: armada-37xx: link USB hosts with their PHYs") Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT commit e10ad9c697463f0647fa684e5425aefc5fa611f4 Author: Ville Syrjälä Date: Wed Nov 27 22:12:22 2019 +0200 drm/i915/fbc: Reallocate cfb if we need more of it The code assumes we can omit the cfb allocation once fbc has been enabled once. That's nonsense. Let's try to reallocate it if we need to. The code is still a mess, but maybe this is enough to get fbc going in some cases where it initially underallocates the cfb and there's no full modeset to fix it up. Cc: Daniel Drake Cc: Paulo Zanoni Cc: Jian-Hong Pan Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127201222.16669-15-ville.syrjala@linux.intel.com Tested-by: Daniel Drake Reviewed-by: Maarten Lankhorst commit 34cddbc03b13e3d18ba94ad59767768cf08f9e07 Author: Ville Syrjälä Date: Wed Nov 27 22:12:21 2019 +0200 drm/i915/fbc: Enable fbc by default on glk+ once again Now that we have the glk+ w/a for back to back fbc disable + plane update in place we can once more enable fbc on glk+ by default. Cc: Daniel Drake Cc: Paulo Zanoni Cc: Jian-Hong Pan Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127201222.16669-14-ville.syrjala@linux.intel.com Tested-by: Daniel Drake Reviewed-by: Maarten Lankhorst commit 07fd0df822cc1818fe8ef9760f9f51116789da5e Author: Ville Syrjälä Date: Thu Nov 28 17:03:38 2019 +0200 drm/i915/fbc: Wait for vblank after FBC disable on glk+ On glk+ the hardware gets confused if we disable FBC while it's recompressing and we perform a plane update during the same frame. The result is that top of the screen gets corrupted. We can avoid that by giving the hardware enough time to finish the FBC disable before we touch the plane registers. Ie. we need an extra vblank wait after FBC disable. v2: Don't do the vblank wait if we never activated FBC in hw Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191128150338.12490-1-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit 6252bb78fcc30f3d5166e7af98a6f403fddc46cf Author: Ville Syrjälä Date: Wed Nov 27 22:12:19 2019 +0200 drm/i915/fbc: Start using flip nuke The hardware automagically nukes the cfb on flip. We can use that whenever the plane/crtc configuration doesn't change too much. Let's hook that up. We'll need this for glk+ since we need to introduce an extra vblank wait after FBC disable. As we're currently disabling FBC around all plane updates we'd slow them down by an extra frame. Not a great user experience when your fps is always capped at vrefres/2. With flip nuke we don't need the extra vblank wait. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127201222.16669-12-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit c866a0e41640f7f9759b66b96c18d5d2bf35c24b Author: Ville Syrjälä Date: Wed Nov 27 22:12:18 2019 +0200 drm/i915/fbc: Nuke fbc.enabled fbc.enabled == (fbc.crtc != NULL), so let's just nuke fbc.enabled. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127201222.16669-11-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit 31ce20c24721ae9ef5312ac81756163babc66e48 Author: Ville Syrjälä Date: Wed Nov 27 22:12:17 2019 +0200 drm/i915/fbc: s/gen9 && !glk/gen9_bc || bxt/ Replace the 'gen9 && !glk' with the slightly more obvious 'gen9_bc || bxt'. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127201222.16669-10-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit 30016696c2e0c0ddfa1f56e26039978f666c8283 Author: Ville Syrjälä Date: Wed Nov 27 22:12:16 2019 +0200 drm/i915/fbc: Make fence_id optional for i965gm i965gm no longer needs the fence for scanout so we should be do what we do for ctg+ and only configure a fence for FBC when we have one. In theory this should do nothing atm on account of intel_fbc_can_activate() requiring the fence, but since we do this for g4x+ let's do it for i965gm as well. We may want to relax the requirements at some point and allow FBC without a fence. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127201222.16669-9-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit 97a978e2d3a09d261d813c6946d173988e68dcc2 Author: Ville Syrjälä Date: Wed Nov 27 22:12:15 2019 +0200 drm/i915/fbc: Store fence_id directly in fbc cache/params Rather than playing around with vma+flags let's just grab the fence id from within and stash that directly in the fbc cache/params. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127201222.16669-8-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit 8bdbe1befd9d426455017edfaa17d44b387fea82 Author: Ville Syrjälä Date: Wed Nov 27 22:12:14 2019 +0200 drm/i915/fbc: Track plane visibility Currently the code (ab)uses cache->vma to indicate the plane visibility. I want to nuke that so let's add a dedicated boolean for this. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127201222.16669-7-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit 6f745ba696fd4f34bb7533f92e58679e1f3ca57a Author: Ville Syrjälä Date: Wed Nov 27 22:12:13 2019 +0200 drm/i915/fbc: Precompute gen9 cfb stride w/a Precompute the override cfb stride value so that we can check it when determining if flip nuke can be used or not. The hardware has 13 bits for this, so we can shrink the storage to u16 while at it. v2: Don't explode when crtc_state->enable_fbc lies to us Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127201222.16669-6-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit 644398586f00f82f91396f0590771c5d512c3061 Author: Ville Syrjälä Date: Wed Nov 27 22:12:12 2019 +0200 drm/i915/fbc: Remove the FBC_RT_BASE setup for ILK/SNB We don't want to use the FBC hardware render tracking so let's not enable it. To use the hw tracking properly we'd anyway need to integrate this into the command submissing path as the register is context saved, and if rendering happens via the ppgtt we'd have to configure it with the ppgtt address instead of the ggtt address. Easier to use software tracking instead. Note that on pre-ilk we can't actually disable render tracking. However we can't rely on it because it requires that DSPSURF to match the render target address, and since we play tricks with DSPSURF that may not be the case. Hence we shall rely on software render tracking on all platforms. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127201222.16669-5-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit 04da7b9f9af63fa2d3eaf2bd3ffab4624f02b449 Author: Ville Syrjälä Date: Wed Nov 27 22:12:11 2019 +0200 drm/i915: Relocate intel_crtc_active() Move intel_crtc_active() next to its only remaining user (pre-g4x wm code). Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127201222.16669-4-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit fb2d8e0cd4d76bdc4630defbd545de5ece594124 Author: Ville Syrjälä Date: Wed Nov 27 22:12:10 2019 +0200 drm/i915/fbc: Nuke bogus single pipe fbc1 restriction Not sure where the single pipe only restriction came for fbc1. Nothing I can see that would prevent this. v2: Nuke no_fbc_on_multiple_pipes() too Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127201222.16669-3-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit cd8c021b36a66833cefe2c90a79a9e312a2a5690 Author: Ville Syrjälä Date: Wed Nov 27 22:12:09 2019 +0200 drm/i915/fbc: Disable fbc by default on all glk+ We're missing a workaround in the fbc code for all glk+ platforms which can cause corruption around the top of the screen. So enabling fbc by default is a bad idea. I'm not keen to backport the w/a so let's start by disabling fbc by default on all glk+. We'll lift the restriction once the w/a is in place. Cc: stable@vger.kernel.org Cc: Daniel Drake Cc: Paulo Zanoni Cc: Jian-Hong Pan Cc: Maarten Lankhorst Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127201222.16669-2-ville.syrjala@linux.intel.com Reviewed-by: Maarten Lankhorst commit 117e5dd21cedf27e67b918fd0d9f8e2d3b6ac2c2 Author: Benjamin Gaignard Date: Mon Dec 2 15:56:00 2019 +0100 ARM: dts: stm32: remove useless clock-names from RTC node on stm32f746 On stm32f7 family RTC node doesn't need clock-names property. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit ad8e5610da1efa1e586456c83de453742f93a8c0 Author: Benjamin Gaignard Date: Mon Dec 2 15:56:00 2019 +0100 ARM: dts: stm32: remove useless clock-names from RTC node on stm32f429 On stm32f4 family RTC node doesn't need clock-names property. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit e54ea45a4955e8a2901c74ab43870f2a56ed647b Author: Dilip Kota Date: Mon Dec 9 11:20:04 2019 +0800 dt-bindings: PCI: intel: Add YAML schemas for the PCIe RC controller Add YAML schemas for PCIe RC controller on Intel Gateway SoCs which is Synopsys DesignWare based PCIe core. Signed-off-by: Dilip Kota Signed-off-by: Lorenzo Pieralisi Reviewed-by: Andrew Murray Reviewed-by: Rob Herring commit bf848759fb7877203d0be92b1243dccd447af662 Author: Christophe Roullier Date: Mon Dec 9 14:58:17 2019 +0100 ARM: dts: stm32: Enable MAC TX clock gating during TX low-power mode on stm32mp15 When there is no activity on ethernet phy link, the ETH_GTX_CLK is cut. Signed-off-by: Christophe Roullier Signed-off-by: Alexandre Torgue commit 46ccf1cecb224c73a20454134fd19833b2f385fd Author: Christophe Roullier Date: Mon Dec 9 14:55:20 2019 +0100 ARM: dts: stm32: adjust slew rate for Ethernet on stm32mp15 ETH_MDIO slew-rate should be set to "0" instead of "2". Signed-off-by: Christophe Roullier Signed-off-by: Alexandre Torgue commit 1b69e89291fcbfb3520a0c1ff560df1fa9405501 Author: Jani Nikula Date: Tue Dec 3 18:38:51 2019 +0200 HID: picoLCD: constify fb ops Now that the fbops member of struct fb_info is const, we can start making the ops const as well. v2: fix typo (Christophe de Dinechin) Cc: Bruno Prémont Cc: linux-input@vger.kernel.org Reviewed-by: Daniel Vetter Acked-by: Bruno Prémont Acked-by: Jiri Kosina Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/f415010cd52cce7d8a1250d4eca582ec64e67956.1575390741.git.jani.nikula@intel.com commit 42a1e9450c27de15067d1d25f6a608e2bfeb72b2 Author: Linus Walleij Date: Tue Nov 26 13:47:37 2019 +0100 ARM: dts: ux500: Add devicetree for HREF520 This reference design is very similar to the others just that it has a different display mounted on the user interface board, and some GPIOs where shuffled around. As this is the first board that uses DB8520 we create the DB8520-specific DTSI file here. Cc: Stephan Gerhold Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191126124738.77690-3-linus.walleij@linaro.org commit 8668223a1ea74624e934cb49ccde77db6f39d660 Author: Linus Walleij Date: Tue Nov 26 13:47:36 2019 +0100 ARM: dts: ux500: Split TVK DTSI files in two The TVK1281618 was made in R1, R2 and R3 variants. The most commonly used variants are R2 and R3 so split out these to their own files. The R3 version has a totally different display than R1 and R2 and a different set of sensors. Cc: Stephan Gerhold Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20191126124738.77690-2-linus.walleij@linaro.org commit f6a76d4256804b5bfbfcf585dc9477fdaae5a304 Author: Linus Walleij Date: Tue Nov 26 13:47:35 2019 +0100 ARM: dts: ux500: Break out DB8500 DTSI The DB8500 exists in an enhanced variant named DB8520 for some machines. To clearly distinguish between the different machines, create an explicit db8500.dtsi and move the operating points (only known difference so far) to that file, so we can add an explicit db8520.dtsi after this. Cc: Stephan Gerhold Link: https://lore.kernel.org/r/20191126124738.77690-1-linus.walleij@linaro.org Reviewed-by: Stephan Gerhold Signed-off-by: Linus Walleij commit 27e7c033d3b4101bc3b9a344265de5ae89e09b42 Author: Linus Walleij Date: Tue Nov 26 13:31:16 2019 +0100 ARM: dts: ux500: Drop pulls on I2C buses The I2C block in the Ux500 uses internal pull-ups on the SoC, in fact it has to: in HS mode, the I2C block will need to autonomously take control over the pull-up line to do its job. This can be clearly seen from the SoC manual which states that the silicon has a line named "en_cspu_hs" which enables current source pull-up for high speed mode. Another hint is that the vendor code tree never enabled the pull up on these lines, despite being deployed on boards that lack external pull-up resistors. Tested on the Ux500 reference designs without any problems. Cc: Stephan Gerhold Reported-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191126123116.56244-1-linus.walleij@linaro.org Reviewed-by: Stephan Gerhold Tested-by: Stephan Gerhold Signed-off-by: Linus Walleij commit b2ee5877508b491ce7d18fc50b2c7b670aef1b79 Author: Stephan Gerhold Date: Sun Nov 24 21:51:10 2019 +0100 ARM: dts: ux500: Use "arm,pl031" compatible for PL031 The Ux500 device tree uses "arm,rtc-pl031" as compatible for PL031. All other boards in Linux describe it using "arm,pl031" instead. This works because the compatible is not actually used in Linux: AMBA devices get probed based on "arm,primecell" and their peripheral ID. Nevertheless, some other projects (e.g. U-Boot) rely on the compatible to probe the device with the correct driver. Those will look for "arm,pl031" instead of "arm,rtc-pl031", preventing the RTC from being probed. Change it to "arm,pl031" to match all other boards. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191124205110.48031-1-stephan@gerhold.net Signed-off-by: Linus Walleij commit 02234ee9e4d7b013b0170bd950b895bc845ebeb9 Author: Stephan Gerhold Date: Sun Nov 24 20:57:28 2019 +0100 ARM: dts: ux500: Add "simple-bus" compatible to soc node The "soc" node in the Ux500 device tree does not need any special handling - it is just a simple I/O bus that can be accessed without additional configuration. Therefore we can additionally describe it as compatible with "simple-bus". This can be used by platforms to probe devices under the soc node without special handling for our custom "stericsson,db8500" compatible (e.g. in U-Boot). Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191124195728.32226-1-stephan@gerhold.net Signed-off-by: Linus Walleij commit bef475b03d9bf20919ba66916b0c82a374722b7e Author: Stephan Gerhold Date: Mon Nov 25 18:04:28 2019 +0100 ARM: dts: ux500: Remove ux500_ prefix from ux500_serial* labels ux500_serial{0,1,2} are the only labels with ux500_ prefix in ste-dbx5x0.dtsi, the other labels (gpio0, msp, ...) do not use any prefix. Remove it for consistency. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191125170428.76069-4-stephan@gerhold.net Signed-off-by: Linus Walleij commit 5195887a6fe0d95293d1c3f8c0f2456363bec0a3 Author: Stephan Gerhold Date: Mon Nov 25 18:04:27 2019 +0100 ARM: dts: ux500: Move serial aliases to ste-dbx5x0.dtsi Now that we have aliases for I2C and SPI in ste-dbx5x0.dtsi, it does not make much sense to keep only the aliases for UART separately in each board device tree. Considering that all boards set the same aliases for the serial ports there is no reason to keep them separated either. Move them to ste-dbx5x0.dtsi and remove the aliases from the board-specific device tree parts. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191125170428.76069-3-stephan@gerhold.net Signed-off-by: Linus Walleij commit 6b69c7296a9a274cb9949d21aa3d5bd5c31a5013 Author: Stephan Gerhold Date: Mon Nov 25 18:04:26 2019 +0100 ARM: dts: ux500: Add aliases for I2C and SPI buses Now that we disable the I2C/SPI buses by default, is is even more important to assign aliases to the I2C/SPI device nodes. Otherwise, enabling/disabling one of them will potentially change all device IDs, e.g. i2c2 will be named i2c-0 if it is the only enabled I2C bus. Add aliases for the I2C and SPI buses to avoid this. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191125170428.76069-2-stephan@gerhold.net Signed-off-by: Linus Walleij commit fae284f1bc773c9297d337b94cf0aca3593d9842 Author: Stephan Gerhold Date: Mon Nov 25 18:04:25 2019 +0100 ARM: dts: ux500: Disable I2C/SPI buses by default At the moment, all 5 I2C and 6 SPI buses are probed and exposed to user-space by default - even if they are not muxed to any pins on the board. This means that user-space sees an I2C/SPI bus that cannot be actually used properly. In some cases this was used to put the corresponding pins into a low power sleep mode - but even then the pins first need to be configured by the board-specific device tree part. Avoid exposing unconfigured devices to user-space by disabling the I2C/SPI buses by default. Enable them in the board device trees when needed. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191125170428.76069-1-stephan@gerhold.net Signed-off-by: Linus Walleij commit 96b619e3c1dfd7464652265d17ee8c07ef5cca92 Author: Stephan Gerhold Date: Mon Nov 25 13:22:56 2019 +0100 ARM: dts: ux500: nomadik-pinctrl: Add &gpio_in_nopull ste-nomadik-pinctrl.dtsi already defines in_nopull and gpio_in_pu/pd, but there is no node to configure a pin as GPIO without pull up/down. Add a new &gpio_in_nopull node for this. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191125122256.53482-5-stephan@gerhold.net Signed-off-by: Linus Walleij commit 99e1df6136254c2b763d3d5ad23ede005f2e5b2b Author: Stephan Gerhold Date: Mon Nov 25 13:22:55 2019 +0100 ARM: dts: ux500: Add pin configs for UART1 CTS/RTS pins UART1 can optionally be used with additional CTS/RTS pins. The pinctrl driver has an extra "u1ctsrts_a_1" pin group for them. Add a new pin configuration to configure them correctly if needed. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191125122256.53482-4-stephan@gerhold.net Signed-off-by: Linus Walleij commit 4dbeac7364647c91be0591d504d149b6ddd1da90 Author: Stephan Gerhold Date: Mon Nov 25 13:22:54 2019 +0100 ARM: dts: ux500: Add alternative SDI pin configs SDI0/SDI1 can be used in configurations where some of the pins (e.g. direction control) are not used. The pinctrl driver has separate pin groups for them. Add new pin configurations for: - mc0_a_2: like mc0_a_1, but without CMDDIR/DAT0DIR/DAT2DIR - mc1_a_2: like mc1_a_1, but without FBCLK Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191125122256.53482-3-stephan@gerhold.net Signed-off-by: Linus Walleij commit 7fee202265b7cc1b661f8aced787a0ab38b3e0e1 Author: Stephan Gerhold Date: Mon Nov 25 13:22:53 2019 +0100 ARM: dts: ux500: Rename generic pin configs according to pin group Some components (e.g. SDI, I2C) can be used with different pin assignments. Before we can add the alternative configurations, we need to rename the current configurations to more generic names. Each pin configuration usually configures one specific pin group. Therefore we rename the configurations to use the pin group as name. Make up for the slightly longer names by removing the "_mode" suffix. Rename all existing uses to use the new labels. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191125122256.53482-2-stephan@gerhold.net Signed-off-by: Linus Walleij commit 0f8e741404af4b653a6d9c344e5198cb6b0b7bc2 Author: Stephan Gerhold Date: Mon Nov 25 13:22:52 2019 +0100 ARM: dts: ux500: Move generic pin configs out of ste-href-family-pinctrl.dtsi All existing Ux500 boards make use of ste-href-family-pinctrl.dtsi, which contains shared pin configurations for UART, I2C and SDI. Most of these can be also used for devices not based on HREF. Move the generic pin configs into a new device tree include "ste-dbx5x0-pinctrl.dtsi". There is no functional change (yet), as a next step we will rename the pin configs to use more generic names. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191125122256.53482-1-stephan@gerhold.net Signed-off-by: Linus Walleij commit 6cfeb611b4714b4cc66df7ef36111e33ed551f22 Author: Stephan Gerhold Date: Wed Nov 20 19:18:57 2019 +0100 dt-bindings: arm: Document compatibles for Ux500 boards The device-specific compatible values used by the Ux500 boards were not documented so far. Add a new simple schema to document them. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191120181857.97174-4-stephan@gerhold.net Signed-off-by: Linus Walleij commit 08d89bc90d9ef35106c9bba334640ecc129e6140 Author: Stephan Gerhold Date: Sun Nov 17 23:27:32 2019 +0100 ARM: dts: ux500: snowball: Remove unused PRCMU cpufreq node Commit a435adbec264 ("ARM: dts: augment Ux500 to use DT cpufreq") switched the Ux500 device tree to use the generic DT cpufreq driver and removed the PRCMU cpufreq node. The snowball DTS still references it, without effect, since cpufreq is now enabled by default. Remove the unused node. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20191117222732.283673-1-stephan@gerhold.net Signed-off-by: Linus Walleij commit 70016ef0bd8694a4b83c6552807c0ad2bbf7155a Author: Linus Walleij Date: Tue Jan 10 23:50:52 2017 +0100 ARM: dts: ux500: declare GPADC IIO ADC channels This adds the IIO channels for the GPADC after converting it to using the standard IIO ADC bindings and moving the driver over to the IIO subsystem. We also add IIO hwmon standard driver node to support reading channels in a standard manner. Signed-off-by: Linus Walleij commit 33ce3e626cef3ec0d1ffc22211931e16531facb1 Author: Christophe Roullier Date: Mon Dec 9 14:40:52 2019 +0100 ARM: dts: stm32: remove syscfg clock on stm32mp15 ethernet Syscfg is now activated automatically when syscfg registers are used. Signed-off-by: Christophe Roullier Signed-off-by: Alexandre Torgue commit ccdeed497042676e13fc1625e2a341880eff5da5 Author: Umesh Nerlige Ramappa Date: Fri Dec 6 11:43:39 2019 -0800 drm/i915/perf: Configure OAR for specific context Gen12 supports saving/restoring render counters per context. Apply OAR configuration only for the context that is passed in to perf. v2: - Fix OACTXCONTROL value to only stop/resume counters. - Remove gen12_update_reg_state_unlocked as power state is already applied by the caller. v3: (Lionel) - Move register initialization into the array - Assume a valid oa_config in enable_metric_set Signed-off-by: Umesh Nerlige Ramappa Fixes: 00a7f0d7155c ("drm/i915/tgl: Add perf support on TGL") Reviewed-by: Lionel Landwerlin Signed-off-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20191206194339.31356-2-umesh.nerlige.ramappa@intel.com commit 322d56aa3145a28445907ecc638a2c3aa3295c6b Author: Umesh Nerlige Ramappa Date: Fri Dec 6 11:43:38 2019 -0800 drm/i915/perf: Allow non-privileged access when OA buffer is not sampled SAMPLE_OA_REPORT enables sampling of OA reports from the OA buffer. Since reports from OA buffer had system wide visibility, collecting samples from the OA buffer was a privileged operation on previous platforms. Prior to TGL, it was also necessary to sample the OA buffer to normalize reports from MI REPORT PERF COUNT. TGL has a dedicated OAR unit to sample perf reports for a specific render context. This removes the necessity to sample OA buffer. - If not sampling the OA buffer, allow non-privileged access. An earlier patch allows the non-privilege access: https://patchwork.freedesktop.org/patch/337716/?series=68582&rev=1 - Clear up the path for non-privileged access in this patch Signed-off-by: Umesh Nerlige Ramappa Fixes: 00a7f0d7155c ("drm/i915/tgl: Add perf support on TGL") Reviewed-by: Lionel Landwerlin Signed-off-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20191206194339.31356-1-umesh.nerlige.ramappa@intel.com commit d3e483526cd3057936360503e3d7694d0bcb6eb2 Author: Chris Wilson Date: Sun Dec 8 16:12:52 2019 +0000 drm/i915: Change i915_vma_unbind() to report -EAGAIN on activity If someone else acquires the i915_vma before we complete our wait and unbind it, we currently error out with -EBUSY. Use -EAGAIN instead so that if necessary the caller is prepared to try again. Closes: https://gitlab.freedesktop.org/drm/intel/issues/683 Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191208161252.3015727-2-chris@chris-wilson.co.uk commit 4b28b25c3062002eebdef1a4e6bab2f8293308f1 Author: Charles Keepax Date: Mon Dec 9 11:09:16 2019 +0000 extcon: arizona: Factor out microphone and button detection Continue refactoring the microphone detect handling by factoring out the handling for microphone detection and button detection into separate functions. This both makes the code a little clearer and prepares for some planned future refactoring to make the state handling in the driver more explicit. Signed-off-by: Charles Keepax Signed-off-by: Chanwoo Choi commit 7e14fc437c8144d1d5587d7b3a8d33e732144227 Author: Charles Keepax Date: Mon Dec 9 11:09:15 2019 +0000 extcon: arizona: Factor out microphone impedance into a function The microphone detection handler is very long, start breaking it up by factoring out the actual reading of the impedance value into a separate functions. Additionally, this also fixes a minor bug and ensures that the microphone timeout will be rescheduled in all error cases. Signed-off-by: Charles Keepax Signed-off-by: Chanwoo Choi commit 3dfa743dcd2e39064475ff7f622d05db61b65375 Author: Charles Keepax Date: Mon Dec 9 11:09:14 2019 +0000 extcon: arizona: Invert logic of check in arizona_hpdet_do_id Invert the check of hpdet_acc_id at the top of arizona_hpdet_do_id to reduce the identation within the function. Signed-off-by: Charles Keepax Signed-off-by: Chanwoo Choi commit 8267ebcc46176d90b7b169440ebbc890e09a5010 Author: Charles Keepax Date: Mon Dec 9 11:09:13 2019 +0000 extcon: arizona: Remove excessive WARN_ON A WARN_ON is very strong for simply finding a button that is out of range, downgrade this to a simple error message in the log. Signed-off-by: Charles Keepax Signed-off-by: Chanwoo Choi commit f4ba6c0ba762e10b0bad42b5d28f7e2ab1fe5ff9 Author: Charles Keepax Date: Mon Dec 9 11:09:12 2019 +0000 extcon: arizona: Remove unnecessary sets of ACCDET_MODE arizona_start_mic sets ACCDET_MODE as required for the microphone detection as such it is redundant to set this outside of this function. Signed-off-by: Charles Keepax Signed-off-by: Chanwoo Choi commit d5aa46ddf9ed7cf0d7ea0b86bec20412733ac870 Author: Charles Keepax Date: Mon Dec 9 11:09:11 2019 +0000 extcon: arizona: Tidy up transition from mic to headphone detect Moving from microphone detection to headphone detection is done fairly haphazardly at the moment, sometimes calling arizona_stop_mic at the call site sometimes relying on a call inside arizona_identify_headphone. Simplify all this and always call arizona_stop_mic at the top of arizona_identify_headphone. Signed-off-by: Charles Keepax Signed-off-by: Chanwoo Choi commit ac7614fab9dd1054ec6bd082f02a436bb5cb082f Author: Charles Keepax Date: Mon Dec 9 11:09:10 2019 +0000 extcon: arizona: Clear jack status regardless of detection type It makes sense to clear the internal state of the jack detection regardless of if the headphone detect based accessory detection or the normal microphone detect based flow is used. No issues are currently known because of this but the change makes more logical sense and eases future refactoring of the code. Signed-off-by: Charles Keepax Signed-off-by: Chanwoo Choi commit be87cb72bf7513fb92fa0e9e4ae83f958c73c042 Author: Charles Keepax Date: Mon Dec 9 11:09:09 2019 +0000 extcon: arizona: Move pdata extraction to probe It makes no sense to be extracting values from pdata for the first time in the jack detection handler function, move this to probe time where it belongs. Signed-off-by: Charles Keepax Signed-off-by: Chanwoo Choi commit b82f871a335a8b0de178ace526c847183d17f66d Author: Charles Keepax Date: Mon Dec 9 11:09:08 2019 +0000 extcon: arizona: Make rev A register sequences atomic The special register sequences that are applied for rev A of wm5102 should be applied atomically with respect to any other register writes. Use regmap_multi_reg_write to ensure all writes happen under the regmap lock. Signed-off-by: Charles Keepax Signed-off-by: Chanwoo Choi commit 9c8eaec8ebe41198b10599f2586750d8900afd97 Author: Charles Keepax Date: Mon Dec 9 11:09:07 2019 +0000 extcon: arizona: Correct clean up if arizona_identify_headphone fails In the error path of arizona_identify_headphone, neither the clamp nor the PM runtime are cleaned up. Add calls to clean up both of these. Signed-off-by: Charles Keepax Signed-off-by: Chanwoo Choi commit ab68b220e81fd03383c0d9e1a87b51f9bbe4db77 Author: Andy Shevchenko Date: Thu Oct 24 17:33:43 2019 +0300 pinctrl: baytrail: Group GPIO IRQ chip initialization After commit 5ea422750a9f ("pinctrl: baytrail: Pass irqchip when adding gpiochip") the GPIO IRQ chip structure is being initialized under conditional when IRQ resource has been discovered. But that commit left aside the assignment of ->init_valid_mask() callback that is done unconditionally. For sake of consistency and preventing some garbage in GPIO IRQ chip structure group initialization together. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 539d8bde72c22d760013bf81436d6bb94eb67aed Author: Andy Shevchenko Date: Thu Oct 24 17:33:42 2019 +0300 pinctrl: baytrail: Allocate IRQ chip dynamic Keeping the IRQ chip definition static shares it with multiple instances of the GPIO chip in the system. This is bad and now we get this warning from GPIO library: "detected irqchip that is shared with multiple gpiochips: please fix the driver." Hence, move the IRQ chip definition from being driver static into the struct intel_pinctrl. So a unique IRQ chip is used for each GPIO chip instance. Fixes: 9f573b98ca50 ("pinctrl: baytrail: Update irq chip operations") Depends-on: ca8a958e2acb ("pinctrl: baytrail: Pass irqchip when adding gpiochip") Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 16c46fd505fbe33ee480f8bb67aa3807b3507c72 Author: Chris Wilson Date: Sun Dec 8 16:12:51 2019 +0000 drm/i915/gem: Avoid rcu_barrier() from shrinker paths As i915_gem_object_unbind() waits on an rcu_barrier() to flush vm releases (and destruction of their bound vma), we have to be careful not to invoke that barrier from beneath the shrinker: <4> [430.222671] WARNING: possible circular locking dependency detected <4> [430.222673] 5.4.0-rc8-CI-CI_DRM_7508+ #1 Tainted: G U <4> [430.222675] ------------------------------------------------------ <4> [430.222677] gem_pwrite/2317 is trying to acquire lock: <4> [430.222678] ffffffff82248218 (rcu_state.barrier_mutex){+.+.}, at: rcu_barrier+0x23/0x190 <4> [430.222685] but task is already holding lock: <4> [430.222687] ffffffff82263a40 (fs_reclaim){+.+.}, at: fs_reclaim_acquire.part.117+0x0/0x30 <4> [430.222691] which lock already depends on the new lock. <4> [430.222693] the existing dependency chain (in reverse order) is: <4> [430.222695] -> #2 (fs_reclaim){+.+.}: <4> [430.222698] fs_reclaim_acquire.part.117+0x24/0x30 <4> [430.222702] kmem_cache_alloc_trace+0x2a/0x2c0 <4> [430.222705] intel_cpuc_prepare+0x37/0x1a0 <4> [430.222709] cpuhp_invoke_callback+0x9b/0x9d0 <4> [430.222712] _cpu_up+0xa2/0x140 <4> [430.222714] do_cpu_up+0x61/0xa0 <4> [430.222718] smp_init+0x57/0x96 <4> [430.222722] kernel_init_freeable+0xac/0x1c7 <4> [430.222725] kernel_init+0x5/0x100 <4> [430.222728] ret_from_fork+0x24/0x50 <4> [430.222729] -> #1 (cpu_hotplug_lock.rw_sem){++++}: <4> [430.222733] cpus_read_lock+0x34/0xd0 <4> [430.222734] rcu_barrier+0xaa/0x190 <4> [430.222736] kernel_init+0x21/0x100 <4> [430.222737] ret_from_fork+0x24/0x50 <4> [430.222739] -> #0 (rcu_state.barrier_mutex){+.+.}: <4> [430.222742] __lock_acquire+0x1328/0x15d0 <4> [430.222743] lock_acquire+0xa7/0x1c0 <4> [430.222746] __mutex_lock+0x9a/0x9d0 <4> [430.222747] rcu_barrier+0x23/0x190 <4> [430.222850] i915_gem_object_unbind+0x264/0x3d0 [i915] <4> [430.222882] i915_gem_shrink+0x297/0x5f0 [i915] <4> [430.222912] i915_gem_shrink_all+0x38/0x60 [i915] <4> [430.222934] i915_drop_caches_set+0x1f0/0x240 [i915] <4> [430.222938] simple_attr_write+0xb0/0xd0 <4> [430.222941] full_proxy_write+0x51/0x80 <4> [430.222943] vfs_write+0xb9/0x1d0 <4> [430.222944] ksys_write+0x9f/0xe0 <4> [430.222946] do_syscall_64+0x4f/0x210 <4> [430.222948] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4> [430.222950] other info that might help us debug this: <4> [430.222952] Chain exists of: rcu_state.barrier_mutex --> cpu_hotplug_lock.rw_sem --> fs_reclaim <4> [430.222955] Possible unsafe locking scenario: <4> [430.222957] CPU0 CPU1 <4> [430.222958] ---- ---- <4> [430.222960] lock(fs_reclaim); <4> [430.222961] lock(cpu_hotplug_lock.rw_sem); <4> [430.222963] lock(fs_reclaim); <4> [430.222964] lock(rcu_state.barrier_mutex); <4> [430.222966] *** DEADLOCK *** <4> [430.222968] 3 locks held by gem_pwrite/2317: <4> [430.222969] #0: ffff88849e2d9408 (sb_writers#14){.+.+}, at: vfs_write+0x1a4/0x1d0 <4> [430.222973] #1: ffff888496976db0 (&attr->mutex){+.+.}, at: simple_attr_write+0x36/0xd0 <4> [430.222976] #2: ffffffff82263a40 (fs_reclaim){+.+.}, at: fs_reclaim_acquire.part.117+0x0/0x30 <4> [430.222980] stack backtrace: <4> [430.222982] CPU: 1 PID: 2317 Comm: gem_pwrite Tainted: G U 5.4.0-rc8-CI-CI_DRM_7508+ #1 <4> [430.222985] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.2321.A08.1909162051 09/16/2019 <4> [430.222989] Call Trace: <4> [430.222992] dump_stack+0x71/0x9b <4> [430.222995] check_noncircular+0x19b/0x1c0 <4> [430.222998] ? __lock_acquire+0x1328/0x15d0 <4> [430.222999] __lock_acquire+0x1328/0x15d0 <4> [430.223001] ? mark_held_locks+0x49/0x70 <4> [430.223003] lock_acquire+0xa7/0x1c0 <4> [430.223005] ? rcu_barrier+0x23/0x190 <4> [430.223008] __mutex_lock+0x9a/0x9d0 <4> [430.223009] ? rcu_barrier+0x23/0x190 <4> [430.223011] ? rcu_barrier+0x23/0x190 <4> [430.223013] ? find_held_lock+0x2d/0x90 <4> [430.223045] ? i915_gem_object_unbind+0x24a/0x3d0 [i915] <4> [430.223048] ? rcu_barrier+0x23/0x190 <4> [430.223049] rcu_barrier+0x23/0x190 <4> [430.223081] i915_gem_object_unbind+0x264/0x3d0 [i915] <4> [430.223119] i915_gem_shrink+0x297/0x5f0 [i915] Closes: https://gitlab.freedesktop.org/drm/intel/issues/743 Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191208161252.3015727-1-chris@chris-wilson.co.uk commit 2099ef02c6c024751e4d16ace67dd6b910c875e4 Author: Benoit Parrot Date: Tue Nov 12 15:53:47 2019 +0100 media: dt-bindings: media: cal: convert binding to yaml Convert ti-cal.txt to ti,cal.yaml. Add ti,cal.yaml to the MAINTAINERS file. Signed-off-by: Benoit Parrot Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit af8b32f8326807aec353a12e3003fd0a8e083bb4 Author: Benoit Parrot Date: Tue Nov 12 15:53:46 2019 +0100 media: ti-vpe: cal: fix enum_mbus_code/frame_size subdev arguments Make sure that both enum_mbus_code() and enum_framesize() properly populate the .which parameter member, otherwise -EINVAL is return causing the subdev asynchronous registration handshake to fail. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit eb9792a427436a6ff0ba819b135f353c54f1aa25 Author: Benoit Parrot Date: Tue Nov 12 15:53:45 2019 +0100 media: ti-vpe: cal: Fix a WARN issued when start streaming fails When start_streaming fails after the buffers have been queued we have to make sure all buffers are returned to user-space properly otherwise a v4l2 level WARN is generated. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 348d32d3a032b389defa9c4a0436c801d1ba059c Author: Benoit Parrot Date: Tue Nov 12 15:53:44 2019 +0100 media: ti-vpe: cal: Properly calculate max resolution boundary Currently we were using an arbitrarily small maximum resolution mostly based on available sensor capabilities. However the hardware DMA limits are much higher than the statically define maximum resolution we were using. There we rework the boundary check code to handle the maximum width and height based on the maximum line width in bytes and re-calculating the pixel width based on the given pixel format. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 49a58ba196036f6993f8bee7c9a9509463ccf81b Author: Benjamin Gaignard Date: Wed Dec 4 16:53:00 2019 +0100 ARM: dts: stm32: remove "@" and "_" from stm32f7 pinmux groups Replace all "@" and "_" by "-" in pinmux groups for stm32f7 family. This avoid errors when using yaml to check the bindings. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit bfcfbb5c6c57e2f31feacd87d8253ef1a7fd3014 Author: Benjamin Gaignard Date: Wed Dec 4 16:53:00 2019 +0100 ARM: dts: stm32: remove "@" and "_" from stm32f4 pinmux groups Replace all "@" and "_" by "-" in pinmux groups for stm32f4 family. This avoid errors when using yaml to check the bindings. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 04d766acbf3ecfb26275c40fc04cb7ce2680e43c Author: Benoit Parrot Date: Tue Nov 12 15:53:43 2019 +0100 media: ti-vpe: cal: Add subdev s_power hooks Because V4L2 still uses a specific way to manage power state of devices that predates runtime PM, bridge driver should power on and off sub device explicitly. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7a3b9684cede12dd60b50af874646527e25eb4d2 Author: Benoit Parrot Date: Tue Nov 12 15:53:42 2019 +0100 media: ti-vpe: cal: Add AM654 support Add the needed control module register bit layout to support the AM654 family of devices. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5fa3144be4fceb0d9eace26de404738a7d68f302 Author: Benoit Parrot Date: Tue Nov 12 15:53:41 2019 +0100 media: dt-bindings: media: cal: update binding to add AM654 support Update Device Tree bindings for the CAL driver to add AM654 support. Signed-off-by: Benoit Parrot Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e2257005902a75b3581fcfa61c62d20d4b6a9188 Author: Benoit Parrot Date: Tue Nov 12 15:53:40 2019 +0100 media: ti-vpe: cal: Add DRA76x support Add the needed control module register bit layout to support the DRA76x family of devices. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3337fba37308ab7a7b74f304758f2b64e46499ae Author: Benoit Parrot Date: Tue Nov 12 15:53:39 2019 +0100 media: dt-bindings: media: cal: update binding to add DRA76x support Update Device Tree bindings for the CAL driver to add DRA76x support. Signed-off-by: Benoit Parrot Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8fac698199fe9c8cc06444e078233de67d63525a Author: Benoit Parrot Date: Tue Nov 12 15:53:38 2019 +0100 media: ti-vpe: cal: Align DPHY init sequence with docs The current CSI2 DPHY initialization sequence although functional does not match with the documented sequence in the Technical Reference Manual. This may affect capture re-startability in stop/start situations. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cd0dacc256fc182b75d9b09e52237b222ab39e6b Author: Benoit Parrot Date: Tue Nov 12 15:53:37 2019 +0100 media: ti-vpe: cal: Fix pixel processing parameters The pixel processing unit was hard coded to only handle 8 bits per pixel from input to output. We now add handling for 10, 12 and 16 bits per pixel at the source and setting the in-memory size (i.e. container size) to 16 bits for these 3 cases. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5f9f2fb7c46f00d1b6a7b1ab743daf8f993148d4 Author: Benoit Parrot Date: Tue Nov 12 15:53:36 2019 +0100 media: ti-vpe: cal: Fix ths_term/ths_settle parameters The current method to calculate the ddr clk period is wrong. Therefore the ths_term calculation is incorrect. Also it was wrongly assumed that the ths_settle parameter was based on the control clock instead of the pixel clock. Since the DPHY can tolerate quite a bit a of variation, capture was still mostly working with the 2 tested modes when the pixel clock was close to the control clock (i.e. 96 Mhz). But it would quickly stops working when using different modes or when customers used different sensors altogether. Calculating the DDRClk period needs to take into account the pixel bit width and the number of active data lanes. Based on the latest technical reference manual these parameters should now be calculated as follows: THS_TERM: Programmed value = floor(20 ns/DDRClk period) THS_SETTLE: Programmed value = floor(105 ns/DDRClk period) + 4 Also originally 'depth' was used to represent the number of bits a pixel would use once stored in memory (i.e. the container size). To accurately calculate the THS_* parameters we need to use the actual number of bits per pixels coming in from the sensor. So we are renaming 'depth' to 'bpp' (bits per pixels) and update the format table to show the actual number of bits per pixel being received. The "container" size will be derived from the "bpp" value. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6713feb7c6fdad329bd4168a9d2f7d5e9a67099a Author: Benoit Parrot Date: Tue Nov 12 15:53:35 2019 +0100 media: ti-vpe: cal: add CSI2 PHY LDO errata support Apply Errata i913 every time the functional clock is enabled. This should take care of suspend/resume case as well. Signed-off-by: Benoit Parrot Signed-off-by: Jyri Sarha Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 03ea2e032e799b7b76a40be3f4fa1eae66cf8fde Author: Benoit Parrot Date: Tue Nov 12 15:53:34 2019 +0100 media: dt-bindings: media: cal: update binding to add PHY LDO errata support Update Device Tree bindings for the CAL driver to add support for the CSI2 PHY LDO errata workaround for pre-es2 devices. Signed-off-by: Benoit Parrot Signed-off-by: Jyri Sarha Acked-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6e72eab2e7b7a157d554b8f9faed7676047be7c1 Author: Nikhil Devshatwar Date: Tue Nov 12 15:53:33 2019 +0100 media: ti-vpe: cal: Restrict DMA to avoid memory corruption When setting DMA for video capture from CSI channel, if the DMA size is not given, it ends up writing as much data as sent by the camera. This may lead to overwriting the buffers causing memory corruption. Observed green lines on the default framebuffer. Restrict the DMA to maximum height as specified in the S_FMT ioctl. Signed-off-by: Nikhil Devshatwar Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 23122c373e33b13001509c5d09620b0ba5f7d08c Author: Benoit Parrot Date: Tue Nov 12 15:53:32 2019 +0100 media: ti-vpe: cal: Enable DMABUF export Allow CAL to be able to export DMA buffer. Signed-off-by: Benoit Parrot Signed-off-by: Jyri Sarha Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 65ee4280f19cb17ae21a11afcea0bf08f3eadfd2 Author: Benoit Parrot Date: Tue Nov 12 15:53:31 2019 +0100 media: ti-vpe: cal: Add per platform data support First this patch adds a method to access the CTRL_CORE_CAMERRX_CONTROL register to use the syscon mechanism. For backward compatibility we also handle using the existing camerrx_control "reg" entry if a syscon node is not found. In addition the register bit layout for the CTRL_CORE_CAMERRX_CONTROL changes depending on the device. In order to support this we need to use a register access scheme based on data configuration instead of using static macro. In this case we make use of the regmap facility and create data set based on the various device and phy available. Signed-off-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5e51dd35255774419af84fc3dcc068ce8ae908c3 Author: Benoit Parrot Date: Tue Nov 12 15:53:30 2019 +0100 media: ti-vpe: cal: switch BIT_MASK to BIT Looks like the preferred macro to define a single bit mask is BIT() and not BIT_MASK(). Signed-off-by: Benoit Parrot [hverkuil-cisco@xs4all.nl: fix checkpatch warnings for CAL_HL_IRQ_MASK] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b99c35a40ca04c1eb1706e6c02d36231f67c0b43 Author: Benoit Parrot Date: Tue Nov 12 15:53:29 2019 +0100 media: dt-bindings: media: cal: update binding example Update binding example to show proper endpoint properties and linkage. Signed-off-by: Benoit Parrot Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8f2b841a00b50766794a7426f22258c77f29b21d Author: Benoit Parrot Date: Tue Nov 12 15:53:28 2019 +0100 media: dt-bindings: media: cal: update binding to use syscon Update Device Tree bindings for the CAL driver to use syscon to access the phy config register instead of trying to map it directly. Signed-off-by: Benoit Parrot Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7240497850f76e698e27aca66664cd7ca4f1d5ff Author: Chris Wilson Date: Sat Dec 7 18:29:37 2019 +0000 drm/i915: Flesh out device_info pretty printer Include all the number fields for describing the GT, as well as the current boolean flags, primarily for inclusion in error states. Signed-off-by: Chris Wilson Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191207182937.2583002-1-chris@chris-wilson.co.uk commit 8d65859a4cbae92f441b9aec8780055a361cc3d0 Author: Chris Wilson Date: Sat Dec 7 22:26:44 2019 +0000 drm/i915/gem: Comment on inability to check args.pad for MMAP_OFFSET Since we didn't check and insist that args.pad must be zero for MMAP_GTT historically, we cannot insert a check now as old userspace may be feeding in garbage. As such the lack of check is enshrined into the ABI, so add a comment to remind us we cannot add the check later. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20191207222644.2830129-1-chris@chris-wilson.co.uk commit b6d0531ec7e2ae923395a1d5a80edb7ee51ac204 Author: Fabien Dessenne Date: Mon Dec 2 10:01:17 2019 +0100 moduleparam: fix kerneldoc Document missing @arg in xxx_param_cb(). Describe all parameters of module_param_[named_]unsafe() and all *_param_cb() to make ./scripts/kernel-doc happy. Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Fabien Dessenne Signed-off-by: Jessica Yu commit bf08949cc8b98b7d1e20cfbba169a5938d42dae8 Author: Masami Hiramatsu Date: Tue Dec 3 15:14:04 2019 +0900 modules: lockdep: Suppress suspicious RCU usage warning While running kprobe module test, find_module_all() caused a suspicious RCU usage warning. ----- ============================= WARNING: suspicious RCU usage 5.4.0-next-20191202+ #63 Not tainted ----------------------------- kernel/module.c:619 RCU-list traversed in non-reader section!! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by rmmod/642: #0: ffffffff8227da80 (module_mutex){+.+.}, at: __x64_sys_delete_module+0x9a/0x230 stack backtrace: CPU: 0 PID: 642 Comm: rmmod Not tainted 5.4.0-next-20191202+ #63 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack+0x71/0xa0 find_module_all+0xc1/0xd0 __x64_sys_delete_module+0xac/0x230 ? do_syscall_64+0x12/0x1f0 do_syscall_64+0x50/0x1f0 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x4b6d49 ----- This is because list_for_each_entry_rcu(modules) is called without rcu_read_lock(). This is safe because the module_mutex is locked. Pass lockdep_is_held(&module_mutex) to the list_for_each_entry_rcu() to suppress this warning, This also fixes similar issue in mod_find() and each_symbol_section(). Signed-off-by: Masami Hiramatsu Signed-off-by: Jessica Yu commit f3fdbc721b8bc99c692716cf9a3cf061b5a49a18 Author: Boris Brezillon Date: Tue Dec 3 15:15:11 2019 +0100 drm/bridge: Clarify the atomic enable/disable hooks semantics The [pre_]enable/[post_]disable hooks are passed the old atomic state. Update the doc and rename the arguments to make it clear. Signed-off-by: Boris Brezillon Reviewed-by: Laurent Pinchart Reviewed-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20191203141515.3597631-8-boris.brezillon@collabora.com commit bd88d319abe9a4bb6cc63b23cc760bec46e81fe6 Author: Thierry Reding Date: Thu Oct 17 17:11:41 2019 +0200 pwm: imx27: Unconditionally write state to hardware The i.MX driver currently uses a shortcut and doesn't write all of the state through to the hardware when the PWM is disabled. This causes an inconsistent state to be read back by consumers with the result of them malfunctioning. Fix this by always writing the full state through to the hardware registers so that the correct state can always be read back. Tested-by: Michal Vokáč Tested-by: Adam Ford Signed-off-by: Thierry Reding commit a3597d6c89d70ff0bcb1dd74dc0a88442fe79da6 Author: Thierry Reding Date: Thu Oct 17 12:56:00 2019 +0200 pwm: imx27: Cache duty cycle register value The hardware register containing the duty cycle value cannot be accessed when the PWM is disabled. This causes the ->get_state() callback to read back a duty cycle value of 0, which can confuse consumer drivers. Tested-by: Michal Vokáč Tested-by: Adam Ford Signed-off-by: Thierry Reding commit 1db37f9561b2b3f57d84b6253a9cd97f6289f8e1 Author: Thierry Reding Date: Thu Oct 17 13:21:15 2019 +0200 pwm: cros-ec: Cache duty cycle value The ChromeOS embedded controller doesn't differentiate between disabled and duty cycle being 0. In order not to potentially confuse consumers, cache the duty cycle and return the cached value instead of the real value when the PWM is disabled. Tested-by: Enric Balletbo i Serra Signed-off-by: Thierry Reding commit cfc4c189bc70b1acc17e6f1abf1dc1c0ae890bd8 Author: Thierry Reding Date: Mon Oct 21 12:51:56 2019 +0200 pwm: Read initial hardware state at request time Drivers that support reading the hardware state (using ->get_state()) may want to rely on per-PWM data to do so. Defer reading the hardware state for the first time until the PWM has been requested and after drivers have had a chance to allocate per-PWM data. Conceptually this is also a more natural place to read the hardware state because the PWM core doesn't need to know the hardware state of a PWM unless there is a user for it. This also ensures that the state is read everytime a user requests a PWM. If the PWM changes between users for some reason, the PWM core will reload the state from hardware and keep its copy of the state up-to-date. Tested-by: Enric Balletbo i Serra Tested-by: Michal Vokáč Signed-off-by: Thierry Reding commit ac877c64c87aff5d228cf53e40d8f68899afa815 Author: Boris Brezillon Date: Tue Dec 3 15:15:10 2019 +0100 drm/bridge: Add the drm_bridge_get_prev_bridge() helper The drm_bridge_get_prev_bridge() helper will be useful for bridge drivers that want to do bus format negotiation with their neighbours. Signed-off-by: Boris Brezillon Reviewed-by: Laurent Pinchart Reviewed-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20191203141515.3597631-7-boris.brezillon@collabora.com commit 4ec5c9050a496a984ffdaaf2307aef353634dc87 Author: Boris Brezillon Date: Tue Dec 3 15:15:09 2019 +0100 drm/bridge: Add the drm_for_each_bridge_in_chain() helper To iterate over all bridges attached to a specific encoder. Suggested-by: Laurent Pinchart Signed-off-by: Boris Brezillon Reviewed-by: Laurent Pinchart Reviewed-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20191203141515.3597631-6-boris.brezillon@collabora.com commit 05193dc38197021894b17239fafbd2eb1afe5a45 Author: Boris Brezillon Date: Tue Dec 3 15:15:08 2019 +0100 drm/bridge: Make the bridge chain a double-linked list So that each element in the chain can easily access its predecessor. This will be needed to support bus format negotiation between elements of the bridge chain. Signed-off-by: Boris Brezillon Reviewed-by: Neil Armstrong Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20191203141515.3597631-5-boris.brezillon@collabora.com commit 35a61fe9218a9d32a93447bdcca1d0f167cd0433 Author: Boris Brezillon Date: Tue Dec 3 15:15:07 2019 +0100 drm: Stop accessing encoder->bridge directly We are about to replace the single-linked bridge list by a double-linked one based on list.h, leading to the suppression of the encoder->bridge field. But before we can do that we must provide a drm_bridge_chain_get_first_bridge() bridge helper and patch all drivers and core helpers to use it instead of directly accessing encoder->bridge. Note that we still have 2 drivers (VC4 and Exynos) manipulating the encoder->bridge field directly because they need to cut the bridge chain in order to control the enable/disable sequence. This is definitely not something we want to encourage, so let's keep those 2 oddities around until we find a better solution. Signed-off-by: Boris Brezillon Reviewed-by: Laurent Pinchart Reviewed-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20191203141515.3597631-4-boris.brezillon@collabora.com commit fadf872d9d9274a3be34d8438e0f6bb465c8f98b Author: Boris Brezillon Date: Tue Dec 3 15:15:06 2019 +0100 drm/bridge: Introduce drm_bridge_get_next_bridge() And use it in drivers accessing the bridge->next field directly. This is part of our attempt to make the bridge chain a double-linked list based on the generic list helpers. Signed-off-by: Boris Brezillon Reviewed-by: Neil Armstrong Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20191203141515.3597631-3-boris.brezillon@collabora.com commit ea099adfdf4bf35903dc1c0f59a0d60175759c70 Author: Boris Brezillon Date: Tue Dec 3 15:15:05 2019 +0100 drm/bridge: Rename bridge helpers targeting a bridge chain Change the prefix of bridge helpers targeting a bridge chain from drm_bridge_ to drm_bridge_chain_ to better reflect the fact that the operation will happen on all elements of chain, starting at the bridge passed in argument. Signed-off-by: Boris Brezillon Reviewed-by: Neil Armstrong Acked-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20191203141515.3597631-2-boris.brezillon@collabora.com commit e27cca96cd68fa2c6814c90f9a1cfd36bb68c593 Author: Sabrina Dubroca Date: Mon Nov 25 14:49:02 2019 +0100 xfrm: add espintcp (RFC 8229) TCP encapsulation of IKE and IPsec messages (RFC 8229) is implemented as a TCP ULP, overriding in particular the sendmsg and recvmsg operations. A Stream Parser is used to extract messages out of the TCP stream using the first 2 bytes as length marker. Received IKE messages are put on "ike_queue", waiting to be dequeued by the custom recvmsg implementation. Received ESP messages are sent to XFRM, like with UDP encapsulation. Some of this code is taken from the original submission by Herbert Xu. Currently, only IPv4 is supported, like for UDP encapsulation. Co-developed-by: Herbert Xu Signed-off-by: Herbert Xu Signed-off-by: Sabrina Dubroca Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit eecd227a9a3479038ba2a2f579b3ce9edb364b80 Author: Sabrina Dubroca Date: Mon Nov 25 14:49:01 2019 +0100 esp4: split esp_output_udp_encap and introduce esp_output_encap Co-developed-by: Herbert Xu Signed-off-by: Herbert Xu Signed-off-by: Sabrina Dubroca Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit 25f6802b4c18817c82cd581d38ce155ad6412176 Author: Sabrina Dubroca Date: Mon Nov 25 14:49:00 2019 +0100 esp4: prepare esp_input_done2 for non-UDP encapsulation For espintcp encapsulation, we will need to get the source port from the TCP header instead of UDP. Introduce a variable to hold the port. Co-developed-by: Herbert Xu Signed-off-by: Herbert Xu Signed-off-by: Sabrina Dubroca Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit cac3c71604cf4eada8df00b1e66892636399cda5 Author: Sabrina Dubroca Date: Mon Nov 25 14:48:59 2019 +0100 xfrm: add route lookup to xfrm4_rcv_encap At this point, with TCP encapsulation, the dst may be gone, but xfrm_input needs one. Signed-off-by: Sabrina Dubroca Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit 7b3801927e52f8621de311277f7fc727635019e7 Author: Sabrina Dubroca Date: Mon Nov 25 14:48:58 2019 +0100 xfrm: introduce xfrm_trans_queue_net This will be used by TCP encapsulation to write packets to the encap socket without holding the user socket's lock. Without this reinjection, we're already holding the lock of the user socket, and then try to lock the encap socket as well when we enqueue the encrypted packet. While at it, add a BUILD_BUG_ON like we usually do for skb->cb, since it's missing for struct xfrm_trans_cb. Co-developed-by: Herbert Xu Signed-off-by: Herbert Xu Signed-off-by: Sabrina Dubroca Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit b50b0580d27bc45a0637aefc8bac4d31aa85771a Author: Sabrina Dubroca Date: Mon Nov 25 14:48:57 2019 +0100 net: add queue argument to __skb_wait_for_more_packets and __skb_{,try_}recv_datagram This will be used by ESP over TCP to handle the queue of IKE messages. Signed-off-by: Sabrina Dubroca Acked-by: David S. Miller Signed-off-by: Steffen Klassert commit a43e29090934670233026838b05a7aa8be1d76d6 Author: Markus Reichl Date: Mon Nov 18 13:44:54 2019 +0100 arm64: dts: rockchip: Enable MTD Flash on rk3399-roc-pc rk3399-roc-pc has 16 MB SPI NOR Flash, enable it. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/94f44e1d-86c6-1e32-aa63-56edbd7d75f5@fivetechno.de Signed-off-by: Heiko Stuebner commit 140e816a8083fef0d71e593873fd52e2169d15e1 Author: Markus Reichl Date: Mon Nov 18 12:23:47 2019 +0100 arm64: dts: rockchip: Add SDR104 mode to SD-card I/F on rk3399-roc-pc Add SDR104 capability and regulators to SD card node. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/1b9b8314-8778-2d48-6f7a-3502c2146c42@fivetechno.de Signed-off-by: Heiko Stuebner commit a308163a9d4be9feb256cc6f17ddade83f0c9543 Author: Markus Reichl Date: Mon Nov 18 12:23:18 2019 +0100 arm64: dts: rockchip: Use correct pin for lcd-reset pinctrl on rk3399-roc-pc Fix typo according to schematics. The original pin is needed to enable vcc3v0_sd in second patch of this series. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/cd5fd3a8-b0eb-9dc1-c473-9355762cdaa5@fivetechno.de Signed-off-by: Heiko Stuebner commit 88c5a235e88bef675d75265d066ca7d1b7f1f210 Author: Kever Yang Date: Mon Nov 11 08:51:56 2019 +0800 arm64: dts: rockchip: Fix min voltage for rk3399-firefly vdd_log The min/max value of vdd_log is decide by pwm IO voltage and its resistors, the rk3399-firefly board's pwm regulator circuit is designed for IO voltage at 1.8V, while the board actually use 3.0V for IO, which at last lead to the min-microvolt to '430mV' instead of '800mV'. Signed-off-by: Kever Yang Link: https://lore.kernel.org/r/20191111005158.25070-1-kever.yang@rock-chips.com Signed-off-by: Heiko Stuebner commit c38d8009ed6c41b5332b04acc39a3d6a16aae689 Author: Markus Reichl Date: Tue Nov 12 12:42:09 2019 +0100 arm64: dts: rockchip: Fix vdd_log on rk3399-roc-pc On rk3399 vdd_log shall not exceed 1.0 V. On rk3399-roc-pc vdd_log is presently 1118 mV. Fix by setting the min voltage of the respective pwm-regulator down to 450 mV. This results in a vdd_log of 953 mV. Specify the supply to silence warning. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/d786ef47-eda8-3994-2ef2-fc4a584bcdcc@fivetechno.de Signed-off-by: Heiko Stuebner commit a8e611f634e3ace01ec7e81e4f37ae351a49f404 Author: Markus Reichl Date: Mon Nov 11 10:51:04 2019 +0100 arm64: dts: rockchip: Disable HS400 for mmc on rk3399-roc-pc Working with rootfs on two 128GB mmcs on rk3399-roc-pc. One (mmc name 128G72, one screw hole) works fine in HS400 mode. Other (mmc name DJNB4R, firefly on pcb, two screw holes) gets lots of mmc1: "running CQE recovery", even hangs with damaged fs, when running under heavy load, e.g. compiling kernel. Both run fine with HS200. Disabling CQ with patch mmc: core: Add MMC Command Queue Support kernel parameter [0] did not help. [0] https://gitlab.com/ayufan-repos/rock64/linux-mainline-kernel/commit/54e264154b87dfe32a8359b2726e2d5611adbaf3 Therefore I propose to disable HS400 mode on roc-pc for now. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/367bf78a-f079-f0b4-68fe-52c86823c174@fivetechno.de Signed-off-by: Heiko Stuebner commit 67dd31f71580c2832936e08cf221d1610ee44b7c Author: Heiko Stuebner Date: Sat Nov 16 10:52:49 2019 +0100 arm64: dts: rockchip: enable tsadc on px30-evb Enable the tsadc thermal controller on px30-evb. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20191116095249.31193-2-heiko@sntech.de commit 023115cdea26b914a54589db0f6caef85bed5fb0 Author: Heiko Stuebner Date: Sat Nov 16 10:52:48 2019 +0100 arm64: dts: rockchip: add thermal infrastructure to px30 Add tsadc and necessary connections to core px30 components. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20191116095249.31193-1-heiko@sntech.de commit 8554723e664d8ac2a0e2e07c81e88cd15b75b0c6 Author: Heiko Stuebner Date: Sat Nov 16 10:52:20 2019 +0100 arm64: dts: rockchip: remove 408MHz operating point from px30 It looks like the px30 is running unstable at this 408MHz operating point. This shows in stalled threads and other big numbers of kernel exception. At 600MHz and above it instead works stable and as expected. As the 408MHz point doesn't even decrease the voltage compared to 600MHz, just drop this 408MHz operating point for now. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20191116095220.31122-1-heiko@sntech.de commit 876816b2679f0bf2bdc5f9d04b00f58f419d88e2 Author: Robin Murphy Date: Sat Nov 16 12:47:20 2019 +0000 arm64: dts: rockchip: Improve nanopi4 PCIe Expand the power tree description with the 0V9 and 1V8 supplies to the RK3399 PCIe block. The NanoPis M4 and NEO4 just route 2 lanes to the user expansion pins, so there's not much more to say at the board level for them; NanoPC-T4 has a standard M.2 connector so we can at least claim the 3.3V supply to that too. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/a04a17f4b9b12e8698c76b34e7ca22f0c81845ce.1573908195.git.robin.murphy@arm.com Signed-off-by: Heiko Stuebner commit a793e19c15f25a126138ac4ae9facf9204754af3 Author: Robin Murphy Date: Sat Nov 16 12:47:19 2019 +0000 arm64: dts: rockchip: Fix NanoPC-T4 cooling maps Although it appeared to follow logically from the bindings, apparently the thermal framework can't properly cope with a single cooling device being shared between multiple maps. The CPU zone is probably easier to overheat, so remove the references to the (optional) fan from the GPU cooling zone to avoid things getting confused. Hopefully GPU-intensive tasks will leak enough heat across to the CPU zone to still hit the fan trips before reaching critical GPU temperatures. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/5bb39f3115df1a487d717d3ae87e523b03749379.1573908197.git.robin.murphy@arm.com Signed-off-by: Heiko Stuebner commit 526ba2e2cf61cfae1c20c55e6fb0a2528751501c Author: Matwey V. Kornilov Date: Sun Nov 17 13:15:37 2019 +0300 arm64: dts: rockchip: Enable PCIe for Radxa Rock Pi 4 board Radxa Rock Pi 4 is equipped with M.2 PCIe slot, so enable PCIe for the board. The changes has been tested with Intel SSD 660p series device. 01:00.0 Class 0108: Device 8086:f1a8 (rev 03) Signed-off-by: Matwey V. Kornilov Link: https://lore.kernel.org/r/20191117101545.6406-1-matwey@sai.msu.ru Signed-off-by: Heiko Stuebner commit 635f9a6d9cdcabfbd76de24f2bccb2d7924abf59 Author: Anand Moon Date: Sun Nov 17 14:07:28 2019 +0000 arm64: dts: rockchip: Add regulators for pcie on rk3399-rock960 As per Rock960 schematics add 0V9 and 1V8 voltage supplies to the RK3399 PCIe block. Signed-off-by: Anand Moon Link: https://lore.kernel.org/r/20191117140728.917-1-linux.amoon@gmail.com Signed-off-by: Heiko Stuebner commit e748d355273354c486ea73f0badcc835e86c59e6 Author: Markus Reichl Date: Mon Nov 11 15:37:41 2019 +0100 arm64: dts: rockchip: Enable HDMI Sound on rk3399-roc-pc HDMI-Sound is the only available sound card on rk3399-roc-pc, enable it. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/c9db5599-743b-bb90-999e-5989be6556ac@fivetechno.de Signed-off-by: Heiko Stuebner commit ec5b0af7da34fc1f62fdb93d6f7dad52369f6509 Author: Markus Reichl Date: Mon Nov 11 15:21:39 2019 +0100 arm64: dts: rockchip: Add regulators for pcie on rk3399-roc-pc Add regulators to pcie node from schematics. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/8fa0c3da-b64d-f47f-a9eb-b3456a3fd073@fivetechno.de Signed-off-by: Heiko Stuebner commit ec7d731d81e794489ee8e76da221f3358d682ad0 Author: Markus Reichl Date: Mon Nov 11 16:38:26 2019 +0100 arm64: dts: rockchip: Add node for gpu on rk3399-roc-pc rk3399-roc-pc has a Mali gpu, enable it for use with panfrost and mesa >19.2. Signed-off-by: Markus Reichl Link: https://lore.kernel.org/r/c2b88509-129d-46d4-9e23-15d0482951be@fivetechno.de Signed-off-by: Heiko Stuebner commit 1d0f9e1e1e46939ae52804917647982b43754996 Author: Geert Uytterhoeven Date: Wed Nov 13 11:18:09 2019 +0100 pinctrl: sh-pfc: Make legacy function GPIO handling less fragile If there are no function GPIOs, sh_pfc_register_gpiochip() returns early with a success indicator. This is fragile, as new code may be added after the #ifdef block, which won't be executed in case of early return. Invert the logic, so the code always continues until the end of the function on success. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20191113101809.28600-1-geert+renesas@glider.be commit 6f89dd9e9325d05b1f54d860dbbc84b42aa40759 Author: Fabrizio Castro Date: Wed Nov 13 15:51:29 2019 +0000 ARM: dts: iwg20d-q7-common: Add LCD support The iwg20d comes with a 7" capacitive touch screen, therefore add support for it. Signed-off-by: Fabrizio Castro Acked-by: Laurent Pinchart Link: https://lore.kernel.org/r/1573660292-10629-11-git-send-email-fabrizio.castro@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c4ed20f74c79cb070f9e2a1cb2acb4f53dfb95a9 Author: Biju Das Date: Mon Sep 23 15:30:52 2019 +0100 dt-bindings: timer: renesas: tmu: Document r8a774b1 bindings Document RZ/G2N (R8A774B1) SoC in the Renesas TMU bindings. Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/r/1569249052-1037-1-git-send-email-biju.das@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 4fc265a9c9b258ddd7eafbd0dbfca66687c3d8aa Author: Kees Cook Date: Mon Nov 18 13:09:21 2019 -0800 x86/mtrr: Require CAP_SYS_ADMIN for all access Zhang Xiaoxu noted that physical address locations for MTRR were visible to non-root users, which could be considered an information leak. In discussing[1] the options for solving this, it sounded like just moving the capable check into open() was the first step. If this breaks userspace, then we will have a test case for the more conservative approaches discussed in the thread. In summary: - MTRR should check capabilities at open time (or retain the checks on the opener's permissions for later checks). - changing the DAC permissions might break something that expects to open mtrr when not uid 0. - if we leave the DAC permissions alone and just move the capable check to the opener, we should get the desired protection. (i.e. check against CAP_SYS_ADMIN not just the wider uid 0.) - if that still breaks things, as in userspace expects to be able to read other parts of the file as non-uid-0 and non-CAP_SYS_ADMIN, then we need to censor the contents using the opener's permissions. For example, as done in other /proc cases, like commit 51d7b120418e ("/proc/iomem: only expose physical resource addresses to privileged users"). [1] https://lore.kernel.org/lkml/201911110934.AC5BA313@keescook/ Reported-by: Zhang Xiaoxu Signed-off-by: Kees Cook Signed-off-by: Borislav Petkov Acked-by: James Morris Cc: "H. Peter Anvin" Cc: Colin Ian King Cc: Ingo Molnar Cc: linux-security-module@vger.kernel.org Cc: Matthew Garrett Cc: Thomas Gleixner Cc: Tyler Hicks Cc: x86-ml Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/201911181308.63F06502A1@keescook commit 2e30dd9e0698d5a04698f38e932a6e29893d8a93 Author: Borislav Petkov Date: Fri Nov 8 21:05:45 2019 +0100 x86/mtrr: Get rid of mtrr_seq_show() forward declaration ... by moving the function up in the file. No functional changes. Signed-off-by: Borislav Petkov Cc: x86@kernel.org Link: https://lkml.kernel.org/r/20191108200815.24589-1-bp@alien8.de commit a2bec7058852f262923de94855991c7739185f7b Author: Alexandre Torgue Date: Tue Nov 19 11:35:04 2019 +0100 ARM: dts: stm32: Adapt STM32MP157C ED1 board to STM32 DT diversity This commit adds security (cryp1) IP to stm32mp157c ED1 board by including stm32mp15xc.dtsi file. Signed-off-by: Alexandre Torgue commit 144d1ba705480c96baea4c4a689be13189c5b400 Author: Alexandre Torgue Date: Tue Nov 19 11:29:18 2019 +0100 ARM: dts: stm32: Adapt STM32MP157 DK boards to stm32 DT diversity To handle STM32MP15 SOCs diversity, some updates have to been done. This commit mainly adapt dk1 board to include the correct package and the correct SOC version. A new file has been created to factorize common parts. Signed-off-by: Alexandre Torgue commit 0eda69b6c5f90321c4fefbaee1360cb99dc14a65 Author: Alexandre Torgue Date: Tue Nov 19 11:03:58 2019 +0100 ARM: dts: stm32: Manage security diversity for STM32M15x SOCs This commit creates a new file to manage security diversity on STM32MP15x SOCs. On STM32MP15xY, "Y" gives information: -Y = A means no cryp IP and no secure boot. -Y = C means cryp IP + secure boot. Signed-off-by: Alexandre Torgue commit 95e395c881b35101578f8a7e1041cebcf21d7d79 Author: Alexandre Torgue Date: Tue Nov 19 10:06:57 2019 +0100 ARM: dts: stm32: Introduce new STM32MP15 SOCs: STM32MP151 and STM32MP153 STM32MP151 and STM32MP153 were not explicitly supported through stm32mp157c.dts. This commit adds dedicated files to support all STM32MP15 SOCs family. The differences between those SOCs are: -STM32MP151 [1]: common file. -STM32MP153 [2]: STM32MP151 + CANs + a second CortexA7-CPU. -STM32MP157 [3]: STM32MP153 + DSI + GPU. [1] https://www.st.com/resource/en/reference_manual/dm00366349.pdf [2] https://www.st.com/resource/en/reference_manual/dm00366355.pdf [3] https://www.st.com/resource/en/reference_manual/dm00327659.pdf Signed-off-by: Alexandre Torgue commit 48c7181fa79fbaf6019087a590092b014bc567aa Author: Alexandre Torgue Date: Mon Nov 18 17:49:33 2019 +0100 ARM: dts: stm32: Update stm32mp157 pinctrl files In order to cover the STM32MP15 SOCs family this commit updates pinctrl file names (group definition and packages files). This family includes: STM32MP151, STM32MP153 and STM32MP157. Signed-off-by: Alexandre Torgue commit 92d3a35c07251d060b163f19ca61b3702c7126ff Author: Alexandre Torgue Date: Mon Nov 18 17:44:13 2019 +0100 ARM: dts: stm32: Adapt stm32mp157 pinctrl to manage STM32MP15xx SOCs family This commit modifies stm32mp157 pinctrl files to better manage STM32MP15xx SOCs diversity. Pin controller and gpio controller are moved to common SOC dtsi file. Only pin groups remain in the main pinctrl dtsi file. Signed-off-by: Alexandre Torgue commit ac4533a816e06cb630d2f9c9b83e246c06fdef66 Author: Benjamin Gaignard Date: Fri Nov 15 11:06:51 2019 +0100 ARM: dts: stm32: remove unused rng interrupt on stm32f429 Interrupt has never be used in rng driver so remove it from DT. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 91ad4af4b29709462a2185c770ac1de9bd2e2c09 Author: Fabrice Gasnier Date: Fri Nov 8 17:37:39 2019 +0100 ARM: dts: stm32: add ADC support to stm32mp157c-ed1 Add ADC support to stm32mp157c-ed1 board. Following ADC signals are dedicated for analog and routed to connectors: - ADC1/2 in0 (ANA0) - ADC1/2 in1 (ANA1) - ADC1 in6 (PF12) Configure ADC1 with these signals. But keep it disabled by default, so PF12 can be used as gpio by default. Add VDD and VDDA supplies to ADC on stm32mp157c-ed1 board. This allows to get full ADC analog performances in case VDDA is below 2.7V (not the case by default). Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit ee39d8a3e4c8317986abdd1bd0c57a25dd3802a8 Author: Fabrice Gasnier Date: Fri Nov 8 17:37:38 2019 +0100 ARM: dts: stm32: add ADC pins used for stm32mp157c-ed1 Define adc1_in6 pin used on stm32mp157c eval board. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit 7e5d83981911f66fd0e6c110ea6a21a4f771b924 Author: Yann Gautier Date: Fri Nov 15 11:44:51 2019 +0100 ARM: dts: stm32: add sdmmc3 node for STM32MP1 boards On STM32MP1 EVAL and DISCOVERY boards, the SDMMC3 internal peripheral can be used through the GPIO extension connector. The sdmmc3 node is then added in the boards DT files, and the required pins are also added. The node status is disabled as there is no device connected by default. Signed-off-by: Ludovic Barre Signed-off-by: Yann Gautier commit 0382bf82fe7aa050c5b3e1857e5095f76dc3ab5a Author: Yann Gautier Date: Wed Nov 6 11:09:37 2019 +0100 ARM: dts: stm32: enable sdmmc2 node for stm32mp157c-ed1 board On STM32MP157C-ED1, the eMMC is connected on instance 2 of SDMMC peripheral. The sdmmc2 node is then added in the board DT file, as well as the pins nodes in the pinctrl file. Signed-off-by: Ludovic Barre Signed-off-by: Yann Gautier Signed-off-by: Alexandre Torgue commit 64e11cb783d120d0a76cf89dbe4471ba98db0d8a Author: Yann Gautier Date: Wed Nov 6 11:09:36 2019 +0100 ARM: dts: stm32: add sdmmc2 & 3 nodes for STM32MP157 SoC The STM32MP157 SoC series includes 3 instances of the SDMMC peripheral. The sdmmc2 and sdmmc3 nodes are added in STM32MP157 SoC DT file. Signed-off-by: Ludovic Barre Signed-off-by: Yann Gautier Signed-off-by: Alexandre Torgue commit 0a1732cf6cdcd347528ff1e2ac31fa7b51427f06 Author: Yann Gautier Date: Wed Nov 6 11:09:35 2019 +0100 ARM: dts: stm32: update slew-rate properties for sdmmc1 on stm32mp157 Relax sdmmc1 pins slew-rate to minimize peak currents. Signed-off-by: Ludovic Barre Signed-off-by: Yann Gautier Signed-off-by: Alexandre Torgue commit f9b9aaaa06adfe97985cc9f0abc3f5409e2e2929 Author: Fabrice Gasnier Date: Wed Nov 6 10:11:24 2019 +0100 ARM: dts: stm32: add timers counter support on stm32mp157c Add counter support on stm32mp157c that provides quadrature encoder on timers 1, 2, 3, 4, 5 and 8. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit 4edf4c656db1a7cc4b093cf560efc74692080b39 Author: Fabrice Gasnier Date: Tue Nov 5 13:52:21 2019 +0100 ARM: dts: stm32: add support for PWM on stm32mp157a-dk1 Add PWM support on stm32mp157a-dk1 board. There are several timers channels made available on GPIO expansion and arduino connectors: - Add PWM and trigger support (these timers can also be used as trigger for ADC). It's easier then to configure them all. But keep them disabled by default, so the pins are kept in their initial state to lower power consumption. This way they can also be used as GPIO. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit 08af7401504f2fe367aecda67125fcd5e2842d09 Author: Fabrice Gasnier Date: Tue Nov 5 13:52:20 2019 +0100 ARM: dts: stm32: add pwm sleep pins to stm32mp157c-ev1 Add pinctrl sleep state for PWM on stm32mp157c-ev1 board. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit 1e381a657a1ff29130a9dfb8ee166226a6afaf52 Author: Fabrice Gasnier Date: Tue Nov 5 13:52:19 2019 +0100 ARM: dts: stm32: add pwm pin muxing for stm32mp157a-dk1 Add all PWM pinctrl definitions that can be used on stm32mp157a-dk1 board. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit f7a3b40baf77721601d97b9e1cd55dec36f8ff87 Author: Fabrice Gasnier Date: Tue Nov 5 13:52:18 2019 +0100 ARM: dts: stm32: add pwm sleep pin muxing for stm32mp157c-ev1 Add PWM pinctrl definitions used in low-power (sleep) mode on stm32mp157c-ev1. Signed-off-by: Fabrice Gasnier Signed-off-by: Alexandre Torgue commit fcb1991c46a686c963cfcc172d68bc43dd715eaf Author: Lucas Stach Date: Wed Nov 27 19:21:26 2019 +0100 arm64: dts: imx8mq: add missing SAI nodes Currently only SAI2 is present in the DT. Add all the other SAI instances present on the SoC. Signed-off-by: Lucas Stach Reviewed-by: Daniel Baluta Signed-off-by: Shawn Guo commit 5d22a618820f23059833b83c2d4850352ee1c169 Author: Corentin Labbe Date: Sun Nov 10 16:35:20 2019 +0000 clk: sunxi: use of_device_get_match_data The usage of of_device_get_match_data reduce the code size a bit. Signed-off-by: Corentin Labbe Signed-off-by: Maxime Ripard commit 59f3f4dcf68d276ff2ed0245f7c1938403de4c91 Author: Clément Péron Date: Thu Nov 14 11:25:41 2019 +0100 arm64: dts: allwinner: h6: Enable USB 3.0 host for Beelink GS1 and Tanix TX6 Enable USB 3.0 phy and host controller. VBUS is directly connected to DCIN 5V and doesn't require to be switched on. Signed-off-by: Clément Péron Signed-off-by: Maxime Ripard commit 2c63afdafa5100397308036a9dfbde24db5aecd5 Author: Andre Heider Date: Sat Nov 9 12:34:36 2019 +0100 arm64: dts: allwinner: orange-pi-3: Enable IR receiver Orange Pi 3 has an on-board IR receiver, enable it. Signed-off-by: Andre Heider Acked-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit 4999236e05b8a357de033356abe298cd96c57c5f Author: Ruslan V. Sushko Date: Wed Nov 27 19:19:21 2019 +0100 arm64: dts: zii-ultra: adjust board names Change ZII Ultra board names to be more in line with other ZII RDU platforms. Signed-off-by: Ruslan Sushko Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo commit cd262dbfd7032fb0307478362ab7d79e4eb6d2c4 Author: Lucas Stach Date: Mon Dec 9 15:20:55 2019 +0800 soc: imx8: print SoC type and revision This is useful information to have when looking through system logs, so add it to the output. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo commit 1987ddfca3583a3c124898d657ded871950b2926 Author: Guido Günther Date: Mon Nov 25 15:50:07 2019 +0100 arm64: dts: imx8mq: Add eLCDIF controller Add a node for the eLCDIF controller, "disabled" by default. Signed-off-by: Guido Günther Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 912b9dacf3f0ffad55e1a1b3c5af0e433ebdb5dd Author: Philipp Zabel Date: Wed Nov 27 12:05:09 2019 +0100 arm64: dts: imx8mq: increase NOC clock to 800 MHz The NOC clock defaults to 400 MHz. Increase it to 800 MHz for improved memory performance. Signed-off-by: Philipp Zabel Signed-off-by: Lucas Stach Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 2ef139393fdcb7e8016aab9f649696c06d73deb1 Author: Leonard Crestez Date: Thu Nov 21 15:52:17 2019 +0200 clk: imx8m: Suppress bind attrs The clock drivers on imx8m series are registered as platform devices and this opens the possibility of reloading the driver at runtime. This doesn't actually work: clocks are never removed and attempting to bind again results in registration errors and a crash. Almost all devices depend on clocks anyway so rebinding is unlikely to ever be useful Fix this by explicitly suppressing bind attrs like several other clock drivers. Signed-off-by: Leonard Crestez Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit c13f370d492d2696f768152d50fc4f7c02a24c83 Author: Fabio Estevam Date: Tue Nov 19 16:28:48 2019 -0300 clk: imx7ulp: Fix watchdog2 clock name typo There is a typo in the watchdog2 clock name. Fix it by changing it to "wdg2". Signed-off-by: Fabio Estevam Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit 3ff86050da41e072dd9fffc373c4f5691573cf4e Author: Jan Remmet Date: Mon Dec 2 14:41:19 2019 +0100 clk: imx6q: disable non functional divider The /2 divider between pll4_audio_div and pll4_post_div is not working on imx6q. The frequency is not halved as reported by the clock tree and measured on clko. In the technical reference manual the divider was removed in revision 4. It's also not listed in the imx6qp manual. imx6dl manual mentions a divider for PLL4 and the according register description. So keep the divider here. Signed-off-by: Jan Remmet Signed-off-by: Shawn Guo commit e7096c131e5161fa3b8e52a650d7719d2857adfd Author: Jason A. Donenfeld Date: Mon Dec 9 00:27:34 2019 +0100 net: WireGuard secure network tunnel WireGuard is a layer 3 secure networking tunnel made specifically for the kernel, that aims to be much simpler and easier to audit than IPsec. Extensive documentation and description of the protocol and considerations, along with formal proofs of the cryptography, are available at: * https://www.wireguard.com/ * https://www.wireguard.com/papers/wireguard.pdf This commit implements WireGuard as a simple network device driver, accessible in the usual RTNL way used by virtual network drivers. It makes use of the udp_tunnel APIs, GRO, GSO, NAPI, and the usual set of networking subsystem APIs. It has a somewhat novel multicore queueing system designed for maximum throughput and minimal latency of encryption operations, but it is implemented modestly using workqueues and NAPI. Configuration is done via generic Netlink, and following a review from the Netlink maintainer a year ago, several high profile userspace tools have already implemented the API. This commit also comes with several different tests, both in-kernel tests and out-of-kernel tests based on network namespaces, taking profit of the fact that sockets used by WireGuard intentionally stay in the namespace the WireGuard interface was originally created, exactly like the semantics of userspace tun devices. See wireguard.com/netns/ for pictures and examples. The source code is fairly short, but rather than combining everything into a single file, WireGuard is developed as cleanly separable files, making auditing and comprehension easier. Things are laid out as follows: * noise.[ch], cookie.[ch], messages.h: These implement the bulk of the cryptographic aspects of the protocol, and are mostly data-only in nature, taking in buffers of bytes and spitting out buffers of bytes. They also handle reference counting for their various shared pieces of data, like keys and key lists. * ratelimiter.[ch]: Used as an integral part of cookie.[ch] for ratelimiting certain types of cryptographic operations in accordance with particular WireGuard semantics. * allowedips.[ch], peerlookup.[ch]: The main lookup structures of WireGuard, the former being trie-like with particular semantics, an integral part of the design of the protocol, and the latter just being nice helper functions around the various hashtables we use. * device.[ch]: Implementation of functions for the netdevice and for rtnl, responsible for maintaining the life of a given interface and wiring it up to the rest of WireGuard. * peer.[ch]: Each interface has a list of peers, with helper functions available here for creation, destruction, and reference counting. * socket.[ch]: Implementation of functions related to udp_socket and the general set of kernel socket APIs, for sending and receiving ciphertext UDP packets, and taking care of WireGuard-specific sticky socket routing semantics for the automatic roaming. * netlink.[ch]: Userspace API entry point for configuring WireGuard peers and devices. The API has been implemented by several userspace tools and network management utility, and the WireGuard project distributes the basic wg(8) tool. * queueing.[ch]: Shared function on the rx and tx path for handling the various queues used in the multicore algorithms. * send.c: Handles encrypting outgoing packets in parallel on multiple cores, before sending them in order on a single core, via workqueues and ring buffers. Also handles sending handshake and cookie messages as part of the protocol, in parallel. * receive.c: Handles decrypting incoming packets in parallel on multiple cores, before passing them off in order to be ingested via the rest of the networking subsystem with GRO via the typical NAPI poll function. Also handles receiving handshake and cookie messages as part of the protocol, in parallel. * timers.[ch]: Uses the timer wheel to implement protocol particular event timeouts, and gives a set of very simple event-driven entry point functions for callers. * main.c, version.h: Initialization and deinitialization of the module. * selftest/*.h: Runtime unit tests for some of the most security sensitive functions. * tools/testing/selftests/wireguard/netns.sh: Aforementioned testing script using network namespaces. This commit aims to be as self-contained as possible, implementing WireGuard as a standalone module not needing much special handling or coordination from the network subsystem. I expect for future optimizations to the network stack to positively improve WireGuard, and vice-versa, but for the time being, this exists as intentionally standalone. We introduce a menu option for CONFIG_WIREGUARD, as well as providing a verbose debug log and self-tests via CONFIG_WIREGUARD_DEBUG. Signed-off-by: Jason A. Donenfeld Cc: David Miller Cc: Greg KH Cc: Linus Torvalds Cc: Herbert Xu Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller commit 0376f6ec9eb8690e8efcf37e4ae2e0a7cc0fef1d Author: Leonard Crestez Date: Fri Nov 22 23:45:04 2019 +0200 arm64: dts: imx8m: Add ddr controller nodes This is used by the imx-ddrc devfreq driver to implement dynamic frequency scaling of DRAM. Support for proactive scaling via interconnect will come later. The high-performance bus masters which need that (display, vpu, gpu) are mostly not yet enabled in upstream anyway. Signed-off-by: Leonard Crestez Signed-off-by: Shawn Guo commit e18f64712e9ef22054da1babe425d2a5892edcd4 Author: Leonard Crestez Date: Fri Nov 22 23:45:01 2019 +0200 clk: imx: Mark dram pll on 8mm and 8mn with CLK_GET_RATE_NOCACHE DRAM frequency switches are executed in firmware and can change the configuration of the DRAM PLL outside linux. Mark these CLKs with CLK_GET_RATE_NOCACHE so we always read back the PLL config registers and recalculate rates. In current DRAM frequency tables on 8mm/8mn only the maximum frequency uses the PLL so it's always configured in the same way. However reading back the PLL configuration is the correct behavior and allows additional setpoints in the future. Signed-off-by: Leonard Crestez Reviewed-by: Abel Vesa Acked-by: Stephen Boyd Signed-off-by: Shawn Guo commit d9ea9ca2b420123557eca0490295cb4f48615ee2 Author: Leonard Crestez Date: Fri Nov 22 23:45:00 2019 +0200 clk: imx8m: Set CLK_GET_RATE_NOCACHE on dram clocks These clocks are only modified as part of DRAM frequency switches during which DRAM itself is briefly inaccessible. The switch is performed with a SMC call to by TF-A which runs from a SRAM area; upon returning to linux several clocks bits are modified and we need to update them. For rate bits an easy solution is to just mark with CLK_GET_RATE_NOCACHE so that new rates are always read back from registers. Signed-off-by: Leonard Crestez Reviewed-by: Abel Vesa Acked-by: Stephen Boyd Signed-off-by: Shawn Guo commit 0f93eb28ff3a348818509aac7850a8f6df114a3f Author: Fancy Fang Date: Thu Nov 7 10:35:30 2019 +0000 arm64: dts: imx8mn: remove "simple-bus" for anatop Remove "simple-bus" compatible for device anatop, since no child nodes exist under it and it is not a populated bus. Signed-off-by: Fancy Fang Signed-off-by: Shawn Guo commit 0900a484928d8ed14677eb9f0356b5c191ed0b27 Author: Fancy Fang Date: Thu Nov 7 10:35:26 2019 +0000 arm64: dts: imx8mm: remove "simple-bus" for anatop Remove "simple-bus" compatible for device anatop, since no child nodes exist under it and it is not a populated bus. Signed-off-by: Fancy Fang Signed-off-by: Shawn Guo commit c7649739f55d7520a2c44dab1a71a897088ab6bc Author: Anson Huang Date: Thu Nov 7 11:30:35 2019 +0800 arm64: dts: imx8qxp: Remove unnecessary "interrupt-parent" property gic is appointed as default interrupt parent for devices, so no need to specify it again in device nodes which use it as interrupt parent. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 0840a47ee85fdcc883b535ba12a849bfc2078523 Author: Vladimir Oltean Date: Thu Nov 14 12:02:53 2019 +0100 ARM: dts: ls1021a-tsn: Use interrupts for the SGMII PHYs On the LS1021A-TSN board, the 2 Atheros AR8031 PHYs for eth0 and eth1 have interrupt lines connected to the shared IRQ2_B LS1021A pin. Switching to interrupts offloads the PHY library from the task of polling the MDIO status and AN registers (1, 4, 5) every second. Unfortunately, the BCM5464R quad PHY connected to the switch does not appear to have an interrupt line routed to the SoC. Signed-off-by: Vladimir Oltean Signed-off-by: Rasmus Villemoes Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo commit d27f9d634c9b8b375e8fd949da615e29283dcd44 Author: Rasmus Villemoes Date: Thu Nov 14 12:02:52 2019 +0100 ARM: dts: ls1021a: add node describing external interrupt lines This adds a node describing the six external interrupt lines IRQ0-IRQ5 with configurable polarity. Signed-off-by: Rasmus Villemoes Signed-off-by: Shawn Guo commit 562ed3e439a6e697b562590d4fb3c857352c60a2 Author: Michael Grzeschik Date: Wed Nov 20 22:13:34 2019 +0100 ARM: dts: imx25: describe maximum speed of internal usbhost port1 phy The internal usbphy of usbhost port1 is only full-speed capable. We set this limitation in the dtsi. Signed-off-by: Michael Grzeschik Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit e50811396a4941c629797dd51c9c0a1606414cbd Author: Michael Grzeschik Date: Wed Nov 20 22:13:33 2019 +0100 ARM: dts: imx25: consolidate properties of usbhost1 in dtsi file The usb port represented by &usbhost1 uses an USB phy internal to the SoC. We add the phy_type to the base dtsi so the board dts only have to overwrite it if they use a different configuration. While at it we also pin the usbhost port to host mode. Signed-off-by: Michael Grzeschik Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 6d8709248d8869b144deaf68e3c6e82cf7dc5cd8 Author: Fabio Estevam Date: Fri Nov 8 11:39:36 2019 -0300 ARM: dts: e60k02: Pass the memory unit address The following build warning is seen with W=1: DTC arch/arm/boot/dts/imx6sll-kobo-clarahd.dtb arch/arm/boot/dts/e60k02.dtsi:51.9-53.4: Warning (unit_address_vs_reg): /memory: node has a reg or ranges property, but no unit name Pass the memory unit address to fix the problem. While at it, also pass 'device_type = "memory"', which is recommended for memory nodes. Signed-off-by: Fabio Estevam Tested-by: Andreas Kemnade Signed-off-by: Shawn Guo commit 0b47f9201075adece3f1eb22db1ffb8b75fa58b4 Author: Andreas Kemnade Date: Fri Nov 8 12:18:34 2019 +0100 ARM: dts: add devicetree entry for Tolino Shine 3 The device is almost identical to the Kobo Clara HD. The only spotted difference is the SoC. It contains an imx6sl instead of an imx6sll. Signed-off-by: Andreas Kemnade Tested-by: H. Nikolaus Schaller Signed-off-by: Shawn Guo commit 97a94cd58c50549b212cfcacccd9ff3f5f0d8f54 Author: Anson Huang Date: Thu Nov 7 10:14:52 2019 +0800 ARM: dts: imx7d-sdb-reva: Add revision in board compatible string i.MX7D SDB Rev-A board should use its own board compatible string instead of default i.MX7D SDB board. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit e26f87c59ec49a0c3b58ed07398df53f5205632f Author: Anson Huang Date: Thu Nov 7 09:56:03 2019 +0800 ARM: dts: imx6sx-sdb-reva: Add revision in board compatible string i.MX6SX SDB Rev-A board should use its own board compatible string instead of default i.MX6SX SDB board. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 388adcbb08ef5f93062ec3e384d26fbb54233947 Author: Adam Ford Date: Wed Nov 6 08:23:08 2019 -0600 ARM: dts: imx6q-logicpd: Enable ili2117a Touchscreen The LCD used with the imx6q-logicpd board has an integrated ili2117a touch controller connected to i2c1. This patch adds the node to enable this feature. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 5e78a98601d6437a578f68551fd8caca414e210f Author: Adam Ford Date: Tue Nov 5 07:42:45 2019 -0600 ARM: imx_v6_v7_defconfig: Enable TOUCHSCREEN_ILI210X The imx6q-logicpd board supports an LCD with an ili2117 touchscreen controller. This patch enables the TOUCHSCREEN_ILI210X which will support the ili2117. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 5780c958da06397ba0b492c73726f4636705a64d Author: Andreas Kemnade Date: Fri Nov 8 12:18:33 2019 +0100 dt-bindings: arm: fsl: add compatible string for Tolino Shine 3 This adds a compatible string for the Tolino Shine 3 eBook reader. Signed-off-by: Andreas Kemnade Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 7bd9f52628f035a0a9cb3ac5e8ed115c2002c2ef Author: Anson Huang Date: Thu Nov 7 10:14:53 2019 +0800 dt-bindings: arm: imx: Add the i.MX7D-SDB Rev-A board Add board binding for i.MX7D-SDB Rev-A board which is already supported. Signed-off-by: Anson Huang Acked-by: Rob Herring Signed-off-by: Shawn Guo commit a1433ca47e2657f42c4c8d6c5e75824eef03d2e9 Author: Anson Huang Date: Thu Nov 7 09:56:04 2019 +0800 dt-bindings: arm: imx: Add the i.MX6SX-SDB Rev-A board Add board binding for i.MX6SX-SDB Rev-A board which is already supported. Signed-off-by: Anson Huang Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 2871736869f031a02deb67ae24794e149ee16a4a Author: Peng Fan Date: Mon Nov 4 10:11:37 2019 +0000 clk: imx: clk-divider-gate: drop redundant initialization There is no need to initialize flags as 0. Signed-off-by: Peng Fan Reviewed-by: Abel Vesa Signed-off-by: Shawn Guo commit a546d88c13ea23fda07dc0633ba272789cee1106 Author: Peng Fan Date: Mon Nov 4 10:11:33 2019 +0000 clk: imx: clk-divider-gate: fix a typo in comment Fix a typo in comment: resue -> reuse. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit f0f3588f7a95bb8e02b0f8f5138efb7064665730 Author: Al Viro Date: Sat Dec 7 21:51:31 2019 -0500 kernfs: don't bother with timestamp truncation kernfs users are not going to have limited range or granularity anyway. Signed-off-by: Al Viro commit 23b424d9c36e6205d38130f9d96fa755e51e8817 Author: Deepa Dinamani Date: Mon Dec 2 21:19:45 2019 -0800 fs: Do not overload update_time update_time() also has an internal function pointer update_time. Even though this works correctly, it is confusing to the readers. Just use a regular if statement to call the generic function or the function pointer. Suggested-by: Al Viro Signed-off-by: Deepa Dinamani Signed-off-by: Al Viro commit ba70609d5ec664a8f36ba1c857fcd97a478adf79 Author: Deepa Dinamani Date: Mon Dec 2 21:19:44 2019 -0800 fs: Delete timespec64_trunc() There are no more callers to the function remaining. Signed-off-by: Deepa Dinamani Signed-off-by: Al Viro commit 1bfad0c079415a3e7152c4dd4f2fb0b2e4c2851d Author: Deepa Dinamani Date: Mon Dec 2 21:19:43 2019 -0800 fs: ubifs: Eliminate timespec64_trunc() usage DEFAULT_TIME_GRAN is seconds granularity. We can just drop the nsec while creating the default root node. Delete the unneeded call to timespec64_trunc(). Also update the ktime_get_* api to match the one used in current_time(). This allows for the timestamps to be updated by using the same ktime_get_* api always. Signed-off-by: Deepa Dinamani Cc: richard@nod.at Cc: linux-mtd@lists.infradead.org Signed-off-by: Al Viro commit 668c9a61e3bf31b0dff108009add7fcd4c387869 Author: Deepa Dinamani Date: Mon Dec 2 21:19:42 2019 -0800 fs: ceph: Delete timespec64_trunc() usage Since ceph always uses ns granularity, skip the truncation which is a no-op. Signed-off-by: Deepa Dinamani Cc: jlayton@kernel.org Cc: ceph-devel@vger.kernel.org Signed-off-by: Al Viro commit 918c900987f2ea59c3de793b744bff5f7d691ac2 Author: Deepa Dinamani Date: Mon Dec 2 21:19:41 2019 -0800 fs: cifs: Delete usage of timespec64_trunc timestamp_truncate() is the replacement api for timespec64_trunc. timestamp_truncate() additionally clamps timestamps to make sure the timestamps lie within the permitted range for the filesystem. Truncate the timestamps in the struct cifs_attr at the site of assignment to inode times. This helps us use the right fs api timestamp_trucate() to perform the truncation. Also update the ktime_get_* api to match the one used in current_time(). This allows for timestamps to be updated the same way always. Signed-off-by: Deepa Dinamani Cc: stfrench@microsoft.com Cc: linux-cifs@vger.kernel.org Signed-off-by: Al Viro commit 97acf83de493ece462b7edccf920f0dbfb857f2b Author: Deepa Dinamani Date: Mon Dec 2 21:19:40 2019 -0800 fs: fat: Eliminate timespec64_trunc() usage timespec64_trunc() is being deleted. timestamp_truncate() is the replacement api for timespec64_trunc. timestamp_truncate() additionally clamps timestamps to make sure the timestamps lie within the permitted range for the filesystem. But, fat always truncates the times locally after it obtains the timestamps from current_time(). Implement a local version here along the lines of existing truncate functions. Suggested-by: Al Viro Signed-off-by: Deepa Dinamani Cc: hirofumi@mail.parknet.co.jp Signed-off-by: Al Viro commit eb31e2f63d85d1bec4f7b136f317e03c03db5503 Author: Amir Goldstein Date: Sun Nov 24 21:31:45 2019 +0200 utimes: Clamp the timestamps in notify_change() Push clamping timestamps into notify_change(), so in-kernel callers like nfsd and overlayfs will get similar timestamp set behavior as utimes. AV: get rid of clamping in ->setattr() instances; we don't need to bother with that there, with notify_change() doing normalization in all cases now (it already did for implicit case, since current_time() clamps). Suggested-by: Miklos Szeredi Fixes: 42e729b9ddbb ("utimes: Clamp the timestamps before update") Cc: stable@vger.kernel.org # v5.4 Cc: Deepa Dinamani Cc: Jeff Layton Signed-off-by: Amir Goldstein Signed-off-by: Al Viro commit ab87f9a56c8ee9fa6856cb13d8f2905db913baae Author: Aleksa Sarai Date: Sat Dec 7 01:13:35 2019 +1100 namei: LOOKUP_{IN_ROOT,BENEATH}: permit limited ".." resolution Allow LOOKUP_BENEATH and LOOKUP_IN_ROOT to safely permit ".." resolution (in the case of LOOKUP_BENEATH the resolution will still fail if ".." resolution would resolve a path outside of the root -- while LOOKUP_IN_ROOT will chroot(2)-style scope it). Magic-link jumps are still disallowed entirely[*]. As Jann explains[1,2], the need for this patch (and the original no-".." restriction) is explained by observing there is a fairly easy-to-exploit race condition with chroot(2) (and thus by extension LOOKUP_IN_ROOT and LOOKUP_BENEATH if ".." is allowed) where a rename(2) of a path can be used to "skip over" nd->root and thus escape to the filesystem above nd->root. thread1 [attacker]: for (;;) renameat2(AT_FDCWD, "/a/b/c", AT_FDCWD, "/a/d", RENAME_EXCHANGE); thread2 [victim]: for (;;) openat2(dirb, "b/c/../../etc/shadow", { .flags = O_PATH, .resolve = RESOLVE_IN_ROOT } ); With fairly significant regularity, thread2 will resolve to "/etc/shadow" rather than "/a/b/etc/shadow". There is also a similar (though somewhat more privileged) attack using MS_MOVE. With this patch, such cases will be detected *during* ".." resolution and will return -EAGAIN for userspace to decide to either retry or abort the lookup. It should be noted that ".." is the weak point of chroot(2) -- walking *into* a subdirectory tautologically cannot result in you walking *outside* nd->root (except through a bind-mount or magic-link). There is also no other way for a directory's parent to change (which is the primary worry with ".." resolution here) other than a rename or MS_MOVE. The primary reason for deferring to userspace with -EAGAIN is that an in-kernel retry loop (or doing a path_is_under() check after re-taking the relevant seqlocks) can become unreasonably expensive on machines with lots of VFS activity (nfsd can cause lots of rename_lock updates). Thus it should be up to userspace how many times they wish to retry the lookup -- the selftests for this attack indicate that there is a ~35% chance of the lookup succeeding on the first try even with an attacker thrashing rename_lock. A variant of the above attack is included in the selftests for openat2(2) later in this patch series. I've run this test on several machines for several days and no instances of a breakout were detected. While this is not concrete proof that this is safe, when combined with the above argument it should lend some trustworthiness to this construction. [*] It may be acceptable in the future to do a path_is_under() check for magic-links after they are resolved. However this seems unlikely to be a feature that people *really* need -- it can be added later if it turns out a lot of people want it. [1]: https://lore.kernel.org/lkml/CAG48ez1jzNvxB+bfOBnERFGp=oMM0vHWuLD6EULmne3R6xa53w@mail.gmail.com/ [2]: https://lore.kernel.org/lkml/CAG48ez30WJhbsro2HOc_DR7V91M+hNFzBP5ogRMZaxbAORvqzg@mail.gmail.com/ Cc: Christian Brauner Suggested-by: Jann Horn Suggested-by: Linus Torvalds Signed-off-by: Aleksa Sarai Signed-off-by: Al Viro commit 8db52c7e7ee1bd861b6096fcafc0fe7d0f24a994 Author: Aleksa Sarai Date: Sat Dec 7 01:13:34 2019 +1100 namei: LOOKUP_IN_ROOT: chroot-like scoped resolution /* Background. */ Container runtimes or other administrative management processes will often interact with root filesystems while in the host mount namespace, because the cost of doing a chroot(2) on every operation is too prohibitive (especially in Go, which cannot safely use vfork). However, a malicious program can trick the management process into doing operations on files outside of the root filesystem through careful crafting of symlinks. Most programs that need this feature have attempted to make this process safe, by doing all of the path resolution in userspace (with symlinks being scoped to the root of the malicious root filesystem). Unfortunately, this method is prone to foot-guns and usually such implementations have subtle security bugs. Thus, what userspace needs is a way to resolve a path as though it were in a chroot(2) -- with all absolute symlinks being resolved relative to the dirfd root (and ".." components being stuck under the dirfd root). It is much simpler and more straight-forward to provide this functionality in-kernel (because it can be done far more cheaply and correctly). More classical applications that also have this problem (which have their own potentially buggy userspace path sanitisation code) include web servers, archive extraction tools, network file servers, and so on. /* Userspace API. */ LOOKUP_IN_ROOT will be exposed to userspace through openat2(2). /* Semantics. */ Unlike most other LOOKUP flags (most notably LOOKUP_FOLLOW), LOOKUP_IN_ROOT applies to all components of the path. With LOOKUP_IN_ROOT, any path component which attempts to cross the starting point of the pathname lookup (the dirfd passed to openat) will remain at the starting point. Thus, all absolute paths and symlinks will be scoped within the starting point. There is a slight change in behaviour regarding pathnames -- if the pathname is absolute then the dirfd is still used as the root of resolution of LOOKUP_IN_ROOT is specified (this is to avoid obvious foot-guns, at the cost of a minor API inconsistency). As with LOOKUP_BENEATH, Jann's security concern about ".."[1] applies to LOOKUP_IN_ROOT -- therefore ".." resolution is blocked. This restriction will be lifted in a future patch, but requires more work to ensure that permitting ".." is done safely. Magic-link jumps are also blocked, because they can beam the path lookup across the starting point. It would be possible to detect and block only the "bad" crossings with path_is_under() checks, but it's unclear whether it makes sense to permit magic-links at all. However, userspace is recommended to pass LOOKUP_NO_MAGICLINKS if they want to ensure that magic-link crossing is entirely disabled. /* Testing. */ LOOKUP_IN_ROOT is tested as part of the openat2(2) selftests. [1]: https://lore.kernel.org/lkml/CAG48ez1jzNvxB+bfOBnERFGp=oMM0vHWuLD6EULmne3R6xa53w@mail.gmail.com/ Cc: Christian Brauner Signed-off-by: Aleksa Sarai Signed-off-by: Al Viro commit adb21d2b526f7f196b2f3fdca97d80ba05dd14a0 Author: Aleksa Sarai Date: Sat Dec 7 01:13:33 2019 +1100 namei: LOOKUP_BENEATH: O_BENEATH-like scoped resolution /* Background. */ There are many circumstances when userspace wants to resolve a path and ensure that it doesn't go outside of a particular root directory during resolution. Obvious examples include archive extraction tools, as well as other security-conscious userspace programs. FreeBSD spun out O_BENEATH from their Capsicum project[1,2], so it also seems reasonable to implement similar functionality for Linux. This is part of a refresh of Al's AT_NO_JUMPS patchset[3] (which was a variation on David Drysdale's O_BENEATH patchset[4], which in turn was based on the Capsicum project[5]). /* Userspace API. */ LOOKUP_BENEATH will be exposed to userspace through openat2(2). /* Semantics. */ Unlike most other LOOKUP flags (most notably LOOKUP_FOLLOW), LOOKUP_BENEATH applies to all components of the path. With LOOKUP_BENEATH, any path component which attempts to "escape" the starting point of the filesystem lookup (the dirfd passed to openat) will yield -EXDEV. Thus, all absolute paths and symlinks are disallowed. Due to a security concern brought up by Jann[6], any ".." path components are also blocked. This restriction will be lifted in a future patch, but requires more work to ensure that permitting ".." is done safely. Magic-link jumps are also blocked, because they can beam the path lookup across the starting point. It would be possible to detect and block only the "bad" crossings with path_is_under() checks, but it's unclear whether it makes sense to permit magic-links at all. However, userspace is recommended to pass LOOKUP_NO_MAGICLINKS if they want to ensure that magic-link crossing is entirely disabled. /* Testing. */ LOOKUP_BENEATH is tested as part of the openat2(2) selftests. [1]: https://reviews.freebsd.org/D2808 [2]: https://reviews.freebsd.org/D17547 [3]: https://lore.kernel.org/lkml/20170429220414.GT29622@ZenIV.linux.org.uk/ [4]: https://lore.kernel.org/lkml/1415094884-18349-1-git-send-email-drysdale@google.com/ [5]: https://lore.kernel.org/lkml/1404124096-21445-1-git-send-email-drysdale@google.com/ [6]: https://lore.kernel.org/lkml/CAG48ez1jzNvxB+bfOBnERFGp=oMM0vHWuLD6EULmne3R6xa53w@mail.gmail.com/ Cc: Christian Brauner Suggested-by: David Drysdale Suggested-by: Al Viro Suggested-by: Andy Lutomirski Suggested-by: Linus Torvalds Signed-off-by: Aleksa Sarai Signed-off-by: Al Viro commit 72ba29297e1439efaa54d9125b866ae9d15df339 Author: Aleksa Sarai Date: Sat Dec 7 01:13:32 2019 +1100 namei: LOOKUP_NO_XDEV: block mountpoint crossing /* Background. */ The need to contain path operations within a mountpoint has been a long-standing usecase that userspace has historically implemented manually with liberal usage of stat(). find, rsync, tar and many other programs implement these semantics -- but it'd be much simpler to have a fool-proof way of refusing to open a path if it crosses a mountpoint. This is part of a refresh of Al's AT_NO_JUMPS patchset[1] (which was a variation on David Drysdale's O_BENEATH patchset[2], which in turn was based on the Capsicum project[3]). /* Userspace API. */ LOOKUP_NO_XDEV will be exposed to userspace through openat2(2). /* Semantics. */ Unlike most other LOOKUP flags (most notably LOOKUP_FOLLOW), LOOKUP_NO_XDEV applies to all components of the path. With LOOKUP_NO_XDEV, any path component which crosses a mount-point during path resolution (including "..") will yield an -EXDEV. Absolute paths, absolute symlinks, and magic-links will only yield an -EXDEV if the jump involved changing mount-points. /* Testing. */ LOOKUP_NO_XDEV is tested as part of the openat2(2) selftests. [1]: https://lore.kernel.org/lkml/20170429220414.GT29622@ZenIV.linux.org.uk/ [2]: https://lore.kernel.org/lkml/1415094884-18349-1-git-send-email-drysdale@google.com/ [3]: https://lore.kernel.org/lkml/1404124096-21445-1-git-send-email-drysdale@google.com/ Cc: Christian Brauner Suggested-by: David Drysdale Suggested-by: Al Viro Suggested-by: Andy Lutomirski Suggested-by: Linus Torvalds Signed-off-by: Aleksa Sarai Signed-off-by: Al Viro commit 4b99d4996979d582859c5a49072e92de124bf691 Author: Aleksa Sarai Date: Sat Dec 7 01:13:31 2019 +1100 namei: LOOKUP_NO_MAGICLINKS: block magic-link resolution /* Background. */ There has always been a special class of symlink-like objects in procfs (and a few other pseudo-filesystems) which allow for non-lexical resolution of paths using nd_jump_link(). These "magic-links" do not follow traditional mount namespace boundaries, and have been used consistently in container escape attacks because they can be used to trick unsuspecting privileged processes into resolving unexpected paths. It is also non-trivial for userspace to unambiguously avoid resolving magic-links, because they do not have a reliable indication that they are a magic-link (in order to verify them you'd have to manually open the path given by readlink(2) and then verify that the two file descriptors reference the same underlying file, which is plagued with possible race conditions or supplementary attack scenarios). It would therefore be very helpful for userspace to be able to avoid these symlinks easily, thus hopefully removing a tool from attackers' toolboxes. This is part of a refresh of Al's AT_NO_JUMPS patchset[1] (which was a variation on David Drysdale's O_BENEATH patchset[2], which in turn was based on the Capsicum project[3]). /* Userspace API. */ LOOKUP_NO_MAGICLINKS will be exposed to userspace through openat2(2). /* Semantics. */ Unlike most other LOOKUP flags (most notably LOOKUP_FOLLOW), LOOKUP_NO_MAGICLINKS applies to all components of the path. With LOOKUP_NO_MAGICLINKS, any magic-link path component encountered during path resolution will yield -ELOOP. The handling of ~LOOKUP_FOLLOW for a trailing magic-link is identical to LOOKUP_NO_SYMLINKS. LOOKUP_NO_SYMLINKS implies LOOKUP_NO_MAGICLINKS. /* Testing. */ LOOKUP_NO_MAGICLINKS is tested as part of the openat2(2) selftests. [1]: https://lore.kernel.org/lkml/20170429220414.GT29622@ZenIV.linux.org.uk/ [2]: https://lore.kernel.org/lkml/1415094884-18349-1-git-send-email-drysdale@google.com/ [3]: https://lore.kernel.org/lkml/1404124096-21445-1-git-send-email-drysdale@google.com/ Cc: Christian Brauner Suggested-by: David Drysdale Suggested-by: Al Viro Suggested-by: Andy Lutomirski Suggested-by: Linus Torvalds Signed-off-by: Aleksa Sarai Signed-off-by: Al Viro commit 278121417a72d87fb29dd8c48801f80821e8f75a Author: Aleksa Sarai Date: Sat Dec 7 01:13:30 2019 +1100 namei: LOOKUP_NO_SYMLINKS: block symlink resolution /* Background. */ Userspace cannot easily resolve a path without resolving symlinks, and would have to manually resolve each path component with O_PATH and O_NOFOLLOW. This is clearly inefficient, and can be fairly easy to screw up (resulting in possible security bugs). Linus has mentioned that Git has a particular need for this kind of flag[1]. It also resolves a fairly long-standing perceived deficiency in O_NOFOLLOw -- that it only blocks the opening of trailing symlinks. This is part of a refresh of Al's AT_NO_JUMPS patchset[2] (which was a variation on David Drysdale's O_BENEATH patchset[3], which in turn was based on the Capsicum project[4]). /* Userspace API. */ LOOKUP_NO_SYMLINKS will be exposed to userspace through openat2(2). /* Semantics. */ Unlike most other LOOKUP flags (most notably LOOKUP_FOLLOW), LOOKUP_NO_SYMLINKS applies to all components of the path. With LOOKUP_NO_SYMLINKS, any symlink path component encountered during path resolution will yield -ELOOP. If the trailing component is a symlink (and no other components were symlinks), then O_PATH|O_NOFOLLOW will not error out and will instead provide a handle to the trailing symlink -- without resolving it. /* Testing. */ LOOKUP_NO_SYMLINKS is tested as part of the openat2(2) selftests. [1]: https://lore.kernel.org/lkml/CA+55aFyOKM7DW7+0sdDFKdZFXgptb5r1id9=Wvhd8AgSP7qjwQ@mail.gmail.com/ [2]: https://lore.kernel.org/lkml/20170429220414.GT29622@ZenIV.linux.org.uk/ [3]: https://lore.kernel.org/lkml/1415094884-18349-1-git-send-email-drysdale@google.com/ [4]: https://lore.kernel.org/lkml/1404124096-21445-1-git-send-email-drysdale@google.com/ Cc: Christian Brauner Suggested-by: Al Viro Suggested-by: Linus Torvalds Signed-off-by: Aleksa Sarai Signed-off-by: Al Viro commit 740a16782750a5b6c7d1609a9c09641ce6753ea6 Author: Aleksa Sarai Date: Sat Dec 7 01:13:29 2019 +1100 namei: allow set_root() to produce errors For LOOKUP_BENEATH and LOOKUP_IN_ROOT it is necessary to ensure that set_root() is never called, and thus (for hardening purposes) it should return an error rather than permit a breakout from the root. In addition, move all of the repetitive set_root() calls to nd_jump_root(). Signed-off-by: Aleksa Sarai Signed-off-by: Al Viro commit 1bc82070fa2763bdca626fa8bde72b35f11e8960 Author: Aleksa Sarai Date: Sat Dec 7 01:13:28 2019 +1100 namei: allow nd_jump_link() to produce errors In preparation for LOOKUP_NO_MAGICLINKS, it's necessary to add the ability for nd_jump_link() to return an error which the corresponding get_link() caller must propogate back up to the VFS. Suggested-by: Al Viro Signed-off-by: Aleksa Sarai Signed-off-by: Al Viro commit ce623f89872df4253719be71531116751eeab85f Author: Aleksa Sarai Date: Sat Dec 7 01:13:27 2019 +1100 nsfs: clean-up ns_get_path() signature to return int ns_get_path() and ns_get_path_cb() only ever return either NULL or an ERR_PTR. It is far more idiomatic to simply return an integer, and it makes all of the callers of ns_get_path() more straightforward to read. Fixes: e149ed2b805f ("take the targets of /proc/*/ns/* symlinks to separate fs") Signed-off-by: Aleksa Sarai Signed-off-by: Al Viro commit 2b98149c2377bff12be5dd3ce02ae0506e2dd613 Author: Aleksa Sarai Date: Sat Dec 7 01:13:26 2019 +1100 namei: only return -ECHILD from follow_dotdot_rcu() It's over-zealous to return hard errors under RCU-walk here, given that a REF-walk will be triggered for all other cases handling ".." under RCU. The original purpose of this check was to ensure that if a rename occurs such that a directory is moved outside of the bind-mount which the resolution started in, it would be detected and blocked to avoid being able to mess with paths outside of the bind-mount. However, triggering a new REF-walk is just as effective a solution. Cc: "Eric W. Biederman" Fixes: 397d425dc26d ("vfs: Test for and handle paths that are unreachable from their mnt_root") Suggested-by: Al Viro Signed-off-by: Aleksa Sarai Signed-off-by: Al Viro commit 61a292860de6ab66c9b6aa1b244ccd4590ddc8ec Author: Sven Eckelmann Date: Thu Nov 28 11:26:06 2019 +0100 batman-adv: Annotate bitwise integer pointer casts The sparse commit 6002ded74587 ("add a flag to warn on casts to/from bitwise pointers") introduced a check for non-direct casts from/to restricted datatypes (when -Wbitwise-pointer is enabled). This triggered various warnings in batman-adv when some (already big endian) buffer content was casted to/from the corresponding big endian integer data types. But these were correct and can therefore be marked with __force to signalize sparse an intended cast from/to a bitwise type. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 2b1aa5a4c654cc665eb5711f49a2855ea6ebe0db Author: René Treffer Date: Tue Nov 26 10:27:38 2019 +0800 batman-adv: ELP - use wifi tx bitrate as fallback throughput Some wifi drivers (e.g. ath10k) provide per-station rx/tx values but no estimated throughput. Setting a better estimate than the default 1 MBit makes these devices work well with B.A.T.M.A.N. V. Signed-off-by: René Treffer Signed-off-by: Marek Lindner Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit d63411000741ebca84b147b3e79cb6b298ee07e9 Author: Chris Wilson Date: Sun Dec 8 14:36:48 2019 +0000 drm/i915/gt: Turn vm off then on again for gen7 mm switch "Have you tried switching it off and on again?" Set the size of the mm to 0 to disable all PD cachelines, before enabling the whole mm again. Let's see if that tricks the TLB into reloading. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191208143648.2986669-1-chris@chris-wilson.co.uk commit 025f50f3866486a5278afa91f0d3b6b780141050 Author: Sebastian Andrzej Siewior Date: Tue Oct 15 21:18:21 2019 +0200 sched/rt, workqueue: Use PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Update the comment to use PREEMPTION because it is true for both preemption models. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Lai Jiangshan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Tejun Heo Link: https://lore.kernel.org/r/20191015191821.11479-35-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 9f47286924f2f868760a528c14596370e32d86b4 Author: Sebastian Andrzej Siewior Date: Tue Oct 15 21:18:19 2019 +0200 sched/core: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Let DEBUG_PREEMPT depend on CONFIG_PREEMPTION. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Andrew Morton Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20191015191821.11479-33-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 1b40cd56f3bcffcfedb43bc30bd431b52240fb3b Author: Sebastian Andrzej Siewior Date: Tue Oct 15 21:18:18 2019 +0200 sched/rt, locking: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the Kconfig dependency to use CONFIG_PREEMPTION. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Link: https://lore.kernel.org/r/20191015191821.11479-32-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 923717cbab900fb23b31f16fb31b1d86b09bf702 Author: Thomas Gleixner Date: Tue Oct 15 21:18:12 2019 +0200 sched/rt, mm: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the pte_unmap_same() and SLUB code over to use CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Chistoph Lameter Cc: Andrew Morton Cc: David Rientjes Cc: Joonsoo Kim Cc: Linus Torvalds Cc: Pekka Enberg Cc: Peter Zijlstra Cc: linux-mm@kvack.org Link: https://lore.kernel.org/r/20191015191821.11479-26-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 94545870b14b5eb6d8a887fab845d1918f4f62ac Author: Thomas Gleixner Date: Tue Oct 15 21:18:11 2019 +0200 sched/rt, btrfs: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the btrfs_device_set_…() macro over to use CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: David Sterba Cc: Chris Mason Cc: Josef Bacik Cc: Linus Torvalds Cc: Peter Zijlstra Cc: linux-btrfs@vger.kernel.org Link: https://lore.kernel.org/r/20191015191821.11479-25-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 2496396fcb44404ead24b578c583d5286886e857 Author: Thomas Gleixner Date: Tue Oct 15 21:18:10 2019 +0200 sched/rt, fs: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the i_size() and part_nr_sects_…() code over to use CONFIG_PREEMPTION. Update the comment for fsstack_copy_inode_size() also to refer to CONFIG_PREEMPTION. [bigeasy: +PREEMPT comments] Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Alexander Viro Cc: Linus Torvalds Cc: Peter Zijlstra Cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20191015191821.11479-24-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit d4a3dcbc4727966a64a64d57e2b5106a138d426d Author: Thomas Gleixner Date: Tue Oct 15 21:18:09 2019 +0200 sched/rt, xen: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the preempt anand xen-ops code over to use CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Reviewed-by: Juergen Gross Cc: Boris Ostrovsky Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stefano Stabellini Cc: xen-devel@lists.xenproject.org Link: https://lore.kernel.org/r/20191015191821.11479-23-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 2da2b32fd9346009e9acdb68c570ca8d3966aba7 Author: Thomas Gleixner Date: Tue Oct 15 21:18:08 2019 +0200 sched/rt, net: Use CONFIG_PREEMPTION.patch CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Update the comment to use CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: David S. Miller Cc: Linus Torvalds Cc: Peter Zijlstra Cc: netdev@vger.kernel.org Link: https://lore.kernel.org/r/20191015191821.11479-22-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 6c5260d73d2b723f072c312eb80ef83711b4e166 Author: Thomas Gleixner Date: Tue Oct 15 21:18:07 2019 +0200 sched/rt, xtensa: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code over to use CONFIG_PREEMPTION. Add PREEMPT_RT output to die(). [bigeasy: +traps.c] Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Max Filippov Cc: Chris Zankel Cc: Linus Torvalds Cc: Peter Zijlstra Cc: linux-xtensa@linux-xtensa.org Link: https://lore.kernel.org/r/20191015191821.11479-21-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 85a683d0a6895026b535bf40643687c626e376f3 Author: Thomas Gleixner Date: Tue Oct 15 21:18:06 2019 +0200 sched/rt, sparc: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the trap code over to use CONFIG_PREEMPTION. [bigeasy: +Kconfig] Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: David S. Miller Cc: Linus Torvalds Cc: Peter Zijlstra Cc: sparclinux@vger.kernel.org Link: https://lore.kernel.org/r/20191015191821.11479-20-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 7be60ccbc59098f5251edae51bbf08e2d2226da0 Author: Thomas Gleixner Date: Tue Oct 15 21:18:05 2019 +0200 sched/rt, sh: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code over to use CONFIG_PREEMPTION. [bigeasy: +Kconfig] Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rich Felker Cc: Yoshinori Sato Cc: linux-sh@vger.kernel.org Link: https://lore.kernel.org/r/20191015191821.11479-19-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit fa686453053b70a8a01b7517df8cfc5872f63196 Author: Thomas Gleixner Date: Tue Oct 15 21:18:04 2019 +0200 sched/rt, s390: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the preemption and entry code over to use CONFIG_PREEMPTION. Add PREEMPT_RT output to die(). [bigeasy: +Kconfig, dumpstack.c] Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Christian Borntraeger Cc: Heiko Carstens Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Vasily Gorbik Cc: linux-s390@vger.kernel.org Link: https://lore.kernel.org/r/20191015191821.11479-18-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 29ff64929e6caf3a6df8e719aa5b9dc36e8e407a Author: Thomas Gleixner Date: Tue Oct 15 21:18:03 2019 +0200 sched/rt, riscv: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code over to use CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Paul Walmsley # for arch/riscv Cc: Albert Ou Cc: Linus Torvalds Cc: Palmer Dabbelt Cc: Peter Zijlstra Cc: linux-riscv@lists.infradead.org Link: https://lore.kernel.org/r/20191015191821.11479-17-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 09613e8320cda150717126ba88c0ddc38bfc0c68 Author: Thomas Gleixner Date: Tue Oct 15 21:18:02 2019 +0200 sched/rt, parisc: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code over to use CONFIG_PREEMPTION. [bigeasy: +Kconfig] Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Helge Deller Cc: James E.J. Bottomley Cc: Linus Torvalds Cc: Peter Zijlstra Cc: linux-parisc@vger.kernel.org Link: https://lore.kernel.org/r/20191015191821.11479-16-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit f0365eb50b04de91d0119619026865ba2a352a34 Author: Thomas Gleixner Date: Tue Oct 15 21:18:01 2019 +0200 sched/rt, nios2: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code over to use CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Ley Foon Tan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: nios2-dev@lists.rocketboards.org Link: https://lore.kernel.org/r/20191015191821.11479-15-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 10c1537b32e7667842ccefbc2970153784837c27 Author: Thomas Gleixner Date: Tue Oct 15 21:18:00 2019 +0200 sched/rt, nds32: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the ex-exit code over to use CONFIG_PREEMPTION. [bigeasy: +Kconfig] Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Greentime Hu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Vincent Chen Link: https://lore.kernel.org/r/20191015191821.11479-14-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 098fa51b1d054fbc9ec1286a3c74231aebd6ff15 Author: Thomas Gleixner Date: Tue Oct 15 21:17:59 2019 +0200 sched/rt, MIPS: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code and assmebly macros over to use CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: James Hogan Cc: Linus Torvalds Cc: Paul Burton Cc: Peter Zijlstra Cc: Ralf Baechle Cc: linux-mips@vger.kernel.org Link: https://lore.kernel.org/r/20191015191821.11479-13-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 18803733bd67b8e8f608a0bbb491e1491dcce01e Author: Thomas Gleixner Date: Tue Oct 15 21:17:58 2019 +0200 sched/rt, microblaze: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code over to use CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Michal Simek Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20191015191821.11479-12-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit b9b75e53b2fb040bc74a750fb27bbfa80059b3fe Author: Thomas Gleixner Date: Tue Oct 15 21:17:56 2019 +0200 sched/rt, ia64: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code and kprobes over to use CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Fenghua Yu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Tony Luck Cc: linux-ia64@vger.kernel.org Link: https://lore.kernel.org/r/20191015191821.11479-10-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 143cd41f50e0c074fbdb06c3ab75a45e3076b5a6 Author: Thomas Gleixner Date: Tue Oct 15 21:17:55 2019 +0200 sched/rt, hexagon: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code over to use CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Brian Cain Cc: Linus Torvalds Cc: Peter Zijlstra Cc: linux-hexagon@vger.kernel.org Link: https://lore.kernel.org/r/20191015191821.11479-9-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 7462b759b1c2fc3848fe54f71bf553f8f4e6d323 Author: Thomas Gleixner Date: Tue Oct 15 21:17:54 2019 +0200 sched/rt, h8300: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code over to use CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Yoshinori Sato Cc: uclinux-h8-devel@lists.sourceforge.jp Link: https://lore.kernel.org/r/20191015191821.11479-8-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 365a795a13326df11a5114d2b6067ca2a6d53364 Author: Thomas Gleixner Date: Tue Oct 15 21:17:53 2019 +0200 sched/rt, csky: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code over to use CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Guo Ren Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20191015191821.11479-7-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 51466979c754d11e1e8da0e46a66218ffc7226ee Author: Thomas Gleixner Date: Tue Oct 15 21:17:52 2019 +0200 sched/rt, c6x: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code over to use CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Aurelien Jacquiot Cc: Linus Torvalds Cc: Mark Salter Cc: Peter Zijlstra Cc: linux-c6x-dev@linux-c6x.org Link: https://lore.kernel.org/r/20191015191821.11479-6-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 916591722c7543570843b54d5896121146b498f5 Author: Thomas Gleixner Date: Tue Oct 15 21:17:51 2019 +0200 sched/rt, ARC: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code over to use CONFIG_PREEMPTION. Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Link: https://lore.kernel.org/r/20191015191821.11479-5-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit fdc5569eaba997852e0bfb57d11af496e4c1fa9a Author: Thomas Gleixner Date: Thu Oct 24 18:04:58 2019 +0200 sched/rt, powerpc: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code over to use CONFIG_PREEMPTION. [bigeasy: +Kconfig] Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Michael Ellerman Cc: Christophe Leroy Cc: Linus Torvalds Cc: Paul Mackerras Cc: Peter Zijlstra Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20191024160458.vlnf3wlcyjl2ich7@linutronix.de Signed-off-by: Ingo Molnar commit 7ef858dad9fa6cabfe3b78997c3114cd641de6e3 Author: Thomas Gleixner Date: Tue Oct 15 21:17:49 2019 +0200 sched/rt, arm64: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the Kconfig dependency, entry code and preemption handling over to use CONFIG_PREEMPTION. Add PREEMPT_RT output in show_stack(). [bigeasy: +traps.c, Kconfig] Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Catalin Marinas Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20191015191821.11479-3-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit e7289c6de81c8e8991148e46c9ab43e2d23940f3 Author: Thomas Gleixner Date: Tue Oct 15 21:17:48 2019 +0200 sched/rt, ARM: Use CONFIG_PREEMPTION CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code, cache over to use CONFIG_PREEMPTION and add output in show_stack() for PREEMPT_RT. [bigeasy: +traps.c] Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20191015191821.11479-2-bigeasy@linutronix.de Signed-off-by: Ingo Molnar commit 4f797f56c3786e2c6bc542b3f80e9a599b073976 Merge: c5105d764e02 63de37476ebd Author: Ingo Molnar Date: Sun Dec 8 14:37:10 2019 +0100 Merge branch 'linus' into sched/urgent, to pick up the latest before merging new patches Signed-off-by: Ingo Molnar commit ca5930b181a446c58acfed2bd6cffe0b04455f83 Author: Chris Wilson Date: Sat Dec 7 22:14:53 2019 +0000 drm/i915/gtt: Account for preallocation in asserts Our asserts allow for the PDEs to be allocated concurrently, but we did not account for the aliasing-ppgtt to be preallocated on top. Testcase: igt/gem_ppgtt #bsw Signed-off-by: Chris Wilson Cc: Mika Kuoppala Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191207221453.2802627-1-chris@chris-wilson.co.uk commit 8b1c78e06e6167f49beb27be073faa2c6c5c6eff Author: Chris Wilson Date: Fri Dec 6 10:55:27 2019 +0000 drm/i915: Avoid calling i915_gem_object_unbind holding object lock In the extreme case, we may wish to wait on an rcu-barrier to reap stale vm to purge the last of the object bindings. However, we are not allowed to use rcu_barrier() beneath the dma_resv (i.e. object) lock and do not take lightly the prospect of unlocking a mutex deep in the bowels of the routine. i915_gem_object_unbind() itself does not need the object lock, and it turns out the callers do not need to the unbind as part of a locked sequence around set-cache-level, so rearrange the code to avoid taking the object lock in the callers. <4> [186.816311] ====================================================== <4> [186.816313] WARNING: possible circular locking dependency detected <4> [186.816316] 5.4.0-rc8-CI-CI_DRM_7486+ #1 Tainted: G U <4> [186.816318] ------------------------------------------------------ <4> [186.816320] perf_pmu/1321 is trying to acquire lock: <4> [186.816322] ffff88849487c4d8 (&mm->mmap_sem#2){++++}, at: __might_fault+0x39/0x90 <4> [186.816331] but task is already holding lock: <4> [186.816333] ffffe8ffffa05008 (&cpuctx_mutex){+.+.}, at: perf_event_ctx_lock_nested+0xa9/0x1b0 <4> [186.816339] which lock already depends on the new lock. <4> [186.816341] the existing dependency chain (in reverse order) is: <4> [186.816343] -> #6 (&cpuctx_mutex){+.+.}: <4> [186.816349] __mutex_lock+0x9a/0x9d0 <4> [186.816352] perf_event_init_cpu+0xa4/0x140 <4> [186.816357] perf_event_init+0x19d/0x1cd <4> [186.816362] start_kernel+0x372/0x4f4 <4> [186.816365] secondary_startup_64+0xa4/0xb0 <4> [186.816381] -> #5 (pmus_lock){+.+.}: <4> [186.816385] __mutex_lock+0x9a/0x9d0 <4> [186.816387] perf_event_init_cpu+0x6b/0x140 <4> [186.816404] cpuhp_invoke_callback+0x9b/0x9d0 <4> [186.816406] _cpu_up+0xa2/0x140 <4> [186.816409] do_cpu_up+0x61/0xa0 <4> [186.816411] smp_init+0x57/0x96 <4> [186.816413] kernel_init_freeable+0xac/0x1c7 <4> [186.816416] kernel_init+0x5/0x100 <4> [186.816419] ret_from_fork+0x24/0x50 <4> [186.816421] -> #4 (cpu_hotplug_lock.rw_sem){++++}: <4> [186.816424] cpus_read_lock+0x34/0xd0 <4> [186.816427] rcu_barrier+0xaa/0x190 <4> [186.816429] kernel_init+0x21/0x100 <4> [186.816431] ret_from_fork+0x24/0x50 <4> [186.816433] -> #3 (rcu_state.barrier_mutex){+.+.}: <4> [186.816436] __mutex_lock+0x9a/0x9d0 <4> [186.816438] rcu_barrier+0x23/0x190 <4> [186.816502] i915_gem_object_unbind+0x3a6/0x400 [i915] <4> [186.816537] i915_gem_object_set_cache_level+0x32/0x90 [i915] <4> [186.816571] i915_gem_object_pin_to_display_plane+0x5d/0x160 [i915] <4> [186.816612] intel_pin_and_fence_fb_obj+0x9e/0x200 [i915] <4> [186.816679] intel_plane_pin_fb+0x3f/0xd0 [i915] <4> [186.816717] intel_prepare_plane_fb+0x130/0x520 [i915] <4> [186.816722] drm_atomic_helper_prepare_planes+0x85/0x110 <4> [186.816761] intel_atomic_commit+0xc6/0x350 [i915] <4> [186.816764] drm_atomic_helper_update_plane+0xed/0x110 <4> [186.816768] setplane_internal+0x97/0x190 <4> [186.816770] drm_mode_setplane+0xcd/0x190 <4> [186.816773] drm_ioctl_kernel+0xa7/0xf0 <4> [186.816775] drm_ioctl+0x2e1/0x390 <4> [186.816778] do_vfs_ioctl+0xa0/0x6f0 <4> [186.816780] ksys_ioctl+0x35/0x60 <4> [186.816782] __x64_sys_ioctl+0x11/0x20 <4> [186.816785] do_syscall_64+0x4f/0x210 <4> [186.816787] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4> [186.816789] -> #2 (reservation_ww_class_mutex){+.+.}: <4> [186.816793] __ww_mutex_lock.constprop.15+0xc3/0x1090 <4> [186.816795] ww_mutex_lock+0x39/0x70 <4> [186.816798] dma_resv_lockdep+0x10e/0x1f7 <4> [186.816800] do_one_initcall+0x58/0x2ff <4> [186.816802] kernel_init_freeable+0x137/0x1c7 <4> [186.816804] kernel_init+0x5/0x100 <4> [186.816806] ret_from_fork+0x24/0x50 <4> [186.816808] -> #1 (reservation_ww_class_acquire){+.+.}: <4> [186.816811] dma_resv_lockdep+0xec/0x1f7 <4> [186.816813] do_one_initcall+0x58/0x2ff <4> [186.816815] kernel_init_freeable+0x137/0x1c7 <4> [186.816817] kernel_init+0x5/0x100 <4> [186.816819] ret_from_fork+0x24/0x50 <4> [186.816820] -> #0 (&mm->mmap_sem#2){++++}: <4> [186.816824] __lock_acquire+0x1328/0x15d0 <4> [186.816826] lock_acquire+0xa7/0x1c0 <4> [186.816828] __might_fault+0x63/0x90 <4> [186.816831] _copy_to_user+0x1e/0x80 <4> [186.816834] perf_read+0x200/0x2b0 <4> [186.816836] vfs_read+0x96/0x160 <4> [186.816838] ksys_read+0x9f/0xe0 <4> [186.816839] do_syscall_64+0x4f/0x210 <4> [186.816841] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4> [186.816843] other info that might help us debug this: <4> [186.816846] Chain exists of: &mm->mmap_sem#2 --> pmus_lock --> &cpuctx_mutex <4> [186.816849] Possible unsafe locking scenario: <4> [186.816851] CPU0 CPU1 <4> [186.816853] ---- ---- <4> [186.816854] lock(&cpuctx_mutex); <4> [186.816856] lock(pmus_lock); <4> [186.816858] lock(&cpuctx_mutex); <4> [186.816860] lock(&mm->mmap_sem#2); <4> [186.816861] *** DEADLOCK *** Closes: https://gitlab.freedesktop.org/drm/intel/issues/728 Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191206105527.1130413-5-chris@chris-wilson.co.uk commit a22198a934e67d461657cde8d79daa305441b9e3 Author: Matthew Brost Date: Fri Dec 6 17:00:33 2019 -0800 drm/i915/guc: Update uncore access path in flush_ggtt_writes The preferred way to access the uncore is through the GT structure. Update the GuC function, flush_ggtt_writes, to use this path. Signed-off-by: Matthew Brost Signed-off-by: John Harrison Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191207010033.24667-1-John.C.Harrison@Intel.com commit aef820799274e3bd66e1857f6aa3ee8cff2c30eb Author: Chris Wilson Date: Fri Dec 6 10:55:26 2019 +0000 drm/i915/gem: Pin gen6_ppgtt prior to constructing the request All pinning must be done prior to i915_request_create, to avoid timeline->mutex inversions. Here we slightly abuse the context_barrier_task stages to utilise the 'skip' decision as an opportunity to acquire the pin on the new ppgtt. Consider it s/skip/prepare/. At the moment, we only have on user of context_barrier_task, so it might be worth breaking it down for the specific task of set-vm and refactor it later if we find a second purpose. <4> [402.377487] WARNING: possible circular locking dependency detected <4> [402.377493] 5.4.0-rc8-CI-CI_DRM_7491+ #1 Tainted: G U <4> [402.377497] ------------------------------------------------------ <4> [402.377502] gem_exec_parall/2506 is trying to acquire lock: <4> [402.377507] ffff888403cdac70 (&kernel#2){+.+.}, at: i915_request_create+0x16/0x1c0 [i915] <4> [402.377593] but task is already holding lock: <4> [402.377597] ffff88835efad550 (&ppgtt->pin_mutex){+.+.}, at: gen6_ppgtt_pin+0x4d/0x110 [i915] <4> [402.377660] which lock already depends on the new lock. <4> [402.377664] the existing dependency chain (in reverse order) is: <4> [402.377668] -> #1 (&ppgtt->pin_mutex){+.+.}: <4> [402.377674] __mutex_lock+0x9a/0x9d0 <4> [402.377713] gen6_ppgtt_pin+0x4d/0x110 [i915] <4> [402.377756] emit_ppgtt_update+0x1dc/0x370 [i915] <4> [402.377801] context_barrier_task+0x176/0x310 [i915] <4> [402.377844] ctx_setparam+0x400/0xb10 [i915] <4> [402.377886] i915_gem_context_setparam_ioctl+0xc8/0x160 [i915] <4> [402.377891] drm_ioctl_kernel+0xa7/0xf0 <4> [402.377895] drm_ioctl+0x2e1/0x390 <4> [402.377899] do_vfs_ioctl+0xa0/0x6f0 <4> [402.377903] ksys_ioctl+0x35/0x60 <4> [402.377906] __x64_sys_ioctl+0x11/0x20 <4> [402.377910] do_syscall_64+0x4f/0x210 <4> [402.377914] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4> [402.377917] -> #0 (&kernel#2){+.+.}: <4> [402.377923] __lock_acquire+0x1328/0x15d0 <4> [402.377926] lock_acquire+0xa7/0x1c0 <4> [402.377930] __mutex_lock+0x9a/0x9d0 <4> [402.377977] i915_request_create+0x16/0x1c0 [i915] <4> [402.378013] intel_engine_flush_barriers+0x4c/0x100 [i915] <4> [402.378062] i915_ggtt_pin+0x7d/0x130 [i915] <4> [402.378108] gen6_ppgtt_pin+0x9c/0x110 [i915] <4> [402.378148] ring_context_pin+0x2e/0xc0 [i915] <4> [402.378183] __intel_context_do_pin+0x6b/0x190 [i915] <4> [402.378226] i915_gem_do_execbuffer+0x180c/0x26b0 [i915] <4> [402.378268] i915_gem_execbuffer2_ioctl+0x11b/0x460 [i915] <4> [402.378272] drm_ioctl_kernel+0xa7/0xf0 <4> [402.378275] drm_ioctl+0x2e1/0x390 <4> [402.378279] do_vfs_ioctl+0xa0/0x6f0 <4> [402.378282] ksys_ioctl+0x35/0x60 <4> [402.378286] __x64_sys_ioctl+0x11/0x20 <4> [402.378289] do_syscall_64+0x4f/0x210 <4> [402.378292] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4> [402.378295] other info that might help us debug this: <4> [402.378299] Possible unsafe locking scenario: <4> [402.378302] CPU0 CPU1 <4> [402.378305] ---- ---- <4> [402.378307] lock(&ppgtt->pin_mutex); <4> [402.378310] lock(&kernel#2); <4> [402.378314] lock(&ppgtt->pin_mutex); <4> [402.378317] lock(&kernel#2); <4> [402.378320] Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191206105527.1130413-4-chris@chris-wilson.co.uk commit 795a4aea63b1d8c1d7369046e851aa6834ecdb95 Author: Andi Shyti Date: Fri Dec 6 23:24:17 2019 +0200 drm/i915/gt: Replace I915_WRITE with its uncore counterpart Get rid of the last remaining I915_WRITEs and replace them with intel_uncore_write(). Signed-off-by: Andi Shyti Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191206212417.20178-1-andi@etezian.org commit ad457191015a197b3daf1a259ed8e7f70bf68bb9 Author: José Roberto de Souza Date: Thu Dec 5 13:03:50 2019 -0800 drm/i915/display: Refactor intel_commit_modeset_disables() Commit 9c722e17c1b9 ("drm/i915: Disable pipes in reverse order") reverted the order that pipes gets disabled because of TGL master/slave relationship between transcoders in MST mode. But as stated in a comment in skl_commit_modeset_enables() the enabling order is not always crescent, possibly causing previously selected slave transcoder being enabled before master so another approach will be needed to select a transcoder to master in MST mode. It will be similar to the approach taken in port sync. But instead of implement something like intel_trans_port_sync_modeset_disables() to MST lets simply it and iterate over all pipes 2 times, the first one disabling any slave and then disabling everything else. The MST bits will be added in another patch. v2: Not using crtc->active as it is deprecated v3: Removing is_trans_port_sync_mode() check, just check for is_trans_port_sync_master() is enough v4: Adding and using is_trans_port_sync_slave(), otherwise non-port sync pipes will be disabled in the first loop, what is not wrong but is not what patch description promises Cc: Lucas De Marchi Cc: Manasi Navare Cc: Matt Roper Cc: Maarten Lankhorst Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä (v2) Signed-off-by: José Roberto de Souza Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191205210350.96795-3-jose.souza@intel.com commit 3ca8f1918883796eaf48c02c50288a255f33c864 Author: José Roberto de Souza Date: Thu Dec 5 13:03:49 2019 -0800 drm/i915/display/tgl: Fix the order of the step to turn transcoder clock off For TGL the step to turn off the transcoder clock was moved to after the complete shutdown of DDI. Only the MST slave transcoders should disable the clock before that. v2: - Adding last_mst_stream to intel_mst_post_disable_dp, make code more easy to read and is similar to first_mst_stream in intel_mst_pre_enable_dp()(Ville's idea) - Calling intel_ddi_disable_pipe_clock() for GEN12+ right intel_disable_ddi_buf() as stated in BSpec(Ville) BSpec: 49190 Cc: Lucas De Marchi Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191205210350.96795-2-jose.souza@intel.com commit 1ac87297e50e5c6721b87711d4a0fff8423ab991 Author: José Roberto de Souza Date: Thu Dec 5 13:03:48 2019 -0800 drm/i915/display: Do not check for the ddb allocations of turned off pipes It should not care about DDB allocations of pipes going through a fullmodeset, as at this point those pipes are disabled. The comment in the code also points to that but that was not what was being executed. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191205210350.96795-1-jose.souza@intel.com commit 651cc835d5f6855e8bca6d5d3587234d74e82864 Author: José Roberto de Souza Date: Tue Dec 3 13:13:08 2019 -0800 drm/i915: Add new EHL/JSL PCI ids Adding the recently added EHL/JSL PCI ids. BSpec: 29153 Cc: James Ausmus Cc: Matt Roper Signed-off-by: José Roberto de Souza Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191203211308.109703-1-jose.souza@intel.com commit 64e62bdf04ab8529f45ed0a85122c703035dec3a Author: Wayne Lin Date: Thu Dec 5 17:00:43 2019 +0800 drm/dp_mst: Remove VCPI while disabling topology mgr [Why] This patch is trying to address the issue observed when hotplug DP daisy chain monitors. e.g. src-mstb-mstb-sst -> src (unplug) mstb-mstb-sst -> src-mstb-mstb-sst (plug in again) Once unplug a DP MST capable device, driver will call drm_dp_mst_topology_mgr_set_mst() to disable MST. In this function, it cleans data of topology manager while disabling mst_state. However, it doesn't clean up the proposed_vcpis of topology manager. If proposed_vcpi is not reset, once plug in MST daisy chain monitors later, code will fail at checking port validation while trying to allocate payloads. When MST capable device is plugged in again and try to allocate payloads by calling drm_dp_update_payload_part1(), this function will iterate over all proposed virtual channels to see if any proposed VCPI's num_slots is greater than 0. If any proposed VCPI's num_slots is greater than 0 and the port which the specific virtual channel directed to is not in the topology, code then fails at the port validation. Since there are stale VCPI allocations from the previous topology enablement in proposed_vcpi[], code will fail at port validation and reurn EINVAL. [How] Clean up the data of stale proposed_vcpi[] and reset mgr->proposed_vcpis to NULL while disabling mst in drm_dp_mst_topology_mgr_set_mst(). Changes since v1: *Add on more details in commit message to describe the issue which the patch is trying to fix Signed-off-by: Wayne Lin [added cc to stable] Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20191205090043.7580-1-Wayne.Lin@amd.com Cc: # v3.17+ commit cbab8d87f7865d09d93e4a6d6db0b799ba0c3407 Author: Chris Wilson Date: Fri Dec 6 16:04:28 2019 +0000 drm/i915: Propagate errors on awaiting already signaled dma-fences If we see an already signaled dma-fence that we want to await on, we skip adding to the i915_sw_fence. However, we should pay attention to whether there was an error on that fence and if so propagate it for our future request. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191206160428.1503343-3-chris@chris-wilson.co.uk commit 9e31c1fe45d555a948ff66f1f0e3fe1f83ca63f7 Author: Chris Wilson Date: Fri Dec 6 16:04:27 2019 +0000 drm/i915: Propagate errors on awaiting already signaled fences If we see an already signaled fence that we want to await on, we skip adding to the i915_sw_fence. However, we should pay attention to whether there was an error on that fence and if so propagate it for our future request. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191206160428.1503343-2-chris@chris-wilson.co.uk commit 5e6a94713be051c491cd47c85263661af07b629c Author: Chris Wilson Date: Fri Dec 6 16:04:26 2019 +0000 drm/i915: Check for error before calling cmpxchg() Only do the locked compare of the existing fence->error if we actually need to set an error. As we tend to call i915_sw_fence_set_error_once() unconditionally, it saves on typing to put the common has-error check into the inline. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191206160428.1503343-1-chris@chris-wilson.co.uk commit bc1152b086c1a99971ef3d351c9e1fd5814a6e46 Author: Robin Murphy Date: Thu Nov 28 20:54:27 2019 +0000 drm/panfrost: Register devfreq cooling device When we have devfreq, also try to register a basic cooling device in case GPU workloads manage to hit thermal throttling thresholds. Signed-off-by: Robin Murphy Reviewed-by: Steven Price Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/21f228099321f460d62e0ab7c77b2d2213dd4da8.1574974319.git.robin.murphy@arm.com commit 4b4c5638c08d6be3fc4380bda23aa46bbd158073 Author: Andrey Grodzovsky Date: Thu Dec 5 14:21:31 2019 -0500 drm/amdgpu: Fix BACO entry failure in NAVI10. BACO feature must be kept enabled to allow entry into BACO state in SMU during runtime suspend. Signed-off-by: Andrey Grodzovsky Reviewed-by: Evan Quan Reviewed-by: Alex Deucher Tested-by: Alex Deucher Signed-off-by: Alex Deucher commit b66ecd0438bf6079d08e8f2afea6114f468f56f4 Author: Tvrtko Ursulin Date: Fri Nov 29 10:54:36 2019 +0000 drm/i915/pmu: Report frequency as zero while GPU is sleeping We used to report the minimum possible frequency as both requested and active while GPU was in sleep state. This was a consequence of sampling the value from the "current frequency" field in our software tracking. This was strictly speaking wrong, but given that until recently the current frequency in sleeping state used to be equal to minimum, it did not stand out sufficiently to be noticed as such. After some recent changes have made the current frequency be reported as last active before GPU went to sleep, meaning both requested and active frequencies could end up being reported at their maximum values for the duration of the GPU idle state, it became much more obvious that this does not make sense. To fix this we will now sample the frequency counters only when the GPU is awake. As a consequence reported frequencies could be reported as below the GPU reported minimum but that should be much less confusing that the current situation. v2: * Split out early exit conditions for readability. (Chris) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Closes: https://gitlab.freedesktop.org/drm/intel/issues/675 Link: https://patchwork.freedesktop.org/patch/msgid/20191129105436.20100-1-tvrtko.ursulin@linux.intel.com commit 1ca3fd96f958291daa50693b4a50cd3df4b411f1 Author: Thomas Zimmermann Date: Fri Dec 6 09:59:54 2019 +0100 drm/udl: Remove field lost_pixels from struct udl_device The field lost_pixels in struct udl_device was supposed to signal an error during USB transfers of the framebuffer data. The driver would have to schedule a re-transfer at a later point. This code was never implemented. Remove lost_pixels and return regular error codes instead. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20191206085954.9697-8-tzimmermann@suse.de commit 798ce3fe1c3a9819f46a5fb930b24a19ccf59c89 Author: Thomas Zimmermann Date: Fri Dec 6 09:59:53 2019 +0100 drm/udl: Begin/end access to imported buffers in damage-handler The damage-handler code now invokes dma_buf_{begin,end}_access() for imported buffers. These calls were missing from the page-flip and modesetting code paths. The patch also fixes an bug in the original where an error code was overwritten by the result of dma_buf_end_cpu_access(). v2: * only return an error code from dma_buf_end_cpu_access() if no other error code has been set before Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20191206085954.9697-7-tzimmermann@suse.de commit cd45e30a7099e5fcbc25fcfa035fa604255afdee Author: Thomas Zimmermann Date: Fri Dec 6 09:59:52 2019 +0100 drm/udl: Move log-cpp code out of udl_damage_handler() Computing the cpp value's logarithm in a separate helper function makes the damage-handler code more readable. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20191206085954.9697-6-tzimmermann@suse.de commit ffc90486e320ba68f63de39fe04d757ce0cf49e5 Author: Thomas Zimmermann Date: Fri Dec 6 09:59:51 2019 +0100 drm/udl: Move clip-rectangle code out of udl_handle_damage() Computing the clip rectable in a separate helper function makes the damage-handler code more readable. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20191206085954.9697-5-tzimmermann@suse.de commit 2d2bebb8332317551ef6fe168396b09337af67df Author: Thomas Zimmermann Date: Fri Dec 6 09:59:50 2019 +0100 drm/udl: Vmap framebuffer after all tests succeeded in damage handling We now do the fast tests before the potentially expensive vmap operation. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20191206085954.9697-4-tzimmermann@suse.de commit d15e35dafb1e8f246e86963c22f1dfca01851ba8 Author: Thomas Zimmermann Date: Fri Dec 6 09:59:49 2019 +0100 drm/udl: Don't track number of identical and sent pixels per line A call to udl_render_hline() returns the number of identical and sent pixels. None of these values is used. Remove the parameters. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20191206085954.9697-3-tzimmermann@suse.de commit 3f1939b531cf99fc8766b6b24059c58eef3d2e7b Author: Thomas Zimmermann Date: Fri Dec 6 09:59:48 2019 +0100 drm/udl: Remove unused statistics counters None of the udl driver's statistics counters is used anywhere. Remove them. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20191206085954.9697-2-tzimmermann@suse.de commit 1a74934b0effbd979c520e1122b680624a1a6372 Author: Chris Wilson Date: Fri Dec 6 10:55:23 2019 +0000 drm/i915/gem: Flush the pwrite through the chipset before signaling Before we signal the fence to indicate completion, ensure the pwrite through the indirect GGTT is coherent (as best as we know) in memory. Any listeners to the fence may start immediately and sample from the backing store prior to the writes being posted, thus seeing stale data. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191206105527.1130413-1-chris@chris-wilson.co.uk commit 045d1fb79616f138a2e51f04537acd40b9a38ce0 Author: Chris Wilson Date: Thu Dec 5 21:58:42 2019 +0000 drm/i915/gt: Acquire a GT wakeref for the breadcrumb interrupt Take a wakeref on the intel_gt specifically for the enabled breadcrumb interrupt so that we can safely process the mmio. If the intel_gt is already asleep by the time we try and setup the breadcrumb interrupt, by a process of elimination we know the request must have been completed and we can skip its enablement! <4> [1518.350005] Unclaimed write to register 0x220a8 <4> [1518.350323] WARNING: CPU: 2 PID: 3685 at drivers/gpu/drm/i915/intel_uncore.c:1163 __unclaimed_reg_debug+0x40/0x50 [i915] <4> [1518.350393] Modules linked in: vgem snd_hda_codec_hdmi x86_pkg_temp_thermal i915 coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core btusb cdc_ether btrtl usbnet btbcm btintel r8152 snd_pcm mii bluetooth ecdh_generic ecc i2c_hid pinctrl_sunrisepoint pinctrl_intel intel_lpss_pci prime_numbers [last unloaded: vgem] <4> [1518.350646] CPU: 2 PID: 3685 Comm: gem_exec_parse_ Tainted: G U 5.4.0-rc8-CI-CI_DRM_7490+ #1 <4> [1518.350708] Hardware name: Google Caroline/Caroline, BIOS MrChromebox 08/27/2018 <4> [1518.350946] RIP: 0010:__unclaimed_reg_debug+0x40/0x50 [i915] <4> [1518.350992] Code: 74 05 5b 5d 41 5c c3 45 84 e4 48 c7 c0 95 8d 47 a0 48 c7 c6 8b 8d 47 a0 48 0f 44 f0 89 ea 48 c7 c7 9e 8d 47 a0 e8 40 45 e3 e0 <0f> 0b 83 2d 27 4f 2a 00 01 5b 5d 41 5c c3 66 90 41 55 41 54 55 53 <4> [1518.351100] RSP: 0018:ffffc900007f39c8 EFLAGS: 00010086 <4> [1518.351140] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000006 <4> [1518.351202] RDX: 0000000080000006 RSI: 0000000000000000 RDI: 00000000ffffffff <4> [1518.351249] RBP: 00000000000220a8 R08: 0000000000000000 R09: 0000000000000000 <4> [1518.351296] R10: ffffc900007f3990 R11: ffffc900007f3868 R12: 0000000000000000 <4> [1518.351342] R13: 00000000fefeffff R14: 0000000000000092 R15: ffff888155fea000 <4> [1518.351391] FS: 00007fc255abfe40(0000) GS:ffff88817ab00000(0000) knlGS:0000000000000000 <4> [1518.351445] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [1518.351485] CR2: 00007fc2554882d0 CR3: 0000000168ca2005 CR4: 00000000003606e0 <4> [1518.351529] Call Trace: <4> [1518.351746] fwtable_write32+0x114/0x1d0 [i915] <4> [1518.351795] ? sync_file_alloc+0x80/0x80 <4> [1518.352039] gen8_logical_ring_enable_irq+0x30/0x50 [i915] <4> [1518.352295] irq_enable.part.10+0x23/0x40 [i915] <4> [1518.352523] i915_request_enable_breadcrumb+0xb5/0x330 [i915] <4> [1518.352575] ? sync_file_alloc+0x80/0x80 <4> [1518.352612] __dma_fence_enable_signaling+0x60/0x160 <4> [1518.352653] ? sync_file_alloc+0x80/0x80 <4> [1518.352685] dma_fence_add_callback+0x44/0xd0 <4> [1518.352726] sync_file_poll+0x95/0xc0 <4> [1518.352767] do_sys_poll+0x24d/0x570 Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191205215842.862750-1-chris@chris-wilson.co.uk commit 77853186e547bda70d0df0cf2587fb4f7fc29a6b Author: Chris Wilson Date: Thu Dec 5 21:41:59 2019 +0000 drm/i915: Claim vma while under closed_lock in i915_vma_parked() Remove the vma we wish to destroy from the gt->closed_list to avoid having two i915_vma_parked() try and free it. Fixes: aa5e4453dc05 ("drm/i915/gem: Try to flush pending unbind events") References: 2850748ef876 ("drm/i915: Pull i915_vma_pin under the vm->mutex") Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191205214159.829727-1-chris@chris-wilson.co.uk commit b3fac52c519358b93f6c5eee62f7458a481d985d Author: Gerd Hoffmann Date: Wed Nov 27 10:25:23 2019 +0100 drm: share address space for dma bufs Use the shared address space of the drm device (see drm_open() in drm_file.c) for dma-bufs too. That removes a difference betweem drm device mmap vmas and dma-buf mmap vmas and fixes corner cases like dropping ptes (using madvise(DONTNEED) for example) not working properly. Also remove amdgpu driver's private dmabuf update. It is not needed any more now that we are doing this for everybody. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Reviewed-by: Alex Deucher Reviewed-by: Christian König Link: http://patchwork.freedesktop.org/patch/msgid/20191127092523.5620-3-kraxel@redhat.com commit e5516553999f7352bce3d921441b1288eb0a1bb7 Author: Gerd Hoffmann Date: Wed Nov 27 10:25:22 2019 +0100 drm: call drm_gem_object_funcs.mmap with fake offset The fake offset is going to stay, so change the calling convention for drm_gem_object_funcs.mmap to include the fake offset. Update all users accordingly. Note that this reverts 83b8a6f242ea ("drm/gem: Fix mmap fake offset handling for drm_gem_object_funcs.mmap") and on top then adds the fake offset to drm_gem_prime_mmap to make sure all paths leading to obj->funcs->mmap are consistent. v3: move fake-offset tweak in drm_gem_prime_mmap() so we have this code only once in the function (Rob Herring). Fixes: 83b8a6f242ea ("drm/gem: Fix mmap fake offset handling for drm_gem_object_funcs.mmap") Cc: Daniel Vetter Cc: Rob Herring Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20191127092523.5620-2-kraxel@redhat.com commit d315fe8bde5cd052ab1e839d1f6c09919297c7a8 Author: Chris Wilson Date: Thu Dec 5 23:40:59 2019 +0000 drm/i915/gt: Trim gen6 ppgtt updates to PD cachelines It appears now that we have the ring TLB invalidation in place, we need only update the page directory cachelines that we have altered. A great reduction from rewriting the whole 2MiB ppgtt on every update. Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191205234059.1010030-1-chris@chris-wilson.co.uk commit 3f5f74203abb51d484fe5f3544b2f97590055300 Author: Rodrigo Siqueira Date: Thu Dec 5 08:58:56 2019 -0500 drm: Add FEC registers for LT-tunable repeaters FEC is supported since DP 1.4, and it was expanded for LT-tunable in DP 1.4a. This commit adds the address registers for FEC_ERROR_COUNT_PHY_REPEATER1 and FEC_CAPABILITY_PHY_REPEATER1. Cc: Abdoulaye Berthe Cc: Harry Wentland Cc: Leo Li Cc: Jani Nikula Cc: Manasi Navare Cc: Ville Syrjälä Signed-off-by: Abdoulaye Berthe Signed-off-by: Rodrigo Siqueira Reviewed-by: Zhan Liu Signed-off-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20191205135856.232784-1-Rodrigo.Siqueira@amd.com commit 843cd325d9cf37385f448f93365396ed6c615dec Author: Rodrigo Siqueira Date: Mon Oct 21 15:03:53 2019 +0000 drm: Fix DSC throughput mode 0 mask definition Commit d7cd0e053b17 introduced a change at DP_DSC_THROUGHPUT_MODE_0_170 which is not aligned with the spec. This commit replace 15 << 4 by 15 << 0 for DP_DSC_THROUGHPUT_MODE_0_170 in order to make it follow the specification. Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: Nikola Cornij Cc: Jani Nikula Cc: Manasi Navare Cc: Ville Syrjälä Reviewed-by: Harry Wentland Signed-off-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20191021150345.igdye4kv35nsk4ox@outlook.office365.com commit 0530bbd0e40bda2c80909e9a5d74d33e8f3e1367 Author: Gabriela Bittencourt Date: Mon Nov 4 13:14:24 2019 -0300 drm/vkms: Fix typo and preposion in function documentation Fix typo in word 'blend' and in the word 'destination' and change preposition 'at' to 'of' in function 'blend' documentation. And change the task introduction word 'Todo' for the word all in uppercase - 'TODO'. With the TODO word all in uppercase (as it's the standard) it's easier to find the tasks that have to be done throughout the code. Changes since V3: Rodrigo: - Merge the patch series into a single patch since it contains one single logical change Changes since V2: - Add fix typo in word 'destination' - Add change of the preposition - Fix the name of the function in log message - Add the change in word 'Todo' Reviewed-by: Rodrigo Siqueira Signed-off-by: Gabriela Bittencourt Signed-off-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20191104161424.18105-1-gabrielabittencourt00@gmail.com commit 6f91f44dea701c7504dfe8af920f493ea0eed9cf Author: Gabriela Bittencourt Date: Mon Nov 4 13:27:05 2019 -0300 drm/doc: Add VKMS module description and use to "Testing and Validation" Add a description on VKMS module and the cases in which it should be used. There's a brief explanation on how to set it and use it in a VM, along with an example of running an igt-test. Changes since V3: Rodrigo: - Change the log message to imperative - Fix some bad spelling/writing - Add a blank line before enumeration Changes since V2: Andre: - Avoid repetition of words in the same sentence; - Make the explanation on 'setting the kernel' shorter, eliminate the 'make menuconfig' command; - Add tab on enumeration to have one line per item; - Clarify from each machine igt-tests commands should be ran on. Reviewed-by: Rodrigo Siqueira Signed-off-by: Gabriela Bittencourt Signed-off-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20191104162705.19735-1-gabrielabittencourt00@gmail.com commit ad51b4ac12f785aecf39f1a8b235e0681efde84b Author: Nicholas Kazlauskas Date: Mon Nov 18 13:31:04 2019 -0500 drm/amd/display: Extend DMCUB offload testing into dcn20/21 [Why] To quickly validate whether DMCUB is running and accepting commands for offload testing we want to intercept a common sequence as part of modeset programming. [How] OTG enable will cause the most impact in terms of golden register changes and it's a single register write. This approach was previously done in dcn10 code when it was shared with dcn20 but it wasn't ported over to the dcn20 code. Port over start, execute and wait sequence into dcn20_optc. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit c14f2507be0bd81e2fd8a14abb9dc7196af60a78 Author: abdoulaye berthe Date: Mon Nov 18 12:22:06 2019 -0500 drm/amd/display: correct log message for lttpr [Why] When setting lttpr mode, the new mode to bet is not logged properly. [How] Update log message to show the right mode. Signed-off-by: abdoulaye berthe Reviewed-by: George Shen Acked-by: Leo Li Signed-off-by: Alex Deucher commit 71e6bd2ac207b875c54133ffa023ca8059b0c853 Author: Dmytro Laktyushkin Date: Mon Oct 28 15:42:29 2019 -0400 drm/amd/display: update dml related structs In preparation for further changes Signed-off-by: Dmytro Laktyushkin Reviewed-by: Chris Park Acked-by: Leo Li Signed-off-by: Alex Deucher commit 92855074616f9c44229c1c3ec16421cc65e8e609 Author: Yongqiang Sun Date: Mon Nov 18 13:45:50 2019 -0500 drm/amd/display: Compare clock state member to determine optimization. [Why] It seems always request passive flip on RN due to incorrect compare clock state to determine optization. [How] Instead of calling memcmp, compare clock state member to determine the condition. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 772c0b59ad94e8d828355aec5494f02f807eb504 Author: George Shen Date: Fri Nov 15 18:56:57 2019 -0500 drm/amd/display: Increase the number of retries after AUX DEFER [Why] When a timeout occurs after a DEFER, some devices require more retries than in the case of a regular timeout. [How] In a timeout occurrence, check whether a DEFER has occurred before the timeout and retry MAX_DEFER_RETRIES retries times instead of MAX_TIMEOUT_RETRIES. Signed-off-by: George Shen Reviewed-by: Tony Cheng Acked-by: Abdoulaye Berthe Acked-by: Leo Li Signed-off-by: Alex Deucher commit 186a1fb79c6ce6b52eaa168c64d5f5964a3bd645 Author: Krunoslav Kovac Date: Fri Nov 15 10:00:46 2019 -0500 drm/amd/display: Change HDR_MULT check [Why] Currently we require HDR_MULT >= 1.0 There are scenarios where we need < 1.0 [How] Only guard against 0 - it will black-screen image. It is up to higher-level logic to decide what HDR_MULT values are allowed in each particular case. Signed-off-by: Krunoslav Kovac Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 9ec53e11c76670a0ba0fb10fd023fab2b30d7e50 Author: Aric Cyr Date: Mon Nov 18 08:33:34 2019 -0500 drm/amd/display: 3.2.62 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit e66164105d2f4779387b80d726680ec9875b970f Author: Reza Amini Date: Fri Nov 15 17:39:12 2019 -0500 drm/amd/display: Implement DePQ for DCN2 [Why] Need support for more color management in 10bit surface. [How] Provide support for DePQ for 10bit surface Signed-off-by: Reza Amini Reviewed-by: Krunoslav Kovac Acked-by: Leo Li Signed-off-by: Alex Deucher commit 0beb54039d46702a7bc66ee1f36378785b450421 Author: Eric Yang Date: Fri Nov 15 12:04:25 2019 -0500 drm/amd/display: update dispclk and dppclk vco frequency Value obtained from DV is not allowing 8k60 CTA mode with DSC to pass, after checking real value being used in hw, find out that correct value is 3600, which will allow that mode. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 00853a4f7dd52e4529f681a685073f1533e1ed19 Author: Amanda Liu Date: Fri Nov 15 17:07:27 2019 -0500 drm/amd/display: Fix screen tearing on vrr tests [Why] Screen tearing is present in tests when setting the frame rate to certain fps [How] Revert previous optimizations for low frame rates. Signed-off-by: Amanda Liu Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 4ed79864de180ff2d39da26305e2a7e9c72bc38e Author: Aric Cyr Date: Sat Nov 9 18:30:40 2019 -0500 drm/amd/display: fix cursor positioning for multiplane cases [Why] Cursor position needs to take into account plane scaling as well. [How] Translate cursor coords from stream space to plane space. Signed-off-by: Aric Cyr Reviewed-by: Anthony Koo Acked-by: Leo Li Acked-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit ddba76274fd59e664f4ea82ca45ea13d179ef179 Author: Anthony Koo Date: Fri Nov 15 14:58:53 2019 -0500 drm/amd/display: Limit NV12 chroma workaround [Why] It is causing green Line at the bottom of SDR 480p MPO playback [How] Limit workaround to vertical > 512 Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 799a5f74d11ef7c2e8d86b143d4f1b64793411b6 Author: Wenjing Liu Date: Fri Nov 15 11:24:54 2019 -0500 drm/amd/display: add dsc policy getter dc needs to expose its internal dsc policy. Signed-off-by: Wenjing Liu Reviewed-by: Nikola Cornij Acked-by: Leo Li Signed-off-by: Alex Deucher commit c5e53707e2606dda260b27f5ded637f1f851a659 Author: Wenjing Liu Date: Wed Nov 13 15:59:51 2019 -0500 drm/amd/display: remove spam DSC log [why] add_dsc_to_stream_resource could be called for validation. Failing validation is completely fine. However failing it inside commit streams is bad. This code could be triggered for both contexts. The function itself cannot distinguish the caller, which makes it impossible to output the log only in the meaningful case (commit streams). Signed-off-by: Wenjing Liu Reviewed-by: Nikola Cornij Acked-by: Leo Li Signed-off-by: Alex Deucher commit dcd65857a7815ef94735f73d01e0d0d7e1ff2090 Author: Wenjing Liu Date: Wed Nov 13 17:03:37 2019 -0500 drm/amd/display: add dc dsc functions to return bpp range for pixel encoding [why] Need to support 6 bpp for 420 pixel encoding only. [how] Add a dc function to determine what bpp range can be supported for given pixel encoding. Signed-off-by: Wenjing Liu Reviewed-by: Nikola Cornij Acked-by: Leo Li Signed-off-by: Alex Deucher commit 5c7b0f38522e702ce0143a9ef62908eb953808ac Author: Noah Abradjian Date: Wed Nov 13 17:06:40 2019 -0500 drm/amd/display: Remove redundant call [Why] I was advised that we don't need this call of program_front_end, as earlier and later calls in the same sequence are sufficient. [How] Remove first call of program_front_end in dc_commit_state_no_check. Signed-off-by: Noah Abradjian Reviewed-by: Yongqiang Sun Acked-by: Leo Li Signed-off-by: Alex Deucher commit 8b0fbb368c96df747d958bfb0842da9842e6d0a3 Author: Noah Abradjian Date: Wed Nov 13 16:56:06 2019 -0500 drm/amd/display: Modify logic for when to wait for mpcc idle [Why] I was advised that we may need to check for mpcc idle in more cases than just when opp_changed is true. Also, mpcc_inst is equal to pipe_idx, so remove for loop. [How] Remove opp_changed flag check and mpcc_inst loop. Signed-off-by: Noah Abradjian Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher commit 5fd21b394cfec3611a4ddf49ec61c8920c001899 Author: abdoulaye berthe Date: Tue Nov 12 11:07:24 2019 -0500 drm/amd/display: check for repeater when setting aux_rd_interval. [Why] When training with repeater the aux read interval must be set to repeater specific aux_red_interval. This value is always 100us for CR. [How] Check for repeater when setting the aux_rd_interval in channel equalization. Use the right offset in the aux_rd_interval array Signed-off-by: abdoulaye berthe Reviewed-by: Wenjing Liu Acked-by: George Shen Acked-by: Leo Li Signed-off-by: Alex Deucher commit 9a35b016b99fb39891102c17e65f0b63d1d90d94 Author: Noah Abradjian Date: Wed Nov 13 13:55:53 2019 -0500 drm/amd/display: Remove flag check in mpcc update [Why] MPCC programming was being missed during certain split pipe enables due to full_update flag not being true. This caused a momentary flash on half the screen. After discussion, determined we should not have that flag check within update_mpcc, as it should always perform full programming when called. [How] Remove flag check. We call update_blending within insert_plane, so we do not need to replace its call from the if block. Signed-off-by: Noah Abradjian Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher commit e0600a94343cc772b33705015cb8c05bac32bccb Author: Joseph Gravenor Date: Tue Nov 12 17:48:36 2019 -0500 drm/amd/display: update sr latency for renoir when using lpddr4 [Why] DF team has produced more optimized sr latency numbers, for lpddr4 [How] change the sr laency in the lpddr4 wm table to the new latency number Signed-off-by: Joseph Gravenor Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 2f39835cc35033672ace41f32d653dbf2c0c8132 Author: Nicholas Kazlauskas Date: Tue Nov 12 13:46:34 2019 -0500 drm/amd/display: Add shared DMCUB/driver firmware state cache window [Why] Scratch registers are limited on the DMCUB and we have an expanding list of state to track between driver and DMCUB. [How] Place shared state in cache window 6. The cache window size is aligned to the size of the cache line on the DMCUB to make it easy to invalidate. The shared state is intended to be read only from driver side so it's been marked as const. The use of volatile is intentional. The memory for the shared firmware state is memory mapped from the framebuffer memory. The DMCUB will flush its cache after modifying the region. There's no way for x86 to known whether this data is stale or not so we want to intentionally disable optimization to force the read at every access. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit d4bbcecb596296834aeafb93008474671c7988cf Author: Nicholas Kazlauskas Date: Tue Nov 12 15:33:37 2019 -0500 drm/amd/display: Split DMUB cmd type into type/subtype [Why] Commands will be considered a stable ABI between driver and firmware. Commands are also split between DC commands, DAL feature commands, and VBIOS commands. Commands are currently not designated to a specific ID and the enum does not provide a stable ABI. We currently group all of these into a single command type of 8-bits. With the stable ABI consideration in mind it's not unreasonable to run out of command IDs. For cleaner separation and versioning split the commands into a main type and a subtype. [How] For commands where performance matters (like reg sequences) these are still considered main commands. Sub commands will be split by ownership/feature. Update existing command sequences to reflect new changes. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 75441d9d35f71123933eafa4dd55459403582add Author: Mikita Lipski Date: Tue Nov 12 13:58:32 2019 -0500 drm/amd/display: Return a correct error value [why] The function is expected to return instance of the timing generator therefore we shouldn't be returning boolean in integer function, and we shouldn't be returning zero so changing it to -1. Signed-off-by: Mikita Lipski Reviewed-by: Martin Leung Acked-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher commit 99218d122a2b329c179cc6917836068da3c3e1ad Author: Hugo Hu Date: Wed Nov 13 16:18:09 2019 -0500 drm/amd/display: Save/restore link setting for disable phy when link retraining [Why] The link setting will be modify after disable phy and due to DP Compliance Fails. [How] Save and resotre link setting for disable link phy when link retraining. Signed-off-by: Hugo Hu Reviewed-by: Wenjing Liu Acked-by: Leo Li Signed-off-by: Alex Deucher commit 8d623f86c07fce9b01e42b503df82bbabfb1621d Author: Anthony Koo Date: Wed Nov 13 14:04:56 2019 -0500 drm/amd/display: add DP protocol version [Why] We want to know DP protocol version [How] In DC create we initialize a cap to indicate the max DP protocol version supported Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit 89cd5a02dfab35e0393fb04e936a427eea9f8d03 Author: Joseph Gravenor Date: Tue Nov 12 15:36:57 2019 -0500 drm/amd/display: update p-state latency for renoir when using lpddr4 [Why] DF team has produced more optimized latency numbers, for lpddr4 [How] change the p-state laency in the lpddr4 wm table to the new latency number Signed-off-by: Joseph Gravenor Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 2853ecc6610af9e40b6686498330b64a780cb181 Author: Reza Amini Date: Thu Nov 7 10:10:45 2019 -0500 drm/amd/display: Implement DePQ for DCN1 [Why] Need support for more color management in 10bit surface. [How] Provide support for DePQ for 10bit surface Signed-off-by: Reza Amini Reviewed-by: Krunoslav Kovac Acked-by: Leo Li Signed-off-by: Alex Deucher commit 949ffc8b3631ea0192a298109fa583b2f3a39c8f Author: Nikola Cornij Date: Mon Nov 11 18:03:59 2019 -0500 drm/amd/display: Reset steer fifo before unblanking the stream [why] During mode transition steer fifo could overflow. Quite often it recovers by itself, but sometimes it doesn't. [how] Add steer fifo reset before unblanking the stream. Also add a short delay when resetting dig resync fifo to make sure register writes don't end up back-to-back, in which case the HW might miss the reset request. Signed-off-by: Nikola Cornij Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 084e1de7b938a00608b36a032c59bf987ff91667 Author: Dmytro Laktyushkin Date: Fri Nov 8 16:20:36 2019 -0500 drm/amd/display: fix dml20 min_dst_y_next_start calculation Bring this calculation in line with HW programming guide. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 1ba2a48305715f5832fac023ddc0d4ceba7a8491 Author: Michael Strauss Date: Sun Nov 10 15:22:15 2019 -0500 drm/amd/display: Disable chroma viewport w/a when rotated 180 degrees [WHY] Previous Renoir chroma viewport workaround fixed an MPO flicker by increasing the chroma viewport size. However, when the MPO plane is rotated 180 degrees, the viewport is read in reverse. Since the workaround increases viewport size, when reading in reverse it causes a vertical chroma offset. [HOW] Pass rotation value to viewport set functions Temporarily disable the chroma viewport w/a when hubp is rotated 180 degrees Signed-off-by: Michael Strauss Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 460adc6b699672f3a15c8d6175b8f0bcb2b3c50f Author: abdoulaye berthe Date: Wed Oct 23 17:16:51 2019 -0400 drm/amd/display: add log for lttpr Signed-off-by: abdoulaye berthe Reviewed-by: Wenjing Liu Acked-by: Leo Li Signed-off-by: Alex Deucher commit 769dbc16056769ed25904f4b7dfca35c0698c1cd Author: Brandon Syu Date: Fri Nov 8 11:26:06 2019 +0800 drm/amd/display: fixed that I2C over AUX didn't read data issue [Why] The variable mismatch assignment error. [How] To use uint32_t replace it. Signed-off-by: Brandon Syu Reviewed-by: Charlene Liu Acked-by: Leo Li Signed-off-by: Alex Deucher commit fa11d3c9425354c4b47e40f34d29c5b0949fe4ce Author: Leo (Hanghong) Ma Date: Thu Nov 7 16:30:04 2019 -0500 drm/amd/display: Change the delay time before enabling FEC [why] DP spec requires 1000 symbols delay between the end of link training and enabling FEC in the stream. Currently we are using 1 miliseconds delay which is not accurate. [how] One lane RBR should have the maximum time for transmitting 1000 LL codes which is 6.173 us. So using 7 microseconds delay instead of 1 miliseconds. Signed-off-by: Leo (Hanghong) Ma Reviewed-by: Harry Wentland Reviewed-by: Nikola Cornij Acked-by: Leo Li Signed-off-by: Alex Deucher commit 728a5068239d0f50b4346089e30ba744b5954288 Author: Aric Cyr Date: Mon Nov 11 10:07:50 2019 -0500 drm/amd/display: 3.2.61 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit e6d9a93c141e0bcc3a40671b2338c093d04ab14b Author: Eric Yang Date: Sun Nov 10 12:08:02 2019 -0500 drm/amd/display: fix dprefclk and ss percentage reading on RN [Why] Before was using HW counter value to determine the dprefclk. Which take into account ss, but has large variation, not good enough for generating audio dto. Also, the bios parser code to get the ss percentage was not working. [How] After this change, dprefclk is hard coded, same as on RV. We don't expect this to change on Renoir. Modified bios parser code to get the right ss percentage. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 639dcfc6feb5c7451d1382c5d3fa1fd679eca544 Author: Joseph Gravenor Date: Fri Nov 8 14:30:34 2019 -0500 drm/amd/display: have two different sr and pstate latency tables for renoir [Why] new sr and pstate latencies are optimized for the case when we are not using lpddr4 memory [How] have two different wm tables, one for the lpddr case and one for non lpddr case Signed-off-by: Joseph Gravenor Reviewed-by: Eric Yang Acked-by: Leo Li Signed-off-by: Alex Deucher commit 8fb3a6363684b5f00e7b438e22fc17346711f4fa Author: David Galiffi Date: Thu Nov 7 17:18:20 2019 -0500 drm/amd/display: Fixed kernel panic when booting with DP-to-HDMI dongle [Why] In dc_link_is_dp_sink_present, if dal_ddc_open fails, then dal_gpio_destroy_ddc is called, destroying pin_data and pin_clock. They are created only on dc_construct, and next aux access will cause a panic. [How] Instead of calling dal_gpio_destroy_ddc, call dal_ddc_close. Signed-off-by: David Galiffi Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 01290a5766e1be38ee9f114d261bee263b168ab4 Author: Joseph Gravenor Date: Thu Nov 7 19:20:00 2019 -0500 drm/amd/display: populate bios integrated info for renoir [Why] When video_memory_type bw_params->vram_type is assigned, wedistinguish between Ddr4MemType and LpDdr4MemType. Because of this we will never report that we are using LpDdr4MemType and never re-purpose WM set D [How] populate bios integrated info for renoir by adding the revision number for renoir and use that integrated info table instead of of asic_id to get the vram type Signed-off-by: Joseph Gravenor Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit c1825b5777ce25b0f84be8775a588d2bfa1e6420 Author: Nicholas Kazlauskas Date: Thu Nov 7 15:47:46 2019 -0500 drm/amd/display: Program CW5 for tracebuffer for dcn20 [Why] On dcn21 this is programmed for tracebuffer support but isn't being programmed on dcn20. DMCUB execution hits an undefined address 65000000 on tracebuffer access. [How] Program CW5. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit a49421185189ba05f4c1b8477f1272fb2d024d2f Author: Nicholas Kazlauskas Date: Thu Nov 7 15:29:20 2019 -0500 drm/amd/display: Return DMUB_STATUS_OK when autoload unsupported [Why] Not having support for autoload isn't an error. If the DMUB firmware doesn't support it then don't return DMUB_STATUS_INVALID. [How] Return DMUB_STATUS_OK when ->is_auto_load_done is NULL. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 3c465370f20abd3c8783da816a445ad5bcbfdb76 Author: Nicholas Kazlauskas Date: Thu Nov 7 15:26:14 2019 -0500 drm/amd/display: Only wait for DMUB phy init on dcn21 [Why] The wait for PHY init won't finish if the firmware doesn't support it. [How] Only hook this functionality up on DCN21 and move it out of DCN20. For ASIC without support then this should return OK so we don't hang while waiting in DC. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 20ad55c89d39de5436eb68633d317196f2ca15ae Author: Yongqiang Sun Date: Thu Nov 7 14:41:06 2019 -0500 drm/amd/display: Add DMCUB__PG_DONE trace code enum Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 61f14c5b528f0c828e0d1f27f8580a7f43ad1a5b Author: Lucy Li Date: Fri Oct 25 17:59:32 2019 -0400 drm/amd/display: Disable link before reenable [Why] Black screen seen after display is disabled then re-enabled. Caused by difference in link settings when switching between different resolutions. [How] In PnP case, or whenever the display is still enabled but the driver is unloaded, disable link before re-enabling with new link settings. Signed-off-by: Lucy Li Reviewed-by: Anthony Koo Acked-by: Leo Li Signed-off-by: Alex Deucher commit 832aa63bef346fc6a58bf46412036d368142fddf Author: Paul Hsieh Date: Fri Nov 1 14:41:37 2019 +0800 drm/amd/display: Reset PHY in link re-training [Why] Link training failed randomly when plugging USB-C display in/out. [How] If link training failed, reset PHY in link re-training. Signed-off-by: Paul Hsieh Reviewed-by: Wenjing Liu Acked-by: Leo Li Signed-off-by: Alex Deucher commit a4cea11655fbc5246fb5a066588e1589e9cfefa5 Author: Jaehyun Chung Date: Thu Nov 7 11:16:49 2019 -0500 drm/amd/display: Wrong ifdef guards were used around DML validation [Why] Wrong guards were causing the debug option not to run. [How] Changed the guard to the correct one, matching the rq, ttu, dlg regs struct members that need to be guarded. Also log a message when validation starts. Signed-off-by: Jaehyun Chung Reviewed-by: Alvin Lee Acked-by: Leo Li Signed-off-by: Alex Deucher commit 580c8be278b09af65296aaa1a2227d3003eb7892 Author: Joseph Gravenor Date: Mon Nov 4 16:39:35 2019 -0500 drm/amd/display: fix DalDramClockChangeLatencyNs override [why] pstate_latency_us never gets updated from the hard coded value in rn_clk_mgr.c [how] update the wm table's values before we do calculations with them Signed-off-by: Joseph Gravenor Reviewed-by: Eric Yang Acked-by: Leo Li Signed-off-by: Alex Deucher commit eab4bb97c8e7af219e12afc53f0def71a54d014b Author: Nikola Cornij Date: Thu Nov 7 13:06:48 2019 -0500 drm/amd/display: Map DSC resources 1-to-1 if numbers of OPPs and DSCs are equal [why] On ASICs where number of DSCs is the same as OPPs there's no need for DSC resource management. Mappping 1-to-1 fixes mode-set- or S3- -related issues for such platforms. [how] Map DSC resources 1-to-1 to pipes only if number of OPPs is the same as number of DSCs. This will still keep other ASICs working. A follow-up patch to fix mode-set issues on those ASICs will be required if testing shows issues with mode set. Signed-off-by: Nikola Cornij Reviewed-by: Dmytro Laktyushkin Acked-by: Leo Li Signed-off-by: Alex Deucher commit 10f51857b753af25cc048d8c5791433ee94f9164 Author: Michael Strauss Date: Mon Nov 4 13:39:20 2019 -0500 drm/amd/display: Fix Dali clk mgr construct [WHY] Dali is currently being misinterpreted as Renoir, as a result uses wrong clk mgr constructor [HOW] Add check to init Dali as Raven2 before it can be misidentified Clean up & fix Raven2 & Dali ASIC checks Signed-off-by: Michael Strauss Reviewed-by: Eric Yang Acked-by: Leo Li Signed-off-by: Alex Deucher commit f42ea55be1114768e36c4e8dff4400ca811309cf Author: Anthony Koo Date: Tue Nov 5 13:17:30 2019 -0500 drm/amd/display: add separate of private hwss functions [Why] Some function pointers in the hwss function pointer table are meant to be hw sequencer entry points to be called from dc. However some of those function pointers are not meant to be entry points, but instead used as a code reuse/inheritance tool called directly by other hwss functions, not by dc. Therefore, we want a more clear separation of which functions we determine to be interface functions vs the functions we use within hwss. [How] DC interface functions will be stored in: struct hw_sequencer_funcs Functions used within HWSS will be stored in: struct hwseq_private_funcs Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 2b77dcc5e5aa382832af93a581de8293db72d888 Author: Anthony Koo Date: Tue Nov 5 13:04:34 2019 -0500 drm/amd/display: rename core_dc to dc [Why] First, to make code more consistent Second, to get rid of those scenario where we create a second local pointer to dc when it's already passed in. [How] Rename core_dc to dc Remove duplicate local pointers to dc Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Leo Li Signed-off-by: Alex Deucher commit d3511fd01cef7da850a93cd51e965ad6450dd95e Author: Eric Yang Date: Tue Nov 5 11:59:38 2019 -0500 drm/amd/display: update sr and pstate latencies for Renoir [Why] DF team has produced more optimized latency numbers. [How] Add sr latencies to the wm table, use different latencies for different wm sets. Also fix bb override from registery key for these latencies. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Leo Li Signed-off-by: Alex Deucher commit 76434f75d4a48525d825ec8ee0c018db4cc81f77 Author: Le Ma Date: Wed Nov 27 16:51:22 2019 +0800 drm/amdgpu: reduce redundant uvd context lost warning message Move the print out of uvd instance loop in amdgpu_uvd_suspend v2: drop unnecessary brackets v3: grab ras_intr state once for multiple times use Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 00eaa57172a02edddbf445112409e807e0caacd9 Author: Le Ma Date: Fri Oct 25 17:19:38 2019 +0800 drm/amdgpu: clear err_event_athub flag after reset exit Otherwise next err_event_athub error cannot call gpu reset. And following resume sequence will not be affected by this flag. v2: create function to clear amdgpu_ras_in_intr for modularity of ras driver Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b823821f2244add19a71e7fe6c8f8550a29d672d Author: Le Ma Date: Wed Nov 27 13:17:17 2019 +0800 drm/amdgpu: support full gpu reset workflow when ras err_event_athub occurs This athub fatal error can be recovered by baco without system-level reboot, so add a mode to use baco for the recovery. Not affect the default psp reset situations for now. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ce316fa55ef0f1751276b846a54fb3b835bd5e64 Author: Le Ma Date: Tue Nov 26 22:12:31 2019 +0800 drm/amdgpu: add concurrent baco reset support for XGMI Currently each XGMI node reset wq does not run in parrallel if bound to same cpu. Make change to bound the xgmi_reset_work item to different cpus. XGMI requires all nodes enter into baco within very close proximity before any node exit baco. So schedule the xgmi_reset_work wq twice for enter/exit baco respectively. To use baco for XGMI, PMFW supported for baco on XGMI needs to be involved. The case that PSP reset and baco reset coexist within an XGMI hive never exist and is not in the consideration. v2: define use_baco flag to simplify the code for xgmi baco sequence Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7a22677b9514d0e819eb85d687eb8d8ef10ab330 Author: Le Ma Date: Tue Nov 26 17:24:56 2019 +0800 drm/amdgpu: enable/disable doorbell interrupt in baco entry/exit helper This operation is needed when baco entry/exit for ras recovery Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5c39d600e315ce1a0d13c491693c0390d40c94f3 Author: Le Ma Date: Fri Nov 22 18:39:11 2019 +0800 drm/amdgpu: clear uncorrectable parity error status bit This should be cleared during every nbif uncorrectable error cleanup work. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 28f87950d935eec2ba1076933535213f4f5c8a06 Author: Le Ma Date: Fri Nov 22 17:56:47 2019 +0800 drm/amdgpu: clear ras controller status registers when interrupt occurs To fix issue that ras controller interrupt cannot be triggered anymore after one time nbif uncorrectable error. And error count is stored in nbif ras object for query. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit f2a79be1c094f4d664b6a3fbfd9b5a61f8ff7f02 Author: Le Ma Date: Mon Nov 25 12:26:09 2019 +0800 drm/amdgpu: export amdgpu_ras_find_obj to use externally Change it to external interface. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4a2d93565ada87a3a2d72b1ab26335ea785b3d3c Author: Le Ma Date: Tue Oct 22 02:41:26 2019 +0800 drm/amdgpu: remove ras global recovery handling from ras_controller_int handler v2: add notification when ras controller interrupt generates Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b456c93253bde374057bfca8f74ada527250d5d9 Author: Pierre-Eric Pelloux-Prayer Date: Thu Nov 28 12:08:58 2019 +0100 drm/amdgpu: add cache flush workaround to gfx8 emit_fence The same workaround is used for gfx7. Both PAL and Mesa use it for gfx8 too, so port this commit to gfx_v8_0_ring_emit_fence_gfx. Signed-off-by: Pierre-Eric Pelloux-Prayer Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 80c5a807a51f2d19df4a5a5d12cf9d4997993999 Author: Alex Deucher Date: Wed Dec 4 22:07:49 2019 -0500 drm/amdgpu: add header line for power profile on Arcturus So the output is consistent with other asics. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit a5a4d68c9326bba7d6ab414a6c1a404f70ab29b1 Author: Yong Zhao Date: Fri Nov 8 00:30:49 2019 -0500 drm/amdkfd: Eliminate unnecessary kernel queue function pointers Up to this point, those functions are all the same for all ASICs, so no need to call them by functions pointers. Removing the function pointers will greatly increase the code readablity. If there is ever need for those function pointers, we can add it back then. Signed-off-by: Yong Zhao Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit f83f5a1e115c8dc382a5abaaf0c10374fbcf1038 Author: James Zhu Date: Tue Dec 3 15:40:10 2019 -0500 drm/amdgpu/gfx: Improvement on EDC GPR workarounds SPI limits total CS waves in flight per SE to no more than 32 * num_cu and we need to stuff 40 waves on a CU to completely clean the SGPR. This is accomplished in the WR by cleaning the SE in two steps, half of the CU per step. Signed-off-by: James Zhu Reviewed-by: Yong Zhao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 79c4c8ea913076338e70252f947a8805daa8f91b Author: Guchun Chen Date: Wed Dec 4 15:51:16 2019 +0800 drm/amdgpu: add check before enabling/disabling broadcast mode When security violation from new vbios happens, data fabric is risky to stop working. So prevent the direct access to DF mmFabricConfigAccessControl from the new vbios and onwards. Signed-off-by: Guchun Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit bbca083de291a03ffe1a1eb0832a0d74f8b64898 Author: Chris Wilson Date: Thu Dec 5 18:33:32 2019 +0000 drm/i915: Serialise i915_active_acquire() with __active_retire() As __active_retire() does it's final atomic_dec() under the ref->tree_lock spinlock, in order to prevent ourselves from reusing the ref->cache and ref->tree as they are being destroyed, we need to serialise with the retirement during i915_active_acquire(). [ +0.000005] kernel BUG at drivers/gpu/drm/i915/i915_active.c:157! [ +0.000011] invalid opcode: 0000 [#1] SMP [ +0.000004] CPU: 7 PID: 188 Comm: kworker/u16:4 Not tainted 5.4.0-rc8-03070-gac5e57322614 #89 [ +0.000002] Hardware name: Razer Razer Blade Stealth 13 Late 2019/LY320, BIOS 1.02 09/10/2019 [ +0.000082] Workqueue: events_unbound active_work [i915] [ +0.000059] RIP: 0010:__active_retire+0x115/0x120 [i915] [ +0.000003] Code: 75 28 48 8b 3d 8c 6e 1a 00 48 89 ee e8 e4 5f a5 c0 48 8b 44 24 10 65 48 33 04 25 28 00 00 00 75 0f 48 83 c4 18 5b 5d 41 5c c3 <0f> 0b 0f 0b 0f 0b e8 a0 90 87 c0 0f 1f 44 00 00 48 8b 3d 54 6e 1a [ +0.000002] RSP: 0018:ffffb833003f7e48 EFLAGS: 00010286 [ +0.000003] RAX: ffff8d6e8d726d00 RBX: ffff8d6f9db4e840 RCX: 0000000000000000 [ +0.000001] RDX: ffffffff82605930 RSI: ffff8d6f9adc4908 RDI: ffff8d6e96cefe28 [ +0.000002] RBP: ffff8d6e96cefe00 R08: 0000000000000000 R09: ffff8d6f9ffe9a50 [ +0.000002] R10: 0000000000000048 R11: 0000000000000018 R12: ffff8d6f9adc4930 [ +0.000001] R13: ffff8d6f9e04fb00 R14: 0000000000000000 R15: ffff8d6f9adc4988 [ +0.000002] FS: 0000000000000000(0000) GS:ffff8d6f9ffc0000(0000) knlGS:0000000000000000 [ +0.000002] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ +0.000002] CR2: 000055eb5a34cf10 CR3: 000000018d609002 CR4: 0000000000760ee0 [ +0.000002] PKRU: 55555554 [ +0.000001] Call Trace: [ +0.000010] process_one_work+0x1aa/0x350 [ +0.000004] worker_thread+0x4d/0x3a0 [ +0.000004] kthread+0xfb/0x130 [ +0.000004] ? process_one_work+0x350/0x350 [ +0.000003] ? kthread_park+0x90/0x90 [ +0.000005] ret_from_fork+0x1f/0x40 Reported-by: Kenneth Graunke Fixes: c9ad602feabe ("drm/i915: Split i915_active.mutex into an irq-safe spinlock for the rbtree") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Kenneth Graunke Cc: Matthew Auld Tested-by: Kenneth Graunke Reviewed-by: Kenneth Graunke Link: https://patchwork.freedesktop.org/patch/msgid/20191205183332.801237-1-chris@chris-wilson.co.uk commit 92c964ca3e160aaf4828526f09d72507508bf28d Author: Andi Shyti Date: Thu Dec 5 16:44:22 2019 +0000 drm/i915/gt: Replace I915_READ with intel_uncore_read Get rid of the last remaining I915_READ in gt/ and make gt-land the first I915_READ-free happy island. Suggested-by: Chris Wilson Signed-off-by: Andi Shyti Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191205164422.727968-1-chris@chris-wilson.co.uk commit f79489074c59a5fd6bc35b21ca9911237993a045 Author: Sean Paul Date: Wed Aug 28 20:09:44 2019 -0400 drm/dp_mst: Clear all payload id tables downstream when initializing It seems that on certain MST hubs, namely the CableMatters USB-C 2x DP hub, using the DP_PAYLOAD_ALLOCATE_SET and DP_PAYLOAD_TABLE_UPDATE_STATUS register ranges to clear any pre-existing payload allocations on the hub isn't always enough to reset things if the source device has been reset unexpectedly. Or at least, that's the current running theory. The precise behavior appears to be that when the source device gets reset unexpectedly, the hub begins reporting an available_pbn value of 0 for all of its ports. This is a bit inconsistent with the our theory, since this seems to happen even if previously set PBN allocations should have resulted in a non-zero available_pbn value. So, it's possible that something else may be going on here. Strangely though, sending a CLEAR_PAYLOAD_ID_TABLE broadcast request when initializing the MST topology seems to bring things into working order and make available_pbn work again. Since this is a pretty safe solution, let's go ahead and implement it. Changes since v1: * Change indenting on drm_dp_send_clear_payload_id_table() prototype * Remove some braces in drm_dp_send_clear_payload_id_table() * Reorganize some variable declarations in drm_dp_send_clear_payload_id_table() * Don't forget to handle DP_CLEAR_PAYLOAD_ID_TABLE in drm_dp_sideband_parse_reply() * Move drm_dp_send_clear_payload_id_table() call into drm_dp_mst_link_probe_work(), since we can't send sideband messages while under lock in drm_dp_mst_topology_mgr_set_mst() * Change commit message Acked-by: Daniel Vetter Signed-off-by: Sean Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190829000944.20722-1-lyude@redhat.com commit 6f7ac8285371fb0df58aba861eaab387f79ed04d Author: Chris Wilson Date: Thu Dec 5 14:59:34 2019 +0000 drm/i915/gt: Save irqstate around virtual_context_destroy As virtual_context_destroy() may be called from a request signal, it may be called from inside an irq-off section, and so we need to do a full save/restore of the irq state rather than blindly re-enable irqs upon unlocking. <4> [110.024262] WARNING: inconsistent lock state <4> [110.024277] 5.4.0-rc8-CI-CI_DRM_7489+ #1 Tainted: G U <4> [110.024292] -------------------------------- <4> [110.024305] inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. <4> [110.024323] kworker/0:0/5 [HC0[0]:SC0[0]:HE1:SE1] takes: <4> [110.024338] ffff88826a0c7a18 (&(&rq->lock)->rlock){?.-.}, at: i915_request_retire+0x221/0x930 [i915] <4> [110.024592] {IN-HARDIRQ-W} state was registered at: <4> [110.024612] lock_acquire+0xa7/0x1c0 <4> [110.024627] _raw_spin_lock_irqsave+0x33/0x50 <4> [110.024788] intel_engine_breadcrumbs_irq+0x38c/0x600 [i915] <4> [110.024808] irq_work_run_list+0x49/0x70 <4> [110.024824] irq_work_run+0x26/0x50 <4> [110.024839] smp_irq_work_interrupt+0x44/0x1e0 <4> [110.024855] irq_work_interrupt+0xf/0x20 <4> [110.024871] __do_softirq+0xb7/0x47f <4> [110.024885] irq_exit+0xba/0xc0 <4> [110.024898] do_IRQ+0x83/0x160 <4> [110.024910] ret_from_intr+0x0/0x1d <4> [110.024922] irq event stamp: 172864 <4> [110.024938] hardirqs last enabled at (172863): [] _raw_spin_unlock_irq+0x24/0x50 <4> [110.024963] hardirqs last disabled at (172864): [] _raw_spin_lock_irq+0xa/0x40 <4> [110.024988] softirqs last enabled at (172812): [] __do_softirq+0x385/0x47f <4> [110.025012] softirqs last disabled at (172797): [] irq_exit+0xba/0xc0 <4> [110.025031] other info that might help us debug this: <4> [110.025049] Possible unsafe locking scenario: <4> [110.025065] CPU0 <4> [110.025075] ---- <4> [110.025084] lock(&(&rq->lock)->rlock); <4> [110.025099] <4> [110.025109] lock(&(&rq->lock)->rlock); <4> [110.025124] *** DEADLOCK *** <4> [110.025144] 4 locks held by kworker/0:0/5: <4> [110.025156] #0: ffff88827588f528 ((wq_completion)events){+.+.}, at: process_one_work+0x1de/0x620 <4> [110.025187] #1: ffffc9000006fe78 ((work_completion)(&engine->retire_work)){+.+.}, at: process_one_work+0x1de/0x620 <4> [110.025219] #2: ffff88825605e270 (&kernel#2){+.+.}, at: engine_retire+0x57/0xe0 [i915] <4> [110.025405] #3: ffff88826a0c7a18 (&(&rq->lock)->rlock){?.-.}, at: i915_request_retire+0x221/0x930 [i915] <4> [110.025634] stack backtrace: <4> [110.025653] CPU: 0 PID: 5 Comm: kworker/0:0 Tainted: G U 5.4.0-rc8-CI-CI_DRM_7489+ #1 <4> [110.025675] Hardware name: /NUC7i5BNB, BIOS BNKBL357.86A.0054.2017.1025.1822 10/25/2017 <4> [110.025856] Workqueue: events engine_retire [i915] <4> [110.025872] Call Trace: <4> [110.025891] dump_stack+0x71/0x9b <4> [110.025907] mark_lock+0x49a/0x500 <4> [110.025926] ? print_shortest_lock_dependencies+0x200/0x200 <4> [110.025946] mark_held_locks+0x49/0x70 <4> [110.025962] ? _raw_spin_unlock_irq+0x24/0x50 <4> [110.025978] lockdep_hardirqs_on+0xa2/0x1c0 <4> [110.025995] _raw_spin_unlock_irq+0x24/0x50 <4> [110.026171] virtual_context_destroy+0xc5/0x2e0 [i915] <4> [110.026376] __active_retire+0xb4/0x290 [i915] <4> [110.026396] dma_fence_signal_locked+0x9e/0x1b0 <4> [110.026613] i915_request_retire+0x451/0x930 [i915] <4> [110.026766] retire_requests+0x4d/0x60 [i915] <4> [110.026919] engine_retire+0x63/0xe0 [i915] Fixes: b1e3177bd1d8 ("drm/i915: Coordinate i915_active with its own mutex") Fixes: 6d06779e8672 ("drm/i915: Load balancing across a virtual engine") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191205145934.663183-1-chris@chris-wilson.co.uk commit c0826f40c2255960983410e66a1ee44c43a524cd Author: Thomas Zimmermann Date: Wed Dec 4 14:34:35 2019 +0100 drm/mgag200: Debug-print unique revisions id on G200 SE The behavior of MGA G200 SE depends on the rev id. Print the id when debugging is enabled. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20191204133435.17462-1-tzimmermann@suse.de commit 9623ecb07f17b009e4021990b424bf9bbc5e199c Author: Thomas Zimmermann Date: Thu Dec 5 10:02:52 2019 +0100 drm/mgag200: Call mgag200_driver_{load, unload}() before registering device The load/unload callbacks in struct drm_driver are deprecated. Remove them and call functions explicitly. Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191205090252.5711-1-tzimmermann@suse.de commit 50cbe0e37912189bd4ef81656c82673ac8826751 Author: Thomas Zimmermann Date: Wed Dec 4 19:46:17 2019 +0100 drm/gma500: Call psb_driver_{load, unload}() before registering device The load/unload callbacks in struct drm_driver are deprecated. Remove them and call functions explicitly. Signed-off-by: Thomas Zimmermann Acked-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20191204184617.22201-1-tzimmermann@suse.de commit 5c4fe63abae8866dda31dd84f1bcc98e1e645734 Author: Chris Wilson Date: Thu Dec 5 13:29:12 2019 +0000 drm/i915/gem: Reinitialise the local list before repeating As we may start the loop again, we require our local list of i915_vma we've processed to be reinitialised. Fixes: aa5e4453dc05 ("drm/i915/gem: Try to flush pending unbind events") Closes: https://gitlab.freedesktop.org/drm/intel/issues/731 Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191205132912.606868-1-chris@chris-wilson.co.uk commit 0471a44871cf304edbea3efac72e3e0ac8702b16 Author: Chris Wilson Date: Thu Dec 5 11:37:26 2019 +0000 drm/i915/gt: Bump the PP_DIR invalidation for Baytrail Invalidate the ring TLB and increase the delay required for Baytrail. Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191205113726.413351-3-chris@chris-wilson.co.uk commit ccd2094559d8639f04c6d2e59c3c93a6ae226ec0 Author: Chris Wilson Date: Thu Dec 5 11:37:25 2019 +0000 drm/i915: Try hard to bind the context It is not acceptable for context pinning to fail with -ENOSPC as we should always be able to make space in the GGTT. The only reason we may fail is that other "temporary" context pins are reserving their space and we need to wait for an available slot. Closes: https://gitlab.freedesktop.org/drm/intel/issues/676 Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191205113726.413351-2-chris@chris-wilson.co.uk commit a725d711e8d7bb1eb15cd19b5a2386a66f2e2ef5 Author: Chris Wilson Date: Thu Dec 5 11:37:24 2019 +0000 drm/i915: Ignore most failures during evict-vm Removing all vma from the VM is best effort -- we only remove all those ready to be removed, so forgive and VMA that becomes pinned. While forgiving those that become pinned, also take a second look for any that became unpinned as we waited. Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191205113726.413351-1-chris@chris-wilson.co.uk commit 05975cd9eb8422d11fdcb29b065e5e942ec6b62c Author: Chris Wilson Date: Wed Dec 4 23:26:16 2019 +0000 drm/i915: Remove vestigal i915_gem_context locals from cmdparser The use GEM context itself was removed in commit cd30a5031704 ("drm/i915/gem: Excise the per-batch whitelist from the context"), but the locals were left in place as an oversight. Remove the parameters and clean up. References: cd30a5031704 ("drm/i915/gem: Excise the per-batch whitelist from the context") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191204232616.94397-1-chris@chris-wilson.co.uk commit 7ecacafc240638148567742cca41aa7144b4fe1e Author: Kai-Heng Feng Date: Thu Dec 5 17:07:01 2019 +0800 Bluetooth: btusb: Disable runtime suspend on Realtek devices After commit 9e45524a0111 ("Bluetooth: btusb: Fix suspend issue for Realtek devices") both WiFi and Bluetooth stop working after reboot: [ 34.322617] usb 1-8: reset full-speed USB device number 3 using xhci_hcd [ 34.450401] usb 1-8: device descriptor read/64, error -71 [ 34.694375] usb 1-8: device descriptor read/64, error -71 ... [ 44.599111] rtw_pci 0000:02:00.0: failed to poll offset=0x5 mask=0x3 value=0x0 [ 44.599113] rtw_pci 0000:02:00.0: mac power on failed [ 44.599114] rtw_pci 0000:02:00.0: failed to power on mac [ 44.599114] rtw_pci 0000:02:00.0: leave idle state failed [ 44.599492] rtw_pci 0000:02:00.0: failed to leave ips state [ 44.599493] rtw_pci 0000:02:00.0: failed to leave idle state That commit removed USB_QUIRK_RESET_RESUME, which not only resets the USB device after resume, it also prevents the device from being runtime suspended by USB core. My experiment shows if the Realtek btusb device ever runtime suspends once, the entire wireless module becomes useless after reboot. So let's explicitly disable runtime suspend on Realtek btusb device for now. Fixes: 9e45524a0111 ("Bluetooth: btusb: Fix suspend issue for Realtek devices") Signed-off-by: Kai-Heng Feng Signed-off-by: Marcel Holtmann commit 8a48ac339398f21282985bff16552447d41dcfb2 Author: Jani Nikula Date: Tue Dec 3 18:38:50 2019 +0200 video: constify fb ops across all drivers Now that the fbops member of struct fb_info is const, we can start making the ops const as well. This does not cover all drivers; some actually modify the fbops struct, for example to adjust for different configurations, and others do more involved things that I'd rather not touch in practically obsolete drivers. Mostly this is the low hanging fruit where we can add "const" and be done with it. v3: - un-constify atyfb, mb862xx, nvidia and uvesabf (0day) v2: - fix typo (Christophe de Dinechin) - use "static const" instead of "const static" in mx3fb.c - also constify smscufx.c Cc: linux-fbdev@vger.kernel.org Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/ce67f14435f3af498f2e8bf35ce4be11f7504132.1575390740.git.jani.nikula@intel.com commit 28318ac1742ab17eb8ba1c1be0dea4cc14b5b2ea Author: Jani Nikula Date: Tue Dec 3 18:38:49 2019 +0200 video: fbdev: intelfb: use const pointer for fb_ops Use const for fb_ops to let us make the fbops struct const in the future. Cc: linux-fbdev@vger.kernel.org Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/171c573bc2977a6ec374753ac7bb03a3523ca2b7.1575390740.git.jani.nikula@intel.com commit b6ff753a0ca0d209a71a6aa53ac38c53c540f2ee Author: Jani Nikula Date: Tue Dec 3 18:38:48 2019 +0200 drm: constify fb ops across all drivers Now that the fbops member of struct fb_info is const, we can start making the ops const as well. Cc: dri-devel@lists.freedesktop.org Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/59b43629ac60031c5bbf961d8c49695019bc9c6f.1575390740.git.jani.nikula@intel.com commit bf9e25ec12877a622857460c2f542a6c31393250 Author: Jani Nikula Date: Tue Dec 3 18:38:47 2019 +0200 video: fbdev: make fbops member of struct fb_info a const pointer Now that we no longer modify the fbops, or hold non-const pointers to it, we can make it const. After this, we can start making the fbops const all over the place. Cc: linux-fbdev@vger.kernel.org Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/700c6b52c39c6e7babaa921f583eac354714d9fc.1575390740.git.jani.nikula@intel.com commit 1b78e72baee87796e37d3a7cab1aded03c91d820 Author: Jani Nikula Date: Tue Dec 3 18:38:46 2019 +0200 video: fbdev: uvesafb: modify the static fb_ops directly Avoid modifying the fb_ops via info->fbops to let us make the pointer const in the future. Cc: linux-fbdev@vger.kernel.org Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/af63cda5de9fee3acd28e7d264f920338298bc0a.1575390740.git.jani.nikula@intel.com commit 9567a03e19d264a4a033963981cd7d1339ccd3c7 Author: Jani Nikula Date: Tue Dec 3 18:38:45 2019 +0200 video: fbdev: nvidia: modify the static fb_ops directly Avoid modifying the fb_ops via info->fbops to let us make the pointer const in the future. Cc: linux-fbdev@vger.kernel.org Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/9639e2305fd4d03311bf909b8914277b221ca582.1575390740.git.jani.nikula@intel.com commit c63c35dea3cba05201d37fe42e4fb8a9e4a070f2 Author: Jani Nikula Date: Tue Dec 3 18:38:44 2019 +0200 video: fbdev: mb862xx: modify the static fb_ops directly Avoid modifying the fb_ops via info->fbops to let us make the pointer const in the future. Drop the unnecessary EXPORT_SYMBOL() while at it. Cc: linux-fbdev@vger.kernel.org Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/51f55c02ea4057cc46335ca5c447b92a55383f77.1575390740.git.jani.nikula@intel.com commit f4e97477bece94a1e07402c899e65676153dff73 Author: Jani Nikula Date: Tue Dec 3 18:38:43 2019 +0200 video: fbdev: atyfb: modify the static fb_ops directly Avoid modifying the fb_ops via info->fbops to let us make the pointer const in the future. Cc: linux-fbdev@vger.kernel.org Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/7dfbf1d47203157f5eb9a6f447f0095765d0b5e6.1575390740.git.jani.nikula@intel.com commit 284562e1f34874e267d4f499362c3816f8f6bc3f Author: Gurchetan Singh Date: Mon Dec 2 17:36:27 2019 -0800 udmabuf: implement begin_cpu_access/end_cpu_access hooks With the misc device, we should end up using the result of get_arch_dma_ops(..) or dma-direct ops. This can allow us to have WC mappings in the guest after synchronization. Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20191203013627.85991-4-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 17a7ce203490459cff14fb1c8f9a15d65fd1c544 Author: Gurchetan Singh Date: Mon Dec 2 17:36:26 2019 -0800 udmabuf: separate out creating/destroying scatter-table These are nice functions and can be re-used. Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20191203013627.85991-3-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit c1bbed668997268c9edccdc9db1bd1487d9e20b0 Author: Gurchetan Singh Date: Mon Dec 2 17:36:25 2019 -0800 udmabuf: add a pointer to the miscdevice in dma-buf private data Will be used later. v2: rename 'udmabuf_misc' to 'device' (kraxel) Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20191203013627.85991-2-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit bc7a71da43b48333f84c6534ab43d240e34cf9eb Author: Gurchetan Singh Date: Mon Dec 2 17:36:24 2019 -0800 udmabuf: use cache_sgt_mapping option The GEM prime helpers do it, so should we. It's also possible to make it optional later. Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20191203013627.85991-1-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann commit 02c484a89484ea189c2cac86d59d910953254aef Author: Thomas Zimmermann Date: Tue Dec 3 11:04:06 2019 +0100 drm/via: Don't include Including is unnecessary in most cases. Replace these instances. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191203100406.9674-13-tzimmermann@suse.de commit 95f02279a7087cffc935ebdc25cf4ffa8c14252c Author: Thomas Zimmermann Date: Tue Dec 3 11:04:05 2019 +0100 drm/tdfx: Don't include Including is unnecessary in most cases. Replace these instances. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191203100406.9674-12-tzimmermann@suse.de commit 528ea54fb0a806cb3136d46b157fd65360d0f6b4 Author: Thomas Zimmermann Date: Tue Dec 3 11:04:04 2019 +0100 drm/sis: Don't include Including is unnecessary in most cases. Replace these instances. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191203100406.9674-11-tzimmermann@suse.de commit fdca3c49057065b3eb9a001a4929d9f7824369d0 Author: Thomas Zimmermann Date: Tue Dec 3 11:04:03 2019 +0100 drm/savage: Don't include Including is unnecessary in most cases. Replace these instances. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191203100406.9674-10-tzimmermann@suse.de commit 2ef79416f0b9cf06f9ee4660440443976e54e0ff Author: Thomas Zimmermann Date: Tue Dec 3 11:04:02 2019 +0100 drm/radeon: Don't include Including is unnecessary in most cases. Replace these instances. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191203100406.9674-9-tzimmermann@suse.de commit 5613f633f9840ad4a2a3c5e631818ccda5e78a7a Author: Thomas Zimmermann Date: Tue Dec 3 11:04:01 2019 +0100 drm/r128: Don't include Including is unnecessary in most cases. Replace these instances. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191203100406.9674-8-tzimmermann@suse.de commit 09daa2e7f317482c80380341810c50003208f28e Author: Thomas Zimmermann Date: Tue Dec 3 11:04:00 2019 +0100 drm/mgag200: Don't include Including is unnecessary in most cases. Replace these instances. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191203100406.9674-7-tzimmermann@suse.de commit 474863a1465fd8b8a786274fb9b2ea1b88f214b2 Author: Thomas Zimmermann Date: Tue Dec 3 11:03:59 2019 +0100 drm/mga: Don't include Including is unnecessary in most cases. Replace these instances. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191203100406.9674-6-tzimmermann@suse.de commit 37609992876cd219b248210ea5328c57e6115a5e Author: Thomas Zimmermann Date: Tue Dec 3 11:03:58 2019 +0100 drm/i810: Don't include Including is unnecessary in most cases. Replace these instances. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191203100406.9674-5-tzimmermann@suse.de commit 5562085806718f19d5fbdf3bac35c971eaf0fefb Author: Thomas Zimmermann Date: Tue Dec 3 11:03:57 2019 +0100 drm/ast: Don't include Including is unnecessary in most cases. Replace these instances. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191203100406.9674-4-tzimmermann@suse.de commit 1be9d5f069964108125592af92304da76c5865bf Author: Thomas Zimmermann Date: Tue Dec 3 11:03:56 2019 +0100 drm/pci: Hide legacy PCI functions from non-legacy code Declarations of drm_legacy_pci_{init,exit}() are being moved to drm_legacy.h. CONFIG_DRM_LEGACY protects the implementation. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191203100406.9674-3-tzimmermann@suse.de commit 5c7a0bb0cffc47a76923192034f5a6ba17ede33a Author: Thomas Zimmermann Date: Tue Dec 3 11:03:55 2019 +0100 drm/pci: Only build drm_pci.c if CONFIG_PCI is set Non-PCI systems should not build PCI helpers. Set up source code, header file and Makefile accordingly. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20191203100406.9674-2-tzimmermann@suse.de commit 126d5de38542d47d5d8385ce374e33c2a7f34e51 Author: Chris Wilson Date: Wed Dec 4 18:06:28 2019 +0000 drm/i915/gem: Hook user-extensions upto MMAP_OFFSET_IOCTL Call i915_user_extensions() to validate the arg->extensions pointer, and so return consistent error numbers for the future. Signed-off-by: Chris Wilson Cc: Abdiel Janulgue Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191204162803.3841140-1-chris@chris-wilson.co.uk commit 780ccb5a5a43a7787b7cbdc49f7660232fd26aaf Author: Chris Wilson Date: Wed Dec 4 16:45:27 2019 +0000 drm/i915/gem: Hold the obj->vma.lock while walking the vma.list Remember to take the lock before walking the obj->vma.list so that the nodes do not change beneath us! E.g., i915_gem_object_bump_inactive_ggtt:387 GEM_BUG_ON(vma->vm != &i915->ggtt.vm) Closes: https://gitlab.freedesktop.org/drm/intel/issues/691 Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191204164527.3872783-1-chris@chris-wilson.co.uk commit aa5e4453dc055e188c792c3e5f1b256436332a59 Author: Chris Wilson Date: Wed Dec 4 12:35:56 2019 +0000 drm/i915/gem: Try to flush pending unbind events If we cannot handle a vma within the unbind loop, try to flush the pending events (i915_vma_parked, i915_vm_release) and try again. This avoids a round trip to userspace that is not guaranteed to make forward progress, as the events we wait upon require being idle. References: cb6c3d45f948 ("drm/i915/gem: Avoid parking the vma as we unbind") Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191204123556.3740002-1-chris@chris-wilson.co.uk commit cc662126b4134e25fcfb6cad480de0fa95a4d3d8 Author: Abdiel Janulgue Date: Wed Dec 4 12:00:32 2019 +0000 drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET This is really just an alias of mmap_gtt. The 'mmap offset' nomenclature comes from the value returned by this ioctl which is the offset into the device fd which userpace uses with mmap(2). mmap_gtt was our initial mmap_offset implementation, this extends our CPU mmap support to allow additional fault handlers that depends on the object's backing pages. Note that we multiplex mmap_gtt and mmap_offset through the same ioctl, and use the zero extending behaviour of drm to differentiate between them, when we inspect the flags. To support multiple mmap types on an object we need to support multiple mmap_offsets for an object (each offset in the global device address space corresponding to a unique instance of the object for a file + mmap type). As we drop the simplified drm core idea of a single mmap_offset, we need to provide replacement hooks for the dumb mmap interface as well. Link: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1675 Testcase: igt/gem_mmap_offset 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/20191204120032.3682839-1-chris@chris-wilson.co.uk commit c415ef2a267cdfda429bb519e651c82132ef89fa Author: Mao Wenan Date: Wed Dec 4 09:01:54 2019 +0800 drm/i915/perf: drop pointless static qualifier in i915_perf_add_config_ioctl() There is no need to have the 'T *v' variable static since new value always be assigned before use it. Reported-by: Hulk Robot Signed-off-by: Mao Wenan Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20191204010154.152396-1-maowenan@huawei.com commit cfdd174798334421a4648f6c5a1515c8526e8939 Author: Ville Syrjälä Date: Wed Nov 27 21:05:56 2019 +0200 drm/i915: Make intel_crtc_arm_fifo_underrun() functional on gen2 Assuming intel_crtc_arm_fifo_underrun() only gets called when there's no pending plane updates we can utilize it on gen2 by checking the active_planes bitmask so that we only re-enable underrun reporting if some planes are active. i915_fifo_underrun_reset_write() seems to have the necessary hw_done/flip_done waits in place. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127190556.1574-8-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 23526249fc4ef1810d3567ff52ed7606f3548517 Author: Ville Syrjälä Date: Wed Nov 27 21:05:55 2019 +0200 drm/i915: Nuke intel_pre_disable_primary_noatomic() Let's just inline intel_pre_disable_primary_noatomic() into intel_plane_disable_noatomic(). The CxSR disable we can do regardless of which plane we're disabling, and while at it we can make the gen2 underrun w/a accurate by consulting the active_planes bitmask. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127190556.1574-7-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 7181f5c5861013fc39fb51f3e8e804985d23250a Author: Ville Syrjälä Date: Wed Nov 27 21:05:54 2019 +0200 drm/i915: Clean up the gen2 "no planes -> underrun" workaround We have the active_planes bitmask now so use it to properly determine when some planes are visible for the gen2 underrun workaround. This let's us almost eliminate intel_post_enable_primary(). The manual underrun checks we can simply move into intel_atomic_commit_tail() since they loop over all the pipes already. No point in repeating the checks multiple times when there are multiple pipes in the commit. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127190556.1574-6-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit bee43ca4c1cc1ae2157a3aed34f033a7fcbf596b Author: Ville Syrjälä Date: Wed Nov 27 21:05:53 2019 +0200 drm/i915: Clean up intel_{pre,post}_plane_update() Change the calling convention to just pass the state+crtc and switch to intel_ types throughout. We'll also do a quick s/if (old_primary_state)/if (new_primary_state)/ so that we'll be able to eliminate old_primary_state later. This is fine since we always have either both old and new state or neither. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127190556.1574-5-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 0e75fb8c03aa430e88f1393ea089b881c7b86f5f Author: Ville Syrjälä Date: Wed Nov 27 21:05:52 2019 +0200 drm/i915: s/pipe_config/new_crtc_state/ intel_{pre,post}_plane_update() Replace the old world 'pipe_config' variable name with the new thing. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127190556.1574-4-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 60aca5741a695666218f8eefcd436e7dcc508552 Author: Ville Syrjälä Date: Wed Nov 27 21:05:51 2019 +0200 drm/i915: Pass dev_priv to ilk_disable_lp_wm() Get rid of another 'dev' usage by passing dev_priv instead. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127190556.1574-3-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit d2432796dc72cad9544207f22a219e61fddb5fcb Author: Ville Syrjälä Date: Wed Nov 27 21:05:50 2019 +0200 drm/i915: Clean up arguments to nv12/scaler w/a funcs Don't pass the redundant dev_priv to needs_nv12_wa() and needs_scalerclk_wa(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191127190556.1574-2-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 13bb5b99eca022902be508470c3092fcd08b93ed Author: Chris Wilson Date: Tue Dec 3 21:16:31 2019 +0000 drm/i915/gt: Set the PD again for Haswell And Haswell still occasionally forgets it is meant to be using a new page directory, so repeat ourselves a little louder. <7> [509.919864] heartbeat rcs0 heartbeat {prio:-2147483645} not ticking <7> [509.919895] heartbeat Awake? 8 <7> [509.919903] heartbeat Barriers?: no <7> [509.919912] heartbeat Heartbeat: 3008 ms ago <7> [509.919930] heartbeat Reset count: 0 (global 0) <7> [509.919937] heartbeat Requests: <7> [509.921008] heartbeat active a7eb:56e1* @ 5847ms: <7> [509.921157] heartbeat ring->start: 0x00001000 <7> [509.921164] heartbeat ring->head: 0x00001610 <7> [509.921170] heartbeat ring->tail: 0x000023d8 <7> [509.921176] heartbeat ring->emit: 0x000023d8 <7> [509.921182] heartbeat ring->space: 0x00002570 <7> [509.921189] heartbeat ring->hwsp: 0x7fffe100 <7> [509.921197] heartbeat [head 1628, postfix 1738, tail 1750, batch 0xffffffff_ffffffff]: <7> [509.921289] heartbeat [0000] 7a000002 00100002 00000000 00000000 7a000002 01154c1e 7ffff080 00000000 <7> [509.921299] heartbeat [0020] 11000001 00002220 ffffffff 12400001 00002220 7ffff000 00000000 11000001 <7> [509.921308] heartbeat [0040] 00002228 6e900000 7a000002 00100002 00000000 00000000 7a000002 01154c1e <7> [509.921317] heartbeat [0060] 7ffff080 00000000 12400001 00002228 7ffff000 00000000 7a000002 00100002 <7> [509.921326] heartbeat [0080] 00000000 00000000 7a000002 01154c1e 7ffff080 00000000 7a000002 001010a1 <7> [509.921335] heartbeat [00a0] 7ffff080 00000000 04000000 11000005 00022050 00010001 00012050 00010001 <7> [509.921345] heartbeat [00c0] 0001a050 00010001 00000000 0c000000 459a110c 00000000 11000005 00022050 <7> [509.921354] heartbeat [00e0] 00010000 00012050 00010000 0001a050 00010000 12400001 0001a050 7ffff000 <7> [509.921363] heartbeat [0100] 00000000 04000001 18802100 00000000 7a000002 011050a1 7fffe100 000056e1 <7> [509.921370] heartbeat [0120] 01000000 00000000 <7> [509.921538] heartbeat MMIO base: 0x00002000 <7> [509.921682] heartbeat CCID: 0x3fa0110d <7> [509.922342] heartbeat RING_START: 0x00001000 <7> [509.922353] heartbeat RING_HEAD: 0x00001628 <7> [509.922366] heartbeat RING_TAIL: 0x000023d8 <7> [509.922381] heartbeat RING_CTL: 0x00003001 <7> [509.922396] heartbeat RING_MODE: 0x00004000 <7> [509.922408] heartbeat RING_IMR: ffffffde <7> [509.922421] heartbeat ACTHD: 0x00000000_30e01628 <7> [509.922434] heartbeat BBADDR: 0x00000000_00004004 <7> [509.922446] heartbeat DMA_FADDR: 0x00000000_00002800 <7> [509.922458] heartbeat IPEIR: 0x00000000 <7> [509.922470] heartbeat IPEHR: 0x780c0000 <7> [509.922642] heartbeat PP_DIR_BASE: 0x6e700000 <7> [509.922652] heartbeat PP_DIR_BASE_READ: 0x00000000 <7> [509.922662] heartbeat PP_DIR_DCLV: 0xffffffff <7> [509.922678] heartbeat E a7eb:56e1* @ 5849ms: <7> [509.922689] heartbeat E a7eb:56e2- @ 5849ms: <7> [509.922698] heartbeat E a7eb:56e3 @ 5848ms: <7> [509.922707] heartbeat E a7eb:56e4 @ 5848ms: <7> [509.922715] heartbeat E a7eb:56e5 @ 5847ms: <7> [509.922724] heartbeat E a7eb:56e6 @ 5846ms: <7> [509.922735] heartbeat E a7eb:56e7 @ 5846ms: <7> [509.922744] heartbeat ...skipping 4 executing requests... <7> [509.922754] heartbeat E a7eb:56ec @ 3010ms: <7> [509.922796] heartbeat HWSP: <7> [509.922807] heartbeat [0000] 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <7> [509.922817] heartbeat [0020] 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <7> [509.922826] heartbeat * <7> [509.922836] heartbeat [0100] 000056e0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <7> [509.922845] heartbeat [0120] 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 <7> [509.922851] heartbeat * <7> [509.922870] heartbeat Idle? no <7> [509.922878] heartbeat Signals: <7> [509.923000] heartbeat [a7eb:56e2] @ 5850ms Here, we have a failed context restore after the PD switch, but note that the PP_DIR_BASE register does not match the LRI in the ring. Bump it to 8^W 4 loops, and with that Baytrail starts passing the sanity checks. Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191203211631.3167430-1-chris@chris-wilson.co.uk commit f1f4fab57241b180c70567922942b39d6b830f43 Author: Alex Deucher Date: Tue Nov 26 09:41:46 2019 -0500 drm/radeon: fix r1xx/r2xx register checker for POT textures Shift and mask were reversed. Noticed by chance. Tested-by: Meelis Roos Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 3e0c55f3b7be18d6bcd70b489594d54c7f9f081a Author: Zhan Liu Date: Tue Dec 3 12:46:01 2019 -0500 drm/amd/display: Loading NV10/14 Bounding Box Data Directly From Code [Why] NV10/14 has released. Its time to get NV10/14 bounding box directly from code. [How] Retrieve NV10/14 bounding box data directly from code. Signed-off-by: Zhan Liu Reviewed-by: Hersen Wu Signed-off-by: Alex Deucher commit cb6c3d45f948f8f184687a23fea30017d01e892f Author: Chris Wilson Date: Tue Dec 3 15:50:32 2019 +0000 drm/i915/gem: Avoid parking the vma as we unbind In order to avoid keeping a reference on the i915_vma (which is long overdue!) we have to coordinate all the possible lifetimes and only use the vma while we know it is alive. In this episode, we are reminded that while idle, the closed vma are destroyed. So if the GT idles while we are working with the vma, the vma itself becomes invalid. First class i915_vma here we come, but in the meantime keep piling on the straw. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191203155032.3137263-1-chris@chris-wilson.co.uk commit 78eaaba3cd786718f6ed0c9013879d3c11a00998 Author: José Roberto de Souza Date: Mon Dec 2 14:25:13 2019 -0800 drm/i915/display/mst: Move DPMS_OFF call to post_disable Moving just to simplify handling as there is no change in behavior. Cc: Lucas De Marchi Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191202222513.337777-3-jose.souza@intel.com commit 50a7efb280a8f13a4cfdfd5f921f53925a09a09a Author: José Roberto de Souza Date: Mon Dec 2 14:25:12 2019 -0800 drm/i915/dp: Power down sink before disable pipe/transcoder clock Disabling pipe/transcoder clock before power down sink could cause sink lost signal, causing it to trigger a hotplug to notify source that link signal was lost. Cc: Lucas De Marchi Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191202222513.337777-2-jose.souza@intel.com commit e815aff59dcf3f4aaf7ca061b07c0a6ef63f2351 Author: José Roberto de Souza Date: Mon Dec 2 14:25:11 2019 -0800 drm/i915/display: Check the old state to find port sync slave If the CRTC is going from enabled to disabled and it is a port sync slave, it needs to check to the old state to be disabled before the port sync master. Cc: Manasi Navare Cc: Matt Roper Cc: Maarten Lankhorst Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191202222513.337777-1-jose.souza@intel.com commit a3265d851e28a5d87bf20edf025d7da3d21a760c Author: Matt Roper Date: Mon Dec 2 09:16:08 2019 -0800 drm/i915/irq: Refactor gen11 display interrupt handling Let's move handling and reset for gen11 display IRQs to their own functions, similar to how we deal with GT interrupts. This will make the top-level functions a bit easier to read and potentially make things easier to deal with in the future if new platforms wind up needing different display handling logic. Cc: Lucas De Marchi Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191202171608.3361125-1-matthew.d.roper@intel.com Reviewed-by: Radhakrishna Sripada commit 99a375519eeaac617a0d5859d5a987049d548f59 Author: Linus Walleij Date: Tue Dec 3 16:26:55 2019 +0100 drm/panel: rpi: Drop unused GPIO includes The Rpi panel driver doesn't use any symbols from these GPIO includes so just drop them. Cc: Eric Anholt Signed-off-by: Linus Walleij Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191203152655.159281-1-linus.walleij@linaro.org commit f70de8d2ca6be552fbdc40d434ad471ae20b7cae Author: Chris Wilson Date: Tue Dec 3 12:41:55 2019 +0000 drm/i915/gt: Track the context validity explicitly Rather than assume if and only if the engine->default_state is not set that the context is invalid, instead track when we know the context has valid state -- either because we have copied the default_state or we have completed a context switch to save the HW state. Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191203124155.3019926-1-chris@chris-wilson.co.uk commit 8dc056ef0b358f7e0d6a973fe524a9031e659139 Author: Benjamin Gaignard Date: Tue Nov 19 13:58:05 2019 +0100 drm/crtc-helper: drm_connector_get_single_encoder prototype is missing Include drm_crtc_helper_internal.h to provide drm_connector_get_single_encoder prototype. Signed-off-by: Benjamin Gaignard Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191119125805.4266-1-benjamin.gaignard@st.com commit 6dcab16b4118b3ef3bcefdf67d7c010aeb90a644 Author: Yong Zhao Date: Mon Dec 2 23:12:10 2019 -0500 drm/amdkfd: Contain MMHUB number in mmhub_v9_4_setup_vm_pt_regs() Adjust the exposed function prototype so that the caller does not need to know the MMHUB number. Signed-off-by: Yong Zhao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f275cde7066a27ab7afa0a1d95390dbf237726a2 Author: Likun Gao Date: Mon Dec 2 15:04:35 2019 +0800 drm/amdgpu/powerplay: unify smu send message function Drop smu_send_smc_msg function from ASIC specify structure. Reuse smu_send_smc_msg_with_param function for smu_send_smc_msg. Set paramer to 0 for smu_send_msg function, otherwise it will send with previous paramer value (Not a certain value). Materialize msg type for smu send message function definition. Signed-off-by: Likun Gao Reviewed-by: Kevin Wang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 7091b60cadae8353866084f3d2d61affa66f6473 Author: Hawking Zhang Date: Mon Dec 2 13:44:38 2019 +0800 drm/amdgpu: load np fw prior before loading the TAs Platform TAs will independently toggle DF Cstate. for instance, get/set topology from xgmi ta. do error injection from ras ta. In such case, PMFW needs to be loaded before TAs so that all the subsequent Cstate calls recieved by PSP FW can be routed to PMFW. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 71e5f0cb936526d4f84a1353e8174a45eeab747b Author: Hawking Zhang Date: Mon Dec 2 13:37:42 2019 +0800 drm/amdgpu: unload asd in psp hw de-init phase issue unload_ta_cmd to tOS to unload asd driver Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Acked-by: Evan Quan Signed-off-by: Alex Deucher commit c64ab8280e61fa55543de9dced87043814b44024 Author: Hawking Zhang Date: Mon Dec 2 13:16:09 2019 +0800 drm/amdgpu: drop asd shared memory asd shared memory is not needed since drivers doesn't invoke any further cmd to asd directly after the asd loading. trust application is the one who needs to talk to asd after the initialization Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 96358810c66a35b15303c4c2dd0ee48f223c221e Author: Jack Zhang Date: Mon Dec 2 18:41:36 2019 +0800 amd/amdgpu/sriov swSMU disable for sriov For boards greater than ARCTURUS, and under sriov platform, swSMU is not supported because smu ip block is commented at guest driver. Generally for sriov, initialization of smu is moved to host driver. Thus, smu sw_init and hw_init will not be executed at guest driver. Without sw structure being initialized in guest driver, swSMU cannot declare to be supported. Signed-off-by: Jack Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 49e74c8f9ae635a1c87fab06966da4c713cf9d63 Author: Chris Wilson Date: Tue Dec 3 15:26:31 2019 +0000 drm/i915/execlists: Skip nested spinlock for validating pending Only along the submission path can we guarantee that the locked request is indeed from a foreign engine, and so the nesting of engine/rq is permissible. On the submission tasklet (process_csb()), we may find ourselves competing with the normal nesting of rq/engine, invalidating our nesting. As we only use the spinlock for debug purposes, skip the debug if we cannot acquire the spinlock for safe validation - catching 99% of the bugs is better than causing a hard lockup. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Fixes: c95d31c3df1b ("drm/i915/execlists: Lock the request while validating it during promotion") Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191203152631.3107653-2-chris@chris-wilson.co.uk commit 80aac91b27e130566ba529162021ff47086efca7 Author: Chris Wilson Date: Tue Dec 3 15:26:30 2019 +0000 drm/i915/execlists: Add a couple more validity checks to assert_pending() Check the pending request submission is valid: that it at least has a reference for the submission and that the request is on the active list. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191203152631.3107653-1-chris@chris-wilson.co.uk commit 42d105113018a5c1bd2c86897b1737adf16b3f5f Author: Chris Wilson Date: Mon Dec 2 20:43:14 2019 +0000 drm/i915: Lift i915_vma_pin() out of intel_renderstate_emit() Once inside a request, inside the timeline->mutex, pinning is verboten. <4> [896.032829] ====================================================== <4> [896.032831] WARNING: possible circular locking dependency detected <4> [896.032835] 5.4.0-rc8-CI-Patchwork_15533+ #1 Tainted: G U <4> [896.032838] ------------------------------------------------------ <4> [896.032841] gem_exec_parall/3720 is trying to acquire lock: <4> [896.032844] ffff888401863270 (&kernel#2){+.+.}, at: i915_request_create+0x16/0x1c0 [i915] <4> [896.032915] but task is already holding lock: <4> [896.032917] ffff8883ec1c93c0 (&vm->mutex){+.+.}, at: i915_vma_pin+0xf3/0x11c0 [i915] <4> [896.032952] which lock already depends on the new lock. <4> [896.032954] the existing dependency chain (in reverse order) is: <4> [896.032956] -> #1 (&vm->mutex){+.+.}: <4> [896.032961] __mutex_lock+0x9a/0x9d0 <4> [896.032995] i915_vma_pin+0xf3/0x11c0 [i915] <4> [896.033033] intel_renderstate_emit+0xb9/0x9e0 [i915] <4> [896.033081] i915_gem_init+0x5a9/0xa50 [i915] <4> [896.033112] i915_driver_probe+0xb00/0x15f0 [i915] <4> [896.033144] i915_pci_probe+0x43/0x1c0 [i915] <4> [896.033149] pci_device_probe+0x9e/0x120 <4> [896.033154] really_probe+0xea/0x420 <4> [896.033158] driver_probe_device+0x10b/0x120 <4> [896.033161] device_driver_attach+0x4a/0x50 <4> [896.033164] __driver_attach+0x97/0x130 <4> [896.033168] bus_for_each_dev+0x74/0xc0 <4> [896.033171] bus_add_driver+0x142/0x220 <4> [896.033174] driver_register+0x56/0xf0 <4> [896.033178] do_one_initcall+0x58/0x2ff <4> [896.033183] do_init_module+0x56/0x1f8 <4> [896.033187] load_module+0x243e/0x29f0 <4> [896.033190] __do_sys_finit_module+0xe9/0x110 <4> [896.033194] do_syscall_64+0x4f/0x210 <4> [896.033197] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4> [896.033200] -> #0 (&kernel#2){+.+.}: <4> [896.033206] __lock_acquire+0x1328/0x15d0 <4> [896.033209] lock_acquire+0xa7/0x1c0 <4> [896.033213] __mutex_lock+0x9a/0x9d0 <4> [896.033255] i915_request_create+0x16/0x1c0 [i915] <4> [896.033287] intel_engine_flush_barriers+0x4c/0x100 [i915] <4> [896.033327] ggtt_flush+0x37/0x60 [i915] <4> [896.033366] i915_gem_evict_something+0x46b/0x5a0 [i915] <4> [896.033407] i915_gem_gtt_insert+0x21d/0x6a0 [i915] <4> [896.033449] i915_vma_pin+0xb36/0x11c0 [i915] <4> [896.033488] gen6_ppgtt_pin+0xd5/0x170 [i915] <4> [896.033523] ring_context_pin+0x2e/0xc0 [i915] <4> [896.033554] __intel_context_do_pin+0x6b/0x190 [i915] <4> [896.033591] i915_gem_do_execbuffer+0x1814/0x26c0 [i915] <4> [896.033627] i915_gem_execbuffer2_ioctl+0x11b/0x460 [i915] <4> [896.033632] drm_ioctl_kernel+0xa7/0xf0 <4> [896.033635] drm_ioctl+0x2e1/0x390 <4> [896.033638] do_vfs_ioctl+0xa0/0x6f0 <4> [896.033641] ksys_ioctl+0x35/0x60 <4> [896.033644] __x64_sys_ioctl+0x11/0x20 <4> [896.033647] do_syscall_64+0x4f/0x210 <4> [896.033650] entry_SYSCALL_64_after_hwframe+0x49/0xbe Lift the object allocation and pin prior to the request construction. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Maarten Lankhorst Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191202204316.2665847-1-chris@chris-wilson.co.uk commit 3e817471a34cf94ca6edbb2e0b1076e6209153e2 Author: Chris Wilson Date: Tue Dec 3 10:13:46 2019 +0000 drm/i915/gem: Take runtime-pm wakeref prior to unbinding Some machines require ACPI for runtime resume, and ACPI is quite kmalloc happy. We cannot handle kmalloc from inside the vm->mutex, as they are used by the shrinker, and so we must ensure the global runtime-pm is awake prior to unbinding to avoid the potential inversion. <4> [57.121748] ====================================================== <4> [57.121750] WARNING: possible circular locking dependency detected <4> [57.121753] 5.4.0-rc8-CI-CI_DRM_7466+ #1 Tainted: G U <4> [57.121754] ------------------------------------------------------ <4> [57.121756] i915_pm_rpm/1105 is trying to acquire lock: <4> [57.121758] ffffffff82263a40 (fs_reclaim){+.+.}, at: fs_reclaim_acquire.part.117+0x0/0x30 <4> [57.121766] but task is already holding lock: <4> [57.121768] ffff888475a593c0 (&vm->mutex){+.+.}, at: i915_vma_unbind+0x21/0x50 [i915] <4> [57.121868] which lock already depends on the new lock. <4> [57.121869] the existing dependency chain (in reverse order) is: <4> [57.121871] -> #1 (&vm->mutex){+.+.}: <4> [57.121951] i915_gem_shrinker_taints_mutex+0xa2/0xd0 [i915] <4> [57.122028] i915_address_space_init+0xa9/0x170 [i915] <4> [57.122104] i915_ggtt_init_hw+0x47/0x130 [i915] <4> [57.122150] i915_driver_probe+0xbb4/0x15f0 [i915] <4> [57.122197] i915_pci_probe+0x43/0x1c0 [i915] <4> [57.122202] pci_device_probe+0x9e/0x120 <4> [57.122206] really_probe+0xea/0x420 <4> [57.122209] driver_probe_device+0x10b/0x120 <4> [57.122212] device_driver_attach+0x4a/0x50 <4> [57.122214] __driver_attach+0x97/0x130 <4> [57.122217] bus_for_each_dev+0x74/0xc0 <4> [57.122220] bus_add_driver+0x142/0x220 <4> [57.122222] driver_register+0x56/0xf0 <4> [57.122226] do_one_initcall+0x58/0x2ff <4> [57.122230] do_init_module+0x56/0x1f8 <4> [57.122233] load_module+0x243e/0x29f0 <4> [57.122236] __do_sys_finit_module+0xe9/0x110 <4> [57.122239] do_syscall_64+0x4f/0x210 <4> [57.122242] entry_SYSCALL_64_after_hwframe+0x49/0xbe <4> [57.122244] -> #0 (fs_reclaim){+.+.}: <4> [57.122249] __lock_acquire+0x1328/0x15d0 <4> [57.122251] lock_acquire+0xa7/0x1c0 <4> [57.122254] fs_reclaim_acquire.part.117+0x24/0x30 <4> [57.122257] __kmalloc+0x48/0x320 <4> [57.122261] acpi_ns_internalize_name+0x44/0x9b <4> [57.122264] acpi_ns_get_node_unlocked+0x6b/0xd3 <4> [57.122267] acpi_ns_get_node+0x3b/0x50 <4> [57.122271] acpi_get_handle+0x8a/0xb4 <4> [57.122274] acpi_has_method+0x1c/0x40 <4> [57.122278] acpi_pci_set_power_state+0x40/0xe0 <4> [57.122281] pci_platform_power_transition+0x3e/0x90 <4> [57.122284] pci_set_power_state+0x83/0xf0 <4> [57.122287] pci_restore_standard_config+0x22/0x40 <4> [57.122289] pci_pm_runtime_resume+0x23/0xc0 <4> [57.122293] __rpm_callback+0xb1/0x110 <4> [57.122296] rpm_callback+0x1a/0x70 <4> [57.122299] rpm_resume+0x50e/0x790 <4> [57.122302] __pm_runtime_resume+0x42/0x80 <4> [57.122357] __intel_runtime_pm_get+0x15/0x60 [i915] <4> [57.122435] ggtt_unbind_vma+0x24/0x60 [i915] <4> [57.122514] __i915_vma_unbind.part.39+0xb5/0x500 [i915] <4> [57.122593] i915_vma_unbind+0x2d/0x50 [i915] <4> [57.122668] i915_gem_object_unbind+0x11c/0x260 [i915] <4> [57.122740] i915_gem_object_set_cache_level+0x32/0x90 [i915] <4> [57.122810] i915_gem_set_caching_ioctl+0x1f7/0x2f0 [i915] <4> [57.122815] drm_ioctl_kernel+0xa7/0xf0 <4> [57.122818] drm_ioctl+0x2e1/0x390 <4> [57.122822] do_vfs_ioctl+0xa0/0x6f0 <4> [57.122825] ksys_ioctl+0x35/0x60 <4> [57.122828] __x64_sys_ioctl+0x11/0x20 <4> [57.122830] do_syscall_64+0x4f/0x210 <4> [57.122833] entry_SYSCALL_64_after_hwframe+0x49/0xbe Closes: https://gitlab.freedesktop.org/drm/intel/issues/711 Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191203101347.2836057-1-chris@chris-wilson.co.uk commit e933bedd45099dce1165104138bb703a6e31df82 Author: Dmitry Torokhov Date: Thu Nov 7 20:22:24 2019 -0800 software node: remove separate handling of references Now that all users of references have moved to reference properties, we can remove separate handling of references. Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki commit 53c24c2932e5446dafda3347b9c290c2b87a3abd Author: Dmitry Torokhov Date: Thu Nov 7 20:22:23 2019 -0800 platform/x86: intel_cht_int33fe: use inline reference properties Now that static device properties allow defining reference properties together with all other types of properties, instead of managing them separately, let's adjust the driver. Acked-by: Andy Shevchenko Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki commit e64b674bc9d76edb4cf1b8c98446b1d29a16b9df Author: Dmitry Torokhov Date: Thu Nov 7 20:22:22 2019 -0800 software node: implement reference properties It is possible to store references to software nodes in the same fashion as other static properties, so that users do not need to define separate structures: static const struct software_node gpio_bank_b_node = { .name = "B", }; static const struct property_entry simone_key_enter_props[] = { PROPERTY_ENTRY_U32("linux,code", KEY_ENTER), PROPERTY_ENTRY_STRING("label", "enter"), PROPERTY_ENTRY_REF("gpios", &gpio_bank_b_node, 123, GPIO_ACTIVE_LOW), { } }; Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki commit 996b0830f95d132e50891a5568fef9e2965e4af2 Author: Dmitry Torokhov Date: Thu Nov 7 20:22:21 2019 -0800 software node: allow embedding of small arrays into property_entry We should not conflate whether a property data is an array or a single value with where it is stored (embedded into property_entry structure or out-of-line). All single-value properties are in effect 1-element arrays, and we can figure the amount of data stored in a property by examining its length and the data type. And arrays can be as easily stored in property entry instances as single values are, provided that we have enough space (we have up to 8 bytes). We can embed: - up to 8 bytes from U8 arrays - up to 4 words - up to 2 double words - one U64 value - one (on 64 bit architectures) or 2 (on 32 bit) strings. This change also has an effect of switching properties with small amount of data to embed it instead of keeping it separate when copying such properties. Signed-off-by: Dmitry Torokhov Signed-off-by: Rafael J. Wysocki commit e6bff4665c595b5a4aff173848851ed49ac3bfad Author: Dmitry Torokhov Date: Thu Nov 7 20:22:20 2019 -0800 software node: replace is_array with is_inline We do not need a special flag to know if we are dealing with an array, as we can get that data from ratio between element length and the data size, but we do need a flag to know whether or not the data is stored directly inside property_entry. Signed-off-by: Dmitry Torokhov [ rjw: Subject & changelog, struct property_entry kerneldoc ] Signed-off-by: Rafael J. Wysocki commit e67efd45d6529be2e1a0c1a2c740420c7adeee32 Author: Jani Nikula Date: Fri Nov 29 12:29:37 2019 +0200 video: omapfb: use const pointer for fb_ops Use const for fb_ops to let us make the info->fbops pointer const in the future. Cc: linux-fbdev@vger.kernel.org Cc: linux-omap@vger.kernel.org Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/dfa4376e219ffeef9175993eaff91b5fe7ecccab.1575022735.git.jani.nikula@intel.com commit f23c57e290774cd4f721801061345d351b9b601f Author: Jani Nikula Date: Fri Nov 29 12:29:36 2019 +0200 video: fbmem: use const pointer for fb_ops Use const for fb_ops to let us make the info->fbops pointer const in the future. v2: rebase Cc: linux-fbdev@vger.kernel.org Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/3a27f95b424a67b3542b5906c660741daf1d4ea6.1575022735.git.jani.nikula@intel.com commit 80b2976efa865941831459b50ca333701e2a7d29 Author: Jani Nikula Date: Fri Nov 29 12:29:35 2019 +0200 video: fbdev: vesafb: modify the static fb_ops directly Avoid modifying the fb_ops via info->fbops to let us make the pointer const in the future. Cc: linux-fbdev@vger.kernel.org Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/9e34c1d9a81690cbd75af7969fc4baf60a64b13f.1575022735.git.jani.nikula@intel.com commit f1844af349c730b159dd78cc76da2978c49fafd0 Author: Jani Nikula Date: Fri Nov 29 12:29:34 2019 +0200 video: udlfb: don't restore fb_mmap after deferred IO cleanup Deferred IO now preserves the fb_ops. Cc: Bernie Thompson Cc: linux-fbdev@vger.kernel.org Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/0f12bb51a6f2a656571cd21230b7e9d5be320db4.1575022735.git.jani.nikula@intel.com commit 822f82fbc0b1d931e8cc63913e8d8a90bcf0ced6 Author: Jani Nikula Date: Fri Nov 29 12:29:33 2019 +0200 video: smscufx: don't restore fb_mmap after deferred IO cleanup Deferred IO now preserves the fb_ops. Cc: Steve Glendinning Cc: linux-fbdev@vger.kernel.org Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/480dcc682481e6972e5648181d7e92120929ec6b.1575022735.git.jani.nikula@intel.com commit 577780752aef13c1592b86b78584fac75f432a60 Author: Jani Nikula Date: Fri Nov 29 12:29:32 2019 +0200 drm/fb-helper: don't preserve fb_ops across deferred IO use Deferred IO now preserves the fb_ops. v2: Remove the no-op vfree, drop a local var (Noralf) Cc: Noralf Trønnes Cc: dri-devel@lists.freedesktop.org Reviewed-by: Daniel Vetter Reviewed-by: Noralf Trønnes Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1eae0b23d4724d5702b886b6a061ec8219eb9284.1575022735.git.jani.nikula@intel.com commit 12281c8dda5a3b47008bd6a6db6645995234b4e1 Author: Jani Nikula Date: Fri Nov 29 12:29:31 2019 +0200 video: fb_defio: preserve user fb_ops Modifying fb_ops directly to override fb_mmap with fb_deferred_io_mmap and then resetting it to NULL afterwards causes problems all over the place. First, it prevents making the fbops member of struct fb_info a const pointer, which means we can't make struct fb_ops const anywhere. Second, a few places have to go out of their way to restore the original fb_mmap pointer that gets reset to NULL. Since the only user of the fbops->fb_mmap hook is fb_mmap() in fbmem.c, call fb_deferred_io_mmap() directly when deferred IO is enabled, and avoid modifying fb_ops altogether. Simply use info->fbdefio to determine whether deferred IO should be used or not. This should be accurate enough for all use cases, although perhaps not pedantically correct. v2: Simplify considerably by calling fb_deferred_io_mmap() directly (Daniel, Ville) Cc: Jaya Kumar Cc: linux-fbdev@vger.kernel.org Cc: Daniel Vetter Cc: Ville Syrjälä Acked-by: Noralf Trønnes Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/022c82429da15d6450ff9ac1a897322ec3124db4.1575022735.git.jani.nikula@intel.com commit a501e22c8e36934b2d901b039b1c59c948886c90 Author: Colin Ian King Date: Mon Dec 2 15:47:38 2019 +0000 drm/amd/display: remove redundant assignment to variable v_total The variable v_total 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 f7a8b4739d94f05d4bb84b62d43157dd1bc3bc32 Author: zhengbin Date: Thu Nov 28 10:31:40 2019 +0800 drm/amd/display: Remove unneeded semicolon in display_rq_dlg_calc_21.c Fixes coccicheck warning: drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:1525:144-145: Unneeded semicolon drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:1526:142-143: Unneeded semicolon Reviewed-by: Harry Wentland Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 2fd4f169030a4e735af556b14586c54298acc457 Author: zhengbin Date: Thu Nov 28 10:31:39 2019 +0800 drm/amd/display: Remove unneeded semicolon in hdcp.c Fixes coccicheck warning: drivers/gpu/drm/amd/display/modules/hdcp/hdcp.c:506:2-3: Unneeded semicolon Reviewed-by: Harry Wentland Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit c09f5e000d1e96de95da1aae2ce7ba25d3d207a7 Author: zhengbin Date: Thu Nov 28 10:31:38 2019 +0800 drm/amd/display: Remove unneeded semicolon in bios_parser2.c Fixes coccicheck warning: drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c:995:2-3: Unneeded semicolon Reviewed-by: Harry Wentland Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 4c56feac0d47b0cf620a8f2e62c1c9cda8e22e54 Author: zhengbin Date: Thu Nov 28 10:31:37 2019 +0800 drm/amd/display: Remove unneeded semicolon in bios_parser.c Fixes coccicheck warning: drivers/gpu/drm/amd/display/dc/bios/bios_parser.c:2192:2-3: Unneeded semicolon Reviewed-by: Harry Wentland Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit c7d5dfa88bc4e5a05d664eff04f6981f9fdf872d Author: zhengbin Date: Wed Nov 27 17:33:42 2019 +0800 drm/amd/powerplay: Remove unneeded variable 'ret' in amdgpu_smu.c Fixes coccicheck warning: drivers/gpu/drm/amd/powerplay/amdgpu_smu.c:1192:5-8: Unneeded variable: "ret". Return "0" on line 1195 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c:1945:5-8: Unneeded variable: "ret". Return "0" on line 1961 Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 3d218c31843ef27faf5a9169bf4176651216fd77 Author: zhengbin Date: Wed Nov 27 17:33:41 2019 +0800 drm/amd/powerplay: Remove unneeded variable 'result' in vega12_hwmgr.c Fixes coccicheck warning: drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c:502:5-11: Unneeded variable: "result". Return "0" on line 515 Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 7bb4b887d0f4161076c77e72b92af4f9d44c4269 Author: zhengbin Date: Wed Nov 27 17:33:40 2019 +0800 drm/amd/powerplay: Remove unneeded variable 'ret' in smu7_hwmgr.c Fixes coccicheck warning: drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:5188:5-8: Unneeded variable: "ret". Return "0" on line 5196 Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 98ce837d7b67bbd992f93f3489a300aa93fa41b3 Author: zhengbin Date: Wed Nov 27 17:33:39 2019 +0800 drm/amd/powerplay: Remove unneeded variable 'result' in vega10_hwmgr.c Fixes coccicheck warning: drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c:4363:5-11: Unneeded variable: "result". Return "0" on line 4370 Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit 9c9290fa3ce16e0d81d89a7e82005cbf094d92d9 Author: zhengbin Date: Wed Nov 27 17:33:38 2019 +0800 drm/amd/powerplay: Remove unneeded variable 'result' in smu10_hwmgr.c Fixes coccicheck warning: drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c:1154:5-11: Unneeded variable: "result". Return "0" on line 1159 Reported-by: Hulk Robot Signed-off-by: zhengbin Signed-off-by: Alex Deucher commit f706ec87ea4cd193b772a85ff66a693520dbf12d Author: Colin Ian King Date: Wed Nov 20 17:22:42 2019 +0000 drm/amd/display: fix double assignment to msg_id field The msg_id field is being assigned twice. Fix this by replacing the second assignment with an assignment to msg_size. Addresses-Coverity: ("Unused value") Fixes: 11a00965d261 ("drm/amd/display: Add PSP block to verify HDCP2.2 steps") Reviewed-by: Harry Wentland Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 0e29be9e0bbbf9cb3d718c5c48382b1420ce0749 Author: Alex Deucher Date: Fri Nov 15 10:02:44 2019 -0500 drm/amd/display: re-enable wait in pipelock, but add timeout Removing this causes hangs in some games, so re-add it, but add a timeout so we don't hang while switching flip types. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=205169 Bug: https://bugs.freedesktop.org/show_bug.cgi?id=112266 Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 72b741af22d4e3dbce8a71bfd5d406b2b38ee058 Author: Zhan liu Date: Mon Dec 2 15:12:27 2019 -0500 drm/amd/display: Get NV14 specific ip params as needed [Why] NV14 is using its own ip params that's different from other DCN2.0 ASICs. [How] Add ASIC revision check to make sure NV14 gets correct ip params. Signed-off-by: Zhan Liu Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit a2c63407316cb01d1de5c0eb4177eae8b977327b Author: Zhan liu Date: Mon Dec 2 14:54:16 2019 -0500 drm/amd/display: Adding NV14 IP Parameters [Why] NV14 IP Parameters are missing. [How] Add IP Parameters in. Signed-off-by: Zhan liu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 0ea203a91247082f1294e6aa6e7802914665da50 Author: Emily Deng Date: Tue Dec 3 01:53:10 2019 +0800 drm/amdgpu/sriov: No need the event 3 and 4 now As will call unload kms when initialize fail, and the unload kms will send event 3 and 4, so don't need event 3 and 4 in device init. Signed-off-by: Emily Deng Reviewed-by: Zhan Liu Signed-off-by: Alex Deucher commit 031514956bd06156897b54a80db66acf7c1d9ebd Author: John Clements Date: Mon Dec 2 17:57:25 2019 +0800 drm/amdgpu: Added ASIC specific checks in gfxhub V1.1 get XGMI info Added max hive/node info checks per supported ASIC Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit a7f4ba7a6c2f0962a0db37743586c1e4a95ca72d Author: Bhawanpreet Lakha Date: Fri Nov 8 16:57:21 2019 -0500 drm/amd/display: Load TA firmware for navi10/12/14 load the ta firmware for navi10/12/14. This is already being done for raven/picasso and is needed for supporting hdcp on navi Signed-off-by: Bhawanpreet Lakha Acked-by: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 7c868b592d5c2c9d54c8ab92624efcf2d3d41bc6 Author: Yintian Tao Date: Fri Nov 29 16:05:55 2019 +0800 drm/amdgpu: not remove sysfs if not create sysfs When load amdgpu failed before create pm_sysfs and ucode_sysfs, the pm_sysfs and ucode_sysfs should not be removed. Otherwise, there will be warning call trace just like below. [ 24.836386] [drm] VCE initialized successfully. [ 24.841352] amdgpu 0000:00:07.0: amdgpu_device_ip_init failed [ 25.370383] amdgpu 0000:00:07.0: Fatal error during GPU init [ 25.889575] [drm] amdgpu: finishing device. [ 26.069128] amdgpu 0000:00:07.0: [drm:amdgpu_ring_test_helper [amdgpu]] *ERROR* ring kiq_2.1.0 test failed (-110) [ 26.070110] [drm:gfx_v9_0_hw_fini [amdgpu]] *ERROR* KCQ disable failed [ 26.200309] [TTM] Finalizing pool allocator [ 26.200314] [TTM] Finalizing DMA pool allocator [ 26.200349] [TTM] Zone kernel: Used memory at exit: 0 KiB [ 26.200351] [TTM] Zone dma32: Used memory at exit: 0 KiB [ 26.200353] [drm] amdgpu: ttm finalized [ 26.205329] ------------[ cut here ]------------ [ 26.205330] sysfs group 'fw_version' not found for kobject '0000:00:07.0' [ 26.205347] WARNING: CPU: 0 PID: 1228 at fs/sysfs/group.c:256 sysfs_remove_group+0x80/0x90 [ 26.205348] Modules linked in: amdgpu(OE+) gpu_sched(OE) ttm(OE) drm_kms_helper(OE) drm(OE) i2c_algo_bit fb_sys_fops syscopyarea sysfillrect sysimgblt rpcsec_gss_krb5 auth_rpcgss nfsv4 nfs lockd grace fscache binfmt_misc snd_hda_codec_generic ledtrig_audio crct10dif_pclmul snd_hda_intel crc32_pclmul snd_hda_codec ghash_clmulni_intel snd_hda_core snd_hwdep snd_pcm snd_timer input_leds snd joydev soundcore serio_raw pcspkr evbug aesni_intel aes_x86_64 crypto_simd cryptd mac_hid glue_helper sunrpc ip_tables x_tables autofs4 8139too psmouse 8139cp mii i2c_piix4 pata_acpi floppy [ 26.205369] CPU: 0 PID: 1228 Comm: modprobe Tainted: G OE 5.2.0-rc1 #1 [ 26.205370] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 [ 26.205372] RIP: 0010:sysfs_remove_group+0x80/0x90 [ 26.205374] Code: e8 35 b9 ff ff 5b 41 5c 41 5d 5d c3 48 89 df e8 f6 b5 ff ff eb c6 49 8b 55 00 49 8b 34 24 48 c7 c7 48 7a 70 98 e8 60 63 d3 ff <0f> 0b eb d7 66 90 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 [ 26.205375] RSP: 0018:ffffbee242b0b908 EFLAGS: 00010282 [ 26.205376] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000006 [ 26.205377] RDX: 0000000000000007 RSI: 0000000000000092 RDI: ffff97ad6f817380 [ 26.205377] RBP: ffffbee242b0b920 R08: ffffffff98f520c4 R09: 00000000000002b3 [ 26.205378] R10: ffffbee242b0b8f8 R11: 00000000000002b3 R12: ffffffffc0e58240 [ 26.205379] R13: ffff97ad6d1fe0b0 R14: ffff97ad4db954c8 R15: ffff97ad4db7fff0 [ 26.205380] FS: 00007ff3d8a1c4c0(0000) GS:ffff97ad6f800000(0000) knlGS:0000000000000000 [ 26.205381] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 26.205381] CR2: 00007f9b2ef1df04 CR3: 000000042aab8001 CR4: 00000000003606f0 [ 26.205384] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 26.205385] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 26.205385] Call Trace: [ 26.205461] amdgpu_ucode_sysfs_fini+0x18/0x20 [amdgpu] [ 26.205518] amdgpu_device_fini+0x3b4/0x560 [amdgpu] [ 26.205573] amdgpu_driver_unload_kms+0x4f/0xa0 [amdgpu] [ 26.205623] amdgpu_driver_load_kms+0xcd/0x250 [amdgpu] [ 26.205637] drm_dev_register+0x12b/0x1c0 [drm] [ 26.205695] amdgpu_pci_probe+0x12a/0x1e0 [amdgpu] [ 26.205699] local_pci_probe+0x47/0xa0 [ 26.205701] pci_device_probe+0x106/0x1b0 [ 26.205704] really_probe+0x21a/0x3f0 [ 26.205706] driver_probe_device+0x11c/0x140 [ 26.205707] device_driver_attach+0x58/0x60 [ 26.205709] __driver_attach+0xc3/0x140 Signed-off-by: Yintian Tao Acked-by: Christian König Reviewed-by: Nirmoy Das Signed-off-by: Alex Deucher commit d5939e4db5e6b8e3fe9707edb08d705bf4754cea Author: Monk Liu Date: Tue Nov 26 19:33:38 2019 +0800 drm/amdgpu: fix GFX10 missing CSIB set(v3) still need to init csb even for SRIOV v2: drop init_pg() for gfx10 at all since PG and GFX off feature will be fully controled by RLC and SMU fw for gfx10 v3: drop the flush_gpu_tlb lines since we consider it is only usefull in emulation Signed-off-by: Monk Liu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit eb529b8e46b87c1f89deeb1e736cf704948326e3 Author: Monk Liu Date: Fri Nov 29 16:20:51 2019 +0800 drm/amdgpu: should stop GFX ring in hw_fini To align with the scheme from gfx9 disabling GFX ring after VM shutdown could avoid garbage data be fetched to GFX RB which may lead to unnecessary screw up on GFX Signed-off-by: Monk Liu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6de40f02b355ae4c449acdaae19bac1ee380a01d Author: Monk Liu Date: Tue Nov 26 19:38:22 2019 +0800 drm/amdgpu: do autoload right after MEC loaded for SRIOV VF since we don't have RLCG ucode loading and no SRlist as well Signed-off-by: Monk Liu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1797ec7ffd1b4d41b078a4e807225827caf39e60 Author: Monk Liu Date: Tue Nov 26 19:36:29 2019 +0800 drm/amdgpu: skip rlc ucode loading for SRIOV gfx10 Signed-off-by: Monk Liu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 82a829dc8c2bb03cc9b7e5beb1c5479aa3ba7831 Author: Monk Liu Date: Tue Nov 26 19:42:25 2019 +0800 drm/amdgpu: fix calltrace during kmd unload(v3) issue: kernel would report a warning from a double unpin during the driver unloading on the CSB bo why: we unpin it during hw_fini, and there will be another unpin in sw_fini on CSB bo. fix: actually we don't need to pin/unpin it during hw_init/fini since it is created with kernel pinned, we only need to fullfill the CSB again during hw_init to prevent CSB/VRAM lost after S3 v2: get_csb in init_rlc so hw_init() will make CSIB content back even after reset or s3 v3: use bo_create_kernel instead of bo_create_reserved for CSB otherwise the bo_free_kernel() on CSB is not aligned and would lead to its internal reserve pending there forever take care of gfx7/8 as well Signed-off-by: Monk Liu Reviewed-by: Hawking Zhang Reviewed-by: Xiaojie Yuan Signed-off-by: Alex Deucher commit 5bbbc9b77831427609e4fcfb0a2b5961af3a1156 Author: Harry Wentland Date: Thu Nov 28 11:30:10 2019 -0500 drm/amd/display: Drop AMD_EDID_UTILITY defines We don't use this upstream in the Linux kernel. Signed-off-by: Harry Wentland Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 6bb27085aaa973eac31058a2534d73efe50b3a00 Author: Zhan Liu Date: Thu Nov 28 14:12:11 2019 -0500 drm/amd/display: Include num_vmid and num_dsc within NV14's resource caps [Why] "num_vmid" and "num_dsc" are missing within NV14's resource caps structure. [How] Add the missing parts. Signed-off-by: Zhan Liu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 869aebc7baa5b9bc65bde29690de311a26b2681b Author: Monk Liu Date: Tue Nov 26 19:40:08 2019 +0800 drm/amdgpu: use CPU to flush vmhub if sched stopped otherwse the flush_gpu_tlb will hang if we unload the KMD becuase the schedulers already stopped Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 45317d5ffb4d9bc842ef1f6119bc0b9e36c95f56 Author: James Zhu Date: Tue Nov 26 14:27:46 2019 -0500 drm/amdgpu/gfx: Increase dispatch packet number For Arcturus, increase dispatch packet number to stress scheduler. Signed-off-by: James Zhu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2255d7f36e479646244cd87906a6b87eae73711d Author: James Zhu Date: Tue Nov 26 14:23:10 2019 -0500 drm/amdgpu/gfx: Clear more EDC cnt Clear SDMA and HDP EDC counter in GPR workarounds. Signed-off-by: James Zhu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 858054f7617bde2df8969e999f580ff37faacb70 Author: Xiaojie Yuan Date: Wed Nov 6 21:08:06 2019 +0800 drm/amdgpu/gfx10: remove outdated comments Signed-off-by: Xiaojie Yuan Reviewed-by: Zhan Liu Signed-off-by: Alex Deucher commit a5e82d0b95051a01c5e8473f6969eb69a38b40cf Author: Xiaojie Yuan Date: Wed Nov 6 21:10:20 2019 +0800 drm/amdgpu/gfx10: unlock srbm_mutex after queue programming finish srbm_mutex is to guarantee atomicity for r/w of gfx indexed registers Signed-off-by: Xiaojie Yuan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit dc190678534ee0f9042a65db1613ab1e59582bff Author: Linus Walleij Date: Thu Nov 28 10:07:26 2019 +0100 drm/panel: Add generic DSI display controller YAML bindings This adds a starting point for processing and defining generic bindings used by DSI display controllers and panels attached to the virtual DSI ports. Cc: Stephan Gerhold Cc: devicetree@vger.kernel.org Suggested-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20191128090726.51107-1-linus.walleij@linaro.org Reviewed-by: Rob Herring Signed-off-by: Linus Walleij commit e1cda6a529aa1f310badcb20d63d9cd1d1f164a1 Author: Chris Wilson Date: Mon Dec 2 14:01:33 2019 +0000 drm/i915: Serialise i915_active_wait() with its retirement As the i915_active.retire() may be running on another CPU as we detect that the i915_active is idle, we may not wait for the retirement itself. Wait for the remote callback by waiting for the retirement worker. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112424 Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191202140133.2444217-2-chris@chris-wilson.co.uk commit ae30300490fe9790857d3780f46aa5ad926d6261 Author: Chris Wilson Date: Mon Dec 2 14:01:32 2019 +0000 drm/i915: Specialise i915_active.work lock classes Similar to for i915_active.mutex, we require each class of i915_active to have distinct lockdep chains as some, but by no means all, i915_active are used within the shrinker and so have much more severe usage constraints. By using a lockclass local to i915_active_init() all i915_active workers have the same lock class, and we may generate false positives when waiting for the i915_active. If we push the lockclass into the caller, each class of i915_active will have distinct lockdep chains. Signed-off-by: Chris Wilson Acked-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191202140133.2444217-1-chris@chris-wilson.co.uk commit 7d0aa0db4375edb0a2de66e9099fe0f9b197b80d Author: Chris Wilson Date: Mon Dec 2 17:43:10 2019 +0000 drm/i915/gem: Unbind all current vma on changing cache-level Avoid dangerous race handling of destroyed vma by unbinding all vma instead. Unfortunately, this stops us from trying to be clever and only doing the minimal change required, so on first use of scanout we may encounter an annoying stall as it transitions to a new cache level. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112413 Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191202174310.2630302-1-chris@chris-wilson.co.uk commit 65f6d12c6b0b610c92d6a2c3d964ff2943ac8fbf Author: Chris Wilson Date: Mon Dec 2 11:08:36 2019 +0000 drm/i915/gt: Simplify rc6 w/a application Quite simply we only need to check for prior corruption on enabling rc6 on module load and resume, so by hooking into the common entry points. Signed-off-by: Chris Wilson Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191202110836.2342685-2-chris@chris-wilson.co.uk commit 61e258ee33328ea8dbd9208ad79d281693d5e0e4 Author: Chris Wilson Date: Mon Dec 2 11:08:35 2019 +0000 drm/i915/gt: Use soft-rc6 for w/a protection Now that we have soft-rc6 in place, we can use that instead of the forcewake to disable rc6 while active; preferred by a few microbenchmarks. Signed-off-by: Chris Wilson Acked-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191202110836.2342685-1-chris@chris-wilson.co.uk commit 98cf5c9a482d975b91d2cf00e09c061b535b8ee4 Author: Lucas De Marchi Date: Tue Nov 26 14:51:10 2019 -0800 drm/i915/bios: assume vbt is 4-byte aligned into oprom The unaligned ioread32() will make us read byte by byte looking for the vbt. We could just as well have done a ioread8() + a shift and avoid the extra confusion on how we are looking for "$VBT". However when using ACPI it's guaranteed the VBT is 4-byte aligned per spec, so we can probably assume it here as well. v2: do not try to simplify the loop by eliminating the auxiliary counter (Jani and Ville) Signed-off-by: Lucas De Marchi Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191126225110.8127-4-lucas.demarchi@intel.com commit 2cded152ad43875e8e01cef328e886861129c3a9 Author: Lucas De Marchi Date: Tue Nov 26 14:51:09 2019 -0800 drm/i915/bios: fold pci rom map/unmap into copy function We don't need to keep the pci rom mapped during the entire intel_bios_init() anymore. Move it to the previous copy_vbt() function and rename it to oprom_get_vbt() since now it's responsible to to all operations related to get the vbt from the oprom. v2: fix double __iomem attribute detected by sparse v3: fix missing unmap on success (Ville) Signed-off-by: Lucas De Marchi Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191126225110.8127-3-lucas.demarchi@intel.com commit fd0186ce185161915d0d51e6efd2c632571f948f Author: Lucas De Marchi Date: Tue Nov 26 14:51:08 2019 -0800 drm/i915/bios: do not discard address space When we map the VBT through pci_map_rom() we may not be allowed to simply discard the address space and go on reading the memory. That doesn't work on my test system, but by dumping the rom via sysfs I can can get the correct vbt. So change our find_vbt() to do the same as done by pci_read_rom(), i.e. use memcpy_fromio(). v2: the just the minimal changes by not bothering with the unaligned io reads: this can be done on top (from Ville and Jani) v3: drop const in function return since now we are copying the vbt, rather than just finding it Signed-off-by: Lucas De Marchi Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191126225110.8127-2-lucas.demarchi@intel.com commit d5746bf20e971caf194b1e69b9332570041fc6d6 Author: José Roberto de Souza Date: Tue Nov 26 18:16:09 2019 -0800 drm/i915/display: Suspend MST topology manager before destroy fbdev MST topology needs to be suspended so we don't have any calls to fbdev after it's finalized. MST will be destroyed later as part of drm_mode_config_cleanup(). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109964 Signed-off-by: José Roberto de Souza Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20191127021609.162700-1-jose.souza@intel.com commit 551fb93d4ab3845f358c9e24a5eb38275796073a Author: José Roberto de Souza Date: Wed Nov 27 17:48:52 2019 -0800 drm/i915/vbt: Parse power conservation features block From VBT 228+ this is block that PSR and other power saving features configuration should be read from. v3: Using DRRS from this new block v4: Using BIT() Fixing DRRS comment in parse_power_conservation_features() Cc: Matt Roper Cc: Gwan-gyeong Mun Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191128014852.214135-5-jose.souza@intel.com commit ba0af30d24e992534212b453a39695c6feae886e Author: José Roberto de Souza Date: Wed Nov 27 17:48:51 2019 -0800 drm/i915/psr: Check if sink PSR capability changed eDP specification states that sink can have its PSR capability changed, I have never found any panel doing that but lets add that for completeness. For now it is not reading back the PSR capabilities and if possible re-enabling PSR, this will be added if a panel is found using this feature. v4: Cleaning DP_PSR_CAPS_CHANGE Reviewed-by: Matt Roper Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191128014852.214135-4-jose.souza@intel.com commit 700355af64bbb6c6dc4e552fa727513dccdcfe62 Author: José Roberto de Souza Date: Wed Nov 27 17:48:50 2019 -0800 drm/i915/psr: Enable ALPM lock timeout error interruption When this error happens sink link is not stable after the required FW_EXIT_LATENCY period so it will miss the selective update. As the other PSR errors, for now we are not trying to recover from it. Cc: Gwan-gyeong Mun Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191128014852.214135-3-jose.souza@intel.com commit 95851205f9b3d2bb81cc5f63afd1124c9eb79940 Author: José Roberto de Souza Date: Wed Nov 27 17:48:49 2019 -0800 drm/i915/psr: Refactor psr short pulse handler eDP spec states that when sink enconters a problem that prevents it to keep PSR running it should set PSR status to internal error and set the reason why it happen to PSR_ERROR_STATUS but it is not how it was implemented. But also I don't want to change this behavior, who knows if there is a panel out there that only set the PSR_ERROR_STATUS. So here refactoring the code a bit to make more easy to read what was state above as more checks will be added to this function. v2: returning a int instead of a bool in psr_get_status_and_error_status() Cc: Gwan-gyeong Mun Cc: Matt Roper Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191128014852.214135-2-jose.souza@intel.com commit f98837e85fcdcdbeec3cadc40456da85d07256a3 Author: José Roberto de Souza Date: Wed Nov 27 17:48:48 2019 -0800 drm/i915/psr: Add bits per pixel limitation PSR2 HW only support a limited number of bits per pixel, if mode has more than supported PSR2 should not be enabled. BSpec: 50422 BSpec: 7713 Cc: Gwan-gyeong Mun Cc: Matt Roper Reviewed-by: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191128014852.214135-1-jose.souza@intel.com commit 13caf7bea4432e8d192d412eae9ee8efb2f47fe8 Author: Lucas De Marchi Date: Wed Nov 27 14:11:21 2019 -0800 drm/i915/dsb: fix cmd_buf being wrongly set The "err" label is not really "err", but rather "out" since the return path is shared between error condition and normal path. This broke when commit 03cea61076f0 ("drm/i915/dsb: fix extra warning on error path handling") added a "dsb->cmd_buf = NULL;" there, making DSB to stop working since now all writes would pass-through via mmio. Remove the set to NULL since it's actually not needed: we only set it if all steps are successful. While at it, rename the label so this confusion doesn't happen again. Fixes: 03cea61076f0 ("drm/i915/dsb: fix extra warning on error path handling") Resolves: https://gitlab.freedesktop.org/drm/intel/issues/8 Signed-off-by: Lucas De Marchi Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20191127221119.384754-1-lucas.demarchi@intel.com commit 30a958526d2cc6df38347336a602479d048d92e7 Author: Emil Velikov Date: Fri Nov 1 13:03:13 2019 +0000 drm: drop DRM_AUTH from PRIME_TO/FROM_HANDLE ioctls As mentioned by Christian, for drivers which support only primary nodes this changes the returned error from -EACCES into -EOPNOTSUPP/-ENOSYS. For others, this check in particular will be a noop. So let's remove it as suggested by Christian. Cc: Alex Deucher Cc: amd-gfx@lists.freedesktop.org Cc: Daniel Vetter Cc: Sean Paul Acked-by: Christian König Signed-off-by: Emil Velikov Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191101130313.8862-5-emil.l.velikov@gmail.com commit c1572b75606623551dfbf9301cb769e60eaeda3b Author: Emil Velikov Date: Fri Nov 1 13:03:12 2019 +0000 drm/panfrost: remove DRM_AUTH and respective comment As of earlier commit we have address space separation. Yet we forgot to remove the respective comment and DRM_AUTH in the ioctl declaration. Cc: Tomeu Vizoso Cc: David Airlie Cc: Daniel Vetter Cc: Robin Murphy Cc: Steven Price Fixes: 7282f7645d06 ("drm/panfrost: Implement per FD address spaces") Signed-off-by: Emil Velikov Reviewed-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20191101130313.8862-4-emil.l.velikov@gmail.com commit 85dce7ff45e07a415d5ca7610b9f245a4e022d96 Author: Emil Velikov Date: Mon Jul 22 17:56:48 2019 +0100 drm: use correct dev node location in comment Current comment mentions /dev/drm which hasn't been a thing even before the code was merged into the kernel ;-) v2: drop explicit node path (Sean) Signed-off-by: Emil Velikov Reviewed-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190722165648.7828-1-emil.l.velikov@gmail.com commit ca851c224853fb0eb6e4f45c92896f89e6013a44 Author: Ville Syrjälä Date: Fri Nov 29 20:54:34 2019 +0200 drm/i915: Stop using connector->encoder and encoder->crtc links in i915_display_info Migrate away from the legacy encoder->crtc and connector->encoder links in the debugfs display_info code. Other users still remain so can't kill these off yet. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191129185434.25549-10-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C commit 3cf12da44f7f73d1c75fd9da8509f320a262ca3c Author: Ville Syrjälä Date: Fri Nov 29 20:54:33 2019 +0200 drm/i915: Dump both the uapi and hw states for crtcs and planes Let's make the display info more useful by dumping both the uapi and hw states for each crtc/plane. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191129185434.25549-9-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C commit d029a139eb9880caef7c9c32f8eb6c637cd4db54 Author: Ville Syrjälä Date: Fri Nov 29 20:54:32 2019 +0200 drm/i915: Use the canonical [CRTC:%d:%s]/etc. format in i915_display_info Use the canonical "[CRTC:%d:%s]" format for the obj id/name in the debugfs display_info dump. Everyone should already be familiar with the format since it's used in the debug logs extensively. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191129185434.25549-8-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C commit 3ff11a0ab5fe69b66e4a2608b3dca13712c0634a Author: Ville Syrjälä Date: Fri Nov 29 20:54:31 2019 +0200 drm/i915: Use drm_modeset_lock_all() in debugfs display info Make out life easier by just grabbing all modeset locks around the display_info dump. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191129185434.25549-7-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C commit 5244221ee89b30f0e8add9e88482da873b6e0a54 Author: Ville Syrjälä Date: Fri Nov 29 20:54:30 2019 +0200 drm/i915: Dump the mode for the crtc just the once No point in repeating the crtc mode for each cloned encoder. Just print it once, and avoid using multiple lines for it. And while at let's polish the fixed mode print to fit on one line as well. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191129185434.25549-6-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C commit 647542337786fc87cc1e8c48ee2c3cec92c2bc80 Author: Ville Syrjälä Date: Fri Nov 29 20:54:29 2019 +0200 drm/i915: Refactor debugfs display info code Pull the crtc dumping stuff into a nice function so the loop over the crtcs doesn't look like crap. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191129185434.25549-5-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C commit 9de833722e2188a05071c479ee328959424b01d7 Author: Ville Syrjälä Date: Fri Nov 29 20:54:28 2019 +0200 drm/i915: Reorganize plane/fb dump in debugfs Eliminate the special cases for the primary and cursor planes and just dump all the information consistently for all the planes. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191129185434.25549-4-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C commit cb634d3c850ec84810a8964b730020daf2601bb0 Author: Ville Syrjälä Date: Fri Nov 29 20:54:27 2019 +0200 drm/i915: Switch to intel_ types in debugfs display_info Switch to using intel_ types in the debugfs display_info code. Should make it easier to handle bigjoiner etc. in the future. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191129185434.25549-3-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C commit 6d37bc73976f5306f39b9d34a2e95f0285e6e862 Author: Ville Syrjälä Date: Fri Nov 29 20:54:26 2019 +0200 drm/i915: Use drm_rect to simplify plane {crtc,src}_{x,y,w,h} printing Use DRM_RECT_FMT & co. to simpify the code. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191129185434.25549-2-ville.syrjala@linux.intel.com Reviewed-by: Ramalingam C commit 56273062e760373757a3c9dde943f945874202af Author: Ville Syrjälä Date: Tue Nov 5 19:14:47 2019 +0200 drm/i915: Switch intel_crtc_disable_noatomic() to intel_ types It's hard to see what is going on when the function mixes drm_ and intel_ types. Switch to intel_ types. v2: Deal with another use of 'intel_crtc' being introduced Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191105171447.22111-2-ville.syrjala@linux.intel.com Reviewed-by: Lucas De Marchi commit f49108d0e0e7e46a2fcf7322ab8f6753f3934aa1 Author: Matt Roper Date: Wed Nov 27 14:13:14 2019 -0800 drm/i915: Program SHPD_FILTER_CNT on CNP+ The bspec tells us 'Program SHPD_FILTER_CNT with the "500 microseconds adjusted" value before enabling hotplug detection' on CNP+. We haven't been touching this register at all thus far, but we should probably follow the bspec's guidance. The register also exists on LPT and SPT, but there isn't any specific guidance I can find on how we should be programming it there so let's leave it be for now. Bspec: 4342 Bspec: 31297 Bspec: 8407 Bspec: 49305 Bspec: 50473 Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191127221314.575575-3-matthew.d.roper@intel.com commit 3d1e388d4072dd240e558709d2f73605a742a723 Author: Matt Roper Date: Wed Nov 27 14:13:13 2019 -0800 drm/i915/ehl: Make icp_digital_port_connected() use phy instead of port When looking at SDEISR to determine the connection status of combo outputs, we should use the phy index rather than the port index. Although they're usually the same thing, EHL's DDI-D (port D) is attached to PHY-A and SDEISR doesn't even have bits for a "D" output. It's also possible that future platforms may map DDIs (the internal display engine programming units) to PHYs (the output handling on the IO side) in ways where port!=phy, so let's look at the PHY index by default. v2: Rename to intel_combo_phy_connected. (Lucas) Fixes: 719d24002602 ("drm/i915/ehl: Enable DDI-D") Cc: José Roberto de Souza Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20191127221314.575575-2-matthew.d.roper@intel.com commit 9695cde6b99f16f8d1c6248de11e5c0c51cdf1ca Author: Matt Roper Date: Wed Nov 27 14:13:12 2019 -0800 drm/i915: Handle SDEISR according to PCH rather than platform The South Display is part of the PCH so we should technically be basing our port detection logic off the PCH in use rather than the platform generation. Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: José Roberto de Souza Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20191127221314.575575-1-matthew.d.roper@intel.com commit 7df49149b29c978162fa68fe4db8160f294e12a0 Author: Ville Syrjälä Date: Thu Nov 28 20:23:58 2019 +0200 drm/i915: Use the correct PCH transcoder for LPT/WPT in intel_sanitize_frame_start_delay() LPT/WPT only have PCH transcoder A. Make sure we poke at its chicken register instead of some non-existent register when FDI is being driven by pipe B or C. Cc: Uma Shankar Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191128182358.14477-1-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar commit 2dc016599cfa9672a147528ca26d70c3654a5423 Author: Wen Gong Date: Fri Nov 29 07:34:09 2019 +0000 ath: add support for special 0x0 regulatory domain Some sdio chips of rome QCA6174's regulatory domain code of EEPROM is empty, then ath_is_world_regd will return false for this case, and it will lead function __ath_reg_dyn_country not work, thus the regdomain will not update for NL80211_REGDOM_SET_BY_COUNTRY_IE type, it result ath10k set the same regdomain/reg_5ghz_ctl/reg_2ghz_ctl to firmware, then the tx power will not changed with different regdomain's AP. The regulatory domain code of EEPROM of some QCA6174 PCIE chip is 0x6c, it means world wide regdomain, for this chip, it does not have the issue. For empty reulatory domain code chip, set it to world regulatory domain in functio ath_regd_sanitize, then it will fix the issue. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00029. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 4a99124516307e0fc4ed7517c0af796091a159d5 Author: Wen Gong Date: Fri Nov 29 09:59:59 2019 +0200 ath10k: change bundle count for max rx bundle for sdio For max bundle size 32, the bundle mask is not same with 8/16. Change it to match the max bundle size of htc. Otherwise it will not match with firmware, for example, when bundle count is 17, then flags of ath10k_htc_hdr is 0x4, if without this patch, it will be considered as non-bundled packet because it does not have mask 0xF0, then trigger error message later: payload length 56747 exceeds max htc length: 4088. htc->max_msgs_per_htc_bundle is the min value of HTC_HOST_MAX_MSG_PER_RX_BUNDLE and msg->ready_ext.max_msgs_per_htc_bundle of ath10k_htc_wait_target, it will be sent to firmware later in ath10k_htc_start, then firmware will use it as the final max rx bundle count, in WLAN.RMH.4.4.1-00029, msg->ready_ext.max_msgs_per_htc_bundle is 32, it is same with HTC_HOST_MAX_MSG_PER_RX_BUNDLE, so the final max rx bundle count will be set to 32 in firmware. This patch only effect sdio chips. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00029. Signed-off-by: Wen Gong Fixes: 224776520ead69e ("ath10k: change max RX bundle size from 8 to 32 for sdio") Signed-off-by: Kalle Valo commit cfee8793a74dc3afabb08fc9ed5bbe2045709dbb Author: Wen Gong Date: Fri Nov 29 09:59:24 2019 +0200 ath10k: enable napi on RX path for sdio For tcp RX, the quantity of tcp acks to remote is 1/2 of the quantity of tcp data from remote, then it will have many small length packets on TX path of sdio bus, then it reduce the RX packets's bandwidth of tcp. This patch enable napi on RX path, then the RX packet of tcp will not feed to tcp stack immeditely from mac80211 since GRO is enabled by default, it will feed to tcp stack after napi complete, if rx bundle is enabled, then it will feed to tcp stack one time for each bundle of RX. For example, RX bundle size is 32, then tcp stack will receive one large length packet, its length is neary 1500*32, then tcp stack will send a tcp ack for this large packet, this will reduce the tcp acks ratio from 1/2 to 1/32. This results in significant performance improvement for tcp RX. Tcp rx throughout is 240Mbps without this patch, and it arrive 390Mbps with this patch. The cpu usage has no obvious difference with and without NAPI. call stack for each RX packet on GRO path: (skb length is about 1500 bytes) skb_gro_receive ([kernel.kallsyms]) tcp4_gro_receive ([kernel.kallsyms]) inet_gro_receive ([kernel.kallsyms]) dev_gro_receive ([kernel.kallsyms]) napi_gro_receive ([kernel.kallsyms]) ieee80211_deliver_skb ([mac80211]) ieee80211_rx_handlers ([mac80211]) ieee80211_prepare_and_rx_handle ([mac80211]) ieee80211_rx_napi ([mac80211]) ath10k_htt_rx_proc_rx_ind_hl ([ath10k_core]) ath10k_htt_rx_pktlog_completion_handler ([ath10k_core]) ath10k_sdio_napi_poll ([ath10k_sdio]) net_rx_action ([kernel.kallsyms]) softirqentry_text_start ([kernel.kallsyms]) do_softirq ([kernel.kallsyms]) call stack for napi complete and send tcp ack from tcp stack: (skb length is about 1500*32 bytes) _tcp_ack_snd_check ([kernel.kallsyms]) tcp_v4_do_rcv ([kernel.kallsyms]) tcp_v4_rcv ([kernel.kallsyms]) local_deliver_finish ([kernel.kallsyms]) ip_local_deliver ([kernel.kallsyms]) ip_rcv_finish ([kernel.kallsyms]) ip_rcv ([kernel.kallsyms]) netif_receive_skb_core ([kernel.kallsyms]) netif_receive_skb_one_core([kernel.kallsyms]) netif_receive_skb ([kernel.kallsyms]) netif_receive_skb_internal ([kernel.kallsyms]) napi_gro_complete ([kernel.kallsyms]) napi_gro_flush ([kernel.kallsyms]) napi_complete_done ([kernel.kallsyms]) ath10k_sdio_napi_poll ([ath10k_sdio]) net_rx_action ([kernel.kallsyms]) __softirqentry_text_start ([kernel.kallsyms]) do_softirq ([kernel.kallsyms]) Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00017-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit bd19c4527056b3e42e8c286136660aa14d0b6c90 Author: Boris Brezillon Date: Wed Oct 23 17:44:53 2019 +0200 drm/exynos: Don't reset bridge->next bridge->next is only points to the new bridge if drm_bridge_attach() succeeds. No need to reset it manually here. Note that this change is part of the attempt to make the bridge chain a double-linked list. In order to do that we must patch all drivers manipulating the bridge->next field. Signed-off-by: Boris Brezillon Reviewed-by: Laurent Pinchart Acked-by: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20191023154512.9762-3-boris.brezillon@collabora.com commit 1bbdd241ffeb86b29e3dc80539cd1b88037b5fdb Author: Chris Wilson Date: Sun Dec 1 14:09:16 2019 +0000 drm/i915: Refactor gen6_flush_pd() As the gen6 page directory is written on binding and after every update, the code ended up duplicated. Refactor the code into a single routine to share the locking and serialisation. Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191201140916.2128905-1-chris@chris-wilson.co.uk commit de2501381470f7374cd502c239eecf8a3f67f65f Author: Sam Ravnborg Date: Sun Aug 4 22:16:30 2019 +0200 drm/tegra: fix opencoded use of drm_panel_* Use the drm_panel_get_modes function. Signed-off-by: Sam Ravnborg Reviewed-by: Emil Velikov Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190804201637.1240-10-sam@ravnborg.org commit 480ab0ee8b12d1da4c9ee72fd6facfb6d95b487b Author: Sam Ravnborg Date: Sun Aug 4 22:16:27 2019 +0200 drm/msm: fix opencoded use of drm_panel_* Use the function drm_panel_get_modes(). Signed-off-by: Sam Ravnborg Reviewed-by: Emil Velikov Cc: Alexios Zavras Cc: Thomas Gleixner Cc: Allison Randal Cc: Enrico Weigelt Link: https://patchwork.freedesktop.org/patch/msgid/20190804201637.1240-7-sam@ravnborg.org commit d02d8a9ce80982374740b0a210723dbf0cdb66ce Author: Sam Ravnborg Date: Sun Aug 4 22:16:24 2019 +0200 drm/exynos: fix opencoded use of drm_panel_* Call via drm_panel_get_modes(). Signed-off-by: Sam Ravnborg Reviewed-by: Emil Velikov Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190804201637.1240-4-sam@ravnborg.org commit 5f9f81c60162d270393432e5ccca834096dccc08 Author: Sam Ravnborg Date: Sun Aug 4 22:16:23 2019 +0200 drm/exynos: fix opencoded use of drm_panel_* drm_panel_attach() will check if there is a controller already attached - drop the check in the driver. Use drm_panel_get_modes() so the driver no longer uses the function pointer. Signed-off-by: Sam Ravnborg Reviewed-by: Emil Velikov Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20190804201637.1240-3-sam@ravnborg.org commit 7bb501f49ddb96365ef8d4fe882e5ceaa36215e4 Author: Andreas Klinger Date: Mon Nov 25 09:05:02 2019 +0100 iio: ping: add parallax ping sensors Add support for parallax ping and laser ping sensors with just one pin for trigger and echo signal. This driver is based on srf04. In contrast to it it's necessary to change direction of the pin and to request the irq just for the period when the echo is rising and falling. Because this adds a lot of cases there is this individual driver for handling this type of sensors. Add a new configuration variable CONFIG_PING to Kconfig and Makefile. Julia reported an issue with failing to unlock a mutex in some error paths. Signed-off-by: Andreas Klinger Reported-by: kbuild test robot Reported-by: Julia Lawall Signed-off-by: Jonathan Cameron commit f3bcd06f574a0751ee40ec25b9aad6968877ae5f Author: Fabrice Gasnier Date: Thu Nov 21 12:05:17 2019 +0100 iio: trigger: stm32-timer: remove unnecessary update event There is no need to explicitly generate update event to update timer master mode. Signed-off-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron commit 7dd1cfc1398a79430e998a1f2894aa34c7fb749b Author: Krzysztof Kozlowski Date: Thu Nov 21 04:19:19 2019 +0100 iio: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jonathan Cameron commit 0f8b1293ad6fa8b3125d42dc8acad8b97ef4972a Author: Andreas Klinger Date: Mon Nov 18 08:36:50 2019 +0100 MAINTAINERS: add maintainer for ping iio sensors Add a maintainer for the new parallax PING))) and LaserPING IIO sensors Signed-off-by: Andreas Klinger Signed-off-by: Jonathan Cameron commit 9c49282ac85f12f142d0bcb064242a3dfcd116dd Author: Colin Ian King Date: Wed Sep 25 13:03:57 2019 +0100 drm/panel: clean up indentation issue There is a continue statement that is indented one level too deeply, remove the extraneous tab. Signed-off-by: Colin Ian King Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20190925120357.10408-1-colin.king@canonical.com commit 0d35408afbeb603bc9972ae91e4dd2638bcffe52 Author: Adam Ford Date: Wed Oct 16 08:51:45 2019 -0500 drm/panel: simple: Add Logic PD Type 28 display support Previously, there was an omap panel-dpi driver that would read generic timings from the device tree and set the display timing accordingly. This driver was removed so the screen no longer functions. This patch modifies the panel-simple file to setup the timings to the same values previously used. Fixes: 8bf4b1621178 ("drm/omap: Remove panel-dpi driver") Signed-off-by: Adam Ford Reviewed-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191016135147.7743-1-aford173@gmail.com commit 621dab99847821d671e46509c4775d905c72a763 Author: Adam Ford Date: Wed Oct 16 08:51:46 2019 -0500 dt-bindings: Add Logic PD Type 28 display panel This patch adds documentation of device tree bindings for the WVGA panel Logic PD Type 28 display. Signed-off-by: Adam Ford Reviewed-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191016135147.7743-2-aford173@gmail.com commit 19b6304aee84644482ceb6a87f0ce09db9a8f714 Author: Chris Wilson Date: Sat Nov 30 16:23:20 2019 +0000 drm/i915: Serialise access to GFX_FLSH_CNTL Now that many threads may try to use the same mmio to flush the global buffers after updating the PTE, serialise access to the mmio to prevent concurrent access on gen7. Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191130162320.1683424-1-chris@chris-wilson.co.uk commit f997056d5b17c6b0bdc250d509f384fbd7f8d33a Author: Chris Wilson Date: Sat Nov 30 12:05:03 2019 +0000 drm/i915/gt: Push the flush_pd before the set-context Move our "wait for the PD load to complete" paranoia before the MI_SET_CONTEXT just in case the context restore tries to access local addresses. Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191130120503.1609483-1-chris@chris-wilson.co.uk commit 3cd6e8860ecd40f358b9d30d5bfecbc74fd7cfef Author: Chris Wilson Date: Fri Nov 29 20:13:28 2019 +0000 drm/i915/gen7: Re-enable full-ppgtt for ivb & hsw After much hair pulling, resort to preallocating the ppGTT entries on init to circumvent the apparent lack of PD invalidate following the write to PP_DCLV upon switching mm between contexts (and here the same context after binding new objects). However, the details of that PP_DCLV invalidate are still unknown, and it appears we need to reload the mm twice to cover over a timing issue. Worrying. Fixes: 3dc007fe9b2b ("drm/i915/gtt: Downgrade gen7 (ivb, byt, hsw) back to aliasing-ppgtt") Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191129201328.1398583-1-chris@chris-wilson.co.uk commit f9a863c2ffc17f72137fae8cac3314961dc6be24 Author: Chris Wilson Date: Fri Nov 29 22:27:02 2019 +0000 drm/i915/selftests: Keep engine awake during live_coherency Keep the engine awake and so avoid frequent cycling in and out of powersaving mode to eliminate the unnecessary overhead and speed up the testing. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191129222702.1456292-1-chris@chris-wilson.co.uk commit 97c16353970aa28418a49ef6980b6e4f36e35feb Author: Chris Wilson Date: Fri Nov 29 17:25:42 2019 +0000 drm/i915/execlists: Ensure the tasklet is decoupled upon shutdown As we only cancel the timers asynchronously, they may still be running on another CPU as we shutdown, raising one last softirq. So be safe and make sure the tasklet is flushed before destroying the engine's memory. Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191129172542.1222810-1-chris@chris-wilson.co.uk commit 7ce596a8036cf3a4cb9ffa0c4edd8a76a7a43cc3 Author: Chris Wilson Date: Fri Nov 29 15:18:45 2019 +0000 drm/i915/gem: Take timeline->mutex to walk list-of-requests Though the context is closed and so no more requests can be added to the timeline, retirement can still be removing requests. It can even be removing the very request we are inspecting and so cause us to wander into dead links. Serialise with the retirement by taking the timeline->mutex used for guarding the timeline->requests list. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112404 Fixes: 4a3174152147 ("drm/i915/gem: Refine occupancy test in kill_context()") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Cc: Matthew Auld Cc: Joonas Lahtinen Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191129151845.1092933-1-chris@chris-wilson.co.uk commit 8d9875b47a5dae0690b04bbb9de68b0a0f1a2cce Author: Ville Syrjälä Date: Fri Oct 11 23:09:45 2019 +0300 drm/i915: Don't set undefined bits in dirty_pipes skl_commit_modeset_enables() straight up compares dirty_pipes with a bitmask of already committed pipes. If we set bits in dirty_pipes for non-existent pipes that comparison will never work right. So let's limit ourselves to bits that exist. And we'll do the same for the active_pipes_changed bitmask. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191011200949.7839-5-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 65b2f7c43c6f087784db309e8a75bae3d2266520 Author: Ville Syrjälä Date: Fri Nov 8 15:56:54 2019 +0200 drm: Inline drm_color_lut_extract() This thing can get called several thousand times per LUT so seems like we want to inline it to: - avoid the function call overhead - allow constant folding A quick synthetic test (w/o any hardware interaction) with a ridiculously large LUT size shows about 50% reduction in runtime on my HSW and BSW boxes. Slightly less with more reasonable LUT size but still easily measurable in tens of microseconds. v2: Include drm_color_mgmt.h in the .rst (Daniel) Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Reviewed-by: Nicholas Kazlauskas Link: https://patchwork.freedesktop.org/patch/msgid/20191108135654.12907-1-ville.syrjala@linux.intel.com commit 3168c19d7eb17a0108a3b60ad8e8c1b18ea05c63 Author: Colin Ian King Date: Fri Nov 29 17:36:35 2019 +0000 Bluetooth: btusb: fix memory leak on fw Currently the error return path when the call to btusb_mtk_hci_wmt_sync fails does not free fw. Fix this by returning via the error_release_fw label that performs the free'ing. Addresses-Coverity: ("Resource leak") Fixes: a1c49c434e15 ("Bluetooth: btusb: Add protocol support for MediaTek MT7668U USB devices") Signed-off-by: Colin Ian King Signed-off-by: Marcel Holtmann commit 2c81bdc8024ef6f81dfecab86bcb97a8694dcd1e Author: Daniel Vetter Date: Wed Nov 27 19:00:35 2019 +0100 drm/todo: Add entry for fb funcs related cleanups We're doing a great job for really simple drivers right now, but still a lot of boilerplate for the bigger ones. Acked-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191127180035.416209-3-daniel.vetter@ffwll.ch commit 304a94a2e6debadd55c4e73cbec432dd57832856 Author: Wayne Lin Date: Mon Nov 18 18:18:32 2019 +0800 drm/edid: Add alternate clock for SMPTE 4K [Why] In hdmi_mode_alternate_clock(), it adds an exception for VIC 4 mode (4096x2160@24) due to there is no alternate clock defined for that mode in HDMI1.4b. But HDMI2.0 adds 23.98Hz for that mode. [How] Remove the exception v2: Adjust the comment description of hdmi_mode_alternate_clock() due to there is no more exception for VIC 4 mode. Signed-off-by: Wayne Lin Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191118101832.15487-2-Wayne.Lin@amd.com commit d2b434730f301a7ad74473eb66422f0008186306 Author: Wayne Lin Date: Mon Nov 18 18:18:31 2019 +0800 drm/edid: Add aspect ratios to HDMI 4K modes [Why] HDMI 2.0 adds aspect ratio attribute to distinguish different 4k modes. According to Appendix E of HDMI 2.0 spec, source should use VSIF to indicate video mode only when the mode is one defined in HDMI 1.4b 4K modes. Otherwise, use AVI infoframes to convey VIC. Current code doesn't take aspect ratio into consideration while constructing avi infoframe. Should modify that. [How] Inherit Ville Syrjälä's work "drm/edid: Prep for HDMI VIC aspect ratio" at https://patchwork.kernel.org/patch/11174639/ Add picture_aspect_ratio attributes to edid_4k_modes[] and construct VIC and HDMI_VIC by taking aspect ratio into consideration. v2: Correct missing initializer error at adding aspect ratio of SMPTE mode. Signed-off-by: Wayne Lin Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191118101832.15487-1-Wayne.Lin@amd.com commit d92f77deefc9051f2b6fa17836b365bb2a67ce29 Author: Chris Wilson Date: Fri Nov 29 12:48:46 2019 +0000 Revert "drm/i915: use a separate context for gpu relocs" Since commit c45e788d95b4 ("drm/i915/tgl: Suspend pre-parser across GTT invalidations"), we now disable the advanced preparser on Tigerlake for the invalidation phase at the start of the batch, we no longer need to emit the GPU relocations from a second context as they are now flushed inlined. References: 8a9a982767b7 ("drm/i915: use a separate context for gpu relocs") References: c45e788d95b4 ("drm/i915/tgl: Suspend pre-parser across GTT invalidations") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Daniele Ceraolo Spurio Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191129124846.949100-1-chris@chris-wilson.co.uk commit 0cb7da1062f44281f0a8c5a137b1c9af91b6bfd5 Author: Chris Wilson Date: Fri Nov 29 10:34:55 2019 +0000 drm/i915/selftests: Wait only on the expected barrier Wait on only the last request on the kernel_context after emitting a barrier so that we do not wait for everything in general and by doing so cause an accidental emission of the barrier! Bugzilla; https://bugs.freedesktop.org/show_bug.cgi?id=112405 Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191129103455.744389-1-chris@chris-wilson.co.uk commit b006869c6e79792cecf27662190f5c5cb73d26fb Author: Chris Wilson Date: Fri Nov 29 09:56:59 2019 +0000 drm/i915/selftests: Always lock the drm_mm around insert/remove Be paranoid and make sure the drm_mm is locked whenever we insert/remove our own nodes. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191129095659.665381-1-chris@chris-wilson.co.uk commit 69305732796f50c9e74cd850faef668f38a483b3 Author: Chris Wilson Date: Thu Nov 28 23:29:46 2019 +0000 drm/i915/selftests: Use sgt_iter for huge_pages_free Use the normal sgt_iter to walk the pages scatterlist on free so that we handle the error path correctly. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112225 Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191128232946.546831-1-chris@chris-wilson.co.uk commit dbe3ad61dcebc49fe3efca70a0f752a95b4600f2 Author: Markus Elfring Date: Thu Nov 7 18:05:08 2019 +0100 drm/qxl: Complete exception handling in qxl_device_init() A coccicheck run provided information like the following. drivers/gpu/drm/qxl/qxl_kms.c:295:1-7: ERROR: missing iounmap; ioremap on line 178 and execution via conditional on line 185 Generated by: scripts/coccinelle/free/iounmap.cocci A jump target was specified in an if branch. The corresponding function call did not release the desired system resource then. Thus use the label “rom_unmap” instead to fix the exception handling for this function implementation. Fixes: 5043348a4969ae1661c008efe929abd0d76e3792 ("drm: qxl: Fix error handling at qxl_device_init") Signed-off-by: Markus Elfring Link: http://patchwork.freedesktop.org/patch/msgid/5e5ef9c4-4d85-3c93-cf28-42cfcb5b0649@web.de Signed-off-by: Gerd Hoffmann commit ff690b2111ba591abf1ea157c543a4e9f91b309e Author: Michel Thierry Date: Thu Nov 28 07:40:05 2019 +0530 drm/i915/tgl: Implement Wa_1604555607 Implement Wa_1604555607 (set the DS pairing timer to 128 cycles). FF_MODE2 is part of the register state context, that's why it is implemented here. At TGL A0 stepping, FF_MODE2 register read back is broken, hence disabling the WA verification. v2: Rebased on top of the WA refactoring (Oscar) v3: Correctly add to ctx_workarounds_init (Michel) v4: uncore read is used [Tvrtko] Macros as used for MASK definition [Chris] v5: Skip the Wa_1604555607 verification [Ram] i915 ptr retrieved from engine. [Tvrtko] v6: Added wa_add as a wrapper for __wa_add [Chris] wa_add is directly called instead of new wrapper [tvrtko] BSpec: 19363 HSDES: 1604555607 Signed-off-by: Michel Thierry Signed-off-by: Ramalingam C Reviewed-by: Tvrtko Ursulin [v5] Reviewed-by: Tvrtko Ursulin Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191128021005.3350-1-ramalingam.c@intel.com commit 11b7e986da28fb2a56c50dd97d074e7058bea015 Author: Daniel Vetter Date: Wed Nov 27 19:00:33 2019 +0100 drm/rockchip: Use drm_gem_fb_create_with_dirty If rockchip would switch over to the generic fbdev setup we could grabage collect even more of all this code (all of the remaining fb handling code really). v2: Actually use _with_dirty like the patch subject promised (Andrzej) Cc: Andrzej Pietrasiewicz Reviewed-by: Andrzej Pietrasiewicz Signed-off-by: Daniel Vetter Cc: Sandy Huang Cc: "Heiko Stübner" Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Link: https://patchwork.freedesktop.org/patch/msgid/20191127180035.416209-1-daniel.vetter@ffwll.ch commit fcaf49d0f2dce08208dfb545571ea02c8da6d97a Author: John Crispin Date: Thu Nov 28 08:22:00 2019 +0000 ath11k: fix indentation in ath11k_mac_prepare_he_mode() Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit 9c57d7e3b4882c29bbcf3e555a1f4163d6e55646 Author: Vasanthakumar Thiagarajan Date: Thu Nov 28 08:21:58 2019 +0000 ath11k: Setup REO destination ring before sending wmi_init command Firmware expects all the required REO destination rings setup while processing wmi_init command. Not doing this causes connected stations getting disconnected and not able to connect back. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo commit 0366f42640a4100198edcf03bf7625ee1c46f42b Author: Vasanthakumar Thiagarajan Date: Thu Nov 28 08:21:57 2019 +0000 ath11k: Move mac80211 hw allocation before wmi_init command This is to prepare REO ring setup before sending wmi_init command. Firmware expects all the required REO rings to be setup while processing wmi_init command. But as per the current initialization sequence, REO ring configurations are done only after wmi_init command is sent. Also refactoring ath11k_mac_create() into ath11k_mac_alloc() and ath11k_mac_register() to it mac80211 hw structure available before sending wmi_init command. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo commit b9269a078ae609f1315726f1ac4c7d3d8425384f Author: Venkateswara Naralasetty Date: Thu Nov 28 08:21:54 2019 +0000 ath11k: Skip update peer stats for management packets Currently HTT_PPDU_STATS_TAG_USR_COMPLTN_ACK_BA_STATUS tag of PPDU stats doesn't have valid success bytes info of management frames. So skip update peer stats for management packets. Signed-off-by: Venkateswara Naralasetty Signed-off-by: Kalle Valo commit a9e945eadf1759fd2255e952a0b57ac7bf04b4b0 Author: Venkateswara Naralasetty Date: Thu Nov 28 08:21:51 2019 +0000 ath11k: update tx duration in station info Update tx duration in station info form PPDU stats so that users can dump tx duration of the station. Signed-off-by: Venkateswara Naralasetty Signed-off-by: Kalle Valo commit 28dee8ef7645cdc3e19814ac909c7eff781b66a5 Author: Manikanta Pubbisetty Date: Thu Nov 28 08:21:50 2019 +0000 ath11k: fix vht guard interval mapping Guard interval value which comes from VHT_SIG_A TLV has a mapping where value 0 corresponds to LGI, 1 and 3 corresponds to SGI. Value 3 which is SGI(0.4us) in VHT was incorrectly mapped to a GI of 3.2us(only applicable in HE) resulting in incorrect rx GI stats. Fixing the mapping. Signed-off-by: Manikanta Pubbisetty Signed-off-by: Kalle Valo commit 5e02bc7354e1339ad801c7a2e31eb7f7bbeb7b22 Author: Miles Hu Date: Thu Nov 28 08:21:49 2019 +0000 ath11k: fix memory leak in monitor mode remove tail check to avoid last amsdu leak. recycle skb in ppdu id wrap around case Signed-off-by: Miles Hu Signed-off-by: Kalle Valo commit c000e56ee6b0b84e1ff33f6ee540e3b7be263ffa Author: Venkateswara Naralasetty Date: Thu Nov 28 08:21:47 2019 +0000 ath11k: Advertise MPDU start spacing as no restriction Adverise MPDU start spacing as no restriction in ht capabilities, Since IPQ8074 hw support all sorts of mpdu start spcing. With this observed minor uplink performance improvement in lower data frame size case with Veriwave clients. Signed-off-by: Venkateswara Naralasetty Signed-off-by: Kalle Valo commit a3c5195a97afdfff1f9ae0569c3a4cd98ebd5696 Author: Sriram R Date: Thu Nov 28 08:21:45 2019 +0000 ath11k: Update tx and rx chain count properly on drv_set_antenna Set the number of tx and rx chains properly on drv_set_antenna(). This will ensure the related ht/vht/he caps are properly recalculated based on the tx/rx chains set. Signed-off-by: Sriram R Signed-off-by: Kalle Valo commit 1cb616a3b497d6f8b8160a3fee97e822cdb38f39 Author: Sriram R Date: Wed Nov 27 14:09:00 2019 +0000 ath11k: add necessary peer assoc params in wmi dbg Add necessary peer assoc params in WMI debug message while sending the peer assoc command to firmware to aid in debugging. Signed-off-by: Sriram R Signed-off-by: Kalle Valo commit ba47923974fb67bf612b7a7c07c5884e95c5518b Author: Govindaraj Saminathan Date: Wed Nov 27 14:08:58 2019 +0000 ath11k: unlock mutex during failure in qmi fw ready qmi firmware ready event start to initialize the core modules and the sequence executed with mutex lock. In case of any failure mutex should be unlocked otherwise it will hang during the recovery. Signed-off-by: Govindaraj Saminathan Signed-off-by: Kalle Valo commit 64f1d7e94daaaf53208e9505448406b5c8fbbd8a Author: Maharaja Kennadyrajan Date: Wed Nov 27 14:08:57 2019 +0000 ath11k: add support for controlling tx power to a station This patch will add the support to control the transmit power for traffic to a station associated with the AP. Underlying firmware will enforce that the maximum tx power will be based on the regulatory requirements. If the user given transmit power is greater than the allowed tx power in the given channel, then the firmware will use the maximum tx power in the same channel. Max and Min tx power values will depends on number of tx chain masks. The allowed tx power range values are from 6 to 23. When 0 is sent to the firmware as tx power, it will revert to the default tx power for the station. Signed-off-by: Maharaja Kennadyrajan Signed-off-by: Kalle Valo commit fe201947f8bd4aed649a69e5faf0934652327804 Author: Venkateswara Naralasetty Date: Wed Nov 27 14:08:57 2019 +0000 ath11k: update bawindow size in delba process Currenly in delba process calling ath11k_peer_rx_tid_delete() updates reo with desc invalid and add tid queue to the flush list. If station send data traffic without addba req and before tid flush, hw gives those packets as invalid desc reo error. Since we are dropping these invalid desc packets results in traffic stall. This patch fix this issue by updating the reo queue with bawindow size 1 instead of tid removal in delba process. Signed-off-by: Venkateswara Naralasetty Signed-off-by: Kalle Valo commit 30679ec409189de89f55552a623c264091d72b66 Author: Karthikeyan Periyasamy Date: Wed Nov 27 14:08:53 2019 +0000 ath11k: avoid use_after_free in ath11k_dp_rx_msdu_coalesce API Accessing already stored first msdu data after the skb expand trigger use_after_free, since first msdu got deleted. so do the descriptor copy operation before the skb expand operation. Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Kalle Valo commit f425078b449f90793c73423e4bbc44da6aad48d6 Author: Karthikeyan Periyasamy Date: Wed Nov 27 14:08:52 2019 +0000 ath11k: avoid burst time conversion logic WMI_VDEV_SET_WMM_PARAMS commmand expects the txoplimit param in the units of 32 microseconds. convert the txop unit from 32 microseconds to absolute microseconds leads to the higher burst values which is incorrect. so no need to convert the txop unit from 32 microseconds to absolute microseconds. Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Kalle Valo commit d0f390eae07284939b10fe34edd45d4c59226783 Author: Anilkumar Kolli Date: Wed Nov 27 14:08:50 2019 +0000 ath11k: pktlog: fix sending/using the pdev id Fixes sending the pdev id(0,1,2 for mac0, mac1, mac2) to FW in wmi cmd pktlog enable/disable. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit 0c408515cd3b6fb980ec31213c0e55bbbe74d975 Author: Anilkumar Kolli Date: Wed Nov 27 14:08:50 2019 +0000 ath11k: qmi clean up in ath11k_qmi_wlanfw_wlan_cfg_send() Use pipe_id id instead of ret in for loop. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit d6af906d8307a804a1af488564def0264ea57282 Author: Anilkumar Kolli Date: Wed Nov 27 14:08:47 2019 +0000 ath11k: qmi clean up ce and HTC service config update Copy CE and htc service configs for all pipes. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit e8da3986570eff40e02bebcffd62fd3ccdf485db Author: Anilkumar Kolli Date: Wed Nov 27 14:08:45 2019 +0000 ath11k: tracing: fix ath11k tracing Add missing tracing subsystem define. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit 7321095ca39c8bb4da5e86f7a3fb8c22b47e5063 Author: Wen Gong Date: Wed Nov 27 06:04:13 2019 +0000 ath10k: enable wow feature for sdio chip sdio does not support wow, this patch is to enable it. When system enter sleep state, if wowlan is enabled, then sdio chip will keep power if platform support keep power, after resume, it will not need to re-load firmware again. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00029. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 5d2467299a17a2c13c2a1a608b72ec032f559914 Author: Wen Gong Date: Wed Nov 27 03:33:14 2019 +0000 ath10k: change log level for mpdu status of sdio chip Change log level from warn to dbg level of mpdu status of sdio chip. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 382e51c139ef9d0b8e65ff5c249771f864b411fd Author: Wen Gong Date: Wed Nov 27 03:19:24 2019 +0000 ath10k: set WMI_PEER_AUTHORIZE after a firmware crash After the firmware crashes ath10k recovers via ieee80211_reconfig(), which eventually leads to firmware configuration and including the encryption keys. However, because there is no new auth/assoc and 4-way-handshake, and firmware set the authorize flag after 4-way-handshake, so the authorize flag in firmware is not set in firmware without 4-way-handshake. This will lead to a failure of data transmission after recovery done when using encrypted connections like WPA-PSK. Set authorize flag after installing keys to firmware will fix the issue. This was noticed by testing firmware crashing using simulate_fw_crash debugfs file. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00007-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 376a30c7c9a05382d2cad09e9ff9b2998d0d53c3 Author: Wen Gong Date: Wed Nov 27 02:59:29 2019 +0000 ath10k: set max mtu to 1500 for sdio chip For sdio chip, the max credit size in firmware is 1556, the 1556 include payload, ieee80211 header, htt header, htc header. So it need to set the max mtu to 1500 to forbidden TX packet which exceed 1500 form application. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00017-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 7cbf4c96d7159e4abe762f4bafa9911fc1f7d339 Author: Wen Gong Date: Fri Nov 8 17:19:14 2019 +0800 ath10k: enable firmware log by default for sdio On SDIO chips the firmware log does not impact performance. To make it easier to debug firmware problems keep it enabled on the firmware. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00029. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 051cefa4466744cb669d7eef9399cbf850b2a6d4 Author: Vasanthakumar Thiagarajan Date: Wed Nov 27 18:30:09 2019 +0200 ath11k: Fix target crash due to WBM_IDLE_LINK ring desc shortage Make sure the number of WBM_IDLE_LINK ring descriptors is power of 2. This increases the number of descriptors to 32k from the current ~18k to fix the target assert because of the shortage in the descriptors in WBM_IDLE_LINK ring. Remove unnecessary power of 2 calculation in ath11k_dp_link_desc_setup() as it is not required after this change. Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Kalle Valo commit 79c647a3c59ddc1a1acf68e82e555201c10d3c18 Author: Vikas Patel Date: Wed Nov 27 18:30:07 2019 +0200 ath11k: Fixing TLV length issue in peer pktlog WMI command TLV length was 0 for TLV tag 'WMI_TAG_ARRAY_STRUCT' causing Q6 to crash when trying to configure pktlog filter via debugfs. Signed-off-by: Vikas Patel Signed-off-by: Kalle Valo commit d2f510fa0103a789b7fd310dbf14e0effa2f1fdf Author: Sriram R Date: Wed Nov 27 18:30:04 2019 +0200 ath11k: Fix skb_panic observed during msdu coalescing skb_panic is hit during msdu coalescing whenever enough tailroom is not allocated based on the remaining msdu length which is spread across in different rx buffers. Compute the extra length for resizing the skb based on the total msdu length and the msdu length of the first buffer. Signed-off-by: Sriram R Signed-off-by: Kalle Valo commit d12ac6c47a32b720d77181b8c2915be43c5be2d0 Author: Pradeep Kumar Chitrapu Date: Wed Nov 27 18:30:01 2019 +0200 ath11k: remove unused tx ring counters remove unused counter to avoid taking locks inorder to optimize cpu load. Using Flamegraph, cpu usage of ath11k_dp_tx() observed to be decreased from 5.58% to 3.74% with iperf traffic running with 80MHz bandwidth ap mode. Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo commit f1d34a01ed547793c223eb3df4849bdb19ff1d22 Author: Karthikeyan Periyasamy Date: Wed Nov 27 18:29:58 2019 +0200 ath11k: avoid WMM param truncation In conf_tx() mac operation callback, we are truncating the tx params cw_min and cw_max due to lower data type cast. so modified the data type of cwmin and cwmax to avoid the trucation issue. Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Kalle Valo commit 293cb5839729b186f951a82289aa5e0257c6d1b8 Author: John Crispin Date: Wed Nov 27 18:29:56 2019 +0200 ath11k: optimize RX path latency This patch drops ath11k_hal_rx_parse_dst_ring_desc(). This function was creating a huge amount of load, which lead to a signifcant latency delay when processing data in the RX path. Pegging the processing on a specific core and running perf --top we get the following output when running HE80 at a fixed bandwidth of 1gbit. with patch 19.19% [ath11k] [k] ath11k_dp_process_rx 5.02% [ath11k] [k] ath11k_dp_rx_tid_del_func 4.39% [kernel] [k] v7_dma_inv_range 4.15% [kernel] [k] __slab_alloc.constprop.1 4.03% [kernel] [k] dev_gro_receive 3.86% [kernel] [k] tcp_gro_receive 3.07% [ip_tables] [k] ipt_do_table 2.96% [kernel] [k] dma_cache_maint_page without patch 21.64% [ath11k] [k] ath11k_hal_rx_parse_dst_ring_desc 10.80% [ath11k] [k] ath11k_dp_process_rx 3.77% [kernel] [k] v7_dma_inv_range 3.48% [kernel] [k] dev_gro_receive 3.32% [ath11k] [k] ath11k_dp_rx_tid_del_func 3.17% [mac80211] [k] ieee80211_rx_napi 2.70% [kernel] [k] dma_cache_maint_page 2.65% [mac80211] [k] ieee80211_sta_ps_transition When removing the the bandwidth limit and rerunning the test we see an overall throughput improvement of 3-400mbit when running 4x4 HE80. Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit 0f37fbf43c3fc39a6c49c5a27846df937d217356 Author: Anilkumar Kolli Date: Wed Nov 27 18:29:53 2019 +0200 ath11k: update tcl cmd descriptor parameters for STA mode It is observed that ath11k STA mode UL throughput is low. This is due to packets delivered to FW from TCL instead of TQM. TCL AST search fail causes packet delivered to FW, fix this by properly configuring the TCL address search type and ast_hash. STA UL throughput is improved 10times with 11AC AP. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit 5b90fc760db5a969ed26d70f8e62c91915f012bd Author: Anilkumar Kolli Date: Wed Nov 27 18:29:50 2019 +0200 ath11k: fix wmi service ready ext tlv parsing The current ath11k driver failed to parse wmi_tlv_svc_rdy_ext_parse if there is change in wmi_mac_phy_capabilities length with below error. ath11k c000000.wifi1: failed to extract mac caps, idx :0 ath11k c000000.wifi1: failed to parse tlv -22 This is needed to get firmware version WLAN.HK.2.0.0.1-00240-QCAHKSWPL_SILICONZ-1 working. Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo commit 5e97128759b49b32740e1486007f239f2d7a9b8a Author: Karthikeyan Periyasamy Date: Wed Nov 27 18:29:47 2019 +0200 ath11k: fix resource leak in ath11k_mac_sta_state Handled the error case with proper resource cleanup and moved the handling into a separate function from ath11k_mac_sta_state. Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Kalle Valo commit 86d4def890fdc25cee378c346dc31ca2ee0ef713 Author: Ganesh Sesetti Date: Wed Nov 27 18:29:45 2019 +0200 ath11k: Fix htt stats sounding info and pdev cca stats The Previous configuartion of htt stats sounding info and pdev cca stats are invalid due to that getting time out error. Changing htt stats sounding info value from 0xFF to 0x00 and htt pdev cca stats from 0x10 to 0x00 Signed-off-by: Ganesh Sesetti Signed-off-by: Kalle Valo commit c5105d764e0214bcc4c6d40d7ba231d01b2e9dda Author: Zhenzhong Duan Date: Wed Nov 27 16:37:28 2019 +0800 sched/clock: Use static_branch_likely() with sched_clock_running sched_clock_running is enabled early at bootup stage and never disabled. So hint that to the compiler by using static_branch_likely() rather than static_branch_unlikely(). The branch probability mis-annotation was introduced in the original commit that converted the plain sched_clock_running flag to a static key: 46457ea464f5 ("sched/clock: Use static key for sched_clock_running") Steve further notes: | Looks like the confusion was the moving of the "!": | | - if (unlikely(!sched_clock_running)) | + if (!static_branch_unlikely(&sched_clock_running)) | | Where, it was unlikely that !sched_clock_running would be true, but | because the "!" was moved outside the "unlikely()" it makes the test | "likely()". That is, if we added an intermediate step, it would have | been: | | if (!likely(sched_clock_running)) | | which would have prevented the mistake that this patch fixes. [ mingo: Edited the changelog. ] Signed-off-by: Zhenzhong Duan Reviewed-by: Steven Rostedt (VMware) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bsegall@google.com Cc: dietmar.eggemann@arm.com Cc: juri.lelli@redhat.com Cc: mgorman@suse.de Cc: vincent.guittot@linaro.org Link: https://lkml.kernel.org/r/1574843848-26825-1-git-send-email-zhenzhong.duan@oracle.com Signed-off-by: Ingo Molnar commit 952d1a6b0f839e0b5aba33b4799d5bc679a5e60c Author: Chris Wilson Date: Thu Nov 28 18:54:01 2019 +0000 drm/i915/selftests: Drop local vm reference! After obtaining a local reference to the vm from the context, remember to drop it before it goes out of scope! Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191128185402.110678-1-chris@chris-wilson.co.uk commit 22cc6b7a1dbb58da4afc539d9b7d470b23a25eea Author: Johan Hovold Date: Thu Nov 28 19:24:27 2019 +0100 Bluetooth: btusb: fix non-atomic allocation in completion handler USB completion handlers are called in atomic context and must specifically not allocate memory using GFP_KERNEL. Fixes: a1c49c434e15 ("Bluetooth: btusb: Add protocol support for MediaTek MT7668U USB devices") Cc: stable # 5.3 Cc: Sean Wang Signed-off-by: Johan Hovold Signed-off-by: Marcel Holtmann commit 94fee4a74d04b4298892850287c2a879dbd01e2a Author: Daniel Vetter Date: Tue Nov 26 15:52:13 2019 +0100 drm/rect: update kerneldoc for drm_rect_clip_scaled() This was forgotten in f96bdf564f3e ("drm/rect: Handle rounding errors in drm_rect_clip_scaled, v3.") Spotted while reviewing patches from Ville touching this area. Reviewed-by: Ville Syrjälä Fixes: f96bdf564f3e ("drm/rect: Handle rounding errors in drm_rect_clip_scaled, v3.") Cc: Maarten Lankhorst Cc: Benjamin Gaignard Cc: Ville Syrjala Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191126145213.380079-1-daniel.vetter@ffwll.ch commit 212d9994d0b5b951fcdb8ce454c8d91521ae20d6 Author: Chris Wilson Date: Wed Nov 27 22:32:50 2019 +0000 drm/i915/selftests: Count the number of engines used Don't rely on the RUNTIME_INFO() when we loop over a particular context and only run on a filtered set of engines. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191127223252.3777141-1-chris@chris-wilson.co.uk commit 7983990ca94ab69de6c769dd48da1bba91def53c Author: Chris Wilson Date: Thu Nov 28 10:25:46 2019 +0000 drm/i915/selftests: Try to show where the pulse went We have a case of a mysteriously absent pulse, so dump the engine details to see if we can find out what happened to it. References: https://bugs.freedesktop.org/show_bug.cgi?id=112405 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191128102546.3857140-1-chris@chris-wilson.co.uk commit cd30a5031704aa8d833f62c8475a2f6d42a688a7 Author: Chris Wilson Date: Thu Nov 28 11:34:24 2019 +0000 drm/i915/gem: Excise the per-batch whitelist from the context One does not lightly add a new hidden struct_mutex dependency deep within the execbuf bowels! The immediate suspicion in seeing the whitelist cached on the context, is that it is intended to be preserved between batches, as the kernel is quite adept at caching small allocations itself. But no, it's sole purpose is to serialise command submission in order to save a kmalloc on a slow, slow path! By removing the whitelist dependency from the context, our freedom to chop the big struct_mutex is greatly augmented. v2: s/set_bit/__set_bit/ as the whitelist shall never be accessed concurrently. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Joonas Lahtinen Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191128113424.3885958-1-chris@chris-wilson.co.uk commit 30218eb77d6b9a89e08ad9ea19b35c6bf1be468e Author: Ville Syrjälä Date: Fri Nov 22 19:56:23 2019 +0200 drm/selftests: Add drm_rect selftests Add selftests for drm_rect. A few basic ones for clipped and unclipped cases, and a few special ones for specific bugs we had in the code. I'm too lazy to think of more corner cases to check at this time. Maybe later. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191122175623.13565-5-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Reviewed-by: Benjamin Gaignard commit 2020af2dbf734a16886d5e9e1f65841641db5f33 Author: Ville Syrjälä Date: Fri Nov 22 19:56:22 2019 +0200 drm/rect: Keep the clipped dst rectangle in place Now that we've constrained the clipped source rectangle such that it can't have negative dimensions doing the same for the dst rectangle seems appropriate. Should at least result in the clipped src and dst rectangles being a bit more consistent with each other. Cc: Benjamin Gaignard Cc: Maarten Lankhorst Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191122175623.13565-4-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Reviewed-by: Benjamin Gaignard commit 2e351705f18a80dea6398233ac21a02aff5b0597 Author: Ville Syrjälä Date: Fri Nov 22 19:56:21 2019 +0200 drm/rect: Keep the scaled clip bounded Limit the scaled clip to only clip at most dst_w/h pixels. This avoids the problem with clip_scaled() not being able to return negative values. Since new_src_w/h is now properly bounded we can remove the clamp()s. Cc: Benjamin Gaignard Cc: Maarten Lankhorst Cc: Daniel Vetter Testcase: igt/kms_selftest/drm_rect_clip_scaled_signed_vs_unsigned Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191122175623.13565-3-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Reviewed-by: Benjamin Gaignard commit 433480c1afd44f3e1e664b85063d98cefeefa0ed Author: Ville Syrjälä Date: Fri Nov 22 19:56:20 2019 +0200 drm/rect: Avoid division by zero Check for zero width/height destination rectangle in drm_rect_clip_scaled() to avoid a division by zero. Cc: stable@vger.kernel.org Fixes: f96bdf564f3e ("drm/rect: Handle rounding errors in drm_rect_clip_scaled, v3.") Cc: Maarten Lankhorst Cc: Benjamin Gaignard Cc: Daniel Vetter Testcase: igt/kms_selftest/drm_rect_clip_scaled_div_by_zero Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191122175623.13565-2-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Reviewed-by: Benjamin Gaignard commit 96227287fd3662a406117d1d56d0b9186279bfe7 Author: Daniel Vetter Date: Tue Nov 26 10:14:14 2019 +0100 drm/fourcc: Fill out all block sizes for P210 0 means 1 as the default, but it's mighty confusing if the block size for the first plane is spelled out explicitly, but not for the 2nd plane. No cc: stable because this is just confusion, but 0 functional issue. Acked-by: Liviu Dudau Fixes: 7ba0fee247ee ("drm/fourcc: Add AFBC yuv fourccs for Mali") Cc: Brian Starkey Cc: Ayan Kumar Halder Cc: Liviu Dudau Cc: Alyssa Rosenzweig Cc: Maarten Lankhorst Cc: Maxime Ripard Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191126091414.226070-2-daniel.vetter@ffwll.ch commit 836b131d2cbb15b0615693851dfd97c3ca2ab75f Author: Daniel Vetter Date: Tue Nov 26 10:14:13 2019 +0100 drm/fourcc: Fill out all block sizes for P10/12/16 0 means 1 as the default, but it's mighty confusing if the block size for the first plane is spelled out explicitly, but not for the 2nd plane. No cc: stable because this is just confusion, but 0 functional issue. Acked-by: Liviu Dudau Fixes: 05f8bc82fc42 ("drm/fourcc: Add new P010, P016 video format") Cc: Daniel Stone Cc: Ville Syrjälä Cc: Randy Li Cc: Clint Taylor Cc: Ayan Kumar Halder Cc: Neil Armstrong Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191126091414.226070-1-daniel.vetter@ffwll.ch commit 3cd9d35ee5f7a23203443f1a0d3c344f034c0dc7 Author: Abhishek Pandit-Subedi Date: Wed Nov 27 14:45:09 2019 -0800 dt-bindings: net: bluetooth: Minor fix in broadcom-bluetooth The example for brcm,bt-pcm-int-params should be a bytestring and all values need to be two hex characters. Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 6cc7203a6d82b73c7bbe17567ee5798c9009661b Author: Mihail Atanassov Date: Wed Nov 27 17:05:32 2019 +0000 drm/mediatek: Fix build break Caused by file removal without adjusting the Makefile. Fixes: d268f42e6856 ("drm/mediatek: don't open-code drm_gem_fb_create") Cc: Daniel Vetter Cc: CK Hu Cc: Philipp Zabel Cc: Matthias Brugger Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Mihail Atanassov Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191127170513.42251-1-mihail.atanassov@arm.com commit e3f3a0f26932b7a3f997b9e969a4663da6eb2429 Author: Chris Wilson Date: Wed Nov 27 11:58:13 2019 +0000 drm/i915/gt: Defer breadcrumb processing to after the irq handler The design of our interrupt handlers is that we ack the receipt of the interrupt first, inside the critical section where the master interrupt control is off and other cpus cannot start processing the next interrupt; and then process the interrupt events afterwards. However, Icelake introduced a whole new set of banked GT_IIR that are inherently serialised and slow to retrieve the IIR and must be processed within the critical section. We can still push our breadcrumbs out of this critical section by using our irq_worker. On bdw+, this should not make too much of a difference as we only slightly defer the breadcrumbs, but on icl+ this should make a big difference to our throughput of interrupts from concurrently executing engines. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191127115813.3345823-1-chris@chris-wilson.co.uk commit df9f85d8582ebda052835c55ae940e4f866e1ef5 Author: Chris Wilson Date: Wed Nov 27 13:45:27 2019 +0000 drm/i915: Serialise i915_active_fence_set() with itself The expected downside to commit 58b4c1a07ada ("drm/i915: Reduce nested prepare_remote_context() to a trylock") was that it would need to return -EAGAIN to userspace in order to resolve potential mutex inversion. Such an unsightly round trip is unnecessary if we could atomically insert a barrier into the i915_active_fence, so make it happen. Currently, we use the timeline->mutex (or some other named outer lock) to order insertion into the i915_active_fence (and so individual nodes of i915_active). Inside __i915_active_fence_set, we only need then serialise with the interrupt handler in order to claim the timeline for ourselves. However, if we remove the outer lock, we need to ensure the order is intact between not only multiple threads trying to insert themselves into the timeline, but also with the interrupt handler completing the previous occupant. We use xchg() on insert so that we have an ordered sequence of insertions (and each caller knows the previous fence on which to wait, preserving the chain of all fences in the timeline), but we then have to cmpxchg() in the interrupt handler to avoid overwriting the new occupant. The only nasty side-effect is having to temporarily strip off the RCU-annotations to apply the atomic operations, otherwise the rules are much more conventional! Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112402 Fixes: 58b4c1a07ada ("drm/i915: Reduce nested prepare_remote_context() to a trylock") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191127134527.3438410-1-chris@chris-wilson.co.uk commit ef39ac1b0d9f523b66757dfc080ecdbed688d669 Author: Govind Singh Date: Mon Nov 25 13:10:01 2019 +0000 ath10k: move non-fatal warn logs to dbg level During driver load below warn logs are printed in the console if firmware doesn't support some optional HTC services, ex:pktlog. It is likely some older fw version may not support PKTLOG HTC service as legacy fw uses HTC DATA service for pktlog. Move this log to debug level to remove un-necessary warn message on console. htc.c:803: ath10k_warn(ar, "unsupported HTC service id: %d\n", htc.c:881: ath10k_warn(ar, "unsupported HTC service id: %d\n", Signed-off-by: Govind Singh Signed-off-by: Kalle Valo commit 3f8be640077a33ef3bd717ade8b50bd0ef815ba9 Author: John Crispin Date: Mon Nov 25 16:36:29 2019 +0000 ath11k: add spatial reuse support Trigger the WMI call en/disabling OBSS PD when the bss config changes or we assoc to an AP that broadcasts the IE. Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit 6d293d447670da6325cc9c8fb809878d1930c234 Author: John Crispin Date: Mon Nov 25 16:36:28 2019 +0000 ath11k: add TWT support Add target wait time wmi calls to the driver. En/disable the support from when the bss_config changes. We ignore the cmd completion events. Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit 9f056ed8ee01ad6898db49707cdc70ce923be3d0 Author: John Crispin Date: Mon Nov 25 16:36:27 2019 +0000 ath11k: add HE support Add basic HE support to the driver. The sband_iftype data is generated from the capabilities read from the FW. Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit 33782a3c379ede6ed443873eae69a0989f5a65ba Author: Tamizh chelvam Date: Mon Nov 25 16:36:25 2019 +0000 ath11k: Remove dead code while handling amsdu packets Remove unexecuted code while handling amsdu packets. The same logic is done before calling ath11k_dp_rx_msdu_coalesce Signed-off-by: Tamizh chelvam Signed-off-by: Kalle Valo commit 39e81c6a2907eff835247d61c0f467327ab6d6c0 Author: Tamizh chelvam Date: Mon Nov 25 16:36:23 2019 +0000 ath11k: fix missed bw conversion in tx completion TX rate stats for the retried packets for a station comes through tx completion events. Assigning hw reported bandwidth information directly to station's txrate bandwidth will cause below warning. Fix this warning by converting the hw reported bandwidth to mac80211 base bandwidth. [ 134.758190] PC is at cfg80211_calculate_bitrate+0x1bc/0x214 [cfg80211] [ 134.765730] LR is at cfg80211_calculate_bitrate+0x1bc/0x214 [cfg80211] [ 134.875014] [] cfg80211_calculate_bitrate+0x1bc/0x214 [cfg80211] [ 134.877192] [] nl80211_put_sta_rate+0x54/0xf24 [cfg80211] [ 134.884829] [] nl80211_put_sta_rate+0x698/0xf24 [cfg80211] [ 134.891687] [] nl80211_put_sta_rate+0xde0/0xf24 [cfg80211] [ 134.898975] [] genl_lock_dumpit+0x30/0x4c [ 134.905998] [] netlink_dump+0xf4/0x248 [ 134.911291] [] __netlink_dump_start+0xe0/0x174 [ 134.916850] [] genl_family_rcv_msg+0x130/0x2c0 Signed-off-by: Tamizh chelvam Signed-off-by: Kalle Valo commit 2dab7d221e88c83f88af5996d811dea62512dff2 Author: John Crispin Date: Mon Nov 25 16:36:21 2019 +0000 ath11k: convert message from info to dbg We can regularly see the following message. - "ath11k c000000.wifi1: failed to find the peer with peer_id 4" This happens when the FW starts sending stats for the peer whilst the peer is not fully associated. Convert this info message to a debug one. Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit 9cfbae4632faf26ab43f65f3beaf59a00dc699f6 Author: John Crispin Date: Mon Nov 25 16:36:19 2019 +0000 ath11k: ignore event 0x6017 Everytime a new peer gets associated, we see the following message in the log - ath11k c000000.wifi1: Unknown eventid: 0x6017 Ignore this event for now. We probably need to handle the event properly when we add OMI support. Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit e4eb7b5c335ccfdb5c2a9a2004aca7cb81e0d577 Author: John Crispin Date: Mon Nov 25 16:36:18 2019 +0000 ath11k: add RX stats support for radiotap mac80211 expects the definition of what HE rate info is available inside a struct prepended to the skb. Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit 135517d3565b48f4def3b1b82008bc17eb5d1c90 Author: Andrey Grodzovsky Date: Mon Nov 25 15:51:29 2019 -0500 drm/scheduler: Avoid accessing freed bad job. Problem: Due to a race between drm_sched_cleanup_jobs in sched thread and drm_sched_job_timedout in timeout work there is a possiblity that bad job was already freed while still being accessed from the timeout thread. Fix: Instead of just peeking at the bad job in the mirror list remove it from the list under lock and then put it back later when we are garanteed no race with main sched thread is possible which is after the thread is parked. v2: Lock around processing ring_mirror_list in drm_sched_cleanup_jobs. v3: Rebase on top of drm-misc-next. v2 is not needed anymore as drm_sched_get_cleanup_job already has a lock there. v4: Fix comments to relfect latest code in drm-misc. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Reviewed-by: Emily Deng Tested-by: Emily Deng Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/342356 commit 730eaeb5242614eb202dd3ae4cebad3d2438db38 Author: Chris Wilson Date: Wed Nov 27 09:56:57 2019 +0000 drm/i915/gt: Manual rc6 entry upon parking Now that we rapidly park the GT when the GPU idles, we often find ourselves idling faster than the RC6 promotion timer. Thus if we tell the GPU to enter RC6 manually as we park, we can do so quicker (by around 50ms, half an EI on average) and marginally increase our powersaving across all execlists platforms. v2: Now with a selftest to check we can enter RC6 manually Signed-off-by: Chris Wilson Cc: Andi Shyti Cc: Mika Kuoppala Cc: Imre Deak Acked-by: Imre Deak Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191127095657.3209854-1-chris@chris-wilson.co.uk commit eb762b94111b646b4f116ebfdbfcadbad14e12b3 Author: Abhishek Pandit-Subedi Date: Tue Nov 26 08:17:32 2019 +0100 Bluetooth: hci_bcm: Support pcm params in dts BCM chips may require configuration of PCM to operate correctly and there is a vendor specific HCI command to do this. Add support in the hci_bcm driver to parse this from devicetree and configure the chip. Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 6fc0e19036d6198b9287bb74c0c9df7c17ec8c2e Author: Abhishek Pandit-Subedi Date: Tue Nov 26 08:17:31 2019 +0100 dt-bindings: net: bluetooth: update broadcom-bluetooth Add documentation for brcm,bt-pcm-int-params vendor specific configuration of the SCO PCM settings. Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 528379902337102b0264fe5343eafb3d6c59fa45 Author: Abhishek Pandit-Subedi Date: Tue Nov 26 08:17:30 2019 +0100 Bluetooth: btbcm: Support pcm configuration Add BCM vendor specific command to configure PCM parameters. The new vendor opcode allows us to set the sco routing, the pcm interface rate, and a few other pcm specific options (frame sync, sync mode, and clock mode). See broadcom-bluetooth.txt in Documentation for more information about valid values for those settings. Here is an example trace where this opcode was used to configure a BCM4354: < HCI Command: Vendor (0x3f|0x001c) plen 5 01 02 00 01 01 > HCI Event: Command Complete (0x0e) plen 4 Vendor (0x3f|0x001c) ncmd 1 Status: Success (0x00) We can read back the values as well with ocf 0x001d to confirm the values that were set: $ hcitool cmd 0x3f 0x001d < HCI Command: ogf 0x3f, ocf 0x001d, plen 0 > HCI Event: 0x0e plen 9 01 1D FC 00 01 02 00 01 01 Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 5d6f391073d5c1c903ac12be72c66b96b2ae93f4 Author: Abhishek Pandit-Subedi Date: Tue Nov 26 08:17:29 2019 +0100 Bluetooth: hci_bcm: Disallow set_baudrate for BCM4354 Without updating the patchram, the BCM4354 does not support a higher operating speed. The normal bcm_setup follows the correct order (init_speed, patchram and then oper_speed) but the serdev driver will set the operating speed before calling the hu->setup function. Thus, for the BCM4354, don't set the operating speed before patchram. Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 8082731830a0b95f7f7a63b78de67de446013c80 Author: Gurchetan Singh Date: Tue Nov 26 10:43:39 2019 -0800 drm/vram: remove unused declaration Commit b0e40e080522 ("vram: Have VRAM MM call GEM VRAM functions directly") removed this. Signed-off-by: Gurchetan Singh Signed-off-by: Thomas Zimmermann Reviewed-by: Thomas Zimmermann Fixes: b0e40e080522 ("drm/vram: Have VRAM MM call GEM VRAM functions directly") Cc: Gerd Hoffmann Cc: Dave Airlie Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Cc: Hans de Goede Cc: "Christian König" Cc: Alex Deucher Cc: Sam Ravnborg Cc: Thomas Gleixner Cc: virtualization@lists.linux-foundation.org Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20191126184339.337-1-gurchetansingh@chromium.org commit f66c0447cca1281116224d474cdb37d6a18e4b5b Author: Masami Hiramatsu Date: Wed Nov 27 14:57:04 2019 +0900 kprobes: Set unoptimized flag after unoptimizing code Set the unoptimized flag after confirming the code is completely unoptimized. Without this fix, when a kprobe hits the intermediate modified instruction (the first byte is replaced by an INT3, but later bytes can still be a jump address operand) while unoptimizing, it can return to the middle byte of the modified code, which causes an invalid instruction exception in the kernel. Usually, this is a rare case, but if we put a probe on the function call while text patching, it always causes a kernel panic as below: # echo p text_poke+5 > kprobe_events # echo 1 > events/kprobes/enable # echo 0 > events/kprobes/enable invalid opcode: 0000 [#1] PREEMPT SMP PTI RIP: 0010:text_poke+0x9/0x50 Call Trace: arch_unoptimize_kprobe+0x22/0x28 arch_unoptimize_kprobes+0x39/0x87 kprobe_optimizer+0x6e/0x290 process_one_work+0x2a0/0x610 worker_thread+0x28/0x3d0 ? process_one_work+0x610/0x610 kthread+0x10d/0x130 ? kthread_park+0x80/0x80 ret_from_fork+0x3a/0x50 text_poke() is used for patching the code in optprobes. This can happen even if we blacklist text_poke() and other functions, because there is a small time window during which we show the intermediate code to other CPUs. [ mingo: Edited the changelog. ] Tested-by: Alexei Starovoitov Signed-off-by: Masami Hiramatsu Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: bristot@redhat.com Fixes: 6274de4984a6 ("kprobes: Support delayed unoptimizing") Link: https://lkml.kernel.org/r/157483422375.25881.13508326028469515760.stgit@devnote2 Signed-off-by: Ingo Molnar commit 285a54efe3861976af9d15e85ff8c91a78d1407b Author: Masami Hiramatsu Date: Wed Nov 27 14:56:52 2019 +0900 x86/alternatives: Sync bp_patching update for avoiding NULL pointer exception ftracetest multiple_kprobes.tc testcase hits the following NULL pointer exception: BUG: kernel NULL pointer dereference, address: 0000000000000000 PGD 800000007bf60067 P4D 800000007bf60067 PUD 7bf5f067 PMD 0 Oops: 0000 [#1] PREEMPT SMP PTI RIP: 0010:poke_int3_handler+0x39/0x100 Call Trace: do_int3+0xd/0xf0 int3+0x42/0x50 RIP: 0010:sched_clock+0x6/0x10 poke_int3_handler+0x39 was alternatives:958: static inline void *text_poke_addr(struct text_poke_loc *tp) { return _stext + tp->rel_addr; <------ Here is line #958 } This seems to be caused by tp (bp_patching.vec) being NULL but bp_patching.nr_entries != 0. There is a small chance for this to happen, because we have no synchronization between the zeroing of bp_patching.nr_entries and before clearing bp_patching.vec. Steve suggested we could fix this by adding sync_core(), because int3 is done with interrupts disabled, and the on_each_cpu() requires all CPUs to have had their interrupts enabled. [ mingo: Edited the comments and the changelog. ] Suggested-by: Steven Rostedt (VMware) Tested-by: Alexei Starovoitov Signed-off-by: Masami Hiramatsu Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bristot@redhat.com Fixes: c0213b0ac03c ("x86/alternative: Batch of patch operations") Link: https://lkml.kernel.org/r/157483421229.25881.15314414408559963162.stgit@devnote2 Signed-off-by: Ingo Molnar commit 76ffa7204b1ad7d321ac3a0292fdf3975d14866b Author: Peter Zijlstra Date: Mon Nov 11 14:08:26 2019 +0100 x86/alternatives: Use INT3_INSN_SIZE Use INT3_INSN_SIZE instead of sizeof(int3). Suggested-by: Ingo Molnar Tested-by: Alexei Starovoitov Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Acked-by: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191111132458.460144656@infradead.org Signed-off-by: Ingo Molnar commit f2cb4f95b7571f2bebcf226cd92b448fd58950ca Author: Peter Zijlstra Date: Mon Nov 11 14:02:10 2019 +0100 x86/kprobe: Add comments to arch_{,un}optimize_kprobes() Add a few words describing how it is safe to overwrite the 4 bytes after a kprobe. In specific it is possible the JMP.d32 required for the optimized kprobe overwrites multiple instructions. Tested-by: Alexei Starovoitov Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Acked-by: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191111132458.401696663@infradead.org Signed-off-by: Ingo Molnar commit 04ae87a52074e2d448fc66143f1bd2c7d694d2b9 Author: Peter Zijlstra Date: Thu Oct 24 22:26:59 2019 +0200 ftrace: Rework event_create_dir() Rework event_create_dir() to use an array of static data instead of function pointers where possible. The problem is that it would call the function pointer on module load before parse_args(), possibly even before jump_labels were initialized. Luckily the generated functions don't use jump_labels but it still seems fragile. It also gets in the way of changing when we make the module map executable. The generated function are basically calling trace_define_field() with a bunch of static arguments. So instead of a function, capture these arguments in a static array, avoiding the function call. Now there are a number of cases where the fields are dynamic (syscall arguments, kprobes and uprobes), in which case a static array does not work, for these we preserve the function call. Luckily all these cases are not related to modules and so we can retain the function call for them. Also fix up all broken tracepoint definitions that now generate a compile error. Tested-by: Alexei Starovoitov Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Acked-by: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191111132458.342979914@infradead.org Signed-off-by: Ingo Molnar commit 958de668197651bbf2b4b9528f204ab5a0f1af65 Author: Peter Zijlstra Date: Tue Oct 15 21:07:31 2019 +0200 module: Remove set_all_modules_text_*() Now that there are no users of set_all_modules_text_*() left, remove it. While it appears nds32 uses it, it does not have STRICT_MODULE_RWX and therefore ends up with the NOP stubs. Tested-by: Alexei Starovoitov Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Acked-by: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Greentime Hu Cc: H. Peter Anvin Cc: Jessica Yu Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vincent Chen Link: https://lkml.kernel.org/r/20191111132458.284298307@infradead.org Signed-off-by: Ingo Molnar commit 5a735583b764750726621b0396d03e4782911b77 Author: Peter Zijlstra Date: Tue Oct 15 21:07:35 2019 +0200 arm/ftrace: Use __patch_text() Instead of flipping text protection, use the patch_text infrastructure that uses a fixmap alias where required. This removes the last user of set_all_modules_text_*(). Tested-by: Will Deacon Signed-off-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Mark Rutland Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: ard.biesheuvel@linaro.org Cc: james.morse@arm.com Cc: rabin@rab.in Link: https://lkml.kernel.org/r/20191113092636.GG4131@hirez.programming.kicks-ass.net Signed-off-by: Ingo Molnar commit 5c02ece81848db29b411139cc923d66050a6a40c Author: Peter Zijlstra Date: Wed Oct 9 21:15:28 2019 +0200 x86/kprobes: Fix ordering while text-patching Kprobes does something like: register: arch_arm_kprobe() text_poke(INT3) /* guarantees nothing, INT3 will become visible at some point, maybe */ kprobe_optimizer() /* guarantees the bytes after INT3 are unused */ synchronize_rcu_tasks(); text_poke_bp(JMP32); /* implies IPI-sync, kprobe really is enabled */ unregister: __disarm_kprobe() unoptimize_kprobe() text_poke_bp(INT3 + tail); /* implies IPI-sync, so tail is guaranteed visible */ arch_disarm_kprobe() text_poke(old); /* guarantees nothing, old will maybe become visible */ synchronize_rcu() free-stuff Now the problem is that on register, the synchronize_rcu_tasks() does not imply sufficient to guarantee all CPUs have already observed INT3 (although in practice this is exceedingly unlikely not to have happened) (similar to how MEMBARRIER_CMD_PRIVATE_EXPEDITED does not imply MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE). Worse, even if it did, we'd have to do 2 synchronize calls to provide the guarantee we're looking for, the first to ensure INT3 is visible, the second to guarantee nobody is then still using the instruction bytes after INT3. Similar on unregister; the synchronize_rcu() between __unregister_kprobe_top() and __unregister_kprobe_bottom() does not guarantee all CPUs are free of the INT3 (and observe the old text). Therefore, sprinkle some IPI-sync love around. This guarantees that all CPUs agree on the text and RCU once again provides the required guaranteed. Tested-by: Alexei Starovoitov Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Mathieu Desnoyers Acked-by: Masami Hiramatsu Acked-by: Alexei Starovoitov Acked-by: Paul E. McKenney Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191111132458.162172862@infradead.org Signed-off-by: Ingo Molnar commit ab09e95ca0c697e67f986c4a45a179abf47e7bfc Author: Peter Zijlstra Date: Wed Oct 9 13:57:17 2019 +0200 x86/kprobes: Convert to text-patching.h Convert kprobes to the new text-poke naming. Tested-by: Alexei Starovoitov Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Acked-by: Masami Hiramatsu Acked-by: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191111132458.103959370@infradead.org Signed-off-by: Ingo Molnar commit 38ebd8d119245eecb99fe00b0f57e269baf22767 Author: Borislav Petkov Date: Mon Nov 18 18:20:12 2019 +0100 x86/ftrace: Mark ftrace_modify_code_direct() __ref ... because it calls the .init.text function text_poke_early(). That is ok because it does call that function early, during boot. Fixes: 9706f7c3531f ("x86/ftrace: Use text_poke()") Suggested-by: Peter Zijlstra Signed-off-by: Borislav Petkov Acked-by: Steven Rostedt (VMware) Cc: Alexei Starovoitov Cc: Andy Lutomirski Cc: Daniel Bristot de Oliveira Cc: H. Peter Anvin Cc: Ingo Molnar Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191116204607.GC23231@zn.tnic commit 4531ef6a8aaf132aa32e2e26670c652942540633 Author: Peter Zijlstra Date: Wed Oct 9 12:26:53 2019 +0200 x86/alternative: Shrink text_poke_loc Employ the fact that all text must be within a s32 displacement of one another to shrink the text_poke_loc::addr field. Make it relative to _stext. This then shrinks struct text_poke_loc to 16 bytes, and consequently increases TP_VEC_MAX from 170 to 256. Tested-by: Alexei Starovoitov Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Acked-by: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191111132458.047052889@infradead.org Signed-off-by: Ingo Molnar commit 97e6c977ccf128c3f34d6084ad53fc0021f90e03 Author: Peter Zijlstra Date: Wed Oct 9 12:44:20 2019 +0200 x86/alternative: Remove text_poke_loc::len Per the BUG_ON(len != insn.length) in text_poke_loc_init(), tp->len must indeed be the same as text_opcode_size(tp->opcode). Use this to remove this field from the structure. Sadly, due to 8 byte alignment, this only increases the structure padding. Tested-by: Alexei Starovoitov Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Acked-by: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191111132457.989922744@infradead.org Signed-off-by: Ingo Molnar commit 67c1d4a28064f9ec63df03f7798e4a334176a9cd Author: Peter Zijlstra Date: Wed Oct 9 12:44:14 2019 +0200 x86/ftrace: Use text_gen_insn() Replace the ftrace_code_union with the generic text_gen_insn() helper, which does exactly this. Tested-by: Alexei Starovoitov Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Acked-by: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191111132457.932808000@infradead.org Signed-off-by: Ingo Molnar commit 254d2c04515ea4532a503cc5d8649e1513042e56 Author: Peter Zijlstra Date: Wed Oct 9 12:44:17 2019 +0200 x86/alternative: Add text_opcode_size() Introduce a common helper to map *_INSN_OPCODE to *_INSN_SIZE. Tested-by: Alexei Starovoitov Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Acked-by: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191111132457.875666061@infradead.org Signed-off-by: Ingo Molnar commit c12af4407fa5a3fc6396bde379e0882a132df49b Author: Peter Zijlstra Date: Mon Sep 2 10:16:12 2019 +0200 x86/mm: Remove set_kernel_text_r[ow]() With the last and only user of these functions gone (ftrace) remove them as well to avoid ever growing new users. Tested-by: Alexei Starovoitov Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Acked-by: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191111132457.819095320@infradead.org Signed-off-by: Ingo Molnar commit 768ae4406a5cab7e8702550f2446dbeb377b798d Author: Peter Zijlstra Date: Mon Aug 26 14:48:23 2019 +0200 x86/ftrace: Use text_poke() Move ftrace over to using the generic x86 text_poke functions; this avoids having a second/different copy of that code around. This also avoids ftrace violating the (new) W^X rule and avoids fragmenting the kernel text page-tables, due to no longer having to toggle them RW. Tested-by: Alexei Starovoitov Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Acked-by: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Daniel Bristot de Oliveira Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191111132457.761255803@infradead.org Signed-off-by: Ingo Molnar commit 63f62addb88ec4b358cf4574789bc3180c689e9a Author: Peter Zijlstra Date: Thu Oct 3 14:50:42 2019 +0200 x86/alternatives: Add and use text_gen_insn() helper Provide a simple helper function to create common instruction encodings. Tested-by: Alexei Starovoitov Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Acked-by: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Daniel Bristot de Oliveira Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Steven Rostedt Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191111132457.703538332@infradead.org Signed-off-by: Ingo Molnar commit 18cbc8bed0c70795d2064217c89894e28eafdf04 Author: Peter Zijlstra Date: Mon Aug 26 13:38:58 2019 +0200 x86/alternatives, jump_label: Provide better text_poke() batching interface Adding another text_poke_bp_batch() user made me realize the interface is all sorts of wrong. The text poke vector should be internal to the implementation. This then results in a trivial interface: text_poke_queue() - which has the 'normal' text_poke_bp() interface text_poke_finish() - which takes no arguments and flushes any pending text_poke()s. Tested-by: Alexei Starovoitov Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Masami Hiramatsu Reviewed-by: Daniel Bristot de Oliveira Acked-by: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Steven Rostedt Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191111132457.646280715@infradead.org Signed-off-by: Ingo Molnar commit 8f4a4160c618434e76f7d68673a6be50fac0549a Author: Peter Zijlstra Date: Tue Sep 3 13:43:24 2019 +0200 x86/alternatives: Update int3_emulate_push() comment Update the comment now that we've merged x86_32 support. Tested-by: Alexei Starovoitov Tested-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Acked-by: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Thomas Gleixner Link: https://lkml.kernel.org/r/20191111132457.588386013@infradead.org Signed-off-by: Ingo Molnar commit 34682110abc50ffea7e002b0c2fd7ea9e0000ccc Author: Max Chou Date: Wed Nov 27 11:01:07 2019 +0800 Bluetooth: btusb: Edit the logical value for Realtek Bluetooth reset It should be pull low and pull high on the physical line for the Realtek Bluetooth reset. gpiod_set_value_cansleep() takes ACTIVE_LOW status for the logical value settings, so the original commit should be corrected. Signed-off-by: Max Chou Signed-off-by: Marcel Holtmann commit 7e7129dcbd81721b8f69a535c686cedfded888c1 Author: Clint Taylor Date: Thu Nov 21 12:14:55 2019 -0800 drm/i915: Disable display interrupts during display IRQ handler During the Display Interrupt Service routine the Display Interrupt Enable bit must be disabled, The interrupts handled, then the Display Interrupt Enable bit must be set to prevent possible missed interrupts. Bspec: 49212 V2: Change Title to remove SDE reference. V3: Fix TAB spacing. Cc: Lucas De Marchi Cc: Aditya Swarup Reviewed-by: Matt Roper Signed-off-by: Clint Taylor Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20191121201455.2558-1-clinton.a.taylor@intel.com commit 071309814d68ad7ce01bbbd99c0116e59f13c239 Author: Kai Vehmanen Date: Mon Nov 25 14:53:12 2019 +0200 drm/i915/dp: fix DP audio for PORT_A on gen12+ Starting with gen12, PORT_A can be connected to a transcoder with audio support. Modify the existing logic that disabled audio on PORT_A unconditionally. Signed-off-by: Kai Vehmanen Reviewed-by: Matt Roper Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20191125125313.17584-1-kai.vehmanen@linux.intel.com commit edac2525ae9efe79572c0bbbd38d5d67a1bca23b Author: Jules Irenge Date: Tue Nov 26 00:35:14 2019 +0000 drm: radeon: replace 0 with NULL Replace 0 with NULL to fix sparse tool warning warning: Using plain integer as NULL pointer Acked-by: Christian König Reviewed-by: Zhan Liu Signed-off-by: Jules Irenge Signed-off-by: Alex Deucher commit f4618fe9c26d749613d53ee9d661b6baf9af3b12 Author: Dan Carpenter Date: Tue Nov 26 15:10:29 2019 +0300 drm/amdgpu: Fix a bug in jpeg_v1_0_start() Originally the last WREG32_SOC15() was a part of the if statement block but the curly braces are on the wrong line. Fixes: bb0db70f3f75 ("drm/amdgpu: separate JPEG1.0 code out from VCN1.0") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit 5149f08275de88ed6aade660e6ec5620962fa7a6 Author: Alex Deucher Date: Mon Nov 25 11:11:18 2019 -0500 drm/amdgpu: flag vram lost on baco reset for VI/CIK VI/CIK BACO was inflight when this fix landed for SOC15/NV. Add the fix to VI/CIK as well. Acked-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit de185019bcb9d824d3dd5a80746571e83644b636 Author: Alex Deucher Date: Wed Nov 20 17:31:11 2019 -0500 drm/amdgpu: move pci handling out of pm ops The documentation says the that PCI core handles this for you unless you choose to implement it. Just rely on the PCI core to handle the pci specific bits. Reviewed-by: Zhan Liu Signed-off-by: Alex Deucher commit adc8139e687ed58548a92cda541d10c57212cd38 Author: Zhan liu Date: Mon Nov 25 17:25:18 2019 -0500 drm/amd/display: Modify comments to match the code [Why] This line of code was modified. However, comments remained unchanged. As a result, comments and code are mismatching. [How] Modifying comments to reflect code. At the same time, explaining why the value was changed from 200ms to 3000ms. Signed-off-by: Zhan Liu Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit be3e73ea7def13abbb481844aaaa073903e18b03 Author: Hawking Zhang Date: Wed Nov 20 19:21:35 2019 +0800 drm/amdgpu: apply gpr/gds workaround before enabling GFX EDC mode gfx memory should be initialized before enabling DED and FUE field in mmGB_EDC_MODE Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e416fdb6a36e873434ac859f73fed487250cda91 Author: Jack Zhang Date: Tue Nov 26 14:47:29 2019 +0800 drm/amd/amdgpu/sriov skip jpeg ip block for ARCTURUS VF Currently ARCTURUS VF doesn't support jpeg ip block. Skip jpeg ip block in case guest driver load fail. Signed-off-by: Jack Zhang Reviewed-by: Zhexi Zhang Signed-off-by: Alex Deucher commit 9f890f3044c79d18bce1f3a3f75037b93e71b880 Author: Felix Kuehling Date: Mon Jul 15 16:18:03 2019 -0400 drm/amdgpu: Optimize KFD page table reservation Be less pessimistic about estimated page table use for KFD. Most allocations use 2MB pages and therefore need less VRAM for page tables. This allows more VRAM to be used for applications especially on large systems with many GPUs and hundreds of GB of system memory. Example: 8 GPUs with 32GB VRAM each + 256GB system memory = 512GB Old page table reservation per GPU: 1GB New page table reservation per GPU: 32MB Signed-off-by: Felix Kuehling Reviewed-by: xinhui pan Signed-off-by: Alex Deucher commit b72ff1909cf3267e48b905e5bdd6e7e41d0a8593 Author: Felix Kuehling Date: Mon Nov 25 16:25:35 2019 -0500 drm/amdgpu: Raise KFD unpinned system memory limit Allow KFD applications to use more unpinned system memory through HMM. Signed-off-by: Felix Kuehling Reviewed-by: Yong Zhao Signed-off-by: Alex Deucher commit 79c4ac0d759b6baaca22d7f37f6594a677030976 Author: Bhawanpreet Lakha Date: Mon Nov 25 10:34:13 2019 -0500 drm/amd/display: Null check aconnector in event_property_validate [Why] previously event_property_validate was only called after we enabled the display. But after "Refactor HDCP to handle multiple displays per link" this function can be called at any time. In certain cases we don't have a aconnector [How] Null check aconnector and exit early. This is ok because we only need to check the ENABLED->DESIRED transition if a connector exists. Fixes: b1abe5586ffc ("drm/amd/display: Refactor HDCP to handle multiple displays per link") Signed-off-by: Bhawanpreet Lakha Reviewed-by: Zhan Liu Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 9b93daa93ebe85bd7f355f4f043f3e52e67c86cf Author: Stanislav Lisovskiy Date: Mon Nov 25 18:08:00 2019 +0200 drm/i915: Support more QGV points According to BSpec 53998, there is a mask of max 8 SAGV/QGV points we need to support. Bumping this up to keep the CI happy(currently preventing tests to run), until all SAGV changes land. v2: Fix second plane where QGV points were hardcoded as well. v3: Change the naming of I915_NUM_SAGV_POINTS to be I915_NUM_QGV_POINTS, as more meaningful (Ville Syrjälä) Reviewed-by: Ville Syrjälä Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112189 Signed-off-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20191125160800.14740-1-stanislav.lisovskiy@intel.com [vsyrjala: Add missing braces around else (checkpatch), fix Bugzilla tag] Signed-off-by: Ville Syrjälä commit 58e8c603b8fe4b52bf7236a5a253ef61350a19fe Author: YueHaibing Date: Mon Nov 25 22:58:43 2019 +0800 drm/amd/powerplay: remove set but not used variable 'stretch_amount2' drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c: In function vegam_populate_clock_stretcher_data_table: drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1489:29: warning: variable stretch_amount2 set but not used [-Wunused-but-set-variable] It is never used, so can be removed. Signed-off-by: YueHaibing Signed-off-by: Alex Deucher commit ef2cb90a906a8537954ebe751e93ed3dbfae93c9 Author: YueHaibing Date: Mon Nov 25 22:54:45 2019 +0800 drm/amd/display: remove set but not used variable 'msg_out' drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.c: In function mod_hdcp_hdcp2_enable_encryption: drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.c:633:77: warning: variable msg_out set but not used [-Wunused-but-set-variable] drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.c: In function mod_hdcp_hdcp2_enable_dp_stream_encryption: drivers/gpu/drm/amd/amdgpu/../display/modules/hdcp/hdcp_psp.c:710:77: warning: variable msg_out set but not used [-Wunused-but-set-variable] It is never used, so remove it. Reported-by: Hulk Robot Signed-off-by: YueHaibing Signed-off-by: Alex Deucher commit 70ebe8a48216ae2fda862cae47ff0b8af5b279b9 Author: Timothy Pearson Date: Sun Nov 24 13:15:16 2019 -0600 amdgpu: Enable KFD on POWER systems KFD has been verified to function on POWER systems (Talos II / Vega 64). It should be available as a kernel configuration option on these systems. Signed-off-by: Timothy Pearson Signed-off-by: Alex Deucher commit 9cb98bb73ef0f01ce9bd52172edf8650374d7c39 Author: Colin Ian King Date: Fri Nov 22 23:15:04 2019 +0000 drm/radeon: remove redundant assignment to variable ret The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit a63141e31764f8daf3f29e8e2d450dcf9199d1c8 Author: Nathan Chancellor Date: Sat Nov 23 12:23:36 2019 -0700 drm/amdgpu: Ensure ret is always initialized when using SOC15_WAIT_ON_RREG Commit b0f3cd3191cd ("drm/amdgpu: remove unnecessary JPEG2.0 code from VCN2.0") introduced a new clang warning in the vcn_v2_0_stop function: ../drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1082:2: warning: variable 'r' is used uninitialized whenever 'while' loop exits because its condition is false [-Wsometimes-uninitialized] SOC15_WAIT_ON_RREG(VCN, 0, mmUVD_STATUS, UVD_STATUS__IDLE, 0x7, r); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/amd/amdgpu/../amdgpu/soc15_common.h:55:10: note: expanded from macro 'SOC15_WAIT_ON_RREG' while ((tmp_ & (mask)) != (expected_value)) { \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1083:6: note: uninitialized use occurs here if (r) ^ ../drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1082:2: note: remove the condition if it is always true SOC15_WAIT_ON_RREG(VCN, 0, mmUVD_STATUS, UVD_STATUS__IDLE, 0x7, r); ^ ../drivers/gpu/drm/amd/amdgpu/../amdgpu/soc15_common.h:55:10: note: expanded from macro 'SOC15_WAIT_ON_RREG' while ((tmp_ & (mask)) != (expected_value)) { \ ^ ../drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c:1072:7: note: initialize the variable 'r' to silence this warning int r; ^ = 0 1 warning generated. To prevent warnings like this from happening in the future, make the SOC15_WAIT_ON_RREG macro initialize its ret variable before the while loop that can time out. This macro's return value is always checked so it should set ret in both the success and fail path. Link: https://github.com/ClangBuiltLinux/linux/issues/776 Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher commit 07863a6cc2936f8cc4b5bfb506dec48531cc4948 Author: Nathan Chancellor Date: Sat Nov 23 12:36:39 2019 -0700 drm/amd/display: Use NULL for pointer assignment in copy_stream_update_to_stream Clang warns: ../drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:1965:26: warning: expression which evaluates to zero treated as a null pointer constant of type 'struct dc_dsc_config *' [-Wnon-literal-null-conversion] update->dsc_config = false; ^~~~~ ../drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:1971:25: warning: expression which evaluates to zero treated as a null pointer constant of type 'struct dc_dsc_config *' [-Wnon-literal-null-conversion] update->dsc_config = false; ^~~~~ 2 warnings generated. Fixes: f6fe4053b91f ("drm/amd/display: Use a temporary copy of the current state when updating DSC config") Link: https://github.com/ClangBuiltLinux/linux/issues/777 Reviewed-by: Harry Wentland Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher commit dde8c8dfd0b7dd61ada1fc1b8560dd974140ba3f Author: Colin Ian King Date: Fri Nov 22 23:04:07 2019 +0000 drm/amd/powerplay: remove redundant assignment to variables HiSidd and LoSidd The variables HiSidd and LoSidd are being initialized with values that are never read and are being updated a little 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 fd5a7254721e64b7604adffdcfad5b126142008b Author: Alex Deucher Date: Fri Nov 22 14:16:55 2019 -0500 MAINTAINERS: Drop Rex Zhu for amdgpu powerplay No longer works on the driver. Reviewed-by: Christian König Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 19d32ace8b6acebc45da1ea748000ac79ccc7721 Author: Maarten Lankhorst Date: Tue Nov 26 15:25:16 2019 +0100 udmabuf: Remove deleted map/unmap handlers. Commit 7f0de8d80816 ("dma-buf: Drop dma_buf_k(un)map") removed map/unmap handlers, but they still existed in udmabuf. Remove them there as well Signed-off-by: Maarten Lankhorst Fixes: 7f0de8d80816 ("dma-buf: Drop dma_buf_k(un)map") Cc: Sumit Semwal Cc: Daniel Vetter Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191126142516.630200-1-maarten.lankhorst@linux.intel.com commit 58b4c1a07ada7fb91ea757bdb9bd47df02207357 Author: Chris Wilson Date: Tue Nov 26 06:55:21 2019 +0000 drm/i915: Reduce nested prepare_remote_context() to a trylock On context retiring, we may invoke the kernel_context to unpin this context. Elsewhere, we may use the kernel_context to modify this context. This currently leads to an AB-BA lock inversion, so we need to back-off from the contended lock, and repeat. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111732 Signed-off-by: Chris Wilson Fixes: a9877da2d629 ("drm/i915/oa: Reconfigure contexts on the fly") Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191126065521.2331017-1-chris@chris-wilson.co.uk commit 8ed447744bec60b05acf452af889f56934275c99 Author: Thomas Zimmermann Date: Thu Nov 14 15:10:25 2019 +0100 drm/udl: Replace struct udl_framebuffer with generic implementation The udl driver's struct udl_framebuffer stores a DRM framebuffer with an associated GEM object. This functionality is also provided by generic code. Switch udl over. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191114141025.32198-6-tzimmermann@suse.de commit 8344603534e17f9926253a65088f59b787222bc5 Author: Thomas Zimmermann Date: Thu Nov 14 15:10:24 2019 +0100 drm/udl: Call udl_handle_damage() with DRM framebuffer Simplifying the udl code before replacing struct udl_framebuffer. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191114141025.32198-5-tzimmermann@suse.de commit ba59b015a0145330e2bf7ab20d504bc624fd618a Author: Thomas Zimmermann Date: Thu Nov 14 15:10:23 2019 +0100 drm/udl: Store active framebuffer in device structure The framebuffer's 'active_16' flag signals which framebuffer to flush to device memory. Moving the 'active_16' state from struct udl_framebuffer into struct udl_device prepares for using the generic GEM framebuffer. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191114141025.32198-4-tzimmermann@suse.de commit f3f8630a9a7c8f8ab1b16e09b254417478df5182 Author: Thomas Zimmermann Date: Thu Nov 14 15:10:22 2019 +0100 drm/udl: Remove udl implementation of GEM's free_object() Udl's custom implementation for struct drm_gem_object_funcs.free_object unmaps perma-mapped memory buffer before freeing the buffer object. After switching to generic fbdev emulation and fixing the damage handler, no perma-mapped buffers have to be released. Switch to SHMEM's implementation of free_object. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191114141025.32198-3-tzimmermann@suse.de commit 6c44e30ae130b740441ac0c65d5fa12dd6586942 Author: Thomas Zimmermann Date: Thu Nov 14 15:10:21 2019 +0100 drm/udl: Unmap buffer object after damage update Udl keeps a BO mapped for its entire lifetime if it has been used in a damage update at least once. The BO's free callback release the mapping before it frees the BO. Change this behaviour to unmap immediately after the damage update, so SHMEM's implementation of free can be used. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20191114141025.32198-2-tzimmermann@suse.de commit 4337ebbbbda3fb82e4fd928188a86e0bff0e9042 Author: Daniel Vetter Date: Mon Nov 18 11:35:36 2019 +0100 dma-buf: Remove kernel map/unmap hooks All implementations are gone now. Acked-by: Sumit Semwal 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/20191118103536.17675-16-daniel.vetter@ffwll.ch commit 4cefe7a5be64fd7450e241a972f510b68a113ebd Author: Daniel Vetter Date: Mon Nov 18 11:35:26 2019 +0100 drm/armada: Delete dma_buf->k(un)map implemenation It's a dummy anyway. Acked-by: Russell King Signed-off-by: Daniel Vetter Cc: Russell King Link: https://patchwork.freedesktop.org/patch/msgid/20191118103536.17675-6-daniel.vetter@ffwll.ch commit 5766a5ffc6a69595903865518c43636bde0e4ac4 Author: Chris Wilson Date: Mon Nov 25 16:27:37 2019 +0000 drm/i915: Default to a more lenient forced preemption timeout Based on a sampling of a number of benchmarks across platforms, by default opt for a much more lenient timeout so that we should not adversely affect existing "good" clients. 640ms ought to be enough for anyone. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112169 Fixes: 3a7a92aba8fb ("drm/i915/execlists: Force preemption") Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Eero Tamminen Cc: Dmitry Rogozhkin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191125162737.2161069-1-chris@chris-wilson.co.uk commit 59c3797076f61e822ecfc4e919dd1fa53931008e Author: Daniel Vetter Date: Mon Nov 18 11:35:35 2019 +0100 sample/vfio-mdev/mbocs: Remove dma_buf_k(un)map support No in-tree users left. Acked-by: Sumit Semwal Acked-by: Gerd Hoffmann Signed-off-by: Daniel Vetter Cc: Kirti Wankhede Cc: kvm@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20191118103536.17675-15-daniel.vetter@ffwll.ch commit dea8c09c3285912d3f3566210ebc5ecc3d9191c7 Author: Daniel Vetter Date: Mon Nov 18 11:35:34 2019 +0100 xen/gntdev-dmabuf: Ditch dummy map functions There's no in-kernel users for the k(un)map stuff. And the mmap one is actively harmful - return 0 and then _not_ actually mmaping can't end well. Acked-by: Sumit Semwal Reviewed-by: Oleksandr Andrushchenko Reviewed-by: Juergen Gross Signed-off-by: Daniel Vetter Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: xen-devel@lists.xenproject.org Link: https://patchwork.freedesktop.org/patch/msgid/20191118103536.17675-14-daniel.vetter@ffwll.ch commit 42aa7c6eb3ebfc280cc116978a3c003bcadb3440 Author: Daniel Vetter Date: Mon Nov 18 11:35:33 2019 +0100 drm/tee_shm: Drop dma_buf_k(unmap) support There's no in-tree users anymore. Acked-by: Greg Kroah-Hartman Acked-by: Jens Wiklander Acked-by: Sumit Semwal Signed-off-by: Daniel Vetter Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Jens Wiklander Cc: tee-dev@lists.linaro.org Link: https://patchwork.freedesktop.org/patch/msgid/20191118103536.17675-13-daniel.vetter@ffwll.ch commit 19d564adff7085c9f976712cfe4737aa3b3e8cce Author: Daniel Vetter Date: Mon Nov 18 11:35:32 2019 +0100 media/videobuf2: Drop dma_buf->k(un)map support No in-tree users left. Acked-by: Marek Szyprowski Acked-by: Hans Verkuil Acked-by: Sumit Semwal Signed-off-by: Daniel Vetter Cc: Pawel Osciak Cc: Marek Szyprowski Cc: Kyungmin Park Cc: Tomasz Figa Cc: linux-media@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20191118103536.17675-12-daniel.vetter@ffwll.ch commit 43b8df6140072db0867640ada6c07a8cfc3b119f Author: Daniel Vetter Date: Mon Nov 18 11:35:31 2019 +0100 drm/vmwgfx: Delete mmaping functions No need for stubs, dma-buf.c takes care of that. Reviewed-by: Thomas Hellstrom Acked-by: Sumit Semwal Signed-off-by: Daniel Vetter Cc: VMware Graphics Cc: Thomas Hellstrom Link: https://patchwork.freedesktop.org/patch/msgid/20191118103536.17675-11-daniel.vetter@ffwll.ch commit 7f0de8d80816d9620e995cf98acf4b6cd2d7c230 Author: Daniel Vetter Date: Mon Nov 18 11:35:30 2019 +0100 dma-buf: Drop dma_buf_k(un)map It's unused. 10 years ago, back when 32bit was still fairly common and trying to not exhaust vmalloc space sounded like a worthwhile goal, adding these to dma_buf made sense. Reality is that they simply never caught on, and nowadays everyone who needs plenty of buffers will run in 64bit mode anyway. Also update the docs in this area to adjust them to reality. The actual hooks in dma_buf_ops will be removed once all the implementations are gone. Acked-by: Sumit Semwal 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/20191118103536.17675-10-daniel.vetter@ffwll.ch commit 7195cf427b6822a40210f5ab1078aecaa5aaea8a Author: Daniel Vetter Date: Mon Nov 18 11:35:29 2019 +0100 drm/tegra: Remove dma_buf->k(un)map No in-tree users left. Reviewed-by: Thierry Reding Tested-by: Thierry Reding Acked-by: Sumit Semwal Signed-off-by: Daniel Vetter Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20191118103536.17675-9-daniel.vetter@ffwll.ch commit 0d1da1fe305b9b9229786c598e7dfd8942e7c92b Author: Daniel Vetter Date: Mon Nov 18 11:35:28 2019 +0100 drm/omapdrm: Drop dma_buf->k(un)map No in-tree users left. Note that this is one of the few (if only) implementations of dma-buf that provided a kmap, but not a vmap implemenation. Given that the only real user (in-tree at least) of kmap was tegra, and it's impossible to buy a chip with tegra host1x and ompadrm on the same SoC, there's no problem here. Acked-by: Tomi Valkeinen Acked-by: Sumit Semwal Signed-off-by: Daniel Vetter Cc: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20191118103536.17675-8-daniel.vetter@ffwll.ch commit 9c8679612e0b71cd3d8d5f4eb99e59b1eeb48695 Author: Daniel Vetter Date: Mon Nov 18 11:35:27 2019 +0100 drm/i915: Drop dma_buf->k(un)map No in-tree users left. Aside, I think mock_dmabuf would be a nice addition to drm mock/selftest helpers (we have some already), with an EXPORT_SYMBOL_FOR_TESTS_ONLY. Acked-by: Christian König Reviewed-by: Chris Wilson Acked-by: Sumit Semwal Signed-off-by: Daniel Vetter Cc: Chris Wilson Cc: Matthew Auld Cc: Daniel Vetter Cc: Jani Nikula Cc: Sam Ravnborg Cc: "Christian König" Link: https://patchwork.freedesktop.org/patch/msgid/20191118103536.17675-7-daniel.vetter@ffwll.ch commit 3e9e0c5c764704218c0960ffdb139de075afaadf Author: Daniel Vetter Date: Mon Nov 18 11:35:25 2019 +0100 staging/android/ion: delete dma_buf->kmap/unmap implemenation There's no callers in-tree anymore. For merging probably best to stuff this into drm-misc, since that's where the dma-buf heaps will land too. And the resulting conflict hopefully ensures that dma-buf heaps wont have a new ->kmap/unmap implemenation. Acked-by: Greg Kroah-Hartman Acked-by: Laura Abbott Acked-by: Sumit Semwal Signed-off-by: Daniel Vetter Cc: Laura Abbott Cc: Sumit Semwal Cc: devel@driverdev.osuosl.org Cc: linaro-mm-sig@lists.linaro.org Link: https://patchwork.freedesktop.org/patch/msgid/20191118103536.17675-5-daniel.vetter@ffwll.ch commit 64147c092e4f1ce8f72b0586078f251e4f9d84ec Author: Daniel Vetter Date: Mon Nov 18 11:35:24 2019 +0100 drm/i915: Remove dma_buf_kmap selftest It's the only user left in the entire kernel for dma_buf_kmap/_kunmap. Delete it, before we start garbage-collecting the various implementations. Reviewed-by: Chris Wilson Acked-by: Sumit Semwal Signed-off-by: Daniel Vetter Cc: Chris Wilson Cc: Matthew Auld Cc: Daniel Vetter Cc: Mika Kuoppala Cc: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20191118103536.17675-4-daniel.vetter@ffwll.ch commit 35bd71dd1c161e6e89b21138e01e8c04c6347716 Author: Daniel Vetter Date: Mon Nov 18 11:35:23 2019 +0100 drm/tegra: Delete host1x_bo_ops->k(un)map It doesn't have any callers anymore. Aside: The ->mmap/munmap hooks have a bit a confusing name, they don't do userspace mmaps, but a kernel vmap. I think most places use vmap for this, except ttm, which uses kmap for vmap for added confusion. mmap seems entirely for userspace mappings set up through mmap(2) syscall. Reviewed-by: Thierry Reding Tested-by: Thierry Reding Acked-by: Sumit Semwal Signed-off-by: Daniel Vetter Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20191118103536.17675-3-daniel.vetter@ffwll.ch commit 7a8139c54e75a67b85692eb5f238710d59a1dfc3 Author: Daniel Vetter Date: Mon Nov 18 11:35:22 2019 +0100 drm/tegra: Map cmdbuf once for reloc processing A few reasons to drop kmap: - For native objects all we do is look at obj->vaddr anyway, so might as well not call functions for every page. - Reloc-processing on dma-buf is ... questionable. - Plus most dma-buf that bother kernel cpu mmaps give you at least vmap, much less kmaps. And all the ones relevant for arm-soc are again doing a obj->vaddr game anyway, there's no real kmap going on on arm it seems. Plus this seems to be the only real in-tree user of dma_buf_kmap, and I'd like to get rid of that. Reviewed-by: Thierry Reding Tested-by: Thierry Reding Acked-by: Sumit Semwal Signed-off-by: Daniel Vetter Cc: Thierry Reding Cc: linux-tegra@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20191118103536.17675-2-daniel.vetter@ffwll.ch commit 4c50d6f64958a17cca3d7dedcdf4fad54804655d Author: Krzysztof Kozlowski Date: Thu Nov 21 21:29:30 2019 +0800 drm/amd: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Reviewed-by: Alex Deucher Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alex Deucher commit 8633f126bf53f23b8de932ea01db65991f21d425 Author: John Clements Date: Mon Nov 25 18:24:17 2019 +0800 drm/amdgpu: Resolved offchip EEPROM I/O issue Updated target I2C address Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 3d3f9ba8c4cde8cd69378b01979711d57c5feb19 Author: Oak Zeng Date: Fri Nov 22 14:15:43 2019 -0600 drm/amdgpu: Apply noretry setting for mmhub9.4 Config the translation retry behavior according to noretry kernel parameter Signed-off-by: Oak Zeng Suggested-by: Jay Cornwall Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 34f5fe1243f072d9a10065a06d4b421f01636c09 Author: Chris Wilson Date: Mon Nov 25 12:48:56 2019 +0000 drm/i915/selftests: Move mock_vma to the heap to reduce stack_frame An i915_vma struct on the stack may push the frame over the limit, if set conservatively, so move it to the heap. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20191125124856.1761176-1-chris@chris-wilson.co.uk commit f053c83ad5c88427644e06746bfddcefa409c27d Author: Uma Shankar Date: Sat Nov 23 14:48:40 2019 +0530 Revert "drm/fbdev: Fallback to non tiled mode if all tiles not present" This reverts commit f25c7a006cd1 ("drm/fbdev: Fallback to non tiled mode if all tiles not present"). The commit causes flip done timeouts in CI. Below are the sample errors thrown in logs: [IGT] core_getversion: executing [IGT] core_getversion: exiting, ret=0 Setting dangerous option reset - tainting kernel drm:drm_atomic_helper_wait_for_dependencies] ERROR [CRTC:152:pipe B] flip_done timed out drm:drm_atomic_helper_wait_for_dependencies] ERROR [CONNECTOR:299:DP-2] flip_done timed out drm:drm_atomic_helper_wait_for_dependencies] ERROR [PLANE:92:plane 1B] flip_done timed out [drm:drm_atomic_helper_wait_for_flip_done] ERROR [CRTC:152:pipe B] flip_done timed out [drm:drm_atomic_helper_wait_for_dependencies] ERROR [CRTC:152:pipe B] flip_done timed out [drm:drm_atomic_helper_wait_for_dependencies] ERROR [CONNECTOR:299:DP-2] flip_done timed out [drm:drm_atomic_helper_wait_for_dependencies] ERROR [PLANE:92:plane 1B] flip_done timed out [drm:drm_atomic_helper_wait_for_flip_done] ERROR [CRTC:152:pipe B] flip_done timed out Console: switching to colour frame buffer device 480x135 [drm:drm_atomic_helper_wait_for_dependencies] ERROR [CRTC:152:pipe B] flip_done timed out [drm:drm_atomic_helper_wait_for_dependencies] ERROR [CONNECTOR:299:DP-2] flip_done timed out Reverting the change for now to unblock CI execution. Cc: Ville Syrjälä Cc: Dave Airlie Cc: Jani Nikula Cc: Manasi Navare Signed-off-by: Uma Shankar Fixes: f25c7a006cd1 ("drm/fbdev: Fallback to non tiled mode if all tiles not present") Closes: https://gitlab.freedesktop.org/drm/intel/issues/6 Acked-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20191123091840.32382-1-uma.shankar@intel.com commit 4f88f8747fa43c97c3b3712d8d87295ea757cc51 Author: Chris Wilson Date: Mon Nov 25 10:58:58 2019 +0000 drm/i915/gt: Schedule request retirement when timeline idles The major drawback of commit 7e34f4e4aad3 ("drm/i915/gen8+: Add RC6 CTX corruption WA") is that it disables RC6 while Skylake (and friends) is active, and we do not consider the GPU idle until all outstanding requests have been retired and the engine switched over to the kernel context. If userspace is idle, this task falls onto our background idle worker, which only runs roughly once a second, meaning that userspace has to have been idle for a couple of seconds before we enable RC6 again. Naturally, this causes us to consume considerably more energy than before as powersaving is effectively disabled while a display server (here's looking at you Xorg) is running. As execlists will get a completion event as each context is completed, we can use this interrupt to queue a retire worker bound to this engine to cleanup idle timelines. We will then immediately notice the idle engine (without userspace intervention or the aid of the background retire worker) and start parking the GPU. Thus during light workloads, we will do much more work to idle the GPU faster... Hopefully with commensurate power saving! v2: Watch context completions and only look at those local to the engine when retiring to reduce the amount of excess work we perform. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112315 References: 7e34f4e4aad3 ("drm/i915/gen8+: Add RC6 CTX corruption WA") References: 2248a28384fe ("drm/i915/gen8+: Add RC6 CTX corruption WA") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191125105858.1718307-3-chris@chris-wilson.co.uk commit 88a4655e75ac8f55eea5e3f38b176cba9cf653b5 Author: Chris Wilson Date: Mon Nov 25 10:58:57 2019 +0000 drm/i915/gt: Adapt engine_park synchronisation rules for engine_retire In the next patch, we will introduce a new asynchronous retirement worker, fed by execlists CS events. Here we may queue a retirement as soon as a request is submitted to HW (and completes instantly), and we also want to process that retirement as early as possible and cannot afford to postpone (as there may not be another opportunity to retire it for a few seconds). To allow the new async retirer to run in parallel with our submission, pull the __i915_request_queue (that passes the request to HW) inside the timelines spinlock so that the retirement cannot release the timeline before we have completed the submission. v2: Actually to play nicely with engine_retire, we have to raise the timeline.active_lock before releasing the HW. intel_gt_retire_requsts() is still serialised by the outer lock so they cannot see this intermediate state, and engine_retire is serialised by HW submission. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191125105858.1718307-2-chris@chris-wilson.co.uk commit de5825beae9a0ae51f14a92859c6ec916235cd4d Author: Chris Wilson Date: Mon Nov 25 10:58:56 2019 +0000 drm/i915: Serialise with engine-pm around requests on the kernel_context As the engine->kernel_context is used within the engine-pm barrier, we have to be careful when emitting requests outside of the barrier, as the strict timeline locking rules do not apply. Instead, we must ensure the engine_park() cannot be entered as we build the request, which is simplest by taking an explicit engine-pm wakeref around the request construction. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20191125105858.1718307-1-chris@chris-wilson.co.uk commit da0ef77e1e0ccff703efee82406c629d5c4f4bbb Author: Chris Wilson Date: Mon Nov 25 11:25:20 2019 +0000 drm/i915/execlists: Fixup cancel_port_requests() I rushed a last minute correction to cancel_port_requests() to prevent the snooping of *execlists->active as the inflight array was being updated, without noticing we iterated the inflight array starting from active! Oops. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112387 Fixes: 331bf9059157 ("drm/i915/gt: Mark the execlists->active as the primary volatile access") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20191125112520.1760492-1-chris@chris-wilson.co.uk commit 02fdd85da2ce9434dab7d5172284336046afeb17 Author: Kalle Valo Date: Sat Nov 23 10:01:16 2019 +0200 MAINTAINERS: add ath11k Add an entry for ath11k to the MAINTAINERS file. Signed-off-by: John Crispin Signed-off-by: Kalle Valo commit d5c65159f2895379e11ca13f62feabe93278985d Author: Kalle Valo Date: Sat Nov 23 09:58:40 2019 +0200 ath11k: driver for Qualcomm IEEE 802.11ax devices ath11k is a new driver for Qualcomm IEEE 802.11ax devices, first supporting only IPQ8074 SoC using the shared memory AHB bus. ath11k uses mac80211 and supports AP, Station and Mesh modes. Even though ath11k has some similar code as with ath10k (especially the WMI layer) it was concluded to be simpler to have a "clean start" for ath11k code base and not try to share the code with ath10k. This makes maintenance easier and avoids major changes in ath10k, which would have significantly increased the risk of regressions in existing setups. Even though the driver is very similar with ath10k but there are major differences as well. The datapath is completely different. ath11k supports multiple MACs, called "soc" in the firmware interface. And there's only one WMI interface to support. Currently ath11k supports only IEEE 802.11ac mode, but patches for 802.11ax are available and they will be submitted after ath11k is accepted to upstream. The firmware images are available from ath11k-firmware repository but they will be also submitted to linux-firmware: https://github.com/kvalo/ath11k-firmware This was tested with firmware version WLAN.HK.2.1.0.1-00629-QCAHKSWPL_SILICONZ-1. The driver has had multiple authors who are listed in alphabetical order below. Signed-off-by: Anilkumar Kolli Signed-off-by: Bhagavathi Perumal S Signed-off-by: Ganesh Sesetti Signed-off-by: Govindaraj Saminathan Signed-off-by: John Crispin Signed-off-by: Julia Lawall Signed-off-by: Kalle Valo Signed-off-by: Karthikeyan Periyasamy Signed-off-by: kbuild test robot Signed-off-by: Maharaja Kennadyrajan Signed-off-by: Manikanta Pubbisetty Signed-off-by: Miles Hu Signed-off-by: Muna Sinada Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Rajkumar Manoharan Signed-off-by: Sathishkumar Muruganandam Signed-off-by: Shashidhar Lakkavalli Signed-off-by: Sriram R Signed-off-by: Sven Eckelmann Signed-off-by: Vasanthakumar Thiagarajan Signed-off-by: Venkateswara Naralasetty commit dae0978d4174422b4a2aa08a96252a1e60d40ef5 Author: Kalle Valo Date: Fri Nov 15 11:28:25 2019 +0200 dt: bindings: net: add qcom,ath11k.yaml ath11k is a driver for Qualcomm IEEE 802.11ax devices. Add a bindings document for the driver, first documenting IPQ8074 which is the only device ath11k currently supports. Signed-off-by: Anilkumar Kolli Reviewed-by: Rob Herring Signed-off-by: Kalle Valo commit 5b1413f00b5beb9f5fed94e43ea0c497d5db9633 Author: Colin Ian King Date: Fri Nov 15 12:09:53 2019 +0000 wil6210: fix break that is never reached because of zero'ing of a retry counter There is a check on the retry counter invalid_buf_id_retry that is always false because invalid_buf_id_retry is initialized to zero on each iteration of a while-loop. Fix this by initializing the retry counter before the while-loop starts. Addresses-Coverity: ("Logically dead code") Fixes: b4a967b7d0f5 ("wil6210: reset buff id in status message after completion") Signed-off-by: Colin Ian King Reviewed-by: Maya Erez Signed-off-by: Kalle Valo commit ea0c3e2a470271573d480f48a67e74633566a317 Author: Linus Lüssing Date: Fri Nov 15 11:56:12 2019 +0100 ath10k: fix RX of frames with broken FCS in monitor mode So far, frames were forwarded regardless of the FCS correctness leading to userspace applications listening on the monitor mode interface to receive potentially broken frames, even with the "fcsfail" flag unset. By default, with the "fcsfail" flag of a monitor mode interface unset, frames with FCS errors should be dropped. With this patch, the fcsfail flag is taken into account correctly. Tested-on: QCA4019 firmware-5-ct-full-community-12.bin-lede.011 Cc: Simon Wunderlich Signed-off-by: Linus Lüssing Signed-off-by: Kalle Valo commit 7005eafc1f1cb0a525631c2214f760d6fb636ebb Author: Wen Gong Date: Thu Nov 14 19:19:31 2019 +0800 ath10k: report rssi of each chain to mac80211 for sdio iw command only show rssi without each chain's rssi on sdio iw wlan0 station dump Station a0:40:a0:93:3e:de (on wlan0) signal: -82 dBm signal avg: -82 dBm after this patch, it will show each chain's rssi on sdio Station a0:40:a0:93:3e:de (on wlan0) signal: -82 [-84, -88] dBm signal avg: -82 [-84, -87] dBm For QCA6174 PCIe, the ppdu have the correct rssi of each chain, it indicate rssi of rx data by ath10k_htt_rx_h_signal. For sdio chip, the rssi of each chain stored in rx management reported by firmware, the ath10k_wmi_tlv_op_pull_mgmt_rx_ev which used for tlv wmi will get the rssi of each chain and stored them in wmi_mgmt_rx_ev_arg, then indicate them to mac80211. For non-tlv wmi chip, it will not get the rssi of each chain and not indicate to mac80211, for non-tlv wmi chip, this patch will not have impact. For tlv wmi chip, if the rssi of chain in mgmt is valid, it will be indicate to mac80211, tested with QCA6174 PCIe/SDIO, the rssi of 2 chain in mgmt is valid. rssi of chains in mgmt of QCA6174 SDIO: 92096.652780: ath10k:ath10k_log_warn: ath10k_sdio mmc1:0001:1 rssi[0]:70 92096.657324: ath10k:ath10k_log_warn: ath10k_sdio mmc1:0001:1 rssi[1]:68 92096.662009: ath10k:ath10k_log_warn: ath10k_sdio mmc1:0001:1 rssi[2]:128 92096.666647: ath10k:ath10k_log_warn: ath10k_sdio mmc1:0001:1 rssi[3]:128 rssi of chains in mgmt of QCA6174 PCIe: [ 1581.049816] ath10k_pci 0000:02:00.0: mgmt rssi[0]:17 [ 1581.049818] ath10k_pci 0000:02:00.0: mgmt rssi[1]:22 [ 1581.049821] ath10k_pci 0000:02:00.0: mgmt rssi[2]:128 [ 1581.049823] ath10k_pci 0000:02:00.0: mgmt rssi[3]:128 after apply this patch, the iw's rssi of PCIe do not changed, result is same with before. iw wlan0 station dump of QCA6174 PCIe: Station 6c:e8:73:b8:92:dc (on wlan0) signal: -70 [-77, -72] dBm signal avg: -69 [-78, -72] dBm iw wlan-5000mhz station dump of QCA9984 PCIe connected with 2 client which has 2 chain: Station 70:48:0f:1f:1a:b2 (on wlan-5000mhz) signal: -47 [-55, -48, -87, -88] dBm signal avg: -42 [-50, -43, -83, -86] dBm Station ac:c1:ee:39:e3:83 (on wlan-5000mhz) signal: -43 [-46, -45, -79, -84] dBm signal avg: -43 [-46, -46, -82, -83] dBm Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00017-QCARMSWP-1. Tested with QCA6174 PCIe with firmware WLAN.RM.4.4.1-00110-QCARMSWP-1. Tested with QCA9984 PCIe with firmware 10.4-3.9.0.2-00040. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 319c2b71041f324e06dbee03c1011106cf746795 Author: Jeffrey Hugo Date: Wed Nov 13 07:46:46 2019 -0800 ath10k: Handle "invalid" BDFs for msm8998 devices When the BDF download QMI message has the end field set to 1, it signals the end of the transfer, and triggers the firmware to do a CRC check. The BDFs for msm8998 devices fail this check, yet the firmware is happy to still use the BDF. It appears that this error is not caught by the downstream drive by concidence, therefore there are production devices in the field where this issue needs to be handled otherwise we cannot support wifi on them. So, attempt to detect this scenario as best we can and treat it as non-fatal. Signed-off-by: Jeffrey Hugo Reviewed-by: Bjorn Andersson Signed-off-by: Kalle Valo commit f8a595a87e93a33a10879f4b856be818d2f53c84 Author: Jeffrey Hugo Date: Wed Nov 13 07:40:16 2019 -0800 ath10k: Fix qmi init error handling When ath10k_qmi_init() fails, the error handling does not free the irq resources, which causes an issue if we EPROBE_DEFER as we'll attempt to (re-)register irqs which are already registered. Fix this by doing a power off since we just powered on the hardware, and freeing the irqs as error handling. Fixes: ba94c753ccb4 ("ath10k: add QMI message handshake for wcn3990 client") Signed-off-by: Jeffrey Hugo Signed-off-by: Kalle Valo commit 23b5156a856b6342c8a1ef7045d387c00cdb17c5 Author: Wen Gong Date: Fri Nov 8 17:27:06 2019 +0800 ath10k: add NL80211_FEATURE_ND_RANDOM_MAC_ADDR for NLO Add NL80211_FEATURE_ND_RANDOM_MAC_ADDR for NLO will enable the random mac address for netdetect case. iw command: iw phy0 wowlan enable net-detect net-detect randomize=AA:7B:A1:AC:B2:41/FF:FF:FF:FF:FF:FF interval 5000 delay 30 freqs 2412 matches ssid foo. After suspend, DUT will send probe request with mac AA:7B:A1:AC:B2:41. WCN3990, QCA9377, QCA6174 PCI also support this feature. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00029. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 501d4152b0184b7f0a4df03a1dc748b381410a11 Author: Jeffrey Hugo Date: Fri Nov 15 09:21:43 2019 +0200 ath10k: Handle when FW doesn't support QMI_WLFW_HOST_CAP_REQ_V01 Firmware with the build id QC_IMAGE_VERSION_STRING=WLAN.HL.1.0.2-XXXX does not support the QMI_WLFW_HOST_CAP_REQ_V01 message and will return the QMI not supported error to the ath10k driver. Since not supporting this message is not fatal to the firmware nor the ath10k driver, lets catch this particular scenario and ignore it so that we can still bring up wifi services successfully. Signed-off-by: Jeffrey Hugo Signed-off-by: Kalle Valo commit d58f466a5dee814b7820aff9aaa393b3782559d9 Author: Wen Gong Date: Fri Nov 15 09:21:35 2019 +0200 ath10k: add large size for BMI download data for SDIO Download firmware time cost of SDIO is too long, it is about 480ms, add large size 2048 bytes for BMI download for SDIO chip, its time cost will reduced to 240ms. This will optimize the download firmware time cost. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00017-QCARMSWP-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit e01cc82c4d1ec3bddcbb7cd991cf5dc0131ed9a1 Author: Wen Gong Date: Fri Nov 15 09:21:32 2019 +0200 ath10k: correct the tlv len of ath10k_wmi_tlv_op_gen_config_pno_start the tlv len is set to the total len of the wmi cmd, it will trigger firmware crash, correct the tlv len. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00017-QCARMSWP-1 and QCA6174 PCIE with firmware WLAN.RM.4.4.1-00110-QCARMSWPZ-1. Fixes: ce834e280f2f875 ("ath10k: support NET_DETECT WoWLAN feature") Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 2246c215659060b214c9cc7fcd4abec95874ae5a Author: Kalle Valo Date: Fri Nov 15 09:21:11 2019 +0200 ath10k: sdio: remove struct ath10k_sdio_rx_data::status It seems to be unused. Signed-off-by: Kalle Valo commit efd2f4c5016bd24f33357487adcf873359116e9a Author: Kalle Valo Date: Fri Nov 15 09:21:09 2019 +0200 ath10k: sdio: cosmetic cleanup Do some cosmetic cleanup while reviewing the files. No functional changes. Signed-off-by: Kalle Valo commit 67654b26c903de9949202f23f4864a74a09e22d5 Author: Wen Gong Date: Fri Nov 15 09:21:03 2019 +0200 ath10k: add workqueue for RX path of sdio For RX, it has two parts, one is to read data from sdio, another is to indicate the packets to upper stack. Recently it has only one thread to do all RX things, it results that it is sequential for RX and low throughout, change RX to parallel for the two parts will increase throughout. This patch move the indication to a workqueue, it results in significant performance improvement on RX path. Udp rx throughout is 200Mbps without this patch, and it arrives 400Mbps with this patch. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00017-QCARMSWPZ-1 Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 224776520ead69e9e85e33e5eb8c705c3552c4e1 Author: Wen Gong Date: Fri Nov 15 09:21:01 2019 +0200 ath10k: change max RX bundle size from 8 to 32 for sdio The max bundle size support by firmware is 32, change it from 8 to 32 will help performance. This results in significant performance improvement on RX path. The real max rx bundle is decided in ath10k_htc_wait_target(), it is the min value of HTC_HOST_MAX_MSG_PER_RX_BUNDLE and the value reported from firmware. So this change shouldn't cause any regressions with other hardware supported by ath10k. Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00017-QCARMSWPZ-1. Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 8d985555ddaa6735c5d1f3d6e4d4d9cb47f27878 Author: Alagu Sankar Date: Fri Nov 15 09:20:58 2019 +0200 ath10k: enable RX bundle receive for sdio The existing implementation of initiating multiple sdio transfers for receive bundling is slowing down the receive speed. Combining the transfers using a bundle method would be ideal. The transmission utilization ratio for sdio bus for small packet is slow, because the space and time cost for sdio bus is same for large length packet and small length packet. So the speed of data for large length packet is higher than small length. Test result of different length of data: data packet(byte) cost time(us) calculated rate(Mbps) 256 28 73 512 33 124 1024 35 234 1792 45 318 14336 168 682 28672 333 688 57344 660 695 Tested with QCA6174 SDIO with firmware WLAN.RMH.4.4.1-00017-QCARMSWPZ-1 Signed-off-by: Alagu Sankar Signed-off-by: Wen Gong Signed-off-by: Kalle Valo commit 6b7ce2c4161a00e0ab6170ca299ea330a914de9c Author: Thomas Zimmermann Date: Fri Nov 22 11:05:45 2019 +0100 drm/gma500: Remove struct psb_fbdev Gma500's struct psb_fbdev is an, otherwise empty, wrapper around struct drm_fb_helper. Remove it. Signed-off-by: Thomas Zimmermann Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20191122100545.16812-7-tzimmermann@suse.de commit 0a8ec2ed0783eb5f0b9a86adc92c8606808c8fd8 Author: Thomas Zimmermann Date: Fri Nov 22 11:05:44 2019 +0100 drm/gma500: Store framebuffer in struct drm_fb_helper The gma500 driver stores the console framebuffer in struct psb_fbdev. Moving it into struct drm_fb_helper will allow for removal of struct psb_fbdev. Signed-off-by: Thomas Zimmermann Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20191122100545.16812-6-tzimmermann@suse.de commit 0471c9f57d070a9cac6bcf1d7c8044722c4e1abe Author: Thomas Zimmermann Date: Fri Nov 22 11:05:43 2019 +0100 drm/gma500: Pass struct drm_gem_object to framebuffer functions Several framebuffer functions take a pointer to an object of type struct gtt_range when they actually need the GEM base object. Passing the GEM object removes some type casting and clutter. Signed-off-by: Thomas Zimmermann Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20191122100545.16812-5-tzimmermann@suse.de commit e18da8ce7d730b393581b1ee75e50faaa30f054c Author: Thomas Zimmermann Date: Fri Nov 22 11:05:42 2019 +0100 drm/gma500: Replace struct psb_framebuffer with struct drm_framebuffer After removing all unnecessary fields, struct psb_framebuffer is just a wrapper around struct drm_framebuffer. So we can replace the former with the latter. Signed-off-by: Thomas Zimmermann Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20191122100545.16812-4-tzimmermann@suse.de commit 86eda5a4c16757d04db9770b7c1399ecf8f268ca Author: Thomas Zimmermann Date: Fri Nov 22 11:05:41 2019 +0100 drm/gma500: Remove field 'fbdev' from struct psb_framebuffer The field 'fbdev' in struct psb_framebuffer serves no purpose. Remove it. Signed-off-by: Thomas Zimmermann Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20191122100545.16812-3-tzimmermann@suse.de commit 641099fe0cf878fdab8e42d907ed383e9d5a9c16 Author: Thomas Zimmermann Date: Fri Nov 22 11:05:40 2019 +0100 drm/gma500: Remove addr_space field from psb_framebuffer The field 'addr_space' in struct psb_framebuffer serves no purpose. Remove it. Signed-off-by: Thomas Zimmermann Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20191122100545.16812-2-tzimmermann@suse.de commit 331bf90591573dfe6c8e892239713ef9702f1396 Author: Chris Wilson Date: Mon Nov 25 09:43:18 2019 +0000 drm/i915/gt: Mark the execlists->active as the primary volatile access Since we want to do a lockless read of the current active request, and that request is written to by process_csb also without serialisation, we need to instruct gcc to take care in reading the pointer itself. Otherwise, we have observed execlists_active() to report 0x40. [ 2400.760381] igt/para-4098 1..s. 2376479300us : process_csb: rcs0 cs-irq head=3, tail=4 [ 2400.760826] igt/para-4098 1..s. 2376479303us : process_csb: rcs0 csb[4]: status=0x00000001:0x00000000 [ 2400.761271] igt/para-4098 1..s. 2376479306us : trace_ports: rcs0: promote { b9c59:2622, b9c55:2624 } [ 2400.761726] igt/para-4097 0d... 2376479311us : __i915_schedule: rcs0: -2147483648->3, inflight:0000000000000040, rq:ffff888208c1e940 which is impossible! The answer is that as we keep the existing execlists->active pointing into the array as we copy over that array, the unserialised read may see a partial pointer value. Fixes: df403069029d ("drm/i915/execlists: Lift process_csb() out of the irq-off spinlock") Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191125094318.1630806-1-chris@chris-wilson.co.uk commit bae21dacd7b7167f3c2d61c11245f618a82749a1 Author: Chris Wilson Date: Mon Nov 25 09:14:09 2019 +0000 drm/i915: Switch kunmap() to take the page not vaddr On converting from kunmap_atomic() to kunamp() one must remember the latter takes the struct page, the former the vaddr. Fixes: 48715f700174 ("drm/i915: Avoid atomic context for error capture") Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20191125091409.1630385-1-chris@chris-wilson.co.uk commit 3540af8fc31533a51c5b53207a64e06b16de4270 Author: Krzysztof Kozlowski Date: Thu Nov 21 21:29:24 2019 +0800 drm/sun4i: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191121132924.29485-1-krzk@kernel.org commit c7a7a6aea7ad21ee2f3325d3f7f3b58eb5255b55 Author: Krzysztof Kozlowski Date: Thu Nov 21 21:29:19 2019 +0800 drm/vc4: Fix Kconfig indentation Adjust indentation from spaces to tab (+optional two spaces) as in coding style with command like: $ sed -e 's/^ /\t/' -i */Kconfig Signed-off-by: Krzysztof Kozlowski Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20191121132919.29430-1-krzk@kernel.org commit 69fed4ce2e9a1686894bc23e1523a7ca1a8c74f6 Author: Sven Eckelmann Date: Sat Nov 16 08:28:58 2019 +0100 batman-adv: Fix typo metAdata Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit f4191c6d80b92caf21d779429c51dd52e2a16d70 Author: Sven Eckelmann Date: Thu Nov 14 22:12:37 2019 +0100 batman-adv: Strip dots from variable macro kerneldoc The commit 43756e347f21 ("scripts/kernel-doc: Add support for named variable macro arguments") changed the handling of variable macro parameters. The three dots of the argument must no longer be added to the kernel doc. The support for the old format is scheduled to be removed in the future. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit a7c4a547ea1de2e9d6cb82263962aaff3ba67ff5 Author: Simon Wunderlich Date: Mon Nov 25 09:06:16 2019 +0100 batman-adv: Start new development cycle Signed-off-by: Simon Wunderlich commit b23490cbb2027bb37287d73a050e3a9c2e4e1f39 Author: Linus Walleij Date: Fri Nov 22 08:25:08 2019 +0100 drm/mcde: Do not needlessly logically and with 3 The i index i always 0..3 in these statements so there is no need to tag "& 3" to clamp it to 3 here. Make the operator precedence explicit even if it's correct as it is, the paranthesis creates less cognitive stress for humans. Reviewed-by: Stephan Gerhold Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20191122072508.25677-1-linus.walleij@linaro.org commit ce9cde04205a8f376e01d75a156f8810a98a2405 Author: Linus Walleij Date: Fri Nov 22 08:24:57 2019 +0100 drm/mcde: Reuse global DSI command defs The MCDE DSI include file redefines some commands that already exist in the common